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