1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxApp class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "app.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------
26 // forward declarations
27 // ----------------------------------------------------------------------------
29 class WXDLLEXPORT wxFrame
;
30 class WXDLLEXPORT wxWindow
;
31 class WXDLLEXPORT wxApp
;
32 class WXDLLEXPORT wxKeyEvent
;
33 class WXDLLEXPORT wxLog
;
34 class WXDLLEXPORT wxEventLoop
;
35 class WXDLLEXPORT wxXVisualInfo
;
36 class wxPerDisplayDataMap
;
38 // ----------------------------------------------------------------------------
39 // the wxApp class for Motif - see wxAppBase for more details
40 // ----------------------------------------------------------------------------
42 class WXDLLEXPORT wxApp
: public wxAppBase
44 DECLARE_DYNAMIC_CLASS(wxApp
)
50 // override base class (pure) virtuals
51 // -----------------------------------
53 virtual int MainLoop();
57 virtual bool Yield(bool onlyIfNeeded
= FALSE
);
58 virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
60 virtual bool OnInitGui();
62 // implementation from now on
63 // --------------------------
70 virtual bool Initialize(int& argc
, wxChar
**argv
);
71 virtual void CleanUp();
74 WXAppContext
GetAppContext() const { return m_appContext
; }
75 WXWidget
GetTopLevelWidget();
76 WXColormap
GetMainColormap(WXDisplay
* display
);
77 WXDisplay
* GetInitialDisplay() const { return m_initialDisplay
; }
79 void SetTopLevelWidget(WXDisplay
* display
, WXWidget widget
);
81 // This handler is called when a property change event occurs
82 virtual void HandlePropertyChange(WXEvent
*event
);
84 wxXVisualInfo
* GetVisualInfo(WXDisplay
* display
);
88 WXAppContext m_appContext
;
89 WXColormap m_mainColormap
;
90 WXDisplay
* m_initialDisplay
;
91 wxPerDisplayDataMap
* m_perDisplayData
;