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