]>
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(void);
29 // Yield to other apps/messages
30 bool WXDLLEXPORT
wxYield(void);
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 virtual bool OnInitGui(void);
44 // override base class (pure) virtuals
45 virtual int MainLoop(void);
46 virtual void ExitMainLoop(void);
47 virtual bool Initialized(void);
48 virtual bool Pending(void) ;
49 virtual void Dispatch(void);
51 virtual wxIcon
GetStdIcon(int which
) const;
53 virtual void SetPrintMode(int mode
) { m_nPrintMode
= mode
; }
54 virtual int GetPrintMode(void) const { return m_nPrintMode
; }
56 // implementation only
57 void OnIdle(wxIdleEvent
& rEvent
);
58 void OnEndSession(wxCloseEvent
& rEvent
);
59 void OnQueryEndSession(wxCloseEvent
& rEvent
);
61 // Send idle event to all top-level windows.
62 // Returns TRUE if more idle time is requested.
63 bool SendIdleEvents(void);
65 // Send idle event to window and all subwindows
66 // Returns TRUE if more idle time is requested.
67 bool SendIdleEvents(wxWindow
* pWin
);
69 void SetAuto3D(bool bFlag
) { m_bAuto3D
= bFlag
; }
70 bool GetAuto3D(void) const { return m_bAuto3D
; }
74 int m_nPrintMode
; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
75 bool m_bAuto3D
; // Always use 3D controls, except where overriden
78 // PM-specific wxApp definitions */
83 static bool Initialize(HAB vHab
);
84 static void CleanUp(void);
86 static bool RegisterWindowClasses(HAB vHab
);
87 virtual bool DoMessage(void);
88 virtual bool ProcessMessage(WXMSG
* pMsg
);
89 void DeletePendingObjects(void);
90 bool ProcessIdle(void);
92 void ProcessPendingEvents(void);
101 DECLARE_EVENT_TABLE()
108 int WXDLLEXPORT
wxEntry( int argc
, char *argv
[] );