]> git.saurik.com Git - wxWidgets.git/commitdiff
adding wrapper for native UIWindow, using designated initializer for view controller
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 30 Apr 2010 16:55:33 +0000 (16:55 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 30 Apr 2010 16:55:33 +0000 (16:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/iphone/nonownedwnd.mm

index 8fe020d1581e3e1873908bedcf63f6580091b97f..87018de7b85e67da31d680b760cb438f5f9941be 100644 (file)
@@ -135,6 +135,11 @@ long style, long extraStyle, const wxString& name )
     [m_macWindow setWindowLevel:level];
 }
 
+void wxNonOwnedWindowIPhoneImpl::Create( wxWindow* WXUNUSED(parent), WXWindow nativeWindow )
+{
+    m_macWindow = nativeWindow;
+}
+
 
 WXWindow wxNonOwnedWindowIPhoneImpl::GetWXWindow() const
 {
@@ -304,6 +309,14 @@ void wxNonOwnedWindowIPhoneImpl::WindowToScreen( int *x, int *y )
         *y = p.y;
 }
 
+wxNonOwnedWindowImpl* wxNonOwnedWindowImpl::CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, WXWindow nativeWindow)
+{
+    wxNonOwnedWindowIPhoneImpl* now = new wxNonOwnedWindowIPhoneImpl( wxpeer );
+    now->Create( parent, nativeWindow );
+    return now;
+}
+
+
 wxNonOwnedWindowImpl* wxNonOwnedWindowImpl::CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, const wxPoint& pos, const wxSize& size,
     long style, long extraStyle, const wxString& name )
 {
@@ -321,7 +334,7 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now )
 
     wxUIContentView* contentview = [[wxUIContentView alloc] initWithFrame:( fullscreen ? frame : appframe ) ];
     contentview.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
-    wxUIContentViewController* controller = [[wxUIContentViewController alloc] init];
+    wxUIContentViewController* controller = [[wxUIContentViewController alloc] initWithNibName:nil bundle:nil];
     controller.wantsFullScreenLayout = fullscreen;
     controller.view = contentview;
     [contentview release];