]>
Commit | Line | Data |
---|---|---|
0085ce49 | 1 | # This file was created automatically by SWIG 1.3.29. |
d14a1e28 RD |
2 | # Don't modify this file, modify the SWIG interface instead. |
3 | ||
54f9ee45 | 4 | import _core_ |
0085ce49 RD |
5 | import new |
6 | new_instancemethod = new.instancemethod | |
093d3ff1 | 7 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): |
0085ce49 | 8 | if (name == "thisown"): return self.this.own(value) |
093d3ff1 | 9 | if (name == "this"): |
0085ce49 RD |
10 | if type(value).__name__ == 'PySwigObject': |
11 | self.__dict__[name] = value | |
093d3ff1 RD |
12 | return |
13 | method = class_type.__swig_setmethods__.get(name,None) | |
14 | if method: return method(self,value) | |
0085ce49 | 15 | if (not static) or hasattr(self,name): |
093d3ff1 RD |
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): | |
0085ce49 | 24 | if (name == "thisown"): return self.this.own() |
093d3ff1 RD |
25 | method = class_type.__swig_getmethods__.get(name,None) |
26 | if method: return method(self) | |
27 | raise AttributeError,name | |
28 | ||
0085ce49 RD |
29 | def _swig_repr(self): |
30 | try: strthis = "proxy of " + self.this.__repr__() | |
31 | except: strthis = "" | |
32 | return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) | |
33 | ||
093d3ff1 RD |
34 | import types |
35 | try: | |
36 | _object = types.ObjectType | |
37 | _newclass = 1 | |
38 | except AttributeError: | |
39 | class _object : pass | |
40 | _newclass = 0 | |
41 | del types | |
42 | ||
43 | ||
44 | def _swig_setattr_nondynamic_method(set): | |
45 | def set_attr(self,name,value): | |
0085ce49 RD |
46 | if (name == "thisown"): return self.this.own(value) |
47 | if hasattr(self,name) or (name == "this"): | |
093d3ff1 RD |
48 | set(self,name,value) |
49 | else: | |
50 | raise AttributeError("You cannot add attributes to %s" % self) | |
51 | return set_attr | |
52 | ||
53 | ||
d14a1e28 RD |
54 | #// Give a reference to the dictionary of this module to the C++ extension |
55 | #// code. | |
54f9ee45 | 56 | _core_._wxPySetDictionary(vars()) |
d14a1e28 RD |
57 | |
58 | #// A little trick to make 'wx' be a reference to this module so wx.Names can | |
59 | #// be used here. | |
60 | import sys as _sys | |
61 | wx = _sys.modules[__name__] | |
62 | ||
66c033b4 RD |
63 | |
64 | #---------------------------------------------------------------------------- | |
65 | ||
66 | def _deprecated(callable, msg=None): | |
67 | """ | |
68 | Create a wrapper function that will raise a DeprecationWarning | |
69 | before calling the callable. | |
70 | """ | |
71 | if msg is None: | |
72 | msg = "%s is deprecated" % callable | |
73 | def deprecatedWrapper(*args, **kwargs): | |
74 | import warnings | |
75 | warnings.warn(msg, DeprecationWarning, stacklevel=2) | |
76 | return callable(*args, **kwargs) | |
77 | deprecatedWrapper.__doc__ = msg | |
78 | return deprecatedWrapper | |
79 | ||
80 | ||
81 | #---------------------------------------------------------------------------- | |
82 | ||
54f9ee45 RD |
83 | NOT_FOUND = _core_.NOT_FOUND |
84 | VSCROLL = _core_.VSCROLL | |
85 | HSCROLL = _core_.HSCROLL | |
86 | CAPTION = _core_.CAPTION | |
87 | DOUBLE_BORDER = _core_.DOUBLE_BORDER | |
88 | SUNKEN_BORDER = _core_.SUNKEN_BORDER | |
89 | RAISED_BORDER = _core_.RAISED_BORDER | |
90 | BORDER = _core_.BORDER | |
91 | SIMPLE_BORDER = _core_.SIMPLE_BORDER | |
92 | STATIC_BORDER = _core_.STATIC_BORDER | |
93 | TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW | |
94 | NO_BORDER = _core_.NO_BORDER | |
bcd0d7b6 | 95 | DEFAULT_CONTROL_BORDER = _core_.DEFAULT_CONTROL_BORDER |
6d88e192 | 96 | DEFAULT_STATUSBAR_STYLE = _core_.DEFAULT_STATUSBAR_STYLE |
54f9ee45 RD |
97 | TAB_TRAVERSAL = _core_.TAB_TRAVERSAL |
98 | WANTS_CHARS = _core_.WANTS_CHARS | |
99 | POPUP_WINDOW = _core_.POPUP_WINDOW | |
100 | CENTER_FRAME = _core_.CENTER_FRAME | |
101 | CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN | |
102 | CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN | |
54f9ee45 RD |
103 | CLIP_CHILDREN = _core_.CLIP_CHILDREN |
104 | CLIP_SIBLINGS = _core_.CLIP_SIBLINGS | |
105 | ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB | |
106 | RETAINED = _core_.RETAINED | |
107 | BACKINGSTORE = _core_.BACKINGSTORE | |
108 | COLOURED = _core_.COLOURED | |
109 | FIXED_LENGTH = _core_.FIXED_LENGTH | |
110 | LB_NEEDED_SB = _core_.LB_NEEDED_SB | |
111 | LB_ALWAYS_SB = _core_.LB_ALWAYS_SB | |
112 | LB_SORT = _core_.LB_SORT | |
113 | LB_SINGLE = _core_.LB_SINGLE | |
114 | LB_MULTIPLE = _core_.LB_MULTIPLE | |
115 | LB_EXTENDED = _core_.LB_EXTENDED | |
116 | LB_OWNERDRAW = _core_.LB_OWNERDRAW | |
117 | LB_HSCROLL = _core_.LB_HSCROLL | |
118 | PROCESS_ENTER = _core_.PROCESS_ENTER | |
119 | PASSWORD = _core_.PASSWORD | |
120 | CB_SIMPLE = _core_.CB_SIMPLE | |
121 | CB_DROPDOWN = _core_.CB_DROPDOWN | |
122 | CB_SORT = _core_.CB_SORT | |
123 | CB_READONLY = _core_.CB_READONLY | |
124 | RA_HORIZONTAL = _core_.RA_HORIZONTAL | |
125 | RA_VERTICAL = _core_.RA_VERTICAL | |
126 | RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS | |
127 | RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS | |
fef4c27a | 128 | RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX |
54f9ee45 RD |
129 | RB_GROUP = _core_.RB_GROUP |
130 | RB_SINGLE = _core_.RB_SINGLE | |
54f9ee45 RD |
131 | SB_HORIZONTAL = _core_.SB_HORIZONTAL |
132 | SB_VERTICAL = _core_.SB_VERTICAL | |
fef4c27a | 133 | RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX |
54f9ee45 RD |
134 | ST_SIZEGRIP = _core_.ST_SIZEGRIP |
135 | ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE | |
136 | FLOOD_SURFACE = _core_.FLOOD_SURFACE | |
137 | FLOOD_BORDER = _core_.FLOOD_BORDER | |
138 | ODDEVEN_RULE = _core_.ODDEVEN_RULE | |
139 | WINDING_RULE = _core_.WINDING_RULE | |
140 | TOOL_TOP = _core_.TOOL_TOP | |
141 | TOOL_BOTTOM = _core_.TOOL_BOTTOM | |
142 | TOOL_LEFT = _core_.TOOL_LEFT | |
143 | TOOL_RIGHT = _core_.TOOL_RIGHT | |
144 | OK = _core_.OK | |
145 | YES_NO = _core_.YES_NO | |
146 | CANCEL = _core_.CANCEL | |
147 | YES = _core_.YES | |
148 | NO = _core_.NO | |
149 | NO_DEFAULT = _core_.NO_DEFAULT | |
150 | YES_DEFAULT = _core_.YES_DEFAULT | |
151 | ICON_EXCLAMATION = _core_.ICON_EXCLAMATION | |
152 | ICON_HAND = _core_.ICON_HAND | |
153 | ICON_QUESTION = _core_.ICON_QUESTION | |
154 | ICON_INFORMATION = _core_.ICON_INFORMATION | |
155 | ICON_STOP = _core_.ICON_STOP | |
156 | ICON_ASTERISK = _core_.ICON_ASTERISK | |
157 | ICON_MASK = _core_.ICON_MASK | |
158 | ICON_WARNING = _core_.ICON_WARNING | |
159 | ICON_ERROR = _core_.ICON_ERROR | |
160 | FORWARD = _core_.FORWARD | |
161 | BACKWARD = _core_.BACKWARD | |
162 | RESET = _core_.RESET | |
163 | HELP = _core_.HELP | |
164 | MORE = _core_.MORE | |
165 | SETUP = _core_.SETUP | |
166 | SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH | |
167 | SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT | |
168 | SIZE_AUTO = _core_.SIZE_AUTO | |
169 | SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING | |
170 | SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE | |
943e8dfd | 171 | SIZE_FORCE = _core_.SIZE_FORCE |
54f9ee45 RD |
172 | PORTRAIT = _core_.PORTRAIT |
173 | LANDSCAPE = _core_.LANDSCAPE | |
174 | PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH | |
175 | PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM | |
176 | PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW | |
177 | PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT | |
178 | ID_ANY = _core_.ID_ANY | |
179 | ID_SEPARATOR = _core_.ID_SEPARATOR | |
943e8dfd | 180 | ID_NONE = _core_.ID_NONE |
54f9ee45 RD |
181 | ID_LOWEST = _core_.ID_LOWEST |
182 | ID_OPEN = _core_.ID_OPEN | |
183 | ID_CLOSE = _core_.ID_CLOSE | |
184 | ID_NEW = _core_.ID_NEW | |
185 | ID_SAVE = _core_.ID_SAVE | |
186 | ID_SAVEAS = _core_.ID_SAVEAS | |
187 | ID_REVERT = _core_.ID_REVERT | |
188 | ID_EXIT = _core_.ID_EXIT | |
189 | ID_UNDO = _core_.ID_UNDO | |
190 | ID_REDO = _core_.ID_REDO | |
191 | ID_HELP = _core_.ID_HELP | |
192 | ID_PRINT = _core_.ID_PRINT | |
193 | ID_PRINT_SETUP = _core_.ID_PRINT_SETUP | |
194 | ID_PREVIEW = _core_.ID_PREVIEW | |
195 | ID_ABOUT = _core_.ID_ABOUT | |
196 | ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS | |
197 | ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS | |
198 | ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES | |
199 | ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT | |
200 | ID_CLOSE_ALL = _core_.ID_CLOSE_ALL | |
201 | ID_PREFERENCES = _core_.ID_PREFERENCES | |
202 | ID_CUT = _core_.ID_CUT | |
203 | ID_COPY = _core_.ID_COPY | |
204 | ID_PASTE = _core_.ID_PASTE | |
205 | ID_CLEAR = _core_.ID_CLEAR | |
206 | ID_FIND = _core_.ID_FIND | |
207 | ID_DUPLICATE = _core_.ID_DUPLICATE | |
208 | ID_SELECTALL = _core_.ID_SELECTALL | |
209 | ID_DELETE = _core_.ID_DELETE | |
210 | ID_REPLACE = _core_.ID_REPLACE | |
211 | ID_REPLACE_ALL = _core_.ID_REPLACE_ALL | |
212 | ID_PROPERTIES = _core_.ID_PROPERTIES | |
213 | ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS | |
214 | ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS | |
215 | ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS | |
216 | ID_VIEW_LIST = _core_.ID_VIEW_LIST | |
217 | ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE | |
218 | ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME | |
219 | ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE | |
220 | ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE | |
221 | ID_FILE1 = _core_.ID_FILE1 | |
222 | ID_FILE2 = _core_.ID_FILE2 | |
223 | ID_FILE3 = _core_.ID_FILE3 | |
224 | ID_FILE4 = _core_.ID_FILE4 | |
225 | ID_FILE5 = _core_.ID_FILE5 | |
226 | ID_FILE6 = _core_.ID_FILE6 | |
227 | ID_FILE7 = _core_.ID_FILE7 | |
228 | ID_FILE8 = _core_.ID_FILE8 | |
229 | ID_FILE9 = _core_.ID_FILE9 | |
230 | ID_OK = _core_.ID_OK | |
231 | ID_CANCEL = _core_.ID_CANCEL | |
232 | ID_APPLY = _core_.ID_APPLY | |
233 | ID_YES = _core_.ID_YES | |
234 | ID_NO = _core_.ID_NO | |
235 | ID_STATIC = _core_.ID_STATIC | |
236 | ID_FORWARD = _core_.ID_FORWARD | |
237 | ID_BACKWARD = _core_.ID_BACKWARD | |
238 | ID_DEFAULT = _core_.ID_DEFAULT | |
239 | ID_MORE = _core_.ID_MORE | |
240 | ID_SETUP = _core_.ID_SETUP | |
241 | ID_RESET = _core_.ID_RESET | |
242 | ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP | |
243 | ID_YESTOALL = _core_.ID_YESTOALL | |
244 | ID_NOTOALL = _core_.ID_NOTOALL | |
245 | ID_ABORT = _core_.ID_ABORT | |
246 | ID_RETRY = _core_.ID_RETRY | |
247 | ID_IGNORE = _core_.ID_IGNORE | |
7bc1e663 RD |
248 | ID_ADD = _core_.ID_ADD |
249 | ID_REMOVE = _core_.ID_REMOVE | |
250 | ID_UP = _core_.ID_UP | |
251 | ID_DOWN = _core_.ID_DOWN | |
252 | ID_HOME = _core_.ID_HOME | |
253 | ID_REFRESH = _core_.ID_REFRESH | |
254 | ID_STOP = _core_.ID_STOP | |
255 | ID_INDEX = _core_.ID_INDEX | |
256 | ID_BOLD = _core_.ID_BOLD | |
257 | ID_ITALIC = _core_.ID_ITALIC | |
258 | ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER | |
259 | ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL | |
260 | ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT | |
261 | ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT | |
262 | ID_UNDERLINE = _core_.ID_UNDERLINE | |
263 | ID_INDENT = _core_.ID_INDENT | |
264 | ID_UNINDENT = _core_.ID_UNINDENT | |
265 | ID_ZOOM_100 = _core_.ID_ZOOM_100 | |
266 | ID_ZOOM_FIT = _core_.ID_ZOOM_FIT | |
267 | ID_ZOOM_IN = _core_.ID_ZOOM_IN | |
268 | ID_ZOOM_OUT = _core_.ID_ZOOM_OUT | |
269 | ID_UNDELETE = _core_.ID_UNDELETE | |
270 | ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED | |
54f9ee45 RD |
271 | ID_HIGHEST = _core_.ID_HIGHEST |
272 | OPEN = _core_.OPEN | |
273 | SAVE = _core_.SAVE | |
274 | HIDE_READONLY = _core_.HIDE_READONLY | |
275 | OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT | |
276 | FILE_MUST_EXIST = _core_.FILE_MUST_EXIST | |
277 | MULTIPLE = _core_.MULTIPLE | |
278 | CHANGE_DIR = _core_.CHANGE_DIR | |
279 | ACCEL_ALT = _core_.ACCEL_ALT | |
280 | ACCEL_CTRL = _core_.ACCEL_CTRL | |
281 | ACCEL_SHIFT = _core_.ACCEL_SHIFT | |
282 | ACCEL_NORMAL = _core_.ACCEL_NORMAL | |
283 | PD_AUTO_HIDE = _core_.PD_AUTO_HIDE | |
284 | PD_APP_MODAL = _core_.PD_APP_MODAL | |
285 | PD_CAN_ABORT = _core_.PD_CAN_ABORT | |
286 | PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME | |
287 | PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME | |
288 | PD_REMAINING_TIME = _core_.PD_REMAINING_TIME | |
e505d15e RD |
289 | PD_SMOOTH = _core_.PD_SMOOTH |
290 | PD_CAN_SKIP = _core_.PD_CAN_SKIP | |
54f9ee45 RD |
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 | |
d04418a7 RD |
384 | STIPPLE_MASK = _core_.STIPPLE_MASK |
385 | STIPPLE_MASK_OPAQUE = _core_.STIPPLE_MASK_OPAQUE | |
54f9ee45 RD |
386 | BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH |
387 | CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH | |
388 | FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH | |
389 | CROSS_HATCH = _core_.CROSS_HATCH | |
390 | HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH | |
391 | VERTICAL_HATCH = _core_.VERTICAL_HATCH | |
392 | JOIN_BEVEL = _core_.JOIN_BEVEL | |
393 | JOIN_MITER = _core_.JOIN_MITER | |
394 | JOIN_ROUND = _core_.JOIN_ROUND | |
395 | CAP_ROUND = _core_.CAP_ROUND | |
396 | CAP_PROJECTING = _core_.CAP_PROJECTING | |
397 | CAP_BUTT = _core_.CAP_BUTT | |
398 | CLEAR = _core_.CLEAR | |
399 | XOR = _core_.XOR | |
400 | INVERT = _core_.INVERT | |
401 | OR_REVERSE = _core_.OR_REVERSE | |
402 | AND_REVERSE = _core_.AND_REVERSE | |
403 | COPY = _core_.COPY | |
404 | AND = _core_.AND | |
405 | AND_INVERT = _core_.AND_INVERT | |
406 | NO_OP = _core_.NO_OP | |
407 | NOR = _core_.NOR | |
408 | EQUIV = _core_.EQUIV | |
409 | SRC_INVERT = _core_.SRC_INVERT | |
410 | OR_INVERT = _core_.OR_INVERT | |
411 | NAND = _core_.NAND | |
412 | OR = _core_.OR | |
413 | SET = _core_.SET | |
414 | WXK_BACK = _core_.WXK_BACK | |
415 | WXK_TAB = _core_.WXK_TAB | |
416 | WXK_RETURN = _core_.WXK_RETURN | |
417 | WXK_ESCAPE = _core_.WXK_ESCAPE | |
418 | WXK_SPACE = _core_.WXK_SPACE | |
419 | WXK_DELETE = _core_.WXK_DELETE | |
420 | WXK_START = _core_.WXK_START | |
421 | WXK_LBUTTON = _core_.WXK_LBUTTON | |
422 | WXK_RBUTTON = _core_.WXK_RBUTTON | |
423 | WXK_CANCEL = _core_.WXK_CANCEL | |
424 | WXK_MBUTTON = _core_.WXK_MBUTTON | |
425 | WXK_CLEAR = _core_.WXK_CLEAR | |
426 | WXK_SHIFT = _core_.WXK_SHIFT | |
427 | WXK_ALT = _core_.WXK_ALT | |
428 | WXK_CONTROL = _core_.WXK_CONTROL | |
429 | WXK_MENU = _core_.WXK_MENU | |
430 | WXK_PAUSE = _core_.WXK_PAUSE | |
431 | WXK_CAPITAL = _core_.WXK_CAPITAL | |
432 | WXK_PRIOR = _core_.WXK_PRIOR | |
433 | WXK_NEXT = _core_.WXK_NEXT | |
434 | WXK_END = _core_.WXK_END | |
435 | WXK_HOME = _core_.WXK_HOME | |
436 | WXK_LEFT = _core_.WXK_LEFT | |
437 | WXK_UP = _core_.WXK_UP | |
438 | WXK_RIGHT = _core_.WXK_RIGHT | |
439 | WXK_DOWN = _core_.WXK_DOWN | |
440 | WXK_SELECT = _core_.WXK_SELECT | |
441 | WXK_PRINT = _core_.WXK_PRINT | |
442 | WXK_EXECUTE = _core_.WXK_EXECUTE | |
443 | WXK_SNAPSHOT = _core_.WXK_SNAPSHOT | |
444 | WXK_INSERT = _core_.WXK_INSERT | |
445 | WXK_HELP = _core_.WXK_HELP | |
446 | WXK_NUMPAD0 = _core_.WXK_NUMPAD0 | |
447 | WXK_NUMPAD1 = _core_.WXK_NUMPAD1 | |
448 | WXK_NUMPAD2 = _core_.WXK_NUMPAD2 | |
449 | WXK_NUMPAD3 = _core_.WXK_NUMPAD3 | |
450 | WXK_NUMPAD4 = _core_.WXK_NUMPAD4 | |
451 | WXK_NUMPAD5 = _core_.WXK_NUMPAD5 | |
452 | WXK_NUMPAD6 = _core_.WXK_NUMPAD6 | |
453 | WXK_NUMPAD7 = _core_.WXK_NUMPAD7 | |
454 | WXK_NUMPAD8 = _core_.WXK_NUMPAD8 | |
455 | WXK_NUMPAD9 = _core_.WXK_NUMPAD9 | |
456 | WXK_MULTIPLY = _core_.WXK_MULTIPLY | |
457 | WXK_ADD = _core_.WXK_ADD | |
458 | WXK_SEPARATOR = _core_.WXK_SEPARATOR | |
459 | WXK_SUBTRACT = _core_.WXK_SUBTRACT | |
460 | WXK_DECIMAL = _core_.WXK_DECIMAL | |
461 | WXK_DIVIDE = _core_.WXK_DIVIDE | |
462 | WXK_F1 = _core_.WXK_F1 | |
463 | WXK_F2 = _core_.WXK_F2 | |
464 | WXK_F3 = _core_.WXK_F3 | |
465 | WXK_F4 = _core_.WXK_F4 | |
466 | WXK_F5 = _core_.WXK_F5 | |
467 | WXK_F6 = _core_.WXK_F6 | |
468 | WXK_F7 = _core_.WXK_F7 | |
469 | WXK_F8 = _core_.WXK_F8 | |
470 | WXK_F9 = _core_.WXK_F9 | |
471 | WXK_F10 = _core_.WXK_F10 | |
472 | WXK_F11 = _core_.WXK_F11 | |
473 | WXK_F12 = _core_.WXK_F12 | |
474 | WXK_F13 = _core_.WXK_F13 | |
475 | WXK_F14 = _core_.WXK_F14 | |
476 | WXK_F15 = _core_.WXK_F15 | |
477 | WXK_F16 = _core_.WXK_F16 | |
478 | WXK_F17 = _core_.WXK_F17 | |
479 | WXK_F18 = _core_.WXK_F18 | |
480 | WXK_F19 = _core_.WXK_F19 | |
481 | WXK_F20 = _core_.WXK_F20 | |
482 | WXK_F21 = _core_.WXK_F21 | |
483 | WXK_F22 = _core_.WXK_F22 | |
484 | WXK_F23 = _core_.WXK_F23 | |
485 | WXK_F24 = _core_.WXK_F24 | |
486 | WXK_NUMLOCK = _core_.WXK_NUMLOCK | |
487 | WXK_SCROLL = _core_.WXK_SCROLL | |
488 | WXK_PAGEUP = _core_.WXK_PAGEUP | |
489 | WXK_PAGEDOWN = _core_.WXK_PAGEDOWN | |
490 | WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE | |
491 | WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB | |
492 | WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER | |
493 | WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1 | |
494 | WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2 | |
495 | WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3 | |
496 | WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4 | |
497 | WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME | |
498 | WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT | |
499 | WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP | |
500 | WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT | |
501 | WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN | |
502 | WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR | |
503 | WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP | |
504 | WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT | |
505 | WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN | |
506 | WXK_NUMPAD_END = _core_.WXK_NUMPAD_END | |
507 | WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN | |
508 | WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT | |
509 | WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE | |
510 | WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL | |
511 | WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY | |
512 | WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD | |
513 | WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR | |
514 | WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT | |
515 | WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL | |
516 | WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE | |
517 | WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT | |
518 | WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT | |
519 | WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU | |
88c6b281 RD |
520 | WXK_COMMAND = _core_.WXK_COMMAND |
521 | WXK_SPECIAL1 = _core_.WXK_SPECIAL1 | |
522 | WXK_SPECIAL2 = _core_.WXK_SPECIAL2 | |
523 | WXK_SPECIAL3 = _core_.WXK_SPECIAL3 | |
524 | WXK_SPECIAL4 = _core_.WXK_SPECIAL4 | |
525 | WXK_SPECIAL5 = _core_.WXK_SPECIAL5 | |
526 | WXK_SPECIAL6 = _core_.WXK_SPECIAL6 | |
527 | WXK_SPECIAL7 = _core_.WXK_SPECIAL7 | |
528 | WXK_SPECIAL8 = _core_.WXK_SPECIAL8 | |
529 | WXK_SPECIAL9 = _core_.WXK_SPECIAL9 | |
530 | WXK_SPECIAL10 = _core_.WXK_SPECIAL10 | |
531 | WXK_SPECIAL11 = _core_.WXK_SPECIAL11 | |
532 | WXK_SPECIAL12 = _core_.WXK_SPECIAL12 | |
533 | WXK_SPECIAL13 = _core_.WXK_SPECIAL13 | |
534 | WXK_SPECIAL14 = _core_.WXK_SPECIAL14 | |
535 | WXK_SPECIAL15 = _core_.WXK_SPECIAL15 | |
536 | WXK_SPECIAL16 = _core_.WXK_SPECIAL16 | |
537 | WXK_SPECIAL17 = _core_.WXK_SPECIAL17 | |
538 | WXK_SPECIAL18 = _core_.WXK_SPECIAL18 | |
539 | WXK_SPECIAL19 = _core_.WXK_SPECIAL19 | |
540 | WXK_SPECIAL20 = _core_.WXK_SPECIAL20 | |
54f9ee45 RD |
541 | PAPER_NONE = _core_.PAPER_NONE |
542 | PAPER_LETTER = _core_.PAPER_LETTER | |
543 | PAPER_LEGAL = _core_.PAPER_LEGAL | |
544 | PAPER_A4 = _core_.PAPER_A4 | |
545 | PAPER_CSHEET = _core_.PAPER_CSHEET | |
546 | PAPER_DSHEET = _core_.PAPER_DSHEET | |
547 | PAPER_ESHEET = _core_.PAPER_ESHEET | |
548 | PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL | |
549 | PAPER_TABLOID = _core_.PAPER_TABLOID | |
550 | PAPER_LEDGER = _core_.PAPER_LEDGER | |
551 | PAPER_STATEMENT = _core_.PAPER_STATEMENT | |
552 | PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE | |
553 | PAPER_A3 = _core_.PAPER_A3 | |
554 | PAPER_A4SMALL = _core_.PAPER_A4SMALL | |
555 | PAPER_A5 = _core_.PAPER_A5 | |
556 | PAPER_B4 = _core_.PAPER_B4 | |
557 | PAPER_B5 = _core_.PAPER_B5 | |
558 | PAPER_FOLIO = _core_.PAPER_FOLIO | |
559 | PAPER_QUARTO = _core_.PAPER_QUARTO | |
560 | PAPER_10X14 = _core_.PAPER_10X14 | |
561 | PAPER_11X17 = _core_.PAPER_11X17 | |
562 | PAPER_NOTE = _core_.PAPER_NOTE | |
563 | PAPER_ENV_9 = _core_.PAPER_ENV_9 | |
564 | PAPER_ENV_10 = _core_.PAPER_ENV_10 | |
565 | PAPER_ENV_11 = _core_.PAPER_ENV_11 | |
566 | PAPER_ENV_12 = _core_.PAPER_ENV_12 | |
567 | PAPER_ENV_14 = _core_.PAPER_ENV_14 | |
568 | PAPER_ENV_DL = _core_.PAPER_ENV_DL | |
569 | PAPER_ENV_C5 = _core_.PAPER_ENV_C5 | |
570 | PAPER_ENV_C3 = _core_.PAPER_ENV_C3 | |
571 | PAPER_ENV_C4 = _core_.PAPER_ENV_C4 | |
572 | PAPER_ENV_C6 = _core_.PAPER_ENV_C6 | |
573 | PAPER_ENV_C65 = _core_.PAPER_ENV_C65 | |
574 | PAPER_ENV_B4 = _core_.PAPER_ENV_B4 | |
575 | PAPER_ENV_B5 = _core_.PAPER_ENV_B5 | |
576 | PAPER_ENV_B6 = _core_.PAPER_ENV_B6 | |
577 | PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY | |
578 | PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH | |
579 | PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL | |
580 | PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US | |
581 | PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN | |
582 | PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN | |
583 | PAPER_ISO_B4 = _core_.PAPER_ISO_B4 | |
584 | PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD | |
585 | PAPER_9X11 = _core_.PAPER_9X11 | |
586 | PAPER_10X11 = _core_.PAPER_10X11 | |
587 | PAPER_15X11 = _core_.PAPER_15X11 | |
588 | PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE | |
589 | PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA | |
590 | PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA | |
591 | PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA | |
592 | PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA | |
593 | PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE | |
594 | PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE | |
595 | PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE | |
596 | PAPER_A_PLUS = _core_.PAPER_A_PLUS | |
597 | PAPER_B_PLUS = _core_.PAPER_B_PLUS | |
598 | PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS | |
599 | PAPER_A4_PLUS = _core_.PAPER_A4_PLUS | |
600 | PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE | |
601 | PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE | |
602 | PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA | |
603 | PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA | |
604 | PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA | |
605 | PAPER_A2 = _core_.PAPER_A2 | |
606 | PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE | |
607 | PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE | |
6c75a4cf RD |
608 | PAPER_DBL_JAPANESE_POSTCARD = _core_.PAPER_DBL_JAPANESE_POSTCARD |
609 | PAPER_A6 = _core_.PAPER_A6 | |
610 | PAPER_JENV_KAKU2 = _core_.PAPER_JENV_KAKU2 | |
611 | PAPER_JENV_KAKU3 = _core_.PAPER_JENV_KAKU3 | |
612 | PAPER_JENV_CHOU3 = _core_.PAPER_JENV_CHOU3 | |
613 | PAPER_JENV_CHOU4 = _core_.PAPER_JENV_CHOU4 | |
614 | PAPER_LETTER_ROTATED = _core_.PAPER_LETTER_ROTATED | |
615 | PAPER_A3_ROTATED = _core_.PAPER_A3_ROTATED | |
616 | PAPER_A4_ROTATED = _core_.PAPER_A4_ROTATED | |
617 | PAPER_A5_ROTATED = _core_.PAPER_A5_ROTATED | |
618 | PAPER_B4_JIS_ROTATED = _core_.PAPER_B4_JIS_ROTATED | |
619 | PAPER_B5_JIS_ROTATED = _core_.PAPER_B5_JIS_ROTATED | |
620 | PAPER_JAPANESE_POSTCARD_ROTATED = _core_.PAPER_JAPANESE_POSTCARD_ROTATED | |
621 | PAPER_DBL_JAPANESE_POSTCARD_ROTATED = _core_.PAPER_DBL_JAPANESE_POSTCARD_ROTATED | |
622 | PAPER_A6_ROTATED = _core_.PAPER_A6_ROTATED | |
623 | PAPER_JENV_KAKU2_ROTATED = _core_.PAPER_JENV_KAKU2_ROTATED | |
624 | PAPER_JENV_KAKU3_ROTATED = _core_.PAPER_JENV_KAKU3_ROTATED | |
625 | PAPER_JENV_CHOU3_ROTATED = _core_.PAPER_JENV_CHOU3_ROTATED | |
626 | PAPER_JENV_CHOU4_ROTATED = _core_.PAPER_JENV_CHOU4_ROTATED | |
627 | PAPER_B6_JIS = _core_.PAPER_B6_JIS | |
628 | PAPER_B6_JIS_ROTATED = _core_.PAPER_B6_JIS_ROTATED | |
629 | PAPER_12X11 = _core_.PAPER_12X11 | |
630 | PAPER_JENV_YOU4 = _core_.PAPER_JENV_YOU4 | |
631 | PAPER_JENV_YOU4_ROTATED = _core_.PAPER_JENV_YOU4_ROTATED | |
632 | PAPER_P16K = _core_.PAPER_P16K | |
633 | PAPER_P32K = _core_.PAPER_P32K | |
634 | PAPER_P32KBIG = _core_.PAPER_P32KBIG | |
635 | PAPER_PENV_1 = _core_.PAPER_PENV_1 | |
636 | PAPER_PENV_2 = _core_.PAPER_PENV_2 | |
637 | PAPER_PENV_3 = _core_.PAPER_PENV_3 | |
638 | PAPER_PENV_4 = _core_.PAPER_PENV_4 | |
639 | PAPER_PENV_5 = _core_.PAPER_PENV_5 | |
640 | PAPER_PENV_6 = _core_.PAPER_PENV_6 | |
641 | PAPER_PENV_7 = _core_.PAPER_PENV_7 | |
642 | PAPER_PENV_8 = _core_.PAPER_PENV_8 | |
643 | PAPER_PENV_9 = _core_.PAPER_PENV_9 | |
644 | PAPER_PENV_10 = _core_.PAPER_PENV_10 | |
645 | PAPER_P16K_ROTATED = _core_.PAPER_P16K_ROTATED | |
646 | PAPER_P32K_ROTATED = _core_.PAPER_P32K_ROTATED | |
647 | PAPER_P32KBIG_ROTATED = _core_.PAPER_P32KBIG_ROTATED | |
648 | PAPER_PENV_1_ROTATED = _core_.PAPER_PENV_1_ROTATED | |
649 | PAPER_PENV_2_ROTATED = _core_.PAPER_PENV_2_ROTATED | |
650 | PAPER_PENV_3_ROTATED = _core_.PAPER_PENV_3_ROTATED | |
651 | PAPER_PENV_4_ROTATED = _core_.PAPER_PENV_4_ROTATED | |
652 | PAPER_PENV_5_ROTATED = _core_.PAPER_PENV_5_ROTATED | |
653 | PAPER_PENV_6_ROTATED = _core_.PAPER_PENV_6_ROTATED | |
654 | PAPER_PENV_7_ROTATED = _core_.PAPER_PENV_7_ROTATED | |
655 | PAPER_PENV_8_ROTATED = _core_.PAPER_PENV_8_ROTATED | |
656 | PAPER_PENV_9_ROTATED = _core_.PAPER_PENV_9_ROTATED | |
657 | PAPER_PENV_10_ROTATED = _core_.PAPER_PENV_10_ROTATED | |
54f9ee45 RD |
658 | DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX |
659 | DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL | |
660 | DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL | |
661 | ITEM_SEPARATOR = _core_.ITEM_SEPARATOR | |
662 | ITEM_NORMAL = _core_.ITEM_NORMAL | |
663 | ITEM_CHECK = _core_.ITEM_CHECK | |
664 | ITEM_RADIO = _core_.ITEM_RADIO | |
665 | ITEM_MAX = _core_.ITEM_MAX | |
666 | HT_NOWHERE = _core_.HT_NOWHERE | |
667 | HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST | |
668 | HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1 | |
669 | HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2 | |
670 | HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1 | |
671 | HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2 | |
672 | HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB | |
673 | HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1 | |
674 | HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2 | |
675 | HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST | |
676 | HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE | |
677 | HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE | |
678 | HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR | |
679 | HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR | |
680 | HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER | |
681 | HT_MAX = _core_.HT_MAX | |
682 | MOD_NONE = _core_.MOD_NONE | |
683 | MOD_ALT = _core_.MOD_ALT | |
684 | MOD_CONTROL = _core_.MOD_CONTROL | |
943e8dfd | 685 | MOD_ALTGR = _core_.MOD_ALTGR |
54f9ee45 | 686 | MOD_SHIFT = _core_.MOD_SHIFT |
943e8dfd | 687 | MOD_META = _core_.MOD_META |
54f9ee45 | 688 | MOD_WIN = _core_.MOD_WIN |
943e8dfd RD |
689 | MOD_CMD = _core_.MOD_CMD |
690 | MOD_ALL = _core_.MOD_ALL | |
54f9ee45 RD |
691 | UPDATE_UI_NONE = _core_.UPDATE_UI_NONE |
692 | UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE | |
693 | UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE | |
d14a1e28 RD |
694 | #--------------------------------------------------------------------------- |
695 | ||
696 | class Object(object): | |
0df68c9f RD |
697 | """ |
698 | The base class for most wx objects, although in wxPython not | |
699 | much functionality is needed nor exposed. | |
700 | """ | |
0085ce49 RD |
701 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
702 | def __init__(self): raise AttributeError, "No constructor defined" | |
703 | __repr__ = _swig_repr | |
e811c8ce | 704 | def GetClassName(*args, **kwargs): |
0df68c9f | 705 | """ |
a95a7133 | 706 | GetClassName(self) -> String |
e811c8ce | 707 | |
a95a7133 | 708 | Returns the class name of the C++ class using wxRTTI. |
0df68c9f | 709 | """ |
54f9ee45 | 710 | return _core_.Object_GetClassName(*args, **kwargs) |
e811c8ce RD |
711 | |
712 | def Destroy(*args, **kwargs): | |
0df68c9f | 713 | """ |
a95a7133 | 714 | Destroy(self) |
e811c8ce | 715 | |
0df68c9f RD |
716 | Deletes the C++ object this Python object is a proxy for. |
717 | """ | |
7e08d4ef RD |
718 | val = _core_.Object_Destroy(*args, **kwargs) |
719 | args[0].thisown = 0 | |
720 | return val | |
e811c8ce | 721 | |
0085ce49 RD |
722 | Object_swigregister = _core_.Object_swigregister |
723 | Object_swigregister(Object) | |
54f9ee45 | 724 | _wxPySetDictionary = _core_._wxPySetDictionary |
54f9ee45 | 725 | _wxPyFixStockObjects = _core_._wxPyFixStockObjects |
54f9ee45 | 726 | cvar = _core_.cvar |
196addbf | 727 | EmptyString = cvar.EmptyString |
d14a1e28 RD |
728 | |
729 | #--------------------------------------------------------------------------- | |
730 | ||
54f9ee45 RD |
731 | BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID |
732 | BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP | |
733 | BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO | |
734 | BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR | |
735 | BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM | |
736 | BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA | |
737 | BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM | |
738 | BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA | |
739 | BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF | |
740 | BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF | |
741 | BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG | |
742 | BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG | |
743 | BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM | |
744 | BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX | |
745 | BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT | |
746 | BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON | |
747 | BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI | |
748 | BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF | |
749 | BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR | |
750 | BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY | |
751 | CURSOR_NONE = _core_.CURSOR_NONE | |
752 | CURSOR_ARROW = _core_.CURSOR_ARROW | |
753 | CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW | |
754 | CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE | |
755 | CURSOR_CHAR = _core_.CURSOR_CHAR | |
756 | CURSOR_CROSS = _core_.CURSOR_CROSS | |
757 | CURSOR_HAND = _core_.CURSOR_HAND | |
758 | CURSOR_IBEAM = _core_.CURSOR_IBEAM | |
759 | CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON | |
760 | CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER | |
761 | CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON | |
762 | CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY | |
763 | CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH | |
764 | CURSOR_PENCIL = _core_.CURSOR_PENCIL | |
765 | CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT | |
766 | CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT | |
767 | CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW | |
768 | CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON | |
769 | CURSOR_SIZENESW = _core_.CURSOR_SIZENESW | |
770 | CURSOR_SIZENS = _core_.CURSOR_SIZENS | |
771 | CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE | |
772 | CURSOR_SIZEWE = _core_.CURSOR_SIZEWE | |
773 | CURSOR_SIZING = _core_.CURSOR_SIZING | |
774 | CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN | |
775 | CURSOR_WAIT = _core_.CURSOR_WAIT | |
776 | CURSOR_WATCH = _core_.CURSOR_WATCH | |
777 | CURSOR_BLANK = _core_.CURSOR_BLANK | |
778 | CURSOR_DEFAULT = _core_.CURSOR_DEFAULT | |
779 | CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW | |
780 | CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT | |
781 | CURSOR_MAX = _core_.CURSOR_MAX | |
d14a1e28 RD |
782 | #--------------------------------------------------------------------------- |
783 | ||
784 | class Size(object): | |
0df68c9f | 785 | """ |
41e2b43e | 786 | wx.Size is a useful data structure used to represent the size of |
0085ce49 RD |
787 | something. It simply contains integer width and height |
788 | properties. In most places in wxPython where a wx.Size is | |
093d3ff1 | 789 | expected a (width, height) tuple can be used instead. |
0df68c9f | 790 | """ |
0085ce49 RD |
791 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
792 | __repr__ = _swig_repr | |
54f9ee45 RD |
793 | width = property(_core_.Size_width_get, _core_.Size_width_set) |
794 | height = property(_core_.Size_height_get, _core_.Size_height_set) | |
242b7b46 | 795 | x = width; y = height |
0085ce49 | 796 | def __init__(self, *args, **kwargs): |
0df68c9f | 797 | """ |
a95a7133 | 798 | __init__(self, int w=0, int h=0) -> Size |
e811c8ce | 799 | |
0df68c9f RD |
800 | Creates a size object. |
801 | """ | |
0085ce49 RD |
802 | _core_.Size_swiginit(self,_core_.new_Size(*args, **kwargs)) |
803 | __swig_destroy__ = _core_.delete_Size | |
804 | __del__ = lambda self : None; | |
e811c8ce | 805 | def __eq__(*args, **kwargs): |
0df68c9f | 806 | """ |
a95a7133 | 807 | __eq__(self, Size sz) -> bool |
e811c8ce | 808 | |
0df68c9f RD |
809 | Test for equality of wx.Size objects. |
810 | """ | |
54f9ee45 | 811 | return _core_.Size___eq__(*args, **kwargs) |
e811c8ce RD |
812 | |
813 | def __ne__(*args, **kwargs): | |
0df68c9f | 814 | """ |
a95a7133 | 815 | __ne__(self, Size sz) -> bool |
e811c8ce | 816 | |
0df68c9f RD |
817 | Test for inequality. |
818 | """ | |
54f9ee45 | 819 | return _core_.Size___ne__(*args, **kwargs) |
e811c8ce RD |
820 | |
821 | def __add__(*args, **kwargs): | |
0df68c9f | 822 | """ |
a95a7133 | 823 | __add__(self, Size sz) -> Size |
e811c8ce | 824 | |
0df68c9f RD |
825 | Add sz's proprties to this and return the result. |
826 | """ | |
54f9ee45 | 827 | return _core_.Size___add__(*args, **kwargs) |
e811c8ce RD |
828 | |
829 | def __sub__(*args, **kwargs): | |
0df68c9f | 830 | """ |
a95a7133 | 831 | __sub__(self, Size sz) -> Size |
e811c8ce | 832 | |
0df68c9f RD |
833 | Subtract sz's properties from this and return the result. |
834 | """ | |
54f9ee45 | 835 | return _core_.Size___sub__(*args, **kwargs) |
e811c8ce RD |
836 | |
837 | def IncTo(*args, **kwargs): | |
0df68c9f | 838 | """ |
a95a7133 | 839 | IncTo(self, Size sz) |
e811c8ce | 840 | |
0df68c9f RD |
841 | Increments this object so that both of its dimensions are not less |
842 | than the corresponding dimensions of the size. | |
843 | """ | |
54f9ee45 | 844 | return _core_.Size_IncTo(*args, **kwargs) |
e811c8ce RD |
845 | |
846 | def DecTo(*args, **kwargs): | |
0df68c9f | 847 | """ |
a95a7133 | 848 | DecTo(self, Size sz) |
e811c8ce | 849 | |
0df68c9f RD |
850 | Decrements this object so that both of its dimensions are not greater |
851 | than the corresponding dimensions of the size. | |
852 | """ | |
54f9ee45 | 853 | return _core_.Size_DecTo(*args, **kwargs) |
e811c8ce RD |
854 | |
855 | def Set(*args, **kwargs): | |
0df68c9f | 856 | """ |
a95a7133 | 857 | Set(self, int w, int h) |
e811c8ce | 858 | |
0df68c9f RD |
859 | Set both width and height. |
860 | """ | |
54f9ee45 | 861 | return _core_.Size_Set(*args, **kwargs) |
e811c8ce RD |
862 | |
863 | def SetWidth(*args, **kwargs): | |
a95a7133 | 864 | """SetWidth(self, int w)""" |
54f9ee45 | 865 | return _core_.Size_SetWidth(*args, **kwargs) |
e811c8ce RD |
866 | |
867 | def SetHeight(*args, **kwargs): | |
a95a7133 | 868 | """SetHeight(self, int h)""" |
54f9ee45 | 869 | return _core_.Size_SetHeight(*args, **kwargs) |
e811c8ce RD |
870 | |
871 | def GetWidth(*args, **kwargs): | |
a95a7133 | 872 | """GetWidth(self) -> int""" |
54f9ee45 | 873 | return _core_.Size_GetWidth(*args, **kwargs) |
e811c8ce RD |
874 | |
875 | def GetHeight(*args, **kwargs): | |
a95a7133 | 876 | """GetHeight(self) -> int""" |
54f9ee45 | 877 | return _core_.Size_GetHeight(*args, **kwargs) |
e811c8ce | 878 | |
74a57fcd RD |
879 | def IsFullySpecified(*args, **kwargs): |
880 | """ | |
a95a7133 | 881 | IsFullySpecified(self) -> bool |
74a57fcd RD |
882 | |
883 | Returns True if both components of the size are non-default values. | |
884 | """ | |
54f9ee45 | 885 | return _core_.Size_IsFullySpecified(*args, **kwargs) |
74a57fcd RD |
886 | |
887 | def SetDefaults(*args, **kwargs): | |
888 | """ | |
a95a7133 | 889 | SetDefaults(self, Size size) |
74a57fcd | 890 | |
41e2b43e RD |
891 | Combine this size with the other one replacing the default components |
892 | of this object (i.e. equal to -1) with those of the other. | |
74a57fcd | 893 | """ |
54f9ee45 | 894 | return _core_.Size_SetDefaults(*args, **kwargs) |
74a57fcd | 895 | |
e811c8ce | 896 | def Get(*args, **kwargs): |
0df68c9f RD |
897 | """ |
898 | Get() -> (width,height) | |
e811c8ce | 899 | |
0df68c9f RD |
900 | Returns the width and height properties as a tuple. |
901 | """ | |
54f9ee45 | 902 | return _core_.Size_Get(*args, **kwargs) |
e811c8ce | 903 | |
41e2b43e | 904 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
905 | def __str__(self): return str(self.Get()) |
906 | def __repr__(self): return 'wx.Size'+str(self.Get()) | |
907 | def __len__(self): return len(self.Get()) | |
908 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
909 | def __setitem__(self, index, val): |
910 | if index == 0: self.width = val | |
911 | elif index == 1: self.height = val | |
912 | else: raise IndexError | |
e811c8ce | 913 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
914 | __safe_for_unpickling__ = True |
915 | def __reduce__(self): return (wx.Size, self.Get()) | |
d14a1e28 | 916 | |
0085ce49 RD |
917 | Size_swigregister = _core_.Size_swigregister |
918 | Size_swigregister(Size) | |
d14a1e28 RD |
919 | |
920 | #--------------------------------------------------------------------------- | |
921 | ||
922 | class RealPoint(object): | |
0df68c9f | 923 | """ |
41e2b43e RD |
924 | A data structure for representing a point or position with floating |
925 | point x and y properties. In wxPython most places that expect a | |
926 | wx.RealPoint can also accept a (x,y) tuple. | |
0df68c9f | 927 | """ |
0085ce49 RD |
928 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
929 | __repr__ = _swig_repr | |
54f9ee45 RD |
930 | x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set) |
931 | y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set) | |
0085ce49 | 932 | def __init__(self, *args, **kwargs): |
0df68c9f | 933 | """ |
a95a7133 | 934 | __init__(self, double x=0.0, double y=0.0) -> RealPoint |
e811c8ce | 935 | |
0df68c9f RD |
936 | Create a wx.RealPoint object |
937 | """ | |
0085ce49 RD |
938 | _core_.RealPoint_swiginit(self,_core_.new_RealPoint(*args, **kwargs)) |
939 | __swig_destroy__ = _core_.delete_RealPoint | |
940 | __del__ = lambda self : None; | |
e811c8ce | 941 | def __eq__(*args, **kwargs): |
0df68c9f | 942 | """ |
a95a7133 | 943 | __eq__(self, RealPoint pt) -> bool |
e811c8ce | 944 | |
0df68c9f RD |
945 | Test for equality of wx.RealPoint objects. |
946 | """ | |
54f9ee45 | 947 | return _core_.RealPoint___eq__(*args, **kwargs) |
e811c8ce RD |
948 | |
949 | def __ne__(*args, **kwargs): | |
0df68c9f | 950 | """ |
a95a7133 | 951 | __ne__(self, RealPoint pt) -> bool |
e811c8ce | 952 | |
0df68c9f RD |
953 | Test for inequality of wx.RealPoint objects. |
954 | """ | |
54f9ee45 | 955 | return _core_.RealPoint___ne__(*args, **kwargs) |
e811c8ce RD |
956 | |
957 | def __add__(*args, **kwargs): | |
0df68c9f | 958 | """ |
a95a7133 | 959 | __add__(self, RealPoint pt) -> RealPoint |
e811c8ce | 960 | |
0df68c9f RD |
961 | Add pt's proprties to this and return the result. |
962 | """ | |
54f9ee45 | 963 | return _core_.RealPoint___add__(*args, **kwargs) |
e811c8ce RD |
964 | |
965 | def __sub__(*args, **kwargs): | |
0df68c9f | 966 | """ |
a95a7133 | 967 | __sub__(self, RealPoint pt) -> RealPoint |
e811c8ce | 968 | |
0df68c9f RD |
969 | Subtract pt's proprties from this and return the result |
970 | """ | |
54f9ee45 | 971 | return _core_.RealPoint___sub__(*args, **kwargs) |
e811c8ce RD |
972 | |
973 | def Set(*args, **kwargs): | |
0df68c9f | 974 | """ |
a95a7133 | 975 | Set(self, double x, double y) |
e811c8ce | 976 | |
0df68c9f RD |
977 | Set both the x and y properties |
978 | """ | |
54f9ee45 | 979 | return _core_.RealPoint_Set(*args, **kwargs) |
e811c8ce RD |
980 | |
981 | def Get(*args, **kwargs): | |
0df68c9f RD |
982 | """ |
983 | Get() -> (x,y) | |
e811c8ce | 984 | |
0df68c9f RD |
985 | Return the x and y properties as a tuple. |
986 | """ | |
54f9ee45 | 987 | return _core_.RealPoint_Get(*args, **kwargs) |
e811c8ce | 988 | |
41e2b43e | 989 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
990 | def __str__(self): return str(self.Get()) |
991 | def __repr__(self): return 'wx.RealPoint'+str(self.Get()) | |
992 | def __len__(self): return len(self.Get()) | |
993 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 994 | def __setitem__(self, index, val): |
e811c8ce RD |
995 | if index == 0: self.x = val |
996 | elif index == 1: self.y = val | |
d14a1e28 | 997 | else: raise IndexError |
e811c8ce | 998 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
999 | __safe_for_unpickling__ = True |
1000 | def __reduce__(self): return (wx.RealPoint, self.Get()) | |
d14a1e28 | 1001 | |
0085ce49 RD |
1002 | RealPoint_swigregister = _core_.RealPoint_swigregister |
1003 | RealPoint_swigregister(RealPoint) | |
d14a1e28 RD |
1004 | |
1005 | #--------------------------------------------------------------------------- | |
1006 | ||
1007 | class Point(object): | |
0df68c9f | 1008 | """ |
41e2b43e RD |
1009 | A data structure for representing a point or position with integer x |
1010 | and y properties. Most places in wxPython that expect a wx.Point can | |
1011 | also accept a (x,y) tuple. | |
0df68c9f | 1012 | """ |
0085ce49 RD |
1013 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1014 | __repr__ = _swig_repr | |
54f9ee45 RD |
1015 | x = property(_core_.Point_x_get, _core_.Point_x_set) |
1016 | y = property(_core_.Point_y_get, _core_.Point_y_set) | |
0085ce49 | 1017 | def __init__(self, *args, **kwargs): |
0df68c9f | 1018 | """ |
a95a7133 | 1019 | __init__(self, int x=0, int y=0) -> Point |
e811c8ce | 1020 | |
0df68c9f RD |
1021 | Create a wx.Point object |
1022 | """ | |
0085ce49 RD |
1023 | _core_.Point_swiginit(self,_core_.new_Point(*args, **kwargs)) |
1024 | __swig_destroy__ = _core_.delete_Point | |
1025 | __del__ = lambda self : None; | |
e811c8ce | 1026 | def __eq__(*args, **kwargs): |
0df68c9f | 1027 | """ |
a95a7133 | 1028 | __eq__(self, Point pt) -> bool |
e811c8ce | 1029 | |
0df68c9f RD |
1030 | Test for equality of wx.Point objects. |
1031 | """ | |
54f9ee45 | 1032 | return _core_.Point___eq__(*args, **kwargs) |
e811c8ce RD |
1033 | |
1034 | def __ne__(*args, **kwargs): | |
0df68c9f | 1035 | """ |
a95a7133 | 1036 | __ne__(self, Point pt) -> bool |
e811c8ce | 1037 | |
0df68c9f RD |
1038 | Test for inequality of wx.Point objects. |
1039 | """ | |
54f9ee45 | 1040 | return _core_.Point___ne__(*args, **kwargs) |
e811c8ce RD |
1041 | |
1042 | def __add__(*args, **kwargs): | |
0df68c9f | 1043 | """ |
a95a7133 | 1044 | __add__(self, Point pt) -> Point |
e811c8ce | 1045 | |
0df68c9f RD |
1046 | Add pt's proprties to this and return the result. |
1047 | """ | |
54f9ee45 | 1048 | return _core_.Point___add__(*args, **kwargs) |
e811c8ce RD |
1049 | |
1050 | def __sub__(*args, **kwargs): | |
0df68c9f | 1051 | """ |
a95a7133 | 1052 | __sub__(self, Point pt) -> Point |
e811c8ce | 1053 | |
0df68c9f RD |
1054 | Subtract pt's proprties from this and return the result |
1055 | """ | |
54f9ee45 | 1056 | return _core_.Point___sub__(*args, **kwargs) |
e811c8ce RD |
1057 | |
1058 | def __iadd__(*args, **kwargs): | |
0df68c9f | 1059 | """ |
a95a7133 | 1060 | __iadd__(self, Point pt) -> Point |
e811c8ce | 1061 | |
0df68c9f RD |
1062 | Add pt to this object. |
1063 | """ | |
54f9ee45 | 1064 | return _core_.Point___iadd__(*args, **kwargs) |
e811c8ce RD |
1065 | |
1066 | def __isub__(*args, **kwargs): | |
0df68c9f | 1067 | """ |
a95a7133 | 1068 | __isub__(self, Point pt) -> Point |
e811c8ce | 1069 | |
0df68c9f RD |
1070 | Subtract pt from this object. |
1071 | """ | |
54f9ee45 | 1072 | return _core_.Point___isub__(*args, **kwargs) |
e811c8ce RD |
1073 | |
1074 | def Set(*args, **kwargs): | |
0df68c9f | 1075 | """ |
a95a7133 | 1076 | Set(self, long x, long y) |
e811c8ce | 1077 | |
0df68c9f RD |
1078 | Set both the x and y properties |
1079 | """ | |
54f9ee45 | 1080 | return _core_.Point_Set(*args, **kwargs) |
e811c8ce RD |
1081 | |
1082 | def Get(*args, **kwargs): | |
0df68c9f RD |
1083 | """ |
1084 | Get() -> (x,y) | |
e811c8ce | 1085 | |
0df68c9f RD |
1086 | Return the x and y properties as a tuple. |
1087 | """ | |
54f9ee45 | 1088 | return _core_.Point_Get(*args, **kwargs) |
e811c8ce | 1089 | |
41e2b43e | 1090 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1091 | def __str__(self): return str(self.Get()) |
1092 | def __repr__(self): return 'wx.Point'+str(self.Get()) | |
1093 | def __len__(self): return len(self.Get()) | |
1094 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1095 | def __setitem__(self, index, val): |
1096 | if index == 0: self.x = val | |
1097 | elif index == 1: self.y = val | |
1098 | else: raise IndexError | |
e811c8ce | 1099 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
1100 | __safe_for_unpickling__ = True |
1101 | def __reduce__(self): return (wx.Point, self.Get()) | |
d14a1e28 | 1102 | |
0085ce49 RD |
1103 | Point_swigregister = _core_.Point_swigregister |
1104 | Point_swigregister(Point) | |
d14a1e28 RD |
1105 | |
1106 | #--------------------------------------------------------------------------- | |
1107 | ||
1108 | class Rect(object): | |
0df68c9f | 1109 | """ |
41e2b43e RD |
1110 | A class for representing and manipulating rectangles. It has x, y, |
1111 | width and height properties. In wxPython most palces that expect a | |
1112 | wx.Rect can also accept a (x,y,width,height) tuple. | |
0df68c9f | 1113 | """ |
0085ce49 RD |
1114 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1115 | __repr__ = _swig_repr | |
1116 | def __init__(self, *args, **kwargs): | |
0df68c9f | 1117 | """ |
a95a7133 | 1118 | __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect |
e811c8ce | 1119 | |
0df68c9f RD |
1120 | Create a new Rect object. |
1121 | """ | |
0085ce49 RD |
1122 | _core_.Rect_swiginit(self,_core_.new_Rect(*args, **kwargs)) |
1123 | __swig_destroy__ = _core_.delete_Rect | |
1124 | __del__ = lambda self : None; | |
e811c8ce | 1125 | def GetX(*args, **kwargs): |
a95a7133 | 1126 | """GetX(self) -> int""" |
54f9ee45 | 1127 | return _core_.Rect_GetX(*args, **kwargs) |
e811c8ce RD |
1128 | |
1129 | def SetX(*args, **kwargs): | |
a95a7133 | 1130 | """SetX(self, int x)""" |
54f9ee45 | 1131 | return _core_.Rect_SetX(*args, **kwargs) |
e811c8ce RD |
1132 | |
1133 | def GetY(*args, **kwargs): | |
a95a7133 | 1134 | """GetY(self) -> int""" |
54f9ee45 | 1135 | return _core_.Rect_GetY(*args, **kwargs) |
e811c8ce RD |
1136 | |
1137 | def SetY(*args, **kwargs): | |
a95a7133 | 1138 | """SetY(self, int y)""" |
54f9ee45 | 1139 | return _core_.Rect_SetY(*args, **kwargs) |
e811c8ce RD |
1140 | |
1141 | def GetWidth(*args, **kwargs): | |
a95a7133 | 1142 | """GetWidth(self) -> int""" |
54f9ee45 | 1143 | return _core_.Rect_GetWidth(*args, **kwargs) |
e811c8ce RD |
1144 | |
1145 | def SetWidth(*args, **kwargs): | |
a95a7133 | 1146 | """SetWidth(self, int w)""" |
54f9ee45 | 1147 | return _core_.Rect_SetWidth(*args, **kwargs) |
e811c8ce RD |
1148 | |
1149 | def GetHeight(*args, **kwargs): | |
a95a7133 | 1150 | """GetHeight(self) -> int""" |
54f9ee45 | 1151 | return _core_.Rect_GetHeight(*args, **kwargs) |
e811c8ce RD |
1152 | |
1153 | def SetHeight(*args, **kwargs): | |
a95a7133 | 1154 | """SetHeight(self, int h)""" |
54f9ee45 | 1155 | return _core_.Rect_SetHeight(*args, **kwargs) |
e811c8ce RD |
1156 | |
1157 | def GetPosition(*args, **kwargs): | |
a95a7133 | 1158 | """GetPosition(self) -> Point""" |
54f9ee45 | 1159 | return _core_.Rect_GetPosition(*args, **kwargs) |
e811c8ce RD |
1160 | |
1161 | def SetPosition(*args, **kwargs): | |
a95a7133 | 1162 | """SetPosition(self, Point p)""" |
54f9ee45 | 1163 | return _core_.Rect_SetPosition(*args, **kwargs) |
e811c8ce RD |
1164 | |
1165 | def GetSize(*args, **kwargs): | |
a95a7133 | 1166 | """GetSize(self) -> Size""" |
54f9ee45 | 1167 | return _core_.Rect_GetSize(*args, **kwargs) |
e811c8ce RD |
1168 | |
1169 | def SetSize(*args, **kwargs): | |
a95a7133 | 1170 | """SetSize(self, Size s)""" |
54f9ee45 | 1171 | return _core_.Rect_SetSize(*args, **kwargs) |
e811c8ce | 1172 | |
aff4cc5c RD |
1173 | def IsEmpty(*args, **kwargs): |
1174 | """IsEmpty(self) -> bool""" | |
1175 | return _core_.Rect_IsEmpty(*args, **kwargs) | |
1176 | ||
c9c7117a | 1177 | def GetTopLeft(*args, **kwargs): |
a95a7133 | 1178 | """GetTopLeft(self) -> Point""" |
54f9ee45 | 1179 | return _core_.Rect_GetTopLeft(*args, **kwargs) |
c9c7117a RD |
1180 | |
1181 | def SetTopLeft(*args, **kwargs): | |
a95a7133 | 1182 | """SetTopLeft(self, Point p)""" |
54f9ee45 | 1183 | return _core_.Rect_SetTopLeft(*args, **kwargs) |
c9c7117a RD |
1184 | |
1185 | def GetBottomRight(*args, **kwargs): | |
a95a7133 | 1186 | """GetBottomRight(self) -> Point""" |
54f9ee45 | 1187 | return _core_.Rect_GetBottomRight(*args, **kwargs) |
c9c7117a RD |
1188 | |
1189 | def SetBottomRight(*args, **kwargs): | |
a95a7133 | 1190 | """SetBottomRight(self, Point p)""" |
54f9ee45 | 1191 | return _core_.Rect_SetBottomRight(*args, **kwargs) |
c9c7117a | 1192 | |
e811c8ce | 1193 | def GetLeft(*args, **kwargs): |
a95a7133 | 1194 | """GetLeft(self) -> int""" |
54f9ee45 | 1195 | return _core_.Rect_GetLeft(*args, **kwargs) |
e811c8ce RD |
1196 | |
1197 | def GetTop(*args, **kwargs): | |
a95a7133 | 1198 | """GetTop(self) -> int""" |
54f9ee45 | 1199 | return _core_.Rect_GetTop(*args, **kwargs) |
e811c8ce RD |
1200 | |
1201 | def GetBottom(*args, **kwargs): | |
a95a7133 | 1202 | """GetBottom(self) -> int""" |
54f9ee45 | 1203 | return _core_.Rect_GetBottom(*args, **kwargs) |
e811c8ce RD |
1204 | |
1205 | def GetRight(*args, **kwargs): | |
a95a7133 | 1206 | """GetRight(self) -> int""" |
54f9ee45 | 1207 | return _core_.Rect_GetRight(*args, **kwargs) |
e811c8ce RD |
1208 | |
1209 | def SetLeft(*args, **kwargs): | |
a95a7133 | 1210 | """SetLeft(self, int left)""" |
54f9ee45 | 1211 | return _core_.Rect_SetLeft(*args, **kwargs) |
e811c8ce RD |
1212 | |
1213 | def SetRight(*args, **kwargs): | |
a95a7133 | 1214 | """SetRight(self, int right)""" |
54f9ee45 | 1215 | return _core_.Rect_SetRight(*args, **kwargs) |
e811c8ce RD |
1216 | |
1217 | def SetTop(*args, **kwargs): | |
a95a7133 | 1218 | """SetTop(self, int top)""" |
54f9ee45 | 1219 | return _core_.Rect_SetTop(*args, **kwargs) |
e811c8ce RD |
1220 | |
1221 | def SetBottom(*args, **kwargs): | |
a95a7133 | 1222 | """SetBottom(self, int bottom)""" |
54f9ee45 | 1223 | return _core_.Rect_SetBottom(*args, **kwargs) |
e811c8ce RD |
1224 | |
1225 | position = property(GetPosition, SetPosition) | |
1226 | size = property(GetSize, SetSize) | |
1227 | left = property(GetLeft, SetLeft) | |
1228 | right = property(GetRight, SetRight) | |
1229 | top = property(GetTop, SetTop) | |
1230 | bottom = property(GetBottom, SetBottom) | |
1231 | ||
1232 | def Inflate(*args, **kwargs): | |
0df68c9f | 1233 | """ |
a95a7133 | 1234 | Inflate(self, int dx, int dy) -> Rect |
e811c8ce | 1235 | |
8e738329 RD |
1236 | Increases the size of the rectangle. |
1237 | ||
1238 | The left border is moved farther left and the right border is moved | |
1239 | farther right by ``dx``. The upper border is moved farther up and the | |
1240 | bottom border is moved farther down by ``dy``. (Note the the width and | |
1241 | height of the rectangle thus change by ``2*dx`` and ``2*dy``, | |
1242 | respectively.) If one or both of ``dx`` and ``dy`` are negative, the | |
1243 | opposite happens: the rectangle size decreases in the respective | |
1244 | direction. | |
1245 | ||
1246 | The change is made to the rectangle inplace, if instead you need a | |
1247 | copy that is inflated, preserving the original then make the copy | |
1248 | first:: | |
1249 | ||
1250 | copy = wx.Rect(*original) | |
1251 | copy.Inflate(10,15) | |
1252 | ||
1253 | ||
0df68c9f | 1254 | """ |
54f9ee45 | 1255 | return _core_.Rect_Inflate(*args, **kwargs) |
e811c8ce RD |
1256 | |
1257 | def Deflate(*args, **kwargs): | |
0df68c9f | 1258 | """ |
a95a7133 | 1259 | Deflate(self, int dx, int dy) -> Rect |
e811c8ce | 1260 | |
8e738329 RD |
1261 | Decrease the rectangle size. This method is the opposite of `Inflate` |
1262 | in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to | |
1263 | `Inflate` for a full description. | |
0df68c9f | 1264 | """ |
54f9ee45 | 1265 | return _core_.Rect_Deflate(*args, **kwargs) |
e811c8ce RD |
1266 | |
1267 | def OffsetXY(*args, **kwargs): | |
0df68c9f | 1268 | """ |
a95a7133 | 1269 | OffsetXY(self, int dx, int dy) |
e811c8ce | 1270 | |
41e2b43e RD |
1271 | Moves the rectangle by the specified offset. If dx is positive, the |
1272 | rectangle is moved to the right, if dy is positive, it is moved to the | |
1273 | bottom, otherwise it is moved to the left or top respectively. | |
0df68c9f | 1274 | """ |
54f9ee45 | 1275 | return _core_.Rect_OffsetXY(*args, **kwargs) |
e811c8ce RD |
1276 | |
1277 | def Offset(*args, **kwargs): | |
0df68c9f | 1278 | """ |
a95a7133 | 1279 | Offset(self, Point pt) |
e811c8ce | 1280 | |
b1fcee84 | 1281 | Same as `OffsetXY` but uses dx,dy from Point |
0df68c9f | 1282 | """ |
54f9ee45 | 1283 | return _core_.Rect_Offset(*args, **kwargs) |
e811c8ce RD |
1284 | |
1285 | def Intersect(*args, **kwargs): | |
0df68c9f | 1286 | """ |
a95a7133 | 1287 | Intersect(self, Rect rect) -> Rect |
e811c8ce | 1288 | |
5cbf236d | 1289 | Returns the intersectsion of this rectangle and rect. |
0df68c9f | 1290 | """ |
54f9ee45 | 1291 | return _core_.Rect_Intersect(*args, **kwargs) |
e811c8ce | 1292 | |
5cbf236d RD |
1293 | def Union(*args, **kwargs): |
1294 | """ | |
1295 | Union(self, Rect rect) -> Rect | |
1296 | ||
1297 | Returns the union of this rectangle and rect. | |
1298 | """ | |
1299 | return _core_.Rect_Union(*args, **kwargs) | |
1300 | ||
e811c8ce | 1301 | def __add__(*args, **kwargs): |
0df68c9f | 1302 | """ |
a95a7133 | 1303 | __add__(self, Rect rect) -> Rect |
e811c8ce | 1304 | |
0df68c9f RD |
1305 | Add the properties of rect to this rectangle and return the result. |
1306 | """ | |
54f9ee45 | 1307 | return _core_.Rect___add__(*args, **kwargs) |
e811c8ce RD |
1308 | |
1309 | def __iadd__(*args, **kwargs): | |
0df68c9f | 1310 | """ |
a95a7133 | 1311 | __iadd__(self, Rect rect) -> Rect |
e811c8ce | 1312 | |
0df68c9f RD |
1313 | Add the properties of rect to this rectangle, updating this rectangle. |
1314 | """ | |
54f9ee45 | 1315 | return _core_.Rect___iadd__(*args, **kwargs) |
e811c8ce RD |
1316 | |
1317 | def __eq__(*args, **kwargs): | |
0df68c9f | 1318 | """ |
a95a7133 | 1319 | __eq__(self, Rect rect) -> bool |
e811c8ce | 1320 | |
0df68c9f RD |
1321 | Test for equality. |
1322 | """ | |
54f9ee45 | 1323 | return _core_.Rect___eq__(*args, **kwargs) |
e811c8ce RD |
1324 | |
1325 | def __ne__(*args, **kwargs): | |
0df68c9f | 1326 | """ |
a95a7133 | 1327 | __ne__(self, Rect rect) -> bool |
e811c8ce | 1328 | |
0df68c9f RD |
1329 | Test for inequality. |
1330 | """ | |
54f9ee45 | 1331 | return _core_.Rect___ne__(*args, **kwargs) |
e811c8ce RD |
1332 | |
1333 | def InsideXY(*args, **kwargs): | |
0df68c9f | 1334 | """ |
a95a7133 | 1335 | InsideXY(self, int x, int y) -> bool |
e811c8ce | 1336 | |
0df68c9f RD |
1337 | Return True if the point is (not strcitly) inside the rect. |
1338 | """ | |
54f9ee45 | 1339 | return _core_.Rect_InsideXY(*args, **kwargs) |
e811c8ce RD |
1340 | |
1341 | def Inside(*args, **kwargs): | |
0df68c9f | 1342 | """ |
a95a7133 | 1343 | Inside(self, Point pt) -> bool |
e811c8ce | 1344 | |
0df68c9f RD |
1345 | Return True if the point is (not strcitly) inside the rect. |
1346 | """ | |
54f9ee45 | 1347 | return _core_.Rect_Inside(*args, **kwargs) |
e811c8ce RD |
1348 | |
1349 | def Intersects(*args, **kwargs): | |
0df68c9f | 1350 | """ |
a95a7133 | 1351 | Intersects(self, Rect rect) -> bool |
e811c8ce | 1352 | |
0df68c9f RD |
1353 | Returns True if the rectangles have a non empty intersection. |
1354 | """ | |
54f9ee45 | 1355 | return _core_.Rect_Intersects(*args, **kwargs) |
e811c8ce | 1356 | |
b1fcee84 RD |
1357 | def CenterIn(*args, **kwargs): |
1358 | """ | |
1359 | CenterIn(self, Rect r, int dir=BOTH) -> Rect | |
1360 | ||
1361 | Center this rectangle within the one passed to the method, which is | |
1362 | usually, but not necessarily, the larger one. | |
1363 | """ | |
1364 | return _core_.Rect_CenterIn(*args, **kwargs) | |
1365 | ||
1366 | CentreIn = CenterIn | |
54f9ee45 RD |
1367 | x = property(_core_.Rect_x_get, _core_.Rect_x_set) |
1368 | y = property(_core_.Rect_y_get, _core_.Rect_y_set) | |
1369 | width = property(_core_.Rect_width_get, _core_.Rect_width_set) | |
1370 | height = property(_core_.Rect_height_get, _core_.Rect_height_set) | |
e811c8ce | 1371 | def Set(*args, **kwargs): |
0df68c9f | 1372 | """ |
a95a7133 | 1373 | Set(self, int x=0, int y=0, int width=0, int height=0) |
e811c8ce | 1374 | |
0df68c9f RD |
1375 | Set all rectangle properties. |
1376 | """ | |
54f9ee45 | 1377 | return _core_.Rect_Set(*args, **kwargs) |
e811c8ce RD |
1378 | |
1379 | def Get(*args, **kwargs): | |
0df68c9f RD |
1380 | """ |
1381 | Get() -> (x,y,width,height) | |
e811c8ce | 1382 | |
0df68c9f RD |
1383 | Return the rectangle properties as a tuple. |
1384 | """ | |
54f9ee45 | 1385 | return _core_.Rect_Get(*args, **kwargs) |
e811c8ce | 1386 | |
41e2b43e | 1387 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1388 | def __str__(self): return str(self.Get()) |
1389 | def __repr__(self): return 'wx.Rect'+str(self.Get()) | |
1390 | def __len__(self): return len(self.Get()) | |
1391 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1392 | def __setitem__(self, index, val): |
1393 | if index == 0: self.x = val | |
1394 | elif index == 1: self.y = val | |
1395 | elif index == 2: self.width = val | |
1396 | elif index == 3: self.height = val | |
1397 | else: raise IndexError | |
e811c8ce | 1398 | def __nonzero__(self): return self.Get() != (0,0,0,0) |
74e96f3d RD |
1399 | __safe_for_unpickling__ = True |
1400 | def __reduce__(self): return (wx.Rect, self.Get()) | |
d14a1e28 | 1401 | |
0085ce49 RD |
1402 | Rect_swigregister = _core_.Rect_swigregister |
1403 | Rect_swigregister(Rect) | |
d14a1e28 RD |
1404 | |
1405 | def RectPP(*args, **kwargs): | |
0df68c9f RD |
1406 | """ |
1407 | RectPP(Point topLeft, Point bottomRight) -> Rect | |
e811c8ce | 1408 | |
0df68c9f RD |
1409 | Create a new Rect object from Points representing two corners. |
1410 | """ | |
54f9ee45 | 1411 | val = _core_.new_RectPP(*args, **kwargs) |
d14a1e28 RD |
1412 | return val |
1413 | ||
1414 | def RectPS(*args, **kwargs): | |
0df68c9f RD |
1415 | """ |
1416 | RectPS(Point pos, Size size) -> Rect | |
e811c8ce | 1417 | |
0df68c9f RD |
1418 | Create a new Rect from a position and size. |
1419 | """ | |
54f9ee45 | 1420 | val = _core_.new_RectPS(*args, **kwargs) |
d14a1e28 RD |
1421 | return val |
1422 | ||
d3b6e4ff RD |
1423 | def RectS(*args, **kwargs): |
1424 | """ | |
1425 | RectS(Size size) -> Rect | |
1426 | ||
1427 | Create a new Rect from a size only. | |
1428 | """ | |
1429 | val = _core_.new_RectS(*args, **kwargs) | |
d3b6e4ff RD |
1430 | return val |
1431 | ||
d14a1e28 | 1432 | |
e811c8ce | 1433 | def IntersectRect(*args, **kwargs): |
0085ce49 | 1434 | """ |
0df68c9f | 1435 | IntersectRect(Rect r1, Rect r2) -> Rect |
e811c8ce | 1436 | |
0df68c9f RD |
1437 | Calculate and return the intersection of r1 and r2. |
1438 | """ | |
0085ce49 | 1439 | return _core_.IntersectRect(*args, **kwargs) |
d14a1e28 RD |
1440 | #--------------------------------------------------------------------------- |
1441 | ||
1442 | class Point2D(object): | |
41e2b43e RD |
1443 | """ |
1444 | wx.Point2Ds represent a point or a vector in a 2d coordinate system | |
1445 | with floating point values. | |
1446 | """ | |
0085ce49 RD |
1447 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1448 | __repr__ = _swig_repr | |
1449 | def __init__(self, *args, **kwargs): | |
0df68c9f | 1450 | """ |
a95a7133 | 1451 | __init__(self, double x=0.0, double y=0.0) -> Point2D |
e811c8ce | 1452 | |
0df68c9f RD |
1453 | Create a w.Point2D object. |
1454 | """ | |
0085ce49 | 1455 | _core_.Point2D_swiginit(self,_core_.new_Point2D(*args, **kwargs)) |
e811c8ce | 1456 | def GetFloor(*args, **kwargs): |
fd2dc343 RD |
1457 | """ |
1458 | GetFloor() -> (x,y) | |
1459 | ||
1460 | Convert to integer | |
1461 | """ | |
54f9ee45 | 1462 | return _core_.Point2D_GetFloor(*args, **kwargs) |
e811c8ce RD |
1463 | |
1464 | def GetRounded(*args, **kwargs): | |
fd2dc343 RD |
1465 | """ |
1466 | GetRounded() -> (x,y) | |
1467 | ||
1468 | Convert to integer | |
1469 | """ | |
54f9ee45 | 1470 | return _core_.Point2D_GetRounded(*args, **kwargs) |
e811c8ce RD |
1471 | |
1472 | def GetVectorLength(*args, **kwargs): | |
a95a7133 | 1473 | """GetVectorLength(self) -> double""" |
54f9ee45 | 1474 | return _core_.Point2D_GetVectorLength(*args, **kwargs) |
e811c8ce RD |
1475 | |
1476 | def GetVectorAngle(*args, **kwargs): | |
a95a7133 | 1477 | """GetVectorAngle(self) -> double""" |
54f9ee45 | 1478 | return _core_.Point2D_GetVectorAngle(*args, **kwargs) |
e811c8ce RD |
1479 | |
1480 | def SetVectorLength(*args, **kwargs): | |
a95a7133 | 1481 | """SetVectorLength(self, double length)""" |
54f9ee45 | 1482 | return _core_.Point2D_SetVectorLength(*args, **kwargs) |
e811c8ce RD |
1483 | |
1484 | def SetVectorAngle(*args, **kwargs): | |
a95a7133 | 1485 | """SetVectorAngle(self, double degrees)""" |
54f9ee45 | 1486 | return _core_.Point2D_SetVectorAngle(*args, **kwargs) |
e811c8ce | 1487 | |
d14a1e28 RD |
1488 | def SetPolarCoordinates(self, angle, length): |
1489 | self.SetVectorLength(length) | |
1490 | self.SetVectorAngle(angle) | |
1491 | def Normalize(self): | |
1492 | self.SetVectorLength(1.0) | |
1493 | ||
e811c8ce | 1494 | def GetDistance(*args, **kwargs): |
a95a7133 | 1495 | """GetDistance(self, Point2D pt) -> double""" |
54f9ee45 | 1496 | return _core_.Point2D_GetDistance(*args, **kwargs) |
e811c8ce RD |
1497 | |
1498 | def GetDistanceSquare(*args, **kwargs): | |
a95a7133 | 1499 | """GetDistanceSquare(self, Point2D pt) -> double""" |
54f9ee45 | 1500 | return _core_.Point2D_GetDistanceSquare(*args, **kwargs) |
e811c8ce RD |
1501 | |
1502 | def GetDotProduct(*args, **kwargs): | |
a95a7133 | 1503 | """GetDotProduct(self, Point2D vec) -> double""" |
54f9ee45 | 1504 | return _core_.Point2D_GetDotProduct(*args, **kwargs) |
e811c8ce RD |
1505 | |
1506 | def GetCrossProduct(*args, **kwargs): | |
a95a7133 | 1507 | """GetCrossProduct(self, Point2D vec) -> double""" |
54f9ee45 | 1508 | return _core_.Point2D_GetCrossProduct(*args, **kwargs) |
e811c8ce RD |
1509 | |
1510 | def __neg__(*args, **kwargs): | |
0df68c9f | 1511 | """ |
a95a7133 | 1512 | __neg__(self) -> Point2D |
e811c8ce | 1513 | |
0df68c9f RD |
1514 | the reflection of this point |
1515 | """ | |
54f9ee45 | 1516 | return _core_.Point2D___neg__(*args, **kwargs) |
e811c8ce RD |
1517 | |
1518 | def __iadd__(*args, **kwargs): | |
a95a7133 | 1519 | """__iadd__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1520 | return _core_.Point2D___iadd__(*args, **kwargs) |
e811c8ce RD |
1521 | |
1522 | def __isub__(*args, **kwargs): | |
a95a7133 | 1523 | """__isub__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1524 | return _core_.Point2D___isub__(*args, **kwargs) |
e811c8ce RD |
1525 | |
1526 | def __imul__(*args, **kwargs): | |
a95a7133 | 1527 | """__imul__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1528 | return _core_.Point2D___imul__(*args, **kwargs) |
e811c8ce RD |
1529 | |
1530 | def __idiv__(*args, **kwargs): | |
a95a7133 | 1531 | """__idiv__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1532 | return _core_.Point2D___idiv__(*args, **kwargs) |
e811c8ce RD |
1533 | |
1534 | def __eq__(*args, **kwargs): | |
0df68c9f | 1535 | """ |
a95a7133 | 1536 | __eq__(self, Point2D pt) -> bool |
e811c8ce | 1537 | |
0df68c9f RD |
1538 | Test for equality |
1539 | """ | |
54f9ee45 | 1540 | return _core_.Point2D___eq__(*args, **kwargs) |
e811c8ce RD |
1541 | |
1542 | def __ne__(*args, **kwargs): | |
0df68c9f | 1543 | """ |
a95a7133 | 1544 | __ne__(self, Point2D pt) -> bool |
e811c8ce | 1545 | |
0df68c9f RD |
1546 | Test for inequality |
1547 | """ | |
54f9ee45 | 1548 | return _core_.Point2D___ne__(*args, **kwargs) |
e811c8ce | 1549 | |
54f9ee45 RD |
1550 | x = property(_core_.Point2D_x_get, _core_.Point2D_x_set) |
1551 | y = property(_core_.Point2D_y_get, _core_.Point2D_y_set) | |
e811c8ce | 1552 | def Set(*args, **kwargs): |
a95a7133 | 1553 | """Set(self, double x=0, double y=0)""" |
54f9ee45 | 1554 | return _core_.Point2D_Set(*args, **kwargs) |
e811c8ce RD |
1555 | |
1556 | def Get(*args, **kwargs): | |
0df68c9f RD |
1557 | """ |
1558 | Get() -> (x,y) | |
e811c8ce | 1559 | |
0df68c9f RD |
1560 | Return x and y properties as a tuple. |
1561 | """ | |
54f9ee45 | 1562 | return _core_.Point2D_Get(*args, **kwargs) |
e811c8ce | 1563 | |
41e2b43e | 1564 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1565 | def __str__(self): return str(self.Get()) |
1566 | def __repr__(self): return 'wx.Point2D'+str(self.Get()) | |
1567 | def __len__(self): return len(self.Get()) | |
1568 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 1569 | def __setitem__(self, index, val): |
e811c8ce RD |
1570 | if index == 0: self.x = val |
1571 | elif index == 1: self.y = val | |
d14a1e28 | 1572 | else: raise IndexError |
e811c8ce | 1573 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
1574 | __safe_for_unpickling__ = True |
1575 | def __reduce__(self): return (wx.Point2D, self.Get()) | |
d14a1e28 | 1576 | |
0085ce49 RD |
1577 | Point2D_swigregister = _core_.Point2D_swigregister |
1578 | Point2D_swigregister(Point2D) | |
d14a1e28 RD |
1579 | |
1580 | def Point2DCopy(*args, **kwargs): | |
0df68c9f RD |
1581 | """ |
1582 | Point2DCopy(Point2D pt) -> Point2D | |
e811c8ce | 1583 | |
0df68c9f RD |
1584 | Create a w.Point2D object. |
1585 | """ | |
54f9ee45 | 1586 | val = _core_.new_Point2DCopy(*args, **kwargs) |
d14a1e28 RD |
1587 | return val |
1588 | ||
1589 | def Point2DFromPoint(*args, **kwargs): | |
0df68c9f RD |
1590 | """ |
1591 | Point2DFromPoint(Point pt) -> Point2D | |
e811c8ce | 1592 | |
0df68c9f RD |
1593 | Create a w.Point2D object. |
1594 | """ | |
54f9ee45 | 1595 | val = _core_.new_Point2DFromPoint(*args, **kwargs) |
d14a1e28 RD |
1596 | return val |
1597 | ||
1598 | #--------------------------------------------------------------------------- | |
1599 | ||
54f9ee45 RD |
1600 | FromStart = _core_.FromStart |
1601 | FromCurrent = _core_.FromCurrent | |
1602 | FromEnd = _core_.FromEnd | |
d14a1e28 | 1603 | class InputStream(object): |
093d3ff1 | 1604 | """Proxy of C++ InputStream class""" |
0085ce49 RD |
1605 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1606 | __repr__ = _swig_repr | |
1607 | def __init__(self, *args, **kwargs): | |
a95a7133 | 1608 | """__init__(self, PyObject p) -> InputStream""" |
0085ce49 RD |
1609 | _core_.InputStream_swiginit(self,_core_.new_InputStream(*args, **kwargs)) |
1610 | __swig_destroy__ = _core_.delete_InputStream | |
1611 | __del__ = lambda self : None; | |
e811c8ce | 1612 | def close(*args, **kwargs): |
a95a7133 | 1613 | """close(self)""" |
54f9ee45 | 1614 | return _core_.InputStream_close(*args, **kwargs) |
e811c8ce RD |
1615 | |
1616 | def flush(*args, **kwargs): | |
a95a7133 | 1617 | """flush(self)""" |
54f9ee45 | 1618 | return _core_.InputStream_flush(*args, **kwargs) |
e811c8ce RD |
1619 | |
1620 | def eof(*args, **kwargs): | |
a95a7133 | 1621 | """eof(self) -> bool""" |
54f9ee45 | 1622 | return _core_.InputStream_eof(*args, **kwargs) |
e811c8ce RD |
1623 | |
1624 | def read(*args, **kwargs): | |
a95a7133 | 1625 | """read(self, int size=-1) -> PyObject""" |
54f9ee45 | 1626 | return _core_.InputStream_read(*args, **kwargs) |
e811c8ce RD |
1627 | |
1628 | def readline(*args, **kwargs): | |
a95a7133 | 1629 | """readline(self, int size=-1) -> PyObject""" |
54f9ee45 | 1630 | return _core_.InputStream_readline(*args, **kwargs) |
e811c8ce RD |
1631 | |
1632 | def readlines(*args, **kwargs): | |
a95a7133 | 1633 | """readlines(self, int sizehint=-1) -> PyObject""" |
54f9ee45 | 1634 | return _core_.InputStream_readlines(*args, **kwargs) |
e811c8ce RD |
1635 | |
1636 | def seek(*args, **kwargs): | |
a95a7133 | 1637 | """seek(self, int offset, int whence=0)""" |
54f9ee45 | 1638 | return _core_.InputStream_seek(*args, **kwargs) |
e811c8ce RD |
1639 | |
1640 | def tell(*args, **kwargs): | |
a95a7133 | 1641 | """tell(self) -> int""" |
54f9ee45 | 1642 | return _core_.InputStream_tell(*args, **kwargs) |
e811c8ce RD |
1643 | |
1644 | def Peek(*args, **kwargs): | |
a95a7133 | 1645 | """Peek(self) -> char""" |
54f9ee45 | 1646 | return _core_.InputStream_Peek(*args, **kwargs) |
e811c8ce RD |
1647 | |
1648 | def GetC(*args, **kwargs): | |
a95a7133 | 1649 | """GetC(self) -> char""" |
54f9ee45 | 1650 | return _core_.InputStream_GetC(*args, **kwargs) |
e811c8ce RD |
1651 | |
1652 | def LastRead(*args, **kwargs): | |
a95a7133 | 1653 | """LastRead(self) -> size_t""" |
54f9ee45 | 1654 | return _core_.InputStream_LastRead(*args, **kwargs) |
e811c8ce RD |
1655 | |
1656 | def CanRead(*args, **kwargs): | |
a95a7133 | 1657 | """CanRead(self) -> bool""" |
54f9ee45 | 1658 | return _core_.InputStream_CanRead(*args, **kwargs) |
e811c8ce RD |
1659 | |
1660 | def Eof(*args, **kwargs): | |
a95a7133 | 1661 | """Eof(self) -> bool""" |
54f9ee45 | 1662 | return _core_.InputStream_Eof(*args, **kwargs) |
e811c8ce RD |
1663 | |
1664 | def Ungetch(*args, **kwargs): | |
a95a7133 | 1665 | """Ungetch(self, char c) -> bool""" |
54f9ee45 | 1666 | return _core_.InputStream_Ungetch(*args, **kwargs) |
e811c8ce RD |
1667 | |
1668 | def SeekI(*args, **kwargs): | |
a95a7133 | 1669 | """SeekI(self, long pos, int mode=FromStart) -> long""" |
54f9ee45 | 1670 | return _core_.InputStream_SeekI(*args, **kwargs) |
e811c8ce RD |
1671 | |
1672 | def TellI(*args, **kwargs): | |
a95a7133 | 1673 | """TellI(self) -> long""" |
54f9ee45 | 1674 | return _core_.InputStream_TellI(*args, **kwargs) |
e811c8ce | 1675 | |
0085ce49 RD |
1676 | InputStream_swigregister = _core_.InputStream_swigregister |
1677 | InputStream_swigregister(InputStream) | |
d14a1e28 RD |
1678 | DefaultPosition = cvar.DefaultPosition |
1679 | DefaultSize = cvar.DefaultSize | |
1680 | ||
1681 | class OutputStream(object): | |
093d3ff1 | 1682 | """Proxy of C++ OutputStream class""" |
0085ce49 RD |
1683 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1684 | def __init__(self): raise AttributeError, "No constructor defined" | |
1685 | __repr__ = _swig_repr | |
e811c8ce | 1686 | def write(*args, **kwargs): |
a95a7133 | 1687 | """write(self, PyObject obj)""" |
54f9ee45 | 1688 | return _core_.OutputStream_write(*args, **kwargs) |
e811c8ce | 1689 | |
0085ce49 RD |
1690 | def LastWrite(*args, **kwargs): |
1691 | """LastWrite(self) -> size_t""" | |
1692 | return _core_.OutputStream_LastWrite(*args, **kwargs) | |
d14a1e28 | 1693 | |
0085ce49 RD |
1694 | OutputStream_swigregister = _core_.OutputStream_swigregister |
1695 | OutputStream_swigregister(OutputStream) | |
d14a1e28 RD |
1696 | |
1697 | #--------------------------------------------------------------------------- | |
1698 | ||
1699 | class FSFile(Object): | |
093d3ff1 | 1700 | """Proxy of C++ FSFile class""" |
0085ce49 RD |
1701 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1702 | __repr__ = _swig_repr | |
1703 | def __init__(self, *args, **kwargs): | |
0df68c9f | 1704 | """ |
a95a7133 | 1705 | __init__(self, InputStream stream, String loc, String mimetype, String anchor, |
196addbf | 1706 | DateTime modif) -> FSFile |
0df68c9f | 1707 | """ |
0085ce49 | 1708 | _core_.FSFile_swiginit(self,_core_.new_FSFile(*args, **kwargs)) |
e2950dbb | 1709 | self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem |
4cf4100f | 1710 | |
0085ce49 RD |
1711 | __swig_destroy__ = _core_.delete_FSFile |
1712 | __del__ = lambda self : None; | |
e811c8ce | 1713 | def GetStream(*args, **kwargs): |
a95a7133 | 1714 | """GetStream(self) -> InputStream""" |
54f9ee45 | 1715 | return _core_.FSFile_GetStream(*args, **kwargs) |
e811c8ce RD |
1716 | |
1717 | def GetMimeType(*args, **kwargs): | |
a95a7133 | 1718 | """GetMimeType(self) -> String""" |
54f9ee45 | 1719 | return _core_.FSFile_GetMimeType(*args, **kwargs) |
e811c8ce RD |
1720 | |
1721 | def GetLocation(*args, **kwargs): | |
a95a7133 | 1722 | """GetLocation(self) -> String""" |
54f9ee45 | 1723 | return _core_.FSFile_GetLocation(*args, **kwargs) |
e811c8ce RD |
1724 | |
1725 | def GetAnchor(*args, **kwargs): | |
a95a7133 | 1726 | """GetAnchor(self) -> String""" |
54f9ee45 | 1727 | return _core_.FSFile_GetAnchor(*args, **kwargs) |
e811c8ce RD |
1728 | |
1729 | def GetModificationTime(*args, **kwargs): | |
a95a7133 | 1730 | """GetModificationTime(self) -> DateTime""" |
54f9ee45 | 1731 | return _core_.FSFile_GetModificationTime(*args, **kwargs) |
e811c8ce | 1732 | |
0085ce49 RD |
1733 | FSFile_swigregister = _core_.FSFile_swigregister |
1734 | FSFile_swigregister(FSFile) | |
d14a1e28 RD |
1735 | |
1736 | class CPPFileSystemHandler(object): | |
093d3ff1 | 1737 | """Proxy of C++ CPPFileSystemHandler class""" |
0085ce49 RD |
1738 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1739 | def __init__(self): raise AttributeError, "No constructor defined" | |
1740 | __repr__ = _swig_repr | |
50f151d7 RD |
1741 | __swig_destroy__ = _core_.delete_CPPFileSystemHandler |
1742 | __del__ = lambda self : None; | |
0085ce49 RD |
1743 | CPPFileSystemHandler_swigregister = _core_.CPPFileSystemHandler_swigregister |
1744 | CPPFileSystemHandler_swigregister(CPPFileSystemHandler) | |
d14a1e28 RD |
1745 | |
1746 | class FileSystemHandler(CPPFileSystemHandler): | |
093d3ff1 | 1747 | """Proxy of C++ FileSystemHandler class""" |
0085ce49 RD |
1748 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1749 | __repr__ = _swig_repr | |
1750 | def __init__(self, *args, **kwargs): | |
a95a7133 | 1751 | """__init__(self) -> FileSystemHandler""" |
0085ce49 | 1752 | _core_.FileSystemHandler_swiginit(self,_core_.new_FileSystemHandler(*args, **kwargs)) |
d14a1e28 | 1753 | self._setCallbackInfo(self, FileSystemHandler) |
e811c8ce RD |
1754 | |
1755 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 1756 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 1757 | return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
1758 | |
1759 | def CanOpen(*args, **kwargs): | |
a95a7133 | 1760 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1761 | return _core_.FileSystemHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1762 | |
1763 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1764 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1765 | return _core_.FileSystemHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1766 | |
1767 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1768 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1769 | return _core_.FileSystemHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1770 | |
1771 | def FindNext(*args, **kwargs): | |
a95a7133 | 1772 | """FindNext(self) -> String""" |
54f9ee45 | 1773 | return _core_.FileSystemHandler_FindNext(*args, **kwargs) |
e811c8ce RD |
1774 | |
1775 | def GetProtocol(*args, **kwargs): | |
a95a7133 | 1776 | """GetProtocol(self, String location) -> String""" |
54f9ee45 | 1777 | return _core_.FileSystemHandler_GetProtocol(*args, **kwargs) |
e811c8ce RD |
1778 | |
1779 | def GetLeftLocation(*args, **kwargs): | |
a95a7133 | 1780 | """GetLeftLocation(self, String location) -> String""" |
54f9ee45 | 1781 | return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs) |
e811c8ce RD |
1782 | |
1783 | def GetAnchor(*args, **kwargs): | |
a95a7133 | 1784 | """GetAnchor(self, String location) -> String""" |
54f9ee45 | 1785 | return _core_.FileSystemHandler_GetAnchor(*args, **kwargs) |
e811c8ce RD |
1786 | |
1787 | def GetRightLocation(*args, **kwargs): | |
a95a7133 | 1788 | """GetRightLocation(self, String location) -> String""" |
54f9ee45 | 1789 | return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs) |
e811c8ce RD |
1790 | |
1791 | def GetMimeTypeFromExt(*args, **kwargs): | |
a95a7133 | 1792 | """GetMimeTypeFromExt(self, String location) -> String""" |
54f9ee45 | 1793 | return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs) |
e811c8ce | 1794 | |
0085ce49 RD |
1795 | FileSystemHandler_swigregister = _core_.FileSystemHandler_swigregister |
1796 | FileSystemHandler_swigregister(FileSystemHandler) | |
d14a1e28 RD |
1797 | |
1798 | class FileSystem(Object): | |
093d3ff1 | 1799 | """Proxy of C++ FileSystem class""" |
0085ce49 RD |
1800 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1801 | __repr__ = _swig_repr | |
1802 | def __init__(self, *args, **kwargs): | |
a95a7133 | 1803 | """__init__(self) -> FileSystem""" |
0085ce49 RD |
1804 | _core_.FileSystem_swiginit(self,_core_.new_FileSystem(*args, **kwargs)) |
1805 | __swig_destroy__ = _core_.delete_FileSystem | |
1806 | __del__ = lambda self : None; | |
e811c8ce | 1807 | def ChangePathTo(*args, **kwargs): |
a95a7133 | 1808 | """ChangePathTo(self, String location, bool is_dir=False)""" |
54f9ee45 | 1809 | return _core_.FileSystem_ChangePathTo(*args, **kwargs) |
e811c8ce RD |
1810 | |
1811 | def GetPath(*args, **kwargs): | |
a95a7133 | 1812 | """GetPath(self) -> String""" |
54f9ee45 | 1813 | return _core_.FileSystem_GetPath(*args, **kwargs) |
e811c8ce RD |
1814 | |
1815 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1816 | """OpenFile(self, String location) -> FSFile""" |
54f9ee45 | 1817 | return _core_.FileSystem_OpenFile(*args, **kwargs) |
e811c8ce RD |
1818 | |
1819 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1820 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1821 | return _core_.FileSystem_FindFirst(*args, **kwargs) |
e811c8ce RD |
1822 | |
1823 | def FindNext(*args, **kwargs): | |
a95a7133 | 1824 | """FindNext(self) -> String""" |
54f9ee45 | 1825 | return _core_.FileSystem_FindNext(*args, **kwargs) |
e811c8ce RD |
1826 | |
1827 | def AddHandler(*args, **kwargs): | |
66c033b4 | 1828 | """AddHandler(CPPFileSystemHandler handler)""" |
54f9ee45 | 1829 | return _core_.FileSystem_AddHandler(*args, **kwargs) |
e811c8ce RD |
1830 | |
1831 | AddHandler = staticmethod(AddHandler) | |
1832 | def CleanUpHandlers(*args, **kwargs): | |
66c033b4 | 1833 | """CleanUpHandlers()""" |
54f9ee45 | 1834 | return _core_.FileSystem_CleanUpHandlers(*args, **kwargs) |
e811c8ce RD |
1835 | |
1836 | CleanUpHandlers = staticmethod(CleanUpHandlers) | |
1837 | def FileNameToURL(*args, **kwargs): | |
66c033b4 | 1838 | """FileNameToURL(String filename) -> String""" |
54f9ee45 | 1839 | return _core_.FileSystem_FileNameToURL(*args, **kwargs) |
e811c8ce RD |
1840 | |
1841 | FileNameToURL = staticmethod(FileNameToURL) | |
2ef75293 RD |
1842 | def URLToFileName(*args, **kwargs): |
1843 | """URLToFileName(String url) -> String""" | |
1844 | return _core_.FileSystem_URLToFileName(*args, **kwargs) | |
1845 | ||
1846 | URLToFileName = staticmethod(URLToFileName) | |
0085ce49 RD |
1847 | FileSystem_swigregister = _core_.FileSystem_swigregister |
1848 | FileSystem_swigregister(FileSystem) | |
d14a1e28 | 1849 | |
e811c8ce | 1850 | def FileSystem_AddHandler(*args, **kwargs): |
0085ce49 RD |
1851 | """FileSystem_AddHandler(CPPFileSystemHandler handler)""" |
1852 | return _core_.FileSystem_AddHandler(*args, **kwargs) | |
d14a1e28 | 1853 | |
0085ce49 RD |
1854 | def FileSystem_CleanUpHandlers(*args): |
1855 | """FileSystem_CleanUpHandlers()""" | |
1856 | return _core_.FileSystem_CleanUpHandlers(*args) | |
d14a1e28 | 1857 | |
e811c8ce | 1858 | def FileSystem_FileNameToURL(*args, **kwargs): |
0085ce49 RD |
1859 | """FileSystem_FileNameToURL(String filename) -> String""" |
1860 | return _core_.FileSystem_FileNameToURL(*args, **kwargs) | |
d14a1e28 | 1861 | |
e811c8ce | 1862 | def FileSystem_URLToFileName(*args, **kwargs): |
0085ce49 RD |
1863 | """FileSystem_URLToFileName(String url) -> String""" |
1864 | return _core_.FileSystem_URLToFileName(*args, **kwargs) | |
2ef75293 | 1865 | |
d14a1e28 | 1866 | class InternetFSHandler(CPPFileSystemHandler): |
093d3ff1 | 1867 | """Proxy of C++ InternetFSHandler class""" |
0085ce49 RD |
1868 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1869 | __repr__ = _swig_repr | |
1870 | def __init__(self, *args, **kwargs): | |
a95a7133 | 1871 | """__init__(self) -> InternetFSHandler""" |
0085ce49 | 1872 | _core_.InternetFSHandler_swiginit(self,_core_.new_InternetFSHandler(*args, **kwargs)) |
e811c8ce | 1873 | def CanOpen(*args, **kwargs): |
a95a7133 | 1874 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1875 | return _core_.InternetFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1876 | |
1877 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1878 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1879 | return _core_.InternetFSHandler_OpenFile(*args, **kwargs) |
e811c8ce | 1880 | |
0085ce49 RD |
1881 | InternetFSHandler_swigregister = _core_.InternetFSHandler_swigregister |
1882 | InternetFSHandler_swigregister(InternetFSHandler) | |
d14a1e28 RD |
1883 | |
1884 | class ZipFSHandler(CPPFileSystemHandler): | |
093d3ff1 | 1885 | """Proxy of C++ ZipFSHandler class""" |
0085ce49 RD |
1886 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1887 | __repr__ = _swig_repr | |
1888 | def __init__(self, *args, **kwargs): | |
a95a7133 | 1889 | """__init__(self) -> ZipFSHandler""" |
0085ce49 | 1890 | _core_.ZipFSHandler_swiginit(self,_core_.new_ZipFSHandler(*args, **kwargs)) |
e811c8ce | 1891 | def CanOpen(*args, **kwargs): |
a95a7133 | 1892 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1893 | return _core_.ZipFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1894 | |
1895 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1896 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1897 | return _core_.ZipFSHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1898 | |
1899 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1900 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1901 | return _core_.ZipFSHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1902 | |
1903 | def FindNext(*args, **kwargs): | |
a95a7133 | 1904 | """FindNext(self) -> String""" |
54f9ee45 | 1905 | return _core_.ZipFSHandler_FindNext(*args, **kwargs) |
e811c8ce | 1906 | |
0085ce49 RD |
1907 | ZipFSHandler_swigregister = _core_.ZipFSHandler_swigregister |
1908 | ZipFSHandler_swigregister(ZipFSHandler) | |
d14a1e28 RD |
1909 | |
1910 | ||
e811c8ce | 1911 | def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs): |
0085ce49 RD |
1912 | """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)""" |
1913 | return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs) | |
d14a1e28 | 1914 | |
e811c8ce | 1915 | def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs): |
0085ce49 RD |
1916 | """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)""" |
1917 | return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs) | |
d14a1e28 | 1918 | |
e811c8ce | 1919 | def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs): |
0085ce49 RD |
1920 | """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)""" |
1921 | return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs) | |
2ef75293 RD |
1922 | def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1): |
1923 | """ | |
1924 | Add 'file' to the memory filesystem. The dataItem parameter can | |
1925 | either be a `wx.Bitmap`, `wx.Image` or a string that can contain | |
1926 | arbitrary data. If a bitmap or image is used then the imgType | |
1927 | parameter should specify what kind of image file it should be | |
1928 | written as, wx.BITMAP_TYPE_PNG, etc. | |
1929 | """ | |
1930 | if isinstance(dataItem, wx.Image): | |
1931 | __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType) | |
1932 | elif isinstance(dataItem, wx.Bitmap): | |
1933 | __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType) | |
1934 | elif type(dataItem) == str: | |
1935 | __wxMemoryFSHandler_AddFile_Data(filename, dataItem) | |
1936 | else: | |
1937 | raise TypeError, 'wx.Image, wx.Bitmap or string expected' | |
d14a1e28 RD |
1938 | |
1939 | class MemoryFSHandler(CPPFileSystemHandler): | |
093d3ff1 | 1940 | """Proxy of C++ MemoryFSHandler class""" |
0085ce49 RD |
1941 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1942 | __repr__ = _swig_repr | |
1943 | def __init__(self, *args, **kwargs): | |
a95a7133 | 1944 | """__init__(self) -> MemoryFSHandler""" |
0085ce49 | 1945 | _core_.MemoryFSHandler_swiginit(self,_core_.new_MemoryFSHandler(*args, **kwargs)) |
e811c8ce | 1946 | def RemoveFile(*args, **kwargs): |
66c033b4 | 1947 | """RemoveFile(String filename)""" |
54f9ee45 | 1948 | return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) |
e811c8ce RD |
1949 | |
1950 | RemoveFile = staticmethod(RemoveFile) | |
d14a1e28 | 1951 | AddFile = staticmethod(MemoryFSHandler_AddFile) |
e811c8ce | 1952 | def CanOpen(*args, **kwargs): |
a95a7133 | 1953 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1954 | return _core_.MemoryFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1955 | |
1956 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1957 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1958 | return _core_.MemoryFSHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1959 | |
1960 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1961 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1962 | return _core_.MemoryFSHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1963 | |
1964 | def FindNext(*args, **kwargs): | |
a95a7133 | 1965 | """FindNext(self) -> String""" |
54f9ee45 | 1966 | return _core_.MemoryFSHandler_FindNext(*args, **kwargs) |
e811c8ce | 1967 | |
0085ce49 RD |
1968 | MemoryFSHandler_swigregister = _core_.MemoryFSHandler_swigregister |
1969 | MemoryFSHandler_swigregister(MemoryFSHandler) | |
d14a1e28 | 1970 | |
e811c8ce | 1971 | def MemoryFSHandler_RemoveFile(*args, **kwargs): |
0085ce49 RD |
1972 | """MemoryFSHandler_RemoveFile(String filename)""" |
1973 | return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) | |
d14a1e28 | 1974 | |
bcd0d7b6 RD |
1975 | IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT |
1976 | IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD | |
1977 | IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE | |
d14a1e28 RD |
1978 | #--------------------------------------------------------------------------- |
1979 | ||
1980 | class ImageHandler(Object): | |
27fb7603 RD |
1981 | """ |
1982 | This is the base class for implementing image file loading/saving, and | |
1983 | image creation from data. It is used within `wx.Image` and is not | |
1984 | normally seen by the application. | |
1985 | """ | |
0085ce49 RD |
1986 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
1987 | def __init__(self): raise AttributeError, "No constructor defined" | |
1988 | __repr__ = _swig_repr | |
e811c8ce | 1989 | def GetName(*args, **kwargs): |
a95a7133 | 1990 | """GetName(self) -> String""" |
54f9ee45 | 1991 | return _core_.ImageHandler_GetName(*args, **kwargs) |
e811c8ce RD |
1992 | |
1993 | def GetExtension(*args, **kwargs): | |
a95a7133 | 1994 | """GetExtension(self) -> String""" |
54f9ee45 | 1995 | return _core_.ImageHandler_GetExtension(*args, **kwargs) |
e811c8ce RD |
1996 | |
1997 | def GetType(*args, **kwargs): | |
a95a7133 | 1998 | """GetType(self) -> long""" |
54f9ee45 | 1999 | return _core_.ImageHandler_GetType(*args, **kwargs) |
e811c8ce RD |
2000 | |
2001 | def GetMimeType(*args, **kwargs): | |
a95a7133 | 2002 | """GetMimeType(self) -> String""" |
54f9ee45 | 2003 | return _core_.ImageHandler_GetMimeType(*args, **kwargs) |
e811c8ce RD |
2004 | |
2005 | def CanRead(*args, **kwargs): | |
a95a7133 | 2006 | """CanRead(self, String name) -> bool""" |
54f9ee45 | 2007 | return _core_.ImageHandler_CanRead(*args, **kwargs) |
e811c8ce RD |
2008 | |
2009 | def SetName(*args, **kwargs): | |
a95a7133 | 2010 | """SetName(self, String name)""" |
54f9ee45 | 2011 | return _core_.ImageHandler_SetName(*args, **kwargs) |
e811c8ce RD |
2012 | |
2013 | def SetExtension(*args, **kwargs): | |
a95a7133 | 2014 | """SetExtension(self, String extension)""" |
54f9ee45 | 2015 | return _core_.ImageHandler_SetExtension(*args, **kwargs) |
e811c8ce RD |
2016 | |
2017 | def SetType(*args, **kwargs): | |
a95a7133 | 2018 | """SetType(self, long type)""" |
54f9ee45 | 2019 | return _core_.ImageHandler_SetType(*args, **kwargs) |
e811c8ce RD |
2020 | |
2021 | def SetMimeType(*args, **kwargs): | |
a95a7133 | 2022 | """SetMimeType(self, String mimetype)""" |
54f9ee45 | 2023 | return _core_.ImageHandler_SetMimeType(*args, **kwargs) |
e811c8ce | 2024 | |
0085ce49 RD |
2025 | ImageHandler_swigregister = _core_.ImageHandler_swigregister |
2026 | ImageHandler_swigregister(ImageHandler) | |
d14a1e28 | 2027 | |
943e8dfd RD |
2028 | class PyImageHandler(ImageHandler): |
2029 | """ | |
2030 | This is the base class for implementing image file loading/saving, and | |
2031 | image creation from data, all written in Python. To create a custom | |
2032 | image handler derive a new class from wx.PyImageHandler and provide | |
2033 | the following methods:: | |
2034 | ||
2035 | def DoCanRead(self, stream) --> bool | |
2036 | '''Check if this handler can read the image on the stream''' | |
2037 | ||
2038 | def LoadFile(self, image, stream, verbose, index) --> bool | |
2039 | '''Load image data from the stream and load it into image.''' | |
2040 | ||
2041 | def SaveFile(self, image, stream, verbose) --> bool | |
2042 | '''Save the iamge data in image to the stream using | |
2043 | this handler's image file format.''' | |
2044 | ||
2045 | def GetImageCount(self, stream) --> int | |
2046 | '''If this image format can hold more than one image, | |
2047 | how many does the image on the stream have?''' | |
2048 | ||
2049 | To activate your handler create an instance of it and pass it to | |
2050 | `wx.Image_AddHandler`. Be sure to call `SetName`, `SetType`, and | |
2051 | `SetExtension` from your constructor. | |
2052 | ||
2053 | """ | |
0085ce49 RD |
2054 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
2055 | __repr__ = _swig_repr | |
2056 | def __init__(self, *args, **kwargs): | |
943e8dfd RD |
2057 | """ |
2058 | __init__(self) -> PyImageHandler | |
2059 | ||
2060 | This is the base class for implementing image file loading/saving, and | |
2061 | image creation from data, all written in Python. To create a custom | |
2062 | image handler derive a new class from wx.PyImageHandler and provide | |
2063 | the following methods:: | |
2064 | ||
2065 | def DoCanRead(self, stream) --> bool | |
2066 | '''Check if this handler can read the image on the stream''' | |
2067 | ||
2068 | def LoadFile(self, image, stream, verbose, index) --> bool | |
2069 | '''Load image data from the stream and load it into image.''' | |
2070 | ||
2071 | def SaveFile(self, image, stream, verbose) --> bool | |
2072 | '''Save the iamge data in image to the stream using | |
2073 | this handler's image file format.''' | |
2074 | ||
2075 | def GetImageCount(self, stream) --> int | |
2076 | '''If this image format can hold more than one image, | |
2077 | how many does the image on the stream have?''' | |
2078 | ||
2079 | To activate your handler create an instance of it and pass it to | |
2080 | `wx.Image_AddHandler`. Be sure to call `SetName`, `SetType`, and | |
2081 | `SetExtension` from your constructor. | |
2082 | ||
2083 | """ | |
0085ce49 | 2084 | _core_.PyImageHandler_swiginit(self,_core_.new_PyImageHandler(*args, **kwargs)) |
943e8dfd RD |
2085 | self._SetSelf(self) |
2086 | ||
2087 | def _SetSelf(*args, **kwargs): | |
2088 | """_SetSelf(self, PyObject self)""" | |
2089 | return _core_.PyImageHandler__SetSelf(*args, **kwargs) | |
2090 | ||
0085ce49 RD |
2091 | PyImageHandler_swigregister = _core_.PyImageHandler_swigregister |
2092 | PyImageHandler_swigregister(PyImageHandler) | |
943e8dfd | 2093 | |
d14a1e28 | 2094 | class ImageHistogram(object): |
093d3ff1 | 2095 | """Proxy of C++ ImageHistogram class""" |
0085ce49 RD |
2096 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
2097 | __repr__ = _swig_repr | |
2098 | def __init__(self, *args, **kwargs): | |
a95a7133 | 2099 | """__init__(self) -> ImageHistogram""" |
0085ce49 | 2100 | _core_.ImageHistogram_swiginit(self,_core_.new_ImageHistogram(*args, **kwargs)) |
e811c8ce | 2101 | def MakeKey(*args, **kwargs): |
0df68c9f | 2102 | """ |
7a27cf7c | 2103 | MakeKey(byte r, byte g, byte b) -> unsigned long |
e811c8ce | 2104 | |
0df68c9f RD |
2105 | Get the key in the histogram for the given RGB values |
2106 | """ | |
54f9ee45 | 2107 | return _core_.ImageHistogram_MakeKey(*args, **kwargs) |
e811c8ce RD |
2108 | |
2109 | MakeKey = staticmethod(MakeKey) | |
2110 | def FindFirstUnusedColour(*args, **kwargs): | |
fd2dc343 RD |
2111 | """ |
2112 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
2113 | ||
2114 | Find first colour that is not used in the image and has higher RGB | |
2115 | values than startR, startG, startB. Returns a tuple consisting of a | |
2116 | success flag and rgb values. | |
2117 | """ | |
54f9ee45 | 2118 | return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs) |
e811c8ce | 2119 | |
f1cbd8fa RD |
2120 | def GetCount(*args, **kwargs): |
2121 | """ | |
2122 | GetCount(self, unsigned long key) -> unsigned long | |
2123 | ||
2124 | Returns the pixel count for the given key. Use `MakeKey` to create a | |
2125 | key value from a RGB tripple. | |
2126 | """ | |
2127 | return _core_.ImageHistogram_GetCount(*args, **kwargs) | |
2128 | ||
2129 | def GetCountRGB(*args, **kwargs): | |
2130 | """ | |
7a27cf7c | 2131 | GetCountRGB(self, byte r, byte g, byte b) -> unsigned long |
f1cbd8fa RD |
2132 | |
2133 | Returns the pixel count for the given RGB values. | |
2134 | """ | |
2135 | return _core_.ImageHistogram_GetCountRGB(*args, **kwargs) | |
2136 | ||
2137 | def GetCountColour(*args, **kwargs): | |
2138 | """ | |
2139 | GetCountColour(self, Colour colour) -> unsigned long | |
2140 | ||
2141 | Returns the pixel count for the given `wx.Colour` value. | |
2142 | """ | |
2143 | return _core_.ImageHistogram_GetCountColour(*args, **kwargs) | |
2144 | ||
0085ce49 RD |
2145 | ImageHistogram_swigregister = _core_.ImageHistogram_swigregister |
2146 | ImageHistogram_swigregister(ImageHistogram) | |
d14a1e28 | 2147 | |
e811c8ce | 2148 | def ImageHistogram_MakeKey(*args, **kwargs): |
0085ce49 | 2149 | """ |
7a27cf7c | 2150 | ImageHistogram_MakeKey(byte r, byte g, byte b) -> unsigned long |
e811c8ce | 2151 | |
0df68c9f RD |
2152 | Get the key in the histogram for the given RGB values |
2153 | """ | |
0085ce49 | 2154 | return _core_.ImageHistogram_MakeKey(*args, **kwargs) |
d14a1e28 | 2155 | |
943e8dfd RD |
2156 | class Image_RGBValue(object): |
2157 | """ | |
2158 | An object that contains values for red, green and blue which represent | |
2159 | the value of a color. It is used by `wx.Image.HSVtoRGB` and | |
2160 | `wx.Image.RGBtoHSV`, which converts between HSV color space and RGB | |
2161 | color space. | |
2162 | """ | |
0085ce49 RD |
2163 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
2164 | __repr__ = _swig_repr | |
2165 | def __init__(self, *args, **kwargs): | |
943e8dfd RD |
2166 | """ |
2167 | __init__(self, byte r=0, byte g=0, byte b=0) -> Image_RGBValue | |
2168 | ||
2169 | Constructor. | |
2170 | """ | |
0085ce49 | 2171 | _core_.Image_RGBValue_swiginit(self,_core_.new_Image_RGBValue(*args, **kwargs)) |
943e8dfd RD |
2172 | red = property(_core_.Image_RGBValue_red_get, _core_.Image_RGBValue_red_set) |
2173 | green = property(_core_.Image_RGBValue_green_get, _core_.Image_RGBValue_green_set) | |
2174 | blue = property(_core_.Image_RGBValue_blue_get, _core_.Image_RGBValue_blue_set) | |
0085ce49 RD |
2175 | Image_RGBValue_swigregister = _core_.Image_RGBValue_swigregister |
2176 | Image_RGBValue_swigregister(Image_RGBValue) | |
943e8dfd RD |
2177 | |
2178 | class Image_HSVValue(object): | |
2179 | """ | |
2180 | An object that contains values for hue, saturation and value which | |
2181 | represent the value of a color. It is used by `wx.Image.HSVtoRGB` and | |
2182 | `wx.Image.RGBtoHSV`, which +converts between HSV color space and RGB | |
2183 | color space. | |
2184 | """ | |
0085ce49 RD |
2185 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
2186 | __repr__ = _swig_repr | |
2187 | def __init__(self, *args, **kwargs): | |
943e8dfd RD |
2188 | """ |
2189 | __init__(self, double h=0.0, double s=0.0, double v=0.0) -> Image_HSVValue | |
2190 | ||
2191 | Constructor. | |
2192 | """ | |
0085ce49 | 2193 | _core_.Image_HSVValue_swiginit(self,_core_.new_Image_HSVValue(*args, **kwargs)) |
943e8dfd RD |
2194 | hue = property(_core_.Image_HSVValue_hue_get, _core_.Image_HSVValue_hue_set) |
2195 | saturation = property(_core_.Image_HSVValue_saturation_get, _core_.Image_HSVValue_saturation_set) | |
2196 | value = property(_core_.Image_HSVValue_value_get, _core_.Image_HSVValue_value_set) | |
0085ce49 RD |
2197 | Image_HSVValue_swigregister = _core_.Image_HSVValue_swigregister |
2198 | Image_HSVValue_swigregister(Image_HSVValue) | |
943e8dfd | 2199 | |
d14a1e28 | 2200 | class Image(Object): |
7a27cf7c RD |
2201 | """ |
2202 | A platform-independent image class. An image can be created from | |
2203 | data, or using `wx.Bitmap.ConvertToImage`, or loaded from a file in a | |
2204 | variety of formats. Functions are available to set and get image | |
2205 | bits, so it can be used for basic image manipulation. | |
2206 | ||
2207 | A wx.Image cannot be drawn directly to a `wx.DC`. Instead, a | |
2208 | platform-specific `wx.Bitmap` object must be created from it using the | |
2209 | `wx.BitmapFromImage` constructor. This bitmap can then be drawn in a | |
2210 | device context, using `wx.DC.DrawBitmap`. | |
2211 | ||
2212 | One colour value of the image may be used as a mask colour which will | |
2213 | lead to the automatic creation of a `wx.Mask` object associated to the | |
2214 | bitmap object. | |
2215 | ||
2216 | wx.Image supports alpha channel data, that is in addition to a byte | |
2217 | for the red, green and blue colour components for each pixel it also | |
2218 | stores a byte representing the pixel opacity. An alpha value of 0 | |
2219 | corresponds to a transparent pixel (null opacity) while a value of 255 | |
2220 | means that the pixel is 100% opaque. | |
2221 | ||
2222 | Unlike RGB data, not all images have an alpha channel and before using | |
2223 | `GetAlpha` you should check if this image contains an alpha channel | |
2224 | with `HasAlpha`. Note that currently only images loaded from PNG files | |
2225 | with transparency information will have an alpha channel. | |
2226 | """ | |
0085ce49 RD |
2227 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
2228 | __repr__ = _swig_repr | |
2229 | def __init__(self, *args, **kwargs): | |
7a27cf7c RD |
2230 | """ |
2231 | __init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image | |
2232 | ||
2233 | Loads an image from a file. | |
2234 | """ | |
0085ce49 RD |
2235 | _core_.Image_swiginit(self,_core_.new_Image(*args, **kwargs)) |
2236 | __swig_destroy__ = _core_.delete_Image | |
2237 | __del__ = lambda self : None; | |
e811c8ce | 2238 | def Create(*args, **kwargs): |
7a27cf7c RD |
2239 | """ |
2240 | Create(self, int width, int height, bool clear=True) | |
2241 | ||
2242 | Creates a fresh image. If clear is ``True``, the new image will be | |
2243 | initialized to black. Otherwise, the image data will be uninitialized. | |
2244 | """ | |
54f9ee45 | 2245 | return _core_.Image_Create(*args, **kwargs) |
e811c8ce RD |
2246 | |
2247 | def Destroy(*args, **kwargs): | |
0df68c9f | 2248 | """ |
a95a7133 | 2249 | Destroy(self) |
e811c8ce | 2250 | |
7a27cf7c | 2251 | Destroys the image data. |
0df68c9f | 2252 | """ |
7e08d4ef RD |
2253 | val = _core_.Image_Destroy(*args, **kwargs) |
2254 | args[0].thisown = 0 | |
2255 | return val | |
e811c8ce RD |
2256 | |
2257 | def Scale(*args, **kwargs): | |
7a27cf7c RD |
2258 | """ |
2259 | Scale(self, int width, int height) -> Image | |
2260 | ||
2261 | Returns a scaled version of the image. This is also useful for scaling | |
2262 | bitmaps in general as the only other way to scale bitmaps is to blit a | |
2263 | `wx.MemoryDC` into another `wx.MemoryDC`. | |
2264 | """ | |
54f9ee45 | 2265 | return _core_.Image_Scale(*args, **kwargs) |
e811c8ce RD |
2266 | |
2267 | def ShrinkBy(*args, **kwargs): | |
7a27cf7c RD |
2268 | """ |
2269 | ShrinkBy(self, int xFactor, int yFactor) -> Image | |
2270 | ||
2271 | Return a version of the image scaled smaller by the given factors. | |
2272 | """ | |
54f9ee45 | 2273 | return _core_.Image_ShrinkBy(*args, **kwargs) |
e811c8ce RD |
2274 | |
2275 | def Rescale(*args, **kwargs): | |
7a27cf7c RD |
2276 | """ |
2277 | Rescale(self, int width, int height) -> Image | |
2278 | ||
2279 | Changes the size of the image in-place by scaling it: after a call to | |
2280 | this function, the image will have the given width and height. | |
2281 | ||
2282 | Returns the (modified) image itself. | |
2283 | """ | |
54f9ee45 | 2284 | return _core_.Image_Rescale(*args, **kwargs) |
e811c8ce | 2285 | |
aff4cc5c | 2286 | def Resize(*args, **kwargs): |
7a27cf7c RD |
2287 | """ |
2288 | Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image | |
2289 | ||
2290 | Changes the size of the image in-place without scaling it, by adding | |
2291 | either a border with the given colour or cropping as necessary. The | |
2292 | image is pasted into a new image with the given size and background | |
2293 | colour at the position pos relative to the upper left of the new | |
2294 | image. If red = green = blue = -1 then use either the current mask | |
2295 | colour if set or find, use, and set a suitable mask colour for any | |
2296 | newly exposed areas. | |
2297 | ||
2298 | Returns the (modified) image itself. | |
2299 | """ | |
aff4cc5c RD |
2300 | return _core_.Image_Resize(*args, **kwargs) |
2301 | ||
e811c8ce | 2302 | def SetRGB(*args, **kwargs): |
7a27cf7c RD |
2303 | """ |
2304 | SetRGB(self, int x, int y, byte r, byte g, byte b) | |
2305 | ||
2306 | Sets the pixel at the given coordinate. This routine performs | |
2307 | bounds-checks for the coordinate so it can be considered a safe way to | |
2308 | manipulate the data, but in some cases this might be too slow so that | |
2309 | the data will have to be set directly. In that case you will have to | |
2310 | get access to the image data using the `GetData` method. | |
2311 | """ | |
54f9ee45 | 2312 | return _core_.Image_SetRGB(*args, **kwargs) |
e811c8ce | 2313 | |
aff4cc5c | 2314 | def SetRGBRect(*args, **kwargs): |
7a27cf7c RD |
2315 | """ |
2316 | SetRGBRect(self, Rect rect, byte r, byte g, byte b) | |
2317 | ||
2318 | Sets the colour of the pixels within the given rectangle. This routine | |
2319 | performs bounds-checks for the rectangle so it can be considered a | |
2320 | safe way to manipulate the data. | |
2321 | """ | |
aff4cc5c RD |
2322 | return _core_.Image_SetRGBRect(*args, **kwargs) |
2323 | ||
e811c8ce | 2324 | def GetRed(*args, **kwargs): |
7a27cf7c RD |
2325 | """ |
2326 | GetRed(self, int x, int y) -> byte | |
2327 | ||
2328 | Returns the red intensity at the given coordinate. | |
2329 | """ | |
54f9ee45 | 2330 | return _core_.Image_GetRed(*args, **kwargs) |
e811c8ce RD |
2331 | |
2332 | def GetGreen(*args, **kwargs): | |
7a27cf7c RD |
2333 | """ |
2334 | GetGreen(self, int x, int y) -> byte | |
2335 | ||
2336 | Returns the green intensity at the given coordinate. | |
2337 | """ | |
54f9ee45 | 2338 | return _core_.Image_GetGreen(*args, **kwargs) |
e811c8ce RD |
2339 | |
2340 | def GetBlue(*args, **kwargs): | |
7a27cf7c RD |
2341 | """ |
2342 | GetBlue(self, int x, int y) -> byte | |
2343 | ||
2344 | Returns the blue intensity at the given coordinate. | |
2345 | """ | |
54f9ee45 | 2346 | return _core_.Image_GetBlue(*args, **kwargs) |
e811c8ce RD |
2347 | |
2348 | def SetAlpha(*args, **kwargs): | |
7a27cf7c RD |
2349 | """ |
2350 | SetAlpha(self, int x, int y, byte alpha) | |
2351 | ||
2352 | Sets the alpha value for the given pixel. This function should only be | |
2353 | called if the image has alpha channel data, use `HasAlpha` to check | |
2354 | for this. | |
2355 | """ | |
54f9ee45 | 2356 | return _core_.Image_SetAlpha(*args, **kwargs) |
e811c8ce RD |
2357 | |
2358 | def GetAlpha(*args, **kwargs): | |
7a27cf7c RD |
2359 | """ |
2360 | GetAlpha(self, int x, int y) -> byte | |
2361 | ||
2362 | Returns the alpha value for the given pixel. This function may only be | |
2363 | called for the images with alpha channel, use `HasAlpha` to check for | |
2364 | this. | |
2365 | ||
2366 | The returned value is the *opacity* of the image, i.e. the value of 0 | |
2367 | corresponds to the fully transparent pixels while the value of 255 to | |
2368 | the fully opaque pixels. | |
2369 | """ | |
54f9ee45 | 2370 | return _core_.Image_GetAlpha(*args, **kwargs) |
e811c8ce RD |
2371 | |
2372 | def HasAlpha(*args, **kwargs): | |
7a27cf7c RD |
2373 | """ |
2374 | HasAlpha(self) -> bool | |
2375 | ||
2376 | Returns true if this image has alpha channel, false otherwise. | |
2377 | """ | |
54f9ee45 | 2378 | return _core_.Image_HasAlpha(*args, **kwargs) |
e811c8ce | 2379 | |
68350608 RD |
2380 | def InitAlpha(*args, **kwargs): |
2381 | """ | |
2382 | InitAlpha(self) | |
2383 | ||
2384 | Initializes the image alpha channel data. It is an error to call it if | |
2385 | the image already has alpha data. If it doesn't, alpha data will be by | |
2386 | default initialized to all pixels being fully opaque. But if the image | |
2387 | has a a mask colour, all mask pixels will be completely transparent. | |
2388 | """ | |
2389 | return _core_.Image_InitAlpha(*args, **kwargs) | |
2390 | ||
bcd0d7b6 RD |
2391 | def IsTransparent(*args, **kwargs): |
2392 | """ | |
7a27cf7c | 2393 | IsTransparent(self, int x, int y, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool |
bcd0d7b6 | 2394 | |
7a27cf7c RD |
2395 | Returns ``True`` if this pixel is masked or has an alpha value less |
2396 | than the spcified threshold. | |
bcd0d7b6 RD |
2397 | """ |
2398 | return _core_.Image_IsTransparent(*args, **kwargs) | |
2399 | ||
e811c8ce | 2400 | def FindFirstUnusedColour(*args, **kwargs): |
fd2dc343 RD |
2401 | """ |
2402 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
2403 | ||
2404 | Find first colour that is not used in the image and has higher RGB | |
2405 | values than startR, startG, startB. Returns a tuple consisting of a | |
2406 | success flag and rgb values. | |
2407 | """ | |
54f9ee45 | 2408 | return _core_.Image_FindFirstUnusedColour(*args, **kwargs) |
e811c8ce | 2409 | |
4cf4100f RD |
2410 | def ConvertAlphaToMask(*args, **kwargs): |
2411 | """ | |
bcd0d7b6 | 2412 | ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool |
4cf4100f | 2413 | |
7a27cf7c RD |
2414 | If the image has alpha channel, this method converts it to mask. All |
2415 | pixels with alpha value less than ``threshold`` are replaced with the | |
2416 | mask colour and the alpha channel is removed. The mask colour is | |
2417 | chosen automatically using `FindFirstUnusedColour`. | |
4cf4100f RD |
2418 | |
2419 | If the image image doesn't have alpha channel, ConvertAlphaToMask does | |
2420 | nothing. | |
2421 | """ | |
2422 | return _core_.Image_ConvertAlphaToMask(*args, **kwargs) | |
2423 | ||
8fb0e70a RD |
2424 | def ConvertColourToAlpha(*args, **kwargs): |
2425 | """ | |
7a27cf7c | 2426 | ConvertColourToAlpha(self, byte r, byte g, byte b) -> bool |
8fb0e70a RD |
2427 | |
2428 | This method converts an image where the original alpha information is | |
2429 | only available as a shades of a colour (actually shades of grey) | |
2430 | typically when you draw anti-aliased text into a bitmap. The DC | |
2431 | drawing routines draw grey values on the black background although | |
2432 | they actually mean to draw white with differnt alpha values. This | |
2433 | method reverses it, assuming a black (!) background and white text. | |
2434 | The method will then fill up the whole image with the colour given. | |
2435 | """ | |
2436 | return _core_.Image_ConvertColourToAlpha(*args, **kwargs) | |
2437 | ||
e811c8ce | 2438 | def SetMaskFromImage(*args, **kwargs): |
7a27cf7c RD |
2439 | """ |
2440 | SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool | |
2441 | ||
2442 | Sets the image's mask so that the pixels that have RGB value of | |
2443 | ``(mr,mg,mb)`` in ``mask`` will be masked in this image. This is done | |
2444 | by first finding an unused colour in the image, setting this colour as | |
2445 | the mask colour and then using this colour to draw all pixels in the | |
2446 | image who corresponding pixel in mask has given RGB value. | |
2447 | ||
2448 | Returns ``False`` if ``mask`` does not have same dimensions as the | |
2449 | image or if there is no unused colour left. Returns ``True`` if the | |
2450 | mask was successfully applied. | |
2451 | ||
2452 | Note that this method involves computing the histogram, which is | |
2453 | computationally intensive operation. | |
2454 | """ | |
54f9ee45 | 2455 | return _core_.Image_SetMaskFromImage(*args, **kwargs) |
e811c8ce RD |
2456 | |
2457 | def CanRead(*args, **kwargs): | |
7a27cf7c RD |
2458 | """ |
2459 | CanRead(String filename) -> bool | |
2460 | ||
2461 | Returns True if the image handlers can read this file. | |
2462 | """ | |
54f9ee45 | 2463 | return _core_.Image_CanRead(*args, **kwargs) |
e811c8ce RD |
2464 | |
2465 | CanRead = staticmethod(CanRead) | |
2466 | def GetImageCount(*args, **kwargs): | |
7a27cf7c RD |
2467 | """ |
2468 | GetImageCount(String filename, long type=BITMAP_TYPE_ANY) -> int | |
2469 | ||
2470 | If the image file contains more than one image and the image handler | |
2471 | is capable of retrieving these individually, this function will return | |
2472 | the number of available images. | |
2473 | """ | |
54f9ee45 | 2474 | return _core_.Image_GetImageCount(*args, **kwargs) |
e811c8ce RD |
2475 | |
2476 | GetImageCount = staticmethod(GetImageCount) | |
2477 | def LoadFile(*args, **kwargs): | |
7a27cf7c RD |
2478 | """ |
2479 | LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool | |
2480 | ||
2481 | Loads an image from a file. If no handler type is provided, the | |
2482 | library will try to autodetect the format. | |
2483 | """ | |
54f9ee45 | 2484 | return _core_.Image_LoadFile(*args, **kwargs) |
e811c8ce RD |
2485 | |
2486 | def LoadMimeFile(*args, **kwargs): | |
7a27cf7c RD |
2487 | """ |
2488 | LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool | |
2489 | ||
2490 | Loads an image from a file, specifying the image type with a MIME type | |
2491 | string. | |
2492 | """ | |
54f9ee45 | 2493 | return _core_.Image_LoadMimeFile(*args, **kwargs) |
e811c8ce RD |
2494 | |
2495 | def SaveFile(*args, **kwargs): | |
7a27cf7c RD |
2496 | """ |
2497 | SaveFile(self, String name, int type) -> bool | |
2498 | ||
2499 | Saves an image in the named file. | |
2500 | """ | |
54f9ee45 | 2501 | return _core_.Image_SaveFile(*args, **kwargs) |
e811c8ce RD |
2502 | |
2503 | def SaveMimeFile(*args, **kwargs): | |
7a27cf7c RD |
2504 | """ |
2505 | SaveMimeFile(self, String name, String mimetype) -> bool | |
2506 | ||
2507 | Saves an image in the named file. | |
2508 | """ | |
54f9ee45 | 2509 | return _core_.Image_SaveMimeFile(*args, **kwargs) |
e811c8ce RD |
2510 | |
2511 | def CanReadStream(*args, **kwargs): | |
7a27cf7c RD |
2512 | """ |
2513 | CanReadStream(InputStream stream) -> bool | |
2514 | ||
2515 | Returns True if the image handlers can read an image file from the | |
2516 | data currently on the input stream, or a readable Python file-like | |
2517 | object. | |
2518 | """ | |
54f9ee45 | 2519 | return _core_.Image_CanReadStream(*args, **kwargs) |
e811c8ce RD |
2520 | |
2521 | CanReadStream = staticmethod(CanReadStream) | |
2522 | def LoadStream(*args, **kwargs): | |
7a27cf7c RD |
2523 | """ |
2524 | LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool | |
2525 | ||
2526 | Loads an image from an input stream or a readable Python file-like | |
2527 | object. If no handler type is provided, the library will try to | |
2528 | autodetect the format. | |
2529 | """ | |
54f9ee45 | 2530 | return _core_.Image_LoadStream(*args, **kwargs) |
e811c8ce RD |
2531 | |
2532 | def LoadMimeStream(*args, **kwargs): | |
7a27cf7c RD |
2533 | """ |
2534 | LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool | |
2535 | ||
2536 | Loads an image from an input stream or a readable Python file-like | |
2537 | object, using a MIME type string to specify the image file format. | |
2538 | """ | |
54f9ee45 | 2539 | return _core_.Image_LoadMimeStream(*args, **kwargs) |
e811c8ce RD |
2540 | |
2541 | def Ok(*args, **kwargs): | |
7a27cf7c RD |
2542 | """ |
2543 | Ok(self) -> bool | |
2544 | ||
2545 | Returns true if image data is present. | |
2546 | """ | |
54f9ee45 | 2547 | return _core_.Image_Ok(*args, **kwargs) |
e811c8ce RD |
2548 | |
2549 | def GetWidth(*args, **kwargs): | |
7a27cf7c RD |
2550 | """ |
2551 | GetWidth(self) -> int | |
2552 | ||
2553 | Gets the width of the image in pixels. | |
2554 | """ | |
54f9ee45 | 2555 | return _core_.Image_GetWidth(*args, **kwargs) |
e811c8ce RD |
2556 | |
2557 | def GetHeight(*args, **kwargs): | |
7a27cf7c RD |
2558 | """ |
2559 | GetHeight(self) -> int | |
2560 | ||
2561 | Gets the height of the image in pixels. | |
2562 | """ | |
54f9ee45 | 2563 | return _core_.Image_GetHeight(*args, **kwargs) |
e811c8ce | 2564 | |
b2df227b | 2565 | def GetSize(*args, **kwargs): |
7a27cf7c RD |
2566 | """ |
2567 | GetSize(self) -> Size | |
2568 | ||
2569 | Returns the size of the image in pixels. | |
2570 | """ | |
54f9ee45 | 2571 | return _core_.Image_GetSize(*args, **kwargs) |
b2df227b | 2572 | |
e811c8ce | 2573 | def GetSubImage(*args, **kwargs): |
7a27cf7c RD |
2574 | """ |
2575 | GetSubImage(self, Rect rect) -> Image | |
2576 | ||
2577 | Returns a sub image of the current one as long as the rect belongs | |
2578 | entirely to the image. | |
2579 | """ | |
54f9ee45 | 2580 | return _core_.Image_GetSubImage(*args, **kwargs) |
e811c8ce | 2581 | |
aff4cc5c | 2582 | def Size(*args, **kwargs): |
7a27cf7c RD |
2583 | """ |
2584 | Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image | |
2585 | ||
2586 | Returns a resized version of this image without scaling it by adding | |
2587 | either a border with the given colour or cropping as necessary. The | |
2588 | image is pasted into a new image with the given size and background | |
2589 | colour at the position ``pos`` relative to the upper left of the new | |
2590 | image. If red = green = blue = -1 then use either the current mask | |
2591 | colour if set or find, use, and set a suitable mask colour for any | |
2592 | newly exposed areas. | |
2593 | """ | |
aff4cc5c RD |
2594 | return _core_.Image_Size(*args, **kwargs) |
2595 | ||
e811c8ce | 2596 | def Copy(*args, **kwargs): |
7a27cf7c RD |
2597 | """ |
2598 | Copy(self) -> Image | |
2599 | ||
2600 | Returns an identical copy of the image. | |
2601 | """ | |
54f9ee45 | 2602 | return _core_.Image_Copy(*args, **kwargs) |
e811c8ce RD |
2603 | |
2604 | def Paste(*args, **kwargs): | |
7a27cf7c RD |
2605 | """ |
2606 | Paste(self, Image image, int x, int y) | |
2607 | ||
2608 | Pastes ``image`` into this instance and takes care of the mask colour | |
2609 | and any out of bounds problems. | |
2610 | """ | |
54f9ee45 | 2611 | return _core_.Image_Paste(*args, **kwargs) |
e811c8ce RD |
2612 | |
2613 | def GetData(*args, **kwargs): | |
61d07ac7 RD |
2614 | """ |
2615 | GetData(self) -> PyObject | |
2616 | ||
2617 | Returns a string containing a copy of the RGB bytes of the image. | |
2618 | """ | |
54f9ee45 | 2619 | return _core_.Image_GetData(*args, **kwargs) |
e811c8ce RD |
2620 | |
2621 | def SetData(*args, **kwargs): | |
61d07ac7 RD |
2622 | """ |
2623 | SetData(self, buffer data) | |
2624 | ||
2625 | Resets the Image's RGB data from a buffer of RGB bytes. Accepts | |
2626 | either a string or a buffer object holding the data and the length of | |
2627 | the data must be width*height*3. | |
2628 | """ | |
54f9ee45 | 2629 | return _core_.Image_SetData(*args, **kwargs) |
e811c8ce RD |
2630 | |
2631 | def GetDataBuffer(*args, **kwargs): | |
61d07ac7 RD |
2632 | """ |
2633 | GetDataBuffer(self) -> PyObject | |
2634 | ||
2635 | Returns a writable Python buffer object that is pointing at the RGB | |
7a27cf7c RD |
2636 | image data buffer inside the wx.Image. You need to ensure that you do |
2637 | not use this buffer object after the image has been destroyed. | |
61d07ac7 | 2638 | """ |
54f9ee45 | 2639 | return _core_.Image_GetDataBuffer(*args, **kwargs) |
e811c8ce RD |
2640 | |
2641 | def SetDataBuffer(*args, **kwargs): | |
61d07ac7 RD |
2642 | """ |
2643 | SetDataBuffer(self, buffer data) | |
2644 | ||
2645 | Sets the internal image data pointer to point at a Python buffer | |
7a27cf7c RD |
2646 | object. This can save making an extra copy of the data but you must |
2647 | ensure that the buffer object lives longer than the wx.Image does. | |
61d07ac7 | 2648 | """ |
54f9ee45 | 2649 | return _core_.Image_SetDataBuffer(*args, **kwargs) |
e811c8ce RD |
2650 | |
2651 | def GetAlphaData(*args, **kwargs): | |
61d07ac7 RD |
2652 | """ |
2653 | GetAlphaData(self) -> PyObject | |
2654 | ||
2655 | Returns a string containing a copy of the alpha bytes of the image. | |
2656 | """ | |
54f9ee45 | 2657 | return _core_.Image_GetAlphaData(*args, **kwargs) |
e811c8ce RD |
2658 | |
2659 | def SetAlphaData(*args, **kwargs): | |
61d07ac7 RD |
2660 | """ |
2661 | SetAlphaData(self, buffer alpha) | |
2662 | ||
2663 | Resets the Image's alpha data from a buffer of bytes. Accepts either | |
2664 | a string or a buffer object holding the data and the length of the | |
2665 | data must be width*height. | |
2666 | """ | |
54f9ee45 | 2667 | return _core_.Image_SetAlphaData(*args, **kwargs) |
e811c8ce RD |
2668 | |
2669 | def GetAlphaBuffer(*args, **kwargs): | |
a95a7133 | 2670 | """GetAlphaBuffer(self) -> PyObject""" |
54f9ee45 | 2671 | return _core_.Image_GetAlphaBuffer(*args, **kwargs) |
e811c8ce RD |
2672 | |
2673 | def SetAlphaBuffer(*args, **kwargs): | |
61d07ac7 | 2674 | """SetAlphaBuffer(self, buffer alpha)""" |
54f9ee45 | 2675 | return _core_.Image_SetAlphaBuffer(*args, **kwargs) |
e811c8ce RD |
2676 | |
2677 | def SetMaskColour(*args, **kwargs): | |
7a27cf7c RD |
2678 | """ |
2679 | SetMaskColour(self, byte r, byte g, byte b) | |
2680 | ||
2681 | Sets the mask colour for this image (and tells the image to use the | |
2682 | mask). | |
2683 | """ | |
54f9ee45 | 2684 | return _core_.Image_SetMaskColour(*args, **kwargs) |
e811c8ce | 2685 | |
aff4cc5c RD |
2686 | def GetOrFindMaskColour(*args, **kwargs): |
2687 | """ | |
2688 | GetOrFindMaskColour() -> (r,g,b) | |
2689 | ||
2690 | Get the current mask colour or find a suitable colour. | |
2691 | """ | |
2692 | return _core_.Image_GetOrFindMaskColour(*args, **kwargs) | |
2693 | ||
e811c8ce | 2694 | def GetMaskRed(*args, **kwargs): |
7a27cf7c RD |
2695 | """ |
2696 | GetMaskRed(self) -> byte | |
2697 | ||
2698 | Gets the red component of the mask colour. | |
2699 | """ | |
54f9ee45 | 2700 | return _core_.Image_GetMaskRed(*args, **kwargs) |
e811c8ce RD |
2701 | |
2702 | def GetMaskGreen(*args, **kwargs): | |
7a27cf7c RD |
2703 | """ |
2704 | GetMaskGreen(self) -> byte | |
2705 | ||
2706 | Gets the green component of the mask colour. | |
2707 | """ | |
54f9ee45 | 2708 | return _core_.Image_GetMaskGreen(*args, **kwargs) |
e811c8ce RD |
2709 | |
2710 | def GetMaskBlue(*args, **kwargs): | |
7a27cf7c RD |
2711 | """ |
2712 | GetMaskBlue(self) -> byte | |
2713 | ||
2714 | Gets the blue component of the mask colour. | |
2715 | """ | |
54f9ee45 | 2716 | return _core_.Image_GetMaskBlue(*args, **kwargs) |
e811c8ce RD |
2717 | |
2718 | def SetMask(*args, **kwargs): | |
7a27cf7c RD |
2719 | """ |
2720 | SetMask(self, bool mask=True) | |
2721 | ||
2722 | Specifies whether there is a mask or not. The area of the mask is | |
2723 | determined by the current mask colour. | |
2724 | """ | |
54f9ee45 | 2725 | return _core_.Image_SetMask(*args, **kwargs) |
e811c8ce RD |
2726 | |
2727 | def HasMask(*args, **kwargs): | |
7a27cf7c RD |
2728 | """ |
2729 | HasMask(self) -> bool | |
2730 | ||
2731 | Returns ``True`` if there is a mask active, ``False`` otherwise. | |
2732 | """ | |
54f9ee45 | 2733 | return _core_.Image_HasMask(*args, **kwargs) |
e811c8ce RD |
2734 | |
2735 | def Rotate(*args, **kwargs): | |
0df68c9f | 2736 | """ |
a95a7133 | 2737 | Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True, |
0df68c9f | 2738 | Point offset_after_rotation=None) -> Image |
7a27cf7c RD |
2739 | |
2740 | Rotates the image about the given point, by ``angle`` radians. Passing | |
2741 | ``True`` to ``interpolating`` results in better image quality, but is | |
2742 | slower. If the image has a mask, then the mask colour is used for the | |
2743 | uncovered pixels in the rotated image background. Otherwise, black | |
2744 | will be used as the fill colour. | |
2745 | ||
2746 | Returns the rotated image, leaving this image intact. | |
0df68c9f | 2747 | """ |
54f9ee45 | 2748 | return _core_.Image_Rotate(*args, **kwargs) |
e811c8ce RD |
2749 | |
2750 | def Rotate90(*args, **kwargs): | |
7a27cf7c RD |
2751 | """ |
2752 | Rotate90(self, bool clockwise=True) -> Image | |
2753 | ||
2754 | Returns a copy of the image rotated 90 degrees in the direction | |
2755 | indicated by ``clockwise``. | |
2756 | """ | |
54f9ee45 | 2757 | return _core_.Image_Rotate90(*args, **kwargs) |
e811c8ce RD |
2758 | |
2759 | def Mirror(*args, **kwargs): | |
7a27cf7c RD |
2760 | """ |
2761 | Mirror(self, bool horizontally=True) -> Image | |
2762 | ||
2763 | Returns a mirrored copy of the image. The parameter ``horizontally`` | |
2764 | indicates the orientation. | |
2765 | """ | |
54f9ee45 | 2766 | return _core_.Image_Mirror(*args, **kwargs) |
e811c8ce RD |
2767 | |
2768 | def Replace(*args, **kwargs): | |
0df68c9f | 2769 | """ |
7a27cf7c RD |
2770 | Replace(self, byte r1, byte g1, byte b1, byte r2, byte g2, byte b2) |
2771 | ||
2772 | Replaces the colour specified by ``(r1,g1,b1)`` by the colour | |
2773 | ``(r2,g2,b2)``. | |
0df68c9f | 2774 | """ |
54f9ee45 | 2775 | return _core_.Image_Replace(*args, **kwargs) |
e811c8ce | 2776 | |
32fe5131 RD |
2777 | def ConvertToGreyscale(*args, **kwargs): |
2778 | """ | |
2779 | ConvertToGreyscale(self, double lr=0.299, double lg=0.587, double lb=0.114) -> Image | |
2780 | ||
2781 | Convert to greyscale image. Uses the luminance component (Y) of the | |
2782 | image. The luma value (YUV) is calculated using (R * lr) + (G * lg) + (B * lb), | |
2783 | defaults to ITU-T BT.601 | |
2784 | """ | |
2785 | return _core_.Image_ConvertToGreyscale(*args, **kwargs) | |
2786 | ||
e811c8ce | 2787 | def ConvertToMono(*args, **kwargs): |
7a27cf7c RD |
2788 | """ |
2789 | ConvertToMono(self, byte r, byte g, byte b) -> Image | |
2790 | ||
2791 | Returns monochromatic version of the image. The returned image has | |
2792 | white colour where the original has ``(r,g,b)`` colour and black | |
2793 | colour everywhere else. | |
2794 | """ | |
54f9ee45 | 2795 | return _core_.Image_ConvertToMono(*args, **kwargs) |
e811c8ce RD |
2796 | |
2797 | def SetOption(*args, **kwargs): | |
7a27cf7c RD |
2798 | """ |
2799 | SetOption(self, String name, String value) | |
2800 | ||
2801 | Sets an image handler defined option. For example, when saving as a | |
2802 | JPEG file, the option ``wx.IMAGE_OPTION_QUALITY`` is used, which is a | |
2803 | number between 0 and 100 (0 is terrible, 100 is very good). | |
2804 | """ | |
54f9ee45 | 2805 | return _core_.Image_SetOption(*args, **kwargs) |
e811c8ce RD |
2806 | |
2807 | def SetOptionInt(*args, **kwargs): | |
7a27cf7c RD |
2808 | """ |
2809 | SetOptionInt(self, String name, int value) | |
2810 | ||
2811 | Sets an image option as an integer. | |
2812 | """ | |
54f9ee45 | 2813 | return _core_.Image_SetOptionInt(*args, **kwargs) |
e811c8ce RD |
2814 | |
2815 | def GetOption(*args, **kwargs): | |
7a27cf7c RD |
2816 | """ |
2817 | GetOption(self, String name) -> String | |
2818 | ||
2819 | Gets the value of an image handler option. | |
2820 | """ | |
54f9ee45 | 2821 | return _core_.Image_GetOption(*args, **kwargs) |
e811c8ce RD |
2822 | |
2823 | def GetOptionInt(*args, **kwargs): | |
7a27cf7c RD |
2824 | """ |
2825 | GetOptionInt(self, String name) -> int | |
2826 | ||
2827 | Gets the value of an image handler option as an integer. If the given | |
2828 | option is not present, the function returns 0. | |
2829 | """ | |
54f9ee45 | 2830 | return _core_.Image_GetOptionInt(*args, **kwargs) |
e811c8ce RD |
2831 | |
2832 | def HasOption(*args, **kwargs): | |
7a27cf7c RD |
2833 | """ |
2834 | HasOption(self, String name) -> bool | |
2835 | ||
2836 | Returns true if the given option is present. | |
2837 | """ | |
54f9ee45 | 2838 | return _core_.Image_HasOption(*args, **kwargs) |
e811c8ce RD |
2839 | |
2840 | def CountColours(*args, **kwargs): | |
a95a7133 | 2841 | """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long""" |
54f9ee45 | 2842 | return _core_.Image_CountColours(*args, **kwargs) |
e811c8ce RD |
2843 | |
2844 | def ComputeHistogram(*args, **kwargs): | |
a95a7133 | 2845 | """ComputeHistogram(self, ImageHistogram h) -> unsigned long""" |
54f9ee45 | 2846 | return _core_.Image_ComputeHistogram(*args, **kwargs) |
e811c8ce RD |
2847 | |
2848 | def AddHandler(*args, **kwargs): | |
66c033b4 | 2849 | """AddHandler(ImageHandler handler)""" |
54f9ee45 | 2850 | return _core_.Image_AddHandler(*args, **kwargs) |
e811c8ce RD |
2851 | |
2852 | AddHandler = staticmethod(AddHandler) | |
2853 | def InsertHandler(*args, **kwargs): | |
66c033b4 | 2854 | """InsertHandler(ImageHandler handler)""" |
54f9ee45 | 2855 | return _core_.Image_InsertHandler(*args, **kwargs) |
e811c8ce RD |
2856 | |
2857 | InsertHandler = staticmethod(InsertHandler) | |
2858 | def RemoveHandler(*args, **kwargs): | |
66c033b4 | 2859 | """RemoveHandler(String name) -> bool""" |
54f9ee45 | 2860 | return _core_.Image_RemoveHandler(*args, **kwargs) |
e811c8ce RD |
2861 | |
2862 | RemoveHandler = staticmethod(RemoveHandler) | |
0085ce49 RD |
2863 | def GetHandlers(*args, **kwargs): |
2864 | """GetHandlers() -> PyObject""" | |
2865 | return _core_.Image_GetHandlers(*args, **kwargs) | |
2866 | ||
2867 | GetHandlers = staticmethod(GetHandlers) | |
e811c8ce | 2868 | def GetImageExtWildcard(*args, **kwargs): |
7a27cf7c RD |
2869 | """ |
2870 | GetImageExtWildcard() -> String | |
2871 | ||
2872 | Iterates all registered wxImageHandler objects, and returns a string | |
2873 | containing file extension masks suitable for passing to file open/save | |
2874 | dialog boxes. | |
2875 | """ | |
54f9ee45 | 2876 | return _core_.Image_GetImageExtWildcard(*args, **kwargs) |
e811c8ce RD |
2877 | |
2878 | GetImageExtWildcard = staticmethod(GetImageExtWildcard) | |
2879 | def ConvertToBitmap(*args, **kwargs): | |
1fbf26be | 2880 | """ConvertToBitmap(self, int depth=-1) -> Bitmap""" |
54f9ee45 | 2881 | return _core_.Image_ConvertToBitmap(*args, **kwargs) |
e811c8ce RD |
2882 | |
2883 | def ConvertToMonoBitmap(*args, **kwargs): | |
7a27cf7c | 2884 | """ConvertToMonoBitmap(self, byte red, byte green, byte blue) -> Bitmap""" |
54f9ee45 | 2885 | return _core_.Image_ConvertToMonoBitmap(*args, **kwargs) |
e811c8ce | 2886 | |
943e8dfd RD |
2887 | def RotateHue(*args, **kwargs): |
2888 | """ | |
2889 | RotateHue(self, double angle) | |
2890 | ||
2891 | Rotates the hue of each pixel of the image. Hue is a double in the | |
2892 | range -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees | |
2893 | """ | |
2894 | return _core_.Image_RotateHue(*args, **kwargs) | |
2895 | ||
2896 | def RGBtoHSV(*args, **kwargs): | |
2897 | """ | |
2898 | RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue | |
2899 | ||
2900 | Converts a color in RGB color space to HSV color space. | |
2901 | """ | |
2902 | return _core_.Image_RGBtoHSV(*args, **kwargs) | |
2903 | ||
2904 | RGBtoHSV = staticmethod(RGBtoHSV) | |
2905 | def HSVtoRGB(*args, **kwargs): | |
2906 | """ | |
2907 | HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue | |
2908 | ||
2909 | Converts a color in HSV color space to RGB color space. | |
2910 | """ | |
2911 | return _core_.Image_HSVtoRGB(*args, **kwargs) | |
2912 | ||
2913 | HSVtoRGB = staticmethod(HSVtoRGB) | |
e811c8ce | 2914 | def __nonzero__(self): return self.Ok() |
0085ce49 RD |
2915 | Image_swigregister = _core_.Image_swigregister |
2916 | Image_swigregister(Image) | |
d14a1e28 RD |
2917 | |
2918 | def ImageFromMime(*args, **kwargs): | |
7a27cf7c RD |
2919 | """ |
2920 | ImageFromMime(String name, String mimetype, int index=-1) -> Image | |
2921 | ||
2922 | Loads an image from a file, using a MIME type string (such as | |
2923 | 'image/jpeg') to specify image type. | |
2924 | """ | |
54f9ee45 | 2925 | val = _core_.new_ImageFromMime(*args, **kwargs) |
d14a1e28 RD |
2926 | return val |
2927 | ||
2928 | def ImageFromStream(*args, **kwargs): | |
7a27cf7c RD |
2929 | """ |
2930 | ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image | |
2931 | ||
2932 | Loads an image from an input stream, or any readable Python file-like | |
2933 | object. | |
2934 | """ | |
54f9ee45 | 2935 | val = _core_.new_ImageFromStream(*args, **kwargs) |
d14a1e28 RD |
2936 | return val |
2937 | ||
2938 | def ImageFromStreamMime(*args, **kwargs): | |
7a27cf7c RD |
2939 | """ |
2940 | ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image | |
2941 | ||
2942 | Loads an image from an input stream, or any readable Python file-like | |
2943 | object, specifying the image format with a MIME type string. | |
2944 | """ | |
54f9ee45 | 2945 | val = _core_.new_ImageFromStreamMime(*args, **kwargs) |
d14a1e28 RD |
2946 | return val |
2947 | ||
66c033b4 | 2948 | def EmptyImage(*args, **kwargs): |
61d07ac7 RD |
2949 | """ |
2950 | EmptyImage(int width=0, int height=0, bool clear=True) -> Image | |
2951 | ||
2952 | Construct an empty image of a given size, optionally setting all | |
2953 | pixels to black. | |
2954 | """ | |
66c033b4 | 2955 | val = _core_.new_EmptyImage(*args, **kwargs) |
d14a1e28 RD |
2956 | return val |
2957 | ||
2958 | def ImageFromBitmap(*args, **kwargs): | |
61d07ac7 RD |
2959 | """ |
2960 | ImageFromBitmap(Bitmap bitmap) -> Image | |
2961 | ||
2962 | Construct an Image from a `wx.Bitmap`. | |
2963 | """ | |
54f9ee45 | 2964 | val = _core_.new_ImageFromBitmap(*args, **kwargs) |
d14a1e28 RD |
2965 | return val |
2966 | ||
2967 | def ImageFromData(*args, **kwargs): | |
61d07ac7 RD |
2968 | """ |
2969 | ImageFromData(int width, int height, buffer data) -> Image | |
2970 | ||
2971 | Construct an Image from a buffer of RGB bytes. Accepts either a | |
2972 | string or a buffer object holding the data and the length of the data | |
2973 | must be width*height*3. | |
2974 | """ | |
54f9ee45 | 2975 | val = _core_.new_ImageFromData(*args, **kwargs) |
d14a1e28 RD |
2976 | return val |
2977 | ||
1823fbb4 | 2978 | def ImageFromDataWithAlpha(*args, **kwargs): |
61d07ac7 RD |
2979 | """ |
2980 | ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image | |
2981 | ||
2982 | Construct an Image from a buffer of RGB bytes with an Alpha channel. | |
2983 | Accepts either a string or a buffer object holding the data and the | |
7a27cf7c RD |
2984 | length of the data must be width*height*3 bytes, and the length of the |
2985 | alpha data must be width*height bytes. | |
61d07ac7 | 2986 | """ |
1823fbb4 | 2987 | val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs) |
1823fbb4 RD |
2988 | return val |
2989 | ||
e811c8ce | 2990 | def Image_CanRead(*args, **kwargs): |
0085ce49 | 2991 | """ |
7a27cf7c RD |
2992 | Image_CanRead(String filename) -> bool |
2993 | ||
2994 | Returns True if the image handlers can read this file. | |
2995 | """ | |
0085ce49 | 2996 | return _core_.Image_CanRead(*args, **kwargs) |
d14a1e28 | 2997 | |
e811c8ce | 2998 | def Image_GetImageCount(*args, **kwargs): |
0085ce49 | 2999 | """ |
7a27cf7c RD |
3000 | Image_GetImageCount(String filename, long type=BITMAP_TYPE_ANY) -> int |
3001 | ||
3002 | If the image file contains more than one image and the image handler | |
3003 | is capable of retrieving these individually, this function will return | |
3004 | the number of available images. | |
3005 | """ | |
0085ce49 | 3006 | return _core_.Image_GetImageCount(*args, **kwargs) |
d14a1e28 | 3007 | |
e811c8ce | 3008 | def Image_CanReadStream(*args, **kwargs): |
0085ce49 | 3009 | """ |
7a27cf7c RD |
3010 | Image_CanReadStream(InputStream stream) -> bool |
3011 | ||
3012 | Returns True if the image handlers can read an image file from the | |
3013 | data currently on the input stream, or a readable Python file-like | |
3014 | object. | |
3015 | """ | |
0085ce49 | 3016 | return _core_.Image_CanReadStream(*args, **kwargs) |
d14a1e28 | 3017 | |
e811c8ce | 3018 | def Image_AddHandler(*args, **kwargs): |
0085ce49 RD |
3019 | """Image_AddHandler(ImageHandler handler)""" |
3020 | return _core_.Image_AddHandler(*args, **kwargs) | |
d14a1e28 | 3021 | |
e811c8ce | 3022 | def Image_InsertHandler(*args, **kwargs): |
0085ce49 RD |
3023 | """Image_InsertHandler(ImageHandler handler)""" |
3024 | return _core_.Image_InsertHandler(*args, **kwargs) | |
d14a1e28 | 3025 | |
e811c8ce | 3026 | def Image_RemoveHandler(*args, **kwargs): |
0085ce49 RD |
3027 | """Image_RemoveHandler(String name) -> bool""" |
3028 | return _core_.Image_RemoveHandler(*args, **kwargs) | |
d14a1e28 | 3029 | |
0085ce49 RD |
3030 | def Image_GetHandlers(*args): |
3031 | """Image_GetHandlers() -> PyObject""" | |
3032 | return _core_.Image_GetHandlers(*args) | |
3033 | ||
3034 | def Image_GetImageExtWildcard(*args): | |
3035 | """ | |
7a27cf7c RD |
3036 | Image_GetImageExtWildcard() -> String |
3037 | ||
3038 | Iterates all registered wxImageHandler objects, and returns a string | |
3039 | containing file extension masks suitable for passing to file open/save | |
3040 | dialog boxes. | |
3041 | """ | |
0085ce49 | 3042 | return _core_.Image_GetImageExtWildcard(*args) |
d14a1e28 | 3043 | |
943e8dfd | 3044 | def Image_RGBtoHSV(*args, **kwargs): |
0085ce49 | 3045 | """ |
943e8dfd RD |
3046 | Image_RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue |
3047 | ||
3048 | Converts a color in RGB color space to HSV color space. | |
3049 | """ | |
0085ce49 | 3050 | return _core_.Image_RGBtoHSV(*args, **kwargs) |
943e8dfd RD |
3051 | |
3052 | def Image_HSVtoRGB(*args, **kwargs): | |
0085ce49 | 3053 | """ |
943e8dfd RD |
3054 | Image_HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue |
3055 | ||
3056 | Converts a color in HSV color space to RGB color space. | |
3057 | """ | |
0085ce49 | 3058 | return _core_.Image_HSVtoRGB(*args, **kwargs) |
943e8dfd | 3059 | |
5e4ca4a8 RD |
3060 | def InitAllImageHandlers(): |
3061 | """ | |
3062 | The former functionality of InitAllImageHanders is now done internal to | |
3063 | the _core_ extension module and so this function has become a simple NOP. | |
3064 | """ | |
3065 | pass | |
d14a1e28 | 3066 | |
54f9ee45 RD |
3067 | IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES |
3068 | IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM | |
b9d6a5f3 RD |
3069 | PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR |
3070 | PNG_TYPE_GREY = _core_.PNG_TYPE_GREY | |
3071 | PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED | |
54f9ee45 RD |
3072 | BMP_24BPP = _core_.BMP_24BPP |
3073 | BMP_8BPP = _core_.BMP_8BPP | |
3074 | BMP_8BPP_GREY = _core_.BMP_8BPP_GREY | |
3075 | BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY | |
3076 | BMP_8BPP_RED = _core_.BMP_8BPP_RED | |
3077 | BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE | |
3078 | BMP_4BPP = _core_.BMP_4BPP | |
3079 | BMP_1BPP = _core_.BMP_1BPP | |
3080 | BMP_1BPP_BW = _core_.BMP_1BPP_BW | |
d14a1e28 | 3081 | class BMPHandler(ImageHandler): |
27fb7603 | 3082 | """A `wx.ImageHandler` for \*.bmp bitmap files.""" |
0085ce49 RD |
3083 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3084 | __repr__ = _swig_repr | |
3085 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3086 | """ |
3087 | __init__(self) -> BMPHandler | |
3088 | ||
3089 | A `wx.ImageHandler` for \*.bmp bitmap files. | |
3090 | """ | |
0085ce49 RD |
3091 | _core_.BMPHandler_swiginit(self,_core_.new_BMPHandler(*args, **kwargs)) |
3092 | BMPHandler_swigregister = _core_.BMPHandler_swigregister | |
3093 | BMPHandler_swigregister(BMPHandler) | |
d14a1e28 | 3094 | NullImage = cvar.NullImage |
0c243d93 | 3095 | IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME |
d14a1e28 RD |
3096 | IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT |
3097 | IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X | |
3098 | IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y | |
3099 | IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION | |
0c243d93 RD |
3100 | IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX |
3101 | IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY | |
d14a1e28 | 3102 | IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT |
24d7cbea | 3103 | IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY |
0c243d93 RD |
3104 | IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE |
3105 | IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL | |
3106 | IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION | |
3107 | IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR | |
b9d6a5f3 RD |
3108 | IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT |
3109 | IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH | |
d14a1e28 RD |
3110 | |
3111 | class ICOHandler(BMPHandler): | |
27fb7603 | 3112 | """A `wx.ImageHandler` for \*.ico icon files.""" |
0085ce49 RD |
3113 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3114 | __repr__ = _swig_repr | |
3115 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3116 | """ |
3117 | __init__(self) -> ICOHandler | |
3118 | ||
3119 | A `wx.ImageHandler` for \*.ico icon files. | |
3120 | """ | |
0085ce49 RD |
3121 | _core_.ICOHandler_swiginit(self,_core_.new_ICOHandler(*args, **kwargs)) |
3122 | ICOHandler_swigregister = _core_.ICOHandler_swigregister | |
3123 | ICOHandler_swigregister(ICOHandler) | |
d14a1e28 RD |
3124 | |
3125 | class CURHandler(ICOHandler): | |
27fb7603 | 3126 | """A `wx.ImageHandler` for \*.cur cursor files.""" |
0085ce49 RD |
3127 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3128 | __repr__ = _swig_repr | |
3129 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3130 | """ |
3131 | __init__(self) -> CURHandler | |
3132 | ||
3133 | A `wx.ImageHandler` for \*.cur cursor files. | |
3134 | """ | |
0085ce49 RD |
3135 | _core_.CURHandler_swiginit(self,_core_.new_CURHandler(*args, **kwargs)) |
3136 | CURHandler_swigregister = _core_.CURHandler_swigregister | |
3137 | CURHandler_swigregister(CURHandler) | |
d14a1e28 RD |
3138 | |
3139 | class ANIHandler(CURHandler): | |
27fb7603 | 3140 | """A `wx.ImageHandler` for \*.ani animated cursor files.""" |
0085ce49 RD |
3141 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3142 | __repr__ = _swig_repr | |
3143 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3144 | """ |
3145 | __init__(self) -> ANIHandler | |
3146 | ||
3147 | A `wx.ImageHandler` for \*.ani animated cursor files. | |
3148 | """ | |
0085ce49 RD |
3149 | _core_.ANIHandler_swiginit(self,_core_.new_ANIHandler(*args, **kwargs)) |
3150 | ANIHandler_swigregister = _core_.ANIHandler_swigregister | |
3151 | ANIHandler_swigregister(ANIHandler) | |
d14a1e28 RD |
3152 | |
3153 | class PNGHandler(ImageHandler): | |
27fb7603 | 3154 | """A `wx.ImageHandler` for PNG image files.""" |
0085ce49 RD |
3155 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3156 | __repr__ = _swig_repr | |
3157 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3158 | """ |
3159 | __init__(self) -> PNGHandler | |
3160 | ||
3161 | A `wx.ImageHandler` for PNG image files. | |
3162 | """ | |
0085ce49 RD |
3163 | _core_.PNGHandler_swiginit(self,_core_.new_PNGHandler(*args, **kwargs)) |
3164 | PNGHandler_swigregister = _core_.PNGHandler_swigregister | |
3165 | PNGHandler_swigregister(PNGHandler) | |
d14a1e28 RD |
3166 | |
3167 | class GIFHandler(ImageHandler): | |
27fb7603 | 3168 | """A `wx.ImageHandler` for GIF image files.""" |
0085ce49 RD |
3169 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3170 | __repr__ = _swig_repr | |
3171 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3172 | """ |
3173 | __init__(self) -> GIFHandler | |
3174 | ||
3175 | A `wx.ImageHandler` for GIF image files. | |
3176 | """ | |
0085ce49 RD |
3177 | _core_.GIFHandler_swiginit(self,_core_.new_GIFHandler(*args, **kwargs)) |
3178 | GIFHandler_swigregister = _core_.GIFHandler_swigregister | |
3179 | GIFHandler_swigregister(GIFHandler) | |
d14a1e28 RD |
3180 | |
3181 | class PCXHandler(ImageHandler): | |
27fb7603 | 3182 | """A `wx.ImageHandler` for PCX imager files.""" |
0085ce49 RD |
3183 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3184 | __repr__ = _swig_repr | |
3185 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3186 | """ |
3187 | __init__(self) -> PCXHandler | |
3188 | ||
3189 | A `wx.ImageHandler` for PCX imager files. | |
3190 | """ | |
0085ce49 RD |
3191 | _core_.PCXHandler_swiginit(self,_core_.new_PCXHandler(*args, **kwargs)) |
3192 | PCXHandler_swigregister = _core_.PCXHandler_swigregister | |
3193 | PCXHandler_swigregister(PCXHandler) | |
d14a1e28 RD |
3194 | |
3195 | class JPEGHandler(ImageHandler): | |
27fb7603 | 3196 | """A `wx.ImageHandler` for JPEG/JPG image files.""" |
0085ce49 RD |
3197 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3198 | __repr__ = _swig_repr | |
3199 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3200 | """ |
3201 | __init__(self) -> JPEGHandler | |
3202 | ||
3203 | A `wx.ImageHandler` for JPEG/JPG image files. | |
3204 | """ | |
0085ce49 RD |
3205 | _core_.JPEGHandler_swiginit(self,_core_.new_JPEGHandler(*args, **kwargs)) |
3206 | JPEGHandler_swigregister = _core_.JPEGHandler_swigregister | |
3207 | JPEGHandler_swigregister(JPEGHandler) | |
d14a1e28 RD |
3208 | |
3209 | class PNMHandler(ImageHandler): | |
27fb7603 | 3210 | """A `wx.ImageHandler` for PNM image files.""" |
0085ce49 RD |
3211 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3212 | __repr__ = _swig_repr | |
3213 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3214 | """ |
3215 | __init__(self) -> PNMHandler | |
3216 | ||
3217 | A `wx.ImageHandler` for PNM image files. | |
3218 | """ | |
0085ce49 RD |
3219 | _core_.PNMHandler_swiginit(self,_core_.new_PNMHandler(*args, **kwargs)) |
3220 | PNMHandler_swigregister = _core_.PNMHandler_swigregister | |
3221 | PNMHandler_swigregister(PNMHandler) | |
d14a1e28 RD |
3222 | |
3223 | class XPMHandler(ImageHandler): | |
27fb7603 | 3224 | """A `wx.ImageHandler` for XPM image.""" |
0085ce49 RD |
3225 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3226 | __repr__ = _swig_repr | |
3227 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3228 | """ |
3229 | __init__(self) -> XPMHandler | |
3230 | ||
3231 | A `wx.ImageHandler` for XPM image. | |
3232 | """ | |
0085ce49 RD |
3233 | _core_.XPMHandler_swiginit(self,_core_.new_XPMHandler(*args, **kwargs)) |
3234 | XPMHandler_swigregister = _core_.XPMHandler_swigregister | |
3235 | XPMHandler_swigregister(XPMHandler) | |
d14a1e28 RD |
3236 | |
3237 | class TIFFHandler(ImageHandler): | |
27fb7603 | 3238 | """A `wx.ImageHandler` for TIFF image files.""" |
0085ce49 RD |
3239 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3240 | __repr__ = _swig_repr | |
3241 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3242 | """ |
3243 | __init__(self) -> TIFFHandler | |
3244 | ||
3245 | A `wx.ImageHandler` for TIFF image files. | |
3246 | """ | |
0085ce49 RD |
3247 | _core_.TIFFHandler_swiginit(self,_core_.new_TIFFHandler(*args, **kwargs)) |
3248 | TIFFHandler_swigregister = _core_.TIFFHandler_swigregister | |
3249 | TIFFHandler_swigregister(TIFFHandler) | |
d14a1e28 | 3250 | |
c0de73ae RD |
3251 | QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS |
3252 | QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE | |
3253 | class Quantize(object): | |
3254 | """Performs quantization, or colour reduction, on a wxImage.""" | |
0085ce49 RD |
3255 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3256 | def __init__(self): raise AttributeError, "No constructor defined" | |
3257 | __repr__ = _swig_repr | |
c0de73ae RD |
3258 | def Quantize(*args, **kwargs): |
3259 | """ | |
3260 | Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool | |
3261 | ||
3262 | Reduce the colours in the source image and put the result into the | |
3263 | destination image, setting the palette in the destination if | |
3264 | needed. Both images may be the same, to overwrite the source image. | |
3265 | """ | |
3266 | return _core_.Quantize_Quantize(*args, **kwargs) | |
3267 | ||
3268 | Quantize = staticmethod(Quantize) | |
0085ce49 RD |
3269 | Quantize_swigregister = _core_.Quantize_swigregister |
3270 | Quantize_swigregister(Quantize) | |
c0de73ae RD |
3271 | |
3272 | def Quantize_Quantize(*args, **kwargs): | |
0085ce49 | 3273 | """ |
c0de73ae RD |
3274 | Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool |
3275 | ||
3276 | Reduce the colours in the source image and put the result into the | |
3277 | destination image, setting the palette in the destination if | |
3278 | needed. Both images may be the same, to overwrite the source image. | |
3279 | """ | |
0085ce49 | 3280 | return _core_.Quantize_Quantize(*args, **kwargs) |
c0de73ae | 3281 | |
d14a1e28 RD |
3282 | #--------------------------------------------------------------------------- |
3283 | ||
3284 | class EvtHandler(Object): | |
093d3ff1 | 3285 | """Proxy of C++ EvtHandler class""" |
0085ce49 RD |
3286 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3287 | __repr__ = _swig_repr | |
3288 | def __init__(self, *args, **kwargs): | |
a95a7133 | 3289 | """__init__(self) -> EvtHandler""" |
0085ce49 | 3290 | _core_.EvtHandler_swiginit(self,_core_.new_EvtHandler(*args, **kwargs)) |
e811c8ce | 3291 | def GetNextHandler(*args, **kwargs): |
a95a7133 | 3292 | """GetNextHandler(self) -> EvtHandler""" |
54f9ee45 | 3293 | return _core_.EvtHandler_GetNextHandler(*args, **kwargs) |
e811c8ce RD |
3294 | |
3295 | def GetPreviousHandler(*args, **kwargs): | |
a95a7133 | 3296 | """GetPreviousHandler(self) -> EvtHandler""" |
54f9ee45 | 3297 | return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs) |
e811c8ce RD |
3298 | |
3299 | def SetNextHandler(*args, **kwargs): | |
a95a7133 | 3300 | """SetNextHandler(self, EvtHandler handler)""" |
54f9ee45 | 3301 | return _core_.EvtHandler_SetNextHandler(*args, **kwargs) |
e811c8ce RD |
3302 | |
3303 | def SetPreviousHandler(*args, **kwargs): | |
a95a7133 | 3304 | """SetPreviousHandler(self, EvtHandler handler)""" |
54f9ee45 | 3305 | return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs) |
e811c8ce RD |
3306 | |
3307 | def GetEvtHandlerEnabled(*args, **kwargs): | |
a95a7133 | 3308 | """GetEvtHandlerEnabled(self) -> bool""" |
54f9ee45 | 3309 | return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs) |
e811c8ce RD |
3310 | |
3311 | def SetEvtHandlerEnabled(*args, **kwargs): | |
a95a7133 | 3312 | """SetEvtHandlerEnabled(self, bool enabled)""" |
54f9ee45 | 3313 | return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs) |
e811c8ce RD |
3314 | |
3315 | def ProcessEvent(*args, **kwargs): | |
a95a7133 | 3316 | """ProcessEvent(self, Event event) -> bool""" |
54f9ee45 | 3317 | return _core_.EvtHandler_ProcessEvent(*args, **kwargs) |
e811c8ce RD |
3318 | |
3319 | def AddPendingEvent(*args, **kwargs): | |
a95a7133 | 3320 | """AddPendingEvent(self, Event event)""" |
54f9ee45 | 3321 | return _core_.EvtHandler_AddPendingEvent(*args, **kwargs) |
e811c8ce RD |
3322 | |
3323 | def ProcessPendingEvents(*args, **kwargs): | |
a95a7133 | 3324 | """ProcessPendingEvents(self)""" |
54f9ee45 | 3325 | return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs) |
e811c8ce RD |
3326 | |
3327 | def Connect(*args, **kwargs): | |
a95a7133 | 3328 | """Connect(self, int id, int lastId, int eventType, PyObject func)""" |
54f9ee45 | 3329 | return _core_.EvtHandler_Connect(*args, **kwargs) |
e811c8ce RD |
3330 | |
3331 | def Disconnect(*args, **kwargs): | |
a95a7133 | 3332 | """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool""" |
54f9ee45 | 3333 | return _core_.EvtHandler_Disconnect(*args, **kwargs) |
e811c8ce RD |
3334 | |
3335 | def _setOORInfo(*args, **kwargs): | |
689b42ee | 3336 | """_setOORInfo(self, PyObject _self, bool incref=True)""" |
7e08d4ef RD |
3337 | val = _core_.EvtHandler__setOORInfo(*args, **kwargs) |
3338 | args[0].thisown = 0 | |
3339 | return val | |
e811c8ce | 3340 | |
d14a1e28 RD |
3341 | def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
3342 | """ | |
3343 | Bind an event to an event handler. | |
3344 | ||
db3e571a RD |
3345 | :param event: One of the EVT_* objects that specifies the |
3346 | type of event to bind, | |
d14a1e28 | 3347 | |
db3e571a RD |
3348 | :param handler: A callable object to be invoked when the |
3349 | event is delivered to self. Pass None to | |
3350 | disconnect an event handler. | |
d14a1e28 | 3351 | |
db3e571a RD |
3352 | :param source: Sometimes the event originates from a |
3353 | different window than self, but you still | |
3354 | want to catch it in self. (For example, a | |
3355 | button event delivered to a frame.) By | |
3356 | passing the source of the event, the event | |
3357 | handling system is able to differentiate | |
3358 | between the same event type from different | |
3359 | controls. | |
d14a1e28 | 3360 | |
db3e571a RD |
3361 | :param id: Used to spcify the event source by ID instead |
3362 | of instance. | |
3363 | ||
3364 | :param id2: Used when it is desirable to bind a handler | |
3365 | to a range of IDs, such as with EVT_MENU_RANGE. | |
d14a1e28 RD |
3366 | """ |
3367 | if source is not None: | |
3368 | id = source.GetId() | |
3369 | event.Bind(self, id, id2, handler) | |
3370 | ||
66c033b4 RD |
3371 | def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
3372 | """ | |
3373 | Disconencts the event handler binding for event from self. | |
3374 | Returns True if successful. | |
3375 | """ | |
3376 | if source is not None: | |
3377 | id = source.GetId() | |
3378 | return event.Unbind(self, id, id2) | |
d14a1e28 | 3379 | |
0085ce49 RD |
3380 | EvtHandler_swigregister = _core_.EvtHandler_swigregister |
3381 | EvtHandler_swigregister(EvtHandler) | |
d14a1e28 RD |
3382 | |
3383 | #--------------------------------------------------------------------------- | |
3384 | ||
3385 | class PyEventBinder(object): | |
3386 | """ | |
3387 | Instances of this class are used to bind specific events to event | |
3388 | handlers. | |
3389 | """ | |
3390 | def __init__(self, evtType, expectedIDs=0): | |
3391 | if expectedIDs not in [0, 1, 2]: | |
3392 | raise ValueError, "Invalid number of expectedIDs" | |
3393 | self.expectedIDs = expectedIDs | |
3394 | ||
3395 | if type(evtType) == list or type(evtType) == tuple: | |
3396 | self.evtType = evtType | |
3397 | else: | |
3398 | self.evtType = [evtType] | |
3399 | ||
3400 | ||
3401 | def Bind(self, target, id1, id2, function): | |
3402 | """Bind this set of event types to target.""" | |
3403 | for et in self.evtType: | |
3404 | target.Connect(id1, id2, et, function) | |
3405 | ||
66c033b4 RD |
3406 | |
3407 | def Unbind(self, target, id1, id2): | |
3408 | """Remove an event binding.""" | |
3409 | success = 0 | |
3410 | for et in self.evtType: | |
3411 | success += target.Disconnect(id1, id2, et) | |
3412 | return success != 0 | |
3413 | ||
d14a1e28 RD |
3414 | |
3415 | def __call__(self, *args): | |
3416 | """ | |
3417 | For backwards compatibility with the old EVT_* functions. | |
3418 | Should be called with either (window, func), (window, ID, | |
3419 | func) or (window, ID1, ID2, func) parameters depending on the | |
3420 | type of the event. | |
3421 | """ | |
3422 | assert len(args) == 2 + self.expectedIDs | |
3423 | id1 = wx.ID_ANY | |
3424 | id2 = wx.ID_ANY | |
3425 | target = args[0] | |
3426 | if self.expectedIDs == 0: | |
3427 | func = args[1] | |
3428 | elif self.expectedIDs == 1: | |
3429 | id1 = args[1] | |
3430 | func = args[2] | |
3431 | elif self.expectedIDs == 2: | |
3432 | id1 = args[1] | |
3433 | id2 = args[2] | |
3434 | func = args[3] | |
3435 | else: | |
3436 | raise ValueError, "Unexpected number of IDs" | |
3437 | ||
3438 | self.Bind(target, id1, id2, func) | |
3439 | ||
3440 | ||
3441 | # These two are square pegs that don't fit the PyEventBinder hole... | |
3442 | def EVT_COMMAND(win, id, cmd, func): | |
3443 | win.Connect(id, -1, cmd, func) | |
3444 | def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): | |
3445 | win.Connect(id1, id2, cmd, func) | |
3446 | ||
3447 | ||
3448 | #--------------------------------------------------------------------------- | |
3449 | ||
3450 | #--------------------------------------------------------------------------- | |
3451 | ||
54f9ee45 RD |
3452 | EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE |
3453 | EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX | |
d14a1e28 | 3454 | |
0085ce49 RD |
3455 | def NewEventType(*args): |
3456 | """NewEventType() -> wxEventType""" | |
3457 | return _core_.NewEventType(*args) | |
54f9ee45 RD |
3458 | wxEVT_NULL = _core_.wxEVT_NULL |
3459 | wxEVT_FIRST = _core_.wxEVT_FIRST | |
3460 | wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST | |
3461 | wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED | |
3462 | wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED | |
3463 | wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED | |
3464 | wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED | |
3465 | wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED | |
3466 | wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED | |
3467 | wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED | |
3468 | wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED | |
3469 | wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED | |
3470 | wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED | |
3471 | wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED | |
3472 | wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED | |
3473 | wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED | |
3474 | wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED | |
3475 | wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED | |
3476 | wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER | |
3477 | wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN | |
3478 | wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP | |
3479 | wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN | |
3480 | wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP | |
3481 | wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN | |
3482 | wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP | |
3483 | wxEVT_MOTION = _core_.wxEVT_MOTION | |
3484 | wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW | |
3485 | wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW | |
3486 | wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK | |
3487 | wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK | |
3488 | wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK | |
3489 | wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS | |
3490 | wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS | |
3491 | wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS | |
3492 | wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL | |
3493 | wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN | |
3494 | wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP | |
3495 | wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN | |
3496 | wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP | |
3497 | wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN | |
3498 | wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP | |
3499 | wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION | |
3500 | wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW | |
3501 | wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW | |
3502 | wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK | |
3503 | wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK | |
3504 | wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK | |
3505 | wxEVT_CHAR = _core_.wxEVT_CHAR | |
3506 | wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK | |
3507 | wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY | |
3508 | wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN | |
3509 | wxEVT_KEY_UP = _core_.wxEVT_KEY_UP | |
3510 | wxEVT_HOTKEY = _core_.wxEVT_HOTKEY | |
3511 | wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR | |
3512 | wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP | |
3513 | wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM | |
3514 | wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP | |
3515 | wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN | |
3516 | wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP | |
3517 | wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN | |
3518 | wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK | |
3519 | wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE | |
4f433fef RD |
3520 | wxEVT_SCROLL_CHANGED = _core_.wxEVT_SCROLL_CHANGED |
3521 | wxEVT_SCROLL_ENDSCROLL = wxEVT_SCROLL_CHANGED | |
54f9ee45 RD |
3522 | wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP |
3523 | wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM | |
3524 | wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP | |
3525 | wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN | |
3526 | wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP | |
3527 | wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN | |
3528 | wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK | |
3529 | wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE | |
3530 | wxEVT_SIZE = _core_.wxEVT_SIZE | |
3531 | wxEVT_MOVE = _core_.wxEVT_MOVE | |
3532 | wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW | |
3533 | wxEVT_END_SESSION = _core_.wxEVT_END_SESSION | |
3534 | wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION | |
3535 | wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP | |
3536 | wxEVT_POWER = _core_.wxEVT_POWER | |
3537 | wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE | |
3538 | wxEVT_CREATE = _core_.wxEVT_CREATE | |
3539 | wxEVT_DESTROY = _core_.wxEVT_DESTROY | |
3540 | wxEVT_SHOW = _core_.wxEVT_SHOW | |
3541 | wxEVT_ICONIZE = _core_.wxEVT_ICONIZE | |
3542 | wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE | |
3543 | wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED | |
3544 | wxEVT_PAINT = _core_.wxEVT_PAINT | |
3545 | wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND | |
3546 | wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT | |
3547 | wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON | |
3548 | wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN | |
3549 | wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE | |
3550 | wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT | |
3551 | wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU | |
3552 | wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED | |
3553 | wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED | |
3554 | wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED | |
3555 | wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE | |
3556 | wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED | |
3557 | wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES | |
3558 | wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM | |
3559 | wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM | |
3560 | wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM | |
3561 | wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG | |
3562 | wxEVT_IDLE = _core_.wxEVT_IDLE | |
3563 | wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI | |
3564 | wxEVT_SIZING = _core_.wxEVT_SIZING | |
3565 | wxEVT_MOVING = _core_.wxEVT_MOVING | |
88c6b281 | 3566 | wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE |
54f9ee45 RD |
3567 | wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK |
3568 | wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK | |
3569 | wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK | |
3570 | wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK | |
3571 | wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS | |
3572 | wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS | |
3573 | wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER | |
d14a1e28 RD |
3574 | # |
3575 | # Create some event binders | |
3576 | EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE ) | |
3577 | EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING ) | |
3578 | EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE ) | |
3579 | EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING ) | |
3580 | EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW ) | |
3581 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
3582 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
3583 | EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT ) | |
3584 | EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT ) | |
3585 | EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND ) | |
3586 | EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR ) | |
3587 | EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN ) | |
3588 | EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP ) | |
3589 | EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) | |
3590 | EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK ) | |
3591 | EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN ) | |
3592 | EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE ) | |
3593 | EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1) | |
3594 | EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT ) | |
3595 | EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS ) | |
3596 | EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS ) | |
3597 | EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS ) | |
3598 | EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE ) | |
3599 | EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP ) | |
88c6b281 | 3600 | EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE ) |
d14a1e28 RD |
3601 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) |
3602 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
3603 | EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES ) | |
3604 | EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG ) | |
3605 | EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED ) | |
3606 | EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED ) | |
3607 | EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW ) | |
3608 | EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE ) | |
3609 | EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE ) | |
3610 | EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY ) | |
3611 | EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED ) | |
3612 | EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE ) | |
3613 | EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE ) | |
3614 | EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY ) | |
3615 | EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR ) | |
3616 | EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED ) | |
3617 | ||
3618 | EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN ) | |
3619 | EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP ) | |
3620 | EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN ) | |
3621 | EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP ) | |
3622 | EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN ) | |
3623 | EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP ) | |
3624 | EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION ) | |
3625 | EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK ) | |
3626 | EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK ) | |
3627 | EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK ) | |
3628 | EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW ) | |
3629 | EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW ) | |
3630 | EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL ) | |
3631 | ||
3632 | EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN, | |
3633 | wxEVT_LEFT_UP, | |
3634 | wxEVT_MIDDLE_DOWN, | |
3635 | wxEVT_MIDDLE_UP, | |
3636 | wxEVT_RIGHT_DOWN, | |
3637 | wxEVT_RIGHT_UP, | |
3638 | wxEVT_MOTION, | |
3639 | wxEVT_LEFT_DCLICK, | |
3640 | wxEVT_MIDDLE_DCLICK, | |
3641 | wxEVT_RIGHT_DCLICK, | |
3642 | wxEVT_ENTER_WINDOW, | |
3643 | wxEVT_LEAVE_WINDOW, | |
3644 | wxEVT_MOUSEWHEEL | |
3645 | ]) | |
3646 | ||
3647 | ||
3648 | # Scrolling from wxWindow (sent to wxScrolledWindow) | |
3649 | EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, | |
3650 | wxEVT_SCROLLWIN_BOTTOM, | |
3651 | wxEVT_SCROLLWIN_LINEUP, | |
3652 | wxEVT_SCROLLWIN_LINEDOWN, | |
3653 | wxEVT_SCROLLWIN_PAGEUP, | |
3654 | wxEVT_SCROLLWIN_PAGEDOWN, | |
3655 | wxEVT_SCROLLWIN_THUMBTRACK, | |
3656 | wxEVT_SCROLLWIN_THUMBRELEASE, | |
3657 | ]) | |
3658 | ||
3659 | EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP ) | |
3660 | EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM ) | |
3661 | EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP ) | |
3662 | EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN ) | |
3663 | EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP ) | |
3664 | EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN ) | |
3665 | EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK ) | |
3666 | EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE ) | |
3667 | ||
27fb7603 | 3668 | # Scrolling from wx.Slider and wx.ScrollBar |
d14a1e28 RD |
3669 | EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, |
3670 | wxEVT_SCROLL_BOTTOM, | |
3671 | wxEVT_SCROLL_LINEUP, | |
3672 | wxEVT_SCROLL_LINEDOWN, | |
3673 | wxEVT_SCROLL_PAGEUP, | |
3674 | wxEVT_SCROLL_PAGEDOWN, | |
3675 | wxEVT_SCROLL_THUMBTRACK, | |
3676 | wxEVT_SCROLL_THUMBRELEASE, | |
4f433fef | 3677 | wxEVT_SCROLL_CHANGED, |
d14a1e28 RD |
3678 | ]) |
3679 | ||
3680 | EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP ) | |
3681 | EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM ) | |
3682 | EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP ) | |
3683 | EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN ) | |
3684 | EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP ) | |
3685 | EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN ) | |
3686 | EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK ) | |
3687 | EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE ) | |
4f433fef RD |
3688 | EVT_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED ) |
3689 | EVT_SCROLL_ENDSCROLL = EVT_SCROLL_CHANGED | |
3690 | ||
27fb7603 | 3691 | # Scrolling from wx.Slider and wx.ScrollBar, with an id |
d14a1e28 RD |
3692 | EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, |
3693 | wxEVT_SCROLL_BOTTOM, | |
3694 | wxEVT_SCROLL_LINEUP, | |
3695 | wxEVT_SCROLL_LINEDOWN, | |
3696 | wxEVT_SCROLL_PAGEUP, | |
3697 | wxEVT_SCROLL_PAGEDOWN, | |
3698 | wxEVT_SCROLL_THUMBTRACK, | |
3699 | wxEVT_SCROLL_THUMBRELEASE, | |
4f433fef | 3700 | wxEVT_SCROLL_CHANGED, |
d14a1e28 RD |
3701 | ], 1) |
3702 | ||
3703 | EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1) | |
3704 | EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1) | |
3705 | EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1) | |
3706 | EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1) | |
3707 | EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1) | |
3708 | EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1) | |
3709 | EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) | |
3710 | EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1) | |
4f433fef RD |
3711 | EVT_COMMAND_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED, 1) |
3712 | EVT_COMMAND_SCROLL_ENDSCROLL = EVT_COMMAND_SCROLL_CHANGED | |
d14a1e28 | 3713 | |
d14a1e28 RD |
3714 | EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1) |
3715 | EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1) | |
3716 | EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1) | |
3717 | EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1) | |
3718 | EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1) | |
3719 | EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1) | |
3720 | EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2) | |
3721 | EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1) | |
3722 | EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1) | |
3723 | EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1) | |
3724 | ||
3725 | EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1) | |
3726 | EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1) | |
3727 | EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1) | |
3728 | EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1) | |
3729 | EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2) | |
3730 | EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1) | |
3731 | EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2) | |
3732 | EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1) | |
3733 | EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1) | |
3734 | ||
3735 | ||
3736 | EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1) | |
3737 | EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1) | |
3738 | EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1) | |
3739 | EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1) | |
3740 | EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1) | |
3741 | EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1) | |
3742 | EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1) | |
3743 | ||
3744 | EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE ) | |
3745 | ||
3746 | EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1) | |
3747 | EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2) | |
3748 | ||
3749 | EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) | |
3750 | ||
3751 | ||
3752 | ||
3753 | #--------------------------------------------------------------------------- | |
3754 | ||
3755 | class Event(Object): | |
27fb7603 RD |
3756 | """ |
3757 | An event is a structure holding information about an event passed to a | |
3758 | callback or member function. wx.Event is an abstract base class for | |
3759 | other event classes | |
3760 | """ | |
0085ce49 RD |
3761 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3762 | def __init__(self): raise AttributeError, "No constructor defined" | |
3763 | __repr__ = _swig_repr | |
3764 | __swig_destroy__ = _core_.delete_Event | |
3765 | __del__ = lambda self : None; | |
e811c8ce | 3766 | def SetEventType(*args, **kwargs): |
27fb7603 RD |
3767 | """ |
3768 | SetEventType(self, wxEventType typ) | |
3769 | ||
3770 | Sets the specific type of the event. | |
3771 | """ | |
54f9ee45 | 3772 | return _core_.Event_SetEventType(*args, **kwargs) |
e811c8ce RD |
3773 | |
3774 | def GetEventType(*args, **kwargs): | |
27fb7603 RD |
3775 | """ |
3776 | GetEventType(self) -> wxEventType | |
3777 | ||
3778 | Returns the identifier of the given event type, such as | |
3779 | ``wxEVT_COMMAND_BUTTON_CLICKED``. | |
3780 | """ | |
54f9ee45 | 3781 | return _core_.Event_GetEventType(*args, **kwargs) |
e811c8ce RD |
3782 | |
3783 | def GetEventObject(*args, **kwargs): | |
27fb7603 RD |
3784 | """ |
3785 | GetEventObject(self) -> Object | |
3786 | ||
3787 | Returns the object (usually a window) associated with the event, if | |
3788 | any. | |
3789 | """ | |
54f9ee45 | 3790 | return _core_.Event_GetEventObject(*args, **kwargs) |
e811c8ce RD |
3791 | |
3792 | def SetEventObject(*args, **kwargs): | |
27fb7603 RD |
3793 | """ |
3794 | SetEventObject(self, Object obj) | |
3795 | ||
3796 | Sets the originating object, or in other words, obj is normally the | |
3797 | object that is sending the event. | |
3798 | """ | |
54f9ee45 | 3799 | return _core_.Event_SetEventObject(*args, **kwargs) |
e811c8ce RD |
3800 | |
3801 | def GetTimestamp(*args, **kwargs): | |
a95a7133 | 3802 | """GetTimestamp(self) -> long""" |
54f9ee45 | 3803 | return _core_.Event_GetTimestamp(*args, **kwargs) |
e811c8ce RD |
3804 | |
3805 | def SetTimestamp(*args, **kwargs): | |
a95a7133 | 3806 | """SetTimestamp(self, long ts=0)""" |
54f9ee45 | 3807 | return _core_.Event_SetTimestamp(*args, **kwargs) |
e811c8ce RD |
3808 | |
3809 | def GetId(*args, **kwargs): | |
27fb7603 RD |
3810 | """ |
3811 | GetId(self) -> int | |
3812 | ||
3813 | Returns the identifier associated with this event, such as a button | |
3814 | command id. | |
3815 | """ | |
54f9ee45 | 3816 | return _core_.Event_GetId(*args, **kwargs) |
e811c8ce RD |
3817 | |
3818 | def SetId(*args, **kwargs): | |
27fb7603 RD |
3819 | """ |
3820 | SetId(self, int Id) | |
3821 | ||
3822 | Set's the ID for the event. This is usually the ID of the window that | |
3823 | is sending the event, but it can also be a command id from a menu | |
3824 | item, etc. | |
3825 | """ | |
54f9ee45 | 3826 | return _core_.Event_SetId(*args, **kwargs) |
e811c8ce RD |
3827 | |
3828 | def IsCommandEvent(*args, **kwargs): | |
27fb7603 RD |
3829 | """ |
3830 | IsCommandEvent(self) -> bool | |
3831 | ||
3832 | Returns true if the event is or is derived from `wx.CommandEvent` else | |
3833 | it returns false. Note: Exists only for optimization purposes. | |
3834 | """ | |
54f9ee45 | 3835 | return _core_.Event_IsCommandEvent(*args, **kwargs) |
e811c8ce RD |
3836 | |
3837 | def Skip(*args, **kwargs): | |
51b83b37 RD |
3838 | """ |
3839 | Skip(self, bool skip=True) | |
3840 | ||
3841 | Called by an event handler, it controls whether additional event | |
3842 | handlers bound to this event will be called after the current event | |
3843 | handler returns. Skip(false) (the default setting) will prevent | |
3844 | additional event handlers from being called and control will be | |
3845 | returned to the sender of the event immediately after the current | |
3846 | handler has finished. Skip(True) will cause the event processing | |
3847 | system to continue searching for a handler function for this event. | |
3848 | ||
3849 | """ | |
54f9ee45 | 3850 | return _core_.Event_Skip(*args, **kwargs) |
e811c8ce RD |
3851 | |
3852 | def GetSkipped(*args, **kwargs): | |
27fb7603 RD |
3853 | """ |
3854 | GetSkipped(self) -> bool | |
3855 | ||
3856 | Returns true if the event handler should be skipped, false otherwise. | |
3857 | :see: `Skip` | |
3858 | """ | |
54f9ee45 | 3859 | return _core_.Event_GetSkipped(*args, **kwargs) |
e811c8ce RD |
3860 | |
3861 | def ShouldPropagate(*args, **kwargs): | |
27fb7603 RD |
3862 | """ |
3863 | ShouldPropagate(self) -> bool | |
3864 | ||
3865 | Test if this event should be propagated to the parent window or not, | |
3866 | i.e. if the propagation level is currently greater than 0. | |
3867 | """ | |
54f9ee45 | 3868 | return _core_.Event_ShouldPropagate(*args, **kwargs) |
e811c8ce RD |
3869 | |
3870 | def StopPropagation(*args, **kwargs): | |
27fb7603 RD |
3871 | """ |
3872 | StopPropagation(self) -> int | |
3873 | ||
3874 | Stop the event from propagating to its parent window. Returns the old | |
3875 | propagation level value which may be later passed to | |
3876 | `ResumePropagation` to allow propagating the event again. | |
3877 | """ | |
54f9ee45 | 3878 | return _core_.Event_StopPropagation(*args, **kwargs) |
e811c8ce RD |
3879 | |
3880 | def ResumePropagation(*args, **kwargs): | |
27fb7603 RD |
3881 | """ |
3882 | ResumePropagation(self, int propagationLevel) | |
3883 | ||
3884 | Resume the event propagation by restoring the propagation level. (For | |
3885 | example, you can use the value returned by an earlier call to | |
3886 | `StopPropagation`.) | |
3887 | ||
3888 | """ | |
54f9ee45 | 3889 | return _core_.Event_ResumePropagation(*args, **kwargs) |
e811c8ce RD |
3890 | |
3891 | def Clone(*args, **kwargs): | |
a95a7133 | 3892 | """Clone(self) -> Event""" |
54f9ee45 | 3893 | return _core_.Event_Clone(*args, **kwargs) |
e811c8ce | 3894 | |
0085ce49 RD |
3895 | Event_swigregister = _core_.Event_swigregister |
3896 | Event_swigregister(Event) | |
d14a1e28 RD |
3897 | |
3898 | #--------------------------------------------------------------------------- | |
3899 | ||
3900 | class PropagationDisabler(object): | |
27fb7603 RD |
3901 | """ |
3902 | Helper class to temporarily change an event not to propagate. Simply | |
3903 | create an instance of this class and then whe it is destroyed the | |
3904 | propogation of the event will be restored. | |
3905 | """ | |
0085ce49 RD |
3906 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3907 | __repr__ = _swig_repr | |
3908 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3909 | """ |
3910 | __init__(self, Event event) -> PropagationDisabler | |
3911 | ||
3912 | Helper class to temporarily change an event not to propagate. Simply | |
3913 | create an instance of this class and then whe it is destroyed the | |
3914 | propogation of the event will be restored. | |
3915 | """ | |
0085ce49 RD |
3916 | _core_.PropagationDisabler_swiginit(self,_core_.new_PropagationDisabler(*args, **kwargs)) |
3917 | __swig_destroy__ = _core_.delete_PropagationDisabler | |
3918 | __del__ = lambda self : None; | |
3919 | PropagationDisabler_swigregister = _core_.PropagationDisabler_swigregister | |
3920 | PropagationDisabler_swigregister(PropagationDisabler) | |
d14a1e28 RD |
3921 | |
3922 | class PropagateOnce(object): | |
27fb7603 RD |
3923 | """ |
3924 | A helper class that will temporarily lower propagation level of an | |
3925 | event. Simply create an instance of this class and then whe it is | |
3926 | destroyed the propogation of the event will be restored. | |
3927 | """ | |
0085ce49 RD |
3928 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3929 | __repr__ = _swig_repr | |
3930 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3931 | """ |
3932 | __init__(self, Event event) -> PropagateOnce | |
3933 | ||
3934 | A helper class that will temporarily lower propagation level of an | |
3935 | event. Simply create an instance of this class and then whe it is | |
3936 | destroyed the propogation of the event will be restored. | |
3937 | """ | |
0085ce49 RD |
3938 | _core_.PropagateOnce_swiginit(self,_core_.new_PropagateOnce(*args, **kwargs)) |
3939 | __swig_destroy__ = _core_.delete_PropagateOnce | |
3940 | __del__ = lambda self : None; | |
3941 | PropagateOnce_swigregister = _core_.PropagateOnce_swigregister | |
3942 | PropagateOnce_swigregister(PropagateOnce) | |
d14a1e28 RD |
3943 | |
3944 | #--------------------------------------------------------------------------- | |
3945 | ||
3946 | class CommandEvent(Event): | |
27fb7603 RD |
3947 | """ |
3948 | This event class contains information about command events, which | |
3949 | originate from a variety of simple controls, as well as menus and | |
3950 | toolbars. | |
3951 | """ | |
0085ce49 RD |
3952 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
3953 | __repr__ = _swig_repr | |
3954 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
3955 | """ |
3956 | __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent | |
3957 | ||
3958 | This event class contains information about command events, which | |
3959 | originate from a variety of simple controls, as well as menus and | |
3960 | toolbars. | |
3961 | """ | |
0085ce49 | 3962 | _core_.CommandEvent_swiginit(self,_core_.new_CommandEvent(*args, **kwargs)) |
e811c8ce | 3963 | def GetSelection(*args, **kwargs): |
27fb7603 RD |
3964 | """ |
3965 | GetSelection(self) -> int | |
3966 | ||
3967 | Returns item index for a listbox or choice selection event (not valid | |
3968 | for a deselection). | |
3969 | """ | |
54f9ee45 | 3970 | return _core_.CommandEvent_GetSelection(*args, **kwargs) |
e811c8ce RD |
3971 | |
3972 | def SetString(*args, **kwargs): | |
a95a7133 | 3973 | """SetString(self, String s)""" |
54f9ee45 | 3974 | return _core_.CommandEvent_SetString(*args, **kwargs) |
e811c8ce RD |
3975 | |
3976 | def GetString(*args, **kwargs): | |
27fb7603 RD |
3977 | """ |
3978 | GetString(self) -> String | |
3979 | ||
3980 | Returns item string for a listbox or choice selection event (not valid | |
3981 | for a deselection). | |
3982 | """ | |
54f9ee45 | 3983 | return _core_.CommandEvent_GetString(*args, **kwargs) |
e811c8ce RD |
3984 | |
3985 | def IsChecked(*args, **kwargs): | |
27fb7603 RD |
3986 | """ |
3987 | IsChecked(self) -> bool | |
3988 | ||
3989 | This method can be used with checkbox and menu events: for the | |
3990 | checkboxes, the method returns true for a selection event and false | |
3991 | for a deselection one. For the menu events, this method indicates if | |
3992 | the menu item just has become checked or unchecked (and thus only | |
3993 | makes sense for checkable menu items). | |
3994 | """ | |
54f9ee45 | 3995 | return _core_.CommandEvent_IsChecked(*args, **kwargs) |
e811c8ce | 3996 | |
242b7b46 | 3997 | Checked = IsChecked |
e811c8ce | 3998 | def IsSelection(*args, **kwargs): |
27fb7603 RD |
3999 | """ |
4000 | IsSelection(self) -> bool | |
4001 | ||
4002 | For a listbox or similar event, returns true if it is a selection, | |
4003 | false if it is a deselection. | |
4004 | """ | |
54f9ee45 | 4005 | return _core_.CommandEvent_IsSelection(*args, **kwargs) |
e811c8ce RD |
4006 | |
4007 | def SetExtraLong(*args, **kwargs): | |
a95a7133 | 4008 | """SetExtraLong(self, long extraLong)""" |
54f9ee45 | 4009 | return _core_.CommandEvent_SetExtraLong(*args, **kwargs) |
e811c8ce RD |
4010 | |
4011 | def GetExtraLong(*args, **kwargs): | |
27fb7603 RD |
4012 | """ |
4013 | GetExtraLong(self) -> long | |
4014 | ||
5ba5649b RD |
4015 | Returns extra information dependant on the event objects type. If the |
4016 | event comes from a listbox selection, it is a boolean determining | |
4017 | whether the event was a selection (true) or a deselection (false). A | |
4018 | listbox deselection only occurs for multiple-selection boxes, and in | |
4019 | this case the index and string values are indeterminate and the | |
4020 | listbox must be examined by the application. | |
27fb7603 | 4021 | """ |
54f9ee45 | 4022 | return _core_.CommandEvent_GetExtraLong(*args, **kwargs) |
e811c8ce RD |
4023 | |
4024 | def SetInt(*args, **kwargs): | |
a95a7133 | 4025 | """SetInt(self, int i)""" |
54f9ee45 | 4026 | return _core_.CommandEvent_SetInt(*args, **kwargs) |
e811c8ce RD |
4027 | |
4028 | def GetInt(*args, **kwargs): | |
27fb7603 RD |
4029 | """ |
4030 | GetInt(self) -> long | |
4031 | ||
5ba5649b RD |
4032 | Returns the integer identifier corresponding to a listbox, choice or |
4033 | radiobox selection (only if the event was a selection, not a | |
4034 | deselection), or a boolean value representing the value of a checkbox. | |
27fb7603 | 4035 | """ |
54f9ee45 | 4036 | return _core_.CommandEvent_GetInt(*args, **kwargs) |
e811c8ce | 4037 | |
0085ce49 RD |
4038 | def GetClientData(*args, **kwargs): |
4039 | """ | |
4040 | GetClientData(self) -> PyObject | |
4041 | ||
4042 | Returns the client data object for a listbox or choice selection event, (if any.) | |
4043 | """ | |
4044 | return _core_.CommandEvent_GetClientData(*args, **kwargs) | |
4045 | ||
4046 | def SetClientData(*args, **kwargs): | |
4047 | """ | |
4048 | SetClientData(self, PyObject clientData) | |
4049 | ||
4050 | Associate the given client data with the item at position n. | |
4051 | """ | |
4052 | return _core_.CommandEvent_SetClientData(*args, **kwargs) | |
4053 | ||
4054 | GetClientObject = GetClientData | |
4055 | SetClientObject = SetClientData | |
4056 | ||
e811c8ce | 4057 | def Clone(*args, **kwargs): |
a95a7133 | 4058 | """Clone(self) -> Event""" |
54f9ee45 | 4059 | return _core_.CommandEvent_Clone(*args, **kwargs) |
e811c8ce | 4060 | |
0085ce49 RD |
4061 | CommandEvent_swigregister = _core_.CommandEvent_swigregister |
4062 | CommandEvent_swigregister(CommandEvent) | |
d14a1e28 RD |
4063 | |
4064 | #--------------------------------------------------------------------------- | |
4065 | ||
4066 | class NotifyEvent(CommandEvent): | |
27fb7603 RD |
4067 | """ |
4068 | An instance of this class (or one of its derived classes) is sent from | |
4069 | a control when the control's state is being changed and the control | |
4070 | allows that change to be prevented from happening. The event handler | |
4071 | can call `Veto` or `Allow` to tell the control what to do. | |
4072 | """ | |
0085ce49 RD |
4073 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
4074 | __repr__ = _swig_repr | |
4075 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
4076 | """ |
4077 | __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent | |
4078 | ||
4079 | An instance of this class (or one of its derived classes) is sent from | |
4080 | a control when the control's state is being changed and the control | |
4081 | allows that change to be prevented from happening. The event handler | |
4082 | can call `Veto` or `Allow` to tell the control what to do. | |
4083 | """ | |
0085ce49 | 4084 | _core_.NotifyEvent_swiginit(self,_core_.new_NotifyEvent(*args, **kwargs)) |
e811c8ce | 4085 | def Veto(*args, **kwargs): |
27fb7603 RD |
4086 | """ |
4087 | Veto(self) | |
4088 | ||
4089 | Prevents the change announced by this event from happening. | |
4090 | ||
4091 | It is in general a good idea to notify the user about the reasons for | |
4092 | vetoing the change because otherwise the applications behaviour (which | |
4093 | just refuses to do what the user wants) might be quite surprising. | |
4094 | """ | |
54f9ee45 | 4095 | return _core_.NotifyEvent_Veto(*args, **kwargs) |
e811c8ce RD |
4096 | |
4097 | def Allow(*args, **kwargs): | |
27fb7603 RD |
4098 | """ |
4099 | Allow(self) | |
4100 | ||
4101 | This is the opposite of `Veto`: it explicitly allows the event to be | |
4102 | processed. For most events it is not necessary to call this method as | |
4103 | the events are allowed anyhow but some are forbidden by default (this | |
4104 | will be mentioned in the corresponding event description). | |
4105 | """ | |
54f9ee45 | 4106 | return _core_.NotifyEvent_Allow(*args, **kwargs) |
e811c8ce RD |
4107 | |
4108 | def IsAllowed(*args, **kwargs): | |
27fb7603 RD |
4109 | """ |
4110 | IsAllowed(self) -> bool | |
4111 | ||
4112 | Returns true if the change is allowed (`Veto` hasn't been called) or | |
4113 | false otherwise (if it was). | |
4114 | """ | |
54f9ee45 | 4115 | return _core_.NotifyEvent_IsAllowed(*args, **kwargs) |
e811c8ce | 4116 | |
0085ce49 RD |
4117 | NotifyEvent_swigregister = _core_.NotifyEvent_swigregister |
4118 | NotifyEvent_swigregister(NotifyEvent) | |
d14a1e28 RD |
4119 | |
4120 | #--------------------------------------------------------------------------- | |
4121 | ||
4122 | class ScrollEvent(CommandEvent): | |
27fb7603 RD |
4123 | """ |
4124 | A scroll event holds information about events sent from stand-alone | |
4125 | scrollbars and sliders. Note that scrolled windows do not send | |
4126 | instnaces of this event class, but send the `wx.ScrollWinEvent` | |
4127 | instead. | |
4128 | """ | |
0085ce49 RD |
4129 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
4130 | __repr__ = _swig_repr | |
4131 | def __init__(self, *args, **kwargs): | |
0df68c9f | 4132 | """ |
a95a7133 | 4133 | __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0, |
0df68c9f RD |
4134 | int orient=0) -> ScrollEvent |
4135 | """ | |
0085ce49 | 4136 | _core_.ScrollEvent_swiginit(self,_core_.new_ScrollEvent(*args, **kwargs)) |
e811c8ce | 4137 | def GetOrientation(*args, **kwargs): |
27fb7603 RD |
4138 | """ |
4139 | GetOrientation(self) -> int | |
4140 | ||
4141 | Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of | |
4142 | the scrollbar. | |
4143 | """ | |
54f9ee45 | 4144 | return _core_.ScrollEvent_GetOrientation(*args, **kwargs) |
e811c8ce RD |
4145 | |
4146 | def GetPosition(*args, **kwargs): | |
27fb7603 RD |
4147 | """ |
4148 | GetPosition(self) -> int | |
4149 | ||
4150 | Returns the position of the scrollbar. | |
4151 | """ | |
54f9ee45 | 4152 | return _core_.ScrollEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4153 | |
4154 | def SetOrientation(*args, **kwargs): | |
a95a7133 | 4155 | """SetOrientation(self, int orient)""" |
54f9ee45 | 4156 | return _core_.ScrollEvent_SetOrientation(*args, **kwargs) |
e811c8ce RD |
4157 | |
4158 | def SetPosition(*args, **kwargs): | |
a95a7133 | 4159 | """SetPosition(self, int pos)""" |
54f9ee45 | 4160 | return _core_.ScrollEvent_SetPosition(*args, **kwargs) |
e811c8ce | 4161 | |
0085ce49 RD |
4162 | ScrollEvent_swigregister = _core_.ScrollEvent_swigregister |
4163 | ScrollEvent_swigregister(ScrollEvent) | |
d14a1e28 RD |
4164 | |
4165 | #--------------------------------------------------------------------------- | |
4166 | ||
4167 | class ScrollWinEvent(Event): | |
27fb7603 RD |
4168 | """ |
4169 | A wx.ScrollWinEvent holds information about scrolling and is sent from | |
4170 | scrolling windows. | |
4171 | """ | |
0085ce49 RD |
4172 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
4173 | __repr__ = _swig_repr | |
4174 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
4175 | """ |
4176 | __init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent | |
4177 | ||
4178 | A wx.ScrollWinEvent holds information about scrolling and is sent from | |
4179 | scrolling windows. | |
4180 | """ | |
0085ce49 | 4181 | _core_.ScrollWinEvent_swiginit(self,_core_.new_ScrollWinEvent(*args, **kwargs)) |
e811c8ce | 4182 | def GetOrientation(*args, **kwargs): |
27fb7603 RD |
4183 | """ |
4184 | GetOrientation(self) -> int | |
4185 | ||
4186 | Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of | |
4187 | the scrollbar. | |
4188 | """ | |
54f9ee45 | 4189 | return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs) |
e811c8ce RD |
4190 | |
4191 | def GetPosition(*args, **kwargs): | |
27fb7603 RD |
4192 | """ |
4193 | GetPosition(self) -> int | |
4194 | ||
4195 | Returns the position of the scrollbar for the thumb track and release | |
4196 | events. Note that this field can't be used for the other events, you | |
4197 | need to query the window itself for the current position in that case. | |
4198 | """ | |
54f9ee45 | 4199 | return _core_.ScrollWinEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4200 | |
4201 | def SetOrientation(*args, **kwargs): | |
a95a7133 | 4202 | """SetOrientation(self, int orient)""" |
54f9ee45 | 4203 | return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs) |
e811c8ce RD |
4204 | |
4205 | def SetPosition(*args, **kwargs): | |
a95a7133 | 4206 | """SetPosition(self, int pos)""" |
54f9ee45 | 4207 | return _core_.ScrollWinEvent_SetPosition(*args, **kwargs) |
e811c8ce | 4208 | |
0085ce49 RD |
4209 | ScrollWinEvent_swigregister = _core_.ScrollWinEvent_swigregister |
4210 | ScrollWinEvent_swigregister(ScrollWinEvent) | |
d14a1e28 RD |
4211 | |
4212 | #--------------------------------------------------------------------------- | |
4213 | ||
54f9ee45 RD |
4214 | MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY |
4215 | MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE | |
4216 | MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT | |
4217 | MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE | |
4218 | MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT | |
d14a1e28 | 4219 | class MouseEvent(Event): |
27fb7603 RD |
4220 | """ |
4221 | This event class contains information about the events generated by | |
4222 | the mouse: they include mouse buttons press and release events and | |
4223 | mouse move events. | |
4224 | ||
4225 | All mouse events involving the buttons use ``wx.MOUSE_BTN_LEFT`` for | |
4226 | the left mouse button, ``wx.MOUSE_BTN_MIDDLE`` for the middle one and | |
4227 | ``wx.MOUSE_BTN_RIGHT`` for the right one. Note that not all mice have | |
4228 | a middle button so a portable application should avoid relying on the | |
4229 | events from it. | |
4230 | ||
4231 | Note the difference between methods like `LeftDown` and `LeftIsDown`: | |
4232 | the former returns true when the event corresponds to the left mouse | |
4233 | button click while the latter returns true if the left mouse button is | |
4234 | currently being pressed. For example, when the user is dragging the | |
4235 | mouse you can use `LeftIsDown` to test whether the left mouse button | |
4236 | is (still) depressed. Also, by convention, if `LeftDown` returns true, | |
4237 | `LeftIsDown` will also return true in wxWidgets whatever the | |
4238 | underlying GUI behaviour is (which is platform-dependent). The same | |
4239 | applies, of course, to other mouse buttons as well. | |
4240 | """ | |
0085ce49 RD |
4241 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
4242 | __repr__ = _swig_repr | |
4243 | def __init__(self, *args, **kwargs): | |
27fb7603 RD |
4244 | """ |
4245 | __init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent | |
4246 | ||
4247 | Constructs a wx.MouseEvent. Valid event types are: | |
4248 | ||
4249 | * wxEVT_ENTER_WINDOW | |
4250 | * wxEVT_LEAVE_WINDOW | |
4251 | * wxEVT_LEFT_DOWN | |
4252 | * wxEVT_LEFT_UP | |
4253 | * wxEVT_LEFT_DCLICK | |
4254 | * wxEVT_MIDDLE_DOWN | |
4255 | * wxEVT_MIDDLE_UP | |
4256 | * wxEVT_MIDDLE_DCLICK | |
4257 | * wxEVT_RIGHT_DOWN | |
4258 | * wxEVT_RIGHT_UP | |
4259 | * wxEVT_RIGHT_DCLICK | |
4260 | * wxEVT_MOTION | |
4261 | * wxEVT_MOUSEWHEEL | |
4262 | """ | |
0085ce49 | 4263 | _core_.MouseEvent_swiginit(self,_core_.new_MouseEvent(*args, **kwargs)) |
e811c8ce | 4264 | def IsButton(*args, **kwargs): |
27fb7603 RD |
4265 | """ |
4266 | IsButton(self) -> bool | |
4267 | ||
4268 | Returns true if the event was a mouse button event (not necessarily a | |
4269 | button down event - that may be tested using `ButtonDown`). | |
4270 | """ | |
54f9ee45 | 4271 | return _core_.MouseEvent_IsButton(*args, **kwargs) |
e811c8ce RD |
4272 | |
4273 | def ButtonDown(*args, **kwargs): | |
27fb7603 RD |
4274 | """ |
4275 | ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool | |
4276 | ||
5ba5649b RD |
4277 | If the argument is omitted, this returns true if the event was any |
4278 | mouse button down event. Otherwise the argument specifies which | |
4279 | button-down event shold be checked for (see `Button` for the possible | |
4280 | values). | |
27fb7603 | 4281 | """ |
54f9ee45 | 4282 | return _core_.MouseEvent_ButtonDown(*args, **kwargs) |
e811c8ce RD |
4283 | |
4284 | def ButtonDClick(*args, **kwargs): | |
27fb7603 RD |
4285 | """ |
4286 | ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool | |
4287 | ||
4288 | If the argument is omitted, this returns true if the event was any | |
4289 | mouse double click event. Otherwise the argument specifies which | |
4290 | double click event to check for (see `Button` for the possible | |
4291 | values). | |
4292 | """ | |
54f9ee45 | 4293 | return _core_.MouseEvent_ButtonDClick(*args, **kwargs) |
e811c8ce RD |
4294 | |
4295 | def ButtonUp(*args, **kwargs): | |
27fb7603 RD |
4296 | """ |
4297 | ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool | |
4298 | ||
4299 | If the argument is omitted, this returns true if the event was any | |
5ba5649b RD |
4300 | mouse button up event. Otherwise the argument specifies which button |
4301 | up event to check for (see `Button` for the possible values). | |
27fb7603 | 4302 | """ |
54f9ee45 | 4303 | return _core_.MouseEvent_ButtonUp(*args, **kwargs) |
e811c8ce RD |
4304 | |
4305 | def Button(*args, **kwargs): | |
27fb7603 RD |
4306 | """ |
4307 | Button(self, int button) -> bool | |
4308 | ||
4309 | Returns true if the identified mouse button is changing state. Valid | |
4310 | values of button are: | |
4311 | ||
4312 | ==================== ===================================== | |
4313 | wx.MOUSE_BTN_LEFT check if left button was pressed | |
4314 | wx.MOUSE_BTN_MIDDLE check if middle button was pressed | |
4315 | wx.MOUSE_BTN_RIGHT check if right button was pressed | |
4316 | wx.MOUSE_BTN_ANY check if any button was pressed | |
4317 | ==================== ===================================== | |
4318 | ||
4319 | """ | |
54f9ee45 | 4320 | return _core_.MouseEvent_Button(*args, **kwargs) |
e811c8ce RD |
4321 | |
4322 | def ButtonIsDown(*args, **kwargs): | |
a95a7133 | 4323 | """ButtonIsDown(self, int but) -> bool""" |
54f9ee45 | 4324 | return _core_.MouseEvent_ButtonIsDown(*args, **kwargs) |
e811c8ce RD |
4325 | |
4326 | def GetButton(*args, **kwargs): | |
27fb7603 RD |
4327 | """ |
4328 | GetButton(self) -> int | |
4329 | ||
4330 | Returns the mouse button which generated this event or | |
4331 | wx.MOUSE_BTN_NONE if no button is involved (for mouse move, enter or | |
4332 | leave event, for example). Otherwise wx.MOUSE_BTN_LEFT is returned for | |
4333 | the left button down, up and double click events, wx.MOUSE_BTN_MIDDLE | |
4334 | and wx.MOUSE_BTN_RIGHT for the same events for the middle and the | |
4335 | right buttons respectively. | |
4336 | """ | |
54f9ee45 | 4337 | return _core_.MouseEvent_GetButton(*args, **kwargs) |
e811c8ce RD |
4338 | |
4339 | def ControlDown(*args, **kwargs): | |
27fb7603 RD |
4340 | """ |
4341 | ControlDown(self) -> bool | |
4342 | ||
4343 | Returns true if the control key was down at the time of the event. | |
4344 | """ | |
54f9ee45 | 4345 | return _core_.MouseEvent_ControlDown(*args, **kwargs) |
e811c8ce RD |
4346 | |
4347 | def MetaDown(*args, **kwargs): | |
27fb7603 RD |
4348 | """ |
4349 | MetaDown(self) -> bool | |
4350 | ||
4351 | Returns true if the Meta key was down at the time of the event. | |
4352 | """ | |
54f9ee45 | 4353 | return _core_.MouseEvent_MetaDown(*args, **kwargs) |
e811c8ce RD |
4354 | |
4355 | def AltDown(*args, **kwargs): | |
27fb7603 RD |
4356 | """ |
4357 | AltDown(self) -> bool | |
4358 | ||
4359 | Returns true if the Alt key was down at the time of the event. | |
4360 | """ | |
54f9ee45 | 4361 | return _core_.MouseEvent_AltDown(*args, **kwargs) |
e811c8ce RD |
4362 | |
4363 | def ShiftDown(*args, **kwargs): | |
27fb7603 RD |
4364 | """ |
4365 | ShiftDown(self) -> bool | |
4366 | ||
4367 | Returns true if the Shift key was down at the time of the event. | |
4368 | """ | |
54f9ee45 | 4369 | return _core_.MouseEvent_ShiftDown(*args, **kwargs) |
e811c8ce | 4370 | |
412d302d RD |
4371 | def CmdDown(*args, **kwargs): |
4372 | """ | |
4373 | CmdDown(self) -> bool | |
4374 | ||
4375 | "Cmd" is a pseudo key which is the same as Control for PC and Unix | |
4376 | platforms but the special "Apple" (a.k.a as "Command") key on | |
5ba5649b | 4377 | Macs. It often makes sense to use it instead of, say, `ControlDown` |
412d302d | 4378 | because Cmd key is used for the same thing under Mac as Ctrl |
27fb7603 | 4379 | elsewhere. The Ctrl key still exists, it's just not used for this |
412d302d RD |
4380 | purpose. So for non-Mac platforms this is the same as `ControlDown` |
4381 | and Macs this is the same as `MetaDown`. | |
4382 | """ | |
4383 | return _core_.MouseEvent_CmdDown(*args, **kwargs) | |
4384 | ||
e811c8ce | 4385 | def LeftDown(*args, **kwargs): |
27fb7603 RD |
4386 | """ |
4387 | LeftDown(self) -> bool | |
4388 | ||
4389 | Returns true if the left mouse button state changed to down. | |
4390 | """ | |
54f9ee45 | 4391 | return _core_.MouseEvent_LeftDown(*args, **kwargs) |
e811c8ce RD |
4392 | |
4393 | def MiddleDown(*args, **kwargs): | |
27fb7603 RD |
4394 | """ |
4395 | MiddleDown(self) -> bool | |
4396 | ||
4397 | Returns true if the middle mouse button state changed to down. | |
4398 | """ | |
54f9ee45 | 4399 | return _core_.MouseEvent_MiddleDown(*args, **kwargs) |
e811c8ce RD |
4400 | |
4401 | def RightDown(*args, **kwargs): | |
27fb7603 RD |
4402 | """ |
4403 | RightDown(self) -> bool | |
4404 | ||
4405 | Returns true if the right mouse button state changed to down. | |
4406 | """ | |
54f9ee45 | 4407 | return _core_.MouseEvent_RightDown(*args, **kwargs) |
e811c8ce RD |
4408 | |
4409 | def LeftUp(*args, **kwargs): | |
27fb7603 RD |
4410 | """ |
4411 | LeftUp(self) -> bool | |
4412 | ||
4413 | Returns true if the left mouse button state changed to up. | |
4414 | """ | |
54f9ee45 | 4415 | return _core_.MouseEvent_LeftUp(*args, **kwargs) |
e811c8ce RD |
4416 | |
4417 | def MiddleUp(*args, **kwargs): | |
27fb7603 RD |
4418 | """ |
4419 | MiddleUp(self) -> bool | |
4420 | ||
4421 | Returns true if the middle mouse button state changed to up. | |
4422 | """ | |
54f9ee45 | 4423 | return _core_.MouseEvent_MiddleUp(*args, **kwargs) |
e811c8ce RD |
4424 | |
4425 | def RightUp(*args, **kwargs): | |
27fb7603 RD |
4426 | """ |
4427 | RightUp(self) -> bool | |
4428 | ||
4429 | Returns true if the right mouse button state changed to up. | |
4430 | """ | |
54f9ee45 | 4431 | return _core_.MouseEvent_RightUp(*args, **kwargs) |
e811c8ce RD |
4432 | |
4433 | def LeftDClick(*args, **kwargs): | |
27fb7603 RD |
4434 | """ |
4435 | LeftDClick(self) -> bool | |
4436 | ||
4437 | Returns true if the event was a left button double click. | |
4438 | """ | |
54f9ee45 | 4439 | return _core_.MouseEvent_LeftDClick(*args, **kwargs) |
e811c8ce RD |
4440 | |
4441 | def MiddleDClick(*args, **kwargs): | |
27fb7603 RD |
4442 | """ |
4443 | MiddleDClick(self) -> bool | |
4444 | ||
4445 | Returns true if the event was a middle button double click. | |
4446 | """ | |
54f9ee45 | 4447 | return _core_.MouseEvent_MiddleDClick(*args, **kwargs) |
e811c8ce RD |
4448 | |
4449 | def RightDClick(*args, **kwargs): | |
27fb7603 RD |
4450 | """ |
4451 | RightDClick(self) -> bool | |
4452 | ||
4453 | Returns true if the event was a right button double click. | |
4454 | """ | |
54f9ee45 | 4455 | return _core_.MouseEvent_RightDClick(*args, **kwargs) |
e811c8ce RD |
4456 | |
4457 | def LeftIsDown(*args, **kwargs): | |
27fb7603 RD |
4458 | """ |
4459 | LeftIsDown(self) -> bool | |
4460 | ||
4461 | Returns true if the left mouse button is currently down, independent | |
4462 | of the current event type. | |
4463 | ||
4464 | Please notice that it is not the same as LeftDown which returns true | |
4465 | if the left mouse button was just pressed. Rather, it describes the | |
4466 | state of the mouse button before the event happened. | |
4467 | ||
4468 | This event is usually used in the mouse event handlers which process | |
4469 | "move mouse" messages to determine whether the user is (still) | |
4470 | dragging the mouse. | |
4471 | """ | |
54f9ee45 | 4472 | return _core_.MouseEvent_LeftIsDown(*args, **kwargs) |
e811c8ce RD |
4473 | |
4474 | def MiddleIsDown(*args, **kwargs): | |
27fb7603 RD |
4475 | """ |
4476 | MiddleIsDown(self) -> bool | |
4477 | ||
4478 | Returns true if the middle mouse button is currently down, independent | |
4479 | of the current event type. | |
4480 | """ | |
54f9ee45 | 4481 | return _core_.MouseEvent_MiddleIsDown(*args, **kwargs) |
e811c8ce RD |
4482 | |
4483 | def RightIsDown(*args, **kwargs): | |
27fb7603 RD |
4484 | """ |
4485 | RightIsDown(self) -> bool | |
4486 | ||
4487 | Returns true if the right mouse button is currently down, independent | |
4488 | of the current event type. | |
4489 | """ | |
54f9ee45 | 4490 | return _core_.MouseEvent_RightIsDown(*args, **kwargs) |
e811c8ce RD |
4491 | |
4492 | def Dragging(*args, **kwargs): | |
27fb7603 RD |
4493 | """ |
4494 | Dragging(self) -> bool | |
4495 | ||
4496 | Returns true if this was a dragging event (motion while a button is | |
4497 | depressed). | |
4498 | """ | |
54f9ee45 | 4499 | return _core_.MouseEvent_Dragging(*args, **kwargs) |
e811c8ce RD |
4500 | |
4501 | def Moving(*args, **kwargs): | |
27fb7603 RD |
4502 | """ |
4503 | Moving(self) -> bool | |
4504 | ||
4505 | Returns true if this was a motion event and no mouse buttons were | |
4506 | pressed. If any mouse button is held pressed, then this method returns | |
4507 | false and Dragging returns true. | |
4508 | """ | |
54f9ee45 | 4509 | return _core_.MouseEvent_Moving(*args, **kwargs) |
e811c8ce RD |
4510 | |
4511 | def Entering(*args, **kwargs): | |
27fb7603 RD |
4512 | """ |
4513 | Entering(self) -> bool | |
4514 | ||
4515 | Returns true if the mouse was entering the window. | |
4516 | """ | |
54f9ee45 | 4517 | return _core_.MouseEvent_Entering(*args, **kwargs) |
e811c8ce RD |
4518 | |
4519 | def Leaving(*args, **kwargs): | |
27fb7603 RD |
4520 | """ |
4521 | Leaving(self) -> bool | |
4522 | ||
4523 | Returns true if the mouse was leaving the window. | |
4524 | """ | |
54f9ee45 | 4525 | return _core_.MouseEvent_Leaving(*args, **kwargs) |
e811c8ce RD |
4526 | |
4527 | def GetPosition(*args, **kwargs): | |
0df68c9f | 4528 | """ |
a95a7133 | 4529 | GetPosition(self) -> Point |
e811c8ce | 4530 | |
27fb7603 RD |
4531 | Returns the pixel position of the mouse in window coordinates when the |
4532 | event happened. | |
0df68c9f | 4533 | """ |
54f9ee45 | 4534 | return _core_.MouseEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4535 | |
4536 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
4537 | """ |
4538 | GetPositionTuple() -> (x,y) | |
e811c8ce | 4539 | |
27fb7603 RD |
4540 | Returns the pixel position of the mouse in window coordinates when the |
4541 | event happened. | |
0df68c9f | 4542 | """ |
54f9ee45 | 4543 | return _core_.MouseEvent_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
4544 | |
4545 | def GetLogicalPosition(*args, **kwargs): | |
27fb7603 RD |
4546 | """ |
4547 | GetLogicalPosition(self, DC dc) -> Point | |
4548 | ||
4549 | Returns the logical mouse position in pixels (i.e. translated | |
4550 | according to the translation set for the DC, which usually indicates | |
4551 | that the window has been scrolled). | |
4552 | """ | |
54f9ee45 | 4553 | return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs) |
e811c8ce RD |
4554 | |
4555 | def GetX(*args, **kwargs): | |
27fb7603 RD |
4556 | """ |
4557 | GetX(self) -> int | |
4558 | ||
4559 | Returns X coordinate of the physical mouse event position. | |
4560 | """ | |
54f9ee45 | 4561 | return _core_.MouseEvent_GetX(*args, **kwargs) |
e811c8ce RD |
4562 | |
4563 | def GetY(*args, **kwargs): | |
27fb7603 RD |
4564 | """ |
4565 | GetY(self) -> int | |
4566 | ||
4567 | Returns Y coordinate of the physical mouse event position. | |
4568 | """ | |
54f9ee45 | 4569 | return _core_.MouseEvent_GetY(*args, **kwargs) |
e811c8ce RD |
4570 | |
4571 | def GetWheelRotation(*args, **kwargs): | |
27fb7603 RD |
4572 | """ |
4573 | GetWheelRotation(self) -> int | |
4574 | ||
4575 | Get wheel rotation, positive or negative indicates direction of | |
4576 | rotation. Current devices all send an event when rotation is equal to | |
4577 | +/-WheelDelta, but this allows for finer resolution devices to be | |
4578 | created in the future. Because of this you shouldn't assume that one | |
4579 | event is equal to 1 line or whatever, but you should be able to either | |
4580 | do partial line scrolling or wait until +/-WheelDelta rotation values | |
4581 | have been accumulated before scrolling. | |
4582 | """ | |
54f9ee45 | 4583 | return _core_.MouseEvent_GetWheelRotation(*args, **kwargs) |
e811c8ce RD |
4584 | |
4585 | def GetWheelDelta(*args, **kwargs): | |
27fb7603 RD |
4586 | """ |
4587 | GetWheelDelta(self) -> int | |
4588 | ||
4589 | Get wheel delta, normally 120. This is the threshold for action to be | |
4590 | taken, and one such action (for example, scrolling one increment) | |
4591 | should occur for each delta. | |
4592 | """ | |
54f9ee45 | 4593 | return _core_.MouseEvent_GetWheelDelta(*args, **kwargs) |
e811c8ce RD |
4594 | |
4595 | def GetLinesPerAction(*args, **kwargs): | |
27fb7603 RD |
4596 | """ |
4597 | GetLinesPerAction(self) -> int | |
4598 | ||
4599 | Returns the configured number of lines (or whatever) to be scrolled | |
4600 | per wheel action. Defaults to three. | |
4601 | """ | |
54f9ee45 | 4602 | return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs) |
e811c8ce RD |
4603 | |
4604 | def IsPageScroll(*args, **kwargs): | |
27fb7603 RD |
4605 | """ |
4606 | IsPageScroll(self) -> bool | |
4607 | ||
4608 | Returns true if the system has been setup to do page scrolling with | |
4609 | the mouse wheel instead of line scrolling. | |
4610 | """ | |
54f9ee45 RD |
4611 | return _core_.MouseEvent_IsPageScroll(*args, **kwargs) |
4612 | ||
4613 | m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set) | |
4614 | m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set) | |
4615 | m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set) | |
4616 | m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set) | |
4617 | m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set) | |
4618 | m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set) | |
4619 | m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set) | |
4620 | m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set) | |
4621 | m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set) | |
4622 | m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set) | |
4623 | m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set) | |
4624 | m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set) | |
0085ce49 RD |
4625 | MouseEvent_swigregister = _core_.MouseEvent_swigregister |
4626 | MouseEvent_swigregister(MouseEvent) | |
d14a1e28 RD |
4627 | |
4628 | #--------------------------------------------------------------------------- | |
4629 | ||
4630 | class SetCursorEvent(Event): | |
5ba5649b RD |
4631 | """ |
4632 | A SetCursorEvent is generated when the mouse cursor is about to be set | |
4633 | as a result of mouse motion. This event gives the application the | |
4634 | chance to perform specific mouse cursor processing based on the | |
4635 | current position of the mouse within the window. Use the `SetCursor` | |
4636 | method to specify the cursor you want to be displayed. | |
4637 | """ | |
0085ce49 RD |
4638 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
4639 | __repr__ = _swig_repr | |
4640 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
4641 | """ |
4642 | __init__(self, int x=0, int y=0) -> SetCursorEvent | |
4643 | ||
4644 | Construct a new `wx.SetCursorEvent`. | |
4645 | """ | |
0085ce49 | 4646 | _core_.SetCursorEvent_swiginit(self,_core_.new_SetCursorEvent(*args, **kwargs)) |
e811c8ce | 4647 | def GetX(*args, **kwargs): |
5ba5649b RD |
4648 | """ |
4649 | GetX(self) -> int | |
4650 | ||
4651 | Returns the X coordinate of the mouse in client coordinates. | |
4652 | """ | |
54f9ee45 | 4653 | return _core_.SetCursorEvent_GetX(*args, **kwargs) |
e811c8ce RD |
4654 | |
4655 | def GetY(*args, **kwargs): | |
5ba5649b RD |
4656 | """ |
4657 | GetY(self) -> int | |
4658 | ||
4659 | Returns the Y coordinate of the mouse in client coordinates. | |
4660 | """ | |
54f9ee45 | 4661 | return _core_.SetCursorEvent_GetY(*args, **kwargs) |
e811c8ce RD |
4662 | |
4663 | def SetCursor(*args, **kwargs): | |
5ba5649b RD |
4664 | """ |
4665 | SetCursor(self, Cursor cursor) | |
4666 | ||
4667 | Sets the cursor associated with this event. | |
4668 | """ | |
54f9ee45 | 4669 | return _core_.SetCursorEvent_SetCursor(*args, **kwargs) |
e811c8ce RD |
4670 | |
4671 | def GetCursor(*args, **kwargs): | |
5ba5649b RD |
4672 | """ |
4673 | GetCursor(self) -> Cursor | |
4674 | ||
4675 | Returns a reference to the cursor specified by this event. | |
4676 | """ | |
54f9ee45 | 4677 | return _core_.SetCursorEvent_GetCursor(*args, **kwargs) |
e811c8ce RD |
4678 | |
4679 | def HasCursor(*args, **kwargs): | |
5ba5649b RD |
4680 | """ |
4681 | HasCursor(self) -> bool | |
4682 | ||
4683 | Returns true if the cursor specified by this event is a valid cursor. | |
4684 | """ | |
54f9ee45 | 4685 | return _core_.SetCursorEvent_HasCursor(*args, **kwargs) |
e811c8ce | 4686 | |
0085ce49 RD |
4687 | SetCursorEvent_swigregister = _core_.SetCursorEvent_swigregister |
4688 | SetCursorEvent_swigregister(SetCursorEvent) | |
d14a1e28 RD |
4689 | |
4690 | #--------------------------------------------------------------------------- | |
4691 | ||
4692 | class KeyEvent(Event): | |
5ba5649b RD |
4693 | """ |
4694 | This event class contains information about keypress and character | |
4695 | events. These events are only sent to the widget that currently has | |
4696 | the keyboard focus. | |
4697 | ||
4698 | Notice that there are three different kinds of keyboard events in | |
4699 | wxWidgets: key down and up events and char events. The difference | |
4700 | between the first two is clear - the first corresponds to a key press | |
4701 | and the second to a key release - otherwise they are identical. Just | |
4702 | note that if the key is maintained in a pressed state you will | |
4703 | typically get a lot of (automatically generated) down events but only | |
4704 | one up so it is wrong to assume that there is one up event | |
4705 | corresponding to each down one. | |
4706 | ||
4707 | Both key events provide untranslated key codes while the char event | |
4708 | carries the translated one. The untranslated code for alphanumeric | |
4709 | keys is always an upper case value. For the other keys it is one of | |
4710 | WXK_XXX values from the keycodes table. The translated key is, in | |
4711 | general, the character the user expects to appear as the result of the | |
4712 | key combination when typing the text into a text entry zone, for | |
4713 | example. | |
4714 | ||
4715 | A few examples to clarify this (all assume that CAPS LOCK is unpressed | |
4716 | and the standard US keyboard): when the 'A' key is pressed, the key | |
4717 | down event key code is equal to ASCII A == 65. But the char event key | |
4718 | code is ASCII a == 97. On the other hand, if you press both SHIFT and | |
4719 | 'A' keys simultaneously , the key code in key down event will still be | |
4720 | just 'A' while the char event key code parameter will now be 'A' as | |
4721 | well. | |
4722 | ||
4723 | Although in this simple case it is clear that the correct key code | |
4724 | could be found in the key down event handler by checking the value | |
4725 | returned by `ShiftDown`, in general you should use EVT_CHAR for this | |
4726 | as for non alphanumeric keys or non-US keyboard layouts the | |
4727 | translation is keyboard-layout dependent and can only be done properly | |
4728 | by the system itself. | |
4729 | ||
4730 | Another kind of translation is done when the control key is pressed: | |
4731 | for example, for CTRL-A key press the key down event still carries the | |
4732 | same key code 'A' as usual but the char event will have key code of 1, | |
4733 | the ASCII value of this key combination. | |
4734 | ||
4735 | You may discover how the other keys on your system behave | |
4736 | interactively by running the KeyEvents sample in the wxPython demo and | |
4737 | pressing some keys while the blue box at the top has the keyboard | |
4738 | focus. | |
4739 | ||
4740 | **Note**: If a key down event is caught and the event handler does not | |
4741 | call event.Skip() then the coresponding char event will not | |
4742 | happen. This is by design and enables the programs that handle both | |
4743 | types of events to be a bit simpler. | |
4744 | ||
4745 | **Note for Windows programmers**: The key and char events in wxWidgets | |
4746 | are similar to but slightly different from Windows WM_KEYDOWN and | |
4747 | WM_CHAR events. In particular, Alt-x combination will generate a char | |
4748 | event in wxWidgets (unless it is used as an accelerator). | |
4749 | ||
4750 | **Tip**: be sure to call event.Skip() for events that you don't | |
4751 | process in key event function, otherwise menu shortcuts may cease to | |
4752 | work under Windows. | |
4753 | ||
4754 | """ | |
0085ce49 RD |
4755 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
4756 | __repr__ = _swig_repr | |
4757 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
4758 | """ |
4759 | __init__(self, wxEventType eventType=wxEVT_NULL) -> KeyEvent | |
4760 | ||
4761 | Construct a new `wx.KeyEvent`. Valid event types are: | |
4762 | * | |
4763 | """ | |
0085ce49 | 4764 | _core_.KeyEvent_swiginit(self,_core_.new_KeyEvent(*args, **kwargs)) |
b1fcee84 RD |
4765 | def GetModifiers(*args, **kwargs): |
4766 | """ | |
4767 | GetModifiers(self) -> int | |
4768 | ||
4769 | Returns a bitmask of the current modifier settings. Can be used to | |
4770 | check if the key event has exactly the given modifiers without having | |
4771 | to explicitly check that the other modifiers are not down. For | |
4772 | example:: | |
4773 | ||
4774 | if event.GetModifers() == wx.MOD_CONTROL: | |
4775 | DoSomething() | |
4776 | ||
4777 | """ | |
4778 | return _core_.KeyEvent_GetModifiers(*args, **kwargs) | |
4779 | ||
e811c8ce | 4780 | def ControlDown(*args, **kwargs): |
5ba5649b RD |
4781 | """ |
4782 | ControlDown(self) -> bool | |
4783 | ||
4784 | Returns ``True`` if the Control key was down at the time of the event. | |
4785 | """ | |
54f9ee45 | 4786 | return _core_.KeyEvent_ControlDown(*args, **kwargs) |
e811c8ce RD |
4787 | |
4788 | def MetaDown(*args, **kwargs): | |
5ba5649b RD |
4789 | """ |
4790 | MetaDown(self) -> bool | |
4791 | ||
4792 | Returns ``True`` if the Meta key was down at the time of the event. | |
4793 | """ | |
54f9ee45 | 4794 | return _core_.KeyEvent_MetaDown(*args, **kwargs) |
e811c8ce RD |
4795 | |
4796 | def AltDown(*args, **kwargs): | |
5ba5649b RD |
4797 | """ |
4798 | AltDown(self) -> bool | |
4799 | ||
4800 | Returns ``True`` if the Alt key was down at the time of the event. | |
4801 | """ | |
54f9ee45 | 4802 | return _core_.KeyEvent_AltDown(*args, **kwargs) |
e811c8ce RD |
4803 | |
4804 | def ShiftDown(*args, **kwargs): | |
5ba5649b RD |
4805 | """ |
4806 | ShiftDown(self) -> bool | |
4807 | ||
4808 | Returns ``True`` if the Shift key was down at the time of the event. | |
4809 | """ | |
54f9ee45 | 4810 | return _core_.KeyEvent_ShiftDown(*args, **kwargs) |
e811c8ce | 4811 | |
412d302d RD |
4812 | def CmdDown(*args, **kwargs): |
4813 | """ | |
4814 | CmdDown(self) -> bool | |
4815 | ||
4816 | "Cmd" is a pseudo key which is the same as Control for PC and Unix | |
4817 | platforms but the special "Apple" (a.k.a as "Command") key on | |
5ba5649b | 4818 | Macs. It makes often sense to use it instead of, say, `ControlDown` |
412d302d RD |
4819 | because Cmd key is used for the same thing under Mac as Ctrl |
4820 | elsewhere. The Ctrl still exists, it's just not used for this | |
4821 | purpose. So for non-Mac platforms this is the same as `ControlDown` | |
4822 | and Macs this is the same as `MetaDown`. | |
4823 | """ | |
4824 | return _core_.KeyEvent_CmdDown(*args, **kwargs) | |
4825 | ||
e811c8ce | 4826 | def HasModifiers(*args, **kwargs): |
5ba5649b RD |
4827 | """ |
4828 | HasModifiers(self) -> bool | |
4829 | ||
4830 | Returns true if either CTRL or ALT keys was down at the time of the | |
4831 | key event. Note that this function does not take into account neither | |
4832 | SHIFT nor META key states (the reason for ignoring the latter is that | |
4833 | it is common for NUMLOCK key to be configured as META under X but the | |
4834 | key presses even while NUMLOCK is on should be still processed | |
4835 | normally). | |
4836 | """ | |
54f9ee45 | 4837 | return _core_.KeyEvent_HasModifiers(*args, **kwargs) |
e811c8ce RD |
4838 | |
4839 | def GetKeyCode(*args, **kwargs): | |
5ba5649b RD |
4840 | """ |
4841 | GetKeyCode(self) -> int | |
4842 | ||
4843 | Returns the virtual key code. ASCII events return normal ASCII values, | |
4844 | while non-ASCII events return values such as WXK_LEFT for the left | |
4845 | cursor key. See `wx.KeyEvent` for a full list of the virtual key | |
4846 | codes. | |
4847 | ||
4848 | Note that in Unicode build, the returned value is meaningful only if | |
4849 | the user entered a character that can be represented in current | |
4850 | locale's default charset. You can obtain the corresponding Unicode | |
4851 | character using `GetUnicodeKey`. | |
4852 | """ | |
54f9ee45 | 4853 | return _core_.KeyEvent_GetKeyCode(*args, **kwargs) |
e811c8ce | 4854 | |
d14a1e28 | 4855 | KeyCode = GetKeyCode |
19272049 | 4856 | def GetUnicodeKey(*args, **kwargs): |
5ba5649b RD |
4857 | """ |
4858 | GetUnicodeKey(self) -> int | |
4859 | ||
4860 | Returns the Unicode character corresponding to this key event. This | |
4861 | function is only meaningfule in a Unicode build of wxPython. | |
4862 | """ | |
19272049 | 4863 | return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs) |
e811c8ce | 4864 | |
19272049 | 4865 | GetUniChar = GetUnicodeKey |
e811c8ce | 4866 | def GetRawKeyCode(*args, **kwargs): |
5ba5649b RD |
4867 | """ |
4868 | GetRawKeyCode(self) -> unsigned int | |
4869 | ||
4870 | Returns the raw key code for this event. This is a platform-dependent | |
4871 | scan code which should only be used in advanced | |
4872 | applications. Currently the raw key codes are not supported by all | |
4873 | ports. | |
4874 | """ | |
54f9ee45 | 4875 | return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs) |
e811c8ce RD |
4876 | |
4877 | def GetRawKeyFlags(*args, **kwargs): | |
5ba5649b RD |
4878 | """ |
4879 | GetRawKeyFlags(self) -> unsigned int | |
4880 | ||
4881 | Returns the low level key flags for this event. The flags are | |
4882 | platform-dependent and should only be used in advanced applications. | |
4883 | Currently the raw key flags are not supported by all ports. | |
4884 | """ | |
54f9ee45 | 4885 | return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs) |
e811c8ce RD |
4886 | |
4887 | def GetPosition(*args, **kwargs): | |
0df68c9f | 4888 | """ |
a95a7133 | 4889 | GetPosition(self) -> Point |
e811c8ce | 4890 | |
5ba5649b | 4891 | Find the position of the event, if applicable. |
0df68c9f | 4892 | """ |
54f9ee45 | 4893 | return _core_.KeyEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4894 | |
4895 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
4896 | """ |
4897 | GetPositionTuple() -> (x,y) | |
e811c8ce | 4898 | |
5ba5649b | 4899 | Find the position of the event, if applicable. |
0df68c9f | 4900 | """ |
54f9ee45 | 4901 | return _core_.KeyEvent_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
4902 | |
4903 | def GetX(*args, **kwargs): | |
5ba5649b RD |
4904 | """ |
4905 | GetX(self) -> int | |
4906 | ||
4907 | Returns the X position (in client coordinates) of the event, if | |
4908 | applicable. | |
4909 | """ | |
54f9ee45 | 4910 | return _core_.KeyEvent_GetX(*args, **kwargs) |
e811c8ce RD |
4911 | |
4912 | def GetY(*args, **kwargs): | |
5ba5649b RD |
4913 | """ |
4914 | GetY(self) -> int | |
4915 | ||
4916 | Returns the Y position (in client coordinates) of the event, if | |
4917 | applicable. | |
4918 | """ | |
54f9ee45 RD |
4919 | return _core_.KeyEvent_GetY(*args, **kwargs) |
4920 | ||
4921 | m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set) | |
4922 | m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set) | |
4923 | m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set) | |
4924 | m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set) | |
4925 | m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set) | |
4926 | m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set) | |
4927 | m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set) | |
4928 | m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set) | |
4929 | m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set) | |
4930 | m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set) | |
0085ce49 RD |
4931 | KeyEvent_swigregister = _core_.KeyEvent_swigregister |
4932 | KeyEvent_swigregister(KeyEvent) | |
d14a1e28 RD |
4933 | |
4934 | #--------------------------------------------------------------------------- | |
4935 | ||
4936 | class SizeEvent(Event): | |
5ba5649b RD |
4937 | """ |
4938 | A size event holds information about size change events. The EVT_SIZE | |
4939 | handler function will be called when the window it is bound to has | |
4940 | been resized. | |
4941 | ||
4942 | Note that the size passed is of the whole window: call | |
4943 | `wx.Window.GetClientSize` for the area which may be used by the | |
4944 | application. | |
4945 | ||
4946 | When a window is resized, usually only a small part of the window is | |
4947 | damaged and and that area is all that is in the update region for the | |
4948 | next paint event. However, if your drawing depends on the size of the | |
4949 | window, you may need to clear the DC explicitly and repaint the whole | |
4950 | window. In which case, you may need to call `wx.Window.Refresh` to | |
4951 | invalidate the entire window. | |
4952 | ||
4953 | """ | |
0085ce49 RD |
4954 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
4955 | __repr__ = _swig_repr | |
4956 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
4957 | """ |
4958 | __init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent | |
4959 | ||
4960 | Construct a new ``wx.SizeEvent``. | |
4961 | """ | |
0085ce49 | 4962 | _core_.SizeEvent_swiginit(self,_core_.new_SizeEvent(*args, **kwargs)) |
e811c8ce | 4963 | def GetSize(*args, **kwargs): |
5ba5649b RD |
4964 | """ |
4965 | GetSize(self) -> Size | |
4966 | ||
4967 | Returns the entire size of the window generating the size change | |
4968 | event. | |
4969 | """ | |
54f9ee45 | 4970 | return _core_.SizeEvent_GetSize(*args, **kwargs) |
e811c8ce RD |
4971 | |
4972 | def GetRect(*args, **kwargs): | |
a95a7133 | 4973 | """GetRect(self) -> Rect""" |
54f9ee45 | 4974 | return _core_.SizeEvent_GetRect(*args, **kwargs) |
e811c8ce RD |
4975 | |
4976 | def SetRect(*args, **kwargs): | |
a95a7133 | 4977 | """SetRect(self, Rect rect)""" |
54f9ee45 | 4978 | return _core_.SizeEvent_SetRect(*args, **kwargs) |
e811c8ce RD |
4979 | |
4980 | def SetSize(*args, **kwargs): | |
a95a7133 | 4981 | """SetSize(self, Size size)""" |
54f9ee45 | 4982 | return _core_.SizeEvent_SetSize(*args, **kwargs) |
e811c8ce | 4983 | |
54f9ee45 RD |
4984 | m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set) |
4985 | m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set) | |
0085ce49 RD |
4986 | SizeEvent_swigregister = _core_.SizeEvent_swigregister |
4987 | SizeEvent_swigregister(SizeEvent) | |
d14a1e28 RD |
4988 | |
4989 | #--------------------------------------------------------------------------- | |
4990 | ||
4991 | class MoveEvent(Event): | |
5ba5649b RD |
4992 | """ |
4993 | This event object is sent for EVT_MOVE event bindings when a window is | |
4994 | moved to a new position. | |
4995 | """ | |
0085ce49 RD |
4996 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
4997 | __repr__ = _swig_repr | |
4998 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
4999 | """ |
5000 | __init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent | |
5001 | ||
5002 | Constructor. | |
5003 | """ | |
0085ce49 | 5004 | _core_.MoveEvent_swiginit(self,_core_.new_MoveEvent(*args, **kwargs)) |
e811c8ce | 5005 | def GetPosition(*args, **kwargs): |
5ba5649b RD |
5006 | """ |
5007 | GetPosition(self) -> Point | |
5008 | ||
5009 | Returns the position of the window generating the move change event. | |
5010 | """ | |
54f9ee45 | 5011 | return _core_.MoveEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
5012 | |
5013 | def GetRect(*args, **kwargs): | |
a95a7133 | 5014 | """GetRect(self) -> Rect""" |
54f9ee45 | 5015 | return _core_.MoveEvent_GetRect(*args, **kwargs) |
e811c8ce RD |
5016 | |
5017 | def SetRect(*args, **kwargs): | |
a95a7133 | 5018 | """SetRect(self, Rect rect)""" |
54f9ee45 | 5019 | return _core_.MoveEvent_SetRect(*args, **kwargs) |
e811c8ce RD |
5020 | |
5021 | def SetPosition(*args, **kwargs): | |
a95a7133 | 5022 | """SetPosition(self, Point pos)""" |
54f9ee45 | 5023 | return _core_.MoveEvent_SetPosition(*args, **kwargs) |
e811c8ce | 5024 | |
7557b9b5 RD |
5025 | m_pos = property(GetPosition, SetPosition) |
5026 | m_rect = property(GetRect, SetRect) | |
5027 | ||
0085ce49 RD |
5028 | MoveEvent_swigregister = _core_.MoveEvent_swigregister |
5029 | MoveEvent_swigregister(MoveEvent) | |
d14a1e28 RD |
5030 | |
5031 | #--------------------------------------------------------------------------- | |
5032 | ||
5033 | class PaintEvent(Event): | |
5ba5649b RD |
5034 | """ |
5035 | A paint event is sent when a window's contents needs to be repainted. | |
5036 | Note that in an EVT_PAINT handler the application must *always* create | |
5037 | a `wx.PaintDC` object, even if you do not use it. Otherwise MS | |
5038 | Windows assumes that the window has not been painted yet and will send | |
5039 | the event again, causing endless refreshes. | |
5040 | ||
5041 | You can optimize painting by retrieving the rectangles that have been | |
5042 | damaged using `wx.Window.GetUpdateRegion` and/or `wx.RegionIterator`, | |
5043 | and only repainting these rectangles. The rectangles are in terms of | |
5044 | the client area, and are unscrolled, so you will need to do some | |
5045 | calculations using the current view position to obtain logical, | |
5046 | scrolled units. | |
5047 | ||
5048 | """ | |
0085ce49 RD |
5049 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5050 | __repr__ = _swig_repr | |
5051 | def __init__(self, *args, **kwargs): | |
a95a7133 | 5052 | """__init__(self, int Id=0) -> PaintEvent""" |
0085ce49 RD |
5053 | _core_.PaintEvent_swiginit(self,_core_.new_PaintEvent(*args, **kwargs)) |
5054 | PaintEvent_swigregister = _core_.PaintEvent_swigregister | |
5055 | PaintEvent_swigregister(PaintEvent) | |
d14a1e28 RD |
5056 | |
5057 | class NcPaintEvent(Event): | |
093d3ff1 | 5058 | """Proxy of C++ NcPaintEvent class""" |
0085ce49 RD |
5059 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5060 | __repr__ = _swig_repr | |
5061 | def __init__(self, *args, **kwargs): | |
a95a7133 | 5062 | """__init__(self, int winid=0) -> NcPaintEvent""" |
0085ce49 RD |
5063 | _core_.NcPaintEvent_swiginit(self,_core_.new_NcPaintEvent(*args, **kwargs)) |
5064 | NcPaintEvent_swigregister = _core_.NcPaintEvent_swigregister | |
5065 | NcPaintEvent_swigregister(NcPaintEvent) | |
d14a1e28 RD |
5066 | |
5067 | #--------------------------------------------------------------------------- | |
5068 | ||
5069 | class EraseEvent(Event): | |
5ba5649b RD |
5070 | """ |
5071 | An erase event is sent whenever the background of a window needs to be | |
5072 | repainted. To intercept this event use the EVT_ERASE_BACKGROUND event | |
5073 | binder. On some platforms, such as GTK+, this event is simulated | |
5074 | (simply generated just before the paint event) and may cause flicker. | |
5075 | ||
5076 | To paint a custom background use the `GetDC` method and use the returned | |
5077 | device context if it is not ``None``, otherwise create a temporary | |
5078 | `wx.ClientDC` and draw on that. | |
5079 | ||
5080 | """ | |
0085ce49 RD |
5081 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5082 | __repr__ = _swig_repr | |
5083 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5084 | """ |
5085 | __init__(self, int Id=0, DC dc=None) -> EraseEvent | |
5086 | ||
5087 | Constructor | |
5088 | """ | |
0085ce49 | 5089 | _core_.EraseEvent_swiginit(self,_core_.new_EraseEvent(*args, **kwargs)) |
e811c8ce | 5090 | def GetDC(*args, **kwargs): |
5ba5649b RD |
5091 | """ |
5092 | GetDC(self) -> DC | |
5093 | ||
5094 | Returns the device context the event handler should draw upon. If | |
5095 | ``None`` is returned then create a temporary `wx.ClientDC` and use | |
5096 | that instead. | |
5097 | """ | |
54f9ee45 | 5098 | return _core_.EraseEvent_GetDC(*args, **kwargs) |
e811c8ce | 5099 | |
0085ce49 RD |
5100 | EraseEvent_swigregister = _core_.EraseEvent_swigregister |
5101 | EraseEvent_swigregister(EraseEvent) | |
d14a1e28 RD |
5102 | |
5103 | #--------------------------------------------------------------------------- | |
5104 | ||
5105 | class FocusEvent(Event): | |
5ba5649b RD |
5106 | """ |
5107 | A focus event is sent when a window's focus changes. The window losing | |
5108 | focus receives an EVT_KILL_FOCUS event while the window gaining it | |
5109 | gets an EVT_SET_FOCUS event. | |
5110 | ||
5111 | Notice that the set focus event happens both when the user gives focus | |
5112 | to the window (whether using the mouse or keyboard) and when it is | |
5113 | done from the program itself using `wx.Window.SetFocus`. | |
5114 | ||
5115 | """ | |
0085ce49 RD |
5116 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5117 | __repr__ = _swig_repr | |
5118 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5119 | """ |
5120 | __init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent | |
5121 | ||
5122 | Constructor | |
5123 | """ | |
0085ce49 | 5124 | _core_.FocusEvent_swiginit(self,_core_.new_FocusEvent(*args, **kwargs)) |
e811c8ce | 5125 | def GetWindow(*args, **kwargs): |
5ba5649b RD |
5126 | """ |
5127 | GetWindow(self) -> Window | |
5128 | ||
5129 | Returns the other window associated with this event, that is the | |
5130 | window which had the focus before for the EVT_SET_FOCUS event and the | |
5131 | window which is going to receive focus for the wxEVT_KILL_FOCUS event. | |
5132 | ||
5133 | Warning: the window returned may be None! | |
5134 | """ | |
54f9ee45 | 5135 | return _core_.FocusEvent_GetWindow(*args, **kwargs) |
e811c8ce RD |
5136 | |
5137 | def SetWindow(*args, **kwargs): | |
a95a7133 | 5138 | """SetWindow(self, Window win)""" |
54f9ee45 | 5139 | return _core_.FocusEvent_SetWindow(*args, **kwargs) |
e811c8ce | 5140 | |
0085ce49 RD |
5141 | FocusEvent_swigregister = _core_.FocusEvent_swigregister |
5142 | FocusEvent_swigregister(FocusEvent) | |
d14a1e28 RD |
5143 | |
5144 | #--------------------------------------------------------------------------- | |
5145 | ||
5146 | class ChildFocusEvent(CommandEvent): | |
5ba5649b RD |
5147 | """ |
5148 | wx.ChildFocusEvent notifies the parent that a child has received the | |
5149 | focus. Unlike `wx.FocusEvent` it is propagated up the window | |
5150 | heirarchy. | |
5151 | """ | |
0085ce49 RD |
5152 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5153 | __repr__ = _swig_repr | |
5154 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5155 | """ |
5156 | __init__(self, Window win=None) -> ChildFocusEvent | |
5157 | ||
5158 | Constructor | |
5159 | """ | |
0085ce49 | 5160 | _core_.ChildFocusEvent_swiginit(self,_core_.new_ChildFocusEvent(*args, **kwargs)) |
e811c8ce | 5161 | def GetWindow(*args, **kwargs): |
5ba5649b RD |
5162 | """ |
5163 | GetWindow(self) -> Window | |
5164 | ||
5165 | The window which has just received the focus. | |
5166 | """ | |
54f9ee45 | 5167 | return _core_.ChildFocusEvent_GetWindow(*args, **kwargs) |
e811c8ce | 5168 | |
0085ce49 RD |
5169 | ChildFocusEvent_swigregister = _core_.ChildFocusEvent_swigregister |
5170 | ChildFocusEvent_swigregister(ChildFocusEvent) | |
d14a1e28 RD |
5171 | |
5172 | #--------------------------------------------------------------------------- | |
5173 | ||
5174 | class ActivateEvent(Event): | |
5ba5649b RD |
5175 | """ |
5176 | An activate event is sent when a top-level window or the entire | |
5177 | application is being activated or deactivated. | |
5178 | ||
5179 | A top-level window (a dialog or frame) receives an activate event when | |
5180 | is being activated or deactivated. This is indicated visually by the | |
5181 | title bar changing colour, and a subwindow gaining the keyboard focus. | |
5182 | An application is activated or deactivated when one of its frames | |
5183 | becomes activated, or a frame becomes inactivate resulting in all | |
5184 | application frames being inactive. | |
5185 | ||
5186 | Please note that usually you should call event.Skip() in your handlers | |
5187 | for these events so the default handlers will still be called, as not | |
5188 | doing so can result in strange effects. | |
5189 | ||
5190 | """ | |
0085ce49 RD |
5191 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5192 | __repr__ = _swig_repr | |
5193 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5194 | """ |
5195 | __init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent | |
5196 | ||
5197 | Constructor | |
5198 | """ | |
0085ce49 | 5199 | _core_.ActivateEvent_swiginit(self,_core_.new_ActivateEvent(*args, **kwargs)) |
e811c8ce | 5200 | def GetActive(*args, **kwargs): |
5ba5649b RD |
5201 | """ |
5202 | GetActive(self) -> bool | |
5203 | ||
5204 | Returns true if the application or window is being activated, false | |
5205 | otherwise. | |
5206 | """ | |
54f9ee45 | 5207 | return _core_.ActivateEvent_GetActive(*args, **kwargs) |
e811c8ce | 5208 | |
0085ce49 RD |
5209 | ActivateEvent_swigregister = _core_.ActivateEvent_swigregister |
5210 | ActivateEvent_swigregister(ActivateEvent) | |
d14a1e28 RD |
5211 | |
5212 | #--------------------------------------------------------------------------- | |
5213 | ||
5214 | class InitDialogEvent(Event): | |
5ba5649b RD |
5215 | """ |
5216 | A wx.InitDialogEvent is sent as a dialog is being initialised, or for | |
5217 | any window when `wx.Window.InitDialog` is called. Handlers for this | |
5218 | event can transfer data to the window, or anything else that should be | |
5219 | done before the user begins editing the form. The default handler | |
5220 | calls `wx.Window.TransferDataToWindow`. | |
5221 | """ | |
0085ce49 RD |
5222 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5223 | __repr__ = _swig_repr | |
5224 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5225 | """ |
5226 | __init__(self, int Id=0) -> InitDialogEvent | |
5227 | ||
5228 | Constructor | |
5229 | """ | |
0085ce49 RD |
5230 | _core_.InitDialogEvent_swiginit(self,_core_.new_InitDialogEvent(*args, **kwargs)) |
5231 | InitDialogEvent_swigregister = _core_.InitDialogEvent_swigregister | |
5232 | InitDialogEvent_swigregister(InitDialogEvent) | |
d14a1e28 RD |
5233 | |
5234 | #--------------------------------------------------------------------------- | |
5235 | ||
5236 | class MenuEvent(Event): | |
5ba5649b RD |
5237 | """ |
5238 | This class is used for a variety of menu-related events. Note that | |
5239 | these do not include menu command events, which are handled by sending | |
5240 | `wx.CommandEvent` objects. | |
5241 | ||
5242 | The default handler for wx.EVT_MENU_HIGHLIGHT displays menu item help | |
5243 | text in the first field of the status bar. | |
5244 | """ | |
0085ce49 RD |
5245 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5246 | __repr__ = _swig_repr | |
5247 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5248 | """ |
5249 | __init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent | |
5250 | ||
5251 | Constructor | |
5252 | """ | |
0085ce49 | 5253 | _core_.MenuEvent_swiginit(self,_core_.new_MenuEvent(*args, **kwargs)) |
e811c8ce | 5254 | def GetMenuId(*args, **kwargs): |
5ba5649b RD |
5255 | """ |
5256 | GetMenuId(self) -> int | |
5257 | ||
5258 | Returns the menu identifier associated with the event. This method | |
5259 | should be only used with the HIGHLIGHT events. | |
5260 | """ | |
54f9ee45 | 5261 | return _core_.MenuEvent_GetMenuId(*args, **kwargs) |
e811c8ce RD |
5262 | |
5263 | def IsPopup(*args, **kwargs): | |
5ba5649b RD |
5264 | """ |
5265 | IsPopup(self) -> bool | |
5266 | ||
5267 | Returns ``True`` if the menu which is being opened or closed is a | |
5268 | popup menu, ``False`` if it is a normal one. This method should only | |
5269 | be used with the OPEN and CLOSE events. | |
5270 | """ | |
54f9ee45 | 5271 | return _core_.MenuEvent_IsPopup(*args, **kwargs) |
e811c8ce RD |
5272 | |
5273 | def GetMenu(*args, **kwargs): | |
5ba5649b RD |
5274 | """ |
5275 | GetMenu(self) -> Menu | |
5276 | ||
5277 | Returns the menu which is being opened or closed. This method should | |
5278 | only be used with the OPEN and CLOSE events. | |
5279 | """ | |
54f9ee45 | 5280 | return _core_.MenuEvent_GetMenu(*args, **kwargs) |
e811c8ce | 5281 | |
0085ce49 RD |
5282 | MenuEvent_swigregister = _core_.MenuEvent_swigregister |
5283 | MenuEvent_swigregister(MenuEvent) | |
d14a1e28 RD |
5284 | |
5285 | #--------------------------------------------------------------------------- | |
5286 | ||
5287 | class CloseEvent(Event): | |
5ba5649b RD |
5288 | """ |
5289 | This event class contains information about window and session close | |
5290 | events. | |
5291 | ||
5292 | The handler function for EVT_CLOSE is called when the user has tried | |
5293 | to close a a frame or dialog box using the window manager controls or | |
5294 | the system menu. It can also be invoked by the application itself | |
5295 | programmatically, for example by calling the `wx.Window.Close` | |
5296 | function. | |
5297 | ||
5298 | You should check whether the application is forcing the deletion of | |
5299 | the window using `CanVeto`. If it returns ``False``, you must destroy | |
5300 | the window using `wx.Window.Destroy`. If the return value is ``True``, | |
5301 | it is up to you whether you respond by destroying the window or not. | |
5302 | For example you may wish to display a message dialog prompting to save | |
5303 | files or to cancel the close. | |
5304 | ||
5305 | If you don't destroy the window, you should call `Veto` to let the | |
5306 | calling code know that you did not destroy the window. This allows the | |
5307 | `wx.Window.Close` function to return ``True`` or ``False`` depending | |
5308 | on whether the close instruction was honored or not. | |
5309 | """ | |
0085ce49 RD |
5310 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5311 | __repr__ = _swig_repr | |
5312 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5313 | """ |
5314 | __init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent | |
5315 | ||
5316 | Constructor. | |
5317 | """ | |
0085ce49 | 5318 | _core_.CloseEvent_swiginit(self,_core_.new_CloseEvent(*args, **kwargs)) |
e811c8ce | 5319 | def SetLoggingOff(*args, **kwargs): |
5ba5649b RD |
5320 | """ |
5321 | SetLoggingOff(self, bool logOff) | |
5322 | ||
5323 | Sets the 'logging off' flag. | |
5324 | """ | |
54f9ee45 | 5325 | return _core_.CloseEvent_SetLoggingOff(*args, **kwargs) |
e811c8ce RD |
5326 | |
5327 | def GetLoggingOff(*args, **kwargs): | |
5ba5649b RD |
5328 | """ |
5329 | GetLoggingOff(self) -> bool | |
5330 | ||
6c75a4cf RD |
5331 | Returns ``True`` if the user is logging off or ``False`` if the |
5332 | system is shutting down. This method can only be called for end | |
5333 | session and query end session events, it doesn't make sense for close | |
5334 | window event. | |
5ba5649b | 5335 | """ |
54f9ee45 | 5336 | return _core_.CloseEvent_GetLoggingOff(*args, **kwargs) |
e811c8ce RD |
5337 | |
5338 | def Veto(*args, **kwargs): | |
5ba5649b RD |
5339 | """ |
5340 | Veto(self, bool veto=True) | |
5341 | ||
5342 | Call this from your event handler to veto a system shutdown or to | |
5343 | signal to the calling application that a window close did not happen. | |
5344 | ||
5345 | You can only veto a shutdown or close if `CanVeto` returns true. | |
5346 | """ | |
54f9ee45 | 5347 | return _core_.CloseEvent_Veto(*args, **kwargs) |
e811c8ce | 5348 | |
5ba5649b RD |
5349 | def GetVeto(*args, **kwargs): |
5350 | """GetVeto(self) -> bool""" | |
5351 | return _core_.CloseEvent_GetVeto(*args, **kwargs) | |
5352 | ||
e811c8ce | 5353 | def SetCanVeto(*args, **kwargs): |
5ba5649b RD |
5354 | """ |
5355 | SetCanVeto(self, bool canVeto) | |
5356 | ||
5357 | Sets the 'can veto' flag. | |
5358 | """ | |
54f9ee45 | 5359 | return _core_.CloseEvent_SetCanVeto(*args, **kwargs) |
e811c8ce RD |
5360 | |
5361 | def CanVeto(*args, **kwargs): | |
5ba5649b RD |
5362 | """ |
5363 | CanVeto(self) -> bool | |
e811c8ce | 5364 | |
5ba5649b RD |
5365 | Returns true if you can veto a system shutdown or a window close |
5366 | event. Vetoing a window close event is not possible if the calling | |
5367 | code wishes to force the application to exit, and so this function | |
5368 | must be called to check this. | |
5369 | """ | |
5370 | return _core_.CloseEvent_CanVeto(*args, **kwargs) | |
e811c8ce | 5371 | |
0085ce49 RD |
5372 | CloseEvent_swigregister = _core_.CloseEvent_swigregister |
5373 | CloseEvent_swigregister(CloseEvent) | |
d14a1e28 RD |
5374 | |
5375 | #--------------------------------------------------------------------------- | |
5376 | ||
5377 | class ShowEvent(Event): | |
5ba5649b | 5378 | """An EVT_SHOW event is sent when a window is shown or hidden.""" |
0085ce49 RD |
5379 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5380 | __repr__ = _swig_repr | |
5381 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5382 | """ |
5383 | __init__(self, int winid=0, bool show=False) -> ShowEvent | |
5384 | ||
5385 | An EVT_SHOW event is sent when a window is shown or hidden. | |
5386 | """ | |
0085ce49 | 5387 | _core_.ShowEvent_swiginit(self,_core_.new_ShowEvent(*args, **kwargs)) |
e811c8ce | 5388 | def SetShow(*args, **kwargs): |
a95a7133 | 5389 | """SetShow(self, bool show)""" |
54f9ee45 | 5390 | return _core_.ShowEvent_SetShow(*args, **kwargs) |
e811c8ce RD |
5391 | |
5392 | def GetShow(*args, **kwargs): | |
a95a7133 | 5393 | """GetShow(self) -> bool""" |
54f9ee45 | 5394 | return _core_.ShowEvent_GetShow(*args, **kwargs) |
e811c8ce | 5395 | |
0085ce49 RD |
5396 | ShowEvent_swigregister = _core_.ShowEvent_swigregister |
5397 | ShowEvent_swigregister(ShowEvent) | |
d14a1e28 RD |
5398 | |
5399 | #--------------------------------------------------------------------------- | |
5400 | ||
5401 | class IconizeEvent(Event): | |
5ba5649b RD |
5402 | """ |
5403 | An EVT_ICONIZE event is sent when a frame is iconized (minimized) or | |
5404 | restored. | |
5405 | """ | |
0085ce49 RD |
5406 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5407 | __repr__ = _swig_repr | |
5408 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5409 | """ |
5410 | __init__(self, int id=0, bool iconized=True) -> IconizeEvent | |
5411 | ||
5412 | An EVT_ICONIZE event is sent when a frame is iconized (minimized) or | |
5413 | restored. | |
5414 | """ | |
0085ce49 | 5415 | _core_.IconizeEvent_swiginit(self,_core_.new_IconizeEvent(*args, **kwargs)) |
e811c8ce | 5416 | def Iconized(*args, **kwargs): |
5ba5649b RD |
5417 | """ |
5418 | Iconized(self) -> bool | |
5419 | ||
5420 | Returns ``True`` if the frame has been iconized, ``False`` if it has | |
5421 | been restored. | |
5422 | """ | |
54f9ee45 | 5423 | return _core_.IconizeEvent_Iconized(*args, **kwargs) |
e811c8ce | 5424 | |
0085ce49 RD |
5425 | IconizeEvent_swigregister = _core_.IconizeEvent_swigregister |
5426 | IconizeEvent_swigregister(IconizeEvent) | |
d14a1e28 RD |
5427 | |
5428 | #--------------------------------------------------------------------------- | |
5429 | ||
5430 | class MaximizeEvent(Event): | |
5ba5649b | 5431 | """An EVT_MAXIMIZE event is sent when a frame is maximized or restored.""" |
0085ce49 RD |
5432 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5433 | __repr__ = _swig_repr | |
5434 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5435 | """ |
5436 | __init__(self, int id=0) -> MaximizeEvent | |
5437 | ||
5438 | An EVT_MAXIMIZE event is sent when a frame is maximized or restored. | |
5439 | """ | |
0085ce49 RD |
5440 | _core_.MaximizeEvent_swiginit(self,_core_.new_MaximizeEvent(*args, **kwargs)) |
5441 | MaximizeEvent_swigregister = _core_.MaximizeEvent_swigregister | |
5442 | MaximizeEvent_swigregister(MaximizeEvent) | |
d14a1e28 RD |
5443 | |
5444 | #--------------------------------------------------------------------------- | |
5445 | ||
5446 | class DropFilesEvent(Event): | |
5ba5649b RD |
5447 | """ |
5448 | This class is used for drop files events, that is, when files have | |
5449 | been dropped onto the window. This functionality is only available | |
5450 | under Windows. The window must have previously been enabled for | |
5451 | dropping by calling `wx.Window.DragAcceptFiles`. | |
5452 | ||
5453 | Important note: this is a separate implementation to the more general | |
5454 | drag and drop implementation using `wx.FileDropTarget`, and etc. This | |
5455 | implementation uses the older, Windows message-based approach of | |
5456 | dropping files. | |
5457 | ||
5458 | Use wx.EVT_DROP_FILES to bind an event handler to receive file drop | |
5459 | events. | |
5460 | ||
5461 | """ | |
0085ce49 RD |
5462 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5463 | def __init__(self): raise AttributeError, "No constructor defined" | |
5464 | __repr__ = _swig_repr | |
e811c8ce | 5465 | def GetPosition(*args, **kwargs): |
5ba5649b RD |
5466 | """ |
5467 | GetPosition(self) -> Point | |
5468 | ||
5469 | Returns the position at which the files were dropped. | |
5470 | """ | |
54f9ee45 | 5471 | return _core_.DropFilesEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
5472 | |
5473 | def GetNumberOfFiles(*args, **kwargs): | |
5ba5649b RD |
5474 | """ |
5475 | GetNumberOfFiles(self) -> int | |
5476 | ||
5477 | Returns the number of files dropped. | |
5478 | """ | |
54f9ee45 | 5479 | return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs) |
e811c8ce RD |
5480 | |
5481 | def GetFiles(*args, **kwargs): | |
5ba5649b RD |
5482 | """ |
5483 | GetFiles(self) -> PyObject | |
5484 | ||
5485 | Returns a list of the filenames that were dropped. | |
5486 | """ | |
54f9ee45 | 5487 | return _core_.DropFilesEvent_GetFiles(*args, **kwargs) |
e811c8ce | 5488 | |
0085ce49 RD |
5489 | DropFilesEvent_swigregister = _core_.DropFilesEvent_swigregister |
5490 | DropFilesEvent_swigregister(DropFilesEvent) | |
d14a1e28 RD |
5491 | |
5492 | #--------------------------------------------------------------------------- | |
5493 | ||
54f9ee45 RD |
5494 | UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL |
5495 | UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED | |
d14a1e28 | 5496 | class UpdateUIEvent(CommandEvent): |
5ba5649b RD |
5497 | """ |
5498 | This class is used for EVT_UPDATE_UI pseudo-events which are sent by | |
5499 | wxWidgets to give an application the chance to update various user | |
5500 | interface elements. | |
5501 | ||
5502 | Without update UI events, an application has to work hard to | |
5503 | check/uncheck, enable/disable, and set the text for elements such as | |
5504 | menu items and toolbar buttons. The code for doing this has to be | |
5505 | mixed up with the code that is invoked when an action is invoked for a | |
5506 | menu item or button. | |
5507 | ||
5508 | With update UI events, you define an event handler to look at the | |
5509 | state of the application and change UI elements accordingly. wxWidgets | |
5510 | will call your handler functions in idle time, so you don't have to | |
5511 | worry where to call this code. In addition to being a clearer and more | |
5512 | declarative method, it also means you don't have to worry whether | |
5513 | you're updating a toolbar or menubar identifier. The same handler can | |
5514 | update a menu item and toolbar button, if the ID values are the same. | |
5515 | ||
5516 | Instead of directly manipulating the menu or button, you call | |
5517 | functions in the event object, such as `Check`. wxWidgets will | |
5518 | determine whether such a call has been made, and which UI element to | |
5519 | update. | |
5520 | ||
5521 | These events will work for popup menus as well as menubars. Just | |
5522 | before a menu is popped up, `wx.Menu.UpdateUI` is called to process | |
5523 | any UI events for the window that owns the menu. | |
5524 | ||
5525 | If you find that the overhead of UI update processing is affecting | |
5526 | your application, you can do one or both of the following: | |
5527 | ||
5528 | 1. Call `wx.UpdateUIEvent.SetMode` with a value of | |
5529 | wx.UPDATE_UI_PROCESS_SPECIFIED, and set the extra style | |
5530 | wx.WS_EX_PROCESS_UPDATE_EVENTS for every window that should | |
5531 | receive update events. No other windows will receive update | |
5532 | events. | |
5533 | ||
5534 | 2. Call `wx.UpdateUIEvent.SetUpdateInterval` with a millisecond | |
5535 | value to set the delay between updates. You may need to call | |
5536 | `wx.Window.UpdateWindowUI` at critical points, for example when | |
5537 | a dialog is about to be shown, in case the user sees a slight | |
5538 | delay before windows are updated. | |
5539 | ||
5540 | Note that although events are sent in idle time, defining a EVT_IDLE | |
5541 | handler for a window does not affect this because the events are sent | |
5542 | from an internal idle handler. | |
5543 | ||
5544 | wxWidgets tries to optimize update events on some platforms. On | |
5545 | Windows and GTK+, events for menubar items are only sent when the menu | |
5546 | is about to be shown, and not in idle time. | |
5547 | ||
5548 | """ | |
0085ce49 RD |
5549 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5550 | __repr__ = _swig_repr | |
5551 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5552 | """ |
5553 | __init__(self, int commandId=0) -> UpdateUIEvent | |
5554 | ||
5555 | Constructor | |
5556 | """ | |
0085ce49 | 5557 | _core_.UpdateUIEvent_swiginit(self,_core_.new_UpdateUIEvent(*args, **kwargs)) |
e811c8ce | 5558 | def GetChecked(*args, **kwargs): |
5ba5649b RD |
5559 | """ |
5560 | GetChecked(self) -> bool | |
5561 | ||
5562 | Returns ``True`` if the UI element should be checked. | |
5563 | """ | |
54f9ee45 | 5564 | return _core_.UpdateUIEvent_GetChecked(*args, **kwargs) |
e811c8ce RD |
5565 | |
5566 | def GetEnabled(*args, **kwargs): | |
5ba5649b RD |
5567 | """ |
5568 | GetEnabled(self) -> bool | |
5569 | ||
5570 | Returns ``True`` if the UI element should be enabled. | |
5571 | """ | |
54f9ee45 | 5572 | return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs) |
e811c8ce | 5573 | |
b1fcee84 RD |
5574 | def GetShown(*args, **kwargs): |
5575 | """ | |
5576 | GetShown(self) -> bool | |
5577 | ||
5578 | Returns ``True`` if the UI element should be shown. | |
5579 | """ | |
5580 | return _core_.UpdateUIEvent_GetShown(*args, **kwargs) | |
5581 | ||
e811c8ce | 5582 | def GetText(*args, **kwargs): |
5ba5649b RD |
5583 | """ |
5584 | GetText(self) -> String | |
5585 | ||
5586 | Returns the text that should be set for the UI element. | |
5587 | """ | |
54f9ee45 | 5588 | return _core_.UpdateUIEvent_GetText(*args, **kwargs) |
e811c8ce RD |
5589 | |
5590 | def GetSetText(*args, **kwargs): | |
5ba5649b RD |
5591 | """ |
5592 | GetSetText(self) -> bool | |
5593 | ||
5594 | Returns ``True`` if the application has called `SetText`. For | |
5595 | wxWidgets internal use only. | |
5596 | """ | |
54f9ee45 | 5597 | return _core_.UpdateUIEvent_GetSetText(*args, **kwargs) |
e811c8ce RD |
5598 | |
5599 | def GetSetChecked(*args, **kwargs): | |
5ba5649b RD |
5600 | """ |
5601 | GetSetChecked(self) -> bool | |
5602 | ||
5603 | Returns ``True`` if the application has called `Check`. For wxWidgets | |
5604 | internal use only. | |
5605 | """ | |
54f9ee45 | 5606 | return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs) |
e811c8ce RD |
5607 | |
5608 | def GetSetEnabled(*args, **kwargs): | |
5ba5649b RD |
5609 | """ |
5610 | GetSetEnabled(self) -> bool | |
5611 | ||
5612 | Returns ``True`` if the application has called `Enable`. For wxWidgets | |
5613 | internal use only. | |
5614 | """ | |
54f9ee45 | 5615 | return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs) |
e811c8ce | 5616 | |
b1fcee84 RD |
5617 | def GetSetShown(*args, **kwargs): |
5618 | """ | |
5619 | GetSetShown(self) -> bool | |
5620 | ||
5621 | Returns ``True`` if the application has called `Show`. For wxWidgets | |
5622 | internal use only. | |
5623 | """ | |
5624 | return _core_.UpdateUIEvent_GetSetShown(*args, **kwargs) | |
5625 | ||
e811c8ce | 5626 | def Check(*args, **kwargs): |
5ba5649b RD |
5627 | """ |
5628 | Check(self, bool check) | |
5629 | ||
5630 | Check or uncheck the UI element. | |
5631 | """ | |
54f9ee45 | 5632 | return _core_.UpdateUIEvent_Check(*args, **kwargs) |
e811c8ce RD |
5633 | |
5634 | def Enable(*args, **kwargs): | |
5ba5649b RD |
5635 | """ |
5636 | Enable(self, bool enable) | |
5637 | ||
5638 | Enable or disable the UI element. | |
5639 | """ | |
54f9ee45 | 5640 | return _core_.UpdateUIEvent_Enable(*args, **kwargs) |
e811c8ce | 5641 | |
b1fcee84 RD |
5642 | def Show(*args, **kwargs): |
5643 | """ | |
5644 | Show(self, bool show) | |
5645 | ||
5646 | Show or hide the UI element. | |
5647 | """ | |
5648 | return _core_.UpdateUIEvent_Show(*args, **kwargs) | |
5649 | ||
e811c8ce | 5650 | def SetText(*args, **kwargs): |
5ba5649b RD |
5651 | """ |
5652 | SetText(self, String text) | |
5653 | ||
5654 | Sets the text for this UI element. | |
5655 | """ | |
54f9ee45 | 5656 | return _core_.UpdateUIEvent_SetText(*args, **kwargs) |
e811c8ce RD |
5657 | |
5658 | def SetUpdateInterval(*args, **kwargs): | |
5ba5649b RD |
5659 | """ |
5660 | SetUpdateInterval(long updateInterval) | |
5661 | ||
5662 | Sets the interval between updates in milliseconds. Set to -1 to | |
5663 | disable updates, or to 0 to update as frequently as possible. The | |
5664 | default is 0. | |
5665 | ||
5666 | Use this to reduce the overhead of UI update events if your | |
5667 | application has a lot of windows. If you set the value to -1 or | |
5668 | greater than 0, you may also need to call `wx.Window.UpdateWindowUI` | |
5669 | at appropriate points in your application, such as when a dialog is | |
5670 | about to be shown. | |
5671 | """ | |
54f9ee45 | 5672 | return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) |
e811c8ce RD |
5673 | |
5674 | SetUpdateInterval = staticmethod(SetUpdateInterval) | |
5675 | def GetUpdateInterval(*args, **kwargs): | |
5ba5649b RD |
5676 | """ |
5677 | GetUpdateInterval() -> long | |
5678 | ||
5679 | Returns the current interval between updates in milliseconds. -1 | |
5680 | disables updates, 0 updates as frequently as possible. | |
5681 | """ | |
54f9ee45 | 5682 | return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) |
e811c8ce RD |
5683 | |
5684 | GetUpdateInterval = staticmethod(GetUpdateInterval) | |
5685 | def CanUpdate(*args, **kwargs): | |
5ba5649b RD |
5686 | """ |
5687 | CanUpdate(Window win) -> bool | |
5688 | ||
5689 | Returns ``True`` if it is appropriate to update (send UI update events | |
5690 | to) this window. | |
5691 | ||
5692 | This function looks at the mode used (see `wx.UpdateUIEvent.SetMode`), | |
5693 | the wx.WS_EX_PROCESS_UPDATE_EVENTS flag in window, the time update | |
5694 | events were last sent in idle time, and the update interval, to | |
5695 | determine whether events should be sent to this window now. By default | |
5696 | this will always return true because the update mode is initially | |
5697 | wx.UPDATE_UI_PROCESS_ALL and the interval is set to 0; so update | |
5698 | events will be sent as often as possible. You can reduce the frequency | |
5699 | that events are sent by changing the mode and/or setting an update | |
5700 | interval. | |
5701 | ||
5702 | """ | |
54f9ee45 | 5703 | return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) |
e811c8ce RD |
5704 | |
5705 | CanUpdate = staticmethod(CanUpdate) | |
5706 | def ResetUpdateTime(*args, **kwargs): | |
5ba5649b RD |
5707 | """ |
5708 | ResetUpdateTime() | |
5709 | ||
5710 | Used internally to reset the last-updated time to the current time. It | |
5711 | is assumed that update events are normally sent in idle time, so this | |
5712 | is called at the end of idle processing. | |
5713 | """ | |
54f9ee45 | 5714 | return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) |
e811c8ce RD |
5715 | |
5716 | ResetUpdateTime = staticmethod(ResetUpdateTime) | |
5717 | def SetMode(*args, **kwargs): | |
5ba5649b RD |
5718 | """ |
5719 | SetMode(int mode) | |
5720 | ||
5721 | Specify how wxWidgets will send update events: to all windows, or only | |
5722 | to those which specify that they will process the events. | |
5723 | ||
5724 | The mode may be one of the following values: | |
5725 | ||
5726 | ============================= ========================================== | |
5727 | wxUPDATE_UI_PROCESS_ALL Send UI update events to all windows. This | |
5728 | is the default setting. | |
5729 | wxUPDATE_UI_PROCESS_SPECIFIED Send UI update events only to windows that | |
5730 | have the wx.WS_EX_PROCESS_UI_UPDATES extra | |
5731 | style set. | |
5732 | ============================= ========================================== | |
5733 | ||
5734 | """ | |
54f9ee45 | 5735 | return _core_.UpdateUIEvent_SetMode(*args, **kwargs) |
e811c8ce RD |
5736 | |
5737 | SetMode = staticmethod(SetMode) | |
5738 | def GetMode(*args, **kwargs): | |
5ba5649b RD |
5739 | """ |
5740 | GetMode() -> int | |
5741 | ||
5742 | Returns a value specifying how wxWidgets will send update events: to | |
5743 | all windows, or only to those which specify that they will process the | |
5744 | events. | |
5745 | """ | |
54f9ee45 | 5746 | return _core_.UpdateUIEvent_GetMode(*args, **kwargs) |
e811c8ce RD |
5747 | |
5748 | GetMode = staticmethod(GetMode) | |
0085ce49 RD |
5749 | UpdateUIEvent_swigregister = _core_.UpdateUIEvent_swigregister |
5750 | UpdateUIEvent_swigregister(UpdateUIEvent) | |
d14a1e28 | 5751 | |
e811c8ce | 5752 | def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): |
0085ce49 | 5753 | """ |
5ba5649b RD |
5754 | UpdateUIEvent_SetUpdateInterval(long updateInterval) |
5755 | ||
5756 | Sets the interval between updates in milliseconds. Set to -1 to | |
5757 | disable updates, or to 0 to update as frequently as possible. The | |
5758 | default is 0. | |
5759 | ||
5760 | Use this to reduce the overhead of UI update events if your | |
5761 | application has a lot of windows. If you set the value to -1 or | |
5762 | greater than 0, you may also need to call `wx.Window.UpdateWindowUI` | |
5763 | at appropriate points in your application, such as when a dialog is | |
5764 | about to be shown. | |
5765 | """ | |
0085ce49 | 5766 | return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) |
d14a1e28 | 5767 | |
0085ce49 RD |
5768 | def UpdateUIEvent_GetUpdateInterval(*args): |
5769 | """ | |
5ba5649b RD |
5770 | UpdateUIEvent_GetUpdateInterval() -> long |
5771 | ||
5772 | Returns the current interval between updates in milliseconds. -1 | |
5773 | disables updates, 0 updates as frequently as possible. | |
5774 | """ | |
0085ce49 | 5775 | return _core_.UpdateUIEvent_GetUpdateInterval(*args) |
d14a1e28 | 5776 | |
e811c8ce | 5777 | def UpdateUIEvent_CanUpdate(*args, **kwargs): |
0085ce49 | 5778 | """ |
5ba5649b RD |
5779 | UpdateUIEvent_CanUpdate(Window win) -> bool |
5780 | ||
5781 | Returns ``True`` if it is appropriate to update (send UI update events | |
5782 | to) this window. | |
5783 | ||
5784 | This function looks at the mode used (see `wx.UpdateUIEvent.SetMode`), | |
5785 | the wx.WS_EX_PROCESS_UPDATE_EVENTS flag in window, the time update | |
5786 | events were last sent in idle time, and the update interval, to | |
5787 | determine whether events should be sent to this window now. By default | |
5788 | this will always return true because the update mode is initially | |
5789 | wx.UPDATE_UI_PROCESS_ALL and the interval is set to 0; so update | |
5790 | events will be sent as often as possible. You can reduce the frequency | |
5791 | that events are sent by changing the mode and/or setting an update | |
5792 | interval. | |
5793 | ||
5794 | """ | |
0085ce49 | 5795 | return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) |
d14a1e28 | 5796 | |
0085ce49 RD |
5797 | def UpdateUIEvent_ResetUpdateTime(*args): |
5798 | """ | |
5ba5649b RD |
5799 | UpdateUIEvent_ResetUpdateTime() |
5800 | ||
5801 | Used internally to reset the last-updated time to the current time. It | |
5802 | is assumed that update events are normally sent in idle time, so this | |
5803 | is called at the end of idle processing. | |
5804 | """ | |
0085ce49 | 5805 | return _core_.UpdateUIEvent_ResetUpdateTime(*args) |
d14a1e28 | 5806 | |
e811c8ce | 5807 | def UpdateUIEvent_SetMode(*args, **kwargs): |
0085ce49 | 5808 | """ |
5ba5649b RD |
5809 | UpdateUIEvent_SetMode(int mode) |
5810 | ||
5811 | Specify how wxWidgets will send update events: to all windows, or only | |
5812 | to those which specify that they will process the events. | |
5813 | ||
5814 | The mode may be one of the following values: | |
5815 | ||
5816 | ============================= ========================================== | |
5817 | wxUPDATE_UI_PROCESS_ALL Send UI update events to all windows. This | |
5818 | is the default setting. | |
5819 | wxUPDATE_UI_PROCESS_SPECIFIED Send UI update events only to windows that | |
5820 | have the wx.WS_EX_PROCESS_UI_UPDATES extra | |
5821 | style set. | |
5822 | ============================= ========================================== | |
5823 | ||
5824 | """ | |
0085ce49 | 5825 | return _core_.UpdateUIEvent_SetMode(*args, **kwargs) |
d14a1e28 | 5826 | |
0085ce49 RD |
5827 | def UpdateUIEvent_GetMode(*args): |
5828 | """ | |
5ba5649b RD |
5829 | UpdateUIEvent_GetMode() -> int |
5830 | ||
5831 | Returns a value specifying how wxWidgets will send update events: to | |
5832 | all windows, or only to those which specify that they will process the | |
5833 | events. | |
5834 | """ | |
0085ce49 | 5835 | return _core_.UpdateUIEvent_GetMode(*args) |
d14a1e28 RD |
5836 | |
5837 | #--------------------------------------------------------------------------- | |
5838 | ||
5839 | class SysColourChangedEvent(Event): | |
5ba5649b RD |
5840 | """ |
5841 | This class is used for EVT_SYS_COLOUR_CHANGED, which are generated | |
5842 | when the user changes the colour settings using the control | |
5843 | panel. This is only applicable under Windows. | |
5844 | ||
5845 | The default event handler for this event propagates the event to child | |
5846 | windows, since Windows only sends the events to top-level windows. If | |
5847 | intercepting this event for a top-level window, remember to call | |
5848 | `Skip` so the the base class handler will still be executed, or to | |
5849 | pass the event on to the window's children explicitly. | |
5850 | ||
5851 | """ | |
0085ce49 RD |
5852 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5853 | __repr__ = _swig_repr | |
5854 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5855 | """ |
5856 | __init__(self) -> SysColourChangedEvent | |
5857 | ||
5858 | Constructor | |
5859 | """ | |
0085ce49 RD |
5860 | _core_.SysColourChangedEvent_swiginit(self,_core_.new_SysColourChangedEvent(*args, **kwargs)) |
5861 | SysColourChangedEvent_swigregister = _core_.SysColourChangedEvent_swigregister | |
5862 | SysColourChangedEvent_swigregister(SysColourChangedEvent) | |
d14a1e28 RD |
5863 | |
5864 | #--------------------------------------------------------------------------- | |
5865 | ||
5866 | class MouseCaptureChangedEvent(Event): | |
5ba5649b RD |
5867 | """ |
5868 | An mouse capture changed event (EVT_MOUSE_CAPTURE_CHANGED) is sent to | |
5869 | a window that loses its mouse capture. This is called even if | |
5870 | `wx.Window.ReleaseMouse` was called by the application code. Handling | |
5871 | this event allows an application to cater for unexpected capture | |
5872 | releases which might otherwise confuse mouse handling code. | |
5873 | ||
5874 | This event is implemented under Windows only. | |
5875 | """ | |
0085ce49 RD |
5876 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5877 | __repr__ = _swig_repr | |
5878 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5879 | """ |
5880 | __init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent | |
5881 | ||
5882 | Constructor | |
5883 | """ | |
0085ce49 | 5884 | _core_.MouseCaptureChangedEvent_swiginit(self,_core_.new_MouseCaptureChangedEvent(*args, **kwargs)) |
e811c8ce | 5885 | def GetCapturedWindow(*args, **kwargs): |
5ba5649b RD |
5886 | """ |
5887 | GetCapturedWindow(self) -> Window | |
5888 | ||
5889 | Returns the window that gained the capture, or ``None`` if it was a | |
5890 | non-wxWidgets window. | |
5891 | """ | |
54f9ee45 | 5892 | return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs) |
e811c8ce | 5893 | |
0085ce49 RD |
5894 | MouseCaptureChangedEvent_swigregister = _core_.MouseCaptureChangedEvent_swigregister |
5895 | MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEvent) | |
d14a1e28 RD |
5896 | |
5897 | #--------------------------------------------------------------------------- | |
5898 | ||
5899 | class DisplayChangedEvent(Event): | |
5ba5649b RD |
5900 | """ |
5901 | An EVT_DISPLAY_CHANGED event is sent to all windows when the display | |
5902 | resolution has changed. | |
5903 | ||
5904 | This event is implemented under Windows only. | |
5905 | """ | |
0085ce49 RD |
5906 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5907 | __repr__ = _swig_repr | |
5908 | def __init__(self, *args, **kwargs): | |
a95a7133 | 5909 | """__init__(self) -> DisplayChangedEvent""" |
0085ce49 RD |
5910 | _core_.DisplayChangedEvent_swiginit(self,_core_.new_DisplayChangedEvent(*args, **kwargs)) |
5911 | DisplayChangedEvent_swigregister = _core_.DisplayChangedEvent_swigregister | |
5912 | DisplayChangedEvent_swigregister(DisplayChangedEvent) | |
d14a1e28 RD |
5913 | |
5914 | #--------------------------------------------------------------------------- | |
5915 | ||
5916 | class PaletteChangedEvent(Event): | |
5ba5649b RD |
5917 | """ |
5918 | An EVT_PALETTE_CHANGED event is sent when the system palette has | |
5919 | changed, thereby giving each window a chance to redo their own to | |
5920 | match. | |
5921 | ||
5922 | This event is implemented under Windows only. | |
5923 | """ | |
0085ce49 RD |
5924 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5925 | __repr__ = _swig_repr | |
5926 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5927 | """ |
5928 | __init__(self, int id=0) -> PaletteChangedEvent | |
5929 | ||
5930 | An EVT_PALETTE_CHANGED event is sent when the system palette has | |
5931 | changed, thereby giving each window a chance to redo their own to | |
5932 | match. | |
5933 | ||
5934 | This event is implemented under Windows only. | |
5935 | """ | |
0085ce49 | 5936 | _core_.PaletteChangedEvent_swiginit(self,_core_.new_PaletteChangedEvent(*args, **kwargs)) |
e811c8ce | 5937 | def SetChangedWindow(*args, **kwargs): |
a95a7133 | 5938 | """SetChangedWindow(self, Window win)""" |
54f9ee45 | 5939 | return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs) |
e811c8ce RD |
5940 | |
5941 | def GetChangedWindow(*args, **kwargs): | |
a95a7133 | 5942 | """GetChangedWindow(self) -> Window""" |
54f9ee45 | 5943 | return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs) |
e811c8ce | 5944 | |
0085ce49 RD |
5945 | PaletteChangedEvent_swigregister = _core_.PaletteChangedEvent_swigregister |
5946 | PaletteChangedEvent_swigregister(PaletteChangedEvent) | |
d14a1e28 RD |
5947 | |
5948 | #--------------------------------------------------------------------------- | |
5949 | ||
5950 | class QueryNewPaletteEvent(Event): | |
5ba5649b RD |
5951 | """ |
5952 | An EVT_QUERY_NEW_PALETE event indicates the window is getting keyboard | |
5953 | focus and should re-do its palette. | |
5954 | ||
5955 | This event is implemented under Windows only. | |
5956 | """ | |
0085ce49 RD |
5957 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5958 | __repr__ = _swig_repr | |
5959 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
5960 | """ |
5961 | __init__(self, int winid=0) -> QueryNewPaletteEvent | |
5962 | ||
5963 | Constructor. | |
5964 | """ | |
0085ce49 | 5965 | _core_.QueryNewPaletteEvent_swiginit(self,_core_.new_QueryNewPaletteEvent(*args, **kwargs)) |
e811c8ce | 5966 | def SetPaletteRealized(*args, **kwargs): |
5ba5649b RD |
5967 | """ |
5968 | SetPaletteRealized(self, bool realized) | |
5969 | ||
5970 | App should set this if it changes the palette. | |
5971 | """ | |
54f9ee45 | 5972 | return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs) |
e811c8ce RD |
5973 | |
5974 | def GetPaletteRealized(*args, **kwargs): | |
a95a7133 | 5975 | """GetPaletteRealized(self) -> bool""" |
54f9ee45 | 5976 | return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs) |
e811c8ce | 5977 | |
0085ce49 RD |
5978 | QueryNewPaletteEvent_swigregister = _core_.QueryNewPaletteEvent_swigregister |
5979 | QueryNewPaletteEvent_swigregister(QueryNewPaletteEvent) | |
d14a1e28 RD |
5980 | |
5981 | #--------------------------------------------------------------------------- | |
5982 | ||
5983 | class NavigationKeyEvent(Event): | |
5ba5649b RD |
5984 | """ |
5985 | EVT_NAVIGATION_KEY events are used to control moving the focus between | |
5986 | widgets, otherwise known as tab-traversal. You woudl normally not | |
5987 | catch navigation events in applications as there are already | |
5988 | appropriate handlers in `wx.Dialog` and `wx.Panel`, but you may find | |
5989 | it useful to send navigation events in certain situations to change | |
5990 | the focus in certain ways, although it's probably easier to just call | |
5991 | `wx.Window.Navigate`. | |
5992 | """ | |
0085ce49 RD |
5993 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
5994 | __repr__ = _swig_repr | |
5995 | def __init__(self, *args, **kwargs): | |
a95a7133 | 5996 | """__init__(self) -> NavigationKeyEvent""" |
0085ce49 | 5997 | _core_.NavigationKeyEvent_swiginit(self,_core_.new_NavigationKeyEvent(*args, **kwargs)) |
e811c8ce | 5998 | def GetDirection(*args, **kwargs): |
5ba5649b RD |
5999 | """ |
6000 | GetDirection(self) -> bool | |
6001 | ||
6002 | Returns ``True`` if the direction is forward, ``False`` otherwise. | |
6003 | """ | |
54f9ee45 | 6004 | return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs) |
e811c8ce RD |
6005 | |
6006 | def SetDirection(*args, **kwargs): | |
5ba5649b RD |
6007 | """ |
6008 | SetDirection(self, bool forward) | |
6009 | ||
6010 | Specify the direction that the navigation should take. Usually the | |
6011 | difference between using Tab and Shift-Tab. | |
6012 | """ | |
54f9ee45 | 6013 | return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs) |
e811c8ce RD |
6014 | |
6015 | def IsWindowChange(*args, **kwargs): | |
5ba5649b RD |
6016 | """ |
6017 | IsWindowChange(self) -> bool | |
6018 | ||
6019 | Returns ``True`` if window change is allowed. | |
6020 | """ | |
54f9ee45 | 6021 | return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs) |
e811c8ce RD |
6022 | |
6023 | def SetWindowChange(*args, **kwargs): | |
5ba5649b RD |
6024 | """ |
6025 | SetWindowChange(self, bool ischange) | |
6026 | ||
6027 | Specify if the navigation should be able to change parent windows. | |
6028 | For example, changing notebook pages, etc. This is usually implemented | |
6029 | by using Control-Tab. | |
6030 | """ | |
54f9ee45 | 6031 | return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs) |
e811c8ce | 6032 | |
68350608 | 6033 | def IsFromTab(*args, **kwargs): |
5ba5649b RD |
6034 | """ |
6035 | IsFromTab(self) -> bool | |
6036 | ||
6037 | Returns ``True`` if the navigation event is originated from the Tab | |
6038 | key. | |
6039 | """ | |
68350608 RD |
6040 | return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs) |
6041 | ||
6042 | def SetFromTab(*args, **kwargs): | |
5ba5649b RD |
6043 | """ |
6044 | SetFromTab(self, bool bIs) | |
6045 | ||
6046 | Set to true under MSW if the event was generated using the tab key. | |
6047 | This is required for proper navogation over radio buttons. | |
6048 | """ | |
68350608 RD |
6049 | return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs) |
6050 | ||
908b74cd | 6051 | def SetFlags(*args, **kwargs): |
5ba5649b RD |
6052 | """ |
6053 | SetFlags(self, long flags) | |
6054 | ||
6055 | Set the navigation flags to a combination of the following: | |
6056 | ||
6057 | * wx.NavigationKeyEvent.IsBackward | |
6058 | * wx.NavigationKeyEvent.IsForward | |
6059 | * wx.NavigationKeyEvent.WinChange | |
6060 | * wx.NavigationKeyEvent.FromTab | |
6061 | ||
6062 | """ | |
908b74cd RD |
6063 | return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs) |
6064 | ||
e811c8ce | 6065 | def GetCurrentFocus(*args, **kwargs): |
5ba5649b RD |
6066 | """ |
6067 | GetCurrentFocus(self) -> Window | |
6068 | ||
6069 | Returns the child window which currenty has the focus. May be | |
6070 | ``None``. | |
6071 | """ | |
54f9ee45 | 6072 | return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs) |
e811c8ce RD |
6073 | |
6074 | def SetCurrentFocus(*args, **kwargs): | |
5ba5649b RD |
6075 | """ |
6076 | SetCurrentFocus(self, Window win) | |
6077 | ||
6078 | Set the window that has the focus. | |
6079 | """ | |
54f9ee45 | 6080 | return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs) |
e811c8ce | 6081 | |
b0f7404b | 6082 | IsBackward = _core_.NavigationKeyEvent_IsBackward |
908b74cd RD |
6083 | IsForward = _core_.NavigationKeyEvent_IsForward |
6084 | WinChange = _core_.NavigationKeyEvent_WinChange | |
68350608 | 6085 | FromTab = _core_.NavigationKeyEvent_FromTab |
0085ce49 RD |
6086 | NavigationKeyEvent_swigregister = _core_.NavigationKeyEvent_swigregister |
6087 | NavigationKeyEvent_swigregister(NavigationKeyEvent) | |
d14a1e28 RD |
6088 | |
6089 | #--------------------------------------------------------------------------- | |
6090 | ||
6091 | class WindowCreateEvent(CommandEvent): | |
5ba5649b RD |
6092 | """ |
6093 | The EVT_WINDOW_CREATE event is sent as soon as the window object (the | |
6094 | underlying GUI object) exists. | |
6095 | """ | |
0085ce49 RD |
6096 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
6097 | __repr__ = _swig_repr | |
6098 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
6099 | """ |
6100 | __init__(self, Window win=None) -> WindowCreateEvent | |
6101 | ||
6102 | The EVT_WINDOW_CREATE event is sent as soon as the window object (the | |
6103 | underlying GUI object) exists. | |
6104 | """ | |
0085ce49 | 6105 | _core_.WindowCreateEvent_swiginit(self,_core_.new_WindowCreateEvent(*args, **kwargs)) |
e811c8ce | 6106 | def GetWindow(*args, **kwargs): |
5ba5649b RD |
6107 | """ |
6108 | GetWindow(self) -> Window | |
6109 | ||
6110 | Returns the window that this event refers to. | |
6111 | """ | |
54f9ee45 | 6112 | return _core_.WindowCreateEvent_GetWindow(*args, **kwargs) |
e811c8ce | 6113 | |
0085ce49 RD |
6114 | WindowCreateEvent_swigregister = _core_.WindowCreateEvent_swigregister |
6115 | WindowCreateEvent_swigregister(WindowCreateEvent) | |
d14a1e28 RD |
6116 | |
6117 | class WindowDestroyEvent(CommandEvent): | |
5ba5649b | 6118 | """ |
943e8dfd RD |
6119 | The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor |
6120 | when the GUI window is destroyed. | |
6121 | ||
6122 | When a class derived from `wx.Window` is destroyed its destructor will | |
6123 | have already run by the time this event is sent. Therefore this event | |
6124 | will not usually be received at all by the window itself. Since it is | |
6125 | received after the destructor has run, an object should not try to | |
6126 | handle its own wx.WindowDestroyEvent, but it can be used to get | |
6127 | notification of the destruction of another window. | |
5ba5649b | 6128 | """ |
0085ce49 RD |
6129 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
6130 | __repr__ = _swig_repr | |
6131 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
6132 | """ |
6133 | __init__(self, Window win=None) -> WindowDestroyEvent | |
6134 | ||
943e8dfd RD |
6135 | The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor |
6136 | when the GUI window is destroyed. | |
6137 | ||
6138 | When a class derived from `wx.Window` is destroyed its destructor will | |
6139 | have already run by the time this event is sent. Therefore this event | |
6140 | will not usually be received at all by the window itself. Since it is | |
6141 | received after the destructor has run, an object should not try to | |
6142 | handle its own wx.WindowDestroyEvent, but it can be used to get | |
6143 | notification of the destruction of another window. | |
5ba5649b | 6144 | """ |
0085ce49 | 6145 | _core_.WindowDestroyEvent_swiginit(self,_core_.new_WindowDestroyEvent(*args, **kwargs)) |
e811c8ce | 6146 | def GetWindow(*args, **kwargs): |
5ba5649b RD |
6147 | """ |
6148 | GetWindow(self) -> Window | |
6149 | ||
6150 | Returns the window that this event refers to. | |
6151 | """ | |
54f9ee45 | 6152 | return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs) |
e811c8ce | 6153 | |
0085ce49 RD |
6154 | WindowDestroyEvent_swigregister = _core_.WindowDestroyEvent_swigregister |
6155 | WindowDestroyEvent_swigregister(WindowDestroyEvent) | |
d14a1e28 RD |
6156 | |
6157 | #--------------------------------------------------------------------------- | |
6158 | ||
6159 | class ContextMenuEvent(CommandEvent): | |
5ba5649b RD |
6160 | """ |
6161 | This class is used for context menu events (EVT_CONTECT_MENU,) sent to | |
6162 | give the application a chance to show a context (popup) menu. | |
6163 | """ | |
0085ce49 RD |
6164 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
6165 | __repr__ = _swig_repr | |
6166 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
6167 | """ |
6168 | __init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent | |
6169 | ||
6170 | Constructor. | |
6171 | """ | |
0085ce49 | 6172 | _core_.ContextMenuEvent_swiginit(self,_core_.new_ContextMenuEvent(*args, **kwargs)) |
e811c8ce | 6173 | def GetPosition(*args, **kwargs): |
5ba5649b RD |
6174 | """ |
6175 | GetPosition(self) -> Point | |
6176 | ||
6177 | Returns the position (in screen coordinants) at which the menu should | |
6178 | be shown. | |
6179 | """ | |
54f9ee45 | 6180 | return _core_.ContextMenuEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
6181 | |
6182 | def SetPosition(*args, **kwargs): | |
5ba5649b RD |
6183 | """ |
6184 | SetPosition(self, Point pos) | |
6185 | ||
6186 | Sets the position at which the menu should be shown. | |
6187 | """ | |
54f9ee45 | 6188 | return _core_.ContextMenuEvent_SetPosition(*args, **kwargs) |
e811c8ce | 6189 | |
0085ce49 RD |
6190 | ContextMenuEvent_swigregister = _core_.ContextMenuEvent_swigregister |
6191 | ContextMenuEvent_swigregister(ContextMenuEvent) | |
d14a1e28 RD |
6192 | |
6193 | #--------------------------------------------------------------------------- | |
6194 | ||
54f9ee45 RD |
6195 | IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL |
6196 | IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED | |
d14a1e28 | 6197 | class IdleEvent(Event): |
5ba5649b RD |
6198 | """ |
6199 | This class is used for EVT_IDLE events, which are generated and sent | |
6200 | when the application *becomes* idle. In other words, the when the | |
6201 | event queue becomes empty then idle events are sent to all windows (by | |
6202 | default) and as long as none of them call `RequestMore` then there are | |
6203 | no more idle events until after the system event queue has some normal | |
6204 | events and then becomes empty again. | |
6205 | ||
6206 | By default, idle events are sent to all windows. If this is causing a | |
6207 | significant overhead in your application, you can call | |
6208 | `wx.IdleEvent.SetMode` with the value wx.IDLE_PROCESS_SPECIFIED, and | |
6209 | set the wx.WS_EX_PROCESS_IDLE extra window style for every window | |
6210 | which should receive idle events. Then idle events will only be sent | |
6211 | to those windows and not to any others. | |
6212 | """ | |
0085ce49 RD |
6213 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
6214 | __repr__ = _swig_repr | |
6215 | def __init__(self, *args, **kwargs): | |
5ba5649b RD |
6216 | """ |
6217 | __init__(self) -> IdleEvent | |
6218 | ||
6219 | Constructor | |
6220 | """ | |
0085ce49 | 6221 | _core_.IdleEvent_swiginit(self,_core_.new_IdleEvent(*args, **kwargs)) |
e811c8ce | 6222 | def RequestMore(*args, **kwargs): |
5ba5649b RD |
6223 | """ |
6224 | RequestMore(self, bool needMore=True) | |
6225 | ||
6226 | Tells wxWidgets that more processing is required. This function can be | |
6227 | called by an EVT_IDLE handler for a window to indicate that the | |
6228 | application should forward the EVT_IDLE event once more to the | |
6229 | application windows. If no window calls this function during its | |
6230 | EVT_IDLE handler, then the application will remain in a passive event | |
6231 | loop until a new event is posted to the application by the windowing | |
6232 | system. | |
6233 | """ | |
54f9ee45 | 6234 | return _core_.IdleEvent_RequestMore(*args, **kwargs) |
e811c8ce RD |
6235 | |
6236 | def MoreRequested(*args, **kwargs): | |
5ba5649b RD |
6237 | """ |
6238 | MoreRequested(self) -> bool | |
6239 | ||
6240 | Returns ``True`` if the OnIdle function processing this event | |
6241 | requested more processing time. | |
6242 | """ | |
54f9ee45 | 6243 | return _core_.IdleEvent_MoreRequested(*args, **kwargs) |
e811c8ce RD |
6244 | |
6245 | def SetMode(*args, **kwargs): | |
5ba5649b RD |
6246 | """ |
6247 | SetMode(int mode) | |
6248 | ||
6249 | Static method for specifying how wxWidgets will send idle events: to | |
6250 | all windows, or only to those which specify that they will process the | |
6251 | events. | |
6252 | ||
6253 | The mode can be one of the following values: | |
6254 | ||
6255 | ========================= ======================================== | |
6256 | wx.IDLE_PROCESS_ALL Send idle events to all windows | |
6257 | wx.IDLE_PROCESS_SPECIFIED Send idle events only to windows that have | |
6258 | the wx.WS_EX_PROCESS_IDLE extra style | |
6259 | flag set. | |
6260 | ========================= ======================================== | |
6261 | ||
6262 | """ | |
54f9ee45 | 6263 | return _core_.IdleEvent_SetMode(*args, **kwargs) |
e811c8ce RD |
6264 | |
6265 | SetMode = staticmethod(SetMode) | |
6266 | def GetMode(*args, **kwargs): | |
5ba5649b RD |
6267 | """ |
6268 | GetMode() -> int | |
6269 | ||
6270 | Static method returning a value specifying how wxWidgets will send | |
6271 | idle events: to all windows, or only to those which specify that they | |
6272 | will process the events. | |
6273 | """ | |
54f9ee45 | 6274 | return _core_.IdleEvent_GetMode(*args, **kwargs) |
e811c8ce RD |
6275 | |
6276 | GetMode = staticmethod(GetMode) | |
6277 | def CanSend(*args, **kwargs): | |
5ba5649b RD |
6278 | """ |
6279 | CanSend(Window win) -> bool | |
6280 | ||
6281 | Returns ``True`` if it is appropriate to send idle events to this | |
6282 | window. | |
6283 | ||
6284 | This function looks at the mode used (see `wx.IdleEvent.SetMode`), and | |
6285 | the wx.WS_EX_PROCESS_IDLE style in window to determine whether idle | |
6286 | events should be sent to this window now. By default this will always | |
6287 | return ``True`` because the update mode is initially | |
6288 | wx.IDLE_PROCESS_ALL. You can change the mode to only send idle events | |
6289 | to windows with the wx.WS_EX_PROCESS_IDLE extra window style set. | |
6290 | """ | |
54f9ee45 | 6291 | return _core_.IdleEvent_CanSend(*args, **kwargs) |
e811c8ce RD |
6292 | |
6293 | CanSend = staticmethod(CanSend) | |
0085ce49 RD |
6294 | IdleEvent_swigregister = _core_.IdleEvent_swigregister |
6295 | IdleEvent_swigregister(IdleEvent) | |
d14a1e28 | 6296 | |
e811c8ce | 6297 | def IdleEvent_SetMode(*args, **kwargs): |
0085ce49 | 6298 | """ |
5ba5649b RD |
6299 | IdleEvent_SetMode(int mode) |
6300 | ||
6301 | Static method for specifying how wxWidgets will send idle events: to | |
6302 | all windows, or only to those which specify that they will process the | |
6303 | events. | |
6304 | ||
6305 | The mode can be one of the following values: | |
6306 | ||
6307 | ========================= ======================================== | |
6308 | wx.IDLE_PROCESS_ALL Send idle events to all windows | |
6309 | wx.IDLE_PROCESS_SPECIFIED Send idle events only to windows that have | |
6310 | the wx.WS_EX_PROCESS_IDLE extra style | |
6311 | flag set. | |
6312 | ========================= ======================================== | |
6313 | ||
6314 | """ | |
0085ce49 | 6315 | return _core_.IdleEvent_SetMode(*args, **kwargs) |
d14a1e28 | 6316 | |
0085ce49 RD |
6317 | def IdleEvent_GetMode(*args): |
6318 | """ | |
5ba5649b RD |
6319 | IdleEvent_GetMode() -> int |
6320 | ||
6321 | Static method returning a value specifying how wxWidgets will send | |
6322 | idle events: to all windows, or only to those which specify that they | |
6323 | will process the events. | |
6324 | """ | |
0085ce49 | 6325 | return _core_.IdleEvent_GetMode(*args) |
d14a1e28 | 6326 | |
e811c8ce | 6327 | def IdleEvent_CanSend(*args, **kwargs): |
0085ce49 | 6328 | """ |
5ba5649b RD |
6329 | IdleEvent_CanSend(Window win) -> bool |
6330 | ||
6331 | Returns ``True`` if it is appropriate to send idle events to this | |
6332 | window. | |
6333 | ||
6334 | This function looks at the mode used (see `wx.IdleEvent.SetMode`), and | |
6335 | the wx.WS_EX_PROCESS_IDLE style in window to determine whether idle | |
6336 | events should be sent to this window now. By default this will always | |
6337 | return ``True`` because the update mode is initially | |
6338 | wx.IDLE_PROCESS_ALL. You can change the mode to only send idle events | |
6339 | to windows with the wx.WS_EX_PROCESS_IDLE extra window style set. | |
6340 | """ | |
0085ce49 | 6341 | return _core_.IdleEvent_CanSend(*args, **kwargs) |
d14a1e28 RD |
6342 | |
6343 | #--------------------------------------------------------------------------- | |
6344 | ||
6345 | class PyEvent(Event): | |
5ba5649b RD |
6346 | """ |
6347 | wx.PyEvent can be used as a base class for implementing custom event | |
6348 | types in Python. You should derived from this class instead of | |
6349 | `wx.Event` because this class is Python-aware and is able to transport | |
6350 | its Python bits safely through the wxWidgets event system and have | |
6351 | them still be there when the event handler is invoked. | |
6352 | ||
6353 | :see: `wx.PyCommandEvent` | |
6354 | ||
6355 | """ | |
0085ce49 RD |
6356 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
6357 | __repr__ = _swig_repr | |
6358 | def __init__(self, *args, **kwargs): | |
5ba5649b | 6359 | """__init__(self, int winid=0, wxEventType eventType=wxEVT_NULL) -> PyEvent""" |
0085ce49 | 6360 | _core_.PyEvent_swiginit(self,_core_.new_PyEvent(*args, **kwargs)) |
5ba5649b | 6361 | self._SetSelf(self) |
e811c8ce | 6362 | |
0085ce49 RD |
6363 | __swig_destroy__ = _core_.delete_PyEvent |
6364 | __del__ = lambda self : None; | |
5ba5649b RD |
6365 | def _SetSelf(*args, **kwargs): |
6366 | """_SetSelf(self, PyObject self)""" | |
6367 | return _core_.PyEvent__SetSelf(*args, **kwargs) | |
e811c8ce | 6368 | |
5ba5649b RD |
6369 | def _GetSelf(*args, **kwargs): |
6370 | """_GetSelf(self) -> PyObject""" | |
6371 | return _core_.PyEvent__GetSelf(*args, **kwargs) | |
e811c8ce | 6372 | |
0085ce49 RD |
6373 | PyEvent_swigregister = _core_.PyEvent_swigregister |
6374 | PyEvent_swigregister(PyEvent) | |
d14a1e28 RD |
6375 | |
6376 | class PyCommandEvent(CommandEvent): | |
5ba5649b RD |
6377 | """ |
6378 | wx.PyCommandEvent can be used as a base class for implementing custom | |
6379 | event types in Python, where the event shoudl travel up to parent | |
6380 | windows looking for a handler. You should derived from this class | |
6381 | instead of `wx.CommandEvent` because this class is Python-aware and is | |
6382 | able to transport its Python bits safely through the wxWidgets event | |
6383 | system and have them still be there when the event handler is invoked. | |
6384 | ||
6385 | :see: `wx.PyEvent` | |
6386 | ||
6387 | """ | |
0085ce49 RD |
6388 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
6389 | __repr__ = _swig_repr | |
6390 | def __init__(self, *args, **kwargs): | |
5ba5649b | 6391 | """__init__(self, wxEventType eventType=wxEVT_NULL, int id=0) -> PyCommandEvent""" |
0085ce49 | 6392 | _core_.PyCommandEvent_swiginit(self,_core_.new_PyCommandEvent(*args, **kwargs)) |
5ba5649b | 6393 | self._SetSelf(self) |
e811c8ce | 6394 | |
0085ce49 RD |
6395 | __swig_destroy__ = _core_.delete_PyCommandEvent |
6396 | __del__ = lambda self : None; | |
5ba5649b RD |
6397 | def _SetSelf(*args, **kwargs): |
6398 | """_SetSelf(self, PyObject self)""" | |
6399 | return _core_.PyCommandEvent__SetSelf(*args, **kwargs) | |
e811c8ce | 6400 | |
5ba5649b RD |
6401 | def _GetSelf(*args, **kwargs): |
6402 | """_GetSelf(self) -> PyObject""" | |
6403 | return _core_.PyCommandEvent__GetSelf(*args, **kwargs) | |
e811c8ce | 6404 | |
0085ce49 RD |
6405 | PyCommandEvent_swigregister = _core_.PyCommandEvent_swigregister |
6406 | PyCommandEvent_swigregister(PyCommandEvent) | |
d14a1e28 | 6407 | |
53aa7709 | 6408 | class DateEvent(CommandEvent): |
5ba5649b RD |
6409 | """ |
6410 | This event class holds information about a date change event and is | |
6411 | used together with `wx.DatePickerCtrl`. It also serves as a base class | |
6412 | for `wx.calendar.CalendarEvent`. Bind these event types with | |
6413 | EVT_DATE_CHANGED. | |
6414 | """ | |
0085ce49 RD |
6415 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
6416 | __repr__ = _swig_repr | |
6417 | def __init__(self, *args, **kwargs): | |
53aa7709 | 6418 | """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent""" |
0085ce49 | 6419 | _core_.DateEvent_swiginit(self,_core_.new_DateEvent(*args, **kwargs)) |
53aa7709 | 6420 | def GetDate(*args, **kwargs): |
5ba5649b RD |
6421 | """ |
6422 | GetDate(self) -> DateTime | |
6423 | ||
6424 | Returns the date. | |
6425 | """ | |
53aa7709 RD |
6426 | return _core_.DateEvent_GetDate(*args, **kwargs) |
6427 | ||
6428 | def SetDate(*args, **kwargs): | |
5ba5649b RD |
6429 | """ |
6430 | SetDate(self, DateTime date) | |
6431 | ||
6432 | Sets the date carried by the event, normally only used by the library | |
6433 | internally. | |
6434 | """ | |
53aa7709 RD |
6435 | return _core_.DateEvent_SetDate(*args, **kwargs) |
6436 | ||
0085ce49 RD |
6437 | DateEvent_swigregister = _core_.DateEvent_swigregister |
6438 | DateEvent_swigregister(DateEvent) | |
53aa7709 RD |
6439 | |
6440 | wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED | |
6441 | EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 ) | |
6442 | ||
d14a1e28 RD |
6443 | #--------------------------------------------------------------------------- |
6444 | ||
54f9ee45 RD |
6445 | PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS |
6446 | PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION | |
6447 | PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG | |
6448 | PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG | |
6449 | PRINT_WINDOWS = _core_.PRINT_WINDOWS | |
6450 | PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT | |
d14a1e28 | 6451 | class PyApp(EvtHandler): |
66c033b4 RD |
6452 | """ |
6453 | The ``wx.PyApp`` class is an *implementation detail*, please use the | |
6454 | `wx.App` class (or some other derived class) instead. | |
6455 | """ | |
0085ce49 RD |
6456 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
6457 | __repr__ = _swig_repr | |
6458 | def __init__(self, *args, **kwargs): | |
98e665d3 | 6459 | """ |
a95a7133 | 6460 | __init__(self) -> PyApp |
98e665d3 RD |
6461 | |
6462 | Create a new application object, starting the bootstrap process. | |
6463 | """ | |
0085ce49 | 6464 | _core_.PyApp_swiginit(self,_core_.new_PyApp(*args, **kwargs)) |
70b7a5fe RD |
6465 | self._setCallbackInfo(self, PyApp, False) |
6466 | self._setOORInfo(self, False) | |
e811c8ce | 6467 | |
0085ce49 RD |
6468 | __swig_destroy__ = _core_.delete_PyApp |
6469 | __del__ = lambda self : None; | |
e811c8ce | 6470 | def _setCallbackInfo(*args, **kwargs): |
70b7a5fe | 6471 | """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" |
54f9ee45 | 6472 | return _core_.PyApp__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
6473 | |
6474 | def GetAppName(*args, **kwargs): | |
0df68c9f | 6475 | """ |
a95a7133 | 6476 | GetAppName(self) -> String |
6c3b4aae | 6477 | |
0df68c9f RD |
6478 | Get the application name. |
6479 | """ | |
54f9ee45 | 6480 | return _core_.PyApp_GetAppName(*args, **kwargs) |
e811c8ce RD |
6481 | |
6482 | def SetAppName(*args, **kwargs): | |
0df68c9f | 6483 | """ |
a95a7133 | 6484 | SetAppName(self, String name) |
6c3b4aae | 6485 | |
66c033b4 RD |
6486 | Set the application name. This value may be used automatically by |
6487 | `wx.Config` and such. | |
0df68c9f | 6488 | """ |
54f9ee45 | 6489 | return _core_.PyApp_SetAppName(*args, **kwargs) |
e811c8ce RD |
6490 | |
6491 | def GetClassName(*args, **kwargs): | |
0df68c9f | 6492 | """ |
a95a7133 | 6493 | GetClassName(self) -> String |
e811c8ce | 6494 | |
0df68c9f RD |
6495 | Get the application's class name. |
6496 | """ | |
54f9ee45 | 6497 | return _core_.PyApp_GetClassName(*args, **kwargs) |
e811c8ce RD |
6498 | |
6499 | def SetClassName(*args, **kwargs): | |
0df68c9f | 6500 | """ |
a95a7133 | 6501 | SetClassName(self, String name) |
6c3b4aae | 6502 | |
66c033b4 RD |
6503 | Set the application's class name. This value may be used for |
6504 | X-resources if applicable for the platform | |
0df68c9f | 6505 | """ |
54f9ee45 | 6506 | return _core_.PyApp_SetClassName(*args, **kwargs) |
e811c8ce RD |
6507 | |
6508 | def GetVendorName(*args, **kwargs): | |
0df68c9f | 6509 | """ |
a95a7133 | 6510 | GetVendorName(self) -> String |
6c3b4aae | 6511 | |
0df68c9f RD |
6512 | Get the application's vendor name. |
6513 | """ | |
54f9ee45 | 6514 | return _core_.PyApp_GetVendorName(*args, **kwargs) |
e811c8ce RD |
6515 | |
6516 | def SetVendorName(*args, **kwargs): | |
0df68c9f | 6517 | """ |
a95a7133 | 6518 | SetVendorName(self, String name) |
6c3b4aae | 6519 | |
66c033b4 RD |
6520 | Set the application's vendor name. This value may be used |
6521 | automatically by `wx.Config` and such. | |
0df68c9f | 6522 | """ |
54f9ee45 | 6523 | return _core_.PyApp_SetVendorName(*args, **kwargs) |
e811c8ce RD |
6524 | |
6525 | def GetTraits(*args, **kwargs): | |
0df68c9f | 6526 | """ |
a95a7133 | 6527 | GetTraits(self) -> wxAppTraits |
6c3b4aae | 6528 | |
66c033b4 RD |
6529 | Return (and create if necessary) the app traits object to which we |
6530 | delegate for everything which either should be configurable by the | |
6531 | user (then he can change the default behaviour simply by overriding | |
6532 | CreateTraits() and returning his own traits object) or which is | |
6533 | GUI/console dependent as then wx.AppTraits allows us to abstract the | |
6534 | differences behind the common facade. | |
6535 | ||
6536 | :todo: Add support for overriding CreateAppTraits in wxPython. | |
0df68c9f | 6537 | """ |
54f9ee45 | 6538 | return _core_.PyApp_GetTraits(*args, **kwargs) |
e811c8ce RD |
6539 | |
6540 | def ProcessPendingEvents(*args, **kwargs): | |
0df68c9f | 6541 | """ |
a95a7133 | 6542 | ProcessPendingEvents(self) |
6c3b4aae | 6543 | |
66c033b4 RD |
6544 | Process all events in the Pending Events list -- it is necessary to |
6545 | call this function to process posted events. This normally happens | |
6546 | during each event loop iteration. | |
0df68c9f | 6547 | """ |
54f9ee45 | 6548 | return _core_.PyApp_ProcessPendingEvents(*args, **kwargs) |
e811c8ce RD |
6549 | |
6550 | def Yield(*args, **kwargs): | |
0df68c9f | 6551 | """ |
a95a7133 | 6552 | Yield(self, bool onlyIfNeeded=False) -> bool |
6c3b4aae | 6553 | |
66c033b4 RD |
6554 | Process all currently pending events right now, instead of waiting |
6555 | until return to the event loop. It is an error to call ``Yield`` | |
6556 | recursively unless the value of ``onlyIfNeeded`` is True. | |
6c3b4aae | 6557 | |
66c033b4 | 6558 | :warning: This function is dangerous as it can lead to unexpected |
41e2b43e RD |
6559 | reentrancies (i.e. when called from an event handler it may |
6560 | result in calling the same event handler again), use with | |
6561 | extreme care or, better, don't use at all! | |
0df68c9f | 6562 | |
66c033b4 | 6563 | :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield` |
41e2b43e | 6564 | |
0df68c9f | 6565 | """ |
54f9ee45 | 6566 | return _core_.PyApp_Yield(*args, **kwargs) |
e811c8ce RD |
6567 | |
6568 | def WakeUpIdle(*args, **kwargs): | |
0df68c9f | 6569 | """ |
a95a7133 | 6570 | WakeUpIdle(self) |
6c3b4aae | 6571 | |
66c033b4 RD |
6572 | Make sure that idle events are sent again. |
6573 | :see: `wx.WakeUpIdle` | |
0df68c9f | 6574 | """ |
54f9ee45 | 6575 | return _core_.PyApp_WakeUpIdle(*args, **kwargs) |
e811c8ce | 6576 | |
1fc3b23a RD |
6577 | def IsMainLoopRunning(*args, **kwargs): |
6578 | """ | |
6579 | IsMainLoopRunning() -> bool | |
6580 | ||
6581 | Returns True if we're running the main loop, i.e. if the events can | |
6582 | currently be dispatched. | |
6583 | """ | |
6584 | return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) | |
6585 | ||
6586 | IsMainLoopRunning = staticmethod(IsMainLoopRunning) | |
e811c8ce | 6587 | def MainLoop(*args, **kwargs): |
0df68c9f | 6588 | """ |
a95a7133 | 6589 | MainLoop(self) -> int |
6c3b4aae | 6590 | |
66c033b4 RD |
6591 | Execute the main GUI loop, the function doesn't normally return until |
6592 | all top level windows have been closed and destroyed. | |
0df68c9f | 6593 | """ |
54f9ee45 | 6594 | return _core_.PyApp_MainLoop(*args, **kwargs) |
e811c8ce RD |
6595 | |
6596 | def Exit(*args, **kwargs): | |
0df68c9f | 6597 | """ |
a95a7133 | 6598 | Exit(self) |
6c3b4aae | 6599 | |
0df68c9f | 6600 | Exit the main loop thus terminating the application. |
66c033b4 | 6601 | :see: `wx.Exit` |
0df68c9f | 6602 | """ |
54f9ee45 | 6603 | return _core_.PyApp_Exit(*args, **kwargs) |
e811c8ce RD |
6604 | |
6605 | def ExitMainLoop(*args, **kwargs): | |
0df68c9f | 6606 | """ |
a95a7133 | 6607 | ExitMainLoop(self) |
6c3b4aae | 6608 | |
66c033b4 RD |
6609 | Exit the main GUI loop during the next iteration of the main |
6610 | loop, (i.e. it does not stop the program immediately!) | |
0df68c9f | 6611 | """ |
54f9ee45 | 6612 | return _core_.PyApp_ExitMainLoop(*args, **kwargs) |
e811c8ce RD |
6613 | |
6614 | def Pending(*args, **kwargs): | |
0df68c9f | 6615 | """ |
a95a7133 | 6616 | Pending(self) -> bool |
6c3b4aae | 6617 | |
0df68c9f RD |
6618 | Returns True if there are unprocessed events in the event queue. |
6619 | """ | |
54f9ee45 | 6620 | return _core_.PyApp_Pending(*args, **kwargs) |
e811c8ce RD |
6621 | |
6622 | def Dispatch(*args, **kwargs): | |
0df68c9f | 6623 | """ |
a95a7133 | 6624 | Dispatch(self) -> bool |
6c3b4aae | 6625 | |
0df68c9f RD |
6626 | Process the first event in the event queue (blocks until an event |
6627 | appears if there are none currently) | |
6628 | """ | |
54f9ee45 | 6629 | return _core_.PyApp_Dispatch(*args, **kwargs) |
e811c8ce RD |
6630 | |
6631 | def ProcessIdle(*args, **kwargs): | |
0df68c9f | 6632 | """ |
a95a7133 | 6633 | ProcessIdle(self) -> bool |
6c3b4aae | 6634 | |
66c033b4 RD |
6635 | Called from the MainLoop when the application becomes idle (there are |
6636 | no pending events) and sends a `wx.IdleEvent` to all interested | |
6637 | parties. Returns True if more idle events are needed, False if not. | |
0df68c9f | 6638 | """ |
54f9ee45 | 6639 | return _core_.PyApp_ProcessIdle(*args, **kwargs) |
e811c8ce RD |
6640 | |
6641 | def SendIdleEvents(*args, **kwargs): | |
0df68c9f | 6642 | """ |
a95a7133 | 6643 | SendIdleEvents(self, Window win, IdleEvent event) -> bool |
e811c8ce | 6644 | |
66c033b4 RD |
6645 | Send idle event to window and all subwindows. Returns True if more |
6646 | idle time is requested. | |
0df68c9f | 6647 | """ |
54f9ee45 | 6648 | return _core_.PyApp_SendIdleEvents(*args, **kwargs) |
e811c8ce RD |
6649 | |
6650 | def IsActive(*args, **kwargs): | |
0df68c9f | 6651 | """ |
a95a7133 | 6652 | IsActive(self) -> bool |
6c3b4aae | 6653 | |
0df68c9f RD |
6654 | Return True if our app has focus. |
6655 | """ | |
54f9ee45 | 6656 | return _core_.PyApp_IsActive(*args, **kwargs) |
e811c8ce RD |
6657 | |
6658 | def SetTopWindow(*args, **kwargs): | |
0df68c9f | 6659 | """ |
a95a7133 | 6660 | SetTopWindow(self, Window win) |
6c3b4aae | 6661 | |
66c033b4 | 6662 | Set the *main* top level window |
0df68c9f | 6663 | """ |
54f9ee45 | 6664 | return _core_.PyApp_SetTopWindow(*args, **kwargs) |
e811c8ce RD |
6665 | |
6666 | def GetTopWindow(*args, **kwargs): | |
0df68c9f | 6667 | """ |
a95a7133 | 6668 | GetTopWindow(self) -> Window |
6c3b4aae | 6669 | |
66c033b4 RD |
6670 | Return the *main* top level window (if it hadn't been set previously |
6671 | with SetTopWindow(), will return just some top level window and, if | |
6672 | there not any, will return None) | |
0df68c9f | 6673 | """ |
54f9ee45 | 6674 | return _core_.PyApp_GetTopWindow(*args, **kwargs) |
e811c8ce RD |
6675 | |
6676 | def SetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f | 6677 | """ |
a95a7133 | 6678 | SetExitOnFrameDelete(self, bool flag) |
0df68c9f | 6679 | |
66c033b4 RD |
6680 | Control the exit behaviour: by default, the program will exit the main |
6681 | loop (and so, usually, terminate) when the last top-level program | |
6682 | window is deleted. Beware that if you disable this behaviour (with | |
6683 | SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() | |
6684 | explicitly from somewhere. | |
0df68c9f | 6685 | """ |
54f9ee45 | 6686 | return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs) |
e811c8ce RD |
6687 | |
6688 | def GetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f | 6689 | """ |
a95a7133 | 6690 | GetExitOnFrameDelete(self) -> bool |
6c3b4aae | 6691 | |
0df68c9f RD |
6692 | Get the current exit behaviour setting. |
6693 | """ | |
54f9ee45 | 6694 | return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs) |
e811c8ce RD |
6695 | |
6696 | def SetUseBestVisual(*args, **kwargs): | |
0df68c9f | 6697 | """ |
a95a7133 | 6698 | SetUseBestVisual(self, bool flag) |
6c3b4aae | 6699 | |
66c033b4 RD |
6700 | Set whether the app should try to use the best available visual on |
6701 | systems where more than one is available, (Sun, SGI, XFree86 4, etc.) | |
0df68c9f | 6702 | """ |
54f9ee45 | 6703 | return _core_.PyApp_SetUseBestVisual(*args, **kwargs) |
e811c8ce RD |
6704 | |
6705 | def GetUseBestVisual(*args, **kwargs): | |
0df68c9f | 6706 | """ |
a95a7133 | 6707 | GetUseBestVisual(self) -> bool |
6c3b4aae | 6708 | |
0df68c9f RD |
6709 | Get current UseBestVisual setting. |
6710 | """ | |
54f9ee45 | 6711 | return _core_.PyApp_GetUseBestVisual(*args, **kwargs) |
e811c8ce RD |
6712 | |
6713 | def SetPrintMode(*args, **kwargs): | |
a95a7133 | 6714 | """SetPrintMode(self, int mode)""" |
54f9ee45 | 6715 | return _core_.PyApp_SetPrintMode(*args, **kwargs) |
e811c8ce RD |
6716 | |
6717 | def GetPrintMode(*args, **kwargs): | |
a95a7133 | 6718 | """GetPrintMode(self) -> int""" |
54f9ee45 | 6719 | return _core_.PyApp_GetPrintMode(*args, **kwargs) |
e811c8ce | 6720 | |
e811c8ce | 6721 | def SetAssertMode(*args, **kwargs): |
0df68c9f | 6722 | """ |
a95a7133 | 6723 | SetAssertMode(self, int mode) |
6c3b4aae | 6724 | |
41e2b43e | 6725 | Set the OnAssert behaviour for debug and hybrid builds. |
0df68c9f | 6726 | """ |
54f9ee45 | 6727 | return _core_.PyApp_SetAssertMode(*args, **kwargs) |
e811c8ce | 6728 | |
6c3b4aae | 6729 | def GetAssertMode(*args, **kwargs): |
0df68c9f | 6730 | """ |
a95a7133 | 6731 | GetAssertMode(self) -> int |
6c3b4aae | 6732 | |
0df68c9f RD |
6733 | Get the current OnAssert behaviour setting. |
6734 | """ | |
54f9ee45 | 6735 | return _core_.PyApp_GetAssertMode(*args, **kwargs) |
6c3b4aae | 6736 | |
e811c8ce | 6737 | def GetMacSupportPCMenuShortcuts(*args, **kwargs): |
66c033b4 | 6738 | """GetMacSupportPCMenuShortcuts() -> bool""" |
54f9ee45 | 6739 | return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) |
e811c8ce RD |
6740 | |
6741 | GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) | |
6742 | def GetMacAboutMenuItemId(*args, **kwargs): | |
66c033b4 | 6743 | """GetMacAboutMenuItemId() -> long""" |
54f9ee45 | 6744 | return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs) |
e811c8ce RD |
6745 | |
6746 | GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) | |
6747 | def GetMacPreferencesMenuItemId(*args, **kwargs): | |
66c033b4 | 6748 | """GetMacPreferencesMenuItemId() -> long""" |
54f9ee45 | 6749 | return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) |
e811c8ce RD |
6750 | |
6751 | GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) | |
6752 | def GetMacExitMenuItemId(*args, **kwargs): | |
66c033b4 | 6753 | """GetMacExitMenuItemId() -> long""" |
54f9ee45 | 6754 | return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs) |
e811c8ce RD |
6755 | |
6756 | GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) | |
6757 | def GetMacHelpMenuTitleName(*args, **kwargs): | |
66c033b4 | 6758 | """GetMacHelpMenuTitleName() -> String""" |
54f9ee45 | 6759 | return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) |
e811c8ce RD |
6760 | |
6761 | GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) | |
6762 | def SetMacSupportPCMenuShortcuts(*args, **kwargs): | |
66c033b4 | 6763 | """SetMacSupportPCMenuShortcuts(bool val)""" |
54f9ee45 | 6764 | return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) |
e811c8ce RD |
6765 | |
6766 | SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) | |
6767 | def SetMacAboutMenuItemId(*args, **kwargs): | |
66c033b4 | 6768 | """SetMacAboutMenuItemId(long val)""" |
54f9ee45 | 6769 | return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) |
e811c8ce RD |
6770 | |
6771 | SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) | |
6772 | def SetMacPreferencesMenuItemId(*args, **kwargs): | |
66c033b4 | 6773 | """SetMacPreferencesMenuItemId(long val)""" |
54f9ee45 | 6774 | return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) |
e811c8ce RD |
6775 | |
6776 | SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) | |
6777 | def SetMacExitMenuItemId(*args, **kwargs): | |
66c033b4 | 6778 | """SetMacExitMenuItemId(long val)""" |
54f9ee45 | 6779 | return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) |
e811c8ce RD |
6780 | |
6781 | SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) | |
6782 | def SetMacHelpMenuTitleName(*args, **kwargs): | |
66c033b4 | 6783 | """SetMacHelpMenuTitleName(String val)""" |
54f9ee45 | 6784 | return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) |
e811c8ce RD |
6785 | |
6786 | SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) | |
6787 | def _BootstrapApp(*args, **kwargs): | |
0df68c9f | 6788 | """ |
a95a7133 | 6789 | _BootstrapApp(self) |
6c3b4aae | 6790 | |
0df68c9f RD |
6791 | For internal use only |
6792 | """ | |
54f9ee45 | 6793 | return _core_.PyApp__BootstrapApp(*args, **kwargs) |
e811c8ce RD |
6794 | |
6795 | def GetComCtl32Version(*args, **kwargs): | |
0df68c9f | 6796 | """ |
66c033b4 | 6797 | GetComCtl32Version() -> int |
6c3b4aae | 6798 | |
66c033b4 RD |
6799 | Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if |
6800 | it wasn't found at all. Raises an exception on non-Windows platforms. | |
0df68c9f | 6801 | """ |
54f9ee45 | 6802 | return _core_.PyApp_GetComCtl32Version(*args, **kwargs) |
e811c8ce RD |
6803 | |
6804 | GetComCtl32Version = staticmethod(GetComCtl32Version) | |
0085ce49 RD |
6805 | PyApp_swigregister = _core_.PyApp_swigregister |
6806 | PyApp_swigregister(PyApp) | |
d14a1e28 | 6807 | |
0085ce49 RD |
6808 | def PyApp_IsMainLoopRunning(*args): |
6809 | """ | |
1fc3b23a RD |
6810 | PyApp_IsMainLoopRunning() -> bool |
6811 | ||
6812 | Returns True if we're running the main loop, i.e. if the events can | |
6813 | currently be dispatched. | |
6814 | """ | |
0085ce49 | 6815 | return _core_.PyApp_IsMainLoopRunning(*args) |
1fc3b23a | 6816 | |
0085ce49 RD |
6817 | def PyApp_GetMacSupportPCMenuShortcuts(*args): |
6818 | """PyApp_GetMacSupportPCMenuShortcuts() -> bool""" | |
6819 | return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args) | |
d14a1e28 | 6820 | |
0085ce49 RD |
6821 | def PyApp_GetMacAboutMenuItemId(*args): |
6822 | """PyApp_GetMacAboutMenuItemId() -> long""" | |
6823 | return _core_.PyApp_GetMacAboutMenuItemId(*args) | |
d14a1e28 | 6824 | |
0085ce49 RD |
6825 | def PyApp_GetMacPreferencesMenuItemId(*args): |
6826 | """PyApp_GetMacPreferencesMenuItemId() -> long""" | |
6827 | return _core_.PyApp_GetMacPreferencesMenuItemId(*args) | |
d14a1e28 | 6828 | |
0085ce49 RD |
6829 | def PyApp_GetMacExitMenuItemId(*args): |
6830 | """PyApp_GetMacExitMenuItemId() -> long""" | |
6831 | return _core_.PyApp_GetMacExitMenuItemId(*args) | |
d14a1e28 | 6832 | |
0085ce49 RD |
6833 | def PyApp_GetMacHelpMenuTitleName(*args): |
6834 | """PyApp_GetMacHelpMenuTitleName() -> String""" | |
6835 | return _core_.PyApp_GetMacHelpMenuTitleName(*args) | |
d14a1e28 | 6836 | |
e811c8ce | 6837 | def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs): |
0085ce49 RD |
6838 | """PyApp_SetMacSupportPCMenuShortcuts(bool val)""" |
6839 | return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) | |
d14a1e28 | 6840 | |
e811c8ce | 6841 | def PyApp_SetMacAboutMenuItemId(*args, **kwargs): |
0085ce49 RD |
6842 | """PyApp_SetMacAboutMenuItemId(long val)""" |
6843 | return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) | |
d14a1e28 | 6844 | |
e811c8ce | 6845 | def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs): |
0085ce49 RD |
6846 | """PyApp_SetMacPreferencesMenuItemId(long val)""" |
6847 | return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) | |
d14a1e28 | 6848 | |
e811c8ce | 6849 | def PyApp_SetMacExitMenuItemId(*args, **kwargs): |
0085ce49 RD |
6850 | """PyApp_SetMacExitMenuItemId(long val)""" |
6851 | return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) | |
d14a1e28 | 6852 | |
e811c8ce | 6853 | def PyApp_SetMacHelpMenuTitleName(*args, **kwargs): |
0085ce49 RD |
6854 | """PyApp_SetMacHelpMenuTitleName(String val)""" |
6855 | return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) | |
d14a1e28 | 6856 | |
0085ce49 RD |
6857 | def PyApp_GetComCtl32Version(*args): |
6858 | """ | |
0df68c9f | 6859 | PyApp_GetComCtl32Version() -> int |
6c3b4aae | 6860 | |
66c033b4 RD |
6861 | Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if |
6862 | it wasn't found at all. Raises an exception on non-Windows platforms. | |
0df68c9f | 6863 | """ |
0085ce49 | 6864 | return _core_.PyApp_GetComCtl32Version(*args) |
d14a1e28 RD |
6865 | |
6866 | #--------------------------------------------------------------------------- | |
6867 | ||
6868 | ||
0085ce49 RD |
6869 | def Exit(*args): |
6870 | """ | |
0df68c9f | 6871 | Exit() |
6c3b4aae | 6872 | |
0df68c9f RD |
6873 | Force an exit of the application. Convenience for wx.GetApp().Exit() |
6874 | """ | |
0085ce49 | 6875 | return _core_.Exit(*args) |
d14a1e28 | 6876 | |
0085ce49 RD |
6877 | def Yield(*args): |
6878 | """ | |
0df68c9f | 6879 | Yield() -> bool |
6c3b4aae | 6880 | |
0df68c9f RD |
6881 | Yield to other apps/messages. Convenience for wx.GetApp().Yield() |
6882 | """ | |
0085ce49 | 6883 | return _core_.Yield(*args) |
d14a1e28 | 6884 | |
0085ce49 RD |
6885 | def YieldIfNeeded(*args): |
6886 | """ | |
0df68c9f | 6887 | YieldIfNeeded() -> bool |
6c3b4aae | 6888 | |
0df68c9f RD |
6889 | Yield to other apps/messages. Convenience for wx.GetApp().Yield(True) |
6890 | """ | |
0085ce49 | 6891 | return _core_.YieldIfNeeded(*args) |
d14a1e28 | 6892 | |
e811c8ce | 6893 | def SafeYield(*args, **kwargs): |
0085ce49 | 6894 | """ |
0df68c9f | 6895 | SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool |
6c3b4aae | 6896 | |
66c033b4 RD |
6897 | This function is similar to `wx.Yield`, except that it disables the |
6898 | user input to all program windows before calling `wx.Yield` and | |
6899 | re-enables it again afterwards. If ``win`` is not None, this window | |
6900 | will remain enabled, allowing the implementation of some limited user | |
6901 | interaction. | |
6c3b4aae | 6902 | |
66c033b4 | 6903 | :Returns: the result of the call to `wx.Yield`. |
0df68c9f | 6904 | """ |
0085ce49 | 6905 | return _core_.SafeYield(*args, **kwargs) |
d14a1e28 | 6906 | |
0085ce49 RD |
6907 | def WakeUpIdle(*args): |
6908 | """ | |
0df68c9f | 6909 | WakeUpIdle() |
6c3b4aae | 6910 | |
66c033b4 RD |
6911 | Cause the message queue to become empty again, so idle events will be |
6912 | sent. | |
0df68c9f | 6913 | """ |
0085ce49 | 6914 | return _core_.WakeUpIdle(*args) |
d14a1e28 | 6915 | |
e811c8ce | 6916 | def PostEvent(*args, **kwargs): |
0085ce49 | 6917 | """ |
0df68c9f | 6918 | PostEvent(EvtHandler dest, Event event) |
6c3b4aae | 6919 | |
66c033b4 RD |
6920 | Send an event to a window or other wx.EvtHandler to be processed |
6921 | later. | |
0df68c9f | 6922 | """ |
0085ce49 | 6923 | return _core_.PostEvent(*args, **kwargs) |
d14a1e28 | 6924 | |
0085ce49 RD |
6925 | def App_CleanUp(*args): |
6926 | """ | |
0df68c9f | 6927 | App_CleanUp() |
6c3b4aae | 6928 | |
41e2b43e | 6929 | For internal use only, it is used to cleanup after wxWidgets when |
66c033b4 | 6930 | Python shuts down. |
0df68c9f | 6931 | """ |
0085ce49 | 6932 | return _core_.App_CleanUp(*args) |
d14a1e28 | 6933 | |
0085ce49 RD |
6934 | def GetApp(*args): |
6935 | """ | |
0df68c9f | 6936 | GetApp() -> PyApp |
6c3b4aae | 6937 | |
196addbf | 6938 | Return a reference to the current wx.App object. |
0df68c9f | 6939 | """ |
0085ce49 | 6940 | return _core_.GetApp(*args) |
5cbf236d RD |
6941 | |
6942 | def SetDefaultPyEncoding(*args, **kwargs): | |
0085ce49 | 6943 | """ |
5cbf236d RD |
6944 | SetDefaultPyEncoding(string encoding) |
6945 | ||
6946 | Sets the encoding that wxPython will use when it needs to convert a | |
6947 | Python string or unicode object to or from a wxString. | |
e505d15e RD |
6948 | |
6949 | The default encoding is the value of ``locale.getdefaultlocale()[1]`` | |
6950 | but please be aware that the default encoding within the same locale | |
6951 | may be slightly different on different platforms. For example, please | |
6952 | see http://www.alanwood.net/demos/charsetdiffs.html for differences | |
6953 | between the common latin/roman encodings. | |
5cbf236d | 6954 | """ |
0085ce49 | 6955 | return _core_.SetDefaultPyEncoding(*args, **kwargs) |
5cbf236d | 6956 | |
0085ce49 RD |
6957 | def GetDefaultPyEncoding(*args): |
6958 | """ | |
5cbf236d RD |
6959 | GetDefaultPyEncoding() -> string |
6960 | ||
6961 | Gets the current encoding that wxPython will use when it needs to | |
6962 | convert a Python string or unicode object to or from a wxString. | |
6963 | """ | |
0085ce49 | 6964 | return _core_.GetDefaultPyEncoding(*args) |
d14a1e28 RD |
6965 | #---------------------------------------------------------------------- |
6966 | ||
6967 | class PyOnDemandOutputWindow: | |
6c3b4aae RD |
6968 | """ |
6969 | A class that can be used for redirecting Python's stdout and | |
6970 | stderr streams. It will do nothing until something is wrriten to | |
6971 | the stream at which point it will create a Frame with a text area | |
6972 | and write the text there. | |
6973 | """ | |
d14a1e28 RD |
6974 | def __init__(self, title = "wxPython: stdout/stderr"): |
6975 | self.frame = None | |
6976 | self.title = title | |
412d302d RD |
6977 | self.pos = wx.DefaultPosition |
6978 | self.size = (450, 300) | |
d14a1e28 RD |
6979 | self.parent = None |
6980 | ||
6981 | def SetParent(self, parent): | |
6c3b4aae | 6982 | """Set the window to be used as the popup Frame's parent.""" |
d14a1e28 RD |
6983 | self.parent = parent |
6984 | ||
6c3b4aae RD |
6985 | |
6986 | def CreateOutputWindow(self, st): | |
412d302d RD |
6987 | self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size, |
6988 | style=wx.DEFAULT_FRAME_STYLE) | |
196addbf | 6989 | self.text = wx.TextCtrl(self.frame, -1, "", |
412d302d | 6990 | style=wx.TE_MULTILINE|wx.TE_READONLY) |
d1e20054 | 6991 | self.text.AppendText(st) |
6c3b4aae RD |
6992 | self.frame.Show(True) |
6993 | EVT_CLOSE(self.frame, self.OnCloseWindow) | |
6994 | ||
d14a1e28 | 6995 | |
7409c0c6 RD |
6996 | def OnCloseWindow(self, event): |
6997 | if self.frame is not None: | |
6998 | self.frame.Destroy() | |
6999 | self.frame = None | |
7000 | self.text = None | |
7001 | ||
7002 | ||
d14a1e28 | 7003 | # These methods provide the file-like output behaviour. |
6c3b4aae RD |
7004 | def write(self, text): |
7005 | """ | |
7006 | Create the output window if needed and write the string to it. | |
7007 | If not called in the context of the gui thread then uses | |
7008 | CallAfter to do the work there. | |
7009 | """ | |
7010 | if self.frame is None: | |
7011 | if not wx.Thread_IsMain(): | |
7012 | wx.CallAfter(self.CreateOutputWindow, text) | |
7013 | else: | |
7014 | self.CreateOutputWindow(text) | |
7015 | else: | |
7016 | if not wx.Thread_IsMain(): | |
7017 | wx.CallAfter(self.text.AppendText, text) | |
7018 | else: | |
7019 | self.text.AppendText(text) | |
7020 | ||
d14a1e28 RD |
7021 | |
7022 | def close(self): | |
6c3b4aae RD |
7023 | if self.frame is not None: |
7024 | wx.CallAfter(self.frame.Close) | |
7025 | ||
d14a1e28 | 7026 | |
19272049 RD |
7027 | def flush(self): |
7028 | pass | |
7029 | ||
7030 | ||
d14a1e28 RD |
7031 | |
7032 | #---------------------------------------------------------------------- | |
d14a1e28 RD |
7033 | |
7034 | _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__') | |
7035 | ||
7036 | class App(wx.PyApp): | |
6c3b4aae | 7037 | """ |
66c033b4 RD |
7038 | The ``wx.App`` class represents the application and is used to: |
7039 | ||
7040 | * bootstrap the wxPython system and initialize the underlying | |
7041 | gui toolkit | |
7042 | * set and get application-wide properties | |
7043 | * implement the windowing system main message or event loop, | |
7044 | and to dispatch events to window instances | |
7045 | * etc. | |
7046 | ||
7047 | Every application must have a ``wx.App`` instance, and all | |
7048 | creation of UI objects should be delayed until after the | |
03e37cd5 RD |
7049 | ``wx.App`` object has been created in order to ensure that the gui |
7050 | platform and wxWidgets have been fully initialized. | |
66c033b4 RD |
7051 | |
7052 | Normally you would derive from this class and implement an | |
7053 | ``OnInit`` method that creates a frame and then calls | |
7054 | ``self.SetTopWindow(frame)``. | |
7055 | ||
03e37cd5 | 7056 | :see: `wx.PySimpleApp` for a simpler app class that can be used |
1c0f361b | 7057 | directly. |
6c3b4aae | 7058 | """ |
66c033b4 | 7059 | |
d14a1e28 RD |
7060 | outputWindowClass = PyOnDemandOutputWindow |
7061 | ||
03e37cd5 RD |
7062 | def __init__(self, redirect=_defRedirect, filename=None, |
7063 | useBestVisual=False, clearSigInt=True): | |
66c033b4 RD |
7064 | """ |
7065 | Construct a ``wx.App`` object. | |
7066 | ||
03e37cd5 RD |
7067 | :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be |
7068 | redirected? Defaults to True on Windows and Mac, False | |
7069 | otherwise. If `filename` is None then output will be | |
7070 | redirected to a window that pops up as needed. (You can | |
7071 | control what kind of window is created for the output by | |
7072 | resetting the class variable ``outputWindowClass`` to a | |
7073 | class of your choosing.) | |
66c033b4 | 7074 | |
03e37cd5 RD |
7075 | :param filename: The name of a file to redirect output to, if |
7076 | redirect is True. | |
66c033b4 RD |
7077 | |
7078 | :param useBestVisual: Should the app try to use the best | |
03e37cd5 RD |
7079 | available visual provided by the system (only relevant on |
7080 | systems that have more than one visual.) This parameter | |
7081 | must be used instead of calling `SetUseBestVisual` later | |
7082 | on because it must be set before the underlying GUI | |
7083 | toolkit is initialized. | |
7084 | ||
7085 | :param clearSigInt: Should SIGINT be cleared? This allows the | |
7086 | app to terminate upon a Ctrl-C in the console like other | |
7087 | GUI apps will. | |
66c033b4 RD |
7088 | |
7089 | :note: You should override OnInit to do applicaition | |
7090 | initialization to ensure that the system, toolkit and | |
7091 | wxWidgets are fully initialized. | |
7092 | """ | |
d14a1e28 RD |
7093 | wx.PyApp.__init__(self) |
7094 | ||
7095 | if wx.Platform == "__WXMAC__": | |
7096 | try: | |
7097 | import MacOS | |
7098 | if not MacOS.WMAvailable(): | |
7099 | print """\ | |
7100 | This program needs access to the screen. Please run with 'pythonw', | |
7101 | not 'python', and only when you are logged in on the main display of | |
7102 | your Mac.""" | |
7103 | _sys.exit(1) | |
36cadbf7 RD |
7104 | except SystemExit: |
7105 | raise | |
d14a1e28 RD |
7106 | except: |
7107 | pass | |
7108 | ||
7109 | # This has to be done before OnInit | |
7110 | self.SetUseBestVisual(useBestVisual) | |
7111 | ||
7112 | # Set the default handler for SIGINT. This fixes a problem | |
7113 | # where if Ctrl-C is pressed in the console that started this | |
7114 | # app then it will not appear to do anything, (not even send | |
7115 | # KeyboardInterrupt???) but will later segfault on exit. By | |
7116 | # setting the default handler then the app will exit, as | |
7117 | # expected (depending on platform.) | |
03e37cd5 RD |
7118 | if clearSigInt: |
7119 | try: | |
7120 | import signal | |
7121 | signal.signal(signal.SIGINT, signal.SIG_DFL) | |
7122 | except: | |
7123 | pass | |
d14a1e28 RD |
7124 | |
7125 | # Save and redirect the stdio to a window? | |
7126 | self.stdioWin = None | |
7127 | self.saveStdio = (_sys.stdout, _sys.stderr) | |
7128 | if redirect: | |
7129 | self.RedirectStdio(filename) | |
7130 | ||
8fb0e70a RD |
7131 | # Use Python's install prefix as the default |
7132 | wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix) | |
7133 | ||
d14a1e28 RD |
7134 | # This finishes the initialization of wxWindows and then calls |
7135 | # the OnInit that should be present in the derived class | |
7136 | self._BootstrapApp() | |
7137 | ||
7138 | ||
02b455f2 RD |
7139 | def __del__(self, destroy=wx.PyApp.__del__): |
7140 | self.RestoreStdio() # Just in case the MainLoop was overridden | |
7141 | destroy(self) | |
d14a1e28 | 7142 | |
70b7a5fe RD |
7143 | def Destroy(self): |
7144 | wx.PyApp.Destroy(self) | |
7145 | self.thisown = 0 | |
d14a1e28 RD |
7146 | |
7147 | def SetTopWindow(self, frame): | |
1e0c8722 | 7148 | """Set the \"main\" top level window""" |
d14a1e28 RD |
7149 | if self.stdioWin: |
7150 | self.stdioWin.SetParent(frame) | |
7151 | wx.PyApp.SetTopWindow(self, frame) | |
7152 | ||
7153 | ||
7154 | def MainLoop(self): | |
1e0c8722 | 7155 | """Execute the main GUI event loop""" |
d14a1e28 RD |
7156 | wx.PyApp.MainLoop(self) |
7157 | self.RestoreStdio() | |
7158 | ||
7159 | ||
7409c0c6 | 7160 | def RedirectStdio(self, filename=None): |
1e0c8722 | 7161 | """Redirect sys.stdout and sys.stderr to a file or a popup window.""" |
d14a1e28 RD |
7162 | if filename: |
7163 | _sys.stdout = _sys.stderr = open(filename, 'a') | |
7164 | else: | |
7165 | self.stdioWin = self.outputWindowClass() | |
7166 | _sys.stdout = _sys.stderr = self.stdioWin | |
7167 | ||
7168 | ||
7169 | def RestoreStdio(self): | |
02b455f2 RD |
7170 | try: |
7171 | _sys.stdout, _sys.stderr = self.saveStdio | |
7172 | except: | |
7173 | pass | |
d14a1e28 RD |
7174 | |
7175 | ||
412d302d RD |
7176 | def SetOutputWindowAttributes(self, title=None, pos=None, size=None): |
7177 | """ | |
7178 | Set the title, position and/or size of the output window if | |
f5b96ee1 RD |
7179 | the stdio has been redirected. This should be called before |
7180 | any output would cause the output window to be created. | |
412d302d RD |
7181 | """ |
7182 | if self.stdioWin: | |
7183 | if title is not None: | |
7184 | self.stdioWin.title = title | |
7185 | if pos is not None: | |
7186 | self.stdioWin.pos = pos | |
7187 | if size is not None: | |
7188 | self.stdioWin.size = size | |
7189 | ||
7190 | ||
7191 | ||
d14a1e28 | 7192 | |
66c033b4 | 7193 | # change from wx.PyApp_XX to wx.App_XX |
54f9ee45 RD |
7194 | App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts |
7195 | App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId | |
7196 | App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId | |
7197 | App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId | |
7198 | App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName | |
7199 | App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts | |
7200 | App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId | |
7201 | App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId | |
7202 | App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId | |
7203 | App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName | |
7204 | App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version | |
d14a1e28 RD |
7205 | |
7206 | #---------------------------------------------------------------------------- | |
7207 | ||
7208 | class PySimpleApp(wx.App): | |
6c3b4aae RD |
7209 | """ |
7210 | A simple application class. You can just create one of these and | |
7211 | then then make your top level windows later, and not have to worry | |
66c033b4 RD |
7212 | about OnInit. For example:: |
7213 | ||
7214 | app = wx.PySimpleApp() | |
7215 | frame = wx.Frame(None, title='Hello World') | |
7216 | frame.Show() | |
7217 | app.MainLoop() | |
7218 | ||
7219 | :see: `wx.App` | |
7220 | """ | |
6c3b4aae | 7221 | |
03e37cd5 RD |
7222 | def __init__(self, redirect=False, filename=None, |
7223 | useBestVisual=False, clearSigInt=True): | |
66c033b4 RD |
7224 | """ |
7225 | :see: `wx.App.__init__` | |
7226 | """ | |
03e37cd5 | 7227 | wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt) |
6c3b4aae | 7228 | |
d14a1e28 | 7229 | def OnInit(self): |
d14a1e28 RD |
7230 | return True |
7231 | ||
7232 | ||
66c033b4 | 7233 | |
6c3b4aae | 7234 | # Is anybody using this one? |
d14a1e28 RD |
7235 | class PyWidgetTester(wx.App): |
7236 | def __init__(self, size = (250, 100)): | |
7237 | self.size = size | |
7238 | wx.App.__init__(self, 0) | |
7239 | ||
7240 | def OnInit(self): | |
196addbf | 7241 | self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size) |
d14a1e28 RD |
7242 | self.SetTopWindow(self.frame) |
7243 | return True | |
7244 | ||
66c033b4 RD |
7245 | def SetWidget(self, widgetClass, *args, **kwargs): |
7246 | w = widgetClass(self.frame, *args, **kwargs) | |
d14a1e28 RD |
7247 | self.frame.Show(True) |
7248 | ||
7249 | #---------------------------------------------------------------------------- | |
7250 | # DO NOT hold any other references to this object. This is how we | |
66c033b4 | 7251 | # know when to cleanup system resources that wxWidgets is holding. When |
d14a1e28 | 7252 | # the sys module is unloaded, the refcount on sys.__wxPythonCleanup |
66c033b4 | 7253 | # goes to zero and it calls the wx.App_CleanUp function. |
d14a1e28 RD |
7254 | |
7255 | class __wxPyCleanup: | |
7256 | def __init__(self): | |
54f9ee45 | 7257 | self.cleanup = _core_.App_CleanUp |
d14a1e28 RD |
7258 | def __del__(self): |
7259 | self.cleanup() | |
7260 | ||
7261 | _sys.__wxPythonCleanup = __wxPyCleanup() | |
7262 | ||
7263 | ## # another possible solution, but it gets called too early... | |
66c033b4 RD |
7264 | ## import atexit |
7265 | ## atexit.register(_core_.wxApp_CleanUp) | |
d14a1e28 RD |
7266 | |
7267 | ||
7268 | #---------------------------------------------------------------------------- | |
7269 | ||
7270 | #--------------------------------------------------------------------------- | |
2ef75293 RD |
7271 | |
7272 | class EventLoop(object): | |
093d3ff1 | 7273 | """Proxy of C++ EventLoop class""" |
0085ce49 RD |
7274 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
7275 | __repr__ = _swig_repr | |
7276 | def __init__(self, *args, **kwargs): | |
2ef75293 | 7277 | """__init__(self) -> EventLoop""" |
0085ce49 RD |
7278 | _core_.EventLoop_swiginit(self,_core_.new_EventLoop(*args, **kwargs)) |
7279 | __swig_destroy__ = _core_.delete_EventLoop | |
7280 | __del__ = lambda self : None; | |
2ef75293 RD |
7281 | def Run(*args, **kwargs): |
7282 | """Run(self) -> int""" | |
7283 | return _core_.EventLoop_Run(*args, **kwargs) | |
7284 | ||
7285 | def Exit(*args, **kwargs): | |
7286 | """Exit(self, int rc=0)""" | |
7287 | return _core_.EventLoop_Exit(*args, **kwargs) | |
7288 | ||
7289 | def Pending(*args, **kwargs): | |
7290 | """Pending(self) -> bool""" | |
7291 | return _core_.EventLoop_Pending(*args, **kwargs) | |
7292 | ||
7293 | def Dispatch(*args, **kwargs): | |
7294 | """Dispatch(self) -> bool""" | |
7295 | return _core_.EventLoop_Dispatch(*args, **kwargs) | |
7296 | ||
7297 | def IsRunning(*args, **kwargs): | |
7298 | """IsRunning(self) -> bool""" | |
7299 | return _core_.EventLoop_IsRunning(*args, **kwargs) | |
7300 | ||
7301 | def GetActive(*args, **kwargs): | |
7302 | """GetActive() -> EventLoop""" | |
7303 | return _core_.EventLoop_GetActive(*args, **kwargs) | |
7304 | ||
7305 | GetActive = staticmethod(GetActive) | |
7306 | def SetActive(*args, **kwargs): | |
7307 | """SetActive(EventLoop loop)""" | |
7308 | return _core_.EventLoop_SetActive(*args, **kwargs) | |
7309 | ||
7310 | SetActive = staticmethod(SetActive) | |
0085ce49 RD |
7311 | EventLoop_swigregister = _core_.EventLoop_swigregister |
7312 | EventLoop_swigregister(EventLoop) | |
2ef75293 | 7313 | |
0085ce49 RD |
7314 | def EventLoop_GetActive(*args): |
7315 | """EventLoop_GetActive() -> EventLoop""" | |
7316 | return _core_.EventLoop_GetActive(*args) | |
2ef75293 RD |
7317 | |
7318 | def EventLoop_SetActive(*args, **kwargs): | |
0085ce49 RD |
7319 | """EventLoop_SetActive(EventLoop loop)""" |
7320 | return _core_.EventLoop_SetActive(*args, **kwargs) | |
2ef75293 | 7321 | |
091f5bed RD |
7322 | class EventLoopActivator(object): |
7323 | """Proxy of C++ EventLoopActivator class""" | |
0085ce49 RD |
7324 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
7325 | __repr__ = _swig_repr | |
7326 | def __init__(self, *args, **kwargs): | |
091f5bed | 7327 | """__init__(self, EventLoop evtLoop) -> EventLoopActivator""" |
0085ce49 RD |
7328 | _core_.EventLoopActivator_swiginit(self,_core_.new_EventLoopActivator(*args, **kwargs)) |
7329 | __swig_destroy__ = _core_.delete_EventLoopActivator | |
7330 | __del__ = lambda self : None; | |
7331 | EventLoopActivator_swigregister = _core_.EventLoopActivator_swigregister | |
7332 | EventLoopActivator_swigregister(EventLoopActivator) | |
091f5bed | 7333 | |
2ef75293 | 7334 | #--------------------------------------------------------------------------- |
d14a1e28 | 7335 | |
1e0c8722 | 7336 | class AcceleratorEntry(object): |
66c033b4 RD |
7337 | """ |
7338 | A class used to define items in an `wx.AcceleratorTable`. wxPython | |
7339 | programs can choose to use wx.AcceleratorEntry objects, but using a | |
7340 | list of 3-tuple of integers (flags, keyCode, cmdID) usually works just | |
41e2b43e | 7341 | as well. See `__init__` for of the tuple values. |
66c033b4 RD |
7342 | |
7343 | :see: `wx.AcceleratorTable` | |
7344 | """ | |
0085ce49 RD |
7345 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
7346 | __repr__ = _swig_repr | |
7347 | def __init__(self, *args, **kwargs): | |
66c033b4 RD |
7348 | """ |
7349 | __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry | |
7350 | ||
7351 | Construct a wx.AcceleratorEntry. | |
66c033b4 | 7352 | """ |
0085ce49 RD |
7353 | _core_.AcceleratorEntry_swiginit(self,_core_.new_AcceleratorEntry(*args, **kwargs)) |
7354 | __swig_destroy__ = _core_.delete_AcceleratorEntry | |
7355 | __del__ = lambda self : None; | |
1e0c8722 | 7356 | def Set(*args, **kwargs): |
66c033b4 RD |
7357 | """ |
7358 | Set(self, int flags, int keyCode, int cmd) | |
1e0c8722 | 7359 | |
66c033b4 RD |
7360 | (Re)set the attributes of a wx.AcceleratorEntry. |
7361 | :see `__init__` | |
7362 | """ | |
7363 | return _core_.AcceleratorEntry_Set(*args, **kwargs) | |
1e0c8722 RD |
7364 | |
7365 | def GetFlags(*args, **kwargs): | |
66c033b4 RD |
7366 | """ |
7367 | GetFlags(self) -> int | |
7368 | ||
7369 | Get the AcceleratorEntry's flags. | |
7370 | """ | |
54f9ee45 | 7371 | return _core_.AcceleratorEntry_GetFlags(*args, **kwargs) |
1e0c8722 RD |
7372 | |
7373 | def GetKeyCode(*args, **kwargs): | |
66c033b4 RD |
7374 | """ |
7375 | GetKeyCode(self) -> int | |
7376 | ||
7377 | Get the AcceleratorEntry's keycode. | |
7378 | """ | |
54f9ee45 | 7379 | return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs) |
1e0c8722 RD |
7380 | |
7381 | def GetCommand(*args, **kwargs): | |
66c033b4 RD |
7382 | """ |
7383 | GetCommand(self) -> int | |
7384 | ||
7385 | Get the AcceleratorEntry's command ID. | |
7386 | """ | |
54f9ee45 | 7387 | return _core_.AcceleratorEntry_GetCommand(*args, **kwargs) |
1e0c8722 | 7388 | |
0085ce49 RD |
7389 | AcceleratorEntry_swigregister = _core_.AcceleratorEntry_swigregister |
7390 | AcceleratorEntry_swigregister(AcceleratorEntry) | |
1e0c8722 RD |
7391 | |
7392 | class AcceleratorTable(Object): | |
66c033b4 RD |
7393 | """ |
7394 | An accelerator table allows the application to specify a table of | |
7395 | keyboard shortcuts for menus or other commands. On Windows, menu or | |
7396 | button commands are supported; on GTK, only menu commands are | |
7397 | supported. | |
66c033b4 | 7398 | """ |
0085ce49 RD |
7399 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
7400 | __repr__ = _swig_repr | |
7401 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
7402 | """ |
7403 | __init__(entries) -> AcceleratorTable | |
1e0c8722 | 7404 | |
66c033b4 RD |
7405 | Construct an AcceleratorTable from a list of `wx.AcceleratorEntry` |
7406 | items or or of 3-tuples (flags, keyCode, cmdID) | |
7407 | ||
7408 | :see: `wx.AcceleratorEntry` | |
0df68c9f | 7409 | """ |
0085ce49 RD |
7410 | _core_.AcceleratorTable_swiginit(self,_core_.new_AcceleratorTable(*args, **kwargs)) |
7411 | __swig_destroy__ = _core_.delete_AcceleratorTable | |
7412 | __del__ = lambda self : None; | |
1e0c8722 | 7413 | def Ok(*args, **kwargs): |
a95a7133 | 7414 | """Ok(self) -> bool""" |
54f9ee45 | 7415 | return _core_.AcceleratorTable_Ok(*args, **kwargs) |
1e0c8722 | 7416 | |
0085ce49 RD |
7417 | AcceleratorTable_swigregister = _core_.AcceleratorTable_swigregister |
7418 | AcceleratorTable_swigregister(AcceleratorTable) | |
1e0c8722 RD |
7419 | |
7420 | ||
7421 | def GetAccelFromString(*args, **kwargs): | |
0085ce49 RD |
7422 | """GetAccelFromString(String label) -> AcceleratorEntry""" |
7423 | return _core_.GetAccelFromString(*args, **kwargs) | |
1e0c8722 RD |
7424 | #--------------------------------------------------------------------------- |
7425 | ||
74a57fcd RD |
7426 | class VisualAttributes(object): |
7427 | """struct containing all the visual attributes of a control""" | |
0085ce49 RD |
7428 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
7429 | __repr__ = _swig_repr | |
7430 | def __init__(self, *args, **kwargs): | |
74a57fcd | 7431 | """ |
a95a7133 | 7432 | __init__(self) -> VisualAttributes |
74a57fcd RD |
7433 | |
7434 | struct containing all the visual attributes of a control | |
7435 | """ | |
0085ce49 RD |
7436 | _core_.VisualAttributes_swiginit(self,_core_.new_VisualAttributes(*args, **kwargs)) |
7437 | __swig_destroy__ = _core_.delete_VisualAttributes | |
7438 | __del__ = lambda self : None; | |
54f9ee45 RD |
7439 | font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set) |
7440 | colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set) | |
7441 | colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set) | |
0085ce49 RD |
7442 | VisualAttributes_swigregister = _core_.VisualAttributes_swigregister |
7443 | VisualAttributes_swigregister(VisualAttributes) | |
74a57fcd RD |
7444 | NullAcceleratorTable = cvar.NullAcceleratorTable |
7445 | PanelNameStr = cvar.PanelNameStr | |
7446 | ||
54f9ee45 RD |
7447 | WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL |
7448 | WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL | |
7449 | WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI | |
7450 | WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE | |
7451 | WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX | |
d14a1e28 | 7452 | class Window(EvtHandler): |
15afbcd0 RD |
7453 | """ |
7454 | wx.Window is the base class for all windows and represents any visible | |
7455 | object on the screen. All controls, top level windows and so on are | |
7456 | wx.Windows. Sizers and device contexts are not however, as they don't | |
7457 | appear on screen themselves. | |
7458 | ||
7459 | """ | |
0085ce49 RD |
7460 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
7461 | __repr__ = _swig_repr | |
7462 | def __init__(self, *args, **kwargs): | |
0df68c9f | 7463 | """ |
a95a7133 | 7464 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
74a57fcd | 7465 | Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window |
15afbcd0 RD |
7466 | |
7467 | Construct and show a generic Window. | |
0df68c9f | 7468 | """ |
0085ce49 | 7469 | _core_.Window_swiginit(self,_core_.new_Window(*args, **kwargs)) |
d14a1e28 | 7470 | self._setOORInfo(self) |
d14a1e28 | 7471 | |
e811c8ce | 7472 | def Create(*args, **kwargs): |
0df68c9f | 7473 | """ |
a95a7133 | 7474 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
74a57fcd | 7475 | Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool |
15afbcd0 RD |
7476 | |
7477 | Create the GUI part of the Window for 2-phase creation mode. | |
0df68c9f | 7478 | """ |
54f9ee45 | 7479 | return _core_.Window_Create(*args, **kwargs) |
d14a1e28 | 7480 | |
e811c8ce | 7481 | def Close(*args, **kwargs): |
15afbcd0 | 7482 | """ |
a95a7133 | 7483 | Close(self, bool force=False) -> bool |
15afbcd0 RD |
7484 | |
7485 | This function simply generates a EVT_CLOSE event whose handler usually | |
7486 | tries to close the window. It doesn't close the window itself, | |
7487 | however. If force is False (the default) then the window's close | |
7488 | handler will be allowed to veto the destruction of the window. | |
15afbcd0 | 7489 | """ |
54f9ee45 | 7490 | return _core_.Window_Close(*args, **kwargs) |
d14a1e28 | 7491 | |
e811c8ce | 7492 | def Destroy(*args, **kwargs): |
0df68c9f | 7493 | """ |
a95a7133 | 7494 | Destroy(self) -> bool |
d14a1e28 | 7495 | |
15afbcd0 RD |
7496 | Destroys the window safely. Frames and dialogs are not destroyed |
7497 | immediately when this function is called -- they are added to a list | |
7498 | of windows to be deleted on idle time, when all the window's events | |
7499 | have been processed. This prevents problems with events being sent to | |
7500 | non-existent windows. | |
7501 | ||
7502 | Returns True if the window has either been successfully deleted, or it | |
7503 | has been added to the list of windows pending real deletion. | |
0df68c9f | 7504 | """ |
7e08d4ef RD |
7505 | val = _core_.Window_Destroy(*args, **kwargs) |
7506 | args[0].thisown = 0 | |
7507 | return val | |
d14a1e28 | 7508 | |
e811c8ce | 7509 | def DestroyChildren(*args, **kwargs): |
15afbcd0 | 7510 | """ |
a95a7133 | 7511 | DestroyChildren(self) -> bool |
15afbcd0 | 7512 | |
41e2b43e RD |
7513 | Destroys all children of a window. Called automatically by the |
7514 | destructor. | |
15afbcd0 | 7515 | """ |
54f9ee45 | 7516 | return _core_.Window_DestroyChildren(*args, **kwargs) |
d14a1e28 | 7517 | |
e811c8ce | 7518 | def IsBeingDeleted(*args, **kwargs): |
15afbcd0 | 7519 | """ |
a95a7133 | 7520 | IsBeingDeleted(self) -> bool |
15afbcd0 RD |
7521 | |
7522 | Is the window in the process of being deleted? | |
7523 | """ | |
54f9ee45 | 7524 | return _core_.Window_IsBeingDeleted(*args, **kwargs) |
d14a1e28 | 7525 | |
e811c8ce | 7526 | def SetLabel(*args, **kwargs): |
15afbcd0 | 7527 | """ |
a95a7133 | 7528 | SetLabel(self, String label) |
15afbcd0 RD |
7529 | |
7530 | Set the text which the window shows in its label if applicable. | |
7531 | """ | |
54f9ee45 | 7532 | return _core_.Window_SetLabel(*args, **kwargs) |
d14a1e28 | 7533 | |
e811c8ce | 7534 | def GetLabel(*args, **kwargs): |
15afbcd0 | 7535 | """ |
a95a7133 | 7536 | GetLabel(self) -> String |
15afbcd0 | 7537 | |
41e2b43e RD |
7538 | Generic way of getting a label from any window, for identification |
7539 | purposes. The interpretation of this function differs from class to | |
7540 | class. For frames and dialogs, the value returned is the title. For | |
7541 | buttons or static text controls, it is the button text. This function | |
7542 | can be useful for meta-programs such as testing tools or special-needs | |
7543 | access programs)which need to identify windows by name. | |
15afbcd0 | 7544 | """ |
54f9ee45 | 7545 | return _core_.Window_GetLabel(*args, **kwargs) |
d14a1e28 | 7546 | |
e811c8ce | 7547 | def SetName(*args, **kwargs): |
15afbcd0 | 7548 | """ |
a95a7133 | 7549 | SetName(self, String name) |
15afbcd0 | 7550 | |
41e2b43e RD |
7551 | Sets the window's name. The window name is used for ressource setting |
7552 | in X, it is not the same as the window title/label | |
15afbcd0 | 7553 | """ |
54f9ee45 | 7554 | return _core_.Window_SetName(*args, **kwargs) |
d14a1e28 | 7555 | |
e811c8ce | 7556 | def GetName(*args, **kwargs): |
15afbcd0 | 7557 | """ |
a95a7133 | 7558 | GetName(self) -> String |
15afbcd0 | 7559 | |
41e2b43e RD |
7560 | Returns the windows name. This name is not guaranteed to be unique; |
7561 | it is up to the programmer to supply an appropriate name in the window | |
7562 | constructor or via wx.Window.SetName. | |
15afbcd0 | 7563 | """ |
54f9ee45 | 7564 | return _core_.Window_GetName(*args, **kwargs) |
d14a1e28 | 7565 | |
4276dc52 RD |
7566 | def SetWindowVariant(*args, **kwargs): |
7567 | """ | |
a95a7133 | 7568 | SetWindowVariant(self, int variant) |
4276dc52 | 7569 | |
41e2b43e RD |
7570 | Sets the variant of the window/font size to use for this window, if |
7571 | the platform supports variants, for example, wxMac. | |
4276dc52 | 7572 | """ |
54f9ee45 | 7573 | return _core_.Window_SetWindowVariant(*args, **kwargs) |
4276dc52 RD |
7574 | |
7575 | def GetWindowVariant(*args, **kwargs): | |
a95a7133 | 7576 | """GetWindowVariant(self) -> int""" |
54f9ee45 | 7577 | return _core_.Window_GetWindowVariant(*args, **kwargs) |
4276dc52 | 7578 | |
e811c8ce | 7579 | def SetId(*args, **kwargs): |
15afbcd0 | 7580 | """ |
a95a7133 | 7581 | SetId(self, int winid) |
15afbcd0 RD |
7582 | |
7583 | Sets the identifier of the window. Each window has an integer | |
7584 | identifier. If the application has not provided one, an identifier | |
7585 | will be generated. Normally, the identifier should be provided on | |
7586 | creation and should not be modified subsequently. | |
7587 | """ | |
54f9ee45 | 7588 | return _core_.Window_SetId(*args, **kwargs) |
d14a1e28 | 7589 | |
e811c8ce | 7590 | def GetId(*args, **kwargs): |
15afbcd0 | 7591 | """ |
a95a7133 | 7592 | GetId(self) -> int |
15afbcd0 RD |
7593 | |
7594 | Returns the identifier of the window. Each window has an integer | |
7595 | identifier. If the application has not provided one (or the default Id | |
7596 | -1 is used) then an unique identifier with a negative value will be | |
7597 | generated. | |
7598 | """ | |
54f9ee45 | 7599 | return _core_.Window_GetId(*args, **kwargs) |
d14a1e28 | 7600 | |
e811c8ce | 7601 | def NewControlId(*args, **kwargs): |
15afbcd0 | 7602 | """ |
66c033b4 | 7603 | NewControlId() -> int |
15afbcd0 RD |
7604 | |
7605 | Generate a control id for the controls which were not given one. | |
7606 | """ | |
54f9ee45 | 7607 | return _core_.Window_NewControlId(*args, **kwargs) |
d14a1e28 | 7608 | |
e811c8ce RD |
7609 | NewControlId = staticmethod(NewControlId) |
7610 | def NextControlId(*args, **kwargs): | |
15afbcd0 | 7611 | """ |
66c033b4 | 7612 | NextControlId(int winid) -> int |
15afbcd0 RD |
7613 | |
7614 | Get the id of the control following the one with the given | |
41e2b43e | 7615 | autogenerated) id |
15afbcd0 | 7616 | """ |
54f9ee45 | 7617 | return _core_.Window_NextControlId(*args, **kwargs) |
d14a1e28 | 7618 | |
e811c8ce RD |
7619 | NextControlId = staticmethod(NextControlId) |
7620 | def PrevControlId(*args, **kwargs): | |
15afbcd0 | 7621 | """ |
66c033b4 | 7622 | PrevControlId(int winid) -> int |
15afbcd0 RD |
7623 | |
7624 | Get the id of the control preceding the one with the given | |
41e2b43e | 7625 | autogenerated) id |
15afbcd0 | 7626 | """ |
54f9ee45 | 7627 | return _core_.Window_PrevControlId(*args, **kwargs) |
d14a1e28 | 7628 | |
e811c8ce RD |
7629 | PrevControlId = staticmethod(PrevControlId) |
7630 | def SetSize(*args, **kwargs): | |
15afbcd0 | 7631 | """ |
a95a7133 | 7632 | SetSize(self, Size size) |
15afbcd0 RD |
7633 | |
7634 | Sets the size of the window in pixels. | |
7635 | """ | |
54f9ee45 | 7636 | return _core_.Window_SetSize(*args, **kwargs) |
d14a1e28 | 7637 | |
e811c8ce | 7638 | def SetDimensions(*args, **kwargs): |
15afbcd0 | 7639 | """ |
a95a7133 | 7640 | SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) |
15afbcd0 RD |
7641 | |
7642 | Sets the position and size of the window in pixels. The sizeFlags | |
7643 | parameter indicates the interpretation of the other params if they are | |
e505d15e RD |
7644 | equal to -1. |
7645 | ||
7646 | ======================== ====================================== | |
7647 | wx.SIZE_AUTO A -1 indicates that a class-specific | |
7648 | default should be used. | |
7649 | wx.SIZE_USE_EXISTING Axisting dimensions should be used if | |
7650 | -1 values are supplied. | |
7651 | wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be | |
7652 | interpreted as real dimensions, not | |
7653 | default values. | |
7654 | ======================== ====================================== | |
7655 | ||
15afbcd0 | 7656 | """ |
54f9ee45 | 7657 | return _core_.Window_SetDimensions(*args, **kwargs) |
d14a1e28 | 7658 | |
e811c8ce | 7659 | def SetRect(*args, **kwargs): |
15afbcd0 | 7660 | """ |
a95a7133 | 7661 | SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO) |
15afbcd0 RD |
7662 | |
7663 | Sets the position and size of the window in pixels using a wx.Rect. | |
7664 | """ | |
54f9ee45 | 7665 | return _core_.Window_SetRect(*args, **kwargs) |
d14a1e28 | 7666 | |
e811c8ce | 7667 | def SetSizeWH(*args, **kwargs): |
15afbcd0 | 7668 | """ |
a95a7133 | 7669 | SetSizeWH(self, int width, int height) |
15afbcd0 RD |
7670 | |
7671 | Sets the size of the window in pixels. | |
7672 | """ | |
54f9ee45 | 7673 | return _core_.Window_SetSizeWH(*args, **kwargs) |
d14a1e28 | 7674 | |
e811c8ce | 7675 | def Move(*args, **kwargs): |
15afbcd0 | 7676 | """ |
a95a7133 | 7677 | Move(self, Point pt, int flags=SIZE_USE_EXISTING) |
15afbcd0 RD |
7678 | |
7679 | Moves the window to the given position. | |
7680 | """ | |
54f9ee45 | 7681 | return _core_.Window_Move(*args, **kwargs) |
d14a1e28 | 7682 | |
e811c8ce RD |
7683 | SetPosition = Move |
7684 | def MoveXY(*args, **kwargs): | |
15afbcd0 | 7685 | """ |
a95a7133 | 7686 | MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING) |
15afbcd0 RD |
7687 | |
7688 | Moves the window to the given position. | |
7689 | """ | |
54f9ee45 | 7690 | return _core_.Window_MoveXY(*args, **kwargs) |
e811c8ce | 7691 | |
f8167d6e RD |
7692 | def SetBestFittingSize(*args, **kwargs): |
7693 | """ | |
7694 | SetBestFittingSize(self, Size size=DefaultSize) | |
7695 | ||
7696 | A 'Smart' SetSize that will fill in default size components with the | |
7697 | window's *best size* values. Also set's the minsize for use with sizers. | |
7698 | """ | |
7699 | return _core_.Window_SetBestFittingSize(*args, **kwargs) | |
7700 | ||
e811c8ce | 7701 | def Raise(*args, **kwargs): |
15afbcd0 | 7702 | """ |
a95a7133 | 7703 | Raise(self) |
15afbcd0 | 7704 | |
943e8dfd RD |
7705 | Raises the window to the top of the window hierarchy. In current |
7706 | version of wxWidgets this works both for manage and child windows. | |
15afbcd0 | 7707 | """ |
54f9ee45 | 7708 | return _core_.Window_Raise(*args, **kwargs) |
e811c8ce RD |
7709 | |
7710 | def Lower(*args, **kwargs): | |
15afbcd0 | 7711 | """ |
a95a7133 | 7712 | Lower(self) |
15afbcd0 | 7713 | |
943e8dfd RD |
7714 | Lowers the window to the bottom of the window hierarchy. In current |
7715 | version of wxWidgets this works both for manage and child windows. | |
15afbcd0 | 7716 | """ |
54f9ee45 | 7717 | return _core_.Window_Lower(*args, **kwargs) |
e811c8ce RD |
7718 | |
7719 | def SetClientSize(*args, **kwargs): | |
15afbcd0 | 7720 | """ |
a95a7133 | 7721 | SetClientSize(self, Size size) |
15afbcd0 RD |
7722 | |
7723 | This sets the size of the window client area in pixels. Using this | |
7724 | function to size a window tends to be more device-independent than | |
7725 | wx.Window.SetSize, since the application need not worry about what | |
7726 | dimensions the border or title bar have when trying to fit the window | |
7727 | around panel items, for example. | |
7728 | """ | |
54f9ee45 | 7729 | return _core_.Window_SetClientSize(*args, **kwargs) |
e811c8ce RD |
7730 | |
7731 | def SetClientSizeWH(*args, **kwargs): | |
15afbcd0 | 7732 | """ |
a95a7133 | 7733 | SetClientSizeWH(self, int width, int height) |
15afbcd0 RD |
7734 | |
7735 | This sets the size of the window client area in pixels. Using this | |
7736 | function to size a window tends to be more device-independent than | |
7737 | wx.Window.SetSize, since the application need not worry about what | |
7738 | dimensions the border or title bar have when trying to fit the window | |
7739 | around panel items, for example. | |
7740 | """ | |
54f9ee45 | 7741 | return _core_.Window_SetClientSizeWH(*args, **kwargs) |
e811c8ce RD |
7742 | |
7743 | def SetClientRect(*args, **kwargs): | |
15afbcd0 | 7744 | """ |
a95a7133 | 7745 | SetClientRect(self, Rect rect) |
15afbcd0 RD |
7746 | |
7747 | This sets the size of the window client area in pixels. Using this | |
7748 | function to size a window tends to be more device-independent than | |
7749 | wx.Window.SetSize, since the application need not worry about what | |
7750 | dimensions the border or title bar have when trying to fit the window | |
7751 | around panel items, for example. | |
7752 | """ | |
54f9ee45 | 7753 | return _core_.Window_SetClientRect(*args, **kwargs) |
e811c8ce RD |
7754 | |
7755 | def GetPosition(*args, **kwargs): | |
0df68c9f | 7756 | """ |
a95a7133 | 7757 | GetPosition(self) -> Point |
e811c8ce | 7758 | |
75219dcb RD |
7759 | Get the window's position. Notice that the position is in client |
7760 | coordinates for child windows and screen coordinates for the top level | |
7761 | ones, use `GetScreenPosition` if you need screen coordinates for all | |
7762 | kinds of windows. | |
0df68c9f | 7763 | """ |
54f9ee45 | 7764 | return _core_.Window_GetPosition(*args, **kwargs) |
e811c8ce RD |
7765 | |
7766 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
7767 | """ |
7768 | GetPositionTuple() -> (x,y) | |
e811c8ce | 7769 | |
75219dcb RD |
7770 | Get the window's position. Notice that the position is in client |
7771 | coordinates for child windows and screen coordinates for the top level | |
7772 | ones, use `GetScreenPosition` if you need screen coordinates for all | |
7773 | kinds of windows. | |
0df68c9f | 7774 | """ |
54f9ee45 | 7775 | return _core_.Window_GetPositionTuple(*args, **kwargs) |
e811c8ce | 7776 | |
75219dcb RD |
7777 | def GetScreenPosition(*args, **kwargs): |
7778 | """ | |
7779 | GetScreenPosition(self) -> Point | |
7780 | ||
7781 | Get the position of the window in screen coordinantes. | |
7782 | """ | |
7783 | return _core_.Window_GetScreenPosition(*args, **kwargs) | |
7784 | ||
7785 | def GetScreenPositionTuple(*args, **kwargs): | |
7786 | """ | |
7787 | GetScreenPositionTuple() -> (x,y) | |
7788 | ||
7789 | Get the position of the window in screen coordinantes. | |
7790 | """ | |
7791 | return _core_.Window_GetScreenPositionTuple(*args, **kwargs) | |
7792 | ||
7793 | def GetScreenRect(*args, **kwargs): | |
7794 | """ | |
7795 | GetScreenRect(self) -> Rect | |
7796 | ||
7797 | Returns the size and position of the window in screen coordinantes as | |
7798 | a `wx.Rect` object. | |
7799 | """ | |
7800 | return _core_.Window_GetScreenRect(*args, **kwargs) | |
7801 | ||
e811c8ce | 7802 | def GetSize(*args, **kwargs): |
0df68c9f | 7803 | """ |
a95a7133 | 7804 | GetSize(self) -> Size |
e811c8ce | 7805 | |
0df68c9f RD |
7806 | Get the window size. |
7807 | """ | |
54f9ee45 | 7808 | return _core_.Window_GetSize(*args, **kwargs) |
e811c8ce RD |
7809 | |
7810 | def GetSizeTuple(*args, **kwargs): | |
0df68c9f RD |
7811 | """ |
7812 | GetSizeTuple() -> (width, height) | |
e811c8ce | 7813 | |
0df68c9f RD |
7814 | Get the window size. |
7815 | """ | |
54f9ee45 | 7816 | return _core_.Window_GetSizeTuple(*args, **kwargs) |
e811c8ce RD |
7817 | |
7818 | def GetRect(*args, **kwargs): | |
15afbcd0 | 7819 | """ |
a95a7133 | 7820 | GetRect(self) -> Rect |
15afbcd0 | 7821 | |
75219dcb | 7822 | Returns the size and position of the window as a `wx.Rect` object. |
15afbcd0 | 7823 | """ |
54f9ee45 | 7824 | return _core_.Window_GetRect(*args, **kwargs) |
e811c8ce RD |
7825 | |
7826 | def GetClientSize(*args, **kwargs): | |
0df68c9f | 7827 | """ |
a95a7133 | 7828 | GetClientSize(self) -> Size |
e811c8ce | 7829 | |
15afbcd0 RD |
7830 | This gets the size of the window's 'client area' in pixels. The client |
7831 | area is the area which may be drawn on by the programmer, excluding | |
7832 | title bar, border, scrollbars, etc. | |
0df68c9f | 7833 | """ |
54f9ee45 | 7834 | return _core_.Window_GetClientSize(*args, **kwargs) |
e811c8ce RD |
7835 | |
7836 | def GetClientSizeTuple(*args, **kwargs): | |
0df68c9f RD |
7837 | """ |
7838 | GetClientSizeTuple() -> (width, height) | |
e811c8ce | 7839 | |
15afbcd0 RD |
7840 | This gets the size of the window's 'client area' in pixels. The client |
7841 | area is the area which may be drawn on by the programmer, excluding | |
7842 | title bar, border, scrollbars, etc. | |
0df68c9f | 7843 | """ |
54f9ee45 | 7844 | return _core_.Window_GetClientSizeTuple(*args, **kwargs) |
e811c8ce RD |
7845 | |
7846 | def GetClientAreaOrigin(*args, **kwargs): | |
15afbcd0 | 7847 | """ |
a95a7133 | 7848 | GetClientAreaOrigin(self) -> Point |
15afbcd0 RD |
7849 | |
7850 | Get the origin of the client area of the window relative to the | |
7851 | window's top left corner (the client area may be shifted because of | |
7852 | the borders, scrollbars, other decorations...) | |
7853 | """ | |
54f9ee45 | 7854 | return _core_.Window_GetClientAreaOrigin(*args, **kwargs) |
e811c8ce RD |
7855 | |
7856 | def GetClientRect(*args, **kwargs): | |
15afbcd0 | 7857 | """ |
a95a7133 | 7858 | GetClientRect(self) -> Rect |
15afbcd0 | 7859 | |
61863841 | 7860 | Get the client area position and size as a `wx.Rect` object. |
15afbcd0 | 7861 | """ |
54f9ee45 | 7862 | return _core_.Window_GetClientRect(*args, **kwargs) |
e811c8ce RD |
7863 | |
7864 | def GetBestSize(*args, **kwargs): | |
0df68c9f | 7865 | """ |
a95a7133 | 7866 | GetBestSize(self) -> Size |
e811c8ce | 7867 | |
248ed943 | 7868 | This function returns the best acceptable minimal size for the |
41e2b43e RD |
7869 | window, if applicable. For example, for a static text control, it will |
7870 | be the minimal size such that the control label is not truncated. For | |
7871 | windows containing subwindows (suzh aswx.Panel), the size returned by | |
7872 | this function will be the same as the size the window would have had | |
7873 | after calling Fit. | |
0df68c9f | 7874 | """ |
54f9ee45 | 7875 | return _core_.Window_GetBestSize(*args, **kwargs) |
e811c8ce RD |
7876 | |
7877 | def GetBestSizeTuple(*args, **kwargs): | |
0df68c9f RD |
7878 | """ |
7879 | GetBestSizeTuple() -> (width, height) | |
e811c8ce | 7880 | |
248ed943 | 7881 | This function returns the best acceptable minimal size for the |
41e2b43e RD |
7882 | window, if applicable. For example, for a static text control, it will |
7883 | be the minimal size such that the control label is not truncated. For | |
7884 | windows containing subwindows (suzh aswx.Panel), the size returned by | |
7885 | this function will be the same as the size the window would have had | |
7886 | after calling Fit. | |
0df68c9f | 7887 | """ |
54f9ee45 | 7888 | return _core_.Window_GetBestSizeTuple(*args, **kwargs) |
e811c8ce | 7889 | |
dfbb5885 RD |
7890 | def InvalidateBestSize(*args, **kwargs): |
7891 | """ | |
7892 | InvalidateBestSize(self) | |
7893 | ||
7894 | Reset the cached best size value so it will be recalculated the next | |
7895 | time it is needed. | |
7896 | """ | |
7897 | return _core_.Window_InvalidateBestSize(*args, **kwargs) | |
7898 | ||
e2813725 RD |
7899 | def CacheBestSize(*args, **kwargs): |
7900 | """ | |
7901 | CacheBestSize(self, Size size) | |
7902 | ||
7903 | Cache the best size so it doesn't need to be calculated again, (at least until | |
7904 | some properties of the window change.) | |
7905 | """ | |
7906 | return _core_.Window_CacheBestSize(*args, **kwargs) | |
7907 | ||
dfbb5885 RD |
7908 | def GetBestFittingSize(*args, **kwargs): |
7909 | """ | |
7910 | GetBestFittingSize(self) -> Size | |
7911 | ||
7912 | This function will merge the window's best size into the window's | |
7913 | minimum size, giving priority to the min size components, and returns | |
7914 | the results. | |
7915 | ||
7916 | """ | |
7917 | return _core_.Window_GetBestFittingSize(*args, **kwargs) | |
7918 | ||
e811c8ce | 7919 | def GetAdjustedBestSize(*args, **kwargs): |
15afbcd0 | 7920 | """ |
a95a7133 | 7921 | GetAdjustedBestSize(self) -> Size |
15afbcd0 RD |
7922 | |
7923 | This method is similar to GetBestSize, except in one | |
7924 | thing. GetBestSize should return the minimum untruncated size of the | |
7925 | window, while this method will return the largest of BestSize and any | |
7926 | user specified minimum size. ie. it is the minimum size the window | |
7927 | should currently be drawn at, not the minimal size it can possibly | |
7928 | tolerate. | |
7929 | """ | |
54f9ee45 | 7930 | return _core_.Window_GetAdjustedBestSize(*args, **kwargs) |
e811c8ce RD |
7931 | |
7932 | def Center(*args, **kwargs): | |
15afbcd0 | 7933 | """ |
a95a7133 | 7934 | Center(self, int direction=BOTH) |
15afbcd0 RD |
7935 | |
7936 | Centers the window. The parameter specifies the direction for | |
7937 | cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may | |
7938 | also include wx.CENTER_ON_SCREEN flag if you want to center the window | |
7939 | on the entire screen and not on its parent window. If it is a | |
7940 | top-level window and has no parent then it will always be centered | |
7941 | relative to the screen. | |
7942 | """ | |
54f9ee45 | 7943 | return _core_.Window_Center(*args, **kwargs) |
e811c8ce RD |
7944 | |
7945 | Centre = Center | |
e811c8ce | 7946 | def CenterOnParent(*args, **kwargs): |
15afbcd0 | 7947 | """ |
a95a7133 | 7948 | CenterOnParent(self, int dir=BOTH) |
15afbcd0 RD |
7949 | |
7950 | Center with respect to the the parent window | |
7951 | """ | |
54f9ee45 | 7952 | return _core_.Window_CenterOnParent(*args, **kwargs) |
e811c8ce RD |
7953 | |
7954 | CentreOnParent = CenterOnParent | |
7955 | def Fit(*args, **kwargs): | |
15afbcd0 | 7956 | """ |
a95a7133 | 7957 | Fit(self) |
15afbcd0 RD |
7958 | |
7959 | Sizes the window so that it fits around its subwindows. This function | |
7960 | won't do anything if there are no subwindows and will only really work | |
7961 | correctly if sizers are used for the subwindows layout. Also, if the | |
7962 | window has exactly one subwindow it is better (faster and the result | |
7963 | is more precise as Fit adds some margin to account for fuzziness of | |
7964 | its calculations) to call window.SetClientSize(child.GetSize()) | |
7965 | instead of calling Fit. | |
7966 | """ | |
54f9ee45 | 7967 | return _core_.Window_Fit(*args, **kwargs) |
e811c8ce RD |
7968 | |
7969 | def FitInside(*args, **kwargs): | |
15afbcd0 | 7970 | """ |
a95a7133 | 7971 | FitInside(self) |
15afbcd0 RD |
7972 | |
7973 | Similar to Fit, but sizes the interior (virtual) size of a | |
7974 | window. Mainly useful with scrolled windows to reset scrollbars after | |
7975 | sizing changes that do not trigger a size event, and/or scrolled | |
7976 | windows without an interior sizer. This function similarly won't do | |
7977 | anything if there are no subwindows. | |
7978 | """ | |
54f9ee45 | 7979 | return _core_.Window_FitInside(*args, **kwargs) |
e811c8ce | 7980 | |
f16ab95d | 7981 | def SetSizeHints(*args, **kwargs): |
0df68c9f | 7982 | """ |
a95a7133 | 7983 | SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, |
0df68c9f | 7984 | int incH=-1) |
15afbcd0 RD |
7985 | |
7986 | Allows specification of minimum and maximum window sizes, and window | |
7987 | size increments. If a pair of values is not set (or set to -1), the | |
7988 | default values will be used. If this function is called, the user | |
908b74cd RD |
7989 | will not be able to size the window outside the given bounds (if it is |
7990 | a top-level window.) Sizers will also inspect the minimum window size | |
7991 | and will use that value if set when calculating layout. | |
7992 | ||
7993 | The resizing increments are only significant under Motif or Xt. | |
0df68c9f | 7994 | """ |
f16ab95d | 7995 | return _core_.Window_SetSizeHints(*args, **kwargs) |
e811c8ce | 7996 | |
f16ab95d RD |
7997 | def SetSizeHintsSz(*args, **kwargs): |
7998 | """ | |
7999 | SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) | |
8000 | ||
8001 | Allows specification of minimum and maximum window sizes, and window | |
8002 | size increments. If a pair of values is not set (or set to -1), the | |
8003 | default values will be used. If this function is called, the user | |
8004 | will not be able to size the window outside the given bounds (if it is | |
8005 | a top-level window.) Sizers will also inspect the minimum window size | |
8006 | and will use that value if set when calculating layout. | |
8007 | ||
8008 | The resizing increments are only significant under Motif or Xt. | |
8009 | """ | |
8010 | return _core_.Window_SetSizeHintsSz(*args, **kwargs) | |
8011 | ||
8012 | def SetVirtualSizeHints(*args, **kwargs): | |
15afbcd0 | 8013 | """ |
908b74cd | 8014 | SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) |
15afbcd0 RD |
8015 | |
8016 | Allows specification of minimum and maximum virtual window sizes. If a | |
8017 | pair of values is not set (or set to -1), the default values will be | |
8018 | used. If this function is called, the user will not be able to size | |
8019 | the virtual area of the window outside the given bounds. | |
8020 | """ | |
f16ab95d RD |
8021 | return _core_.Window_SetVirtualSizeHints(*args, **kwargs) |
8022 | ||
8023 | def SetVirtualSizeHintsSz(*args, **kwargs): | |
8024 | """ | |
8025 | SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) | |
8026 | ||
8027 | Allows specification of minimum and maximum virtual window sizes. If a | |
8028 | pair of values is not set (or set to -1), the default values will be | |
8029 | used. If this function is called, the user will not be able to size | |
8030 | the virtual area of the window outside the given bounds. | |
8031 | """ | |
8032 | return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs) | |
e811c8ce | 8033 | |
908b74cd RD |
8034 | def GetMaxSize(*args, **kwargs): |
8035 | """GetMaxSize(self) -> Size""" | |
8036 | return _core_.Window_GetMaxSize(*args, **kwargs) | |
8037 | ||
8038 | def GetMinSize(*args, **kwargs): | |
8039 | """GetMinSize(self) -> Size""" | |
8040 | return _core_.Window_GetMinSize(*args, **kwargs) | |
8041 | ||
8042 | def SetMinSize(*args, **kwargs): | |
8043 | """ | |
8044 | SetMinSize(self, Size minSize) | |
8045 | ||
8046 | A more convenient method than `SetSizeHints` for setting just the | |
8047 | min size. | |
8048 | """ | |
8049 | return _core_.Window_SetMinSize(*args, **kwargs) | |
8050 | ||
8051 | def SetMaxSize(*args, **kwargs): | |
8052 | """ | |
8053 | SetMaxSize(self, Size maxSize) | |
8054 | ||
8055 | A more convenient method than `SetSizeHints` for setting just the | |
8056 | max size. | |
8057 | """ | |
8058 | return _core_.Window_SetMaxSize(*args, **kwargs) | |
8059 | ||
e811c8ce | 8060 | def GetMinWidth(*args, **kwargs): |
a95a7133 | 8061 | """GetMinWidth(self) -> int""" |
54f9ee45 | 8062 | return _core_.Window_GetMinWidth(*args, **kwargs) |
e811c8ce RD |
8063 | |
8064 | def GetMinHeight(*args, **kwargs): | |
a95a7133 | 8065 | """GetMinHeight(self) -> int""" |
54f9ee45 | 8066 | return _core_.Window_GetMinHeight(*args, **kwargs) |
e811c8ce RD |
8067 | |
8068 | def GetMaxWidth(*args, **kwargs): | |
a95a7133 | 8069 | """GetMaxWidth(self) -> int""" |
54f9ee45 | 8070 | return _core_.Window_GetMaxWidth(*args, **kwargs) |
e811c8ce RD |
8071 | |
8072 | def GetMaxHeight(*args, **kwargs): | |
a95a7133 | 8073 | """GetMaxHeight(self) -> int""" |
54f9ee45 | 8074 | return _core_.Window_GetMaxHeight(*args, **kwargs) |
e811c8ce | 8075 | |
e811c8ce | 8076 | def SetVirtualSize(*args, **kwargs): |
0df68c9f | 8077 | """ |
a95a7133 | 8078 | SetVirtualSize(self, Size size) |
e811c8ce | 8079 | |
15afbcd0 RD |
8080 | Set the the virtual size of a window in pixels. For most windows this |
8081 | is just the client area of the window, but for some like scrolled | |
8082 | windows it is more or less independent of the screen window size. | |
0df68c9f | 8083 | """ |
54f9ee45 | 8084 | return _core_.Window_SetVirtualSize(*args, **kwargs) |
e811c8ce RD |
8085 | |
8086 | def SetVirtualSizeWH(*args, **kwargs): | |
0df68c9f | 8087 | """ |
a95a7133 | 8088 | SetVirtualSizeWH(self, int w, int h) |
e811c8ce | 8089 | |
15afbcd0 RD |
8090 | Set the the virtual size of a window in pixels. For most windows this |
8091 | is just the client area of the window, but for some like scrolled | |
8092 | windows it is more or less independent of the screen window size. | |
0df68c9f | 8093 | """ |
54f9ee45 | 8094 | return _core_.Window_SetVirtualSizeWH(*args, **kwargs) |
e811c8ce RD |
8095 | |
8096 | def GetVirtualSize(*args, **kwargs): | |
0df68c9f | 8097 | """ |
a95a7133 | 8098 | GetVirtualSize(self) -> Size |
e811c8ce | 8099 | |
15afbcd0 RD |
8100 | Get the the virtual size of the window in pixels. For most windows |
8101 | this is just the client area of the window, but for some like scrolled | |
8102 | windows it is more or less independent of the screen window size. | |
0df68c9f | 8103 | """ |
54f9ee45 | 8104 | return _core_.Window_GetVirtualSize(*args, **kwargs) |
e811c8ce RD |
8105 | |
8106 | def GetVirtualSizeTuple(*args, **kwargs): | |
0df68c9f RD |
8107 | """ |
8108 | GetVirtualSizeTuple() -> (width, height) | |
e811c8ce | 8109 | |
15afbcd0 RD |
8110 | Get the the virtual size of the window in pixels. For most windows |
8111 | this is just the client area of the window, but for some like scrolled | |
8112 | windows it is more or less independent of the screen window size. | |
0df68c9f | 8113 | """ |
54f9ee45 | 8114 | return _core_.Window_GetVirtualSizeTuple(*args, **kwargs) |
e811c8ce RD |
8115 | |
8116 | def GetBestVirtualSize(*args, **kwargs): | |
15afbcd0 | 8117 | """ |
a95a7133 | 8118 | GetBestVirtualSize(self) -> Size |
15afbcd0 RD |
8119 | |
8120 | Return the largest of ClientSize and BestSize (as determined by a | |
8121 | sizer, interior children, or other means) | |
8122 | """ | |
54f9ee45 | 8123 | return _core_.Window_GetBestVirtualSize(*args, **kwargs) |
e811c8ce RD |
8124 | |
8125 | def Show(*args, **kwargs): | |
15afbcd0 | 8126 | """ |
a95a7133 | 8127 | Show(self, bool show=True) -> bool |
15afbcd0 RD |
8128 | |
8129 | Shows or hides the window. You may need to call Raise for a top level | |
8130 | window if you want to bring it to top, although this is not needed if | |
8131 | Show is called immediately after the frame creation. Returns True if | |
8132 | the window has been shown or hidden or False if nothing was done | |
8133 | because it already was in the requested state. | |
8134 | """ | |
54f9ee45 | 8135 | return _core_.Window_Show(*args, **kwargs) |
e811c8ce RD |
8136 | |
8137 | def Hide(*args, **kwargs): | |
15afbcd0 | 8138 | """ |
a95a7133 | 8139 | Hide(self) -> bool |
15afbcd0 RD |
8140 | |
8141 | Equivalent to calling Show(False). | |
8142 | """ | |
54f9ee45 | 8143 | return _core_.Window_Hide(*args, **kwargs) |
e811c8ce RD |
8144 | |
8145 | def Enable(*args, **kwargs): | |
15afbcd0 | 8146 | """ |
a95a7133 | 8147 | Enable(self, bool enable=True) -> bool |
15afbcd0 RD |
8148 | |
8149 | Enable or disable the window for user input. Note that when a parent | |
8150 | window is disabled, all of its children are disabled as well and they | |
8151 | are reenabled again when the parent is. Returns true if the window | |
8152 | has been enabled or disabled, false if nothing was done, i.e. if the | |
8153 | window had already been in the specified state. | |
8154 | """ | |
54f9ee45 | 8155 | return _core_.Window_Enable(*args, **kwargs) |
e811c8ce RD |
8156 | |
8157 | def Disable(*args, **kwargs): | |
15afbcd0 | 8158 | """ |
a95a7133 | 8159 | Disable(self) -> bool |
15afbcd0 RD |
8160 | |
8161 | Disables the window, same as Enable(false). | |
8162 | """ | |
54f9ee45 | 8163 | return _core_.Window_Disable(*args, **kwargs) |
e811c8ce RD |
8164 | |
8165 | def IsShown(*args, **kwargs): | |
15afbcd0 | 8166 | """ |
a95a7133 | 8167 | IsShown(self) -> bool |
15afbcd0 RD |
8168 | |
8169 | Returns true if the window is shown, false if it has been hidden. | |
8170 | """ | |
54f9ee45 | 8171 | return _core_.Window_IsShown(*args, **kwargs) |
e811c8ce RD |
8172 | |
8173 | def IsEnabled(*args, **kwargs): | |
15afbcd0 | 8174 | """ |
a95a7133 | 8175 | IsEnabled(self) -> bool |
15afbcd0 RD |
8176 | |
8177 | Returns true if the window is enabled for input, false otherwise. | |
8178 | """ | |
54f9ee45 | 8179 | return _core_.Window_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8180 | |
8181 | def SetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 | 8182 | """ |
a95a7133 | 8183 | SetWindowStyleFlag(self, long style) |
15afbcd0 | 8184 | |
41e2b43e RD |
8185 | Sets the style of the window. Please note that some styles cannot be |
8186 | changed after the window creation and that Refresh() might need to be | |
8187 | called after changing the others for the change to take place | |
8188 | immediately. | |
15afbcd0 | 8189 | """ |
54f9ee45 | 8190 | return _core_.Window_SetWindowStyleFlag(*args, **kwargs) |
e811c8ce RD |
8191 | |
8192 | def GetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 | 8193 | """ |
a95a7133 | 8194 | GetWindowStyleFlag(self) -> long |
e811c8ce | 8195 | |
15afbcd0 RD |
8196 | Gets the window style that was passed to the constructor or Create |
8197 | method. | |
8198 | """ | |
54f9ee45 | 8199 | return _core_.Window_GetWindowStyleFlag(*args, **kwargs) |
e811c8ce | 8200 | |
15afbcd0 | 8201 | SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag |
e811c8ce | 8202 | def HasFlag(*args, **kwargs): |
15afbcd0 | 8203 | """ |
a95a7133 | 8204 | HasFlag(self, int flag) -> bool |
15afbcd0 RD |
8205 | |
8206 | Test if the given style is set for this window. | |
8207 | """ | |
54f9ee45 | 8208 | return _core_.Window_HasFlag(*args, **kwargs) |
e811c8ce RD |
8209 | |
8210 | def IsRetained(*args, **kwargs): | |
15afbcd0 | 8211 | """ |
a95a7133 | 8212 | IsRetained(self) -> bool |
15afbcd0 RD |
8213 | |
8214 | Returns true if the window is retained, false otherwise. Retained | |
8215 | windows are only available on X platforms. | |
8216 | """ | |
54f9ee45 | 8217 | return _core_.Window_IsRetained(*args, **kwargs) |
e811c8ce RD |
8218 | |
8219 | def SetExtraStyle(*args, **kwargs): | |
15afbcd0 | 8220 | """ |
a95a7133 | 8221 | SetExtraStyle(self, long exStyle) |
15afbcd0 RD |
8222 | |
8223 | Sets the extra style bits for the window. Extra styles are the less | |
8224 | often used style bits which can't be set with the constructor or with | |
8225 | SetWindowStyleFlag() | |
8226 | """ | |
54f9ee45 | 8227 | return _core_.Window_SetExtraStyle(*args, **kwargs) |
e811c8ce RD |
8228 | |
8229 | def GetExtraStyle(*args, **kwargs): | |
15afbcd0 | 8230 | """ |
a95a7133 | 8231 | GetExtraStyle(self) -> long |
15afbcd0 RD |
8232 | |
8233 | Returns the extra style bits for the window. | |
8234 | """ | |
54f9ee45 | 8235 | return _core_.Window_GetExtraStyle(*args, **kwargs) |
e811c8ce RD |
8236 | |
8237 | def MakeModal(*args, **kwargs): | |
15afbcd0 | 8238 | """ |
a95a7133 | 8239 | MakeModal(self, bool modal=True) |
15afbcd0 RD |
8240 | |
8241 | Disables all other windows in the application so that the user can | |
8242 | only interact with this window. Passing False will reverse this | |
8243 | effect. | |
8244 | """ | |
54f9ee45 | 8245 | return _core_.Window_MakeModal(*args, **kwargs) |
e811c8ce RD |
8246 | |
8247 | def SetThemeEnabled(*args, **kwargs): | |
15afbcd0 | 8248 | """ |
a95a7133 | 8249 | SetThemeEnabled(self, bool enableTheme) |
15afbcd0 RD |
8250 | |
8251 | This function tells a window if it should use the system's "theme" | |
8252 | code to draw the windows' background instead if its own background | |
8253 | drawing code. This will only have an effect on platforms that support | |
8254 | the notion of themes in user defined windows. One such platform is | |
8255 | GTK+ where windows can have (very colourful) backgrounds defined by a | |
8256 | user's selected theme. | |
8257 | ||
8258 | Dialogs, notebook pages and the status bar have this flag set to true | |
8259 | by default so that the default look and feel is simulated best. | |
8260 | """ | |
54f9ee45 | 8261 | return _core_.Window_SetThemeEnabled(*args, **kwargs) |
e811c8ce RD |
8262 | |
8263 | def GetThemeEnabled(*args, **kwargs): | |
15afbcd0 | 8264 | """ |
a95a7133 | 8265 | GetThemeEnabled(self) -> bool |
e811c8ce | 8266 | |
15afbcd0 RD |
8267 | Return the themeEnabled flag. |
8268 | """ | |
54f9ee45 | 8269 | return _core_.Window_GetThemeEnabled(*args, **kwargs) |
e811c8ce RD |
8270 | |
8271 | def SetFocus(*args, **kwargs): | |
15afbcd0 | 8272 | """ |
a95a7133 | 8273 | SetFocus(self) |
15afbcd0 RD |
8274 | |
8275 | Set's the focus to this window, allowing it to receive keyboard input. | |
8276 | """ | |
54f9ee45 | 8277 | return _core_.Window_SetFocus(*args, **kwargs) |
e811c8ce RD |
8278 | |
8279 | def SetFocusFromKbd(*args, **kwargs): | |
15afbcd0 | 8280 | """ |
a95a7133 | 8281 | SetFocusFromKbd(self) |
15afbcd0 RD |
8282 | |
8283 | Set focus to this window as the result of a keyboard action. Normally | |
8284 | only called internally. | |
8285 | """ | |
54f9ee45 | 8286 | return _core_.Window_SetFocusFromKbd(*args, **kwargs) |
e811c8ce RD |
8287 | |
8288 | def FindFocus(*args, **kwargs): | |
15afbcd0 | 8289 | """ |
66c033b4 | 8290 | FindFocus() -> Window |
15afbcd0 RD |
8291 | |
8292 | Returns the window or control that currently has the keyboard focus, | |
8293 | or None. | |
8294 | """ | |
54f9ee45 | 8295 | return _core_.Window_FindFocus(*args, **kwargs) |
e811c8ce RD |
8296 | |
8297 | FindFocus = staticmethod(FindFocus) | |
8298 | def AcceptsFocus(*args, **kwargs): | |
15afbcd0 | 8299 | """ |
a95a7133 | 8300 | AcceptsFocus(self) -> bool |
15afbcd0 RD |
8301 | |
8302 | Can this window have focus? | |
8303 | """ | |
54f9ee45 | 8304 | return _core_.Window_AcceptsFocus(*args, **kwargs) |
e811c8ce RD |
8305 | |
8306 | def AcceptsFocusFromKeyboard(*args, **kwargs): | |
15afbcd0 | 8307 | """ |
a95a7133 | 8308 | AcceptsFocusFromKeyboard(self) -> bool |
15afbcd0 RD |
8309 | |
8310 | Can this window be given focus by keyboard navigation? if not, the | |
8311 | only way to give it focus (provided it accepts it at all) is to click | |
8312 | it. | |
8313 | """ | |
54f9ee45 | 8314 | return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs) |
e811c8ce RD |
8315 | |
8316 | def GetDefaultItem(*args, **kwargs): | |
15afbcd0 | 8317 | """ |
a95a7133 | 8318 | GetDefaultItem(self) -> Window |
15afbcd0 RD |
8319 | |
8320 | Get the default child of this parent, i.e. the one which is activated | |
8321 | by pressing <Enter> such as the OK button on a wx.Dialog. | |
8322 | """ | |
54f9ee45 | 8323 | return _core_.Window_GetDefaultItem(*args, **kwargs) |
e811c8ce RD |
8324 | |
8325 | def SetDefaultItem(*args, **kwargs): | |
15afbcd0 | 8326 | """ |
a95a7133 | 8327 | SetDefaultItem(self, Window child) -> Window |
15afbcd0 RD |
8328 | |
8329 | Set this child as default, return the old default. | |
8330 | """ | |
54f9ee45 | 8331 | return _core_.Window_SetDefaultItem(*args, **kwargs) |
e811c8ce RD |
8332 | |
8333 | def SetTmpDefaultItem(*args, **kwargs): | |
15afbcd0 | 8334 | """ |
a95a7133 | 8335 | SetTmpDefaultItem(self, Window win) |
15afbcd0 RD |
8336 | |
8337 | Set this child as temporary default | |
8338 | """ | |
54f9ee45 | 8339 | return _core_.Window_SetTmpDefaultItem(*args, **kwargs) |
e811c8ce | 8340 | |
908b74cd RD |
8341 | def Navigate(*args, **kwargs): |
8342 | """ | |
8343 | Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool | |
8344 | ||
fd2dc343 RD |
8345 | Does keyboard navigation from this window to another, by sending a |
8346 | `wx.NavigationKeyEvent`. | |
908b74cd RD |
8347 | """ |
8348 | return _core_.Window_Navigate(*args, **kwargs) | |
8349 | ||
7f98d120 RD |
8350 | def MoveAfterInTabOrder(*args, **kwargs): |
8351 | """ | |
8352 | MoveAfterInTabOrder(self, Window win) | |
8353 | ||
8354 | Moves this window in the tab navigation order after the specified | |
8355 | sibling window. This means that when the user presses the TAB key on | |
8356 | that other window, the focus switches to this window. | |
8357 | ||
8358 | The default tab order is the same as creation order. This function | |
8359 | and `MoveBeforeInTabOrder` allow to change it after creating all the | |
8360 | windows. | |
8361 | ||
8362 | """ | |
8363 | return _core_.Window_MoveAfterInTabOrder(*args, **kwargs) | |
8364 | ||
8365 | def MoveBeforeInTabOrder(*args, **kwargs): | |
8366 | """ | |
8367 | MoveBeforeInTabOrder(self, Window win) | |
8368 | ||
8369 | Same as `MoveAfterInTabOrder` except that it inserts this window just | |
8370 | before win instead of putting it right after it. | |
8371 | """ | |
8372 | return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs) | |
8373 | ||
e811c8ce | 8374 | def GetChildren(*args, **kwargs): |
15afbcd0 | 8375 | """ |
a95a7133 | 8376 | GetChildren(self) -> PyObject |
15afbcd0 RD |
8377 | |
8378 | Returns a list of the window's children. NOTE: Currently this is a | |
8379 | copy of the child window list maintained by the window, so the return | |
8380 | value of this function is only valid as long as the window's children | |
8381 | do not change. | |
8382 | """ | |
54f9ee45 | 8383 | return _core_.Window_GetChildren(*args, **kwargs) |
e811c8ce RD |
8384 | |
8385 | def GetParent(*args, **kwargs): | |
15afbcd0 | 8386 | """ |
a95a7133 | 8387 | GetParent(self) -> Window |
15afbcd0 RD |
8388 | |
8389 | Returns the parent window of this window, or None if there isn't one. | |
8390 | """ | |
54f9ee45 | 8391 | return _core_.Window_GetParent(*args, **kwargs) |
e811c8ce RD |
8392 | |
8393 | def GetGrandParent(*args, **kwargs): | |
15afbcd0 | 8394 | """ |
a95a7133 | 8395 | GetGrandParent(self) -> Window |
15afbcd0 | 8396 | |
41e2b43e RD |
8397 | Returns the parent of the parent of this window, or None if there |
8398 | isn't one. | |
15afbcd0 | 8399 | """ |
54f9ee45 | 8400 | return _core_.Window_GetGrandParent(*args, **kwargs) |
e811c8ce RD |
8401 | |
8402 | def IsTopLevel(*args, **kwargs): | |
15afbcd0 | 8403 | """ |
a95a7133 | 8404 | IsTopLevel(self) -> bool |
15afbcd0 RD |
8405 | |
8406 | Returns true if the given window is a top-level one. Currently all | |
8407 | frames and dialogs are always considered to be top-level windows (even | |
8408 | if they have a parent window). | |
8409 | """ | |
54f9ee45 | 8410 | return _core_.Window_IsTopLevel(*args, **kwargs) |
e811c8ce RD |
8411 | |
8412 | def Reparent(*args, **kwargs): | |
15afbcd0 | 8413 | """ |
a95a7133 | 8414 | Reparent(self, Window newParent) -> bool |
15afbcd0 RD |
8415 | |
8416 | Reparents the window, i.e the window will be removed from its current | |
8417 | parent window (e.g. a non-standard toolbar in a wxFrame) and then | |
8418 | re-inserted into another. Available on Windows and GTK. Returns True | |
8419 | if the parent was changed, False otherwise (error or newParent == | |
8420 | oldParent) | |
8421 | """ | |
54f9ee45 | 8422 | return _core_.Window_Reparent(*args, **kwargs) |
e811c8ce RD |
8423 | |
8424 | def AddChild(*args, **kwargs): | |
15afbcd0 | 8425 | """ |
a95a7133 | 8426 | AddChild(self, Window child) |
15afbcd0 RD |
8427 | |
8428 | Adds a child window. This is called automatically by window creation | |
8429 | functions so should not be required by the application programmer. | |
8430 | """ | |
54f9ee45 | 8431 | return _core_.Window_AddChild(*args, **kwargs) |
e811c8ce RD |
8432 | |
8433 | def RemoveChild(*args, **kwargs): | |
15afbcd0 | 8434 | """ |
a95a7133 | 8435 | RemoveChild(self, Window child) |
15afbcd0 RD |
8436 | |
8437 | Removes a child window. This is called automatically by window | |
8438 | deletion functions so should not be required by the application | |
8439 | programmer. | |
8440 | """ | |
54f9ee45 | 8441 | return _core_.Window_RemoveChild(*args, **kwargs) |
e811c8ce RD |
8442 | |
8443 | def FindWindowById(*args, **kwargs): | |
15afbcd0 | 8444 | """ |
a95a7133 | 8445 | FindWindowById(self, long winid) -> Window |
15afbcd0 RD |
8446 | |
8447 | Find a chld of this window by window ID | |
8448 | """ | |
54f9ee45 | 8449 | return _core_.Window_FindWindowById(*args, **kwargs) |
e811c8ce RD |
8450 | |
8451 | def FindWindowByName(*args, **kwargs): | |
15afbcd0 | 8452 | """ |
a95a7133 | 8453 | FindWindowByName(self, String name) -> Window |
15afbcd0 RD |
8454 | |
8455 | Find a child of this window by name | |
8456 | """ | |
54f9ee45 | 8457 | return _core_.Window_FindWindowByName(*args, **kwargs) |
e811c8ce RD |
8458 | |
8459 | def GetEventHandler(*args, **kwargs): | |
15afbcd0 | 8460 | """ |
a95a7133 | 8461 | GetEventHandler(self) -> EvtHandler |
15afbcd0 RD |
8462 | |
8463 | Returns the event handler for this window. By default, the window is | |
8464 | its own event handler. | |
8465 | """ | |
54f9ee45 | 8466 | return _core_.Window_GetEventHandler(*args, **kwargs) |
e811c8ce RD |
8467 | |
8468 | def SetEventHandler(*args, **kwargs): | |
15afbcd0 | 8469 | """ |
a95a7133 | 8470 | SetEventHandler(self, EvtHandler handler) |
15afbcd0 RD |
8471 | |
8472 | Sets the event handler for this window. An event handler is an object | |
8473 | that is capable of processing the events sent to a window. By default, | |
8474 | the window is its own event handler, but an application may wish to | |
8475 | substitute another, for example to allow central implementation of | |
8476 | event-handling for a variety of different window classes. | |
8477 | ||
41e2b43e | 8478 | It is usually better to use `wx.Window.PushEventHandler` since this sets |
15afbcd0 RD |
8479 | up a chain of event handlers, where an event not handled by one event |
8480 | handler is handed to the next one in the chain. | |
8481 | """ | |
54f9ee45 | 8482 | return _core_.Window_SetEventHandler(*args, **kwargs) |
e811c8ce RD |
8483 | |
8484 | def PushEventHandler(*args, **kwargs): | |
15afbcd0 | 8485 | """ |
a95a7133 | 8486 | PushEventHandler(self, EvtHandler handler) |
15afbcd0 RD |
8487 | |
8488 | Pushes this event handler onto the event handler stack for the window. | |
8489 | An event handler is an object that is capable of processing the events | |
8490 | sent to a window. By default, the window is its own event handler, but | |
8491 | an application may wish to substitute another, for example to allow | |
8492 | central implementation of event-handling for a variety of different | |
8493 | window classes. | |
8494 | ||
8495 | wx.Window.PushEventHandler allows an application to set up a chain of | |
8496 | event handlers, where an event not handled by one event handler is | |
41e2b43e | 8497 | handed to the next one in the chain. Use `wx.Window.PopEventHandler` to |
15afbcd0 RD |
8498 | remove the event handler. |
8499 | """ | |
54f9ee45 | 8500 | return _core_.Window_PushEventHandler(*args, **kwargs) |
e811c8ce RD |
8501 | |
8502 | def PopEventHandler(*args, **kwargs): | |
15afbcd0 | 8503 | """ |
a95a7133 | 8504 | PopEventHandler(self, bool deleteHandler=False) -> EvtHandler |
15afbcd0 RD |
8505 | |
8506 | Removes and returns the top-most event handler on the event handler | |
8507 | stack. If deleteHandler is True then the wx.EvtHandler object will be | |
8508 | destroyed after it is popped. | |
8509 | """ | |
54f9ee45 | 8510 | return _core_.Window_PopEventHandler(*args, **kwargs) |
e811c8ce RD |
8511 | |
8512 | def RemoveEventHandler(*args, **kwargs): | |
15afbcd0 | 8513 | """ |
a95a7133 | 8514 | RemoveEventHandler(self, EvtHandler handler) -> bool |
15afbcd0 | 8515 | |
41e2b43e RD |
8516 | Find the given handler in the event handler chain and remove (but not |
8517 | delete) it from the event handler chain, return True if it was found | |
8518 | and False otherwise (this also results in an assert failure so this | |
8519 | function should only be called when the handler is supposed to be | |
8520 | there.) | |
15afbcd0 | 8521 | """ |
54f9ee45 | 8522 | return _core_.Window_RemoveEventHandler(*args, **kwargs) |
e811c8ce RD |
8523 | |
8524 | def SetValidator(*args, **kwargs): | |
15afbcd0 | 8525 | """ |
a95a7133 | 8526 | SetValidator(self, Validator validator) |
15afbcd0 RD |
8527 | |
8528 | Deletes the current validator (if any) and sets the window validator, | |
8529 | having called wx.Validator.Clone to create a new validator of this | |
8530 | type. | |
8531 | """ | |
54f9ee45 | 8532 | return _core_.Window_SetValidator(*args, **kwargs) |
e811c8ce RD |
8533 | |
8534 | def GetValidator(*args, **kwargs): | |
15afbcd0 | 8535 | """ |
a95a7133 | 8536 | GetValidator(self) -> Validator |
15afbcd0 RD |
8537 | |
8538 | Returns a pointer to the current validator for the window, or None if | |
8539 | there is none. | |
8540 | """ | |
54f9ee45 | 8541 | return _core_.Window_GetValidator(*args, **kwargs) |
e811c8ce | 8542 | |
74a57fcd RD |
8543 | def Validate(*args, **kwargs): |
8544 | """ | |
a95a7133 | 8545 | Validate(self) -> bool |
74a57fcd RD |
8546 | |
8547 | Validates the current values of the child controls using their | |
41e2b43e RD |
8548 | validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra |
8549 | style flag set, the method will also call Validate() of all child | |
8550 | windows. Returns false if any of the validations failed. | |
74a57fcd | 8551 | """ |
54f9ee45 | 8552 | return _core_.Window_Validate(*args, **kwargs) |
74a57fcd RD |
8553 | |
8554 | def TransferDataToWindow(*args, **kwargs): | |
8555 | """ | |
a95a7133 | 8556 | TransferDataToWindow(self) -> bool |
74a57fcd | 8557 | |
41e2b43e RD |
8558 | Transfers values to child controls from data areas specified by their |
8559 | validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra | |
8560 | style flag set, the method will also call TransferDataToWindow() of | |
8561 | all child windows. | |
74a57fcd | 8562 | """ |
54f9ee45 | 8563 | return _core_.Window_TransferDataToWindow(*args, **kwargs) |
74a57fcd RD |
8564 | |
8565 | def TransferDataFromWindow(*args, **kwargs): | |
8566 | """ | |
a95a7133 | 8567 | TransferDataFromWindow(self) -> bool |
74a57fcd | 8568 | |
41e2b43e RD |
8569 | Transfers values from child controls to data areas specified by their |
8570 | validators. Returns false if a transfer failed. If the window has | |
8571 | wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will | |
8572 | also call TransferDataFromWindow() of all child windows. | |
74a57fcd | 8573 | """ |
54f9ee45 | 8574 | return _core_.Window_TransferDataFromWindow(*args, **kwargs) |
74a57fcd RD |
8575 | |
8576 | def InitDialog(*args, **kwargs): | |
8577 | """ | |
a95a7133 | 8578 | InitDialog(self) |
74a57fcd | 8579 | |
41e2b43e RD |
8580 | Sends an EVT_INIT_DIALOG event, whose handler usually transfers data |
8581 | to the dialog via validators. | |
74a57fcd | 8582 | """ |
54f9ee45 | 8583 | return _core_.Window_InitDialog(*args, **kwargs) |
74a57fcd | 8584 | |
e811c8ce | 8585 | def SetAcceleratorTable(*args, **kwargs): |
15afbcd0 | 8586 | """ |
a95a7133 | 8587 | SetAcceleratorTable(self, AcceleratorTable accel) |
15afbcd0 RD |
8588 | |
8589 | Sets the accelerator table for this window. | |
8590 | """ | |
54f9ee45 | 8591 | return _core_.Window_SetAcceleratorTable(*args, **kwargs) |
e811c8ce RD |
8592 | |
8593 | def GetAcceleratorTable(*args, **kwargs): | |
15afbcd0 | 8594 | """ |
a95a7133 | 8595 | GetAcceleratorTable(self) -> AcceleratorTable |
15afbcd0 RD |
8596 | |
8597 | Gets the accelerator table for this window. | |
8598 | """ | |
54f9ee45 | 8599 | return _core_.Window_GetAcceleratorTable(*args, **kwargs) |
e811c8ce RD |
8600 | |
8601 | def RegisterHotKey(*args, **kwargs): | |
15afbcd0 | 8602 | """ |
a95a7133 | 8603 | RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool |
15afbcd0 RD |
8604 | |
8605 | Registers a system wide hotkey. Every time the user presses the hotkey | |
8606 | registered here, this window will receive a hotkey event. It will | |
8607 | receive the event even if the application is in the background and | |
8608 | does not have the input focus because the user is working with some | |
8609 | other application. To bind an event handler function to this hotkey | |
8610 | use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the | |
8611 | hotkey was registered successfully. | |
8612 | """ | |
54f9ee45 | 8613 | return _core_.Window_RegisterHotKey(*args, **kwargs) |
e811c8ce RD |
8614 | |
8615 | def UnregisterHotKey(*args, **kwargs): | |
15afbcd0 | 8616 | """ |
a95a7133 | 8617 | UnregisterHotKey(self, int hotkeyId) -> bool |
15afbcd0 RD |
8618 | |
8619 | Unregisters a system wide hotkey. | |
8620 | """ | |
54f9ee45 | 8621 | return _core_.Window_UnregisterHotKey(*args, **kwargs) |
e811c8ce RD |
8622 | |
8623 | def ConvertDialogPointToPixels(*args, **kwargs): | |
15afbcd0 | 8624 | """ |
a95a7133 | 8625 | ConvertDialogPointToPixels(self, Point pt) -> Point |
15afbcd0 RD |
8626 | |
8627 | Converts a point or size from dialog units to pixels. Dialog units | |
8628 | are used for maintaining a dialog's proportions even if the font | |
8629 | changes. For the x dimension, the dialog units are multiplied by the | |
8630 | average character width and then divided by 4. For the y dimension, | |
8631 | the dialog units are multiplied by the average character height and | |
8632 | then divided by 8. | |
8633 | """ | |
54f9ee45 | 8634 | return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs) |
e811c8ce RD |
8635 | |
8636 | def ConvertDialogSizeToPixels(*args, **kwargs): | |
15afbcd0 | 8637 | """ |
a95a7133 | 8638 | ConvertDialogSizeToPixels(self, Size sz) -> Size |
15afbcd0 RD |
8639 | |
8640 | Converts a point or size from dialog units to pixels. Dialog units | |
8641 | are used for maintaining a dialog's proportions even if the font | |
8642 | changes. For the x dimension, the dialog units are multiplied by the | |
8643 | average character width and then divided by 4. For the y dimension, | |
8644 | the dialog units are multiplied by the average character height and | |
8645 | then divided by 8. | |
8646 | """ | |
54f9ee45 | 8647 | return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs) |
e811c8ce RD |
8648 | |
8649 | def DLG_PNT(*args, **kwargs): | |
15afbcd0 | 8650 | """ |
a95a7133 | 8651 | DLG_PNT(self, Point pt) -> Point |
15afbcd0 RD |
8652 | |
8653 | Converts a point or size from dialog units to pixels. Dialog units | |
8654 | are used for maintaining a dialog's proportions even if the font | |
8655 | changes. For the x dimension, the dialog units are multiplied by the | |
8656 | average character width and then divided by 4. For the y dimension, | |
8657 | the dialog units are multiplied by the average character height and | |
8658 | then divided by 8. | |
8659 | """ | |
54f9ee45 | 8660 | return _core_.Window_DLG_PNT(*args, **kwargs) |
e811c8ce RD |
8661 | |
8662 | def DLG_SZE(*args, **kwargs): | |
15afbcd0 | 8663 | """ |
a95a7133 | 8664 | DLG_SZE(self, Size sz) -> Size |
15afbcd0 RD |
8665 | |
8666 | Converts a point or size from dialog units to pixels. Dialog units | |
8667 | are used for maintaining a dialog's proportions even if the font | |
8668 | changes. For the x dimension, the dialog units are multiplied by the | |
8669 | average character width and then divided by 4. For the y dimension, | |
8670 | the dialog units are multiplied by the average character height and | |
8671 | then divided by 8. | |
8672 | """ | |
54f9ee45 | 8673 | return _core_.Window_DLG_SZE(*args, **kwargs) |
e811c8ce RD |
8674 | |
8675 | def ConvertPixelPointToDialog(*args, **kwargs): | |
a95a7133 | 8676 | """ConvertPixelPointToDialog(self, Point pt) -> Point""" |
54f9ee45 | 8677 | return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs) |
e811c8ce RD |
8678 | |
8679 | def ConvertPixelSizeToDialog(*args, **kwargs): | |
a95a7133 | 8680 | """ConvertPixelSizeToDialog(self, Size sz) -> Size""" |
54f9ee45 | 8681 | return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs) |
e811c8ce RD |
8682 | |
8683 | def WarpPointer(*args, **kwargs): | |
15afbcd0 | 8684 | """ |
a95a7133 | 8685 | WarpPointer(self, int x, int y) |
15afbcd0 RD |
8686 | |
8687 | Moves the pointer to the given position on the window. | |
8688 | ||
8689 | NOTE: This function is not supported under Mac because Apple Human | |
8690 | Interface Guidelines forbid moving the mouse cursor programmatically. | |
8691 | """ | |
54f9ee45 | 8692 | return _core_.Window_WarpPointer(*args, **kwargs) |
e811c8ce RD |
8693 | |
8694 | def CaptureMouse(*args, **kwargs): | |
15afbcd0 | 8695 | """ |
a95a7133 | 8696 | CaptureMouse(self) |
15afbcd0 RD |
8697 | |
8698 | Directs all mouse input to this window. Call wx.Window.ReleaseMouse to | |
8699 | release the capture. | |
8700 | ||
8701 | Note that wxWindows maintains the stack of windows having captured the | |
8702 | mouse and when the mouse is released the capture returns to the window | |
8703 | which had had captured it previously and it is only really released if | |
8704 | there were no previous window. In particular, this means that you must | |
8705 | release the mouse as many times as you capture it. | |
8706 | """ | |
54f9ee45 | 8707 | return _core_.Window_CaptureMouse(*args, **kwargs) |
e811c8ce RD |
8708 | |
8709 | def ReleaseMouse(*args, **kwargs): | |
15afbcd0 | 8710 | """ |
a95a7133 | 8711 | ReleaseMouse(self) |
15afbcd0 RD |
8712 | |
8713 | Releases mouse input captured with wx.Window.CaptureMouse. | |
8714 | """ | |
54f9ee45 | 8715 | return _core_.Window_ReleaseMouse(*args, **kwargs) |
e811c8ce RD |
8716 | |
8717 | def GetCapture(*args, **kwargs): | |
15afbcd0 | 8718 | """ |
66c033b4 | 8719 | GetCapture() -> Window |
15afbcd0 RD |
8720 | |
8721 | Returns the window which currently captures the mouse or None | |
8722 | """ | |
54f9ee45 | 8723 | return _core_.Window_GetCapture(*args, **kwargs) |
e811c8ce RD |
8724 | |
8725 | GetCapture = staticmethod(GetCapture) | |
8726 | def HasCapture(*args, **kwargs): | |
15afbcd0 | 8727 | """ |
a95a7133 | 8728 | HasCapture(self) -> bool |
15afbcd0 RD |
8729 | |
8730 | Returns true if this window has the current mouse capture. | |
8731 | """ | |
54f9ee45 | 8732 | return _core_.Window_HasCapture(*args, **kwargs) |
e811c8ce RD |
8733 | |
8734 | def Refresh(*args, **kwargs): | |
15afbcd0 | 8735 | """ |
a95a7133 | 8736 | Refresh(self, bool eraseBackground=True, Rect rect=None) |
15afbcd0 RD |
8737 | |
8738 | Mark the specified rectangle (or the whole window) as "dirty" so it | |
8739 | will be repainted. Causes an EVT_PAINT event to be generated and sent | |
8740 | to the window. | |
8741 | """ | |
54f9ee45 | 8742 | return _core_.Window_Refresh(*args, **kwargs) |
e811c8ce RD |
8743 | |
8744 | def RefreshRect(*args, **kwargs): | |
15afbcd0 | 8745 | """ |
fef4c27a | 8746 | RefreshRect(self, Rect rect, bool eraseBackground=True) |
15afbcd0 RD |
8747 | |
8748 | Redraws the contents of the given rectangle: the area inside it will | |
8749 | be repainted. This is the same as Refresh but has a nicer syntax. | |
8750 | """ | |
54f9ee45 | 8751 | return _core_.Window_RefreshRect(*args, **kwargs) |
e811c8ce RD |
8752 | |
8753 | def Update(*args, **kwargs): | |
15afbcd0 | 8754 | """ |
a95a7133 | 8755 | Update(self) |
15afbcd0 RD |
8756 | |
8757 | Calling this method immediately repaints the invalidated area of the | |
8758 | window instead of waiting for the EVT_PAINT event to happen, (normally | |
8759 | this would usually only happen when the flow of control returns to the | |
8760 | event loop.) Notice that this function doesn't refresh the window and | |
8761 | does nothing if the window has been already repainted. Use Refresh | |
8762 | first if you want to immediately redraw the window (or some portion of | |
8763 | it) unconditionally. | |
8764 | """ | |
54f9ee45 | 8765 | return _core_.Window_Update(*args, **kwargs) |
e811c8ce RD |
8766 | |
8767 | def ClearBackground(*args, **kwargs): | |
15afbcd0 | 8768 | """ |
a95a7133 | 8769 | ClearBackground(self) |
15afbcd0 RD |
8770 | |
8771 | Clears the window by filling it with the current background | |
8772 | colour. Does not cause an erase background event to be generated. | |
8773 | """ | |
54f9ee45 | 8774 | return _core_.Window_ClearBackground(*args, **kwargs) |
e811c8ce RD |
8775 | |
8776 | def Freeze(*args, **kwargs): | |
15afbcd0 | 8777 | """ |
a95a7133 | 8778 | Freeze(self) |
15afbcd0 | 8779 | |
41e2b43e RD |
8780 | Freezes the window or, in other words, prevents any updates from |
8781 | taking place on screen, the window is not redrawn at all. Thaw must be | |
8782 | called to reenable window redrawing. Calls to Freeze/Thaw may be | |
8783 | nested, with the actual Thaw being delayed until all the nesting has | |
8784 | been undone. | |
15afbcd0 RD |
8785 | |
8786 | This method is useful for visual appearance optimization (for example, | |
8787 | it is a good idea to use it before inserting large amount of text into | |
8788 | a wxTextCtrl under wxGTK) but is not implemented on all platforms nor | |
8789 | for all controls so it is mostly just a hint to wxWindows and not a | |
8790 | mandatory directive. | |
8791 | """ | |
54f9ee45 | 8792 | return _core_.Window_Freeze(*args, **kwargs) |
e811c8ce RD |
8793 | |
8794 | def Thaw(*args, **kwargs): | |
15afbcd0 | 8795 | """ |
a95a7133 | 8796 | Thaw(self) |
15afbcd0 | 8797 | |
4276dc52 | 8798 | Reenables window updating after a previous call to Freeze. Calls to |
41e2b43e RD |
8799 | Freeze/Thaw may be nested, so Thaw must be called the same number of |
8800 | times that Freeze was before the window will be updated. | |
15afbcd0 | 8801 | """ |
54f9ee45 | 8802 | return _core_.Window_Thaw(*args, **kwargs) |
e811c8ce RD |
8803 | |
8804 | def PrepareDC(*args, **kwargs): | |
15afbcd0 | 8805 | """ |
a95a7133 | 8806 | PrepareDC(self, DC dc) |
15afbcd0 RD |
8807 | |
8808 | Call this function to prepare the device context for drawing a | |
8809 | scrolled image. It sets the device origin according to the current | |
8810 | scroll position. | |
8811 | """ | |
54f9ee45 | 8812 | return _core_.Window_PrepareDC(*args, **kwargs) |
e811c8ce RD |
8813 | |
8814 | def GetUpdateRegion(*args, **kwargs): | |
15afbcd0 | 8815 | """ |
a95a7133 | 8816 | GetUpdateRegion(self) -> Region |
15afbcd0 RD |
8817 | |
8818 | Returns the region specifying which parts of the window have been | |
8819 | damaged. Should only be called within an EVT_PAINT handler. | |
8820 | """ | |
54f9ee45 | 8821 | return _core_.Window_GetUpdateRegion(*args, **kwargs) |
e811c8ce RD |
8822 | |
8823 | def GetUpdateClientRect(*args, **kwargs): | |
15afbcd0 | 8824 | """ |
a95a7133 | 8825 | GetUpdateClientRect(self) -> Rect |
15afbcd0 RD |
8826 | |
8827 | Get the update rectangle region bounding box in client coords. | |
8828 | """ | |
54f9ee45 | 8829 | return _core_.Window_GetUpdateClientRect(*args, **kwargs) |
e811c8ce RD |
8830 | |
8831 | def IsExposed(*args, **kwargs): | |
15afbcd0 | 8832 | """ |
a95a7133 | 8833 | IsExposed(self, int x, int y, int w=1, int h=1) -> bool |
15afbcd0 RD |
8834 | |
8835 | Returns true if the given point or rectangle area has been exposed | |
8836 | since the last repaint. Call this in an paint event handler to | |
8837 | optimize redrawing by only redrawing those areas, which have been | |
8838 | exposed. | |
8839 | """ | |
54f9ee45 | 8840 | return _core_.Window_IsExposed(*args, **kwargs) |
e811c8ce RD |
8841 | |
8842 | def IsExposedPoint(*args, **kwargs): | |
15afbcd0 | 8843 | """ |
a95a7133 | 8844 | IsExposedPoint(self, Point pt) -> bool |
15afbcd0 RD |
8845 | |
8846 | Returns true if the given point or rectangle area has been exposed | |
8847 | since the last repaint. Call this in an paint event handler to | |
8848 | optimize redrawing by only redrawing those areas, which have been | |
8849 | exposed. | |
8850 | """ | |
54f9ee45 | 8851 | return _core_.Window_IsExposedPoint(*args, **kwargs) |
e811c8ce | 8852 | |
4276dc52 | 8853 | def IsExposedRect(*args, **kwargs): |
15afbcd0 | 8854 | """ |
a95a7133 | 8855 | IsExposedRect(self, Rect rect) -> bool |
15afbcd0 RD |
8856 | |
8857 | Returns true if the given point or rectangle area has been exposed | |
8858 | since the last repaint. Call this in an paint event handler to | |
8859 | optimize redrawing by only redrawing those areas, which have been | |
8860 | exposed. | |
8861 | """ | |
54f9ee45 | 8862 | return _core_.Window_IsExposedRect(*args, **kwargs) |
e811c8ce | 8863 | |
74a57fcd RD |
8864 | def GetDefaultAttributes(*args, **kwargs): |
8865 | """ | |
a95a7133 | 8866 | GetDefaultAttributes(self) -> VisualAttributes |
74a57fcd | 8867 | |
41e2b43e RD |
8868 | Get the default attributes for an instance of this class. This is |
8869 | useful if you want to use the same font or colour in your own control | |
8870 | as in a standard control -- which is a much better idea than hard | |
8871 | coding specific colours or fonts which might look completely out of | |
db3e571a | 8872 | place on the user's system, especially if it uses themes. |
74a57fcd | 8873 | """ |
54f9ee45 | 8874 | return _core_.Window_GetDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
8875 | |
8876 | def GetClassDefaultAttributes(*args, **kwargs): | |
8877 | """ | |
66c033b4 | 8878 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes |
74a57fcd | 8879 | |
41e2b43e RD |
8880 | Get the default attributes for this class. This is useful if you want |
8881 | to use the same font or colour in your own control as in a standard | |
8882 | control -- which is a much better idea than hard coding specific | |
db3e571a RD |
8883 | colours or fonts which might look completely out of place on the |
8884 | user's system, especially if it uses themes. | |
74a57fcd RD |
8885 | |
8886 | The variant parameter is only relevant under Mac currently and is | |
41e2b43e | 8887 | ignore under other platforms. Under Mac, it will change the size of |
db3e571a RD |
8888 | the returned font. See `wx.Window.SetWindowVariant` for more about |
8889 | this. | |
74a57fcd | 8890 | """ |
54f9ee45 | 8891 | return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
8892 | |
8893 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
e811c8ce | 8894 | def SetBackgroundColour(*args, **kwargs): |
15afbcd0 | 8895 | """ |
a95a7133 | 8896 | SetBackgroundColour(self, Colour colour) -> bool |
15afbcd0 RD |
8897 | |
8898 | Sets the background colour of the window. Returns True if the colour | |
8899 | was changed. The background colour is usually painted by the default | |
8900 | EVT_ERASE_BACKGROUND event handler function under Windows and | |
f8167d6e RD |
8901 | automatically under GTK. Using `wx.NullColour` will reset the window |
8902 | to the default background colour. | |
15afbcd0 | 8903 | |
db3e571a | 8904 | Note that setting the background colour may not cause an immediate |
f8167d6e | 8905 | refresh, so you may wish to call `ClearBackground` or `Refresh` after |
15afbcd0 RD |
8906 | calling this function. |
8907 | ||
f8167d6e RD |
8908 | Using this function will disable attempts to use themes for this |
8909 | window, if the system supports them. Use with care since usually the | |
8910 | themes represent the appearance chosen by the user to be used for all | |
8911 | applications on the system. | |
15afbcd0 | 8912 | """ |
54f9ee45 | 8913 | return _core_.Window_SetBackgroundColour(*args, **kwargs) |
e811c8ce | 8914 | |
412d302d RD |
8915 | def SetOwnBackgroundColour(*args, **kwargs): |
8916 | """SetOwnBackgroundColour(self, Colour colour)""" | |
8917 | return _core_.Window_SetOwnBackgroundColour(*args, **kwargs) | |
b2df227b | 8918 | |
e811c8ce | 8919 | def SetForegroundColour(*args, **kwargs): |
15afbcd0 | 8920 | """ |
a95a7133 | 8921 | SetForegroundColour(self, Colour colour) -> bool |
15afbcd0 RD |
8922 | |
8923 | Sets the foreground colour of the window. Returns True is the colour | |
8924 | was changed. The interpretation of foreground colour is dependent on | |
8925 | the window class; it may be the text colour or other colour, or it may | |
8926 | not be used at all. | |
8927 | """ | |
54f9ee45 | 8928 | return _core_.Window_SetForegroundColour(*args, **kwargs) |
e811c8ce | 8929 | |
fa47d7a7 VS |
8930 | def SetOwnForegroundColour(*args, **kwargs): |
8931 | """SetOwnForegroundColour(self, Colour colour)""" | |
8932 | return _core_.Window_SetOwnForegroundColour(*args, **kwargs) | |
b2df227b | 8933 | |
e811c8ce | 8934 | def GetBackgroundColour(*args, **kwargs): |
15afbcd0 | 8935 | """ |
a95a7133 | 8936 | GetBackgroundColour(self) -> Colour |
15afbcd0 RD |
8937 | |
8938 | Returns the background colour of the window. | |
8939 | """ | |
54f9ee45 | 8940 | return _core_.Window_GetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
8941 | |
8942 | def GetForegroundColour(*args, **kwargs): | |
15afbcd0 | 8943 | """ |
a95a7133 | 8944 | GetForegroundColour(self) -> Colour |
15afbcd0 RD |
8945 | |
8946 | Returns the foreground colour of the window. The interpretation of | |
8947 | foreground colour is dependent on the window class; it may be the text | |
8948 | colour or other colour, or it may not be used at all. | |
8949 | """ | |
54f9ee45 | 8950 | return _core_.Window_GetForegroundColour(*args, **kwargs) |
e811c8ce | 8951 | |
562ecc31 RD |
8952 | def InheritsBackgroundColour(*args, **kwargs): |
8953 | """InheritsBackgroundColour(self) -> bool""" | |
8954 | return _core_.Window_InheritsBackgroundColour(*args, **kwargs) | |
8955 | ||
8956 | def UseBgCol(*args, **kwargs): | |
8957 | """UseBgCol(self) -> bool""" | |
8958 | return _core_.Window_UseBgCol(*args, **kwargs) | |
8959 | ||
7bc1e663 RD |
8960 | def SetBackgroundStyle(*args, **kwargs): |
8961 | """ | |
8962 | SetBackgroundStyle(self, int style) -> bool | |
8963 | ||
8964 | Returns the background style of the window. The background style | |
8965 | indicates how the background of the window is drawn. | |
8966 | ||
8967 | ====================== ======================================== | |
8968 | wx.BG_STYLE_SYSTEM The background colour or pattern should | |
8969 | be determined by the system | |
8970 | wx.BG_STYLE_COLOUR The background should be a solid colour | |
8971 | wx.BG_STYLE_CUSTOM The background will be implemented by the | |
8972 | application. | |
8973 | ====================== ======================================== | |
8974 | ||
8975 | On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of | |
8976 | a custom background, such as a tiled bitmap. Currently the style has | |
8977 | no effect on other platforms. | |
8978 | ||
8979 | :see: `GetBackgroundStyle`, `SetBackgroundColour` | |
8980 | """ | |
8981 | return _core_.Window_SetBackgroundStyle(*args, **kwargs) | |
8982 | ||
8983 | def GetBackgroundStyle(*args, **kwargs): | |
8984 | """ | |
8985 | GetBackgroundStyle(self) -> int | |
8986 | ||
8987 | Returns the background style of the window. | |
8988 | ||
8989 | :see: `SetBackgroundStyle` | |
8990 | """ | |
8991 | return _core_.Window_GetBackgroundStyle(*args, **kwargs) | |
8992 | ||
51b83b37 RD |
8993 | def HasTransparentBackground(*args, **kwargs): |
8994 | """ | |
8995 | HasTransparentBackground(self) -> bool | |
8996 | ||
8997 | Returns True if this window's background is transparent (as, for | |
8998 | example, for `wx.StaticText`) and should show the parent window's | |
8999 | background. | |
9000 | ||
9001 | This method is mostly used internally by the library itself and you | |
9002 | normally shouldn't have to call it. You may, however, have to override | |
9003 | it in your custom control classes to ensure that background is painted | |
9004 | correctly. | |
9005 | """ | |
9006 | return _core_.Window_HasTransparentBackground(*args, **kwargs) | |
9007 | ||
e811c8ce | 9008 | def SetCursor(*args, **kwargs): |
15afbcd0 | 9009 | """ |
a95a7133 | 9010 | SetCursor(self, Cursor cursor) -> bool |
15afbcd0 RD |
9011 | |
9012 | Sets the window's cursor. Notice that the window cursor also sets it | |
9013 | for the children of the window implicitly. | |
9014 | ||
9015 | The cursor may be wx.NullCursor in which case the window cursor will | |
9016 | be reset back to default. | |
9017 | """ | |
54f9ee45 | 9018 | return _core_.Window_SetCursor(*args, **kwargs) |
e811c8ce RD |
9019 | |
9020 | def GetCursor(*args, **kwargs): | |
15afbcd0 | 9021 | """ |
a95a7133 | 9022 | GetCursor(self) -> Cursor |
15afbcd0 RD |
9023 | |
9024 | Return the cursor associated with this window. | |
9025 | """ | |
54f9ee45 | 9026 | return _core_.Window_GetCursor(*args, **kwargs) |
e811c8ce RD |
9027 | |
9028 | def SetFont(*args, **kwargs): | |
15afbcd0 | 9029 | """ |
a95a7133 | 9030 | SetFont(self, Font font) -> bool |
15afbcd0 RD |
9031 | |
9032 | Sets the font for this window. | |
9033 | """ | |
54f9ee45 | 9034 | return _core_.Window_SetFont(*args, **kwargs) |
e811c8ce | 9035 | |
fa47d7a7 VS |
9036 | def SetOwnFont(*args, **kwargs): |
9037 | """SetOwnFont(self, Font font)""" | |
9038 | return _core_.Window_SetOwnFont(*args, **kwargs) | |
b2df227b | 9039 | |
e811c8ce | 9040 | def GetFont(*args, **kwargs): |
15afbcd0 | 9041 | """ |
a95a7133 | 9042 | GetFont(self) -> Font |
15afbcd0 | 9043 | |
4276dc52 | 9044 | Returns the default font used for this window. |
15afbcd0 | 9045 | """ |
54f9ee45 | 9046 | return _core_.Window_GetFont(*args, **kwargs) |
e811c8ce RD |
9047 | |
9048 | def SetCaret(*args, **kwargs): | |
15afbcd0 | 9049 | """ |
a95a7133 | 9050 | SetCaret(self, Caret caret) |
15afbcd0 RD |
9051 | |
9052 | Sets the caret associated with the window. | |
9053 | """ | |
54f9ee45 | 9054 | return _core_.Window_SetCaret(*args, **kwargs) |
e811c8ce RD |
9055 | |
9056 | def GetCaret(*args, **kwargs): | |
15afbcd0 | 9057 | """ |
a95a7133 | 9058 | GetCaret(self) -> Caret |
15afbcd0 RD |
9059 | |
9060 | Returns the caret associated with the window. | |
9061 | """ | |
54f9ee45 | 9062 | return _core_.Window_GetCaret(*args, **kwargs) |
e811c8ce RD |
9063 | |
9064 | def GetCharHeight(*args, **kwargs): | |
15afbcd0 | 9065 | """ |
a95a7133 | 9066 | GetCharHeight(self) -> int |
15afbcd0 RD |
9067 | |
9068 | Get the (average) character size for the current font. | |
9069 | """ | |
54f9ee45 | 9070 | return _core_.Window_GetCharHeight(*args, **kwargs) |
e811c8ce RD |
9071 | |
9072 | def GetCharWidth(*args, **kwargs): | |
15afbcd0 | 9073 | """ |
a95a7133 | 9074 | GetCharWidth(self) -> int |
15afbcd0 RD |
9075 | |
9076 | Get the (average) character size for the current font. | |
9077 | """ | |
54f9ee45 | 9078 | return _core_.Window_GetCharWidth(*args, **kwargs) |
e811c8ce RD |
9079 | |
9080 | def GetTextExtent(*args, **kwargs): | |
fd2dc343 RD |
9081 | """ |
9082 | GetTextExtent(String string) -> (width, height) | |
9083 | ||
9084 | Get the width and height of the text using the current font. | |
9085 | """ | |
54f9ee45 | 9086 | return _core_.Window_GetTextExtent(*args, **kwargs) |
e811c8ce RD |
9087 | |
9088 | def GetFullTextExtent(*args, **kwargs): | |
0df68c9f | 9089 | """ |
196addbf | 9090 | GetFullTextExtent(String string, Font font=None) -> |
0df68c9f | 9091 | (width, height, descent, externalLeading) |
e811c8ce | 9092 | |
15afbcd0 RD |
9093 | Get the width, height, decent and leading of the text using the |
9094 | current or specified font. | |
0df68c9f | 9095 | """ |
54f9ee45 | 9096 | return _core_.Window_GetFullTextExtent(*args, **kwargs) |
e811c8ce RD |
9097 | |
9098 | def ClientToScreenXY(*args, **kwargs): | |
15afbcd0 RD |
9099 | """ |
9100 | ClientToScreenXY(int x, int y) -> (x,y) | |
9101 | ||
9102 | Converts to screen coordinates from coordinates relative to this window. | |
9103 | """ | |
54f9ee45 | 9104 | return _core_.Window_ClientToScreenXY(*args, **kwargs) |
e811c8ce RD |
9105 | |
9106 | def ScreenToClientXY(*args, **kwargs): | |
15afbcd0 RD |
9107 | """ |
9108 | ScreenToClientXY(int x, int y) -> (x,y) | |
9109 | ||
9110 | Converts from screen to client window coordinates. | |
9111 | """ | |
54f9ee45 | 9112 | return _core_.Window_ScreenToClientXY(*args, **kwargs) |
e811c8ce RD |
9113 | |
9114 | def ClientToScreen(*args, **kwargs): | |
15afbcd0 | 9115 | """ |
a95a7133 | 9116 | ClientToScreen(self, Point pt) -> Point |
15afbcd0 RD |
9117 | |
9118 | Converts to screen coordinates from coordinates relative to this window. | |
9119 | """ | |
54f9ee45 | 9120 | return _core_.Window_ClientToScreen(*args, **kwargs) |
e811c8ce RD |
9121 | |
9122 | def ScreenToClient(*args, **kwargs): | |
15afbcd0 | 9123 | """ |
a95a7133 | 9124 | ScreenToClient(self, Point pt) -> Point |
15afbcd0 RD |
9125 | |
9126 | Converts from screen to client window coordinates. | |
9127 | """ | |
54f9ee45 | 9128 | return _core_.Window_ScreenToClient(*args, **kwargs) |
e811c8ce RD |
9129 | |
9130 | def HitTestXY(*args, **kwargs): | |
15afbcd0 | 9131 | """ |
a95a7133 | 9132 | HitTestXY(self, int x, int y) -> int |
15afbcd0 RD |
9133 | |
9134 | Test where the given (in client coords) point lies | |
9135 | """ | |
54f9ee45 | 9136 | return _core_.Window_HitTestXY(*args, **kwargs) |
e811c8ce RD |
9137 | |
9138 | def HitTest(*args, **kwargs): | |
15afbcd0 | 9139 | """ |
a95a7133 | 9140 | HitTest(self, Point pt) -> int |
15afbcd0 RD |
9141 | |
9142 | Test where the given (in client coords) point lies | |
9143 | """ | |
54f9ee45 | 9144 | return _core_.Window_HitTest(*args, **kwargs) |
e811c8ce | 9145 | |
15afbcd0 RD |
9146 | def GetBorder(*args): |
9147 | """ | |
a95a7133 RD |
9148 | GetBorder(self, long flags) -> int |
9149 | GetBorder(self) -> int | |
e811c8ce | 9150 | |
15afbcd0 RD |
9151 | Get border for the flags of this window |
9152 | """ | |
54f9ee45 | 9153 | return _core_.Window_GetBorder(*args) |
e811c8ce RD |
9154 | |
9155 | def UpdateWindowUI(*args, **kwargs): | |
15afbcd0 | 9156 | """ |
a95a7133 | 9157 | UpdateWindowUI(self, long flags=UPDATE_UI_NONE) |
15afbcd0 RD |
9158 | |
9159 | This function sends EVT_UPDATE_UI events to the window. The particular | |
9160 | implementation depends on the window; for example a wx.ToolBar will | |
9161 | send an update UI event for each toolbar button, and a wx.Frame will | |
9162 | send an update UI event for each menubar menu item. You can call this | |
9163 | function from your application to ensure that your UI is up-to-date at | |
9164 | a particular point in time (as far as your EVT_UPDATE_UI handlers are | |
9165 | concerned). This may be necessary if you have called | |
5ba5649b | 9166 | `wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to |
15afbcd0 RD |
9167 | limit the overhead that wxWindows incurs by sending update UI events |
9168 | in idle time. | |
15afbcd0 | 9169 | """ |
54f9ee45 | 9170 | return _core_.Window_UpdateWindowUI(*args, **kwargs) |
e811c8ce RD |
9171 | |
9172 | def PopupMenuXY(*args, **kwargs): | |
15afbcd0 | 9173 | """ |
b0503257 | 9174 | PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool |
15afbcd0 | 9175 | |
b0503257 RD |
9176 | Pops up the given menu at the specified coordinates, relative to this window, |
9177 | and returns control when the user has dismissed the menu. If a menu item is | |
9178 | selected, the corresponding menu event is generated and will be processed as | |
9179 | usual. If the default position is given then the current position of the | |
9180 | mouse cursor will be used. | |
15afbcd0 | 9181 | """ |
54f9ee45 | 9182 | return _core_.Window_PopupMenuXY(*args, **kwargs) |
e811c8ce | 9183 | |
15afbcd0 RD |
9184 | def PopupMenu(*args, **kwargs): |
9185 | """ | |
b0503257 | 9186 | PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool |
15afbcd0 | 9187 | |
b0503257 RD |
9188 | Pops up the given menu at the specified coordinates, relative to this window, |
9189 | and returns control when the user has dismissed the menu. If a menu item is | |
9190 | selected, the corresponding menu event is generated and will be processed as | |
9191 | usual. If the default position is given then the current position of the | |
9192 | mouse cursor will be used. | |
15afbcd0 | 9193 | """ |
54f9ee45 | 9194 | return _core_.Window_PopupMenu(*args, **kwargs) |
15afbcd0 RD |
9195 | |
9196 | def GetHandle(*args, **kwargs): | |
9197 | """ | |
a95a7133 | 9198 | GetHandle(self) -> long |
15afbcd0 RD |
9199 | |
9200 | Returns the platform-specific handle (as a long integer) of the | |
9201 | physical window. Currently on wxMac it returns the handle of the | |
9202 | toplevel parent of the window. | |
9203 | """ | |
54f9ee45 | 9204 | return _core_.Window_GetHandle(*args, **kwargs) |
15afbcd0 | 9205 | |
7e63a440 RD |
9206 | def AssociateHandle(*args, **kwargs): |
9207 | """ | |
9208 | AssociateHandle(self, long handle) | |
9209 | ||
9210 | Associate the window with a new native handle | |
9211 | """ | |
9212 | return _core_.Window_AssociateHandle(*args, **kwargs) | |
9213 | ||
9214 | def DissociateHandle(*args, **kwargs): | |
9215 | """ | |
9216 | DissociateHandle(self) | |
9217 | ||
9218 | Dissociate the current native handle from the window | |
9219 | """ | |
9220 | return _core_.Window_DissociateHandle(*args, **kwargs) | |
9221 | ||
15afbcd0 RD |
9222 | def HasScrollbar(*args, **kwargs): |
9223 | """ | |
a95a7133 | 9224 | HasScrollbar(self, int orient) -> bool |
15afbcd0 RD |
9225 | |
9226 | Does the window have the scrollbar for this orientation? | |
9227 | """ | |
54f9ee45 | 9228 | return _core_.Window_HasScrollbar(*args, **kwargs) |
15afbcd0 RD |
9229 | |
9230 | def SetScrollbar(*args, **kwargs): | |
9231 | """ | |
41e2b43e | 9232 | SetScrollbar(self, int orientation, int position, int thumbSize, int range, |
15afbcd0 RD |
9233 | bool refresh=True) |
9234 | ||
9235 | Sets the scrollbar properties of a built-in scrollbar. | |
15afbcd0 | 9236 | """ |
54f9ee45 | 9237 | return _core_.Window_SetScrollbar(*args, **kwargs) |
e811c8ce RD |
9238 | |
9239 | def SetScrollPos(*args, **kwargs): | |
15afbcd0 | 9240 | """ |
a95a7133 | 9241 | SetScrollPos(self, int orientation, int pos, bool refresh=True) |
15afbcd0 RD |
9242 | |
9243 | Sets the position of one of the built-in scrollbars. | |
9244 | """ | |
54f9ee45 | 9245 | return _core_.Window_SetScrollPos(*args, **kwargs) |
e811c8ce RD |
9246 | |
9247 | def GetScrollPos(*args, **kwargs): | |
15afbcd0 | 9248 | """ |
a95a7133 | 9249 | GetScrollPos(self, int orientation) -> int |
15afbcd0 RD |
9250 | |
9251 | Returns the built-in scrollbar position. | |
9252 | """ | |
54f9ee45 | 9253 | return _core_.Window_GetScrollPos(*args, **kwargs) |
e811c8ce RD |
9254 | |
9255 | def GetScrollThumb(*args, **kwargs): | |
15afbcd0 | 9256 | """ |
a95a7133 | 9257 | GetScrollThumb(self, int orientation) -> int |
15afbcd0 RD |
9258 | |
9259 | Returns the built-in scrollbar thumb size. | |
9260 | """ | |
54f9ee45 | 9261 | return _core_.Window_GetScrollThumb(*args, **kwargs) |
e811c8ce RD |
9262 | |
9263 | def GetScrollRange(*args, **kwargs): | |
15afbcd0 | 9264 | """ |
a95a7133 | 9265 | GetScrollRange(self, int orientation) -> int |
15afbcd0 RD |
9266 | |
9267 | Returns the built-in scrollbar range. | |
9268 | """ | |
54f9ee45 | 9269 | return _core_.Window_GetScrollRange(*args, **kwargs) |
e811c8ce RD |
9270 | |
9271 | def ScrollWindow(*args, **kwargs): | |
15afbcd0 | 9272 | """ |
a95a7133 | 9273 | ScrollWindow(self, int dx, int dy, Rect rect=None) |
15afbcd0 RD |
9274 | |
9275 | Physically scrolls the pixels in the window and move child windows | |
9276 | accordingly. Use this function to optimise your scrolling | |
9277 | implementations, to minimise the area that must be redrawn. Note that | |
9278 | it is rarely required to call this function from a user program. | |
15afbcd0 | 9279 | """ |
54f9ee45 | 9280 | return _core_.Window_ScrollWindow(*args, **kwargs) |
e811c8ce RD |
9281 | |
9282 | def ScrollLines(*args, **kwargs): | |
15afbcd0 | 9283 | """ |
a95a7133 | 9284 | ScrollLines(self, int lines) -> bool |
15afbcd0 RD |
9285 | |
9286 | If the platform and window class supports it, scrolls the window by | |
9287 | the given number of lines down, if lines is positive, or up if lines | |
9288 | is negative. Returns True if the window was scrolled, False if it was | |
9289 | already on top/bottom and nothing was done. | |
9290 | """ | |
54f9ee45 | 9291 | return _core_.Window_ScrollLines(*args, **kwargs) |
e811c8ce RD |
9292 | |
9293 | def ScrollPages(*args, **kwargs): | |
15afbcd0 | 9294 | """ |
a95a7133 | 9295 | ScrollPages(self, int pages) -> bool |
15afbcd0 | 9296 | |
41e2b43e | 9297 | If the platform and window class supports it, scrolls the window by |
15afbcd0 RD |
9298 | the given number of pages down, if pages is positive, or up if pages |
9299 | is negative. Returns True if the window was scrolled, False if it was | |
9300 | already on top/bottom and nothing was done. | |
9301 | """ | |
54f9ee45 | 9302 | return _core_.Window_ScrollPages(*args, **kwargs) |
e811c8ce RD |
9303 | |
9304 | def LineUp(*args, **kwargs): | |
15afbcd0 | 9305 | """ |
a95a7133 | 9306 | LineUp(self) -> bool |
15afbcd0 RD |
9307 | |
9308 | This is just a wrapper for ScrollLines(-1). | |
9309 | """ | |
54f9ee45 | 9310 | return _core_.Window_LineUp(*args, **kwargs) |
e811c8ce RD |
9311 | |
9312 | def LineDown(*args, **kwargs): | |
15afbcd0 | 9313 | """ |
a95a7133 | 9314 | LineDown(self) -> bool |
15afbcd0 RD |
9315 | |
9316 | This is just a wrapper for ScrollLines(1). | |
9317 | """ | |
54f9ee45 | 9318 | return _core_.Window_LineDown(*args, **kwargs) |
e811c8ce RD |
9319 | |
9320 | def PageUp(*args, **kwargs): | |
15afbcd0 | 9321 | """ |
a95a7133 | 9322 | PageUp(self) -> bool |
15afbcd0 RD |
9323 | |
9324 | This is just a wrapper for ScrollPages(-1). | |
9325 | """ | |
54f9ee45 | 9326 | return _core_.Window_PageUp(*args, **kwargs) |
e811c8ce RD |
9327 | |
9328 | def PageDown(*args, **kwargs): | |
15afbcd0 | 9329 | """ |
a95a7133 | 9330 | PageDown(self) -> bool |
15afbcd0 RD |
9331 | |
9332 | This is just a wrapper for ScrollPages(1). | |
9333 | """ | |
54f9ee45 | 9334 | return _core_.Window_PageDown(*args, **kwargs) |
e811c8ce RD |
9335 | |
9336 | def SetHelpText(*args, **kwargs): | |
15afbcd0 | 9337 | """ |
a95a7133 | 9338 | SetHelpText(self, String text) |
15afbcd0 RD |
9339 | |
9340 | Sets the help text to be used as context-sensitive help for this | |
9341 | window. Note that the text is actually stored by the current | |
f52cbe90 | 9342 | `wx.HelpProvider` implementation, and not in the window object itself. |
15afbcd0 | 9343 | """ |
54f9ee45 | 9344 | return _core_.Window_SetHelpText(*args, **kwargs) |
e811c8ce RD |
9345 | |
9346 | def SetHelpTextForId(*args, **kwargs): | |
15afbcd0 | 9347 | """ |
a95a7133 | 9348 | SetHelpTextForId(self, String text) |
15afbcd0 RD |
9349 | |
9350 | Associate this help text with all windows with the same id as this | |
9351 | one. | |
9352 | """ | |
54f9ee45 | 9353 | return _core_.Window_SetHelpTextForId(*args, **kwargs) |
e811c8ce RD |
9354 | |
9355 | def GetHelpText(*args, **kwargs): | |
15afbcd0 | 9356 | """ |
a95a7133 | 9357 | GetHelpText(self) -> String |
15afbcd0 RD |
9358 | |
9359 | Gets the help text to be used as context-sensitive help for this | |
9360 | window. Note that the text is actually stored by the current | |
f52cbe90 | 9361 | `wx.HelpProvider` implementation, and not in the window object itself. |
15afbcd0 | 9362 | """ |
54f9ee45 | 9363 | return _core_.Window_GetHelpText(*args, **kwargs) |
e811c8ce RD |
9364 | |
9365 | def SetToolTipString(*args, **kwargs): | |
15afbcd0 | 9366 | """ |
a95a7133 | 9367 | SetToolTipString(self, String tip) |
15afbcd0 RD |
9368 | |
9369 | Attach a tooltip to the window. | |
9370 | """ | |
54f9ee45 | 9371 | return _core_.Window_SetToolTipString(*args, **kwargs) |
e811c8ce RD |
9372 | |
9373 | def SetToolTip(*args, **kwargs): | |
15afbcd0 | 9374 | """ |
a95a7133 | 9375 | SetToolTip(self, ToolTip tip) |
15afbcd0 RD |
9376 | |
9377 | Attach a tooltip to the window. | |
9378 | """ | |
54f9ee45 | 9379 | return _core_.Window_SetToolTip(*args, **kwargs) |
e811c8ce RD |
9380 | |
9381 | def GetToolTip(*args, **kwargs): | |
15afbcd0 | 9382 | """ |
a95a7133 | 9383 | GetToolTip(self) -> ToolTip |
15afbcd0 RD |
9384 | |
9385 | get the associated tooltip or None if none | |
9386 | """ | |
54f9ee45 | 9387 | return _core_.Window_GetToolTip(*args, **kwargs) |
e811c8ce RD |
9388 | |
9389 | def SetDropTarget(*args, **kwargs): | |
15afbcd0 | 9390 | """ |
a95a7133 | 9391 | SetDropTarget(self, DropTarget dropTarget) |
15afbcd0 RD |
9392 | |
9393 | Associates a drop target with this window. If the window already has | |
9394 | a drop target, it is deleted. | |
9395 | """ | |
54f9ee45 | 9396 | return _core_.Window_SetDropTarget(*args, **kwargs) |
e811c8ce RD |
9397 | |
9398 | def GetDropTarget(*args, **kwargs): | |
15afbcd0 | 9399 | """ |
a95a7133 | 9400 | GetDropTarget(self) -> DropTarget |
15afbcd0 RD |
9401 | |
9402 | Returns the associated drop target, which may be None. | |
9403 | """ | |
54f9ee45 | 9404 | return _core_.Window_GetDropTarget(*args, **kwargs) |
e811c8ce | 9405 | |
5ba5649b RD |
9406 | def DragAcceptFiles(*args, **kwargs): |
9407 | """ | |
9408 | DragAcceptFiles(self, bool accept) | |
9409 | ||
9410 | Enables or disables eligibility for drop file events, EVT_DROP_FILES. | |
9411 | Only functional on Windows. | |
9412 | """ | |
9413 | return _core_.Window_DragAcceptFiles(*args, **kwargs) | |
9414 | ||
e811c8ce | 9415 | def SetConstraints(*args, **kwargs): |
15afbcd0 | 9416 | """ |
a95a7133 | 9417 | SetConstraints(self, LayoutConstraints constraints) |
15afbcd0 RD |
9418 | |
9419 | Sets the window to have the given layout constraints. If an existing | |
9420 | layout constraints object is already owned by the window, it will be | |
9421 | deleted. Pass None to disassociate and delete the window's current | |
9422 | constraints. | |
9423 | ||
9424 | You must call SetAutoLayout to tell a window to use the constraints | |
9425 | automatically in its default EVT_SIZE handler; otherwise, you must | |
9426 | handle EVT_SIZE yourself and call Layout() explicitly. When setting | |
9427 | both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have | |
9428 | effect. | |
9429 | """ | |
54f9ee45 | 9430 | return _core_.Window_SetConstraints(*args, **kwargs) |
e811c8ce RD |
9431 | |
9432 | def GetConstraints(*args, **kwargs): | |
15afbcd0 | 9433 | """ |
a95a7133 | 9434 | GetConstraints(self) -> LayoutConstraints |
15afbcd0 RD |
9435 | |
9436 | Returns a pointer to the window's layout constraints, or None if there | |
9437 | are none. | |
9438 | """ | |
54f9ee45 | 9439 | return _core_.Window_GetConstraints(*args, **kwargs) |
e811c8ce RD |
9440 | |
9441 | def SetAutoLayout(*args, **kwargs): | |
15afbcd0 | 9442 | """ |
a95a7133 | 9443 | SetAutoLayout(self, bool autoLayout) |
15afbcd0 RD |
9444 | |
9445 | Determines whether the Layout function will be called automatically | |
b1fcee84 RD |
9446 | when the window is resized. lease note that this only happens for the |
9447 | windows usually used to contain children, namely `wx.Panel` and | |
9448 | `wx.TopLevelWindow` (and the classes deriving from them). | |
9449 | ||
9450 | This method is called implicitly by `SetSizer` but if you use | |
9451 | `SetConstraints` you should call it manually or otherwise the window | |
9452 | layout won't be correctly updated when its size changes. | |
15afbcd0 | 9453 | """ |
54f9ee45 | 9454 | return _core_.Window_SetAutoLayout(*args, **kwargs) |
e811c8ce RD |
9455 | |
9456 | def GetAutoLayout(*args, **kwargs): | |
15afbcd0 | 9457 | """ |
a95a7133 | 9458 | GetAutoLayout(self) -> bool |
15afbcd0 RD |
9459 | |
9460 | Returns the current autoLayout setting | |
9461 | """ | |
54f9ee45 | 9462 | return _core_.Window_GetAutoLayout(*args, **kwargs) |
e811c8ce RD |
9463 | |
9464 | def Layout(*args, **kwargs): | |
15afbcd0 | 9465 | """ |
a95a7133 | 9466 | Layout(self) -> bool |
15afbcd0 RD |
9467 | |
9468 | Invokes the constraint-based layout algorithm or the sizer-based | |
9469 | algorithm for this window. See SetAutoLayout: when auto layout is on, | |
9470 | this function gets called automatically by the default EVT_SIZE | |
9471 | handler when the window is resized. | |
9472 | """ | |
54f9ee45 | 9473 | return _core_.Window_Layout(*args, **kwargs) |
e811c8ce RD |
9474 | |
9475 | def SetSizer(*args, **kwargs): | |
15afbcd0 | 9476 | """ |
a95a7133 | 9477 | SetSizer(self, Sizer sizer, bool deleteOld=True) |
15afbcd0 RD |
9478 | |
9479 | Sets the window to have the given layout sizer. The window will then | |
9480 | own the object, and will take care of its deletion. If an existing | |
9481 | layout sizer object is already owned by the window, it will be deleted | |
9482 | if the deleteOld parameter is true. Note that this function will also | |
9483 | call SetAutoLayout implicitly with a True parameter if the sizer is | |
ae8162c8 | 9484 | non-None, and False otherwise. |
15afbcd0 | 9485 | """ |
54f9ee45 | 9486 | return _core_.Window_SetSizer(*args, **kwargs) |
e811c8ce RD |
9487 | |
9488 | def SetSizerAndFit(*args, **kwargs): | |
15afbcd0 | 9489 | """ |
a95a7133 | 9490 | SetSizerAndFit(self, Sizer sizer, bool deleteOld=True) |
15afbcd0 RD |
9491 | |
9492 | The same as SetSizer, except it also sets the size hints for the | |
9493 | window based on the sizer's minimum size. | |
9494 | """ | |
54f9ee45 | 9495 | return _core_.Window_SetSizerAndFit(*args, **kwargs) |
e811c8ce RD |
9496 | |
9497 | def GetSizer(*args, **kwargs): | |
15afbcd0 | 9498 | """ |
a95a7133 | 9499 | GetSizer(self) -> Sizer |
15afbcd0 RD |
9500 | |
9501 | Return the sizer associated with the window by a previous call to | |
9502 | SetSizer or None if there isn't one. | |
9503 | """ | |
54f9ee45 | 9504 | return _core_.Window_GetSizer(*args, **kwargs) |
e811c8ce RD |
9505 | |
9506 | def SetContainingSizer(*args, **kwargs): | |
15afbcd0 | 9507 | """ |
a95a7133 | 9508 | SetContainingSizer(self, Sizer sizer) |
15afbcd0 RD |
9509 | |
9510 | This normally does not need to be called by application code. It is | |
9511 | called internally when a window is added to a sizer, and is used so | |
9512 | the window can remove itself from the sizer when it is destroyed. | |
9513 | """ | |
54f9ee45 | 9514 | return _core_.Window_SetContainingSizer(*args, **kwargs) |
e811c8ce RD |
9515 | |
9516 | def GetContainingSizer(*args, **kwargs): | |
15afbcd0 | 9517 | """ |
a95a7133 | 9518 | GetContainingSizer(self) -> Sizer |
15afbcd0 RD |
9519 | |
9520 | Return the sizer that this window is a member of, if any, otherwise None. | |
9521 | """ | |
54f9ee45 | 9522 | return _core_.Window_GetContainingSizer(*args, **kwargs) |
e811c8ce | 9523 | |
a95a7133 RD |
9524 | def InheritAttributes(*args, **kwargs): |
9525 | """ | |
9526 | InheritAttributes(self) | |
9527 | ||
41e2b43e RD |
9528 | This function is (or should be, in case of custom controls) called |
9529 | during window creation to intelligently set up the window visual | |
9530 | attributes, that is the font and the foreground and background | |
9531 | colours. | |
9532 | ||
9533 | By 'intelligently' the following is meant: by default, all windows use | |
9534 | their own default attributes. However if some of the parent's | |
9535 | attributes are explicitly changed (that is, using SetFont and not | |
fa47d7a7 | 9536 | SetOwnFont) and if the corresponding attribute hadn't been |
41e2b43e RD |
9537 | explicitly set for this window itself, then this window takes the same |
9538 | value as used by the parent. In addition, if the window overrides | |
9539 | ShouldInheritColours to return false, the colours will not be changed | |
9540 | no matter what and only the font might. | |
9541 | ||
34621cc5 | 9542 | This rather complicated logic is necessary in order to accommodate the |
ec9b55ca | 9543 | different usage scenarios. The most common one is when all default |
41e2b43e RD |
9544 | attributes are used and in this case, nothing should be inherited as |
9545 | in modern GUIs different controls use different fonts (and colours) | |
9546 | than their siblings so they can't inherit the same value from the | |
9547 | parent. However it was also deemed desirable to allow to simply change | |
9548 | the attributes of all children at once by just changing the font or | |
9549 | colour of their common parent, hence in this case we do inherit the | |
9550 | parents attributes. | |
9551 | ||
a95a7133 | 9552 | """ |
54f9ee45 | 9553 | return _core_.Window_InheritAttributes(*args, **kwargs) |
a95a7133 RD |
9554 | |
9555 | def ShouldInheritColours(*args, **kwargs): | |
9556 | """ | |
9557 | ShouldInheritColours(self) -> bool | |
9558 | ||
9559 | Return true from here to allow the colours of this window to be | |
41e2b43e RD |
9560 | changed by InheritAttributes, returning false forbids inheriting them |
9561 | from the parent window. | |
a95a7133 | 9562 | |
41e2b43e RD |
9563 | The base class version returns false, but this method is overridden in |
9564 | wxControl where it returns true. | |
a95a7133 | 9565 | """ |
54f9ee45 | 9566 | return _core_.Window_ShouldInheritColours(*args, **kwargs) |
a95a7133 | 9567 | |
e811c8ce | 9568 | def PostCreate(self, pre): |
15afbcd0 RD |
9569 | """ |
9570 | Phase 3 of the 2-phase create <wink!> | |
9571 | Call this method after precreating the window with the 2-phase create method. | |
9572 | """ | |
e811c8ce RD |
9573 | self.this = pre.this |
9574 | self.thisown = pre.thisown | |
9575 | pre.thisown = 0 | |
9576 | if hasattr(self, '_setOORInfo'): | |
9577 | self._setOORInfo(self) | |
9578 | if hasattr(self, '_setCallbackInfo'): | |
9579 | self._setCallbackInfo(self, self.__class__) | |
9580 | ||
7e08d4ef RD |
9581 | def SendSizeEvent(self): |
9582 | self.GetEventhandler().ProcessEvent(wx.SizeEvent((-1,-1))) | |
9583 | ||
0085ce49 RD |
9584 | Window_swigregister = _core_.Window_swigregister |
9585 | Window_swigregister(Window) | |
e811c8ce RD |
9586 | |
9587 | def PreWindow(*args, **kwargs): | |
15afbcd0 RD |
9588 | """ |
9589 | PreWindow() -> Window | |
9590 | ||
9591 | Precreate a Window for 2-phase creation. | |
9592 | """ | |
54f9ee45 | 9593 | val = _core_.new_PreWindow(*args, **kwargs) |
e811c8ce RD |
9594 | return val |
9595 | ||
0085ce49 RD |
9596 | def Window_NewControlId(*args): |
9597 | """ | |
15afbcd0 RD |
9598 | Window_NewControlId() -> int |
9599 | ||
9600 | Generate a control id for the controls which were not given one. | |
9601 | """ | |
0085ce49 | 9602 | return _core_.Window_NewControlId(*args) |
e811c8ce RD |
9603 | |
9604 | def Window_NextControlId(*args, **kwargs): | |
0085ce49 | 9605 | """ |
15afbcd0 RD |
9606 | Window_NextControlId(int winid) -> int |
9607 | ||
9608 | Get the id of the control following the one with the given | |
41e2b43e | 9609 | autogenerated) id |
15afbcd0 | 9610 | """ |
0085ce49 | 9611 | return _core_.Window_NextControlId(*args, **kwargs) |
e811c8ce RD |
9612 | |
9613 | def Window_PrevControlId(*args, **kwargs): | |
0085ce49 | 9614 | """ |
15afbcd0 RD |
9615 | Window_PrevControlId(int winid) -> int |
9616 | ||
9617 | Get the id of the control preceding the one with the given | |
41e2b43e | 9618 | autogenerated) id |
15afbcd0 | 9619 | """ |
0085ce49 | 9620 | return _core_.Window_PrevControlId(*args, **kwargs) |
e811c8ce | 9621 | |
0085ce49 RD |
9622 | def Window_FindFocus(*args): |
9623 | """ | |
15afbcd0 RD |
9624 | Window_FindFocus() -> Window |
9625 | ||
9626 | Returns the window or control that currently has the keyboard focus, | |
9627 | or None. | |
9628 | """ | |
0085ce49 | 9629 | return _core_.Window_FindFocus(*args) |
e811c8ce | 9630 | |
0085ce49 RD |
9631 | def Window_GetCapture(*args): |
9632 | """ | |
15afbcd0 RD |
9633 | Window_GetCapture() -> Window |
9634 | ||
9635 | Returns the window which currently captures the mouse or None | |
9636 | """ | |
0085ce49 | 9637 | return _core_.Window_GetCapture(*args) |
e811c8ce | 9638 | |
74a57fcd | 9639 | def Window_GetClassDefaultAttributes(*args, **kwargs): |
0085ce49 | 9640 | """ |
74a57fcd RD |
9641 | Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes |
9642 | ||
41e2b43e RD |
9643 | Get the default attributes for this class. This is useful if you want |
9644 | to use the same font or colour in your own control as in a standard | |
9645 | control -- which is a much better idea than hard coding specific | |
db3e571a RD |
9646 | colours or fonts which might look completely out of place on the |
9647 | user's system, especially if it uses themes. | |
74a57fcd RD |
9648 | |
9649 | The variant parameter is only relevant under Mac currently and is | |
41e2b43e | 9650 | ignore under other platforms. Under Mac, it will change the size of |
db3e571a RD |
9651 | the returned font. See `wx.Window.SetWindowVariant` for more about |
9652 | this. | |
74a57fcd | 9653 | """ |
0085ce49 | 9654 | return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 9655 | |
e811c8ce | 9656 | def DLG_PNT(win, point_or_x, y=None): |
15afbcd0 RD |
9657 | """ |
9658 | Convenience function for converting a Point or (x,y) in | |
9659 | dialog units to pixel units. | |
9660 | """ | |
e811c8ce RD |
9661 | if y is None: |
9662 | return win.ConvertDialogPointToPixels(point_or_x) | |
9663 | else: | |
fd3f2efe | 9664 | return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y)) |
e811c8ce RD |
9665 | |
9666 | def DLG_SZE(win, size_width, height=None): | |
15afbcd0 RD |
9667 | """ |
9668 | Convenience function for converting a Size or (w,h) in | |
9669 | dialog units to pixel units. | |
9670 | """ | |
e811c8ce RD |
9671 | if height is None: |
9672 | return win.ConvertDialogSizeToPixels(size_width) | |
9673 | else: | |
fd3f2efe | 9674 | return win.ConvertDialogSizeToPixels(wx.Size(size_width, height)) |
e811c8ce RD |
9675 | |
9676 | ||
9677 | def FindWindowById(*args, **kwargs): | |
0085ce49 | 9678 | """ |
15afbcd0 RD |
9679 | FindWindowById(long id, Window parent=None) -> Window |
9680 | ||
9681 | Find the first window in the application with the given id. If parent | |
9682 | is None, the search will start from all top-level frames and dialog | |
9683 | boxes; if non-None, the search will be limited to the given window | |
9684 | hierarchy. The search is recursive in both cases. | |
9685 | """ | |
0085ce49 | 9686 | return _core_.FindWindowById(*args, **kwargs) |
e811c8ce RD |
9687 | |
9688 | def FindWindowByName(*args, **kwargs): | |
0085ce49 | 9689 | """ |
15afbcd0 RD |
9690 | FindWindowByName(String name, Window parent=None) -> Window |
9691 | ||
9692 | Find a window by its name (as given in a window constructor or Create | |
9693 | function call). If parent is None, the search will start from all | |
9694 | top-level frames and dialog boxes; if non-None, the search will be | |
9695 | limited to the given window hierarchy. The search is recursive in both | |
9696 | cases. | |
9697 | ||
9698 | If no window with such name is found, wx.FindWindowByLabel is called. | |
9699 | """ | |
0085ce49 | 9700 | return _core_.FindWindowByName(*args, **kwargs) |
e811c8ce RD |
9701 | |
9702 | def FindWindowByLabel(*args, **kwargs): | |
0085ce49 | 9703 | """ |
15afbcd0 RD |
9704 | FindWindowByLabel(String label, Window parent=None) -> Window |
9705 | ||
9706 | Find a window by its label. Depending on the type of window, the label | |
9707 | may be a window title or panel item label. If parent is None, the | |
9708 | search will start from all top-level frames and dialog boxes; if | |
9709 | non-None, the search will be limited to the given window | |
9710 | hierarchy. The search is recursive in both cases. | |
9711 | """ | |
0085ce49 | 9712 | return _core_.FindWindowByLabel(*args, **kwargs) |
e811c8ce RD |
9713 | |
9714 | def Window_FromHWND(*args, **kwargs): | |
0085ce49 RD |
9715 | """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window""" |
9716 | return _core_.Window_FromHWND(*args, **kwargs) | |
b6b0383e | 9717 | |
0085ce49 RD |
9718 | def GetTopLevelWindows(*args): |
9719 | """ | |
b6b0383e RD |
9720 | GetTopLevelWindows() -> PyObject |
9721 | ||
9722 | Returns a list of the the application's top-level windows, (frames, | |
9723 | dialogs, etc.) NOTE: Currently this is a copy of the list maintained | |
9724 | by wxWidgets, and so it is only valid as long as no top-level windows | |
9725 | are closed or new top-level windows are created. | |
9726 | ||
9727 | """ | |
0085ce49 | 9728 | return _core_.GetTopLevelWindows(*args) |
e811c8ce RD |
9729 | #--------------------------------------------------------------------------- |
9730 | ||
9731 | class Validator(EvtHandler): | |
093d3ff1 | 9732 | """Proxy of C++ Validator class""" |
0085ce49 RD |
9733 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
9734 | __repr__ = _swig_repr | |
9735 | def __init__(self, *args, **kwargs): | |
a95a7133 | 9736 | """__init__(self) -> Validator""" |
0085ce49 | 9737 | _core_.Validator_swiginit(self,_core_.new_Validator(*args, **kwargs)) |
d14a1e28 | 9738 | self._setOORInfo(self) |
e811c8ce RD |
9739 | |
9740 | def Clone(*args, **kwargs): | |
a95a7133 | 9741 | """Clone(self) -> Validator""" |
54f9ee45 | 9742 | return _core_.Validator_Clone(*args, **kwargs) |
e811c8ce RD |
9743 | |
9744 | def Validate(*args, **kwargs): | |
a95a7133 | 9745 | """Validate(self, Window parent) -> bool""" |
54f9ee45 | 9746 | return _core_.Validator_Validate(*args, **kwargs) |
e811c8ce RD |
9747 | |
9748 | def TransferToWindow(*args, **kwargs): | |
a95a7133 | 9749 | """TransferToWindow(self) -> bool""" |
54f9ee45 | 9750 | return _core_.Validator_TransferToWindow(*args, **kwargs) |
e811c8ce RD |
9751 | |
9752 | def TransferFromWindow(*args, **kwargs): | |
a95a7133 | 9753 | """TransferFromWindow(self) -> bool""" |
54f9ee45 | 9754 | return _core_.Validator_TransferFromWindow(*args, **kwargs) |
e811c8ce RD |
9755 | |
9756 | def GetWindow(*args, **kwargs): | |
a95a7133 | 9757 | """GetWindow(self) -> Window""" |
54f9ee45 | 9758 | return _core_.Validator_GetWindow(*args, **kwargs) |
e811c8ce RD |
9759 | |
9760 | def SetWindow(*args, **kwargs): | |
a95a7133 | 9761 | """SetWindow(self, Window window)""" |
54f9ee45 | 9762 | return _core_.Validator_SetWindow(*args, **kwargs) |
e811c8ce RD |
9763 | |
9764 | def IsSilent(*args, **kwargs): | |
66c033b4 | 9765 | """IsSilent() -> bool""" |
54f9ee45 | 9766 | return _core_.Validator_IsSilent(*args, **kwargs) |
e811c8ce RD |
9767 | |
9768 | IsSilent = staticmethod(IsSilent) | |
9769 | def SetBellOnError(*args, **kwargs): | |
66c033b4 | 9770 | """SetBellOnError(int doIt=True)""" |
54f9ee45 | 9771 | return _core_.Validator_SetBellOnError(*args, **kwargs) |
e811c8ce RD |
9772 | |
9773 | SetBellOnError = staticmethod(SetBellOnError) | |
0085ce49 RD |
9774 | Validator_swigregister = _core_.Validator_swigregister |
9775 | Validator_swigregister(Validator) | |
e811c8ce | 9776 | |
0085ce49 RD |
9777 | def Validator_IsSilent(*args): |
9778 | """Validator_IsSilent() -> bool""" | |
9779 | return _core_.Validator_IsSilent(*args) | |
e811c8ce RD |
9780 | |
9781 | def Validator_SetBellOnError(*args, **kwargs): | |
0085ce49 RD |
9782 | """Validator_SetBellOnError(int doIt=True)""" |
9783 | return _core_.Validator_SetBellOnError(*args, **kwargs) | |
e811c8ce RD |
9784 | |
9785 | class PyValidator(Validator): | |
093d3ff1 | 9786 | """Proxy of C++ PyValidator class""" |
0085ce49 RD |
9787 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
9788 | __repr__ = _swig_repr | |
9789 | def __init__(self, *args, **kwargs): | |
a95a7133 | 9790 | """__init__(self) -> PyValidator""" |
0085ce49 | 9791 | _core_.PyValidator_swiginit(self,_core_.new_PyValidator(*args, **kwargs)) |
e811c8ce RD |
9792 | |
9793 | self._setCallbackInfo(self, PyValidator, 1) | |
9794 | self._setOORInfo(self) | |
9795 | ||
9796 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 9797 | """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)""" |
54f9ee45 | 9798 | return _core_.PyValidator__setCallbackInfo(*args, **kwargs) |
e811c8ce | 9799 | |
0085ce49 RD |
9800 | PyValidator_swigregister = _core_.PyValidator_swigregister |
9801 | PyValidator_swigregister(PyValidator) | |
e811c8ce RD |
9802 | |
9803 | #--------------------------------------------------------------------------- | |
9804 | ||
9805 | class Menu(EvtHandler): | |
093d3ff1 | 9806 | """Proxy of C++ Menu class""" |
0085ce49 RD |
9807 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
9808 | __repr__ = _swig_repr | |
9809 | def __init__(self, *args, **kwargs): | |
a95a7133 | 9810 | """__init__(self, String title=EmptyString, long style=0) -> Menu""" |
0085ce49 | 9811 | _core_.Menu_swiginit(self,_core_.new_Menu(*args, **kwargs)) |
e811c8ce RD |
9812 | self._setOORInfo(self) |
9813 | ||
9814 | def Append(*args, **kwargs): | |
a95a7133 | 9815 | """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
54f9ee45 | 9816 | return _core_.Menu_Append(*args, **kwargs) |
e811c8ce RD |
9817 | |
9818 | def AppendSeparator(*args, **kwargs): | |
a95a7133 | 9819 | """AppendSeparator(self) -> MenuItem""" |
54f9ee45 | 9820 | return _core_.Menu_AppendSeparator(*args, **kwargs) |
e811c8ce RD |
9821 | |
9822 | def AppendCheckItem(*args, **kwargs): | |
a95a7133 | 9823 | """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 9824 | return _core_.Menu_AppendCheckItem(*args, **kwargs) |
e811c8ce RD |
9825 | |
9826 | def AppendRadioItem(*args, **kwargs): | |
a95a7133 | 9827 | """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 9828 | return _core_.Menu_AppendRadioItem(*args, **kwargs) |
e811c8ce RD |
9829 | |
9830 | def AppendMenu(*args, **kwargs): | |
a95a7133 | 9831 | """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 9832 | return _core_.Menu_AppendMenu(*args, **kwargs) |
e811c8ce RD |
9833 | |
9834 | def AppendItem(*args, **kwargs): | |
a95a7133 | 9835 | """AppendItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 9836 | return _core_.Menu_AppendItem(*args, **kwargs) |
e811c8ce | 9837 | |
e811c8ce | 9838 | def InsertItem(*args, **kwargs): |
a95a7133 | 9839 | """InsertItem(self, size_t pos, MenuItem item) -> MenuItem""" |
54f9ee45 | 9840 | return _core_.Menu_InsertItem(*args, **kwargs) |
e811c8ce | 9841 | |
0085ce49 RD |
9842 | def PrependItem(*args, **kwargs): |
9843 | """PrependItem(self, MenuItem item) -> MenuItem""" | |
9844 | return _core_.Menu_PrependItem(*args, **kwargs) | |
9845 | ||
9846 | def Break(*args, **kwargs): | |
9847 | """Break(self)""" | |
9848 | return _core_.Menu_Break(*args, **kwargs) | |
9849 | ||
e811c8ce | 9850 | def Insert(*args, **kwargs): |
0df68c9f | 9851 | """ |
a95a7133 | 9852 | Insert(self, size_t pos, int id, String text, String help=EmptyString, |
a41e16b6 | 9853 | int kind=ITEM_NORMAL) -> MenuItem |
0df68c9f | 9854 | """ |
54f9ee45 | 9855 | return _core_.Menu_Insert(*args, **kwargs) |
e811c8ce RD |
9856 | |
9857 | def InsertSeparator(*args, **kwargs): | |
a95a7133 | 9858 | """InsertSeparator(self, size_t pos) -> MenuItem""" |
54f9ee45 | 9859 | return _core_.Menu_InsertSeparator(*args, **kwargs) |
e811c8ce RD |
9860 | |
9861 | def InsertCheckItem(*args, **kwargs): | |
a95a7133 | 9862 | """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 9863 | return _core_.Menu_InsertCheckItem(*args, **kwargs) |
e811c8ce RD |
9864 | |
9865 | def InsertRadioItem(*args, **kwargs): | |
a95a7133 | 9866 | """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 9867 | return _core_.Menu_InsertRadioItem(*args, **kwargs) |
e811c8ce RD |
9868 | |
9869 | def InsertMenu(*args, **kwargs): | |
a95a7133 | 9870 | """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 9871 | return _core_.Menu_InsertMenu(*args, **kwargs) |
e811c8ce | 9872 | |
e811c8ce | 9873 | def Prepend(*args, **kwargs): |
a95a7133 | 9874 | """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
54f9ee45 | 9875 | return _core_.Menu_Prepend(*args, **kwargs) |
e811c8ce RD |
9876 | |
9877 | def PrependSeparator(*args, **kwargs): | |
a95a7133 | 9878 | """PrependSeparator(self) -> MenuItem""" |
54f9ee45 | 9879 | return _core_.Menu_PrependSeparator(*args, **kwargs) |
e811c8ce RD |
9880 | |
9881 | def PrependCheckItem(*args, **kwargs): | |
a95a7133 | 9882 | """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 9883 | return _core_.Menu_PrependCheckItem(*args, **kwargs) |
e811c8ce RD |
9884 | |
9885 | def PrependRadioItem(*args, **kwargs): | |
a95a7133 | 9886 | """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 9887 | return _core_.Menu_PrependRadioItem(*args, **kwargs) |
e811c8ce RD |
9888 | |
9889 | def PrependMenu(*args, **kwargs): | |
a95a7133 | 9890 | """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 9891 | return _core_.Menu_PrependMenu(*args, **kwargs) |
e811c8ce RD |
9892 | |
9893 | def Remove(*args, **kwargs): | |
a95a7133 | 9894 | """Remove(self, int id) -> MenuItem""" |
54f9ee45 | 9895 | return _core_.Menu_Remove(*args, **kwargs) |
e811c8ce RD |
9896 | |
9897 | def RemoveItem(*args, **kwargs): | |
a95a7133 | 9898 | """RemoveItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 9899 | return _core_.Menu_RemoveItem(*args, **kwargs) |
e811c8ce RD |
9900 | |
9901 | def Delete(*args, **kwargs): | |
a95a7133 | 9902 | """Delete(self, int id) -> bool""" |
54f9ee45 | 9903 | return _core_.Menu_Delete(*args, **kwargs) |
e811c8ce RD |
9904 | |
9905 | def DeleteItem(*args, **kwargs): | |
a95a7133 | 9906 | """DeleteItem(self, MenuItem item) -> bool""" |
54f9ee45 | 9907 | return _core_.Menu_DeleteItem(*args, **kwargs) |
e811c8ce RD |
9908 | |
9909 | def Destroy(*args, **kwargs): | |
0df68c9f | 9910 | """ |
a95a7133 | 9911 | Destroy(self) |
e811c8ce | 9912 | |
0df68c9f RD |
9913 | Deletes the C++ object this Python object is a proxy for. |
9914 | """ | |
7e08d4ef RD |
9915 | val = _core_.Menu_Destroy(*args, **kwargs) |
9916 | args[0].thisown = 0 | |
9917 | return val | |
e811c8ce RD |
9918 | |
9919 | def DestroyId(*args, **kwargs): | |
0df68c9f | 9920 | """ |
a95a7133 | 9921 | DestroyId(self, int id) -> bool |
e811c8ce | 9922 | |
0df68c9f RD |
9923 | Deletes the C++ object this Python object is a proxy for. |
9924 | """ | |
7e08d4ef RD |
9925 | val = _core_.Menu_DestroyId(*args, **kwargs) |
9926 | args[0].thisown = 0 | |
9927 | return val | |
e811c8ce RD |
9928 | |
9929 | def DestroyItem(*args, **kwargs): | |
0df68c9f | 9930 | """ |
a95a7133 | 9931 | DestroyItem(self, MenuItem item) -> bool |
e811c8ce | 9932 | |
0df68c9f RD |
9933 | Deletes the C++ object this Python object is a proxy for. |
9934 | """ | |
7e08d4ef RD |
9935 | val = _core_.Menu_DestroyItem(*args, **kwargs) |
9936 | args[0].thisown = 0 | |
9937 | return val | |
e811c8ce RD |
9938 | |
9939 | def GetMenuItemCount(*args, **kwargs): | |
a95a7133 | 9940 | """GetMenuItemCount(self) -> size_t""" |
54f9ee45 | 9941 | return _core_.Menu_GetMenuItemCount(*args, **kwargs) |
e811c8ce RD |
9942 | |
9943 | def GetMenuItems(*args, **kwargs): | |
a95a7133 | 9944 | """GetMenuItems(self) -> PyObject""" |
54f9ee45 | 9945 | return _core_.Menu_GetMenuItems(*args, **kwargs) |
e811c8ce RD |
9946 | |
9947 | def FindItem(*args, **kwargs): | |
a95a7133 | 9948 | """FindItem(self, String item) -> int""" |
54f9ee45 | 9949 | return _core_.Menu_FindItem(*args, **kwargs) |
e811c8ce RD |
9950 | |
9951 | def FindItemById(*args, **kwargs): | |
a95a7133 | 9952 | """FindItemById(self, int id) -> MenuItem""" |
54f9ee45 | 9953 | return _core_.Menu_FindItemById(*args, **kwargs) |
e811c8ce RD |
9954 | |
9955 | def FindItemByPosition(*args, **kwargs): | |
a95a7133 | 9956 | """FindItemByPosition(self, size_t position) -> MenuItem""" |
54f9ee45 | 9957 | return _core_.Menu_FindItemByPosition(*args, **kwargs) |
e811c8ce RD |
9958 | |
9959 | def Enable(*args, **kwargs): | |
a95a7133 | 9960 | """Enable(self, int id, bool enable)""" |
54f9ee45 | 9961 | return _core_.Menu_Enable(*args, **kwargs) |
e811c8ce RD |
9962 | |
9963 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 9964 | """IsEnabled(self, int id) -> bool""" |
54f9ee45 | 9965 | return _core_.Menu_IsEnabled(*args, **kwargs) |
e811c8ce RD |
9966 | |
9967 | def Check(*args, **kwargs): | |
a95a7133 | 9968 | """Check(self, int id, bool check)""" |
54f9ee45 | 9969 | return _core_.Menu_Check(*args, **kwargs) |
e811c8ce RD |
9970 | |
9971 | def IsChecked(*args, **kwargs): | |
a95a7133 | 9972 | """IsChecked(self, int id) -> bool""" |
54f9ee45 | 9973 | return _core_.Menu_IsChecked(*args, **kwargs) |
e811c8ce RD |
9974 | |
9975 | def SetLabel(*args, **kwargs): | |
a95a7133 | 9976 | """SetLabel(self, int id, String label)""" |
54f9ee45 | 9977 | return _core_.Menu_SetLabel(*args, **kwargs) |
e811c8ce RD |
9978 | |
9979 | def GetLabel(*args, **kwargs): | |
a95a7133 | 9980 | """GetLabel(self, int id) -> String""" |
54f9ee45 | 9981 | return _core_.Menu_GetLabel(*args, **kwargs) |
e811c8ce RD |
9982 | |
9983 | def SetHelpString(*args, **kwargs): | |
a95a7133 | 9984 | """SetHelpString(self, int id, String helpString)""" |
54f9ee45 | 9985 | return _core_.Menu_SetHelpString(*args, **kwargs) |
e811c8ce RD |
9986 | |
9987 | def GetHelpString(*args, **kwargs): | |
a95a7133 | 9988 | """GetHelpString(self, int id) -> String""" |
54f9ee45 | 9989 | return _core_.Menu_GetHelpString(*args, **kwargs) |
e811c8ce RD |
9990 | |
9991 | def SetTitle(*args, **kwargs): | |
a95a7133 | 9992 | """SetTitle(self, String title)""" |
54f9ee45 | 9993 | return _core_.Menu_SetTitle(*args, **kwargs) |
e811c8ce RD |
9994 | |
9995 | def GetTitle(*args, **kwargs): | |
a95a7133 | 9996 | """GetTitle(self) -> String""" |
54f9ee45 | 9997 | return _core_.Menu_GetTitle(*args, **kwargs) |
e811c8ce RD |
9998 | |
9999 | def SetEventHandler(*args, **kwargs): | |
a95a7133 | 10000 | """SetEventHandler(self, EvtHandler handler)""" |
54f9ee45 | 10001 | return _core_.Menu_SetEventHandler(*args, **kwargs) |
e811c8ce RD |
10002 | |
10003 | def GetEventHandler(*args, **kwargs): | |
a95a7133 | 10004 | """GetEventHandler(self) -> EvtHandler""" |
54f9ee45 | 10005 | return _core_.Menu_GetEventHandler(*args, **kwargs) |
e811c8ce RD |
10006 | |
10007 | def SetInvokingWindow(*args, **kwargs): | |
a95a7133 | 10008 | """SetInvokingWindow(self, Window win)""" |
54f9ee45 | 10009 | return _core_.Menu_SetInvokingWindow(*args, **kwargs) |
e811c8ce RD |
10010 | |
10011 | def GetInvokingWindow(*args, **kwargs): | |
a95a7133 | 10012 | """GetInvokingWindow(self) -> Window""" |
54f9ee45 | 10013 | return _core_.Menu_GetInvokingWindow(*args, **kwargs) |
e811c8ce RD |
10014 | |
10015 | def GetStyle(*args, **kwargs): | |
a95a7133 | 10016 | """GetStyle(self) -> long""" |
54f9ee45 | 10017 | return _core_.Menu_GetStyle(*args, **kwargs) |
e811c8ce RD |
10018 | |
10019 | def UpdateUI(*args, **kwargs): | |
a95a7133 | 10020 | """UpdateUI(self, EvtHandler source=None)""" |
54f9ee45 | 10021 | return _core_.Menu_UpdateUI(*args, **kwargs) |
e811c8ce RD |
10022 | |
10023 | def GetMenuBar(*args, **kwargs): | |
a95a7133 | 10024 | """GetMenuBar(self) -> MenuBar""" |
54f9ee45 | 10025 | return _core_.Menu_GetMenuBar(*args, **kwargs) |
e811c8ce RD |
10026 | |
10027 | def Attach(*args, **kwargs): | |
a95a7133 | 10028 | """Attach(self, wxMenuBarBase menubar)""" |
54f9ee45 | 10029 | return _core_.Menu_Attach(*args, **kwargs) |
e811c8ce RD |
10030 | |
10031 | def Detach(*args, **kwargs): | |
a95a7133 | 10032 | """Detach(self)""" |
54f9ee45 | 10033 | return _core_.Menu_Detach(*args, **kwargs) |
e811c8ce RD |
10034 | |
10035 | def IsAttached(*args, **kwargs): | |
a95a7133 | 10036 | """IsAttached(self) -> bool""" |
54f9ee45 | 10037 | return _core_.Menu_IsAttached(*args, **kwargs) |
e811c8ce RD |
10038 | |
10039 | def SetParent(*args, **kwargs): | |
a95a7133 | 10040 | """SetParent(self, Menu parent)""" |
54f9ee45 | 10041 | return _core_.Menu_SetParent(*args, **kwargs) |
e811c8ce RD |
10042 | |
10043 | def GetParent(*args, **kwargs): | |
a95a7133 | 10044 | """GetParent(self) -> Menu""" |
54f9ee45 | 10045 | return _core_.Menu_GetParent(*args, **kwargs) |
e811c8ce | 10046 | |
0085ce49 RD |
10047 | Menu_swigregister = _core_.Menu_swigregister |
10048 | Menu_swigregister(Menu) | |
d14a1e28 RD |
10049 | DefaultValidator = cvar.DefaultValidator |
10050 | ||
10051 | #--------------------------------------------------------------------------- | |
10052 | ||
10053 | class MenuBar(Window): | |
093d3ff1 | 10054 | """Proxy of C++ MenuBar class""" |
0085ce49 RD |
10055 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
10056 | __repr__ = _swig_repr | |
10057 | def __init__(self, *args, **kwargs): | |
a95a7133 | 10058 | """__init__(self, long style=0) -> MenuBar""" |
0085ce49 | 10059 | _core_.MenuBar_swiginit(self,_core_.new_MenuBar(*args, **kwargs)) |
d14a1e28 | 10060 | self._setOORInfo(self) |
e811c8ce RD |
10061 | |
10062 | def Append(*args, **kwargs): | |
a95a7133 | 10063 | """Append(self, Menu menu, String title) -> bool""" |
54f9ee45 | 10064 | return _core_.MenuBar_Append(*args, **kwargs) |
e811c8ce RD |
10065 | |
10066 | def Insert(*args, **kwargs): | |
a95a7133 | 10067 | """Insert(self, size_t pos, Menu menu, String title) -> bool""" |
54f9ee45 | 10068 | return _core_.MenuBar_Insert(*args, **kwargs) |
e811c8ce RD |
10069 | |
10070 | def GetMenuCount(*args, **kwargs): | |
a95a7133 | 10071 | """GetMenuCount(self) -> size_t""" |
54f9ee45 | 10072 | return _core_.MenuBar_GetMenuCount(*args, **kwargs) |
e811c8ce RD |
10073 | |
10074 | def GetMenu(*args, **kwargs): | |
a95a7133 | 10075 | """GetMenu(self, size_t pos) -> Menu""" |
54f9ee45 | 10076 | return _core_.MenuBar_GetMenu(*args, **kwargs) |
e811c8ce RD |
10077 | |
10078 | def Replace(*args, **kwargs): | |
a95a7133 | 10079 | """Replace(self, size_t pos, Menu menu, String title) -> Menu""" |
54f9ee45 | 10080 | return _core_.MenuBar_Replace(*args, **kwargs) |
e811c8ce RD |
10081 | |
10082 | def Remove(*args, **kwargs): | |
a95a7133 | 10083 | """Remove(self, size_t pos) -> Menu""" |
54f9ee45 | 10084 | return _core_.MenuBar_Remove(*args, **kwargs) |
e811c8ce RD |
10085 | |
10086 | def EnableTop(*args, **kwargs): | |
a95a7133 | 10087 | """EnableTop(self, size_t pos, bool enable)""" |
54f9ee45 | 10088 | return _core_.MenuBar_EnableTop(*args, **kwargs) |
e811c8ce RD |
10089 | |
10090 | def IsEnabledTop(*args, **kwargs): | |
a95a7133 | 10091 | """IsEnabledTop(self, size_t pos) -> bool""" |
54f9ee45 | 10092 | return _core_.MenuBar_IsEnabledTop(*args, **kwargs) |
e811c8ce RD |
10093 | |
10094 | def SetLabelTop(*args, **kwargs): | |
a95a7133 | 10095 | """SetLabelTop(self, size_t pos, String label)""" |
54f9ee45 | 10096 | return _core_.MenuBar_SetLabelTop(*args, **kwargs) |
e811c8ce RD |
10097 | |
10098 | def GetLabelTop(*args, **kwargs): | |
a95a7133 | 10099 | """GetLabelTop(self, size_t pos) -> String""" |
54f9ee45 | 10100 | return _core_.MenuBar_GetLabelTop(*args, **kwargs) |
e811c8ce RD |
10101 | |
10102 | def FindMenuItem(*args, **kwargs): | |
a95a7133 | 10103 | """FindMenuItem(self, String menu, String item) -> int""" |
54f9ee45 | 10104 | return _core_.MenuBar_FindMenuItem(*args, **kwargs) |
e811c8ce RD |
10105 | |
10106 | def FindItemById(*args, **kwargs): | |
a95a7133 | 10107 | """FindItemById(self, int id) -> MenuItem""" |
54f9ee45 | 10108 | return _core_.MenuBar_FindItemById(*args, **kwargs) |
e811c8ce RD |
10109 | |
10110 | def FindMenu(*args, **kwargs): | |
a95a7133 | 10111 | """FindMenu(self, String title) -> int""" |
54f9ee45 | 10112 | return _core_.MenuBar_FindMenu(*args, **kwargs) |
e811c8ce RD |
10113 | |
10114 | def Enable(*args, **kwargs): | |
a95a7133 | 10115 | """Enable(self, int id, bool enable)""" |
54f9ee45 | 10116 | return _core_.MenuBar_Enable(*args, **kwargs) |
e811c8ce RD |
10117 | |
10118 | def Check(*args, **kwargs): | |
a95a7133 | 10119 | """Check(self, int id, bool check)""" |
54f9ee45 | 10120 | return _core_.MenuBar_Check(*args, **kwargs) |
e811c8ce RD |
10121 | |
10122 | def IsChecked(*args, **kwargs): | |
a95a7133 | 10123 | """IsChecked(self, int id) -> bool""" |
54f9ee45 | 10124 | return _core_.MenuBar_IsChecked(*args, **kwargs) |
e811c8ce RD |
10125 | |
10126 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 10127 | """IsEnabled(self, int id) -> bool""" |
54f9ee45 | 10128 | return _core_.MenuBar_IsEnabled(*args, **kwargs) |
e811c8ce RD |
10129 | |
10130 | def SetLabel(*args, **kwargs): | |
a95a7133 | 10131 | """SetLabel(self, int id, String label)""" |
54f9ee45 | 10132 | return _core_.MenuBar_SetLabel(*args, **kwargs) |
e811c8ce RD |
10133 | |
10134 | def GetLabel(*args, **kwargs): | |
a95a7133 | 10135 | """GetLabel(self, int id) -> String""" |
54f9ee45 | 10136 | return _core_.MenuBar_GetLabel(*args, **kwargs) |
e811c8ce RD |
10137 | |
10138 | def SetHelpString(*args, **kwargs): | |
a95a7133 | 10139 | """SetHelpString(self, int id, String helpString)""" |
54f9ee45 | 10140 | return _core_.MenuBar_SetHelpString(*args, **kwargs) |
e811c8ce RD |
10141 | |
10142 | def GetHelpString(*args, **kwargs): | |
a95a7133 | 10143 | """GetHelpString(self, int id) -> String""" |
54f9ee45 | 10144 | return _core_.MenuBar_GetHelpString(*args, **kwargs) |
e811c8ce RD |
10145 | |
10146 | def GetFrame(*args, **kwargs): | |
a95a7133 | 10147 | """GetFrame(self) -> wxFrame""" |
54f9ee45 | 10148 | return _core_.MenuBar_GetFrame(*args, **kwargs) |
e811c8ce RD |
10149 | |
10150 | def IsAttached(*args, **kwargs): | |
a95a7133 | 10151 | """IsAttached(self) -> bool""" |
54f9ee45 | 10152 | return _core_.MenuBar_IsAttached(*args, **kwargs) |
e811c8ce RD |
10153 | |
10154 | def Attach(*args, **kwargs): | |
a95a7133 | 10155 | """Attach(self, wxFrame frame)""" |
54f9ee45 | 10156 | return _core_.MenuBar_Attach(*args, **kwargs) |
e811c8ce RD |
10157 | |
10158 | def Detach(*args, **kwargs): | |
a95a7133 | 10159 | """Detach(self)""" |
54f9ee45 | 10160 | return _core_.MenuBar_Detach(*args, **kwargs) |
e811c8ce | 10161 | |
4f433fef RD |
10162 | def SetAutoWindowMenu(*args, **kwargs): |
10163 | """SetAutoWindowMenu(bool enable)""" | |
10164 | return _core_.MenuBar_SetAutoWindowMenu(*args, **kwargs) | |
10165 | ||
10166 | SetAutoWindowMenu = staticmethod(SetAutoWindowMenu) | |
10167 | def GetAutoWindowMenu(*args, **kwargs): | |
10168 | """GetAutoWindowMenu() -> bool""" | |
10169 | return _core_.MenuBar_GetAutoWindowMenu(*args, **kwargs) | |
10170 | ||
10171 | GetAutoWindowMenu = staticmethod(GetAutoWindowMenu) | |
0085ce49 RD |
10172 | MenuBar_swigregister = _core_.MenuBar_swigregister |
10173 | MenuBar_swigregister(MenuBar) | |
d14a1e28 | 10174 | |
4f433fef | 10175 | def MenuBar_SetAutoWindowMenu(*args, **kwargs): |
0085ce49 RD |
10176 | """MenuBar_SetAutoWindowMenu(bool enable)""" |
10177 | return _core_.MenuBar_SetAutoWindowMenu(*args, **kwargs) | |
4f433fef | 10178 | |
0085ce49 RD |
10179 | def MenuBar_GetAutoWindowMenu(*args): |
10180 | """MenuBar_GetAutoWindowMenu() -> bool""" | |
10181 | return _core_.MenuBar_GetAutoWindowMenu(*args) | |
4f433fef | 10182 | |
d14a1e28 RD |
10183 | #--------------------------------------------------------------------------- |
10184 | ||
10185 | class MenuItem(Object): | |
093d3ff1 | 10186 | """Proxy of C++ MenuItem class""" |
0085ce49 RD |
10187 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
10188 | __repr__ = _swig_repr | |
10189 | def __init__(self, *args, **kwargs): | |
0df68c9f | 10190 | """ |
a95a7133 | 10191 | __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString, |
196addbf RD |
10192 | String help=EmptyString, int kind=ITEM_NORMAL, |
10193 | Menu subMenu=None) -> MenuItem | |
0df68c9f | 10194 | """ |
0085ce49 RD |
10195 | _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs)) |
10196 | __swig_destroy__ = _core_.delete_MenuItem | |
10197 | __del__ = lambda self : None; | |
e811c8ce | 10198 | def GetMenu(*args, **kwargs): |
a95a7133 | 10199 | """GetMenu(self) -> Menu""" |
54f9ee45 | 10200 | return _core_.MenuItem_GetMenu(*args, **kwargs) |
e811c8ce RD |
10201 | |
10202 | def SetMenu(*args, **kwargs): | |
a95a7133 | 10203 | """SetMenu(self, Menu menu)""" |
54f9ee45 | 10204 | return _core_.MenuItem_SetMenu(*args, **kwargs) |
e811c8ce RD |
10205 | |
10206 | def SetId(*args, **kwargs): | |
a95a7133 | 10207 | """SetId(self, int id)""" |
54f9ee45 | 10208 | return _core_.MenuItem_SetId(*args, **kwargs) |
e811c8ce RD |
10209 | |
10210 | def GetId(*args, **kwargs): | |
a95a7133 | 10211 | """GetId(self) -> int""" |
54f9ee45 | 10212 | return _core_.MenuItem_GetId(*args, **kwargs) |
e811c8ce RD |
10213 | |
10214 | def IsSeparator(*args, **kwargs): | |
a95a7133 | 10215 | """IsSeparator(self) -> bool""" |
54f9ee45 | 10216 | return _core_.MenuItem_IsSeparator(*args, **kwargs) |
e811c8ce RD |
10217 | |
10218 | def SetText(*args, **kwargs): | |
a95a7133 | 10219 | """SetText(self, String str)""" |
54f9ee45 | 10220 | return _core_.MenuItem_SetText(*args, **kwargs) |
e811c8ce RD |
10221 | |
10222 | def GetLabel(*args, **kwargs): | |
a95a7133 | 10223 | """GetLabel(self) -> String""" |
54f9ee45 | 10224 | return _core_.MenuItem_GetLabel(*args, **kwargs) |
e811c8ce RD |
10225 | |
10226 | def GetText(*args, **kwargs): | |
a95a7133 | 10227 | """GetText(self) -> String""" |
54f9ee45 | 10228 | return _core_.MenuItem_GetText(*args, **kwargs) |
e811c8ce RD |
10229 | |
10230 | def GetLabelFromText(*args, **kwargs): | |
66c033b4 | 10231 | """GetLabelFromText(String text) -> String""" |
54f9ee45 | 10232 | return _core_.MenuItem_GetLabelFromText(*args, **kwargs) |
e811c8ce RD |
10233 | |
10234 | GetLabelFromText = staticmethod(GetLabelFromText) | |
10235 | def GetKind(*args, **kwargs): | |
a95a7133 | 10236 | """GetKind(self) -> int""" |
54f9ee45 | 10237 | return _core_.MenuItem_GetKind(*args, **kwargs) |
e811c8ce | 10238 | |
a95a7133 RD |
10239 | def SetKind(*args, **kwargs): |
10240 | """SetKind(self, int kind)""" | |
54f9ee45 | 10241 | return _core_.MenuItem_SetKind(*args, **kwargs) |
a95a7133 | 10242 | |
e811c8ce | 10243 | def SetCheckable(*args, **kwargs): |
a95a7133 | 10244 | """SetCheckable(self, bool checkable)""" |
54f9ee45 | 10245 | return _core_.MenuItem_SetCheckable(*args, **kwargs) |
e811c8ce RD |
10246 | |
10247 | def IsCheckable(*args, **kwargs): | |
a95a7133 | 10248 | """IsCheckable(self) -> bool""" |
54f9ee45 | 10249 | return _core_.MenuItem_IsCheckable(*args, **kwargs) |
e811c8ce RD |
10250 | |
10251 | def IsSubMenu(*args, **kwargs): | |
a95a7133 | 10252 | """IsSubMenu(self) -> bool""" |
54f9ee45 | 10253 | return _core_.MenuItem_IsSubMenu(*args, **kwargs) |
e811c8ce RD |
10254 | |
10255 | def SetSubMenu(*args, **kwargs): | |
a95a7133 | 10256 | """SetSubMenu(self, Menu menu)""" |
54f9ee45 | 10257 | return _core_.MenuItem_SetSubMenu(*args, **kwargs) |
e811c8ce RD |
10258 | |
10259 | def GetSubMenu(*args, **kwargs): | |
a95a7133 | 10260 | """GetSubMenu(self) -> Menu""" |
54f9ee45 | 10261 | return _core_.MenuItem_GetSubMenu(*args, **kwargs) |
e811c8ce RD |
10262 | |
10263 | def Enable(*args, **kwargs): | |
a95a7133 | 10264 | """Enable(self, bool enable=True)""" |
54f9ee45 | 10265 | return _core_.MenuItem_Enable(*args, **kwargs) |
e811c8ce RD |
10266 | |
10267 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 10268 | """IsEnabled(self) -> bool""" |
54f9ee45 | 10269 | return _core_.MenuItem_IsEnabled(*args, **kwargs) |
e811c8ce RD |
10270 | |
10271 | def Check(*args, **kwargs): | |
a95a7133 | 10272 | """Check(self, bool check=True)""" |
54f9ee45 | 10273 | return _core_.MenuItem_Check(*args, **kwargs) |
e811c8ce RD |
10274 | |
10275 | def IsChecked(*args, **kwargs): | |
a95a7133 | 10276 | """IsChecked(self) -> bool""" |
54f9ee45 | 10277 | return _core_.MenuItem_IsChecked(*args, **kwargs) |
e811c8ce RD |
10278 | |
10279 | def Toggle(*args, **kwargs): | |
a95a7133 | 10280 | """Toggle(self)""" |
54f9ee45 | 10281 | return _core_.MenuItem_Toggle(*args, **kwargs) |
e811c8ce RD |
10282 | |
10283 | def SetHelp(*args, **kwargs): | |
a95a7133 | 10284 | """SetHelp(self, String str)""" |
54f9ee45 | 10285 | return _core_.MenuItem_SetHelp(*args, **kwargs) |
e811c8ce RD |
10286 | |
10287 | def GetHelp(*args, **kwargs): | |
a95a7133 | 10288 | """GetHelp(self) -> String""" |
54f9ee45 | 10289 | return _core_.MenuItem_GetHelp(*args, **kwargs) |
e811c8ce RD |
10290 | |
10291 | def GetAccel(*args, **kwargs): | |
a95a7133 | 10292 | """GetAccel(self) -> AcceleratorEntry""" |
54f9ee45 | 10293 | return _core_.MenuItem_GetAccel(*args, **kwargs) |
e811c8ce RD |
10294 | |
10295 | def SetAccel(*args, **kwargs): | |
a95a7133 | 10296 | """SetAccel(self, AcceleratorEntry accel)""" |
54f9ee45 | 10297 | return _core_.MenuItem_SetAccel(*args, **kwargs) |
e811c8ce | 10298 | |
091f5bed RD |
10299 | def SetBitmap(*args, **kwargs): |
10300 | """SetBitmap(self, Bitmap bitmap)""" | |
10301 | return _core_.MenuItem_SetBitmap(*args, **kwargs) | |
10302 | ||
10303 | def GetBitmap(*args, **kwargs): | |
10304 | """GetBitmap(self) -> Bitmap""" | |
10305 | return _core_.MenuItem_GetBitmap(*args, **kwargs) | |
10306 | ||
c1280d1e RD |
10307 | def SetFont(*args, **kwargs): |
10308 | """SetFont(self, Font font)""" | |
10309 | return _core_.MenuItem_SetFont(*args, **kwargs) | |
10310 | ||
10311 | def GetFont(*args, **kwargs): | |
10312 | """GetFont(self) -> Font""" | |
10313 | return _core_.MenuItem_GetFont(*args, **kwargs) | |
10314 | ||
10315 | def SetTextColour(*args, **kwargs): | |
10316 | """SetTextColour(self, Colour colText)""" | |
10317 | return _core_.MenuItem_SetTextColour(*args, **kwargs) | |
10318 | ||
10319 | def GetTextColour(*args, **kwargs): | |
10320 | """GetTextColour(self) -> Colour""" | |
10321 | return _core_.MenuItem_GetTextColour(*args, **kwargs) | |
10322 | ||
10323 | def SetBackgroundColour(*args, **kwargs): | |
10324 | """SetBackgroundColour(self, Colour colBack)""" | |
10325 | return _core_.MenuItem_SetBackgroundColour(*args, **kwargs) | |
10326 | ||
10327 | def GetBackgroundColour(*args, **kwargs): | |
10328 | """GetBackgroundColour(self) -> Colour""" | |
10329 | return _core_.MenuItem_GetBackgroundColour(*args, **kwargs) | |
10330 | ||
10331 | def SetBitmaps(*args, **kwargs): | |
10332 | """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)""" | |
10333 | return _core_.MenuItem_SetBitmaps(*args, **kwargs) | |
10334 | ||
10335 | def SetDisabledBitmap(*args, **kwargs): | |
10336 | """SetDisabledBitmap(self, Bitmap bmpDisabled)""" | |
10337 | return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs) | |
10338 | ||
10339 | def GetDisabledBitmap(*args, **kwargs): | |
10340 | """GetDisabledBitmap(self) -> Bitmap""" | |
10341 | return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs) | |
10342 | ||
10343 | def SetMarginWidth(*args, **kwargs): | |
10344 | """SetMarginWidth(self, int nWidth)""" | |
10345 | return _core_.MenuItem_SetMarginWidth(*args, **kwargs) | |
10346 | ||
10347 | def GetMarginWidth(*args, **kwargs): | |
10348 | """GetMarginWidth(self) -> int""" | |
10349 | return _core_.MenuItem_GetMarginWidth(*args, **kwargs) | |
10350 | ||
e811c8ce | 10351 | def GetDefaultMarginWidth(*args, **kwargs): |
66c033b4 | 10352 | """GetDefaultMarginWidth() -> int""" |
54f9ee45 | 10353 | return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs) |
e811c8ce RD |
10354 | |
10355 | GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) | |
c1280d1e RD |
10356 | def IsOwnerDrawn(*args, **kwargs): |
10357 | """IsOwnerDrawn(self) -> bool""" | |
10358 | return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs) | |
10359 | ||
10360 | def SetOwnerDrawn(*args, **kwargs): | |
10361 | """SetOwnerDrawn(self, bool ownerDrawn=True)""" | |
10362 | return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs) | |
10363 | ||
10364 | def ResetOwnerDrawn(*args, **kwargs): | |
10365 | """ResetOwnerDrawn(self)""" | |
10366 | return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs) | |
10367 | ||
0085ce49 RD |
10368 | MenuItem_swigregister = _core_.MenuItem_swigregister |
10369 | MenuItem_swigregister(MenuItem) | |
d14a1e28 | 10370 | |
e811c8ce | 10371 | def MenuItem_GetLabelFromText(*args, **kwargs): |
0085ce49 RD |
10372 | """MenuItem_GetLabelFromText(String text) -> String""" |
10373 | return _core_.MenuItem_GetLabelFromText(*args, **kwargs) | |
d14a1e28 | 10374 | |
0085ce49 RD |
10375 | def MenuItem_GetDefaultMarginWidth(*args): |
10376 | """MenuItem_GetDefaultMarginWidth() -> int""" | |
10377 | return _core_.MenuItem_GetDefaultMarginWidth(*args) | |
d14a1e28 RD |
10378 | |
10379 | #--------------------------------------------------------------------------- | |
10380 | ||
10381 | class Control(Window): | |
15afbcd0 RD |
10382 | """ |
10383 | This is the base class for a control or 'widget'. | |
10384 | ||
41e2b43e RD |
10385 | A control is generally a small window which processes user input |
10386 | and/or displays one or more item of data. | |
15afbcd0 | 10387 | """ |
0085ce49 RD |
10388 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
10389 | __repr__ = _swig_repr | |
10390 | def __init__(self, *args, **kwargs): | |
0df68c9f | 10391 | """ |
248ed943 RD |
10392 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
10393 | Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 10394 | String name=ControlNameStr) -> Control |
15afbcd0 | 10395 | |
41e2b43e RD |
10396 | Create a Control. Normally you should only call this from a subclass' |
10397 | __init__ as a plain old wx.Control is not very useful. | |
0df68c9f | 10398 | """ |
0085ce49 | 10399 | _core_.Control_swiginit(self,_core_.new_Control(*args, **kwargs)) |
d14a1e28 | 10400 | self._setOORInfo(self) |
e811c8ce RD |
10401 | |
10402 | def Create(*args, **kwargs): | |
0df68c9f | 10403 | """ |
248ed943 RD |
10404 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
10405 | Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 10406 | String name=ControlNameStr) -> bool |
15afbcd0 RD |
10407 | |
10408 | Do the 2nd phase and create the GUI control. | |
0df68c9f | 10409 | """ |
54f9ee45 | 10410 | return _core_.Control_Create(*args, **kwargs) |
e811c8ce RD |
10411 | |
10412 | def Command(*args, **kwargs): | |
15afbcd0 | 10413 | """ |
a95a7133 | 10414 | Command(self, CommandEvent event) |
15afbcd0 | 10415 | |
41e2b43e RD |
10416 | Simulates the effect of the user issuing a command to the item. |
10417 | ||
10418 | :see: `wx.CommandEvent` | |
10419 | ||
15afbcd0 | 10420 | """ |
54f9ee45 | 10421 | return _core_.Control_Command(*args, **kwargs) |
e811c8ce RD |
10422 | |
10423 | def GetLabel(*args, **kwargs): | |
15afbcd0 | 10424 | """ |
a95a7133 | 10425 | GetLabel(self) -> String |
15afbcd0 RD |
10426 | |
10427 | Return a control's text. | |
10428 | """ | |
54f9ee45 | 10429 | return _core_.Control_GetLabel(*args, **kwargs) |
e811c8ce | 10430 | |
74a57fcd | 10431 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
10432 | """ |
10433 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
10434 | ||
10435 | Get the default attributes for this class. This is useful if you want | |
10436 | to use the same font or colour in your own control as in a standard | |
10437 | control -- which is a much better idea than hard coding specific | |
10438 | colours or fonts which might look completely out of place on the | |
10439 | user's system, especially if it uses themes. | |
10440 | ||
10441 | The variant parameter is only relevant under Mac currently and is | |
10442 | ignore under other platforms. Under Mac, it will change the size of | |
10443 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
10444 | this. | |
10445 | """ | |
54f9ee45 | 10446 | return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
10447 | |
10448 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
0085ce49 RD |
10449 | Control_swigregister = _core_.Control_swigregister |
10450 | Control_swigregister(Control) | |
b2dc1044 | 10451 | ControlNameStr = cvar.ControlNameStr |
d14a1e28 RD |
10452 | |
10453 | def PreControl(*args, **kwargs): | |
15afbcd0 RD |
10454 | """ |
10455 | PreControl() -> Control | |
10456 | ||
10457 | Precreate a Control control for 2-phase creation | |
10458 | """ | |
54f9ee45 | 10459 | val = _core_.new_PreControl(*args, **kwargs) |
d14a1e28 RD |
10460 | return val |
10461 | ||
74a57fcd | 10462 | def Control_GetClassDefaultAttributes(*args, **kwargs): |
0085ce49 | 10463 | """ |
110da5b0 RD |
10464 | Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes |
10465 | ||
10466 | Get the default attributes for this class. This is useful if you want | |
10467 | to use the same font or colour in your own control as in a standard | |
10468 | control -- which is a much better idea than hard coding specific | |
10469 | colours or fonts which might look completely out of place on the | |
10470 | user's system, especially if it uses themes. | |
10471 | ||
10472 | The variant parameter is only relevant under Mac currently and is | |
10473 | ignore under other platforms. Under Mac, it will change the size of | |
10474 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
10475 | this. | |
10476 | """ | |
0085ce49 | 10477 | return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 10478 | |
d14a1e28 RD |
10479 | #--------------------------------------------------------------------------- |
10480 | ||
10481 | class ItemContainer(object): | |
15afbcd0 | 10482 | """ |
53aa7709 RD |
10483 | The wx.ItemContainer class defines an interface which is implemented |
10484 | by all controls which have string subitems, each of which may be | |
10485 | selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well | |
10486 | as `wx.ComboBox` which implements an extended interface deriving from | |
41e2b43e | 10487 | this one. |
15afbcd0 | 10488 | |
41e2b43e RD |
10489 | It defines the methods for accessing the control's items and although |
10490 | each of the derived classes implements them differently, they still | |
10491 | all conform to the same interface. | |
15afbcd0 | 10492 | |
41e2b43e RD |
10493 | The items in a wx.ItemContainer have (non empty) string labels and, |
10494 | optionally, client data associated with them. | |
15afbcd0 RD |
10495 | |
10496 | """ | |
0085ce49 RD |
10497 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
10498 | def __init__(self): raise AttributeError, "No constructor defined" | |
10499 | __repr__ = _swig_repr | |
e811c8ce | 10500 | def Append(*args, **kwargs): |
15afbcd0 | 10501 | """ |
a95a7133 | 10502 | Append(self, String item, PyObject clientData=None) -> int |
15afbcd0 | 10503 | |
41e2b43e RD |
10504 | Adds the item to the control, associating the given data with the item |
10505 | if not None. The return value is the index of the newly added item | |
10506 | which may be different from the last one if the control is sorted (e.g. | |
10507 | has wx.LB_SORT or wx.CB_SORT style). | |
15afbcd0 | 10508 | """ |
54f9ee45 | 10509 | return _core_.ItemContainer_Append(*args, **kwargs) |
e811c8ce RD |
10510 | |
10511 | def AppendItems(*args, **kwargs): | |
15afbcd0 | 10512 | """ |
f5b96ee1 | 10513 | AppendItems(self, List strings) |
15afbcd0 | 10514 | |
41e2b43e RD |
10515 | Apend several items at once to the control. Notice that calling this |
10516 | method may be much faster than appending the items one by one if you | |
10517 | need to add a lot of items. | |
15afbcd0 | 10518 | """ |
54f9ee45 | 10519 | return _core_.ItemContainer_AppendItems(*args, **kwargs) |
e811c8ce RD |
10520 | |
10521 | def Insert(*args, **kwargs): | |
15afbcd0 | 10522 | """ |
50f151d7 | 10523 | Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int |
15afbcd0 | 10524 | |
41e2b43e | 10525 | Insert an item into the control before the item at the ``pos`` index, |
15afbcd0 RD |
10526 | optionally associating some data object with the item. |
10527 | """ | |
54f9ee45 | 10528 | return _core_.ItemContainer_Insert(*args, **kwargs) |
e811c8ce RD |
10529 | |
10530 | def Clear(*args, **kwargs): | |
15afbcd0 | 10531 | """ |
a95a7133 | 10532 | Clear(self) |
15afbcd0 RD |
10533 | |
10534 | Removes all items from the control. | |
10535 | """ | |
54f9ee45 | 10536 | return _core_.ItemContainer_Clear(*args, **kwargs) |
e811c8ce RD |
10537 | |
10538 | def Delete(*args, **kwargs): | |
15afbcd0 | 10539 | """ |
50f151d7 | 10540 | Delete(self, unsigned int n) |
15afbcd0 | 10541 | |
41e2b43e RD |
10542 | Deletes the item at the zero-based index 'n' from the control. Note |
10543 | that it is an error (signalled by a `wx.PyAssertionError` exception if | |
10544 | enabled) to remove an item with the index negative or greater or equal | |
10545 | than the number of items in the control. | |
15afbcd0 | 10546 | """ |
54f9ee45 | 10547 | return _core_.ItemContainer_Delete(*args, **kwargs) |
e811c8ce | 10548 | |
53aa7709 RD |
10549 | def GetClientData(*args, **kwargs): |
10550 | """ | |
50f151d7 | 10551 | GetClientData(self, unsigned int n) -> PyObject |
53aa7709 RD |
10552 | |
10553 | Returns the client data associated with the given item, (if any.) | |
10554 | """ | |
10555 | return _core_.ItemContainer_GetClientData(*args, **kwargs) | |
10556 | ||
10557 | def SetClientData(*args, **kwargs): | |
10558 | """ | |
50f151d7 | 10559 | SetClientData(self, unsigned int n, PyObject clientData) |
53aa7709 RD |
10560 | |
10561 | Associate the given client data with the item at position n. | |
10562 | """ | |
10563 | return _core_.ItemContainer_SetClientData(*args, **kwargs) | |
10564 | ||
e811c8ce | 10565 | def GetCount(*args, **kwargs): |
15afbcd0 | 10566 | """ |
50f151d7 | 10567 | GetCount(self) -> unsigned int |
15afbcd0 RD |
10568 | |
10569 | Returns the number of items in the control. | |
10570 | """ | |
54f9ee45 | 10571 | return _core_.ItemContainer_GetCount(*args, **kwargs) |
e811c8ce RD |
10572 | |
10573 | def IsEmpty(*args, **kwargs): | |
15afbcd0 | 10574 | """ |
a95a7133 | 10575 | IsEmpty(self) -> bool |
15afbcd0 RD |
10576 | |
10577 | Returns True if the control is empty or False if it has some items. | |
10578 | """ | |
54f9ee45 | 10579 | return _core_.ItemContainer_IsEmpty(*args, **kwargs) |
e811c8ce RD |
10580 | |
10581 | def GetString(*args, **kwargs): | |
15afbcd0 | 10582 | """ |
50f151d7 | 10583 | GetString(self, unsigned int n) -> String |
15afbcd0 RD |
10584 | |
10585 | Returns the label of the item with the given index. | |
10586 | """ | |
54f9ee45 | 10587 | return _core_.ItemContainer_GetString(*args, **kwargs) |
e811c8ce RD |
10588 | |
10589 | def GetStrings(*args, **kwargs): | |
a95a7133 | 10590 | """GetStrings(self) -> wxArrayString""" |
54f9ee45 | 10591 | return _core_.ItemContainer_GetStrings(*args, **kwargs) |
e811c8ce RD |
10592 | |
10593 | def SetString(*args, **kwargs): | |
15afbcd0 | 10594 | """ |
50f151d7 | 10595 | SetString(self, unsigned int n, String s) |
15afbcd0 RD |
10596 | |
10597 | Sets the label for the given item. | |
10598 | """ | |
54f9ee45 | 10599 | return _core_.ItemContainer_SetString(*args, **kwargs) |
e811c8ce RD |
10600 | |
10601 | def FindString(*args, **kwargs): | |
15afbcd0 | 10602 | """ |
a95a7133 | 10603 | FindString(self, String s) -> int |
15afbcd0 RD |
10604 | |
10605 | Finds an item whose label matches the given string. Returns the | |
41e2b43e RD |
10606 | zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not |
10607 | found. | |
15afbcd0 | 10608 | """ |
54f9ee45 | 10609 | return _core_.ItemContainer_FindString(*args, **kwargs) |
e811c8ce | 10610 | |
53aa7709 | 10611 | def SetSelection(*args, **kwargs): |
15afbcd0 | 10612 | """ |
53aa7709 | 10613 | SetSelection(self, int n) |
15afbcd0 RD |
10614 | |
10615 | Sets the item at index 'n' to be the selected item. | |
10616 | """ | |
53aa7709 | 10617 | return _core_.ItemContainer_SetSelection(*args, **kwargs) |
e811c8ce RD |
10618 | |
10619 | def GetSelection(*args, **kwargs): | |
15afbcd0 | 10620 | """ |
a95a7133 | 10621 | GetSelection(self) -> int |
15afbcd0 | 10622 | |
41e2b43e RD |
10623 | Returns the index of the selected item or ``wx.NOT_FOUND`` if no item |
10624 | is selected. | |
15afbcd0 | 10625 | """ |
54f9ee45 | 10626 | return _core_.ItemContainer_GetSelection(*args, **kwargs) |
e811c8ce | 10627 | |
53aa7709 RD |
10628 | def SetStringSelection(*args, **kwargs): |
10629 | """SetStringSelection(self, String s) -> bool""" | |
10630 | return _core_.ItemContainer_SetStringSelection(*args, **kwargs) | |
10631 | ||
e811c8ce | 10632 | def GetStringSelection(*args, **kwargs): |
15afbcd0 | 10633 | """ |
a95a7133 | 10634 | GetStringSelection(self) -> String |
15afbcd0 | 10635 | |
41e2b43e RD |
10636 | Returns the label of the selected item or an empty string if no item |
10637 | is selected. | |
15afbcd0 | 10638 | """ |
54f9ee45 | 10639 | return _core_.ItemContainer_GetStringSelection(*args, **kwargs) |
e811c8ce | 10640 | |
53aa7709 | 10641 | def Select(*args, **kwargs): |
15afbcd0 | 10642 | """ |
53aa7709 | 10643 | Select(self, int n) |
15afbcd0 | 10644 | |
53aa7709 RD |
10645 | This is the same as `SetSelection` and exists only because it is |
10646 | slightly more natural for controls which support multiple selection. | |
15afbcd0 | 10647 | """ |
53aa7709 | 10648 | return _core_.ItemContainer_Select(*args, **kwargs) |
e811c8ce | 10649 | |
0085ce49 RD |
10650 | ItemContainer_swigregister = _core_.ItemContainer_swigregister |
10651 | ItemContainer_swigregister(ItemContainer) | |
d14a1e28 RD |
10652 | |
10653 | #--------------------------------------------------------------------------- | |
10654 | ||
10655 | class ControlWithItems(Control,ItemContainer): | |
15afbcd0 | 10656 | """ |
41e2b43e RD |
10657 | wx.ControlWithItems combines the ``wx.ItemContainer`` class with the |
10658 | wx.Control class, and is used for the base class of various controls | |
10659 | that have items. | |
15afbcd0 | 10660 | """ |
0085ce49 RD |
10661 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
10662 | def __init__(self): raise AttributeError, "No constructor defined" | |
10663 | __repr__ = _swig_repr | |
10664 | ControlWithItems_swigregister = _core_.ControlWithItems_swigregister | |
10665 | ControlWithItems_swigregister(ControlWithItems) | |
d14a1e28 RD |
10666 | |
10667 | #--------------------------------------------------------------------------- | |
10668 | ||
10669 | class SizerItem(Object): | |
248ed943 RD |
10670 | """ |
10671 | The wx.SizerItem class is used to track the position, size and other | |
10672 | attributes of each item managed by a `wx.Sizer`. In normal usage user | |
10673 | code should never need to deal directly with a wx.SizerItem, but | |
10674 | custom classes derived from `wx.PySizer` will probably need to use the | |
10675 | collection of wx.SizerItems held by wx.Sizer when calculating layout. | |
10676 | ||
10677 | :see: `wx.Sizer`, `wx.GBSizerItem` | |
10678 | """ | |
0085ce49 RD |
10679 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
10680 | __repr__ = _swig_repr | |
10681 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
10682 | """ |
10683 | __init__(self) -> SizerItem | |
10684 | ||
10685 | Constructs an empty wx.SizerItem. Either a window, sizer or spacer | |
10686 | size will need to be set before this item can be used in a Sizer. | |
10687 | ||
10688 | You will probably never need to create a wx.SizerItem directly as they | |
10689 | are created automatically when the sizer's Add, Insert or Prepend | |
10690 | methods are called. | |
10691 | ||
10692 | :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer` | |
10693 | """ | |
0085ce49 RD |
10694 | _core_.SizerItem_swiginit(self,_core_.new_SizerItem(*args, **kwargs)) |
10695 | __swig_destroy__ = _core_.delete_SizerItem | |
10696 | __del__ = lambda self : None; | |
e811c8ce | 10697 | def DeleteWindows(*args, **kwargs): |
248ed943 RD |
10698 | """ |
10699 | DeleteWindows(self) | |
10700 | ||
10701 | Destroy the window or the windows in a subsizer, depending on the type | |
10702 | of item. | |
10703 | """ | |
54f9ee45 | 10704 | return _core_.SizerItem_DeleteWindows(*args, **kwargs) |
e811c8ce RD |
10705 | |
10706 | def DetachSizer(*args, **kwargs): | |
248ed943 RD |
10707 | """ |
10708 | DetachSizer(self) | |
10709 | ||
10710 | Enable deleting the SizerItem without destroying the contained sizer. | |
10711 | """ | |
54f9ee45 | 10712 | return _core_.SizerItem_DetachSizer(*args, **kwargs) |
e811c8ce RD |
10713 | |
10714 | def GetSize(*args, **kwargs): | |
248ed943 RD |
10715 | """ |
10716 | GetSize(self) -> Size | |
10717 | ||
10718 | Get the current size of the item, as set in the last Layout. | |
10719 | """ | |
54f9ee45 | 10720 | return _core_.SizerItem_GetSize(*args, **kwargs) |
e811c8ce RD |
10721 | |
10722 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
10723 | """ |
10724 | CalcMin(self) -> Size | |
10725 | ||
10726 | Calculates the minimum desired size for the item, including any space | |
10727 | needed by borders. | |
10728 | """ | |
54f9ee45 | 10729 | return _core_.SizerItem_CalcMin(*args, **kwargs) |
e811c8ce RD |
10730 | |
10731 | def SetDimension(*args, **kwargs): | |
248ed943 RD |
10732 | """ |
10733 | SetDimension(self, Point pos, Size size) | |
10734 | ||
10735 | Set the position and size of the space allocated for this item by the | |
10736 | sizer, and adjust the position and size of the item (window or | |
10737 | subsizer) to be within that space taking alignment and borders into | |
10738 | account. | |
10739 | """ | |
54f9ee45 | 10740 | return _core_.SizerItem_SetDimension(*args, **kwargs) |
e811c8ce RD |
10741 | |
10742 | def GetMinSize(*args, **kwargs): | |
248ed943 RD |
10743 | """ |
10744 | GetMinSize(self) -> Size | |
10745 | ||
10746 | Get the minimum size needed for the item. | |
10747 | """ | |
54f9ee45 | 10748 | return _core_.SizerItem_GetMinSize(*args, **kwargs) |
e811c8ce | 10749 | |
dfbb5885 RD |
10750 | def GetMinSizeWithBorder(*args, **kwargs): |
10751 | """ | |
10752 | GetMinSizeWithBorder(self) -> Size | |
10753 | ||
10754 | Get the minimum size needed for the item with space for the borders | |
10755 | added, if needed. | |
10756 | """ | |
10757 | return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs) | |
10758 | ||
e811c8ce | 10759 | def SetInitSize(*args, **kwargs): |
a95a7133 | 10760 | """SetInitSize(self, int x, int y)""" |
54f9ee45 | 10761 | return _core_.SizerItem_SetInitSize(*args, **kwargs) |
e811c8ce RD |
10762 | |
10763 | def SetRatioWH(*args, **kwargs): | |
248ed943 RD |
10764 | """ |
10765 | SetRatioWH(self, int width, int height) | |
10766 | ||
10767 | Set the ratio item attribute. | |
10768 | """ | |
54f9ee45 | 10769 | return _core_.SizerItem_SetRatioWH(*args, **kwargs) |
e811c8ce RD |
10770 | |
10771 | def SetRatioSize(*args, **kwargs): | |
248ed943 RD |
10772 | """ |
10773 | SetRatioSize(self, Size size) | |
10774 | ||
10775 | Set the ratio item attribute. | |
10776 | """ | |
54f9ee45 | 10777 | return _core_.SizerItem_SetRatioSize(*args, **kwargs) |
e811c8ce RD |
10778 | |
10779 | def SetRatio(*args, **kwargs): | |
248ed943 RD |
10780 | """ |
10781 | SetRatio(self, float ratio) | |
10782 | ||
10783 | Set the ratio item attribute. | |
10784 | """ | |
54f9ee45 | 10785 | return _core_.SizerItem_SetRatio(*args, **kwargs) |
e811c8ce RD |
10786 | |
10787 | def GetRatio(*args, **kwargs): | |
248ed943 RD |
10788 | """ |
10789 | GetRatio(self) -> float | |
10790 | ||
10791 | Set the ratio item attribute. | |
10792 | """ | |
54f9ee45 | 10793 | return _core_.SizerItem_GetRatio(*args, **kwargs) |
e811c8ce | 10794 | |
d3b6e4ff RD |
10795 | def GetRect(*args, **kwargs): |
10796 | """ | |
10797 | GetRect(self) -> Rect | |
10798 | ||
10799 | Returns the rectangle that the sizer item should occupy | |
10800 | """ | |
10801 | return _core_.SizerItem_GetRect(*args, **kwargs) | |
10802 | ||
e811c8ce | 10803 | def IsWindow(*args, **kwargs): |
248ed943 RD |
10804 | """ |
10805 | IsWindow(self) -> bool | |
10806 | ||
10807 | Is this sizer item a window? | |
10808 | """ | |
54f9ee45 | 10809 | return _core_.SizerItem_IsWindow(*args, **kwargs) |
e811c8ce RD |
10810 | |
10811 | def IsSizer(*args, **kwargs): | |
248ed943 RD |
10812 | """ |
10813 | IsSizer(self) -> bool | |
10814 | ||
10815 | Is this sizer item a subsizer? | |
10816 | """ | |
54f9ee45 | 10817 | return _core_.SizerItem_IsSizer(*args, **kwargs) |
e811c8ce RD |
10818 | |
10819 | def IsSpacer(*args, **kwargs): | |
248ed943 RD |
10820 | """ |
10821 | IsSpacer(self) -> bool | |
10822 | ||
10823 | Is this sizer item a spacer? | |
10824 | """ | |
54f9ee45 | 10825 | return _core_.SizerItem_IsSpacer(*args, **kwargs) |
e811c8ce RD |
10826 | |
10827 | def SetProportion(*args, **kwargs): | |
248ed943 RD |
10828 | """ |
10829 | SetProportion(self, int proportion) | |
10830 | ||
10831 | Set the proportion value for this item. | |
10832 | """ | |
54f9ee45 | 10833 | return _core_.SizerItem_SetProportion(*args, **kwargs) |
e811c8ce RD |
10834 | |
10835 | def GetProportion(*args, **kwargs): | |
248ed943 RD |
10836 | """ |
10837 | GetProportion(self) -> int | |
10838 | ||
10839 | Get the proportion value for this item. | |
10840 | """ | |
54f9ee45 | 10841 | return _core_.SizerItem_GetProportion(*args, **kwargs) |
e811c8ce | 10842 | |
248ed943 RD |
10843 | SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.") |
10844 | GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.") | |
e811c8ce | 10845 | def SetFlag(*args, **kwargs): |
248ed943 RD |
10846 | """ |
10847 | SetFlag(self, int flag) | |
10848 | ||
10849 | Set the flag value for this item. | |
10850 | """ | |
54f9ee45 | 10851 | return _core_.SizerItem_SetFlag(*args, **kwargs) |
e811c8ce RD |
10852 | |
10853 | def GetFlag(*args, **kwargs): | |
248ed943 RD |
10854 | """ |
10855 | GetFlag(self) -> int | |
10856 | ||
10857 | Get the flag value for this item. | |
10858 | """ | |
54f9ee45 | 10859 | return _core_.SizerItem_GetFlag(*args, **kwargs) |
e811c8ce RD |
10860 | |
10861 | def SetBorder(*args, **kwargs): | |
248ed943 RD |
10862 | """ |
10863 | SetBorder(self, int border) | |
10864 | ||
10865 | Set the border value for this item. | |
10866 | """ | |
54f9ee45 | 10867 | return _core_.SizerItem_SetBorder(*args, **kwargs) |
e811c8ce RD |
10868 | |
10869 | def GetBorder(*args, **kwargs): | |
248ed943 RD |
10870 | """ |
10871 | GetBorder(self) -> int | |
10872 | ||
10873 | Get the border value for this item. | |
10874 | """ | |
54f9ee45 | 10875 | return _core_.SizerItem_GetBorder(*args, **kwargs) |
e811c8ce RD |
10876 | |
10877 | def GetWindow(*args, **kwargs): | |
248ed943 RD |
10878 | """ |
10879 | GetWindow(self) -> Window | |
10880 | ||
10881 | Get the window (if any) that is managed by this sizer item. | |
10882 | """ | |
54f9ee45 | 10883 | return _core_.SizerItem_GetWindow(*args, **kwargs) |
e811c8ce RD |
10884 | |
10885 | def SetWindow(*args, **kwargs): | |
248ed943 RD |
10886 | """ |
10887 | SetWindow(self, Window window) | |
10888 | ||
10889 | Set the window to be managed by this sizer item. | |
10890 | """ | |
54f9ee45 | 10891 | return _core_.SizerItem_SetWindow(*args, **kwargs) |
e811c8ce RD |
10892 | |
10893 | def GetSizer(*args, **kwargs): | |
248ed943 RD |
10894 | """ |
10895 | GetSizer(self) -> Sizer | |
10896 | ||
10897 | Get the subsizer (if any) that is managed by this sizer item. | |
10898 | """ | |
54f9ee45 | 10899 | return _core_.SizerItem_GetSizer(*args, **kwargs) |
e811c8ce RD |
10900 | |
10901 | def SetSizer(*args, **kwargs): | |
248ed943 RD |
10902 | """ |
10903 | SetSizer(self, Sizer sizer) | |
10904 | ||
10905 | Set the subsizer to be managed by this sizer item. | |
10906 | """ | |
54f9ee45 | 10907 | return _core_.SizerItem_SetSizer(*args, **kwargs) |
e811c8ce RD |
10908 | |
10909 | def GetSpacer(*args, **kwargs): | |
248ed943 RD |
10910 | """ |
10911 | GetSpacer(self) -> Size | |
10912 | ||
10913 | Get the size of the spacer managed by this sizer item. | |
10914 | """ | |
54f9ee45 | 10915 | return _core_.SizerItem_GetSpacer(*args, **kwargs) |
e811c8ce RD |
10916 | |
10917 | def SetSpacer(*args, **kwargs): | |
248ed943 RD |
10918 | """ |
10919 | SetSpacer(self, Size size) | |
10920 | ||
10921 | Set the size of the spacer to be managed by this sizer item. | |
10922 | """ | |
54f9ee45 | 10923 | return _core_.SizerItem_SetSpacer(*args, **kwargs) |
e811c8ce RD |
10924 | |
10925 | def Show(*args, **kwargs): | |
248ed943 RD |
10926 | """ |
10927 | Show(self, bool show) | |
10928 | ||
10929 | Set the show item attribute, which sizers use to determine if the item | |
10930 | is to be made part of the layout or not. If the item is tracking a | |
10931 | window then it is shown or hidden as needed. | |
10932 | """ | |
54f9ee45 | 10933 | return _core_.SizerItem_Show(*args, **kwargs) |
e811c8ce RD |
10934 | |
10935 | def IsShown(*args, **kwargs): | |
248ed943 RD |
10936 | """ |
10937 | IsShown(self) -> bool | |
10938 | ||
10939 | Is the item to be shown in the layout? | |
10940 | """ | |
54f9ee45 | 10941 | return _core_.SizerItem_IsShown(*args, **kwargs) |
e811c8ce RD |
10942 | |
10943 | def GetPosition(*args, **kwargs): | |
248ed943 RD |
10944 | """ |
10945 | GetPosition(self) -> Point | |
10946 | ||
10947 | Returns the current position of the item, as set in the last Layout. | |
10948 | """ | |
54f9ee45 | 10949 | return _core_.SizerItem_GetPosition(*args, **kwargs) |
e811c8ce RD |
10950 | |
10951 | def GetUserData(*args, **kwargs): | |
248ed943 RD |
10952 | """ |
10953 | GetUserData(self) -> PyObject | |
10954 | ||
10955 | Returns the userData associated with this sizer item, or None if there | |
10956 | isn't any. | |
10957 | """ | |
54f9ee45 | 10958 | return _core_.SizerItem_GetUserData(*args, **kwargs) |
e811c8ce | 10959 | |
091f5bed RD |
10960 | def SetUserData(*args, **kwargs): |
10961 | """ | |
10962 | SetUserData(self, PyObject userData) | |
10963 | ||
10964 | Associate a Python object with this sizer item. | |
10965 | """ | |
10966 | return _core_.SizerItem_SetUserData(*args, **kwargs) | |
10967 | ||
0085ce49 RD |
10968 | SizerItem_swigregister = _core_.SizerItem_swigregister |
10969 | SizerItem_swigregister(SizerItem) | |
d14a1e28 | 10970 | |
248ed943 | 10971 | def SizerItemWindow(*args, **kwargs): |
0df68c9f | 10972 | """ |
248ed943 RD |
10973 | SizerItemWindow(Window window, int proportion, int flag, int border, |
10974 | PyObject userData=None) -> SizerItem | |
10975 | ||
10976 | Constructs a `wx.SizerItem` for tracking a window. | |
0df68c9f | 10977 | """ |
248ed943 | 10978 | val = _core_.new_SizerItemWindow(*args, **kwargs) |
d14a1e28 RD |
10979 | return val |
10980 | ||
248ed943 | 10981 | def SizerItemSpacer(*args, **kwargs): |
0df68c9f | 10982 | """ |
248ed943 RD |
10983 | SizerItemSpacer(int width, int height, int proportion, int flag, int border, |
10984 | PyObject userData=None) -> SizerItem | |
10985 | ||
10986 | Constructs a `wx.SizerItem` for tracking a spacer. | |
0df68c9f | 10987 | """ |
248ed943 | 10988 | val = _core_.new_SizerItemSpacer(*args, **kwargs) |
d14a1e28 RD |
10989 | return val |
10990 | ||
10991 | def SizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
10992 | """ |
10993 | SizerItemSizer(Sizer sizer, int proportion, int flag, int border, | |
248ed943 RD |
10994 | PyObject userData=None) -> SizerItem |
10995 | ||
10996 | Constructs a `wx.SizerItem` for tracking a subsizer | |
0df68c9f | 10997 | """ |
54f9ee45 | 10998 | val = _core_.new_SizerItemSizer(*args, **kwargs) |
d14a1e28 RD |
10999 | return val |
11000 | ||
11001 | class Sizer(Object): | |
248ed943 RD |
11002 | """ |
11003 | wx.Sizer is the abstract base class used for laying out subwindows in | |
11004 | a window. You cannot use wx.Sizer directly; instead, you will have to | |
11005 | use one of the sizer classes derived from it such as `wx.BoxSizer`, | |
11006 | `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer` | |
11007 | and `wx.GridBagSizer`. | |
11008 | ||
11009 | The concept implemented by sizers in wxWidgets is closely related to | |
11010 | layout tools in other GUI toolkits, such as Java's AWT, the GTK | |
11011 | toolkit or the Qt toolkit. It is based upon the idea of the individual | |
11012 | subwindows reporting their minimal required size and their ability to | |
11013 | get stretched if the size of the parent window has changed. This will | |
11014 | most often mean that the programmer does not set the original size of | |
11015 | a dialog in the beginning, rather the dialog will assigned a sizer and | |
11016 | this sizer will be queried about the recommended size. The sizer in | |
11017 | turn will query its children, which can be normal windows or contorls, | |
11018 | empty space or other sizers, so that a hierarchy of sizers can be | |
11019 | constructed. Note that wxSizer does not derive from wxWindow and thus | |
11020 | do not interfere with tab ordering and requires very little resources | |
11021 | compared to a real window on screen. | |
11022 | ||
11023 | What makes sizers so well fitted for use in wxWidgets is the fact that | |
11024 | every control reports its own minimal size and the algorithm can | |
11025 | handle differences in font sizes or different window (dialog item) | |
11026 | sizes on different platforms without problems. If for example the | |
11027 | standard font as well as the overall design of Mac widgets requires | |
11028 | more space than on Windows, then the initial size of a dialog using a | |
11029 | sizer will automatically be bigger on Mac than on Windows. | |
11030 | """ | |
0085ce49 RD |
11031 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
11032 | def __init__(self): raise AttributeError, "No constructor defined" | |
11033 | __repr__ = _swig_repr | |
11034 | __swig_destroy__ = _core_.delete_Sizer | |
11035 | __del__ = lambda self : None; | |
e811c8ce | 11036 | def _setOORInfo(*args, **kwargs): |
a95a7133 | 11037 | """_setOORInfo(self, PyObject _self)""" |
54f9ee45 | 11038 | return _core_.Sizer__setOORInfo(*args, **kwargs) |
e811c8ce RD |
11039 | |
11040 | def Add(*args, **kwargs): | |
0df68c9f | 11041 | """ |
248ed943 | 11042 | Add(self, item, int proportion=0, int flag=0, int border=0, |
d3b6e4ff | 11043 | PyObject userData=None) -> wx.SizerItem |
248ed943 RD |
11044 | |
11045 | Appends a child item to the sizer. | |
0df68c9f | 11046 | """ |
54f9ee45 | 11047 | return _core_.Sizer_Add(*args, **kwargs) |
e811c8ce RD |
11048 | |
11049 | def Insert(*args, **kwargs): | |
0df68c9f | 11050 | """ |
248ed943 | 11051 | Insert(self, int before, item, int proportion=0, int flag=0, int border=0, |
d3b6e4ff | 11052 | PyObject userData=None) -> wx.SizerItem |
248ed943 RD |
11053 | |
11054 | Inserts a new item into the list of items managed by this sizer before | |
11055 | the item at index *before*. See `Add` for a description of the parameters. | |
0df68c9f | 11056 | """ |
54f9ee45 | 11057 | return _core_.Sizer_Insert(*args, **kwargs) |
e811c8ce RD |
11058 | |
11059 | def Prepend(*args, **kwargs): | |
0df68c9f | 11060 | """ |
248ed943 | 11061 | Prepend(self, item, int proportion=0, int flag=0, int border=0, |
d3b6e4ff | 11062 | PyObject userData=None) -> wx.SizerItem |
248ed943 RD |
11063 | |
11064 | Adds a new item to the begining of the list of sizer items managed by | |
11065 | this sizer. See `Add` for a description of the parameters. | |
0df68c9f | 11066 | """ |
54f9ee45 | 11067 | return _core_.Sizer_Prepend(*args, **kwargs) |
e811c8ce RD |
11068 | |
11069 | def Remove(*args, **kwargs): | |
248ed943 RD |
11070 | """ |
11071 | Remove(self, item) -> bool | |
11072 | ||
11073 | Removes an item from the sizer and destroys it. This method does not | |
11074 | cause any layout or resizing to take place, call `Layout` to update | |
11075 | the layout on screen after removing a child from the sizer. The | |
11076 | *item* parameter can be either a window, a sizer, or the zero-based | |
11077 | index of an item to remove. Returns True if the child item was found | |
11078 | and removed. | |
11079 | """ | |
54f9ee45 | 11080 | return _core_.Sizer_Remove(*args, **kwargs) |
e811c8ce | 11081 | |
1c0f361b | 11082 | def Detach(*args, **kwargs): |
248ed943 RD |
11083 | """ |
11084 | Detach(self, item) -> bool | |
11085 | ||
11086 | Detaches an item from the sizer without destroying it. This method | |
11087 | does not cause any layout or resizing to take place, call `Layout` to | |
11088 | do so. The *item* parameter can be either a window, a sizer, or the | |
11089 | zero-based index of the item to be detached. Returns True if the child item | |
11090 | was found and detached. | |
11091 | """ | |
1c0f361b RD |
11092 | return _core_.Sizer_Detach(*args, **kwargs) |
11093 | ||
d3b6e4ff RD |
11094 | def GetItem(*args, **kwargs): |
11095 | """ | |
11096 | GetItem(self, item) -> wx.SizerItem | |
11097 | ||
11098 | Returns the `wx.SizerItem` which holds the *item* given. The *item* | |
11099 | parameter can be either a window, a sizer, or the zero-based index of | |
4d170c95 | 11100 | the item to be found. |
d3b6e4ff RD |
11101 | """ |
11102 | return _core_.Sizer_GetItem(*args, **kwargs) | |
11103 | ||
e811c8ce | 11104 | def _SetItemMinSize(*args, **kwargs): |
a95a7133 | 11105 | """_SetItemMinSize(self, PyObject item, Size size)""" |
54f9ee45 | 11106 | return _core_.Sizer__SetItemMinSize(*args, **kwargs) |
e811c8ce | 11107 | |
248ed943 RD |
11108 | def SetItemMinSize(self, item, *args): |
11109 | """ | |
11110 | SetItemMinSize(self, item, Size size) | |
11111 | ||
11112 | Sets the minimum size that will be allocated for an item in the sizer. | |
11113 | The *item* parameter can be either a window, a sizer, or the | |
11114 | zero-based index of the item. If a window or sizer is given then it | |
11115 | will be searched for recursivly in subsizers if neccessary. | |
11116 | """ | |
11117 | if len(args) == 2: | |
11118 | # for backward compatibility accept separate width,height args too | |
11119 | return self._SetItemMinSize(item, args) | |
11120 | else: | |
11121 | return self._SetItemMinSize(item, args[0]) | |
11122 | ||
e811c8ce | 11123 | def AddItem(*args, **kwargs): |
248ed943 RD |
11124 | """ |
11125 | AddItem(self, SizerItem item) | |
11126 | ||
11127 | Adds a `wx.SizerItem` to the sizer. | |
11128 | """ | |
54f9ee45 | 11129 | return _core_.Sizer_AddItem(*args, **kwargs) |
e811c8ce RD |
11130 | |
11131 | def InsertItem(*args, **kwargs): | |
248ed943 RD |
11132 | """ |
11133 | InsertItem(self, int index, SizerItem item) | |
11134 | ||
11135 | Inserts a `wx.SizerItem` to the sizer at the position given by *index*. | |
11136 | """ | |
54f9ee45 | 11137 | return _core_.Sizer_InsertItem(*args, **kwargs) |
e811c8ce RD |
11138 | |
11139 | def PrependItem(*args, **kwargs): | |
248ed943 RD |
11140 | """ |
11141 | PrependItem(self, SizerItem item) | |
11142 | ||
11143 | Prepends a `wx.SizerItem` to the sizer. | |
11144 | """ | |
54f9ee45 | 11145 | return _core_.Sizer_PrependItem(*args, **kwargs) |
e811c8ce | 11146 | |
248ed943 | 11147 | def AddMany(self, items): |
66c033b4 RD |
11148 | """ |
11149 | AddMany is a convenience method for adding several items | |
11150 | to a sizer at one time. Simply pass it a list of tuples, | |
11151 | where each tuple consists of the parameters that you | |
11152 | would normally pass to the `Add` method. | |
11153 | """ | |
248ed943 RD |
11154 | for item in items: |
11155 | if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)): | |
11156 | item = (item, ) | |
11157 | self.Add(*item) | |
d14a1e28 | 11158 | |
74e96f3d | 11159 | # for backwards compatibility only, please do not use in new code |
b9d6a5f3 RD |
11160 | def AddWindow(self, *args, **kw): |
11161 | """Compatibility alias for `Add`.""" | |
11162 | return self.Add(*args, **kw) | |
11163 | def AddSizer(self, *args, **kw): | |
11164 | """Compatibility alias for `Add`.""" | |
11165 | return self.Add(*args, **kw) | |
11166 | def AddSpacer(self, *args, **kw): | |
11167 | """Compatibility alias for `Add`.""" | |
11168 | return self.Add(*args, **kw) | |
11169 | ||
11170 | def PrependWindow(self, *args, **kw): | |
11171 | """Compatibility alias for `Prepend`.""" | |
11172 | return self.Prepend(*args, **kw) | |
11173 | def PrependSizer(self, *args, **kw): | |
11174 | """Compatibility alias for `Prepend`.""" | |
11175 | return self.Prepend(*args, **kw) | |
11176 | def PrependSpacer(self, *args, **kw): | |
11177 | """Compatibility alias for `Prepend`.""" | |
11178 | return self.Prepend(*args, **kw) | |
11179 | ||
11180 | def InsertWindow(self, *args, **kw): | |
11181 | """Compatibility alias for `Insert`.""" | |
11182 | return self.Insert(*args, **kw) | |
11183 | def InsertSizer(self, *args, **kw): | |
11184 | """Compatibility alias for `Insert`.""" | |
11185 | return self.Insert(*args, **kw) | |
11186 | def InsertSpacer(self, *args, **kw): | |
11187 | """Compatibility alias for `Insert`.""" | |
11188 | return self.Insert(*args, **kw) | |
11189 | ||
11190 | def RemoveWindow(self, *args, **kw): | |
11191 | """Compatibility alias for `Remove`.""" | |
11192 | return self.Remove(*args, **kw) | |
11193 | def RemoveSizer(self, *args, **kw): | |
11194 | """Compatibility alias for `Remove`.""" | |
11195 | return self.Remove(*args, **kw) | |
11196 | def RemovePos(self, *args, **kw): | |
11197 | """Compatibility alias for `Remove`.""" | |
11198 | return self.Remove(*args, **kw) | |
d14a1e28 RD |
11199 | |
11200 | ||
e811c8ce | 11201 | def SetDimension(*args, **kwargs): |
248ed943 RD |
11202 | """ |
11203 | SetDimension(self, int x, int y, int width, int height) | |
11204 | ||
11205 | Call this to force the sizer to take the given dimension and thus | |
11206 | force the items owned by the sizer to resize themselves according to | |
11207 | the rules defined by the parameter in the `Add`, `Insert` or `Prepend` | |
11208 | methods. | |
11209 | """ | |
54f9ee45 | 11210 | return _core_.Sizer_SetDimension(*args, **kwargs) |
e811c8ce RD |
11211 | |
11212 | def SetMinSize(*args, **kwargs): | |
248ed943 RD |
11213 | """ |
11214 | SetMinSize(self, Size size) | |
11215 | ||
11216 | Call this to give the sizer a minimal size. Normally, the sizer will | |
11217 | calculate its minimal size based purely on how much space its children | |
11218 | need. After calling this method `GetMinSize` will return either the | |
11219 | minimal size as requested by its children or the minimal size set | |
11220 | here, depending on which is bigger. | |
11221 | """ | |
54f9ee45 | 11222 | return _core_.Sizer_SetMinSize(*args, **kwargs) |
e811c8ce RD |
11223 | |
11224 | def GetSize(*args, **kwargs): | |
248ed943 RD |
11225 | """ |
11226 | GetSize(self) -> Size | |
11227 | ||
11228 | Returns the current size of the space managed by the sizer. | |
11229 | """ | |
54f9ee45 | 11230 | return _core_.Sizer_GetSize(*args, **kwargs) |
e811c8ce RD |
11231 | |
11232 | def GetPosition(*args, **kwargs): | |
248ed943 RD |
11233 | """ |
11234 | GetPosition(self) -> Point | |
11235 | ||
11236 | Returns the current position of the sizer's managed space. | |
11237 | """ | |
54f9ee45 | 11238 | return _core_.Sizer_GetPosition(*args, **kwargs) |
e811c8ce RD |
11239 | |
11240 | def GetMinSize(*args, **kwargs): | |
248ed943 RD |
11241 | """ |
11242 | GetMinSize(self) -> Size | |
11243 | ||
11244 | Returns the minimal size of the sizer. This is either the combined | |
11245 | minimal size of all the children and their borders or the minimal size | |
11246 | set by SetMinSize, depending on which is bigger. | |
11247 | """ | |
54f9ee45 | 11248 | return _core_.Sizer_GetMinSize(*args, **kwargs) |
e811c8ce | 11249 | |
d14a1e28 | 11250 | def GetSizeTuple(self): |
1c0f361b | 11251 | return self.GetSize().Get() |
d14a1e28 | 11252 | def GetPositionTuple(self): |
1c0f361b | 11253 | return self.GetPosition().Get() |
d14a1e28 | 11254 | def GetMinSizeTuple(self): |
1c0f361b | 11255 | return self.GetMinSize().Get() |
d14a1e28 | 11256 | |
e811c8ce | 11257 | def RecalcSizes(*args, **kwargs): |
248ed943 RD |
11258 | """ |
11259 | RecalcSizes(self) | |
11260 | ||
11261 | Using the sizes calculated by `CalcMin` reposition and resize all the | |
11262 | items managed by this sizer. You should not need to call this directly as | |
11263 | it is called by `Layout`. | |
11264 | """ | |
54f9ee45 | 11265 | return _core_.Sizer_RecalcSizes(*args, **kwargs) |
e811c8ce RD |
11266 | |
11267 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
11268 | """ |
11269 | CalcMin(self) -> Size | |
11270 | ||
11271 | This method is where the sizer will do the actual calculation of its | |
11272 | children's minimal sizes. You should not need to call this directly as | |
11273 | it is called by `Layout`. | |
11274 | """ | |
54f9ee45 | 11275 | return _core_.Sizer_CalcMin(*args, **kwargs) |
e811c8ce RD |
11276 | |
11277 | def Layout(*args, **kwargs): | |
248ed943 RD |
11278 | """ |
11279 | Layout(self) | |
11280 | ||
11281 | This method will force the recalculation and layout of the items | |
11282 | controlled by the sizer using the current space allocated to the | |
11283 | sizer. Normally this is called automatically from the owning window's | |
11284 | EVT_SIZE handler, but it is also useful to call it from user code when | |
11285 | one of the items in a sizer change size, or items are added or | |
11286 | removed. | |
11287 | """ | |
54f9ee45 | 11288 | return _core_.Sizer_Layout(*args, **kwargs) |
e811c8ce RD |
11289 | |
11290 | def Fit(*args, **kwargs): | |
248ed943 RD |
11291 | """ |
11292 | Fit(self, Window window) -> Size | |
11293 | ||
11294 | Tell the sizer to resize the *window* to match the sizer's minimal | |
11295 | size. This is commonly done in the constructor of the window itself in | |
11296 | order to set its initial size to match the needs of the children as | |
11297 | determined by the sizer. Returns the new size. | |
11298 | ||
11299 | For a top level window this is the total window size, not the client size. | |
11300 | """ | |
54f9ee45 | 11301 | return _core_.Sizer_Fit(*args, **kwargs) |
e811c8ce RD |
11302 | |
11303 | def FitInside(*args, **kwargs): | |
248ed943 RD |
11304 | """ |
11305 | FitInside(self, Window window) | |
11306 | ||
11307 | Tell the sizer to resize the *virtual size* of the *window* to match the | |
11308 | sizer's minimal size. This will not alter the on screen size of the | |
11309 | window, but may cause the addition/removal/alteration of scrollbars | |
11310 | required to view the virtual area in windows which manage it. | |
11311 | ||
11312 | :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints` | |
11313 | ||
11314 | """ | |
54f9ee45 | 11315 | return _core_.Sizer_FitInside(*args, **kwargs) |
e811c8ce RD |
11316 | |
11317 | def SetSizeHints(*args, **kwargs): | |
248ed943 RD |
11318 | """ |
11319 | SetSizeHints(self, Window window) | |
11320 | ||
11321 | Tell the sizer to set (and `Fit`) the minimal size of the *window* to | |
11322 | match the sizer's minimal size. This is commonly done in the | |
11323 | constructor of the window itself if the window is resizable (as are | |
11324 | many dialogs under Unix and frames on probably all platforms) in order | |
11325 | to prevent the window from being sized smaller than the minimal size | |
11326 | required by the sizer. | |
11327 | """ | |
54f9ee45 | 11328 | return _core_.Sizer_SetSizeHints(*args, **kwargs) |
e811c8ce RD |
11329 | |
11330 | def SetVirtualSizeHints(*args, **kwargs): | |
248ed943 RD |
11331 | """ |
11332 | SetVirtualSizeHints(self, Window window) | |
11333 | ||
11334 | Tell the sizer to set the minimal size of the window virtual area to | |
11335 | match the sizer's minimal size. For windows with managed scrollbars | |
11336 | this will set them appropriately. | |
11337 | ||
11338 | :see: `wx.ScrolledWindow.SetScrollbars` | |
11339 | ||
11340 | """ | |
54f9ee45 | 11341 | return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs) |
e811c8ce RD |
11342 | |
11343 | def Clear(*args, **kwargs): | |
248ed943 RD |
11344 | """ |
11345 | Clear(self, bool deleteWindows=False) | |
11346 | ||
11347 | Clear all items from the sizer, optionally destroying the window items | |
11348 | as well. | |
11349 | """ | |
54f9ee45 | 11350 | return _core_.Sizer_Clear(*args, **kwargs) |
e811c8ce RD |
11351 | |
11352 | def DeleteWindows(*args, **kwargs): | |
248ed943 RD |
11353 | """ |
11354 | DeleteWindows(self) | |
11355 | ||
11356 | Destroy all windows managed by the sizer. | |
11357 | """ | |
54f9ee45 | 11358 | return _core_.Sizer_DeleteWindows(*args, **kwargs) |
e811c8ce RD |
11359 | |
11360 | def GetChildren(*args, **kwargs): | |
248ed943 | 11361 | """ |
51b83b37 | 11362 | GetChildren(self) -> list |
248ed943 RD |
11363 | |
11364 | Returns a list of all the `wx.SizerItem` objects managed by the sizer. | |
11365 | """ | |
54f9ee45 | 11366 | return _core_.Sizer_GetChildren(*args, **kwargs) |
e811c8ce RD |
11367 | |
11368 | def Show(*args, **kwargs): | |
248ed943 | 11369 | """ |
ae8162c8 | 11370 | Show(self, item, bool show=True, bool recursive=false) -> bool |
e811c8ce | 11371 | |
248ed943 RD |
11372 | Shows or hides an item managed by the sizer. To make a sizer item |
11373 | disappear or reappear, use Show followed by `Layout`. The *item* | |
11374 | parameter can be either a window, a sizer, or the zero-based index of | |
7e63a440 RD |
11375 | the item. Use the recursive parameter to show or hide an item in a |
11376 | subsizer. Returns True if the item was found. | |
248ed943 RD |
11377 | """ |
11378 | return _core_.Sizer_Show(*args, **kwargs) | |
e811c8ce RD |
11379 | |
11380 | def IsShown(*args, **kwargs): | |
248ed943 RD |
11381 | """ |
11382 | IsShown(self, item) | |
11383 | ||
b1fcee84 | 11384 | Determines if the item is currently shown. To make a sizer |
248ed943 RD |
11385 | item disappear or reappear, use Show followed by `Layout`. The *item* |
11386 | parameter can be either a window, a sizer, or the zero-based index of | |
11387 | the item. | |
11388 | """ | |
54f9ee45 | 11389 | return _core_.Sizer_IsShown(*args, **kwargs) |
e811c8ce | 11390 | |
7e63a440 | 11391 | def Hide(self, item, recursive=False): |
248ed943 | 11392 | """ |
27fb7603 | 11393 | A convenience method for `Show` (item, False, recursive). |
248ed943 | 11394 | """ |
06759a38 | 11395 | return self.Show(item, False, recursive) |
248ed943 | 11396 | |
e811c8ce | 11397 | def ShowItems(*args, **kwargs): |
248ed943 RD |
11398 | """ |
11399 | ShowItems(self, bool show) | |
11400 | ||
84f85550 | 11401 | Recursively call `wx.SizerItem.Show` on all sizer items. |
248ed943 | 11402 | """ |
54f9ee45 | 11403 | return _core_.Sizer_ShowItems(*args, **kwargs) |
e811c8ce | 11404 | |
0085ce49 RD |
11405 | Sizer_swigregister = _core_.Sizer_swigregister |
11406 | Sizer_swigregister(Sizer) | |
d14a1e28 RD |
11407 | |
11408 | class PySizer(Sizer): | |
248ed943 RD |
11409 | """ |
11410 | wx.PySizer is a special version of `wx.Sizer` that has been | |
11411 | instrumented to allow the C++ virtual methods to be overloaded in | |
11412 | Python derived classes. You would derive from this class if you are | |
11413 | wanting to implement a custom sizer in Python code. Simply implement | |
11414 | `CalcMin` and `RecalcSizes` in the derived class and you're all set. | |
11415 | For example:: | |
11416 | ||
11417 | class MySizer(wx.PySizer): | |
11418 | def __init__(self): | |
11419 | wx.PySizer.__init__(self) | |
11420 | ||
11421 | def CalcMin(self): | |
11422 | for item in self.GetChildren(): | |
11423 | # calculate the total minimum width and height needed | |
11424 | # by all items in the sizer according to this sizer's | |
11425 | # layout algorithm. | |
11426 | ... | |
11427 | return wx.Size(width, height) | |
11428 | ||
11429 | def RecalcSizes(self): | |
11430 | # find the space allotted to this sizer | |
11431 | pos = self.GetPosition() | |
11432 | size = self.GetSize() | |
11433 | for item in self.GetChildren(): | |
11434 | # Recalculate (if necessary) the position and size of | |
11435 | # each item and then call item.SetDimension to do the | |
11436 | # actual positioning and sizing of the items within the | |
11437 | # space alloted to this sizer. | |
11438 | ... | |
11439 | item.SetDimension(itemPos, itemSize) | |
11440 | ||
11441 | ||
11442 | When `Layout` is called it first calls `CalcMin` followed by | |
11443 | `RecalcSizes` so you can optimize a bit by saving the results of | |
e505d15e | 11444 | `CalcMin` and reusing them in `RecalcSizes`. |
248ed943 RD |
11445 | |
11446 | :see: `wx.SizerItem`, `wx.Sizer.GetChildren` | |
11447 | ||
11448 | ||
11449 | """ | |
0085ce49 RD |
11450 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
11451 | __repr__ = _swig_repr | |
11452 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
11453 | """ |
11454 | __init__(self) -> PySizer | |
11455 | ||
11456 | Creates a wx.PySizer. Must be called from the __init__ in the derived | |
11457 | class. | |
11458 | """ | |
0085ce49 | 11459 | _core_.PySizer_swiginit(self,_core_.new_PySizer(*args, **kwargs)) |
d14a1e28 | 11460 | self._setCallbackInfo(self, PySizer);self._setOORInfo(self) |
e811c8ce RD |
11461 | |
11462 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 11463 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 11464 | return _core_.PySizer__setCallbackInfo(*args, **kwargs) |
e811c8ce | 11465 | |
0085ce49 RD |
11466 | PySizer_swigregister = _core_.PySizer_swigregister |
11467 | PySizer_swigregister(PySizer) | |
d14a1e28 RD |
11468 | |
11469 | #--------------------------------------------------------------------------- | |
11470 | ||
11471 | class BoxSizer(Sizer): | |
248ed943 RD |
11472 | """ |
11473 | The basic idea behind a box sizer is that windows will most often be | |
11474 | laid out in rather simple basic geometry, typically in a row or a | |
11475 | column or nested hierarchies of either. A wx.BoxSizer will lay out | |
11476 | its items in a simple row or column, depending on the orientation | |
11477 | parameter passed to the constructor. | |
11478 | """ | |
0085ce49 RD |
11479 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
11480 | __repr__ = _swig_repr | |
11481 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
11482 | """ |
11483 | __init__(self, int orient=HORIZONTAL) -> BoxSizer | |
11484 | ||
11485 | Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL`` | |
11486 | or ``wx.HORIZONTAL`` for creating either a column sizer or a row | |
11487 | sizer. | |
11488 | """ | |
0085ce49 | 11489 | _core_.BoxSizer_swiginit(self,_core_.new_BoxSizer(*args, **kwargs)) |
d14a1e28 | 11490 | self._setOORInfo(self) |
e811c8ce RD |
11491 | |
11492 | def GetOrientation(*args, **kwargs): | |
248ed943 RD |
11493 | """ |
11494 | GetOrientation(self) -> int | |
11495 | ||
11496 | Returns the current orientation of the sizer. | |
11497 | """ | |
54f9ee45 | 11498 | return _core_.BoxSizer_GetOrientation(*args, **kwargs) |
e811c8ce RD |
11499 | |
11500 | def SetOrientation(*args, **kwargs): | |
248ed943 RD |
11501 | """ |
11502 | SetOrientation(self, int orient) | |
e811c8ce | 11503 | |
248ed943 RD |
11504 | Resets the orientation of the sizer. |
11505 | """ | |
11506 | return _core_.BoxSizer_SetOrientation(*args, **kwargs) | |
e811c8ce | 11507 | |
0085ce49 RD |
11508 | BoxSizer_swigregister = _core_.BoxSizer_swigregister |
11509 | BoxSizer_swigregister(BoxSizer) | |
d14a1e28 RD |
11510 | |
11511 | #--------------------------------------------------------------------------- | |
11512 | ||
11513 | class StaticBoxSizer(BoxSizer): | |
248ed943 RD |
11514 | """ |
11515 | wx.StaticBoxSizer derives from and functions identically to the | |
11516 | `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer | |
11517 | manages. Note that this static box must be created separately and | |
11518 | passed to the sizer constructor. | |
11519 | """ | |
0085ce49 RD |
11520 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
11521 | __repr__ = _swig_repr | |
11522 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
11523 | """ |
11524 | __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer | |
11525 | ||
11526 | Constructor. It takes an associated static box and the orientation | |
11527 | *orient* as parameters - orient can be either of ``wx.VERTICAL`` or | |
11528 | ``wx.HORIZONTAL``. | |
11529 | """ | |
0085ce49 | 11530 | _core_.StaticBoxSizer_swiginit(self,_core_.new_StaticBoxSizer(*args, **kwargs)) |
d14a1e28 | 11531 | self._setOORInfo(self) |
e811c8ce RD |
11532 | |
11533 | def GetStaticBox(*args, **kwargs): | |
248ed943 RD |
11534 | """ |
11535 | GetStaticBox(self) -> StaticBox | |
e811c8ce | 11536 | |
248ed943 RD |
11537 | Returns the static box associated with this sizer. |
11538 | """ | |
11539 | return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs) | |
e811c8ce | 11540 | |
0085ce49 RD |
11541 | StaticBoxSizer_swigregister = _core_.StaticBoxSizer_swigregister |
11542 | StaticBoxSizer_swigregister(StaticBoxSizer) | |
d14a1e28 RD |
11543 | |
11544 | #--------------------------------------------------------------------------- | |
11545 | ||
11546 | class GridSizer(Sizer): | |
248ed943 RD |
11547 | """ |
11548 | A grid sizer is a sizer which lays out its children in a | |
11549 | two-dimensional table with all cells having the same size. In other | |
11550 | words, the width of each cell within the grid is the width of the | |
11551 | widest item added to the sizer and the height of each grid cell is the | |
11552 | height of the tallest item. An optional vertical and/or horizontal | |
11553 | gap between items can also be specified (in pixels.) | |
11554 | ||
11555 | Items are placed in the cells of the grid in the order they are added, | |
11556 | in row-major order. In other words, the first row is filled first, | |
11557 | then the second, and so on until all items have been added. (If | |
11558 | neccessary, additional rows will be added as items are added.) If you | |
11559 | need to have greater control over the cells that items are placed in | |
11560 | then use the `wx.GridBagSizer`. | |
11561 | ||
11562 | """ | |
0085ce49 RD |
11563 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
11564 | __repr__ = _swig_repr | |
11565 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
11566 | """ |
11567 | __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer | |
11568 | ||
11569 | Constructor for a wx.GridSizer. *rows* and *cols* determine the number | |
11570 | of columns and rows in the sizer - if either of the parameters is | |
11571 | zero, it will be calculated to from the total number of children in | |
11572 | the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* | |
11573 | define extra space between all children. | |
11574 | """ | |
0085ce49 | 11575 | _core_.GridSizer_swiginit(self,_core_.new_GridSizer(*args, **kwargs)) |
d14a1e28 | 11576 | self._setOORInfo(self) |
e811c8ce | 11577 | |
e811c8ce | 11578 | def SetCols(*args, **kwargs): |
248ed943 RD |
11579 | """ |
11580 | SetCols(self, int cols) | |
11581 | ||
11582 | Sets the number of columns in the sizer. | |
11583 | """ | |
54f9ee45 | 11584 | return _core_.GridSizer_SetCols(*args, **kwargs) |
e811c8ce RD |
11585 | |
11586 | def SetRows(*args, **kwargs): | |
248ed943 RD |
11587 | """ |
11588 | SetRows(self, int rows) | |
11589 | ||
11590 | Sets the number of rows in the sizer. | |
11591 | """ | |
54f9ee45 | 11592 | return _core_.GridSizer_SetRows(*args, **kwargs) |
e811c8ce RD |
11593 | |
11594 | def SetVGap(*args, **kwargs): | |
248ed943 RD |
11595 | """ |
11596 | SetVGap(self, int gap) | |
11597 | ||
11598 | Sets the vertical gap (in pixels) between the cells in the sizer. | |
11599 | """ | |
54f9ee45 | 11600 | return _core_.GridSizer_SetVGap(*args, **kwargs) |
e811c8ce RD |
11601 | |
11602 | def SetHGap(*args, **kwargs): | |
248ed943 RD |
11603 | """ |
11604 | SetHGap(self, int gap) | |
11605 | ||
11606 | Sets the horizontal gap (in pixels) between cells in the sizer | |
11607 | """ | |
54f9ee45 | 11608 | return _core_.GridSizer_SetHGap(*args, **kwargs) |
e811c8ce RD |
11609 | |
11610 | def GetCols(*args, **kwargs): | |
248ed943 RD |
11611 | """ |
11612 | GetCols(self) -> int | |
11613 | ||
11614 | Returns the number of columns in the sizer. | |
11615 | """ | |
54f9ee45 | 11616 | return _core_.GridSizer_GetCols(*args, **kwargs) |
e811c8ce RD |
11617 | |
11618 | def GetRows(*args, **kwargs): | |
248ed943 RD |
11619 | """ |
11620 | GetRows(self) -> int | |
11621 | ||
11622 | Returns the number of rows in the sizer. | |
11623 | """ | |
54f9ee45 | 11624 | return _core_.GridSizer_GetRows(*args, **kwargs) |
e811c8ce RD |
11625 | |
11626 | def GetVGap(*args, **kwargs): | |
248ed943 RD |
11627 | """ |
11628 | GetVGap(self) -> int | |
11629 | ||
11630 | Returns the vertical gap (in pixels) between the cells in the sizer. | |
11631 | """ | |
54f9ee45 | 11632 | return _core_.GridSizer_GetVGap(*args, **kwargs) |
e811c8ce RD |
11633 | |
11634 | def GetHGap(*args, **kwargs): | |
248ed943 RD |
11635 | """ |
11636 | GetHGap(self) -> int | |
11637 | ||
11638 | Returns the horizontal gap (in pixels) between cells in the sizer. | |
11639 | """ | |
54f9ee45 | 11640 | return _core_.GridSizer_GetHGap(*args, **kwargs) |
e811c8ce | 11641 | |
0085ce49 RD |
11642 | def CalcRowsCols(self): |
11643 | """ | |
11644 | CalcRowsCols() -> (rows, cols) | |
11645 | ||
11646 | Calculates how many rows and columns will be in the sizer based | |
11647 | on the current number of items and also the rows, cols specified | |
11648 | in the constructor. | |
11649 | """ | |
11650 | nitems = len(self.GetChildren()) | |
11651 | rows = self.GetRows() | |
11652 | cols = self.GetCols() | |
11653 | assert rows != 0 or cols != 0, "Grid sizer must have either rows or columns fixed" | |
11654 | if cols != 0: | |
11655 | rows = (nitems + cols - 1) / cols | |
11656 | elif rows != 0: | |
11657 | cols = (nitems + rows - 1) / rows | |
11658 | return (rows, cols) | |
d14a1e28 | 11659 | |
0085ce49 RD |
11660 | GridSizer_swigregister = _core_.GridSizer_swigregister |
11661 | GridSizer_swigregister(GridSizer) | |
d14a1e28 RD |
11662 | |
11663 | #--------------------------------------------------------------------------- | |
11664 | ||
54f9ee45 RD |
11665 | FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE |
11666 | FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED | |
11667 | FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL | |
d14a1e28 | 11668 | class FlexGridSizer(GridSizer): |
248ed943 RD |
11669 | """ |
11670 | A flex grid sizer is a sizer which lays out its children in a | |
11671 | two-dimensional table with all table cells in one row having the same | |
11672 | height and all cells in one column having the same width, but all | |
11673 | rows or all columns are not necessarily the same height or width as in | |
11674 | the `wx.GridSizer`. | |
11675 | ||
11676 | wx.FlexGridSizer can also size items equally in one direction but | |
11677 | unequally ("flexibly") in the other. If the sizer is only flexible | |
11678 | in one direction (this can be changed using `SetFlexibleDirection`), it | |
11679 | needs to be decided how the sizer should grow in the other ("non | |
11680 | flexible") direction in order to fill the available space. The | |
11681 | `SetNonFlexibleGrowMode` method serves this purpose. | |
11682 | ||
11683 | ||
11684 | """ | |
0085ce49 RD |
11685 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
11686 | __repr__ = _swig_repr | |
11687 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
11688 | """ |
11689 | __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer | |
11690 | ||
11691 | Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the | |
11692 | number of columns and rows in the sizer - if either of the parameters | |
11693 | is zero, it will be calculated to from the total number of children in | |
11694 | the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* | |
11695 | define extra space between all children. | |
11696 | """ | |
0085ce49 | 11697 | _core_.FlexGridSizer_swiginit(self,_core_.new_FlexGridSizer(*args, **kwargs)) |
d14a1e28 | 11698 | self._setOORInfo(self) |
e811c8ce | 11699 | |
248ed943 RD |
11700 | def AddGrowableRow(*args, **kwargs): |
11701 | """ | |
11702 | AddGrowableRow(self, size_t idx, int proportion=0) | |
e811c8ce | 11703 | |
248ed943 RD |
11704 | Specifies that row *idx* (starting from zero) should be grown if there |
11705 | is extra space available to the sizer. | |
e811c8ce | 11706 | |
248ed943 RD |
11707 | The *proportion* parameter has the same meaning as the stretch factor |
11708 | for the box sizers except that if all proportions are 0, then all | |
11709 | columns are resized equally (instead of not being resized at all). | |
11710 | """ | |
54f9ee45 | 11711 | return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs) |
e811c8ce RD |
11712 | |
11713 | def RemoveGrowableRow(*args, **kwargs): | |
248ed943 RD |
11714 | """ |
11715 | RemoveGrowableRow(self, size_t idx) | |
11716 | ||
11717 | Specifies that row *idx* is no longer growable. | |
11718 | """ | |
54f9ee45 | 11719 | return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) |
e811c8ce RD |
11720 | |
11721 | def AddGrowableCol(*args, **kwargs): | |
248ed943 RD |
11722 | """ |
11723 | AddGrowableCol(self, size_t idx, int proportion=0) | |
11724 | ||
11725 | Specifies that column *idx* (starting from zero) should be grown if | |
11726 | there is extra space available to the sizer. | |
11727 | ||
11728 | The *proportion* parameter has the same meaning as the stretch factor | |
11729 | for the box sizers except that if all proportions are 0, then all | |
11730 | columns are resized equally (instead of not being resized at all). | |
11731 | """ | |
54f9ee45 | 11732 | return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs) |
e811c8ce RD |
11733 | |
11734 | def RemoveGrowableCol(*args, **kwargs): | |
248ed943 RD |
11735 | """ |
11736 | RemoveGrowableCol(self, size_t idx) | |
11737 | ||
11738 | Specifies that column *idx* is no longer growable. | |
11739 | """ | |
54f9ee45 | 11740 | return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) |
e811c8ce RD |
11741 | |
11742 | def SetFlexibleDirection(*args, **kwargs): | |
248ed943 RD |
11743 | """ |
11744 | SetFlexibleDirection(self, int direction) | |
11745 | ||
11746 | Specifies whether the sizer should flexibly resize its columns, rows, | |
11747 | or both. Argument *direction* can be one of the following values. Any | |
11748 | other value is ignored. | |
11749 | ||
11750 | ============== ======================================= | |
11751 | wx.VERTICAL Rows are flexibly sized. | |
11752 | wx.HORIZONTAL Columns are flexibly sized. | |
11753 | wx.BOTH Both rows and columns are flexibly sized | |
11754 | (this is the default value). | |
11755 | ============== ======================================= | |
11756 | ||
11757 | Note that this method does not trigger relayout. | |
11758 | ||
11759 | """ | |
54f9ee45 | 11760 | return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) |
e811c8ce RD |
11761 | |
11762 | def GetFlexibleDirection(*args, **kwargs): | |
248ed943 RD |
11763 | """ |
11764 | GetFlexibleDirection(self) -> int | |
11765 | ||
11766 | Returns a value that specifies whether the sizer | |
11767 | flexibly resizes its columns, rows, or both (default). | |
11768 | ||
11769 | :see: `SetFlexibleDirection` | |
11770 | """ | |
54f9ee45 | 11771 | return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) |
e811c8ce RD |
11772 | |
11773 | def SetNonFlexibleGrowMode(*args, **kwargs): | |
248ed943 RD |
11774 | """ |
11775 | SetNonFlexibleGrowMode(self, int mode) | |
11776 | ||
11777 | Specifies how the sizer should grow in the non-flexible direction if | |
11778 | there is one (so `SetFlexibleDirection` must have been called | |
11779 | previously). Argument *mode* can be one of the following values: | |
11780 | ||
11781 | ========================== ================================================= | |
11782 | wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction. | |
11783 | wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with | |
11784 | `AddGrowableCol` and `AddGrowableRow`. In this | |
11785 | case equal sizing applies to minimum sizes of | |
11786 | columns or rows (this is the default value). | |
11787 | wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in | |
11788 | the non flexible direction, whether they are | |
11789 | growable or not in the flexbile direction. | |
11790 | ========================== ================================================= | |
11791 | ||
11792 | Note that this method does not trigger relayout. | |
11793 | ||
11794 | ||
11795 | """ | |
54f9ee45 | 11796 | return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) |
e811c8ce RD |
11797 | |
11798 | def GetNonFlexibleGrowMode(*args, **kwargs): | |
248ed943 RD |
11799 | """ |
11800 | GetNonFlexibleGrowMode(self) -> int | |
11801 | ||
11802 | Returns the value that specifies how the sizer grows in the | |
11803 | non-flexible direction if there is one. | |
11804 | ||
11805 | :see: `SetNonFlexibleGrowMode` | |
11806 | """ | |
54f9ee45 | 11807 | return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) |
e811c8ce RD |
11808 | |
11809 | def GetRowHeights(*args, **kwargs): | |
fd2dc343 RD |
11810 | """ |
11811 | GetRowHeights(self) -> list | |
11812 | ||
11813 | Returns a list of integers representing the heights of each of the | |
11814 | rows in the sizer. | |
11815 | """ | |
54f9ee45 | 11816 | return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs) |
e811c8ce RD |
11817 | |
11818 | def GetColWidths(*args, **kwargs): | |
fd2dc343 RD |
11819 | """ |
11820 | GetColWidths(self) -> list | |
11821 | ||
11822 | Returns a list of integers representing the widths of each of the | |
11823 | columns in the sizer. | |
11824 | """ | |
54f9ee45 | 11825 | return _core_.FlexGridSizer_GetColWidths(*args, **kwargs) |
e811c8ce | 11826 | |
0085ce49 RD |
11827 | FlexGridSizer_swigregister = _core_.FlexGridSizer_swigregister |
11828 | FlexGridSizer_swigregister(FlexGridSizer) | |
d14a1e28 | 11829 | |
e505d15e RD |
11830 | class StdDialogButtonSizer(BoxSizer): |
11831 | """ | |
11832 | A special sizer that knows how to order and position standard buttons | |
11833 | in order to conform to the current platform's standards. You simply | |
11834 | need to add each `wx.Button` to the sizer, and be sure to create the | |
53aa7709 | 11835 | buttons using the standard ID's. Then call `Realize` and the sizer |
e505d15e RD |
11836 | will take care of the rest. |
11837 | ||
11838 | """ | |
0085ce49 RD |
11839 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
11840 | __repr__ = _swig_repr | |
11841 | def __init__(self, *args, **kwargs): | |
e505d15e | 11842 | """__init__(self) -> StdDialogButtonSizer""" |
0085ce49 | 11843 | _core_.StdDialogButtonSizer_swiginit(self,_core_.new_StdDialogButtonSizer(*args, **kwargs)) |
e505d15e RD |
11844 | def AddButton(*args, **kwargs): |
11845 | """ | |
11846 | AddButton(self, wxButton button) | |
11847 | ||
11848 | Use this to add the buttons to this sizer. Do not use the `Add` | |
11849 | method in the base class. | |
11850 | """ | |
11851 | return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs) | |
11852 | ||
53aa7709 | 11853 | def Realize(*args, **kwargs): |
e505d15e | 11854 | """ |
53aa7709 | 11855 | Realize(self) |
e505d15e RD |
11856 | |
11857 | This funciton needs to be called after all the buttons have been added | |
11858 | to the sizer. It will reorder them and position them in a platform | |
11859 | specifc manner. | |
11860 | """ | |
53aa7709 | 11861 | return _core_.StdDialogButtonSizer_Realize(*args, **kwargs) |
51b83b37 RD |
11862 | |
11863 | def SetAffirmativeButton(*args, **kwargs): | |
11864 | """SetAffirmativeButton(self, wxButton button)""" | |
11865 | return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs) | |
11866 | ||
11867 | def SetNegativeButton(*args, **kwargs): | |
11868 | """SetNegativeButton(self, wxButton button)""" | |
11869 | return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs) | |
11870 | ||
11871 | def SetCancelButton(*args, **kwargs): | |
11872 | """SetCancelButton(self, wxButton button)""" | |
11873 | return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs) | |
e505d15e RD |
11874 | |
11875 | def GetAffirmativeButton(*args, **kwargs): | |
11876 | """GetAffirmativeButton(self) -> wxButton""" | |
11877 | return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs) | |
11878 | ||
11879 | def GetApplyButton(*args, **kwargs): | |
11880 | """GetApplyButton(self) -> wxButton""" | |
11881 | return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs) | |
11882 | ||
11883 | def GetNegativeButton(*args, **kwargs): | |
11884 | """GetNegativeButton(self) -> wxButton""" | |
11885 | return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs) | |
11886 | ||
11887 | def GetCancelButton(*args, **kwargs): | |
11888 | """GetCancelButton(self) -> wxButton""" | |
11889 | return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs) | |
11890 | ||
11891 | def GetHelpButton(*args, **kwargs): | |
11892 | """GetHelpButton(self) -> wxButton""" | |
11893 | return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs) | |
11894 | ||
0085ce49 RD |
11895 | StdDialogButtonSizer_swigregister = _core_.StdDialogButtonSizer_swigregister |
11896 | StdDialogButtonSizer_swigregister(StdDialogButtonSizer) | |
e505d15e | 11897 | |
d14a1e28 RD |
11898 | #--------------------------------------------------------------------------- |
11899 | ||
11900 | class GBPosition(object): | |
248ed943 RD |
11901 | """ |
11902 | This class represents the position of an item in a virtual grid of | |
11903 | rows and columns managed by a `wx.GridBagSizer`. wxPython has | |
11904 | typemaps that will automatically convert from a 2-element sequence of | |
11905 | integers to a wx.GBPosition, so you can use the more pythonic | |
11906 | representation of the position nearly transparently in Python code. | |
11907 | """ | |
0085ce49 RD |
11908 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
11909 | __repr__ = _swig_repr | |
11910 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
11911 | """ |
11912 | __init__(self, int row=0, int col=0) -> GBPosition | |
11913 | ||
11914 | This class represents the position of an item in a virtual grid of | |
11915 | rows and columns managed by a `wx.GridBagSizer`. wxPython has | |
11916 | typemaps that will automatically convert from a 2-element sequence of | |
11917 | integers to a wx.GBPosition, so you can use the more pythonic | |
11918 | representation of the position nearly transparently in Python code. | |
11919 | """ | |
0085ce49 RD |
11920 | _core_.GBPosition_swiginit(self,_core_.new_GBPosition(*args, **kwargs)) |
11921 | __swig_destroy__ = _core_.delete_GBPosition | |
11922 | __del__ = lambda self : None; | |
e811c8ce | 11923 | def GetRow(*args, **kwargs): |
a95a7133 | 11924 | """GetRow(self) -> int""" |
54f9ee45 | 11925 | return _core_.GBPosition_GetRow(*args, **kwargs) |
e811c8ce RD |
11926 | |
11927 | def GetCol(*args, **kwargs): | |
a95a7133 | 11928 | """GetCol(self) -> int""" |
54f9ee45 | 11929 | return _core_.GBPosition_GetCol(*args, **kwargs) |
e811c8ce RD |
11930 | |
11931 | def SetRow(*args, **kwargs): | |
a95a7133 | 11932 | """SetRow(self, int row)""" |
54f9ee45 | 11933 | return _core_.GBPosition_SetRow(*args, **kwargs) |
e811c8ce RD |
11934 | |
11935 | def SetCol(*args, **kwargs): | |
a95a7133 | 11936 | """SetCol(self, int col)""" |
54f9ee45 | 11937 | return _core_.GBPosition_SetCol(*args, **kwargs) |
e811c8ce RD |
11938 | |
11939 | def __eq__(*args, **kwargs): | |
a95a7133 | 11940 | """__eq__(self, GBPosition other) -> bool""" |
54f9ee45 | 11941 | return _core_.GBPosition___eq__(*args, **kwargs) |
e811c8ce RD |
11942 | |
11943 | def __ne__(*args, **kwargs): | |
a95a7133 | 11944 | """__ne__(self, GBPosition other) -> bool""" |
54f9ee45 | 11945 | return _core_.GBPosition___ne__(*args, **kwargs) |
e811c8ce RD |
11946 | |
11947 | def Set(*args, **kwargs): | |
a95a7133 | 11948 | """Set(self, int row=0, int col=0)""" |
54f9ee45 | 11949 | return _core_.GBPosition_Set(*args, **kwargs) |
e811c8ce RD |
11950 | |
11951 | def Get(*args, **kwargs): | |
a95a7133 | 11952 | """Get(self) -> PyObject""" |
54f9ee45 | 11953 | return _core_.GBPosition_Get(*args, **kwargs) |
e811c8ce | 11954 | |
41e2b43e | 11955 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
11956 | def __str__(self): return str(self.Get()) |
11957 | def __repr__(self): return 'wx.GBPosition'+str(self.Get()) | |
11958 | def __len__(self): return len(self.Get()) | |
11959 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
11960 | def __setitem__(self, index, val): |
11961 | if index == 0: self.SetRow(val) | |
11962 | elif index == 1: self.SetCol(val) | |
11963 | else: raise IndexError | |
e811c8ce | 11964 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
11965 | __safe_for_unpickling__ = True |
11966 | def __reduce__(self): return (wx.GBPosition, self.Get()) | |
d14a1e28 RD |
11967 | |
11968 | row = property(GetRow, SetRow) | |
11969 | col = property(GetCol, SetCol) | |
11970 | ||
0085ce49 RD |
11971 | GBPosition_swigregister = _core_.GBPosition_swigregister |
11972 | GBPosition_swigregister(GBPosition) | |
d14a1e28 RD |
11973 | |
11974 | class GBSpan(object): | |
248ed943 RD |
11975 | """ |
11976 | This class is used to hold the row and column spanning attributes of | |
11977 | items in a `wx.GridBagSizer`. wxPython has typemaps that will | |
11978 | automatically convert from a 2-element sequence of integers to a | |
11979 | wx.GBSpan, so you can use the more pythonic representation of the span | |
11980 | nearly transparently in Python code. | |
11981 | ||
11982 | """ | |
0085ce49 RD |
11983 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
11984 | __repr__ = _swig_repr | |
11985 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
11986 | """ |
11987 | __init__(self, int rowspan=1, int colspan=1) -> GBSpan | |
11988 | ||
11989 | Construct a new wxGBSpan, optionally setting the rowspan and | |
11990 | colspan. The default is (1,1). (Meaning that the item occupies one | |
11991 | cell in each direction. | |
11992 | """ | |
0085ce49 RD |
11993 | _core_.GBSpan_swiginit(self,_core_.new_GBSpan(*args, **kwargs)) |
11994 | __swig_destroy__ = _core_.delete_GBSpan | |
11995 | __del__ = lambda self : None; | |
e811c8ce | 11996 | def GetRowspan(*args, **kwargs): |
a95a7133 | 11997 | """GetRowspan(self) -> int""" |
54f9ee45 | 11998 | return _core_.GBSpan_GetRowspan(*args, **kwargs) |
e811c8ce RD |
11999 | |
12000 | def GetColspan(*args, **kwargs): | |
a95a7133 | 12001 | """GetColspan(self) -> int""" |
54f9ee45 | 12002 | return _core_.GBSpan_GetColspan(*args, **kwargs) |
e811c8ce RD |
12003 | |
12004 | def SetRowspan(*args, **kwargs): | |
a95a7133 | 12005 | """SetRowspan(self, int rowspan)""" |
54f9ee45 | 12006 | return _core_.GBSpan_SetRowspan(*args, **kwargs) |
e811c8ce RD |
12007 | |
12008 | def SetColspan(*args, **kwargs): | |
a95a7133 | 12009 | """SetColspan(self, int colspan)""" |
54f9ee45 | 12010 | return _core_.GBSpan_SetColspan(*args, **kwargs) |
e811c8ce RD |
12011 | |
12012 | def __eq__(*args, **kwargs): | |
a95a7133 | 12013 | """__eq__(self, GBSpan other) -> bool""" |
54f9ee45 | 12014 | return _core_.GBSpan___eq__(*args, **kwargs) |
e811c8ce RD |
12015 | |
12016 | def __ne__(*args, **kwargs): | |
a95a7133 | 12017 | """__ne__(self, GBSpan other) -> bool""" |
54f9ee45 | 12018 | return _core_.GBSpan___ne__(*args, **kwargs) |
e811c8ce RD |
12019 | |
12020 | def Set(*args, **kwargs): | |
a95a7133 | 12021 | """Set(self, int rowspan=1, int colspan=1)""" |
54f9ee45 | 12022 | return _core_.GBSpan_Set(*args, **kwargs) |
e811c8ce RD |
12023 | |
12024 | def Get(*args, **kwargs): | |
a95a7133 | 12025 | """Get(self) -> PyObject""" |
54f9ee45 | 12026 | return _core_.GBSpan_Get(*args, **kwargs) |
e811c8ce | 12027 | |
41e2b43e | 12028 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
12029 | def __str__(self): return str(self.Get()) |
12030 | def __repr__(self): return 'wx.GBSpan'+str(self.Get()) | |
12031 | def __len__(self): return len(self.Get()) | |
12032 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
12033 | def __setitem__(self, index, val): |
12034 | if index == 0: self.SetRowspan(val) | |
12035 | elif index == 1: self.SetColspan(val) | |
12036 | else: raise IndexError | |
e811c8ce | 12037 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
12038 | __safe_for_unpickling__ = True |
12039 | def __reduce__(self): return (wx.GBSpan, self.Get()) | |
d14a1e28 RD |
12040 | |
12041 | rowspan = property(GetRowspan, SetRowspan) | |
12042 | colspan = property(GetColspan, SetColspan) | |
12043 | ||
0085ce49 RD |
12044 | GBSpan_swigregister = _core_.GBSpan_swigregister |
12045 | GBSpan_swigregister(GBSpan) | |
d14a1e28 RD |
12046 | |
12047 | class GBSizerItem(SizerItem): | |
248ed943 RD |
12048 | """ |
12049 | The wx.GBSizerItem class is used to track the additional data about | |
12050 | items in a `wx.GridBagSizer` such as the item's position in the grid | |
12051 | and how many rows or columns it spans. | |
12052 | ||
12053 | """ | |
0085ce49 RD |
12054 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
12055 | __repr__ = _swig_repr | |
12056 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
12057 | """ |
12058 | __init__(self) -> GBSizerItem | |
12059 | ||
12060 | Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer | |
12061 | size will need to be set, as well as a position and span before this | |
12062 | item can be used in a Sizer. | |
12063 | ||
12064 | You will probably never need to create a wx.GBSizerItem directly as they | |
12065 | are created automatically when the sizer's Add method is called. | |
12066 | """ | |
0085ce49 RD |
12067 | _core_.GBSizerItem_swiginit(self,_core_.new_GBSizerItem(*args, **kwargs)) |
12068 | __swig_destroy__ = _core_.delete_GBSizerItem | |
12069 | __del__ = lambda self : None; | |
e811c8ce | 12070 | def GetPos(*args, **kwargs): |
248ed943 RD |
12071 | """ |
12072 | GetPos(self) -> GBPosition | |
12073 | ||
12074 | Get the grid position of the item | |
12075 | """ | |
54f9ee45 | 12076 | return _core_.GBSizerItem_GetPos(*args, **kwargs) |
e811c8ce RD |
12077 | |
12078 | def GetPosTuple(self): return self.GetPos().Get() | |
12079 | def GetSpan(*args, **kwargs): | |
248ed943 RD |
12080 | """ |
12081 | GetSpan(self) -> GBSpan | |
12082 | ||
12083 | Get the row and column spanning of the item | |
12084 | """ | |
54f9ee45 | 12085 | return _core_.GBSizerItem_GetSpan(*args, **kwargs) |
e811c8ce RD |
12086 | |
12087 | def GetSpanTuple(self): return self.GetSpan().Get() | |
12088 | def SetPos(*args, **kwargs): | |
248ed943 RD |
12089 | """ |
12090 | SetPos(self, GBPosition pos) -> bool | |
12091 | ||
12092 | If the item is already a member of a sizer then first ensure that | |
12093 | there is no other item that would intersect with this one at the new | |
12094 | position, then set the new position. Returns True if the change is | |
12095 | successful and after the next Layout() the item will be moved. | |
12096 | """ | |
54f9ee45 | 12097 | return _core_.GBSizerItem_SetPos(*args, **kwargs) |
e811c8ce RD |
12098 | |
12099 | def SetSpan(*args, **kwargs): | |
248ed943 RD |
12100 | """ |
12101 | SetSpan(self, GBSpan span) -> bool | |
12102 | ||
12103 | If the item is already a member of a sizer then first ensure that | |
12104 | there is no other item that would intersect with this one with its new | |
12105 | spanning size, then set the new spanning. Returns True if the change | |
12106 | is successful and after the next Layout() the item will be resized. | |
12107 | ||
12108 | """ | |
54f9ee45 | 12109 | return _core_.GBSizerItem_SetSpan(*args, **kwargs) |
e811c8ce | 12110 | |
248ed943 | 12111 | def Intersects(*args, **kwargs): |
0df68c9f | 12112 | """ |
a95a7133 | 12113 | Intersects(self, GBSizerItem other) -> bool |
248ed943 RD |
12114 | |
12115 | Returns True if this item and the other item instersect. | |
0df68c9f | 12116 | """ |
248ed943 RD |
12117 | return _core_.GBSizerItem_Intersects(*args, **kwargs) |
12118 | ||
12119 | def IntersectsPos(*args, **kwargs): | |
12120 | """ | |
12121 | IntersectsPos(self, GBPosition pos, GBSpan span) -> bool | |
12122 | ||
12123 | Returns True if the given pos/span would intersect with this item. | |
12124 | """ | |
12125 | return _core_.GBSizerItem_IntersectsPos(*args, **kwargs) | |
e811c8ce RD |
12126 | |
12127 | def GetEndPos(*args, **kwargs): | |
248ed943 RD |
12128 | """ |
12129 | GetEndPos(self) -> GBPosition | |
12130 | ||
12131 | Get the row and column of the endpoint of this item. | |
12132 | """ | |
54f9ee45 | 12133 | return _core_.GBSizerItem_GetEndPos(*args, **kwargs) |
e811c8ce RD |
12134 | |
12135 | def GetGBSizer(*args, **kwargs): | |
248ed943 RD |
12136 | """ |
12137 | GetGBSizer(self) -> GridBagSizer | |
12138 | ||
12139 | Get the sizer this item is a member of. | |
12140 | """ | |
54f9ee45 | 12141 | return _core_.GBSizerItem_GetGBSizer(*args, **kwargs) |
e811c8ce RD |
12142 | |
12143 | def SetGBSizer(*args, **kwargs): | |
248ed943 RD |
12144 | """ |
12145 | SetGBSizer(self, GridBagSizer sizer) | |
12146 | ||
12147 | Set the sizer this item is a member of. | |
12148 | """ | |
54f9ee45 | 12149 | return _core_.GBSizerItem_SetGBSizer(*args, **kwargs) |
e811c8ce | 12150 | |
0085ce49 RD |
12151 | GBSizerItem_swigregister = _core_.GBSizerItem_swigregister |
12152 | GBSizerItem_swigregister(GBSizerItem) | |
d14a1e28 RD |
12153 | DefaultSpan = cvar.DefaultSpan |
12154 | ||
12155 | def GBSizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
12156 | """ |
12157 | GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, | |
248ed943 RD |
12158 | int border, PyObject userData=None) -> GBSizerItem |
12159 | ||
12160 | Construct a `wx.GBSizerItem` for a window. | |
0df68c9f | 12161 | """ |
54f9ee45 | 12162 | val = _core_.new_GBSizerItemWindow(*args, **kwargs) |
d14a1e28 RD |
12163 | return val |
12164 | ||
12165 | def GBSizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
12166 | """ |
12167 | GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, | |
248ed943 RD |
12168 | int border, PyObject userData=None) -> GBSizerItem |
12169 | ||
12170 | Construct a `wx.GBSizerItem` for a sizer | |
0df68c9f | 12171 | """ |
54f9ee45 | 12172 | val = _core_.new_GBSizerItemSizer(*args, **kwargs) |
d14a1e28 RD |
12173 | return val |
12174 | ||
12175 | def GBSizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
12176 | """ |
12177 | GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, | |
248ed943 RD |
12178 | int flag, int border, PyObject userData=None) -> GBSizerItem |
12179 | ||
12180 | Construct a `wx.GBSizerItem` for a spacer. | |
0df68c9f | 12181 | """ |
54f9ee45 | 12182 | val = _core_.new_GBSizerItemSpacer(*args, **kwargs) |
d14a1e28 RD |
12183 | return val |
12184 | ||
12185 | class GridBagSizer(FlexGridSizer): | |
248ed943 RD |
12186 | """ |
12187 | A `wx.Sizer` that can lay out items in a virtual grid like a | |
12188 | `wx.FlexGridSizer` but in this case explicit positioning of the items | |
12189 | is allowed using `wx.GBPosition`, and items can optionally span more | |
12190 | than one row and/or column using `wx.GBSpan`. The total size of the | |
12191 | virtual grid is determined by the largest row and column that items are | |
12192 | positioned at, adjusted for spanning. | |
12193 | ||
12194 | """ | |
0085ce49 RD |
12195 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
12196 | __repr__ = _swig_repr | |
12197 | def __init__(self, *args, **kwargs): | |
248ed943 RD |
12198 | """ |
12199 | __init__(self, int vgap=0, int hgap=0) -> GridBagSizer | |
12200 | ||
12201 | Constructor, with optional parameters to specify the gap between the | |
12202 | rows and columns. | |
12203 | """ | |
0085ce49 | 12204 | _core_.GridBagSizer_swiginit(self,_core_.new_GridBagSizer(*args, **kwargs)) |
1823fbb4 RD |
12205 | self._setOORInfo(self) |
12206 | ||
e811c8ce | 12207 | def Add(*args, **kwargs): |
0df68c9f | 12208 | """ |
248ed943 | 12209 | Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0, |
d3b6e4ff | 12210 | int border=0, userData=None) -> wx.GBSizerItem |
248ed943 RD |
12211 | |
12212 | Adds an item to the sizer at the grid cell *pos*, optionally spanning | |
12213 | more than one row or column as specified with *span*. The remaining | |
12214 | args behave similarly to `wx.Sizer.Add`. | |
12215 | ||
12216 | Returns True if the item was successfully placed at the given cell | |
12217 | position, False if something was already there. | |
12218 | ||
0df68c9f | 12219 | """ |
54f9ee45 | 12220 | return _core_.GridBagSizer_Add(*args, **kwargs) |
e811c8ce RD |
12221 | |
12222 | def AddItem(*args, **kwargs): | |
248ed943 | 12223 | """ |
d3b6e4ff | 12224 | Add(self, GBSizerItem item) -> wx.GBSizerItem |
248ed943 RD |
12225 | |
12226 | Add an item to the sizer using a `wx.GBSizerItem`. Returns True if | |
12227 | the item was successfully placed at its given cell position, False if | |
12228 | something was already there. | |
12229 | """ | |
54f9ee45 | 12230 | return _core_.GridBagSizer_AddItem(*args, **kwargs) |
e811c8ce | 12231 | |
84f85550 RD |
12232 | def GetCellSize(*args, **kwargs): |
12233 | """ | |
12234 | GetCellSize(self, int row, int col) -> Size | |
12235 | ||
12236 | Get the size of the specified cell, including hgap and | |
12237 | vgap. Only valid after a Layout. | |
12238 | """ | |
12239 | return _core_.GridBagSizer_GetCellSize(*args, **kwargs) | |
12240 | ||
e811c8ce | 12241 | def GetEmptyCellSize(*args, **kwargs): |
248ed943 RD |
12242 | """ |
12243 | GetEmptyCellSize(self) -> Size | |
12244 | ||
12245 | Get the size used for cells in the grid with no item. | |
12246 | """ | |
54f9ee45 | 12247 | return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs) |
e811c8ce RD |
12248 | |
12249 | def SetEmptyCellSize(*args, **kwargs): | |
248ed943 RD |
12250 | """ |
12251 | SetEmptyCellSize(self, Size sz) | |
12252 | ||
12253 | Set the size used for cells in the grid with no item. | |
12254 | """ | |
54f9ee45 | 12255 | return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs) |
e811c8ce RD |
12256 | |
12257 | def GetItemPosition(*args): | |
0df68c9f | 12258 | """ |
248ed943 RD |
12259 | GetItemPosition(self, item) -> GBPosition |
12260 | ||
12261 | Get the grid position of the specified *item* where *item* is either a | |
12262 | window or subsizer that is a member of this sizer, or a zero-based | |
12263 | index of an item. | |
0df68c9f | 12264 | """ |
54f9ee45 | 12265 | return _core_.GridBagSizer_GetItemPosition(*args) |
e811c8ce RD |
12266 | |
12267 | def SetItemPosition(*args): | |
0df68c9f | 12268 | """ |
248ed943 RD |
12269 | SetItemPosition(self, item, GBPosition pos) -> bool |
12270 | ||
12271 | Set the grid position of the specified *item* where *item* is either a | |
12272 | window or subsizer that is a member of this sizer, or a zero-based | |
12273 | index of an item. Returns True on success. If the move is not | |
12274 | allowed (because an item is already there) then False is returned. | |
12275 | ||
0df68c9f | 12276 | """ |
54f9ee45 | 12277 | return _core_.GridBagSizer_SetItemPosition(*args) |
e811c8ce RD |
12278 | |
12279 | def GetItemSpan(*args): | |
0df68c9f | 12280 | """ |
248ed943 RD |
12281 | GetItemSpan(self, item) -> GBSpan |
12282 | ||
12283 | Get the row/col spanning of the specified *item* where *item* is | |
12284 | either a window or subsizer that is a member of this sizer, or a | |
12285 | zero-based index of an item. | |
0df68c9f | 12286 | """ |
54f9ee45 | 12287 | return _core_.GridBagSizer_GetItemSpan(*args) |
e811c8ce RD |
12288 | |
12289 | def SetItemSpan(*args): | |
0df68c9f | 12290 | """ |
248ed943 RD |
12291 | SetItemSpan(self, item, GBSpan span) -> bool |
12292 | ||
12293 | Set the row/col spanning of the specified *item* where *item* is | |
12294 | either a window or subsizer that is a member of this sizer, or a | |
12295 | zero-based index of an item. Returns True on success. If the move is | |
12296 | not allowed (because an item is already there) then False is returned. | |
0df68c9f | 12297 | """ |
54f9ee45 | 12298 | return _core_.GridBagSizer_SetItemSpan(*args) |
e811c8ce RD |
12299 | |
12300 | def FindItem(*args): | |
0df68c9f | 12301 | """ |
248ed943 RD |
12302 | FindItem(self, item) -> GBSizerItem |
12303 | ||
12304 | Find the sizer item for the given window or subsizer, returns None if | |
12305 | not found. (non-recursive) | |
0df68c9f | 12306 | """ |
54f9ee45 | 12307 | return _core_.GridBagSizer_FindItem(*args) |
e811c8ce RD |
12308 | |
12309 | def FindItemAtPosition(*args, **kwargs): | |
248ed943 RD |
12310 | """ |
12311 | FindItemAtPosition(self, GBPosition pos) -> GBSizerItem | |
12312 | ||
12313 | Return the sizer item for the given grid cell, or None if there is no | |
12314 | item at that position. (non-recursive) | |
12315 | """ | |
54f9ee45 | 12316 | return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs) |
e811c8ce RD |
12317 | |
12318 | def FindItemAtPoint(*args, **kwargs): | |
248ed943 RD |
12319 | """ |
12320 | FindItemAtPoint(self, Point pt) -> GBSizerItem | |
12321 | ||
12322 | Return the sizer item located at the point given in *pt*, or None if | |
12323 | there is no item at that point. The (x,y) coordinates in pt correspond | |
12324 | to the client coordinates of the window using the sizer for | |
12325 | layout. (non-recursive) | |
12326 | """ | |
54f9ee45 | 12327 | return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs) |
e811c8ce | 12328 | |
248ed943 RD |
12329 | def CheckForIntersection(*args, **kwargs): |
12330 | """ | |
12331 | CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool | |
e811c8ce | 12332 | |
248ed943 RD |
12333 | Look at all items and see if any intersect (or would overlap) the |
12334 | given *item*. Returns True if so, False if there would be no overlap. | |
12335 | If an *excludeItem* is given then it will not be checked for | |
12336 | intersection, for example it may be the item we are checking the | |
12337 | position of. | |
e811c8ce | 12338 | |
248ed943 RD |
12339 | """ |
12340 | return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs) | |
e811c8ce | 12341 | |
248ed943 | 12342 | def CheckForIntersectionPos(*args, **kwargs): |
0df68c9f | 12343 | """ |
248ed943 RD |
12344 | CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool |
12345 | ||
12346 | Look at all items and see if any intersect (or would overlap) the | |
12347 | given position and span. Returns True if so, False if there would be | |
12348 | no overlap. If an *excludeItem* is given then it will not be checked | |
12349 | for intersection, for example it may be the item we are checking the | |
12350 | position of. | |
0df68c9f | 12351 | """ |
248ed943 | 12352 | return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs) |
e811c8ce | 12353 | |
0085ce49 RD |
12354 | GridBagSizer_swigregister = _core_.GridBagSizer_swigregister |
12355 | GridBagSizer_swigregister(GridBagSizer) | |
d14a1e28 RD |
12356 | |
12357 | #--------------------------------------------------------------------------- | |
12358 | ||
54f9ee45 RD |
12359 | Left = _core_.Left |
12360 | Top = _core_.Top | |
12361 | Right = _core_.Right | |
12362 | Bottom = _core_.Bottom | |
12363 | Width = _core_.Width | |
12364 | Height = _core_.Height | |
12365 | Centre = _core_.Centre | |
12366 | Center = _core_.Center | |
12367 | CentreX = _core_.CentreX | |
12368 | CentreY = _core_.CentreY | |
12369 | Unconstrained = _core_.Unconstrained | |
12370 | AsIs = _core_.AsIs | |
12371 | PercentOf = _core_.PercentOf | |
12372 | Above = _core_.Above | |
12373 | Below = _core_.Below | |
12374 | LeftOf = _core_.LeftOf | |
12375 | RightOf = _core_.RightOf | |
12376 | SameAs = _core_.SameAs | |
12377 | Absolute = _core_.Absolute | |
d14a1e28 | 12378 | class IndividualLayoutConstraint(Object): |
15afbcd0 | 12379 | """ |
41e2b43e RD |
12380 | Objects of this class are stored in the `wx.LayoutConstraints` class as |
12381 | one of eight possible constraints that a window can be involved in. | |
12382 | You will never need to create an instance of | |
12383 | wx.IndividualLayoutConstraint, rather you should create a | |
12384 | `wx.LayoutConstraints` instance and use the individual contstraints | |
15afbcd0 | 12385 | that it contains. |
15afbcd0 | 12386 | """ |
0085ce49 RD |
12387 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
12388 | def __init__(self): raise AttributeError, "No constructor defined" | |
12389 | __repr__ = _swig_repr | |
e811c8ce | 12390 | def Set(*args, **kwargs): |
41e2b43e RD |
12391 | """ |
12392 | Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN) | |
12393 | ||
12394 | Sets the properties of the constraint. Normally called by one of the | |
12395 | convenience functions such as Above, RightOf, SameAs. | |
12396 | """ | |
54f9ee45 | 12397 | return _core_.IndividualLayoutConstraint_Set(*args, **kwargs) |
e811c8ce RD |
12398 | |
12399 | def LeftOf(*args, **kwargs): | |
15afbcd0 | 12400 | """ |
a95a7133 | 12401 | LeftOf(self, Window sibling, int marg=0) |
15afbcd0 | 12402 | |
41e2b43e RD |
12403 | Constrains this edge to be to the left of the given window, with an |
12404 | optional margin. Implicitly, this is relative to the left edge of the | |
12405 | other window. | |
15afbcd0 | 12406 | """ |
54f9ee45 | 12407 | return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs) |
e811c8ce RD |
12408 | |
12409 | def RightOf(*args, **kwargs): | |
15afbcd0 | 12410 | """ |
a95a7133 | 12411 | RightOf(self, Window sibling, int marg=0) |
15afbcd0 | 12412 | |
41e2b43e RD |
12413 | Constrains this edge to be to the right of the given window, with an |
12414 | optional margin. Implicitly, this is relative to the right edge of the | |
12415 | other window. | |
15afbcd0 | 12416 | """ |
54f9ee45 | 12417 | return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs) |
e811c8ce RD |
12418 | |
12419 | def Above(*args, **kwargs): | |
15afbcd0 | 12420 | """ |
a95a7133 | 12421 | Above(self, Window sibling, int marg=0) |
15afbcd0 | 12422 | |
41e2b43e RD |
12423 | Constrains this edge to be above the given window, with an optional |
12424 | margin. Implicitly, this is relative to the top edge of the other | |
12425 | window. | |
15afbcd0 | 12426 | """ |
54f9ee45 | 12427 | return _core_.IndividualLayoutConstraint_Above(*args, **kwargs) |
e811c8ce RD |
12428 | |
12429 | def Below(*args, **kwargs): | |
15afbcd0 | 12430 | """ |
a95a7133 | 12431 | Below(self, Window sibling, int marg=0) |
15afbcd0 | 12432 | |
41e2b43e RD |
12433 | Constrains this edge to be below the given window, with an optional |
12434 | margin. Implicitly, this is relative to the bottom edge of the other | |
12435 | window. | |
15afbcd0 | 12436 | """ |
54f9ee45 | 12437 | return _core_.IndividualLayoutConstraint_Below(*args, **kwargs) |
e811c8ce RD |
12438 | |
12439 | def SameAs(*args, **kwargs): | |
15afbcd0 | 12440 | """ |
a95a7133 | 12441 | SameAs(self, Window otherW, int edge, int marg=0) |
15afbcd0 | 12442 | |
41e2b43e RD |
12443 | Constrains this edge or dimension to be to the same as the edge of the |
12444 | given window, with an optional margin. | |
15afbcd0 | 12445 | """ |
54f9ee45 | 12446 | return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs) |
e811c8ce RD |
12447 | |
12448 | def PercentOf(*args, **kwargs): | |
15afbcd0 | 12449 | """ |
a95a7133 | 12450 | PercentOf(self, Window otherW, int wh, int per) |
15afbcd0 | 12451 | |
41e2b43e RD |
12452 | Constrains this edge or dimension to be to a percentage of the given |
12453 | window, with an optional margin. | |
15afbcd0 | 12454 | """ |
54f9ee45 | 12455 | return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs) |
e811c8ce RD |
12456 | |
12457 | def Absolute(*args, **kwargs): | |
15afbcd0 | 12458 | """ |
a95a7133 | 12459 | Absolute(self, int val) |
15afbcd0 | 12460 | |
41e2b43e | 12461 | Constrains this edge or dimension to be the given absolute value. |
15afbcd0 | 12462 | """ |
54f9ee45 | 12463 | return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs) |
e811c8ce RD |
12464 | |
12465 | def Unconstrained(*args, **kwargs): | |
15afbcd0 | 12466 | """ |
a95a7133 | 12467 | Unconstrained(self) |
15afbcd0 | 12468 | |
41e2b43e RD |
12469 | Sets this edge or dimension to be unconstrained, that is, dependent on |
12470 | other edges and dimensions from which this value can be deduced. | |
15afbcd0 | 12471 | """ |
54f9ee45 | 12472 | return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs) |
e811c8ce RD |
12473 | |
12474 | def AsIs(*args, **kwargs): | |
15afbcd0 | 12475 | """ |
a95a7133 | 12476 | AsIs(self) |
15afbcd0 | 12477 | |
41e2b43e RD |
12478 | Sets this edge or constraint to be whatever the window's value is at |
12479 | the moment. If either of the width and height constraints are *as is*, | |
12480 | the window will not be resized, but moved instead. This is important | |
12481 | when considering panel items which are intended to have a default | |
12482 | size, such as a button, which may take its size from the size of the | |
12483 | button label. | |
15afbcd0 | 12484 | """ |
54f9ee45 | 12485 | return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs) |
e811c8ce RD |
12486 | |
12487 | def GetOtherWindow(*args, **kwargs): | |
a95a7133 | 12488 | """GetOtherWindow(self) -> Window""" |
54f9ee45 | 12489 | return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs) |
e811c8ce RD |
12490 | |
12491 | def GetMyEdge(*args, **kwargs): | |
a95a7133 | 12492 | """GetMyEdge(self) -> int""" |
54f9ee45 | 12493 | return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs) |
e811c8ce RD |
12494 | |
12495 | def SetEdge(*args, **kwargs): | |
a95a7133 | 12496 | """SetEdge(self, int which)""" |
54f9ee45 | 12497 | return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs) |
e811c8ce RD |
12498 | |
12499 | def SetValue(*args, **kwargs): | |
a95a7133 | 12500 | """SetValue(self, int v)""" |
54f9ee45 | 12501 | return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs) |
e811c8ce RD |
12502 | |
12503 | def GetMargin(*args, **kwargs): | |
a95a7133 | 12504 | """GetMargin(self) -> int""" |
54f9ee45 | 12505 | return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs) |
e811c8ce RD |
12506 | |
12507 | def SetMargin(*args, **kwargs): | |
a95a7133 | 12508 | """SetMargin(self, int m)""" |
54f9ee45 | 12509 | return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs) |
e811c8ce RD |
12510 | |
12511 | def GetValue(*args, **kwargs): | |
a95a7133 | 12512 | """GetValue(self) -> int""" |
54f9ee45 | 12513 | return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs) |
e811c8ce RD |
12514 | |
12515 | def GetPercent(*args, **kwargs): | |
a95a7133 | 12516 | """GetPercent(self) -> int""" |
54f9ee45 | 12517 | return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs) |
e811c8ce RD |
12518 | |
12519 | def GetOtherEdge(*args, **kwargs): | |
a95a7133 | 12520 | """GetOtherEdge(self) -> int""" |
54f9ee45 | 12521 | return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs) |
e811c8ce RD |
12522 | |
12523 | def GetDone(*args, **kwargs): | |
a95a7133 | 12524 | """GetDone(self) -> bool""" |
54f9ee45 | 12525 | return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs) |
e811c8ce RD |
12526 | |
12527 | def SetDone(*args, **kwargs): | |
a95a7133 | 12528 | """SetDone(self, bool d)""" |
54f9ee45 | 12529 | return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs) |
e811c8ce RD |
12530 | |
12531 | def GetRelationship(*args, **kwargs): | |
a95a7133 | 12532 | """GetRelationship(self) -> int""" |
54f9ee45 | 12533 | return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs) |
e811c8ce RD |
12534 | |
12535 | def SetRelationship(*args, **kwargs): | |
a95a7133 | 12536 | """SetRelationship(self, int r)""" |
54f9ee45 | 12537 | return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs) |
e811c8ce RD |
12538 | |
12539 | def ResetIfWin(*args, **kwargs): | |
15afbcd0 | 12540 | """ |
a95a7133 | 12541 | ResetIfWin(self, Window otherW) -> bool |
15afbcd0 RD |
12542 | |
12543 | Reset constraint if it mentions otherWin | |
12544 | """ | |
54f9ee45 | 12545 | return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs) |
e811c8ce RD |
12546 | |
12547 | def SatisfyConstraint(*args, **kwargs): | |
15afbcd0 | 12548 | """ |
a95a7133 | 12549 | SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool |
15afbcd0 RD |
12550 | |
12551 | Try to satisfy constraint | |
12552 | """ | |
54f9ee45 | 12553 | return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs) |
e811c8ce RD |
12554 | |
12555 | def GetEdge(*args, **kwargs): | |
15afbcd0 | 12556 | """ |
a95a7133 | 12557 | GetEdge(self, int which, Window thisWin, Window other) -> int |
15afbcd0 RD |
12558 | |
12559 | Get the value of this edge or dimension, or if this | |
12560 | is not determinable, -1. | |
12561 | """ | |
54f9ee45 | 12562 | return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs) |
e811c8ce | 12563 | |
0085ce49 RD |
12564 | IndividualLayoutConstraint_swigregister = _core_.IndividualLayoutConstraint_swigregister |
12565 | IndividualLayoutConstraint_swigregister(IndividualLayoutConstraint) | |
d14a1e28 RD |
12566 | |
12567 | class LayoutConstraints(Object): | |
15afbcd0 | 12568 | """ |
41e2b43e RD |
12569 | **Note:** constraints are now deprecated and you should use sizers |
12570 | instead. | |
15afbcd0 | 12571 | |
41e2b43e RD |
12572 | Objects of this class can be associated with a window to define its |
12573 | layout constraints, with respect to siblings or its parent. | |
15afbcd0 RD |
12574 | |
12575 | The class consists of the following eight constraints of class | |
12576 | wx.IndividualLayoutConstraint, some or all of which should be accessed | |
12577 | directly to set the appropriate constraints. | |
12578 | ||
12579 | * left: represents the left hand edge of the window | |
12580 | * right: represents the right hand edge of the window | |
12581 | * top: represents the top edge of the window | |
12582 | * bottom: represents the bottom edge of the window | |
12583 | * width: represents the width of the window | |
12584 | * height: represents the height of the window | |
12585 | * centreX: represents the horizontal centre point of the window | |
12586 | * centreY: represents the vertical centre point of the window | |
12587 | ||
41e2b43e RD |
12588 | Most constraints are initially set to have the relationship |
12589 | wxUnconstrained, which means that their values should be calculated by | |
12590 | looking at known constraints. The exceptions are width and height, | |
12591 | which are set to wxAsIs to ensure that if the user does not specify a | |
12592 | constraint, the existing width and height will be used, to be | |
12593 | compatible with panel items which often have take a default size. If | |
12594 | the constraint is ``wx.AsIs``, the dimension will not be changed. | |
12595 | ||
12596 | :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints` | |
15afbcd0 RD |
12597 | |
12598 | """ | |
0085ce49 RD |
12599 | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
12600 | __repr__ = _swig_repr | |
54f9ee45 RD |
12601 | left = property(_core_.LayoutConstraints_left_get) |
12602 | top = property(_core_.LayoutConstraints_top_get) | |
12603 | right = property(_core_.LayoutConstraints_right_get) | |
12604 | bottom = property(_core_.LayoutConstraints_bottom_get) | |
12605 | width = property(_core_.LayoutConstraints_width_get) | |
12606 | height = property(_core_.LayoutConstraints_height_get) | |
12607 | centreX = property(_core_.LayoutConstraints_centreX_get) | |
12608 | centreY = property(_core_.LayoutConstraints_centreY_get) | |
0085ce49 | 12609 | def __init__(self, *args, **kwargs): |
a95a7133 | 12610 | """__init__(self) -> LayoutConstraints""" |
0085ce49 RD |
12611 | _core_.LayoutConstraints_swiginit(self,_core_.new_LayoutConstraints(*args, **kwargs)) |
12612 | __swig_destroy__ = _core_.delete_LayoutConstraints | |
12613 | __del__ = lambda self : None; | |
e811c8ce | 12614 | def SatisfyConstraints(*args, **kwargs): |
6c3b4aae | 12615 | """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)""" |
54f9ee45 | 12616 | return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs) |
e811c8ce RD |
12617 | |
12618 | def AreSatisfied(*args, **kwargs): | |
a95a7133 | 12619 | """AreSatisfied(self) -> bool""" |
54f9ee45 | 12620 | return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs) |
e811c8ce | 12621 | |
0085ce49 RD |
12622 | LayoutConstraints_swigregister = _core_.LayoutConstraints_swigregister |
12623 | LayoutConstraints_swigregister(LayoutConstraints) | |
d14a1e28 RD |
12624 | |
12625 | #---------------------------------------------------------------------------- | |
12626 | ||
322913ce | 12627 | # Use Python's bool constants if available, make some if not |
d14a1e28 RD |
12628 | try: |
12629 | True | |
12630 | except NameError: | |
322913ce RD |
12631 | __builtins__.True = 1==1 |
12632 | __builtins__.False = 1==0 | |
4f89f6a3 RD |
12633 | def bool(value): return not not value |
12634 | __builtins__.bool = bool | |
d14a1e28 | 12635 | |
d14a1e28 RD |
12636 | |
12637 | ||
12638 | # workarounds for bad wxRTTI names | |
12639 | __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge' | |
12640 | __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider' | |
12641 | __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar' | |
12642 | ||
12643 | ||
12644 | #---------------------------------------------------------------------------- | |
12645 | # Load version numbers from __version__... Ensure that major and minor | |
7bc1e663 | 12646 | # versions are the same for both wxPython and wxWidgets. |
d14a1e28 RD |
12647 | |
12648 | from __version__ import * | |
12649 | __version__ = VERSION_STRING | |
12650 | ||
7bc1e663 RD |
12651 | assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch" |
12652 | assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch" | |
54f9ee45 | 12653 | if RELEASE_VERSION != _core_.RELEASE_VERSION: |
d14a1e28 | 12654 | import warnings |
7bc1e663 | 12655 | warnings.warn("wxPython/wxWidgets release number mismatch") |
d14a1e28 RD |
12656 | |
12657 | #---------------------------------------------------------------------------- | |
12658 | ||
70b7a5fe RD |
12659 | # Set wxPython's default string<-->unicode conversion encoding from |
12660 | # the locale, but only if Python's default hasn't been changed. (We | |
12661 | # assume that if the user has customized it already then that is the | |
12662 | # encoding we need to use as well.) | |
12663 | # | |
12664 | # The encoding selected here is used when string or unicode objects | |
12665 | # need to be converted in order to pass them to wxWidgets. Please be | |
12666 | # aware that the default encoding within the same locale may be | |
12667 | # slightly different on different platforms. For example, please see | |
e505d15e RD |
12668 | # http://www.alanwood.net/demos/charsetdiffs.html for differences |
12669 | # between the common latin/roman encodings. | |
396fb509 RD |
12670 | |
12671 | default = _sys.getdefaultencoding() | |
12672 | if default == 'ascii': | |
12673 | import locale | |
12674 | import codecs | |
12675 | try: | |
12676 | default = locale.getdefaultlocale()[1] | |
12677 | codecs.lookup(default) | |
70b7a5fe | 12678 | except (ValueError, LookupError, TypeError): |
396fb509 RD |
12679 | default = _sys.getdefaultencoding() |
12680 | del locale | |
12681 | del codecs | |
5cbf236d RD |
12682 | if default: |
12683 | wx.SetDefaultPyEncoding(default) | |
12684 | del default | |
5cbf236d RD |
12685 | |
12686 | #---------------------------------------------------------------------------- | |
12687 | ||
d14a1e28 RD |
12688 | class PyDeadObjectError(AttributeError): |
12689 | pass | |
12690 | ||
d14a1e28 RD |
12691 | class _wxPyDeadObject(object): |
12692 | """ | |
12693 | Instances of wx objects that are OOR capable will have their __class__ | |
12694 | changed to this class when the C++ object is deleted. This should help | |
12695 | prevent crashes due to referencing a bogus C++ pointer. | |
12696 | """ | |
12697 | reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)" | |
12698 | attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed." | |
12699 | ||
3a04f143 | 12700 | def __repr__(self): |
d14a1e28 RD |
12701 | if not hasattr(self, "_name"): |
12702 | self._name = "[unknown]" | |
12703 | return self.reprStr % self._name | |
12704 | ||
3a04f143 | 12705 | def __getattr__(self, *args): |
d14a1e28 RD |
12706 | if not hasattr(self, "_name"): |
12707 | self._name = "[unknown]" | |
3a04f143 RD |
12708 | raise PyDeadObjectError(self.attrStr % self._name) |
12709 | ||
12710 | def __nonzero__(self): | |
12711 | return 0 | |
12712 | ||
12713 | ||
12714 | ||
12715 | class PyUnbornObjectError(AttributeError): | |
12716 | pass | |
12717 | ||
12718 | class _wxPyUnbornObject(object): | |
12719 | """ | |
54f9ee45 | 12720 | Some stock objects are created when the wx._core module is |
3a04f143 RD |
12721 | imported, but their C++ instance is not created until the wx.App |
12722 | object is created and initialized. These object instances will | |
12723 | temporarily have their __class__ changed to this class so an | |
12724 | exception will be raised if they are used before the C++ instance | |
12725 | is ready. | |
12726 | """ | |
12727 | ||
12728 | reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)" | |
12729 | attrStr = "The C++ part of this object has not been initialized, attribute access not allowed." | |
12730 | ||
12731 | def __repr__(self): | |
12732 | #if not hasattr(self, "_name"): | |
12733 | # self._name = "[unknown]" | |
12734 | return self.reprStr #% self._name | |
12735 | ||
12736 | def __getattr__(self, *args): | |
12737 | #if not hasattr(self, "_name"): | |
12738 | # self._name = "[unknown]" | |
12739 | raise PyUnbornObjectError(self.attrStr) # % self._name ) | |
d14a1e28 RD |
12740 | |
12741 | def __nonzero__(self): | |
12742 | return 0 | |
12743 | ||
12744 | ||
12745 | #---------------------------------------------------------------------------- | |
d14a1e28 RD |
12746 | |
12747 | def CallAfter(callable, *args, **kw): | |
12748 | """ | |
12749 | Call the specified function after the current and pending event | |
12750 | handlers have been completed. This is also good for making GUI | |
61863841 RD |
12751 | method calls from non-GUI threads. Any extra positional or |
12752 | keyword args are passed on to the callable when it is called. | |
12753 | ||
12754 | :see: `wx.FutureCall` | |
d14a1e28 RD |
12755 | """ |
12756 | app = wx.GetApp() | |
dfbb5885 | 12757 | assert app is not None, 'No wx.App created yet' |
d14a1e28 | 12758 | |
148275d3 RD |
12759 | if not hasattr(app, "_CallAfterId"): |
12760 | app._CallAfterId = wx.NewEventType() | |
12761 | app.Connect(-1, -1, app._CallAfterId, | |
12762 | lambda event: event.callable(*event.args, **event.kw) ) | |
d14a1e28 | 12763 | evt = wx.PyEvent() |
148275d3 | 12764 | evt.SetEventType(app._CallAfterId) |
d14a1e28 RD |
12765 | evt.callable = callable |
12766 | evt.args = args | |
12767 | evt.kw = kw | |
12768 | wx.PostEvent(app, evt) | |
12769 | ||
d14a1e28 RD |
12770 | #---------------------------------------------------------------------------- |
12771 | ||
12772 | ||
12773 | class FutureCall: | |
12774 | """ | |
8ac8dba0 | 12775 | A convenience class for `wx.Timer`, that calls the given callable |
d14a1e28 RD |
12776 | object once after the given amount of milliseconds, passing any |
12777 | positional or keyword args. The return value of the callable is | |
61863841 | 12778 | availbale after it has been run with the `GetResult` method. |
d14a1e28 RD |
12779 | |
12780 | If you don't need to get the return value or restart the timer | |
12781 | then there is no need to hold a reference to this object. It will | |
12782 | hold a reference to itself while the timer is running (the timer | |
12783 | has a reference to self.Notify) but the cycle will be broken when | |
12784 | the timer completes, automatically cleaning up the wx.FutureCall | |
12785 | object. | |
61863841 RD |
12786 | |
12787 | :see: `wx.CallAfter` | |
d14a1e28 RD |
12788 | """ |
12789 | def __init__(self, millis, callable, *args, **kwargs): | |
12790 | self.millis = millis | |
12791 | self.callable = callable | |
12792 | self.SetArgs(*args, **kwargs) | |
12793 | self.runCount = 0 | |
4276dc52 | 12794 | self.running = False |
d14a1e28 RD |
12795 | self.hasRun = False |
12796 | self.result = None | |
12797 | self.timer = None | |
12798 | self.Start() | |
12799 | ||
12800 | def __del__(self): | |
12801 | self.Stop() | |
12802 | ||
12803 | ||
12804 | def Start(self, millis=None, *args, **kwargs): | |
12805 | """ | |
12806 | (Re)start the timer | |
12807 | """ | |
12808 | self.hasRun = False | |
12809 | if millis is not None: | |
12810 | self.millis = millis | |
12811 | if args or kwargs: | |
12812 | self.SetArgs(*args, **kwargs) | |
12813 | self.Stop() | |
12814 | self.timer = wx.PyTimer(self.Notify) | |
12815 | self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) | |
4276dc52 | 12816 | self.running = True |
d14a1e28 RD |
12817 | Restart = Start |
12818 | ||
12819 | ||
12820 | def Stop(self): | |
12821 | """ | |
12822 | Stop and destroy the timer. | |
12823 | """ | |
12824 | if self.timer is not None: | |
12825 | self.timer.Stop() | |
12826 | self.timer = None | |
12827 | ||
12828 | ||
12829 | def GetInterval(self): | |
12830 | if self.timer is not None: | |
12831 | return self.timer.GetInterval() | |
12832 | else: | |
12833 | return 0 | |
12834 | ||
12835 | ||
12836 | def IsRunning(self): | |
12837 | return self.timer is not None and self.timer.IsRunning() | |
12838 | ||
12839 | ||
12840 | def SetArgs(self, *args, **kwargs): | |
12841 | """ | |
12842 | (Re)set the args passed to the callable object. This is | |
12843 | useful in conjunction with Restart if you want to schedule a | |
12844 | new call to the same callable object but with different | |
12845 | parameters. | |
12846 | """ | |
12847 | self.args = args | |
12848 | self.kwargs = kwargs | |
12849 | ||
12850 | ||
12851 | def HasRun(self): | |
12852 | return self.hasRun | |
12853 | ||
12854 | def GetResult(self): | |
12855 | return self.result | |
12856 | ||
12857 | def Notify(self): | |
12858 | """ | |
12859 | The timer has expired so call the callable. | |
12860 | """ | |
12861 | if self.callable and getattr(self.callable, 'im_self', True): | |
12862 | self.runCount += 1 | |
4276dc52 | 12863 | self.running = False |
d14a1e28 RD |
12864 | self.result = self.callable(*self.args, **self.kwargs) |
12865 | self.hasRun = True | |
4276dc52 RD |
12866 | if not self.running: |
12867 | # if it wasn't restarted, then cleanup | |
12868 | wx.CallAfter(self.Stop) | |
d14a1e28 RD |
12869 | |
12870 | ||
a95a7133 RD |
12871 | |
12872 | #---------------------------------------------------------------------------- | |
12873 | # Control which items in this module should be documented by epydoc. | |
12874 | # We allow only classes and functions, which will help reduce the size | |
12875 | # of the docs by filtering out the zillions of constants, EVT objects, | |
12876 | # and etc that don't make much sense by themselves, but are instead | |
12877 | # documented (or will be) as part of the classes/functions/methods | |
12878 | # where they should be used. | |
12879 | ||
66c033b4 RD |
12880 | class __DocFilter: |
12881 | """ | |
12882 | A filter for epydoc that only allows non-Ptr classes and | |
12883 | fucntions, in order to reduce the clutter in the API docs. | |
12884 | """ | |
12885 | def __init__(self, globals): | |
12886 | self._globals = globals | |
12887 | ||
12888 | def __call__(self, name): | |
12889 | import types | |
12890 | obj = self._globals.get(name, None) | |
12891 | if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]: | |
12892 | return False | |
0085ce49 | 12893 | if name.startswith('_') or name.startswith('EVT') or name.endswith('_swigregister') or name.endswith('Ptr') : |
66c033b4 RD |
12894 | return False |
12895 | return True | |
a95a7133 | 12896 | |
d14a1e28 RD |
12897 | #---------------------------------------------------------------------------- |
12898 | #---------------------------------------------------------------------------- | |
12899 | ||
12900 | # Import other modules in this package that should show up in the | |
12901 | # "core" wx namespace | |
54f9ee45 RD |
12902 | from _gdi import * |
12903 | from _windows import * | |
12904 | from _controls import * | |
12905 | from _misc import * | |
d14a1e28 | 12906 | |
3a04f143 RD |
12907 | |
12908 | # Fixup the stock objects since they can't be used yet. (They will be | |
12909 | # restored in wx.PyApp.OnInit.) | |
54f9ee45 | 12910 | _core_._wxPyFixStockObjects() |
3a04f143 | 12911 | |
d14a1e28 RD |
12912 | #---------------------------------------------------------------------------- |
12913 | #---------------------------------------------------------------------------- | |
12914 | ||
12915 | ||
32fe5131 | 12916 |