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