// Purpose: interface of wxRadioBox
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@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
- @beginEventTable{wxCommandEvent}
+ @beginEventEmissionTable{wxCommandEvent}
@event{EVT_RADIOBOX(id, func)}
Process a @c wxEVT_COMMAND_RADIOBOX_SELECTED event, when a radiobutton
is clicked.
@category{ctrl}
@appearance{radiobox.png}
- @see @ref overview_eventhandling, wxRadioButton, wxCheckBox
+ @see @ref overview_events, wxRadioButton, wxCheckBox
*/
class wxRadioBox : public wxControl, wxItemContainerImmutable
{
@param label
Label for the static box surrounding the radio buttons.
@param pos
- Window position. If @c wxDefaultPosition is specified then a
+ Window position. If ::wxDefaultPosition is specified then a
default position is chosen.
@param size
- Window size. If @c wxDefaultSize is specified then a default size
+ Window size. If ::wxDefaultSize is specified then a default size
is chosen.
@param n
Number of choices with which to initialize the radiobox.
@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
@param name
Window name.
+ @beginWxPerlOnly
+ Not supported by wxPerl.
+ @endWxPerlOnly
+
@see Create(), wxValidator
*/
wxRadioBox(wxWindow* parent, wxWindowID id,
int majorDimension = 0,
long style = wxRA_SPECIFY_COLS,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "radioBox");
+ const wxString& name = wxRadioBoxNameStr);
/**
Constructor, creating and showing a radiobox.
@param label
Label for the static box surrounding the radio buttons.
@param pos
- Window position. If @c wxDefaultPosition is specified then a
+ Window position. If ::wxDefaultPosition is specified then a
default position is chosen.
@param size
- Window size. If @c wxDefaultSize is specified then a default size
+ Window size. If ::wxDefaultSize is specified then a default size
is chosen.
@param choices
An array of choices with which to initialize the radiobox.
@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
@param name
Window name.
+ @beginWxPerlOnly
+ Use an array reference for the @a choices parameter.
+ @endWxPerlOnly
+
@see Create(), wxValidator
*/
wxRadioBox(wxWindow* parent, wxWindowID id,
int majorDimension = 0,
long style = wxRA_SPECIFY_COLS,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "radioBox");
+ const wxString& name = wxRadioBoxNameStr);
/**
Destructor, destroying the radiobox item.
int majorDimension = 0,
long style = wxRA_SPECIFY_COLS,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "radioBox");
+ const wxString& name = wxRadioBoxNameStr);
/**
Creates the radiobox for two-step construction. See wxRadioBox()
int majorDimension = 0,
long style = wxRA_SPECIFY_COLS,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "radioBox");
+ const wxString& name = wxRadioBoxNameStr);
/**
Enables or disables an individual button in the radiobox.
@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);
@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 void SetSelection(int n);
+ virtual int GetSelection() const;
- */
- virtual bool Show(unsigned int item, const bool show = true);
};