]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | ///////////////////////////////////////////////////////////////////////////// |
925f7740 | 2 | // Name: wx/motif/app.h |
9b6dbb09 JS |
3 | // Purpose: wxApp class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
65571936 | 9 | // Licence: wxWindows licence |
9b6dbb09 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_APP_H_ | |
13 | #define _WX_APP_H_ | |
14 | ||
ee31c392 VZ |
15 | // ---------------------------------------------------------------------------- |
16 | // headers | |
17 | // ---------------------------------------------------------------------------- | |
18 | ||
9b6dbb09 | 19 | #include "wx/event.h" |
bdcade0a | 20 | #include "wx/hashmap.h" |
9b6dbb09 | 21 | |
ee31c392 VZ |
22 | // ---------------------------------------------------------------------------- |
23 | // forward declarations | |
24 | // ---------------------------------------------------------------------------- | |
25 | ||
b5dbe15d VS |
26 | class WXDLLIMPEXP_FWD_CORE wxFrame; |
27 | class WXDLLIMPEXP_FWD_CORE wxWindow; | |
28 | class WXDLLIMPEXP_FWD_CORE wxApp; | |
29 | class WXDLLIMPEXP_FWD_CORE wxKeyEvent; | |
4f7d425f | 30 | class WXDLLIMPEXP_FWD_BASE wxLog; |
b5dbe15d VS |
31 | class WXDLLIMPEXP_FWD_CORE wxEventLoop; |
32 | class WXDLLIMPEXP_FWD_CORE wxXVisualInfo; | |
33 | class WXDLLIMPEXP_FWD_CORE wxPerDisplayData; | |
9b6dbb09 | 34 | |
ee31c392 VZ |
35 | // ---------------------------------------------------------------------------- |
36 | // the wxApp class for Motif - see wxAppBase for more details | |
37 | // ---------------------------------------------------------------------------- | |
9b6dbb09 | 38 | |
bdcade0a MB |
39 | WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData*, wxPerDisplayDataMap ); |
40 | ||
53a2db12 | 41 | class WXDLLIMPEXP_CORE wxApp : public wxAppBase |
9b6dbb09 | 42 | { |
83df96d6 | 43 | DECLARE_DYNAMIC_CLASS(wxApp) |
925f7740 | 44 | |
ee31c392 VZ |
45 | public: |
46 | wxApp(); | |
7e1bcfa8 | 47 | virtual ~wxApp(); |
925f7740 | 48 | |
ee31c392 VZ |
49 | // override base class (pure) virtuals |
50 | // ----------------------------------- | |
925f7740 | 51 | |
ee31c392 | 52 | virtual int MainLoop(); |
e2478fde VZ |
53 | |
54 | virtual void Exit(); | |
55 | ||
e2478fde | 56 | virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp |
925f7740 | 57 | |
ee31c392 VZ |
58 | // implementation from now on |
59 | // -------------------------- | |
925f7740 | 60 | |
9b6dbb09 | 61 | protected: |
ee31c392 | 62 | bool m_showOnInit; |
925f7740 | 63 | |
9b6dbb09 | 64 | public: |
ee31c392 | 65 | // Implementation |
05e2b077 | 66 | virtual bool Initialize(int& argc, wxChar **argv); |
94826170 | 67 | virtual void CleanUp(); |
d48b06bd | 68 | virtual bool DoYield(bool onlyIfNeeded, long eventsToProcess); |
925f7740 | 69 | |
ee31c392 VZ |
70 | // Motif-specific |
71 | WXAppContext GetAppContext() const { return m_appContext; } | |
eb6fa4b4 | 72 | WXWidget GetTopLevelWidget(); |
5a2e3d8c | 73 | WXWidget GetTopLevelRealizedWidget(); |
72cdf4c9 | 74 | WXColormap GetMainColormap(WXDisplay* display); |
ee31c392 | 75 | WXDisplay* GetInitialDisplay() const { return m_initialDisplay; } |
eb6fa4b4 MB |
76 | |
77 | void SetTopLevelWidget(WXDisplay* display, WXWidget widget); | |
5a2e3d8c MB |
78 | void SetTopLevelRealizedWidget(WXDisplay* display, |
79 | WXWidget widget); | |
eb6fa4b4 | 80 | |
ee31c392 VZ |
81 | // This handler is called when a property change event occurs |
82 | virtual void HandlePropertyChange(WXEvent *event); | |
9ce8d6a2 MB |
83 | |
84 | wxXVisualInfo* GetVisualInfo(WXDisplay* display); | |
85 | ||
7e1bcfa8 | 86 | private: |
ee31c392 VZ |
87 | // Motif-specific |
88 | WXAppContext m_appContext; | |
ee31c392 VZ |
89 | WXColormap m_mainColormap; |
90 | WXDisplay* m_initialDisplay; | |
eb6fa4b4 | 91 | wxPerDisplayDataMap* m_perDisplayData; |
9b6dbb09 JS |
92 | }; |
93 | ||
9b6dbb09 | 94 | #endif |
83df96d6 | 95 | // _WX_APP_H_ |