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