wxcheckboxa 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. derived from
wxcontrol include files <wx/checkbox.h> window styles
see also window styles overview. event handling
see also members
wxcheckbox::wxcheckbox
wxcheckbox::wxcheckboxwxcheckbox() default constructor. 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") constructor, creating and showing a checkbox. parameters parent
id
label
pos
size
style
validator
name
see also wxcheckbox::create, wxvalidator
wxcheckbox::~wxcheckbox~wxcheckbox() destructor, destroying the checkbox.
wxcheckbox::createbool create(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") creates the checkbox for two-step construction. see wxcheckbox::wxcheckbox for details.
wxcheckbox::getvaluebool getvalue() const gets the state of a 2-state checkbox. return value returns true if it is checked, false otherwise.
wxcheckbox::get3statevaluewxcheckboxstate get3statevalue() const gets the state of a 3-state checkbox. return value 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.
wxcheckbox::is3rdstateallowedforuserbool is3rdstateallowedforuser() const returns whether or not the user can set the checkbox to the third state. return value 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.
wxcheckbox::is3statebool is3state() const returns whether or not the checkbox is a 3-state checkbox. return value returns true if this checkbox is a 3-state checkbox, false if it's a 2-state checkbox.
wxcheckbox::ischeckedbool ischecked() const 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.
wxcheckbox::setvaluevoid setvalue(bool state) sets the checkbox to the given state. this does not cause a wxevt_command_checkbox_clicked event to get emitted. parameters state
wxcheckbox::set3statevaluevoid set3statevalue(const wxcheckboxstate state) sets the checkbox to the given state. this does not cause a wxevt_command_checkbox_clicked event to get emitted. parameters state
|