]>
Commit | Line | Data |
---|---|---|
d14a1e28 RD |
1 | # This file was created automatically by SWIG. |
2 | # Don't modify this file, modify the SWIG interface instead. | |
3 | ||
54f9ee45 | 4 | import _core_ |
d14a1e28 | 5 | |
093d3ff1 RD |
6 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): |
7 | if (name == "this"): | |
8 | if isinstance(value, class_type): | |
9 | self.__dict__[name] = value.this | |
10 | if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown | |
11 | del value.thisown | |
12 | return | |
13 | method = class_type.__swig_setmethods__.get(name,None) | |
14 | if method: return method(self,value) | |
15 | if (not static) or hasattr(self,name) or (name == "thisown"): | |
16 | self.__dict__[name] = value | |
17 | else: | |
18 | raise AttributeError("You cannot add attributes to %s" % self) | |
19 | ||
20 | def _swig_setattr(self,class_type,name,value): | |
21 | return _swig_setattr_nondynamic(self,class_type,name,value,0) | |
22 | ||
23 | def _swig_getattr(self,class_type,name): | |
24 | method = class_type.__swig_getmethods__.get(name,None) | |
25 | if method: return method(self) | |
26 | raise AttributeError,name | |
27 | ||
28 | import types | |
29 | try: | |
30 | _object = types.ObjectType | |
31 | _newclass = 1 | |
32 | except AttributeError: | |
33 | class _object : pass | |
34 | _newclass = 0 | |
35 | del types | |
36 | ||
37 | ||
38 | def _swig_setattr_nondynamic_method(set): | |
39 | def set_attr(self,name,value): | |
40 | if hasattr(self,name) or (name in ("this", "thisown")): | |
41 | set(self,name,value) | |
42 | else: | |
43 | raise AttributeError("You cannot add attributes to %s" % self) | |
44 | return set_attr | |
45 | ||
46 | ||
d14a1e28 RD |
47 | #// Give a reference to the dictionary of this module to the C++ extension |
48 | #// code. | |
54f9ee45 | 49 | _core_._wxPySetDictionary(vars()) |
d14a1e28 RD |
50 | |
51 | #// A little trick to make 'wx' be a reference to this module so wx.Names can | |
52 | #// be used here. | |
53 | import sys as _sys | |
54 | wx = _sys.modules[__name__] | |
55 | ||
66c033b4 RD |
56 | |
57 | #---------------------------------------------------------------------------- | |
58 | ||
59 | def _deprecated(callable, msg=None): | |
60 | """ | |
61 | Create a wrapper function that will raise a DeprecationWarning | |
62 | before calling the callable. | |
63 | """ | |
64 | if msg is None: | |
65 | msg = "%s is deprecated" % callable | |
66 | def deprecatedWrapper(*args, **kwargs): | |
67 | import warnings | |
68 | warnings.warn(msg, DeprecationWarning, stacklevel=2) | |
69 | return callable(*args, **kwargs) | |
70 | deprecatedWrapper.__doc__ = msg | |
71 | return deprecatedWrapper | |
72 | ||
73 | ||
74 | #---------------------------------------------------------------------------- | |
75 | ||
54f9ee45 RD |
76 | NOT_FOUND = _core_.NOT_FOUND |
77 | VSCROLL = _core_.VSCROLL | |
78 | HSCROLL = _core_.HSCROLL | |
79 | CAPTION = _core_.CAPTION | |
80 | DOUBLE_BORDER = _core_.DOUBLE_BORDER | |
81 | SUNKEN_BORDER = _core_.SUNKEN_BORDER | |
82 | RAISED_BORDER = _core_.RAISED_BORDER | |
83 | BORDER = _core_.BORDER | |
84 | SIMPLE_BORDER = _core_.SIMPLE_BORDER | |
85 | STATIC_BORDER = _core_.STATIC_BORDER | |
86 | TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW | |
87 | NO_BORDER = _core_.NO_BORDER | |
88 | TAB_TRAVERSAL = _core_.TAB_TRAVERSAL | |
89 | WANTS_CHARS = _core_.WANTS_CHARS | |
90 | POPUP_WINDOW = _core_.POPUP_WINDOW | |
91 | CENTER_FRAME = _core_.CENTER_FRAME | |
92 | CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN | |
93 | CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN | |
54f9ee45 RD |
94 | CLIP_CHILDREN = _core_.CLIP_CHILDREN |
95 | CLIP_SIBLINGS = _core_.CLIP_SIBLINGS | |
96 | ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB | |
97 | RETAINED = _core_.RETAINED | |
98 | BACKINGSTORE = _core_.BACKINGSTORE | |
99 | COLOURED = _core_.COLOURED | |
100 | FIXED_LENGTH = _core_.FIXED_LENGTH | |
101 | LB_NEEDED_SB = _core_.LB_NEEDED_SB | |
102 | LB_ALWAYS_SB = _core_.LB_ALWAYS_SB | |
103 | LB_SORT = _core_.LB_SORT | |
104 | LB_SINGLE = _core_.LB_SINGLE | |
105 | LB_MULTIPLE = _core_.LB_MULTIPLE | |
106 | LB_EXTENDED = _core_.LB_EXTENDED | |
107 | LB_OWNERDRAW = _core_.LB_OWNERDRAW | |
108 | LB_HSCROLL = _core_.LB_HSCROLL | |
109 | PROCESS_ENTER = _core_.PROCESS_ENTER | |
110 | PASSWORD = _core_.PASSWORD | |
111 | CB_SIMPLE = _core_.CB_SIMPLE | |
112 | CB_DROPDOWN = _core_.CB_DROPDOWN | |
113 | CB_SORT = _core_.CB_SORT | |
114 | CB_READONLY = _core_.CB_READONLY | |
115 | RA_HORIZONTAL = _core_.RA_HORIZONTAL | |
116 | RA_VERTICAL = _core_.RA_VERTICAL | |
117 | RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS | |
118 | RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS | |
fef4c27a | 119 | RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX |
54f9ee45 RD |
120 | RB_GROUP = _core_.RB_GROUP |
121 | RB_SINGLE = _core_.RB_SINGLE | |
54f9ee45 RD |
122 | SB_HORIZONTAL = _core_.SB_HORIZONTAL |
123 | SB_VERTICAL = _core_.SB_VERTICAL | |
fef4c27a | 124 | RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX |
54f9ee45 RD |
125 | ST_SIZEGRIP = _core_.ST_SIZEGRIP |
126 | ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE | |
127 | FLOOD_SURFACE = _core_.FLOOD_SURFACE | |
128 | FLOOD_BORDER = _core_.FLOOD_BORDER | |
129 | ODDEVEN_RULE = _core_.ODDEVEN_RULE | |
130 | WINDING_RULE = _core_.WINDING_RULE | |
131 | TOOL_TOP = _core_.TOOL_TOP | |
132 | TOOL_BOTTOM = _core_.TOOL_BOTTOM | |
133 | TOOL_LEFT = _core_.TOOL_LEFT | |
134 | TOOL_RIGHT = _core_.TOOL_RIGHT | |
135 | OK = _core_.OK | |
136 | YES_NO = _core_.YES_NO | |
137 | CANCEL = _core_.CANCEL | |
138 | YES = _core_.YES | |
139 | NO = _core_.NO | |
140 | NO_DEFAULT = _core_.NO_DEFAULT | |
141 | YES_DEFAULT = _core_.YES_DEFAULT | |
142 | ICON_EXCLAMATION = _core_.ICON_EXCLAMATION | |
143 | ICON_HAND = _core_.ICON_HAND | |
144 | ICON_QUESTION = _core_.ICON_QUESTION | |
145 | ICON_INFORMATION = _core_.ICON_INFORMATION | |
146 | ICON_STOP = _core_.ICON_STOP | |
147 | ICON_ASTERISK = _core_.ICON_ASTERISK | |
148 | ICON_MASK = _core_.ICON_MASK | |
149 | ICON_WARNING = _core_.ICON_WARNING | |
150 | ICON_ERROR = _core_.ICON_ERROR | |
151 | FORWARD = _core_.FORWARD | |
152 | BACKWARD = _core_.BACKWARD | |
153 | RESET = _core_.RESET | |
154 | HELP = _core_.HELP | |
155 | MORE = _core_.MORE | |
156 | SETUP = _core_.SETUP | |
157 | SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH | |
158 | SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT | |
159 | SIZE_AUTO = _core_.SIZE_AUTO | |
160 | SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING | |
161 | SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE | |
162 | PORTRAIT = _core_.PORTRAIT | |
163 | LANDSCAPE = _core_.LANDSCAPE | |
164 | PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH | |
165 | PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM | |
166 | PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW | |
167 | PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT | |
168 | ID_ANY = _core_.ID_ANY | |
169 | ID_SEPARATOR = _core_.ID_SEPARATOR | |
170 | ID_LOWEST = _core_.ID_LOWEST | |
171 | ID_OPEN = _core_.ID_OPEN | |
172 | ID_CLOSE = _core_.ID_CLOSE | |
173 | ID_NEW = _core_.ID_NEW | |
174 | ID_SAVE = _core_.ID_SAVE | |
175 | ID_SAVEAS = _core_.ID_SAVEAS | |
176 | ID_REVERT = _core_.ID_REVERT | |
177 | ID_EXIT = _core_.ID_EXIT | |
178 | ID_UNDO = _core_.ID_UNDO | |
179 | ID_REDO = _core_.ID_REDO | |
180 | ID_HELP = _core_.ID_HELP | |
181 | ID_PRINT = _core_.ID_PRINT | |
182 | ID_PRINT_SETUP = _core_.ID_PRINT_SETUP | |
183 | ID_PREVIEW = _core_.ID_PREVIEW | |
184 | ID_ABOUT = _core_.ID_ABOUT | |
185 | ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS | |
186 | ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS | |
187 | ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES | |
188 | ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT | |
189 | ID_CLOSE_ALL = _core_.ID_CLOSE_ALL | |
190 | ID_PREFERENCES = _core_.ID_PREFERENCES | |
191 | ID_CUT = _core_.ID_CUT | |
192 | ID_COPY = _core_.ID_COPY | |
193 | ID_PASTE = _core_.ID_PASTE | |
194 | ID_CLEAR = _core_.ID_CLEAR | |
195 | ID_FIND = _core_.ID_FIND | |
196 | ID_DUPLICATE = _core_.ID_DUPLICATE | |
197 | ID_SELECTALL = _core_.ID_SELECTALL | |
198 | ID_DELETE = _core_.ID_DELETE | |
199 | ID_REPLACE = _core_.ID_REPLACE | |
200 | ID_REPLACE_ALL = _core_.ID_REPLACE_ALL | |
201 | ID_PROPERTIES = _core_.ID_PROPERTIES | |
202 | ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS | |
203 | ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS | |
204 | ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS | |
205 | ID_VIEW_LIST = _core_.ID_VIEW_LIST | |
206 | ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE | |
207 | ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME | |
208 | ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE | |
209 | ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE | |
210 | ID_FILE1 = _core_.ID_FILE1 | |
211 | ID_FILE2 = _core_.ID_FILE2 | |
212 | ID_FILE3 = _core_.ID_FILE3 | |
213 | ID_FILE4 = _core_.ID_FILE4 | |
214 | ID_FILE5 = _core_.ID_FILE5 | |
215 | ID_FILE6 = _core_.ID_FILE6 | |
216 | ID_FILE7 = _core_.ID_FILE7 | |
217 | ID_FILE8 = _core_.ID_FILE8 | |
218 | ID_FILE9 = _core_.ID_FILE9 | |
219 | ID_OK = _core_.ID_OK | |
220 | ID_CANCEL = _core_.ID_CANCEL | |
221 | ID_APPLY = _core_.ID_APPLY | |
222 | ID_YES = _core_.ID_YES | |
223 | ID_NO = _core_.ID_NO | |
224 | ID_STATIC = _core_.ID_STATIC | |
225 | ID_FORWARD = _core_.ID_FORWARD | |
226 | ID_BACKWARD = _core_.ID_BACKWARD | |
227 | ID_DEFAULT = _core_.ID_DEFAULT | |
228 | ID_MORE = _core_.ID_MORE | |
229 | ID_SETUP = _core_.ID_SETUP | |
230 | ID_RESET = _core_.ID_RESET | |
231 | ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP | |
232 | ID_YESTOALL = _core_.ID_YESTOALL | |
233 | ID_NOTOALL = _core_.ID_NOTOALL | |
234 | ID_ABORT = _core_.ID_ABORT | |
235 | ID_RETRY = _core_.ID_RETRY | |
236 | ID_IGNORE = _core_.ID_IGNORE | |
7bc1e663 RD |
237 | ID_ADD = _core_.ID_ADD |
238 | ID_REMOVE = _core_.ID_REMOVE | |
239 | ID_UP = _core_.ID_UP | |
240 | ID_DOWN = _core_.ID_DOWN | |
241 | ID_HOME = _core_.ID_HOME | |
242 | ID_REFRESH = _core_.ID_REFRESH | |
243 | ID_STOP = _core_.ID_STOP | |
244 | ID_INDEX = _core_.ID_INDEX | |
245 | ID_BOLD = _core_.ID_BOLD | |
246 | ID_ITALIC = _core_.ID_ITALIC | |
247 | ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER | |
248 | ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL | |
249 | ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT | |
250 | ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT | |
251 | ID_UNDERLINE = _core_.ID_UNDERLINE | |
252 | ID_INDENT = _core_.ID_INDENT | |
253 | ID_UNINDENT = _core_.ID_UNINDENT | |
254 | ID_ZOOM_100 = _core_.ID_ZOOM_100 | |
255 | ID_ZOOM_FIT = _core_.ID_ZOOM_FIT | |
256 | ID_ZOOM_IN = _core_.ID_ZOOM_IN | |
257 | ID_ZOOM_OUT = _core_.ID_ZOOM_OUT | |
258 | ID_UNDELETE = _core_.ID_UNDELETE | |
259 | ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED | |
54f9ee45 RD |
260 | ID_HIGHEST = _core_.ID_HIGHEST |
261 | OPEN = _core_.OPEN | |
262 | SAVE = _core_.SAVE | |
263 | HIDE_READONLY = _core_.HIDE_READONLY | |
264 | OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT | |
265 | FILE_MUST_EXIST = _core_.FILE_MUST_EXIST | |
266 | MULTIPLE = _core_.MULTIPLE | |
267 | CHANGE_DIR = _core_.CHANGE_DIR | |
268 | ACCEL_ALT = _core_.ACCEL_ALT | |
269 | ACCEL_CTRL = _core_.ACCEL_CTRL | |
270 | ACCEL_SHIFT = _core_.ACCEL_SHIFT | |
271 | ACCEL_NORMAL = _core_.ACCEL_NORMAL | |
272 | PD_AUTO_HIDE = _core_.PD_AUTO_HIDE | |
273 | PD_APP_MODAL = _core_.PD_APP_MODAL | |
274 | PD_CAN_ABORT = _core_.PD_CAN_ABORT | |
275 | PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME | |
276 | PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME | |
277 | PD_REMAINING_TIME = _core_.PD_REMAINING_TIME | |
e505d15e RD |
278 | PD_SMOOTH = _core_.PD_SMOOTH |
279 | PD_CAN_SKIP = _core_.PD_CAN_SKIP | |
54f9ee45 RD |
280 | DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON |
281 | DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE | |
282 | MENU_TEAROFF = _core_.MENU_TEAROFF | |
283 | MB_DOCKABLE = _core_.MB_DOCKABLE | |
284 | NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE | |
285 | FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE | |
286 | LI_HORIZONTAL = _core_.LI_HORIZONTAL | |
287 | LI_VERTICAL = _core_.LI_VERTICAL | |
288 | WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY | |
289 | WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS | |
290 | WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT | |
291 | WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND | |
292 | WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE | |
293 | WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES | |
294 | MM_TEXT = _core_.MM_TEXT | |
295 | MM_LOMETRIC = _core_.MM_LOMETRIC | |
296 | MM_HIMETRIC = _core_.MM_HIMETRIC | |
297 | MM_LOENGLISH = _core_.MM_LOENGLISH | |
298 | MM_HIENGLISH = _core_.MM_HIENGLISH | |
299 | MM_TWIPS = _core_.MM_TWIPS | |
300 | MM_ISOTROPIC = _core_.MM_ISOTROPIC | |
301 | MM_ANISOTROPIC = _core_.MM_ANISOTROPIC | |
302 | MM_POINTS = _core_.MM_POINTS | |
303 | MM_METRIC = _core_.MM_METRIC | |
304 | CENTRE = _core_.CENTRE | |
305 | CENTER = _core_.CENTER | |
306 | HORIZONTAL = _core_.HORIZONTAL | |
307 | VERTICAL = _core_.VERTICAL | |
308 | BOTH = _core_.BOTH | |
309 | LEFT = _core_.LEFT | |
310 | RIGHT = _core_.RIGHT | |
311 | UP = _core_.UP | |
312 | DOWN = _core_.DOWN | |
313 | TOP = _core_.TOP | |
314 | BOTTOM = _core_.BOTTOM | |
315 | NORTH = _core_.NORTH | |
316 | SOUTH = _core_.SOUTH | |
317 | WEST = _core_.WEST | |
318 | EAST = _core_.EAST | |
319 | ALL = _core_.ALL | |
320 | ALIGN_NOT = _core_.ALIGN_NOT | |
321 | ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL | |
322 | ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL | |
323 | ALIGN_LEFT = _core_.ALIGN_LEFT | |
324 | ALIGN_TOP = _core_.ALIGN_TOP | |
325 | ALIGN_RIGHT = _core_.ALIGN_RIGHT | |
326 | ALIGN_BOTTOM = _core_.ALIGN_BOTTOM | |
327 | ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL | |
328 | ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL | |
329 | ALIGN_CENTER = _core_.ALIGN_CENTER | |
330 | ALIGN_CENTRE = _core_.ALIGN_CENTRE | |
331 | ALIGN_MASK = _core_.ALIGN_MASK | |
332 | STRETCH_NOT = _core_.STRETCH_NOT | |
333 | SHRINK = _core_.SHRINK | |
334 | GROW = _core_.GROW | |
335 | EXPAND = _core_.EXPAND | |
336 | SHAPED = _core_.SHAPED | |
337 | FIXED_MINSIZE = _core_.FIXED_MINSIZE | |
338 | TILE = _core_.TILE | |
339 | ADJUST_MINSIZE = _core_.ADJUST_MINSIZE | |
340 | BORDER_DEFAULT = _core_.BORDER_DEFAULT | |
341 | BORDER_NONE = _core_.BORDER_NONE | |
342 | BORDER_STATIC = _core_.BORDER_STATIC | |
343 | BORDER_SIMPLE = _core_.BORDER_SIMPLE | |
344 | BORDER_RAISED = _core_.BORDER_RAISED | |
345 | BORDER_SUNKEN = _core_.BORDER_SUNKEN | |
346 | BORDER_DOUBLE = _core_.BORDER_DOUBLE | |
347 | BORDER_MASK = _core_.BORDER_MASK | |
7bc1e663 RD |
348 | BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM |
349 | BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR | |
350 | BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM | |
54f9ee45 RD |
351 | DEFAULT = _core_.DEFAULT |
352 | DECORATIVE = _core_.DECORATIVE | |
353 | ROMAN = _core_.ROMAN | |
354 | SCRIPT = _core_.SCRIPT | |
355 | SWISS = _core_.SWISS | |
356 | MODERN = _core_.MODERN | |
357 | TELETYPE = _core_.TELETYPE | |
358 | VARIABLE = _core_.VARIABLE | |
359 | FIXED = _core_.FIXED | |
360 | NORMAL = _core_.NORMAL | |
361 | LIGHT = _core_.LIGHT | |
362 | BOLD = _core_.BOLD | |
363 | ITALIC = _core_.ITALIC | |
364 | SLANT = _core_.SLANT | |
365 | SOLID = _core_.SOLID | |
366 | DOT = _core_.DOT | |
367 | LONG_DASH = _core_.LONG_DASH | |
368 | SHORT_DASH = _core_.SHORT_DASH | |
369 | DOT_DASH = _core_.DOT_DASH | |
370 | USER_DASH = _core_.USER_DASH | |
371 | TRANSPARENT = _core_.TRANSPARENT | |
372 | STIPPLE = _core_.STIPPLE | |
373 | BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH | |
374 | CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH | |
375 | FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH | |
376 | CROSS_HATCH = _core_.CROSS_HATCH | |
377 | HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH | |
378 | VERTICAL_HATCH = _core_.VERTICAL_HATCH | |
379 | JOIN_BEVEL = _core_.JOIN_BEVEL | |
380 | JOIN_MITER = _core_.JOIN_MITER | |
381 | JOIN_ROUND = _core_.JOIN_ROUND | |
382 | CAP_ROUND = _core_.CAP_ROUND | |
383 | CAP_PROJECTING = _core_.CAP_PROJECTING | |
384 | CAP_BUTT = _core_.CAP_BUTT | |
385 | CLEAR = _core_.CLEAR | |
386 | XOR = _core_.XOR | |
387 | INVERT = _core_.INVERT | |
388 | OR_REVERSE = _core_.OR_REVERSE | |
389 | AND_REVERSE = _core_.AND_REVERSE | |
390 | COPY = _core_.COPY | |
391 | AND = _core_.AND | |
392 | AND_INVERT = _core_.AND_INVERT | |
393 | NO_OP = _core_.NO_OP | |
394 | NOR = _core_.NOR | |
395 | EQUIV = _core_.EQUIV | |
396 | SRC_INVERT = _core_.SRC_INVERT | |
397 | OR_INVERT = _core_.OR_INVERT | |
398 | NAND = _core_.NAND | |
399 | OR = _core_.OR | |
400 | SET = _core_.SET | |
401 | WXK_BACK = _core_.WXK_BACK | |
402 | WXK_TAB = _core_.WXK_TAB | |
403 | WXK_RETURN = _core_.WXK_RETURN | |
404 | WXK_ESCAPE = _core_.WXK_ESCAPE | |
405 | WXK_SPACE = _core_.WXK_SPACE | |
406 | WXK_DELETE = _core_.WXK_DELETE | |
407 | WXK_START = _core_.WXK_START | |
408 | WXK_LBUTTON = _core_.WXK_LBUTTON | |
409 | WXK_RBUTTON = _core_.WXK_RBUTTON | |
410 | WXK_CANCEL = _core_.WXK_CANCEL | |
411 | WXK_MBUTTON = _core_.WXK_MBUTTON | |
412 | WXK_CLEAR = _core_.WXK_CLEAR | |
413 | WXK_SHIFT = _core_.WXK_SHIFT | |
414 | WXK_ALT = _core_.WXK_ALT | |
415 | WXK_CONTROL = _core_.WXK_CONTROL | |
416 | WXK_MENU = _core_.WXK_MENU | |
417 | WXK_PAUSE = _core_.WXK_PAUSE | |
418 | WXK_CAPITAL = _core_.WXK_CAPITAL | |
419 | WXK_PRIOR = _core_.WXK_PRIOR | |
420 | WXK_NEXT = _core_.WXK_NEXT | |
421 | WXK_END = _core_.WXK_END | |
422 | WXK_HOME = _core_.WXK_HOME | |
423 | WXK_LEFT = _core_.WXK_LEFT | |
424 | WXK_UP = _core_.WXK_UP | |
425 | WXK_RIGHT = _core_.WXK_RIGHT | |
426 | WXK_DOWN = _core_.WXK_DOWN | |
427 | WXK_SELECT = _core_.WXK_SELECT | |
428 | WXK_PRINT = _core_.WXK_PRINT | |
429 | WXK_EXECUTE = _core_.WXK_EXECUTE | |
430 | WXK_SNAPSHOT = _core_.WXK_SNAPSHOT | |
431 | WXK_INSERT = _core_.WXK_INSERT | |
432 | WXK_HELP = _core_.WXK_HELP | |
433 | WXK_NUMPAD0 = _core_.WXK_NUMPAD0 | |
434 | WXK_NUMPAD1 = _core_.WXK_NUMPAD1 | |
435 | WXK_NUMPAD2 = _core_.WXK_NUMPAD2 | |
436 | WXK_NUMPAD3 = _core_.WXK_NUMPAD3 | |
437 | WXK_NUMPAD4 = _core_.WXK_NUMPAD4 | |
438 | WXK_NUMPAD5 = _core_.WXK_NUMPAD5 | |
439 | WXK_NUMPAD6 = _core_.WXK_NUMPAD6 | |
440 | WXK_NUMPAD7 = _core_.WXK_NUMPAD7 | |
441 | WXK_NUMPAD8 = _core_.WXK_NUMPAD8 | |
442 | WXK_NUMPAD9 = _core_.WXK_NUMPAD9 | |
443 | WXK_MULTIPLY = _core_.WXK_MULTIPLY | |
444 | WXK_ADD = _core_.WXK_ADD | |
445 | WXK_SEPARATOR = _core_.WXK_SEPARATOR | |
446 | WXK_SUBTRACT = _core_.WXK_SUBTRACT | |
447 | WXK_DECIMAL = _core_.WXK_DECIMAL | |
448 | WXK_DIVIDE = _core_.WXK_DIVIDE | |
449 | WXK_F1 = _core_.WXK_F1 | |
450 | WXK_F2 = _core_.WXK_F2 | |
451 | WXK_F3 = _core_.WXK_F3 | |
452 | WXK_F4 = _core_.WXK_F4 | |
453 | WXK_F5 = _core_.WXK_F5 | |
454 | WXK_F6 = _core_.WXK_F6 | |
455 | WXK_F7 = _core_.WXK_F7 | |
456 | WXK_F8 = _core_.WXK_F8 | |
457 | WXK_F9 = _core_.WXK_F9 | |
458 | WXK_F10 = _core_.WXK_F10 | |
459 | WXK_F11 = _core_.WXK_F11 | |
460 | WXK_F12 = _core_.WXK_F12 | |
461 | WXK_F13 = _core_.WXK_F13 | |
462 | WXK_F14 = _core_.WXK_F14 | |
463 | WXK_F15 = _core_.WXK_F15 | |
464 | WXK_F16 = _core_.WXK_F16 | |
465 | WXK_F17 = _core_.WXK_F17 | |
466 | WXK_F18 = _core_.WXK_F18 | |
467 | WXK_F19 = _core_.WXK_F19 | |
468 | WXK_F20 = _core_.WXK_F20 | |
469 | WXK_F21 = _core_.WXK_F21 | |
470 | WXK_F22 = _core_.WXK_F22 | |
471 | WXK_F23 = _core_.WXK_F23 | |
472 | WXK_F24 = _core_.WXK_F24 | |
473 | WXK_NUMLOCK = _core_.WXK_NUMLOCK | |
474 | WXK_SCROLL = _core_.WXK_SCROLL | |
475 | WXK_PAGEUP = _core_.WXK_PAGEUP | |
476 | WXK_PAGEDOWN = _core_.WXK_PAGEDOWN | |
477 | WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE | |
478 | WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB | |
479 | WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER | |
480 | WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1 | |
481 | WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2 | |
482 | WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3 | |
483 | WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4 | |
484 | WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME | |
485 | WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT | |
486 | WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP | |
487 | WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT | |
488 | WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN | |
489 | WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR | |
490 | WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP | |
491 | WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT | |
492 | WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN | |
493 | WXK_NUMPAD_END = _core_.WXK_NUMPAD_END | |
494 | WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN | |
495 | WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT | |
496 | WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE | |
497 | WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL | |
498 | WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY | |
499 | WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD | |
500 | WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR | |
501 | WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT | |
502 | WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL | |
503 | WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE | |
504 | WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT | |
505 | WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT | |
506 | WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU | |
507 | PAPER_NONE = _core_.PAPER_NONE | |
508 | PAPER_LETTER = _core_.PAPER_LETTER | |
509 | PAPER_LEGAL = _core_.PAPER_LEGAL | |
510 | PAPER_A4 = _core_.PAPER_A4 | |
511 | PAPER_CSHEET = _core_.PAPER_CSHEET | |
512 | PAPER_DSHEET = _core_.PAPER_DSHEET | |
513 | PAPER_ESHEET = _core_.PAPER_ESHEET | |
514 | PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL | |
515 | PAPER_TABLOID = _core_.PAPER_TABLOID | |
516 | PAPER_LEDGER = _core_.PAPER_LEDGER | |
517 | PAPER_STATEMENT = _core_.PAPER_STATEMENT | |
518 | PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE | |
519 | PAPER_A3 = _core_.PAPER_A3 | |
520 | PAPER_A4SMALL = _core_.PAPER_A4SMALL | |
521 | PAPER_A5 = _core_.PAPER_A5 | |
522 | PAPER_B4 = _core_.PAPER_B4 | |
523 | PAPER_B5 = _core_.PAPER_B5 | |
524 | PAPER_FOLIO = _core_.PAPER_FOLIO | |
525 | PAPER_QUARTO = _core_.PAPER_QUARTO | |
526 | PAPER_10X14 = _core_.PAPER_10X14 | |
527 | PAPER_11X17 = _core_.PAPER_11X17 | |
528 | PAPER_NOTE = _core_.PAPER_NOTE | |
529 | PAPER_ENV_9 = _core_.PAPER_ENV_9 | |
530 | PAPER_ENV_10 = _core_.PAPER_ENV_10 | |
531 | PAPER_ENV_11 = _core_.PAPER_ENV_11 | |
532 | PAPER_ENV_12 = _core_.PAPER_ENV_12 | |
533 | PAPER_ENV_14 = _core_.PAPER_ENV_14 | |
534 | PAPER_ENV_DL = _core_.PAPER_ENV_DL | |
535 | PAPER_ENV_C5 = _core_.PAPER_ENV_C5 | |
536 | PAPER_ENV_C3 = _core_.PAPER_ENV_C3 | |
537 | PAPER_ENV_C4 = _core_.PAPER_ENV_C4 | |
538 | PAPER_ENV_C6 = _core_.PAPER_ENV_C6 | |
539 | PAPER_ENV_C65 = _core_.PAPER_ENV_C65 | |
540 | PAPER_ENV_B4 = _core_.PAPER_ENV_B4 | |
541 | PAPER_ENV_B5 = _core_.PAPER_ENV_B5 | |
542 | PAPER_ENV_B6 = _core_.PAPER_ENV_B6 | |
543 | PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY | |
544 | PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH | |
545 | PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL | |
546 | PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US | |
547 | PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN | |
548 | PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN | |
549 | PAPER_ISO_B4 = _core_.PAPER_ISO_B4 | |
550 | PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD | |
551 | PAPER_9X11 = _core_.PAPER_9X11 | |
552 | PAPER_10X11 = _core_.PAPER_10X11 | |
553 | PAPER_15X11 = _core_.PAPER_15X11 | |
554 | PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE | |
555 | PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA | |
556 | PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA | |
557 | PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA | |
558 | PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA | |
559 | PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE | |
560 | PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE | |
561 | PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE | |
562 | PAPER_A_PLUS = _core_.PAPER_A_PLUS | |
563 | PAPER_B_PLUS = _core_.PAPER_B_PLUS | |
564 | PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS | |
565 | PAPER_A4_PLUS = _core_.PAPER_A4_PLUS | |
566 | PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE | |
567 | PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE | |
568 | PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA | |
569 | PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA | |
570 | PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA | |
571 | PAPER_A2 = _core_.PAPER_A2 | |
572 | PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE | |
573 | PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE | |
574 | DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX | |
575 | DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL | |
576 | DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL | |
577 | ITEM_SEPARATOR = _core_.ITEM_SEPARATOR | |
578 | ITEM_NORMAL = _core_.ITEM_NORMAL | |
579 | ITEM_CHECK = _core_.ITEM_CHECK | |
580 | ITEM_RADIO = _core_.ITEM_RADIO | |
581 | ITEM_MAX = _core_.ITEM_MAX | |
582 | HT_NOWHERE = _core_.HT_NOWHERE | |
583 | HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST | |
584 | HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1 | |
585 | HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2 | |
586 | HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1 | |
587 | HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2 | |
588 | HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB | |
589 | HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1 | |
590 | HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2 | |
591 | HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST | |
592 | HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE | |
593 | HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE | |
594 | HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR | |
595 | HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR | |
596 | HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER | |
597 | HT_MAX = _core_.HT_MAX | |
598 | MOD_NONE = _core_.MOD_NONE | |
599 | MOD_ALT = _core_.MOD_ALT | |
600 | MOD_CONTROL = _core_.MOD_CONTROL | |
601 | MOD_SHIFT = _core_.MOD_SHIFT | |
602 | MOD_WIN = _core_.MOD_WIN | |
603 | UPDATE_UI_NONE = _core_.UPDATE_UI_NONE | |
604 | UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE | |
605 | UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE | |
d14a1e28 RD |
606 | #--------------------------------------------------------------------------- |
607 | ||
608 | class Object(object): | |
0df68c9f RD |
609 | """ |
610 | The base class for most wx objects, although in wxPython not | |
611 | much functionality is needed nor exposed. | |
612 | """ | |
d14a1e28 RD |
613 | def __init__(self): raise RuntimeError, "No constructor defined" |
614 | def __repr__(self): | |
615 | return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 616 | def GetClassName(*args, **kwargs): |
0df68c9f | 617 | """ |
a95a7133 | 618 | GetClassName(self) -> String |
e811c8ce | 619 | |
a95a7133 | 620 | Returns the class name of the C++ class using wxRTTI. |
0df68c9f | 621 | """ |
54f9ee45 | 622 | return _core_.Object_GetClassName(*args, **kwargs) |
e811c8ce RD |
623 | |
624 | def Destroy(*args, **kwargs): | |
0df68c9f | 625 | """ |
a95a7133 | 626 | Destroy(self) |
e811c8ce | 627 | |
0df68c9f RD |
628 | Deletes the C++ object this Python object is a proxy for. |
629 | """ | |
54f9ee45 | 630 | return _core_.Object_Destroy(*args, **kwargs) |
e811c8ce | 631 | |
d14a1e28 RD |
632 | |
633 | class ObjectPtr(Object): | |
634 | def __init__(self, this): | |
635 | self.this = this | |
636 | if not hasattr(self,"thisown"): self.thisown = 0 | |
637 | self.__class__ = Object | |
54f9ee45 RD |
638 | _core_.Object_swigregister(ObjectPtr) |
639 | _wxPySetDictionary = _core_._wxPySetDictionary | |
d14a1e28 | 640 | |
54f9ee45 | 641 | _wxPyFixStockObjects = _core_._wxPyFixStockObjects |
3a04f143 | 642 | |
54f9ee45 | 643 | cvar = _core_.cvar |
196addbf | 644 | EmptyString = cvar.EmptyString |
d14a1e28 RD |
645 | |
646 | #--------------------------------------------------------------------------- | |
647 | ||
54f9ee45 RD |
648 | BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID |
649 | BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP | |
650 | BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO | |
651 | BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR | |
652 | BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM | |
653 | BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA | |
654 | BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM | |
655 | BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA | |
656 | BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF | |
657 | BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF | |
658 | BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG | |
659 | BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG | |
660 | BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM | |
661 | BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX | |
662 | BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT | |
663 | BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON | |
664 | BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI | |
665 | BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF | |
666 | BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR | |
667 | BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY | |
668 | CURSOR_NONE = _core_.CURSOR_NONE | |
669 | CURSOR_ARROW = _core_.CURSOR_ARROW | |
670 | CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW | |
671 | CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE | |
672 | CURSOR_CHAR = _core_.CURSOR_CHAR | |
673 | CURSOR_CROSS = _core_.CURSOR_CROSS | |
674 | CURSOR_HAND = _core_.CURSOR_HAND | |
675 | CURSOR_IBEAM = _core_.CURSOR_IBEAM | |
676 | CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON | |
677 | CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER | |
678 | CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON | |
679 | CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY | |
680 | CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH | |
681 | CURSOR_PENCIL = _core_.CURSOR_PENCIL | |
682 | CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT | |
683 | CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT | |
684 | CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW | |
685 | CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON | |
686 | CURSOR_SIZENESW = _core_.CURSOR_SIZENESW | |
687 | CURSOR_SIZENS = _core_.CURSOR_SIZENS | |
688 | CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE | |
689 | CURSOR_SIZEWE = _core_.CURSOR_SIZEWE | |
690 | CURSOR_SIZING = _core_.CURSOR_SIZING | |
691 | CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN | |
692 | CURSOR_WAIT = _core_.CURSOR_WAIT | |
693 | CURSOR_WATCH = _core_.CURSOR_WATCH | |
694 | CURSOR_BLANK = _core_.CURSOR_BLANK | |
695 | CURSOR_DEFAULT = _core_.CURSOR_DEFAULT | |
696 | CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW | |
697 | CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT | |
698 | CURSOR_MAX = _core_.CURSOR_MAX | |
d14a1e28 RD |
699 | #--------------------------------------------------------------------------- |
700 | ||
701 | class Size(object): | |
0df68c9f | 702 | """ |
41e2b43e | 703 | wx.Size is a useful data structure used to represent the size of |
093d3ff1 RD |
704 | something. It simply contians integer width and height |
705 | proprtites. In most places in wxPython where a wx.Size is | |
706 | expected a (width, height) tuple can be used instead. | |
0df68c9f | 707 | """ |
e811c8ce RD |
708 | def __repr__(self): |
709 | return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
710 | width = property(_core_.Size_width_get, _core_.Size_width_set) |
711 | height = property(_core_.Size_height_get, _core_.Size_height_set) | |
242b7b46 | 712 | x = width; y = height |
d14a1e28 | 713 | def __init__(self, *args, **kwargs): |
0df68c9f | 714 | """ |
a95a7133 | 715 | __init__(self, int w=0, int h=0) -> Size |
e811c8ce | 716 | |
0df68c9f RD |
717 | Creates a size object. |
718 | """ | |
54f9ee45 | 719 | newobj = _core_.new_Size(*args, **kwargs) |
d14a1e28 RD |
720 | self.this = newobj.this |
721 | self.thisown = 1 | |
722 | del newobj.thisown | |
54f9ee45 | 723 | def __del__(self, destroy=_core_.delete_Size): |
a95a7133 | 724 | """__del__(self)""" |
d14a1e28 RD |
725 | try: |
726 | if self.thisown: destroy(self) | |
727 | except: pass | |
e811c8ce RD |
728 | |
729 | def __eq__(*args, **kwargs): | |
0df68c9f | 730 | """ |
a95a7133 | 731 | __eq__(self, Size sz) -> bool |
e811c8ce | 732 | |
0df68c9f RD |
733 | Test for equality of wx.Size objects. |
734 | """ | |
54f9ee45 | 735 | return _core_.Size___eq__(*args, **kwargs) |
e811c8ce RD |
736 | |
737 | def __ne__(*args, **kwargs): | |
0df68c9f | 738 | """ |
a95a7133 | 739 | __ne__(self, Size sz) -> bool |
e811c8ce | 740 | |
0df68c9f RD |
741 | Test for inequality. |
742 | """ | |
54f9ee45 | 743 | return _core_.Size___ne__(*args, **kwargs) |
e811c8ce RD |
744 | |
745 | def __add__(*args, **kwargs): | |
0df68c9f | 746 | """ |
a95a7133 | 747 | __add__(self, Size sz) -> Size |
e811c8ce | 748 | |
0df68c9f RD |
749 | Add sz's proprties to this and return the result. |
750 | """ | |
54f9ee45 | 751 | return _core_.Size___add__(*args, **kwargs) |
e811c8ce RD |
752 | |
753 | def __sub__(*args, **kwargs): | |
0df68c9f | 754 | """ |
a95a7133 | 755 | __sub__(self, Size sz) -> Size |
e811c8ce | 756 | |
0df68c9f RD |
757 | Subtract sz's properties from this and return the result. |
758 | """ | |
54f9ee45 | 759 | return _core_.Size___sub__(*args, **kwargs) |
e811c8ce RD |
760 | |
761 | def IncTo(*args, **kwargs): | |
0df68c9f | 762 | """ |
a95a7133 | 763 | IncTo(self, Size sz) |
e811c8ce | 764 | |
0df68c9f RD |
765 | Increments this object so that both of its dimensions are not less |
766 | than the corresponding dimensions of the size. | |
767 | """ | |
54f9ee45 | 768 | return _core_.Size_IncTo(*args, **kwargs) |
e811c8ce RD |
769 | |
770 | def DecTo(*args, **kwargs): | |
0df68c9f | 771 | """ |
a95a7133 | 772 | DecTo(self, Size sz) |
e811c8ce | 773 | |
0df68c9f RD |
774 | Decrements this object so that both of its dimensions are not greater |
775 | than the corresponding dimensions of the size. | |
776 | """ | |
54f9ee45 | 777 | return _core_.Size_DecTo(*args, **kwargs) |
e811c8ce RD |
778 | |
779 | def Set(*args, **kwargs): | |
0df68c9f | 780 | """ |
a95a7133 | 781 | Set(self, int w, int h) |
e811c8ce | 782 | |
0df68c9f RD |
783 | Set both width and height. |
784 | """ | |
54f9ee45 | 785 | return _core_.Size_Set(*args, **kwargs) |
e811c8ce RD |
786 | |
787 | def SetWidth(*args, **kwargs): | |
a95a7133 | 788 | """SetWidth(self, int w)""" |
54f9ee45 | 789 | return _core_.Size_SetWidth(*args, **kwargs) |
e811c8ce RD |
790 | |
791 | def SetHeight(*args, **kwargs): | |
a95a7133 | 792 | """SetHeight(self, int h)""" |
54f9ee45 | 793 | return _core_.Size_SetHeight(*args, **kwargs) |
e811c8ce RD |
794 | |
795 | def GetWidth(*args, **kwargs): | |
a95a7133 | 796 | """GetWidth(self) -> int""" |
54f9ee45 | 797 | return _core_.Size_GetWidth(*args, **kwargs) |
e811c8ce RD |
798 | |
799 | def GetHeight(*args, **kwargs): | |
a95a7133 | 800 | """GetHeight(self) -> int""" |
54f9ee45 | 801 | return _core_.Size_GetHeight(*args, **kwargs) |
e811c8ce | 802 | |
74a57fcd RD |
803 | def IsFullySpecified(*args, **kwargs): |
804 | """ | |
a95a7133 | 805 | IsFullySpecified(self) -> bool |
74a57fcd RD |
806 | |
807 | Returns True if both components of the size are non-default values. | |
808 | """ | |
54f9ee45 | 809 | return _core_.Size_IsFullySpecified(*args, **kwargs) |
74a57fcd RD |
810 | |
811 | def SetDefaults(*args, **kwargs): | |
812 | """ | |
a95a7133 | 813 | SetDefaults(self, Size size) |
74a57fcd | 814 | |
41e2b43e RD |
815 | Combine this size with the other one replacing the default components |
816 | of this object (i.e. equal to -1) with those of the other. | |
74a57fcd | 817 | """ |
54f9ee45 | 818 | return _core_.Size_SetDefaults(*args, **kwargs) |
74a57fcd | 819 | |
e811c8ce | 820 | def Get(*args, **kwargs): |
0df68c9f RD |
821 | """ |
822 | Get() -> (width,height) | |
e811c8ce | 823 | |
0df68c9f RD |
824 | Returns the width and height properties as a tuple. |
825 | """ | |
54f9ee45 | 826 | return _core_.Size_Get(*args, **kwargs) |
e811c8ce | 827 | |
41e2b43e | 828 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
829 | def __str__(self): return str(self.Get()) |
830 | def __repr__(self): return 'wx.Size'+str(self.Get()) | |
831 | def __len__(self): return len(self.Get()) | |
832 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
833 | def __setitem__(self, index, val): |
834 | if index == 0: self.width = val | |
835 | elif index == 1: self.height = val | |
836 | else: raise IndexError | |
e811c8ce | 837 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
838 | __safe_for_unpickling__ = True |
839 | def __reduce__(self): return (wx.Size, self.Get()) | |
d14a1e28 RD |
840 | |
841 | ||
842 | class SizePtr(Size): | |
843 | def __init__(self, this): | |
844 | self.this = this | |
845 | if not hasattr(self,"thisown"): self.thisown = 0 | |
846 | self.__class__ = Size | |
54f9ee45 | 847 | _core_.Size_swigregister(SizePtr) |
d14a1e28 RD |
848 | |
849 | #--------------------------------------------------------------------------- | |
850 | ||
851 | class RealPoint(object): | |
0df68c9f | 852 | """ |
41e2b43e RD |
853 | A data structure for representing a point or position with floating |
854 | point x and y properties. In wxPython most places that expect a | |
855 | wx.RealPoint can also accept a (x,y) tuple. | |
0df68c9f | 856 | """ |
e811c8ce RD |
857 | def __repr__(self): |
858 | return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
859 | x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set) |
860 | y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set) | |
d14a1e28 | 861 | def __init__(self, *args, **kwargs): |
0df68c9f | 862 | """ |
a95a7133 | 863 | __init__(self, double x=0.0, double y=0.0) -> RealPoint |
e811c8ce | 864 | |
0df68c9f RD |
865 | Create a wx.RealPoint object |
866 | """ | |
54f9ee45 | 867 | newobj = _core_.new_RealPoint(*args, **kwargs) |
d14a1e28 RD |
868 | self.this = newobj.this |
869 | self.thisown = 1 | |
870 | del newobj.thisown | |
54f9ee45 | 871 | def __del__(self, destroy=_core_.delete_RealPoint): |
a95a7133 | 872 | """__del__(self)""" |
d14a1e28 RD |
873 | try: |
874 | if self.thisown: destroy(self) | |
875 | except: pass | |
e811c8ce RD |
876 | |
877 | def __eq__(*args, **kwargs): | |
0df68c9f | 878 | """ |
a95a7133 | 879 | __eq__(self, RealPoint pt) -> bool |
e811c8ce | 880 | |
0df68c9f RD |
881 | Test for equality of wx.RealPoint objects. |
882 | """ | |
54f9ee45 | 883 | return _core_.RealPoint___eq__(*args, **kwargs) |
e811c8ce RD |
884 | |
885 | def __ne__(*args, **kwargs): | |
0df68c9f | 886 | """ |
a95a7133 | 887 | __ne__(self, RealPoint pt) -> bool |
e811c8ce | 888 | |
0df68c9f RD |
889 | Test for inequality of wx.RealPoint objects. |
890 | """ | |
54f9ee45 | 891 | return _core_.RealPoint___ne__(*args, **kwargs) |
e811c8ce RD |
892 | |
893 | def __add__(*args, **kwargs): | |
0df68c9f | 894 | """ |
a95a7133 | 895 | __add__(self, RealPoint pt) -> RealPoint |
e811c8ce | 896 | |
0df68c9f RD |
897 | Add pt's proprties to this and return the result. |
898 | """ | |
54f9ee45 | 899 | return _core_.RealPoint___add__(*args, **kwargs) |
e811c8ce RD |
900 | |
901 | def __sub__(*args, **kwargs): | |
0df68c9f | 902 | """ |
a95a7133 | 903 | __sub__(self, RealPoint pt) -> RealPoint |
e811c8ce | 904 | |
0df68c9f RD |
905 | Subtract pt's proprties from this and return the result |
906 | """ | |
54f9ee45 | 907 | return _core_.RealPoint___sub__(*args, **kwargs) |
e811c8ce RD |
908 | |
909 | def Set(*args, **kwargs): | |
0df68c9f | 910 | """ |
a95a7133 | 911 | Set(self, double x, double y) |
e811c8ce | 912 | |
0df68c9f RD |
913 | Set both the x and y properties |
914 | """ | |
54f9ee45 | 915 | return _core_.RealPoint_Set(*args, **kwargs) |
e811c8ce RD |
916 | |
917 | def Get(*args, **kwargs): | |
0df68c9f RD |
918 | """ |
919 | Get() -> (x,y) | |
e811c8ce | 920 | |
0df68c9f RD |
921 | Return the x and y properties as a tuple. |
922 | """ | |
54f9ee45 | 923 | return _core_.RealPoint_Get(*args, **kwargs) |
e811c8ce | 924 | |
41e2b43e | 925 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
926 | def __str__(self): return str(self.Get()) |
927 | def __repr__(self): return 'wx.RealPoint'+str(self.Get()) | |
928 | def __len__(self): return len(self.Get()) | |
929 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 930 | def __setitem__(self, index, val): |
e811c8ce RD |
931 | if index == 0: self.x = val |
932 | elif index == 1: self.y = val | |
d14a1e28 | 933 | else: raise IndexError |
e811c8ce | 934 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
935 | __safe_for_unpickling__ = True |
936 | def __reduce__(self): return (wx.RealPoint, self.Get()) | |
d14a1e28 RD |
937 | |
938 | ||
939 | class RealPointPtr(RealPoint): | |
940 | def __init__(self, this): | |
941 | self.this = this | |
942 | if not hasattr(self,"thisown"): self.thisown = 0 | |
943 | self.__class__ = RealPoint | |
54f9ee45 | 944 | _core_.RealPoint_swigregister(RealPointPtr) |
d14a1e28 RD |
945 | |
946 | #--------------------------------------------------------------------------- | |
947 | ||
948 | class Point(object): | |
0df68c9f | 949 | """ |
41e2b43e RD |
950 | A data structure for representing a point or position with integer x |
951 | and y properties. Most places in wxPython that expect a wx.Point can | |
952 | also accept a (x,y) tuple. | |
0df68c9f | 953 | """ |
e811c8ce RD |
954 | def __repr__(self): |
955 | return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
956 | x = property(_core_.Point_x_get, _core_.Point_x_set) |
957 | y = property(_core_.Point_y_get, _core_.Point_y_set) | |
d14a1e28 | 958 | def __init__(self, *args, **kwargs): |
0df68c9f | 959 | """ |
a95a7133 | 960 | __init__(self, int x=0, int y=0) -> Point |
e811c8ce | 961 | |
0df68c9f RD |
962 | Create a wx.Point object |
963 | """ | |
54f9ee45 | 964 | newobj = _core_.new_Point(*args, **kwargs) |
d14a1e28 RD |
965 | self.this = newobj.this |
966 | self.thisown = 1 | |
967 | del newobj.thisown | |
54f9ee45 | 968 | def __del__(self, destroy=_core_.delete_Point): |
a95a7133 | 969 | """__del__(self)""" |
d14a1e28 RD |
970 | try: |
971 | if self.thisown: destroy(self) | |
972 | except: pass | |
e811c8ce RD |
973 | |
974 | def __eq__(*args, **kwargs): | |
0df68c9f | 975 | """ |
a95a7133 | 976 | __eq__(self, Point pt) -> bool |
e811c8ce | 977 | |
0df68c9f RD |
978 | Test for equality of wx.Point objects. |
979 | """ | |
54f9ee45 | 980 | return _core_.Point___eq__(*args, **kwargs) |
e811c8ce RD |
981 | |
982 | def __ne__(*args, **kwargs): | |
0df68c9f | 983 | """ |
a95a7133 | 984 | __ne__(self, Point pt) -> bool |
e811c8ce | 985 | |
0df68c9f RD |
986 | Test for inequality of wx.Point objects. |
987 | """ | |
54f9ee45 | 988 | return _core_.Point___ne__(*args, **kwargs) |
e811c8ce RD |
989 | |
990 | def __add__(*args, **kwargs): | |
0df68c9f | 991 | """ |
a95a7133 | 992 | __add__(self, Point pt) -> Point |
e811c8ce | 993 | |
0df68c9f RD |
994 | Add pt's proprties to this and return the result. |
995 | """ | |
54f9ee45 | 996 | return _core_.Point___add__(*args, **kwargs) |
e811c8ce RD |
997 | |
998 | def __sub__(*args, **kwargs): | |
0df68c9f | 999 | """ |
a95a7133 | 1000 | __sub__(self, Point pt) -> Point |
e811c8ce | 1001 | |
0df68c9f RD |
1002 | Subtract pt's proprties from this and return the result |
1003 | """ | |
54f9ee45 | 1004 | return _core_.Point___sub__(*args, **kwargs) |
e811c8ce RD |
1005 | |
1006 | def __iadd__(*args, **kwargs): | |
0df68c9f | 1007 | """ |
a95a7133 | 1008 | __iadd__(self, Point pt) -> Point |
e811c8ce | 1009 | |
0df68c9f RD |
1010 | Add pt to this object. |
1011 | """ | |
54f9ee45 | 1012 | return _core_.Point___iadd__(*args, **kwargs) |
e811c8ce RD |
1013 | |
1014 | def __isub__(*args, **kwargs): | |
0df68c9f | 1015 | """ |
a95a7133 | 1016 | __isub__(self, Point pt) -> Point |
e811c8ce | 1017 | |
0df68c9f RD |
1018 | Subtract pt from this object. |
1019 | """ | |
54f9ee45 | 1020 | return _core_.Point___isub__(*args, **kwargs) |
e811c8ce RD |
1021 | |
1022 | def Set(*args, **kwargs): | |
0df68c9f | 1023 | """ |
a95a7133 | 1024 | Set(self, long x, long y) |
e811c8ce | 1025 | |
0df68c9f RD |
1026 | Set both the x and y properties |
1027 | """ | |
54f9ee45 | 1028 | return _core_.Point_Set(*args, **kwargs) |
e811c8ce RD |
1029 | |
1030 | def Get(*args, **kwargs): | |
0df68c9f RD |
1031 | """ |
1032 | Get() -> (x,y) | |
e811c8ce | 1033 | |
0df68c9f RD |
1034 | Return the x and y properties as a tuple. |
1035 | """ | |
54f9ee45 | 1036 | return _core_.Point_Get(*args, **kwargs) |
e811c8ce | 1037 | |
41e2b43e | 1038 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1039 | def __str__(self): return str(self.Get()) |
1040 | def __repr__(self): return 'wx.Point'+str(self.Get()) | |
1041 | def __len__(self): return len(self.Get()) | |
1042 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1043 | def __setitem__(self, index, val): |
1044 | if index == 0: self.x = val | |
1045 | elif index == 1: self.y = val | |
1046 | else: raise IndexError | |
e811c8ce | 1047 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
1048 | __safe_for_unpickling__ = True |
1049 | def __reduce__(self): return (wx.Point, self.Get()) | |
d14a1e28 RD |
1050 | |
1051 | ||
1052 | class PointPtr(Point): | |
1053 | def __init__(self, this): | |
1054 | self.this = this | |
1055 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1056 | self.__class__ = Point | |
54f9ee45 | 1057 | _core_.Point_swigregister(PointPtr) |
d14a1e28 RD |
1058 | |
1059 | #--------------------------------------------------------------------------- | |
1060 | ||
1061 | class Rect(object): | |
0df68c9f | 1062 | """ |
41e2b43e RD |
1063 | A class for representing and manipulating rectangles. It has x, y, |
1064 | width and height properties. In wxPython most palces that expect a | |
1065 | wx.Rect can also accept a (x,y,width,height) tuple. | |
0df68c9f | 1066 | """ |
e811c8ce RD |
1067 | def __repr__(self): |
1068 | return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1069 | def __init__(self, *args, **kwargs): |
0df68c9f | 1070 | """ |
a95a7133 | 1071 | __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect |
e811c8ce | 1072 | |
0df68c9f RD |
1073 | Create a new Rect object. |
1074 | """ | |
54f9ee45 | 1075 | newobj = _core_.new_Rect(*args, **kwargs) |
d14a1e28 RD |
1076 | self.this = newobj.this |
1077 | self.thisown = 1 | |
1078 | del newobj.thisown | |
54f9ee45 | 1079 | def __del__(self, destroy=_core_.delete_Rect): |
a95a7133 | 1080 | """__del__(self)""" |
d14a1e28 RD |
1081 | try: |
1082 | if self.thisown: destroy(self) | |
1083 | except: pass | |
e811c8ce RD |
1084 | |
1085 | def GetX(*args, **kwargs): | |
a95a7133 | 1086 | """GetX(self) -> int""" |
54f9ee45 | 1087 | return _core_.Rect_GetX(*args, **kwargs) |
e811c8ce RD |
1088 | |
1089 | def SetX(*args, **kwargs): | |
a95a7133 | 1090 | """SetX(self, int x)""" |
54f9ee45 | 1091 | return _core_.Rect_SetX(*args, **kwargs) |
e811c8ce RD |
1092 | |
1093 | def GetY(*args, **kwargs): | |
a95a7133 | 1094 | """GetY(self) -> int""" |
54f9ee45 | 1095 | return _core_.Rect_GetY(*args, **kwargs) |
e811c8ce RD |
1096 | |
1097 | def SetY(*args, **kwargs): | |
a95a7133 | 1098 | """SetY(self, int y)""" |
54f9ee45 | 1099 | return _core_.Rect_SetY(*args, **kwargs) |
e811c8ce RD |
1100 | |
1101 | def GetWidth(*args, **kwargs): | |
a95a7133 | 1102 | """GetWidth(self) -> int""" |
54f9ee45 | 1103 | return _core_.Rect_GetWidth(*args, **kwargs) |
e811c8ce RD |
1104 | |
1105 | def SetWidth(*args, **kwargs): | |
a95a7133 | 1106 | """SetWidth(self, int w)""" |
54f9ee45 | 1107 | return _core_.Rect_SetWidth(*args, **kwargs) |
e811c8ce RD |
1108 | |
1109 | def GetHeight(*args, **kwargs): | |
a95a7133 | 1110 | """GetHeight(self) -> int""" |
54f9ee45 | 1111 | return _core_.Rect_GetHeight(*args, **kwargs) |
e811c8ce RD |
1112 | |
1113 | def SetHeight(*args, **kwargs): | |
a95a7133 | 1114 | """SetHeight(self, int h)""" |
54f9ee45 | 1115 | return _core_.Rect_SetHeight(*args, **kwargs) |
e811c8ce RD |
1116 | |
1117 | def GetPosition(*args, **kwargs): | |
a95a7133 | 1118 | """GetPosition(self) -> Point""" |
54f9ee45 | 1119 | return _core_.Rect_GetPosition(*args, **kwargs) |
e811c8ce RD |
1120 | |
1121 | def SetPosition(*args, **kwargs): | |
a95a7133 | 1122 | """SetPosition(self, Point p)""" |
54f9ee45 | 1123 | return _core_.Rect_SetPosition(*args, **kwargs) |
e811c8ce RD |
1124 | |
1125 | def GetSize(*args, **kwargs): | |
a95a7133 | 1126 | """GetSize(self) -> Size""" |
54f9ee45 | 1127 | return _core_.Rect_GetSize(*args, **kwargs) |
e811c8ce RD |
1128 | |
1129 | def SetSize(*args, **kwargs): | |
a95a7133 | 1130 | """SetSize(self, Size s)""" |
54f9ee45 | 1131 | return _core_.Rect_SetSize(*args, **kwargs) |
e811c8ce | 1132 | |
aff4cc5c RD |
1133 | def IsEmpty(*args, **kwargs): |
1134 | """IsEmpty(self) -> bool""" | |
1135 | return _core_.Rect_IsEmpty(*args, **kwargs) | |
1136 | ||
c9c7117a | 1137 | def GetTopLeft(*args, **kwargs): |
a95a7133 | 1138 | """GetTopLeft(self) -> Point""" |
54f9ee45 | 1139 | return _core_.Rect_GetTopLeft(*args, **kwargs) |
c9c7117a RD |
1140 | |
1141 | def SetTopLeft(*args, **kwargs): | |
a95a7133 | 1142 | """SetTopLeft(self, Point p)""" |
54f9ee45 | 1143 | return _core_.Rect_SetTopLeft(*args, **kwargs) |
c9c7117a RD |
1144 | |
1145 | def GetBottomRight(*args, **kwargs): | |
a95a7133 | 1146 | """GetBottomRight(self) -> Point""" |
54f9ee45 | 1147 | return _core_.Rect_GetBottomRight(*args, **kwargs) |
c9c7117a RD |
1148 | |
1149 | def SetBottomRight(*args, **kwargs): | |
a95a7133 | 1150 | """SetBottomRight(self, Point p)""" |
54f9ee45 | 1151 | return _core_.Rect_SetBottomRight(*args, **kwargs) |
c9c7117a | 1152 | |
e811c8ce | 1153 | def GetLeft(*args, **kwargs): |
a95a7133 | 1154 | """GetLeft(self) -> int""" |
54f9ee45 | 1155 | return _core_.Rect_GetLeft(*args, **kwargs) |
e811c8ce RD |
1156 | |
1157 | def GetTop(*args, **kwargs): | |
a95a7133 | 1158 | """GetTop(self) -> int""" |
54f9ee45 | 1159 | return _core_.Rect_GetTop(*args, **kwargs) |
e811c8ce RD |
1160 | |
1161 | def GetBottom(*args, **kwargs): | |
a95a7133 | 1162 | """GetBottom(self) -> int""" |
54f9ee45 | 1163 | return _core_.Rect_GetBottom(*args, **kwargs) |
e811c8ce RD |
1164 | |
1165 | def GetRight(*args, **kwargs): | |
a95a7133 | 1166 | """GetRight(self) -> int""" |
54f9ee45 | 1167 | return _core_.Rect_GetRight(*args, **kwargs) |
e811c8ce RD |
1168 | |
1169 | def SetLeft(*args, **kwargs): | |
a95a7133 | 1170 | """SetLeft(self, int left)""" |
54f9ee45 | 1171 | return _core_.Rect_SetLeft(*args, **kwargs) |
e811c8ce RD |
1172 | |
1173 | def SetRight(*args, **kwargs): | |
a95a7133 | 1174 | """SetRight(self, int right)""" |
54f9ee45 | 1175 | return _core_.Rect_SetRight(*args, **kwargs) |
e811c8ce RD |
1176 | |
1177 | def SetTop(*args, **kwargs): | |
a95a7133 | 1178 | """SetTop(self, int top)""" |
54f9ee45 | 1179 | return _core_.Rect_SetTop(*args, **kwargs) |
e811c8ce RD |
1180 | |
1181 | def SetBottom(*args, **kwargs): | |
a95a7133 | 1182 | """SetBottom(self, int bottom)""" |
54f9ee45 | 1183 | return _core_.Rect_SetBottom(*args, **kwargs) |
e811c8ce RD |
1184 | |
1185 | position = property(GetPosition, SetPosition) | |
1186 | size = property(GetSize, SetSize) | |
1187 | left = property(GetLeft, SetLeft) | |
1188 | right = property(GetRight, SetRight) | |
1189 | top = property(GetTop, SetTop) | |
1190 | bottom = property(GetBottom, SetBottom) | |
1191 | ||
1192 | def Inflate(*args, **kwargs): | |
0df68c9f | 1193 | """ |
a95a7133 | 1194 | Inflate(self, int dx, int dy) -> Rect |
e811c8ce | 1195 | |
8e738329 RD |
1196 | Increases the size of the rectangle. |
1197 | ||
1198 | The left border is moved farther left and the right border is moved | |
1199 | farther right by ``dx``. The upper border is moved farther up and the | |
1200 | bottom border is moved farther down by ``dy``. (Note the the width and | |
1201 | height of the rectangle thus change by ``2*dx`` and ``2*dy``, | |
1202 | respectively.) If one or both of ``dx`` and ``dy`` are negative, the | |
1203 | opposite happens: the rectangle size decreases in the respective | |
1204 | direction. | |
1205 | ||
1206 | The change is made to the rectangle inplace, if instead you need a | |
1207 | copy that is inflated, preserving the original then make the copy | |
1208 | first:: | |
1209 | ||
1210 | copy = wx.Rect(*original) | |
1211 | copy.Inflate(10,15) | |
1212 | ||
1213 | ||
0df68c9f | 1214 | """ |
54f9ee45 | 1215 | return _core_.Rect_Inflate(*args, **kwargs) |
e811c8ce RD |
1216 | |
1217 | def Deflate(*args, **kwargs): | |
0df68c9f | 1218 | """ |
a95a7133 | 1219 | Deflate(self, int dx, int dy) -> Rect |
e811c8ce | 1220 | |
8e738329 RD |
1221 | Decrease the rectangle size. This method is the opposite of `Inflate` |
1222 | in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to | |
1223 | `Inflate` for a full description. | |
0df68c9f | 1224 | """ |
54f9ee45 | 1225 | return _core_.Rect_Deflate(*args, **kwargs) |
e811c8ce RD |
1226 | |
1227 | def OffsetXY(*args, **kwargs): | |
0df68c9f | 1228 | """ |
a95a7133 | 1229 | OffsetXY(self, int dx, int dy) |
e811c8ce | 1230 | |
41e2b43e RD |
1231 | Moves the rectangle by the specified offset. If dx is positive, the |
1232 | rectangle is moved to the right, if dy is positive, it is moved to the | |
1233 | bottom, otherwise it is moved to the left or top respectively. | |
0df68c9f | 1234 | """ |
54f9ee45 | 1235 | return _core_.Rect_OffsetXY(*args, **kwargs) |
e811c8ce RD |
1236 | |
1237 | def Offset(*args, **kwargs): | |
0df68c9f | 1238 | """ |
a95a7133 | 1239 | Offset(self, Point pt) |
e811c8ce | 1240 | |
0df68c9f RD |
1241 | Same as OffsetXY but uses dx,dy from Point |
1242 | """ | |
54f9ee45 | 1243 | return _core_.Rect_Offset(*args, **kwargs) |
e811c8ce RD |
1244 | |
1245 | def Intersect(*args, **kwargs): | |
0df68c9f | 1246 | """ |
a95a7133 | 1247 | Intersect(self, Rect rect) -> Rect |
e811c8ce | 1248 | |
5cbf236d | 1249 | Returns the intersectsion of this rectangle and rect. |
0df68c9f | 1250 | """ |
54f9ee45 | 1251 | return _core_.Rect_Intersect(*args, **kwargs) |
e811c8ce | 1252 | |
5cbf236d RD |
1253 | def Union(*args, **kwargs): |
1254 | """ | |
1255 | Union(self, Rect rect) -> Rect | |
1256 | ||
1257 | Returns the union of this rectangle and rect. | |
1258 | """ | |
1259 | return _core_.Rect_Union(*args, **kwargs) | |
1260 | ||
e811c8ce | 1261 | def __add__(*args, **kwargs): |
0df68c9f | 1262 | """ |
a95a7133 | 1263 | __add__(self, Rect rect) -> Rect |
e811c8ce | 1264 | |
0df68c9f RD |
1265 | Add the properties of rect to this rectangle and return the result. |
1266 | """ | |
54f9ee45 | 1267 | return _core_.Rect___add__(*args, **kwargs) |
e811c8ce RD |
1268 | |
1269 | def __iadd__(*args, **kwargs): | |
0df68c9f | 1270 | """ |
a95a7133 | 1271 | __iadd__(self, Rect rect) -> Rect |
e811c8ce | 1272 | |
0df68c9f RD |
1273 | Add the properties of rect to this rectangle, updating this rectangle. |
1274 | """ | |
54f9ee45 | 1275 | return _core_.Rect___iadd__(*args, **kwargs) |
e811c8ce RD |
1276 | |
1277 | def __eq__(*args, **kwargs): | |
0df68c9f | 1278 | """ |
a95a7133 | 1279 | __eq__(self, Rect rect) -> bool |
e811c8ce | 1280 | |
0df68c9f RD |
1281 | Test for equality. |
1282 | """ | |
54f9ee45 | 1283 | return _core_.Rect___eq__(*args, **kwargs) |
e811c8ce RD |
1284 | |
1285 | def __ne__(*args, **kwargs): | |
0df68c9f | 1286 | """ |
a95a7133 | 1287 | __ne__(self, Rect rect) -> bool |
e811c8ce | 1288 | |
0df68c9f RD |
1289 | Test for inequality. |
1290 | """ | |
54f9ee45 | 1291 | return _core_.Rect___ne__(*args, **kwargs) |
e811c8ce RD |
1292 | |
1293 | def InsideXY(*args, **kwargs): | |
0df68c9f | 1294 | """ |
a95a7133 | 1295 | InsideXY(self, int x, int y) -> bool |
e811c8ce | 1296 | |
0df68c9f RD |
1297 | Return True if the point is (not strcitly) inside the rect. |
1298 | """ | |
54f9ee45 | 1299 | return _core_.Rect_InsideXY(*args, **kwargs) |
e811c8ce RD |
1300 | |
1301 | def Inside(*args, **kwargs): | |
0df68c9f | 1302 | """ |
a95a7133 | 1303 | Inside(self, Point pt) -> bool |
e811c8ce | 1304 | |
0df68c9f RD |
1305 | Return True if the point is (not strcitly) inside the rect. |
1306 | """ | |
54f9ee45 | 1307 | return _core_.Rect_Inside(*args, **kwargs) |
e811c8ce RD |
1308 | |
1309 | def Intersects(*args, **kwargs): | |
0df68c9f | 1310 | """ |
a95a7133 | 1311 | Intersects(self, Rect rect) -> bool |
e811c8ce | 1312 | |
0df68c9f RD |
1313 | Returns True if the rectangles have a non empty intersection. |
1314 | """ | |
54f9ee45 | 1315 | return _core_.Rect_Intersects(*args, **kwargs) |
e811c8ce | 1316 | |
54f9ee45 RD |
1317 | x = property(_core_.Rect_x_get, _core_.Rect_x_set) |
1318 | y = property(_core_.Rect_y_get, _core_.Rect_y_set) | |
1319 | width = property(_core_.Rect_width_get, _core_.Rect_width_set) | |
1320 | height = property(_core_.Rect_height_get, _core_.Rect_height_set) | |
e811c8ce | 1321 | def Set(*args, **kwargs): |
0df68c9f | 1322 | """ |
a95a7133 | 1323 | Set(self, int x=0, int y=0, int width=0, int height=0) |
e811c8ce | 1324 | |
0df68c9f RD |
1325 | Set all rectangle properties. |
1326 | """ | |
54f9ee45 | 1327 | return _core_.Rect_Set(*args, **kwargs) |
e811c8ce RD |
1328 | |
1329 | def Get(*args, **kwargs): | |
0df68c9f RD |
1330 | """ |
1331 | Get() -> (x,y,width,height) | |
e811c8ce | 1332 | |
0df68c9f RD |
1333 | Return the rectangle properties as a tuple. |
1334 | """ | |
54f9ee45 | 1335 | return _core_.Rect_Get(*args, **kwargs) |
e811c8ce | 1336 | |
41e2b43e | 1337 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1338 | def __str__(self): return str(self.Get()) |
1339 | def __repr__(self): return 'wx.Rect'+str(self.Get()) | |
1340 | def __len__(self): return len(self.Get()) | |
1341 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1342 | def __setitem__(self, index, val): |
1343 | if index == 0: self.x = val | |
1344 | elif index == 1: self.y = val | |
1345 | elif index == 2: self.width = val | |
1346 | elif index == 3: self.height = val | |
1347 | else: raise IndexError | |
e811c8ce | 1348 | def __nonzero__(self): return self.Get() != (0,0,0,0) |
74e96f3d RD |
1349 | __safe_for_unpickling__ = True |
1350 | def __reduce__(self): return (wx.Rect, self.Get()) | |
d14a1e28 RD |
1351 | |
1352 | ||
1353 | class RectPtr(Rect): | |
1354 | def __init__(self, this): | |
1355 | self.this = this | |
1356 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1357 | self.__class__ = Rect | |
54f9ee45 | 1358 | _core_.Rect_swigregister(RectPtr) |
d14a1e28 RD |
1359 | |
1360 | def RectPP(*args, **kwargs): | |
0df68c9f RD |
1361 | """ |
1362 | RectPP(Point topLeft, Point bottomRight) -> Rect | |
e811c8ce | 1363 | |
0df68c9f RD |
1364 | Create a new Rect object from Points representing two corners. |
1365 | """ | |
54f9ee45 | 1366 | val = _core_.new_RectPP(*args, **kwargs) |
d14a1e28 RD |
1367 | val.thisown = 1 |
1368 | return val | |
1369 | ||
1370 | def RectPS(*args, **kwargs): | |
0df68c9f RD |
1371 | """ |
1372 | RectPS(Point pos, Size size) -> Rect | |
e811c8ce | 1373 | |
0df68c9f RD |
1374 | Create a new Rect from a position and size. |
1375 | """ | |
54f9ee45 | 1376 | val = _core_.new_RectPS(*args, **kwargs) |
d14a1e28 RD |
1377 | val.thisown = 1 |
1378 | return val | |
1379 | ||
d3b6e4ff RD |
1380 | def RectS(*args, **kwargs): |
1381 | """ | |
1382 | RectS(Size size) -> Rect | |
1383 | ||
1384 | Create a new Rect from a size only. | |
1385 | """ | |
1386 | val = _core_.new_RectS(*args, **kwargs) | |
1387 | val.thisown = 1 | |
1388 | return val | |
1389 | ||
d14a1e28 | 1390 | |
e811c8ce | 1391 | def IntersectRect(*args, **kwargs): |
0df68c9f RD |
1392 | """ |
1393 | IntersectRect(Rect r1, Rect r2) -> Rect | |
e811c8ce | 1394 | |
0df68c9f RD |
1395 | Calculate and return the intersection of r1 and r2. |
1396 | """ | |
54f9ee45 | 1397 | return _core_.IntersectRect(*args, **kwargs) |
d14a1e28 RD |
1398 | #--------------------------------------------------------------------------- |
1399 | ||
1400 | class Point2D(object): | |
41e2b43e RD |
1401 | """ |
1402 | wx.Point2Ds represent a point or a vector in a 2d coordinate system | |
1403 | with floating point values. | |
1404 | """ | |
e811c8ce RD |
1405 | def __repr__(self): |
1406 | return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1407 | def __init__(self, *args, **kwargs): |
0df68c9f | 1408 | """ |
a95a7133 | 1409 | __init__(self, double x=0.0, double y=0.0) -> Point2D |
e811c8ce | 1410 | |
0df68c9f RD |
1411 | Create a w.Point2D object. |
1412 | """ | |
54f9ee45 | 1413 | newobj = _core_.new_Point2D(*args, **kwargs) |
d14a1e28 RD |
1414 | self.this = newobj.this |
1415 | self.thisown = 1 | |
1416 | del newobj.thisown | |
e811c8ce | 1417 | def GetFloor(*args, **kwargs): |
fd2dc343 RD |
1418 | """ |
1419 | GetFloor() -> (x,y) | |
1420 | ||
1421 | Convert to integer | |
1422 | """ | |
54f9ee45 | 1423 | return _core_.Point2D_GetFloor(*args, **kwargs) |
e811c8ce RD |
1424 | |
1425 | def GetRounded(*args, **kwargs): | |
fd2dc343 RD |
1426 | """ |
1427 | GetRounded() -> (x,y) | |
1428 | ||
1429 | Convert to integer | |
1430 | """ | |
54f9ee45 | 1431 | return _core_.Point2D_GetRounded(*args, **kwargs) |
e811c8ce RD |
1432 | |
1433 | def GetVectorLength(*args, **kwargs): | |
a95a7133 | 1434 | """GetVectorLength(self) -> double""" |
54f9ee45 | 1435 | return _core_.Point2D_GetVectorLength(*args, **kwargs) |
e811c8ce RD |
1436 | |
1437 | def GetVectorAngle(*args, **kwargs): | |
a95a7133 | 1438 | """GetVectorAngle(self) -> double""" |
54f9ee45 | 1439 | return _core_.Point2D_GetVectorAngle(*args, **kwargs) |
e811c8ce RD |
1440 | |
1441 | def SetVectorLength(*args, **kwargs): | |
a95a7133 | 1442 | """SetVectorLength(self, double length)""" |
54f9ee45 | 1443 | return _core_.Point2D_SetVectorLength(*args, **kwargs) |
e811c8ce RD |
1444 | |
1445 | def SetVectorAngle(*args, **kwargs): | |
a95a7133 | 1446 | """SetVectorAngle(self, double degrees)""" |
54f9ee45 | 1447 | return _core_.Point2D_SetVectorAngle(*args, **kwargs) |
e811c8ce | 1448 | |
d14a1e28 RD |
1449 | def SetPolarCoordinates(self, angle, length): |
1450 | self.SetVectorLength(length) | |
1451 | self.SetVectorAngle(angle) | |
1452 | def Normalize(self): | |
1453 | self.SetVectorLength(1.0) | |
1454 | ||
e811c8ce | 1455 | def GetDistance(*args, **kwargs): |
a95a7133 | 1456 | """GetDistance(self, Point2D pt) -> double""" |
54f9ee45 | 1457 | return _core_.Point2D_GetDistance(*args, **kwargs) |
e811c8ce RD |
1458 | |
1459 | def GetDistanceSquare(*args, **kwargs): | |
a95a7133 | 1460 | """GetDistanceSquare(self, Point2D pt) -> double""" |
54f9ee45 | 1461 | return _core_.Point2D_GetDistanceSquare(*args, **kwargs) |
e811c8ce RD |
1462 | |
1463 | def GetDotProduct(*args, **kwargs): | |
a95a7133 | 1464 | """GetDotProduct(self, Point2D vec) -> double""" |
54f9ee45 | 1465 | return _core_.Point2D_GetDotProduct(*args, **kwargs) |
e811c8ce RD |
1466 | |
1467 | def GetCrossProduct(*args, **kwargs): | |
a95a7133 | 1468 | """GetCrossProduct(self, Point2D vec) -> double""" |
54f9ee45 | 1469 | return _core_.Point2D_GetCrossProduct(*args, **kwargs) |
e811c8ce RD |
1470 | |
1471 | def __neg__(*args, **kwargs): | |
0df68c9f | 1472 | """ |
a95a7133 | 1473 | __neg__(self) -> Point2D |
e811c8ce | 1474 | |
0df68c9f RD |
1475 | the reflection of this point |
1476 | """ | |
54f9ee45 | 1477 | return _core_.Point2D___neg__(*args, **kwargs) |
e811c8ce RD |
1478 | |
1479 | def __iadd__(*args, **kwargs): | |
a95a7133 | 1480 | """__iadd__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1481 | return _core_.Point2D___iadd__(*args, **kwargs) |
e811c8ce RD |
1482 | |
1483 | def __isub__(*args, **kwargs): | |
a95a7133 | 1484 | """__isub__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1485 | return _core_.Point2D___isub__(*args, **kwargs) |
e811c8ce RD |
1486 | |
1487 | def __imul__(*args, **kwargs): | |
a95a7133 | 1488 | """__imul__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1489 | return _core_.Point2D___imul__(*args, **kwargs) |
e811c8ce RD |
1490 | |
1491 | def __idiv__(*args, **kwargs): | |
a95a7133 | 1492 | """__idiv__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1493 | return _core_.Point2D___idiv__(*args, **kwargs) |
e811c8ce RD |
1494 | |
1495 | def __eq__(*args, **kwargs): | |
0df68c9f | 1496 | """ |
a95a7133 | 1497 | __eq__(self, Point2D pt) -> bool |
e811c8ce | 1498 | |
0df68c9f RD |
1499 | Test for equality |
1500 | """ | |
54f9ee45 | 1501 | return _core_.Point2D___eq__(*args, **kwargs) |
e811c8ce RD |
1502 | |
1503 | def __ne__(*args, **kwargs): | |
0df68c9f | 1504 | """ |
a95a7133 | 1505 | __ne__(self, Point2D pt) -> bool |
e811c8ce | 1506 | |
0df68c9f RD |
1507 | Test for inequality |
1508 | """ | |
54f9ee45 | 1509 | return _core_.Point2D___ne__(*args, **kwargs) |
e811c8ce | 1510 | |
54f9ee45 RD |
1511 | x = property(_core_.Point2D_x_get, _core_.Point2D_x_set) |
1512 | y = property(_core_.Point2D_y_get, _core_.Point2D_y_set) | |
e811c8ce | 1513 | def Set(*args, **kwargs): |
a95a7133 | 1514 | """Set(self, double x=0, double y=0)""" |
54f9ee45 | 1515 | return _core_.Point2D_Set(*args, **kwargs) |
e811c8ce RD |
1516 | |
1517 | def Get(*args, **kwargs): | |
0df68c9f RD |
1518 | """ |
1519 | Get() -> (x,y) | |
e811c8ce | 1520 | |
0df68c9f RD |
1521 | Return x and y properties as a tuple. |
1522 | """ | |
54f9ee45 | 1523 | return _core_.Point2D_Get(*args, **kwargs) |
e811c8ce | 1524 | |
41e2b43e | 1525 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1526 | def __str__(self): return str(self.Get()) |
1527 | def __repr__(self): return 'wx.Point2D'+str(self.Get()) | |
1528 | def __len__(self): return len(self.Get()) | |
1529 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 1530 | def __setitem__(self, index, val): |
e811c8ce RD |
1531 | if index == 0: self.x = val |
1532 | elif index == 1: self.y = val | |
d14a1e28 | 1533 | else: raise IndexError |
e811c8ce | 1534 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
1535 | __safe_for_unpickling__ = True |
1536 | def __reduce__(self): return (wx.Point2D, self.Get()) | |
d14a1e28 RD |
1537 | |
1538 | ||
1539 | class Point2DPtr(Point2D): | |
1540 | def __init__(self, this): | |
1541 | self.this = this | |
1542 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1543 | self.__class__ = Point2D | |
54f9ee45 | 1544 | _core_.Point2D_swigregister(Point2DPtr) |
d14a1e28 RD |
1545 | |
1546 | def Point2DCopy(*args, **kwargs): | |
0df68c9f RD |
1547 | """ |
1548 | Point2DCopy(Point2D pt) -> Point2D | |
e811c8ce | 1549 | |
0df68c9f RD |
1550 | Create a w.Point2D object. |
1551 | """ | |
54f9ee45 | 1552 | val = _core_.new_Point2DCopy(*args, **kwargs) |
d14a1e28 RD |
1553 | val.thisown = 1 |
1554 | return val | |
1555 | ||
1556 | def Point2DFromPoint(*args, **kwargs): | |
0df68c9f RD |
1557 | """ |
1558 | Point2DFromPoint(Point pt) -> Point2D | |
e811c8ce | 1559 | |
0df68c9f RD |
1560 | Create a w.Point2D object. |
1561 | """ | |
54f9ee45 | 1562 | val = _core_.new_Point2DFromPoint(*args, **kwargs) |
d14a1e28 RD |
1563 | val.thisown = 1 |
1564 | return val | |
1565 | ||
1566 | #--------------------------------------------------------------------------- | |
1567 | ||
54f9ee45 RD |
1568 | FromStart = _core_.FromStart |
1569 | FromCurrent = _core_.FromCurrent | |
1570 | FromEnd = _core_.FromEnd | |
d14a1e28 | 1571 | class InputStream(object): |
093d3ff1 | 1572 | """Proxy of C++ InputStream class""" |
e811c8ce RD |
1573 | def __repr__(self): |
1574 | return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1575 | def __init__(self, *args, **kwargs): |
a95a7133 | 1576 | """__init__(self, PyObject p) -> InputStream""" |
54f9ee45 | 1577 | newobj = _core_.new_InputStream(*args, **kwargs) |
d14a1e28 RD |
1578 | self.this = newobj.this |
1579 | self.thisown = 1 | |
1580 | del newobj.thisown | |
8fb0e70a RD |
1581 | def __del__(self, destroy=_core_.delete_InputStream): |
1582 | """__del__(self)""" | |
1583 | try: | |
1584 | if self.thisown: destroy(self) | |
1585 | except: pass | |
1586 | ||
e811c8ce | 1587 | def close(*args, **kwargs): |
a95a7133 | 1588 | """close(self)""" |
54f9ee45 | 1589 | return _core_.InputStream_close(*args, **kwargs) |
e811c8ce RD |
1590 | |
1591 | def flush(*args, **kwargs): | |
a95a7133 | 1592 | """flush(self)""" |
54f9ee45 | 1593 | return _core_.InputStream_flush(*args, **kwargs) |
e811c8ce RD |
1594 | |
1595 | def eof(*args, **kwargs): | |
a95a7133 | 1596 | """eof(self) -> bool""" |
54f9ee45 | 1597 | return _core_.InputStream_eof(*args, **kwargs) |
e811c8ce RD |
1598 | |
1599 | def read(*args, **kwargs): | |
a95a7133 | 1600 | """read(self, int size=-1) -> PyObject""" |
54f9ee45 | 1601 | return _core_.InputStream_read(*args, **kwargs) |
e811c8ce RD |
1602 | |
1603 | def readline(*args, **kwargs): | |
a95a7133 | 1604 | """readline(self, int size=-1) -> PyObject""" |
54f9ee45 | 1605 | return _core_.InputStream_readline(*args, **kwargs) |
e811c8ce RD |
1606 | |
1607 | def readlines(*args, **kwargs): | |
a95a7133 | 1608 | """readlines(self, int sizehint=-1) -> PyObject""" |
54f9ee45 | 1609 | return _core_.InputStream_readlines(*args, **kwargs) |
e811c8ce RD |
1610 | |
1611 | def seek(*args, **kwargs): | |
a95a7133 | 1612 | """seek(self, int offset, int whence=0)""" |
54f9ee45 | 1613 | return _core_.InputStream_seek(*args, **kwargs) |
e811c8ce RD |
1614 | |
1615 | def tell(*args, **kwargs): | |
a95a7133 | 1616 | """tell(self) -> int""" |
54f9ee45 | 1617 | return _core_.InputStream_tell(*args, **kwargs) |
e811c8ce RD |
1618 | |
1619 | def Peek(*args, **kwargs): | |
a95a7133 | 1620 | """Peek(self) -> char""" |
54f9ee45 | 1621 | return _core_.InputStream_Peek(*args, **kwargs) |
e811c8ce RD |
1622 | |
1623 | def GetC(*args, **kwargs): | |
a95a7133 | 1624 | """GetC(self) -> char""" |
54f9ee45 | 1625 | return _core_.InputStream_GetC(*args, **kwargs) |
e811c8ce RD |
1626 | |
1627 | def LastRead(*args, **kwargs): | |
a95a7133 | 1628 | """LastRead(self) -> size_t""" |
54f9ee45 | 1629 | return _core_.InputStream_LastRead(*args, **kwargs) |
e811c8ce RD |
1630 | |
1631 | def CanRead(*args, **kwargs): | |
a95a7133 | 1632 | """CanRead(self) -> bool""" |
54f9ee45 | 1633 | return _core_.InputStream_CanRead(*args, **kwargs) |
e811c8ce RD |
1634 | |
1635 | def Eof(*args, **kwargs): | |
a95a7133 | 1636 | """Eof(self) -> bool""" |
54f9ee45 | 1637 | return _core_.InputStream_Eof(*args, **kwargs) |
e811c8ce RD |
1638 | |
1639 | def Ungetch(*args, **kwargs): | |
a95a7133 | 1640 | """Ungetch(self, char c) -> bool""" |
54f9ee45 | 1641 | return _core_.InputStream_Ungetch(*args, **kwargs) |
e811c8ce RD |
1642 | |
1643 | def SeekI(*args, **kwargs): | |
a95a7133 | 1644 | """SeekI(self, long pos, int mode=FromStart) -> long""" |
54f9ee45 | 1645 | return _core_.InputStream_SeekI(*args, **kwargs) |
e811c8ce RD |
1646 | |
1647 | def TellI(*args, **kwargs): | |
a95a7133 | 1648 | """TellI(self) -> long""" |
54f9ee45 | 1649 | return _core_.InputStream_TellI(*args, **kwargs) |
e811c8ce | 1650 | |
d14a1e28 RD |
1651 | |
1652 | class InputStreamPtr(InputStream): | |
1653 | def __init__(self, this): | |
1654 | self.this = this | |
1655 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1656 | self.__class__ = InputStream | |
54f9ee45 | 1657 | _core_.InputStream_swigregister(InputStreamPtr) |
d14a1e28 RD |
1658 | DefaultPosition = cvar.DefaultPosition |
1659 | DefaultSize = cvar.DefaultSize | |
1660 | ||
1661 | class OutputStream(object): | |
093d3ff1 | 1662 | """Proxy of C++ OutputStream class""" |
d14a1e28 RD |
1663 | def __init__(self): raise RuntimeError, "No constructor defined" |
1664 | def __repr__(self): | |
1665 | return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 1666 | def write(*args, **kwargs): |
a95a7133 | 1667 | """write(self, PyObject obj)""" |
54f9ee45 | 1668 | return _core_.OutputStream_write(*args, **kwargs) |
e811c8ce | 1669 | |
d14a1e28 RD |
1670 | |
1671 | class OutputStreamPtr(OutputStream): | |
1672 | def __init__(self, this): | |
1673 | self.this = this | |
1674 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1675 | self.__class__ = OutputStream | |
54f9ee45 | 1676 | _core_.OutputStream_swigregister(OutputStreamPtr) |
d14a1e28 RD |
1677 | |
1678 | #--------------------------------------------------------------------------- | |
1679 | ||
1680 | class FSFile(Object): | |
093d3ff1 | 1681 | """Proxy of C++ FSFile class""" |
e811c8ce RD |
1682 | def __repr__(self): |
1683 | return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1684 | def __init__(self, *args, **kwargs): |
0df68c9f | 1685 | """ |
a95a7133 | 1686 | __init__(self, InputStream stream, String loc, String mimetype, String anchor, |
196addbf | 1687 | DateTime modif) -> FSFile |
0df68c9f | 1688 | """ |
54f9ee45 | 1689 | newobj = _core_.new_FSFile(*args, **kwargs) |
d14a1e28 RD |
1690 | self.this = newobj.this |
1691 | self.thisown = 1 | |
1692 | del newobj.thisown | |
e2950dbb | 1693 | self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem |
4cf4100f | 1694 | |
54f9ee45 | 1695 | def __del__(self, destroy=_core_.delete_FSFile): |
a95a7133 | 1696 | """__del__(self)""" |
d14a1e28 RD |
1697 | try: |
1698 | if self.thisown: destroy(self) | |
1699 | except: pass | |
e811c8ce RD |
1700 | |
1701 | def GetStream(*args, **kwargs): | |
a95a7133 | 1702 | """GetStream(self) -> InputStream""" |
54f9ee45 | 1703 | return _core_.FSFile_GetStream(*args, **kwargs) |
e811c8ce RD |
1704 | |
1705 | def GetMimeType(*args, **kwargs): | |
a95a7133 | 1706 | """GetMimeType(self) -> String""" |
54f9ee45 | 1707 | return _core_.FSFile_GetMimeType(*args, **kwargs) |
e811c8ce RD |
1708 | |
1709 | def GetLocation(*args, **kwargs): | |
a95a7133 | 1710 | """GetLocation(self) -> String""" |
54f9ee45 | 1711 | return _core_.FSFile_GetLocation(*args, **kwargs) |
e811c8ce RD |
1712 | |
1713 | def GetAnchor(*args, **kwargs): | |
a95a7133 | 1714 | """GetAnchor(self) -> String""" |
54f9ee45 | 1715 | return _core_.FSFile_GetAnchor(*args, **kwargs) |
e811c8ce RD |
1716 | |
1717 | def GetModificationTime(*args, **kwargs): | |
a95a7133 | 1718 | """GetModificationTime(self) -> DateTime""" |
54f9ee45 | 1719 | return _core_.FSFile_GetModificationTime(*args, **kwargs) |
e811c8ce | 1720 | |
d14a1e28 RD |
1721 | |
1722 | class FSFilePtr(FSFile): | |
1723 | def __init__(self, this): | |
1724 | self.this = this | |
1725 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1726 | self.__class__ = FSFile | |
54f9ee45 | 1727 | _core_.FSFile_swigregister(FSFilePtr) |
d14a1e28 RD |
1728 | |
1729 | class CPPFileSystemHandler(object): | |
093d3ff1 | 1730 | """Proxy of C++ CPPFileSystemHandler class""" |
d14a1e28 RD |
1731 | def __init__(self): raise RuntimeError, "No constructor defined" |
1732 | def __repr__(self): | |
1733 | return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1734 | ||
1735 | class CPPFileSystemHandlerPtr(CPPFileSystemHandler): | |
1736 | def __init__(self, this): | |
1737 | self.this = this | |
1738 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1739 | self.__class__ = CPPFileSystemHandler | |
54f9ee45 | 1740 | _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr) |
d14a1e28 RD |
1741 | |
1742 | class FileSystemHandler(CPPFileSystemHandler): | |
093d3ff1 | 1743 | """Proxy of C++ FileSystemHandler class""" |
e811c8ce RD |
1744 | def __repr__(self): |
1745 | return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1746 | def __init__(self, *args, **kwargs): |
a95a7133 | 1747 | """__init__(self) -> FileSystemHandler""" |
54f9ee45 | 1748 | newobj = _core_.new_FileSystemHandler(*args, **kwargs) |
d14a1e28 RD |
1749 | self.this = newobj.this |
1750 | self.thisown = 1 | |
1751 | del newobj.thisown | |
1752 | self._setCallbackInfo(self, FileSystemHandler) | |
e811c8ce RD |
1753 | |
1754 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 1755 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 1756 | return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
1757 | |
1758 | def CanOpen(*args, **kwargs): | |
a95a7133 | 1759 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1760 | return _core_.FileSystemHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1761 | |
1762 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1763 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1764 | return _core_.FileSystemHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1765 | |
1766 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1767 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1768 | return _core_.FileSystemHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1769 | |
1770 | def FindNext(*args, **kwargs): | |
a95a7133 | 1771 | """FindNext(self) -> String""" |
54f9ee45 | 1772 | return _core_.FileSystemHandler_FindNext(*args, **kwargs) |
e811c8ce RD |
1773 | |
1774 | def GetProtocol(*args, **kwargs): | |
a95a7133 | 1775 | """GetProtocol(self, String location) -> String""" |
54f9ee45 | 1776 | return _core_.FileSystemHandler_GetProtocol(*args, **kwargs) |
e811c8ce RD |
1777 | |
1778 | def GetLeftLocation(*args, **kwargs): | |
a95a7133 | 1779 | """GetLeftLocation(self, String location) -> String""" |
54f9ee45 | 1780 | return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs) |
e811c8ce RD |
1781 | |
1782 | def GetAnchor(*args, **kwargs): | |
a95a7133 | 1783 | """GetAnchor(self, String location) -> String""" |
54f9ee45 | 1784 | return _core_.FileSystemHandler_GetAnchor(*args, **kwargs) |
e811c8ce RD |
1785 | |
1786 | def GetRightLocation(*args, **kwargs): | |
a95a7133 | 1787 | """GetRightLocation(self, String location) -> String""" |
54f9ee45 | 1788 | return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs) |
e811c8ce RD |
1789 | |
1790 | def GetMimeTypeFromExt(*args, **kwargs): | |
a95a7133 | 1791 | """GetMimeTypeFromExt(self, String location) -> String""" |
54f9ee45 | 1792 | return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs) |
e811c8ce | 1793 | |
d14a1e28 RD |
1794 | |
1795 | class FileSystemHandlerPtr(FileSystemHandler): | |
1796 | def __init__(self, this): | |
1797 | self.this = this | |
1798 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1799 | self.__class__ = FileSystemHandler | |
54f9ee45 | 1800 | _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr) |
d14a1e28 RD |
1801 | |
1802 | class FileSystem(Object): | |
093d3ff1 | 1803 | """Proxy of C++ FileSystem class""" |
e811c8ce RD |
1804 | def __repr__(self): |
1805 | return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1806 | def __init__(self, *args, **kwargs): |
a95a7133 | 1807 | """__init__(self) -> FileSystem""" |
54f9ee45 | 1808 | newobj = _core_.new_FileSystem(*args, **kwargs) |
d14a1e28 RD |
1809 | self.this = newobj.this |
1810 | self.thisown = 1 | |
1811 | del newobj.thisown | |
54f9ee45 | 1812 | def __del__(self, destroy=_core_.delete_FileSystem): |
a95a7133 | 1813 | """__del__(self)""" |
d14a1e28 RD |
1814 | try: |
1815 | if self.thisown: destroy(self) | |
1816 | except: pass | |
e811c8ce RD |
1817 | |
1818 | def ChangePathTo(*args, **kwargs): | |
a95a7133 | 1819 | """ChangePathTo(self, String location, bool is_dir=False)""" |
54f9ee45 | 1820 | return _core_.FileSystem_ChangePathTo(*args, **kwargs) |
e811c8ce RD |
1821 | |
1822 | def GetPath(*args, **kwargs): | |
a95a7133 | 1823 | """GetPath(self) -> String""" |
54f9ee45 | 1824 | return _core_.FileSystem_GetPath(*args, **kwargs) |
e811c8ce RD |
1825 | |
1826 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1827 | """OpenFile(self, String location) -> FSFile""" |
54f9ee45 | 1828 | return _core_.FileSystem_OpenFile(*args, **kwargs) |
e811c8ce RD |
1829 | |
1830 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1831 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1832 | return _core_.FileSystem_FindFirst(*args, **kwargs) |
e811c8ce RD |
1833 | |
1834 | def FindNext(*args, **kwargs): | |
a95a7133 | 1835 | """FindNext(self) -> String""" |
54f9ee45 | 1836 | return _core_.FileSystem_FindNext(*args, **kwargs) |
e811c8ce RD |
1837 | |
1838 | def AddHandler(*args, **kwargs): | |
66c033b4 | 1839 | """AddHandler(CPPFileSystemHandler handler)""" |
54f9ee45 | 1840 | return _core_.FileSystem_AddHandler(*args, **kwargs) |
e811c8ce RD |
1841 | |
1842 | AddHandler = staticmethod(AddHandler) | |
1843 | def CleanUpHandlers(*args, **kwargs): | |
66c033b4 | 1844 | """CleanUpHandlers()""" |
54f9ee45 | 1845 | return _core_.FileSystem_CleanUpHandlers(*args, **kwargs) |
e811c8ce RD |
1846 | |
1847 | CleanUpHandlers = staticmethod(CleanUpHandlers) | |
1848 | def FileNameToURL(*args, **kwargs): | |
66c033b4 | 1849 | """FileNameToURL(String filename) -> String""" |
54f9ee45 | 1850 | return _core_.FileSystem_FileNameToURL(*args, **kwargs) |
e811c8ce RD |
1851 | |
1852 | FileNameToURL = staticmethod(FileNameToURL) | |
2ef75293 RD |
1853 | def URLToFileName(*args, **kwargs): |
1854 | """URLToFileName(String url) -> String""" | |
1855 | return _core_.FileSystem_URLToFileName(*args, **kwargs) | |
1856 | ||
1857 | URLToFileName = staticmethod(URLToFileName) | |
d14a1e28 RD |
1858 | |
1859 | class FileSystemPtr(FileSystem): | |
1860 | def __init__(self, this): | |
1861 | self.this = this | |
1862 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1863 | self.__class__ = FileSystem | |
54f9ee45 | 1864 | _core_.FileSystem_swigregister(FileSystemPtr) |
d14a1e28 | 1865 | |
e811c8ce RD |
1866 | def FileSystem_AddHandler(*args, **kwargs): |
1867 | """FileSystem_AddHandler(CPPFileSystemHandler handler)""" | |
54f9ee45 | 1868 | return _core_.FileSystem_AddHandler(*args, **kwargs) |
d14a1e28 | 1869 | |
e811c8ce RD |
1870 | def FileSystem_CleanUpHandlers(*args, **kwargs): |
1871 | """FileSystem_CleanUpHandlers()""" | |
54f9ee45 | 1872 | return _core_.FileSystem_CleanUpHandlers(*args, **kwargs) |
d14a1e28 | 1873 | |
e811c8ce | 1874 | def FileSystem_FileNameToURL(*args, **kwargs): |
196addbf | 1875 | """FileSystem_FileNameToURL(String filename) -> String""" |
54f9ee45 | 1876 | return _core_.FileSystem_FileNameToURL(*args, **kwargs) |
d14a1e28 | 1877 | |
e811c8ce | 1878 | def FileSystem_URLToFileName(*args, **kwargs): |
196addbf | 1879 | """FileSystem_URLToFileName(String url) -> String""" |
54f9ee45 | 1880 | return _core_.FileSystem_URLToFileName(*args, **kwargs) |
2ef75293 | 1881 | |
d14a1e28 | 1882 | class InternetFSHandler(CPPFileSystemHandler): |
093d3ff1 | 1883 | """Proxy of C++ InternetFSHandler class""" |
e811c8ce RD |
1884 | def __repr__(self): |
1885 | return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1886 | def __init__(self, *args, **kwargs): |
a95a7133 | 1887 | """__init__(self) -> InternetFSHandler""" |
54f9ee45 | 1888 | newobj = _core_.new_InternetFSHandler(*args, **kwargs) |
d14a1e28 RD |
1889 | self.this = newobj.this |
1890 | self.thisown = 1 | |
1891 | del newobj.thisown | |
e811c8ce | 1892 | def CanOpen(*args, **kwargs): |
a95a7133 | 1893 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1894 | return _core_.InternetFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1895 | |
1896 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1897 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1898 | return _core_.InternetFSHandler_OpenFile(*args, **kwargs) |
e811c8ce | 1899 | |
d14a1e28 RD |
1900 | |
1901 | class InternetFSHandlerPtr(InternetFSHandler): | |
1902 | def __init__(self, this): | |
1903 | self.this = this | |
1904 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1905 | self.__class__ = InternetFSHandler | |
54f9ee45 | 1906 | _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr) |
d14a1e28 RD |
1907 | |
1908 | class ZipFSHandler(CPPFileSystemHandler): | |
093d3ff1 | 1909 | """Proxy of C++ ZipFSHandler class""" |
e811c8ce RD |
1910 | def __repr__(self): |
1911 | return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1912 | def __init__(self, *args, **kwargs): |
a95a7133 | 1913 | """__init__(self) -> ZipFSHandler""" |
54f9ee45 | 1914 | newobj = _core_.new_ZipFSHandler(*args, **kwargs) |
d14a1e28 RD |
1915 | self.this = newobj.this |
1916 | self.thisown = 1 | |
1917 | del newobj.thisown | |
e811c8ce | 1918 | def CanOpen(*args, **kwargs): |
a95a7133 | 1919 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1920 | return _core_.ZipFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1921 | |
1922 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1923 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1924 | return _core_.ZipFSHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1925 | |
1926 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1927 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1928 | return _core_.ZipFSHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1929 | |
1930 | def FindNext(*args, **kwargs): | |
a95a7133 | 1931 | """FindNext(self) -> String""" |
54f9ee45 | 1932 | return _core_.ZipFSHandler_FindNext(*args, **kwargs) |
e811c8ce | 1933 | |
d14a1e28 RD |
1934 | |
1935 | class ZipFSHandlerPtr(ZipFSHandler): | |
1936 | def __init__(self, this): | |
1937 | self.this = this | |
1938 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1939 | self.__class__ = ZipFSHandler | |
54f9ee45 | 1940 | _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr) |
d14a1e28 RD |
1941 | |
1942 | ||
e811c8ce | 1943 | def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs): |
196addbf | 1944 | """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)""" |
54f9ee45 | 1945 | return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs) |
d14a1e28 | 1946 | |
e811c8ce | 1947 | def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs): |
196addbf | 1948 | """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)""" |
54f9ee45 | 1949 | return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs) |
d14a1e28 | 1950 | |
e811c8ce | 1951 | def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs): |
196addbf | 1952 | """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)""" |
54f9ee45 | 1953 | return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs) |
2ef75293 RD |
1954 | def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1): |
1955 | """ | |
1956 | Add 'file' to the memory filesystem. The dataItem parameter can | |
1957 | either be a `wx.Bitmap`, `wx.Image` or a string that can contain | |
1958 | arbitrary data. If a bitmap or image is used then the imgType | |
1959 | parameter should specify what kind of image file it should be | |
1960 | written as, wx.BITMAP_TYPE_PNG, etc. | |
1961 | """ | |
1962 | if isinstance(dataItem, wx.Image): | |
1963 | __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType) | |
1964 | elif isinstance(dataItem, wx.Bitmap): | |
1965 | __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType) | |
1966 | elif type(dataItem) == str: | |
1967 | __wxMemoryFSHandler_AddFile_Data(filename, dataItem) | |
1968 | else: | |
1969 | raise TypeError, 'wx.Image, wx.Bitmap or string expected' | |
d14a1e28 RD |
1970 | |
1971 | class MemoryFSHandler(CPPFileSystemHandler): | |
093d3ff1 | 1972 | """Proxy of C++ MemoryFSHandler class""" |
e811c8ce RD |
1973 | def __repr__(self): |
1974 | return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1975 | def __init__(self, *args, **kwargs): |
a95a7133 | 1976 | """__init__(self) -> MemoryFSHandler""" |
54f9ee45 | 1977 | newobj = _core_.new_MemoryFSHandler(*args, **kwargs) |
d14a1e28 RD |
1978 | self.this = newobj.this |
1979 | self.thisown = 1 | |
1980 | del newobj.thisown | |
e811c8ce | 1981 | def RemoveFile(*args, **kwargs): |
66c033b4 | 1982 | """RemoveFile(String filename)""" |
54f9ee45 | 1983 | return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) |
e811c8ce RD |
1984 | |
1985 | RemoveFile = staticmethod(RemoveFile) | |
d14a1e28 | 1986 | AddFile = staticmethod(MemoryFSHandler_AddFile) |
e811c8ce | 1987 | def CanOpen(*args, **kwargs): |
a95a7133 | 1988 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1989 | return _core_.MemoryFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1990 | |
1991 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1992 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1993 | return _core_.MemoryFSHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1994 | |
1995 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1996 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1997 | return _core_.MemoryFSHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1998 | |
1999 | def FindNext(*args, **kwargs): | |
a95a7133 | 2000 | """FindNext(self) -> String""" |
54f9ee45 | 2001 | return _core_.MemoryFSHandler_FindNext(*args, **kwargs) |
e811c8ce | 2002 | |
d14a1e28 RD |
2003 | |
2004 | class MemoryFSHandlerPtr(MemoryFSHandler): | |
2005 | def __init__(self, this): | |
2006 | self.this = this | |
2007 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2008 | self.__class__ = MemoryFSHandler | |
54f9ee45 | 2009 | _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr) |
d14a1e28 | 2010 | |
e811c8ce | 2011 | def MemoryFSHandler_RemoveFile(*args, **kwargs): |
196addbf | 2012 | """MemoryFSHandler_RemoveFile(String filename)""" |
54f9ee45 | 2013 | return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) |
d14a1e28 RD |
2014 | |
2015 | #--------------------------------------------------------------------------- | |
2016 | ||
2017 | class ImageHandler(Object): | |
093d3ff1 | 2018 | """Proxy of C++ ImageHandler class""" |
d14a1e28 RD |
2019 | def __init__(self): raise RuntimeError, "No constructor defined" |
2020 | def __repr__(self): | |
2021 | return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 2022 | def GetName(*args, **kwargs): |
a95a7133 | 2023 | """GetName(self) -> String""" |
54f9ee45 | 2024 | return _core_.ImageHandler_GetName(*args, **kwargs) |
e811c8ce RD |
2025 | |
2026 | def GetExtension(*args, **kwargs): | |
a95a7133 | 2027 | """GetExtension(self) -> String""" |
54f9ee45 | 2028 | return _core_.ImageHandler_GetExtension(*args, **kwargs) |
e811c8ce RD |
2029 | |
2030 | def GetType(*args, **kwargs): | |
a95a7133 | 2031 | """GetType(self) -> long""" |
54f9ee45 | 2032 | return _core_.ImageHandler_GetType(*args, **kwargs) |
e811c8ce RD |
2033 | |
2034 | def GetMimeType(*args, **kwargs): | |
a95a7133 | 2035 | """GetMimeType(self) -> String""" |
54f9ee45 | 2036 | return _core_.ImageHandler_GetMimeType(*args, **kwargs) |
e811c8ce RD |
2037 | |
2038 | def CanRead(*args, **kwargs): | |
a95a7133 | 2039 | """CanRead(self, String name) -> bool""" |
54f9ee45 | 2040 | return _core_.ImageHandler_CanRead(*args, **kwargs) |
e811c8ce RD |
2041 | |
2042 | def SetName(*args, **kwargs): | |
a95a7133 | 2043 | """SetName(self, String name)""" |
54f9ee45 | 2044 | return _core_.ImageHandler_SetName(*args, **kwargs) |
e811c8ce RD |
2045 | |
2046 | def SetExtension(*args, **kwargs): | |
a95a7133 | 2047 | """SetExtension(self, String extension)""" |
54f9ee45 | 2048 | return _core_.ImageHandler_SetExtension(*args, **kwargs) |
e811c8ce RD |
2049 | |
2050 | def SetType(*args, **kwargs): | |
a95a7133 | 2051 | """SetType(self, long type)""" |
54f9ee45 | 2052 | return _core_.ImageHandler_SetType(*args, **kwargs) |
e811c8ce RD |
2053 | |
2054 | def SetMimeType(*args, **kwargs): | |
a95a7133 | 2055 | """SetMimeType(self, String mimetype)""" |
54f9ee45 | 2056 | return _core_.ImageHandler_SetMimeType(*args, **kwargs) |
e811c8ce | 2057 | |
d14a1e28 RD |
2058 | |
2059 | class ImageHandlerPtr(ImageHandler): | |
2060 | def __init__(self, this): | |
2061 | self.this = this | |
2062 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2063 | self.__class__ = ImageHandler | |
54f9ee45 | 2064 | _core_.ImageHandler_swigregister(ImageHandlerPtr) |
d14a1e28 RD |
2065 | |
2066 | class ImageHistogram(object): | |
093d3ff1 | 2067 | """Proxy of C++ ImageHistogram class""" |
e811c8ce RD |
2068 | def __repr__(self): |
2069 | return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2070 | def __init__(self, *args, **kwargs): |
a95a7133 | 2071 | """__init__(self) -> ImageHistogram""" |
54f9ee45 | 2072 | newobj = _core_.new_ImageHistogram(*args, **kwargs) |
d14a1e28 RD |
2073 | self.this = newobj.this |
2074 | self.thisown = 1 | |
2075 | del newobj.thisown | |
e811c8ce | 2076 | def MakeKey(*args, **kwargs): |
0df68c9f | 2077 | """ |
66c033b4 | 2078 | MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long |
e811c8ce | 2079 | |
0df68c9f RD |
2080 | Get the key in the histogram for the given RGB values |
2081 | """ | |
54f9ee45 | 2082 | return _core_.ImageHistogram_MakeKey(*args, **kwargs) |
e811c8ce RD |
2083 | |
2084 | MakeKey = staticmethod(MakeKey) | |
2085 | def FindFirstUnusedColour(*args, **kwargs): | |
fd2dc343 RD |
2086 | """ |
2087 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
2088 | ||
2089 | Find first colour that is not used in the image and has higher RGB | |
2090 | values than startR, startG, startB. Returns a tuple consisting of a | |
2091 | success flag and rgb values. | |
2092 | """ | |
54f9ee45 | 2093 | return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs) |
e811c8ce | 2094 | |
d14a1e28 RD |
2095 | |
2096 | class ImageHistogramPtr(ImageHistogram): | |
2097 | def __init__(self, this): | |
2098 | self.this = this | |
2099 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2100 | self.__class__ = ImageHistogram | |
54f9ee45 | 2101 | _core_.ImageHistogram_swigregister(ImageHistogramPtr) |
d14a1e28 | 2102 | |
e811c8ce | 2103 | def ImageHistogram_MakeKey(*args, **kwargs): |
0df68c9f RD |
2104 | """ |
2105 | ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long | |
e811c8ce | 2106 | |
0df68c9f RD |
2107 | Get the key in the histogram for the given RGB values |
2108 | """ | |
54f9ee45 | 2109 | return _core_.ImageHistogram_MakeKey(*args, **kwargs) |
d14a1e28 RD |
2110 | |
2111 | class Image(Object): | |
093d3ff1 | 2112 | """Proxy of C++ Image class""" |
e811c8ce RD |
2113 | def __repr__(self): |
2114 | return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2115 | def __init__(self, *args, **kwargs): |
a95a7133 | 2116 | """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
54f9ee45 | 2117 | newobj = _core_.new_Image(*args, **kwargs) |
d14a1e28 RD |
2118 | self.this = newobj.this |
2119 | self.thisown = 1 | |
2120 | del newobj.thisown | |
54f9ee45 | 2121 | def __del__(self, destroy=_core_.delete_Image): |
a95a7133 | 2122 | """__del__(self)""" |
d14a1e28 RD |
2123 | try: |
2124 | if self.thisown: destroy(self) | |
2125 | except: pass | |
e811c8ce RD |
2126 | |
2127 | def Create(*args, **kwargs): | |
a95a7133 | 2128 | """Create(self, int width, int height)""" |
54f9ee45 | 2129 | return _core_.Image_Create(*args, **kwargs) |
e811c8ce RD |
2130 | |
2131 | def Destroy(*args, **kwargs): | |
0df68c9f | 2132 | """ |
a95a7133 | 2133 | Destroy(self) |
e811c8ce | 2134 | |
0df68c9f RD |
2135 | Deletes the C++ object this Python object is a proxy for. |
2136 | """ | |
54f9ee45 | 2137 | return _core_.Image_Destroy(*args, **kwargs) |
e811c8ce RD |
2138 | |
2139 | def Scale(*args, **kwargs): | |
a95a7133 | 2140 | """Scale(self, int width, int height) -> Image""" |
54f9ee45 | 2141 | return _core_.Image_Scale(*args, **kwargs) |
e811c8ce RD |
2142 | |
2143 | def ShrinkBy(*args, **kwargs): | |
a95a7133 | 2144 | """ShrinkBy(self, int xFactor, int yFactor) -> Image""" |
54f9ee45 | 2145 | return _core_.Image_ShrinkBy(*args, **kwargs) |
e811c8ce RD |
2146 | |
2147 | def Rescale(*args, **kwargs): | |
a95a7133 | 2148 | """Rescale(self, int width, int height) -> Image""" |
54f9ee45 | 2149 | return _core_.Image_Rescale(*args, **kwargs) |
e811c8ce | 2150 | |
aff4cc5c RD |
2151 | def Resize(*args, **kwargs): |
2152 | """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image""" | |
2153 | return _core_.Image_Resize(*args, **kwargs) | |
2154 | ||
e811c8ce | 2155 | def SetRGB(*args, **kwargs): |
a95a7133 | 2156 | """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)""" |
54f9ee45 | 2157 | return _core_.Image_SetRGB(*args, **kwargs) |
e811c8ce | 2158 | |
aff4cc5c RD |
2159 | def SetRGBRect(*args, **kwargs): |
2160 | """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)""" | |
2161 | return _core_.Image_SetRGBRect(*args, **kwargs) | |
2162 | ||
e811c8ce | 2163 | def GetRed(*args, **kwargs): |
a95a7133 | 2164 | """GetRed(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2165 | return _core_.Image_GetRed(*args, **kwargs) |
e811c8ce RD |
2166 | |
2167 | def GetGreen(*args, **kwargs): | |
a95a7133 | 2168 | """GetGreen(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2169 | return _core_.Image_GetGreen(*args, **kwargs) |
e811c8ce RD |
2170 | |
2171 | def GetBlue(*args, **kwargs): | |
a95a7133 | 2172 | """GetBlue(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2173 | return _core_.Image_GetBlue(*args, **kwargs) |
e811c8ce RD |
2174 | |
2175 | def SetAlpha(*args, **kwargs): | |
a95a7133 | 2176 | """SetAlpha(self, int x, int y, unsigned char alpha)""" |
54f9ee45 | 2177 | return _core_.Image_SetAlpha(*args, **kwargs) |
e811c8ce RD |
2178 | |
2179 | def GetAlpha(*args, **kwargs): | |
a95a7133 | 2180 | """GetAlpha(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2181 | return _core_.Image_GetAlpha(*args, **kwargs) |
e811c8ce RD |
2182 | |
2183 | def HasAlpha(*args, **kwargs): | |
a95a7133 | 2184 | """HasAlpha(self) -> bool""" |
54f9ee45 | 2185 | return _core_.Image_HasAlpha(*args, **kwargs) |
e811c8ce | 2186 | |
68350608 RD |
2187 | def InitAlpha(*args, **kwargs): |
2188 | """ | |
2189 | InitAlpha(self) | |
2190 | ||
2191 | Initializes the image alpha channel data. It is an error to call it if | |
2192 | the image already has alpha data. If it doesn't, alpha data will be by | |
2193 | default initialized to all pixels being fully opaque. But if the image | |
2194 | has a a mask colour, all mask pixels will be completely transparent. | |
2195 | """ | |
2196 | return _core_.Image_InitAlpha(*args, **kwargs) | |
2197 | ||
e811c8ce | 2198 | def FindFirstUnusedColour(*args, **kwargs): |
fd2dc343 RD |
2199 | """ |
2200 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
2201 | ||
2202 | Find first colour that is not used in the image and has higher RGB | |
2203 | values than startR, startG, startB. Returns a tuple consisting of a | |
2204 | success flag and rgb values. | |
2205 | """ | |
54f9ee45 | 2206 | return _core_.Image_FindFirstUnusedColour(*args, **kwargs) |
e811c8ce | 2207 | |
4cf4100f RD |
2208 | def ConvertAlphaToMask(*args, **kwargs): |
2209 | """ | |
2210 | ConvertAlphaToMask(self, byte threshold=128) -> bool | |
2211 | ||
2212 | If the image has alpha channel, this method converts it to mask. All pixels | |
2213 | with alpha value less than ``threshold`` are replaced with mask colour and the | |
2214 | alpha channel is removed. Mask colour is chosen automatically using | |
2215 | `FindFirstUnusedColour`. | |
2216 | ||
2217 | If the image image doesn't have alpha channel, ConvertAlphaToMask does | |
2218 | nothing. | |
2219 | """ | |
2220 | return _core_.Image_ConvertAlphaToMask(*args, **kwargs) | |
2221 | ||
8fb0e70a RD |
2222 | def ConvertColourToAlpha(*args, **kwargs): |
2223 | """ | |
2224 | ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool | |
2225 | ||
2226 | This method converts an image where the original alpha information is | |
2227 | only available as a shades of a colour (actually shades of grey) | |
2228 | typically when you draw anti-aliased text into a bitmap. The DC | |
2229 | drawing routines draw grey values on the black background although | |
2230 | they actually mean to draw white with differnt alpha values. This | |
2231 | method reverses it, assuming a black (!) background and white text. | |
2232 | The method will then fill up the whole image with the colour given. | |
2233 | """ | |
2234 | return _core_.Image_ConvertColourToAlpha(*args, **kwargs) | |
2235 | ||
e811c8ce | 2236 | def SetMaskFromImage(*args, **kwargs): |
a95a7133 | 2237 | """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool""" |
54f9ee45 | 2238 | return _core_.Image_SetMaskFromImage(*args, **kwargs) |
e811c8ce RD |
2239 | |
2240 | def CanRead(*args, **kwargs): | |
66c033b4 | 2241 | """CanRead(String name) -> bool""" |
54f9ee45 | 2242 | return _core_.Image_CanRead(*args, **kwargs) |
e811c8ce RD |
2243 | |
2244 | CanRead = staticmethod(CanRead) | |
2245 | def GetImageCount(*args, **kwargs): | |
66c033b4 | 2246 | """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" |
54f9ee45 | 2247 | return _core_.Image_GetImageCount(*args, **kwargs) |
e811c8ce RD |
2248 | |
2249 | GetImageCount = staticmethod(GetImageCount) | |
2250 | def LoadFile(*args, **kwargs): | |
a95a7133 | 2251 | """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" |
54f9ee45 | 2252 | return _core_.Image_LoadFile(*args, **kwargs) |
e811c8ce RD |
2253 | |
2254 | def LoadMimeFile(*args, **kwargs): | |
a95a7133 | 2255 | """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool""" |
54f9ee45 | 2256 | return _core_.Image_LoadMimeFile(*args, **kwargs) |
e811c8ce RD |
2257 | |
2258 | def SaveFile(*args, **kwargs): | |
a95a7133 | 2259 | """SaveFile(self, String name, int type) -> bool""" |
54f9ee45 | 2260 | return _core_.Image_SaveFile(*args, **kwargs) |
e811c8ce RD |
2261 | |
2262 | def SaveMimeFile(*args, **kwargs): | |
a95a7133 | 2263 | """SaveMimeFile(self, String name, String mimetype) -> bool""" |
54f9ee45 | 2264 | return _core_.Image_SaveMimeFile(*args, **kwargs) |
e811c8ce RD |
2265 | |
2266 | def CanReadStream(*args, **kwargs): | |
66c033b4 | 2267 | """CanReadStream(InputStream stream) -> bool""" |
54f9ee45 | 2268 | return _core_.Image_CanReadStream(*args, **kwargs) |
e811c8ce RD |
2269 | |
2270 | CanReadStream = staticmethod(CanReadStream) | |
2271 | def LoadStream(*args, **kwargs): | |
a95a7133 | 2272 | """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" |
54f9ee45 | 2273 | return _core_.Image_LoadStream(*args, **kwargs) |
e811c8ce RD |
2274 | |
2275 | def LoadMimeStream(*args, **kwargs): | |
a95a7133 | 2276 | """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool""" |
54f9ee45 | 2277 | return _core_.Image_LoadMimeStream(*args, **kwargs) |
e811c8ce RD |
2278 | |
2279 | def Ok(*args, **kwargs): | |
a95a7133 | 2280 | """Ok(self) -> bool""" |
54f9ee45 | 2281 | return _core_.Image_Ok(*args, **kwargs) |
e811c8ce RD |
2282 | |
2283 | def GetWidth(*args, **kwargs): | |
a95a7133 | 2284 | """GetWidth(self) -> int""" |
54f9ee45 | 2285 | return _core_.Image_GetWidth(*args, **kwargs) |
e811c8ce RD |
2286 | |
2287 | def GetHeight(*args, **kwargs): | |
a95a7133 | 2288 | """GetHeight(self) -> int""" |
54f9ee45 | 2289 | return _core_.Image_GetHeight(*args, **kwargs) |
e811c8ce | 2290 | |
b2df227b | 2291 | def GetSize(*args, **kwargs): |
a95a7133 | 2292 | """GetSize(self) -> Size""" |
54f9ee45 | 2293 | return _core_.Image_GetSize(*args, **kwargs) |
b2df227b | 2294 | |
e811c8ce | 2295 | def GetSubImage(*args, **kwargs): |
a95a7133 | 2296 | """GetSubImage(self, Rect rect) -> Image""" |
54f9ee45 | 2297 | return _core_.Image_GetSubImage(*args, **kwargs) |
e811c8ce | 2298 | |
aff4cc5c RD |
2299 | def Size(*args, **kwargs): |
2300 | """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image""" | |
2301 | return _core_.Image_Size(*args, **kwargs) | |
2302 | ||
e811c8ce | 2303 | def Copy(*args, **kwargs): |
a95a7133 | 2304 | """Copy(self) -> Image""" |
54f9ee45 | 2305 | return _core_.Image_Copy(*args, **kwargs) |
e811c8ce RD |
2306 | |
2307 | def Paste(*args, **kwargs): | |
a95a7133 | 2308 | """Paste(self, Image image, int x, int y)""" |
54f9ee45 | 2309 | return _core_.Image_Paste(*args, **kwargs) |
e811c8ce RD |
2310 | |
2311 | def GetData(*args, **kwargs): | |
a95a7133 | 2312 | """GetData(self) -> PyObject""" |
54f9ee45 | 2313 | return _core_.Image_GetData(*args, **kwargs) |
e811c8ce RD |
2314 | |
2315 | def SetData(*args, **kwargs): | |
a95a7133 | 2316 | """SetData(self, PyObject data)""" |
54f9ee45 | 2317 | return _core_.Image_SetData(*args, **kwargs) |
e811c8ce RD |
2318 | |
2319 | def GetDataBuffer(*args, **kwargs): | |
a95a7133 | 2320 | """GetDataBuffer(self) -> PyObject""" |
54f9ee45 | 2321 | return _core_.Image_GetDataBuffer(*args, **kwargs) |
e811c8ce RD |
2322 | |
2323 | def SetDataBuffer(*args, **kwargs): | |
a95a7133 | 2324 | """SetDataBuffer(self, PyObject data)""" |
54f9ee45 | 2325 | return _core_.Image_SetDataBuffer(*args, **kwargs) |
e811c8ce RD |
2326 | |
2327 | def GetAlphaData(*args, **kwargs): | |
a95a7133 | 2328 | """GetAlphaData(self) -> PyObject""" |
54f9ee45 | 2329 | return _core_.Image_GetAlphaData(*args, **kwargs) |
e811c8ce RD |
2330 | |
2331 | def SetAlphaData(*args, **kwargs): | |
a95a7133 | 2332 | """SetAlphaData(self, PyObject data)""" |
54f9ee45 | 2333 | return _core_.Image_SetAlphaData(*args, **kwargs) |
e811c8ce RD |
2334 | |
2335 | def GetAlphaBuffer(*args, **kwargs): | |
a95a7133 | 2336 | """GetAlphaBuffer(self) -> PyObject""" |
54f9ee45 | 2337 | return _core_.Image_GetAlphaBuffer(*args, **kwargs) |
e811c8ce RD |
2338 | |
2339 | def SetAlphaBuffer(*args, **kwargs): | |
a95a7133 | 2340 | """SetAlphaBuffer(self, PyObject data)""" |
54f9ee45 | 2341 | return _core_.Image_SetAlphaBuffer(*args, **kwargs) |
e811c8ce RD |
2342 | |
2343 | def SetMaskColour(*args, **kwargs): | |
a95a7133 | 2344 | """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)""" |
54f9ee45 | 2345 | return _core_.Image_SetMaskColour(*args, **kwargs) |
e811c8ce | 2346 | |
aff4cc5c RD |
2347 | def GetOrFindMaskColour(*args, **kwargs): |
2348 | """ | |
2349 | GetOrFindMaskColour() -> (r,g,b) | |
2350 | ||
2351 | Get the current mask colour or find a suitable colour. | |
2352 | """ | |
2353 | return _core_.Image_GetOrFindMaskColour(*args, **kwargs) | |
2354 | ||
e811c8ce | 2355 | def GetMaskRed(*args, **kwargs): |
a95a7133 | 2356 | """GetMaskRed(self) -> unsigned char""" |
54f9ee45 | 2357 | return _core_.Image_GetMaskRed(*args, **kwargs) |
e811c8ce RD |
2358 | |
2359 | def GetMaskGreen(*args, **kwargs): | |
a95a7133 | 2360 | """GetMaskGreen(self) -> unsigned char""" |
54f9ee45 | 2361 | return _core_.Image_GetMaskGreen(*args, **kwargs) |
e811c8ce RD |
2362 | |
2363 | def GetMaskBlue(*args, **kwargs): | |
a95a7133 | 2364 | """GetMaskBlue(self) -> unsigned char""" |
54f9ee45 | 2365 | return _core_.Image_GetMaskBlue(*args, **kwargs) |
e811c8ce RD |
2366 | |
2367 | def SetMask(*args, **kwargs): | |
a95a7133 | 2368 | """SetMask(self, bool mask=True)""" |
54f9ee45 | 2369 | return _core_.Image_SetMask(*args, **kwargs) |
e811c8ce RD |
2370 | |
2371 | def HasMask(*args, **kwargs): | |
a95a7133 | 2372 | """HasMask(self) -> bool""" |
54f9ee45 | 2373 | return _core_.Image_HasMask(*args, **kwargs) |
e811c8ce RD |
2374 | |
2375 | def Rotate(*args, **kwargs): | |
0df68c9f | 2376 | """ |
a95a7133 | 2377 | Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True, |
0df68c9f RD |
2378 | Point offset_after_rotation=None) -> Image |
2379 | """ | |
54f9ee45 | 2380 | return _core_.Image_Rotate(*args, **kwargs) |
e811c8ce RD |
2381 | |
2382 | def Rotate90(*args, **kwargs): | |
a95a7133 | 2383 | """Rotate90(self, bool clockwise=True) -> Image""" |
54f9ee45 | 2384 | return _core_.Image_Rotate90(*args, **kwargs) |
e811c8ce RD |
2385 | |
2386 | def Mirror(*args, **kwargs): | |
a95a7133 | 2387 | """Mirror(self, bool horizontally=True) -> Image""" |
54f9ee45 | 2388 | return _core_.Image_Mirror(*args, **kwargs) |
e811c8ce RD |
2389 | |
2390 | def Replace(*args, **kwargs): | |
0df68c9f | 2391 | """ |
a95a7133 | 2392 | Replace(self, unsigned char r1, unsigned char g1, unsigned char b1, |
0df68c9f RD |
2393 | unsigned char r2, unsigned char g2, unsigned char b2) |
2394 | """ | |
54f9ee45 | 2395 | return _core_.Image_Replace(*args, **kwargs) |
e811c8ce RD |
2396 | |
2397 | def ConvertToMono(*args, **kwargs): | |
a95a7133 | 2398 | """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image""" |
54f9ee45 | 2399 | return _core_.Image_ConvertToMono(*args, **kwargs) |
e811c8ce RD |
2400 | |
2401 | def SetOption(*args, **kwargs): | |
a95a7133 | 2402 | """SetOption(self, String name, String value)""" |
54f9ee45 | 2403 | return _core_.Image_SetOption(*args, **kwargs) |
e811c8ce RD |
2404 | |
2405 | def SetOptionInt(*args, **kwargs): | |
a95a7133 | 2406 | """SetOptionInt(self, String name, int value)""" |
54f9ee45 | 2407 | return _core_.Image_SetOptionInt(*args, **kwargs) |
e811c8ce RD |
2408 | |
2409 | def GetOption(*args, **kwargs): | |
a95a7133 | 2410 | """GetOption(self, String name) -> String""" |
54f9ee45 | 2411 | return _core_.Image_GetOption(*args, **kwargs) |
e811c8ce RD |
2412 | |
2413 | def GetOptionInt(*args, **kwargs): | |
a95a7133 | 2414 | """GetOptionInt(self, String name) -> int""" |
54f9ee45 | 2415 | return _core_.Image_GetOptionInt(*args, **kwargs) |
e811c8ce RD |
2416 | |
2417 | def HasOption(*args, **kwargs): | |
a95a7133 | 2418 | """HasOption(self, String name) -> bool""" |
54f9ee45 | 2419 | return _core_.Image_HasOption(*args, **kwargs) |
e811c8ce RD |
2420 | |
2421 | def CountColours(*args, **kwargs): | |
a95a7133 | 2422 | """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long""" |
54f9ee45 | 2423 | return _core_.Image_CountColours(*args, **kwargs) |
e811c8ce RD |
2424 | |
2425 | def ComputeHistogram(*args, **kwargs): | |
a95a7133 | 2426 | """ComputeHistogram(self, ImageHistogram h) -> unsigned long""" |
54f9ee45 | 2427 | return _core_.Image_ComputeHistogram(*args, **kwargs) |
e811c8ce RD |
2428 | |
2429 | def AddHandler(*args, **kwargs): | |
66c033b4 | 2430 | """AddHandler(ImageHandler handler)""" |
54f9ee45 | 2431 | return _core_.Image_AddHandler(*args, **kwargs) |
e811c8ce RD |
2432 | |
2433 | AddHandler = staticmethod(AddHandler) | |
2434 | def InsertHandler(*args, **kwargs): | |
66c033b4 | 2435 | """InsertHandler(ImageHandler handler)""" |
54f9ee45 | 2436 | return _core_.Image_InsertHandler(*args, **kwargs) |
e811c8ce RD |
2437 | |
2438 | InsertHandler = staticmethod(InsertHandler) | |
2439 | def RemoveHandler(*args, **kwargs): | |
66c033b4 | 2440 | """RemoveHandler(String name) -> bool""" |
54f9ee45 | 2441 | return _core_.Image_RemoveHandler(*args, **kwargs) |
e811c8ce RD |
2442 | |
2443 | RemoveHandler = staticmethod(RemoveHandler) | |
2444 | def GetImageExtWildcard(*args, **kwargs): | |
66c033b4 | 2445 | """GetImageExtWildcard() -> String""" |
54f9ee45 | 2446 | return _core_.Image_GetImageExtWildcard(*args, **kwargs) |
e811c8ce RD |
2447 | |
2448 | GetImageExtWildcard = staticmethod(GetImageExtWildcard) | |
2449 | def ConvertToBitmap(*args, **kwargs): | |
1fbf26be | 2450 | """ConvertToBitmap(self, int depth=-1) -> Bitmap""" |
54f9ee45 | 2451 | return _core_.Image_ConvertToBitmap(*args, **kwargs) |
e811c8ce RD |
2452 | |
2453 | def ConvertToMonoBitmap(*args, **kwargs): | |
a95a7133 | 2454 | """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap""" |
54f9ee45 | 2455 | return _core_.Image_ConvertToMonoBitmap(*args, **kwargs) |
e811c8ce RD |
2456 | |
2457 | def __nonzero__(self): return self.Ok() | |
d14a1e28 RD |
2458 | |
2459 | class ImagePtr(Image): | |
2460 | def __init__(self, this): | |
2461 | self.this = this | |
2462 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2463 | self.__class__ = Image | |
54f9ee45 | 2464 | _core_.Image_swigregister(ImagePtr) |
d14a1e28 RD |
2465 | |
2466 | def ImageFromMime(*args, **kwargs): | |
196addbf | 2467 | """ImageFromMime(String name, String mimetype, int index=-1) -> Image""" |
54f9ee45 | 2468 | val = _core_.new_ImageFromMime(*args, **kwargs) |
d14a1e28 RD |
2469 | val.thisown = 1 |
2470 | return val | |
2471 | ||
2472 | def ImageFromStream(*args, **kwargs): | |
196addbf | 2473 | """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
54f9ee45 | 2474 | val = _core_.new_ImageFromStream(*args, **kwargs) |
d14a1e28 RD |
2475 | val.thisown = 1 |
2476 | return val | |
2477 | ||
2478 | def ImageFromStreamMime(*args, **kwargs): | |
196addbf | 2479 | """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image""" |
54f9ee45 | 2480 | val = _core_.new_ImageFromStreamMime(*args, **kwargs) |
d14a1e28 RD |
2481 | val.thisown = 1 |
2482 | return val | |
2483 | ||
66c033b4 RD |
2484 | def EmptyImage(*args, **kwargs): |
2485 | """EmptyImage(int width=0, int height=0, bool clear=True) -> Image""" | |
2486 | val = _core_.new_EmptyImage(*args, **kwargs) | |
d14a1e28 RD |
2487 | val.thisown = 1 |
2488 | return val | |
2489 | ||
2490 | def ImageFromBitmap(*args, **kwargs): | |
196addbf | 2491 | """ImageFromBitmap(Bitmap bitmap) -> Image""" |
54f9ee45 | 2492 | val = _core_.new_ImageFromBitmap(*args, **kwargs) |
d14a1e28 RD |
2493 | val.thisown = 1 |
2494 | return val | |
2495 | ||
2496 | def ImageFromData(*args, **kwargs): | |
e811c8ce | 2497 | """ImageFromData(int width, int height, unsigned char data) -> Image""" |
54f9ee45 | 2498 | val = _core_.new_ImageFromData(*args, **kwargs) |
d14a1e28 RD |
2499 | val.thisown = 1 |
2500 | return val | |
2501 | ||
1823fbb4 RD |
2502 | def ImageFromDataWithAlpha(*args, **kwargs): |
2503 | """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image""" | |
2504 | val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs) | |
2505 | val.thisown = 1 | |
2506 | return val | |
2507 | ||
e811c8ce | 2508 | def Image_CanRead(*args, **kwargs): |
196addbf | 2509 | """Image_CanRead(String name) -> bool""" |
54f9ee45 | 2510 | return _core_.Image_CanRead(*args, **kwargs) |
d14a1e28 | 2511 | |
e811c8ce | 2512 | def Image_GetImageCount(*args, **kwargs): |
196addbf | 2513 | """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" |
54f9ee45 | 2514 | return _core_.Image_GetImageCount(*args, **kwargs) |
d14a1e28 | 2515 | |
e811c8ce | 2516 | def Image_CanReadStream(*args, **kwargs): |
196addbf | 2517 | """Image_CanReadStream(InputStream stream) -> bool""" |
54f9ee45 | 2518 | return _core_.Image_CanReadStream(*args, **kwargs) |
d14a1e28 | 2519 | |
e811c8ce RD |
2520 | def Image_AddHandler(*args, **kwargs): |
2521 | """Image_AddHandler(ImageHandler handler)""" | |
54f9ee45 | 2522 | return _core_.Image_AddHandler(*args, **kwargs) |
d14a1e28 | 2523 | |
e811c8ce RD |
2524 | def Image_InsertHandler(*args, **kwargs): |
2525 | """Image_InsertHandler(ImageHandler handler)""" | |
54f9ee45 | 2526 | return _core_.Image_InsertHandler(*args, **kwargs) |
d14a1e28 | 2527 | |
e811c8ce | 2528 | def Image_RemoveHandler(*args, **kwargs): |
196addbf | 2529 | """Image_RemoveHandler(String name) -> bool""" |
54f9ee45 | 2530 | return _core_.Image_RemoveHandler(*args, **kwargs) |
d14a1e28 | 2531 | |
e811c8ce | 2532 | def Image_GetImageExtWildcard(*args, **kwargs): |
196addbf | 2533 | """Image_GetImageExtWildcard() -> String""" |
54f9ee45 | 2534 | return _core_.Image_GetImageExtWildcard(*args, **kwargs) |
d14a1e28 | 2535 | |
5e4ca4a8 RD |
2536 | def InitAllImageHandlers(): |
2537 | """ | |
2538 | The former functionality of InitAllImageHanders is now done internal to | |
2539 | the _core_ extension module and so this function has become a simple NOP. | |
2540 | """ | |
2541 | pass | |
d14a1e28 | 2542 | |
54f9ee45 RD |
2543 | IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES |
2544 | IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM | |
b9d6a5f3 RD |
2545 | PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR |
2546 | PNG_TYPE_GREY = _core_.PNG_TYPE_GREY | |
2547 | PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED | |
54f9ee45 RD |
2548 | BMP_24BPP = _core_.BMP_24BPP |
2549 | BMP_8BPP = _core_.BMP_8BPP | |
2550 | BMP_8BPP_GREY = _core_.BMP_8BPP_GREY | |
2551 | BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY | |
2552 | BMP_8BPP_RED = _core_.BMP_8BPP_RED | |
2553 | BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE | |
2554 | BMP_4BPP = _core_.BMP_4BPP | |
2555 | BMP_1BPP = _core_.BMP_1BPP | |
2556 | BMP_1BPP_BW = _core_.BMP_1BPP_BW | |
d14a1e28 | 2557 | class BMPHandler(ImageHandler): |
093d3ff1 | 2558 | """Proxy of C++ BMPHandler class""" |
e811c8ce RD |
2559 | def __repr__(self): |
2560 | return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2561 | def __init__(self, *args, **kwargs): |
a95a7133 | 2562 | """__init__(self) -> BMPHandler""" |
54f9ee45 | 2563 | newobj = _core_.new_BMPHandler(*args, **kwargs) |
d14a1e28 RD |
2564 | self.this = newobj.this |
2565 | self.thisown = 1 | |
2566 | del newobj.thisown | |
d14a1e28 RD |
2567 | |
2568 | class BMPHandlerPtr(BMPHandler): | |
2569 | def __init__(self, this): | |
2570 | self.this = this | |
2571 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2572 | self.__class__ = BMPHandler | |
54f9ee45 | 2573 | _core_.BMPHandler_swigregister(BMPHandlerPtr) |
d14a1e28 | 2574 | NullImage = cvar.NullImage |
0c243d93 | 2575 | IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME |
d14a1e28 RD |
2576 | IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT |
2577 | IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X | |
2578 | IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y | |
2579 | IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION | |
0c243d93 RD |
2580 | IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX |
2581 | IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY | |
d14a1e28 | 2582 | IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT |
24d7cbea | 2583 | IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY |
0c243d93 RD |
2584 | IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE |
2585 | IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL | |
2586 | IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION | |
2587 | IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR | |
b9d6a5f3 RD |
2588 | IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT |
2589 | IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH | |
d14a1e28 RD |
2590 | |
2591 | class ICOHandler(BMPHandler): | |
093d3ff1 | 2592 | """Proxy of C++ ICOHandler class""" |
e811c8ce RD |
2593 | def __repr__(self): |
2594 | return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2595 | def __init__(self, *args, **kwargs): |
a95a7133 | 2596 | """__init__(self) -> ICOHandler""" |
54f9ee45 | 2597 | newobj = _core_.new_ICOHandler(*args, **kwargs) |
d14a1e28 RD |
2598 | self.this = newobj.this |
2599 | self.thisown = 1 | |
2600 | del newobj.thisown | |
d14a1e28 RD |
2601 | |
2602 | class ICOHandlerPtr(ICOHandler): | |
2603 | def __init__(self, this): | |
2604 | self.this = this | |
2605 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2606 | self.__class__ = ICOHandler | |
54f9ee45 | 2607 | _core_.ICOHandler_swigregister(ICOHandlerPtr) |
d14a1e28 RD |
2608 | |
2609 | class CURHandler(ICOHandler): | |
093d3ff1 | 2610 | """Proxy of C++ CURHandler class""" |
e811c8ce RD |
2611 | def __repr__(self): |
2612 | return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2613 | def __init__(self, *args, **kwargs): |
a95a7133 | 2614 | """__init__(self) -> CURHandler""" |
54f9ee45 | 2615 | newobj = _core_.new_CURHandler(*args, **kwargs) |
d14a1e28 RD |
2616 | self.this = newobj.this |
2617 | self.thisown = 1 | |
2618 | del newobj.thisown | |
d14a1e28 RD |
2619 | |
2620 | class CURHandlerPtr(CURHandler): | |
2621 | def __init__(self, this): | |
2622 | self.this = this | |
2623 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2624 | self.__class__ = CURHandler | |
54f9ee45 | 2625 | _core_.CURHandler_swigregister(CURHandlerPtr) |
d14a1e28 RD |
2626 | |
2627 | class ANIHandler(CURHandler): | |
093d3ff1 | 2628 | """Proxy of C++ ANIHandler class""" |
e811c8ce RD |
2629 | def __repr__(self): |
2630 | return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2631 | def __init__(self, *args, **kwargs): |
a95a7133 | 2632 | """__init__(self) -> ANIHandler""" |
54f9ee45 | 2633 | newobj = _core_.new_ANIHandler(*args, **kwargs) |
d14a1e28 RD |
2634 | self.this = newobj.this |
2635 | self.thisown = 1 | |
2636 | del newobj.thisown | |
d14a1e28 RD |
2637 | |
2638 | class ANIHandlerPtr(ANIHandler): | |
2639 | def __init__(self, this): | |
2640 | self.this = this | |
2641 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2642 | self.__class__ = ANIHandler | |
54f9ee45 | 2643 | _core_.ANIHandler_swigregister(ANIHandlerPtr) |
d14a1e28 RD |
2644 | |
2645 | class PNGHandler(ImageHandler): | |
093d3ff1 | 2646 | """Proxy of C++ PNGHandler class""" |
e811c8ce RD |
2647 | def __repr__(self): |
2648 | return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2649 | def __init__(self, *args, **kwargs): |
a95a7133 | 2650 | """__init__(self) -> PNGHandler""" |
54f9ee45 | 2651 | newobj = _core_.new_PNGHandler(*args, **kwargs) |
d14a1e28 RD |
2652 | self.this = newobj.this |
2653 | self.thisown = 1 | |
2654 | del newobj.thisown | |
d14a1e28 RD |
2655 | |
2656 | class PNGHandlerPtr(PNGHandler): | |
2657 | def __init__(self, this): | |
2658 | self.this = this | |
2659 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2660 | self.__class__ = PNGHandler | |
54f9ee45 | 2661 | _core_.PNGHandler_swigregister(PNGHandlerPtr) |
d14a1e28 RD |
2662 | |
2663 | class GIFHandler(ImageHandler): | |
093d3ff1 | 2664 | """Proxy of C++ GIFHandler class""" |
e811c8ce RD |
2665 | def __repr__(self): |
2666 | return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2667 | def __init__(self, *args, **kwargs): |
a95a7133 | 2668 | """__init__(self) -> GIFHandler""" |
54f9ee45 | 2669 | newobj = _core_.new_GIFHandler(*args, **kwargs) |
d14a1e28 RD |
2670 | self.this = newobj.this |
2671 | self.thisown = 1 | |
2672 | del newobj.thisown | |
d14a1e28 RD |
2673 | |
2674 | class GIFHandlerPtr(GIFHandler): | |
2675 | def __init__(self, this): | |
2676 | self.this = this | |
2677 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2678 | self.__class__ = GIFHandler | |
54f9ee45 | 2679 | _core_.GIFHandler_swigregister(GIFHandlerPtr) |
d14a1e28 RD |
2680 | |
2681 | class PCXHandler(ImageHandler): | |
093d3ff1 | 2682 | """Proxy of C++ PCXHandler class""" |
e811c8ce RD |
2683 | def __repr__(self): |
2684 | return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2685 | def __init__(self, *args, **kwargs): |
a95a7133 | 2686 | """__init__(self) -> PCXHandler""" |
54f9ee45 | 2687 | newobj = _core_.new_PCXHandler(*args, **kwargs) |
d14a1e28 RD |
2688 | self.this = newobj.this |
2689 | self.thisown = 1 | |
2690 | del newobj.thisown | |
d14a1e28 RD |
2691 | |
2692 | class PCXHandlerPtr(PCXHandler): | |
2693 | def __init__(self, this): | |
2694 | self.this = this | |
2695 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2696 | self.__class__ = PCXHandler | |
54f9ee45 | 2697 | _core_.PCXHandler_swigregister(PCXHandlerPtr) |
d14a1e28 RD |
2698 | |
2699 | class JPEGHandler(ImageHandler): | |
093d3ff1 | 2700 | """Proxy of C++ JPEGHandler class""" |
e811c8ce RD |
2701 | def __repr__(self): |
2702 | return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2703 | def __init__(self, *args, **kwargs): |
a95a7133 | 2704 | """__init__(self) -> JPEGHandler""" |
54f9ee45 | 2705 | newobj = _core_.new_JPEGHandler(*args, **kwargs) |
d14a1e28 RD |
2706 | self.this = newobj.this |
2707 | self.thisown = 1 | |
2708 | del newobj.thisown | |
d14a1e28 RD |
2709 | |
2710 | class JPEGHandlerPtr(JPEGHandler): | |
2711 | def __init__(self, this): | |
2712 | self.this = this | |
2713 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2714 | self.__class__ = JPEGHandler | |
54f9ee45 | 2715 | _core_.JPEGHandler_swigregister(JPEGHandlerPtr) |
d14a1e28 RD |
2716 | |
2717 | class PNMHandler(ImageHandler): | |
093d3ff1 | 2718 | """Proxy of C++ PNMHandler class""" |
e811c8ce RD |
2719 | def __repr__(self): |
2720 | return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2721 | def __init__(self, *args, **kwargs): |
a95a7133 | 2722 | """__init__(self) -> PNMHandler""" |
54f9ee45 | 2723 | newobj = _core_.new_PNMHandler(*args, **kwargs) |
d14a1e28 RD |
2724 | self.this = newobj.this |
2725 | self.thisown = 1 | |
2726 | del newobj.thisown | |
d14a1e28 RD |
2727 | |
2728 | class PNMHandlerPtr(PNMHandler): | |
2729 | def __init__(self, this): | |
2730 | self.this = this | |
2731 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2732 | self.__class__ = PNMHandler | |
54f9ee45 | 2733 | _core_.PNMHandler_swigregister(PNMHandlerPtr) |
d14a1e28 RD |
2734 | |
2735 | class XPMHandler(ImageHandler): | |
093d3ff1 | 2736 | """Proxy of C++ XPMHandler class""" |
e811c8ce RD |
2737 | def __repr__(self): |
2738 | return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2739 | def __init__(self, *args, **kwargs): |
a95a7133 | 2740 | """__init__(self) -> XPMHandler""" |
54f9ee45 | 2741 | newobj = _core_.new_XPMHandler(*args, **kwargs) |
d14a1e28 RD |
2742 | self.this = newobj.this |
2743 | self.thisown = 1 | |
2744 | del newobj.thisown | |
d14a1e28 RD |
2745 | |
2746 | class XPMHandlerPtr(XPMHandler): | |
2747 | def __init__(self, this): | |
2748 | self.this = this | |
2749 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2750 | self.__class__ = XPMHandler | |
54f9ee45 | 2751 | _core_.XPMHandler_swigregister(XPMHandlerPtr) |
d14a1e28 RD |
2752 | |
2753 | class TIFFHandler(ImageHandler): | |
093d3ff1 | 2754 | """Proxy of C++ TIFFHandler class""" |
e811c8ce RD |
2755 | def __repr__(self): |
2756 | return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2757 | def __init__(self, *args, **kwargs): |
a95a7133 | 2758 | """__init__(self) -> TIFFHandler""" |
54f9ee45 | 2759 | newobj = _core_.new_TIFFHandler(*args, **kwargs) |
d14a1e28 RD |
2760 | self.this = newobj.this |
2761 | self.thisown = 1 | |
2762 | del newobj.thisown | |
d14a1e28 RD |
2763 | |
2764 | class TIFFHandlerPtr(TIFFHandler): | |
2765 | def __init__(self, this): | |
2766 | self.this = this | |
2767 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2768 | self.__class__ = TIFFHandler | |
54f9ee45 | 2769 | _core_.TIFFHandler_swigregister(TIFFHandlerPtr) |
d14a1e28 | 2770 | |
c0de73ae RD |
2771 | QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS |
2772 | QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE | |
2773 | class Quantize(object): | |
2774 | """Performs quantization, or colour reduction, on a wxImage.""" | |
2775 | def __init__(self): raise RuntimeError, "No constructor defined" | |
2776 | def __repr__(self): | |
2777 | return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2778 | def Quantize(*args, **kwargs): | |
2779 | """ | |
2780 | Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool | |
2781 | ||
2782 | Reduce the colours in the source image and put the result into the | |
2783 | destination image, setting the palette in the destination if | |
2784 | needed. Both images may be the same, to overwrite the source image. | |
2785 | """ | |
2786 | return _core_.Quantize_Quantize(*args, **kwargs) | |
2787 | ||
2788 | Quantize = staticmethod(Quantize) | |
2789 | ||
2790 | class QuantizePtr(Quantize): | |
2791 | def __init__(self, this): | |
2792 | self.this = this | |
2793 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2794 | self.__class__ = Quantize | |
2795 | _core_.Quantize_swigregister(QuantizePtr) | |
2796 | ||
2797 | def Quantize_Quantize(*args, **kwargs): | |
2798 | """ | |
2799 | Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool | |
2800 | ||
2801 | Reduce the colours in the source image and put the result into the | |
2802 | destination image, setting the palette in the destination if | |
2803 | needed. Both images may be the same, to overwrite the source image. | |
2804 | """ | |
2805 | return _core_.Quantize_Quantize(*args, **kwargs) | |
2806 | ||
d14a1e28 RD |
2807 | #--------------------------------------------------------------------------- |
2808 | ||
2809 | class EvtHandler(Object): | |
093d3ff1 | 2810 | """Proxy of C++ EvtHandler class""" |
e811c8ce RD |
2811 | def __repr__(self): |
2812 | return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2813 | def __init__(self, *args, **kwargs): |
a95a7133 | 2814 | """__init__(self) -> EvtHandler""" |
54f9ee45 | 2815 | newobj = _core_.new_EvtHandler(*args, **kwargs) |
d14a1e28 RD |
2816 | self.this = newobj.this |
2817 | self.thisown = 1 | |
2818 | del newobj.thisown | |
e811c8ce | 2819 | def GetNextHandler(*args, **kwargs): |
a95a7133 | 2820 | """GetNextHandler(self) -> EvtHandler""" |
54f9ee45 | 2821 | return _core_.EvtHandler_GetNextHandler(*args, **kwargs) |
e811c8ce RD |
2822 | |
2823 | def GetPreviousHandler(*args, **kwargs): | |
a95a7133 | 2824 | """GetPreviousHandler(self) -> EvtHandler""" |
54f9ee45 | 2825 | return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs) |
e811c8ce RD |
2826 | |
2827 | def SetNextHandler(*args, **kwargs): | |
a95a7133 | 2828 | """SetNextHandler(self, EvtHandler handler)""" |
54f9ee45 | 2829 | return _core_.EvtHandler_SetNextHandler(*args, **kwargs) |
e811c8ce RD |
2830 | |
2831 | def SetPreviousHandler(*args, **kwargs): | |
a95a7133 | 2832 | """SetPreviousHandler(self, EvtHandler handler)""" |
54f9ee45 | 2833 | return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs) |
e811c8ce RD |
2834 | |
2835 | def GetEvtHandlerEnabled(*args, **kwargs): | |
a95a7133 | 2836 | """GetEvtHandlerEnabled(self) -> bool""" |
54f9ee45 | 2837 | return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs) |
e811c8ce RD |
2838 | |
2839 | def SetEvtHandlerEnabled(*args, **kwargs): | |
a95a7133 | 2840 | """SetEvtHandlerEnabled(self, bool enabled)""" |
54f9ee45 | 2841 | return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs) |
e811c8ce RD |
2842 | |
2843 | def ProcessEvent(*args, **kwargs): | |
a95a7133 | 2844 | """ProcessEvent(self, Event event) -> bool""" |
54f9ee45 | 2845 | return _core_.EvtHandler_ProcessEvent(*args, **kwargs) |
e811c8ce RD |
2846 | |
2847 | def AddPendingEvent(*args, **kwargs): | |
a95a7133 | 2848 | """AddPendingEvent(self, Event event)""" |
54f9ee45 | 2849 | return _core_.EvtHandler_AddPendingEvent(*args, **kwargs) |
e811c8ce RD |
2850 | |
2851 | def ProcessPendingEvents(*args, **kwargs): | |
a95a7133 | 2852 | """ProcessPendingEvents(self)""" |
54f9ee45 | 2853 | return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs) |
e811c8ce RD |
2854 | |
2855 | def Connect(*args, **kwargs): | |
a95a7133 | 2856 | """Connect(self, int id, int lastId, int eventType, PyObject func)""" |
54f9ee45 | 2857 | return _core_.EvtHandler_Connect(*args, **kwargs) |
e811c8ce RD |
2858 | |
2859 | def Disconnect(*args, **kwargs): | |
a95a7133 | 2860 | """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool""" |
54f9ee45 | 2861 | return _core_.EvtHandler_Disconnect(*args, **kwargs) |
e811c8ce RD |
2862 | |
2863 | def _setOORInfo(*args, **kwargs): | |
689b42ee | 2864 | """_setOORInfo(self, PyObject _self, bool incref=True)""" |
54f9ee45 | 2865 | return _core_.EvtHandler__setOORInfo(*args, **kwargs) |
e811c8ce | 2866 | |
d14a1e28 RD |
2867 | def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
2868 | """ | |
2869 | Bind an event to an event handler. | |
2870 | ||
db3e571a RD |
2871 | :param event: One of the EVT_* objects that specifies the |
2872 | type of event to bind, | |
d14a1e28 | 2873 | |
db3e571a RD |
2874 | :param handler: A callable object to be invoked when the |
2875 | event is delivered to self. Pass None to | |
2876 | disconnect an event handler. | |
d14a1e28 | 2877 | |
db3e571a RD |
2878 | :param source: Sometimes the event originates from a |
2879 | different window than self, but you still | |
2880 | want to catch it in self. (For example, a | |
2881 | button event delivered to a frame.) By | |
2882 | passing the source of the event, the event | |
2883 | handling system is able to differentiate | |
2884 | between the same event type from different | |
2885 | controls. | |
d14a1e28 | 2886 | |
db3e571a RD |
2887 | :param id: Used to spcify the event source by ID instead |
2888 | of instance. | |
2889 | ||
2890 | :param id2: Used when it is desirable to bind a handler | |
2891 | to a range of IDs, such as with EVT_MENU_RANGE. | |
d14a1e28 RD |
2892 | """ |
2893 | if source is not None: | |
2894 | id = source.GetId() | |
2895 | event.Bind(self, id, id2, handler) | |
2896 | ||
66c033b4 RD |
2897 | def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
2898 | """ | |
2899 | Disconencts the event handler binding for event from self. | |
2900 | Returns True if successful. | |
2901 | """ | |
2902 | if source is not None: | |
2903 | id = source.GetId() | |
2904 | return event.Unbind(self, id, id2) | |
d14a1e28 | 2905 | |
d14a1e28 RD |
2906 | |
2907 | class EvtHandlerPtr(EvtHandler): | |
2908 | def __init__(self, this): | |
2909 | self.this = this | |
2910 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2911 | self.__class__ = EvtHandler | |
54f9ee45 | 2912 | _core_.EvtHandler_swigregister(EvtHandlerPtr) |
d14a1e28 RD |
2913 | |
2914 | #--------------------------------------------------------------------------- | |
2915 | ||
2916 | class PyEventBinder(object): | |
2917 | """ | |
2918 | Instances of this class are used to bind specific events to event | |
2919 | handlers. | |
2920 | """ | |
2921 | def __init__(self, evtType, expectedIDs=0): | |
2922 | if expectedIDs not in [0, 1, 2]: | |
2923 | raise ValueError, "Invalid number of expectedIDs" | |
2924 | self.expectedIDs = expectedIDs | |
2925 | ||
2926 | if type(evtType) == list or type(evtType) == tuple: | |
2927 | self.evtType = evtType | |
2928 | else: | |
2929 | self.evtType = [evtType] | |
2930 | ||
2931 | ||
2932 | def Bind(self, target, id1, id2, function): | |
2933 | """Bind this set of event types to target.""" | |
2934 | for et in self.evtType: | |
2935 | target.Connect(id1, id2, et, function) | |
2936 | ||
66c033b4 RD |
2937 | |
2938 | def Unbind(self, target, id1, id2): | |
2939 | """Remove an event binding.""" | |
2940 | success = 0 | |
2941 | for et in self.evtType: | |
2942 | success += target.Disconnect(id1, id2, et) | |
2943 | return success != 0 | |
2944 | ||
d14a1e28 RD |
2945 | |
2946 | def __call__(self, *args): | |
2947 | """ | |
2948 | For backwards compatibility with the old EVT_* functions. | |
2949 | Should be called with either (window, func), (window, ID, | |
2950 | func) or (window, ID1, ID2, func) parameters depending on the | |
2951 | type of the event. | |
2952 | """ | |
2953 | assert len(args) == 2 + self.expectedIDs | |
2954 | id1 = wx.ID_ANY | |
2955 | id2 = wx.ID_ANY | |
2956 | target = args[0] | |
2957 | if self.expectedIDs == 0: | |
2958 | func = args[1] | |
2959 | elif self.expectedIDs == 1: | |
2960 | id1 = args[1] | |
2961 | func = args[2] | |
2962 | elif self.expectedIDs == 2: | |
2963 | id1 = args[1] | |
2964 | id2 = args[2] | |
2965 | func = args[3] | |
2966 | else: | |
2967 | raise ValueError, "Unexpected number of IDs" | |
2968 | ||
2969 | self.Bind(target, id1, id2, func) | |
2970 | ||
2971 | ||
2972 | # These two are square pegs that don't fit the PyEventBinder hole... | |
2973 | def EVT_COMMAND(win, id, cmd, func): | |
2974 | win.Connect(id, -1, cmd, func) | |
2975 | def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): | |
2976 | win.Connect(id1, id2, cmd, func) | |
2977 | ||
2978 | ||
2979 | #--------------------------------------------------------------------------- | |
2980 | ||
2981 | #--------------------------------------------------------------------------- | |
2982 | ||
54f9ee45 RD |
2983 | EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE |
2984 | EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX | |
d14a1e28 | 2985 | |
e811c8ce RD |
2986 | def NewEventType(*args, **kwargs): |
2987 | """NewEventType() -> wxEventType""" | |
54f9ee45 RD |
2988 | return _core_.NewEventType(*args, **kwargs) |
2989 | wxEVT_NULL = _core_.wxEVT_NULL | |
2990 | wxEVT_FIRST = _core_.wxEVT_FIRST | |
2991 | wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST | |
2992 | wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED | |
2993 | wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED | |
2994 | wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED | |
2995 | wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED | |
2996 | wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED | |
2997 | wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED | |
2998 | wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED | |
2999 | wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED | |
3000 | wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED | |
3001 | wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED | |
3002 | wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED | |
3003 | wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED | |
3004 | wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED | |
3005 | wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED | |
3006 | wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED | |
3007 | wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER | |
3008 | wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN | |
3009 | wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP | |
3010 | wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN | |
3011 | wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP | |
3012 | wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN | |
3013 | wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP | |
3014 | wxEVT_MOTION = _core_.wxEVT_MOTION | |
3015 | wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW | |
3016 | wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW | |
3017 | wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK | |
3018 | wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK | |
3019 | wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK | |
3020 | wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS | |
3021 | wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS | |
3022 | wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS | |
3023 | wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL | |
3024 | wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN | |
3025 | wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP | |
3026 | wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN | |
3027 | wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP | |
3028 | wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN | |
3029 | wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP | |
3030 | wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION | |
3031 | wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW | |
3032 | wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW | |
3033 | wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK | |
3034 | wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK | |
3035 | wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK | |
3036 | wxEVT_CHAR = _core_.wxEVT_CHAR | |
3037 | wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK | |
3038 | wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY | |
3039 | wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN | |
3040 | wxEVT_KEY_UP = _core_.wxEVT_KEY_UP | |
3041 | wxEVT_HOTKEY = _core_.wxEVT_HOTKEY | |
3042 | wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR | |
3043 | wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP | |
3044 | wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM | |
3045 | wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP | |
3046 | wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN | |
3047 | wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP | |
3048 | wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN | |
3049 | wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK | |
3050 | wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE | |
3051 | wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL | |
3052 | wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP | |
3053 | wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM | |
3054 | wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP | |
3055 | wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN | |
3056 | wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP | |
3057 | wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN | |
3058 | wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK | |
3059 | wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE | |
3060 | wxEVT_SIZE = _core_.wxEVT_SIZE | |
3061 | wxEVT_MOVE = _core_.wxEVT_MOVE | |
3062 | wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW | |
3063 | wxEVT_END_SESSION = _core_.wxEVT_END_SESSION | |
3064 | wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION | |
3065 | wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP | |
3066 | wxEVT_POWER = _core_.wxEVT_POWER | |
3067 | wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE | |
3068 | wxEVT_CREATE = _core_.wxEVT_CREATE | |
3069 | wxEVT_DESTROY = _core_.wxEVT_DESTROY | |
3070 | wxEVT_SHOW = _core_.wxEVT_SHOW | |
3071 | wxEVT_ICONIZE = _core_.wxEVT_ICONIZE | |
3072 | wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE | |
3073 | wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED | |
3074 | wxEVT_PAINT = _core_.wxEVT_PAINT | |
3075 | wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND | |
3076 | wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT | |
3077 | wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON | |
3078 | wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN | |
3079 | wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE | |
3080 | wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT | |
3081 | wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU | |
3082 | wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED | |
3083 | wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED | |
3084 | wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED | |
3085 | wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE | |
3086 | wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED | |
3087 | wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES | |
3088 | wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM | |
3089 | wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM | |
3090 | wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM | |
3091 | wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG | |
3092 | wxEVT_IDLE = _core_.wxEVT_IDLE | |
3093 | wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI | |
3094 | wxEVT_SIZING = _core_.wxEVT_SIZING | |
3095 | wxEVT_MOVING = _core_.wxEVT_MOVING | |
3096 | wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK | |
3097 | wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK | |
3098 | wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK | |
3099 | wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK | |
3100 | wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS | |
3101 | wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS | |
3102 | wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER | |
d14a1e28 RD |
3103 | # |
3104 | # Create some event binders | |
3105 | EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE ) | |
3106 | EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING ) | |
3107 | EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE ) | |
3108 | EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING ) | |
3109 | EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW ) | |
3110 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
3111 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
3112 | EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT ) | |
3113 | EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT ) | |
3114 | EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND ) | |
3115 | EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR ) | |
3116 | EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN ) | |
3117 | EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP ) | |
3118 | EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) | |
3119 | EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK ) | |
3120 | EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN ) | |
3121 | EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE ) | |
3122 | EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1) | |
3123 | EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT ) | |
3124 | EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS ) | |
3125 | EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS ) | |
3126 | EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS ) | |
3127 | EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE ) | |
3128 | EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP ) | |
3129 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
3130 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
3131 | EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES ) | |
3132 | EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG ) | |
3133 | EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED ) | |
3134 | EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED ) | |
3135 | EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW ) | |
3136 | EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE ) | |
3137 | EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE ) | |
3138 | EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY ) | |
3139 | EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED ) | |
3140 | EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE ) | |
3141 | EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE ) | |
3142 | EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY ) | |
3143 | EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR ) | |
3144 | EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED ) | |
3145 | ||
3146 | EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN ) | |
3147 | EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP ) | |
3148 | EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN ) | |
3149 | EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP ) | |
3150 | EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN ) | |
3151 | EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP ) | |
3152 | EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION ) | |
3153 | EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK ) | |
3154 | EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK ) | |
3155 | EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK ) | |
3156 | EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW ) | |
3157 | EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW ) | |
3158 | EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL ) | |
3159 | ||
3160 | EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN, | |
3161 | wxEVT_LEFT_UP, | |
3162 | wxEVT_MIDDLE_DOWN, | |
3163 | wxEVT_MIDDLE_UP, | |
3164 | wxEVT_RIGHT_DOWN, | |
3165 | wxEVT_RIGHT_UP, | |
3166 | wxEVT_MOTION, | |
3167 | wxEVT_LEFT_DCLICK, | |
3168 | wxEVT_MIDDLE_DCLICK, | |
3169 | wxEVT_RIGHT_DCLICK, | |
3170 | wxEVT_ENTER_WINDOW, | |
3171 | wxEVT_LEAVE_WINDOW, | |
3172 | wxEVT_MOUSEWHEEL | |
3173 | ]) | |
3174 | ||
3175 | ||
3176 | # Scrolling from wxWindow (sent to wxScrolledWindow) | |
3177 | EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, | |
3178 | wxEVT_SCROLLWIN_BOTTOM, | |
3179 | wxEVT_SCROLLWIN_LINEUP, | |
3180 | wxEVT_SCROLLWIN_LINEDOWN, | |
3181 | wxEVT_SCROLLWIN_PAGEUP, | |
3182 | wxEVT_SCROLLWIN_PAGEDOWN, | |
3183 | wxEVT_SCROLLWIN_THUMBTRACK, | |
3184 | wxEVT_SCROLLWIN_THUMBRELEASE, | |
3185 | ]) | |
3186 | ||
3187 | EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP ) | |
3188 | EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM ) | |
3189 | EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP ) | |
3190 | EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN ) | |
3191 | EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP ) | |
3192 | EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN ) | |
3193 | EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK ) | |
3194 | EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE ) | |
3195 | ||
3196 | # Scrolling from wxSlider and wxScrollBar | |
3197 | EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
3198 | wxEVT_SCROLL_BOTTOM, | |
3199 | wxEVT_SCROLL_LINEUP, | |
3200 | wxEVT_SCROLL_LINEDOWN, | |
3201 | wxEVT_SCROLL_PAGEUP, | |
3202 | wxEVT_SCROLL_PAGEDOWN, | |
3203 | wxEVT_SCROLL_THUMBTRACK, | |
3204 | wxEVT_SCROLL_THUMBRELEASE, | |
3205 | wxEVT_SCROLL_ENDSCROLL, | |
3206 | ]) | |
3207 | ||
3208 | EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP ) | |
3209 | EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM ) | |
3210 | EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP ) | |
3211 | EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN ) | |
3212 | EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP ) | |
3213 | EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN ) | |
3214 | EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK ) | |
3215 | EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE ) | |
3216 | EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL ) | |
3217 | ||
3218 | # Scrolling from wxSlider and wxScrollBar, with an id | |
3219 | EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
3220 | wxEVT_SCROLL_BOTTOM, | |
3221 | wxEVT_SCROLL_LINEUP, | |
3222 | wxEVT_SCROLL_LINEDOWN, | |
3223 | wxEVT_SCROLL_PAGEUP, | |
3224 | wxEVT_SCROLL_PAGEDOWN, | |
3225 | wxEVT_SCROLL_THUMBTRACK, | |
3226 | wxEVT_SCROLL_THUMBRELEASE, | |
3227 | wxEVT_SCROLL_ENDSCROLL, | |
3228 | ], 1) | |
3229 | ||
3230 | EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1) | |
3231 | EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1) | |
3232 | EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1) | |
3233 | EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1) | |
3234 | EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1) | |
3235 | EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1) | |
3236 | EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) | |
3237 | EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1) | |
3238 | EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1) | |
3239 | ||
d14a1e28 RD |
3240 | EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1) |
3241 | EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1) | |
3242 | EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1) | |
3243 | EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1) | |
3244 | EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1) | |
3245 | EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1) | |
3246 | EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2) | |
3247 | EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1) | |
3248 | EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1) | |
3249 | EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1) | |
3250 | ||
3251 | EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1) | |
3252 | EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1) | |
3253 | EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1) | |
3254 | EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1) | |
3255 | EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2) | |
3256 | EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1) | |
3257 | EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2) | |
3258 | EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1) | |
3259 | EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1) | |
3260 | ||
3261 | ||
3262 | EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1) | |
3263 | EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1) | |
3264 | EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1) | |
3265 | EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1) | |
3266 | EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1) | |
3267 | EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1) | |
3268 | EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1) | |
3269 | ||
3270 | EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE ) | |
3271 | ||
3272 | EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1) | |
3273 | EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2) | |
3274 | ||
3275 | EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) | |
3276 | ||
3277 | ||
3278 | ||
3279 | #--------------------------------------------------------------------------- | |
3280 | ||
3281 | class Event(Object): | |
093d3ff1 | 3282 | """Proxy of C++ Event class""" |
e811c8ce RD |
3283 | def __init__(self): raise RuntimeError, "No constructor defined" |
3284 | def __repr__(self): | |
3285 | return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 | 3286 | def __del__(self, destroy=_core_.delete_Event): |
a95a7133 | 3287 | """__del__(self)""" |
d14a1e28 RD |
3288 | try: |
3289 | if self.thisown: destroy(self) | |
3290 | except: pass | |
e811c8ce RD |
3291 | |
3292 | def SetEventType(*args, **kwargs): | |
a95a7133 | 3293 | """SetEventType(self, wxEventType typ)""" |
54f9ee45 | 3294 | return _core_.Event_SetEventType(*args, **kwargs) |
e811c8ce RD |
3295 | |
3296 | def GetEventType(*args, **kwargs): | |
a95a7133 | 3297 | """GetEventType(self) -> wxEventType""" |
54f9ee45 | 3298 | return _core_.Event_GetEventType(*args, **kwargs) |
e811c8ce RD |
3299 | |
3300 | def GetEventObject(*args, **kwargs): | |
a95a7133 | 3301 | """GetEventObject(self) -> Object""" |
54f9ee45 | 3302 | return _core_.Event_GetEventObject(*args, **kwargs) |
e811c8ce RD |
3303 | |
3304 | def SetEventObject(*args, **kwargs): | |
a95a7133 | 3305 | """SetEventObject(self, Object obj)""" |
54f9ee45 | 3306 | return _core_.Event_SetEventObject(*args, **kwargs) |
e811c8ce RD |
3307 | |
3308 | def GetTimestamp(*args, **kwargs): | |
a95a7133 | 3309 | """GetTimestamp(self) -> long""" |
54f9ee45 | 3310 | return _core_.Event_GetTimestamp(*args, **kwargs) |
e811c8ce RD |
3311 | |
3312 | def SetTimestamp(*args, **kwargs): | |
a95a7133 | 3313 | """SetTimestamp(self, long ts=0)""" |
54f9ee45 | 3314 | return _core_.Event_SetTimestamp(*args, **kwargs) |
e811c8ce RD |
3315 | |
3316 | def GetId(*args, **kwargs): | |
a95a7133 | 3317 | """GetId(self) -> int""" |
54f9ee45 | 3318 | return _core_.Event_GetId(*args, **kwargs) |
e811c8ce RD |
3319 | |
3320 | def SetId(*args, **kwargs): | |
a95a7133 | 3321 | """SetId(self, int Id)""" |
54f9ee45 | 3322 | return _core_.Event_SetId(*args, **kwargs) |
e811c8ce RD |
3323 | |
3324 | def IsCommandEvent(*args, **kwargs): | |
a95a7133 | 3325 | """IsCommandEvent(self) -> bool""" |
54f9ee45 | 3326 | return _core_.Event_IsCommandEvent(*args, **kwargs) |
e811c8ce RD |
3327 | |
3328 | def Skip(*args, **kwargs): | |
51b83b37 RD |
3329 | """ |
3330 | Skip(self, bool skip=True) | |
3331 | ||
3332 | Called by an event handler, it controls whether additional event | |
3333 | handlers bound to this event will be called after the current event | |
3334 | handler returns. Skip(false) (the default setting) will prevent | |
3335 | additional event handlers from being called and control will be | |
3336 | returned to the sender of the event immediately after the current | |
3337 | handler has finished. Skip(True) will cause the event processing | |
3338 | system to continue searching for a handler function for this event. | |
3339 | ||
3340 | """ | |
54f9ee45 | 3341 | return _core_.Event_Skip(*args, **kwargs) |
e811c8ce RD |
3342 | |
3343 | def GetSkipped(*args, **kwargs): | |
a95a7133 | 3344 | """GetSkipped(self) -> bool""" |
54f9ee45 | 3345 | return _core_.Event_GetSkipped(*args, **kwargs) |
e811c8ce RD |
3346 | |
3347 | def ShouldPropagate(*args, **kwargs): | |
a95a7133 | 3348 | """ShouldPropagate(self) -> bool""" |
54f9ee45 | 3349 | return _core_.Event_ShouldPropagate(*args, **kwargs) |
e811c8ce RD |
3350 | |
3351 | def StopPropagation(*args, **kwargs): | |
a95a7133 | 3352 | """StopPropagation(self) -> int""" |
54f9ee45 | 3353 | return _core_.Event_StopPropagation(*args, **kwargs) |
e811c8ce RD |
3354 | |
3355 | def ResumePropagation(*args, **kwargs): | |
a95a7133 | 3356 | """ResumePropagation(self, int propagationLevel)""" |
54f9ee45 | 3357 | return _core_.Event_ResumePropagation(*args, **kwargs) |
e811c8ce RD |
3358 | |
3359 | def Clone(*args, **kwargs): | |
a95a7133 | 3360 | """Clone(self) -> Event""" |
54f9ee45 | 3361 | return _core_.Event_Clone(*args, **kwargs) |
e811c8ce | 3362 | |
d14a1e28 RD |
3363 | |
3364 | class EventPtr(Event): | |
3365 | def __init__(self, this): | |
3366 | self.this = this | |
3367 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3368 | self.__class__ = Event | |
54f9ee45 | 3369 | _core_.Event_swigregister(EventPtr) |
d14a1e28 RD |
3370 | |
3371 | #--------------------------------------------------------------------------- | |
3372 | ||
3373 | class PropagationDisabler(object): | |
093d3ff1 | 3374 | """Proxy of C++ PropagationDisabler class""" |
e811c8ce RD |
3375 | def __repr__(self): |
3376 | return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3377 | def __init__(self, *args, **kwargs): |
a95a7133 | 3378 | """__init__(self, Event event) -> PropagationDisabler""" |
54f9ee45 | 3379 | newobj = _core_.new_PropagationDisabler(*args, **kwargs) |
d14a1e28 RD |
3380 | self.this = newobj.this |
3381 | self.thisown = 1 | |
3382 | del newobj.thisown | |
54f9ee45 | 3383 | def __del__(self, destroy=_core_.delete_PropagationDisabler): |
a95a7133 | 3384 | """__del__(self)""" |
d14a1e28 RD |
3385 | try: |
3386 | if self.thisown: destroy(self) | |
3387 | except: pass | |
e811c8ce | 3388 | |
d14a1e28 RD |
3389 | |
3390 | class PropagationDisablerPtr(PropagationDisabler): | |
3391 | def __init__(self, this): | |
3392 | self.this = this | |
3393 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3394 | self.__class__ = PropagationDisabler | |
54f9ee45 | 3395 | _core_.PropagationDisabler_swigregister(PropagationDisablerPtr) |
d14a1e28 RD |
3396 | |
3397 | class PropagateOnce(object): | |
093d3ff1 | 3398 | """Proxy of C++ PropagateOnce class""" |
e811c8ce RD |
3399 | def __repr__(self): |
3400 | return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3401 | def __init__(self, *args, **kwargs): |
a95a7133 | 3402 | """__init__(self, Event event) -> PropagateOnce""" |
54f9ee45 | 3403 | newobj = _core_.new_PropagateOnce(*args, **kwargs) |
d14a1e28 RD |
3404 | self.this = newobj.this |
3405 | self.thisown = 1 | |
3406 | del newobj.thisown | |
54f9ee45 | 3407 | def __del__(self, destroy=_core_.delete_PropagateOnce): |
a95a7133 | 3408 | """__del__(self)""" |
d14a1e28 RD |
3409 | try: |
3410 | if self.thisown: destroy(self) | |
3411 | except: pass | |
e811c8ce | 3412 | |
d14a1e28 RD |
3413 | |
3414 | class PropagateOncePtr(PropagateOnce): | |
3415 | def __init__(self, this): | |
3416 | self.this = this | |
3417 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3418 | self.__class__ = PropagateOnce | |
54f9ee45 | 3419 | _core_.PropagateOnce_swigregister(PropagateOncePtr) |
d14a1e28 RD |
3420 | |
3421 | #--------------------------------------------------------------------------- | |
3422 | ||
3423 | class CommandEvent(Event): | |
093d3ff1 | 3424 | """Proxy of C++ CommandEvent class""" |
e811c8ce RD |
3425 | def __repr__(self): |
3426 | return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3427 | def __init__(self, *args, **kwargs): |
a95a7133 | 3428 | """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent""" |
54f9ee45 | 3429 | newobj = _core_.new_CommandEvent(*args, **kwargs) |
d14a1e28 RD |
3430 | self.this = newobj.this |
3431 | self.thisown = 1 | |
3432 | del newobj.thisown | |
e811c8ce | 3433 | def GetSelection(*args, **kwargs): |
a95a7133 | 3434 | """GetSelection(self) -> int""" |
54f9ee45 | 3435 | return _core_.CommandEvent_GetSelection(*args, **kwargs) |
e811c8ce RD |
3436 | |
3437 | def SetString(*args, **kwargs): | |
a95a7133 | 3438 | """SetString(self, String s)""" |
54f9ee45 | 3439 | return _core_.CommandEvent_SetString(*args, **kwargs) |
e811c8ce RD |
3440 | |
3441 | def GetString(*args, **kwargs): | |
a95a7133 | 3442 | """GetString(self) -> String""" |
54f9ee45 | 3443 | return _core_.CommandEvent_GetString(*args, **kwargs) |
e811c8ce RD |
3444 | |
3445 | def IsChecked(*args, **kwargs): | |
a95a7133 | 3446 | """IsChecked(self) -> bool""" |
54f9ee45 | 3447 | return _core_.CommandEvent_IsChecked(*args, **kwargs) |
e811c8ce | 3448 | |
242b7b46 | 3449 | Checked = IsChecked |
e811c8ce | 3450 | def IsSelection(*args, **kwargs): |
a95a7133 | 3451 | """IsSelection(self) -> bool""" |
54f9ee45 | 3452 | return _core_.CommandEvent_IsSelection(*args, **kwargs) |
e811c8ce RD |
3453 | |
3454 | def SetExtraLong(*args, **kwargs): | |
a95a7133 | 3455 | """SetExtraLong(self, long extraLong)""" |
54f9ee45 | 3456 | return _core_.CommandEvent_SetExtraLong(*args, **kwargs) |
e811c8ce RD |
3457 | |
3458 | def GetExtraLong(*args, **kwargs): | |
a95a7133 | 3459 | """GetExtraLong(self) -> long""" |
54f9ee45 | 3460 | return _core_.CommandEvent_GetExtraLong(*args, **kwargs) |
e811c8ce RD |
3461 | |
3462 | def SetInt(*args, **kwargs): | |
a95a7133 | 3463 | """SetInt(self, int i)""" |
54f9ee45 | 3464 | return _core_.CommandEvent_SetInt(*args, **kwargs) |
e811c8ce RD |
3465 | |
3466 | def GetInt(*args, **kwargs): | |
a95a7133 | 3467 | """GetInt(self) -> long""" |
54f9ee45 | 3468 | return _core_.CommandEvent_GetInt(*args, **kwargs) |
e811c8ce RD |
3469 | |
3470 | def Clone(*args, **kwargs): | |
a95a7133 | 3471 | """Clone(self) -> Event""" |
54f9ee45 | 3472 | return _core_.CommandEvent_Clone(*args, **kwargs) |
e811c8ce | 3473 | |
d14a1e28 RD |
3474 | |
3475 | class CommandEventPtr(CommandEvent): | |
3476 | def __init__(self, this): | |
3477 | self.this = this | |
3478 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3479 | self.__class__ = CommandEvent | |
54f9ee45 | 3480 | _core_.CommandEvent_swigregister(CommandEventPtr) |
d14a1e28 RD |
3481 | |
3482 | #--------------------------------------------------------------------------- | |
3483 | ||
3484 | class NotifyEvent(CommandEvent): | |
093d3ff1 | 3485 | """Proxy of C++ NotifyEvent class""" |
e811c8ce RD |
3486 | def __repr__(self): |
3487 | return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3488 | def __init__(self, *args, **kwargs): |
a95a7133 | 3489 | """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent""" |
54f9ee45 | 3490 | newobj = _core_.new_NotifyEvent(*args, **kwargs) |
d14a1e28 RD |
3491 | self.this = newobj.this |
3492 | self.thisown = 1 | |
3493 | del newobj.thisown | |
e811c8ce | 3494 | def Veto(*args, **kwargs): |
a95a7133 | 3495 | """Veto(self)""" |
54f9ee45 | 3496 | return _core_.NotifyEvent_Veto(*args, **kwargs) |
e811c8ce RD |
3497 | |
3498 | def Allow(*args, **kwargs): | |
a95a7133 | 3499 | """Allow(self)""" |
54f9ee45 | 3500 | return _core_.NotifyEvent_Allow(*args, **kwargs) |
e811c8ce RD |
3501 | |
3502 | def IsAllowed(*args, **kwargs): | |
a95a7133 | 3503 | """IsAllowed(self) -> bool""" |
54f9ee45 | 3504 | return _core_.NotifyEvent_IsAllowed(*args, **kwargs) |
e811c8ce | 3505 | |
d14a1e28 RD |
3506 | |
3507 | class NotifyEventPtr(NotifyEvent): | |
3508 | def __init__(self, this): | |
3509 | self.this = this | |
3510 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3511 | self.__class__ = NotifyEvent | |
54f9ee45 | 3512 | _core_.NotifyEvent_swigregister(NotifyEventPtr) |
d14a1e28 RD |
3513 | |
3514 | #--------------------------------------------------------------------------- | |
3515 | ||
3516 | class ScrollEvent(CommandEvent): | |
093d3ff1 | 3517 | """Proxy of C++ ScrollEvent class""" |
e811c8ce RD |
3518 | def __repr__(self): |
3519 | return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3520 | def __init__(self, *args, **kwargs): |
0df68c9f | 3521 | """ |
a95a7133 | 3522 | __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0, |
0df68c9f RD |
3523 | int orient=0) -> ScrollEvent |
3524 | """ | |
54f9ee45 | 3525 | newobj = _core_.new_ScrollEvent(*args, **kwargs) |
d14a1e28 RD |
3526 | self.this = newobj.this |
3527 | self.thisown = 1 | |
3528 | del newobj.thisown | |
e811c8ce | 3529 | def GetOrientation(*args, **kwargs): |
a95a7133 | 3530 | """GetOrientation(self) -> int""" |
54f9ee45 | 3531 | return _core_.ScrollEvent_GetOrientation(*args, **kwargs) |
e811c8ce RD |
3532 | |
3533 | def GetPosition(*args, **kwargs): | |
a95a7133 | 3534 | """GetPosition(self) -> int""" |
54f9ee45 | 3535 | return _core_.ScrollEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3536 | |
3537 | def SetOrientation(*args, **kwargs): | |
a95a7133 | 3538 | """SetOrientation(self, int orient)""" |
54f9ee45 | 3539 | return _core_.ScrollEvent_SetOrientation(*args, **kwargs) |
e811c8ce RD |
3540 | |
3541 | def SetPosition(*args, **kwargs): | |
a95a7133 | 3542 | """SetPosition(self, int pos)""" |
54f9ee45 | 3543 | return _core_.ScrollEvent_SetPosition(*args, **kwargs) |
e811c8ce | 3544 | |
d14a1e28 RD |
3545 | |
3546 | class ScrollEventPtr(ScrollEvent): | |
3547 | def __init__(self, this): | |
3548 | self.this = this | |
3549 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3550 | self.__class__ = ScrollEvent | |
54f9ee45 | 3551 | _core_.ScrollEvent_swigregister(ScrollEventPtr) |
d14a1e28 RD |
3552 | |
3553 | #--------------------------------------------------------------------------- | |
3554 | ||
3555 | class ScrollWinEvent(Event): | |
093d3ff1 | 3556 | """Proxy of C++ ScrollWinEvent class""" |
e811c8ce RD |
3557 | def __repr__(self): |
3558 | return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3559 | def __init__(self, *args, **kwargs): |
a95a7133 | 3560 | """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent""" |
54f9ee45 | 3561 | newobj = _core_.new_ScrollWinEvent(*args, **kwargs) |
d14a1e28 RD |
3562 | self.this = newobj.this |
3563 | self.thisown = 1 | |
3564 | del newobj.thisown | |
e811c8ce | 3565 | def GetOrientation(*args, **kwargs): |
a95a7133 | 3566 | """GetOrientation(self) -> int""" |
54f9ee45 | 3567 | return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs) |
e811c8ce RD |
3568 | |
3569 | def GetPosition(*args, **kwargs): | |
a95a7133 | 3570 | """GetPosition(self) -> int""" |
54f9ee45 | 3571 | return _core_.ScrollWinEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3572 | |
3573 | def SetOrientation(*args, **kwargs): | |
a95a7133 | 3574 | """SetOrientation(self, int orient)""" |
54f9ee45 | 3575 | return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs) |
e811c8ce RD |
3576 | |
3577 | def SetPosition(*args, **kwargs): | |
a95a7133 | 3578 | """SetPosition(self, int pos)""" |
54f9ee45 | 3579 | return _core_.ScrollWinEvent_SetPosition(*args, **kwargs) |
e811c8ce | 3580 | |
d14a1e28 RD |
3581 | |
3582 | class ScrollWinEventPtr(ScrollWinEvent): | |
3583 | def __init__(self, this): | |
3584 | self.this = this | |
3585 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3586 | self.__class__ = ScrollWinEvent | |
54f9ee45 | 3587 | _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr) |
d14a1e28 RD |
3588 | |
3589 | #--------------------------------------------------------------------------- | |
3590 | ||
54f9ee45 RD |
3591 | MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY |
3592 | MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE | |
3593 | MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT | |
3594 | MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE | |
3595 | MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT | |
d14a1e28 | 3596 | class MouseEvent(Event): |
093d3ff1 | 3597 | """Proxy of C++ MouseEvent class""" |
e811c8ce RD |
3598 | def __repr__(self): |
3599 | return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3600 | def __init__(self, *args, **kwargs): |
a95a7133 | 3601 | """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent""" |
54f9ee45 | 3602 | newobj = _core_.new_MouseEvent(*args, **kwargs) |
d14a1e28 RD |
3603 | self.this = newobj.this |
3604 | self.thisown = 1 | |
3605 | del newobj.thisown | |
e811c8ce | 3606 | def IsButton(*args, **kwargs): |
a95a7133 | 3607 | """IsButton(self) -> bool""" |
54f9ee45 | 3608 | return _core_.MouseEvent_IsButton(*args, **kwargs) |
e811c8ce RD |
3609 | |
3610 | def ButtonDown(*args, **kwargs): | |
a95a7133 | 3611 | """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool""" |
54f9ee45 | 3612 | return _core_.MouseEvent_ButtonDown(*args, **kwargs) |
e811c8ce RD |
3613 | |
3614 | def ButtonDClick(*args, **kwargs): | |
a95a7133 | 3615 | """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool""" |
54f9ee45 | 3616 | return _core_.MouseEvent_ButtonDClick(*args, **kwargs) |
e811c8ce RD |
3617 | |
3618 | def ButtonUp(*args, **kwargs): | |
a95a7133 | 3619 | """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool""" |
54f9ee45 | 3620 | return _core_.MouseEvent_ButtonUp(*args, **kwargs) |
e811c8ce RD |
3621 | |
3622 | def Button(*args, **kwargs): | |
a95a7133 | 3623 | """Button(self, int but) -> bool""" |
54f9ee45 | 3624 | return _core_.MouseEvent_Button(*args, **kwargs) |
e811c8ce RD |
3625 | |
3626 | def ButtonIsDown(*args, **kwargs): | |
a95a7133 | 3627 | """ButtonIsDown(self, int but) -> bool""" |
54f9ee45 | 3628 | return _core_.MouseEvent_ButtonIsDown(*args, **kwargs) |
e811c8ce RD |
3629 | |
3630 | def GetButton(*args, **kwargs): | |
a95a7133 | 3631 | """GetButton(self) -> int""" |
54f9ee45 | 3632 | return _core_.MouseEvent_GetButton(*args, **kwargs) |
e811c8ce RD |
3633 | |
3634 | def ControlDown(*args, **kwargs): | |
a95a7133 | 3635 | """ControlDown(self) -> bool""" |
54f9ee45 | 3636 | return _core_.MouseEvent_ControlDown(*args, **kwargs) |
e811c8ce RD |
3637 | |
3638 | def MetaDown(*args, **kwargs): | |
a95a7133 | 3639 | """MetaDown(self) -> bool""" |
54f9ee45 | 3640 | return _core_.MouseEvent_MetaDown(*args, **kwargs) |
e811c8ce RD |
3641 | |
3642 | def AltDown(*args, **kwargs): | |
a95a7133 | 3643 | """AltDown(self) -> bool""" |
54f9ee45 | 3644 | return _core_.MouseEvent_AltDown(*args, **kwargs) |
e811c8ce RD |
3645 | |
3646 | def ShiftDown(*args, **kwargs): | |
a95a7133 | 3647 | """ShiftDown(self) -> bool""" |
54f9ee45 | 3648 | return _core_.MouseEvent_ShiftDown(*args, **kwargs) |
e811c8ce | 3649 | |
412d302d RD |
3650 | def CmdDown(*args, **kwargs): |
3651 | """ | |
3652 | CmdDown(self) -> bool | |
3653 | ||
3654 | "Cmd" is a pseudo key which is the same as Control for PC and Unix | |
3655 | platforms but the special "Apple" (a.k.a as "Command") key on | |
3656 | Macs: it makes often sense to use it instead of, say, `ControlDown` | |
3657 | because Cmd key is used for the same thing under Mac as Ctrl | |
3658 | elsewhere. The Ctrl still exists, it's just not used for this | |
3659 | purpose. So for non-Mac platforms this is the same as `ControlDown` | |
3660 | and Macs this is the same as `MetaDown`. | |
3661 | """ | |
3662 | return _core_.MouseEvent_CmdDown(*args, **kwargs) | |
3663 | ||
e811c8ce | 3664 | def LeftDown(*args, **kwargs): |
a95a7133 | 3665 | """LeftDown(self) -> bool""" |
54f9ee45 | 3666 | return _core_.MouseEvent_LeftDown(*args, **kwargs) |
e811c8ce RD |
3667 | |
3668 | def MiddleDown(*args, **kwargs): | |
a95a7133 | 3669 | """MiddleDown(self) -> bool""" |
54f9ee45 | 3670 | return _core_.MouseEvent_MiddleDown(*args, **kwargs) |
e811c8ce RD |
3671 | |
3672 | def RightDown(*args, **kwargs): | |
a95a7133 | 3673 | """RightDown(self) -> bool""" |
54f9ee45 | 3674 | return _core_.MouseEvent_RightDown(*args, **kwargs) |
e811c8ce RD |
3675 | |
3676 | def LeftUp(*args, **kwargs): | |
a95a7133 | 3677 | """LeftUp(self) -> bool""" |
54f9ee45 | 3678 | return _core_.MouseEvent_LeftUp(*args, **kwargs) |
e811c8ce RD |
3679 | |
3680 | def MiddleUp(*args, **kwargs): | |
a95a7133 | 3681 | """MiddleUp(self) -> bool""" |
54f9ee45 | 3682 | return _core_.MouseEvent_MiddleUp(*args, **kwargs) |
e811c8ce RD |
3683 | |
3684 | def RightUp(*args, **kwargs): | |
a95a7133 | 3685 | """RightUp(self) -> bool""" |
54f9ee45 | 3686 | return _core_.MouseEvent_RightUp(*args, **kwargs) |
e811c8ce RD |
3687 | |
3688 | def LeftDClick(*args, **kwargs): | |
a95a7133 | 3689 | """LeftDClick(self) -> bool""" |
54f9ee45 | 3690 | return _core_.MouseEvent_LeftDClick(*args, **kwargs) |
e811c8ce RD |
3691 | |
3692 | def MiddleDClick(*args, **kwargs): | |
a95a7133 | 3693 | """MiddleDClick(self) -> bool""" |
54f9ee45 | 3694 | return _core_.MouseEvent_MiddleDClick(*args, **kwargs) |
e811c8ce RD |
3695 | |
3696 | def RightDClick(*args, **kwargs): | |
a95a7133 | 3697 | """RightDClick(self) -> bool""" |
54f9ee45 | 3698 | return _core_.MouseEvent_RightDClick(*args, **kwargs) |
e811c8ce RD |
3699 | |
3700 | def LeftIsDown(*args, **kwargs): | |
a95a7133 | 3701 | """LeftIsDown(self) -> bool""" |
54f9ee45 | 3702 | return _core_.MouseEvent_LeftIsDown(*args, **kwargs) |
e811c8ce RD |
3703 | |
3704 | def MiddleIsDown(*args, **kwargs): | |
a95a7133 | 3705 | """MiddleIsDown(self) -> bool""" |
54f9ee45 | 3706 | return _core_.MouseEvent_MiddleIsDown(*args, **kwargs) |
e811c8ce RD |
3707 | |
3708 | def RightIsDown(*args, **kwargs): | |
a95a7133 | 3709 | """RightIsDown(self) -> bool""" |
54f9ee45 | 3710 | return _core_.MouseEvent_RightIsDown(*args, **kwargs) |
e811c8ce RD |
3711 | |
3712 | def Dragging(*args, **kwargs): | |
a95a7133 | 3713 | """Dragging(self) -> bool""" |
54f9ee45 | 3714 | return _core_.MouseEvent_Dragging(*args, **kwargs) |
e811c8ce RD |
3715 | |
3716 | def Moving(*args, **kwargs): | |
a95a7133 | 3717 | """Moving(self) -> bool""" |
54f9ee45 | 3718 | return _core_.MouseEvent_Moving(*args, **kwargs) |
e811c8ce RD |
3719 | |
3720 | def Entering(*args, **kwargs): | |
a95a7133 | 3721 | """Entering(self) -> bool""" |
54f9ee45 | 3722 | return _core_.MouseEvent_Entering(*args, **kwargs) |
e811c8ce RD |
3723 | |
3724 | def Leaving(*args, **kwargs): | |
a95a7133 | 3725 | """Leaving(self) -> bool""" |
54f9ee45 | 3726 | return _core_.MouseEvent_Leaving(*args, **kwargs) |
e811c8ce RD |
3727 | |
3728 | def GetPosition(*args, **kwargs): | |
0df68c9f | 3729 | """ |
a95a7133 | 3730 | GetPosition(self) -> Point |
e811c8ce | 3731 | |
41e2b43e RD |
3732 | Returns the position of the mouse in window coordinates when the event |
3733 | happened. | |
0df68c9f | 3734 | """ |
54f9ee45 | 3735 | return _core_.MouseEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3736 | |
3737 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3738 | """ |
3739 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3740 | |
41e2b43e RD |
3741 | Returns the position of the mouse in window coordinates when the event |
3742 | happened. | |
0df68c9f | 3743 | """ |
54f9ee45 | 3744 | return _core_.MouseEvent_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
3745 | |
3746 | def GetLogicalPosition(*args, **kwargs): | |
a95a7133 | 3747 | """GetLogicalPosition(self, DC dc) -> Point""" |
54f9ee45 | 3748 | return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs) |
e811c8ce RD |
3749 | |
3750 | def GetX(*args, **kwargs): | |
a95a7133 | 3751 | """GetX(self) -> int""" |
54f9ee45 | 3752 | return _core_.MouseEvent_GetX(*args, **kwargs) |
e811c8ce RD |
3753 | |
3754 | def GetY(*args, **kwargs): | |
a95a7133 | 3755 | """GetY(self) -> int""" |
54f9ee45 | 3756 | return _core_.MouseEvent_GetY(*args, **kwargs) |
e811c8ce RD |
3757 | |
3758 | def GetWheelRotation(*args, **kwargs): | |
a95a7133 | 3759 | """GetWheelRotation(self) -> int""" |
54f9ee45 | 3760 | return _core_.MouseEvent_GetWheelRotation(*args, **kwargs) |
e811c8ce RD |
3761 | |
3762 | def GetWheelDelta(*args, **kwargs): | |
a95a7133 | 3763 | """GetWheelDelta(self) -> int""" |
54f9ee45 | 3764 | return _core_.MouseEvent_GetWheelDelta(*args, **kwargs) |
e811c8ce RD |
3765 | |
3766 | def GetLinesPerAction(*args, **kwargs): | |
a95a7133 | 3767 | """GetLinesPerAction(self) -> int""" |
54f9ee45 | 3768 | return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs) |
e811c8ce RD |
3769 | |
3770 | def IsPageScroll(*args, **kwargs): | |
a95a7133 | 3771 | """IsPageScroll(self) -> bool""" |
54f9ee45 RD |
3772 | return _core_.MouseEvent_IsPageScroll(*args, **kwargs) |
3773 | ||
3774 | m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set) | |
3775 | m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set) | |
3776 | m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set) | |
3777 | m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set) | |
3778 | m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set) | |
3779 | m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set) | |
3780 | m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set) | |
3781 | m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set) | |
3782 | m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set) | |
3783 | m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set) | |
3784 | m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set) | |
3785 | m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set) | |
d14a1e28 RD |
3786 | |
3787 | class MouseEventPtr(MouseEvent): | |
3788 | def __init__(self, this): | |
3789 | self.this = this | |
3790 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3791 | self.__class__ = MouseEvent | |
54f9ee45 | 3792 | _core_.MouseEvent_swigregister(MouseEventPtr) |
d14a1e28 RD |
3793 | |
3794 | #--------------------------------------------------------------------------- | |
3795 | ||
3796 | class SetCursorEvent(Event): | |
093d3ff1 | 3797 | """Proxy of C++ SetCursorEvent class""" |
e811c8ce RD |
3798 | def __repr__(self): |
3799 | return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3800 | def __init__(self, *args, **kwargs): |
a95a7133 | 3801 | """__init__(self, int x=0, int y=0) -> SetCursorEvent""" |
54f9ee45 | 3802 | newobj = _core_.new_SetCursorEvent(*args, **kwargs) |
d14a1e28 RD |
3803 | self.this = newobj.this |
3804 | self.thisown = 1 | |
3805 | del newobj.thisown | |
e811c8ce | 3806 | def GetX(*args, **kwargs): |
a95a7133 | 3807 | """GetX(self) -> int""" |
54f9ee45 | 3808 | return _core_.SetCursorEvent_GetX(*args, **kwargs) |
e811c8ce RD |
3809 | |
3810 | def GetY(*args, **kwargs): | |
a95a7133 | 3811 | """GetY(self) -> int""" |
54f9ee45 | 3812 | return _core_.SetCursorEvent_GetY(*args, **kwargs) |
e811c8ce RD |
3813 | |
3814 | def SetCursor(*args, **kwargs): | |
a95a7133 | 3815 | """SetCursor(self, Cursor cursor)""" |
54f9ee45 | 3816 | return _core_.SetCursorEvent_SetCursor(*args, **kwargs) |
e811c8ce RD |
3817 | |
3818 | def GetCursor(*args, **kwargs): | |
a95a7133 | 3819 | """GetCursor(self) -> Cursor""" |
54f9ee45 | 3820 | return _core_.SetCursorEvent_GetCursor(*args, **kwargs) |
e811c8ce RD |
3821 | |
3822 | def HasCursor(*args, **kwargs): | |
a95a7133 | 3823 | """HasCursor(self) -> bool""" |
54f9ee45 | 3824 | return _core_.SetCursorEvent_HasCursor(*args, **kwargs) |
e811c8ce | 3825 | |
d14a1e28 RD |
3826 | |
3827 | class SetCursorEventPtr(SetCursorEvent): | |
3828 | def __init__(self, this): | |
3829 | self.this = this | |
3830 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3831 | self.__class__ = SetCursorEvent | |
54f9ee45 | 3832 | _core_.SetCursorEvent_swigregister(SetCursorEventPtr) |
d14a1e28 RD |
3833 | |
3834 | #--------------------------------------------------------------------------- | |
3835 | ||
3836 | class KeyEvent(Event): | |
093d3ff1 | 3837 | """Proxy of C++ KeyEvent class""" |
e811c8ce RD |
3838 | def __repr__(self): |
3839 | return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3840 | def __init__(self, *args, **kwargs): |
a95a7133 | 3841 | """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent""" |
54f9ee45 | 3842 | newobj = _core_.new_KeyEvent(*args, **kwargs) |
d14a1e28 RD |
3843 | self.this = newobj.this |
3844 | self.thisown = 1 | |
3845 | del newobj.thisown | |
e811c8ce | 3846 | def ControlDown(*args, **kwargs): |
a95a7133 | 3847 | """ControlDown(self) -> bool""" |
54f9ee45 | 3848 | return _core_.KeyEvent_ControlDown(*args, **kwargs) |
e811c8ce RD |
3849 | |
3850 | def MetaDown(*args, **kwargs): | |
a95a7133 | 3851 | """MetaDown(self) -> bool""" |
54f9ee45 | 3852 | return _core_.KeyEvent_MetaDown(*args, **kwargs) |
e811c8ce RD |
3853 | |
3854 | def AltDown(*args, **kwargs): | |
a95a7133 | 3855 | """AltDown(self) -> bool""" |
54f9ee45 | 3856 | return _core_.KeyEvent_AltDown(*args, **kwargs) |
e811c8ce RD |
3857 | |
3858 | def ShiftDown(*args, **kwargs): | |
a95a7133 | 3859 | """ShiftDown(self) -> bool""" |
54f9ee45 | 3860 | return _core_.KeyEvent_ShiftDown(*args, **kwargs) |
e811c8ce | 3861 | |
412d302d RD |
3862 | def CmdDown(*args, **kwargs): |
3863 | """ | |
3864 | CmdDown(self) -> bool | |
3865 | ||
3866 | "Cmd" is a pseudo key which is the same as Control for PC and Unix | |
3867 | platforms but the special "Apple" (a.k.a as "Command") key on | |
3868 | Macs: it makes often sense to use it instead of, say, `ControlDown` | |
3869 | because Cmd key is used for the same thing under Mac as Ctrl | |
3870 | elsewhere. The Ctrl still exists, it's just not used for this | |
3871 | purpose. So for non-Mac platforms this is the same as `ControlDown` | |
3872 | and Macs this is the same as `MetaDown`. | |
3873 | """ | |
3874 | return _core_.KeyEvent_CmdDown(*args, **kwargs) | |
3875 | ||
e811c8ce | 3876 | def HasModifiers(*args, **kwargs): |
a95a7133 | 3877 | """HasModifiers(self) -> bool""" |
54f9ee45 | 3878 | return _core_.KeyEvent_HasModifiers(*args, **kwargs) |
e811c8ce RD |
3879 | |
3880 | def GetKeyCode(*args, **kwargs): | |
a95a7133 | 3881 | """GetKeyCode(self) -> int""" |
54f9ee45 | 3882 | return _core_.KeyEvent_GetKeyCode(*args, **kwargs) |
e811c8ce | 3883 | |
d14a1e28 | 3884 | KeyCode = GetKeyCode |
19272049 RD |
3885 | def GetUnicodeKey(*args, **kwargs): |
3886 | """GetUnicodeKey(self) -> int""" | |
3887 | return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs) | |
e811c8ce | 3888 | |
19272049 | 3889 | GetUniChar = GetUnicodeKey |
e811c8ce | 3890 | def GetRawKeyCode(*args, **kwargs): |
a95a7133 | 3891 | """GetRawKeyCode(self) -> unsigned int""" |
54f9ee45 | 3892 | return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs) |
e811c8ce RD |
3893 | |
3894 | def GetRawKeyFlags(*args, **kwargs): | |
a95a7133 | 3895 | """GetRawKeyFlags(self) -> unsigned int""" |
54f9ee45 | 3896 | return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs) |
e811c8ce RD |
3897 | |
3898 | def GetPosition(*args, **kwargs): | |
0df68c9f | 3899 | """ |
a95a7133 | 3900 | GetPosition(self) -> Point |
e811c8ce | 3901 | |
0df68c9f RD |
3902 | Find the position of the event. |
3903 | """ | |
54f9ee45 | 3904 | return _core_.KeyEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3905 | |
3906 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3907 | """ |
3908 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3909 | |
0df68c9f RD |
3910 | Find the position of the event. |
3911 | """ | |
54f9ee45 | 3912 | return _core_.KeyEvent_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
3913 | |
3914 | def GetX(*args, **kwargs): | |
a95a7133 | 3915 | """GetX(self) -> int""" |
54f9ee45 | 3916 | return _core_.KeyEvent_GetX(*args, **kwargs) |
e811c8ce RD |
3917 | |
3918 | def GetY(*args, **kwargs): | |
a95a7133 | 3919 | """GetY(self) -> int""" |
54f9ee45 RD |
3920 | return _core_.KeyEvent_GetY(*args, **kwargs) |
3921 | ||
3922 | m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set) | |
3923 | m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set) | |
3924 | m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set) | |
3925 | m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set) | |
3926 | m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set) | |
3927 | m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set) | |
3928 | m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set) | |
3929 | m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set) | |
3930 | m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set) | |
3931 | m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set) | |
d14a1e28 RD |
3932 | |
3933 | class KeyEventPtr(KeyEvent): | |
3934 | def __init__(self, this): | |
3935 | self.this = this | |
3936 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3937 | self.__class__ = KeyEvent | |
54f9ee45 | 3938 | _core_.KeyEvent_swigregister(KeyEventPtr) |
d14a1e28 RD |
3939 | |
3940 | #--------------------------------------------------------------------------- | |
3941 | ||
3942 | class SizeEvent(Event): | |
093d3ff1 | 3943 | """Proxy of C++ SizeEvent class""" |
e811c8ce RD |
3944 | def __repr__(self): |
3945 | return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3946 | def __init__(self, *args, **kwargs): |
a95a7133 | 3947 | """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent""" |
54f9ee45 | 3948 | newobj = _core_.new_SizeEvent(*args, **kwargs) |
d14a1e28 RD |
3949 | self.this = newobj.this |
3950 | self.thisown = 1 | |
3951 | del newobj.thisown | |
e811c8ce | 3952 | def GetSize(*args, **kwargs): |
a95a7133 | 3953 | """GetSize(self) -> Size""" |
54f9ee45 | 3954 | return _core_.SizeEvent_GetSize(*args, **kwargs) |
e811c8ce RD |
3955 | |
3956 | def GetRect(*args, **kwargs): | |
a95a7133 | 3957 | """GetRect(self) -> Rect""" |
54f9ee45 | 3958 | return _core_.SizeEvent_GetRect(*args, **kwargs) |
e811c8ce RD |
3959 | |
3960 | def SetRect(*args, **kwargs): | |
a95a7133 | 3961 | """SetRect(self, Rect rect)""" |
54f9ee45 | 3962 | return _core_.SizeEvent_SetRect(*args, **kwargs) |
e811c8ce RD |
3963 | |
3964 | def SetSize(*args, **kwargs): | |
a95a7133 | 3965 | """SetSize(self, Size size)""" |
54f9ee45 | 3966 | return _core_.SizeEvent_SetSize(*args, **kwargs) |
e811c8ce | 3967 | |
54f9ee45 RD |
3968 | m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set) |
3969 | m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set) | |
d14a1e28 RD |
3970 | |
3971 | class SizeEventPtr(SizeEvent): | |
3972 | def __init__(self, this): | |
3973 | self.this = this | |
3974 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3975 | self.__class__ = SizeEvent | |
54f9ee45 | 3976 | _core_.SizeEvent_swigregister(SizeEventPtr) |
d14a1e28 RD |
3977 | |
3978 | #--------------------------------------------------------------------------- | |
3979 | ||
3980 | class MoveEvent(Event): | |
093d3ff1 | 3981 | """Proxy of C++ MoveEvent class""" |
e811c8ce RD |
3982 | def __repr__(self): |
3983 | return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3984 | def __init__(self, *args, **kwargs): |
a95a7133 | 3985 | """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent""" |
54f9ee45 | 3986 | newobj = _core_.new_MoveEvent(*args, **kwargs) |
d14a1e28 RD |
3987 | self.this = newobj.this |
3988 | self.thisown = 1 | |
3989 | del newobj.thisown | |
e811c8ce | 3990 | def GetPosition(*args, **kwargs): |
a95a7133 | 3991 | """GetPosition(self) -> Point""" |
54f9ee45 | 3992 | return _core_.MoveEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3993 | |
3994 | def GetRect(*args, **kwargs): | |
a95a7133 | 3995 | """GetRect(self) -> Rect""" |
54f9ee45 | 3996 | return _core_.MoveEvent_GetRect(*args, **kwargs) |
e811c8ce RD |
3997 | |
3998 | def SetRect(*args, **kwargs): | |
a95a7133 | 3999 | """SetRect(self, Rect rect)""" |
54f9ee45 | 4000 | return _core_.MoveEvent_SetRect(*args, **kwargs) |
e811c8ce RD |
4001 | |
4002 | def SetPosition(*args, **kwargs): | |
a95a7133 | 4003 | """SetPosition(self, Point pos)""" |
54f9ee45 | 4004 | return _core_.MoveEvent_SetPosition(*args, **kwargs) |
e811c8ce | 4005 | |
7557b9b5 RD |
4006 | m_pos = property(GetPosition, SetPosition) |
4007 | m_rect = property(GetRect, SetRect) | |
4008 | ||
d14a1e28 RD |
4009 | |
4010 | class MoveEventPtr(MoveEvent): | |
4011 | def __init__(self, this): | |
4012 | self.this = this | |
4013 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4014 | self.__class__ = MoveEvent | |
54f9ee45 | 4015 | _core_.MoveEvent_swigregister(MoveEventPtr) |
d14a1e28 RD |
4016 | |
4017 | #--------------------------------------------------------------------------- | |
4018 | ||
4019 | class PaintEvent(Event): | |
093d3ff1 | 4020 | """Proxy of C++ PaintEvent class""" |
e811c8ce RD |
4021 | def __repr__(self): |
4022 | return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4023 | def __init__(self, *args, **kwargs): |
a95a7133 | 4024 | """__init__(self, int Id=0) -> PaintEvent""" |
54f9ee45 | 4025 | newobj = _core_.new_PaintEvent(*args, **kwargs) |
d14a1e28 RD |
4026 | self.this = newobj.this |
4027 | self.thisown = 1 | |
4028 | del newobj.thisown | |
d14a1e28 RD |
4029 | |
4030 | class PaintEventPtr(PaintEvent): | |
4031 | def __init__(self, this): | |
4032 | self.this = this | |
4033 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4034 | self.__class__ = PaintEvent | |
54f9ee45 | 4035 | _core_.PaintEvent_swigregister(PaintEventPtr) |
d14a1e28 RD |
4036 | |
4037 | class NcPaintEvent(Event): | |
093d3ff1 | 4038 | """Proxy of C++ NcPaintEvent class""" |
e811c8ce RD |
4039 | def __repr__(self): |
4040 | return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4041 | def __init__(self, *args, **kwargs): |
a95a7133 | 4042 | """__init__(self, int winid=0) -> NcPaintEvent""" |
54f9ee45 | 4043 | newobj = _core_.new_NcPaintEvent(*args, **kwargs) |
d14a1e28 RD |
4044 | self.this = newobj.this |
4045 | self.thisown = 1 | |
4046 | del newobj.thisown | |
d14a1e28 RD |
4047 | |
4048 | class NcPaintEventPtr(NcPaintEvent): | |
4049 | def __init__(self, this): | |
4050 | self.this = this | |
4051 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4052 | self.__class__ = NcPaintEvent | |
54f9ee45 | 4053 | _core_.NcPaintEvent_swigregister(NcPaintEventPtr) |
d14a1e28 RD |
4054 | |
4055 | #--------------------------------------------------------------------------- | |
4056 | ||
4057 | class EraseEvent(Event): | |
093d3ff1 | 4058 | """Proxy of C++ EraseEvent class""" |
e811c8ce RD |
4059 | def __repr__(self): |
4060 | return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4061 | def __init__(self, *args, **kwargs): |
a95a7133 | 4062 | """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent""" |
54f9ee45 | 4063 | newobj = _core_.new_EraseEvent(*args, **kwargs) |
d14a1e28 RD |
4064 | self.this = newobj.this |
4065 | self.thisown = 1 | |
4066 | del newobj.thisown | |
e811c8ce | 4067 | def GetDC(*args, **kwargs): |
a95a7133 | 4068 | """GetDC(self) -> DC""" |
54f9ee45 | 4069 | return _core_.EraseEvent_GetDC(*args, **kwargs) |
e811c8ce | 4070 | |
d14a1e28 RD |
4071 | |
4072 | class EraseEventPtr(EraseEvent): | |
4073 | def __init__(self, this): | |
4074 | self.this = this | |
4075 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4076 | self.__class__ = EraseEvent | |
54f9ee45 | 4077 | _core_.EraseEvent_swigregister(EraseEventPtr) |
d14a1e28 RD |
4078 | |
4079 | #--------------------------------------------------------------------------- | |
4080 | ||
4081 | class FocusEvent(Event): | |
093d3ff1 | 4082 | """Proxy of C++ FocusEvent class""" |
e811c8ce RD |
4083 | def __repr__(self): |
4084 | return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4085 | def __init__(self, *args, **kwargs): |
a95a7133 | 4086 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent""" |
54f9ee45 | 4087 | newobj = _core_.new_FocusEvent(*args, **kwargs) |
d14a1e28 RD |
4088 | self.this = newobj.this |
4089 | self.thisown = 1 | |
4090 | del newobj.thisown | |
e811c8ce | 4091 | def GetWindow(*args, **kwargs): |
a95a7133 | 4092 | """GetWindow(self) -> Window""" |
54f9ee45 | 4093 | return _core_.FocusEvent_GetWindow(*args, **kwargs) |
e811c8ce RD |
4094 | |
4095 | def SetWindow(*args, **kwargs): | |
a95a7133 | 4096 | """SetWindow(self, Window win)""" |
54f9ee45 | 4097 | return _core_.FocusEvent_SetWindow(*args, **kwargs) |
e811c8ce | 4098 | |
d14a1e28 RD |
4099 | |
4100 | class FocusEventPtr(FocusEvent): | |
4101 | def __init__(self, this): | |
4102 | self.this = this | |
4103 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4104 | self.__class__ = FocusEvent | |
54f9ee45 | 4105 | _core_.FocusEvent_swigregister(FocusEventPtr) |
d14a1e28 RD |
4106 | |
4107 | #--------------------------------------------------------------------------- | |
4108 | ||
4109 | class ChildFocusEvent(CommandEvent): | |
093d3ff1 | 4110 | """Proxy of C++ ChildFocusEvent class""" |
e811c8ce RD |
4111 | def __repr__(self): |
4112 | return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4113 | def __init__(self, *args, **kwargs): |
a95a7133 | 4114 | """__init__(self, Window win=None) -> ChildFocusEvent""" |
54f9ee45 | 4115 | newobj = _core_.new_ChildFocusEvent(*args, **kwargs) |
d14a1e28 RD |
4116 | self.this = newobj.this |
4117 | self.thisown = 1 | |
4118 | del newobj.thisown | |
e811c8ce | 4119 | def GetWindow(*args, **kwargs): |
a95a7133 | 4120 | """GetWindow(self) -> Window""" |
54f9ee45 | 4121 | return _core_.ChildFocusEvent_GetWindow(*args, **kwargs) |
e811c8ce | 4122 | |
d14a1e28 RD |
4123 | |
4124 | class ChildFocusEventPtr(ChildFocusEvent): | |
4125 | def __init__(self, this): | |
4126 | self.this = this | |
4127 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4128 | self.__class__ = ChildFocusEvent | |
54f9ee45 | 4129 | _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr) |
d14a1e28 RD |
4130 | |
4131 | #--------------------------------------------------------------------------- | |
4132 | ||
4133 | class ActivateEvent(Event): | |
093d3ff1 | 4134 | """Proxy of C++ ActivateEvent class""" |
e811c8ce RD |
4135 | def __repr__(self): |
4136 | return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4137 | def __init__(self, *args, **kwargs): |
a95a7133 | 4138 | """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent""" |
54f9ee45 | 4139 | newobj = _core_.new_ActivateEvent(*args, **kwargs) |
d14a1e28 RD |
4140 | self.this = newobj.this |
4141 | self.thisown = 1 | |
4142 | del newobj.thisown | |
e811c8ce | 4143 | def GetActive(*args, **kwargs): |
a95a7133 | 4144 | """GetActive(self) -> bool""" |
54f9ee45 | 4145 | return _core_.ActivateEvent_GetActive(*args, **kwargs) |
e811c8ce | 4146 | |
d14a1e28 RD |
4147 | |
4148 | class ActivateEventPtr(ActivateEvent): | |
4149 | def __init__(self, this): | |
4150 | self.this = this | |
4151 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4152 | self.__class__ = ActivateEvent | |
54f9ee45 | 4153 | _core_.ActivateEvent_swigregister(ActivateEventPtr) |
d14a1e28 RD |
4154 | |
4155 | #--------------------------------------------------------------------------- | |
4156 | ||
4157 | class InitDialogEvent(Event): | |
093d3ff1 | 4158 | """Proxy of C++ InitDialogEvent class""" |
e811c8ce RD |
4159 | def __repr__(self): |
4160 | return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4161 | def __init__(self, *args, **kwargs): |
a95a7133 | 4162 | """__init__(self, int Id=0) -> InitDialogEvent""" |
54f9ee45 | 4163 | newobj = _core_.new_InitDialogEvent(*args, **kwargs) |
d14a1e28 RD |
4164 | self.this = newobj.this |
4165 | self.thisown = 1 | |
4166 | del newobj.thisown | |
d14a1e28 RD |
4167 | |
4168 | class InitDialogEventPtr(InitDialogEvent): | |
4169 | def __init__(self, this): | |
4170 | self.this = this | |
4171 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4172 | self.__class__ = InitDialogEvent | |
54f9ee45 | 4173 | _core_.InitDialogEvent_swigregister(InitDialogEventPtr) |
d14a1e28 RD |
4174 | |
4175 | #--------------------------------------------------------------------------- | |
4176 | ||
4177 | class MenuEvent(Event): | |
093d3ff1 | 4178 | """Proxy of C++ MenuEvent class""" |
e811c8ce RD |
4179 | def __repr__(self): |
4180 | return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4181 | def __init__(self, *args, **kwargs): |
a95a7133 | 4182 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent""" |
54f9ee45 | 4183 | newobj = _core_.new_MenuEvent(*args, **kwargs) |
d14a1e28 RD |
4184 | self.this = newobj.this |
4185 | self.thisown = 1 | |
4186 | del newobj.thisown | |
e811c8ce | 4187 | def GetMenuId(*args, **kwargs): |
a95a7133 | 4188 | """GetMenuId(self) -> int""" |
54f9ee45 | 4189 | return _core_.MenuEvent_GetMenuId(*args, **kwargs) |
e811c8ce RD |
4190 | |
4191 | def IsPopup(*args, **kwargs): | |
a95a7133 | 4192 | """IsPopup(self) -> bool""" |
54f9ee45 | 4193 | return _core_.MenuEvent_IsPopup(*args, **kwargs) |
e811c8ce RD |
4194 | |
4195 | def GetMenu(*args, **kwargs): | |
a95a7133 | 4196 | """GetMenu(self) -> Menu""" |
54f9ee45 | 4197 | return _core_.MenuEvent_GetMenu(*args, **kwargs) |
e811c8ce | 4198 | |
d14a1e28 RD |
4199 | |
4200 | class MenuEventPtr(MenuEvent): | |
4201 | def __init__(self, this): | |
4202 | self.this = this | |
4203 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4204 | self.__class__ = MenuEvent | |
54f9ee45 | 4205 | _core_.MenuEvent_swigregister(MenuEventPtr) |
d14a1e28 RD |
4206 | |
4207 | #--------------------------------------------------------------------------- | |
4208 | ||
4209 | class CloseEvent(Event): | |
093d3ff1 | 4210 | """Proxy of C++ CloseEvent class""" |
e811c8ce RD |
4211 | def __repr__(self): |
4212 | return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4213 | def __init__(self, *args, **kwargs): |
a95a7133 | 4214 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent""" |
54f9ee45 | 4215 | newobj = _core_.new_CloseEvent(*args, **kwargs) |
d14a1e28 RD |
4216 | self.this = newobj.this |
4217 | self.thisown = 1 | |
4218 | del newobj.thisown | |
e811c8ce | 4219 | def SetLoggingOff(*args, **kwargs): |
a95a7133 | 4220 | """SetLoggingOff(self, bool logOff)""" |
54f9ee45 | 4221 | return _core_.CloseEvent_SetLoggingOff(*args, **kwargs) |
e811c8ce RD |
4222 | |
4223 | def GetLoggingOff(*args, **kwargs): | |
a95a7133 | 4224 | """GetLoggingOff(self) -> bool""" |
54f9ee45 | 4225 | return _core_.CloseEvent_GetLoggingOff(*args, **kwargs) |
e811c8ce RD |
4226 | |
4227 | def Veto(*args, **kwargs): | |
a95a7133 | 4228 | """Veto(self, bool veto=True)""" |
54f9ee45 | 4229 | return _core_.CloseEvent_Veto(*args, **kwargs) |
e811c8ce RD |
4230 | |
4231 | def SetCanVeto(*args, **kwargs): | |
a95a7133 | 4232 | """SetCanVeto(self, bool canVeto)""" |
54f9ee45 | 4233 | return _core_.CloseEvent_SetCanVeto(*args, **kwargs) |
e811c8ce RD |
4234 | |
4235 | def CanVeto(*args, **kwargs): | |
a95a7133 | 4236 | """CanVeto(self) -> bool""" |
54f9ee45 | 4237 | return _core_.CloseEvent_CanVeto(*args, **kwargs) |
e811c8ce RD |
4238 | |
4239 | def GetVeto(*args, **kwargs): | |
a95a7133 | 4240 | """GetVeto(self) -> bool""" |
54f9ee45 | 4241 | return _core_.CloseEvent_GetVeto(*args, **kwargs) |
e811c8ce | 4242 | |
d14a1e28 RD |
4243 | |
4244 | class CloseEventPtr(CloseEvent): | |
4245 | def __init__(self, this): | |
4246 | self.this = this | |
4247 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4248 | self.__class__ = CloseEvent | |
54f9ee45 | 4249 | _core_.CloseEvent_swigregister(CloseEventPtr) |
d14a1e28 RD |
4250 | |
4251 | #--------------------------------------------------------------------------- | |
4252 | ||
4253 | class ShowEvent(Event): | |
093d3ff1 | 4254 | """Proxy of C++ ShowEvent class""" |
e811c8ce RD |
4255 | def __repr__(self): |
4256 | return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4257 | def __init__(self, *args, **kwargs): |
a95a7133 | 4258 | """__init__(self, int winid=0, bool show=False) -> ShowEvent""" |
54f9ee45 | 4259 | newobj = _core_.new_ShowEvent(*args, **kwargs) |
d14a1e28 RD |
4260 | self.this = newobj.this |
4261 | self.thisown = 1 | |
4262 | del newobj.thisown | |
e811c8ce | 4263 | def SetShow(*args, **kwargs): |
a95a7133 | 4264 | """SetShow(self, bool show)""" |
54f9ee45 | 4265 | return _core_.ShowEvent_SetShow(*args, **kwargs) |
e811c8ce RD |
4266 | |
4267 | def GetShow(*args, **kwargs): | |
a95a7133 | 4268 | """GetShow(self) -> bool""" |
54f9ee45 | 4269 | return _core_.ShowEvent_GetShow(*args, **kwargs) |
e811c8ce | 4270 | |
d14a1e28 RD |
4271 | |
4272 | class ShowEventPtr(ShowEvent): | |
4273 | def __init__(self, this): | |
4274 | self.this = this | |
4275 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4276 | self.__class__ = ShowEvent | |
54f9ee45 | 4277 | _core_.ShowEvent_swigregister(ShowEventPtr) |
d14a1e28 RD |
4278 | |
4279 | #--------------------------------------------------------------------------- | |
4280 | ||
4281 | class IconizeEvent(Event): | |
093d3ff1 | 4282 | """Proxy of C++ IconizeEvent class""" |
e811c8ce RD |
4283 | def __repr__(self): |
4284 | return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4285 | def __init__(self, *args, **kwargs): |
a95a7133 | 4286 | """__init__(self, int id=0, bool iconized=True) -> IconizeEvent""" |
54f9ee45 | 4287 | newobj = _core_.new_IconizeEvent(*args, **kwargs) |
d14a1e28 RD |
4288 | self.this = newobj.this |
4289 | self.thisown = 1 | |
4290 | del newobj.thisown | |
e811c8ce | 4291 | def Iconized(*args, **kwargs): |
a95a7133 | 4292 | """Iconized(self) -> bool""" |
54f9ee45 | 4293 | return _core_.IconizeEvent_Iconized(*args, **kwargs) |
e811c8ce | 4294 | |
d14a1e28 RD |
4295 | |
4296 | class IconizeEventPtr(IconizeEvent): | |
4297 | def __init__(self, this): | |
4298 | self.this = this | |
4299 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4300 | self.__class__ = IconizeEvent | |
54f9ee45 | 4301 | _core_.IconizeEvent_swigregister(IconizeEventPtr) |
d14a1e28 RD |
4302 | |
4303 | #--------------------------------------------------------------------------- | |
4304 | ||
4305 | class MaximizeEvent(Event): | |
093d3ff1 | 4306 | """Proxy of C++ MaximizeEvent class""" |
e811c8ce RD |
4307 | def __repr__(self): |
4308 | return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4309 | def __init__(self, *args, **kwargs): |
a95a7133 | 4310 | """__init__(self, int id=0) -> MaximizeEvent""" |
54f9ee45 | 4311 | newobj = _core_.new_MaximizeEvent(*args, **kwargs) |
d14a1e28 RD |
4312 | self.this = newobj.this |
4313 | self.thisown = 1 | |
4314 | del newobj.thisown | |
d14a1e28 RD |
4315 | |
4316 | class MaximizeEventPtr(MaximizeEvent): | |
4317 | def __init__(self, this): | |
4318 | self.this = this | |
4319 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4320 | self.__class__ = MaximizeEvent | |
54f9ee45 | 4321 | _core_.MaximizeEvent_swigregister(MaximizeEventPtr) |
d14a1e28 RD |
4322 | |
4323 | #--------------------------------------------------------------------------- | |
4324 | ||
4325 | class DropFilesEvent(Event): | |
093d3ff1 | 4326 | """Proxy of C++ DropFilesEvent class""" |
d14a1e28 RD |
4327 | def __init__(self): raise RuntimeError, "No constructor defined" |
4328 | def __repr__(self): | |
4329 | return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 4330 | def GetPosition(*args, **kwargs): |
a95a7133 | 4331 | """GetPosition(self) -> Point""" |
54f9ee45 | 4332 | return _core_.DropFilesEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4333 | |
4334 | def GetNumberOfFiles(*args, **kwargs): | |
a95a7133 | 4335 | """GetNumberOfFiles(self) -> int""" |
54f9ee45 | 4336 | return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs) |
e811c8ce RD |
4337 | |
4338 | def GetFiles(*args, **kwargs): | |
a95a7133 | 4339 | """GetFiles(self) -> PyObject""" |
54f9ee45 | 4340 | return _core_.DropFilesEvent_GetFiles(*args, **kwargs) |
e811c8ce | 4341 | |
d14a1e28 RD |
4342 | |
4343 | class DropFilesEventPtr(DropFilesEvent): | |
4344 | def __init__(self, this): | |
4345 | self.this = this | |
4346 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4347 | self.__class__ = DropFilesEvent | |
54f9ee45 | 4348 | _core_.DropFilesEvent_swigregister(DropFilesEventPtr) |
d14a1e28 RD |
4349 | |
4350 | #--------------------------------------------------------------------------- | |
4351 | ||
54f9ee45 RD |
4352 | UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL |
4353 | UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED | |
d14a1e28 | 4354 | class UpdateUIEvent(CommandEvent): |
093d3ff1 | 4355 | """Proxy of C++ UpdateUIEvent class""" |
e811c8ce RD |
4356 | def __repr__(self): |
4357 | return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4358 | def __init__(self, *args, **kwargs): |
a95a7133 | 4359 | """__init__(self, int commandId=0) -> UpdateUIEvent""" |
54f9ee45 | 4360 | newobj = _core_.new_UpdateUIEvent(*args, **kwargs) |
d14a1e28 RD |
4361 | self.this = newobj.this |
4362 | self.thisown = 1 | |
4363 | del newobj.thisown | |
e811c8ce | 4364 | def GetChecked(*args, **kwargs): |
a95a7133 | 4365 | """GetChecked(self) -> bool""" |
54f9ee45 | 4366 | return _core_.UpdateUIEvent_GetChecked(*args, **kwargs) |
e811c8ce RD |
4367 | |
4368 | def GetEnabled(*args, **kwargs): | |
a95a7133 | 4369 | """GetEnabled(self) -> bool""" |
54f9ee45 | 4370 | return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs) |
e811c8ce RD |
4371 | |
4372 | def GetText(*args, **kwargs): | |
a95a7133 | 4373 | """GetText(self) -> String""" |
54f9ee45 | 4374 | return _core_.UpdateUIEvent_GetText(*args, **kwargs) |
e811c8ce RD |
4375 | |
4376 | def GetSetText(*args, **kwargs): | |
a95a7133 | 4377 | """GetSetText(self) -> bool""" |
54f9ee45 | 4378 | return _core_.UpdateUIEvent_GetSetText(*args, **kwargs) |
e811c8ce RD |
4379 | |
4380 | def GetSetChecked(*args, **kwargs): | |
a95a7133 | 4381 | """GetSetChecked(self) -> bool""" |
54f9ee45 | 4382 | return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs) |
e811c8ce RD |
4383 | |
4384 | def GetSetEnabled(*args, **kwargs): | |
a95a7133 | 4385 | """GetSetEnabled(self) -> bool""" |
54f9ee45 | 4386 | return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs) |
e811c8ce RD |
4387 | |
4388 | def Check(*args, **kwargs): | |
a95a7133 | 4389 | """Check(self, bool check)""" |
54f9ee45 | 4390 | return _core_.UpdateUIEvent_Check(*args, **kwargs) |
e811c8ce RD |
4391 | |
4392 | def Enable(*args, **kwargs): | |
a95a7133 | 4393 | """Enable(self, bool enable)""" |
54f9ee45 | 4394 | return _core_.UpdateUIEvent_Enable(*args, **kwargs) |
e811c8ce RD |
4395 | |
4396 | def SetText(*args, **kwargs): | |
a95a7133 | 4397 | """SetText(self, String text)""" |
54f9ee45 | 4398 | return _core_.UpdateUIEvent_SetText(*args, **kwargs) |
e811c8ce RD |
4399 | |
4400 | def SetUpdateInterval(*args, **kwargs): | |
66c033b4 | 4401 | """SetUpdateInterval(long updateInterval)""" |
54f9ee45 | 4402 | return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) |
e811c8ce RD |
4403 | |
4404 | SetUpdateInterval = staticmethod(SetUpdateInterval) | |
4405 | def GetUpdateInterval(*args, **kwargs): | |
66c033b4 | 4406 | """GetUpdateInterval() -> long""" |
54f9ee45 | 4407 | return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) |
e811c8ce RD |
4408 | |
4409 | GetUpdateInterval = staticmethod(GetUpdateInterval) | |
4410 | def CanUpdate(*args, **kwargs): | |
66c033b4 | 4411 | """CanUpdate(Window win) -> bool""" |
54f9ee45 | 4412 | return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) |
e811c8ce RD |
4413 | |
4414 | CanUpdate = staticmethod(CanUpdate) | |
4415 | def ResetUpdateTime(*args, **kwargs): | |
66c033b4 | 4416 | """ResetUpdateTime()""" |
54f9ee45 | 4417 | return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) |
e811c8ce RD |
4418 | |
4419 | ResetUpdateTime = staticmethod(ResetUpdateTime) | |
4420 | def SetMode(*args, **kwargs): | |
66c033b4 | 4421 | """SetMode(int mode)""" |
54f9ee45 | 4422 | return _core_.UpdateUIEvent_SetMode(*args, **kwargs) |
e811c8ce RD |
4423 | |
4424 | SetMode = staticmethod(SetMode) | |
4425 | def GetMode(*args, **kwargs): | |
66c033b4 | 4426 | """GetMode() -> int""" |
54f9ee45 | 4427 | return _core_.UpdateUIEvent_GetMode(*args, **kwargs) |
e811c8ce RD |
4428 | |
4429 | GetMode = staticmethod(GetMode) | |
d14a1e28 RD |
4430 | |
4431 | class UpdateUIEventPtr(UpdateUIEvent): | |
4432 | def __init__(self, this): | |
4433 | self.this = this | |
4434 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4435 | self.__class__ = UpdateUIEvent | |
54f9ee45 | 4436 | _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr) |
d14a1e28 | 4437 | |
e811c8ce RD |
4438 | def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): |
4439 | """UpdateUIEvent_SetUpdateInterval(long updateInterval)""" | |
54f9ee45 | 4440 | return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) |
d14a1e28 | 4441 | |
e811c8ce RD |
4442 | def UpdateUIEvent_GetUpdateInterval(*args, **kwargs): |
4443 | """UpdateUIEvent_GetUpdateInterval() -> long""" | |
54f9ee45 | 4444 | return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) |
d14a1e28 | 4445 | |
e811c8ce RD |
4446 | def UpdateUIEvent_CanUpdate(*args, **kwargs): |
4447 | """UpdateUIEvent_CanUpdate(Window win) -> bool""" | |
54f9ee45 | 4448 | return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) |
d14a1e28 | 4449 | |
e811c8ce RD |
4450 | def UpdateUIEvent_ResetUpdateTime(*args, **kwargs): |
4451 | """UpdateUIEvent_ResetUpdateTime()""" | |
54f9ee45 | 4452 | return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) |
d14a1e28 | 4453 | |
e811c8ce | 4454 | def UpdateUIEvent_SetMode(*args, **kwargs): |
196addbf | 4455 | """UpdateUIEvent_SetMode(int mode)""" |
54f9ee45 | 4456 | return _core_.UpdateUIEvent_SetMode(*args, **kwargs) |
d14a1e28 | 4457 | |
e811c8ce | 4458 | def UpdateUIEvent_GetMode(*args, **kwargs): |
196addbf | 4459 | """UpdateUIEvent_GetMode() -> int""" |
54f9ee45 | 4460 | return _core_.UpdateUIEvent_GetMode(*args, **kwargs) |
d14a1e28 RD |
4461 | |
4462 | #--------------------------------------------------------------------------- | |
4463 | ||
4464 | class SysColourChangedEvent(Event): | |
093d3ff1 | 4465 | """Proxy of C++ SysColourChangedEvent class""" |
e811c8ce RD |
4466 | def __repr__(self): |
4467 | return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4468 | def __init__(self, *args, **kwargs): |
a95a7133 | 4469 | """__init__(self) -> SysColourChangedEvent""" |
54f9ee45 | 4470 | newobj = _core_.new_SysColourChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4471 | self.this = newobj.this |
4472 | self.thisown = 1 | |
4473 | del newobj.thisown | |
d14a1e28 RD |
4474 | |
4475 | class SysColourChangedEventPtr(SysColourChangedEvent): | |
4476 | def __init__(self, this): | |
4477 | self.this = this | |
4478 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4479 | self.__class__ = SysColourChangedEvent | |
54f9ee45 | 4480 | _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr) |
d14a1e28 RD |
4481 | |
4482 | #--------------------------------------------------------------------------- | |
4483 | ||
4484 | class MouseCaptureChangedEvent(Event): | |
093d3ff1 | 4485 | """Proxy of C++ MouseCaptureChangedEvent class""" |
e811c8ce RD |
4486 | def __repr__(self): |
4487 | return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4488 | def __init__(self, *args, **kwargs): |
a95a7133 | 4489 | """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent""" |
54f9ee45 | 4490 | newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4491 | self.this = newobj.this |
4492 | self.thisown = 1 | |
4493 | del newobj.thisown | |
e811c8ce | 4494 | def GetCapturedWindow(*args, **kwargs): |
a95a7133 | 4495 | """GetCapturedWindow(self) -> Window""" |
54f9ee45 | 4496 | return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs) |
e811c8ce | 4497 | |
d14a1e28 RD |
4498 | |
4499 | class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent): | |
4500 | def __init__(self, this): | |
4501 | self.this = this | |
4502 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4503 | self.__class__ = MouseCaptureChangedEvent | |
54f9ee45 | 4504 | _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr) |
d14a1e28 RD |
4505 | |
4506 | #--------------------------------------------------------------------------- | |
4507 | ||
4508 | class DisplayChangedEvent(Event): | |
093d3ff1 | 4509 | """Proxy of C++ DisplayChangedEvent class""" |
e811c8ce RD |
4510 | def __repr__(self): |
4511 | return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4512 | def __init__(self, *args, **kwargs): |
a95a7133 | 4513 | """__init__(self) -> DisplayChangedEvent""" |
54f9ee45 | 4514 | newobj = _core_.new_DisplayChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4515 | self.this = newobj.this |
4516 | self.thisown = 1 | |
4517 | del newobj.thisown | |
d14a1e28 RD |
4518 | |
4519 | class DisplayChangedEventPtr(DisplayChangedEvent): | |
4520 | def __init__(self, this): | |
4521 | self.this = this | |
4522 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4523 | self.__class__ = DisplayChangedEvent | |
54f9ee45 | 4524 | _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr) |
d14a1e28 RD |
4525 | |
4526 | #--------------------------------------------------------------------------- | |
4527 | ||
4528 | class PaletteChangedEvent(Event): | |
093d3ff1 | 4529 | """Proxy of C++ PaletteChangedEvent class""" |
e811c8ce RD |
4530 | def __repr__(self): |
4531 | return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4532 | def __init__(self, *args, **kwargs): |
a95a7133 | 4533 | """__init__(self, int id=0) -> PaletteChangedEvent""" |
54f9ee45 | 4534 | newobj = _core_.new_PaletteChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4535 | self.this = newobj.this |
4536 | self.thisown = 1 | |
4537 | del newobj.thisown | |
e811c8ce | 4538 | def SetChangedWindow(*args, **kwargs): |
a95a7133 | 4539 | """SetChangedWindow(self, Window win)""" |
54f9ee45 | 4540 | return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs) |
e811c8ce RD |
4541 | |
4542 | def GetChangedWindow(*args, **kwargs): | |
a95a7133 | 4543 | """GetChangedWindow(self) -> Window""" |
54f9ee45 | 4544 | return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs) |
e811c8ce | 4545 | |
d14a1e28 RD |
4546 | |
4547 | class PaletteChangedEventPtr(PaletteChangedEvent): | |
4548 | def __init__(self, this): | |
4549 | self.this = this | |
4550 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4551 | self.__class__ = PaletteChangedEvent | |
54f9ee45 | 4552 | _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr) |
d14a1e28 RD |
4553 | |
4554 | #--------------------------------------------------------------------------- | |
4555 | ||
4556 | class QueryNewPaletteEvent(Event): | |
093d3ff1 | 4557 | """Proxy of C++ QueryNewPaletteEvent class""" |
e811c8ce RD |
4558 | def __repr__(self): |
4559 | return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4560 | def __init__(self, *args, **kwargs): |
a95a7133 | 4561 | """__init__(self, int winid=0) -> QueryNewPaletteEvent""" |
54f9ee45 | 4562 | newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs) |
d14a1e28 RD |
4563 | self.this = newobj.this |
4564 | self.thisown = 1 | |
4565 | del newobj.thisown | |
e811c8ce | 4566 | def SetPaletteRealized(*args, **kwargs): |
a95a7133 | 4567 | """SetPaletteRealized(self, bool realized)""" |
54f9ee45 | 4568 | return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs) |
e811c8ce RD |
4569 | |
4570 | def GetPaletteRealized(*args, **kwargs): | |
a95a7133 | 4571 | """GetPaletteRealized(self) -> bool""" |
54f9ee45 | 4572 | return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs) |
e811c8ce | 4573 | |
d14a1e28 RD |
4574 | |
4575 | class QueryNewPaletteEventPtr(QueryNewPaletteEvent): | |
4576 | def __init__(self, this): | |
4577 | self.this = this | |
4578 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4579 | self.__class__ = QueryNewPaletteEvent | |
54f9ee45 | 4580 | _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr) |
d14a1e28 RD |
4581 | |
4582 | #--------------------------------------------------------------------------- | |
4583 | ||
4584 | class NavigationKeyEvent(Event): | |
093d3ff1 | 4585 | """Proxy of C++ NavigationKeyEvent class""" |
e811c8ce RD |
4586 | def __repr__(self): |
4587 | return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4588 | def __init__(self, *args, **kwargs): |
a95a7133 | 4589 | """__init__(self) -> NavigationKeyEvent""" |
54f9ee45 | 4590 | newobj = _core_.new_NavigationKeyEvent(*args, **kwargs) |
d14a1e28 RD |
4591 | self.this = newobj.this |
4592 | self.thisown = 1 | |
4593 | del newobj.thisown | |
e811c8ce | 4594 | def GetDirection(*args, **kwargs): |
a95a7133 | 4595 | """GetDirection(self) -> bool""" |
54f9ee45 | 4596 | return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs) |
e811c8ce RD |
4597 | |
4598 | def SetDirection(*args, **kwargs): | |
908b74cd | 4599 | """SetDirection(self, bool forward)""" |
54f9ee45 | 4600 | return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs) |
e811c8ce RD |
4601 | |
4602 | def IsWindowChange(*args, **kwargs): | |
a95a7133 | 4603 | """IsWindowChange(self) -> bool""" |
54f9ee45 | 4604 | return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs) |
e811c8ce RD |
4605 | |
4606 | def SetWindowChange(*args, **kwargs): | |
908b74cd | 4607 | """SetWindowChange(self, bool ischange)""" |
54f9ee45 | 4608 | return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs) |
e811c8ce | 4609 | |
68350608 RD |
4610 | def IsFromTab(*args, **kwargs): |
4611 | """IsFromTab(self) -> bool""" | |
4612 | return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs) | |
4613 | ||
4614 | def SetFromTab(*args, **kwargs): | |
4615 | """SetFromTab(self, bool bIs)""" | |
4616 | return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs) | |
4617 | ||
908b74cd RD |
4618 | def SetFlags(*args, **kwargs): |
4619 | """SetFlags(self, long flags)""" | |
4620 | return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs) | |
4621 | ||
e811c8ce | 4622 | def GetCurrentFocus(*args, **kwargs): |
a95a7133 | 4623 | """GetCurrentFocus(self) -> Window""" |
54f9ee45 | 4624 | return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs) |
e811c8ce RD |
4625 | |
4626 | def SetCurrentFocus(*args, **kwargs): | |
a95a7133 | 4627 | """SetCurrentFocus(self, Window win)""" |
54f9ee45 | 4628 | return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs) |
e811c8ce | 4629 | |
b0f7404b | 4630 | IsBackward = _core_.NavigationKeyEvent_IsBackward |
908b74cd RD |
4631 | IsForward = _core_.NavigationKeyEvent_IsForward |
4632 | WinChange = _core_.NavigationKeyEvent_WinChange | |
68350608 | 4633 | FromTab = _core_.NavigationKeyEvent_FromTab |
d14a1e28 RD |
4634 | |
4635 | class NavigationKeyEventPtr(NavigationKeyEvent): | |
4636 | def __init__(self, this): | |
4637 | self.this = this | |
4638 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4639 | self.__class__ = NavigationKeyEvent | |
54f9ee45 | 4640 | _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr) |
d14a1e28 RD |
4641 | |
4642 | #--------------------------------------------------------------------------- | |
4643 | ||
4644 | class WindowCreateEvent(CommandEvent): | |
093d3ff1 | 4645 | """Proxy of C++ WindowCreateEvent class""" |
e811c8ce RD |
4646 | def __repr__(self): |
4647 | return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4648 | def __init__(self, *args, **kwargs): |
a95a7133 | 4649 | """__init__(self, Window win=None) -> WindowCreateEvent""" |
54f9ee45 | 4650 | newobj = _core_.new_WindowCreateEvent(*args, **kwargs) |
d14a1e28 RD |
4651 | self.this = newobj.this |
4652 | self.thisown = 1 | |
4653 | del newobj.thisown | |
e811c8ce | 4654 | def GetWindow(*args, **kwargs): |
a95a7133 | 4655 | """GetWindow(self) -> Window""" |
54f9ee45 | 4656 | return _core_.WindowCreateEvent_GetWindow(*args, **kwargs) |
e811c8ce | 4657 | |
d14a1e28 RD |
4658 | |
4659 | class WindowCreateEventPtr(WindowCreateEvent): | |
4660 | def __init__(self, this): | |
4661 | self.this = this | |
4662 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4663 | self.__class__ = WindowCreateEvent | |
54f9ee45 | 4664 | _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr) |
d14a1e28 RD |
4665 | |
4666 | class WindowDestroyEvent(CommandEvent): | |
093d3ff1 | 4667 | """Proxy of C++ WindowDestroyEvent class""" |
e811c8ce RD |
4668 | def __repr__(self): |
4669 | return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4670 | def __init__(self, *args, **kwargs): |
a95a7133 | 4671 | """__init__(self, Window win=None) -> WindowDestroyEvent""" |
54f9ee45 | 4672 | newobj = _core_.new_WindowDestroyEvent(*args, **kwargs) |
d14a1e28 RD |
4673 | self.this = newobj.this |
4674 | self.thisown = 1 | |
4675 | del newobj.thisown | |
e811c8ce | 4676 | def GetWindow(*args, **kwargs): |
a95a7133 | 4677 | """GetWindow(self) -> Window""" |
54f9ee45 | 4678 | return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs) |
e811c8ce | 4679 | |
d14a1e28 RD |
4680 | |
4681 | class WindowDestroyEventPtr(WindowDestroyEvent): | |
4682 | def __init__(self, this): | |
4683 | self.this = this | |
4684 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4685 | self.__class__ = WindowDestroyEvent | |
54f9ee45 | 4686 | _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr) |
d14a1e28 RD |
4687 | |
4688 | #--------------------------------------------------------------------------- | |
4689 | ||
4690 | class ContextMenuEvent(CommandEvent): | |
093d3ff1 | 4691 | """Proxy of C++ ContextMenuEvent class""" |
e811c8ce RD |
4692 | def __repr__(self): |
4693 | return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4694 | def __init__(self, *args, **kwargs): |
a95a7133 | 4695 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent""" |
54f9ee45 | 4696 | newobj = _core_.new_ContextMenuEvent(*args, **kwargs) |
d14a1e28 RD |
4697 | self.this = newobj.this |
4698 | self.thisown = 1 | |
4699 | del newobj.thisown | |
e811c8ce | 4700 | def GetPosition(*args, **kwargs): |
a95a7133 | 4701 | """GetPosition(self) -> Point""" |
54f9ee45 | 4702 | return _core_.ContextMenuEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4703 | |
4704 | def SetPosition(*args, **kwargs): | |
a95a7133 | 4705 | """SetPosition(self, Point pos)""" |
54f9ee45 | 4706 | return _core_.ContextMenuEvent_SetPosition(*args, **kwargs) |
e811c8ce | 4707 | |
d14a1e28 RD |
4708 | |
4709 | class ContextMenuEventPtr(ContextMenuEvent): | |
4710 | def __init__(self, this): | |
4711 | self.this = this | |
4712 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4713 | self.__class__ = ContextMenuEvent | |
54f9ee45 | 4714 | _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr) |
d14a1e28 RD |
4715 | |
4716 | #--------------------------------------------------------------------------- | |
4717 | ||
54f9ee45 RD |
4718 | IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL |
4719 | IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED | |
d14a1e28 | 4720 | class IdleEvent(Event): |
093d3ff1 | 4721 | """Proxy of C++ IdleEvent class""" |
e811c8ce RD |
4722 | def __repr__(self): |
4723 | return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4724 | def __init__(self, *args, **kwargs): |
a95a7133 | 4725 | """__init__(self) -> IdleEvent""" |
54f9ee45 | 4726 | newobj = _core_.new_IdleEvent(*args, **kwargs) |
d14a1e28 RD |
4727 | self.this = newobj.this |
4728 | self.thisown = 1 | |
4729 | del newobj.thisown | |
e811c8ce | 4730 | def RequestMore(*args, **kwargs): |
a95a7133 | 4731 | """RequestMore(self, bool needMore=True)""" |
54f9ee45 | 4732 | return _core_.IdleEvent_RequestMore(*args, **kwargs) |
e811c8ce RD |
4733 | |
4734 | def MoreRequested(*args, **kwargs): | |
a95a7133 | 4735 | """MoreRequested(self) -> bool""" |
54f9ee45 | 4736 | return _core_.IdleEvent_MoreRequested(*args, **kwargs) |
e811c8ce RD |
4737 | |
4738 | def SetMode(*args, **kwargs): | |
66c033b4 | 4739 | """SetMode(int mode)""" |
54f9ee45 | 4740 | return _core_.IdleEvent_SetMode(*args, **kwargs) |
e811c8ce RD |
4741 | |
4742 | SetMode = staticmethod(SetMode) | |
4743 | def GetMode(*args, **kwargs): | |
66c033b4 | 4744 | """GetMode() -> int""" |
54f9ee45 | 4745 | return _core_.IdleEvent_GetMode(*args, **kwargs) |
e811c8ce RD |
4746 | |
4747 | GetMode = staticmethod(GetMode) | |
4748 | def CanSend(*args, **kwargs): | |
66c033b4 | 4749 | """CanSend(Window win) -> bool""" |
54f9ee45 | 4750 | return _core_.IdleEvent_CanSend(*args, **kwargs) |
e811c8ce RD |
4751 | |
4752 | CanSend = staticmethod(CanSend) | |
d14a1e28 RD |
4753 | |
4754 | class IdleEventPtr(IdleEvent): | |
4755 | def __init__(self, this): | |
4756 | self.this = this | |
4757 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4758 | self.__class__ = IdleEvent | |
54f9ee45 | 4759 | _core_.IdleEvent_swigregister(IdleEventPtr) |
d14a1e28 | 4760 | |
e811c8ce | 4761 | def IdleEvent_SetMode(*args, **kwargs): |
196addbf | 4762 | """IdleEvent_SetMode(int mode)""" |
54f9ee45 | 4763 | return _core_.IdleEvent_SetMode(*args, **kwargs) |
d14a1e28 | 4764 | |
e811c8ce | 4765 | def IdleEvent_GetMode(*args, **kwargs): |
196addbf | 4766 | """IdleEvent_GetMode() -> int""" |
54f9ee45 | 4767 | return _core_.IdleEvent_GetMode(*args, **kwargs) |
d14a1e28 | 4768 | |
e811c8ce RD |
4769 | def IdleEvent_CanSend(*args, **kwargs): |
4770 | """IdleEvent_CanSend(Window win) -> bool""" | |
54f9ee45 | 4771 | return _core_.IdleEvent_CanSend(*args, **kwargs) |
d14a1e28 RD |
4772 | |
4773 | #--------------------------------------------------------------------------- | |
4774 | ||
4775 | class PyEvent(Event): | |
093d3ff1 | 4776 | """Proxy of C++ PyEvent class""" |
e811c8ce RD |
4777 | def __repr__(self): |
4778 | return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4779 | def __init__(self, *args, **kwargs): |
a95a7133 | 4780 | """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent""" |
54f9ee45 | 4781 | newobj = _core_.new_PyEvent(*args, **kwargs) |
d14a1e28 RD |
4782 | self.this = newobj.this |
4783 | self.thisown = 1 | |
4784 | del newobj.thisown | |
4785 | self.SetSelf(self) | |
e811c8ce | 4786 | |
54f9ee45 | 4787 | def __del__(self, destroy=_core_.delete_PyEvent): |
a95a7133 | 4788 | """__del__(self)""" |
d14a1e28 RD |
4789 | try: |
4790 | if self.thisown: destroy(self) | |
4791 | except: pass | |
e811c8ce RD |
4792 | |
4793 | def SetSelf(*args, **kwargs): | |
a95a7133 | 4794 | """SetSelf(self, PyObject self)""" |
54f9ee45 | 4795 | return _core_.PyEvent_SetSelf(*args, **kwargs) |
e811c8ce RD |
4796 | |
4797 | def GetSelf(*args, **kwargs): | |
a95a7133 | 4798 | """GetSelf(self) -> PyObject""" |
54f9ee45 | 4799 | return _core_.PyEvent_GetSelf(*args, **kwargs) |
e811c8ce | 4800 | |
d14a1e28 RD |
4801 | |
4802 | class PyEventPtr(PyEvent): | |
4803 | def __init__(self, this): | |
4804 | self.this = this | |
4805 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4806 | self.__class__ = PyEvent | |
54f9ee45 | 4807 | _core_.PyEvent_swigregister(PyEventPtr) |
d14a1e28 RD |
4808 | |
4809 | class PyCommandEvent(CommandEvent): | |
093d3ff1 | 4810 | """Proxy of C++ PyCommandEvent class""" |
e811c8ce RD |
4811 | def __repr__(self): |
4812 | return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4813 | def __init__(self, *args, **kwargs): |
a95a7133 | 4814 | """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent""" |
54f9ee45 | 4815 | newobj = _core_.new_PyCommandEvent(*args, **kwargs) |
d14a1e28 RD |
4816 | self.this = newobj.this |
4817 | self.thisown = 1 | |
4818 | del newobj.thisown | |
4819 | self.SetSelf(self) | |
e811c8ce | 4820 | |
54f9ee45 | 4821 | def __del__(self, destroy=_core_.delete_PyCommandEvent): |
a95a7133 | 4822 | """__del__(self)""" |
d14a1e28 RD |
4823 | try: |
4824 | if self.thisown: destroy(self) | |
4825 | except: pass | |
e811c8ce RD |
4826 | |
4827 | def SetSelf(*args, **kwargs): | |
a95a7133 | 4828 | """SetSelf(self, PyObject self)""" |
54f9ee45 | 4829 | return _core_.PyCommandEvent_SetSelf(*args, **kwargs) |
e811c8ce RD |
4830 | |
4831 | def GetSelf(*args, **kwargs): | |
a95a7133 | 4832 | """GetSelf(self) -> PyObject""" |
54f9ee45 | 4833 | return _core_.PyCommandEvent_GetSelf(*args, **kwargs) |
e811c8ce | 4834 | |
d14a1e28 RD |
4835 | |
4836 | class PyCommandEventPtr(PyCommandEvent): | |
4837 | def __init__(self, this): | |
4838 | self.this = this | |
4839 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4840 | self.__class__ = PyCommandEvent | |
54f9ee45 | 4841 | _core_.PyCommandEvent_swigregister(PyCommandEventPtr) |
d14a1e28 | 4842 | |
53aa7709 RD |
4843 | class DateEvent(CommandEvent): |
4844 | """Proxy of C++ DateEvent class""" | |
4845 | def __repr__(self): | |
4846 | return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4847 | def __init__(self, *args, **kwargs): | |
4848 | """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent""" | |
4849 | newobj = _core_.new_DateEvent(*args, **kwargs) | |
4850 | self.this = newobj.this | |
4851 | self.thisown = 1 | |
4852 | del newobj.thisown | |
4853 | def GetDate(*args, **kwargs): | |
4854 | """GetDate(self) -> DateTime""" | |
4855 | return _core_.DateEvent_GetDate(*args, **kwargs) | |
4856 | ||
4857 | def SetDate(*args, **kwargs): | |
4858 | """SetDate(self, DateTime date)""" | |
4859 | return _core_.DateEvent_SetDate(*args, **kwargs) | |
4860 | ||
4861 | ||
4862 | class DateEventPtr(DateEvent): | |
4863 | def __init__(self, this): | |
4864 | self.this = this | |
4865 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4866 | self.__class__ = DateEvent | |
4867 | _core_.DateEvent_swigregister(DateEventPtr) | |
4868 | ||
4869 | wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED | |
4870 | EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 ) | |
4871 | ||
d14a1e28 RD |
4872 | #--------------------------------------------------------------------------- |
4873 | ||
54f9ee45 RD |
4874 | PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS |
4875 | PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION | |
4876 | PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG | |
4877 | PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG | |
4878 | PRINT_WINDOWS = _core_.PRINT_WINDOWS | |
4879 | PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT | |
d14a1e28 | 4880 | class PyApp(EvtHandler): |
66c033b4 RD |
4881 | """ |
4882 | The ``wx.PyApp`` class is an *implementation detail*, please use the | |
4883 | `wx.App` class (or some other derived class) instead. | |
4884 | """ | |
e811c8ce RD |
4885 | def __repr__(self): |
4886 | return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4887 | def __init__(self, *args, **kwargs): |
98e665d3 | 4888 | """ |
a95a7133 | 4889 | __init__(self) -> PyApp |
98e665d3 RD |
4890 | |
4891 | Create a new application object, starting the bootstrap process. | |
4892 | """ | |
54f9ee45 | 4893 | newobj = _core_.new_PyApp(*args, **kwargs) |
d14a1e28 RD |
4894 | self.this = newobj.this |
4895 | self.thisown = 1 | |
4896 | del newobj.thisown | |
4897 | self._setCallbackInfo(self, PyApp) | |
4898 | self._setOORInfo(self) | |
e811c8ce | 4899 | |
54f9ee45 | 4900 | def __del__(self, destroy=_core_.delete_PyApp): |
a95a7133 | 4901 | """__del__(self)""" |
d14a1e28 RD |
4902 | try: |
4903 | if self.thisown: destroy(self) | |
4904 | except: pass | |
e811c8ce RD |
4905 | |
4906 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 4907 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 4908 | return _core_.PyApp__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
4909 | |
4910 | def GetAppName(*args, **kwargs): | |
0df68c9f | 4911 | """ |
a95a7133 | 4912 | GetAppName(self) -> String |
6c3b4aae | 4913 | |
0df68c9f RD |
4914 | Get the application name. |
4915 | """ | |
54f9ee45 | 4916 | return _core_.PyApp_GetAppName(*args, **kwargs) |
e811c8ce RD |
4917 | |
4918 | def SetAppName(*args, **kwargs): | |
0df68c9f | 4919 | """ |
a95a7133 | 4920 | SetAppName(self, String name) |
6c3b4aae | 4921 | |
66c033b4 RD |
4922 | Set the application name. This value may be used automatically by |
4923 | `wx.Config` and such. | |
0df68c9f | 4924 | """ |
54f9ee45 | 4925 | return _core_.PyApp_SetAppName(*args, **kwargs) |
e811c8ce RD |
4926 | |
4927 | def GetClassName(*args, **kwargs): | |
0df68c9f | 4928 | """ |
a95a7133 | 4929 | GetClassName(self) -> String |
e811c8ce | 4930 | |
0df68c9f RD |
4931 | Get the application's class name. |
4932 | """ | |
54f9ee45 | 4933 | return _core_.PyApp_GetClassName(*args, **kwargs) |
e811c8ce RD |
4934 | |
4935 | def SetClassName(*args, **kwargs): | |
0df68c9f | 4936 | """ |
a95a7133 | 4937 | SetClassName(self, String name) |
6c3b4aae | 4938 | |
66c033b4 RD |
4939 | Set the application's class name. This value may be used for |
4940 | X-resources if applicable for the platform | |
0df68c9f | 4941 | """ |
54f9ee45 | 4942 | return _core_.PyApp_SetClassName(*args, **kwargs) |
e811c8ce RD |
4943 | |
4944 | def GetVendorName(*args, **kwargs): | |
0df68c9f | 4945 | """ |
a95a7133 | 4946 | GetVendorName(self) -> String |
6c3b4aae | 4947 | |
0df68c9f RD |
4948 | Get the application's vendor name. |
4949 | """ | |
54f9ee45 | 4950 | return _core_.PyApp_GetVendorName(*args, **kwargs) |
e811c8ce RD |
4951 | |
4952 | def SetVendorName(*args, **kwargs): | |
0df68c9f | 4953 | """ |
a95a7133 | 4954 | SetVendorName(self, String name) |
6c3b4aae | 4955 | |
66c033b4 RD |
4956 | Set the application's vendor name. This value may be used |
4957 | automatically by `wx.Config` and such. | |
0df68c9f | 4958 | """ |
54f9ee45 | 4959 | return _core_.PyApp_SetVendorName(*args, **kwargs) |
e811c8ce RD |
4960 | |
4961 | def GetTraits(*args, **kwargs): | |
0df68c9f | 4962 | """ |
a95a7133 | 4963 | GetTraits(self) -> wxAppTraits |
6c3b4aae | 4964 | |
66c033b4 RD |
4965 | Return (and create if necessary) the app traits object to which we |
4966 | delegate for everything which either should be configurable by the | |
4967 | user (then he can change the default behaviour simply by overriding | |
4968 | CreateTraits() and returning his own traits object) or which is | |
4969 | GUI/console dependent as then wx.AppTraits allows us to abstract the | |
4970 | differences behind the common facade. | |
4971 | ||
4972 | :todo: Add support for overriding CreateAppTraits in wxPython. | |
0df68c9f | 4973 | """ |
54f9ee45 | 4974 | return _core_.PyApp_GetTraits(*args, **kwargs) |
e811c8ce RD |
4975 | |
4976 | def ProcessPendingEvents(*args, **kwargs): | |
0df68c9f | 4977 | """ |
a95a7133 | 4978 | ProcessPendingEvents(self) |
6c3b4aae | 4979 | |
66c033b4 RD |
4980 | Process all events in the Pending Events list -- it is necessary to |
4981 | call this function to process posted events. This normally happens | |
4982 | during each event loop iteration. | |
0df68c9f | 4983 | """ |
54f9ee45 | 4984 | return _core_.PyApp_ProcessPendingEvents(*args, **kwargs) |
e811c8ce RD |
4985 | |
4986 | def Yield(*args, **kwargs): | |
0df68c9f | 4987 | """ |
a95a7133 | 4988 | Yield(self, bool onlyIfNeeded=False) -> bool |
6c3b4aae | 4989 | |
66c033b4 RD |
4990 | Process all currently pending events right now, instead of waiting |
4991 | until return to the event loop. It is an error to call ``Yield`` | |
4992 | recursively unless the value of ``onlyIfNeeded`` is True. | |
6c3b4aae | 4993 | |
66c033b4 | 4994 | :warning: This function is dangerous as it can lead to unexpected |
41e2b43e RD |
4995 | reentrancies (i.e. when called from an event handler it may |
4996 | result in calling the same event handler again), use with | |
4997 | extreme care or, better, don't use at all! | |
0df68c9f | 4998 | |
66c033b4 | 4999 | :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield` |
41e2b43e | 5000 | |
0df68c9f | 5001 | """ |
54f9ee45 | 5002 | return _core_.PyApp_Yield(*args, **kwargs) |
e811c8ce RD |
5003 | |
5004 | def WakeUpIdle(*args, **kwargs): | |
0df68c9f | 5005 | """ |
a95a7133 | 5006 | WakeUpIdle(self) |
6c3b4aae | 5007 | |
66c033b4 RD |
5008 | Make sure that idle events are sent again. |
5009 | :see: `wx.WakeUpIdle` | |
0df68c9f | 5010 | """ |
54f9ee45 | 5011 | return _core_.PyApp_WakeUpIdle(*args, **kwargs) |
e811c8ce | 5012 | |
1fc3b23a RD |
5013 | def IsMainLoopRunning(*args, **kwargs): |
5014 | """ | |
5015 | IsMainLoopRunning() -> bool | |
5016 | ||
5017 | Returns True if we're running the main loop, i.e. if the events can | |
5018 | currently be dispatched. | |
5019 | """ | |
5020 | return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) | |
5021 | ||
5022 | IsMainLoopRunning = staticmethod(IsMainLoopRunning) | |
e811c8ce | 5023 | def MainLoop(*args, **kwargs): |
0df68c9f | 5024 | """ |
a95a7133 | 5025 | MainLoop(self) -> int |
6c3b4aae | 5026 | |
66c033b4 RD |
5027 | Execute the main GUI loop, the function doesn't normally return until |
5028 | all top level windows have been closed and destroyed. | |
0df68c9f | 5029 | """ |
54f9ee45 | 5030 | return _core_.PyApp_MainLoop(*args, **kwargs) |
e811c8ce RD |
5031 | |
5032 | def Exit(*args, **kwargs): | |
0df68c9f | 5033 | """ |
a95a7133 | 5034 | Exit(self) |
6c3b4aae | 5035 | |
0df68c9f | 5036 | Exit the main loop thus terminating the application. |
66c033b4 | 5037 | :see: `wx.Exit` |
0df68c9f | 5038 | """ |
54f9ee45 | 5039 | return _core_.PyApp_Exit(*args, **kwargs) |
e811c8ce RD |
5040 | |
5041 | def ExitMainLoop(*args, **kwargs): | |
0df68c9f | 5042 | """ |
a95a7133 | 5043 | ExitMainLoop(self) |
6c3b4aae | 5044 | |
66c033b4 RD |
5045 | Exit the main GUI loop during the next iteration of the main |
5046 | loop, (i.e. it does not stop the program immediately!) | |
0df68c9f | 5047 | """ |
54f9ee45 | 5048 | return _core_.PyApp_ExitMainLoop(*args, **kwargs) |
e811c8ce RD |
5049 | |
5050 | def Pending(*args, **kwargs): | |
0df68c9f | 5051 | """ |
a95a7133 | 5052 | Pending(self) -> bool |
6c3b4aae | 5053 | |
0df68c9f RD |
5054 | Returns True if there are unprocessed events in the event queue. |
5055 | """ | |
54f9ee45 | 5056 | return _core_.PyApp_Pending(*args, **kwargs) |
e811c8ce RD |
5057 | |
5058 | def Dispatch(*args, **kwargs): | |
0df68c9f | 5059 | """ |
a95a7133 | 5060 | Dispatch(self) -> bool |
6c3b4aae | 5061 | |
0df68c9f RD |
5062 | Process the first event in the event queue (blocks until an event |
5063 | appears if there are none currently) | |
5064 | """ | |
54f9ee45 | 5065 | return _core_.PyApp_Dispatch(*args, **kwargs) |
e811c8ce RD |
5066 | |
5067 | def ProcessIdle(*args, **kwargs): | |
0df68c9f | 5068 | """ |
a95a7133 | 5069 | ProcessIdle(self) -> bool |
6c3b4aae | 5070 | |
66c033b4 RD |
5071 | Called from the MainLoop when the application becomes idle (there are |
5072 | no pending events) and sends a `wx.IdleEvent` to all interested | |
5073 | parties. Returns True if more idle events are needed, False if not. | |
0df68c9f | 5074 | """ |
54f9ee45 | 5075 | return _core_.PyApp_ProcessIdle(*args, **kwargs) |
e811c8ce RD |
5076 | |
5077 | def SendIdleEvents(*args, **kwargs): | |
0df68c9f | 5078 | """ |
a95a7133 | 5079 | SendIdleEvents(self, Window win, IdleEvent event) -> bool |
e811c8ce | 5080 | |
66c033b4 RD |
5081 | Send idle event to window and all subwindows. Returns True if more |
5082 | idle time is requested. | |
0df68c9f | 5083 | """ |
54f9ee45 | 5084 | return _core_.PyApp_SendIdleEvents(*args, **kwargs) |
e811c8ce RD |
5085 | |
5086 | def IsActive(*args, **kwargs): | |
0df68c9f | 5087 | """ |
a95a7133 | 5088 | IsActive(self) -> bool |
6c3b4aae | 5089 | |
0df68c9f RD |
5090 | Return True if our app has focus. |
5091 | """ | |
54f9ee45 | 5092 | return _core_.PyApp_IsActive(*args, **kwargs) |
e811c8ce RD |
5093 | |
5094 | def SetTopWindow(*args, **kwargs): | |
0df68c9f | 5095 | """ |
a95a7133 | 5096 | SetTopWindow(self, Window win) |
6c3b4aae | 5097 | |
66c033b4 | 5098 | Set the *main* top level window |
0df68c9f | 5099 | """ |
54f9ee45 | 5100 | return _core_.PyApp_SetTopWindow(*args, **kwargs) |
e811c8ce RD |
5101 | |
5102 | def GetTopWindow(*args, **kwargs): | |
0df68c9f | 5103 | """ |
a95a7133 | 5104 | GetTopWindow(self) -> Window |
6c3b4aae | 5105 | |
66c033b4 RD |
5106 | Return the *main* top level window (if it hadn't been set previously |
5107 | with SetTopWindow(), will return just some top level window and, if | |
5108 | there not any, will return None) | |
0df68c9f | 5109 | """ |
54f9ee45 | 5110 | return _core_.PyApp_GetTopWindow(*args, **kwargs) |
e811c8ce RD |
5111 | |
5112 | def SetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f | 5113 | """ |
a95a7133 | 5114 | SetExitOnFrameDelete(self, bool flag) |
0df68c9f | 5115 | |
66c033b4 RD |
5116 | Control the exit behaviour: by default, the program will exit the main |
5117 | loop (and so, usually, terminate) when the last top-level program | |
5118 | window is deleted. Beware that if you disable this behaviour (with | |
5119 | SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() | |
5120 | explicitly from somewhere. | |
0df68c9f | 5121 | """ |
54f9ee45 | 5122 | return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs) |
e811c8ce RD |
5123 | |
5124 | def GetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f | 5125 | """ |
a95a7133 | 5126 | GetExitOnFrameDelete(self) -> bool |
6c3b4aae | 5127 | |
0df68c9f RD |
5128 | Get the current exit behaviour setting. |
5129 | """ | |
54f9ee45 | 5130 | return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs) |
e811c8ce RD |
5131 | |
5132 | def SetUseBestVisual(*args, **kwargs): | |
0df68c9f | 5133 | """ |
a95a7133 | 5134 | SetUseBestVisual(self, bool flag) |
6c3b4aae | 5135 | |
66c033b4 RD |
5136 | Set whether the app should try to use the best available visual on |
5137 | systems where more than one is available, (Sun, SGI, XFree86 4, etc.) | |
0df68c9f | 5138 | """ |
54f9ee45 | 5139 | return _core_.PyApp_SetUseBestVisual(*args, **kwargs) |
e811c8ce RD |
5140 | |
5141 | def GetUseBestVisual(*args, **kwargs): | |
0df68c9f | 5142 | """ |
a95a7133 | 5143 | GetUseBestVisual(self) -> bool |
6c3b4aae | 5144 | |
0df68c9f RD |
5145 | Get current UseBestVisual setting. |
5146 | """ | |
54f9ee45 | 5147 | return _core_.PyApp_GetUseBestVisual(*args, **kwargs) |
e811c8ce RD |
5148 | |
5149 | def SetPrintMode(*args, **kwargs): | |
a95a7133 | 5150 | """SetPrintMode(self, int mode)""" |
54f9ee45 | 5151 | return _core_.PyApp_SetPrintMode(*args, **kwargs) |
e811c8ce RD |
5152 | |
5153 | def GetPrintMode(*args, **kwargs): | |
a95a7133 | 5154 | """GetPrintMode(self) -> int""" |
54f9ee45 | 5155 | return _core_.PyApp_GetPrintMode(*args, **kwargs) |
e811c8ce | 5156 | |
e811c8ce | 5157 | def SetAssertMode(*args, **kwargs): |
0df68c9f | 5158 | """ |
a95a7133 | 5159 | SetAssertMode(self, int mode) |
6c3b4aae | 5160 | |
41e2b43e | 5161 | Set the OnAssert behaviour for debug and hybrid builds. |
0df68c9f | 5162 | """ |
54f9ee45 | 5163 | return _core_.PyApp_SetAssertMode(*args, **kwargs) |
e811c8ce | 5164 | |
6c3b4aae | 5165 | def GetAssertMode(*args, **kwargs): |
0df68c9f | 5166 | """ |
a95a7133 | 5167 | GetAssertMode(self) -> int |
6c3b4aae | 5168 | |
0df68c9f RD |
5169 | Get the current OnAssert behaviour setting. |
5170 | """ | |
54f9ee45 | 5171 | return _core_.PyApp_GetAssertMode(*args, **kwargs) |
6c3b4aae | 5172 | |
e811c8ce | 5173 | def GetMacSupportPCMenuShortcuts(*args, **kwargs): |
66c033b4 | 5174 | """GetMacSupportPCMenuShortcuts() -> bool""" |
54f9ee45 | 5175 | return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) |
e811c8ce RD |
5176 | |
5177 | GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) | |
5178 | def GetMacAboutMenuItemId(*args, **kwargs): | |
66c033b4 | 5179 | """GetMacAboutMenuItemId() -> long""" |
54f9ee45 | 5180 | return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs) |
e811c8ce RD |
5181 | |
5182 | GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) | |
5183 | def GetMacPreferencesMenuItemId(*args, **kwargs): | |
66c033b4 | 5184 | """GetMacPreferencesMenuItemId() -> long""" |
54f9ee45 | 5185 | return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) |
e811c8ce RD |
5186 | |
5187 | GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) | |
5188 | def GetMacExitMenuItemId(*args, **kwargs): | |
66c033b4 | 5189 | """GetMacExitMenuItemId() -> long""" |
54f9ee45 | 5190 | return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs) |
e811c8ce RD |
5191 | |
5192 | GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) | |
5193 | def GetMacHelpMenuTitleName(*args, **kwargs): | |
66c033b4 | 5194 | """GetMacHelpMenuTitleName() -> String""" |
54f9ee45 | 5195 | return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) |
e811c8ce RD |
5196 | |
5197 | GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) | |
5198 | def SetMacSupportPCMenuShortcuts(*args, **kwargs): | |
66c033b4 | 5199 | """SetMacSupportPCMenuShortcuts(bool val)""" |
54f9ee45 | 5200 | return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) |
e811c8ce RD |
5201 | |
5202 | SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) | |
5203 | def SetMacAboutMenuItemId(*args, **kwargs): | |
66c033b4 | 5204 | """SetMacAboutMenuItemId(long val)""" |
54f9ee45 | 5205 | return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) |
e811c8ce RD |
5206 | |
5207 | SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) | |
5208 | def SetMacPreferencesMenuItemId(*args, **kwargs): | |
66c033b4 | 5209 | """SetMacPreferencesMenuItemId(long val)""" |
54f9ee45 | 5210 | return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) |
e811c8ce RD |
5211 | |
5212 | SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) | |
5213 | def SetMacExitMenuItemId(*args, **kwargs): | |
66c033b4 | 5214 | """SetMacExitMenuItemId(long val)""" |
54f9ee45 | 5215 | return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) |
e811c8ce RD |
5216 | |
5217 | SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) | |
5218 | def SetMacHelpMenuTitleName(*args, **kwargs): | |
66c033b4 | 5219 | """SetMacHelpMenuTitleName(String val)""" |
54f9ee45 | 5220 | return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) |
e811c8ce RD |
5221 | |
5222 | SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) | |
5223 | def _BootstrapApp(*args, **kwargs): | |
0df68c9f | 5224 | """ |
a95a7133 | 5225 | _BootstrapApp(self) |
6c3b4aae | 5226 | |
0df68c9f RD |
5227 | For internal use only |
5228 | """ | |
54f9ee45 | 5229 | return _core_.PyApp__BootstrapApp(*args, **kwargs) |
e811c8ce RD |
5230 | |
5231 | def GetComCtl32Version(*args, **kwargs): | |
0df68c9f | 5232 | """ |
66c033b4 | 5233 | GetComCtl32Version() -> int |
6c3b4aae | 5234 | |
66c033b4 RD |
5235 | Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if |
5236 | it wasn't found at all. Raises an exception on non-Windows platforms. | |
0df68c9f | 5237 | """ |
54f9ee45 | 5238 | return _core_.PyApp_GetComCtl32Version(*args, **kwargs) |
e811c8ce RD |
5239 | |
5240 | GetComCtl32Version = staticmethod(GetComCtl32Version) | |
d14a1e28 RD |
5241 | |
5242 | class PyAppPtr(PyApp): | |
5243 | def __init__(self, this): | |
5244 | self.this = this | |
5245 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5246 | self.__class__ = PyApp | |
54f9ee45 | 5247 | _core_.PyApp_swigregister(PyAppPtr) |
d14a1e28 | 5248 | |
1fc3b23a RD |
5249 | def PyApp_IsMainLoopRunning(*args, **kwargs): |
5250 | """ | |
5251 | PyApp_IsMainLoopRunning() -> bool | |
5252 | ||
5253 | Returns True if we're running the main loop, i.e. if the events can | |
5254 | currently be dispatched. | |
5255 | """ | |
5256 | return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) | |
5257 | ||
e811c8ce RD |
5258 | def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs): |
5259 | """PyApp_GetMacSupportPCMenuShortcuts() -> bool""" | |
54f9ee45 | 5260 | return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) |
d14a1e28 | 5261 | |
e811c8ce RD |
5262 | def PyApp_GetMacAboutMenuItemId(*args, **kwargs): |
5263 | """PyApp_GetMacAboutMenuItemId() -> long""" | |
54f9ee45 | 5264 | return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs) |
d14a1e28 | 5265 | |
e811c8ce RD |
5266 | def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs): |
5267 | """PyApp_GetMacPreferencesMenuItemId() -> long""" | |
54f9ee45 | 5268 | return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) |
d14a1e28 | 5269 | |
e811c8ce RD |
5270 | def PyApp_GetMacExitMenuItemId(*args, **kwargs): |
5271 | """PyApp_GetMacExitMenuItemId() -> long""" | |
54f9ee45 | 5272 | return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs) |
d14a1e28 | 5273 | |
e811c8ce | 5274 | def PyApp_GetMacHelpMenuTitleName(*args, **kwargs): |
196addbf | 5275 | """PyApp_GetMacHelpMenuTitleName() -> String""" |
54f9ee45 | 5276 | return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) |
d14a1e28 | 5277 | |
e811c8ce RD |
5278 | def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs): |
5279 | """PyApp_SetMacSupportPCMenuShortcuts(bool val)""" | |
54f9ee45 | 5280 | return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) |
d14a1e28 | 5281 | |
e811c8ce RD |
5282 | def PyApp_SetMacAboutMenuItemId(*args, **kwargs): |
5283 | """PyApp_SetMacAboutMenuItemId(long val)""" | |
54f9ee45 | 5284 | return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) |
d14a1e28 | 5285 | |
e811c8ce RD |
5286 | def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs): |
5287 | """PyApp_SetMacPreferencesMenuItemId(long val)""" | |
54f9ee45 | 5288 | return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) |
d14a1e28 | 5289 | |
e811c8ce RD |
5290 | def PyApp_SetMacExitMenuItemId(*args, **kwargs): |
5291 | """PyApp_SetMacExitMenuItemId(long val)""" | |
54f9ee45 | 5292 | return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) |
d14a1e28 | 5293 | |
e811c8ce | 5294 | def PyApp_SetMacHelpMenuTitleName(*args, **kwargs): |
196addbf | 5295 | """PyApp_SetMacHelpMenuTitleName(String val)""" |
54f9ee45 | 5296 | return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) |
d14a1e28 | 5297 | |
e811c8ce | 5298 | def PyApp_GetComCtl32Version(*args, **kwargs): |
0df68c9f RD |
5299 | """ |
5300 | PyApp_GetComCtl32Version() -> int | |
6c3b4aae | 5301 | |
66c033b4 RD |
5302 | Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if |
5303 | it wasn't found at all. Raises an exception on non-Windows platforms. | |
0df68c9f | 5304 | """ |
54f9ee45 | 5305 | return _core_.PyApp_GetComCtl32Version(*args, **kwargs) |
d14a1e28 RD |
5306 | |
5307 | #--------------------------------------------------------------------------- | |
5308 | ||
5309 | ||
e811c8ce | 5310 | def Exit(*args, **kwargs): |
0df68c9f RD |
5311 | """ |
5312 | Exit() | |
6c3b4aae | 5313 | |
0df68c9f RD |
5314 | Force an exit of the application. Convenience for wx.GetApp().Exit() |
5315 | """ | |
54f9ee45 | 5316 | return _core_.Exit(*args, **kwargs) |
d14a1e28 | 5317 | |
e811c8ce | 5318 | def Yield(*args, **kwargs): |
0df68c9f RD |
5319 | """ |
5320 | Yield() -> bool | |
6c3b4aae | 5321 | |
0df68c9f RD |
5322 | Yield to other apps/messages. Convenience for wx.GetApp().Yield() |
5323 | """ | |
54f9ee45 | 5324 | return _core_.Yield(*args, **kwargs) |
d14a1e28 | 5325 | |
e811c8ce | 5326 | def YieldIfNeeded(*args, **kwargs): |
0df68c9f RD |
5327 | """ |
5328 | YieldIfNeeded() -> bool | |
6c3b4aae | 5329 | |
0df68c9f RD |
5330 | Yield to other apps/messages. Convenience for wx.GetApp().Yield(True) |
5331 | """ | |
54f9ee45 | 5332 | return _core_.YieldIfNeeded(*args, **kwargs) |
d14a1e28 | 5333 | |
e811c8ce | 5334 | def SafeYield(*args, **kwargs): |
0df68c9f RD |
5335 | """ |
5336 | SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool | |
6c3b4aae | 5337 | |
66c033b4 RD |
5338 | This function is similar to `wx.Yield`, except that it disables the |
5339 | user input to all program windows before calling `wx.Yield` and | |
5340 | re-enables it again afterwards. If ``win`` is not None, this window | |
5341 | will remain enabled, allowing the implementation of some limited user | |
5342 | interaction. | |
6c3b4aae | 5343 | |
66c033b4 | 5344 | :Returns: the result of the call to `wx.Yield`. |
0df68c9f | 5345 | """ |
54f9ee45 | 5346 | return _core_.SafeYield(*args, **kwargs) |
d14a1e28 | 5347 | |
e811c8ce | 5348 | def WakeUpIdle(*args, **kwargs): |
0df68c9f RD |
5349 | """ |
5350 | WakeUpIdle() | |
6c3b4aae | 5351 | |
66c033b4 RD |
5352 | Cause the message queue to become empty again, so idle events will be |
5353 | sent. | |
0df68c9f | 5354 | """ |
54f9ee45 | 5355 | return _core_.WakeUpIdle(*args, **kwargs) |
d14a1e28 | 5356 | |
e811c8ce | 5357 | def PostEvent(*args, **kwargs): |
0df68c9f RD |
5358 | """ |
5359 | PostEvent(EvtHandler dest, Event event) | |
6c3b4aae | 5360 | |
66c033b4 RD |
5361 | Send an event to a window or other wx.EvtHandler to be processed |
5362 | later. | |
0df68c9f | 5363 | """ |
54f9ee45 | 5364 | return _core_.PostEvent(*args, **kwargs) |
d14a1e28 | 5365 | |
e811c8ce | 5366 | def App_CleanUp(*args, **kwargs): |
0df68c9f RD |
5367 | """ |
5368 | App_CleanUp() | |
6c3b4aae | 5369 | |
41e2b43e | 5370 | For internal use only, it is used to cleanup after wxWidgets when |
66c033b4 | 5371 | Python shuts down. |
0df68c9f | 5372 | """ |
54f9ee45 | 5373 | return _core_.App_CleanUp(*args, **kwargs) |
d14a1e28 | 5374 | |
e811c8ce | 5375 | def GetApp(*args, **kwargs): |
0df68c9f RD |
5376 | """ |
5377 | GetApp() -> PyApp | |
6c3b4aae | 5378 | |
196addbf | 5379 | Return a reference to the current wx.App object. |
0df68c9f | 5380 | """ |
54f9ee45 | 5381 | return _core_.GetApp(*args, **kwargs) |
5cbf236d RD |
5382 | |
5383 | def SetDefaultPyEncoding(*args, **kwargs): | |
5384 | """ | |
5385 | SetDefaultPyEncoding(string encoding) | |
5386 | ||
5387 | Sets the encoding that wxPython will use when it needs to convert a | |
5388 | Python string or unicode object to or from a wxString. | |
e505d15e RD |
5389 | |
5390 | The default encoding is the value of ``locale.getdefaultlocale()[1]`` | |
5391 | but please be aware that the default encoding within the same locale | |
5392 | may be slightly different on different platforms. For example, please | |
5393 | see http://www.alanwood.net/demos/charsetdiffs.html for differences | |
5394 | between the common latin/roman encodings. | |
5cbf236d RD |
5395 | """ |
5396 | return _core_.SetDefaultPyEncoding(*args, **kwargs) | |
5397 | ||
5398 | def GetDefaultPyEncoding(*args, **kwargs): | |
5399 | """ | |
5400 | GetDefaultPyEncoding() -> string | |
5401 | ||
5402 | Gets the current encoding that wxPython will use when it needs to | |
5403 | convert a Python string or unicode object to or from a wxString. | |
5404 | """ | |
5405 | return _core_.GetDefaultPyEncoding(*args, **kwargs) | |
d14a1e28 RD |
5406 | #---------------------------------------------------------------------- |
5407 | ||
5408 | class PyOnDemandOutputWindow: | |
6c3b4aae RD |
5409 | """ |
5410 | A class that can be used for redirecting Python's stdout and | |
5411 | stderr streams. It will do nothing until something is wrriten to | |
5412 | the stream at which point it will create a Frame with a text area | |
5413 | and write the text there. | |
5414 | """ | |
d14a1e28 RD |
5415 | def __init__(self, title = "wxPython: stdout/stderr"): |
5416 | self.frame = None | |
5417 | self.title = title | |
412d302d RD |
5418 | self.pos = wx.DefaultPosition |
5419 | self.size = (450, 300) | |
d14a1e28 RD |
5420 | self.parent = None |
5421 | ||
5422 | def SetParent(self, parent): | |
6c3b4aae | 5423 | """Set the window to be used as the popup Frame's parent.""" |
d14a1e28 RD |
5424 | self.parent = parent |
5425 | ||
6c3b4aae RD |
5426 | |
5427 | def CreateOutputWindow(self, st): | |
412d302d RD |
5428 | self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size, |
5429 | style=wx.DEFAULT_FRAME_STYLE) | |
196addbf | 5430 | self.text = wx.TextCtrl(self.frame, -1, "", |
412d302d | 5431 | style=wx.TE_MULTILINE|wx.TE_READONLY) |
d1e20054 | 5432 | self.text.AppendText(st) |
6c3b4aae RD |
5433 | self.frame.Show(True) |
5434 | EVT_CLOSE(self.frame, self.OnCloseWindow) | |
5435 | ||
d14a1e28 | 5436 | |
7409c0c6 RD |
5437 | def OnCloseWindow(self, event): |
5438 | if self.frame is not None: | |
5439 | self.frame.Destroy() | |
5440 | self.frame = None | |
5441 | self.text = None | |
5442 | ||
5443 | ||
d14a1e28 | 5444 | # These methods provide the file-like output behaviour. |
6c3b4aae RD |
5445 | def write(self, text): |
5446 | """ | |
5447 | Create the output window if needed and write the string to it. | |
5448 | If not called in the context of the gui thread then uses | |
5449 | CallAfter to do the work there. | |
5450 | """ | |
5451 | if self.frame is None: | |
5452 | if not wx.Thread_IsMain(): | |
5453 | wx.CallAfter(self.CreateOutputWindow, text) | |
5454 | else: | |
5455 | self.CreateOutputWindow(text) | |
5456 | else: | |
5457 | if not wx.Thread_IsMain(): | |
5458 | wx.CallAfter(self.text.AppendText, text) | |
5459 | else: | |
5460 | self.text.AppendText(text) | |
5461 | ||
d14a1e28 RD |
5462 | |
5463 | def close(self): | |
6c3b4aae RD |
5464 | if self.frame is not None: |
5465 | wx.CallAfter(self.frame.Close) | |
5466 | ||
d14a1e28 | 5467 | |
19272049 RD |
5468 | def flush(self): |
5469 | pass | |
5470 | ||
5471 | ||
d14a1e28 RD |
5472 | |
5473 | #---------------------------------------------------------------------- | |
d14a1e28 RD |
5474 | |
5475 | _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__') | |
5476 | ||
5477 | class App(wx.PyApp): | |
6c3b4aae | 5478 | """ |
66c033b4 RD |
5479 | The ``wx.App`` class represents the application and is used to: |
5480 | ||
5481 | * bootstrap the wxPython system and initialize the underlying | |
5482 | gui toolkit | |
5483 | * set and get application-wide properties | |
5484 | * implement the windowing system main message or event loop, | |
5485 | and to dispatch events to window instances | |
5486 | * etc. | |
5487 | ||
5488 | Every application must have a ``wx.App`` instance, and all | |
5489 | creation of UI objects should be delayed until after the | |
03e37cd5 RD |
5490 | ``wx.App`` object has been created in order to ensure that the gui |
5491 | platform and wxWidgets have been fully initialized. | |
66c033b4 RD |
5492 | |
5493 | Normally you would derive from this class and implement an | |
5494 | ``OnInit`` method that creates a frame and then calls | |
5495 | ``self.SetTopWindow(frame)``. | |
5496 | ||
03e37cd5 | 5497 | :see: `wx.PySimpleApp` for a simpler app class that can be used |
1c0f361b | 5498 | directly. |
6c3b4aae | 5499 | """ |
66c033b4 | 5500 | |
d14a1e28 RD |
5501 | outputWindowClass = PyOnDemandOutputWindow |
5502 | ||
03e37cd5 RD |
5503 | def __init__(self, redirect=_defRedirect, filename=None, |
5504 | useBestVisual=False, clearSigInt=True): | |
66c033b4 RD |
5505 | """ |
5506 | Construct a ``wx.App`` object. | |
5507 | ||
03e37cd5 RD |
5508 | :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be |
5509 | redirected? Defaults to True on Windows and Mac, False | |
5510 | otherwise. If `filename` is None then output will be | |
5511 | redirected to a window that pops up as needed. (You can | |
5512 | control what kind of window is created for the output by | |
5513 | resetting the class variable ``outputWindowClass`` to a | |
5514 | class of your choosing.) | |
66c033b4 | 5515 | |
03e37cd5 RD |
5516 | :param filename: The name of a file to redirect output to, if |
5517 | redirect is True. | |
66c033b4 RD |
5518 | |
5519 | :param useBestVisual: Should the app try to use the best | |
03e37cd5 RD |
5520 | available visual provided by the system (only relevant on |
5521 | systems that have more than one visual.) This parameter | |
5522 | must be used instead of calling `SetUseBestVisual` later | |
5523 | on because it must be set before the underlying GUI | |
5524 | toolkit is initialized. | |
5525 | ||
5526 | :param clearSigInt: Should SIGINT be cleared? This allows the | |
5527 | app to terminate upon a Ctrl-C in the console like other | |
5528 | GUI apps will. | |
66c033b4 RD |
5529 | |
5530 | :note: You should override OnInit to do applicaition | |
5531 | initialization to ensure that the system, toolkit and | |
5532 | wxWidgets are fully initialized. | |
5533 | """ | |
d14a1e28 RD |
5534 | wx.PyApp.__init__(self) |
5535 | ||
5536 | if wx.Platform == "__WXMAC__": | |
5537 | try: | |
5538 | import MacOS | |
5539 | if not MacOS.WMAvailable(): | |
5540 | print """\ | |
5541 | This program needs access to the screen. Please run with 'pythonw', | |
5542 | not 'python', and only when you are logged in on the main display of | |
5543 | your Mac.""" | |
5544 | _sys.exit(1) | |
36cadbf7 RD |
5545 | except SystemExit: |
5546 | raise | |
d14a1e28 RD |
5547 | except: |
5548 | pass | |
5549 | ||
5550 | # This has to be done before OnInit | |
5551 | self.SetUseBestVisual(useBestVisual) | |
5552 | ||
5553 | # Set the default handler for SIGINT. This fixes a problem | |
5554 | # where if Ctrl-C is pressed in the console that started this | |
5555 | # app then it will not appear to do anything, (not even send | |
5556 | # KeyboardInterrupt???) but will later segfault on exit. By | |
5557 | # setting the default handler then the app will exit, as | |
5558 | # expected (depending on platform.) | |
03e37cd5 RD |
5559 | if clearSigInt: |
5560 | try: | |
5561 | import signal | |
5562 | signal.signal(signal.SIGINT, signal.SIG_DFL) | |
5563 | except: | |
5564 | pass | |
d14a1e28 RD |
5565 | |
5566 | # Save and redirect the stdio to a window? | |
5567 | self.stdioWin = None | |
5568 | self.saveStdio = (_sys.stdout, _sys.stderr) | |
5569 | if redirect: | |
5570 | self.RedirectStdio(filename) | |
5571 | ||
8fb0e70a RD |
5572 | # Use Python's install prefix as the default |
5573 | wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix) | |
5574 | ||
d14a1e28 RD |
5575 | # This finishes the initialization of wxWindows and then calls |
5576 | # the OnInit that should be present in the derived class | |
5577 | self._BootstrapApp() | |
5578 | ||
5579 | ||
5580 | def __del__(self): | |
5581 | try: | |
5582 | self.RestoreStdio() # Just in case the MainLoop was overridden | |
5583 | except: | |
5584 | pass | |
5585 | ||
5586 | ||
5587 | def SetTopWindow(self, frame): | |
1e0c8722 | 5588 | """Set the \"main\" top level window""" |
d14a1e28 RD |
5589 | if self.stdioWin: |
5590 | self.stdioWin.SetParent(frame) | |
5591 | wx.PyApp.SetTopWindow(self, frame) | |
5592 | ||
5593 | ||
5594 | def MainLoop(self): | |
1e0c8722 | 5595 | """Execute the main GUI event loop""" |
d14a1e28 RD |
5596 | wx.PyApp.MainLoop(self) |
5597 | self.RestoreStdio() | |
5598 | ||
5599 | ||
7409c0c6 | 5600 | def RedirectStdio(self, filename=None): |
1e0c8722 | 5601 | """Redirect sys.stdout and sys.stderr to a file or a popup window.""" |
d14a1e28 RD |
5602 | if filename: |
5603 | _sys.stdout = _sys.stderr = open(filename, 'a') | |
5604 | else: | |
5605 | self.stdioWin = self.outputWindowClass() | |
5606 | _sys.stdout = _sys.stderr = self.stdioWin | |
5607 | ||
5608 | ||
5609 | def RestoreStdio(self): | |
5610 | _sys.stdout, _sys.stderr = self.saveStdio | |
5611 | ||
5612 | ||
412d302d RD |
5613 | def SetOutputWindowAttributes(self, title=None, pos=None, size=None): |
5614 | """ | |
5615 | Set the title, position and/or size of the output window if | |
f5b96ee1 RD |
5616 | the stdio has been redirected. This should be called before |
5617 | any output would cause the output window to be created. | |
412d302d RD |
5618 | """ |
5619 | if self.stdioWin: | |
5620 | if title is not None: | |
5621 | self.stdioWin.title = title | |
5622 | if pos is not None: | |
5623 | self.stdioWin.pos = pos | |
5624 | if size is not None: | |
5625 | self.stdioWin.size = size | |
5626 | ||
5627 | ||
5628 | ||
d14a1e28 | 5629 | |
66c033b4 | 5630 | # change from wx.PyApp_XX to wx.App_XX |
54f9ee45 RD |
5631 | App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts |
5632 | App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId | |
5633 | App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId | |
5634 | App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId | |
5635 | App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName | |
5636 | App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts | |
5637 | App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId | |
5638 | App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId | |
5639 | App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId | |
5640 | App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName | |
5641 | App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version | |
d14a1e28 RD |
5642 | |
5643 | #---------------------------------------------------------------------------- | |
5644 | ||
5645 | class PySimpleApp(wx.App): | |
6c3b4aae RD |
5646 | """ |
5647 | A simple application class. You can just create one of these and | |
5648 | then then make your top level windows later, and not have to worry | |
66c033b4 RD |
5649 | about OnInit. For example:: |
5650 | ||
5651 | app = wx.PySimpleApp() | |
5652 | frame = wx.Frame(None, title='Hello World') | |
5653 | frame.Show() | |
5654 | app.MainLoop() | |
5655 | ||
5656 | :see: `wx.App` | |
5657 | """ | |
6c3b4aae | 5658 | |
03e37cd5 RD |
5659 | def __init__(self, redirect=False, filename=None, |
5660 | useBestVisual=False, clearSigInt=True): | |
66c033b4 RD |
5661 | """ |
5662 | :see: `wx.App.__init__` | |
5663 | """ | |
03e37cd5 | 5664 | wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt) |
6c3b4aae | 5665 | |
d14a1e28 | 5666 | def OnInit(self): |
d14a1e28 RD |
5667 | return True |
5668 | ||
5669 | ||
66c033b4 | 5670 | |
6c3b4aae | 5671 | # Is anybody using this one? |
d14a1e28 RD |
5672 | class PyWidgetTester(wx.App): |
5673 | def __init__(self, size = (250, 100)): | |
5674 | self.size = size | |
5675 | wx.App.__init__(self, 0) | |
5676 | ||
5677 | def OnInit(self): | |
196addbf | 5678 | self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size) |
d14a1e28 RD |
5679 | self.SetTopWindow(self.frame) |
5680 | return True | |
5681 | ||
66c033b4 RD |
5682 | def SetWidget(self, widgetClass, *args, **kwargs): |
5683 | w = widgetClass(self.frame, *args, **kwargs) | |
d14a1e28 RD |
5684 | self.frame.Show(True) |
5685 | ||
5686 | #---------------------------------------------------------------------------- | |
5687 | # DO NOT hold any other references to this object. This is how we | |
66c033b4 | 5688 | # know when to cleanup system resources that wxWidgets is holding. When |
d14a1e28 | 5689 | # the sys module is unloaded, the refcount on sys.__wxPythonCleanup |
66c033b4 | 5690 | # goes to zero and it calls the wx.App_CleanUp function. |
d14a1e28 RD |
5691 | |
5692 | class __wxPyCleanup: | |
5693 | def __init__(self): | |
54f9ee45 | 5694 | self.cleanup = _core_.App_CleanUp |
d14a1e28 RD |
5695 | def __del__(self): |
5696 | self.cleanup() | |
5697 | ||
5698 | _sys.__wxPythonCleanup = __wxPyCleanup() | |
5699 | ||
5700 | ## # another possible solution, but it gets called too early... | |
66c033b4 RD |
5701 | ## import atexit |
5702 | ## atexit.register(_core_.wxApp_CleanUp) | |
d14a1e28 RD |
5703 | |
5704 | ||
5705 | #---------------------------------------------------------------------------- | |
5706 | ||
5707 | #--------------------------------------------------------------------------- | |
2ef75293 RD |
5708 | |
5709 | class EventLoop(object): | |
093d3ff1 | 5710 | """Proxy of C++ EventLoop class""" |
2ef75293 RD |
5711 | def __repr__(self): |
5712 | return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5713 | def __init__(self, *args, **kwargs): | |
5714 | """__init__(self) -> EventLoop""" | |
5715 | newobj = _core_.new_EventLoop(*args, **kwargs) | |
5716 | self.this = newobj.this | |
5717 | self.thisown = 1 | |
5718 | del newobj.thisown | |
5719 | def __del__(self, destroy=_core_.delete_EventLoop): | |
5720 | """__del__(self)""" | |
5721 | try: | |
5722 | if self.thisown: destroy(self) | |
5723 | except: pass | |
5724 | ||
5725 | def Run(*args, **kwargs): | |
5726 | """Run(self) -> int""" | |
5727 | return _core_.EventLoop_Run(*args, **kwargs) | |
5728 | ||
5729 | def Exit(*args, **kwargs): | |
5730 | """Exit(self, int rc=0)""" | |
5731 | return _core_.EventLoop_Exit(*args, **kwargs) | |
5732 | ||
5733 | def Pending(*args, **kwargs): | |
5734 | """Pending(self) -> bool""" | |
5735 | return _core_.EventLoop_Pending(*args, **kwargs) | |
5736 | ||
5737 | def Dispatch(*args, **kwargs): | |
5738 | """Dispatch(self) -> bool""" | |
5739 | return _core_.EventLoop_Dispatch(*args, **kwargs) | |
5740 | ||
5741 | def IsRunning(*args, **kwargs): | |
5742 | """IsRunning(self) -> bool""" | |
5743 | return _core_.EventLoop_IsRunning(*args, **kwargs) | |
5744 | ||
5745 | def GetActive(*args, **kwargs): | |
5746 | """GetActive() -> EventLoop""" | |
5747 | return _core_.EventLoop_GetActive(*args, **kwargs) | |
5748 | ||
5749 | GetActive = staticmethod(GetActive) | |
5750 | def SetActive(*args, **kwargs): | |
5751 | """SetActive(EventLoop loop)""" | |
5752 | return _core_.EventLoop_SetActive(*args, **kwargs) | |
5753 | ||
5754 | SetActive = staticmethod(SetActive) | |
5755 | ||
5756 | class EventLoopPtr(EventLoop): | |
5757 | def __init__(self, this): | |
5758 | self.this = this | |
5759 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5760 | self.__class__ = EventLoop | |
5761 | _core_.EventLoop_swigregister(EventLoopPtr) | |
5762 | ||
5763 | def EventLoop_GetActive(*args, **kwargs): | |
5764 | """EventLoop_GetActive() -> EventLoop""" | |
5765 | return _core_.EventLoop_GetActive(*args, **kwargs) | |
5766 | ||
5767 | def EventLoop_SetActive(*args, **kwargs): | |
5768 | """EventLoop_SetActive(EventLoop loop)""" | |
5769 | return _core_.EventLoop_SetActive(*args, **kwargs) | |
5770 | ||
5771 | #--------------------------------------------------------------------------- | |
d14a1e28 | 5772 | |
1e0c8722 | 5773 | class AcceleratorEntry(object): |
66c033b4 RD |
5774 | """ |
5775 | A class used to define items in an `wx.AcceleratorTable`. wxPython | |
5776 | programs can choose to use wx.AcceleratorEntry objects, but using a | |
5777 | list of 3-tuple of integers (flags, keyCode, cmdID) usually works just | |
41e2b43e | 5778 | as well. See `__init__` for of the tuple values. |
66c033b4 RD |
5779 | |
5780 | :see: `wx.AcceleratorTable` | |
5781 | """ | |
1e0c8722 RD |
5782 | def __repr__(self): |
5783 | return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5784 | def __init__(self, *args, **kwargs): | |
66c033b4 RD |
5785 | """ |
5786 | __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry | |
5787 | ||
5788 | Construct a wx.AcceleratorEntry. | |
66c033b4 | 5789 | """ |
54f9ee45 | 5790 | newobj = _core_.new_AcceleratorEntry(*args, **kwargs) |
1e0c8722 RD |
5791 | self.this = newobj.this |
5792 | self.thisown = 1 | |
5793 | del newobj.thisown | |
54f9ee45 | 5794 | def __del__(self, destroy=_core_.delete_AcceleratorEntry): |
a95a7133 | 5795 | """__del__(self)""" |
1e0c8722 RD |
5796 | try: |
5797 | if self.thisown: destroy(self) | |
5798 | except: pass | |
5799 | ||
5800 | def Set(*args, **kwargs): | |
66c033b4 RD |
5801 | """ |
5802 | Set(self, int flags, int keyCode, int cmd) | |
1e0c8722 | 5803 | |
66c033b4 RD |
5804 | (Re)set the attributes of a wx.AcceleratorEntry. |
5805 | :see `__init__` | |
5806 | """ | |
5807 | return _core_.AcceleratorEntry_Set(*args, **kwargs) | |
1e0c8722 RD |
5808 | |
5809 | def GetFlags(*args, **kwargs): | |
66c033b4 RD |
5810 | """ |
5811 | GetFlags(self) -> int | |
5812 | ||
5813 | Get the AcceleratorEntry's flags. | |
5814 | """ | |
54f9ee45 | 5815 | return _core_.AcceleratorEntry_GetFlags(*args, **kwargs) |
1e0c8722 RD |
5816 | |
5817 | def GetKeyCode(*args, **kwargs): | |
66c033b4 RD |
5818 | """ |
5819 | GetKeyCode(self) -> int | |
5820 | ||
5821 | Get the AcceleratorEntry's keycode. | |
5822 | """ | |
54f9ee45 | 5823 | return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs) |
1e0c8722 RD |
5824 | |
5825 | def GetCommand(*args, **kwargs): | |
66c033b4 RD |
5826 | """ |
5827 | GetCommand(self) -> int | |
5828 | ||
5829 | Get the AcceleratorEntry's command ID. | |
5830 | """ | |
54f9ee45 | 5831 | return _core_.AcceleratorEntry_GetCommand(*args, **kwargs) |
1e0c8722 RD |
5832 | |
5833 | ||
5834 | class AcceleratorEntryPtr(AcceleratorEntry): | |
5835 | def __init__(self, this): | |
5836 | self.this = this | |
5837 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5838 | self.__class__ = AcceleratorEntry | |
54f9ee45 | 5839 | _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr) |
1e0c8722 RD |
5840 | |
5841 | class AcceleratorTable(Object): | |
66c033b4 RD |
5842 | """ |
5843 | An accelerator table allows the application to specify a table of | |
5844 | keyboard shortcuts for menus or other commands. On Windows, menu or | |
5845 | button commands are supported; on GTK, only menu commands are | |
5846 | supported. | |
66c033b4 | 5847 | """ |
1e0c8722 RD |
5848 | def __repr__(self): |
5849 | return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5850 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
5851 | """ |
5852 | __init__(entries) -> AcceleratorTable | |
1e0c8722 | 5853 | |
66c033b4 RD |
5854 | Construct an AcceleratorTable from a list of `wx.AcceleratorEntry` |
5855 | items or or of 3-tuples (flags, keyCode, cmdID) | |
5856 | ||
5857 | :see: `wx.AcceleratorEntry` | |
0df68c9f | 5858 | """ |
54f9ee45 | 5859 | newobj = _core_.new_AcceleratorTable(*args, **kwargs) |
1e0c8722 RD |
5860 | self.this = newobj.this |
5861 | self.thisown = 1 | |
5862 | del newobj.thisown | |
54f9ee45 | 5863 | def __del__(self, destroy=_core_.delete_AcceleratorTable): |
a95a7133 | 5864 | """__del__(self)""" |
1e0c8722 RD |
5865 | try: |
5866 | if self.thisown: destroy(self) | |
5867 | except: pass | |
5868 | ||
5869 | def Ok(*args, **kwargs): | |
a95a7133 | 5870 | """Ok(self) -> bool""" |
54f9ee45 | 5871 | return _core_.AcceleratorTable_Ok(*args, **kwargs) |
1e0c8722 RD |
5872 | |
5873 | ||
5874 | class AcceleratorTablePtr(AcceleratorTable): | |
5875 | def __init__(self, this): | |
5876 | self.this = this | |
5877 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5878 | self.__class__ = AcceleratorTable | |
54f9ee45 | 5879 | _core_.AcceleratorTable_swigregister(AcceleratorTablePtr) |
1e0c8722 RD |
5880 | |
5881 | ||
5882 | def GetAccelFromString(*args, **kwargs): | |
196addbf | 5883 | """GetAccelFromString(String label) -> AcceleratorEntry""" |
54f9ee45 | 5884 | return _core_.GetAccelFromString(*args, **kwargs) |
1e0c8722 RD |
5885 | #--------------------------------------------------------------------------- |
5886 | ||
74a57fcd RD |
5887 | class VisualAttributes(object): |
5888 | """struct containing all the visual attributes of a control""" | |
5889 | def __repr__(self): | |
5890 | return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5891 | def __init__(self, *args, **kwargs): | |
5892 | """ | |
a95a7133 | 5893 | __init__(self) -> VisualAttributes |
74a57fcd RD |
5894 | |
5895 | struct containing all the visual attributes of a control | |
5896 | """ | |
54f9ee45 | 5897 | newobj = _core_.new_VisualAttributes(*args, **kwargs) |
74a57fcd RD |
5898 | self.this = newobj.this |
5899 | self.thisown = 1 | |
5900 | del newobj.thisown | |
54f9ee45 | 5901 | def __del__(self, destroy=_core_.delete_VisualAttributes): |
a95a7133 | 5902 | """__del__(self)""" |
74a57fcd RD |
5903 | try: |
5904 | if self.thisown: destroy(self) | |
5905 | except: pass | |
5906 | ||
54f9ee45 RD |
5907 | font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set) |
5908 | colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set) | |
5909 | colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set) | |
74a57fcd RD |
5910 | |
5911 | class VisualAttributesPtr(VisualAttributes): | |
5912 | def __init__(self, this): | |
5913 | self.this = this | |
5914 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5915 | self.__class__ = VisualAttributes | |
54f9ee45 | 5916 | _core_.VisualAttributes_swigregister(VisualAttributesPtr) |
74a57fcd RD |
5917 | NullAcceleratorTable = cvar.NullAcceleratorTable |
5918 | PanelNameStr = cvar.PanelNameStr | |
5919 | ||
54f9ee45 RD |
5920 | WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL |
5921 | WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL | |
5922 | WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI | |
5923 | WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE | |
5924 | WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX | |
d14a1e28 | 5925 | class Window(EvtHandler): |
15afbcd0 RD |
5926 | """ |
5927 | wx.Window is the base class for all windows and represents any visible | |
5928 | object on the screen. All controls, top level windows and so on are | |
5929 | wx.Windows. Sizers and device contexts are not however, as they don't | |
5930 | appear on screen themselves. | |
5931 | ||
5932 | """ | |
e811c8ce RD |
5933 | def __repr__(self): |
5934 | return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5935 | def __init__(self, *args, **kwargs): |
0df68c9f | 5936 | """ |
a95a7133 | 5937 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
74a57fcd | 5938 | Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window |
15afbcd0 RD |
5939 | |
5940 | Construct and show a generic Window. | |
0df68c9f | 5941 | """ |
54f9ee45 | 5942 | newobj = _core_.new_Window(*args, **kwargs) |
d14a1e28 RD |
5943 | self.this = newobj.this |
5944 | self.thisown = 1 | |
5945 | del newobj.thisown | |
5946 | self._setOORInfo(self) | |
d14a1e28 | 5947 | |
e811c8ce | 5948 | def Create(*args, **kwargs): |
0df68c9f | 5949 | """ |
a95a7133 | 5950 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
74a57fcd | 5951 | Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool |
15afbcd0 RD |
5952 | |
5953 | Create the GUI part of the Window for 2-phase creation mode. | |
0df68c9f | 5954 | """ |
54f9ee45 | 5955 | return _core_.Window_Create(*args, **kwargs) |
d14a1e28 | 5956 | |
e811c8ce | 5957 | def Close(*args, **kwargs): |
15afbcd0 | 5958 | """ |
a95a7133 | 5959 | Close(self, bool force=False) -> bool |
15afbcd0 RD |
5960 | |
5961 | This function simply generates a EVT_CLOSE event whose handler usually | |
5962 | tries to close the window. It doesn't close the window itself, | |
5963 | however. If force is False (the default) then the window's close | |
5964 | handler will be allowed to veto the destruction of the window. | |
15afbcd0 | 5965 | """ |
54f9ee45 | 5966 | return _core_.Window_Close(*args, **kwargs) |
d14a1e28 | 5967 | |
e811c8ce | 5968 | def Destroy(*args, **kwargs): |
0df68c9f | 5969 | """ |
a95a7133 | 5970 | Destroy(self) -> bool |
d14a1e28 | 5971 | |
15afbcd0 RD |
5972 | Destroys the window safely. Frames and dialogs are not destroyed |
5973 | immediately when this function is called -- they are added to a list | |
5974 | of windows to be deleted on idle time, when all the window's events | |
5975 | have been processed. This prevents problems with events being sent to | |
5976 | non-existent windows. | |
5977 | ||
5978 | Returns True if the window has either been successfully deleted, or it | |
5979 | has been added to the list of windows pending real deletion. | |
0df68c9f | 5980 | """ |
54f9ee45 | 5981 | return _core_.Window_Destroy(*args, **kwargs) |
d14a1e28 | 5982 | |
e811c8ce | 5983 | def DestroyChildren(*args, **kwargs): |
15afbcd0 | 5984 | """ |
a95a7133 | 5985 | DestroyChildren(self) -> bool |
15afbcd0 | 5986 | |
41e2b43e RD |
5987 | Destroys all children of a window. Called automatically by the |
5988 | destructor. | |
15afbcd0 | 5989 | """ |
54f9ee45 | 5990 | return _core_.Window_DestroyChildren(*args, **kwargs) |
d14a1e28 | 5991 | |
e811c8ce | 5992 | def IsBeingDeleted(*args, **kwargs): |
15afbcd0 | 5993 | """ |
a95a7133 | 5994 | IsBeingDeleted(self) -> bool |
15afbcd0 RD |
5995 | |
5996 | Is the window in the process of being deleted? | |
5997 | """ | |
54f9ee45 | 5998 | return _core_.Window_IsBeingDeleted(*args, **kwargs) |
d14a1e28 | 5999 | |
e811c8ce | 6000 | def SetTitle(*args, **kwargs): |
15afbcd0 | 6001 | """ |
a95a7133 | 6002 | SetTitle(self, String title) |
15afbcd0 RD |
6003 | |
6004 | Sets the window's title. Applicable only to frames and dialogs. | |
6005 | """ | |
54f9ee45 | 6006 | return _core_.Window_SetTitle(*args, **kwargs) |
d14a1e28 | 6007 | |
e811c8ce | 6008 | def GetTitle(*args, **kwargs): |
15afbcd0 | 6009 | """ |
a95a7133 | 6010 | GetTitle(self) -> String |
15afbcd0 RD |
6011 | |
6012 | Gets the window's title. Applicable only to frames and dialogs. | |
6013 | """ | |
54f9ee45 | 6014 | return _core_.Window_GetTitle(*args, **kwargs) |
d14a1e28 | 6015 | |
e811c8ce | 6016 | def SetLabel(*args, **kwargs): |
15afbcd0 | 6017 | """ |
a95a7133 | 6018 | SetLabel(self, String label) |
15afbcd0 RD |
6019 | |
6020 | Set the text which the window shows in its label if applicable. | |
6021 | """ | |
54f9ee45 | 6022 | return _core_.Window_SetLabel(*args, **kwargs) |
d14a1e28 | 6023 | |
e811c8ce | 6024 | def GetLabel(*args, **kwargs): |
15afbcd0 | 6025 | """ |
a95a7133 | 6026 | GetLabel(self) -> String |
15afbcd0 | 6027 | |
41e2b43e RD |
6028 | Generic way of getting a label from any window, for identification |
6029 | purposes. The interpretation of this function differs from class to | |
6030 | class. For frames and dialogs, the value returned is the title. For | |
6031 | buttons or static text controls, it is the button text. This function | |
6032 | can be useful for meta-programs such as testing tools or special-needs | |
6033 | access programs)which need to identify windows by name. | |
15afbcd0 | 6034 | """ |
54f9ee45 | 6035 | return _core_.Window_GetLabel(*args, **kwargs) |
d14a1e28 | 6036 | |
e811c8ce | 6037 | def SetName(*args, **kwargs): |
15afbcd0 | 6038 | """ |
a95a7133 | 6039 | SetName(self, String name) |
15afbcd0 | 6040 | |
41e2b43e RD |
6041 | Sets the window's name. The window name is used for ressource setting |
6042 | in X, it is not the same as the window title/label | |
15afbcd0 | 6043 | """ |
54f9ee45 | 6044 | return _core_.Window_SetName(*args, **kwargs) |
d14a1e28 | 6045 | |
e811c8ce | 6046 | def GetName(*args, **kwargs): |
15afbcd0 | 6047 | """ |
a95a7133 | 6048 | GetName(self) -> String |
15afbcd0 | 6049 | |
41e2b43e RD |
6050 | Returns the windows name. This name is not guaranteed to be unique; |
6051 | it is up to the programmer to supply an appropriate name in the window | |
6052 | constructor or via wx.Window.SetName. | |
15afbcd0 | 6053 | """ |
54f9ee45 | 6054 | return _core_.Window_GetName(*args, **kwargs) |
d14a1e28 | 6055 | |
4276dc52 RD |
6056 | def SetWindowVariant(*args, **kwargs): |
6057 | """ | |
a95a7133 | 6058 | SetWindowVariant(self, int variant) |
4276dc52 | 6059 | |
41e2b43e RD |
6060 | Sets the variant of the window/font size to use for this window, if |
6061 | the platform supports variants, for example, wxMac. | |
4276dc52 | 6062 | """ |
54f9ee45 | 6063 | return _core_.Window_SetWindowVariant(*args, **kwargs) |
4276dc52 RD |
6064 | |
6065 | def GetWindowVariant(*args, **kwargs): | |
a95a7133 | 6066 | """GetWindowVariant(self) -> int""" |
54f9ee45 | 6067 | return _core_.Window_GetWindowVariant(*args, **kwargs) |
4276dc52 | 6068 | |
e811c8ce | 6069 | def SetId(*args, **kwargs): |
15afbcd0 | 6070 | """ |
a95a7133 | 6071 | SetId(self, int winid) |
15afbcd0 RD |
6072 | |
6073 | Sets the identifier of the window. Each window has an integer | |
6074 | identifier. If the application has not provided one, an identifier | |
6075 | will be generated. Normally, the identifier should be provided on | |
6076 | creation and should not be modified subsequently. | |
6077 | """ | |
54f9ee45 | 6078 | return _core_.Window_SetId(*args, **kwargs) |
d14a1e28 | 6079 | |
e811c8ce | 6080 | def GetId(*args, **kwargs): |
15afbcd0 | 6081 | """ |
a95a7133 | 6082 | GetId(self) -> int |
15afbcd0 RD |
6083 | |
6084 | Returns the identifier of the window. Each window has an integer | |
6085 | identifier. If the application has not provided one (or the default Id | |
6086 | -1 is used) then an unique identifier with a negative value will be | |
6087 | generated. | |
6088 | """ | |
54f9ee45 | 6089 | return _core_.Window_GetId(*args, **kwargs) |
d14a1e28 | 6090 | |
e811c8ce | 6091 | def NewControlId(*args, **kwargs): |
15afbcd0 | 6092 | """ |
66c033b4 | 6093 | NewControlId() -> int |
15afbcd0 RD |
6094 | |
6095 | Generate a control id for the controls which were not given one. | |
6096 | """ | |
54f9ee45 | 6097 | return _core_.Window_NewControlId(*args, **kwargs) |
d14a1e28 | 6098 | |
e811c8ce RD |
6099 | NewControlId = staticmethod(NewControlId) |
6100 | def NextControlId(*args, **kwargs): | |
15afbcd0 | 6101 | """ |
66c033b4 | 6102 | NextControlId(int winid) -> int |
15afbcd0 RD |
6103 | |
6104 | Get the id of the control following the one with the given | |
41e2b43e | 6105 | autogenerated) id |
15afbcd0 | 6106 | """ |
54f9ee45 | 6107 | return _core_.Window_NextControlId(*args, **kwargs) |
d14a1e28 | 6108 | |
e811c8ce RD |
6109 | NextControlId = staticmethod(NextControlId) |
6110 | def PrevControlId(*args, **kwargs): | |
15afbcd0 | 6111 | """ |
66c033b4 | 6112 | PrevControlId(int winid) -> int |
15afbcd0 RD |
6113 | |
6114 | Get the id of the control preceding the one with the given | |
41e2b43e | 6115 | autogenerated) id |
15afbcd0 | 6116 | """ |
54f9ee45 | 6117 | return _core_.Window_PrevControlId(*args, **kwargs) |
d14a1e28 | 6118 | |
e811c8ce RD |
6119 | PrevControlId = staticmethod(PrevControlId) |
6120 | def SetSize(*args, **kwargs): | |
15afbcd0 | 6121 | """ |
a95a7133 | 6122 | SetSize(self, Size size) |
15afbcd0 RD |
6123 | |
6124 | Sets the size of the window in pixels. | |
6125 | """ | |
54f9ee45 | 6126 | return _core_.Window_SetSize(*args, **kwargs) |
d14a1e28 | 6127 | |
e811c8ce | 6128 | def SetDimensions(*args, **kwargs): |
15afbcd0 | 6129 | """ |
a95a7133 | 6130 | SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) |
15afbcd0 RD |
6131 | |
6132 | Sets the position and size of the window in pixels. The sizeFlags | |
6133 | parameter indicates the interpretation of the other params if they are | |
e505d15e RD |
6134 | equal to -1. |
6135 | ||
6136 | ======================== ====================================== | |
6137 | wx.SIZE_AUTO A -1 indicates that a class-specific | |
6138 | default should be used. | |
6139 | wx.SIZE_USE_EXISTING Axisting dimensions should be used if | |
6140 | -1 values are supplied. | |
6141 | wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be | |
6142 | interpreted as real dimensions, not | |
6143 | default values. | |
6144 | ======================== ====================================== | |
6145 | ||
15afbcd0 | 6146 | """ |
54f9ee45 | 6147 | return _core_.Window_SetDimensions(*args, **kwargs) |
d14a1e28 | 6148 | |
e811c8ce | 6149 | def SetRect(*args, **kwargs): |
15afbcd0 | 6150 | """ |
a95a7133 | 6151 | SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO) |
15afbcd0 RD |
6152 | |
6153 | Sets the position and size of the window in pixels using a wx.Rect. | |
6154 | """ | |
54f9ee45 | 6155 | return _core_.Window_SetRect(*args, **kwargs) |
d14a1e28 | 6156 | |
e811c8ce | 6157 | def SetSizeWH(*args, **kwargs): |
15afbcd0 | 6158 | """ |
a95a7133 | 6159 | SetSizeWH(self, int width, int height) |
15afbcd0 RD |
6160 | |
6161 | Sets the size of the window in pixels. | |
6162 | """ | |
54f9ee45 | 6163 | return _core_.Window_SetSizeWH(*args, **kwargs) |
d14a1e28 | 6164 | |
e811c8ce | 6165 | def Move(*args, **kwargs): |
15afbcd0 | 6166 | """ |
a95a7133 | 6167 | Move(self, Point pt, int flags=SIZE_USE_EXISTING) |
15afbcd0 RD |
6168 | |
6169 | Moves the window to the given position. | |
6170 | """ | |
54f9ee45 | 6171 | return _core_.Window_Move(*args, **kwargs) |
d14a1e28 | 6172 | |
e811c8ce RD |
6173 | SetPosition = Move |
6174 | def MoveXY(*args, **kwargs): | |
15afbcd0 | 6175 | """ |
a95a7133 | 6176 | MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING) |
15afbcd0 RD |
6177 | |
6178 | Moves the window to the given position. | |
6179 | """ | |
54f9ee45 | 6180 | return _core_.Window_MoveXY(*args, **kwargs) |
e811c8ce | 6181 | |
f8167d6e RD |
6182 | def SetBestFittingSize(*args, **kwargs): |
6183 | """ | |
6184 | SetBestFittingSize(self, Size size=DefaultSize) | |
6185 | ||
6186 | A 'Smart' SetSize that will fill in default size components with the | |
6187 | window's *best size* values. Also set's the minsize for use with sizers. | |
6188 | """ | |
6189 | return _core_.Window_SetBestFittingSize(*args, **kwargs) | |
6190 | ||
e811c8ce | 6191 | def Raise(*args, **kwargs): |
15afbcd0 | 6192 | """ |
a95a7133 | 6193 | Raise(self) |
15afbcd0 RD |
6194 | |
6195 | Raises the window to the top of the window hierarchy if it is a | |
6196 | managed window (dialog or frame). | |
6197 | """ | |
54f9ee45 | 6198 | return _core_.Window_Raise(*args, **kwargs) |
e811c8ce RD |
6199 | |
6200 | def Lower(*args, **kwargs): | |
15afbcd0 | 6201 | """ |
a95a7133 | 6202 | Lower(self) |
15afbcd0 RD |
6203 | |
6204 | Lowers the window to the bottom of the window hierarchy if it is a | |
6205 | managed window (dialog or frame). | |
6206 | """ | |
54f9ee45 | 6207 | return _core_.Window_Lower(*args, **kwargs) |
e811c8ce RD |
6208 | |
6209 | def SetClientSize(*args, **kwargs): | |
15afbcd0 | 6210 | """ |
a95a7133 | 6211 | SetClientSize(self, Size size) |
15afbcd0 RD |
6212 | |
6213 | This sets the size of the window client area in pixels. Using this | |
6214 | function to size a window tends to be more device-independent than | |
6215 | wx.Window.SetSize, since the application need not worry about what | |
6216 | dimensions the border or title bar have when trying to fit the window | |
6217 | around panel items, for example. | |
6218 | """ | |
54f9ee45 | 6219 | return _core_.Window_SetClientSize(*args, **kwargs) |
e811c8ce RD |
6220 | |
6221 | def SetClientSizeWH(*args, **kwargs): | |
15afbcd0 | 6222 | """ |
a95a7133 | 6223 | SetClientSizeWH(self, int width, int height) |
15afbcd0 RD |
6224 | |
6225 | This sets the size of the window client area in pixels. Using this | |
6226 | function to size a window tends to be more device-independent than | |
6227 | wx.Window.SetSize, since the application need not worry about what | |
6228 | dimensions the border or title bar have when trying to fit the window | |
6229 | around panel items, for example. | |
6230 | """ | |
54f9ee45 | 6231 | return _core_.Window_SetClientSizeWH(*args, **kwargs) |
e811c8ce RD |
6232 | |
6233 | def SetClientRect(*args, **kwargs): | |
15afbcd0 | 6234 | """ |
a95a7133 | 6235 | SetClientRect(self, Rect rect) |
15afbcd0 RD |
6236 | |
6237 | This sets the size of the window client area in pixels. Using this | |
6238 | function to size a window tends to be more device-independent than | |
6239 | wx.Window.SetSize, since the application need not worry about what | |
6240 | dimensions the border or title bar have when trying to fit the window | |
6241 | around panel items, for example. | |
6242 | """ | |
54f9ee45 | 6243 | return _core_.Window_SetClientRect(*args, **kwargs) |
e811c8ce RD |
6244 | |
6245 | def GetPosition(*args, **kwargs): | |
0df68c9f | 6246 | """ |
a95a7133 | 6247 | GetPosition(self) -> Point |
e811c8ce | 6248 | |
0df68c9f RD |
6249 | Get the window's position. |
6250 | """ | |
54f9ee45 | 6251 | return _core_.Window_GetPosition(*args, **kwargs) |
e811c8ce RD |
6252 | |
6253 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
6254 | """ |
6255 | GetPositionTuple() -> (x,y) | |
e811c8ce | 6256 | |
0df68c9f RD |
6257 | Get the window's position. |
6258 | """ | |
54f9ee45 | 6259 | return _core_.Window_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
6260 | |
6261 | def GetSize(*args, **kwargs): | |
0df68c9f | 6262 | """ |
a95a7133 | 6263 | GetSize(self) -> Size |
e811c8ce | 6264 | |
0df68c9f RD |
6265 | Get the window size. |
6266 | """ | |
54f9ee45 | 6267 | return _core_.Window_GetSize(*args, **kwargs) |
e811c8ce RD |
6268 | |
6269 | def GetSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6270 | """ |
6271 | GetSizeTuple() -> (width, height) | |
e811c8ce | 6272 | |
0df68c9f RD |
6273 | Get the window size. |
6274 | """ | |
54f9ee45 | 6275 | return _core_.Window_GetSizeTuple(*args, **kwargs) |
e811c8ce RD |
6276 | |
6277 | def GetRect(*args, **kwargs): | |
15afbcd0 | 6278 | """ |
a95a7133 | 6279 | GetRect(self) -> Rect |
15afbcd0 RD |
6280 | |
6281 | Returns the size and position of the window as a wx.Rect object. | |
6282 | """ | |
54f9ee45 | 6283 | return _core_.Window_GetRect(*args, **kwargs) |
e811c8ce RD |
6284 | |
6285 | def GetClientSize(*args, **kwargs): | |
0df68c9f | 6286 | """ |
a95a7133 | 6287 | GetClientSize(self) -> Size |
e811c8ce | 6288 | |
15afbcd0 RD |
6289 | This gets the size of the window's 'client area' in pixels. The client |
6290 | area is the area which may be drawn on by the programmer, excluding | |
6291 | title bar, border, scrollbars, etc. | |
0df68c9f | 6292 | """ |
54f9ee45 | 6293 | return _core_.Window_GetClientSize(*args, **kwargs) |
e811c8ce RD |
6294 | |
6295 | def GetClientSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6296 | """ |
6297 | GetClientSizeTuple() -> (width, height) | |
e811c8ce | 6298 | |
15afbcd0 RD |
6299 | This gets the size of the window's 'client area' in pixels. The client |
6300 | area is the area which may be drawn on by the programmer, excluding | |
6301 | title bar, border, scrollbars, etc. | |
0df68c9f | 6302 | """ |
54f9ee45 | 6303 | return _core_.Window_GetClientSizeTuple(*args, **kwargs) |
e811c8ce RD |
6304 | |
6305 | def GetClientAreaOrigin(*args, **kwargs): | |
15afbcd0 | 6306 | """ |
a95a7133 | 6307 | GetClientAreaOrigin(self) -> Point |
15afbcd0 RD |
6308 | |
6309 | Get the origin of the client area of the window relative to the | |
6310 | window's top left corner (the client area may be shifted because of | |
6311 | the borders, scrollbars, other decorations...) | |
6312 | """ | |
54f9ee45 | 6313 | return _core_.Window_GetClientAreaOrigin(*args, **kwargs) |
e811c8ce RD |
6314 | |
6315 | def GetClientRect(*args, **kwargs): | |
15afbcd0 | 6316 | """ |
a95a7133 | 6317 | GetClientRect(self) -> Rect |
15afbcd0 | 6318 | |
61863841 | 6319 | Get the client area position and size as a `wx.Rect` object. |
15afbcd0 | 6320 | """ |
54f9ee45 | 6321 | return _core_.Window_GetClientRect(*args, **kwargs) |
e811c8ce RD |
6322 | |
6323 | def GetBestSize(*args, **kwargs): | |
0df68c9f | 6324 | """ |
a95a7133 | 6325 | GetBestSize(self) -> Size |
e811c8ce | 6326 | |
248ed943 | 6327 | This function returns the best acceptable minimal size for the |
41e2b43e RD |
6328 | window, if applicable. For example, for a static text control, it will |
6329 | be the minimal size such that the control label is not truncated. For | |
6330 | windows containing subwindows (suzh aswx.Panel), the size returned by | |
6331 | this function will be the same as the size the window would have had | |
6332 | after calling Fit. | |
0df68c9f | 6333 | """ |
54f9ee45 | 6334 | return _core_.Window_GetBestSize(*args, **kwargs) |
e811c8ce RD |
6335 | |
6336 | def GetBestSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6337 | """ |
6338 | GetBestSizeTuple() -> (width, height) | |
e811c8ce | 6339 | |
248ed943 | 6340 | This function returns the best acceptable minimal size for the |
41e2b43e RD |
6341 | window, if applicable. For example, for a static text control, it will |
6342 | be the minimal size such that the control label is not truncated. For | |
6343 | windows containing subwindows (suzh aswx.Panel), the size returned by | |
6344 | this function will be the same as the size the window would have had | |
6345 | after calling Fit. | |
0df68c9f | 6346 | """ |
54f9ee45 | 6347 | return _core_.Window_GetBestSizeTuple(*args, **kwargs) |
e811c8ce | 6348 | |
dfbb5885 RD |
6349 | def InvalidateBestSize(*args, **kwargs): |
6350 | """ | |
6351 | InvalidateBestSize(self) | |
6352 | ||
6353 | Reset the cached best size value so it will be recalculated the next | |
6354 | time it is needed. | |
6355 | """ | |
6356 | return _core_.Window_InvalidateBestSize(*args, **kwargs) | |
6357 | ||
6358 | def GetBestFittingSize(*args, **kwargs): | |
6359 | """ | |
6360 | GetBestFittingSize(self) -> Size | |
6361 | ||
6362 | This function will merge the window's best size into the window's | |
6363 | minimum size, giving priority to the min size components, and returns | |
6364 | the results. | |
6365 | ||
6366 | """ | |
6367 | return _core_.Window_GetBestFittingSize(*args, **kwargs) | |
6368 | ||
e811c8ce | 6369 | def GetAdjustedBestSize(*args, **kwargs): |
15afbcd0 | 6370 | """ |
a95a7133 | 6371 | GetAdjustedBestSize(self) -> Size |
15afbcd0 RD |
6372 | |
6373 | This method is similar to GetBestSize, except in one | |
6374 | thing. GetBestSize should return the minimum untruncated size of the | |
6375 | window, while this method will return the largest of BestSize and any | |
6376 | user specified minimum size. ie. it is the minimum size the window | |
6377 | should currently be drawn at, not the minimal size it can possibly | |
6378 | tolerate. | |
6379 | """ | |
54f9ee45 | 6380 | return _core_.Window_GetAdjustedBestSize(*args, **kwargs) |
e811c8ce RD |
6381 | |
6382 | def Center(*args, **kwargs): | |
15afbcd0 | 6383 | """ |
a95a7133 | 6384 | Center(self, int direction=BOTH) |
15afbcd0 RD |
6385 | |
6386 | Centers the window. The parameter specifies the direction for | |
6387 | cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may | |
6388 | also include wx.CENTER_ON_SCREEN flag if you want to center the window | |
6389 | on the entire screen and not on its parent window. If it is a | |
6390 | top-level window and has no parent then it will always be centered | |
6391 | relative to the screen. | |
6392 | """ | |
54f9ee45 | 6393 | return _core_.Window_Center(*args, **kwargs) |
e811c8ce RD |
6394 | |
6395 | Centre = Center | |
6396 | def CenterOnScreen(*args, **kwargs): | |
15afbcd0 | 6397 | """ |
a95a7133 | 6398 | CenterOnScreen(self, int dir=BOTH) |
15afbcd0 RD |
6399 | |
6400 | Center on screen (only works for top level windows) | |
6401 | """ | |
54f9ee45 | 6402 | return _core_.Window_CenterOnScreen(*args, **kwargs) |
e811c8ce RD |
6403 | |
6404 | CentreOnScreen = CenterOnScreen | |
6405 | def CenterOnParent(*args, **kwargs): | |
15afbcd0 | 6406 | """ |
a95a7133 | 6407 | CenterOnParent(self, int dir=BOTH) |
15afbcd0 RD |
6408 | |
6409 | Center with respect to the the parent window | |
6410 | """ | |
54f9ee45 | 6411 | return _core_.Window_CenterOnParent(*args, **kwargs) |
e811c8ce RD |
6412 | |
6413 | CentreOnParent = CenterOnParent | |
6414 | def Fit(*args, **kwargs): | |
15afbcd0 | 6415 | """ |
a95a7133 | 6416 | Fit(self) |
15afbcd0 RD |
6417 | |
6418 | Sizes the window so that it fits around its subwindows. This function | |
6419 | won't do anything if there are no subwindows and will only really work | |
6420 | correctly if sizers are used for the subwindows layout. Also, if the | |
6421 | window has exactly one subwindow it is better (faster and the result | |
6422 | is more precise as Fit adds some margin to account for fuzziness of | |
6423 | its calculations) to call window.SetClientSize(child.GetSize()) | |
6424 | instead of calling Fit. | |
6425 | """ | |
54f9ee45 | 6426 | return _core_.Window_Fit(*args, **kwargs) |
e811c8ce RD |
6427 | |
6428 | def FitInside(*args, **kwargs): | |
15afbcd0 | 6429 | """ |
a95a7133 | 6430 | FitInside(self) |
15afbcd0 RD |
6431 | |
6432 | Similar to Fit, but sizes the interior (virtual) size of a | |
6433 | window. Mainly useful with scrolled windows to reset scrollbars after | |
6434 | sizing changes that do not trigger a size event, and/or scrolled | |
6435 | windows without an interior sizer. This function similarly won't do | |
6436 | anything if there are no subwindows. | |
6437 | """ | |
54f9ee45 | 6438 | return _core_.Window_FitInside(*args, **kwargs) |
e811c8ce | 6439 | |
f16ab95d | 6440 | def SetSizeHints(*args, **kwargs): |
0df68c9f | 6441 | """ |
a95a7133 | 6442 | SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, |
0df68c9f | 6443 | int incH=-1) |
15afbcd0 RD |
6444 | |
6445 | Allows specification of minimum and maximum window sizes, and window | |
6446 | size increments. If a pair of values is not set (or set to -1), the | |
6447 | default values will be used. If this function is called, the user | |
908b74cd RD |
6448 | will not be able to size the window outside the given bounds (if it is |
6449 | a top-level window.) Sizers will also inspect the minimum window size | |
6450 | and will use that value if set when calculating layout. | |
6451 | ||
6452 | The resizing increments are only significant under Motif or Xt. | |
0df68c9f | 6453 | """ |
f16ab95d | 6454 | return _core_.Window_SetSizeHints(*args, **kwargs) |
e811c8ce | 6455 | |
f16ab95d RD |
6456 | def SetSizeHintsSz(*args, **kwargs): |
6457 | """ | |
6458 | SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) | |
6459 | ||
6460 | Allows specification of minimum and maximum window sizes, and window | |
6461 | size increments. If a pair of values is not set (or set to -1), the | |
6462 | default values will be used. If this function is called, the user | |
6463 | will not be able to size the window outside the given bounds (if it is | |
6464 | a top-level window.) Sizers will also inspect the minimum window size | |
6465 | and will use that value if set when calculating layout. | |
6466 | ||
6467 | The resizing increments are only significant under Motif or Xt. | |
6468 | """ | |
6469 | return _core_.Window_SetSizeHintsSz(*args, **kwargs) | |
6470 | ||
6471 | def SetVirtualSizeHints(*args, **kwargs): | |
15afbcd0 | 6472 | """ |
908b74cd | 6473 | SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) |
15afbcd0 RD |
6474 | |
6475 | Allows specification of minimum and maximum virtual window sizes. If a | |
6476 | pair of values is not set (or set to -1), the default values will be | |
6477 | used. If this function is called, the user will not be able to size | |
6478 | the virtual area of the window outside the given bounds. | |
6479 | """ | |
f16ab95d RD |
6480 | return _core_.Window_SetVirtualSizeHints(*args, **kwargs) |
6481 | ||
6482 | def SetVirtualSizeHintsSz(*args, **kwargs): | |
6483 | """ | |
6484 | SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) | |
6485 | ||
6486 | Allows specification of minimum and maximum virtual window sizes. If a | |
6487 | pair of values is not set (or set to -1), the default values will be | |
6488 | used. If this function is called, the user will not be able to size | |
6489 | the virtual area of the window outside the given bounds. | |
6490 | """ | |
6491 | return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs) | |
e811c8ce | 6492 | |
908b74cd RD |
6493 | def GetMaxSize(*args, **kwargs): |
6494 | """GetMaxSize(self) -> Size""" | |
6495 | return _core_.Window_GetMaxSize(*args, **kwargs) | |
6496 | ||
6497 | def GetMinSize(*args, **kwargs): | |
6498 | """GetMinSize(self) -> Size""" | |
6499 | return _core_.Window_GetMinSize(*args, **kwargs) | |
6500 | ||
6501 | def SetMinSize(*args, **kwargs): | |
6502 | """ | |
6503 | SetMinSize(self, Size minSize) | |
6504 | ||
6505 | A more convenient method than `SetSizeHints` for setting just the | |
6506 | min size. | |
6507 | """ | |
6508 | return _core_.Window_SetMinSize(*args, **kwargs) | |
6509 | ||
6510 | def SetMaxSize(*args, **kwargs): | |
6511 | """ | |
6512 | SetMaxSize(self, Size maxSize) | |
6513 | ||
6514 | A more convenient method than `SetSizeHints` for setting just the | |
6515 | max size. | |
6516 | """ | |
6517 | return _core_.Window_SetMaxSize(*args, **kwargs) | |
6518 | ||
e811c8ce | 6519 | def GetMinWidth(*args, **kwargs): |
a95a7133 | 6520 | """GetMinWidth(self) -> int""" |
54f9ee45 | 6521 | return _core_.Window_GetMinWidth(*args, **kwargs) |
e811c8ce RD |
6522 | |
6523 | def GetMinHeight(*args, **kwargs): | |
a95a7133 | 6524 | """GetMinHeight(self) -> int""" |
54f9ee45 | 6525 | return _core_.Window_GetMinHeight(*args, **kwargs) |
e811c8ce RD |
6526 | |
6527 | def GetMaxWidth(*args, **kwargs): | |
a95a7133 | 6528 | """GetMaxWidth(self) -> int""" |
54f9ee45 | 6529 | return _core_.Window_GetMaxWidth(*args, **kwargs) |
e811c8ce RD |
6530 | |
6531 | def GetMaxHeight(*args, **kwargs): | |
a95a7133 | 6532 | """GetMaxHeight(self) -> int""" |
54f9ee45 | 6533 | return _core_.Window_GetMaxHeight(*args, **kwargs) |
e811c8ce | 6534 | |
e811c8ce | 6535 | def SetVirtualSize(*args, **kwargs): |
0df68c9f | 6536 | """ |
a95a7133 | 6537 | SetVirtualSize(self, Size size) |
e811c8ce | 6538 | |
15afbcd0 RD |
6539 | Set the the virtual size of a window in pixels. For most windows this |
6540 | is just the client area of the window, but for some like scrolled | |
6541 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6542 | """ |
54f9ee45 | 6543 | return _core_.Window_SetVirtualSize(*args, **kwargs) |
e811c8ce RD |
6544 | |
6545 | def SetVirtualSizeWH(*args, **kwargs): | |
0df68c9f | 6546 | """ |
a95a7133 | 6547 | SetVirtualSizeWH(self, int w, int h) |
e811c8ce | 6548 | |
15afbcd0 RD |
6549 | Set the the virtual size of a window in pixels. For most windows this |
6550 | is just the client area of the window, but for some like scrolled | |
6551 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6552 | """ |
54f9ee45 | 6553 | return _core_.Window_SetVirtualSizeWH(*args, **kwargs) |
e811c8ce RD |
6554 | |
6555 | def GetVirtualSize(*args, **kwargs): | |
0df68c9f | 6556 | """ |
a95a7133 | 6557 | GetVirtualSize(self) -> Size |
e811c8ce | 6558 | |
15afbcd0 RD |
6559 | Get the the virtual size of the window in pixels. For most windows |
6560 | this is just the client area of the window, but for some like scrolled | |
6561 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6562 | """ |
54f9ee45 | 6563 | return _core_.Window_GetVirtualSize(*args, **kwargs) |
e811c8ce RD |
6564 | |
6565 | def GetVirtualSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6566 | """ |
6567 | GetVirtualSizeTuple() -> (width, height) | |
e811c8ce | 6568 | |
15afbcd0 RD |
6569 | Get the the virtual size of the window in pixels. For most windows |
6570 | this is just the client area of the window, but for some like scrolled | |
6571 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6572 | """ |
54f9ee45 | 6573 | return _core_.Window_GetVirtualSizeTuple(*args, **kwargs) |
e811c8ce RD |
6574 | |
6575 | def GetBestVirtualSize(*args, **kwargs): | |
15afbcd0 | 6576 | """ |
a95a7133 | 6577 | GetBestVirtualSize(self) -> Size |
15afbcd0 RD |
6578 | |
6579 | Return the largest of ClientSize and BestSize (as determined by a | |
6580 | sizer, interior children, or other means) | |
6581 | """ | |
54f9ee45 | 6582 | return _core_.Window_GetBestVirtualSize(*args, **kwargs) |
e811c8ce RD |
6583 | |
6584 | def Show(*args, **kwargs): | |
15afbcd0 | 6585 | """ |
a95a7133 | 6586 | Show(self, bool show=True) -> bool |
15afbcd0 RD |
6587 | |
6588 | Shows or hides the window. You may need to call Raise for a top level | |
6589 | window if you want to bring it to top, although this is not needed if | |
6590 | Show is called immediately after the frame creation. Returns True if | |
6591 | the window has been shown or hidden or False if nothing was done | |
6592 | because it already was in the requested state. | |
6593 | """ | |
54f9ee45 | 6594 | return _core_.Window_Show(*args, **kwargs) |
e811c8ce RD |
6595 | |
6596 | def Hide(*args, **kwargs): | |
15afbcd0 | 6597 | """ |
a95a7133 | 6598 | Hide(self) -> bool |
15afbcd0 RD |
6599 | |
6600 | Equivalent to calling Show(False). | |
6601 | """ | |
54f9ee45 | 6602 | return _core_.Window_Hide(*args, **kwargs) |
e811c8ce RD |
6603 | |
6604 | def Enable(*args, **kwargs): | |
15afbcd0 | 6605 | """ |
a95a7133 | 6606 | Enable(self, bool enable=True) -> bool |
15afbcd0 RD |
6607 | |
6608 | Enable or disable the window for user input. Note that when a parent | |
6609 | window is disabled, all of its children are disabled as well and they | |
6610 | are reenabled again when the parent is. Returns true if the window | |
6611 | has been enabled or disabled, false if nothing was done, i.e. if the | |
6612 | window had already been in the specified state. | |
6613 | """ | |
54f9ee45 | 6614 | return _core_.Window_Enable(*args, **kwargs) |
e811c8ce RD |
6615 | |
6616 | def Disable(*args, **kwargs): | |
15afbcd0 | 6617 | """ |
a95a7133 | 6618 | Disable(self) -> bool |
15afbcd0 RD |
6619 | |
6620 | Disables the window, same as Enable(false). | |
6621 | """ | |
54f9ee45 | 6622 | return _core_.Window_Disable(*args, **kwargs) |
e811c8ce RD |
6623 | |
6624 | def IsShown(*args, **kwargs): | |
15afbcd0 | 6625 | """ |
a95a7133 | 6626 | IsShown(self) -> bool |
15afbcd0 RD |
6627 | |
6628 | Returns true if the window is shown, false if it has been hidden. | |
6629 | """ | |
54f9ee45 | 6630 | return _core_.Window_IsShown(*args, **kwargs) |
e811c8ce RD |
6631 | |
6632 | def IsEnabled(*args, **kwargs): | |
15afbcd0 | 6633 | """ |
a95a7133 | 6634 | IsEnabled(self) -> bool |
15afbcd0 RD |
6635 | |
6636 | Returns true if the window is enabled for input, false otherwise. | |
6637 | """ | |
54f9ee45 | 6638 | return _core_.Window_IsEnabled(*args, **kwargs) |
e811c8ce RD |
6639 | |
6640 | def SetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 | 6641 | """ |
a95a7133 | 6642 | SetWindowStyleFlag(self, long style) |
15afbcd0 | 6643 | |
41e2b43e RD |
6644 | Sets the style of the window. Please note that some styles cannot be |
6645 | changed after the window creation and that Refresh() might need to be | |
6646 | called after changing the others for the change to take place | |
6647 | immediately. | |
15afbcd0 | 6648 | """ |
54f9ee45 | 6649 | return _core_.Window_SetWindowStyleFlag(*args, **kwargs) |
e811c8ce RD |
6650 | |
6651 | def GetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 | 6652 | """ |
a95a7133 | 6653 | GetWindowStyleFlag(self) -> long |
e811c8ce | 6654 | |
15afbcd0 RD |
6655 | Gets the window style that was passed to the constructor or Create |
6656 | method. | |
6657 | """ | |
54f9ee45 | 6658 | return _core_.Window_GetWindowStyleFlag(*args, **kwargs) |
e811c8ce | 6659 | |
15afbcd0 | 6660 | SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag |
e811c8ce | 6661 | def HasFlag(*args, **kwargs): |
15afbcd0 | 6662 | """ |
a95a7133 | 6663 | HasFlag(self, int flag) -> bool |
15afbcd0 RD |
6664 | |
6665 | Test if the given style is set for this window. | |
6666 | """ | |
54f9ee45 | 6667 | return _core_.Window_HasFlag(*args, **kwargs) |
e811c8ce RD |
6668 | |
6669 | def IsRetained(*args, **kwargs): | |
15afbcd0 | 6670 | """ |
a95a7133 | 6671 | IsRetained(self) -> bool |
15afbcd0 RD |
6672 | |
6673 | Returns true if the window is retained, false otherwise. Retained | |
6674 | windows are only available on X platforms. | |
6675 | """ | |
54f9ee45 | 6676 | return _core_.Window_IsRetained(*args, **kwargs) |
e811c8ce RD |
6677 | |
6678 | def SetExtraStyle(*args, **kwargs): | |
15afbcd0 | 6679 | """ |
a95a7133 | 6680 | SetExtraStyle(self, long exStyle) |
15afbcd0 RD |
6681 | |
6682 | Sets the extra style bits for the window. Extra styles are the less | |
6683 | often used style bits which can't be set with the constructor or with | |
6684 | SetWindowStyleFlag() | |
6685 | """ | |
54f9ee45 | 6686 | return _core_.Window_SetExtraStyle(*args, **kwargs) |
e811c8ce RD |
6687 | |
6688 | def GetExtraStyle(*args, **kwargs): | |
15afbcd0 | 6689 | """ |
a95a7133 | 6690 | GetExtraStyle(self) -> long |
15afbcd0 RD |
6691 | |
6692 | Returns the extra style bits for the window. | |
6693 | """ | |
54f9ee45 | 6694 | return _core_.Window_GetExtraStyle(*args, **kwargs) |
e811c8ce RD |
6695 | |
6696 | def MakeModal(*args, **kwargs): | |
15afbcd0 | 6697 | """ |
a95a7133 | 6698 | MakeModal(self, bool modal=True) |
15afbcd0 RD |
6699 | |
6700 | Disables all other windows in the application so that the user can | |
6701 | only interact with this window. Passing False will reverse this | |
6702 | effect. | |
6703 | """ | |
54f9ee45 | 6704 | return _core_.Window_MakeModal(*args, **kwargs) |
e811c8ce RD |
6705 | |
6706 | def SetThemeEnabled(*args, **kwargs): | |
15afbcd0 | 6707 | """ |
a95a7133 | 6708 | SetThemeEnabled(self, bool enableTheme) |
15afbcd0 RD |
6709 | |
6710 | This function tells a window if it should use the system's "theme" | |
6711 | code to draw the windows' background instead if its own background | |
6712 | drawing code. This will only have an effect on platforms that support | |
6713 | the notion of themes in user defined windows. One such platform is | |
6714 | GTK+ where windows can have (very colourful) backgrounds defined by a | |
6715 | user's selected theme. | |
6716 | ||
6717 | Dialogs, notebook pages and the status bar have this flag set to true | |
6718 | by default so that the default look and feel is simulated best. | |
6719 | """ | |
54f9ee45 | 6720 | return _core_.Window_SetThemeEnabled(*args, **kwargs) |
e811c8ce RD |
6721 | |
6722 | def GetThemeEnabled(*args, **kwargs): | |
15afbcd0 | 6723 | """ |
a95a7133 | 6724 | GetThemeEnabled(self) -> bool |
e811c8ce | 6725 | |
15afbcd0 RD |
6726 | Return the themeEnabled flag. |
6727 | """ | |
54f9ee45 | 6728 | return _core_.Window_GetThemeEnabled(*args, **kwargs) |
e811c8ce RD |
6729 | |
6730 | def SetFocus(*args, **kwargs): | |
15afbcd0 | 6731 | """ |
a95a7133 | 6732 | SetFocus(self) |
15afbcd0 RD |
6733 | |
6734 | Set's the focus to this window, allowing it to receive keyboard input. | |
6735 | """ | |
54f9ee45 | 6736 | return _core_.Window_SetFocus(*args, **kwargs) |
e811c8ce RD |
6737 | |
6738 | def SetFocusFromKbd(*args, **kwargs): | |
15afbcd0 | 6739 | """ |
a95a7133 | 6740 | SetFocusFromKbd(self) |
15afbcd0 RD |
6741 | |
6742 | Set focus to this window as the result of a keyboard action. Normally | |
6743 | only called internally. | |
6744 | """ | |
54f9ee45 | 6745 | return _core_.Window_SetFocusFromKbd(*args, **kwargs) |
e811c8ce RD |
6746 | |
6747 | def FindFocus(*args, **kwargs): | |
15afbcd0 | 6748 | """ |
66c033b4 | 6749 | FindFocus() -> Window |
15afbcd0 RD |
6750 | |
6751 | Returns the window or control that currently has the keyboard focus, | |
6752 | or None. | |
6753 | """ | |
54f9ee45 | 6754 | return _core_.Window_FindFocus(*args, **kwargs) |
e811c8ce RD |
6755 | |
6756 | FindFocus = staticmethod(FindFocus) | |
6757 | def AcceptsFocus(*args, **kwargs): | |
15afbcd0 | 6758 | """ |
a95a7133 | 6759 | AcceptsFocus(self) -> bool |
15afbcd0 RD |
6760 | |
6761 | Can this window have focus? | |
6762 | """ | |
54f9ee45 | 6763 | return _core_.Window_AcceptsFocus(*args, **kwargs) |
e811c8ce RD |
6764 | |
6765 | def AcceptsFocusFromKeyboard(*args, **kwargs): | |
15afbcd0 | 6766 | """ |
a95a7133 | 6767 | AcceptsFocusFromKeyboard(self) -> bool |
15afbcd0 RD |
6768 | |
6769 | Can this window be given focus by keyboard navigation? if not, the | |
6770 | only way to give it focus (provided it accepts it at all) is to click | |
6771 | it. | |
6772 | """ | |
54f9ee45 | 6773 | return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs) |
e811c8ce RD |
6774 | |
6775 | def GetDefaultItem(*args, **kwargs): | |
15afbcd0 | 6776 | """ |
a95a7133 | 6777 | GetDefaultItem(self) -> Window |
15afbcd0 RD |
6778 | |
6779 | Get the default child of this parent, i.e. the one which is activated | |
6780 | by pressing <Enter> such as the OK button on a wx.Dialog. | |
6781 | """ | |
54f9ee45 | 6782 | return _core_.Window_GetDefaultItem(*args, **kwargs) |
e811c8ce RD |
6783 | |
6784 | def SetDefaultItem(*args, **kwargs): | |
15afbcd0 | 6785 | """ |
a95a7133 | 6786 | SetDefaultItem(self, Window child) -> Window |
15afbcd0 RD |
6787 | |
6788 | Set this child as default, return the old default. | |
6789 | """ | |
54f9ee45 | 6790 | return _core_.Window_SetDefaultItem(*args, **kwargs) |
e811c8ce RD |
6791 | |
6792 | def SetTmpDefaultItem(*args, **kwargs): | |
15afbcd0 | 6793 | """ |
a95a7133 | 6794 | SetTmpDefaultItem(self, Window win) |
15afbcd0 RD |
6795 | |
6796 | Set this child as temporary default | |
6797 | """ | |
54f9ee45 | 6798 | return _core_.Window_SetTmpDefaultItem(*args, **kwargs) |
e811c8ce | 6799 | |
908b74cd RD |
6800 | def Navigate(*args, **kwargs): |
6801 | """ | |
6802 | Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool | |
6803 | ||
fd2dc343 RD |
6804 | Does keyboard navigation from this window to another, by sending a |
6805 | `wx.NavigationKeyEvent`. | |
908b74cd RD |
6806 | """ |
6807 | return _core_.Window_Navigate(*args, **kwargs) | |
6808 | ||
7f98d120 RD |
6809 | def MoveAfterInTabOrder(*args, **kwargs): |
6810 | """ | |
6811 | MoveAfterInTabOrder(self, Window win) | |
6812 | ||
6813 | Moves this window in the tab navigation order after the specified | |
6814 | sibling window. This means that when the user presses the TAB key on | |
6815 | that other window, the focus switches to this window. | |
6816 | ||
6817 | The default tab order is the same as creation order. This function | |
6818 | and `MoveBeforeInTabOrder` allow to change it after creating all the | |
6819 | windows. | |
6820 | ||
6821 | """ | |
6822 | return _core_.Window_MoveAfterInTabOrder(*args, **kwargs) | |
6823 | ||
6824 | def MoveBeforeInTabOrder(*args, **kwargs): | |
6825 | """ | |
6826 | MoveBeforeInTabOrder(self, Window win) | |
6827 | ||
6828 | Same as `MoveAfterInTabOrder` except that it inserts this window just | |
6829 | before win instead of putting it right after it. | |
6830 | """ | |
6831 | return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs) | |
6832 | ||
e811c8ce | 6833 | def GetChildren(*args, **kwargs): |
15afbcd0 | 6834 | """ |
a95a7133 | 6835 | GetChildren(self) -> PyObject |
15afbcd0 RD |
6836 | |
6837 | Returns a list of the window's children. NOTE: Currently this is a | |
6838 | copy of the child window list maintained by the window, so the return | |
6839 | value of this function is only valid as long as the window's children | |
6840 | do not change. | |
6841 | """ | |
54f9ee45 | 6842 | return _core_.Window_GetChildren(*args, **kwargs) |
e811c8ce RD |
6843 | |
6844 | def GetParent(*args, **kwargs): | |
15afbcd0 | 6845 | """ |
a95a7133 | 6846 | GetParent(self) -> Window |
15afbcd0 RD |
6847 | |
6848 | Returns the parent window of this window, or None if there isn't one. | |
6849 | """ | |
54f9ee45 | 6850 | return _core_.Window_GetParent(*args, **kwargs) |
e811c8ce RD |
6851 | |
6852 | def GetGrandParent(*args, **kwargs): | |
15afbcd0 | 6853 | """ |
a95a7133 | 6854 | GetGrandParent(self) -> Window |
15afbcd0 | 6855 | |
41e2b43e RD |
6856 | Returns the parent of the parent of this window, or None if there |
6857 | isn't one. | |
15afbcd0 | 6858 | """ |
54f9ee45 | 6859 | return _core_.Window_GetGrandParent(*args, **kwargs) |
e811c8ce RD |
6860 | |
6861 | def IsTopLevel(*args, **kwargs): | |
15afbcd0 | 6862 | """ |
a95a7133 | 6863 | IsTopLevel(self) -> bool |
15afbcd0 RD |
6864 | |
6865 | Returns true if the given window is a top-level one. Currently all | |
6866 | frames and dialogs are always considered to be top-level windows (even | |
6867 | if they have a parent window). | |
6868 | """ | |
54f9ee45 | 6869 | return _core_.Window_IsTopLevel(*args, **kwargs) |
e811c8ce RD |
6870 | |
6871 | def Reparent(*args, **kwargs): | |
15afbcd0 | 6872 | """ |
a95a7133 | 6873 | Reparent(self, Window newParent) -> bool |
15afbcd0 RD |
6874 | |
6875 | Reparents the window, i.e the window will be removed from its current | |
6876 | parent window (e.g. a non-standard toolbar in a wxFrame) and then | |
6877 | re-inserted into another. Available on Windows and GTK. Returns True | |
6878 | if the parent was changed, False otherwise (error or newParent == | |
6879 | oldParent) | |
6880 | """ | |
54f9ee45 | 6881 | return _core_.Window_Reparent(*args, **kwargs) |
e811c8ce RD |
6882 | |
6883 | def AddChild(*args, **kwargs): | |
15afbcd0 | 6884 | """ |
a95a7133 | 6885 | AddChild(self, Window child) |
15afbcd0 RD |
6886 | |
6887 | Adds a child window. This is called automatically by window creation | |
6888 | functions so should not be required by the application programmer. | |
6889 | """ | |
54f9ee45 | 6890 | return _core_.Window_AddChild(*args, **kwargs) |
e811c8ce RD |
6891 | |
6892 | def RemoveChild(*args, **kwargs): | |
15afbcd0 | 6893 | """ |
a95a7133 | 6894 | RemoveChild(self, Window child) |
15afbcd0 RD |
6895 | |
6896 | Removes a child window. This is called automatically by window | |
6897 | deletion functions so should not be required by the application | |
6898 | programmer. | |
6899 | """ | |
54f9ee45 | 6900 | return _core_.Window_RemoveChild(*args, **kwargs) |
e811c8ce RD |
6901 | |
6902 | def FindWindowById(*args, **kwargs): | |
15afbcd0 | 6903 | """ |
a95a7133 | 6904 | FindWindowById(self, long winid) -> Window |
15afbcd0 RD |
6905 | |
6906 | Find a chld of this window by window ID | |
6907 | """ | |
54f9ee45 | 6908 | return _core_.Window_FindWindowById(*args, **kwargs) |
e811c8ce RD |
6909 | |
6910 | def FindWindowByName(*args, **kwargs): | |
15afbcd0 | 6911 | """ |
a95a7133 | 6912 | FindWindowByName(self, String name) -> Window |
15afbcd0 RD |
6913 | |
6914 | Find a child of this window by name | |
6915 | """ | |
54f9ee45 | 6916 | return _core_.Window_FindWindowByName(*args, **kwargs) |
e811c8ce RD |
6917 | |
6918 | def GetEventHandler(*args, **kwargs): | |
15afbcd0 | 6919 | """ |
a95a7133 | 6920 | GetEventHandler(self) -> EvtHandler |
15afbcd0 RD |
6921 | |
6922 | Returns the event handler for this window. By default, the window is | |
6923 | its own event handler. | |
6924 | """ | |
54f9ee45 | 6925 | return _core_.Window_GetEventHandler(*args, **kwargs) |
e811c8ce RD |
6926 | |
6927 | def SetEventHandler(*args, **kwargs): | |
15afbcd0 | 6928 | """ |
a95a7133 | 6929 | SetEventHandler(self, EvtHandler handler) |
15afbcd0 RD |
6930 | |
6931 | Sets the event handler for this window. An event handler is an object | |
6932 | that is capable of processing the events sent to a window. By default, | |
6933 | the window is its own event handler, but an application may wish to | |
6934 | substitute another, for example to allow central implementation of | |
6935 | event-handling for a variety of different window classes. | |
6936 | ||
41e2b43e | 6937 | It is usually better to use `wx.Window.PushEventHandler` since this sets |
15afbcd0 RD |
6938 | up a chain of event handlers, where an event not handled by one event |
6939 | handler is handed to the next one in the chain. | |
6940 | """ | |
54f9ee45 | 6941 | return _core_.Window_SetEventHandler(*args, **kwargs) |
e811c8ce RD |
6942 | |
6943 | def PushEventHandler(*args, **kwargs): | |
15afbcd0 | 6944 | """ |
a95a7133 | 6945 | PushEventHandler(self, EvtHandler handler) |
15afbcd0 RD |
6946 | |
6947 | Pushes this event handler onto the event handler stack for the window. | |
6948 | An event handler is an object that is capable of processing the events | |
6949 | sent to a window. By default, the window is its own event handler, but | |
6950 | an application may wish to substitute another, for example to allow | |
6951 | central implementation of event-handling for a variety of different | |
6952 | window classes. | |
6953 | ||
6954 | wx.Window.PushEventHandler allows an application to set up a chain of | |
6955 | event handlers, where an event not handled by one event handler is | |
41e2b43e | 6956 | handed to the next one in the chain. Use `wx.Window.PopEventHandler` to |
15afbcd0 RD |
6957 | remove the event handler. |
6958 | """ | |
54f9ee45 | 6959 | return _core_.Window_PushEventHandler(*args, **kwargs) |
e811c8ce RD |
6960 | |
6961 | def PopEventHandler(*args, **kwargs): | |
15afbcd0 | 6962 | """ |
a95a7133 | 6963 | PopEventHandler(self, bool deleteHandler=False) -> EvtHandler |
15afbcd0 RD |
6964 | |
6965 | Removes and returns the top-most event handler on the event handler | |
6966 | stack. If deleteHandler is True then the wx.EvtHandler object will be | |
6967 | destroyed after it is popped. | |
6968 | """ | |
54f9ee45 | 6969 | return _core_.Window_PopEventHandler(*args, **kwargs) |
e811c8ce RD |
6970 | |
6971 | def RemoveEventHandler(*args, **kwargs): | |
15afbcd0 | 6972 | """ |
a95a7133 | 6973 | RemoveEventHandler(self, EvtHandler handler) -> bool |
15afbcd0 | 6974 | |
41e2b43e RD |
6975 | Find the given handler in the event handler chain and remove (but not |
6976 | delete) it from the event handler chain, return True if it was found | |
6977 | and False otherwise (this also results in an assert failure so this | |
6978 | function should only be called when the handler is supposed to be | |
6979 | there.) | |
15afbcd0 | 6980 | """ |
54f9ee45 | 6981 | return _core_.Window_RemoveEventHandler(*args, **kwargs) |
e811c8ce RD |
6982 | |
6983 | def SetValidator(*args, **kwargs): | |
15afbcd0 | 6984 | """ |
a95a7133 | 6985 | SetValidator(self, Validator validator) |
15afbcd0 RD |
6986 | |
6987 | Deletes the current validator (if any) and sets the window validator, | |
6988 | having called wx.Validator.Clone to create a new validator of this | |
6989 | type. | |
6990 | """ | |
54f9ee45 | 6991 | return _core_.Window_SetValidator(*args, **kwargs) |
e811c8ce RD |
6992 | |
6993 | def GetValidator(*args, **kwargs): | |
15afbcd0 | 6994 | """ |
a95a7133 | 6995 | GetValidator(self) -> Validator |
15afbcd0 RD |
6996 | |
6997 | Returns a pointer to the current validator for the window, or None if | |
6998 | there is none. | |
6999 | """ | |
54f9ee45 | 7000 | return _core_.Window_GetValidator(*args, **kwargs) |
e811c8ce | 7001 | |
74a57fcd RD |
7002 | def Validate(*args, **kwargs): |
7003 | """ | |
a95a7133 | 7004 | Validate(self) -> bool |
74a57fcd RD |
7005 | |
7006 | Validates the current values of the child controls using their | |
41e2b43e RD |
7007 | validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra |
7008 | style flag set, the method will also call Validate() of all child | |
7009 | windows. Returns false if any of the validations failed. | |
74a57fcd | 7010 | """ |
54f9ee45 | 7011 | return _core_.Window_Validate(*args, **kwargs) |
74a57fcd RD |
7012 | |
7013 | def TransferDataToWindow(*args, **kwargs): | |
7014 | """ | |
a95a7133 | 7015 | TransferDataToWindow(self) -> bool |
74a57fcd | 7016 | |
41e2b43e RD |
7017 | Transfers values to child controls from data areas specified by their |
7018 | validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra | |
7019 | style flag set, the method will also call TransferDataToWindow() of | |
7020 | all child windows. | |
74a57fcd | 7021 | """ |
54f9ee45 | 7022 | return _core_.Window_TransferDataToWindow(*args, **kwargs) |
74a57fcd RD |
7023 | |
7024 | def TransferDataFromWindow(*args, **kwargs): | |
7025 | """ | |
a95a7133 | 7026 | TransferDataFromWindow(self) -> bool |
74a57fcd | 7027 | |
41e2b43e RD |
7028 | Transfers values from child controls to data areas specified by their |
7029 | validators. Returns false if a transfer failed. If the window has | |
7030 | wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will | |
7031 | also call TransferDataFromWindow() of all child windows. | |
74a57fcd | 7032 | """ |
54f9ee45 | 7033 | return _core_.Window_TransferDataFromWindow(*args, **kwargs) |
74a57fcd RD |
7034 | |
7035 | def InitDialog(*args, **kwargs): | |
7036 | """ | |
a95a7133 | 7037 | InitDialog(self) |
74a57fcd | 7038 | |
41e2b43e RD |
7039 | Sends an EVT_INIT_DIALOG event, whose handler usually transfers data |
7040 | to the dialog via validators. | |
74a57fcd | 7041 | """ |
54f9ee45 | 7042 | return _core_.Window_InitDialog(*args, **kwargs) |
74a57fcd | 7043 | |
e811c8ce | 7044 | def SetAcceleratorTable(*args, **kwargs): |
15afbcd0 | 7045 | """ |
a95a7133 | 7046 | SetAcceleratorTable(self, AcceleratorTable accel) |
15afbcd0 RD |
7047 | |
7048 | Sets the accelerator table for this window. | |
7049 | """ | |
54f9ee45 | 7050 | return _core_.Window_SetAcceleratorTable(*args, **kwargs) |
e811c8ce RD |
7051 | |
7052 | def GetAcceleratorTable(*args, **kwargs): | |
15afbcd0 | 7053 | """ |
a95a7133 | 7054 | GetAcceleratorTable(self) -> AcceleratorTable |
15afbcd0 RD |
7055 | |
7056 | Gets the accelerator table for this window. | |
7057 | """ | |
54f9ee45 | 7058 | return _core_.Window_GetAcceleratorTable(*args, **kwargs) |
e811c8ce RD |
7059 | |
7060 | def RegisterHotKey(*args, **kwargs): | |
15afbcd0 | 7061 | """ |
a95a7133 | 7062 | RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool |
15afbcd0 RD |
7063 | |
7064 | Registers a system wide hotkey. Every time the user presses the hotkey | |
7065 | registered here, this window will receive a hotkey event. It will | |
7066 | receive the event even if the application is in the background and | |
7067 | does not have the input focus because the user is working with some | |
7068 | other application. To bind an event handler function to this hotkey | |
7069 | use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the | |
7070 | hotkey was registered successfully. | |
7071 | """ | |
54f9ee45 | 7072 | return _core_.Window_RegisterHotKey(*args, **kwargs) |
e811c8ce RD |
7073 | |
7074 | def UnregisterHotKey(*args, **kwargs): | |
15afbcd0 | 7075 | """ |
a95a7133 | 7076 | UnregisterHotKey(self, int hotkeyId) -> bool |
15afbcd0 RD |
7077 | |
7078 | Unregisters a system wide hotkey. | |
7079 | """ | |
54f9ee45 | 7080 | return _core_.Window_UnregisterHotKey(*args, **kwargs) |
e811c8ce RD |
7081 | |
7082 | def ConvertDialogPointToPixels(*args, **kwargs): | |
15afbcd0 | 7083 | """ |
a95a7133 | 7084 | ConvertDialogPointToPixels(self, Point pt) -> Point |
15afbcd0 RD |
7085 | |
7086 | Converts a point or size from dialog units to pixels. Dialog units | |
7087 | are used for maintaining a dialog's proportions even if the font | |
7088 | changes. For the x dimension, the dialog units are multiplied by the | |
7089 | average character width and then divided by 4. For the y dimension, | |
7090 | the dialog units are multiplied by the average character height and | |
7091 | then divided by 8. | |
7092 | """ | |
54f9ee45 | 7093 | return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs) |
e811c8ce RD |
7094 | |
7095 | def ConvertDialogSizeToPixels(*args, **kwargs): | |
15afbcd0 | 7096 | """ |
a95a7133 | 7097 | ConvertDialogSizeToPixels(self, Size sz) -> Size |
15afbcd0 RD |
7098 | |
7099 | Converts a point or size from dialog units to pixels. Dialog units | |
7100 | are used for maintaining a dialog's proportions even if the font | |
7101 | changes. For the x dimension, the dialog units are multiplied by the | |
7102 | average character width and then divided by 4. For the y dimension, | |
7103 | the dialog units are multiplied by the average character height and | |
7104 | then divided by 8. | |
7105 | """ | |
54f9ee45 | 7106 | return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs) |
e811c8ce RD |
7107 | |
7108 | def DLG_PNT(*args, **kwargs): | |
15afbcd0 | 7109 | """ |
a95a7133 | 7110 | DLG_PNT(self, Point pt) -> Point |
15afbcd0 RD |
7111 | |
7112 | Converts a point or size from dialog units to pixels. Dialog units | |
7113 | are used for maintaining a dialog's proportions even if the font | |
7114 | changes. For the x dimension, the dialog units are multiplied by the | |
7115 | average character width and then divided by 4. For the y dimension, | |
7116 | the dialog units are multiplied by the average character height and | |
7117 | then divided by 8. | |
7118 | """ | |
54f9ee45 | 7119 | return _core_.Window_DLG_PNT(*args, **kwargs) |
e811c8ce RD |
7120 | |
7121 | def DLG_SZE(*args, **kwargs): | |
15afbcd0 | 7122 | """ |
a95a7133 | 7123 | DLG_SZE(self, Size sz) -> Size |
15afbcd0 RD |
7124 | |
7125 | Converts a point or size from dialog units to pixels. Dialog units | |
7126 | are used for maintaining a dialog's proportions even if the font | |
7127 | changes. For the x dimension, the dialog units are multiplied by the | |
7128 | average character width and then divided by 4. For the y dimension, | |
7129 | the dialog units are multiplied by the average character height and | |
7130 | then divided by 8. | |
7131 | """ | |
54f9ee45 | 7132 | return _core_.Window_DLG_SZE(*args, **kwargs) |
e811c8ce RD |
7133 | |
7134 | def ConvertPixelPointToDialog(*args, **kwargs): | |
a95a7133 | 7135 | """ConvertPixelPointToDialog(self, Point pt) -> Point""" |
54f9ee45 | 7136 | return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs) |
e811c8ce RD |
7137 | |
7138 | def ConvertPixelSizeToDialog(*args, **kwargs): | |
a95a7133 | 7139 | """ConvertPixelSizeToDialog(self, Size sz) -> Size""" |
54f9ee45 | 7140 | return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs) |
e811c8ce RD |
7141 | |
7142 | def WarpPointer(*args, **kwargs): | |
15afbcd0 | 7143 | """ |
a95a7133 | 7144 | WarpPointer(self, int x, int y) |
15afbcd0 RD |
7145 | |
7146 | Moves the pointer to the given position on the window. | |
7147 | ||
7148 | NOTE: This function is not supported under Mac because Apple Human | |
7149 | Interface Guidelines forbid moving the mouse cursor programmatically. | |
7150 | """ | |
54f9ee45 | 7151 | return _core_.Window_WarpPointer(*args, **kwargs) |
e811c8ce RD |
7152 | |
7153 | def CaptureMouse(*args, **kwargs): | |
15afbcd0 | 7154 | """ |
a95a7133 | 7155 | CaptureMouse(self) |
15afbcd0 RD |
7156 | |
7157 | Directs all mouse input to this window. Call wx.Window.ReleaseMouse to | |
7158 | release the capture. | |
7159 | ||
7160 | Note that wxWindows maintains the stack of windows having captured the | |
7161 | mouse and when the mouse is released the capture returns to the window | |
7162 | which had had captured it previously and it is only really released if | |
7163 | there were no previous window. In particular, this means that you must | |
7164 | release the mouse as many times as you capture it. | |
7165 | """ | |
54f9ee45 | 7166 | return _core_.Window_CaptureMouse(*args, **kwargs) |
e811c8ce RD |
7167 | |
7168 | def ReleaseMouse(*args, **kwargs): | |
15afbcd0 | 7169 | """ |
a95a7133 | 7170 | ReleaseMouse(self) |
15afbcd0 RD |
7171 | |
7172 | Releases mouse input captured with wx.Window.CaptureMouse. | |
7173 | """ | |
54f9ee45 | 7174 | return _core_.Window_ReleaseMouse(*args, **kwargs) |
e811c8ce RD |
7175 | |
7176 | def GetCapture(*args, **kwargs): | |
15afbcd0 | 7177 | """ |
66c033b4 | 7178 | GetCapture() -> Window |
15afbcd0 RD |
7179 | |
7180 | Returns the window which currently captures the mouse or None | |
7181 | """ | |
54f9ee45 | 7182 | return _core_.Window_GetCapture(*args, **kwargs) |
e811c8ce RD |
7183 | |
7184 | GetCapture = staticmethod(GetCapture) | |
7185 | def HasCapture(*args, **kwargs): | |
15afbcd0 | 7186 | """ |
a95a7133 | 7187 | HasCapture(self) -> bool |
15afbcd0 RD |
7188 | |
7189 | Returns true if this window has the current mouse capture. | |
7190 | """ | |
54f9ee45 | 7191 | return _core_.Window_HasCapture(*args, **kwargs) |
e811c8ce RD |
7192 | |
7193 | def Refresh(*args, **kwargs): | |
15afbcd0 | 7194 | """ |
a95a7133 | 7195 | Refresh(self, bool eraseBackground=True, Rect rect=None) |
15afbcd0 RD |
7196 | |
7197 | Mark the specified rectangle (or the whole window) as "dirty" so it | |
7198 | will be repainted. Causes an EVT_PAINT event to be generated and sent | |
7199 | to the window. | |
7200 | """ | |
54f9ee45 | 7201 | return _core_.Window_Refresh(*args, **kwargs) |
e811c8ce RD |
7202 | |
7203 | def RefreshRect(*args, **kwargs): | |
15afbcd0 | 7204 | """ |
fef4c27a | 7205 | RefreshRect(self, Rect rect, bool eraseBackground=True) |
15afbcd0 RD |
7206 | |
7207 | Redraws the contents of the given rectangle: the area inside it will | |
7208 | be repainted. This is the same as Refresh but has a nicer syntax. | |
7209 | """ | |
54f9ee45 | 7210 | return _core_.Window_RefreshRect(*args, **kwargs) |
e811c8ce RD |
7211 | |
7212 | def Update(*args, **kwargs): | |
15afbcd0 | 7213 | """ |
a95a7133 | 7214 | Update(self) |
15afbcd0 RD |
7215 | |
7216 | Calling this method immediately repaints the invalidated area of the | |
7217 | window instead of waiting for the EVT_PAINT event to happen, (normally | |
7218 | this would usually only happen when the flow of control returns to the | |
7219 | event loop.) Notice that this function doesn't refresh the window and | |
7220 | does nothing if the window has been already repainted. Use Refresh | |
7221 | first if you want to immediately redraw the window (or some portion of | |
7222 | it) unconditionally. | |
7223 | """ | |
54f9ee45 | 7224 | return _core_.Window_Update(*args, **kwargs) |
e811c8ce RD |
7225 | |
7226 | def ClearBackground(*args, **kwargs): | |
15afbcd0 | 7227 | """ |
a95a7133 | 7228 | ClearBackground(self) |
15afbcd0 RD |
7229 | |
7230 | Clears the window by filling it with the current background | |
7231 | colour. Does not cause an erase background event to be generated. | |
7232 | """ | |
54f9ee45 | 7233 | return _core_.Window_ClearBackground(*args, **kwargs) |
e811c8ce RD |
7234 | |
7235 | def Freeze(*args, **kwargs): | |
15afbcd0 | 7236 | """ |
a95a7133 | 7237 | Freeze(self) |
15afbcd0 | 7238 | |
41e2b43e RD |
7239 | Freezes the window or, in other words, prevents any updates from |
7240 | taking place on screen, the window is not redrawn at all. Thaw must be | |
7241 | called to reenable window redrawing. Calls to Freeze/Thaw may be | |
7242 | nested, with the actual Thaw being delayed until all the nesting has | |
7243 | been undone. | |
15afbcd0 RD |
7244 | |
7245 | This method is useful for visual appearance optimization (for example, | |
7246 | it is a good idea to use it before inserting large amount of text into | |
7247 | a wxTextCtrl under wxGTK) but is not implemented on all platforms nor | |
7248 | for all controls so it is mostly just a hint to wxWindows and not a | |
7249 | mandatory directive. | |
7250 | """ | |
54f9ee45 | 7251 | return _core_.Window_Freeze(*args, **kwargs) |
e811c8ce RD |
7252 | |
7253 | def Thaw(*args, **kwargs): | |
15afbcd0 | 7254 | """ |
a95a7133 | 7255 | Thaw(self) |
15afbcd0 | 7256 | |
4276dc52 | 7257 | Reenables window updating after a previous call to Freeze. Calls to |
41e2b43e RD |
7258 | Freeze/Thaw may be nested, so Thaw must be called the same number of |
7259 | times that Freeze was before the window will be updated. | |
15afbcd0 | 7260 | """ |
54f9ee45 | 7261 | return _core_.Window_Thaw(*args, **kwargs) |
e811c8ce RD |
7262 | |
7263 | def PrepareDC(*args, **kwargs): | |
15afbcd0 | 7264 | """ |
a95a7133 | 7265 | PrepareDC(self, DC dc) |
15afbcd0 RD |
7266 | |
7267 | Call this function to prepare the device context for drawing a | |
7268 | scrolled image. It sets the device origin according to the current | |
7269 | scroll position. | |
7270 | """ | |
54f9ee45 | 7271 | return _core_.Window_PrepareDC(*args, **kwargs) |
e811c8ce RD |
7272 | |
7273 | def GetUpdateRegion(*args, **kwargs): | |
15afbcd0 | 7274 | """ |
a95a7133 | 7275 | GetUpdateRegion(self) -> Region |
15afbcd0 RD |
7276 | |
7277 | Returns the region specifying which parts of the window have been | |
7278 | damaged. Should only be called within an EVT_PAINT handler. | |
7279 | """ | |
54f9ee45 | 7280 | return _core_.Window_GetUpdateRegion(*args, **kwargs) |
e811c8ce RD |
7281 | |
7282 | def GetUpdateClientRect(*args, **kwargs): | |
15afbcd0 | 7283 | """ |
a95a7133 | 7284 | GetUpdateClientRect(self) -> Rect |
15afbcd0 RD |
7285 | |
7286 | Get the update rectangle region bounding box in client coords. | |
7287 | """ | |
54f9ee45 | 7288 | return _core_.Window_GetUpdateClientRect(*args, **kwargs) |
e811c8ce RD |
7289 | |
7290 | def IsExposed(*args, **kwargs): | |
15afbcd0 | 7291 | """ |
a95a7133 | 7292 | IsExposed(self, int x, int y, int w=1, int h=1) -> bool |
15afbcd0 RD |
7293 | |
7294 | Returns true if the given point or rectangle area has been exposed | |
7295 | since the last repaint. Call this in an paint event handler to | |
7296 | optimize redrawing by only redrawing those areas, which have been | |
7297 | exposed. | |
7298 | """ | |
54f9ee45 | 7299 | return _core_.Window_IsExposed(*args, **kwargs) |
e811c8ce RD |
7300 | |
7301 | def IsExposedPoint(*args, **kwargs): | |
15afbcd0 | 7302 | """ |
a95a7133 | 7303 | IsExposedPoint(self, Point pt) -> bool |
15afbcd0 RD |
7304 | |
7305 | Returns true if the given point or rectangle area has been exposed | |
7306 | since the last repaint. Call this in an paint event handler to | |
7307 | optimize redrawing by only redrawing those areas, which have been | |
7308 | exposed. | |
7309 | """ | |
54f9ee45 | 7310 | return _core_.Window_IsExposedPoint(*args, **kwargs) |
e811c8ce | 7311 | |
4276dc52 | 7312 | def IsExposedRect(*args, **kwargs): |
15afbcd0 | 7313 | """ |
a95a7133 | 7314 | IsExposedRect(self, Rect rect) -> bool |
15afbcd0 RD |
7315 | |
7316 | Returns true if the given point or rectangle area has been exposed | |
7317 | since the last repaint. Call this in an paint event handler to | |
7318 | optimize redrawing by only redrawing those areas, which have been | |
7319 | exposed. | |
7320 | """ | |
54f9ee45 | 7321 | return _core_.Window_IsExposedRect(*args, **kwargs) |
e811c8ce | 7322 | |
74a57fcd RD |
7323 | def GetDefaultAttributes(*args, **kwargs): |
7324 | """ | |
a95a7133 | 7325 | GetDefaultAttributes(self) -> VisualAttributes |
74a57fcd | 7326 | |
41e2b43e RD |
7327 | Get the default attributes for an instance of this class. This is |
7328 | useful if you want to use the same font or colour in your own control | |
7329 | as in a standard control -- which is a much better idea than hard | |
7330 | coding specific colours or fonts which might look completely out of | |
db3e571a | 7331 | place on the user's system, especially if it uses themes. |
74a57fcd | 7332 | """ |
54f9ee45 | 7333 | return _core_.Window_GetDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
7334 | |
7335 | def GetClassDefaultAttributes(*args, **kwargs): | |
7336 | """ | |
66c033b4 | 7337 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes |
74a57fcd | 7338 | |
41e2b43e RD |
7339 | Get the default attributes for this class. This is useful if you want |
7340 | to use the same font or colour in your own control as in a standard | |
7341 | control -- which is a much better idea than hard coding specific | |
db3e571a RD |
7342 | colours or fonts which might look completely out of place on the |
7343 | user's system, especially if it uses themes. | |
74a57fcd RD |
7344 | |
7345 | The variant parameter is only relevant under Mac currently and is | |
41e2b43e | 7346 | ignore under other platforms. Under Mac, it will change the size of |
db3e571a RD |
7347 | the returned font. See `wx.Window.SetWindowVariant` for more about |
7348 | this. | |
74a57fcd | 7349 | """ |
54f9ee45 | 7350 | return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
7351 | |
7352 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
e811c8ce | 7353 | def SetBackgroundColour(*args, **kwargs): |
15afbcd0 | 7354 | """ |
a95a7133 | 7355 | SetBackgroundColour(self, Colour colour) -> bool |
15afbcd0 RD |
7356 | |
7357 | Sets the background colour of the window. Returns True if the colour | |
7358 | was changed. The background colour is usually painted by the default | |
7359 | EVT_ERASE_BACKGROUND event handler function under Windows and | |
f8167d6e RD |
7360 | automatically under GTK. Using `wx.NullColour` will reset the window |
7361 | to the default background colour. | |
15afbcd0 | 7362 | |
db3e571a | 7363 | Note that setting the background colour may not cause an immediate |
f8167d6e | 7364 | refresh, so you may wish to call `ClearBackground` or `Refresh` after |
15afbcd0 RD |
7365 | calling this function. |
7366 | ||
f8167d6e RD |
7367 | Using this function will disable attempts to use themes for this |
7368 | window, if the system supports them. Use with care since usually the | |
7369 | themes represent the appearance chosen by the user to be used for all | |
7370 | applications on the system. | |
15afbcd0 | 7371 | """ |
54f9ee45 | 7372 | return _core_.Window_SetBackgroundColour(*args, **kwargs) |
e811c8ce | 7373 | |
412d302d RD |
7374 | def SetOwnBackgroundColour(*args, **kwargs): |
7375 | """SetOwnBackgroundColour(self, Colour colour)""" | |
7376 | return _core_.Window_SetOwnBackgroundColour(*args, **kwargs) | |
b2df227b | 7377 | |
e811c8ce | 7378 | def SetForegroundColour(*args, **kwargs): |
15afbcd0 | 7379 | """ |
a95a7133 | 7380 | SetForegroundColour(self, Colour colour) -> bool |
15afbcd0 RD |
7381 | |
7382 | Sets the foreground colour of the window. Returns True is the colour | |
7383 | was changed. The interpretation of foreground colour is dependent on | |
7384 | the window class; it may be the text colour or other colour, or it may | |
7385 | not be used at all. | |
7386 | """ | |
54f9ee45 | 7387 | return _core_.Window_SetForegroundColour(*args, **kwargs) |
e811c8ce | 7388 | |
fa47d7a7 VS |
7389 | def SetOwnForegroundColour(*args, **kwargs): |
7390 | """SetOwnForegroundColour(self, Colour colour)""" | |
7391 | return _core_.Window_SetOwnForegroundColour(*args, **kwargs) | |
b2df227b | 7392 | |
e811c8ce | 7393 | def GetBackgroundColour(*args, **kwargs): |
15afbcd0 | 7394 | """ |
a95a7133 | 7395 | GetBackgroundColour(self) -> Colour |
15afbcd0 RD |
7396 | |
7397 | Returns the background colour of the window. | |
7398 | """ | |
54f9ee45 | 7399 | return _core_.Window_GetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
7400 | |
7401 | def GetForegroundColour(*args, **kwargs): | |
15afbcd0 | 7402 | """ |
a95a7133 | 7403 | GetForegroundColour(self) -> Colour |
15afbcd0 RD |
7404 | |
7405 | Returns the foreground colour of the window. The interpretation of | |
7406 | foreground colour is dependent on the window class; it may be the text | |
7407 | colour or other colour, or it may not be used at all. | |
7408 | """ | |
54f9ee45 | 7409 | return _core_.Window_GetForegroundColour(*args, **kwargs) |
e811c8ce | 7410 | |
562ecc31 RD |
7411 | def InheritsBackgroundColour(*args, **kwargs): |
7412 | """InheritsBackgroundColour(self) -> bool""" | |
7413 | return _core_.Window_InheritsBackgroundColour(*args, **kwargs) | |
7414 | ||
7415 | def UseBgCol(*args, **kwargs): | |
7416 | """UseBgCol(self) -> bool""" | |
7417 | return _core_.Window_UseBgCol(*args, **kwargs) | |
7418 | ||
7bc1e663 RD |
7419 | def SetBackgroundStyle(*args, **kwargs): |
7420 | """ | |
7421 | SetBackgroundStyle(self, int style) -> bool | |
7422 | ||
7423 | Returns the background style of the window. The background style | |
7424 | indicates how the background of the window is drawn. | |
7425 | ||
7426 | ====================== ======================================== | |
7427 | wx.BG_STYLE_SYSTEM The background colour or pattern should | |
7428 | be determined by the system | |
7429 | wx.BG_STYLE_COLOUR The background should be a solid colour | |
7430 | wx.BG_STYLE_CUSTOM The background will be implemented by the | |
7431 | application. | |
7432 | ====================== ======================================== | |
7433 | ||
7434 | On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of | |
7435 | a custom background, such as a tiled bitmap. Currently the style has | |
7436 | no effect on other platforms. | |
7437 | ||
7438 | :see: `GetBackgroundStyle`, `SetBackgroundColour` | |
7439 | """ | |
7440 | return _core_.Window_SetBackgroundStyle(*args, **kwargs) | |
7441 | ||
7442 | def GetBackgroundStyle(*args, **kwargs): | |
7443 | """ | |
7444 | GetBackgroundStyle(self) -> int | |
7445 | ||
7446 | Returns the background style of the window. | |
7447 | ||
7448 | :see: `SetBackgroundStyle` | |
7449 | """ | |
7450 | return _core_.Window_GetBackgroundStyle(*args, **kwargs) | |
7451 | ||
51b83b37 RD |
7452 | def HasTransparentBackground(*args, **kwargs): |
7453 | """ | |
7454 | HasTransparentBackground(self) -> bool | |
7455 | ||
7456 | Returns True if this window's background is transparent (as, for | |
7457 | example, for `wx.StaticText`) and should show the parent window's | |
7458 | background. | |
7459 | ||
7460 | This method is mostly used internally by the library itself and you | |
7461 | normally shouldn't have to call it. You may, however, have to override | |
7462 | it in your custom control classes to ensure that background is painted | |
7463 | correctly. | |
7464 | """ | |
7465 | return _core_.Window_HasTransparentBackground(*args, **kwargs) | |
7466 | ||
e811c8ce | 7467 | def SetCursor(*args, **kwargs): |
15afbcd0 | 7468 | """ |
a95a7133 | 7469 | SetCursor(self, Cursor cursor) -> bool |
15afbcd0 RD |
7470 | |
7471 | Sets the window's cursor. Notice that the window cursor also sets it | |
7472 | for the children of the window implicitly. | |
7473 | ||
7474 | The cursor may be wx.NullCursor in which case the window cursor will | |
7475 | be reset back to default. | |
7476 | """ | |
54f9ee45 | 7477 | return _core_.Window_SetCursor(*args, **kwargs) |
e811c8ce RD |
7478 | |
7479 | def GetCursor(*args, **kwargs): | |
15afbcd0 | 7480 | """ |
a95a7133 | 7481 | GetCursor(self) -> Cursor |
15afbcd0 RD |
7482 | |
7483 | Return the cursor associated with this window. | |
7484 | """ | |
54f9ee45 | 7485 | return _core_.Window_GetCursor(*args, **kwargs) |
e811c8ce RD |
7486 | |
7487 | def SetFont(*args, **kwargs): | |
15afbcd0 | 7488 | """ |
a95a7133 | 7489 | SetFont(self, Font font) -> bool |
15afbcd0 RD |
7490 | |
7491 | Sets the font for this window. | |
7492 | """ | |
54f9ee45 | 7493 | return _core_.Window_SetFont(*args, **kwargs) |
e811c8ce | 7494 | |
fa47d7a7 VS |
7495 | def SetOwnFont(*args, **kwargs): |
7496 | """SetOwnFont(self, Font font)""" | |
7497 | return _core_.Window_SetOwnFont(*args, **kwargs) | |
b2df227b | 7498 | |
e811c8ce | 7499 | def GetFont(*args, **kwargs): |
15afbcd0 | 7500 | """ |
a95a7133 | 7501 | GetFont(self) -> Font |
15afbcd0 | 7502 | |
4276dc52 | 7503 | Returns the default font used for this window. |
15afbcd0 | 7504 | """ |
54f9ee45 | 7505 | return _core_.Window_GetFont(*args, **kwargs) |
e811c8ce RD |
7506 | |
7507 | def SetCaret(*args, **kwargs): | |
15afbcd0 | 7508 | """ |
a95a7133 | 7509 | SetCaret(self, Caret caret) |
15afbcd0 RD |
7510 | |
7511 | Sets the caret associated with the window. | |
7512 | """ | |
54f9ee45 | 7513 | return _core_.Window_SetCaret(*args, **kwargs) |
e811c8ce RD |
7514 | |
7515 | def GetCaret(*args, **kwargs): | |
15afbcd0 | 7516 | """ |
a95a7133 | 7517 | GetCaret(self) -> Caret |
15afbcd0 RD |
7518 | |
7519 | Returns the caret associated with the window. | |
7520 | """ | |
54f9ee45 | 7521 | return _core_.Window_GetCaret(*args, **kwargs) |
e811c8ce RD |
7522 | |
7523 | def GetCharHeight(*args, **kwargs): | |
15afbcd0 | 7524 | """ |
a95a7133 | 7525 | GetCharHeight(self) -> int |
15afbcd0 RD |
7526 | |
7527 | Get the (average) character size for the current font. | |
7528 | """ | |
54f9ee45 | 7529 | return _core_.Window_GetCharHeight(*args, **kwargs) |
e811c8ce RD |
7530 | |
7531 | def GetCharWidth(*args, **kwargs): | |
15afbcd0 | 7532 | """ |
a95a7133 | 7533 | GetCharWidth(self) -> int |
15afbcd0 RD |
7534 | |
7535 | Get the (average) character size for the current font. | |
7536 | """ | |
54f9ee45 | 7537 | return _core_.Window_GetCharWidth(*args, **kwargs) |
e811c8ce RD |
7538 | |
7539 | def GetTextExtent(*args, **kwargs): | |
fd2dc343 RD |
7540 | """ |
7541 | GetTextExtent(String string) -> (width, height) | |
7542 | ||
7543 | Get the width and height of the text using the current font. | |
7544 | """ | |
54f9ee45 | 7545 | return _core_.Window_GetTextExtent(*args, **kwargs) |
e811c8ce RD |
7546 | |
7547 | def GetFullTextExtent(*args, **kwargs): | |
0df68c9f | 7548 | """ |
196addbf | 7549 | GetFullTextExtent(String string, Font font=None) -> |
0df68c9f | 7550 | (width, height, descent, externalLeading) |
e811c8ce | 7551 | |
15afbcd0 RD |
7552 | Get the width, height, decent and leading of the text using the |
7553 | current or specified font. | |
0df68c9f | 7554 | """ |
54f9ee45 | 7555 | return _core_.Window_GetFullTextExtent(*args, **kwargs) |
e811c8ce RD |
7556 | |
7557 | def ClientToScreenXY(*args, **kwargs): | |
15afbcd0 RD |
7558 | """ |
7559 | ClientToScreenXY(int x, int y) -> (x,y) | |
7560 | ||
7561 | Converts to screen coordinates from coordinates relative to this window. | |
7562 | """ | |
54f9ee45 | 7563 | return _core_.Window_ClientToScreenXY(*args, **kwargs) |
e811c8ce RD |
7564 | |
7565 | def ScreenToClientXY(*args, **kwargs): | |
15afbcd0 RD |
7566 | """ |
7567 | ScreenToClientXY(int x, int y) -> (x,y) | |
7568 | ||
7569 | Converts from screen to client window coordinates. | |
7570 | """ | |
54f9ee45 | 7571 | return _core_.Window_ScreenToClientXY(*args, **kwargs) |
e811c8ce RD |
7572 | |
7573 | def ClientToScreen(*args, **kwargs): | |
15afbcd0 | 7574 | """ |
a95a7133 | 7575 | ClientToScreen(self, Point pt) -> Point |
15afbcd0 RD |
7576 | |
7577 | Converts to screen coordinates from coordinates relative to this window. | |
7578 | """ | |
54f9ee45 | 7579 | return _core_.Window_ClientToScreen(*args, **kwargs) |
e811c8ce RD |
7580 | |
7581 | def ScreenToClient(*args, **kwargs): | |
15afbcd0 | 7582 | """ |
a95a7133 | 7583 | ScreenToClient(self, Point pt) -> Point |
15afbcd0 RD |
7584 | |
7585 | Converts from screen to client window coordinates. | |
7586 | """ | |
54f9ee45 | 7587 | return _core_.Window_ScreenToClient(*args, **kwargs) |
e811c8ce RD |
7588 | |
7589 | def HitTestXY(*args, **kwargs): | |
15afbcd0 | 7590 | """ |
a95a7133 | 7591 | HitTestXY(self, int x, int y) -> int |
15afbcd0 RD |
7592 | |
7593 | Test where the given (in client coords) point lies | |
7594 | """ | |
54f9ee45 | 7595 | return _core_.Window_HitTestXY(*args, **kwargs) |
e811c8ce RD |
7596 | |
7597 | def HitTest(*args, **kwargs): | |
15afbcd0 | 7598 | """ |
a95a7133 | 7599 | HitTest(self, Point pt) -> int |
15afbcd0 RD |
7600 | |
7601 | Test where the given (in client coords) point lies | |
7602 | """ | |
54f9ee45 | 7603 | return _core_.Window_HitTest(*args, **kwargs) |
e811c8ce | 7604 | |
15afbcd0 RD |
7605 | def GetBorder(*args): |
7606 | """ | |
a95a7133 RD |
7607 | GetBorder(self, long flags) -> int |
7608 | GetBorder(self) -> int | |
e811c8ce | 7609 | |
15afbcd0 RD |
7610 | Get border for the flags of this window |
7611 | """ | |
54f9ee45 | 7612 | return _core_.Window_GetBorder(*args) |
e811c8ce RD |
7613 | |
7614 | def UpdateWindowUI(*args, **kwargs): | |
15afbcd0 | 7615 | """ |
a95a7133 | 7616 | UpdateWindowUI(self, long flags=UPDATE_UI_NONE) |
15afbcd0 RD |
7617 | |
7618 | This function sends EVT_UPDATE_UI events to the window. The particular | |
7619 | implementation depends on the window; for example a wx.ToolBar will | |
7620 | send an update UI event for each toolbar button, and a wx.Frame will | |
7621 | send an update UI event for each menubar menu item. You can call this | |
7622 | function from your application to ensure that your UI is up-to-date at | |
7623 | a particular point in time (as far as your EVT_UPDATE_UI handlers are | |
7624 | concerned). This may be necessary if you have called | |
7625 | wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to | |
7626 | limit the overhead that wxWindows incurs by sending update UI events | |
7627 | in idle time. | |
15afbcd0 | 7628 | """ |
54f9ee45 | 7629 | return _core_.Window_UpdateWindowUI(*args, **kwargs) |
e811c8ce RD |
7630 | |
7631 | def PopupMenuXY(*args, **kwargs): | |
15afbcd0 | 7632 | """ |
b0503257 | 7633 | PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool |
15afbcd0 | 7634 | |
b0503257 RD |
7635 | Pops up the given menu at the specified coordinates, relative to this window, |
7636 | and returns control when the user has dismissed the menu. If a menu item is | |
7637 | selected, the corresponding menu event is generated and will be processed as | |
7638 | usual. If the default position is given then the current position of the | |
7639 | mouse cursor will be used. | |
15afbcd0 | 7640 | """ |
54f9ee45 | 7641 | return _core_.Window_PopupMenuXY(*args, **kwargs) |
e811c8ce | 7642 | |
15afbcd0 RD |
7643 | def PopupMenu(*args, **kwargs): |
7644 | """ | |
b0503257 | 7645 | PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool |
15afbcd0 | 7646 | |
b0503257 RD |
7647 | Pops up the given menu at the specified coordinates, relative to this window, |
7648 | and returns control when the user has dismissed the menu. If a menu item is | |
7649 | selected, the corresponding menu event is generated and will be processed as | |
7650 | usual. If the default position is given then the current position of the | |
7651 | mouse cursor will be used. | |
15afbcd0 | 7652 | """ |
54f9ee45 | 7653 | return _core_.Window_PopupMenu(*args, **kwargs) |
15afbcd0 RD |
7654 | |
7655 | def GetHandle(*args, **kwargs): | |
7656 | """ | |
a95a7133 | 7657 | GetHandle(self) -> long |
15afbcd0 RD |
7658 | |
7659 | Returns the platform-specific handle (as a long integer) of the | |
7660 | physical window. Currently on wxMac it returns the handle of the | |
7661 | toplevel parent of the window. | |
7662 | """ | |
54f9ee45 | 7663 | return _core_.Window_GetHandle(*args, **kwargs) |
15afbcd0 | 7664 | |
7e63a440 RD |
7665 | def AssociateHandle(*args, **kwargs): |
7666 | """ | |
7667 | AssociateHandle(self, long handle) | |
7668 | ||
7669 | Associate the window with a new native handle | |
7670 | """ | |
7671 | return _core_.Window_AssociateHandle(*args, **kwargs) | |
7672 | ||
7673 | def DissociateHandle(*args, **kwargs): | |
7674 | """ | |
7675 | DissociateHandle(self) | |
7676 | ||
7677 | Dissociate the current native handle from the window | |
7678 | """ | |
7679 | return _core_.Window_DissociateHandle(*args, **kwargs) | |
7680 | ||
15afbcd0 RD |
7681 | def HasScrollbar(*args, **kwargs): |
7682 | """ | |
a95a7133 | 7683 | HasScrollbar(self, int orient) -> bool |
15afbcd0 RD |
7684 | |
7685 | Does the window have the scrollbar for this orientation? | |
7686 | """ | |
54f9ee45 | 7687 | return _core_.Window_HasScrollbar(*args, **kwargs) |
15afbcd0 RD |
7688 | |
7689 | def SetScrollbar(*args, **kwargs): | |
7690 | """ | |
41e2b43e | 7691 | SetScrollbar(self, int orientation, int position, int thumbSize, int range, |
15afbcd0 RD |
7692 | bool refresh=True) |
7693 | ||
7694 | Sets the scrollbar properties of a built-in scrollbar. | |
15afbcd0 | 7695 | """ |
54f9ee45 | 7696 | return _core_.Window_SetScrollbar(*args, **kwargs) |
e811c8ce RD |
7697 | |
7698 | def SetScrollPos(*args, **kwargs): | |
15afbcd0 | 7699 | """ |
a95a7133 | 7700 | SetScrollPos(self, int orientation, int pos, bool refresh=True) |
15afbcd0 RD |
7701 | |
7702 | Sets the position of one of the built-in scrollbars. | |
7703 | """ | |
54f9ee45 | 7704 | return _core_.Window_SetScrollPos(*args, **kwargs) |
e811c8ce RD |
7705 | |
7706 | def GetScrollPos(*args, **kwargs): | |
15afbcd0 | 7707 | """ |
a95a7133 | 7708 | GetScrollPos(self, int orientation) -> int |
15afbcd0 RD |
7709 | |
7710 | Returns the built-in scrollbar position. | |
7711 | """ | |
54f9ee45 | 7712 | return _core_.Window_GetScrollPos(*args, **kwargs) |
e811c8ce RD |
7713 | |
7714 | def GetScrollThumb(*args, **kwargs): | |
15afbcd0 | 7715 | """ |
a95a7133 | 7716 | GetScrollThumb(self, int orientation) -> int |
15afbcd0 RD |
7717 | |
7718 | Returns the built-in scrollbar thumb size. | |
7719 | """ | |
54f9ee45 | 7720 | return _core_.Window_GetScrollThumb(*args, **kwargs) |
e811c8ce RD |
7721 | |
7722 | def GetScrollRange(*args, **kwargs): | |
15afbcd0 | 7723 | """ |
a95a7133 | 7724 | GetScrollRange(self, int orientation) -> int |
15afbcd0 RD |
7725 | |
7726 | Returns the built-in scrollbar range. | |
7727 | """ | |
54f9ee45 | 7728 | return _core_.Window_GetScrollRange(*args, **kwargs) |
e811c8ce RD |
7729 | |
7730 | def ScrollWindow(*args, **kwargs): | |
15afbcd0 | 7731 | """ |
a95a7133 | 7732 | ScrollWindow(self, int dx, int dy, Rect rect=None) |
15afbcd0 RD |
7733 | |
7734 | Physically scrolls the pixels in the window and move child windows | |
7735 | accordingly. Use this function to optimise your scrolling | |
7736 | implementations, to minimise the area that must be redrawn. Note that | |
7737 | it is rarely required to call this function from a user program. | |
15afbcd0 | 7738 | """ |
54f9ee45 | 7739 | return _core_.Window_ScrollWindow(*args, **kwargs) |
e811c8ce RD |
7740 | |
7741 | def ScrollLines(*args, **kwargs): | |
15afbcd0 | 7742 | """ |
a95a7133 | 7743 | ScrollLines(self, int lines) -> bool |
15afbcd0 RD |
7744 | |
7745 | If the platform and window class supports it, scrolls the window by | |
7746 | the given number of lines down, if lines is positive, or up if lines | |
7747 | is negative. Returns True if the window was scrolled, False if it was | |
7748 | already on top/bottom and nothing was done. | |
7749 | """ | |
54f9ee45 | 7750 | return _core_.Window_ScrollLines(*args, **kwargs) |
e811c8ce RD |
7751 | |
7752 | def ScrollPages(*args, **kwargs): | |
15afbcd0 | 7753 | """ |
a95a7133 | 7754 | ScrollPages(self, int pages) -> bool |
15afbcd0 | 7755 | |
41e2b43e | 7756 | If the platform and window class supports it, scrolls the window by |
15afbcd0 RD |
7757 | the given number of pages down, if pages is positive, or up if pages |
7758 | is negative. Returns True if the window was scrolled, False if it was | |
7759 | already on top/bottom and nothing was done. | |
7760 | """ | |
54f9ee45 | 7761 | return _core_.Window_ScrollPages(*args, **kwargs) |
e811c8ce RD |
7762 | |
7763 | def LineUp(*args, **kwargs): | |
15afbcd0 | 7764 | """ |
a95a7133 | 7765 | LineUp(self) -> bool |
15afbcd0 RD |
7766 | |
7767 | This is just a wrapper for ScrollLines(-1). | |
7768 | """ | |
54f9ee45 | 7769 | return _core_.Window_LineUp(*args, **kwargs) |
e811c8ce RD |
7770 | |
7771 | def LineDown(*args, **kwargs): | |
15afbcd0 | 7772 | """ |
a95a7133 | 7773 | LineDown(self) -> bool |
15afbcd0 RD |
7774 | |
7775 | This is just a wrapper for ScrollLines(1). | |
7776 | """ | |
54f9ee45 | 7777 | return _core_.Window_LineDown(*args, **kwargs) |
e811c8ce RD |
7778 | |
7779 | def PageUp(*args, **kwargs): | |
15afbcd0 | 7780 | """ |
a95a7133 | 7781 | PageUp(self) -> bool |
15afbcd0 RD |
7782 | |
7783 | This is just a wrapper for ScrollPages(-1). | |
7784 | """ | |
54f9ee45 | 7785 | return _core_.Window_PageUp(*args, **kwargs) |
e811c8ce RD |
7786 | |
7787 | def PageDown(*args, **kwargs): | |
15afbcd0 | 7788 | """ |
a95a7133 | 7789 | PageDown(self) -> bool |
15afbcd0 RD |
7790 | |
7791 | This is just a wrapper for ScrollPages(1). | |
7792 | """ | |
54f9ee45 | 7793 | return _core_.Window_PageDown(*args, **kwargs) |
e811c8ce RD |
7794 | |
7795 | def SetHelpText(*args, **kwargs): | |
15afbcd0 | 7796 | """ |
a95a7133 | 7797 | SetHelpText(self, String text) |
15afbcd0 RD |
7798 | |
7799 | Sets the help text to be used as context-sensitive help for this | |
7800 | window. Note that the text is actually stored by the current | |
7801 | wxHelpProvider implementation, and not in the window object itself. | |
7802 | """ | |
54f9ee45 | 7803 | return _core_.Window_SetHelpText(*args, **kwargs) |
e811c8ce RD |
7804 | |
7805 | def SetHelpTextForId(*args, **kwargs): | |
15afbcd0 | 7806 | """ |
a95a7133 | 7807 | SetHelpTextForId(self, String text) |
15afbcd0 RD |
7808 | |
7809 | Associate this help text with all windows with the same id as this | |
7810 | one. | |
7811 | """ | |
54f9ee45 | 7812 | return _core_.Window_SetHelpTextForId(*args, **kwargs) |
e811c8ce RD |
7813 | |
7814 | def GetHelpText(*args, **kwargs): | |
15afbcd0 | 7815 | """ |
a95a7133 | 7816 | GetHelpText(self) -> String |
15afbcd0 RD |
7817 | |
7818 | Gets the help text to be used as context-sensitive help for this | |
7819 | window. Note that the text is actually stored by the current | |
7820 | wxHelpProvider implementation, and not in the window object itself. | |
7821 | """ | |
54f9ee45 | 7822 | return _core_.Window_GetHelpText(*args, **kwargs) |
e811c8ce RD |
7823 | |
7824 | def SetToolTipString(*args, **kwargs): | |
15afbcd0 | 7825 | """ |
a95a7133 | 7826 | SetToolTipString(self, String tip) |
15afbcd0 RD |
7827 | |
7828 | Attach a tooltip to the window. | |
7829 | """ | |
54f9ee45 | 7830 | return _core_.Window_SetToolTipString(*args, **kwargs) |
e811c8ce RD |
7831 | |
7832 | def SetToolTip(*args, **kwargs): | |
15afbcd0 | 7833 | """ |
a95a7133 | 7834 | SetToolTip(self, ToolTip tip) |
15afbcd0 RD |
7835 | |
7836 | Attach a tooltip to the window. | |
7837 | """ | |
54f9ee45 | 7838 | return _core_.Window_SetToolTip(*args, **kwargs) |
e811c8ce RD |
7839 | |
7840 | def GetToolTip(*args, **kwargs): | |
15afbcd0 | 7841 | """ |
a95a7133 | 7842 | GetToolTip(self) -> ToolTip |
15afbcd0 RD |
7843 | |
7844 | get the associated tooltip or None if none | |
7845 | """ | |
54f9ee45 | 7846 | return _core_.Window_GetToolTip(*args, **kwargs) |
e811c8ce RD |
7847 | |
7848 | def SetDropTarget(*args, **kwargs): | |
15afbcd0 | 7849 | """ |
a95a7133 | 7850 | SetDropTarget(self, DropTarget dropTarget) |
15afbcd0 RD |
7851 | |
7852 | Associates a drop target with this window. If the window already has | |
7853 | a drop target, it is deleted. | |
7854 | """ | |
54f9ee45 | 7855 | return _core_.Window_SetDropTarget(*args, **kwargs) |
e811c8ce RD |
7856 | |
7857 | def GetDropTarget(*args, **kwargs): | |
15afbcd0 | 7858 | """ |
a95a7133 | 7859 | GetDropTarget(self) -> DropTarget |
15afbcd0 RD |
7860 | |
7861 | Returns the associated drop target, which may be None. | |
7862 | """ | |
54f9ee45 | 7863 | return _core_.Window_GetDropTarget(*args, **kwargs) |
e811c8ce RD |
7864 | |
7865 | def SetConstraints(*args, **kwargs): | |
15afbcd0 | 7866 | """ |
a95a7133 | 7867 | SetConstraints(self, LayoutConstraints constraints) |
15afbcd0 RD |
7868 | |
7869 | Sets the window to have the given layout constraints. If an existing | |
7870 | layout constraints object is already owned by the window, it will be | |
7871 | deleted. Pass None to disassociate and delete the window's current | |
7872 | constraints. | |
7873 | ||
7874 | You must call SetAutoLayout to tell a window to use the constraints | |
7875 | automatically in its default EVT_SIZE handler; otherwise, you must | |
7876 | handle EVT_SIZE yourself and call Layout() explicitly. When setting | |
7877 | both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have | |
7878 | effect. | |
7879 | """ | |
54f9ee45 | 7880 | return _core_.Window_SetConstraints(*args, **kwargs) |
e811c8ce RD |
7881 | |
7882 | def GetConstraints(*args, **kwargs): | |
15afbcd0 | 7883 | """ |
a95a7133 | 7884 | GetConstraints(self) -> LayoutConstraints |
15afbcd0 RD |
7885 | |
7886 | Returns a pointer to the window's layout constraints, or None if there | |
7887 | are none. | |
7888 | """ | |
54f9ee45 | 7889 | return _core_.Window_GetConstraints(*args, **kwargs) |
e811c8ce RD |
7890 | |
7891 | def SetAutoLayout(*args, **kwargs): | |
15afbcd0 | 7892 | """ |
a95a7133 | 7893 | SetAutoLayout(self, bool autoLayout) |
15afbcd0 RD |
7894 | |
7895 | Determines whether the Layout function will be called automatically | |
7896 | when the window is resized. It is called implicitly by SetSizer but | |
7897 | if you use SetConstraints you should call it manually or otherwise the | |
7898 | window layout won't be correctly updated when its size changes. | |
7899 | """ | |
54f9ee45 | 7900 | return _core_.Window_SetAutoLayout(*args, **kwargs) |
e811c8ce RD |
7901 | |
7902 | def GetAutoLayout(*args, **kwargs): | |
15afbcd0 | 7903 | """ |
a95a7133 | 7904 | GetAutoLayout(self) -> bool |
15afbcd0 RD |
7905 | |
7906 | Returns the current autoLayout setting | |
7907 | """ | |
54f9ee45 | 7908 | return _core_.Window_GetAutoLayout(*args, **kwargs) |
e811c8ce RD |
7909 | |
7910 | def Layout(*args, **kwargs): | |
15afbcd0 | 7911 | """ |
a95a7133 | 7912 | Layout(self) -> bool |
15afbcd0 RD |
7913 | |
7914 | Invokes the constraint-based layout algorithm or the sizer-based | |
7915 | algorithm for this window. See SetAutoLayout: when auto layout is on, | |
7916 | this function gets called automatically by the default EVT_SIZE | |
7917 | handler when the window is resized. | |
7918 | """ | |
54f9ee45 | 7919 | return _core_.Window_Layout(*args, **kwargs) |
e811c8ce RD |
7920 | |
7921 | def SetSizer(*args, **kwargs): | |
15afbcd0 | 7922 | """ |
a95a7133 | 7923 | SetSizer(self, Sizer sizer, bool deleteOld=True) |
15afbcd0 RD |
7924 | |
7925 | Sets the window to have the given layout sizer. The window will then | |
7926 | own the object, and will take care of its deletion. If an existing | |
7927 | layout sizer object is already owned by the window, it will be deleted | |
7928 | if the deleteOld parameter is true. Note that this function will also | |
7929 | call SetAutoLayout implicitly with a True parameter if the sizer is | |
ae8162c8 | 7930 | non-None, and False otherwise. |
15afbcd0 | 7931 | """ |
54f9ee45 | 7932 | return _core_.Window_SetSizer(*args, **kwargs) |
e811c8ce RD |
7933 | |
7934 | def SetSizerAndFit(*args, **kwargs): | |
15afbcd0 | 7935 | """ |
a95a7133 | 7936 | SetSizerAndFit(self, Sizer sizer, bool deleteOld=True) |
15afbcd0 RD |
7937 | |
7938 | The same as SetSizer, except it also sets the size hints for the | |
7939 | window based on the sizer's minimum size. | |
7940 | """ | |
54f9ee45 | 7941 | return _core_.Window_SetSizerAndFit(*args, **kwargs) |
e811c8ce RD |
7942 | |
7943 | def GetSizer(*args, **kwargs): | |
15afbcd0 | 7944 | """ |
a95a7133 | 7945 | GetSizer(self) -> Sizer |
15afbcd0 RD |
7946 | |
7947 | Return the sizer associated with the window by a previous call to | |
7948 | SetSizer or None if there isn't one. | |
7949 | """ | |
54f9ee45 | 7950 | return _core_.Window_GetSizer(*args, **kwargs) |
e811c8ce RD |
7951 | |
7952 | def SetContainingSizer(*args, **kwargs): | |
15afbcd0 | 7953 | """ |
a95a7133 | 7954 | SetContainingSizer(self, Sizer sizer) |
15afbcd0 RD |
7955 | |
7956 | This normally does not need to be called by application code. It is | |
7957 | called internally when a window is added to a sizer, and is used so | |
7958 | the window can remove itself from the sizer when it is destroyed. | |
7959 | """ | |
54f9ee45 | 7960 | return _core_.Window_SetContainingSizer(*args, **kwargs) |
e811c8ce RD |
7961 | |
7962 | def GetContainingSizer(*args, **kwargs): | |
15afbcd0 | 7963 | """ |
a95a7133 | 7964 | GetContainingSizer(self) -> Sizer |
15afbcd0 RD |
7965 | |
7966 | Return the sizer that this window is a member of, if any, otherwise None. | |
7967 | """ | |
54f9ee45 | 7968 | return _core_.Window_GetContainingSizer(*args, **kwargs) |
e811c8ce | 7969 | |
a95a7133 RD |
7970 | def InheritAttributes(*args, **kwargs): |
7971 | """ | |
7972 | InheritAttributes(self) | |
7973 | ||
41e2b43e RD |
7974 | This function is (or should be, in case of custom controls) called |
7975 | during window creation to intelligently set up the window visual | |
7976 | attributes, that is the font and the foreground and background | |
7977 | colours. | |
7978 | ||
7979 | By 'intelligently' the following is meant: by default, all windows use | |
7980 | their own default attributes. However if some of the parent's | |
7981 | attributes are explicitly changed (that is, using SetFont and not | |
fa47d7a7 | 7982 | SetOwnFont) and if the corresponding attribute hadn't been |
41e2b43e RD |
7983 | explicitly set for this window itself, then this window takes the same |
7984 | value as used by the parent. In addition, if the window overrides | |
7985 | ShouldInheritColours to return false, the colours will not be changed | |
7986 | no matter what and only the font might. | |
7987 | ||
34621cc5 | 7988 | This rather complicated logic is necessary in order to accommodate the |
ec9b55ca | 7989 | different usage scenarios. The most common one is when all default |
41e2b43e RD |
7990 | attributes are used and in this case, nothing should be inherited as |
7991 | in modern GUIs different controls use different fonts (and colours) | |
7992 | than their siblings so they can't inherit the same value from the | |
7993 | parent. However it was also deemed desirable to allow to simply change | |
7994 | the attributes of all children at once by just changing the font or | |
7995 | colour of their common parent, hence in this case we do inherit the | |
7996 | parents attributes. | |
7997 | ||
a95a7133 | 7998 | """ |
54f9ee45 | 7999 | return _core_.Window_InheritAttributes(*args, **kwargs) |
a95a7133 RD |
8000 | |
8001 | def ShouldInheritColours(*args, **kwargs): | |
8002 | """ | |
8003 | ShouldInheritColours(self) -> bool | |
8004 | ||
8005 | Return true from here to allow the colours of this window to be | |
41e2b43e RD |
8006 | changed by InheritAttributes, returning false forbids inheriting them |
8007 | from the parent window. | |
a95a7133 | 8008 | |
41e2b43e RD |
8009 | The base class version returns false, but this method is overridden in |
8010 | wxControl where it returns true. | |
a95a7133 | 8011 | """ |
54f9ee45 | 8012 | return _core_.Window_ShouldInheritColours(*args, **kwargs) |
a95a7133 | 8013 | |
e811c8ce | 8014 | def PostCreate(self, pre): |
15afbcd0 RD |
8015 | """ |
8016 | Phase 3 of the 2-phase create <wink!> | |
8017 | Call this method after precreating the window with the 2-phase create method. | |
8018 | """ | |
e811c8ce RD |
8019 | self.this = pre.this |
8020 | self.thisown = pre.thisown | |
8021 | pre.thisown = 0 | |
8022 | if hasattr(self, '_setOORInfo'): | |
8023 | self._setOORInfo(self) | |
8024 | if hasattr(self, '_setCallbackInfo'): | |
8025 | self._setCallbackInfo(self, self.__class__) | |
8026 | ||
8027 | ||
8028 | class WindowPtr(Window): | |
8029 | def __init__(self, this): | |
8030 | self.this = this | |
8031 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8032 | self.__class__ = Window | |
54f9ee45 | 8033 | _core_.Window_swigregister(WindowPtr) |
e811c8ce RD |
8034 | |
8035 | def PreWindow(*args, **kwargs): | |
15afbcd0 RD |
8036 | """ |
8037 | PreWindow() -> Window | |
8038 | ||
8039 | Precreate a Window for 2-phase creation. | |
8040 | """ | |
54f9ee45 | 8041 | val = _core_.new_PreWindow(*args, **kwargs) |
e811c8ce RD |
8042 | val.thisown = 1 |
8043 | return val | |
8044 | ||
8045 | def Window_NewControlId(*args, **kwargs): | |
15afbcd0 RD |
8046 | """ |
8047 | Window_NewControlId() -> int | |
8048 | ||
8049 | Generate a control id for the controls which were not given one. | |
8050 | """ | |
54f9ee45 | 8051 | return _core_.Window_NewControlId(*args, **kwargs) |
e811c8ce RD |
8052 | |
8053 | def Window_NextControlId(*args, **kwargs): | |
15afbcd0 RD |
8054 | """ |
8055 | Window_NextControlId(int winid) -> int | |
8056 | ||
8057 | Get the id of the control following the one with the given | |
41e2b43e | 8058 | autogenerated) id |
15afbcd0 | 8059 | """ |
54f9ee45 | 8060 | return _core_.Window_NextControlId(*args, **kwargs) |
e811c8ce RD |
8061 | |
8062 | def Window_PrevControlId(*args, **kwargs): | |
15afbcd0 RD |
8063 | """ |
8064 | Window_PrevControlId(int winid) -> int | |
8065 | ||
8066 | Get the id of the control preceding the one with the given | |
41e2b43e | 8067 | autogenerated) id |
15afbcd0 | 8068 | """ |
54f9ee45 | 8069 | return _core_.Window_PrevControlId(*args, **kwargs) |
e811c8ce RD |
8070 | |
8071 | def Window_FindFocus(*args, **kwargs): | |
15afbcd0 RD |
8072 | """ |
8073 | Window_FindFocus() -> Window | |
8074 | ||
8075 | Returns the window or control that currently has the keyboard focus, | |
8076 | or None. | |
8077 | """ | |
54f9ee45 | 8078 | return _core_.Window_FindFocus(*args, **kwargs) |
e811c8ce RD |
8079 | |
8080 | def Window_GetCapture(*args, **kwargs): | |
15afbcd0 RD |
8081 | """ |
8082 | Window_GetCapture() -> Window | |
8083 | ||
8084 | Returns the window which currently captures the mouse or None | |
8085 | """ | |
54f9ee45 | 8086 | return _core_.Window_GetCapture(*args, **kwargs) |
e811c8ce | 8087 | |
74a57fcd RD |
8088 | def Window_GetClassDefaultAttributes(*args, **kwargs): |
8089 | """ | |
8090 | Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
8091 | ||
41e2b43e RD |
8092 | Get the default attributes for this class. This is useful if you want |
8093 | to use the same font or colour in your own control as in a standard | |
8094 | control -- which is a much better idea than hard coding specific | |
db3e571a RD |
8095 | colours or fonts which might look completely out of place on the |
8096 | user's system, especially if it uses themes. | |
74a57fcd RD |
8097 | |
8098 | The variant parameter is only relevant under Mac currently and is | |
41e2b43e | 8099 | ignore under other platforms. Under Mac, it will change the size of |
db3e571a RD |
8100 | the returned font. See `wx.Window.SetWindowVariant` for more about |
8101 | this. | |
74a57fcd | 8102 | """ |
54f9ee45 | 8103 | return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 8104 | |
e811c8ce | 8105 | def DLG_PNT(win, point_or_x, y=None): |
15afbcd0 RD |
8106 | """ |
8107 | Convenience function for converting a Point or (x,y) in | |
8108 | dialog units to pixel units. | |
8109 | """ | |
e811c8ce RD |
8110 | if y is None: |
8111 | return win.ConvertDialogPointToPixels(point_or_x) | |
8112 | else: | |
fd3f2efe | 8113 | return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y)) |
e811c8ce RD |
8114 | |
8115 | def DLG_SZE(win, size_width, height=None): | |
15afbcd0 RD |
8116 | """ |
8117 | Convenience function for converting a Size or (w,h) in | |
8118 | dialog units to pixel units. | |
8119 | """ | |
e811c8ce RD |
8120 | if height is None: |
8121 | return win.ConvertDialogSizeToPixels(size_width) | |
8122 | else: | |
fd3f2efe | 8123 | return win.ConvertDialogSizeToPixels(wx.Size(size_width, height)) |
e811c8ce RD |
8124 | |
8125 | ||
8126 | def FindWindowById(*args, **kwargs): | |
15afbcd0 RD |
8127 | """ |
8128 | FindWindowById(long id, Window parent=None) -> Window | |
8129 | ||
8130 | Find the first window in the application with the given id. If parent | |
8131 | is None, the search will start from all top-level frames and dialog | |
8132 | boxes; if non-None, the search will be limited to the given window | |
8133 | hierarchy. The search is recursive in both cases. | |
8134 | """ | |
54f9ee45 | 8135 | return _core_.FindWindowById(*args, **kwargs) |
e811c8ce RD |
8136 | |
8137 | def FindWindowByName(*args, **kwargs): | |
15afbcd0 RD |
8138 | """ |
8139 | FindWindowByName(String name, Window parent=None) -> Window | |
8140 | ||
8141 | Find a window by its name (as given in a window constructor or Create | |
8142 | function call). If parent is None, the search will start from all | |
8143 | top-level frames and dialog boxes; if non-None, the search will be | |
8144 | limited to the given window hierarchy. The search is recursive in both | |
8145 | cases. | |
8146 | ||
8147 | If no window with such name is found, wx.FindWindowByLabel is called. | |
8148 | """ | |
54f9ee45 | 8149 | return _core_.FindWindowByName(*args, **kwargs) |
e811c8ce RD |
8150 | |
8151 | def FindWindowByLabel(*args, **kwargs): | |
15afbcd0 RD |
8152 | """ |
8153 | FindWindowByLabel(String label, Window parent=None) -> Window | |
8154 | ||
8155 | Find a window by its label. Depending on the type of window, the label | |
8156 | may be a window title or panel item label. If parent is None, the | |
8157 | search will start from all top-level frames and dialog boxes; if | |
8158 | non-None, the search will be limited to the given window | |
8159 | hierarchy. The search is recursive in both cases. | |
8160 | """ | |
54f9ee45 | 8161 | return _core_.FindWindowByLabel(*args, **kwargs) |
e811c8ce RD |
8162 | |
8163 | def Window_FromHWND(*args, **kwargs): | |
4276dc52 | 8164 | """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window""" |
54f9ee45 | 8165 | return _core_.Window_FromHWND(*args, **kwargs) |
e811c8ce RD |
8166 | #--------------------------------------------------------------------------- |
8167 | ||
8168 | class Validator(EvtHandler): | |
093d3ff1 | 8169 | """Proxy of C++ Validator class""" |
e811c8ce RD |
8170 | def __repr__(self): |
8171 | return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
8172 | def __init__(self, *args, **kwargs): | |
a95a7133 | 8173 | """__init__(self) -> Validator""" |
54f9ee45 | 8174 | newobj = _core_.new_Validator(*args, **kwargs) |
d14a1e28 RD |
8175 | self.this = newobj.this |
8176 | self.thisown = 1 | |
8177 | del newobj.thisown | |
8178 | self._setOORInfo(self) | |
e811c8ce RD |
8179 | |
8180 | def Clone(*args, **kwargs): | |
a95a7133 | 8181 | """Clone(self) -> Validator""" |
54f9ee45 | 8182 | return _core_.Validator_Clone(*args, **kwargs) |
e811c8ce RD |
8183 | |
8184 | def Validate(*args, **kwargs): | |
a95a7133 | 8185 | """Validate(self, Window parent) -> bool""" |
54f9ee45 | 8186 | return _core_.Validator_Validate(*args, **kwargs) |
e811c8ce RD |
8187 | |
8188 | def TransferToWindow(*args, **kwargs): | |
a95a7133 | 8189 | """TransferToWindow(self) -> bool""" |
54f9ee45 | 8190 | return _core_.Validator_TransferToWindow(*args, **kwargs) |
e811c8ce RD |
8191 | |
8192 | def TransferFromWindow(*args, **kwargs): | |
a95a7133 | 8193 | """TransferFromWindow(self) -> bool""" |
54f9ee45 | 8194 | return _core_.Validator_TransferFromWindow(*args, **kwargs) |
e811c8ce RD |
8195 | |
8196 | def GetWindow(*args, **kwargs): | |
a95a7133 | 8197 | """GetWindow(self) -> Window""" |
54f9ee45 | 8198 | return _core_.Validator_GetWindow(*args, **kwargs) |
e811c8ce RD |
8199 | |
8200 | def SetWindow(*args, **kwargs): | |
a95a7133 | 8201 | """SetWindow(self, Window window)""" |
54f9ee45 | 8202 | return _core_.Validator_SetWindow(*args, **kwargs) |
e811c8ce RD |
8203 | |
8204 | def IsSilent(*args, **kwargs): | |
66c033b4 | 8205 | """IsSilent() -> bool""" |
54f9ee45 | 8206 | return _core_.Validator_IsSilent(*args, **kwargs) |
e811c8ce RD |
8207 | |
8208 | IsSilent = staticmethod(IsSilent) | |
8209 | def SetBellOnError(*args, **kwargs): | |
66c033b4 | 8210 | """SetBellOnError(int doIt=True)""" |
54f9ee45 | 8211 | return _core_.Validator_SetBellOnError(*args, **kwargs) |
e811c8ce RD |
8212 | |
8213 | SetBellOnError = staticmethod(SetBellOnError) | |
8214 | ||
8215 | class ValidatorPtr(Validator): | |
8216 | def __init__(self, this): | |
8217 | self.this = this | |
8218 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8219 | self.__class__ = Validator | |
54f9ee45 | 8220 | _core_.Validator_swigregister(ValidatorPtr) |
e811c8ce RD |
8221 | |
8222 | def Validator_IsSilent(*args, **kwargs): | |
8223 | """Validator_IsSilent() -> bool""" | |
54f9ee45 | 8224 | return _core_.Validator_IsSilent(*args, **kwargs) |
e811c8ce RD |
8225 | |
8226 | def Validator_SetBellOnError(*args, **kwargs): | |
8227 | """Validator_SetBellOnError(int doIt=True)""" | |
54f9ee45 | 8228 | return _core_.Validator_SetBellOnError(*args, **kwargs) |
e811c8ce RD |
8229 | |
8230 | class PyValidator(Validator): | |
093d3ff1 | 8231 | """Proxy of C++ PyValidator class""" |
e811c8ce RD |
8232 | def __repr__(self): |
8233 | return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
8234 | def __init__(self, *args, **kwargs): | |
a95a7133 | 8235 | """__init__(self) -> PyValidator""" |
54f9ee45 | 8236 | newobj = _core_.new_PyValidator(*args, **kwargs) |
e811c8ce RD |
8237 | self.this = newobj.this |
8238 | self.thisown = 1 | |
8239 | del newobj.thisown | |
8240 | ||
8241 | self._setCallbackInfo(self, PyValidator, 1) | |
8242 | self._setOORInfo(self) | |
8243 | ||
8244 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 8245 | """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)""" |
54f9ee45 | 8246 | return _core_.PyValidator__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
8247 | |
8248 | ||
8249 | class PyValidatorPtr(PyValidator): | |
8250 | def __init__(self, this): | |
8251 | self.this = this | |
8252 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8253 | self.__class__ = PyValidator | |
54f9ee45 | 8254 | _core_.PyValidator_swigregister(PyValidatorPtr) |
e811c8ce RD |
8255 | |
8256 | #--------------------------------------------------------------------------- | |
8257 | ||
8258 | class Menu(EvtHandler): | |
093d3ff1 | 8259 | """Proxy of C++ Menu class""" |
d14a1e28 RD |
8260 | def __repr__(self): |
8261 | return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 8262 | def __init__(self, *args, **kwargs): |
a95a7133 | 8263 | """__init__(self, String title=EmptyString, long style=0) -> Menu""" |
54f9ee45 | 8264 | newobj = _core_.new_Menu(*args, **kwargs) |
e811c8ce RD |
8265 | self.this = newobj.this |
8266 | self.thisown = 1 | |
8267 | del newobj.thisown | |
8268 | self._setOORInfo(self) | |
8269 | ||
8270 | def Append(*args, **kwargs): | |
a95a7133 | 8271 | """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
54f9ee45 | 8272 | return _core_.Menu_Append(*args, **kwargs) |
e811c8ce RD |
8273 | |
8274 | def AppendSeparator(*args, **kwargs): | |
a95a7133 | 8275 | """AppendSeparator(self) -> MenuItem""" |
54f9ee45 | 8276 | return _core_.Menu_AppendSeparator(*args, **kwargs) |
e811c8ce RD |
8277 | |
8278 | def AppendCheckItem(*args, **kwargs): | |
a95a7133 | 8279 | """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8280 | return _core_.Menu_AppendCheckItem(*args, **kwargs) |
e811c8ce RD |
8281 | |
8282 | def AppendRadioItem(*args, **kwargs): | |
a95a7133 | 8283 | """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8284 | return _core_.Menu_AppendRadioItem(*args, **kwargs) |
e811c8ce RD |
8285 | |
8286 | def AppendMenu(*args, **kwargs): | |
a95a7133 | 8287 | """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8288 | return _core_.Menu_AppendMenu(*args, **kwargs) |
e811c8ce RD |
8289 | |
8290 | def AppendItem(*args, **kwargs): | |
a95a7133 | 8291 | """AppendItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 8292 | return _core_.Menu_AppendItem(*args, **kwargs) |
e811c8ce RD |
8293 | |
8294 | def Break(*args, **kwargs): | |
a95a7133 | 8295 | """Break(self)""" |
54f9ee45 | 8296 | return _core_.Menu_Break(*args, **kwargs) |
e811c8ce RD |
8297 | |
8298 | def InsertItem(*args, **kwargs): | |
a95a7133 | 8299 | """InsertItem(self, size_t pos, MenuItem item) -> MenuItem""" |
54f9ee45 | 8300 | return _core_.Menu_InsertItem(*args, **kwargs) |
e811c8ce RD |
8301 | |
8302 | def Insert(*args, **kwargs): | |
0df68c9f | 8303 | """ |
a95a7133 | 8304 | Insert(self, size_t pos, int id, String text, String help=EmptyString, |
a41e16b6 | 8305 | int kind=ITEM_NORMAL) -> MenuItem |
0df68c9f | 8306 | """ |
54f9ee45 | 8307 | return _core_.Menu_Insert(*args, **kwargs) |
e811c8ce RD |
8308 | |
8309 | def InsertSeparator(*args, **kwargs): | |
a95a7133 | 8310 | """InsertSeparator(self, size_t pos) -> MenuItem""" |
54f9ee45 | 8311 | return _core_.Menu_InsertSeparator(*args, **kwargs) |
e811c8ce RD |
8312 | |
8313 | def InsertCheckItem(*args, **kwargs): | |
a95a7133 | 8314 | """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8315 | return _core_.Menu_InsertCheckItem(*args, **kwargs) |
e811c8ce RD |
8316 | |
8317 | def InsertRadioItem(*args, **kwargs): | |
a95a7133 | 8318 | """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8319 | return _core_.Menu_InsertRadioItem(*args, **kwargs) |
e811c8ce RD |
8320 | |
8321 | def InsertMenu(*args, **kwargs): | |
a95a7133 | 8322 | """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8323 | return _core_.Menu_InsertMenu(*args, **kwargs) |
e811c8ce RD |
8324 | |
8325 | def PrependItem(*args, **kwargs): | |
a95a7133 | 8326 | """PrependItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 8327 | return _core_.Menu_PrependItem(*args, **kwargs) |
e811c8ce RD |
8328 | |
8329 | def Prepend(*args, **kwargs): | |
a95a7133 | 8330 | """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
54f9ee45 | 8331 | return _core_.Menu_Prepend(*args, **kwargs) |
e811c8ce RD |
8332 | |
8333 | def PrependSeparator(*args, **kwargs): | |
a95a7133 | 8334 | """PrependSeparator(self) -> MenuItem""" |
54f9ee45 | 8335 | return _core_.Menu_PrependSeparator(*args, **kwargs) |
e811c8ce RD |
8336 | |
8337 | def PrependCheckItem(*args, **kwargs): | |
a95a7133 | 8338 | """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8339 | return _core_.Menu_PrependCheckItem(*args, **kwargs) |
e811c8ce RD |
8340 | |
8341 | def PrependRadioItem(*args, **kwargs): | |
a95a7133 | 8342 | """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8343 | return _core_.Menu_PrependRadioItem(*args, **kwargs) |
e811c8ce RD |
8344 | |
8345 | def PrependMenu(*args, **kwargs): | |
a95a7133 | 8346 | """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8347 | return _core_.Menu_PrependMenu(*args, **kwargs) |
e811c8ce RD |
8348 | |
8349 | def Remove(*args, **kwargs): | |
a95a7133 | 8350 | """Remove(self, int id) -> MenuItem""" |
54f9ee45 | 8351 | return _core_.Menu_Remove(*args, **kwargs) |
e811c8ce RD |
8352 | |
8353 | def RemoveItem(*args, **kwargs): | |
a95a7133 | 8354 | """RemoveItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 8355 | return _core_.Menu_RemoveItem(*args, **kwargs) |
e811c8ce RD |
8356 | |
8357 | def Delete(*args, **kwargs): | |
a95a7133 | 8358 | """Delete(self, int id) -> bool""" |
54f9ee45 | 8359 | return _core_.Menu_Delete(*args, **kwargs) |
e811c8ce RD |
8360 | |
8361 | def DeleteItem(*args, **kwargs): | |
a95a7133 | 8362 | """DeleteItem(self, MenuItem item) -> bool""" |
54f9ee45 | 8363 | return _core_.Menu_DeleteItem(*args, **kwargs) |
e811c8ce RD |
8364 | |
8365 | def Destroy(*args, **kwargs): | |
0df68c9f | 8366 | """ |
a95a7133 | 8367 | Destroy(self) |
e811c8ce | 8368 | |
0df68c9f RD |
8369 | Deletes the C++ object this Python object is a proxy for. |
8370 | """ | |
54f9ee45 | 8371 | return _core_.Menu_Destroy(*args, **kwargs) |
e811c8ce RD |
8372 | |
8373 | def DestroyId(*args, **kwargs): | |
0df68c9f | 8374 | """ |
a95a7133 | 8375 | DestroyId(self, int id) -> bool |
e811c8ce | 8376 | |
0df68c9f RD |
8377 | Deletes the C++ object this Python object is a proxy for. |
8378 | """ | |
54f9ee45 | 8379 | return _core_.Menu_DestroyId(*args, **kwargs) |
e811c8ce RD |
8380 | |
8381 | def DestroyItem(*args, **kwargs): | |
0df68c9f | 8382 | """ |
a95a7133 | 8383 | DestroyItem(self, MenuItem item) -> bool |
e811c8ce | 8384 | |
0df68c9f RD |
8385 | Deletes the C++ object this Python object is a proxy for. |
8386 | """ | |
54f9ee45 | 8387 | return _core_.Menu_DestroyItem(*args, **kwargs) |
e811c8ce RD |
8388 | |
8389 | def GetMenuItemCount(*args, **kwargs): | |
a95a7133 | 8390 | """GetMenuItemCount(self) -> size_t""" |
54f9ee45 | 8391 | return _core_.Menu_GetMenuItemCount(*args, **kwargs) |
e811c8ce RD |
8392 | |
8393 | def GetMenuItems(*args, **kwargs): | |
a95a7133 | 8394 | """GetMenuItems(self) -> PyObject""" |
54f9ee45 | 8395 | return _core_.Menu_GetMenuItems(*args, **kwargs) |
e811c8ce RD |
8396 | |
8397 | def FindItem(*args, **kwargs): | |
a95a7133 | 8398 | """FindItem(self, String item) -> int""" |
54f9ee45 | 8399 | return _core_.Menu_FindItem(*args, **kwargs) |
e811c8ce RD |
8400 | |
8401 | def FindItemById(*args, **kwargs): | |
a95a7133 | 8402 | """FindItemById(self, int id) -> MenuItem""" |
54f9ee45 | 8403 | return _core_.Menu_FindItemById(*args, **kwargs) |
e811c8ce RD |
8404 | |
8405 | def FindItemByPosition(*args, **kwargs): | |
a95a7133 | 8406 | """FindItemByPosition(self, size_t position) -> MenuItem""" |
54f9ee45 | 8407 | return _core_.Menu_FindItemByPosition(*args, **kwargs) |
e811c8ce RD |
8408 | |
8409 | def Enable(*args, **kwargs): | |
a95a7133 | 8410 | """Enable(self, int id, bool enable)""" |
54f9ee45 | 8411 | return _core_.Menu_Enable(*args, **kwargs) |
e811c8ce RD |
8412 | |
8413 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 8414 | """IsEnabled(self, int id) -> bool""" |
54f9ee45 | 8415 | return _core_.Menu_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8416 | |
8417 | def Check(*args, **kwargs): | |
a95a7133 | 8418 | """Check(self, int id, bool check)""" |
54f9ee45 | 8419 | return _core_.Menu_Check(*args, **kwargs) |
e811c8ce RD |
8420 | |
8421 | def IsChecked(*args, **kwargs): | |
a95a7133 | 8422 | """IsChecked(self, int id) -> bool""" |
54f9ee45 | 8423 | return _core_.Menu_IsChecked(*args, **kwargs) |
e811c8ce RD |
8424 | |
8425 | def SetLabel(*args, **kwargs): | |
a95a7133 | 8426 | """SetLabel(self, int id, String label)""" |
54f9ee45 | 8427 | return _core_.Menu_SetLabel(*args, **kwargs) |
e811c8ce RD |
8428 | |
8429 | def GetLabel(*args, **kwargs): | |
a95a7133 | 8430 | """GetLabel(self, int id) -> String""" |
54f9ee45 | 8431 | return _core_.Menu_GetLabel(*args, **kwargs) |
e811c8ce RD |
8432 | |
8433 | def SetHelpString(*args, **kwargs): | |
a95a7133 | 8434 | """SetHelpString(self, int id, String helpString)""" |
54f9ee45 | 8435 | return _core_.Menu_SetHelpString(*args, **kwargs) |
e811c8ce RD |
8436 | |
8437 | def GetHelpString(*args, **kwargs): | |
a95a7133 | 8438 | """GetHelpString(self, int id) -> String""" |
54f9ee45 | 8439 | return _core_.Menu_GetHelpString(*args, **kwargs) |
e811c8ce RD |
8440 | |
8441 | def SetTitle(*args, **kwargs): | |
a95a7133 | 8442 | """SetTitle(self, String title)""" |
54f9ee45 | 8443 | return _core_.Menu_SetTitle(*args, **kwargs) |
e811c8ce RD |
8444 | |
8445 | def GetTitle(*args, **kwargs): | |
a95a7133 | 8446 | """GetTitle(self) -> String""" |
54f9ee45 | 8447 | return _core_.Menu_GetTitle(*args, **kwargs) |
e811c8ce RD |
8448 | |
8449 | def SetEventHandler(*args, **kwargs): | |
a95a7133 | 8450 | """SetEventHandler(self, EvtHandler handler)""" |
54f9ee45 | 8451 | return _core_.Menu_SetEventHandler(*args, **kwargs) |
e811c8ce RD |
8452 | |
8453 | def GetEventHandler(*args, **kwargs): | |
a95a7133 | 8454 | """GetEventHandler(self) -> EvtHandler""" |
54f9ee45 | 8455 | return _core_.Menu_GetEventHandler(*args, **kwargs) |
e811c8ce RD |
8456 | |
8457 | def SetInvokingWindow(*args, **kwargs): | |
a95a7133 | 8458 | """SetInvokingWindow(self, Window win)""" |
54f9ee45 | 8459 | return _core_.Menu_SetInvokingWindow(*args, **kwargs) |
e811c8ce RD |
8460 | |
8461 | def GetInvokingWindow(*args, **kwargs): | |
a95a7133 | 8462 | """GetInvokingWindow(self) -> Window""" |
54f9ee45 | 8463 | return _core_.Menu_GetInvokingWindow(*args, **kwargs) |
e811c8ce RD |
8464 | |
8465 | def GetStyle(*args, **kwargs): | |
a95a7133 | 8466 | """GetStyle(self) -> long""" |
54f9ee45 | 8467 | return _core_.Menu_GetStyle(*args, **kwargs) |
e811c8ce RD |
8468 | |
8469 | def UpdateUI(*args, **kwargs): | |
a95a7133 | 8470 | """UpdateUI(self, EvtHandler source=None)""" |
54f9ee45 | 8471 | return _core_.Menu_UpdateUI(*args, **kwargs) |
e811c8ce RD |
8472 | |
8473 | def GetMenuBar(*args, **kwargs): | |
a95a7133 | 8474 | """GetMenuBar(self) -> MenuBar""" |
54f9ee45 | 8475 | return _core_.Menu_GetMenuBar(*args, **kwargs) |
e811c8ce RD |
8476 | |
8477 | def Attach(*args, **kwargs): | |
a95a7133 | 8478 | """Attach(self, wxMenuBarBase menubar)""" |
54f9ee45 | 8479 | return _core_.Menu_Attach(*args, **kwargs) |
e811c8ce RD |
8480 | |
8481 | def Detach(*args, **kwargs): | |
a95a7133 | 8482 | """Detach(self)""" |
54f9ee45 | 8483 | return _core_.Menu_Detach(*args, **kwargs) |
e811c8ce RD |
8484 | |
8485 | def IsAttached(*args, **kwargs): | |
a95a7133 | 8486 | """IsAttached(self) -> bool""" |
54f9ee45 | 8487 | return _core_.Menu_IsAttached(*args, **kwargs) |
e811c8ce RD |
8488 | |
8489 | def SetParent(*args, **kwargs): | |
a95a7133 | 8490 | """SetParent(self, Menu parent)""" |
54f9ee45 | 8491 | return _core_.Menu_SetParent(*args, **kwargs) |
e811c8ce RD |
8492 | |
8493 | def GetParent(*args, **kwargs): | |
a95a7133 | 8494 | """GetParent(self) -> Menu""" |
54f9ee45 | 8495 | return _core_.Menu_GetParent(*args, **kwargs) |
e811c8ce | 8496 | |
d14a1e28 RD |
8497 | |
8498 | class MenuPtr(Menu): | |
8499 | def __init__(self, this): | |
8500 | self.this = this | |
8501 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8502 | self.__class__ = Menu | |
54f9ee45 | 8503 | _core_.Menu_swigregister(MenuPtr) |
d14a1e28 RD |
8504 | DefaultValidator = cvar.DefaultValidator |
8505 | ||
8506 | #--------------------------------------------------------------------------- | |
8507 | ||
8508 | class MenuBar(Window): | |
093d3ff1 | 8509 | """Proxy of C++ MenuBar class""" |
e811c8ce RD |
8510 | def __repr__(self): |
8511 | return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8512 | def __init__(self, *args, **kwargs): |
a95a7133 | 8513 | """__init__(self, long style=0) -> MenuBar""" |
54f9ee45 | 8514 | newobj = _core_.new_MenuBar(*args, **kwargs) |
d14a1e28 RD |
8515 | self.this = newobj.this |
8516 | self.thisown = 1 | |
8517 | del newobj.thisown | |
8518 | self._setOORInfo(self) | |
e811c8ce RD |
8519 | |
8520 | def Append(*args, **kwargs): | |
a95a7133 | 8521 | """Append(self, Menu menu, String title) -> bool""" |
54f9ee45 | 8522 | return _core_.MenuBar_Append(*args, **kwargs) |
e811c8ce RD |
8523 | |
8524 | def Insert(*args, **kwargs): | |
a95a7133 | 8525 | """Insert(self, size_t pos, Menu menu, String title) -> bool""" |
54f9ee45 | 8526 | return _core_.MenuBar_Insert(*args, **kwargs) |
e811c8ce RD |
8527 | |
8528 | def GetMenuCount(*args, **kwargs): | |
a95a7133 | 8529 | """GetMenuCount(self) -> size_t""" |
54f9ee45 | 8530 | return _core_.MenuBar_GetMenuCount(*args, **kwargs) |
e811c8ce RD |
8531 | |
8532 | def GetMenu(*args, **kwargs): | |
a95a7133 | 8533 | """GetMenu(self, size_t pos) -> Menu""" |
54f9ee45 | 8534 | return _core_.MenuBar_GetMenu(*args, **kwargs) |
e811c8ce RD |
8535 | |
8536 | def Replace(*args, **kwargs): | |
a95a7133 | 8537 | """Replace(self, size_t pos, Menu menu, String title) -> Menu""" |
54f9ee45 | 8538 | return _core_.MenuBar_Replace(*args, **kwargs) |
e811c8ce RD |
8539 | |
8540 | def Remove(*args, **kwargs): | |
a95a7133 | 8541 | """Remove(self, size_t pos) -> Menu""" |
54f9ee45 | 8542 | return _core_.MenuBar_Remove(*args, **kwargs) |
e811c8ce RD |
8543 | |
8544 | def EnableTop(*args, **kwargs): | |
a95a7133 | 8545 | """EnableTop(self, size_t pos, bool enable)""" |
54f9ee45 | 8546 | return _core_.MenuBar_EnableTop(*args, **kwargs) |
e811c8ce RD |
8547 | |
8548 | def IsEnabledTop(*args, **kwargs): | |
a95a7133 | 8549 | """IsEnabledTop(self, size_t pos) -> bool""" |
54f9ee45 | 8550 | return _core_.MenuBar_IsEnabledTop(*args, **kwargs) |
e811c8ce RD |
8551 | |
8552 | def SetLabelTop(*args, **kwargs): | |
a95a7133 | 8553 | """SetLabelTop(self, size_t pos, String label)""" |
54f9ee45 | 8554 | return _core_.MenuBar_SetLabelTop(*args, **kwargs) |
e811c8ce RD |
8555 | |
8556 | def GetLabelTop(*args, **kwargs): | |
a95a7133 | 8557 | """GetLabelTop(self, size_t pos) -> String""" |
54f9ee45 | 8558 | return _core_.MenuBar_GetLabelTop(*args, **kwargs) |
e811c8ce RD |
8559 | |
8560 | def FindMenuItem(*args, **kwargs): | |
a95a7133 | 8561 | """FindMenuItem(self, String menu, String item) -> int""" |
54f9ee45 | 8562 | return _core_.MenuBar_FindMenuItem(*args, **kwargs) |
e811c8ce RD |
8563 | |
8564 | def FindItemById(*args, **kwargs): | |
a95a7133 | 8565 | """FindItemById(self, int id) -> MenuItem""" |
54f9ee45 | 8566 | return _core_.MenuBar_FindItemById(*args, **kwargs) |
e811c8ce RD |
8567 | |
8568 | def FindMenu(*args, **kwargs): | |
a95a7133 | 8569 | """FindMenu(self, String title) -> int""" |
54f9ee45 | 8570 | return _core_.MenuBar_FindMenu(*args, **kwargs) |
e811c8ce RD |
8571 | |
8572 | def Enable(*args, **kwargs): | |
a95a7133 | 8573 | """Enable(self, int id, bool enable)""" |
54f9ee45 | 8574 | return _core_.MenuBar_Enable(*args, **kwargs) |
e811c8ce RD |
8575 | |
8576 | def Check(*args, **kwargs): | |
a95a7133 | 8577 | """Check(self, int id, bool check)""" |
54f9ee45 | 8578 | return _core_.MenuBar_Check(*args, **kwargs) |
e811c8ce RD |
8579 | |
8580 | def IsChecked(*args, **kwargs): | |
a95a7133 | 8581 | """IsChecked(self, int id) -> bool""" |
54f9ee45 | 8582 | return _core_.MenuBar_IsChecked(*args, **kwargs) |
e811c8ce RD |
8583 | |
8584 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 8585 | """IsEnabled(self, int id) -> bool""" |
54f9ee45 | 8586 | return _core_.MenuBar_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8587 | |
8588 | def SetLabel(*args, **kwargs): | |
a95a7133 | 8589 | """SetLabel(self, int id, String label)""" |
54f9ee45 | 8590 | return _core_.MenuBar_SetLabel(*args, **kwargs) |
e811c8ce RD |
8591 | |
8592 | def GetLabel(*args, **kwargs): | |
a95a7133 | 8593 | """GetLabel(self, int id) -> String""" |
54f9ee45 | 8594 | return _core_.MenuBar_GetLabel(*args, **kwargs) |
e811c8ce RD |
8595 | |
8596 | def SetHelpString(*args, **kwargs): | |
a95a7133 | 8597 | """SetHelpString(self, int id, String helpString)""" |
54f9ee45 | 8598 | return _core_.MenuBar_SetHelpString(*args, **kwargs) |
e811c8ce RD |
8599 | |
8600 | def GetHelpString(*args, **kwargs): | |
a95a7133 | 8601 | """GetHelpString(self, int id) -> String""" |
54f9ee45 | 8602 | return _core_.MenuBar_GetHelpString(*args, **kwargs) |
e811c8ce RD |
8603 | |
8604 | def GetFrame(*args, **kwargs): | |
a95a7133 | 8605 | """GetFrame(self) -> wxFrame""" |
54f9ee45 | 8606 | return _core_.MenuBar_GetFrame(*args, **kwargs) |
e811c8ce RD |
8607 | |
8608 | def IsAttached(*args, **kwargs): | |
a95a7133 | 8609 | """IsAttached(self) -> bool""" |
54f9ee45 | 8610 | return _core_.MenuBar_IsAttached(*args, **kwargs) |
e811c8ce RD |
8611 | |
8612 | def Attach(*args, **kwargs): | |
a95a7133 | 8613 | """Attach(self, wxFrame frame)""" |
54f9ee45 | 8614 | return _core_.MenuBar_Attach(*args, **kwargs) |
e811c8ce RD |
8615 | |
8616 | def Detach(*args, **kwargs): | |
a95a7133 | 8617 | """Detach(self)""" |
54f9ee45 | 8618 | return _core_.MenuBar_Detach(*args, **kwargs) |
e811c8ce | 8619 | |
d14a1e28 RD |
8620 | |
8621 | class MenuBarPtr(MenuBar): | |
8622 | def __init__(self, this): | |
8623 | self.this = this | |
8624 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8625 | self.__class__ = MenuBar | |
54f9ee45 | 8626 | _core_.MenuBar_swigregister(MenuBarPtr) |
d14a1e28 RD |
8627 | |
8628 | #--------------------------------------------------------------------------- | |
8629 | ||
8630 | class MenuItem(Object): | |
093d3ff1 | 8631 | """Proxy of C++ MenuItem class""" |
e811c8ce RD |
8632 | def __repr__(self): |
8633 | return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8634 | def __init__(self, *args, **kwargs): |
0df68c9f | 8635 | """ |
a95a7133 | 8636 | __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString, |
196addbf RD |
8637 | String help=EmptyString, int kind=ITEM_NORMAL, |
8638 | Menu subMenu=None) -> MenuItem | |
0df68c9f | 8639 | """ |
54f9ee45 | 8640 | newobj = _core_.new_MenuItem(*args, **kwargs) |
d14a1e28 RD |
8641 | self.this = newobj.this |
8642 | self.thisown = 1 | |
8643 | del newobj.thisown | |
e811c8ce | 8644 | def GetMenu(*args, **kwargs): |
a95a7133 | 8645 | """GetMenu(self) -> Menu""" |
54f9ee45 | 8646 | return _core_.MenuItem_GetMenu(*args, **kwargs) |
e811c8ce RD |
8647 | |
8648 | def SetMenu(*args, **kwargs): | |
a95a7133 | 8649 | """SetMenu(self, Menu menu)""" |
54f9ee45 | 8650 | return _core_.MenuItem_SetMenu(*args, **kwargs) |
e811c8ce RD |
8651 | |
8652 | def SetId(*args, **kwargs): | |
a95a7133 | 8653 | """SetId(self, int id)""" |
54f9ee45 | 8654 | return _core_.MenuItem_SetId(*args, **kwargs) |
e811c8ce RD |
8655 | |
8656 | def GetId(*args, **kwargs): | |
a95a7133 | 8657 | """GetId(self) -> int""" |
54f9ee45 | 8658 | return _core_.MenuItem_GetId(*args, **kwargs) |
e811c8ce RD |
8659 | |
8660 | def IsSeparator(*args, **kwargs): | |
a95a7133 | 8661 | """IsSeparator(self) -> bool""" |
54f9ee45 | 8662 | return _core_.MenuItem_IsSeparator(*args, **kwargs) |
e811c8ce RD |
8663 | |
8664 | def SetText(*args, **kwargs): | |
a95a7133 | 8665 | """SetText(self, String str)""" |
54f9ee45 | 8666 | return _core_.MenuItem_SetText(*args, **kwargs) |
e811c8ce RD |
8667 | |
8668 | def GetLabel(*args, **kwargs): | |
a95a7133 | 8669 | """GetLabel(self) -> String""" |
54f9ee45 | 8670 | return _core_.MenuItem_GetLabel(*args, **kwargs) |
e811c8ce RD |
8671 | |
8672 | def GetText(*args, **kwargs): | |
a95a7133 | 8673 | """GetText(self) -> String""" |
54f9ee45 | 8674 | return _core_.MenuItem_GetText(*args, **kwargs) |
e811c8ce RD |
8675 | |
8676 | def GetLabelFromText(*args, **kwargs): | |
66c033b4 | 8677 | """GetLabelFromText(String text) -> String""" |
54f9ee45 | 8678 | return _core_.MenuItem_GetLabelFromText(*args, **kwargs) |
e811c8ce RD |
8679 | |
8680 | GetLabelFromText = staticmethod(GetLabelFromText) | |
8681 | def GetKind(*args, **kwargs): | |
a95a7133 | 8682 | """GetKind(self) -> int""" |
54f9ee45 | 8683 | return _core_.MenuItem_GetKind(*args, **kwargs) |
e811c8ce | 8684 | |
a95a7133 RD |
8685 | def SetKind(*args, **kwargs): |
8686 | """SetKind(self, int kind)""" | |
54f9ee45 | 8687 | return _core_.MenuItem_SetKind(*args, **kwargs) |
a95a7133 | 8688 | |
e811c8ce | 8689 | def SetCheckable(*args, **kwargs): |
a95a7133 | 8690 | """SetCheckable(self, bool checkable)""" |
54f9ee45 | 8691 | return _core_.MenuItem_SetCheckable(*args, **kwargs) |
e811c8ce RD |
8692 | |
8693 | def IsCheckable(*args, **kwargs): | |
a95a7133 | 8694 | """IsCheckable(self) -> bool""" |
54f9ee45 | 8695 | return _core_.MenuItem_IsCheckable(*args, **kwargs) |
e811c8ce RD |
8696 | |
8697 | def IsSubMenu(*args, **kwargs): | |
a95a7133 | 8698 | """IsSubMenu(self) -> bool""" |
54f9ee45 | 8699 | return _core_.MenuItem_IsSubMenu(*args, **kwargs) |
e811c8ce RD |
8700 | |
8701 | def SetSubMenu(*args, **kwargs): | |
a95a7133 | 8702 | """SetSubMenu(self, Menu menu)""" |
54f9ee45 | 8703 | return _core_.MenuItem_SetSubMenu(*args, **kwargs) |
e811c8ce RD |
8704 | |
8705 | def GetSubMenu(*args, **kwargs): | |
a95a7133 | 8706 | """GetSubMenu(self) -> Menu""" |
54f9ee45 | 8707 | return _core_.MenuItem_GetSubMenu(*args, **kwargs) |
e811c8ce RD |
8708 | |
8709 | def Enable(*args, **kwargs): | |
a95a7133 | 8710 | """Enable(self, bool enable=True)""" |
54f9ee45 | 8711 | return _core_.MenuItem_Enable(*args, **kwargs) |
e811c8ce RD |
8712 | |
8713 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 8714 | """IsEnabled(self) -> bool""" |
54f9ee45 | 8715 | return _core_.MenuItem_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8716 | |
8717 | def Check(*args, **kwargs): | |
a95a7133 | 8718 | """Check(self, bool check=True)""" |
54f9ee45 | 8719 | return _core_.MenuItem_Check(*args, **kwargs) |
e811c8ce RD |
8720 | |
8721 | def IsChecked(*args, **kwargs): | |
a95a7133 | 8722 | """IsChecked(self) -> bool""" |
54f9ee45 | 8723 | return _core_.MenuItem_IsChecked(*args, **kwargs) |
e811c8ce RD |
8724 | |
8725 | def Toggle(*args, **kwargs): | |
a95a7133 | 8726 | """Toggle(self)""" |
54f9ee45 | 8727 | return _core_.MenuItem_Toggle(*args, **kwargs) |
e811c8ce RD |
8728 | |
8729 | def SetHelp(*args, **kwargs): | |
a95a7133 | 8730 | """SetHelp(self, String str)""" |
54f9ee45 | 8731 | return _core_.MenuItem_SetHelp(*args, **kwargs) |
e811c8ce RD |
8732 | |
8733 | def GetHelp(*args, **kwargs): | |
a95a7133 | 8734 | """GetHelp(self) -> String""" |
54f9ee45 | 8735 | return _core_.MenuItem_GetHelp(*args, **kwargs) |
e811c8ce RD |
8736 | |
8737 | def GetAccel(*args, **kwargs): | |
a95a7133 | 8738 | """GetAccel(self) -> AcceleratorEntry""" |
54f9ee45 | 8739 | return _core_.MenuItem_GetAccel(*args, **kwargs) |
e811c8ce RD |
8740 | |
8741 | def SetAccel(*args, **kwargs): | |
a95a7133 | 8742 | """SetAccel(self, AcceleratorEntry accel)""" |
54f9ee45 | 8743 | return _core_.MenuItem_SetAccel(*args, **kwargs) |
e811c8ce | 8744 | |
c1280d1e RD |
8745 | def SetFont(*args, **kwargs): |
8746 | """SetFont(self, Font font)""" | |
8747 | return _core_.MenuItem_SetFont(*args, **kwargs) | |
8748 | ||
8749 | def GetFont(*args, **kwargs): | |
8750 | """GetFont(self) -> Font""" | |
8751 | return _core_.MenuItem_GetFont(*args, **kwargs) | |
8752 | ||
8753 | def SetTextColour(*args, **kwargs): | |
8754 | """SetTextColour(self, Colour colText)""" | |
8755 | return _core_.MenuItem_SetTextColour(*args, **kwargs) | |
8756 | ||
8757 | def GetTextColour(*args, **kwargs): | |
8758 | """GetTextColour(self) -> Colour""" | |
8759 | return _core_.MenuItem_GetTextColour(*args, **kwargs) | |
8760 | ||
8761 | def SetBackgroundColour(*args, **kwargs): | |
8762 | """SetBackgroundColour(self, Colour colBack)""" | |
8763 | return _core_.MenuItem_SetBackgroundColour(*args, **kwargs) | |
8764 | ||
8765 | def GetBackgroundColour(*args, **kwargs): | |
8766 | """GetBackgroundColour(self) -> Colour""" | |
8767 | return _core_.MenuItem_GetBackgroundColour(*args, **kwargs) | |
8768 | ||
8769 | def SetBitmaps(*args, **kwargs): | |
8770 | """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)""" | |
8771 | return _core_.MenuItem_SetBitmaps(*args, **kwargs) | |
8772 | ||
8773 | def SetDisabledBitmap(*args, **kwargs): | |
8774 | """SetDisabledBitmap(self, Bitmap bmpDisabled)""" | |
8775 | return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs) | |
8776 | ||
8777 | def GetDisabledBitmap(*args, **kwargs): | |
8778 | """GetDisabledBitmap(self) -> Bitmap""" | |
8779 | return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs) | |
8780 | ||
8781 | def SetMarginWidth(*args, **kwargs): | |
8782 | """SetMarginWidth(self, int nWidth)""" | |
8783 | return _core_.MenuItem_SetMarginWidth(*args, **kwargs) | |
8784 | ||
8785 | def GetMarginWidth(*args, **kwargs): | |
8786 | """GetMarginWidth(self) -> int""" | |
8787 | return _core_.MenuItem_GetMarginWidth(*args, **kwargs) | |
8788 | ||
e811c8ce | 8789 | def GetDefaultMarginWidth(*args, **kwargs): |
66c033b4 | 8790 | """GetDefaultMarginWidth() -> int""" |
54f9ee45 | 8791 | return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs) |
e811c8ce RD |
8792 | |
8793 | GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) | |
c1280d1e RD |
8794 | def IsOwnerDrawn(*args, **kwargs): |
8795 | """IsOwnerDrawn(self) -> bool""" | |
8796 | return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs) | |
8797 | ||
8798 | def SetOwnerDrawn(*args, **kwargs): | |
8799 | """SetOwnerDrawn(self, bool ownerDrawn=True)""" | |
8800 | return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs) | |
8801 | ||
8802 | def ResetOwnerDrawn(*args, **kwargs): | |
8803 | """ResetOwnerDrawn(self)""" | |
8804 | return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs) | |
8805 | ||
e811c8ce | 8806 | def SetBitmap(*args, **kwargs): |
a95a7133 | 8807 | """SetBitmap(self, Bitmap bitmap)""" |
54f9ee45 | 8808 | return _core_.MenuItem_SetBitmap(*args, **kwargs) |
e811c8ce RD |
8809 | |
8810 | def GetBitmap(*args, **kwargs): | |
a95a7133 | 8811 | """GetBitmap(self) -> Bitmap""" |
54f9ee45 | 8812 | return _core_.MenuItem_GetBitmap(*args, **kwargs) |
e811c8ce | 8813 | |
d14a1e28 RD |
8814 | |
8815 | class MenuItemPtr(MenuItem): | |
8816 | def __init__(self, this): | |
8817 | self.this = this | |
8818 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8819 | self.__class__ = MenuItem | |
54f9ee45 | 8820 | _core_.MenuItem_swigregister(MenuItemPtr) |
d14a1e28 | 8821 | |
e811c8ce | 8822 | def MenuItem_GetLabelFromText(*args, **kwargs): |
196addbf | 8823 | """MenuItem_GetLabelFromText(String text) -> String""" |
54f9ee45 | 8824 | return _core_.MenuItem_GetLabelFromText(*args, **kwargs) |
d14a1e28 | 8825 | |
e811c8ce RD |
8826 | def MenuItem_GetDefaultMarginWidth(*args, **kwargs): |
8827 | """MenuItem_GetDefaultMarginWidth() -> int""" | |
54f9ee45 | 8828 | return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs) |
d14a1e28 RD |
8829 | |
8830 | #--------------------------------------------------------------------------- | |
8831 | ||
8832 | class Control(Window): | |
15afbcd0 RD |
8833 | """ |
8834 | This is the base class for a control or 'widget'. | |
8835 | ||
41e2b43e RD |
8836 | A control is generally a small window which processes user input |
8837 | and/or displays one or more item of data. | |
15afbcd0 | 8838 | """ |
e811c8ce RD |
8839 | def __repr__(self): |
8840 | return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8841 | def __init__(self, *args, **kwargs): |
0df68c9f | 8842 | """ |
248ed943 RD |
8843 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
8844 | Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 8845 | String name=ControlNameStr) -> Control |
15afbcd0 | 8846 | |
41e2b43e RD |
8847 | Create a Control. Normally you should only call this from a subclass' |
8848 | __init__ as a plain old wx.Control is not very useful. | |
0df68c9f | 8849 | """ |
54f9ee45 | 8850 | newobj = _core_.new_Control(*args, **kwargs) |
d14a1e28 RD |
8851 | self.this = newobj.this |
8852 | self.thisown = 1 | |
8853 | del newobj.thisown | |
8854 | self._setOORInfo(self) | |
e811c8ce RD |
8855 | |
8856 | def Create(*args, **kwargs): | |
0df68c9f | 8857 | """ |
248ed943 RD |
8858 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
8859 | Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 8860 | String name=ControlNameStr) -> bool |
15afbcd0 RD |
8861 | |
8862 | Do the 2nd phase and create the GUI control. | |
0df68c9f | 8863 | """ |
54f9ee45 | 8864 | return _core_.Control_Create(*args, **kwargs) |
e811c8ce RD |
8865 | |
8866 | def Command(*args, **kwargs): | |
15afbcd0 | 8867 | """ |
a95a7133 | 8868 | Command(self, CommandEvent event) |
15afbcd0 | 8869 | |
41e2b43e RD |
8870 | Simulates the effect of the user issuing a command to the item. |
8871 | ||
8872 | :see: `wx.CommandEvent` | |
8873 | ||
15afbcd0 | 8874 | """ |
54f9ee45 | 8875 | return _core_.Control_Command(*args, **kwargs) |
e811c8ce RD |
8876 | |
8877 | def GetLabel(*args, **kwargs): | |
15afbcd0 | 8878 | """ |
a95a7133 | 8879 | GetLabel(self) -> String |
15afbcd0 RD |
8880 | |
8881 | Return a control's text. | |
8882 | """ | |
54f9ee45 | 8883 | return _core_.Control_GetLabel(*args, **kwargs) |
e811c8ce RD |
8884 | |
8885 | def SetLabel(*args, **kwargs): | |
15afbcd0 | 8886 | """ |
a95a7133 | 8887 | SetLabel(self, String label) |
15afbcd0 RD |
8888 | |
8889 | Sets the item's text. | |
8890 | """ | |
54f9ee45 | 8891 | return _core_.Control_SetLabel(*args, **kwargs) |
e811c8ce | 8892 | |
74a57fcd | 8893 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
8894 | """ |
8895 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
8896 | ||
8897 | Get the default attributes for this class. This is useful if you want | |
8898 | to use the same font or colour in your own control as in a standard | |
8899 | control -- which is a much better idea than hard coding specific | |
8900 | colours or fonts which might look completely out of place on the | |
8901 | user's system, especially if it uses themes. | |
8902 | ||
8903 | The variant parameter is only relevant under Mac currently and is | |
8904 | ignore under other platforms. Under Mac, it will change the size of | |
8905 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
8906 | this. | |
8907 | """ | |
54f9ee45 | 8908 | return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
8909 | |
8910 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
d14a1e28 RD |
8911 | |
8912 | class ControlPtr(Control): | |
8913 | def __init__(self, this): | |
8914 | self.this = this | |
8915 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8916 | self.__class__ = Control | |
54f9ee45 | 8917 | _core_.Control_swigregister(ControlPtr) |
b2dc1044 | 8918 | ControlNameStr = cvar.ControlNameStr |
d14a1e28 RD |
8919 | |
8920 | def PreControl(*args, **kwargs): | |
15afbcd0 RD |
8921 | """ |
8922 | PreControl() -> Control | |
8923 | ||
8924 | Precreate a Control control for 2-phase creation | |
8925 | """ | |
54f9ee45 | 8926 | val = _core_.new_PreControl(*args, **kwargs) |
d14a1e28 RD |
8927 | val.thisown = 1 |
8928 | return val | |
8929 | ||
74a57fcd | 8930 | def Control_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
8931 | """ |
8932 | Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
8933 | ||
8934 | Get the default attributes for this class. This is useful if you want | |
8935 | to use the same font or colour in your own control as in a standard | |
8936 | control -- which is a much better idea than hard coding specific | |
8937 | colours or fonts which might look completely out of place on the | |
8938 | user's system, especially if it uses themes. | |
8939 | ||
8940 | The variant parameter is only relevant under Mac currently and is | |
8941 | ignore under other platforms. Under Mac, it will change the size of | |
8942 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
8943 | this. | |
8944 | """ | |
54f9ee45 | 8945 | return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 8946 | |
d14a1e28 RD |
8947 | #--------------------------------------------------------------------------- |
8948 | ||
8949 | class ItemContainer(object): | |
15afbcd0 | 8950 | """ |
53aa7709 RD |
8951 | The wx.ItemContainer class defines an interface which is implemented |
8952 | by all controls which have string subitems, each of which may be | |
8953 | selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well | |
8954 | as `wx.ComboBox` which implements an extended interface deriving from | |
41e2b43e | 8955 | this one. |
15afbcd0 | 8956 | |
41e2b43e RD |
8957 | It defines the methods for accessing the control's items and although |
8958 | each of the derived classes implements them differently, they still | |
8959 | all conform to the same interface. | |
15afbcd0 | 8960 | |
41e2b43e RD |
8961 | The items in a wx.ItemContainer have (non empty) string labels and, |
8962 | optionally, client data associated with them. | |
15afbcd0 RD |
8963 | |
8964 | """ | |
d14a1e28 RD |
8965 | def __init__(self): raise RuntimeError, "No constructor defined" |
8966 | def __repr__(self): | |
8967 | return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 8968 | def Append(*args, **kwargs): |
15afbcd0 | 8969 | """ |
a95a7133 | 8970 | Append(self, String item, PyObject clientData=None) -> int |
15afbcd0 | 8971 | |
41e2b43e RD |
8972 | Adds the item to the control, associating the given data with the item |
8973 | if not None. The return value is the index of the newly added item | |
8974 | which may be different from the last one if the control is sorted (e.g. | |
8975 | has wx.LB_SORT or wx.CB_SORT style). | |
15afbcd0 | 8976 | """ |
54f9ee45 | 8977 | return _core_.ItemContainer_Append(*args, **kwargs) |
e811c8ce RD |
8978 | |
8979 | def AppendItems(*args, **kwargs): | |
15afbcd0 | 8980 | """ |
f5b96ee1 | 8981 | AppendItems(self, List strings) |
15afbcd0 | 8982 | |
41e2b43e RD |
8983 | Apend several items at once to the control. Notice that calling this |
8984 | method may be much faster than appending the items one by one if you | |
8985 | need to add a lot of items. | |
15afbcd0 | 8986 | """ |
54f9ee45 | 8987 | return _core_.ItemContainer_AppendItems(*args, **kwargs) |
e811c8ce RD |
8988 | |
8989 | def Insert(*args, **kwargs): | |
15afbcd0 | 8990 | """ |
a95a7133 | 8991 | Insert(self, String item, int pos, PyObject clientData=None) -> int |
15afbcd0 | 8992 | |
41e2b43e | 8993 | Insert an item into the control before the item at the ``pos`` index, |
15afbcd0 RD |
8994 | optionally associating some data object with the item. |
8995 | """ | |
54f9ee45 | 8996 | return _core_.ItemContainer_Insert(*args, **kwargs) |
e811c8ce RD |
8997 | |
8998 | def Clear(*args, **kwargs): | |
15afbcd0 | 8999 | """ |
a95a7133 | 9000 | Clear(self) |
15afbcd0 RD |
9001 | |
9002 | Removes all items from the control. | |
9003 | """ | |
54f9ee45 | 9004 | return _core_.ItemContainer_Clear(*args, **kwargs) |
e811c8ce RD |
9005 | |
9006 | def Delete(*args, **kwargs): | |
15afbcd0 | 9007 | """ |
a95a7133 | 9008 | Delete(self, int n) |
15afbcd0 | 9009 | |
41e2b43e RD |
9010 | Deletes the item at the zero-based index 'n' from the control. Note |
9011 | that it is an error (signalled by a `wx.PyAssertionError` exception if | |
9012 | enabled) to remove an item with the index negative or greater or equal | |
9013 | than the number of items in the control. | |
15afbcd0 | 9014 | """ |
54f9ee45 | 9015 | return _core_.ItemContainer_Delete(*args, **kwargs) |
e811c8ce | 9016 | |
53aa7709 RD |
9017 | def GetClientData(*args, **kwargs): |
9018 | """ | |
9019 | GetClientData(self, int n) -> PyObject | |
9020 | ||
9021 | Returns the client data associated with the given item, (if any.) | |
9022 | """ | |
9023 | return _core_.ItemContainer_GetClientData(*args, **kwargs) | |
9024 | ||
9025 | def SetClientData(*args, **kwargs): | |
9026 | """ | |
9027 | SetClientData(self, int n, PyObject clientData) | |
9028 | ||
9029 | Associate the given client data with the item at position n. | |
9030 | """ | |
9031 | return _core_.ItemContainer_SetClientData(*args, **kwargs) | |
9032 | ||
e811c8ce | 9033 | def GetCount(*args, **kwargs): |
15afbcd0 | 9034 | """ |
a95a7133 | 9035 | GetCount(self) -> int |
15afbcd0 RD |
9036 | |
9037 | Returns the number of items in the control. | |
9038 | """ | |
54f9ee45 | 9039 | return _core_.ItemContainer_GetCount(*args, **kwargs) |
e811c8ce RD |
9040 | |
9041 | def IsEmpty(*args, **kwargs): | |
15afbcd0 | 9042 | """ |
a95a7133 | 9043 | IsEmpty(self) -> bool |
15afbcd0 RD |
9044 | |
9045 | Returns True if the control is empty or False if it has some items. | |
9046 | """ | |
54f9ee45 | 9047 | return _core_.ItemContainer_IsEmpty(*args, **kwargs) |
e811c8ce RD |
9048 | |
9049 | def GetString(*args, **kwargs): | |
15afbcd0 | 9050 | """ |
a95a7133 | 9051 | GetString(self, int n) -> String |
15afbcd0 RD |
9052 | |
9053 | Returns the label of the item with the given index. | |
9054 | """ | |
54f9ee45 | 9055 | return _core_.ItemContainer_GetString(*args, **kwargs) |
e811c8ce RD |
9056 | |
9057 | def GetStrings(*args, **kwargs): | |
a95a7133 | 9058 | """GetStrings(self) -> wxArrayString""" |
54f9ee45 | 9059 | return _core_.ItemContainer_GetStrings(*args, **kwargs) |
e811c8ce RD |
9060 | |
9061 | def SetString(*args, **kwargs): | |
15afbcd0 | 9062 | """ |
a95a7133 | 9063 | SetString(self, int n, String s) |
15afbcd0 RD |
9064 | |
9065 | Sets the label for the given item. | |
9066 | """ | |
54f9ee45 | 9067 | return _core_.ItemContainer_SetString(*args, **kwargs) |
e811c8ce RD |
9068 | |
9069 | def FindString(*args, **kwargs): | |
15afbcd0 | 9070 | """ |
a95a7133 | 9071 | FindString(self, String s) -> int |
15afbcd0 RD |
9072 | |
9073 | Finds an item whose label matches the given string. Returns the | |
41e2b43e RD |
9074 | zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not |
9075 | found. | |
15afbcd0 | 9076 | """ |
54f9ee45 | 9077 | return _core_.ItemContainer_FindString(*args, **kwargs) |
e811c8ce | 9078 | |
53aa7709 | 9079 | def SetSelection(*args, **kwargs): |
15afbcd0 | 9080 | """ |
53aa7709 | 9081 | SetSelection(self, int n) |
15afbcd0 RD |
9082 | |
9083 | Sets the item at index 'n' to be the selected item. | |
9084 | """ | |
53aa7709 | 9085 | return _core_.ItemContainer_SetSelection(*args, **kwargs) |
e811c8ce RD |
9086 | |
9087 | def GetSelection(*args, **kwargs): | |
15afbcd0 | 9088 | """ |
a95a7133 | 9089 | GetSelection(self) -> int |
15afbcd0 | 9090 | |
41e2b43e RD |
9091 | Returns the index of the selected item or ``wx.NOT_FOUND`` if no item |
9092 | is selected. | |
15afbcd0 | 9093 | """ |
54f9ee45 | 9094 | return _core_.ItemContainer_GetSelection(*args, **kwargs) |
e811c8ce | 9095 | |
53aa7709 RD |
9096 | def SetStringSelection(*args, **kwargs): |
9097 | """SetStringSelection(self, String s) -> bool""" | |
9098 | return _core_.ItemContainer_SetStringSelection(*args, **kwargs) | |
9099 | ||
e811c8ce | 9100 | def GetStringSelection(*args, **kwargs): |
15afbcd0 | 9101 | """ |
a95a7133 | 9102 | GetStringSelection(self) -> String |
15afbcd0 | 9103 | |
41e2b43e RD |
9104 | Returns the label of the selected item or an empty string if no item |
9105 | is selected. | |
15afbcd0 | 9106 | """ |
54f9ee45 | 9107 | return _core_.ItemContainer_GetStringSelection(*args, **kwargs) |
e811c8ce | 9108 | |
53aa7709 | 9109 | def Select(*args, **kwargs): |
15afbcd0 | 9110 | """ |
53aa7709 | 9111 | Select(self, int n) |
15afbcd0 | 9112 | |
53aa7709 RD |
9113 | This is the same as `SetSelection` and exists only because it is |
9114 | slightly more natural for controls which support multiple selection. | |
15afbcd0 | 9115 | """ |
53aa7709 | 9116 | return _core_.ItemContainer_Select(*args, **kwargs) |
e811c8ce | 9117 | |
d14a1e28 RD |
9118 | |
9119 | class ItemContainerPtr(ItemContainer): | |
9120 | def __init__(self, this): | |
9121 | self.this = this | |
9122 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9123 | self.__class__ = ItemContainer | |
54f9ee45 | 9124 | _core_.ItemContainer_swigregister(ItemContainerPtr) |
d14a1e28 RD |
9125 | |
9126 | #--------------------------------------------------------------------------- | |
9127 | ||
9128 | class ControlWithItems(Control,ItemContainer): | |
15afbcd0 | 9129 | """ |
41e2b43e RD |
9130 | wx.ControlWithItems combines the ``wx.ItemContainer`` class with the |
9131 | wx.Control class, and is used for the base class of various controls | |
9132 | that have items. | |
15afbcd0 | 9133 | """ |
d14a1e28 RD |
9134 | def __init__(self): raise RuntimeError, "No constructor defined" |
9135 | def __repr__(self): | |
9136 | return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
9137 | ||
9138 | class ControlWithItemsPtr(ControlWithItems): | |
9139 | def __init__(self, this): | |
9140 | self.this = this | |
9141 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9142 | self.__class__ = ControlWithItems | |
54f9ee45 | 9143 | _core_.ControlWithItems_swigregister(ControlWithItemsPtr) |
d14a1e28 RD |
9144 | |
9145 | #--------------------------------------------------------------------------- | |
9146 | ||
9147 | class SizerItem(Object): | |
248ed943 RD |
9148 | """ |
9149 | The wx.SizerItem class is used to track the position, size and other | |
9150 | attributes of each item managed by a `wx.Sizer`. In normal usage user | |
9151 | code should never need to deal directly with a wx.SizerItem, but | |
9152 | custom classes derived from `wx.PySizer` will probably need to use the | |
9153 | collection of wx.SizerItems held by wx.Sizer when calculating layout. | |
9154 | ||
9155 | :see: `wx.Sizer`, `wx.GBSizerItem` | |
9156 | """ | |
e811c8ce RD |
9157 | def __repr__(self): |
9158 | return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9159 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9160 | """ |
9161 | __init__(self) -> SizerItem | |
9162 | ||
9163 | Constructs an empty wx.SizerItem. Either a window, sizer or spacer | |
9164 | size will need to be set before this item can be used in a Sizer. | |
9165 | ||
9166 | You will probably never need to create a wx.SizerItem directly as they | |
9167 | are created automatically when the sizer's Add, Insert or Prepend | |
9168 | methods are called. | |
9169 | ||
9170 | :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer` | |
9171 | """ | |
54f9ee45 | 9172 | newobj = _core_.new_SizerItem(*args, **kwargs) |
d14a1e28 RD |
9173 | self.this = newobj.this |
9174 | self.thisown = 1 | |
9175 | del newobj.thisown | |
e811c8ce | 9176 | def DeleteWindows(*args, **kwargs): |
248ed943 RD |
9177 | """ |
9178 | DeleteWindows(self) | |
9179 | ||
9180 | Destroy the window or the windows in a subsizer, depending on the type | |
9181 | of item. | |
9182 | """ | |
54f9ee45 | 9183 | return _core_.SizerItem_DeleteWindows(*args, **kwargs) |
e811c8ce RD |
9184 | |
9185 | def DetachSizer(*args, **kwargs): | |
248ed943 RD |
9186 | """ |
9187 | DetachSizer(self) | |
9188 | ||
9189 | Enable deleting the SizerItem without destroying the contained sizer. | |
9190 | """ | |
54f9ee45 | 9191 | return _core_.SizerItem_DetachSizer(*args, **kwargs) |
e811c8ce RD |
9192 | |
9193 | def GetSize(*args, **kwargs): | |
248ed943 RD |
9194 | """ |
9195 | GetSize(self) -> Size | |
9196 | ||
9197 | Get the current size of the item, as set in the last Layout. | |
9198 | """ | |
54f9ee45 | 9199 | return _core_.SizerItem_GetSize(*args, **kwargs) |
e811c8ce RD |
9200 | |
9201 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
9202 | """ |
9203 | CalcMin(self) -> Size | |
9204 | ||
9205 | Calculates the minimum desired size for the item, including any space | |
9206 | needed by borders. | |
9207 | """ | |
54f9ee45 | 9208 | return _core_.SizerItem_CalcMin(*args, **kwargs) |
e811c8ce RD |
9209 | |
9210 | def SetDimension(*args, **kwargs): | |
248ed943 RD |
9211 | """ |
9212 | SetDimension(self, Point pos, Size size) | |
9213 | ||
9214 | Set the position and size of the space allocated for this item by the | |
9215 | sizer, and adjust the position and size of the item (window or | |
9216 | subsizer) to be within that space taking alignment and borders into | |
9217 | account. | |
9218 | """ | |
54f9ee45 | 9219 | return _core_.SizerItem_SetDimension(*args, **kwargs) |
e811c8ce RD |
9220 | |
9221 | def GetMinSize(*args, **kwargs): | |
248ed943 RD |
9222 | """ |
9223 | GetMinSize(self) -> Size | |
9224 | ||
9225 | Get the minimum size needed for the item. | |
9226 | """ | |
54f9ee45 | 9227 | return _core_.SizerItem_GetMinSize(*args, **kwargs) |
e811c8ce | 9228 | |
dfbb5885 RD |
9229 | def GetMinSizeWithBorder(*args, **kwargs): |
9230 | """ | |
9231 | GetMinSizeWithBorder(self) -> Size | |
9232 | ||
9233 | Get the minimum size needed for the item with space for the borders | |
9234 | added, if needed. | |
9235 | """ | |
9236 | return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs) | |
9237 | ||
e811c8ce | 9238 | def SetInitSize(*args, **kwargs): |
a95a7133 | 9239 | """SetInitSize(self, int x, int y)""" |
54f9ee45 | 9240 | return _core_.SizerItem_SetInitSize(*args, **kwargs) |
e811c8ce RD |
9241 | |
9242 | def SetRatioWH(*args, **kwargs): | |
248ed943 RD |
9243 | """ |
9244 | SetRatioWH(self, int width, int height) | |
9245 | ||
9246 | Set the ratio item attribute. | |
9247 | """ | |
54f9ee45 | 9248 | return _core_.SizerItem_SetRatioWH(*args, **kwargs) |
e811c8ce RD |
9249 | |
9250 | def SetRatioSize(*args, **kwargs): | |
248ed943 RD |
9251 | """ |
9252 | SetRatioSize(self, Size size) | |
9253 | ||
9254 | Set the ratio item attribute. | |
9255 | """ | |
54f9ee45 | 9256 | return _core_.SizerItem_SetRatioSize(*args, **kwargs) |
e811c8ce RD |
9257 | |
9258 | def SetRatio(*args, **kwargs): | |
248ed943 RD |
9259 | """ |
9260 | SetRatio(self, float ratio) | |
9261 | ||
9262 | Set the ratio item attribute. | |
9263 | """ | |
54f9ee45 | 9264 | return _core_.SizerItem_SetRatio(*args, **kwargs) |
e811c8ce RD |
9265 | |
9266 | def GetRatio(*args, **kwargs): | |
248ed943 RD |
9267 | """ |
9268 | GetRatio(self) -> float | |
9269 | ||
9270 | Set the ratio item attribute. | |
9271 | """ | |
54f9ee45 | 9272 | return _core_.SizerItem_GetRatio(*args, **kwargs) |
e811c8ce | 9273 | |
d3b6e4ff RD |
9274 | def GetRect(*args, **kwargs): |
9275 | """ | |
9276 | GetRect(self) -> Rect | |
9277 | ||
9278 | Returns the rectangle that the sizer item should occupy | |
9279 | """ | |
9280 | return _core_.SizerItem_GetRect(*args, **kwargs) | |
9281 | ||
e811c8ce | 9282 | def IsWindow(*args, **kwargs): |
248ed943 RD |
9283 | """ |
9284 | IsWindow(self) -> bool | |
9285 | ||
9286 | Is this sizer item a window? | |
9287 | """ | |
54f9ee45 | 9288 | return _core_.SizerItem_IsWindow(*args, **kwargs) |
e811c8ce RD |
9289 | |
9290 | def IsSizer(*args, **kwargs): | |
248ed943 RD |
9291 | """ |
9292 | IsSizer(self) -> bool | |
9293 | ||
9294 | Is this sizer item a subsizer? | |
9295 | """ | |
54f9ee45 | 9296 | return _core_.SizerItem_IsSizer(*args, **kwargs) |
e811c8ce RD |
9297 | |
9298 | def IsSpacer(*args, **kwargs): | |
248ed943 RD |
9299 | """ |
9300 | IsSpacer(self) -> bool | |
9301 | ||
9302 | Is this sizer item a spacer? | |
9303 | """ | |
54f9ee45 | 9304 | return _core_.SizerItem_IsSpacer(*args, **kwargs) |
e811c8ce RD |
9305 | |
9306 | def SetProportion(*args, **kwargs): | |
248ed943 RD |
9307 | """ |
9308 | SetProportion(self, int proportion) | |
9309 | ||
9310 | Set the proportion value for this item. | |
9311 | """ | |
54f9ee45 | 9312 | return _core_.SizerItem_SetProportion(*args, **kwargs) |
e811c8ce RD |
9313 | |
9314 | def GetProportion(*args, **kwargs): | |
248ed943 RD |
9315 | """ |
9316 | GetProportion(self) -> int | |
9317 | ||
9318 | Get the proportion value for this item. | |
9319 | """ | |
54f9ee45 | 9320 | return _core_.SizerItem_GetProportion(*args, **kwargs) |
e811c8ce | 9321 | |
248ed943 RD |
9322 | SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.") |
9323 | GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.") | |
e811c8ce | 9324 | def SetFlag(*args, **kwargs): |
248ed943 RD |
9325 | """ |
9326 | SetFlag(self, int flag) | |
9327 | ||
9328 | Set the flag value for this item. | |
9329 | """ | |
54f9ee45 | 9330 | return _core_.SizerItem_SetFlag(*args, **kwargs) |
e811c8ce RD |
9331 | |
9332 | def GetFlag(*args, **kwargs): | |
248ed943 RD |
9333 | """ |
9334 | GetFlag(self) -> int | |
9335 | ||
9336 | Get the flag value for this item. | |
9337 | """ | |
54f9ee45 | 9338 | return _core_.SizerItem_GetFlag(*args, **kwargs) |
e811c8ce RD |
9339 | |
9340 | def SetBorder(*args, **kwargs): | |
248ed943 RD |
9341 | """ |
9342 | SetBorder(self, int border) | |
9343 | ||
9344 | Set the border value for this item. | |
9345 | """ | |
54f9ee45 | 9346 | return _core_.SizerItem_SetBorder(*args, **kwargs) |
e811c8ce RD |
9347 | |
9348 | def GetBorder(*args, **kwargs): | |
248ed943 RD |
9349 | """ |
9350 | GetBorder(self) -> int | |
9351 | ||
9352 | Get the border value for this item. | |
9353 | """ | |
54f9ee45 | 9354 | return _core_.SizerItem_GetBorder(*args, **kwargs) |
e811c8ce RD |
9355 | |
9356 | def GetWindow(*args, **kwargs): | |
248ed943 RD |
9357 | """ |
9358 | GetWindow(self) -> Window | |
9359 | ||
9360 | Get the window (if any) that is managed by this sizer item. | |
9361 | """ | |
54f9ee45 | 9362 | return _core_.SizerItem_GetWindow(*args, **kwargs) |
e811c8ce RD |
9363 | |
9364 | def SetWindow(*args, **kwargs): | |
248ed943 RD |
9365 | """ |
9366 | SetWindow(self, Window window) | |
9367 | ||
9368 | Set the window to be managed by this sizer item. | |
9369 | """ | |
54f9ee45 | 9370 | return _core_.SizerItem_SetWindow(*args, **kwargs) |
e811c8ce RD |
9371 | |
9372 | def GetSizer(*args, **kwargs): | |
248ed943 RD |
9373 | """ |
9374 | GetSizer(self) -> Sizer | |
9375 | ||
9376 | Get the subsizer (if any) that is managed by this sizer item. | |
9377 | """ | |
54f9ee45 | 9378 | return _core_.SizerItem_GetSizer(*args, **kwargs) |
e811c8ce RD |
9379 | |
9380 | def SetSizer(*args, **kwargs): | |
248ed943 RD |
9381 | """ |
9382 | SetSizer(self, Sizer sizer) | |
9383 | ||
9384 | Set the subsizer to be managed by this sizer item. | |
9385 | """ | |
54f9ee45 | 9386 | return _core_.SizerItem_SetSizer(*args, **kwargs) |
e811c8ce RD |
9387 | |
9388 | def GetSpacer(*args, **kwargs): | |
248ed943 RD |
9389 | """ |
9390 | GetSpacer(self) -> Size | |
9391 | ||
9392 | Get the size of the spacer managed by this sizer item. | |
9393 | """ | |
54f9ee45 | 9394 | return _core_.SizerItem_GetSpacer(*args, **kwargs) |
e811c8ce RD |
9395 | |
9396 | def SetSpacer(*args, **kwargs): | |
248ed943 RD |
9397 | """ |
9398 | SetSpacer(self, Size size) | |
9399 | ||
9400 | Set the size of the spacer to be managed by this sizer item. | |
9401 | """ | |
54f9ee45 | 9402 | return _core_.SizerItem_SetSpacer(*args, **kwargs) |
e811c8ce RD |
9403 | |
9404 | def Show(*args, **kwargs): | |
248ed943 RD |
9405 | """ |
9406 | Show(self, bool show) | |
9407 | ||
9408 | Set the show item attribute, which sizers use to determine if the item | |
9409 | is to be made part of the layout or not. If the item is tracking a | |
9410 | window then it is shown or hidden as needed. | |
9411 | """ | |
54f9ee45 | 9412 | return _core_.SizerItem_Show(*args, **kwargs) |
e811c8ce RD |
9413 | |
9414 | def IsShown(*args, **kwargs): | |
248ed943 RD |
9415 | """ |
9416 | IsShown(self) -> bool | |
9417 | ||
9418 | Is the item to be shown in the layout? | |
9419 | """ | |
54f9ee45 | 9420 | return _core_.SizerItem_IsShown(*args, **kwargs) |
e811c8ce RD |
9421 | |
9422 | def GetPosition(*args, **kwargs): | |
248ed943 RD |
9423 | """ |
9424 | GetPosition(self) -> Point | |
9425 | ||
9426 | Returns the current position of the item, as set in the last Layout. | |
9427 | """ | |
54f9ee45 | 9428 | return _core_.SizerItem_GetPosition(*args, **kwargs) |
e811c8ce RD |
9429 | |
9430 | def GetUserData(*args, **kwargs): | |
248ed943 RD |
9431 | """ |
9432 | GetUserData(self) -> PyObject | |
9433 | ||
9434 | Returns the userData associated with this sizer item, or None if there | |
9435 | isn't any. | |
9436 | """ | |
54f9ee45 | 9437 | return _core_.SizerItem_GetUserData(*args, **kwargs) |
e811c8ce | 9438 | |
d14a1e28 RD |
9439 | |
9440 | class SizerItemPtr(SizerItem): | |
9441 | def __init__(self, this): | |
9442 | self.this = this | |
9443 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9444 | self.__class__ = SizerItem | |
54f9ee45 | 9445 | _core_.SizerItem_swigregister(SizerItemPtr) |
d14a1e28 | 9446 | |
248ed943 | 9447 | def SizerItemWindow(*args, **kwargs): |
0df68c9f | 9448 | """ |
248ed943 RD |
9449 | SizerItemWindow(Window window, int proportion, int flag, int border, |
9450 | PyObject userData=None) -> SizerItem | |
9451 | ||
9452 | Constructs a `wx.SizerItem` for tracking a window. | |
0df68c9f | 9453 | """ |
248ed943 | 9454 | val = _core_.new_SizerItemWindow(*args, **kwargs) |
d14a1e28 RD |
9455 | val.thisown = 1 |
9456 | return val | |
9457 | ||
248ed943 | 9458 | def SizerItemSpacer(*args, **kwargs): |
0df68c9f | 9459 | """ |
248ed943 RD |
9460 | SizerItemSpacer(int width, int height, int proportion, int flag, int border, |
9461 | PyObject userData=None) -> SizerItem | |
9462 | ||
9463 | Constructs a `wx.SizerItem` for tracking a spacer. | |
0df68c9f | 9464 | """ |
248ed943 | 9465 | val = _core_.new_SizerItemSpacer(*args, **kwargs) |
d14a1e28 RD |
9466 | val.thisown = 1 |
9467 | return val | |
9468 | ||
9469 | def SizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
9470 | """ |
9471 | SizerItemSizer(Sizer sizer, int proportion, int flag, int border, | |
248ed943 RD |
9472 | PyObject userData=None) -> SizerItem |
9473 | ||
9474 | Constructs a `wx.SizerItem` for tracking a subsizer | |
0df68c9f | 9475 | """ |
54f9ee45 | 9476 | val = _core_.new_SizerItemSizer(*args, **kwargs) |
d14a1e28 RD |
9477 | val.thisown = 1 |
9478 | return val | |
9479 | ||
9480 | class Sizer(Object): | |
248ed943 RD |
9481 | """ |
9482 | wx.Sizer is the abstract base class used for laying out subwindows in | |
9483 | a window. You cannot use wx.Sizer directly; instead, you will have to | |
9484 | use one of the sizer classes derived from it such as `wx.BoxSizer`, | |
9485 | `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer` | |
9486 | and `wx.GridBagSizer`. | |
9487 | ||
9488 | The concept implemented by sizers in wxWidgets is closely related to | |
9489 | layout tools in other GUI toolkits, such as Java's AWT, the GTK | |
9490 | toolkit or the Qt toolkit. It is based upon the idea of the individual | |
9491 | subwindows reporting their minimal required size and their ability to | |
9492 | get stretched if the size of the parent window has changed. This will | |
9493 | most often mean that the programmer does not set the original size of | |
9494 | a dialog in the beginning, rather the dialog will assigned a sizer and | |
9495 | this sizer will be queried about the recommended size. The sizer in | |
9496 | turn will query its children, which can be normal windows or contorls, | |
9497 | empty space or other sizers, so that a hierarchy of sizers can be | |
9498 | constructed. Note that wxSizer does not derive from wxWindow and thus | |
9499 | do not interfere with tab ordering and requires very little resources | |
9500 | compared to a real window on screen. | |
9501 | ||
9502 | What makes sizers so well fitted for use in wxWidgets is the fact that | |
9503 | every control reports its own minimal size and the algorithm can | |
9504 | handle differences in font sizes or different window (dialog item) | |
9505 | sizes on different platforms without problems. If for example the | |
9506 | standard font as well as the overall design of Mac widgets requires | |
9507 | more space than on Windows, then the initial size of a dialog using a | |
9508 | sizer will automatically be bigger on Mac than on Windows. | |
9509 | """ | |
e811c8ce RD |
9510 | def __init__(self): raise RuntimeError, "No constructor defined" |
9511 | def __repr__(self): | |
9512 | return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
9513 | def _setOORInfo(*args, **kwargs): | |
a95a7133 | 9514 | """_setOORInfo(self, PyObject _self)""" |
54f9ee45 | 9515 | return _core_.Sizer__setOORInfo(*args, **kwargs) |
e811c8ce RD |
9516 | |
9517 | def Add(*args, **kwargs): | |
0df68c9f | 9518 | """ |
248ed943 | 9519 | Add(self, item, int proportion=0, int flag=0, int border=0, |
d3b6e4ff | 9520 | PyObject userData=None) -> wx.SizerItem |
248ed943 RD |
9521 | |
9522 | Appends a child item to the sizer. | |
0df68c9f | 9523 | """ |
54f9ee45 | 9524 | return _core_.Sizer_Add(*args, **kwargs) |
e811c8ce RD |
9525 | |
9526 | def Insert(*args, **kwargs): | |
0df68c9f | 9527 | """ |
248ed943 | 9528 | Insert(self, int before, item, int proportion=0, int flag=0, int border=0, |
d3b6e4ff | 9529 | PyObject userData=None) -> wx.SizerItem |
248ed943 RD |
9530 | |
9531 | Inserts a new item into the list of items managed by this sizer before | |
9532 | the item at index *before*. See `Add` for a description of the parameters. | |
0df68c9f | 9533 | """ |
54f9ee45 | 9534 | return _core_.Sizer_Insert(*args, **kwargs) |
e811c8ce RD |
9535 | |
9536 | def Prepend(*args, **kwargs): | |
0df68c9f | 9537 | """ |
248ed943 | 9538 | Prepend(self, item, int proportion=0, int flag=0, int border=0, |
d3b6e4ff | 9539 | PyObject userData=None) -> wx.SizerItem |
248ed943 RD |
9540 | |
9541 | Adds a new item to the begining of the list of sizer items managed by | |
9542 | this sizer. See `Add` for a description of the parameters. | |
0df68c9f | 9543 | """ |
54f9ee45 | 9544 | return _core_.Sizer_Prepend(*args, **kwargs) |
e811c8ce RD |
9545 | |
9546 | def Remove(*args, **kwargs): | |
248ed943 RD |
9547 | """ |
9548 | Remove(self, item) -> bool | |
9549 | ||
9550 | Removes an item from the sizer and destroys it. This method does not | |
9551 | cause any layout or resizing to take place, call `Layout` to update | |
9552 | the layout on screen after removing a child from the sizer. The | |
9553 | *item* parameter can be either a window, a sizer, or the zero-based | |
9554 | index of an item to remove. Returns True if the child item was found | |
9555 | and removed. | |
9556 | """ | |
54f9ee45 | 9557 | return _core_.Sizer_Remove(*args, **kwargs) |
e811c8ce | 9558 | |
1c0f361b | 9559 | def Detach(*args, **kwargs): |
248ed943 RD |
9560 | """ |
9561 | Detach(self, item) -> bool | |
9562 | ||
9563 | Detaches an item from the sizer without destroying it. This method | |
9564 | does not cause any layout or resizing to take place, call `Layout` to | |
9565 | do so. The *item* parameter can be either a window, a sizer, or the | |
9566 | zero-based index of the item to be detached. Returns True if the child item | |
9567 | was found and detached. | |
9568 | """ | |
1c0f361b RD |
9569 | return _core_.Sizer_Detach(*args, **kwargs) |
9570 | ||
d3b6e4ff RD |
9571 | def GetItem(*args, **kwargs): |
9572 | """ | |
9573 | GetItem(self, item) -> wx.SizerItem | |
9574 | ||
9575 | Returns the `wx.SizerItem` which holds the *item* given. The *item* | |
9576 | parameter can be either a window, a sizer, or the zero-based index of | |
9577 | the item to be detached. | |
9578 | """ | |
9579 | return _core_.Sizer_GetItem(*args, **kwargs) | |
9580 | ||
e811c8ce | 9581 | def _SetItemMinSize(*args, **kwargs): |
a95a7133 | 9582 | """_SetItemMinSize(self, PyObject item, Size size)""" |
54f9ee45 | 9583 | return _core_.Sizer__SetItemMinSize(*args, **kwargs) |
e811c8ce | 9584 | |
248ed943 RD |
9585 | def SetItemMinSize(self, item, *args): |
9586 | """ | |
9587 | SetItemMinSize(self, item, Size size) | |
9588 | ||
9589 | Sets the minimum size that will be allocated for an item in the sizer. | |
9590 | The *item* parameter can be either a window, a sizer, or the | |
9591 | zero-based index of the item. If a window or sizer is given then it | |
9592 | will be searched for recursivly in subsizers if neccessary. | |
9593 | """ | |
9594 | if len(args) == 2: | |
9595 | # for backward compatibility accept separate width,height args too | |
9596 | return self._SetItemMinSize(item, args) | |
9597 | else: | |
9598 | return self._SetItemMinSize(item, args[0]) | |
9599 | ||
e811c8ce | 9600 | def AddItem(*args, **kwargs): |
248ed943 RD |
9601 | """ |
9602 | AddItem(self, SizerItem item) | |
9603 | ||
9604 | Adds a `wx.SizerItem` to the sizer. | |
9605 | """ | |
54f9ee45 | 9606 | return _core_.Sizer_AddItem(*args, **kwargs) |
e811c8ce RD |
9607 | |
9608 | def InsertItem(*args, **kwargs): | |
248ed943 RD |
9609 | """ |
9610 | InsertItem(self, int index, SizerItem item) | |
9611 | ||
9612 | Inserts a `wx.SizerItem` to the sizer at the position given by *index*. | |
9613 | """ | |
54f9ee45 | 9614 | return _core_.Sizer_InsertItem(*args, **kwargs) |
e811c8ce RD |
9615 | |
9616 | def PrependItem(*args, **kwargs): | |
248ed943 RD |
9617 | """ |
9618 | PrependItem(self, SizerItem item) | |
9619 | ||
9620 | Prepends a `wx.SizerItem` to the sizer. | |
9621 | """ | |
54f9ee45 | 9622 | return _core_.Sizer_PrependItem(*args, **kwargs) |
e811c8ce | 9623 | |
248ed943 | 9624 | def AddMany(self, items): |
66c033b4 RD |
9625 | """ |
9626 | AddMany is a convenience method for adding several items | |
9627 | to a sizer at one time. Simply pass it a list of tuples, | |
9628 | where each tuple consists of the parameters that you | |
9629 | would normally pass to the `Add` method. | |
9630 | """ | |
248ed943 RD |
9631 | for item in items: |
9632 | if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)): | |
9633 | item = (item, ) | |
9634 | self.Add(*item) | |
d14a1e28 | 9635 | |
74e96f3d | 9636 | # for backwards compatibility only, please do not use in new code |
b9d6a5f3 RD |
9637 | def AddWindow(self, *args, **kw): |
9638 | """Compatibility alias for `Add`.""" | |
9639 | return self.Add(*args, **kw) | |
9640 | def AddSizer(self, *args, **kw): | |
9641 | """Compatibility alias for `Add`.""" | |
9642 | return self.Add(*args, **kw) | |
9643 | def AddSpacer(self, *args, **kw): | |
9644 | """Compatibility alias for `Add`.""" | |
9645 | return self.Add(*args, **kw) | |
9646 | ||
9647 | def PrependWindow(self, *args, **kw): | |
9648 | """Compatibility alias for `Prepend`.""" | |
9649 | return self.Prepend(*args, **kw) | |
9650 | def PrependSizer(self, *args, **kw): | |
9651 | """Compatibility alias for `Prepend`.""" | |
9652 | return self.Prepend(*args, **kw) | |
9653 | def PrependSpacer(self, *args, **kw): | |
9654 | """Compatibility alias for `Prepend`.""" | |
9655 | return self.Prepend(*args, **kw) | |
9656 | ||
9657 | def InsertWindow(self, *args, **kw): | |
9658 | """Compatibility alias for `Insert`.""" | |
9659 | return self.Insert(*args, **kw) | |
9660 | def InsertSizer(self, *args, **kw): | |
9661 | """Compatibility alias for `Insert`.""" | |
9662 | return self.Insert(*args, **kw) | |
9663 | def InsertSpacer(self, *args, **kw): | |
9664 | """Compatibility alias for `Insert`.""" | |
9665 | return self.Insert(*args, **kw) | |
9666 | ||
9667 | def RemoveWindow(self, *args, **kw): | |
9668 | """Compatibility alias for `Remove`.""" | |
9669 | return self.Remove(*args, **kw) | |
9670 | def RemoveSizer(self, *args, **kw): | |
9671 | """Compatibility alias for `Remove`.""" | |
9672 | return self.Remove(*args, **kw) | |
9673 | def RemovePos(self, *args, **kw): | |
9674 | """Compatibility alias for `Remove`.""" | |
9675 | return self.Remove(*args, **kw) | |
d14a1e28 RD |
9676 | |
9677 | ||
e811c8ce | 9678 | def SetDimension(*args, **kwargs): |
248ed943 RD |
9679 | """ |
9680 | SetDimension(self, int x, int y, int width, int height) | |
9681 | ||
9682 | Call this to force the sizer to take the given dimension and thus | |
9683 | force the items owned by the sizer to resize themselves according to | |
9684 | the rules defined by the parameter in the `Add`, `Insert` or `Prepend` | |
9685 | methods. | |
9686 | """ | |
54f9ee45 | 9687 | return _core_.Sizer_SetDimension(*args, **kwargs) |
e811c8ce RD |
9688 | |
9689 | def SetMinSize(*args, **kwargs): | |
248ed943 RD |
9690 | """ |
9691 | SetMinSize(self, Size size) | |
9692 | ||
9693 | Call this to give the sizer a minimal size. Normally, the sizer will | |
9694 | calculate its minimal size based purely on how much space its children | |
9695 | need. After calling this method `GetMinSize` will return either the | |
9696 | minimal size as requested by its children or the minimal size set | |
9697 | here, depending on which is bigger. | |
9698 | """ | |
54f9ee45 | 9699 | return _core_.Sizer_SetMinSize(*args, **kwargs) |
e811c8ce RD |
9700 | |
9701 | def GetSize(*args, **kwargs): | |
248ed943 RD |
9702 | """ |
9703 | GetSize(self) -> Size | |
9704 | ||
9705 | Returns the current size of the space managed by the sizer. | |
9706 | """ | |
54f9ee45 | 9707 | return _core_.Sizer_GetSize(*args, **kwargs) |
e811c8ce RD |
9708 | |
9709 | def GetPosition(*args, **kwargs): | |
248ed943 RD |
9710 | """ |
9711 | GetPosition(self) -> Point | |
9712 | ||
9713 | Returns the current position of the sizer's managed space. | |
9714 | """ | |
54f9ee45 | 9715 | return _core_.Sizer_GetPosition(*args, **kwargs) |
e811c8ce RD |
9716 | |
9717 | def GetMinSize(*args, **kwargs): | |
248ed943 RD |
9718 | """ |
9719 | GetMinSize(self) -> Size | |
9720 | ||
9721 | Returns the minimal size of the sizer. This is either the combined | |
9722 | minimal size of all the children and their borders or the minimal size | |
9723 | set by SetMinSize, depending on which is bigger. | |
9724 | """ | |
54f9ee45 | 9725 | return _core_.Sizer_GetMinSize(*args, **kwargs) |
e811c8ce | 9726 | |
d14a1e28 | 9727 | def GetSizeTuple(self): |
1c0f361b | 9728 | return self.GetSize().Get() |
d14a1e28 | 9729 | def GetPositionTuple(self): |
1c0f361b | 9730 | return self.GetPosition().Get() |
d14a1e28 | 9731 | def GetMinSizeTuple(self): |
1c0f361b | 9732 | return self.GetMinSize().Get() |
d14a1e28 | 9733 | |
e811c8ce | 9734 | def RecalcSizes(*args, **kwargs): |
248ed943 RD |
9735 | """ |
9736 | RecalcSizes(self) | |
9737 | ||
9738 | Using the sizes calculated by `CalcMin` reposition and resize all the | |
9739 | items managed by this sizer. You should not need to call this directly as | |
9740 | it is called by `Layout`. | |
9741 | """ | |
54f9ee45 | 9742 | return _core_.Sizer_RecalcSizes(*args, **kwargs) |
e811c8ce RD |
9743 | |
9744 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
9745 | """ |
9746 | CalcMin(self) -> Size | |
9747 | ||
9748 | This method is where the sizer will do the actual calculation of its | |
9749 | children's minimal sizes. You should not need to call this directly as | |
9750 | it is called by `Layout`. | |
9751 | """ | |
54f9ee45 | 9752 | return _core_.Sizer_CalcMin(*args, **kwargs) |
e811c8ce RD |
9753 | |
9754 | def Layout(*args, **kwargs): | |
248ed943 RD |
9755 | """ |
9756 | Layout(self) | |
9757 | ||
9758 | This method will force the recalculation and layout of the items | |
9759 | controlled by the sizer using the current space allocated to the | |
9760 | sizer. Normally this is called automatically from the owning window's | |
9761 | EVT_SIZE handler, but it is also useful to call it from user code when | |
9762 | one of the items in a sizer change size, or items are added or | |
9763 | removed. | |
9764 | """ | |
54f9ee45 | 9765 | return _core_.Sizer_Layout(*args, **kwargs) |
e811c8ce RD |
9766 | |
9767 | def Fit(*args, **kwargs): | |
248ed943 RD |
9768 | """ |
9769 | Fit(self, Window window) -> Size | |
9770 | ||
9771 | Tell the sizer to resize the *window* to match the sizer's minimal | |
9772 | size. This is commonly done in the constructor of the window itself in | |
9773 | order to set its initial size to match the needs of the children as | |
9774 | determined by the sizer. Returns the new size. | |
9775 | ||
9776 | For a top level window this is the total window size, not the client size. | |
9777 | """ | |
54f9ee45 | 9778 | return _core_.Sizer_Fit(*args, **kwargs) |
e811c8ce RD |
9779 | |
9780 | def FitInside(*args, **kwargs): | |
248ed943 RD |
9781 | """ |
9782 | FitInside(self, Window window) | |
9783 | ||
9784 | Tell the sizer to resize the *virtual size* of the *window* to match the | |
9785 | sizer's minimal size. This will not alter the on screen size of the | |
9786 | window, but may cause the addition/removal/alteration of scrollbars | |
9787 | required to view the virtual area in windows which manage it. | |
9788 | ||
9789 | :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints` | |
9790 | ||
9791 | """ | |
54f9ee45 | 9792 | return _core_.Sizer_FitInside(*args, **kwargs) |
e811c8ce RD |
9793 | |
9794 | def SetSizeHints(*args, **kwargs): | |
248ed943 RD |
9795 | """ |
9796 | SetSizeHints(self, Window window) | |
9797 | ||
9798 | Tell the sizer to set (and `Fit`) the minimal size of the *window* to | |
9799 | match the sizer's minimal size. This is commonly done in the | |
9800 | constructor of the window itself if the window is resizable (as are | |
9801 | many dialogs under Unix and frames on probably all platforms) in order | |
9802 | to prevent the window from being sized smaller than the minimal size | |
9803 | required by the sizer. | |
9804 | """ | |
54f9ee45 | 9805 | return _core_.Sizer_SetSizeHints(*args, **kwargs) |
e811c8ce RD |
9806 | |
9807 | def SetVirtualSizeHints(*args, **kwargs): | |
248ed943 RD |
9808 | """ |
9809 | SetVirtualSizeHints(self, Window window) | |
9810 | ||
9811 | Tell the sizer to set the minimal size of the window virtual area to | |
9812 | match the sizer's minimal size. For windows with managed scrollbars | |
9813 | this will set them appropriately. | |
9814 | ||
9815 | :see: `wx.ScrolledWindow.SetScrollbars` | |
9816 | ||
9817 | """ | |
54f9ee45 | 9818 | return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs) |
e811c8ce RD |
9819 | |
9820 | def Clear(*args, **kwargs): | |
248ed943 RD |
9821 | """ |
9822 | Clear(self, bool deleteWindows=False) | |
9823 | ||
9824 | Clear all items from the sizer, optionally destroying the window items | |
9825 | as well. | |
9826 | """ | |
54f9ee45 | 9827 | return _core_.Sizer_Clear(*args, **kwargs) |
e811c8ce RD |
9828 | |
9829 | def DeleteWindows(*args, **kwargs): | |
248ed943 RD |
9830 | """ |
9831 | DeleteWindows(self) | |
9832 | ||
9833 | Destroy all windows managed by the sizer. | |
9834 | """ | |
54f9ee45 | 9835 | return _core_.Sizer_DeleteWindows(*args, **kwargs) |
e811c8ce RD |
9836 | |
9837 | def GetChildren(*args, **kwargs): | |
248ed943 | 9838 | """ |
51b83b37 | 9839 | GetChildren(self) -> list |
248ed943 RD |
9840 | |
9841 | Returns a list of all the `wx.SizerItem` objects managed by the sizer. | |
9842 | """ | |
54f9ee45 | 9843 | return _core_.Sizer_GetChildren(*args, **kwargs) |
e811c8ce RD |
9844 | |
9845 | def Show(*args, **kwargs): | |
248ed943 | 9846 | """ |
ae8162c8 | 9847 | Show(self, item, bool show=True, bool recursive=false) -> bool |
e811c8ce | 9848 | |
248ed943 RD |
9849 | Shows or hides an item managed by the sizer. To make a sizer item |
9850 | disappear or reappear, use Show followed by `Layout`. The *item* | |
9851 | parameter can be either a window, a sizer, or the zero-based index of | |
7e63a440 RD |
9852 | the item. Use the recursive parameter to show or hide an item in a |
9853 | subsizer. Returns True if the item was found. | |
248ed943 RD |
9854 | """ |
9855 | return _core_.Sizer_Show(*args, **kwargs) | |
e811c8ce RD |
9856 | |
9857 | def IsShown(*args, **kwargs): | |
248ed943 RD |
9858 | """ |
9859 | IsShown(self, item) | |
9860 | ||
9861 | Determines if the item is currently shown. sizer. To make a sizer | |
9862 | item disappear or reappear, use Show followed by `Layout`. The *item* | |
9863 | parameter can be either a window, a sizer, or the zero-based index of | |
9864 | the item. | |
9865 | """ | |
54f9ee45 | 9866 | return _core_.Sizer_IsShown(*args, **kwargs) |
e811c8ce | 9867 | |
7e63a440 | 9868 | def Hide(self, item, recursive=False): |
248ed943 | 9869 | """ |
7e63a440 | 9870 | A convenience method for Show(item, False, recursive). |
248ed943 | 9871 | """ |
06759a38 | 9872 | return self.Show(item, False, recursive) |
248ed943 | 9873 | |
e811c8ce | 9874 | def ShowItems(*args, **kwargs): |
248ed943 RD |
9875 | """ |
9876 | ShowItems(self, bool show) | |
9877 | ||
84f85550 | 9878 | Recursively call `wx.SizerItem.Show` on all sizer items. |
248ed943 | 9879 | """ |
54f9ee45 | 9880 | return _core_.Sizer_ShowItems(*args, **kwargs) |
e811c8ce | 9881 | |
d14a1e28 RD |
9882 | |
9883 | class SizerPtr(Sizer): | |
9884 | def __init__(self, this): | |
9885 | self.this = this | |
9886 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9887 | self.__class__ = Sizer | |
54f9ee45 | 9888 | _core_.Sizer_swigregister(SizerPtr) |
d14a1e28 RD |
9889 | |
9890 | class PySizer(Sizer): | |
248ed943 RD |
9891 | """ |
9892 | wx.PySizer is a special version of `wx.Sizer` that has been | |
9893 | instrumented to allow the C++ virtual methods to be overloaded in | |
9894 | Python derived classes. You would derive from this class if you are | |
9895 | wanting to implement a custom sizer in Python code. Simply implement | |
9896 | `CalcMin` and `RecalcSizes` in the derived class and you're all set. | |
9897 | For example:: | |
9898 | ||
9899 | class MySizer(wx.PySizer): | |
9900 | def __init__(self): | |
9901 | wx.PySizer.__init__(self) | |
9902 | ||
9903 | def CalcMin(self): | |
9904 | for item in self.GetChildren(): | |
9905 | # calculate the total minimum width and height needed | |
9906 | # by all items in the sizer according to this sizer's | |
9907 | # layout algorithm. | |
9908 | ... | |
9909 | return wx.Size(width, height) | |
9910 | ||
9911 | def RecalcSizes(self): | |
9912 | # find the space allotted to this sizer | |
9913 | pos = self.GetPosition() | |
9914 | size = self.GetSize() | |
9915 | for item in self.GetChildren(): | |
9916 | # Recalculate (if necessary) the position and size of | |
9917 | # each item and then call item.SetDimension to do the | |
9918 | # actual positioning and sizing of the items within the | |
9919 | # space alloted to this sizer. | |
9920 | ... | |
9921 | item.SetDimension(itemPos, itemSize) | |
9922 | ||
9923 | ||
9924 | When `Layout` is called it first calls `CalcMin` followed by | |
9925 | `RecalcSizes` so you can optimize a bit by saving the results of | |
e505d15e | 9926 | `CalcMin` and reusing them in `RecalcSizes`. |
248ed943 RD |
9927 | |
9928 | :see: `wx.SizerItem`, `wx.Sizer.GetChildren` | |
9929 | ||
9930 | ||
9931 | """ | |
e811c8ce RD |
9932 | def __repr__(self): |
9933 | return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9934 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9935 | """ |
9936 | __init__(self) -> PySizer | |
9937 | ||
9938 | Creates a wx.PySizer. Must be called from the __init__ in the derived | |
9939 | class. | |
9940 | """ | |
54f9ee45 | 9941 | newobj = _core_.new_PySizer(*args, **kwargs) |
d14a1e28 RD |
9942 | self.this = newobj.this |
9943 | self.thisown = 1 | |
9944 | del newobj.thisown | |
9945 | self._setCallbackInfo(self, PySizer);self._setOORInfo(self) | |
e811c8ce RD |
9946 | |
9947 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 9948 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 9949 | return _core_.PySizer__setCallbackInfo(*args, **kwargs) |
e811c8ce | 9950 | |
d14a1e28 RD |
9951 | |
9952 | class PySizerPtr(PySizer): | |
9953 | def __init__(self, this): | |
9954 | self.this = this | |
9955 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9956 | self.__class__ = PySizer | |
54f9ee45 | 9957 | _core_.PySizer_swigregister(PySizerPtr) |
d14a1e28 RD |
9958 | |
9959 | #--------------------------------------------------------------------------- | |
9960 | ||
9961 | class BoxSizer(Sizer): | |
248ed943 RD |
9962 | """ |
9963 | The basic idea behind a box sizer is that windows will most often be | |
9964 | laid out in rather simple basic geometry, typically in a row or a | |
9965 | column or nested hierarchies of either. A wx.BoxSizer will lay out | |
9966 | its items in a simple row or column, depending on the orientation | |
9967 | parameter passed to the constructor. | |
9968 | """ | |
e811c8ce RD |
9969 | def __repr__(self): |
9970 | return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9971 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9972 | """ |
9973 | __init__(self, int orient=HORIZONTAL) -> BoxSizer | |
9974 | ||
9975 | Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL`` | |
9976 | or ``wx.HORIZONTAL`` for creating either a column sizer or a row | |
9977 | sizer. | |
9978 | """ | |
54f9ee45 | 9979 | newobj = _core_.new_BoxSizer(*args, **kwargs) |
d14a1e28 RD |
9980 | self.this = newobj.this |
9981 | self.thisown = 1 | |
9982 | del newobj.thisown | |
9983 | self._setOORInfo(self) | |
e811c8ce RD |
9984 | |
9985 | def GetOrientation(*args, **kwargs): | |
248ed943 RD |
9986 | """ |
9987 | GetOrientation(self) -> int | |
9988 | ||
9989 | Returns the current orientation of the sizer. | |
9990 | """ | |
54f9ee45 | 9991 | return _core_.BoxSizer_GetOrientation(*args, **kwargs) |
e811c8ce RD |
9992 | |
9993 | def SetOrientation(*args, **kwargs): | |
248ed943 RD |
9994 | """ |
9995 | SetOrientation(self, int orient) | |
e811c8ce | 9996 | |
248ed943 RD |
9997 | Resets the orientation of the sizer. |
9998 | """ | |
9999 | return _core_.BoxSizer_SetOrientation(*args, **kwargs) | |
e811c8ce | 10000 | |
d14a1e28 RD |
10001 | |
10002 | class BoxSizerPtr(BoxSizer): | |
10003 | def __init__(self, this): | |
10004 | self.this = this | |
10005 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10006 | self.__class__ = BoxSizer | |
54f9ee45 | 10007 | _core_.BoxSizer_swigregister(BoxSizerPtr) |
d14a1e28 RD |
10008 | |
10009 | #--------------------------------------------------------------------------- | |
10010 | ||
10011 | class StaticBoxSizer(BoxSizer): | |
248ed943 RD |
10012 | """ |
10013 | wx.StaticBoxSizer derives from and functions identically to the | |
10014 | `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer | |
10015 | manages. Note that this static box must be created separately and | |
10016 | passed to the sizer constructor. | |
10017 | """ | |
e811c8ce RD |
10018 | def __repr__(self): |
10019 | return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10020 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10021 | """ |
10022 | __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer | |
10023 | ||
10024 | Constructor. It takes an associated static box and the orientation | |
10025 | *orient* as parameters - orient can be either of ``wx.VERTICAL`` or | |
10026 | ``wx.HORIZONTAL``. | |
10027 | """ | |
54f9ee45 | 10028 | newobj = _core_.new_StaticBoxSizer(*args, **kwargs) |
d14a1e28 RD |
10029 | self.this = newobj.this |
10030 | self.thisown = 1 | |
10031 | del newobj.thisown | |
10032 | self._setOORInfo(self) | |
e811c8ce RD |
10033 | |
10034 | def GetStaticBox(*args, **kwargs): | |
248ed943 RD |
10035 | """ |
10036 | GetStaticBox(self) -> StaticBox | |
e811c8ce | 10037 | |
248ed943 RD |
10038 | Returns the static box associated with this sizer. |
10039 | """ | |
10040 | return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs) | |
e811c8ce | 10041 | |
d14a1e28 RD |
10042 | |
10043 | class StaticBoxSizerPtr(StaticBoxSizer): | |
10044 | def __init__(self, this): | |
10045 | self.this = this | |
10046 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10047 | self.__class__ = StaticBoxSizer | |
54f9ee45 | 10048 | _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr) |
d14a1e28 RD |
10049 | |
10050 | #--------------------------------------------------------------------------- | |
10051 | ||
10052 | class GridSizer(Sizer): | |
248ed943 RD |
10053 | """ |
10054 | A grid sizer is a sizer which lays out its children in a | |
10055 | two-dimensional table with all cells having the same size. In other | |
10056 | words, the width of each cell within the grid is the width of the | |
10057 | widest item added to the sizer and the height of each grid cell is the | |
10058 | height of the tallest item. An optional vertical and/or horizontal | |
10059 | gap between items can also be specified (in pixels.) | |
10060 | ||
10061 | Items are placed in the cells of the grid in the order they are added, | |
10062 | in row-major order. In other words, the first row is filled first, | |
10063 | then the second, and so on until all items have been added. (If | |
10064 | neccessary, additional rows will be added as items are added.) If you | |
10065 | need to have greater control over the cells that items are placed in | |
10066 | then use the `wx.GridBagSizer`. | |
10067 | ||
10068 | """ | |
e811c8ce RD |
10069 | def __repr__(self): |
10070 | return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10071 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10072 | """ |
10073 | __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer | |
10074 | ||
10075 | Constructor for a wx.GridSizer. *rows* and *cols* determine the number | |
10076 | of columns and rows in the sizer - if either of the parameters is | |
10077 | zero, it will be calculated to from the total number of children in | |
10078 | the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* | |
10079 | define extra space between all children. | |
10080 | """ | |
54f9ee45 | 10081 | newobj = _core_.new_GridSizer(*args, **kwargs) |
d14a1e28 RD |
10082 | self.this = newobj.this |
10083 | self.thisown = 1 | |
10084 | del newobj.thisown | |
10085 | self._setOORInfo(self) | |
e811c8ce | 10086 | |
e811c8ce | 10087 | def SetCols(*args, **kwargs): |
248ed943 RD |
10088 | """ |
10089 | SetCols(self, int cols) | |
10090 | ||
10091 | Sets the number of columns in the sizer. | |
10092 | """ | |
54f9ee45 | 10093 | return _core_.GridSizer_SetCols(*args, **kwargs) |
e811c8ce RD |
10094 | |
10095 | def SetRows(*args, **kwargs): | |
248ed943 RD |
10096 | """ |
10097 | SetRows(self, int rows) | |
10098 | ||
10099 | Sets the number of rows in the sizer. | |
10100 | """ | |
54f9ee45 | 10101 | return _core_.GridSizer_SetRows(*args, **kwargs) |
e811c8ce RD |
10102 | |
10103 | def SetVGap(*args, **kwargs): | |
248ed943 RD |
10104 | """ |
10105 | SetVGap(self, int gap) | |
10106 | ||
10107 | Sets the vertical gap (in pixels) between the cells in the sizer. | |
10108 | """ | |
54f9ee45 | 10109 | return _core_.GridSizer_SetVGap(*args, **kwargs) |
e811c8ce RD |
10110 | |
10111 | def SetHGap(*args, **kwargs): | |
248ed943 RD |
10112 | """ |
10113 | SetHGap(self, int gap) | |
10114 | ||
10115 | Sets the horizontal gap (in pixels) between cells in the sizer | |
10116 | """ | |
54f9ee45 | 10117 | return _core_.GridSizer_SetHGap(*args, **kwargs) |
e811c8ce RD |
10118 | |
10119 | def GetCols(*args, **kwargs): | |
248ed943 RD |
10120 | """ |
10121 | GetCols(self) -> int | |
10122 | ||
10123 | Returns the number of columns in the sizer. | |
10124 | """ | |
54f9ee45 | 10125 | return _core_.GridSizer_GetCols(*args, **kwargs) |
e811c8ce RD |
10126 | |
10127 | def GetRows(*args, **kwargs): | |
248ed943 RD |
10128 | """ |
10129 | GetRows(self) -> int | |
10130 | ||
10131 | Returns the number of rows in the sizer. | |
10132 | """ | |
54f9ee45 | 10133 | return _core_.GridSizer_GetRows(*args, **kwargs) |
e811c8ce RD |
10134 | |
10135 | def GetVGap(*args, **kwargs): | |
248ed943 RD |
10136 | """ |
10137 | GetVGap(self) -> int | |
10138 | ||
10139 | Returns the vertical gap (in pixels) between the cells in the sizer. | |
10140 | """ | |
54f9ee45 | 10141 | return _core_.GridSizer_GetVGap(*args, **kwargs) |
e811c8ce RD |
10142 | |
10143 | def GetHGap(*args, **kwargs): | |
248ed943 RD |
10144 | """ |
10145 | GetHGap(self) -> int | |
10146 | ||
10147 | Returns the horizontal gap (in pixels) between cells in the sizer. | |
10148 | """ | |
54f9ee45 | 10149 | return _core_.GridSizer_GetHGap(*args, **kwargs) |
e811c8ce | 10150 | |
d14a1e28 RD |
10151 | |
10152 | class GridSizerPtr(GridSizer): | |
10153 | def __init__(self, this): | |
10154 | self.this = this | |
10155 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10156 | self.__class__ = GridSizer | |
54f9ee45 | 10157 | _core_.GridSizer_swigregister(GridSizerPtr) |
d14a1e28 RD |
10158 | |
10159 | #--------------------------------------------------------------------------- | |
10160 | ||
54f9ee45 RD |
10161 | FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE |
10162 | FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED | |
10163 | FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL | |
d14a1e28 | 10164 | class FlexGridSizer(GridSizer): |
248ed943 RD |
10165 | """ |
10166 | A flex grid sizer is a sizer which lays out its children in a | |
10167 | two-dimensional table with all table cells in one row having the same | |
10168 | height and all cells in one column having the same width, but all | |
10169 | rows or all columns are not necessarily the same height or width as in | |
10170 | the `wx.GridSizer`. | |
10171 | ||
10172 | wx.FlexGridSizer can also size items equally in one direction but | |
10173 | unequally ("flexibly") in the other. If the sizer is only flexible | |
10174 | in one direction (this can be changed using `SetFlexibleDirection`), it | |
10175 | needs to be decided how the sizer should grow in the other ("non | |
10176 | flexible") direction in order to fill the available space. The | |
10177 | `SetNonFlexibleGrowMode` method serves this purpose. | |
10178 | ||
10179 | ||
10180 | """ | |
e811c8ce RD |
10181 | def __repr__(self): |
10182 | return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10183 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10184 | """ |
10185 | __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer | |
10186 | ||
10187 | Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the | |
10188 | number of columns and rows in the sizer - if either of the parameters | |
10189 | is zero, it will be calculated to from the total number of children in | |
10190 | the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* | |
10191 | define extra space between all children. | |
10192 | """ | |
54f9ee45 | 10193 | newobj = _core_.new_FlexGridSizer(*args, **kwargs) |
d14a1e28 RD |
10194 | self.this = newobj.this |
10195 | self.thisown = 1 | |
10196 | del newobj.thisown | |
10197 | self._setOORInfo(self) | |
e811c8ce | 10198 | |
248ed943 RD |
10199 | def AddGrowableRow(*args, **kwargs): |
10200 | """ | |
10201 | AddGrowableRow(self, size_t idx, int proportion=0) | |
e811c8ce | 10202 | |
248ed943 RD |
10203 | Specifies that row *idx* (starting from zero) should be grown if there |
10204 | is extra space available to the sizer. | |
e811c8ce | 10205 | |
248ed943 RD |
10206 | The *proportion* parameter has the same meaning as the stretch factor |
10207 | for the box sizers except that if all proportions are 0, then all | |
10208 | columns are resized equally (instead of not being resized at all). | |
10209 | """ | |
54f9ee45 | 10210 | return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs) |
e811c8ce RD |
10211 | |
10212 | def RemoveGrowableRow(*args, **kwargs): | |
248ed943 RD |
10213 | """ |
10214 | RemoveGrowableRow(self, size_t idx) | |
10215 | ||
10216 | Specifies that row *idx* is no longer growable. | |
10217 | """ | |
54f9ee45 | 10218 | return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) |
e811c8ce RD |
10219 | |
10220 | def AddGrowableCol(*args, **kwargs): | |
248ed943 RD |
10221 | """ |
10222 | AddGrowableCol(self, size_t idx, int proportion=0) | |
10223 | ||
10224 | Specifies that column *idx* (starting from zero) should be grown if | |
10225 | there is extra space available to the sizer. | |
10226 | ||
10227 | The *proportion* parameter has the same meaning as the stretch factor | |
10228 | for the box sizers except that if all proportions are 0, then all | |
10229 | columns are resized equally (instead of not being resized at all). | |
10230 | """ | |
54f9ee45 | 10231 | return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs) |
e811c8ce RD |
10232 | |
10233 | def RemoveGrowableCol(*args, **kwargs): | |
248ed943 RD |
10234 | """ |
10235 | RemoveGrowableCol(self, size_t idx) | |
10236 | ||
10237 | Specifies that column *idx* is no longer growable. | |
10238 | """ | |
54f9ee45 | 10239 | return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) |
e811c8ce RD |
10240 | |
10241 | def SetFlexibleDirection(*args, **kwargs): | |
248ed943 RD |
10242 | """ |
10243 | SetFlexibleDirection(self, int direction) | |
10244 | ||
10245 | Specifies whether the sizer should flexibly resize its columns, rows, | |
10246 | or both. Argument *direction* can be one of the following values. Any | |
10247 | other value is ignored. | |
10248 | ||
10249 | ============== ======================================= | |
10250 | wx.VERTICAL Rows are flexibly sized. | |
10251 | wx.HORIZONTAL Columns are flexibly sized. | |
10252 | wx.BOTH Both rows and columns are flexibly sized | |
10253 | (this is the default value). | |
10254 | ============== ======================================= | |
10255 | ||
10256 | Note that this method does not trigger relayout. | |
10257 | ||
10258 | """ | |
54f9ee45 | 10259 | return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) |
e811c8ce RD |
10260 | |
10261 | def GetFlexibleDirection(*args, **kwargs): | |
248ed943 RD |
10262 | """ |
10263 | GetFlexibleDirection(self) -> int | |
10264 | ||
10265 | Returns a value that specifies whether the sizer | |
10266 | flexibly resizes its columns, rows, or both (default). | |
10267 | ||
10268 | :see: `SetFlexibleDirection` | |
10269 | """ | |
54f9ee45 | 10270 | return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) |
e811c8ce RD |
10271 | |
10272 | def SetNonFlexibleGrowMode(*args, **kwargs): | |
248ed943 RD |
10273 | """ |
10274 | SetNonFlexibleGrowMode(self, int mode) | |
10275 | ||
10276 | Specifies how the sizer should grow in the non-flexible direction if | |
10277 | there is one (so `SetFlexibleDirection` must have been called | |
10278 | previously). Argument *mode* can be one of the following values: | |
10279 | ||
10280 | ========================== ================================================= | |
10281 | wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction. | |
10282 | wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with | |
10283 | `AddGrowableCol` and `AddGrowableRow`. In this | |
10284 | case equal sizing applies to minimum sizes of | |
10285 | columns or rows (this is the default value). | |
10286 | wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in | |
10287 | the non flexible direction, whether they are | |
10288 | growable or not in the flexbile direction. | |
10289 | ========================== ================================================= | |
10290 | ||
10291 | Note that this method does not trigger relayout. | |
10292 | ||
10293 | ||
10294 | """ | |
54f9ee45 | 10295 | return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) |
e811c8ce RD |
10296 | |
10297 | def GetNonFlexibleGrowMode(*args, **kwargs): | |
248ed943 RD |
10298 | """ |
10299 | GetNonFlexibleGrowMode(self) -> int | |
10300 | ||
10301 | Returns the value that specifies how the sizer grows in the | |
10302 | non-flexible direction if there is one. | |
10303 | ||
10304 | :see: `SetNonFlexibleGrowMode` | |
10305 | """ | |
54f9ee45 | 10306 | return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) |
e811c8ce RD |
10307 | |
10308 | def GetRowHeights(*args, **kwargs): | |
fd2dc343 RD |
10309 | """ |
10310 | GetRowHeights(self) -> list | |
10311 | ||
10312 | Returns a list of integers representing the heights of each of the | |
10313 | rows in the sizer. | |
10314 | """ | |
54f9ee45 | 10315 | return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs) |
e811c8ce RD |
10316 | |
10317 | def GetColWidths(*args, **kwargs): | |
fd2dc343 RD |
10318 | """ |
10319 | GetColWidths(self) -> list | |
10320 | ||
10321 | Returns a list of integers representing the widths of each of the | |
10322 | columns in the sizer. | |
10323 | """ | |
54f9ee45 | 10324 | return _core_.FlexGridSizer_GetColWidths(*args, **kwargs) |
e811c8ce | 10325 | |
d14a1e28 RD |
10326 | |
10327 | class FlexGridSizerPtr(FlexGridSizer): | |
10328 | def __init__(self, this): | |
10329 | self.this = this | |
10330 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10331 | self.__class__ = FlexGridSizer | |
54f9ee45 | 10332 | _core_.FlexGridSizer_swigregister(FlexGridSizerPtr) |
d14a1e28 | 10333 | |
e505d15e RD |
10334 | class StdDialogButtonSizer(BoxSizer): |
10335 | """ | |
10336 | A special sizer that knows how to order and position standard buttons | |
10337 | in order to conform to the current platform's standards. You simply | |
10338 | need to add each `wx.Button` to the sizer, and be sure to create the | |
53aa7709 | 10339 | buttons using the standard ID's. Then call `Realize` and the sizer |
e505d15e RD |
10340 | will take care of the rest. |
10341 | ||
10342 | """ | |
10343 | def __repr__(self): | |
10344 | return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
10345 | def __init__(self, *args, **kwargs): | |
10346 | """__init__(self) -> StdDialogButtonSizer""" | |
10347 | newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs) | |
10348 | self.this = newobj.this | |
10349 | self.thisown = 1 | |
10350 | del newobj.thisown | |
10351 | def AddButton(*args, **kwargs): | |
10352 | """ | |
10353 | AddButton(self, wxButton button) | |
10354 | ||
10355 | Use this to add the buttons to this sizer. Do not use the `Add` | |
10356 | method in the base class. | |
10357 | """ | |
10358 | return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs) | |
10359 | ||
53aa7709 | 10360 | def Realize(*args, **kwargs): |
e505d15e | 10361 | """ |
53aa7709 | 10362 | Realize(self) |
e505d15e RD |
10363 | |
10364 | This funciton needs to be called after all the buttons have been added | |
10365 | to the sizer. It will reorder them and position them in a platform | |
10366 | specifc manner. | |
10367 | """ | |
53aa7709 | 10368 | return _core_.StdDialogButtonSizer_Realize(*args, **kwargs) |
51b83b37 RD |
10369 | |
10370 | def SetAffirmativeButton(*args, **kwargs): | |
10371 | """SetAffirmativeButton(self, wxButton button)""" | |
10372 | return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs) | |
10373 | ||
10374 | def SetNegativeButton(*args, **kwargs): | |
10375 | """SetNegativeButton(self, wxButton button)""" | |
10376 | return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs) | |
10377 | ||
10378 | def SetCancelButton(*args, **kwargs): | |
10379 | """SetCancelButton(self, wxButton button)""" | |
10380 | return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs) | |
e505d15e RD |
10381 | |
10382 | def GetAffirmativeButton(*args, **kwargs): | |
10383 | """GetAffirmativeButton(self) -> wxButton""" | |
10384 | return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs) | |
10385 | ||
10386 | def GetApplyButton(*args, **kwargs): | |
10387 | """GetApplyButton(self) -> wxButton""" | |
10388 | return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs) | |
10389 | ||
10390 | def GetNegativeButton(*args, **kwargs): | |
10391 | """GetNegativeButton(self) -> wxButton""" | |
10392 | return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs) | |
10393 | ||
10394 | def GetCancelButton(*args, **kwargs): | |
10395 | """GetCancelButton(self) -> wxButton""" | |
10396 | return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs) | |
10397 | ||
10398 | def GetHelpButton(*args, **kwargs): | |
10399 | """GetHelpButton(self) -> wxButton""" | |
10400 | return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs) | |
10401 | ||
10402 | ||
10403 | class StdDialogButtonSizerPtr(StdDialogButtonSizer): | |
10404 | def __init__(self, this): | |
10405 | self.this = this | |
10406 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10407 | self.__class__ = StdDialogButtonSizer | |
10408 | _core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr) | |
10409 | ||
d14a1e28 RD |
10410 | #--------------------------------------------------------------------------- |
10411 | ||
10412 | class GBPosition(object): | |
248ed943 RD |
10413 | """ |
10414 | This class represents the position of an item in a virtual grid of | |
10415 | rows and columns managed by a `wx.GridBagSizer`. wxPython has | |
10416 | typemaps that will automatically convert from a 2-element sequence of | |
10417 | integers to a wx.GBPosition, so you can use the more pythonic | |
10418 | representation of the position nearly transparently in Python code. | |
10419 | """ | |
e811c8ce RD |
10420 | def __repr__(self): |
10421 | return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10422 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10423 | """ |
10424 | __init__(self, int row=0, int col=0) -> GBPosition | |
10425 | ||
10426 | This class represents the position of an item in a virtual grid of | |
10427 | rows and columns managed by a `wx.GridBagSizer`. wxPython has | |
10428 | typemaps that will automatically convert from a 2-element sequence of | |
10429 | integers to a wx.GBPosition, so you can use the more pythonic | |
10430 | representation of the position nearly transparently in Python code. | |
10431 | """ | |
54f9ee45 | 10432 | newobj = _core_.new_GBPosition(*args, **kwargs) |
d14a1e28 RD |
10433 | self.this = newobj.this |
10434 | self.thisown = 1 | |
10435 | del newobj.thisown | |
e811c8ce | 10436 | def GetRow(*args, **kwargs): |
a95a7133 | 10437 | """GetRow(self) -> int""" |
54f9ee45 | 10438 | return _core_.GBPosition_GetRow(*args, **kwargs) |
e811c8ce RD |
10439 | |
10440 | def GetCol(*args, **kwargs): | |
a95a7133 | 10441 | """GetCol(self) -> int""" |
54f9ee45 | 10442 | return _core_.GBPosition_GetCol(*args, **kwargs) |
e811c8ce RD |
10443 | |
10444 | def SetRow(*args, **kwargs): | |
a95a7133 | 10445 | """SetRow(self, int row)""" |
54f9ee45 | 10446 | return _core_.GBPosition_SetRow(*args, **kwargs) |
e811c8ce RD |
10447 | |
10448 | def SetCol(*args, **kwargs): | |
a95a7133 | 10449 | """SetCol(self, int col)""" |
54f9ee45 | 10450 | return _core_.GBPosition_SetCol(*args, **kwargs) |
e811c8ce RD |
10451 | |
10452 | def __eq__(*args, **kwargs): | |
a95a7133 | 10453 | """__eq__(self, GBPosition other) -> bool""" |
54f9ee45 | 10454 | return _core_.GBPosition___eq__(*args, **kwargs) |
e811c8ce RD |
10455 | |
10456 | def __ne__(*args, **kwargs): | |
a95a7133 | 10457 | """__ne__(self, GBPosition other) -> bool""" |
54f9ee45 | 10458 | return _core_.GBPosition___ne__(*args, **kwargs) |
e811c8ce RD |
10459 | |
10460 | def Set(*args, **kwargs): | |
a95a7133 | 10461 | """Set(self, int row=0, int col=0)""" |
54f9ee45 | 10462 | return _core_.GBPosition_Set(*args, **kwargs) |
e811c8ce RD |
10463 | |
10464 | def Get(*args, **kwargs): | |
a95a7133 | 10465 | """Get(self) -> PyObject""" |
54f9ee45 | 10466 | return _core_.GBPosition_Get(*args, **kwargs) |
e811c8ce | 10467 | |
41e2b43e | 10468 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
10469 | def __str__(self): return str(self.Get()) |
10470 | def __repr__(self): return 'wx.GBPosition'+str(self.Get()) | |
10471 | def __len__(self): return len(self.Get()) | |
10472 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
10473 | def __setitem__(self, index, val): |
10474 | if index == 0: self.SetRow(val) | |
10475 | elif index == 1: self.SetCol(val) | |
10476 | else: raise IndexError | |
e811c8ce | 10477 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
10478 | __safe_for_unpickling__ = True |
10479 | def __reduce__(self): return (wx.GBPosition, self.Get()) | |
d14a1e28 RD |
10480 | |
10481 | row = property(GetRow, SetRow) | |
10482 | col = property(GetCol, SetCol) | |
10483 | ||
10484 | ||
10485 | class GBPositionPtr(GBPosition): | |
10486 | def __init__(self, this): | |
10487 | self.this = this | |
10488 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10489 | self.__class__ = GBPosition | |
54f9ee45 | 10490 | _core_.GBPosition_swigregister(GBPositionPtr) |
d14a1e28 RD |
10491 | |
10492 | class GBSpan(object): | |
248ed943 RD |
10493 | """ |
10494 | This class is used to hold the row and column spanning attributes of | |
10495 | items in a `wx.GridBagSizer`. wxPython has typemaps that will | |
10496 | automatically convert from a 2-element sequence of integers to a | |
10497 | wx.GBSpan, so you can use the more pythonic representation of the span | |
10498 | nearly transparently in Python code. | |
10499 | ||
10500 | """ | |
e811c8ce RD |
10501 | def __repr__(self): |
10502 | return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10503 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10504 | """ |
10505 | __init__(self, int rowspan=1, int colspan=1) -> GBSpan | |
10506 | ||
10507 | Construct a new wxGBSpan, optionally setting the rowspan and | |
10508 | colspan. The default is (1,1). (Meaning that the item occupies one | |
10509 | cell in each direction. | |
10510 | """ | |
54f9ee45 | 10511 | newobj = _core_.new_GBSpan(*args, **kwargs) |
d14a1e28 RD |
10512 | self.this = newobj.this |
10513 | self.thisown = 1 | |
10514 | del newobj.thisown | |
e811c8ce | 10515 | def GetRowspan(*args, **kwargs): |
a95a7133 | 10516 | """GetRowspan(self) -> int""" |
54f9ee45 | 10517 | return _core_.GBSpan_GetRowspan(*args, **kwargs) |
e811c8ce RD |
10518 | |
10519 | def GetColspan(*args, **kwargs): | |
a95a7133 | 10520 | """GetColspan(self) -> int""" |
54f9ee45 | 10521 | return _core_.GBSpan_GetColspan(*args, **kwargs) |
e811c8ce RD |
10522 | |
10523 | def SetRowspan(*args, **kwargs): | |
a95a7133 | 10524 | """SetRowspan(self, int rowspan)""" |
54f9ee45 | 10525 | return _core_.GBSpan_SetRowspan(*args, **kwargs) |
e811c8ce RD |
10526 | |
10527 | def SetColspan(*args, **kwargs): | |
a95a7133 | 10528 | """SetColspan(self, int colspan)""" |
54f9ee45 | 10529 | return _core_.GBSpan_SetColspan(*args, **kwargs) |
e811c8ce RD |
10530 | |
10531 | def __eq__(*args, **kwargs): | |
a95a7133 | 10532 | """__eq__(self, GBSpan other) -> bool""" |
54f9ee45 | 10533 | return _core_.GBSpan___eq__(*args, **kwargs) |
e811c8ce RD |
10534 | |
10535 | def __ne__(*args, **kwargs): | |
a95a7133 | 10536 | """__ne__(self, GBSpan other) -> bool""" |
54f9ee45 | 10537 | return _core_.GBSpan___ne__(*args, **kwargs) |
e811c8ce RD |
10538 | |
10539 | def Set(*args, **kwargs): | |
a95a7133 | 10540 | """Set(self, int rowspan=1, int colspan=1)""" |
54f9ee45 | 10541 | return _core_.GBSpan_Set(*args, **kwargs) |
e811c8ce RD |
10542 | |
10543 | def Get(*args, **kwargs): | |
a95a7133 | 10544 | """Get(self) -> PyObject""" |
54f9ee45 | 10545 | return _core_.GBSpan_Get(*args, **kwargs) |
e811c8ce | 10546 | |
41e2b43e | 10547 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
10548 | def __str__(self): return str(self.Get()) |
10549 | def __repr__(self): return 'wx.GBSpan'+str(self.Get()) | |
10550 | def __len__(self): return len(self.Get()) | |
10551 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
10552 | def __setitem__(self, index, val): |
10553 | if index == 0: self.SetRowspan(val) | |
10554 | elif index == 1: self.SetColspan(val) | |
10555 | else: raise IndexError | |
e811c8ce | 10556 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
10557 | __safe_for_unpickling__ = True |
10558 | def __reduce__(self): return (wx.GBSpan, self.Get()) | |
d14a1e28 RD |
10559 | |
10560 | rowspan = property(GetRowspan, SetRowspan) | |
10561 | colspan = property(GetColspan, SetColspan) | |
10562 | ||
10563 | ||
10564 | class GBSpanPtr(GBSpan): | |
10565 | def __init__(self, this): | |
10566 | self.this = this | |
10567 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10568 | self.__class__ = GBSpan | |
54f9ee45 | 10569 | _core_.GBSpan_swigregister(GBSpanPtr) |
d14a1e28 RD |
10570 | |
10571 | class GBSizerItem(SizerItem): | |
248ed943 RD |
10572 | """ |
10573 | The wx.GBSizerItem class is used to track the additional data about | |
10574 | items in a `wx.GridBagSizer` such as the item's position in the grid | |
10575 | and how many rows or columns it spans. | |
10576 | ||
10577 | """ | |
e811c8ce RD |
10578 | def __repr__(self): |
10579 | return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10580 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10581 | """ |
10582 | __init__(self) -> GBSizerItem | |
10583 | ||
10584 | Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer | |
10585 | size will need to be set, as well as a position and span before this | |
10586 | item can be used in a Sizer. | |
10587 | ||
10588 | You will probably never need to create a wx.GBSizerItem directly as they | |
10589 | are created automatically when the sizer's Add method is called. | |
10590 | """ | |
54f9ee45 | 10591 | newobj = _core_.new_GBSizerItem(*args, **kwargs) |
d14a1e28 RD |
10592 | self.this = newobj.this |
10593 | self.thisown = 1 | |
10594 | del newobj.thisown | |
e811c8ce | 10595 | def GetPos(*args, **kwargs): |
248ed943 RD |
10596 | """ |
10597 | GetPos(self) -> GBPosition | |
10598 | ||
10599 | Get the grid position of the item | |
10600 | """ | |
54f9ee45 | 10601 | return _core_.GBSizerItem_GetPos(*args, **kwargs) |
e811c8ce RD |
10602 | |
10603 | def GetPosTuple(self): return self.GetPos().Get() | |
10604 | def GetSpan(*args, **kwargs): | |
248ed943 RD |
10605 | """ |
10606 | GetSpan(self) -> GBSpan | |
10607 | ||
10608 | Get the row and column spanning of the item | |
10609 | """ | |
54f9ee45 | 10610 | return _core_.GBSizerItem_GetSpan(*args, **kwargs) |
e811c8ce RD |
10611 | |
10612 | def GetSpanTuple(self): return self.GetSpan().Get() | |
10613 | def SetPos(*args, **kwargs): | |
248ed943 RD |
10614 | """ |
10615 | SetPos(self, GBPosition pos) -> bool | |
10616 | ||
10617 | If the item is already a member of a sizer then first ensure that | |
10618 | there is no other item that would intersect with this one at the new | |
10619 | position, then set the new position. Returns True if the change is | |
10620 | successful and after the next Layout() the item will be moved. | |
10621 | """ | |
54f9ee45 | 10622 | return _core_.GBSizerItem_SetPos(*args, **kwargs) |
e811c8ce RD |
10623 | |
10624 | def SetSpan(*args, **kwargs): | |
248ed943 RD |
10625 | """ |
10626 | SetSpan(self, GBSpan span) -> bool | |
10627 | ||
10628 | If the item is already a member of a sizer then first ensure that | |
10629 | there is no other item that would intersect with this one with its new | |
10630 | spanning size, then set the new spanning. Returns True if the change | |
10631 | is successful and after the next Layout() the item will be resized. | |
10632 | ||
10633 | """ | |
54f9ee45 | 10634 | return _core_.GBSizerItem_SetSpan(*args, **kwargs) |
e811c8ce | 10635 | |
248ed943 | 10636 | def Intersects(*args, **kwargs): |
0df68c9f | 10637 | """ |
a95a7133 | 10638 | Intersects(self, GBSizerItem other) -> bool |
248ed943 RD |
10639 | |
10640 | Returns True if this item and the other item instersect. | |
0df68c9f | 10641 | """ |
248ed943 RD |
10642 | return _core_.GBSizerItem_Intersects(*args, **kwargs) |
10643 | ||
10644 | def IntersectsPos(*args, **kwargs): | |
10645 | """ | |
10646 | IntersectsPos(self, GBPosition pos, GBSpan span) -> bool | |
10647 | ||
10648 | Returns True if the given pos/span would intersect with this item. | |
10649 | """ | |
10650 | return _core_.GBSizerItem_IntersectsPos(*args, **kwargs) | |
e811c8ce RD |
10651 | |
10652 | def GetEndPos(*args, **kwargs): | |
248ed943 RD |
10653 | """ |
10654 | GetEndPos(self) -> GBPosition | |
10655 | ||
10656 | Get the row and column of the endpoint of this item. | |
10657 | """ | |
54f9ee45 | 10658 | return _core_.GBSizerItem_GetEndPos(*args, **kwargs) |
e811c8ce RD |
10659 | |
10660 | def GetGBSizer(*args, **kwargs): | |
248ed943 RD |
10661 | """ |
10662 | GetGBSizer(self) -> GridBagSizer | |
10663 | ||
10664 | Get the sizer this item is a member of. | |
10665 | """ | |
54f9ee45 | 10666 | return _core_.GBSizerItem_GetGBSizer(*args, **kwargs) |
e811c8ce RD |
10667 | |
10668 | def SetGBSizer(*args, **kwargs): | |
248ed943 RD |
10669 | """ |
10670 | SetGBSizer(self, GridBagSizer sizer) | |
10671 | ||
10672 | Set the sizer this item is a member of. | |
10673 | """ | |
54f9ee45 | 10674 | return _core_.GBSizerItem_SetGBSizer(*args, **kwargs) |
e811c8ce | 10675 | |
d14a1e28 RD |
10676 | |
10677 | class GBSizerItemPtr(GBSizerItem): | |
10678 | def __init__(self, this): | |
10679 | self.this = this | |
10680 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10681 | self.__class__ = GBSizerItem | |
54f9ee45 | 10682 | _core_.GBSizerItem_swigregister(GBSizerItemPtr) |
d14a1e28 RD |
10683 | DefaultSpan = cvar.DefaultSpan |
10684 | ||
10685 | def GBSizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
10686 | """ |
10687 | GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, | |
248ed943 RD |
10688 | int border, PyObject userData=None) -> GBSizerItem |
10689 | ||
10690 | Construct a `wx.GBSizerItem` for a window. | |
0df68c9f | 10691 | """ |
54f9ee45 | 10692 | val = _core_.new_GBSizerItemWindow(*args, **kwargs) |
d14a1e28 RD |
10693 | val.thisown = 1 |
10694 | return val | |
10695 | ||
10696 | def GBSizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
10697 | """ |
10698 | GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, | |
248ed943 RD |
10699 | int border, PyObject userData=None) -> GBSizerItem |
10700 | ||
10701 | Construct a `wx.GBSizerItem` for a sizer | |
0df68c9f | 10702 | """ |
54f9ee45 | 10703 | val = _core_.new_GBSizerItemSizer(*args, **kwargs) |
d14a1e28 RD |
10704 | val.thisown = 1 |
10705 | return val | |
10706 | ||
10707 | def GBSizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
10708 | """ |
10709 | GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, | |
248ed943 RD |
10710 | int flag, int border, PyObject userData=None) -> GBSizerItem |
10711 | ||
10712 | Construct a `wx.GBSizerItem` for a spacer. | |
0df68c9f | 10713 | """ |
54f9ee45 | 10714 | val = _core_.new_GBSizerItemSpacer(*args, **kwargs) |
d14a1e28 RD |
10715 | val.thisown = 1 |
10716 | return val | |
10717 | ||
10718 | class GridBagSizer(FlexGridSizer): | |
248ed943 RD |
10719 | """ |
10720 | A `wx.Sizer` that can lay out items in a virtual grid like a | |
10721 | `wx.FlexGridSizer` but in this case explicit positioning of the items | |
10722 | is allowed using `wx.GBPosition`, and items can optionally span more | |
10723 | than one row and/or column using `wx.GBSpan`. The total size of the | |
10724 | virtual grid is determined by the largest row and column that items are | |
10725 | positioned at, adjusted for spanning. | |
10726 | ||
10727 | """ | |
e811c8ce RD |
10728 | def __repr__(self): |
10729 | return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10730 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10731 | """ |
10732 | __init__(self, int vgap=0, int hgap=0) -> GridBagSizer | |
10733 | ||
10734 | Constructor, with optional parameters to specify the gap between the | |
10735 | rows and columns. | |
10736 | """ | |
54f9ee45 | 10737 | newobj = _core_.new_GridBagSizer(*args, **kwargs) |
d14a1e28 RD |
10738 | self.this = newobj.this |
10739 | self.thisown = 1 | |
10740 | del newobj.thisown | |
1823fbb4 RD |
10741 | self._setOORInfo(self) |
10742 | ||
e811c8ce | 10743 | def Add(*args, **kwargs): |
0df68c9f | 10744 | """ |
248ed943 | 10745 | Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0, |
d3b6e4ff | 10746 | int border=0, userData=None) -> wx.GBSizerItem |
248ed943 RD |
10747 | |
10748 | Adds an item to the sizer at the grid cell *pos*, optionally spanning | |
10749 | more than one row or column as specified with *span*. The remaining | |
10750 | args behave similarly to `wx.Sizer.Add`. | |
10751 | ||
10752 | Returns True if the item was successfully placed at the given cell | |
10753 | position, False if something was already there. | |
10754 | ||
0df68c9f | 10755 | """ |
54f9ee45 | 10756 | return _core_.GridBagSizer_Add(*args, **kwargs) |
e811c8ce RD |
10757 | |
10758 | def AddItem(*args, **kwargs): | |
248ed943 | 10759 | """ |
d3b6e4ff | 10760 | Add(self, GBSizerItem item) -> wx.GBSizerItem |
248ed943 RD |
10761 | |
10762 | Add an item to the sizer using a `wx.GBSizerItem`. Returns True if | |
10763 | the item was successfully placed at its given cell position, False if | |
10764 | something was already there. | |
10765 | """ | |
54f9ee45 | 10766 | return _core_.GridBagSizer_AddItem(*args, **kwargs) |
e811c8ce | 10767 | |
84f85550 RD |
10768 | def GetCellSize(*args, **kwargs): |
10769 | """ | |
10770 | GetCellSize(self, int row, int col) -> Size | |
10771 | ||
10772 | Get the size of the specified cell, including hgap and | |
10773 | vgap. Only valid after a Layout. | |
10774 | """ | |
10775 | return _core_.GridBagSizer_GetCellSize(*args, **kwargs) | |
10776 | ||
e811c8ce | 10777 | def GetEmptyCellSize(*args, **kwargs): |
248ed943 RD |
10778 | """ |
10779 | GetEmptyCellSize(self) -> Size | |
10780 | ||
10781 | Get the size used for cells in the grid with no item. | |
10782 | """ | |
54f9ee45 | 10783 | return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs) |
e811c8ce RD |
10784 | |
10785 | def SetEmptyCellSize(*args, **kwargs): | |
248ed943 RD |
10786 | """ |
10787 | SetEmptyCellSize(self, Size sz) | |
10788 | ||
10789 | Set the size used for cells in the grid with no item. | |
10790 | """ | |
54f9ee45 | 10791 | return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs) |
e811c8ce RD |
10792 | |
10793 | def GetItemPosition(*args): | |
0df68c9f | 10794 | """ |
248ed943 RD |
10795 | GetItemPosition(self, item) -> GBPosition |
10796 | ||
10797 | Get the grid position of the specified *item* where *item* is either a | |
10798 | window or subsizer that is a member of this sizer, or a zero-based | |
10799 | index of an item. | |
0df68c9f | 10800 | """ |
54f9ee45 | 10801 | return _core_.GridBagSizer_GetItemPosition(*args) |
e811c8ce RD |
10802 | |
10803 | def SetItemPosition(*args): | |
0df68c9f | 10804 | """ |
248ed943 RD |
10805 | SetItemPosition(self, item, GBPosition pos) -> bool |
10806 | ||
10807 | Set the grid position of the specified *item* where *item* is either a | |
10808 | window or subsizer that is a member of this sizer, or a zero-based | |
10809 | index of an item. Returns True on success. If the move is not | |
10810 | allowed (because an item is already there) then False is returned. | |
10811 | ||
0df68c9f | 10812 | """ |
54f9ee45 | 10813 | return _core_.GridBagSizer_SetItemPosition(*args) |
e811c8ce RD |
10814 | |
10815 | def GetItemSpan(*args): | |
0df68c9f | 10816 | """ |
248ed943 RD |
10817 | GetItemSpan(self, item) -> GBSpan |
10818 | ||
10819 | Get the row/col spanning of the specified *item* where *item* is | |
10820 | either a window or subsizer that is a member of this sizer, or a | |
10821 | zero-based index of an item. | |
0df68c9f | 10822 | """ |
54f9ee45 | 10823 | return _core_.GridBagSizer_GetItemSpan(*args) |
e811c8ce RD |
10824 | |
10825 | def SetItemSpan(*args): | |
0df68c9f | 10826 | """ |
248ed943 RD |
10827 | SetItemSpan(self, item, GBSpan span) -> bool |
10828 | ||
10829 | Set the row/col spanning of the specified *item* where *item* is | |
10830 | either a window or subsizer that is a member of this sizer, or a | |
10831 | zero-based index of an item. Returns True on success. If the move is | |
10832 | not allowed (because an item is already there) then False is returned. | |
0df68c9f | 10833 | """ |
54f9ee45 | 10834 | return _core_.GridBagSizer_SetItemSpan(*args) |
e811c8ce RD |
10835 | |
10836 | def FindItem(*args): | |
0df68c9f | 10837 | """ |
248ed943 RD |
10838 | FindItem(self, item) -> GBSizerItem |
10839 | ||
10840 | Find the sizer item for the given window or subsizer, returns None if | |
10841 | not found. (non-recursive) | |
0df68c9f | 10842 | """ |
54f9ee45 | 10843 | return _core_.GridBagSizer_FindItem(*args) |
e811c8ce RD |
10844 | |
10845 | def FindItemAtPosition(*args, **kwargs): | |
248ed943 RD |
10846 | """ |
10847 | FindItemAtPosition(self, GBPosition pos) -> GBSizerItem | |
10848 | ||
10849 | Return the sizer item for the given grid cell, or None if there is no | |
10850 | item at that position. (non-recursive) | |
10851 | """ | |
54f9ee45 | 10852 | return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs) |
e811c8ce RD |
10853 | |
10854 | def FindItemAtPoint(*args, **kwargs): | |
248ed943 RD |
10855 | """ |
10856 | FindItemAtPoint(self, Point pt) -> GBSizerItem | |
10857 | ||
10858 | Return the sizer item located at the point given in *pt*, or None if | |
10859 | there is no item at that point. The (x,y) coordinates in pt correspond | |
10860 | to the client coordinates of the window using the sizer for | |
10861 | layout. (non-recursive) | |
10862 | """ | |
54f9ee45 | 10863 | return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs) |
e811c8ce | 10864 | |
248ed943 RD |
10865 | def CheckForIntersection(*args, **kwargs): |
10866 | """ | |
10867 | CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool | |
e811c8ce | 10868 | |
248ed943 RD |
10869 | Look at all items and see if any intersect (or would overlap) the |
10870 | given *item*. Returns True if so, False if there would be no overlap. | |
10871 | If an *excludeItem* is given then it will not be checked for | |
10872 | intersection, for example it may be the item we are checking the | |
10873 | position of. | |
e811c8ce | 10874 | |
248ed943 RD |
10875 | """ |
10876 | return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs) | |
e811c8ce | 10877 | |
248ed943 | 10878 | def CheckForIntersectionPos(*args, **kwargs): |
0df68c9f | 10879 | """ |
248ed943 RD |
10880 | CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool |
10881 | ||
10882 | Look at all items and see if any intersect (or would overlap) the | |
10883 | given position and span. Returns True if so, False if there would be | |
10884 | no overlap. If an *excludeItem* is given then it will not be checked | |
10885 | for intersection, for example it may be the item we are checking the | |
10886 | position of. | |
0df68c9f | 10887 | """ |
248ed943 | 10888 | return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs) |
e811c8ce | 10889 | |
d14a1e28 RD |
10890 | |
10891 | class GridBagSizerPtr(GridBagSizer): | |
10892 | def __init__(self, this): | |
10893 | self.this = this | |
10894 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10895 | self.__class__ = GridBagSizer | |
54f9ee45 | 10896 | _core_.GridBagSizer_swigregister(GridBagSizerPtr) |
d14a1e28 RD |
10897 | |
10898 | #--------------------------------------------------------------------------- | |
10899 | ||
54f9ee45 RD |
10900 | Left = _core_.Left |
10901 | Top = _core_.Top | |
10902 | Right = _core_.Right | |
10903 | Bottom = _core_.Bottom | |
10904 | Width = _core_.Width | |
10905 | Height = _core_.Height | |
10906 | Centre = _core_.Centre | |
10907 | Center = _core_.Center | |
10908 | CentreX = _core_.CentreX | |
10909 | CentreY = _core_.CentreY | |
10910 | Unconstrained = _core_.Unconstrained | |
10911 | AsIs = _core_.AsIs | |
10912 | PercentOf = _core_.PercentOf | |
10913 | Above = _core_.Above | |
10914 | Below = _core_.Below | |
10915 | LeftOf = _core_.LeftOf | |
10916 | RightOf = _core_.RightOf | |
10917 | SameAs = _core_.SameAs | |
10918 | Absolute = _core_.Absolute | |
d14a1e28 | 10919 | class IndividualLayoutConstraint(Object): |
15afbcd0 | 10920 | """ |
41e2b43e RD |
10921 | Objects of this class are stored in the `wx.LayoutConstraints` class as |
10922 | one of eight possible constraints that a window can be involved in. | |
10923 | You will never need to create an instance of | |
10924 | wx.IndividualLayoutConstraint, rather you should create a | |
10925 | `wx.LayoutConstraints` instance and use the individual contstraints | |
15afbcd0 | 10926 | that it contains. |
15afbcd0 | 10927 | """ |
d14a1e28 RD |
10928 | def __init__(self): raise RuntimeError, "No constructor defined" |
10929 | def __repr__(self): | |
10930 | return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 10931 | def Set(*args, **kwargs): |
41e2b43e RD |
10932 | """ |
10933 | Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN) | |
10934 | ||
10935 | Sets the properties of the constraint. Normally called by one of the | |
10936 | convenience functions such as Above, RightOf, SameAs. | |
10937 | """ | |
54f9ee45 | 10938 | return _core_.IndividualLayoutConstraint_Set(*args, **kwargs) |
e811c8ce RD |
10939 | |
10940 | def LeftOf(*args, **kwargs): | |
15afbcd0 | 10941 | """ |
a95a7133 | 10942 | LeftOf(self, Window sibling, int marg=0) |
15afbcd0 | 10943 | |
41e2b43e RD |
10944 | Constrains this edge to be to the left of the given window, with an |
10945 | optional margin. Implicitly, this is relative to the left edge of the | |
10946 | other window. | |
15afbcd0 | 10947 | """ |
54f9ee45 | 10948 | return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs) |
e811c8ce RD |
10949 | |
10950 | def RightOf(*args, **kwargs): | |
15afbcd0 | 10951 | """ |
a95a7133 | 10952 | RightOf(self, Window sibling, int marg=0) |
15afbcd0 | 10953 | |
41e2b43e RD |
10954 | Constrains this edge to be to the right of the given window, with an |
10955 | optional margin. Implicitly, this is relative to the right edge of the | |
10956 | other window. | |
15afbcd0 | 10957 | """ |
54f9ee45 | 10958 | return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs) |
e811c8ce RD |
10959 | |
10960 | def Above(*args, **kwargs): | |
15afbcd0 | 10961 | """ |
a95a7133 | 10962 | Above(self, Window sibling, int marg=0) |
15afbcd0 | 10963 | |
41e2b43e RD |
10964 | Constrains this edge to be above the given window, with an optional |
10965 | margin. Implicitly, this is relative to the top edge of the other | |
10966 | window. | |
15afbcd0 | 10967 | """ |
54f9ee45 | 10968 | return _core_.IndividualLayoutConstraint_Above(*args, **kwargs) |
e811c8ce RD |
10969 | |
10970 | def Below(*args, **kwargs): | |
15afbcd0 | 10971 | """ |
a95a7133 | 10972 | Below(self, Window sibling, int marg=0) |
15afbcd0 | 10973 | |
41e2b43e RD |
10974 | Constrains this edge to be below the given window, with an optional |
10975 | margin. Implicitly, this is relative to the bottom edge of the other | |
10976 | window. | |
15afbcd0 | 10977 | """ |
54f9ee45 | 10978 | return _core_.IndividualLayoutConstraint_Below(*args, **kwargs) |
e811c8ce RD |
10979 | |
10980 | def SameAs(*args, **kwargs): | |
15afbcd0 | 10981 | """ |
a95a7133 | 10982 | SameAs(self, Window otherW, int edge, int marg=0) |
15afbcd0 | 10983 | |
41e2b43e RD |
10984 | Constrains this edge or dimension to be to the same as the edge of the |
10985 | given window, with an optional margin. | |
15afbcd0 | 10986 | """ |
54f9ee45 | 10987 | return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs) |
e811c8ce RD |
10988 | |
10989 | def PercentOf(*args, **kwargs): | |
15afbcd0 | 10990 | """ |
a95a7133 | 10991 | PercentOf(self, Window otherW, int wh, int per) |
15afbcd0 | 10992 | |
41e2b43e RD |
10993 | Constrains this edge or dimension to be to a percentage of the given |
10994 | window, with an optional margin. | |
15afbcd0 | 10995 | """ |
54f9ee45 | 10996 | return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs) |
e811c8ce RD |
10997 | |
10998 | def Absolute(*args, **kwargs): | |
15afbcd0 | 10999 | """ |
a95a7133 | 11000 | Absolute(self, int val) |
15afbcd0 | 11001 | |
41e2b43e | 11002 | Constrains this edge or dimension to be the given absolute value. |
15afbcd0 | 11003 | """ |
54f9ee45 | 11004 | return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs) |
e811c8ce RD |
11005 | |
11006 | def Unconstrained(*args, **kwargs): | |
15afbcd0 | 11007 | """ |
a95a7133 | 11008 | Unconstrained(self) |
15afbcd0 | 11009 | |
41e2b43e RD |
11010 | Sets this edge or dimension to be unconstrained, that is, dependent on |
11011 | other edges and dimensions from which this value can be deduced. | |
15afbcd0 | 11012 | """ |
54f9ee45 | 11013 | return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs) |
e811c8ce RD |
11014 | |
11015 | def AsIs(*args, **kwargs): | |
15afbcd0 | 11016 | """ |
a95a7133 | 11017 | AsIs(self) |
15afbcd0 | 11018 | |
41e2b43e RD |
11019 | Sets this edge or constraint to be whatever the window's value is at |
11020 | the moment. If either of the width and height constraints are *as is*, | |
11021 | the window will not be resized, but moved instead. This is important | |
11022 | when considering panel items which are intended to have a default | |
11023 | size, such as a button, which may take its size from the size of the | |
11024 | button label. | |
15afbcd0 | 11025 | """ |
54f9ee45 | 11026 | return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs) |
e811c8ce RD |
11027 | |
11028 | def GetOtherWindow(*args, **kwargs): | |
a95a7133 | 11029 | """GetOtherWindow(self) -> Window""" |
54f9ee45 | 11030 | return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs) |
e811c8ce RD |
11031 | |
11032 | def GetMyEdge(*args, **kwargs): | |
a95a7133 | 11033 | """GetMyEdge(self) -> int""" |
54f9ee45 | 11034 | return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs) |
e811c8ce RD |
11035 | |
11036 | def SetEdge(*args, **kwargs): | |
a95a7133 | 11037 | """SetEdge(self, int which)""" |
54f9ee45 | 11038 | return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs) |
e811c8ce RD |
11039 | |
11040 | def SetValue(*args, **kwargs): | |
a95a7133 | 11041 | """SetValue(self, int v)""" |
54f9ee45 | 11042 | return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs) |
e811c8ce RD |
11043 | |
11044 | def GetMargin(*args, **kwargs): | |
a95a7133 | 11045 | """GetMargin(self) -> int""" |
54f9ee45 | 11046 | return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs) |
e811c8ce RD |
11047 | |
11048 | def SetMargin(*args, **kwargs): | |
a95a7133 | 11049 | """SetMargin(self, int m)""" |
54f9ee45 | 11050 | return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs) |
e811c8ce RD |
11051 | |
11052 | def GetValue(*args, **kwargs): | |
a95a7133 | 11053 | """GetValue(self) -> int""" |
54f9ee45 | 11054 | return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs) |
e811c8ce RD |
11055 | |
11056 | def GetPercent(*args, **kwargs): | |
a95a7133 | 11057 | """GetPercent(self) -> int""" |
54f9ee45 | 11058 | return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs) |
e811c8ce RD |
11059 | |
11060 | def GetOtherEdge(*args, **kwargs): | |
a95a7133 | 11061 | """GetOtherEdge(self) -> int""" |
54f9ee45 | 11062 | return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs) |
e811c8ce RD |
11063 | |
11064 | def GetDone(*args, **kwargs): | |
a95a7133 | 11065 | """GetDone(self) -> bool""" |
54f9ee45 | 11066 | return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs) |
e811c8ce RD |
11067 | |
11068 | def SetDone(*args, **kwargs): | |
a95a7133 | 11069 | """SetDone(self, bool d)""" |
54f9ee45 | 11070 | return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs) |
e811c8ce RD |
11071 | |
11072 | def GetRelationship(*args, **kwargs): | |
a95a7133 | 11073 | """GetRelationship(self) -> int""" |
54f9ee45 | 11074 | return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs) |
e811c8ce RD |
11075 | |
11076 | def SetRelationship(*args, **kwargs): | |
a95a7133 | 11077 | """SetRelationship(self, int r)""" |
54f9ee45 | 11078 | return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs) |
e811c8ce RD |
11079 | |
11080 | def ResetIfWin(*args, **kwargs): | |
15afbcd0 | 11081 | """ |
a95a7133 | 11082 | ResetIfWin(self, Window otherW) -> bool |
15afbcd0 RD |
11083 | |
11084 | Reset constraint if it mentions otherWin | |
11085 | """ | |
54f9ee45 | 11086 | return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs) |
e811c8ce RD |
11087 | |
11088 | def SatisfyConstraint(*args, **kwargs): | |
15afbcd0 | 11089 | """ |
a95a7133 | 11090 | SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool |
15afbcd0 RD |
11091 | |
11092 | Try to satisfy constraint | |
11093 | """ | |
54f9ee45 | 11094 | return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs) |
e811c8ce RD |
11095 | |
11096 | def GetEdge(*args, **kwargs): | |
15afbcd0 | 11097 | """ |
a95a7133 | 11098 | GetEdge(self, int which, Window thisWin, Window other) -> int |
15afbcd0 RD |
11099 | |
11100 | Get the value of this edge or dimension, or if this | |
11101 | is not determinable, -1. | |
11102 | """ | |
54f9ee45 | 11103 | return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs) |
e811c8ce | 11104 | |
d14a1e28 RD |
11105 | |
11106 | class IndividualLayoutConstraintPtr(IndividualLayoutConstraint): | |
11107 | def __init__(self, this): | |
11108 | self.this = this | |
11109 | if not hasattr(self,"thisown"): self.thisown = 0 | |
11110 | self.__class__ = IndividualLayoutConstraint | |
54f9ee45 | 11111 | _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr) |
d14a1e28 RD |
11112 | |
11113 | class LayoutConstraints(Object): | |
15afbcd0 | 11114 | """ |
41e2b43e RD |
11115 | **Note:** constraints are now deprecated and you should use sizers |
11116 | instead. | |
15afbcd0 | 11117 | |
41e2b43e RD |
11118 | Objects of this class can be associated with a window to define its |
11119 | layout constraints, with respect to siblings or its parent. | |
15afbcd0 RD |
11120 | |
11121 | The class consists of the following eight constraints of class | |
11122 | wx.IndividualLayoutConstraint, some or all of which should be accessed | |
11123 | directly to set the appropriate constraints. | |
11124 | ||
11125 | * left: represents the left hand edge of the window | |
11126 | * right: represents the right hand edge of the window | |
11127 | * top: represents the top edge of the window | |
11128 | * bottom: represents the bottom edge of the window | |
11129 | * width: represents the width of the window | |
11130 | * height: represents the height of the window | |
11131 | * centreX: represents the horizontal centre point of the window | |
11132 | * centreY: represents the vertical centre point of the window | |
11133 | ||
41e2b43e RD |
11134 | Most constraints are initially set to have the relationship |
11135 | wxUnconstrained, which means that their values should be calculated by | |
11136 | looking at known constraints. The exceptions are width and height, | |
11137 | which are set to wxAsIs to ensure that if the user does not specify a | |
11138 | constraint, the existing width and height will be used, to be | |
11139 | compatible with panel items which often have take a default size. If | |
11140 | the constraint is ``wx.AsIs``, the dimension will not be changed. | |
11141 | ||
11142 | :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints` | |
15afbcd0 RD |
11143 | |
11144 | """ | |
e811c8ce RD |
11145 | def __repr__(self): |
11146 | return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
11147 | left = property(_core_.LayoutConstraints_left_get) |
11148 | top = property(_core_.LayoutConstraints_top_get) | |
11149 | right = property(_core_.LayoutConstraints_right_get) | |
11150 | bottom = property(_core_.LayoutConstraints_bottom_get) | |
11151 | width = property(_core_.LayoutConstraints_width_get) | |
11152 | height = property(_core_.LayoutConstraints_height_get) | |
11153 | centreX = property(_core_.LayoutConstraints_centreX_get) | |
11154 | centreY = property(_core_.LayoutConstraints_centreY_get) | |
d14a1e28 | 11155 | def __init__(self, *args, **kwargs): |
a95a7133 | 11156 | """__init__(self) -> LayoutConstraints""" |
54f9ee45 | 11157 | newobj = _core_.new_LayoutConstraints(*args, **kwargs) |
d14a1e28 RD |
11158 | self.this = newobj.this |
11159 | self.thisown = 1 | |
11160 | del newobj.thisown | |
e811c8ce | 11161 | def SatisfyConstraints(*args, **kwargs): |
6c3b4aae | 11162 | """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)""" |
54f9ee45 | 11163 | return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs) |
e811c8ce RD |
11164 | |
11165 | def AreSatisfied(*args, **kwargs): | |
a95a7133 | 11166 | """AreSatisfied(self) -> bool""" |
54f9ee45 | 11167 | return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs) |
e811c8ce | 11168 | |
d14a1e28 RD |
11169 | |
11170 | class LayoutConstraintsPtr(LayoutConstraints): | |
11171 | def __init__(self, this): | |
11172 | self.this = this | |
11173 | if not hasattr(self,"thisown"): self.thisown = 0 | |
11174 | self.__class__ = LayoutConstraints | |
54f9ee45 | 11175 | _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr) |
d14a1e28 RD |
11176 | |
11177 | #---------------------------------------------------------------------------- | |
11178 | ||
322913ce | 11179 | # Use Python's bool constants if available, make some if not |
d14a1e28 RD |
11180 | try: |
11181 | True | |
11182 | except NameError: | |
322913ce RD |
11183 | __builtins__.True = 1==1 |
11184 | __builtins__.False = 1==0 | |
4f89f6a3 RD |
11185 | def bool(value): return not not value |
11186 | __builtins__.bool = bool | |
d14a1e28 | 11187 | |
d14a1e28 RD |
11188 | |
11189 | ||
11190 | # workarounds for bad wxRTTI names | |
11191 | __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge' | |
11192 | __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider' | |
11193 | __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar' | |
11194 | ||
11195 | ||
11196 | #---------------------------------------------------------------------------- | |
11197 | # Load version numbers from __version__... Ensure that major and minor | |
7bc1e663 | 11198 | # versions are the same for both wxPython and wxWidgets. |
d14a1e28 RD |
11199 | |
11200 | from __version__ import * | |
11201 | __version__ = VERSION_STRING | |
11202 | ||
7bc1e663 RD |
11203 | assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch" |
11204 | assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch" | |
54f9ee45 | 11205 | if RELEASE_VERSION != _core_.RELEASE_VERSION: |
d14a1e28 | 11206 | import warnings |
7bc1e663 | 11207 | warnings.warn("wxPython/wxWidgets release number mismatch") |
d14a1e28 RD |
11208 | |
11209 | #---------------------------------------------------------------------------- | |
11210 | ||
e505d15e RD |
11211 | # Set the default string<-->unicode conversion encoding from the |
11212 | # locale. This encoding is used when string or unicode objects need | |
11213 | # to be converted in order to pass them to wxWidgets. Please be aware | |
11214 | # that the default encoding within the same locale may be slightly | |
11215 | # different on different platforms. For example, please see | |
11216 | # http://www.alanwood.net/demos/charsetdiffs.html for differences | |
11217 | # between the common latin/roman encodings. | |
5cbf236d | 11218 | import locale |
061d64dd RD |
11219 | try: |
11220 | default = locale.getdefaultlocale()[1] | |
11221 | except ValueError: | |
11222 | default = "iso8859-1" | |
5cbf236d RD |
11223 | if default: |
11224 | wx.SetDefaultPyEncoding(default) | |
11225 | del default | |
11226 | del locale | |
11227 | ||
11228 | #---------------------------------------------------------------------------- | |
11229 | ||
d14a1e28 RD |
11230 | class PyDeadObjectError(AttributeError): |
11231 | pass | |
11232 | ||
d14a1e28 RD |
11233 | class _wxPyDeadObject(object): |
11234 | """ | |
11235 | Instances of wx objects that are OOR capable will have their __class__ | |
11236 | changed to this class when the C++ object is deleted. This should help | |
11237 | prevent crashes due to referencing a bogus C++ pointer. | |
11238 | """ | |
11239 | reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)" | |
11240 | attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed." | |
11241 | ||
3a04f143 | 11242 | def __repr__(self): |
d14a1e28 RD |
11243 | if not hasattr(self, "_name"): |
11244 | self._name = "[unknown]" | |
11245 | return self.reprStr % self._name | |
11246 | ||
3a04f143 | 11247 | def __getattr__(self, *args): |
d14a1e28 RD |
11248 | if not hasattr(self, "_name"): |
11249 | self._name = "[unknown]" | |
3a04f143 RD |
11250 | raise PyDeadObjectError(self.attrStr % self._name) |
11251 | ||
11252 | def __nonzero__(self): | |
11253 | return 0 | |
11254 | ||
11255 | ||
11256 | ||
11257 | class PyUnbornObjectError(AttributeError): | |
11258 | pass | |
11259 | ||
11260 | class _wxPyUnbornObject(object): | |
11261 | """ | |
54f9ee45 | 11262 | Some stock objects are created when the wx._core module is |
3a04f143 RD |
11263 | imported, but their C++ instance is not created until the wx.App |
11264 | object is created and initialized. These object instances will | |
11265 | temporarily have their __class__ changed to this class so an | |
11266 | exception will be raised if they are used before the C++ instance | |
11267 | is ready. | |
11268 | """ | |
11269 | ||
11270 | reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)" | |
11271 | attrStr = "The C++ part of this object has not been initialized, attribute access not allowed." | |
11272 | ||
11273 | def __repr__(self): | |
11274 | #if not hasattr(self, "_name"): | |
11275 | # self._name = "[unknown]" | |
11276 | return self.reprStr #% self._name | |
11277 | ||
11278 | def __getattr__(self, *args): | |
11279 | #if not hasattr(self, "_name"): | |
11280 | # self._name = "[unknown]" | |
11281 | raise PyUnbornObjectError(self.attrStr) # % self._name ) | |
d14a1e28 RD |
11282 | |
11283 | def __nonzero__(self): | |
11284 | return 0 | |
11285 | ||
11286 | ||
11287 | #---------------------------------------------------------------------------- | |
d14a1e28 RD |
11288 | |
11289 | def CallAfter(callable, *args, **kw): | |
11290 | """ | |
11291 | Call the specified function after the current and pending event | |
11292 | handlers have been completed. This is also good for making GUI | |
61863841 RD |
11293 | method calls from non-GUI threads. Any extra positional or |
11294 | keyword args are passed on to the callable when it is called. | |
11295 | ||
11296 | :see: `wx.FutureCall` | |
d14a1e28 RD |
11297 | """ |
11298 | app = wx.GetApp() | |
dfbb5885 | 11299 | assert app is not None, 'No wx.App created yet' |
d14a1e28 | 11300 | |
148275d3 RD |
11301 | if not hasattr(app, "_CallAfterId"): |
11302 | app._CallAfterId = wx.NewEventType() | |
11303 | app.Connect(-1, -1, app._CallAfterId, | |
11304 | lambda event: event.callable(*event.args, **event.kw) ) | |
d14a1e28 | 11305 | evt = wx.PyEvent() |
148275d3 | 11306 | evt.SetEventType(app._CallAfterId) |
d14a1e28 RD |
11307 | evt.callable = callable |
11308 | evt.args = args | |
11309 | evt.kw = kw | |
11310 | wx.PostEvent(app, evt) | |
11311 | ||
d14a1e28 RD |
11312 | #---------------------------------------------------------------------------- |
11313 | ||
11314 | ||
11315 | class FutureCall: | |
11316 | """ | |
8ac8dba0 | 11317 | A convenience class for `wx.Timer`, that calls the given callable |
d14a1e28 RD |
11318 | object once after the given amount of milliseconds, passing any |
11319 | positional or keyword args. The return value of the callable is | |
61863841 | 11320 | availbale after it has been run with the `GetResult` method. |
d14a1e28 RD |
11321 | |
11322 | If you don't need to get the return value or restart the timer | |
11323 | then there is no need to hold a reference to this object. It will | |
11324 | hold a reference to itself while the timer is running (the timer | |
11325 | has a reference to self.Notify) but the cycle will be broken when | |
11326 | the timer completes, automatically cleaning up the wx.FutureCall | |
11327 | object. | |
61863841 RD |
11328 | |
11329 | :see: `wx.CallAfter` | |
d14a1e28 RD |
11330 | """ |
11331 | def __init__(self, millis, callable, *args, **kwargs): | |
11332 | self.millis = millis | |
11333 | self.callable = callable | |
11334 | self.SetArgs(*args, **kwargs) | |
11335 | self.runCount = 0 | |
4276dc52 | 11336 | self.running = False |
d14a1e28 RD |
11337 | self.hasRun = False |
11338 | self.result = None | |
11339 | self.timer = None | |
11340 | self.Start() | |
11341 | ||
11342 | def __del__(self): | |
11343 | self.Stop() | |
11344 | ||
11345 | ||
11346 | def Start(self, millis=None, *args, **kwargs): | |
11347 | """ | |
11348 | (Re)start the timer | |
11349 | """ | |
11350 | self.hasRun = False | |
11351 | if millis is not None: | |
11352 | self.millis = millis | |
11353 | if args or kwargs: | |
11354 | self.SetArgs(*args, **kwargs) | |
11355 | self.Stop() | |
11356 | self.timer = wx.PyTimer(self.Notify) | |
11357 | self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) | |
4276dc52 | 11358 | self.running = True |
d14a1e28 RD |
11359 | Restart = Start |
11360 | ||
11361 | ||
11362 | def Stop(self): | |
11363 | """ | |
11364 | Stop and destroy the timer. | |
11365 | """ | |
11366 | if self.timer is not None: | |
11367 | self.timer.Stop() | |
11368 | self.timer = None | |
11369 | ||
11370 | ||
11371 | def GetInterval(self): | |
11372 | if self.timer is not None: | |
11373 | return self.timer.GetInterval() | |
11374 | else: | |
11375 | return 0 | |
11376 | ||
11377 | ||
11378 | def IsRunning(self): | |
11379 | return self.timer is not None and self.timer.IsRunning() | |
11380 | ||
11381 | ||
11382 | def SetArgs(self, *args, **kwargs): | |
11383 | """ | |
11384 | (Re)set the args passed to the callable object. This is | |
11385 | useful in conjunction with Restart if you want to schedule a | |
11386 | new call to the same callable object but with different | |
11387 | parameters. | |
11388 | """ | |
11389 | self.args = args | |
11390 | self.kwargs = kwargs | |
11391 | ||
11392 | ||
11393 | def HasRun(self): | |
11394 | return self.hasRun | |
11395 | ||
11396 | def GetResult(self): | |
11397 | return self.result | |
11398 | ||
11399 | def Notify(self): | |
11400 | """ | |
11401 | The timer has expired so call the callable. | |
11402 | """ | |
11403 | if self.callable and getattr(self.callable, 'im_self', True): | |
11404 | self.runCount += 1 | |
4276dc52 | 11405 | self.running = False |
d14a1e28 RD |
11406 | self.result = self.callable(*self.args, **self.kwargs) |
11407 | self.hasRun = True | |
4276dc52 RD |
11408 | if not self.running: |
11409 | # if it wasn't restarted, then cleanup | |
11410 | wx.CallAfter(self.Stop) | |
d14a1e28 RD |
11411 | |
11412 | ||
a95a7133 RD |
11413 | |
11414 | #---------------------------------------------------------------------------- | |
11415 | # Control which items in this module should be documented by epydoc. | |
11416 | # We allow only classes and functions, which will help reduce the size | |
11417 | # of the docs by filtering out the zillions of constants, EVT objects, | |
11418 | # and etc that don't make much sense by themselves, but are instead | |
11419 | # documented (or will be) as part of the classes/functions/methods | |
11420 | # where they should be used. | |
11421 | ||
66c033b4 RD |
11422 | class __DocFilter: |
11423 | """ | |
11424 | A filter for epydoc that only allows non-Ptr classes and | |
11425 | fucntions, in order to reduce the clutter in the API docs. | |
11426 | """ | |
11427 | def __init__(self, globals): | |
11428 | self._globals = globals | |
11429 | ||
11430 | def __call__(self, name): | |
11431 | import types | |
11432 | obj = self._globals.get(name, None) | |
11433 | if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]: | |
11434 | return False | |
11435 | if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'): | |
11436 | return False | |
11437 | return True | |
a95a7133 | 11438 | |
d14a1e28 RD |
11439 | #---------------------------------------------------------------------------- |
11440 | #---------------------------------------------------------------------------- | |
11441 | ||
11442 | # Import other modules in this package that should show up in the | |
11443 | # "core" wx namespace | |
54f9ee45 RD |
11444 | from _gdi import * |
11445 | from _windows import * | |
11446 | from _controls import * | |
11447 | from _misc import * | |
d14a1e28 | 11448 | |
3a04f143 RD |
11449 | |
11450 | # Fixup the stock objects since they can't be used yet. (They will be | |
11451 | # restored in wx.PyApp.OnInit.) | |
54f9ee45 | 11452 | _core_._wxPyFixStockObjects() |
3a04f143 | 11453 | |
d14a1e28 RD |
11454 | #---------------------------------------------------------------------------- |
11455 | #---------------------------------------------------------------------------- | |
11456 | ||
11457 |