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