]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/app.h
fixes to static box borders calculations and significant code cleanup (finalizes...
[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 __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 wxApp;
26 class wxLog;
27
28 //-----------------------------------------------------------------------------
29 // wxApp
30 //-----------------------------------------------------------------------------
31
32 class 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 #ifdef __WXGTK20__
73 wxConvBrokenFileNames *m_convBrokenFileNames;
74 wxMBConv *m_oldConvFileName;
75 #endif
76
77 private:
78 // true if we're inside an assert modal dialog
79 #ifdef __WXDEBUG__
80 bool m_isInAssert;
81 #endif // __WXDEBUG__
82
83 DECLARE_DYNAMIC_CLASS(wxApp)
84 DECLARE_EVENT_TABLE()
85 };
86
87 #endif // __GTKAPPH__