X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76e2b5703a0b8ae2f7210526defd2a07e3b81e0d..1b7751aaa9a86d76a850b9267bc0c201e3cea30f:/interface/wx/radiobox.h diff --git a/interface/wx/radiobox.h b/interface/wx/radiobox.h index 43326c3aeb..be54439d7f 100644 --- a/interface/wx/radiobox.h +++ b/interface/wx/radiobox.h @@ -3,7 +3,7 @@ // Purpose: interface of wxRadioBox // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -19,20 +19,17 @@ @style{wxRA_SPECIFY_COLS} The major dimension parameter refers to the maximum number of columns. - @style{wxRA_USE_CHECKBOX} - Use of the checkbox controls instead of radio buttons (currently - supported only on PalmOS) @endStyleTable @beginEventEmissionTable{wxCommandEvent} @event{EVT_RADIOBOX(id, func)} - Process a @c wxEVT_COMMAND_RADIOBOX_SELECTED event, when a radiobutton + Process a @c wxEVT_RADIOBOX event, when a radiobutton is clicked. @endEventTable @library{wxcore} @category{ctrl} - @appearance{radiobox.png} + @appearance{radiobox} @see @ref overview_events, wxRadioButton, wxCheckBox */ @@ -69,7 +66,8 @@ public: @param majorDimension Specifies the maximum number of rows (if style contains @c wxRA_SPECIFY_ROWS) or columns (if style contains - @c wxRA_SPECIFY_COLS) for a two-dimensional radiobox. + @c wxRA_SPECIFY_COLS) for a two-dimensional radiobox. The default + value of 0 means to use the number of items, i.e. @a n. @param style Window style. See wxRadioBox. @param validator @@ -77,6 +75,10 @@ public: @param name Window name. + @beginWxPerlOnly + Not supported by wxPerl. + @endWxPerlOnly + @see Create(), wxValidator */ wxRadioBox(wxWindow* parent, wxWindowID id, @@ -85,7 +87,7 @@ public: const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, - int majorDimension = 1, + int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); @@ -110,7 +112,9 @@ public: @param majorDimension Specifies the maximum number of rows (if style contains @c wxRA_SPECIFY_ROWS) or columns (if style contains - @c wxRA_SPECIFY_COLS) for a two-dimensional radiobox. + @c wxRA_SPECIFY_COLS) for a two-dimensional radiobox. The default + value of 0 means to use the number of items, i.e. number of + elements in @a choices. @param style Window style. See wxRadioBox. @param validator @@ -118,6 +122,10 @@ public: @param name Window name. + @beginWxPerlOnly + Use an array reference for the @a choices parameter. + @endWxPerlOnly + @see Create(), wxValidator */ wxRadioBox(wxWindow* parent, wxWindowID id, @@ -125,7 +133,7 @@ public: const wxPoint& pos, const wxSize& size, const wxArrayString& choices, - int majorDimension = 1, + int majorDimension = 0, long style = wxRA_SPECIFY_COLS, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr); @@ -174,15 +182,6 @@ public: @see wxWindow::Enable() - @beginWxPythonOnly - In place of a single overloaded method name, wxPython implements the following methods: - - @beginTable - @row2col{Enable(flag), Enables or disables the entire radiobox.} - @row2col{EnableItem(n\, flag), Enables or disables an individual button in the radiobox.} - @endTable - - @endWxPythonOnly */ virtual bool Enable(unsigned int n, bool enable = true); @@ -288,6 +287,14 @@ public: */ void SetItemToolTip(unsigned int item, const wxString& text); + /** + Sets the selection to the given item. + + Notice that a radio box always has selection, so @a n must be valid + here and passing @c wxNOT_FOUND is not allowed. + */ + virtual void SetSelection(int n); + /** Shows or hides individual buttons. @@ -303,16 +310,14 @@ public: @see wxWindow::Show() - @beginWxPythonOnly - In place of a single overloaded method name, wxPython implements the following methods: + */ + virtual bool Show(unsigned int item, bool show = true); - @beginTable - @row2col{Show(flag), Shows or hides the entire radiobox.} - @row2col{ShowItem(n\, flag), Shows or hides individual buttons.} - @endTable - @endWxPythonOnly + // pure virtuals that have implementations here + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& string); + virtual int GetSelection() const; - */ - virtual bool Show(unsigned int item, bool show = true); };