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