support for custom app controllers, override OSXCreateAppController in wxApp subclass
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -83,14 +83,21 @@ public:
|
|||||||
// TODO change semantics to be in line with cocoa (make autrelease NOT increase the count)
|
// TODO change semantics to be in line with cocoa (make autrelease NOT increase the count)
|
||||||
void MacAddToAutorelease( void* cfrefobj );
|
void MacAddToAutorelease( void* cfrefobj );
|
||||||
void MacReleaseAutoreleasePool();
|
void MacReleaseAutoreleasePool();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static wxWindow* s_captureWindow ;
|
static wxWindow* s_captureWindow ;
|
||||||
static long s_lastModifiers ;
|
static long s_lastModifiers ;
|
||||||
|
|
||||||
int m_nCmdShow;
|
int m_nCmdShow;
|
||||||
|
|
||||||
private:
|
|
||||||
// mac specifics
|
// mac specifics
|
||||||
|
protected:
|
||||||
|
#if wxOSX_USE_COCOA
|
||||||
|
// override for support of custom app controllers
|
||||||
|
virtual WX_NSObject OSXCreateAppController();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private:
|
||||||
virtual bool DoInitGui();
|
virtual bool DoInitGui();
|
||||||
virtual void DoCleanUp();
|
virtual void DoCleanUp();
|
||||||
|
|
||||||
|
@@ -259,10 +259,14 @@ void wxBell()
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
wxNSAppController* appcontroller = nil;
|
WX_NSObject appcontroller = nil;
|
||||||
|
|
||||||
NSLayoutManager* gNSLayoutManager = nil;
|
NSLayoutManager* gNSLayoutManager = nil;
|
||||||
|
|
||||||
|
WX_NSObject wxApp::OSXCreateAppController()
|
||||||
|
{
|
||||||
|
return [[wxNSAppController alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
bool wxApp::DoInitGui()
|
bool wxApp::DoInitGui()
|
||||||
{
|
{
|
||||||
@@ -272,7 +276,7 @@ bool wxApp::DoInitGui()
|
|||||||
{
|
{
|
||||||
[wxNSApplication sharedApplication];
|
[wxNSApplication sharedApplication];
|
||||||
|
|
||||||
appcontroller = [[wxNSAppController alloc] init];
|
appcontroller = OSXCreateAppController();
|
||||||
[NSApp setDelegate:appcontroller];
|
[NSApp setDelegate:appcontroller];
|
||||||
|
|
||||||
// calling finishLaunching so early before running the loop seems to trigger some 'MenuManager compatibility' which leads
|
// calling finishLaunching so early before running the loop seems to trigger some 'MenuManager compatibility' which leads
|
||||||
|
Reference in New Issue
Block a user