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