]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/motif/app.h
Export recently added wxRichTextXMLHelper to fix link errors.
[wxWidgets.git] / include / wx / motif / app.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/motif/app.h
3// Purpose: wxApp class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// Copyright: (c) Julian Smart
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_APP_H_
12#define _WX_APP_H_
13
14// ----------------------------------------------------------------------------
15// headers
16// ----------------------------------------------------------------------------
17
18#include "wx/event.h"
19#include "wx/hashmap.h"
20
21// ----------------------------------------------------------------------------
22// forward declarations
23// ----------------------------------------------------------------------------
24
25class WXDLLIMPEXP_FWD_CORE wxFrame;
26class WXDLLIMPEXP_FWD_CORE wxWindow;
27class WXDLLIMPEXP_FWD_CORE wxApp;
28class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
29class WXDLLIMPEXP_FWD_BASE wxLog;
30class WXDLLIMPEXP_FWD_CORE wxEventLoop;
31class WXDLLIMPEXP_FWD_CORE wxXVisualInfo;
32class WXDLLIMPEXP_FWD_CORE wxPerDisplayData;
33
34// ----------------------------------------------------------------------------
35// the wxApp class for Motif - see wxAppBase for more details
36// ----------------------------------------------------------------------------
37
38WX_DECLARE_VOIDPTR_HASH_MAP( wxPerDisplayData*, wxPerDisplayDataMap );
39
40class WXDLLIMPEXP_CORE wxApp : public wxAppBase
41{
42 DECLARE_DYNAMIC_CLASS(wxApp)
43
44public:
45 wxApp();
46 virtual ~wxApp();
47
48 // override base class (pure) virtuals
49 // -----------------------------------
50
51 virtual int MainLoop();
52
53 virtual void Exit();
54
55 virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
56
57 // implementation from now on
58 // --------------------------
59
60protected:
61 bool m_showOnInit;
62
63public:
64 // Implementation
65 virtual bool Initialize(int& argc, wxChar **argv);
66 virtual void CleanUp();
67
68 // Motif-specific
69 WXAppContext GetAppContext() const { return m_appContext; }
70 WXWidget GetTopLevelWidget();
71 WXWidget GetTopLevelRealizedWidget();
72 WXColormap GetMainColormap(WXDisplay* display);
73 WXDisplay* GetInitialDisplay() const { return m_initialDisplay; }
74
75 void SetTopLevelWidget(WXDisplay* display, WXWidget widget);
76 void SetTopLevelRealizedWidget(WXDisplay* display,
77 WXWidget widget);
78
79 // This handler is called when a property change event occurs
80 virtual void HandlePropertyChange(WXEvent *event);
81
82 wxXVisualInfo* GetVisualInfo(WXDisplay* display);
83
84private:
85 // Motif-specific
86 WXAppContext m_appContext;
87 WXColormap m_mainColormap;
88 WXDisplay* m_initialDisplay;
89 wxPerDisplayDataMap* m_perDisplayData;
90};
91
92#endif
93// _WX_APP_H_