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