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