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