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