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