// 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,
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
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxSingleChoiceDialog, wxDialog)
-wxSingleChoiceDialog::wxSingleChoiceDialog()
-{
- m_selection = -1;
-}
-
wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
const wxString& message,
const wxString& caption,
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,
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)
{
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,
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();