1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _core.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13const int wxCHK_2STATE; 14const int wxCHK_3STATE; 15const int wxCHK_ALLOW_3RD_STATE_FOR_USER; 16enum wxCheckBoxState 17{ 18 wxCHK_UNCHECKED, 19 wxCHK_CHECKED, 20 wxCHK_UNDETERMINED 21}; 22 23const char* wxCheckBoxNameStr; 24 25class wxCheckBox : wxControl 26{ 27 %Docstring 28 CheckBox() 29 CheckBox(parent, id=ID_ANY, label=EmptyString, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=CheckBoxNameStr) 30 31 A checkbox is a labelled box which by default is either on (checkmark 32 is visible) or off (no checkmark). 33 %End 34 %TypeHeaderCode 35 #include <wx/checkbox.h> 36 %End 37 38public: 39 wxCheckBox(); 40 %PreMethodCode 41 if (!wxPyCheckForApp()) return NULL; 42 %End 43 44 wxCheckBox( 45 wxWindow * parent /TransferThis/, 46 wxWindowID id = wxID_ANY, 47 const wxString & label = wxEmptyString, 48 const wxPoint & pos = wxDefaultPosition, 49 const wxSize & size = wxDefaultSize, 50 long style = 0, 51 const wxValidator & validator = wxDefaultValidator, 52 const wxString & name = wxCheckBoxNameStr 53 ); 54 %PreMethodCode 55 if (!wxPyCheckForApp()) return NULL; 56 %End 57 58 ~wxCheckBox(); 59 60 bool Create( 61 wxWindow * parent /TransferThis/, 62 wxWindowID id = wxID_ANY, 63 const wxString & label = wxEmptyString, 64 const wxPoint & pos = wxDefaultPosition, 65 const wxSize & size = wxDefaultSize, 66 long style = 0, 67 const wxValidator & validator = wxDefaultValidator, 68 const wxString & name = wxCheckBoxNameStr 69 ); 70 %Docstring 71 Create(parent, id=ID_ANY, label=EmptyString, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=CheckBoxNameStr) -> bool 72 73 Creates the checkbox for two-step construction. 74 %End 75 76 bool GetValue() const; 77 %Docstring 78 GetValue() -> bool 79 80 Gets the state of a 2-state checkbox. 81 %End 82 83 wxCheckBoxState Get3StateValue() const; 84 %Docstring 85 Get3StateValue() -> CheckBoxState 86 87 Gets the state of a 3-state checkbox. 88 %End 89 90 bool Is3State() const; 91 %Docstring 92 Is3State() -> bool 93 94 Returns whether or not the checkbox is a 3-state checkbox. 95 %End 96 97 bool Is3rdStateAllowedForUser() const; 98 %Docstring 99 Is3rdStateAllowedForUser() -> bool 100 101 Returns whether or not the user can set the checkbox to the third 102 state. 103 %End 104 105 bool IsChecked() const; 106 %Docstring 107 IsChecked() -> bool 108 109 This is just a maybe more readable synonym for GetValue(): just as the 110 latter, it returns true if the checkbox is checked and false 111 otherwise. 112 %End 113 114 void SetValue( 115 bool state 116 ); 117 %Docstring 118 SetValue(state) 119 120 Sets the checkbox to the given state. 121 %End 122 123 void Set3StateValue( 124 wxCheckBoxState state 125 ); 126 %Docstring 127 Set3StateValue(state) 128 129 Sets the checkbox to the given state. 130 %End 131 132 public: 133 134 135 %Property(name=Value, get=GetValue, set=SetValue) 136 %Property(name=ThreeStateValue, get=Get3StateValue, set=Set3StateValue) 137 public: 138 virtual wxPoint GetClientAreaOrigin() const; 139 virtual bool Validate(); 140 virtual bool TransferDataToWindow(); 141 virtual bool TransferDataFromWindow(); 142 virtual void InitDialog(); 143 virtual bool AcceptsFocus() const; 144 virtual bool AcceptsFocusRecursively() const; 145 virtual bool AcceptsFocusFromKeyboard() const; 146 virtual void AddChild( wxWindowBase *child ); 147 virtual void RemoveChild( wxWindowBase *child ); 148 virtual void InheritAttributes(); 149 virtual bool ShouldInheritColours() const; 150 virtual void OnInternalIdle(); 151 virtual wxWindow *GetMainWindowOfCompositeControl(); 152 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 153 virtual void SetCanFocus(bool canFocus); 154 virtual bool Destroy(); 155 virtual void SetValidator( const wxValidator &validator ); 156 virtual wxValidator* GetValidator(); 157 158 159 protected: 160 virtual bool ProcessEvent(wxEvent & event); 161 virtual void DoEnable(bool enable); 162 virtual void DoGetPosition(int *x, int *y) const; 163 virtual void DoGetSize(int *width, int *height) const; 164 virtual void DoGetClientSize(int *width, int *height) const; 165 virtual wxSize DoGetBestSize() const; 166 virtual wxSize DoGetBestClientSize() const; 167 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 168 virtual void DoSetClientSize(int width, int height); 169 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 170 virtual wxSize DoGetBorderSize() const; 171 virtual void DoMoveWindow(int x, int y, int width, int height); 172 virtual void DoSetWindowVariant( wxWindowVariant variant); 173 virtual wxBorder GetDefaultBorder() const; 174 virtual wxBorder GetDefaultBorderForControl() const; 175 virtual void DoFreeze(); 176 virtual void DoThaw(); 177 virtual bool HasTransparentBackground(); 178 virtual bool TryBefore(wxEvent& event); 179 virtual bool TryAfter(wxEvent& event); 180 181 182 public: 183 184 185 static 186 wxVisualAttributes GetClassDefaultAttributes( 187 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 188 ); 189 %Docstring 190 GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes 191 %End 192 %PreMethodCode 193 if (!wxPyCheckForApp()) return NULL; 194 %End 195 196}; // end of class wxCheckBox 197 198 199 200//--------------------------------------------------------------------------- 201 202