]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/choicdgg.cpp
use best size instead of hard coded 80*26 in SetSize(wxSIZE_AUTO)
[wxWidgets.git] / src / generic / choicdgg.cpp
index 960619d89357b5c2df8afec0e8d66d875ee6097f..1abec6f0cb6901f7e63576e2488b7830f8c5c50b 100644 (file)
@@ -238,22 +238,6 @@ size_t wxGetMultipleChoices(wxArrayInt& selections,
 // wxAnyChoiceDialog
 // ----------------------------------------------------------------------------
 
 // wxAnyChoiceDialog
 // ----------------------------------------------------------------------------
 
-wxAnyChoiceDialog::wxAnyChoiceDialog()
-{
-}
-
-wxAnyChoiceDialog::wxAnyChoiceDialog(wxWindow *parent,
-                                     const wxString& message,
-                                     const wxString& caption,
-                                     int n,
-                                     const wxString *choices,
-                                     long styleDlg,
-                                     const wxPoint& pos,
-                                     long styleLbox)
-{
-    (void)Create(parent, message, caption, n, choices, styleDlg, pos, styleLbox);
-}
-
 bool wxAnyChoiceDialog::Create(wxWindow *parent,
                                const wxString& message,
                                const wxString& caption,
 bool wxAnyChoiceDialog::Create(wxWindow *parent,
                                const wxString& message,
                                const wxString& caption,
@@ -301,6 +285,19 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
     return TRUE;
 }
 
     return TRUE;
 }
 
+bool wxAnyChoiceDialog::Create(wxWindow *parent,
+                               const wxString& message,
+                               const wxString& caption,
+                               const wxArrayString& choices,
+                               long styleDlg,
+                               const wxPoint& pos,
+                               long styleLbox)
+{
+    wxCArrayString chs(choices);
+    return Create(parent, message, caption, chs.GetCount(), chs.GetStrings(),
+                  styleDlg, pos, styleLbox);
+}
+
 // ----------------------------------------------------------------------------
 // wxSingleChoiceDialog
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxSingleChoiceDialog
 // ----------------------------------------------------------------------------
@@ -312,11 +309,6 @@ END_EVENT_TABLE()
 
 IMPLEMENT_DYNAMIC_CLASS(wxSingleChoiceDialog, wxDialog)
 
 
 IMPLEMENT_DYNAMIC_CLASS(wxSingleChoiceDialog, wxDialog)
 
-wxSingleChoiceDialog::wxSingleChoiceDialog()
-{
-    m_selection = -1;
-}
-
 wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
                                            const wxString& message,
                                            const wxString& caption,
 wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
                                            const wxString& message,
                                            const wxString& caption,
@@ -329,6 +321,17 @@ wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
     Create(parent, message, caption, n, choices, clientData, style);
 }
 
     Create(parent, message, caption, n, choices, clientData, style);
 }
 
+wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
+                                           const wxString& message,
+                                           const wxString& caption,
+                                           const wxArrayString& choices,
+                                           char **clientData,
+                                           long style,
+                                           const wxPoint& WXUNUSED(pos))
+{
+    Create(parent, message, caption, choices, clientData, style);
+}
+
 bool wxSingleChoiceDialog::Create( wxWindow *parent,
                                    const wxString& message,
                                    const wxString& caption,
 bool wxSingleChoiceDialog::Create( wxWindow *parent,
                                    const wxString& message,
                                    const wxString& caption,
@@ -354,6 +357,19 @@ bool wxSingleChoiceDialog::Create( wxWindow *parent,
     return TRUE;
 }
 
     return TRUE;
 }
 
+bool wxSingleChoiceDialog::Create( wxWindow *parent,
+                                   const wxString& message,
+                                   const wxString& caption,
+                                   const wxArrayString& choices,
+                                   char **clientData,
+                                   long style,
+                                   const wxPoint& pos )
+{
+    wxCArrayString chs(choices);
+    return Create( parent, message, caption, chs.GetCount(), chs.GetStrings(),
+                   clientData, style, pos );
+}
+
 // Set the selection
 void wxSingleChoiceDialog::SetSelection(int sel)
 {
 // Set the selection
 void wxSingleChoiceDialog::SetSelection(int sel)
 {
@@ -387,21 +403,6 @@ void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event))
 
 IMPLEMENT_DYNAMIC_CLASS(wxMultiChoiceDialog, wxDialog)
 
 
 IMPLEMENT_DYNAMIC_CLASS(wxMultiChoiceDialog, wxDialog)
 
-wxMultiChoiceDialog::wxMultiChoiceDialog()
-{
-}
-
-wxMultiChoiceDialog::wxMultiChoiceDialog(wxWindow *parent,
-                                         const wxString& message,
-                                         const wxString& caption,
-                                         int n,
-                                         const wxString *choices,
-                                         long style,
-                                         const wxPoint& pos)
-{
-    (void)Create(parent, message, caption, n, choices, style, pos);
-}
-
 bool wxMultiChoiceDialog::Create( wxWindow *parent,
                                   const wxString& message,
                                   const wxString& caption,
 bool wxMultiChoiceDialog::Create( wxWindow *parent,
                                   const wxString& message,
                                   const wxString& caption,
@@ -419,6 +420,18 @@ bool wxMultiChoiceDialog::Create( wxWindow *parent,
     return TRUE;
 }
 
     return TRUE;
 }
 
+bool wxMultiChoiceDialog::Create( wxWindow *parent,
+                                  const wxString& message,
+                                  const wxString& caption,
+                                  const wxArrayString& choices,
+                                  long style,
+                                  const wxPoint& pos )
+{
+    wxCArrayString chs(choices);
+    return Create( parent, message, caption, chs.GetCount(),
+                   chs.GetStrings(), style, pos );
+}
+
 void wxMultiChoiceDialog::SetSelections(const wxArrayInt& selections)
 {
     size_t count = selections.GetCount();
 void wxMultiChoiceDialog::SetSelections(const wxArrayInt& selections)
 {
     size_t count = selections.GetCount();