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