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