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