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