]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/app.h
added virtual dtor to wxHtmlWindowMouseHelper to avoid gcc warnings
[wxWidgets.git] / include / wx / x11 / app.h
CommitLineData
83df96d6
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: 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
65571936 9// Licence: wxWindows licence
83df96d6
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_APP_H_
13#define _WX_APP_H_
14
83df96d6
JS
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19#include "wx/gdicmn.h"
20#include "wx/event.h"
21
22// ----------------------------------------------------------------------------
23// forward declarations
24// ----------------------------------------------------------------------------
25
26class WXDLLEXPORT wxFrame;
27class WXDLLEXPORT wxWindow;
28class WXDLLEXPORT wxApp;
29class WXDLLEXPORT wxKeyEvent;
30class WXDLLEXPORT wxLog;
9ce8d6a2 31class WXDLLEXPORT wxXVisualInfo;
83df96d6
JS
32
33// ----------------------------------------------------------------------------
256d631a 34// the wxApp class for wxX11 - see wxAppBase for more details
83df96d6
JS
35// ----------------------------------------------------------------------------
36
37class WXDLLEXPORT wxApp : public wxAppBase
38{
39 DECLARE_DYNAMIC_CLASS(wxApp)
1bf77ee5 40
83df96d6
JS
41public:
42 wxApp();
dc4025af 43 ~wxApp();
1bf77ee5 44
83df96d6
JS
45 // override base class (pure) virtuals
46 // -----------------------------------
1bf77ee5 47
e2478fde
VZ
48 virtual void Exit();
49
83df96d6 50 virtual bool Yield(bool onlyIfNeeded = FALSE);
e2478fde 51 virtual void WakeUpIdle();
1bf77ee5 52
83df96d6 53 virtual bool OnInitGui();
1bf77ee5 54
83df96d6
JS
55 // implementation from now on
56 // --------------------------
1bf77ee5 57
83df96d6 58 // Processes an X event.
086fd560 59 virtual bool ProcessXEvent(WXEvent* event);
1bf77ee5 60
d715d419 61#ifdef __WXDEBUG__
5968a0dc 62 virtual void OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg);
d715d419 63#endif // __WXDEBUG__
1bf77ee5 64
83df96d6
JS
65protected:
66 bool m_showOnInit;
1bf77ee5 67
83df96d6
JS
68public:
69 // Implementation
05e2b077 70 virtual bool Initialize(int& argc, wxChar **argv);
94826170 71 virtual void CleanUp();
1bf77ee5 72
7eaac9f5 73 WXWindow GetTopLevelWidget() const { return m_topLevelWidget; }
83df96d6 74 WXColormap GetMainColormap(WXDisplay* display);
83df96d6 75 long GetMaxRequestSize() const { return m_maxRequestSize; }
1bf77ee5 76
83df96d6 77 // This handler is called when a property change event occurs
086fd560 78 virtual bool HandlePropertyChange(WXEvent *event);
1bf77ee5 79
256d631a
JS
80 // Values that can be passed on the command line.
81 // Returns -1, -1 if none specified.
82 const wxSize& GetInitialSize() const { return m_initialSize; }
83 bool GetShowIconic() const { return m_showIconic; }
1bf77ee5 84
2b5f62a0
VZ
85#if wxUSE_UNICODE
86 // Global context for Pango layout. Either use X11
87 // or use Xft rendering according to GDK_USE_XFT
88 // environment variable
89 PangoContext* GetPangoContext();
1bf77ee5 90#endif
9ce8d6a2
MB
91
92 wxXVisualInfo* GetVisualInfo(WXDisplay* display)
93 {
94 // this should be implemented correctly for wxBitmap to work
95 // with multiple display
96 return m_visualInfo;
97 }
98
dc4025af
RR
99 // We need this before creating the app
100 static WXDisplay* GetDisplay() { return ms_display; }
101 static WXDisplay* ms_display;
102
83df96d6 103public:
256d631a 104 static long sm_lastMessageTime;
1bf77ee5 105 bool m_showIconic;
256d631a 106 wxSize m_initialSize;
8601b2e1 107
9ce8d6a2
MB
108#if !wxUSE_NANOX
109 wxXVisualInfo* m_visualInfo;
8601b2e1 110#endif
1bf77ee5 111
83df96d6
JS
112protected:
113 bool m_keepGoing;
1bf77ee5 114
7eaac9f5 115 WXWindow m_topLevelWidget;
83df96d6 116 WXColormap m_mainColormap;
83df96d6 117 long m_maxRequestSize;
1bf77ee5 118
83df96d6
JS
119 DECLARE_EVENT_TABLE()
120};
121
6abf9dac 122#endif // _WX_APP_H_
83df96d6 123