Applied patch [ 1215991 ] Mac xrc enables unknown class
Implements Reparent for Mac git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b61261dfed
commit
50779e0648
@ -109,6 +109,7 @@ public:
|
||||
virtual int GetScrollRange( int orient ) const;
|
||||
virtual void ScrollWindow( int dx, int dy,
|
||||
const wxRect* rect = (wxRect *) NULL );
|
||||
virtual bool Reparent( wxWindowBase *newParent );
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
||||
|
@ -3241,4 +3241,18 @@ wxInt32 wxWindowMac::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENT
|
||||
return eventNotHandledErr ;
|
||||
}
|
||||
|
||||
bool wxWindowMac::Reparent(wxWindowBase *newParentBase)
|
||||
{
|
||||
wxWindowMac *newParent = (wxWindowMac *)newParentBase;
|
||||
|
||||
if ( !wxWindowBase::Reparent(newParent) )
|
||||
return FALSE;
|
||||
|
||||
//copied from MacPostControlCreate
|
||||
ControlRef container = (ControlRef) GetParent()->GetHandle() ;
|
||||
wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ;
|
||||
::EmbedControl( m_peer->GetControlRef() , container ) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user