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