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