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%ModuleHeaderCode 12#include <wx/tglbtn.h> 13%End 14 15 16//--------------------------------------------------------------------------- 17 18wxEventType wxEVT_TOGGLEBUTTON /PyName=wxEVT_TOGGLEBUTTON/; 19 20class wxToggleButton : wxAnyButton 21{ 22 %Docstring 23 ToggleButton() 24 ToggleButton(parent, id=ID_ANY, label=EmptyString, pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator, name=CheckBoxNameStr) 25 26 wxToggleButton is a button that stays pressed when clicked by the 27 user. 28 %End 29 %TypeHeaderCode 30 #include <wx/tglbtn.h> 31 %End 32 33public: 34 wxToggleButton(); 35 %PreMethodCode 36 if (!wxPyCheckForApp()) return NULL; 37 %End 38 39 wxToggleButton( 40 wxWindow * parent /TransferThis/, 41 wxWindowID id = wxID_ANY, 42 const wxString & label = wxEmptyString, 43 const wxPoint & pos = wxDefaultPosition, 44 const wxSize & size = wxDefaultSize, 45 long style = 0, 46 const wxValidator & val = wxDefaultValidator, 47 const wxString & name = wxCheckBoxNameStr 48 ); 49 %PreMethodCode 50 if (!wxPyCheckForApp()) return NULL; 51 %End 52 53 ~wxToggleButton(); 54 55 bool Create( 56 wxWindow * parent /TransferThis/, 57 wxWindowID id = wxID_ANY, 58 const wxString & label = wxEmptyString, 59 const wxPoint & pos = wxDefaultPosition, 60 const wxSize & size = wxDefaultSize, 61 long style = 0, 62 const wxValidator & val = wxDefaultValidator, 63 const wxString & name = wxCheckBoxNameStr 64 ); 65 %Docstring 66 Create(parent, id=ID_ANY, label=EmptyString, pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator, name=CheckBoxNameStr) -> bool 67 68 Creates the toggle button for two-step construction. 69 %End 70 71 bool GetValue() const; 72 %Docstring 73 GetValue() -> bool 74 75 Gets the state of the toggle button. 76 %End 77 78 void SetValue( 79 bool state 80 ); 81 %Docstring 82 SetValue(state) 83 84 Sets the toggle button to the given state. 85 %End 86 87 public: 88 virtual wxPoint GetClientAreaOrigin() const; 89 virtual bool Validate(); 90 virtual bool TransferDataToWindow(); 91 virtual bool TransferDataFromWindow(); 92 virtual void InitDialog(); 93 virtual bool AcceptsFocus() const; 94 virtual bool AcceptsFocusRecursively() const; 95 virtual bool AcceptsFocusFromKeyboard() const; 96 virtual void AddChild( wxWindowBase *child ); 97 virtual void RemoveChild( wxWindowBase *child ); 98 virtual void InheritAttributes(); 99 virtual bool ShouldInheritColours() const; 100 virtual void OnInternalIdle(); 101 virtual wxWindow *GetMainWindowOfCompositeControl(); 102 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 103 virtual void SetCanFocus(bool canFocus); 104 virtual bool Destroy(); 105 virtual void SetValidator( const wxValidator &validator ); 106 virtual wxValidator* GetValidator(); 107 108 109 protected: 110 virtual bool ProcessEvent(wxEvent & event); 111 virtual void DoEnable(bool enable); 112 virtual void DoGetPosition(int *x, int *y) const; 113 virtual void DoGetSize(int *width, int *height) const; 114 virtual void DoGetClientSize(int *width, int *height) const; 115 virtual wxSize DoGetBestSize() const; 116 virtual wxSize DoGetBestClientSize() const; 117 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 118 virtual void DoSetClientSize(int width, int height); 119 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 120 virtual wxSize DoGetBorderSize() const; 121 virtual void DoMoveWindow(int x, int y, int width, int height); 122 virtual void DoSetWindowVariant( wxWindowVariant variant); 123 virtual wxBorder GetDefaultBorder() const; 124 virtual wxBorder GetDefaultBorderForControl() const; 125 virtual void DoFreeze(); 126 virtual void DoThaw(); 127 virtual bool HasTransparentBackground(); 128 virtual bool TryBefore(wxEvent& event); 129 virtual bool TryAfter(wxEvent& event); 130 131 132 public: 133 134 135 static 136 wxVisualAttributes GetClassDefaultAttributes( 137 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 138 ); 139 %Docstring 140 GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes 141 %End 142 %PreMethodCode 143 if (!wxPyCheckForApp()) return NULL; 144 %End 145 146 public: 147 148 149 %Property(name=Value, get=GetValue, set=SetValue) 150}; // end of class wxToggleButton 151 152 153class wxBitmapToggleButton : wxToggleButton 154{ 155 %Docstring 156 BitmapToggleButton() 157 BitmapToggleButton(parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator, name=CheckBoxNameStr) 158 159 wxBitmapToggleButton is a wxToggleButton that contains a bitmap 160 instead of text. 161 %End 162 %TypeHeaderCode 163 #include <wx/tglbtn.h> 164 %End 165 166public: 167 wxBitmapToggleButton(); 168 %PreMethodCode 169 if (!wxPyCheckForApp()) return NULL; 170 %End 171 172 wxBitmapToggleButton( 173 wxWindow * parent /TransferThis/, 174 wxWindowID id = wxID_ANY, 175 const wxBitmap & label = wxNullBitmap, 176 const wxPoint & pos = wxDefaultPosition, 177 const wxSize & size = wxDefaultSize, 178 long style = 0, 179 const wxValidator & val = wxDefaultValidator, 180 const wxString & name = wxCheckBoxNameStr 181 ); 182 %PreMethodCode 183 if (!wxPyCheckForApp()) return NULL; 184 %End 185 186 bool Create( 187 wxWindow * parent /TransferThis/, 188 wxWindowID id = wxID_ANY, 189 const wxBitmap & label = wxNullBitmap, 190 const wxPoint & pos = wxDefaultPosition, 191 const wxSize & size = wxDefaultSize, 192 long style = 0, 193 const wxValidator & val = wxDefaultValidator, 194 const wxString & name = wxCheckBoxNameStr 195 ); 196 %Docstring 197 Create(parent, id=ID_ANY, label=NullBitmap, pos=DefaultPosition, size=DefaultSize, style=0, val=DefaultValidator, name=CheckBoxNameStr) -> bool 198 199 Create method for two-step construction. 200 %End 201 202 bool GetValue() const; 203 %Docstring 204 GetValue() -> bool 205 206 Gets the state of the toggle button. 207 %End 208 209 void SetValue( 210 bool state 211 ); 212 %Docstring 213 SetValue(state) 214 215 Sets the toggle button to the given state. 216 %End 217 218 public: 219 virtual wxPoint GetClientAreaOrigin() const; 220 virtual bool Validate(); 221 virtual bool TransferDataToWindow(); 222 virtual bool TransferDataFromWindow(); 223 virtual void InitDialog(); 224 virtual bool AcceptsFocus() const; 225 virtual bool AcceptsFocusRecursively() const; 226 virtual bool AcceptsFocusFromKeyboard() const; 227 virtual void AddChild( wxWindowBase *child ); 228 virtual void RemoveChild( wxWindowBase *child ); 229 virtual void InheritAttributes(); 230 virtual bool ShouldInheritColours() const; 231 virtual void OnInternalIdle(); 232 virtual wxWindow *GetMainWindowOfCompositeControl(); 233 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 234 virtual void SetCanFocus(bool canFocus); 235 virtual bool Destroy(); 236 virtual void SetValidator( const wxValidator &validator ); 237 virtual wxValidator* GetValidator(); 238 239 240 protected: 241 virtual bool ProcessEvent(wxEvent & event); 242 virtual void DoEnable(bool enable); 243 virtual void DoGetPosition(int *x, int *y) const; 244 virtual void DoGetSize(int *width, int *height) const; 245 virtual void DoGetClientSize(int *width, int *height) const; 246 virtual wxSize DoGetBestSize() const; 247 virtual wxSize DoGetBestClientSize() const; 248 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 249 virtual void DoSetClientSize(int width, int height); 250 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 251 virtual wxSize DoGetBorderSize() const; 252 virtual void DoMoveWindow(int x, int y, int width, int height); 253 virtual void DoSetWindowVariant( wxWindowVariant variant); 254 virtual wxBorder GetDefaultBorder() const; 255 virtual wxBorder GetDefaultBorderForControl() const; 256 virtual void DoFreeze(); 257 virtual void DoThaw(); 258 virtual bool HasTransparentBackground(); 259 virtual bool TryBefore(wxEvent& event); 260 virtual bool TryAfter(wxEvent& event); 261 262 263 public: 264 265 266 static 267 wxVisualAttributes GetClassDefaultAttributes( 268 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 269 ); 270 %Docstring 271 GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes 272 %End 273 %PreMethodCode 274 if (!wxPyCheckForApp()) return NULL; 275 %End 276 277 public: 278 279 280 %Property(name=Value, get=GetValue, set=SetValue) 281}; // end of class wxBitmapToggleButton 282 283 284%Extract(id=pycode_core) 285EVT_TOGGLEBUTTON = PyEventBinder(wxEVT_TOGGLEBUTTON, 1) 286 287# deprecated wxEVT alias 288wxEVT_COMMAND_TOGGLEBUTTON_CLICKED = wxEVT_TOGGLEBUTTON 289 290%End 291 292 293//--------------------------------------------------------------------------- 294 295