]>
Commit | Line | Data |
---|---|---|
70551f47 | 1 | # This file was created automatically by SWIG. |
d14a1e28 RD |
2 | # Don't modify this file, modify the SWIG interface instead. |
3 | ||
54f9ee45 | 4 | import _controls_ |
d14a1e28 | 5 | |
54f9ee45 RD |
6 | import _core |
7 | wx = _core | |
d14a1e28 RD |
8 | #--------------------------------------------------------------------------- |
9 | ||
54f9ee45 RD |
10 | BU_LEFT = _controls_.BU_LEFT |
11 | BU_TOP = _controls_.BU_TOP | |
12 | BU_RIGHT = _controls_.BU_RIGHT | |
13 | BU_BOTTOM = _controls_.BU_BOTTOM | |
14 | BU_EXACTFIT = _controls_.BU_EXACTFIT | |
15 | BU_AUTODRAW = _controls_.BU_AUTODRAW | |
16 | class Button(_core.Control): | |
0df68c9f RD |
17 | """ |
18 | A button is a control that contains a text string, and is one of the most | |
19 | common elements of a GUI. It may be placed on a dialog box or panel, or | |
20 | indeed almost any other window. | |
21 | """ | |
e811c8ce RD |
22 | def __repr__(self): |
23 | return "<%s.%s; proxy of C++ wxButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 24 | def __init__(self, *args, **kwargs): |
0df68c9f | 25 | """ |
248ed943 RD |
26 | __init__(self, Window parent, int id=-1, String label=EmptyString, |
27 | Point pos=DefaultPosition, Size size=DefaultSize, | |
28 | long style=0, Validator validator=DefaultValidator, | |
29 | String name=ButtonNameStr) -> Button | |
0df68c9f RD |
30 | |
31 | Create and show a button. | |
32 | """ | |
54f9ee45 | 33 | newobj = _controls_.new_Button(*args, **kwargs) |
d14a1e28 RD |
34 | self.this = newobj.this |
35 | self.thisown = 1 | |
36 | del newobj.thisown | |
37 | self._setOORInfo(self) | |
e811c8ce RD |
38 | |
39 | def Create(*args, **kwargs): | |
0df68c9f | 40 | """ |
248ed943 RD |
41 | Create(self, Window parent, int id=-1, String label=EmptyString, |
42 | Point pos=DefaultPosition, Size size=DefaultSize, | |
43 | long style=0, Validator validator=DefaultValidator, | |
44 | String name=ButtonNameStr) -> bool | |
0df68c9f RD |
45 | |
46 | Acutally create the GUI Button for 2-phase creation. | |
47 | """ | |
54f9ee45 | 48 | return _controls_.Button_Create(*args, **kwargs) |
e811c8ce RD |
49 | |
50 | def SetDefault(*args, **kwargs): | |
0df68c9f | 51 | """ |
a95a7133 | 52 | SetDefault(self) |
1e0c8722 | 53 | |
0df68c9f RD |
54 | This sets the button to be the default item for the panel or dialog box. |
55 | """ | |
54f9ee45 | 56 | return _controls_.Button_SetDefault(*args, **kwargs) |
e811c8ce RD |
57 | |
58 | def GetDefaultSize(*args, **kwargs): | |
66c033b4 RD |
59 | """ |
60 | GetDefaultSize() -> Size | |
61 | ||
62 | Returns the default button size for this platform. | |
63 | """ | |
54f9ee45 | 64 | return _controls_.Button_GetDefaultSize(*args, **kwargs) |
e811c8ce RD |
65 | |
66 | GetDefaultSize = staticmethod(GetDefaultSize) | |
22bfe96c | 67 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
68 | """ |
69 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
70 | ||
71 | Get the default attributes for this class. This is useful if you want | |
72 | to use the same font or colour in your own control as in a standard | |
73 | control -- which is a much better idea than hard coding specific | |
74 | colours or fonts which might look completely out of place on the | |
75 | user's system, especially if it uses themes. | |
76 | ||
77 | The variant parameter is only relevant under Mac currently and is | |
78 | ignore under other platforms. Under Mac, it will change the size of | |
79 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
80 | this. | |
81 | """ | |
22bfe96c RD |
82 | return _controls_.Button_GetClassDefaultAttributes(*args, **kwargs) |
83 | ||
84 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 85 | |
d14a1e28 RD |
86 | class ButtonPtr(Button): |
87 | def __init__(self, this): | |
88 | self.this = this | |
89 | if not hasattr(self,"thisown"): self.thisown = 0 | |
90 | self.__class__ = Button | |
54f9ee45 RD |
91 | _controls_.Button_swigregister(ButtonPtr) |
92 | cvar = _controls_.cvar | |
b2dc1044 | 93 | ButtonNameStr = cvar.ButtonNameStr |
70551f47 | 94 | |
d14a1e28 | 95 | def PreButton(*args, **kwargs): |
0df68c9f RD |
96 | """ |
97 | PreButton() -> Button | |
1e0c8722 | 98 | |
0df68c9f RD |
99 | Precreate a Button for 2-phase creation. |
100 | """ | |
54f9ee45 | 101 | val = _controls_.new_PreButton(*args, **kwargs) |
d14a1e28 RD |
102 | val.thisown = 1 |
103 | return val | |
70551f47 | 104 | |
e811c8ce | 105 | def Button_GetDefaultSize(*args, **kwargs): |
66c033b4 RD |
106 | """ |
107 | Button_GetDefaultSize() -> Size | |
108 | ||
109 | Returns the default button size for this platform. | |
110 | """ | |
54f9ee45 | 111 | return _controls_.Button_GetDefaultSize(*args, **kwargs) |
a323d3bd | 112 | |
22bfe96c | 113 | def Button_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
114 | """ |
115 | Button_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
116 | ||
117 | Get the default attributes for this class. This is useful if you want | |
118 | to use the same font or colour in your own control as in a standard | |
119 | control -- which is a much better idea than hard coding specific | |
120 | colours or fonts which might look completely out of place on the | |
121 | user's system, especially if it uses themes. | |
122 | ||
123 | The variant parameter is only relevant under Mac currently and is | |
124 | ignore under other platforms. Under Mac, it will change the size of | |
125 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
126 | this. | |
127 | """ | |
22bfe96c RD |
128 | return _controls_.Button_GetClassDefaultAttributes(*args, **kwargs) |
129 | ||
d14a1e28 | 130 | class BitmapButton(Button): |
98e665d3 RD |
131 | """ |
132 | A Button that contains a bitmap. A bitmap button can be supplied with a | |
66c033b4 | 133 | single bitmap, and wxWidgets will draw all button states using this bitmap. If |
98e665d3 RD |
134 | the application needs more control, additional bitmaps for the selected state, |
135 | unpressed focused state, and greyed-out state may be supplied. | |
98e665d3 | 136 | """ |
e811c8ce RD |
137 | def __repr__(self): |
138 | return "<%s.%s; proxy of C++ wxBitmapButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 139 | def __init__(self, *args, **kwargs): |
0df68c9f | 140 | """ |
248ed943 RD |
141 | __init__(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, |
142 | Point pos=DefaultPosition, Size size=DefaultSize, | |
143 | long style=BU_AUTODRAW, Validator validator=DefaultValidator, | |
b2dc1044 | 144 | String name=ButtonNameStr) -> BitmapButton |
0df68c9f | 145 | |
98e665d3 | 146 | Create and show a button with a bitmap for the label. |
0df68c9f | 147 | """ |
54f9ee45 | 148 | newobj = _controls_.new_BitmapButton(*args, **kwargs) |
d14a1e28 RD |
149 | self.this = newobj.this |
150 | self.thisown = 1 | |
151 | del newobj.thisown | |
152 | self._setOORInfo(self) | |
e811c8ce RD |
153 | |
154 | def Create(*args, **kwargs): | |
0df68c9f | 155 | """ |
248ed943 RD |
156 | Create(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, |
157 | Point pos=DefaultPosition, Size size=DefaultSize, | |
158 | long style=BU_AUTODRAW, Validator validator=DefaultValidator, | |
b2dc1044 | 159 | String name=ButtonNameStr) -> bool |
0df68c9f RD |
160 | |
161 | Acutally create the GUI BitmapButton for 2-phase creation. | |
162 | """ | |
54f9ee45 | 163 | return _controls_.BitmapButton_Create(*args, **kwargs) |
e811c8ce RD |
164 | |
165 | def GetBitmapLabel(*args, **kwargs): | |
0df68c9f | 166 | """ |
a95a7133 | 167 | GetBitmapLabel(self) -> Bitmap |
1e0c8722 | 168 | |
0df68c9f RD |
169 | Returns the label bitmap (the one passed to the constructor). |
170 | """ | |
54f9ee45 | 171 | return _controls_.BitmapButton_GetBitmapLabel(*args, **kwargs) |
e811c8ce RD |
172 | |
173 | def GetBitmapDisabled(*args, **kwargs): | |
0df68c9f | 174 | """ |
a95a7133 | 175 | GetBitmapDisabled(self) -> Bitmap |
1e0c8722 | 176 | |
0df68c9f RD |
177 | Returns the bitmap for the disabled state. |
178 | """ | |
54f9ee45 | 179 | return _controls_.BitmapButton_GetBitmapDisabled(*args, **kwargs) |
e811c8ce RD |
180 | |
181 | def GetBitmapFocus(*args, **kwargs): | |
0df68c9f | 182 | """ |
a95a7133 | 183 | GetBitmapFocus(self) -> Bitmap |
1e0c8722 | 184 | |
0df68c9f RD |
185 | Returns the bitmap for the focused state. |
186 | """ | |
54f9ee45 | 187 | return _controls_.BitmapButton_GetBitmapFocus(*args, **kwargs) |
e811c8ce RD |
188 | |
189 | def GetBitmapSelected(*args, **kwargs): | |
0df68c9f | 190 | """ |
a95a7133 | 191 | GetBitmapSelected(self) -> Bitmap |
1e0c8722 | 192 | |
0df68c9f RD |
193 | Returns the bitmap for the selected state. |
194 | """ | |
54f9ee45 | 195 | return _controls_.BitmapButton_GetBitmapSelected(*args, **kwargs) |
e811c8ce RD |
196 | |
197 | def SetBitmapDisabled(*args, **kwargs): | |
0df68c9f | 198 | """ |
a95a7133 | 199 | SetBitmapDisabled(self, Bitmap bitmap) |
1e0c8722 | 200 | |
0df68c9f RD |
201 | Sets the bitmap for the disabled button appearance. |
202 | """ | |
54f9ee45 | 203 | return _controls_.BitmapButton_SetBitmapDisabled(*args, **kwargs) |
e811c8ce RD |
204 | |
205 | def SetBitmapFocus(*args, **kwargs): | |
0df68c9f | 206 | """ |
a95a7133 | 207 | SetBitmapFocus(self, Bitmap bitmap) |
1e0c8722 | 208 | |
0df68c9f RD |
209 | Sets the bitmap for the button appearance when it has the keyboard focus. |
210 | """ | |
54f9ee45 | 211 | return _controls_.BitmapButton_SetBitmapFocus(*args, **kwargs) |
e811c8ce RD |
212 | |
213 | def SetBitmapSelected(*args, **kwargs): | |
0df68c9f | 214 | """ |
a95a7133 | 215 | SetBitmapSelected(self, Bitmap bitmap) |
1e0c8722 | 216 | |
0df68c9f RD |
217 | Sets the bitmap for the selected (depressed) button appearance. |
218 | """ | |
54f9ee45 | 219 | return _controls_.BitmapButton_SetBitmapSelected(*args, **kwargs) |
e811c8ce RD |
220 | |
221 | def SetBitmapLabel(*args, **kwargs): | |
0df68c9f | 222 | """ |
a95a7133 | 223 | SetBitmapLabel(self, Bitmap bitmap) |
1e0c8722 | 224 | |
0df68c9f RD |
225 | Sets the bitmap label for the button. This is the bitmap used for the |
226 | unselected state, and for all other states if no other bitmaps are provided. | |
227 | """ | |
54f9ee45 | 228 | return _controls_.BitmapButton_SetBitmapLabel(*args, **kwargs) |
e811c8ce RD |
229 | |
230 | def SetMargins(*args, **kwargs): | |
a95a7133 | 231 | """SetMargins(self, int x, int y)""" |
54f9ee45 | 232 | return _controls_.BitmapButton_SetMargins(*args, **kwargs) |
e811c8ce RD |
233 | |
234 | def GetMarginX(*args, **kwargs): | |
a95a7133 | 235 | """GetMarginX(self) -> int""" |
54f9ee45 | 236 | return _controls_.BitmapButton_GetMarginX(*args, **kwargs) |
e811c8ce RD |
237 | |
238 | def GetMarginY(*args, **kwargs): | |
a95a7133 | 239 | """GetMarginY(self) -> int""" |
54f9ee45 | 240 | return _controls_.BitmapButton_GetMarginY(*args, **kwargs) |
e811c8ce | 241 | |
4120ef2b | 242 | |
d14a1e28 RD |
243 | class BitmapButtonPtr(BitmapButton): |
244 | def __init__(self, this): | |
70551f47 | 245 | self.this = this |
d14a1e28 RD |
246 | if not hasattr(self,"thisown"): self.thisown = 0 |
247 | self.__class__ = BitmapButton | |
54f9ee45 | 248 | _controls_.BitmapButton_swigregister(BitmapButtonPtr) |
d14a1e28 RD |
249 | |
250 | def PreBitmapButton(*args, **kwargs): | |
0df68c9f RD |
251 | """ |
252 | PreBitmapButton() -> BitmapButton | |
1e0c8722 | 253 | |
0df68c9f RD |
254 | Precreate a BitmapButton for 2-phase creation. |
255 | """ | |
54f9ee45 | 256 | val = _controls_.new_PreBitmapButton(*args, **kwargs) |
d14a1e28 RD |
257 | val.thisown = 1 |
258 | return val | |
259 | ||
260 | #--------------------------------------------------------------------------- | |
261 | ||
54f9ee45 RD |
262 | CHK_2STATE = _controls_.CHK_2STATE |
263 | CHK_3STATE = _controls_.CHK_3STATE | |
264 | CHK_ALLOW_3RD_STATE_FOR_USER = _controls_.CHK_ALLOW_3RD_STATE_FOR_USER | |
265 | CHK_UNCHECKED = _controls_.CHK_UNCHECKED | |
266 | CHK_CHECKED = _controls_.CHK_CHECKED | |
267 | CHK_UNDETERMINED = _controls_.CHK_UNDETERMINED | |
268 | class CheckBox(_core.Control): | |
fcafa8a9 | 269 | """ |
66c033b4 RD |
270 | A checkbox is a labelled box which by default is either on (the |
271 | checkmark is visible) or off (no checkmark). Optionally (When the | |
272 | wx.CHK_3STATE style flag is set) it can have a third state, called the | |
273 | mixed or undetermined state. Often this is used as a "Does Not | |
274 | Apply" state. | |
fcafa8a9 | 275 | """ |
e811c8ce RD |
276 | def __repr__(self): |
277 | return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 278 | def __init__(self, *args, **kwargs): |
0df68c9f | 279 | """ |
248ed943 RD |
280 | __init__(self, Window parent, int id=-1, String label=EmptyString, |
281 | Point pos=DefaultPosition, Size size=DefaultSize, | |
282 | long style=0, Validator validator=DefaultValidator, | |
283 | String name=CheckBoxNameStr) -> CheckBox | |
fcafa8a9 RD |
284 | |
285 | Creates and shows a CheckBox control | |
0df68c9f | 286 | """ |
54f9ee45 | 287 | newobj = _controls_.new_CheckBox(*args, **kwargs) |
d14a1e28 | 288 | self.this = newobj.this |
56f5d962 | 289 | self.thisown = 1 |
d14a1e28 | 290 | del newobj.thisown |
0220cbc1 | 291 | self._setOORInfo(self) |
e811c8ce RD |
292 | |
293 | def Create(*args, **kwargs): | |
0df68c9f | 294 | """ |
248ed943 RD |
295 | Create(self, Window parent, int id=-1, String label=EmptyString, |
296 | Point pos=DefaultPosition, Size size=DefaultSize, | |
297 | long style=0, Validator validator=DefaultValidator, | |
298 | String name=CheckBoxNameStr) -> bool | |
fcafa8a9 RD |
299 | |
300 | Actually create the GUI CheckBox for 2-phase creation. | |
0df68c9f | 301 | """ |
54f9ee45 | 302 | return _controls_.CheckBox_Create(*args, **kwargs) |
e811c8ce RD |
303 | |
304 | def GetValue(*args, **kwargs): | |
fcafa8a9 | 305 | """ |
a95a7133 | 306 | GetValue(self) -> bool |
fcafa8a9 RD |
307 | |
308 | Gets the state of a 2-state CheckBox. Returns True if it is checked, | |
309 | False otherwise. | |
310 | """ | |
54f9ee45 | 311 | return _controls_.CheckBox_GetValue(*args, **kwargs) |
e811c8ce RD |
312 | |
313 | def IsChecked(*args, **kwargs): | |
fcafa8a9 | 314 | """ |
a95a7133 | 315 | IsChecked(self) -> bool |
fcafa8a9 | 316 | |
66c033b4 RD |
317 | Similar to GetValue, but raises an exception if it is not a 2-state |
318 | CheckBox. | |
fcafa8a9 | 319 | """ |
54f9ee45 | 320 | return _controls_.CheckBox_IsChecked(*args, **kwargs) |
e811c8ce RD |
321 | |
322 | def SetValue(*args, **kwargs): | |
fcafa8a9 | 323 | """ |
a95a7133 | 324 | SetValue(self, bool state) |
fcafa8a9 | 325 | |
66c033b4 RD |
326 | Set the state of a 2-state CheckBox. Pass True for checked, False for |
327 | unchecked. | |
fcafa8a9 | 328 | """ |
54f9ee45 | 329 | return _controls_.CheckBox_SetValue(*args, **kwargs) |
e811c8ce RD |
330 | |
331 | def Get3StateValue(*args, **kwargs): | |
fcafa8a9 | 332 | """ |
a95a7133 | 333 | Get3StateValue(self) -> int |
fcafa8a9 | 334 | |
66c033b4 RD |
335 | Returns wx.CHK_UNCHECKED when the CheckBox is unchecked, |
336 | wx.CHK_CHECKED when it is checked and wx.CHK_UNDETERMINED when it's in | |
337 | the undetermined state. Raises an exceptiion when the function is | |
338 | used with a 2-state CheckBox. | |
fcafa8a9 | 339 | """ |
54f9ee45 | 340 | return _controls_.CheckBox_Get3StateValue(*args, **kwargs) |
e811c8ce RD |
341 | |
342 | def Set3StateValue(*args, **kwargs): | |
fcafa8a9 | 343 | """ |
a95a7133 | 344 | Set3StateValue(self, int state) |
fcafa8a9 | 345 | |
66c033b4 RD |
346 | Sets the CheckBox to the given state. The state parameter can be one |
347 | of the following: wx.CHK_UNCHECKED (Check is off), wx.CHK_CHECKED (the | |
348 | Check is on) or wx.CHK_UNDETERMINED (Check is mixed). Raises an | |
349 | exception when the CheckBox is a 2-state checkbox and setting the | |
350 | state to wx.CHK_UNDETERMINED. | |
fcafa8a9 | 351 | """ |
54f9ee45 | 352 | return _controls_.CheckBox_Set3StateValue(*args, **kwargs) |
e811c8ce RD |
353 | |
354 | def Is3State(*args, **kwargs): | |
fcafa8a9 | 355 | """ |
a95a7133 | 356 | Is3State(self) -> bool |
fcafa8a9 RD |
357 | |
358 | Returns whether or not the CheckBox is a 3-state CheckBox. | |
359 | """ | |
54f9ee45 | 360 | return _controls_.CheckBox_Is3State(*args, **kwargs) |
e811c8ce RD |
361 | |
362 | def Is3rdStateAllowedForUser(*args, **kwargs): | |
fcafa8a9 | 363 | """ |
a95a7133 | 364 | Is3rdStateAllowedForUser(self) -> bool |
fcafa8a9 | 365 | |
66c033b4 RD |
366 | Returns whether or not the user can set the CheckBox to the third |
367 | state. | |
fcafa8a9 | 368 | """ |
54f9ee45 | 369 | return _controls_.CheckBox_Is3rdStateAllowedForUser(*args, **kwargs) |
e811c8ce | 370 | |
22bfe96c | 371 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
372 | """ |
373 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
374 | ||
375 | Get the default attributes for this class. This is useful if you want | |
376 | to use the same font or colour in your own control as in a standard | |
377 | control -- which is a much better idea than hard coding specific | |
378 | colours or fonts which might look completely out of place on the | |
379 | user's system, especially if it uses themes. | |
380 | ||
381 | The variant parameter is only relevant under Mac currently and is | |
382 | ignore under other platforms. Under Mac, it will change the size of | |
383 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
384 | this. | |
385 | """ | |
22bfe96c RD |
386 | return _controls_.CheckBox_GetClassDefaultAttributes(*args, **kwargs) |
387 | ||
388 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 389 | |
d14a1e28 RD |
390 | class CheckBoxPtr(CheckBox): |
391 | def __init__(self, this): | |
392 | self.this = this | |
393 | if not hasattr(self,"thisown"): self.thisown = 0 | |
394 | self.__class__ = CheckBox | |
54f9ee45 | 395 | _controls_.CheckBox_swigregister(CheckBoxPtr) |
b2dc1044 | 396 | CheckBoxNameStr = cvar.CheckBoxNameStr |
70551f47 | 397 | |
d14a1e28 | 398 | def PreCheckBox(*args, **kwargs): |
fcafa8a9 RD |
399 | """ |
400 | PreCheckBox() -> CheckBox | |
401 | ||
402 | Precreate a CheckBox for 2-phase creation. | |
403 | """ | |
54f9ee45 | 404 | val = _controls_.new_PreCheckBox(*args, **kwargs) |
aa2a5b86 RD |
405 | val.thisown = 1 |
406 | return val | |
407 | ||
22bfe96c | 408 | def CheckBox_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
409 | """ |
410 | CheckBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
411 | ||
412 | Get the default attributes for this class. This is useful if you want | |
413 | to use the same font or colour in your own control as in a standard | |
414 | control -- which is a much better idea than hard coding specific | |
415 | colours or fonts which might look completely out of place on the | |
416 | user's system, especially if it uses themes. | |
417 | ||
418 | The variant parameter is only relevant under Mac currently and is | |
419 | ignore under other platforms. Under Mac, it will change the size of | |
420 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
421 | this. | |
422 | """ | |
22bfe96c RD |
423 | return _controls_.CheckBox_GetClassDefaultAttributes(*args, **kwargs) |
424 | ||
d14a1e28 | 425 | #--------------------------------------------------------------------------- |
70551f47 | 426 | |
54f9ee45 | 427 | class Choice(_core.ControlWithItems): |
fcafa8a9 | 428 | """ |
66c033b4 RD |
429 | A Choice control is used to select one of a list of strings. |
430 | Unlike a `wx.ListBox`, only the selection is visible until the | |
431 | user pulls down the menu of choices. | |
fcafa8a9 | 432 | """ |
e811c8ce RD |
433 | def __repr__(self): |
434 | return "<%s.%s; proxy of C++ wxChoice instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 435 | def __init__(self, *args, **kwargs): |
0df68c9f | 436 | """ |
fcafa8a9 RD |
437 | __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, |
438 | List choices=[], long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 439 | String name=ChoiceNameStr) -> Choice |
fcafa8a9 RD |
440 | |
441 | Create and show a Choice control | |
0df68c9f | 442 | """ |
54f9ee45 | 443 | newobj = _controls_.new_Choice(*args, **kwargs) |
d14a1e28 RD |
444 | self.this = newobj.this |
445 | self.thisown = 1 | |
446 | del newobj.thisown | |
447 | self._setOORInfo(self) | |
e811c8ce RD |
448 | |
449 | def Create(*args, **kwargs): | |
0df68c9f | 450 | """ |
fcafa8a9 RD |
451 | Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, |
452 | List choices=[], long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 453 | String name=ChoiceNameStr) -> bool |
fd2dc343 RD |
454 | |
455 | Actually create the GUI Choice control for 2-phase creation | |
0df68c9f | 456 | """ |
54f9ee45 | 457 | return _controls_.Choice_Create(*args, **kwargs) |
e811c8ce | 458 | |
e811c8ce | 459 | def SetSelection(*args, **kwargs): |
fcafa8a9 | 460 | """ |
a95a7133 | 461 | SetSelection(self, int n) |
fcafa8a9 RD |
462 | |
463 | Select the n'th item (zero based) in the list. | |
464 | """ | |
54f9ee45 | 465 | return _controls_.Choice_SetSelection(*args, **kwargs) |
e811c8ce RD |
466 | |
467 | def SetStringSelection(*args, **kwargs): | |
fcafa8a9 | 468 | """ |
121b9a67 | 469 | SetStringSelection(self, String string) -> bool |
fcafa8a9 RD |
470 | |
471 | Select the item with the specifed string | |
472 | """ | |
54f9ee45 | 473 | return _controls_.Choice_SetStringSelection(*args, **kwargs) |
e811c8ce RD |
474 | |
475 | def SetString(*args, **kwargs): | |
fcafa8a9 | 476 | """ |
a95a7133 | 477 | SetString(self, int n, String string) |
fcafa8a9 RD |
478 | |
479 | Set the label for the n'th item (zero based) in the list. | |
480 | """ | |
54f9ee45 | 481 | return _controls_.Choice_SetString(*args, **kwargs) |
e811c8ce | 482 | |
fcafa8a9 | 483 | Select = SetSelection |
22bfe96c | 484 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
485 | """ |
486 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
487 | ||
488 | Get the default attributes for this class. This is useful if you want | |
489 | to use the same font or colour in your own control as in a standard | |
490 | control -- which is a much better idea than hard coding specific | |
491 | colours or fonts which might look completely out of place on the | |
492 | user's system, especially if it uses themes. | |
493 | ||
494 | The variant parameter is only relevant under Mac currently and is | |
495 | ignore under other platforms. Under Mac, it will change the size of | |
496 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
497 | this. | |
498 | """ | |
22bfe96c RD |
499 | return _controls_.Choice_GetClassDefaultAttributes(*args, **kwargs) |
500 | ||
501 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
65191ae8 | 502 | |
d14a1e28 RD |
503 | class ChoicePtr(Choice): |
504 | def __init__(self, this): | |
505 | self.this = this | |
506 | if not hasattr(self,"thisown"): self.thisown = 0 | |
507 | self.__class__ = Choice | |
54f9ee45 | 508 | _controls_.Choice_swigregister(ChoicePtr) |
b2dc1044 | 509 | ChoiceNameStr = cvar.ChoiceNameStr |
65191ae8 | 510 | |
d14a1e28 | 511 | def PreChoice(*args, **kwargs): |
fcafa8a9 RD |
512 | """ |
513 | PreChoice() -> Choice | |
514 | ||
515 | Precreate a Choice control for 2-phase creation. | |
516 | """ | |
54f9ee45 | 517 | val = _controls_.new_PreChoice(*args, **kwargs) |
d14a1e28 RD |
518 | val.thisown = 1 |
519 | return val | |
65191ae8 | 520 | |
22bfe96c | 521 | def Choice_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
522 | """ |
523 | Choice_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
524 | ||
525 | Get the default attributes for this class. This is useful if you want | |
526 | to use the same font or colour in your own control as in a standard | |
527 | control -- which is a much better idea than hard coding specific | |
528 | colours or fonts which might look completely out of place on the | |
529 | user's system, especially if it uses themes. | |
530 | ||
531 | The variant parameter is only relevant under Mac currently and is | |
532 | ignore under other platforms. Under Mac, it will change the size of | |
533 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
534 | this. | |
535 | """ | |
22bfe96c RD |
536 | return _controls_.Choice_GetClassDefaultAttributes(*args, **kwargs) |
537 | ||
d14a1e28 | 538 | #--------------------------------------------------------------------------- |
65191ae8 | 539 | |
54f9ee45 | 540 | class ComboBox(_core.Control,_core.ItemContainer): |
b88bce5f | 541 | """ |
41e2b43e RD |
542 | A combobox is like a combination of an edit control and a |
543 | listbox. It can be displayed as static list with editable or | |
544 | read-only text field; or a drop-down list with text field. | |
545 | ||
546 | A combobox permits a single selection only. Combobox items are | |
547 | numbered from zero. | |
b88bce5f | 548 | """ |
e811c8ce RD |
549 | def __repr__(self): |
550 | return "<%s.%s; proxy of C++ wxComboBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 551 | def __init__(self, *args, **kwargs): |
0df68c9f | 552 | """ |
b88bce5f RD |
553 | __init__(Window parent, int id, String value=EmptyString, |
554 | Point pos=DefaultPosition, Size size=DefaultSize, | |
41e2b43e RD |
555 | List choices=[], long style=0, Validator validator=DefaultValidator, |
556 | String name=ComboBoxNameStr) -> ComboBox | |
b88bce5f RD |
557 | |
558 | Constructor, creates and shows a ComboBox control. | |
0df68c9f | 559 | """ |
54f9ee45 | 560 | newobj = _controls_.new_ComboBox(*args, **kwargs) |
d14a1e28 | 561 | self.this = newobj.this |
70551f47 | 562 | self.thisown = 1 |
d14a1e28 | 563 | del newobj.thisown |
0220cbc1 | 564 | self._setOORInfo(self) |
e811c8ce RD |
565 | |
566 | def Create(*args, **kwargs): | |
0df68c9f | 567 | """ |
b88bce5f RD |
568 | Create(Window parent, int id, String value=EmptyString, |
569 | Point pos=DefaultPosition, Size size=DefaultSize, | |
570 | List choices=[], long style=0, Validator validator=DefaultValidator, | |
571 | String name=ChoiceNameStr) -> bool | |
fd2dc343 RD |
572 | |
573 | Actually create the GUI wxComboBox control for 2-phase creation | |
0df68c9f | 574 | """ |
54f9ee45 | 575 | return _controls_.ComboBox_Create(*args, **kwargs) |
e811c8ce RD |
576 | |
577 | def GetValue(*args, **kwargs): | |
b88bce5f | 578 | """ |
a95a7133 | 579 | GetValue(self) -> String |
b88bce5f RD |
580 | |
581 | Returns the current value in the combobox text field. | |
582 | """ | |
54f9ee45 | 583 | return _controls_.ComboBox_GetValue(*args, **kwargs) |
e811c8ce RD |
584 | |
585 | def SetValue(*args, **kwargs): | |
a95a7133 | 586 | """SetValue(self, String value)""" |
54f9ee45 | 587 | return _controls_.ComboBox_SetValue(*args, **kwargs) |
e811c8ce RD |
588 | |
589 | def Copy(*args, **kwargs): | |
b88bce5f | 590 | """ |
a95a7133 | 591 | Copy(self) |
b88bce5f RD |
592 | |
593 | Copies the selected text to the clipboard. | |
594 | """ | |
54f9ee45 | 595 | return _controls_.ComboBox_Copy(*args, **kwargs) |
e811c8ce RD |
596 | |
597 | def Cut(*args, **kwargs): | |
b88bce5f | 598 | """ |
a95a7133 | 599 | Cut(self) |
b88bce5f RD |
600 | |
601 | Copies the selected text to the clipboard and removes the selection. | |
602 | """ | |
54f9ee45 | 603 | return _controls_.ComboBox_Cut(*args, **kwargs) |
e811c8ce RD |
604 | |
605 | def Paste(*args, **kwargs): | |
b88bce5f | 606 | """ |
a95a7133 | 607 | Paste(self) |
b88bce5f RD |
608 | |
609 | Pastes text from the clipboard to the text field. | |
610 | """ | |
54f9ee45 | 611 | return _controls_.ComboBox_Paste(*args, **kwargs) |
e811c8ce RD |
612 | |
613 | def SetInsertionPoint(*args, **kwargs): | |
b88bce5f | 614 | """ |
a95a7133 | 615 | SetInsertionPoint(self, long pos) |
b88bce5f RD |
616 | |
617 | Sets the insertion point in the combobox text field. | |
618 | """ | |
54f9ee45 | 619 | return _controls_.ComboBox_SetInsertionPoint(*args, **kwargs) |
e811c8ce RD |
620 | |
621 | def GetInsertionPoint(*args, **kwargs): | |
b88bce5f | 622 | """ |
a95a7133 | 623 | GetInsertionPoint(self) -> long |
b88bce5f RD |
624 | |
625 | Returns the insertion point for the combobox's text field. | |
626 | """ | |
54f9ee45 | 627 | return _controls_.ComboBox_GetInsertionPoint(*args, **kwargs) |
e811c8ce RD |
628 | |
629 | def GetLastPosition(*args, **kwargs): | |
b88bce5f | 630 | """ |
a95a7133 | 631 | GetLastPosition(self) -> long |
b88bce5f RD |
632 | |
633 | Returns the last position in the combobox text field. | |
634 | """ | |
54f9ee45 | 635 | return _controls_.ComboBox_GetLastPosition(*args, **kwargs) |
e811c8ce RD |
636 | |
637 | def Replace(*args, **kwargs): | |
b88bce5f | 638 | """ |
a95a7133 | 639 | Replace(self, long from, long to, String value) |
b88bce5f RD |
640 | |
641 | Replaces the text between two positions with the given text, in the | |
642 | combobox text field. | |
643 | """ | |
54f9ee45 | 644 | return _controls_.ComboBox_Replace(*args, **kwargs) |
fd3f2efe RD |
645 | |
646 | def SetSelection(*args, **kwargs): | |
b88bce5f | 647 | """ |
a95a7133 | 648 | SetSelection(self, int n) |
b88bce5f | 649 | |
121b9a67 | 650 | Sets the item at index 'n' to be the selected item. |
b88bce5f | 651 | """ |
54f9ee45 | 652 | return _controls_.ComboBox_SetSelection(*args, **kwargs) |
e811c8ce RD |
653 | |
654 | def SetMark(*args, **kwargs): | |
121b9a67 RD |
655 | """ |
656 | SetMark(self, long from, long to) | |
657 | ||
658 | Selects the text between the two positions in the combobox text field. | |
659 | """ | |
54f9ee45 | 660 | return _controls_.ComboBox_SetMark(*args, **kwargs) |
e811c8ce | 661 | |
121b9a67 RD |
662 | def SetStringSelection(*args, **kwargs): |
663 | """ | |
664 | SetStringSelection(self, String string) -> bool | |
665 | ||
666 | Select the item with the specifed string | |
667 | """ | |
668 | return _controls_.ComboBox_SetStringSelection(*args, **kwargs) | |
669 | ||
670 | def SetString(*args, **kwargs): | |
671 | """ | |
672 | SetString(self, int n, String string) | |
673 | ||
674 | Set the label for the n'th item (zero based) in the list. | |
675 | """ | |
676 | return _controls_.ComboBox_SetString(*args, **kwargs) | |
677 | ||
e811c8ce | 678 | def SetEditable(*args, **kwargs): |
a95a7133 | 679 | """SetEditable(self, bool editable)""" |
54f9ee45 | 680 | return _controls_.ComboBox_SetEditable(*args, **kwargs) |
e811c8ce RD |
681 | |
682 | def SetInsertionPointEnd(*args, **kwargs): | |
b88bce5f | 683 | """ |
a95a7133 | 684 | SetInsertionPointEnd(self) |
b88bce5f RD |
685 | |
686 | Sets the insertion point at the end of the combobox text field. | |
687 | """ | |
54f9ee45 | 688 | return _controls_.ComboBox_SetInsertionPointEnd(*args, **kwargs) |
e811c8ce RD |
689 | |
690 | def Remove(*args, **kwargs): | |
b88bce5f | 691 | """ |
a95a7133 | 692 | Remove(self, long from, long to) |
b88bce5f RD |
693 | |
694 | Removes the text between the two positions in the combobox text field. | |
695 | """ | |
54f9ee45 | 696 | return _controls_.ComboBox_Remove(*args, **kwargs) |
e811c8ce | 697 | |
22bfe96c | 698 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
699 | """ |
700 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
701 | ||
702 | Get the default attributes for this class. This is useful if you want | |
703 | to use the same font or colour in your own control as in a standard | |
704 | control -- which is a much better idea than hard coding specific | |
705 | colours or fonts which might look completely out of place on the | |
706 | user's system, especially if it uses themes. | |
707 | ||
708 | The variant parameter is only relevant under Mac currently and is | |
709 | ignore under other platforms. Under Mac, it will change the size of | |
710 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
711 | this. | |
712 | """ | |
22bfe96c RD |
713 | return _controls_.ComboBox_GetClassDefaultAttributes(*args, **kwargs) |
714 | ||
715 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 716 | |
d14a1e28 RD |
717 | class ComboBoxPtr(ComboBox): |
718 | def __init__(self, this): | |
719 | self.this = this | |
720 | if not hasattr(self,"thisown"): self.thisown = 0 | |
721 | self.__class__ = ComboBox | |
54f9ee45 | 722 | _controls_.ComboBox_swigregister(ComboBoxPtr) |
b2dc1044 | 723 | ComboBoxNameStr = cvar.ComboBoxNameStr |
70551f47 | 724 | |
d14a1e28 | 725 | def PreComboBox(*args, **kwargs): |
b88bce5f RD |
726 | """ |
727 | PreComboBox() -> ComboBox | |
728 | ||
729 | Precreate a ComboBox control for 2-phase creation. | |
730 | """ | |
54f9ee45 | 731 | val = _controls_.new_PreComboBox(*args, **kwargs) |
aa2a5b86 RD |
732 | val.thisown = 1 |
733 | return val | |
734 | ||
22bfe96c | 735 | def ComboBox_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
736 | """ |
737 | ComboBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
738 | ||
739 | Get the default attributes for this class. This is useful if you want | |
740 | to use the same font or colour in your own control as in a standard | |
741 | control -- which is a much better idea than hard coding specific | |
742 | colours or fonts which might look completely out of place on the | |
743 | user's system, especially if it uses themes. | |
744 | ||
745 | The variant parameter is only relevant under Mac currently and is | |
746 | ignore under other platforms. Under Mac, it will change the size of | |
747 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
748 | this. | |
749 | """ | |
22bfe96c RD |
750 | return _controls_.ComboBox_GetClassDefaultAttributes(*args, **kwargs) |
751 | ||
d14a1e28 | 752 | #--------------------------------------------------------------------------- |
70551f47 | 753 | |
54f9ee45 RD |
754 | GA_HORIZONTAL = _controls_.GA_HORIZONTAL |
755 | GA_VERTICAL = _controls_.GA_VERTICAL | |
756 | GA_SMOOTH = _controls_.GA_SMOOTH | |
757 | GA_PROGRESSBAR = _controls_.GA_PROGRESSBAR | |
758 | class Gauge(_core.Control): | |
e811c8ce RD |
759 | def __repr__(self): |
760 | return "<%s.%s; proxy of C++ wxGauge instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 761 | def __init__(self, *args, **kwargs): |
0df68c9f | 762 | """ |
248ed943 | 763 | __init__(self, Window parent, int id=-1, int range=100, Point pos=DefaultPosition, |
0df68c9f RD |
764 | Size size=DefaultSize, long style=GA_HORIZONTAL, |
765 | Validator validator=DefaultValidator, | |
b2dc1044 | 766 | String name=GaugeNameStr) -> Gauge |
0df68c9f | 767 | """ |
54f9ee45 | 768 | newobj = _controls_.new_Gauge(*args, **kwargs) |
d14a1e28 | 769 | self.this = newobj.this |
70551f47 | 770 | self.thisown = 1 |
d14a1e28 | 771 | del newobj.thisown |
0220cbc1 | 772 | self._setOORInfo(self) |
e811c8ce RD |
773 | |
774 | def Create(*args, **kwargs): | |
0df68c9f | 775 | """ |
248ed943 | 776 | Create(self, Window parent, int id=-1, int range=100, Point pos=DefaultPosition, |
0df68c9f RD |
777 | Size size=DefaultSize, long style=GA_HORIZONTAL, |
778 | Validator validator=DefaultValidator, | |
b2dc1044 | 779 | String name=GaugeNameStr) -> bool |
0df68c9f | 780 | """ |
54f9ee45 | 781 | return _controls_.Gauge_Create(*args, **kwargs) |
e811c8ce RD |
782 | |
783 | def SetRange(*args, **kwargs): | |
a95a7133 | 784 | """SetRange(self, int range)""" |
54f9ee45 | 785 | return _controls_.Gauge_SetRange(*args, **kwargs) |
e811c8ce RD |
786 | |
787 | def GetRange(*args, **kwargs): | |
a95a7133 | 788 | """GetRange(self) -> int""" |
54f9ee45 | 789 | return _controls_.Gauge_GetRange(*args, **kwargs) |
e811c8ce RD |
790 | |
791 | def SetValue(*args, **kwargs): | |
a95a7133 | 792 | """SetValue(self, int pos)""" |
54f9ee45 | 793 | return _controls_.Gauge_SetValue(*args, **kwargs) |
e811c8ce RD |
794 | |
795 | def GetValue(*args, **kwargs): | |
a95a7133 | 796 | """GetValue(self) -> int""" |
54f9ee45 | 797 | return _controls_.Gauge_GetValue(*args, **kwargs) |
e811c8ce RD |
798 | |
799 | def IsVertical(*args, **kwargs): | |
a95a7133 | 800 | """IsVertical(self) -> bool""" |
54f9ee45 | 801 | return _controls_.Gauge_IsVertical(*args, **kwargs) |
e811c8ce RD |
802 | |
803 | def SetShadowWidth(*args, **kwargs): | |
a95a7133 | 804 | """SetShadowWidth(self, int w)""" |
54f9ee45 | 805 | return _controls_.Gauge_SetShadowWidth(*args, **kwargs) |
e811c8ce RD |
806 | |
807 | def GetShadowWidth(*args, **kwargs): | |
a95a7133 | 808 | """GetShadowWidth(self) -> int""" |
54f9ee45 | 809 | return _controls_.Gauge_GetShadowWidth(*args, **kwargs) |
e811c8ce RD |
810 | |
811 | def SetBezelFace(*args, **kwargs): | |
a95a7133 | 812 | """SetBezelFace(self, int w)""" |
54f9ee45 | 813 | return _controls_.Gauge_SetBezelFace(*args, **kwargs) |
e811c8ce RD |
814 | |
815 | def GetBezelFace(*args, **kwargs): | |
a95a7133 | 816 | """GetBezelFace(self) -> int""" |
54f9ee45 | 817 | return _controls_.Gauge_GetBezelFace(*args, **kwargs) |
e811c8ce | 818 | |
22bfe96c | 819 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
820 | """ |
821 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
822 | ||
823 | Get the default attributes for this class. This is useful if you want | |
824 | to use the same font or colour in your own control as in a standard | |
825 | control -- which is a much better idea than hard coding specific | |
826 | colours or fonts which might look completely out of place on the | |
827 | user's system, especially if it uses themes. | |
828 | ||
829 | The variant parameter is only relevant under Mac currently and is | |
830 | ignore under other platforms. Under Mac, it will change the size of | |
831 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
832 | this. | |
833 | """ | |
22bfe96c RD |
834 | return _controls_.Gauge_GetClassDefaultAttributes(*args, **kwargs) |
835 | ||
836 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 837 | |
d14a1e28 RD |
838 | class GaugePtr(Gauge): |
839 | def __init__(self, this): | |
840 | self.this = this | |
841 | if not hasattr(self,"thisown"): self.thisown = 0 | |
842 | self.__class__ = Gauge | |
54f9ee45 | 843 | _controls_.Gauge_swigregister(GaugePtr) |
b2dc1044 | 844 | GaugeNameStr = cvar.GaugeNameStr |
70551f47 | 845 | |
d14a1e28 | 846 | def PreGauge(*args, **kwargs): |
e811c8ce | 847 | """PreGauge() -> Gauge""" |
54f9ee45 | 848 | val = _controls_.new_PreGauge(*args, **kwargs) |
aa2a5b86 RD |
849 | val.thisown = 1 |
850 | return val | |
851 | ||
22bfe96c | 852 | def Gauge_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
853 | """ |
854 | Gauge_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
855 | ||
856 | Get the default attributes for this class. This is useful if you want | |
857 | to use the same font or colour in your own control as in a standard | |
858 | control -- which is a much better idea than hard coding specific | |
859 | colours or fonts which might look completely out of place on the | |
860 | user's system, especially if it uses themes. | |
861 | ||
862 | The variant parameter is only relevant under Mac currently and is | |
863 | ignore under other platforms. Under Mac, it will change the size of | |
864 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
865 | this. | |
866 | """ | |
22bfe96c RD |
867 | return _controls_.Gauge_GetClassDefaultAttributes(*args, **kwargs) |
868 | ||
d14a1e28 | 869 | #--------------------------------------------------------------------------- |
70551f47 | 870 | |
54f9ee45 | 871 | class StaticBox(_core.Control): |
e811c8ce RD |
872 | def __repr__(self): |
873 | return "<%s.%s; proxy of C++ wxStaticBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 874 | def __init__(self, *args, **kwargs): |
0df68c9f | 875 | """ |
248ed943 RD |
876 | __init__(self, Window parent, int id=-1, String label=EmptyString, |
877 | Point pos=DefaultPosition, Size size=DefaultSize, | |
878 | long style=0, String name=StaticBoxNameStr) -> StaticBox | |
0df68c9f | 879 | """ |
54f9ee45 | 880 | newobj = _controls_.new_StaticBox(*args, **kwargs) |
d14a1e28 | 881 | self.this = newobj.this |
70551f47 | 882 | self.thisown = 1 |
d14a1e28 | 883 | del newobj.thisown |
0220cbc1 | 884 | self._setOORInfo(self) |
e811c8ce RD |
885 | |
886 | def Create(*args, **kwargs): | |
0df68c9f | 887 | """ |
248ed943 RD |
888 | Create(self, Window parent, int id=-1, String label=EmptyString, |
889 | Point pos=DefaultPosition, Size size=DefaultSize, | |
890 | long style=0, String name=StaticBoxNameStr) -> bool | |
0df68c9f | 891 | """ |
54f9ee45 | 892 | return _controls_.StaticBox_Create(*args, **kwargs) |
e811c8ce | 893 | |
22bfe96c | 894 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
895 | """ |
896 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
897 | ||
898 | Get the default attributes for this class. This is useful if you want | |
899 | to use the same font or colour in your own control as in a standard | |
900 | control -- which is a much better idea than hard coding specific | |
901 | colours or fonts which might look completely out of place on the | |
902 | user's system, especially if it uses themes. | |
903 | ||
904 | The variant parameter is only relevant under Mac currently and is | |
905 | ignore under other platforms. Under Mac, it will change the size of | |
906 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
907 | this. | |
908 | """ | |
22bfe96c RD |
909 | return _controls_.StaticBox_GetClassDefaultAttributes(*args, **kwargs) |
910 | ||
911 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 912 | |
d14a1e28 RD |
913 | class StaticBoxPtr(StaticBox): |
914 | def __init__(self, this): | |
915 | self.this = this | |
916 | if not hasattr(self,"thisown"): self.thisown = 0 | |
917 | self.__class__ = StaticBox | |
54f9ee45 | 918 | _controls_.StaticBox_swigregister(StaticBoxPtr) |
b2dc1044 RD |
919 | StaticBitmapNameStr = cvar.StaticBitmapNameStr |
920 | StaticBoxNameStr = cvar.StaticBoxNameStr | |
921 | StaticTextNameStr = cvar.StaticTextNameStr | |
70551f47 | 922 | |
d14a1e28 | 923 | def PreStaticBox(*args, **kwargs): |
e811c8ce | 924 | """PreStaticBox() -> StaticBox""" |
54f9ee45 | 925 | val = _controls_.new_PreStaticBox(*args, **kwargs) |
aa2a5b86 RD |
926 | val.thisown = 1 |
927 | return val | |
928 | ||
22bfe96c | 929 | def StaticBox_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
930 | """ |
931 | StaticBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
932 | ||
933 | Get the default attributes for this class. This is useful if you want | |
934 | to use the same font or colour in your own control as in a standard | |
935 | control -- which is a much better idea than hard coding specific | |
936 | colours or fonts which might look completely out of place on the | |
937 | user's system, especially if it uses themes. | |
938 | ||
939 | The variant parameter is only relevant under Mac currently and is | |
940 | ignore under other platforms. Under Mac, it will change the size of | |
941 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
942 | this. | |
943 | """ | |
22bfe96c RD |
944 | return _controls_.StaticBox_GetClassDefaultAttributes(*args, **kwargs) |
945 | ||
d14a1e28 | 946 | #--------------------------------------------------------------------------- |
70551f47 | 947 | |
54f9ee45 | 948 | class StaticLine(_core.Control): |
e811c8ce RD |
949 | def __repr__(self): |
950 | return "<%s.%s; proxy of C++ wxStaticLine instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 951 | def __init__(self, *args, **kwargs): |
0df68c9f | 952 | """ |
248ed943 RD |
953 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
954 | Size size=DefaultSize, long style=LI_HORIZONTAL, | |
b2dc1044 | 955 | String name=StaticTextNameStr) -> StaticLine |
0df68c9f | 956 | """ |
54f9ee45 | 957 | newobj = _controls_.new_StaticLine(*args, **kwargs) |
d14a1e28 | 958 | self.this = newobj.this |
70551f47 | 959 | self.thisown = 1 |
d14a1e28 | 960 | del newobj.thisown |
0220cbc1 | 961 | self._setOORInfo(self) |
e811c8ce RD |
962 | |
963 | def Create(*args, **kwargs): | |
0df68c9f | 964 | """ |
248ed943 RD |
965 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
966 | Size size=DefaultSize, long style=LI_HORIZONTAL, | |
b2dc1044 | 967 | String name=StaticTextNameStr) -> bool |
0df68c9f | 968 | """ |
54f9ee45 | 969 | return _controls_.StaticLine_Create(*args, **kwargs) |
e811c8ce RD |
970 | |
971 | def IsVertical(*args, **kwargs): | |
a95a7133 | 972 | """IsVertical(self) -> bool""" |
54f9ee45 | 973 | return _controls_.StaticLine_IsVertical(*args, **kwargs) |
e811c8ce RD |
974 | |
975 | def GetDefaultSize(*args, **kwargs): | |
66c033b4 | 976 | """GetDefaultSize() -> int""" |
54f9ee45 | 977 | return _controls_.StaticLine_GetDefaultSize(*args, **kwargs) |
e811c8ce RD |
978 | |
979 | GetDefaultSize = staticmethod(GetDefaultSize) | |
22bfe96c | 980 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
981 | """ |
982 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
983 | ||
984 | Get the default attributes for this class. This is useful if you want | |
985 | to use the same font or colour in your own control as in a standard | |
986 | control -- which is a much better idea than hard coding specific | |
987 | colours or fonts which might look completely out of place on the | |
988 | user's system, especially if it uses themes. | |
989 | ||
990 | The variant parameter is only relevant under Mac currently and is | |
991 | ignore under other platforms. Under Mac, it will change the size of | |
992 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
993 | this. | |
994 | """ | |
22bfe96c RD |
995 | return _controls_.StaticLine_GetClassDefaultAttributes(*args, **kwargs) |
996 | ||
997 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 998 | |
d14a1e28 RD |
999 | class StaticLinePtr(StaticLine): |
1000 | def __init__(self, this): | |
1001 | self.this = this | |
1002 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1003 | self.__class__ = StaticLine | |
54f9ee45 | 1004 | _controls_.StaticLine_swigregister(StaticLinePtr) |
70551f47 | 1005 | |
d14a1e28 | 1006 | def PreStaticLine(*args, **kwargs): |
e811c8ce | 1007 | """PreStaticLine() -> StaticLine""" |
54f9ee45 | 1008 | val = _controls_.new_PreStaticLine(*args, **kwargs) |
aa2a5b86 RD |
1009 | val.thisown = 1 |
1010 | return val | |
1011 | ||
e811c8ce RD |
1012 | def StaticLine_GetDefaultSize(*args, **kwargs): |
1013 | """StaticLine_GetDefaultSize() -> int""" | |
54f9ee45 | 1014 | return _controls_.StaticLine_GetDefaultSize(*args, **kwargs) |
70551f47 | 1015 | |
22bfe96c | 1016 | def StaticLine_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1017 | """ |
1018 | StaticLine_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1019 | ||
1020 | Get the default attributes for this class. This is useful if you want | |
1021 | to use the same font or colour in your own control as in a standard | |
1022 | control -- which is a much better idea than hard coding specific | |
1023 | colours or fonts which might look completely out of place on the | |
1024 | user's system, especially if it uses themes. | |
1025 | ||
1026 | The variant parameter is only relevant under Mac currently and is | |
1027 | ignore under other platforms. Under Mac, it will change the size of | |
1028 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
1029 | this. | |
1030 | """ | |
22bfe96c RD |
1031 | return _controls_.StaticLine_GetClassDefaultAttributes(*args, **kwargs) |
1032 | ||
d14a1e28 RD |
1033 | #--------------------------------------------------------------------------- |
1034 | ||
54f9ee45 | 1035 | class StaticText(_core.Control): |
e811c8ce RD |
1036 | def __repr__(self): |
1037 | return "<%s.%s; proxy of C++ wxStaticText instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1038 | def __init__(self, *args, **kwargs): |
0df68c9f | 1039 | """ |
248ed943 RD |
1040 | __init__(self, Window parent, int id=-1, String label=EmptyString, |
1041 | Point pos=DefaultPosition, Size size=DefaultSize, | |
1042 | long style=0, String name=StaticTextNameStr) -> StaticText | |
0df68c9f | 1043 | """ |
54f9ee45 | 1044 | newobj = _controls_.new_StaticText(*args, **kwargs) |
d14a1e28 | 1045 | self.this = newobj.this |
70551f47 | 1046 | self.thisown = 1 |
d14a1e28 | 1047 | del newobj.thisown |
0220cbc1 | 1048 | self._setOORInfo(self) |
e811c8ce RD |
1049 | |
1050 | def Create(*args, **kwargs): | |
0df68c9f | 1051 | """ |
248ed943 RD |
1052 | Create(self, Window parent, int id=-1, String label=EmptyString, |
1053 | Point pos=DefaultPosition, Size size=DefaultSize, | |
1054 | long style=0, String name=StaticTextNameStr) -> bool | |
0df68c9f | 1055 | """ |
54f9ee45 | 1056 | return _controls_.StaticText_Create(*args, **kwargs) |
e811c8ce | 1057 | |
22bfe96c | 1058 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1059 | """ |
1060 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1061 | ||
1062 | Get the default attributes for this class. This is useful if you want | |
1063 | to use the same font or colour in your own control as in a standard | |
1064 | control -- which is a much better idea than hard coding specific | |
1065 | colours or fonts which might look completely out of place on the | |
1066 | user's system, especially if it uses themes. | |
1067 | ||
1068 | The variant parameter is only relevant under Mac currently and is | |
1069 | ignore under other platforms. Under Mac, it will change the size of | |
1070 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
1071 | this. | |
1072 | """ | |
22bfe96c RD |
1073 | return _controls_.StaticText_GetClassDefaultAttributes(*args, **kwargs) |
1074 | ||
1075 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 1076 | |
d14a1e28 RD |
1077 | class StaticTextPtr(StaticText): |
1078 | def __init__(self, this): | |
1079 | self.this = this | |
1080 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1081 | self.__class__ = StaticText | |
54f9ee45 | 1082 | _controls_.StaticText_swigregister(StaticTextPtr) |
70551f47 | 1083 | |
d14a1e28 | 1084 | def PreStaticText(*args, **kwargs): |
e811c8ce | 1085 | """PreStaticText() -> StaticText""" |
54f9ee45 | 1086 | val = _controls_.new_PreStaticText(*args, **kwargs) |
aa2a5b86 RD |
1087 | val.thisown = 1 |
1088 | return val | |
1089 | ||
22bfe96c | 1090 | def StaticText_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1091 | """ |
1092 | StaticText_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1093 | ||
1094 | Get the default attributes for this class. This is useful if you want | |
1095 | to use the same font or colour in your own control as in a standard | |
1096 | control -- which is a much better idea than hard coding specific | |
1097 | colours or fonts which might look completely out of place on the | |
1098 | user's system, especially if it uses themes. | |
1099 | ||
1100 | The variant parameter is only relevant under Mac currently and is | |
1101 | ignore under other platforms. Under Mac, it will change the size of | |
1102 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
1103 | this. | |
1104 | """ | |
22bfe96c RD |
1105 | return _controls_.StaticText_GetClassDefaultAttributes(*args, **kwargs) |
1106 | ||
d14a1e28 | 1107 | #--------------------------------------------------------------------------- |
70551f47 | 1108 | |
54f9ee45 | 1109 | class StaticBitmap(_core.Control): |
e811c8ce RD |
1110 | def __repr__(self): |
1111 | return "<%s.%s; proxy of C++ wxStaticBitmap instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1112 | def __init__(self, *args, **kwargs): |
0df68c9f | 1113 | """ |
248ed943 RD |
1114 | __init__(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, |
1115 | Point pos=DefaultPosition, Size size=DefaultSize, | |
1116 | long style=0, String name=StaticBitmapNameStr) -> StaticBitmap | |
0df68c9f | 1117 | """ |
54f9ee45 | 1118 | newobj = _controls_.new_StaticBitmap(*args, **kwargs) |
d14a1e28 | 1119 | self.this = newobj.this |
70551f47 | 1120 | self.thisown = 1 |
d14a1e28 | 1121 | del newobj.thisown |
4f89f6a3 RD |
1122 | self._setOORInfo(self) |
1123 | ||
e811c8ce | 1124 | def Create(*args, **kwargs): |
0df68c9f | 1125 | """ |
248ed943 RD |
1126 | Create(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, |
1127 | Point pos=DefaultPosition, Size size=DefaultSize, | |
1128 | long style=0, String name=StaticBitmapNameStr) -> bool | |
0df68c9f | 1129 | """ |
54f9ee45 | 1130 | return _controls_.StaticBitmap_Create(*args, **kwargs) |
e811c8ce RD |
1131 | |
1132 | def GetBitmap(*args, **kwargs): | |
a95a7133 | 1133 | """GetBitmap(self) -> Bitmap""" |
54f9ee45 | 1134 | return _controls_.StaticBitmap_GetBitmap(*args, **kwargs) |
e811c8ce RD |
1135 | |
1136 | def SetBitmap(*args, **kwargs): | |
a95a7133 | 1137 | """SetBitmap(self, Bitmap bitmap)""" |
54f9ee45 | 1138 | return _controls_.StaticBitmap_SetBitmap(*args, **kwargs) |
e811c8ce RD |
1139 | |
1140 | def SetIcon(*args, **kwargs): | |
a95a7133 | 1141 | """SetIcon(self, Icon icon)""" |
54f9ee45 | 1142 | return _controls_.StaticBitmap_SetIcon(*args, **kwargs) |
e811c8ce | 1143 | |
22bfe96c | 1144 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1145 | """ |
1146 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1147 | ||
1148 | Get the default attributes for this class. This is useful if you want | |
1149 | to use the same font or colour in your own control as in a standard | |
1150 | control -- which is a much better idea than hard coding specific | |
1151 | colours or fonts which might look completely out of place on the | |
1152 | user's system, especially if it uses themes. | |
1153 | ||
1154 | The variant parameter is only relevant under Mac currently and is | |
1155 | ignore under other platforms. Under Mac, it will change the size of | |
1156 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
1157 | this. | |
1158 | """ | |
22bfe96c RD |
1159 | return _controls_.StaticBitmap_GetClassDefaultAttributes(*args, **kwargs) |
1160 | ||
1161 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 1162 | |
d14a1e28 RD |
1163 | class StaticBitmapPtr(StaticBitmap): |
1164 | def __init__(self, this): | |
1165 | self.this = this | |
1166 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1167 | self.__class__ = StaticBitmap | |
54f9ee45 | 1168 | _controls_.StaticBitmap_swigregister(StaticBitmapPtr) |
70551f47 | 1169 | |
d14a1e28 | 1170 | def PreStaticBitmap(*args, **kwargs): |
e811c8ce | 1171 | """PreStaticBitmap() -> StaticBitmap""" |
54f9ee45 | 1172 | val = _controls_.new_PreStaticBitmap(*args, **kwargs) |
aa2a5b86 RD |
1173 | val.thisown = 1 |
1174 | return val | |
1175 | ||
22bfe96c | 1176 | def StaticBitmap_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1177 | """ |
1178 | StaticBitmap_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1179 | ||
1180 | Get the default attributes for this class. This is useful if you want | |
1181 | to use the same font or colour in your own control as in a standard | |
1182 | control -- which is a much better idea than hard coding specific | |
1183 | colours or fonts which might look completely out of place on the | |
1184 | user's system, especially if it uses themes. | |
1185 | ||
1186 | The variant parameter is only relevant under Mac currently and is | |
1187 | ignore under other platforms. Under Mac, it will change the size of | |
1188 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
1189 | this. | |
1190 | """ | |
22bfe96c RD |
1191 | return _controls_.StaticBitmap_GetClassDefaultAttributes(*args, **kwargs) |
1192 | ||
d14a1e28 | 1193 | #--------------------------------------------------------------------------- |
70551f47 | 1194 | |
54f9ee45 | 1195 | class ListBox(_core.ControlWithItems): |
e811c8ce RD |
1196 | def __repr__(self): |
1197 | return "<%s.%s; proxy of C++ wxListBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1198 | def __init__(self, *args, **kwargs): |
0df68c9f | 1199 | """ |
248ed943 RD |
1200 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
1201 | Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, | |
0df68c9f | 1202 | long style=0, Validator validator=DefaultValidator, |
b2dc1044 | 1203 | String name=ListBoxNameStr) -> ListBox |
0df68c9f | 1204 | """ |
54f9ee45 | 1205 | newobj = _controls_.new_ListBox(*args, **kwargs) |
d14a1e28 | 1206 | self.this = newobj.this |
70551f47 | 1207 | self.thisown = 1 |
d14a1e28 | 1208 | del newobj.thisown |
0220cbc1 | 1209 | self._setOORInfo(self) |
e811c8ce RD |
1210 | |
1211 | def Create(*args, **kwargs): | |
0df68c9f | 1212 | """ |
248ed943 RD |
1213 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
1214 | Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, | |
0df68c9f | 1215 | long style=0, Validator validator=DefaultValidator, |
b2dc1044 | 1216 | String name=ListBoxNameStr) -> bool |
0df68c9f | 1217 | """ |
54f9ee45 | 1218 | return _controls_.ListBox_Create(*args, **kwargs) |
e811c8ce RD |
1219 | |
1220 | def Insert(*args, **kwargs): | |
15afbcd0 | 1221 | """ |
a95a7133 | 1222 | Insert(self, String item, int pos, PyObject clientData=None) |
15afbcd0 | 1223 | |
41e2b43e | 1224 | Insert an item into the control before the item at the ``pos`` index, |
15afbcd0 RD |
1225 | optionally associating some data object with the item. |
1226 | """ | |
54f9ee45 | 1227 | return _controls_.ListBox_Insert(*args, **kwargs) |
e811c8ce RD |
1228 | |
1229 | def InsertItems(*args, **kwargs): | |
a95a7133 | 1230 | """InsertItems(self, wxArrayString items, int pos)""" |
54f9ee45 | 1231 | return _controls_.ListBox_InsertItems(*args, **kwargs) |
e811c8ce RD |
1232 | |
1233 | def Set(*args, **kwargs): | |
a95a7133 | 1234 | """Set(self, wxArrayString items)""" |
54f9ee45 | 1235 | return _controls_.ListBox_Set(*args, **kwargs) |
e811c8ce RD |
1236 | |
1237 | def IsSelected(*args, **kwargs): | |
a95a7133 | 1238 | """IsSelected(self, int n) -> bool""" |
54f9ee45 | 1239 | return _controls_.ListBox_IsSelected(*args, **kwargs) |
e811c8ce RD |
1240 | |
1241 | def SetSelection(*args, **kwargs): | |
a95a7133 | 1242 | """SetSelection(self, int n, bool select=True)""" |
54f9ee45 | 1243 | return _controls_.ListBox_SetSelection(*args, **kwargs) |
e811c8ce RD |
1244 | |
1245 | def Select(*args, **kwargs): | |
15afbcd0 | 1246 | """ |
a95a7133 | 1247 | Select(self, int n) |
15afbcd0 RD |
1248 | |
1249 | Sets the item at index 'n' to be the selected item. | |
1250 | """ | |
54f9ee45 | 1251 | return _controls_.ListBox_Select(*args, **kwargs) |
e811c8ce RD |
1252 | |
1253 | def Deselect(*args, **kwargs): | |
a95a7133 | 1254 | """Deselect(self, int n)""" |
54f9ee45 | 1255 | return _controls_.ListBox_Deselect(*args, **kwargs) |
e811c8ce RD |
1256 | |
1257 | def DeselectAll(*args, **kwargs): | |
a95a7133 | 1258 | """DeselectAll(self, int itemToLeaveSelected=-1)""" |
54f9ee45 | 1259 | return _controls_.ListBox_DeselectAll(*args, **kwargs) |
e811c8ce RD |
1260 | |
1261 | def SetStringSelection(*args, **kwargs): | |
a95a7133 | 1262 | """SetStringSelection(self, String s, bool select=True) -> bool""" |
54f9ee45 | 1263 | return _controls_.ListBox_SetStringSelection(*args, **kwargs) |
e811c8ce RD |
1264 | |
1265 | def GetSelections(*args, **kwargs): | |
a95a7133 | 1266 | """GetSelections(self) -> PyObject""" |
54f9ee45 | 1267 | return _controls_.ListBox_GetSelections(*args, **kwargs) |
e811c8ce RD |
1268 | |
1269 | def SetFirstItem(*args, **kwargs): | |
a95a7133 | 1270 | """SetFirstItem(self, int n)""" |
54f9ee45 | 1271 | return _controls_.ListBox_SetFirstItem(*args, **kwargs) |
e811c8ce RD |
1272 | |
1273 | def SetFirstItemStr(*args, **kwargs): | |
a95a7133 | 1274 | """SetFirstItemStr(self, String s)""" |
54f9ee45 | 1275 | return _controls_.ListBox_SetFirstItemStr(*args, **kwargs) |
e811c8ce RD |
1276 | |
1277 | def EnsureVisible(*args, **kwargs): | |
a95a7133 | 1278 | """EnsureVisible(self, int n)""" |
54f9ee45 | 1279 | return _controls_.ListBox_EnsureVisible(*args, **kwargs) |
e811c8ce RD |
1280 | |
1281 | def AppendAndEnsureVisible(*args, **kwargs): | |
a95a7133 | 1282 | """AppendAndEnsureVisible(self, String s)""" |
54f9ee45 | 1283 | return _controls_.ListBox_AppendAndEnsureVisible(*args, **kwargs) |
e811c8ce RD |
1284 | |
1285 | def IsSorted(*args, **kwargs): | |
a95a7133 | 1286 | """IsSorted(self) -> bool""" |
54f9ee45 | 1287 | return _controls_.ListBox_IsSorted(*args, **kwargs) |
e811c8ce | 1288 | |
c3eb6258 | 1289 | def SetItemForegroundColour(*args, **kwargs): |
a95a7133 | 1290 | """SetItemForegroundColour(self, int item, Colour c)""" |
54f9ee45 | 1291 | return _controls_.ListBox_SetItemForegroundColour(*args, **kwargs) |
c3eb6258 RD |
1292 | |
1293 | def SetItemBackgroundColour(*args, **kwargs): | |
a95a7133 | 1294 | """SetItemBackgroundColour(self, int item, Colour c)""" |
54f9ee45 | 1295 | return _controls_.ListBox_SetItemBackgroundColour(*args, **kwargs) |
c3eb6258 RD |
1296 | |
1297 | def SetItemFont(*args, **kwargs): | |
a95a7133 | 1298 | """SetItemFont(self, int item, Font f)""" |
54f9ee45 | 1299 | return _controls_.ListBox_SetItemFont(*args, **kwargs) |
c3eb6258 | 1300 | |
74a57fcd | 1301 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1302 | """ |
1303 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1304 | ||
1305 | Get the default attributes for this class. This is useful if you want | |
1306 | to use the same font or colour in your own control as in a standard | |
1307 | control -- which is a much better idea than hard coding specific | |
1308 | colours or fonts which might look completely out of place on the | |
1309 | user's system, especially if it uses themes. | |
1310 | ||
1311 | The variant parameter is only relevant under Mac currently and is | |
1312 | ignore under other platforms. Under Mac, it will change the size of | |
1313 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
1314 | this. | |
1315 | """ | |
54f9ee45 | 1316 | return _controls_.ListBox_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
1317 | |
1318 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 1319 | |
d14a1e28 RD |
1320 | class ListBoxPtr(ListBox): |
1321 | def __init__(self, this): | |
1322 | self.this = this | |
1323 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1324 | self.__class__ = ListBox | |
54f9ee45 | 1325 | _controls_.ListBox_swigregister(ListBoxPtr) |
b2dc1044 | 1326 | ListBoxNameStr = cvar.ListBoxNameStr |
70551f47 | 1327 | |
d14a1e28 | 1328 | def PreListBox(*args, **kwargs): |
e811c8ce | 1329 | """PreListBox() -> ListBox""" |
54f9ee45 | 1330 | val = _controls_.new_PreListBox(*args, **kwargs) |
aa2a5b86 RD |
1331 | val.thisown = 1 |
1332 | return val | |
1333 | ||
74a57fcd | 1334 | def ListBox_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1335 | """ |
1336 | ListBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1337 | ||
1338 | Get the default attributes for this class. This is useful if you want | |
1339 | to use the same font or colour in your own control as in a standard | |
1340 | control -- which is a much better idea than hard coding specific | |
1341 | colours or fonts which might look completely out of place on the | |
1342 | user's system, especially if it uses themes. | |
1343 | ||
1344 | The variant parameter is only relevant under Mac currently and is | |
1345 | ignore under other platforms. Under Mac, it will change the size of | |
1346 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
1347 | this. | |
1348 | """ | |
54f9ee45 | 1349 | return _controls_.ListBox_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 1350 | |
d14a1e28 | 1351 | #--------------------------------------------------------------------------- |
70551f47 | 1352 | |
d14a1e28 | 1353 | class CheckListBox(ListBox): |
e811c8ce RD |
1354 | def __repr__(self): |
1355 | return "<%s.%s; proxy of C++ wxCheckListBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1356 | def __init__(self, *args, **kwargs): |
0df68c9f | 1357 | """ |
248ed943 RD |
1358 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
1359 | Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, | |
0df68c9f | 1360 | long style=0, Validator validator=DefaultValidator, |
b2dc1044 | 1361 | String name=ListBoxNameStr) -> CheckListBox |
0df68c9f | 1362 | """ |
54f9ee45 | 1363 | newobj = _controls_.new_CheckListBox(*args, **kwargs) |
d14a1e28 RD |
1364 | self.this = newobj.this |
1365 | self.thisown = 1 | |
1366 | del newobj.thisown | |
33b885b9 RD |
1367 | self._setOORInfo(self) |
1368 | ||
e811c8ce | 1369 | def Create(*args, **kwargs): |
0df68c9f | 1370 | """ |
248ed943 RD |
1371 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
1372 | Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, | |
0df68c9f | 1373 | long style=0, Validator validator=DefaultValidator, |
b2dc1044 | 1374 | String name=ListBoxNameStr) -> bool |
0df68c9f | 1375 | """ |
54f9ee45 | 1376 | return _controls_.CheckListBox_Create(*args, **kwargs) |
e811c8ce RD |
1377 | |
1378 | def IsChecked(*args, **kwargs): | |
a95a7133 | 1379 | """IsChecked(self, int index) -> bool""" |
54f9ee45 | 1380 | return _controls_.CheckListBox_IsChecked(*args, **kwargs) |
e811c8ce RD |
1381 | |
1382 | def Check(*args, **kwargs): | |
a95a7133 | 1383 | """Check(self, int index, int check=True)""" |
54f9ee45 | 1384 | return _controls_.CheckListBox_Check(*args, **kwargs) |
e811c8ce RD |
1385 | |
1386 | def GetItemHeight(*args, **kwargs): | |
a95a7133 | 1387 | """GetItemHeight(self) -> int""" |
54f9ee45 | 1388 | return _controls_.CheckListBox_GetItemHeight(*args, **kwargs) |
e811c8ce RD |
1389 | |
1390 | def HitTest(*args, **kwargs): | |
15afbcd0 | 1391 | """ |
a95a7133 | 1392 | HitTest(self, Point pt) -> int |
15afbcd0 RD |
1393 | |
1394 | Test where the given (in client coords) point lies | |
1395 | """ | |
54f9ee45 | 1396 | return _controls_.CheckListBox_HitTest(*args, **kwargs) |
e811c8ce RD |
1397 | |
1398 | def HitTestXY(*args, **kwargs): | |
15afbcd0 | 1399 | """ |
a95a7133 | 1400 | HitTestXY(self, int x, int y) -> int |
15afbcd0 RD |
1401 | |
1402 | Test where the given (in client coords) point lies | |
1403 | """ | |
54f9ee45 | 1404 | return _controls_.CheckListBox_HitTestXY(*args, **kwargs) |
e811c8ce | 1405 | |
d14a1e28 RD |
1406 | |
1407 | class CheckListBoxPtr(CheckListBox): | |
1408 | def __init__(self, this): | |
d24a34bb | 1409 | self.this = this |
d14a1e28 RD |
1410 | if not hasattr(self,"thisown"): self.thisown = 0 |
1411 | self.__class__ = CheckListBox | |
54f9ee45 | 1412 | _controls_.CheckListBox_swigregister(CheckListBoxPtr) |
d14a1e28 RD |
1413 | |
1414 | def PreCheckListBox(*args, **kwargs): | |
e811c8ce | 1415 | """PreCheckListBox() -> CheckListBox""" |
54f9ee45 | 1416 | val = _controls_.new_PreCheckListBox(*args, **kwargs) |
d14a1e28 RD |
1417 | val.thisown = 1 |
1418 | return val | |
1419 | ||
1420 | #--------------------------------------------------------------------------- | |
1421 | ||
54f9ee45 RD |
1422 | TE_NO_VSCROLL = _controls_.TE_NO_VSCROLL |
1423 | TE_AUTO_SCROLL = _controls_.TE_AUTO_SCROLL | |
1424 | TE_READONLY = _controls_.TE_READONLY | |
1425 | TE_MULTILINE = _controls_.TE_MULTILINE | |
1426 | TE_PROCESS_TAB = _controls_.TE_PROCESS_TAB | |
1427 | TE_LEFT = _controls_.TE_LEFT | |
1428 | TE_CENTER = _controls_.TE_CENTER | |
1429 | TE_RIGHT = _controls_.TE_RIGHT | |
1430 | TE_CENTRE = _controls_.TE_CENTRE | |
1431 | TE_RICH = _controls_.TE_RICH | |
1432 | TE_PROCESS_ENTER = _controls_.TE_PROCESS_ENTER | |
1433 | TE_PASSWORD = _controls_.TE_PASSWORD | |
1434 | TE_AUTO_URL = _controls_.TE_AUTO_URL | |
1435 | TE_NOHIDESEL = _controls_.TE_NOHIDESEL | |
1436 | TE_DONTWRAP = _controls_.TE_DONTWRAP | |
1437 | TE_LINEWRAP = _controls_.TE_LINEWRAP | |
1438 | TE_WORDWRAP = _controls_.TE_WORDWRAP | |
1439 | TE_RICH2 = _controls_.TE_RICH2 | |
1440 | TEXT_ALIGNMENT_DEFAULT = _controls_.TEXT_ALIGNMENT_DEFAULT | |
1441 | TEXT_ALIGNMENT_LEFT = _controls_.TEXT_ALIGNMENT_LEFT | |
1442 | TEXT_ALIGNMENT_CENTRE = _controls_.TEXT_ALIGNMENT_CENTRE | |
1443 | TEXT_ALIGNMENT_CENTER = _controls_.TEXT_ALIGNMENT_CENTER | |
1444 | TEXT_ALIGNMENT_RIGHT = _controls_.TEXT_ALIGNMENT_RIGHT | |
1445 | TEXT_ALIGNMENT_JUSTIFIED = _controls_.TEXT_ALIGNMENT_JUSTIFIED | |
1446 | TEXT_ATTR_TEXT_COLOUR = _controls_.TEXT_ATTR_TEXT_COLOUR | |
1447 | TEXT_ATTR_BACKGROUND_COLOUR = _controls_.TEXT_ATTR_BACKGROUND_COLOUR | |
1448 | TEXT_ATTR_FONT_FACE = _controls_.TEXT_ATTR_FONT_FACE | |
1449 | TEXT_ATTR_FONT_SIZE = _controls_.TEXT_ATTR_FONT_SIZE | |
1450 | TEXT_ATTR_FONT_WEIGHT = _controls_.TEXT_ATTR_FONT_WEIGHT | |
1451 | TEXT_ATTR_FONT_ITALIC = _controls_.TEXT_ATTR_FONT_ITALIC | |
1452 | TEXT_ATTR_FONT_UNDERLINE = _controls_.TEXT_ATTR_FONT_UNDERLINE | |
1453 | TEXT_ATTR_FONT = _controls_.TEXT_ATTR_FONT | |
1454 | TEXT_ATTR_ALIGNMENT = _controls_.TEXT_ATTR_ALIGNMENT | |
1455 | TEXT_ATTR_LEFT_INDENT = _controls_.TEXT_ATTR_LEFT_INDENT | |
1456 | TEXT_ATTR_RIGHT_INDENT = _controls_.TEXT_ATTR_RIGHT_INDENT | |
1457 | TEXT_ATTR_TABS = _controls_.TEXT_ATTR_TABS | |
1458 | TE_HT_UNKNOWN = _controls_.TE_HT_UNKNOWN | |
1459 | TE_HT_BEFORE = _controls_.TE_HT_BEFORE | |
1460 | TE_HT_ON_TEXT = _controls_.TE_HT_ON_TEXT | |
1461 | TE_HT_BELOW = _controls_.TE_HT_BELOW | |
1462 | TE_HT_BEYOND = _controls_.TE_HT_BEYOND | |
d14a1e28 | 1463 | class TextAttr(object): |
e811c8ce RD |
1464 | def __repr__(self): |
1465 | return "<%s.%s; proxy of C++ wxTextAttr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
908b74cd | 1466 | def __init__(self, *args, **kwargs): |
0df68c9f | 1467 | """ |
908b74cd RD |
1468 | __init__(self, Colour colText=wxNullColour, Colour colBack=wxNullColour, |
1469 | Font font=wxNullFont, int alignment=TEXT_ALIGNMENT_DEFAULT) -> TextAttr | |
0df68c9f | 1470 | """ |
908b74cd | 1471 | newobj = _controls_.new_TextAttr(*args, **kwargs) |
d14a1e28 RD |
1472 | self.this = newobj.this |
1473 | self.thisown = 1 | |
1474 | del newobj.thisown | |
54f9ee45 | 1475 | def __del__(self, destroy=_controls_.delete_TextAttr): |
a95a7133 | 1476 | """__del__(self)""" |
994141e6 RD |
1477 | try: |
1478 | if self.thisown: destroy(self) | |
1479 | except: pass | |
1480 | ||
e811c8ce | 1481 | def Init(*args, **kwargs): |
a95a7133 | 1482 | """Init(self)""" |
54f9ee45 | 1483 | return _controls_.TextAttr_Init(*args, **kwargs) |
e811c8ce RD |
1484 | |
1485 | def SetTextColour(*args, **kwargs): | |
a95a7133 | 1486 | """SetTextColour(self, Colour colText)""" |
54f9ee45 | 1487 | return _controls_.TextAttr_SetTextColour(*args, **kwargs) |
e811c8ce RD |
1488 | |
1489 | def SetBackgroundColour(*args, **kwargs): | |
a95a7133 | 1490 | """SetBackgroundColour(self, Colour colBack)""" |
54f9ee45 | 1491 | return _controls_.TextAttr_SetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
1492 | |
1493 | def SetFont(*args, **kwargs): | |
a95a7133 | 1494 | """SetFont(self, Font font, long flags=TEXT_ATTR_FONT)""" |
54f9ee45 | 1495 | return _controls_.TextAttr_SetFont(*args, **kwargs) |
e811c8ce RD |
1496 | |
1497 | def SetAlignment(*args, **kwargs): | |
a95a7133 | 1498 | """SetAlignment(self, int alignment)""" |
54f9ee45 | 1499 | return _controls_.TextAttr_SetAlignment(*args, **kwargs) |
e811c8ce RD |
1500 | |
1501 | def SetTabs(*args, **kwargs): | |
a95a7133 | 1502 | """SetTabs(self, wxArrayInt tabs)""" |
54f9ee45 | 1503 | return _controls_.TextAttr_SetTabs(*args, **kwargs) |
e811c8ce RD |
1504 | |
1505 | def SetLeftIndent(*args, **kwargs): | |
5e4ca4a8 | 1506 | """SetLeftIndent(self, int indent, int subIndent=0)""" |
54f9ee45 | 1507 | return _controls_.TextAttr_SetLeftIndent(*args, **kwargs) |
e811c8ce RD |
1508 | |
1509 | def SetRightIndent(*args, **kwargs): | |
a95a7133 | 1510 | """SetRightIndent(self, int indent)""" |
54f9ee45 | 1511 | return _controls_.TextAttr_SetRightIndent(*args, **kwargs) |
e811c8ce RD |
1512 | |
1513 | def SetFlags(*args, **kwargs): | |
a95a7133 | 1514 | """SetFlags(self, long flags)""" |
54f9ee45 | 1515 | return _controls_.TextAttr_SetFlags(*args, **kwargs) |
e811c8ce RD |
1516 | |
1517 | def HasTextColour(*args, **kwargs): | |
a95a7133 | 1518 | """HasTextColour(self) -> bool""" |
54f9ee45 | 1519 | return _controls_.TextAttr_HasTextColour(*args, **kwargs) |
e811c8ce RD |
1520 | |
1521 | def HasBackgroundColour(*args, **kwargs): | |
a95a7133 | 1522 | """HasBackgroundColour(self) -> bool""" |
54f9ee45 | 1523 | return _controls_.TextAttr_HasBackgroundColour(*args, **kwargs) |
e811c8ce RD |
1524 | |
1525 | def HasFont(*args, **kwargs): | |
a95a7133 | 1526 | """HasFont(self) -> bool""" |
54f9ee45 | 1527 | return _controls_.TextAttr_HasFont(*args, **kwargs) |
e811c8ce RD |
1528 | |
1529 | def HasAlignment(*args, **kwargs): | |
a95a7133 | 1530 | """HasAlignment(self) -> bool""" |
54f9ee45 | 1531 | return _controls_.TextAttr_HasAlignment(*args, **kwargs) |
e811c8ce RD |
1532 | |
1533 | def HasTabs(*args, **kwargs): | |
a95a7133 | 1534 | """HasTabs(self) -> bool""" |
54f9ee45 | 1535 | return _controls_.TextAttr_HasTabs(*args, **kwargs) |
e811c8ce RD |
1536 | |
1537 | def HasLeftIndent(*args, **kwargs): | |
a95a7133 | 1538 | """HasLeftIndent(self) -> bool""" |
54f9ee45 | 1539 | return _controls_.TextAttr_HasLeftIndent(*args, **kwargs) |
e811c8ce RD |
1540 | |
1541 | def HasRightIndent(*args, **kwargs): | |
a95a7133 | 1542 | """HasRightIndent(self) -> bool""" |
54f9ee45 | 1543 | return _controls_.TextAttr_HasRightIndent(*args, **kwargs) |
e811c8ce RD |
1544 | |
1545 | def HasFlag(*args, **kwargs): | |
a95a7133 | 1546 | """HasFlag(self, long flag) -> bool""" |
54f9ee45 | 1547 | return _controls_.TextAttr_HasFlag(*args, **kwargs) |
e811c8ce RD |
1548 | |
1549 | def GetTextColour(*args, **kwargs): | |
a95a7133 | 1550 | """GetTextColour(self) -> Colour""" |
54f9ee45 | 1551 | return _controls_.TextAttr_GetTextColour(*args, **kwargs) |
e811c8ce RD |
1552 | |
1553 | def GetBackgroundColour(*args, **kwargs): | |
a95a7133 | 1554 | """GetBackgroundColour(self) -> Colour""" |
54f9ee45 | 1555 | return _controls_.TextAttr_GetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
1556 | |
1557 | def GetFont(*args, **kwargs): | |
a95a7133 | 1558 | """GetFont(self) -> Font""" |
54f9ee45 | 1559 | return _controls_.TextAttr_GetFont(*args, **kwargs) |
e811c8ce RD |
1560 | |
1561 | def GetAlignment(*args, **kwargs): | |
a95a7133 | 1562 | """GetAlignment(self) -> int""" |
54f9ee45 | 1563 | return _controls_.TextAttr_GetAlignment(*args, **kwargs) |
e811c8ce RD |
1564 | |
1565 | def GetTabs(*args, **kwargs): | |
a95a7133 | 1566 | """GetTabs(self) -> wxArrayInt""" |
54f9ee45 | 1567 | return _controls_.TextAttr_GetTabs(*args, **kwargs) |
e811c8ce RD |
1568 | |
1569 | def GetLeftIndent(*args, **kwargs): | |
a95a7133 | 1570 | """GetLeftIndent(self) -> long""" |
54f9ee45 | 1571 | return _controls_.TextAttr_GetLeftIndent(*args, **kwargs) |
5e4ca4a8 RD |
1572 | |
1573 | def GetLeftSubIndent(*args, **kwargs): | |
1574 | """GetLeftSubIndent(self) -> long""" | |
1575 | return _controls_.TextAttr_GetLeftSubIndent(*args, **kwargs) | |
e811c8ce RD |
1576 | |
1577 | def GetRightIndent(*args, **kwargs): | |
a95a7133 | 1578 | """GetRightIndent(self) -> long""" |
54f9ee45 | 1579 | return _controls_.TextAttr_GetRightIndent(*args, **kwargs) |
e811c8ce RD |
1580 | |
1581 | def GetFlags(*args, **kwargs): | |
a95a7133 | 1582 | """GetFlags(self) -> long""" |
54f9ee45 | 1583 | return _controls_.TextAttr_GetFlags(*args, **kwargs) |
e811c8ce RD |
1584 | |
1585 | def IsDefault(*args, **kwargs): | |
a95a7133 | 1586 | """IsDefault(self) -> bool""" |
54f9ee45 | 1587 | return _controls_.TextAttr_IsDefault(*args, **kwargs) |
e811c8ce RD |
1588 | |
1589 | def Combine(*args, **kwargs): | |
66c033b4 | 1590 | """Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" |
54f9ee45 | 1591 | return _controls_.TextAttr_Combine(*args, **kwargs) |
e811c8ce RD |
1592 | |
1593 | Combine = staticmethod(Combine) | |
d14a1e28 RD |
1594 | |
1595 | class TextAttrPtr(TextAttr): | |
1596 | def __init__(self, this): | |
1597 | self.this = this | |
1598 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1599 | self.__class__ = TextAttr | |
54f9ee45 | 1600 | _controls_.TextAttr_swigregister(TextAttrPtr) |
b2dc1044 | 1601 | TextCtrlNameStr = cvar.TextCtrlNameStr |
d14a1e28 | 1602 | |
e811c8ce RD |
1603 | def TextAttr_Combine(*args, **kwargs): |
1604 | """TextAttr_Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" | |
54f9ee45 | 1605 | return _controls_.TextAttr_Combine(*args, **kwargs) |
d14a1e28 | 1606 | |
54f9ee45 | 1607 | class TextCtrl(_core.Control): |
e811c8ce RD |
1608 | def __repr__(self): |
1609 | return "<%s.%s; proxy of C++ wxTextCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1610 | def __init__(self, *args, **kwargs): |
0df68c9f | 1611 | """ |
248ed943 RD |
1612 | __init__(self, Window parent, int id=-1, String value=EmptyString, |
1613 | Point pos=DefaultPosition, Size size=DefaultSize, | |
0df68c9f | 1614 | long style=0, Validator validator=DefaultValidator, |
b2dc1044 | 1615 | String name=TextCtrlNameStr) -> TextCtrl |
0df68c9f | 1616 | """ |
54f9ee45 | 1617 | newobj = _controls_.new_TextCtrl(*args, **kwargs) |
d14a1e28 | 1618 | self.this = newobj.this |
d24a34bb | 1619 | self.thisown = 1 |
d14a1e28 | 1620 | del newobj.thisown |
0220cbc1 | 1621 | self._setOORInfo(self) |
e811c8ce RD |
1622 | |
1623 | def Create(*args, **kwargs): | |
0df68c9f | 1624 | """ |
248ed943 RD |
1625 | Create(self, Window parent, int id=-1, String value=EmptyString, |
1626 | Point pos=DefaultPosition, Size size=DefaultSize, | |
0df68c9f | 1627 | long style=0, Validator validator=DefaultValidator, |
b2dc1044 | 1628 | String name=TextCtrlNameStr) -> bool |
0df68c9f | 1629 | """ |
54f9ee45 | 1630 | return _controls_.TextCtrl_Create(*args, **kwargs) |
e811c8ce RD |
1631 | |
1632 | def GetValue(*args, **kwargs): | |
a95a7133 | 1633 | """GetValue(self) -> String""" |
54f9ee45 | 1634 | return _controls_.TextCtrl_GetValue(*args, **kwargs) |
e811c8ce RD |
1635 | |
1636 | def SetValue(*args, **kwargs): | |
a95a7133 | 1637 | """SetValue(self, String value)""" |
54f9ee45 | 1638 | return _controls_.TextCtrl_SetValue(*args, **kwargs) |
e811c8ce RD |
1639 | |
1640 | def GetRange(*args, **kwargs): | |
a95a7133 | 1641 | """GetRange(self, long from, long to) -> String""" |
54f9ee45 | 1642 | return _controls_.TextCtrl_GetRange(*args, **kwargs) |
e811c8ce RD |
1643 | |
1644 | def GetLineLength(*args, **kwargs): | |
a95a7133 | 1645 | """GetLineLength(self, long lineNo) -> int""" |
54f9ee45 | 1646 | return _controls_.TextCtrl_GetLineLength(*args, **kwargs) |
e811c8ce RD |
1647 | |
1648 | def GetLineText(*args, **kwargs): | |
a95a7133 | 1649 | """GetLineText(self, long lineNo) -> String""" |
54f9ee45 | 1650 | return _controls_.TextCtrl_GetLineText(*args, **kwargs) |
e811c8ce RD |
1651 | |
1652 | def GetNumberOfLines(*args, **kwargs): | |
a95a7133 | 1653 | """GetNumberOfLines(self) -> int""" |
54f9ee45 | 1654 | return _controls_.TextCtrl_GetNumberOfLines(*args, **kwargs) |
e811c8ce RD |
1655 | |
1656 | def IsModified(*args, **kwargs): | |
a95a7133 | 1657 | """IsModified(self) -> bool""" |
54f9ee45 | 1658 | return _controls_.TextCtrl_IsModified(*args, **kwargs) |
e811c8ce RD |
1659 | |
1660 | def IsEditable(*args, **kwargs): | |
a95a7133 | 1661 | """IsEditable(self) -> bool""" |
54f9ee45 | 1662 | return _controls_.TextCtrl_IsEditable(*args, **kwargs) |
e811c8ce RD |
1663 | |
1664 | def IsSingleLine(*args, **kwargs): | |
a95a7133 | 1665 | """IsSingleLine(self) -> bool""" |
54f9ee45 | 1666 | return _controls_.TextCtrl_IsSingleLine(*args, **kwargs) |
e811c8ce RD |
1667 | |
1668 | def IsMultiLine(*args, **kwargs): | |
a95a7133 | 1669 | """IsMultiLine(self) -> bool""" |
54f9ee45 | 1670 | return _controls_.TextCtrl_IsMultiLine(*args, **kwargs) |
e811c8ce RD |
1671 | |
1672 | def GetSelection(*args, **kwargs): | |
fd2dc343 RD |
1673 | """ |
1674 | GetSelection() -> (from, to) | |
1675 | ||
1676 | If the return values from and to are the same, there is no selection. | |
1677 | """ | |
54f9ee45 | 1678 | return _controls_.TextCtrl_GetSelection(*args, **kwargs) |
e811c8ce RD |
1679 | |
1680 | def GetStringSelection(*args, **kwargs): | |
a95a7133 | 1681 | """GetStringSelection(self) -> String""" |
54f9ee45 | 1682 | return _controls_.TextCtrl_GetStringSelection(*args, **kwargs) |
e811c8ce RD |
1683 | |
1684 | def Clear(*args, **kwargs): | |
a95a7133 | 1685 | """Clear(self)""" |
54f9ee45 | 1686 | return _controls_.TextCtrl_Clear(*args, **kwargs) |
e811c8ce RD |
1687 | |
1688 | def Replace(*args, **kwargs): | |
a95a7133 | 1689 | """Replace(self, long from, long to, String value)""" |
54f9ee45 | 1690 | return _controls_.TextCtrl_Replace(*args, **kwargs) |
e811c8ce RD |
1691 | |
1692 | def Remove(*args, **kwargs): | |
a95a7133 | 1693 | """Remove(self, long from, long to)""" |
54f9ee45 | 1694 | return _controls_.TextCtrl_Remove(*args, **kwargs) |
e811c8ce RD |
1695 | |
1696 | def LoadFile(*args, **kwargs): | |
a95a7133 | 1697 | """LoadFile(self, String file) -> bool""" |
54f9ee45 | 1698 | return _controls_.TextCtrl_LoadFile(*args, **kwargs) |
e811c8ce RD |
1699 | |
1700 | def SaveFile(*args, **kwargs): | |
a95a7133 | 1701 | """SaveFile(self, String file=EmptyString) -> bool""" |
54f9ee45 | 1702 | return _controls_.TextCtrl_SaveFile(*args, **kwargs) |
e811c8ce RD |
1703 | |
1704 | def MarkDirty(*args, **kwargs): | |
a95a7133 | 1705 | """MarkDirty(self)""" |
54f9ee45 | 1706 | return _controls_.TextCtrl_MarkDirty(*args, **kwargs) |
e811c8ce RD |
1707 | |
1708 | def DiscardEdits(*args, **kwargs): | |
a95a7133 | 1709 | """DiscardEdits(self)""" |
54f9ee45 | 1710 | return _controls_.TextCtrl_DiscardEdits(*args, **kwargs) |
e811c8ce RD |
1711 | |
1712 | def SetMaxLength(*args, **kwargs): | |
a95a7133 | 1713 | """SetMaxLength(self, unsigned long len)""" |
54f9ee45 | 1714 | return _controls_.TextCtrl_SetMaxLength(*args, **kwargs) |
e811c8ce RD |
1715 | |
1716 | def WriteText(*args, **kwargs): | |
a95a7133 | 1717 | """WriteText(self, String text)""" |
54f9ee45 | 1718 | return _controls_.TextCtrl_WriteText(*args, **kwargs) |
e811c8ce RD |
1719 | |
1720 | def AppendText(*args, **kwargs): | |
a95a7133 | 1721 | """AppendText(self, String text)""" |
54f9ee45 | 1722 | return _controls_.TextCtrl_AppendText(*args, **kwargs) |
e811c8ce RD |
1723 | |
1724 | def EmulateKeyPress(*args, **kwargs): | |
a95a7133 | 1725 | """EmulateKeyPress(self, KeyEvent event) -> bool""" |
54f9ee45 | 1726 | return _controls_.TextCtrl_EmulateKeyPress(*args, **kwargs) |
e811c8ce RD |
1727 | |
1728 | def SetStyle(*args, **kwargs): | |
a95a7133 | 1729 | """SetStyle(self, long start, long end, TextAttr style) -> bool""" |
54f9ee45 | 1730 | return _controls_.TextCtrl_SetStyle(*args, **kwargs) |
e811c8ce RD |
1731 | |
1732 | def GetStyle(*args, **kwargs): | |
a95a7133 | 1733 | """GetStyle(self, long position, TextAttr style) -> bool""" |
54f9ee45 | 1734 | return _controls_.TextCtrl_GetStyle(*args, **kwargs) |
e811c8ce RD |
1735 | |
1736 | def SetDefaultStyle(*args, **kwargs): | |
a95a7133 | 1737 | """SetDefaultStyle(self, TextAttr style) -> bool""" |
54f9ee45 | 1738 | return _controls_.TextCtrl_SetDefaultStyle(*args, **kwargs) |
e811c8ce RD |
1739 | |
1740 | def GetDefaultStyle(*args, **kwargs): | |
a95a7133 | 1741 | """GetDefaultStyle(self) -> TextAttr""" |
54f9ee45 | 1742 | return _controls_.TextCtrl_GetDefaultStyle(*args, **kwargs) |
e811c8ce RD |
1743 | |
1744 | def XYToPosition(*args, **kwargs): | |
a95a7133 | 1745 | """XYToPosition(self, long x, long y) -> long""" |
54f9ee45 | 1746 | return _controls_.TextCtrl_XYToPosition(*args, **kwargs) |
e811c8ce RD |
1747 | |
1748 | def PositionToXY(*args, **kwargs): | |
322913ce | 1749 | """PositionToXY(long pos) -> (x, y)""" |
54f9ee45 | 1750 | return _controls_.TextCtrl_PositionToXY(*args, **kwargs) |
e811c8ce RD |
1751 | |
1752 | def ShowPosition(*args, **kwargs): | |
a95a7133 | 1753 | """ShowPosition(self, long pos)""" |
54f9ee45 | 1754 | return _controls_.TextCtrl_ShowPosition(*args, **kwargs) |
e811c8ce | 1755 | |
4d5c3d91 | 1756 | def HitTest(*args, **kwargs): |
fd2dc343 RD |
1757 | """ |
1758 | HitTest(Point pt) -> (result, row, col) | |
1759 | ||
1760 | Find the character at position given in pixels. NB: pt is in device | |
1761 | coords but is not adjusted for the client area origin nor scrolling | |
1762 | """ | |
54f9ee45 | 1763 | return _controls_.TextCtrl_HitTest(*args, **kwargs) |
4d5c3d91 | 1764 | |
e811c8ce | 1765 | def Copy(*args, **kwargs): |
a95a7133 | 1766 | """Copy(self)""" |
54f9ee45 | 1767 | return _controls_.TextCtrl_Copy(*args, **kwargs) |
e811c8ce RD |
1768 | |
1769 | def Cut(*args, **kwargs): | |
a95a7133 | 1770 | """Cut(self)""" |
54f9ee45 | 1771 | return _controls_.TextCtrl_Cut(*args, **kwargs) |
e811c8ce RD |
1772 | |
1773 | def Paste(*args, **kwargs): | |
a95a7133 | 1774 | """Paste(self)""" |
54f9ee45 | 1775 | return _controls_.TextCtrl_Paste(*args, **kwargs) |
e811c8ce RD |
1776 | |
1777 | def CanCopy(*args, **kwargs): | |
a95a7133 | 1778 | """CanCopy(self) -> bool""" |
54f9ee45 | 1779 | return _controls_.TextCtrl_CanCopy(*args, **kwargs) |
e811c8ce RD |
1780 | |
1781 | def CanCut(*args, **kwargs): | |
a95a7133 | 1782 | """CanCut(self) -> bool""" |
54f9ee45 | 1783 | return _controls_.TextCtrl_CanCut(*args, **kwargs) |
e811c8ce RD |
1784 | |
1785 | def CanPaste(*args, **kwargs): | |
a95a7133 | 1786 | """CanPaste(self) -> bool""" |
54f9ee45 | 1787 | return _controls_.TextCtrl_CanPaste(*args, **kwargs) |
e811c8ce RD |
1788 | |
1789 | def Undo(*args, **kwargs): | |
a95a7133 | 1790 | """Undo(self)""" |
54f9ee45 | 1791 | return _controls_.TextCtrl_Undo(*args, **kwargs) |
e811c8ce RD |
1792 | |
1793 | def Redo(*args, **kwargs): | |
a95a7133 | 1794 | """Redo(self)""" |
54f9ee45 | 1795 | return _controls_.TextCtrl_Redo(*args, **kwargs) |
e811c8ce RD |
1796 | |
1797 | def CanUndo(*args, **kwargs): | |
a95a7133 | 1798 | """CanUndo(self) -> bool""" |
54f9ee45 | 1799 | return _controls_.TextCtrl_CanUndo(*args, **kwargs) |
e811c8ce RD |
1800 | |
1801 | def CanRedo(*args, **kwargs): | |
a95a7133 | 1802 | """CanRedo(self) -> bool""" |
54f9ee45 | 1803 | return _controls_.TextCtrl_CanRedo(*args, **kwargs) |
e811c8ce RD |
1804 | |
1805 | def SetInsertionPoint(*args, **kwargs): | |
a95a7133 | 1806 | """SetInsertionPoint(self, long pos)""" |
54f9ee45 | 1807 | return _controls_.TextCtrl_SetInsertionPoint(*args, **kwargs) |
e811c8ce RD |
1808 | |
1809 | def SetInsertionPointEnd(*args, **kwargs): | |
a95a7133 | 1810 | """SetInsertionPointEnd(self)""" |
54f9ee45 | 1811 | return _controls_.TextCtrl_SetInsertionPointEnd(*args, **kwargs) |
e811c8ce RD |
1812 | |
1813 | def GetInsertionPoint(*args, **kwargs): | |
a95a7133 | 1814 | """GetInsertionPoint(self) -> long""" |
54f9ee45 | 1815 | return _controls_.TextCtrl_GetInsertionPoint(*args, **kwargs) |
e811c8ce RD |
1816 | |
1817 | def GetLastPosition(*args, **kwargs): | |
a95a7133 | 1818 | """GetLastPosition(self) -> long""" |
54f9ee45 | 1819 | return _controls_.TextCtrl_GetLastPosition(*args, **kwargs) |
e811c8ce RD |
1820 | |
1821 | def SetSelection(*args, **kwargs): | |
a95a7133 | 1822 | """SetSelection(self, long from, long to)""" |
54f9ee45 | 1823 | return _controls_.TextCtrl_SetSelection(*args, **kwargs) |
e811c8ce RD |
1824 | |
1825 | def SelectAll(*args, **kwargs): | |
a95a7133 | 1826 | """SelectAll(self)""" |
54f9ee45 | 1827 | return _controls_.TextCtrl_SelectAll(*args, **kwargs) |
e811c8ce RD |
1828 | |
1829 | def SetEditable(*args, **kwargs): | |
a95a7133 | 1830 | """SetEditable(self, bool editable)""" |
54f9ee45 | 1831 | return _controls_.TextCtrl_SetEditable(*args, **kwargs) |
e811c8ce RD |
1832 | |
1833 | def write(*args, **kwargs): | |
a95a7133 | 1834 | """write(self, String text)""" |
54f9ee45 | 1835 | return _controls_.TextCtrl_write(*args, **kwargs) |
e811c8ce RD |
1836 | |
1837 | def GetString(*args, **kwargs): | |
a95a7133 | 1838 | """GetString(self, long from, long to) -> String""" |
54f9ee45 | 1839 | return _controls_.TextCtrl_GetString(*args, **kwargs) |
e811c8ce | 1840 | |
22bfe96c | 1841 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1842 | """ |
1843 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1844 | ||
1845 | Get the default attributes for this class. This is useful if you want | |
1846 | to use the same font or colour in your own control as in a standard | |
1847 | control -- which is a much better idea than hard coding specific | |
1848 | colours or fonts which might look completely out of place on the | |
1849 | user's system, especially if it uses themes. | |
1850 | ||
1851 | The variant parameter is only relevant under Mac currently and is | |
1852 | ignore under other platforms. Under Mac, it will change the size of | |
1853 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
1854 | this. | |
1855 | """ | |
22bfe96c RD |
1856 | return _controls_.TextCtrl_GetClassDefaultAttributes(*args, **kwargs) |
1857 | ||
1858 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
d24a34bb | 1859 | |
d14a1e28 RD |
1860 | class TextCtrlPtr(TextCtrl): |
1861 | def __init__(self, this): | |
1862 | self.this = this | |
1863 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1864 | self.__class__ = TextCtrl | |
54f9ee45 | 1865 | _controls_.TextCtrl_swigregister(TextCtrlPtr) |
d24a34bb | 1866 | |
d14a1e28 | 1867 | def PreTextCtrl(*args, **kwargs): |
e811c8ce | 1868 | """PreTextCtrl() -> TextCtrl""" |
54f9ee45 | 1869 | val = _controls_.new_PreTextCtrl(*args, **kwargs) |
aa2a5b86 RD |
1870 | val.thisown = 1 |
1871 | return val | |
1872 | ||
22bfe96c | 1873 | def TextCtrl_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1874 | """ |
1875 | TextCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1876 | ||
1877 | Get the default attributes for this class. This is useful if you want | |
1878 | to use the same font or colour in your own control as in a standard | |
1879 | control -- which is a much better idea than hard coding specific | |
1880 | colours or fonts which might look completely out of place on the | |
1881 | user's system, especially if it uses themes. | |
1882 | ||
1883 | The variant parameter is only relevant under Mac currently and is | |
1884 | ignore under other platforms. Under Mac, it will change the size of | |
1885 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
1886 | this. | |
1887 | """ | |
22bfe96c RD |
1888 | return _controls_.TextCtrl_GetClassDefaultAttributes(*args, **kwargs) |
1889 | ||
54f9ee45 RD |
1890 | wxEVT_COMMAND_TEXT_UPDATED = _controls_.wxEVT_COMMAND_TEXT_UPDATED |
1891 | wxEVT_COMMAND_TEXT_ENTER = _controls_.wxEVT_COMMAND_TEXT_ENTER | |
1892 | wxEVT_COMMAND_TEXT_URL = _controls_.wxEVT_COMMAND_TEXT_URL | |
1893 | wxEVT_COMMAND_TEXT_MAXLEN = _controls_.wxEVT_COMMAND_TEXT_MAXLEN | |
1894 | class TextUrlEvent(_core.CommandEvent): | |
e811c8ce RD |
1895 | def __repr__(self): |
1896 | return "<%s.%s; proxy of C++ wxTextUrlEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1897 | def __init__(self, *args, **kwargs): |
a95a7133 | 1898 | """__init__(self, int winid, MouseEvent evtMouse, long start, long end) -> TextUrlEvent""" |
54f9ee45 | 1899 | newobj = _controls_.new_TextUrlEvent(*args, **kwargs) |
d14a1e28 RD |
1900 | self.this = newobj.this |
1901 | self.thisown = 1 | |
1902 | del newobj.thisown | |
e811c8ce | 1903 | def GetMouseEvent(*args, **kwargs): |
a95a7133 | 1904 | """GetMouseEvent(self) -> MouseEvent""" |
54f9ee45 | 1905 | return _controls_.TextUrlEvent_GetMouseEvent(*args, **kwargs) |
e811c8ce RD |
1906 | |
1907 | def GetURLStart(*args, **kwargs): | |
a95a7133 | 1908 | """GetURLStart(self) -> long""" |
54f9ee45 | 1909 | return _controls_.TextUrlEvent_GetURLStart(*args, **kwargs) |
e811c8ce RD |
1910 | |
1911 | def GetURLEnd(*args, **kwargs): | |
a95a7133 | 1912 | """GetURLEnd(self) -> long""" |
54f9ee45 | 1913 | return _controls_.TextUrlEvent_GetURLEnd(*args, **kwargs) |
e811c8ce | 1914 | |
d24a34bb | 1915 | |
d14a1e28 RD |
1916 | class TextUrlEventPtr(TextUrlEvent): |
1917 | def __init__(self, this): | |
70551f47 | 1918 | self.this = this |
d14a1e28 RD |
1919 | if not hasattr(self,"thisown"): self.thisown = 0 |
1920 | self.__class__ = TextUrlEvent | |
54f9ee45 | 1921 | _controls_.TextUrlEvent_swigregister(TextUrlEventPtr) |
d14a1e28 RD |
1922 | |
1923 | EVT_TEXT = wx.PyEventBinder( wxEVT_COMMAND_TEXT_UPDATED, 1) | |
1924 | EVT_TEXT_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TEXT_ENTER, 1) | |
1925 | EVT_TEXT_URL = wx.PyEventBinder( wxEVT_COMMAND_TEXT_URL, 1) | |
1926 | EVT_TEXT_MAXLEN = wx.PyEventBinder( wxEVT_COMMAND_TEXT_MAXLEN, 1) | |
1927 | ||
1928 | #--------------------------------------------------------------------------- | |
1929 | ||
54f9ee45 | 1930 | class ScrollBar(_core.Control): |
e811c8ce RD |
1931 | def __repr__(self): |
1932 | return "<%s.%s; proxy of C++ wxScrollBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1933 | def __init__(self, *args, **kwargs): |
0df68c9f | 1934 | """ |
a95a7133 | 1935 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f | 1936 | Size size=DefaultSize, long style=SB_HORIZONTAL, |
b2dc1044 | 1937 | Validator validator=DefaultValidator, String name=ScrollBarNameStr) -> ScrollBar |
0df68c9f | 1938 | """ |
54f9ee45 | 1939 | newobj = _controls_.new_ScrollBar(*args, **kwargs) |
d14a1e28 | 1940 | self.this = newobj.this |
70551f47 | 1941 | self.thisown = 1 |
d14a1e28 | 1942 | del newobj.thisown |
0220cbc1 | 1943 | self._setOORInfo(self) |
e811c8ce RD |
1944 | |
1945 | def Create(*args, **kwargs): | |
0df68c9f | 1946 | """ |
a95a7133 | 1947 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f | 1948 | Size size=DefaultSize, long style=SB_HORIZONTAL, |
b2dc1044 | 1949 | Validator validator=DefaultValidator, String name=ScrollBarNameStr) -> bool |
15afbcd0 RD |
1950 | |
1951 | Do the 2nd phase and create the GUI control. | |
0df68c9f | 1952 | """ |
54f9ee45 | 1953 | return _controls_.ScrollBar_Create(*args, **kwargs) |
e811c8ce RD |
1954 | |
1955 | def GetThumbPosition(*args, **kwargs): | |
a95a7133 | 1956 | """GetThumbPosition(self) -> int""" |
54f9ee45 | 1957 | return _controls_.ScrollBar_GetThumbPosition(*args, **kwargs) |
e811c8ce RD |
1958 | |
1959 | def GetThumbSize(*args, **kwargs): | |
a95a7133 | 1960 | """GetThumbSize(self) -> int""" |
54f9ee45 | 1961 | return _controls_.ScrollBar_GetThumbSize(*args, **kwargs) |
e811c8ce | 1962 | |
d14a1e28 | 1963 | GetThumbLength = GetThumbSize |
e811c8ce | 1964 | def GetPageSize(*args, **kwargs): |
a95a7133 | 1965 | """GetPageSize(self) -> int""" |
54f9ee45 | 1966 | return _controls_.ScrollBar_GetPageSize(*args, **kwargs) |
e811c8ce RD |
1967 | |
1968 | def GetRange(*args, **kwargs): | |
a95a7133 | 1969 | """GetRange(self) -> int""" |
54f9ee45 | 1970 | return _controls_.ScrollBar_GetRange(*args, **kwargs) |
e811c8ce RD |
1971 | |
1972 | def IsVertical(*args, **kwargs): | |
a95a7133 | 1973 | """IsVertical(self) -> bool""" |
54f9ee45 | 1974 | return _controls_.ScrollBar_IsVertical(*args, **kwargs) |
e811c8ce RD |
1975 | |
1976 | def SetThumbPosition(*args, **kwargs): | |
a95a7133 | 1977 | """SetThumbPosition(self, int viewStart)""" |
54f9ee45 | 1978 | return _controls_.ScrollBar_SetThumbPosition(*args, **kwargs) |
e811c8ce RD |
1979 | |
1980 | def SetScrollbar(*args, **kwargs): | |
0df68c9f | 1981 | """ |
a95a7133 | 1982 | SetScrollbar(self, int position, int thumbSize, int range, int pageSize, |
0df68c9f | 1983 | bool refresh=True) |
15afbcd0 RD |
1984 | |
1985 | Sets the scrollbar properties of a built-in scrollbar. | |
0df68c9f | 1986 | """ |
54f9ee45 | 1987 | return _controls_.ScrollBar_SetScrollbar(*args, **kwargs) |
e811c8ce | 1988 | |
22bfe96c | 1989 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
1990 | """ |
1991 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
1992 | ||
1993 | Get the default attributes for this class. This is useful if you want | |
1994 | to use the same font or colour in your own control as in a standard | |
1995 | control -- which is a much better idea than hard coding specific | |
1996 | colours or fonts which might look completely out of place on the | |
1997 | user's system, especially if it uses themes. | |
1998 | ||
1999 | The variant parameter is only relevant under Mac currently and is | |
2000 | ignore under other platforms. Under Mac, it will change the size of | |
2001 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2002 | this. | |
2003 | """ | |
22bfe96c RD |
2004 | return _controls_.ScrollBar_GetClassDefaultAttributes(*args, **kwargs) |
2005 | ||
2006 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 2007 | |
d14a1e28 RD |
2008 | class ScrollBarPtr(ScrollBar): |
2009 | def __init__(self, this): | |
2010 | self.this = this | |
2011 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2012 | self.__class__ = ScrollBar | |
54f9ee45 | 2013 | _controls_.ScrollBar_swigregister(ScrollBarPtr) |
b2dc1044 | 2014 | ScrollBarNameStr = cvar.ScrollBarNameStr |
70551f47 | 2015 | |
d14a1e28 | 2016 | def PreScrollBar(*args, **kwargs): |
e811c8ce | 2017 | """PreScrollBar() -> ScrollBar""" |
54f9ee45 | 2018 | val = _controls_.new_PreScrollBar(*args, **kwargs) |
aa2a5b86 RD |
2019 | val.thisown = 1 |
2020 | return val | |
2021 | ||
22bfe96c | 2022 | def ScrollBar_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2023 | """ |
2024 | ScrollBar_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2025 | ||
2026 | Get the default attributes for this class. This is useful if you want | |
2027 | to use the same font or colour in your own control as in a standard | |
2028 | control -- which is a much better idea than hard coding specific | |
2029 | colours or fonts which might look completely out of place on the | |
2030 | user's system, especially if it uses themes. | |
2031 | ||
2032 | The variant parameter is only relevant under Mac currently and is | |
2033 | ignore under other platforms. Under Mac, it will change the size of | |
2034 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2035 | this. | |
2036 | """ | |
22bfe96c RD |
2037 | return _controls_.ScrollBar_GetClassDefaultAttributes(*args, **kwargs) |
2038 | ||
d14a1e28 | 2039 | #--------------------------------------------------------------------------- |
70551f47 | 2040 | |
54f9ee45 RD |
2041 | SP_HORIZONTAL = _controls_.SP_HORIZONTAL |
2042 | SP_VERTICAL = _controls_.SP_VERTICAL | |
2043 | SP_ARROW_KEYS = _controls_.SP_ARROW_KEYS | |
2044 | SP_WRAP = _controls_.SP_WRAP | |
2045 | class SpinButton(_core.Control): | |
e811c8ce RD |
2046 | def __repr__(self): |
2047 | return "<%s.%s; proxy of C++ wxSpinButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2048 | def __init__(self, *args, **kwargs): |
0df68c9f | 2049 | """ |
a95a7133 | 2050 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f | 2051 | Size size=DefaultSize, long style=SP_HORIZONTAL, |
b2dc1044 | 2052 | String name=SPIN_BUTTON_NAME) -> SpinButton |
0df68c9f | 2053 | """ |
54f9ee45 | 2054 | newobj = _controls_.new_SpinButton(*args, **kwargs) |
d14a1e28 | 2055 | self.this = newobj.this |
70551f47 | 2056 | self.thisown = 1 |
d14a1e28 | 2057 | del newobj.thisown |
0220cbc1 | 2058 | self._setOORInfo(self) |
70551f47 | 2059 | |
e811c8ce | 2060 | def Create(*args, **kwargs): |
0df68c9f | 2061 | """ |
a95a7133 | 2062 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f | 2063 | Size size=DefaultSize, long style=SP_HORIZONTAL, |
b2dc1044 | 2064 | String name=SPIN_BUTTON_NAME) -> bool |
0df68c9f | 2065 | """ |
54f9ee45 | 2066 | return _controls_.SpinButton_Create(*args, **kwargs) |
e811c8ce RD |
2067 | |
2068 | def GetValue(*args, **kwargs): | |
a95a7133 | 2069 | """GetValue(self) -> int""" |
54f9ee45 | 2070 | return _controls_.SpinButton_GetValue(*args, **kwargs) |
e811c8ce RD |
2071 | |
2072 | def GetMin(*args, **kwargs): | |
a95a7133 | 2073 | """GetMin(self) -> int""" |
54f9ee45 | 2074 | return _controls_.SpinButton_GetMin(*args, **kwargs) |
e811c8ce RD |
2075 | |
2076 | def GetMax(*args, **kwargs): | |
a95a7133 | 2077 | """GetMax(self) -> int""" |
54f9ee45 | 2078 | return _controls_.SpinButton_GetMax(*args, **kwargs) |
e811c8ce RD |
2079 | |
2080 | def SetValue(*args, **kwargs): | |
a95a7133 | 2081 | """SetValue(self, int val)""" |
54f9ee45 | 2082 | return _controls_.SpinButton_SetValue(*args, **kwargs) |
e811c8ce RD |
2083 | |
2084 | def SetMin(*args, **kwargs): | |
a95a7133 | 2085 | """SetMin(self, int minVal)""" |
54f9ee45 | 2086 | return _controls_.SpinButton_SetMin(*args, **kwargs) |
e811c8ce RD |
2087 | |
2088 | def SetMax(*args, **kwargs): | |
a95a7133 | 2089 | """SetMax(self, int maxVal)""" |
54f9ee45 | 2090 | return _controls_.SpinButton_SetMax(*args, **kwargs) |
e811c8ce RD |
2091 | |
2092 | def SetRange(*args, **kwargs): | |
a95a7133 | 2093 | """SetRange(self, int minVal, int maxVal)""" |
54f9ee45 | 2094 | return _controls_.SpinButton_SetRange(*args, **kwargs) |
e811c8ce | 2095 | |
22bfe96c RD |
2096 | def IsVertical(*args, **kwargs): |
2097 | """IsVertical(self) -> bool""" | |
2098 | return _controls_.SpinButton_IsVertical(*args, **kwargs) | |
2099 | ||
2100 | def GetClassDefaultAttributes(*args, **kwargs): | |
110da5b0 RD |
2101 | """ |
2102 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2103 | ||
2104 | Get the default attributes for this class. This is useful if you want | |
2105 | to use the same font or colour in your own control as in a standard | |
2106 | control -- which is a much better idea than hard coding specific | |
2107 | colours or fonts which might look completely out of place on the | |
2108 | user's system, especially if it uses themes. | |
2109 | ||
2110 | The variant parameter is only relevant under Mac currently and is | |
2111 | ignore under other platforms. Under Mac, it will change the size of | |
2112 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2113 | this. | |
2114 | """ | |
22bfe96c | 2115 | return _controls_.SpinButton_GetClassDefaultAttributes(*args, **kwargs) |
e811c8ce | 2116 | |
22bfe96c | 2117 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) |
e811c8ce RD |
2118 | |
2119 | class SpinButtonPtr(SpinButton): | |
2120 | def __init__(self, this): | |
2121 | self.this = this | |
2122 | if not hasattr(self,"thisown"): self.thisown = 0 | |
d14a1e28 | 2123 | self.__class__ = SpinButton |
54f9ee45 | 2124 | _controls_.SpinButton_swigregister(SpinButtonPtr) |
b2dc1044 RD |
2125 | SPIN_BUTTON_NAME = cvar.SPIN_BUTTON_NAME |
2126 | SpinCtrlNameStr = cvar.SpinCtrlNameStr | |
70551f47 | 2127 | |
d14a1e28 | 2128 | def PreSpinButton(*args, **kwargs): |
e811c8ce | 2129 | """PreSpinButton() -> SpinButton""" |
54f9ee45 | 2130 | val = _controls_.new_PreSpinButton(*args, **kwargs) |
aa2a5b86 RD |
2131 | val.thisown = 1 |
2132 | return val | |
2133 | ||
22bfe96c | 2134 | def SpinButton_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2135 | """ |
2136 | SpinButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2137 | ||
2138 | Get the default attributes for this class. This is useful if you want | |
2139 | to use the same font or colour in your own control as in a standard | |
2140 | control -- which is a much better idea than hard coding specific | |
2141 | colours or fonts which might look completely out of place on the | |
2142 | user's system, especially if it uses themes. | |
2143 | ||
2144 | The variant parameter is only relevant under Mac currently and is | |
2145 | ignore under other platforms. Under Mac, it will change the size of | |
2146 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2147 | this. | |
2148 | """ | |
22bfe96c RD |
2149 | return _controls_.SpinButton_GetClassDefaultAttributes(*args, **kwargs) |
2150 | ||
54f9ee45 | 2151 | class SpinCtrl(_core.Control): |
e811c8ce RD |
2152 | def __repr__(self): |
2153 | return "<%s.%s; proxy of C++ wxSpinCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2154 | def __init__(self, *args, **kwargs): |
0df68c9f | 2155 | """ |
a95a7133 | 2156 | __init__(self, Window parent, int id=-1, String value=EmptyString, |
0df68c9f | 2157 | Point pos=DefaultPosition, Size size=DefaultSize, |
196addbf | 2158 | long style=SP_ARROW_KEYS, int min=0, int max=100, |
b2dc1044 | 2159 | int initial=0, String name=SpinCtrlNameStr) -> SpinCtrl |
0df68c9f | 2160 | """ |
54f9ee45 | 2161 | newobj = _controls_.new_SpinCtrl(*args, **kwargs) |
d14a1e28 RD |
2162 | self.this = newobj.this |
2163 | self.thisown = 1 | |
2164 | del newobj.thisown | |
2165 | self._setOORInfo(self) | |
e811c8ce RD |
2166 | |
2167 | def Create(*args, **kwargs): | |
0df68c9f | 2168 | """ |
a95a7133 | 2169 | Create(self, Window parent, int id=-1, String value=EmptyString, |
0df68c9f | 2170 | Point pos=DefaultPosition, Size size=DefaultSize, |
196addbf | 2171 | long style=SP_ARROW_KEYS, int min=0, int max=100, |
b2dc1044 | 2172 | int initial=0, String name=SpinCtrlNameStr) -> bool |
0df68c9f | 2173 | """ |
54f9ee45 | 2174 | return _controls_.SpinCtrl_Create(*args, **kwargs) |
e811c8ce RD |
2175 | |
2176 | def GetValue(*args, **kwargs): | |
a95a7133 | 2177 | """GetValue(self) -> int""" |
54f9ee45 | 2178 | return _controls_.SpinCtrl_GetValue(*args, **kwargs) |
e811c8ce RD |
2179 | |
2180 | def SetValue(*args, **kwargs): | |
a95a7133 | 2181 | """SetValue(self, int value)""" |
54f9ee45 | 2182 | return _controls_.SpinCtrl_SetValue(*args, **kwargs) |
e811c8ce RD |
2183 | |
2184 | def SetValueString(*args, **kwargs): | |
a95a7133 | 2185 | """SetValueString(self, String text)""" |
54f9ee45 | 2186 | return _controls_.SpinCtrl_SetValueString(*args, **kwargs) |
e811c8ce RD |
2187 | |
2188 | def SetRange(*args, **kwargs): | |
a95a7133 | 2189 | """SetRange(self, int minVal, int maxVal)""" |
54f9ee45 | 2190 | return _controls_.SpinCtrl_SetRange(*args, **kwargs) |
e811c8ce RD |
2191 | |
2192 | def GetMin(*args, **kwargs): | |
a95a7133 | 2193 | """GetMin(self) -> int""" |
54f9ee45 | 2194 | return _controls_.SpinCtrl_GetMin(*args, **kwargs) |
e811c8ce RD |
2195 | |
2196 | def GetMax(*args, **kwargs): | |
a95a7133 | 2197 | """GetMax(self) -> int""" |
54f9ee45 | 2198 | return _controls_.SpinCtrl_GetMax(*args, **kwargs) |
e811c8ce RD |
2199 | |
2200 | def SetSelection(*args, **kwargs): | |
a95a7133 | 2201 | """SetSelection(self, long from, long to)""" |
54f9ee45 | 2202 | return _controls_.SpinCtrl_SetSelection(*args, **kwargs) |
e811c8ce | 2203 | |
22bfe96c | 2204 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2205 | """ |
2206 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2207 | ||
2208 | Get the default attributes for this class. This is useful if you want | |
2209 | to use the same font or colour in your own control as in a standard | |
2210 | control -- which is a much better idea than hard coding specific | |
2211 | colours or fonts which might look completely out of place on the | |
2212 | user's system, especially if it uses themes. | |
2213 | ||
2214 | The variant parameter is only relevant under Mac currently and is | |
2215 | ignore under other platforms. Under Mac, it will change the size of | |
2216 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2217 | this. | |
2218 | """ | |
22bfe96c RD |
2219 | return _controls_.SpinCtrl_GetClassDefaultAttributes(*args, **kwargs) |
2220 | ||
2221 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 2222 | |
d14a1e28 RD |
2223 | class SpinCtrlPtr(SpinCtrl): |
2224 | def __init__(self, this): | |
c95e68d8 | 2225 | self.this = this |
d14a1e28 RD |
2226 | if not hasattr(self,"thisown"): self.thisown = 0 |
2227 | self.__class__ = SpinCtrl | |
54f9ee45 | 2228 | _controls_.SpinCtrl_swigregister(SpinCtrlPtr) |
d14a1e28 RD |
2229 | |
2230 | def PreSpinCtrl(*args, **kwargs): | |
e811c8ce | 2231 | """PreSpinCtrl() -> SpinCtrl""" |
54f9ee45 | 2232 | val = _controls_.new_PreSpinCtrl(*args, **kwargs) |
d14a1e28 RD |
2233 | val.thisown = 1 |
2234 | return val | |
2235 | ||
22bfe96c | 2236 | def SpinCtrl_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2237 | """ |
2238 | SpinCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2239 | ||
2240 | Get the default attributes for this class. This is useful if you want | |
2241 | to use the same font or colour in your own control as in a standard | |
2242 | control -- which is a much better idea than hard coding specific | |
2243 | colours or fonts which might look completely out of place on the | |
2244 | user's system, especially if it uses themes. | |
2245 | ||
2246 | The variant parameter is only relevant under Mac currently and is | |
2247 | ignore under other platforms. Under Mac, it will change the size of | |
2248 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2249 | this. | |
2250 | """ | |
22bfe96c RD |
2251 | return _controls_.SpinCtrl_GetClassDefaultAttributes(*args, **kwargs) |
2252 | ||
54f9ee45 | 2253 | class SpinEvent(_core.NotifyEvent): |
d1e20054 RD |
2254 | def __repr__(self): |
2255 | return "<%s.%s; proxy of C++ wxSpinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2256 | def __init__(self, *args, **kwargs): | |
a95a7133 | 2257 | """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> SpinEvent""" |
54f9ee45 | 2258 | newobj = _controls_.new_SpinEvent(*args, **kwargs) |
d1e20054 RD |
2259 | self.this = newobj.this |
2260 | self.thisown = 1 | |
2261 | del newobj.thisown | |
2262 | def GetPosition(*args, **kwargs): | |
a95a7133 | 2263 | """GetPosition(self) -> int""" |
54f9ee45 | 2264 | return _controls_.SpinEvent_GetPosition(*args, **kwargs) |
d1e20054 RD |
2265 | |
2266 | def SetPosition(*args, **kwargs): | |
a95a7133 | 2267 | """SetPosition(self, int pos)""" |
54f9ee45 | 2268 | return _controls_.SpinEvent_SetPosition(*args, **kwargs) |
d1e20054 RD |
2269 | |
2270 | ||
2271 | class SpinEventPtr(SpinEvent): | |
2272 | def __init__(self, this): | |
2273 | self.this = this | |
2274 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2275 | self.__class__ = SpinEvent | |
54f9ee45 | 2276 | _controls_.SpinEvent_swigregister(SpinEventPtr) |
d1e20054 | 2277 | |
54f9ee45 | 2278 | wxEVT_COMMAND_SPINCTRL_UPDATED = _controls_.wxEVT_COMMAND_SPINCTRL_UPDATED |
d1e20054 RD |
2279 | EVT_SPIN_UP = wx.PyEventBinder( wx.wxEVT_SCROLL_LINEUP, 1) |
2280 | EVT_SPIN_DOWN = wx.PyEventBinder( wx.wxEVT_SCROLL_LINEDOWN, 1) | |
2281 | EVT_SPIN = wx.PyEventBinder( wx.wxEVT_SCROLL_THUMBTRACK, 1) | |
2282 | EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1) | |
d14a1e28 RD |
2283 | |
2284 | #--------------------------------------------------------------------------- | |
2285 | ||
54f9ee45 | 2286 | class RadioBox(_core.Control): |
e811c8ce RD |
2287 | def __repr__(self): |
2288 | return "<%s.%s; proxy of C++ wxRadioBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2289 | def __init__(self, *args, **kwargs): |
0df68c9f | 2290 | """ |
248ed943 RD |
2291 | __init__(self, Window parent, int id=-1, String label=EmptyString, |
2292 | Point pos=DefaultPosition, Size size=DefaultSize, | |
2293 | wxArrayString choices=wxPyEmptyStringArray, | |
2294 | int majorDimension=0, long style=RA_HORIZONTAL, | |
2295 | Validator validator=DefaultValidator, | |
b2dc1044 | 2296 | String name=RadioBoxNameStr) -> RadioBox |
0df68c9f | 2297 | """ |
69223c70 | 2298 | if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point'] |
54f9ee45 | 2299 | newobj = _controls_.new_RadioBox(*args, **kwargs) |
d14a1e28 | 2300 | self.this = newobj.this |
c95e68d8 | 2301 | self.thisown = 1 |
d14a1e28 | 2302 | del newobj.thisown |
0220cbc1 | 2303 | self._setOORInfo(self) |
e811c8ce RD |
2304 | |
2305 | def Create(*args, **kwargs): | |
0df68c9f | 2306 | """ |
248ed943 RD |
2307 | Create(self, Window parent, int id=-1, String label=EmptyString, |
2308 | Point pos=DefaultPosition, Size size=DefaultSize, | |
2309 | wxArrayString choices=wxPyEmptyStringArray, | |
2310 | int majorDimension=0, long style=RA_HORIZONTAL, | |
2311 | Validator validator=DefaultValidator, | |
b2dc1044 | 2312 | String name=RadioBoxNameStr) -> bool |
0df68c9f | 2313 | """ |
54f9ee45 | 2314 | return _controls_.RadioBox_Create(*args, **kwargs) |
e811c8ce RD |
2315 | |
2316 | def SetSelection(*args, **kwargs): | |
a95a7133 | 2317 | """SetSelection(self, int n)""" |
54f9ee45 | 2318 | return _controls_.RadioBox_SetSelection(*args, **kwargs) |
e811c8ce RD |
2319 | |
2320 | def GetSelection(*args, **kwargs): | |
a95a7133 | 2321 | """GetSelection(self) -> int""" |
54f9ee45 | 2322 | return _controls_.RadioBox_GetSelection(*args, **kwargs) |
e811c8ce RD |
2323 | |
2324 | def GetStringSelection(*args, **kwargs): | |
a95a7133 | 2325 | """GetStringSelection(self) -> String""" |
54f9ee45 | 2326 | return _controls_.RadioBox_GetStringSelection(*args, **kwargs) |
e811c8ce RD |
2327 | |
2328 | def SetStringSelection(*args, **kwargs): | |
a95a7133 | 2329 | """SetStringSelection(self, String s) -> bool""" |
54f9ee45 | 2330 | return _controls_.RadioBox_SetStringSelection(*args, **kwargs) |
e811c8ce RD |
2331 | |
2332 | def GetCount(*args, **kwargs): | |
a95a7133 | 2333 | """GetCount(self) -> int""" |
54f9ee45 | 2334 | return _controls_.RadioBox_GetCount(*args, **kwargs) |
e811c8ce RD |
2335 | |
2336 | def FindString(*args, **kwargs): | |
a95a7133 | 2337 | """FindString(self, String s) -> int""" |
54f9ee45 | 2338 | return _controls_.RadioBox_FindString(*args, **kwargs) |
e811c8ce RD |
2339 | |
2340 | def GetString(*args, **kwargs): | |
a95a7133 | 2341 | """GetString(self, int n) -> String""" |
54f9ee45 | 2342 | return _controls_.RadioBox_GetString(*args, **kwargs) |
e811c8ce RD |
2343 | |
2344 | def SetString(*args, **kwargs): | |
a95a7133 | 2345 | """SetString(self, int n, String label)""" |
54f9ee45 | 2346 | return _controls_.RadioBox_SetString(*args, **kwargs) |
e811c8ce | 2347 | |
d14a1e28 RD |
2348 | GetItemLabel = GetString |
2349 | SetItemLabel = SetString | |
e811c8ce | 2350 | def EnableItem(*args, **kwargs): |
a95a7133 | 2351 | """EnableItem(self, int n, bool enable=True)""" |
54f9ee45 | 2352 | return _controls_.RadioBox_EnableItem(*args, **kwargs) |
e811c8ce RD |
2353 | |
2354 | def ShowItem(*args, **kwargs): | |
a95a7133 | 2355 | """ShowItem(self, int n, bool show=True)""" |
54f9ee45 | 2356 | return _controls_.RadioBox_ShowItem(*args, **kwargs) |
e811c8ce RD |
2357 | |
2358 | def GetColumnCount(*args, **kwargs): | |
a95a7133 | 2359 | """GetColumnCount(self) -> int""" |
54f9ee45 | 2360 | return _controls_.RadioBox_GetColumnCount(*args, **kwargs) |
e811c8ce RD |
2361 | |
2362 | def GetRowCount(*args, **kwargs): | |
a95a7133 | 2363 | """GetRowCount(self) -> int""" |
54f9ee45 | 2364 | return _controls_.RadioBox_GetRowCount(*args, **kwargs) |
e811c8ce RD |
2365 | |
2366 | def GetNextItem(*args, **kwargs): | |
a95a7133 | 2367 | """GetNextItem(self, int item, int dir, long style) -> int""" |
54f9ee45 | 2368 | return _controls_.RadioBox_GetNextItem(*args, **kwargs) |
e811c8ce | 2369 | |
22bfe96c | 2370 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2371 | """ |
2372 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2373 | ||
2374 | Get the default attributes for this class. This is useful if you want | |
2375 | to use the same font or colour in your own control as in a standard | |
2376 | control -- which is a much better idea than hard coding specific | |
2377 | colours or fonts which might look completely out of place on the | |
2378 | user's system, especially if it uses themes. | |
2379 | ||
2380 | The variant parameter is only relevant under Mac currently and is | |
2381 | ignore under other platforms. Under Mac, it will change the size of | |
2382 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2383 | this. | |
2384 | """ | |
22bfe96c RD |
2385 | return _controls_.RadioBox_GetClassDefaultAttributes(*args, **kwargs) |
2386 | ||
2387 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
c95e68d8 | 2388 | |
d14a1e28 RD |
2389 | class RadioBoxPtr(RadioBox): |
2390 | def __init__(self, this): | |
2391 | self.this = this | |
2392 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2393 | self.__class__ = RadioBox | |
54f9ee45 | 2394 | _controls_.RadioBox_swigregister(RadioBoxPtr) |
b2dc1044 RD |
2395 | RadioBoxNameStr = cvar.RadioBoxNameStr |
2396 | RadioButtonNameStr = cvar.RadioButtonNameStr | |
c95e68d8 | 2397 | |
d14a1e28 | 2398 | def PreRadioBox(*args, **kwargs): |
e811c8ce | 2399 | """PreRadioBox() -> RadioBox""" |
54f9ee45 | 2400 | val = _controls_.new_PreRadioBox(*args, **kwargs) |
aa2a5b86 RD |
2401 | val.thisown = 1 |
2402 | return val | |
2403 | ||
22bfe96c | 2404 | def RadioBox_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2405 | """ |
2406 | RadioBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2407 | ||
2408 | Get the default attributes for this class. This is useful if you want | |
2409 | to use the same font or colour in your own control as in a standard | |
2410 | control -- which is a much better idea than hard coding specific | |
2411 | colours or fonts which might look completely out of place on the | |
2412 | user's system, especially if it uses themes. | |
2413 | ||
2414 | The variant parameter is only relevant under Mac currently and is | |
2415 | ignore under other platforms. Under Mac, it will change the size of | |
2416 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2417 | this. | |
2418 | """ | |
22bfe96c RD |
2419 | return _controls_.RadioBox_GetClassDefaultAttributes(*args, **kwargs) |
2420 | ||
d14a1e28 | 2421 | #--------------------------------------------------------------------------- |
c95e68d8 | 2422 | |
54f9ee45 | 2423 | class RadioButton(_core.Control): |
e811c8ce RD |
2424 | def __repr__(self): |
2425 | return "<%s.%s; proxy of C++ wxRadioButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2426 | def __init__(self, *args, **kwargs): |
0df68c9f | 2427 | """ |
248ed943 RD |
2428 | __init__(self, Window parent, int id=-1, String label=EmptyString, |
2429 | Point pos=DefaultPosition, Size size=DefaultSize, | |
2430 | long style=0, Validator validator=DefaultValidator, | |
2431 | String name=RadioButtonNameStr) -> RadioButton | |
0df68c9f | 2432 | """ |
54f9ee45 | 2433 | newobj = _controls_.new_RadioButton(*args, **kwargs) |
d14a1e28 | 2434 | self.this = newobj.this |
9d6da64a | 2435 | self.thisown = 1 |
d14a1e28 RD |
2436 | del newobj.thisown |
2437 | self._setOORInfo(self) | |
e811c8ce RD |
2438 | |
2439 | def Create(*args, **kwargs): | |
0df68c9f | 2440 | """ |
248ed943 RD |
2441 | Create(self, Window parent, int id=-1, String label=EmptyString, |
2442 | Point pos=DefaultPosition, Size size=DefaultSize, | |
2443 | long style=0, Validator validator=DefaultValidator, | |
2444 | String name=RadioButtonNameStr) -> bool | |
0df68c9f | 2445 | """ |
54f9ee45 | 2446 | return _controls_.RadioButton_Create(*args, **kwargs) |
e811c8ce RD |
2447 | |
2448 | def GetValue(*args, **kwargs): | |
a95a7133 | 2449 | """GetValue(self) -> bool""" |
54f9ee45 | 2450 | return _controls_.RadioButton_GetValue(*args, **kwargs) |
e811c8ce RD |
2451 | |
2452 | def SetValue(*args, **kwargs): | |
a95a7133 | 2453 | """SetValue(self, bool value)""" |
54f9ee45 | 2454 | return _controls_.RadioButton_SetValue(*args, **kwargs) |
e811c8ce | 2455 | |
22bfe96c | 2456 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2457 | """ |
2458 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2459 | ||
2460 | Get the default attributes for this class. This is useful if you want | |
2461 | to use the same font or colour in your own control as in a standard | |
2462 | control -- which is a much better idea than hard coding specific | |
2463 | colours or fonts which might look completely out of place on the | |
2464 | user's system, especially if it uses themes. | |
2465 | ||
2466 | The variant parameter is only relevant under Mac currently and is | |
2467 | ignore under other platforms. Under Mac, it will change the size of | |
2468 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2469 | this. | |
2470 | """ | |
22bfe96c RD |
2471 | return _controls_.RadioButton_GetClassDefaultAttributes(*args, **kwargs) |
2472 | ||
2473 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
9d6da64a | 2474 | |
d14a1e28 RD |
2475 | class RadioButtonPtr(RadioButton): |
2476 | def __init__(self, this): | |
2477 | self.this = this | |
2478 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2479 | self.__class__ = RadioButton | |
54f9ee45 | 2480 | _controls_.RadioButton_swigregister(RadioButtonPtr) |
9d6da64a | 2481 | |
d14a1e28 | 2482 | def PreRadioButton(*args, **kwargs): |
e811c8ce | 2483 | """PreRadioButton() -> RadioButton""" |
54f9ee45 | 2484 | val = _controls_.new_PreRadioButton(*args, **kwargs) |
d14a1e28 RD |
2485 | val.thisown = 1 |
2486 | return val | |
9d6da64a | 2487 | |
22bfe96c | 2488 | def RadioButton_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2489 | """ |
2490 | RadioButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2491 | ||
2492 | Get the default attributes for this class. This is useful if you want | |
2493 | to use the same font or colour in your own control as in a standard | |
2494 | control -- which is a much better idea than hard coding specific | |
2495 | colours or fonts which might look completely out of place on the | |
2496 | user's system, especially if it uses themes. | |
2497 | ||
2498 | The variant parameter is only relevant under Mac currently and is | |
2499 | ignore under other platforms. Under Mac, it will change the size of | |
2500 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2501 | this. | |
2502 | """ | |
22bfe96c RD |
2503 | return _controls_.RadioButton_GetClassDefaultAttributes(*args, **kwargs) |
2504 | ||
d14a1e28 | 2505 | #--------------------------------------------------------------------------- |
9d6da64a | 2506 | |
54f9ee45 | 2507 | class Slider(_core.Control): |
e811c8ce RD |
2508 | def __repr__(self): |
2509 | return "<%s.%s; proxy of C++ wxSlider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2510 | def __init__(self, *args, **kwargs): |
0df68c9f | 2511 | """ |
248ed943 RD |
2512 | __init__(self, Window parent, int id=-1, int value=0, int minValue=0, |
2513 | int maxValue=100, Point pos=DefaultPosition, | |
2514 | Size size=DefaultSize, long style=SL_HORIZONTAL, | |
2515 | Validator validator=DefaultValidator, | |
b2dc1044 | 2516 | String name=SliderNameStr) -> Slider |
0df68c9f | 2517 | """ |
69223c70 | 2518 | if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point'] |
54f9ee45 | 2519 | newobj = _controls_.new_Slider(*args, **kwargs) |
d14a1e28 | 2520 | self.this = newobj.this |
70551f47 | 2521 | self.thisown = 1 |
d14a1e28 | 2522 | del newobj.thisown |
0220cbc1 | 2523 | self._setOORInfo(self) |
e811c8ce RD |
2524 | |
2525 | def Create(*args, **kwargs): | |
0df68c9f | 2526 | """ |
248ed943 RD |
2527 | Create(self, Window parent, int id=-1, int value=0, int minValue=0, |
2528 | int maxValue=100, Point pos=DefaultPosition, | |
2529 | Size size=DefaultSize, long style=SL_HORIZONTAL, | |
2530 | Validator validator=DefaultValidator, | |
b2dc1044 | 2531 | String name=SliderNameStr) -> bool |
0df68c9f | 2532 | """ |
54f9ee45 | 2533 | return _controls_.Slider_Create(*args, **kwargs) |
e811c8ce RD |
2534 | |
2535 | def GetValue(*args, **kwargs): | |
a95a7133 | 2536 | """GetValue(self) -> int""" |
54f9ee45 | 2537 | return _controls_.Slider_GetValue(*args, **kwargs) |
e811c8ce RD |
2538 | |
2539 | def SetValue(*args, **kwargs): | |
a95a7133 | 2540 | """SetValue(self, int value)""" |
54f9ee45 | 2541 | return _controls_.Slider_SetValue(*args, **kwargs) |
e811c8ce RD |
2542 | |
2543 | def SetRange(*args, **kwargs): | |
a95a7133 | 2544 | """SetRange(self, int minValue, int maxValue)""" |
54f9ee45 | 2545 | return _controls_.Slider_SetRange(*args, **kwargs) |
e811c8ce RD |
2546 | |
2547 | def GetMin(*args, **kwargs): | |
a95a7133 | 2548 | """GetMin(self) -> int""" |
54f9ee45 | 2549 | return _controls_.Slider_GetMin(*args, **kwargs) |
e811c8ce RD |
2550 | |
2551 | def GetMax(*args, **kwargs): | |
a95a7133 | 2552 | """GetMax(self) -> int""" |
54f9ee45 | 2553 | return _controls_.Slider_GetMax(*args, **kwargs) |
e811c8ce RD |
2554 | |
2555 | def SetMin(*args, **kwargs): | |
a95a7133 | 2556 | """SetMin(self, int minValue)""" |
54f9ee45 | 2557 | return _controls_.Slider_SetMin(*args, **kwargs) |
e811c8ce RD |
2558 | |
2559 | def SetMax(*args, **kwargs): | |
a95a7133 | 2560 | """SetMax(self, int maxValue)""" |
54f9ee45 | 2561 | return _controls_.Slider_SetMax(*args, **kwargs) |
e811c8ce RD |
2562 | |
2563 | def SetLineSize(*args, **kwargs): | |
a95a7133 | 2564 | """SetLineSize(self, int lineSize)""" |
54f9ee45 | 2565 | return _controls_.Slider_SetLineSize(*args, **kwargs) |
e811c8ce RD |
2566 | |
2567 | def SetPageSize(*args, **kwargs): | |
a95a7133 | 2568 | """SetPageSize(self, int pageSize)""" |
54f9ee45 | 2569 | return _controls_.Slider_SetPageSize(*args, **kwargs) |
e811c8ce RD |
2570 | |
2571 | def GetLineSize(*args, **kwargs): | |
a95a7133 | 2572 | """GetLineSize(self) -> int""" |
54f9ee45 | 2573 | return _controls_.Slider_GetLineSize(*args, **kwargs) |
e811c8ce RD |
2574 | |
2575 | def GetPageSize(*args, **kwargs): | |
a95a7133 | 2576 | """GetPageSize(self) -> int""" |
54f9ee45 | 2577 | return _controls_.Slider_GetPageSize(*args, **kwargs) |
e811c8ce RD |
2578 | |
2579 | def SetThumbLength(*args, **kwargs): | |
a95a7133 | 2580 | """SetThumbLength(self, int lenPixels)""" |
54f9ee45 | 2581 | return _controls_.Slider_SetThumbLength(*args, **kwargs) |
e811c8ce RD |
2582 | |
2583 | def GetThumbLength(*args, **kwargs): | |
a95a7133 | 2584 | """GetThumbLength(self) -> int""" |
54f9ee45 | 2585 | return _controls_.Slider_GetThumbLength(*args, **kwargs) |
e811c8ce RD |
2586 | |
2587 | def SetTickFreq(*args, **kwargs): | |
a95a7133 | 2588 | """SetTickFreq(self, int n, int pos=1)""" |
54f9ee45 | 2589 | return _controls_.Slider_SetTickFreq(*args, **kwargs) |
e811c8ce RD |
2590 | |
2591 | def GetTickFreq(*args, **kwargs): | |
a95a7133 | 2592 | """GetTickFreq(self) -> int""" |
54f9ee45 | 2593 | return _controls_.Slider_GetTickFreq(*args, **kwargs) |
e811c8ce RD |
2594 | |
2595 | def ClearTicks(*args, **kwargs): | |
a95a7133 | 2596 | """ClearTicks(self)""" |
54f9ee45 | 2597 | return _controls_.Slider_ClearTicks(*args, **kwargs) |
e811c8ce RD |
2598 | |
2599 | def SetTick(*args, **kwargs): | |
a95a7133 | 2600 | """SetTick(self, int tickPos)""" |
54f9ee45 | 2601 | return _controls_.Slider_SetTick(*args, **kwargs) |
e811c8ce RD |
2602 | |
2603 | def ClearSel(*args, **kwargs): | |
a95a7133 | 2604 | """ClearSel(self)""" |
54f9ee45 | 2605 | return _controls_.Slider_ClearSel(*args, **kwargs) |
e811c8ce RD |
2606 | |
2607 | def GetSelEnd(*args, **kwargs): | |
a95a7133 | 2608 | """GetSelEnd(self) -> int""" |
54f9ee45 | 2609 | return _controls_.Slider_GetSelEnd(*args, **kwargs) |
e811c8ce RD |
2610 | |
2611 | def GetSelStart(*args, **kwargs): | |
a95a7133 | 2612 | """GetSelStart(self) -> int""" |
54f9ee45 | 2613 | return _controls_.Slider_GetSelStart(*args, **kwargs) |
e811c8ce RD |
2614 | |
2615 | def SetSelection(*args, **kwargs): | |
a95a7133 | 2616 | """SetSelection(self, int min, int max)""" |
54f9ee45 | 2617 | return _controls_.Slider_SetSelection(*args, **kwargs) |
e811c8ce | 2618 | |
22bfe96c | 2619 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2620 | """ |
2621 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2622 | ||
2623 | Get the default attributes for this class. This is useful if you want | |
2624 | to use the same font or colour in your own control as in a standard | |
2625 | control -- which is a much better idea than hard coding specific | |
2626 | colours or fonts which might look completely out of place on the | |
2627 | user's system, especially if it uses themes. | |
2628 | ||
2629 | The variant parameter is only relevant under Mac currently and is | |
2630 | ignore under other platforms. Under Mac, it will change the size of | |
2631 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2632 | this. | |
2633 | """ | |
22bfe96c RD |
2634 | return _controls_.Slider_GetClassDefaultAttributes(*args, **kwargs) |
2635 | ||
2636 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 2637 | |
d14a1e28 RD |
2638 | class SliderPtr(Slider): |
2639 | def __init__(self, this): | |
2640 | self.this = this | |
2641 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2642 | self.__class__ = Slider | |
54f9ee45 | 2643 | _controls_.Slider_swigregister(SliderPtr) |
b2dc1044 | 2644 | SliderNameStr = cvar.SliderNameStr |
70551f47 | 2645 | |
d14a1e28 | 2646 | def PreSlider(*args, **kwargs): |
e811c8ce | 2647 | """PreSlider() -> Slider""" |
54f9ee45 | 2648 | val = _controls_.new_PreSlider(*args, **kwargs) |
aa2a5b86 RD |
2649 | val.thisown = 1 |
2650 | return val | |
2651 | ||
22bfe96c | 2652 | def Slider_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2653 | """ |
2654 | Slider_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2655 | ||
2656 | Get the default attributes for this class. This is useful if you want | |
2657 | to use the same font or colour in your own control as in a standard | |
2658 | control -- which is a much better idea than hard coding specific | |
2659 | colours or fonts which might look completely out of place on the | |
2660 | user's system, especially if it uses themes. | |
2661 | ||
2662 | The variant parameter is only relevant under Mac currently and is | |
2663 | ignore under other platforms. Under Mac, it will change the size of | |
2664 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2665 | this. | |
2666 | """ | |
22bfe96c RD |
2667 | return _controls_.Slider_GetClassDefaultAttributes(*args, **kwargs) |
2668 | ||
d14a1e28 | 2669 | #--------------------------------------------------------------------------- |
70551f47 | 2670 | |
54f9ee45 | 2671 | wxEVT_COMMAND_TOGGLEBUTTON_CLICKED = _controls_.wxEVT_COMMAND_TOGGLEBUTTON_CLICKED |
d14a1e28 RD |
2672 | EVT_TOGGLEBUTTON = wx.PyEventBinder( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, 1) |
2673 | ||
54f9ee45 | 2674 | class ToggleButton(_core.Control): |
e811c8ce RD |
2675 | def __repr__(self): |
2676 | return "<%s.%s; proxy of C++ wxToggleButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2677 | def __init__(self, *args, **kwargs): |
0df68c9f | 2678 | """ |
248ed943 RD |
2679 | __init__(self, Window parent, int id=-1, String label=EmptyString, |
2680 | Point pos=DefaultPosition, Size size=DefaultSize, | |
2681 | long style=0, Validator validator=DefaultValidator, | |
2682 | String name=ToggleButtonNameStr) -> ToggleButton | |
0df68c9f | 2683 | """ |
54f9ee45 | 2684 | newobj = _controls_.new_ToggleButton(*args, **kwargs) |
d14a1e28 | 2685 | self.this = newobj.this |
70551f47 | 2686 | self.thisown = 1 |
d14a1e28 | 2687 | del newobj.thisown |
0220cbc1 | 2688 | self._setOORInfo(self) |
e811c8ce RD |
2689 | |
2690 | def Create(*args, **kwargs): | |
0df68c9f | 2691 | """ |
248ed943 RD |
2692 | Create(self, Window parent, int id=-1, String label=EmptyString, |
2693 | Point pos=DefaultPosition, Size size=DefaultSize, | |
2694 | long style=0, Validator validator=DefaultValidator, | |
2695 | String name=ToggleButtonNameStr) -> bool | |
0df68c9f | 2696 | """ |
54f9ee45 | 2697 | return _controls_.ToggleButton_Create(*args, **kwargs) |
e811c8ce RD |
2698 | |
2699 | def SetValue(*args, **kwargs): | |
a95a7133 | 2700 | """SetValue(self, bool value)""" |
54f9ee45 | 2701 | return _controls_.ToggleButton_SetValue(*args, **kwargs) |
e811c8ce RD |
2702 | |
2703 | def GetValue(*args, **kwargs): | |
a95a7133 | 2704 | """GetValue(self) -> bool""" |
54f9ee45 | 2705 | return _controls_.ToggleButton_GetValue(*args, **kwargs) |
e811c8ce RD |
2706 | |
2707 | def SetLabel(*args, **kwargs): | |
15afbcd0 | 2708 | """ |
a95a7133 | 2709 | SetLabel(self, String label) |
15afbcd0 RD |
2710 | |
2711 | Sets the item's text. | |
2712 | """ | |
54f9ee45 | 2713 | return _controls_.ToggleButton_SetLabel(*args, **kwargs) |
e811c8ce | 2714 | |
22bfe96c | 2715 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2716 | """ |
2717 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2718 | ||
2719 | Get the default attributes for this class. This is useful if you want | |
2720 | to use the same font or colour in your own control as in a standard | |
2721 | control -- which is a much better idea than hard coding specific | |
2722 | colours or fonts which might look completely out of place on the | |
2723 | user's system, especially if it uses themes. | |
2724 | ||
2725 | The variant parameter is only relevant under Mac currently and is | |
2726 | ignore under other platforms. Under Mac, it will change the size of | |
2727 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2728 | this. | |
2729 | """ | |
22bfe96c RD |
2730 | return _controls_.ToggleButton_GetClassDefaultAttributes(*args, **kwargs) |
2731 | ||
2732 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 2733 | |
d14a1e28 RD |
2734 | class ToggleButtonPtr(ToggleButton): |
2735 | def __init__(self, this): | |
2736 | self.this = this | |
2737 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2738 | self.__class__ = ToggleButton | |
54f9ee45 | 2739 | _controls_.ToggleButton_swigregister(ToggleButtonPtr) |
b2dc1044 | 2740 | ToggleButtonNameStr = cvar.ToggleButtonNameStr |
70551f47 | 2741 | |
d14a1e28 | 2742 | def PreToggleButton(*args, **kwargs): |
e811c8ce | 2743 | """PreToggleButton() -> ToggleButton""" |
54f9ee45 | 2744 | val = _controls_.new_PreToggleButton(*args, **kwargs) |
aa2a5b86 RD |
2745 | val.thisown = 1 |
2746 | return val | |
2747 | ||
22bfe96c | 2748 | def ToggleButton_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2749 | """ |
2750 | ToggleButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2751 | ||
2752 | Get the default attributes for this class. This is useful if you want | |
2753 | to use the same font or colour in your own control as in a standard | |
2754 | control -- which is a much better idea than hard coding specific | |
2755 | colours or fonts which might look completely out of place on the | |
2756 | user's system, especially if it uses themes. | |
2757 | ||
2758 | The variant parameter is only relevant under Mac currently and is | |
2759 | ignore under other platforms. Under Mac, it will change the size of | |
2760 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2761 | this. | |
2762 | """ | |
22bfe96c RD |
2763 | return _controls_.ToggleButton_GetClassDefaultAttributes(*args, **kwargs) |
2764 | ||
d14a1e28 RD |
2765 | #--------------------------------------------------------------------------- |
2766 | ||
54f9ee45 | 2767 | class BookCtrl(_core.Control): |
d14a1e28 RD |
2768 | def __init__(self): raise RuntimeError, "No constructor defined" |
2769 | def __repr__(self): | |
2770 | return "<%s.%s; proxy of C++ wxBookCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 2771 | def GetPageCount(*args, **kwargs): |
a95a7133 | 2772 | """GetPageCount(self) -> size_t""" |
54f9ee45 | 2773 | return _controls_.BookCtrl_GetPageCount(*args, **kwargs) |
e811c8ce RD |
2774 | |
2775 | def GetPage(*args, **kwargs): | |
a95a7133 | 2776 | """GetPage(self, size_t n) -> Window""" |
54f9ee45 | 2777 | return _controls_.BookCtrl_GetPage(*args, **kwargs) |
e811c8ce RD |
2778 | |
2779 | def GetSelection(*args, **kwargs): | |
a95a7133 | 2780 | """GetSelection(self) -> int""" |
54f9ee45 | 2781 | return _controls_.BookCtrl_GetSelection(*args, **kwargs) |
e811c8ce RD |
2782 | |
2783 | def SetPageText(*args, **kwargs): | |
a95a7133 | 2784 | """SetPageText(self, size_t n, String strText) -> bool""" |
54f9ee45 | 2785 | return _controls_.BookCtrl_SetPageText(*args, **kwargs) |
e811c8ce RD |
2786 | |
2787 | def GetPageText(*args, **kwargs): | |
a95a7133 | 2788 | """GetPageText(self, size_t n) -> String""" |
54f9ee45 | 2789 | return _controls_.BookCtrl_GetPageText(*args, **kwargs) |
e811c8ce RD |
2790 | |
2791 | def SetImageList(*args, **kwargs): | |
a95a7133 | 2792 | """SetImageList(self, ImageList imageList)""" |
54f9ee45 | 2793 | return _controls_.BookCtrl_SetImageList(*args, **kwargs) |
e811c8ce RD |
2794 | |
2795 | def AssignImageList(*args, **kwargs): | |
a95a7133 | 2796 | """AssignImageList(self, ImageList imageList)""" |
54f9ee45 | 2797 | return _controls_.BookCtrl_AssignImageList(*args, **kwargs) |
e811c8ce RD |
2798 | |
2799 | def GetImageList(*args, **kwargs): | |
a95a7133 | 2800 | """GetImageList(self) -> ImageList""" |
54f9ee45 | 2801 | return _controls_.BookCtrl_GetImageList(*args, **kwargs) |
e811c8ce RD |
2802 | |
2803 | def GetPageImage(*args, **kwargs): | |
a95a7133 | 2804 | """GetPageImage(self, size_t n) -> int""" |
54f9ee45 | 2805 | return _controls_.BookCtrl_GetPageImage(*args, **kwargs) |
e811c8ce RD |
2806 | |
2807 | def SetPageImage(*args, **kwargs): | |
a95a7133 | 2808 | """SetPageImage(self, size_t n, int imageId) -> bool""" |
54f9ee45 | 2809 | return _controls_.BookCtrl_SetPageImage(*args, **kwargs) |
e811c8ce RD |
2810 | |
2811 | def SetPageSize(*args, **kwargs): | |
a95a7133 | 2812 | """SetPageSize(self, Size size)""" |
54f9ee45 | 2813 | return _controls_.BookCtrl_SetPageSize(*args, **kwargs) |
e811c8ce RD |
2814 | |
2815 | def CalcSizeFromPage(*args, **kwargs): | |
a95a7133 | 2816 | """CalcSizeFromPage(self, Size sizePage) -> Size""" |
54f9ee45 | 2817 | return _controls_.BookCtrl_CalcSizeFromPage(*args, **kwargs) |
e811c8ce RD |
2818 | |
2819 | def DeletePage(*args, **kwargs): | |
a95a7133 | 2820 | """DeletePage(self, size_t n) -> bool""" |
54f9ee45 | 2821 | return _controls_.BookCtrl_DeletePage(*args, **kwargs) |
e811c8ce RD |
2822 | |
2823 | def RemovePage(*args, **kwargs): | |
a95a7133 | 2824 | """RemovePage(self, size_t n) -> bool""" |
54f9ee45 | 2825 | return _controls_.BookCtrl_RemovePage(*args, **kwargs) |
e811c8ce RD |
2826 | |
2827 | def DeleteAllPages(*args, **kwargs): | |
a95a7133 | 2828 | """DeleteAllPages(self) -> bool""" |
54f9ee45 | 2829 | return _controls_.BookCtrl_DeleteAllPages(*args, **kwargs) |
e811c8ce RD |
2830 | |
2831 | def AddPage(*args, **kwargs): | |
a95a7133 | 2832 | """AddPage(self, Window page, String text, bool select=False, int imageId=-1) -> bool""" |
54f9ee45 | 2833 | return _controls_.BookCtrl_AddPage(*args, **kwargs) |
e811c8ce RD |
2834 | |
2835 | def InsertPage(*args, **kwargs): | |
0df68c9f | 2836 | """ |
a95a7133 | 2837 | InsertPage(self, size_t n, Window page, String text, bool select=False, |
0df68c9f RD |
2838 | int imageId=-1) -> bool |
2839 | """ | |
54f9ee45 | 2840 | return _controls_.BookCtrl_InsertPage(*args, **kwargs) |
e811c8ce RD |
2841 | |
2842 | def SetSelection(*args, **kwargs): | |
a95a7133 | 2843 | """SetSelection(self, size_t n) -> int""" |
54f9ee45 | 2844 | return _controls_.BookCtrl_SetSelection(*args, **kwargs) |
e811c8ce RD |
2845 | |
2846 | def AdvanceSelection(*args, **kwargs): | |
a95a7133 | 2847 | """AdvanceSelection(self, bool forward=True)""" |
54f9ee45 | 2848 | return _controls_.BookCtrl_AdvanceSelection(*args, **kwargs) |
e811c8ce | 2849 | |
22bfe96c | 2850 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2851 | """ |
2852 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2853 | ||
2854 | Get the default attributes for this class. This is useful if you want | |
2855 | to use the same font or colour in your own control as in a standard | |
2856 | control -- which is a much better idea than hard coding specific | |
2857 | colours or fonts which might look completely out of place on the | |
2858 | user's system, especially if it uses themes. | |
2859 | ||
2860 | The variant parameter is only relevant under Mac currently and is | |
2861 | ignore under other platforms. Under Mac, it will change the size of | |
2862 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2863 | this. | |
2864 | """ | |
22bfe96c RD |
2865 | return _controls_.BookCtrl_GetClassDefaultAttributes(*args, **kwargs) |
2866 | ||
2867 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 2868 | |
d14a1e28 RD |
2869 | class BookCtrlPtr(BookCtrl): |
2870 | def __init__(self, this): | |
62bd0874 | 2871 | self.this = this |
d14a1e28 RD |
2872 | if not hasattr(self,"thisown"): self.thisown = 0 |
2873 | self.__class__ = BookCtrl | |
54f9ee45 | 2874 | _controls_.BookCtrl_swigregister(BookCtrlPtr) |
b2dc1044 | 2875 | NOTEBOOK_NAME = cvar.NOTEBOOK_NAME |
d14a1e28 | 2876 | |
22bfe96c | 2877 | def BookCtrl_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2878 | """ |
2879 | BookCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2880 | ||
2881 | Get the default attributes for this class. This is useful if you want | |
2882 | to use the same font or colour in your own control as in a standard | |
2883 | control -- which is a much better idea than hard coding specific | |
2884 | colours or fonts which might look completely out of place on the | |
2885 | user's system, especially if it uses themes. | |
2886 | ||
2887 | The variant parameter is only relevant under Mac currently and is | |
2888 | ignore under other platforms. Under Mac, it will change the size of | |
2889 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
2890 | this. | |
2891 | """ | |
22bfe96c RD |
2892 | return _controls_.BookCtrl_GetClassDefaultAttributes(*args, **kwargs) |
2893 | ||
54f9ee45 | 2894 | class BookCtrlEvent(_core.NotifyEvent): |
e811c8ce RD |
2895 | def __repr__(self): |
2896 | return "<%s.%s; proxy of C++ wxBookCtrlEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2897 | def __init__(self, *args, **kwargs): |
0df68c9f | 2898 | """ |
a95a7133 | 2899 | __init__(self, wxEventType commandType=wxEVT_NULL, int id=0, int nSel=-1, |
0df68c9f RD |
2900 | int nOldSel=-1) -> BookCtrlEvent |
2901 | """ | |
54f9ee45 | 2902 | newobj = _controls_.new_BookCtrlEvent(*args, **kwargs) |
d14a1e28 RD |
2903 | self.this = newobj.this |
2904 | self.thisown = 1 | |
2905 | del newobj.thisown | |
e811c8ce | 2906 | def GetSelection(*args, **kwargs): |
a95a7133 | 2907 | """GetSelection(self) -> int""" |
54f9ee45 | 2908 | return _controls_.BookCtrlEvent_GetSelection(*args, **kwargs) |
e811c8ce RD |
2909 | |
2910 | def SetSelection(*args, **kwargs): | |
a95a7133 | 2911 | """SetSelection(self, int nSel)""" |
54f9ee45 | 2912 | return _controls_.BookCtrlEvent_SetSelection(*args, **kwargs) |
e811c8ce RD |
2913 | |
2914 | def GetOldSelection(*args, **kwargs): | |
a95a7133 | 2915 | """GetOldSelection(self) -> int""" |
54f9ee45 | 2916 | return _controls_.BookCtrlEvent_GetOldSelection(*args, **kwargs) |
e811c8ce RD |
2917 | |
2918 | def SetOldSelection(*args, **kwargs): | |
a95a7133 | 2919 | """SetOldSelection(self, int nOldSel)""" |
54f9ee45 | 2920 | return _controls_.BookCtrlEvent_SetOldSelection(*args, **kwargs) |
e811c8ce | 2921 | |
d14a1e28 RD |
2922 | |
2923 | class BookCtrlEventPtr(BookCtrlEvent): | |
2924 | def __init__(self, this): | |
2925 | self.this = this | |
2926 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2927 | self.__class__ = BookCtrlEvent | |
54f9ee45 | 2928 | _controls_.BookCtrlEvent_swigregister(BookCtrlEventPtr) |
d14a1e28 RD |
2929 | |
2930 | #--------------------------------------------------------------------------- | |
2931 | ||
54f9ee45 RD |
2932 | NB_FIXEDWIDTH = _controls_.NB_FIXEDWIDTH |
2933 | NB_TOP = _controls_.NB_TOP | |
2934 | NB_LEFT = _controls_.NB_LEFT | |
2935 | NB_RIGHT = _controls_.NB_RIGHT | |
2936 | NB_BOTTOM = _controls_.NB_BOTTOM | |
2937 | NB_MULTILINE = _controls_.NB_MULTILINE | |
2938 | NB_HITTEST_NOWHERE = _controls_.NB_HITTEST_NOWHERE | |
2939 | NB_HITTEST_ONICON = _controls_.NB_HITTEST_ONICON | |
2940 | NB_HITTEST_ONLABEL = _controls_.NB_HITTEST_ONLABEL | |
2941 | NB_HITTEST_ONITEM = _controls_.NB_HITTEST_ONITEM | |
d14a1e28 | 2942 | class Notebook(BookCtrl): |
e811c8ce RD |
2943 | def __repr__(self): |
2944 | return "<%s.%s; proxy of C++ wxNotebook instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2945 | def __init__(self, *args, **kwargs): |
0df68c9f | 2946 | """ |
a95a7133 | 2947 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
4f89f6a3 | 2948 | Size size=DefaultSize, long style=0, String name=NOTEBOOK_NAME) -> Notebook |
0df68c9f | 2949 | """ |
54f9ee45 | 2950 | newobj = _controls_.new_Notebook(*args, **kwargs) |
d14a1e28 | 2951 | self.this = newobj.this |
62bd0874 | 2952 | self.thisown = 1 |
d14a1e28 | 2953 | del newobj.thisown |
0220cbc1 | 2954 | self._setOORInfo(self) |
e811c8ce RD |
2955 | |
2956 | def Create(*args, **kwargs): | |
0df68c9f | 2957 | """ |
248ed943 RD |
2958 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
2959 | Size size=DefaultSize, long style=0, String name=NOTEBOOK_NAME) -> bool | |
0df68c9f | 2960 | """ |
54f9ee45 | 2961 | return _controls_.Notebook_Create(*args, **kwargs) |
e811c8ce RD |
2962 | |
2963 | def GetRowCount(*args, **kwargs): | |
a95a7133 | 2964 | """GetRowCount(self) -> int""" |
54f9ee45 | 2965 | return _controls_.Notebook_GetRowCount(*args, **kwargs) |
e811c8ce RD |
2966 | |
2967 | def SetPadding(*args, **kwargs): | |
a95a7133 | 2968 | """SetPadding(self, Size padding)""" |
54f9ee45 | 2969 | return _controls_.Notebook_SetPadding(*args, **kwargs) |
e811c8ce RD |
2970 | |
2971 | def SetTabSize(*args, **kwargs): | |
a95a7133 | 2972 | """SetTabSize(self, Size sz)""" |
54f9ee45 | 2973 | return _controls_.Notebook_SetTabSize(*args, **kwargs) |
e811c8ce RD |
2974 | |
2975 | def HitTest(*args, **kwargs): | |
fd2dc343 RD |
2976 | """ |
2977 | HitTest(Point pt) -> (tab, where) | |
2978 | ||
2979 | Returns the tab which is hit, and flags indicating where using | |
2980 | wx.NB_HITTEST flags. | |
2981 | """ | |
54f9ee45 | 2982 | return _controls_.Notebook_HitTest(*args, **kwargs) |
e811c8ce RD |
2983 | |
2984 | def CalcSizeFromPage(*args, **kwargs): | |
a95a7133 | 2985 | """CalcSizeFromPage(self, Size sizePage) -> Size""" |
54f9ee45 | 2986 | return _controls_.Notebook_CalcSizeFromPage(*args, **kwargs) |
e811c8ce | 2987 | |
22bfe96c | 2988 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
2989 | """ |
2990 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
2991 | ||
2992 | Get the default attributes for this class. This is useful if you want | |
2993 | to use the same font or colour in your own control as in a standard | |
2994 | control -- which is a much better idea than hard coding specific | |
2995 | colours or fonts which might look completely out of place on the | |
2996 | user's system, especially if it uses themes. | |
2997 | ||
2998 | The variant parameter is only relevant under Mac currently and is | |
2999 | ignore under other platforms. Under Mac, it will change the size of | |
3000 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
3001 | this. | |
3002 | """ | |
22bfe96c RD |
3003 | return _controls_.Notebook_GetClassDefaultAttributes(*args, **kwargs) |
3004 | ||
3005 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
62bd0874 | 3006 | |
d14a1e28 RD |
3007 | class NotebookPtr(Notebook): |
3008 | def __init__(self, this): | |
3009 | self.this = this | |
3010 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3011 | self.__class__ = Notebook | |
54f9ee45 | 3012 | _controls_.Notebook_swigregister(NotebookPtr) |
62bd0874 | 3013 | |
d14a1e28 | 3014 | def PreNotebook(*args, **kwargs): |
e811c8ce | 3015 | """PreNotebook() -> Notebook""" |
54f9ee45 | 3016 | val = _controls_.new_PreNotebook(*args, **kwargs) |
aa2a5b86 RD |
3017 | val.thisown = 1 |
3018 | return val | |
3019 | ||
22bfe96c | 3020 | def Notebook_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
3021 | """ |
3022 | Notebook_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
3023 | ||
3024 | Get the default attributes for this class. This is useful if you want | |
3025 | to use the same font or colour in your own control as in a standard | |
3026 | control -- which is a much better idea than hard coding specific | |
3027 | colours or fonts which might look completely out of place on the | |
3028 | user's system, especially if it uses themes. | |
3029 | ||
3030 | The variant parameter is only relevant under Mac currently and is | |
3031 | ignore under other platforms. Under Mac, it will change the size of | |
3032 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
3033 | this. | |
3034 | """ | |
22bfe96c RD |
3035 | return _controls_.Notebook_GetClassDefaultAttributes(*args, **kwargs) |
3036 | ||
d14a1e28 | 3037 | class NotebookEvent(BookCtrlEvent): |
e811c8ce RD |
3038 | def __repr__(self): |
3039 | return "<%s.%s; proxy of C++ wxNotebookEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3040 | def __init__(self, *args, **kwargs): |
0df68c9f | 3041 | """ |
a95a7133 | 3042 | __init__(self, wxEventType commandType=wxEVT_NULL, int id=0, int nSel=-1, |
0df68c9f RD |
3043 | int nOldSel=-1) -> NotebookEvent |
3044 | """ | |
54f9ee45 | 3045 | newobj = _controls_.new_NotebookEvent(*args, **kwargs) |
d14a1e28 RD |
3046 | self.this = newobj.this |
3047 | self.thisown = 1 | |
3048 | del newobj.thisown | |
62bd0874 | 3049 | |
d14a1e28 RD |
3050 | class NotebookEventPtr(NotebookEvent): |
3051 | def __init__(self, this): | |
70551f47 | 3052 | self.this = this |
d14a1e28 RD |
3053 | if not hasattr(self,"thisown"): self.thisown = 0 |
3054 | self.__class__ = NotebookEvent | |
54f9ee45 | 3055 | _controls_.NotebookEvent_swigregister(NotebookEventPtr) |
d14a1e28 | 3056 | |
54f9ee45 RD |
3057 | wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = _controls_.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED |
3058 | wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = _controls_.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING | |
d14a1e28 RD |
3059 | # wxNotebook events |
3060 | EVT_NOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, 1 ) | |
3061 | EVT_NOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, 1 ) | |
3062 | ||
3063 | #---------------------------------------------------------------------------- | |
3064 | ||
3065 | class NotebookPage(wx.Panel): | |
3066 | """ | |
3067 | There is an old (and apparently unsolvable) bug when placing a | |
3068 | window with a nonstandard background colour in a wxNotebook on | |
3069 | wxGTK, as the notbooks's background colour would always be used | |
3070 | when the window is refreshed. The solution is to place a panel in | |
3071 | the notbook and the coloured window on the panel, sized to cover | |
3072 | the panel. This simple class does that for you, just put an | |
3073 | instance of this in the notebook and make your regular window a | |
3074 | child of this one and it will handle the resize for you. | |
3075 | """ | |
3076 | def __init__(self, parent, id=-1, | |
3077 | pos=wx.DefaultPosition, size=wx.DefaultSize, | |
3078 | style=wx.TAB_TRAVERSAL, name="panel"): | |
3079 | wx.Panel.__init__(self, parent, id, pos, size, style, name) | |
3080 | self.child = None | |
3081 | EVT_SIZE(self, self.OnSize) | |
3082 | ||
3083 | def OnSize(self, evt): | |
3084 | if self.child is None: | |
3085 | children = self.GetChildren() | |
3086 | if len(children): | |
3087 | self.child = children[0] | |
3088 | if self.child: | |
3089 | self.child.SetPosition((0,0)) | |
3090 | self.child.SetSize(self.GetSize()) | |
3091 | ||
3092 | ||
3093 | #--------------------------------------------------------------------------- | |
3094 | ||
54f9ee45 RD |
3095 | LB_DEFAULT = _controls_.LB_DEFAULT |
3096 | LB_TOP = _controls_.LB_TOP | |
3097 | LB_BOTTOM = _controls_.LB_BOTTOM | |
3098 | LB_LEFT = _controls_.LB_LEFT | |
3099 | LB_RIGHT = _controls_.LB_RIGHT | |
3100 | LB_ALIGN_MASK = _controls_.LB_ALIGN_MASK | |
d14a1e28 | 3101 | class Listbook(BookCtrl): |
e811c8ce RD |
3102 | def __repr__(self): |
3103 | return "<%s.%s; proxy of C++ wxListbook instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3104 | def __init__(self, *args, **kwargs): |
0df68c9f | 3105 | """ |
a95a7133 | 3106 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
4f89f6a3 | 3107 | Size size=DefaultSize, long style=0, String name=EmptyString) -> Listbook |
0df68c9f | 3108 | """ |
54f9ee45 | 3109 | newobj = _controls_.new_Listbook(*args, **kwargs) |
d14a1e28 | 3110 | self.this = newobj.this |
70551f47 | 3111 | self.thisown = 1 |
d14a1e28 | 3112 | del newobj.thisown |
0220cbc1 | 3113 | self._setOORInfo(self) |
e811c8ce RD |
3114 | |
3115 | def Create(*args, **kwargs): | |
0df68c9f | 3116 | """ |
248ed943 RD |
3117 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
3118 | Size size=DefaultSize, long style=0, String name=EmptyString) -> bool | |
0df68c9f | 3119 | """ |
54f9ee45 | 3120 | return _controls_.Listbook_Create(*args, **kwargs) |
e811c8ce RD |
3121 | |
3122 | def IsVertical(*args, **kwargs): | |
a95a7133 | 3123 | """IsVertical(self) -> bool""" |
54f9ee45 | 3124 | return _controls_.Listbook_IsVertical(*args, **kwargs) |
e811c8ce | 3125 | |
70551f47 | 3126 | |
d14a1e28 RD |
3127 | class ListbookPtr(Listbook): |
3128 | def __init__(self, this): | |
3129 | self.this = this | |
3130 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3131 | self.__class__ = Listbook | |
54f9ee45 | 3132 | _controls_.Listbook_swigregister(ListbookPtr) |
70551f47 | 3133 | |
d14a1e28 | 3134 | def PreListbook(*args, **kwargs): |
e811c8ce | 3135 | """PreListbook() -> Listbook""" |
54f9ee45 | 3136 | val = _controls_.new_PreListbook(*args, **kwargs) |
aa2a5b86 RD |
3137 | val.thisown = 1 |
3138 | return val | |
3139 | ||
d14a1e28 | 3140 | class ListbookEvent(BookCtrlEvent): |
e811c8ce RD |
3141 | def __repr__(self): |
3142 | return "<%s.%s; proxy of C++ wxListbookEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3143 | def __init__(self, *args, **kwargs): |
0df68c9f | 3144 | """ |
a95a7133 | 3145 | __init__(self, wxEventType commandType=wxEVT_NULL, int id=0, int nSel=-1, |
0df68c9f RD |
3146 | int nOldSel=-1) -> ListbookEvent |
3147 | """ | |
54f9ee45 | 3148 | newobj = _controls_.new_ListbookEvent(*args, **kwargs) |
d14a1e28 RD |
3149 | self.this = newobj.this |
3150 | self.thisown = 1 | |
3151 | del newobj.thisown | |
70551f47 | 3152 | |
d14a1e28 RD |
3153 | class ListbookEventPtr(ListbookEvent): |
3154 | def __init__(self, this): | |
70551f47 | 3155 | self.this = this |
d14a1e28 RD |
3156 | if not hasattr(self,"thisown"): self.thisown = 0 |
3157 | self.__class__ = ListbookEvent | |
54f9ee45 | 3158 | _controls_.ListbookEvent_swigregister(ListbookEventPtr) |
d14a1e28 | 3159 | |
54f9ee45 RD |
3160 | wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED = _controls_.wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED |
3161 | wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING = _controls_.wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING | |
d14a1e28 RD |
3162 | EVT_LISTBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, 1 ) |
3163 | EVT_LISTBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, 1 ) | |
3164 | ||
3165 | #--------------------------------------------------------------------------- | |
3166 | ||
54f9ee45 | 3167 | class BookCtrlSizer(_core.Sizer): |
e811c8ce RD |
3168 | def __repr__(self): |
3169 | return "<%s.%s; proxy of C++ wxBookCtrlSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3170 | def __init__(self, *args, **kwargs): |
a95a7133 | 3171 | """__init__(self, BookCtrl nb) -> BookCtrlSizer""" |
54f9ee45 | 3172 | newobj = _controls_.new_BookCtrlSizer(*args, **kwargs) |
d14a1e28 RD |
3173 | self.this = newobj.this |
3174 | self.thisown = 1 | |
3175 | del newobj.thisown | |
3176 | self._setOORInfo(self) | |
e811c8ce RD |
3177 | |
3178 | def RecalcSizes(*args, **kwargs): | |
248ed943 RD |
3179 | """ |
3180 | RecalcSizes(self) | |
3181 | ||
3182 | Using the sizes calculated by `CalcMin` reposition and resize all the | |
3183 | items managed by this sizer. You should not need to call this directly as | |
3184 | it is called by `Layout`. | |
3185 | """ | |
54f9ee45 | 3186 | return _controls_.BookCtrlSizer_RecalcSizes(*args, **kwargs) |
e811c8ce RD |
3187 | |
3188 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
3189 | """ |
3190 | CalcMin(self) -> Size | |
3191 | ||
3192 | This method is where the sizer will do the actual calculation of its | |
3193 | children's minimal sizes. You should not need to call this directly as | |
3194 | it is called by `Layout`. | |
3195 | """ | |
54f9ee45 | 3196 | return _controls_.BookCtrlSizer_CalcMin(*args, **kwargs) |
e811c8ce RD |
3197 | |
3198 | def GetControl(*args, **kwargs): | |
a95a7133 | 3199 | """GetControl(self) -> BookCtrl""" |
54f9ee45 | 3200 | return _controls_.BookCtrlSizer_GetControl(*args, **kwargs) |
e811c8ce | 3201 | |
d14a1e28 RD |
3202 | |
3203 | class BookCtrlSizerPtr(BookCtrlSizer): | |
3204 | def __init__(self, this): | |
3205 | self.this = this | |
3206 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3207 | self.__class__ = BookCtrlSizer | |
54f9ee45 | 3208 | _controls_.BookCtrlSizer_swigregister(BookCtrlSizerPtr) |
d14a1e28 | 3209 | |
54f9ee45 | 3210 | class NotebookSizer(_core.Sizer): |
e811c8ce RD |
3211 | def __repr__(self): |
3212 | return "<%s.%s; proxy of C++ wxNotebookSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3213 | def __init__(self, *args, **kwargs): |
a95a7133 | 3214 | """__init__(self, Notebook nb) -> NotebookSizer""" |
54f9ee45 | 3215 | newobj = _controls_.new_NotebookSizer(*args, **kwargs) |
d14a1e28 | 3216 | self.this = newobj.this |
70551f47 | 3217 | self.thisown = 1 |
d14a1e28 | 3218 | del newobj.thisown |
0220cbc1 | 3219 | self._setOORInfo(self) |
e811c8ce RD |
3220 | |
3221 | def RecalcSizes(*args, **kwargs): | |
248ed943 RD |
3222 | """ |
3223 | RecalcSizes(self) | |
3224 | ||
3225 | Using the sizes calculated by `CalcMin` reposition and resize all the | |
3226 | items managed by this sizer. You should not need to call this directly as | |
3227 | it is called by `Layout`. | |
3228 | """ | |
54f9ee45 | 3229 | return _controls_.NotebookSizer_RecalcSizes(*args, **kwargs) |
e811c8ce RD |
3230 | |
3231 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
3232 | """ |
3233 | CalcMin(self) -> Size | |
3234 | ||
3235 | This method is where the sizer will do the actual calculation of its | |
3236 | children's minimal sizes. You should not need to call this directly as | |
3237 | it is called by `Layout`. | |
3238 | """ | |
54f9ee45 | 3239 | return _controls_.NotebookSizer_CalcMin(*args, **kwargs) |
e811c8ce RD |
3240 | |
3241 | def GetNotebook(*args, **kwargs): | |
a95a7133 | 3242 | """GetNotebook(self) -> Notebook""" |
54f9ee45 | 3243 | return _controls_.NotebookSizer_GetNotebook(*args, **kwargs) |
e811c8ce | 3244 | |
d14a1e28 RD |
3245 | |
3246 | class NotebookSizerPtr(NotebookSizer): | |
3247 | def __init__(self, this): | |
3248 | self.this = this | |
3249 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3250 | self.__class__ = NotebookSizer | |
54f9ee45 | 3251 | _controls_.NotebookSizer_swigregister(NotebookSizerPtr) |
d14a1e28 RD |
3252 | |
3253 | #--------------------------------------------------------------------------- | |
3254 | ||
54f9ee45 RD |
3255 | TOOL_STYLE_BUTTON = _controls_.TOOL_STYLE_BUTTON |
3256 | TOOL_STYLE_SEPARATOR = _controls_.TOOL_STYLE_SEPARATOR | |
3257 | TOOL_STYLE_CONTROL = _controls_.TOOL_STYLE_CONTROL | |
3258 | TB_HORIZONTAL = _controls_.TB_HORIZONTAL | |
3259 | TB_VERTICAL = _controls_.TB_VERTICAL | |
3260 | TB_3DBUTTONS = _controls_.TB_3DBUTTONS | |
3261 | TB_FLAT = _controls_.TB_FLAT | |
3262 | TB_DOCKABLE = _controls_.TB_DOCKABLE | |
3263 | TB_NOICONS = _controls_.TB_NOICONS | |
3264 | TB_TEXT = _controls_.TB_TEXT | |
3265 | TB_NODIVIDER = _controls_.TB_NODIVIDER | |
3266 | TB_NOALIGN = _controls_.TB_NOALIGN | |
3267 | TB_HORZ_LAYOUT = _controls_.TB_HORZ_LAYOUT | |
3268 | TB_HORZ_TEXT = _controls_.TB_HORZ_TEXT | |
3269 | class ToolBarToolBase(_core.Object): | |
e811c8ce RD |
3270 | def __init__(self): raise RuntimeError, "No constructor defined" |
3271 | def __repr__(self): | |
3272 | return "<%s.%s; proxy of C++ wxToolBarToolBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
3273 | def GetId(*args, **kwargs): | |
a95a7133 | 3274 | """GetId(self) -> int""" |
54f9ee45 | 3275 | return _controls_.ToolBarToolBase_GetId(*args, **kwargs) |
e811c8ce RD |
3276 | |
3277 | def GetControl(*args, **kwargs): | |
a95a7133 | 3278 | """GetControl(self) -> Control""" |
54f9ee45 | 3279 | return _controls_.ToolBarToolBase_GetControl(*args, **kwargs) |
e811c8ce RD |
3280 | |
3281 | def GetToolBar(*args, **kwargs): | |
a95a7133 | 3282 | """GetToolBar(self) -> ToolBarBase""" |
54f9ee45 | 3283 | return _controls_.ToolBarToolBase_GetToolBar(*args, **kwargs) |
e811c8ce RD |
3284 | |
3285 | def IsButton(*args, **kwargs): | |
a95a7133 | 3286 | """IsButton(self) -> int""" |
54f9ee45 | 3287 | return _controls_.ToolBarToolBase_IsButton(*args, **kwargs) |
e811c8ce RD |
3288 | |
3289 | def IsControl(*args, **kwargs): | |
a95a7133 | 3290 | """IsControl(self) -> int""" |
54f9ee45 | 3291 | return _controls_.ToolBarToolBase_IsControl(*args, **kwargs) |
e811c8ce RD |
3292 | |
3293 | def IsSeparator(*args, **kwargs): | |
a95a7133 | 3294 | """IsSeparator(self) -> int""" |
54f9ee45 | 3295 | return _controls_.ToolBarToolBase_IsSeparator(*args, **kwargs) |
e811c8ce RD |
3296 | |
3297 | def GetStyle(*args, **kwargs): | |
a95a7133 | 3298 | """GetStyle(self) -> int""" |
54f9ee45 | 3299 | return _controls_.ToolBarToolBase_GetStyle(*args, **kwargs) |
e811c8ce RD |
3300 | |
3301 | def GetKind(*args, **kwargs): | |
a95a7133 | 3302 | """GetKind(self) -> int""" |
54f9ee45 | 3303 | return _controls_.ToolBarToolBase_GetKind(*args, **kwargs) |
e811c8ce RD |
3304 | |
3305 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 3306 | """IsEnabled(self) -> bool""" |
54f9ee45 | 3307 | return _controls_.ToolBarToolBase_IsEnabled(*args, **kwargs) |
e811c8ce RD |
3308 | |
3309 | def IsToggled(*args, **kwargs): | |
a95a7133 | 3310 | """IsToggled(self) -> bool""" |
54f9ee45 | 3311 | return _controls_.ToolBarToolBase_IsToggled(*args, **kwargs) |
e811c8ce RD |
3312 | |
3313 | def CanBeToggled(*args, **kwargs): | |
a95a7133 | 3314 | """CanBeToggled(self) -> bool""" |
54f9ee45 | 3315 | return _controls_.ToolBarToolBase_CanBeToggled(*args, **kwargs) |
e811c8ce RD |
3316 | |
3317 | def GetNormalBitmap(*args, **kwargs): | |
a95a7133 | 3318 | """GetNormalBitmap(self) -> Bitmap""" |
54f9ee45 | 3319 | return _controls_.ToolBarToolBase_GetNormalBitmap(*args, **kwargs) |
e811c8ce RD |
3320 | |
3321 | def GetDisabledBitmap(*args, **kwargs): | |
a95a7133 | 3322 | """GetDisabledBitmap(self) -> Bitmap""" |
54f9ee45 | 3323 | return _controls_.ToolBarToolBase_GetDisabledBitmap(*args, **kwargs) |
e811c8ce RD |
3324 | |
3325 | def GetBitmap(*args, **kwargs): | |
a95a7133 | 3326 | """GetBitmap(self) -> Bitmap""" |
54f9ee45 | 3327 | return _controls_.ToolBarToolBase_GetBitmap(*args, **kwargs) |
e811c8ce RD |
3328 | |
3329 | def GetLabel(*args, **kwargs): | |
a95a7133 | 3330 | """GetLabel(self) -> String""" |
54f9ee45 | 3331 | return _controls_.ToolBarToolBase_GetLabel(*args, **kwargs) |
e811c8ce RD |
3332 | |
3333 | def GetShortHelp(*args, **kwargs): | |
a95a7133 | 3334 | """GetShortHelp(self) -> String""" |
54f9ee45 | 3335 | return _controls_.ToolBarToolBase_GetShortHelp(*args, **kwargs) |
e811c8ce RD |
3336 | |
3337 | def GetLongHelp(*args, **kwargs): | |
a95a7133 | 3338 | """GetLongHelp(self) -> String""" |
54f9ee45 | 3339 | return _controls_.ToolBarToolBase_GetLongHelp(*args, **kwargs) |
e811c8ce RD |
3340 | |
3341 | def Enable(*args, **kwargs): | |
a95a7133 | 3342 | """Enable(self, bool enable) -> bool""" |
54f9ee45 | 3343 | return _controls_.ToolBarToolBase_Enable(*args, **kwargs) |
e811c8ce RD |
3344 | |
3345 | def Toggle(*args, **kwargs): | |
a95a7133 | 3346 | """Toggle(self)""" |
54f9ee45 | 3347 | return _controls_.ToolBarToolBase_Toggle(*args, **kwargs) |
e811c8ce RD |
3348 | |
3349 | def SetToggle(*args, **kwargs): | |
a95a7133 | 3350 | """SetToggle(self, bool toggle) -> bool""" |
54f9ee45 | 3351 | return _controls_.ToolBarToolBase_SetToggle(*args, **kwargs) |
e811c8ce RD |
3352 | |
3353 | def SetShortHelp(*args, **kwargs): | |
a95a7133 | 3354 | """SetShortHelp(self, String help) -> bool""" |
54f9ee45 | 3355 | return _controls_.ToolBarToolBase_SetShortHelp(*args, **kwargs) |
e811c8ce RD |
3356 | |
3357 | def SetLongHelp(*args, **kwargs): | |
a95a7133 | 3358 | """SetLongHelp(self, String help) -> bool""" |
54f9ee45 | 3359 | return _controls_.ToolBarToolBase_SetLongHelp(*args, **kwargs) |
e811c8ce RD |
3360 | |
3361 | def SetNormalBitmap(*args, **kwargs): | |
a95a7133 | 3362 | """SetNormalBitmap(self, Bitmap bmp)""" |
54f9ee45 | 3363 | return _controls_.ToolBarToolBase_SetNormalBitmap(*args, **kwargs) |
e811c8ce RD |
3364 | |
3365 | def SetDisabledBitmap(*args, **kwargs): | |
a95a7133 | 3366 | """SetDisabledBitmap(self, Bitmap bmp)""" |
54f9ee45 | 3367 | return _controls_.ToolBarToolBase_SetDisabledBitmap(*args, **kwargs) |
e811c8ce RD |
3368 | |
3369 | def SetLabel(*args, **kwargs): | |
a95a7133 | 3370 | """SetLabel(self, String label)""" |
54f9ee45 | 3371 | return _controls_.ToolBarToolBase_SetLabel(*args, **kwargs) |
e811c8ce RD |
3372 | |
3373 | def Detach(*args, **kwargs): | |
a95a7133 | 3374 | """Detach(self)""" |
54f9ee45 | 3375 | return _controls_.ToolBarToolBase_Detach(*args, **kwargs) |
e811c8ce RD |
3376 | |
3377 | def Attach(*args, **kwargs): | |
a95a7133 | 3378 | """Attach(self, ToolBarBase tbar)""" |
54f9ee45 | 3379 | return _controls_.ToolBarToolBase_Attach(*args, **kwargs) |
e811c8ce RD |
3380 | |
3381 | def GetClientData(*args, **kwargs): | |
a95a7133 | 3382 | """GetClientData(self) -> PyObject""" |
54f9ee45 | 3383 | return _controls_.ToolBarToolBase_GetClientData(*args, **kwargs) |
e811c8ce RD |
3384 | |
3385 | def SetClientData(*args, **kwargs): | |
a95a7133 | 3386 | """SetClientData(self, PyObject clientData)""" |
54f9ee45 | 3387 | return _controls_.ToolBarToolBase_SetClientData(*args, **kwargs) |
e811c8ce | 3388 | |
d14a1e28 RD |
3389 | GetBitmap1 = GetNormalBitmap |
3390 | GetBitmap2 = GetDisabledBitmap | |
3391 | SetBitmap1 = SetNormalBitmap | |
3392 | SetBitmap2 = SetDisabledBitmap | |
3393 | ||
70551f47 | 3394 | |
d14a1e28 RD |
3395 | class ToolBarToolBasePtr(ToolBarToolBase): |
3396 | def __init__(self, this): | |
3397 | self.this = this | |
3398 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3399 | self.__class__ = ToolBarToolBase | |
54f9ee45 | 3400 | _controls_.ToolBarToolBase_swigregister(ToolBarToolBasePtr) |
d14a1e28 | 3401 | |
54f9ee45 | 3402 | class ToolBarBase(_core.Control): |
e811c8ce RD |
3403 | def __init__(self): raise RuntimeError, "No constructor defined" |
3404 | def __repr__(self): | |
3405 | return "<%s.%s; proxy of C++ wxToolBarBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
3406 | def DoAddTool(*args, **kwargs): | |
0df68c9f | 3407 | """ |
a95a7133 | 3408 | DoAddTool(self, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap, |
196addbf RD |
3409 | int kind=ITEM_NORMAL, String shortHelp=EmptyString, |
3410 | String longHelp=EmptyString, | |
3411 | PyObject clientData=None) -> ToolBarToolBase | |
0df68c9f | 3412 | """ |
54f9ee45 | 3413 | return _controls_.ToolBarBase_DoAddTool(*args, **kwargs) |
e811c8ce RD |
3414 | |
3415 | def DoInsertTool(*args, **kwargs): | |
0df68c9f | 3416 | """ |
a95a7133 | 3417 | DoInsertTool(self, size_t pos, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap, |
196addbf RD |
3418 | int kind=ITEM_NORMAL, |
3419 | String shortHelp=EmptyString, String longHelp=EmptyString, | |
0df68c9f RD |
3420 | PyObject clientData=None) -> ToolBarToolBase |
3421 | """ | |
54f9ee45 | 3422 | return _controls_.ToolBarBase_DoInsertTool(*args, **kwargs) |
e811c8ce | 3423 | |
d14a1e28 RD |
3424 | # These match the original Add methods for this class, kept for |
3425 | # backwards compatibility with versions < 2.3.3. | |
3426 | ||
3427 | ||
3428 | def AddTool(self, id, bitmap, | |
3429 | pushedBitmap = wx.NullBitmap, | |
3430 | isToggle = 0, | |
3431 | clientData = None, | |
3432 | shortHelpString = '', | |
3433 | longHelpString = '') : | |
3434 | '''Old style method to add a tool to the toolbar.''' | |
3435 | kind = wx.ITEM_NORMAL | |
3436 | if isToggle: kind = wx.ITEM_CHECK | |
3437 | return self.DoAddTool(id, '', bitmap, pushedBitmap, kind, | |
3438 | shortHelpString, longHelpString, clientData) | |
3439 | ||
3440 | def AddSimpleTool(self, id, bitmap, | |
3441 | shortHelpString = '', | |
3442 | longHelpString = '', | |
3443 | isToggle = 0): | |
3444 | '''Old style method to add a tool to the toolbar.''' | |
3445 | kind = wx.ITEM_NORMAL | |
3446 | if isToggle: kind = wx.ITEM_CHECK | |
3447 | return self.DoAddTool(id, '', bitmap, wx.NullBitmap, kind, | |
3448 | shortHelpString, longHelpString, None) | |
3449 | ||
3450 | def InsertTool(self, pos, id, bitmap, | |
3451 | pushedBitmap = wx.NullBitmap, | |
3452 | isToggle = 0, | |
3453 | clientData = None, | |
3454 | shortHelpString = '', | |
3455 | longHelpString = ''): | |
3456 | '''Old style method to insert a tool in the toolbar.''' | |
3457 | kind = wx.ITEM_NORMAL | |
3458 | if isToggle: kind = wx.ITEM_CHECK | |
3459 | return self.DoInsertTool(pos, id, '', bitmap, pushedBitmap, kind, | |
3460 | shortHelpString, longHelpString, clientData) | |
3461 | ||
3462 | def InsertSimpleTool(self, pos, id, bitmap, | |
3463 | shortHelpString = '', | |
3464 | longHelpString = '', | |
3465 | isToggle = 0): | |
3466 | '''Old style method to insert a tool in the toolbar.''' | |
3467 | kind = wx.ITEM_NORMAL | |
3468 | if isToggle: kind = wx.ITEM_CHECK | |
3469 | return self.DoInsertTool(pos, id, '', bitmap, wx.NullBitmap, kind, | |
3470 | shortHelpString, longHelpString, None) | |
3471 | ||
3472 | ||
3473 | # The following are the new toolbar Add methods starting with | |
3474 | # 2.3.3. They are renamed to have 'Label' in the name so as to be | |
3475 | # able to keep backwards compatibility with using the above | |
3476 | # methods. Eventually these should migrate to be the methods used | |
3477 | # primarily and lose the 'Label' in the name... | |
3478 | ||
3479 | def AddLabelTool(self, id, label, bitmap, | |
3480 | bmpDisabled = wx.NullBitmap, | |
3481 | kind = wx.ITEM_NORMAL, | |
3482 | shortHelp = '', longHelp = '', | |
3483 | clientData = None): | |
3484 | ''' | |
3485 | The full AddTool() function. | |
3486 | ||
3487 | If bmpDisabled is wx.NullBitmap, a shadowed version of the normal bitmap | |
3488 | is created and used as the disabled image. | |
3489 | ''' | |
3490 | return self.DoAddTool(id, label, bitmap, bmpDisabled, kind, | |
3491 | shortHelp, longHelp, clientData) | |
3492 | ||
3493 | ||
3494 | def InsertLabelTool(self, pos, id, label, bitmap, | |
3495 | bmpDisabled = wx.NullBitmap, | |
3496 | kind = wx.ITEM_NORMAL, | |
3497 | shortHelp = '', longHelp = '', | |
3498 | clientData = None): | |
3499 | ''' | |
3500 | Insert the new tool at the given position, if pos == GetToolsCount(), it | |
3501 | is equivalent to AddTool() | |
3502 | ''' | |
3503 | return self.DoInsertTool(pos, id, label, bitmap, bmpDisabled, kind, | |
3504 | shortHelp, longHelp, clientData) | |
3505 | ||
3506 | def AddCheckLabelTool(self, id, label, bitmap, | |
3507 | bmpDisabled = wx.NullBitmap, | |
3508 | shortHelp = '', longHelp = '', | |
3509 | clientData = None): | |
3510 | '''Add a check tool, i.e. a tool which can be toggled''' | |
3511 | return self.DoAddTool(id, label, bitmap, bmpDisabled, wx.ITEM_CHECK, | |
3512 | shortHelp, longHelp, clientData) | |
3513 | ||
3514 | def AddRadioLabelTool(self, id, label, bitmap, | |
3515 | bmpDisabled = wx.NullBitmap, | |
3516 | shortHelp = '', longHelp = '', | |
3517 | clientData = None): | |
3518 | ''' | |
3519 | Add a radio tool, i.e. a tool which can be toggled and releases any | |
3520 | other toggled radio tools in the same group when it happens | |
3521 | ''' | |
3522 | return self.DoAddTool(id, label, bitmap, bmpDisabled, wx.ITEM_RADIO, | |
3523 | shortHelp, longHelp, clientData) | |
3524 | ||
3525 | ||
3526 | # For consistency with the backwards compatible methods above, here are | |
3527 | # some non-'Label' versions of the Check and Radio methods | |
248ed943 | 3528 | |
d14a1e28 RD |
3529 | def AddCheckTool(self, id, bitmap, |
3530 | bmpDisabled = wx.NullBitmap, | |
3531 | shortHelp = '', longHelp = '', | |
3532 | clientData = None): | |
3533 | '''Add a check tool, i.e. a tool which can be toggled''' | |
3534 | return self.DoAddTool(id, '', bitmap, bmpDisabled, wx.ITEM_CHECK, | |
3535 | shortHelp, longHelp, clientData) | |
3536 | ||
3537 | def AddRadioTool(self, id, bitmap, | |
3538 | bmpDisabled = wx.NullBitmap, | |
3539 | shortHelp = '', longHelp = '', | |
3540 | clientData = None): | |
3541 | ''' | |
3542 | Add a radio tool, i.e. a tool which can be toggled and releases any | |
3543 | other toggled radio tools in the same group when it happens | |
3544 | ''' | |
3545 | return self.DoAddTool(id, '', bitmap, bmpDisabled, wx.ITEM_RADIO, | |
3546 | shortHelp, longHelp, clientData) | |
3547 | ||
3a04f143 | 3548 | def AddToolItem(*args, **kwargs): |
a95a7133 | 3549 | """AddToolItem(self, ToolBarToolBase tool) -> ToolBarToolBase""" |
54f9ee45 | 3550 | return _controls_.ToolBarBase_AddToolItem(*args, **kwargs) |
3a04f143 RD |
3551 | |
3552 | def InsertToolItem(*args, **kwargs): | |
a95a7133 | 3553 | """InsertToolItem(self, size_t pos, ToolBarToolBase tool) -> ToolBarToolBase""" |
54f9ee45 | 3554 | return _controls_.ToolBarBase_InsertToolItem(*args, **kwargs) |
3a04f143 | 3555 | |
e811c8ce | 3556 | def AddControl(*args, **kwargs): |
a95a7133 | 3557 | """AddControl(self, Control control) -> ToolBarToolBase""" |
54f9ee45 | 3558 | return _controls_.ToolBarBase_AddControl(*args, **kwargs) |
e811c8ce RD |
3559 | |
3560 | def InsertControl(*args, **kwargs): | |
a95a7133 | 3561 | """InsertControl(self, size_t pos, Control control) -> ToolBarToolBase""" |
54f9ee45 | 3562 | return _controls_.ToolBarBase_InsertControl(*args, **kwargs) |
e811c8ce RD |
3563 | |
3564 | def FindControl(*args, **kwargs): | |
a95a7133 | 3565 | """FindControl(self, int id) -> Control""" |
54f9ee45 | 3566 | return _controls_.ToolBarBase_FindControl(*args, **kwargs) |
e811c8ce RD |
3567 | |
3568 | def AddSeparator(*args, **kwargs): | |
a95a7133 | 3569 | """AddSeparator(self) -> ToolBarToolBase""" |
54f9ee45 | 3570 | return _controls_.ToolBarBase_AddSeparator(*args, **kwargs) |
e811c8ce RD |
3571 | |
3572 | def InsertSeparator(*args, **kwargs): | |
a95a7133 | 3573 | """InsertSeparator(self, size_t pos) -> ToolBarToolBase""" |
54f9ee45 | 3574 | return _controls_.ToolBarBase_InsertSeparator(*args, **kwargs) |
e811c8ce RD |
3575 | |
3576 | def RemoveTool(*args, **kwargs): | |
a95a7133 | 3577 | """RemoveTool(self, int id) -> ToolBarToolBase""" |
54f9ee45 | 3578 | return _controls_.ToolBarBase_RemoveTool(*args, **kwargs) |
e811c8ce RD |
3579 | |
3580 | def DeleteToolByPos(*args, **kwargs): | |
a95a7133 | 3581 | """DeleteToolByPos(self, size_t pos) -> bool""" |
54f9ee45 | 3582 | return _controls_.ToolBarBase_DeleteToolByPos(*args, **kwargs) |
e811c8ce RD |
3583 | |
3584 | def DeleteTool(*args, **kwargs): | |
a95a7133 | 3585 | """DeleteTool(self, int id) -> bool""" |
54f9ee45 | 3586 | return _controls_.ToolBarBase_DeleteTool(*args, **kwargs) |
e811c8ce RD |
3587 | |
3588 | def ClearTools(*args, **kwargs): | |
a95a7133 | 3589 | """ClearTools(self)""" |
54f9ee45 | 3590 | return _controls_.ToolBarBase_ClearTools(*args, **kwargs) |
e811c8ce RD |
3591 | |
3592 | def Realize(*args, **kwargs): | |
a95a7133 | 3593 | """Realize(self) -> bool""" |
54f9ee45 | 3594 | return _controls_.ToolBarBase_Realize(*args, **kwargs) |
e811c8ce RD |
3595 | |
3596 | def EnableTool(*args, **kwargs): | |
a95a7133 | 3597 | """EnableTool(self, int id, bool enable)""" |
54f9ee45 | 3598 | return _controls_.ToolBarBase_EnableTool(*args, **kwargs) |
e811c8ce RD |
3599 | |
3600 | def ToggleTool(*args, **kwargs): | |
a95a7133 | 3601 | """ToggleTool(self, int id, bool toggle)""" |
54f9ee45 | 3602 | return _controls_.ToolBarBase_ToggleTool(*args, **kwargs) |
e811c8ce RD |
3603 | |
3604 | def SetToggle(*args, **kwargs): | |
a95a7133 | 3605 | """SetToggle(self, int id, bool toggle)""" |
54f9ee45 | 3606 | return _controls_.ToolBarBase_SetToggle(*args, **kwargs) |
e811c8ce RD |
3607 | |
3608 | def GetToolClientData(*args, **kwargs): | |
a95a7133 | 3609 | """GetToolClientData(self, int id) -> PyObject""" |
54f9ee45 | 3610 | return _controls_.ToolBarBase_GetToolClientData(*args, **kwargs) |
e811c8ce RD |
3611 | |
3612 | def SetToolClientData(*args, **kwargs): | |
a95a7133 | 3613 | """SetToolClientData(self, int id, PyObject clientData)""" |
54f9ee45 | 3614 | return _controls_.ToolBarBase_SetToolClientData(*args, **kwargs) |
e811c8ce RD |
3615 | |
3616 | def GetToolPos(*args, **kwargs): | |
a95a7133 | 3617 | """GetToolPos(self, int id) -> int""" |
54f9ee45 | 3618 | return _controls_.ToolBarBase_GetToolPos(*args, **kwargs) |
e811c8ce RD |
3619 | |
3620 | def GetToolState(*args, **kwargs): | |
a95a7133 | 3621 | """GetToolState(self, int id) -> bool""" |
54f9ee45 | 3622 | return _controls_.ToolBarBase_GetToolState(*args, **kwargs) |
e811c8ce RD |
3623 | |
3624 | def GetToolEnabled(*args, **kwargs): | |
a95a7133 | 3625 | """GetToolEnabled(self, int id) -> bool""" |
54f9ee45 | 3626 | return _controls_.ToolBarBase_GetToolEnabled(*args, **kwargs) |
e811c8ce RD |
3627 | |
3628 | def SetToolShortHelp(*args, **kwargs): | |
a95a7133 | 3629 | """SetToolShortHelp(self, int id, String helpString)""" |
54f9ee45 | 3630 | return _controls_.ToolBarBase_SetToolShortHelp(*args, **kwargs) |
e811c8ce RD |
3631 | |
3632 | def GetToolShortHelp(*args, **kwargs): | |
a95a7133 | 3633 | """GetToolShortHelp(self, int id) -> String""" |
54f9ee45 | 3634 | return _controls_.ToolBarBase_GetToolShortHelp(*args, **kwargs) |
e811c8ce RD |
3635 | |
3636 | def SetToolLongHelp(*args, **kwargs): | |
a95a7133 | 3637 | """SetToolLongHelp(self, int id, String helpString)""" |
54f9ee45 | 3638 | return _controls_.ToolBarBase_SetToolLongHelp(*args, **kwargs) |
e811c8ce RD |
3639 | |
3640 | def GetToolLongHelp(*args, **kwargs): | |
a95a7133 | 3641 | """GetToolLongHelp(self, int id) -> String""" |
54f9ee45 | 3642 | return _controls_.ToolBarBase_GetToolLongHelp(*args, **kwargs) |
e811c8ce RD |
3643 | |
3644 | def SetMarginsXY(*args, **kwargs): | |
a95a7133 | 3645 | """SetMarginsXY(self, int x, int y)""" |
54f9ee45 | 3646 | return _controls_.ToolBarBase_SetMarginsXY(*args, **kwargs) |
e811c8ce RD |
3647 | |
3648 | def SetMargins(*args, **kwargs): | |
a95a7133 | 3649 | """SetMargins(self, Size size)""" |
54f9ee45 | 3650 | return _controls_.ToolBarBase_SetMargins(*args, **kwargs) |
e811c8ce RD |
3651 | |
3652 | def SetToolPacking(*args, **kwargs): | |
a95a7133 | 3653 | """SetToolPacking(self, int packing)""" |
54f9ee45 | 3654 | return _controls_.ToolBarBase_SetToolPacking(*args, **kwargs) |
e811c8ce RD |
3655 | |
3656 | def SetToolSeparation(*args, **kwargs): | |
a95a7133 | 3657 | """SetToolSeparation(self, int separation)""" |
54f9ee45 | 3658 | return _controls_.ToolBarBase_SetToolSeparation(*args, **kwargs) |
e811c8ce RD |
3659 | |
3660 | def GetToolMargins(*args, **kwargs): | |
a95a7133 | 3661 | """GetToolMargins(self) -> Size""" |
54f9ee45 | 3662 | return _controls_.ToolBarBase_GetToolMargins(*args, **kwargs) |
e811c8ce RD |
3663 | |
3664 | def GetMargins(*args, **kwargs): | |
a95a7133 | 3665 | """GetMargins(self) -> Size""" |
54f9ee45 | 3666 | return _controls_.ToolBarBase_GetMargins(*args, **kwargs) |
e811c8ce RD |
3667 | |
3668 | def GetToolPacking(*args, **kwargs): | |
a95a7133 | 3669 | """GetToolPacking(self) -> int""" |
54f9ee45 | 3670 | return _controls_.ToolBarBase_GetToolPacking(*args, **kwargs) |
e811c8ce RD |
3671 | |
3672 | def GetToolSeparation(*args, **kwargs): | |
a95a7133 | 3673 | """GetToolSeparation(self) -> int""" |
54f9ee45 | 3674 | return _controls_.ToolBarBase_GetToolSeparation(*args, **kwargs) |
e811c8ce RD |
3675 | |
3676 | def SetRows(*args, **kwargs): | |
a95a7133 | 3677 | """SetRows(self, int nRows)""" |
54f9ee45 | 3678 | return _controls_.ToolBarBase_SetRows(*args, **kwargs) |
e811c8ce RD |
3679 | |
3680 | def SetMaxRowsCols(*args, **kwargs): | |
a95a7133 | 3681 | """SetMaxRowsCols(self, int rows, int cols)""" |
54f9ee45 | 3682 | return _controls_.ToolBarBase_SetMaxRowsCols(*args, **kwargs) |
e811c8ce RD |
3683 | |
3684 | def GetMaxRows(*args, **kwargs): | |
a95a7133 | 3685 | """GetMaxRows(self) -> int""" |
54f9ee45 | 3686 | return _controls_.ToolBarBase_GetMaxRows(*args, **kwargs) |
e811c8ce RD |
3687 | |
3688 | def GetMaxCols(*args, **kwargs): | |
a95a7133 | 3689 | """GetMaxCols(self) -> int""" |
54f9ee45 | 3690 | return _controls_.ToolBarBase_GetMaxCols(*args, **kwargs) |
e811c8ce RD |
3691 | |
3692 | def SetToolBitmapSize(*args, **kwargs): | |
a95a7133 | 3693 | """SetToolBitmapSize(self, Size size)""" |
54f9ee45 | 3694 | return _controls_.ToolBarBase_SetToolBitmapSize(*args, **kwargs) |
e811c8ce RD |
3695 | |
3696 | def GetToolBitmapSize(*args, **kwargs): | |
a95a7133 | 3697 | """GetToolBitmapSize(self) -> Size""" |
54f9ee45 | 3698 | return _controls_.ToolBarBase_GetToolBitmapSize(*args, **kwargs) |
e811c8ce RD |
3699 | |
3700 | def GetToolSize(*args, **kwargs): | |
a95a7133 | 3701 | """GetToolSize(self) -> Size""" |
54f9ee45 | 3702 | return _controls_.ToolBarBase_GetToolSize(*args, **kwargs) |
e811c8ce RD |
3703 | |
3704 | def FindToolForPosition(*args, **kwargs): | |
a95a7133 | 3705 | """FindToolForPosition(self, int x, int y) -> ToolBarToolBase""" |
54f9ee45 | 3706 | return _controls_.ToolBarBase_FindToolForPosition(*args, **kwargs) |
e811c8ce | 3707 | |
3a04f143 | 3708 | def FindById(*args, **kwargs): |
a95a7133 | 3709 | """FindById(self, int toolid) -> ToolBarToolBase""" |
54f9ee45 | 3710 | return _controls_.ToolBarBase_FindById(*args, **kwargs) |
3a04f143 | 3711 | |
e811c8ce | 3712 | def IsVertical(*args, **kwargs): |
a95a7133 | 3713 | """IsVertical(self) -> bool""" |
54f9ee45 | 3714 | return _controls_.ToolBarBase_IsVertical(*args, **kwargs) |
e811c8ce | 3715 | |
d14a1e28 RD |
3716 | |
3717 | class ToolBarBasePtr(ToolBarBase): | |
3718 | def __init__(self, this): | |
3719 | self.this = this | |
3720 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3721 | self.__class__ = ToolBarBase | |
54f9ee45 | 3722 | _controls_.ToolBarBase_swigregister(ToolBarBasePtr) |
d14a1e28 RD |
3723 | |
3724 | class ToolBar(ToolBarBase): | |
e811c8ce RD |
3725 | def __repr__(self): |
3726 | return "<%s.%s; proxy of C++ wxToolBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3727 | def __init__(self, *args, **kwargs): |
0df68c9f | 3728 | """ |
248ed943 RD |
3729 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
3730 | Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL, | |
196addbf | 3731 | String name=wxPyToolBarNameStr) -> ToolBar |
0df68c9f | 3732 | """ |
54f9ee45 | 3733 | newobj = _controls_.new_ToolBar(*args, **kwargs) |
d14a1e28 RD |
3734 | self.this = newobj.this |
3735 | self.thisown = 1 | |
3736 | del newobj.thisown | |
3737 | self._setOORInfo(self) | |
e811c8ce RD |
3738 | |
3739 | def Create(*args, **kwargs): | |
0df68c9f | 3740 | """ |
248ed943 RD |
3741 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
3742 | Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL, | |
196addbf | 3743 | String name=wxPyToolBarNameStr) -> bool |
0df68c9f | 3744 | """ |
54f9ee45 | 3745 | return _controls_.ToolBar_Create(*args, **kwargs) |
e811c8ce RD |
3746 | |
3747 | def FindToolForPosition(*args, **kwargs): | |
a95a7133 | 3748 | """FindToolForPosition(self, int x, int y) -> ToolBarToolBase""" |
54f9ee45 | 3749 | return _controls_.ToolBar_FindToolForPosition(*args, **kwargs) |
e811c8ce | 3750 | |
22bfe96c | 3751 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
3752 | """ |
3753 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
3754 | ||
3755 | Get the default attributes for this class. This is useful if you want | |
3756 | to use the same font or colour in your own control as in a standard | |
3757 | control -- which is a much better idea than hard coding specific | |
3758 | colours or fonts which might look completely out of place on the | |
3759 | user's system, especially if it uses themes. | |
3760 | ||
3761 | The variant parameter is only relevant under Mac currently and is | |
3762 | ignore under other platforms. Under Mac, it will change the size of | |
3763 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
3764 | this. | |
3765 | """ | |
22bfe96c RD |
3766 | return _controls_.ToolBar_GetClassDefaultAttributes(*args, **kwargs) |
3767 | ||
3768 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 3769 | |
d14a1e28 RD |
3770 | class ToolBarPtr(ToolBar): |
3771 | def __init__(self, this): | |
3772 | self.this = this | |
3773 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3774 | self.__class__ = ToolBar | |
54f9ee45 | 3775 | _controls_.ToolBar_swigregister(ToolBarPtr) |
70551f47 | 3776 | |
d14a1e28 | 3777 | def PreToolBar(*args, **kwargs): |
e811c8ce | 3778 | """PreToolBar() -> ToolBar""" |
54f9ee45 | 3779 | val = _controls_.new_PreToolBar(*args, **kwargs) |
aa2a5b86 RD |
3780 | val.thisown = 1 |
3781 | return val | |
3782 | ||
22bfe96c | 3783 | def ToolBar_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
3784 | """ |
3785 | ToolBar_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
3786 | ||
3787 | Get the default attributes for this class. This is useful if you want | |
3788 | to use the same font or colour in your own control as in a standard | |
3789 | control -- which is a much better idea than hard coding specific | |
3790 | colours or fonts which might look completely out of place on the | |
3791 | user's system, especially if it uses themes. | |
3792 | ||
3793 | The variant parameter is only relevant under Mac currently and is | |
3794 | ignore under other platforms. Under Mac, it will change the size of | |
3795 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
3796 | this. | |
3797 | """ | |
22bfe96c RD |
3798 | return _controls_.ToolBar_GetClassDefaultAttributes(*args, **kwargs) |
3799 | ||
d14a1e28 RD |
3800 | #--------------------------------------------------------------------------- |
3801 | ||
54f9ee45 RD |
3802 | LC_VRULES = _controls_.LC_VRULES |
3803 | LC_HRULES = _controls_.LC_HRULES | |
3804 | LC_ICON = _controls_.LC_ICON | |
3805 | LC_SMALL_ICON = _controls_.LC_SMALL_ICON | |
3806 | LC_LIST = _controls_.LC_LIST | |
3807 | LC_REPORT = _controls_.LC_REPORT | |
3808 | LC_ALIGN_TOP = _controls_.LC_ALIGN_TOP | |
3809 | LC_ALIGN_LEFT = _controls_.LC_ALIGN_LEFT | |
3810 | LC_AUTOARRANGE = _controls_.LC_AUTOARRANGE | |
3811 | LC_VIRTUAL = _controls_.LC_VIRTUAL | |
3812 | LC_EDIT_LABELS = _controls_.LC_EDIT_LABELS | |
3813 | LC_NO_HEADER = _controls_.LC_NO_HEADER | |
3814 | LC_NO_SORT_HEADER = _controls_.LC_NO_SORT_HEADER | |
3815 | LC_SINGLE_SEL = _controls_.LC_SINGLE_SEL | |
3816 | LC_SORT_ASCENDING = _controls_.LC_SORT_ASCENDING | |
3817 | LC_SORT_DESCENDING = _controls_.LC_SORT_DESCENDING | |
3818 | LC_MASK_TYPE = _controls_.LC_MASK_TYPE | |
3819 | LC_MASK_ALIGN = _controls_.LC_MASK_ALIGN | |
3820 | LC_MASK_SORT = _controls_.LC_MASK_SORT | |
3821 | LIST_MASK_STATE = _controls_.LIST_MASK_STATE | |
3822 | LIST_MASK_TEXT = _controls_.LIST_MASK_TEXT | |
3823 | LIST_MASK_IMAGE = _controls_.LIST_MASK_IMAGE | |
3824 | LIST_MASK_DATA = _controls_.LIST_MASK_DATA | |
3825 | LIST_SET_ITEM = _controls_.LIST_SET_ITEM | |
3826 | LIST_MASK_WIDTH = _controls_.LIST_MASK_WIDTH | |
3827 | LIST_MASK_FORMAT = _controls_.LIST_MASK_FORMAT | |
3828 | LIST_STATE_DONTCARE = _controls_.LIST_STATE_DONTCARE | |
3829 | LIST_STATE_DROPHILITED = _controls_.LIST_STATE_DROPHILITED | |
3830 | LIST_STATE_FOCUSED = _controls_.LIST_STATE_FOCUSED | |
3831 | LIST_STATE_SELECTED = _controls_.LIST_STATE_SELECTED | |
3832 | LIST_STATE_CUT = _controls_.LIST_STATE_CUT | |
3833 | LIST_STATE_DISABLED = _controls_.LIST_STATE_DISABLED | |
3834 | LIST_STATE_FILTERED = _controls_.LIST_STATE_FILTERED | |
3835 | LIST_STATE_INUSE = _controls_.LIST_STATE_INUSE | |
3836 | LIST_STATE_PICKED = _controls_.LIST_STATE_PICKED | |
3837 | LIST_STATE_SOURCE = _controls_.LIST_STATE_SOURCE | |
3838 | LIST_HITTEST_ABOVE = _controls_.LIST_HITTEST_ABOVE | |
3839 | LIST_HITTEST_BELOW = _controls_.LIST_HITTEST_BELOW | |
3840 | LIST_HITTEST_NOWHERE = _controls_.LIST_HITTEST_NOWHERE | |
3841 | LIST_HITTEST_ONITEMICON = _controls_.LIST_HITTEST_ONITEMICON | |
3842 | LIST_HITTEST_ONITEMLABEL = _controls_.LIST_HITTEST_ONITEMLABEL | |
3843 | LIST_HITTEST_ONITEMRIGHT = _controls_.LIST_HITTEST_ONITEMRIGHT | |
3844 | LIST_HITTEST_ONITEMSTATEICON = _controls_.LIST_HITTEST_ONITEMSTATEICON | |
3845 | LIST_HITTEST_TOLEFT = _controls_.LIST_HITTEST_TOLEFT | |
3846 | LIST_HITTEST_TORIGHT = _controls_.LIST_HITTEST_TORIGHT | |
3847 | LIST_HITTEST_ONITEM = _controls_.LIST_HITTEST_ONITEM | |
3848 | LIST_NEXT_ABOVE = _controls_.LIST_NEXT_ABOVE | |
3849 | LIST_NEXT_ALL = _controls_.LIST_NEXT_ALL | |
3850 | LIST_NEXT_BELOW = _controls_.LIST_NEXT_BELOW | |
3851 | LIST_NEXT_LEFT = _controls_.LIST_NEXT_LEFT | |
3852 | LIST_NEXT_RIGHT = _controls_.LIST_NEXT_RIGHT | |
3853 | LIST_ALIGN_DEFAULT = _controls_.LIST_ALIGN_DEFAULT | |
3854 | LIST_ALIGN_LEFT = _controls_.LIST_ALIGN_LEFT | |
3855 | LIST_ALIGN_TOP = _controls_.LIST_ALIGN_TOP | |
3856 | LIST_ALIGN_SNAP_TO_GRID = _controls_.LIST_ALIGN_SNAP_TO_GRID | |
3857 | LIST_FORMAT_LEFT = _controls_.LIST_FORMAT_LEFT | |
3858 | LIST_FORMAT_RIGHT = _controls_.LIST_FORMAT_RIGHT | |
3859 | LIST_FORMAT_CENTRE = _controls_.LIST_FORMAT_CENTRE | |
3860 | LIST_FORMAT_CENTER = _controls_.LIST_FORMAT_CENTER | |
3861 | LIST_AUTOSIZE = _controls_.LIST_AUTOSIZE | |
3862 | LIST_AUTOSIZE_USEHEADER = _controls_.LIST_AUTOSIZE_USEHEADER | |
3863 | LIST_RECT_BOUNDS = _controls_.LIST_RECT_BOUNDS | |
3864 | LIST_RECT_ICON = _controls_.LIST_RECT_ICON | |
3865 | LIST_RECT_LABEL = _controls_.LIST_RECT_LABEL | |
3866 | LIST_FIND_UP = _controls_.LIST_FIND_UP | |
3867 | LIST_FIND_DOWN = _controls_.LIST_FIND_DOWN | |
3868 | LIST_FIND_LEFT = _controls_.LIST_FIND_LEFT | |
3869 | LIST_FIND_RIGHT = _controls_.LIST_FIND_RIGHT | |
d14a1e28 RD |
3870 | #--------------------------------------------------------------------------- |
3871 | ||
3872 | class ListItemAttr(object): | |
e811c8ce RD |
3873 | def __repr__(self): |
3874 | return "<%s.%s; proxy of C++ wxListItemAttr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3875 | def __init__(self, *args, **kwargs): |
0df68c9f | 3876 | """ |
a95a7133 | 3877 | __init__(self, Colour colText=wxNullColour, Colour colBack=wxNullColour, |
196addbf | 3878 | Font font=wxNullFont) -> ListItemAttr |
0df68c9f | 3879 | """ |
54f9ee45 | 3880 | newobj = _controls_.new_ListItemAttr(*args, **kwargs) |
d14a1e28 RD |
3881 | self.this = newobj.this |
3882 | self.thisown = 1 | |
3883 | del newobj.thisown | |
e811c8ce | 3884 | def SetTextColour(*args, **kwargs): |
a95a7133 | 3885 | """SetTextColour(self, Colour colText)""" |
54f9ee45 | 3886 | return _controls_.ListItemAttr_SetTextColour(*args, **kwargs) |
e811c8ce RD |
3887 | |
3888 | def SetBackgroundColour(*args, **kwargs): | |
a95a7133 | 3889 | """SetBackgroundColour(self, Colour colBack)""" |
54f9ee45 | 3890 | return _controls_.ListItemAttr_SetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
3891 | |
3892 | def SetFont(*args, **kwargs): | |
a95a7133 | 3893 | """SetFont(self, Font font)""" |
54f9ee45 | 3894 | return _controls_.ListItemAttr_SetFont(*args, **kwargs) |
e811c8ce RD |
3895 | |
3896 | def HasTextColour(*args, **kwargs): | |
a95a7133 | 3897 | """HasTextColour(self) -> bool""" |
54f9ee45 | 3898 | return _controls_.ListItemAttr_HasTextColour(*args, **kwargs) |
e811c8ce RD |
3899 | |
3900 | def HasBackgroundColour(*args, **kwargs): | |
a95a7133 | 3901 | """HasBackgroundColour(self) -> bool""" |
54f9ee45 | 3902 | return _controls_.ListItemAttr_HasBackgroundColour(*args, **kwargs) |
e811c8ce RD |
3903 | |
3904 | def HasFont(*args, **kwargs): | |
a95a7133 | 3905 | """HasFont(self) -> bool""" |
54f9ee45 | 3906 | return _controls_.ListItemAttr_HasFont(*args, **kwargs) |
e811c8ce RD |
3907 | |
3908 | def GetTextColour(*args, **kwargs): | |
a95a7133 | 3909 | """GetTextColour(self) -> Colour""" |
54f9ee45 | 3910 | return _controls_.ListItemAttr_GetTextColour(*args, **kwargs) |
e811c8ce RD |
3911 | |
3912 | def GetBackgroundColour(*args, **kwargs): | |
a95a7133 | 3913 | """GetBackgroundColour(self) -> Colour""" |
54f9ee45 | 3914 | return _controls_.ListItemAttr_GetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
3915 | |
3916 | def GetFont(*args, **kwargs): | |
a95a7133 | 3917 | """GetFont(self) -> Font""" |
54f9ee45 | 3918 | return _controls_.ListItemAttr_GetFont(*args, **kwargs) |
e811c8ce RD |
3919 | |
3920 | def Destroy(*args, **kwargs): | |
a95a7133 | 3921 | """Destroy(self)""" |
54f9ee45 | 3922 | return _controls_.ListItemAttr_Destroy(*args, **kwargs) |
e811c8ce | 3923 | |
70551f47 | 3924 | |
d14a1e28 RD |
3925 | class ListItemAttrPtr(ListItemAttr): |
3926 | def __init__(self, this): | |
70551f47 | 3927 | self.this = this |
d14a1e28 RD |
3928 | if not hasattr(self,"thisown"): self.thisown = 0 |
3929 | self.__class__ = ListItemAttr | |
54f9ee45 | 3930 | _controls_.ListItemAttr_swigregister(ListItemAttrPtr) |
b2dc1044 | 3931 | ListCtrlNameStr = cvar.ListCtrlNameStr |
d14a1e28 RD |
3932 | |
3933 | #--------------------------------------------------------------------------- | |
3934 | ||
54f9ee45 | 3935 | class ListItem(_core.Object): |
e811c8ce RD |
3936 | def __repr__(self): |
3937 | return "<%s.%s; proxy of C++ wxListItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3938 | def __init__(self, *args, **kwargs): |
a95a7133 | 3939 | """__init__(self) -> ListItem""" |
54f9ee45 | 3940 | newobj = _controls_.new_ListItem(*args, **kwargs) |
d14a1e28 RD |
3941 | self.this = newobj.this |
3942 | self.thisown = 1 | |
3943 | del newobj.thisown | |
54f9ee45 | 3944 | def __del__(self, destroy=_controls_.delete_ListItem): |
a95a7133 | 3945 | """__del__(self)""" |
d14a1e28 RD |
3946 | try: |
3947 | if self.thisown: destroy(self) | |
3948 | except: pass | |
e811c8ce RD |
3949 | |
3950 | def Clear(*args, **kwargs): | |
a95a7133 | 3951 | """Clear(self)""" |
54f9ee45 | 3952 | return _controls_.ListItem_Clear(*args, **kwargs) |
e811c8ce RD |
3953 | |
3954 | def ClearAttributes(*args, **kwargs): | |
a95a7133 | 3955 | """ClearAttributes(self)""" |
54f9ee45 | 3956 | return _controls_.ListItem_ClearAttributes(*args, **kwargs) |
e811c8ce RD |
3957 | |
3958 | def SetMask(*args, **kwargs): | |
a95a7133 | 3959 | """SetMask(self, long mask)""" |
54f9ee45 | 3960 | return _controls_.ListItem_SetMask(*args, **kwargs) |
e811c8ce RD |
3961 | |
3962 | def SetId(*args, **kwargs): | |
a95a7133 | 3963 | """SetId(self, long id)""" |
54f9ee45 | 3964 | return _controls_.ListItem_SetId(*args, **kwargs) |
e811c8ce RD |
3965 | |
3966 | def SetColumn(*args, **kwargs): | |
a95a7133 | 3967 | """SetColumn(self, int col)""" |
54f9ee45 | 3968 | return _controls_.ListItem_SetColumn(*args, **kwargs) |
e811c8ce RD |
3969 | |
3970 | def SetState(*args, **kwargs): | |
a95a7133 | 3971 | """SetState(self, long state)""" |
54f9ee45 | 3972 | return _controls_.ListItem_SetState(*args, **kwargs) |
e811c8ce RD |
3973 | |
3974 | def SetStateMask(*args, **kwargs): | |
a95a7133 | 3975 | """SetStateMask(self, long stateMask)""" |
54f9ee45 | 3976 | return _controls_.ListItem_SetStateMask(*args, **kwargs) |
e811c8ce RD |
3977 | |
3978 | def SetText(*args, **kwargs): | |
a95a7133 | 3979 | """SetText(self, String text)""" |
54f9ee45 | 3980 | return _controls_.ListItem_SetText(*args, **kwargs) |
e811c8ce RD |
3981 | |
3982 | def SetImage(*args, **kwargs): | |
a95a7133 | 3983 | """SetImage(self, int image)""" |
54f9ee45 | 3984 | return _controls_.ListItem_SetImage(*args, **kwargs) |
e811c8ce RD |
3985 | |
3986 | def SetData(*args, **kwargs): | |
a95a7133 | 3987 | """SetData(self, long data)""" |
54f9ee45 | 3988 | return _controls_.ListItem_SetData(*args, **kwargs) |
e811c8ce RD |
3989 | |
3990 | def SetWidth(*args, **kwargs): | |
a95a7133 | 3991 | """SetWidth(self, int width)""" |
54f9ee45 | 3992 | return _controls_.ListItem_SetWidth(*args, **kwargs) |
e811c8ce RD |
3993 | |
3994 | def SetAlign(*args, **kwargs): | |
a95a7133 | 3995 | """SetAlign(self, int align)""" |
54f9ee45 | 3996 | return _controls_.ListItem_SetAlign(*args, **kwargs) |
e811c8ce RD |
3997 | |
3998 | def SetTextColour(*args, **kwargs): | |
a95a7133 | 3999 | """SetTextColour(self, Colour colText)""" |
54f9ee45 | 4000 | return _controls_.ListItem_SetTextColour(*args, **kwargs) |
e811c8ce RD |
4001 | |
4002 | def SetBackgroundColour(*args, **kwargs): | |
a95a7133 | 4003 | """SetBackgroundColour(self, Colour colBack)""" |
54f9ee45 | 4004 | return _controls_.ListItem_SetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
4005 | |
4006 | def SetFont(*args, **kwargs): | |
a95a7133 | 4007 | """SetFont(self, Font font)""" |
54f9ee45 | 4008 | return _controls_.ListItem_SetFont(*args, **kwargs) |
e811c8ce RD |
4009 | |
4010 | def GetMask(*args, **kwargs): | |
a95a7133 | 4011 | """GetMask(self) -> long""" |
54f9ee45 | 4012 | return _controls_.ListItem_GetMask(*args, **kwargs) |
e811c8ce RD |
4013 | |
4014 | def GetId(*args, **kwargs): | |
a95a7133 | 4015 | """GetId(self) -> long""" |
54f9ee45 | 4016 | return _controls_.ListItem_GetId(*args, **kwargs) |
e811c8ce RD |
4017 | |
4018 | def GetColumn(*args, **kwargs): | |
a95a7133 | 4019 | """GetColumn(self) -> int""" |
54f9ee45 | 4020 | return _controls_.ListItem_GetColumn(*args, **kwargs) |
e811c8ce RD |
4021 | |
4022 | def GetState(*args, **kwargs): | |
a95a7133 | 4023 | """GetState(self) -> long""" |
54f9ee45 | 4024 | return _controls_.ListItem_GetState(*args, **kwargs) |
e811c8ce RD |
4025 | |
4026 | def GetText(*args, **kwargs): | |
a95a7133 | 4027 | """GetText(self) -> String""" |
54f9ee45 | 4028 | return _controls_.ListItem_GetText(*args, **kwargs) |
e811c8ce RD |
4029 | |
4030 | def GetImage(*args, **kwargs): | |
a95a7133 | 4031 | """GetImage(self) -> int""" |
54f9ee45 | 4032 | return _controls_.ListItem_GetImage(*args, **kwargs) |
e811c8ce RD |
4033 | |
4034 | def GetData(*args, **kwargs): | |
a95a7133 | 4035 | """GetData(self) -> long""" |
54f9ee45 | 4036 | return _controls_.ListItem_GetData(*args, **kwargs) |
e811c8ce RD |
4037 | |
4038 | def GetWidth(*args, **kwargs): | |
a95a7133 | 4039 | """GetWidth(self) -> int""" |
54f9ee45 | 4040 | return _controls_.ListItem_GetWidth(*args, **kwargs) |
e811c8ce RD |
4041 | |
4042 | def GetAlign(*args, **kwargs): | |
a95a7133 | 4043 | """GetAlign(self) -> int""" |
54f9ee45 | 4044 | return _controls_.ListItem_GetAlign(*args, **kwargs) |
e811c8ce RD |
4045 | |
4046 | def GetAttributes(*args, **kwargs): | |
a95a7133 | 4047 | """GetAttributes(self) -> ListItemAttr""" |
54f9ee45 | 4048 | return _controls_.ListItem_GetAttributes(*args, **kwargs) |
e811c8ce RD |
4049 | |
4050 | def HasAttributes(*args, **kwargs): | |
a95a7133 | 4051 | """HasAttributes(self) -> bool""" |
54f9ee45 | 4052 | return _controls_.ListItem_HasAttributes(*args, **kwargs) |
e811c8ce RD |
4053 | |
4054 | def GetTextColour(*args, **kwargs): | |
a95a7133 | 4055 | """GetTextColour(self) -> Colour""" |
54f9ee45 | 4056 | return _controls_.ListItem_GetTextColour(*args, **kwargs) |
e811c8ce RD |
4057 | |
4058 | def GetBackgroundColour(*args, **kwargs): | |
a95a7133 | 4059 | """GetBackgroundColour(self) -> Colour""" |
54f9ee45 | 4060 | return _controls_.ListItem_GetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
4061 | |
4062 | def GetFont(*args, **kwargs): | |
a95a7133 | 4063 | """GetFont(self) -> Font""" |
54f9ee45 RD |
4064 | return _controls_.ListItem_GetFont(*args, **kwargs) |
4065 | ||
4066 | m_mask = property(_controls_.ListItem_m_mask_get, _controls_.ListItem_m_mask_set) | |
4067 | m_itemId = property(_controls_.ListItem_m_itemId_get, _controls_.ListItem_m_itemId_set) | |
4068 | m_col = property(_controls_.ListItem_m_col_get, _controls_.ListItem_m_col_set) | |
4069 | m_state = property(_controls_.ListItem_m_state_get, _controls_.ListItem_m_state_set) | |
4070 | m_stateMask = property(_controls_.ListItem_m_stateMask_get, _controls_.ListItem_m_stateMask_set) | |
4071 | m_text = property(_controls_.ListItem_m_text_get, _controls_.ListItem_m_text_set) | |
4072 | m_image = property(_controls_.ListItem_m_image_get, _controls_.ListItem_m_image_set) | |
4073 | m_data = property(_controls_.ListItem_m_data_get, _controls_.ListItem_m_data_set) | |
4074 | m_format = property(_controls_.ListItem_m_format_get, _controls_.ListItem_m_format_set) | |
4075 | m_width = property(_controls_.ListItem_m_width_get, _controls_.ListItem_m_width_set) | |
d14a1e28 RD |
4076 | |
4077 | class ListItemPtr(ListItem): | |
4078 | def __init__(self, this): | |
4079 | self.this = this | |
4080 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4081 | self.__class__ = ListItem | |
54f9ee45 | 4082 | _controls_.ListItem_swigregister(ListItemPtr) |
d14a1e28 RD |
4083 | |
4084 | #--------------------------------------------------------------------------- | |
4085 | ||
54f9ee45 | 4086 | class ListEvent(_core.NotifyEvent): |
e811c8ce RD |
4087 | def __repr__(self): |
4088 | return "<%s.%s; proxy of C++ wxListEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4089 | def __init__(self, *args, **kwargs): |
a95a7133 | 4090 | """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> ListEvent""" |
54f9ee45 | 4091 | newobj = _controls_.new_ListEvent(*args, **kwargs) |
d14a1e28 | 4092 | self.this = newobj.this |
70551f47 | 4093 | self.thisown = 1 |
d14a1e28 | 4094 | del newobj.thisown |
54f9ee45 RD |
4095 | m_code = property(_controls_.ListEvent_m_code_get, _controls_.ListEvent_m_code_set) |
4096 | m_oldItemIndex = property(_controls_.ListEvent_m_oldItemIndex_get, _controls_.ListEvent_m_oldItemIndex_set) | |
4097 | m_itemIndex = property(_controls_.ListEvent_m_itemIndex_get, _controls_.ListEvent_m_itemIndex_set) | |
4098 | m_col = property(_controls_.ListEvent_m_col_get, _controls_.ListEvent_m_col_set) | |
4099 | m_pointDrag = property(_controls_.ListEvent_m_pointDrag_get, _controls_.ListEvent_m_pointDrag_set) | |
4100 | m_item = property(_controls_.ListEvent_m_item_get) | |
e811c8ce | 4101 | def GetKeyCode(*args, **kwargs): |
a95a7133 | 4102 | """GetKeyCode(self) -> int""" |
54f9ee45 | 4103 | return _controls_.ListEvent_GetKeyCode(*args, **kwargs) |
e811c8ce | 4104 | |
d14a1e28 | 4105 | GetCode = GetKeyCode |
e811c8ce | 4106 | def GetIndex(*args, **kwargs): |
a95a7133 | 4107 | """GetIndex(self) -> long""" |
54f9ee45 | 4108 | return _controls_.ListEvent_GetIndex(*args, **kwargs) |
e811c8ce RD |
4109 | |
4110 | def GetColumn(*args, **kwargs): | |
a95a7133 | 4111 | """GetColumn(self) -> int""" |
54f9ee45 | 4112 | return _controls_.ListEvent_GetColumn(*args, **kwargs) |
e811c8ce RD |
4113 | |
4114 | def GetPoint(*args, **kwargs): | |
a95a7133 | 4115 | """GetPoint(self) -> Point""" |
54f9ee45 | 4116 | return _controls_.ListEvent_GetPoint(*args, **kwargs) |
e811c8ce | 4117 | |
c9c7117a | 4118 | GetPosition = GetPoint |
e811c8ce | 4119 | def GetLabel(*args, **kwargs): |
a95a7133 | 4120 | """GetLabel(self) -> String""" |
54f9ee45 | 4121 | return _controls_.ListEvent_GetLabel(*args, **kwargs) |
e811c8ce RD |
4122 | |
4123 | def GetText(*args, **kwargs): | |
a95a7133 | 4124 | """GetText(self) -> String""" |
54f9ee45 | 4125 | return _controls_.ListEvent_GetText(*args, **kwargs) |
e811c8ce RD |
4126 | |
4127 | def GetImage(*args, **kwargs): | |
a95a7133 | 4128 | """GetImage(self) -> int""" |
54f9ee45 | 4129 | return _controls_.ListEvent_GetImage(*args, **kwargs) |
e811c8ce RD |
4130 | |
4131 | def GetData(*args, **kwargs): | |
a95a7133 | 4132 | """GetData(self) -> long""" |
54f9ee45 | 4133 | return _controls_.ListEvent_GetData(*args, **kwargs) |
e811c8ce RD |
4134 | |
4135 | def GetMask(*args, **kwargs): | |
a95a7133 | 4136 | """GetMask(self) -> long""" |
54f9ee45 | 4137 | return _controls_.ListEvent_GetMask(*args, **kwargs) |
e811c8ce RD |
4138 | |
4139 | def GetItem(*args, **kwargs): | |
a95a7133 | 4140 | """GetItem(self) -> ListItem""" |
54f9ee45 | 4141 | return _controls_.ListEvent_GetItem(*args, **kwargs) |
e811c8ce RD |
4142 | |
4143 | def GetCacheFrom(*args, **kwargs): | |
a95a7133 | 4144 | """GetCacheFrom(self) -> long""" |
54f9ee45 | 4145 | return _controls_.ListEvent_GetCacheFrom(*args, **kwargs) |
e811c8ce RD |
4146 | |
4147 | def GetCacheTo(*args, **kwargs): | |
a95a7133 | 4148 | """GetCacheTo(self) -> long""" |
54f9ee45 | 4149 | return _controls_.ListEvent_GetCacheTo(*args, **kwargs) |
e811c8ce RD |
4150 | |
4151 | def IsEditCancelled(*args, **kwargs): | |
a95a7133 | 4152 | """IsEditCancelled(self) -> bool""" |
54f9ee45 | 4153 | return _controls_.ListEvent_IsEditCancelled(*args, **kwargs) |
e811c8ce RD |
4154 | |
4155 | def SetEditCanceled(*args, **kwargs): | |
a95a7133 | 4156 | """SetEditCanceled(self, bool editCancelled)""" |
54f9ee45 | 4157 | return _controls_.ListEvent_SetEditCanceled(*args, **kwargs) |
e811c8ce | 4158 | |
70551f47 | 4159 | |
d14a1e28 RD |
4160 | class ListEventPtr(ListEvent): |
4161 | def __init__(self, this): | |
4162 | self.this = this | |
4163 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4164 | self.__class__ = ListEvent | |
54f9ee45 RD |
4165 | _controls_.ListEvent_swigregister(ListEventPtr) |
4166 | ||
4167 | wxEVT_COMMAND_LIST_BEGIN_DRAG = _controls_.wxEVT_COMMAND_LIST_BEGIN_DRAG | |
4168 | wxEVT_COMMAND_LIST_BEGIN_RDRAG = _controls_.wxEVT_COMMAND_LIST_BEGIN_RDRAG | |
4169 | wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = _controls_.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT | |
4170 | wxEVT_COMMAND_LIST_END_LABEL_EDIT = _controls_.wxEVT_COMMAND_LIST_END_LABEL_EDIT | |
4171 | wxEVT_COMMAND_LIST_DELETE_ITEM = _controls_.wxEVT_COMMAND_LIST_DELETE_ITEM | |
4172 | wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = _controls_.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS | |
4173 | wxEVT_COMMAND_LIST_GET_INFO = _controls_.wxEVT_COMMAND_LIST_GET_INFO | |
4174 | wxEVT_COMMAND_LIST_SET_INFO = _controls_.wxEVT_COMMAND_LIST_SET_INFO | |
4175 | wxEVT_COMMAND_LIST_ITEM_SELECTED = _controls_.wxEVT_COMMAND_LIST_ITEM_SELECTED | |
4176 | wxEVT_COMMAND_LIST_ITEM_DESELECTED = _controls_.wxEVT_COMMAND_LIST_ITEM_DESELECTED | |
4177 | wxEVT_COMMAND_LIST_KEY_DOWN = _controls_.wxEVT_COMMAND_LIST_KEY_DOWN | |
4178 | wxEVT_COMMAND_LIST_INSERT_ITEM = _controls_.wxEVT_COMMAND_LIST_INSERT_ITEM | |
4179 | wxEVT_COMMAND_LIST_COL_CLICK = _controls_.wxEVT_COMMAND_LIST_COL_CLICK | |
4180 | wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK = _controls_.wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK | |
4181 | wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK = _controls_.wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK | |
4182 | wxEVT_COMMAND_LIST_ITEM_ACTIVATED = _controls_.wxEVT_COMMAND_LIST_ITEM_ACTIVATED | |
4183 | wxEVT_COMMAND_LIST_CACHE_HINT = _controls_.wxEVT_COMMAND_LIST_CACHE_HINT | |
4184 | wxEVT_COMMAND_LIST_COL_RIGHT_CLICK = _controls_.wxEVT_COMMAND_LIST_COL_RIGHT_CLICK | |
4185 | wxEVT_COMMAND_LIST_COL_BEGIN_DRAG = _controls_.wxEVT_COMMAND_LIST_COL_BEGIN_DRAG | |
4186 | wxEVT_COMMAND_LIST_COL_DRAGGING = _controls_.wxEVT_COMMAND_LIST_COL_DRAGGING | |
4187 | wxEVT_COMMAND_LIST_COL_END_DRAG = _controls_.wxEVT_COMMAND_LIST_COL_END_DRAG | |
4188 | wxEVT_COMMAND_LIST_ITEM_FOCUSED = _controls_.wxEVT_COMMAND_LIST_ITEM_FOCUSED | |
d14a1e28 RD |
4189 | EVT_LIST_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_BEGIN_DRAG , 1) |
4190 | EVT_LIST_BEGIN_RDRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_BEGIN_RDRAG , 1) | |
4191 | EVT_LIST_BEGIN_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT , 1) | |
4192 | EVT_LIST_END_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_LIST_END_LABEL_EDIT , 1) | |
4193 | EVT_LIST_DELETE_ITEM = wx.PyEventBinder(wxEVT_COMMAND_LIST_DELETE_ITEM , 1) | |
4194 | EVT_LIST_DELETE_ALL_ITEMS = wx.PyEventBinder(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS , 1) | |
4195 | EVT_LIST_GET_INFO = wx.PyEventBinder(wxEVT_COMMAND_LIST_GET_INFO , 1) | |
4196 | EVT_LIST_SET_INFO = wx.PyEventBinder(wxEVT_COMMAND_LIST_SET_INFO , 1) | |
4197 | EVT_LIST_ITEM_SELECTED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_SELECTED , 1) | |
4198 | EVT_LIST_ITEM_DESELECTED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_DESELECTED , 1) | |
4199 | EVT_LIST_KEY_DOWN = wx.PyEventBinder(wxEVT_COMMAND_LIST_KEY_DOWN , 1) | |
4200 | EVT_LIST_INSERT_ITEM = wx.PyEventBinder(wxEVT_COMMAND_LIST_INSERT_ITEM , 1) | |
4201 | EVT_LIST_COL_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_CLICK , 1) | |
4202 | EVT_LIST_ITEM_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK , 1) | |
4203 | EVT_LIST_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, 1) | |
4204 | EVT_LIST_ITEM_ACTIVATED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_ACTIVATED , 1) | |
4205 | EVT_LIST_CACHE_HINT = wx.PyEventBinder(wxEVT_COMMAND_LIST_CACHE_HINT , 1) | |
4206 | EVT_LIST_COL_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_RIGHT_CLICK , 1) | |
4207 | EVT_LIST_COL_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_BEGIN_DRAG , 1) | |
4208 | EVT_LIST_COL_DRAGGING = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_DRAGGING , 1) | |
4209 | EVT_LIST_COL_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_END_DRAG , 1) | |
4210 | EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED , 1) | |
4211 | ||
4212 | #--------------------------------------------------------------------------- | |
4213 | ||
54f9ee45 | 4214 | class ListCtrl(_core.Control): |
e811c8ce RD |
4215 | def __repr__(self): |
4216 | return "<%s.%s; proxy of C++ wxPyListCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4217 | def __init__(self, *args, **kwargs): |
0df68c9f | 4218 | """ |
a95a7133 | 4219 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f | 4220 | Size size=DefaultSize, long style=LC_ICON, |
b2dc1044 | 4221 | Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListCtrl |
0df68c9f | 4222 | """ |
54f9ee45 | 4223 | newobj = _controls_.new_ListCtrl(*args, **kwargs) |
d14a1e28 RD |
4224 | self.this = newobj.this |
4225 | self.thisown = 1 | |
4226 | del newobj.thisown | |
4227 | self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl) | |
e811c8ce RD |
4228 | |
4229 | def Create(*args, **kwargs): | |
0df68c9f | 4230 | """ |
a95a7133 | 4231 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f | 4232 | Size size=DefaultSize, long style=LC_ICON, |
b2dc1044 | 4233 | Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool |
15afbcd0 RD |
4234 | |
4235 | Do the 2nd phase and create the GUI control. | |
0df68c9f | 4236 | """ |
54f9ee45 | 4237 | return _controls_.ListCtrl_Create(*args, **kwargs) |
e811c8ce RD |
4238 | |
4239 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 4240 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 4241 | return _controls_.ListCtrl__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
4242 | |
4243 | def SetForegroundColour(*args, **kwargs): | |
a95a7133 | 4244 | """SetForegroundColour(self, Colour col) -> bool""" |
54f9ee45 | 4245 | return _controls_.ListCtrl_SetForegroundColour(*args, **kwargs) |
e811c8ce RD |
4246 | |
4247 | def SetBackgroundColour(*args, **kwargs): | |
a95a7133 | 4248 | """SetBackgroundColour(self, Colour col) -> bool""" |
54f9ee45 | 4249 | return _controls_.ListCtrl_SetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
4250 | |
4251 | def GetColumn(*args, **kwargs): | |
a95a7133 | 4252 | """GetColumn(self, int col) -> ListItem""" |
54f9ee45 | 4253 | val = _controls_.ListCtrl_GetColumn(*args, **kwargs) |
d14a1e28 RD |
4254 | if val is not None: val.thisown = 1 |
4255 | return val | |
e811c8ce RD |
4256 | |
4257 | def SetColumn(*args, **kwargs): | |
a95a7133 | 4258 | """SetColumn(self, int col, ListItem item) -> bool""" |
54f9ee45 | 4259 | return _controls_.ListCtrl_SetColumn(*args, **kwargs) |
e811c8ce RD |
4260 | |
4261 | def GetColumnWidth(*args, **kwargs): | |
a95a7133 | 4262 | """GetColumnWidth(self, int col) -> int""" |
54f9ee45 | 4263 | return _controls_.ListCtrl_GetColumnWidth(*args, **kwargs) |
e811c8ce RD |
4264 | |
4265 | def SetColumnWidth(*args, **kwargs): | |
a95a7133 | 4266 | """SetColumnWidth(self, int col, int width) -> bool""" |
54f9ee45 | 4267 | return _controls_.ListCtrl_SetColumnWidth(*args, **kwargs) |
e811c8ce RD |
4268 | |
4269 | def GetCountPerPage(*args, **kwargs): | |
a95a7133 | 4270 | """GetCountPerPage(self) -> int""" |
54f9ee45 | 4271 | return _controls_.ListCtrl_GetCountPerPage(*args, **kwargs) |
e811c8ce RD |
4272 | |
4273 | def GetViewRect(*args, **kwargs): | |
a95a7133 | 4274 | """GetViewRect(self) -> Rect""" |
54f9ee45 | 4275 | return _controls_.ListCtrl_GetViewRect(*args, **kwargs) |
e811c8ce RD |
4276 | |
4277 | def GetItem(*args, **kwargs): | |
a95a7133 | 4278 | """GetItem(self, long itemId, int col=0) -> ListItem""" |
54f9ee45 | 4279 | val = _controls_.ListCtrl_GetItem(*args, **kwargs) |
d14a1e28 RD |
4280 | if val is not None: val.thisown = 1 |
4281 | return val | |
e811c8ce RD |
4282 | |
4283 | def SetItem(*args, **kwargs): | |
a95a7133 | 4284 | """SetItem(self, ListItem info) -> bool""" |
54f9ee45 | 4285 | return _controls_.ListCtrl_SetItem(*args, **kwargs) |
e811c8ce RD |
4286 | |
4287 | def SetStringItem(*args, **kwargs): | |
a95a7133 | 4288 | """SetStringItem(self, long index, int col, String label, int imageId=-1) -> long""" |
54f9ee45 | 4289 | return _controls_.ListCtrl_SetStringItem(*args, **kwargs) |
e811c8ce RD |
4290 | |
4291 | def GetItemState(*args, **kwargs): | |
a95a7133 | 4292 | """GetItemState(self, long item, long stateMask) -> int""" |
54f9ee45 | 4293 | return _controls_.ListCtrl_GetItemState(*args, **kwargs) |
e811c8ce RD |
4294 | |
4295 | def SetItemState(*args, **kwargs): | |
a95a7133 | 4296 | """SetItemState(self, long item, long state, long stateMask) -> bool""" |
54f9ee45 | 4297 | return _controls_.ListCtrl_SetItemState(*args, **kwargs) |
e811c8ce RD |
4298 | |
4299 | def SetItemImage(*args, **kwargs): | |
a95a7133 | 4300 | """SetItemImage(self, long item, int image, int selImage) -> bool""" |
54f9ee45 | 4301 | return _controls_.ListCtrl_SetItemImage(*args, **kwargs) |
e811c8ce RD |
4302 | |
4303 | def GetItemText(*args, **kwargs): | |
a95a7133 | 4304 | """GetItemText(self, long item) -> String""" |
54f9ee45 | 4305 | return _controls_.ListCtrl_GetItemText(*args, **kwargs) |
e811c8ce RD |
4306 | |
4307 | def SetItemText(*args, **kwargs): | |
a95a7133 | 4308 | """SetItemText(self, long item, String str)""" |
54f9ee45 | 4309 | return _controls_.ListCtrl_SetItemText(*args, **kwargs) |
e811c8ce RD |
4310 | |
4311 | def GetItemData(*args, **kwargs): | |
a95a7133 | 4312 | """GetItemData(self, long item) -> long""" |
54f9ee45 | 4313 | return _controls_.ListCtrl_GetItemData(*args, **kwargs) |
e811c8ce RD |
4314 | |
4315 | def SetItemData(*args, **kwargs): | |
a95a7133 | 4316 | """SetItemData(self, long item, long data) -> bool""" |
54f9ee45 | 4317 | return _controls_.ListCtrl_SetItemData(*args, **kwargs) |
e811c8ce RD |
4318 | |
4319 | def GetItemPosition(*args, **kwargs): | |
a95a7133 | 4320 | """GetItemPosition(self, long item) -> Point""" |
54f9ee45 | 4321 | return _controls_.ListCtrl_GetItemPosition(*args, **kwargs) |
e811c8ce RD |
4322 | |
4323 | def GetItemRect(*args, **kwargs): | |
a95a7133 | 4324 | """GetItemRect(self, long item, int code=LIST_RECT_BOUNDS) -> Rect""" |
54f9ee45 | 4325 | return _controls_.ListCtrl_GetItemRect(*args, **kwargs) |
e811c8ce RD |
4326 | |
4327 | def SetItemPosition(*args, **kwargs): | |
a95a7133 | 4328 | """SetItemPosition(self, long item, Point pos) -> bool""" |
54f9ee45 | 4329 | return _controls_.ListCtrl_SetItemPosition(*args, **kwargs) |
e811c8ce RD |
4330 | |
4331 | def GetItemCount(*args, **kwargs): | |
a95a7133 | 4332 | """GetItemCount(self) -> int""" |
54f9ee45 | 4333 | return _controls_.ListCtrl_GetItemCount(*args, **kwargs) |
e811c8ce RD |
4334 | |
4335 | def GetColumnCount(*args, **kwargs): | |
a95a7133 | 4336 | """GetColumnCount(self) -> int""" |
54f9ee45 | 4337 | return _controls_.ListCtrl_GetColumnCount(*args, **kwargs) |
e811c8ce RD |
4338 | |
4339 | def GetItemSpacing(*args, **kwargs): | |
a95a7133 | 4340 | """GetItemSpacing(self) -> Size""" |
54f9ee45 | 4341 | return _controls_.ListCtrl_GetItemSpacing(*args, **kwargs) |
e811c8ce RD |
4342 | |
4343 | def SetItemSpacing(*args, **kwargs): | |
a95a7133 | 4344 | """SetItemSpacing(self, int spacing, bool isSmall=False)""" |
54f9ee45 | 4345 | return _controls_.ListCtrl_SetItemSpacing(*args, **kwargs) |
e811c8ce RD |
4346 | |
4347 | def GetSelectedItemCount(*args, **kwargs): | |
a95a7133 | 4348 | """GetSelectedItemCount(self) -> int""" |
54f9ee45 | 4349 | return _controls_.ListCtrl_GetSelectedItemCount(*args, **kwargs) |
e811c8ce RD |
4350 | |
4351 | def GetTextColour(*args, **kwargs): | |
a95a7133 | 4352 | """GetTextColour(self) -> Colour""" |
54f9ee45 | 4353 | return _controls_.ListCtrl_GetTextColour(*args, **kwargs) |
e811c8ce RD |
4354 | |
4355 | def SetTextColour(*args, **kwargs): | |
a95a7133 | 4356 | """SetTextColour(self, Colour col)""" |
54f9ee45 | 4357 | return _controls_.ListCtrl_SetTextColour(*args, **kwargs) |
e811c8ce RD |
4358 | |
4359 | def GetTopItem(*args, **kwargs): | |
a95a7133 | 4360 | """GetTopItem(self) -> long""" |
54f9ee45 | 4361 | return _controls_.ListCtrl_GetTopItem(*args, **kwargs) |
e811c8ce RD |
4362 | |
4363 | def SetSingleStyle(*args, **kwargs): | |
a95a7133 | 4364 | """SetSingleStyle(self, long style, bool add=True)""" |
54f9ee45 | 4365 | return _controls_.ListCtrl_SetSingleStyle(*args, **kwargs) |
e811c8ce RD |
4366 | |
4367 | def SetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 | 4368 | """ |
a95a7133 | 4369 | SetWindowStyleFlag(self, long style) |
15afbcd0 | 4370 | |
41e2b43e RD |
4371 | Sets the style of the window. Please note that some styles cannot be |
4372 | changed after the window creation and that Refresh() might need to be | |
4373 | called after changing the others for the change to take place | |
4374 | immediately. | |
15afbcd0 | 4375 | """ |
54f9ee45 | 4376 | return _controls_.ListCtrl_SetWindowStyleFlag(*args, **kwargs) |
e811c8ce RD |
4377 | |
4378 | def GetNextItem(*args, **kwargs): | |
a95a7133 | 4379 | """GetNextItem(self, long item, int geometry=LIST_NEXT_ALL, int state=LIST_STATE_DONTCARE) -> long""" |
54f9ee45 | 4380 | return _controls_.ListCtrl_GetNextItem(*args, **kwargs) |
e811c8ce RD |
4381 | |
4382 | def GetImageList(*args, **kwargs): | |
a95a7133 | 4383 | """GetImageList(self, int which) -> ImageList""" |
54f9ee45 | 4384 | return _controls_.ListCtrl_GetImageList(*args, **kwargs) |
e811c8ce RD |
4385 | |
4386 | def SetImageList(*args, **kwargs): | |
a95a7133 | 4387 | """SetImageList(self, ImageList imageList, int which)""" |
54f9ee45 | 4388 | return _controls_.ListCtrl_SetImageList(*args, **kwargs) |
e811c8ce RD |
4389 | |
4390 | def AssignImageList(*args, **kwargs): | |
a95a7133 | 4391 | """AssignImageList(self, ImageList imageList, int which)""" |
54f9ee45 | 4392 | return _controls_.ListCtrl_AssignImageList(*args, **kwargs) |
e811c8ce | 4393 | |
4276dc52 | 4394 | def InReportView(*args, **kwargs): |
a95a7133 | 4395 | """InReportView(self) -> bool""" |
54f9ee45 | 4396 | return _controls_.ListCtrl_InReportView(*args, **kwargs) |
4276dc52 | 4397 | |
e811c8ce | 4398 | def IsVirtual(*args, **kwargs): |
a95a7133 | 4399 | """IsVirtual(self) -> bool""" |
54f9ee45 | 4400 | return _controls_.ListCtrl_IsVirtual(*args, **kwargs) |
e811c8ce RD |
4401 | |
4402 | def RefreshItem(*args, **kwargs): | |
a95a7133 | 4403 | """RefreshItem(self, long item)""" |
54f9ee45 | 4404 | return _controls_.ListCtrl_RefreshItem(*args, **kwargs) |
e811c8ce RD |
4405 | |
4406 | def RefreshItems(*args, **kwargs): | |
a95a7133 | 4407 | """RefreshItems(self, long itemFrom, long itemTo)""" |
54f9ee45 | 4408 | return _controls_.ListCtrl_RefreshItems(*args, **kwargs) |
e811c8ce RD |
4409 | |
4410 | def Arrange(*args, **kwargs): | |
a95a7133 | 4411 | """Arrange(self, int flag=LIST_ALIGN_DEFAULT) -> bool""" |
54f9ee45 | 4412 | return _controls_.ListCtrl_Arrange(*args, **kwargs) |
e811c8ce RD |
4413 | |
4414 | def DeleteItem(*args, **kwargs): | |
a95a7133 | 4415 | """DeleteItem(self, long item) -> bool""" |
54f9ee45 | 4416 | return _controls_.ListCtrl_DeleteItem(*args, **kwargs) |
e811c8ce RD |
4417 | |
4418 | def DeleteAllItems(*args, **kwargs): | |
a95a7133 | 4419 | """DeleteAllItems(self) -> bool""" |
54f9ee45 | 4420 | return _controls_.ListCtrl_DeleteAllItems(*args, **kwargs) |
e811c8ce RD |
4421 | |
4422 | def DeleteColumn(*args, **kwargs): | |
a95a7133 | 4423 | """DeleteColumn(self, int col) -> bool""" |
54f9ee45 | 4424 | return _controls_.ListCtrl_DeleteColumn(*args, **kwargs) |
e811c8ce RD |
4425 | |
4426 | def DeleteAllColumns(*args, **kwargs): | |
a95a7133 | 4427 | """DeleteAllColumns(self) -> bool""" |
54f9ee45 | 4428 | return _controls_.ListCtrl_DeleteAllColumns(*args, **kwargs) |
e811c8ce RD |
4429 | |
4430 | def ClearAll(*args, **kwargs): | |
a95a7133 | 4431 | """ClearAll(self)""" |
54f9ee45 | 4432 | return _controls_.ListCtrl_ClearAll(*args, **kwargs) |
e811c8ce RD |
4433 | |
4434 | def EditLabel(*args, **kwargs): | |
a95a7133 | 4435 | """EditLabel(self, long item)""" |
54f9ee45 | 4436 | return _controls_.ListCtrl_EditLabel(*args, **kwargs) |
e811c8ce RD |
4437 | |
4438 | def EnsureVisible(*args, **kwargs): | |
a95a7133 | 4439 | """EnsureVisible(self, long item) -> bool""" |
54f9ee45 | 4440 | return _controls_.ListCtrl_EnsureVisible(*args, **kwargs) |
e811c8ce RD |
4441 | |
4442 | def FindItem(*args, **kwargs): | |
a95a7133 | 4443 | """FindItem(self, long start, String str, bool partial=False) -> long""" |
54f9ee45 | 4444 | return _controls_.ListCtrl_FindItem(*args, **kwargs) |
e811c8ce RD |
4445 | |
4446 | def FindItemData(*args, **kwargs): | |
a95a7133 | 4447 | """FindItemData(self, long start, long data) -> long""" |
54f9ee45 | 4448 | return _controls_.ListCtrl_FindItemData(*args, **kwargs) |
e811c8ce RD |
4449 | |
4450 | def FindItemAtPos(*args, **kwargs): | |
a95a7133 | 4451 | """FindItemAtPos(self, long start, Point pt, int direction) -> long""" |
54f9ee45 | 4452 | return _controls_.ListCtrl_FindItemAtPos(*args, **kwargs) |
e811c8ce RD |
4453 | |
4454 | def HitTest(*args, **kwargs): | |
fd2dc343 RD |
4455 | """ |
4456 | HitTest(Point point) -> (item, where) | |
4457 | ||
4458 | Determines which item (if any) is at the specified point, giving | |
4459 | in the second return value (see wxLIST_HITTEST_... flags.) | |
4460 | """ | |
54f9ee45 | 4461 | return _controls_.ListCtrl_HitTest(*args, **kwargs) |
e811c8ce RD |
4462 | |
4463 | def InsertItem(*args, **kwargs): | |
a95a7133 | 4464 | """InsertItem(self, ListItem info) -> long""" |
54f9ee45 | 4465 | return _controls_.ListCtrl_InsertItem(*args, **kwargs) |
e811c8ce RD |
4466 | |
4467 | def InsertStringItem(*args, **kwargs): | |
a95a7133 | 4468 | """InsertStringItem(self, long index, String label) -> long""" |
54f9ee45 | 4469 | return _controls_.ListCtrl_InsertStringItem(*args, **kwargs) |
e811c8ce RD |
4470 | |
4471 | def InsertImageItem(*args, **kwargs): | |
a95a7133 | 4472 | """InsertImageItem(self, long index, int imageIndex) -> long""" |
54f9ee45 | 4473 | return _controls_.ListCtrl_InsertImageItem(*args, **kwargs) |
e811c8ce RD |
4474 | |
4475 | def InsertImageStringItem(*args, **kwargs): | |
a95a7133 | 4476 | """InsertImageStringItem(self, long index, String label, int imageIndex) -> long""" |
54f9ee45 | 4477 | return _controls_.ListCtrl_InsertImageStringItem(*args, **kwargs) |
e811c8ce RD |
4478 | |
4479 | def InsertColumnInfo(*args, **kwargs): | |
a95a7133 | 4480 | """InsertColumnInfo(self, long col, ListItem info) -> long""" |
54f9ee45 | 4481 | return _controls_.ListCtrl_InsertColumnInfo(*args, **kwargs) |
e811c8ce RD |
4482 | |
4483 | def InsertColumn(*args, **kwargs): | |
0df68c9f | 4484 | """ |
a95a7133 | 4485 | InsertColumn(self, long col, String heading, int format=LIST_FORMAT_LEFT, |
0df68c9f RD |
4486 | int width=-1) -> long |
4487 | """ | |
54f9ee45 | 4488 | return _controls_.ListCtrl_InsertColumn(*args, **kwargs) |
e811c8ce RD |
4489 | |
4490 | def SetItemCount(*args, **kwargs): | |
a95a7133 | 4491 | """SetItemCount(self, long count)""" |
54f9ee45 | 4492 | return _controls_.ListCtrl_SetItemCount(*args, **kwargs) |
e811c8ce RD |
4493 | |
4494 | def ScrollList(*args, **kwargs): | |
a95a7133 | 4495 | """ScrollList(self, int dx, int dy) -> bool""" |
54f9ee45 | 4496 | return _controls_.ListCtrl_ScrollList(*args, **kwargs) |
e811c8ce RD |
4497 | |
4498 | def SetItemTextColour(*args, **kwargs): | |
a95a7133 | 4499 | """SetItemTextColour(self, long item, Colour col)""" |
54f9ee45 | 4500 | return _controls_.ListCtrl_SetItemTextColour(*args, **kwargs) |
e811c8ce RD |
4501 | |
4502 | def GetItemTextColour(*args, **kwargs): | |
a95a7133 | 4503 | """GetItemTextColour(self, long item) -> Colour""" |
54f9ee45 | 4504 | return _controls_.ListCtrl_GetItemTextColour(*args, **kwargs) |
e811c8ce RD |
4505 | |
4506 | def SetItemBackgroundColour(*args, **kwargs): | |
a95a7133 | 4507 | """SetItemBackgroundColour(self, long item, Colour col)""" |
54f9ee45 | 4508 | return _controls_.ListCtrl_SetItemBackgroundColour(*args, **kwargs) |
e811c8ce RD |
4509 | |
4510 | def GetItemBackgroundColour(*args, **kwargs): | |
a95a7133 | 4511 | """GetItemBackgroundColour(self, long item) -> Colour""" |
54f9ee45 | 4512 | return _controls_.ListCtrl_GetItemBackgroundColour(*args, **kwargs) |
e811c8ce | 4513 | |
d14a1e28 RD |
4514 | # |
4515 | # Some helpers... | |
4516 | def Select(self, idx, on=1): | |
4517 | '''[de]select an item''' | |
e811c8ce | 4518 | if on: state = wx.LIST_STATE_SELECTED |
d14a1e28 | 4519 | else: state = 0 |
e811c8ce | 4520 | self.SetItemState(idx, state, wx.LIST_STATE_SELECTED) |
d14a1e28 RD |
4521 | |
4522 | def Focus(self, idx): | |
4523 | '''Focus and show the given item''' | |
e811c8ce | 4524 | self.SetItemState(idx, wx.LIST_STATE_FOCUSED, wx.LIST_STATE_FOCUSED) |
d14a1e28 RD |
4525 | self.EnsureVisible(idx) |
4526 | ||
4527 | def GetFocusedItem(self): | |
4528 | '''get the currently focused item or -1 if none''' | |
e811c8ce | 4529 | return self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_FOCUSED) |
d14a1e28 RD |
4530 | |
4531 | def GetFirstSelected(self, *args): | |
4532 | '''return first selected item, or -1 when none''' | |
4533 | return self.GetNextSelected(-1) | |
4534 | ||
4535 | def GetNextSelected(self, item): | |
4536 | '''return subsequent selected items, or -1 when no more''' | |
e811c8ce | 4537 | return self.GetNextItem(item, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED) |
d14a1e28 RD |
4538 | |
4539 | def IsSelected(self, idx): | |
e811c8ce RD |
4540 | '''return True if the item is selected''' |
4541 | return self.GetItemState(idx, wx.LIST_STATE_SELECTED) != 0 | |
d14a1e28 RD |
4542 | |
4543 | def SetColumnImage(self, col, image): | |
4544 | item = self.GetColumn(col) | |
e811c8ce RD |
4545 | # preserve all other attributes too |
4546 | item.SetMask( wx.LIST_MASK_STATE | | |
4547 | wx.LIST_MASK_TEXT | | |
4548 | wx.LIST_MASK_IMAGE | | |
4549 | wx.LIST_MASK_DATA | | |
4550 | wx.LIST_SET_ITEM | | |
4551 | wx.LIST_MASK_WIDTH | | |
4552 | wx.LIST_MASK_FORMAT ) | |
d14a1e28 RD |
4553 | item.SetImage(image) |
4554 | self.SetColumn(col, item) | |
4555 | ||
4556 | def ClearColumnImage(self, col): | |
4557 | self.SetColumnImage(col, -1) | |
4558 | ||
4559 | def Append(self, entry): | |
4560 | '''Append an item to the list control. The entry parameter should be a | |
4561 | sequence with an item for each column''' | |
4562 | if len(entry): | |
e811c8ce | 4563 | if wx.USE_UNICODE: |
d14a1e28 RD |
4564 | cvtfunc = unicode |
4565 | else: | |
4566 | cvtfunc = str | |
4567 | pos = self.GetItemCount() | |
4568 | self.InsertStringItem(pos, cvtfunc(entry[0])) | |
4569 | for i in range(1, len(entry)): | |
4570 | self.SetStringItem(pos, i, cvtfunc(entry[i])) | |
4571 | return pos | |
4572 | ||
e811c8ce | 4573 | def SortItems(*args, **kwargs): |
a95a7133 | 4574 | """SortItems(self, PyObject func) -> bool""" |
54f9ee45 | 4575 | return _controls_.ListCtrl_SortItems(*args, **kwargs) |
e811c8ce RD |
4576 | |
4577 | def GetMainWindow(*args, **kwargs): | |
a95a7133 | 4578 | """GetMainWindow(self) -> Window""" |
54f9ee45 | 4579 | return _controls_.ListCtrl_GetMainWindow(*args, **kwargs) |
e811c8ce | 4580 | |
74a57fcd | 4581 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
4582 | """ |
4583 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
4584 | ||
4585 | Get the default attributes for this class. This is useful if you want | |
4586 | to use the same font or colour in your own control as in a standard | |
4587 | control -- which is a much better idea than hard coding specific | |
4588 | colours or fonts which might look completely out of place on the | |
4589 | user's system, especially if it uses themes. | |
4590 | ||
4591 | The variant parameter is only relevant under Mac currently and is | |
4592 | ignore under other platforms. Under Mac, it will change the size of | |
4593 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
4594 | this. | |
4595 | """ | |
54f9ee45 | 4596 | return _controls_.ListCtrl_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
4597 | |
4598 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 4599 | |
d14a1e28 RD |
4600 | class ListCtrlPtr(ListCtrl): |
4601 | def __init__(self, this): | |
4602 | self.this = this | |
4603 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4604 | self.__class__ = ListCtrl | |
54f9ee45 | 4605 | _controls_.ListCtrl_swigregister(ListCtrlPtr) |
70551f47 | 4606 | |
d14a1e28 | 4607 | def PreListCtrl(*args, **kwargs): |
e811c8ce | 4608 | """PreListCtrl() -> ListCtrl""" |
54f9ee45 | 4609 | val = _controls_.new_PreListCtrl(*args, **kwargs) |
aa2a5b86 RD |
4610 | val.thisown = 1 |
4611 | return val | |
4612 | ||
74a57fcd | 4613 | def ListCtrl_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
4614 | """ |
4615 | ListCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
4616 | ||
4617 | Get the default attributes for this class. This is useful if you want | |
4618 | to use the same font or colour in your own control as in a standard | |
4619 | control -- which is a much better idea than hard coding specific | |
4620 | colours or fonts which might look completely out of place on the | |
4621 | user's system, especially if it uses themes. | |
4622 | ||
4623 | The variant parameter is only relevant under Mac currently and is | |
4624 | ignore under other platforms. Under Mac, it will change the size of | |
4625 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
4626 | this. | |
4627 | """ | |
54f9ee45 | 4628 | return _controls_.ListCtrl_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 4629 | |
d14a1e28 | 4630 | #--------------------------------------------------------------------------- |
70551f47 | 4631 | |
d14a1e28 | 4632 | class ListView(ListCtrl): |
e811c8ce RD |
4633 | def __repr__(self): |
4634 | return "<%s.%s; proxy of C++ wxListView instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4635 | def __init__(self, *args, **kwargs): |
0df68c9f | 4636 | """ |
a95a7133 | 4637 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f | 4638 | Size size=DefaultSize, long style=LC_REPORT, |
b2dc1044 | 4639 | Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListView |
0df68c9f | 4640 | """ |
54f9ee45 | 4641 | newobj = _controls_.new_ListView(*args, **kwargs) |
d14a1e28 | 4642 | self.this = newobj.this |
70551f47 | 4643 | self.thisown = 1 |
d14a1e28 | 4644 | del newobj.thisown |
0220cbc1 | 4645 | self._setOORInfo(self) |
e811c8ce RD |
4646 | |
4647 | def Create(*args, **kwargs): | |
0df68c9f | 4648 | """ |
a95a7133 | 4649 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f | 4650 | Size size=DefaultSize, long style=LC_REPORT, |
b2dc1044 | 4651 | Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool |
15afbcd0 RD |
4652 | |
4653 | Do the 2nd phase and create the GUI control. | |
0df68c9f | 4654 | """ |
54f9ee45 | 4655 | return _controls_.ListView_Create(*args, **kwargs) |
e811c8ce RD |
4656 | |
4657 | def Select(*args, **kwargs): | |
a95a7133 | 4658 | """Select(self, long n, bool on=True)""" |
54f9ee45 | 4659 | return _controls_.ListView_Select(*args, **kwargs) |
e811c8ce RD |
4660 | |
4661 | def Focus(*args, **kwargs): | |
a95a7133 | 4662 | """Focus(self, long index)""" |
54f9ee45 | 4663 | return _controls_.ListView_Focus(*args, **kwargs) |
e811c8ce RD |
4664 | |
4665 | def GetFocusedItem(*args, **kwargs): | |
a95a7133 | 4666 | """GetFocusedItem(self) -> long""" |
54f9ee45 | 4667 | return _controls_.ListView_GetFocusedItem(*args, **kwargs) |
e811c8ce RD |
4668 | |
4669 | def GetNextSelected(*args, **kwargs): | |
a95a7133 | 4670 | """GetNextSelected(self, long item) -> long""" |
54f9ee45 | 4671 | return _controls_.ListView_GetNextSelected(*args, **kwargs) |
e811c8ce RD |
4672 | |
4673 | def GetFirstSelected(*args, **kwargs): | |
a95a7133 | 4674 | """GetFirstSelected(self) -> long""" |
54f9ee45 | 4675 | return _controls_.ListView_GetFirstSelected(*args, **kwargs) |
e811c8ce RD |
4676 | |
4677 | def IsSelected(*args, **kwargs): | |
a95a7133 | 4678 | """IsSelected(self, long index) -> bool""" |
54f9ee45 | 4679 | return _controls_.ListView_IsSelected(*args, **kwargs) |
e811c8ce RD |
4680 | |
4681 | def SetColumnImage(*args, **kwargs): | |
a95a7133 | 4682 | """SetColumnImage(self, int col, int image)""" |
54f9ee45 | 4683 | return _controls_.ListView_SetColumnImage(*args, **kwargs) |
e811c8ce RD |
4684 | |
4685 | def ClearColumnImage(*args, **kwargs): | |
a95a7133 | 4686 | """ClearColumnImage(self, int col)""" |
54f9ee45 | 4687 | return _controls_.ListView_ClearColumnImage(*args, **kwargs) |
e811c8ce | 4688 | |
f6bcfd97 | 4689 | |
d14a1e28 RD |
4690 | class ListViewPtr(ListView): |
4691 | def __init__(self, this): | |
4692 | self.this = this | |
4693 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4694 | self.__class__ = ListView | |
54f9ee45 | 4695 | _controls_.ListView_swigregister(ListViewPtr) |
f6bcfd97 | 4696 | |
d14a1e28 | 4697 | def PreListView(*args, **kwargs): |
e811c8ce | 4698 | """PreListView() -> ListView""" |
54f9ee45 | 4699 | val = _controls_.new_PreListView(*args, **kwargs) |
aa2a5b86 RD |
4700 | val.thisown = 1 |
4701 | return val | |
4702 | ||
d14a1e28 RD |
4703 | #--------------------------------------------------------------------------- |
4704 | ||
54f9ee45 RD |
4705 | TR_NO_BUTTONS = _controls_.TR_NO_BUTTONS |
4706 | TR_HAS_BUTTONS = _controls_.TR_HAS_BUTTONS | |
4707 | TR_NO_LINES = _controls_.TR_NO_LINES | |
4708 | TR_LINES_AT_ROOT = _controls_.TR_LINES_AT_ROOT | |
4709 | TR_SINGLE = _controls_.TR_SINGLE | |
4710 | TR_MULTIPLE = _controls_.TR_MULTIPLE | |
4711 | TR_EXTENDED = _controls_.TR_EXTENDED | |
4712 | TR_HAS_VARIABLE_ROW_HEIGHT = _controls_.TR_HAS_VARIABLE_ROW_HEIGHT | |
4713 | TR_EDIT_LABELS = _controls_.TR_EDIT_LABELS | |
4714 | TR_HIDE_ROOT = _controls_.TR_HIDE_ROOT | |
4715 | TR_ROW_LINES = _controls_.TR_ROW_LINES | |
4716 | TR_FULL_ROW_HIGHLIGHT = _controls_.TR_FULL_ROW_HIGHLIGHT | |
4717 | TR_DEFAULT_STYLE = _controls_.TR_DEFAULT_STYLE | |
4718 | TR_TWIST_BUTTONS = _controls_.TR_TWIST_BUTTONS | |
4719 | TR_MAC_BUTTONS = _controls_.TR_MAC_BUTTONS | |
4720 | TR_AQUA_BUTTONS = _controls_.TR_AQUA_BUTTONS | |
4721 | TreeItemIcon_Normal = _controls_.TreeItemIcon_Normal | |
4722 | TreeItemIcon_Selected = _controls_.TreeItemIcon_Selected | |
4723 | TreeItemIcon_Expanded = _controls_.TreeItemIcon_Expanded | |
4724 | TreeItemIcon_SelectedExpanded = _controls_.TreeItemIcon_SelectedExpanded | |
4725 | TreeItemIcon_Max = _controls_.TreeItemIcon_Max | |
4726 | TREE_HITTEST_ABOVE = _controls_.TREE_HITTEST_ABOVE | |
4727 | TREE_HITTEST_BELOW = _controls_.TREE_HITTEST_BELOW | |
4728 | TREE_HITTEST_NOWHERE = _controls_.TREE_HITTEST_NOWHERE | |
4729 | TREE_HITTEST_ONITEMBUTTON = _controls_.TREE_HITTEST_ONITEMBUTTON | |
4730 | TREE_HITTEST_ONITEMICON = _controls_.TREE_HITTEST_ONITEMICON | |
4731 | TREE_HITTEST_ONITEMINDENT = _controls_.TREE_HITTEST_ONITEMINDENT | |
4732 | TREE_HITTEST_ONITEMLABEL = _controls_.TREE_HITTEST_ONITEMLABEL | |
4733 | TREE_HITTEST_ONITEMRIGHT = _controls_.TREE_HITTEST_ONITEMRIGHT | |
4734 | TREE_HITTEST_ONITEMSTATEICON = _controls_.TREE_HITTEST_ONITEMSTATEICON | |
4735 | TREE_HITTEST_TOLEFT = _controls_.TREE_HITTEST_TOLEFT | |
4736 | TREE_HITTEST_TORIGHT = _controls_.TREE_HITTEST_TORIGHT | |
4737 | TREE_HITTEST_ONITEMUPPERPART = _controls_.TREE_HITTEST_ONITEMUPPERPART | |
4738 | TREE_HITTEST_ONITEMLOWERPART = _controls_.TREE_HITTEST_ONITEMLOWERPART | |
4739 | TREE_HITTEST_ONITEM = _controls_.TREE_HITTEST_ONITEM | |
d14a1e28 RD |
4740 | #--------------------------------------------------------------------------- |
4741 | ||
4742 | class TreeItemId(object): | |
e811c8ce RD |
4743 | def __repr__(self): |
4744 | return "<%s.%s; proxy of C++ wxTreeItemId instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4745 | def __init__(self, *args, **kwargs): |
a95a7133 | 4746 | """__init__(self) -> TreeItemId""" |
54f9ee45 | 4747 | newobj = _controls_.new_TreeItemId(*args, **kwargs) |
d14a1e28 RD |
4748 | self.this = newobj.this |
4749 | self.thisown = 1 | |
4750 | del newobj.thisown | |
54f9ee45 | 4751 | def __del__(self, destroy=_controls_.delete_TreeItemId): |
a95a7133 | 4752 | """__del__(self)""" |
d14a1e28 RD |
4753 | try: |
4754 | if self.thisown: destroy(self) | |
4755 | except: pass | |
e811c8ce RD |
4756 | |
4757 | def IsOk(*args, **kwargs): | |
a95a7133 | 4758 | """IsOk(self) -> bool""" |
54f9ee45 | 4759 | return _controls_.TreeItemId_IsOk(*args, **kwargs) |
e811c8ce RD |
4760 | |
4761 | def __eq__(*args, **kwargs): | |
a95a7133 | 4762 | """__eq__(self, TreeItemId other) -> bool""" |
54f9ee45 | 4763 | return _controls_.TreeItemId___eq__(*args, **kwargs) |
e811c8ce RD |
4764 | |
4765 | def __ne__(*args, **kwargs): | |
a95a7133 | 4766 | """__ne__(self, TreeItemId other) -> bool""" |
54f9ee45 | 4767 | return _controls_.TreeItemId___ne__(*args, **kwargs) |
e811c8ce | 4768 | |
54f9ee45 | 4769 | m_pItem = property(_controls_.TreeItemId_m_pItem_get, _controls_.TreeItemId_m_pItem_set) |
d14a1e28 RD |
4770 | Ok = IsOk |
4771 | def __nonzero__(self): return self.IsOk() | |
f6bcfd97 | 4772 | |
d14a1e28 RD |
4773 | class TreeItemIdPtr(TreeItemId): |
4774 | def __init__(self, this): | |
f6bcfd97 | 4775 | self.this = this |
d14a1e28 RD |
4776 | if not hasattr(self,"thisown"): self.thisown = 0 |
4777 | self.__class__ = TreeItemId | |
54f9ee45 | 4778 | _controls_.TreeItemId_swigregister(TreeItemIdPtr) |
b2dc1044 | 4779 | TreeCtrlNameStr = cvar.TreeCtrlNameStr |
d14a1e28 RD |
4780 | |
4781 | class TreeItemData(object): | |
e811c8ce RD |
4782 | def __repr__(self): |
4783 | return "<%s.%s; proxy of C++ wxPyTreeItemData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4784 | def __init__(self, *args, **kwargs): |
a95a7133 | 4785 | """__init__(self, PyObject obj=None) -> TreeItemData""" |
54f9ee45 | 4786 | newobj = _controls_.new_TreeItemData(*args, **kwargs) |
d14a1e28 RD |
4787 | self.this = newobj.this |
4788 | self.thisown = 1 | |
4789 | del newobj.thisown | |
e811c8ce | 4790 | def GetData(*args, **kwargs): |
a95a7133 | 4791 | """GetData(self) -> PyObject""" |
54f9ee45 | 4792 | return _controls_.TreeItemData_GetData(*args, **kwargs) |
e811c8ce RD |
4793 | |
4794 | def SetData(*args, **kwargs): | |
a95a7133 | 4795 | """SetData(self, PyObject obj)""" |
54f9ee45 | 4796 | return _controls_.TreeItemData_SetData(*args, **kwargs) |
e811c8ce RD |
4797 | |
4798 | def GetId(*args, **kwargs): | |
a95a7133 | 4799 | """GetId(self) -> TreeItemId""" |
54f9ee45 | 4800 | return _controls_.TreeItemData_GetId(*args, **kwargs) |
e811c8ce RD |
4801 | |
4802 | def SetId(*args, **kwargs): | |
a95a7133 | 4803 | """SetId(self, TreeItemId id)""" |
54f9ee45 | 4804 | return _controls_.TreeItemData_SetId(*args, **kwargs) |
e811c8ce RD |
4805 | |
4806 | def Destroy(*args, **kwargs): | |
a95a7133 | 4807 | """Destroy(self)""" |
54f9ee45 | 4808 | return _controls_.TreeItemData_Destroy(*args, **kwargs) |
e811c8ce | 4809 | |
d14a1e28 RD |
4810 | |
4811 | class TreeItemDataPtr(TreeItemData): | |
4812 | def __init__(self, this): | |
4813 | self.this = this | |
4814 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4815 | self.__class__ = TreeItemData | |
54f9ee45 | 4816 | _controls_.TreeItemData_swigregister(TreeItemDataPtr) |
d14a1e28 RD |
4817 | |
4818 | #--------------------------------------------------------------------------- | |
4819 | ||
54f9ee45 RD |
4820 | wxEVT_COMMAND_TREE_BEGIN_DRAG = _controls_.wxEVT_COMMAND_TREE_BEGIN_DRAG |
4821 | wxEVT_COMMAND_TREE_BEGIN_RDRAG = _controls_.wxEVT_COMMAND_TREE_BEGIN_RDRAG | |
4822 | wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = _controls_.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT | |
4823 | wxEVT_COMMAND_TREE_END_LABEL_EDIT = _controls_.wxEVT_COMMAND_TREE_END_LABEL_EDIT | |
4824 | wxEVT_COMMAND_TREE_DELETE_ITEM = _controls_.wxEVT_COMMAND_TREE_DELETE_ITEM | |
4825 | wxEVT_COMMAND_TREE_GET_INFO = _controls_.wxEVT_COMMAND_TREE_GET_INFO | |
4826 | wxEVT_COMMAND_TREE_SET_INFO = _controls_.wxEVT_COMMAND_TREE_SET_INFO | |
4827 | wxEVT_COMMAND_TREE_ITEM_EXPANDED = _controls_.wxEVT_COMMAND_TREE_ITEM_EXPANDED | |
4828 | wxEVT_COMMAND_TREE_ITEM_EXPANDING = _controls_.wxEVT_COMMAND_TREE_ITEM_EXPANDING | |
4829 | wxEVT_COMMAND_TREE_ITEM_COLLAPSED = _controls_.wxEVT_COMMAND_TREE_ITEM_COLLAPSED | |
4830 | wxEVT_COMMAND_TREE_ITEM_COLLAPSING = _controls_.wxEVT_COMMAND_TREE_ITEM_COLLAPSING | |
4831 | wxEVT_COMMAND_TREE_SEL_CHANGED = _controls_.wxEVT_COMMAND_TREE_SEL_CHANGED | |
4832 | wxEVT_COMMAND_TREE_SEL_CHANGING = _controls_.wxEVT_COMMAND_TREE_SEL_CHANGING | |
4833 | wxEVT_COMMAND_TREE_KEY_DOWN = _controls_.wxEVT_COMMAND_TREE_KEY_DOWN | |
4834 | wxEVT_COMMAND_TREE_ITEM_ACTIVATED = _controls_.wxEVT_COMMAND_TREE_ITEM_ACTIVATED | |
4835 | wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK = _controls_.wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK | |
4836 | wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK = _controls_.wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK | |
4837 | wxEVT_COMMAND_TREE_END_DRAG = _controls_.wxEVT_COMMAND_TREE_END_DRAG | |
4838 | wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK = _controls_.wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK | |
4839 | wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP = _controls_.wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP | |
d14a1e28 RD |
4840 | EVT_TREE_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_DRAG , 1) |
4841 | EVT_TREE_BEGIN_RDRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_RDRAG , 1) | |
4842 | EVT_TREE_BEGIN_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT , 1) | |
4843 | EVT_TREE_END_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_LABEL_EDIT , 1) | |
4844 | EVT_TREE_DELETE_ITEM = wx.PyEventBinder(wxEVT_COMMAND_TREE_DELETE_ITEM , 1) | |
4845 | EVT_TREE_GET_INFO = wx.PyEventBinder(wxEVT_COMMAND_TREE_GET_INFO , 1) | |
4846 | EVT_TREE_SET_INFO = wx.PyEventBinder(wxEVT_COMMAND_TREE_SET_INFO , 1) | |
4847 | EVT_TREE_ITEM_EXPANDED = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_EXPANDED , 1) | |
4848 | EVT_TREE_ITEM_EXPANDING = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_EXPANDING , 1) | |
4849 | EVT_TREE_ITEM_COLLAPSED = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_COLLAPSED , 1) | |
4850 | EVT_TREE_ITEM_COLLAPSING = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_COLLAPSING , 1) | |
4851 | EVT_TREE_SEL_CHANGED = wx.PyEventBinder(wxEVT_COMMAND_TREE_SEL_CHANGED , 1) | |
4852 | EVT_TREE_SEL_CHANGING = wx.PyEventBinder(wxEVT_COMMAND_TREE_SEL_CHANGING , 1) | |
4853 | EVT_TREE_KEY_DOWN = wx.PyEventBinder(wxEVT_COMMAND_TREE_KEY_DOWN , 1) | |
4854 | EVT_TREE_ITEM_ACTIVATED = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_ACTIVATED , 1) | |
4855 | EVT_TREE_ITEM_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK , 1) | |
4856 | EVT_TREE_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 1) | |
4857 | EVT_TREE_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_DRAG , 1) | |
4858 | EVT_TREE_STATE_IMAGE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 1) | |
c9c7117a | 4859 | EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 1) |
d14a1e28 | 4860 | |
54f9ee45 | 4861 | class TreeEvent(_core.NotifyEvent): |
e811c8ce RD |
4862 | def __repr__(self): |
4863 | return "<%s.%s; proxy of C++ wxTreeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4864 | def __init__(self, *args, **kwargs): |
a95a7133 | 4865 | """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> TreeEvent""" |
54f9ee45 | 4866 | newobj = _controls_.new_TreeEvent(*args, **kwargs) |
d14a1e28 | 4867 | self.this = newobj.this |
f6bcfd97 | 4868 | self.thisown = 1 |
d14a1e28 | 4869 | del newobj.thisown |
e811c8ce | 4870 | def GetItem(*args, **kwargs): |
a95a7133 | 4871 | """GetItem(self) -> TreeItemId""" |
54f9ee45 | 4872 | return _controls_.TreeEvent_GetItem(*args, **kwargs) |
e811c8ce RD |
4873 | |
4874 | def SetItem(*args, **kwargs): | |
a95a7133 | 4875 | """SetItem(self, TreeItemId item)""" |
54f9ee45 | 4876 | return _controls_.TreeEvent_SetItem(*args, **kwargs) |
e811c8ce RD |
4877 | |
4878 | def GetOldItem(*args, **kwargs): | |
a95a7133 | 4879 | """GetOldItem(self) -> TreeItemId""" |
54f9ee45 | 4880 | return _controls_.TreeEvent_GetOldItem(*args, **kwargs) |
e811c8ce RD |
4881 | |
4882 | def SetOldItem(*args, **kwargs): | |
a95a7133 | 4883 | """SetOldItem(self, TreeItemId item)""" |
54f9ee45 | 4884 | return _controls_.TreeEvent_SetOldItem(*args, **kwargs) |
e811c8ce RD |
4885 | |
4886 | def GetPoint(*args, **kwargs): | |
a95a7133 | 4887 | """GetPoint(self) -> Point""" |
54f9ee45 | 4888 | return _controls_.TreeEvent_GetPoint(*args, **kwargs) |
e811c8ce RD |
4889 | |
4890 | def SetPoint(*args, **kwargs): | |
a95a7133 | 4891 | """SetPoint(self, Point pt)""" |
54f9ee45 | 4892 | return _controls_.TreeEvent_SetPoint(*args, **kwargs) |
e811c8ce RD |
4893 | |
4894 | def GetKeyEvent(*args, **kwargs): | |
a95a7133 | 4895 | """GetKeyEvent(self) -> KeyEvent""" |
54f9ee45 | 4896 | return _controls_.TreeEvent_GetKeyEvent(*args, **kwargs) |
e811c8ce RD |
4897 | |
4898 | def GetKeyCode(*args, **kwargs): | |
a95a7133 | 4899 | """GetKeyCode(self) -> int""" |
54f9ee45 | 4900 | return _controls_.TreeEvent_GetKeyCode(*args, **kwargs) |
e811c8ce RD |
4901 | |
4902 | def SetKeyEvent(*args, **kwargs): | |
a95a7133 | 4903 | """SetKeyEvent(self, KeyEvent evt)""" |
54f9ee45 | 4904 | return _controls_.TreeEvent_SetKeyEvent(*args, **kwargs) |
e811c8ce RD |
4905 | |
4906 | def GetLabel(*args, **kwargs): | |
a95a7133 | 4907 | """GetLabel(self) -> String""" |
54f9ee45 | 4908 | return _controls_.TreeEvent_GetLabel(*args, **kwargs) |
e811c8ce RD |
4909 | |
4910 | def SetLabel(*args, **kwargs): | |
a95a7133 | 4911 | """SetLabel(self, String label)""" |
54f9ee45 | 4912 | return _controls_.TreeEvent_SetLabel(*args, **kwargs) |
e811c8ce RD |
4913 | |
4914 | def IsEditCancelled(*args, **kwargs): | |
a95a7133 | 4915 | """IsEditCancelled(self) -> bool""" |
54f9ee45 | 4916 | return _controls_.TreeEvent_IsEditCancelled(*args, **kwargs) |
e811c8ce RD |
4917 | |
4918 | def SetEditCanceled(*args, **kwargs): | |
a95a7133 | 4919 | """SetEditCanceled(self, bool editCancelled)""" |
54f9ee45 | 4920 | return _controls_.TreeEvent_SetEditCanceled(*args, **kwargs) |
e811c8ce | 4921 | |
c9c7117a | 4922 | def SetToolTip(*args, **kwargs): |
a95a7133 | 4923 | """SetToolTip(self, String toolTip)""" |
54f9ee45 | 4924 | return _controls_.TreeEvent_SetToolTip(*args, **kwargs) |
c9c7117a | 4925 | |
d14a1e28 RD |
4926 | |
4927 | class TreeEventPtr(TreeEvent): | |
4928 | def __init__(self, this): | |
4929 | self.this = this | |
4930 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4931 | self.__class__ = TreeEvent | |
54f9ee45 | 4932 | _controls_.TreeEvent_swigregister(TreeEventPtr) |
d14a1e28 RD |
4933 | |
4934 | #--------------------------------------------------------------------------- | |
70551f47 | 4935 | |
54f9ee45 | 4936 | class TreeCtrl(_core.Control): |
e811c8ce RD |
4937 | def __repr__(self): |
4938 | return "<%s.%s; proxy of C++ wxPyTreeCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4939 | def __init__(self, *args, **kwargs): |
0df68c9f | 4940 | """ |
a95a7133 | 4941 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f RD |
4942 | Size size=DefaultSize, long style=TR_DEFAULT_STYLE, |
4943 | Validator validator=DefaultValidator, | |
b2dc1044 | 4944 | String name=TreeCtrlNameStr) -> TreeCtrl |
0df68c9f | 4945 | """ |
54f9ee45 | 4946 | newobj = _controls_.new_TreeCtrl(*args, **kwargs) |
d14a1e28 RD |
4947 | self.this = newobj.this |
4948 | self.thisown = 1 | |
4949 | del newobj.thisown | |
4950 | self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl) | |
e811c8ce RD |
4951 | |
4952 | def Create(*args, **kwargs): | |
0df68c9f | 4953 | """ |
a95a7133 | 4954 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f RD |
4955 | Size size=DefaultSize, long style=TR_DEFAULT_STYLE, |
4956 | Validator validator=DefaultValidator, | |
b2dc1044 | 4957 | String name=TreeCtrlNameStr) -> bool |
15afbcd0 RD |
4958 | |
4959 | Do the 2nd phase and create the GUI control. | |
0df68c9f | 4960 | """ |
54f9ee45 | 4961 | return _controls_.TreeCtrl_Create(*args, **kwargs) |
e811c8ce RD |
4962 | |
4963 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 4964 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 4965 | return _controls_.TreeCtrl__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
4966 | |
4967 | def GetCount(*args, **kwargs): | |
a95a7133 | 4968 | """GetCount(self) -> size_t""" |
54f9ee45 | 4969 | return _controls_.TreeCtrl_GetCount(*args, **kwargs) |
e811c8ce RD |
4970 | |
4971 | def GetIndent(*args, **kwargs): | |
a95a7133 | 4972 | """GetIndent(self) -> unsigned int""" |
54f9ee45 | 4973 | return _controls_.TreeCtrl_GetIndent(*args, **kwargs) |
e811c8ce RD |
4974 | |
4975 | def SetIndent(*args, **kwargs): | |
a95a7133 | 4976 | """SetIndent(self, unsigned int indent)""" |
54f9ee45 | 4977 | return _controls_.TreeCtrl_SetIndent(*args, **kwargs) |
e811c8ce RD |
4978 | |
4979 | def GetSpacing(*args, **kwargs): | |
a95a7133 | 4980 | """GetSpacing(self) -> unsigned int""" |
54f9ee45 | 4981 | return _controls_.TreeCtrl_GetSpacing(*args, **kwargs) |
e811c8ce RD |
4982 | |
4983 | def SetSpacing(*args, **kwargs): | |
a95a7133 | 4984 | """SetSpacing(self, unsigned int spacing)""" |
54f9ee45 | 4985 | return _controls_.TreeCtrl_SetSpacing(*args, **kwargs) |
e811c8ce RD |
4986 | |
4987 | def GetImageList(*args, **kwargs): | |
a95a7133 | 4988 | """GetImageList(self) -> ImageList""" |
54f9ee45 | 4989 | return _controls_.TreeCtrl_GetImageList(*args, **kwargs) |
e811c8ce RD |
4990 | |
4991 | def GetStateImageList(*args, **kwargs): | |
a95a7133 | 4992 | """GetStateImageList(self) -> ImageList""" |
54f9ee45 | 4993 | return _controls_.TreeCtrl_GetStateImageList(*args, **kwargs) |
e811c8ce RD |
4994 | |
4995 | def SetImageList(*args, **kwargs): | |
a95a7133 | 4996 | """SetImageList(self, ImageList imageList)""" |
54f9ee45 | 4997 | return _controls_.TreeCtrl_SetImageList(*args, **kwargs) |
e811c8ce RD |
4998 | |
4999 | def SetStateImageList(*args, **kwargs): | |
a95a7133 | 5000 | """SetStateImageList(self, ImageList imageList)""" |
54f9ee45 | 5001 | return _controls_.TreeCtrl_SetStateImageList(*args, **kwargs) |
e811c8ce RD |
5002 | |
5003 | def AssignImageList(*args, **kwargs): | |
a95a7133 | 5004 | """AssignImageList(self, ImageList imageList)""" |
54f9ee45 | 5005 | return _controls_.TreeCtrl_AssignImageList(*args, **kwargs) |
e811c8ce RD |
5006 | |
5007 | def AssignStateImageList(*args, **kwargs): | |
a95a7133 | 5008 | """AssignStateImageList(self, ImageList imageList)""" |
54f9ee45 | 5009 | return _controls_.TreeCtrl_AssignStateImageList(*args, **kwargs) |
e811c8ce RD |
5010 | |
5011 | def GetItemText(*args, **kwargs): | |
a95a7133 | 5012 | """GetItemText(self, TreeItemId item) -> String""" |
54f9ee45 | 5013 | return _controls_.TreeCtrl_GetItemText(*args, **kwargs) |
e811c8ce RD |
5014 | |
5015 | def GetItemImage(*args, **kwargs): | |
a95a7133 | 5016 | """GetItemImage(self, TreeItemId item, int which=TreeItemIcon_Normal) -> int""" |
54f9ee45 | 5017 | return _controls_.TreeCtrl_GetItemImage(*args, **kwargs) |
e811c8ce RD |
5018 | |
5019 | def GetItemData(*args, **kwargs): | |
a95a7133 | 5020 | """GetItemData(self, TreeItemId item) -> TreeItemData""" |
54f9ee45 | 5021 | return _controls_.TreeCtrl_GetItemData(*args, **kwargs) |
e811c8ce RD |
5022 | |
5023 | def GetItemPyData(*args, **kwargs): | |
a95a7133 | 5024 | """GetItemPyData(self, TreeItemId item) -> PyObject""" |
54f9ee45 | 5025 | return _controls_.TreeCtrl_GetItemPyData(*args, **kwargs) |
e811c8ce | 5026 | |
d14a1e28 | 5027 | GetPyData = GetItemPyData |
e811c8ce | 5028 | def GetItemTextColour(*args, **kwargs): |
a95a7133 | 5029 | """GetItemTextColour(self, TreeItemId item) -> Colour""" |
54f9ee45 | 5030 | return _controls_.TreeCtrl_GetItemTextColour(*args, **kwargs) |
e811c8ce RD |
5031 | |
5032 | def GetItemBackgroundColour(*args, **kwargs): | |
a95a7133 | 5033 | """GetItemBackgroundColour(self, TreeItemId item) -> Colour""" |
54f9ee45 | 5034 | return _controls_.TreeCtrl_GetItemBackgroundColour(*args, **kwargs) |
e811c8ce RD |
5035 | |
5036 | def GetItemFont(*args, **kwargs): | |
a95a7133 | 5037 | """GetItemFont(self, TreeItemId item) -> Font""" |
54f9ee45 | 5038 | return _controls_.TreeCtrl_GetItemFont(*args, **kwargs) |
e811c8ce RD |
5039 | |
5040 | def SetItemText(*args, **kwargs): | |
a95a7133 | 5041 | """SetItemText(self, TreeItemId item, String text)""" |
54f9ee45 | 5042 | return _controls_.TreeCtrl_SetItemText(*args, **kwargs) |
e811c8ce RD |
5043 | |
5044 | def SetItemImage(*args, **kwargs): | |
a95a7133 | 5045 | """SetItemImage(self, TreeItemId item, int image, int which=TreeItemIcon_Normal)""" |
54f9ee45 | 5046 | return _controls_.TreeCtrl_SetItemImage(*args, **kwargs) |
e811c8ce RD |
5047 | |
5048 | def SetItemData(*args, **kwargs): | |
a95a7133 | 5049 | """SetItemData(self, TreeItemId item, TreeItemData data)""" |
54f9ee45 | 5050 | return _controls_.TreeCtrl_SetItemData(*args, **kwargs) |
e811c8ce RD |
5051 | |
5052 | def SetItemPyData(*args, **kwargs): | |
a95a7133 | 5053 | """SetItemPyData(self, TreeItemId item, PyObject obj)""" |
54f9ee45 | 5054 | return _controls_.TreeCtrl_SetItemPyData(*args, **kwargs) |
e811c8ce | 5055 | |
d14a1e28 | 5056 | SetPyData = SetItemPyData |
e811c8ce | 5057 | def SetItemHasChildren(*args, **kwargs): |
a95a7133 | 5058 | """SetItemHasChildren(self, TreeItemId item, bool has=True)""" |
54f9ee45 | 5059 | return _controls_.TreeCtrl_SetItemHasChildren(*args, **kwargs) |
e811c8ce RD |
5060 | |
5061 | def SetItemBold(*args, **kwargs): | |
a95a7133 | 5062 | """SetItemBold(self, TreeItemId item, bool bold=True)""" |
54f9ee45 | 5063 | return _controls_.TreeCtrl_SetItemBold(*args, **kwargs) |
e811c8ce RD |
5064 | |
5065 | def SetItemTextColour(*args, **kwargs): | |
a95a7133 | 5066 | """SetItemTextColour(self, TreeItemId item, Colour col)""" |
54f9ee45 | 5067 | return _controls_.TreeCtrl_SetItemTextColour(*args, **kwargs) |
e811c8ce RD |
5068 | |
5069 | def SetItemBackgroundColour(*args, **kwargs): | |
a95a7133 | 5070 | """SetItemBackgroundColour(self, TreeItemId item, Colour col)""" |
54f9ee45 | 5071 | return _controls_.TreeCtrl_SetItemBackgroundColour(*args, **kwargs) |
e811c8ce RD |
5072 | |
5073 | def SetItemFont(*args, **kwargs): | |
a95a7133 | 5074 | """SetItemFont(self, TreeItemId item, Font font)""" |
54f9ee45 | 5075 | return _controls_.TreeCtrl_SetItemFont(*args, **kwargs) |
e811c8ce RD |
5076 | |
5077 | def IsVisible(*args, **kwargs): | |
a95a7133 | 5078 | """IsVisible(self, TreeItemId item) -> bool""" |
54f9ee45 | 5079 | return _controls_.TreeCtrl_IsVisible(*args, **kwargs) |
e811c8ce RD |
5080 | |
5081 | def ItemHasChildren(*args, **kwargs): | |
a95a7133 | 5082 | """ItemHasChildren(self, TreeItemId item) -> bool""" |
54f9ee45 | 5083 | return _controls_.TreeCtrl_ItemHasChildren(*args, **kwargs) |
e811c8ce RD |
5084 | |
5085 | def IsExpanded(*args, **kwargs): | |
a95a7133 | 5086 | """IsExpanded(self, TreeItemId item) -> bool""" |
54f9ee45 | 5087 | return _controls_.TreeCtrl_IsExpanded(*args, **kwargs) |
e811c8ce RD |
5088 | |
5089 | def IsSelected(*args, **kwargs): | |
a95a7133 | 5090 | """IsSelected(self, TreeItemId item) -> bool""" |
54f9ee45 | 5091 | return _controls_.TreeCtrl_IsSelected(*args, **kwargs) |
e811c8ce RD |
5092 | |
5093 | def IsBold(*args, **kwargs): | |
a95a7133 | 5094 | """IsBold(self, TreeItemId item) -> bool""" |
54f9ee45 | 5095 | return _controls_.TreeCtrl_IsBold(*args, **kwargs) |
e811c8ce RD |
5096 | |
5097 | def GetChildrenCount(*args, **kwargs): | |
a95a7133 | 5098 | """GetChildrenCount(self, TreeItemId item, bool recursively=True) -> size_t""" |
54f9ee45 | 5099 | return _controls_.TreeCtrl_GetChildrenCount(*args, **kwargs) |
e811c8ce RD |
5100 | |
5101 | def GetRootItem(*args, **kwargs): | |
a95a7133 | 5102 | """GetRootItem(self) -> TreeItemId""" |
54f9ee45 | 5103 | return _controls_.TreeCtrl_GetRootItem(*args, **kwargs) |
e811c8ce RD |
5104 | |
5105 | def GetSelection(*args, **kwargs): | |
a95a7133 | 5106 | """GetSelection(self) -> TreeItemId""" |
54f9ee45 | 5107 | return _controls_.TreeCtrl_GetSelection(*args, **kwargs) |
e811c8ce RD |
5108 | |
5109 | def GetSelections(*args, **kwargs): | |
a95a7133 | 5110 | """GetSelections(self) -> PyObject""" |
54f9ee45 | 5111 | return _controls_.TreeCtrl_GetSelections(*args, **kwargs) |
e811c8ce RD |
5112 | |
5113 | def GetItemParent(*args, **kwargs): | |
a95a7133 | 5114 | """GetItemParent(self, TreeItemId item) -> TreeItemId""" |
54f9ee45 | 5115 | return _controls_.TreeCtrl_GetItemParent(*args, **kwargs) |
e811c8ce RD |
5116 | |
5117 | def GetFirstChild(*args, **kwargs): | |
a95a7133 | 5118 | """GetFirstChild(self, TreeItemId item) -> PyObject""" |
54f9ee45 | 5119 | return _controls_.TreeCtrl_GetFirstChild(*args, **kwargs) |
e811c8ce RD |
5120 | |
5121 | def GetNextChild(*args, **kwargs): | |
a95a7133 | 5122 | """GetNextChild(self, TreeItemId item, void cookie) -> PyObject""" |
54f9ee45 | 5123 | return _controls_.TreeCtrl_GetNextChild(*args, **kwargs) |
e811c8ce RD |
5124 | |
5125 | def GetLastChild(*args, **kwargs): | |
a95a7133 | 5126 | """GetLastChild(self, TreeItemId item) -> TreeItemId""" |
54f9ee45 | 5127 | return _controls_.TreeCtrl_GetLastChild(*args, **kwargs) |
e811c8ce RD |
5128 | |
5129 | def GetNextSibling(*args, **kwargs): | |
a95a7133 | 5130 | """GetNextSibling(self, TreeItemId item) -> TreeItemId""" |
54f9ee45 | 5131 | return _controls_.TreeCtrl_GetNextSibling(*args, **kwargs) |
e811c8ce RD |
5132 | |
5133 | def GetPrevSibling(*args, **kwargs): | |
a95a7133 | 5134 | """GetPrevSibling(self, TreeItemId item) -> TreeItemId""" |
54f9ee45 | 5135 | return _controls_.TreeCtrl_GetPrevSibling(*args, **kwargs) |
e811c8ce RD |
5136 | |
5137 | def GetFirstVisibleItem(*args, **kwargs): | |
a95a7133 | 5138 | """GetFirstVisibleItem(self) -> TreeItemId""" |
54f9ee45 | 5139 | return _controls_.TreeCtrl_GetFirstVisibleItem(*args, **kwargs) |
e811c8ce RD |
5140 | |
5141 | def GetNextVisible(*args, **kwargs): | |
a95a7133 | 5142 | """GetNextVisible(self, TreeItemId item) -> TreeItemId""" |
54f9ee45 | 5143 | return _controls_.TreeCtrl_GetNextVisible(*args, **kwargs) |
e811c8ce RD |
5144 | |
5145 | def GetPrevVisible(*args, **kwargs): | |
a95a7133 | 5146 | """GetPrevVisible(self, TreeItemId item) -> TreeItemId""" |
54f9ee45 | 5147 | return _controls_.TreeCtrl_GetPrevVisible(*args, **kwargs) |
e811c8ce RD |
5148 | |
5149 | def AddRoot(*args, **kwargs): | |
a95a7133 | 5150 | """AddRoot(self, String text, int image=-1, int selectedImage=-1, TreeItemData data=None) -> TreeItemId""" |
54f9ee45 | 5151 | return _controls_.TreeCtrl_AddRoot(*args, **kwargs) |
e811c8ce RD |
5152 | |
5153 | def PrependItem(*args, **kwargs): | |
0df68c9f | 5154 | """ |
a95a7133 | 5155 | PrependItem(self, TreeItemId parent, String text, int image=-1, int selectedImage=-1, |
0df68c9f RD |
5156 | TreeItemData data=None) -> TreeItemId |
5157 | """ | |
54f9ee45 | 5158 | return _controls_.TreeCtrl_PrependItem(*args, **kwargs) |
e811c8ce RD |
5159 | |
5160 | def InsertItem(*args, **kwargs): | |
0df68c9f | 5161 | """ |
a95a7133 | 5162 | InsertItem(self, TreeItemId parent, TreeItemId idPrevious, String text, |
0df68c9f RD |
5163 | int image=-1, int selectedImage=-1, TreeItemData data=None) -> TreeItemId |
5164 | """ | |
54f9ee45 | 5165 | return _controls_.TreeCtrl_InsertItem(*args, **kwargs) |
e811c8ce RD |
5166 | |
5167 | def InsertItemBefore(*args, **kwargs): | |
0df68c9f | 5168 | """ |
a95a7133 | 5169 | InsertItemBefore(self, TreeItemId parent, size_t index, String text, int image=-1, |
0df68c9f RD |
5170 | int selectedImage=-1, TreeItemData data=None) -> TreeItemId |
5171 | """ | |
54f9ee45 | 5172 | return _controls_.TreeCtrl_InsertItemBefore(*args, **kwargs) |
e811c8ce RD |
5173 | |
5174 | def AppendItem(*args, **kwargs): | |
0df68c9f | 5175 | """ |
a95a7133 | 5176 | AppendItem(self, TreeItemId parent, String text, int image=-1, int selectedImage=-1, |
0df68c9f RD |
5177 | TreeItemData data=None) -> TreeItemId |
5178 | """ | |
54f9ee45 | 5179 | return _controls_.TreeCtrl_AppendItem(*args, **kwargs) |
e811c8ce RD |
5180 | |
5181 | def Delete(*args, **kwargs): | |
a95a7133 | 5182 | """Delete(self, TreeItemId item)""" |
54f9ee45 | 5183 | return _controls_.TreeCtrl_Delete(*args, **kwargs) |
e811c8ce RD |
5184 | |
5185 | def DeleteChildren(*args, **kwargs): | |
a95a7133 | 5186 | """DeleteChildren(self, TreeItemId item)""" |
54f9ee45 | 5187 | return _controls_.TreeCtrl_DeleteChildren(*args, **kwargs) |
e811c8ce RD |
5188 | |
5189 | def DeleteAllItems(*args, **kwargs): | |
a95a7133 | 5190 | """DeleteAllItems(self)""" |
54f9ee45 | 5191 | return _controls_.TreeCtrl_DeleteAllItems(*args, **kwargs) |
e811c8ce RD |
5192 | |
5193 | def Expand(*args, **kwargs): | |
a95a7133 | 5194 | """Expand(self, TreeItemId item)""" |
54f9ee45 | 5195 | return _controls_.TreeCtrl_Expand(*args, **kwargs) |
e811c8ce RD |
5196 | |
5197 | def Collapse(*args, **kwargs): | |
a95a7133 | 5198 | """Collapse(self, TreeItemId item)""" |
54f9ee45 | 5199 | return _controls_.TreeCtrl_Collapse(*args, **kwargs) |
e811c8ce RD |
5200 | |
5201 | def CollapseAndReset(*args, **kwargs): | |
a95a7133 | 5202 | """CollapseAndReset(self, TreeItemId item)""" |
54f9ee45 | 5203 | return _controls_.TreeCtrl_CollapseAndReset(*args, **kwargs) |
e811c8ce RD |
5204 | |
5205 | def Toggle(*args, **kwargs): | |
a95a7133 | 5206 | """Toggle(self, TreeItemId item)""" |
54f9ee45 | 5207 | return _controls_.TreeCtrl_Toggle(*args, **kwargs) |
e811c8ce RD |
5208 | |
5209 | def Unselect(*args, **kwargs): | |
a95a7133 | 5210 | """Unselect(self)""" |
54f9ee45 | 5211 | return _controls_.TreeCtrl_Unselect(*args, **kwargs) |
e811c8ce | 5212 | |
3adfb63b | 5213 | def UnselectItem(*args, **kwargs): |
a95a7133 | 5214 | """UnselectItem(self, TreeItemId item)""" |
54f9ee45 | 5215 | return _controls_.TreeCtrl_UnselectItem(*args, **kwargs) |
3adfb63b | 5216 | |
e811c8ce | 5217 | def UnselectAll(*args, **kwargs): |
a95a7133 | 5218 | """UnselectAll(self)""" |
54f9ee45 | 5219 | return _controls_.TreeCtrl_UnselectAll(*args, **kwargs) |
e811c8ce RD |
5220 | |
5221 | def SelectItem(*args, **kwargs): | |
a95a7133 | 5222 | """SelectItem(self, TreeItemId item, bool select=True)""" |
54f9ee45 | 5223 | return _controls_.TreeCtrl_SelectItem(*args, **kwargs) |
3adfb63b RD |
5224 | |
5225 | def ToggleItemSelection(*args, **kwargs): | |
a95a7133 | 5226 | """ToggleItemSelection(self, TreeItemId item)""" |
54f9ee45 | 5227 | return _controls_.TreeCtrl_ToggleItemSelection(*args, **kwargs) |
e811c8ce RD |
5228 | |
5229 | def EnsureVisible(*args, **kwargs): | |
a95a7133 | 5230 | """EnsureVisible(self, TreeItemId item)""" |
54f9ee45 | 5231 | return _controls_.TreeCtrl_EnsureVisible(*args, **kwargs) |
e811c8ce RD |
5232 | |
5233 | def ScrollTo(*args, **kwargs): | |
a95a7133 | 5234 | """ScrollTo(self, TreeItemId item)""" |
54f9ee45 | 5235 | return _controls_.TreeCtrl_ScrollTo(*args, **kwargs) |
e811c8ce RD |
5236 | |
5237 | def EditLabel(*args, **kwargs): | |
a95a7133 | 5238 | """EditLabel(self, TreeItemId item)""" |
54f9ee45 | 5239 | return _controls_.TreeCtrl_EditLabel(*args, **kwargs) |
e811c8ce RD |
5240 | |
5241 | def GetEditControl(*args, **kwargs): | |
a95a7133 | 5242 | """GetEditControl(self) -> TextCtrl""" |
54f9ee45 | 5243 | return _controls_.TreeCtrl_GetEditControl(*args, **kwargs) |
e811c8ce RD |
5244 | |
5245 | def SortChildren(*args, **kwargs): | |
a95a7133 | 5246 | """SortChildren(self, TreeItemId item)""" |
54f9ee45 | 5247 | return _controls_.TreeCtrl_SortChildren(*args, **kwargs) |
e811c8ce RD |
5248 | |
5249 | def HitTest(*args, **kwargs): | |
fd2dc343 RD |
5250 | """ |
5251 | HitTest(Point point) -> (item, where) | |
5252 | ||
5253 | Determine which item (if any) belongs the given point. The coordinates | |
5254 | specified are relative to the client area of tree ctrl and the where return | |
5255 | value is set to a bitmask of wxTREE_HITTEST_xxx constants. | |
5256 | ||
5257 | """ | |
54f9ee45 | 5258 | return _controls_.TreeCtrl_HitTest(*args, **kwargs) |
e811c8ce RD |
5259 | |
5260 | def GetBoundingRect(*args, **kwargs): | |
a95a7133 | 5261 | """GetBoundingRect(self, TreeItemId item, bool textOnly=False) -> PyObject""" |
54f9ee45 | 5262 | return _controls_.TreeCtrl_GetBoundingRect(*args, **kwargs) |
e811c8ce | 5263 | |
74a57fcd | 5264 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
5265 | """ |
5266 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
5267 | ||
5268 | Get the default attributes for this class. This is useful if you want | |
5269 | to use the same font or colour in your own control as in a standard | |
5270 | control -- which is a much better idea than hard coding specific | |
5271 | colours or fonts which might look completely out of place on the | |
5272 | user's system, especially if it uses themes. | |
5273 | ||
5274 | The variant parameter is only relevant under Mac currently and is | |
5275 | ignore under other platforms. Under Mac, it will change the size of | |
5276 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
5277 | this. | |
5278 | """ | |
54f9ee45 | 5279 | return _controls_.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
5280 | |
5281 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
70551f47 | 5282 | |
d14a1e28 RD |
5283 | class TreeCtrlPtr(TreeCtrl): |
5284 | def __init__(self, this): | |
5285 | self.this = this | |
5286 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5287 | self.__class__ = TreeCtrl | |
54f9ee45 | 5288 | _controls_.TreeCtrl_swigregister(TreeCtrlPtr) |
70551f47 | 5289 | |
d14a1e28 | 5290 | def PreTreeCtrl(*args, **kwargs): |
e811c8ce | 5291 | """PreTreeCtrl() -> TreeCtrl""" |
54f9ee45 | 5292 | val = _controls_.new_PreTreeCtrl(*args, **kwargs) |
aa2a5b86 RD |
5293 | val.thisown = 1 |
5294 | return val | |
5295 | ||
74a57fcd | 5296 | def TreeCtrl_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
5297 | """ |
5298 | TreeCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
5299 | ||
5300 | Get the default attributes for this class. This is useful if you want | |
5301 | to use the same font or colour in your own control as in a standard | |
5302 | control -- which is a much better idea than hard coding specific | |
5303 | colours or fonts which might look completely out of place on the | |
5304 | user's system, especially if it uses themes. | |
5305 | ||
5306 | The variant parameter is only relevant under Mac currently and is | |
5307 | ignore under other platforms. Under Mac, it will change the size of | |
5308 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
5309 | this. | |
5310 | """ | |
54f9ee45 | 5311 | return _controls_.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 5312 | |
d14a1e28 RD |
5313 | #--------------------------------------------------------------------------- |
5314 | ||
54f9ee45 RD |
5315 | DIRCTRL_DIR_ONLY = _controls_.DIRCTRL_DIR_ONLY |
5316 | DIRCTRL_SELECT_FIRST = _controls_.DIRCTRL_SELECT_FIRST | |
5317 | DIRCTRL_SHOW_FILTERS = _controls_.DIRCTRL_SHOW_FILTERS | |
5318 | DIRCTRL_3D_INTERNAL = _controls_.DIRCTRL_3D_INTERNAL | |
5319 | DIRCTRL_EDIT_LABELS = _controls_.DIRCTRL_EDIT_LABELS | |
5320 | class GenericDirCtrl(_core.Control): | |
e811c8ce RD |
5321 | def __repr__(self): |
5322 | return "<%s.%s; proxy of C++ wxGenericDirCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5323 | def __init__(self, *args, **kwargs): |
0df68c9f | 5324 | """ |
a95a7133 | 5325 | __init__(self, Window parent, int id=-1, String dir=DirDialogDefaultFolderStr, |
196addbf RD |
5326 | Point pos=DefaultPosition, Size size=DefaultSize, |
5327 | long style=wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, | |
5328 | String filter=EmptyString, | |
b2dc1044 | 5329 | int defaultFilter=0, String name=TreeCtrlNameStr) -> GenericDirCtrl |
0df68c9f | 5330 | """ |
54f9ee45 | 5331 | newobj = _controls_.new_GenericDirCtrl(*args, **kwargs) |
d14a1e28 RD |
5332 | self.this = newobj.this |
5333 | self.thisown = 1 | |
5334 | del newobj.thisown | |
5335 | self._setOORInfo(self) | |
e811c8ce RD |
5336 | |
5337 | def Create(*args, **kwargs): | |
0df68c9f | 5338 | """ |
a95a7133 | 5339 | Create(self, Window parent, int id=-1, String dir=DirDialogDefaultFolderStr, |
196addbf RD |
5340 | Point pos=DefaultPosition, Size size=DefaultSize, |
5341 | long style=wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, | |
5342 | String filter=EmptyString, | |
b2dc1044 | 5343 | int defaultFilter=0, String name=TreeCtrlNameStr) -> bool |
0df68c9f | 5344 | """ |
54f9ee45 | 5345 | return _controls_.GenericDirCtrl_Create(*args, **kwargs) |
e811c8ce RD |
5346 | |
5347 | def ExpandPath(*args, **kwargs): | |
a95a7133 | 5348 | """ExpandPath(self, String path) -> bool""" |
54f9ee45 | 5349 | return _controls_.GenericDirCtrl_ExpandPath(*args, **kwargs) |
e811c8ce RD |
5350 | |
5351 | def GetDefaultPath(*args, **kwargs): | |
a95a7133 | 5352 | """GetDefaultPath(self) -> String""" |
54f9ee45 | 5353 | return _controls_.GenericDirCtrl_GetDefaultPath(*args, **kwargs) |
e811c8ce RD |
5354 | |
5355 | def SetDefaultPath(*args, **kwargs): | |
a95a7133 | 5356 | """SetDefaultPath(self, String path)""" |
54f9ee45 | 5357 | return _controls_.GenericDirCtrl_SetDefaultPath(*args, **kwargs) |
e811c8ce RD |
5358 | |
5359 | def GetPath(*args, **kwargs): | |
a95a7133 | 5360 | """GetPath(self) -> String""" |
54f9ee45 | 5361 | return _controls_.GenericDirCtrl_GetPath(*args, **kwargs) |
e811c8ce RD |
5362 | |
5363 | def GetFilePath(*args, **kwargs): | |
a95a7133 | 5364 | """GetFilePath(self) -> String""" |
54f9ee45 | 5365 | return _controls_.GenericDirCtrl_GetFilePath(*args, **kwargs) |
e811c8ce RD |
5366 | |
5367 | def SetPath(*args, **kwargs): | |
a95a7133 | 5368 | """SetPath(self, String path)""" |
54f9ee45 | 5369 | return _controls_.GenericDirCtrl_SetPath(*args, **kwargs) |
e811c8ce RD |
5370 | |
5371 | def ShowHidden(*args, **kwargs): | |
a95a7133 | 5372 | """ShowHidden(self, bool show)""" |
54f9ee45 | 5373 | return _controls_.GenericDirCtrl_ShowHidden(*args, **kwargs) |
e811c8ce RD |
5374 | |
5375 | def GetShowHidden(*args, **kwargs): | |
a95a7133 | 5376 | """GetShowHidden(self) -> bool""" |
54f9ee45 | 5377 | return _controls_.GenericDirCtrl_GetShowHidden(*args, **kwargs) |
e811c8ce RD |
5378 | |
5379 | def GetFilter(*args, **kwargs): | |
a95a7133 | 5380 | """GetFilter(self) -> String""" |
54f9ee45 | 5381 | return _controls_.GenericDirCtrl_GetFilter(*args, **kwargs) |
e811c8ce RD |
5382 | |
5383 | def SetFilter(*args, **kwargs): | |
a95a7133 | 5384 | """SetFilter(self, String filter)""" |
54f9ee45 | 5385 | return _controls_.GenericDirCtrl_SetFilter(*args, **kwargs) |
e811c8ce RD |
5386 | |
5387 | def GetFilterIndex(*args, **kwargs): | |
a95a7133 | 5388 | """GetFilterIndex(self) -> int""" |
54f9ee45 | 5389 | return _controls_.GenericDirCtrl_GetFilterIndex(*args, **kwargs) |
e811c8ce RD |
5390 | |
5391 | def SetFilterIndex(*args, **kwargs): | |
a95a7133 | 5392 | """SetFilterIndex(self, int n)""" |
54f9ee45 | 5393 | return _controls_.GenericDirCtrl_SetFilterIndex(*args, **kwargs) |
e811c8ce RD |
5394 | |
5395 | def GetRootId(*args, **kwargs): | |
a95a7133 | 5396 | """GetRootId(self) -> TreeItemId""" |
54f9ee45 | 5397 | return _controls_.GenericDirCtrl_GetRootId(*args, **kwargs) |
e811c8ce RD |
5398 | |
5399 | def GetTreeCtrl(*args, **kwargs): | |
a95a7133 | 5400 | """GetTreeCtrl(self) -> TreeCtrl""" |
54f9ee45 | 5401 | return _controls_.GenericDirCtrl_GetTreeCtrl(*args, **kwargs) |
e811c8ce RD |
5402 | |
5403 | def GetFilterListCtrl(*args, **kwargs): | |
a95a7133 | 5404 | """GetFilterListCtrl(self) -> DirFilterListCtrl""" |
54f9ee45 | 5405 | return _controls_.GenericDirCtrl_GetFilterListCtrl(*args, **kwargs) |
e811c8ce RD |
5406 | |
5407 | def FindChild(*args, **kwargs): | |
fd2dc343 RD |
5408 | """ |
5409 | FindChild(wxTreeItemId parentId, wxString path) -> (item, done) | |
5410 | ||
5411 | Find the child that matches the first part of 'path'. E.g. if a child | |
5412 | path is "/usr" and 'path' is "/usr/include" then the child for | |
5413 | /usr is returned. If the path string has been used (we're at the | |
5414 | leaf), done is set to True. | |
5415 | ||
5416 | """ | |
54f9ee45 | 5417 | return _controls_.GenericDirCtrl_FindChild(*args, **kwargs) |
e811c8ce RD |
5418 | |
5419 | def DoResize(*args, **kwargs): | |
a95a7133 | 5420 | """DoResize(self)""" |
54f9ee45 | 5421 | return _controls_.GenericDirCtrl_DoResize(*args, **kwargs) |
e811c8ce RD |
5422 | |
5423 | def ReCreateTree(*args, **kwargs): | |
a95a7133 | 5424 | """ReCreateTree(self)""" |
54f9ee45 | 5425 | return _controls_.GenericDirCtrl_ReCreateTree(*args, **kwargs) |
e811c8ce | 5426 | |
70551f47 | 5427 | |
d14a1e28 RD |
5428 | class GenericDirCtrlPtr(GenericDirCtrl): |
5429 | def __init__(self, this): | |
7a446686 | 5430 | self.this = this |
d14a1e28 RD |
5431 | if not hasattr(self,"thisown"): self.thisown = 0 |
5432 | self.__class__ = GenericDirCtrl | |
54f9ee45 | 5433 | _controls_.GenericDirCtrl_swigregister(GenericDirCtrlPtr) |
b2dc1044 | 5434 | DirDialogDefaultFolderStr = cvar.DirDialogDefaultFolderStr |
d14a1e28 RD |
5435 | |
5436 | def PreGenericDirCtrl(*args, **kwargs): | |
e811c8ce | 5437 | """PreGenericDirCtrl() -> GenericDirCtrl""" |
54f9ee45 | 5438 | val = _controls_.new_PreGenericDirCtrl(*args, **kwargs) |
d14a1e28 RD |
5439 | val.thisown = 1 |
5440 | return val | |
5441 | ||
5442 | class DirFilterListCtrl(Choice): | |
e811c8ce RD |
5443 | def __repr__(self): |
5444 | return "<%s.%s; proxy of C++ wxDirFilterListCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5445 | def __init__(self, *args, **kwargs): |
0df68c9f | 5446 | """ |
a95a7133 | 5447 | __init__(self, GenericDirCtrl parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f RD |
5448 | Size size=DefaultSize, long style=0) -> DirFilterListCtrl |
5449 | """ | |
54f9ee45 | 5450 | newobj = _controls_.new_DirFilterListCtrl(*args, **kwargs) |
d14a1e28 | 5451 | self.this = newobj.this |
7a446686 | 5452 | self.thisown = 1 |
d14a1e28 | 5453 | del newobj.thisown |
0220cbc1 | 5454 | self._setOORInfo(self) |
e811c8ce RD |
5455 | |
5456 | def Create(*args, **kwargs): | |
0df68c9f | 5457 | """ |
a95a7133 | 5458 | Create(self, GenericDirCtrl parent, int id=-1, Point pos=DefaultPosition, |
0df68c9f RD |
5459 | Size size=DefaultSize, long style=0) -> bool |
5460 | """ | |
54f9ee45 | 5461 | return _controls_.DirFilterListCtrl_Create(*args, **kwargs) |
e811c8ce RD |
5462 | |
5463 | def FillFilterList(*args, **kwargs): | |
a95a7133 | 5464 | """FillFilterList(self, String filter, int defaultFilter)""" |
54f9ee45 | 5465 | return _controls_.DirFilterListCtrl_FillFilterList(*args, **kwargs) |
e811c8ce | 5466 | |
7a446686 | 5467 | |
d14a1e28 RD |
5468 | class DirFilterListCtrlPtr(DirFilterListCtrl): |
5469 | def __init__(self, this): | |
5470 | self.this = this | |
5471 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5472 | self.__class__ = DirFilterListCtrl | |
54f9ee45 | 5473 | _controls_.DirFilterListCtrl_swigregister(DirFilterListCtrlPtr) |
7a446686 | 5474 | |
d14a1e28 | 5475 | def PreDirFilterListCtrl(*args, **kwargs): |
e811c8ce | 5476 | """PreDirFilterListCtrl() -> DirFilterListCtrl""" |
54f9ee45 | 5477 | val = _controls_.new_PreDirFilterListCtrl(*args, **kwargs) |
aa2a5b86 RD |
5478 | val.thisown = 1 |
5479 | return val | |
5480 | ||
d14a1e28 | 5481 | #--------------------------------------------------------------------------- |
7a446686 | 5482 | |
54f9ee45 | 5483 | class PyControl(_core.Control): |
e811c8ce RD |
5484 | def __repr__(self): |
5485 | return "<%s.%s; proxy of C++ wxPyControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5486 | def __init__(self, *args, **kwargs): |
0df68c9f | 5487 | """ |
248ed943 RD |
5488 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
5489 | Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 5490 | String name=ControlNameStr) -> PyControl |
0df68c9f | 5491 | """ |
54f9ee45 | 5492 | newobj = _controls_.new_PyControl(*args, **kwargs) |
d14a1e28 RD |
5493 | self.this = newobj.this |
5494 | self.thisown = 1 | |
5495 | del newobj.thisown | |
5496 | self._setOORInfo(self); self._setCallbackInfo(self, PyControl) | |
e811c8ce RD |
5497 | |
5498 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 5499 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 5500 | return _controls_.PyControl__setCallbackInfo(*args, **kwargs) |
e811c8ce | 5501 | |
db3e571a RD |
5502 | def SetBestSize(*args, **kwargs): |
5503 | """SetBestSize(self, Size size)""" | |
5504 | return _controls_.PyControl_SetBestSize(*args, **kwargs) | |
5505 | ||
e811c8ce | 5506 | def base_DoMoveWindow(*args, **kwargs): |
a95a7133 | 5507 | """base_DoMoveWindow(self, int x, int y, int width, int height)""" |
54f9ee45 | 5508 | return _controls_.PyControl_base_DoMoveWindow(*args, **kwargs) |
e811c8ce RD |
5509 | |
5510 | def base_DoSetSize(*args, **kwargs): | |
a95a7133 | 5511 | """base_DoSetSize(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)""" |
54f9ee45 | 5512 | return _controls_.PyControl_base_DoSetSize(*args, **kwargs) |
e811c8ce RD |
5513 | |
5514 | def base_DoSetClientSize(*args, **kwargs): | |
a95a7133 | 5515 | """base_DoSetClientSize(self, int width, int height)""" |
54f9ee45 | 5516 | return _controls_.PyControl_base_DoSetClientSize(*args, **kwargs) |
e811c8ce RD |
5517 | |
5518 | def base_DoSetVirtualSize(*args, **kwargs): | |
a95a7133 | 5519 | """base_DoSetVirtualSize(self, int x, int y)""" |
54f9ee45 | 5520 | return _controls_.PyControl_base_DoSetVirtualSize(*args, **kwargs) |
e811c8ce RD |
5521 | |
5522 | def base_DoGetSize(*args, **kwargs): | |
322913ce | 5523 | """base_DoGetSize() -> (width, height)""" |
54f9ee45 | 5524 | return _controls_.PyControl_base_DoGetSize(*args, **kwargs) |
e811c8ce RD |
5525 | |
5526 | def base_DoGetClientSize(*args, **kwargs): | |
322913ce | 5527 | """base_DoGetClientSize() -> (width, height)""" |
54f9ee45 | 5528 | return _controls_.PyControl_base_DoGetClientSize(*args, **kwargs) |
e811c8ce RD |
5529 | |
5530 | def base_DoGetPosition(*args, **kwargs): | |
322913ce | 5531 | """base_DoGetPosition() -> (x,y)""" |
54f9ee45 | 5532 | return _controls_.PyControl_base_DoGetPosition(*args, **kwargs) |
e811c8ce RD |
5533 | |
5534 | def base_DoGetVirtualSize(*args, **kwargs): | |
a95a7133 | 5535 | """base_DoGetVirtualSize(self) -> Size""" |
54f9ee45 | 5536 | return _controls_.PyControl_base_DoGetVirtualSize(*args, **kwargs) |
e811c8ce RD |
5537 | |
5538 | def base_DoGetBestSize(*args, **kwargs): | |
a95a7133 | 5539 | """base_DoGetBestSize(self) -> Size""" |
54f9ee45 | 5540 | return _controls_.PyControl_base_DoGetBestSize(*args, **kwargs) |
e811c8ce RD |
5541 | |
5542 | def base_InitDialog(*args, **kwargs): | |
a95a7133 | 5543 | """base_InitDialog(self)""" |
54f9ee45 | 5544 | return _controls_.PyControl_base_InitDialog(*args, **kwargs) |
e811c8ce RD |
5545 | |
5546 | def base_TransferDataToWindow(*args, **kwargs): | |
a95a7133 | 5547 | """base_TransferDataToWindow(self) -> bool""" |
54f9ee45 | 5548 | return _controls_.PyControl_base_TransferDataToWindow(*args, **kwargs) |
e811c8ce RD |
5549 | |
5550 | def base_TransferDataFromWindow(*args, **kwargs): | |
a95a7133 | 5551 | """base_TransferDataFromWindow(self) -> bool""" |
54f9ee45 | 5552 | return _controls_.PyControl_base_TransferDataFromWindow(*args, **kwargs) |
e811c8ce RD |
5553 | |
5554 | def base_Validate(*args, **kwargs): | |
a95a7133 | 5555 | """base_Validate(self) -> bool""" |
54f9ee45 | 5556 | return _controls_.PyControl_base_Validate(*args, **kwargs) |
e811c8ce RD |
5557 | |
5558 | def base_AcceptsFocus(*args, **kwargs): | |
a95a7133 | 5559 | """base_AcceptsFocus(self) -> bool""" |
54f9ee45 | 5560 | return _controls_.PyControl_base_AcceptsFocus(*args, **kwargs) |
e811c8ce RD |
5561 | |
5562 | def base_AcceptsFocusFromKeyboard(*args, **kwargs): | |
a95a7133 | 5563 | """base_AcceptsFocusFromKeyboard(self) -> bool""" |
54f9ee45 | 5564 | return _controls_.PyControl_base_AcceptsFocusFromKeyboard(*args, **kwargs) |
e811c8ce RD |
5565 | |
5566 | def base_GetMaxSize(*args, **kwargs): | |
a95a7133 | 5567 | """base_GetMaxSize(self) -> Size""" |
54f9ee45 | 5568 | return _controls_.PyControl_base_GetMaxSize(*args, **kwargs) |
e811c8ce RD |
5569 | |
5570 | def base_AddChild(*args, **kwargs): | |
a95a7133 | 5571 | """base_AddChild(self, Window child)""" |
54f9ee45 | 5572 | return _controls_.PyControl_base_AddChild(*args, **kwargs) |
e811c8ce RD |
5573 | |
5574 | def base_RemoveChild(*args, **kwargs): | |
a95a7133 | 5575 | """base_RemoveChild(self, Window child)""" |
54f9ee45 | 5576 | return _controls_.PyControl_base_RemoveChild(*args, **kwargs) |
e811c8ce | 5577 | |
1cb4a8aa | 5578 | def base_ShouldInheritColours(*args, **kwargs): |
a95a7133 | 5579 | """base_ShouldInheritColours(self) -> bool""" |
54f9ee45 | 5580 | return _controls_.PyControl_base_ShouldInheritColours(*args, **kwargs) |
1cb4a8aa RD |
5581 | |
5582 | def base_ApplyParentThemeBackground(*args, **kwargs): | |
a95a7133 | 5583 | """base_ApplyParentThemeBackground(self, Colour c)""" |
54f9ee45 | 5584 | return _controls_.PyControl_base_ApplyParentThemeBackground(*args, **kwargs) |
1cb4a8aa | 5585 | |
db3e571a RD |
5586 | def base_GetDefaultAttributes(*args, **kwargs): |
5587 | """base_GetDefaultAttributes(self) -> VisualAttributes""" | |
5588 | return _controls_.PyControl_base_GetDefaultAttributes(*args, **kwargs) | |
5589 | ||
70551f47 | 5590 | |
d14a1e28 RD |
5591 | class PyControlPtr(PyControl): |
5592 | def __init__(self, this): | |
5593 | self.this = this | |
5594 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5595 | self.__class__ = PyControl | |
54f9ee45 | 5596 | _controls_.PyControl_swigregister(PyControlPtr) |
d14a1e28 | 5597 | |
1cb4a8aa RD |
5598 | def PrePyControl(*args, **kwargs): |
5599 | """PrePyControl() -> PyControl""" | |
54f9ee45 | 5600 | val = _controls_.new_PrePyControl(*args, **kwargs) |
1cb4a8aa RD |
5601 | val.thisown = 1 |
5602 | return val | |
5603 | ||
d14a1e28 RD |
5604 | #--------------------------------------------------------------------------- |
5605 | ||
54f9ee45 RD |
5606 | FRAME_EX_CONTEXTHELP = _controls_.FRAME_EX_CONTEXTHELP |
5607 | DIALOG_EX_CONTEXTHELP = _controls_.DIALOG_EX_CONTEXTHELP | |
5608 | wxEVT_HELP = _controls_.wxEVT_HELP | |
5609 | wxEVT_DETAILED_HELP = _controls_.wxEVT_DETAILED_HELP | |
d14a1e28 RD |
5610 | EVT_HELP = wx.PyEventBinder( wxEVT_HELP, 1) |
5611 | EVT_HELP_RANGE = wx.PyEventBinder( wxEVT_HELP, 2) | |
5612 | EVT_DETAILED_HELP = wx.PyEventBinder( wxEVT_DETAILED_HELP, 1) | |
5613 | EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2) | |
5614 | ||
54f9ee45 | 5615 | class HelpEvent(_core.CommandEvent): |
15afbcd0 | 5616 | """ |
41e2b43e RD |
5617 | A help event is sent when the user has requested context-sensitive |
5618 | help. This can either be caused by the application requesting | |
5619 | context-sensitive help mode via wx.ContextHelp, or (on MS Windows) by | |
5620 | the system generating a WM_HELP message when the user pressed F1 or | |
5621 | clicked on the query button in a dialog caption. | |
5622 | ||
5623 | A help event is sent to the window that the user clicked on, and is | |
5624 | propagated up the window hierarchy until the event is processed or | |
5625 | there are no more event handlers. The application should call | |
5626 | event.GetId to check the identity of the clicked-on window, and then | |
5627 | either show some suitable help or call event.Skip if the identifier is | |
5628 | unrecognised. Calling Skip is important because it allows wxWindows to | |
5629 | generate further events for ancestors of the clicked-on | |
5630 | window. Otherwise it would be impossible to show help for container | |
5631 | windows, since processing would stop after the first window found. | |
15afbcd0 | 5632 | """ |
e811c8ce RD |
5633 | def __repr__(self): |
5634 | return "<%s.%s; proxy of C++ wxHelpEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5635 | def __init__(self, *args, **kwargs): |
a95a7133 | 5636 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> HelpEvent""" |
54f9ee45 | 5637 | newobj = _controls_.new_HelpEvent(*args, **kwargs) |
d14a1e28 RD |
5638 | self.this = newobj.this |
5639 | self.thisown = 1 | |
5640 | del newobj.thisown | |
e811c8ce | 5641 | def GetPosition(*args, **kwargs): |
15afbcd0 | 5642 | """ |
a95a7133 | 5643 | GetPosition(self) -> Point |
15afbcd0 RD |
5644 | |
5645 | Returns the left-click position of the mouse, in screen | |
5646 | coordinates. This allows the application to position the help | |
5647 | appropriately. | |
5648 | """ | |
54f9ee45 | 5649 | return _controls_.HelpEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
5650 | |
5651 | def SetPosition(*args, **kwargs): | |
15afbcd0 | 5652 | """ |
a95a7133 | 5653 | SetPosition(self, Point pos) |
15afbcd0 RD |
5654 | |
5655 | Sets the left-click position of the mouse, in screen coordinates. | |
5656 | """ | |
54f9ee45 | 5657 | return _controls_.HelpEvent_SetPosition(*args, **kwargs) |
e811c8ce RD |
5658 | |
5659 | def GetLink(*args, **kwargs): | |
15afbcd0 | 5660 | """ |
a95a7133 | 5661 | GetLink(self) -> String |
15afbcd0 RD |
5662 | |
5663 | Get an optional link to further help | |
5664 | """ | |
54f9ee45 | 5665 | return _controls_.HelpEvent_GetLink(*args, **kwargs) |
e811c8ce RD |
5666 | |
5667 | def SetLink(*args, **kwargs): | |
15afbcd0 | 5668 | """ |
a95a7133 | 5669 | SetLink(self, String link) |
15afbcd0 RD |
5670 | |
5671 | Set an optional link to further help | |
5672 | """ | |
54f9ee45 | 5673 | return _controls_.HelpEvent_SetLink(*args, **kwargs) |
e811c8ce RD |
5674 | |
5675 | def GetTarget(*args, **kwargs): | |
15afbcd0 | 5676 | """ |
a95a7133 | 5677 | GetTarget(self) -> String |
15afbcd0 RD |
5678 | |
5679 | Get an optional target to display help in. E.g. a window specification | |
5680 | """ | |
54f9ee45 | 5681 | return _controls_.HelpEvent_GetTarget(*args, **kwargs) |
e811c8ce RD |
5682 | |
5683 | def SetTarget(*args, **kwargs): | |
15afbcd0 | 5684 | """ |
a95a7133 | 5685 | SetTarget(self, String target) |
15afbcd0 RD |
5686 | |
5687 | Set an optional target to display help in. E.g. a window specification | |
5688 | """ | |
54f9ee45 | 5689 | return _controls_.HelpEvent_SetTarget(*args, **kwargs) |
e811c8ce | 5690 | |
70551f47 | 5691 | |
d14a1e28 RD |
5692 | class HelpEventPtr(HelpEvent): |
5693 | def __init__(self, this): | |
5694 | self.this = this | |
5695 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5696 | self.__class__ = HelpEvent | |
54f9ee45 | 5697 | _controls_.HelpEvent_swigregister(HelpEventPtr) |
d14a1e28 | 5698 | |
54f9ee45 | 5699 | class ContextHelp(_core.Object): |
15afbcd0 | 5700 | """ |
41e2b43e RD |
5701 | This class changes the cursor to a query and puts the application into |
5702 | a 'context-sensitive help mode'. When the user left-clicks on a window | |
5703 | within the specified window, a ``EVT_HELP`` event is sent to that | |
5704 | control, and the application may respond to it by popping up some | |
5705 | help. | |
15afbcd0 RD |
5706 | |
5707 | There are a couple of ways to invoke this behaviour implicitly: | |
5708 | ||
41e2b43e RD |
5709 | * Use the wx.DIALOG_EX_CONTEXTHELP extended style for a dialog |
5710 | (Windows only). This will put a question mark in the titlebar, | |
5711 | and Windows will put the application into context-sensitive help | |
5712 | mode automatically, with further programming. | |
5713 | ||
5714 | * Create a `wx.ContextHelpButton`, whose predefined behaviour is | |
5715 | to create a context help object. Normally you will write your | |
5716 | application so that this button is only added to a dialog for | |
5717 | non-Windows platforms (use ``wx.DIALOG_EX_CONTEXTHELP`` on | |
5718 | Windows). | |
15afbcd0 | 5719 | |
41e2b43e | 5720 | :see: `wx.ContextHelpButton` |
15afbcd0 RD |
5721 | |
5722 | """ | |
e811c8ce RD |
5723 | def __repr__(self): |
5724 | return "<%s.%s; proxy of C++ wxContextHelp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5725 | def __init__(self, *args, **kwargs): |
15afbcd0 | 5726 | """ |
a95a7133 | 5727 | __init__(self, Window window=None, bool doNow=True) -> ContextHelp |
15afbcd0 | 5728 | |
41e2b43e RD |
5729 | Constructs a context help object, calling BeginContextHelp if doNow is |
5730 | true (the default). | |
15afbcd0 RD |
5731 | |
5732 | If window is None, the top window is used. | |
5733 | """ | |
54f9ee45 | 5734 | newobj = _controls_.new_ContextHelp(*args, **kwargs) |
d14a1e28 RD |
5735 | self.this = newobj.this |
5736 | self.thisown = 1 | |
5737 | del newobj.thisown | |
54f9ee45 | 5738 | def __del__(self, destroy=_controls_.delete_ContextHelp): |
a95a7133 | 5739 | """__del__(self)""" |
d14a1e28 RD |
5740 | try: |
5741 | if self.thisown: destroy(self) | |
5742 | except: pass | |
e811c8ce RD |
5743 | |
5744 | def BeginContextHelp(*args, **kwargs): | |
15afbcd0 | 5745 | """ |
a95a7133 | 5746 | BeginContextHelp(self, Window window=None) -> bool |
15afbcd0 | 5747 | |
41e2b43e RD |
5748 | Puts the application into context-sensitive help mode. window is the |
5749 | window which will be used to catch events; if NULL, the top window | |
5750 | will be used. | |
15afbcd0 RD |
5751 | |
5752 | Returns true if the application was successfully put into | |
41e2b43e RD |
5753 | context-sensitive help mode. This function only returns when the event |
5754 | loop has finished. | |
15afbcd0 | 5755 | """ |
54f9ee45 | 5756 | return _controls_.ContextHelp_BeginContextHelp(*args, **kwargs) |
e811c8ce RD |
5757 | |
5758 | def EndContextHelp(*args, **kwargs): | |
15afbcd0 | 5759 | """ |
a95a7133 | 5760 | EndContextHelp(self) -> bool |
15afbcd0 RD |
5761 | |
5762 | Ends context-sensitive help mode. Not normally called by the | |
5763 | application. | |
5764 | """ | |
54f9ee45 | 5765 | return _controls_.ContextHelp_EndContextHelp(*args, **kwargs) |
e811c8ce | 5766 | |
70551f47 | 5767 | |
d14a1e28 RD |
5768 | class ContextHelpPtr(ContextHelp): |
5769 | def __init__(self, this): | |
5770 | self.this = this | |
5771 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5772 | self.__class__ = ContextHelp | |
54f9ee45 | 5773 | _controls_.ContextHelp_swigregister(ContextHelpPtr) |
d14a1e28 RD |
5774 | |
5775 | class ContextHelpButton(BitmapButton): | |
15afbcd0 | 5776 | """ |
41e2b43e RD |
5777 | Instances of this class may be used to add a question mark button that |
5778 | when pressed, puts the application into context-help mode. It does | |
5779 | this by creating a wx.ContextHelp object which itself generates a | |
5780 | ``EVT_HELP`` event when the user clicks on a window. | |
5781 | ||
5782 | On Windows, you may add a question-mark icon to a dialog by use of the | |
5783 | ``wx.DIALOG_EX_CONTEXTHELP`` extra style, but on other platforms you | |
5784 | will have to add a button explicitly, usually next to OK, Cancel or | |
5785 | similar buttons. | |
15afbcd0 | 5786 | |
41e2b43e | 5787 | :see: `wx.ContextHelp`, `wx.ContextHelpButton` |
15afbcd0 RD |
5788 | |
5789 | """ | |
e811c8ce RD |
5790 | def __repr__(self): |
5791 | return "<%s.%s; proxy of C++ wxContextHelpButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5792 | def __init__(self, *args, **kwargs): |
0df68c9f | 5793 | """ |
a95a7133 | 5794 | __init__(self, Window parent, int id=ID_CONTEXT_HELP, Point pos=DefaultPosition, |
0df68c9f | 5795 | Size size=DefaultSize, long style=BU_AUTODRAW) -> ContextHelpButton |
15afbcd0 RD |
5796 | |
5797 | Constructor, creating and showing a context help button. | |
0df68c9f | 5798 | """ |
54f9ee45 | 5799 | newobj = _controls_.new_ContextHelpButton(*args, **kwargs) |
d14a1e28 RD |
5800 | self.this = newobj.this |
5801 | self.thisown = 1 | |
5802 | del newobj.thisown | |
5803 | self._setOORInfo(self) | |
e811c8ce | 5804 | |
56f5d962 | 5805 | |
d14a1e28 RD |
5806 | class ContextHelpButtonPtr(ContextHelpButton): |
5807 | def __init__(self, this): | |
5808 | self.this = this | |
5809 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5810 | self.__class__ = ContextHelpButton | |
54f9ee45 | 5811 | _controls_.ContextHelpButton_swigregister(ContextHelpButtonPtr) |
d14a1e28 RD |
5812 | |
5813 | class HelpProvider(object): | |
15afbcd0 RD |
5814 | """ |
5815 | wx.HelpProvider is an abstract class used by a program | |
5816 | implementing context-sensitive help to show the help text for the | |
5817 | given window. | |
5818 | ||
5819 | The current help provider must be explicitly set by the | |
5820 | application using wx.HelpProvider.Set(). | |
5821 | """ | |
d14a1e28 RD |
5822 | def __init__(self): raise RuntimeError, "No constructor defined" |
5823 | def __repr__(self): | |
5824 | return "<%s.%s; proxy of C++ wxHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 5825 | def Set(*args, **kwargs): |
15afbcd0 | 5826 | """ |
66c033b4 | 5827 | Set(HelpProvider helpProvider) -> HelpProvider |
15afbcd0 | 5828 | |
41e2b43e RD |
5829 | Sset the current, application-wide help provider. Returns the previous |
5830 | one. Unlike some other classes, the help provider is not created on | |
5831 | demand. This must be explicitly done by the application. | |
15afbcd0 | 5832 | """ |
54f9ee45 | 5833 | return _controls_.HelpProvider_Set(*args, **kwargs) |
e811c8ce RD |
5834 | |
5835 | Set = staticmethod(Set) | |
5836 | def Get(*args, **kwargs): | |
15afbcd0 | 5837 | """ |
66c033b4 | 5838 | Get() -> HelpProvider |
15afbcd0 RD |
5839 | |
5840 | Return the current application-wide help provider. | |
5841 | """ | |
54f9ee45 | 5842 | return _controls_.HelpProvider_Get(*args, **kwargs) |
e811c8ce RD |
5843 | |
5844 | Get = staticmethod(Get) | |
5845 | def GetHelp(*args, **kwargs): | |
15afbcd0 | 5846 | """ |
a95a7133 | 5847 | GetHelp(self, Window window) -> String |
15afbcd0 | 5848 | |
41e2b43e RD |
5849 | Gets the help string for this window. Its interpretation is dependent |
5850 | on the help provider except that empty string always means that no | |
5851 | help is associated with the window. | |
15afbcd0 | 5852 | """ |
54f9ee45 | 5853 | return _controls_.HelpProvider_GetHelp(*args, **kwargs) |
e811c8ce RD |
5854 | |
5855 | def ShowHelp(*args, **kwargs): | |
15afbcd0 | 5856 | """ |
a95a7133 | 5857 | ShowHelp(self, Window window) -> bool |
15afbcd0 RD |
5858 | |
5859 | Shows help for the given window. Uses GetHelp internally if | |
41e2b43e RD |
5860 | applicable. Returns True if it was done, or False if no help was |
5861 | available for this window. | |
15afbcd0 | 5862 | """ |
54f9ee45 | 5863 | return _controls_.HelpProvider_ShowHelp(*args, **kwargs) |
e811c8ce RD |
5864 | |
5865 | def AddHelp(*args, **kwargs): | |
15afbcd0 | 5866 | """ |
a95a7133 | 5867 | AddHelp(self, Window window, String text) |
15afbcd0 RD |
5868 | |
5869 | Associates the text with the given window. | |
5870 | """ | |
54f9ee45 | 5871 | return _controls_.HelpProvider_AddHelp(*args, **kwargs) |
e811c8ce RD |
5872 | |
5873 | def AddHelpById(*args, **kwargs): | |
15afbcd0 | 5874 | """ |
a95a7133 | 5875 | AddHelpById(self, int id, String text) |
15afbcd0 RD |
5876 | |
5877 | This version associates the given text with all windows with this | |
41e2b43e RD |
5878 | id. May be used to set the same help string for all Cancel buttons in |
5879 | the application, for example. | |
15afbcd0 | 5880 | """ |
54f9ee45 | 5881 | return _controls_.HelpProvider_AddHelpById(*args, **kwargs) |
e811c8ce | 5882 | |
15afbcd0 RD |
5883 | def RemoveHelp(*args, **kwargs): |
5884 | """ | |
a95a7133 | 5885 | RemoveHelp(self, Window window) |
15afbcd0 RD |
5886 | |
5887 | Removes the association between the window pointer and the help | |
41e2b43e RD |
5888 | text. This is called by the wx.Window destructor. Without this, the |
5889 | table of help strings will fill up and when window pointers are | |
5890 | reused, the wrong help string will be found. | |
15afbcd0 | 5891 | """ |
54f9ee45 | 5892 | return _controls_.HelpProvider_RemoveHelp(*args, **kwargs) |
15afbcd0 | 5893 | |
e811c8ce | 5894 | def Destroy(*args, **kwargs): |
a95a7133 | 5895 | """Destroy(self)""" |
54f9ee45 | 5896 | return _controls_.HelpProvider_Destroy(*args, **kwargs) |
e811c8ce | 5897 | |
d14a1e28 RD |
5898 | |
5899 | class HelpProviderPtr(HelpProvider): | |
5900 | def __init__(self, this): | |
5901 | self.this = this | |
5902 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5903 | self.__class__ = HelpProvider | |
54f9ee45 | 5904 | _controls_.HelpProvider_swigregister(HelpProviderPtr) |
d14a1e28 | 5905 | |
e811c8ce | 5906 | def HelpProvider_Set(*args, **kwargs): |
15afbcd0 RD |
5907 | """ |
5908 | HelpProvider_Set(HelpProvider helpProvider) -> HelpProvider | |
5909 | ||
41e2b43e RD |
5910 | Sset the current, application-wide help provider. Returns the previous |
5911 | one. Unlike some other classes, the help provider is not created on | |
5912 | demand. This must be explicitly done by the application. | |
15afbcd0 | 5913 | """ |
54f9ee45 | 5914 | return _controls_.HelpProvider_Set(*args, **kwargs) |
7a9b33db | 5915 | |
e811c8ce | 5916 | def HelpProvider_Get(*args, **kwargs): |
15afbcd0 RD |
5917 | """ |
5918 | HelpProvider_Get() -> HelpProvider | |
5919 | ||
5920 | Return the current application-wide help provider. | |
5921 | """ | |
54f9ee45 | 5922 | return _controls_.HelpProvider_Get(*args, **kwargs) |
d14a1e28 RD |
5923 | |
5924 | class SimpleHelpProvider(HelpProvider): | |
15afbcd0 | 5925 | """ |
41e2b43e RD |
5926 | wx.SimpleHelpProvider is an implementation of `wx.HelpProvider` which |
5927 | supports only plain text help strings, and shows the string associated | |
5928 | with the control (if any) in a tooltip. | |
15afbcd0 | 5929 | """ |
e811c8ce RD |
5930 | def __repr__(self): |
5931 | return "<%s.%s; proxy of C++ wxSimpleHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5932 | def __init__(self, *args, **kwargs): |
15afbcd0 | 5933 | """ |
a95a7133 | 5934 | __init__(self) -> SimpleHelpProvider |
15afbcd0 | 5935 | |
41e2b43e RD |
5936 | wx.SimpleHelpProvider is an implementation of `wx.HelpProvider` which |
5937 | supports only plain text help strings, and shows the string associated | |
5938 | with the control (if any) in a tooltip. | |
15afbcd0 | 5939 | """ |
54f9ee45 | 5940 | newobj = _controls_.new_SimpleHelpProvider(*args, **kwargs) |
d14a1e28 RD |
5941 | self.this = newobj.this |
5942 | self.thisown = 1 | |
5943 | del newobj.thisown | |
d14a1e28 RD |
5944 | |
5945 | class SimpleHelpProviderPtr(SimpleHelpProvider): | |
5946 | def __init__(self, this): | |
5947 | self.this = this | |
5948 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5949 | self.__class__ = SimpleHelpProvider | |
54f9ee45 | 5950 | _controls_.SimpleHelpProvider_swigregister(SimpleHelpProviderPtr) |
70551f47 | 5951 | |
e811c8ce RD |
5952 | #--------------------------------------------------------------------------- |
5953 | ||
54f9ee45 | 5954 | class DragImage(_core.Object): |
e811c8ce RD |
5955 | def __repr__(self): |
5956 | return "<%s.%s; proxy of C++ wxGenericDragImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5957 | def __init__(self, *args, **kwargs): | |
a95a7133 | 5958 | """__init__(self, Bitmap image, Cursor cursor=wxNullCursor) -> DragImage""" |
54f9ee45 | 5959 | newobj = _controls_.new_DragImage(*args, **kwargs) |
e811c8ce RD |
5960 | self.this = newobj.this |
5961 | self.thisown = 1 | |
5962 | del newobj.thisown | |
54f9ee45 | 5963 | def __del__(self, destroy=_controls_.delete_DragImage): |
a95a7133 | 5964 | """__del__(self)""" |
e811c8ce RD |
5965 | try: |
5966 | if self.thisown: destroy(self) | |
5967 | except: pass | |
5968 | ||
5969 | def SetBackingBitmap(*args, **kwargs): | |
a95a7133 | 5970 | """SetBackingBitmap(self, Bitmap bitmap)""" |
54f9ee45 | 5971 | return _controls_.DragImage_SetBackingBitmap(*args, **kwargs) |
e811c8ce RD |
5972 | |
5973 | def BeginDrag(*args, **kwargs): | |
0df68c9f | 5974 | """ |
a95a7133 | 5975 | BeginDrag(self, Point hotspot, Window window, bool fullScreen=False, |
0df68c9f RD |
5976 | Rect rect=None) -> bool |
5977 | """ | |
54f9ee45 | 5978 | return _controls_.DragImage_BeginDrag(*args, **kwargs) |
e811c8ce RD |
5979 | |
5980 | def BeginDragBounded(*args, **kwargs): | |
a95a7133 | 5981 | """BeginDragBounded(self, Point hotspot, Window window, Window boundingWindow) -> bool""" |
54f9ee45 | 5982 | return _controls_.DragImage_BeginDragBounded(*args, **kwargs) |
e811c8ce RD |
5983 | |
5984 | def EndDrag(*args, **kwargs): | |
a95a7133 | 5985 | """EndDrag(self) -> bool""" |
54f9ee45 | 5986 | return _controls_.DragImage_EndDrag(*args, **kwargs) |
e811c8ce RD |
5987 | |
5988 | def Move(*args, **kwargs): | |
a95a7133 | 5989 | """Move(self, Point pt) -> bool""" |
54f9ee45 | 5990 | return _controls_.DragImage_Move(*args, **kwargs) |
e811c8ce RD |
5991 | |
5992 | def Show(*args, **kwargs): | |
a95a7133 | 5993 | """Show(self) -> bool""" |
54f9ee45 | 5994 | return _controls_.DragImage_Show(*args, **kwargs) |
e811c8ce RD |
5995 | |
5996 | def Hide(*args, **kwargs): | |
a95a7133 | 5997 | """Hide(self) -> bool""" |
54f9ee45 | 5998 | return _controls_.DragImage_Hide(*args, **kwargs) |
e811c8ce RD |
5999 | |
6000 | def GetImageRect(*args, **kwargs): | |
a95a7133 | 6001 | """GetImageRect(self, Point pos) -> Rect""" |
54f9ee45 | 6002 | return _controls_.DragImage_GetImageRect(*args, **kwargs) |
e811c8ce RD |
6003 | |
6004 | def DoDrawImage(*args, **kwargs): | |
a95a7133 | 6005 | """DoDrawImage(self, DC dc, Point pos) -> bool""" |
54f9ee45 | 6006 | return _controls_.DragImage_DoDrawImage(*args, **kwargs) |
e811c8ce RD |
6007 | |
6008 | def UpdateBackingFromWindow(*args, **kwargs): | |
a95a7133 | 6009 | """UpdateBackingFromWindow(self, DC windowDC, MemoryDC destDC, Rect sourceRect, Rect destRect) -> bool""" |
54f9ee45 | 6010 | return _controls_.DragImage_UpdateBackingFromWindow(*args, **kwargs) |
e811c8ce RD |
6011 | |
6012 | def RedrawImage(*args, **kwargs): | |
a95a7133 | 6013 | """RedrawImage(self, Point oldPos, Point newPos, bool eraseOld, bool drawNew) -> bool""" |
54f9ee45 | 6014 | return _controls_.DragImage_RedrawImage(*args, **kwargs) |
e811c8ce RD |
6015 | |
6016 | ||
6017 | class DragImagePtr(DragImage): | |
6018 | def __init__(self, this): | |
6019 | self.this = this | |
6020 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6021 | self.__class__ = DragImage | |
54f9ee45 | 6022 | _controls_.DragImage_swigregister(DragImagePtr) |
e811c8ce RD |
6023 | |
6024 | def DragIcon(*args, **kwargs): | |
b2dc1044 | 6025 | """DragIcon(Icon image, Cursor cursor=wxNullCursor) -> DragImage""" |
54f9ee45 | 6026 | val = _controls_.new_DragIcon(*args, **kwargs) |
e811c8ce RD |
6027 | val.thisown = 1 |
6028 | return val | |
6029 | ||
6030 | def DragString(*args, **kwargs): | |
196addbf | 6031 | """DragString(String str, Cursor cursor=wxNullCursor) -> DragImage""" |
54f9ee45 | 6032 | val = _controls_.new_DragString(*args, **kwargs) |
e811c8ce RD |
6033 | val.thisown = 1 |
6034 | return val | |
6035 | ||
6036 | def DragTreeItem(*args, **kwargs): | |
6037 | """DragTreeItem(TreeCtrl treeCtrl, TreeItemId id) -> DragImage""" | |
54f9ee45 | 6038 | val = _controls_.new_DragTreeItem(*args, **kwargs) |
e811c8ce RD |
6039 | val.thisown = 1 |
6040 | return val | |
6041 | ||
6042 | def DragListItem(*args, **kwargs): | |
6043 | """DragListItem(ListCtrl listCtrl, long id) -> DragImage""" | |
54f9ee45 | 6044 | val = _controls_.new_DragListItem(*args, **kwargs) |
e811c8ce RD |
6045 | val.thisown = 1 |
6046 | return val | |
6047 | ||
70551f47 | 6048 |