]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/motif/app.h
wxSEHReport renamed to wxCrashReport enhanced and debugged; seems to work
[wxWidgets.git] / include / wx / motif / app.h
... / ...
CommitLineData
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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_APP_H_
13#define _WX_APP_H_
14
15#ifdef __GNUG__
16#pragma interface "app.h"
17#endif
18
19// ----------------------------------------------------------------------------
20// headers
21// ----------------------------------------------------------------------------
22
23#include "wx/event.h"
24
25// ----------------------------------------------------------------------------
26// forward declarations
27// ----------------------------------------------------------------------------
28
29class WXDLLEXPORT wxFrame;
30class WXDLLEXPORT wxWindow;
31class WXDLLEXPORT wxApp;
32class WXDLLEXPORT wxKeyEvent;
33class WXDLLEXPORT wxLog;
34class WXDLLEXPORT wxEventLoop;
35class WXDLLEXPORT wxXVisualInfo;
36class wxPerDisplayDataMap;
37
38// ----------------------------------------------------------------------------
39// the wxApp class for Motif - see wxAppBase for more details
40// ----------------------------------------------------------------------------
41
42class WXDLLEXPORT wxApp : public wxAppBase
43{
44 DECLARE_DYNAMIC_CLASS(wxApp)
45
46public:
47 wxApp();
48 virtual ~wxApp();
49
50 // override base class (pure) virtuals
51 // -----------------------------------
52
53 virtual int MainLoop();
54 virtual void ExitMainLoop();
55 virtual bool Initialized();
56 virtual bool Pending();
57 virtual void Dispatch();
58
59 virtual void Exit();
60
61 virtual bool Yield(bool onlyIfNeeded = FALSE);
62 virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
63
64 virtual bool OnInitGui();
65
66 // implementation from now on
67 // --------------------------
68
69 void OnIdle(wxIdleEvent& event);
70
71protected:
72 bool m_showOnInit;
73
74public:
75 // Implementation
76 virtual bool Initialize(int& argc, wxChar **argv);
77 virtual void CleanUp();
78
79 // Motif-specific
80 WXAppContext GetAppContext() const { return m_appContext; }
81 WXWidget GetTopLevelWidget();
82 WXColormap GetMainColormap(WXDisplay* display);
83 WXDisplay* GetInitialDisplay() const { return m_initialDisplay; }
84
85 void SetTopLevelWidget(WXDisplay* display, WXWidget widget);
86
87 // This handler is called when a property change event occurs
88 virtual void HandlePropertyChange(WXEvent *event);
89
90 wxXVisualInfo* GetVisualInfo(WXDisplay* display);
91
92private:
93 wxEventLoop* m_eventLoop;
94
95 // Motif-specific
96 WXAppContext m_appContext;
97 WXColormap m_mainColormap;
98 WXDisplay* m_initialDisplay;
99 wxPerDisplayDataMap* m_perDisplayData;
100
101 DECLARE_EVENT_TABLE()
102};
103
104#endif
105// _WX_APP_H_
106