wxNonOwnedWindow* wxNonOwnedWindow::GetFromWXWindow( WXWindow win )
{
wxNonOwnedWindowImpl* impl = wxNonOwnedWindowImpl::FindFromWXWindow(win);
-
+
return ( impl != NULL ? impl->GetWXPeer() : NULL ) ;
}
wxNonOwnedWindowImpl* wxNonOwnedWindowImpl::FindFromWXWindow (WXWindow window)
{
MacWindowMap::iterator node = wxWinMacWindowList.find(window);
-
+
return (node == wxWinMacWindowList.end()) ? NULL : node->second;
}
// adding NULL WindowRef is (first) surely a result of an error and
// nothing else :-)
wxCHECK_RET( window != (WXWindow) NULL, wxT("attempt to add a NULL WindowRef to window list") );
-
+
wxWinMacWindowList[window] = impl;
}
{
if ( parent )
parent->AddChild(this);
-
+
SubclassWin(nativeWindow);
-
+
return true;
}
if ( GetParent() )
GetParent()->RemoveChild(this);
-
- wxNonOwnedWindowImpl::RemoveAssociations(m_nowpeer) ;
+
+ wxNonOwnedWindowImpl::RemoveAssociations(m_nowpeer) ;
wxDELETE(m_nowpeer);
wxDELETE(m_peer);
m_isNativeWindowWrapper = false;
bool wxNonOwnedWindow::Destroy()
{
WillBeDestroyed();
-
+
return wxWindow::Destroy();
}
{
if (flags == GetWindowStyleFlag())
return;
-
+
wxWindow::SetWindowStyleFlag(flags);
-
+
if (m_nowpeer)
m_nowpeer->SetWindowStyleFlag(flags);
}
int left, top, w, h;
m_nowpeer->GetContentArea(left, top, w, h);
-
+
if (width)
*width = w ;
if (height)
wxT("Shaped windows must be created with the wxFRAME_SHAPED style."));
m_shape = region;
-
+
// The empty region signifies that the shape
// should be removed from the window.
if ( region.IsEmpty() )