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:
parent
b31d6326be
commit
395506ea99
@ -83,14 +83,21 @@ public:
|
||||
// TODO change semantics to be in line with cocoa (make autrelease NOT increase the count)
|
||||
void MacAddToAutorelease( void* cfrefobj );
|
||||
void MacReleaseAutoreleasePool();
|
||||
|
||||
public:
|
||||
static wxWindow* s_captureWindow ;
|
||||
static long s_lastModifiers ;
|
||||
|
||||
int m_nCmdShow;
|
||||
|
||||
private:
|
||||
// mac specifics
|
||||
protected:
|
||||
#if wxOSX_USE_COCOA
|
||||
// override for support of custom app controllers
|
||||
virtual WX_NSObject OSXCreateAppController();
|
||||
#endif
|
||||
|
||||
private:
|
||||
virtual bool DoInitGui();
|
||||
virtual void DoCleanUp();
|
||||
|
||||
|
@ -259,10 +259,14 @@ void wxBell()
|
||||
|
||||
@end
|
||||
|
||||
wxNSAppController* appcontroller = nil;
|
||||
WX_NSObject appcontroller = nil;
|
||||
|
||||
NSLayoutManager* gNSLayoutManager = nil;
|
||||
|
||||
WX_NSObject wxApp::OSXCreateAppController()
|
||||
{
|
||||
return [[wxNSAppController alloc] init];
|
||||
}
|
||||
|
||||
bool wxApp::DoInitGui()
|
||||
{
|
||||
@ -272,7 +276,7 @@ bool wxApp::DoInitGui()
|
||||
{
|
||||
[wxNSApplication sharedApplication];
|
||||
|
||||
appcontroller = [[wxNSAppController alloc] init];
|
||||
appcontroller = OSXCreateAppController();
|
||||
[NSApp setDelegate:appcontroller];
|
||||
|
||||
// calling finishLaunching so early before running the loop seems to trigger some 'MenuManager compatibility' which leads
|
||||
|
Loading…
Reference in New Issue
Block a user