]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/app.h
got rid of wxWindow::m_lDlgCode - now wxWANTS_CHARS style should work for all windows...
[wxWidgets.git] / include / wx / x11 / app.h
CommitLineData
83df96d6
JS
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/gdicmn.h"
24#include "wx/event.h"
25
26// ----------------------------------------------------------------------------
27// forward declarations
28// ----------------------------------------------------------------------------
29
30class WXDLLEXPORT wxFrame;
31class WXDLLEXPORT wxWindow;
32class WXDLLEXPORT wxApp;
33class WXDLLEXPORT wxKeyEvent;
34class WXDLLEXPORT wxLog;
35
36// ----------------------------------------------------------------------------
37// the wxApp class for Motif - see wxAppBase for more details
38// ----------------------------------------------------------------------------
39
40class WXDLLEXPORT wxApp : public wxAppBase
41{
42 DECLARE_DYNAMIC_CLASS(wxApp)
43
44public:
45 wxApp();
46 ~wxApp() {}
47
48 // override base class (pure) virtuals
49 // -----------------------------------
50
51 virtual int MainLoop();
52 virtual void ExitMainLoop();
53 virtual bool Initialized();
54 virtual bool Pending();
55 virtual void Dispatch();
56 virtual bool Yield(bool onlyIfNeeded = FALSE);
57
58 virtual bool OnInitGui();
59
60 virtual wxIcon GetStdIcon(int which) const;
61
62 // implementation from now on
63 // --------------------------
64
65 void OnIdle(wxIdleEvent& event);
66
67 // Send idle event to all top-level windows.
68 // Returns TRUE if more idle time is requested.
69 bool SendIdleEvents();
70
71 // Send idle event to window and all subwindows
72 // Returns TRUE if more idle time is requested.
73 bool SendIdleEvents(wxWindow* win);
74
83df96d6
JS
75 // Processes an X event.
76 virtual void ProcessXEvent(WXEvent* event);
77
78 // Returns TRUE if an accelerator has been processed
79 virtual bool CheckForAccelerator(WXEvent* event);
80
81 // Returns TRUE if a key down event has been processed
82 virtual bool CheckForKeyDown(WXEvent* event);
83
84 // Returns TRUE if a key up event has been processed
85 virtual bool CheckForKeyUp(WXEvent* event);
86
87protected:
88 bool m_showOnInit;
89
90public:
91 // Implementation
92 static bool Initialize();
93 static void CleanUp();
94
95 void DeletePendingObjects();
96 bool ProcessIdle();
97
7eaac9f5 98 WXWindow GetTopLevelWidget() const { return m_topLevelWidget; }
83df96d6
JS
99 WXColormap GetMainColormap(WXDisplay* display);
100 WXDisplay* GetInitialDisplay() const { return m_initialDisplay; }
101 long GetMaxRequestSize() const { return m_maxRequestSize; }
102
103 // This handler is called when a property change event occurs
104 virtual void HandlePropertyChange(WXEvent *event);
105
106public:
107 static long sm_lastMessageTime;
108 int m_nCmdShow;
109
110protected:
111 bool m_keepGoing;
112
7eaac9f5 113 WXWindow m_topLevelWidget;
83df96d6
JS
114 WXColormap m_mainColormap;
115 WXDisplay* m_initialDisplay;
116 long m_maxRequestSize;
117
118 DECLARE_EVENT_TABLE()
119};
120
121int WXDLLEXPORT wxEntry( int argc, char *argv[] );
122
123#endif
124// _WX_APP_H_
125