]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/combobox.cpp
cleanup - reformatting
[wxWidgets.git] / src / mac / carbon / combobox.cpp
index 245bb7acd8e4195c4c5a2aeb094966f13b78e5b4..a1fbf3c01fc7f6eb0a7e4426ab9d7ebb4fb9c0f7 100644 (file)
 #include "wx/combobox.h"
 #include "wx/button.h"
 #include "wx/menu.h"
+#include "wx/containr.h"
 #include "wx/mac/uma.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
 
+WX_DELEGATE_TO_CONTROL_CONTAINER(wxComboBox)
+
+BEGIN_EVENT_TABLE(wxComboBox, wxControl)
+    WX_EVENT_TABLE_CONTROL_CONTAINER(wxComboBox)
+END_EVENT_TABLE()
+
 
 static int nextPopUpMenuId = 1000 ;
 
@@ -210,6 +217,8 @@ protected:
 private:
     wxComboBox *m_cb;
 
+    friend class wxComboBox;
+
     DECLARE_EVENT_TABLE()
 };
 
@@ -217,6 +226,11 @@ BEGIN_EVENT_TABLE(wxComboBoxChoice, wxChoice)
     EVT_CHOICE(-1, wxComboBoxChoice::OnChoice)
 END_EVENT_TABLE()
 
+wxComboBox::wxComboBox()
+{
+    m_container.SetContainerWindow(this);
+}
+
 wxComboBox::~wxComboBox()
 {
     // delete client objects
@@ -311,12 +325,6 @@ bool wxComboBox::Show(bool show)
     return true;
 }
 
-void wxComboBox::SetFocus()
-{
-    if ( m_text != NULL)
-        m_text->SetFocus();
-}
-
 void wxComboBox::DelegateTextChanged( const wxString& value )
 {
     SetStringSelection( value );