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() ""
76 RefDoc(wxCheckBox, ""); // turn it off for the ctors
79 wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label,
80 const wxPoint& pos = wxDefaultPosition,
81 const wxSize& size = wxDefaultSize,
83 const wxValidator& validator = wxDefaultValidator,
84 const wxString& name = wxPyCheckBoxNameStr),
85 "Creates and shows a CheckBox control");
89 "Precreate a CheckBox for 2-phase creation.",
94 bool, Create(wxWindow* parent, wxWindowID id, const wxString& label,
95 const wxPoint& pos = wxDefaultPosition,
96 const wxSize& size = wxDefaultSize,
98 const wxValidator& validator = wxDefaultValidator,
99 const wxString& name = wxPyCheckBoxNameStr),
100 "Actually create the GUI CheckBox for 2-phase creation.");
105 "Gets the state of a 2-state CheckBox. Returns True if it is checked,\n"
110 "Similar to GetValue, but raises an exception if it is not a 2-state CheckBox.");
113 void, SetValue(const bool state),
114 "Set the state of a 2-state CheckBox. Pass True for checked,\n"
115 "False for unchecked.");
118 wxCheckBoxState, Get3StateValue() const,
119 "Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, wx.CHK_CHECKED when\n"
120 "it is checked and wx.CHK_UNDETERMINED when it's in the undetermined state.\n"
121 "Raises an exceptiion when the function is used with a 2-state CheckBox.");
124 void, Set3StateValue(wxCheckBoxState state),
125 "Sets the CheckBox to the given state. The state parameter can be\n"
126 "one of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED\n"
127 "(Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an\n"
128 "exception when the CheckBox is a 2-state checkbox and setting the state\n"
129 "to wx.CHK_UNDETERMINED.");
132 bool, Is3State() const,
133 "Returns whether or not the CheckBox is a 3-state CheckBox.");
136 bool, Is3rdStateAllowedForUser() const,
137 "Returns whether or not the user can set the CheckBox to the third state.");
141 //---------------------------------------------------------------------------
142 //---------------------------------------------------------------------------