]>
Commit | Line | Data |
---|---|---|
32b8ec41 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: app.h | |
3 | // Purpose: | |
4 | // Author: Vaclav Slavik | |
5 | // Id: $Id$ | |
52750c2e | 6 | // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) |
32b8ec41 VZ |
7 | // Licence: wxWindows licence |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef __WX_APP_H__ | |
11 | #define __WX_APP_H__ | |
12 | ||
13 | #ifdef __GNUG__ | |
14 | #pragma interface "app.h" | |
15 | #endif | |
16 | ||
17 | #include "wx/frame.h" | |
18 | #include "wx/icon.h" | |
19 | ||
20 | //----------------------------------------------------------------------------- | |
21 | // classes | |
22 | //----------------------------------------------------------------------------- | |
23 | ||
7bdc1879 VS |
24 | class WXDLLEXPORT wxApp; |
25 | class WXDLLEXPORT wxLog; | |
ef344ff8 | 26 | class WXDLLEXPORT wxEventLoop; |
32b8ec41 VZ |
27 | |
28 | //----------------------------------------------------------------------------- | |
29 | // wxApp | |
30 | //----------------------------------------------------------------------------- | |
31 | ||
32 | class WXDLLEXPORT wxApp: public wxAppBase | |
33 | { | |
34 | public: | |
7bdc1879 VS |
35 | wxApp(); |
36 | ~wxApp(); | |
32b8ec41 VZ |
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(). */ | |
7bdc1879 | 42 | virtual bool OnInitGui(); |
32b8ec41 VZ |
43 | |
44 | // override base class (pure) virtuals | |
7bdc1879 VS |
45 | virtual int MainLoop(); |
46 | virtual void ExitMainLoop(); | |
47 | virtual bool Initialized(); | |
48 | virtual bool Pending(); | |
49 | virtual void Dispatch(); | |
32b8ec41 | 50 | |
7bdc1879 | 51 | virtual wxIcon GetStdIcon(int which) const; |
32b8ec41 VZ |
52 | |
53 | // implementation only from now on | |
7bdc1879 VS |
54 | void OnIdle(wxIdleEvent &event); |
55 | bool SendIdleEvents(); | |
56 | bool SendIdleEvents(wxWindow* win); | |
32b8ec41 | 57 | |
7bdc1879 VS |
58 | static bool Initialize(); |
59 | static void CleanUp(); | |
32b8ec41 | 60 | |
7bdc1879 VS |
61 | bool ProcessIdle(); |
62 | void DeletePendingObjects(); | |
32b8ec41 | 63 | |
e1218bd6 VS |
64 | virtual bool Yield(bool onlyIfNeeded = FALSE); |
65 | ||
634f6a1f VS |
66 | virtual wxDisplayModeInfo GetDisplayMode() const { return m_displayMode; } |
67 | virtual bool SetDisplayMode(const wxDisplayModeInfo& mode); | |
68 | ||
32b8ec41 VZ |
69 | private: |
70 | DECLARE_DYNAMIC_CLASS(wxApp) | |
71 | DECLARE_EVENT_TABLE() | |
ef344ff8 VS |
72 | |
73 | wxEventLoop *m_mainLoop; | |
634f6a1f | 74 | wxDisplayModeInfo m_displayMode; |
32b8ec41 VZ |
75 | }; |
76 | ||
7bdc1879 | 77 | int WXDLLEXPORT wxEntry(int argc, char *argv[]); |
32b8ec41 VZ |
78 | |
79 | #endif // __WX_APP_H__ |