]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/app.h
include wx/object.h now that wxConfigBase derives from wxObject
[wxWidgets.git] / include / wx / gtk / app.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/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 _WX_GTK_APP_H_
11 #define _WX_GTK_APP_H_
12
13 //-----------------------------------------------------------------------------
14 // classes
15 //-----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_CORE wxApp;
18 class WXDLLIMPEXP_BASE wxLog;
19
20 //-----------------------------------------------------------------------------
21 // wxApp
22 //-----------------------------------------------------------------------------
23
24 class WXDLLIMPEXP_CORE wxApp: public wxAppBase
25 {
26 public:
27 wxApp();
28 virtual ~wxApp();
29
30 /* override for altering the way wxGTK intializes the GUI
31 * (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
32 * default. when overriding this method, the code in it is likely to be
33 * platform dependent, otherwise use OnInit(). */
34 virtual bool OnInitGui();
35
36 // override base class (pure) virtuals
37 virtual bool Yield(bool onlyIfNeeded = FALSE);
38 virtual void WakeUpIdle();
39
40 virtual bool Initialize(int& argc, wxChar **argv);
41 virtual void CleanUp();
42
43 static bool InitialzeVisual();
44
45 #ifdef __WXDEBUG__
46 virtual void OnAssertFailure(const wxChar *file,
47 int line,
48 const wxChar *func,
49 const wxChar *cond,
50 const wxChar *msg);
51
52 bool IsInAssert() const { return m_isInAssert; }
53 #endif // __WXDEBUG__
54
55 guint m_idleTag;
56 // temporarily disable idle events
57 void SuspendIdleCallback();
58
59 // Used by the the wxGLApp and wxGLCanvas class for GL-based X visual
60 // selection.
61 void *m_glVisualInfo; // this is actually an XVisualInfo*
62 void *m_glFBCInfo; // this is actually an GLXFBConfig*
63 // This returns the current visual: either that used by wxRootWindow
64 // or the XVisualInfo* for SGI.
65 GdkVisual *GetGdkVisual();
66
67 private:
68 // true if we're inside an assert modal dialog
69 #ifdef __WXDEBUG__
70 bool m_isInAssert;
71 #endif // __WXDEBUG__
72
73 DECLARE_DYNAMIC_CLASS(wxApp)
74 DECLARE_EVENT_TABLE()
75 };
76
77 #endif // _WX_GTK_APP_H_