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();
54 virtual void ExitMainLoop();
55 virtual bool Initialized();
56 virtual bool Pending();
57 virtual void Dispatch();
61 virtual bool Yield(bool onlyIfNeeded
= FALSE
);
62 virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
64 virtual bool OnInitGui();
66 // implementation from now on
67 // --------------------------
74 virtual bool Initialize(int& argc
, wxChar
**argv
);
75 virtual void CleanUp();
78 WXAppContext
GetAppContext() const { return m_appContext
; }
79 WXWidget
GetTopLevelWidget();
80 WXColormap
GetMainColormap(WXDisplay
* display
);
81 WXDisplay
* GetInitialDisplay() const { return m_initialDisplay
; }
83 void SetTopLevelWidget(WXDisplay
* display
, WXWidget widget
);
85 // This handler is called when a property change event occurs
86 virtual void HandlePropertyChange(WXEvent
*event
);
88 wxXVisualInfo
* GetVisualInfo(WXDisplay
* display
);
91 wxEventLoop
* m_eventLoop
;
94 WXAppContext m_appContext
;
95 WXColormap m_mainColormap
;
96 WXDisplay
* m_initialDisplay
;
97 wxPerDisplayDataMap
* m_perDisplayData
;