X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7e94bd7ebc205ffba5e2729b0d465778d4e48c6..50d4763f1710f6e45ac6af7112d1ce9effe93bc4:/interface/wx/choicdlg.h?ds=sidebyside diff --git a/interface/wx/choicdlg.h b/interface/wx/choicdlg.h index b0c5779f1b..ff49376afc 100644 --- a/interface/wx/choicdlg.h +++ b/interface/wx/choicdlg.h @@ -3,7 +3,7 @@ // Purpose: interface of wx[Multi|Single]ChoiceDialog // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -60,6 +60,10 @@ public: strings. @endWxPythonOnly + + @beginWxPerlOnly + Not supported by wxPerl. + @endWxPerlOnly */ wxMultiChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, @@ -103,6 +107,10 @@ public: strings. @endWxPythonOnly + + @beginWxPerlOnly + Use an array reference for the @a choices parameter. + @endWxPerlOnly */ wxMultiChoiceDialog(wxWindow* parent, const wxString& message, @@ -115,7 +123,7 @@ public: /** Returns array with indexes of selected items. */ - wxArrayInt GetSelection() const; + wxArrayInt GetSelections() const; /** Sets selected items from the array of selected items' indexes. @@ -162,7 +170,7 @@ public: An array of strings, or a string list, containing the choices. @param clientData An array of client data to be associated with the items. See - GetSelectionClientData(). + GetSelectionData(). @param style A dialog style (bitlist) containing flags chosen from standard dialog styles and the ones listed below. The default value is @@ -189,6 +197,10 @@ public: strings. @endWxPythonOnly + + @beginWxPerlOnly + Not supported by wxPerl. + @endWxPerlOnly */ wxSingleChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, @@ -210,7 +222,7 @@ public: An array of strings, or a string list, containing the choices. @param clientData An array of client data to be associated with the items. See - GetSelectionClientData(). + GetSelectionData(). @param style A dialog style (bitlist) containing flags chosen from standard dialog styles and the ones listed below. The default value is @@ -237,6 +249,10 @@ public: strings. @endWxPythonOnly + + @beginWxPerlOnly + Use an array reference for the @a choices parameter. + @endWxPerlOnly */ wxSingleChoiceDialog(wxWindow* parent, const wxString& message, @@ -254,8 +270,10 @@ public: /** Returns the client data associated with the selection. + + @since 2.9.4 */ - char* GetSelectionClientData() const; + void* GetSelectionData() const; /** Returns the selected string. @@ -279,7 +297,7 @@ public: // Global functions/macros // ============================================================================ -/** @ingroup group_funcmacro_dialog */ +/** @addtogroup group_funcmacro_dialog */ //@{ /** @@ -287,6 +305,10 @@ public: selected string. If the user pressed cancel, -1 is returned. @header{wx/choicdlg.h} + + @beginWxPerlOnly + Use an array reference for the @a aChoices parameter. + @endWxPerlOnly */ int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, @@ -296,7 +318,9 @@ int wxGetSingleChoiceIndex(const wxString& message, int y = -1, bool centre = true, int width = 150, - int height = 200); + int height = 200, + int initialSelection = 0); + int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, int n, @@ -306,11 +330,24 @@ int wxGetSingleChoiceIndex(const wxString& message, int y = -1, bool centre = true, int width = 150, - int height = 200); + int height = 200, + int initialSelection = 0); + +int wxGetSingleChoiceIndex(const wxString& message, + const wxString& caption, + const wxArrayString& choices, + int initialSelection, + wxWindow *parent = NULL); + +int wxGetSingleChoiceIndex(const wxString& message, + const wxString& caption, + int n, const wxString *choices, + int initialSelection, + wxWindow *parent = NULL); //@} -/** @ingroup group_funcmacro_dialog */ +/** @addtogroup group_funcmacro_dialog */ //@{ /** @@ -328,6 +365,10 @@ int wxGetSingleChoiceIndex(const wxString& message, characters) is centred; if @false, the message is left-justified. @header{wx/choicdlg.h} + + @beginWxPerlOnly + Use an array reference for the @a choices parameter. + @endWxPerlOnly */ wxString wxGetSingleChoice(const wxString& message, const wxString& caption, @@ -337,7 +378,8 @@ wxString wxGetSingleChoice(const wxString& message, int y = -1, bool centre = true, int width = 150, - int height = 200); + int height = 200 + int initialSelection = 0); wxString wxGetSingleChoice(const wxString& message, const wxString& caption, int n, @@ -347,11 +389,25 @@ wxString wxGetSingleChoice(const wxString& message, int y = -1, bool centre = true, int width = 150, - int height = 200); + int height = 200 + int initialSelection = 0); + + +wxString wxGetSingleChoice(const wxString& message, + const wxString& caption, + const wxArrayString& choices, + int initialSelection, + wxWindow *parent = NULL); + +wxString wxGetSingleChoice(const wxString& message, + const wxString& caption, + int n, const wxString *choices, + int initialSelection, + wxWindow *parent = NULL); //@} -/** @ingroup group_funcmacro_dialog */ +/** @addtogroup group_funcmacro_dialog */ //@{ /** @@ -361,6 +417,10 @@ wxString wxGetSingleChoice(const wxString& message, of elements as @c choices or @c aChoices! @header{wx/choicdlg.h} + + @beginWxPerlOnly + Use an array reference for the @a aChoices and @a client_data parameters. + @endWxPerlOnly */ wxString wxGetSingleChoiceData(const wxString& message, const wxString& caption, @@ -371,7 +431,9 @@ wxString wxGetSingleChoiceData(const wxString& message, int y = -1, bool centre = true, int width = 150, - int height = 200); + int height = 200 + int initialSelection = 0); + wxString wxGetSingleChoiceData(const wxString& message, const wxString& caption, int n, @@ -382,11 +444,26 @@ wxString wxGetSingleChoiceData(const wxString& message, int y = -1, bool centre = true, int width = 150, - int height = 200); + int height = 200 + int initialSelection = 0); + +void* wxGetSingleChoiceData(const wxString& message, + const wxString& caption, + const wxArrayString& choices, + void **client_data, + int initialSelection, + wxWindow *parent = NULL); + +void* wxGetSingleChoiceData(const wxString& message, + const wxString& caption, + int n, const wxString *choices, + void **client_data, + int initialSelection, + wxWindow *parent = NULL); //@} -/** @ingroup group_funcmacro_dialog */ +/** @addtogroup group_funcmacro_dialog */ //@{ /** @@ -394,7 +471,8 @@ wxString wxGetSingleChoiceData(const wxString& message, multiple-selection listbox. The user may choose an arbitrary (including 0) number of items in the listbox whose indices will be returned in @c selections array. The initial contents of this array will be used to - select the items when the dialog is shown. + select the items when the dialog is shown. If the user cancels the dialog, + the function returns -1 and @c selections array is left unchanged. You may pass the list of strings to choose from either using @c choices which is an array of @a n strings for the listbox or by using a single @@ -404,8 +482,14 @@ wxString wxGetSingleChoiceData(const wxString& message, characters) is centred; if @false, the message is left-justified. @header{wx/choicdlg.h} + + @beginWxPerlOnly + Use an array reference for the @a choices parameter. + In wxPerl there is no @a selections parameter; the function + returns an array containing the user selections. + @endWxPerlOnly */ -size_t wxGetMultipleChoices(wxArrayInt& selections, +int wxGetSelectedChoices(wxArrayInt& selections, const wxString& message, const wxString& caption, const wxArrayString& aChoices, @@ -415,7 +499,8 @@ size_t wxGetMultipleChoices(wxArrayInt& selections, bool centre = true, int width = 150, int height = 200); -size_t wxGetMultipleChoices(wxArrayInt& selections, + +int wxGetSelectedChoices(wxArrayInt& selections, const wxString& message, const wxString& caption, int n,