X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12f5e1e78fe906050ff2fee9529476db332633f0..36a0190ebd5bd9a7302f60f6dcd608b80574e21c:/interface/wx/radiobut.h diff --git a/interface/wx/radiobut.h b/interface/wx/radiobut.h index 0e8c56332d..706f05c293 100644 --- a/interface/wx/radiobut.h +++ b/interface/wx/radiobut.h @@ -2,8 +2,7 @@ // Name: radiobut.h // Purpose: interface of wxRadioButton // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -25,27 +24,23 @@ siblings trigger a hang bug in Windows (only). If this happens, add this style to mark the button as not belonging to a group, and implement the mutually-exclusive group behaviour yourself. - @style{wxRB_USE_CHECKBOX} - Use a checkbox button instead of radio button (currently supported - only on PalmOS). @endStyleTable - @beginEventTable{wxCommandEvent} + @beginEventEmissionTable{wxCommandEvent} @event{EVT_RADIOBUTTON(id, func)} - Process a @c wxEVT_COMMAND_RADIOBUTTON_SELECTED event, when the + Process a @c wxEVT_RADIOBUTTON event, when the radiobutton is clicked. @endEventTable @library{wxcore} @category{ctrl} - + @appearance{radiobutton} - @see @ref overview_eventhandling, wxRadioBox, wxCheckBox + @see @ref overview_events, wxRadioBox, wxCheckBox */ class wxRadioButton : public wxControl { public: - /** Default constructor. @@ -63,11 +58,11 @@ public: @param label Label for the radio button. @param pos - Window position. If @c wxDefaultPosition is specified then a default - position is chosen. + 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 - is chosen. + Window size. If ::wxDefaultSize is specified then a default size + is chosen. @param style Window style. See wxRadioButton. @param validator @@ -83,37 +78,40 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "radioButton"); + const wxString& name = wxRadioButtonNameStr); /** Destructor, destroying the radio button item. */ - ~wxRadioButton(); + virtual ~wxRadioButton(); /** Creates the choice for two-step construction. See wxRadioButton() for further details. */ - bool Create(wxWindow* parent, wxWindowID id, - const wxString& label, + bool Create(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "radioButton"); + const wxString& name = wxRadioButtonNameStr); /** - Returns @true if the radio button is depressed, @false otherwise. + Returns @true if the radio button is checked, @false otherwise. */ - bool GetValue() const; + virtual bool GetValue() const; /** - Sets the radio button to selected or deselected status. This does not cause a - @c wxEVT_COMMAND_RADIOBUTTON_SELECTED event to get emitted. + Sets the radio button to checked or unchecked status. This does not cause a + @c wxEVT_RADIOBUTTON event to get emitted. + + If the radio button belongs to a radio group exactly one button in the + group may be checked and so this method can be only called with @a + value set to @true. To uncheck a radio button in a group you must check + another button in the same group. @param value - @true to select, @false to deselect. + @true to check, @false to uncheck. */ - void SetValue(const bool value); + virtual void SetValue(bool value); };