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