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