1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface defs for wxCheckBox
7 // Created: 10-June-1998
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
19 MAKE_CONST_WXSTRING(CheckBoxNameStr);
23 // Determine whether to use a 3-state or 2-state
24 // checkbox. 3-state enables to differentiate
25 // between 'unchecked', 'checked' and 'undetermined'.
30 // If this style is set the user can set the checkbox to the
31 // undetermined state. If not set the undetermined set can only
32 // be set programmatically.
33 // This style can only be used with 3 state checkboxes.
34 wxCHK_ALLOW_3RD_STATE_FOR_USER,
41 wxCHK_UNDETERMINED /* 3-state checkbox only */
45 //---------------------------------------------------------------------------
48 "A checkbox is a labelled box which by default is either on (checkmark is
49 visible) or off (no checkmark). Optionally (When the wxCHK_3STATE style flag
50 is set) it can have a third state, called the mixed or undetermined
51 state. Often this is used as a \"Does Not Apply\" state.");
55 wx.CHK_2STATE: Create a 2-state checkbox. This is the default.
56 wx.CHK_3STATE: Create a 3-state checkbox.
57 wx.CHK_ALLOW_3RD_STATE_FOR_USER: By default a user can't set a 3-state
58 checkbox to the third state. It can only
59 be done from code. Using this flags
60 allows the user to set the checkbox to
61 the third state by clicking.
62 wx.ALIGN_RIGHT: Makes the text appear on the left of the checkbox.
65 EVT_CHECKBOX: Sent when checkbox is clicked.
70 class wxCheckBox : public wxControl
73 %pythonAppend wxCheckBox "self._setOORInfo(self)"
74 %pythonAppend wxCheckBox() ""
77 wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label,
78 const wxPoint& pos = wxDefaultPosition,
79 const wxSize& size = wxDefaultSize,
81 const wxValidator& validator = wxDefaultValidator,
82 const wxString& name = wxPyCheckBoxNameStr),
83 "Creates and shows a CheckBox control");
87 "Precreate a CheckBox for 2-phase creation.",
92 bool, Create(wxWindow* parent, wxWindowID id, const wxString& label,
93 const wxPoint& pos = wxDefaultPosition,
94 const wxSize& size = wxDefaultSize,
96 const wxValidator& validator = wxDefaultValidator,
97 const wxString& name = wxPyCheckBoxNameStr),
98 "Actually create the GUI CheckBox for 2-phase creation.");
103 "Gets the state of a 2-state CheckBox. Returns True if it is checked,\n"
108 "Similar to GetValue, but raises an exception if it is not a 2-state CheckBox.");
111 void, SetValue(const bool state),
112 "Set the state of a 2-state CheckBox. Pass True for checked,\n"
113 "False for unchecked.");
116 wxCheckBoxState, Get3StateValue() const,
117 "Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when\n"
118 "it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state.\n"
119 "Raises an exceptiion when the function is used with a 2-state CheckBox.");
122 void, Set3StateValue(wxCheckBoxState state),
123 "Sets the CheckBox to the given state. The state parameter can be\n"
124 "one of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED\n"
125 "(Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an\n"
126 "exception when the CheckBox is a 2-state checkbox and setting the state\n"
127 "to wx.CHK_UNDETERMINED.");
130 bool, Is3State() const,
131 "Returns whether or not the CheckBox is a 3-state CheckBox.");
134 bool, Is3rdStateAllowedForUser() const,
135 "Returns whether or not the user can set the CheckBox to the third state.");
139 //---------------------------------------------------------------------------
140 //---------------------------------------------------------------------------