]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/app.h
Remove unneeded wxTLW child inserter function.
[wxWidgets.git] / include / wx / x11 / app.h
CommitLineData
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
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
83df96d6
JS
10/////////////////////////////////////////////////////////////////////////////
11
b886fae6
VZ
12#ifndef _WX_X11_APP_H_
13#define _WX_X11_APP_H_
83df96d6 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{
83df96d6
JS
39public:
40 wxApp();
d3c7fc99 41 virtual ~wxApp();
1bf77ee5 42
83df96d6
JS
43 // override base class (pure) virtuals
44 // -----------------------------------
1bf77ee5 45
e2478fde
VZ
46 virtual void Exit();
47
83df96d6 48 virtual bool Yield(bool onlyIfNeeded = FALSE);
e2478fde 49 virtual void WakeUpIdle();
1bf77ee5 50
83df96d6 51 virtual bool OnInitGui();
1bf77ee5 52
83df96d6
JS
53 // implementation from now on
54 // --------------------------
1bf77ee5 55
83df96d6 56 // Processes an X event.
086fd560 57 virtual bool ProcessXEvent(WXEvent* event);
1bf77ee5 58
d715d419 59#ifdef __WXDEBUG__
5968a0dc 60 virtual void OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg);
d715d419 61#endif // __WXDEBUG__
1bf77ee5 62
83df96d6
JS
63public:
64 // Implementation
05e2b077 65 virtual bool Initialize(int& argc, wxChar **argv);
94826170 66 virtual void CleanUp();
1bf77ee5 67
7eaac9f5 68 WXWindow GetTopLevelWidget() const { return m_topLevelWidget; }
83df96d6 69 WXColormap GetMainColormap(WXDisplay* display);
83df96d6 70 long GetMaxRequestSize() const { return m_maxRequestSize; }
1bf77ee5 71
83df96d6 72 // This handler is called when a property change event occurs
086fd560 73 virtual bool HandlePropertyChange(WXEvent *event);
1bf77ee5 74
256d631a
JS
75 // Values that can be passed on the command line.
76 // Returns -1, -1 if none specified.
77 const wxSize& GetInitialSize() const { return m_initialSize; }
78 bool GetShowIconic() const { return m_showIconic; }
1bf77ee5 79
2b5f62a0
VZ
80#if wxUSE_UNICODE
81 // Global context for Pango layout. Either use X11
82 // or use Xft rendering according to GDK_USE_XFT
83 // environment variable
84 PangoContext* GetPangoContext();
1bf77ee5 85#endif
9ce8d6a2
MB
86
87 wxXVisualInfo* GetVisualInfo(WXDisplay* display)
88 {
89 // this should be implemented correctly for wxBitmap to work
90 // with multiple display
91 return m_visualInfo;
92 }
93
83df96d6 94public:
256d631a 95 static long sm_lastMessageTime;
1bf77ee5 96 bool m_showIconic;
256d631a 97 wxSize m_initialSize;
8601b2e1 98
9ce8d6a2
MB
99#if !wxUSE_NANOX
100 wxXVisualInfo* m_visualInfo;
8601b2e1 101#endif
1bf77ee5 102
83df96d6 103protected:
7eaac9f5 104 WXWindow m_topLevelWidget;
83df96d6 105 WXColormap m_mainColormap;
83df96d6 106 long m_maxRequestSize;
1bf77ee5 107
b886fae6 108 DECLARE_DYNAMIC_CLASS(wxApp)
83df96d6
JS
109 DECLARE_EVENT_TABLE()
110};
111
b886fae6 112#endif // _WX_X11_APP_H_
83df96d6 113