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