Show
Ignore:
Timestamp:
10/10/08 12:01:32 (3 months ago)
Author:
SC
Message:

moving embedding to common API

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • wxWidgets/trunk/src/osx/carbon/window.cpp

    r56108 r56218  
    842842} 
    843843 
    844 void wxMacControl::SetReference( URefCon data ) 
    845 { 
    846     SetControlReference( m_controlRef , data ); 
    847 } 
    848  
    849844void wxMacControl::RemoveFromParent() 
    850845{ 
    851846    // nothing to do here for carbon 
     847    HIViewRemoveFromSuperview(m_controlRef); 
    852848} 
    853849 
    854850void wxMacControl::Embed( wxWidgetImpl *parent ) 
    855851{ 
    856     // copied from MacPostControlCreate 
    857     ControlRef container = (ControlRef) parent->GetWXWidget() ; 
    858     wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ; 
    859     ::EmbedControl( m_controlRef , container ) ; 
     852    HIViewAddSubview(parent->GetWXWidget(), m_controlRef); 
    860853} 
    861854 
     
    13891382} 
    13901383 
     1384void wxMacControl::AddSubWidget( wxWidgetImpl* widget ) 
     1385{ 
     1386    ControlRef container = (ControlRef) GetWXWidget() ; 
     1387    wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ; 
     1388    ::EmbedControl( (ControlRef) widget->GetWXWidget() , container ) ; 
     1389} 
     1390 
    13911391// 
    13921392// Tab Control