]>
Commit | Line | Data |
---|---|---|
83df96d6 | 1 | ///////////////////////////////////////////////////////////////////////////// |
b886fae6 | 2 | // Name: wx/x11/app.h |
83df96d6 JS |
3 | // Purpose: wxApp class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
83df96d6 | 7 | // Copyright: (c) Julian Smart |
65571936 | 8 | // Licence: wxWindows licence |
83df96d6 JS |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
b886fae6 VZ |
11 | #ifndef _WX_X11_APP_H_ |
12 | #define _WX_X11_APP_H_ | |
83df96d6 | 13 | |
83df96d6 JS |
14 | // ---------------------------------------------------------------------------- |
15 | // headers | |
16 | // ---------------------------------------------------------------------------- | |
17 | ||
18 | #include "wx/gdicmn.h" | |
19 | #include "wx/event.h" | |
20 | ||
21 | // ---------------------------------------------------------------------------- | |
22 | // forward declarations | |
23 | // ---------------------------------------------------------------------------- | |
24 | ||
b5dbe15d VS |
25 | class WXDLLIMPEXP_FWD_CORE wxFrame; |
26 | class WXDLLIMPEXP_FWD_CORE wxWindow; | |
27 | class WXDLLIMPEXP_FWD_CORE wxApp; | |
28 | class WXDLLIMPEXP_FWD_CORE wxKeyEvent; | |
4f7d425f | 29 | class WXDLLIMPEXP_FWD_BASE wxLog; |
b5dbe15d | 30 | class WXDLLIMPEXP_FWD_CORE wxXVisualInfo; |
83df96d6 JS |
31 | |
32 | // ---------------------------------------------------------------------------- | |
256d631a | 33 | // the wxApp class for wxX11 - see wxAppBase for more details |
83df96d6 JS |
34 | // ---------------------------------------------------------------------------- |
35 | ||
53a2db12 | 36 | class WXDLLIMPEXP_CORE wxApp : public wxAppBase |
83df96d6 | 37 | { |
83df96d6 JS |
38 | public: |
39 | wxApp(); | |
d3c7fc99 | 40 | virtual ~wxApp(); |
1bf77ee5 | 41 | |
83df96d6 JS |
42 | // override base class (pure) virtuals |
43 | // ----------------------------------- | |
1bf77ee5 | 44 | |
e2478fde VZ |
45 | virtual void Exit(); |
46 | ||
e2478fde | 47 | virtual void WakeUpIdle(); |
1bf77ee5 | 48 | |
83df96d6 | 49 | virtual bool OnInitGui(); |
1bf77ee5 | 50 | |
83df96d6 JS |
51 | // implementation from now on |
52 | // -------------------------- | |
1bf77ee5 | 53 | |
83df96d6 | 54 | // Processes an X event. |
086fd560 | 55 | virtual bool ProcessXEvent(WXEvent* event); |
1bf77ee5 | 56 | |
83df96d6 JS |
57 | public: |
58 | // Implementation | |
05e2b077 | 59 | virtual bool Initialize(int& argc, wxChar **argv); |
94826170 | 60 | virtual void CleanUp(); |
1bf77ee5 | 61 | |
7eaac9f5 | 62 | WXWindow GetTopLevelWidget() const { return m_topLevelWidget; } |
83df96d6 | 63 | WXColormap GetMainColormap(WXDisplay* display); |
83df96d6 | 64 | long GetMaxRequestSize() const { return m_maxRequestSize; } |
1bf77ee5 | 65 | |
83df96d6 | 66 | // This handler is called when a property change event occurs |
086fd560 | 67 | virtual bool HandlePropertyChange(WXEvent *event); |
1bf77ee5 | 68 | |
256d631a JS |
69 | // Values that can be passed on the command line. |
70 | // Returns -1, -1 if none specified. | |
71 | const wxSize& GetInitialSize() const { return m_initialSize; } | |
72 | bool GetShowIconic() const { return m_showIconic; } | |
1bf77ee5 | 73 | |
2b5f62a0 VZ |
74 | #if wxUSE_UNICODE |
75 | // Global context for Pango layout. Either use X11 | |
76 | // or use Xft rendering according to GDK_USE_XFT | |
77 | // environment variable | |
78 | PangoContext* GetPangoContext(); | |
1bf77ee5 | 79 | #endif |
9ce8d6a2 | 80 | |
89954433 | 81 | wxXVisualInfo* GetVisualInfo(WXDisplay* WXUNUSED(display)) |
9ce8d6a2 MB |
82 | { |
83 | // this should be implemented correctly for wxBitmap to work | |
84 | // with multiple display | |
85 | return m_visualInfo; | |
86 | } | |
87 | ||
83df96d6 | 88 | public: |
256d631a | 89 | static long sm_lastMessageTime; |
1bf77ee5 | 90 | bool m_showIconic; |
256d631a | 91 | wxSize m_initialSize; |
8601b2e1 | 92 | |
9ce8d6a2 MB |
93 | #if !wxUSE_NANOX |
94 | wxXVisualInfo* m_visualInfo; | |
8601b2e1 | 95 | #endif |
1bf77ee5 | 96 | |
83df96d6 | 97 | protected: |
7eaac9f5 | 98 | WXWindow m_topLevelWidget; |
83df96d6 | 99 | WXColormap m_mainColormap; |
83df96d6 | 100 | long m_maxRequestSize; |
1bf77ee5 | 101 | |
b886fae6 | 102 | DECLARE_DYNAMIC_CLASS(wxApp) |
83df96d6 JS |
103 | }; |
104 | ||
b886fae6 | 105 | #endif // _WX_X11_APP_H_ |
83df96d6 | 106 |