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