]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/app.h
fix for HP aCC
[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
b5dbe15d
VS
26class WXDLLIMPEXP_FWD_CORE wxFrame;
27class WXDLLIMPEXP_FWD_CORE wxWindow;
28class WXDLLIMPEXP_FWD_CORE wxApp;
29class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
4f7d425f 30class WXDLLIMPEXP_FWD_BASE wxLog;
b5dbe15d 31class WXDLLIMPEXP_FWD_CORE wxXVisualInfo;
83df96d6
JS
32
33// ----------------------------------------------------------------------------
256d631a 34// the wxApp class for wxX11 - see wxAppBase for more details
83df96d6
JS
35// ----------------------------------------------------------------------------
36
53a2db12 37class WXDLLIMPEXP_CORE wxApp : public wxAppBase
83df96d6 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
e2478fde 48 virtual void WakeUpIdle();
1bf77ee5 49
83df96d6 50 virtual bool OnInitGui();
1bf77ee5 51
83df96d6
JS
52 // implementation from now on
53 // --------------------------
1bf77ee5 54
83df96d6 55 // Processes an X event.
086fd560 56 virtual bool ProcessXEvent(WXEvent* event);
1bf77ee5 57
d715d419 58#ifdef __WXDEBUG__
5968a0dc 59 virtual void OnAssert(const wxChar *file, int line, const wxChar* cond, const wxChar *msg);
d715d419 60#endif // __WXDEBUG__
1bf77ee5 61
83df96d6
JS
62public:
63 // Implementation
05e2b077 64 virtual bool Initialize(int& argc, wxChar **argv);
94826170 65 virtual void CleanUp();
1bf77ee5 66
7eaac9f5 67 WXWindow GetTopLevelWidget() const { return m_topLevelWidget; }
83df96d6 68 WXColormap GetMainColormap(WXDisplay* display);
83df96d6 69 long GetMaxRequestSize() const { return m_maxRequestSize; }
1bf77ee5 70
83df96d6 71 // This handler is called when a property change event occurs
086fd560 72 virtual bool HandlePropertyChange(WXEvent *event);
1bf77ee5 73
256d631a
JS
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; }
1bf77ee5 78
2b5f62a0
VZ
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();
1bf77ee5 84#endif
9ce8d6a2 85
89954433 86 wxXVisualInfo* GetVisualInfo(WXDisplay* WXUNUSED(display))
9ce8d6a2
MB
87 {
88 // this should be implemented correctly for wxBitmap to work
89 // with multiple display
90 return m_visualInfo;
91 }
92
83df96d6 93public:
256d631a 94 static long sm_lastMessageTime;
1bf77ee5 95 bool m_showIconic;
256d631a 96 wxSize m_initialSize;
8601b2e1 97
9ce8d6a2
MB
98#if !wxUSE_NANOX
99 wxXVisualInfo* m_visualInfo;
8601b2e1 100#endif
1bf77ee5 101
83df96d6 102protected:
7eaac9f5 103 WXWindow m_topLevelWidget;
83df96d6 104 WXColormap m_mainColormap;
83df96d6 105 long m_maxRequestSize;
1bf77ee5 106
b886fae6 107 DECLARE_DYNAMIC_CLASS(wxApp)
83df96d6
JS
108};
109
b886fae6 110#endif // _WX_X11_APP_H_
83df96d6 111