]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/app.h
moved splines rendering code into wxDCBase
[wxWidgets.git] / include / wx / os2 / app.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: app.h
3// Purpose: wxApp class
d88de032 4// Author: David Webster
0e320a79 5// Modified by:
d88de032 6// Created: 10/13/99
0e320a79 7// RCS-ID: $Id$
d88de032 8// Copyright: (c) David Webster
0e320a79
DW
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_APP_H_
13#define _WX_APP_H_
14
0e320a79 15#include "wx/event.h"
d88de032 16#include "wx/icon.h"
0e320a79
DW
17
18class WXDLLEXPORT wxFrame;
19class WXDLLEXPORT wxWindow;
20class WXDLLEXPORT wxApp ;
21class WXDLLEXPORT wxKeyEvent;
22class WXDLLEXPORT wxLog;
23
0e320a79 24WXDLLEXPORT_DATA(extern wxApp*) wxTheApp;
43543d98 25WXDLLEXPORT_DATA(extern HAB) vHabmain;
0e320a79
DW
26
27// Force an exit from main loop
9ed0fac8 28void WXDLLEXPORT wxExit(void);
0e320a79
DW
29
30// Yield to other apps/messages
9ed0fac8 31bool WXDLLEXPORT wxYield(void);
0e320a79 32
8c5907ce
DW
33extern MRESULT EXPENTRY wxWndProc( HWND
34 ,ULONG
35 ,MPARAM
36 ,MPARAM
37 );
38
0e320a79
DW
39// Represents the application. Derive OnInit and declare
40// a new App object to start application
d88de032 41class WXDLLEXPORT wxApp : public wxAppBase
0e320a79 42{
d88de032 43 DECLARE_DYNAMIC_CLASS(wxApp)
0e320a79 44
d88de032
DW
45public:
46 wxApp();
47 virtual ~wxApp();
0e320a79 48
9ed0fac8
DW
49 virtual bool OnInitGui(void);
50
d88de032 51 // override base class (pure) virtuals
9ed0fac8
DW
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);
0e320a79 57
d88de032 58 virtual wxIcon GetStdIcon(int which) const;
0e320a79 59
9ed0fac8
DW
60 virtual void SetPrintMode(int mode) { m_nPrintMode = mode; }
61 virtual int GetPrintMode(void) const { return m_nPrintMode; }
0e320a79 62
d88de032 63 // implementation only
9ed0fac8
DW
64 void OnIdle(wxIdleEvent& rEvent);
65 void OnEndSession(wxCloseEvent& rEvent);
66 void OnQueryEndSession(wxCloseEvent& rEvent);
0e320a79 67
d88de032
DW
68 // Send idle event to all top-level windows.
69 // Returns TRUE if more idle time is requested.
9ed0fac8 70 bool SendIdleEvents(void);
0e320a79 71
d88de032
DW
72 // Send idle event to window and all subwindows
73 // Returns TRUE if more idle time is requested.
9ed0fac8 74 bool SendIdleEvents(wxWindow* pWin);
0e320a79 75
9ed0fac8
DW
76 void SetAuto3D(bool bFlag) { m_bAuto3D = bFlag; }
77 bool GetAuto3D(void) const { return m_bAuto3D; }
0e320a79
DW
78
79protected:
9ed0fac8
DW
80 bool m_bShowOnInit;
81 int m_nPrintMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
82 bool m_bAuto3D ; // Always use 3D controls, except where overriden
0e320a79 83
9ed0fac8
DW
84 //
85 // PM-specific wxApp definitions */
86 //
d88de032 87public:
0e320a79 88
d88de032 89 // Implementation
9ed0fac8
DW
90 static bool Initialize(HAB vHab);
91 static void CleanUp(void);
d88de032 92
9ed0fac8
DW
93 static bool RegisterWindowClasses(HAB vHab);
94 virtual bool DoMessage(void);
d88de032 95 virtual bool ProcessMessage(WXMSG* pMsg);
9ed0fac8
DW
96 void DeletePendingObjects(void);
97 bool ProcessIdle(void);
0e320a79
DW
98
99public:
9ed0fac8 100 int m_nCmdShow;
0e320a79
DW
101
102protected:
9ed0fac8 103 bool m_bKeepGoing ;
0e320a79 104
d88de032 105 DECLARE_EVENT_TABLE()
9ed0fac8 106private:
9ed0fac8 107 HMQ m_hMq;
0e320a79
DW
108};
109
9ed0fac8 110int WXDLLEXPORT wxEntry( int argc, char *argv[] );
0e320a79
DW
111#endif
112 // _WX_APP_H_
113