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