]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/app.h
wxMemoryStream doc updated
[wxWidgets.git] / include / wx / gtk / app.h
CommitLineData
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
24class wxApp;
25class wxLog;
26
c801d85f
KB
27//-----------------------------------------------------------------------------
28// wxApp
29//-----------------------------------------------------------------------------
30
094637f6 31class wxApp: public wxAppBase
c801d85f 32{
094637f6 33DECLARE_DYNAMIC_CLASS(wxApp)
a3622daa 34
094637f6 35public:
bbe0af5b
RR
36 wxApp();
37 ~wxApp();
a3622daa 38
094637f6
VZ
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(). */
bbe0af5b 43 virtual bool OnInitGui();
094637f6
VZ
44
45 // override base class (pure) virtuals
bbe0af5b 46 virtual int MainLoop();
094637f6
VZ
47 virtual void ExitMainLoop();
48 virtual bool Initialized();
bbe0af5b
RR
49 virtual bool Pending();
50 virtual void Dispatch();
53010e52 51
ebea0891 52 virtual wxIcon GetStdIcon(int which) const;
53010e52 53
094637f6 54 // implementation only from now on
a3622daa 55 void OnIdle( wxIdleEvent &event );
bbe0af5b 56 bool SendIdleEvents();
53010e52 57 bool SendIdleEvents( wxWindow* win );
a3622daa 58
0d2a2b60
RR
59 static bool Initialize();
60 static bool InitialzeVisual();
61 static void CleanUp();
a3622daa 62
bbe0af5b 63 bool ProcessIdle();
7214297d
GL
64#if wxUSE_THREADS
65 void ProcessPendingEvents();
66#endif
bbe0af5b 67 void DeletePendingObjects();
a3622daa 68
094637f6
VZ
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
f6fcbb63 73 bool m_initialized;
094637f6 74
f6fcbb63 75 gint m_idleTag;
6b3eb77a 76#if wxUSE_THREADS
7b90a8f2 77 gint m_wakeUpTimerTag;
6b3eb77a 78#endif
f6fcbb63 79 unsigned char *m_colorCube;
a3622daa 80
094637f6 81private:
53a8af59
KB
82 /// Set to TRUE while we are in wxYield().
83 bool m_suppressIdleEvents;
094637f6
VZ
84
85 DECLARE_EVENT_TABLE()
c801d85f
KB
86};
87
88#endif // __GTKAPPH__