]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/app.h
Forgot to commit the header change too.
[wxWidgets.git] / include / wx / x11 / app.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/app.h
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
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_X11_APP_H_
13 #define _WX_X11_APP_H_
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 #include "wx/gdicmn.h"
20 #include "wx/event.h"
21
22 // ----------------------------------------------------------------------------
23 // forward declarations
24 // ----------------------------------------------------------------------------
25
26 class WXDLLIMPEXP_FWD_CORE wxFrame;
27 class WXDLLIMPEXP_FWD_CORE wxWindow;
28 class WXDLLIMPEXP_FWD_CORE wxApp;
29 class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
30 class WXDLLIMPEXP_FWD_BASE wxLog;
31 class WXDLLIMPEXP_FWD_CORE wxXVisualInfo;
32
33 // ----------------------------------------------------------------------------
34 // the wxApp class for wxX11 - see wxAppBase for more details
35 // ----------------------------------------------------------------------------
36
37 class WXDLLIMPEXP_CORE wxApp : public wxAppBase
38 {
39 public:
40 wxApp();
41 virtual ~wxApp();
42
43 // override base class (pure) virtuals
44 // -----------------------------------
45
46 virtual void Exit();
47
48 virtual void WakeUpIdle();
49
50 virtual bool OnInitGui();
51
52 // implementation from now on
53 // --------------------------
54
55 // Processes an X event.
56 virtual bool ProcessXEvent(WXEvent* event);
57
58 #ifdef __WXDEBUG__
59 virtual void OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg);
60 #endif // __WXDEBUG__
61
62 public:
63 // Implementation
64 virtual bool Initialize(int& argc, wxChar **argv);
65 virtual void CleanUp();
66
67 WXWindow GetTopLevelWidget() const { return m_topLevelWidget; }
68 WXColormap GetMainColormap(WXDisplay* display);
69 long GetMaxRequestSize() const { return m_maxRequestSize; }
70
71 // This handler is called when a property change event occurs
72 virtual bool HandlePropertyChange(WXEvent *event);
73
74 // Values that can be passed on the command line.
75 // Returns -1, -1 if none specified.
76 const wxSize& GetInitialSize() const { return m_initialSize; }
77 bool GetShowIconic() const { return m_showIconic; }
78
79 #if wxUSE_UNICODE
80 // Global context for Pango layout. Either use X11
81 // or use Xft rendering according to GDK_USE_XFT
82 // environment variable
83 PangoContext* GetPangoContext();
84 #endif
85
86 wxXVisualInfo* GetVisualInfo(WXDisplay* WXUNUSED(display))
87 {
88 // this should be implemented correctly for wxBitmap to work
89 // with multiple display
90 return m_visualInfo;
91 }
92
93 public:
94 static long sm_lastMessageTime;
95 bool m_showIconic;
96 wxSize m_initialSize;
97
98 #if !wxUSE_NANOX
99 wxXVisualInfo* m_visualInfo;
100 #endif
101
102 protected:
103 WXWindow m_topLevelWidget;
104 WXColormap m_mainColormap;
105 long m_maxRequestSize;
106
107 DECLARE_DYNAMIC_CLASS(wxApp)
108 };
109
110 #endif // _WX_X11_APP_H_
111