]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/app.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxApp class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
18 class WXDLLEXPORT wxFrame
;
19 class WXDLLEXPORT wxWindow
;
20 class WXDLLEXPORT wxApp
;
21 class WXDLLEXPORT wxKeyEvent
;
22 class WXDLLEXPORT wxLog
;
24 WXDLLEXPORT_DATA(extern wxApp
*) wxTheApp
;
26 // Force an exit from main loop
27 void WXDLLEXPORT
wxExit();
29 // Yield to other apps/messages
30 bool WXDLLEXPORT
wxYield();
32 // Represents the application. Derive OnInit and declare
33 // a new App object to start application
34 class WXDLLEXPORT wxApp
: public wxAppBase
36 DECLARE_DYNAMIC_CLASS(wxApp
)
42 // override base class (pure) virtuals
43 virtual int MainLoop();
44 virtual void ExitMainLoop();
45 virtual bool Initialized();
46 virtual bool Pending() ;
47 virtual void Dispatch() ;
49 virtual wxIcon
GetStdIcon(int which
) const;
51 virtual void SetPrintMode(int mode
) { m_printMode
= mode
; }
52 virtual int GetPrintMode() const { return m_printMode
; }
54 // implementation only
55 void OnIdle(wxIdleEvent
& event
);
56 void OnEndSession(wxCloseEvent
& event
);
57 void OnQueryEndSession(wxCloseEvent
& event
);
59 // Send idle event to all top-level windows.
60 // Returns TRUE if more idle time is requested.
61 bool SendIdleEvents();
63 // Send idle event to window and all subwindows
64 // Returns TRUE if more idle time is requested.
65 bool SendIdleEvents(wxWindow
* win
);
67 void SetAuto3D(bool flag
) { m_auto3D
= flag
; }
68 bool GetAuto3D() const { return m_auto3D
; }
72 int m_printMode
; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
73 bool m_auto3D
; // Always use 3D controls, except where overriden
75 /* Windows-specific wxApp definitions */
80 static bool Initialize();
81 static void CleanUp();
83 static bool RegisterWindowClasses();
84 // Convert Windows to argc, argv style
85 void ConvertToStandardCommandArgs(char* p
);
86 virtual bool DoMessage();
87 virtual bool ProcessMessage(WXMSG
* pMsg
);
88 void DeletePendingObjects();
91 void ProcessPendingEvents();
93 int GetComCtl32Version() const;
101 DECLARE_EVENT_TABLE()