X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e93bfe3c7458d8291626f7e260b6bb4c9f6b276f..8f974c520a8733158591891458fda10fae4c3950:/src/generic/choicdgg.cpp?ds=inline diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp index 5616efce9e..a23450cfe4 100644 --- a/src/generic/choicdgg.cpp +++ b/src/generic/choicdgg.cpp @@ -28,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_CHOICEDLG + #ifndef WX_PRECOMP #include #include "wx/utils.h" @@ -127,7 +129,7 @@ wxString wxGetSingleChoice( const wxString& message, return res; } -#ifdef WXWIN_COMPATIBILITY_2 +#if WXWIN_COMPATIBILITY_2 // Overloaded for backward compatibility wxString wxGetSingleChoice( const wxString& message, const wxString& caption, @@ -167,7 +169,24 @@ int wxGetSingleChoiceIndex( const wxString& message, return choice; } -#ifdef WXWIN_COMPATIBILITY_2 +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; +} + +#if WXWIN_COMPATIBILITY_2 // Overloaded for backward compatibility int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, @@ -225,7 +244,7 @@ void *wxGetSingleChoiceData( const wxString& message, return res; } -#ifdef WXWIN_COMPATIBILITY_2 +#if WXWIN_COMPATIBILITY_2 // Overloaded for backward compatibility void *wxGetSingleChoiceData( const wxString& message, const wxString& caption, @@ -365,7 +384,7 @@ wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, Create(parent, message, caption, n, choices, clientData, style); } -#ifdef WXWIN_COMPATIBILITY_2 +#if WXWIN_COMPATIBILITY_2 wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, @@ -506,3 +525,5 @@ bool wxMultiChoiceDialog::TransferDataFromWindow() return TRUE; } + +#endif // wxUSE_CHOICEDLG