]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/app.h
Minor tweek for WXPM
[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
DW
24WXDLLEXPORT_DATA(extern wxApp*) wxTheApp;
25
26// Force an exit from main loop
27void WXDLLEXPORT wxExit();
28
29// Yield to other apps/messages
30bool WXDLLEXPORT wxYield();
31
32// Represents the application. Derive OnInit and declare
33// a new App object to start application
d88de032 34class WXDLLEXPORT wxApp : public wxAppBase
0e320a79 35{
d88de032 36 DECLARE_DYNAMIC_CLASS(wxApp)
0e320a79 37
d88de032
DW
38public:
39 wxApp();
40 virtual ~wxApp();
0e320a79 41
d88de032
DW
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() ;
0e320a79 48
d88de032 49 virtual wxIcon GetStdIcon(int which) const;
0e320a79 50
d88de032
DW
51 virtual void SetPrintMode(int mode) { m_printMode = mode; }
52 virtual int GetPrintMode() const { return m_printMode; }
0e320a79 53
d88de032
DW
54 // implementation only
55 void OnIdle(wxIdleEvent& event);
56 void OnEndSession(wxCloseEvent& event);
57 void OnQueryEndSession(wxCloseEvent& event);
0e320a79 58
d88de032
DW
59 // Send idle event to all top-level windows.
60 // Returns TRUE if more idle time is requested.
61 bool SendIdleEvents();
0e320a79 62
d88de032
DW
63 // Send idle event to window and all subwindows
64 // Returns TRUE if more idle time is requested.
65 bool SendIdleEvents(wxWindow* win);
0e320a79 66
d88de032
DW
67 void SetAuto3D(bool flag) { m_auto3D = flag; }
68 bool GetAuto3D() const { return m_auto3D; }
0e320a79
DW
69
70protected:
d88de032
DW
71 bool m_showOnInit;
72 int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
73 bool m_auto3D ; // Always use 3D controls, except where overriden
0e320a79 74
d88de032 75 /* Windows-specific wxApp definitions */
0e320a79 76
d88de032 77public:
0e320a79 78
d88de032
DW
79 // Implementation
80 static bool Initialize();
81 static void CleanUp();
82
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();
89 bool ProcessIdle();
90#if wxUSE_THREADS
91 void ProcessPendingEvents();
92#endif
93 int GetComCtl32Version() const;
0e320a79
DW
94
95public:
d88de032 96 int m_nCmdShow;
0e320a79
DW
97
98protected:
d88de032 99 bool m_keepGoing ;
0e320a79 100
d88de032 101 DECLARE_EVENT_TABLE()
0e320a79
DW
102};
103
0e320a79
DW
104#endif
105 // _WX_APP_H_
106