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