]>
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
;
25 WXDLLEXPORT_DATA(extern HAB
) vHabmain
;
27 // Force an exit from main loop
28 void WXDLLEXPORT
wxExit(void);
30 // Yield to other apps/messages
31 bool WXDLLEXPORT
wxYield(void);
33 extern MRESULT EXPENTRY
wxWndProc( HWND
39 // Represents the application. Derive OnInit and declare
40 // a new App object to start application
41 class WXDLLEXPORT wxApp
: public wxAppBase
43 DECLARE_DYNAMIC_CLASS(wxApp
)
49 virtual bool OnInitGui(void);
51 // override base class (pure) virtuals
52 virtual int MainLoop(void);
53 virtual void ExitMainLoop(void);
54 virtual bool Initialized(void);
55 virtual bool Pending(void) ;
56 virtual void Dispatch(void);
58 virtual wxIcon
GetStdIcon(int which
) const;
60 virtual void SetPrintMode(int mode
) { m_nPrintMode
= mode
; }
61 virtual int GetPrintMode(void) const { return m_nPrintMode
; }
63 // implementation only
64 void OnIdle(wxIdleEvent
& rEvent
);
65 void OnEndSession(wxCloseEvent
& rEvent
);
66 void OnQueryEndSession(wxCloseEvent
& rEvent
);
68 // Send idle event to all top-level windows.
69 // Returns TRUE if more idle time is requested.
70 bool SendIdleEvents(void);
72 // Send idle event to window and all subwindows
73 // Returns TRUE if more idle time is requested.
74 bool SendIdleEvents(wxWindow
* pWin
);
76 void SetAuto3D(bool bFlag
) { m_bAuto3D
= bFlag
; }
77 bool GetAuto3D(void) const { return m_bAuto3D
; }
81 int m_nPrintMode
; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
82 bool m_bAuto3D
; // Always use 3D controls, except where overriden
85 // PM-specific wxApp definitions */
90 static bool Initialize(HAB vHab
);
91 static void CleanUp(void);
93 static bool RegisterWindowClasses(HAB vHab
);
94 virtual bool DoMessage(void);
95 virtual bool ProcessMessage(WXMSG
* pMsg
);
96 void DeletePendingObjects(void);
97 bool ProcessIdle(void);
105 DECLARE_EVENT_TABLE()
110 int WXDLLEXPORT
wxEntry( int argc
, char *argv
[] );