X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/54b84891257f53e347c05852c55d126c1ea0def6..cd378f94bec1edc0f991ee55b02bfe3084de94e0:/src/generic/choicdgg.cpp diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp index c56105fb18..4f47ab48ea 100644 --- a/src/generic/choicdgg.cpp +++ b/src/generic/choicdgg.cpp @@ -167,6 +167,23 @@ int wxGetSingleChoiceIndex( const wxString& message, return choice; } +int wxGetSingleChoiceIndex( 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); + int res = wxGetSingleChoiceIndex(message, caption, n, choices, parent, + x, y, centre, width, height); + delete [] choices; + + return res; +} + #ifdef WXWIN_COMPATIBILITY_2 // Overloaded for backward compatibility int wxGetSingleChoiceIndex( const wxString& message, @@ -259,6 +276,10 @@ size_t wxGetMultipleChoices(wxArrayInt& selections, 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