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