MutDocManager.cpp
gehe zur Dokumentation dieser Datei
00001 
00042 // availlable groups: GUI, route, kernel, muwx, debug
00043 
00044 // ---------------------------------------------------------------------------
00045 // headers
00046 // ---------------------------------------------------------------------------
00047 
00048 // For compilers that support precompilation, includes "wx/wx.h".
00049 #include "Defs.h"
00050 #include <wx/wxprec.h>
00051 #include "MutDocManager.h"
00052 #ifdef __BORLANDC__
00053     #pragma hdrstop
00054 #endif
00055 
00056 namespace mutabor {
00057 
00058         bool MutDocManager::TryParent(wxEvent& event)
00059         {
00060                 // if we must pass some events to the Application, 
00061                 // they must be handled here somehow replacing false
00062 #if 0
00063                 // Implementation in Event.cpp:
00064                 if ( wxTheApp && false )
00065                 {
00066                         // Special case: don't pass wxEVT_IDLE to wxApp, since it'll always
00067                         // swallow it. wxEVT_IDLE is sent explicitly to wxApp so it will be
00068                         // processed appropriately via SearchEventTable.
00069                         if ( event.GetEventType() != wxEVT_IDLE )
00070                         {
00071                                 if ( wxTheApp->ProcessEvent(event) )
00072                                         return true;
00073                         }
00074                 }
00075 #endif
00076 
00077                 return false;
00078         }
00079 
00080         // Extend event processing to search the view's event table
00081         bool MutDocManager::ProcessEvent(wxEvent& event)
00082         {
00083                 if (!wxEvtHandler::ProcessEvent(event))
00084                 {
00085                         wxView* view = GetCurrentView();
00086                         if (view && view->ProcessEvent(event))
00087                                 return true;
00088                         else return false;
00089                 }
00090                 return true;
00091         }
00092 
00093 
00094         // Make a frame title (override this to do something different)
00095         // If docName is empty, a document is not currently active.
00096         wxString MutDocManager::MakeFrameTitle(wxDocument* doc)
00097         {
00098                 wxString appName = wxTheApp->GetAppName();
00099                 wxString title;
00100                 if (!doc)
00101                         title = appName;
00102                 else
00103                 {
00104                         wxString docName;
00105                         doc->GetPrintableName(docName);
00106                         title = docName + wxString(_(" - ")) + _T(PACKAGE_NAME);
00107                 }
00108                 return title;
00109         }
00110 
00111 
00112 }

Erzeugt am Sun Aug 21 2011 10:51:54 für Mutabor von doxygen 1.7.4