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