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