]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/control.cpp
avoid setting initial position if it was not specified, broken in r70734
[wxWidgets.git] / src / osx / carbon / control.cpp
index 0389a007ded81d30811239656193a47d6fd6a235..fbf5a31ba70cbfaa88d2878fcf7761fee80477ef 100644 (file)
@@ -1,10 +1,9 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/mac/carbon/control.cpp
+// Name:        src/osx/carbon/control.cpp
 // Purpose:     wxControl class
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     1998-01-01
-// RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
     #include "wx/sizer.h"
 #endif // WX_PRECOMP
 
-#include "wx/notebook.h"
-#include "wx/tabctrl.h"
-#include "wx/spinbutt.h"
-
-#include "wx/osx/uma.h"
 #include "wx/osx/private.h"
 
 IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
@@ -68,11 +62,6 @@ bool wxControl::Create( wxWindow *parent,
     return rval;
 }
 
-wxControl::~wxControl()
-{
-    m_isBeingDeleted = true;
-}
-
 bool wxControl::ProcessCommand( wxCommandEvent &event )
 {
     // Tries:
@@ -83,15 +72,19 @@ bool wxControl::ProcessCommand( wxCommandEvent &event )
 
 void  wxControl::OnKeyDown( wxKeyEvent &WXUNUSED(event) )
 {
-    if ( m_peer == NULL || !m_peer->IsOk() )
+    if ( GetPeer() == NULL || !GetPeer()->IsOk() )
         return;
 
+#if wxOSX_USE_CARBON
     UInt32 keyCode, modifiers;
     char charCode;
 
     GetEventParameter( (EventRef)wxTheApp->MacGetCurrentEvent(), kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode  );
-    GetEventParameter( (EventRef)wxTheApp->MacGetCurrentEvent(), kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode );
+    GetEventParameter( (EventRef)wxTheApp->MacGetCurrentEvent(), kEventParamKeyMacCharCodes, typeChar, NULL, 1, NULL, &charCode );
     GetEventParameter( (EventRef)wxTheApp->MacGetCurrentEvent(), kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers );
 
-    m_peer->HandleKey( keyCode, charCode, modifiers );
+    GetPeer()->HandleKey( keyCode, charCode, modifiers );
+#else
+    // TODO
+#endif
 }