]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/combobox.cpp
typo fix in Restore(): __GTK20__ -> __WXGTK20__ (patch 984852)
[wxWidgets.git] / src / univ / combobox.cpp
index 53d2c180fc7685fff7ec97ad2d472069e96834a1..494df2c0b84adea6972f7cd88dad4777e84a09c8 100644 (file)
@@ -213,25 +213,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
 // wxComboControl creation
 // ----------------------------------------------------------------------------
 
-wxComboControl::wxComboControl()
-{
-    Init();
-}
-
-wxComboControl::wxComboControl(wxWindow *parent,
-                               wxWindowID id,
-                               const wxString& value,
-                               const wxPoint& pos,
-                               const wxSize& size,
-                               long style,
-                               const wxValidator& validator,
-                               const wxString& name)
-{
-    Init();
-
-    (void)Create(parent, id, value, pos, size, style, validator, name);
-}
-
 void wxComboControl::Init()
 {
     m_popup = (wxComboPopup *)NULL;
@@ -299,7 +280,7 @@ wxComboControl::~wxComboControl()
 {
     // as the button and the text control are the parent's children and not
     // ours, we have to delete them manually - they are not deleted
-    // automatically by wxWindows when we're deleted
+    // automatically by wxWidgets when we're deleted
     delete m_btn;
     delete m_text;
 
@@ -671,9 +652,9 @@ wxSize wxComboListBox::DoGetBestClientSize() const
 // wxComboBox
 // ----------------------------------------------------------------------------
 
-wxComboBox::wxComboBox()
+void wxComboBox::Init()
 {
-    Init();
+    m_lbox = (wxListBox *)NULL;
 }
 
 wxComboBox::wxComboBox(wxWindow *parent,
@@ -681,21 +662,30 @@ wxComboBox::wxComboBox(wxWindow *parent,
                        const wxString& value,
                        const wxPoint& pos,
                        const wxSize& size,
-                       int n,
-                       const wxString *choices,
+                       const wxArrayString& choices,
                        long style,
                        const wxValidator& validator,
                        const wxString& name)
 {
     Init();
 
-    (void)Create(parent, id, value, pos, size, n, choices,
-                 style, validator, name);
+    Create(parent, id, value, pos, size, choices, style, validator, name);
 }
 
-void wxComboBox::Init()
+bool wxComboBox::Create(wxWindow *parent,
+                        wxWindowID id,
+                        const wxString& value,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        const wxArrayString& choices,
+                        long style,
+                        const wxValidator& validator,
+                        const wxString& name)
 {
-    m_lbox = (wxListBox *)NULL;
+    wxCArrayString chs(choices);
+
+    return Create(parent, id, value, pos, size, chs.GetCount(),
+                  chs.GetStrings(), style, validator, name);
 }
 
 bool wxComboBox::Create(wxWindow *parent,
@@ -704,7 +694,7 @@ bool wxComboBox::Create(wxWindow *parent,
                         const wxPoint& pos,
                         const wxSize& size,
                         int n,
-                        const wxString *choices,
+                        const wxString choices[],
                         long style,
                         const wxValidator& validator,
                         const wxString& name)