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