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