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