From c61605ef505305c14b12169436bf36a01da10951 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 30 Apr 2010 16:55:33 +0000 Subject: [PATCH] adding wrapper for native UIWindow, using designated initializer for view controller git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/iphone/nonownedwnd.mm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/osx/iphone/nonownedwnd.mm b/src/osx/iphone/nonownedwnd.mm index 8fe020d158..87018de7b8 100644 --- a/src/osx/iphone/nonownedwnd.mm +++ b/src/osx/iphone/nonownedwnd.mm @@ -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];