X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23ae751e16775126d7c3a4c70e33e28d0a52bfb7..97d13342cc2ac77e21c38115cc6ebecac930f92a:/interface/wx/tglbtn.h diff --git a/interface/wx/tglbtn.h b/interface/wx/tglbtn.h index 9bbfb588df..06e6e94104 100644 --- a/interface/wx/tglbtn.h +++ b/interface/wx/tglbtn.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: tglbtn.h -// Purpose: interface of wxBitmapToggleButton +// Purpose: interface of wxBitmapToggleButton, wxToggleButton // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -10,23 +10,21 @@ /** @class wxToggleButton - wxToggleButton is a button that stays pressed when clicked by the user. In - other words, it is similar to wxCheckBox in - functionality but looks like a wxButton. + wxToggleButton is a button that stays pressed when clicked by the user. + In other words, it is similar to wxCheckBox in functionality but looks like a wxButton. Since wxWidgets version 2.9.0 this control emits an update UI event. - You can see wxToggleButton in action in the sixth page of the - controls() sample. + You can see wxToggleButton in action in @ref page_samples_controls. - @beginEventTable{wxCommandEvent} + @beginEventEmissionTable{wxCommandEvent} @event{EVT_TOGGLEBUTTON(id, func)} - Handles a toggle button click event. + Handles a toggle button click event. @endEventTable @library{wxcore} @category{ctrl} - + @appearance{togglebutton.png} @see wxCheckBox, wxButton, wxBitmapToggleButton */ @@ -37,7 +35,7 @@ public: Default constructor. */ wxToggleButton(); - + /** Constructor, creating and showing a toggle button. @@ -48,14 +46,14 @@ public: @param label Text to be displayed next to the toggle button. @param pos - Toggle button position. If wxDefaultPosition is specified then a - default position is chosen. + Toggle button position. + If ::wxDefaultPosition is specified then a default position is chosen. @param size - Toggle button size. If wxDefaultSize is specified then a - default size is chosen. + Toggle button size. + If ::wxDefaultSize is specified then a default size is chosen. @param style Window style. See wxToggleButton. - @param validator + @param val Window validator. @param name Window name. @@ -68,7 +66,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val = wxDefaultValidator, - const wxString& name = "checkBox"); + const wxString& name = wxCheckBoxNameStr); /** Destructor, destroying the toggle button. @@ -76,8 +74,8 @@ public: virtual ~wxToggleButton(); /** - Creates the toggle button for two-step construction. See wxToggleButton() - for details. + Creates the toggle button for two-step construction. + See wxToggleButton() for details. */ bool Create(wxWindow* parent, wxWindowID id, const wxString& label, @@ -85,23 +83,23 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val = wxDefaultValidator, - const wxString& name = "checkBox"); + const wxString& name = wxCheckBoxNameStr); /** Gets the state of the toggle button. @return Returns @true if it is pressed, @false otherwise. */ - bool GetValue() const; + virtual bool GetValue() const; /** - Sets the toggle button to the given state. This does not cause a - @c EVT_TOGGLEBUTTON event to be emitted. + Sets the toggle button to the given state. + This does not cause a @c EVT_TOGGLEBUTTON event to be emitted. @param state If @true, the button is pressed. */ - void SetValue(bool state); + virtual void SetValue(bool state); }; @@ -113,14 +111,14 @@ public: This control emits an update UI event. - @beginEventTable{wxCommandEvent} + @beginEventEmissionTable{wxCommandEvent} @event{EVT_TOGGLEBUTTON(id, func)} - Handles a toggle button click event. + Handles a toggle button click event. @endEventTable @library{wxcore} @category{ctrl} - + @appearance{bitmaptogglebutton.png} */ class wxBitmapToggleButton : public wxControl { @@ -129,7 +127,7 @@ public: Default constructor. */ wxBitmapToggleButton(); - + /** Constructor, creating and showing a toggle button with the bitmap @e label. Internally calls Create(). @@ -140,7 +138,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val = wxDefaultValidator, - const wxString& name = "checkBox"); + const wxString& name = wxCheckBoxNameStr); /** Create method for two-step construction. @@ -151,7 +149,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& val = wxDefaultValidator, - const wxString& name = "checkBox"); + const wxString& name = wxCheckBoxNameStr); /** Gets the state of the toggle button. @@ -161,8 +159,8 @@ public: virtual bool GetValue() const; /** - Sets the toggle button to the given state. This does not cause a - @c EVT_TOGGLEBUTTON event to be emitted. + Sets the toggle button to the given state. + This does not cause a @c EVT_TOGGLEBUTTON event to be emitted. @param state If @true, the button is pressed.