]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_checkbox.i
New wxDesigner-less version of the MimeTypesManager demo
[wxWidgets.git] / wxPython / src / _checkbox.i
CommitLineData
d14a1e28
RD
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
b2dc1044 19MAKE_CONST_WXSTRING(CheckBoxNameStr);
d14a1e28
RD
20
21
22enum {
23 // Determine whether to use a 3-state or 2-state
24 // checkbox. 3-state enables to differentiate
25 // between 'unchecked', 'checked' and 'undetermined'.
26 wxCHK_2STATE,
27 wxCHK_3STATE,
28
29
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,
35};
36
37enum wxCheckBoxState
38{
39 wxCHK_UNCHECKED,
40 wxCHK_CHECKED,
41 wxCHK_UNDETERMINED /* 3-state checkbox only */
42};
43
44
45//---------------------------------------------------------------------------
46
47class wxCheckBox : public wxControl
48{
49public:
50 %addtofunc wxCheckBox "self._setOORInfo(self)"
51 %addtofunc wxCheckBox() ""
52
53 wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label,
54 const wxPoint& pos = wxDefaultPosition,
55 const wxSize& size = wxDefaultSize,
56 long style = 0,
57 const wxValidator& validator = wxDefaultValidator,
58 const wxString& name = wxPyCheckBoxNameStr);
59 %name(PreCheckBox)wxCheckBox();
60
61 bool Create(wxWindow* parent, wxWindowID id, const wxString& label,
62 const wxPoint& pos = wxDefaultPosition,
63 const wxSize& size = wxDefaultSize,
64 long style = 0,
65 const wxValidator& validator = wxDefaultValidator,
66 const wxString& name = wxPyCheckBoxNameStr);
67
68 bool GetValue();
69 bool IsChecked();
70 void SetValue(const bool state);
71 wxCheckBoxState Get3StateValue() const;
72 void Set3StateValue(wxCheckBoxState state);
73 bool Is3State() const;
74 bool Is3rdStateAllowedForUser() const;
75};
76
77//---------------------------------------------------------------------------
78//---------------------------------------------------------------------------