]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_checkbox.i
Reworked how stock objects are initialized. They now have an
[wxWidgets.git] / wxPython / src / _checkbox.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _checkbox.i
3 // Purpose: SWIG interface defs for wxCheckBox
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 10-June-1998
8 // RCS-ID: $Id$
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 // Not a %module
14
15
16 //---------------------------------------------------------------------------
17 %newgroup;
18
19 %{
20 DECLARE_DEF_STRING(CheckBoxNameStr);
21 %}
22
23
24 enum {
25 // Determine whether to use a 3-state or 2-state
26 // checkbox. 3-state enables to differentiate
27 // between 'unchecked', 'checked' and 'undetermined'.
28 wxCHK_2STATE,
29 wxCHK_3STATE,
30
31
32 // If this style is set the user can set the checkbox to the
33 // undetermined state. If not set the undetermined set can only
34 // be set programmatically.
35 // This style can only be used with 3 state checkboxes.
36 wxCHK_ALLOW_3RD_STATE_FOR_USER,
37 };
38
39 enum wxCheckBoxState
40 {
41 wxCHK_UNCHECKED,
42 wxCHK_CHECKED,
43 wxCHK_UNDETERMINED /* 3-state checkbox only */
44 };
45
46
47 //---------------------------------------------------------------------------
48
49 class wxCheckBox : public wxControl
50 {
51 public:
52 %addtofunc wxCheckBox "self._setOORInfo(self)"
53 %addtofunc wxCheckBox() ""
54
55 wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label,
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize,
58 long style = 0,
59 const wxValidator& validator = wxDefaultValidator,
60 const wxString& name = wxPyCheckBoxNameStr);
61 %name(PreCheckBox)wxCheckBox();
62
63 bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
64 const wxPoint& pos = wxDefaultPosition,
65 const wxSize& size = wxDefaultSize,
66 long style = 0,
67 const wxValidator& validator = wxDefaultValidator,
68 const wxString& name = wxPyCheckBoxNameStr);
69
70 bool GetValue();
71 bool IsChecked();
72 void SetValue(const bool state);
73 wxCheckBoxState Get3StateValue() const;
74 void Set3StateValue(wxCheckBoxState state);
75 bool Is3State() const;
76 bool Is3rdStateAllowedForUser() const;
77 };
78
79 //---------------------------------------------------------------------------
80 //---------------------------------------------------------------------------