+size_t wxGetMultipleChoices(wxArrayInt& selections,
+ const wxString& message,
+ const wxString& caption,
+ int n, const wxString *choices,
+ wxWindow *parent,
+ int WXUNUSED(x), int WXUNUSED(y),
+ bool WXUNUSED(centre),
+ int WXUNUSED(width), int WXUNUSED(height))
+{
+ wxMultiChoiceDialog dialog(parent, message, caption, n, choices);
+
+ if ( !selections.IsEmpty() )
+ dialog.SetSelections(selections);
+
+ if ( dialog.ShowModal() == wxID_OK )
+ selections = dialog.GetSelections();
+ else
+ selections.Empty();
+
+ return selections.GetCount();
+}
+
+size_t wxGetMultipleChoices(wxArrayInt& selections,
+ const wxString& message,
+ const wxString& caption,
+ const wxArrayString& aChoices,
+ wxWindow *parent,
+ int x, int y,
+ bool centre,
+ int width, int height)
+{
+ wxString *choices;
+ int n = ConvertWXArrayToC(aChoices, &choices);
+ size_t res = wxGetMultipleChoices(selections, message, caption,
+ n, choices, parent,
+ x, y, centre, width, height);
+ delete [] choices;
+
+ return res;
+}
+
+// ----------------------------------------------------------------------------
+// wxAnyChoiceDialog
+// ----------------------------------------------------------------------------
+
+bool wxAnyChoiceDialog::Create(wxWindow *parent,
+ const wxString& message,
+ const wxString& caption,
+ int n, const wxString *choices,
+ long styleDlg,
+ const wxPoint& pos,
+ long styleLbox)
+{
+ if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg) )
+ return false;
+
+ wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
+
+ // 1) text message
+ topsizer->Add( CreateTextSizer( message ), 0, wxALL, wxLARGESMALL(10,0) );
+
+ // 2) list box
+ m_listbox = new wxListBox( this, wxID_LISTBOX,
+ wxDefaultPosition, wxDefaultSize,
+ n, choices,
+ styleLbox );
+ if ( n > 0 )
+ m_listbox->SetSelection(0);