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