moving embedding to common API

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2008-10-10 19:01:32 +00:00
parent d0aff30277
commit c4825ef73a
25 changed files with 18 additions and 80 deletions

View File

@@ -841,22 +841,15 @@ void wxMacControl::Init()
m_macControlEventHandler = NULL;
}
void wxMacControl::SetReference( URefCon data )
{
SetControlReference( m_controlRef , data );
}
void wxMacControl::RemoveFromParent()
{
// nothing to do here for carbon
HIViewRemoveFromSuperview(m_controlRef);
}
void wxMacControl::Embed( wxWidgetImpl *parent )
{
// copied from MacPostControlCreate
ControlRef container = (ControlRef) parent->GetWXWidget() ;
wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ;
::EmbedControl( m_controlRef , container ) ;
HIViewAddSubview(parent->GetWXWidget(), m_controlRef);
}
void wxMacControl::SetNeedsDisplay( const wxRect* rect )
@@ -1388,6 +1381,13 @@ void wxMacControl::SetScrollThumb( wxInt32 WXUNUSED(pos), wxInt32 WXUNUSED(views
// implemented in respective subclass
}
void wxMacControl::AddSubWidget( wxWidgetImpl* widget )
{
ControlRef container = (ControlRef) GetWXWidget() ;
wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ;
::EmbedControl( (ControlRef) widget->GetWXWidget() , container ) ;
}
//
// Tab Control
//