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