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