]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/os2/app.h
1. added encoding param to wxFontEncoding::EnumFamilies() which allows to get
[wxWidgets.git] / include / wx / os2 / app.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: app.h
3// Purpose: wxApp class
4// Author: David Webster
5// Modified by:
6// Created: 10/13/99
7// RCS-ID: $Id$
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_APP_H_
13#define _WX_APP_H_
14
15#include "wx/event.h"
16#include "wx/icon.h"
17
18class WXDLLEXPORT wxFrame;
19class WXDLLEXPORT wxWindow;
20class WXDLLEXPORT wxApp ;
21class WXDLLEXPORT wxKeyEvent;
22class WXDLLEXPORT wxLog;
23
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
34class WXDLLEXPORT wxApp : public wxAppBase
35{
36 DECLARE_DYNAMIC_CLASS(wxApp)
37
38public:
39 wxApp();
40 virtual ~wxApp();
41
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() ;
48
49 virtual wxIcon GetStdIcon(int which) const;
50
51 virtual void SetPrintMode(int mode) { m_printMode = mode; }
52 virtual int GetPrintMode() const { return m_printMode; }
53
54 // implementation only
55 void OnIdle(wxIdleEvent& event);
56 void OnEndSession(wxCloseEvent& event);
57 void OnQueryEndSession(wxCloseEvent& event);
58
59 // Send idle event to all top-level windows.
60 // Returns TRUE if more idle time is requested.
61 bool SendIdleEvents();
62
63 // Send idle event to window and all subwindows
64 // Returns TRUE if more idle time is requested.
65 bool SendIdleEvents(wxWindow* win);
66
67 void SetAuto3D(bool flag) { m_auto3D = flag; }
68 bool GetAuto3D() const { return m_auto3D; }
69
70protected:
71 bool m_showOnInit;
72 int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
73 bool m_auto3D ; // Always use 3D controls, except where overriden
74
75 /* Windows-specific wxApp definitions */
76
77public:
78
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;
94
95public:
96 int m_nCmdShow;
97
98protected:
99 bool m_keepGoing ;
100
101 DECLARE_EVENT_TABLE()
102};
103
104#endif
105 // _WX_APP_H_
106