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