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