X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12f5e1e78fe906050ff2fee9529476db332633f0..63a65070911908802c27b52173c3306e93dd63bf:/interface/wx/radiobox.h?ds=sidebyside diff --git a/interface/wx/radiobox.h b/interface/wx/radiobox.h index 337fb69822..7122504010 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 ///////////////////////////////////////////////////////////////////////////// /** @@ -24,7 +24,7 @@ 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. @@ -32,9 +32,9 @@ @library{wxcore} @category{ctrl} - + @appearance{radiobox.png} - @see @ref overview_eventhandling, wxRadioButton, wxCheckBox + @see @ref overview_events, wxRadioButton, wxCheckBox */ class wxRadioBox : public wxControl, wxItemContainerImmutable { @@ -57,10 +57,10 @@ public: @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. @@ -69,7 +69,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 +78,10 @@ public: @param name Window name. + @beginWxPerlOnly + Not supported by wxPerl. + @endWxPerlOnly + @see Create(), wxValidator */ wxRadioBox(wxWindow* parent, wxWindowID id, @@ -88,7 +93,7 @@ public: 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. @@ -100,17 +105,19 @@ public: @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 @@ -118,6 +125,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, @@ -128,12 +139,12 @@ public: 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. */ - ~wxRadioBox(); + virtual ~wxRadioBox(); /** Creates the radiobox for two-step construction. See wxRadioBox() @@ -148,7 +159,7 @@ public: 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() @@ -162,7 +173,7 @@ public: 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. @@ -186,15 +197,16 @@ public: */ virtual bool Enable(unsigned int n, bool enable = true); - /** - Finds a button matching the given string, returning the position if found, or - -1 if not found. + Finds a button matching the given string, returning the position if found, + or @c wxNOT_FOUND if not found. @param string The string to find. + @param bCase + Should the search be case-sensitive? */ - int FindString(const wxString& string) const; + virtual int FindString(const wxString& string, bool bCase = false) const; /** Returns the number of columns in the radiobox. @@ -208,7 +220,7 @@ public: @param pt Point in client coordinates. */ - int GetItemFromPoint(const wxPoint pt) const; + virtual int GetItemFromPoint(const wxPoint& pt) const; /** Returns the helptext associated with the specified @a item if any or @c @@ -243,7 +255,7 @@ public: @param n The zero-based button position. */ - bool IsItemEnabled(unsigned int n) const; + virtual bool IsItemEnabled(unsigned int n) const; /** Returns @true if the item is currently shown or @false if it was hidden @@ -258,7 +270,7 @@ public: @param n The zero-based button position. */ - bool IsItemShown(unsigned int n) const; + virtual bool IsItemShown(unsigned int n) const; /** Sets the helptext for an item. Empty string erases any existing helptext. @@ -313,5 +325,5 @@ public: @endWxPythonOnly */ - virtual bool Show(unsigned int item, const bool show = true); + virtual bool Show(unsigned int item, bool show = true); };