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