]>
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 // Represents the application. Derive OnInit and declare
34 // a new App object to start application
35 class WXDLLEXPORT wxApp
: public wxAppBase
37 DECLARE_DYNAMIC_CLASS(wxApp
)
43 virtual bool OnInitGui(void);
45 // override base class (pure) virtuals
46 virtual int MainLoop(void);
47 virtual void ExitMainLoop(void);
48 virtual bool Initialized(void);
49 virtual bool Pending(void) ;
50 virtual void Dispatch(void);
52 virtual wxIcon
GetStdIcon(int which
) const;
54 virtual void SetPrintMode(int mode
) { m_nPrintMode
= mode
; }
55 virtual int GetPrintMode(void) const { return m_nPrintMode
; }
57 // implementation only
58 void OnIdle(wxIdleEvent
& rEvent
);
59 void OnEndSession(wxCloseEvent
& rEvent
);
60 void OnQueryEndSession(wxCloseEvent
& rEvent
);
62 // Send idle event to all top-level windows.
63 // Returns TRUE if more idle time is requested.
64 bool SendIdleEvents(void);
66 // Send idle event to window and all subwindows
67 // Returns TRUE if more idle time is requested.
68 bool SendIdleEvents(wxWindow
* pWin
);
70 void SetAuto3D(bool bFlag
) { m_bAuto3D
= bFlag
; }
71 bool GetAuto3D(void) const { return m_bAuto3D
; }
75 int m_nPrintMode
; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
76 bool m_bAuto3D
; // Always use 3D controls, except where overriden
79 // PM-specific wxApp definitions */
84 static bool Initialize(HAB vHab
);
85 static void CleanUp(void);
87 static bool RegisterWindowClasses(HAB vHab
);
88 virtual bool DoMessage(void);
89 virtual bool ProcessMessage(WXMSG
* pMsg
);
90 void DeletePendingObjects(void);
91 bool ProcessIdle(void);
104 int WXDLLEXPORT
wxEntry( int argc
, char *argv
[] );