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