]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/window.cpp
mentioned the new doc format
[wxWidgets.git] / src / osx / carbon / window.cpp
index 21e9c4174a56316a237157191a12417d1b7d7b5a..39ed9fe0bfbbe095167029e5f7390ddf5280cd8d 100644 (file)
@@ -288,7 +288,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
 #endif
 
                     wxLogTrace(_T("Focus"), _T("focus lost(%p)"), wx_static_cast(void*, thisWindow));
-
+                    
                     // remove this as soon as posting the synthesized event works properly
                     static bool inKillFocusEvent = false ;
 
@@ -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((ControlRef)parent->GetWXWidget(), m_controlRef);
 }
 
 void wxMacControl::SetNeedsDisplay( const wxRect* rect )