X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23324ae1c7938ba904770fc456d3c07764b9c5e9..628e155d8c70da0f962289cf1e1dea3699255707:/interface/checkbox.h diff --git a/interface/checkbox.h b/interface/checkbox.h index 12d212ccc3..2b99bc2467 100644 --- a/interface/checkbox.h +++ b/interface/checkbox.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: checkbox.h -// Purpose: documentation for wxCheckBox class +// Purpose: interface of wxCheckBox // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -9,12 +9,12 @@ /** @class wxCheckBox @wxheader{checkbox.h} - + A checkbox is a labelled box which by default is either on (checkmark is visible) or off (no checkmark). Optionally (when the wxCHK_3STATE style flag is set) it can have a third state, called the mixed or undetermined state. Often this is used as a "Does Not Apply" state. - + @beginStyleTable @style{wxCHK_2STATE}: Create a 2-state checkbox. This is the default. @@ -28,19 +28,18 @@ @style{wxALIGN_RIGHT}: Makes the text appear on the left of the checkbox. @endStyleTable - + @beginEventTable - @event{EVT_CHECKBOX(id\, func)}: + @event{EVT_CHECKBOX(id, func)}: Process a wxEVT_COMMAND_CHECKBOX_CLICKED event, when the checkbox is clicked. @endEventTable - + @library{wxcore} @category{ctrl} @appearance{checkbox.png} - - @seealso - wxRadioButton, wxCommandEvent + + @see wxRadioButton, wxCommandEvent */ class wxCheckBox : public wxControl { @@ -48,43 +47,36 @@ public: //@{ /** Constructor, creating and showing a checkbox. - - @param parent - Parent window. Must not be @NULL. - - @param id - Checkbox identifier. The value wxID_ANY indicates a default value. - - @param label - Text to be displayed next to the checkbox. - - @param pos - Checkbox position. If wxDefaultPosition is specified then a default + + @param parent + Parent window. Must not be @NULL. + @param id + Checkbox identifier. The value wxID_ANY indicates a default value. + @param label + Text to be displayed next to the checkbox. + @param pos + Checkbox position. If wxDefaultPosition is specified then a default position is chosen. - - @param size - Checkbox size. If wxDefaultSize is specified then a default size is - chosen. - - @param style - Window style. See wxCheckBox. - - @param validator - Window validator. - - @param name - Window name. - - @sa Create(), wxValidator + @param size + Checkbox size. If wxDefaultSize is specified then a default + size is chosen. + @param style + Window style. See wxCheckBox. + @param validator + Window validator. + @param name + Window name. + + @see Create(), wxValidator */ wxCheckBox(); - wxCheckBox(wxWindow* parent, wxWindowID id, - const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxValidator& val, - const wxString& name = "checkBox"); + wxCheckBox(wxWindow* parent, wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& val = wxDefaultValidator, + const wxString& name = "checkBox"); //@} /** @@ -101,57 +93,58 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& val, + const wxValidator& val = wxDefaultValidator, const wxString& name = "checkBox"); /** Gets the state of a 3-state checkbox. - + @returns Returns wxCHK_UNCHECKED when the checkbox is unchecked, - wxCHK_CHECKED when it is checked and - wxCHK_UNDETERMINED when it's in the undetermined - state. Asserts when the function is used with a - 2-state checkbox. + wxCHK_CHECKED when it is checked and + wxCHK_UNDETERMINED when it's in the undetermined state. + Asserts when the function is used with a 2-state + checkbox. */ - wxCheckBoxState Get3StateValue(); + wxCheckBoxState Get3StateValue() const; /** Gets the state of a 2-state checkbox. - + @returns Returns @true if it is checked, @false otherwise. */ - bool GetValue(); + bool GetValue() const; /** Returns whether or not the checkbox is a 3-state checkbox. - + @returns Returns @true if this checkbox is a 3-state checkbox, @false if - it's a 2-state checkbox. + it's a 2-state checkbox. */ - bool Is3State(); + bool Is3State() const; /** Returns whether or not the user can set the checkbox to the third state. - + @returns Returns @true if the user can set the third state of this - checkbox, @false if it can only be set - programmatically or if it's a 2-state checkbox. + checkbox, @false if it can only be set programmatically + or if it's a 2-state checkbox. */ - bool Is3rdStateAllowedForUser(); + bool Is3rdStateAllowedForUser() const; /** - This is just a maybe more readable synonym for - GetValue(): just as the latter, it returns + This is just a maybe more readable synonym for + GetValue(): just as the latter, it returns @true if the checkbox is checked and @false otherwise. */ - bool IsChecked(); + bool IsChecked() const; /** Sets the checkbox to the given state. This does not cause a wxEVT_COMMAND_CHECKBOX_CLICKED event to get emitted. - - @param state - If @true, the check is on, otherwise it is off. + + @param state + If @true, the check is on, otherwise it is off. */ void SetValue(bool state); }; +