add global NSLayoutManager instance

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-08-29 12:15:50 +00:00
parent ee6a122fa3
commit befe64edb4
2 changed files with 12 additions and 0 deletions

View File

@@ -417,6 +417,8 @@ const short kwxCursorLast = kwxCursorWatch;
extern ClassicCursor gMacCursors[];
extern NSLayoutManager* gNSLayoutManager;
#endif
#endif

View File

@@ -261,6 +261,9 @@ void wxBell()
wxNSAppController* appcontroller = nil;
NSLayoutManager* gNSLayoutManager = nil;
bool wxApp::DoInitGui()
{
wxMacAutoreleasePool pool;
@@ -278,6 +281,8 @@ bool wxApp::DoInitGui()
[NSApp finishLaunching];
#endif
}
gNSLayoutManager = [[NSLayoutManager alloc] init];
return true;
}
@@ -289,6 +294,11 @@ void wxApp::DoCleanUp()
[appcontroller release];
appcontroller = nil;
}
if ( gNSLayoutManager != nil )
{
[gNSLayoutManager release];
gNSLayoutManager = nil;
}
}
void wxClientDisplayRect(int *x, int *y, int *width, int *height)