]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: app.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
dbf858b5 | 5 | // Id: $Id$ |
01111366 | 6 | // Copyright: (c) 1998 Robert Roebling, Julian Smart |
a3622daa | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | #ifndef __GTKAPPH__ | |
11 | #define __GTKAPPH__ | |
12 | ||
13 | #ifdef __GNUG__ | |
14 | #pragma interface | |
15 | #endif | |
16 | ||
c801d85f | 17 | #include "wx/frame.h" |
ebea0891 | 18 | #include "wx/icon.h" |
c801d85f KB |
19 | |
20 | //----------------------------------------------------------------------------- | |
21 | // classes | |
22 | //----------------------------------------------------------------------------- | |
23 | ||
24 | class wxApp; | |
25 | class wxLog; | |
26 | ||
c801d85f KB |
27 | //----------------------------------------------------------------------------- |
28 | // wxApp | |
29 | //----------------------------------------------------------------------------- | |
30 | ||
094637f6 | 31 | class wxApp: public wxAppBase |
c801d85f | 32 | { |
094637f6 | 33 | public: |
bbe0af5b RR |
34 | wxApp(); |
35 | ~wxApp(); | |
a3622daa | 36 | |
094637f6 VZ |
37 | /* override for altering the way wxGTK intializes the GUI |
38 | * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by | |
39 | * default. when overriding this method, the code in it is likely to be | |
40 | * platform dependent, otherwise use OnInit(). */ | |
bbe0af5b | 41 | virtual bool OnInitGui(); |
094637f6 VZ |
42 | |
43 | // override base class (pure) virtuals | |
bbe0af5b | 44 | virtual int MainLoop(); |
094637f6 VZ |
45 | virtual void ExitMainLoop(); |
46 | virtual bool Initialized(); | |
bbe0af5b RR |
47 | virtual bool Pending(); |
48 | virtual void Dispatch(); | |
53010e52 | 49 | |
ebea0891 | 50 | virtual wxIcon GetStdIcon(int which) const; |
53010e52 | 51 | |
094637f6 | 52 | // implementation only from now on |
a3622daa | 53 | void OnIdle( wxIdleEvent &event ); |
bbe0af5b | 54 | bool SendIdleEvents(); |
53010e52 | 55 | bool SendIdleEvents( wxWindow* win ); |
a3622daa | 56 | |
0d2a2b60 RR |
57 | static bool Initialize(); |
58 | static bool InitialzeVisual(); | |
59 | static void CleanUp(); | |
a3622daa | 60 | |
bbe0af5b | 61 | bool ProcessIdle(); |
7214297d GL |
62 | #if wxUSE_THREADS |
63 | void ProcessPendingEvents(); | |
64 | #endif | |
bbe0af5b | 65 | void DeletePendingObjects(); |
a3622daa | 66 | |
094637f6 VZ |
67 | // This can be used to suppress the generation of Idle events. |
68 | void SuppressIdleEvents(bool arg = TRUE) { m_suppressIdleEvents = arg; } | |
69 | bool GetSuppressIdleEvents() const { return m_suppressIdleEvents; } | |
70 | ||
f6fcbb63 | 71 | bool m_initialized; |
094637f6 | 72 | |
f6fcbb63 | 73 | gint m_idleTag; |
6b3eb77a | 74 | #if wxUSE_THREADS |
7b90a8f2 | 75 | gint m_wakeUpTimerTag; |
6b3eb77a | 76 | #endif |
f6fcbb63 | 77 | unsigned char *m_colorCube; |
a3622daa | 78 | |
094637f6 | 79 | private: |
53a8af59 KB |
80 | /// Set to TRUE while we are in wxYield(). |
81 | bool m_suppressIdleEvents; | |
094637f6 | 82 | |
8636aed8 | 83 | DECLARE_DYNAMIC_CLASS(wxApp) |
094637f6 | 84 | DECLARE_EVENT_TABLE() |
c801d85f KB |
85 | }; |
86 | ||
87 | #endif // __GTKAPPH__ |