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