]>
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 | |
94 | ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN | |
95 | ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM | |
96 | ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT | |
97 | ED_STATIC_LINE = _core_.ED_STATIC_LINE | |
98 | EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE | |
99 | CLIP_CHILDREN = _core_.CLIP_CHILDREN | |
100 | CLIP_SIBLINGS = _core_.CLIP_SIBLINGS | |
101 | ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB | |
102 | RETAINED = _core_.RETAINED | |
103 | BACKINGSTORE = _core_.BACKINGSTORE | |
104 | COLOURED = _core_.COLOURED | |
105 | FIXED_LENGTH = _core_.FIXED_LENGTH | |
106 | LB_NEEDED_SB = _core_.LB_NEEDED_SB | |
107 | LB_ALWAYS_SB = _core_.LB_ALWAYS_SB | |
108 | LB_SORT = _core_.LB_SORT | |
109 | LB_SINGLE = _core_.LB_SINGLE | |
110 | LB_MULTIPLE = _core_.LB_MULTIPLE | |
111 | LB_EXTENDED = _core_.LB_EXTENDED | |
112 | LB_OWNERDRAW = _core_.LB_OWNERDRAW | |
113 | LB_HSCROLL = _core_.LB_HSCROLL | |
114 | PROCESS_ENTER = _core_.PROCESS_ENTER | |
115 | PASSWORD = _core_.PASSWORD | |
116 | CB_SIMPLE = _core_.CB_SIMPLE | |
117 | CB_DROPDOWN = _core_.CB_DROPDOWN | |
118 | CB_SORT = _core_.CB_SORT | |
119 | CB_READONLY = _core_.CB_READONLY | |
120 | RA_HORIZONTAL = _core_.RA_HORIZONTAL | |
121 | RA_VERTICAL = _core_.RA_VERTICAL | |
122 | RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS | |
123 | RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS | |
124 | RB_GROUP = _core_.RB_GROUP | |
125 | RB_SINGLE = _core_.RB_SINGLE | |
126 | SL_HORIZONTAL = _core_.SL_HORIZONTAL | |
127 | SL_VERTICAL = _core_.SL_VERTICAL | |
128 | SL_AUTOTICKS = _core_.SL_AUTOTICKS | |
129 | SL_LABELS = _core_.SL_LABELS | |
130 | SL_LEFT = _core_.SL_LEFT | |
131 | SL_TOP = _core_.SL_TOP | |
132 | SL_RIGHT = _core_.SL_RIGHT | |
133 | SL_BOTTOM = _core_.SL_BOTTOM | |
134 | SL_BOTH = _core_.SL_BOTH | |
135 | SL_SELRANGE = _core_.SL_SELRANGE | |
136 | SB_HORIZONTAL = _core_.SB_HORIZONTAL | |
137 | SB_VERTICAL = _core_.SB_VERTICAL | |
138 | ST_SIZEGRIP = _core_.ST_SIZEGRIP | |
139 | ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE | |
140 | FLOOD_SURFACE = _core_.FLOOD_SURFACE | |
141 | FLOOD_BORDER = _core_.FLOOD_BORDER | |
142 | ODDEVEN_RULE = _core_.ODDEVEN_RULE | |
143 | WINDING_RULE = _core_.WINDING_RULE | |
144 | TOOL_TOP = _core_.TOOL_TOP | |
145 | TOOL_BOTTOM = _core_.TOOL_BOTTOM | |
146 | TOOL_LEFT = _core_.TOOL_LEFT | |
147 | TOOL_RIGHT = _core_.TOOL_RIGHT | |
148 | OK = _core_.OK | |
149 | YES_NO = _core_.YES_NO | |
150 | CANCEL = _core_.CANCEL | |
151 | YES = _core_.YES | |
152 | NO = _core_.NO | |
153 | NO_DEFAULT = _core_.NO_DEFAULT | |
154 | YES_DEFAULT = _core_.YES_DEFAULT | |
155 | ICON_EXCLAMATION = _core_.ICON_EXCLAMATION | |
156 | ICON_HAND = _core_.ICON_HAND | |
157 | ICON_QUESTION = _core_.ICON_QUESTION | |
158 | ICON_INFORMATION = _core_.ICON_INFORMATION | |
159 | ICON_STOP = _core_.ICON_STOP | |
160 | ICON_ASTERISK = _core_.ICON_ASTERISK | |
161 | ICON_MASK = _core_.ICON_MASK | |
162 | ICON_WARNING = _core_.ICON_WARNING | |
163 | ICON_ERROR = _core_.ICON_ERROR | |
164 | FORWARD = _core_.FORWARD | |
165 | BACKWARD = _core_.BACKWARD | |
166 | RESET = _core_.RESET | |
167 | HELP = _core_.HELP | |
168 | MORE = _core_.MORE | |
169 | SETUP = _core_.SETUP | |
170 | SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH | |
171 | SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT | |
172 | SIZE_AUTO = _core_.SIZE_AUTO | |
173 | SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING | |
174 | SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE | |
175 | PORTRAIT = _core_.PORTRAIT | |
176 | LANDSCAPE = _core_.LANDSCAPE | |
177 | PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH | |
178 | PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM | |
179 | PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW | |
180 | PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT | |
181 | ID_ANY = _core_.ID_ANY | |
182 | ID_SEPARATOR = _core_.ID_SEPARATOR | |
183 | ID_LOWEST = _core_.ID_LOWEST | |
184 | ID_OPEN = _core_.ID_OPEN | |
185 | ID_CLOSE = _core_.ID_CLOSE | |
186 | ID_NEW = _core_.ID_NEW | |
187 | ID_SAVE = _core_.ID_SAVE | |
188 | ID_SAVEAS = _core_.ID_SAVEAS | |
189 | ID_REVERT = _core_.ID_REVERT | |
190 | ID_EXIT = _core_.ID_EXIT | |
191 | ID_UNDO = _core_.ID_UNDO | |
192 | ID_REDO = _core_.ID_REDO | |
193 | ID_HELP = _core_.ID_HELP | |
194 | ID_PRINT = _core_.ID_PRINT | |
195 | ID_PRINT_SETUP = _core_.ID_PRINT_SETUP | |
196 | ID_PREVIEW = _core_.ID_PREVIEW | |
197 | ID_ABOUT = _core_.ID_ABOUT | |
198 | ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS | |
199 | ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS | |
200 | ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES | |
201 | ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT | |
202 | ID_CLOSE_ALL = _core_.ID_CLOSE_ALL | |
203 | ID_PREFERENCES = _core_.ID_PREFERENCES | |
204 | ID_CUT = _core_.ID_CUT | |
205 | ID_COPY = _core_.ID_COPY | |
206 | ID_PASTE = _core_.ID_PASTE | |
207 | ID_CLEAR = _core_.ID_CLEAR | |
208 | ID_FIND = _core_.ID_FIND | |
209 | ID_DUPLICATE = _core_.ID_DUPLICATE | |
210 | ID_SELECTALL = _core_.ID_SELECTALL | |
211 | ID_DELETE = _core_.ID_DELETE | |
212 | ID_REPLACE = _core_.ID_REPLACE | |
213 | ID_REPLACE_ALL = _core_.ID_REPLACE_ALL | |
214 | ID_PROPERTIES = _core_.ID_PROPERTIES | |
215 | ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS | |
216 | ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS | |
217 | ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS | |
218 | ID_VIEW_LIST = _core_.ID_VIEW_LIST | |
219 | ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE | |
220 | ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME | |
221 | ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE | |
222 | ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE | |
223 | ID_FILE1 = _core_.ID_FILE1 | |
224 | ID_FILE2 = _core_.ID_FILE2 | |
225 | ID_FILE3 = _core_.ID_FILE3 | |
226 | ID_FILE4 = _core_.ID_FILE4 | |
227 | ID_FILE5 = _core_.ID_FILE5 | |
228 | ID_FILE6 = _core_.ID_FILE6 | |
229 | ID_FILE7 = _core_.ID_FILE7 | |
230 | ID_FILE8 = _core_.ID_FILE8 | |
231 | ID_FILE9 = _core_.ID_FILE9 | |
232 | ID_OK = _core_.ID_OK | |
233 | ID_CANCEL = _core_.ID_CANCEL | |
234 | ID_APPLY = _core_.ID_APPLY | |
235 | ID_YES = _core_.ID_YES | |
236 | ID_NO = _core_.ID_NO | |
237 | ID_STATIC = _core_.ID_STATIC | |
238 | ID_FORWARD = _core_.ID_FORWARD | |
239 | ID_BACKWARD = _core_.ID_BACKWARD | |
240 | ID_DEFAULT = _core_.ID_DEFAULT | |
241 | ID_MORE = _core_.ID_MORE | |
242 | ID_SETUP = _core_.ID_SETUP | |
243 | ID_RESET = _core_.ID_RESET | |
244 | ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP | |
245 | ID_YESTOALL = _core_.ID_YESTOALL | |
246 | ID_NOTOALL = _core_.ID_NOTOALL | |
247 | ID_ABORT = _core_.ID_ABORT | |
248 | ID_RETRY = _core_.ID_RETRY | |
249 | ID_IGNORE = _core_.ID_IGNORE | |
7bc1e663 RD |
250 | ID_ADD = _core_.ID_ADD |
251 | ID_REMOVE = _core_.ID_REMOVE | |
252 | ID_UP = _core_.ID_UP | |
253 | ID_DOWN = _core_.ID_DOWN | |
254 | ID_HOME = _core_.ID_HOME | |
255 | ID_REFRESH = _core_.ID_REFRESH | |
256 | ID_STOP = _core_.ID_STOP | |
257 | ID_INDEX = _core_.ID_INDEX | |
258 | ID_BOLD = _core_.ID_BOLD | |
259 | ID_ITALIC = _core_.ID_ITALIC | |
260 | ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER | |
261 | ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL | |
262 | ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT | |
263 | ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT | |
264 | ID_UNDERLINE = _core_.ID_UNDERLINE | |
265 | ID_INDENT = _core_.ID_INDENT | |
266 | ID_UNINDENT = _core_.ID_UNINDENT | |
267 | ID_ZOOM_100 = _core_.ID_ZOOM_100 | |
268 | ID_ZOOM_FIT = _core_.ID_ZOOM_FIT | |
269 | ID_ZOOM_IN = _core_.ID_ZOOM_IN | |
270 | ID_ZOOM_OUT = _core_.ID_ZOOM_OUT | |
271 | ID_UNDELETE = _core_.ID_UNDELETE | |
272 | ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED | |
54f9ee45 RD |
273 | ID_HIGHEST = _core_.ID_HIGHEST |
274 | OPEN = _core_.OPEN | |
275 | SAVE = _core_.SAVE | |
276 | HIDE_READONLY = _core_.HIDE_READONLY | |
277 | OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT | |
278 | FILE_MUST_EXIST = _core_.FILE_MUST_EXIST | |
279 | MULTIPLE = _core_.MULTIPLE | |
280 | CHANGE_DIR = _core_.CHANGE_DIR | |
281 | ACCEL_ALT = _core_.ACCEL_ALT | |
282 | ACCEL_CTRL = _core_.ACCEL_CTRL | |
283 | ACCEL_SHIFT = _core_.ACCEL_SHIFT | |
284 | ACCEL_NORMAL = _core_.ACCEL_NORMAL | |
285 | PD_AUTO_HIDE = _core_.PD_AUTO_HIDE | |
286 | PD_APP_MODAL = _core_.PD_APP_MODAL | |
287 | PD_CAN_ABORT = _core_.PD_CAN_ABORT | |
288 | PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME | |
289 | PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME | |
290 | PD_REMAINING_TIME = _core_.PD_REMAINING_TIME | |
291 | DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON | |
292 | DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE | |
293 | MENU_TEAROFF = _core_.MENU_TEAROFF | |
294 | MB_DOCKABLE = _core_.MB_DOCKABLE | |
295 | NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE | |
296 | FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE | |
297 | LI_HORIZONTAL = _core_.LI_HORIZONTAL | |
298 | LI_VERTICAL = _core_.LI_VERTICAL | |
299 | WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY | |
300 | WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS | |
301 | WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT | |
302 | WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND | |
303 | WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE | |
304 | WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES | |
305 | MM_TEXT = _core_.MM_TEXT | |
306 | MM_LOMETRIC = _core_.MM_LOMETRIC | |
307 | MM_HIMETRIC = _core_.MM_HIMETRIC | |
308 | MM_LOENGLISH = _core_.MM_LOENGLISH | |
309 | MM_HIENGLISH = _core_.MM_HIENGLISH | |
310 | MM_TWIPS = _core_.MM_TWIPS | |
311 | MM_ISOTROPIC = _core_.MM_ISOTROPIC | |
312 | MM_ANISOTROPIC = _core_.MM_ANISOTROPIC | |
313 | MM_POINTS = _core_.MM_POINTS | |
314 | MM_METRIC = _core_.MM_METRIC | |
315 | CENTRE = _core_.CENTRE | |
316 | CENTER = _core_.CENTER | |
317 | HORIZONTAL = _core_.HORIZONTAL | |
318 | VERTICAL = _core_.VERTICAL | |
319 | BOTH = _core_.BOTH | |
320 | LEFT = _core_.LEFT | |
321 | RIGHT = _core_.RIGHT | |
322 | UP = _core_.UP | |
323 | DOWN = _core_.DOWN | |
324 | TOP = _core_.TOP | |
325 | BOTTOM = _core_.BOTTOM | |
326 | NORTH = _core_.NORTH | |
327 | SOUTH = _core_.SOUTH | |
328 | WEST = _core_.WEST | |
329 | EAST = _core_.EAST | |
330 | ALL = _core_.ALL | |
331 | ALIGN_NOT = _core_.ALIGN_NOT | |
332 | ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL | |
333 | ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL | |
334 | ALIGN_LEFT = _core_.ALIGN_LEFT | |
335 | ALIGN_TOP = _core_.ALIGN_TOP | |
336 | ALIGN_RIGHT = _core_.ALIGN_RIGHT | |
337 | ALIGN_BOTTOM = _core_.ALIGN_BOTTOM | |
338 | ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL | |
339 | ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL | |
340 | ALIGN_CENTER = _core_.ALIGN_CENTER | |
341 | ALIGN_CENTRE = _core_.ALIGN_CENTRE | |
342 | ALIGN_MASK = _core_.ALIGN_MASK | |
343 | STRETCH_NOT = _core_.STRETCH_NOT | |
344 | SHRINK = _core_.SHRINK | |
345 | GROW = _core_.GROW | |
346 | EXPAND = _core_.EXPAND | |
347 | SHAPED = _core_.SHAPED | |
348 | FIXED_MINSIZE = _core_.FIXED_MINSIZE | |
349 | TILE = _core_.TILE | |
350 | ADJUST_MINSIZE = _core_.ADJUST_MINSIZE | |
351 | BORDER_DEFAULT = _core_.BORDER_DEFAULT | |
352 | BORDER_NONE = _core_.BORDER_NONE | |
353 | BORDER_STATIC = _core_.BORDER_STATIC | |
354 | BORDER_SIMPLE = _core_.BORDER_SIMPLE | |
355 | BORDER_RAISED = _core_.BORDER_RAISED | |
356 | BORDER_SUNKEN = _core_.BORDER_SUNKEN | |
357 | BORDER_DOUBLE = _core_.BORDER_DOUBLE | |
358 | BORDER_MASK = _core_.BORDER_MASK | |
7bc1e663 RD |
359 | BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM |
360 | BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR | |
361 | BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM | |
54f9ee45 RD |
362 | DEFAULT = _core_.DEFAULT |
363 | DECORATIVE = _core_.DECORATIVE | |
364 | ROMAN = _core_.ROMAN | |
365 | SCRIPT = _core_.SCRIPT | |
366 | SWISS = _core_.SWISS | |
367 | MODERN = _core_.MODERN | |
368 | TELETYPE = _core_.TELETYPE | |
369 | VARIABLE = _core_.VARIABLE | |
370 | FIXED = _core_.FIXED | |
371 | NORMAL = _core_.NORMAL | |
372 | LIGHT = _core_.LIGHT | |
373 | BOLD = _core_.BOLD | |
374 | ITALIC = _core_.ITALIC | |
375 | SLANT = _core_.SLANT | |
376 | SOLID = _core_.SOLID | |
377 | DOT = _core_.DOT | |
378 | LONG_DASH = _core_.LONG_DASH | |
379 | SHORT_DASH = _core_.SHORT_DASH | |
380 | DOT_DASH = _core_.DOT_DASH | |
381 | USER_DASH = _core_.USER_DASH | |
382 | TRANSPARENT = _core_.TRANSPARENT | |
383 | STIPPLE = _core_.STIPPLE | |
384 | BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH | |
385 | CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH | |
386 | FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH | |
387 | CROSS_HATCH = _core_.CROSS_HATCH | |
388 | HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH | |
389 | VERTICAL_HATCH = _core_.VERTICAL_HATCH | |
390 | JOIN_BEVEL = _core_.JOIN_BEVEL | |
391 | JOIN_MITER = _core_.JOIN_MITER | |
392 | JOIN_ROUND = _core_.JOIN_ROUND | |
393 | CAP_ROUND = _core_.CAP_ROUND | |
394 | CAP_PROJECTING = _core_.CAP_PROJECTING | |
395 | CAP_BUTT = _core_.CAP_BUTT | |
396 | CLEAR = _core_.CLEAR | |
397 | XOR = _core_.XOR | |
398 | INVERT = _core_.INVERT | |
399 | OR_REVERSE = _core_.OR_REVERSE | |
400 | AND_REVERSE = _core_.AND_REVERSE | |
401 | COPY = _core_.COPY | |
402 | AND = _core_.AND | |
403 | AND_INVERT = _core_.AND_INVERT | |
404 | NO_OP = _core_.NO_OP | |
405 | NOR = _core_.NOR | |
406 | EQUIV = _core_.EQUIV | |
407 | SRC_INVERT = _core_.SRC_INVERT | |
408 | OR_INVERT = _core_.OR_INVERT | |
409 | NAND = _core_.NAND | |
410 | OR = _core_.OR | |
411 | SET = _core_.SET | |
412 | WXK_BACK = _core_.WXK_BACK | |
413 | WXK_TAB = _core_.WXK_TAB | |
414 | WXK_RETURN = _core_.WXK_RETURN | |
415 | WXK_ESCAPE = _core_.WXK_ESCAPE | |
416 | WXK_SPACE = _core_.WXK_SPACE | |
417 | WXK_DELETE = _core_.WXK_DELETE | |
418 | WXK_START = _core_.WXK_START | |
419 | WXK_LBUTTON = _core_.WXK_LBUTTON | |
420 | WXK_RBUTTON = _core_.WXK_RBUTTON | |
421 | WXK_CANCEL = _core_.WXK_CANCEL | |
422 | WXK_MBUTTON = _core_.WXK_MBUTTON | |
423 | WXK_CLEAR = _core_.WXK_CLEAR | |
424 | WXK_SHIFT = _core_.WXK_SHIFT | |
425 | WXK_ALT = _core_.WXK_ALT | |
426 | WXK_CONTROL = _core_.WXK_CONTROL | |
427 | WXK_MENU = _core_.WXK_MENU | |
428 | WXK_PAUSE = _core_.WXK_PAUSE | |
429 | WXK_CAPITAL = _core_.WXK_CAPITAL | |
430 | WXK_PRIOR = _core_.WXK_PRIOR | |
431 | WXK_NEXT = _core_.WXK_NEXT | |
432 | WXK_END = _core_.WXK_END | |
433 | WXK_HOME = _core_.WXK_HOME | |
434 | WXK_LEFT = _core_.WXK_LEFT | |
435 | WXK_UP = _core_.WXK_UP | |
436 | WXK_RIGHT = _core_.WXK_RIGHT | |
437 | WXK_DOWN = _core_.WXK_DOWN | |
438 | WXK_SELECT = _core_.WXK_SELECT | |
439 | WXK_PRINT = _core_.WXK_PRINT | |
440 | WXK_EXECUTE = _core_.WXK_EXECUTE | |
441 | WXK_SNAPSHOT = _core_.WXK_SNAPSHOT | |
442 | WXK_INSERT = _core_.WXK_INSERT | |
443 | WXK_HELP = _core_.WXK_HELP | |
444 | WXK_NUMPAD0 = _core_.WXK_NUMPAD0 | |
445 | WXK_NUMPAD1 = _core_.WXK_NUMPAD1 | |
446 | WXK_NUMPAD2 = _core_.WXK_NUMPAD2 | |
447 | WXK_NUMPAD3 = _core_.WXK_NUMPAD3 | |
448 | WXK_NUMPAD4 = _core_.WXK_NUMPAD4 | |
449 | WXK_NUMPAD5 = _core_.WXK_NUMPAD5 | |
450 | WXK_NUMPAD6 = _core_.WXK_NUMPAD6 | |
451 | WXK_NUMPAD7 = _core_.WXK_NUMPAD7 | |
452 | WXK_NUMPAD8 = _core_.WXK_NUMPAD8 | |
453 | WXK_NUMPAD9 = _core_.WXK_NUMPAD9 | |
454 | WXK_MULTIPLY = _core_.WXK_MULTIPLY | |
455 | WXK_ADD = _core_.WXK_ADD | |
456 | WXK_SEPARATOR = _core_.WXK_SEPARATOR | |
457 | WXK_SUBTRACT = _core_.WXK_SUBTRACT | |
458 | WXK_DECIMAL = _core_.WXK_DECIMAL | |
459 | WXK_DIVIDE = _core_.WXK_DIVIDE | |
460 | WXK_F1 = _core_.WXK_F1 | |
461 | WXK_F2 = _core_.WXK_F2 | |
462 | WXK_F3 = _core_.WXK_F3 | |
463 | WXK_F4 = _core_.WXK_F4 | |
464 | WXK_F5 = _core_.WXK_F5 | |
465 | WXK_F6 = _core_.WXK_F6 | |
466 | WXK_F7 = _core_.WXK_F7 | |
467 | WXK_F8 = _core_.WXK_F8 | |
468 | WXK_F9 = _core_.WXK_F9 | |
469 | WXK_F10 = _core_.WXK_F10 | |
470 | WXK_F11 = _core_.WXK_F11 | |
471 | WXK_F12 = _core_.WXK_F12 | |
472 | WXK_F13 = _core_.WXK_F13 | |
473 | WXK_F14 = _core_.WXK_F14 | |
474 | WXK_F15 = _core_.WXK_F15 | |
475 | WXK_F16 = _core_.WXK_F16 | |
476 | WXK_F17 = _core_.WXK_F17 | |
477 | WXK_F18 = _core_.WXK_F18 | |
478 | WXK_F19 = _core_.WXK_F19 | |
479 | WXK_F20 = _core_.WXK_F20 | |
480 | WXK_F21 = _core_.WXK_F21 | |
481 | WXK_F22 = _core_.WXK_F22 | |
482 | WXK_F23 = _core_.WXK_F23 | |
483 | WXK_F24 = _core_.WXK_F24 | |
484 | WXK_NUMLOCK = _core_.WXK_NUMLOCK | |
485 | WXK_SCROLL = _core_.WXK_SCROLL | |
486 | WXK_PAGEUP = _core_.WXK_PAGEUP | |
487 | WXK_PAGEDOWN = _core_.WXK_PAGEDOWN | |
488 | WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE | |
489 | WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB | |
490 | WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER | |
491 | WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1 | |
492 | WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2 | |
493 | WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3 | |
494 | WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4 | |
495 | WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME | |
496 | WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT | |
497 | WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP | |
498 | WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT | |
499 | WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN | |
500 | WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR | |
501 | WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP | |
502 | WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT | |
503 | WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN | |
504 | WXK_NUMPAD_END = _core_.WXK_NUMPAD_END | |
505 | WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN | |
506 | WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT | |
507 | WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE | |
508 | WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL | |
509 | WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY | |
510 | WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD | |
511 | WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR | |
512 | WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT | |
513 | WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL | |
514 | WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE | |
515 | WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT | |
516 | WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT | |
517 | WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU | |
518 | PAPER_NONE = _core_.PAPER_NONE | |
519 | PAPER_LETTER = _core_.PAPER_LETTER | |
520 | PAPER_LEGAL = _core_.PAPER_LEGAL | |
521 | PAPER_A4 = _core_.PAPER_A4 | |
522 | PAPER_CSHEET = _core_.PAPER_CSHEET | |
523 | PAPER_DSHEET = _core_.PAPER_DSHEET | |
524 | PAPER_ESHEET = _core_.PAPER_ESHEET | |
525 | PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL | |
526 | PAPER_TABLOID = _core_.PAPER_TABLOID | |
527 | PAPER_LEDGER = _core_.PAPER_LEDGER | |
528 | PAPER_STATEMENT = _core_.PAPER_STATEMENT | |
529 | PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE | |
530 | PAPER_A3 = _core_.PAPER_A3 | |
531 | PAPER_A4SMALL = _core_.PAPER_A4SMALL | |
532 | PAPER_A5 = _core_.PAPER_A5 | |
533 | PAPER_B4 = _core_.PAPER_B4 | |
534 | PAPER_B5 = _core_.PAPER_B5 | |
535 | PAPER_FOLIO = _core_.PAPER_FOLIO | |
536 | PAPER_QUARTO = _core_.PAPER_QUARTO | |
537 | PAPER_10X14 = _core_.PAPER_10X14 | |
538 | PAPER_11X17 = _core_.PAPER_11X17 | |
539 | PAPER_NOTE = _core_.PAPER_NOTE | |
540 | PAPER_ENV_9 = _core_.PAPER_ENV_9 | |
541 | PAPER_ENV_10 = _core_.PAPER_ENV_10 | |
542 | PAPER_ENV_11 = _core_.PAPER_ENV_11 | |
543 | PAPER_ENV_12 = _core_.PAPER_ENV_12 | |
544 | PAPER_ENV_14 = _core_.PAPER_ENV_14 | |
545 | PAPER_ENV_DL = _core_.PAPER_ENV_DL | |
546 | PAPER_ENV_C5 = _core_.PAPER_ENV_C5 | |
547 | PAPER_ENV_C3 = _core_.PAPER_ENV_C3 | |
548 | PAPER_ENV_C4 = _core_.PAPER_ENV_C4 | |
549 | PAPER_ENV_C6 = _core_.PAPER_ENV_C6 | |
550 | PAPER_ENV_C65 = _core_.PAPER_ENV_C65 | |
551 | PAPER_ENV_B4 = _core_.PAPER_ENV_B4 | |
552 | PAPER_ENV_B5 = _core_.PAPER_ENV_B5 | |
553 | PAPER_ENV_B6 = _core_.PAPER_ENV_B6 | |
554 | PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY | |
555 | PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH | |
556 | PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL | |
557 | PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US | |
558 | PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN | |
559 | PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN | |
560 | PAPER_ISO_B4 = _core_.PAPER_ISO_B4 | |
561 | PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD | |
562 | PAPER_9X11 = _core_.PAPER_9X11 | |
563 | PAPER_10X11 = _core_.PAPER_10X11 | |
564 | PAPER_15X11 = _core_.PAPER_15X11 | |
565 | PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE | |
566 | PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA | |
567 | PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA | |
568 | PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA | |
569 | PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA | |
570 | PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE | |
571 | PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE | |
572 | PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE | |
573 | PAPER_A_PLUS = _core_.PAPER_A_PLUS | |
574 | PAPER_B_PLUS = _core_.PAPER_B_PLUS | |
575 | PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS | |
576 | PAPER_A4_PLUS = _core_.PAPER_A4_PLUS | |
577 | PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE | |
578 | PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE | |
579 | PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA | |
580 | PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA | |
581 | PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA | |
582 | PAPER_A2 = _core_.PAPER_A2 | |
583 | PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE | |
584 | PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE | |
585 | DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX | |
586 | DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL | |
587 | DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL | |
588 | ITEM_SEPARATOR = _core_.ITEM_SEPARATOR | |
589 | ITEM_NORMAL = _core_.ITEM_NORMAL | |
590 | ITEM_CHECK = _core_.ITEM_CHECK | |
591 | ITEM_RADIO = _core_.ITEM_RADIO | |
592 | ITEM_MAX = _core_.ITEM_MAX | |
593 | HT_NOWHERE = _core_.HT_NOWHERE | |
594 | HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST | |
595 | HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1 | |
596 | HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2 | |
597 | HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1 | |
598 | HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2 | |
599 | HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB | |
600 | HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1 | |
601 | HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2 | |
602 | HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST | |
603 | HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE | |
604 | HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE | |
605 | HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR | |
606 | HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR | |
607 | HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER | |
608 | HT_MAX = _core_.HT_MAX | |
609 | MOD_NONE = _core_.MOD_NONE | |
610 | MOD_ALT = _core_.MOD_ALT | |
611 | MOD_CONTROL = _core_.MOD_CONTROL | |
612 | MOD_SHIFT = _core_.MOD_SHIFT | |
613 | MOD_WIN = _core_.MOD_WIN | |
614 | UPDATE_UI_NONE = _core_.UPDATE_UI_NONE | |
615 | UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE | |
616 | UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE | |
d14a1e28 RD |
617 | #--------------------------------------------------------------------------- |
618 | ||
619 | class Object(object): | |
0df68c9f RD |
620 | """ |
621 | The base class for most wx objects, although in wxPython not | |
622 | much functionality is needed nor exposed. | |
623 | """ | |
d14a1e28 RD |
624 | def __init__(self): raise RuntimeError, "No constructor defined" |
625 | def __repr__(self): | |
626 | return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 627 | def GetClassName(*args, **kwargs): |
0df68c9f | 628 | """ |
a95a7133 | 629 | GetClassName(self) -> String |
e811c8ce | 630 | |
a95a7133 | 631 | Returns the class name of the C++ class using wxRTTI. |
0df68c9f | 632 | """ |
54f9ee45 | 633 | return _core_.Object_GetClassName(*args, **kwargs) |
e811c8ce RD |
634 | |
635 | def Destroy(*args, **kwargs): | |
0df68c9f | 636 | """ |
a95a7133 | 637 | Destroy(self) |
e811c8ce | 638 | |
0df68c9f RD |
639 | Deletes the C++ object this Python object is a proxy for. |
640 | """ | |
54f9ee45 | 641 | return _core_.Object_Destroy(*args, **kwargs) |
e811c8ce | 642 | |
d14a1e28 RD |
643 | |
644 | class ObjectPtr(Object): | |
645 | def __init__(self, this): | |
646 | self.this = this | |
647 | if not hasattr(self,"thisown"): self.thisown = 0 | |
648 | self.__class__ = Object | |
54f9ee45 RD |
649 | _core_.Object_swigregister(ObjectPtr) |
650 | _wxPySetDictionary = _core_._wxPySetDictionary | |
d14a1e28 | 651 | |
54f9ee45 | 652 | _wxPyFixStockObjects = _core_._wxPyFixStockObjects |
3a04f143 | 653 | |
54f9ee45 | 654 | cvar = _core_.cvar |
196addbf | 655 | EmptyString = cvar.EmptyString |
d14a1e28 RD |
656 | |
657 | #--------------------------------------------------------------------------- | |
658 | ||
54f9ee45 RD |
659 | BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID |
660 | BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP | |
661 | BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO | |
662 | BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR | |
663 | BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM | |
664 | BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA | |
665 | BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM | |
666 | BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA | |
667 | BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF | |
668 | BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF | |
669 | BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG | |
670 | BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG | |
671 | BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM | |
672 | BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX | |
673 | BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT | |
674 | BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON | |
675 | BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI | |
676 | BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF | |
677 | BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR | |
678 | BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY | |
679 | CURSOR_NONE = _core_.CURSOR_NONE | |
680 | CURSOR_ARROW = _core_.CURSOR_ARROW | |
681 | CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW | |
682 | CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE | |
683 | CURSOR_CHAR = _core_.CURSOR_CHAR | |
684 | CURSOR_CROSS = _core_.CURSOR_CROSS | |
685 | CURSOR_HAND = _core_.CURSOR_HAND | |
686 | CURSOR_IBEAM = _core_.CURSOR_IBEAM | |
687 | CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON | |
688 | CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER | |
689 | CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON | |
690 | CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY | |
691 | CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH | |
692 | CURSOR_PENCIL = _core_.CURSOR_PENCIL | |
693 | CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT | |
694 | CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT | |
695 | CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW | |
696 | CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON | |
697 | CURSOR_SIZENESW = _core_.CURSOR_SIZENESW | |
698 | CURSOR_SIZENS = _core_.CURSOR_SIZENS | |
699 | CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE | |
700 | CURSOR_SIZEWE = _core_.CURSOR_SIZEWE | |
701 | CURSOR_SIZING = _core_.CURSOR_SIZING | |
702 | CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN | |
703 | CURSOR_WAIT = _core_.CURSOR_WAIT | |
704 | CURSOR_WATCH = _core_.CURSOR_WATCH | |
705 | CURSOR_BLANK = _core_.CURSOR_BLANK | |
706 | CURSOR_DEFAULT = _core_.CURSOR_DEFAULT | |
707 | CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW | |
708 | CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT | |
709 | CURSOR_MAX = _core_.CURSOR_MAX | |
d14a1e28 RD |
710 | #--------------------------------------------------------------------------- |
711 | ||
712 | class Size(object): | |
0df68c9f | 713 | """ |
41e2b43e | 714 | wx.Size is a useful data structure used to represent the size of |
093d3ff1 RD |
715 | something. It simply contians integer width and height |
716 | proprtites. In most places in wxPython where a wx.Size is | |
717 | expected a (width, height) tuple can be used instead. | |
0df68c9f | 718 | """ |
e811c8ce RD |
719 | def __repr__(self): |
720 | return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
721 | width = property(_core_.Size_width_get, _core_.Size_width_set) |
722 | height = property(_core_.Size_height_get, _core_.Size_height_set) | |
242b7b46 | 723 | x = width; y = height |
d14a1e28 | 724 | def __init__(self, *args, **kwargs): |
0df68c9f | 725 | """ |
a95a7133 | 726 | __init__(self, int w=0, int h=0) -> Size |
e811c8ce | 727 | |
0df68c9f RD |
728 | Creates a size object. |
729 | """ | |
54f9ee45 | 730 | newobj = _core_.new_Size(*args, **kwargs) |
d14a1e28 RD |
731 | self.this = newobj.this |
732 | self.thisown = 1 | |
733 | del newobj.thisown | |
54f9ee45 | 734 | def __del__(self, destroy=_core_.delete_Size): |
a95a7133 | 735 | """__del__(self)""" |
d14a1e28 RD |
736 | try: |
737 | if self.thisown: destroy(self) | |
738 | except: pass | |
e811c8ce RD |
739 | |
740 | def __eq__(*args, **kwargs): | |
0df68c9f | 741 | """ |
a95a7133 | 742 | __eq__(self, Size sz) -> bool |
e811c8ce | 743 | |
0df68c9f RD |
744 | Test for equality of wx.Size objects. |
745 | """ | |
54f9ee45 | 746 | return _core_.Size___eq__(*args, **kwargs) |
e811c8ce RD |
747 | |
748 | def __ne__(*args, **kwargs): | |
0df68c9f | 749 | """ |
a95a7133 | 750 | __ne__(self, Size sz) -> bool |
e811c8ce | 751 | |
0df68c9f RD |
752 | Test for inequality. |
753 | """ | |
54f9ee45 | 754 | return _core_.Size___ne__(*args, **kwargs) |
e811c8ce RD |
755 | |
756 | def __add__(*args, **kwargs): | |
0df68c9f | 757 | """ |
a95a7133 | 758 | __add__(self, Size sz) -> Size |
e811c8ce | 759 | |
0df68c9f RD |
760 | Add sz's proprties to this and return the result. |
761 | """ | |
54f9ee45 | 762 | return _core_.Size___add__(*args, **kwargs) |
e811c8ce RD |
763 | |
764 | def __sub__(*args, **kwargs): | |
0df68c9f | 765 | """ |
a95a7133 | 766 | __sub__(self, Size sz) -> Size |
e811c8ce | 767 | |
0df68c9f RD |
768 | Subtract sz's properties from this and return the result. |
769 | """ | |
54f9ee45 | 770 | return _core_.Size___sub__(*args, **kwargs) |
e811c8ce RD |
771 | |
772 | def IncTo(*args, **kwargs): | |
0df68c9f | 773 | """ |
a95a7133 | 774 | IncTo(self, Size sz) |
e811c8ce | 775 | |
0df68c9f RD |
776 | Increments this object so that both of its dimensions are not less |
777 | than the corresponding dimensions of the size. | |
778 | """ | |
54f9ee45 | 779 | return _core_.Size_IncTo(*args, **kwargs) |
e811c8ce RD |
780 | |
781 | def DecTo(*args, **kwargs): | |
0df68c9f | 782 | """ |
a95a7133 | 783 | DecTo(self, Size sz) |
e811c8ce | 784 | |
0df68c9f RD |
785 | Decrements this object so that both of its dimensions are not greater |
786 | than the corresponding dimensions of the size. | |
787 | """ | |
54f9ee45 | 788 | return _core_.Size_DecTo(*args, **kwargs) |
e811c8ce RD |
789 | |
790 | def Set(*args, **kwargs): | |
0df68c9f | 791 | """ |
a95a7133 | 792 | Set(self, int w, int h) |
e811c8ce | 793 | |
0df68c9f RD |
794 | Set both width and height. |
795 | """ | |
54f9ee45 | 796 | return _core_.Size_Set(*args, **kwargs) |
e811c8ce RD |
797 | |
798 | def SetWidth(*args, **kwargs): | |
a95a7133 | 799 | """SetWidth(self, int w)""" |
54f9ee45 | 800 | return _core_.Size_SetWidth(*args, **kwargs) |
e811c8ce RD |
801 | |
802 | def SetHeight(*args, **kwargs): | |
a95a7133 | 803 | """SetHeight(self, int h)""" |
54f9ee45 | 804 | return _core_.Size_SetHeight(*args, **kwargs) |
e811c8ce RD |
805 | |
806 | def GetWidth(*args, **kwargs): | |
a95a7133 | 807 | """GetWidth(self) -> int""" |
54f9ee45 | 808 | return _core_.Size_GetWidth(*args, **kwargs) |
e811c8ce RD |
809 | |
810 | def GetHeight(*args, **kwargs): | |
a95a7133 | 811 | """GetHeight(self) -> int""" |
54f9ee45 | 812 | return _core_.Size_GetHeight(*args, **kwargs) |
e811c8ce | 813 | |
74a57fcd RD |
814 | def IsFullySpecified(*args, **kwargs): |
815 | """ | |
a95a7133 | 816 | IsFullySpecified(self) -> bool |
74a57fcd RD |
817 | |
818 | Returns True if both components of the size are non-default values. | |
819 | """ | |
54f9ee45 | 820 | return _core_.Size_IsFullySpecified(*args, **kwargs) |
74a57fcd RD |
821 | |
822 | def SetDefaults(*args, **kwargs): | |
823 | """ | |
a95a7133 | 824 | SetDefaults(self, Size size) |
74a57fcd | 825 | |
41e2b43e RD |
826 | Combine this size with the other one replacing the default components |
827 | of this object (i.e. equal to -1) with those of the other. | |
74a57fcd | 828 | """ |
54f9ee45 | 829 | return _core_.Size_SetDefaults(*args, **kwargs) |
74a57fcd | 830 | |
e811c8ce | 831 | def Get(*args, **kwargs): |
0df68c9f RD |
832 | """ |
833 | Get() -> (width,height) | |
e811c8ce | 834 | |
0df68c9f RD |
835 | Returns the width and height properties as a tuple. |
836 | """ | |
54f9ee45 | 837 | return _core_.Size_Get(*args, **kwargs) |
e811c8ce | 838 | |
41e2b43e | 839 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
840 | def __str__(self): return str(self.Get()) |
841 | def __repr__(self): return 'wx.Size'+str(self.Get()) | |
842 | def __len__(self): return len(self.Get()) | |
843 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
844 | def __setitem__(self, index, val): |
845 | if index == 0: self.width = val | |
846 | elif index == 1: self.height = val | |
847 | else: raise IndexError | |
e811c8ce | 848 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
849 | __safe_for_unpickling__ = True |
850 | def __reduce__(self): return (wx.Size, self.Get()) | |
d14a1e28 RD |
851 | |
852 | ||
853 | class SizePtr(Size): | |
854 | def __init__(self, this): | |
855 | self.this = this | |
856 | if not hasattr(self,"thisown"): self.thisown = 0 | |
857 | self.__class__ = Size | |
54f9ee45 | 858 | _core_.Size_swigregister(SizePtr) |
d14a1e28 RD |
859 | |
860 | #--------------------------------------------------------------------------- | |
861 | ||
862 | class RealPoint(object): | |
0df68c9f | 863 | """ |
41e2b43e RD |
864 | A data structure for representing a point or position with floating |
865 | point x and y properties. In wxPython most places that expect a | |
866 | wx.RealPoint can also accept a (x,y) tuple. | |
0df68c9f | 867 | """ |
e811c8ce RD |
868 | def __repr__(self): |
869 | return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
870 | x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set) |
871 | y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set) | |
d14a1e28 | 872 | def __init__(self, *args, **kwargs): |
0df68c9f | 873 | """ |
a95a7133 | 874 | __init__(self, double x=0.0, double y=0.0) -> RealPoint |
e811c8ce | 875 | |
0df68c9f RD |
876 | Create a wx.RealPoint object |
877 | """ | |
54f9ee45 | 878 | newobj = _core_.new_RealPoint(*args, **kwargs) |
d14a1e28 RD |
879 | self.this = newobj.this |
880 | self.thisown = 1 | |
881 | del newobj.thisown | |
54f9ee45 | 882 | def __del__(self, destroy=_core_.delete_RealPoint): |
a95a7133 | 883 | """__del__(self)""" |
d14a1e28 RD |
884 | try: |
885 | if self.thisown: destroy(self) | |
886 | except: pass | |
e811c8ce RD |
887 | |
888 | def __eq__(*args, **kwargs): | |
0df68c9f | 889 | """ |
a95a7133 | 890 | __eq__(self, RealPoint pt) -> bool |
e811c8ce | 891 | |
0df68c9f RD |
892 | Test for equality of wx.RealPoint objects. |
893 | """ | |
54f9ee45 | 894 | return _core_.RealPoint___eq__(*args, **kwargs) |
e811c8ce RD |
895 | |
896 | def __ne__(*args, **kwargs): | |
0df68c9f | 897 | """ |
a95a7133 | 898 | __ne__(self, RealPoint pt) -> bool |
e811c8ce | 899 | |
0df68c9f RD |
900 | Test for inequality of wx.RealPoint objects. |
901 | """ | |
54f9ee45 | 902 | return _core_.RealPoint___ne__(*args, **kwargs) |
e811c8ce RD |
903 | |
904 | def __add__(*args, **kwargs): | |
0df68c9f | 905 | """ |
a95a7133 | 906 | __add__(self, RealPoint pt) -> RealPoint |
e811c8ce | 907 | |
0df68c9f RD |
908 | Add pt's proprties to this and return the result. |
909 | """ | |
54f9ee45 | 910 | return _core_.RealPoint___add__(*args, **kwargs) |
e811c8ce RD |
911 | |
912 | def __sub__(*args, **kwargs): | |
0df68c9f | 913 | """ |
a95a7133 | 914 | __sub__(self, RealPoint pt) -> RealPoint |
e811c8ce | 915 | |
0df68c9f RD |
916 | Subtract pt's proprties from this and return the result |
917 | """ | |
54f9ee45 | 918 | return _core_.RealPoint___sub__(*args, **kwargs) |
e811c8ce RD |
919 | |
920 | def Set(*args, **kwargs): | |
0df68c9f | 921 | """ |
a95a7133 | 922 | Set(self, double x, double y) |
e811c8ce | 923 | |
0df68c9f RD |
924 | Set both the x and y properties |
925 | """ | |
54f9ee45 | 926 | return _core_.RealPoint_Set(*args, **kwargs) |
e811c8ce RD |
927 | |
928 | def Get(*args, **kwargs): | |
0df68c9f RD |
929 | """ |
930 | Get() -> (x,y) | |
e811c8ce | 931 | |
0df68c9f RD |
932 | Return the x and y properties as a tuple. |
933 | """ | |
54f9ee45 | 934 | return _core_.RealPoint_Get(*args, **kwargs) |
e811c8ce | 935 | |
41e2b43e | 936 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
937 | def __str__(self): return str(self.Get()) |
938 | def __repr__(self): return 'wx.RealPoint'+str(self.Get()) | |
939 | def __len__(self): return len(self.Get()) | |
940 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 941 | def __setitem__(self, index, val): |
e811c8ce RD |
942 | if index == 0: self.x = val |
943 | elif index == 1: self.y = val | |
d14a1e28 | 944 | else: raise IndexError |
e811c8ce | 945 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
946 | __safe_for_unpickling__ = True |
947 | def __reduce__(self): return (wx.RealPoint, self.Get()) | |
d14a1e28 RD |
948 | |
949 | ||
950 | class RealPointPtr(RealPoint): | |
951 | def __init__(self, this): | |
952 | self.this = this | |
953 | if not hasattr(self,"thisown"): self.thisown = 0 | |
954 | self.__class__ = RealPoint | |
54f9ee45 | 955 | _core_.RealPoint_swigregister(RealPointPtr) |
d14a1e28 RD |
956 | |
957 | #--------------------------------------------------------------------------- | |
958 | ||
959 | class Point(object): | |
0df68c9f | 960 | """ |
41e2b43e RD |
961 | A data structure for representing a point or position with integer x |
962 | and y properties. Most places in wxPython that expect a wx.Point can | |
963 | also accept a (x,y) tuple. | |
0df68c9f | 964 | """ |
e811c8ce RD |
965 | def __repr__(self): |
966 | return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
967 | x = property(_core_.Point_x_get, _core_.Point_x_set) |
968 | y = property(_core_.Point_y_get, _core_.Point_y_set) | |
d14a1e28 | 969 | def __init__(self, *args, **kwargs): |
0df68c9f | 970 | """ |
a95a7133 | 971 | __init__(self, int x=0, int y=0) -> Point |
e811c8ce | 972 | |
0df68c9f RD |
973 | Create a wx.Point object |
974 | """ | |
54f9ee45 | 975 | newobj = _core_.new_Point(*args, **kwargs) |
d14a1e28 RD |
976 | self.this = newobj.this |
977 | self.thisown = 1 | |
978 | del newobj.thisown | |
54f9ee45 | 979 | def __del__(self, destroy=_core_.delete_Point): |
a95a7133 | 980 | """__del__(self)""" |
d14a1e28 RD |
981 | try: |
982 | if self.thisown: destroy(self) | |
983 | except: pass | |
e811c8ce RD |
984 | |
985 | def __eq__(*args, **kwargs): | |
0df68c9f | 986 | """ |
a95a7133 | 987 | __eq__(self, Point pt) -> bool |
e811c8ce | 988 | |
0df68c9f RD |
989 | Test for equality of wx.Point objects. |
990 | """ | |
54f9ee45 | 991 | return _core_.Point___eq__(*args, **kwargs) |
e811c8ce RD |
992 | |
993 | def __ne__(*args, **kwargs): | |
0df68c9f | 994 | """ |
a95a7133 | 995 | __ne__(self, Point pt) -> bool |
e811c8ce | 996 | |
0df68c9f RD |
997 | Test for inequality of wx.Point objects. |
998 | """ | |
54f9ee45 | 999 | return _core_.Point___ne__(*args, **kwargs) |
e811c8ce RD |
1000 | |
1001 | def __add__(*args, **kwargs): | |
0df68c9f | 1002 | """ |
a95a7133 | 1003 | __add__(self, Point pt) -> Point |
e811c8ce | 1004 | |
0df68c9f RD |
1005 | Add pt's proprties to this and return the result. |
1006 | """ | |
54f9ee45 | 1007 | return _core_.Point___add__(*args, **kwargs) |
e811c8ce RD |
1008 | |
1009 | def __sub__(*args, **kwargs): | |
0df68c9f | 1010 | """ |
a95a7133 | 1011 | __sub__(self, Point pt) -> Point |
e811c8ce | 1012 | |
0df68c9f RD |
1013 | Subtract pt's proprties from this and return the result |
1014 | """ | |
54f9ee45 | 1015 | return _core_.Point___sub__(*args, **kwargs) |
e811c8ce RD |
1016 | |
1017 | def __iadd__(*args, **kwargs): | |
0df68c9f | 1018 | """ |
a95a7133 | 1019 | __iadd__(self, Point pt) -> Point |
e811c8ce | 1020 | |
0df68c9f RD |
1021 | Add pt to this object. |
1022 | """ | |
54f9ee45 | 1023 | return _core_.Point___iadd__(*args, **kwargs) |
e811c8ce RD |
1024 | |
1025 | def __isub__(*args, **kwargs): | |
0df68c9f | 1026 | """ |
a95a7133 | 1027 | __isub__(self, Point pt) -> Point |
e811c8ce | 1028 | |
0df68c9f RD |
1029 | Subtract pt from this object. |
1030 | """ | |
54f9ee45 | 1031 | return _core_.Point___isub__(*args, **kwargs) |
e811c8ce RD |
1032 | |
1033 | def Set(*args, **kwargs): | |
0df68c9f | 1034 | """ |
a95a7133 | 1035 | Set(self, long x, long y) |
e811c8ce | 1036 | |
0df68c9f RD |
1037 | Set both the x and y properties |
1038 | """ | |
54f9ee45 | 1039 | return _core_.Point_Set(*args, **kwargs) |
e811c8ce RD |
1040 | |
1041 | def Get(*args, **kwargs): | |
0df68c9f RD |
1042 | """ |
1043 | Get() -> (x,y) | |
e811c8ce | 1044 | |
0df68c9f RD |
1045 | Return the x and y properties as a tuple. |
1046 | """ | |
54f9ee45 | 1047 | return _core_.Point_Get(*args, **kwargs) |
e811c8ce | 1048 | |
41e2b43e | 1049 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1050 | def __str__(self): return str(self.Get()) |
1051 | def __repr__(self): return 'wx.Point'+str(self.Get()) | |
1052 | def __len__(self): return len(self.Get()) | |
1053 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1054 | def __setitem__(self, index, val): |
1055 | if index == 0: self.x = val | |
1056 | elif index == 1: self.y = val | |
1057 | else: raise IndexError | |
e811c8ce | 1058 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
1059 | __safe_for_unpickling__ = True |
1060 | def __reduce__(self): return (wx.Point, self.Get()) | |
d14a1e28 RD |
1061 | |
1062 | ||
1063 | class PointPtr(Point): | |
1064 | def __init__(self, this): | |
1065 | self.this = this | |
1066 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1067 | self.__class__ = Point | |
54f9ee45 | 1068 | _core_.Point_swigregister(PointPtr) |
d14a1e28 RD |
1069 | |
1070 | #--------------------------------------------------------------------------- | |
1071 | ||
1072 | class Rect(object): | |
0df68c9f | 1073 | """ |
41e2b43e RD |
1074 | A class for representing and manipulating rectangles. It has x, y, |
1075 | width and height properties. In wxPython most palces that expect a | |
1076 | wx.Rect can also accept a (x,y,width,height) tuple. | |
0df68c9f | 1077 | """ |
e811c8ce RD |
1078 | def __repr__(self): |
1079 | return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1080 | def __init__(self, *args, **kwargs): |
0df68c9f | 1081 | """ |
a95a7133 | 1082 | __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect |
e811c8ce | 1083 | |
0df68c9f RD |
1084 | Create a new Rect object. |
1085 | """ | |
54f9ee45 | 1086 | newobj = _core_.new_Rect(*args, **kwargs) |
d14a1e28 RD |
1087 | self.this = newobj.this |
1088 | self.thisown = 1 | |
1089 | del newobj.thisown | |
54f9ee45 | 1090 | def __del__(self, destroy=_core_.delete_Rect): |
a95a7133 | 1091 | """__del__(self)""" |
d14a1e28 RD |
1092 | try: |
1093 | if self.thisown: destroy(self) | |
1094 | except: pass | |
e811c8ce RD |
1095 | |
1096 | def GetX(*args, **kwargs): | |
a95a7133 | 1097 | """GetX(self) -> int""" |
54f9ee45 | 1098 | return _core_.Rect_GetX(*args, **kwargs) |
e811c8ce RD |
1099 | |
1100 | def SetX(*args, **kwargs): | |
a95a7133 | 1101 | """SetX(self, int x)""" |
54f9ee45 | 1102 | return _core_.Rect_SetX(*args, **kwargs) |
e811c8ce RD |
1103 | |
1104 | def GetY(*args, **kwargs): | |
a95a7133 | 1105 | """GetY(self) -> int""" |
54f9ee45 | 1106 | return _core_.Rect_GetY(*args, **kwargs) |
e811c8ce RD |
1107 | |
1108 | def SetY(*args, **kwargs): | |
a95a7133 | 1109 | """SetY(self, int y)""" |
54f9ee45 | 1110 | return _core_.Rect_SetY(*args, **kwargs) |
e811c8ce RD |
1111 | |
1112 | def GetWidth(*args, **kwargs): | |
a95a7133 | 1113 | """GetWidth(self) -> int""" |
54f9ee45 | 1114 | return _core_.Rect_GetWidth(*args, **kwargs) |
e811c8ce RD |
1115 | |
1116 | def SetWidth(*args, **kwargs): | |
a95a7133 | 1117 | """SetWidth(self, int w)""" |
54f9ee45 | 1118 | return _core_.Rect_SetWidth(*args, **kwargs) |
e811c8ce RD |
1119 | |
1120 | def GetHeight(*args, **kwargs): | |
a95a7133 | 1121 | """GetHeight(self) -> int""" |
54f9ee45 | 1122 | return _core_.Rect_GetHeight(*args, **kwargs) |
e811c8ce RD |
1123 | |
1124 | def SetHeight(*args, **kwargs): | |
a95a7133 | 1125 | """SetHeight(self, int h)""" |
54f9ee45 | 1126 | return _core_.Rect_SetHeight(*args, **kwargs) |
e811c8ce RD |
1127 | |
1128 | def GetPosition(*args, **kwargs): | |
a95a7133 | 1129 | """GetPosition(self) -> Point""" |
54f9ee45 | 1130 | return _core_.Rect_GetPosition(*args, **kwargs) |
e811c8ce RD |
1131 | |
1132 | def SetPosition(*args, **kwargs): | |
a95a7133 | 1133 | """SetPosition(self, Point p)""" |
54f9ee45 | 1134 | return _core_.Rect_SetPosition(*args, **kwargs) |
e811c8ce RD |
1135 | |
1136 | def GetSize(*args, **kwargs): | |
a95a7133 | 1137 | """GetSize(self) -> Size""" |
54f9ee45 | 1138 | return _core_.Rect_GetSize(*args, **kwargs) |
e811c8ce RD |
1139 | |
1140 | def SetSize(*args, **kwargs): | |
a95a7133 | 1141 | """SetSize(self, Size s)""" |
54f9ee45 | 1142 | return _core_.Rect_SetSize(*args, **kwargs) |
e811c8ce | 1143 | |
c9c7117a | 1144 | def GetTopLeft(*args, **kwargs): |
a95a7133 | 1145 | """GetTopLeft(self) -> Point""" |
54f9ee45 | 1146 | return _core_.Rect_GetTopLeft(*args, **kwargs) |
c9c7117a RD |
1147 | |
1148 | def SetTopLeft(*args, **kwargs): | |
a95a7133 | 1149 | """SetTopLeft(self, Point p)""" |
54f9ee45 | 1150 | return _core_.Rect_SetTopLeft(*args, **kwargs) |
c9c7117a RD |
1151 | |
1152 | def GetBottomRight(*args, **kwargs): | |
a95a7133 | 1153 | """GetBottomRight(self) -> Point""" |
54f9ee45 | 1154 | return _core_.Rect_GetBottomRight(*args, **kwargs) |
c9c7117a RD |
1155 | |
1156 | def SetBottomRight(*args, **kwargs): | |
a95a7133 | 1157 | """SetBottomRight(self, Point p)""" |
54f9ee45 | 1158 | return _core_.Rect_SetBottomRight(*args, **kwargs) |
c9c7117a | 1159 | |
e811c8ce | 1160 | def GetLeft(*args, **kwargs): |
a95a7133 | 1161 | """GetLeft(self) -> int""" |
54f9ee45 | 1162 | return _core_.Rect_GetLeft(*args, **kwargs) |
e811c8ce RD |
1163 | |
1164 | def GetTop(*args, **kwargs): | |
a95a7133 | 1165 | """GetTop(self) -> int""" |
54f9ee45 | 1166 | return _core_.Rect_GetTop(*args, **kwargs) |
e811c8ce RD |
1167 | |
1168 | def GetBottom(*args, **kwargs): | |
a95a7133 | 1169 | """GetBottom(self) -> int""" |
54f9ee45 | 1170 | return _core_.Rect_GetBottom(*args, **kwargs) |
e811c8ce RD |
1171 | |
1172 | def GetRight(*args, **kwargs): | |
a95a7133 | 1173 | """GetRight(self) -> int""" |
54f9ee45 | 1174 | return _core_.Rect_GetRight(*args, **kwargs) |
e811c8ce RD |
1175 | |
1176 | def SetLeft(*args, **kwargs): | |
a95a7133 | 1177 | """SetLeft(self, int left)""" |
54f9ee45 | 1178 | return _core_.Rect_SetLeft(*args, **kwargs) |
e811c8ce RD |
1179 | |
1180 | def SetRight(*args, **kwargs): | |
a95a7133 | 1181 | """SetRight(self, int right)""" |
54f9ee45 | 1182 | return _core_.Rect_SetRight(*args, **kwargs) |
e811c8ce RD |
1183 | |
1184 | def SetTop(*args, **kwargs): | |
a95a7133 | 1185 | """SetTop(self, int top)""" |
54f9ee45 | 1186 | return _core_.Rect_SetTop(*args, **kwargs) |
e811c8ce RD |
1187 | |
1188 | def SetBottom(*args, **kwargs): | |
a95a7133 | 1189 | """SetBottom(self, int bottom)""" |
54f9ee45 | 1190 | return _core_.Rect_SetBottom(*args, **kwargs) |
e811c8ce RD |
1191 | |
1192 | position = property(GetPosition, SetPosition) | |
1193 | size = property(GetSize, SetSize) | |
1194 | left = property(GetLeft, SetLeft) | |
1195 | right = property(GetRight, SetRight) | |
1196 | top = property(GetTop, SetTop) | |
1197 | bottom = property(GetBottom, SetBottom) | |
1198 | ||
1199 | def Inflate(*args, **kwargs): | |
0df68c9f | 1200 | """ |
a95a7133 | 1201 | Inflate(self, int dx, int dy) -> Rect |
e811c8ce | 1202 | |
41e2b43e | 1203 | Increase the rectangle size by dx in x direction and dy in y |
5cbf236d | 1204 | direction. Both (or one of) parameters may be negative to decrease the |
41e2b43e | 1205 | rectangle size. |
0df68c9f | 1206 | """ |
54f9ee45 | 1207 | return _core_.Rect_Inflate(*args, **kwargs) |
e811c8ce RD |
1208 | |
1209 | def Deflate(*args, **kwargs): | |
0df68c9f | 1210 | """ |
a95a7133 | 1211 | Deflate(self, int dx, int dy) -> Rect |
e811c8ce | 1212 | |
41e2b43e | 1213 | Decrease the rectangle size by dx in x direction and dy in y |
5cbf236d | 1214 | direction. Both (or one of) parameters may be negative to increase the |
41e2b43e | 1215 | rectngle size. This method is the opposite of Inflate. |
0df68c9f | 1216 | """ |
54f9ee45 | 1217 | return _core_.Rect_Deflate(*args, **kwargs) |
e811c8ce RD |
1218 | |
1219 | def OffsetXY(*args, **kwargs): | |
0df68c9f | 1220 | """ |
a95a7133 | 1221 | OffsetXY(self, int dx, int dy) |
e811c8ce | 1222 | |
41e2b43e RD |
1223 | Moves the rectangle by the specified offset. If dx is positive, the |
1224 | rectangle is moved to the right, if dy is positive, it is moved to the | |
1225 | bottom, otherwise it is moved to the left or top respectively. | |
0df68c9f | 1226 | """ |
54f9ee45 | 1227 | return _core_.Rect_OffsetXY(*args, **kwargs) |
e811c8ce RD |
1228 | |
1229 | def Offset(*args, **kwargs): | |
0df68c9f | 1230 | """ |
a95a7133 | 1231 | Offset(self, Point pt) |
e811c8ce | 1232 | |
0df68c9f RD |
1233 | Same as OffsetXY but uses dx,dy from Point |
1234 | """ | |
54f9ee45 | 1235 | return _core_.Rect_Offset(*args, **kwargs) |
e811c8ce RD |
1236 | |
1237 | def Intersect(*args, **kwargs): | |
0df68c9f | 1238 | """ |
a95a7133 | 1239 | Intersect(self, Rect rect) -> Rect |
e811c8ce | 1240 | |
5cbf236d | 1241 | Returns the intersectsion of this rectangle and rect. |
0df68c9f | 1242 | """ |
54f9ee45 | 1243 | return _core_.Rect_Intersect(*args, **kwargs) |
e811c8ce | 1244 | |
5cbf236d RD |
1245 | def Union(*args, **kwargs): |
1246 | """ | |
1247 | Union(self, Rect rect) -> Rect | |
1248 | ||
1249 | Returns the union of this rectangle and rect. | |
1250 | """ | |
1251 | return _core_.Rect_Union(*args, **kwargs) | |
1252 | ||
e811c8ce | 1253 | def __add__(*args, **kwargs): |
0df68c9f | 1254 | """ |
a95a7133 | 1255 | __add__(self, Rect rect) -> Rect |
e811c8ce | 1256 | |
0df68c9f RD |
1257 | Add the properties of rect to this rectangle and return the result. |
1258 | """ | |
54f9ee45 | 1259 | return _core_.Rect___add__(*args, **kwargs) |
e811c8ce RD |
1260 | |
1261 | def __iadd__(*args, **kwargs): | |
0df68c9f | 1262 | """ |
a95a7133 | 1263 | __iadd__(self, Rect rect) -> Rect |
e811c8ce | 1264 | |
0df68c9f RD |
1265 | Add the properties of rect to this rectangle, updating this rectangle. |
1266 | """ | |
54f9ee45 | 1267 | return _core_.Rect___iadd__(*args, **kwargs) |
e811c8ce RD |
1268 | |
1269 | def __eq__(*args, **kwargs): | |
0df68c9f | 1270 | """ |
a95a7133 | 1271 | __eq__(self, Rect rect) -> bool |
e811c8ce | 1272 | |
0df68c9f RD |
1273 | Test for equality. |
1274 | """ | |
54f9ee45 | 1275 | return _core_.Rect___eq__(*args, **kwargs) |
e811c8ce RD |
1276 | |
1277 | def __ne__(*args, **kwargs): | |
0df68c9f | 1278 | """ |
a95a7133 | 1279 | __ne__(self, Rect rect) -> bool |
e811c8ce | 1280 | |
0df68c9f RD |
1281 | Test for inequality. |
1282 | """ | |
54f9ee45 | 1283 | return _core_.Rect___ne__(*args, **kwargs) |
e811c8ce RD |
1284 | |
1285 | def InsideXY(*args, **kwargs): | |
0df68c9f | 1286 | """ |
a95a7133 | 1287 | InsideXY(self, int x, int y) -> bool |
e811c8ce | 1288 | |
0df68c9f RD |
1289 | Return True if the point is (not strcitly) inside the rect. |
1290 | """ | |
54f9ee45 | 1291 | return _core_.Rect_InsideXY(*args, **kwargs) |
e811c8ce RD |
1292 | |
1293 | def Inside(*args, **kwargs): | |
0df68c9f | 1294 | """ |
a95a7133 | 1295 | Inside(self, Point pt) -> bool |
e811c8ce | 1296 | |
0df68c9f RD |
1297 | Return True if the point is (not strcitly) inside the rect. |
1298 | """ | |
54f9ee45 | 1299 | return _core_.Rect_Inside(*args, **kwargs) |
e811c8ce RD |
1300 | |
1301 | def Intersects(*args, **kwargs): | |
0df68c9f | 1302 | """ |
a95a7133 | 1303 | Intersects(self, Rect rect) -> bool |
e811c8ce | 1304 | |
0df68c9f RD |
1305 | Returns True if the rectangles have a non empty intersection. |
1306 | """ | |
54f9ee45 | 1307 | return _core_.Rect_Intersects(*args, **kwargs) |
e811c8ce | 1308 | |
54f9ee45 RD |
1309 | x = property(_core_.Rect_x_get, _core_.Rect_x_set) |
1310 | y = property(_core_.Rect_y_get, _core_.Rect_y_set) | |
1311 | width = property(_core_.Rect_width_get, _core_.Rect_width_set) | |
1312 | height = property(_core_.Rect_height_get, _core_.Rect_height_set) | |
e811c8ce | 1313 | def Set(*args, **kwargs): |
0df68c9f | 1314 | """ |
a95a7133 | 1315 | Set(self, int x=0, int y=0, int width=0, int height=0) |
e811c8ce | 1316 | |
0df68c9f RD |
1317 | Set all rectangle properties. |
1318 | """ | |
54f9ee45 | 1319 | return _core_.Rect_Set(*args, **kwargs) |
e811c8ce RD |
1320 | |
1321 | def Get(*args, **kwargs): | |
0df68c9f RD |
1322 | """ |
1323 | Get() -> (x,y,width,height) | |
e811c8ce | 1324 | |
0df68c9f RD |
1325 | Return the rectangle properties as a tuple. |
1326 | """ | |
54f9ee45 | 1327 | return _core_.Rect_Get(*args, **kwargs) |
e811c8ce | 1328 | |
41e2b43e | 1329 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1330 | def __str__(self): return str(self.Get()) |
1331 | def __repr__(self): return 'wx.Rect'+str(self.Get()) | |
1332 | def __len__(self): return len(self.Get()) | |
1333 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1334 | def __setitem__(self, index, val): |
1335 | if index == 0: self.x = val | |
1336 | elif index == 1: self.y = val | |
1337 | elif index == 2: self.width = val | |
1338 | elif index == 3: self.height = val | |
1339 | else: raise IndexError | |
e811c8ce | 1340 | def __nonzero__(self): return self.Get() != (0,0,0,0) |
74e96f3d RD |
1341 | __safe_for_unpickling__ = True |
1342 | def __reduce__(self): return (wx.Rect, self.Get()) | |
d14a1e28 RD |
1343 | |
1344 | ||
1345 | class RectPtr(Rect): | |
1346 | def __init__(self, this): | |
1347 | self.this = this | |
1348 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1349 | self.__class__ = Rect | |
54f9ee45 | 1350 | _core_.Rect_swigregister(RectPtr) |
d14a1e28 RD |
1351 | |
1352 | def RectPP(*args, **kwargs): | |
0df68c9f RD |
1353 | """ |
1354 | RectPP(Point topLeft, Point bottomRight) -> Rect | |
e811c8ce | 1355 | |
0df68c9f RD |
1356 | Create a new Rect object from Points representing two corners. |
1357 | """ | |
54f9ee45 | 1358 | val = _core_.new_RectPP(*args, **kwargs) |
d14a1e28 RD |
1359 | val.thisown = 1 |
1360 | return val | |
1361 | ||
1362 | def RectPS(*args, **kwargs): | |
0df68c9f RD |
1363 | """ |
1364 | RectPS(Point pos, Size size) -> Rect | |
e811c8ce | 1365 | |
0df68c9f RD |
1366 | Create a new Rect from a position and size. |
1367 | """ | |
54f9ee45 | 1368 | val = _core_.new_RectPS(*args, **kwargs) |
d14a1e28 RD |
1369 | val.thisown = 1 |
1370 | return val | |
1371 | ||
d3b6e4ff RD |
1372 | def RectS(*args, **kwargs): |
1373 | """ | |
1374 | RectS(Size size) -> Rect | |
1375 | ||
1376 | Create a new Rect from a size only. | |
1377 | """ | |
1378 | val = _core_.new_RectS(*args, **kwargs) | |
1379 | val.thisown = 1 | |
1380 | return val | |
1381 | ||
d14a1e28 | 1382 | |
e811c8ce | 1383 | def IntersectRect(*args, **kwargs): |
0df68c9f RD |
1384 | """ |
1385 | IntersectRect(Rect r1, Rect r2) -> Rect | |
e811c8ce | 1386 | |
0df68c9f RD |
1387 | Calculate and return the intersection of r1 and r2. |
1388 | """ | |
54f9ee45 | 1389 | return _core_.IntersectRect(*args, **kwargs) |
d14a1e28 RD |
1390 | #--------------------------------------------------------------------------- |
1391 | ||
1392 | class Point2D(object): | |
41e2b43e RD |
1393 | """ |
1394 | wx.Point2Ds represent a point or a vector in a 2d coordinate system | |
1395 | with floating point values. | |
1396 | """ | |
e811c8ce RD |
1397 | def __repr__(self): |
1398 | return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1399 | def __init__(self, *args, **kwargs): |
0df68c9f | 1400 | """ |
a95a7133 | 1401 | __init__(self, double x=0.0, double y=0.0) -> Point2D |
e811c8ce | 1402 | |
0df68c9f RD |
1403 | Create a w.Point2D object. |
1404 | """ | |
54f9ee45 | 1405 | newobj = _core_.new_Point2D(*args, **kwargs) |
d14a1e28 RD |
1406 | self.this = newobj.this |
1407 | self.thisown = 1 | |
1408 | del newobj.thisown | |
e811c8ce | 1409 | def GetFloor(*args, **kwargs): |
fd2dc343 RD |
1410 | """ |
1411 | GetFloor() -> (x,y) | |
1412 | ||
1413 | Convert to integer | |
1414 | """ | |
54f9ee45 | 1415 | return _core_.Point2D_GetFloor(*args, **kwargs) |
e811c8ce RD |
1416 | |
1417 | def GetRounded(*args, **kwargs): | |
fd2dc343 RD |
1418 | """ |
1419 | GetRounded() -> (x,y) | |
1420 | ||
1421 | Convert to integer | |
1422 | """ | |
54f9ee45 | 1423 | return _core_.Point2D_GetRounded(*args, **kwargs) |
e811c8ce RD |
1424 | |
1425 | def GetVectorLength(*args, **kwargs): | |
a95a7133 | 1426 | """GetVectorLength(self) -> double""" |
54f9ee45 | 1427 | return _core_.Point2D_GetVectorLength(*args, **kwargs) |
e811c8ce RD |
1428 | |
1429 | def GetVectorAngle(*args, **kwargs): | |
a95a7133 | 1430 | """GetVectorAngle(self) -> double""" |
54f9ee45 | 1431 | return _core_.Point2D_GetVectorAngle(*args, **kwargs) |
e811c8ce RD |
1432 | |
1433 | def SetVectorLength(*args, **kwargs): | |
a95a7133 | 1434 | """SetVectorLength(self, double length)""" |
54f9ee45 | 1435 | return _core_.Point2D_SetVectorLength(*args, **kwargs) |
e811c8ce RD |
1436 | |
1437 | def SetVectorAngle(*args, **kwargs): | |
a95a7133 | 1438 | """SetVectorAngle(self, double degrees)""" |
54f9ee45 | 1439 | return _core_.Point2D_SetVectorAngle(*args, **kwargs) |
e811c8ce | 1440 | |
d14a1e28 RD |
1441 | def SetPolarCoordinates(self, angle, length): |
1442 | self.SetVectorLength(length) | |
1443 | self.SetVectorAngle(angle) | |
1444 | def Normalize(self): | |
1445 | self.SetVectorLength(1.0) | |
1446 | ||
e811c8ce | 1447 | def GetDistance(*args, **kwargs): |
a95a7133 | 1448 | """GetDistance(self, Point2D pt) -> double""" |
54f9ee45 | 1449 | return _core_.Point2D_GetDistance(*args, **kwargs) |
e811c8ce RD |
1450 | |
1451 | def GetDistanceSquare(*args, **kwargs): | |
a95a7133 | 1452 | """GetDistanceSquare(self, Point2D pt) -> double""" |
54f9ee45 | 1453 | return _core_.Point2D_GetDistanceSquare(*args, **kwargs) |
e811c8ce RD |
1454 | |
1455 | def GetDotProduct(*args, **kwargs): | |
a95a7133 | 1456 | """GetDotProduct(self, Point2D vec) -> double""" |
54f9ee45 | 1457 | return _core_.Point2D_GetDotProduct(*args, **kwargs) |
e811c8ce RD |
1458 | |
1459 | def GetCrossProduct(*args, **kwargs): | |
a95a7133 | 1460 | """GetCrossProduct(self, Point2D vec) -> double""" |
54f9ee45 | 1461 | return _core_.Point2D_GetCrossProduct(*args, **kwargs) |
e811c8ce RD |
1462 | |
1463 | def __neg__(*args, **kwargs): | |
0df68c9f | 1464 | """ |
a95a7133 | 1465 | __neg__(self) -> Point2D |
e811c8ce | 1466 | |
0df68c9f RD |
1467 | the reflection of this point |
1468 | """ | |
54f9ee45 | 1469 | return _core_.Point2D___neg__(*args, **kwargs) |
e811c8ce RD |
1470 | |
1471 | def __iadd__(*args, **kwargs): | |
a95a7133 | 1472 | """__iadd__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1473 | return _core_.Point2D___iadd__(*args, **kwargs) |
e811c8ce RD |
1474 | |
1475 | def __isub__(*args, **kwargs): | |
a95a7133 | 1476 | """__isub__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1477 | return _core_.Point2D___isub__(*args, **kwargs) |
e811c8ce RD |
1478 | |
1479 | def __imul__(*args, **kwargs): | |
a95a7133 | 1480 | """__imul__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1481 | return _core_.Point2D___imul__(*args, **kwargs) |
e811c8ce RD |
1482 | |
1483 | def __idiv__(*args, **kwargs): | |
a95a7133 | 1484 | """__idiv__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1485 | return _core_.Point2D___idiv__(*args, **kwargs) |
e811c8ce RD |
1486 | |
1487 | def __eq__(*args, **kwargs): | |
0df68c9f | 1488 | """ |
a95a7133 | 1489 | __eq__(self, Point2D pt) -> bool |
e811c8ce | 1490 | |
0df68c9f RD |
1491 | Test for equality |
1492 | """ | |
54f9ee45 | 1493 | return _core_.Point2D___eq__(*args, **kwargs) |
e811c8ce RD |
1494 | |
1495 | def __ne__(*args, **kwargs): | |
0df68c9f | 1496 | """ |
a95a7133 | 1497 | __ne__(self, Point2D pt) -> bool |
e811c8ce | 1498 | |
0df68c9f RD |
1499 | Test for inequality |
1500 | """ | |
54f9ee45 | 1501 | return _core_.Point2D___ne__(*args, **kwargs) |
e811c8ce | 1502 | |
54f9ee45 RD |
1503 | x = property(_core_.Point2D_x_get, _core_.Point2D_x_set) |
1504 | y = property(_core_.Point2D_y_get, _core_.Point2D_y_set) | |
e811c8ce | 1505 | def Set(*args, **kwargs): |
a95a7133 | 1506 | """Set(self, double x=0, double y=0)""" |
54f9ee45 | 1507 | return _core_.Point2D_Set(*args, **kwargs) |
e811c8ce RD |
1508 | |
1509 | def Get(*args, **kwargs): | |
0df68c9f RD |
1510 | """ |
1511 | Get() -> (x,y) | |
e811c8ce | 1512 | |
0df68c9f RD |
1513 | Return x and y properties as a tuple. |
1514 | """ | |
54f9ee45 | 1515 | return _core_.Point2D_Get(*args, **kwargs) |
e811c8ce | 1516 | |
41e2b43e | 1517 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1518 | def __str__(self): return str(self.Get()) |
1519 | def __repr__(self): return 'wx.Point2D'+str(self.Get()) | |
1520 | def __len__(self): return len(self.Get()) | |
1521 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 1522 | def __setitem__(self, index, val): |
e811c8ce RD |
1523 | if index == 0: self.x = val |
1524 | elif index == 1: self.y = val | |
d14a1e28 | 1525 | else: raise IndexError |
e811c8ce | 1526 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
1527 | __safe_for_unpickling__ = True |
1528 | def __reduce__(self): return (wx.Point2D, self.Get()) | |
d14a1e28 RD |
1529 | |
1530 | ||
1531 | class Point2DPtr(Point2D): | |
1532 | def __init__(self, this): | |
1533 | self.this = this | |
1534 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1535 | self.__class__ = Point2D | |
54f9ee45 | 1536 | _core_.Point2D_swigregister(Point2DPtr) |
d14a1e28 RD |
1537 | |
1538 | def Point2DCopy(*args, **kwargs): | |
0df68c9f RD |
1539 | """ |
1540 | Point2DCopy(Point2D pt) -> Point2D | |
e811c8ce | 1541 | |
0df68c9f RD |
1542 | Create a w.Point2D object. |
1543 | """ | |
54f9ee45 | 1544 | val = _core_.new_Point2DCopy(*args, **kwargs) |
d14a1e28 RD |
1545 | val.thisown = 1 |
1546 | return val | |
1547 | ||
1548 | def Point2DFromPoint(*args, **kwargs): | |
0df68c9f RD |
1549 | """ |
1550 | Point2DFromPoint(Point pt) -> Point2D | |
e811c8ce | 1551 | |
0df68c9f RD |
1552 | Create a w.Point2D object. |
1553 | """ | |
54f9ee45 | 1554 | val = _core_.new_Point2DFromPoint(*args, **kwargs) |
d14a1e28 RD |
1555 | val.thisown = 1 |
1556 | return val | |
1557 | ||
1558 | #--------------------------------------------------------------------------- | |
1559 | ||
54f9ee45 RD |
1560 | FromStart = _core_.FromStart |
1561 | FromCurrent = _core_.FromCurrent | |
1562 | FromEnd = _core_.FromEnd | |
d14a1e28 | 1563 | class InputStream(object): |
093d3ff1 | 1564 | """Proxy of C++ InputStream class""" |
e811c8ce RD |
1565 | def __repr__(self): |
1566 | return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1567 | def __init__(self, *args, **kwargs): |
a95a7133 | 1568 | """__init__(self, PyObject p) -> InputStream""" |
54f9ee45 | 1569 | newobj = _core_.new_InputStream(*args, **kwargs) |
d14a1e28 RD |
1570 | self.this = newobj.this |
1571 | self.thisown = 1 | |
1572 | del newobj.thisown | |
8fb0e70a RD |
1573 | def __del__(self, destroy=_core_.delete_InputStream): |
1574 | """__del__(self)""" | |
1575 | try: | |
1576 | if self.thisown: destroy(self) | |
1577 | except: pass | |
1578 | ||
e811c8ce | 1579 | def close(*args, **kwargs): |
a95a7133 | 1580 | """close(self)""" |
54f9ee45 | 1581 | return _core_.InputStream_close(*args, **kwargs) |
e811c8ce RD |
1582 | |
1583 | def flush(*args, **kwargs): | |
a95a7133 | 1584 | """flush(self)""" |
54f9ee45 | 1585 | return _core_.InputStream_flush(*args, **kwargs) |
e811c8ce RD |
1586 | |
1587 | def eof(*args, **kwargs): | |
a95a7133 | 1588 | """eof(self) -> bool""" |
54f9ee45 | 1589 | return _core_.InputStream_eof(*args, **kwargs) |
e811c8ce RD |
1590 | |
1591 | def read(*args, **kwargs): | |
a95a7133 | 1592 | """read(self, int size=-1) -> PyObject""" |
54f9ee45 | 1593 | return _core_.InputStream_read(*args, **kwargs) |
e811c8ce RD |
1594 | |
1595 | def readline(*args, **kwargs): | |
a95a7133 | 1596 | """readline(self, int size=-1) -> PyObject""" |
54f9ee45 | 1597 | return _core_.InputStream_readline(*args, **kwargs) |
e811c8ce RD |
1598 | |
1599 | def readlines(*args, **kwargs): | |
a95a7133 | 1600 | """readlines(self, int sizehint=-1) -> PyObject""" |
54f9ee45 | 1601 | return _core_.InputStream_readlines(*args, **kwargs) |
e811c8ce RD |
1602 | |
1603 | def seek(*args, **kwargs): | |
a95a7133 | 1604 | """seek(self, int offset, int whence=0)""" |
54f9ee45 | 1605 | return _core_.InputStream_seek(*args, **kwargs) |
e811c8ce RD |
1606 | |
1607 | def tell(*args, **kwargs): | |
a95a7133 | 1608 | """tell(self) -> int""" |
54f9ee45 | 1609 | return _core_.InputStream_tell(*args, **kwargs) |
e811c8ce RD |
1610 | |
1611 | def Peek(*args, **kwargs): | |
a95a7133 | 1612 | """Peek(self) -> char""" |
54f9ee45 | 1613 | return _core_.InputStream_Peek(*args, **kwargs) |
e811c8ce RD |
1614 | |
1615 | def GetC(*args, **kwargs): | |
a95a7133 | 1616 | """GetC(self) -> char""" |
54f9ee45 | 1617 | return _core_.InputStream_GetC(*args, **kwargs) |
e811c8ce RD |
1618 | |
1619 | def LastRead(*args, **kwargs): | |
a95a7133 | 1620 | """LastRead(self) -> size_t""" |
54f9ee45 | 1621 | return _core_.InputStream_LastRead(*args, **kwargs) |
e811c8ce RD |
1622 | |
1623 | def CanRead(*args, **kwargs): | |
a95a7133 | 1624 | """CanRead(self) -> bool""" |
54f9ee45 | 1625 | return _core_.InputStream_CanRead(*args, **kwargs) |
e811c8ce RD |
1626 | |
1627 | def Eof(*args, **kwargs): | |
a95a7133 | 1628 | """Eof(self) -> bool""" |
54f9ee45 | 1629 | return _core_.InputStream_Eof(*args, **kwargs) |
e811c8ce RD |
1630 | |
1631 | def Ungetch(*args, **kwargs): | |
a95a7133 | 1632 | """Ungetch(self, char c) -> bool""" |
54f9ee45 | 1633 | return _core_.InputStream_Ungetch(*args, **kwargs) |
e811c8ce RD |
1634 | |
1635 | def SeekI(*args, **kwargs): | |
a95a7133 | 1636 | """SeekI(self, long pos, int mode=FromStart) -> long""" |
54f9ee45 | 1637 | return _core_.InputStream_SeekI(*args, **kwargs) |
e811c8ce RD |
1638 | |
1639 | def TellI(*args, **kwargs): | |
a95a7133 | 1640 | """TellI(self) -> long""" |
54f9ee45 | 1641 | return _core_.InputStream_TellI(*args, **kwargs) |
e811c8ce | 1642 | |
d14a1e28 RD |
1643 | |
1644 | class InputStreamPtr(InputStream): | |
1645 | def __init__(self, this): | |
1646 | self.this = this | |
1647 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1648 | self.__class__ = InputStream | |
54f9ee45 | 1649 | _core_.InputStream_swigregister(InputStreamPtr) |
d14a1e28 RD |
1650 | DefaultPosition = cvar.DefaultPosition |
1651 | DefaultSize = cvar.DefaultSize | |
1652 | ||
1653 | class OutputStream(object): | |
093d3ff1 | 1654 | """Proxy of C++ OutputStream class""" |
d14a1e28 RD |
1655 | def __init__(self): raise RuntimeError, "No constructor defined" |
1656 | def __repr__(self): | |
1657 | return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 1658 | def write(*args, **kwargs): |
a95a7133 | 1659 | """write(self, PyObject obj)""" |
54f9ee45 | 1660 | return _core_.OutputStream_write(*args, **kwargs) |
e811c8ce | 1661 | |
d14a1e28 RD |
1662 | |
1663 | class OutputStreamPtr(OutputStream): | |
1664 | def __init__(self, this): | |
1665 | self.this = this | |
1666 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1667 | self.__class__ = OutputStream | |
54f9ee45 | 1668 | _core_.OutputStream_swigregister(OutputStreamPtr) |
d14a1e28 RD |
1669 | |
1670 | #--------------------------------------------------------------------------- | |
1671 | ||
1672 | class FSFile(Object): | |
093d3ff1 | 1673 | """Proxy of C++ FSFile class""" |
e811c8ce RD |
1674 | def __repr__(self): |
1675 | return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1676 | def __init__(self, *args, **kwargs): |
0df68c9f | 1677 | """ |
a95a7133 | 1678 | __init__(self, InputStream stream, String loc, String mimetype, String anchor, |
196addbf | 1679 | DateTime modif) -> FSFile |
0df68c9f | 1680 | """ |
54f9ee45 | 1681 | newobj = _core_.new_FSFile(*args, **kwargs) |
d14a1e28 RD |
1682 | self.this = newobj.this |
1683 | self.thisown = 1 | |
1684 | del newobj.thisown | |
4cf4100f RD |
1685 | self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem |
1686 | ||
54f9ee45 | 1687 | def __del__(self, destroy=_core_.delete_FSFile): |
a95a7133 | 1688 | """__del__(self)""" |
d14a1e28 RD |
1689 | try: |
1690 | if self.thisown: destroy(self) | |
1691 | except: pass | |
e811c8ce RD |
1692 | |
1693 | def GetStream(*args, **kwargs): | |
a95a7133 | 1694 | """GetStream(self) -> InputStream""" |
54f9ee45 | 1695 | return _core_.FSFile_GetStream(*args, **kwargs) |
e811c8ce RD |
1696 | |
1697 | def GetMimeType(*args, **kwargs): | |
a95a7133 | 1698 | """GetMimeType(self) -> String""" |
54f9ee45 | 1699 | return _core_.FSFile_GetMimeType(*args, **kwargs) |
e811c8ce RD |
1700 | |
1701 | def GetLocation(*args, **kwargs): | |
a95a7133 | 1702 | """GetLocation(self) -> String""" |
54f9ee45 | 1703 | return _core_.FSFile_GetLocation(*args, **kwargs) |
e811c8ce RD |
1704 | |
1705 | def GetAnchor(*args, **kwargs): | |
a95a7133 | 1706 | """GetAnchor(self) -> String""" |
54f9ee45 | 1707 | return _core_.FSFile_GetAnchor(*args, **kwargs) |
e811c8ce RD |
1708 | |
1709 | def GetModificationTime(*args, **kwargs): | |
a95a7133 | 1710 | """GetModificationTime(self) -> DateTime""" |
54f9ee45 | 1711 | return _core_.FSFile_GetModificationTime(*args, **kwargs) |
e811c8ce | 1712 | |
d14a1e28 RD |
1713 | |
1714 | class FSFilePtr(FSFile): | |
1715 | def __init__(self, this): | |
1716 | self.this = this | |
1717 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1718 | self.__class__ = FSFile | |
54f9ee45 | 1719 | _core_.FSFile_swigregister(FSFilePtr) |
d14a1e28 RD |
1720 | |
1721 | class CPPFileSystemHandler(object): | |
093d3ff1 | 1722 | """Proxy of C++ CPPFileSystemHandler class""" |
d14a1e28 RD |
1723 | def __init__(self): raise RuntimeError, "No constructor defined" |
1724 | def __repr__(self): | |
1725 | return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1726 | ||
1727 | class CPPFileSystemHandlerPtr(CPPFileSystemHandler): | |
1728 | def __init__(self, this): | |
1729 | self.this = this | |
1730 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1731 | self.__class__ = CPPFileSystemHandler | |
54f9ee45 | 1732 | _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr) |
d14a1e28 RD |
1733 | |
1734 | class FileSystemHandler(CPPFileSystemHandler): | |
093d3ff1 | 1735 | """Proxy of C++ FileSystemHandler class""" |
e811c8ce RD |
1736 | def __repr__(self): |
1737 | return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1738 | def __init__(self, *args, **kwargs): |
a95a7133 | 1739 | """__init__(self) -> FileSystemHandler""" |
54f9ee45 | 1740 | newobj = _core_.new_FileSystemHandler(*args, **kwargs) |
d14a1e28 RD |
1741 | self.this = newobj.this |
1742 | self.thisown = 1 | |
1743 | del newobj.thisown | |
1744 | self._setCallbackInfo(self, FileSystemHandler) | |
e811c8ce RD |
1745 | |
1746 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 1747 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 1748 | return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
1749 | |
1750 | def CanOpen(*args, **kwargs): | |
a95a7133 | 1751 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1752 | return _core_.FileSystemHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1753 | |
1754 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1755 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1756 | return _core_.FileSystemHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1757 | |
1758 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1759 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1760 | return _core_.FileSystemHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1761 | |
1762 | def FindNext(*args, **kwargs): | |
a95a7133 | 1763 | """FindNext(self) -> String""" |
54f9ee45 | 1764 | return _core_.FileSystemHandler_FindNext(*args, **kwargs) |
e811c8ce RD |
1765 | |
1766 | def GetProtocol(*args, **kwargs): | |
a95a7133 | 1767 | """GetProtocol(self, String location) -> String""" |
54f9ee45 | 1768 | return _core_.FileSystemHandler_GetProtocol(*args, **kwargs) |
e811c8ce RD |
1769 | |
1770 | def GetLeftLocation(*args, **kwargs): | |
a95a7133 | 1771 | """GetLeftLocation(self, String location) -> String""" |
54f9ee45 | 1772 | return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs) |
e811c8ce RD |
1773 | |
1774 | def GetAnchor(*args, **kwargs): | |
a95a7133 | 1775 | """GetAnchor(self, String location) -> String""" |
54f9ee45 | 1776 | return _core_.FileSystemHandler_GetAnchor(*args, **kwargs) |
e811c8ce RD |
1777 | |
1778 | def GetRightLocation(*args, **kwargs): | |
a95a7133 | 1779 | """GetRightLocation(self, String location) -> String""" |
54f9ee45 | 1780 | return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs) |
e811c8ce RD |
1781 | |
1782 | def GetMimeTypeFromExt(*args, **kwargs): | |
a95a7133 | 1783 | """GetMimeTypeFromExt(self, String location) -> String""" |
54f9ee45 | 1784 | return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs) |
e811c8ce | 1785 | |
d14a1e28 RD |
1786 | |
1787 | class FileSystemHandlerPtr(FileSystemHandler): | |
1788 | def __init__(self, this): | |
1789 | self.this = this | |
1790 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1791 | self.__class__ = FileSystemHandler | |
54f9ee45 | 1792 | _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr) |
d14a1e28 RD |
1793 | |
1794 | class FileSystem(Object): | |
093d3ff1 | 1795 | """Proxy of C++ FileSystem class""" |
e811c8ce RD |
1796 | def __repr__(self): |
1797 | return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1798 | def __init__(self, *args, **kwargs): |
a95a7133 | 1799 | """__init__(self) -> FileSystem""" |
54f9ee45 | 1800 | newobj = _core_.new_FileSystem(*args, **kwargs) |
d14a1e28 RD |
1801 | self.this = newobj.this |
1802 | self.thisown = 1 | |
1803 | del newobj.thisown | |
54f9ee45 | 1804 | def __del__(self, destroy=_core_.delete_FileSystem): |
a95a7133 | 1805 | """__del__(self)""" |
d14a1e28 RD |
1806 | try: |
1807 | if self.thisown: destroy(self) | |
1808 | except: pass | |
e811c8ce RD |
1809 | |
1810 | def ChangePathTo(*args, **kwargs): | |
a95a7133 | 1811 | """ChangePathTo(self, String location, bool is_dir=False)""" |
54f9ee45 | 1812 | return _core_.FileSystem_ChangePathTo(*args, **kwargs) |
e811c8ce RD |
1813 | |
1814 | def GetPath(*args, **kwargs): | |
a95a7133 | 1815 | """GetPath(self) -> String""" |
54f9ee45 | 1816 | return _core_.FileSystem_GetPath(*args, **kwargs) |
e811c8ce RD |
1817 | |
1818 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1819 | """OpenFile(self, String location) -> FSFile""" |
54f9ee45 | 1820 | return _core_.FileSystem_OpenFile(*args, **kwargs) |
e811c8ce RD |
1821 | |
1822 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1823 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1824 | return _core_.FileSystem_FindFirst(*args, **kwargs) |
e811c8ce RD |
1825 | |
1826 | def FindNext(*args, **kwargs): | |
a95a7133 | 1827 | """FindNext(self) -> String""" |
54f9ee45 | 1828 | return _core_.FileSystem_FindNext(*args, **kwargs) |
e811c8ce RD |
1829 | |
1830 | def AddHandler(*args, **kwargs): | |
66c033b4 | 1831 | """AddHandler(CPPFileSystemHandler handler)""" |
54f9ee45 | 1832 | return _core_.FileSystem_AddHandler(*args, **kwargs) |
e811c8ce RD |
1833 | |
1834 | AddHandler = staticmethod(AddHandler) | |
1835 | def CleanUpHandlers(*args, **kwargs): | |
66c033b4 | 1836 | """CleanUpHandlers()""" |
54f9ee45 | 1837 | return _core_.FileSystem_CleanUpHandlers(*args, **kwargs) |
e811c8ce RD |
1838 | |
1839 | CleanUpHandlers = staticmethod(CleanUpHandlers) | |
1840 | def FileNameToURL(*args, **kwargs): | |
66c033b4 | 1841 | """FileNameToURL(String filename) -> String""" |
54f9ee45 | 1842 | return _core_.FileSystem_FileNameToURL(*args, **kwargs) |
e811c8ce RD |
1843 | |
1844 | FileNameToURL = staticmethod(FileNameToURL) | |
2ef75293 RD |
1845 | def URLToFileName(*args, **kwargs): |
1846 | """URLToFileName(String url) -> String""" | |
1847 | return _core_.FileSystem_URLToFileName(*args, **kwargs) | |
1848 | ||
1849 | URLToFileName = staticmethod(URLToFileName) | |
d14a1e28 RD |
1850 | |
1851 | class FileSystemPtr(FileSystem): | |
1852 | def __init__(self, this): | |
1853 | self.this = this | |
1854 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1855 | self.__class__ = FileSystem | |
54f9ee45 | 1856 | _core_.FileSystem_swigregister(FileSystemPtr) |
d14a1e28 | 1857 | |
e811c8ce RD |
1858 | def FileSystem_AddHandler(*args, **kwargs): |
1859 | """FileSystem_AddHandler(CPPFileSystemHandler handler)""" | |
54f9ee45 | 1860 | return _core_.FileSystem_AddHandler(*args, **kwargs) |
d14a1e28 | 1861 | |
e811c8ce RD |
1862 | def FileSystem_CleanUpHandlers(*args, **kwargs): |
1863 | """FileSystem_CleanUpHandlers()""" | |
54f9ee45 | 1864 | return _core_.FileSystem_CleanUpHandlers(*args, **kwargs) |
d14a1e28 | 1865 | |
e811c8ce | 1866 | def FileSystem_FileNameToURL(*args, **kwargs): |
196addbf | 1867 | """FileSystem_FileNameToURL(String filename) -> String""" |
54f9ee45 | 1868 | return _core_.FileSystem_FileNameToURL(*args, **kwargs) |
d14a1e28 | 1869 | |
e811c8ce | 1870 | def FileSystem_URLToFileName(*args, **kwargs): |
196addbf | 1871 | """FileSystem_URLToFileName(String url) -> String""" |
54f9ee45 | 1872 | return _core_.FileSystem_URLToFileName(*args, **kwargs) |
2ef75293 | 1873 | |
d14a1e28 | 1874 | class InternetFSHandler(CPPFileSystemHandler): |
093d3ff1 | 1875 | """Proxy of C++ InternetFSHandler class""" |
e811c8ce RD |
1876 | def __repr__(self): |
1877 | return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1878 | def __init__(self, *args, **kwargs): |
a95a7133 | 1879 | """__init__(self) -> InternetFSHandler""" |
54f9ee45 | 1880 | newobj = _core_.new_InternetFSHandler(*args, **kwargs) |
d14a1e28 RD |
1881 | self.this = newobj.this |
1882 | self.thisown = 1 | |
1883 | del newobj.thisown | |
e811c8ce | 1884 | def CanOpen(*args, **kwargs): |
a95a7133 | 1885 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1886 | return _core_.InternetFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1887 | |
1888 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1889 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1890 | return _core_.InternetFSHandler_OpenFile(*args, **kwargs) |
e811c8ce | 1891 | |
d14a1e28 RD |
1892 | |
1893 | class InternetFSHandlerPtr(InternetFSHandler): | |
1894 | def __init__(self, this): | |
1895 | self.this = this | |
1896 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1897 | self.__class__ = InternetFSHandler | |
54f9ee45 | 1898 | _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr) |
d14a1e28 RD |
1899 | |
1900 | class ZipFSHandler(CPPFileSystemHandler): | |
093d3ff1 | 1901 | """Proxy of C++ ZipFSHandler class""" |
e811c8ce RD |
1902 | def __repr__(self): |
1903 | return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1904 | def __init__(self, *args, **kwargs): |
a95a7133 | 1905 | """__init__(self) -> ZipFSHandler""" |
54f9ee45 | 1906 | newobj = _core_.new_ZipFSHandler(*args, **kwargs) |
d14a1e28 RD |
1907 | self.this = newobj.this |
1908 | self.thisown = 1 | |
1909 | del newobj.thisown | |
e811c8ce | 1910 | def CanOpen(*args, **kwargs): |
a95a7133 | 1911 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1912 | return _core_.ZipFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1913 | |
1914 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1915 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1916 | return _core_.ZipFSHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1917 | |
1918 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1919 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1920 | return _core_.ZipFSHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1921 | |
1922 | def FindNext(*args, **kwargs): | |
a95a7133 | 1923 | """FindNext(self) -> String""" |
54f9ee45 | 1924 | return _core_.ZipFSHandler_FindNext(*args, **kwargs) |
e811c8ce | 1925 | |
d14a1e28 RD |
1926 | |
1927 | class ZipFSHandlerPtr(ZipFSHandler): | |
1928 | def __init__(self, this): | |
1929 | self.this = this | |
1930 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1931 | self.__class__ = ZipFSHandler | |
54f9ee45 | 1932 | _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr) |
d14a1e28 RD |
1933 | |
1934 | ||
e811c8ce | 1935 | def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs): |
196addbf | 1936 | """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)""" |
54f9ee45 | 1937 | return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs) |
d14a1e28 | 1938 | |
e811c8ce | 1939 | def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs): |
196addbf | 1940 | """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)""" |
54f9ee45 | 1941 | return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs) |
d14a1e28 | 1942 | |
e811c8ce | 1943 | def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs): |
196addbf | 1944 | """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)""" |
54f9ee45 | 1945 | return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs) |
2ef75293 RD |
1946 | def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1): |
1947 | """ | |
1948 | Add 'file' to the memory filesystem. The dataItem parameter can | |
1949 | either be a `wx.Bitmap`, `wx.Image` or a string that can contain | |
1950 | arbitrary data. If a bitmap or image is used then the imgType | |
1951 | parameter should specify what kind of image file it should be | |
1952 | written as, wx.BITMAP_TYPE_PNG, etc. | |
1953 | """ | |
1954 | if isinstance(dataItem, wx.Image): | |
1955 | __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType) | |
1956 | elif isinstance(dataItem, wx.Bitmap): | |
1957 | __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType) | |
1958 | elif type(dataItem) == str: | |
1959 | __wxMemoryFSHandler_AddFile_Data(filename, dataItem) | |
1960 | else: | |
1961 | raise TypeError, 'wx.Image, wx.Bitmap or string expected' | |
d14a1e28 RD |
1962 | |
1963 | class MemoryFSHandler(CPPFileSystemHandler): | |
093d3ff1 | 1964 | """Proxy of C++ MemoryFSHandler class""" |
e811c8ce RD |
1965 | def __repr__(self): |
1966 | return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1967 | def __init__(self, *args, **kwargs): |
a95a7133 | 1968 | """__init__(self) -> MemoryFSHandler""" |
54f9ee45 | 1969 | newobj = _core_.new_MemoryFSHandler(*args, **kwargs) |
d14a1e28 RD |
1970 | self.this = newobj.this |
1971 | self.thisown = 1 | |
1972 | del newobj.thisown | |
e811c8ce | 1973 | def RemoveFile(*args, **kwargs): |
66c033b4 | 1974 | """RemoveFile(String filename)""" |
54f9ee45 | 1975 | return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) |
e811c8ce RD |
1976 | |
1977 | RemoveFile = staticmethod(RemoveFile) | |
d14a1e28 | 1978 | AddFile = staticmethod(MemoryFSHandler_AddFile) |
e811c8ce | 1979 | def CanOpen(*args, **kwargs): |
a95a7133 | 1980 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1981 | return _core_.MemoryFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1982 | |
1983 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1984 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1985 | return _core_.MemoryFSHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1986 | |
1987 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1988 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1989 | return _core_.MemoryFSHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1990 | |
1991 | def FindNext(*args, **kwargs): | |
a95a7133 | 1992 | """FindNext(self) -> String""" |
54f9ee45 | 1993 | return _core_.MemoryFSHandler_FindNext(*args, **kwargs) |
e811c8ce | 1994 | |
d14a1e28 RD |
1995 | |
1996 | class MemoryFSHandlerPtr(MemoryFSHandler): | |
1997 | def __init__(self, this): | |
1998 | self.this = this | |
1999 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2000 | self.__class__ = MemoryFSHandler | |
54f9ee45 | 2001 | _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr) |
d14a1e28 | 2002 | |
e811c8ce | 2003 | def MemoryFSHandler_RemoveFile(*args, **kwargs): |
196addbf | 2004 | """MemoryFSHandler_RemoveFile(String filename)""" |
54f9ee45 | 2005 | return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) |
d14a1e28 RD |
2006 | |
2007 | #--------------------------------------------------------------------------- | |
2008 | ||
2009 | class ImageHandler(Object): | |
093d3ff1 | 2010 | """Proxy of C++ ImageHandler class""" |
d14a1e28 RD |
2011 | def __init__(self): raise RuntimeError, "No constructor defined" |
2012 | def __repr__(self): | |
2013 | return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 2014 | def GetName(*args, **kwargs): |
a95a7133 | 2015 | """GetName(self) -> String""" |
54f9ee45 | 2016 | return _core_.ImageHandler_GetName(*args, **kwargs) |
e811c8ce RD |
2017 | |
2018 | def GetExtension(*args, **kwargs): | |
a95a7133 | 2019 | """GetExtension(self) -> String""" |
54f9ee45 | 2020 | return _core_.ImageHandler_GetExtension(*args, **kwargs) |
e811c8ce RD |
2021 | |
2022 | def GetType(*args, **kwargs): | |
a95a7133 | 2023 | """GetType(self) -> long""" |
54f9ee45 | 2024 | return _core_.ImageHandler_GetType(*args, **kwargs) |
e811c8ce RD |
2025 | |
2026 | def GetMimeType(*args, **kwargs): | |
a95a7133 | 2027 | """GetMimeType(self) -> String""" |
54f9ee45 | 2028 | return _core_.ImageHandler_GetMimeType(*args, **kwargs) |
e811c8ce RD |
2029 | |
2030 | def CanRead(*args, **kwargs): | |
a95a7133 | 2031 | """CanRead(self, String name) -> bool""" |
54f9ee45 | 2032 | return _core_.ImageHandler_CanRead(*args, **kwargs) |
e811c8ce RD |
2033 | |
2034 | def SetName(*args, **kwargs): | |
a95a7133 | 2035 | """SetName(self, String name)""" |
54f9ee45 | 2036 | return _core_.ImageHandler_SetName(*args, **kwargs) |
e811c8ce RD |
2037 | |
2038 | def SetExtension(*args, **kwargs): | |
a95a7133 | 2039 | """SetExtension(self, String extension)""" |
54f9ee45 | 2040 | return _core_.ImageHandler_SetExtension(*args, **kwargs) |
e811c8ce RD |
2041 | |
2042 | def SetType(*args, **kwargs): | |
a95a7133 | 2043 | """SetType(self, long type)""" |
54f9ee45 | 2044 | return _core_.ImageHandler_SetType(*args, **kwargs) |
e811c8ce RD |
2045 | |
2046 | def SetMimeType(*args, **kwargs): | |
a95a7133 | 2047 | """SetMimeType(self, String mimetype)""" |
54f9ee45 | 2048 | return _core_.ImageHandler_SetMimeType(*args, **kwargs) |
e811c8ce | 2049 | |
d14a1e28 RD |
2050 | |
2051 | class ImageHandlerPtr(ImageHandler): | |
2052 | def __init__(self, this): | |
2053 | self.this = this | |
2054 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2055 | self.__class__ = ImageHandler | |
54f9ee45 | 2056 | _core_.ImageHandler_swigregister(ImageHandlerPtr) |
d14a1e28 RD |
2057 | |
2058 | class ImageHistogram(object): | |
093d3ff1 | 2059 | """Proxy of C++ ImageHistogram class""" |
e811c8ce RD |
2060 | def __repr__(self): |
2061 | return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2062 | def __init__(self, *args, **kwargs): |
a95a7133 | 2063 | """__init__(self) -> ImageHistogram""" |
54f9ee45 | 2064 | newobj = _core_.new_ImageHistogram(*args, **kwargs) |
d14a1e28 RD |
2065 | self.this = newobj.this |
2066 | self.thisown = 1 | |
2067 | del newobj.thisown | |
e811c8ce | 2068 | def MakeKey(*args, **kwargs): |
0df68c9f | 2069 | """ |
66c033b4 | 2070 | MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long |
e811c8ce | 2071 | |
0df68c9f RD |
2072 | Get the key in the histogram for the given RGB values |
2073 | """ | |
54f9ee45 | 2074 | return _core_.ImageHistogram_MakeKey(*args, **kwargs) |
e811c8ce RD |
2075 | |
2076 | MakeKey = staticmethod(MakeKey) | |
2077 | def FindFirstUnusedColour(*args, **kwargs): | |
fd2dc343 RD |
2078 | """ |
2079 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
2080 | ||
2081 | Find first colour that is not used in the image and has higher RGB | |
2082 | values than startR, startG, startB. Returns a tuple consisting of a | |
2083 | success flag and rgb values. | |
2084 | """ | |
54f9ee45 | 2085 | return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs) |
e811c8ce | 2086 | |
d14a1e28 RD |
2087 | |
2088 | class ImageHistogramPtr(ImageHistogram): | |
2089 | def __init__(self, this): | |
2090 | self.this = this | |
2091 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2092 | self.__class__ = ImageHistogram | |
54f9ee45 | 2093 | _core_.ImageHistogram_swigregister(ImageHistogramPtr) |
d14a1e28 | 2094 | |
e811c8ce | 2095 | def ImageHistogram_MakeKey(*args, **kwargs): |
0df68c9f RD |
2096 | """ |
2097 | ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long | |
e811c8ce | 2098 | |
0df68c9f RD |
2099 | Get the key in the histogram for the given RGB values |
2100 | """ | |
54f9ee45 | 2101 | return _core_.ImageHistogram_MakeKey(*args, **kwargs) |
d14a1e28 RD |
2102 | |
2103 | class Image(Object): | |
093d3ff1 | 2104 | """Proxy of C++ Image class""" |
e811c8ce RD |
2105 | def __repr__(self): |
2106 | return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2107 | def __init__(self, *args, **kwargs): |
a95a7133 | 2108 | """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
54f9ee45 | 2109 | newobj = _core_.new_Image(*args, **kwargs) |
d14a1e28 RD |
2110 | self.this = newobj.this |
2111 | self.thisown = 1 | |
2112 | del newobj.thisown | |
54f9ee45 | 2113 | def __del__(self, destroy=_core_.delete_Image): |
a95a7133 | 2114 | """__del__(self)""" |
d14a1e28 RD |
2115 | try: |
2116 | if self.thisown: destroy(self) | |
2117 | except: pass | |
e811c8ce RD |
2118 | |
2119 | def Create(*args, **kwargs): | |
a95a7133 | 2120 | """Create(self, int width, int height)""" |
54f9ee45 | 2121 | return _core_.Image_Create(*args, **kwargs) |
e811c8ce RD |
2122 | |
2123 | def Destroy(*args, **kwargs): | |
0df68c9f | 2124 | """ |
a95a7133 | 2125 | Destroy(self) |
e811c8ce | 2126 | |
0df68c9f RD |
2127 | Deletes the C++ object this Python object is a proxy for. |
2128 | """ | |
54f9ee45 | 2129 | return _core_.Image_Destroy(*args, **kwargs) |
e811c8ce RD |
2130 | |
2131 | def Scale(*args, **kwargs): | |
a95a7133 | 2132 | """Scale(self, int width, int height) -> Image""" |
54f9ee45 | 2133 | return _core_.Image_Scale(*args, **kwargs) |
e811c8ce RD |
2134 | |
2135 | def ShrinkBy(*args, **kwargs): | |
a95a7133 | 2136 | """ShrinkBy(self, int xFactor, int yFactor) -> Image""" |
54f9ee45 | 2137 | return _core_.Image_ShrinkBy(*args, **kwargs) |
e811c8ce RD |
2138 | |
2139 | def Rescale(*args, **kwargs): | |
a95a7133 | 2140 | """Rescale(self, int width, int height) -> Image""" |
54f9ee45 | 2141 | return _core_.Image_Rescale(*args, **kwargs) |
e811c8ce RD |
2142 | |
2143 | def SetRGB(*args, **kwargs): | |
a95a7133 | 2144 | """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)""" |
54f9ee45 | 2145 | return _core_.Image_SetRGB(*args, **kwargs) |
e811c8ce RD |
2146 | |
2147 | def GetRed(*args, **kwargs): | |
a95a7133 | 2148 | """GetRed(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2149 | return _core_.Image_GetRed(*args, **kwargs) |
e811c8ce RD |
2150 | |
2151 | def GetGreen(*args, **kwargs): | |
a95a7133 | 2152 | """GetGreen(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2153 | return _core_.Image_GetGreen(*args, **kwargs) |
e811c8ce RD |
2154 | |
2155 | def GetBlue(*args, **kwargs): | |
a95a7133 | 2156 | """GetBlue(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2157 | return _core_.Image_GetBlue(*args, **kwargs) |
e811c8ce RD |
2158 | |
2159 | def SetAlpha(*args, **kwargs): | |
a95a7133 | 2160 | """SetAlpha(self, int x, int y, unsigned char alpha)""" |
54f9ee45 | 2161 | return _core_.Image_SetAlpha(*args, **kwargs) |
e811c8ce RD |
2162 | |
2163 | def GetAlpha(*args, **kwargs): | |
a95a7133 | 2164 | """GetAlpha(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2165 | return _core_.Image_GetAlpha(*args, **kwargs) |
e811c8ce RD |
2166 | |
2167 | def HasAlpha(*args, **kwargs): | |
a95a7133 | 2168 | """HasAlpha(self) -> bool""" |
54f9ee45 | 2169 | return _core_.Image_HasAlpha(*args, **kwargs) |
e811c8ce RD |
2170 | |
2171 | def FindFirstUnusedColour(*args, **kwargs): | |
fd2dc343 RD |
2172 | """ |
2173 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
2174 | ||
2175 | Find first colour that is not used in the image and has higher RGB | |
2176 | values than startR, startG, startB. Returns a tuple consisting of a | |
2177 | success flag and rgb values. | |
2178 | """ | |
54f9ee45 | 2179 | return _core_.Image_FindFirstUnusedColour(*args, **kwargs) |
e811c8ce | 2180 | |
4cf4100f RD |
2181 | def ConvertAlphaToMask(*args, **kwargs): |
2182 | """ | |
2183 | ConvertAlphaToMask(self, byte threshold=128) -> bool | |
2184 | ||
2185 | If the image has alpha channel, this method converts it to mask. All pixels | |
2186 | with alpha value less than ``threshold`` are replaced with mask colour and the | |
2187 | alpha channel is removed. Mask colour is chosen automatically using | |
2188 | `FindFirstUnusedColour`. | |
2189 | ||
2190 | If the image image doesn't have alpha channel, ConvertAlphaToMask does | |
2191 | nothing. | |
2192 | """ | |
2193 | return _core_.Image_ConvertAlphaToMask(*args, **kwargs) | |
2194 | ||
8fb0e70a RD |
2195 | def ConvertColourToAlpha(*args, **kwargs): |
2196 | """ | |
2197 | ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool | |
2198 | ||
2199 | This method converts an image where the original alpha information is | |
2200 | only available as a shades of a colour (actually shades of grey) | |
2201 | typically when you draw anti-aliased text into a bitmap. The DC | |
2202 | drawing routines draw grey values on the black background although | |
2203 | they actually mean to draw white with differnt alpha values. This | |
2204 | method reverses it, assuming a black (!) background and white text. | |
2205 | The method will then fill up the whole image with the colour given. | |
2206 | """ | |
2207 | return _core_.Image_ConvertColourToAlpha(*args, **kwargs) | |
2208 | ||
e811c8ce | 2209 | def SetMaskFromImage(*args, **kwargs): |
a95a7133 | 2210 | """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool""" |
54f9ee45 | 2211 | return _core_.Image_SetMaskFromImage(*args, **kwargs) |
e811c8ce RD |
2212 | |
2213 | def CanRead(*args, **kwargs): | |
66c033b4 | 2214 | """CanRead(String name) -> bool""" |
54f9ee45 | 2215 | return _core_.Image_CanRead(*args, **kwargs) |
e811c8ce RD |
2216 | |
2217 | CanRead = staticmethod(CanRead) | |
2218 | def GetImageCount(*args, **kwargs): | |
66c033b4 | 2219 | """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" |
54f9ee45 | 2220 | return _core_.Image_GetImageCount(*args, **kwargs) |
e811c8ce RD |
2221 | |
2222 | GetImageCount = staticmethod(GetImageCount) | |
2223 | def LoadFile(*args, **kwargs): | |
a95a7133 | 2224 | """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" |
54f9ee45 | 2225 | return _core_.Image_LoadFile(*args, **kwargs) |
e811c8ce RD |
2226 | |
2227 | def LoadMimeFile(*args, **kwargs): | |
a95a7133 | 2228 | """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool""" |
54f9ee45 | 2229 | return _core_.Image_LoadMimeFile(*args, **kwargs) |
e811c8ce RD |
2230 | |
2231 | def SaveFile(*args, **kwargs): | |
a95a7133 | 2232 | """SaveFile(self, String name, int type) -> bool""" |
54f9ee45 | 2233 | return _core_.Image_SaveFile(*args, **kwargs) |
e811c8ce RD |
2234 | |
2235 | def SaveMimeFile(*args, **kwargs): | |
a95a7133 | 2236 | """SaveMimeFile(self, String name, String mimetype) -> bool""" |
54f9ee45 | 2237 | return _core_.Image_SaveMimeFile(*args, **kwargs) |
e811c8ce RD |
2238 | |
2239 | def CanReadStream(*args, **kwargs): | |
66c033b4 | 2240 | """CanReadStream(InputStream stream) -> bool""" |
54f9ee45 | 2241 | return _core_.Image_CanReadStream(*args, **kwargs) |
e811c8ce RD |
2242 | |
2243 | CanReadStream = staticmethod(CanReadStream) | |
2244 | def LoadStream(*args, **kwargs): | |
a95a7133 | 2245 | """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" |
54f9ee45 | 2246 | return _core_.Image_LoadStream(*args, **kwargs) |
e811c8ce RD |
2247 | |
2248 | def LoadMimeStream(*args, **kwargs): | |
a95a7133 | 2249 | """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool""" |
54f9ee45 | 2250 | return _core_.Image_LoadMimeStream(*args, **kwargs) |
e811c8ce RD |
2251 | |
2252 | def Ok(*args, **kwargs): | |
a95a7133 | 2253 | """Ok(self) -> bool""" |
54f9ee45 | 2254 | return _core_.Image_Ok(*args, **kwargs) |
e811c8ce RD |
2255 | |
2256 | def GetWidth(*args, **kwargs): | |
a95a7133 | 2257 | """GetWidth(self) -> int""" |
54f9ee45 | 2258 | return _core_.Image_GetWidth(*args, **kwargs) |
e811c8ce RD |
2259 | |
2260 | def GetHeight(*args, **kwargs): | |
a95a7133 | 2261 | """GetHeight(self) -> int""" |
54f9ee45 | 2262 | return _core_.Image_GetHeight(*args, **kwargs) |
e811c8ce | 2263 | |
b2df227b | 2264 | def GetSize(*args, **kwargs): |
a95a7133 | 2265 | """GetSize(self) -> Size""" |
54f9ee45 | 2266 | return _core_.Image_GetSize(*args, **kwargs) |
b2df227b | 2267 | |
e811c8ce | 2268 | def GetSubImage(*args, **kwargs): |
a95a7133 | 2269 | """GetSubImage(self, Rect rect) -> Image""" |
54f9ee45 | 2270 | return _core_.Image_GetSubImage(*args, **kwargs) |
e811c8ce RD |
2271 | |
2272 | def Copy(*args, **kwargs): | |
a95a7133 | 2273 | """Copy(self) -> Image""" |
54f9ee45 | 2274 | return _core_.Image_Copy(*args, **kwargs) |
e811c8ce RD |
2275 | |
2276 | def Paste(*args, **kwargs): | |
a95a7133 | 2277 | """Paste(self, Image image, int x, int y)""" |
54f9ee45 | 2278 | return _core_.Image_Paste(*args, **kwargs) |
e811c8ce RD |
2279 | |
2280 | def GetData(*args, **kwargs): | |
a95a7133 | 2281 | """GetData(self) -> PyObject""" |
54f9ee45 | 2282 | return _core_.Image_GetData(*args, **kwargs) |
e811c8ce RD |
2283 | |
2284 | def SetData(*args, **kwargs): | |
a95a7133 | 2285 | """SetData(self, PyObject data)""" |
54f9ee45 | 2286 | return _core_.Image_SetData(*args, **kwargs) |
e811c8ce RD |
2287 | |
2288 | def GetDataBuffer(*args, **kwargs): | |
a95a7133 | 2289 | """GetDataBuffer(self) -> PyObject""" |
54f9ee45 | 2290 | return _core_.Image_GetDataBuffer(*args, **kwargs) |
e811c8ce RD |
2291 | |
2292 | def SetDataBuffer(*args, **kwargs): | |
a95a7133 | 2293 | """SetDataBuffer(self, PyObject data)""" |
54f9ee45 | 2294 | return _core_.Image_SetDataBuffer(*args, **kwargs) |
e811c8ce RD |
2295 | |
2296 | def GetAlphaData(*args, **kwargs): | |
a95a7133 | 2297 | """GetAlphaData(self) -> PyObject""" |
54f9ee45 | 2298 | return _core_.Image_GetAlphaData(*args, **kwargs) |
e811c8ce RD |
2299 | |
2300 | def SetAlphaData(*args, **kwargs): | |
a95a7133 | 2301 | """SetAlphaData(self, PyObject data)""" |
54f9ee45 | 2302 | return _core_.Image_SetAlphaData(*args, **kwargs) |
e811c8ce RD |
2303 | |
2304 | def GetAlphaBuffer(*args, **kwargs): | |
a95a7133 | 2305 | """GetAlphaBuffer(self) -> PyObject""" |
54f9ee45 | 2306 | return _core_.Image_GetAlphaBuffer(*args, **kwargs) |
e811c8ce RD |
2307 | |
2308 | def SetAlphaBuffer(*args, **kwargs): | |
a95a7133 | 2309 | """SetAlphaBuffer(self, PyObject data)""" |
54f9ee45 | 2310 | return _core_.Image_SetAlphaBuffer(*args, **kwargs) |
e811c8ce RD |
2311 | |
2312 | def SetMaskColour(*args, **kwargs): | |
a95a7133 | 2313 | """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)""" |
54f9ee45 | 2314 | return _core_.Image_SetMaskColour(*args, **kwargs) |
e811c8ce RD |
2315 | |
2316 | def GetMaskRed(*args, **kwargs): | |
a95a7133 | 2317 | """GetMaskRed(self) -> unsigned char""" |
54f9ee45 | 2318 | return _core_.Image_GetMaskRed(*args, **kwargs) |
e811c8ce RD |
2319 | |
2320 | def GetMaskGreen(*args, **kwargs): | |
a95a7133 | 2321 | """GetMaskGreen(self) -> unsigned char""" |
54f9ee45 | 2322 | return _core_.Image_GetMaskGreen(*args, **kwargs) |
e811c8ce RD |
2323 | |
2324 | def GetMaskBlue(*args, **kwargs): | |
a95a7133 | 2325 | """GetMaskBlue(self) -> unsigned char""" |
54f9ee45 | 2326 | return _core_.Image_GetMaskBlue(*args, **kwargs) |
e811c8ce RD |
2327 | |
2328 | def SetMask(*args, **kwargs): | |
a95a7133 | 2329 | """SetMask(self, bool mask=True)""" |
54f9ee45 | 2330 | return _core_.Image_SetMask(*args, **kwargs) |
e811c8ce RD |
2331 | |
2332 | def HasMask(*args, **kwargs): | |
a95a7133 | 2333 | """HasMask(self) -> bool""" |
54f9ee45 | 2334 | return _core_.Image_HasMask(*args, **kwargs) |
e811c8ce RD |
2335 | |
2336 | def Rotate(*args, **kwargs): | |
0df68c9f | 2337 | """ |
a95a7133 | 2338 | Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True, |
0df68c9f RD |
2339 | Point offset_after_rotation=None) -> Image |
2340 | """ | |
54f9ee45 | 2341 | return _core_.Image_Rotate(*args, **kwargs) |
e811c8ce RD |
2342 | |
2343 | def Rotate90(*args, **kwargs): | |
a95a7133 | 2344 | """Rotate90(self, bool clockwise=True) -> Image""" |
54f9ee45 | 2345 | return _core_.Image_Rotate90(*args, **kwargs) |
e811c8ce RD |
2346 | |
2347 | def Mirror(*args, **kwargs): | |
a95a7133 | 2348 | """Mirror(self, bool horizontally=True) -> Image""" |
54f9ee45 | 2349 | return _core_.Image_Mirror(*args, **kwargs) |
e811c8ce RD |
2350 | |
2351 | def Replace(*args, **kwargs): | |
0df68c9f | 2352 | """ |
a95a7133 | 2353 | Replace(self, unsigned char r1, unsigned char g1, unsigned char b1, |
0df68c9f RD |
2354 | unsigned char r2, unsigned char g2, unsigned char b2) |
2355 | """ | |
54f9ee45 | 2356 | return _core_.Image_Replace(*args, **kwargs) |
e811c8ce RD |
2357 | |
2358 | def ConvertToMono(*args, **kwargs): | |
a95a7133 | 2359 | """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image""" |
54f9ee45 | 2360 | return _core_.Image_ConvertToMono(*args, **kwargs) |
e811c8ce RD |
2361 | |
2362 | def SetOption(*args, **kwargs): | |
a95a7133 | 2363 | """SetOption(self, String name, String value)""" |
54f9ee45 | 2364 | return _core_.Image_SetOption(*args, **kwargs) |
e811c8ce RD |
2365 | |
2366 | def SetOptionInt(*args, **kwargs): | |
a95a7133 | 2367 | """SetOptionInt(self, String name, int value)""" |
54f9ee45 | 2368 | return _core_.Image_SetOptionInt(*args, **kwargs) |
e811c8ce RD |
2369 | |
2370 | def GetOption(*args, **kwargs): | |
a95a7133 | 2371 | """GetOption(self, String name) -> String""" |
54f9ee45 | 2372 | return _core_.Image_GetOption(*args, **kwargs) |
e811c8ce RD |
2373 | |
2374 | def GetOptionInt(*args, **kwargs): | |
a95a7133 | 2375 | """GetOptionInt(self, String name) -> int""" |
54f9ee45 | 2376 | return _core_.Image_GetOptionInt(*args, **kwargs) |
e811c8ce RD |
2377 | |
2378 | def HasOption(*args, **kwargs): | |
a95a7133 | 2379 | """HasOption(self, String name) -> bool""" |
54f9ee45 | 2380 | return _core_.Image_HasOption(*args, **kwargs) |
e811c8ce RD |
2381 | |
2382 | def CountColours(*args, **kwargs): | |
a95a7133 | 2383 | """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long""" |
54f9ee45 | 2384 | return _core_.Image_CountColours(*args, **kwargs) |
e811c8ce RD |
2385 | |
2386 | def ComputeHistogram(*args, **kwargs): | |
a95a7133 | 2387 | """ComputeHistogram(self, ImageHistogram h) -> unsigned long""" |
54f9ee45 | 2388 | return _core_.Image_ComputeHistogram(*args, **kwargs) |
e811c8ce RD |
2389 | |
2390 | def AddHandler(*args, **kwargs): | |
66c033b4 | 2391 | """AddHandler(ImageHandler handler)""" |
54f9ee45 | 2392 | return _core_.Image_AddHandler(*args, **kwargs) |
e811c8ce RD |
2393 | |
2394 | AddHandler = staticmethod(AddHandler) | |
2395 | def InsertHandler(*args, **kwargs): | |
66c033b4 | 2396 | """InsertHandler(ImageHandler handler)""" |
54f9ee45 | 2397 | return _core_.Image_InsertHandler(*args, **kwargs) |
e811c8ce RD |
2398 | |
2399 | InsertHandler = staticmethod(InsertHandler) | |
2400 | def RemoveHandler(*args, **kwargs): | |
66c033b4 | 2401 | """RemoveHandler(String name) -> bool""" |
54f9ee45 | 2402 | return _core_.Image_RemoveHandler(*args, **kwargs) |
e811c8ce RD |
2403 | |
2404 | RemoveHandler = staticmethod(RemoveHandler) | |
2405 | def GetImageExtWildcard(*args, **kwargs): | |
66c033b4 | 2406 | """GetImageExtWildcard() -> String""" |
54f9ee45 | 2407 | return _core_.Image_GetImageExtWildcard(*args, **kwargs) |
e811c8ce RD |
2408 | |
2409 | GetImageExtWildcard = staticmethod(GetImageExtWildcard) | |
2410 | def ConvertToBitmap(*args, **kwargs): | |
1fbf26be | 2411 | """ConvertToBitmap(self, int depth=-1) -> Bitmap""" |
54f9ee45 | 2412 | return _core_.Image_ConvertToBitmap(*args, **kwargs) |
e811c8ce RD |
2413 | |
2414 | def ConvertToMonoBitmap(*args, **kwargs): | |
a95a7133 | 2415 | """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap""" |
54f9ee45 | 2416 | return _core_.Image_ConvertToMonoBitmap(*args, **kwargs) |
e811c8ce RD |
2417 | |
2418 | def __nonzero__(self): return self.Ok() | |
d14a1e28 RD |
2419 | |
2420 | class ImagePtr(Image): | |
2421 | def __init__(self, this): | |
2422 | self.this = this | |
2423 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2424 | self.__class__ = Image | |
54f9ee45 | 2425 | _core_.Image_swigregister(ImagePtr) |
d14a1e28 RD |
2426 | |
2427 | def ImageFromMime(*args, **kwargs): | |
196addbf | 2428 | """ImageFromMime(String name, String mimetype, int index=-1) -> Image""" |
54f9ee45 | 2429 | val = _core_.new_ImageFromMime(*args, **kwargs) |
d14a1e28 RD |
2430 | val.thisown = 1 |
2431 | return val | |
2432 | ||
2433 | def ImageFromStream(*args, **kwargs): | |
196addbf | 2434 | """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
54f9ee45 | 2435 | val = _core_.new_ImageFromStream(*args, **kwargs) |
d14a1e28 RD |
2436 | val.thisown = 1 |
2437 | return val | |
2438 | ||
2439 | def ImageFromStreamMime(*args, **kwargs): | |
196addbf | 2440 | """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image""" |
54f9ee45 | 2441 | val = _core_.new_ImageFromStreamMime(*args, **kwargs) |
d14a1e28 RD |
2442 | val.thisown = 1 |
2443 | return val | |
2444 | ||
66c033b4 RD |
2445 | def EmptyImage(*args, **kwargs): |
2446 | """EmptyImage(int width=0, int height=0, bool clear=True) -> Image""" | |
2447 | val = _core_.new_EmptyImage(*args, **kwargs) | |
d14a1e28 RD |
2448 | val.thisown = 1 |
2449 | return val | |
2450 | ||
2451 | def ImageFromBitmap(*args, **kwargs): | |
196addbf | 2452 | """ImageFromBitmap(Bitmap bitmap) -> Image""" |
54f9ee45 | 2453 | val = _core_.new_ImageFromBitmap(*args, **kwargs) |
d14a1e28 RD |
2454 | val.thisown = 1 |
2455 | return val | |
2456 | ||
2457 | def ImageFromData(*args, **kwargs): | |
e811c8ce | 2458 | """ImageFromData(int width, int height, unsigned char data) -> Image""" |
54f9ee45 | 2459 | val = _core_.new_ImageFromData(*args, **kwargs) |
d14a1e28 RD |
2460 | val.thisown = 1 |
2461 | return val | |
2462 | ||
1823fbb4 RD |
2463 | def ImageFromDataWithAlpha(*args, **kwargs): |
2464 | """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image""" | |
2465 | val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs) | |
2466 | val.thisown = 1 | |
2467 | return val | |
2468 | ||
e811c8ce | 2469 | def Image_CanRead(*args, **kwargs): |
196addbf | 2470 | """Image_CanRead(String name) -> bool""" |
54f9ee45 | 2471 | return _core_.Image_CanRead(*args, **kwargs) |
d14a1e28 | 2472 | |
e811c8ce | 2473 | def Image_GetImageCount(*args, **kwargs): |
196addbf | 2474 | """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" |
54f9ee45 | 2475 | return _core_.Image_GetImageCount(*args, **kwargs) |
d14a1e28 | 2476 | |
e811c8ce | 2477 | def Image_CanReadStream(*args, **kwargs): |
196addbf | 2478 | """Image_CanReadStream(InputStream stream) -> bool""" |
54f9ee45 | 2479 | return _core_.Image_CanReadStream(*args, **kwargs) |
d14a1e28 | 2480 | |
e811c8ce RD |
2481 | def Image_AddHandler(*args, **kwargs): |
2482 | """Image_AddHandler(ImageHandler handler)""" | |
54f9ee45 | 2483 | return _core_.Image_AddHandler(*args, **kwargs) |
d14a1e28 | 2484 | |
e811c8ce RD |
2485 | def Image_InsertHandler(*args, **kwargs): |
2486 | """Image_InsertHandler(ImageHandler handler)""" | |
54f9ee45 | 2487 | return _core_.Image_InsertHandler(*args, **kwargs) |
d14a1e28 | 2488 | |
e811c8ce | 2489 | def Image_RemoveHandler(*args, **kwargs): |
196addbf | 2490 | """Image_RemoveHandler(String name) -> bool""" |
54f9ee45 | 2491 | return _core_.Image_RemoveHandler(*args, **kwargs) |
d14a1e28 | 2492 | |
e811c8ce | 2493 | def Image_GetImageExtWildcard(*args, **kwargs): |
196addbf | 2494 | """Image_GetImageExtWildcard() -> String""" |
54f9ee45 | 2495 | return _core_.Image_GetImageExtWildcard(*args, **kwargs) |
d14a1e28 | 2496 | |
5e4ca4a8 RD |
2497 | def InitAllImageHandlers(): |
2498 | """ | |
2499 | The former functionality of InitAllImageHanders is now done internal to | |
2500 | the _core_ extension module and so this function has become a simple NOP. | |
2501 | """ | |
2502 | pass | |
d14a1e28 | 2503 | |
54f9ee45 RD |
2504 | IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES |
2505 | IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM | |
2506 | BMP_24BPP = _core_.BMP_24BPP | |
2507 | BMP_8BPP = _core_.BMP_8BPP | |
2508 | BMP_8BPP_GREY = _core_.BMP_8BPP_GREY | |
2509 | BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY | |
2510 | BMP_8BPP_RED = _core_.BMP_8BPP_RED | |
2511 | BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE | |
2512 | BMP_4BPP = _core_.BMP_4BPP | |
2513 | BMP_1BPP = _core_.BMP_1BPP | |
2514 | BMP_1BPP_BW = _core_.BMP_1BPP_BW | |
d14a1e28 | 2515 | class BMPHandler(ImageHandler): |
093d3ff1 | 2516 | """Proxy of C++ BMPHandler class""" |
e811c8ce RD |
2517 | def __repr__(self): |
2518 | return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2519 | def __init__(self, *args, **kwargs): |
a95a7133 | 2520 | """__init__(self) -> BMPHandler""" |
54f9ee45 | 2521 | newobj = _core_.new_BMPHandler(*args, **kwargs) |
d14a1e28 RD |
2522 | self.this = newobj.this |
2523 | self.thisown = 1 | |
2524 | del newobj.thisown | |
d14a1e28 RD |
2525 | |
2526 | class BMPHandlerPtr(BMPHandler): | |
2527 | def __init__(self, this): | |
2528 | self.this = this | |
2529 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2530 | self.__class__ = BMPHandler | |
54f9ee45 | 2531 | _core_.BMPHandler_swigregister(BMPHandlerPtr) |
d14a1e28 RD |
2532 | NullImage = cvar.NullImage |
2533 | IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT | |
2534 | IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X | |
2535 | IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y | |
2536 | IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION | |
2537 | IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT | |
2538 | ||
2539 | class ICOHandler(BMPHandler): | |
093d3ff1 | 2540 | """Proxy of C++ ICOHandler class""" |
e811c8ce RD |
2541 | def __repr__(self): |
2542 | return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2543 | def __init__(self, *args, **kwargs): |
a95a7133 | 2544 | """__init__(self) -> ICOHandler""" |
54f9ee45 | 2545 | newobj = _core_.new_ICOHandler(*args, **kwargs) |
d14a1e28 RD |
2546 | self.this = newobj.this |
2547 | self.thisown = 1 | |
2548 | del newobj.thisown | |
d14a1e28 RD |
2549 | |
2550 | class ICOHandlerPtr(ICOHandler): | |
2551 | def __init__(self, this): | |
2552 | self.this = this | |
2553 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2554 | self.__class__ = ICOHandler | |
54f9ee45 | 2555 | _core_.ICOHandler_swigregister(ICOHandlerPtr) |
d14a1e28 RD |
2556 | |
2557 | class CURHandler(ICOHandler): | |
093d3ff1 | 2558 | """Proxy of C++ CURHandler class""" |
e811c8ce RD |
2559 | def __repr__(self): |
2560 | return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2561 | def __init__(self, *args, **kwargs): |
a95a7133 | 2562 | """__init__(self) -> CURHandler""" |
54f9ee45 | 2563 | newobj = _core_.new_CURHandler(*args, **kwargs) |
d14a1e28 RD |
2564 | self.this = newobj.this |
2565 | self.thisown = 1 | |
2566 | del newobj.thisown | |
d14a1e28 RD |
2567 | |
2568 | class CURHandlerPtr(CURHandler): | |
2569 | def __init__(self, this): | |
2570 | self.this = this | |
2571 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2572 | self.__class__ = CURHandler | |
54f9ee45 | 2573 | _core_.CURHandler_swigregister(CURHandlerPtr) |
d14a1e28 RD |
2574 | |
2575 | class ANIHandler(CURHandler): | |
093d3ff1 | 2576 | """Proxy of C++ ANIHandler class""" |
e811c8ce RD |
2577 | def __repr__(self): |
2578 | return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2579 | def __init__(self, *args, **kwargs): |
a95a7133 | 2580 | """__init__(self) -> ANIHandler""" |
54f9ee45 | 2581 | newobj = _core_.new_ANIHandler(*args, **kwargs) |
d14a1e28 RD |
2582 | self.this = newobj.this |
2583 | self.thisown = 1 | |
2584 | del newobj.thisown | |
d14a1e28 RD |
2585 | |
2586 | class ANIHandlerPtr(ANIHandler): | |
2587 | def __init__(self, this): | |
2588 | self.this = this | |
2589 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2590 | self.__class__ = ANIHandler | |
54f9ee45 | 2591 | _core_.ANIHandler_swigregister(ANIHandlerPtr) |
d14a1e28 RD |
2592 | |
2593 | class PNGHandler(ImageHandler): | |
093d3ff1 | 2594 | """Proxy of C++ PNGHandler class""" |
e811c8ce RD |
2595 | def __repr__(self): |
2596 | return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2597 | def __init__(self, *args, **kwargs): |
a95a7133 | 2598 | """__init__(self) -> PNGHandler""" |
54f9ee45 | 2599 | newobj = _core_.new_PNGHandler(*args, **kwargs) |
d14a1e28 RD |
2600 | self.this = newobj.this |
2601 | self.thisown = 1 | |
2602 | del newobj.thisown | |
d14a1e28 RD |
2603 | |
2604 | class PNGHandlerPtr(PNGHandler): | |
2605 | def __init__(self, this): | |
2606 | self.this = this | |
2607 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2608 | self.__class__ = PNGHandler | |
54f9ee45 | 2609 | _core_.PNGHandler_swigregister(PNGHandlerPtr) |
d14a1e28 RD |
2610 | |
2611 | class GIFHandler(ImageHandler): | |
093d3ff1 | 2612 | """Proxy of C++ GIFHandler class""" |
e811c8ce RD |
2613 | def __repr__(self): |
2614 | return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2615 | def __init__(self, *args, **kwargs): |
a95a7133 | 2616 | """__init__(self) -> GIFHandler""" |
54f9ee45 | 2617 | newobj = _core_.new_GIFHandler(*args, **kwargs) |
d14a1e28 RD |
2618 | self.this = newobj.this |
2619 | self.thisown = 1 | |
2620 | del newobj.thisown | |
d14a1e28 RD |
2621 | |
2622 | class GIFHandlerPtr(GIFHandler): | |
2623 | def __init__(self, this): | |
2624 | self.this = this | |
2625 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2626 | self.__class__ = GIFHandler | |
54f9ee45 | 2627 | _core_.GIFHandler_swigregister(GIFHandlerPtr) |
d14a1e28 RD |
2628 | |
2629 | class PCXHandler(ImageHandler): | |
093d3ff1 | 2630 | """Proxy of C++ PCXHandler class""" |
e811c8ce RD |
2631 | def __repr__(self): |
2632 | return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2633 | def __init__(self, *args, **kwargs): |
a95a7133 | 2634 | """__init__(self) -> PCXHandler""" |
54f9ee45 | 2635 | newobj = _core_.new_PCXHandler(*args, **kwargs) |
d14a1e28 RD |
2636 | self.this = newobj.this |
2637 | self.thisown = 1 | |
2638 | del newobj.thisown | |
d14a1e28 RD |
2639 | |
2640 | class PCXHandlerPtr(PCXHandler): | |
2641 | def __init__(self, this): | |
2642 | self.this = this | |
2643 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2644 | self.__class__ = PCXHandler | |
54f9ee45 | 2645 | _core_.PCXHandler_swigregister(PCXHandlerPtr) |
d14a1e28 RD |
2646 | |
2647 | class JPEGHandler(ImageHandler): | |
093d3ff1 | 2648 | """Proxy of C++ JPEGHandler class""" |
e811c8ce RD |
2649 | def __repr__(self): |
2650 | return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2651 | def __init__(self, *args, **kwargs): |
a95a7133 | 2652 | """__init__(self) -> JPEGHandler""" |
54f9ee45 | 2653 | newobj = _core_.new_JPEGHandler(*args, **kwargs) |
d14a1e28 RD |
2654 | self.this = newobj.this |
2655 | self.thisown = 1 | |
2656 | del newobj.thisown | |
d14a1e28 RD |
2657 | |
2658 | class JPEGHandlerPtr(JPEGHandler): | |
2659 | def __init__(self, this): | |
2660 | self.this = this | |
2661 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2662 | self.__class__ = JPEGHandler | |
54f9ee45 | 2663 | _core_.JPEGHandler_swigregister(JPEGHandlerPtr) |
d14a1e28 RD |
2664 | |
2665 | class PNMHandler(ImageHandler): | |
093d3ff1 | 2666 | """Proxy of C++ PNMHandler class""" |
e811c8ce RD |
2667 | def __repr__(self): |
2668 | return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2669 | def __init__(self, *args, **kwargs): |
a95a7133 | 2670 | """__init__(self) -> PNMHandler""" |
54f9ee45 | 2671 | newobj = _core_.new_PNMHandler(*args, **kwargs) |
d14a1e28 RD |
2672 | self.this = newobj.this |
2673 | self.thisown = 1 | |
2674 | del newobj.thisown | |
d14a1e28 RD |
2675 | |
2676 | class PNMHandlerPtr(PNMHandler): | |
2677 | def __init__(self, this): | |
2678 | self.this = this | |
2679 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2680 | self.__class__ = PNMHandler | |
54f9ee45 | 2681 | _core_.PNMHandler_swigregister(PNMHandlerPtr) |
d14a1e28 RD |
2682 | |
2683 | class XPMHandler(ImageHandler): | |
093d3ff1 | 2684 | """Proxy of C++ XPMHandler class""" |
e811c8ce RD |
2685 | def __repr__(self): |
2686 | return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2687 | def __init__(self, *args, **kwargs): |
a95a7133 | 2688 | """__init__(self) -> XPMHandler""" |
54f9ee45 | 2689 | newobj = _core_.new_XPMHandler(*args, **kwargs) |
d14a1e28 RD |
2690 | self.this = newobj.this |
2691 | self.thisown = 1 | |
2692 | del newobj.thisown | |
d14a1e28 RD |
2693 | |
2694 | class XPMHandlerPtr(XPMHandler): | |
2695 | def __init__(self, this): | |
2696 | self.this = this | |
2697 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2698 | self.__class__ = XPMHandler | |
54f9ee45 | 2699 | _core_.XPMHandler_swigregister(XPMHandlerPtr) |
d14a1e28 RD |
2700 | |
2701 | class TIFFHandler(ImageHandler): | |
093d3ff1 | 2702 | """Proxy of C++ TIFFHandler class""" |
e811c8ce RD |
2703 | def __repr__(self): |
2704 | return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2705 | def __init__(self, *args, **kwargs): |
a95a7133 | 2706 | """__init__(self) -> TIFFHandler""" |
54f9ee45 | 2707 | newobj = _core_.new_TIFFHandler(*args, **kwargs) |
d14a1e28 RD |
2708 | self.this = newobj.this |
2709 | self.thisown = 1 | |
2710 | del newobj.thisown | |
d14a1e28 RD |
2711 | |
2712 | class TIFFHandlerPtr(TIFFHandler): | |
2713 | def __init__(self, this): | |
2714 | self.this = this | |
2715 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2716 | self.__class__ = TIFFHandler | |
54f9ee45 | 2717 | _core_.TIFFHandler_swigregister(TIFFHandlerPtr) |
d14a1e28 | 2718 | |
c0de73ae RD |
2719 | QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS |
2720 | QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE | |
2721 | class Quantize(object): | |
2722 | """Performs quantization, or colour reduction, on a wxImage.""" | |
2723 | def __init__(self): raise RuntimeError, "No constructor defined" | |
2724 | def __repr__(self): | |
2725 | return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2726 | def Quantize(*args, **kwargs): | |
2727 | """ | |
2728 | Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool | |
2729 | ||
2730 | Reduce the colours in the source image and put the result into the | |
2731 | destination image, setting the palette in the destination if | |
2732 | needed. Both images may be the same, to overwrite the source image. | |
2733 | """ | |
2734 | return _core_.Quantize_Quantize(*args, **kwargs) | |
2735 | ||
2736 | Quantize = staticmethod(Quantize) | |
2737 | ||
2738 | class QuantizePtr(Quantize): | |
2739 | def __init__(self, this): | |
2740 | self.this = this | |
2741 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2742 | self.__class__ = Quantize | |
2743 | _core_.Quantize_swigregister(QuantizePtr) | |
2744 | ||
2745 | def Quantize_Quantize(*args, **kwargs): | |
2746 | """ | |
2747 | Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool | |
2748 | ||
2749 | Reduce the colours in the source image and put the result into the | |
2750 | destination image, setting the palette in the destination if | |
2751 | needed. Both images may be the same, to overwrite the source image. | |
2752 | """ | |
2753 | return _core_.Quantize_Quantize(*args, **kwargs) | |
2754 | ||
d14a1e28 RD |
2755 | #--------------------------------------------------------------------------- |
2756 | ||
2757 | class EvtHandler(Object): | |
093d3ff1 | 2758 | """Proxy of C++ EvtHandler class""" |
e811c8ce RD |
2759 | def __repr__(self): |
2760 | return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2761 | def __init__(self, *args, **kwargs): |
a95a7133 | 2762 | """__init__(self) -> EvtHandler""" |
54f9ee45 | 2763 | newobj = _core_.new_EvtHandler(*args, **kwargs) |
d14a1e28 RD |
2764 | self.this = newobj.this |
2765 | self.thisown = 1 | |
2766 | del newobj.thisown | |
e811c8ce | 2767 | def GetNextHandler(*args, **kwargs): |
a95a7133 | 2768 | """GetNextHandler(self) -> EvtHandler""" |
54f9ee45 | 2769 | return _core_.EvtHandler_GetNextHandler(*args, **kwargs) |
e811c8ce RD |
2770 | |
2771 | def GetPreviousHandler(*args, **kwargs): | |
a95a7133 | 2772 | """GetPreviousHandler(self) -> EvtHandler""" |
54f9ee45 | 2773 | return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs) |
e811c8ce RD |
2774 | |
2775 | def SetNextHandler(*args, **kwargs): | |
a95a7133 | 2776 | """SetNextHandler(self, EvtHandler handler)""" |
54f9ee45 | 2777 | return _core_.EvtHandler_SetNextHandler(*args, **kwargs) |
e811c8ce RD |
2778 | |
2779 | def SetPreviousHandler(*args, **kwargs): | |
a95a7133 | 2780 | """SetPreviousHandler(self, EvtHandler handler)""" |
54f9ee45 | 2781 | return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs) |
e811c8ce RD |
2782 | |
2783 | def GetEvtHandlerEnabled(*args, **kwargs): | |
a95a7133 | 2784 | """GetEvtHandlerEnabled(self) -> bool""" |
54f9ee45 | 2785 | return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs) |
e811c8ce RD |
2786 | |
2787 | def SetEvtHandlerEnabled(*args, **kwargs): | |
a95a7133 | 2788 | """SetEvtHandlerEnabled(self, bool enabled)""" |
54f9ee45 | 2789 | return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs) |
e811c8ce RD |
2790 | |
2791 | def ProcessEvent(*args, **kwargs): | |
a95a7133 | 2792 | """ProcessEvent(self, Event event) -> bool""" |
54f9ee45 | 2793 | return _core_.EvtHandler_ProcessEvent(*args, **kwargs) |
e811c8ce RD |
2794 | |
2795 | def AddPendingEvent(*args, **kwargs): | |
a95a7133 | 2796 | """AddPendingEvent(self, Event event)""" |
54f9ee45 | 2797 | return _core_.EvtHandler_AddPendingEvent(*args, **kwargs) |
e811c8ce RD |
2798 | |
2799 | def ProcessPendingEvents(*args, **kwargs): | |
a95a7133 | 2800 | """ProcessPendingEvents(self)""" |
54f9ee45 | 2801 | return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs) |
e811c8ce RD |
2802 | |
2803 | def Connect(*args, **kwargs): | |
a95a7133 | 2804 | """Connect(self, int id, int lastId, int eventType, PyObject func)""" |
54f9ee45 | 2805 | return _core_.EvtHandler_Connect(*args, **kwargs) |
e811c8ce RD |
2806 | |
2807 | def Disconnect(*args, **kwargs): | |
a95a7133 | 2808 | """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool""" |
54f9ee45 | 2809 | return _core_.EvtHandler_Disconnect(*args, **kwargs) |
e811c8ce RD |
2810 | |
2811 | def _setOORInfo(*args, **kwargs): | |
689b42ee | 2812 | """_setOORInfo(self, PyObject _self, bool incref=True)""" |
54f9ee45 | 2813 | return _core_.EvtHandler__setOORInfo(*args, **kwargs) |
e811c8ce | 2814 | |
d14a1e28 RD |
2815 | def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
2816 | """ | |
2817 | Bind an event to an event handler. | |
2818 | ||
db3e571a RD |
2819 | :param event: One of the EVT_* objects that specifies the |
2820 | type of event to bind, | |
d14a1e28 | 2821 | |
db3e571a RD |
2822 | :param handler: A callable object to be invoked when the |
2823 | event is delivered to self. Pass None to | |
2824 | disconnect an event handler. | |
d14a1e28 | 2825 | |
db3e571a RD |
2826 | :param source: Sometimes the event originates from a |
2827 | different window than self, but you still | |
2828 | want to catch it in self. (For example, a | |
2829 | button event delivered to a frame.) By | |
2830 | passing the source of the event, the event | |
2831 | handling system is able to differentiate | |
2832 | between the same event type from different | |
2833 | controls. | |
d14a1e28 | 2834 | |
db3e571a RD |
2835 | :param id: Used to spcify the event source by ID instead |
2836 | of instance. | |
2837 | ||
2838 | :param id2: Used when it is desirable to bind a handler | |
2839 | to a range of IDs, such as with EVT_MENU_RANGE. | |
d14a1e28 RD |
2840 | """ |
2841 | if source is not None: | |
2842 | id = source.GetId() | |
2843 | event.Bind(self, id, id2, handler) | |
2844 | ||
66c033b4 RD |
2845 | def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
2846 | """ | |
2847 | Disconencts the event handler binding for event from self. | |
2848 | Returns True if successful. | |
2849 | """ | |
2850 | if source is not None: | |
2851 | id = source.GetId() | |
2852 | return event.Unbind(self, id, id2) | |
d14a1e28 | 2853 | |
d14a1e28 RD |
2854 | |
2855 | class EvtHandlerPtr(EvtHandler): | |
2856 | def __init__(self, this): | |
2857 | self.this = this | |
2858 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2859 | self.__class__ = EvtHandler | |
54f9ee45 | 2860 | _core_.EvtHandler_swigregister(EvtHandlerPtr) |
d14a1e28 RD |
2861 | |
2862 | #--------------------------------------------------------------------------- | |
2863 | ||
2864 | class PyEventBinder(object): | |
2865 | """ | |
2866 | Instances of this class are used to bind specific events to event | |
2867 | handlers. | |
2868 | """ | |
2869 | def __init__(self, evtType, expectedIDs=0): | |
2870 | if expectedIDs not in [0, 1, 2]: | |
2871 | raise ValueError, "Invalid number of expectedIDs" | |
2872 | self.expectedIDs = expectedIDs | |
2873 | ||
2874 | if type(evtType) == list or type(evtType) == tuple: | |
2875 | self.evtType = evtType | |
2876 | else: | |
2877 | self.evtType = [evtType] | |
2878 | ||
2879 | ||
2880 | def Bind(self, target, id1, id2, function): | |
2881 | """Bind this set of event types to target.""" | |
2882 | for et in self.evtType: | |
2883 | target.Connect(id1, id2, et, function) | |
2884 | ||
66c033b4 RD |
2885 | |
2886 | def Unbind(self, target, id1, id2): | |
2887 | """Remove an event binding.""" | |
2888 | success = 0 | |
2889 | for et in self.evtType: | |
2890 | success += target.Disconnect(id1, id2, et) | |
2891 | return success != 0 | |
2892 | ||
d14a1e28 RD |
2893 | |
2894 | def __call__(self, *args): | |
2895 | """ | |
2896 | For backwards compatibility with the old EVT_* functions. | |
2897 | Should be called with either (window, func), (window, ID, | |
2898 | func) or (window, ID1, ID2, func) parameters depending on the | |
2899 | type of the event. | |
2900 | """ | |
2901 | assert len(args) == 2 + self.expectedIDs | |
2902 | id1 = wx.ID_ANY | |
2903 | id2 = wx.ID_ANY | |
2904 | target = args[0] | |
2905 | if self.expectedIDs == 0: | |
2906 | func = args[1] | |
2907 | elif self.expectedIDs == 1: | |
2908 | id1 = args[1] | |
2909 | func = args[2] | |
2910 | elif self.expectedIDs == 2: | |
2911 | id1 = args[1] | |
2912 | id2 = args[2] | |
2913 | func = args[3] | |
2914 | else: | |
2915 | raise ValueError, "Unexpected number of IDs" | |
2916 | ||
2917 | self.Bind(target, id1, id2, func) | |
2918 | ||
2919 | ||
2920 | # These two are square pegs that don't fit the PyEventBinder hole... | |
2921 | def EVT_COMMAND(win, id, cmd, func): | |
2922 | win.Connect(id, -1, cmd, func) | |
2923 | def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): | |
2924 | win.Connect(id1, id2, cmd, func) | |
2925 | ||
2926 | ||
2927 | #--------------------------------------------------------------------------- | |
2928 | ||
2929 | #--------------------------------------------------------------------------- | |
2930 | ||
54f9ee45 RD |
2931 | EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE |
2932 | EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX | |
d14a1e28 | 2933 | |
e811c8ce RD |
2934 | def NewEventType(*args, **kwargs): |
2935 | """NewEventType() -> wxEventType""" | |
54f9ee45 RD |
2936 | return _core_.NewEventType(*args, **kwargs) |
2937 | wxEVT_NULL = _core_.wxEVT_NULL | |
2938 | wxEVT_FIRST = _core_.wxEVT_FIRST | |
2939 | wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST | |
2940 | wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED | |
2941 | wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED | |
2942 | wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED | |
2943 | wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED | |
2944 | wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED | |
2945 | wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED | |
2946 | wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED | |
2947 | wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED | |
2948 | wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED | |
2949 | wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED | |
2950 | wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED | |
2951 | wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED | |
2952 | wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED | |
2953 | wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED | |
2954 | wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED | |
2955 | wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER | |
2956 | wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN | |
2957 | wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP | |
2958 | wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN | |
2959 | wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP | |
2960 | wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN | |
2961 | wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP | |
2962 | wxEVT_MOTION = _core_.wxEVT_MOTION | |
2963 | wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW | |
2964 | wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW | |
2965 | wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK | |
2966 | wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK | |
2967 | wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK | |
2968 | wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS | |
2969 | wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS | |
2970 | wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS | |
2971 | wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL | |
2972 | wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN | |
2973 | wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP | |
2974 | wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN | |
2975 | wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP | |
2976 | wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN | |
2977 | wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP | |
2978 | wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION | |
2979 | wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW | |
2980 | wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW | |
2981 | wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK | |
2982 | wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK | |
2983 | wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK | |
2984 | wxEVT_CHAR = _core_.wxEVT_CHAR | |
2985 | wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK | |
2986 | wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY | |
2987 | wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN | |
2988 | wxEVT_KEY_UP = _core_.wxEVT_KEY_UP | |
2989 | wxEVT_HOTKEY = _core_.wxEVT_HOTKEY | |
2990 | wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR | |
2991 | wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP | |
2992 | wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM | |
2993 | wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP | |
2994 | wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN | |
2995 | wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP | |
2996 | wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN | |
2997 | wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK | |
2998 | wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE | |
2999 | wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL | |
3000 | wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP | |
3001 | wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM | |
3002 | wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP | |
3003 | wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN | |
3004 | wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP | |
3005 | wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN | |
3006 | wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK | |
3007 | wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE | |
3008 | wxEVT_SIZE = _core_.wxEVT_SIZE | |
3009 | wxEVT_MOVE = _core_.wxEVT_MOVE | |
3010 | wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW | |
3011 | wxEVT_END_SESSION = _core_.wxEVT_END_SESSION | |
3012 | wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION | |
3013 | wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP | |
3014 | wxEVT_POWER = _core_.wxEVT_POWER | |
3015 | wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE | |
3016 | wxEVT_CREATE = _core_.wxEVT_CREATE | |
3017 | wxEVT_DESTROY = _core_.wxEVT_DESTROY | |
3018 | wxEVT_SHOW = _core_.wxEVT_SHOW | |
3019 | wxEVT_ICONIZE = _core_.wxEVT_ICONIZE | |
3020 | wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE | |
3021 | wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED | |
3022 | wxEVT_PAINT = _core_.wxEVT_PAINT | |
3023 | wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND | |
3024 | wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT | |
3025 | wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON | |
3026 | wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN | |
3027 | wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE | |
3028 | wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT | |
3029 | wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU | |
3030 | wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED | |
3031 | wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED | |
3032 | wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED | |
3033 | wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE | |
3034 | wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED | |
3035 | wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES | |
3036 | wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM | |
3037 | wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM | |
3038 | wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM | |
3039 | wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG | |
3040 | wxEVT_IDLE = _core_.wxEVT_IDLE | |
3041 | wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI | |
3042 | wxEVT_SIZING = _core_.wxEVT_SIZING | |
3043 | wxEVT_MOVING = _core_.wxEVT_MOVING | |
3044 | wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK | |
3045 | wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK | |
3046 | wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK | |
3047 | wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK | |
3048 | wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS | |
3049 | wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS | |
3050 | wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER | |
d14a1e28 RD |
3051 | # |
3052 | # Create some event binders | |
3053 | EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE ) | |
3054 | EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING ) | |
3055 | EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE ) | |
3056 | EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING ) | |
3057 | EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW ) | |
3058 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
3059 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
3060 | EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT ) | |
3061 | EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT ) | |
3062 | EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND ) | |
3063 | EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR ) | |
3064 | EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN ) | |
3065 | EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP ) | |
3066 | EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) | |
3067 | EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK ) | |
3068 | EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN ) | |
3069 | EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE ) | |
3070 | EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1) | |
3071 | EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT ) | |
3072 | EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS ) | |
3073 | EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS ) | |
3074 | EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS ) | |
3075 | EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE ) | |
3076 | EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP ) | |
3077 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
3078 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
3079 | EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES ) | |
3080 | EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG ) | |
3081 | EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED ) | |
3082 | EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED ) | |
3083 | EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW ) | |
3084 | EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE ) | |
3085 | EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE ) | |
3086 | EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY ) | |
3087 | EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED ) | |
3088 | EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE ) | |
3089 | EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE ) | |
3090 | EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY ) | |
3091 | EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR ) | |
3092 | EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED ) | |
3093 | ||
3094 | EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN ) | |
3095 | EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP ) | |
3096 | EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN ) | |
3097 | EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP ) | |
3098 | EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN ) | |
3099 | EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP ) | |
3100 | EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION ) | |
3101 | EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK ) | |
3102 | EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK ) | |
3103 | EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK ) | |
3104 | EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW ) | |
3105 | EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW ) | |
3106 | EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL ) | |
3107 | ||
3108 | EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN, | |
3109 | wxEVT_LEFT_UP, | |
3110 | wxEVT_MIDDLE_DOWN, | |
3111 | wxEVT_MIDDLE_UP, | |
3112 | wxEVT_RIGHT_DOWN, | |
3113 | wxEVT_RIGHT_UP, | |
3114 | wxEVT_MOTION, | |
3115 | wxEVT_LEFT_DCLICK, | |
3116 | wxEVT_MIDDLE_DCLICK, | |
3117 | wxEVT_RIGHT_DCLICK, | |
3118 | wxEVT_ENTER_WINDOW, | |
3119 | wxEVT_LEAVE_WINDOW, | |
3120 | wxEVT_MOUSEWHEEL | |
3121 | ]) | |
3122 | ||
3123 | ||
3124 | # Scrolling from wxWindow (sent to wxScrolledWindow) | |
3125 | EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, | |
3126 | wxEVT_SCROLLWIN_BOTTOM, | |
3127 | wxEVT_SCROLLWIN_LINEUP, | |
3128 | wxEVT_SCROLLWIN_LINEDOWN, | |
3129 | wxEVT_SCROLLWIN_PAGEUP, | |
3130 | wxEVT_SCROLLWIN_PAGEDOWN, | |
3131 | wxEVT_SCROLLWIN_THUMBTRACK, | |
3132 | wxEVT_SCROLLWIN_THUMBRELEASE, | |
3133 | ]) | |
3134 | ||
3135 | EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP ) | |
3136 | EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM ) | |
3137 | EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP ) | |
3138 | EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN ) | |
3139 | EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP ) | |
3140 | EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN ) | |
3141 | EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK ) | |
3142 | EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE ) | |
3143 | ||
3144 | # Scrolling from wxSlider and wxScrollBar | |
3145 | EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
3146 | wxEVT_SCROLL_BOTTOM, | |
3147 | wxEVT_SCROLL_LINEUP, | |
3148 | wxEVT_SCROLL_LINEDOWN, | |
3149 | wxEVT_SCROLL_PAGEUP, | |
3150 | wxEVT_SCROLL_PAGEDOWN, | |
3151 | wxEVT_SCROLL_THUMBTRACK, | |
3152 | wxEVT_SCROLL_THUMBRELEASE, | |
3153 | wxEVT_SCROLL_ENDSCROLL, | |
3154 | ]) | |
3155 | ||
3156 | EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP ) | |
3157 | EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM ) | |
3158 | EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP ) | |
3159 | EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN ) | |
3160 | EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP ) | |
3161 | EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN ) | |
3162 | EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK ) | |
3163 | EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE ) | |
3164 | EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL ) | |
3165 | ||
3166 | # Scrolling from wxSlider and wxScrollBar, with an id | |
3167 | EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
3168 | wxEVT_SCROLL_BOTTOM, | |
3169 | wxEVT_SCROLL_LINEUP, | |
3170 | wxEVT_SCROLL_LINEDOWN, | |
3171 | wxEVT_SCROLL_PAGEUP, | |
3172 | wxEVT_SCROLL_PAGEDOWN, | |
3173 | wxEVT_SCROLL_THUMBTRACK, | |
3174 | wxEVT_SCROLL_THUMBRELEASE, | |
3175 | wxEVT_SCROLL_ENDSCROLL, | |
3176 | ], 1) | |
3177 | ||
3178 | EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1) | |
3179 | EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1) | |
3180 | EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1) | |
3181 | EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1) | |
3182 | EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1) | |
3183 | EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1) | |
3184 | EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) | |
3185 | EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1) | |
3186 | EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1) | |
3187 | ||
d14a1e28 RD |
3188 | EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1) |
3189 | EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1) | |
3190 | EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1) | |
3191 | EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1) | |
3192 | EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1) | |
3193 | EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1) | |
3194 | EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2) | |
3195 | EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1) | |
3196 | EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1) | |
3197 | EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1) | |
3198 | ||
3199 | EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1) | |
3200 | EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1) | |
3201 | EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1) | |
3202 | EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1) | |
3203 | EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2) | |
3204 | EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1) | |
3205 | EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2) | |
3206 | EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1) | |
3207 | EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1) | |
3208 | ||
3209 | ||
3210 | EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1) | |
3211 | EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1) | |
3212 | EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1) | |
3213 | EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1) | |
3214 | EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1) | |
3215 | EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1) | |
3216 | EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1) | |
3217 | ||
3218 | EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE ) | |
3219 | ||
3220 | EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1) | |
3221 | EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2) | |
3222 | ||
3223 | EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) | |
3224 | ||
3225 | ||
3226 | ||
3227 | #--------------------------------------------------------------------------- | |
3228 | ||
3229 | class Event(Object): | |
093d3ff1 | 3230 | """Proxy of C++ Event class""" |
e811c8ce RD |
3231 | def __init__(self): raise RuntimeError, "No constructor defined" |
3232 | def __repr__(self): | |
3233 | return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 | 3234 | def __del__(self, destroy=_core_.delete_Event): |
a95a7133 | 3235 | """__del__(self)""" |
d14a1e28 RD |
3236 | try: |
3237 | if self.thisown: destroy(self) | |
3238 | except: pass | |
e811c8ce RD |
3239 | |
3240 | def SetEventType(*args, **kwargs): | |
a95a7133 | 3241 | """SetEventType(self, wxEventType typ)""" |
54f9ee45 | 3242 | return _core_.Event_SetEventType(*args, **kwargs) |
e811c8ce RD |
3243 | |
3244 | def GetEventType(*args, **kwargs): | |
a95a7133 | 3245 | """GetEventType(self) -> wxEventType""" |
54f9ee45 | 3246 | return _core_.Event_GetEventType(*args, **kwargs) |
e811c8ce RD |
3247 | |
3248 | def GetEventObject(*args, **kwargs): | |
a95a7133 | 3249 | """GetEventObject(self) -> Object""" |
54f9ee45 | 3250 | return _core_.Event_GetEventObject(*args, **kwargs) |
e811c8ce RD |
3251 | |
3252 | def SetEventObject(*args, **kwargs): | |
a95a7133 | 3253 | """SetEventObject(self, Object obj)""" |
54f9ee45 | 3254 | return _core_.Event_SetEventObject(*args, **kwargs) |
e811c8ce RD |
3255 | |
3256 | def GetTimestamp(*args, **kwargs): | |
a95a7133 | 3257 | """GetTimestamp(self) -> long""" |
54f9ee45 | 3258 | return _core_.Event_GetTimestamp(*args, **kwargs) |
e811c8ce RD |
3259 | |
3260 | def SetTimestamp(*args, **kwargs): | |
a95a7133 | 3261 | """SetTimestamp(self, long ts=0)""" |
54f9ee45 | 3262 | return _core_.Event_SetTimestamp(*args, **kwargs) |
e811c8ce RD |
3263 | |
3264 | def GetId(*args, **kwargs): | |
a95a7133 | 3265 | """GetId(self) -> int""" |
54f9ee45 | 3266 | return _core_.Event_GetId(*args, **kwargs) |
e811c8ce RD |
3267 | |
3268 | def SetId(*args, **kwargs): | |
a95a7133 | 3269 | """SetId(self, int Id)""" |
54f9ee45 | 3270 | return _core_.Event_SetId(*args, **kwargs) |
e811c8ce RD |
3271 | |
3272 | def IsCommandEvent(*args, **kwargs): | |
a95a7133 | 3273 | """IsCommandEvent(self) -> bool""" |
54f9ee45 | 3274 | return _core_.Event_IsCommandEvent(*args, **kwargs) |
e811c8ce RD |
3275 | |
3276 | def Skip(*args, **kwargs): | |
a95a7133 | 3277 | """Skip(self, bool skip=True)""" |
54f9ee45 | 3278 | return _core_.Event_Skip(*args, **kwargs) |
e811c8ce RD |
3279 | |
3280 | def GetSkipped(*args, **kwargs): | |
a95a7133 | 3281 | """GetSkipped(self) -> bool""" |
54f9ee45 | 3282 | return _core_.Event_GetSkipped(*args, **kwargs) |
e811c8ce RD |
3283 | |
3284 | def ShouldPropagate(*args, **kwargs): | |
a95a7133 | 3285 | """ShouldPropagate(self) -> bool""" |
54f9ee45 | 3286 | return _core_.Event_ShouldPropagate(*args, **kwargs) |
e811c8ce RD |
3287 | |
3288 | def StopPropagation(*args, **kwargs): | |
a95a7133 | 3289 | """StopPropagation(self) -> int""" |
54f9ee45 | 3290 | return _core_.Event_StopPropagation(*args, **kwargs) |
e811c8ce RD |
3291 | |
3292 | def ResumePropagation(*args, **kwargs): | |
a95a7133 | 3293 | """ResumePropagation(self, int propagationLevel)""" |
54f9ee45 | 3294 | return _core_.Event_ResumePropagation(*args, **kwargs) |
e811c8ce RD |
3295 | |
3296 | def Clone(*args, **kwargs): | |
a95a7133 | 3297 | """Clone(self) -> Event""" |
54f9ee45 | 3298 | return _core_.Event_Clone(*args, **kwargs) |
e811c8ce | 3299 | |
d14a1e28 RD |
3300 | |
3301 | class EventPtr(Event): | |
3302 | def __init__(self, this): | |
3303 | self.this = this | |
3304 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3305 | self.__class__ = Event | |
54f9ee45 | 3306 | _core_.Event_swigregister(EventPtr) |
d14a1e28 RD |
3307 | |
3308 | #--------------------------------------------------------------------------- | |
3309 | ||
3310 | class PropagationDisabler(object): | |
093d3ff1 | 3311 | """Proxy of C++ PropagationDisabler class""" |
e811c8ce RD |
3312 | def __repr__(self): |
3313 | return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3314 | def __init__(self, *args, **kwargs): |
a95a7133 | 3315 | """__init__(self, Event event) -> PropagationDisabler""" |
54f9ee45 | 3316 | newobj = _core_.new_PropagationDisabler(*args, **kwargs) |
d14a1e28 RD |
3317 | self.this = newobj.this |
3318 | self.thisown = 1 | |
3319 | del newobj.thisown | |
54f9ee45 | 3320 | def __del__(self, destroy=_core_.delete_PropagationDisabler): |
a95a7133 | 3321 | """__del__(self)""" |
d14a1e28 RD |
3322 | try: |
3323 | if self.thisown: destroy(self) | |
3324 | except: pass | |
e811c8ce | 3325 | |
d14a1e28 RD |
3326 | |
3327 | class PropagationDisablerPtr(PropagationDisabler): | |
3328 | def __init__(self, this): | |
3329 | self.this = this | |
3330 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3331 | self.__class__ = PropagationDisabler | |
54f9ee45 | 3332 | _core_.PropagationDisabler_swigregister(PropagationDisablerPtr) |
d14a1e28 RD |
3333 | |
3334 | class PropagateOnce(object): | |
093d3ff1 | 3335 | """Proxy of C++ PropagateOnce class""" |
e811c8ce RD |
3336 | def __repr__(self): |
3337 | return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3338 | def __init__(self, *args, **kwargs): |
a95a7133 | 3339 | """__init__(self, Event event) -> PropagateOnce""" |
54f9ee45 | 3340 | newobj = _core_.new_PropagateOnce(*args, **kwargs) |
d14a1e28 RD |
3341 | self.this = newobj.this |
3342 | self.thisown = 1 | |
3343 | del newobj.thisown | |
54f9ee45 | 3344 | def __del__(self, destroy=_core_.delete_PropagateOnce): |
a95a7133 | 3345 | """__del__(self)""" |
d14a1e28 RD |
3346 | try: |
3347 | if self.thisown: destroy(self) | |
3348 | except: pass | |
e811c8ce | 3349 | |
d14a1e28 RD |
3350 | |
3351 | class PropagateOncePtr(PropagateOnce): | |
3352 | def __init__(self, this): | |
3353 | self.this = this | |
3354 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3355 | self.__class__ = PropagateOnce | |
54f9ee45 | 3356 | _core_.PropagateOnce_swigregister(PropagateOncePtr) |
d14a1e28 RD |
3357 | |
3358 | #--------------------------------------------------------------------------- | |
3359 | ||
3360 | class CommandEvent(Event): | |
093d3ff1 | 3361 | """Proxy of C++ CommandEvent class""" |
e811c8ce RD |
3362 | def __repr__(self): |
3363 | return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3364 | def __init__(self, *args, **kwargs): |
a95a7133 | 3365 | """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent""" |
54f9ee45 | 3366 | newobj = _core_.new_CommandEvent(*args, **kwargs) |
d14a1e28 RD |
3367 | self.this = newobj.this |
3368 | self.thisown = 1 | |
3369 | del newobj.thisown | |
e811c8ce | 3370 | def GetSelection(*args, **kwargs): |
a95a7133 | 3371 | """GetSelection(self) -> int""" |
54f9ee45 | 3372 | return _core_.CommandEvent_GetSelection(*args, **kwargs) |
e811c8ce RD |
3373 | |
3374 | def SetString(*args, **kwargs): | |
a95a7133 | 3375 | """SetString(self, String s)""" |
54f9ee45 | 3376 | return _core_.CommandEvent_SetString(*args, **kwargs) |
e811c8ce RD |
3377 | |
3378 | def GetString(*args, **kwargs): | |
a95a7133 | 3379 | """GetString(self) -> String""" |
54f9ee45 | 3380 | return _core_.CommandEvent_GetString(*args, **kwargs) |
e811c8ce RD |
3381 | |
3382 | def IsChecked(*args, **kwargs): | |
a95a7133 | 3383 | """IsChecked(self) -> bool""" |
54f9ee45 | 3384 | return _core_.CommandEvent_IsChecked(*args, **kwargs) |
e811c8ce | 3385 | |
242b7b46 | 3386 | Checked = IsChecked |
e811c8ce | 3387 | def IsSelection(*args, **kwargs): |
a95a7133 | 3388 | """IsSelection(self) -> bool""" |
54f9ee45 | 3389 | return _core_.CommandEvent_IsSelection(*args, **kwargs) |
e811c8ce RD |
3390 | |
3391 | def SetExtraLong(*args, **kwargs): | |
a95a7133 | 3392 | """SetExtraLong(self, long extraLong)""" |
54f9ee45 | 3393 | return _core_.CommandEvent_SetExtraLong(*args, **kwargs) |
e811c8ce RD |
3394 | |
3395 | def GetExtraLong(*args, **kwargs): | |
a95a7133 | 3396 | """GetExtraLong(self) -> long""" |
54f9ee45 | 3397 | return _core_.CommandEvent_GetExtraLong(*args, **kwargs) |
e811c8ce RD |
3398 | |
3399 | def SetInt(*args, **kwargs): | |
a95a7133 | 3400 | """SetInt(self, int i)""" |
54f9ee45 | 3401 | return _core_.CommandEvent_SetInt(*args, **kwargs) |
e811c8ce RD |
3402 | |
3403 | def GetInt(*args, **kwargs): | |
a95a7133 | 3404 | """GetInt(self) -> long""" |
54f9ee45 | 3405 | return _core_.CommandEvent_GetInt(*args, **kwargs) |
e811c8ce RD |
3406 | |
3407 | def Clone(*args, **kwargs): | |
a95a7133 | 3408 | """Clone(self) -> Event""" |
54f9ee45 | 3409 | return _core_.CommandEvent_Clone(*args, **kwargs) |
e811c8ce | 3410 | |
d14a1e28 RD |
3411 | |
3412 | class CommandEventPtr(CommandEvent): | |
3413 | def __init__(self, this): | |
3414 | self.this = this | |
3415 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3416 | self.__class__ = CommandEvent | |
54f9ee45 | 3417 | _core_.CommandEvent_swigregister(CommandEventPtr) |
d14a1e28 RD |
3418 | |
3419 | #--------------------------------------------------------------------------- | |
3420 | ||
3421 | class NotifyEvent(CommandEvent): | |
093d3ff1 | 3422 | """Proxy of C++ NotifyEvent class""" |
e811c8ce RD |
3423 | def __repr__(self): |
3424 | return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3425 | def __init__(self, *args, **kwargs): |
a95a7133 | 3426 | """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent""" |
54f9ee45 | 3427 | newobj = _core_.new_NotifyEvent(*args, **kwargs) |
d14a1e28 RD |
3428 | self.this = newobj.this |
3429 | self.thisown = 1 | |
3430 | del newobj.thisown | |
e811c8ce | 3431 | def Veto(*args, **kwargs): |
a95a7133 | 3432 | """Veto(self)""" |
54f9ee45 | 3433 | return _core_.NotifyEvent_Veto(*args, **kwargs) |
e811c8ce RD |
3434 | |
3435 | def Allow(*args, **kwargs): | |
a95a7133 | 3436 | """Allow(self)""" |
54f9ee45 | 3437 | return _core_.NotifyEvent_Allow(*args, **kwargs) |
e811c8ce RD |
3438 | |
3439 | def IsAllowed(*args, **kwargs): | |
a95a7133 | 3440 | """IsAllowed(self) -> bool""" |
54f9ee45 | 3441 | return _core_.NotifyEvent_IsAllowed(*args, **kwargs) |
e811c8ce | 3442 | |
d14a1e28 RD |
3443 | |
3444 | class NotifyEventPtr(NotifyEvent): | |
3445 | def __init__(self, this): | |
3446 | self.this = this | |
3447 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3448 | self.__class__ = NotifyEvent | |
54f9ee45 | 3449 | _core_.NotifyEvent_swigregister(NotifyEventPtr) |
d14a1e28 RD |
3450 | |
3451 | #--------------------------------------------------------------------------- | |
3452 | ||
3453 | class ScrollEvent(CommandEvent): | |
093d3ff1 | 3454 | """Proxy of C++ ScrollEvent class""" |
e811c8ce RD |
3455 | def __repr__(self): |
3456 | return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3457 | def __init__(self, *args, **kwargs): |
0df68c9f | 3458 | """ |
a95a7133 | 3459 | __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0, |
0df68c9f RD |
3460 | int orient=0) -> ScrollEvent |
3461 | """ | |
54f9ee45 | 3462 | newobj = _core_.new_ScrollEvent(*args, **kwargs) |
d14a1e28 RD |
3463 | self.this = newobj.this |
3464 | self.thisown = 1 | |
3465 | del newobj.thisown | |
e811c8ce | 3466 | def GetOrientation(*args, **kwargs): |
a95a7133 | 3467 | """GetOrientation(self) -> int""" |
54f9ee45 | 3468 | return _core_.ScrollEvent_GetOrientation(*args, **kwargs) |
e811c8ce RD |
3469 | |
3470 | def GetPosition(*args, **kwargs): | |
a95a7133 | 3471 | """GetPosition(self) -> int""" |
54f9ee45 | 3472 | return _core_.ScrollEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3473 | |
3474 | def SetOrientation(*args, **kwargs): | |
a95a7133 | 3475 | """SetOrientation(self, int orient)""" |
54f9ee45 | 3476 | return _core_.ScrollEvent_SetOrientation(*args, **kwargs) |
e811c8ce RD |
3477 | |
3478 | def SetPosition(*args, **kwargs): | |
a95a7133 | 3479 | """SetPosition(self, int pos)""" |
54f9ee45 | 3480 | return _core_.ScrollEvent_SetPosition(*args, **kwargs) |
e811c8ce | 3481 | |
d14a1e28 RD |
3482 | |
3483 | class ScrollEventPtr(ScrollEvent): | |
3484 | def __init__(self, this): | |
3485 | self.this = this | |
3486 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3487 | self.__class__ = ScrollEvent | |
54f9ee45 | 3488 | _core_.ScrollEvent_swigregister(ScrollEventPtr) |
d14a1e28 RD |
3489 | |
3490 | #--------------------------------------------------------------------------- | |
3491 | ||
3492 | class ScrollWinEvent(Event): | |
093d3ff1 | 3493 | """Proxy of C++ ScrollWinEvent class""" |
e811c8ce RD |
3494 | def __repr__(self): |
3495 | return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3496 | def __init__(self, *args, **kwargs): |
a95a7133 | 3497 | """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent""" |
54f9ee45 | 3498 | newobj = _core_.new_ScrollWinEvent(*args, **kwargs) |
d14a1e28 RD |
3499 | self.this = newobj.this |
3500 | self.thisown = 1 | |
3501 | del newobj.thisown | |
e811c8ce | 3502 | def GetOrientation(*args, **kwargs): |
a95a7133 | 3503 | """GetOrientation(self) -> int""" |
54f9ee45 | 3504 | return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs) |
e811c8ce RD |
3505 | |
3506 | def GetPosition(*args, **kwargs): | |
a95a7133 | 3507 | """GetPosition(self) -> int""" |
54f9ee45 | 3508 | return _core_.ScrollWinEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3509 | |
3510 | def SetOrientation(*args, **kwargs): | |
a95a7133 | 3511 | """SetOrientation(self, int orient)""" |
54f9ee45 | 3512 | return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs) |
e811c8ce RD |
3513 | |
3514 | def SetPosition(*args, **kwargs): | |
a95a7133 | 3515 | """SetPosition(self, int pos)""" |
54f9ee45 | 3516 | return _core_.ScrollWinEvent_SetPosition(*args, **kwargs) |
e811c8ce | 3517 | |
d14a1e28 RD |
3518 | |
3519 | class ScrollWinEventPtr(ScrollWinEvent): | |
3520 | def __init__(self, this): | |
3521 | self.this = this | |
3522 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3523 | self.__class__ = ScrollWinEvent | |
54f9ee45 | 3524 | _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr) |
d14a1e28 RD |
3525 | |
3526 | #--------------------------------------------------------------------------- | |
3527 | ||
54f9ee45 RD |
3528 | MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY |
3529 | MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE | |
3530 | MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT | |
3531 | MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE | |
3532 | MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT | |
d14a1e28 | 3533 | class MouseEvent(Event): |
093d3ff1 | 3534 | """Proxy of C++ MouseEvent class""" |
e811c8ce RD |
3535 | def __repr__(self): |
3536 | return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3537 | def __init__(self, *args, **kwargs): |
a95a7133 | 3538 | """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent""" |
54f9ee45 | 3539 | newobj = _core_.new_MouseEvent(*args, **kwargs) |
d14a1e28 RD |
3540 | self.this = newobj.this |
3541 | self.thisown = 1 | |
3542 | del newobj.thisown | |
e811c8ce | 3543 | def IsButton(*args, **kwargs): |
a95a7133 | 3544 | """IsButton(self) -> bool""" |
54f9ee45 | 3545 | return _core_.MouseEvent_IsButton(*args, **kwargs) |
e811c8ce RD |
3546 | |
3547 | def ButtonDown(*args, **kwargs): | |
a95a7133 | 3548 | """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool""" |
54f9ee45 | 3549 | return _core_.MouseEvent_ButtonDown(*args, **kwargs) |
e811c8ce RD |
3550 | |
3551 | def ButtonDClick(*args, **kwargs): | |
a95a7133 | 3552 | """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool""" |
54f9ee45 | 3553 | return _core_.MouseEvent_ButtonDClick(*args, **kwargs) |
e811c8ce RD |
3554 | |
3555 | def ButtonUp(*args, **kwargs): | |
a95a7133 | 3556 | """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool""" |
54f9ee45 | 3557 | return _core_.MouseEvent_ButtonUp(*args, **kwargs) |
e811c8ce RD |
3558 | |
3559 | def Button(*args, **kwargs): | |
a95a7133 | 3560 | """Button(self, int but) -> bool""" |
54f9ee45 | 3561 | return _core_.MouseEvent_Button(*args, **kwargs) |
e811c8ce RD |
3562 | |
3563 | def ButtonIsDown(*args, **kwargs): | |
a95a7133 | 3564 | """ButtonIsDown(self, int but) -> bool""" |
54f9ee45 | 3565 | return _core_.MouseEvent_ButtonIsDown(*args, **kwargs) |
e811c8ce RD |
3566 | |
3567 | def GetButton(*args, **kwargs): | |
a95a7133 | 3568 | """GetButton(self) -> int""" |
54f9ee45 | 3569 | return _core_.MouseEvent_GetButton(*args, **kwargs) |
e811c8ce RD |
3570 | |
3571 | def ControlDown(*args, **kwargs): | |
a95a7133 | 3572 | """ControlDown(self) -> bool""" |
54f9ee45 | 3573 | return _core_.MouseEvent_ControlDown(*args, **kwargs) |
e811c8ce RD |
3574 | |
3575 | def MetaDown(*args, **kwargs): | |
a95a7133 | 3576 | """MetaDown(self) -> bool""" |
54f9ee45 | 3577 | return _core_.MouseEvent_MetaDown(*args, **kwargs) |
e811c8ce RD |
3578 | |
3579 | def AltDown(*args, **kwargs): | |
a95a7133 | 3580 | """AltDown(self) -> bool""" |
54f9ee45 | 3581 | return _core_.MouseEvent_AltDown(*args, **kwargs) |
e811c8ce RD |
3582 | |
3583 | def ShiftDown(*args, **kwargs): | |
a95a7133 | 3584 | """ShiftDown(self) -> bool""" |
54f9ee45 | 3585 | return _core_.MouseEvent_ShiftDown(*args, **kwargs) |
e811c8ce | 3586 | |
412d302d RD |
3587 | def CmdDown(*args, **kwargs): |
3588 | """ | |
3589 | CmdDown(self) -> bool | |
3590 | ||
3591 | "Cmd" is a pseudo key which is the same as Control for PC and Unix | |
3592 | platforms but the special "Apple" (a.k.a as "Command") key on | |
3593 | Macs: it makes often sense to use it instead of, say, `ControlDown` | |
3594 | because Cmd key is used for the same thing under Mac as Ctrl | |
3595 | elsewhere. The Ctrl still exists, it's just not used for this | |
3596 | purpose. So for non-Mac platforms this is the same as `ControlDown` | |
3597 | and Macs this is the same as `MetaDown`. | |
3598 | """ | |
3599 | return _core_.MouseEvent_CmdDown(*args, **kwargs) | |
3600 | ||
e811c8ce | 3601 | def LeftDown(*args, **kwargs): |
a95a7133 | 3602 | """LeftDown(self) -> bool""" |
54f9ee45 | 3603 | return _core_.MouseEvent_LeftDown(*args, **kwargs) |
e811c8ce RD |
3604 | |
3605 | def MiddleDown(*args, **kwargs): | |
a95a7133 | 3606 | """MiddleDown(self) -> bool""" |
54f9ee45 | 3607 | return _core_.MouseEvent_MiddleDown(*args, **kwargs) |
e811c8ce RD |
3608 | |
3609 | def RightDown(*args, **kwargs): | |
a95a7133 | 3610 | """RightDown(self) -> bool""" |
54f9ee45 | 3611 | return _core_.MouseEvent_RightDown(*args, **kwargs) |
e811c8ce RD |
3612 | |
3613 | def LeftUp(*args, **kwargs): | |
a95a7133 | 3614 | """LeftUp(self) -> bool""" |
54f9ee45 | 3615 | return _core_.MouseEvent_LeftUp(*args, **kwargs) |
e811c8ce RD |
3616 | |
3617 | def MiddleUp(*args, **kwargs): | |
a95a7133 | 3618 | """MiddleUp(self) -> bool""" |
54f9ee45 | 3619 | return _core_.MouseEvent_MiddleUp(*args, **kwargs) |
e811c8ce RD |
3620 | |
3621 | def RightUp(*args, **kwargs): | |
a95a7133 | 3622 | """RightUp(self) -> bool""" |
54f9ee45 | 3623 | return _core_.MouseEvent_RightUp(*args, **kwargs) |
e811c8ce RD |
3624 | |
3625 | def LeftDClick(*args, **kwargs): | |
a95a7133 | 3626 | """LeftDClick(self) -> bool""" |
54f9ee45 | 3627 | return _core_.MouseEvent_LeftDClick(*args, **kwargs) |
e811c8ce RD |
3628 | |
3629 | def MiddleDClick(*args, **kwargs): | |
a95a7133 | 3630 | """MiddleDClick(self) -> bool""" |
54f9ee45 | 3631 | return _core_.MouseEvent_MiddleDClick(*args, **kwargs) |
e811c8ce RD |
3632 | |
3633 | def RightDClick(*args, **kwargs): | |
a95a7133 | 3634 | """RightDClick(self) -> bool""" |
54f9ee45 | 3635 | return _core_.MouseEvent_RightDClick(*args, **kwargs) |
e811c8ce RD |
3636 | |
3637 | def LeftIsDown(*args, **kwargs): | |
a95a7133 | 3638 | """LeftIsDown(self) -> bool""" |
54f9ee45 | 3639 | return _core_.MouseEvent_LeftIsDown(*args, **kwargs) |
e811c8ce RD |
3640 | |
3641 | def MiddleIsDown(*args, **kwargs): | |
a95a7133 | 3642 | """MiddleIsDown(self) -> bool""" |
54f9ee45 | 3643 | return _core_.MouseEvent_MiddleIsDown(*args, **kwargs) |
e811c8ce RD |
3644 | |
3645 | def RightIsDown(*args, **kwargs): | |
a95a7133 | 3646 | """RightIsDown(self) -> bool""" |
54f9ee45 | 3647 | return _core_.MouseEvent_RightIsDown(*args, **kwargs) |
e811c8ce RD |
3648 | |
3649 | def Dragging(*args, **kwargs): | |
a95a7133 | 3650 | """Dragging(self) -> bool""" |
54f9ee45 | 3651 | return _core_.MouseEvent_Dragging(*args, **kwargs) |
e811c8ce RD |
3652 | |
3653 | def Moving(*args, **kwargs): | |
a95a7133 | 3654 | """Moving(self) -> bool""" |
54f9ee45 | 3655 | return _core_.MouseEvent_Moving(*args, **kwargs) |
e811c8ce RD |
3656 | |
3657 | def Entering(*args, **kwargs): | |
a95a7133 | 3658 | """Entering(self) -> bool""" |
54f9ee45 | 3659 | return _core_.MouseEvent_Entering(*args, **kwargs) |
e811c8ce RD |
3660 | |
3661 | def Leaving(*args, **kwargs): | |
a95a7133 | 3662 | """Leaving(self) -> bool""" |
54f9ee45 | 3663 | return _core_.MouseEvent_Leaving(*args, **kwargs) |
e811c8ce RD |
3664 | |
3665 | def GetPosition(*args, **kwargs): | |
0df68c9f | 3666 | """ |
a95a7133 | 3667 | GetPosition(self) -> Point |
e811c8ce | 3668 | |
41e2b43e RD |
3669 | Returns the position of the mouse in window coordinates when the event |
3670 | happened. | |
0df68c9f | 3671 | """ |
54f9ee45 | 3672 | return _core_.MouseEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3673 | |
3674 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3675 | """ |
3676 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3677 | |
41e2b43e RD |
3678 | Returns the position of the mouse in window coordinates when the event |
3679 | happened. | |
0df68c9f | 3680 | """ |
54f9ee45 | 3681 | return _core_.MouseEvent_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
3682 | |
3683 | def GetLogicalPosition(*args, **kwargs): | |
a95a7133 | 3684 | """GetLogicalPosition(self, DC dc) -> Point""" |
54f9ee45 | 3685 | return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs) |
e811c8ce RD |
3686 | |
3687 | def GetX(*args, **kwargs): | |
a95a7133 | 3688 | """GetX(self) -> int""" |
54f9ee45 | 3689 | return _core_.MouseEvent_GetX(*args, **kwargs) |
e811c8ce RD |
3690 | |
3691 | def GetY(*args, **kwargs): | |
a95a7133 | 3692 | """GetY(self) -> int""" |
54f9ee45 | 3693 | return _core_.MouseEvent_GetY(*args, **kwargs) |
e811c8ce RD |
3694 | |
3695 | def GetWheelRotation(*args, **kwargs): | |
a95a7133 | 3696 | """GetWheelRotation(self) -> int""" |
54f9ee45 | 3697 | return _core_.MouseEvent_GetWheelRotation(*args, **kwargs) |
e811c8ce RD |
3698 | |
3699 | def GetWheelDelta(*args, **kwargs): | |
a95a7133 | 3700 | """GetWheelDelta(self) -> int""" |
54f9ee45 | 3701 | return _core_.MouseEvent_GetWheelDelta(*args, **kwargs) |
e811c8ce RD |
3702 | |
3703 | def GetLinesPerAction(*args, **kwargs): | |
a95a7133 | 3704 | """GetLinesPerAction(self) -> int""" |
54f9ee45 | 3705 | return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs) |
e811c8ce RD |
3706 | |
3707 | def IsPageScroll(*args, **kwargs): | |
a95a7133 | 3708 | """IsPageScroll(self) -> bool""" |
54f9ee45 RD |
3709 | return _core_.MouseEvent_IsPageScroll(*args, **kwargs) |
3710 | ||
3711 | m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set) | |
3712 | m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set) | |
3713 | m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set) | |
3714 | m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set) | |
3715 | m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set) | |
3716 | m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set) | |
3717 | m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set) | |
3718 | m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set) | |
3719 | m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set) | |
3720 | m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set) | |
3721 | m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set) | |
3722 | m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set) | |
d14a1e28 RD |
3723 | |
3724 | class MouseEventPtr(MouseEvent): | |
3725 | def __init__(self, this): | |
3726 | self.this = this | |
3727 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3728 | self.__class__ = MouseEvent | |
54f9ee45 | 3729 | _core_.MouseEvent_swigregister(MouseEventPtr) |
d14a1e28 RD |
3730 | |
3731 | #--------------------------------------------------------------------------- | |
3732 | ||
3733 | class SetCursorEvent(Event): | |
093d3ff1 | 3734 | """Proxy of C++ SetCursorEvent class""" |
e811c8ce RD |
3735 | def __repr__(self): |
3736 | return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3737 | def __init__(self, *args, **kwargs): |
a95a7133 | 3738 | """__init__(self, int x=0, int y=0) -> SetCursorEvent""" |
54f9ee45 | 3739 | newobj = _core_.new_SetCursorEvent(*args, **kwargs) |
d14a1e28 RD |
3740 | self.this = newobj.this |
3741 | self.thisown = 1 | |
3742 | del newobj.thisown | |
e811c8ce | 3743 | def GetX(*args, **kwargs): |
a95a7133 | 3744 | """GetX(self) -> int""" |
54f9ee45 | 3745 | return _core_.SetCursorEvent_GetX(*args, **kwargs) |
e811c8ce RD |
3746 | |
3747 | def GetY(*args, **kwargs): | |
a95a7133 | 3748 | """GetY(self) -> int""" |
54f9ee45 | 3749 | return _core_.SetCursorEvent_GetY(*args, **kwargs) |
e811c8ce RD |
3750 | |
3751 | def SetCursor(*args, **kwargs): | |
a95a7133 | 3752 | """SetCursor(self, Cursor cursor)""" |
54f9ee45 | 3753 | return _core_.SetCursorEvent_SetCursor(*args, **kwargs) |
e811c8ce RD |
3754 | |
3755 | def GetCursor(*args, **kwargs): | |
a95a7133 | 3756 | """GetCursor(self) -> Cursor""" |
54f9ee45 | 3757 | return _core_.SetCursorEvent_GetCursor(*args, **kwargs) |
e811c8ce RD |
3758 | |
3759 | def HasCursor(*args, **kwargs): | |
a95a7133 | 3760 | """HasCursor(self) -> bool""" |
54f9ee45 | 3761 | return _core_.SetCursorEvent_HasCursor(*args, **kwargs) |
e811c8ce | 3762 | |
d14a1e28 RD |
3763 | |
3764 | class SetCursorEventPtr(SetCursorEvent): | |
3765 | def __init__(self, this): | |
3766 | self.this = this | |
3767 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3768 | self.__class__ = SetCursorEvent | |
54f9ee45 | 3769 | _core_.SetCursorEvent_swigregister(SetCursorEventPtr) |
d14a1e28 RD |
3770 | |
3771 | #--------------------------------------------------------------------------- | |
3772 | ||
3773 | class KeyEvent(Event): | |
093d3ff1 | 3774 | """Proxy of C++ KeyEvent class""" |
e811c8ce RD |
3775 | def __repr__(self): |
3776 | return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3777 | def __init__(self, *args, **kwargs): |
a95a7133 | 3778 | """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent""" |
54f9ee45 | 3779 | newobj = _core_.new_KeyEvent(*args, **kwargs) |
d14a1e28 RD |
3780 | self.this = newobj.this |
3781 | self.thisown = 1 | |
3782 | del newobj.thisown | |
e811c8ce | 3783 | def ControlDown(*args, **kwargs): |
a95a7133 | 3784 | """ControlDown(self) -> bool""" |
54f9ee45 | 3785 | return _core_.KeyEvent_ControlDown(*args, **kwargs) |
e811c8ce RD |
3786 | |
3787 | def MetaDown(*args, **kwargs): | |
a95a7133 | 3788 | """MetaDown(self) -> bool""" |
54f9ee45 | 3789 | return _core_.KeyEvent_MetaDown(*args, **kwargs) |
e811c8ce RD |
3790 | |
3791 | def AltDown(*args, **kwargs): | |
a95a7133 | 3792 | """AltDown(self) -> bool""" |
54f9ee45 | 3793 | return _core_.KeyEvent_AltDown(*args, **kwargs) |
e811c8ce RD |
3794 | |
3795 | def ShiftDown(*args, **kwargs): | |
a95a7133 | 3796 | """ShiftDown(self) -> bool""" |
54f9ee45 | 3797 | return _core_.KeyEvent_ShiftDown(*args, **kwargs) |
e811c8ce | 3798 | |
412d302d RD |
3799 | def CmdDown(*args, **kwargs): |
3800 | """ | |
3801 | CmdDown(self) -> bool | |
3802 | ||
3803 | "Cmd" is a pseudo key which is the same as Control for PC and Unix | |
3804 | platforms but the special "Apple" (a.k.a as "Command") key on | |
3805 | Macs: it makes often sense to use it instead of, say, `ControlDown` | |
3806 | because Cmd key is used for the same thing under Mac as Ctrl | |
3807 | elsewhere. The Ctrl still exists, it's just not used for this | |
3808 | purpose. So for non-Mac platforms this is the same as `ControlDown` | |
3809 | and Macs this is the same as `MetaDown`. | |
3810 | """ | |
3811 | return _core_.KeyEvent_CmdDown(*args, **kwargs) | |
3812 | ||
e811c8ce | 3813 | def HasModifiers(*args, **kwargs): |
a95a7133 | 3814 | """HasModifiers(self) -> bool""" |
54f9ee45 | 3815 | return _core_.KeyEvent_HasModifiers(*args, **kwargs) |
e811c8ce RD |
3816 | |
3817 | def GetKeyCode(*args, **kwargs): | |
a95a7133 | 3818 | """GetKeyCode(self) -> int""" |
54f9ee45 | 3819 | return _core_.KeyEvent_GetKeyCode(*args, **kwargs) |
e811c8ce | 3820 | |
d14a1e28 | 3821 | KeyCode = GetKeyCode |
19272049 RD |
3822 | def GetUnicodeKey(*args, **kwargs): |
3823 | """GetUnicodeKey(self) -> int""" | |
3824 | return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs) | |
e811c8ce | 3825 | |
19272049 | 3826 | GetUniChar = GetUnicodeKey |
e811c8ce | 3827 | def GetRawKeyCode(*args, **kwargs): |
a95a7133 | 3828 | """GetRawKeyCode(self) -> unsigned int""" |
54f9ee45 | 3829 | return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs) |
e811c8ce RD |
3830 | |
3831 | def GetRawKeyFlags(*args, **kwargs): | |
a95a7133 | 3832 | """GetRawKeyFlags(self) -> unsigned int""" |
54f9ee45 | 3833 | return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs) |
e811c8ce RD |
3834 | |
3835 | def GetPosition(*args, **kwargs): | |
0df68c9f | 3836 | """ |
a95a7133 | 3837 | GetPosition(self) -> Point |
e811c8ce | 3838 | |
0df68c9f RD |
3839 | Find the position of the event. |
3840 | """ | |
54f9ee45 | 3841 | return _core_.KeyEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3842 | |
3843 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3844 | """ |
3845 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3846 | |
0df68c9f RD |
3847 | Find the position of the event. |
3848 | """ | |
54f9ee45 | 3849 | return _core_.KeyEvent_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
3850 | |
3851 | def GetX(*args, **kwargs): | |
a95a7133 | 3852 | """GetX(self) -> int""" |
54f9ee45 | 3853 | return _core_.KeyEvent_GetX(*args, **kwargs) |
e811c8ce RD |
3854 | |
3855 | def GetY(*args, **kwargs): | |
a95a7133 | 3856 | """GetY(self) -> int""" |
54f9ee45 RD |
3857 | return _core_.KeyEvent_GetY(*args, **kwargs) |
3858 | ||
3859 | m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set) | |
3860 | m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set) | |
3861 | m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set) | |
3862 | m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set) | |
3863 | m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set) | |
3864 | m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set) | |
3865 | m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set) | |
3866 | m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set) | |
3867 | m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set) | |
3868 | m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set) | |
d14a1e28 RD |
3869 | |
3870 | class KeyEventPtr(KeyEvent): | |
3871 | def __init__(self, this): | |
3872 | self.this = this | |
3873 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3874 | self.__class__ = KeyEvent | |
54f9ee45 | 3875 | _core_.KeyEvent_swigregister(KeyEventPtr) |
d14a1e28 RD |
3876 | |
3877 | #--------------------------------------------------------------------------- | |
3878 | ||
3879 | class SizeEvent(Event): | |
093d3ff1 | 3880 | """Proxy of C++ SizeEvent class""" |
e811c8ce RD |
3881 | def __repr__(self): |
3882 | return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3883 | def __init__(self, *args, **kwargs): |
a95a7133 | 3884 | """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent""" |
54f9ee45 | 3885 | newobj = _core_.new_SizeEvent(*args, **kwargs) |
d14a1e28 RD |
3886 | self.this = newobj.this |
3887 | self.thisown = 1 | |
3888 | del newobj.thisown | |
e811c8ce | 3889 | def GetSize(*args, **kwargs): |
a95a7133 | 3890 | """GetSize(self) -> Size""" |
54f9ee45 | 3891 | return _core_.SizeEvent_GetSize(*args, **kwargs) |
e811c8ce RD |
3892 | |
3893 | def GetRect(*args, **kwargs): | |
a95a7133 | 3894 | """GetRect(self) -> Rect""" |
54f9ee45 | 3895 | return _core_.SizeEvent_GetRect(*args, **kwargs) |
e811c8ce RD |
3896 | |
3897 | def SetRect(*args, **kwargs): | |
a95a7133 | 3898 | """SetRect(self, Rect rect)""" |
54f9ee45 | 3899 | return _core_.SizeEvent_SetRect(*args, **kwargs) |
e811c8ce RD |
3900 | |
3901 | def SetSize(*args, **kwargs): | |
a95a7133 | 3902 | """SetSize(self, Size size)""" |
54f9ee45 | 3903 | return _core_.SizeEvent_SetSize(*args, **kwargs) |
e811c8ce | 3904 | |
54f9ee45 RD |
3905 | m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set) |
3906 | m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set) | |
d14a1e28 RD |
3907 | |
3908 | class SizeEventPtr(SizeEvent): | |
3909 | def __init__(self, this): | |
3910 | self.this = this | |
3911 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3912 | self.__class__ = SizeEvent | |
54f9ee45 | 3913 | _core_.SizeEvent_swigregister(SizeEventPtr) |
d14a1e28 RD |
3914 | |
3915 | #--------------------------------------------------------------------------- | |
3916 | ||
3917 | class MoveEvent(Event): | |
093d3ff1 | 3918 | """Proxy of C++ MoveEvent class""" |
e811c8ce RD |
3919 | def __repr__(self): |
3920 | return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3921 | def __init__(self, *args, **kwargs): |
a95a7133 | 3922 | """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent""" |
54f9ee45 | 3923 | newobj = _core_.new_MoveEvent(*args, **kwargs) |
d14a1e28 RD |
3924 | self.this = newobj.this |
3925 | self.thisown = 1 | |
3926 | del newobj.thisown | |
e811c8ce | 3927 | def GetPosition(*args, **kwargs): |
a95a7133 | 3928 | """GetPosition(self) -> Point""" |
54f9ee45 | 3929 | return _core_.MoveEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3930 | |
3931 | def GetRect(*args, **kwargs): | |
a95a7133 | 3932 | """GetRect(self) -> Rect""" |
54f9ee45 | 3933 | return _core_.MoveEvent_GetRect(*args, **kwargs) |
e811c8ce RD |
3934 | |
3935 | def SetRect(*args, **kwargs): | |
a95a7133 | 3936 | """SetRect(self, Rect rect)""" |
54f9ee45 | 3937 | return _core_.MoveEvent_SetRect(*args, **kwargs) |
e811c8ce RD |
3938 | |
3939 | def SetPosition(*args, **kwargs): | |
a95a7133 | 3940 | """SetPosition(self, Point pos)""" |
54f9ee45 | 3941 | return _core_.MoveEvent_SetPosition(*args, **kwargs) |
e811c8ce | 3942 | |
54f9ee45 RD |
3943 | m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set) |
3944 | m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set) | |
d14a1e28 RD |
3945 | |
3946 | class MoveEventPtr(MoveEvent): | |
3947 | def __init__(self, this): | |
3948 | self.this = this | |
3949 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3950 | self.__class__ = MoveEvent | |
54f9ee45 | 3951 | _core_.MoveEvent_swigregister(MoveEventPtr) |
d14a1e28 RD |
3952 | |
3953 | #--------------------------------------------------------------------------- | |
3954 | ||
3955 | class PaintEvent(Event): | |
093d3ff1 | 3956 | """Proxy of C++ PaintEvent class""" |
e811c8ce RD |
3957 | def __repr__(self): |
3958 | return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3959 | def __init__(self, *args, **kwargs): |
a95a7133 | 3960 | """__init__(self, int Id=0) -> PaintEvent""" |
54f9ee45 | 3961 | newobj = _core_.new_PaintEvent(*args, **kwargs) |
d14a1e28 RD |
3962 | self.this = newobj.this |
3963 | self.thisown = 1 | |
3964 | del newobj.thisown | |
d14a1e28 RD |
3965 | |
3966 | class PaintEventPtr(PaintEvent): | |
3967 | def __init__(self, this): | |
3968 | self.this = this | |
3969 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3970 | self.__class__ = PaintEvent | |
54f9ee45 | 3971 | _core_.PaintEvent_swigregister(PaintEventPtr) |
d14a1e28 RD |
3972 | |
3973 | class NcPaintEvent(Event): | |
093d3ff1 | 3974 | """Proxy of C++ NcPaintEvent class""" |
e811c8ce RD |
3975 | def __repr__(self): |
3976 | return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3977 | def __init__(self, *args, **kwargs): |
a95a7133 | 3978 | """__init__(self, int winid=0) -> NcPaintEvent""" |
54f9ee45 | 3979 | newobj = _core_.new_NcPaintEvent(*args, **kwargs) |
d14a1e28 RD |
3980 | self.this = newobj.this |
3981 | self.thisown = 1 | |
3982 | del newobj.thisown | |
d14a1e28 RD |
3983 | |
3984 | class NcPaintEventPtr(NcPaintEvent): | |
3985 | def __init__(self, this): | |
3986 | self.this = this | |
3987 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3988 | self.__class__ = NcPaintEvent | |
54f9ee45 | 3989 | _core_.NcPaintEvent_swigregister(NcPaintEventPtr) |
d14a1e28 RD |
3990 | |
3991 | #--------------------------------------------------------------------------- | |
3992 | ||
3993 | class EraseEvent(Event): | |
093d3ff1 | 3994 | """Proxy of C++ EraseEvent class""" |
e811c8ce RD |
3995 | def __repr__(self): |
3996 | return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3997 | def __init__(self, *args, **kwargs): |
a95a7133 | 3998 | """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent""" |
54f9ee45 | 3999 | newobj = _core_.new_EraseEvent(*args, **kwargs) |
d14a1e28 RD |
4000 | self.this = newobj.this |
4001 | self.thisown = 1 | |
4002 | del newobj.thisown | |
e811c8ce | 4003 | def GetDC(*args, **kwargs): |
a95a7133 | 4004 | """GetDC(self) -> DC""" |
54f9ee45 | 4005 | return _core_.EraseEvent_GetDC(*args, **kwargs) |
e811c8ce | 4006 | |
d14a1e28 RD |
4007 | |
4008 | class EraseEventPtr(EraseEvent): | |
4009 | def __init__(self, this): | |
4010 | self.this = this | |
4011 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4012 | self.__class__ = EraseEvent | |
54f9ee45 | 4013 | _core_.EraseEvent_swigregister(EraseEventPtr) |
d14a1e28 RD |
4014 | |
4015 | #--------------------------------------------------------------------------- | |
4016 | ||
4017 | class FocusEvent(Event): | |
093d3ff1 | 4018 | """Proxy of C++ FocusEvent class""" |
e811c8ce RD |
4019 | def __repr__(self): |
4020 | return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4021 | def __init__(self, *args, **kwargs): |
a95a7133 | 4022 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent""" |
54f9ee45 | 4023 | newobj = _core_.new_FocusEvent(*args, **kwargs) |
d14a1e28 RD |
4024 | self.this = newobj.this |
4025 | self.thisown = 1 | |
4026 | del newobj.thisown | |
e811c8ce | 4027 | def GetWindow(*args, **kwargs): |
a95a7133 | 4028 | """GetWindow(self) -> Window""" |
54f9ee45 | 4029 | return _core_.FocusEvent_GetWindow(*args, **kwargs) |
e811c8ce RD |
4030 | |
4031 | def SetWindow(*args, **kwargs): | |
a95a7133 | 4032 | """SetWindow(self, Window win)""" |
54f9ee45 | 4033 | return _core_.FocusEvent_SetWindow(*args, **kwargs) |
e811c8ce | 4034 | |
d14a1e28 RD |
4035 | |
4036 | class FocusEventPtr(FocusEvent): | |
4037 | def __init__(self, this): | |
4038 | self.this = this | |
4039 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4040 | self.__class__ = FocusEvent | |
54f9ee45 | 4041 | _core_.FocusEvent_swigregister(FocusEventPtr) |
d14a1e28 RD |
4042 | |
4043 | #--------------------------------------------------------------------------- | |
4044 | ||
4045 | class ChildFocusEvent(CommandEvent): | |
093d3ff1 | 4046 | """Proxy of C++ ChildFocusEvent class""" |
e811c8ce RD |
4047 | def __repr__(self): |
4048 | return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4049 | def __init__(self, *args, **kwargs): |
a95a7133 | 4050 | """__init__(self, Window win=None) -> ChildFocusEvent""" |
54f9ee45 | 4051 | newobj = _core_.new_ChildFocusEvent(*args, **kwargs) |
d14a1e28 RD |
4052 | self.this = newobj.this |
4053 | self.thisown = 1 | |
4054 | del newobj.thisown | |
e811c8ce | 4055 | def GetWindow(*args, **kwargs): |
a95a7133 | 4056 | """GetWindow(self) -> Window""" |
54f9ee45 | 4057 | return _core_.ChildFocusEvent_GetWindow(*args, **kwargs) |
e811c8ce | 4058 | |
d14a1e28 RD |
4059 | |
4060 | class ChildFocusEventPtr(ChildFocusEvent): | |
4061 | def __init__(self, this): | |
4062 | self.this = this | |
4063 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4064 | self.__class__ = ChildFocusEvent | |
54f9ee45 | 4065 | _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr) |
d14a1e28 RD |
4066 | |
4067 | #--------------------------------------------------------------------------- | |
4068 | ||
4069 | class ActivateEvent(Event): | |
093d3ff1 | 4070 | """Proxy of C++ ActivateEvent class""" |
e811c8ce RD |
4071 | def __repr__(self): |
4072 | return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4073 | def __init__(self, *args, **kwargs): |
a95a7133 | 4074 | """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent""" |
54f9ee45 | 4075 | newobj = _core_.new_ActivateEvent(*args, **kwargs) |
d14a1e28 RD |
4076 | self.this = newobj.this |
4077 | self.thisown = 1 | |
4078 | del newobj.thisown | |
e811c8ce | 4079 | def GetActive(*args, **kwargs): |
a95a7133 | 4080 | """GetActive(self) -> bool""" |
54f9ee45 | 4081 | return _core_.ActivateEvent_GetActive(*args, **kwargs) |
e811c8ce | 4082 | |
d14a1e28 RD |
4083 | |
4084 | class ActivateEventPtr(ActivateEvent): | |
4085 | def __init__(self, this): | |
4086 | self.this = this | |
4087 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4088 | self.__class__ = ActivateEvent | |
54f9ee45 | 4089 | _core_.ActivateEvent_swigregister(ActivateEventPtr) |
d14a1e28 RD |
4090 | |
4091 | #--------------------------------------------------------------------------- | |
4092 | ||
4093 | class InitDialogEvent(Event): | |
093d3ff1 | 4094 | """Proxy of C++ InitDialogEvent class""" |
e811c8ce RD |
4095 | def __repr__(self): |
4096 | return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4097 | def __init__(self, *args, **kwargs): |
a95a7133 | 4098 | """__init__(self, int Id=0) -> InitDialogEvent""" |
54f9ee45 | 4099 | newobj = _core_.new_InitDialogEvent(*args, **kwargs) |
d14a1e28 RD |
4100 | self.this = newobj.this |
4101 | self.thisown = 1 | |
4102 | del newobj.thisown | |
d14a1e28 RD |
4103 | |
4104 | class InitDialogEventPtr(InitDialogEvent): | |
4105 | def __init__(self, this): | |
4106 | self.this = this | |
4107 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4108 | self.__class__ = InitDialogEvent | |
54f9ee45 | 4109 | _core_.InitDialogEvent_swigregister(InitDialogEventPtr) |
d14a1e28 RD |
4110 | |
4111 | #--------------------------------------------------------------------------- | |
4112 | ||
4113 | class MenuEvent(Event): | |
093d3ff1 | 4114 | """Proxy of C++ MenuEvent class""" |
e811c8ce RD |
4115 | def __repr__(self): |
4116 | return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4117 | def __init__(self, *args, **kwargs): |
a95a7133 | 4118 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent""" |
54f9ee45 | 4119 | newobj = _core_.new_MenuEvent(*args, **kwargs) |
d14a1e28 RD |
4120 | self.this = newobj.this |
4121 | self.thisown = 1 | |
4122 | del newobj.thisown | |
e811c8ce | 4123 | def GetMenuId(*args, **kwargs): |
a95a7133 | 4124 | """GetMenuId(self) -> int""" |
54f9ee45 | 4125 | return _core_.MenuEvent_GetMenuId(*args, **kwargs) |
e811c8ce RD |
4126 | |
4127 | def IsPopup(*args, **kwargs): | |
a95a7133 | 4128 | """IsPopup(self) -> bool""" |
54f9ee45 | 4129 | return _core_.MenuEvent_IsPopup(*args, **kwargs) |
e811c8ce RD |
4130 | |
4131 | def GetMenu(*args, **kwargs): | |
a95a7133 | 4132 | """GetMenu(self) -> Menu""" |
54f9ee45 | 4133 | return _core_.MenuEvent_GetMenu(*args, **kwargs) |
e811c8ce | 4134 | |
d14a1e28 RD |
4135 | |
4136 | class MenuEventPtr(MenuEvent): | |
4137 | def __init__(self, this): | |
4138 | self.this = this | |
4139 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4140 | self.__class__ = MenuEvent | |
54f9ee45 | 4141 | _core_.MenuEvent_swigregister(MenuEventPtr) |
d14a1e28 RD |
4142 | |
4143 | #--------------------------------------------------------------------------- | |
4144 | ||
4145 | class CloseEvent(Event): | |
093d3ff1 | 4146 | """Proxy of C++ CloseEvent class""" |
e811c8ce RD |
4147 | def __repr__(self): |
4148 | return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4149 | def __init__(self, *args, **kwargs): |
a95a7133 | 4150 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent""" |
54f9ee45 | 4151 | newobj = _core_.new_CloseEvent(*args, **kwargs) |
d14a1e28 RD |
4152 | self.this = newobj.this |
4153 | self.thisown = 1 | |
4154 | del newobj.thisown | |
e811c8ce | 4155 | def SetLoggingOff(*args, **kwargs): |
a95a7133 | 4156 | """SetLoggingOff(self, bool logOff)""" |
54f9ee45 | 4157 | return _core_.CloseEvent_SetLoggingOff(*args, **kwargs) |
e811c8ce RD |
4158 | |
4159 | def GetLoggingOff(*args, **kwargs): | |
a95a7133 | 4160 | """GetLoggingOff(self) -> bool""" |
54f9ee45 | 4161 | return _core_.CloseEvent_GetLoggingOff(*args, **kwargs) |
e811c8ce RD |
4162 | |
4163 | def Veto(*args, **kwargs): | |
a95a7133 | 4164 | """Veto(self, bool veto=True)""" |
54f9ee45 | 4165 | return _core_.CloseEvent_Veto(*args, **kwargs) |
e811c8ce RD |
4166 | |
4167 | def SetCanVeto(*args, **kwargs): | |
a95a7133 | 4168 | """SetCanVeto(self, bool canVeto)""" |
54f9ee45 | 4169 | return _core_.CloseEvent_SetCanVeto(*args, **kwargs) |
e811c8ce RD |
4170 | |
4171 | def CanVeto(*args, **kwargs): | |
a95a7133 | 4172 | """CanVeto(self) -> bool""" |
54f9ee45 | 4173 | return _core_.CloseEvent_CanVeto(*args, **kwargs) |
e811c8ce RD |
4174 | |
4175 | def GetVeto(*args, **kwargs): | |
a95a7133 | 4176 | """GetVeto(self) -> bool""" |
54f9ee45 | 4177 | return _core_.CloseEvent_GetVeto(*args, **kwargs) |
e811c8ce | 4178 | |
d14a1e28 RD |
4179 | |
4180 | class CloseEventPtr(CloseEvent): | |
4181 | def __init__(self, this): | |
4182 | self.this = this | |
4183 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4184 | self.__class__ = CloseEvent | |
54f9ee45 | 4185 | _core_.CloseEvent_swigregister(CloseEventPtr) |
d14a1e28 RD |
4186 | |
4187 | #--------------------------------------------------------------------------- | |
4188 | ||
4189 | class ShowEvent(Event): | |
093d3ff1 | 4190 | """Proxy of C++ ShowEvent class""" |
e811c8ce RD |
4191 | def __repr__(self): |
4192 | return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4193 | def __init__(self, *args, **kwargs): |
a95a7133 | 4194 | """__init__(self, int winid=0, bool show=False) -> ShowEvent""" |
54f9ee45 | 4195 | newobj = _core_.new_ShowEvent(*args, **kwargs) |
d14a1e28 RD |
4196 | self.this = newobj.this |
4197 | self.thisown = 1 | |
4198 | del newobj.thisown | |
e811c8ce | 4199 | def SetShow(*args, **kwargs): |
a95a7133 | 4200 | """SetShow(self, bool show)""" |
54f9ee45 | 4201 | return _core_.ShowEvent_SetShow(*args, **kwargs) |
e811c8ce RD |
4202 | |
4203 | def GetShow(*args, **kwargs): | |
a95a7133 | 4204 | """GetShow(self) -> bool""" |
54f9ee45 | 4205 | return _core_.ShowEvent_GetShow(*args, **kwargs) |
e811c8ce | 4206 | |
d14a1e28 RD |
4207 | |
4208 | class ShowEventPtr(ShowEvent): | |
4209 | def __init__(self, this): | |
4210 | self.this = this | |
4211 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4212 | self.__class__ = ShowEvent | |
54f9ee45 | 4213 | _core_.ShowEvent_swigregister(ShowEventPtr) |
d14a1e28 RD |
4214 | |
4215 | #--------------------------------------------------------------------------- | |
4216 | ||
4217 | class IconizeEvent(Event): | |
093d3ff1 | 4218 | """Proxy of C++ IconizeEvent class""" |
e811c8ce RD |
4219 | def __repr__(self): |
4220 | return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4221 | def __init__(self, *args, **kwargs): |
a95a7133 | 4222 | """__init__(self, int id=0, bool iconized=True) -> IconizeEvent""" |
54f9ee45 | 4223 | newobj = _core_.new_IconizeEvent(*args, **kwargs) |
d14a1e28 RD |
4224 | self.this = newobj.this |
4225 | self.thisown = 1 | |
4226 | del newobj.thisown | |
e811c8ce | 4227 | def Iconized(*args, **kwargs): |
a95a7133 | 4228 | """Iconized(self) -> bool""" |
54f9ee45 | 4229 | return _core_.IconizeEvent_Iconized(*args, **kwargs) |
e811c8ce | 4230 | |
d14a1e28 RD |
4231 | |
4232 | class IconizeEventPtr(IconizeEvent): | |
4233 | def __init__(self, this): | |
4234 | self.this = this | |
4235 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4236 | self.__class__ = IconizeEvent | |
54f9ee45 | 4237 | _core_.IconizeEvent_swigregister(IconizeEventPtr) |
d14a1e28 RD |
4238 | |
4239 | #--------------------------------------------------------------------------- | |
4240 | ||
4241 | class MaximizeEvent(Event): | |
093d3ff1 | 4242 | """Proxy of C++ MaximizeEvent class""" |
e811c8ce RD |
4243 | def __repr__(self): |
4244 | return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4245 | def __init__(self, *args, **kwargs): |
a95a7133 | 4246 | """__init__(self, int id=0) -> MaximizeEvent""" |
54f9ee45 | 4247 | newobj = _core_.new_MaximizeEvent(*args, **kwargs) |
d14a1e28 RD |
4248 | self.this = newobj.this |
4249 | self.thisown = 1 | |
4250 | del newobj.thisown | |
d14a1e28 RD |
4251 | |
4252 | class MaximizeEventPtr(MaximizeEvent): | |
4253 | def __init__(self, this): | |
4254 | self.this = this | |
4255 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4256 | self.__class__ = MaximizeEvent | |
54f9ee45 | 4257 | _core_.MaximizeEvent_swigregister(MaximizeEventPtr) |
d14a1e28 RD |
4258 | |
4259 | #--------------------------------------------------------------------------- | |
4260 | ||
4261 | class DropFilesEvent(Event): | |
093d3ff1 | 4262 | """Proxy of C++ DropFilesEvent class""" |
d14a1e28 RD |
4263 | def __init__(self): raise RuntimeError, "No constructor defined" |
4264 | def __repr__(self): | |
4265 | return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 4266 | def GetPosition(*args, **kwargs): |
a95a7133 | 4267 | """GetPosition(self) -> Point""" |
54f9ee45 | 4268 | return _core_.DropFilesEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4269 | |
4270 | def GetNumberOfFiles(*args, **kwargs): | |
a95a7133 | 4271 | """GetNumberOfFiles(self) -> int""" |
54f9ee45 | 4272 | return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs) |
e811c8ce RD |
4273 | |
4274 | def GetFiles(*args, **kwargs): | |
a95a7133 | 4275 | """GetFiles(self) -> PyObject""" |
54f9ee45 | 4276 | return _core_.DropFilesEvent_GetFiles(*args, **kwargs) |
e811c8ce | 4277 | |
d14a1e28 RD |
4278 | |
4279 | class DropFilesEventPtr(DropFilesEvent): | |
4280 | def __init__(self, this): | |
4281 | self.this = this | |
4282 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4283 | self.__class__ = DropFilesEvent | |
54f9ee45 | 4284 | _core_.DropFilesEvent_swigregister(DropFilesEventPtr) |
d14a1e28 RD |
4285 | |
4286 | #--------------------------------------------------------------------------- | |
4287 | ||
54f9ee45 RD |
4288 | UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL |
4289 | UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED | |
d14a1e28 | 4290 | class UpdateUIEvent(CommandEvent): |
093d3ff1 | 4291 | """Proxy of C++ UpdateUIEvent class""" |
e811c8ce RD |
4292 | def __repr__(self): |
4293 | return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4294 | def __init__(self, *args, **kwargs): |
a95a7133 | 4295 | """__init__(self, int commandId=0) -> UpdateUIEvent""" |
54f9ee45 | 4296 | newobj = _core_.new_UpdateUIEvent(*args, **kwargs) |
d14a1e28 RD |
4297 | self.this = newobj.this |
4298 | self.thisown = 1 | |
4299 | del newobj.thisown | |
e811c8ce | 4300 | def GetChecked(*args, **kwargs): |
a95a7133 | 4301 | """GetChecked(self) -> bool""" |
54f9ee45 | 4302 | return _core_.UpdateUIEvent_GetChecked(*args, **kwargs) |
e811c8ce RD |
4303 | |
4304 | def GetEnabled(*args, **kwargs): | |
a95a7133 | 4305 | """GetEnabled(self) -> bool""" |
54f9ee45 | 4306 | return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs) |
e811c8ce RD |
4307 | |
4308 | def GetText(*args, **kwargs): | |
a95a7133 | 4309 | """GetText(self) -> String""" |
54f9ee45 | 4310 | return _core_.UpdateUIEvent_GetText(*args, **kwargs) |
e811c8ce RD |
4311 | |
4312 | def GetSetText(*args, **kwargs): | |
a95a7133 | 4313 | """GetSetText(self) -> bool""" |
54f9ee45 | 4314 | return _core_.UpdateUIEvent_GetSetText(*args, **kwargs) |
e811c8ce RD |
4315 | |
4316 | def GetSetChecked(*args, **kwargs): | |
a95a7133 | 4317 | """GetSetChecked(self) -> bool""" |
54f9ee45 | 4318 | return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs) |
e811c8ce RD |
4319 | |
4320 | def GetSetEnabled(*args, **kwargs): | |
a95a7133 | 4321 | """GetSetEnabled(self) -> bool""" |
54f9ee45 | 4322 | return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs) |
e811c8ce RD |
4323 | |
4324 | def Check(*args, **kwargs): | |
a95a7133 | 4325 | """Check(self, bool check)""" |
54f9ee45 | 4326 | return _core_.UpdateUIEvent_Check(*args, **kwargs) |
e811c8ce RD |
4327 | |
4328 | def Enable(*args, **kwargs): | |
a95a7133 | 4329 | """Enable(self, bool enable)""" |
54f9ee45 | 4330 | return _core_.UpdateUIEvent_Enable(*args, **kwargs) |
e811c8ce RD |
4331 | |
4332 | def SetText(*args, **kwargs): | |
a95a7133 | 4333 | """SetText(self, String text)""" |
54f9ee45 | 4334 | return _core_.UpdateUIEvent_SetText(*args, **kwargs) |
e811c8ce RD |
4335 | |
4336 | def SetUpdateInterval(*args, **kwargs): | |
66c033b4 | 4337 | """SetUpdateInterval(long updateInterval)""" |
54f9ee45 | 4338 | return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) |
e811c8ce RD |
4339 | |
4340 | SetUpdateInterval = staticmethod(SetUpdateInterval) | |
4341 | def GetUpdateInterval(*args, **kwargs): | |
66c033b4 | 4342 | """GetUpdateInterval() -> long""" |
54f9ee45 | 4343 | return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) |
e811c8ce RD |
4344 | |
4345 | GetUpdateInterval = staticmethod(GetUpdateInterval) | |
4346 | def CanUpdate(*args, **kwargs): | |
66c033b4 | 4347 | """CanUpdate(Window win) -> bool""" |
54f9ee45 | 4348 | return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) |
e811c8ce RD |
4349 | |
4350 | CanUpdate = staticmethod(CanUpdate) | |
4351 | def ResetUpdateTime(*args, **kwargs): | |
66c033b4 | 4352 | """ResetUpdateTime()""" |
54f9ee45 | 4353 | return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) |
e811c8ce RD |
4354 | |
4355 | ResetUpdateTime = staticmethod(ResetUpdateTime) | |
4356 | def SetMode(*args, **kwargs): | |
66c033b4 | 4357 | """SetMode(int mode)""" |
54f9ee45 | 4358 | return _core_.UpdateUIEvent_SetMode(*args, **kwargs) |
e811c8ce RD |
4359 | |
4360 | SetMode = staticmethod(SetMode) | |
4361 | def GetMode(*args, **kwargs): | |
66c033b4 | 4362 | """GetMode() -> int""" |
54f9ee45 | 4363 | return _core_.UpdateUIEvent_GetMode(*args, **kwargs) |
e811c8ce RD |
4364 | |
4365 | GetMode = staticmethod(GetMode) | |
d14a1e28 RD |
4366 | |
4367 | class UpdateUIEventPtr(UpdateUIEvent): | |
4368 | def __init__(self, this): | |
4369 | self.this = this | |
4370 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4371 | self.__class__ = UpdateUIEvent | |
54f9ee45 | 4372 | _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr) |
d14a1e28 | 4373 | |
e811c8ce RD |
4374 | def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): |
4375 | """UpdateUIEvent_SetUpdateInterval(long updateInterval)""" | |
54f9ee45 | 4376 | return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) |
d14a1e28 | 4377 | |
e811c8ce RD |
4378 | def UpdateUIEvent_GetUpdateInterval(*args, **kwargs): |
4379 | """UpdateUIEvent_GetUpdateInterval() -> long""" | |
54f9ee45 | 4380 | return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) |
d14a1e28 | 4381 | |
e811c8ce RD |
4382 | def UpdateUIEvent_CanUpdate(*args, **kwargs): |
4383 | """UpdateUIEvent_CanUpdate(Window win) -> bool""" | |
54f9ee45 | 4384 | return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) |
d14a1e28 | 4385 | |
e811c8ce RD |
4386 | def UpdateUIEvent_ResetUpdateTime(*args, **kwargs): |
4387 | """UpdateUIEvent_ResetUpdateTime()""" | |
54f9ee45 | 4388 | return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) |
d14a1e28 | 4389 | |
e811c8ce | 4390 | def UpdateUIEvent_SetMode(*args, **kwargs): |
196addbf | 4391 | """UpdateUIEvent_SetMode(int mode)""" |
54f9ee45 | 4392 | return _core_.UpdateUIEvent_SetMode(*args, **kwargs) |
d14a1e28 | 4393 | |
e811c8ce | 4394 | def UpdateUIEvent_GetMode(*args, **kwargs): |
196addbf | 4395 | """UpdateUIEvent_GetMode() -> int""" |
54f9ee45 | 4396 | return _core_.UpdateUIEvent_GetMode(*args, **kwargs) |
d14a1e28 RD |
4397 | |
4398 | #--------------------------------------------------------------------------- | |
4399 | ||
4400 | class SysColourChangedEvent(Event): | |
093d3ff1 | 4401 | """Proxy of C++ SysColourChangedEvent class""" |
e811c8ce RD |
4402 | def __repr__(self): |
4403 | return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4404 | def __init__(self, *args, **kwargs): |
a95a7133 | 4405 | """__init__(self) -> SysColourChangedEvent""" |
54f9ee45 | 4406 | newobj = _core_.new_SysColourChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4407 | self.this = newobj.this |
4408 | self.thisown = 1 | |
4409 | del newobj.thisown | |
d14a1e28 RD |
4410 | |
4411 | class SysColourChangedEventPtr(SysColourChangedEvent): | |
4412 | def __init__(self, this): | |
4413 | self.this = this | |
4414 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4415 | self.__class__ = SysColourChangedEvent | |
54f9ee45 | 4416 | _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr) |
d14a1e28 RD |
4417 | |
4418 | #--------------------------------------------------------------------------- | |
4419 | ||
4420 | class MouseCaptureChangedEvent(Event): | |
093d3ff1 | 4421 | """Proxy of C++ MouseCaptureChangedEvent class""" |
e811c8ce RD |
4422 | def __repr__(self): |
4423 | return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4424 | def __init__(self, *args, **kwargs): |
a95a7133 | 4425 | """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent""" |
54f9ee45 | 4426 | newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4427 | self.this = newobj.this |
4428 | self.thisown = 1 | |
4429 | del newobj.thisown | |
e811c8ce | 4430 | def GetCapturedWindow(*args, **kwargs): |
a95a7133 | 4431 | """GetCapturedWindow(self) -> Window""" |
54f9ee45 | 4432 | return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs) |
e811c8ce | 4433 | |
d14a1e28 RD |
4434 | |
4435 | class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent): | |
4436 | def __init__(self, this): | |
4437 | self.this = this | |
4438 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4439 | self.__class__ = MouseCaptureChangedEvent | |
54f9ee45 | 4440 | _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr) |
d14a1e28 RD |
4441 | |
4442 | #--------------------------------------------------------------------------- | |
4443 | ||
4444 | class DisplayChangedEvent(Event): | |
093d3ff1 | 4445 | """Proxy of C++ DisplayChangedEvent class""" |
e811c8ce RD |
4446 | def __repr__(self): |
4447 | return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4448 | def __init__(self, *args, **kwargs): |
a95a7133 | 4449 | """__init__(self) -> DisplayChangedEvent""" |
54f9ee45 | 4450 | newobj = _core_.new_DisplayChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4451 | self.this = newobj.this |
4452 | self.thisown = 1 | |
4453 | del newobj.thisown | |
d14a1e28 RD |
4454 | |
4455 | class DisplayChangedEventPtr(DisplayChangedEvent): | |
4456 | def __init__(self, this): | |
4457 | self.this = this | |
4458 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4459 | self.__class__ = DisplayChangedEvent | |
54f9ee45 | 4460 | _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr) |
d14a1e28 RD |
4461 | |
4462 | #--------------------------------------------------------------------------- | |
4463 | ||
4464 | class PaletteChangedEvent(Event): | |
093d3ff1 | 4465 | """Proxy of C++ PaletteChangedEvent class""" |
e811c8ce RD |
4466 | def __repr__(self): |
4467 | return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4468 | def __init__(self, *args, **kwargs): |
a95a7133 | 4469 | """__init__(self, int id=0) -> PaletteChangedEvent""" |
54f9ee45 | 4470 | newobj = _core_.new_PaletteChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4471 | self.this = newobj.this |
4472 | self.thisown = 1 | |
4473 | del newobj.thisown | |
e811c8ce | 4474 | def SetChangedWindow(*args, **kwargs): |
a95a7133 | 4475 | """SetChangedWindow(self, Window win)""" |
54f9ee45 | 4476 | return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs) |
e811c8ce RD |
4477 | |
4478 | def GetChangedWindow(*args, **kwargs): | |
a95a7133 | 4479 | """GetChangedWindow(self) -> Window""" |
54f9ee45 | 4480 | return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs) |
e811c8ce | 4481 | |
d14a1e28 RD |
4482 | |
4483 | class PaletteChangedEventPtr(PaletteChangedEvent): | |
4484 | def __init__(self, this): | |
4485 | self.this = this | |
4486 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4487 | self.__class__ = PaletteChangedEvent | |
54f9ee45 | 4488 | _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr) |
d14a1e28 RD |
4489 | |
4490 | #--------------------------------------------------------------------------- | |
4491 | ||
4492 | class QueryNewPaletteEvent(Event): | |
093d3ff1 | 4493 | """Proxy of C++ QueryNewPaletteEvent class""" |
e811c8ce RD |
4494 | def __repr__(self): |
4495 | return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4496 | def __init__(self, *args, **kwargs): |
a95a7133 | 4497 | """__init__(self, int winid=0) -> QueryNewPaletteEvent""" |
54f9ee45 | 4498 | newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs) |
d14a1e28 RD |
4499 | self.this = newobj.this |
4500 | self.thisown = 1 | |
4501 | del newobj.thisown | |
e811c8ce | 4502 | def SetPaletteRealized(*args, **kwargs): |
a95a7133 | 4503 | """SetPaletteRealized(self, bool realized)""" |
54f9ee45 | 4504 | return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs) |
e811c8ce RD |
4505 | |
4506 | def GetPaletteRealized(*args, **kwargs): | |
a95a7133 | 4507 | """GetPaletteRealized(self) -> bool""" |
54f9ee45 | 4508 | return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs) |
e811c8ce | 4509 | |
d14a1e28 RD |
4510 | |
4511 | class QueryNewPaletteEventPtr(QueryNewPaletteEvent): | |
4512 | def __init__(self, this): | |
4513 | self.this = this | |
4514 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4515 | self.__class__ = QueryNewPaletteEvent | |
54f9ee45 | 4516 | _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr) |
d14a1e28 RD |
4517 | |
4518 | #--------------------------------------------------------------------------- | |
4519 | ||
4520 | class NavigationKeyEvent(Event): | |
093d3ff1 | 4521 | """Proxy of C++ NavigationKeyEvent class""" |
e811c8ce RD |
4522 | def __repr__(self): |
4523 | return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4524 | def __init__(self, *args, **kwargs): |
a95a7133 | 4525 | """__init__(self) -> NavigationKeyEvent""" |
54f9ee45 | 4526 | newobj = _core_.new_NavigationKeyEvent(*args, **kwargs) |
d14a1e28 RD |
4527 | self.this = newobj.this |
4528 | self.thisown = 1 | |
4529 | del newobj.thisown | |
e811c8ce | 4530 | def GetDirection(*args, **kwargs): |
a95a7133 | 4531 | """GetDirection(self) -> bool""" |
54f9ee45 | 4532 | return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs) |
e811c8ce RD |
4533 | |
4534 | def SetDirection(*args, **kwargs): | |
908b74cd | 4535 | """SetDirection(self, bool forward)""" |
54f9ee45 | 4536 | return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs) |
e811c8ce RD |
4537 | |
4538 | def IsWindowChange(*args, **kwargs): | |
a95a7133 | 4539 | """IsWindowChange(self) -> bool""" |
54f9ee45 | 4540 | return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs) |
e811c8ce RD |
4541 | |
4542 | def SetWindowChange(*args, **kwargs): | |
908b74cd | 4543 | """SetWindowChange(self, bool ischange)""" |
54f9ee45 | 4544 | return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs) |
e811c8ce | 4545 | |
908b74cd RD |
4546 | def SetFlags(*args, **kwargs): |
4547 | """SetFlags(self, long flags)""" | |
4548 | return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs) | |
4549 | ||
e811c8ce | 4550 | def GetCurrentFocus(*args, **kwargs): |
a95a7133 | 4551 | """GetCurrentFocus(self) -> Window""" |
54f9ee45 | 4552 | return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs) |
e811c8ce RD |
4553 | |
4554 | def SetCurrentFocus(*args, **kwargs): | |
a95a7133 | 4555 | """SetCurrentFocus(self, Window win)""" |
54f9ee45 | 4556 | return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs) |
e811c8ce | 4557 | |
b0f7404b | 4558 | IsBackward = _core_.NavigationKeyEvent_IsBackward |
908b74cd RD |
4559 | IsForward = _core_.NavigationKeyEvent_IsForward |
4560 | WinChange = _core_.NavigationKeyEvent_WinChange | |
d14a1e28 RD |
4561 | |
4562 | class NavigationKeyEventPtr(NavigationKeyEvent): | |
4563 | def __init__(self, this): | |
4564 | self.this = this | |
4565 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4566 | self.__class__ = NavigationKeyEvent | |
54f9ee45 | 4567 | _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr) |
d14a1e28 RD |
4568 | |
4569 | #--------------------------------------------------------------------------- | |
4570 | ||
4571 | class WindowCreateEvent(CommandEvent): | |
093d3ff1 | 4572 | """Proxy of C++ WindowCreateEvent class""" |
e811c8ce RD |
4573 | def __repr__(self): |
4574 | return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4575 | def __init__(self, *args, **kwargs): |
a95a7133 | 4576 | """__init__(self, Window win=None) -> WindowCreateEvent""" |
54f9ee45 | 4577 | newobj = _core_.new_WindowCreateEvent(*args, **kwargs) |
d14a1e28 RD |
4578 | self.this = newobj.this |
4579 | self.thisown = 1 | |
4580 | del newobj.thisown | |
e811c8ce | 4581 | def GetWindow(*args, **kwargs): |
a95a7133 | 4582 | """GetWindow(self) -> Window""" |
54f9ee45 | 4583 | return _core_.WindowCreateEvent_GetWindow(*args, **kwargs) |
e811c8ce | 4584 | |
d14a1e28 RD |
4585 | |
4586 | class WindowCreateEventPtr(WindowCreateEvent): | |
4587 | def __init__(self, this): | |
4588 | self.this = this | |
4589 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4590 | self.__class__ = WindowCreateEvent | |
54f9ee45 | 4591 | _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr) |
d14a1e28 RD |
4592 | |
4593 | class WindowDestroyEvent(CommandEvent): | |
093d3ff1 | 4594 | """Proxy of C++ WindowDestroyEvent class""" |
e811c8ce RD |
4595 | def __repr__(self): |
4596 | return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4597 | def __init__(self, *args, **kwargs): |
a95a7133 | 4598 | """__init__(self, Window win=None) -> WindowDestroyEvent""" |
54f9ee45 | 4599 | newobj = _core_.new_WindowDestroyEvent(*args, **kwargs) |
d14a1e28 RD |
4600 | self.this = newobj.this |
4601 | self.thisown = 1 | |
4602 | del newobj.thisown | |
e811c8ce | 4603 | def GetWindow(*args, **kwargs): |
a95a7133 | 4604 | """GetWindow(self) -> Window""" |
54f9ee45 | 4605 | return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs) |
e811c8ce | 4606 | |
d14a1e28 RD |
4607 | |
4608 | class WindowDestroyEventPtr(WindowDestroyEvent): | |
4609 | def __init__(self, this): | |
4610 | self.this = this | |
4611 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4612 | self.__class__ = WindowDestroyEvent | |
54f9ee45 | 4613 | _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr) |
d14a1e28 RD |
4614 | |
4615 | #--------------------------------------------------------------------------- | |
4616 | ||
4617 | class ContextMenuEvent(CommandEvent): | |
093d3ff1 | 4618 | """Proxy of C++ ContextMenuEvent class""" |
e811c8ce RD |
4619 | def __repr__(self): |
4620 | return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4621 | def __init__(self, *args, **kwargs): |
a95a7133 | 4622 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent""" |
54f9ee45 | 4623 | newobj = _core_.new_ContextMenuEvent(*args, **kwargs) |
d14a1e28 RD |
4624 | self.this = newobj.this |
4625 | self.thisown = 1 | |
4626 | del newobj.thisown | |
e811c8ce | 4627 | def GetPosition(*args, **kwargs): |
a95a7133 | 4628 | """GetPosition(self) -> Point""" |
54f9ee45 | 4629 | return _core_.ContextMenuEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4630 | |
4631 | def SetPosition(*args, **kwargs): | |
a95a7133 | 4632 | """SetPosition(self, Point pos)""" |
54f9ee45 | 4633 | return _core_.ContextMenuEvent_SetPosition(*args, **kwargs) |
e811c8ce | 4634 | |
d14a1e28 RD |
4635 | |
4636 | class ContextMenuEventPtr(ContextMenuEvent): | |
4637 | def __init__(self, this): | |
4638 | self.this = this | |
4639 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4640 | self.__class__ = ContextMenuEvent | |
54f9ee45 | 4641 | _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr) |
d14a1e28 RD |
4642 | |
4643 | #--------------------------------------------------------------------------- | |
4644 | ||
54f9ee45 RD |
4645 | IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL |
4646 | IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED | |
d14a1e28 | 4647 | class IdleEvent(Event): |
093d3ff1 | 4648 | """Proxy of C++ IdleEvent class""" |
e811c8ce RD |
4649 | def __repr__(self): |
4650 | return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4651 | def __init__(self, *args, **kwargs): |
a95a7133 | 4652 | """__init__(self) -> IdleEvent""" |
54f9ee45 | 4653 | newobj = _core_.new_IdleEvent(*args, **kwargs) |
d14a1e28 RD |
4654 | self.this = newobj.this |
4655 | self.thisown = 1 | |
4656 | del newobj.thisown | |
e811c8ce | 4657 | def RequestMore(*args, **kwargs): |
a95a7133 | 4658 | """RequestMore(self, bool needMore=True)""" |
54f9ee45 | 4659 | return _core_.IdleEvent_RequestMore(*args, **kwargs) |
e811c8ce RD |
4660 | |
4661 | def MoreRequested(*args, **kwargs): | |
a95a7133 | 4662 | """MoreRequested(self) -> bool""" |
54f9ee45 | 4663 | return _core_.IdleEvent_MoreRequested(*args, **kwargs) |
e811c8ce RD |
4664 | |
4665 | def SetMode(*args, **kwargs): | |
66c033b4 | 4666 | """SetMode(int mode)""" |
54f9ee45 | 4667 | return _core_.IdleEvent_SetMode(*args, **kwargs) |
e811c8ce RD |
4668 | |
4669 | SetMode = staticmethod(SetMode) | |
4670 | def GetMode(*args, **kwargs): | |
66c033b4 | 4671 | """GetMode() -> int""" |
54f9ee45 | 4672 | return _core_.IdleEvent_GetMode(*args, **kwargs) |
e811c8ce RD |
4673 | |
4674 | GetMode = staticmethod(GetMode) | |
4675 | def CanSend(*args, **kwargs): | |
66c033b4 | 4676 | """CanSend(Window win) -> bool""" |
54f9ee45 | 4677 | return _core_.IdleEvent_CanSend(*args, **kwargs) |
e811c8ce RD |
4678 | |
4679 | CanSend = staticmethod(CanSend) | |
d14a1e28 RD |
4680 | |
4681 | class IdleEventPtr(IdleEvent): | |
4682 | def __init__(self, this): | |
4683 | self.this = this | |
4684 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4685 | self.__class__ = IdleEvent | |
54f9ee45 | 4686 | _core_.IdleEvent_swigregister(IdleEventPtr) |
d14a1e28 | 4687 | |
e811c8ce | 4688 | def IdleEvent_SetMode(*args, **kwargs): |
196addbf | 4689 | """IdleEvent_SetMode(int mode)""" |
54f9ee45 | 4690 | return _core_.IdleEvent_SetMode(*args, **kwargs) |
d14a1e28 | 4691 | |
e811c8ce | 4692 | def IdleEvent_GetMode(*args, **kwargs): |
196addbf | 4693 | """IdleEvent_GetMode() -> int""" |
54f9ee45 | 4694 | return _core_.IdleEvent_GetMode(*args, **kwargs) |
d14a1e28 | 4695 | |
e811c8ce RD |
4696 | def IdleEvent_CanSend(*args, **kwargs): |
4697 | """IdleEvent_CanSend(Window win) -> bool""" | |
54f9ee45 | 4698 | return _core_.IdleEvent_CanSend(*args, **kwargs) |
d14a1e28 RD |
4699 | |
4700 | #--------------------------------------------------------------------------- | |
4701 | ||
4702 | class PyEvent(Event): | |
093d3ff1 | 4703 | """Proxy of C++ PyEvent class""" |
e811c8ce RD |
4704 | def __repr__(self): |
4705 | return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4706 | def __init__(self, *args, **kwargs): |
a95a7133 | 4707 | """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent""" |
54f9ee45 | 4708 | newobj = _core_.new_PyEvent(*args, **kwargs) |
d14a1e28 RD |
4709 | self.this = newobj.this |
4710 | self.thisown = 1 | |
4711 | del newobj.thisown | |
4712 | self.SetSelf(self) | |
e811c8ce | 4713 | |
54f9ee45 | 4714 | def __del__(self, destroy=_core_.delete_PyEvent): |
a95a7133 | 4715 | """__del__(self)""" |
d14a1e28 RD |
4716 | try: |
4717 | if self.thisown: destroy(self) | |
4718 | except: pass | |
e811c8ce RD |
4719 | |
4720 | def SetSelf(*args, **kwargs): | |
a95a7133 | 4721 | """SetSelf(self, PyObject self)""" |
54f9ee45 | 4722 | return _core_.PyEvent_SetSelf(*args, **kwargs) |
e811c8ce RD |
4723 | |
4724 | def GetSelf(*args, **kwargs): | |
a95a7133 | 4725 | """GetSelf(self) -> PyObject""" |
54f9ee45 | 4726 | return _core_.PyEvent_GetSelf(*args, **kwargs) |
e811c8ce | 4727 | |
d14a1e28 RD |
4728 | |
4729 | class PyEventPtr(PyEvent): | |
4730 | def __init__(self, this): | |
4731 | self.this = this | |
4732 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4733 | self.__class__ = PyEvent | |
54f9ee45 | 4734 | _core_.PyEvent_swigregister(PyEventPtr) |
d14a1e28 RD |
4735 | |
4736 | class PyCommandEvent(CommandEvent): | |
093d3ff1 | 4737 | """Proxy of C++ PyCommandEvent class""" |
e811c8ce RD |
4738 | def __repr__(self): |
4739 | return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4740 | def __init__(self, *args, **kwargs): |
a95a7133 | 4741 | """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent""" |
54f9ee45 | 4742 | newobj = _core_.new_PyCommandEvent(*args, **kwargs) |
d14a1e28 RD |
4743 | self.this = newobj.this |
4744 | self.thisown = 1 | |
4745 | del newobj.thisown | |
4746 | self.SetSelf(self) | |
e811c8ce | 4747 | |
54f9ee45 | 4748 | def __del__(self, destroy=_core_.delete_PyCommandEvent): |
a95a7133 | 4749 | """__del__(self)""" |
d14a1e28 RD |
4750 | try: |
4751 | if self.thisown: destroy(self) | |
4752 | except: pass | |
e811c8ce RD |
4753 | |
4754 | def SetSelf(*args, **kwargs): | |
a95a7133 | 4755 | """SetSelf(self, PyObject self)""" |
54f9ee45 | 4756 | return _core_.PyCommandEvent_SetSelf(*args, **kwargs) |
e811c8ce RD |
4757 | |
4758 | def GetSelf(*args, **kwargs): | |
a95a7133 | 4759 | """GetSelf(self) -> PyObject""" |
54f9ee45 | 4760 | return _core_.PyCommandEvent_GetSelf(*args, **kwargs) |
e811c8ce | 4761 | |
d14a1e28 RD |
4762 | |
4763 | class PyCommandEventPtr(PyCommandEvent): | |
4764 | def __init__(self, this): | |
4765 | self.this = this | |
4766 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4767 | self.__class__ = PyCommandEvent | |
54f9ee45 | 4768 | _core_.PyCommandEvent_swigregister(PyCommandEventPtr) |
d14a1e28 RD |
4769 | |
4770 | #--------------------------------------------------------------------------- | |
4771 | ||
54f9ee45 RD |
4772 | PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS |
4773 | PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION | |
4774 | PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG | |
4775 | PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG | |
4776 | PRINT_WINDOWS = _core_.PRINT_WINDOWS | |
4777 | PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT | |
d14a1e28 | 4778 | class PyApp(EvtHandler): |
66c033b4 RD |
4779 | """ |
4780 | The ``wx.PyApp`` class is an *implementation detail*, please use the | |
4781 | `wx.App` class (or some other derived class) instead. | |
4782 | """ | |
e811c8ce RD |
4783 | def __repr__(self): |
4784 | return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4785 | def __init__(self, *args, **kwargs): |
98e665d3 | 4786 | """ |
a95a7133 | 4787 | __init__(self) -> PyApp |
98e665d3 RD |
4788 | |
4789 | Create a new application object, starting the bootstrap process. | |
4790 | """ | |
54f9ee45 | 4791 | newobj = _core_.new_PyApp(*args, **kwargs) |
d14a1e28 RD |
4792 | self.this = newobj.this |
4793 | self.thisown = 1 | |
4794 | del newobj.thisown | |
4795 | self._setCallbackInfo(self, PyApp) | |
4796 | self._setOORInfo(self) | |
e811c8ce | 4797 | |
54f9ee45 | 4798 | def __del__(self, destroy=_core_.delete_PyApp): |
a95a7133 | 4799 | """__del__(self)""" |
d14a1e28 RD |
4800 | try: |
4801 | if self.thisown: destroy(self) | |
4802 | except: pass | |
e811c8ce RD |
4803 | |
4804 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 4805 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 4806 | return _core_.PyApp__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
4807 | |
4808 | def GetAppName(*args, **kwargs): | |
0df68c9f | 4809 | """ |
a95a7133 | 4810 | GetAppName(self) -> String |
6c3b4aae | 4811 | |
0df68c9f RD |
4812 | Get the application name. |
4813 | """ | |
54f9ee45 | 4814 | return _core_.PyApp_GetAppName(*args, **kwargs) |
e811c8ce RD |
4815 | |
4816 | def SetAppName(*args, **kwargs): | |
0df68c9f | 4817 | """ |
a95a7133 | 4818 | SetAppName(self, String name) |
6c3b4aae | 4819 | |
66c033b4 RD |
4820 | Set the application name. This value may be used automatically by |
4821 | `wx.Config` and such. | |
0df68c9f | 4822 | """ |
54f9ee45 | 4823 | return _core_.PyApp_SetAppName(*args, **kwargs) |
e811c8ce RD |
4824 | |
4825 | def GetClassName(*args, **kwargs): | |
0df68c9f | 4826 | """ |
a95a7133 | 4827 | GetClassName(self) -> String |
e811c8ce | 4828 | |
0df68c9f RD |
4829 | Get the application's class name. |
4830 | """ | |
54f9ee45 | 4831 | return _core_.PyApp_GetClassName(*args, **kwargs) |
e811c8ce RD |
4832 | |
4833 | def SetClassName(*args, **kwargs): | |
0df68c9f | 4834 | """ |
a95a7133 | 4835 | SetClassName(self, String name) |
6c3b4aae | 4836 | |
66c033b4 RD |
4837 | Set the application's class name. This value may be used for |
4838 | X-resources if applicable for the platform | |
0df68c9f | 4839 | """ |
54f9ee45 | 4840 | return _core_.PyApp_SetClassName(*args, **kwargs) |
e811c8ce RD |
4841 | |
4842 | def GetVendorName(*args, **kwargs): | |
0df68c9f | 4843 | """ |
a95a7133 | 4844 | GetVendorName(self) -> String |
6c3b4aae | 4845 | |
0df68c9f RD |
4846 | Get the application's vendor name. |
4847 | """ | |
54f9ee45 | 4848 | return _core_.PyApp_GetVendorName(*args, **kwargs) |
e811c8ce RD |
4849 | |
4850 | def SetVendorName(*args, **kwargs): | |
0df68c9f | 4851 | """ |
a95a7133 | 4852 | SetVendorName(self, String name) |
6c3b4aae | 4853 | |
66c033b4 RD |
4854 | Set the application's vendor name. This value may be used |
4855 | automatically by `wx.Config` and such. | |
0df68c9f | 4856 | """ |
54f9ee45 | 4857 | return _core_.PyApp_SetVendorName(*args, **kwargs) |
e811c8ce RD |
4858 | |
4859 | def GetTraits(*args, **kwargs): | |
0df68c9f | 4860 | """ |
a95a7133 | 4861 | GetTraits(self) -> wxAppTraits |
6c3b4aae | 4862 | |
66c033b4 RD |
4863 | Return (and create if necessary) the app traits object to which we |
4864 | delegate for everything which either should be configurable by the | |
4865 | user (then he can change the default behaviour simply by overriding | |
4866 | CreateTraits() and returning his own traits object) or which is | |
4867 | GUI/console dependent as then wx.AppTraits allows us to abstract the | |
4868 | differences behind the common facade. | |
4869 | ||
4870 | :todo: Add support for overriding CreateAppTraits in wxPython. | |
0df68c9f | 4871 | """ |
54f9ee45 | 4872 | return _core_.PyApp_GetTraits(*args, **kwargs) |
e811c8ce RD |
4873 | |
4874 | def ProcessPendingEvents(*args, **kwargs): | |
0df68c9f | 4875 | """ |
a95a7133 | 4876 | ProcessPendingEvents(self) |
6c3b4aae | 4877 | |
66c033b4 RD |
4878 | Process all events in the Pending Events list -- it is necessary to |
4879 | call this function to process posted events. This normally happens | |
4880 | during each event loop iteration. | |
0df68c9f | 4881 | """ |
54f9ee45 | 4882 | return _core_.PyApp_ProcessPendingEvents(*args, **kwargs) |
e811c8ce RD |
4883 | |
4884 | def Yield(*args, **kwargs): | |
0df68c9f | 4885 | """ |
a95a7133 | 4886 | Yield(self, bool onlyIfNeeded=False) -> bool |
6c3b4aae | 4887 | |
66c033b4 RD |
4888 | Process all currently pending events right now, instead of waiting |
4889 | until return to the event loop. It is an error to call ``Yield`` | |
4890 | recursively unless the value of ``onlyIfNeeded`` is True. | |
6c3b4aae | 4891 | |
66c033b4 | 4892 | :warning: This function is dangerous as it can lead to unexpected |
41e2b43e RD |
4893 | reentrancies (i.e. when called from an event handler it may |
4894 | result in calling the same event handler again), use with | |
4895 | extreme care or, better, don't use at all! | |
0df68c9f | 4896 | |
66c033b4 | 4897 | :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield` |
41e2b43e | 4898 | |
0df68c9f | 4899 | """ |
54f9ee45 | 4900 | return _core_.PyApp_Yield(*args, **kwargs) |
e811c8ce RD |
4901 | |
4902 | def WakeUpIdle(*args, **kwargs): | |
0df68c9f | 4903 | """ |
a95a7133 | 4904 | WakeUpIdle(self) |
6c3b4aae | 4905 | |
66c033b4 RD |
4906 | Make sure that idle events are sent again. |
4907 | :see: `wx.WakeUpIdle` | |
0df68c9f | 4908 | """ |
54f9ee45 | 4909 | return _core_.PyApp_WakeUpIdle(*args, **kwargs) |
e811c8ce | 4910 | |
1fc3b23a RD |
4911 | def IsMainLoopRunning(*args, **kwargs): |
4912 | """ | |
4913 | IsMainLoopRunning() -> bool | |
4914 | ||
4915 | Returns True if we're running the main loop, i.e. if the events can | |
4916 | currently be dispatched. | |
4917 | """ | |
4918 | return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) | |
4919 | ||
4920 | IsMainLoopRunning = staticmethod(IsMainLoopRunning) | |
e811c8ce | 4921 | def MainLoop(*args, **kwargs): |
0df68c9f | 4922 | """ |
a95a7133 | 4923 | MainLoop(self) -> int |
6c3b4aae | 4924 | |
66c033b4 RD |
4925 | Execute the main GUI loop, the function doesn't normally return until |
4926 | all top level windows have been closed and destroyed. | |
0df68c9f | 4927 | """ |
54f9ee45 | 4928 | return _core_.PyApp_MainLoop(*args, **kwargs) |
e811c8ce RD |
4929 | |
4930 | def Exit(*args, **kwargs): | |
0df68c9f | 4931 | """ |
a95a7133 | 4932 | Exit(self) |
6c3b4aae | 4933 | |
0df68c9f | 4934 | Exit the main loop thus terminating the application. |
66c033b4 | 4935 | :see: `wx.Exit` |
0df68c9f | 4936 | """ |
54f9ee45 | 4937 | return _core_.PyApp_Exit(*args, **kwargs) |
e811c8ce RD |
4938 | |
4939 | def ExitMainLoop(*args, **kwargs): | |
0df68c9f | 4940 | """ |
a95a7133 | 4941 | ExitMainLoop(self) |
6c3b4aae | 4942 | |
66c033b4 RD |
4943 | Exit the main GUI loop during the next iteration of the main |
4944 | loop, (i.e. it does not stop the program immediately!) | |
0df68c9f | 4945 | """ |
54f9ee45 | 4946 | return _core_.PyApp_ExitMainLoop(*args, **kwargs) |
e811c8ce RD |
4947 | |
4948 | def Pending(*args, **kwargs): | |
0df68c9f | 4949 | """ |
a95a7133 | 4950 | Pending(self) -> bool |
6c3b4aae | 4951 | |
0df68c9f RD |
4952 | Returns True if there are unprocessed events in the event queue. |
4953 | """ | |
54f9ee45 | 4954 | return _core_.PyApp_Pending(*args, **kwargs) |
e811c8ce RD |
4955 | |
4956 | def Dispatch(*args, **kwargs): | |
0df68c9f | 4957 | """ |
a95a7133 | 4958 | Dispatch(self) -> bool |
6c3b4aae | 4959 | |
0df68c9f RD |
4960 | Process the first event in the event queue (blocks until an event |
4961 | appears if there are none currently) | |
4962 | """ | |
54f9ee45 | 4963 | return _core_.PyApp_Dispatch(*args, **kwargs) |
e811c8ce RD |
4964 | |
4965 | def ProcessIdle(*args, **kwargs): | |
0df68c9f | 4966 | """ |
a95a7133 | 4967 | ProcessIdle(self) -> bool |
6c3b4aae | 4968 | |
66c033b4 RD |
4969 | Called from the MainLoop when the application becomes idle (there are |
4970 | no pending events) and sends a `wx.IdleEvent` to all interested | |
4971 | parties. Returns True if more idle events are needed, False if not. | |
0df68c9f | 4972 | """ |
54f9ee45 | 4973 | return _core_.PyApp_ProcessIdle(*args, **kwargs) |
e811c8ce RD |
4974 | |
4975 | def SendIdleEvents(*args, **kwargs): | |
0df68c9f | 4976 | """ |
a95a7133 | 4977 | SendIdleEvents(self, Window win, IdleEvent event) -> bool |
e811c8ce | 4978 | |
66c033b4 RD |
4979 | Send idle event to window and all subwindows. Returns True if more |
4980 | idle time is requested. | |
0df68c9f | 4981 | """ |
54f9ee45 | 4982 | return _core_.PyApp_SendIdleEvents(*args, **kwargs) |
e811c8ce RD |
4983 | |
4984 | def IsActive(*args, **kwargs): | |
0df68c9f | 4985 | """ |
a95a7133 | 4986 | IsActive(self) -> bool |
6c3b4aae | 4987 | |
0df68c9f RD |
4988 | Return True if our app has focus. |
4989 | """ | |
54f9ee45 | 4990 | return _core_.PyApp_IsActive(*args, **kwargs) |
e811c8ce RD |
4991 | |
4992 | def SetTopWindow(*args, **kwargs): | |
0df68c9f | 4993 | """ |
a95a7133 | 4994 | SetTopWindow(self, Window win) |
6c3b4aae | 4995 | |
66c033b4 | 4996 | Set the *main* top level window |
0df68c9f | 4997 | """ |
54f9ee45 | 4998 | return _core_.PyApp_SetTopWindow(*args, **kwargs) |
e811c8ce RD |
4999 | |
5000 | def GetTopWindow(*args, **kwargs): | |
0df68c9f | 5001 | """ |
a95a7133 | 5002 | GetTopWindow(self) -> Window |
6c3b4aae | 5003 | |
66c033b4 RD |
5004 | Return the *main* top level window (if it hadn't been set previously |
5005 | with SetTopWindow(), will return just some top level window and, if | |
5006 | there not any, will return None) | |
0df68c9f | 5007 | """ |
54f9ee45 | 5008 | return _core_.PyApp_GetTopWindow(*args, **kwargs) |
e811c8ce RD |
5009 | |
5010 | def SetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f | 5011 | """ |
a95a7133 | 5012 | SetExitOnFrameDelete(self, bool flag) |
0df68c9f | 5013 | |
66c033b4 RD |
5014 | Control the exit behaviour: by default, the program will exit the main |
5015 | loop (and so, usually, terminate) when the last top-level program | |
5016 | window is deleted. Beware that if you disable this behaviour (with | |
5017 | SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() | |
5018 | explicitly from somewhere. | |
0df68c9f | 5019 | """ |
54f9ee45 | 5020 | return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs) |
e811c8ce RD |
5021 | |
5022 | def GetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f | 5023 | """ |
a95a7133 | 5024 | GetExitOnFrameDelete(self) -> bool |
6c3b4aae | 5025 | |
0df68c9f RD |
5026 | Get the current exit behaviour setting. |
5027 | """ | |
54f9ee45 | 5028 | return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs) |
e811c8ce RD |
5029 | |
5030 | def SetUseBestVisual(*args, **kwargs): | |
0df68c9f | 5031 | """ |
a95a7133 | 5032 | SetUseBestVisual(self, bool flag) |
6c3b4aae | 5033 | |
66c033b4 RD |
5034 | Set whether the app should try to use the best available visual on |
5035 | systems where more than one is available, (Sun, SGI, XFree86 4, etc.) | |
0df68c9f | 5036 | """ |
54f9ee45 | 5037 | return _core_.PyApp_SetUseBestVisual(*args, **kwargs) |
e811c8ce RD |
5038 | |
5039 | def GetUseBestVisual(*args, **kwargs): | |
0df68c9f | 5040 | """ |
a95a7133 | 5041 | GetUseBestVisual(self) -> bool |
6c3b4aae | 5042 | |
0df68c9f RD |
5043 | Get current UseBestVisual setting. |
5044 | """ | |
54f9ee45 | 5045 | return _core_.PyApp_GetUseBestVisual(*args, **kwargs) |
e811c8ce RD |
5046 | |
5047 | def SetPrintMode(*args, **kwargs): | |
a95a7133 | 5048 | """SetPrintMode(self, int mode)""" |
54f9ee45 | 5049 | return _core_.PyApp_SetPrintMode(*args, **kwargs) |
e811c8ce RD |
5050 | |
5051 | def GetPrintMode(*args, **kwargs): | |
a95a7133 | 5052 | """GetPrintMode(self) -> int""" |
54f9ee45 | 5053 | return _core_.PyApp_GetPrintMode(*args, **kwargs) |
e811c8ce | 5054 | |
e811c8ce | 5055 | def SetAssertMode(*args, **kwargs): |
0df68c9f | 5056 | """ |
a95a7133 | 5057 | SetAssertMode(self, int mode) |
6c3b4aae | 5058 | |
41e2b43e | 5059 | Set the OnAssert behaviour for debug and hybrid builds. |
0df68c9f | 5060 | """ |
54f9ee45 | 5061 | return _core_.PyApp_SetAssertMode(*args, **kwargs) |
e811c8ce | 5062 | |
6c3b4aae | 5063 | def GetAssertMode(*args, **kwargs): |
0df68c9f | 5064 | """ |
a95a7133 | 5065 | GetAssertMode(self) -> int |
6c3b4aae | 5066 | |
0df68c9f RD |
5067 | Get the current OnAssert behaviour setting. |
5068 | """ | |
54f9ee45 | 5069 | return _core_.PyApp_GetAssertMode(*args, **kwargs) |
6c3b4aae | 5070 | |
e811c8ce | 5071 | def GetMacSupportPCMenuShortcuts(*args, **kwargs): |
66c033b4 | 5072 | """GetMacSupportPCMenuShortcuts() -> bool""" |
54f9ee45 | 5073 | return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) |
e811c8ce RD |
5074 | |
5075 | GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) | |
5076 | def GetMacAboutMenuItemId(*args, **kwargs): | |
66c033b4 | 5077 | """GetMacAboutMenuItemId() -> long""" |
54f9ee45 | 5078 | return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs) |
e811c8ce RD |
5079 | |
5080 | GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) | |
5081 | def GetMacPreferencesMenuItemId(*args, **kwargs): | |
66c033b4 | 5082 | """GetMacPreferencesMenuItemId() -> long""" |
54f9ee45 | 5083 | return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) |
e811c8ce RD |
5084 | |
5085 | GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) | |
5086 | def GetMacExitMenuItemId(*args, **kwargs): | |
66c033b4 | 5087 | """GetMacExitMenuItemId() -> long""" |
54f9ee45 | 5088 | return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs) |
e811c8ce RD |
5089 | |
5090 | GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) | |
5091 | def GetMacHelpMenuTitleName(*args, **kwargs): | |
66c033b4 | 5092 | """GetMacHelpMenuTitleName() -> String""" |
54f9ee45 | 5093 | return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) |
e811c8ce RD |
5094 | |
5095 | GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) | |
5096 | def SetMacSupportPCMenuShortcuts(*args, **kwargs): | |
66c033b4 | 5097 | """SetMacSupportPCMenuShortcuts(bool val)""" |
54f9ee45 | 5098 | return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) |
e811c8ce RD |
5099 | |
5100 | SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) | |
5101 | def SetMacAboutMenuItemId(*args, **kwargs): | |
66c033b4 | 5102 | """SetMacAboutMenuItemId(long val)""" |
54f9ee45 | 5103 | return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) |
e811c8ce RD |
5104 | |
5105 | SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) | |
5106 | def SetMacPreferencesMenuItemId(*args, **kwargs): | |
66c033b4 | 5107 | """SetMacPreferencesMenuItemId(long val)""" |
54f9ee45 | 5108 | return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) |
e811c8ce RD |
5109 | |
5110 | SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) | |
5111 | def SetMacExitMenuItemId(*args, **kwargs): | |
66c033b4 | 5112 | """SetMacExitMenuItemId(long val)""" |
54f9ee45 | 5113 | return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) |
e811c8ce RD |
5114 | |
5115 | SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) | |
5116 | def SetMacHelpMenuTitleName(*args, **kwargs): | |
66c033b4 | 5117 | """SetMacHelpMenuTitleName(String val)""" |
54f9ee45 | 5118 | return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) |
e811c8ce RD |
5119 | |
5120 | SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) | |
5121 | def _BootstrapApp(*args, **kwargs): | |
0df68c9f | 5122 | """ |
a95a7133 | 5123 | _BootstrapApp(self) |
6c3b4aae | 5124 | |
0df68c9f RD |
5125 | For internal use only |
5126 | """ | |
54f9ee45 | 5127 | return _core_.PyApp__BootstrapApp(*args, **kwargs) |
e811c8ce RD |
5128 | |
5129 | def GetComCtl32Version(*args, **kwargs): | |
0df68c9f | 5130 | """ |
66c033b4 | 5131 | GetComCtl32Version() -> int |
6c3b4aae | 5132 | |
66c033b4 RD |
5133 | Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if |
5134 | it wasn't found at all. Raises an exception on non-Windows platforms. | |
0df68c9f | 5135 | """ |
54f9ee45 | 5136 | return _core_.PyApp_GetComCtl32Version(*args, **kwargs) |
e811c8ce RD |
5137 | |
5138 | GetComCtl32Version = staticmethod(GetComCtl32Version) | |
d14a1e28 RD |
5139 | |
5140 | class PyAppPtr(PyApp): | |
5141 | def __init__(self, this): | |
5142 | self.this = this | |
5143 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5144 | self.__class__ = PyApp | |
54f9ee45 | 5145 | _core_.PyApp_swigregister(PyAppPtr) |
d14a1e28 | 5146 | |
1fc3b23a RD |
5147 | def PyApp_IsMainLoopRunning(*args, **kwargs): |
5148 | """ | |
5149 | PyApp_IsMainLoopRunning() -> bool | |
5150 | ||
5151 | Returns True if we're running the main loop, i.e. if the events can | |
5152 | currently be dispatched. | |
5153 | """ | |
5154 | return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) | |
5155 | ||
e811c8ce RD |
5156 | def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs): |
5157 | """PyApp_GetMacSupportPCMenuShortcuts() -> bool""" | |
54f9ee45 | 5158 | return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) |
d14a1e28 | 5159 | |
e811c8ce RD |
5160 | def PyApp_GetMacAboutMenuItemId(*args, **kwargs): |
5161 | """PyApp_GetMacAboutMenuItemId() -> long""" | |
54f9ee45 | 5162 | return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs) |
d14a1e28 | 5163 | |
e811c8ce RD |
5164 | def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs): |
5165 | """PyApp_GetMacPreferencesMenuItemId() -> long""" | |
54f9ee45 | 5166 | return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) |
d14a1e28 | 5167 | |
e811c8ce RD |
5168 | def PyApp_GetMacExitMenuItemId(*args, **kwargs): |
5169 | """PyApp_GetMacExitMenuItemId() -> long""" | |
54f9ee45 | 5170 | return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs) |
d14a1e28 | 5171 | |
e811c8ce | 5172 | def PyApp_GetMacHelpMenuTitleName(*args, **kwargs): |
196addbf | 5173 | """PyApp_GetMacHelpMenuTitleName() -> String""" |
54f9ee45 | 5174 | return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) |
d14a1e28 | 5175 | |
e811c8ce RD |
5176 | def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs): |
5177 | """PyApp_SetMacSupportPCMenuShortcuts(bool val)""" | |
54f9ee45 | 5178 | return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) |
d14a1e28 | 5179 | |
e811c8ce RD |
5180 | def PyApp_SetMacAboutMenuItemId(*args, **kwargs): |
5181 | """PyApp_SetMacAboutMenuItemId(long val)""" | |
54f9ee45 | 5182 | return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) |
d14a1e28 | 5183 | |
e811c8ce RD |
5184 | def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs): |
5185 | """PyApp_SetMacPreferencesMenuItemId(long val)""" | |
54f9ee45 | 5186 | return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) |
d14a1e28 | 5187 | |
e811c8ce RD |
5188 | def PyApp_SetMacExitMenuItemId(*args, **kwargs): |
5189 | """PyApp_SetMacExitMenuItemId(long val)""" | |
54f9ee45 | 5190 | return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) |
d14a1e28 | 5191 | |
e811c8ce | 5192 | def PyApp_SetMacHelpMenuTitleName(*args, **kwargs): |
196addbf | 5193 | """PyApp_SetMacHelpMenuTitleName(String val)""" |
54f9ee45 | 5194 | return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) |
d14a1e28 | 5195 | |
e811c8ce | 5196 | def PyApp_GetComCtl32Version(*args, **kwargs): |
0df68c9f RD |
5197 | """ |
5198 | PyApp_GetComCtl32Version() -> int | |
6c3b4aae | 5199 | |
66c033b4 RD |
5200 | Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if |
5201 | it wasn't found at all. Raises an exception on non-Windows platforms. | |
0df68c9f | 5202 | """ |
54f9ee45 | 5203 | return _core_.PyApp_GetComCtl32Version(*args, **kwargs) |
d14a1e28 RD |
5204 | |
5205 | #--------------------------------------------------------------------------- | |
5206 | ||
5207 | ||
e811c8ce | 5208 | def Exit(*args, **kwargs): |
0df68c9f RD |
5209 | """ |
5210 | Exit() | |
6c3b4aae | 5211 | |
0df68c9f RD |
5212 | Force an exit of the application. Convenience for wx.GetApp().Exit() |
5213 | """ | |
54f9ee45 | 5214 | return _core_.Exit(*args, **kwargs) |
d14a1e28 | 5215 | |
e811c8ce | 5216 | def Yield(*args, **kwargs): |
0df68c9f RD |
5217 | """ |
5218 | Yield() -> bool | |
6c3b4aae | 5219 | |
0df68c9f RD |
5220 | Yield to other apps/messages. Convenience for wx.GetApp().Yield() |
5221 | """ | |
54f9ee45 | 5222 | return _core_.Yield(*args, **kwargs) |
d14a1e28 | 5223 | |
e811c8ce | 5224 | def YieldIfNeeded(*args, **kwargs): |
0df68c9f RD |
5225 | """ |
5226 | YieldIfNeeded() -> bool | |
6c3b4aae | 5227 | |
0df68c9f RD |
5228 | Yield to other apps/messages. Convenience for wx.GetApp().Yield(True) |
5229 | """ | |
54f9ee45 | 5230 | return _core_.YieldIfNeeded(*args, **kwargs) |
d14a1e28 | 5231 | |
e811c8ce | 5232 | def SafeYield(*args, **kwargs): |
0df68c9f RD |
5233 | """ |
5234 | SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool | |
6c3b4aae | 5235 | |
66c033b4 RD |
5236 | This function is similar to `wx.Yield`, except that it disables the |
5237 | user input to all program windows before calling `wx.Yield` and | |
5238 | re-enables it again afterwards. If ``win`` is not None, this window | |
5239 | will remain enabled, allowing the implementation of some limited user | |
5240 | interaction. | |
6c3b4aae | 5241 | |
66c033b4 | 5242 | :Returns: the result of the call to `wx.Yield`. |
0df68c9f | 5243 | """ |
54f9ee45 | 5244 | return _core_.SafeYield(*args, **kwargs) |
d14a1e28 | 5245 | |
e811c8ce | 5246 | def WakeUpIdle(*args, **kwargs): |
0df68c9f RD |
5247 | """ |
5248 | WakeUpIdle() | |
6c3b4aae | 5249 | |
66c033b4 RD |
5250 | Cause the message queue to become empty again, so idle events will be |
5251 | sent. | |
0df68c9f | 5252 | """ |
54f9ee45 | 5253 | return _core_.WakeUpIdle(*args, **kwargs) |
d14a1e28 | 5254 | |
e811c8ce | 5255 | def PostEvent(*args, **kwargs): |
0df68c9f RD |
5256 | """ |
5257 | PostEvent(EvtHandler dest, Event event) | |
6c3b4aae | 5258 | |
66c033b4 RD |
5259 | Send an event to a window or other wx.EvtHandler to be processed |
5260 | later. | |
0df68c9f | 5261 | """ |
54f9ee45 | 5262 | return _core_.PostEvent(*args, **kwargs) |
d14a1e28 | 5263 | |
e811c8ce | 5264 | def App_CleanUp(*args, **kwargs): |
0df68c9f RD |
5265 | """ |
5266 | App_CleanUp() | |
6c3b4aae | 5267 | |
41e2b43e | 5268 | For internal use only, it is used to cleanup after wxWidgets when |
66c033b4 | 5269 | Python shuts down. |
0df68c9f | 5270 | """ |
54f9ee45 | 5271 | return _core_.App_CleanUp(*args, **kwargs) |
d14a1e28 | 5272 | |
e811c8ce | 5273 | def GetApp(*args, **kwargs): |
0df68c9f RD |
5274 | """ |
5275 | GetApp() -> PyApp | |
6c3b4aae | 5276 | |
196addbf | 5277 | Return a reference to the current wx.App object. |
0df68c9f | 5278 | """ |
54f9ee45 | 5279 | return _core_.GetApp(*args, **kwargs) |
5cbf236d RD |
5280 | |
5281 | def SetDefaultPyEncoding(*args, **kwargs): | |
5282 | """ | |
5283 | SetDefaultPyEncoding(string encoding) | |
5284 | ||
5285 | Sets the encoding that wxPython will use when it needs to convert a | |
5286 | Python string or unicode object to or from a wxString. | |
5287 | """ | |
5288 | return _core_.SetDefaultPyEncoding(*args, **kwargs) | |
5289 | ||
5290 | def GetDefaultPyEncoding(*args, **kwargs): | |
5291 | """ | |
5292 | GetDefaultPyEncoding() -> string | |
5293 | ||
5294 | Gets the current encoding that wxPython will use when it needs to | |
5295 | convert a Python string or unicode object to or from a wxString. | |
5296 | """ | |
5297 | return _core_.GetDefaultPyEncoding(*args, **kwargs) | |
d14a1e28 RD |
5298 | #---------------------------------------------------------------------- |
5299 | ||
5300 | class PyOnDemandOutputWindow: | |
6c3b4aae RD |
5301 | """ |
5302 | A class that can be used for redirecting Python's stdout and | |
5303 | stderr streams. It will do nothing until something is wrriten to | |
5304 | the stream at which point it will create a Frame with a text area | |
5305 | and write the text there. | |
5306 | """ | |
d14a1e28 RD |
5307 | def __init__(self, title = "wxPython: stdout/stderr"): |
5308 | self.frame = None | |
5309 | self.title = title | |
412d302d RD |
5310 | self.pos = wx.DefaultPosition |
5311 | self.size = (450, 300) | |
d14a1e28 RD |
5312 | self.parent = None |
5313 | ||
5314 | def SetParent(self, parent): | |
6c3b4aae | 5315 | """Set the window to be used as the popup Frame's parent.""" |
d14a1e28 RD |
5316 | self.parent = parent |
5317 | ||
6c3b4aae RD |
5318 | |
5319 | def CreateOutputWindow(self, st): | |
412d302d RD |
5320 | self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size, |
5321 | style=wx.DEFAULT_FRAME_STYLE) | |
196addbf | 5322 | self.text = wx.TextCtrl(self.frame, -1, "", |
412d302d | 5323 | style=wx.TE_MULTILINE|wx.TE_READONLY) |
d1e20054 | 5324 | self.text.AppendText(st) |
6c3b4aae RD |
5325 | self.frame.Show(True) |
5326 | EVT_CLOSE(self.frame, self.OnCloseWindow) | |
5327 | ||
d14a1e28 | 5328 | |
7409c0c6 RD |
5329 | def OnCloseWindow(self, event): |
5330 | if self.frame is not None: | |
5331 | self.frame.Destroy() | |
5332 | self.frame = None | |
5333 | self.text = None | |
5334 | ||
5335 | ||
d14a1e28 | 5336 | # These methods provide the file-like output behaviour. |
6c3b4aae RD |
5337 | def write(self, text): |
5338 | """ | |
5339 | Create the output window if needed and write the string to it. | |
5340 | If not called in the context of the gui thread then uses | |
5341 | CallAfter to do the work there. | |
5342 | """ | |
5343 | if self.frame is None: | |
5344 | if not wx.Thread_IsMain(): | |
5345 | wx.CallAfter(self.CreateOutputWindow, text) | |
5346 | else: | |
5347 | self.CreateOutputWindow(text) | |
5348 | else: | |
5349 | if not wx.Thread_IsMain(): | |
5350 | wx.CallAfter(self.text.AppendText, text) | |
5351 | else: | |
5352 | self.text.AppendText(text) | |
5353 | ||
d14a1e28 RD |
5354 | |
5355 | def close(self): | |
6c3b4aae RD |
5356 | if self.frame is not None: |
5357 | wx.CallAfter(self.frame.Close) | |
5358 | ||
d14a1e28 | 5359 | |
19272049 RD |
5360 | def flush(self): |
5361 | pass | |
5362 | ||
5363 | ||
d14a1e28 RD |
5364 | |
5365 | #---------------------------------------------------------------------- | |
d14a1e28 RD |
5366 | |
5367 | _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__') | |
5368 | ||
5369 | class App(wx.PyApp): | |
6c3b4aae | 5370 | """ |
66c033b4 RD |
5371 | The ``wx.App`` class represents the application and is used to: |
5372 | ||
5373 | * bootstrap the wxPython system and initialize the underlying | |
5374 | gui toolkit | |
5375 | * set and get application-wide properties | |
5376 | * implement the windowing system main message or event loop, | |
5377 | and to dispatch events to window instances | |
5378 | * etc. | |
5379 | ||
5380 | Every application must have a ``wx.App`` instance, and all | |
5381 | creation of UI objects should be delayed until after the | |
03e37cd5 RD |
5382 | ``wx.App`` object has been created in order to ensure that the gui |
5383 | platform and wxWidgets have been fully initialized. | |
66c033b4 RD |
5384 | |
5385 | Normally you would derive from this class and implement an | |
5386 | ``OnInit`` method that creates a frame and then calls | |
5387 | ``self.SetTopWindow(frame)``. | |
5388 | ||
03e37cd5 | 5389 | :see: `wx.PySimpleApp` for a simpler app class that can be used |
1c0f361b | 5390 | directly. |
6c3b4aae | 5391 | """ |
66c033b4 | 5392 | |
d14a1e28 RD |
5393 | outputWindowClass = PyOnDemandOutputWindow |
5394 | ||
03e37cd5 RD |
5395 | def __init__(self, redirect=_defRedirect, filename=None, |
5396 | useBestVisual=False, clearSigInt=True): | |
66c033b4 RD |
5397 | """ |
5398 | Construct a ``wx.App`` object. | |
5399 | ||
03e37cd5 RD |
5400 | :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be |
5401 | redirected? Defaults to True on Windows and Mac, False | |
5402 | otherwise. If `filename` is None then output will be | |
5403 | redirected to a window that pops up as needed. (You can | |
5404 | control what kind of window is created for the output by | |
5405 | resetting the class variable ``outputWindowClass`` to a | |
5406 | class of your choosing.) | |
66c033b4 | 5407 | |
03e37cd5 RD |
5408 | :param filename: The name of a file to redirect output to, if |
5409 | redirect is True. | |
66c033b4 RD |
5410 | |
5411 | :param useBestVisual: Should the app try to use the best | |
03e37cd5 RD |
5412 | available visual provided by the system (only relevant on |
5413 | systems that have more than one visual.) This parameter | |
5414 | must be used instead of calling `SetUseBestVisual` later | |
5415 | on because it must be set before the underlying GUI | |
5416 | toolkit is initialized. | |
5417 | ||
5418 | :param clearSigInt: Should SIGINT be cleared? This allows the | |
5419 | app to terminate upon a Ctrl-C in the console like other | |
5420 | GUI apps will. | |
66c033b4 RD |
5421 | |
5422 | :note: You should override OnInit to do applicaition | |
5423 | initialization to ensure that the system, toolkit and | |
5424 | wxWidgets are fully initialized. | |
5425 | """ | |
d14a1e28 RD |
5426 | wx.PyApp.__init__(self) |
5427 | ||
5428 | if wx.Platform == "__WXMAC__": | |
5429 | try: | |
5430 | import MacOS | |
5431 | if not MacOS.WMAvailable(): | |
5432 | print """\ | |
5433 | This program needs access to the screen. Please run with 'pythonw', | |
5434 | not 'python', and only when you are logged in on the main display of | |
5435 | your Mac.""" | |
5436 | _sys.exit(1) | |
36cadbf7 RD |
5437 | except SystemExit: |
5438 | raise | |
d14a1e28 RD |
5439 | except: |
5440 | pass | |
5441 | ||
5442 | # This has to be done before OnInit | |
5443 | self.SetUseBestVisual(useBestVisual) | |
5444 | ||
5445 | # Set the default handler for SIGINT. This fixes a problem | |
5446 | # where if Ctrl-C is pressed in the console that started this | |
5447 | # app then it will not appear to do anything, (not even send | |
5448 | # KeyboardInterrupt???) but will later segfault on exit. By | |
5449 | # setting the default handler then the app will exit, as | |
5450 | # expected (depending on platform.) | |
03e37cd5 RD |
5451 | if clearSigInt: |
5452 | try: | |
5453 | import signal | |
5454 | signal.signal(signal.SIGINT, signal.SIG_DFL) | |
5455 | except: | |
5456 | pass | |
d14a1e28 RD |
5457 | |
5458 | # Save and redirect the stdio to a window? | |
5459 | self.stdioWin = None | |
5460 | self.saveStdio = (_sys.stdout, _sys.stderr) | |
5461 | if redirect: | |
5462 | self.RedirectStdio(filename) | |
5463 | ||
8fb0e70a RD |
5464 | # Use Python's install prefix as the default |
5465 | wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix) | |
5466 | ||
d14a1e28 RD |
5467 | # This finishes the initialization of wxWindows and then calls |
5468 | # the OnInit that should be present in the derived class | |
5469 | self._BootstrapApp() | |
5470 | ||
5471 | ||
5472 | def __del__(self): | |
5473 | try: | |
5474 | self.RestoreStdio() # Just in case the MainLoop was overridden | |
5475 | except: | |
5476 | pass | |
5477 | ||
5478 | ||
5479 | def SetTopWindow(self, frame): | |
1e0c8722 | 5480 | """Set the \"main\" top level window""" |
d14a1e28 RD |
5481 | if self.stdioWin: |
5482 | self.stdioWin.SetParent(frame) | |
5483 | wx.PyApp.SetTopWindow(self, frame) | |
5484 | ||
5485 | ||
5486 | def MainLoop(self): | |
1e0c8722 | 5487 | """Execute the main GUI event loop""" |
d14a1e28 RD |
5488 | wx.PyApp.MainLoop(self) |
5489 | self.RestoreStdio() | |
5490 | ||
5491 | ||
7409c0c6 | 5492 | def RedirectStdio(self, filename=None): |
1e0c8722 | 5493 | """Redirect sys.stdout and sys.stderr to a file or a popup window.""" |
d14a1e28 RD |
5494 | if filename: |
5495 | _sys.stdout = _sys.stderr = open(filename, 'a') | |
5496 | else: | |
5497 | self.stdioWin = self.outputWindowClass() | |
5498 | _sys.stdout = _sys.stderr = self.stdioWin | |
5499 | ||
5500 | ||
5501 | def RestoreStdio(self): | |
5502 | _sys.stdout, _sys.stderr = self.saveStdio | |
5503 | ||
5504 | ||
412d302d RD |
5505 | def SetOutputWindowAttributes(self, title=None, pos=None, size=None): |
5506 | """ | |
5507 | Set the title, position and/or size of the output window if | |
f5b96ee1 RD |
5508 | the stdio has been redirected. This should be called before |
5509 | any output would cause the output window to be created. | |
412d302d RD |
5510 | """ |
5511 | if self.stdioWin: | |
5512 | if title is not None: | |
5513 | self.stdioWin.title = title | |
5514 | if pos is not None: | |
5515 | self.stdioWin.pos = pos | |
5516 | if size is not None: | |
5517 | self.stdioWin.size = size | |
5518 | ||
5519 | ||
5520 | ||
d14a1e28 | 5521 | |
66c033b4 | 5522 | # change from wx.PyApp_XX to wx.App_XX |
54f9ee45 RD |
5523 | App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts |
5524 | App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId | |
5525 | App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId | |
5526 | App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId | |
5527 | App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName | |
5528 | App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts | |
5529 | App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId | |
5530 | App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId | |
5531 | App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId | |
5532 | App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName | |
5533 | App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version | |
d14a1e28 RD |
5534 | |
5535 | #---------------------------------------------------------------------------- | |
5536 | ||
5537 | class PySimpleApp(wx.App): | |
6c3b4aae RD |
5538 | """ |
5539 | A simple application class. You can just create one of these and | |
5540 | then then make your top level windows later, and not have to worry | |
66c033b4 RD |
5541 | about OnInit. For example:: |
5542 | ||
5543 | app = wx.PySimpleApp() | |
5544 | frame = wx.Frame(None, title='Hello World') | |
5545 | frame.Show() | |
5546 | app.MainLoop() | |
5547 | ||
5548 | :see: `wx.App` | |
5549 | """ | |
6c3b4aae | 5550 | |
03e37cd5 RD |
5551 | def __init__(self, redirect=False, filename=None, |
5552 | useBestVisual=False, clearSigInt=True): | |
66c033b4 RD |
5553 | """ |
5554 | :see: `wx.App.__init__` | |
5555 | """ | |
03e37cd5 | 5556 | wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt) |
6c3b4aae | 5557 | |
d14a1e28 | 5558 | def OnInit(self): |
d14a1e28 RD |
5559 | return True |
5560 | ||
5561 | ||
66c033b4 | 5562 | |
6c3b4aae | 5563 | # Is anybody using this one? |
d14a1e28 RD |
5564 | class PyWidgetTester(wx.App): |
5565 | def __init__(self, size = (250, 100)): | |
5566 | self.size = size | |
5567 | wx.App.__init__(self, 0) | |
5568 | ||
5569 | def OnInit(self): | |
196addbf | 5570 | self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size) |
d14a1e28 RD |
5571 | self.SetTopWindow(self.frame) |
5572 | return True | |
5573 | ||
66c033b4 RD |
5574 | def SetWidget(self, widgetClass, *args, **kwargs): |
5575 | w = widgetClass(self.frame, *args, **kwargs) | |
d14a1e28 RD |
5576 | self.frame.Show(True) |
5577 | ||
5578 | #---------------------------------------------------------------------------- | |
5579 | # DO NOT hold any other references to this object. This is how we | |
66c033b4 | 5580 | # know when to cleanup system resources that wxWidgets is holding. When |
d14a1e28 | 5581 | # the sys module is unloaded, the refcount on sys.__wxPythonCleanup |
66c033b4 | 5582 | # goes to zero and it calls the wx.App_CleanUp function. |
d14a1e28 RD |
5583 | |
5584 | class __wxPyCleanup: | |
5585 | def __init__(self): | |
54f9ee45 | 5586 | self.cleanup = _core_.App_CleanUp |
d14a1e28 RD |
5587 | def __del__(self): |
5588 | self.cleanup() | |
5589 | ||
5590 | _sys.__wxPythonCleanup = __wxPyCleanup() | |
5591 | ||
5592 | ## # another possible solution, but it gets called too early... | |
66c033b4 RD |
5593 | ## import atexit |
5594 | ## atexit.register(_core_.wxApp_CleanUp) | |
d14a1e28 RD |
5595 | |
5596 | ||
5597 | #---------------------------------------------------------------------------- | |
5598 | ||
5599 | #--------------------------------------------------------------------------- | |
2ef75293 RD |
5600 | |
5601 | class EventLoop(object): | |
093d3ff1 | 5602 | """Proxy of C++ EventLoop class""" |
2ef75293 RD |
5603 | def __repr__(self): |
5604 | return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5605 | def __init__(self, *args, **kwargs): | |
5606 | """__init__(self) -> EventLoop""" | |
5607 | newobj = _core_.new_EventLoop(*args, **kwargs) | |
5608 | self.this = newobj.this | |
5609 | self.thisown = 1 | |
5610 | del newobj.thisown | |
5611 | def __del__(self, destroy=_core_.delete_EventLoop): | |
5612 | """__del__(self)""" | |
5613 | try: | |
5614 | if self.thisown: destroy(self) | |
5615 | except: pass | |
5616 | ||
5617 | def Run(*args, **kwargs): | |
5618 | """Run(self) -> int""" | |
5619 | return _core_.EventLoop_Run(*args, **kwargs) | |
5620 | ||
5621 | def Exit(*args, **kwargs): | |
5622 | """Exit(self, int rc=0)""" | |
5623 | return _core_.EventLoop_Exit(*args, **kwargs) | |
5624 | ||
5625 | def Pending(*args, **kwargs): | |
5626 | """Pending(self) -> bool""" | |
5627 | return _core_.EventLoop_Pending(*args, **kwargs) | |
5628 | ||
5629 | def Dispatch(*args, **kwargs): | |
5630 | """Dispatch(self) -> bool""" | |
5631 | return _core_.EventLoop_Dispatch(*args, **kwargs) | |
5632 | ||
5633 | def IsRunning(*args, **kwargs): | |
5634 | """IsRunning(self) -> bool""" | |
5635 | return _core_.EventLoop_IsRunning(*args, **kwargs) | |
5636 | ||
5637 | def GetActive(*args, **kwargs): | |
5638 | """GetActive() -> EventLoop""" | |
5639 | return _core_.EventLoop_GetActive(*args, **kwargs) | |
5640 | ||
5641 | GetActive = staticmethod(GetActive) | |
5642 | def SetActive(*args, **kwargs): | |
5643 | """SetActive(EventLoop loop)""" | |
5644 | return _core_.EventLoop_SetActive(*args, **kwargs) | |
5645 | ||
5646 | SetActive = staticmethod(SetActive) | |
5647 | ||
5648 | class EventLoopPtr(EventLoop): | |
5649 | def __init__(self, this): | |
5650 | self.this = this | |
5651 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5652 | self.__class__ = EventLoop | |
5653 | _core_.EventLoop_swigregister(EventLoopPtr) | |
5654 | ||
5655 | def EventLoop_GetActive(*args, **kwargs): | |
5656 | """EventLoop_GetActive() -> EventLoop""" | |
5657 | return _core_.EventLoop_GetActive(*args, **kwargs) | |
5658 | ||
5659 | def EventLoop_SetActive(*args, **kwargs): | |
5660 | """EventLoop_SetActive(EventLoop loop)""" | |
5661 | return _core_.EventLoop_SetActive(*args, **kwargs) | |
5662 | ||
5663 | #--------------------------------------------------------------------------- | |
d14a1e28 | 5664 | |
1e0c8722 | 5665 | class AcceleratorEntry(object): |
66c033b4 RD |
5666 | """ |
5667 | A class used to define items in an `wx.AcceleratorTable`. wxPython | |
5668 | programs can choose to use wx.AcceleratorEntry objects, but using a | |
5669 | list of 3-tuple of integers (flags, keyCode, cmdID) usually works just | |
41e2b43e | 5670 | as well. See `__init__` for of the tuple values. |
66c033b4 RD |
5671 | |
5672 | :see: `wx.AcceleratorTable` | |
5673 | """ | |
1e0c8722 RD |
5674 | def __repr__(self): |
5675 | return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5676 | def __init__(self, *args, **kwargs): | |
66c033b4 RD |
5677 | """ |
5678 | __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry | |
5679 | ||
5680 | Construct a wx.AcceleratorEntry. | |
66c033b4 | 5681 | """ |
54f9ee45 | 5682 | newobj = _core_.new_AcceleratorEntry(*args, **kwargs) |
1e0c8722 RD |
5683 | self.this = newobj.this |
5684 | self.thisown = 1 | |
5685 | del newobj.thisown | |
54f9ee45 | 5686 | def __del__(self, destroy=_core_.delete_AcceleratorEntry): |
a95a7133 | 5687 | """__del__(self)""" |
1e0c8722 RD |
5688 | try: |
5689 | if self.thisown: destroy(self) | |
5690 | except: pass | |
5691 | ||
5692 | def Set(*args, **kwargs): | |
66c033b4 RD |
5693 | """ |
5694 | Set(self, int flags, int keyCode, int cmd) | |
1e0c8722 | 5695 | |
66c033b4 RD |
5696 | (Re)set the attributes of a wx.AcceleratorEntry. |
5697 | :see `__init__` | |
5698 | """ | |
5699 | return _core_.AcceleratorEntry_Set(*args, **kwargs) | |
1e0c8722 RD |
5700 | |
5701 | def GetFlags(*args, **kwargs): | |
66c033b4 RD |
5702 | """ |
5703 | GetFlags(self) -> int | |
5704 | ||
5705 | Get the AcceleratorEntry's flags. | |
5706 | """ | |
54f9ee45 | 5707 | return _core_.AcceleratorEntry_GetFlags(*args, **kwargs) |
1e0c8722 RD |
5708 | |
5709 | def GetKeyCode(*args, **kwargs): | |
66c033b4 RD |
5710 | """ |
5711 | GetKeyCode(self) -> int | |
5712 | ||
5713 | Get the AcceleratorEntry's keycode. | |
5714 | """ | |
54f9ee45 | 5715 | return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs) |
1e0c8722 RD |
5716 | |
5717 | def GetCommand(*args, **kwargs): | |
66c033b4 RD |
5718 | """ |
5719 | GetCommand(self) -> int | |
5720 | ||
5721 | Get the AcceleratorEntry's command ID. | |
5722 | """ | |
54f9ee45 | 5723 | return _core_.AcceleratorEntry_GetCommand(*args, **kwargs) |
1e0c8722 RD |
5724 | |
5725 | ||
5726 | class AcceleratorEntryPtr(AcceleratorEntry): | |
5727 | def __init__(self, this): | |
5728 | self.this = this | |
5729 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5730 | self.__class__ = AcceleratorEntry | |
54f9ee45 | 5731 | _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr) |
1e0c8722 RD |
5732 | |
5733 | class AcceleratorTable(Object): | |
66c033b4 RD |
5734 | """ |
5735 | An accelerator table allows the application to specify a table of | |
5736 | keyboard shortcuts for menus or other commands. On Windows, menu or | |
5737 | button commands are supported; on GTK, only menu commands are | |
5738 | supported. | |
66c033b4 | 5739 | """ |
1e0c8722 RD |
5740 | def __repr__(self): |
5741 | return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5742 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
5743 | """ |
5744 | __init__(entries) -> AcceleratorTable | |
1e0c8722 | 5745 | |
66c033b4 RD |
5746 | Construct an AcceleratorTable from a list of `wx.AcceleratorEntry` |
5747 | items or or of 3-tuples (flags, keyCode, cmdID) | |
5748 | ||
5749 | :see: `wx.AcceleratorEntry` | |
0df68c9f | 5750 | """ |
54f9ee45 | 5751 | newobj = _core_.new_AcceleratorTable(*args, **kwargs) |
1e0c8722 RD |
5752 | self.this = newobj.this |
5753 | self.thisown = 1 | |
5754 | del newobj.thisown | |
54f9ee45 | 5755 | def __del__(self, destroy=_core_.delete_AcceleratorTable): |
a95a7133 | 5756 | """__del__(self)""" |
1e0c8722 RD |
5757 | try: |
5758 | if self.thisown: destroy(self) | |
5759 | except: pass | |
5760 | ||
5761 | def Ok(*args, **kwargs): | |
a95a7133 | 5762 | """Ok(self) -> bool""" |
54f9ee45 | 5763 | return _core_.AcceleratorTable_Ok(*args, **kwargs) |
1e0c8722 RD |
5764 | |
5765 | ||
5766 | class AcceleratorTablePtr(AcceleratorTable): | |
5767 | def __init__(self, this): | |
5768 | self.this = this | |
5769 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5770 | self.__class__ = AcceleratorTable | |
54f9ee45 | 5771 | _core_.AcceleratorTable_swigregister(AcceleratorTablePtr) |
1e0c8722 RD |
5772 | |
5773 | ||
5774 | def GetAccelFromString(*args, **kwargs): | |
196addbf | 5775 | """GetAccelFromString(String label) -> AcceleratorEntry""" |
54f9ee45 | 5776 | return _core_.GetAccelFromString(*args, **kwargs) |
1e0c8722 RD |
5777 | #--------------------------------------------------------------------------- |
5778 | ||
74a57fcd RD |
5779 | class VisualAttributes(object): |
5780 | """struct containing all the visual attributes of a control""" | |
5781 | def __repr__(self): | |
5782 | return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5783 | def __init__(self, *args, **kwargs): | |
5784 | """ | |
a95a7133 | 5785 | __init__(self) -> VisualAttributes |
74a57fcd RD |
5786 | |
5787 | struct containing all the visual attributes of a control | |
5788 | """ | |
54f9ee45 | 5789 | newobj = _core_.new_VisualAttributes(*args, **kwargs) |
74a57fcd RD |
5790 | self.this = newobj.this |
5791 | self.thisown = 1 | |
5792 | del newobj.thisown | |
54f9ee45 | 5793 | def __del__(self, destroy=_core_.delete_VisualAttributes): |
a95a7133 | 5794 | """__del__(self)""" |
74a57fcd RD |
5795 | try: |
5796 | if self.thisown: destroy(self) | |
5797 | except: pass | |
5798 | ||
54f9ee45 RD |
5799 | font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set) |
5800 | colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set) | |
5801 | colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set) | |
74a57fcd RD |
5802 | |
5803 | class VisualAttributesPtr(VisualAttributes): | |
5804 | def __init__(self, this): | |
5805 | self.this = this | |
5806 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5807 | self.__class__ = VisualAttributes | |
54f9ee45 | 5808 | _core_.VisualAttributes_swigregister(VisualAttributesPtr) |
74a57fcd RD |
5809 | NullAcceleratorTable = cvar.NullAcceleratorTable |
5810 | PanelNameStr = cvar.PanelNameStr | |
5811 | ||
54f9ee45 RD |
5812 | WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL |
5813 | WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL | |
5814 | WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI | |
5815 | WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE | |
5816 | WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX | |
d14a1e28 | 5817 | class Window(EvtHandler): |
15afbcd0 RD |
5818 | """ |
5819 | wx.Window is the base class for all windows and represents any visible | |
5820 | object on the screen. All controls, top level windows and so on are | |
5821 | wx.Windows. Sizers and device contexts are not however, as they don't | |
5822 | appear on screen themselves. | |
5823 | ||
5824 | """ | |
e811c8ce RD |
5825 | def __repr__(self): |
5826 | return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5827 | def __init__(self, *args, **kwargs): |
0df68c9f | 5828 | """ |
a95a7133 | 5829 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
74a57fcd | 5830 | Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window |
15afbcd0 RD |
5831 | |
5832 | Construct and show a generic Window. | |
0df68c9f | 5833 | """ |
54f9ee45 | 5834 | newobj = _core_.new_Window(*args, **kwargs) |
d14a1e28 RD |
5835 | self.this = newobj.this |
5836 | self.thisown = 1 | |
5837 | del newobj.thisown | |
5838 | self._setOORInfo(self) | |
d14a1e28 | 5839 | |
e811c8ce | 5840 | def Create(*args, **kwargs): |
0df68c9f | 5841 | """ |
a95a7133 | 5842 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
74a57fcd | 5843 | Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool |
15afbcd0 RD |
5844 | |
5845 | Create the GUI part of the Window for 2-phase creation mode. | |
0df68c9f | 5846 | """ |
54f9ee45 | 5847 | return _core_.Window_Create(*args, **kwargs) |
d14a1e28 | 5848 | |
e811c8ce | 5849 | def Close(*args, **kwargs): |
15afbcd0 | 5850 | """ |
a95a7133 | 5851 | Close(self, bool force=False) -> bool |
15afbcd0 RD |
5852 | |
5853 | This function simply generates a EVT_CLOSE event whose handler usually | |
5854 | tries to close the window. It doesn't close the window itself, | |
5855 | however. If force is False (the default) then the window's close | |
5856 | handler will be allowed to veto the destruction of the window. | |
15afbcd0 | 5857 | """ |
54f9ee45 | 5858 | return _core_.Window_Close(*args, **kwargs) |
d14a1e28 | 5859 | |
e811c8ce | 5860 | def Destroy(*args, **kwargs): |
0df68c9f | 5861 | """ |
a95a7133 | 5862 | Destroy(self) -> bool |
d14a1e28 | 5863 | |
15afbcd0 RD |
5864 | Destroys the window safely. Frames and dialogs are not destroyed |
5865 | immediately when this function is called -- they are added to a list | |
5866 | of windows to be deleted on idle time, when all the window's events | |
5867 | have been processed. This prevents problems with events being sent to | |
5868 | non-existent windows. | |
5869 | ||
5870 | Returns True if the window has either been successfully deleted, or it | |
5871 | has been added to the list of windows pending real deletion. | |
0df68c9f | 5872 | """ |
54f9ee45 | 5873 | return _core_.Window_Destroy(*args, **kwargs) |
d14a1e28 | 5874 | |
e811c8ce | 5875 | def DestroyChildren(*args, **kwargs): |
15afbcd0 | 5876 | """ |
a95a7133 | 5877 | DestroyChildren(self) -> bool |
15afbcd0 | 5878 | |
41e2b43e RD |
5879 | Destroys all children of a window. Called automatically by the |
5880 | destructor. | |
15afbcd0 | 5881 | """ |
54f9ee45 | 5882 | return _core_.Window_DestroyChildren(*args, **kwargs) |
d14a1e28 | 5883 | |
e811c8ce | 5884 | def IsBeingDeleted(*args, **kwargs): |
15afbcd0 | 5885 | """ |
a95a7133 | 5886 | IsBeingDeleted(self) -> bool |
15afbcd0 RD |
5887 | |
5888 | Is the window in the process of being deleted? | |
5889 | """ | |
54f9ee45 | 5890 | return _core_.Window_IsBeingDeleted(*args, **kwargs) |
d14a1e28 | 5891 | |
e811c8ce | 5892 | def SetTitle(*args, **kwargs): |
15afbcd0 | 5893 | """ |
a95a7133 | 5894 | SetTitle(self, String title) |
15afbcd0 RD |
5895 | |
5896 | Sets the window's title. Applicable only to frames and dialogs. | |
5897 | """ | |
54f9ee45 | 5898 | return _core_.Window_SetTitle(*args, **kwargs) |
d14a1e28 | 5899 | |
e811c8ce | 5900 | def GetTitle(*args, **kwargs): |
15afbcd0 | 5901 | """ |
a95a7133 | 5902 | GetTitle(self) -> String |
15afbcd0 RD |
5903 | |
5904 | Gets the window's title. Applicable only to frames and dialogs. | |
5905 | """ | |
54f9ee45 | 5906 | return _core_.Window_GetTitle(*args, **kwargs) |
d14a1e28 | 5907 | |
e811c8ce | 5908 | def SetLabel(*args, **kwargs): |
15afbcd0 | 5909 | """ |
a95a7133 | 5910 | SetLabel(self, String label) |
15afbcd0 RD |
5911 | |
5912 | Set the text which the window shows in its label if applicable. | |
5913 | """ | |
54f9ee45 | 5914 | return _core_.Window_SetLabel(*args, **kwargs) |
d14a1e28 | 5915 | |
e811c8ce | 5916 | def GetLabel(*args, **kwargs): |
15afbcd0 | 5917 | """ |
a95a7133 | 5918 | GetLabel(self) -> String |
15afbcd0 | 5919 | |
41e2b43e RD |
5920 | Generic way of getting a label from any window, for identification |
5921 | purposes. The interpretation of this function differs from class to | |
5922 | class. For frames and dialogs, the value returned is the title. For | |
5923 | buttons or static text controls, it is the button text. This function | |
5924 | can be useful for meta-programs such as testing tools or special-needs | |
5925 | access programs)which need to identify windows by name. | |
15afbcd0 | 5926 | """ |
54f9ee45 | 5927 | return _core_.Window_GetLabel(*args, **kwargs) |
d14a1e28 | 5928 | |
e811c8ce | 5929 | def SetName(*args, **kwargs): |
15afbcd0 | 5930 | """ |
a95a7133 | 5931 | SetName(self, String name) |
15afbcd0 | 5932 | |
41e2b43e RD |
5933 | Sets the window's name. The window name is used for ressource setting |
5934 | in X, it is not the same as the window title/label | |
15afbcd0 | 5935 | """ |
54f9ee45 | 5936 | return _core_.Window_SetName(*args, **kwargs) |
d14a1e28 | 5937 | |
e811c8ce | 5938 | def GetName(*args, **kwargs): |
15afbcd0 | 5939 | """ |
a95a7133 | 5940 | GetName(self) -> String |
15afbcd0 | 5941 | |
41e2b43e RD |
5942 | Returns the windows name. This name is not guaranteed to be unique; |
5943 | it is up to the programmer to supply an appropriate name in the window | |
5944 | constructor or via wx.Window.SetName. | |
15afbcd0 | 5945 | """ |
54f9ee45 | 5946 | return _core_.Window_GetName(*args, **kwargs) |
d14a1e28 | 5947 | |
4276dc52 RD |
5948 | def SetWindowVariant(*args, **kwargs): |
5949 | """ | |
a95a7133 | 5950 | SetWindowVariant(self, int variant) |
4276dc52 | 5951 | |
41e2b43e RD |
5952 | Sets the variant of the window/font size to use for this window, if |
5953 | the platform supports variants, for example, wxMac. | |
4276dc52 | 5954 | """ |
54f9ee45 | 5955 | return _core_.Window_SetWindowVariant(*args, **kwargs) |
4276dc52 RD |
5956 | |
5957 | def GetWindowVariant(*args, **kwargs): | |
a95a7133 | 5958 | """GetWindowVariant(self) -> int""" |
54f9ee45 | 5959 | return _core_.Window_GetWindowVariant(*args, **kwargs) |
4276dc52 | 5960 | |
e811c8ce | 5961 | def SetId(*args, **kwargs): |
15afbcd0 | 5962 | """ |
a95a7133 | 5963 | SetId(self, int winid) |
15afbcd0 RD |
5964 | |
5965 | Sets the identifier of the window. Each window has an integer | |
5966 | identifier. If the application has not provided one, an identifier | |
5967 | will be generated. Normally, the identifier should be provided on | |
5968 | creation and should not be modified subsequently. | |
5969 | """ | |
54f9ee45 | 5970 | return _core_.Window_SetId(*args, **kwargs) |
d14a1e28 | 5971 | |
e811c8ce | 5972 | def GetId(*args, **kwargs): |
15afbcd0 | 5973 | """ |
a95a7133 | 5974 | GetId(self) -> int |
15afbcd0 RD |
5975 | |
5976 | Returns the identifier of the window. Each window has an integer | |
5977 | identifier. If the application has not provided one (or the default Id | |
5978 | -1 is used) then an unique identifier with a negative value will be | |
5979 | generated. | |
5980 | """ | |
54f9ee45 | 5981 | return _core_.Window_GetId(*args, **kwargs) |
d14a1e28 | 5982 | |
e811c8ce | 5983 | def NewControlId(*args, **kwargs): |
15afbcd0 | 5984 | """ |
66c033b4 | 5985 | NewControlId() -> int |
15afbcd0 RD |
5986 | |
5987 | Generate a control id for the controls which were not given one. | |
5988 | """ | |
54f9ee45 | 5989 | return _core_.Window_NewControlId(*args, **kwargs) |
d14a1e28 | 5990 | |
e811c8ce RD |
5991 | NewControlId = staticmethod(NewControlId) |
5992 | def NextControlId(*args, **kwargs): | |
15afbcd0 | 5993 | """ |
66c033b4 | 5994 | NextControlId(int winid) -> int |
15afbcd0 RD |
5995 | |
5996 | Get the id of the control following the one with the given | |
41e2b43e | 5997 | autogenerated) id |
15afbcd0 | 5998 | """ |
54f9ee45 | 5999 | return _core_.Window_NextControlId(*args, **kwargs) |
d14a1e28 | 6000 | |
e811c8ce RD |
6001 | NextControlId = staticmethod(NextControlId) |
6002 | def PrevControlId(*args, **kwargs): | |
15afbcd0 | 6003 | """ |
66c033b4 | 6004 | PrevControlId(int winid) -> int |
15afbcd0 RD |
6005 | |
6006 | Get the id of the control preceding the one with the given | |
41e2b43e | 6007 | autogenerated) id |
15afbcd0 | 6008 | """ |
54f9ee45 | 6009 | return _core_.Window_PrevControlId(*args, **kwargs) |
d14a1e28 | 6010 | |
e811c8ce RD |
6011 | PrevControlId = staticmethod(PrevControlId) |
6012 | def SetSize(*args, **kwargs): | |
15afbcd0 | 6013 | """ |
a95a7133 | 6014 | SetSize(self, Size size) |
15afbcd0 RD |
6015 | |
6016 | Sets the size of the window in pixels. | |
6017 | """ | |
54f9ee45 | 6018 | return _core_.Window_SetSize(*args, **kwargs) |
d14a1e28 | 6019 | |
e811c8ce | 6020 | def SetDimensions(*args, **kwargs): |
15afbcd0 | 6021 | """ |
a95a7133 | 6022 | SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) |
15afbcd0 RD |
6023 | |
6024 | Sets the position and size of the window in pixels. The sizeFlags | |
6025 | parameter indicates the interpretation of the other params if they are | |
6026 | -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default | |
6027 | shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be | |
6028 | used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow | |
6029 | dimensions of -1 and less to be interpreted as real dimensions, not | |
6030 | default values. | |
6031 | """ | |
54f9ee45 | 6032 | return _core_.Window_SetDimensions(*args, **kwargs) |
d14a1e28 | 6033 | |
e811c8ce | 6034 | def SetRect(*args, **kwargs): |
15afbcd0 | 6035 | """ |
a95a7133 | 6036 | SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO) |
15afbcd0 RD |
6037 | |
6038 | Sets the position and size of the window in pixels using a wx.Rect. | |
6039 | """ | |
54f9ee45 | 6040 | return _core_.Window_SetRect(*args, **kwargs) |
d14a1e28 | 6041 | |
e811c8ce | 6042 | def SetSizeWH(*args, **kwargs): |
15afbcd0 | 6043 | """ |
a95a7133 | 6044 | SetSizeWH(self, int width, int height) |
15afbcd0 RD |
6045 | |
6046 | Sets the size of the window in pixels. | |
6047 | """ | |
54f9ee45 | 6048 | return _core_.Window_SetSizeWH(*args, **kwargs) |
d14a1e28 | 6049 | |
e811c8ce | 6050 | def Move(*args, **kwargs): |
15afbcd0 | 6051 | """ |
a95a7133 | 6052 | Move(self, Point pt, int flags=SIZE_USE_EXISTING) |
15afbcd0 RD |
6053 | |
6054 | Moves the window to the given position. | |
6055 | """ | |
54f9ee45 | 6056 | return _core_.Window_Move(*args, **kwargs) |
d14a1e28 | 6057 | |
e811c8ce RD |
6058 | SetPosition = Move |
6059 | def MoveXY(*args, **kwargs): | |
15afbcd0 | 6060 | """ |
a95a7133 | 6061 | MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING) |
15afbcd0 RD |
6062 | |
6063 | Moves the window to the given position. | |
6064 | """ | |
54f9ee45 | 6065 | return _core_.Window_MoveXY(*args, **kwargs) |
e811c8ce | 6066 | |
f8167d6e RD |
6067 | def SetBestFittingSize(*args, **kwargs): |
6068 | """ | |
6069 | SetBestFittingSize(self, Size size=DefaultSize) | |
6070 | ||
6071 | A 'Smart' SetSize that will fill in default size components with the | |
6072 | window's *best size* values. Also set's the minsize for use with sizers. | |
6073 | """ | |
6074 | return _core_.Window_SetBestFittingSize(*args, **kwargs) | |
6075 | ||
e811c8ce | 6076 | def Raise(*args, **kwargs): |
15afbcd0 | 6077 | """ |
a95a7133 | 6078 | Raise(self) |
15afbcd0 RD |
6079 | |
6080 | Raises the window to the top of the window hierarchy if it is a | |
6081 | managed window (dialog or frame). | |
6082 | """ | |
54f9ee45 | 6083 | return _core_.Window_Raise(*args, **kwargs) |
e811c8ce RD |
6084 | |
6085 | def Lower(*args, **kwargs): | |
15afbcd0 | 6086 | """ |
a95a7133 | 6087 | Lower(self) |
15afbcd0 RD |
6088 | |
6089 | Lowers the window to the bottom of the window hierarchy if it is a | |
6090 | managed window (dialog or frame). | |
6091 | """ | |
54f9ee45 | 6092 | return _core_.Window_Lower(*args, **kwargs) |
e811c8ce RD |
6093 | |
6094 | def SetClientSize(*args, **kwargs): | |
15afbcd0 | 6095 | """ |
a95a7133 | 6096 | SetClientSize(self, Size size) |
15afbcd0 RD |
6097 | |
6098 | This sets the size of the window client area in pixels. Using this | |
6099 | function to size a window tends to be more device-independent than | |
6100 | wx.Window.SetSize, since the application need not worry about what | |
6101 | dimensions the border or title bar have when trying to fit the window | |
6102 | around panel items, for example. | |
6103 | """ | |
54f9ee45 | 6104 | return _core_.Window_SetClientSize(*args, **kwargs) |
e811c8ce RD |
6105 | |
6106 | def SetClientSizeWH(*args, **kwargs): | |
15afbcd0 | 6107 | """ |
a95a7133 | 6108 | SetClientSizeWH(self, int width, int height) |
15afbcd0 RD |
6109 | |
6110 | This sets the size of the window client area in pixels. Using this | |
6111 | function to size a window tends to be more device-independent than | |
6112 | wx.Window.SetSize, since the application need not worry about what | |
6113 | dimensions the border or title bar have when trying to fit the window | |
6114 | around panel items, for example. | |
6115 | """ | |
54f9ee45 | 6116 | return _core_.Window_SetClientSizeWH(*args, **kwargs) |
e811c8ce RD |
6117 | |
6118 | def SetClientRect(*args, **kwargs): | |
15afbcd0 | 6119 | """ |
a95a7133 | 6120 | SetClientRect(self, Rect rect) |
15afbcd0 RD |
6121 | |
6122 | This sets the size of the window client area in pixels. Using this | |
6123 | function to size a window tends to be more device-independent than | |
6124 | wx.Window.SetSize, since the application need not worry about what | |
6125 | dimensions the border or title bar have when trying to fit the window | |
6126 | around panel items, for example. | |
6127 | """ | |
54f9ee45 | 6128 | return _core_.Window_SetClientRect(*args, **kwargs) |
e811c8ce RD |
6129 | |
6130 | def GetPosition(*args, **kwargs): | |
0df68c9f | 6131 | """ |
a95a7133 | 6132 | GetPosition(self) -> Point |
e811c8ce | 6133 | |
0df68c9f RD |
6134 | Get the window's position. |
6135 | """ | |
54f9ee45 | 6136 | return _core_.Window_GetPosition(*args, **kwargs) |
e811c8ce RD |
6137 | |
6138 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
6139 | """ |
6140 | GetPositionTuple() -> (x,y) | |
e811c8ce | 6141 | |
0df68c9f RD |
6142 | Get the window's position. |
6143 | """ | |
54f9ee45 | 6144 | return _core_.Window_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
6145 | |
6146 | def GetSize(*args, **kwargs): | |
0df68c9f | 6147 | """ |
a95a7133 | 6148 | GetSize(self) -> Size |
e811c8ce | 6149 | |
0df68c9f RD |
6150 | Get the window size. |
6151 | """ | |
54f9ee45 | 6152 | return _core_.Window_GetSize(*args, **kwargs) |
e811c8ce RD |
6153 | |
6154 | def GetSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6155 | """ |
6156 | GetSizeTuple() -> (width, height) | |
e811c8ce | 6157 | |
0df68c9f RD |
6158 | Get the window size. |
6159 | """ | |
54f9ee45 | 6160 | return _core_.Window_GetSizeTuple(*args, **kwargs) |
e811c8ce RD |
6161 | |
6162 | def GetRect(*args, **kwargs): | |
15afbcd0 | 6163 | """ |
a95a7133 | 6164 | GetRect(self) -> Rect |
15afbcd0 RD |
6165 | |
6166 | Returns the size and position of the window as a wx.Rect object. | |
6167 | """ | |
54f9ee45 | 6168 | return _core_.Window_GetRect(*args, **kwargs) |
e811c8ce RD |
6169 | |
6170 | def GetClientSize(*args, **kwargs): | |
0df68c9f | 6171 | """ |
a95a7133 | 6172 | GetClientSize(self) -> Size |
e811c8ce | 6173 | |
15afbcd0 RD |
6174 | This gets the size of the window's 'client area' in pixels. The client |
6175 | area is the area which may be drawn on by the programmer, excluding | |
6176 | title bar, border, scrollbars, etc. | |
0df68c9f | 6177 | """ |
54f9ee45 | 6178 | return _core_.Window_GetClientSize(*args, **kwargs) |
e811c8ce RD |
6179 | |
6180 | def GetClientSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6181 | """ |
6182 | GetClientSizeTuple() -> (width, height) | |
e811c8ce | 6183 | |
15afbcd0 RD |
6184 | This gets the size of the window's 'client area' in pixels. The client |
6185 | area is the area which may be drawn on by the programmer, excluding | |
6186 | title bar, border, scrollbars, etc. | |
0df68c9f | 6187 | """ |
54f9ee45 | 6188 | return _core_.Window_GetClientSizeTuple(*args, **kwargs) |
e811c8ce RD |
6189 | |
6190 | def GetClientAreaOrigin(*args, **kwargs): | |
15afbcd0 | 6191 | """ |
a95a7133 | 6192 | GetClientAreaOrigin(self) -> Point |
15afbcd0 RD |
6193 | |
6194 | Get the origin of the client area of the window relative to the | |
6195 | window's top left corner (the client area may be shifted because of | |
6196 | the borders, scrollbars, other decorations...) | |
6197 | """ | |
54f9ee45 | 6198 | return _core_.Window_GetClientAreaOrigin(*args, **kwargs) |
e811c8ce RD |
6199 | |
6200 | def GetClientRect(*args, **kwargs): | |
15afbcd0 | 6201 | """ |
a95a7133 | 6202 | GetClientRect(self) -> Rect |
15afbcd0 | 6203 | |
61863841 | 6204 | Get the client area position and size as a `wx.Rect` object. |
15afbcd0 | 6205 | """ |
54f9ee45 | 6206 | return _core_.Window_GetClientRect(*args, **kwargs) |
e811c8ce RD |
6207 | |
6208 | def GetBestSize(*args, **kwargs): | |
0df68c9f | 6209 | """ |
a95a7133 | 6210 | GetBestSize(self) -> Size |
e811c8ce | 6211 | |
248ed943 | 6212 | This function returns the best acceptable minimal size for the |
41e2b43e RD |
6213 | window, if applicable. For example, for a static text control, it will |
6214 | be the minimal size such that the control label is not truncated. For | |
6215 | windows containing subwindows (suzh aswx.Panel), the size returned by | |
6216 | this function will be the same as the size the window would have had | |
6217 | after calling Fit. | |
0df68c9f | 6218 | """ |
54f9ee45 | 6219 | return _core_.Window_GetBestSize(*args, **kwargs) |
e811c8ce RD |
6220 | |
6221 | def GetBestSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6222 | """ |
6223 | GetBestSizeTuple() -> (width, height) | |
e811c8ce | 6224 | |
248ed943 | 6225 | This function returns the best acceptable minimal size for the |
41e2b43e RD |
6226 | window, if applicable. For example, for a static text control, it will |
6227 | be the minimal size such that the control label is not truncated. For | |
6228 | windows containing subwindows (suzh aswx.Panel), the size returned by | |
6229 | this function will be the same as the size the window would have had | |
6230 | after calling Fit. | |
0df68c9f | 6231 | """ |
54f9ee45 | 6232 | return _core_.Window_GetBestSizeTuple(*args, **kwargs) |
e811c8ce | 6233 | |
dfbb5885 RD |
6234 | def InvalidateBestSize(*args, **kwargs): |
6235 | """ | |
6236 | InvalidateBestSize(self) | |
6237 | ||
6238 | Reset the cached best size value so it will be recalculated the next | |
6239 | time it is needed. | |
6240 | """ | |
6241 | return _core_.Window_InvalidateBestSize(*args, **kwargs) | |
6242 | ||
6243 | def GetBestFittingSize(*args, **kwargs): | |
6244 | """ | |
6245 | GetBestFittingSize(self) -> Size | |
6246 | ||
6247 | This function will merge the window's best size into the window's | |
6248 | minimum size, giving priority to the min size components, and returns | |
6249 | the results. | |
6250 | ||
6251 | """ | |
6252 | return _core_.Window_GetBestFittingSize(*args, **kwargs) | |
6253 | ||
e811c8ce | 6254 | def GetAdjustedBestSize(*args, **kwargs): |
15afbcd0 | 6255 | """ |
a95a7133 | 6256 | GetAdjustedBestSize(self) -> Size |
15afbcd0 RD |
6257 | |
6258 | This method is similar to GetBestSize, except in one | |
6259 | thing. GetBestSize should return the minimum untruncated size of the | |
6260 | window, while this method will return the largest of BestSize and any | |
6261 | user specified minimum size. ie. it is the minimum size the window | |
6262 | should currently be drawn at, not the minimal size it can possibly | |
6263 | tolerate. | |
6264 | """ | |
54f9ee45 | 6265 | return _core_.Window_GetAdjustedBestSize(*args, **kwargs) |
e811c8ce RD |
6266 | |
6267 | def Center(*args, **kwargs): | |
15afbcd0 | 6268 | """ |
a95a7133 | 6269 | Center(self, int direction=BOTH) |
15afbcd0 RD |
6270 | |
6271 | Centers the window. The parameter specifies the direction for | |
6272 | cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may | |
6273 | also include wx.CENTER_ON_SCREEN flag if you want to center the window | |
6274 | on the entire screen and not on its parent window. If it is a | |
6275 | top-level window and has no parent then it will always be centered | |
6276 | relative to the screen. | |
6277 | """ | |
54f9ee45 | 6278 | return _core_.Window_Center(*args, **kwargs) |
e811c8ce RD |
6279 | |
6280 | Centre = Center | |
6281 | def CenterOnScreen(*args, **kwargs): | |
15afbcd0 | 6282 | """ |
a95a7133 | 6283 | CenterOnScreen(self, int dir=BOTH) |
15afbcd0 RD |
6284 | |
6285 | Center on screen (only works for top level windows) | |
6286 | """ | |
54f9ee45 | 6287 | return _core_.Window_CenterOnScreen(*args, **kwargs) |
e811c8ce RD |
6288 | |
6289 | CentreOnScreen = CenterOnScreen | |
6290 | def CenterOnParent(*args, **kwargs): | |
15afbcd0 | 6291 | """ |
a95a7133 | 6292 | CenterOnParent(self, int dir=BOTH) |
15afbcd0 RD |
6293 | |
6294 | Center with respect to the the parent window | |
6295 | """ | |
54f9ee45 | 6296 | return _core_.Window_CenterOnParent(*args, **kwargs) |
e811c8ce RD |
6297 | |
6298 | CentreOnParent = CenterOnParent | |
6299 | def Fit(*args, **kwargs): | |
15afbcd0 | 6300 | """ |
a95a7133 | 6301 | Fit(self) |
15afbcd0 RD |
6302 | |
6303 | Sizes the window so that it fits around its subwindows. This function | |
6304 | won't do anything if there are no subwindows and will only really work | |
6305 | correctly if sizers are used for the subwindows layout. Also, if the | |
6306 | window has exactly one subwindow it is better (faster and the result | |
6307 | is more precise as Fit adds some margin to account for fuzziness of | |
6308 | its calculations) to call window.SetClientSize(child.GetSize()) | |
6309 | instead of calling Fit. | |
6310 | """ | |
54f9ee45 | 6311 | return _core_.Window_Fit(*args, **kwargs) |
e811c8ce RD |
6312 | |
6313 | def FitInside(*args, **kwargs): | |
15afbcd0 | 6314 | """ |
a95a7133 | 6315 | FitInside(self) |
15afbcd0 RD |
6316 | |
6317 | Similar to Fit, but sizes the interior (virtual) size of a | |
6318 | window. Mainly useful with scrolled windows to reset scrollbars after | |
6319 | sizing changes that do not trigger a size event, and/or scrolled | |
6320 | windows without an interior sizer. This function similarly won't do | |
6321 | anything if there are no subwindows. | |
6322 | """ | |
54f9ee45 | 6323 | return _core_.Window_FitInside(*args, **kwargs) |
e811c8ce | 6324 | |
f16ab95d | 6325 | def SetSizeHints(*args, **kwargs): |
0df68c9f | 6326 | """ |
a95a7133 | 6327 | SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, |
0df68c9f | 6328 | int incH=-1) |
15afbcd0 RD |
6329 | |
6330 | Allows specification of minimum and maximum window sizes, and window | |
6331 | size increments. If a pair of values is not set (or set to -1), the | |
6332 | default values will be used. If this function is called, the user | |
908b74cd RD |
6333 | will not be able to size the window outside the given bounds (if it is |
6334 | a top-level window.) Sizers will also inspect the minimum window size | |
6335 | and will use that value if set when calculating layout. | |
6336 | ||
6337 | The resizing increments are only significant under Motif or Xt. | |
0df68c9f | 6338 | """ |
f16ab95d | 6339 | return _core_.Window_SetSizeHints(*args, **kwargs) |
e811c8ce | 6340 | |
f16ab95d RD |
6341 | def SetSizeHintsSz(*args, **kwargs): |
6342 | """ | |
6343 | SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) | |
6344 | ||
6345 | Allows specification of minimum and maximum window sizes, and window | |
6346 | size increments. If a pair of values is not set (or set to -1), the | |
6347 | default values will be used. If this function is called, the user | |
6348 | will not be able to size the window outside the given bounds (if it is | |
6349 | a top-level window.) Sizers will also inspect the minimum window size | |
6350 | and will use that value if set when calculating layout. | |
6351 | ||
6352 | The resizing increments are only significant under Motif or Xt. | |
6353 | """ | |
6354 | return _core_.Window_SetSizeHintsSz(*args, **kwargs) | |
6355 | ||
6356 | def SetVirtualSizeHints(*args, **kwargs): | |
15afbcd0 | 6357 | """ |
908b74cd | 6358 | SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) |
15afbcd0 RD |
6359 | |
6360 | Allows specification of minimum and maximum virtual window sizes. If a | |
6361 | pair of values is not set (or set to -1), the default values will be | |
6362 | used. If this function is called, the user will not be able to size | |
6363 | the virtual area of the window outside the given bounds. | |
6364 | """ | |
f16ab95d RD |
6365 | return _core_.Window_SetVirtualSizeHints(*args, **kwargs) |
6366 | ||
6367 | def SetVirtualSizeHintsSz(*args, **kwargs): | |
6368 | """ | |
6369 | SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) | |
6370 | ||
6371 | Allows specification of minimum and maximum virtual window sizes. If a | |
6372 | pair of values is not set (or set to -1), the default values will be | |
6373 | used. If this function is called, the user will not be able to size | |
6374 | the virtual area of the window outside the given bounds. | |
6375 | """ | |
6376 | return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs) | |
e811c8ce | 6377 | |
908b74cd RD |
6378 | def GetMaxSize(*args, **kwargs): |
6379 | """GetMaxSize(self) -> Size""" | |
6380 | return _core_.Window_GetMaxSize(*args, **kwargs) | |
6381 | ||
6382 | def GetMinSize(*args, **kwargs): | |
6383 | """GetMinSize(self) -> Size""" | |
6384 | return _core_.Window_GetMinSize(*args, **kwargs) | |
6385 | ||
6386 | def SetMinSize(*args, **kwargs): | |
6387 | """ | |
6388 | SetMinSize(self, Size minSize) | |
6389 | ||
6390 | A more convenient method than `SetSizeHints` for setting just the | |
6391 | min size. | |
6392 | """ | |
6393 | return _core_.Window_SetMinSize(*args, **kwargs) | |
6394 | ||
6395 | def SetMaxSize(*args, **kwargs): | |
6396 | """ | |
6397 | SetMaxSize(self, Size maxSize) | |
6398 | ||
6399 | A more convenient method than `SetSizeHints` for setting just the | |
6400 | max size. | |
6401 | """ | |
6402 | return _core_.Window_SetMaxSize(*args, **kwargs) | |
6403 | ||
e811c8ce | 6404 | def GetMinWidth(*args, **kwargs): |
a95a7133 | 6405 | """GetMinWidth(self) -> int""" |
54f9ee45 | 6406 | return _core_.Window_GetMinWidth(*args, **kwargs) |
e811c8ce RD |
6407 | |
6408 | def GetMinHeight(*args, **kwargs): | |
a95a7133 | 6409 | """GetMinHeight(self) -> int""" |
54f9ee45 | 6410 | return _core_.Window_GetMinHeight(*args, **kwargs) |
e811c8ce RD |
6411 | |
6412 | def GetMaxWidth(*args, **kwargs): | |
a95a7133 | 6413 | """GetMaxWidth(self) -> int""" |
54f9ee45 | 6414 | return _core_.Window_GetMaxWidth(*args, **kwargs) |
e811c8ce RD |
6415 | |
6416 | def GetMaxHeight(*args, **kwargs): | |
a95a7133 | 6417 | """GetMaxHeight(self) -> int""" |
54f9ee45 | 6418 | return _core_.Window_GetMaxHeight(*args, **kwargs) |
e811c8ce | 6419 | |
e811c8ce | 6420 | def SetVirtualSize(*args, **kwargs): |
0df68c9f | 6421 | """ |
a95a7133 | 6422 | SetVirtualSize(self, Size size) |
e811c8ce | 6423 | |
15afbcd0 RD |
6424 | Set the the virtual size of a window in pixels. For most windows this |
6425 | is just the client area of the window, but for some like scrolled | |
6426 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6427 | """ |
54f9ee45 | 6428 | return _core_.Window_SetVirtualSize(*args, **kwargs) |
e811c8ce RD |
6429 | |
6430 | def SetVirtualSizeWH(*args, **kwargs): | |
0df68c9f | 6431 | """ |
a95a7133 | 6432 | SetVirtualSizeWH(self, int w, int h) |
e811c8ce | 6433 | |
15afbcd0 RD |
6434 | Set the the virtual size of a window in pixels. For most windows this |
6435 | is just the client area of the window, but for some like scrolled | |
6436 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6437 | """ |
54f9ee45 | 6438 | return _core_.Window_SetVirtualSizeWH(*args, **kwargs) |
e811c8ce RD |
6439 | |
6440 | def GetVirtualSize(*args, **kwargs): | |
0df68c9f | 6441 | """ |
a95a7133 | 6442 | GetVirtualSize(self) -> Size |
e811c8ce | 6443 | |
15afbcd0 RD |
6444 | Get the the virtual size of the window in pixels. For most windows |
6445 | this is just the client area of the window, but for some like scrolled | |
6446 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6447 | """ |
54f9ee45 | 6448 | return _core_.Window_GetVirtualSize(*args, **kwargs) |
e811c8ce RD |
6449 | |
6450 | def GetVirtualSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6451 | """ |
6452 | GetVirtualSizeTuple() -> (width, height) | |
e811c8ce | 6453 | |
15afbcd0 RD |
6454 | Get the the virtual size of the window in pixels. For most windows |
6455 | this is just the client area of the window, but for some like scrolled | |
6456 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6457 | """ |
54f9ee45 | 6458 | return _core_.Window_GetVirtualSizeTuple(*args, **kwargs) |
e811c8ce RD |
6459 | |
6460 | def GetBestVirtualSize(*args, **kwargs): | |
15afbcd0 | 6461 | """ |
a95a7133 | 6462 | GetBestVirtualSize(self) -> Size |
15afbcd0 RD |
6463 | |
6464 | Return the largest of ClientSize and BestSize (as determined by a | |
6465 | sizer, interior children, or other means) | |
6466 | """ | |
54f9ee45 | 6467 | return _core_.Window_GetBestVirtualSize(*args, **kwargs) |
e811c8ce RD |
6468 | |
6469 | def Show(*args, **kwargs): | |
15afbcd0 | 6470 | """ |
a95a7133 | 6471 | Show(self, bool show=True) -> bool |
15afbcd0 RD |
6472 | |
6473 | Shows or hides the window. You may need to call Raise for a top level | |
6474 | window if you want to bring it to top, although this is not needed if | |
6475 | Show is called immediately after the frame creation. Returns True if | |
6476 | the window has been shown or hidden or False if nothing was done | |
6477 | because it already was in the requested state. | |
6478 | """ | |
54f9ee45 | 6479 | return _core_.Window_Show(*args, **kwargs) |
e811c8ce RD |
6480 | |
6481 | def Hide(*args, **kwargs): | |
15afbcd0 | 6482 | """ |
a95a7133 | 6483 | Hide(self) -> bool |
15afbcd0 RD |
6484 | |
6485 | Equivalent to calling Show(False). | |
6486 | """ | |
54f9ee45 | 6487 | return _core_.Window_Hide(*args, **kwargs) |
e811c8ce RD |
6488 | |
6489 | def Enable(*args, **kwargs): | |
15afbcd0 | 6490 | """ |
a95a7133 | 6491 | Enable(self, bool enable=True) -> bool |
15afbcd0 RD |
6492 | |
6493 | Enable or disable the window for user input. Note that when a parent | |
6494 | window is disabled, all of its children are disabled as well and they | |
6495 | are reenabled again when the parent is. Returns true if the window | |
6496 | has been enabled or disabled, false if nothing was done, i.e. if the | |
6497 | window had already been in the specified state. | |
6498 | """ | |
54f9ee45 | 6499 | return _core_.Window_Enable(*args, **kwargs) |
e811c8ce RD |
6500 | |
6501 | def Disable(*args, **kwargs): | |
15afbcd0 | 6502 | """ |
a95a7133 | 6503 | Disable(self) -> bool |
15afbcd0 RD |
6504 | |
6505 | Disables the window, same as Enable(false). | |
6506 | """ | |
54f9ee45 | 6507 | return _core_.Window_Disable(*args, **kwargs) |
e811c8ce RD |
6508 | |
6509 | def IsShown(*args, **kwargs): | |
15afbcd0 | 6510 | """ |
a95a7133 | 6511 | IsShown(self) -> bool |
15afbcd0 RD |
6512 | |
6513 | Returns true if the window is shown, false if it has been hidden. | |
6514 | """ | |
54f9ee45 | 6515 | return _core_.Window_IsShown(*args, **kwargs) |
e811c8ce RD |
6516 | |
6517 | def IsEnabled(*args, **kwargs): | |
15afbcd0 | 6518 | """ |
a95a7133 | 6519 | IsEnabled(self) -> bool |
15afbcd0 RD |
6520 | |
6521 | Returns true if the window is enabled for input, false otherwise. | |
6522 | """ | |
54f9ee45 | 6523 | return _core_.Window_IsEnabled(*args, **kwargs) |
e811c8ce RD |
6524 | |
6525 | def SetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 | 6526 | """ |
a95a7133 | 6527 | SetWindowStyleFlag(self, long style) |
15afbcd0 | 6528 | |
41e2b43e RD |
6529 | Sets the style of the window. Please note that some styles cannot be |
6530 | changed after the window creation and that Refresh() might need to be | |
6531 | called after changing the others for the change to take place | |
6532 | immediately. | |
15afbcd0 | 6533 | """ |
54f9ee45 | 6534 | return _core_.Window_SetWindowStyleFlag(*args, **kwargs) |
e811c8ce RD |
6535 | |
6536 | def GetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 | 6537 | """ |
a95a7133 | 6538 | GetWindowStyleFlag(self) -> long |
e811c8ce | 6539 | |
15afbcd0 RD |
6540 | Gets the window style that was passed to the constructor or Create |
6541 | method. | |
6542 | """ | |
54f9ee45 | 6543 | return _core_.Window_GetWindowStyleFlag(*args, **kwargs) |
e811c8ce | 6544 | |
15afbcd0 | 6545 | SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag |
e811c8ce | 6546 | def HasFlag(*args, **kwargs): |
15afbcd0 | 6547 | """ |
a95a7133 | 6548 | HasFlag(self, int flag) -> bool |
15afbcd0 RD |
6549 | |
6550 | Test if the given style is set for this window. | |
6551 | """ | |
54f9ee45 | 6552 | return _core_.Window_HasFlag(*args, **kwargs) |
e811c8ce RD |
6553 | |
6554 | def IsRetained(*args, **kwargs): | |
15afbcd0 | 6555 | """ |
a95a7133 | 6556 | IsRetained(self) -> bool |
15afbcd0 RD |
6557 | |
6558 | Returns true if the window is retained, false otherwise. Retained | |
6559 | windows are only available on X platforms. | |
6560 | """ | |
54f9ee45 | 6561 | return _core_.Window_IsRetained(*args, **kwargs) |
e811c8ce RD |
6562 | |
6563 | def SetExtraStyle(*args, **kwargs): | |
15afbcd0 | 6564 | """ |
a95a7133 | 6565 | SetExtraStyle(self, long exStyle) |
15afbcd0 RD |
6566 | |
6567 | Sets the extra style bits for the window. Extra styles are the less | |
6568 | often used style bits which can't be set with the constructor or with | |
6569 | SetWindowStyleFlag() | |
6570 | """ | |
54f9ee45 | 6571 | return _core_.Window_SetExtraStyle(*args, **kwargs) |
e811c8ce RD |
6572 | |
6573 | def GetExtraStyle(*args, **kwargs): | |
15afbcd0 | 6574 | """ |
a95a7133 | 6575 | GetExtraStyle(self) -> long |
15afbcd0 RD |
6576 | |
6577 | Returns the extra style bits for the window. | |
6578 | """ | |
54f9ee45 | 6579 | return _core_.Window_GetExtraStyle(*args, **kwargs) |
e811c8ce RD |
6580 | |
6581 | def MakeModal(*args, **kwargs): | |
15afbcd0 | 6582 | """ |
a95a7133 | 6583 | MakeModal(self, bool modal=True) |
15afbcd0 RD |
6584 | |
6585 | Disables all other windows in the application so that the user can | |
6586 | only interact with this window. Passing False will reverse this | |
6587 | effect. | |
6588 | """ | |
54f9ee45 | 6589 | return _core_.Window_MakeModal(*args, **kwargs) |
e811c8ce RD |
6590 | |
6591 | def SetThemeEnabled(*args, **kwargs): | |
15afbcd0 | 6592 | """ |
a95a7133 | 6593 | SetThemeEnabled(self, bool enableTheme) |
15afbcd0 RD |
6594 | |
6595 | This function tells a window if it should use the system's "theme" | |
6596 | code to draw the windows' background instead if its own background | |
6597 | drawing code. This will only have an effect on platforms that support | |
6598 | the notion of themes in user defined windows. One such platform is | |
6599 | GTK+ where windows can have (very colourful) backgrounds defined by a | |
6600 | user's selected theme. | |
6601 | ||
6602 | Dialogs, notebook pages and the status bar have this flag set to true | |
6603 | by default so that the default look and feel is simulated best. | |
6604 | """ | |
54f9ee45 | 6605 | return _core_.Window_SetThemeEnabled(*args, **kwargs) |
e811c8ce RD |
6606 | |
6607 | def GetThemeEnabled(*args, **kwargs): | |
15afbcd0 | 6608 | """ |
a95a7133 | 6609 | GetThemeEnabled(self) -> bool |
e811c8ce | 6610 | |
15afbcd0 RD |
6611 | Return the themeEnabled flag. |
6612 | """ | |
54f9ee45 | 6613 | return _core_.Window_GetThemeEnabled(*args, **kwargs) |
e811c8ce RD |
6614 | |
6615 | def SetFocus(*args, **kwargs): | |
15afbcd0 | 6616 | """ |
a95a7133 | 6617 | SetFocus(self) |
15afbcd0 RD |
6618 | |
6619 | Set's the focus to this window, allowing it to receive keyboard input. | |
6620 | """ | |
54f9ee45 | 6621 | return _core_.Window_SetFocus(*args, **kwargs) |
e811c8ce RD |
6622 | |
6623 | def SetFocusFromKbd(*args, **kwargs): | |
15afbcd0 | 6624 | """ |
a95a7133 | 6625 | SetFocusFromKbd(self) |
15afbcd0 RD |
6626 | |
6627 | Set focus to this window as the result of a keyboard action. Normally | |
6628 | only called internally. | |
6629 | """ | |
54f9ee45 | 6630 | return _core_.Window_SetFocusFromKbd(*args, **kwargs) |
e811c8ce RD |
6631 | |
6632 | def FindFocus(*args, **kwargs): | |
15afbcd0 | 6633 | """ |
66c033b4 | 6634 | FindFocus() -> Window |
15afbcd0 RD |
6635 | |
6636 | Returns the window or control that currently has the keyboard focus, | |
6637 | or None. | |
6638 | """ | |
54f9ee45 | 6639 | return _core_.Window_FindFocus(*args, **kwargs) |
e811c8ce RD |
6640 | |
6641 | FindFocus = staticmethod(FindFocus) | |
6642 | def AcceptsFocus(*args, **kwargs): | |
15afbcd0 | 6643 | """ |
a95a7133 | 6644 | AcceptsFocus(self) -> bool |
15afbcd0 RD |
6645 | |
6646 | Can this window have focus? | |
6647 | """ | |
54f9ee45 | 6648 | return _core_.Window_AcceptsFocus(*args, **kwargs) |
e811c8ce RD |
6649 | |
6650 | def AcceptsFocusFromKeyboard(*args, **kwargs): | |
15afbcd0 | 6651 | """ |
a95a7133 | 6652 | AcceptsFocusFromKeyboard(self) -> bool |
15afbcd0 RD |
6653 | |
6654 | Can this window be given focus by keyboard navigation? if not, the | |
6655 | only way to give it focus (provided it accepts it at all) is to click | |
6656 | it. | |
6657 | """ | |
54f9ee45 | 6658 | return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs) |
e811c8ce RD |
6659 | |
6660 | def GetDefaultItem(*args, **kwargs): | |
15afbcd0 | 6661 | """ |
a95a7133 | 6662 | GetDefaultItem(self) -> Window |
15afbcd0 RD |
6663 | |
6664 | Get the default child of this parent, i.e. the one which is activated | |
6665 | by pressing <Enter> such as the OK button on a wx.Dialog. | |
6666 | """ | |
54f9ee45 | 6667 | return _core_.Window_GetDefaultItem(*args, **kwargs) |
e811c8ce RD |
6668 | |
6669 | def SetDefaultItem(*args, **kwargs): | |
15afbcd0 | 6670 | """ |
a95a7133 | 6671 | SetDefaultItem(self, Window child) -> Window |
15afbcd0 RD |
6672 | |
6673 | Set this child as default, return the old default. | |
6674 | """ | |
54f9ee45 | 6675 | return _core_.Window_SetDefaultItem(*args, **kwargs) |
e811c8ce RD |
6676 | |
6677 | def SetTmpDefaultItem(*args, **kwargs): | |
15afbcd0 | 6678 | """ |
a95a7133 | 6679 | SetTmpDefaultItem(self, Window win) |
15afbcd0 RD |
6680 | |
6681 | Set this child as temporary default | |
6682 | """ | |
54f9ee45 | 6683 | return _core_.Window_SetTmpDefaultItem(*args, **kwargs) |
e811c8ce | 6684 | |
908b74cd RD |
6685 | def Navigate(*args, **kwargs): |
6686 | """ | |
6687 | Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool | |
6688 | ||
fd2dc343 RD |
6689 | Does keyboard navigation from this window to another, by sending a |
6690 | `wx.NavigationKeyEvent`. | |
908b74cd RD |
6691 | """ |
6692 | return _core_.Window_Navigate(*args, **kwargs) | |
6693 | ||
7f98d120 RD |
6694 | def MoveAfterInTabOrder(*args, **kwargs): |
6695 | """ | |
6696 | MoveAfterInTabOrder(self, Window win) | |
6697 | ||
6698 | Moves this window in the tab navigation order after the specified | |
6699 | sibling window. This means that when the user presses the TAB key on | |
6700 | that other window, the focus switches to this window. | |
6701 | ||
6702 | The default tab order is the same as creation order. This function | |
6703 | and `MoveBeforeInTabOrder` allow to change it after creating all the | |
6704 | windows. | |
6705 | ||
6706 | """ | |
6707 | return _core_.Window_MoveAfterInTabOrder(*args, **kwargs) | |
6708 | ||
6709 | def MoveBeforeInTabOrder(*args, **kwargs): | |
6710 | """ | |
6711 | MoveBeforeInTabOrder(self, Window win) | |
6712 | ||
6713 | Same as `MoveAfterInTabOrder` except that it inserts this window just | |
6714 | before win instead of putting it right after it. | |
6715 | """ | |
6716 | return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs) | |
6717 | ||
e811c8ce | 6718 | def GetChildren(*args, **kwargs): |
15afbcd0 | 6719 | """ |
a95a7133 | 6720 | GetChildren(self) -> PyObject |
15afbcd0 RD |
6721 | |
6722 | Returns a list of the window's children. NOTE: Currently this is a | |
6723 | copy of the child window list maintained by the window, so the return | |
6724 | value of this function is only valid as long as the window's children | |
6725 | do not change. | |
6726 | """ | |
54f9ee45 | 6727 | return _core_.Window_GetChildren(*args, **kwargs) |
e811c8ce RD |
6728 | |
6729 | def GetParent(*args, **kwargs): | |
15afbcd0 | 6730 | """ |
a95a7133 | 6731 | GetParent(self) -> Window |
15afbcd0 RD |
6732 | |
6733 | Returns the parent window of this window, or None if there isn't one. | |
6734 | """ | |
54f9ee45 | 6735 | return _core_.Window_GetParent(*args, **kwargs) |
e811c8ce RD |
6736 | |
6737 | def GetGrandParent(*args, **kwargs): | |
15afbcd0 | 6738 | """ |
a95a7133 | 6739 | GetGrandParent(self) -> Window |
15afbcd0 | 6740 | |
41e2b43e RD |
6741 | Returns the parent of the parent of this window, or None if there |
6742 | isn't one. | |
15afbcd0 | 6743 | """ |
54f9ee45 | 6744 | return _core_.Window_GetGrandParent(*args, **kwargs) |
e811c8ce RD |
6745 | |
6746 | def IsTopLevel(*args, **kwargs): | |
15afbcd0 | 6747 | """ |
a95a7133 | 6748 | IsTopLevel(self) -> bool |
15afbcd0 RD |
6749 | |
6750 | Returns true if the given window is a top-level one. Currently all | |
6751 | frames and dialogs are always considered to be top-level windows (even | |
6752 | if they have a parent window). | |
6753 | """ | |
54f9ee45 | 6754 | return _core_.Window_IsTopLevel(*args, **kwargs) |
e811c8ce RD |
6755 | |
6756 | def Reparent(*args, **kwargs): | |
15afbcd0 | 6757 | """ |
a95a7133 | 6758 | Reparent(self, Window newParent) -> bool |
15afbcd0 RD |
6759 | |
6760 | Reparents the window, i.e the window will be removed from its current | |
6761 | parent window (e.g. a non-standard toolbar in a wxFrame) and then | |
6762 | re-inserted into another. Available on Windows and GTK. Returns True | |
6763 | if the parent was changed, False otherwise (error or newParent == | |
6764 | oldParent) | |
6765 | """ | |
54f9ee45 | 6766 | return _core_.Window_Reparent(*args, **kwargs) |
e811c8ce RD |
6767 | |
6768 | def AddChild(*args, **kwargs): | |
15afbcd0 | 6769 | """ |
a95a7133 | 6770 | AddChild(self, Window child) |
15afbcd0 RD |
6771 | |
6772 | Adds a child window. This is called automatically by window creation | |
6773 | functions so should not be required by the application programmer. | |
6774 | """ | |
54f9ee45 | 6775 | return _core_.Window_AddChild(*args, **kwargs) |
e811c8ce RD |
6776 | |
6777 | def RemoveChild(*args, **kwargs): | |
15afbcd0 | 6778 | """ |
a95a7133 | 6779 | RemoveChild(self, Window child) |
15afbcd0 RD |
6780 | |
6781 | Removes a child window. This is called automatically by window | |
6782 | deletion functions so should not be required by the application | |
6783 | programmer. | |
6784 | """ | |
54f9ee45 | 6785 | return _core_.Window_RemoveChild(*args, **kwargs) |
e811c8ce RD |
6786 | |
6787 | def FindWindowById(*args, **kwargs): | |
15afbcd0 | 6788 | """ |
a95a7133 | 6789 | FindWindowById(self, long winid) -> Window |
15afbcd0 RD |
6790 | |
6791 | Find a chld of this window by window ID | |
6792 | """ | |
54f9ee45 | 6793 | return _core_.Window_FindWindowById(*args, **kwargs) |
e811c8ce RD |
6794 | |
6795 | def FindWindowByName(*args, **kwargs): | |
15afbcd0 | 6796 | """ |
a95a7133 | 6797 | FindWindowByName(self, String name) -> Window |
15afbcd0 RD |
6798 | |
6799 | Find a child of this window by name | |
6800 | """ | |
54f9ee45 | 6801 | return _core_.Window_FindWindowByName(*args, **kwargs) |
e811c8ce RD |
6802 | |
6803 | def GetEventHandler(*args, **kwargs): | |
15afbcd0 | 6804 | """ |
a95a7133 | 6805 | GetEventHandler(self) -> EvtHandler |
15afbcd0 RD |
6806 | |
6807 | Returns the event handler for this window. By default, the window is | |
6808 | its own event handler. | |
6809 | """ | |
54f9ee45 | 6810 | return _core_.Window_GetEventHandler(*args, **kwargs) |
e811c8ce RD |
6811 | |
6812 | def SetEventHandler(*args, **kwargs): | |
15afbcd0 | 6813 | """ |
a95a7133 | 6814 | SetEventHandler(self, EvtHandler handler) |
15afbcd0 RD |
6815 | |
6816 | Sets the event handler for this window. An event handler is an object | |
6817 | that is capable of processing the events sent to a window. By default, | |
6818 | the window is its own event handler, but an application may wish to | |
6819 | substitute another, for example to allow central implementation of | |
6820 | event-handling for a variety of different window classes. | |
6821 | ||
41e2b43e | 6822 | It is usually better to use `wx.Window.PushEventHandler` since this sets |
15afbcd0 RD |
6823 | up a chain of event handlers, where an event not handled by one event |
6824 | handler is handed to the next one in the chain. | |
6825 | """ | |
54f9ee45 | 6826 | return _core_.Window_SetEventHandler(*args, **kwargs) |
e811c8ce RD |
6827 | |
6828 | def PushEventHandler(*args, **kwargs): | |
15afbcd0 | 6829 | """ |
a95a7133 | 6830 | PushEventHandler(self, EvtHandler handler) |
15afbcd0 RD |
6831 | |
6832 | Pushes this event handler onto the event handler stack for the window. | |
6833 | An event handler is an object that is capable of processing the events | |
6834 | sent to a window. By default, the window is its own event handler, but | |
6835 | an application may wish to substitute another, for example to allow | |
6836 | central implementation of event-handling for a variety of different | |
6837 | window classes. | |
6838 | ||
6839 | wx.Window.PushEventHandler allows an application to set up a chain of | |
6840 | event handlers, where an event not handled by one event handler is | |
41e2b43e | 6841 | handed to the next one in the chain. Use `wx.Window.PopEventHandler` to |
15afbcd0 RD |
6842 | remove the event handler. |
6843 | """ | |
54f9ee45 | 6844 | return _core_.Window_PushEventHandler(*args, **kwargs) |
e811c8ce RD |
6845 | |
6846 | def PopEventHandler(*args, **kwargs): | |
15afbcd0 | 6847 | """ |
a95a7133 | 6848 | PopEventHandler(self, bool deleteHandler=False) -> EvtHandler |
15afbcd0 RD |
6849 | |
6850 | Removes and returns the top-most event handler on the event handler | |
6851 | stack. If deleteHandler is True then the wx.EvtHandler object will be | |
6852 | destroyed after it is popped. | |
6853 | """ | |
54f9ee45 | 6854 | return _core_.Window_PopEventHandler(*args, **kwargs) |
e811c8ce RD |
6855 | |
6856 | def RemoveEventHandler(*args, **kwargs): | |
15afbcd0 | 6857 | """ |
a95a7133 | 6858 | RemoveEventHandler(self, EvtHandler handler) -> bool |
15afbcd0 | 6859 | |
41e2b43e RD |
6860 | Find the given handler in the event handler chain and remove (but not |
6861 | delete) it from the event handler chain, return True if it was found | |
6862 | and False otherwise (this also results in an assert failure so this | |
6863 | function should only be called when the handler is supposed to be | |
6864 | there.) | |
15afbcd0 | 6865 | """ |
54f9ee45 | 6866 | return _core_.Window_RemoveEventHandler(*args, **kwargs) |
e811c8ce RD |
6867 | |
6868 | def SetValidator(*args, **kwargs): | |
15afbcd0 | 6869 | """ |
a95a7133 | 6870 | SetValidator(self, Validator validator) |
15afbcd0 RD |
6871 | |
6872 | Deletes the current validator (if any) and sets the window validator, | |
6873 | having called wx.Validator.Clone to create a new validator of this | |
6874 | type. | |
6875 | """ | |
54f9ee45 | 6876 | return _core_.Window_SetValidator(*args, **kwargs) |
e811c8ce RD |
6877 | |
6878 | def GetValidator(*args, **kwargs): | |
15afbcd0 | 6879 | """ |
a95a7133 | 6880 | GetValidator(self) -> Validator |
15afbcd0 RD |
6881 | |
6882 | Returns a pointer to the current validator for the window, or None if | |
6883 | there is none. | |
6884 | """ | |
54f9ee45 | 6885 | return _core_.Window_GetValidator(*args, **kwargs) |
e811c8ce | 6886 | |
74a57fcd RD |
6887 | def Validate(*args, **kwargs): |
6888 | """ | |
a95a7133 | 6889 | Validate(self) -> bool |
74a57fcd RD |
6890 | |
6891 | Validates the current values of the child controls using their | |
41e2b43e RD |
6892 | validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra |
6893 | style flag set, the method will also call Validate() of all child | |
6894 | windows. Returns false if any of the validations failed. | |
74a57fcd | 6895 | """ |
54f9ee45 | 6896 | return _core_.Window_Validate(*args, **kwargs) |
74a57fcd RD |
6897 | |
6898 | def TransferDataToWindow(*args, **kwargs): | |
6899 | """ | |
a95a7133 | 6900 | TransferDataToWindow(self) -> bool |
74a57fcd | 6901 | |
41e2b43e RD |
6902 | Transfers values to child controls from data areas specified by their |
6903 | validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra | |
6904 | style flag set, the method will also call TransferDataToWindow() of | |
6905 | all child windows. | |
74a57fcd | 6906 | """ |
54f9ee45 | 6907 | return _core_.Window_TransferDataToWindow(*args, **kwargs) |
74a57fcd RD |
6908 | |
6909 | def TransferDataFromWindow(*args, **kwargs): | |
6910 | """ | |
a95a7133 | 6911 | TransferDataFromWindow(self) -> bool |
74a57fcd | 6912 | |
41e2b43e RD |
6913 | Transfers values from child controls to data areas specified by their |
6914 | validators. Returns false if a transfer failed. If the window has | |
6915 | wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will | |
6916 | also call TransferDataFromWindow() of all child windows. | |
74a57fcd | 6917 | """ |
54f9ee45 | 6918 | return _core_.Window_TransferDataFromWindow(*args, **kwargs) |
74a57fcd RD |
6919 | |
6920 | def InitDialog(*args, **kwargs): | |
6921 | """ | |
a95a7133 | 6922 | InitDialog(self) |
74a57fcd | 6923 | |
41e2b43e RD |
6924 | Sends an EVT_INIT_DIALOG event, whose handler usually transfers data |
6925 | to the dialog via validators. | |
74a57fcd | 6926 | """ |
54f9ee45 | 6927 | return _core_.Window_InitDialog(*args, **kwargs) |
74a57fcd | 6928 | |
e811c8ce | 6929 | def SetAcceleratorTable(*args, **kwargs): |
15afbcd0 | 6930 | """ |
a95a7133 | 6931 | SetAcceleratorTable(self, AcceleratorTable accel) |
15afbcd0 RD |
6932 | |
6933 | Sets the accelerator table for this window. | |
6934 | """ | |
54f9ee45 | 6935 | return _core_.Window_SetAcceleratorTable(*args, **kwargs) |
e811c8ce RD |
6936 | |
6937 | def GetAcceleratorTable(*args, **kwargs): | |
15afbcd0 | 6938 | """ |
a95a7133 | 6939 | GetAcceleratorTable(self) -> AcceleratorTable |
15afbcd0 RD |
6940 | |
6941 | Gets the accelerator table for this window. | |
6942 | """ | |
54f9ee45 | 6943 | return _core_.Window_GetAcceleratorTable(*args, **kwargs) |
e811c8ce RD |
6944 | |
6945 | def RegisterHotKey(*args, **kwargs): | |
15afbcd0 | 6946 | """ |
a95a7133 | 6947 | RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool |
15afbcd0 RD |
6948 | |
6949 | Registers a system wide hotkey. Every time the user presses the hotkey | |
6950 | registered here, this window will receive a hotkey event. It will | |
6951 | receive the event even if the application is in the background and | |
6952 | does not have the input focus because the user is working with some | |
6953 | other application. To bind an event handler function to this hotkey | |
6954 | use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the | |
6955 | hotkey was registered successfully. | |
6956 | """ | |
54f9ee45 | 6957 | return _core_.Window_RegisterHotKey(*args, **kwargs) |
e811c8ce RD |
6958 | |
6959 | def UnregisterHotKey(*args, **kwargs): | |
15afbcd0 | 6960 | """ |
a95a7133 | 6961 | UnregisterHotKey(self, int hotkeyId) -> bool |
15afbcd0 RD |
6962 | |
6963 | Unregisters a system wide hotkey. | |
6964 | """ | |
54f9ee45 | 6965 | return _core_.Window_UnregisterHotKey(*args, **kwargs) |
e811c8ce RD |
6966 | |
6967 | def ConvertDialogPointToPixels(*args, **kwargs): | |
15afbcd0 | 6968 | """ |
a95a7133 | 6969 | ConvertDialogPointToPixels(self, Point pt) -> Point |
15afbcd0 RD |
6970 | |
6971 | Converts a point or size from dialog units to pixels. Dialog units | |
6972 | are used for maintaining a dialog's proportions even if the font | |
6973 | changes. For the x dimension, the dialog units are multiplied by the | |
6974 | average character width and then divided by 4. For the y dimension, | |
6975 | the dialog units are multiplied by the average character height and | |
6976 | then divided by 8. | |
6977 | """ | |
54f9ee45 | 6978 | return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs) |
e811c8ce RD |
6979 | |
6980 | def ConvertDialogSizeToPixels(*args, **kwargs): | |
15afbcd0 | 6981 | """ |
a95a7133 | 6982 | ConvertDialogSizeToPixels(self, Size sz) -> Size |
15afbcd0 RD |
6983 | |
6984 | Converts a point or size from dialog units to pixels. Dialog units | |
6985 | are used for maintaining a dialog's proportions even if the font | |
6986 | changes. For the x dimension, the dialog units are multiplied by the | |
6987 | average character width and then divided by 4. For the y dimension, | |
6988 | the dialog units are multiplied by the average character height and | |
6989 | then divided by 8. | |
6990 | """ | |
54f9ee45 | 6991 | return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs) |
e811c8ce RD |
6992 | |
6993 | def DLG_PNT(*args, **kwargs): | |
15afbcd0 | 6994 | """ |
a95a7133 | 6995 | DLG_PNT(self, Point pt) -> Point |
15afbcd0 RD |
6996 | |
6997 | Converts a point or size from dialog units to pixels. Dialog units | |
6998 | are used for maintaining a dialog's proportions even if the font | |
6999 | changes. For the x dimension, the dialog units are multiplied by the | |
7000 | average character width and then divided by 4. For the y dimension, | |
7001 | the dialog units are multiplied by the average character height and | |
7002 | then divided by 8. | |
7003 | """ | |
54f9ee45 | 7004 | return _core_.Window_DLG_PNT(*args, **kwargs) |
e811c8ce RD |
7005 | |
7006 | def DLG_SZE(*args, **kwargs): | |
15afbcd0 | 7007 | """ |
a95a7133 | 7008 | DLG_SZE(self, Size sz) -> Size |
15afbcd0 RD |
7009 | |
7010 | Converts a point or size from dialog units to pixels. Dialog units | |
7011 | are used for maintaining a dialog's proportions even if the font | |
7012 | changes. For the x dimension, the dialog units are multiplied by the | |
7013 | average character width and then divided by 4. For the y dimension, | |
7014 | the dialog units are multiplied by the average character height and | |
7015 | then divided by 8. | |
7016 | """ | |
54f9ee45 | 7017 | return _core_.Window_DLG_SZE(*args, **kwargs) |
e811c8ce RD |
7018 | |
7019 | def ConvertPixelPointToDialog(*args, **kwargs): | |
a95a7133 | 7020 | """ConvertPixelPointToDialog(self, Point pt) -> Point""" |
54f9ee45 | 7021 | return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs) |
e811c8ce RD |
7022 | |
7023 | def ConvertPixelSizeToDialog(*args, **kwargs): | |
a95a7133 | 7024 | """ConvertPixelSizeToDialog(self, Size sz) -> Size""" |
54f9ee45 | 7025 | return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs) |
e811c8ce RD |
7026 | |
7027 | def WarpPointer(*args, **kwargs): | |
15afbcd0 | 7028 | """ |
a95a7133 | 7029 | WarpPointer(self, int x, int y) |
15afbcd0 RD |
7030 | |
7031 | Moves the pointer to the given position on the window. | |
7032 | ||
7033 | NOTE: This function is not supported under Mac because Apple Human | |
7034 | Interface Guidelines forbid moving the mouse cursor programmatically. | |
7035 | """ | |
54f9ee45 | 7036 | return _core_.Window_WarpPointer(*args, **kwargs) |
e811c8ce RD |
7037 | |
7038 | def CaptureMouse(*args, **kwargs): | |
15afbcd0 | 7039 | """ |
a95a7133 | 7040 | CaptureMouse(self) |
15afbcd0 RD |
7041 | |
7042 | Directs all mouse input to this window. Call wx.Window.ReleaseMouse to | |
7043 | release the capture. | |
7044 | ||
7045 | Note that wxWindows maintains the stack of windows having captured the | |
7046 | mouse and when the mouse is released the capture returns to the window | |
7047 | which had had captured it previously and it is only really released if | |
7048 | there were no previous window. In particular, this means that you must | |
7049 | release the mouse as many times as you capture it. | |
7050 | """ | |
54f9ee45 | 7051 | return _core_.Window_CaptureMouse(*args, **kwargs) |
e811c8ce RD |
7052 | |
7053 | def ReleaseMouse(*args, **kwargs): | |
15afbcd0 | 7054 | """ |
a95a7133 | 7055 | ReleaseMouse(self) |
15afbcd0 RD |
7056 | |
7057 | Releases mouse input captured with wx.Window.CaptureMouse. | |
7058 | """ | |
54f9ee45 | 7059 | return _core_.Window_ReleaseMouse(*args, **kwargs) |
e811c8ce RD |
7060 | |
7061 | def GetCapture(*args, **kwargs): | |
15afbcd0 | 7062 | """ |
66c033b4 | 7063 | GetCapture() -> Window |
15afbcd0 RD |
7064 | |
7065 | Returns the window which currently captures the mouse or None | |
7066 | """ | |
54f9ee45 | 7067 | return _core_.Window_GetCapture(*args, **kwargs) |
e811c8ce RD |
7068 | |
7069 | GetCapture = staticmethod(GetCapture) | |
7070 | def HasCapture(*args, **kwargs): | |
15afbcd0 | 7071 | """ |
a95a7133 | 7072 | HasCapture(self) -> bool |
15afbcd0 RD |
7073 | |
7074 | Returns true if this window has the current mouse capture. | |
7075 | """ | |
54f9ee45 | 7076 | return _core_.Window_HasCapture(*args, **kwargs) |
e811c8ce RD |
7077 | |
7078 | def Refresh(*args, **kwargs): | |
15afbcd0 | 7079 | """ |
a95a7133 | 7080 | Refresh(self, bool eraseBackground=True, Rect rect=None) |
15afbcd0 RD |
7081 | |
7082 | Mark the specified rectangle (or the whole window) as "dirty" so it | |
7083 | will be repainted. Causes an EVT_PAINT event to be generated and sent | |
7084 | to the window. | |
7085 | """ | |
54f9ee45 | 7086 | return _core_.Window_Refresh(*args, **kwargs) |
e811c8ce RD |
7087 | |
7088 | def RefreshRect(*args, **kwargs): | |
15afbcd0 | 7089 | """ |
a95a7133 | 7090 | RefreshRect(self, Rect rect) |
15afbcd0 RD |
7091 | |
7092 | Redraws the contents of the given rectangle: the area inside it will | |
7093 | be repainted. This is the same as Refresh but has a nicer syntax. | |
7094 | """ | |
54f9ee45 | 7095 | return _core_.Window_RefreshRect(*args, **kwargs) |
e811c8ce RD |
7096 | |
7097 | def Update(*args, **kwargs): | |
15afbcd0 | 7098 | """ |
a95a7133 | 7099 | Update(self) |
15afbcd0 RD |
7100 | |
7101 | Calling this method immediately repaints the invalidated area of the | |
7102 | window instead of waiting for the EVT_PAINT event to happen, (normally | |
7103 | this would usually only happen when the flow of control returns to the | |
7104 | event loop.) Notice that this function doesn't refresh the window and | |
7105 | does nothing if the window has been already repainted. Use Refresh | |
7106 | first if you want to immediately redraw the window (or some portion of | |
7107 | it) unconditionally. | |
7108 | """ | |
54f9ee45 | 7109 | return _core_.Window_Update(*args, **kwargs) |
e811c8ce RD |
7110 | |
7111 | def ClearBackground(*args, **kwargs): | |
15afbcd0 | 7112 | """ |
a95a7133 | 7113 | ClearBackground(self) |
15afbcd0 RD |
7114 | |
7115 | Clears the window by filling it with the current background | |
7116 | colour. Does not cause an erase background event to be generated. | |
7117 | """ | |
54f9ee45 | 7118 | return _core_.Window_ClearBackground(*args, **kwargs) |
e811c8ce RD |
7119 | |
7120 | def Freeze(*args, **kwargs): | |
15afbcd0 | 7121 | """ |
a95a7133 | 7122 | Freeze(self) |
15afbcd0 | 7123 | |
41e2b43e RD |
7124 | Freezes the window or, in other words, prevents any updates from |
7125 | taking place on screen, the window is not redrawn at all. Thaw must be | |
7126 | called to reenable window redrawing. Calls to Freeze/Thaw may be | |
7127 | nested, with the actual Thaw being delayed until all the nesting has | |
7128 | been undone. | |
15afbcd0 RD |
7129 | |
7130 | This method is useful for visual appearance optimization (for example, | |
7131 | it is a good idea to use it before inserting large amount of text into | |
7132 | a wxTextCtrl under wxGTK) but is not implemented on all platforms nor | |
7133 | for all controls so it is mostly just a hint to wxWindows and not a | |
7134 | mandatory directive. | |
7135 | """ | |
54f9ee45 | 7136 | return _core_.Window_Freeze(*args, **kwargs) |
e811c8ce RD |
7137 | |
7138 | def Thaw(*args, **kwargs): | |
15afbcd0 | 7139 | """ |
a95a7133 | 7140 | Thaw(self) |
15afbcd0 | 7141 | |
4276dc52 | 7142 | Reenables window updating after a previous call to Freeze. Calls to |
41e2b43e RD |
7143 | Freeze/Thaw may be nested, so Thaw must be called the same number of |
7144 | times that Freeze was before the window will be updated. | |
15afbcd0 | 7145 | """ |
54f9ee45 | 7146 | return _core_.Window_Thaw(*args, **kwargs) |
e811c8ce RD |
7147 | |
7148 | def PrepareDC(*args, **kwargs): | |
15afbcd0 | 7149 | """ |
a95a7133 | 7150 | PrepareDC(self, DC dc) |
15afbcd0 RD |
7151 | |
7152 | Call this function to prepare the device context for drawing a | |
7153 | scrolled image. It sets the device origin according to the current | |
7154 | scroll position. | |
7155 | """ | |
54f9ee45 | 7156 | return _core_.Window_PrepareDC(*args, **kwargs) |
e811c8ce RD |
7157 | |
7158 | def GetUpdateRegion(*args, **kwargs): | |
15afbcd0 | 7159 | """ |
a95a7133 | 7160 | GetUpdateRegion(self) -> Region |
15afbcd0 RD |
7161 | |
7162 | Returns the region specifying which parts of the window have been | |
7163 | damaged. Should only be called within an EVT_PAINT handler. | |
7164 | """ | |
54f9ee45 | 7165 | return _core_.Window_GetUpdateRegion(*args, **kwargs) |
e811c8ce RD |
7166 | |
7167 | def GetUpdateClientRect(*args, **kwargs): | |
15afbcd0 | 7168 | """ |
a95a7133 | 7169 | GetUpdateClientRect(self) -> Rect |
15afbcd0 RD |
7170 | |
7171 | Get the update rectangle region bounding box in client coords. | |
7172 | """ | |
54f9ee45 | 7173 | return _core_.Window_GetUpdateClientRect(*args, **kwargs) |
e811c8ce RD |
7174 | |
7175 | def IsExposed(*args, **kwargs): | |
15afbcd0 | 7176 | """ |
a95a7133 | 7177 | IsExposed(self, int x, int y, int w=1, int h=1) -> bool |
15afbcd0 RD |
7178 | |
7179 | Returns true if the given point or rectangle area has been exposed | |
7180 | since the last repaint. Call this in an paint event handler to | |
7181 | optimize redrawing by only redrawing those areas, which have been | |
7182 | exposed. | |
7183 | """ | |
54f9ee45 | 7184 | return _core_.Window_IsExposed(*args, **kwargs) |
e811c8ce RD |
7185 | |
7186 | def IsExposedPoint(*args, **kwargs): | |
15afbcd0 | 7187 | """ |
a95a7133 | 7188 | IsExposedPoint(self, Point pt) -> bool |
15afbcd0 RD |
7189 | |
7190 | Returns true if the given point or rectangle area has been exposed | |
7191 | since the last repaint. Call this in an paint event handler to | |
7192 | optimize redrawing by only redrawing those areas, which have been | |
7193 | exposed. | |
7194 | """ | |
54f9ee45 | 7195 | return _core_.Window_IsExposedPoint(*args, **kwargs) |
e811c8ce | 7196 | |
4276dc52 | 7197 | def IsExposedRect(*args, **kwargs): |
15afbcd0 | 7198 | """ |
a95a7133 | 7199 | IsExposedRect(self, Rect rect) -> bool |
15afbcd0 RD |
7200 | |
7201 | Returns true if the given point or rectangle area has been exposed | |
7202 | since the last repaint. Call this in an paint event handler to | |
7203 | optimize redrawing by only redrawing those areas, which have been | |
7204 | exposed. | |
7205 | """ | |
54f9ee45 | 7206 | return _core_.Window_IsExposedRect(*args, **kwargs) |
e811c8ce | 7207 | |
74a57fcd RD |
7208 | def GetDefaultAttributes(*args, **kwargs): |
7209 | """ | |
a95a7133 | 7210 | GetDefaultAttributes(self) -> VisualAttributes |
74a57fcd | 7211 | |
41e2b43e RD |
7212 | Get the default attributes for an instance of this class. This is |
7213 | useful if you want to use the same font or colour in your own control | |
7214 | as in a standard control -- which is a much better idea than hard | |
7215 | coding specific colours or fonts which might look completely out of | |
db3e571a | 7216 | place on the user's system, especially if it uses themes. |
74a57fcd | 7217 | """ |
54f9ee45 | 7218 | return _core_.Window_GetDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
7219 | |
7220 | def GetClassDefaultAttributes(*args, **kwargs): | |
7221 | """ | |
66c033b4 | 7222 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes |
74a57fcd | 7223 | |
41e2b43e RD |
7224 | Get the default attributes for this class. This is useful if you want |
7225 | to use the same font or colour in your own control as in a standard | |
7226 | control -- which is a much better idea than hard coding specific | |
db3e571a RD |
7227 | colours or fonts which might look completely out of place on the |
7228 | user's system, especially if it uses themes. | |
74a57fcd RD |
7229 | |
7230 | The variant parameter is only relevant under Mac currently and is | |
41e2b43e | 7231 | ignore under other platforms. Under Mac, it will change the size of |
db3e571a RD |
7232 | the returned font. See `wx.Window.SetWindowVariant` for more about |
7233 | this. | |
74a57fcd | 7234 | """ |
54f9ee45 | 7235 | return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
7236 | |
7237 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
e811c8ce | 7238 | def SetBackgroundColour(*args, **kwargs): |
15afbcd0 | 7239 | """ |
a95a7133 | 7240 | SetBackgroundColour(self, Colour colour) -> bool |
15afbcd0 RD |
7241 | |
7242 | Sets the background colour of the window. Returns True if the colour | |
7243 | was changed. The background colour is usually painted by the default | |
7244 | EVT_ERASE_BACKGROUND event handler function under Windows and | |
f8167d6e RD |
7245 | automatically under GTK. Using `wx.NullColour` will reset the window |
7246 | to the default background colour. | |
15afbcd0 | 7247 | |
db3e571a | 7248 | Note that setting the background colour may not cause an immediate |
f8167d6e | 7249 | refresh, so you may wish to call `ClearBackground` or `Refresh` after |
15afbcd0 RD |
7250 | calling this function. |
7251 | ||
f8167d6e RD |
7252 | Using this function will disable attempts to use themes for this |
7253 | window, if the system supports them. Use with care since usually the | |
7254 | themes represent the appearance chosen by the user to be used for all | |
7255 | applications on the system. | |
15afbcd0 | 7256 | """ |
54f9ee45 | 7257 | return _core_.Window_SetBackgroundColour(*args, **kwargs) |
e811c8ce | 7258 | |
412d302d RD |
7259 | def SetOwnBackgroundColour(*args, **kwargs): |
7260 | """SetOwnBackgroundColour(self, Colour colour)""" | |
7261 | return _core_.Window_SetOwnBackgroundColour(*args, **kwargs) | |
b2df227b | 7262 | |
e811c8ce | 7263 | def SetForegroundColour(*args, **kwargs): |
15afbcd0 | 7264 | """ |
a95a7133 | 7265 | SetForegroundColour(self, Colour colour) -> bool |
15afbcd0 RD |
7266 | |
7267 | Sets the foreground colour of the window. Returns True is the colour | |
7268 | was changed. The interpretation of foreground colour is dependent on | |
7269 | the window class; it may be the text colour or other colour, or it may | |
7270 | not be used at all. | |
7271 | """ | |
54f9ee45 | 7272 | return _core_.Window_SetForegroundColour(*args, **kwargs) |
e811c8ce | 7273 | |
fa47d7a7 VS |
7274 | def SetOwnForegroundColour(*args, **kwargs): |
7275 | """SetOwnForegroundColour(self, Colour colour)""" | |
7276 | return _core_.Window_SetOwnForegroundColour(*args, **kwargs) | |
b2df227b | 7277 | |
e811c8ce | 7278 | def GetBackgroundColour(*args, **kwargs): |
15afbcd0 | 7279 | """ |
a95a7133 | 7280 | GetBackgroundColour(self) -> Colour |
15afbcd0 RD |
7281 | |
7282 | Returns the background colour of the window. | |
7283 | """ | |
54f9ee45 | 7284 | return _core_.Window_GetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
7285 | |
7286 | def GetForegroundColour(*args, **kwargs): | |
15afbcd0 | 7287 | """ |
a95a7133 | 7288 | GetForegroundColour(self) -> Colour |
15afbcd0 RD |
7289 | |
7290 | Returns the foreground colour of the window. The interpretation of | |
7291 | foreground colour is dependent on the window class; it may be the text | |
7292 | colour or other colour, or it may not be used at all. | |
7293 | """ | |
54f9ee45 | 7294 | return _core_.Window_GetForegroundColour(*args, **kwargs) |
e811c8ce | 7295 | |
7bc1e663 RD |
7296 | def SetBackgroundStyle(*args, **kwargs): |
7297 | """ | |
7298 | SetBackgroundStyle(self, int style) -> bool | |
7299 | ||
7300 | Returns the background style of the window. The background style | |
7301 | indicates how the background of the window is drawn. | |
7302 | ||
7303 | ====================== ======================================== | |
7304 | wx.BG_STYLE_SYSTEM The background colour or pattern should | |
7305 | be determined by the system | |
7306 | wx.BG_STYLE_COLOUR The background should be a solid colour | |
7307 | wx.BG_STYLE_CUSTOM The background will be implemented by the | |
7308 | application. | |
7309 | ====================== ======================================== | |
7310 | ||
7311 | On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of | |
7312 | a custom background, such as a tiled bitmap. Currently the style has | |
7313 | no effect on other platforms. | |
7314 | ||
7315 | :see: `GetBackgroundStyle`, `SetBackgroundColour` | |
7316 | """ | |
7317 | return _core_.Window_SetBackgroundStyle(*args, **kwargs) | |
7318 | ||
7319 | def GetBackgroundStyle(*args, **kwargs): | |
7320 | """ | |
7321 | GetBackgroundStyle(self) -> int | |
7322 | ||
7323 | Returns the background style of the window. | |
7324 | ||
7325 | :see: `SetBackgroundStyle` | |
7326 | """ | |
7327 | return _core_.Window_GetBackgroundStyle(*args, **kwargs) | |
7328 | ||
e811c8ce | 7329 | def SetCursor(*args, **kwargs): |
15afbcd0 | 7330 | """ |
a95a7133 | 7331 | SetCursor(self, Cursor cursor) -> bool |
15afbcd0 RD |
7332 | |
7333 | Sets the window's cursor. Notice that the window cursor also sets it | |
7334 | for the children of the window implicitly. | |
7335 | ||
7336 | The cursor may be wx.NullCursor in which case the window cursor will | |
7337 | be reset back to default. | |
7338 | """ | |
54f9ee45 | 7339 | return _core_.Window_SetCursor(*args, **kwargs) |
e811c8ce RD |
7340 | |
7341 | def GetCursor(*args, **kwargs): | |
15afbcd0 | 7342 | """ |
a95a7133 | 7343 | GetCursor(self) -> Cursor |
15afbcd0 RD |
7344 | |
7345 | Return the cursor associated with this window. | |
7346 | """ | |
54f9ee45 | 7347 | return _core_.Window_GetCursor(*args, **kwargs) |
e811c8ce RD |
7348 | |
7349 | def SetFont(*args, **kwargs): | |
15afbcd0 | 7350 | """ |
a95a7133 | 7351 | SetFont(self, Font font) -> bool |
15afbcd0 RD |
7352 | |
7353 | Sets the font for this window. | |
7354 | """ | |
54f9ee45 | 7355 | return _core_.Window_SetFont(*args, **kwargs) |
e811c8ce | 7356 | |
fa47d7a7 VS |
7357 | def SetOwnFont(*args, **kwargs): |
7358 | """SetOwnFont(self, Font font)""" | |
7359 | return _core_.Window_SetOwnFont(*args, **kwargs) | |
b2df227b | 7360 | |
e811c8ce | 7361 | def GetFont(*args, **kwargs): |
15afbcd0 | 7362 | """ |
a95a7133 | 7363 | GetFont(self) -> Font |
15afbcd0 | 7364 | |
4276dc52 | 7365 | Returns the default font used for this window. |
15afbcd0 | 7366 | """ |
54f9ee45 | 7367 | return _core_.Window_GetFont(*args, **kwargs) |
e811c8ce RD |
7368 | |
7369 | def SetCaret(*args, **kwargs): | |
15afbcd0 | 7370 | """ |
a95a7133 | 7371 | SetCaret(self, Caret caret) |
15afbcd0 RD |
7372 | |
7373 | Sets the caret associated with the window. | |
7374 | """ | |
54f9ee45 | 7375 | return _core_.Window_SetCaret(*args, **kwargs) |
e811c8ce RD |
7376 | |
7377 | def GetCaret(*args, **kwargs): | |
15afbcd0 | 7378 | """ |
a95a7133 | 7379 | GetCaret(self) -> Caret |
15afbcd0 RD |
7380 | |
7381 | Returns the caret associated with the window. | |
7382 | """ | |
54f9ee45 | 7383 | return _core_.Window_GetCaret(*args, **kwargs) |
e811c8ce RD |
7384 | |
7385 | def GetCharHeight(*args, **kwargs): | |
15afbcd0 | 7386 | """ |
a95a7133 | 7387 | GetCharHeight(self) -> int |
15afbcd0 RD |
7388 | |
7389 | Get the (average) character size for the current font. | |
7390 | """ | |
54f9ee45 | 7391 | return _core_.Window_GetCharHeight(*args, **kwargs) |
e811c8ce RD |
7392 | |
7393 | def GetCharWidth(*args, **kwargs): | |
15afbcd0 | 7394 | """ |
a95a7133 | 7395 | GetCharWidth(self) -> int |
15afbcd0 RD |
7396 | |
7397 | Get the (average) character size for the current font. | |
7398 | """ | |
54f9ee45 | 7399 | return _core_.Window_GetCharWidth(*args, **kwargs) |
e811c8ce RD |
7400 | |
7401 | def GetTextExtent(*args, **kwargs): | |
fd2dc343 RD |
7402 | """ |
7403 | GetTextExtent(String string) -> (width, height) | |
7404 | ||
7405 | Get the width and height of the text using the current font. | |
7406 | """ | |
54f9ee45 | 7407 | return _core_.Window_GetTextExtent(*args, **kwargs) |
e811c8ce RD |
7408 | |
7409 | def GetFullTextExtent(*args, **kwargs): | |
0df68c9f | 7410 | """ |
196addbf | 7411 | GetFullTextExtent(String string, Font font=None) -> |
0df68c9f | 7412 | (width, height, descent, externalLeading) |
e811c8ce | 7413 | |
15afbcd0 RD |
7414 | Get the width, height, decent and leading of the text using the |
7415 | current or specified font. | |
0df68c9f | 7416 | """ |
54f9ee45 | 7417 | return _core_.Window_GetFullTextExtent(*args, **kwargs) |
e811c8ce RD |
7418 | |
7419 | def ClientToScreenXY(*args, **kwargs): | |
15afbcd0 RD |
7420 | """ |
7421 | ClientToScreenXY(int x, int y) -> (x,y) | |
7422 | ||
7423 | Converts to screen coordinates from coordinates relative to this window. | |
7424 | """ | |
54f9ee45 | 7425 | return _core_.Window_ClientToScreenXY(*args, **kwargs) |
e811c8ce RD |
7426 | |
7427 | def ScreenToClientXY(*args, **kwargs): | |
15afbcd0 RD |
7428 | """ |
7429 | ScreenToClientXY(int x, int y) -> (x,y) | |
7430 | ||
7431 | Converts from screen to client window coordinates. | |
7432 | """ | |
54f9ee45 | 7433 | return _core_.Window_ScreenToClientXY(*args, **kwargs) |
e811c8ce RD |
7434 | |
7435 | def ClientToScreen(*args, **kwargs): | |
15afbcd0 | 7436 | """ |
a95a7133 | 7437 | ClientToScreen(self, Point pt) -> Point |
15afbcd0 RD |
7438 | |
7439 | Converts to screen coordinates from coordinates relative to this window. | |
7440 | """ | |
54f9ee45 | 7441 | return _core_.Window_ClientToScreen(*args, **kwargs) |
e811c8ce RD |
7442 | |
7443 | def ScreenToClient(*args, **kwargs): | |
15afbcd0 | 7444 | """ |
a95a7133 | 7445 | ScreenToClient(self, Point pt) -> Point |
15afbcd0 RD |
7446 | |
7447 | Converts from screen to client window coordinates. | |
7448 | """ | |
54f9ee45 | 7449 | return _core_.Window_ScreenToClient(*args, **kwargs) |
e811c8ce RD |
7450 | |
7451 | def HitTestXY(*args, **kwargs): | |
15afbcd0 | 7452 | """ |
a95a7133 | 7453 | HitTestXY(self, int x, int y) -> int |
15afbcd0 RD |
7454 | |
7455 | Test where the given (in client coords) point lies | |
7456 | """ | |
54f9ee45 | 7457 | return _core_.Window_HitTestXY(*args, **kwargs) |
e811c8ce RD |
7458 | |
7459 | def HitTest(*args, **kwargs): | |
15afbcd0 | 7460 | """ |
a95a7133 | 7461 | HitTest(self, Point pt) -> int |
15afbcd0 RD |
7462 | |
7463 | Test where the given (in client coords) point lies | |
7464 | """ | |
54f9ee45 | 7465 | return _core_.Window_HitTest(*args, **kwargs) |
e811c8ce | 7466 | |
15afbcd0 RD |
7467 | def GetBorder(*args): |
7468 | """ | |
a95a7133 RD |
7469 | GetBorder(self, long flags) -> int |
7470 | GetBorder(self) -> int | |
e811c8ce | 7471 | |
15afbcd0 RD |
7472 | Get border for the flags of this window |
7473 | """ | |
54f9ee45 | 7474 | return _core_.Window_GetBorder(*args) |
e811c8ce RD |
7475 | |
7476 | def UpdateWindowUI(*args, **kwargs): | |
15afbcd0 | 7477 | """ |
a95a7133 | 7478 | UpdateWindowUI(self, long flags=UPDATE_UI_NONE) |
15afbcd0 RD |
7479 | |
7480 | This function sends EVT_UPDATE_UI events to the window. The particular | |
7481 | implementation depends on the window; for example a wx.ToolBar will | |
7482 | send an update UI event for each toolbar button, and a wx.Frame will | |
7483 | send an update UI event for each menubar menu item. You can call this | |
7484 | function from your application to ensure that your UI is up-to-date at | |
7485 | a particular point in time (as far as your EVT_UPDATE_UI handlers are | |
7486 | concerned). This may be necessary if you have called | |
7487 | wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to | |
7488 | limit the overhead that wxWindows incurs by sending update UI events | |
7489 | in idle time. | |
15afbcd0 | 7490 | """ |
54f9ee45 | 7491 | return _core_.Window_UpdateWindowUI(*args, **kwargs) |
e811c8ce RD |
7492 | |
7493 | def PopupMenuXY(*args, **kwargs): | |
15afbcd0 | 7494 | """ |
b0503257 | 7495 | PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool |
15afbcd0 | 7496 | |
b0503257 RD |
7497 | Pops up the given menu at the specified coordinates, relative to this window, |
7498 | and returns control when the user has dismissed the menu. If a menu item is | |
7499 | selected, the corresponding menu event is generated and will be processed as | |
7500 | usual. If the default position is given then the current position of the | |
7501 | mouse cursor will be used. | |
15afbcd0 | 7502 | """ |
54f9ee45 | 7503 | return _core_.Window_PopupMenuXY(*args, **kwargs) |
e811c8ce | 7504 | |
15afbcd0 RD |
7505 | def PopupMenu(*args, **kwargs): |
7506 | """ | |
b0503257 | 7507 | PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool |
15afbcd0 | 7508 | |
b0503257 RD |
7509 | Pops up the given menu at the specified coordinates, relative to this window, |
7510 | and returns control when the user has dismissed the menu. If a menu item is | |
7511 | selected, the corresponding menu event is generated and will be processed as | |
7512 | usual. If the default position is given then the current position of the | |
7513 | mouse cursor will be used. | |
15afbcd0 | 7514 | """ |
54f9ee45 | 7515 | return _core_.Window_PopupMenu(*args, **kwargs) |
15afbcd0 RD |
7516 | |
7517 | def GetHandle(*args, **kwargs): | |
7518 | """ | |
a95a7133 | 7519 | GetHandle(self) -> long |
15afbcd0 RD |
7520 | |
7521 | Returns the platform-specific handle (as a long integer) of the | |
7522 | physical window. Currently on wxMac it returns the handle of the | |
7523 | toplevel parent of the window. | |
7524 | """ | |
54f9ee45 | 7525 | return _core_.Window_GetHandle(*args, **kwargs) |
15afbcd0 | 7526 | |
7e63a440 RD |
7527 | def AssociateHandle(*args, **kwargs): |
7528 | """ | |
7529 | AssociateHandle(self, long handle) | |
7530 | ||
7531 | Associate the window with a new native handle | |
7532 | """ | |
7533 | return _core_.Window_AssociateHandle(*args, **kwargs) | |
7534 | ||
7535 | def DissociateHandle(*args, **kwargs): | |
7536 | """ | |
7537 | DissociateHandle(self) | |
7538 | ||
7539 | Dissociate the current native handle from the window | |
7540 | """ | |
7541 | return _core_.Window_DissociateHandle(*args, **kwargs) | |
7542 | ||
15afbcd0 RD |
7543 | def HasScrollbar(*args, **kwargs): |
7544 | """ | |
a95a7133 | 7545 | HasScrollbar(self, int orient) -> bool |
15afbcd0 RD |
7546 | |
7547 | Does the window have the scrollbar for this orientation? | |
7548 | """ | |
54f9ee45 | 7549 | return _core_.Window_HasScrollbar(*args, **kwargs) |
15afbcd0 RD |
7550 | |
7551 | def SetScrollbar(*args, **kwargs): | |
7552 | """ | |
41e2b43e | 7553 | SetScrollbar(self, int orientation, int position, int thumbSize, int range, |
15afbcd0 RD |
7554 | bool refresh=True) |
7555 | ||
7556 | Sets the scrollbar properties of a built-in scrollbar. | |
15afbcd0 | 7557 | """ |
54f9ee45 | 7558 | return _core_.Window_SetScrollbar(*args, **kwargs) |
e811c8ce RD |
7559 | |
7560 | def SetScrollPos(*args, **kwargs): | |
15afbcd0 | 7561 | """ |
a95a7133 | 7562 | SetScrollPos(self, int orientation, int pos, bool refresh=True) |
15afbcd0 RD |
7563 | |
7564 | Sets the position of one of the built-in scrollbars. | |
7565 | """ | |
54f9ee45 | 7566 | return _core_.Window_SetScrollPos(*args, **kwargs) |
e811c8ce RD |
7567 | |
7568 | def GetScrollPos(*args, **kwargs): | |
15afbcd0 | 7569 | """ |
a95a7133 | 7570 | GetScrollPos(self, int orientation) -> int |
15afbcd0 RD |
7571 | |
7572 | Returns the built-in scrollbar position. | |
7573 | """ | |
54f9ee45 | 7574 | return _core_.Window_GetScrollPos(*args, **kwargs) |
e811c8ce RD |
7575 | |
7576 | def GetScrollThumb(*args, **kwargs): | |
15afbcd0 | 7577 | """ |
a95a7133 | 7578 | GetScrollThumb(self, int orientation) -> int |
15afbcd0 RD |
7579 | |
7580 | Returns the built-in scrollbar thumb size. | |
7581 | """ | |
54f9ee45 | 7582 | return _core_.Window_GetScrollThumb(*args, **kwargs) |
e811c8ce RD |
7583 | |
7584 | def GetScrollRange(*args, **kwargs): | |
15afbcd0 | 7585 | """ |
a95a7133 | 7586 | GetScrollRange(self, int orientation) -> int |
15afbcd0 RD |
7587 | |
7588 | Returns the built-in scrollbar range. | |
7589 | """ | |
54f9ee45 | 7590 | return _core_.Window_GetScrollRange(*args, **kwargs) |
e811c8ce RD |
7591 | |
7592 | def ScrollWindow(*args, **kwargs): | |
15afbcd0 | 7593 | """ |
a95a7133 | 7594 | ScrollWindow(self, int dx, int dy, Rect rect=None) |
15afbcd0 RD |
7595 | |
7596 | Physically scrolls the pixels in the window and move child windows | |
7597 | accordingly. Use this function to optimise your scrolling | |
7598 | implementations, to minimise the area that must be redrawn. Note that | |
7599 | it is rarely required to call this function from a user program. | |
15afbcd0 | 7600 | """ |
54f9ee45 | 7601 | return _core_.Window_ScrollWindow(*args, **kwargs) |
e811c8ce RD |
7602 | |
7603 | def ScrollLines(*args, **kwargs): | |
15afbcd0 | 7604 | """ |
a95a7133 | 7605 | ScrollLines(self, int lines) -> bool |
15afbcd0 RD |
7606 | |
7607 | If the platform and window class supports it, scrolls the window by | |
7608 | the given number of lines down, if lines is positive, or up if lines | |
7609 | is negative. Returns True if the window was scrolled, False if it was | |
7610 | already on top/bottom and nothing was done. | |
7611 | """ | |
54f9ee45 | 7612 | return _core_.Window_ScrollLines(*args, **kwargs) |
e811c8ce RD |
7613 | |
7614 | def ScrollPages(*args, **kwargs): | |
15afbcd0 | 7615 | """ |
a95a7133 | 7616 | ScrollPages(self, int pages) -> bool |
15afbcd0 | 7617 | |
41e2b43e | 7618 | If the platform and window class supports it, scrolls the window by |
15afbcd0 RD |
7619 | the given number of pages down, if pages is positive, or up if pages |
7620 | is negative. Returns True if the window was scrolled, False if it was | |
7621 | already on top/bottom and nothing was done. | |
7622 | """ | |
54f9ee45 | 7623 | return _core_.Window_ScrollPages(*args, **kwargs) |
e811c8ce RD |
7624 | |
7625 | def LineUp(*args, **kwargs): | |
15afbcd0 | 7626 | """ |
a95a7133 | 7627 | LineUp(self) -> bool |
15afbcd0 RD |
7628 | |
7629 | This is just a wrapper for ScrollLines(-1). | |
7630 | """ | |
54f9ee45 | 7631 | return _core_.Window_LineUp(*args, **kwargs) |
e811c8ce RD |
7632 | |
7633 | def LineDown(*args, **kwargs): | |
15afbcd0 | 7634 | """ |
a95a7133 | 7635 | LineDown(self) -> bool |
15afbcd0 RD |
7636 | |
7637 | This is just a wrapper for ScrollLines(1). | |
7638 | """ | |
54f9ee45 | 7639 | return _core_.Window_LineDown(*args, **kwargs) |
e811c8ce RD |
7640 | |
7641 | def PageUp(*args, **kwargs): | |
15afbcd0 | 7642 | """ |
a95a7133 | 7643 | PageUp(self) -> bool |
15afbcd0 RD |
7644 | |
7645 | This is just a wrapper for ScrollPages(-1). | |
7646 | """ | |
54f9ee45 | 7647 | return _core_.Window_PageUp(*args, **kwargs) |
e811c8ce RD |
7648 | |
7649 | def PageDown(*args, **kwargs): | |
15afbcd0 | 7650 | """ |
a95a7133 | 7651 | PageDown(self) -> bool |
15afbcd0 RD |
7652 | |
7653 | This is just a wrapper for ScrollPages(1). | |
7654 | """ | |
54f9ee45 | 7655 | return _core_.Window_PageDown(*args, **kwargs) |
e811c8ce RD |
7656 | |
7657 | def SetHelpText(*args, **kwargs): | |
15afbcd0 | 7658 | """ |
a95a7133 | 7659 | SetHelpText(self, String text) |
15afbcd0 RD |
7660 | |
7661 | Sets the help text to be used as context-sensitive help for this | |
7662 | window. Note that the text is actually stored by the current | |
7663 | wxHelpProvider implementation, and not in the window object itself. | |
7664 | """ | |
54f9ee45 | 7665 | return _core_.Window_SetHelpText(*args, **kwargs) |
e811c8ce RD |
7666 | |
7667 | def SetHelpTextForId(*args, **kwargs): | |
15afbcd0 | 7668 | """ |
a95a7133 | 7669 | SetHelpTextForId(self, String text) |
15afbcd0 RD |
7670 | |
7671 | Associate this help text with all windows with the same id as this | |
7672 | one. | |
7673 | """ | |
54f9ee45 | 7674 | return _core_.Window_SetHelpTextForId(*args, **kwargs) |
e811c8ce RD |
7675 | |
7676 | def GetHelpText(*args, **kwargs): | |
15afbcd0 | 7677 | """ |
a95a7133 | 7678 | GetHelpText(self) -> String |
15afbcd0 RD |
7679 | |
7680 | Gets the help text to be used as context-sensitive help for this | |
7681 | window. Note that the text is actually stored by the current | |
7682 | wxHelpProvider implementation, and not in the window object itself. | |
7683 | """ | |
54f9ee45 | 7684 | return _core_.Window_GetHelpText(*args, **kwargs) |
e811c8ce RD |
7685 | |
7686 | def SetToolTipString(*args, **kwargs): | |
15afbcd0 | 7687 | """ |
a95a7133 | 7688 | SetToolTipString(self, String tip) |
15afbcd0 RD |
7689 | |
7690 | Attach a tooltip to the window. | |
7691 | """ | |
54f9ee45 | 7692 | return _core_.Window_SetToolTipString(*args, **kwargs) |
e811c8ce RD |
7693 | |
7694 | def SetToolTip(*args, **kwargs): | |
15afbcd0 | 7695 | """ |
a95a7133 | 7696 | SetToolTip(self, ToolTip tip) |
15afbcd0 RD |
7697 | |
7698 | Attach a tooltip to the window. | |
7699 | """ | |
54f9ee45 | 7700 | return _core_.Window_SetToolTip(*args, **kwargs) |
e811c8ce RD |
7701 | |
7702 | def GetToolTip(*args, **kwargs): | |
15afbcd0 | 7703 | """ |
a95a7133 | 7704 | GetToolTip(self) -> ToolTip |
15afbcd0 RD |
7705 | |
7706 | get the associated tooltip or None if none | |
7707 | """ | |
54f9ee45 | 7708 | return _core_.Window_GetToolTip(*args, **kwargs) |
e811c8ce RD |
7709 | |
7710 | def SetDropTarget(*args, **kwargs): | |
15afbcd0 | 7711 | """ |
a95a7133 | 7712 | SetDropTarget(self, DropTarget dropTarget) |
15afbcd0 RD |
7713 | |
7714 | Associates a drop target with this window. If the window already has | |
7715 | a drop target, it is deleted. | |
7716 | """ | |
54f9ee45 | 7717 | return _core_.Window_SetDropTarget(*args, **kwargs) |
e811c8ce RD |
7718 | |
7719 | def GetDropTarget(*args, **kwargs): | |
15afbcd0 | 7720 | """ |
a95a7133 | 7721 | GetDropTarget(self) -> DropTarget |
15afbcd0 RD |
7722 | |
7723 | Returns the associated drop target, which may be None. | |
7724 | """ | |
54f9ee45 | 7725 | return _core_.Window_GetDropTarget(*args, **kwargs) |
e811c8ce RD |
7726 | |
7727 | def SetConstraints(*args, **kwargs): | |
15afbcd0 | 7728 | """ |
a95a7133 | 7729 | SetConstraints(self, LayoutConstraints constraints) |
15afbcd0 RD |
7730 | |
7731 | Sets the window to have the given layout constraints. If an existing | |
7732 | layout constraints object is already owned by the window, it will be | |
7733 | deleted. Pass None to disassociate and delete the window's current | |
7734 | constraints. | |
7735 | ||
7736 | You must call SetAutoLayout to tell a window to use the constraints | |
7737 | automatically in its default EVT_SIZE handler; otherwise, you must | |
7738 | handle EVT_SIZE yourself and call Layout() explicitly. When setting | |
7739 | both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have | |
7740 | effect. | |
7741 | """ | |
54f9ee45 | 7742 | return _core_.Window_SetConstraints(*args, **kwargs) |
e811c8ce RD |
7743 | |
7744 | def GetConstraints(*args, **kwargs): | |
15afbcd0 | 7745 | """ |
a95a7133 | 7746 | GetConstraints(self) -> LayoutConstraints |
15afbcd0 RD |
7747 | |
7748 | Returns a pointer to the window's layout constraints, or None if there | |
7749 | are none. | |
7750 | """ | |
54f9ee45 | 7751 | return _core_.Window_GetConstraints(*args, **kwargs) |
e811c8ce RD |
7752 | |
7753 | def SetAutoLayout(*args, **kwargs): | |
15afbcd0 | 7754 | """ |
a95a7133 | 7755 | SetAutoLayout(self, bool autoLayout) |
15afbcd0 RD |
7756 | |
7757 | Determines whether the Layout function will be called automatically | |
7758 | when the window is resized. It is called implicitly by SetSizer but | |
7759 | if you use SetConstraints you should call it manually or otherwise the | |
7760 | window layout won't be correctly updated when its size changes. | |
7761 | """ | |
54f9ee45 | 7762 | return _core_.Window_SetAutoLayout(*args, **kwargs) |
e811c8ce RD |
7763 | |
7764 | def GetAutoLayout(*args, **kwargs): | |
15afbcd0 | 7765 | """ |
a95a7133 | 7766 | GetAutoLayout(self) -> bool |
15afbcd0 RD |
7767 | |
7768 | Returns the current autoLayout setting | |
7769 | """ | |
54f9ee45 | 7770 | return _core_.Window_GetAutoLayout(*args, **kwargs) |
e811c8ce RD |
7771 | |
7772 | def Layout(*args, **kwargs): | |
15afbcd0 | 7773 | """ |
a95a7133 | 7774 | Layout(self) -> bool |
15afbcd0 RD |
7775 | |
7776 | Invokes the constraint-based layout algorithm or the sizer-based | |
7777 | algorithm for this window. See SetAutoLayout: when auto layout is on, | |
7778 | this function gets called automatically by the default EVT_SIZE | |
7779 | handler when the window is resized. | |
7780 | """ | |
54f9ee45 | 7781 | return _core_.Window_Layout(*args, **kwargs) |
e811c8ce RD |
7782 | |
7783 | def SetSizer(*args, **kwargs): | |
15afbcd0 | 7784 | """ |
a95a7133 | 7785 | SetSizer(self, Sizer sizer, bool deleteOld=True) |
15afbcd0 RD |
7786 | |
7787 | Sets the window to have the given layout sizer. The window will then | |
7788 | own the object, and will take care of its deletion. If an existing | |
7789 | layout sizer object is already owned by the window, it will be deleted | |
7790 | if the deleteOld parameter is true. Note that this function will also | |
7791 | call SetAutoLayout implicitly with a True parameter if the sizer is | |
ae8162c8 | 7792 | non-None, and False otherwise. |
15afbcd0 | 7793 | """ |
54f9ee45 | 7794 | return _core_.Window_SetSizer(*args, **kwargs) |
e811c8ce RD |
7795 | |
7796 | def SetSizerAndFit(*args, **kwargs): | |
15afbcd0 | 7797 | """ |
a95a7133 | 7798 | SetSizerAndFit(self, Sizer sizer, bool deleteOld=True) |
15afbcd0 RD |
7799 | |
7800 | The same as SetSizer, except it also sets the size hints for the | |
7801 | window based on the sizer's minimum size. | |
7802 | """ | |
54f9ee45 | 7803 | return _core_.Window_SetSizerAndFit(*args, **kwargs) |
e811c8ce RD |
7804 | |
7805 | def GetSizer(*args, **kwargs): | |
15afbcd0 | 7806 | """ |
a95a7133 | 7807 | GetSizer(self) -> Sizer |
15afbcd0 RD |
7808 | |
7809 | Return the sizer associated with the window by a previous call to | |
7810 | SetSizer or None if there isn't one. | |
7811 | """ | |
54f9ee45 | 7812 | return _core_.Window_GetSizer(*args, **kwargs) |
e811c8ce RD |
7813 | |
7814 | def SetContainingSizer(*args, **kwargs): | |
15afbcd0 | 7815 | """ |
a95a7133 | 7816 | SetContainingSizer(self, Sizer sizer) |
15afbcd0 RD |
7817 | |
7818 | This normally does not need to be called by application code. It is | |
7819 | called internally when a window is added to a sizer, and is used so | |
7820 | the window can remove itself from the sizer when it is destroyed. | |
7821 | """ | |
54f9ee45 | 7822 | return _core_.Window_SetContainingSizer(*args, **kwargs) |
e811c8ce RD |
7823 | |
7824 | def GetContainingSizer(*args, **kwargs): | |
15afbcd0 | 7825 | """ |
a95a7133 | 7826 | GetContainingSizer(self) -> Sizer |
15afbcd0 RD |
7827 | |
7828 | Return the sizer that this window is a member of, if any, otherwise None. | |
7829 | """ | |
54f9ee45 | 7830 | return _core_.Window_GetContainingSizer(*args, **kwargs) |
e811c8ce | 7831 | |
a95a7133 RD |
7832 | def InheritAttributes(*args, **kwargs): |
7833 | """ | |
7834 | InheritAttributes(self) | |
7835 | ||
41e2b43e RD |
7836 | This function is (or should be, in case of custom controls) called |
7837 | during window creation to intelligently set up the window visual | |
7838 | attributes, that is the font and the foreground and background | |
7839 | colours. | |
7840 | ||
7841 | By 'intelligently' the following is meant: by default, all windows use | |
7842 | their own default attributes. However if some of the parent's | |
7843 | attributes are explicitly changed (that is, using SetFont and not | |
fa47d7a7 | 7844 | SetOwnFont) and if the corresponding attribute hadn't been |
41e2b43e RD |
7845 | explicitly set for this window itself, then this window takes the same |
7846 | value as used by the parent. In addition, if the window overrides | |
7847 | ShouldInheritColours to return false, the colours will not be changed | |
7848 | no matter what and only the font might. | |
7849 | ||
34621cc5 | 7850 | This rather complicated logic is necessary in order to accommodate the |
ec9b55ca | 7851 | different usage scenarios. The most common one is when all default |
41e2b43e RD |
7852 | attributes are used and in this case, nothing should be inherited as |
7853 | in modern GUIs different controls use different fonts (and colours) | |
7854 | than their siblings so they can't inherit the same value from the | |
7855 | parent. However it was also deemed desirable to allow to simply change | |
7856 | the attributes of all children at once by just changing the font or | |
7857 | colour of their common parent, hence in this case we do inherit the | |
7858 | parents attributes. | |
7859 | ||
a95a7133 | 7860 | """ |
54f9ee45 | 7861 | return _core_.Window_InheritAttributes(*args, **kwargs) |
a95a7133 RD |
7862 | |
7863 | def ShouldInheritColours(*args, **kwargs): | |
7864 | """ | |
7865 | ShouldInheritColours(self) -> bool | |
7866 | ||
7867 | Return true from here to allow the colours of this window to be | |
41e2b43e RD |
7868 | changed by InheritAttributes, returning false forbids inheriting them |
7869 | from the parent window. | |
a95a7133 | 7870 | |
41e2b43e RD |
7871 | The base class version returns false, but this method is overridden in |
7872 | wxControl where it returns true. | |
a95a7133 | 7873 | """ |
54f9ee45 | 7874 | return _core_.Window_ShouldInheritColours(*args, **kwargs) |
a95a7133 | 7875 | |
e811c8ce | 7876 | def PostCreate(self, pre): |
15afbcd0 RD |
7877 | """ |
7878 | Phase 3 of the 2-phase create <wink!> | |
7879 | Call this method after precreating the window with the 2-phase create method. | |
7880 | """ | |
e811c8ce RD |
7881 | self.this = pre.this |
7882 | self.thisown = pre.thisown | |
7883 | pre.thisown = 0 | |
7884 | if hasattr(self, '_setOORInfo'): | |
7885 | self._setOORInfo(self) | |
7886 | if hasattr(self, '_setCallbackInfo'): | |
7887 | self._setCallbackInfo(self, self.__class__) | |
7888 | ||
7889 | ||
7890 | class WindowPtr(Window): | |
7891 | def __init__(self, this): | |
7892 | self.this = this | |
7893 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7894 | self.__class__ = Window | |
54f9ee45 | 7895 | _core_.Window_swigregister(WindowPtr) |
e811c8ce RD |
7896 | |
7897 | def PreWindow(*args, **kwargs): | |
15afbcd0 RD |
7898 | """ |
7899 | PreWindow() -> Window | |
7900 | ||
7901 | Precreate a Window for 2-phase creation. | |
7902 | """ | |
54f9ee45 | 7903 | val = _core_.new_PreWindow(*args, **kwargs) |
e811c8ce RD |
7904 | val.thisown = 1 |
7905 | return val | |
7906 | ||
7907 | def Window_NewControlId(*args, **kwargs): | |
15afbcd0 RD |
7908 | """ |
7909 | Window_NewControlId() -> int | |
7910 | ||
7911 | Generate a control id for the controls which were not given one. | |
7912 | """ | |
54f9ee45 | 7913 | return _core_.Window_NewControlId(*args, **kwargs) |
e811c8ce RD |
7914 | |
7915 | def Window_NextControlId(*args, **kwargs): | |
15afbcd0 RD |
7916 | """ |
7917 | Window_NextControlId(int winid) -> int | |
7918 | ||
7919 | Get the id of the control following the one with the given | |
41e2b43e | 7920 | autogenerated) id |
15afbcd0 | 7921 | """ |
54f9ee45 | 7922 | return _core_.Window_NextControlId(*args, **kwargs) |
e811c8ce RD |
7923 | |
7924 | def Window_PrevControlId(*args, **kwargs): | |
15afbcd0 RD |
7925 | """ |
7926 | Window_PrevControlId(int winid) -> int | |
7927 | ||
7928 | Get the id of the control preceding the one with the given | |
41e2b43e | 7929 | autogenerated) id |
15afbcd0 | 7930 | """ |
54f9ee45 | 7931 | return _core_.Window_PrevControlId(*args, **kwargs) |
e811c8ce RD |
7932 | |
7933 | def Window_FindFocus(*args, **kwargs): | |
15afbcd0 RD |
7934 | """ |
7935 | Window_FindFocus() -> Window | |
7936 | ||
7937 | Returns the window or control that currently has the keyboard focus, | |
7938 | or None. | |
7939 | """ | |
54f9ee45 | 7940 | return _core_.Window_FindFocus(*args, **kwargs) |
e811c8ce RD |
7941 | |
7942 | def Window_GetCapture(*args, **kwargs): | |
15afbcd0 RD |
7943 | """ |
7944 | Window_GetCapture() -> Window | |
7945 | ||
7946 | Returns the window which currently captures the mouse or None | |
7947 | """ | |
54f9ee45 | 7948 | return _core_.Window_GetCapture(*args, **kwargs) |
e811c8ce | 7949 | |
74a57fcd RD |
7950 | def Window_GetClassDefaultAttributes(*args, **kwargs): |
7951 | """ | |
7952 | Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
7953 | ||
41e2b43e RD |
7954 | Get the default attributes for this class. This is useful if you want |
7955 | to use the same font or colour in your own control as in a standard | |
7956 | control -- which is a much better idea than hard coding specific | |
db3e571a RD |
7957 | colours or fonts which might look completely out of place on the |
7958 | user's system, especially if it uses themes. | |
74a57fcd RD |
7959 | |
7960 | The variant parameter is only relevant under Mac currently and is | |
41e2b43e | 7961 | ignore under other platforms. Under Mac, it will change the size of |
db3e571a RD |
7962 | the returned font. See `wx.Window.SetWindowVariant` for more about |
7963 | this. | |
74a57fcd | 7964 | """ |
54f9ee45 | 7965 | return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 7966 | |
e811c8ce | 7967 | def DLG_PNT(win, point_or_x, y=None): |
15afbcd0 RD |
7968 | """ |
7969 | Convenience function for converting a Point or (x,y) in | |
7970 | dialog units to pixel units. | |
7971 | """ | |
e811c8ce RD |
7972 | if y is None: |
7973 | return win.ConvertDialogPointToPixels(point_or_x) | |
7974 | else: | |
fd3f2efe | 7975 | return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y)) |
e811c8ce RD |
7976 | |
7977 | def DLG_SZE(win, size_width, height=None): | |
15afbcd0 RD |
7978 | """ |
7979 | Convenience function for converting a Size or (w,h) in | |
7980 | dialog units to pixel units. | |
7981 | """ | |
e811c8ce RD |
7982 | if height is None: |
7983 | return win.ConvertDialogSizeToPixels(size_width) | |
7984 | else: | |
fd3f2efe | 7985 | return win.ConvertDialogSizeToPixels(wx.Size(size_width, height)) |
e811c8ce RD |
7986 | |
7987 | ||
7988 | def FindWindowById(*args, **kwargs): | |
15afbcd0 RD |
7989 | """ |
7990 | FindWindowById(long id, Window parent=None) -> Window | |
7991 | ||
7992 | Find the first window in the application with the given id. If parent | |
7993 | is None, the search will start from all top-level frames and dialog | |
7994 | boxes; if non-None, the search will be limited to the given window | |
7995 | hierarchy. The search is recursive in both cases. | |
7996 | """ | |
54f9ee45 | 7997 | return _core_.FindWindowById(*args, **kwargs) |
e811c8ce RD |
7998 | |
7999 | def FindWindowByName(*args, **kwargs): | |
15afbcd0 RD |
8000 | """ |
8001 | FindWindowByName(String name, Window parent=None) -> Window | |
8002 | ||
8003 | Find a window by its name (as given in a window constructor or Create | |
8004 | function call). If parent is None, the search will start from all | |
8005 | top-level frames and dialog boxes; if non-None, the search will be | |
8006 | limited to the given window hierarchy. The search is recursive in both | |
8007 | cases. | |
8008 | ||
8009 | If no window with such name is found, wx.FindWindowByLabel is called. | |
8010 | """ | |
54f9ee45 | 8011 | return _core_.FindWindowByName(*args, **kwargs) |
e811c8ce RD |
8012 | |
8013 | def FindWindowByLabel(*args, **kwargs): | |
15afbcd0 RD |
8014 | """ |
8015 | FindWindowByLabel(String label, Window parent=None) -> Window | |
8016 | ||
8017 | Find a window by its label. Depending on the type of window, the label | |
8018 | may be a window title or panel item label. If parent is None, the | |
8019 | search will start from all top-level frames and dialog boxes; if | |
8020 | non-None, the search will be limited to the given window | |
8021 | hierarchy. The search is recursive in both cases. | |
8022 | """ | |
54f9ee45 | 8023 | return _core_.FindWindowByLabel(*args, **kwargs) |
e811c8ce RD |
8024 | |
8025 | def Window_FromHWND(*args, **kwargs): | |
4276dc52 | 8026 | """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window""" |
54f9ee45 | 8027 | return _core_.Window_FromHWND(*args, **kwargs) |
e811c8ce RD |
8028 | #--------------------------------------------------------------------------- |
8029 | ||
8030 | class Validator(EvtHandler): | |
093d3ff1 | 8031 | """Proxy of C++ Validator class""" |
e811c8ce RD |
8032 | def __repr__(self): |
8033 | return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
8034 | def __init__(self, *args, **kwargs): | |
a95a7133 | 8035 | """__init__(self) -> Validator""" |
54f9ee45 | 8036 | newobj = _core_.new_Validator(*args, **kwargs) |
d14a1e28 RD |
8037 | self.this = newobj.this |
8038 | self.thisown = 1 | |
8039 | del newobj.thisown | |
8040 | self._setOORInfo(self) | |
e811c8ce RD |
8041 | |
8042 | def Clone(*args, **kwargs): | |
a95a7133 | 8043 | """Clone(self) -> Validator""" |
54f9ee45 | 8044 | return _core_.Validator_Clone(*args, **kwargs) |
e811c8ce RD |
8045 | |
8046 | def Validate(*args, **kwargs): | |
a95a7133 | 8047 | """Validate(self, Window parent) -> bool""" |
54f9ee45 | 8048 | return _core_.Validator_Validate(*args, **kwargs) |
e811c8ce RD |
8049 | |
8050 | def TransferToWindow(*args, **kwargs): | |
a95a7133 | 8051 | """TransferToWindow(self) -> bool""" |
54f9ee45 | 8052 | return _core_.Validator_TransferToWindow(*args, **kwargs) |
e811c8ce RD |
8053 | |
8054 | def TransferFromWindow(*args, **kwargs): | |
a95a7133 | 8055 | """TransferFromWindow(self) -> bool""" |
54f9ee45 | 8056 | return _core_.Validator_TransferFromWindow(*args, **kwargs) |
e811c8ce RD |
8057 | |
8058 | def GetWindow(*args, **kwargs): | |
a95a7133 | 8059 | """GetWindow(self) -> Window""" |
54f9ee45 | 8060 | return _core_.Validator_GetWindow(*args, **kwargs) |
e811c8ce RD |
8061 | |
8062 | def SetWindow(*args, **kwargs): | |
a95a7133 | 8063 | """SetWindow(self, Window window)""" |
54f9ee45 | 8064 | return _core_.Validator_SetWindow(*args, **kwargs) |
e811c8ce RD |
8065 | |
8066 | def IsSilent(*args, **kwargs): | |
66c033b4 | 8067 | """IsSilent() -> bool""" |
54f9ee45 | 8068 | return _core_.Validator_IsSilent(*args, **kwargs) |
e811c8ce RD |
8069 | |
8070 | IsSilent = staticmethod(IsSilent) | |
8071 | def SetBellOnError(*args, **kwargs): | |
66c033b4 | 8072 | """SetBellOnError(int doIt=True)""" |
54f9ee45 | 8073 | return _core_.Validator_SetBellOnError(*args, **kwargs) |
e811c8ce RD |
8074 | |
8075 | SetBellOnError = staticmethod(SetBellOnError) | |
8076 | ||
8077 | class ValidatorPtr(Validator): | |
8078 | def __init__(self, this): | |
8079 | self.this = this | |
8080 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8081 | self.__class__ = Validator | |
54f9ee45 | 8082 | _core_.Validator_swigregister(ValidatorPtr) |
e811c8ce RD |
8083 | |
8084 | def Validator_IsSilent(*args, **kwargs): | |
8085 | """Validator_IsSilent() -> bool""" | |
54f9ee45 | 8086 | return _core_.Validator_IsSilent(*args, **kwargs) |
e811c8ce RD |
8087 | |
8088 | def Validator_SetBellOnError(*args, **kwargs): | |
8089 | """Validator_SetBellOnError(int doIt=True)""" | |
54f9ee45 | 8090 | return _core_.Validator_SetBellOnError(*args, **kwargs) |
e811c8ce RD |
8091 | |
8092 | class PyValidator(Validator): | |
093d3ff1 | 8093 | """Proxy of C++ PyValidator class""" |
e811c8ce RD |
8094 | def __repr__(self): |
8095 | return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
8096 | def __init__(self, *args, **kwargs): | |
a95a7133 | 8097 | """__init__(self) -> PyValidator""" |
54f9ee45 | 8098 | newobj = _core_.new_PyValidator(*args, **kwargs) |
e811c8ce RD |
8099 | self.this = newobj.this |
8100 | self.thisown = 1 | |
8101 | del newobj.thisown | |
8102 | ||
8103 | self._setCallbackInfo(self, PyValidator, 1) | |
8104 | self._setOORInfo(self) | |
8105 | ||
8106 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 8107 | """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)""" |
54f9ee45 | 8108 | return _core_.PyValidator__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
8109 | |
8110 | ||
8111 | class PyValidatorPtr(PyValidator): | |
8112 | def __init__(self, this): | |
8113 | self.this = this | |
8114 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8115 | self.__class__ = PyValidator | |
54f9ee45 | 8116 | _core_.PyValidator_swigregister(PyValidatorPtr) |
e811c8ce RD |
8117 | |
8118 | #--------------------------------------------------------------------------- | |
8119 | ||
8120 | class Menu(EvtHandler): | |
093d3ff1 | 8121 | """Proxy of C++ Menu class""" |
d14a1e28 RD |
8122 | def __repr__(self): |
8123 | return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 8124 | def __init__(self, *args, **kwargs): |
a95a7133 | 8125 | """__init__(self, String title=EmptyString, long style=0) -> Menu""" |
54f9ee45 | 8126 | newobj = _core_.new_Menu(*args, **kwargs) |
e811c8ce RD |
8127 | self.this = newobj.this |
8128 | self.thisown = 1 | |
8129 | del newobj.thisown | |
8130 | self._setOORInfo(self) | |
8131 | ||
8132 | def Append(*args, **kwargs): | |
a95a7133 | 8133 | """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
54f9ee45 | 8134 | return _core_.Menu_Append(*args, **kwargs) |
e811c8ce RD |
8135 | |
8136 | def AppendSeparator(*args, **kwargs): | |
a95a7133 | 8137 | """AppendSeparator(self) -> MenuItem""" |
54f9ee45 | 8138 | return _core_.Menu_AppendSeparator(*args, **kwargs) |
e811c8ce RD |
8139 | |
8140 | def AppendCheckItem(*args, **kwargs): | |
a95a7133 | 8141 | """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8142 | return _core_.Menu_AppendCheckItem(*args, **kwargs) |
e811c8ce RD |
8143 | |
8144 | def AppendRadioItem(*args, **kwargs): | |
a95a7133 | 8145 | """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8146 | return _core_.Menu_AppendRadioItem(*args, **kwargs) |
e811c8ce RD |
8147 | |
8148 | def AppendMenu(*args, **kwargs): | |
a95a7133 | 8149 | """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8150 | return _core_.Menu_AppendMenu(*args, **kwargs) |
e811c8ce RD |
8151 | |
8152 | def AppendItem(*args, **kwargs): | |
a95a7133 | 8153 | """AppendItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 8154 | return _core_.Menu_AppendItem(*args, **kwargs) |
e811c8ce RD |
8155 | |
8156 | def Break(*args, **kwargs): | |
a95a7133 | 8157 | """Break(self)""" |
54f9ee45 | 8158 | return _core_.Menu_Break(*args, **kwargs) |
e811c8ce RD |
8159 | |
8160 | def InsertItem(*args, **kwargs): | |
a95a7133 | 8161 | """InsertItem(self, size_t pos, MenuItem item) -> MenuItem""" |
54f9ee45 | 8162 | return _core_.Menu_InsertItem(*args, **kwargs) |
e811c8ce RD |
8163 | |
8164 | def Insert(*args, **kwargs): | |
0df68c9f | 8165 | """ |
a95a7133 | 8166 | Insert(self, size_t pos, int id, String text, String help=EmptyString, |
a41e16b6 | 8167 | int kind=ITEM_NORMAL) -> MenuItem |
0df68c9f | 8168 | """ |
54f9ee45 | 8169 | return _core_.Menu_Insert(*args, **kwargs) |
e811c8ce RD |
8170 | |
8171 | def InsertSeparator(*args, **kwargs): | |
a95a7133 | 8172 | """InsertSeparator(self, size_t pos) -> MenuItem""" |
54f9ee45 | 8173 | return _core_.Menu_InsertSeparator(*args, **kwargs) |
e811c8ce RD |
8174 | |
8175 | def InsertCheckItem(*args, **kwargs): | |
a95a7133 | 8176 | """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8177 | return _core_.Menu_InsertCheckItem(*args, **kwargs) |
e811c8ce RD |
8178 | |
8179 | def InsertRadioItem(*args, **kwargs): | |
a95a7133 | 8180 | """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8181 | return _core_.Menu_InsertRadioItem(*args, **kwargs) |
e811c8ce RD |
8182 | |
8183 | def InsertMenu(*args, **kwargs): | |
a95a7133 | 8184 | """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8185 | return _core_.Menu_InsertMenu(*args, **kwargs) |
e811c8ce RD |
8186 | |
8187 | def PrependItem(*args, **kwargs): | |
a95a7133 | 8188 | """PrependItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 8189 | return _core_.Menu_PrependItem(*args, **kwargs) |
e811c8ce RD |
8190 | |
8191 | def Prepend(*args, **kwargs): | |
a95a7133 | 8192 | """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
54f9ee45 | 8193 | return _core_.Menu_Prepend(*args, **kwargs) |
e811c8ce RD |
8194 | |
8195 | def PrependSeparator(*args, **kwargs): | |
a95a7133 | 8196 | """PrependSeparator(self) -> MenuItem""" |
54f9ee45 | 8197 | return _core_.Menu_PrependSeparator(*args, **kwargs) |
e811c8ce RD |
8198 | |
8199 | def PrependCheckItem(*args, **kwargs): | |
a95a7133 | 8200 | """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8201 | return _core_.Menu_PrependCheckItem(*args, **kwargs) |
e811c8ce RD |
8202 | |
8203 | def PrependRadioItem(*args, **kwargs): | |
a95a7133 | 8204 | """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8205 | return _core_.Menu_PrependRadioItem(*args, **kwargs) |
e811c8ce RD |
8206 | |
8207 | def PrependMenu(*args, **kwargs): | |
a95a7133 | 8208 | """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8209 | return _core_.Menu_PrependMenu(*args, **kwargs) |
e811c8ce RD |
8210 | |
8211 | def Remove(*args, **kwargs): | |
a95a7133 | 8212 | """Remove(self, int id) -> MenuItem""" |
54f9ee45 | 8213 | return _core_.Menu_Remove(*args, **kwargs) |
e811c8ce RD |
8214 | |
8215 | def RemoveItem(*args, **kwargs): | |
a95a7133 | 8216 | """RemoveItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 8217 | return _core_.Menu_RemoveItem(*args, **kwargs) |
e811c8ce RD |
8218 | |
8219 | def Delete(*args, **kwargs): | |
a95a7133 | 8220 | """Delete(self, int id) -> bool""" |
54f9ee45 | 8221 | return _core_.Menu_Delete(*args, **kwargs) |
e811c8ce RD |
8222 | |
8223 | def DeleteItem(*args, **kwargs): | |
a95a7133 | 8224 | """DeleteItem(self, MenuItem item) -> bool""" |
54f9ee45 | 8225 | return _core_.Menu_DeleteItem(*args, **kwargs) |
e811c8ce RD |
8226 | |
8227 | def Destroy(*args, **kwargs): | |
0df68c9f | 8228 | """ |
a95a7133 | 8229 | Destroy(self) |
e811c8ce | 8230 | |
0df68c9f RD |
8231 | Deletes the C++ object this Python object is a proxy for. |
8232 | """ | |
54f9ee45 | 8233 | return _core_.Menu_Destroy(*args, **kwargs) |
e811c8ce RD |
8234 | |
8235 | def DestroyId(*args, **kwargs): | |
0df68c9f | 8236 | """ |
a95a7133 | 8237 | DestroyId(self, int id) -> bool |
e811c8ce | 8238 | |
0df68c9f RD |
8239 | Deletes the C++ object this Python object is a proxy for. |
8240 | """ | |
54f9ee45 | 8241 | return _core_.Menu_DestroyId(*args, **kwargs) |
e811c8ce RD |
8242 | |
8243 | def DestroyItem(*args, **kwargs): | |
0df68c9f | 8244 | """ |
a95a7133 | 8245 | DestroyItem(self, MenuItem item) -> bool |
e811c8ce | 8246 | |
0df68c9f RD |
8247 | Deletes the C++ object this Python object is a proxy for. |
8248 | """ | |
54f9ee45 | 8249 | return _core_.Menu_DestroyItem(*args, **kwargs) |
e811c8ce RD |
8250 | |
8251 | def GetMenuItemCount(*args, **kwargs): | |
a95a7133 | 8252 | """GetMenuItemCount(self) -> size_t""" |
54f9ee45 | 8253 | return _core_.Menu_GetMenuItemCount(*args, **kwargs) |
e811c8ce RD |
8254 | |
8255 | def GetMenuItems(*args, **kwargs): | |
a95a7133 | 8256 | """GetMenuItems(self) -> PyObject""" |
54f9ee45 | 8257 | return _core_.Menu_GetMenuItems(*args, **kwargs) |
e811c8ce RD |
8258 | |
8259 | def FindItem(*args, **kwargs): | |
a95a7133 | 8260 | """FindItem(self, String item) -> int""" |
54f9ee45 | 8261 | return _core_.Menu_FindItem(*args, **kwargs) |
e811c8ce RD |
8262 | |
8263 | def FindItemById(*args, **kwargs): | |
a95a7133 | 8264 | """FindItemById(self, int id) -> MenuItem""" |
54f9ee45 | 8265 | return _core_.Menu_FindItemById(*args, **kwargs) |
e811c8ce RD |
8266 | |
8267 | def FindItemByPosition(*args, **kwargs): | |
a95a7133 | 8268 | """FindItemByPosition(self, size_t position) -> MenuItem""" |
54f9ee45 | 8269 | return _core_.Menu_FindItemByPosition(*args, **kwargs) |
e811c8ce RD |
8270 | |
8271 | def Enable(*args, **kwargs): | |
a95a7133 | 8272 | """Enable(self, int id, bool enable)""" |
54f9ee45 | 8273 | return _core_.Menu_Enable(*args, **kwargs) |
e811c8ce RD |
8274 | |
8275 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 8276 | """IsEnabled(self, int id) -> bool""" |
54f9ee45 | 8277 | return _core_.Menu_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8278 | |
8279 | def Check(*args, **kwargs): | |
a95a7133 | 8280 | """Check(self, int id, bool check)""" |
54f9ee45 | 8281 | return _core_.Menu_Check(*args, **kwargs) |
e811c8ce RD |
8282 | |
8283 | def IsChecked(*args, **kwargs): | |
a95a7133 | 8284 | """IsChecked(self, int id) -> bool""" |
54f9ee45 | 8285 | return _core_.Menu_IsChecked(*args, **kwargs) |
e811c8ce RD |
8286 | |
8287 | def SetLabel(*args, **kwargs): | |
a95a7133 | 8288 | """SetLabel(self, int id, String label)""" |
54f9ee45 | 8289 | return _core_.Menu_SetLabel(*args, **kwargs) |
e811c8ce RD |
8290 | |
8291 | def GetLabel(*args, **kwargs): | |
a95a7133 | 8292 | """GetLabel(self, int id) -> String""" |
54f9ee45 | 8293 | return _core_.Menu_GetLabel(*args, **kwargs) |
e811c8ce RD |
8294 | |
8295 | def SetHelpString(*args, **kwargs): | |
a95a7133 | 8296 | """SetHelpString(self, int id, String helpString)""" |
54f9ee45 | 8297 | return _core_.Menu_SetHelpString(*args, **kwargs) |
e811c8ce RD |
8298 | |
8299 | def GetHelpString(*args, **kwargs): | |
a95a7133 | 8300 | """GetHelpString(self, int id) -> String""" |
54f9ee45 | 8301 | return _core_.Menu_GetHelpString(*args, **kwargs) |
e811c8ce RD |
8302 | |
8303 | def SetTitle(*args, **kwargs): | |
a95a7133 | 8304 | """SetTitle(self, String title)""" |
54f9ee45 | 8305 | return _core_.Menu_SetTitle(*args, **kwargs) |
e811c8ce RD |
8306 | |
8307 | def GetTitle(*args, **kwargs): | |
a95a7133 | 8308 | """GetTitle(self) -> String""" |
54f9ee45 | 8309 | return _core_.Menu_GetTitle(*args, **kwargs) |
e811c8ce RD |
8310 | |
8311 | def SetEventHandler(*args, **kwargs): | |
a95a7133 | 8312 | """SetEventHandler(self, EvtHandler handler)""" |
54f9ee45 | 8313 | return _core_.Menu_SetEventHandler(*args, **kwargs) |
e811c8ce RD |
8314 | |
8315 | def GetEventHandler(*args, **kwargs): | |
a95a7133 | 8316 | """GetEventHandler(self) -> EvtHandler""" |
54f9ee45 | 8317 | return _core_.Menu_GetEventHandler(*args, **kwargs) |
e811c8ce RD |
8318 | |
8319 | def SetInvokingWindow(*args, **kwargs): | |
a95a7133 | 8320 | """SetInvokingWindow(self, Window win)""" |
54f9ee45 | 8321 | return _core_.Menu_SetInvokingWindow(*args, **kwargs) |
e811c8ce RD |
8322 | |
8323 | def GetInvokingWindow(*args, **kwargs): | |
a95a7133 | 8324 | """GetInvokingWindow(self) -> Window""" |
54f9ee45 | 8325 | return _core_.Menu_GetInvokingWindow(*args, **kwargs) |
e811c8ce RD |
8326 | |
8327 | def GetStyle(*args, **kwargs): | |
a95a7133 | 8328 | """GetStyle(self) -> long""" |
54f9ee45 | 8329 | return _core_.Menu_GetStyle(*args, **kwargs) |
e811c8ce RD |
8330 | |
8331 | def UpdateUI(*args, **kwargs): | |
a95a7133 | 8332 | """UpdateUI(self, EvtHandler source=None)""" |
54f9ee45 | 8333 | return _core_.Menu_UpdateUI(*args, **kwargs) |
e811c8ce RD |
8334 | |
8335 | def GetMenuBar(*args, **kwargs): | |
a95a7133 | 8336 | """GetMenuBar(self) -> MenuBar""" |
54f9ee45 | 8337 | return _core_.Menu_GetMenuBar(*args, **kwargs) |
e811c8ce RD |
8338 | |
8339 | def Attach(*args, **kwargs): | |
a95a7133 | 8340 | """Attach(self, wxMenuBarBase menubar)""" |
54f9ee45 | 8341 | return _core_.Menu_Attach(*args, **kwargs) |
e811c8ce RD |
8342 | |
8343 | def Detach(*args, **kwargs): | |
a95a7133 | 8344 | """Detach(self)""" |
54f9ee45 | 8345 | return _core_.Menu_Detach(*args, **kwargs) |
e811c8ce RD |
8346 | |
8347 | def IsAttached(*args, **kwargs): | |
a95a7133 | 8348 | """IsAttached(self) -> bool""" |
54f9ee45 | 8349 | return _core_.Menu_IsAttached(*args, **kwargs) |
e811c8ce RD |
8350 | |
8351 | def SetParent(*args, **kwargs): | |
a95a7133 | 8352 | """SetParent(self, Menu parent)""" |
54f9ee45 | 8353 | return _core_.Menu_SetParent(*args, **kwargs) |
e811c8ce RD |
8354 | |
8355 | def GetParent(*args, **kwargs): | |
a95a7133 | 8356 | """GetParent(self) -> Menu""" |
54f9ee45 | 8357 | return _core_.Menu_GetParent(*args, **kwargs) |
e811c8ce | 8358 | |
d14a1e28 RD |
8359 | |
8360 | class MenuPtr(Menu): | |
8361 | def __init__(self, this): | |
8362 | self.this = this | |
8363 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8364 | self.__class__ = Menu | |
54f9ee45 | 8365 | _core_.Menu_swigregister(MenuPtr) |
d14a1e28 RD |
8366 | DefaultValidator = cvar.DefaultValidator |
8367 | ||
8368 | #--------------------------------------------------------------------------- | |
8369 | ||
8370 | class MenuBar(Window): | |
093d3ff1 | 8371 | """Proxy of C++ MenuBar class""" |
e811c8ce RD |
8372 | def __repr__(self): |
8373 | return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8374 | def __init__(self, *args, **kwargs): |
a95a7133 | 8375 | """__init__(self, long style=0) -> MenuBar""" |
54f9ee45 | 8376 | newobj = _core_.new_MenuBar(*args, **kwargs) |
d14a1e28 RD |
8377 | self.this = newobj.this |
8378 | self.thisown = 1 | |
8379 | del newobj.thisown | |
8380 | self._setOORInfo(self) | |
e811c8ce RD |
8381 | |
8382 | def Append(*args, **kwargs): | |
a95a7133 | 8383 | """Append(self, Menu menu, String title) -> bool""" |
54f9ee45 | 8384 | return _core_.MenuBar_Append(*args, **kwargs) |
e811c8ce RD |
8385 | |
8386 | def Insert(*args, **kwargs): | |
a95a7133 | 8387 | """Insert(self, size_t pos, Menu menu, String title) -> bool""" |
54f9ee45 | 8388 | return _core_.MenuBar_Insert(*args, **kwargs) |
e811c8ce RD |
8389 | |
8390 | def GetMenuCount(*args, **kwargs): | |
a95a7133 | 8391 | """GetMenuCount(self) -> size_t""" |
54f9ee45 | 8392 | return _core_.MenuBar_GetMenuCount(*args, **kwargs) |
e811c8ce RD |
8393 | |
8394 | def GetMenu(*args, **kwargs): | |
a95a7133 | 8395 | """GetMenu(self, size_t pos) -> Menu""" |
54f9ee45 | 8396 | return _core_.MenuBar_GetMenu(*args, **kwargs) |
e811c8ce RD |
8397 | |
8398 | def Replace(*args, **kwargs): | |
a95a7133 | 8399 | """Replace(self, size_t pos, Menu menu, String title) -> Menu""" |
54f9ee45 | 8400 | return _core_.MenuBar_Replace(*args, **kwargs) |
e811c8ce RD |
8401 | |
8402 | def Remove(*args, **kwargs): | |
a95a7133 | 8403 | """Remove(self, size_t pos) -> Menu""" |
54f9ee45 | 8404 | return _core_.MenuBar_Remove(*args, **kwargs) |
e811c8ce RD |
8405 | |
8406 | def EnableTop(*args, **kwargs): | |
a95a7133 | 8407 | """EnableTop(self, size_t pos, bool enable)""" |
54f9ee45 | 8408 | return _core_.MenuBar_EnableTop(*args, **kwargs) |
e811c8ce RD |
8409 | |
8410 | def IsEnabledTop(*args, **kwargs): | |
a95a7133 | 8411 | """IsEnabledTop(self, size_t pos) -> bool""" |
54f9ee45 | 8412 | return _core_.MenuBar_IsEnabledTop(*args, **kwargs) |
e811c8ce RD |
8413 | |
8414 | def SetLabelTop(*args, **kwargs): | |
a95a7133 | 8415 | """SetLabelTop(self, size_t pos, String label)""" |
54f9ee45 | 8416 | return _core_.MenuBar_SetLabelTop(*args, **kwargs) |
e811c8ce RD |
8417 | |
8418 | def GetLabelTop(*args, **kwargs): | |
a95a7133 | 8419 | """GetLabelTop(self, size_t pos) -> String""" |
54f9ee45 | 8420 | return _core_.MenuBar_GetLabelTop(*args, **kwargs) |
e811c8ce RD |
8421 | |
8422 | def FindMenuItem(*args, **kwargs): | |
a95a7133 | 8423 | """FindMenuItem(self, String menu, String item) -> int""" |
54f9ee45 | 8424 | return _core_.MenuBar_FindMenuItem(*args, **kwargs) |
e811c8ce RD |
8425 | |
8426 | def FindItemById(*args, **kwargs): | |
a95a7133 | 8427 | """FindItemById(self, int id) -> MenuItem""" |
54f9ee45 | 8428 | return _core_.MenuBar_FindItemById(*args, **kwargs) |
e811c8ce RD |
8429 | |
8430 | def FindMenu(*args, **kwargs): | |
a95a7133 | 8431 | """FindMenu(self, String title) -> int""" |
54f9ee45 | 8432 | return _core_.MenuBar_FindMenu(*args, **kwargs) |
e811c8ce RD |
8433 | |
8434 | def Enable(*args, **kwargs): | |
a95a7133 | 8435 | """Enable(self, int id, bool enable)""" |
54f9ee45 | 8436 | return _core_.MenuBar_Enable(*args, **kwargs) |
e811c8ce RD |
8437 | |
8438 | def Check(*args, **kwargs): | |
a95a7133 | 8439 | """Check(self, int id, bool check)""" |
54f9ee45 | 8440 | return _core_.MenuBar_Check(*args, **kwargs) |
e811c8ce RD |
8441 | |
8442 | def IsChecked(*args, **kwargs): | |
a95a7133 | 8443 | """IsChecked(self, int id) -> bool""" |
54f9ee45 | 8444 | return _core_.MenuBar_IsChecked(*args, **kwargs) |
e811c8ce RD |
8445 | |
8446 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 8447 | """IsEnabled(self, int id) -> bool""" |
54f9ee45 | 8448 | return _core_.MenuBar_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8449 | |
8450 | def SetLabel(*args, **kwargs): | |
a95a7133 | 8451 | """SetLabel(self, int id, String label)""" |
54f9ee45 | 8452 | return _core_.MenuBar_SetLabel(*args, **kwargs) |
e811c8ce RD |
8453 | |
8454 | def GetLabel(*args, **kwargs): | |
a95a7133 | 8455 | """GetLabel(self, int id) -> String""" |
54f9ee45 | 8456 | return _core_.MenuBar_GetLabel(*args, **kwargs) |
e811c8ce RD |
8457 | |
8458 | def SetHelpString(*args, **kwargs): | |
a95a7133 | 8459 | """SetHelpString(self, int id, String helpString)""" |
54f9ee45 | 8460 | return _core_.MenuBar_SetHelpString(*args, **kwargs) |
e811c8ce RD |
8461 | |
8462 | def GetHelpString(*args, **kwargs): | |
a95a7133 | 8463 | """GetHelpString(self, int id) -> String""" |
54f9ee45 | 8464 | return _core_.MenuBar_GetHelpString(*args, **kwargs) |
e811c8ce RD |
8465 | |
8466 | def GetFrame(*args, **kwargs): | |
a95a7133 | 8467 | """GetFrame(self) -> wxFrame""" |
54f9ee45 | 8468 | return _core_.MenuBar_GetFrame(*args, **kwargs) |
e811c8ce RD |
8469 | |
8470 | def IsAttached(*args, **kwargs): | |
a95a7133 | 8471 | """IsAttached(self) -> bool""" |
54f9ee45 | 8472 | return _core_.MenuBar_IsAttached(*args, **kwargs) |
e811c8ce RD |
8473 | |
8474 | def Attach(*args, **kwargs): | |
a95a7133 | 8475 | """Attach(self, wxFrame frame)""" |
54f9ee45 | 8476 | return _core_.MenuBar_Attach(*args, **kwargs) |
e811c8ce RD |
8477 | |
8478 | def Detach(*args, **kwargs): | |
a95a7133 | 8479 | """Detach(self)""" |
54f9ee45 | 8480 | return _core_.MenuBar_Detach(*args, **kwargs) |
e811c8ce | 8481 | |
d14a1e28 RD |
8482 | |
8483 | class MenuBarPtr(MenuBar): | |
8484 | def __init__(self, this): | |
8485 | self.this = this | |
8486 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8487 | self.__class__ = MenuBar | |
54f9ee45 | 8488 | _core_.MenuBar_swigregister(MenuBarPtr) |
d14a1e28 RD |
8489 | |
8490 | #--------------------------------------------------------------------------- | |
8491 | ||
8492 | class MenuItem(Object): | |
093d3ff1 | 8493 | """Proxy of C++ MenuItem class""" |
e811c8ce RD |
8494 | def __repr__(self): |
8495 | return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8496 | def __init__(self, *args, **kwargs): |
0df68c9f | 8497 | """ |
a95a7133 | 8498 | __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString, |
196addbf RD |
8499 | String help=EmptyString, int kind=ITEM_NORMAL, |
8500 | Menu subMenu=None) -> MenuItem | |
0df68c9f | 8501 | """ |
54f9ee45 | 8502 | newobj = _core_.new_MenuItem(*args, **kwargs) |
d14a1e28 RD |
8503 | self.this = newobj.this |
8504 | self.thisown = 1 | |
8505 | del newobj.thisown | |
e811c8ce | 8506 | def GetMenu(*args, **kwargs): |
a95a7133 | 8507 | """GetMenu(self) -> Menu""" |
54f9ee45 | 8508 | return _core_.MenuItem_GetMenu(*args, **kwargs) |
e811c8ce RD |
8509 | |
8510 | def SetMenu(*args, **kwargs): | |
a95a7133 | 8511 | """SetMenu(self, Menu menu)""" |
54f9ee45 | 8512 | return _core_.MenuItem_SetMenu(*args, **kwargs) |
e811c8ce RD |
8513 | |
8514 | def SetId(*args, **kwargs): | |
a95a7133 | 8515 | """SetId(self, int id)""" |
54f9ee45 | 8516 | return _core_.MenuItem_SetId(*args, **kwargs) |
e811c8ce RD |
8517 | |
8518 | def GetId(*args, **kwargs): | |
a95a7133 | 8519 | """GetId(self) -> int""" |
54f9ee45 | 8520 | return _core_.MenuItem_GetId(*args, **kwargs) |
e811c8ce RD |
8521 | |
8522 | def IsSeparator(*args, **kwargs): | |
a95a7133 | 8523 | """IsSeparator(self) -> bool""" |
54f9ee45 | 8524 | return _core_.MenuItem_IsSeparator(*args, **kwargs) |
e811c8ce RD |
8525 | |
8526 | def SetText(*args, **kwargs): | |
a95a7133 | 8527 | """SetText(self, String str)""" |
54f9ee45 | 8528 | return _core_.MenuItem_SetText(*args, **kwargs) |
e811c8ce RD |
8529 | |
8530 | def GetLabel(*args, **kwargs): | |
a95a7133 | 8531 | """GetLabel(self) -> String""" |
54f9ee45 | 8532 | return _core_.MenuItem_GetLabel(*args, **kwargs) |
e811c8ce RD |
8533 | |
8534 | def GetText(*args, **kwargs): | |
a95a7133 | 8535 | """GetText(self) -> String""" |
54f9ee45 | 8536 | return _core_.MenuItem_GetText(*args, **kwargs) |
e811c8ce RD |
8537 | |
8538 | def GetLabelFromText(*args, **kwargs): | |
66c033b4 | 8539 | """GetLabelFromText(String text) -> String""" |
54f9ee45 | 8540 | return _core_.MenuItem_GetLabelFromText(*args, **kwargs) |
e811c8ce RD |
8541 | |
8542 | GetLabelFromText = staticmethod(GetLabelFromText) | |
8543 | def GetKind(*args, **kwargs): | |
a95a7133 | 8544 | """GetKind(self) -> int""" |
54f9ee45 | 8545 | return _core_.MenuItem_GetKind(*args, **kwargs) |
e811c8ce | 8546 | |
a95a7133 RD |
8547 | def SetKind(*args, **kwargs): |
8548 | """SetKind(self, int kind)""" | |
54f9ee45 | 8549 | return _core_.MenuItem_SetKind(*args, **kwargs) |
a95a7133 | 8550 | |
e811c8ce | 8551 | def SetCheckable(*args, **kwargs): |
a95a7133 | 8552 | """SetCheckable(self, bool checkable)""" |
54f9ee45 | 8553 | return _core_.MenuItem_SetCheckable(*args, **kwargs) |
e811c8ce RD |
8554 | |
8555 | def IsCheckable(*args, **kwargs): | |
a95a7133 | 8556 | """IsCheckable(self) -> bool""" |
54f9ee45 | 8557 | return _core_.MenuItem_IsCheckable(*args, **kwargs) |
e811c8ce RD |
8558 | |
8559 | def IsSubMenu(*args, **kwargs): | |
a95a7133 | 8560 | """IsSubMenu(self) -> bool""" |
54f9ee45 | 8561 | return _core_.MenuItem_IsSubMenu(*args, **kwargs) |
e811c8ce RD |
8562 | |
8563 | def SetSubMenu(*args, **kwargs): | |
a95a7133 | 8564 | """SetSubMenu(self, Menu menu)""" |
54f9ee45 | 8565 | return _core_.MenuItem_SetSubMenu(*args, **kwargs) |
e811c8ce RD |
8566 | |
8567 | def GetSubMenu(*args, **kwargs): | |
a95a7133 | 8568 | """GetSubMenu(self) -> Menu""" |
54f9ee45 | 8569 | return _core_.MenuItem_GetSubMenu(*args, **kwargs) |
e811c8ce RD |
8570 | |
8571 | def Enable(*args, **kwargs): | |
a95a7133 | 8572 | """Enable(self, bool enable=True)""" |
54f9ee45 | 8573 | return _core_.MenuItem_Enable(*args, **kwargs) |
e811c8ce RD |
8574 | |
8575 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 8576 | """IsEnabled(self) -> bool""" |
54f9ee45 | 8577 | return _core_.MenuItem_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8578 | |
8579 | def Check(*args, **kwargs): | |
a95a7133 | 8580 | """Check(self, bool check=True)""" |
54f9ee45 | 8581 | return _core_.MenuItem_Check(*args, **kwargs) |
e811c8ce RD |
8582 | |
8583 | def IsChecked(*args, **kwargs): | |
a95a7133 | 8584 | """IsChecked(self) -> bool""" |
54f9ee45 | 8585 | return _core_.MenuItem_IsChecked(*args, **kwargs) |
e811c8ce RD |
8586 | |
8587 | def Toggle(*args, **kwargs): | |
a95a7133 | 8588 | """Toggle(self)""" |
54f9ee45 | 8589 | return _core_.MenuItem_Toggle(*args, **kwargs) |
e811c8ce RD |
8590 | |
8591 | def SetHelp(*args, **kwargs): | |
a95a7133 | 8592 | """SetHelp(self, String str)""" |
54f9ee45 | 8593 | return _core_.MenuItem_SetHelp(*args, **kwargs) |
e811c8ce RD |
8594 | |
8595 | def GetHelp(*args, **kwargs): | |
a95a7133 | 8596 | """GetHelp(self) -> String""" |
54f9ee45 | 8597 | return _core_.MenuItem_GetHelp(*args, **kwargs) |
e811c8ce RD |
8598 | |
8599 | def GetAccel(*args, **kwargs): | |
a95a7133 | 8600 | """GetAccel(self) -> AcceleratorEntry""" |
54f9ee45 | 8601 | return _core_.MenuItem_GetAccel(*args, **kwargs) |
e811c8ce RD |
8602 | |
8603 | def SetAccel(*args, **kwargs): | |
a95a7133 | 8604 | """SetAccel(self, AcceleratorEntry accel)""" |
54f9ee45 | 8605 | return _core_.MenuItem_SetAccel(*args, **kwargs) |
e811c8ce RD |
8606 | |
8607 | def GetDefaultMarginWidth(*args, **kwargs): | |
66c033b4 | 8608 | """GetDefaultMarginWidth() -> int""" |
54f9ee45 | 8609 | return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs) |
e811c8ce RD |
8610 | |
8611 | GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) | |
8612 | def SetBitmap(*args, **kwargs): | |
a95a7133 | 8613 | """SetBitmap(self, Bitmap bitmap)""" |
54f9ee45 | 8614 | return _core_.MenuItem_SetBitmap(*args, **kwargs) |
e811c8ce RD |
8615 | |
8616 | def GetBitmap(*args, **kwargs): | |
a95a7133 | 8617 | """GetBitmap(self) -> Bitmap""" |
54f9ee45 | 8618 | return _core_.MenuItem_GetBitmap(*args, **kwargs) |
e811c8ce | 8619 | |
d14a1e28 RD |
8620 | |
8621 | class MenuItemPtr(MenuItem): | |
8622 | def __init__(self, this): | |
8623 | self.this = this | |
8624 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8625 | self.__class__ = MenuItem | |
54f9ee45 | 8626 | _core_.MenuItem_swigregister(MenuItemPtr) |
d14a1e28 | 8627 | |
e811c8ce | 8628 | def MenuItem_GetLabelFromText(*args, **kwargs): |
196addbf | 8629 | """MenuItem_GetLabelFromText(String text) -> String""" |
54f9ee45 | 8630 | return _core_.MenuItem_GetLabelFromText(*args, **kwargs) |
d14a1e28 | 8631 | |
e811c8ce RD |
8632 | def MenuItem_GetDefaultMarginWidth(*args, **kwargs): |
8633 | """MenuItem_GetDefaultMarginWidth() -> int""" | |
54f9ee45 | 8634 | return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs) |
d14a1e28 RD |
8635 | |
8636 | #--------------------------------------------------------------------------- | |
8637 | ||
8638 | class Control(Window): | |
15afbcd0 RD |
8639 | """ |
8640 | This is the base class for a control or 'widget'. | |
8641 | ||
41e2b43e RD |
8642 | A control is generally a small window which processes user input |
8643 | and/or displays one or more item of data. | |
15afbcd0 | 8644 | """ |
e811c8ce RD |
8645 | def __repr__(self): |
8646 | return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8647 | def __init__(self, *args, **kwargs): |
0df68c9f | 8648 | """ |
248ed943 RD |
8649 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
8650 | Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 8651 | String name=ControlNameStr) -> Control |
15afbcd0 | 8652 | |
41e2b43e RD |
8653 | Create a Control. Normally you should only call this from a subclass' |
8654 | __init__ as a plain old wx.Control is not very useful. | |
0df68c9f | 8655 | """ |
54f9ee45 | 8656 | newobj = _core_.new_Control(*args, **kwargs) |
d14a1e28 RD |
8657 | self.this = newobj.this |
8658 | self.thisown = 1 | |
8659 | del newobj.thisown | |
8660 | self._setOORInfo(self) | |
e811c8ce RD |
8661 | |
8662 | def Create(*args, **kwargs): | |
0df68c9f | 8663 | """ |
248ed943 RD |
8664 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
8665 | Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 8666 | String name=ControlNameStr) -> bool |
15afbcd0 RD |
8667 | |
8668 | Do the 2nd phase and create the GUI control. | |
0df68c9f | 8669 | """ |
54f9ee45 | 8670 | return _core_.Control_Create(*args, **kwargs) |
e811c8ce RD |
8671 | |
8672 | def Command(*args, **kwargs): | |
15afbcd0 | 8673 | """ |
a95a7133 | 8674 | Command(self, CommandEvent event) |
15afbcd0 | 8675 | |
41e2b43e RD |
8676 | Simulates the effect of the user issuing a command to the item. |
8677 | ||
8678 | :see: `wx.CommandEvent` | |
8679 | ||
15afbcd0 | 8680 | """ |
54f9ee45 | 8681 | return _core_.Control_Command(*args, **kwargs) |
e811c8ce RD |
8682 | |
8683 | def GetLabel(*args, **kwargs): | |
15afbcd0 | 8684 | """ |
a95a7133 | 8685 | GetLabel(self) -> String |
15afbcd0 RD |
8686 | |
8687 | Return a control's text. | |
8688 | """ | |
54f9ee45 | 8689 | return _core_.Control_GetLabel(*args, **kwargs) |
e811c8ce RD |
8690 | |
8691 | def SetLabel(*args, **kwargs): | |
15afbcd0 | 8692 | """ |
a95a7133 | 8693 | SetLabel(self, String label) |
15afbcd0 RD |
8694 | |
8695 | Sets the item's text. | |
8696 | """ | |
54f9ee45 | 8697 | return _core_.Control_SetLabel(*args, **kwargs) |
e811c8ce | 8698 | |
74a57fcd | 8699 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
8700 | """ |
8701 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
8702 | ||
8703 | Get the default attributes for this class. This is useful if you want | |
8704 | to use the same font or colour in your own control as in a standard | |
8705 | control -- which is a much better idea than hard coding specific | |
8706 | colours or fonts which might look completely out of place on the | |
8707 | user's system, especially if it uses themes. | |
8708 | ||
8709 | The variant parameter is only relevant under Mac currently and is | |
8710 | ignore under other platforms. Under Mac, it will change the size of | |
8711 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
8712 | this. | |
8713 | """ | |
54f9ee45 | 8714 | return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
8715 | |
8716 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
d14a1e28 RD |
8717 | |
8718 | class ControlPtr(Control): | |
8719 | def __init__(self, this): | |
8720 | self.this = this | |
8721 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8722 | self.__class__ = Control | |
54f9ee45 | 8723 | _core_.Control_swigregister(ControlPtr) |
b2dc1044 | 8724 | ControlNameStr = cvar.ControlNameStr |
d14a1e28 RD |
8725 | |
8726 | def PreControl(*args, **kwargs): | |
15afbcd0 RD |
8727 | """ |
8728 | PreControl() -> Control | |
8729 | ||
8730 | Precreate a Control control for 2-phase creation | |
8731 | """ | |
54f9ee45 | 8732 | val = _core_.new_PreControl(*args, **kwargs) |
d14a1e28 RD |
8733 | val.thisown = 1 |
8734 | return val | |
8735 | ||
74a57fcd | 8736 | def Control_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
8737 | """ |
8738 | Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
8739 | ||
8740 | Get the default attributes for this class. This is useful if you want | |
8741 | to use the same font or colour in your own control as in a standard | |
8742 | control -- which is a much better idea than hard coding specific | |
8743 | colours or fonts which might look completely out of place on the | |
8744 | user's system, especially if it uses themes. | |
8745 | ||
8746 | The variant parameter is only relevant under Mac currently and is | |
8747 | ignore under other platforms. Under Mac, it will change the size of | |
8748 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
8749 | this. | |
8750 | """ | |
54f9ee45 | 8751 | return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 8752 | |
d14a1e28 RD |
8753 | #--------------------------------------------------------------------------- |
8754 | ||
8755 | class ItemContainer(object): | |
15afbcd0 RD |
8756 | """ |
8757 | wx.ItemContainer defines an interface which is implemented by all | |
41e2b43e RD |
8758 | controls which have string subitems, each of which may be selected, |
8759 | such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as | |
8760 | `wx.ComboBox` which implements an extended interface deriving from | |
8761 | this one. | |
15afbcd0 | 8762 | |
41e2b43e RD |
8763 | It defines the methods for accessing the control's items and although |
8764 | each of the derived classes implements them differently, they still | |
8765 | all conform to the same interface. | |
15afbcd0 | 8766 | |
41e2b43e RD |
8767 | The items in a wx.ItemContainer have (non empty) string labels and, |
8768 | optionally, client data associated with them. | |
15afbcd0 RD |
8769 | |
8770 | """ | |
d14a1e28 RD |
8771 | def __init__(self): raise RuntimeError, "No constructor defined" |
8772 | def __repr__(self): | |
8773 | return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 8774 | def Append(*args, **kwargs): |
15afbcd0 | 8775 | """ |
a95a7133 | 8776 | Append(self, String item, PyObject clientData=None) -> int |
15afbcd0 | 8777 | |
41e2b43e RD |
8778 | Adds the item to the control, associating the given data with the item |
8779 | if not None. The return value is the index of the newly added item | |
8780 | which may be different from the last one if the control is sorted (e.g. | |
8781 | has wx.LB_SORT or wx.CB_SORT style). | |
15afbcd0 | 8782 | """ |
54f9ee45 | 8783 | return _core_.ItemContainer_Append(*args, **kwargs) |
e811c8ce RD |
8784 | |
8785 | def AppendItems(*args, **kwargs): | |
15afbcd0 | 8786 | """ |
f5b96ee1 | 8787 | AppendItems(self, List strings) |
15afbcd0 | 8788 | |
41e2b43e RD |
8789 | Apend several items at once to the control. Notice that calling this |
8790 | method may be much faster than appending the items one by one if you | |
8791 | need to add a lot of items. | |
15afbcd0 | 8792 | """ |
54f9ee45 | 8793 | return _core_.ItemContainer_AppendItems(*args, **kwargs) |
e811c8ce RD |
8794 | |
8795 | def Insert(*args, **kwargs): | |
15afbcd0 | 8796 | """ |
a95a7133 | 8797 | Insert(self, String item, int pos, PyObject clientData=None) -> int |
15afbcd0 | 8798 | |
41e2b43e | 8799 | Insert an item into the control before the item at the ``pos`` index, |
15afbcd0 RD |
8800 | optionally associating some data object with the item. |
8801 | """ | |
54f9ee45 | 8802 | return _core_.ItemContainer_Insert(*args, **kwargs) |
e811c8ce RD |
8803 | |
8804 | def Clear(*args, **kwargs): | |
15afbcd0 | 8805 | """ |
a95a7133 | 8806 | Clear(self) |
15afbcd0 RD |
8807 | |
8808 | Removes all items from the control. | |
8809 | """ | |
54f9ee45 | 8810 | return _core_.ItemContainer_Clear(*args, **kwargs) |
e811c8ce RD |
8811 | |
8812 | def Delete(*args, **kwargs): | |
15afbcd0 | 8813 | """ |
a95a7133 | 8814 | Delete(self, int n) |
15afbcd0 | 8815 | |
41e2b43e RD |
8816 | Deletes the item at the zero-based index 'n' from the control. Note |
8817 | that it is an error (signalled by a `wx.PyAssertionError` exception if | |
8818 | enabled) to remove an item with the index negative or greater or equal | |
8819 | than the number of items in the control. | |
15afbcd0 | 8820 | """ |
54f9ee45 | 8821 | return _core_.ItemContainer_Delete(*args, **kwargs) |
e811c8ce RD |
8822 | |
8823 | def GetCount(*args, **kwargs): | |
15afbcd0 | 8824 | """ |
a95a7133 | 8825 | GetCount(self) -> int |
15afbcd0 RD |
8826 | |
8827 | Returns the number of items in the control. | |
8828 | """ | |
54f9ee45 | 8829 | return _core_.ItemContainer_GetCount(*args, **kwargs) |
e811c8ce RD |
8830 | |
8831 | def IsEmpty(*args, **kwargs): | |
15afbcd0 | 8832 | """ |
a95a7133 | 8833 | IsEmpty(self) -> bool |
15afbcd0 RD |
8834 | |
8835 | Returns True if the control is empty or False if it has some items. | |
8836 | """ | |
54f9ee45 | 8837 | return _core_.ItemContainer_IsEmpty(*args, **kwargs) |
e811c8ce RD |
8838 | |
8839 | def GetString(*args, **kwargs): | |
15afbcd0 | 8840 | """ |
a95a7133 | 8841 | GetString(self, int n) -> String |
15afbcd0 RD |
8842 | |
8843 | Returns the label of the item with the given index. | |
8844 | """ | |
54f9ee45 | 8845 | return _core_.ItemContainer_GetString(*args, **kwargs) |
e811c8ce RD |
8846 | |
8847 | def GetStrings(*args, **kwargs): | |
a95a7133 | 8848 | """GetStrings(self) -> wxArrayString""" |
54f9ee45 | 8849 | return _core_.ItemContainer_GetStrings(*args, **kwargs) |
e811c8ce RD |
8850 | |
8851 | def SetString(*args, **kwargs): | |
15afbcd0 | 8852 | """ |
a95a7133 | 8853 | SetString(self, int n, String s) |
15afbcd0 RD |
8854 | |
8855 | Sets the label for the given item. | |
8856 | """ | |
54f9ee45 | 8857 | return _core_.ItemContainer_SetString(*args, **kwargs) |
e811c8ce RD |
8858 | |
8859 | def FindString(*args, **kwargs): | |
15afbcd0 | 8860 | """ |
a95a7133 | 8861 | FindString(self, String s) -> int |
15afbcd0 RD |
8862 | |
8863 | Finds an item whose label matches the given string. Returns the | |
41e2b43e RD |
8864 | zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not |
8865 | found. | |
15afbcd0 | 8866 | """ |
54f9ee45 | 8867 | return _core_.ItemContainer_FindString(*args, **kwargs) |
e811c8ce RD |
8868 | |
8869 | def Select(*args, **kwargs): | |
15afbcd0 | 8870 | """ |
a95a7133 | 8871 | Select(self, int n) |
15afbcd0 RD |
8872 | |
8873 | Sets the item at index 'n' to be the selected item. | |
8874 | """ | |
54f9ee45 | 8875 | return _core_.ItemContainer_Select(*args, **kwargs) |
e811c8ce | 8876 | |
15afbcd0 | 8877 | SetSelection = Select |
e811c8ce | 8878 | def GetSelection(*args, **kwargs): |
15afbcd0 | 8879 | """ |
a95a7133 | 8880 | GetSelection(self) -> int |
15afbcd0 | 8881 | |
41e2b43e RD |
8882 | Returns the index of the selected item or ``wx.NOT_FOUND`` if no item |
8883 | is selected. | |
15afbcd0 | 8884 | """ |
54f9ee45 | 8885 | return _core_.ItemContainer_GetSelection(*args, **kwargs) |
e811c8ce RD |
8886 | |
8887 | def GetStringSelection(*args, **kwargs): | |
15afbcd0 | 8888 | """ |
a95a7133 | 8889 | GetStringSelection(self) -> String |
15afbcd0 | 8890 | |
41e2b43e RD |
8891 | Returns the label of the selected item or an empty string if no item |
8892 | is selected. | |
15afbcd0 | 8893 | """ |
54f9ee45 | 8894 | return _core_.ItemContainer_GetStringSelection(*args, **kwargs) |
e811c8ce RD |
8895 | |
8896 | def GetClientData(*args, **kwargs): | |
15afbcd0 | 8897 | """ |
a95a7133 | 8898 | GetClientData(self, int n) -> PyObject |
15afbcd0 RD |
8899 | |
8900 | Returns the client data associated with the given item, (if any.) | |
8901 | """ | |
54f9ee45 | 8902 | return _core_.ItemContainer_GetClientData(*args, **kwargs) |
e811c8ce RD |
8903 | |
8904 | def SetClientData(*args, **kwargs): | |
15afbcd0 | 8905 | """ |
a95a7133 | 8906 | SetClientData(self, int n, PyObject clientData) |
15afbcd0 RD |
8907 | |
8908 | Associate the given client data with the item at position n. | |
8909 | """ | |
54f9ee45 | 8910 | return _core_.ItemContainer_SetClientData(*args, **kwargs) |
e811c8ce | 8911 | |
d14a1e28 RD |
8912 | |
8913 | class ItemContainerPtr(ItemContainer): | |
8914 | def __init__(self, this): | |
8915 | self.this = this | |
8916 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8917 | self.__class__ = ItemContainer | |
54f9ee45 | 8918 | _core_.ItemContainer_swigregister(ItemContainerPtr) |
d14a1e28 RD |
8919 | |
8920 | #--------------------------------------------------------------------------- | |
8921 | ||
8922 | class ControlWithItems(Control,ItemContainer): | |
15afbcd0 | 8923 | """ |
41e2b43e RD |
8924 | wx.ControlWithItems combines the ``wx.ItemContainer`` class with the |
8925 | wx.Control class, and is used for the base class of various controls | |
8926 | that have items. | |
15afbcd0 | 8927 | """ |
d14a1e28 RD |
8928 | def __init__(self): raise RuntimeError, "No constructor defined" |
8929 | def __repr__(self): | |
8930 | return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
8931 | ||
8932 | class ControlWithItemsPtr(ControlWithItems): | |
8933 | def __init__(self, this): | |
8934 | self.this = this | |
8935 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8936 | self.__class__ = ControlWithItems | |
54f9ee45 | 8937 | _core_.ControlWithItems_swigregister(ControlWithItemsPtr) |
d14a1e28 RD |
8938 | |
8939 | #--------------------------------------------------------------------------- | |
8940 | ||
8941 | class SizerItem(Object): | |
248ed943 RD |
8942 | """ |
8943 | The wx.SizerItem class is used to track the position, size and other | |
8944 | attributes of each item managed by a `wx.Sizer`. In normal usage user | |
8945 | code should never need to deal directly with a wx.SizerItem, but | |
8946 | custom classes derived from `wx.PySizer` will probably need to use the | |
8947 | collection of wx.SizerItems held by wx.Sizer when calculating layout. | |
8948 | ||
8949 | :see: `wx.Sizer`, `wx.GBSizerItem` | |
8950 | """ | |
e811c8ce RD |
8951 | def __repr__(self): |
8952 | return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8953 | def __init__(self, *args, **kwargs): |
248ed943 RD |
8954 | """ |
8955 | __init__(self) -> SizerItem | |
8956 | ||
8957 | Constructs an empty wx.SizerItem. Either a window, sizer or spacer | |
8958 | size will need to be set before this item can be used in a Sizer. | |
8959 | ||
8960 | You will probably never need to create a wx.SizerItem directly as they | |
8961 | are created automatically when the sizer's Add, Insert or Prepend | |
8962 | methods are called. | |
8963 | ||
8964 | :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer` | |
8965 | """ | |
54f9ee45 | 8966 | newobj = _core_.new_SizerItem(*args, **kwargs) |
d14a1e28 RD |
8967 | self.this = newobj.this |
8968 | self.thisown = 1 | |
8969 | del newobj.thisown | |
e811c8ce | 8970 | def DeleteWindows(*args, **kwargs): |
248ed943 RD |
8971 | """ |
8972 | DeleteWindows(self) | |
8973 | ||
8974 | Destroy the window or the windows in a subsizer, depending on the type | |
8975 | of item. | |
8976 | """ | |
54f9ee45 | 8977 | return _core_.SizerItem_DeleteWindows(*args, **kwargs) |
e811c8ce RD |
8978 | |
8979 | def DetachSizer(*args, **kwargs): | |
248ed943 RD |
8980 | """ |
8981 | DetachSizer(self) | |
8982 | ||
8983 | Enable deleting the SizerItem without destroying the contained sizer. | |
8984 | """ | |
54f9ee45 | 8985 | return _core_.SizerItem_DetachSizer(*args, **kwargs) |
e811c8ce RD |
8986 | |
8987 | def GetSize(*args, **kwargs): | |
248ed943 RD |
8988 | """ |
8989 | GetSize(self) -> Size | |
8990 | ||
8991 | Get the current size of the item, as set in the last Layout. | |
8992 | """ | |
54f9ee45 | 8993 | return _core_.SizerItem_GetSize(*args, **kwargs) |
e811c8ce RD |
8994 | |
8995 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
8996 | """ |
8997 | CalcMin(self) -> Size | |
8998 | ||
8999 | Calculates the minimum desired size for the item, including any space | |
9000 | needed by borders. | |
9001 | """ | |
54f9ee45 | 9002 | return _core_.SizerItem_CalcMin(*args, **kwargs) |
e811c8ce RD |
9003 | |
9004 | def SetDimension(*args, **kwargs): | |
248ed943 RD |
9005 | """ |
9006 | SetDimension(self, Point pos, Size size) | |
9007 | ||
9008 | Set the position and size of the space allocated for this item by the | |
9009 | sizer, and adjust the position and size of the item (window or | |
9010 | subsizer) to be within that space taking alignment and borders into | |
9011 | account. | |
9012 | """ | |
54f9ee45 | 9013 | return _core_.SizerItem_SetDimension(*args, **kwargs) |
e811c8ce RD |
9014 | |
9015 | def GetMinSize(*args, **kwargs): | |
248ed943 RD |
9016 | """ |
9017 | GetMinSize(self) -> Size | |
9018 | ||
9019 | Get the minimum size needed for the item. | |
9020 | """ | |
54f9ee45 | 9021 | return _core_.SizerItem_GetMinSize(*args, **kwargs) |
e811c8ce | 9022 | |
dfbb5885 RD |
9023 | def GetMinSizeWithBorder(*args, **kwargs): |
9024 | """ | |
9025 | GetMinSizeWithBorder(self) -> Size | |
9026 | ||
9027 | Get the minimum size needed for the item with space for the borders | |
9028 | added, if needed. | |
9029 | """ | |
9030 | return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs) | |
9031 | ||
e811c8ce | 9032 | def SetInitSize(*args, **kwargs): |
a95a7133 | 9033 | """SetInitSize(self, int x, int y)""" |
54f9ee45 | 9034 | return _core_.SizerItem_SetInitSize(*args, **kwargs) |
e811c8ce RD |
9035 | |
9036 | def SetRatioWH(*args, **kwargs): | |
248ed943 RD |
9037 | """ |
9038 | SetRatioWH(self, int width, int height) | |
9039 | ||
9040 | Set the ratio item attribute. | |
9041 | """ | |
54f9ee45 | 9042 | return _core_.SizerItem_SetRatioWH(*args, **kwargs) |
e811c8ce RD |
9043 | |
9044 | def SetRatioSize(*args, **kwargs): | |
248ed943 RD |
9045 | """ |
9046 | SetRatioSize(self, Size size) | |
9047 | ||
9048 | Set the ratio item attribute. | |
9049 | """ | |
54f9ee45 | 9050 | return _core_.SizerItem_SetRatioSize(*args, **kwargs) |
e811c8ce RD |
9051 | |
9052 | def SetRatio(*args, **kwargs): | |
248ed943 RD |
9053 | """ |
9054 | SetRatio(self, float ratio) | |
9055 | ||
9056 | Set the ratio item attribute. | |
9057 | """ | |
54f9ee45 | 9058 | return _core_.SizerItem_SetRatio(*args, **kwargs) |
e811c8ce RD |
9059 | |
9060 | def GetRatio(*args, **kwargs): | |
248ed943 RD |
9061 | """ |
9062 | GetRatio(self) -> float | |
9063 | ||
9064 | Set the ratio item attribute. | |
9065 | """ | |
54f9ee45 | 9066 | return _core_.SizerItem_GetRatio(*args, **kwargs) |
e811c8ce | 9067 | |
d3b6e4ff RD |
9068 | def GetRect(*args, **kwargs): |
9069 | """ | |
9070 | GetRect(self) -> Rect | |
9071 | ||
9072 | Returns the rectangle that the sizer item should occupy | |
9073 | """ | |
9074 | return _core_.SizerItem_GetRect(*args, **kwargs) | |
9075 | ||
e811c8ce | 9076 | def IsWindow(*args, **kwargs): |
248ed943 RD |
9077 | """ |
9078 | IsWindow(self) -> bool | |
9079 | ||
9080 | Is this sizer item a window? | |
9081 | """ | |
54f9ee45 | 9082 | return _core_.SizerItem_IsWindow(*args, **kwargs) |
e811c8ce RD |
9083 | |
9084 | def IsSizer(*args, **kwargs): | |
248ed943 RD |
9085 | """ |
9086 | IsSizer(self) -> bool | |
9087 | ||
9088 | Is this sizer item a subsizer? | |
9089 | """ | |
54f9ee45 | 9090 | return _core_.SizerItem_IsSizer(*args, **kwargs) |
e811c8ce RD |
9091 | |
9092 | def IsSpacer(*args, **kwargs): | |
248ed943 RD |
9093 | """ |
9094 | IsSpacer(self) -> bool | |
9095 | ||
9096 | Is this sizer item a spacer? | |
9097 | """ | |
54f9ee45 | 9098 | return _core_.SizerItem_IsSpacer(*args, **kwargs) |
e811c8ce RD |
9099 | |
9100 | def SetProportion(*args, **kwargs): | |
248ed943 RD |
9101 | """ |
9102 | SetProportion(self, int proportion) | |
9103 | ||
9104 | Set the proportion value for this item. | |
9105 | """ | |
54f9ee45 | 9106 | return _core_.SizerItem_SetProportion(*args, **kwargs) |
e811c8ce RD |
9107 | |
9108 | def GetProportion(*args, **kwargs): | |
248ed943 RD |
9109 | """ |
9110 | GetProportion(self) -> int | |
9111 | ||
9112 | Get the proportion value for this item. | |
9113 | """ | |
54f9ee45 | 9114 | return _core_.SizerItem_GetProportion(*args, **kwargs) |
e811c8ce | 9115 | |
248ed943 RD |
9116 | SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.") |
9117 | GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.") | |
e811c8ce | 9118 | def SetFlag(*args, **kwargs): |
248ed943 RD |
9119 | """ |
9120 | SetFlag(self, int flag) | |
9121 | ||
9122 | Set the flag value for this item. | |
9123 | """ | |
54f9ee45 | 9124 | return _core_.SizerItem_SetFlag(*args, **kwargs) |
e811c8ce RD |
9125 | |
9126 | def GetFlag(*args, **kwargs): | |
248ed943 RD |
9127 | """ |
9128 | GetFlag(self) -> int | |
9129 | ||
9130 | Get the flag value for this item. | |
9131 | """ | |
54f9ee45 | 9132 | return _core_.SizerItem_GetFlag(*args, **kwargs) |
e811c8ce RD |
9133 | |
9134 | def SetBorder(*args, **kwargs): | |
248ed943 RD |
9135 | """ |
9136 | SetBorder(self, int border) | |
9137 | ||
9138 | Set the border value for this item. | |
9139 | """ | |
54f9ee45 | 9140 | return _core_.SizerItem_SetBorder(*args, **kwargs) |
e811c8ce RD |
9141 | |
9142 | def GetBorder(*args, **kwargs): | |
248ed943 RD |
9143 | """ |
9144 | GetBorder(self) -> int | |
9145 | ||
9146 | Get the border value for this item. | |
9147 | """ | |
54f9ee45 | 9148 | return _core_.SizerItem_GetBorder(*args, **kwargs) |
e811c8ce RD |
9149 | |
9150 | def GetWindow(*args, **kwargs): | |
248ed943 RD |
9151 | """ |
9152 | GetWindow(self) -> Window | |
9153 | ||
9154 | Get the window (if any) that is managed by this sizer item. | |
9155 | """ | |
54f9ee45 | 9156 | return _core_.SizerItem_GetWindow(*args, **kwargs) |
e811c8ce RD |
9157 | |
9158 | def SetWindow(*args, **kwargs): | |
248ed943 RD |
9159 | """ |
9160 | SetWindow(self, Window window) | |
9161 | ||
9162 | Set the window to be managed by this sizer item. | |
9163 | """ | |
54f9ee45 | 9164 | return _core_.SizerItem_SetWindow(*args, **kwargs) |
e811c8ce RD |
9165 | |
9166 | def GetSizer(*args, **kwargs): | |
248ed943 RD |
9167 | """ |
9168 | GetSizer(self) -> Sizer | |
9169 | ||
9170 | Get the subsizer (if any) that is managed by this sizer item. | |
9171 | """ | |
54f9ee45 | 9172 | return _core_.SizerItem_GetSizer(*args, **kwargs) |
e811c8ce RD |
9173 | |
9174 | def SetSizer(*args, **kwargs): | |
248ed943 RD |
9175 | """ |
9176 | SetSizer(self, Sizer sizer) | |
9177 | ||
9178 | Set the subsizer to be managed by this sizer item. | |
9179 | """ | |
54f9ee45 | 9180 | return _core_.SizerItem_SetSizer(*args, **kwargs) |
e811c8ce RD |
9181 | |
9182 | def GetSpacer(*args, **kwargs): | |
248ed943 RD |
9183 | """ |
9184 | GetSpacer(self) -> Size | |
9185 | ||
9186 | Get the size of the spacer managed by this sizer item. | |
9187 | """ | |
54f9ee45 | 9188 | return _core_.SizerItem_GetSpacer(*args, **kwargs) |
e811c8ce RD |
9189 | |
9190 | def SetSpacer(*args, **kwargs): | |
248ed943 RD |
9191 | """ |
9192 | SetSpacer(self, Size size) | |
9193 | ||
9194 | Set the size of the spacer to be managed by this sizer item. | |
9195 | """ | |
54f9ee45 | 9196 | return _core_.SizerItem_SetSpacer(*args, **kwargs) |
e811c8ce RD |
9197 | |
9198 | def Show(*args, **kwargs): | |
248ed943 RD |
9199 | """ |
9200 | Show(self, bool show) | |
9201 | ||
9202 | Set the show item attribute, which sizers use to determine if the item | |
9203 | is to be made part of the layout or not. If the item is tracking a | |
9204 | window then it is shown or hidden as needed. | |
9205 | """ | |
54f9ee45 | 9206 | return _core_.SizerItem_Show(*args, **kwargs) |
e811c8ce RD |
9207 | |
9208 | def IsShown(*args, **kwargs): | |
248ed943 RD |
9209 | """ |
9210 | IsShown(self) -> bool | |
9211 | ||
9212 | Is the item to be shown in the layout? | |
9213 | """ | |
54f9ee45 | 9214 | return _core_.SizerItem_IsShown(*args, **kwargs) |
e811c8ce RD |
9215 | |
9216 | def GetPosition(*args, **kwargs): | |
248ed943 RD |
9217 | """ |
9218 | GetPosition(self) -> Point | |
9219 | ||
9220 | Returns the current position of the item, as set in the last Layout. | |
9221 | """ | |
54f9ee45 | 9222 | return _core_.SizerItem_GetPosition(*args, **kwargs) |
e811c8ce RD |
9223 | |
9224 | def GetUserData(*args, **kwargs): | |
248ed943 RD |
9225 | """ |
9226 | GetUserData(self) -> PyObject | |
9227 | ||
9228 | Returns the userData associated with this sizer item, or None if there | |
9229 | isn't any. | |
9230 | """ | |
54f9ee45 | 9231 | return _core_.SizerItem_GetUserData(*args, **kwargs) |
e811c8ce | 9232 | |
d14a1e28 RD |
9233 | |
9234 | class SizerItemPtr(SizerItem): | |
9235 | def __init__(self, this): | |
9236 | self.this = this | |
9237 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9238 | self.__class__ = SizerItem | |
54f9ee45 | 9239 | _core_.SizerItem_swigregister(SizerItemPtr) |
d14a1e28 | 9240 | |
248ed943 | 9241 | def SizerItemWindow(*args, **kwargs): |
0df68c9f | 9242 | """ |
248ed943 RD |
9243 | SizerItemWindow(Window window, int proportion, int flag, int border, |
9244 | PyObject userData=None) -> SizerItem | |
9245 | ||
9246 | Constructs a `wx.SizerItem` for tracking a window. | |
0df68c9f | 9247 | """ |
248ed943 | 9248 | val = _core_.new_SizerItemWindow(*args, **kwargs) |
d14a1e28 RD |
9249 | val.thisown = 1 |
9250 | return val | |
9251 | ||
248ed943 | 9252 | def SizerItemSpacer(*args, **kwargs): |
0df68c9f | 9253 | """ |
248ed943 RD |
9254 | SizerItemSpacer(int width, int height, int proportion, int flag, int border, |
9255 | PyObject userData=None) -> SizerItem | |
9256 | ||
9257 | Constructs a `wx.SizerItem` for tracking a spacer. | |
0df68c9f | 9258 | """ |
248ed943 | 9259 | val = _core_.new_SizerItemSpacer(*args, **kwargs) |
d14a1e28 RD |
9260 | val.thisown = 1 |
9261 | return val | |
9262 | ||
9263 | def SizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
9264 | """ |
9265 | SizerItemSizer(Sizer sizer, int proportion, int flag, int border, | |
248ed943 RD |
9266 | PyObject userData=None) -> SizerItem |
9267 | ||
9268 | Constructs a `wx.SizerItem` for tracking a subsizer | |
0df68c9f | 9269 | """ |
54f9ee45 | 9270 | val = _core_.new_SizerItemSizer(*args, **kwargs) |
d14a1e28 RD |
9271 | val.thisown = 1 |
9272 | return val | |
9273 | ||
9274 | class Sizer(Object): | |
248ed943 RD |
9275 | """ |
9276 | wx.Sizer is the abstract base class used for laying out subwindows in | |
9277 | a window. You cannot use wx.Sizer directly; instead, you will have to | |
9278 | use one of the sizer classes derived from it such as `wx.BoxSizer`, | |
9279 | `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer` | |
9280 | and `wx.GridBagSizer`. | |
9281 | ||
9282 | The concept implemented by sizers in wxWidgets is closely related to | |
9283 | layout tools in other GUI toolkits, such as Java's AWT, the GTK | |
9284 | toolkit or the Qt toolkit. It is based upon the idea of the individual | |
9285 | subwindows reporting their minimal required size and their ability to | |
9286 | get stretched if the size of the parent window has changed. This will | |
9287 | most often mean that the programmer does not set the original size of | |
9288 | a dialog in the beginning, rather the dialog will assigned a sizer and | |
9289 | this sizer will be queried about the recommended size. The sizer in | |
9290 | turn will query its children, which can be normal windows or contorls, | |
9291 | empty space or other sizers, so that a hierarchy of sizers can be | |
9292 | constructed. Note that wxSizer does not derive from wxWindow and thus | |
9293 | do not interfere with tab ordering and requires very little resources | |
9294 | compared to a real window on screen. | |
9295 | ||
9296 | What makes sizers so well fitted for use in wxWidgets is the fact that | |
9297 | every control reports its own minimal size and the algorithm can | |
9298 | handle differences in font sizes or different window (dialog item) | |
9299 | sizes on different platforms without problems. If for example the | |
9300 | standard font as well as the overall design of Mac widgets requires | |
9301 | more space than on Windows, then the initial size of a dialog using a | |
9302 | sizer will automatically be bigger on Mac than on Windows. | |
9303 | """ | |
e811c8ce RD |
9304 | def __init__(self): raise RuntimeError, "No constructor defined" |
9305 | def __repr__(self): | |
9306 | return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
9307 | def _setOORInfo(*args, **kwargs): | |
a95a7133 | 9308 | """_setOORInfo(self, PyObject _self)""" |
54f9ee45 | 9309 | return _core_.Sizer__setOORInfo(*args, **kwargs) |
e811c8ce RD |
9310 | |
9311 | def Add(*args, **kwargs): | |
0df68c9f | 9312 | """ |
248ed943 | 9313 | Add(self, item, int proportion=0, int flag=0, int border=0, |
d3b6e4ff | 9314 | PyObject userData=None) -> wx.SizerItem |
248ed943 RD |
9315 | |
9316 | Appends a child item to the sizer. | |
0df68c9f | 9317 | """ |
54f9ee45 | 9318 | return _core_.Sizer_Add(*args, **kwargs) |
e811c8ce RD |
9319 | |
9320 | def Insert(*args, **kwargs): | |
0df68c9f | 9321 | """ |
248ed943 | 9322 | Insert(self, int before, item, int proportion=0, int flag=0, int border=0, |
d3b6e4ff | 9323 | PyObject userData=None) -> wx.SizerItem |
248ed943 RD |
9324 | |
9325 | Inserts a new item into the list of items managed by this sizer before | |
9326 | the item at index *before*. See `Add` for a description of the parameters. | |
0df68c9f | 9327 | """ |
54f9ee45 | 9328 | return _core_.Sizer_Insert(*args, **kwargs) |
e811c8ce RD |
9329 | |
9330 | def Prepend(*args, **kwargs): | |
0df68c9f | 9331 | """ |
248ed943 | 9332 | Prepend(self, item, int proportion=0, int flag=0, int border=0, |
d3b6e4ff | 9333 | PyObject userData=None) -> wx.SizerItem |
248ed943 RD |
9334 | |
9335 | Adds a new item to the begining of the list of sizer items managed by | |
9336 | this sizer. See `Add` for a description of the parameters. | |
0df68c9f | 9337 | """ |
54f9ee45 | 9338 | return _core_.Sizer_Prepend(*args, **kwargs) |
e811c8ce RD |
9339 | |
9340 | def Remove(*args, **kwargs): | |
248ed943 RD |
9341 | """ |
9342 | Remove(self, item) -> bool | |
9343 | ||
9344 | Removes an item from the sizer and destroys it. This method does not | |
9345 | cause any layout or resizing to take place, call `Layout` to update | |
9346 | the layout on screen after removing a child from the sizer. The | |
9347 | *item* parameter can be either a window, a sizer, or the zero-based | |
9348 | index of an item to remove. Returns True if the child item was found | |
9349 | and removed. | |
9350 | """ | |
54f9ee45 | 9351 | return _core_.Sizer_Remove(*args, **kwargs) |
e811c8ce | 9352 | |
1c0f361b | 9353 | def Detach(*args, **kwargs): |
248ed943 RD |
9354 | """ |
9355 | Detach(self, item) -> bool | |
9356 | ||
9357 | Detaches an item from the sizer without destroying it. This method | |
9358 | does not cause any layout or resizing to take place, call `Layout` to | |
9359 | do so. The *item* parameter can be either a window, a sizer, or the | |
9360 | zero-based index of the item to be detached. Returns True if the child item | |
9361 | was found and detached. | |
9362 | """ | |
1c0f361b RD |
9363 | return _core_.Sizer_Detach(*args, **kwargs) |
9364 | ||
d3b6e4ff RD |
9365 | def GetItem(*args, **kwargs): |
9366 | """ | |
9367 | GetItem(self, item) -> wx.SizerItem | |
9368 | ||
9369 | Returns the `wx.SizerItem` which holds the *item* given. The *item* | |
9370 | parameter can be either a window, a sizer, or the zero-based index of | |
9371 | the item to be detached. | |
9372 | """ | |
9373 | return _core_.Sizer_GetItem(*args, **kwargs) | |
9374 | ||
e811c8ce | 9375 | def _SetItemMinSize(*args, **kwargs): |
a95a7133 | 9376 | """_SetItemMinSize(self, PyObject item, Size size)""" |
54f9ee45 | 9377 | return _core_.Sizer__SetItemMinSize(*args, **kwargs) |
e811c8ce | 9378 | |
248ed943 RD |
9379 | def SetItemMinSize(self, item, *args): |
9380 | """ | |
9381 | SetItemMinSize(self, item, Size size) | |
9382 | ||
9383 | Sets the minimum size that will be allocated for an item in the sizer. | |
9384 | The *item* parameter can be either a window, a sizer, or the | |
9385 | zero-based index of the item. If a window or sizer is given then it | |
9386 | will be searched for recursivly in subsizers if neccessary. | |
9387 | """ | |
9388 | if len(args) == 2: | |
9389 | # for backward compatibility accept separate width,height args too | |
9390 | return self._SetItemMinSize(item, args) | |
9391 | else: | |
9392 | return self._SetItemMinSize(item, args[0]) | |
9393 | ||
e811c8ce | 9394 | def AddItem(*args, **kwargs): |
248ed943 RD |
9395 | """ |
9396 | AddItem(self, SizerItem item) | |
9397 | ||
9398 | Adds a `wx.SizerItem` to the sizer. | |
9399 | """ | |
54f9ee45 | 9400 | return _core_.Sizer_AddItem(*args, **kwargs) |
e811c8ce RD |
9401 | |
9402 | def InsertItem(*args, **kwargs): | |
248ed943 RD |
9403 | """ |
9404 | InsertItem(self, int index, SizerItem item) | |
9405 | ||
9406 | Inserts a `wx.SizerItem` to the sizer at the position given by *index*. | |
9407 | """ | |
54f9ee45 | 9408 | return _core_.Sizer_InsertItem(*args, **kwargs) |
e811c8ce RD |
9409 | |
9410 | def PrependItem(*args, **kwargs): | |
248ed943 RD |
9411 | """ |
9412 | PrependItem(self, SizerItem item) | |
9413 | ||
9414 | Prepends a `wx.SizerItem` to the sizer. | |
9415 | """ | |
54f9ee45 | 9416 | return _core_.Sizer_PrependItem(*args, **kwargs) |
e811c8ce | 9417 | |
248ed943 | 9418 | def AddMany(self, items): |
66c033b4 RD |
9419 | """ |
9420 | AddMany is a convenience method for adding several items | |
9421 | to a sizer at one time. Simply pass it a list of tuples, | |
9422 | where each tuple consists of the parameters that you | |
9423 | would normally pass to the `Add` method. | |
9424 | """ | |
248ed943 RD |
9425 | for item in items: |
9426 | if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)): | |
9427 | item = (item, ) | |
9428 | self.Add(*item) | |
d14a1e28 | 9429 | |
74e96f3d | 9430 | # for backwards compatibility only, please do not use in new code |
66c033b4 RD |
9431 | AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.") |
9432 | AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.") | |
9433 | AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.") | |
9434 | PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.") | |
9435 | PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.") | |
9436 | PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.") | |
9437 | InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.") | |
9438 | InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.") | |
9439 | InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.") | |
9440 | RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.") | |
9441 | RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.") | |
9442 | RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.") | |
d14a1e28 RD |
9443 | |
9444 | ||
e811c8ce | 9445 | def SetDimension(*args, **kwargs): |
248ed943 RD |
9446 | """ |
9447 | SetDimension(self, int x, int y, int width, int height) | |
9448 | ||
9449 | Call this to force the sizer to take the given dimension and thus | |
9450 | force the items owned by the sizer to resize themselves according to | |
9451 | the rules defined by the parameter in the `Add`, `Insert` or `Prepend` | |
9452 | methods. | |
9453 | """ | |
54f9ee45 | 9454 | return _core_.Sizer_SetDimension(*args, **kwargs) |
e811c8ce RD |
9455 | |
9456 | def SetMinSize(*args, **kwargs): | |
248ed943 RD |
9457 | """ |
9458 | SetMinSize(self, Size size) | |
9459 | ||
9460 | Call this to give the sizer a minimal size. Normally, the sizer will | |
9461 | calculate its minimal size based purely on how much space its children | |
9462 | need. After calling this method `GetMinSize` will return either the | |
9463 | minimal size as requested by its children or the minimal size set | |
9464 | here, depending on which is bigger. | |
9465 | """ | |
54f9ee45 | 9466 | return _core_.Sizer_SetMinSize(*args, **kwargs) |
e811c8ce RD |
9467 | |
9468 | def GetSize(*args, **kwargs): | |
248ed943 RD |
9469 | """ |
9470 | GetSize(self) -> Size | |
9471 | ||
9472 | Returns the current size of the space managed by the sizer. | |
9473 | """ | |
54f9ee45 | 9474 | return _core_.Sizer_GetSize(*args, **kwargs) |
e811c8ce RD |
9475 | |
9476 | def GetPosition(*args, **kwargs): | |
248ed943 RD |
9477 | """ |
9478 | GetPosition(self) -> Point | |
9479 | ||
9480 | Returns the current position of the sizer's managed space. | |
9481 | """ | |
54f9ee45 | 9482 | return _core_.Sizer_GetPosition(*args, **kwargs) |
e811c8ce RD |
9483 | |
9484 | def GetMinSize(*args, **kwargs): | |
248ed943 RD |
9485 | """ |
9486 | GetMinSize(self) -> Size | |
9487 | ||
9488 | Returns the minimal size of the sizer. This is either the combined | |
9489 | minimal size of all the children and their borders or the minimal size | |
9490 | set by SetMinSize, depending on which is bigger. | |
9491 | """ | |
54f9ee45 | 9492 | return _core_.Sizer_GetMinSize(*args, **kwargs) |
e811c8ce | 9493 | |
d14a1e28 | 9494 | def GetSizeTuple(self): |
1c0f361b | 9495 | return self.GetSize().Get() |
d14a1e28 | 9496 | def GetPositionTuple(self): |
1c0f361b | 9497 | return self.GetPosition().Get() |
d14a1e28 | 9498 | def GetMinSizeTuple(self): |
1c0f361b | 9499 | return self.GetMinSize().Get() |
d14a1e28 | 9500 | |
e811c8ce | 9501 | def RecalcSizes(*args, **kwargs): |
248ed943 RD |
9502 | """ |
9503 | RecalcSizes(self) | |
9504 | ||
9505 | Using the sizes calculated by `CalcMin` reposition and resize all the | |
9506 | items managed by this sizer. You should not need to call this directly as | |
9507 | it is called by `Layout`. | |
9508 | """ | |
54f9ee45 | 9509 | return _core_.Sizer_RecalcSizes(*args, **kwargs) |
e811c8ce RD |
9510 | |
9511 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
9512 | """ |
9513 | CalcMin(self) -> Size | |
9514 | ||
9515 | This method is where the sizer will do the actual calculation of its | |
9516 | children's minimal sizes. You should not need to call this directly as | |
9517 | it is called by `Layout`. | |
9518 | """ | |
54f9ee45 | 9519 | return _core_.Sizer_CalcMin(*args, **kwargs) |
e811c8ce RD |
9520 | |
9521 | def Layout(*args, **kwargs): | |
248ed943 RD |
9522 | """ |
9523 | Layout(self) | |
9524 | ||
9525 | This method will force the recalculation and layout of the items | |
9526 | controlled by the sizer using the current space allocated to the | |
9527 | sizer. Normally this is called automatically from the owning window's | |
9528 | EVT_SIZE handler, but it is also useful to call it from user code when | |
9529 | one of the items in a sizer change size, or items are added or | |
9530 | removed. | |
9531 | """ | |
54f9ee45 | 9532 | return _core_.Sizer_Layout(*args, **kwargs) |
e811c8ce RD |
9533 | |
9534 | def Fit(*args, **kwargs): | |
248ed943 RD |
9535 | """ |
9536 | Fit(self, Window window) -> Size | |
9537 | ||
9538 | Tell the sizer to resize the *window* to match the sizer's minimal | |
9539 | size. This is commonly done in the constructor of the window itself in | |
9540 | order to set its initial size to match the needs of the children as | |
9541 | determined by the sizer. Returns the new size. | |
9542 | ||
9543 | For a top level window this is the total window size, not the client size. | |
9544 | """ | |
54f9ee45 | 9545 | return _core_.Sizer_Fit(*args, **kwargs) |
e811c8ce RD |
9546 | |
9547 | def FitInside(*args, **kwargs): | |
248ed943 RD |
9548 | """ |
9549 | FitInside(self, Window window) | |
9550 | ||
9551 | Tell the sizer to resize the *virtual size* of the *window* to match the | |
9552 | sizer's minimal size. This will not alter the on screen size of the | |
9553 | window, but may cause the addition/removal/alteration of scrollbars | |
9554 | required to view the virtual area in windows which manage it. | |
9555 | ||
9556 | :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints` | |
9557 | ||
9558 | """ | |
54f9ee45 | 9559 | return _core_.Sizer_FitInside(*args, **kwargs) |
e811c8ce RD |
9560 | |
9561 | def SetSizeHints(*args, **kwargs): | |
248ed943 RD |
9562 | """ |
9563 | SetSizeHints(self, Window window) | |
9564 | ||
9565 | Tell the sizer to set (and `Fit`) the minimal size of the *window* to | |
9566 | match the sizer's minimal size. This is commonly done in the | |
9567 | constructor of the window itself if the window is resizable (as are | |
9568 | many dialogs under Unix and frames on probably all platforms) in order | |
9569 | to prevent the window from being sized smaller than the minimal size | |
9570 | required by the sizer. | |
9571 | """ | |
54f9ee45 | 9572 | return _core_.Sizer_SetSizeHints(*args, **kwargs) |
e811c8ce RD |
9573 | |
9574 | def SetVirtualSizeHints(*args, **kwargs): | |
248ed943 RD |
9575 | """ |
9576 | SetVirtualSizeHints(self, Window window) | |
9577 | ||
9578 | Tell the sizer to set the minimal size of the window virtual area to | |
9579 | match the sizer's minimal size. For windows with managed scrollbars | |
9580 | this will set them appropriately. | |
9581 | ||
9582 | :see: `wx.ScrolledWindow.SetScrollbars` | |
9583 | ||
9584 | """ | |
54f9ee45 | 9585 | return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs) |
e811c8ce RD |
9586 | |
9587 | def Clear(*args, **kwargs): | |
248ed943 RD |
9588 | """ |
9589 | Clear(self, bool deleteWindows=False) | |
9590 | ||
9591 | Clear all items from the sizer, optionally destroying the window items | |
9592 | as well. | |
9593 | """ | |
54f9ee45 | 9594 | return _core_.Sizer_Clear(*args, **kwargs) |
e811c8ce RD |
9595 | |
9596 | def DeleteWindows(*args, **kwargs): | |
248ed943 RD |
9597 | """ |
9598 | DeleteWindows(self) | |
9599 | ||
9600 | Destroy all windows managed by the sizer. | |
9601 | """ | |
54f9ee45 | 9602 | return _core_.Sizer_DeleteWindows(*args, **kwargs) |
e811c8ce RD |
9603 | |
9604 | def GetChildren(*args, **kwargs): | |
248ed943 RD |
9605 | """ |
9606 | GetChildren(sefl) -> list | |
9607 | ||
9608 | Returns a list of all the `wx.SizerItem` objects managed by the sizer. | |
9609 | """ | |
54f9ee45 | 9610 | return _core_.Sizer_GetChildren(*args, **kwargs) |
e811c8ce RD |
9611 | |
9612 | def Show(*args, **kwargs): | |
248ed943 | 9613 | """ |
ae8162c8 | 9614 | Show(self, item, bool show=True, bool recursive=false) -> bool |
e811c8ce | 9615 | |
248ed943 RD |
9616 | Shows or hides an item managed by the sizer. To make a sizer item |
9617 | disappear or reappear, use Show followed by `Layout`. The *item* | |
9618 | parameter can be either a window, a sizer, or the zero-based index of | |
7e63a440 RD |
9619 | the item. Use the recursive parameter to show or hide an item in a |
9620 | subsizer. Returns True if the item was found. | |
248ed943 RD |
9621 | """ |
9622 | return _core_.Sizer_Show(*args, **kwargs) | |
e811c8ce RD |
9623 | |
9624 | def IsShown(*args, **kwargs): | |
248ed943 RD |
9625 | """ |
9626 | IsShown(self, item) | |
9627 | ||
9628 | Determines if the item is currently shown. sizer. To make a sizer | |
9629 | item disappear or reappear, use Show followed by `Layout`. The *item* | |
9630 | parameter can be either a window, a sizer, or the zero-based index of | |
9631 | the item. | |
9632 | """ | |
54f9ee45 | 9633 | return _core_.Sizer_IsShown(*args, **kwargs) |
e811c8ce | 9634 | |
7e63a440 | 9635 | def Hide(self, item, recursive=False): |
248ed943 | 9636 | """ |
7e63a440 | 9637 | A convenience method for Show(item, False, recursive). |
248ed943 | 9638 | """ |
06759a38 | 9639 | return self.Show(item, False, recursive) |
248ed943 | 9640 | |
e811c8ce | 9641 | def ShowItems(*args, **kwargs): |
248ed943 RD |
9642 | """ |
9643 | ShowItems(self, bool show) | |
9644 | ||
84f85550 | 9645 | Recursively call `wx.SizerItem.Show` on all sizer items. |
248ed943 | 9646 | """ |
54f9ee45 | 9647 | return _core_.Sizer_ShowItems(*args, **kwargs) |
e811c8ce | 9648 | |
d14a1e28 RD |
9649 | |
9650 | class SizerPtr(Sizer): | |
9651 | def __init__(self, this): | |
9652 | self.this = this | |
9653 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9654 | self.__class__ = Sizer | |
54f9ee45 | 9655 | _core_.Sizer_swigregister(SizerPtr) |
d14a1e28 RD |
9656 | |
9657 | class PySizer(Sizer): | |
248ed943 RD |
9658 | """ |
9659 | wx.PySizer is a special version of `wx.Sizer` that has been | |
9660 | instrumented to allow the C++ virtual methods to be overloaded in | |
9661 | Python derived classes. You would derive from this class if you are | |
9662 | wanting to implement a custom sizer in Python code. Simply implement | |
9663 | `CalcMin` and `RecalcSizes` in the derived class and you're all set. | |
9664 | For example:: | |
9665 | ||
9666 | class MySizer(wx.PySizer): | |
9667 | def __init__(self): | |
9668 | wx.PySizer.__init__(self) | |
9669 | ||
9670 | def CalcMin(self): | |
9671 | for item in self.GetChildren(): | |
9672 | # calculate the total minimum width and height needed | |
9673 | # by all items in the sizer according to this sizer's | |
9674 | # layout algorithm. | |
9675 | ... | |
9676 | return wx.Size(width, height) | |
9677 | ||
9678 | def RecalcSizes(self): | |
9679 | # find the space allotted to this sizer | |
9680 | pos = self.GetPosition() | |
9681 | size = self.GetSize() | |
9682 | for item in self.GetChildren(): | |
9683 | # Recalculate (if necessary) the position and size of | |
9684 | # each item and then call item.SetDimension to do the | |
9685 | # actual positioning and sizing of the items within the | |
9686 | # space alloted to this sizer. | |
9687 | ... | |
9688 | item.SetDimension(itemPos, itemSize) | |
9689 | ||
9690 | ||
9691 | When `Layout` is called it first calls `CalcMin` followed by | |
9692 | `RecalcSizes` so you can optimize a bit by saving the results of | |
9693 | `CalcMin` and resuing them in `RecalcSizes`. | |
9694 | ||
9695 | :see: `wx.SizerItem`, `wx.Sizer.GetChildren` | |
9696 | ||
9697 | ||
9698 | """ | |
e811c8ce RD |
9699 | def __repr__(self): |
9700 | return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9701 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9702 | """ |
9703 | __init__(self) -> PySizer | |
9704 | ||
9705 | Creates a wx.PySizer. Must be called from the __init__ in the derived | |
9706 | class. | |
9707 | """ | |
54f9ee45 | 9708 | newobj = _core_.new_PySizer(*args, **kwargs) |
d14a1e28 RD |
9709 | self.this = newobj.this |
9710 | self.thisown = 1 | |
9711 | del newobj.thisown | |
9712 | self._setCallbackInfo(self, PySizer);self._setOORInfo(self) | |
e811c8ce RD |
9713 | |
9714 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 9715 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 9716 | return _core_.PySizer__setCallbackInfo(*args, **kwargs) |
e811c8ce | 9717 | |
d14a1e28 RD |
9718 | |
9719 | class PySizerPtr(PySizer): | |
9720 | def __init__(self, this): | |
9721 | self.this = this | |
9722 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9723 | self.__class__ = PySizer | |
54f9ee45 | 9724 | _core_.PySizer_swigregister(PySizerPtr) |
d14a1e28 RD |
9725 | |
9726 | #--------------------------------------------------------------------------- | |
9727 | ||
9728 | class BoxSizer(Sizer): | |
248ed943 RD |
9729 | """ |
9730 | The basic idea behind a box sizer is that windows will most often be | |
9731 | laid out in rather simple basic geometry, typically in a row or a | |
9732 | column or nested hierarchies of either. A wx.BoxSizer will lay out | |
9733 | its items in a simple row or column, depending on the orientation | |
9734 | parameter passed to the constructor. | |
9735 | """ | |
e811c8ce RD |
9736 | def __repr__(self): |
9737 | return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9738 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9739 | """ |
9740 | __init__(self, int orient=HORIZONTAL) -> BoxSizer | |
9741 | ||
9742 | Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL`` | |
9743 | or ``wx.HORIZONTAL`` for creating either a column sizer or a row | |
9744 | sizer. | |
9745 | """ | |
54f9ee45 | 9746 | newobj = _core_.new_BoxSizer(*args, **kwargs) |
d14a1e28 RD |
9747 | self.this = newobj.this |
9748 | self.thisown = 1 | |
9749 | del newobj.thisown | |
9750 | self._setOORInfo(self) | |
e811c8ce RD |
9751 | |
9752 | def GetOrientation(*args, **kwargs): | |
248ed943 RD |
9753 | """ |
9754 | GetOrientation(self) -> int | |
9755 | ||
9756 | Returns the current orientation of the sizer. | |
9757 | """ | |
54f9ee45 | 9758 | return _core_.BoxSizer_GetOrientation(*args, **kwargs) |
e811c8ce RD |
9759 | |
9760 | def SetOrientation(*args, **kwargs): | |
248ed943 RD |
9761 | """ |
9762 | SetOrientation(self, int orient) | |
e811c8ce | 9763 | |
248ed943 RD |
9764 | Resets the orientation of the sizer. |
9765 | """ | |
9766 | return _core_.BoxSizer_SetOrientation(*args, **kwargs) | |
e811c8ce | 9767 | |
d14a1e28 RD |
9768 | |
9769 | class BoxSizerPtr(BoxSizer): | |
9770 | def __init__(self, this): | |
9771 | self.this = this | |
9772 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9773 | self.__class__ = BoxSizer | |
54f9ee45 | 9774 | _core_.BoxSizer_swigregister(BoxSizerPtr) |
d14a1e28 RD |
9775 | |
9776 | #--------------------------------------------------------------------------- | |
9777 | ||
9778 | class StaticBoxSizer(BoxSizer): | |
248ed943 RD |
9779 | """ |
9780 | wx.StaticBoxSizer derives from and functions identically to the | |
9781 | `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer | |
9782 | manages. Note that this static box must be created separately and | |
9783 | passed to the sizer constructor. | |
9784 | """ | |
e811c8ce RD |
9785 | def __repr__(self): |
9786 | return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9787 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9788 | """ |
9789 | __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer | |
9790 | ||
9791 | Constructor. It takes an associated static box and the orientation | |
9792 | *orient* as parameters - orient can be either of ``wx.VERTICAL`` or | |
9793 | ``wx.HORIZONTAL``. | |
9794 | """ | |
54f9ee45 | 9795 | newobj = _core_.new_StaticBoxSizer(*args, **kwargs) |
d14a1e28 RD |
9796 | self.this = newobj.this |
9797 | self.thisown = 1 | |
9798 | del newobj.thisown | |
9799 | self._setOORInfo(self) | |
e811c8ce RD |
9800 | |
9801 | def GetStaticBox(*args, **kwargs): | |
248ed943 RD |
9802 | """ |
9803 | GetStaticBox(self) -> StaticBox | |
e811c8ce | 9804 | |
248ed943 RD |
9805 | Returns the static box associated with this sizer. |
9806 | """ | |
9807 | return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs) | |
e811c8ce | 9808 | |
d14a1e28 RD |
9809 | |
9810 | class StaticBoxSizerPtr(StaticBoxSizer): | |
9811 | def __init__(self, this): | |
9812 | self.this = this | |
9813 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9814 | self.__class__ = StaticBoxSizer | |
54f9ee45 | 9815 | _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr) |
d14a1e28 RD |
9816 | |
9817 | #--------------------------------------------------------------------------- | |
9818 | ||
9819 | class GridSizer(Sizer): | |
248ed943 RD |
9820 | """ |
9821 | A grid sizer is a sizer which lays out its children in a | |
9822 | two-dimensional table with all cells having the same size. In other | |
9823 | words, the width of each cell within the grid is the width of the | |
9824 | widest item added to the sizer and the height of each grid cell is the | |
9825 | height of the tallest item. An optional vertical and/or horizontal | |
9826 | gap between items can also be specified (in pixels.) | |
9827 | ||
9828 | Items are placed in the cells of the grid in the order they are added, | |
9829 | in row-major order. In other words, the first row is filled first, | |
9830 | then the second, and so on until all items have been added. (If | |
9831 | neccessary, additional rows will be added as items are added.) If you | |
9832 | need to have greater control over the cells that items are placed in | |
9833 | then use the `wx.GridBagSizer`. | |
9834 | ||
9835 | """ | |
e811c8ce RD |
9836 | def __repr__(self): |
9837 | return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9838 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9839 | """ |
9840 | __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer | |
9841 | ||
9842 | Constructor for a wx.GridSizer. *rows* and *cols* determine the number | |
9843 | of columns and rows in the sizer - if either of the parameters is | |
9844 | zero, it will be calculated to from the total number of children in | |
9845 | the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* | |
9846 | define extra space between all children. | |
9847 | """ | |
54f9ee45 | 9848 | newobj = _core_.new_GridSizer(*args, **kwargs) |
d14a1e28 RD |
9849 | self.this = newobj.this |
9850 | self.thisown = 1 | |
9851 | del newobj.thisown | |
9852 | self._setOORInfo(self) | |
e811c8ce | 9853 | |
e811c8ce | 9854 | def SetCols(*args, **kwargs): |
248ed943 RD |
9855 | """ |
9856 | SetCols(self, int cols) | |
9857 | ||
9858 | Sets the number of columns in the sizer. | |
9859 | """ | |
54f9ee45 | 9860 | return _core_.GridSizer_SetCols(*args, **kwargs) |
e811c8ce RD |
9861 | |
9862 | def SetRows(*args, **kwargs): | |
248ed943 RD |
9863 | """ |
9864 | SetRows(self, int rows) | |
9865 | ||
9866 | Sets the number of rows in the sizer. | |
9867 | """ | |
54f9ee45 | 9868 | return _core_.GridSizer_SetRows(*args, **kwargs) |
e811c8ce RD |
9869 | |
9870 | def SetVGap(*args, **kwargs): | |
248ed943 RD |
9871 | """ |
9872 | SetVGap(self, int gap) | |
9873 | ||
9874 | Sets the vertical gap (in pixels) between the cells in the sizer. | |
9875 | """ | |
54f9ee45 | 9876 | return _core_.GridSizer_SetVGap(*args, **kwargs) |
e811c8ce RD |
9877 | |
9878 | def SetHGap(*args, **kwargs): | |
248ed943 RD |
9879 | """ |
9880 | SetHGap(self, int gap) | |
9881 | ||
9882 | Sets the horizontal gap (in pixels) between cells in the sizer | |
9883 | """ | |
54f9ee45 | 9884 | return _core_.GridSizer_SetHGap(*args, **kwargs) |
e811c8ce RD |
9885 | |
9886 | def GetCols(*args, **kwargs): | |
248ed943 RD |
9887 | """ |
9888 | GetCols(self) -> int | |
9889 | ||
9890 | Returns the number of columns in the sizer. | |
9891 | """ | |
54f9ee45 | 9892 | return _core_.GridSizer_GetCols(*args, **kwargs) |
e811c8ce RD |
9893 | |
9894 | def GetRows(*args, **kwargs): | |
248ed943 RD |
9895 | """ |
9896 | GetRows(self) -> int | |
9897 | ||
9898 | Returns the number of rows in the sizer. | |
9899 | """ | |
54f9ee45 | 9900 | return _core_.GridSizer_GetRows(*args, **kwargs) |
e811c8ce RD |
9901 | |
9902 | def GetVGap(*args, **kwargs): | |
248ed943 RD |
9903 | """ |
9904 | GetVGap(self) -> int | |
9905 | ||
9906 | Returns the vertical gap (in pixels) between the cells in the sizer. | |
9907 | """ | |
54f9ee45 | 9908 | return _core_.GridSizer_GetVGap(*args, **kwargs) |
e811c8ce RD |
9909 | |
9910 | def GetHGap(*args, **kwargs): | |
248ed943 RD |
9911 | """ |
9912 | GetHGap(self) -> int | |
9913 | ||
9914 | Returns the horizontal gap (in pixels) between cells in the sizer. | |
9915 | """ | |
54f9ee45 | 9916 | return _core_.GridSizer_GetHGap(*args, **kwargs) |
e811c8ce | 9917 | |
d14a1e28 RD |
9918 | |
9919 | class GridSizerPtr(GridSizer): | |
9920 | def __init__(self, this): | |
9921 | self.this = this | |
9922 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9923 | self.__class__ = GridSizer | |
54f9ee45 | 9924 | _core_.GridSizer_swigregister(GridSizerPtr) |
d14a1e28 RD |
9925 | |
9926 | #--------------------------------------------------------------------------- | |
9927 | ||
54f9ee45 RD |
9928 | FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE |
9929 | FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED | |
9930 | FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL | |
d14a1e28 | 9931 | class FlexGridSizer(GridSizer): |
248ed943 RD |
9932 | """ |
9933 | A flex grid sizer is a sizer which lays out its children in a | |
9934 | two-dimensional table with all table cells in one row having the same | |
9935 | height and all cells in one column having the same width, but all | |
9936 | rows or all columns are not necessarily the same height or width as in | |
9937 | the `wx.GridSizer`. | |
9938 | ||
9939 | wx.FlexGridSizer can also size items equally in one direction but | |
9940 | unequally ("flexibly") in the other. If the sizer is only flexible | |
9941 | in one direction (this can be changed using `SetFlexibleDirection`), it | |
9942 | needs to be decided how the sizer should grow in the other ("non | |
9943 | flexible") direction in order to fill the available space. The | |
9944 | `SetNonFlexibleGrowMode` method serves this purpose. | |
9945 | ||
9946 | ||
9947 | """ | |
e811c8ce RD |
9948 | def __repr__(self): |
9949 | return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9950 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9951 | """ |
9952 | __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer | |
9953 | ||
9954 | Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the | |
9955 | number of columns and rows in the sizer - if either of the parameters | |
9956 | is zero, it will be calculated to from the total number of children in | |
9957 | the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* | |
9958 | define extra space between all children. | |
9959 | """ | |
54f9ee45 | 9960 | newobj = _core_.new_FlexGridSizer(*args, **kwargs) |
d14a1e28 RD |
9961 | self.this = newobj.this |
9962 | self.thisown = 1 | |
9963 | del newobj.thisown | |
9964 | self._setOORInfo(self) | |
e811c8ce | 9965 | |
248ed943 RD |
9966 | def AddGrowableRow(*args, **kwargs): |
9967 | """ | |
9968 | AddGrowableRow(self, size_t idx, int proportion=0) | |
e811c8ce | 9969 | |
248ed943 RD |
9970 | Specifies that row *idx* (starting from zero) should be grown if there |
9971 | is extra space available to the sizer. | |
e811c8ce | 9972 | |
248ed943 RD |
9973 | The *proportion* parameter has the same meaning as the stretch factor |
9974 | for the box sizers except that if all proportions are 0, then all | |
9975 | columns are resized equally (instead of not being resized at all). | |
9976 | """ | |
54f9ee45 | 9977 | return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs) |
e811c8ce RD |
9978 | |
9979 | def RemoveGrowableRow(*args, **kwargs): | |
248ed943 RD |
9980 | """ |
9981 | RemoveGrowableRow(self, size_t idx) | |
9982 | ||
9983 | Specifies that row *idx* is no longer growable. | |
9984 | """ | |
54f9ee45 | 9985 | return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) |
e811c8ce RD |
9986 | |
9987 | def AddGrowableCol(*args, **kwargs): | |
248ed943 RD |
9988 | """ |
9989 | AddGrowableCol(self, size_t idx, int proportion=0) | |
9990 | ||
9991 | Specifies that column *idx* (starting from zero) should be grown if | |
9992 | there is extra space available to the sizer. | |
9993 | ||
9994 | The *proportion* parameter has the same meaning as the stretch factor | |
9995 | for the box sizers except that if all proportions are 0, then all | |
9996 | columns are resized equally (instead of not being resized at all). | |
9997 | """ | |
54f9ee45 | 9998 | return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs) |
e811c8ce RD |
9999 | |
10000 | def RemoveGrowableCol(*args, **kwargs): | |
248ed943 RD |
10001 | """ |
10002 | RemoveGrowableCol(self, size_t idx) | |
10003 | ||
10004 | Specifies that column *idx* is no longer growable. | |
10005 | """ | |
54f9ee45 | 10006 | return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) |
e811c8ce RD |
10007 | |
10008 | def SetFlexibleDirection(*args, **kwargs): | |
248ed943 RD |
10009 | """ |
10010 | SetFlexibleDirection(self, int direction) | |
10011 | ||
10012 | Specifies whether the sizer should flexibly resize its columns, rows, | |
10013 | or both. Argument *direction* can be one of the following values. Any | |
10014 | other value is ignored. | |
10015 | ||
10016 | ============== ======================================= | |
10017 | wx.VERTICAL Rows are flexibly sized. | |
10018 | wx.HORIZONTAL Columns are flexibly sized. | |
10019 | wx.BOTH Both rows and columns are flexibly sized | |
10020 | (this is the default value). | |
10021 | ============== ======================================= | |
10022 | ||
10023 | Note that this method does not trigger relayout. | |
10024 | ||
10025 | """ | |
54f9ee45 | 10026 | return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) |
e811c8ce RD |
10027 | |
10028 | def GetFlexibleDirection(*args, **kwargs): | |
248ed943 RD |
10029 | """ |
10030 | GetFlexibleDirection(self) -> int | |
10031 | ||
10032 | Returns a value that specifies whether the sizer | |
10033 | flexibly resizes its columns, rows, or both (default). | |
10034 | ||
10035 | :see: `SetFlexibleDirection` | |
10036 | """ | |
54f9ee45 | 10037 | return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) |
e811c8ce RD |
10038 | |
10039 | def SetNonFlexibleGrowMode(*args, **kwargs): | |
248ed943 RD |
10040 | """ |
10041 | SetNonFlexibleGrowMode(self, int mode) | |
10042 | ||
10043 | Specifies how the sizer should grow in the non-flexible direction if | |
10044 | there is one (so `SetFlexibleDirection` must have been called | |
10045 | previously). Argument *mode* can be one of the following values: | |
10046 | ||
10047 | ========================== ================================================= | |
10048 | wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction. | |
10049 | wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with | |
10050 | `AddGrowableCol` and `AddGrowableRow`. In this | |
10051 | case equal sizing applies to minimum sizes of | |
10052 | columns or rows (this is the default value). | |
10053 | wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in | |
10054 | the non flexible direction, whether they are | |
10055 | growable or not in the flexbile direction. | |
10056 | ========================== ================================================= | |
10057 | ||
10058 | Note that this method does not trigger relayout. | |
10059 | ||
10060 | ||
10061 | """ | |
54f9ee45 | 10062 | return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) |
e811c8ce RD |
10063 | |
10064 | def GetNonFlexibleGrowMode(*args, **kwargs): | |
248ed943 RD |
10065 | """ |
10066 | GetNonFlexibleGrowMode(self) -> int | |
10067 | ||
10068 | Returns the value that specifies how the sizer grows in the | |
10069 | non-flexible direction if there is one. | |
10070 | ||
10071 | :see: `SetNonFlexibleGrowMode` | |
10072 | """ | |
54f9ee45 | 10073 | return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) |
e811c8ce RD |
10074 | |
10075 | def GetRowHeights(*args, **kwargs): | |
fd2dc343 RD |
10076 | """ |
10077 | GetRowHeights(self) -> list | |
10078 | ||
10079 | Returns a list of integers representing the heights of each of the | |
10080 | rows in the sizer. | |
10081 | """ | |
54f9ee45 | 10082 | return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs) |
e811c8ce RD |
10083 | |
10084 | def GetColWidths(*args, **kwargs): | |
fd2dc343 RD |
10085 | """ |
10086 | GetColWidths(self) -> list | |
10087 | ||
10088 | Returns a list of integers representing the widths of each of the | |
10089 | columns in the sizer. | |
10090 | """ | |
54f9ee45 | 10091 | return _core_.FlexGridSizer_GetColWidths(*args, **kwargs) |
e811c8ce | 10092 | |
d14a1e28 RD |
10093 | |
10094 | class FlexGridSizerPtr(FlexGridSizer): | |
10095 | def __init__(self, this): | |
10096 | self.this = this | |
10097 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10098 | self.__class__ = FlexGridSizer | |
54f9ee45 | 10099 | _core_.FlexGridSizer_swigregister(FlexGridSizerPtr) |
d14a1e28 RD |
10100 | |
10101 | #--------------------------------------------------------------------------- | |
10102 | ||
10103 | class GBPosition(object): | |
248ed943 RD |
10104 | """ |
10105 | This class represents the position of an item in a virtual grid of | |
10106 | rows and columns managed by a `wx.GridBagSizer`. wxPython has | |
10107 | typemaps that will automatically convert from a 2-element sequence of | |
10108 | integers to a wx.GBPosition, so you can use the more pythonic | |
10109 | representation of the position nearly transparently in Python code. | |
10110 | """ | |
e811c8ce RD |
10111 | def __repr__(self): |
10112 | return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10113 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10114 | """ |
10115 | __init__(self, int row=0, int col=0) -> GBPosition | |
10116 | ||
10117 | This class represents the position of an item in a virtual grid of | |
10118 | rows and columns managed by a `wx.GridBagSizer`. wxPython has | |
10119 | typemaps that will automatically convert from a 2-element sequence of | |
10120 | integers to a wx.GBPosition, so you can use the more pythonic | |
10121 | representation of the position nearly transparently in Python code. | |
10122 | """ | |
54f9ee45 | 10123 | newobj = _core_.new_GBPosition(*args, **kwargs) |
d14a1e28 RD |
10124 | self.this = newobj.this |
10125 | self.thisown = 1 | |
10126 | del newobj.thisown | |
e811c8ce | 10127 | def GetRow(*args, **kwargs): |
a95a7133 | 10128 | """GetRow(self) -> int""" |
54f9ee45 | 10129 | return _core_.GBPosition_GetRow(*args, **kwargs) |
e811c8ce RD |
10130 | |
10131 | def GetCol(*args, **kwargs): | |
a95a7133 | 10132 | """GetCol(self) -> int""" |
54f9ee45 | 10133 | return _core_.GBPosition_GetCol(*args, **kwargs) |
e811c8ce RD |
10134 | |
10135 | def SetRow(*args, **kwargs): | |
a95a7133 | 10136 | """SetRow(self, int row)""" |
54f9ee45 | 10137 | return _core_.GBPosition_SetRow(*args, **kwargs) |
e811c8ce RD |
10138 | |
10139 | def SetCol(*args, **kwargs): | |
a95a7133 | 10140 | """SetCol(self, int col)""" |
54f9ee45 | 10141 | return _core_.GBPosition_SetCol(*args, **kwargs) |
e811c8ce RD |
10142 | |
10143 | def __eq__(*args, **kwargs): | |
a95a7133 | 10144 | """__eq__(self, GBPosition other) -> bool""" |
54f9ee45 | 10145 | return _core_.GBPosition___eq__(*args, **kwargs) |
e811c8ce RD |
10146 | |
10147 | def __ne__(*args, **kwargs): | |
a95a7133 | 10148 | """__ne__(self, GBPosition other) -> bool""" |
54f9ee45 | 10149 | return _core_.GBPosition___ne__(*args, **kwargs) |
e811c8ce RD |
10150 | |
10151 | def Set(*args, **kwargs): | |
a95a7133 | 10152 | """Set(self, int row=0, int col=0)""" |
54f9ee45 | 10153 | return _core_.GBPosition_Set(*args, **kwargs) |
e811c8ce RD |
10154 | |
10155 | def Get(*args, **kwargs): | |
a95a7133 | 10156 | """Get(self) -> PyObject""" |
54f9ee45 | 10157 | return _core_.GBPosition_Get(*args, **kwargs) |
e811c8ce | 10158 | |
41e2b43e | 10159 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
10160 | def __str__(self): return str(self.Get()) |
10161 | def __repr__(self): return 'wx.GBPosition'+str(self.Get()) | |
10162 | def __len__(self): return len(self.Get()) | |
10163 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
10164 | def __setitem__(self, index, val): |
10165 | if index == 0: self.SetRow(val) | |
10166 | elif index == 1: self.SetCol(val) | |
10167 | else: raise IndexError | |
e811c8ce | 10168 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
10169 | __safe_for_unpickling__ = True |
10170 | def __reduce__(self): return (wx.GBPosition, self.Get()) | |
d14a1e28 RD |
10171 | |
10172 | row = property(GetRow, SetRow) | |
10173 | col = property(GetCol, SetCol) | |
10174 | ||
10175 | ||
10176 | class GBPositionPtr(GBPosition): | |
10177 | def __init__(self, this): | |
10178 | self.this = this | |
10179 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10180 | self.__class__ = GBPosition | |
54f9ee45 | 10181 | _core_.GBPosition_swigregister(GBPositionPtr) |
d14a1e28 RD |
10182 | |
10183 | class GBSpan(object): | |
248ed943 RD |
10184 | """ |
10185 | This class is used to hold the row and column spanning attributes of | |
10186 | items in a `wx.GridBagSizer`. wxPython has typemaps that will | |
10187 | automatically convert from a 2-element sequence of integers to a | |
10188 | wx.GBSpan, so you can use the more pythonic representation of the span | |
10189 | nearly transparently in Python code. | |
10190 | ||
10191 | """ | |
e811c8ce RD |
10192 | def __repr__(self): |
10193 | return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10194 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10195 | """ |
10196 | __init__(self, int rowspan=1, int colspan=1) -> GBSpan | |
10197 | ||
10198 | Construct a new wxGBSpan, optionally setting the rowspan and | |
10199 | colspan. The default is (1,1). (Meaning that the item occupies one | |
10200 | cell in each direction. | |
10201 | """ | |
54f9ee45 | 10202 | newobj = _core_.new_GBSpan(*args, **kwargs) |
d14a1e28 RD |
10203 | self.this = newobj.this |
10204 | self.thisown = 1 | |
10205 | del newobj.thisown | |
e811c8ce | 10206 | def GetRowspan(*args, **kwargs): |
a95a7133 | 10207 | """GetRowspan(self) -> int""" |
54f9ee45 | 10208 | return _core_.GBSpan_GetRowspan(*args, **kwargs) |
e811c8ce RD |
10209 | |
10210 | def GetColspan(*args, **kwargs): | |
a95a7133 | 10211 | """GetColspan(self) -> int""" |
54f9ee45 | 10212 | return _core_.GBSpan_GetColspan(*args, **kwargs) |
e811c8ce RD |
10213 | |
10214 | def SetRowspan(*args, **kwargs): | |
a95a7133 | 10215 | """SetRowspan(self, int rowspan)""" |
54f9ee45 | 10216 | return _core_.GBSpan_SetRowspan(*args, **kwargs) |
e811c8ce RD |
10217 | |
10218 | def SetColspan(*args, **kwargs): | |
a95a7133 | 10219 | """SetColspan(self, int colspan)""" |
54f9ee45 | 10220 | return _core_.GBSpan_SetColspan(*args, **kwargs) |
e811c8ce RD |
10221 | |
10222 | def __eq__(*args, **kwargs): | |
a95a7133 | 10223 | """__eq__(self, GBSpan other) -> bool""" |
54f9ee45 | 10224 | return _core_.GBSpan___eq__(*args, **kwargs) |
e811c8ce RD |
10225 | |
10226 | def __ne__(*args, **kwargs): | |
a95a7133 | 10227 | """__ne__(self, GBSpan other) -> bool""" |
54f9ee45 | 10228 | return _core_.GBSpan___ne__(*args, **kwargs) |
e811c8ce RD |
10229 | |
10230 | def Set(*args, **kwargs): | |
a95a7133 | 10231 | """Set(self, int rowspan=1, int colspan=1)""" |
54f9ee45 | 10232 | return _core_.GBSpan_Set(*args, **kwargs) |
e811c8ce RD |
10233 | |
10234 | def Get(*args, **kwargs): | |
a95a7133 | 10235 | """Get(self) -> PyObject""" |
54f9ee45 | 10236 | return _core_.GBSpan_Get(*args, **kwargs) |
e811c8ce | 10237 | |
41e2b43e | 10238 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
10239 | def __str__(self): return str(self.Get()) |
10240 | def __repr__(self): return 'wx.GBSpan'+str(self.Get()) | |
10241 | def __len__(self): return len(self.Get()) | |
10242 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
10243 | def __setitem__(self, index, val): |
10244 | if index == 0: self.SetRowspan(val) | |
10245 | elif index == 1: self.SetColspan(val) | |
10246 | else: raise IndexError | |
e811c8ce | 10247 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
10248 | __safe_for_unpickling__ = True |
10249 | def __reduce__(self): return (wx.GBSpan, self.Get()) | |
d14a1e28 RD |
10250 | |
10251 | rowspan = property(GetRowspan, SetRowspan) | |
10252 | colspan = property(GetColspan, SetColspan) | |
10253 | ||
10254 | ||
10255 | class GBSpanPtr(GBSpan): | |
10256 | def __init__(self, this): | |
10257 | self.this = this | |
10258 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10259 | self.__class__ = GBSpan | |
54f9ee45 | 10260 | _core_.GBSpan_swigregister(GBSpanPtr) |
d14a1e28 RD |
10261 | |
10262 | class GBSizerItem(SizerItem): | |
248ed943 RD |
10263 | """ |
10264 | The wx.GBSizerItem class is used to track the additional data about | |
10265 | items in a `wx.GridBagSizer` such as the item's position in the grid | |
10266 | and how many rows or columns it spans. | |
10267 | ||
10268 | """ | |
e811c8ce RD |
10269 | def __repr__(self): |
10270 | return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10271 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10272 | """ |
10273 | __init__(self) -> GBSizerItem | |
10274 | ||
10275 | Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer | |
10276 | size will need to be set, as well as a position and span before this | |
10277 | item can be used in a Sizer. | |
10278 | ||
10279 | You will probably never need to create a wx.GBSizerItem directly as they | |
10280 | are created automatically when the sizer's Add method is called. | |
10281 | """ | |
54f9ee45 | 10282 | newobj = _core_.new_GBSizerItem(*args, **kwargs) |
d14a1e28 RD |
10283 | self.this = newobj.this |
10284 | self.thisown = 1 | |
10285 | del newobj.thisown | |
e811c8ce | 10286 | def GetPos(*args, **kwargs): |
248ed943 RD |
10287 | """ |
10288 | GetPos(self) -> GBPosition | |
10289 | ||
10290 | Get the grid position of the item | |
10291 | """ | |
54f9ee45 | 10292 | return _core_.GBSizerItem_GetPos(*args, **kwargs) |
e811c8ce RD |
10293 | |
10294 | def GetPosTuple(self): return self.GetPos().Get() | |
10295 | def GetSpan(*args, **kwargs): | |
248ed943 RD |
10296 | """ |
10297 | GetSpan(self) -> GBSpan | |
10298 | ||
10299 | Get the row and column spanning of the item | |
10300 | """ | |
54f9ee45 | 10301 | return _core_.GBSizerItem_GetSpan(*args, **kwargs) |
e811c8ce RD |
10302 | |
10303 | def GetSpanTuple(self): return self.GetSpan().Get() | |
10304 | def SetPos(*args, **kwargs): | |
248ed943 RD |
10305 | """ |
10306 | SetPos(self, GBPosition pos) -> bool | |
10307 | ||
10308 | If the item is already a member of a sizer then first ensure that | |
10309 | there is no other item that would intersect with this one at the new | |
10310 | position, then set the new position. Returns True if the change is | |
10311 | successful and after the next Layout() the item will be moved. | |
10312 | """ | |
54f9ee45 | 10313 | return _core_.GBSizerItem_SetPos(*args, **kwargs) |
e811c8ce RD |
10314 | |
10315 | def SetSpan(*args, **kwargs): | |
248ed943 RD |
10316 | """ |
10317 | SetSpan(self, GBSpan span) -> bool | |
10318 | ||
10319 | If the item is already a member of a sizer then first ensure that | |
10320 | there is no other item that would intersect with this one with its new | |
10321 | spanning size, then set the new spanning. Returns True if the change | |
10322 | is successful and after the next Layout() the item will be resized. | |
10323 | ||
10324 | """ | |
54f9ee45 | 10325 | return _core_.GBSizerItem_SetSpan(*args, **kwargs) |
e811c8ce | 10326 | |
248ed943 | 10327 | def Intersects(*args, **kwargs): |
0df68c9f | 10328 | """ |
a95a7133 | 10329 | Intersects(self, GBSizerItem other) -> bool |
248ed943 RD |
10330 | |
10331 | Returns True if this item and the other item instersect. | |
0df68c9f | 10332 | """ |
248ed943 RD |
10333 | return _core_.GBSizerItem_Intersects(*args, **kwargs) |
10334 | ||
10335 | def IntersectsPos(*args, **kwargs): | |
10336 | """ | |
10337 | IntersectsPos(self, GBPosition pos, GBSpan span) -> bool | |
10338 | ||
10339 | Returns True if the given pos/span would intersect with this item. | |
10340 | """ | |
10341 | return _core_.GBSizerItem_IntersectsPos(*args, **kwargs) | |
e811c8ce RD |
10342 | |
10343 | def GetEndPos(*args, **kwargs): | |
248ed943 RD |
10344 | """ |
10345 | GetEndPos(self) -> GBPosition | |
10346 | ||
10347 | Get the row and column of the endpoint of this item. | |
10348 | """ | |
54f9ee45 | 10349 | return _core_.GBSizerItem_GetEndPos(*args, **kwargs) |
e811c8ce RD |
10350 | |
10351 | def GetGBSizer(*args, **kwargs): | |
248ed943 RD |
10352 | """ |
10353 | GetGBSizer(self) -> GridBagSizer | |
10354 | ||
10355 | Get the sizer this item is a member of. | |
10356 | """ | |
54f9ee45 | 10357 | return _core_.GBSizerItem_GetGBSizer(*args, **kwargs) |
e811c8ce RD |
10358 | |
10359 | def SetGBSizer(*args, **kwargs): | |
248ed943 RD |
10360 | """ |
10361 | SetGBSizer(self, GridBagSizer sizer) | |
10362 | ||
10363 | Set the sizer this item is a member of. | |
10364 | """ | |
54f9ee45 | 10365 | return _core_.GBSizerItem_SetGBSizer(*args, **kwargs) |
e811c8ce | 10366 | |
d14a1e28 RD |
10367 | |
10368 | class GBSizerItemPtr(GBSizerItem): | |
10369 | def __init__(self, this): | |
10370 | self.this = this | |
10371 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10372 | self.__class__ = GBSizerItem | |
54f9ee45 | 10373 | _core_.GBSizerItem_swigregister(GBSizerItemPtr) |
d14a1e28 RD |
10374 | DefaultSpan = cvar.DefaultSpan |
10375 | ||
10376 | def GBSizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
10377 | """ |
10378 | GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, | |
248ed943 RD |
10379 | int border, PyObject userData=None) -> GBSizerItem |
10380 | ||
10381 | Construct a `wx.GBSizerItem` for a window. | |
0df68c9f | 10382 | """ |
54f9ee45 | 10383 | val = _core_.new_GBSizerItemWindow(*args, **kwargs) |
d14a1e28 RD |
10384 | val.thisown = 1 |
10385 | return val | |
10386 | ||
10387 | def GBSizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
10388 | """ |
10389 | GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, | |
248ed943 RD |
10390 | int border, PyObject userData=None) -> GBSizerItem |
10391 | ||
10392 | Construct a `wx.GBSizerItem` for a sizer | |
0df68c9f | 10393 | """ |
54f9ee45 | 10394 | val = _core_.new_GBSizerItemSizer(*args, **kwargs) |
d14a1e28 RD |
10395 | val.thisown = 1 |
10396 | return val | |
10397 | ||
10398 | def GBSizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
10399 | """ |
10400 | GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, | |
248ed943 RD |
10401 | int flag, int border, PyObject userData=None) -> GBSizerItem |
10402 | ||
10403 | Construct a `wx.GBSizerItem` for a spacer. | |
0df68c9f | 10404 | """ |
54f9ee45 | 10405 | val = _core_.new_GBSizerItemSpacer(*args, **kwargs) |
d14a1e28 RD |
10406 | val.thisown = 1 |
10407 | return val | |
10408 | ||
10409 | class GridBagSizer(FlexGridSizer): | |
248ed943 RD |
10410 | """ |
10411 | A `wx.Sizer` that can lay out items in a virtual grid like a | |
10412 | `wx.FlexGridSizer` but in this case explicit positioning of the items | |
10413 | is allowed using `wx.GBPosition`, and items can optionally span more | |
10414 | than one row and/or column using `wx.GBSpan`. The total size of the | |
10415 | virtual grid is determined by the largest row and column that items are | |
10416 | positioned at, adjusted for spanning. | |
10417 | ||
10418 | """ | |
e811c8ce RD |
10419 | def __repr__(self): |
10420 | return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10421 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10422 | """ |
10423 | __init__(self, int vgap=0, int hgap=0) -> GridBagSizer | |
10424 | ||
10425 | Constructor, with optional parameters to specify the gap between the | |
10426 | rows and columns. | |
10427 | """ | |
54f9ee45 | 10428 | newobj = _core_.new_GridBagSizer(*args, **kwargs) |
d14a1e28 RD |
10429 | self.this = newobj.this |
10430 | self.thisown = 1 | |
10431 | del newobj.thisown | |
1823fbb4 RD |
10432 | self._setOORInfo(self) |
10433 | ||
e811c8ce | 10434 | def Add(*args, **kwargs): |
0df68c9f | 10435 | """ |
248ed943 | 10436 | Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0, |
d3b6e4ff | 10437 | int border=0, userData=None) -> wx.GBSizerItem |
248ed943 RD |
10438 | |
10439 | Adds an item to the sizer at the grid cell *pos*, optionally spanning | |
10440 | more than one row or column as specified with *span*. The remaining | |
10441 | args behave similarly to `wx.Sizer.Add`. | |
10442 | ||
10443 | Returns True if the item was successfully placed at the given cell | |
10444 | position, False if something was already there. | |
10445 | ||
0df68c9f | 10446 | """ |
54f9ee45 | 10447 | return _core_.GridBagSizer_Add(*args, **kwargs) |
e811c8ce RD |
10448 | |
10449 | def AddItem(*args, **kwargs): | |
248ed943 | 10450 | """ |
d3b6e4ff | 10451 | Add(self, GBSizerItem item) -> wx.GBSizerItem |
248ed943 RD |
10452 | |
10453 | Add an item to the sizer using a `wx.GBSizerItem`. Returns True if | |
10454 | the item was successfully placed at its given cell position, False if | |
10455 | something was already there. | |
10456 | """ | |
54f9ee45 | 10457 | return _core_.GridBagSizer_AddItem(*args, **kwargs) |
e811c8ce | 10458 | |
84f85550 RD |
10459 | def GetCellSize(*args, **kwargs): |
10460 | """ | |
10461 | GetCellSize(self, int row, int col) -> Size | |
10462 | ||
10463 | Get the size of the specified cell, including hgap and | |
10464 | vgap. Only valid after a Layout. | |
10465 | """ | |
10466 | return _core_.GridBagSizer_GetCellSize(*args, **kwargs) | |
10467 | ||
e811c8ce | 10468 | def GetEmptyCellSize(*args, **kwargs): |
248ed943 RD |
10469 | """ |
10470 | GetEmptyCellSize(self) -> Size | |
10471 | ||
10472 | Get the size used for cells in the grid with no item. | |
10473 | """ | |
54f9ee45 | 10474 | return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs) |
e811c8ce RD |
10475 | |
10476 | def SetEmptyCellSize(*args, **kwargs): | |
248ed943 RD |
10477 | """ |
10478 | SetEmptyCellSize(self, Size sz) | |
10479 | ||
10480 | Set the size used for cells in the grid with no item. | |
10481 | """ | |
54f9ee45 | 10482 | return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs) |
e811c8ce RD |
10483 | |
10484 | def GetItemPosition(*args): | |
0df68c9f | 10485 | """ |
248ed943 RD |
10486 | GetItemPosition(self, item) -> GBPosition |
10487 | ||
10488 | Get the grid position of the specified *item* where *item* is either a | |
10489 | window or subsizer that is a member of this sizer, or a zero-based | |
10490 | index of an item. | |
0df68c9f | 10491 | """ |
54f9ee45 | 10492 | return _core_.GridBagSizer_GetItemPosition(*args) |
e811c8ce RD |
10493 | |
10494 | def SetItemPosition(*args): | |
0df68c9f | 10495 | """ |
248ed943 RD |
10496 | SetItemPosition(self, item, GBPosition pos) -> bool |
10497 | ||
10498 | Set the grid position of the specified *item* where *item* is either a | |
10499 | window or subsizer that is a member of this sizer, or a zero-based | |
10500 | index of an item. Returns True on success. If the move is not | |
10501 | allowed (because an item is already there) then False is returned. | |
10502 | ||
0df68c9f | 10503 | """ |
54f9ee45 | 10504 | return _core_.GridBagSizer_SetItemPosition(*args) |
e811c8ce RD |
10505 | |
10506 | def GetItemSpan(*args): | |
0df68c9f | 10507 | """ |
248ed943 RD |
10508 | GetItemSpan(self, item) -> GBSpan |
10509 | ||
10510 | Get the row/col spanning of the specified *item* where *item* is | |
10511 | either a window or subsizer that is a member of this sizer, or a | |
10512 | zero-based index of an item. | |
0df68c9f | 10513 | """ |
54f9ee45 | 10514 | return _core_.GridBagSizer_GetItemSpan(*args) |
e811c8ce RD |
10515 | |
10516 | def SetItemSpan(*args): | |
0df68c9f | 10517 | """ |
248ed943 RD |
10518 | SetItemSpan(self, item, GBSpan span) -> bool |
10519 | ||
10520 | Set the row/col spanning of the specified *item* where *item* is | |
10521 | either a window or subsizer that is a member of this sizer, or a | |
10522 | zero-based index of an item. Returns True on success. If the move is | |
10523 | not allowed (because an item is already there) then False is returned. | |
0df68c9f | 10524 | """ |
54f9ee45 | 10525 | return _core_.GridBagSizer_SetItemSpan(*args) |
e811c8ce RD |
10526 | |
10527 | def FindItem(*args): | |
0df68c9f | 10528 | """ |
248ed943 RD |
10529 | FindItem(self, item) -> GBSizerItem |
10530 | ||
10531 | Find the sizer item for the given window or subsizer, returns None if | |
10532 | not found. (non-recursive) | |
0df68c9f | 10533 | """ |
54f9ee45 | 10534 | return _core_.GridBagSizer_FindItem(*args) |
e811c8ce RD |
10535 | |
10536 | def FindItemAtPosition(*args, **kwargs): | |
248ed943 RD |
10537 | """ |
10538 | FindItemAtPosition(self, GBPosition pos) -> GBSizerItem | |
10539 | ||
10540 | Return the sizer item for the given grid cell, or None if there is no | |
10541 | item at that position. (non-recursive) | |
10542 | """ | |
54f9ee45 | 10543 | return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs) |
e811c8ce RD |
10544 | |
10545 | def FindItemAtPoint(*args, **kwargs): | |
248ed943 RD |
10546 | """ |
10547 | FindItemAtPoint(self, Point pt) -> GBSizerItem | |
10548 | ||
10549 | Return the sizer item located at the point given in *pt*, or None if | |
10550 | there is no item at that point. The (x,y) coordinates in pt correspond | |
10551 | to the client coordinates of the window using the sizer for | |
10552 | layout. (non-recursive) | |
10553 | """ | |
54f9ee45 | 10554 | return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs) |
e811c8ce | 10555 | |
248ed943 RD |
10556 | def CheckForIntersection(*args, **kwargs): |
10557 | """ | |
10558 | CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool | |
e811c8ce | 10559 | |
248ed943 RD |
10560 | Look at all items and see if any intersect (or would overlap) the |
10561 | given *item*. Returns True if so, False if there would be no overlap. | |
10562 | If an *excludeItem* is given then it will not be checked for | |
10563 | intersection, for example it may be the item we are checking the | |
10564 | position of. | |
e811c8ce | 10565 | |
248ed943 RD |
10566 | """ |
10567 | return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs) | |
e811c8ce | 10568 | |
248ed943 | 10569 | def CheckForIntersectionPos(*args, **kwargs): |
0df68c9f | 10570 | """ |
248ed943 RD |
10571 | CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool |
10572 | ||
10573 | Look at all items and see if any intersect (or would overlap) the | |
10574 | given position and span. Returns True if so, False if there would be | |
10575 | no overlap. If an *excludeItem* is given then it will not be checked | |
10576 | for intersection, for example it may be the item we are checking the | |
10577 | position of. | |
0df68c9f | 10578 | """ |
248ed943 | 10579 | return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs) |
e811c8ce | 10580 | |
d14a1e28 RD |
10581 | |
10582 | class GridBagSizerPtr(GridBagSizer): | |
10583 | def __init__(self, this): | |
10584 | self.this = this | |
10585 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10586 | self.__class__ = GridBagSizer | |
54f9ee45 | 10587 | _core_.GridBagSizer_swigregister(GridBagSizerPtr) |
d14a1e28 RD |
10588 | |
10589 | #--------------------------------------------------------------------------- | |
10590 | ||
54f9ee45 RD |
10591 | Left = _core_.Left |
10592 | Top = _core_.Top | |
10593 | Right = _core_.Right | |
10594 | Bottom = _core_.Bottom | |
10595 | Width = _core_.Width | |
10596 | Height = _core_.Height | |
10597 | Centre = _core_.Centre | |
10598 | Center = _core_.Center | |
10599 | CentreX = _core_.CentreX | |
10600 | CentreY = _core_.CentreY | |
10601 | Unconstrained = _core_.Unconstrained | |
10602 | AsIs = _core_.AsIs | |
10603 | PercentOf = _core_.PercentOf | |
10604 | Above = _core_.Above | |
10605 | Below = _core_.Below | |
10606 | LeftOf = _core_.LeftOf | |
10607 | RightOf = _core_.RightOf | |
10608 | SameAs = _core_.SameAs | |
10609 | Absolute = _core_.Absolute | |
d14a1e28 | 10610 | class IndividualLayoutConstraint(Object): |
15afbcd0 | 10611 | """ |
41e2b43e RD |
10612 | Objects of this class are stored in the `wx.LayoutConstraints` class as |
10613 | one of eight possible constraints that a window can be involved in. | |
10614 | You will never need to create an instance of | |
10615 | wx.IndividualLayoutConstraint, rather you should create a | |
10616 | `wx.LayoutConstraints` instance and use the individual contstraints | |
15afbcd0 | 10617 | that it contains. |
15afbcd0 | 10618 | """ |
d14a1e28 RD |
10619 | def __init__(self): raise RuntimeError, "No constructor defined" |
10620 | def __repr__(self): | |
10621 | return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 10622 | def Set(*args, **kwargs): |
41e2b43e RD |
10623 | """ |
10624 | Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN) | |
10625 | ||
10626 | Sets the properties of the constraint. Normally called by one of the | |
10627 | convenience functions such as Above, RightOf, SameAs. | |
10628 | """ | |
54f9ee45 | 10629 | return _core_.IndividualLayoutConstraint_Set(*args, **kwargs) |
e811c8ce RD |
10630 | |
10631 | def LeftOf(*args, **kwargs): | |
15afbcd0 | 10632 | """ |
a95a7133 | 10633 | LeftOf(self, Window sibling, int marg=0) |
15afbcd0 | 10634 | |
41e2b43e RD |
10635 | Constrains this edge to be to the left of the given window, with an |
10636 | optional margin. Implicitly, this is relative to the left edge of the | |
10637 | other window. | |
15afbcd0 | 10638 | """ |
54f9ee45 | 10639 | return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs) |
e811c8ce RD |
10640 | |
10641 | def RightOf(*args, **kwargs): | |
15afbcd0 | 10642 | """ |
a95a7133 | 10643 | RightOf(self, Window sibling, int marg=0) |
15afbcd0 | 10644 | |
41e2b43e RD |
10645 | Constrains this edge to be to the right of the given window, with an |
10646 | optional margin. Implicitly, this is relative to the right edge of the | |
10647 | other window. | |
15afbcd0 | 10648 | """ |
54f9ee45 | 10649 | return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs) |
e811c8ce RD |
10650 | |
10651 | def Above(*args, **kwargs): | |
15afbcd0 | 10652 | """ |
a95a7133 | 10653 | Above(self, Window sibling, int marg=0) |
15afbcd0 | 10654 | |
41e2b43e RD |
10655 | Constrains this edge to be above the given window, with an optional |
10656 | margin. Implicitly, this is relative to the top edge of the other | |
10657 | window. | |
15afbcd0 | 10658 | """ |
54f9ee45 | 10659 | return _core_.IndividualLayoutConstraint_Above(*args, **kwargs) |
e811c8ce RD |
10660 | |
10661 | def Below(*args, **kwargs): | |
15afbcd0 | 10662 | """ |
a95a7133 | 10663 | Below(self, Window sibling, int marg=0) |
15afbcd0 | 10664 | |
41e2b43e RD |
10665 | Constrains this edge to be below the given window, with an optional |
10666 | margin. Implicitly, this is relative to the bottom edge of the other | |
10667 | window. | |
15afbcd0 | 10668 | """ |
54f9ee45 | 10669 | return _core_.IndividualLayoutConstraint_Below(*args, **kwargs) |
e811c8ce RD |
10670 | |
10671 | def SameAs(*args, **kwargs): | |
15afbcd0 | 10672 | """ |
a95a7133 | 10673 | SameAs(self, Window otherW, int edge, int marg=0) |
15afbcd0 | 10674 | |
41e2b43e RD |
10675 | Constrains this edge or dimension to be to the same as the edge of the |
10676 | given window, with an optional margin. | |
15afbcd0 | 10677 | """ |
54f9ee45 | 10678 | return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs) |
e811c8ce RD |
10679 | |
10680 | def PercentOf(*args, **kwargs): | |
15afbcd0 | 10681 | """ |
a95a7133 | 10682 | PercentOf(self, Window otherW, int wh, int per) |
15afbcd0 | 10683 | |
41e2b43e RD |
10684 | Constrains this edge or dimension to be to a percentage of the given |
10685 | window, with an optional margin. | |
15afbcd0 | 10686 | """ |
54f9ee45 | 10687 | return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs) |
e811c8ce RD |
10688 | |
10689 | def Absolute(*args, **kwargs): | |
15afbcd0 | 10690 | """ |
a95a7133 | 10691 | Absolute(self, int val) |
15afbcd0 | 10692 | |
41e2b43e | 10693 | Constrains this edge or dimension to be the given absolute value. |
15afbcd0 | 10694 | """ |
54f9ee45 | 10695 | return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs) |
e811c8ce RD |
10696 | |
10697 | def Unconstrained(*args, **kwargs): | |
15afbcd0 | 10698 | """ |
a95a7133 | 10699 | Unconstrained(self) |
15afbcd0 | 10700 | |
41e2b43e RD |
10701 | Sets this edge or dimension to be unconstrained, that is, dependent on |
10702 | other edges and dimensions from which this value can be deduced. | |
15afbcd0 | 10703 | """ |
54f9ee45 | 10704 | return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs) |
e811c8ce RD |
10705 | |
10706 | def AsIs(*args, **kwargs): | |
15afbcd0 | 10707 | """ |
a95a7133 | 10708 | AsIs(self) |
15afbcd0 | 10709 | |
41e2b43e RD |
10710 | Sets this edge or constraint to be whatever the window's value is at |
10711 | the moment. If either of the width and height constraints are *as is*, | |
10712 | the window will not be resized, but moved instead. This is important | |
10713 | when considering panel items which are intended to have a default | |
10714 | size, such as a button, which may take its size from the size of the | |
10715 | button label. | |
15afbcd0 | 10716 | """ |
54f9ee45 | 10717 | return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs) |
e811c8ce RD |
10718 | |
10719 | def GetOtherWindow(*args, **kwargs): | |
a95a7133 | 10720 | """GetOtherWindow(self) -> Window""" |
54f9ee45 | 10721 | return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs) |
e811c8ce RD |
10722 | |
10723 | def GetMyEdge(*args, **kwargs): | |
a95a7133 | 10724 | """GetMyEdge(self) -> int""" |
54f9ee45 | 10725 | return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs) |
e811c8ce RD |
10726 | |
10727 | def SetEdge(*args, **kwargs): | |
a95a7133 | 10728 | """SetEdge(self, int which)""" |
54f9ee45 | 10729 | return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs) |
e811c8ce RD |
10730 | |
10731 | def SetValue(*args, **kwargs): | |
a95a7133 | 10732 | """SetValue(self, int v)""" |
54f9ee45 | 10733 | return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs) |
e811c8ce RD |
10734 | |
10735 | def GetMargin(*args, **kwargs): | |
a95a7133 | 10736 | """GetMargin(self) -> int""" |
54f9ee45 | 10737 | return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs) |
e811c8ce RD |
10738 | |
10739 | def SetMargin(*args, **kwargs): | |
a95a7133 | 10740 | """SetMargin(self, int m)""" |
54f9ee45 | 10741 | return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs) |
e811c8ce RD |
10742 | |
10743 | def GetValue(*args, **kwargs): | |
a95a7133 | 10744 | """GetValue(self) -> int""" |
54f9ee45 | 10745 | return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs) |
e811c8ce RD |
10746 | |
10747 | def GetPercent(*args, **kwargs): | |
a95a7133 | 10748 | """GetPercent(self) -> int""" |
54f9ee45 | 10749 | return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs) |
e811c8ce RD |
10750 | |
10751 | def GetOtherEdge(*args, **kwargs): | |
a95a7133 | 10752 | """GetOtherEdge(self) -> int""" |
54f9ee45 | 10753 | return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs) |
e811c8ce RD |
10754 | |
10755 | def GetDone(*args, **kwargs): | |
a95a7133 | 10756 | """GetDone(self) -> bool""" |
54f9ee45 | 10757 | return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs) |
e811c8ce RD |
10758 | |
10759 | def SetDone(*args, **kwargs): | |
a95a7133 | 10760 | """SetDone(self, bool d)""" |
54f9ee45 | 10761 | return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs) |
e811c8ce RD |
10762 | |
10763 | def GetRelationship(*args, **kwargs): | |
a95a7133 | 10764 | """GetRelationship(self) -> int""" |
54f9ee45 | 10765 | return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs) |
e811c8ce RD |
10766 | |
10767 | def SetRelationship(*args, **kwargs): | |
a95a7133 | 10768 | """SetRelationship(self, int r)""" |
54f9ee45 | 10769 | return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs) |
e811c8ce RD |
10770 | |
10771 | def ResetIfWin(*args, **kwargs): | |
15afbcd0 | 10772 | """ |
a95a7133 | 10773 | ResetIfWin(self, Window otherW) -> bool |
15afbcd0 RD |
10774 | |
10775 | Reset constraint if it mentions otherWin | |
10776 | """ | |
54f9ee45 | 10777 | return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs) |
e811c8ce RD |
10778 | |
10779 | def SatisfyConstraint(*args, **kwargs): | |
15afbcd0 | 10780 | """ |
a95a7133 | 10781 | SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool |
15afbcd0 RD |
10782 | |
10783 | Try to satisfy constraint | |
10784 | """ | |
54f9ee45 | 10785 | return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs) |
e811c8ce RD |
10786 | |
10787 | def GetEdge(*args, **kwargs): | |
15afbcd0 | 10788 | """ |
a95a7133 | 10789 | GetEdge(self, int which, Window thisWin, Window other) -> int |
15afbcd0 RD |
10790 | |
10791 | Get the value of this edge or dimension, or if this | |
10792 | is not determinable, -1. | |
10793 | """ | |
54f9ee45 | 10794 | return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs) |
e811c8ce | 10795 | |
d14a1e28 RD |
10796 | |
10797 | class IndividualLayoutConstraintPtr(IndividualLayoutConstraint): | |
10798 | def __init__(self, this): | |
10799 | self.this = this | |
10800 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10801 | self.__class__ = IndividualLayoutConstraint | |
54f9ee45 | 10802 | _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr) |
d14a1e28 RD |
10803 | |
10804 | class LayoutConstraints(Object): | |
15afbcd0 | 10805 | """ |
41e2b43e RD |
10806 | **Note:** constraints are now deprecated and you should use sizers |
10807 | instead. | |
15afbcd0 | 10808 | |
41e2b43e RD |
10809 | Objects of this class can be associated with a window to define its |
10810 | layout constraints, with respect to siblings or its parent. | |
15afbcd0 RD |
10811 | |
10812 | The class consists of the following eight constraints of class | |
10813 | wx.IndividualLayoutConstraint, some or all of which should be accessed | |
10814 | directly to set the appropriate constraints. | |
10815 | ||
10816 | * left: represents the left hand edge of the window | |
10817 | * right: represents the right hand edge of the window | |
10818 | * top: represents the top edge of the window | |
10819 | * bottom: represents the bottom edge of the window | |
10820 | * width: represents the width of the window | |
10821 | * height: represents the height of the window | |
10822 | * centreX: represents the horizontal centre point of the window | |
10823 | * centreY: represents the vertical centre point of the window | |
10824 | ||
41e2b43e RD |
10825 | Most constraints are initially set to have the relationship |
10826 | wxUnconstrained, which means that their values should be calculated by | |
10827 | looking at known constraints. The exceptions are width and height, | |
10828 | which are set to wxAsIs to ensure that if the user does not specify a | |
10829 | constraint, the existing width and height will be used, to be | |
10830 | compatible with panel items which often have take a default size. If | |
10831 | the constraint is ``wx.AsIs``, the dimension will not be changed. | |
10832 | ||
10833 | :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints` | |
15afbcd0 RD |
10834 | |
10835 | """ | |
e811c8ce RD |
10836 | def __repr__(self): |
10837 | return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
10838 | left = property(_core_.LayoutConstraints_left_get) |
10839 | top = property(_core_.LayoutConstraints_top_get) | |
10840 | right = property(_core_.LayoutConstraints_right_get) | |
10841 | bottom = property(_core_.LayoutConstraints_bottom_get) | |
10842 | width = property(_core_.LayoutConstraints_width_get) | |
10843 | height = property(_core_.LayoutConstraints_height_get) | |
10844 | centreX = property(_core_.LayoutConstraints_centreX_get) | |
10845 | centreY = property(_core_.LayoutConstraints_centreY_get) | |
d14a1e28 | 10846 | def __init__(self, *args, **kwargs): |
a95a7133 | 10847 | """__init__(self) -> LayoutConstraints""" |
54f9ee45 | 10848 | newobj = _core_.new_LayoutConstraints(*args, **kwargs) |
d14a1e28 RD |
10849 | self.this = newobj.this |
10850 | self.thisown = 1 | |
10851 | del newobj.thisown | |
e811c8ce | 10852 | def SatisfyConstraints(*args, **kwargs): |
6c3b4aae | 10853 | """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)""" |
54f9ee45 | 10854 | return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs) |
e811c8ce RD |
10855 | |
10856 | def AreSatisfied(*args, **kwargs): | |
a95a7133 | 10857 | """AreSatisfied(self) -> bool""" |
54f9ee45 | 10858 | return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs) |
e811c8ce | 10859 | |
d14a1e28 RD |
10860 | |
10861 | class LayoutConstraintsPtr(LayoutConstraints): | |
10862 | def __init__(self, this): | |
10863 | self.this = this | |
10864 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10865 | self.__class__ = LayoutConstraints | |
54f9ee45 | 10866 | _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr) |
d14a1e28 RD |
10867 | |
10868 | #---------------------------------------------------------------------------- | |
10869 | ||
322913ce | 10870 | # Use Python's bool constants if available, make some if not |
d14a1e28 RD |
10871 | try: |
10872 | True | |
10873 | except NameError: | |
322913ce RD |
10874 | __builtins__.True = 1==1 |
10875 | __builtins__.False = 1==0 | |
4f89f6a3 RD |
10876 | def bool(value): return not not value |
10877 | __builtins__.bool = bool | |
d14a1e28 | 10878 | |
d14a1e28 RD |
10879 | |
10880 | ||
10881 | # workarounds for bad wxRTTI names | |
10882 | __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge' | |
10883 | __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider' | |
10884 | __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar' | |
10885 | ||
10886 | ||
10887 | #---------------------------------------------------------------------------- | |
10888 | # Load version numbers from __version__... Ensure that major and minor | |
7bc1e663 | 10889 | # versions are the same for both wxPython and wxWidgets. |
d14a1e28 RD |
10890 | |
10891 | from __version__ import * | |
10892 | __version__ = VERSION_STRING | |
10893 | ||
7bc1e663 RD |
10894 | assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch" |
10895 | assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch" | |
54f9ee45 | 10896 | if RELEASE_VERSION != _core_.RELEASE_VERSION: |
d14a1e28 | 10897 | import warnings |
7bc1e663 | 10898 | warnings.warn("wxPython/wxWidgets release number mismatch") |
d14a1e28 RD |
10899 | |
10900 | #---------------------------------------------------------------------------- | |
10901 | ||
5cbf236d RD |
10902 | # Set the default string conversion encoding from the locale |
10903 | import locale | |
10904 | default = locale.getdefaultlocale()[1] | |
10905 | if default: | |
10906 | wx.SetDefaultPyEncoding(default) | |
10907 | del default | |
10908 | del locale | |
10909 | ||
10910 | #---------------------------------------------------------------------------- | |
10911 | ||
d14a1e28 RD |
10912 | class PyDeadObjectError(AttributeError): |
10913 | pass | |
10914 | ||
d14a1e28 RD |
10915 | class _wxPyDeadObject(object): |
10916 | """ | |
10917 | Instances of wx objects that are OOR capable will have their __class__ | |
10918 | changed to this class when the C++ object is deleted. This should help | |
10919 | prevent crashes due to referencing a bogus C++ pointer. | |
10920 | """ | |
10921 | reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)" | |
10922 | attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed." | |
10923 | ||
3a04f143 | 10924 | def __repr__(self): |
d14a1e28 RD |
10925 | if not hasattr(self, "_name"): |
10926 | self._name = "[unknown]" | |
10927 | return self.reprStr % self._name | |
10928 | ||
3a04f143 | 10929 | def __getattr__(self, *args): |
d14a1e28 RD |
10930 | if not hasattr(self, "_name"): |
10931 | self._name = "[unknown]" | |
3a04f143 RD |
10932 | raise PyDeadObjectError(self.attrStr % self._name) |
10933 | ||
10934 | def __nonzero__(self): | |
10935 | return 0 | |
10936 | ||
10937 | ||
10938 | ||
10939 | class PyUnbornObjectError(AttributeError): | |
10940 | pass | |
10941 | ||
10942 | class _wxPyUnbornObject(object): | |
10943 | """ | |
54f9ee45 | 10944 | Some stock objects are created when the wx._core module is |
3a04f143 RD |
10945 | imported, but their C++ instance is not created until the wx.App |
10946 | object is created and initialized. These object instances will | |
10947 | temporarily have their __class__ changed to this class so an | |
10948 | exception will be raised if they are used before the C++ instance | |
10949 | is ready. | |
10950 | """ | |
10951 | ||
10952 | reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)" | |
10953 | attrStr = "The C++ part of this object has not been initialized, attribute access not allowed." | |
10954 | ||
10955 | def __repr__(self): | |
10956 | #if not hasattr(self, "_name"): | |
10957 | # self._name = "[unknown]" | |
10958 | return self.reprStr #% self._name | |
10959 | ||
10960 | def __getattr__(self, *args): | |
10961 | #if not hasattr(self, "_name"): | |
10962 | # self._name = "[unknown]" | |
10963 | raise PyUnbornObjectError(self.attrStr) # % self._name ) | |
d14a1e28 RD |
10964 | |
10965 | def __nonzero__(self): | |
10966 | return 0 | |
10967 | ||
10968 | ||
10969 | #---------------------------------------------------------------------------- | |
d14a1e28 RD |
10970 | |
10971 | def CallAfter(callable, *args, **kw): | |
10972 | """ | |
10973 | Call the specified function after the current and pending event | |
10974 | handlers have been completed. This is also good for making GUI | |
61863841 RD |
10975 | method calls from non-GUI threads. Any extra positional or |
10976 | keyword args are passed on to the callable when it is called. | |
10977 | ||
10978 | :see: `wx.FutureCall` | |
d14a1e28 RD |
10979 | """ |
10980 | app = wx.GetApp() | |
dfbb5885 | 10981 | assert app is not None, 'No wx.App created yet' |
d14a1e28 | 10982 | |
148275d3 RD |
10983 | if not hasattr(app, "_CallAfterId"): |
10984 | app._CallAfterId = wx.NewEventType() | |
10985 | app.Connect(-1, -1, app._CallAfterId, | |
10986 | lambda event: event.callable(*event.args, **event.kw) ) | |
d14a1e28 | 10987 | evt = wx.PyEvent() |
148275d3 | 10988 | evt.SetEventType(app._CallAfterId) |
d14a1e28 RD |
10989 | evt.callable = callable |
10990 | evt.args = args | |
10991 | evt.kw = kw | |
10992 | wx.PostEvent(app, evt) | |
10993 | ||
d14a1e28 RD |
10994 | #---------------------------------------------------------------------------- |
10995 | ||
10996 | ||
10997 | class FutureCall: | |
10998 | """ | |
8ac8dba0 | 10999 | A convenience class for `wx.Timer`, that calls the given callable |
d14a1e28 RD |
11000 | object once after the given amount of milliseconds, passing any |
11001 | positional or keyword args. The return value of the callable is | |
61863841 | 11002 | availbale after it has been run with the `GetResult` method. |
d14a1e28 RD |
11003 | |
11004 | If you don't need to get the return value or restart the timer | |
11005 | then there is no need to hold a reference to this object. It will | |
11006 | hold a reference to itself while the timer is running (the timer | |
11007 | has a reference to self.Notify) but the cycle will be broken when | |
11008 | the timer completes, automatically cleaning up the wx.FutureCall | |
11009 | object. | |
61863841 RD |
11010 | |
11011 | :see: `wx.CallAfter` | |
d14a1e28 RD |
11012 | """ |
11013 | def __init__(self, millis, callable, *args, **kwargs): | |
11014 | self.millis = millis | |
11015 | self.callable = callable | |
11016 | self.SetArgs(*args, **kwargs) | |
11017 | self.runCount = 0 | |
4276dc52 | 11018 | self.running = False |
d14a1e28 RD |
11019 | self.hasRun = False |
11020 | self.result = None | |
11021 | self.timer = None | |
11022 | self.Start() | |
11023 | ||
11024 | def __del__(self): | |
11025 | self.Stop() | |
11026 | ||
11027 | ||
11028 | def Start(self, millis=None, *args, **kwargs): | |
11029 | """ | |
11030 | (Re)start the timer | |
11031 | """ | |
11032 | self.hasRun = False | |
11033 | if millis is not None: | |
11034 | self.millis = millis | |
11035 | if args or kwargs: | |
11036 | self.SetArgs(*args, **kwargs) | |
11037 | self.Stop() | |
11038 | self.timer = wx.PyTimer(self.Notify) | |
11039 | self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) | |
4276dc52 | 11040 | self.running = True |
d14a1e28 RD |
11041 | Restart = Start |
11042 | ||
11043 | ||
11044 | def Stop(self): | |
11045 | """ | |
11046 | Stop and destroy the timer. | |
11047 | """ | |
11048 | if self.timer is not None: | |
11049 | self.timer.Stop() | |
11050 | self.timer = None | |
11051 | ||
11052 | ||
11053 | def GetInterval(self): | |
11054 | if self.timer is not None: | |
11055 | return self.timer.GetInterval() | |
11056 | else: | |
11057 | return 0 | |
11058 | ||
11059 | ||
11060 | def IsRunning(self): | |
11061 | return self.timer is not None and self.timer.IsRunning() | |
11062 | ||
11063 | ||
11064 | def SetArgs(self, *args, **kwargs): | |
11065 | """ | |
11066 | (Re)set the args passed to the callable object. This is | |
11067 | useful in conjunction with Restart if you want to schedule a | |
11068 | new call to the same callable object but with different | |
11069 | parameters. | |
11070 | """ | |
11071 | self.args = args | |
11072 | self.kwargs = kwargs | |
11073 | ||
11074 | ||
11075 | def HasRun(self): | |
11076 | return self.hasRun | |
11077 | ||
11078 | def GetResult(self): | |
11079 | return self.result | |
11080 | ||
11081 | def Notify(self): | |
11082 | """ | |
11083 | The timer has expired so call the callable. | |
11084 | """ | |
11085 | if self.callable and getattr(self.callable, 'im_self', True): | |
11086 | self.runCount += 1 | |
4276dc52 | 11087 | self.running = False |
d14a1e28 RD |
11088 | self.result = self.callable(*self.args, **self.kwargs) |
11089 | self.hasRun = True | |
4276dc52 RD |
11090 | if not self.running: |
11091 | # if it wasn't restarted, then cleanup | |
11092 | wx.CallAfter(self.Stop) | |
d14a1e28 RD |
11093 | |
11094 | ||
a95a7133 RD |
11095 | |
11096 | #---------------------------------------------------------------------------- | |
11097 | # Control which items in this module should be documented by epydoc. | |
11098 | # We allow only classes and functions, which will help reduce the size | |
11099 | # of the docs by filtering out the zillions of constants, EVT objects, | |
11100 | # and etc that don't make much sense by themselves, but are instead | |
11101 | # documented (or will be) as part of the classes/functions/methods | |
11102 | # where they should be used. | |
11103 | ||
66c033b4 RD |
11104 | class __DocFilter: |
11105 | """ | |
11106 | A filter for epydoc that only allows non-Ptr classes and | |
11107 | fucntions, in order to reduce the clutter in the API docs. | |
11108 | """ | |
11109 | def __init__(self, globals): | |
11110 | self._globals = globals | |
11111 | ||
11112 | def __call__(self, name): | |
11113 | import types | |
11114 | obj = self._globals.get(name, None) | |
11115 | if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]: | |
11116 | return False | |
11117 | if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'): | |
11118 | return False | |
11119 | return True | |
a95a7133 | 11120 | |
d14a1e28 RD |
11121 | #---------------------------------------------------------------------------- |
11122 | #---------------------------------------------------------------------------- | |
11123 | ||
11124 | # Import other modules in this package that should show up in the | |
11125 | # "core" wx namespace | |
54f9ee45 RD |
11126 | from _gdi import * |
11127 | from _windows import * | |
11128 | from _controls import * | |
11129 | from _misc import * | |
d14a1e28 | 11130 | |
3a04f143 RD |
11131 | |
11132 | # Fixup the stock objects since they can't be used yet. (They will be | |
11133 | # restored in wx.PyApp.OnInit.) | |
54f9ee45 | 11134 | _core_._wxPyFixStockObjects() |
3a04f143 | 11135 | |
d14a1e28 RD |
11136 | #---------------------------------------------------------------------------- |
11137 | #---------------------------------------------------------------------------- | |
11138 | ||
11139 |