]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/gtk/_controls.py
A little cleanup
[wxWidgets.git] / wxPython / src / gtk / _controls.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _controls_
5
6 import _core
7 wx = _core
8 #---------------------------------------------------------------------------
9
10 BU_LEFT = _controls_.BU_LEFT
11 BU_TOP = _controls_.BU_TOP
12 BU_RIGHT = _controls_.BU_RIGHT
13 BU_BOTTOM = _controls_.BU_BOTTOM
14 BU_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 GetItemHeight(*args, **kwargs):
1470 """GetItemHeight(self) -> int"""
1471 return _controls_.CheckListBox_GetItemHeight(*args, **kwargs)
1472
1473 def HitTest(*args, **kwargs):
1474 """
1475 HitTest(self, Point pt) -> int
1476
1477 Test where the given (in client coords) point lies
1478 """
1479 return _controls_.CheckListBox_HitTest(*args, **kwargs)
1480
1481 def HitTestXY(*args, **kwargs):
1482 """
1483 HitTestXY(self, int x, int y) -> int
1484
1485 Test where the given (in client coords) point lies
1486 """
1487 return _controls_.CheckListBox_HitTestXY(*args, **kwargs)
1488
1489
1490 class CheckListBoxPtr(CheckListBox):
1491 def __init__(self, this):
1492 self.this = this
1493 if not hasattr(self,"thisown"): self.thisown = 0
1494 self.__class__ = CheckListBox
1495 _controls_.CheckListBox_swigregister(CheckListBoxPtr)
1496
1497 def PreCheckListBox(*args, **kwargs):
1498 """PreCheckListBox() -> CheckListBox"""
1499 val = _controls_.new_PreCheckListBox(*args, **kwargs)
1500 val.thisown = 1
1501 return val
1502
1503 #---------------------------------------------------------------------------
1504
1505 TE_NO_VSCROLL = _controls_.TE_NO_VSCROLL
1506 TE_AUTO_SCROLL = _controls_.TE_AUTO_SCROLL
1507 TE_READONLY = _controls_.TE_READONLY
1508 TE_MULTILINE = _controls_.TE_MULTILINE
1509 TE_PROCESS_TAB = _controls_.TE_PROCESS_TAB
1510 TE_LEFT = _controls_.TE_LEFT
1511 TE_CENTER = _controls_.TE_CENTER
1512 TE_RIGHT = _controls_.TE_RIGHT
1513 TE_CENTRE = _controls_.TE_CENTRE
1514 TE_RICH = _controls_.TE_RICH
1515 TE_PROCESS_ENTER = _controls_.TE_PROCESS_ENTER
1516 TE_PASSWORD = _controls_.TE_PASSWORD
1517 TE_AUTO_URL = _controls_.TE_AUTO_URL
1518 TE_NOHIDESEL = _controls_.TE_NOHIDESEL
1519 TE_DONTWRAP = _controls_.TE_DONTWRAP
1520 TE_LINEWRAP = _controls_.TE_LINEWRAP
1521 TE_WORDWRAP = _controls_.TE_WORDWRAP
1522 TE_RICH2 = _controls_.TE_RICH2
1523 TEXT_ALIGNMENT_DEFAULT = _controls_.TEXT_ALIGNMENT_DEFAULT
1524 TEXT_ALIGNMENT_LEFT = _controls_.TEXT_ALIGNMENT_LEFT
1525 TEXT_ALIGNMENT_CENTRE = _controls_.TEXT_ALIGNMENT_CENTRE
1526 TEXT_ALIGNMENT_CENTER = _controls_.TEXT_ALIGNMENT_CENTER
1527 TEXT_ALIGNMENT_RIGHT = _controls_.TEXT_ALIGNMENT_RIGHT
1528 TEXT_ALIGNMENT_JUSTIFIED = _controls_.TEXT_ALIGNMENT_JUSTIFIED
1529 TEXT_ATTR_TEXT_COLOUR = _controls_.TEXT_ATTR_TEXT_COLOUR
1530 TEXT_ATTR_BACKGROUND_COLOUR = _controls_.TEXT_ATTR_BACKGROUND_COLOUR
1531 TEXT_ATTR_FONT_FACE = _controls_.TEXT_ATTR_FONT_FACE
1532 TEXT_ATTR_FONT_SIZE = _controls_.TEXT_ATTR_FONT_SIZE
1533 TEXT_ATTR_FONT_WEIGHT = _controls_.TEXT_ATTR_FONT_WEIGHT
1534 TEXT_ATTR_FONT_ITALIC = _controls_.TEXT_ATTR_FONT_ITALIC
1535 TEXT_ATTR_FONT_UNDERLINE = _controls_.TEXT_ATTR_FONT_UNDERLINE
1536 TEXT_ATTR_FONT = _controls_.TEXT_ATTR_FONT
1537 TEXT_ATTR_ALIGNMENT = _controls_.TEXT_ATTR_ALIGNMENT
1538 TEXT_ATTR_LEFT_INDENT = _controls_.TEXT_ATTR_LEFT_INDENT
1539 TEXT_ATTR_RIGHT_INDENT = _controls_.TEXT_ATTR_RIGHT_INDENT
1540 TEXT_ATTR_TABS = _controls_.TEXT_ATTR_TABS
1541 TE_HT_UNKNOWN = _controls_.TE_HT_UNKNOWN
1542 TE_HT_BEFORE = _controls_.TE_HT_BEFORE
1543 TE_HT_ON_TEXT = _controls_.TE_HT_ON_TEXT
1544 TE_HT_BELOW = _controls_.TE_HT_BELOW
1545 TE_HT_BEYOND = _controls_.TE_HT_BEYOND
1546 class TextAttr(object):
1547 def __repr__(self):
1548 return "<%s.%s; proxy of C++ wxTextAttr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1549 def __init__(self, *args, **kwargs):
1550 """
1551 __init__(self, Colour colText=wxNullColour, Colour colBack=wxNullColour,
1552 Font font=wxNullFont, int alignment=TEXT_ALIGNMENT_DEFAULT) -> TextAttr
1553 """
1554 newobj = _controls_.new_TextAttr(*args, **kwargs)
1555 self.this = newobj.this
1556 self.thisown = 1
1557 del newobj.thisown
1558 def __del__(self, destroy=_controls_.delete_TextAttr):
1559 """__del__(self)"""
1560 try:
1561 if self.thisown: destroy(self)
1562 except: pass
1563
1564 def Init(*args, **kwargs):
1565 """Init(self)"""
1566 return _controls_.TextAttr_Init(*args, **kwargs)
1567
1568 def SetTextColour(*args, **kwargs):
1569 """SetTextColour(self, Colour colText)"""
1570 return _controls_.TextAttr_SetTextColour(*args, **kwargs)
1571
1572 def SetBackgroundColour(*args, **kwargs):
1573 """SetBackgroundColour(self, Colour colBack)"""
1574 return _controls_.TextAttr_SetBackgroundColour(*args, **kwargs)
1575
1576 def SetFont(*args, **kwargs):
1577 """SetFont(self, Font font, long flags=TEXT_ATTR_FONT)"""
1578 return _controls_.TextAttr_SetFont(*args, **kwargs)
1579
1580 def SetAlignment(*args, **kwargs):
1581 """SetAlignment(self, int alignment)"""
1582 return _controls_.TextAttr_SetAlignment(*args, **kwargs)
1583
1584 def SetTabs(*args, **kwargs):
1585 """SetTabs(self, wxArrayInt tabs)"""
1586 return _controls_.TextAttr_SetTabs(*args, **kwargs)
1587
1588 def SetLeftIndent(*args, **kwargs):
1589 """SetLeftIndent(self, int indent, int subIndent=0)"""
1590 return _controls_.TextAttr_SetLeftIndent(*args, **kwargs)
1591
1592 def SetRightIndent(*args, **kwargs):
1593 """SetRightIndent(self, int indent)"""
1594 return _controls_.TextAttr_SetRightIndent(*args, **kwargs)
1595
1596 def SetFlags(*args, **kwargs):
1597 """SetFlags(self, long flags)"""
1598 return _controls_.TextAttr_SetFlags(*args, **kwargs)
1599
1600 def HasTextColour(*args, **kwargs):
1601 """HasTextColour(self) -> bool"""
1602 return _controls_.TextAttr_HasTextColour(*args, **kwargs)
1603
1604 def HasBackgroundColour(*args, **kwargs):
1605 """HasBackgroundColour(self) -> bool"""
1606 return _controls_.TextAttr_HasBackgroundColour(*args, **kwargs)
1607
1608 def HasFont(*args, **kwargs):
1609 """HasFont(self) -> bool"""
1610 return _controls_.TextAttr_HasFont(*args, **kwargs)
1611
1612 def HasAlignment(*args, **kwargs):
1613 """HasAlignment(self) -> bool"""
1614 return _controls_.TextAttr_HasAlignment(*args, **kwargs)
1615
1616 def HasTabs(*args, **kwargs):
1617 """HasTabs(self) -> bool"""
1618 return _controls_.TextAttr_HasTabs(*args, **kwargs)
1619
1620 def HasLeftIndent(*args, **kwargs):
1621 """HasLeftIndent(self) -> bool"""
1622 return _controls_.TextAttr_HasLeftIndent(*args, **kwargs)
1623
1624 def HasRightIndent(*args, **kwargs):
1625 """HasRightIndent(self) -> bool"""
1626 return _controls_.TextAttr_HasRightIndent(*args, **kwargs)
1627
1628 def HasFlag(*args, **kwargs):
1629 """HasFlag(self, long flag) -> bool"""
1630 return _controls_.TextAttr_HasFlag(*args, **kwargs)
1631
1632 def GetTextColour(*args, **kwargs):
1633 """GetTextColour(self) -> Colour"""
1634 return _controls_.TextAttr_GetTextColour(*args, **kwargs)
1635
1636 def GetBackgroundColour(*args, **kwargs):
1637 """GetBackgroundColour(self) -> Colour"""
1638 return _controls_.TextAttr_GetBackgroundColour(*args, **kwargs)
1639
1640 def GetFont(*args, **kwargs):
1641 """GetFont(self) -> Font"""
1642 return _controls_.TextAttr_GetFont(*args, **kwargs)
1643
1644 def GetAlignment(*args, **kwargs):
1645 """GetAlignment(self) -> int"""
1646 return _controls_.TextAttr_GetAlignment(*args, **kwargs)
1647
1648 def GetTabs(*args, **kwargs):
1649 """GetTabs(self) -> wxArrayInt"""
1650 return _controls_.TextAttr_GetTabs(*args, **kwargs)
1651
1652 def GetLeftIndent(*args, **kwargs):
1653 """GetLeftIndent(self) -> long"""
1654 return _controls_.TextAttr_GetLeftIndent(*args, **kwargs)
1655
1656 def GetLeftSubIndent(*args, **kwargs):
1657 """GetLeftSubIndent(self) -> long"""
1658 return _controls_.TextAttr_GetLeftSubIndent(*args, **kwargs)
1659
1660 def GetRightIndent(*args, **kwargs):
1661 """GetRightIndent(self) -> long"""
1662 return _controls_.TextAttr_GetRightIndent(*args, **kwargs)
1663
1664 def GetFlags(*args, **kwargs):
1665 """GetFlags(self) -> long"""
1666 return _controls_.TextAttr_GetFlags(*args, **kwargs)
1667
1668 def IsDefault(*args, **kwargs):
1669 """IsDefault(self) -> bool"""
1670 return _controls_.TextAttr_IsDefault(*args, **kwargs)
1671
1672 def Combine(*args, **kwargs):
1673 """Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr"""
1674 return _controls_.TextAttr_Combine(*args, **kwargs)
1675
1676 Combine = staticmethod(Combine)
1677
1678 class TextAttrPtr(TextAttr):
1679 def __init__(self, this):
1680 self.this = this
1681 if not hasattr(self,"thisown"): self.thisown = 0
1682 self.__class__ = TextAttr
1683 _controls_.TextAttr_swigregister(TextAttrPtr)
1684 TextCtrlNameStr = cvar.TextCtrlNameStr
1685
1686 def TextAttr_Combine(*args, **kwargs):
1687 """TextAttr_Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr"""
1688 return _controls_.TextAttr_Combine(*args, **kwargs)
1689
1690 class TextCtrl(_core.Control):
1691 def __repr__(self):
1692 return "<%s.%s; proxy of C++ wxTextCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1693 def __init__(self, *args, **kwargs):
1694 """
1695 __init__(self, Window parent, int id=-1, String value=EmptyString,
1696 Point pos=DefaultPosition, Size size=DefaultSize,
1697 long style=0, Validator validator=DefaultValidator,
1698 String name=TextCtrlNameStr) -> TextCtrl
1699 """
1700 newobj = _controls_.new_TextCtrl(*args, **kwargs)
1701 self.this = newobj.this
1702 self.thisown = 1
1703 del newobj.thisown
1704 self._setOORInfo(self)
1705
1706 def Create(*args, **kwargs):
1707 """
1708 Create(self, Window parent, int id=-1, String value=EmptyString,
1709 Point pos=DefaultPosition, Size size=DefaultSize,
1710 long style=0, Validator validator=DefaultValidator,
1711 String name=TextCtrlNameStr) -> bool
1712 """
1713 return _controls_.TextCtrl_Create(*args, **kwargs)
1714
1715 def GetValue(*args, **kwargs):
1716 """GetValue(self) -> String"""
1717 return _controls_.TextCtrl_GetValue(*args, **kwargs)
1718
1719 def SetValue(*args, **kwargs):
1720 """SetValue(self, String value)"""
1721 return _controls_.TextCtrl_SetValue(*args, **kwargs)
1722
1723 def GetRange(*args, **kwargs):
1724 """GetRange(self, long from, long to) -> String"""
1725 return _controls_.TextCtrl_GetRange(*args, **kwargs)
1726
1727 def GetLineLength(*args, **kwargs):
1728 """GetLineLength(self, long lineNo) -> int"""
1729 return _controls_.TextCtrl_GetLineLength(*args, **kwargs)
1730
1731 def GetLineText(*args, **kwargs):
1732 """GetLineText(self, long lineNo) -> String"""
1733 return _controls_.TextCtrl_GetLineText(*args, **kwargs)
1734
1735 def GetNumberOfLines(*args, **kwargs):
1736 """GetNumberOfLines(self) -> int"""
1737 return _controls_.TextCtrl_GetNumberOfLines(*args, **kwargs)
1738
1739 def IsModified(*args, **kwargs):
1740 """IsModified(self) -> bool"""
1741 return _controls_.TextCtrl_IsModified(*args, **kwargs)
1742
1743 def IsEditable(*args, **kwargs):
1744 """IsEditable(self) -> bool"""
1745 return _controls_.TextCtrl_IsEditable(*args, **kwargs)
1746
1747 def IsSingleLine(*args, **kwargs):
1748 """IsSingleLine(self) -> bool"""
1749 return _controls_.TextCtrl_IsSingleLine(*args, **kwargs)
1750
1751 def IsMultiLine(*args, **kwargs):
1752 """IsMultiLine(self) -> bool"""
1753 return _controls_.TextCtrl_IsMultiLine(*args, **kwargs)
1754
1755 def GetSelection(*args, **kwargs):
1756 """
1757 GetSelection() -> (from, to)
1758
1759 If the return values from and to are the same, there is no selection.
1760 """
1761 return _controls_.TextCtrl_GetSelection(*args, **kwargs)
1762
1763 def GetStringSelection(*args, **kwargs):
1764 """GetStringSelection(self) -> String"""
1765 return _controls_.TextCtrl_GetStringSelection(*args, **kwargs)
1766
1767 def Clear(*args, **kwargs):
1768 """Clear(self)"""
1769 return _controls_.TextCtrl_Clear(*args, **kwargs)
1770
1771 def Replace(*args, **kwargs):
1772 """Replace(self, long from, long to, String value)"""
1773 return _controls_.TextCtrl_Replace(*args, **kwargs)
1774
1775 def Remove(*args, **kwargs):
1776 """Remove(self, long from, long to)"""
1777 return _controls_.TextCtrl_Remove(*args, **kwargs)
1778
1779 def LoadFile(*args, **kwargs):
1780 """LoadFile(self, String file) -> bool"""
1781 return _controls_.TextCtrl_LoadFile(*args, **kwargs)
1782
1783 def SaveFile(*args, **kwargs):
1784 """SaveFile(self, String file=EmptyString) -> bool"""
1785 return _controls_.TextCtrl_SaveFile(*args, **kwargs)
1786
1787 def MarkDirty(*args, **kwargs):
1788 """MarkDirty(self)"""
1789 return _controls_.TextCtrl_MarkDirty(*args, **kwargs)
1790
1791 def DiscardEdits(*args, **kwargs):
1792 """DiscardEdits(self)"""
1793 return _controls_.TextCtrl_DiscardEdits(*args, **kwargs)
1794
1795 def SetMaxLength(*args, **kwargs):
1796 """SetMaxLength(self, unsigned long len)"""
1797 return _controls_.TextCtrl_SetMaxLength(*args, **kwargs)
1798
1799 def WriteText(*args, **kwargs):
1800 """WriteText(self, String text)"""
1801 return _controls_.TextCtrl_WriteText(*args, **kwargs)
1802
1803 def AppendText(*args, **kwargs):
1804 """AppendText(self, String text)"""
1805 return _controls_.TextCtrl_AppendText(*args, **kwargs)
1806
1807 def EmulateKeyPress(*args, **kwargs):
1808 """EmulateKeyPress(self, KeyEvent event) -> bool"""
1809 return _controls_.TextCtrl_EmulateKeyPress(*args, **kwargs)
1810
1811 def SetStyle(*args, **kwargs):
1812 """SetStyle(self, long start, long end, TextAttr style) -> bool"""
1813 return _controls_.TextCtrl_SetStyle(*args, **kwargs)
1814
1815 def GetStyle(*args, **kwargs):
1816 """GetStyle(self, long position, TextAttr style) -> bool"""
1817 return _controls_.TextCtrl_GetStyle(*args, **kwargs)
1818
1819 def SetDefaultStyle(*args, **kwargs):
1820 """SetDefaultStyle(self, TextAttr style) -> bool"""
1821 return _controls_.TextCtrl_SetDefaultStyle(*args, **kwargs)
1822
1823 def GetDefaultStyle(*args, **kwargs):
1824 """GetDefaultStyle(self) -> TextAttr"""
1825 return _controls_.TextCtrl_GetDefaultStyle(*args, **kwargs)
1826
1827 def XYToPosition(*args, **kwargs):
1828 """XYToPosition(self, long x, long y) -> long"""
1829 return _controls_.TextCtrl_XYToPosition(*args, **kwargs)
1830
1831 def PositionToXY(*args, **kwargs):
1832 """PositionToXY(long pos) -> (x, y)"""
1833 return _controls_.TextCtrl_PositionToXY(*args, **kwargs)
1834
1835 def ShowPosition(*args, **kwargs):
1836 """ShowPosition(self, long pos)"""
1837 return _controls_.TextCtrl_ShowPosition(*args, **kwargs)
1838
1839 def HitTest(*args, **kwargs):
1840 """
1841 HitTest(Point pt) -> (result, row, col)
1842
1843 Find the row, col coresponding to the character at the point given in
1844 pixels. NB: pt is in device coords but is not adjusted for the client
1845 area origin nor scrolling.
1846 """
1847 return _controls_.TextCtrl_HitTest(*args, **kwargs)
1848
1849 def HitTestPos(*args, **kwargs):
1850 """
1851 HitTestPos(Point pt) -> (result, position)
1852
1853 Find the character position in the text coresponding to the point
1854 given in pixels. NB: pt is in device coords but is not adjusted for
1855 the client area origin nor scrolling.
1856 """
1857 return _controls_.TextCtrl_HitTestPos(*args, **kwargs)
1858
1859 def Copy(*args, **kwargs):
1860 """Copy(self)"""
1861 return _controls_.TextCtrl_Copy(*args, **kwargs)
1862
1863 def Cut(*args, **kwargs):
1864 """Cut(self)"""
1865 return _controls_.TextCtrl_Cut(*args, **kwargs)
1866
1867 def Paste(*args, **kwargs):
1868 """Paste(self)"""
1869 return _controls_.TextCtrl_Paste(*args, **kwargs)
1870
1871 def CanCopy(*args, **kwargs):
1872 """CanCopy(self) -> bool"""
1873 return _controls_.TextCtrl_CanCopy(*args, **kwargs)
1874
1875 def CanCut(*args, **kwargs):
1876 """CanCut(self) -> bool"""
1877 return _controls_.TextCtrl_CanCut(*args, **kwargs)
1878
1879 def CanPaste(*args, **kwargs):
1880 """CanPaste(self) -> bool"""
1881 return _controls_.TextCtrl_CanPaste(*args, **kwargs)
1882
1883 def Undo(*args, **kwargs):
1884 """Undo(self)"""
1885 return _controls_.TextCtrl_Undo(*args, **kwargs)
1886
1887 def Redo(*args, **kwargs):
1888 """Redo(self)"""
1889 return _controls_.TextCtrl_Redo(*args, **kwargs)
1890
1891 def CanUndo(*args, **kwargs):
1892 """CanUndo(self) -> bool"""
1893 return _controls_.TextCtrl_CanUndo(*args, **kwargs)
1894
1895 def CanRedo(*args, **kwargs):
1896 """CanRedo(self) -> bool"""
1897 return _controls_.TextCtrl_CanRedo(*args, **kwargs)
1898
1899 def SetInsertionPoint(*args, **kwargs):
1900 """SetInsertionPoint(self, long pos)"""
1901 return _controls_.TextCtrl_SetInsertionPoint(*args, **kwargs)
1902
1903 def SetInsertionPointEnd(*args, **kwargs):
1904 """SetInsertionPointEnd(self)"""
1905 return _controls_.TextCtrl_SetInsertionPointEnd(*args, **kwargs)
1906
1907 def GetInsertionPoint(*args, **kwargs):
1908 """GetInsertionPoint(self) -> long"""
1909 return _controls_.TextCtrl_GetInsertionPoint(*args, **kwargs)
1910
1911 def GetLastPosition(*args, **kwargs):
1912 """GetLastPosition(self) -> long"""
1913 return _controls_.TextCtrl_GetLastPosition(*args, **kwargs)
1914
1915 def SetSelection(*args, **kwargs):
1916 """SetSelection(self, long from, long to)"""
1917 return _controls_.TextCtrl_SetSelection(*args, **kwargs)
1918
1919 def SelectAll(*args, **kwargs):
1920 """SelectAll(self)"""
1921 return _controls_.TextCtrl_SelectAll(*args, **kwargs)
1922
1923 def SetEditable(*args, **kwargs):
1924 """SetEditable(self, bool editable)"""
1925 return _controls_.TextCtrl_SetEditable(*args, **kwargs)
1926
1927 def write(*args, **kwargs):
1928 """write(self, String text)"""
1929 return _controls_.TextCtrl_write(*args, **kwargs)
1930
1931 def GetString(*args, **kwargs):
1932 """GetString(self, long from, long to) -> String"""
1933 return _controls_.TextCtrl_GetString(*args, **kwargs)
1934
1935 def GetClassDefaultAttributes(*args, **kwargs):
1936 """
1937 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
1938
1939 Get the default attributes for this class. This is useful if you want
1940 to use the same font or colour in your own control as in a standard
1941 control -- which is a much better idea than hard coding specific
1942 colours or fonts which might look completely out of place on the
1943 user's system, especially if it uses themes.
1944
1945 The variant parameter is only relevant under Mac currently and is
1946 ignore under other platforms. Under Mac, it will change the size of
1947 the returned font. See `wx.Window.SetWindowVariant` for more about
1948 this.
1949 """
1950 return _controls_.TextCtrl_GetClassDefaultAttributes(*args, **kwargs)
1951
1952 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
1953
1954 class TextCtrlPtr(TextCtrl):
1955 def __init__(self, this):
1956 self.this = this
1957 if not hasattr(self,"thisown"): self.thisown = 0
1958 self.__class__ = TextCtrl
1959 _controls_.TextCtrl_swigregister(TextCtrlPtr)
1960
1961 def PreTextCtrl(*args, **kwargs):
1962 """PreTextCtrl() -> TextCtrl"""
1963 val = _controls_.new_PreTextCtrl(*args, **kwargs)
1964 val.thisown = 1
1965 return val
1966
1967 def TextCtrl_GetClassDefaultAttributes(*args, **kwargs):
1968 """
1969 TextCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
1970
1971 Get the default attributes for this class. This is useful if you want
1972 to use the same font or colour in your own control as in a standard
1973 control -- which is a much better idea than hard coding specific
1974 colours or fonts which might look completely out of place on the
1975 user's system, especially if it uses themes.
1976
1977 The variant parameter is only relevant under Mac currently and is
1978 ignore under other platforms. Under Mac, it will change the size of
1979 the returned font. See `wx.Window.SetWindowVariant` for more about
1980 this.
1981 """
1982 return _controls_.TextCtrl_GetClassDefaultAttributes(*args, **kwargs)
1983
1984 wxEVT_COMMAND_TEXT_UPDATED = _controls_.wxEVT_COMMAND_TEXT_UPDATED
1985 wxEVT_COMMAND_TEXT_ENTER = _controls_.wxEVT_COMMAND_TEXT_ENTER
1986 wxEVT_COMMAND_TEXT_URL = _controls_.wxEVT_COMMAND_TEXT_URL
1987 wxEVT_COMMAND_TEXT_MAXLEN = _controls_.wxEVT_COMMAND_TEXT_MAXLEN
1988 class TextUrlEvent(_core.CommandEvent):
1989 def __repr__(self):
1990 return "<%s.%s; proxy of C++ wxTextUrlEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1991 def __init__(self, *args, **kwargs):
1992 """__init__(self, int winid, MouseEvent evtMouse, long start, long end) -> TextUrlEvent"""
1993 newobj = _controls_.new_TextUrlEvent(*args, **kwargs)
1994 self.this = newobj.this
1995 self.thisown = 1
1996 del newobj.thisown
1997 def GetMouseEvent(*args, **kwargs):
1998 """GetMouseEvent(self) -> MouseEvent"""
1999 return _controls_.TextUrlEvent_GetMouseEvent(*args, **kwargs)
2000
2001 def GetURLStart(*args, **kwargs):
2002 """GetURLStart(self) -> long"""
2003 return _controls_.TextUrlEvent_GetURLStart(*args, **kwargs)
2004
2005 def GetURLEnd(*args, **kwargs):
2006 """GetURLEnd(self) -> long"""
2007 return _controls_.TextUrlEvent_GetURLEnd(*args, **kwargs)
2008
2009
2010 class TextUrlEventPtr(TextUrlEvent):
2011 def __init__(self, this):
2012 self.this = this
2013 if not hasattr(self,"thisown"): self.thisown = 0
2014 self.__class__ = TextUrlEvent
2015 _controls_.TextUrlEvent_swigregister(TextUrlEventPtr)
2016
2017 EVT_TEXT = wx.PyEventBinder( wxEVT_COMMAND_TEXT_UPDATED, 1)
2018 EVT_TEXT_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TEXT_ENTER, 1)
2019 EVT_TEXT_URL = wx.PyEventBinder( wxEVT_COMMAND_TEXT_URL, 1)
2020 EVT_TEXT_MAXLEN = wx.PyEventBinder( wxEVT_COMMAND_TEXT_MAXLEN, 1)
2021
2022 #---------------------------------------------------------------------------
2023
2024 class ScrollBar(_core.Control):
2025 def __repr__(self):
2026 return "<%s.%s; proxy of C++ wxScrollBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2027 def __init__(self, *args, **kwargs):
2028 """
2029 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
2030 Size size=DefaultSize, long style=SB_HORIZONTAL,
2031 Validator validator=DefaultValidator, String name=ScrollBarNameStr) -> ScrollBar
2032 """
2033 newobj = _controls_.new_ScrollBar(*args, **kwargs)
2034 self.this = newobj.this
2035 self.thisown = 1
2036 del newobj.thisown
2037 self._setOORInfo(self)
2038
2039 def Create(*args, **kwargs):
2040 """
2041 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
2042 Size size=DefaultSize, long style=SB_HORIZONTAL,
2043 Validator validator=DefaultValidator, String name=ScrollBarNameStr) -> bool
2044
2045 Do the 2nd phase and create the GUI control.
2046 """
2047 return _controls_.ScrollBar_Create(*args, **kwargs)
2048
2049 def GetThumbPosition(*args, **kwargs):
2050 """GetThumbPosition(self) -> int"""
2051 return _controls_.ScrollBar_GetThumbPosition(*args, **kwargs)
2052
2053 def GetThumbSize(*args, **kwargs):
2054 """GetThumbSize(self) -> int"""
2055 return _controls_.ScrollBar_GetThumbSize(*args, **kwargs)
2056
2057 GetThumbLength = GetThumbSize
2058 def GetPageSize(*args, **kwargs):
2059 """GetPageSize(self) -> int"""
2060 return _controls_.ScrollBar_GetPageSize(*args, **kwargs)
2061
2062 def GetRange(*args, **kwargs):
2063 """GetRange(self) -> int"""
2064 return _controls_.ScrollBar_GetRange(*args, **kwargs)
2065
2066 def IsVertical(*args, **kwargs):
2067 """IsVertical(self) -> bool"""
2068 return _controls_.ScrollBar_IsVertical(*args, **kwargs)
2069
2070 def SetThumbPosition(*args, **kwargs):
2071 """SetThumbPosition(self, int viewStart)"""
2072 return _controls_.ScrollBar_SetThumbPosition(*args, **kwargs)
2073
2074 def SetScrollbar(*args, **kwargs):
2075 """
2076 SetScrollbar(self, int position, int thumbSize, int range, int pageSize,
2077 bool refresh=True)
2078
2079 Sets the scrollbar properties of a built-in scrollbar.
2080 """
2081 return _controls_.ScrollBar_SetScrollbar(*args, **kwargs)
2082
2083 def GetClassDefaultAttributes(*args, **kwargs):
2084 """
2085 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2086
2087 Get the default attributes for this class. This is useful if you want
2088 to use the same font or colour in your own control as in a standard
2089 control -- which is a much better idea than hard coding specific
2090 colours or fonts which might look completely out of place on the
2091 user's system, especially if it uses themes.
2092
2093 The variant parameter is only relevant under Mac currently and is
2094 ignore under other platforms. Under Mac, it will change the size of
2095 the returned font. See `wx.Window.SetWindowVariant` for more about
2096 this.
2097 """
2098 return _controls_.ScrollBar_GetClassDefaultAttributes(*args, **kwargs)
2099
2100 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
2101
2102 class ScrollBarPtr(ScrollBar):
2103 def __init__(self, this):
2104 self.this = this
2105 if not hasattr(self,"thisown"): self.thisown = 0
2106 self.__class__ = ScrollBar
2107 _controls_.ScrollBar_swigregister(ScrollBarPtr)
2108 ScrollBarNameStr = cvar.ScrollBarNameStr
2109
2110 def PreScrollBar(*args, **kwargs):
2111 """PreScrollBar() -> ScrollBar"""
2112 val = _controls_.new_PreScrollBar(*args, **kwargs)
2113 val.thisown = 1
2114 return val
2115
2116 def ScrollBar_GetClassDefaultAttributes(*args, **kwargs):
2117 """
2118 ScrollBar_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2119
2120 Get the default attributes for this class. This is useful if you want
2121 to use the same font or colour in your own control as in a standard
2122 control -- which is a much better idea than hard coding specific
2123 colours or fonts which might look completely out of place on the
2124 user's system, especially if it uses themes.
2125
2126 The variant parameter is only relevant under Mac currently and is
2127 ignore under other platforms. Under Mac, it will change the size of
2128 the returned font. See `wx.Window.SetWindowVariant` for more about
2129 this.
2130 """
2131 return _controls_.ScrollBar_GetClassDefaultAttributes(*args, **kwargs)
2132
2133 #---------------------------------------------------------------------------
2134
2135 SP_HORIZONTAL = _controls_.SP_HORIZONTAL
2136 SP_VERTICAL = _controls_.SP_VERTICAL
2137 SP_ARROW_KEYS = _controls_.SP_ARROW_KEYS
2138 SP_WRAP = _controls_.SP_WRAP
2139 class SpinButton(_core.Control):
2140 def __repr__(self):
2141 return "<%s.%s; proxy of C++ wxSpinButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2142 def __init__(self, *args, **kwargs):
2143 """
2144 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
2145 Size size=DefaultSize, long style=SP_HORIZONTAL,
2146 String name=SPIN_BUTTON_NAME) -> SpinButton
2147 """
2148 newobj = _controls_.new_SpinButton(*args, **kwargs)
2149 self.this = newobj.this
2150 self.thisown = 1
2151 del newobj.thisown
2152 self._setOORInfo(self)
2153
2154 def Create(*args, **kwargs):
2155 """
2156 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
2157 Size size=DefaultSize, long style=SP_HORIZONTAL,
2158 String name=SPIN_BUTTON_NAME) -> bool
2159 """
2160 return _controls_.SpinButton_Create(*args, **kwargs)
2161
2162 def GetValue(*args, **kwargs):
2163 """GetValue(self) -> int"""
2164 return _controls_.SpinButton_GetValue(*args, **kwargs)
2165
2166 def GetMin(*args, **kwargs):
2167 """GetMin(self) -> int"""
2168 return _controls_.SpinButton_GetMin(*args, **kwargs)
2169
2170 def GetMax(*args, **kwargs):
2171 """GetMax(self) -> int"""
2172 return _controls_.SpinButton_GetMax(*args, **kwargs)
2173
2174 def SetValue(*args, **kwargs):
2175 """SetValue(self, int val)"""
2176 return _controls_.SpinButton_SetValue(*args, **kwargs)
2177
2178 def SetMin(*args, **kwargs):
2179 """SetMin(self, int minVal)"""
2180 return _controls_.SpinButton_SetMin(*args, **kwargs)
2181
2182 def SetMax(*args, **kwargs):
2183 """SetMax(self, int maxVal)"""
2184 return _controls_.SpinButton_SetMax(*args, **kwargs)
2185
2186 def SetRange(*args, **kwargs):
2187 """SetRange(self, int minVal, int maxVal)"""
2188 return _controls_.SpinButton_SetRange(*args, **kwargs)
2189
2190 def IsVertical(*args, **kwargs):
2191 """IsVertical(self) -> bool"""
2192 return _controls_.SpinButton_IsVertical(*args, **kwargs)
2193
2194 def GetClassDefaultAttributes(*args, **kwargs):
2195 """
2196 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2197
2198 Get the default attributes for this class. This is useful if you want
2199 to use the same font or colour in your own control as in a standard
2200 control -- which is a much better idea than hard coding specific
2201 colours or fonts which might look completely out of place on the
2202 user's system, especially if it uses themes.
2203
2204 The variant parameter is only relevant under Mac currently and is
2205 ignore under other platforms. Under Mac, it will change the size of
2206 the returned font. See `wx.Window.SetWindowVariant` for more about
2207 this.
2208 """
2209 return _controls_.SpinButton_GetClassDefaultAttributes(*args, **kwargs)
2210
2211 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
2212
2213 class SpinButtonPtr(SpinButton):
2214 def __init__(self, this):
2215 self.this = this
2216 if not hasattr(self,"thisown"): self.thisown = 0
2217 self.__class__ = SpinButton
2218 _controls_.SpinButton_swigregister(SpinButtonPtr)
2219 SPIN_BUTTON_NAME = cvar.SPIN_BUTTON_NAME
2220 SpinCtrlNameStr = cvar.SpinCtrlNameStr
2221
2222 def PreSpinButton(*args, **kwargs):
2223 """PreSpinButton() -> SpinButton"""
2224 val = _controls_.new_PreSpinButton(*args, **kwargs)
2225 val.thisown = 1
2226 return val
2227
2228 def SpinButton_GetClassDefaultAttributes(*args, **kwargs):
2229 """
2230 SpinButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2231
2232 Get the default attributes for this class. This is useful if you want
2233 to use the same font or colour in your own control as in a standard
2234 control -- which is a much better idea than hard coding specific
2235 colours or fonts which might look completely out of place on the
2236 user's system, especially if it uses themes.
2237
2238 The variant parameter is only relevant under Mac currently and is
2239 ignore under other platforms. Under Mac, it will change the size of
2240 the returned font. See `wx.Window.SetWindowVariant` for more about
2241 this.
2242 """
2243 return _controls_.SpinButton_GetClassDefaultAttributes(*args, **kwargs)
2244
2245 class SpinCtrl(_core.Control):
2246 def __repr__(self):
2247 return "<%s.%s; proxy of C++ wxSpinCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2248 def __init__(self, *args, **kwargs):
2249 """
2250 __init__(self, Window parent, int id=-1, String value=EmptyString,
2251 Point pos=DefaultPosition, Size size=DefaultSize,
2252 long style=SP_ARROW_KEYS, int min=0, int max=100,
2253 int initial=0, String name=SpinCtrlNameStr) -> SpinCtrl
2254 """
2255 newobj = _controls_.new_SpinCtrl(*args, **kwargs)
2256 self.this = newobj.this
2257 self.thisown = 1
2258 del newobj.thisown
2259 self._setOORInfo(self)
2260
2261 def Create(*args, **kwargs):
2262 """
2263 Create(self, Window parent, int id=-1, String value=EmptyString,
2264 Point pos=DefaultPosition, Size size=DefaultSize,
2265 long style=SP_ARROW_KEYS, int min=0, int max=100,
2266 int initial=0, String name=SpinCtrlNameStr) -> bool
2267 """
2268 return _controls_.SpinCtrl_Create(*args, **kwargs)
2269
2270 def GetValue(*args, **kwargs):
2271 """GetValue(self) -> int"""
2272 return _controls_.SpinCtrl_GetValue(*args, **kwargs)
2273
2274 def SetValue(*args, **kwargs):
2275 """SetValue(self, int value)"""
2276 return _controls_.SpinCtrl_SetValue(*args, **kwargs)
2277
2278 def SetValueString(*args, **kwargs):
2279 """SetValueString(self, String text)"""
2280 return _controls_.SpinCtrl_SetValueString(*args, **kwargs)
2281
2282 def SetRange(*args, **kwargs):
2283 """SetRange(self, int minVal, int maxVal)"""
2284 return _controls_.SpinCtrl_SetRange(*args, **kwargs)
2285
2286 def GetMin(*args, **kwargs):
2287 """GetMin(self) -> int"""
2288 return _controls_.SpinCtrl_GetMin(*args, **kwargs)
2289
2290 def GetMax(*args, **kwargs):
2291 """GetMax(self) -> int"""
2292 return _controls_.SpinCtrl_GetMax(*args, **kwargs)
2293
2294 def SetSelection(*args, **kwargs):
2295 """SetSelection(self, long from, long to)"""
2296 return _controls_.SpinCtrl_SetSelection(*args, **kwargs)
2297
2298 def GetClassDefaultAttributes(*args, **kwargs):
2299 """
2300 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2301
2302 Get the default attributes for this class. This is useful if you want
2303 to use the same font or colour in your own control as in a standard
2304 control -- which is a much better idea than hard coding specific
2305 colours or fonts which might look completely out of place on the
2306 user's system, especially if it uses themes.
2307
2308 The variant parameter is only relevant under Mac currently and is
2309 ignore under other platforms. Under Mac, it will change the size of
2310 the returned font. See `wx.Window.SetWindowVariant` for more about
2311 this.
2312 """
2313 return _controls_.SpinCtrl_GetClassDefaultAttributes(*args, **kwargs)
2314
2315 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
2316
2317 class SpinCtrlPtr(SpinCtrl):
2318 def __init__(self, this):
2319 self.this = this
2320 if not hasattr(self,"thisown"): self.thisown = 0
2321 self.__class__ = SpinCtrl
2322 _controls_.SpinCtrl_swigregister(SpinCtrlPtr)
2323
2324 def PreSpinCtrl(*args, **kwargs):
2325 """PreSpinCtrl() -> SpinCtrl"""
2326 val = _controls_.new_PreSpinCtrl(*args, **kwargs)
2327 val.thisown = 1
2328 return val
2329
2330 def SpinCtrl_GetClassDefaultAttributes(*args, **kwargs):
2331 """
2332 SpinCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2333
2334 Get the default attributes for this class. This is useful if you want
2335 to use the same font or colour in your own control as in a standard
2336 control -- which is a much better idea than hard coding specific
2337 colours or fonts which might look completely out of place on the
2338 user's system, especially if it uses themes.
2339
2340 The variant parameter is only relevant under Mac currently and is
2341 ignore under other platforms. Under Mac, it will change the size of
2342 the returned font. See `wx.Window.SetWindowVariant` for more about
2343 this.
2344 """
2345 return _controls_.SpinCtrl_GetClassDefaultAttributes(*args, **kwargs)
2346
2347 class SpinEvent(_core.NotifyEvent):
2348 def __repr__(self):
2349 return "<%s.%s; proxy of C++ wxSpinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2350 def __init__(self, *args, **kwargs):
2351 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> SpinEvent"""
2352 newobj = _controls_.new_SpinEvent(*args, **kwargs)
2353 self.this = newobj.this
2354 self.thisown = 1
2355 del newobj.thisown
2356 def GetPosition(*args, **kwargs):
2357 """GetPosition(self) -> int"""
2358 return _controls_.SpinEvent_GetPosition(*args, **kwargs)
2359
2360 def SetPosition(*args, **kwargs):
2361 """SetPosition(self, int pos)"""
2362 return _controls_.SpinEvent_SetPosition(*args, **kwargs)
2363
2364
2365 class SpinEventPtr(SpinEvent):
2366 def __init__(self, this):
2367 self.this = this
2368 if not hasattr(self,"thisown"): self.thisown = 0
2369 self.__class__ = SpinEvent
2370 _controls_.SpinEvent_swigregister(SpinEventPtr)
2371
2372 wxEVT_COMMAND_SPINCTRL_UPDATED = _controls_.wxEVT_COMMAND_SPINCTRL_UPDATED
2373 EVT_SPIN_UP = wx.PyEventBinder( wx.wxEVT_SCROLL_LINEUP, 1)
2374 EVT_SPIN_DOWN = wx.PyEventBinder( wx.wxEVT_SCROLL_LINEDOWN, 1)
2375 EVT_SPIN = wx.PyEventBinder( wx.wxEVT_SCROLL_THUMBTRACK, 1)
2376 EVT_SPINCTRL = wx.PyEventBinder( wxEVT_COMMAND_SPINCTRL_UPDATED, 1)
2377
2378 #---------------------------------------------------------------------------
2379
2380 class RadioBox(_core.Control):
2381 def __repr__(self):
2382 return "<%s.%s; proxy of C++ wxRadioBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2383 def __init__(self, *args, **kwargs):
2384 """
2385 __init__(self, Window parent, int id=-1, String label=EmptyString,
2386 Point pos=DefaultPosition, Size size=DefaultSize,
2387 wxArrayString choices=wxPyEmptyStringArray,
2388 int majorDimension=0, long style=RA_HORIZONTAL,
2389 Validator validator=DefaultValidator,
2390 String name=RadioBoxNameStr) -> RadioBox
2391 """
2392 if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
2393 newobj = _controls_.new_RadioBox(*args, **kwargs)
2394 self.this = newobj.this
2395 self.thisown = 1
2396 del newobj.thisown
2397 self._setOORInfo(self)
2398
2399 def Create(*args, **kwargs):
2400 """
2401 Create(self, Window parent, int id=-1, String label=EmptyString,
2402 Point pos=DefaultPosition, Size size=DefaultSize,
2403 wxArrayString choices=wxPyEmptyStringArray,
2404 int majorDimension=0, long style=RA_HORIZONTAL,
2405 Validator validator=DefaultValidator,
2406 String name=RadioBoxNameStr) -> bool
2407 """
2408 return _controls_.RadioBox_Create(*args, **kwargs)
2409
2410 def SetSelection(*args, **kwargs):
2411 """SetSelection(self, int n)"""
2412 return _controls_.RadioBox_SetSelection(*args, **kwargs)
2413
2414 def GetSelection(*args, **kwargs):
2415 """GetSelection(self) -> int"""
2416 return _controls_.RadioBox_GetSelection(*args, **kwargs)
2417
2418 def GetStringSelection(*args, **kwargs):
2419 """GetStringSelection(self) -> String"""
2420 return _controls_.RadioBox_GetStringSelection(*args, **kwargs)
2421
2422 def SetStringSelection(*args, **kwargs):
2423 """SetStringSelection(self, String s) -> bool"""
2424 return _controls_.RadioBox_SetStringSelection(*args, **kwargs)
2425
2426 def GetCount(*args, **kwargs):
2427 """GetCount(self) -> int"""
2428 return _controls_.RadioBox_GetCount(*args, **kwargs)
2429
2430 def FindString(*args, **kwargs):
2431 """FindString(self, String s) -> int"""
2432 return _controls_.RadioBox_FindString(*args, **kwargs)
2433
2434 def GetString(*args, **kwargs):
2435 """GetString(self, int n) -> String"""
2436 return _controls_.RadioBox_GetString(*args, **kwargs)
2437
2438 def SetString(*args, **kwargs):
2439 """SetString(self, int n, String label)"""
2440 return _controls_.RadioBox_SetString(*args, **kwargs)
2441
2442 GetItemLabel = GetString
2443 SetItemLabel = SetString
2444 def EnableItem(*args, **kwargs):
2445 """EnableItem(self, int n, bool enable=True)"""
2446 return _controls_.RadioBox_EnableItem(*args, **kwargs)
2447
2448 def ShowItem(*args, **kwargs):
2449 """ShowItem(self, int n, bool show=True)"""
2450 return _controls_.RadioBox_ShowItem(*args, **kwargs)
2451
2452 def GetColumnCount(*args, **kwargs):
2453 """GetColumnCount(self) -> int"""
2454 return _controls_.RadioBox_GetColumnCount(*args, **kwargs)
2455
2456 def GetRowCount(*args, **kwargs):
2457 """GetRowCount(self) -> int"""
2458 return _controls_.RadioBox_GetRowCount(*args, **kwargs)
2459
2460 def GetNextItem(*args, **kwargs):
2461 """GetNextItem(self, int item, int dir, long style) -> int"""
2462 return _controls_.RadioBox_GetNextItem(*args, **kwargs)
2463
2464 def GetClassDefaultAttributes(*args, **kwargs):
2465 """
2466 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2467
2468 Get the default attributes for this class. This is useful if you want
2469 to use the same font or colour in your own control as in a standard
2470 control -- which is a much better idea than hard coding specific
2471 colours or fonts which might look completely out of place on the
2472 user's system, especially if it uses themes.
2473
2474 The variant parameter is only relevant under Mac currently and is
2475 ignore under other platforms. Under Mac, it will change the size of
2476 the returned font. See `wx.Window.SetWindowVariant` for more about
2477 this.
2478 """
2479 return _controls_.RadioBox_GetClassDefaultAttributes(*args, **kwargs)
2480
2481 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
2482
2483 class RadioBoxPtr(RadioBox):
2484 def __init__(self, this):
2485 self.this = this
2486 if not hasattr(self,"thisown"): self.thisown = 0
2487 self.__class__ = RadioBox
2488 _controls_.RadioBox_swigregister(RadioBoxPtr)
2489 RadioBoxNameStr = cvar.RadioBoxNameStr
2490 RadioButtonNameStr = cvar.RadioButtonNameStr
2491
2492 def PreRadioBox(*args, **kwargs):
2493 """PreRadioBox() -> RadioBox"""
2494 val = _controls_.new_PreRadioBox(*args, **kwargs)
2495 val.thisown = 1
2496 return val
2497
2498 def RadioBox_GetClassDefaultAttributes(*args, **kwargs):
2499 """
2500 RadioBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2501
2502 Get the default attributes for this class. This is useful if you want
2503 to use the same font or colour in your own control as in a standard
2504 control -- which is a much better idea than hard coding specific
2505 colours or fonts which might look completely out of place on the
2506 user's system, especially if it uses themes.
2507
2508 The variant parameter is only relevant under Mac currently and is
2509 ignore under other platforms. Under Mac, it will change the size of
2510 the returned font. See `wx.Window.SetWindowVariant` for more about
2511 this.
2512 """
2513 return _controls_.RadioBox_GetClassDefaultAttributes(*args, **kwargs)
2514
2515 #---------------------------------------------------------------------------
2516
2517 class RadioButton(_core.Control):
2518 def __repr__(self):
2519 return "<%s.%s; proxy of C++ wxRadioButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2520 def __init__(self, *args, **kwargs):
2521 """
2522 __init__(self, Window parent, int id=-1, String label=EmptyString,
2523 Point pos=DefaultPosition, Size size=DefaultSize,
2524 long style=0, Validator validator=DefaultValidator,
2525 String name=RadioButtonNameStr) -> RadioButton
2526 """
2527 newobj = _controls_.new_RadioButton(*args, **kwargs)
2528 self.this = newobj.this
2529 self.thisown = 1
2530 del newobj.thisown
2531 self._setOORInfo(self)
2532
2533 def Create(*args, **kwargs):
2534 """
2535 Create(self, Window parent, int id=-1, String label=EmptyString,
2536 Point pos=DefaultPosition, Size size=DefaultSize,
2537 long style=0, Validator validator=DefaultValidator,
2538 String name=RadioButtonNameStr) -> bool
2539 """
2540 return _controls_.RadioButton_Create(*args, **kwargs)
2541
2542 def GetValue(*args, **kwargs):
2543 """GetValue(self) -> bool"""
2544 return _controls_.RadioButton_GetValue(*args, **kwargs)
2545
2546 def SetValue(*args, **kwargs):
2547 """SetValue(self, bool value)"""
2548 return _controls_.RadioButton_SetValue(*args, **kwargs)
2549
2550 def GetClassDefaultAttributes(*args, **kwargs):
2551 """
2552 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2553
2554 Get the default attributes for this class. This is useful if you want
2555 to use the same font or colour in your own control as in a standard
2556 control -- which is a much better idea than hard coding specific
2557 colours or fonts which might look completely out of place on the
2558 user's system, especially if it uses themes.
2559
2560 The variant parameter is only relevant under Mac currently and is
2561 ignore under other platforms. Under Mac, it will change the size of
2562 the returned font. See `wx.Window.SetWindowVariant` for more about
2563 this.
2564 """
2565 return _controls_.RadioButton_GetClassDefaultAttributes(*args, **kwargs)
2566
2567 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
2568
2569 class RadioButtonPtr(RadioButton):
2570 def __init__(self, this):
2571 self.this = this
2572 if not hasattr(self,"thisown"): self.thisown = 0
2573 self.__class__ = RadioButton
2574 _controls_.RadioButton_swigregister(RadioButtonPtr)
2575
2576 def PreRadioButton(*args, **kwargs):
2577 """PreRadioButton() -> RadioButton"""
2578 val = _controls_.new_PreRadioButton(*args, **kwargs)
2579 val.thisown = 1
2580 return val
2581
2582 def RadioButton_GetClassDefaultAttributes(*args, **kwargs):
2583 """
2584 RadioButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2585
2586 Get the default attributes for this class. This is useful if you want
2587 to use the same font or colour in your own control as in a standard
2588 control -- which is a much better idea than hard coding specific
2589 colours or fonts which might look completely out of place on the
2590 user's system, especially if it uses themes.
2591
2592 The variant parameter is only relevant under Mac currently and is
2593 ignore under other platforms. Under Mac, it will change the size of
2594 the returned font. See `wx.Window.SetWindowVariant` for more about
2595 this.
2596 """
2597 return _controls_.RadioButton_GetClassDefaultAttributes(*args, **kwargs)
2598
2599 #---------------------------------------------------------------------------
2600
2601 class Slider(_core.Control):
2602 def __repr__(self):
2603 return "<%s.%s; proxy of C++ wxSlider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2604 def __init__(self, *args, **kwargs):
2605 """
2606 __init__(self, Window parent, int id=-1, int value=0, int minValue=0,
2607 int maxValue=100, Point pos=DefaultPosition,
2608 Size size=DefaultSize, long style=SL_HORIZONTAL,
2609 Validator validator=DefaultValidator,
2610 String name=SliderNameStr) -> Slider
2611 """
2612 if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']
2613 newobj = _controls_.new_Slider(*args, **kwargs)
2614 self.this = newobj.this
2615 self.thisown = 1
2616 del newobj.thisown
2617 self._setOORInfo(self)
2618
2619 def Create(*args, **kwargs):
2620 """
2621 Create(self, Window parent, int id=-1, int value=0, int minValue=0,
2622 int maxValue=100, Point pos=DefaultPosition,
2623 Size size=DefaultSize, long style=SL_HORIZONTAL,
2624 Validator validator=DefaultValidator,
2625 String name=SliderNameStr) -> bool
2626 """
2627 return _controls_.Slider_Create(*args, **kwargs)
2628
2629 def GetValue(*args, **kwargs):
2630 """GetValue(self) -> int"""
2631 return _controls_.Slider_GetValue(*args, **kwargs)
2632
2633 def SetValue(*args, **kwargs):
2634 """SetValue(self, int value)"""
2635 return _controls_.Slider_SetValue(*args, **kwargs)
2636
2637 def SetRange(*args, **kwargs):
2638 """SetRange(self, int minValue, int maxValue)"""
2639 return _controls_.Slider_SetRange(*args, **kwargs)
2640
2641 def GetMin(*args, **kwargs):
2642 """GetMin(self) -> int"""
2643 return _controls_.Slider_GetMin(*args, **kwargs)
2644
2645 def GetMax(*args, **kwargs):
2646 """GetMax(self) -> int"""
2647 return _controls_.Slider_GetMax(*args, **kwargs)
2648
2649 def SetMin(*args, **kwargs):
2650 """SetMin(self, int minValue)"""
2651 return _controls_.Slider_SetMin(*args, **kwargs)
2652
2653 def SetMax(*args, **kwargs):
2654 """SetMax(self, int maxValue)"""
2655 return _controls_.Slider_SetMax(*args, **kwargs)
2656
2657 def SetLineSize(*args, **kwargs):
2658 """SetLineSize(self, int lineSize)"""
2659 return _controls_.Slider_SetLineSize(*args, **kwargs)
2660
2661 def SetPageSize(*args, **kwargs):
2662 """SetPageSize(self, int pageSize)"""
2663 return _controls_.Slider_SetPageSize(*args, **kwargs)
2664
2665 def GetLineSize(*args, **kwargs):
2666 """GetLineSize(self) -> int"""
2667 return _controls_.Slider_GetLineSize(*args, **kwargs)
2668
2669 def GetPageSize(*args, **kwargs):
2670 """GetPageSize(self) -> int"""
2671 return _controls_.Slider_GetPageSize(*args, **kwargs)
2672
2673 def SetThumbLength(*args, **kwargs):
2674 """SetThumbLength(self, int lenPixels)"""
2675 return _controls_.Slider_SetThumbLength(*args, **kwargs)
2676
2677 def GetThumbLength(*args, **kwargs):
2678 """GetThumbLength(self) -> int"""
2679 return _controls_.Slider_GetThumbLength(*args, **kwargs)
2680
2681 def SetTickFreq(*args, **kwargs):
2682 """SetTickFreq(self, int n, int pos=1)"""
2683 return _controls_.Slider_SetTickFreq(*args, **kwargs)
2684
2685 def GetTickFreq(*args, **kwargs):
2686 """GetTickFreq(self) -> int"""
2687 return _controls_.Slider_GetTickFreq(*args, **kwargs)
2688
2689 def ClearTicks(*args, **kwargs):
2690 """ClearTicks(self)"""
2691 return _controls_.Slider_ClearTicks(*args, **kwargs)
2692
2693 def SetTick(*args, **kwargs):
2694 """SetTick(self, int tickPos)"""
2695 return _controls_.Slider_SetTick(*args, **kwargs)
2696
2697 def ClearSel(*args, **kwargs):
2698 """ClearSel(self)"""
2699 return _controls_.Slider_ClearSel(*args, **kwargs)
2700
2701 def GetSelEnd(*args, **kwargs):
2702 """GetSelEnd(self) -> int"""
2703 return _controls_.Slider_GetSelEnd(*args, **kwargs)
2704
2705 def GetSelStart(*args, **kwargs):
2706 """GetSelStart(self) -> int"""
2707 return _controls_.Slider_GetSelStart(*args, **kwargs)
2708
2709 def SetSelection(*args, **kwargs):
2710 """SetSelection(self, int min, int max)"""
2711 return _controls_.Slider_SetSelection(*args, **kwargs)
2712
2713 def GetClassDefaultAttributes(*args, **kwargs):
2714 """
2715 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2716
2717 Get the default attributes for this class. This is useful if you want
2718 to use the same font or colour in your own control as in a standard
2719 control -- which is a much better idea than hard coding specific
2720 colours or fonts which might look completely out of place on the
2721 user's system, especially if it uses themes.
2722
2723 The variant parameter is only relevant under Mac currently and is
2724 ignore under other platforms. Under Mac, it will change the size of
2725 the returned font. See `wx.Window.SetWindowVariant` for more about
2726 this.
2727 """
2728 return _controls_.Slider_GetClassDefaultAttributes(*args, **kwargs)
2729
2730 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
2731
2732 class SliderPtr(Slider):
2733 def __init__(self, this):
2734 self.this = this
2735 if not hasattr(self,"thisown"): self.thisown = 0
2736 self.__class__ = Slider
2737 _controls_.Slider_swigregister(SliderPtr)
2738 SliderNameStr = cvar.SliderNameStr
2739
2740 def PreSlider(*args, **kwargs):
2741 """PreSlider() -> Slider"""
2742 val = _controls_.new_PreSlider(*args, **kwargs)
2743 val.thisown = 1
2744 return val
2745
2746 def Slider_GetClassDefaultAttributes(*args, **kwargs):
2747 """
2748 Slider_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2749
2750 Get the default attributes for this class. This is useful if you want
2751 to use the same font or colour in your own control as in a standard
2752 control -- which is a much better idea than hard coding specific
2753 colours or fonts which might look completely out of place on the
2754 user's system, especially if it uses themes.
2755
2756 The variant parameter is only relevant under Mac currently and is
2757 ignore under other platforms. Under Mac, it will change the size of
2758 the returned font. See `wx.Window.SetWindowVariant` for more about
2759 this.
2760 """
2761 return _controls_.Slider_GetClassDefaultAttributes(*args, **kwargs)
2762
2763 #---------------------------------------------------------------------------
2764
2765 wxEVT_COMMAND_TOGGLEBUTTON_CLICKED = _controls_.wxEVT_COMMAND_TOGGLEBUTTON_CLICKED
2766 EVT_TOGGLEBUTTON = wx.PyEventBinder( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, 1)
2767
2768 class ToggleButton(_core.Control):
2769 def __repr__(self):
2770 return "<%s.%s; proxy of C++ wxToggleButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2771 def __init__(self, *args, **kwargs):
2772 """
2773 __init__(self, Window parent, int id=-1, String label=EmptyString,
2774 Point pos=DefaultPosition, Size size=DefaultSize,
2775 long style=0, Validator validator=DefaultValidator,
2776 String name=ToggleButtonNameStr) -> ToggleButton
2777 """
2778 newobj = _controls_.new_ToggleButton(*args, **kwargs)
2779 self.this = newobj.this
2780 self.thisown = 1
2781 del newobj.thisown
2782 self._setOORInfo(self)
2783
2784 def Create(*args, **kwargs):
2785 """
2786 Create(self, Window parent, int id=-1, String label=EmptyString,
2787 Point pos=DefaultPosition, Size size=DefaultSize,
2788 long style=0, Validator validator=DefaultValidator,
2789 String name=ToggleButtonNameStr) -> bool
2790 """
2791 return _controls_.ToggleButton_Create(*args, **kwargs)
2792
2793 def SetValue(*args, **kwargs):
2794 """SetValue(self, bool value)"""
2795 return _controls_.ToggleButton_SetValue(*args, **kwargs)
2796
2797 def GetValue(*args, **kwargs):
2798 """GetValue(self) -> bool"""
2799 return _controls_.ToggleButton_GetValue(*args, **kwargs)
2800
2801 def SetLabel(*args, **kwargs):
2802 """
2803 SetLabel(self, String label)
2804
2805 Sets the item's text.
2806 """
2807 return _controls_.ToggleButton_SetLabel(*args, **kwargs)
2808
2809 def GetClassDefaultAttributes(*args, **kwargs):
2810 """
2811 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2812
2813 Get the default attributes for this class. This is useful if you want
2814 to use the same font or colour in your own control as in a standard
2815 control -- which is a much better idea than hard coding specific
2816 colours or fonts which might look completely out of place on the
2817 user's system, especially if it uses themes.
2818
2819 The variant parameter is only relevant under Mac currently and is
2820 ignore under other platforms. Under Mac, it will change the size of
2821 the returned font. See `wx.Window.SetWindowVariant` for more about
2822 this.
2823 """
2824 return _controls_.ToggleButton_GetClassDefaultAttributes(*args, **kwargs)
2825
2826 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
2827
2828 class ToggleButtonPtr(ToggleButton):
2829 def __init__(self, this):
2830 self.this = this
2831 if not hasattr(self,"thisown"): self.thisown = 0
2832 self.__class__ = ToggleButton
2833 _controls_.ToggleButton_swigregister(ToggleButtonPtr)
2834 ToggleButtonNameStr = cvar.ToggleButtonNameStr
2835
2836 def PreToggleButton(*args, **kwargs):
2837 """PreToggleButton() -> ToggleButton"""
2838 val = _controls_.new_PreToggleButton(*args, **kwargs)
2839 val.thisown = 1
2840 return val
2841
2842 def ToggleButton_GetClassDefaultAttributes(*args, **kwargs):
2843 """
2844 ToggleButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2845
2846 Get the default attributes for this class. This is useful if you want
2847 to use the same font or colour in your own control as in a standard
2848 control -- which is a much better idea than hard coding specific
2849 colours or fonts which might look completely out of place on the
2850 user's system, especially if it uses themes.
2851
2852 The variant parameter is only relevant under Mac currently and is
2853 ignore under other platforms. Under Mac, it will change the size of
2854 the returned font. See `wx.Window.SetWindowVariant` for more about
2855 this.
2856 """
2857 return _controls_.ToggleButton_GetClassDefaultAttributes(*args, **kwargs)
2858
2859 #---------------------------------------------------------------------------
2860
2861 class BookCtrlBase(_core.Control):
2862 def __init__(self): raise RuntimeError, "No constructor defined"
2863 def __repr__(self):
2864 return "<%s.%s; proxy of C++ wxBookCtrlBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2865 def GetPageCount(*args, **kwargs):
2866 """GetPageCount(self) -> size_t"""
2867 return _controls_.BookCtrlBase_GetPageCount(*args, **kwargs)
2868
2869 def GetPage(*args, **kwargs):
2870 """GetPage(self, size_t n) -> Window"""
2871 return _controls_.BookCtrlBase_GetPage(*args, **kwargs)
2872
2873 def GetCurrentPage(*args, **kwargs):
2874 """GetCurrentPage(self) -> Window"""
2875 return _controls_.BookCtrlBase_GetCurrentPage(*args, **kwargs)
2876
2877 def GetSelection(*args, **kwargs):
2878 """GetSelection(self) -> int"""
2879 return _controls_.BookCtrlBase_GetSelection(*args, **kwargs)
2880
2881 def SetPageText(*args, **kwargs):
2882 """SetPageText(self, size_t n, String strText) -> bool"""
2883 return _controls_.BookCtrlBase_SetPageText(*args, **kwargs)
2884
2885 def GetPageText(*args, **kwargs):
2886 """GetPageText(self, size_t n) -> String"""
2887 return _controls_.BookCtrlBase_GetPageText(*args, **kwargs)
2888
2889 def SetImageList(*args, **kwargs):
2890 """SetImageList(self, ImageList imageList)"""
2891 return _controls_.BookCtrlBase_SetImageList(*args, **kwargs)
2892
2893 def AssignImageList(*args, **kwargs):
2894 """AssignImageList(self, ImageList imageList)"""
2895 return _controls_.BookCtrlBase_AssignImageList(*args, **kwargs)
2896
2897 def GetImageList(*args, **kwargs):
2898 """GetImageList(self) -> ImageList"""
2899 return _controls_.BookCtrlBase_GetImageList(*args, **kwargs)
2900
2901 def GetPageImage(*args, **kwargs):
2902 """GetPageImage(self, size_t n) -> int"""
2903 return _controls_.BookCtrlBase_GetPageImage(*args, **kwargs)
2904
2905 def SetPageImage(*args, **kwargs):
2906 """SetPageImage(self, size_t n, int imageId) -> bool"""
2907 return _controls_.BookCtrlBase_SetPageImage(*args, **kwargs)
2908
2909 def SetPageSize(*args, **kwargs):
2910 """SetPageSize(self, Size size)"""
2911 return _controls_.BookCtrlBase_SetPageSize(*args, **kwargs)
2912
2913 def CalcSizeFromPage(*args, **kwargs):
2914 """CalcSizeFromPage(self, Size sizePage) -> Size"""
2915 return _controls_.BookCtrlBase_CalcSizeFromPage(*args, **kwargs)
2916
2917 def DeletePage(*args, **kwargs):
2918 """DeletePage(self, size_t n) -> bool"""
2919 return _controls_.BookCtrlBase_DeletePage(*args, **kwargs)
2920
2921 def RemovePage(*args, **kwargs):
2922 """RemovePage(self, size_t n) -> bool"""
2923 return _controls_.BookCtrlBase_RemovePage(*args, **kwargs)
2924
2925 def DeleteAllPages(*args, **kwargs):
2926 """DeleteAllPages(self) -> bool"""
2927 return _controls_.BookCtrlBase_DeleteAllPages(*args, **kwargs)
2928
2929 def AddPage(*args, **kwargs):
2930 """AddPage(self, Window page, String text, bool select=False, int imageId=-1) -> bool"""
2931 return _controls_.BookCtrlBase_AddPage(*args, **kwargs)
2932
2933 def InsertPage(*args, **kwargs):
2934 """
2935 InsertPage(self, size_t n, Window page, String text, bool select=False,
2936 int imageId=-1) -> bool
2937 """
2938 return _controls_.BookCtrlBase_InsertPage(*args, **kwargs)
2939
2940 def SetSelection(*args, **kwargs):
2941 """SetSelection(self, size_t n) -> int"""
2942 return _controls_.BookCtrlBase_SetSelection(*args, **kwargs)
2943
2944 def AdvanceSelection(*args, **kwargs):
2945 """AdvanceSelection(self, bool forward=True)"""
2946 return _controls_.BookCtrlBase_AdvanceSelection(*args, **kwargs)
2947
2948 def GetClassDefaultAttributes(*args, **kwargs):
2949 """
2950 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2951
2952 Get the default attributes for this class. This is useful if you want
2953 to use the same font or colour in your own control as in a standard
2954 control -- which is a much better idea than hard coding specific
2955 colours or fonts which might look completely out of place on the
2956 user's system, especially if it uses themes.
2957
2958 The variant parameter is only relevant under Mac currently and is
2959 ignore under other platforms. Under Mac, it will change the size of
2960 the returned font. See `wx.Window.SetWindowVariant` for more about
2961 this.
2962 """
2963 return _controls_.BookCtrlBase_GetClassDefaultAttributes(*args, **kwargs)
2964
2965 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
2966
2967 class BookCtrlBasePtr(BookCtrlBase):
2968 def __init__(self, this):
2969 self.this = this
2970 if not hasattr(self,"thisown"): self.thisown = 0
2971 self.__class__ = BookCtrlBase
2972 _controls_.BookCtrlBase_swigregister(BookCtrlBasePtr)
2973 NOTEBOOK_NAME = cvar.NOTEBOOK_NAME
2974
2975 def BookCtrlBase_GetClassDefaultAttributes(*args, **kwargs):
2976 """
2977 BookCtrlBase_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
2978
2979 Get the default attributes for this class. This is useful if you want
2980 to use the same font or colour in your own control as in a standard
2981 control -- which is a much better idea than hard coding specific
2982 colours or fonts which might look completely out of place on the
2983 user's system, especially if it uses themes.
2984
2985 The variant parameter is only relevant under Mac currently and is
2986 ignore under other platforms. Under Mac, it will change the size of
2987 the returned font. See `wx.Window.SetWindowVariant` for more about
2988 this.
2989 """
2990 return _controls_.BookCtrlBase_GetClassDefaultAttributes(*args, **kwargs)
2991
2992 class BookCtrlBaseEvent(_core.NotifyEvent):
2993 def __repr__(self):
2994 return "<%s.%s; proxy of C++ wxBookCtrlBaseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2995 def __init__(self, *args, **kwargs):
2996 """
2997 __init__(self, wxEventType commandType=wxEVT_NULL, int id=0, int nSel=-1,
2998 int nOldSel=-1) -> BookCtrlBaseEvent
2999 """
3000 newobj = _controls_.new_BookCtrlBaseEvent(*args, **kwargs)
3001 self.this = newobj.this
3002 self.thisown = 1
3003 del newobj.thisown
3004 def GetSelection(*args, **kwargs):
3005 """GetSelection(self) -> int"""
3006 return _controls_.BookCtrlBaseEvent_GetSelection(*args, **kwargs)
3007
3008 def SetSelection(*args, **kwargs):
3009 """SetSelection(self, int nSel)"""
3010 return _controls_.BookCtrlBaseEvent_SetSelection(*args, **kwargs)
3011
3012 def GetOldSelection(*args, **kwargs):
3013 """GetOldSelection(self) -> int"""
3014 return _controls_.BookCtrlBaseEvent_GetOldSelection(*args, **kwargs)
3015
3016 def SetOldSelection(*args, **kwargs):
3017 """SetOldSelection(self, int nOldSel)"""
3018 return _controls_.BookCtrlBaseEvent_SetOldSelection(*args, **kwargs)
3019
3020
3021 class BookCtrlBaseEventPtr(BookCtrlBaseEvent):
3022 def __init__(self, this):
3023 self.this = this
3024 if not hasattr(self,"thisown"): self.thisown = 0
3025 self.__class__ = BookCtrlBaseEvent
3026 _controls_.BookCtrlBaseEvent_swigregister(BookCtrlBaseEventPtr)
3027
3028 #---------------------------------------------------------------------------
3029
3030 NB_FIXEDWIDTH = _controls_.NB_FIXEDWIDTH
3031 NB_TOP = _controls_.NB_TOP
3032 NB_LEFT = _controls_.NB_LEFT
3033 NB_RIGHT = _controls_.NB_RIGHT
3034 NB_BOTTOM = _controls_.NB_BOTTOM
3035 NB_MULTILINE = _controls_.NB_MULTILINE
3036 NB_HITTEST_NOWHERE = _controls_.NB_HITTEST_NOWHERE
3037 NB_HITTEST_ONICON = _controls_.NB_HITTEST_ONICON
3038 NB_HITTEST_ONLABEL = _controls_.NB_HITTEST_ONLABEL
3039 NB_HITTEST_ONITEM = _controls_.NB_HITTEST_ONITEM
3040 class Notebook(BookCtrlBase):
3041 def __repr__(self):
3042 return "<%s.%s; proxy of C++ wxNotebook instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3043 def __init__(self, *args, **kwargs):
3044 """
3045 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
3046 Size size=DefaultSize, long style=0, String name=NOTEBOOK_NAME) -> Notebook
3047 """
3048 newobj = _controls_.new_Notebook(*args, **kwargs)
3049 self.this = newobj.this
3050 self.thisown = 1
3051 del newobj.thisown
3052 self._setOORInfo(self)
3053
3054 def Create(*args, **kwargs):
3055 """
3056 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
3057 Size size=DefaultSize, long style=0, String name=NOTEBOOK_NAME) -> bool
3058 """
3059 return _controls_.Notebook_Create(*args, **kwargs)
3060
3061 def GetRowCount(*args, **kwargs):
3062 """GetRowCount(self) -> int"""
3063 return _controls_.Notebook_GetRowCount(*args, **kwargs)
3064
3065 def SetPadding(*args, **kwargs):
3066 """SetPadding(self, Size padding)"""
3067 return _controls_.Notebook_SetPadding(*args, **kwargs)
3068
3069 def SetTabSize(*args, **kwargs):
3070 """SetTabSize(self, Size sz)"""
3071 return _controls_.Notebook_SetTabSize(*args, **kwargs)
3072
3073 def HitTest(*args, **kwargs):
3074 """
3075 HitTest(Point pt) -> (tab, where)
3076
3077 Returns the tab which is hit, and flags indicating where using
3078 wx.NB_HITTEST flags.
3079 """
3080 return _controls_.Notebook_HitTest(*args, **kwargs)
3081
3082 def CalcSizeFromPage(*args, **kwargs):
3083 """CalcSizeFromPage(self, Size sizePage) -> Size"""
3084 return _controls_.Notebook_CalcSizeFromPage(*args, **kwargs)
3085
3086 def GetClassDefaultAttributes(*args, **kwargs):
3087 """
3088 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
3089
3090 Get the default attributes for this class. This is useful if you want
3091 to use the same font or colour in your own control as in a standard
3092 control -- which is a much better idea than hard coding specific
3093 colours or fonts which might look completely out of place on the
3094 user's system, especially if it uses themes.
3095
3096 The variant parameter is only relevant under Mac currently and is
3097 ignore under other platforms. Under Mac, it will change the size of
3098 the returned font. See `wx.Window.SetWindowVariant` for more about
3099 this.
3100 """
3101 return _controls_.Notebook_GetClassDefaultAttributes(*args, **kwargs)
3102
3103 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
3104
3105 class NotebookPtr(Notebook):
3106 def __init__(self, this):
3107 self.this = this
3108 if not hasattr(self,"thisown"): self.thisown = 0
3109 self.__class__ = Notebook
3110 _controls_.Notebook_swigregister(NotebookPtr)
3111
3112 def PreNotebook(*args, **kwargs):
3113 """PreNotebook() -> Notebook"""
3114 val = _controls_.new_PreNotebook(*args, **kwargs)
3115 val.thisown = 1
3116 return val
3117
3118 def Notebook_GetClassDefaultAttributes(*args, **kwargs):
3119 """
3120 Notebook_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
3121
3122 Get the default attributes for this class. This is useful if you want
3123 to use the same font or colour in your own control as in a standard
3124 control -- which is a much better idea than hard coding specific
3125 colours or fonts which might look completely out of place on the
3126 user's system, especially if it uses themes.
3127
3128 The variant parameter is only relevant under Mac currently and is
3129 ignore under other platforms. Under Mac, it will change the size of
3130 the returned font. See `wx.Window.SetWindowVariant` for more about
3131 this.
3132 """
3133 return _controls_.Notebook_GetClassDefaultAttributes(*args, **kwargs)
3134
3135 class NotebookEvent(BookCtrlBaseEvent):
3136 def __repr__(self):
3137 return "<%s.%s; proxy of C++ wxNotebookEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3138 def __init__(self, *args, **kwargs):
3139 """
3140 __init__(self, wxEventType commandType=wxEVT_NULL, int id=0, int nSel=-1,
3141 int nOldSel=-1) -> NotebookEvent
3142 """
3143 newobj = _controls_.new_NotebookEvent(*args, **kwargs)
3144 self.this = newobj.this
3145 self.thisown = 1
3146 del newobj.thisown
3147
3148 class NotebookEventPtr(NotebookEvent):
3149 def __init__(self, this):
3150 self.this = this
3151 if not hasattr(self,"thisown"): self.thisown = 0
3152 self.__class__ = NotebookEvent
3153 _controls_.NotebookEvent_swigregister(NotebookEventPtr)
3154
3155 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = _controls_.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
3156 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = _controls_.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
3157 # wxNotebook events
3158 EVT_NOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, 1 )
3159 EVT_NOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, 1 )
3160
3161 #----------------------------------------------------------------------------
3162
3163 class NotebookPage(wx.Panel):
3164 """
3165 There is an old (and apparently unsolvable) bug when placing a
3166 window with a nonstandard background colour in a wxNotebook on
3167 wxGTK, as the notbooks's background colour would always be used
3168 when the window is refreshed. The solution is to place a panel in
3169 the notbook and the coloured window on the panel, sized to cover
3170 the panel. This simple class does that for you, just put an
3171 instance of this in the notebook and make your regular window a
3172 child of this one and it will handle the resize for you.
3173 """
3174 def __init__(self, parent, id=-1,
3175 pos=wx.DefaultPosition, size=wx.DefaultSize,
3176 style=wx.TAB_TRAVERSAL, name="panel"):
3177 wx.Panel.__init__(self, parent, id, pos, size, style, name)
3178 self.child = None
3179 EVT_SIZE(self, self.OnSize)
3180
3181 def OnSize(self, evt):
3182 if self.child is None:
3183 children = self.GetChildren()
3184 if len(children):
3185 self.child = children[0]
3186 if self.child:
3187 self.child.SetPosition((0,0))
3188 self.child.SetSize(self.GetSize())
3189
3190
3191 #---------------------------------------------------------------------------
3192
3193 LB_DEFAULT = _controls_.LB_DEFAULT
3194 LB_TOP = _controls_.LB_TOP
3195 LB_BOTTOM = _controls_.LB_BOTTOM
3196 LB_LEFT = _controls_.LB_LEFT
3197 LB_RIGHT = _controls_.LB_RIGHT
3198 LB_ALIGN_MASK = _controls_.LB_ALIGN_MASK
3199 class Listbook(BookCtrlBase):
3200 def __repr__(self):
3201 return "<%s.%s; proxy of C++ wxListbook instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3202 def __init__(self, *args, **kwargs):
3203 """
3204 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
3205 Size size=DefaultSize, long style=0, String name=EmptyString) -> Listbook
3206 """
3207 newobj = _controls_.new_Listbook(*args, **kwargs)
3208 self.this = newobj.this
3209 self.thisown = 1
3210 del newobj.thisown
3211 self._setOORInfo(self)
3212
3213 def Create(*args, **kwargs):
3214 """
3215 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
3216 Size size=DefaultSize, long style=0, String name=EmptyString) -> bool
3217 """
3218 return _controls_.Listbook_Create(*args, **kwargs)
3219
3220 def IsVertical(*args, **kwargs):
3221 """IsVertical(self) -> bool"""
3222 return _controls_.Listbook_IsVertical(*args, **kwargs)
3223
3224 def GetListView(*args, **kwargs):
3225 """GetListView(self) -> ListView"""
3226 return _controls_.Listbook_GetListView(*args, **kwargs)
3227
3228
3229 class ListbookPtr(Listbook):
3230 def __init__(self, this):
3231 self.this = this
3232 if not hasattr(self,"thisown"): self.thisown = 0
3233 self.__class__ = Listbook
3234 _controls_.Listbook_swigregister(ListbookPtr)
3235
3236 def PreListbook(*args, **kwargs):
3237 """PreListbook() -> Listbook"""
3238 val = _controls_.new_PreListbook(*args, **kwargs)
3239 val.thisown = 1
3240 return val
3241
3242 class ListbookEvent(BookCtrlBaseEvent):
3243 def __repr__(self):
3244 return "<%s.%s; proxy of C++ wxListbookEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3245 def __init__(self, *args, **kwargs):
3246 """
3247 __init__(self, wxEventType commandType=wxEVT_NULL, int id=0, int nSel=-1,
3248 int nOldSel=-1) -> ListbookEvent
3249 """
3250 newobj = _controls_.new_ListbookEvent(*args, **kwargs)
3251 self.this = newobj.this
3252 self.thisown = 1
3253 del newobj.thisown
3254
3255 class ListbookEventPtr(ListbookEvent):
3256 def __init__(self, this):
3257 self.this = this
3258 if not hasattr(self,"thisown"): self.thisown = 0
3259 self.__class__ = ListbookEvent
3260 _controls_.ListbookEvent_swigregister(ListbookEventPtr)
3261
3262 wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED = _controls_.wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED
3263 wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING = _controls_.wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING
3264 EVT_LISTBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, 1 )
3265 EVT_LISTBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, 1 )
3266
3267 CHB_DEFAULT = _controls_.CHB_DEFAULT
3268 CHB_TOP = _controls_.CHB_TOP
3269 CHB_BOTTOM = _controls_.CHB_BOTTOM
3270 CHB_LEFT = _controls_.CHB_LEFT
3271 CHB_RIGHT = _controls_.CHB_RIGHT
3272 CHB_ALIGN_MASK = _controls_.CHB_ALIGN_MASK
3273 class Choicebook(BookCtrlBase):
3274 def __repr__(self):
3275 return "<%s.%s; proxy of C++ wxChoicebook instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3276 def __init__(self, *args, **kwargs):
3277 """
3278 __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
3279 long style=0, String name=EmptyString) -> Choicebook
3280 """
3281 newobj = _controls_.new_Choicebook(*args, **kwargs)
3282 self.this = newobj.this
3283 self.thisown = 1
3284 del newobj.thisown
3285 self._setOORInfo(self)
3286
3287 def Create(*args, **kwargs):
3288 """
3289 Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
3290 long style=0, String name=EmptyString) -> bool
3291 """
3292 return _controls_.Choicebook_Create(*args, **kwargs)
3293
3294 def IsVertical(*args, **kwargs):
3295 """IsVertical(self) -> bool"""
3296 return _controls_.Choicebook_IsVertical(*args, **kwargs)
3297
3298 def DeleteAllPages(*args, **kwargs):
3299 """DeleteAllPages(self) -> bool"""
3300 return _controls_.Choicebook_DeleteAllPages(*args, **kwargs)
3301
3302
3303 class ChoicebookPtr(Choicebook):
3304 def __init__(self, this):
3305 self.this = this
3306 if not hasattr(self,"thisown"): self.thisown = 0
3307 self.__class__ = Choicebook
3308 _controls_.Choicebook_swigregister(ChoicebookPtr)
3309
3310 def PreChoicebook(*args, **kwargs):
3311 """PreChoicebook() -> Choicebook"""
3312 val = _controls_.new_PreChoicebook(*args, **kwargs)
3313 val.thisown = 1
3314 return val
3315
3316 class ChoicebookEvent(BookCtrlBaseEvent):
3317 def __repr__(self):
3318 return "<%s.%s; proxy of C++ wxChoicebookEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3319 def __init__(self, *args, **kwargs):
3320 """
3321 __init__(self, wxEventType commandType=wxEVT_NULL, int id=0, int nSel=-1,
3322 int nOldSel=-1) -> ChoicebookEvent
3323 """
3324 newobj = _controls_.new_ChoicebookEvent(*args, **kwargs)
3325 self.this = newobj.this
3326 self.thisown = 1
3327 del newobj.thisown
3328
3329 class ChoicebookEventPtr(ChoicebookEvent):
3330 def __init__(self, this):
3331 self.this = this
3332 if not hasattr(self,"thisown"): self.thisown = 0
3333 self.__class__ = ChoicebookEvent
3334 _controls_.ChoicebookEvent_swigregister(ChoicebookEventPtr)
3335
3336 wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED = _controls_.wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED
3337 wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING = _controls_.wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING
3338 EVT_CHOICEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, 1 )
3339 EVT_CHOICEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, 1 )
3340
3341 #---------------------------------------------------------------------------
3342
3343 class BookCtrlSizer(_core.Sizer):
3344 def __repr__(self):
3345 return "<%s.%s; proxy of C++ wxBookCtrlSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3346 def __init__(self, *args, **kwargs):
3347 """__init__(self, BookCtrlBase nb) -> BookCtrlSizer"""
3348 newobj = _controls_.new_BookCtrlSizer(*args, **kwargs)
3349 self.this = newobj.this
3350 self.thisown = 1
3351 del newobj.thisown
3352 self._setOORInfo(self)
3353
3354 def RecalcSizes(*args, **kwargs):
3355 """
3356 RecalcSizes(self)
3357
3358 Using the sizes calculated by `CalcMin` reposition and resize all the
3359 items managed by this sizer. You should not need to call this directly as
3360 it is called by `Layout`.
3361 """
3362 return _controls_.BookCtrlSizer_RecalcSizes(*args, **kwargs)
3363
3364 def CalcMin(*args, **kwargs):
3365 """
3366 CalcMin(self) -> Size
3367
3368 This method is where the sizer will do the actual calculation of its
3369 children's minimal sizes. You should not need to call this directly as
3370 it is called by `Layout`.
3371 """
3372 return _controls_.BookCtrlSizer_CalcMin(*args, **kwargs)
3373
3374 def GetControl(*args, **kwargs):
3375 """GetControl(self) -> BookCtrlBase"""
3376 return _controls_.BookCtrlSizer_GetControl(*args, **kwargs)
3377
3378
3379 class BookCtrlSizerPtr(BookCtrlSizer):
3380 def __init__(self, this):
3381 self.this = this
3382 if not hasattr(self,"thisown"): self.thisown = 0
3383 self.__class__ = BookCtrlSizer
3384 _controls_.BookCtrlSizer_swigregister(BookCtrlSizerPtr)
3385
3386 class NotebookSizer(_core.Sizer):
3387 def __repr__(self):
3388 return "<%s.%s; proxy of C++ wxNotebookSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3389 def __init__(self, *args, **kwargs):
3390 """__init__(self, Notebook nb) -> NotebookSizer"""
3391 newobj = _controls_.new_NotebookSizer(*args, **kwargs)
3392 self.this = newobj.this
3393 self.thisown = 1
3394 del newobj.thisown
3395 self._setOORInfo(self)
3396
3397 def RecalcSizes(*args, **kwargs):
3398 """
3399 RecalcSizes(self)
3400
3401 Using the sizes calculated by `CalcMin` reposition and resize all the
3402 items managed by this sizer. You should not need to call this directly as
3403 it is called by `Layout`.
3404 """
3405 return _controls_.NotebookSizer_RecalcSizes(*args, **kwargs)
3406
3407 def CalcMin(*args, **kwargs):
3408 """
3409 CalcMin(self) -> Size
3410
3411 This method is where the sizer will do the actual calculation of its
3412 children's minimal sizes. You should not need to call this directly as
3413 it is called by `Layout`.
3414 """
3415 return _controls_.NotebookSizer_CalcMin(*args, **kwargs)
3416
3417 def GetNotebook(*args, **kwargs):
3418 """GetNotebook(self) -> Notebook"""
3419 return _controls_.NotebookSizer_GetNotebook(*args, **kwargs)
3420
3421
3422 class NotebookSizerPtr(NotebookSizer):
3423 def __init__(self, this):
3424 self.this = this
3425 if not hasattr(self,"thisown"): self.thisown = 0
3426 self.__class__ = NotebookSizer
3427 _controls_.NotebookSizer_swigregister(NotebookSizerPtr)
3428
3429 NotebookSizer = wx._deprecated(NotebookSizer, "NotebookSizer is no longer needed.")
3430 BookCtrlSizer = wx._deprecated(BookCtrlSizer, "BookCtrlSizer is no longer needed.")
3431 #---------------------------------------------------------------------------
3432
3433 TOOL_STYLE_BUTTON = _controls_.TOOL_STYLE_BUTTON
3434 TOOL_STYLE_SEPARATOR = _controls_.TOOL_STYLE_SEPARATOR
3435 TOOL_STYLE_CONTROL = _controls_.TOOL_STYLE_CONTROL
3436 TB_HORIZONTAL = _controls_.TB_HORIZONTAL
3437 TB_VERTICAL = _controls_.TB_VERTICAL
3438 TB_3DBUTTONS = _controls_.TB_3DBUTTONS
3439 TB_FLAT = _controls_.TB_FLAT
3440 TB_DOCKABLE = _controls_.TB_DOCKABLE
3441 TB_NOICONS = _controls_.TB_NOICONS
3442 TB_TEXT = _controls_.TB_TEXT
3443 TB_NODIVIDER = _controls_.TB_NODIVIDER
3444 TB_NOALIGN = _controls_.TB_NOALIGN
3445 TB_HORZ_LAYOUT = _controls_.TB_HORZ_LAYOUT
3446 TB_HORZ_TEXT = _controls_.TB_HORZ_TEXT
3447 class ToolBarToolBase(_core.Object):
3448 def __init__(self): raise RuntimeError, "No constructor defined"
3449 def __repr__(self):
3450 return "<%s.%s; proxy of C++ wxToolBarToolBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3451 def GetId(*args, **kwargs):
3452 """GetId(self) -> int"""
3453 return _controls_.ToolBarToolBase_GetId(*args, **kwargs)
3454
3455 def GetControl(*args, **kwargs):
3456 """GetControl(self) -> Control"""
3457 return _controls_.ToolBarToolBase_GetControl(*args, **kwargs)
3458
3459 def GetToolBar(*args, **kwargs):
3460 """GetToolBar(self) -> ToolBarBase"""
3461 return _controls_.ToolBarToolBase_GetToolBar(*args, **kwargs)
3462
3463 def IsButton(*args, **kwargs):
3464 """IsButton(self) -> int"""
3465 return _controls_.ToolBarToolBase_IsButton(*args, **kwargs)
3466
3467 def IsControl(*args, **kwargs):
3468 """IsControl(self) -> int"""
3469 return _controls_.ToolBarToolBase_IsControl(*args, **kwargs)
3470
3471 def IsSeparator(*args, **kwargs):
3472 """IsSeparator(self) -> int"""
3473 return _controls_.ToolBarToolBase_IsSeparator(*args, **kwargs)
3474
3475 def GetStyle(*args, **kwargs):
3476 """GetStyle(self) -> int"""
3477 return _controls_.ToolBarToolBase_GetStyle(*args, **kwargs)
3478
3479 def GetKind(*args, **kwargs):
3480 """GetKind(self) -> int"""
3481 return _controls_.ToolBarToolBase_GetKind(*args, **kwargs)
3482
3483 def IsEnabled(*args, **kwargs):
3484 """IsEnabled(self) -> bool"""
3485 return _controls_.ToolBarToolBase_IsEnabled(*args, **kwargs)
3486
3487 def IsToggled(*args, **kwargs):
3488 """IsToggled(self) -> bool"""
3489 return _controls_.ToolBarToolBase_IsToggled(*args, **kwargs)
3490
3491 def CanBeToggled(*args, **kwargs):
3492 """CanBeToggled(self) -> bool"""
3493 return _controls_.ToolBarToolBase_CanBeToggled(*args, **kwargs)
3494
3495 def GetNormalBitmap(*args, **kwargs):
3496 """GetNormalBitmap(self) -> Bitmap"""
3497 return _controls_.ToolBarToolBase_GetNormalBitmap(*args, **kwargs)
3498
3499 def GetDisabledBitmap(*args, **kwargs):
3500 """GetDisabledBitmap(self) -> Bitmap"""
3501 return _controls_.ToolBarToolBase_GetDisabledBitmap(*args, **kwargs)
3502
3503 def GetBitmap(*args, **kwargs):
3504 """GetBitmap(self) -> Bitmap"""
3505 return _controls_.ToolBarToolBase_GetBitmap(*args, **kwargs)
3506
3507 def GetLabel(*args, **kwargs):
3508 """GetLabel(self) -> String"""
3509 return _controls_.ToolBarToolBase_GetLabel(*args, **kwargs)
3510
3511 def GetShortHelp(*args, **kwargs):
3512 """GetShortHelp(self) -> String"""
3513 return _controls_.ToolBarToolBase_GetShortHelp(*args, **kwargs)
3514
3515 def GetLongHelp(*args, **kwargs):
3516 """GetLongHelp(self) -> String"""
3517 return _controls_.ToolBarToolBase_GetLongHelp(*args, **kwargs)
3518
3519 def Enable(*args, **kwargs):
3520 """Enable(self, bool enable) -> bool"""
3521 return _controls_.ToolBarToolBase_Enable(*args, **kwargs)
3522
3523 def Toggle(*args, **kwargs):
3524 """Toggle(self)"""
3525 return _controls_.ToolBarToolBase_Toggle(*args, **kwargs)
3526
3527 def SetToggle(*args, **kwargs):
3528 """SetToggle(self, bool toggle) -> bool"""
3529 return _controls_.ToolBarToolBase_SetToggle(*args, **kwargs)
3530
3531 def SetShortHelp(*args, **kwargs):
3532 """SetShortHelp(self, String help) -> bool"""
3533 return _controls_.ToolBarToolBase_SetShortHelp(*args, **kwargs)
3534
3535 def SetLongHelp(*args, **kwargs):
3536 """SetLongHelp(self, String help) -> bool"""
3537 return _controls_.ToolBarToolBase_SetLongHelp(*args, **kwargs)
3538
3539 def SetNormalBitmap(*args, **kwargs):
3540 """SetNormalBitmap(self, Bitmap bmp)"""
3541 return _controls_.ToolBarToolBase_SetNormalBitmap(*args, **kwargs)
3542
3543 def SetDisabledBitmap(*args, **kwargs):
3544 """SetDisabledBitmap(self, Bitmap bmp)"""
3545 return _controls_.ToolBarToolBase_SetDisabledBitmap(*args, **kwargs)
3546
3547 def SetLabel(*args, **kwargs):
3548 """SetLabel(self, String label)"""
3549 return _controls_.ToolBarToolBase_SetLabel(*args, **kwargs)
3550
3551 def Detach(*args, **kwargs):
3552 """Detach(self)"""
3553 return _controls_.ToolBarToolBase_Detach(*args, **kwargs)
3554
3555 def Attach(*args, **kwargs):
3556 """Attach(self, ToolBarBase tbar)"""
3557 return _controls_.ToolBarToolBase_Attach(*args, **kwargs)
3558
3559 def GetClientData(*args, **kwargs):
3560 """GetClientData(self) -> PyObject"""
3561 return _controls_.ToolBarToolBase_GetClientData(*args, **kwargs)
3562
3563 def SetClientData(*args, **kwargs):
3564 """SetClientData(self, PyObject clientData)"""
3565 return _controls_.ToolBarToolBase_SetClientData(*args, **kwargs)
3566
3567 GetBitmap1 = GetNormalBitmap
3568 GetBitmap2 = GetDisabledBitmap
3569 SetBitmap1 = SetNormalBitmap
3570 SetBitmap2 = SetDisabledBitmap
3571
3572
3573 class ToolBarToolBasePtr(ToolBarToolBase):
3574 def __init__(self, this):
3575 self.this = this
3576 if not hasattr(self,"thisown"): self.thisown = 0
3577 self.__class__ = ToolBarToolBase
3578 _controls_.ToolBarToolBase_swigregister(ToolBarToolBasePtr)
3579
3580 class ToolBarBase(_core.Control):
3581 def __init__(self): raise RuntimeError, "No constructor defined"
3582 def __repr__(self):
3583 return "<%s.%s; proxy of C++ wxToolBarBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3584 def DoAddTool(*args, **kwargs):
3585 """
3586 DoAddTool(self, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap,
3587 int kind=ITEM_NORMAL, String shortHelp=EmptyString,
3588 String longHelp=EmptyString,
3589 PyObject clientData=None) -> ToolBarToolBase
3590 """
3591 return _controls_.ToolBarBase_DoAddTool(*args, **kwargs)
3592
3593 def DoInsertTool(*args, **kwargs):
3594 """
3595 DoInsertTool(self, size_t pos, int id, String label, Bitmap bitmap, Bitmap bmpDisabled=wxNullBitmap,
3596 int kind=ITEM_NORMAL,
3597 String shortHelp=EmptyString, String longHelp=EmptyString,
3598 PyObject clientData=None) -> ToolBarToolBase
3599 """
3600 return _controls_.ToolBarBase_DoInsertTool(*args, **kwargs)
3601
3602 # These match the original Add methods for this class, kept for
3603 # backwards compatibility with versions < 2.3.3.
3604
3605
3606 def AddTool(self, id, bitmap,
3607 pushedBitmap = wx.NullBitmap,
3608 isToggle = 0,
3609 clientData = None,
3610 shortHelpString = '',
3611 longHelpString = '') :
3612 '''Old style method to add a tool to the toolbar.'''
3613 kind = wx.ITEM_NORMAL
3614 if isToggle: kind = wx.ITEM_CHECK
3615 return self.DoAddTool(id, '', bitmap, pushedBitmap, kind,
3616 shortHelpString, longHelpString, clientData)
3617
3618 def AddSimpleTool(self, id, bitmap,
3619 shortHelpString = '',
3620 longHelpString = '',
3621 isToggle = 0):
3622 '''Old style method to add a tool to the toolbar.'''
3623 kind = wx.ITEM_NORMAL
3624 if isToggle: kind = wx.ITEM_CHECK
3625 return self.DoAddTool(id, '', bitmap, wx.NullBitmap, kind,
3626 shortHelpString, longHelpString, None)
3627
3628 def InsertTool(self, pos, id, bitmap,
3629 pushedBitmap = wx.NullBitmap,
3630 isToggle = 0,
3631 clientData = None,
3632 shortHelpString = '',
3633 longHelpString = ''):
3634 '''Old style method to insert a tool in the toolbar.'''
3635 kind = wx.ITEM_NORMAL
3636 if isToggle: kind = wx.ITEM_CHECK
3637 return self.DoInsertTool(pos, id, '', bitmap, pushedBitmap, kind,
3638 shortHelpString, longHelpString, clientData)
3639
3640 def InsertSimpleTool(self, pos, id, bitmap,
3641 shortHelpString = '',
3642 longHelpString = '',
3643 isToggle = 0):
3644 '''Old style method to insert a tool in the toolbar.'''
3645 kind = wx.ITEM_NORMAL
3646 if isToggle: kind = wx.ITEM_CHECK
3647 return self.DoInsertTool(pos, id, '', bitmap, wx.NullBitmap, kind,
3648 shortHelpString, longHelpString, None)
3649
3650
3651 # The following are the new toolbar Add methods starting with
3652 # 2.3.3. They are renamed to have 'Label' in the name so as to be
3653 # able to keep backwards compatibility with using the above
3654 # methods. Eventually these should migrate to be the methods used
3655 # primarily and lose the 'Label' in the name...
3656
3657 def AddLabelTool(self, id, label, bitmap,
3658 bmpDisabled = wx.NullBitmap,
3659 kind = wx.ITEM_NORMAL,
3660 shortHelp = '', longHelp = '',
3661 clientData = None):
3662 '''
3663 The full AddTool() function.
3664
3665 If bmpDisabled is wx.NullBitmap, a shadowed version of the normal bitmap
3666 is created and used as the disabled image.
3667 '''
3668 return self.DoAddTool(id, label, bitmap, bmpDisabled, kind,
3669 shortHelp, longHelp, clientData)
3670
3671
3672 def InsertLabelTool(self, pos, id, label, bitmap,
3673 bmpDisabled = wx.NullBitmap,
3674 kind = wx.ITEM_NORMAL,
3675 shortHelp = '', longHelp = '',
3676 clientData = None):
3677 '''
3678 Insert the new tool at the given position, if pos == GetToolsCount(), it
3679 is equivalent to AddTool()
3680 '''
3681 return self.DoInsertTool(pos, id, label, bitmap, bmpDisabled, kind,
3682 shortHelp, longHelp, clientData)
3683
3684 def AddCheckLabelTool(self, id, label, bitmap,
3685 bmpDisabled = wx.NullBitmap,
3686 shortHelp = '', longHelp = '',
3687 clientData = None):
3688 '''Add a check tool, i.e. a tool which can be toggled'''
3689 return self.DoAddTool(id, label, bitmap, bmpDisabled, wx.ITEM_CHECK,
3690 shortHelp, longHelp, clientData)
3691
3692 def AddRadioLabelTool(self, id, label, bitmap,
3693 bmpDisabled = wx.NullBitmap,
3694 shortHelp = '', longHelp = '',
3695 clientData = None):
3696 '''
3697 Add a radio tool, i.e. a tool which can be toggled and releases any
3698 other toggled radio tools in the same group when it happens
3699 '''
3700 return self.DoAddTool(id, label, bitmap, bmpDisabled, wx.ITEM_RADIO,
3701 shortHelp, longHelp, clientData)
3702
3703
3704 # For consistency with the backwards compatible methods above, here are
3705 # some non-'Label' versions of the Check and Radio methods
3706
3707 def AddCheckTool(self, id, bitmap,
3708 bmpDisabled = wx.NullBitmap,
3709 shortHelp = '', longHelp = '',
3710 clientData = None):
3711 '''Add a check tool, i.e. a tool which can be toggled'''
3712 return self.DoAddTool(id, '', bitmap, bmpDisabled, wx.ITEM_CHECK,
3713 shortHelp, longHelp, clientData)
3714
3715 def AddRadioTool(self, id, bitmap,
3716 bmpDisabled = wx.NullBitmap,
3717 shortHelp = '', longHelp = '',
3718 clientData = None):
3719 '''
3720 Add a radio tool, i.e. a tool which can be toggled and releases any
3721 other toggled radio tools in the same group when it happens
3722 '''
3723 return self.DoAddTool(id, '', bitmap, bmpDisabled, wx.ITEM_RADIO,
3724 shortHelp, longHelp, clientData)
3725
3726 def AddToolItem(*args, **kwargs):
3727 """AddToolItem(self, ToolBarToolBase tool) -> ToolBarToolBase"""
3728 return _controls_.ToolBarBase_AddToolItem(*args, **kwargs)
3729
3730 def InsertToolItem(*args, **kwargs):
3731 """InsertToolItem(self, size_t pos, ToolBarToolBase tool) -> ToolBarToolBase"""
3732 return _controls_.ToolBarBase_InsertToolItem(*args, **kwargs)
3733
3734 def AddControl(*args, **kwargs):
3735 """AddControl(self, Control control) -> ToolBarToolBase"""
3736 return _controls_.ToolBarBase_AddControl(*args, **kwargs)
3737
3738 def InsertControl(*args, **kwargs):
3739 """InsertControl(self, size_t pos, Control control) -> ToolBarToolBase"""
3740 return _controls_.ToolBarBase_InsertControl(*args, **kwargs)
3741
3742 def FindControl(*args, **kwargs):
3743 """FindControl(self, int id) -> Control"""
3744 return _controls_.ToolBarBase_FindControl(*args, **kwargs)
3745
3746 def AddSeparator(*args, **kwargs):
3747 """AddSeparator(self) -> ToolBarToolBase"""
3748 return _controls_.ToolBarBase_AddSeparator(*args, **kwargs)
3749
3750 def InsertSeparator(*args, **kwargs):
3751 """InsertSeparator(self, size_t pos) -> ToolBarToolBase"""
3752 return _controls_.ToolBarBase_InsertSeparator(*args, **kwargs)
3753
3754 def RemoveTool(*args, **kwargs):
3755 """RemoveTool(self, int id) -> ToolBarToolBase"""
3756 return _controls_.ToolBarBase_RemoveTool(*args, **kwargs)
3757
3758 def DeleteToolByPos(*args, **kwargs):
3759 """DeleteToolByPos(self, size_t pos) -> bool"""
3760 return _controls_.ToolBarBase_DeleteToolByPos(*args, **kwargs)
3761
3762 def DeleteTool(*args, **kwargs):
3763 """DeleteTool(self, int id) -> bool"""
3764 return _controls_.ToolBarBase_DeleteTool(*args, **kwargs)
3765
3766 def ClearTools(*args, **kwargs):
3767 """ClearTools(self)"""
3768 return _controls_.ToolBarBase_ClearTools(*args, **kwargs)
3769
3770 def Realize(*args, **kwargs):
3771 """Realize(self) -> bool"""
3772 return _controls_.ToolBarBase_Realize(*args, **kwargs)
3773
3774 def EnableTool(*args, **kwargs):
3775 """EnableTool(self, int id, bool enable)"""
3776 return _controls_.ToolBarBase_EnableTool(*args, **kwargs)
3777
3778 def ToggleTool(*args, **kwargs):
3779 """ToggleTool(self, int id, bool toggle)"""
3780 return _controls_.ToolBarBase_ToggleTool(*args, **kwargs)
3781
3782 def SetToggle(*args, **kwargs):
3783 """SetToggle(self, int id, bool toggle)"""
3784 return _controls_.ToolBarBase_SetToggle(*args, **kwargs)
3785
3786 def GetToolClientData(*args, **kwargs):
3787 """GetToolClientData(self, int id) -> PyObject"""
3788 return _controls_.ToolBarBase_GetToolClientData(*args, **kwargs)
3789
3790 def SetToolClientData(*args, **kwargs):
3791 """SetToolClientData(self, int id, PyObject clientData)"""
3792 return _controls_.ToolBarBase_SetToolClientData(*args, **kwargs)
3793
3794 def GetToolPos(*args, **kwargs):
3795 """GetToolPos(self, int id) -> int"""
3796 return _controls_.ToolBarBase_GetToolPos(*args, **kwargs)
3797
3798 def GetToolState(*args, **kwargs):
3799 """GetToolState(self, int id) -> bool"""
3800 return _controls_.ToolBarBase_GetToolState(*args, **kwargs)
3801
3802 def GetToolEnabled(*args, **kwargs):
3803 """GetToolEnabled(self, int id) -> bool"""
3804 return _controls_.ToolBarBase_GetToolEnabled(*args, **kwargs)
3805
3806 def SetToolShortHelp(*args, **kwargs):
3807 """SetToolShortHelp(self, int id, String helpString)"""
3808 return _controls_.ToolBarBase_SetToolShortHelp(*args, **kwargs)
3809
3810 def GetToolShortHelp(*args, **kwargs):
3811 """GetToolShortHelp(self, int id) -> String"""
3812 return _controls_.ToolBarBase_GetToolShortHelp(*args, **kwargs)
3813
3814 def SetToolLongHelp(*args, **kwargs):
3815 """SetToolLongHelp(self, int id, String helpString)"""
3816 return _controls_.ToolBarBase_SetToolLongHelp(*args, **kwargs)
3817
3818 def GetToolLongHelp(*args, **kwargs):
3819 """GetToolLongHelp(self, int id) -> String"""
3820 return _controls_.ToolBarBase_GetToolLongHelp(*args, **kwargs)
3821
3822 def SetMarginsXY(*args, **kwargs):
3823 """SetMarginsXY(self, int x, int y)"""
3824 return _controls_.ToolBarBase_SetMarginsXY(*args, **kwargs)
3825
3826 def SetMargins(*args, **kwargs):
3827 """SetMargins(self, Size size)"""
3828 return _controls_.ToolBarBase_SetMargins(*args, **kwargs)
3829
3830 def SetToolPacking(*args, **kwargs):
3831 """SetToolPacking(self, int packing)"""
3832 return _controls_.ToolBarBase_SetToolPacking(*args, **kwargs)
3833
3834 def SetToolSeparation(*args, **kwargs):
3835 """SetToolSeparation(self, int separation)"""
3836 return _controls_.ToolBarBase_SetToolSeparation(*args, **kwargs)
3837
3838 def GetToolMargins(*args, **kwargs):
3839 """GetToolMargins(self) -> Size"""
3840 return _controls_.ToolBarBase_GetToolMargins(*args, **kwargs)
3841
3842 def GetMargins(*args, **kwargs):
3843 """GetMargins(self) -> Size"""
3844 return _controls_.ToolBarBase_GetMargins(*args, **kwargs)
3845
3846 def GetToolPacking(*args, **kwargs):
3847 """GetToolPacking(self) -> int"""
3848 return _controls_.ToolBarBase_GetToolPacking(*args, **kwargs)
3849
3850 def GetToolSeparation(*args, **kwargs):
3851 """GetToolSeparation(self) -> int"""
3852 return _controls_.ToolBarBase_GetToolSeparation(*args, **kwargs)
3853
3854 def SetRows(*args, **kwargs):
3855 """SetRows(self, int nRows)"""
3856 return _controls_.ToolBarBase_SetRows(*args, **kwargs)
3857
3858 def SetMaxRowsCols(*args, **kwargs):
3859 """SetMaxRowsCols(self, int rows, int cols)"""
3860 return _controls_.ToolBarBase_SetMaxRowsCols(*args, **kwargs)
3861
3862 def GetMaxRows(*args, **kwargs):
3863 """GetMaxRows(self) -> int"""
3864 return _controls_.ToolBarBase_GetMaxRows(*args, **kwargs)
3865
3866 def GetMaxCols(*args, **kwargs):
3867 """GetMaxCols(self) -> int"""
3868 return _controls_.ToolBarBase_GetMaxCols(*args, **kwargs)
3869
3870 def SetToolBitmapSize(*args, **kwargs):
3871 """SetToolBitmapSize(self, Size size)"""
3872 return _controls_.ToolBarBase_SetToolBitmapSize(*args, **kwargs)
3873
3874 def GetToolBitmapSize(*args, **kwargs):
3875 """GetToolBitmapSize(self) -> Size"""
3876 return _controls_.ToolBarBase_GetToolBitmapSize(*args, **kwargs)
3877
3878 def GetToolSize(*args, **kwargs):
3879 """GetToolSize(self) -> Size"""
3880 return _controls_.ToolBarBase_GetToolSize(*args, **kwargs)
3881
3882 def FindToolForPosition(*args, **kwargs):
3883 """FindToolForPosition(self, int x, int y) -> ToolBarToolBase"""
3884 return _controls_.ToolBarBase_FindToolForPosition(*args, **kwargs)
3885
3886 def FindById(*args, **kwargs):
3887 """FindById(self, int toolid) -> ToolBarToolBase"""
3888 return _controls_.ToolBarBase_FindById(*args, **kwargs)
3889
3890 def IsVertical(*args, **kwargs):
3891 """IsVertical(self) -> bool"""
3892 return _controls_.ToolBarBase_IsVertical(*args, **kwargs)
3893
3894
3895 class ToolBarBasePtr(ToolBarBase):
3896 def __init__(self, this):
3897 self.this = this
3898 if not hasattr(self,"thisown"): self.thisown = 0
3899 self.__class__ = ToolBarBase
3900 _controls_.ToolBarBase_swigregister(ToolBarBasePtr)
3901
3902 class ToolBar(ToolBarBase):
3903 def __repr__(self):
3904 return "<%s.%s; proxy of C++ wxToolBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3905 def __init__(self, *args, **kwargs):
3906 """
3907 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
3908 Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL,
3909 String name=wxPyToolBarNameStr) -> ToolBar
3910 """
3911 newobj = _controls_.new_ToolBar(*args, **kwargs)
3912 self.this = newobj.this
3913 self.thisown = 1
3914 del newobj.thisown
3915 self._setOORInfo(self)
3916
3917 def Create(*args, **kwargs):
3918 """
3919 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
3920 Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL,
3921 String name=wxPyToolBarNameStr) -> bool
3922 """
3923 return _controls_.ToolBar_Create(*args, **kwargs)
3924
3925 def FindToolForPosition(*args, **kwargs):
3926 """FindToolForPosition(self, int x, int y) -> ToolBarToolBase"""
3927 return _controls_.ToolBar_FindToolForPosition(*args, **kwargs)
3928
3929 def GetClassDefaultAttributes(*args, **kwargs):
3930 """
3931 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
3932
3933 Get the default attributes for this class. This is useful if you want
3934 to use the same font or colour in your own control as in a standard
3935 control -- which is a much better idea than hard coding specific
3936 colours or fonts which might look completely out of place on the
3937 user's system, especially if it uses themes.
3938
3939 The variant parameter is only relevant under Mac currently and is
3940 ignore under other platforms. Under Mac, it will change the size of
3941 the returned font. See `wx.Window.SetWindowVariant` for more about
3942 this.
3943 """
3944 return _controls_.ToolBar_GetClassDefaultAttributes(*args, **kwargs)
3945
3946 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
3947
3948 class ToolBarPtr(ToolBar):
3949 def __init__(self, this):
3950 self.this = this
3951 if not hasattr(self,"thisown"): self.thisown = 0
3952 self.__class__ = ToolBar
3953 _controls_.ToolBar_swigregister(ToolBarPtr)
3954
3955 def PreToolBar(*args, **kwargs):
3956 """PreToolBar() -> ToolBar"""
3957 val = _controls_.new_PreToolBar(*args, **kwargs)
3958 val.thisown = 1
3959 return val
3960
3961 def ToolBar_GetClassDefaultAttributes(*args, **kwargs):
3962 """
3963 ToolBar_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
3964
3965 Get the default attributes for this class. This is useful if you want
3966 to use the same font or colour in your own control as in a standard
3967 control -- which is a much better idea than hard coding specific
3968 colours or fonts which might look completely out of place on the
3969 user's system, especially if it uses themes.
3970
3971 The variant parameter is only relevant under Mac currently and is
3972 ignore under other platforms. Under Mac, it will change the size of
3973 the returned font. See `wx.Window.SetWindowVariant` for more about
3974 this.
3975 """
3976 return _controls_.ToolBar_GetClassDefaultAttributes(*args, **kwargs)
3977
3978 #---------------------------------------------------------------------------
3979
3980 LC_VRULES = _controls_.LC_VRULES
3981 LC_HRULES = _controls_.LC_HRULES
3982 LC_ICON = _controls_.LC_ICON
3983 LC_SMALL_ICON = _controls_.LC_SMALL_ICON
3984 LC_LIST = _controls_.LC_LIST
3985 LC_REPORT = _controls_.LC_REPORT
3986 LC_ALIGN_TOP = _controls_.LC_ALIGN_TOP
3987 LC_ALIGN_LEFT = _controls_.LC_ALIGN_LEFT
3988 LC_AUTOARRANGE = _controls_.LC_AUTOARRANGE
3989 LC_VIRTUAL = _controls_.LC_VIRTUAL
3990 LC_EDIT_LABELS = _controls_.LC_EDIT_LABELS
3991 LC_NO_HEADER = _controls_.LC_NO_HEADER
3992 LC_NO_SORT_HEADER = _controls_.LC_NO_SORT_HEADER
3993 LC_SINGLE_SEL = _controls_.LC_SINGLE_SEL
3994 LC_SORT_ASCENDING = _controls_.LC_SORT_ASCENDING
3995 LC_SORT_DESCENDING = _controls_.LC_SORT_DESCENDING
3996 LC_MASK_TYPE = _controls_.LC_MASK_TYPE
3997 LC_MASK_ALIGN = _controls_.LC_MASK_ALIGN
3998 LC_MASK_SORT = _controls_.LC_MASK_SORT
3999 LIST_MASK_STATE = _controls_.LIST_MASK_STATE
4000 LIST_MASK_TEXT = _controls_.LIST_MASK_TEXT
4001 LIST_MASK_IMAGE = _controls_.LIST_MASK_IMAGE
4002 LIST_MASK_DATA = _controls_.LIST_MASK_DATA
4003 LIST_SET_ITEM = _controls_.LIST_SET_ITEM
4004 LIST_MASK_WIDTH = _controls_.LIST_MASK_WIDTH
4005 LIST_MASK_FORMAT = _controls_.LIST_MASK_FORMAT
4006 LIST_STATE_DONTCARE = _controls_.LIST_STATE_DONTCARE
4007 LIST_STATE_DROPHILITED = _controls_.LIST_STATE_DROPHILITED
4008 LIST_STATE_FOCUSED = _controls_.LIST_STATE_FOCUSED
4009 LIST_STATE_SELECTED = _controls_.LIST_STATE_SELECTED
4010 LIST_STATE_CUT = _controls_.LIST_STATE_CUT
4011 LIST_STATE_DISABLED = _controls_.LIST_STATE_DISABLED
4012 LIST_STATE_FILTERED = _controls_.LIST_STATE_FILTERED
4013 LIST_STATE_INUSE = _controls_.LIST_STATE_INUSE
4014 LIST_STATE_PICKED = _controls_.LIST_STATE_PICKED
4015 LIST_STATE_SOURCE = _controls_.LIST_STATE_SOURCE
4016 LIST_HITTEST_ABOVE = _controls_.LIST_HITTEST_ABOVE
4017 LIST_HITTEST_BELOW = _controls_.LIST_HITTEST_BELOW
4018 LIST_HITTEST_NOWHERE = _controls_.LIST_HITTEST_NOWHERE
4019 LIST_HITTEST_ONITEMICON = _controls_.LIST_HITTEST_ONITEMICON
4020 LIST_HITTEST_ONITEMLABEL = _controls_.LIST_HITTEST_ONITEMLABEL
4021 LIST_HITTEST_ONITEMRIGHT = _controls_.LIST_HITTEST_ONITEMRIGHT
4022 LIST_HITTEST_ONITEMSTATEICON = _controls_.LIST_HITTEST_ONITEMSTATEICON
4023 LIST_HITTEST_TOLEFT = _controls_.LIST_HITTEST_TOLEFT
4024 LIST_HITTEST_TORIGHT = _controls_.LIST_HITTEST_TORIGHT
4025 LIST_HITTEST_ONITEM = _controls_.LIST_HITTEST_ONITEM
4026 LIST_NEXT_ABOVE = _controls_.LIST_NEXT_ABOVE
4027 LIST_NEXT_ALL = _controls_.LIST_NEXT_ALL
4028 LIST_NEXT_BELOW = _controls_.LIST_NEXT_BELOW
4029 LIST_NEXT_LEFT = _controls_.LIST_NEXT_LEFT
4030 LIST_NEXT_RIGHT = _controls_.LIST_NEXT_RIGHT
4031 LIST_ALIGN_DEFAULT = _controls_.LIST_ALIGN_DEFAULT
4032 LIST_ALIGN_LEFT = _controls_.LIST_ALIGN_LEFT
4033 LIST_ALIGN_TOP = _controls_.LIST_ALIGN_TOP
4034 LIST_ALIGN_SNAP_TO_GRID = _controls_.LIST_ALIGN_SNAP_TO_GRID
4035 LIST_FORMAT_LEFT = _controls_.LIST_FORMAT_LEFT
4036 LIST_FORMAT_RIGHT = _controls_.LIST_FORMAT_RIGHT
4037 LIST_FORMAT_CENTRE = _controls_.LIST_FORMAT_CENTRE
4038 LIST_FORMAT_CENTER = _controls_.LIST_FORMAT_CENTER
4039 LIST_AUTOSIZE = _controls_.LIST_AUTOSIZE
4040 LIST_AUTOSIZE_USEHEADER = _controls_.LIST_AUTOSIZE_USEHEADER
4041 LIST_RECT_BOUNDS = _controls_.LIST_RECT_BOUNDS
4042 LIST_RECT_ICON = _controls_.LIST_RECT_ICON
4043 LIST_RECT_LABEL = _controls_.LIST_RECT_LABEL
4044 LIST_FIND_UP = _controls_.LIST_FIND_UP
4045 LIST_FIND_DOWN = _controls_.LIST_FIND_DOWN
4046 LIST_FIND_LEFT = _controls_.LIST_FIND_LEFT
4047 LIST_FIND_RIGHT = _controls_.LIST_FIND_RIGHT
4048 #---------------------------------------------------------------------------
4049
4050 class ListItemAttr(object):
4051 def __repr__(self):
4052 return "<%s.%s; proxy of C++ wxListItemAttr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4053 def __init__(self, *args, **kwargs):
4054 """
4055 __init__(self, Colour colText=wxNullColour, Colour colBack=wxNullColour,
4056 Font font=wxNullFont) -> ListItemAttr
4057 """
4058 newobj = _controls_.new_ListItemAttr(*args, **kwargs)
4059 self.this = newobj.this
4060 self.thisown = 1
4061 del newobj.thisown
4062 def SetTextColour(*args, **kwargs):
4063 """SetTextColour(self, Colour colText)"""
4064 return _controls_.ListItemAttr_SetTextColour(*args, **kwargs)
4065
4066 def SetBackgroundColour(*args, **kwargs):
4067 """SetBackgroundColour(self, Colour colBack)"""
4068 return _controls_.ListItemAttr_SetBackgroundColour(*args, **kwargs)
4069
4070 def SetFont(*args, **kwargs):
4071 """SetFont(self, Font font)"""
4072 return _controls_.ListItemAttr_SetFont(*args, **kwargs)
4073
4074 def HasTextColour(*args, **kwargs):
4075 """HasTextColour(self) -> bool"""
4076 return _controls_.ListItemAttr_HasTextColour(*args, **kwargs)
4077
4078 def HasBackgroundColour(*args, **kwargs):
4079 """HasBackgroundColour(self) -> bool"""
4080 return _controls_.ListItemAttr_HasBackgroundColour(*args, **kwargs)
4081
4082 def HasFont(*args, **kwargs):
4083 """HasFont(self) -> bool"""
4084 return _controls_.ListItemAttr_HasFont(*args, **kwargs)
4085
4086 def GetTextColour(*args, **kwargs):
4087 """GetTextColour(self) -> Colour"""
4088 return _controls_.ListItemAttr_GetTextColour(*args, **kwargs)
4089
4090 def GetBackgroundColour(*args, **kwargs):
4091 """GetBackgroundColour(self) -> Colour"""
4092 return _controls_.ListItemAttr_GetBackgroundColour(*args, **kwargs)
4093
4094 def GetFont(*args, **kwargs):
4095 """GetFont(self) -> Font"""
4096 return _controls_.ListItemAttr_GetFont(*args, **kwargs)
4097
4098 def Destroy(*args, **kwargs):
4099 """Destroy(self)"""
4100 return _controls_.ListItemAttr_Destroy(*args, **kwargs)
4101
4102
4103 class ListItemAttrPtr(ListItemAttr):
4104 def __init__(self, this):
4105 self.this = this
4106 if not hasattr(self,"thisown"): self.thisown = 0
4107 self.__class__ = ListItemAttr
4108 _controls_.ListItemAttr_swigregister(ListItemAttrPtr)
4109 ListCtrlNameStr = cvar.ListCtrlNameStr
4110
4111 #---------------------------------------------------------------------------
4112
4113 class ListItem(_core.Object):
4114 def __repr__(self):
4115 return "<%s.%s; proxy of C++ wxListItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4116 def __init__(self, *args, **kwargs):
4117 """__init__(self) -> ListItem"""
4118 newobj = _controls_.new_ListItem(*args, **kwargs)
4119 self.this = newobj.this
4120 self.thisown = 1
4121 del newobj.thisown
4122 def __del__(self, destroy=_controls_.delete_ListItem):
4123 """__del__(self)"""
4124 try:
4125 if self.thisown: destroy(self)
4126 except: pass
4127
4128 def Clear(*args, **kwargs):
4129 """Clear(self)"""
4130 return _controls_.ListItem_Clear(*args, **kwargs)
4131
4132 def ClearAttributes(*args, **kwargs):
4133 """ClearAttributes(self)"""
4134 return _controls_.ListItem_ClearAttributes(*args, **kwargs)
4135
4136 def SetMask(*args, **kwargs):
4137 """SetMask(self, long mask)"""
4138 return _controls_.ListItem_SetMask(*args, **kwargs)
4139
4140 def SetId(*args, **kwargs):
4141 """SetId(self, long id)"""
4142 return _controls_.ListItem_SetId(*args, **kwargs)
4143
4144 def SetColumn(*args, **kwargs):
4145 """SetColumn(self, int col)"""
4146 return _controls_.ListItem_SetColumn(*args, **kwargs)
4147
4148 def SetState(*args, **kwargs):
4149 """SetState(self, long state)"""
4150 return _controls_.ListItem_SetState(*args, **kwargs)
4151
4152 def SetStateMask(*args, **kwargs):
4153 """SetStateMask(self, long stateMask)"""
4154 return _controls_.ListItem_SetStateMask(*args, **kwargs)
4155
4156 def SetText(*args, **kwargs):
4157 """SetText(self, String text)"""
4158 return _controls_.ListItem_SetText(*args, **kwargs)
4159
4160 def SetImage(*args, **kwargs):
4161 """SetImage(self, int image)"""
4162 return _controls_.ListItem_SetImage(*args, **kwargs)
4163
4164 def SetData(*args, **kwargs):
4165 """SetData(self, long data)"""
4166 return _controls_.ListItem_SetData(*args, **kwargs)
4167
4168 def SetWidth(*args, **kwargs):
4169 """SetWidth(self, int width)"""
4170 return _controls_.ListItem_SetWidth(*args, **kwargs)
4171
4172 def SetAlign(*args, **kwargs):
4173 """SetAlign(self, int align)"""
4174 return _controls_.ListItem_SetAlign(*args, **kwargs)
4175
4176 def SetTextColour(*args, **kwargs):
4177 """SetTextColour(self, Colour colText)"""
4178 return _controls_.ListItem_SetTextColour(*args, **kwargs)
4179
4180 def SetBackgroundColour(*args, **kwargs):
4181 """SetBackgroundColour(self, Colour colBack)"""
4182 return _controls_.ListItem_SetBackgroundColour(*args, **kwargs)
4183
4184 def SetFont(*args, **kwargs):
4185 """SetFont(self, Font font)"""
4186 return _controls_.ListItem_SetFont(*args, **kwargs)
4187
4188 def GetMask(*args, **kwargs):
4189 """GetMask(self) -> long"""
4190 return _controls_.ListItem_GetMask(*args, **kwargs)
4191
4192 def GetId(*args, **kwargs):
4193 """GetId(self) -> long"""
4194 return _controls_.ListItem_GetId(*args, **kwargs)
4195
4196 def GetColumn(*args, **kwargs):
4197 """GetColumn(self) -> int"""
4198 return _controls_.ListItem_GetColumn(*args, **kwargs)
4199
4200 def GetState(*args, **kwargs):
4201 """GetState(self) -> long"""
4202 return _controls_.ListItem_GetState(*args, **kwargs)
4203
4204 def GetText(*args, **kwargs):
4205 """GetText(self) -> String"""
4206 return _controls_.ListItem_GetText(*args, **kwargs)
4207
4208 def GetImage(*args, **kwargs):
4209 """GetImage(self) -> int"""
4210 return _controls_.ListItem_GetImage(*args, **kwargs)
4211
4212 def GetData(*args, **kwargs):
4213 """GetData(self) -> long"""
4214 return _controls_.ListItem_GetData(*args, **kwargs)
4215
4216 def GetWidth(*args, **kwargs):
4217 """GetWidth(self) -> int"""
4218 return _controls_.ListItem_GetWidth(*args, **kwargs)
4219
4220 def GetAlign(*args, **kwargs):
4221 """GetAlign(self) -> int"""
4222 return _controls_.ListItem_GetAlign(*args, **kwargs)
4223
4224 def GetAttributes(*args, **kwargs):
4225 """GetAttributes(self) -> ListItemAttr"""
4226 return _controls_.ListItem_GetAttributes(*args, **kwargs)
4227
4228 def HasAttributes(*args, **kwargs):
4229 """HasAttributes(self) -> bool"""
4230 return _controls_.ListItem_HasAttributes(*args, **kwargs)
4231
4232 def GetTextColour(*args, **kwargs):
4233 """GetTextColour(self) -> Colour"""
4234 return _controls_.ListItem_GetTextColour(*args, **kwargs)
4235
4236 def GetBackgroundColour(*args, **kwargs):
4237 """GetBackgroundColour(self) -> Colour"""
4238 return _controls_.ListItem_GetBackgroundColour(*args, **kwargs)
4239
4240 def GetFont(*args, **kwargs):
4241 """GetFont(self) -> Font"""
4242 return _controls_.ListItem_GetFont(*args, **kwargs)
4243
4244 m_mask = property(_controls_.ListItem_m_mask_get, _controls_.ListItem_m_mask_set)
4245 m_itemId = property(_controls_.ListItem_m_itemId_get, _controls_.ListItem_m_itemId_set)
4246 m_col = property(_controls_.ListItem_m_col_get, _controls_.ListItem_m_col_set)
4247 m_state = property(_controls_.ListItem_m_state_get, _controls_.ListItem_m_state_set)
4248 m_stateMask = property(_controls_.ListItem_m_stateMask_get, _controls_.ListItem_m_stateMask_set)
4249 m_text = property(_controls_.ListItem_m_text_get, _controls_.ListItem_m_text_set)
4250 m_image = property(_controls_.ListItem_m_image_get, _controls_.ListItem_m_image_set)
4251 m_data = property(_controls_.ListItem_m_data_get, _controls_.ListItem_m_data_set)
4252 m_format = property(_controls_.ListItem_m_format_get, _controls_.ListItem_m_format_set)
4253 m_width = property(_controls_.ListItem_m_width_get, _controls_.ListItem_m_width_set)
4254
4255 class ListItemPtr(ListItem):
4256 def __init__(self, this):
4257 self.this = this
4258 if not hasattr(self,"thisown"): self.thisown = 0
4259 self.__class__ = ListItem
4260 _controls_.ListItem_swigregister(ListItemPtr)
4261
4262 #---------------------------------------------------------------------------
4263
4264 class ListEvent(_core.NotifyEvent):
4265 def __repr__(self):
4266 return "<%s.%s; proxy of C++ wxListEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4267 def __init__(self, *args, **kwargs):
4268 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> ListEvent"""
4269 newobj = _controls_.new_ListEvent(*args, **kwargs)
4270 self.this = newobj.this
4271 self.thisown = 1
4272 del newobj.thisown
4273 m_code = property(_controls_.ListEvent_m_code_get, _controls_.ListEvent_m_code_set)
4274 m_oldItemIndex = property(_controls_.ListEvent_m_oldItemIndex_get, _controls_.ListEvent_m_oldItemIndex_set)
4275 m_itemIndex = property(_controls_.ListEvent_m_itemIndex_get, _controls_.ListEvent_m_itemIndex_set)
4276 m_col = property(_controls_.ListEvent_m_col_get, _controls_.ListEvent_m_col_set)
4277 m_pointDrag = property(_controls_.ListEvent_m_pointDrag_get, _controls_.ListEvent_m_pointDrag_set)
4278 m_item = property(_controls_.ListEvent_m_item_get)
4279 def GetKeyCode(*args, **kwargs):
4280 """GetKeyCode(self) -> int"""
4281 return _controls_.ListEvent_GetKeyCode(*args, **kwargs)
4282
4283 GetCode = GetKeyCode
4284 def GetIndex(*args, **kwargs):
4285 """GetIndex(self) -> long"""
4286 return _controls_.ListEvent_GetIndex(*args, **kwargs)
4287
4288 def GetColumn(*args, **kwargs):
4289 """GetColumn(self) -> int"""
4290 return _controls_.ListEvent_GetColumn(*args, **kwargs)
4291
4292 def GetPoint(*args, **kwargs):
4293 """GetPoint(self) -> Point"""
4294 return _controls_.ListEvent_GetPoint(*args, **kwargs)
4295
4296 GetPosition = GetPoint
4297 def GetLabel(*args, **kwargs):
4298 """GetLabel(self) -> String"""
4299 return _controls_.ListEvent_GetLabel(*args, **kwargs)
4300
4301 def GetText(*args, **kwargs):
4302 """GetText(self) -> String"""
4303 return _controls_.ListEvent_GetText(*args, **kwargs)
4304
4305 def GetImage(*args, **kwargs):
4306 """GetImage(self) -> int"""
4307 return _controls_.ListEvent_GetImage(*args, **kwargs)
4308
4309 def GetData(*args, **kwargs):
4310 """GetData(self) -> long"""
4311 return _controls_.ListEvent_GetData(*args, **kwargs)
4312
4313 def GetMask(*args, **kwargs):
4314 """GetMask(self) -> long"""
4315 return _controls_.ListEvent_GetMask(*args, **kwargs)
4316
4317 def GetItem(*args, **kwargs):
4318 """GetItem(self) -> ListItem"""
4319 return _controls_.ListEvent_GetItem(*args, **kwargs)
4320
4321 def GetCacheFrom(*args, **kwargs):
4322 """GetCacheFrom(self) -> long"""
4323 return _controls_.ListEvent_GetCacheFrom(*args, **kwargs)
4324
4325 def GetCacheTo(*args, **kwargs):
4326 """GetCacheTo(self) -> long"""
4327 return _controls_.ListEvent_GetCacheTo(*args, **kwargs)
4328
4329 def IsEditCancelled(*args, **kwargs):
4330 """IsEditCancelled(self) -> bool"""
4331 return _controls_.ListEvent_IsEditCancelled(*args, **kwargs)
4332
4333 def SetEditCanceled(*args, **kwargs):
4334 """SetEditCanceled(self, bool editCancelled)"""
4335 return _controls_.ListEvent_SetEditCanceled(*args, **kwargs)
4336
4337
4338 class ListEventPtr(ListEvent):
4339 def __init__(self, this):
4340 self.this = this
4341 if not hasattr(self,"thisown"): self.thisown = 0
4342 self.__class__ = ListEvent
4343 _controls_.ListEvent_swigregister(ListEventPtr)
4344
4345 wxEVT_COMMAND_LIST_BEGIN_DRAG = _controls_.wxEVT_COMMAND_LIST_BEGIN_DRAG
4346 wxEVT_COMMAND_LIST_BEGIN_RDRAG = _controls_.wxEVT_COMMAND_LIST_BEGIN_RDRAG
4347 wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = _controls_.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
4348 wxEVT_COMMAND_LIST_END_LABEL_EDIT = _controls_.wxEVT_COMMAND_LIST_END_LABEL_EDIT
4349 wxEVT_COMMAND_LIST_DELETE_ITEM = _controls_.wxEVT_COMMAND_LIST_DELETE_ITEM
4350 wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = _controls_.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
4351 wxEVT_COMMAND_LIST_GET_INFO = _controls_.wxEVT_COMMAND_LIST_GET_INFO
4352 wxEVT_COMMAND_LIST_SET_INFO = _controls_.wxEVT_COMMAND_LIST_SET_INFO
4353 wxEVT_COMMAND_LIST_ITEM_SELECTED = _controls_.wxEVT_COMMAND_LIST_ITEM_SELECTED
4354 wxEVT_COMMAND_LIST_ITEM_DESELECTED = _controls_.wxEVT_COMMAND_LIST_ITEM_DESELECTED
4355 wxEVT_COMMAND_LIST_KEY_DOWN = _controls_.wxEVT_COMMAND_LIST_KEY_DOWN
4356 wxEVT_COMMAND_LIST_INSERT_ITEM = _controls_.wxEVT_COMMAND_LIST_INSERT_ITEM
4357 wxEVT_COMMAND_LIST_COL_CLICK = _controls_.wxEVT_COMMAND_LIST_COL_CLICK
4358 wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK = _controls_.wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK
4359 wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK = _controls_.wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK
4360 wxEVT_COMMAND_LIST_ITEM_ACTIVATED = _controls_.wxEVT_COMMAND_LIST_ITEM_ACTIVATED
4361 wxEVT_COMMAND_LIST_CACHE_HINT = _controls_.wxEVT_COMMAND_LIST_CACHE_HINT
4362 wxEVT_COMMAND_LIST_COL_RIGHT_CLICK = _controls_.wxEVT_COMMAND_LIST_COL_RIGHT_CLICK
4363 wxEVT_COMMAND_LIST_COL_BEGIN_DRAG = _controls_.wxEVT_COMMAND_LIST_COL_BEGIN_DRAG
4364 wxEVT_COMMAND_LIST_COL_DRAGGING = _controls_.wxEVT_COMMAND_LIST_COL_DRAGGING
4365 wxEVT_COMMAND_LIST_COL_END_DRAG = _controls_.wxEVT_COMMAND_LIST_COL_END_DRAG
4366 wxEVT_COMMAND_LIST_ITEM_FOCUSED = _controls_.wxEVT_COMMAND_LIST_ITEM_FOCUSED
4367 EVT_LIST_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_BEGIN_DRAG , 1)
4368 EVT_LIST_BEGIN_RDRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_BEGIN_RDRAG , 1)
4369 EVT_LIST_BEGIN_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT , 1)
4370 EVT_LIST_END_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_LIST_END_LABEL_EDIT , 1)
4371 EVT_LIST_DELETE_ITEM = wx.PyEventBinder(wxEVT_COMMAND_LIST_DELETE_ITEM , 1)
4372 EVT_LIST_DELETE_ALL_ITEMS = wx.PyEventBinder(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS , 1)
4373 EVT_LIST_GET_INFO = wx.PyEventBinder(wxEVT_COMMAND_LIST_GET_INFO , 1)
4374 EVT_LIST_SET_INFO = wx.PyEventBinder(wxEVT_COMMAND_LIST_SET_INFO , 1)
4375 EVT_LIST_ITEM_SELECTED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_SELECTED , 1)
4376 EVT_LIST_ITEM_DESELECTED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_DESELECTED , 1)
4377 EVT_LIST_KEY_DOWN = wx.PyEventBinder(wxEVT_COMMAND_LIST_KEY_DOWN , 1)
4378 EVT_LIST_INSERT_ITEM = wx.PyEventBinder(wxEVT_COMMAND_LIST_INSERT_ITEM , 1)
4379 EVT_LIST_COL_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_CLICK , 1)
4380 EVT_LIST_ITEM_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK , 1)
4381 EVT_LIST_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, 1)
4382 EVT_LIST_ITEM_ACTIVATED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_ACTIVATED , 1)
4383 EVT_LIST_CACHE_HINT = wx.PyEventBinder(wxEVT_COMMAND_LIST_CACHE_HINT , 1)
4384 EVT_LIST_COL_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_RIGHT_CLICK , 1)
4385 EVT_LIST_COL_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_BEGIN_DRAG , 1)
4386 EVT_LIST_COL_DRAGGING = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_DRAGGING , 1)
4387 EVT_LIST_COL_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_END_DRAG , 1)
4388 EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED , 1)
4389
4390 EVT_LIST_GET_INFO = wx._deprecated(EVT_LIST_GET_INFO)
4391 EVT_LIST_SET_INFO = wx._deprecated(EVT_LIST_SET_INFO)
4392
4393 #---------------------------------------------------------------------------
4394
4395 class ListCtrl(_core.Control):
4396 def __repr__(self):
4397 return "<%s.%s; proxy of C++ wxPyListCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4398 def __init__(self, *args, **kwargs):
4399 """
4400 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
4401 Size size=DefaultSize, long style=LC_ICON,
4402 Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListCtrl
4403 """
4404 newobj = _controls_.new_ListCtrl(*args, **kwargs)
4405 self.this = newobj.this
4406 self.thisown = 1
4407 del newobj.thisown
4408 self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)
4409
4410 def Create(*args, **kwargs):
4411 """
4412 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
4413 Size size=DefaultSize, long style=LC_ICON,
4414 Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool
4415
4416 Do the 2nd phase and create the GUI control.
4417 """
4418 return _controls_.ListCtrl_Create(*args, **kwargs)
4419
4420 def _setCallbackInfo(*args, **kwargs):
4421 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4422 return _controls_.ListCtrl__setCallbackInfo(*args, **kwargs)
4423
4424 def SetForegroundColour(*args, **kwargs):
4425 """SetForegroundColour(self, Colour col) -> bool"""
4426 return _controls_.ListCtrl_SetForegroundColour(*args, **kwargs)
4427
4428 def SetBackgroundColour(*args, **kwargs):
4429 """SetBackgroundColour(self, Colour col) -> bool"""
4430 return _controls_.ListCtrl_SetBackgroundColour(*args, **kwargs)
4431
4432 def GetColumn(*args, **kwargs):
4433 """GetColumn(self, int col) -> ListItem"""
4434 val = _controls_.ListCtrl_GetColumn(*args, **kwargs)
4435 if val is not None: val.thisown = 1
4436 return val
4437
4438 def SetColumn(*args, **kwargs):
4439 """SetColumn(self, int col, ListItem item) -> bool"""
4440 return _controls_.ListCtrl_SetColumn(*args, **kwargs)
4441
4442 def GetColumnWidth(*args, **kwargs):
4443 """GetColumnWidth(self, int col) -> int"""
4444 return _controls_.ListCtrl_GetColumnWidth(*args, **kwargs)
4445
4446 def SetColumnWidth(*args, **kwargs):
4447 """SetColumnWidth(self, int col, int width) -> bool"""
4448 return _controls_.ListCtrl_SetColumnWidth(*args, **kwargs)
4449
4450 def GetCountPerPage(*args, **kwargs):
4451 """GetCountPerPage(self) -> int"""
4452 return _controls_.ListCtrl_GetCountPerPage(*args, **kwargs)
4453
4454 def GetViewRect(*args, **kwargs):
4455 """GetViewRect(self) -> Rect"""
4456 return _controls_.ListCtrl_GetViewRect(*args, **kwargs)
4457
4458 def GetItem(*args, **kwargs):
4459 """GetItem(self, long itemId, int col=0) -> ListItem"""
4460 val = _controls_.ListCtrl_GetItem(*args, **kwargs)
4461 if val is not None: val.thisown = 1
4462 return val
4463
4464 def SetItem(*args, **kwargs):
4465 """SetItem(self, ListItem info) -> bool"""
4466 return _controls_.ListCtrl_SetItem(*args, **kwargs)
4467
4468 def SetStringItem(*args, **kwargs):
4469 """SetStringItem(self, long index, int col, String label, int imageId=-1) -> long"""
4470 return _controls_.ListCtrl_SetStringItem(*args, **kwargs)
4471
4472 def GetItemState(*args, **kwargs):
4473 """GetItemState(self, long item, long stateMask) -> int"""
4474 return _controls_.ListCtrl_GetItemState(*args, **kwargs)
4475
4476 def SetItemState(*args, **kwargs):
4477 """SetItemState(self, long item, long state, long stateMask) -> bool"""
4478 return _controls_.ListCtrl_SetItemState(*args, **kwargs)
4479
4480 def SetItemImage(*args, **kwargs):
4481 """SetItemImage(self, long item, int image, int selImage=-1) -> bool"""
4482 return _controls_.ListCtrl_SetItemImage(*args, **kwargs)
4483
4484 def GetItemText(*args, **kwargs):
4485 """GetItemText(self, long item) -> String"""
4486 return _controls_.ListCtrl_GetItemText(*args, **kwargs)
4487
4488 def SetItemText(*args, **kwargs):
4489 """SetItemText(self, long item, String str)"""
4490 return _controls_.ListCtrl_SetItemText(*args, **kwargs)
4491
4492 def GetItemData(*args, **kwargs):
4493 """GetItemData(self, long item) -> long"""
4494 return _controls_.ListCtrl_GetItemData(*args, **kwargs)
4495
4496 def SetItemData(*args, **kwargs):
4497 """SetItemData(self, long item, long data) -> bool"""
4498 return _controls_.ListCtrl_SetItemData(*args, **kwargs)
4499
4500 def GetItemPosition(*args, **kwargs):
4501 """GetItemPosition(self, long item) -> Point"""
4502 return _controls_.ListCtrl_GetItemPosition(*args, **kwargs)
4503
4504 def GetItemRect(*args, **kwargs):
4505 """GetItemRect(self, long item, int code=LIST_RECT_BOUNDS) -> Rect"""
4506 return _controls_.ListCtrl_GetItemRect(*args, **kwargs)
4507
4508 def SetItemPosition(*args, **kwargs):
4509 """SetItemPosition(self, long item, Point pos) -> bool"""
4510 return _controls_.ListCtrl_SetItemPosition(*args, **kwargs)
4511
4512 def GetItemCount(*args, **kwargs):
4513 """GetItemCount(self) -> int"""
4514 return _controls_.ListCtrl_GetItemCount(*args, **kwargs)
4515
4516 def GetColumnCount(*args, **kwargs):
4517 """GetColumnCount(self) -> int"""
4518 return _controls_.ListCtrl_GetColumnCount(*args, **kwargs)
4519
4520 def GetItemSpacing(*args, **kwargs):
4521 """GetItemSpacing(self) -> Size"""
4522 return _controls_.ListCtrl_GetItemSpacing(*args, **kwargs)
4523
4524 def SetItemSpacing(*args, **kwargs):
4525 """SetItemSpacing(self, int spacing, bool isSmall=False)"""
4526 return _controls_.ListCtrl_SetItemSpacing(*args, **kwargs)
4527
4528 def GetSelectedItemCount(*args, **kwargs):
4529 """GetSelectedItemCount(self) -> int"""
4530 return _controls_.ListCtrl_GetSelectedItemCount(*args, **kwargs)
4531
4532 def GetTextColour(*args, **kwargs):
4533 """GetTextColour(self) -> Colour"""
4534 return _controls_.ListCtrl_GetTextColour(*args, **kwargs)
4535
4536 def SetTextColour(*args, **kwargs):
4537 """SetTextColour(self, Colour col)"""
4538 return _controls_.ListCtrl_SetTextColour(*args, **kwargs)
4539
4540 def GetTopItem(*args, **kwargs):
4541 """GetTopItem(self) -> long"""
4542 return _controls_.ListCtrl_GetTopItem(*args, **kwargs)
4543
4544 def SetSingleStyle(*args, **kwargs):
4545 """SetSingleStyle(self, long style, bool add=True)"""
4546 return _controls_.ListCtrl_SetSingleStyle(*args, **kwargs)
4547
4548 def SetWindowStyleFlag(*args, **kwargs):
4549 """
4550 SetWindowStyleFlag(self, long style)
4551
4552 Sets the style of the window. Please note that some styles cannot be
4553 changed after the window creation and that Refresh() might need to be
4554 called after changing the others for the change to take place
4555 immediately.
4556 """
4557 return _controls_.ListCtrl_SetWindowStyleFlag(*args, **kwargs)
4558
4559 def GetNextItem(*args, **kwargs):
4560 """GetNextItem(self, long item, int geometry=LIST_NEXT_ALL, int state=LIST_STATE_DONTCARE) -> long"""
4561 return _controls_.ListCtrl_GetNextItem(*args, **kwargs)
4562
4563 def GetImageList(*args, **kwargs):
4564 """GetImageList(self, int which) -> ImageList"""
4565 return _controls_.ListCtrl_GetImageList(*args, **kwargs)
4566
4567 def SetImageList(*args, **kwargs):
4568 """SetImageList(self, ImageList imageList, int which)"""
4569 return _controls_.ListCtrl_SetImageList(*args, **kwargs)
4570
4571 def AssignImageList(*args, **kwargs):
4572 """AssignImageList(self, ImageList imageList, int which)"""
4573 return _controls_.ListCtrl_AssignImageList(*args, **kwargs)
4574
4575 def InReportView(*args, **kwargs):
4576 """InReportView(self) -> bool"""
4577 return _controls_.ListCtrl_InReportView(*args, **kwargs)
4578
4579 def IsVirtual(*args, **kwargs):
4580 """IsVirtual(self) -> bool"""
4581 return _controls_.ListCtrl_IsVirtual(*args, **kwargs)
4582
4583 def RefreshItem(*args, **kwargs):
4584 """RefreshItem(self, long item)"""
4585 return _controls_.ListCtrl_RefreshItem(*args, **kwargs)
4586
4587 def RefreshItems(*args, **kwargs):
4588 """RefreshItems(self, long itemFrom, long itemTo)"""
4589 return _controls_.ListCtrl_RefreshItems(*args, **kwargs)
4590
4591 def Arrange(*args, **kwargs):
4592 """Arrange(self, int flag=LIST_ALIGN_DEFAULT) -> bool"""
4593 return _controls_.ListCtrl_Arrange(*args, **kwargs)
4594
4595 def DeleteItem(*args, **kwargs):
4596 """DeleteItem(self, long item) -> bool"""
4597 return _controls_.ListCtrl_DeleteItem(*args, **kwargs)
4598
4599 def DeleteAllItems(*args, **kwargs):
4600 """DeleteAllItems(self) -> bool"""
4601 return _controls_.ListCtrl_DeleteAllItems(*args, **kwargs)
4602
4603 def DeleteColumn(*args, **kwargs):
4604 """DeleteColumn(self, int col) -> bool"""
4605 return _controls_.ListCtrl_DeleteColumn(*args, **kwargs)
4606
4607 def DeleteAllColumns(*args, **kwargs):
4608 """DeleteAllColumns(self) -> bool"""
4609 return _controls_.ListCtrl_DeleteAllColumns(*args, **kwargs)
4610
4611 def ClearAll(*args, **kwargs):
4612 """ClearAll(self)"""
4613 return _controls_.ListCtrl_ClearAll(*args, **kwargs)
4614
4615 def EditLabel(*args, **kwargs):
4616 """EditLabel(self, long item)"""
4617 return _controls_.ListCtrl_EditLabel(*args, **kwargs)
4618
4619 def EnsureVisible(*args, **kwargs):
4620 """EnsureVisible(self, long item) -> bool"""
4621 return _controls_.ListCtrl_EnsureVisible(*args, **kwargs)
4622
4623 def FindItem(*args, **kwargs):
4624 """FindItem(self, long start, String str, bool partial=False) -> long"""
4625 return _controls_.ListCtrl_FindItem(*args, **kwargs)
4626
4627 def FindItemData(*args, **kwargs):
4628 """FindItemData(self, long start, long data) -> long"""
4629 return _controls_.ListCtrl_FindItemData(*args, **kwargs)
4630
4631 def FindItemAtPos(*args, **kwargs):
4632 """FindItemAtPos(self, long start, Point pt, int direction) -> long"""
4633 return _controls_.ListCtrl_FindItemAtPos(*args, **kwargs)
4634
4635 def HitTest(*args, **kwargs):
4636 """
4637 HitTest(Point point) -> (item, where)
4638
4639 Determines which item (if any) is at the specified point, giving
4640 in the second return value (see wxLIST_HITTEST_... flags.)
4641 """
4642 return _controls_.ListCtrl_HitTest(*args, **kwargs)
4643
4644 def InsertItem(*args, **kwargs):
4645 """InsertItem(self, ListItem info) -> long"""
4646 return _controls_.ListCtrl_InsertItem(*args, **kwargs)
4647
4648 def InsertStringItem(*args, **kwargs):
4649 """InsertStringItem(self, long index, String label) -> long"""
4650 return _controls_.ListCtrl_InsertStringItem(*args, **kwargs)
4651
4652 def InsertImageItem(*args, **kwargs):
4653 """InsertImageItem(self, long index, int imageIndex) -> long"""
4654 return _controls_.ListCtrl_InsertImageItem(*args, **kwargs)
4655
4656 def InsertImageStringItem(*args, **kwargs):
4657 """InsertImageStringItem(self, long index, String label, int imageIndex) -> long"""
4658 return _controls_.ListCtrl_InsertImageStringItem(*args, **kwargs)
4659
4660 def InsertColumnInfo(*args, **kwargs):
4661 """InsertColumnInfo(self, long col, ListItem info) -> long"""
4662 return _controls_.ListCtrl_InsertColumnInfo(*args, **kwargs)
4663
4664 def InsertColumn(*args, **kwargs):
4665 """
4666 InsertColumn(self, long col, String heading, int format=LIST_FORMAT_LEFT,
4667 int width=-1) -> long
4668 """
4669 return _controls_.ListCtrl_InsertColumn(*args, **kwargs)
4670
4671 def SetItemCount(*args, **kwargs):
4672 """SetItemCount(self, long count)"""
4673 return _controls_.ListCtrl_SetItemCount(*args, **kwargs)
4674
4675 def ScrollList(*args, **kwargs):
4676 """ScrollList(self, int dx, int dy) -> bool"""
4677 return _controls_.ListCtrl_ScrollList(*args, **kwargs)
4678
4679 def SetItemTextColour(*args, **kwargs):
4680 """SetItemTextColour(self, long item, Colour col)"""
4681 return _controls_.ListCtrl_SetItemTextColour(*args, **kwargs)
4682
4683 def GetItemTextColour(*args, **kwargs):
4684 """GetItemTextColour(self, long item) -> Colour"""
4685 return _controls_.ListCtrl_GetItemTextColour(*args, **kwargs)
4686
4687 def SetItemBackgroundColour(*args, **kwargs):
4688 """SetItemBackgroundColour(self, long item, Colour col)"""
4689 return _controls_.ListCtrl_SetItemBackgroundColour(*args, **kwargs)
4690
4691 def GetItemBackgroundColour(*args, **kwargs):
4692 """GetItemBackgroundColour(self, long item) -> Colour"""
4693 return _controls_.ListCtrl_GetItemBackgroundColour(*args, **kwargs)
4694
4695 #
4696 # Some helpers...
4697 def Select(self, idx, on=1):
4698 '''[de]select an item'''
4699 if on: state = wx.LIST_STATE_SELECTED
4700 else: state = 0
4701 self.SetItemState(idx, state, wx.LIST_STATE_SELECTED)
4702
4703 def Focus(self, idx):
4704 '''Focus and show the given item'''
4705 self.SetItemState(idx, wx.LIST_STATE_FOCUSED, wx.LIST_STATE_FOCUSED)
4706 self.EnsureVisible(idx)
4707
4708 def GetFocusedItem(self):
4709 '''get the currently focused item or -1 if none'''
4710 return self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_FOCUSED)
4711
4712 def GetFirstSelected(self, *args):
4713 '''return first selected item, or -1 when none'''
4714 return self.GetNextSelected(-1)
4715
4716 def GetNextSelected(self, item):
4717 '''return subsequent selected items, or -1 when no more'''
4718 return self.GetNextItem(item, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
4719
4720 def IsSelected(self, idx):
4721 '''return True if the item is selected'''
4722 return self.GetItemState(idx, wx.LIST_STATE_SELECTED) != 0
4723
4724 def SetColumnImage(self, col, image):
4725 item = self.GetColumn(col)
4726 # preserve all other attributes too
4727 item.SetMask( wx.LIST_MASK_STATE |
4728 wx.LIST_MASK_TEXT |
4729 wx.LIST_MASK_IMAGE |
4730 wx.LIST_MASK_DATA |
4731 wx.LIST_SET_ITEM |
4732 wx.LIST_MASK_WIDTH |
4733 wx.LIST_MASK_FORMAT )
4734 item.SetImage(image)
4735 self.SetColumn(col, item)
4736
4737 def ClearColumnImage(self, col):
4738 self.SetColumnImage(col, -1)
4739
4740 def Append(self, entry):
4741 '''Append an item to the list control. The entry parameter should be a
4742 sequence with an item for each column'''
4743 if len(entry):
4744 if wx.USE_UNICODE:
4745 cvtfunc = unicode
4746 else:
4747 cvtfunc = str
4748 pos = self.GetItemCount()
4749 self.InsertStringItem(pos, cvtfunc(entry[0]))
4750 for i in range(1, len(entry)):
4751 self.SetStringItem(pos, i, cvtfunc(entry[i]))
4752 return pos
4753
4754 def SortItems(*args, **kwargs):
4755 """SortItems(self, PyObject func) -> bool"""
4756 return _controls_.ListCtrl_SortItems(*args, **kwargs)
4757
4758 def GetMainWindow(*args, **kwargs):
4759 """GetMainWindow(self) -> Window"""
4760 return _controls_.ListCtrl_GetMainWindow(*args, **kwargs)
4761
4762 def GetClassDefaultAttributes(*args, **kwargs):
4763 """
4764 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
4765
4766 Get the default attributes for this class. This is useful if you want
4767 to use the same font or colour in your own control as in a standard
4768 control -- which is a much better idea than hard coding specific
4769 colours or fonts which might look completely out of place on the
4770 user's system, especially if it uses themes.
4771
4772 The variant parameter is only relevant under Mac currently and is
4773 ignore under other platforms. Under Mac, it will change the size of
4774 the returned font. See `wx.Window.SetWindowVariant` for more about
4775 this.
4776 """
4777 return _controls_.ListCtrl_GetClassDefaultAttributes(*args, **kwargs)
4778
4779 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
4780
4781 class ListCtrlPtr(ListCtrl):
4782 def __init__(self, this):
4783 self.this = this
4784 if not hasattr(self,"thisown"): self.thisown = 0
4785 self.__class__ = ListCtrl
4786 _controls_.ListCtrl_swigregister(ListCtrlPtr)
4787
4788 def PreListCtrl(*args, **kwargs):
4789 """PreListCtrl() -> ListCtrl"""
4790 val = _controls_.new_PreListCtrl(*args, **kwargs)
4791 val.thisown = 1
4792 return val
4793
4794 def ListCtrl_GetClassDefaultAttributes(*args, **kwargs):
4795 """
4796 ListCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
4797
4798 Get the default attributes for this class. This is useful if you want
4799 to use the same font or colour in your own control as in a standard
4800 control -- which is a much better idea than hard coding specific
4801 colours or fonts which might look completely out of place on the
4802 user's system, especially if it uses themes.
4803
4804 The variant parameter is only relevant under Mac currently and is
4805 ignore under other platforms. Under Mac, it will change the size of
4806 the returned font. See `wx.Window.SetWindowVariant` for more about
4807 this.
4808 """
4809 return _controls_.ListCtrl_GetClassDefaultAttributes(*args, **kwargs)
4810
4811 #---------------------------------------------------------------------------
4812
4813 class ListView(ListCtrl):
4814 def __repr__(self):
4815 return "<%s.%s; proxy of C++ wxListView instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4816 def __init__(self, *args, **kwargs):
4817 """
4818 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
4819 Size size=DefaultSize, long style=LC_REPORT,
4820 Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> ListView
4821 """
4822 newobj = _controls_.new_ListView(*args, **kwargs)
4823 self.this = newobj.this
4824 self.thisown = 1
4825 del newobj.thisown
4826 self._setOORInfo(self)
4827
4828 def Create(*args, **kwargs):
4829 """
4830 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
4831 Size size=DefaultSize, long style=LC_REPORT,
4832 Validator validator=DefaultValidator, String name=ListCtrlNameStr) -> bool
4833
4834 Do the 2nd phase and create the GUI control.
4835 """
4836 return _controls_.ListView_Create(*args, **kwargs)
4837
4838 def Select(*args, **kwargs):
4839 """Select(self, long n, bool on=True)"""
4840 return _controls_.ListView_Select(*args, **kwargs)
4841
4842 def Focus(*args, **kwargs):
4843 """Focus(self, long index)"""
4844 return _controls_.ListView_Focus(*args, **kwargs)
4845
4846 def GetFocusedItem(*args, **kwargs):
4847 """GetFocusedItem(self) -> long"""
4848 return _controls_.ListView_GetFocusedItem(*args, **kwargs)
4849
4850 def GetNextSelected(*args, **kwargs):
4851 """GetNextSelected(self, long item) -> long"""
4852 return _controls_.ListView_GetNextSelected(*args, **kwargs)
4853
4854 def GetFirstSelected(*args, **kwargs):
4855 """GetFirstSelected(self) -> long"""
4856 return _controls_.ListView_GetFirstSelected(*args, **kwargs)
4857
4858 def IsSelected(*args, **kwargs):
4859 """IsSelected(self, long index) -> bool"""
4860 return _controls_.ListView_IsSelected(*args, **kwargs)
4861
4862 def SetColumnImage(*args, **kwargs):
4863 """SetColumnImage(self, int col, int image)"""
4864 return _controls_.ListView_SetColumnImage(*args, **kwargs)
4865
4866 def ClearColumnImage(*args, **kwargs):
4867 """ClearColumnImage(self, int col)"""
4868 return _controls_.ListView_ClearColumnImage(*args, **kwargs)
4869
4870
4871 class ListViewPtr(ListView):
4872 def __init__(self, this):
4873 self.this = this
4874 if not hasattr(self,"thisown"): self.thisown = 0
4875 self.__class__ = ListView
4876 _controls_.ListView_swigregister(ListViewPtr)
4877
4878 def PreListView(*args, **kwargs):
4879 """PreListView() -> ListView"""
4880 val = _controls_.new_PreListView(*args, **kwargs)
4881 val.thisown = 1
4882 return val
4883
4884 #---------------------------------------------------------------------------
4885
4886 TR_NO_BUTTONS = _controls_.TR_NO_BUTTONS
4887 TR_HAS_BUTTONS = _controls_.TR_HAS_BUTTONS
4888 TR_NO_LINES = _controls_.TR_NO_LINES
4889 TR_LINES_AT_ROOT = _controls_.TR_LINES_AT_ROOT
4890 TR_SINGLE = _controls_.TR_SINGLE
4891 TR_MULTIPLE = _controls_.TR_MULTIPLE
4892 TR_EXTENDED = _controls_.TR_EXTENDED
4893 TR_HAS_VARIABLE_ROW_HEIGHT = _controls_.TR_HAS_VARIABLE_ROW_HEIGHT
4894 TR_EDIT_LABELS = _controls_.TR_EDIT_LABELS
4895 TR_HIDE_ROOT = _controls_.TR_HIDE_ROOT
4896 TR_ROW_LINES = _controls_.TR_ROW_LINES
4897 TR_FULL_ROW_HIGHLIGHT = _controls_.TR_FULL_ROW_HIGHLIGHT
4898 TR_DEFAULT_STYLE = _controls_.TR_DEFAULT_STYLE
4899 TR_TWIST_BUTTONS = _controls_.TR_TWIST_BUTTONS
4900 TR_MAC_BUTTONS = _controls_.TR_MAC_BUTTONS
4901 TR_AQUA_BUTTONS = _controls_.TR_AQUA_BUTTONS
4902 TreeItemIcon_Normal = _controls_.TreeItemIcon_Normal
4903 TreeItemIcon_Selected = _controls_.TreeItemIcon_Selected
4904 TreeItemIcon_Expanded = _controls_.TreeItemIcon_Expanded
4905 TreeItemIcon_SelectedExpanded = _controls_.TreeItemIcon_SelectedExpanded
4906 TreeItemIcon_Max = _controls_.TreeItemIcon_Max
4907 TREE_HITTEST_ABOVE = _controls_.TREE_HITTEST_ABOVE
4908 TREE_HITTEST_BELOW = _controls_.TREE_HITTEST_BELOW
4909 TREE_HITTEST_NOWHERE = _controls_.TREE_HITTEST_NOWHERE
4910 TREE_HITTEST_ONITEMBUTTON = _controls_.TREE_HITTEST_ONITEMBUTTON
4911 TREE_HITTEST_ONITEMICON = _controls_.TREE_HITTEST_ONITEMICON
4912 TREE_HITTEST_ONITEMINDENT = _controls_.TREE_HITTEST_ONITEMINDENT
4913 TREE_HITTEST_ONITEMLABEL = _controls_.TREE_HITTEST_ONITEMLABEL
4914 TREE_HITTEST_ONITEMRIGHT = _controls_.TREE_HITTEST_ONITEMRIGHT
4915 TREE_HITTEST_ONITEMSTATEICON = _controls_.TREE_HITTEST_ONITEMSTATEICON
4916 TREE_HITTEST_TOLEFT = _controls_.TREE_HITTEST_TOLEFT
4917 TREE_HITTEST_TORIGHT = _controls_.TREE_HITTEST_TORIGHT
4918 TREE_HITTEST_ONITEMUPPERPART = _controls_.TREE_HITTEST_ONITEMUPPERPART
4919 TREE_HITTEST_ONITEMLOWERPART = _controls_.TREE_HITTEST_ONITEMLOWERPART
4920 TREE_HITTEST_ONITEM = _controls_.TREE_HITTEST_ONITEM
4921 #---------------------------------------------------------------------------
4922
4923 class TreeItemId(object):
4924 def __repr__(self):
4925 return "<%s.%s; proxy of C++ wxTreeItemId instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4926 def __init__(self, *args, **kwargs):
4927 """__init__(self) -> TreeItemId"""
4928 newobj = _controls_.new_TreeItemId(*args, **kwargs)
4929 self.this = newobj.this
4930 self.thisown = 1
4931 del newobj.thisown
4932 def __del__(self, destroy=_controls_.delete_TreeItemId):
4933 """__del__(self)"""
4934 try:
4935 if self.thisown: destroy(self)
4936 except: pass
4937
4938 def IsOk(*args, **kwargs):
4939 """IsOk(self) -> bool"""
4940 return _controls_.TreeItemId_IsOk(*args, **kwargs)
4941
4942 def __eq__(*args, **kwargs):
4943 """__eq__(self, TreeItemId other) -> bool"""
4944 return _controls_.TreeItemId___eq__(*args, **kwargs)
4945
4946 def __ne__(*args, **kwargs):
4947 """__ne__(self, TreeItemId other) -> bool"""
4948 return _controls_.TreeItemId___ne__(*args, **kwargs)
4949
4950 m_pItem = property(_controls_.TreeItemId_m_pItem_get, _controls_.TreeItemId_m_pItem_set)
4951 Ok = IsOk
4952 def __nonzero__(self): return self.IsOk()
4953
4954 class TreeItemIdPtr(TreeItemId):
4955 def __init__(self, this):
4956 self.this = this
4957 if not hasattr(self,"thisown"): self.thisown = 0
4958 self.__class__ = TreeItemId
4959 _controls_.TreeItemId_swigregister(TreeItemIdPtr)
4960 TreeCtrlNameStr = cvar.TreeCtrlNameStr
4961
4962 class TreeItemData(object):
4963 def __repr__(self):
4964 return "<%s.%s; proxy of C++ wxPyTreeItemData instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4965 def __init__(self, *args, **kwargs):
4966 """__init__(self, PyObject obj=None) -> TreeItemData"""
4967 newobj = _controls_.new_TreeItemData(*args, **kwargs)
4968 self.this = newobj.this
4969 self.thisown = 1
4970 del newobj.thisown
4971 def GetData(*args, **kwargs):
4972 """GetData(self) -> PyObject"""
4973 return _controls_.TreeItemData_GetData(*args, **kwargs)
4974
4975 def SetData(*args, **kwargs):
4976 """SetData(self, PyObject obj)"""
4977 return _controls_.TreeItemData_SetData(*args, **kwargs)
4978
4979 def GetId(*args, **kwargs):
4980 """GetId(self) -> TreeItemId"""
4981 return _controls_.TreeItemData_GetId(*args, **kwargs)
4982
4983 def SetId(*args, **kwargs):
4984 """SetId(self, TreeItemId id)"""
4985 return _controls_.TreeItemData_SetId(*args, **kwargs)
4986
4987 def Destroy(*args, **kwargs):
4988 """Destroy(self)"""
4989 return _controls_.TreeItemData_Destroy(*args, **kwargs)
4990
4991
4992 class TreeItemDataPtr(TreeItemData):
4993 def __init__(self, this):
4994 self.this = this
4995 if not hasattr(self,"thisown"): self.thisown = 0
4996 self.__class__ = TreeItemData
4997 _controls_.TreeItemData_swigregister(TreeItemDataPtr)
4998
4999 #---------------------------------------------------------------------------
5000
5001 wxEVT_COMMAND_TREE_BEGIN_DRAG = _controls_.wxEVT_COMMAND_TREE_BEGIN_DRAG
5002 wxEVT_COMMAND_TREE_BEGIN_RDRAG = _controls_.wxEVT_COMMAND_TREE_BEGIN_RDRAG
5003 wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = _controls_.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT
5004 wxEVT_COMMAND_TREE_END_LABEL_EDIT = _controls_.wxEVT_COMMAND_TREE_END_LABEL_EDIT
5005 wxEVT_COMMAND_TREE_DELETE_ITEM = _controls_.wxEVT_COMMAND_TREE_DELETE_ITEM
5006 wxEVT_COMMAND_TREE_GET_INFO = _controls_.wxEVT_COMMAND_TREE_GET_INFO
5007 wxEVT_COMMAND_TREE_SET_INFO = _controls_.wxEVT_COMMAND_TREE_SET_INFO
5008 wxEVT_COMMAND_TREE_ITEM_EXPANDED = _controls_.wxEVT_COMMAND_TREE_ITEM_EXPANDED
5009 wxEVT_COMMAND_TREE_ITEM_EXPANDING = _controls_.wxEVT_COMMAND_TREE_ITEM_EXPANDING
5010 wxEVT_COMMAND_TREE_ITEM_COLLAPSED = _controls_.wxEVT_COMMAND_TREE_ITEM_COLLAPSED
5011 wxEVT_COMMAND_TREE_ITEM_COLLAPSING = _controls_.wxEVT_COMMAND_TREE_ITEM_COLLAPSING
5012 wxEVT_COMMAND_TREE_SEL_CHANGED = _controls_.wxEVT_COMMAND_TREE_SEL_CHANGED
5013 wxEVT_COMMAND_TREE_SEL_CHANGING = _controls_.wxEVT_COMMAND_TREE_SEL_CHANGING
5014 wxEVT_COMMAND_TREE_KEY_DOWN = _controls_.wxEVT_COMMAND_TREE_KEY_DOWN
5015 wxEVT_COMMAND_TREE_ITEM_ACTIVATED = _controls_.wxEVT_COMMAND_TREE_ITEM_ACTIVATED
5016 wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK = _controls_.wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK
5017 wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK = _controls_.wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK
5018 wxEVT_COMMAND_TREE_END_DRAG = _controls_.wxEVT_COMMAND_TREE_END_DRAG
5019 wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK = _controls_.wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK
5020 wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP = _controls_.wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP
5021 EVT_TREE_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_DRAG , 1)
5022 EVT_TREE_BEGIN_RDRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_RDRAG , 1)
5023 EVT_TREE_BEGIN_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT , 1)
5024 EVT_TREE_END_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_LABEL_EDIT , 1)
5025 EVT_TREE_DELETE_ITEM = wx.PyEventBinder(wxEVT_COMMAND_TREE_DELETE_ITEM , 1)
5026 EVT_TREE_GET_INFO = wx.PyEventBinder(wxEVT_COMMAND_TREE_GET_INFO , 1)
5027 EVT_TREE_SET_INFO = wx.PyEventBinder(wxEVT_COMMAND_TREE_SET_INFO , 1)
5028 EVT_TREE_ITEM_EXPANDED = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_EXPANDED , 1)
5029 EVT_TREE_ITEM_EXPANDING = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_EXPANDING , 1)
5030 EVT_TREE_ITEM_COLLAPSED = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_COLLAPSED , 1)
5031 EVT_TREE_ITEM_COLLAPSING = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_COLLAPSING , 1)
5032 EVT_TREE_SEL_CHANGED = wx.PyEventBinder(wxEVT_COMMAND_TREE_SEL_CHANGED , 1)
5033 EVT_TREE_SEL_CHANGING = wx.PyEventBinder(wxEVT_COMMAND_TREE_SEL_CHANGING , 1)
5034 EVT_TREE_KEY_DOWN = wx.PyEventBinder(wxEVT_COMMAND_TREE_KEY_DOWN , 1)
5035 EVT_TREE_ITEM_ACTIVATED = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_ACTIVATED , 1)
5036 EVT_TREE_ITEM_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK , 1)
5037 EVT_TREE_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 1)
5038 EVT_TREE_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_DRAG , 1)
5039 EVT_TREE_STATE_IMAGE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 1)
5040 EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 1)
5041
5042 class TreeEvent(_core.NotifyEvent):
5043 def __repr__(self):
5044 return "<%s.%s; proxy of C++ wxTreeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5045 def __init__(self, *args, **kwargs):
5046 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> TreeEvent"""
5047 newobj = _controls_.new_TreeEvent(*args, **kwargs)
5048 self.this = newobj.this
5049 self.thisown = 1
5050 del newobj.thisown
5051 def GetItem(*args, **kwargs):
5052 """GetItem(self) -> TreeItemId"""
5053 return _controls_.TreeEvent_GetItem(*args, **kwargs)
5054
5055 def SetItem(*args, **kwargs):
5056 """SetItem(self, TreeItemId item)"""
5057 return _controls_.TreeEvent_SetItem(*args, **kwargs)
5058
5059 def GetOldItem(*args, **kwargs):
5060 """GetOldItem(self) -> TreeItemId"""
5061 return _controls_.TreeEvent_GetOldItem(*args, **kwargs)
5062
5063 def SetOldItem(*args, **kwargs):
5064 """SetOldItem(self, TreeItemId item)"""
5065 return _controls_.TreeEvent_SetOldItem(*args, **kwargs)
5066
5067 def GetPoint(*args, **kwargs):
5068 """GetPoint(self) -> Point"""
5069 return _controls_.TreeEvent_GetPoint(*args, **kwargs)
5070
5071 def SetPoint(*args, **kwargs):
5072 """SetPoint(self, Point pt)"""
5073 return _controls_.TreeEvent_SetPoint(*args, **kwargs)
5074
5075 def GetKeyEvent(*args, **kwargs):
5076 """GetKeyEvent(self) -> KeyEvent"""
5077 return _controls_.TreeEvent_GetKeyEvent(*args, **kwargs)
5078
5079 def GetKeyCode(*args, **kwargs):
5080 """GetKeyCode(self) -> int"""
5081 return _controls_.TreeEvent_GetKeyCode(*args, **kwargs)
5082
5083 def SetKeyEvent(*args, **kwargs):
5084 """SetKeyEvent(self, KeyEvent evt)"""
5085 return _controls_.TreeEvent_SetKeyEvent(*args, **kwargs)
5086
5087 def GetLabel(*args, **kwargs):
5088 """GetLabel(self) -> String"""
5089 return _controls_.TreeEvent_GetLabel(*args, **kwargs)
5090
5091 def SetLabel(*args, **kwargs):
5092 """SetLabel(self, String label)"""
5093 return _controls_.TreeEvent_SetLabel(*args, **kwargs)
5094
5095 def IsEditCancelled(*args, **kwargs):
5096 """IsEditCancelled(self) -> bool"""
5097 return _controls_.TreeEvent_IsEditCancelled(*args, **kwargs)
5098
5099 def SetEditCanceled(*args, **kwargs):
5100 """SetEditCanceled(self, bool editCancelled)"""
5101 return _controls_.TreeEvent_SetEditCanceled(*args, **kwargs)
5102
5103 def SetToolTip(*args, **kwargs):
5104 """SetToolTip(self, String toolTip)"""
5105 return _controls_.TreeEvent_SetToolTip(*args, **kwargs)
5106
5107
5108 class TreeEventPtr(TreeEvent):
5109 def __init__(self, this):
5110 self.this = this
5111 if not hasattr(self,"thisown"): self.thisown = 0
5112 self.__class__ = TreeEvent
5113 _controls_.TreeEvent_swigregister(TreeEventPtr)
5114
5115 #---------------------------------------------------------------------------
5116
5117 class TreeCtrl(_core.Control):
5118 def __repr__(self):
5119 return "<%s.%s; proxy of C++ wxPyTreeCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5120 def __init__(self, *args, **kwargs):
5121 """
5122 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5123 Size size=DefaultSize, long style=TR_DEFAULT_STYLE,
5124 Validator validator=DefaultValidator,
5125 String name=TreeCtrlNameStr) -> TreeCtrl
5126 """
5127 newobj = _controls_.new_TreeCtrl(*args, **kwargs)
5128 self.this = newobj.this
5129 self.thisown = 1
5130 del newobj.thisown
5131 self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)
5132
5133 def Create(*args, **kwargs):
5134 """
5135 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5136 Size size=DefaultSize, long style=TR_DEFAULT_STYLE,
5137 Validator validator=DefaultValidator,
5138 String name=TreeCtrlNameStr) -> bool
5139
5140 Do the 2nd phase and create the GUI control.
5141 """
5142 return _controls_.TreeCtrl_Create(*args, **kwargs)
5143
5144 def _setCallbackInfo(*args, **kwargs):
5145 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
5146 return _controls_.TreeCtrl__setCallbackInfo(*args, **kwargs)
5147
5148 def GetCount(*args, **kwargs):
5149 """GetCount(self) -> size_t"""
5150 return _controls_.TreeCtrl_GetCount(*args, **kwargs)
5151
5152 def GetIndent(*args, **kwargs):
5153 """GetIndent(self) -> unsigned int"""
5154 return _controls_.TreeCtrl_GetIndent(*args, **kwargs)
5155
5156 def SetIndent(*args, **kwargs):
5157 """SetIndent(self, unsigned int indent)"""
5158 return _controls_.TreeCtrl_SetIndent(*args, **kwargs)
5159
5160 def GetSpacing(*args, **kwargs):
5161 """GetSpacing(self) -> unsigned int"""
5162 return _controls_.TreeCtrl_GetSpacing(*args, **kwargs)
5163
5164 def SetSpacing(*args, **kwargs):
5165 """SetSpacing(self, unsigned int spacing)"""
5166 return _controls_.TreeCtrl_SetSpacing(*args, **kwargs)
5167
5168 def GetImageList(*args, **kwargs):
5169 """GetImageList(self) -> ImageList"""
5170 return _controls_.TreeCtrl_GetImageList(*args, **kwargs)
5171
5172 def GetStateImageList(*args, **kwargs):
5173 """GetStateImageList(self) -> ImageList"""
5174 return _controls_.TreeCtrl_GetStateImageList(*args, **kwargs)
5175
5176 def SetImageList(*args, **kwargs):
5177 """SetImageList(self, ImageList imageList)"""
5178 return _controls_.TreeCtrl_SetImageList(*args, **kwargs)
5179
5180 def SetStateImageList(*args, **kwargs):
5181 """SetStateImageList(self, ImageList imageList)"""
5182 return _controls_.TreeCtrl_SetStateImageList(*args, **kwargs)
5183
5184 def AssignImageList(*args, **kwargs):
5185 """AssignImageList(self, ImageList imageList)"""
5186 return _controls_.TreeCtrl_AssignImageList(*args, **kwargs)
5187
5188 def AssignStateImageList(*args, **kwargs):
5189 """AssignStateImageList(self, ImageList imageList)"""
5190 return _controls_.TreeCtrl_AssignStateImageList(*args, **kwargs)
5191
5192 def GetItemText(*args, **kwargs):
5193 """GetItemText(self, TreeItemId item) -> String"""
5194 return _controls_.TreeCtrl_GetItemText(*args, **kwargs)
5195
5196 def GetItemImage(*args, **kwargs):
5197 """GetItemImage(self, TreeItemId item, int which=TreeItemIcon_Normal) -> int"""
5198 return _controls_.TreeCtrl_GetItemImage(*args, **kwargs)
5199
5200 def GetItemData(*args, **kwargs):
5201 """GetItemData(self, TreeItemId item) -> TreeItemData"""
5202 return _controls_.TreeCtrl_GetItemData(*args, **kwargs)
5203
5204 def GetItemPyData(*args, **kwargs):
5205 """GetItemPyData(self, TreeItemId item) -> PyObject"""
5206 return _controls_.TreeCtrl_GetItemPyData(*args, **kwargs)
5207
5208 GetPyData = GetItemPyData
5209 def GetItemTextColour(*args, **kwargs):
5210 """GetItemTextColour(self, TreeItemId item) -> Colour"""
5211 return _controls_.TreeCtrl_GetItemTextColour(*args, **kwargs)
5212
5213 def GetItemBackgroundColour(*args, **kwargs):
5214 """GetItemBackgroundColour(self, TreeItemId item) -> Colour"""
5215 return _controls_.TreeCtrl_GetItemBackgroundColour(*args, **kwargs)
5216
5217 def GetItemFont(*args, **kwargs):
5218 """GetItemFont(self, TreeItemId item) -> Font"""
5219 return _controls_.TreeCtrl_GetItemFont(*args, **kwargs)
5220
5221 def SetItemText(*args, **kwargs):
5222 """SetItemText(self, TreeItemId item, String text)"""
5223 return _controls_.TreeCtrl_SetItemText(*args, **kwargs)
5224
5225 def SetItemImage(*args, **kwargs):
5226 """SetItemImage(self, TreeItemId item, int image, int which=TreeItemIcon_Normal)"""
5227 return _controls_.TreeCtrl_SetItemImage(*args, **kwargs)
5228
5229 def SetItemData(*args, **kwargs):
5230 """SetItemData(self, TreeItemId item, TreeItemData data)"""
5231 return _controls_.TreeCtrl_SetItemData(*args, **kwargs)
5232
5233 def SetItemPyData(*args, **kwargs):
5234 """SetItemPyData(self, TreeItemId item, PyObject obj)"""
5235 return _controls_.TreeCtrl_SetItemPyData(*args, **kwargs)
5236
5237 SetPyData = SetItemPyData
5238 def SetItemHasChildren(*args, **kwargs):
5239 """SetItemHasChildren(self, TreeItemId item, bool has=True)"""
5240 return _controls_.TreeCtrl_SetItemHasChildren(*args, **kwargs)
5241
5242 def SetItemBold(*args, **kwargs):
5243 """SetItemBold(self, TreeItemId item, bool bold=True)"""
5244 return _controls_.TreeCtrl_SetItemBold(*args, **kwargs)
5245
5246 def SetItemTextColour(*args, **kwargs):
5247 """SetItemTextColour(self, TreeItemId item, Colour col)"""
5248 return _controls_.TreeCtrl_SetItemTextColour(*args, **kwargs)
5249
5250 def SetItemBackgroundColour(*args, **kwargs):
5251 """SetItemBackgroundColour(self, TreeItemId item, Colour col)"""
5252 return _controls_.TreeCtrl_SetItemBackgroundColour(*args, **kwargs)
5253
5254 def SetItemFont(*args, **kwargs):
5255 """SetItemFont(self, TreeItemId item, Font font)"""
5256 return _controls_.TreeCtrl_SetItemFont(*args, **kwargs)
5257
5258 def IsVisible(*args, **kwargs):
5259 """IsVisible(self, TreeItemId item) -> bool"""
5260 return _controls_.TreeCtrl_IsVisible(*args, **kwargs)
5261
5262 def ItemHasChildren(*args, **kwargs):
5263 """ItemHasChildren(self, TreeItemId item) -> bool"""
5264 return _controls_.TreeCtrl_ItemHasChildren(*args, **kwargs)
5265
5266 def IsExpanded(*args, **kwargs):
5267 """IsExpanded(self, TreeItemId item) -> bool"""
5268 return _controls_.TreeCtrl_IsExpanded(*args, **kwargs)
5269
5270 def IsSelected(*args, **kwargs):
5271 """IsSelected(self, TreeItemId item) -> bool"""
5272 return _controls_.TreeCtrl_IsSelected(*args, **kwargs)
5273
5274 def IsBold(*args, **kwargs):
5275 """IsBold(self, TreeItemId item) -> bool"""
5276 return _controls_.TreeCtrl_IsBold(*args, **kwargs)
5277
5278 def GetChildrenCount(*args, **kwargs):
5279 """GetChildrenCount(self, TreeItemId item, bool recursively=True) -> size_t"""
5280 return _controls_.TreeCtrl_GetChildrenCount(*args, **kwargs)
5281
5282 def GetRootItem(*args, **kwargs):
5283 """GetRootItem(self) -> TreeItemId"""
5284 return _controls_.TreeCtrl_GetRootItem(*args, **kwargs)
5285
5286 def GetSelection(*args, **kwargs):
5287 """GetSelection(self) -> TreeItemId"""
5288 return _controls_.TreeCtrl_GetSelection(*args, **kwargs)
5289
5290 def GetSelections(*args, **kwargs):
5291 """GetSelections(self) -> PyObject"""
5292 return _controls_.TreeCtrl_GetSelections(*args, **kwargs)
5293
5294 def GetItemParent(*args, **kwargs):
5295 """GetItemParent(self, TreeItemId item) -> TreeItemId"""
5296 return _controls_.TreeCtrl_GetItemParent(*args, **kwargs)
5297
5298 def GetFirstChild(*args, **kwargs):
5299 """GetFirstChild(self, TreeItemId item) -> PyObject"""
5300 return _controls_.TreeCtrl_GetFirstChild(*args, **kwargs)
5301
5302 def GetNextChild(*args, **kwargs):
5303 """GetNextChild(self, TreeItemId item, void cookie) -> PyObject"""
5304 return _controls_.TreeCtrl_GetNextChild(*args, **kwargs)
5305
5306 def GetLastChild(*args, **kwargs):
5307 """GetLastChild(self, TreeItemId item) -> TreeItemId"""
5308 return _controls_.TreeCtrl_GetLastChild(*args, **kwargs)
5309
5310 def GetNextSibling(*args, **kwargs):
5311 """GetNextSibling(self, TreeItemId item) -> TreeItemId"""
5312 return _controls_.TreeCtrl_GetNextSibling(*args, **kwargs)
5313
5314 def GetPrevSibling(*args, **kwargs):
5315 """GetPrevSibling(self, TreeItemId item) -> TreeItemId"""
5316 return _controls_.TreeCtrl_GetPrevSibling(*args, **kwargs)
5317
5318 def GetFirstVisibleItem(*args, **kwargs):
5319 """GetFirstVisibleItem(self) -> TreeItemId"""
5320 return _controls_.TreeCtrl_GetFirstVisibleItem(*args, **kwargs)
5321
5322 def GetNextVisible(*args, **kwargs):
5323 """GetNextVisible(self, TreeItemId item) -> TreeItemId"""
5324 return _controls_.TreeCtrl_GetNextVisible(*args, **kwargs)
5325
5326 def GetPrevVisible(*args, **kwargs):
5327 """GetPrevVisible(self, TreeItemId item) -> TreeItemId"""
5328 return _controls_.TreeCtrl_GetPrevVisible(*args, **kwargs)
5329
5330 def AddRoot(*args, **kwargs):
5331 """AddRoot(self, String text, int image=-1, int selectedImage=-1, TreeItemData data=None) -> TreeItemId"""
5332 return _controls_.TreeCtrl_AddRoot(*args, **kwargs)
5333
5334 def PrependItem(*args, **kwargs):
5335 """
5336 PrependItem(self, TreeItemId parent, String text, int image=-1, int selectedImage=-1,
5337 TreeItemData data=None) -> TreeItemId
5338 """
5339 return _controls_.TreeCtrl_PrependItem(*args, **kwargs)
5340
5341 def InsertItem(*args, **kwargs):
5342 """
5343 InsertItem(self, TreeItemId parent, TreeItemId idPrevious, String text,
5344 int image=-1, int selectedImage=-1, TreeItemData data=None) -> TreeItemId
5345 """
5346 return _controls_.TreeCtrl_InsertItem(*args, **kwargs)
5347
5348 def InsertItemBefore(*args, **kwargs):
5349 """
5350 InsertItemBefore(self, TreeItemId parent, size_t index, String text, int image=-1,
5351 int selectedImage=-1, TreeItemData data=None) -> TreeItemId
5352 """
5353 return _controls_.TreeCtrl_InsertItemBefore(*args, **kwargs)
5354
5355 def AppendItem(*args, **kwargs):
5356 """
5357 AppendItem(self, TreeItemId parent, String text, int image=-1, int selectedImage=-1,
5358 TreeItemData data=None) -> TreeItemId
5359 """
5360 return _controls_.TreeCtrl_AppendItem(*args, **kwargs)
5361
5362 def Delete(*args, **kwargs):
5363 """Delete(self, TreeItemId item)"""
5364 return _controls_.TreeCtrl_Delete(*args, **kwargs)
5365
5366 def DeleteChildren(*args, **kwargs):
5367 """DeleteChildren(self, TreeItemId item)"""
5368 return _controls_.TreeCtrl_DeleteChildren(*args, **kwargs)
5369
5370 def DeleteAllItems(*args, **kwargs):
5371 """DeleteAllItems(self)"""
5372 return _controls_.TreeCtrl_DeleteAllItems(*args, **kwargs)
5373
5374 def Expand(*args, **kwargs):
5375 """Expand(self, TreeItemId item)"""
5376 return _controls_.TreeCtrl_Expand(*args, **kwargs)
5377
5378 def Collapse(*args, **kwargs):
5379 """Collapse(self, TreeItemId item)"""
5380 return _controls_.TreeCtrl_Collapse(*args, **kwargs)
5381
5382 def CollapseAndReset(*args, **kwargs):
5383 """CollapseAndReset(self, TreeItemId item)"""
5384 return _controls_.TreeCtrl_CollapseAndReset(*args, **kwargs)
5385
5386 def Toggle(*args, **kwargs):
5387 """Toggle(self, TreeItemId item)"""
5388 return _controls_.TreeCtrl_Toggle(*args, **kwargs)
5389
5390 def Unselect(*args, **kwargs):
5391 """Unselect(self)"""
5392 return _controls_.TreeCtrl_Unselect(*args, **kwargs)
5393
5394 def UnselectItem(*args, **kwargs):
5395 """UnselectItem(self, TreeItemId item)"""
5396 return _controls_.TreeCtrl_UnselectItem(*args, **kwargs)
5397
5398 def UnselectAll(*args, **kwargs):
5399 """UnselectAll(self)"""
5400 return _controls_.TreeCtrl_UnselectAll(*args, **kwargs)
5401
5402 def SelectItem(*args, **kwargs):
5403 """SelectItem(self, TreeItemId item, bool select=True)"""
5404 return _controls_.TreeCtrl_SelectItem(*args, **kwargs)
5405
5406 def ToggleItemSelection(*args, **kwargs):
5407 """ToggleItemSelection(self, TreeItemId item)"""
5408 return _controls_.TreeCtrl_ToggleItemSelection(*args, **kwargs)
5409
5410 def EnsureVisible(*args, **kwargs):
5411 """EnsureVisible(self, TreeItemId item)"""
5412 return _controls_.TreeCtrl_EnsureVisible(*args, **kwargs)
5413
5414 def ScrollTo(*args, **kwargs):
5415 """ScrollTo(self, TreeItemId item)"""
5416 return _controls_.TreeCtrl_ScrollTo(*args, **kwargs)
5417
5418 def EditLabel(*args, **kwargs):
5419 """EditLabel(self, TreeItemId item)"""
5420 return _controls_.TreeCtrl_EditLabel(*args, **kwargs)
5421
5422 def GetEditControl(*args, **kwargs):
5423 """GetEditControl(self) -> TextCtrl"""
5424 return _controls_.TreeCtrl_GetEditControl(*args, **kwargs)
5425
5426 def SortChildren(*args, **kwargs):
5427 """SortChildren(self, TreeItemId item)"""
5428 return _controls_.TreeCtrl_SortChildren(*args, **kwargs)
5429
5430 def HitTest(*args, **kwargs):
5431 """
5432 HitTest(Point point) -> (item, where)
5433
5434 Determine which item (if any) belongs the given point. The coordinates
5435 specified are relative to the client area of tree ctrl and the where return
5436 value is set to a bitmask of wxTREE_HITTEST_xxx constants.
5437
5438 """
5439 return _controls_.TreeCtrl_HitTest(*args, **kwargs)
5440
5441 def GetBoundingRect(*args, **kwargs):
5442 """GetBoundingRect(self, TreeItemId item, bool textOnly=False) -> PyObject"""
5443 return _controls_.TreeCtrl_GetBoundingRect(*args, **kwargs)
5444
5445 def GetClassDefaultAttributes(*args, **kwargs):
5446 """
5447 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
5448
5449 Get the default attributes for this class. This is useful if you want
5450 to use the same font or colour in your own control as in a standard
5451 control -- which is a much better idea than hard coding specific
5452 colours or fonts which might look completely out of place on the
5453 user's system, especially if it uses themes.
5454
5455 The variant parameter is only relevant under Mac currently and is
5456 ignore under other platforms. Under Mac, it will change the size of
5457 the returned font. See `wx.Window.SetWindowVariant` for more about
5458 this.
5459 """
5460 return _controls_.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs)
5461
5462 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
5463
5464 class TreeCtrlPtr(TreeCtrl):
5465 def __init__(self, this):
5466 self.this = this
5467 if not hasattr(self,"thisown"): self.thisown = 0
5468 self.__class__ = TreeCtrl
5469 _controls_.TreeCtrl_swigregister(TreeCtrlPtr)
5470
5471 def PreTreeCtrl(*args, **kwargs):
5472 """PreTreeCtrl() -> TreeCtrl"""
5473 val = _controls_.new_PreTreeCtrl(*args, **kwargs)
5474 val.thisown = 1
5475 return val
5476
5477 def TreeCtrl_GetClassDefaultAttributes(*args, **kwargs):
5478 """
5479 TreeCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
5480
5481 Get the default attributes for this class. This is useful if you want
5482 to use the same font or colour in your own control as in a standard
5483 control -- which is a much better idea than hard coding specific
5484 colours or fonts which might look completely out of place on the
5485 user's system, especially if it uses themes.
5486
5487 The variant parameter is only relevant under Mac currently and is
5488 ignore under other platforms. Under Mac, it will change the size of
5489 the returned font. See `wx.Window.SetWindowVariant` for more about
5490 this.
5491 """
5492 return _controls_.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs)
5493
5494 #---------------------------------------------------------------------------
5495
5496 DIRCTRL_DIR_ONLY = _controls_.DIRCTRL_DIR_ONLY
5497 DIRCTRL_SELECT_FIRST = _controls_.DIRCTRL_SELECT_FIRST
5498 DIRCTRL_SHOW_FILTERS = _controls_.DIRCTRL_SHOW_FILTERS
5499 DIRCTRL_3D_INTERNAL = _controls_.DIRCTRL_3D_INTERNAL
5500 DIRCTRL_EDIT_LABELS = _controls_.DIRCTRL_EDIT_LABELS
5501 class GenericDirCtrl(_core.Control):
5502 def __repr__(self):
5503 return "<%s.%s; proxy of C++ wxGenericDirCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5504 def __init__(self, *args, **kwargs):
5505 """
5506 __init__(self, Window parent, int id=-1, String dir=DirDialogDefaultFolderStr,
5507 Point pos=DefaultPosition, Size size=DefaultSize,
5508 long style=wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER,
5509 String filter=EmptyString,
5510 int defaultFilter=0, String name=TreeCtrlNameStr) -> GenericDirCtrl
5511 """
5512 newobj = _controls_.new_GenericDirCtrl(*args, **kwargs)
5513 self.this = newobj.this
5514 self.thisown = 1
5515 del newobj.thisown
5516 self._setOORInfo(self)
5517
5518 def Create(*args, **kwargs):
5519 """
5520 Create(self, Window parent, int id=-1, String dir=DirDialogDefaultFolderStr,
5521 Point pos=DefaultPosition, Size size=DefaultSize,
5522 long style=wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER,
5523 String filter=EmptyString,
5524 int defaultFilter=0, String name=TreeCtrlNameStr) -> bool
5525 """
5526 return _controls_.GenericDirCtrl_Create(*args, **kwargs)
5527
5528 def ExpandPath(*args, **kwargs):
5529 """ExpandPath(self, String path) -> bool"""
5530 return _controls_.GenericDirCtrl_ExpandPath(*args, **kwargs)
5531
5532 def GetDefaultPath(*args, **kwargs):
5533 """GetDefaultPath(self) -> String"""
5534 return _controls_.GenericDirCtrl_GetDefaultPath(*args, **kwargs)
5535
5536 def SetDefaultPath(*args, **kwargs):
5537 """SetDefaultPath(self, String path)"""
5538 return _controls_.GenericDirCtrl_SetDefaultPath(*args, **kwargs)
5539
5540 def GetPath(*args, **kwargs):
5541 """GetPath(self) -> String"""
5542 return _controls_.GenericDirCtrl_GetPath(*args, **kwargs)
5543
5544 def GetFilePath(*args, **kwargs):
5545 """GetFilePath(self) -> String"""
5546 return _controls_.GenericDirCtrl_GetFilePath(*args, **kwargs)
5547
5548 def SetPath(*args, **kwargs):
5549 """SetPath(self, String path)"""
5550 return _controls_.GenericDirCtrl_SetPath(*args, **kwargs)
5551
5552 def ShowHidden(*args, **kwargs):
5553 """ShowHidden(self, bool show)"""
5554 return _controls_.GenericDirCtrl_ShowHidden(*args, **kwargs)
5555
5556 def GetShowHidden(*args, **kwargs):
5557 """GetShowHidden(self) -> bool"""
5558 return _controls_.GenericDirCtrl_GetShowHidden(*args, **kwargs)
5559
5560 def GetFilter(*args, **kwargs):
5561 """GetFilter(self) -> String"""
5562 return _controls_.GenericDirCtrl_GetFilter(*args, **kwargs)
5563
5564 def SetFilter(*args, **kwargs):
5565 """SetFilter(self, String filter)"""
5566 return _controls_.GenericDirCtrl_SetFilter(*args, **kwargs)
5567
5568 def GetFilterIndex(*args, **kwargs):
5569 """GetFilterIndex(self) -> int"""
5570 return _controls_.GenericDirCtrl_GetFilterIndex(*args, **kwargs)
5571
5572 def SetFilterIndex(*args, **kwargs):
5573 """SetFilterIndex(self, int n)"""
5574 return _controls_.GenericDirCtrl_SetFilterIndex(*args, **kwargs)
5575
5576 def GetRootId(*args, **kwargs):
5577 """GetRootId(self) -> TreeItemId"""
5578 return _controls_.GenericDirCtrl_GetRootId(*args, **kwargs)
5579
5580 def GetTreeCtrl(*args, **kwargs):
5581 """GetTreeCtrl(self) -> TreeCtrl"""
5582 return _controls_.GenericDirCtrl_GetTreeCtrl(*args, **kwargs)
5583
5584 def GetFilterListCtrl(*args, **kwargs):
5585 """GetFilterListCtrl(self) -> DirFilterListCtrl"""
5586 return _controls_.GenericDirCtrl_GetFilterListCtrl(*args, **kwargs)
5587
5588 def FindChild(*args, **kwargs):
5589 """
5590 FindChild(wxTreeItemId parentId, wxString path) -> (item, done)
5591
5592 Find the child that matches the first part of 'path'. E.g. if a child
5593 path is "/usr" and 'path' is "/usr/include" then the child for
5594 /usr is returned. If the path string has been used (we're at the
5595 leaf), done is set to True.
5596
5597 """
5598 return _controls_.GenericDirCtrl_FindChild(*args, **kwargs)
5599
5600 def DoResize(*args, **kwargs):
5601 """DoResize(self)"""
5602 return _controls_.GenericDirCtrl_DoResize(*args, **kwargs)
5603
5604 def ReCreateTree(*args, **kwargs):
5605 """ReCreateTree(self)"""
5606 return _controls_.GenericDirCtrl_ReCreateTree(*args, **kwargs)
5607
5608
5609 class GenericDirCtrlPtr(GenericDirCtrl):
5610 def __init__(self, this):
5611 self.this = this
5612 if not hasattr(self,"thisown"): self.thisown = 0
5613 self.__class__ = GenericDirCtrl
5614 _controls_.GenericDirCtrl_swigregister(GenericDirCtrlPtr)
5615 DirDialogDefaultFolderStr = cvar.DirDialogDefaultFolderStr
5616
5617 def PreGenericDirCtrl(*args, **kwargs):
5618 """PreGenericDirCtrl() -> GenericDirCtrl"""
5619 val = _controls_.new_PreGenericDirCtrl(*args, **kwargs)
5620 val.thisown = 1
5621 return val
5622
5623 class DirFilterListCtrl(Choice):
5624 def __repr__(self):
5625 return "<%s.%s; proxy of C++ wxDirFilterListCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5626 def __init__(self, *args, **kwargs):
5627 """
5628 __init__(self, GenericDirCtrl parent, int id=-1, Point pos=DefaultPosition,
5629 Size size=DefaultSize, long style=0) -> DirFilterListCtrl
5630 """
5631 newobj = _controls_.new_DirFilterListCtrl(*args, **kwargs)
5632 self.this = newobj.this
5633 self.thisown = 1
5634 del newobj.thisown
5635 self._setOORInfo(self)
5636
5637 def Create(*args, **kwargs):
5638 """
5639 Create(self, GenericDirCtrl parent, int id=-1, Point pos=DefaultPosition,
5640 Size size=DefaultSize, long style=0) -> bool
5641 """
5642 return _controls_.DirFilterListCtrl_Create(*args, **kwargs)
5643
5644 def FillFilterList(*args, **kwargs):
5645 """FillFilterList(self, String filter, int defaultFilter)"""
5646 return _controls_.DirFilterListCtrl_FillFilterList(*args, **kwargs)
5647
5648
5649 class DirFilterListCtrlPtr(DirFilterListCtrl):
5650 def __init__(self, this):
5651 self.this = this
5652 if not hasattr(self,"thisown"): self.thisown = 0
5653 self.__class__ = DirFilterListCtrl
5654 _controls_.DirFilterListCtrl_swigregister(DirFilterListCtrlPtr)
5655
5656 def PreDirFilterListCtrl(*args, **kwargs):
5657 """PreDirFilterListCtrl() -> DirFilterListCtrl"""
5658 val = _controls_.new_PreDirFilterListCtrl(*args, **kwargs)
5659 val.thisown = 1
5660 return val
5661
5662 #---------------------------------------------------------------------------
5663
5664 class PyControl(_core.Control):
5665 def __repr__(self):
5666 return "<%s.%s; proxy of C++ wxPyControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5667 def __init__(self, *args, **kwargs):
5668 """
5669 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5670 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
5671 String name=ControlNameStr) -> PyControl
5672 """
5673 newobj = _controls_.new_PyControl(*args, **kwargs)
5674 self.this = newobj.this
5675 self.thisown = 1
5676 del newobj.thisown
5677 self._setOORInfo(self); self._setCallbackInfo(self, PyControl)
5678
5679 def _setCallbackInfo(*args, **kwargs):
5680 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
5681 return _controls_.PyControl__setCallbackInfo(*args, **kwargs)
5682
5683 def SetBestSize(*args, **kwargs):
5684 """SetBestSize(self, Size size)"""
5685 return _controls_.PyControl_SetBestSize(*args, **kwargs)
5686
5687 def base_DoMoveWindow(*args, **kwargs):
5688 """base_DoMoveWindow(self, int x, int y, int width, int height)"""
5689 return _controls_.PyControl_base_DoMoveWindow(*args, **kwargs)
5690
5691 def base_DoSetSize(*args, **kwargs):
5692 """base_DoSetSize(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)"""
5693 return _controls_.PyControl_base_DoSetSize(*args, **kwargs)
5694
5695 def base_DoSetClientSize(*args, **kwargs):
5696 """base_DoSetClientSize(self, int width, int height)"""
5697 return _controls_.PyControl_base_DoSetClientSize(*args, **kwargs)
5698
5699 def base_DoSetVirtualSize(*args, **kwargs):
5700 """base_DoSetVirtualSize(self, int x, int y)"""
5701 return _controls_.PyControl_base_DoSetVirtualSize(*args, **kwargs)
5702
5703 def base_DoGetSize(*args, **kwargs):
5704 """base_DoGetSize() -> (width, height)"""
5705 return _controls_.PyControl_base_DoGetSize(*args, **kwargs)
5706
5707 def base_DoGetClientSize(*args, **kwargs):
5708 """base_DoGetClientSize() -> (width, height)"""
5709 return _controls_.PyControl_base_DoGetClientSize(*args, **kwargs)
5710
5711 def base_DoGetPosition(*args, **kwargs):
5712 """base_DoGetPosition() -> (x,y)"""
5713 return _controls_.PyControl_base_DoGetPosition(*args, **kwargs)
5714
5715 def base_DoGetVirtualSize(*args, **kwargs):
5716 """base_DoGetVirtualSize(self) -> Size"""
5717 return _controls_.PyControl_base_DoGetVirtualSize(*args, **kwargs)
5718
5719 def base_DoGetBestSize(*args, **kwargs):
5720 """base_DoGetBestSize(self) -> Size"""
5721 return _controls_.PyControl_base_DoGetBestSize(*args, **kwargs)
5722
5723 def base_InitDialog(*args, **kwargs):
5724 """base_InitDialog(self)"""
5725 return _controls_.PyControl_base_InitDialog(*args, **kwargs)
5726
5727 def base_TransferDataToWindow(*args, **kwargs):
5728 """base_TransferDataToWindow(self) -> bool"""
5729 return _controls_.PyControl_base_TransferDataToWindow(*args, **kwargs)
5730
5731 def base_TransferDataFromWindow(*args, **kwargs):
5732 """base_TransferDataFromWindow(self) -> bool"""
5733 return _controls_.PyControl_base_TransferDataFromWindow(*args, **kwargs)
5734
5735 def base_Validate(*args, **kwargs):
5736 """base_Validate(self) -> bool"""
5737 return _controls_.PyControl_base_Validate(*args, **kwargs)
5738
5739 def base_AcceptsFocus(*args, **kwargs):
5740 """base_AcceptsFocus(self) -> bool"""
5741 return _controls_.PyControl_base_AcceptsFocus(*args, **kwargs)
5742
5743 def base_AcceptsFocusFromKeyboard(*args, **kwargs):
5744 """base_AcceptsFocusFromKeyboard(self) -> bool"""
5745 return _controls_.PyControl_base_AcceptsFocusFromKeyboard(*args, **kwargs)
5746
5747 def base_GetMaxSize(*args, **kwargs):
5748 """base_GetMaxSize(self) -> Size"""
5749 return _controls_.PyControl_base_GetMaxSize(*args, **kwargs)
5750
5751 def base_AddChild(*args, **kwargs):
5752 """base_AddChild(self, Window child)"""
5753 return _controls_.PyControl_base_AddChild(*args, **kwargs)
5754
5755 def base_RemoveChild(*args, **kwargs):
5756 """base_RemoveChild(self, Window child)"""
5757 return _controls_.PyControl_base_RemoveChild(*args, **kwargs)
5758
5759 def base_ShouldInheritColours(*args, **kwargs):
5760 """base_ShouldInheritColours(self) -> bool"""
5761 return _controls_.PyControl_base_ShouldInheritColours(*args, **kwargs)
5762
5763 def base_ApplyParentThemeBackground(*args, **kwargs):
5764 """base_ApplyParentThemeBackground(self, Colour c)"""
5765 return _controls_.PyControl_base_ApplyParentThemeBackground(*args, **kwargs)
5766
5767 def base_GetDefaultAttributes(*args, **kwargs):
5768 """base_GetDefaultAttributes(self) -> VisualAttributes"""
5769 return _controls_.PyControl_base_GetDefaultAttributes(*args, **kwargs)
5770
5771
5772 class PyControlPtr(PyControl):
5773 def __init__(self, this):
5774 self.this = this
5775 if not hasattr(self,"thisown"): self.thisown = 0
5776 self.__class__ = PyControl
5777 _controls_.PyControl_swigregister(PyControlPtr)
5778
5779 def PrePyControl(*args, **kwargs):
5780 """PrePyControl() -> PyControl"""
5781 val = _controls_.new_PrePyControl(*args, **kwargs)
5782 val.thisown = 1
5783 return val
5784
5785 #---------------------------------------------------------------------------
5786
5787 FRAME_EX_CONTEXTHELP = _controls_.FRAME_EX_CONTEXTHELP
5788 DIALOG_EX_CONTEXTHELP = _controls_.DIALOG_EX_CONTEXTHELP
5789 wxEVT_HELP = _controls_.wxEVT_HELP
5790 wxEVT_DETAILED_HELP = _controls_.wxEVT_DETAILED_HELP
5791 EVT_HELP = wx.PyEventBinder( wxEVT_HELP, 1)
5792 EVT_HELP_RANGE = wx.PyEventBinder( wxEVT_HELP, 2)
5793 EVT_DETAILED_HELP = wx.PyEventBinder( wxEVT_DETAILED_HELP, 1)
5794 EVT_DETAILED_HELP_RANGE = wx.PyEventBinder( wxEVT_DETAILED_HELP, 2)
5795
5796 class HelpEvent(_core.CommandEvent):
5797 """
5798 A help event is sent when the user has requested context-sensitive
5799 help. This can either be caused by the application requesting
5800 context-sensitive help mode via wx.ContextHelp, or (on MS Windows) by
5801 the system generating a WM_HELP message when the user pressed F1 or
5802 clicked on the query button in a dialog caption.
5803
5804 A help event is sent to the window that the user clicked on, and is
5805 propagated up the window hierarchy until the event is processed or
5806 there are no more event handlers. The application should call
5807 event.GetId to check the identity of the clicked-on window, and then
5808 either show some suitable help or call event.Skip if the identifier is
5809 unrecognised. Calling Skip is important because it allows wxWindows to
5810 generate further events for ancestors of the clicked-on
5811 window. Otherwise it would be impossible to show help for container
5812 windows, since processing would stop after the first window found.
5813 """
5814 def __repr__(self):
5815 return "<%s.%s; proxy of C++ wxHelpEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5816 def __init__(self, *args, **kwargs):
5817 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> HelpEvent"""
5818 newobj = _controls_.new_HelpEvent(*args, **kwargs)
5819 self.this = newobj.this
5820 self.thisown = 1
5821 del newobj.thisown
5822 def GetPosition(*args, **kwargs):
5823 """
5824 GetPosition(self) -> Point
5825
5826 Returns the left-click position of the mouse, in screen
5827 coordinates. This allows the application to position the help
5828 appropriately.
5829 """
5830 return _controls_.HelpEvent_GetPosition(*args, **kwargs)
5831
5832 def SetPosition(*args, **kwargs):
5833 """
5834 SetPosition(self, Point pos)
5835
5836 Sets the left-click position of the mouse, in screen coordinates.
5837 """
5838 return _controls_.HelpEvent_SetPosition(*args, **kwargs)
5839
5840 def GetLink(*args, **kwargs):
5841 """
5842 GetLink(self) -> String
5843
5844 Get an optional link to further help
5845 """
5846 return _controls_.HelpEvent_GetLink(*args, **kwargs)
5847
5848 def SetLink(*args, **kwargs):
5849 """
5850 SetLink(self, String link)
5851
5852 Set an optional link to further help
5853 """
5854 return _controls_.HelpEvent_SetLink(*args, **kwargs)
5855
5856 def GetTarget(*args, **kwargs):
5857 """
5858 GetTarget(self) -> String
5859
5860 Get an optional target to display help in. E.g. a window specification
5861 """
5862 return _controls_.HelpEvent_GetTarget(*args, **kwargs)
5863
5864 def SetTarget(*args, **kwargs):
5865 """
5866 SetTarget(self, String target)
5867
5868 Set an optional target to display help in. E.g. a window specification
5869 """
5870 return _controls_.HelpEvent_SetTarget(*args, **kwargs)
5871
5872
5873 class HelpEventPtr(HelpEvent):
5874 def __init__(self, this):
5875 self.this = this
5876 if not hasattr(self,"thisown"): self.thisown = 0
5877 self.__class__ = HelpEvent
5878 _controls_.HelpEvent_swigregister(HelpEventPtr)
5879
5880 class ContextHelp(_core.Object):
5881 """
5882 This class changes the cursor to a query and puts the application into
5883 a 'context-sensitive help mode'. When the user left-clicks on a window
5884 within the specified window, a ``EVT_HELP`` event is sent to that
5885 control, and the application may respond to it by popping up some
5886 help.
5887
5888 There are a couple of ways to invoke this behaviour implicitly:
5889
5890 * Use the wx.DIALOG_EX_CONTEXTHELP extended style for a dialog
5891 (Windows only). This will put a question mark in the titlebar,
5892 and Windows will put the application into context-sensitive help
5893 mode automatically, with further programming.
5894
5895 * Create a `wx.ContextHelpButton`, whose predefined behaviour is
5896 to create a context help object. Normally you will write your
5897 application so that this button is only added to a dialog for
5898 non-Windows platforms (use ``wx.DIALOG_EX_CONTEXTHELP`` on
5899 Windows).
5900
5901 :see: `wx.ContextHelpButton`
5902
5903 """
5904 def __repr__(self):
5905 return "<%s.%s; proxy of C++ wxContextHelp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5906 def __init__(self, *args, **kwargs):
5907 """
5908 __init__(self, Window window=None, bool doNow=True) -> ContextHelp
5909
5910 Constructs a context help object, calling BeginContextHelp if doNow is
5911 true (the default).
5912
5913 If window is None, the top window is used.
5914 """
5915 newobj = _controls_.new_ContextHelp(*args, **kwargs)
5916 self.this = newobj.this
5917 self.thisown = 1
5918 del newobj.thisown
5919 def __del__(self, destroy=_controls_.delete_ContextHelp):
5920 """__del__(self)"""
5921 try:
5922 if self.thisown: destroy(self)
5923 except: pass
5924
5925 def BeginContextHelp(*args, **kwargs):
5926 """
5927 BeginContextHelp(self, Window window=None) -> bool
5928
5929 Puts the application into context-sensitive help mode. window is the
5930 window which will be used to catch events; if NULL, the top window
5931 will be used.
5932
5933 Returns true if the application was successfully put into
5934 context-sensitive help mode. This function only returns when the event
5935 loop has finished.
5936 """
5937 return _controls_.ContextHelp_BeginContextHelp(*args, **kwargs)
5938
5939 def EndContextHelp(*args, **kwargs):
5940 """
5941 EndContextHelp(self) -> bool
5942
5943 Ends context-sensitive help mode. Not normally called by the
5944 application.
5945 """
5946 return _controls_.ContextHelp_EndContextHelp(*args, **kwargs)
5947
5948
5949 class ContextHelpPtr(ContextHelp):
5950 def __init__(self, this):
5951 self.this = this
5952 if not hasattr(self,"thisown"): self.thisown = 0
5953 self.__class__ = ContextHelp
5954 _controls_.ContextHelp_swigregister(ContextHelpPtr)
5955
5956 class ContextHelpButton(BitmapButton):
5957 """
5958 Instances of this class may be used to add a question mark button that
5959 when pressed, puts the application into context-help mode. It does
5960 this by creating a wx.ContextHelp object which itself generates a
5961 ``EVT_HELP`` event when the user clicks on a window.
5962
5963 On Windows, you may add a question-mark icon to a dialog by use of the
5964 ``wx.DIALOG_EX_CONTEXTHELP`` extra style, but on other platforms you
5965 will have to add a button explicitly, usually next to OK, Cancel or
5966 similar buttons.
5967
5968 :see: `wx.ContextHelp`, `wx.ContextHelpButton`
5969
5970 """
5971 def __repr__(self):
5972 return "<%s.%s; proxy of C++ wxContextHelpButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5973 def __init__(self, *args, **kwargs):
5974 """
5975 __init__(self, Window parent, int id=ID_CONTEXT_HELP, Point pos=DefaultPosition,
5976 Size size=DefaultSize, long style=BU_AUTODRAW) -> ContextHelpButton
5977
5978 Constructor, creating and showing a context help button.
5979 """
5980 newobj = _controls_.new_ContextHelpButton(*args, **kwargs)
5981 self.this = newobj.this
5982 self.thisown = 1
5983 del newobj.thisown
5984 self._setOORInfo(self)
5985
5986
5987 class ContextHelpButtonPtr(ContextHelpButton):
5988 def __init__(self, this):
5989 self.this = this
5990 if not hasattr(self,"thisown"): self.thisown = 0
5991 self.__class__ = ContextHelpButton
5992 _controls_.ContextHelpButton_swigregister(ContextHelpButtonPtr)
5993
5994 class HelpProvider(object):
5995 """
5996 wx.HelpProvider is an abstract class used by a program
5997 implementing context-sensitive help to show the help text for the
5998 given window.
5999
6000 The current help provider must be explicitly set by the
6001 application using wx.HelpProvider.Set().
6002 """
6003 def __init__(self): raise RuntimeError, "No constructor defined"
6004 def __repr__(self):
6005 return "<%s.%s; proxy of C++ wxHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6006 def Set(*args, **kwargs):
6007 """
6008 Set(HelpProvider helpProvider) -> HelpProvider
6009
6010 Sset the current, application-wide help provider. Returns the previous
6011 one. Unlike some other classes, the help provider is not created on
6012 demand. This must be explicitly done by the application.
6013 """
6014 return _controls_.HelpProvider_Set(*args, **kwargs)
6015
6016 Set = staticmethod(Set)
6017 def Get(*args, **kwargs):
6018 """
6019 Get() -> HelpProvider
6020
6021 Return the current application-wide help provider.
6022 """
6023 return _controls_.HelpProvider_Get(*args, **kwargs)
6024
6025 Get = staticmethod(Get)
6026 def GetHelp(*args, **kwargs):
6027 """
6028 GetHelp(self, Window window) -> String
6029
6030 Gets the help string for this window. Its interpretation is dependent
6031 on the help provider except that empty string always means that no
6032 help is associated with the window.
6033 """
6034 return _controls_.HelpProvider_GetHelp(*args, **kwargs)
6035
6036 def ShowHelp(*args, **kwargs):
6037 """
6038 ShowHelp(self, Window window) -> bool
6039
6040 Shows help for the given window. Uses GetHelp internally if
6041 applicable. Returns True if it was done, or False if no help was
6042 available for this window.
6043 """
6044 return _controls_.HelpProvider_ShowHelp(*args, **kwargs)
6045
6046 def AddHelp(*args, **kwargs):
6047 """
6048 AddHelp(self, Window window, String text)
6049
6050 Associates the text with the given window.
6051 """
6052 return _controls_.HelpProvider_AddHelp(*args, **kwargs)
6053
6054 def AddHelpById(*args, **kwargs):
6055 """
6056 AddHelpById(self, int id, String text)
6057
6058 This version associates the given text with all windows with this
6059 id. May be used to set the same help string for all Cancel buttons in
6060 the application, for example.
6061 """
6062 return _controls_.HelpProvider_AddHelpById(*args, **kwargs)
6063
6064 def RemoveHelp(*args, **kwargs):
6065 """
6066 RemoveHelp(self, Window window)
6067
6068 Removes the association between the window pointer and the help
6069 text. This is called by the wx.Window destructor. Without this, the
6070 table of help strings will fill up and when window pointers are
6071 reused, the wrong help string will be found.
6072 """
6073 return _controls_.HelpProvider_RemoveHelp(*args, **kwargs)
6074
6075 def Destroy(*args, **kwargs):
6076 """Destroy(self)"""
6077 return _controls_.HelpProvider_Destroy(*args, **kwargs)
6078
6079
6080 class HelpProviderPtr(HelpProvider):
6081 def __init__(self, this):
6082 self.this = this
6083 if not hasattr(self,"thisown"): self.thisown = 0
6084 self.__class__ = HelpProvider
6085 _controls_.HelpProvider_swigregister(HelpProviderPtr)
6086
6087 def HelpProvider_Set(*args, **kwargs):
6088 """
6089 HelpProvider_Set(HelpProvider helpProvider) -> HelpProvider
6090
6091 Sset the current, application-wide help provider. Returns the previous
6092 one. Unlike some other classes, the help provider is not created on
6093 demand. This must be explicitly done by the application.
6094 """
6095 return _controls_.HelpProvider_Set(*args, **kwargs)
6096
6097 def HelpProvider_Get(*args, **kwargs):
6098 """
6099 HelpProvider_Get() -> HelpProvider
6100
6101 Return the current application-wide help provider.
6102 """
6103 return _controls_.HelpProvider_Get(*args, **kwargs)
6104
6105 class SimpleHelpProvider(HelpProvider):
6106 """
6107 wx.SimpleHelpProvider is an implementation of `wx.HelpProvider` which
6108 supports only plain text help strings, and shows the string associated
6109 with the control (if any) in a tooltip.
6110 """
6111 def __repr__(self):
6112 return "<%s.%s; proxy of C++ wxSimpleHelpProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6113 def __init__(self, *args, **kwargs):
6114 """
6115 __init__(self) -> SimpleHelpProvider
6116
6117 wx.SimpleHelpProvider is an implementation of `wx.HelpProvider` which
6118 supports only plain text help strings, and shows the string associated
6119 with the control (if any) in a tooltip.
6120 """
6121 newobj = _controls_.new_SimpleHelpProvider(*args, **kwargs)
6122 self.this = newobj.this
6123 self.thisown = 1
6124 del newobj.thisown
6125
6126 class SimpleHelpProviderPtr(SimpleHelpProvider):
6127 def __init__(self, this):
6128 self.this = this
6129 if not hasattr(self,"thisown"): self.thisown = 0
6130 self.__class__ = SimpleHelpProvider
6131 _controls_.SimpleHelpProvider_swigregister(SimpleHelpProviderPtr)
6132
6133 #---------------------------------------------------------------------------
6134
6135 class DragImage(_core.Object):
6136 def __repr__(self):
6137 return "<%s.%s; proxy of C++ wxGenericDragImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6138 def __init__(self, *args, **kwargs):
6139 """__init__(self, Bitmap image, Cursor cursor=wxNullCursor) -> DragImage"""
6140 newobj = _controls_.new_DragImage(*args, **kwargs)
6141 self.this = newobj.this
6142 self.thisown = 1
6143 del newobj.thisown
6144 def __del__(self, destroy=_controls_.delete_DragImage):
6145 """__del__(self)"""
6146 try:
6147 if self.thisown: destroy(self)
6148 except: pass
6149
6150 def SetBackingBitmap(*args, **kwargs):
6151 """SetBackingBitmap(self, Bitmap bitmap)"""
6152 return _controls_.DragImage_SetBackingBitmap(*args, **kwargs)
6153
6154 def BeginDrag(*args, **kwargs):
6155 """
6156 BeginDrag(self, Point hotspot, Window window, bool fullScreen=False,
6157 Rect rect=None) -> bool
6158 """
6159 return _controls_.DragImage_BeginDrag(*args, **kwargs)
6160
6161 def BeginDragBounded(*args, **kwargs):
6162 """BeginDragBounded(self, Point hotspot, Window window, Window boundingWindow) -> bool"""
6163 return _controls_.DragImage_BeginDragBounded(*args, **kwargs)
6164
6165 def EndDrag(*args, **kwargs):
6166 """EndDrag(self) -> bool"""
6167 return _controls_.DragImage_EndDrag(*args, **kwargs)
6168
6169 def Move(*args, **kwargs):
6170 """Move(self, Point pt) -> bool"""
6171 return _controls_.DragImage_Move(*args, **kwargs)
6172
6173 def Show(*args, **kwargs):
6174 """Show(self) -> bool"""
6175 return _controls_.DragImage_Show(*args, **kwargs)
6176
6177 def Hide(*args, **kwargs):
6178 """Hide(self) -> bool"""
6179 return _controls_.DragImage_Hide(*args, **kwargs)
6180
6181 def GetImageRect(*args, **kwargs):
6182 """GetImageRect(self, Point pos) -> Rect"""
6183 return _controls_.DragImage_GetImageRect(*args, **kwargs)
6184
6185 def DoDrawImage(*args, **kwargs):
6186 """DoDrawImage(self, DC dc, Point pos) -> bool"""
6187 return _controls_.DragImage_DoDrawImage(*args, **kwargs)
6188
6189 def UpdateBackingFromWindow(*args, **kwargs):
6190 """UpdateBackingFromWindow(self, DC windowDC, MemoryDC destDC, Rect sourceRect, Rect destRect) -> bool"""
6191 return _controls_.DragImage_UpdateBackingFromWindow(*args, **kwargs)
6192
6193 def RedrawImage(*args, **kwargs):
6194 """RedrawImage(self, Point oldPos, Point newPos, bool eraseOld, bool drawNew) -> bool"""
6195 return _controls_.DragImage_RedrawImage(*args, **kwargs)
6196
6197
6198 class DragImagePtr(DragImage):
6199 def __init__(self, this):
6200 self.this = this
6201 if not hasattr(self,"thisown"): self.thisown = 0
6202 self.__class__ = DragImage
6203 _controls_.DragImage_swigregister(DragImagePtr)
6204
6205 def DragIcon(*args, **kwargs):
6206 """DragIcon(Icon image, Cursor cursor=wxNullCursor) -> DragImage"""
6207 val = _controls_.new_DragIcon(*args, **kwargs)
6208 val.thisown = 1
6209 return val
6210
6211 def DragString(*args, **kwargs):
6212 """DragString(String str, Cursor cursor=wxNullCursor) -> DragImage"""
6213 val = _controls_.new_DragString(*args, **kwargs)
6214 val.thisown = 1
6215 return val
6216
6217 def DragTreeItem(*args, **kwargs):
6218 """DragTreeItem(TreeCtrl treeCtrl, TreeItemId id) -> DragImage"""
6219 val = _controls_.new_DragTreeItem(*args, **kwargs)
6220 val.thisown = 1
6221 return val
6222
6223 def DragListItem(*args, **kwargs):
6224 """DragListItem(ListCtrl listCtrl, long id) -> DragImage"""
6225 val = _controls_.new_DragListItem(*args, **kwargs)
6226 val.thisown = 1
6227 return val
6228
6229