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