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