]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/app.h
added fix for MSL under Win32 (by Steve Hartwell)
[wxWidgets.git] / include / wx / cocoa / app.h
CommitLineData
fb896a32
DE
1/////////////////////////////////////////////////////////////////////////////
2// Name: cocoa/app.h
3// Purpose: wxApp class
4// Author: David Elliott
5// Modified by:
6// Created: 2002/11/27
cdd0a08f 7// RCS-ID: $Id$
fb896a32 8// Copyright: (c) 2002 David Elliott
cdd0a08f 9// Licence: wxWindows licence
fb896a32
DE
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COCOA_APP_H_
13#define _WX_COCOA_APP_H_
14
cdd0a08f
DE
15// ========================================================================
16// wxApp
17// ========================================================================
fb896a32
DE
18// Represents the application. Derive OnInit and declare
19// a new App object to start application
20class WXDLLEXPORT wxApp: public wxAppBase
21{
22 DECLARE_DYNAMIC_CLASS(wxApp)
23 DECLARE_EVENT_TABLE()
24// ------------------------------------------------------------------------
25// initialization
26// ------------------------------------------------------------------------
27public:
28 wxApp();
29 virtual ~wxApp() {}
30
31// ------------------------------------------------------------------------
32// Cocoa specifics
33// ------------------------------------------------------------------------
34public:
35 inline WX_NSApplication GetNSApplication() { return m_cocoaApp; }
0187ddb4
DE
36 virtual void CocoaDelegate_applicationWillBecomeActive();
37 virtual void CocoaDelegate_applicationDidBecomeActive();
38 virtual void CocoaDelegate_applicationWillResignActive();
39 virtual void CocoaDelegate_applicationDidResignActive();
fb896a32
DE
40protected:
41 WX_NSApplication m_cocoaApp;
0187ddb4 42 struct objc_object *m_cocoaAppDelegate;
14fc7eb4 43 WX_NSThread m_cocoaMainThread;
fb896a32
DE
44
45// ------------------------------------------------------------------------
46// Implementation
47// ------------------------------------------------------------------------
48public:
49 // Implement wxAppBase pure virtuals
e2478fde
VZ
50 virtual void Exit();
51
fb896a32 52 virtual bool Yield(bool onlyIfNeeded = FALSE);
eb537cfb 53 virtual void WakeUpIdle();
fb896a32 54
05e2b077 55 virtual bool Initialize(int& argc, wxChar **argv);
94826170 56 virtual void CleanUp();
47f1ad6a
DE
57 virtual bool CallOnInit();
58
fb896a32
DE
59
60 virtual bool OnInit();
61 virtual bool OnInitGui();
b93d8cc4
DE
62
63#ifdef __WXDEBUG__
64 virtual void OnAssert(const wxChar *file, int line, const wxChar *cond, const wxChar *msg);
65 bool IsInAssert() const { return m_isInAssert; }
66#endif // __WXDEBUG__
67
68private:
69#ifdef __WXDEBUG__
70 bool m_isInAssert;
71#endif // __WXDEBUG__
fb896a32
DE
72};
73
74#endif // _WX_COCOA_APP_H_