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