]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/combobox.cpp
remove old thread debugging code
[wxWidgets.git] / src / mac / carbon / combobox.cpp
index 63c256d52d4066d1fbb2e5cec5b173ab39945bcb..4db3c45a0267e7a6b92184b0b6b516c4a5743052 100644 (file)
@@ -50,16 +50,11 @@ MenuHandle NewUniqueMenu()
 // ----------------------------------------------------------------------------
 
 // the margin between the text control and the choice
-#if TARGET_API_MAC_OSX
 // margin should be bigger on OS X due to blue highlight
 // around text control.
 static const wxCoord MARGIN = 4;
 // this is the border a focus rect on OSX is needing
 static const int    TEXTFOCUSBORDER = 3 ;
-#else
-static const wxCoord MARGIN = 2;
-static const int    TEXTFOCUSBORDER = 0 ;
-#endif
 
 
 // ----------------------------------------------------------------------------
@@ -88,14 +83,14 @@ protected:
             NavEvent.SetWindowChange(false);
 
             // Get the parent of the combo and have it process the navigation?
-            if (m_cb->GetParent()->GetEventHandler()->ProcessEvent(NavEvent))
+            if (m_cb->GetParent()->HandleWindowEvent(NavEvent))
                     return;
         }
 
         // send the event to the combobox class in case the user has bound EVT_CHAR
         wxKeyEvent kevt(event);
         kevt.SetEventObject(m_cb);
-        if (m_cb->GetEventHandler()->ProcessEvent(kevt))
+        if (m_cb->HandleWindowEvent(kevt))
             // If the event was handled and not skipped then we're done
             return;
 
@@ -108,7 +103,7 @@ protected:
 
             // This will invoke the dialog default action,
             // such as the clicking the default button.
-            if (!m_cb->GetEventHandler()->ProcessEvent( event ))
+            if (!m_cb->HandleWindowEvent( event ))
             {
                 wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow);
                 if ( tlw && tlw->GetDefaultItem() )
@@ -133,7 +128,7 @@ protected:
     {
         event.SetEventObject(m_cb);
         event.SetId(m_cb->GetId());
-        if (! m_cb->GetEventHandler()->ProcessEvent(event))
+        if (! m_cb->HandleWindowEvent(event))
             event.Skip();
     }
 
@@ -141,7 +136,7 @@ protected:
     {
         event.SetEventObject(m_cb);
         event.SetId(m_cb->GetId());
-        if (! m_cb->GetEventHandler()->ProcessEvent(event))
+        if (! m_cb->HandleWindowEvent(event))
             event.Skip();
     }
 
@@ -149,7 +144,7 @@ protected:
     {
         event.SetEventObject(m_cb);
         event.SetId(m_cb->GetId());
-        if (! m_cb->GetEventHandler()->ProcessEvent(event))
+        if (! m_cb->HandleWindowEvent(event))
             event.Skip();
     }
 
@@ -345,8 +340,13 @@ bool wxComboBox::Create(wxWindow *parent,
     const wxValidator& validator,
     const wxString& name)
 {
-    return Create( parent, id, value, pos, size, 0, NULL,
-                   style, validator, name );
+    if ( !Create( parent, id, value, pos, size, 0, NULL,
+                   style, validator, name ) )
+        return false;
+
+    Append(choices);
+
+    return true;
 }
 
 bool wxComboBox::Create(wxWindow *parent,