]>
Commit | Line | Data |
---|---|---|
d14a1e28 RD |
1 | # This file was created automatically by SWIG. |
2 | # Don't modify this file, modify the SWIG interface instead. | |
3 | ||
4 | import _core | |
5 | ||
6 | #// Give a reference to the dictionary of this module to the C++ extension | |
7 | #// code. | |
8 | _core._wxPySetDictionary(vars()) | |
9 | ||
10 | #// A little trick to make 'wx' be a reference to this module so wx.Names can | |
11 | #// be used here. | |
12 | import sys as _sys | |
13 | wx = _sys.modules[__name__] | |
14 | ||
15 | NOT_FOUND = _core.NOT_FOUND | |
16 | VSCROLL = _core.VSCROLL | |
17 | HSCROLL = _core.HSCROLL | |
18 | CAPTION = _core.CAPTION | |
19 | DOUBLE_BORDER = _core.DOUBLE_BORDER | |
20 | SUNKEN_BORDER = _core.SUNKEN_BORDER | |
21 | RAISED_BORDER = _core.RAISED_BORDER | |
22 | BORDER = _core.BORDER | |
23 | SIMPLE_BORDER = _core.SIMPLE_BORDER | |
24 | STATIC_BORDER = _core.STATIC_BORDER | |
25 | TRANSPARENT_WINDOW = _core.TRANSPARENT_WINDOW | |
26 | NO_BORDER = _core.NO_BORDER | |
27 | USER_COLOURS = _core.USER_COLOURS | |
28 | NO_3D = _core.NO_3D | |
29 | TAB_TRAVERSAL = _core.TAB_TRAVERSAL | |
30 | WANTS_CHARS = _core.WANTS_CHARS | |
31 | POPUP_WINDOW = _core.POPUP_WINDOW | |
32 | CENTER_FRAME = _core.CENTER_FRAME | |
33 | CENTRE_ON_SCREEN = _core.CENTRE_ON_SCREEN | |
34 | CENTER_ON_SCREEN = _core.CENTER_ON_SCREEN | |
35 | STAY_ON_TOP = _core.STAY_ON_TOP | |
36 | ICONIZE = _core.ICONIZE | |
37 | MINIMIZE = _core.MINIMIZE | |
38 | MAXIMIZE = _core.MAXIMIZE | |
39 | CLOSE_BOX = _core.CLOSE_BOX | |
40 | THICK_FRAME = _core.THICK_FRAME | |
41 | SYSTEM_MENU = _core.SYSTEM_MENU | |
42 | MINIMIZE_BOX = _core.MINIMIZE_BOX | |
43 | MAXIMIZE_BOX = _core.MAXIMIZE_BOX | |
44 | TINY_CAPTION_HORIZ = _core.TINY_CAPTION_HORIZ | |
45 | TINY_CAPTION_VERT = _core.TINY_CAPTION_VERT | |
46 | RESIZE_BOX = _core.RESIZE_BOX | |
47 | RESIZE_BORDER = _core.RESIZE_BORDER | |
48 | DIALOG_MODAL = _core.DIALOG_MODAL | |
49 | DIALOG_MODELESS = _core.DIALOG_MODELESS | |
50 | DIALOG_NO_PARENT = _core.DIALOG_NO_PARENT | |
51 | DEFAULT_FRAME_STYLE = _core.DEFAULT_FRAME_STYLE | |
52 | DEFAULT_DIALOG_STYLE = _core.DEFAULT_DIALOG_STYLE | |
53 | FRAME_TOOL_WINDOW = _core.FRAME_TOOL_WINDOW | |
54 | FRAME_FLOAT_ON_PARENT = _core.FRAME_FLOAT_ON_PARENT | |
55 | FRAME_NO_WINDOW_MENU = _core.FRAME_NO_WINDOW_MENU | |
56 | FRAME_NO_TASKBAR = _core.FRAME_NO_TASKBAR | |
57 | FRAME_SHAPED = _core.FRAME_SHAPED | |
58 | ED_CLIENT_MARGIN = _core.ED_CLIENT_MARGIN | |
59 | ED_BUTTONS_BOTTOM = _core.ED_BUTTONS_BOTTOM | |
60 | ED_BUTTONS_RIGHT = _core.ED_BUTTONS_RIGHT | |
61 | ED_STATIC_LINE = _core.ED_STATIC_LINE | |
62 | EXT_DIALOG_STYLE = _core.EXT_DIALOG_STYLE | |
63 | CLIP_CHILDREN = _core.CLIP_CHILDREN | |
64 | CLIP_SIBLINGS = _core.CLIP_SIBLINGS | |
65 | RETAINED = _core.RETAINED | |
66 | BACKINGSTORE = _core.BACKINGSTORE | |
67 | COLOURED = _core.COLOURED | |
68 | FIXED_LENGTH = _core.FIXED_LENGTH | |
69 | LB_NEEDED_SB = _core.LB_NEEDED_SB | |
70 | LB_ALWAYS_SB = _core.LB_ALWAYS_SB | |
71 | LB_SORT = _core.LB_SORT | |
72 | LB_SINGLE = _core.LB_SINGLE | |
73 | LB_MULTIPLE = _core.LB_MULTIPLE | |
74 | LB_EXTENDED = _core.LB_EXTENDED | |
75 | LB_OWNERDRAW = _core.LB_OWNERDRAW | |
76 | LB_HSCROLL = _core.LB_HSCROLL | |
77 | PROCESS_ENTER = _core.PROCESS_ENTER | |
78 | PASSWORD = _core.PASSWORD | |
79 | CB_SIMPLE = _core.CB_SIMPLE | |
80 | CB_DROPDOWN = _core.CB_DROPDOWN | |
81 | CB_SORT = _core.CB_SORT | |
82 | CB_READONLY = _core.CB_READONLY | |
83 | RA_HORIZONTAL = _core.RA_HORIZONTAL | |
84 | RA_VERTICAL = _core.RA_VERTICAL | |
85 | RA_SPECIFY_ROWS = _core.RA_SPECIFY_ROWS | |
86 | RA_SPECIFY_COLS = _core.RA_SPECIFY_COLS | |
87 | RB_GROUP = _core.RB_GROUP | |
88 | RB_SINGLE = _core.RB_SINGLE | |
89 | SL_HORIZONTAL = _core.SL_HORIZONTAL | |
90 | SL_VERTICAL = _core.SL_VERTICAL | |
91 | SL_AUTOTICKS = _core.SL_AUTOTICKS | |
92 | SL_LABELS = _core.SL_LABELS | |
93 | SL_LEFT = _core.SL_LEFT | |
94 | SL_TOP = _core.SL_TOP | |
95 | SL_RIGHT = _core.SL_RIGHT | |
96 | SL_BOTTOM = _core.SL_BOTTOM | |
97 | SL_BOTH = _core.SL_BOTH | |
98 | SL_SELRANGE = _core.SL_SELRANGE | |
99 | SB_HORIZONTAL = _core.SB_HORIZONTAL | |
100 | SB_VERTICAL = _core.SB_VERTICAL | |
101 | ST_SIZEGRIP = _core.ST_SIZEGRIP | |
102 | ST_NO_AUTORESIZE = _core.ST_NO_AUTORESIZE | |
103 | FLOOD_SURFACE = _core.FLOOD_SURFACE | |
104 | FLOOD_BORDER = _core.FLOOD_BORDER | |
105 | ODDEVEN_RULE = _core.ODDEVEN_RULE | |
106 | WINDING_RULE = _core.WINDING_RULE | |
107 | TOOL_TOP = _core.TOOL_TOP | |
108 | TOOL_BOTTOM = _core.TOOL_BOTTOM | |
109 | TOOL_LEFT = _core.TOOL_LEFT | |
110 | TOOL_RIGHT = _core.TOOL_RIGHT | |
111 | OK = _core.OK | |
112 | YES_NO = _core.YES_NO | |
113 | CANCEL = _core.CANCEL | |
114 | YES = _core.YES | |
115 | NO = _core.NO | |
116 | NO_DEFAULT = _core.NO_DEFAULT | |
117 | YES_DEFAULT = _core.YES_DEFAULT | |
118 | ICON_EXCLAMATION = _core.ICON_EXCLAMATION | |
119 | ICON_HAND = _core.ICON_HAND | |
120 | ICON_QUESTION = _core.ICON_QUESTION | |
121 | ICON_INFORMATION = _core.ICON_INFORMATION | |
122 | ICON_STOP = _core.ICON_STOP | |
123 | ICON_ASTERISK = _core.ICON_ASTERISK | |
124 | ICON_MASK = _core.ICON_MASK | |
125 | ICON_WARNING = _core.ICON_WARNING | |
126 | ICON_ERROR = _core.ICON_ERROR | |
127 | FORWARD = _core.FORWARD | |
128 | BACKWARD = _core.BACKWARD | |
129 | RESET = _core.RESET | |
130 | HELP = _core.HELP | |
131 | MORE = _core.MORE | |
132 | SETUP = _core.SETUP | |
133 | SIZE_AUTO_WIDTH = _core.SIZE_AUTO_WIDTH | |
134 | SIZE_AUTO_HEIGHT = _core.SIZE_AUTO_HEIGHT | |
135 | SIZE_AUTO = _core.SIZE_AUTO | |
136 | SIZE_USE_EXISTING = _core.SIZE_USE_EXISTING | |
137 | SIZE_ALLOW_MINUS_ONE = _core.SIZE_ALLOW_MINUS_ONE | |
138 | PORTRAIT = _core.PORTRAIT | |
139 | LANDSCAPE = _core.LANDSCAPE | |
140 | PRINT_QUALITY_HIGH = _core.PRINT_QUALITY_HIGH | |
141 | PRINT_QUALITY_MEDIUM = _core.PRINT_QUALITY_MEDIUM | |
142 | PRINT_QUALITY_LOW = _core.PRINT_QUALITY_LOW | |
143 | PRINT_QUALITY_DRAFT = _core.PRINT_QUALITY_DRAFT | |
144 | ID_ANY = _core.ID_ANY | |
145 | ID_SEPARATOR = _core.ID_SEPARATOR | |
146 | ID_LOWEST = _core.ID_LOWEST | |
147 | ID_OPEN = _core.ID_OPEN | |
148 | ID_CLOSE = _core.ID_CLOSE | |
149 | ID_NEW = _core.ID_NEW | |
150 | ID_SAVE = _core.ID_SAVE | |
151 | ID_SAVEAS = _core.ID_SAVEAS | |
152 | ID_REVERT = _core.ID_REVERT | |
153 | ID_EXIT = _core.ID_EXIT | |
154 | ID_UNDO = _core.ID_UNDO | |
155 | ID_REDO = _core.ID_REDO | |
156 | ID_HELP = _core.ID_HELP | |
157 | ID_PRINT = _core.ID_PRINT | |
158 | ID_PRINT_SETUP = _core.ID_PRINT_SETUP | |
159 | ID_PREVIEW = _core.ID_PREVIEW | |
160 | ID_ABOUT = _core.ID_ABOUT | |
161 | ID_HELP_CONTENTS = _core.ID_HELP_CONTENTS | |
162 | ID_HELP_COMMANDS = _core.ID_HELP_COMMANDS | |
163 | ID_HELP_PROCEDURES = _core.ID_HELP_PROCEDURES | |
164 | ID_HELP_CONTEXT = _core.ID_HELP_CONTEXT | |
165 | ID_CLOSE_ALL = _core.ID_CLOSE_ALL | |
166 | ID_PREFERENCES = _core.ID_PREFERENCES | |
167 | ID_CUT = _core.ID_CUT | |
168 | ID_COPY = _core.ID_COPY | |
169 | ID_PASTE = _core.ID_PASTE | |
170 | ID_CLEAR = _core.ID_CLEAR | |
171 | ID_FIND = _core.ID_FIND | |
172 | ID_DUPLICATE = _core.ID_DUPLICATE | |
173 | ID_SELECTALL = _core.ID_SELECTALL | |
174 | ID_DELETE = _core.ID_DELETE | |
175 | ID_REPLACE = _core.ID_REPLACE | |
176 | ID_REPLACE_ALL = _core.ID_REPLACE_ALL | |
177 | ID_PROPERTIES = _core.ID_PROPERTIES | |
178 | ID_VIEW_DETAILS = _core.ID_VIEW_DETAILS | |
179 | ID_VIEW_LARGEICONS = _core.ID_VIEW_LARGEICONS | |
180 | ID_VIEW_SMALLICONS = _core.ID_VIEW_SMALLICONS | |
181 | ID_VIEW_LIST = _core.ID_VIEW_LIST | |
182 | ID_VIEW_SORTDATE = _core.ID_VIEW_SORTDATE | |
183 | ID_VIEW_SORTNAME = _core.ID_VIEW_SORTNAME | |
184 | ID_VIEW_SORTSIZE = _core.ID_VIEW_SORTSIZE | |
185 | ID_VIEW_SORTTYPE = _core.ID_VIEW_SORTTYPE | |
186 | ID_FILE1 = _core.ID_FILE1 | |
187 | ID_FILE2 = _core.ID_FILE2 | |
188 | ID_FILE3 = _core.ID_FILE3 | |
189 | ID_FILE4 = _core.ID_FILE4 | |
190 | ID_FILE5 = _core.ID_FILE5 | |
191 | ID_FILE6 = _core.ID_FILE6 | |
192 | ID_FILE7 = _core.ID_FILE7 | |
193 | ID_FILE8 = _core.ID_FILE8 | |
194 | ID_FILE9 = _core.ID_FILE9 | |
195 | ID_OK = _core.ID_OK | |
196 | ID_CANCEL = _core.ID_CANCEL | |
197 | ID_APPLY = _core.ID_APPLY | |
198 | ID_YES = _core.ID_YES | |
199 | ID_NO = _core.ID_NO | |
200 | ID_STATIC = _core.ID_STATIC | |
201 | ID_FORWARD = _core.ID_FORWARD | |
202 | ID_BACKWARD = _core.ID_BACKWARD | |
203 | ID_DEFAULT = _core.ID_DEFAULT | |
204 | ID_MORE = _core.ID_MORE | |
205 | ID_SETUP = _core.ID_SETUP | |
206 | ID_RESET = _core.ID_RESET | |
207 | ID_CONTEXT_HELP = _core.ID_CONTEXT_HELP | |
208 | ID_YESTOALL = _core.ID_YESTOALL | |
209 | ID_NOTOALL = _core.ID_NOTOALL | |
210 | ID_ABORT = _core.ID_ABORT | |
211 | ID_RETRY = _core.ID_RETRY | |
212 | ID_IGNORE = _core.ID_IGNORE | |
213 | ID_HIGHEST = _core.ID_HIGHEST | |
214 | OPEN = _core.OPEN | |
215 | SAVE = _core.SAVE | |
216 | HIDE_READONLY = _core.HIDE_READONLY | |
217 | OVERWRITE_PROMPT = _core.OVERWRITE_PROMPT | |
218 | FILE_MUST_EXIST = _core.FILE_MUST_EXIST | |
219 | MULTIPLE = _core.MULTIPLE | |
220 | CHANGE_DIR = _core.CHANGE_DIR | |
221 | ACCEL_ALT = _core.ACCEL_ALT | |
222 | ACCEL_CTRL = _core.ACCEL_CTRL | |
223 | ACCEL_SHIFT = _core.ACCEL_SHIFT | |
224 | ACCEL_NORMAL = _core.ACCEL_NORMAL | |
225 | PD_AUTO_HIDE = _core.PD_AUTO_HIDE | |
226 | PD_APP_MODAL = _core.PD_APP_MODAL | |
227 | PD_CAN_ABORT = _core.PD_CAN_ABORT | |
228 | PD_ELAPSED_TIME = _core.PD_ELAPSED_TIME | |
229 | PD_ESTIMATED_TIME = _core.PD_ESTIMATED_TIME | |
230 | PD_REMAINING_TIME = _core.PD_REMAINING_TIME | |
231 | DD_NEW_DIR_BUTTON = _core.DD_NEW_DIR_BUTTON | |
232 | DD_DEFAULT_STYLE = _core.DD_DEFAULT_STYLE | |
233 | MENU_TEAROFF = _core.MENU_TEAROFF | |
234 | MB_DOCKABLE = _core.MB_DOCKABLE | |
235 | NO_FULL_REPAINT_ON_RESIZE = _core.NO_FULL_REPAINT_ON_RESIZE | |
cc6dd355 | 236 | FULL_REPAINT_ON_RESIZE = _core.FULL_REPAINT_ON_RESIZE |
d14a1e28 RD |
237 | LI_HORIZONTAL = _core.LI_HORIZONTAL |
238 | LI_VERTICAL = _core.LI_VERTICAL | |
239 | WS_EX_VALIDATE_RECURSIVELY = _core.WS_EX_VALIDATE_RECURSIVELY | |
240 | WS_EX_BLOCK_EVENTS = _core.WS_EX_BLOCK_EVENTS | |
241 | WS_EX_TRANSIENT = _core.WS_EX_TRANSIENT | |
242 | WS_EX_THEMED_BACKGROUND = _core.WS_EX_THEMED_BACKGROUND | |
243 | WS_EX_PROCESS_IDLE = _core.WS_EX_PROCESS_IDLE | |
244 | WS_EX_PROCESS_UI_UPDATES = _core.WS_EX_PROCESS_UI_UPDATES | |
245 | MM_TEXT = _core.MM_TEXT | |
246 | MM_LOMETRIC = _core.MM_LOMETRIC | |
247 | MM_HIMETRIC = _core.MM_HIMETRIC | |
248 | MM_LOENGLISH = _core.MM_LOENGLISH | |
249 | MM_HIENGLISH = _core.MM_HIENGLISH | |
250 | MM_TWIPS = _core.MM_TWIPS | |
251 | MM_ISOTROPIC = _core.MM_ISOTROPIC | |
252 | MM_ANISOTROPIC = _core.MM_ANISOTROPIC | |
253 | MM_POINTS = _core.MM_POINTS | |
254 | MM_METRIC = _core.MM_METRIC | |
255 | CENTRE = _core.CENTRE | |
256 | CENTER = _core.CENTER | |
257 | HORIZONTAL = _core.HORIZONTAL | |
258 | VERTICAL = _core.VERTICAL | |
259 | BOTH = _core.BOTH | |
260 | LEFT = _core.LEFT | |
261 | RIGHT = _core.RIGHT | |
262 | UP = _core.UP | |
263 | DOWN = _core.DOWN | |
264 | TOP = _core.TOP | |
265 | BOTTOM = _core.BOTTOM | |
266 | NORTH = _core.NORTH | |
267 | SOUTH = _core.SOUTH | |
268 | WEST = _core.WEST | |
269 | EAST = _core.EAST | |
270 | ALL = _core.ALL | |
271 | ALIGN_NOT = _core.ALIGN_NOT | |
272 | ALIGN_CENTER_HORIZONTAL = _core.ALIGN_CENTER_HORIZONTAL | |
273 | ALIGN_CENTRE_HORIZONTAL = _core.ALIGN_CENTRE_HORIZONTAL | |
274 | ALIGN_LEFT = _core.ALIGN_LEFT | |
275 | ALIGN_TOP = _core.ALIGN_TOP | |
276 | ALIGN_RIGHT = _core.ALIGN_RIGHT | |
277 | ALIGN_BOTTOM = _core.ALIGN_BOTTOM | |
278 | ALIGN_CENTER_VERTICAL = _core.ALIGN_CENTER_VERTICAL | |
279 | ALIGN_CENTRE_VERTICAL = _core.ALIGN_CENTRE_VERTICAL | |
280 | ALIGN_CENTER = _core.ALIGN_CENTER | |
281 | ALIGN_CENTRE = _core.ALIGN_CENTRE | |
282 | ALIGN_MASK = _core.ALIGN_MASK | |
283 | STRETCH_NOT = _core.STRETCH_NOT | |
284 | SHRINK = _core.SHRINK | |
285 | GROW = _core.GROW | |
286 | EXPAND = _core.EXPAND | |
287 | SHAPED = _core.SHAPED | |
288 | ADJUST_MINSIZE = _core.ADJUST_MINSIZE | |
289 | TILE = _core.TILE | |
290 | BORDER_DEFAULT = _core.BORDER_DEFAULT | |
291 | BORDER_NONE = _core.BORDER_NONE | |
292 | BORDER_STATIC = _core.BORDER_STATIC | |
293 | BORDER_SIMPLE = _core.BORDER_SIMPLE | |
294 | BORDER_RAISED = _core.BORDER_RAISED | |
295 | BORDER_SUNKEN = _core.BORDER_SUNKEN | |
296 | BORDER_DOUBLE = _core.BORDER_DOUBLE | |
297 | BORDER_MASK = _core.BORDER_MASK | |
298 | DEFAULT = _core.DEFAULT | |
299 | DECORATIVE = _core.DECORATIVE | |
300 | ROMAN = _core.ROMAN | |
301 | SCRIPT = _core.SCRIPT | |
302 | SWISS = _core.SWISS | |
303 | MODERN = _core.MODERN | |
304 | TELETYPE = _core.TELETYPE | |
305 | VARIABLE = _core.VARIABLE | |
306 | FIXED = _core.FIXED | |
307 | NORMAL = _core.NORMAL | |
308 | LIGHT = _core.LIGHT | |
309 | BOLD = _core.BOLD | |
310 | ITALIC = _core.ITALIC | |
311 | SLANT = _core.SLANT | |
312 | SOLID = _core.SOLID | |
313 | DOT = _core.DOT | |
314 | LONG_DASH = _core.LONG_DASH | |
315 | SHORT_DASH = _core.SHORT_DASH | |
316 | DOT_DASH = _core.DOT_DASH | |
317 | USER_DASH = _core.USER_DASH | |
318 | TRANSPARENT = _core.TRANSPARENT | |
319 | STIPPLE = _core.STIPPLE | |
320 | BDIAGONAL_HATCH = _core.BDIAGONAL_HATCH | |
321 | CROSSDIAG_HATCH = _core.CROSSDIAG_HATCH | |
322 | FDIAGONAL_HATCH = _core.FDIAGONAL_HATCH | |
323 | CROSS_HATCH = _core.CROSS_HATCH | |
324 | HORIZONTAL_HATCH = _core.HORIZONTAL_HATCH | |
325 | VERTICAL_HATCH = _core.VERTICAL_HATCH | |
326 | JOIN_BEVEL = _core.JOIN_BEVEL | |
327 | JOIN_MITER = _core.JOIN_MITER | |
328 | JOIN_ROUND = _core.JOIN_ROUND | |
329 | CAP_ROUND = _core.CAP_ROUND | |
330 | CAP_PROJECTING = _core.CAP_PROJECTING | |
331 | CAP_BUTT = _core.CAP_BUTT | |
332 | CLEAR = _core.CLEAR | |
333 | XOR = _core.XOR | |
334 | INVERT = _core.INVERT | |
335 | OR_REVERSE = _core.OR_REVERSE | |
336 | AND_REVERSE = _core.AND_REVERSE | |
337 | COPY = _core.COPY | |
338 | AND = _core.AND | |
339 | AND_INVERT = _core.AND_INVERT | |
340 | NO_OP = _core.NO_OP | |
341 | NOR = _core.NOR | |
342 | EQUIV = _core.EQUIV | |
343 | SRC_INVERT = _core.SRC_INVERT | |
344 | OR_INVERT = _core.OR_INVERT | |
345 | NAND = _core.NAND | |
346 | OR = _core.OR | |
347 | SET = _core.SET | |
348 | WXK_BACK = _core.WXK_BACK | |
349 | WXK_TAB = _core.WXK_TAB | |
350 | WXK_RETURN = _core.WXK_RETURN | |
351 | WXK_ESCAPE = _core.WXK_ESCAPE | |
352 | WXK_SPACE = _core.WXK_SPACE | |
353 | WXK_DELETE = _core.WXK_DELETE | |
354 | WXK_START = _core.WXK_START | |
355 | WXK_LBUTTON = _core.WXK_LBUTTON | |
356 | WXK_RBUTTON = _core.WXK_RBUTTON | |
357 | WXK_CANCEL = _core.WXK_CANCEL | |
358 | WXK_MBUTTON = _core.WXK_MBUTTON | |
359 | WXK_CLEAR = _core.WXK_CLEAR | |
360 | WXK_SHIFT = _core.WXK_SHIFT | |
361 | WXK_ALT = _core.WXK_ALT | |
362 | WXK_CONTROL = _core.WXK_CONTROL | |
363 | WXK_MENU = _core.WXK_MENU | |
364 | WXK_PAUSE = _core.WXK_PAUSE | |
365 | WXK_CAPITAL = _core.WXK_CAPITAL | |
366 | WXK_PRIOR = _core.WXK_PRIOR | |
367 | WXK_NEXT = _core.WXK_NEXT | |
368 | WXK_END = _core.WXK_END | |
369 | WXK_HOME = _core.WXK_HOME | |
370 | WXK_LEFT = _core.WXK_LEFT | |
371 | WXK_UP = _core.WXK_UP | |
372 | WXK_RIGHT = _core.WXK_RIGHT | |
373 | WXK_DOWN = _core.WXK_DOWN | |
374 | WXK_SELECT = _core.WXK_SELECT | |
375 | WXK_PRINT = _core.WXK_PRINT | |
376 | WXK_EXECUTE = _core.WXK_EXECUTE | |
377 | WXK_SNAPSHOT = _core.WXK_SNAPSHOT | |
378 | WXK_INSERT = _core.WXK_INSERT | |
379 | WXK_HELP = _core.WXK_HELP | |
380 | WXK_NUMPAD0 = _core.WXK_NUMPAD0 | |
381 | WXK_NUMPAD1 = _core.WXK_NUMPAD1 | |
382 | WXK_NUMPAD2 = _core.WXK_NUMPAD2 | |
383 | WXK_NUMPAD3 = _core.WXK_NUMPAD3 | |
384 | WXK_NUMPAD4 = _core.WXK_NUMPAD4 | |
385 | WXK_NUMPAD5 = _core.WXK_NUMPAD5 | |
386 | WXK_NUMPAD6 = _core.WXK_NUMPAD6 | |
387 | WXK_NUMPAD7 = _core.WXK_NUMPAD7 | |
388 | WXK_NUMPAD8 = _core.WXK_NUMPAD8 | |
389 | WXK_NUMPAD9 = _core.WXK_NUMPAD9 | |
390 | WXK_MULTIPLY = _core.WXK_MULTIPLY | |
391 | WXK_ADD = _core.WXK_ADD | |
392 | WXK_SEPARATOR = _core.WXK_SEPARATOR | |
393 | WXK_SUBTRACT = _core.WXK_SUBTRACT | |
394 | WXK_DECIMAL = _core.WXK_DECIMAL | |
395 | WXK_DIVIDE = _core.WXK_DIVIDE | |
396 | WXK_F1 = _core.WXK_F1 | |
397 | WXK_F2 = _core.WXK_F2 | |
398 | WXK_F3 = _core.WXK_F3 | |
399 | WXK_F4 = _core.WXK_F4 | |
400 | WXK_F5 = _core.WXK_F5 | |
401 | WXK_F6 = _core.WXK_F6 | |
402 | WXK_F7 = _core.WXK_F7 | |
403 | WXK_F8 = _core.WXK_F8 | |
404 | WXK_F9 = _core.WXK_F9 | |
405 | WXK_F10 = _core.WXK_F10 | |
406 | WXK_F11 = _core.WXK_F11 | |
407 | WXK_F12 = _core.WXK_F12 | |
408 | WXK_F13 = _core.WXK_F13 | |
409 | WXK_F14 = _core.WXK_F14 | |
410 | WXK_F15 = _core.WXK_F15 | |
411 | WXK_F16 = _core.WXK_F16 | |
412 | WXK_F17 = _core.WXK_F17 | |
413 | WXK_F18 = _core.WXK_F18 | |
414 | WXK_F19 = _core.WXK_F19 | |
415 | WXK_F20 = _core.WXK_F20 | |
416 | WXK_F21 = _core.WXK_F21 | |
417 | WXK_F22 = _core.WXK_F22 | |
418 | WXK_F23 = _core.WXK_F23 | |
419 | WXK_F24 = _core.WXK_F24 | |
420 | WXK_NUMLOCK = _core.WXK_NUMLOCK | |
421 | WXK_SCROLL = _core.WXK_SCROLL | |
422 | WXK_PAGEUP = _core.WXK_PAGEUP | |
423 | WXK_PAGEDOWN = _core.WXK_PAGEDOWN | |
424 | WXK_NUMPAD_SPACE = _core.WXK_NUMPAD_SPACE | |
425 | WXK_NUMPAD_TAB = _core.WXK_NUMPAD_TAB | |
426 | WXK_NUMPAD_ENTER = _core.WXK_NUMPAD_ENTER | |
427 | WXK_NUMPAD_F1 = _core.WXK_NUMPAD_F1 | |
428 | WXK_NUMPAD_F2 = _core.WXK_NUMPAD_F2 | |
429 | WXK_NUMPAD_F3 = _core.WXK_NUMPAD_F3 | |
430 | WXK_NUMPAD_F4 = _core.WXK_NUMPAD_F4 | |
431 | WXK_NUMPAD_HOME = _core.WXK_NUMPAD_HOME | |
432 | WXK_NUMPAD_LEFT = _core.WXK_NUMPAD_LEFT | |
433 | WXK_NUMPAD_UP = _core.WXK_NUMPAD_UP | |
434 | WXK_NUMPAD_RIGHT = _core.WXK_NUMPAD_RIGHT | |
435 | WXK_NUMPAD_DOWN = _core.WXK_NUMPAD_DOWN | |
436 | WXK_NUMPAD_PRIOR = _core.WXK_NUMPAD_PRIOR | |
437 | WXK_NUMPAD_PAGEUP = _core.WXK_NUMPAD_PAGEUP | |
438 | WXK_NUMPAD_NEXT = _core.WXK_NUMPAD_NEXT | |
439 | WXK_NUMPAD_PAGEDOWN = _core.WXK_NUMPAD_PAGEDOWN | |
440 | WXK_NUMPAD_END = _core.WXK_NUMPAD_END | |
441 | WXK_NUMPAD_BEGIN = _core.WXK_NUMPAD_BEGIN | |
442 | WXK_NUMPAD_INSERT = _core.WXK_NUMPAD_INSERT | |
443 | WXK_NUMPAD_DELETE = _core.WXK_NUMPAD_DELETE | |
444 | WXK_NUMPAD_EQUAL = _core.WXK_NUMPAD_EQUAL | |
445 | WXK_NUMPAD_MULTIPLY = _core.WXK_NUMPAD_MULTIPLY | |
446 | WXK_NUMPAD_ADD = _core.WXK_NUMPAD_ADD | |
447 | WXK_NUMPAD_SEPARATOR = _core.WXK_NUMPAD_SEPARATOR | |
448 | WXK_NUMPAD_SUBTRACT = _core.WXK_NUMPAD_SUBTRACT | |
449 | WXK_NUMPAD_DECIMAL = _core.WXK_NUMPAD_DECIMAL | |
450 | WXK_NUMPAD_DIVIDE = _core.WXK_NUMPAD_DIVIDE | |
451 | WXK_WINDOWS_LEFT = _core.WXK_WINDOWS_LEFT | |
452 | WXK_WINDOWS_RIGHT = _core.WXK_WINDOWS_RIGHT | |
453 | WXK_WINDOWS_MENU = _core.WXK_WINDOWS_MENU | |
454 | PAPER_NONE = _core.PAPER_NONE | |
455 | PAPER_LETTER = _core.PAPER_LETTER | |
456 | PAPER_LEGAL = _core.PAPER_LEGAL | |
457 | PAPER_A4 = _core.PAPER_A4 | |
458 | PAPER_CSHEET = _core.PAPER_CSHEET | |
459 | PAPER_DSHEET = _core.PAPER_DSHEET | |
460 | PAPER_ESHEET = _core.PAPER_ESHEET | |
461 | PAPER_LETTERSMALL = _core.PAPER_LETTERSMALL | |
462 | PAPER_TABLOID = _core.PAPER_TABLOID | |
463 | PAPER_LEDGER = _core.PAPER_LEDGER | |
464 | PAPER_STATEMENT = _core.PAPER_STATEMENT | |
465 | PAPER_EXECUTIVE = _core.PAPER_EXECUTIVE | |
466 | PAPER_A3 = _core.PAPER_A3 | |
467 | PAPER_A4SMALL = _core.PAPER_A4SMALL | |
468 | PAPER_A5 = _core.PAPER_A5 | |
469 | PAPER_B4 = _core.PAPER_B4 | |
470 | PAPER_B5 = _core.PAPER_B5 | |
471 | PAPER_FOLIO = _core.PAPER_FOLIO | |
472 | PAPER_QUARTO = _core.PAPER_QUARTO | |
473 | PAPER_10X14 = _core.PAPER_10X14 | |
474 | PAPER_11X17 = _core.PAPER_11X17 | |
475 | PAPER_NOTE = _core.PAPER_NOTE | |
476 | PAPER_ENV_9 = _core.PAPER_ENV_9 | |
477 | PAPER_ENV_10 = _core.PAPER_ENV_10 | |
478 | PAPER_ENV_11 = _core.PAPER_ENV_11 | |
479 | PAPER_ENV_12 = _core.PAPER_ENV_12 | |
480 | PAPER_ENV_14 = _core.PAPER_ENV_14 | |
481 | PAPER_ENV_DL = _core.PAPER_ENV_DL | |
482 | PAPER_ENV_C5 = _core.PAPER_ENV_C5 | |
483 | PAPER_ENV_C3 = _core.PAPER_ENV_C3 | |
484 | PAPER_ENV_C4 = _core.PAPER_ENV_C4 | |
485 | PAPER_ENV_C6 = _core.PAPER_ENV_C6 | |
486 | PAPER_ENV_C65 = _core.PAPER_ENV_C65 | |
487 | PAPER_ENV_B4 = _core.PAPER_ENV_B4 | |
488 | PAPER_ENV_B5 = _core.PAPER_ENV_B5 | |
489 | PAPER_ENV_B6 = _core.PAPER_ENV_B6 | |
490 | PAPER_ENV_ITALY = _core.PAPER_ENV_ITALY | |
491 | PAPER_ENV_MONARCH = _core.PAPER_ENV_MONARCH | |
492 | PAPER_ENV_PERSONAL = _core.PAPER_ENV_PERSONAL | |
493 | PAPER_FANFOLD_US = _core.PAPER_FANFOLD_US | |
494 | PAPER_FANFOLD_STD_GERMAN = _core.PAPER_FANFOLD_STD_GERMAN | |
495 | PAPER_FANFOLD_LGL_GERMAN = _core.PAPER_FANFOLD_LGL_GERMAN | |
496 | PAPER_ISO_B4 = _core.PAPER_ISO_B4 | |
497 | PAPER_JAPANESE_POSTCARD = _core.PAPER_JAPANESE_POSTCARD | |
498 | PAPER_9X11 = _core.PAPER_9X11 | |
499 | PAPER_10X11 = _core.PAPER_10X11 | |
500 | PAPER_15X11 = _core.PAPER_15X11 | |
501 | PAPER_ENV_INVITE = _core.PAPER_ENV_INVITE | |
502 | PAPER_LETTER_EXTRA = _core.PAPER_LETTER_EXTRA | |
503 | PAPER_LEGAL_EXTRA = _core.PAPER_LEGAL_EXTRA | |
504 | PAPER_TABLOID_EXTRA = _core.PAPER_TABLOID_EXTRA | |
505 | PAPER_A4_EXTRA = _core.PAPER_A4_EXTRA | |
506 | PAPER_LETTER_TRANSVERSE = _core.PAPER_LETTER_TRANSVERSE | |
507 | PAPER_A4_TRANSVERSE = _core.PAPER_A4_TRANSVERSE | |
508 | PAPER_LETTER_EXTRA_TRANSVERSE = _core.PAPER_LETTER_EXTRA_TRANSVERSE | |
509 | PAPER_A_PLUS = _core.PAPER_A_PLUS | |
510 | PAPER_B_PLUS = _core.PAPER_B_PLUS | |
511 | PAPER_LETTER_PLUS = _core.PAPER_LETTER_PLUS | |
512 | PAPER_A4_PLUS = _core.PAPER_A4_PLUS | |
513 | PAPER_A5_TRANSVERSE = _core.PAPER_A5_TRANSVERSE | |
514 | PAPER_B5_TRANSVERSE = _core.PAPER_B5_TRANSVERSE | |
515 | PAPER_A3_EXTRA = _core.PAPER_A3_EXTRA | |
516 | PAPER_A5_EXTRA = _core.PAPER_A5_EXTRA | |
517 | PAPER_B5_EXTRA = _core.PAPER_B5_EXTRA | |
518 | PAPER_A2 = _core.PAPER_A2 | |
519 | PAPER_A3_TRANSVERSE = _core.PAPER_A3_TRANSVERSE | |
520 | PAPER_A3_EXTRA_TRANSVERSE = _core.PAPER_A3_EXTRA_TRANSVERSE | |
521 | DUPLEX_SIMPLEX = _core.DUPLEX_SIMPLEX | |
522 | DUPLEX_HORIZONTAL = _core.DUPLEX_HORIZONTAL | |
523 | DUPLEX_VERTICAL = _core.DUPLEX_VERTICAL | |
524 | ITEM_SEPARATOR = _core.ITEM_SEPARATOR | |
525 | ITEM_NORMAL = _core.ITEM_NORMAL | |
526 | ITEM_CHECK = _core.ITEM_CHECK | |
527 | ITEM_RADIO = _core.ITEM_RADIO | |
528 | ITEM_MAX = _core.ITEM_MAX | |
529 | HT_NOWHERE = _core.HT_NOWHERE | |
530 | HT_SCROLLBAR_FIRST = _core.HT_SCROLLBAR_FIRST | |
531 | HT_SCROLLBAR_ARROW_LINE_1 = _core.HT_SCROLLBAR_ARROW_LINE_1 | |
532 | HT_SCROLLBAR_ARROW_LINE_2 = _core.HT_SCROLLBAR_ARROW_LINE_2 | |
533 | HT_SCROLLBAR_ARROW_PAGE_1 = _core.HT_SCROLLBAR_ARROW_PAGE_1 | |
534 | HT_SCROLLBAR_ARROW_PAGE_2 = _core.HT_SCROLLBAR_ARROW_PAGE_2 | |
535 | HT_SCROLLBAR_THUMB = _core.HT_SCROLLBAR_THUMB | |
536 | HT_SCROLLBAR_BAR_1 = _core.HT_SCROLLBAR_BAR_1 | |
537 | HT_SCROLLBAR_BAR_2 = _core.HT_SCROLLBAR_BAR_2 | |
538 | HT_SCROLLBAR_LAST = _core.HT_SCROLLBAR_LAST | |
539 | HT_WINDOW_OUTSIDE = _core.HT_WINDOW_OUTSIDE | |
540 | HT_WINDOW_INSIDE = _core.HT_WINDOW_INSIDE | |
541 | HT_WINDOW_VERT_SCROLLBAR = _core.HT_WINDOW_VERT_SCROLLBAR | |
542 | HT_WINDOW_HORZ_SCROLLBAR = _core.HT_WINDOW_HORZ_SCROLLBAR | |
543 | HT_WINDOW_CORNER = _core.HT_WINDOW_CORNER | |
544 | HT_MAX = _core.HT_MAX | |
545 | MOD_NONE = _core.MOD_NONE | |
546 | MOD_ALT = _core.MOD_ALT | |
547 | MOD_CONTROL = _core.MOD_CONTROL | |
548 | MOD_SHIFT = _core.MOD_SHIFT | |
549 | MOD_WIN = _core.MOD_WIN | |
550 | UPDATE_UI_NONE = _core.UPDATE_UI_NONE | |
551 | UPDATE_UI_RECURSE = _core.UPDATE_UI_RECURSE | |
552 | UPDATE_UI_FROMIDLE = _core.UPDATE_UI_FROMIDLE | |
553 | #--------------------------------------------------------------------------- | |
554 | ||
555 | class Object(object): | |
0df68c9f RD |
556 | """ |
557 | The base class for most wx objects, although in wxPython not | |
558 | much functionality is needed nor exposed. | |
559 | """ | |
d14a1e28 RD |
560 | def __init__(self): raise RuntimeError, "No constructor defined" |
561 | def __repr__(self): | |
562 | return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 563 | def GetClassName(*args, **kwargs): |
0df68c9f RD |
564 | """ |
565 | GetClassName() -> wxString | |
e811c8ce | 566 | |
0df68c9f RD |
567 | Returns the class name of the C++ object using wxRTTI. |
568 | """ | |
e811c8ce RD |
569 | return _core.Object_GetClassName(*args, **kwargs) |
570 | ||
571 | def Destroy(*args, **kwargs): | |
0df68c9f RD |
572 | """ |
573 | Destroy() | |
e811c8ce | 574 | |
0df68c9f RD |
575 | Deletes the C++ object this Python object is a proxy for. |
576 | """ | |
e811c8ce RD |
577 | return _core.Object_Destroy(*args, **kwargs) |
578 | ||
d14a1e28 RD |
579 | |
580 | class ObjectPtr(Object): | |
581 | def __init__(self, this): | |
582 | self.this = this | |
583 | if not hasattr(self,"thisown"): self.thisown = 0 | |
584 | self.__class__ = Object | |
585 | _core.Object_swigregister(ObjectPtr) | |
586 | _wxPySetDictionary = _core._wxPySetDictionary | |
587 | ||
588 | ||
589 | #--------------------------------------------------------------------------- | |
590 | ||
591 | BITMAP_TYPE_INVALID = _core.BITMAP_TYPE_INVALID | |
592 | BITMAP_TYPE_BMP = _core.BITMAP_TYPE_BMP | |
593 | BITMAP_TYPE_BMP_RESOURCE = _core.BITMAP_TYPE_BMP_RESOURCE | |
594 | BITMAP_TYPE_RESOURCE = _core.BITMAP_TYPE_RESOURCE | |
595 | BITMAP_TYPE_ICO = _core.BITMAP_TYPE_ICO | |
596 | BITMAP_TYPE_ICO_RESOURCE = _core.BITMAP_TYPE_ICO_RESOURCE | |
597 | BITMAP_TYPE_CUR = _core.BITMAP_TYPE_CUR | |
598 | BITMAP_TYPE_CUR_RESOURCE = _core.BITMAP_TYPE_CUR_RESOURCE | |
599 | BITMAP_TYPE_XBM = _core.BITMAP_TYPE_XBM | |
600 | BITMAP_TYPE_XBM_DATA = _core.BITMAP_TYPE_XBM_DATA | |
601 | BITMAP_TYPE_XPM = _core.BITMAP_TYPE_XPM | |
602 | BITMAP_TYPE_XPM_DATA = _core.BITMAP_TYPE_XPM_DATA | |
603 | BITMAP_TYPE_TIF = _core.BITMAP_TYPE_TIF | |
604 | BITMAP_TYPE_TIF_RESOURCE = _core.BITMAP_TYPE_TIF_RESOURCE | |
605 | BITMAP_TYPE_GIF = _core.BITMAP_TYPE_GIF | |
606 | BITMAP_TYPE_GIF_RESOURCE = _core.BITMAP_TYPE_GIF_RESOURCE | |
607 | BITMAP_TYPE_PNG = _core.BITMAP_TYPE_PNG | |
608 | BITMAP_TYPE_PNG_RESOURCE = _core.BITMAP_TYPE_PNG_RESOURCE | |
609 | BITMAP_TYPE_JPEG = _core.BITMAP_TYPE_JPEG | |
610 | BITMAP_TYPE_JPEG_RESOURCE = _core.BITMAP_TYPE_JPEG_RESOURCE | |
611 | BITMAP_TYPE_PNM = _core.BITMAP_TYPE_PNM | |
612 | BITMAP_TYPE_PNM_RESOURCE = _core.BITMAP_TYPE_PNM_RESOURCE | |
613 | BITMAP_TYPE_PCX = _core.BITMAP_TYPE_PCX | |
614 | BITMAP_TYPE_PCX_RESOURCE = _core.BITMAP_TYPE_PCX_RESOURCE | |
615 | BITMAP_TYPE_PICT = _core.BITMAP_TYPE_PICT | |
616 | BITMAP_TYPE_PICT_RESOURCE = _core.BITMAP_TYPE_PICT_RESOURCE | |
617 | BITMAP_TYPE_ICON = _core.BITMAP_TYPE_ICON | |
618 | BITMAP_TYPE_ICON_RESOURCE = _core.BITMAP_TYPE_ICON_RESOURCE | |
619 | BITMAP_TYPE_ANI = _core.BITMAP_TYPE_ANI | |
620 | BITMAP_TYPE_IFF = _core.BITMAP_TYPE_IFF | |
621 | BITMAP_TYPE_MACCURSOR = _core.BITMAP_TYPE_MACCURSOR | |
622 | BITMAP_TYPE_MACCURSOR_RESOURCE = _core.BITMAP_TYPE_MACCURSOR_RESOURCE | |
623 | BITMAP_TYPE_ANY = _core.BITMAP_TYPE_ANY | |
624 | CURSOR_NONE = _core.CURSOR_NONE | |
625 | CURSOR_ARROW = _core.CURSOR_ARROW | |
626 | CURSOR_RIGHT_ARROW = _core.CURSOR_RIGHT_ARROW | |
627 | CURSOR_BULLSEYE = _core.CURSOR_BULLSEYE | |
628 | CURSOR_CHAR = _core.CURSOR_CHAR | |
629 | CURSOR_CROSS = _core.CURSOR_CROSS | |
630 | CURSOR_HAND = _core.CURSOR_HAND | |
631 | CURSOR_IBEAM = _core.CURSOR_IBEAM | |
632 | CURSOR_LEFT_BUTTON = _core.CURSOR_LEFT_BUTTON | |
633 | CURSOR_MAGNIFIER = _core.CURSOR_MAGNIFIER | |
634 | CURSOR_MIDDLE_BUTTON = _core.CURSOR_MIDDLE_BUTTON | |
635 | CURSOR_NO_ENTRY = _core.CURSOR_NO_ENTRY | |
636 | CURSOR_PAINT_BRUSH = _core.CURSOR_PAINT_BRUSH | |
637 | CURSOR_PENCIL = _core.CURSOR_PENCIL | |
638 | CURSOR_POINT_LEFT = _core.CURSOR_POINT_LEFT | |
639 | CURSOR_POINT_RIGHT = _core.CURSOR_POINT_RIGHT | |
640 | CURSOR_QUESTION_ARROW = _core.CURSOR_QUESTION_ARROW | |
641 | CURSOR_RIGHT_BUTTON = _core.CURSOR_RIGHT_BUTTON | |
642 | CURSOR_SIZENESW = _core.CURSOR_SIZENESW | |
643 | CURSOR_SIZENS = _core.CURSOR_SIZENS | |
644 | CURSOR_SIZENWSE = _core.CURSOR_SIZENWSE | |
645 | CURSOR_SIZEWE = _core.CURSOR_SIZEWE | |
646 | CURSOR_SIZING = _core.CURSOR_SIZING | |
647 | CURSOR_SPRAYCAN = _core.CURSOR_SPRAYCAN | |
648 | CURSOR_WAIT = _core.CURSOR_WAIT | |
649 | CURSOR_WATCH = _core.CURSOR_WATCH | |
650 | CURSOR_BLANK = _core.CURSOR_BLANK | |
651 | CURSOR_DEFAULT = _core.CURSOR_DEFAULT | |
652 | CURSOR_COPY_ARROW = _core.CURSOR_COPY_ARROW | |
653 | CURSOR_ARROWWAIT = _core.CURSOR_ARROWWAIT | |
654 | CURSOR_MAX = _core.CURSOR_MAX | |
655 | #--------------------------------------------------------------------------- | |
656 | ||
657 | class Size(object): | |
0df68c9f RD |
658 | """ |
659 | wx.Size is a useful data structure used to represent the size of something. | |
660 | It simply contians integer width and height proprtites. In most places in | |
661 | wxPython where a wx.Size is expected a (width,height) tuple can be used | |
662 | instead. | |
663 | """ | |
e811c8ce RD |
664 | def __repr__(self): |
665 | return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
666 | width = property(_core.Size_width_get, _core.Size_width_set) |
667 | height = property(_core.Size_height_get, _core.Size_height_set) | |
242b7b46 | 668 | x = width; y = height |
d14a1e28 | 669 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
670 | """ |
671 | __init__(int w=0, int h=0) -> Size | |
e811c8ce | 672 | |
0df68c9f RD |
673 | Creates a size object. |
674 | """ | |
d14a1e28 RD |
675 | newobj = _core.new_Size(*args, **kwargs) |
676 | self.this = newobj.this | |
677 | self.thisown = 1 | |
678 | del newobj.thisown | |
679 | def __del__(self, destroy=_core.delete_Size): | |
e811c8ce | 680 | """__del__()""" |
d14a1e28 RD |
681 | try: |
682 | if self.thisown: destroy(self) | |
683 | except: pass | |
e811c8ce RD |
684 | |
685 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
686 | """ |
687 | __eq__(Size sz) -> bool | |
e811c8ce | 688 | |
0df68c9f RD |
689 | Test for equality of wx.Size objects. |
690 | """ | |
e811c8ce RD |
691 | return _core.Size___eq__(*args, **kwargs) |
692 | ||
693 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
694 | """ |
695 | __ne__(Size sz) -> bool | |
e811c8ce | 696 | |
0df68c9f RD |
697 | Test for inequality. |
698 | """ | |
e811c8ce RD |
699 | return _core.Size___ne__(*args, **kwargs) |
700 | ||
701 | def __add__(*args, **kwargs): | |
0df68c9f RD |
702 | """ |
703 | __add__(Size sz) -> Size | |
e811c8ce | 704 | |
0df68c9f RD |
705 | Add sz's proprties to this and return the result. |
706 | """ | |
e811c8ce RD |
707 | return _core.Size___add__(*args, **kwargs) |
708 | ||
709 | def __sub__(*args, **kwargs): | |
0df68c9f RD |
710 | """ |
711 | __sub__(Size sz) -> Size | |
e811c8ce | 712 | |
0df68c9f RD |
713 | Subtract sz's properties from this and return the result. |
714 | """ | |
e811c8ce RD |
715 | return _core.Size___sub__(*args, **kwargs) |
716 | ||
717 | def IncTo(*args, **kwargs): | |
0df68c9f RD |
718 | """ |
719 | IncTo(Size sz) | |
e811c8ce | 720 | |
0df68c9f RD |
721 | Increments this object so that both of its dimensions are not less |
722 | than the corresponding dimensions of the size. | |
723 | """ | |
e811c8ce RD |
724 | return _core.Size_IncTo(*args, **kwargs) |
725 | ||
726 | def DecTo(*args, **kwargs): | |
0df68c9f RD |
727 | """ |
728 | DecTo(Size sz) | |
e811c8ce | 729 | |
0df68c9f RD |
730 | Decrements this object so that both of its dimensions are not greater |
731 | than the corresponding dimensions of the size. | |
732 | """ | |
e811c8ce RD |
733 | return _core.Size_DecTo(*args, **kwargs) |
734 | ||
735 | def Set(*args, **kwargs): | |
0df68c9f RD |
736 | """ |
737 | Set(int w, int h) | |
e811c8ce | 738 | |
0df68c9f RD |
739 | Set both width and height. |
740 | """ | |
e811c8ce RD |
741 | return _core.Size_Set(*args, **kwargs) |
742 | ||
743 | def SetWidth(*args, **kwargs): | |
744 | """SetWidth(int w)""" | |
745 | return _core.Size_SetWidth(*args, **kwargs) | |
746 | ||
747 | def SetHeight(*args, **kwargs): | |
748 | """SetHeight(int h)""" | |
749 | return _core.Size_SetHeight(*args, **kwargs) | |
750 | ||
751 | def GetWidth(*args, **kwargs): | |
752 | """GetWidth() -> int""" | |
753 | return _core.Size_GetWidth(*args, **kwargs) | |
754 | ||
755 | def GetHeight(*args, **kwargs): | |
756 | """GetHeight() -> int""" | |
757 | return _core.Size_GetHeight(*args, **kwargs) | |
758 | ||
759 | def Get(*args, **kwargs): | |
0df68c9f RD |
760 | """ |
761 | Get() -> (width,height) | |
e811c8ce | 762 | |
0df68c9f RD |
763 | Returns the width and height properties as a tuple. |
764 | """ | |
e811c8ce RD |
765 | return _core.Size_Get(*args, **kwargs) |
766 | ||
767 | asTuple = Get | |
768 | def __str__(self): return str(self.Get()) | |
769 | def __repr__(self): return 'wx.Size'+str(self.Get()) | |
770 | def __len__(self): return len(self.Get()) | |
771 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
772 | def __setitem__(self, index, val): |
773 | if index == 0: self.width = val | |
774 | elif index == 1: self.height = val | |
775 | else: raise IndexError | |
e811c8ce | 776 | def __nonzero__(self): return self.Get() != (0,0) |
d14a1e28 | 777 | def __getinitargs__(self): return () |
e811c8ce | 778 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
779 | def __setstate__(self, state): self.Set(*state) |
780 | ||
781 | ||
782 | class SizePtr(Size): | |
783 | def __init__(self, this): | |
784 | self.this = this | |
785 | if not hasattr(self,"thisown"): self.thisown = 0 | |
786 | self.__class__ = Size | |
787 | _core.Size_swigregister(SizePtr) | |
788 | ||
789 | #--------------------------------------------------------------------------- | |
790 | ||
791 | class RealPoint(object): | |
0df68c9f RD |
792 | """ |
793 | A data structure for representing a point or position with floating point x | |
794 | and y properties. In wxPython most places that expect a wx.RealPoint can also | |
795 | accept a (x,y) tuple. | |
796 | """ | |
e811c8ce RD |
797 | def __repr__(self): |
798 | return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
799 | x = property(_core.RealPoint_x_get, _core.RealPoint_x_set) |
800 | y = property(_core.RealPoint_y_get, _core.RealPoint_y_set) | |
801 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
802 | """ |
803 | __init__(double x=0.0, double y=0.0) -> RealPoint | |
e811c8ce | 804 | |
0df68c9f RD |
805 | Create a wx.RealPoint object |
806 | """ | |
d14a1e28 RD |
807 | newobj = _core.new_RealPoint(*args, **kwargs) |
808 | self.this = newobj.this | |
809 | self.thisown = 1 | |
810 | del newobj.thisown | |
811 | def __del__(self, destroy=_core.delete_RealPoint): | |
e811c8ce | 812 | """__del__()""" |
d14a1e28 RD |
813 | try: |
814 | if self.thisown: destroy(self) | |
815 | except: pass | |
e811c8ce RD |
816 | |
817 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
818 | """ |
819 | __eq__(RealPoint pt) -> bool | |
e811c8ce | 820 | |
0df68c9f RD |
821 | Test for equality of wx.RealPoint objects. |
822 | """ | |
e811c8ce RD |
823 | return _core.RealPoint___eq__(*args, **kwargs) |
824 | ||
825 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
826 | """ |
827 | __ne__(RealPoint pt) -> bool | |
e811c8ce | 828 | |
0df68c9f RD |
829 | Test for inequality of wx.RealPoint objects. |
830 | """ | |
e811c8ce RD |
831 | return _core.RealPoint___ne__(*args, **kwargs) |
832 | ||
833 | def __add__(*args, **kwargs): | |
0df68c9f RD |
834 | """ |
835 | __add__(RealPoint pt) -> RealPoint | |
e811c8ce | 836 | |
0df68c9f RD |
837 | Add pt's proprties to this and return the result. |
838 | """ | |
e811c8ce RD |
839 | return _core.RealPoint___add__(*args, **kwargs) |
840 | ||
841 | def __sub__(*args, **kwargs): | |
0df68c9f RD |
842 | """ |
843 | __sub__(RealPoint pt) -> RealPoint | |
e811c8ce | 844 | |
0df68c9f RD |
845 | Subtract pt's proprties from this and return the result |
846 | """ | |
e811c8ce RD |
847 | return _core.RealPoint___sub__(*args, **kwargs) |
848 | ||
849 | def Set(*args, **kwargs): | |
0df68c9f RD |
850 | """ |
851 | Set(double x, double y) | |
e811c8ce | 852 | |
0df68c9f RD |
853 | Set both the x and y properties |
854 | """ | |
e811c8ce RD |
855 | return _core.RealPoint_Set(*args, **kwargs) |
856 | ||
857 | def Get(*args, **kwargs): | |
0df68c9f RD |
858 | """ |
859 | Get() -> (x,y) | |
e811c8ce | 860 | |
0df68c9f RD |
861 | Return the x and y properties as a tuple. |
862 | """ | |
e811c8ce RD |
863 | return _core.RealPoint_Get(*args, **kwargs) |
864 | ||
865 | asTuple = Get | |
866 | def __str__(self): return str(self.Get()) | |
867 | def __repr__(self): return 'wx.RealPoint'+str(self.Get()) | |
868 | def __len__(self): return len(self.Get()) | |
869 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 870 | def __setitem__(self, index, val): |
e811c8ce RD |
871 | if index == 0: self.x = val |
872 | elif index == 1: self.y = val | |
d14a1e28 | 873 | else: raise IndexError |
e811c8ce | 874 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
d14a1e28 | 875 | def __getinitargs__(self): return () |
e811c8ce | 876 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
877 | def __setstate__(self, state): self.Set(*state) |
878 | ||
879 | ||
880 | class RealPointPtr(RealPoint): | |
881 | def __init__(self, this): | |
882 | self.this = this | |
883 | if not hasattr(self,"thisown"): self.thisown = 0 | |
884 | self.__class__ = RealPoint | |
885 | _core.RealPoint_swigregister(RealPointPtr) | |
886 | ||
887 | #--------------------------------------------------------------------------- | |
888 | ||
889 | class Point(object): | |
0df68c9f RD |
890 | """ |
891 | A data structure for representing a point or position with integer x and y | |
892 | properties. Most places in wxPython that expect a wx.Point can also accept a | |
893 | (x,y) tuple. | |
894 | """ | |
e811c8ce RD |
895 | def __repr__(self): |
896 | return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
897 | x = property(_core.Point_x_get, _core.Point_x_set) |
898 | y = property(_core.Point_y_get, _core.Point_y_set) | |
899 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
900 | """ |
901 | __init__(int x=0, int y=0) -> Point | |
e811c8ce | 902 | |
0df68c9f RD |
903 | Create a wx.Point object |
904 | """ | |
d14a1e28 RD |
905 | newobj = _core.new_Point(*args, **kwargs) |
906 | self.this = newobj.this | |
907 | self.thisown = 1 | |
908 | del newobj.thisown | |
909 | def __del__(self, destroy=_core.delete_Point): | |
e811c8ce | 910 | """__del__()""" |
d14a1e28 RD |
911 | try: |
912 | if self.thisown: destroy(self) | |
913 | except: pass | |
e811c8ce RD |
914 | |
915 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
916 | """ |
917 | __eq__(Point pt) -> bool | |
e811c8ce | 918 | |
0df68c9f RD |
919 | Test for equality of wx.Point objects. |
920 | """ | |
e811c8ce RD |
921 | return _core.Point___eq__(*args, **kwargs) |
922 | ||
923 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
924 | """ |
925 | __ne__(Point pt) -> bool | |
e811c8ce | 926 | |
0df68c9f RD |
927 | Test for inequality of wx.Point objects. |
928 | """ | |
e811c8ce RD |
929 | return _core.Point___ne__(*args, **kwargs) |
930 | ||
931 | def __add__(*args, **kwargs): | |
0df68c9f RD |
932 | """ |
933 | __add__(Point pt) -> Point | |
e811c8ce | 934 | |
0df68c9f RD |
935 | Add pt's proprties to this and return the result. |
936 | """ | |
e811c8ce RD |
937 | return _core.Point___add__(*args, **kwargs) |
938 | ||
939 | def __sub__(*args, **kwargs): | |
0df68c9f RD |
940 | """ |
941 | __sub__(Point pt) -> Point | |
e811c8ce | 942 | |
0df68c9f RD |
943 | Subtract pt's proprties from this and return the result |
944 | """ | |
e811c8ce RD |
945 | return _core.Point___sub__(*args, **kwargs) |
946 | ||
947 | def __iadd__(*args, **kwargs): | |
0df68c9f RD |
948 | """ |
949 | __iadd__(Point pt) -> Point | |
e811c8ce | 950 | |
0df68c9f RD |
951 | Add pt to this object. |
952 | """ | |
e811c8ce RD |
953 | return _core.Point___iadd__(*args, **kwargs) |
954 | ||
955 | def __isub__(*args, **kwargs): | |
0df68c9f RD |
956 | """ |
957 | __isub__(Point pt) -> Point | |
e811c8ce | 958 | |
0df68c9f RD |
959 | Subtract pt from this object. |
960 | """ | |
e811c8ce RD |
961 | return _core.Point___isub__(*args, **kwargs) |
962 | ||
963 | def Set(*args, **kwargs): | |
0df68c9f RD |
964 | """ |
965 | Set(long x, long y) | |
e811c8ce | 966 | |
0df68c9f RD |
967 | Set both the x and y properties |
968 | """ | |
e811c8ce RD |
969 | return _core.Point_Set(*args, **kwargs) |
970 | ||
971 | def Get(*args, **kwargs): | |
0df68c9f RD |
972 | """ |
973 | Get() -> (x,y) | |
e811c8ce | 974 | |
0df68c9f RD |
975 | Return the x and y properties as a tuple. |
976 | """ | |
e811c8ce RD |
977 | return _core.Point_Get(*args, **kwargs) |
978 | ||
979 | asTuple = Get | |
980 | def __str__(self): return str(self.Get()) | |
981 | def __repr__(self): return 'wx.Point'+str(self.Get()) | |
982 | def __len__(self): return len(self.Get()) | |
983 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
984 | def __setitem__(self, index, val): |
985 | if index == 0: self.x = val | |
986 | elif index == 1: self.y = val | |
987 | else: raise IndexError | |
e811c8ce | 988 | def __nonzero__(self): return self.Get() != (0,0) |
d14a1e28 | 989 | def __getinitargs__(self): return () |
e811c8ce | 990 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
991 | def __setstate__(self, state): self.Set(*state) |
992 | ||
993 | ||
994 | class PointPtr(Point): | |
995 | def __init__(self, this): | |
996 | self.this = this | |
997 | if not hasattr(self,"thisown"): self.thisown = 0 | |
998 | self.__class__ = Point | |
999 | _core.Point_swigregister(PointPtr) | |
1000 | ||
1001 | #--------------------------------------------------------------------------- | |
1002 | ||
1003 | class Rect(object): | |
0df68c9f RD |
1004 | """ |
1005 | A class for representing and manipulating rectangles. It has x, y, width and | |
1006 | height properties. In wxPython most palces that expect a wx.Rect can also | |
1007 | accept a (x,y,width,height) tuple. | |
1008 | """ | |
e811c8ce RD |
1009 | def __repr__(self): |
1010 | return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1011 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
1012 | """ |
1013 | __init__(int x=0, int y=0, int width=0, int height=0) -> Rect | |
e811c8ce | 1014 | |
0df68c9f RD |
1015 | Create a new Rect object. |
1016 | """ | |
d14a1e28 RD |
1017 | newobj = _core.new_Rect(*args, **kwargs) |
1018 | self.this = newobj.this | |
1019 | self.thisown = 1 | |
1020 | del newobj.thisown | |
1021 | def __del__(self, destroy=_core.delete_Rect): | |
e811c8ce | 1022 | """__del__()""" |
d14a1e28 RD |
1023 | try: |
1024 | if self.thisown: destroy(self) | |
1025 | except: pass | |
e811c8ce RD |
1026 | |
1027 | def GetX(*args, **kwargs): | |
1028 | """GetX() -> int""" | |
1029 | return _core.Rect_GetX(*args, **kwargs) | |
1030 | ||
1031 | def SetX(*args, **kwargs): | |
1032 | """SetX(int x)""" | |
1033 | return _core.Rect_SetX(*args, **kwargs) | |
1034 | ||
1035 | def GetY(*args, **kwargs): | |
1036 | """GetY() -> int""" | |
1037 | return _core.Rect_GetY(*args, **kwargs) | |
1038 | ||
1039 | def SetY(*args, **kwargs): | |
1040 | """SetY(int y)""" | |
1041 | return _core.Rect_SetY(*args, **kwargs) | |
1042 | ||
1043 | def GetWidth(*args, **kwargs): | |
1044 | """GetWidth() -> int""" | |
1045 | return _core.Rect_GetWidth(*args, **kwargs) | |
1046 | ||
1047 | def SetWidth(*args, **kwargs): | |
1048 | """SetWidth(int w)""" | |
1049 | return _core.Rect_SetWidth(*args, **kwargs) | |
1050 | ||
1051 | def GetHeight(*args, **kwargs): | |
1052 | """GetHeight() -> int""" | |
1053 | return _core.Rect_GetHeight(*args, **kwargs) | |
1054 | ||
1055 | def SetHeight(*args, **kwargs): | |
1056 | """SetHeight(int h)""" | |
1057 | return _core.Rect_SetHeight(*args, **kwargs) | |
1058 | ||
1059 | def GetPosition(*args, **kwargs): | |
1060 | """GetPosition() -> Point""" | |
1061 | return _core.Rect_GetPosition(*args, **kwargs) | |
1062 | ||
1063 | def SetPosition(*args, **kwargs): | |
1064 | """SetPosition(Point p)""" | |
1065 | return _core.Rect_SetPosition(*args, **kwargs) | |
1066 | ||
1067 | def GetSize(*args, **kwargs): | |
1068 | """GetSize() -> Size""" | |
1069 | return _core.Rect_GetSize(*args, **kwargs) | |
1070 | ||
1071 | def SetSize(*args, **kwargs): | |
1072 | """SetSize(Size s)""" | |
1073 | return _core.Rect_SetSize(*args, **kwargs) | |
1074 | ||
1075 | def GetLeft(*args, **kwargs): | |
1076 | """GetLeft() -> int""" | |
1077 | return _core.Rect_GetLeft(*args, **kwargs) | |
1078 | ||
1079 | def GetTop(*args, **kwargs): | |
1080 | """GetTop() -> int""" | |
1081 | return _core.Rect_GetTop(*args, **kwargs) | |
1082 | ||
1083 | def GetBottom(*args, **kwargs): | |
1084 | """GetBottom() -> int""" | |
1085 | return _core.Rect_GetBottom(*args, **kwargs) | |
1086 | ||
1087 | def GetRight(*args, **kwargs): | |
1088 | """GetRight() -> int""" | |
1089 | return _core.Rect_GetRight(*args, **kwargs) | |
1090 | ||
1091 | def SetLeft(*args, **kwargs): | |
1092 | """SetLeft(int left)""" | |
1093 | return _core.Rect_SetLeft(*args, **kwargs) | |
1094 | ||
1095 | def SetRight(*args, **kwargs): | |
1096 | """SetRight(int right)""" | |
1097 | return _core.Rect_SetRight(*args, **kwargs) | |
1098 | ||
1099 | def SetTop(*args, **kwargs): | |
1100 | """SetTop(int top)""" | |
1101 | return _core.Rect_SetTop(*args, **kwargs) | |
1102 | ||
1103 | def SetBottom(*args, **kwargs): | |
1104 | """SetBottom(int bottom)""" | |
1105 | return _core.Rect_SetBottom(*args, **kwargs) | |
1106 | ||
1107 | position = property(GetPosition, SetPosition) | |
1108 | size = property(GetSize, SetSize) | |
1109 | left = property(GetLeft, SetLeft) | |
1110 | right = property(GetRight, SetRight) | |
1111 | top = property(GetTop, SetTop) | |
1112 | bottom = property(GetBottom, SetBottom) | |
1113 | ||
1114 | def Inflate(*args, **kwargs): | |
0df68c9f RD |
1115 | """ |
1116 | Inflate(int dx, int dy) -> Rect | |
e811c8ce | 1117 | |
0df68c9f RD |
1118 | Increase the rectangle size by dx in x direction and dy in y direction. Both |
1119 | (or one of) parameters may be negative to decrease the rectangle size. | |
1120 | """ | |
e811c8ce RD |
1121 | return _core.Rect_Inflate(*args, **kwargs) |
1122 | ||
1123 | def Deflate(*args, **kwargs): | |
0df68c9f RD |
1124 | """ |
1125 | Deflate(int dx, int dy) -> Rect | |
e811c8ce | 1126 | |
0df68c9f RD |
1127 | Decrease the rectangle size by dx in x direction and dy in y direction. Both |
1128 | (or one of) parameters may be negative to increase the rectngle size. This | |
1129 | method is the opposite of Inflate. | |
1130 | """ | |
e811c8ce RD |
1131 | return _core.Rect_Deflate(*args, **kwargs) |
1132 | ||
1133 | def OffsetXY(*args, **kwargs): | |
0df68c9f RD |
1134 | """ |
1135 | OffsetXY(int dx, int dy) | |
e811c8ce | 1136 | |
0df68c9f RD |
1137 | Moves the rectangle by the specified offset. If dx is positive, the rectangle |
1138 | is moved to the right, if dy is positive, it is moved to the bottom, otherwise | |
1139 | it is moved to the left or top respectively. | |
1140 | """ | |
e811c8ce RD |
1141 | return _core.Rect_OffsetXY(*args, **kwargs) |
1142 | ||
1143 | def Offset(*args, **kwargs): | |
0df68c9f RD |
1144 | """ |
1145 | Offset(Point pt) | |
e811c8ce | 1146 | |
0df68c9f RD |
1147 | Same as OffsetXY but uses dx,dy from Point |
1148 | """ | |
e811c8ce RD |
1149 | return _core.Rect_Offset(*args, **kwargs) |
1150 | ||
1151 | def Intersect(*args, **kwargs): | |
0df68c9f RD |
1152 | """ |
1153 | Intersect(Rect rect) -> Rect | |
e811c8ce | 1154 | |
0df68c9f RD |
1155 | Return the intersectsion of this rectangle and rect. |
1156 | """ | |
e811c8ce RD |
1157 | return _core.Rect_Intersect(*args, **kwargs) |
1158 | ||
1159 | def __add__(*args, **kwargs): | |
0df68c9f RD |
1160 | """ |
1161 | __add__(Rect rect) -> Rect | |
e811c8ce | 1162 | |
0df68c9f RD |
1163 | Add the properties of rect to this rectangle and return the result. |
1164 | """ | |
e811c8ce RD |
1165 | return _core.Rect___add__(*args, **kwargs) |
1166 | ||
1167 | def __iadd__(*args, **kwargs): | |
0df68c9f RD |
1168 | """ |
1169 | __iadd__(Rect rect) -> Rect | |
e811c8ce | 1170 | |
0df68c9f RD |
1171 | Add the properties of rect to this rectangle, updating this rectangle. |
1172 | """ | |
e811c8ce RD |
1173 | return _core.Rect___iadd__(*args, **kwargs) |
1174 | ||
1175 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
1176 | """ |
1177 | __eq__(Rect rect) -> bool | |
e811c8ce | 1178 | |
0df68c9f RD |
1179 | Test for equality. |
1180 | """ | |
e811c8ce RD |
1181 | return _core.Rect___eq__(*args, **kwargs) |
1182 | ||
1183 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
1184 | """ |
1185 | __ne__(Rect rect) -> bool | |
e811c8ce | 1186 | |
0df68c9f RD |
1187 | Test for inequality. |
1188 | """ | |
e811c8ce RD |
1189 | return _core.Rect___ne__(*args, **kwargs) |
1190 | ||
1191 | def InsideXY(*args, **kwargs): | |
0df68c9f RD |
1192 | """ |
1193 | InsideXY(int x, int y) -> bool | |
e811c8ce | 1194 | |
0df68c9f RD |
1195 | Return True if the point is (not strcitly) inside the rect. |
1196 | """ | |
e811c8ce RD |
1197 | return _core.Rect_InsideXY(*args, **kwargs) |
1198 | ||
1199 | def Inside(*args, **kwargs): | |
0df68c9f RD |
1200 | """ |
1201 | Inside(Point pt) -> bool | |
e811c8ce | 1202 | |
0df68c9f RD |
1203 | Return True if the point is (not strcitly) inside the rect. |
1204 | """ | |
e811c8ce RD |
1205 | return _core.Rect_Inside(*args, **kwargs) |
1206 | ||
1207 | def Intersects(*args, **kwargs): | |
0df68c9f RD |
1208 | """ |
1209 | Intersects(Rect rect) -> bool | |
e811c8ce | 1210 | |
0df68c9f RD |
1211 | Returns True if the rectangles have a non empty intersection. |
1212 | """ | |
e811c8ce RD |
1213 | return _core.Rect_Intersects(*args, **kwargs) |
1214 | ||
d14a1e28 RD |
1215 | x = property(_core.Rect_x_get, _core.Rect_x_set) |
1216 | y = property(_core.Rect_y_get, _core.Rect_y_set) | |
1217 | width = property(_core.Rect_width_get, _core.Rect_width_set) | |
1218 | height = property(_core.Rect_height_get, _core.Rect_height_set) | |
e811c8ce | 1219 | def Set(*args, **kwargs): |
0df68c9f RD |
1220 | """ |
1221 | Set(int x=0, int y=0, int width=0, int height=0) | |
e811c8ce | 1222 | |
0df68c9f RD |
1223 | Set all rectangle properties. |
1224 | """ | |
e811c8ce RD |
1225 | return _core.Rect_Set(*args, **kwargs) |
1226 | ||
1227 | def Get(*args, **kwargs): | |
0df68c9f RD |
1228 | """ |
1229 | Get() -> (x,y,width,height) | |
e811c8ce | 1230 | |
0df68c9f RD |
1231 | Return the rectangle properties as a tuple. |
1232 | """ | |
e811c8ce RD |
1233 | return _core.Rect_Get(*args, **kwargs) |
1234 | ||
1235 | asTuple = Get | |
1236 | def __str__(self): return str(self.Get()) | |
1237 | def __repr__(self): return 'wx.Rect'+str(self.Get()) | |
1238 | def __len__(self): return len(self.Get()) | |
1239 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1240 | def __setitem__(self, index, val): |
1241 | if index == 0: self.x = val | |
1242 | elif index == 1: self.y = val | |
1243 | elif index == 2: self.width = val | |
1244 | elif index == 3: self.height = val | |
1245 | else: raise IndexError | |
e811c8ce | 1246 | def __nonzero__(self): return self.Get() != (0,0,0,0) |
d14a1e28 | 1247 | def __getinitargs__(self): return () |
e811c8ce | 1248 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
1249 | def __setstate__(self, state): self.Set(*state) |
1250 | ||
1251 | ||
1252 | class RectPtr(Rect): | |
1253 | def __init__(self, this): | |
1254 | self.this = this | |
1255 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1256 | self.__class__ = Rect | |
1257 | _core.Rect_swigregister(RectPtr) | |
1258 | ||
1259 | def RectPP(*args, **kwargs): | |
0df68c9f RD |
1260 | """ |
1261 | RectPP(Point topLeft, Point bottomRight) -> Rect | |
e811c8ce | 1262 | |
0df68c9f RD |
1263 | Create a new Rect object from Points representing two corners. |
1264 | """ | |
d14a1e28 RD |
1265 | val = _core.new_RectPP(*args, **kwargs) |
1266 | val.thisown = 1 | |
1267 | return val | |
1268 | ||
1269 | def RectPS(*args, **kwargs): | |
0df68c9f RD |
1270 | """ |
1271 | RectPS(Point pos, Size size) -> Rect | |
e811c8ce | 1272 | |
0df68c9f RD |
1273 | Create a new Rect from a position and size. |
1274 | """ | |
d14a1e28 RD |
1275 | val = _core.new_RectPS(*args, **kwargs) |
1276 | val.thisown = 1 | |
1277 | return val | |
1278 | ||
1279 | ||
e811c8ce | 1280 | def IntersectRect(*args, **kwargs): |
0df68c9f RD |
1281 | """ |
1282 | IntersectRect(Rect r1, Rect r2) -> Rect | |
e811c8ce | 1283 | |
0df68c9f RD |
1284 | Calculate and return the intersection of r1 and r2. |
1285 | """ | |
e811c8ce | 1286 | return _core.IntersectRect(*args, **kwargs) |
d14a1e28 RD |
1287 | #--------------------------------------------------------------------------- |
1288 | ||
1289 | class Point2D(object): | |
e811c8ce RD |
1290 | """wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values.""" |
1291 | def __repr__(self): | |
1292 | return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1293 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
1294 | """ |
1295 | __init__(double x=0.0, double y=0.0) -> Point2D | |
e811c8ce | 1296 | |
0df68c9f RD |
1297 | Create a w.Point2D object. |
1298 | """ | |
d14a1e28 RD |
1299 | newobj = _core.new_Point2D(*args, **kwargs) |
1300 | self.this = newobj.this | |
1301 | self.thisown = 1 | |
1302 | del newobj.thisown | |
e811c8ce | 1303 | def GetFloor(*args, **kwargs): |
0df68c9f RD |
1304 | """ |
1305 | GetFloor() -> (x,y) | |
e811c8ce | 1306 | |
0df68c9f RD |
1307 | Convert to integer |
1308 | """ | |
e811c8ce RD |
1309 | return _core.Point2D_GetFloor(*args, **kwargs) |
1310 | ||
1311 | def GetRounded(*args, **kwargs): | |
0df68c9f RD |
1312 | """ |
1313 | GetRounded() -> (x,y) | |
e811c8ce | 1314 | |
0df68c9f RD |
1315 | Convert to integer |
1316 | """ | |
e811c8ce RD |
1317 | return _core.Point2D_GetRounded(*args, **kwargs) |
1318 | ||
1319 | def GetVectorLength(*args, **kwargs): | |
1320 | """GetVectorLength() -> double""" | |
1321 | return _core.Point2D_GetVectorLength(*args, **kwargs) | |
1322 | ||
1323 | def GetVectorAngle(*args, **kwargs): | |
1324 | """GetVectorAngle() -> double""" | |
1325 | return _core.Point2D_GetVectorAngle(*args, **kwargs) | |
1326 | ||
1327 | def SetVectorLength(*args, **kwargs): | |
1328 | """SetVectorLength(double length)""" | |
1329 | return _core.Point2D_SetVectorLength(*args, **kwargs) | |
1330 | ||
1331 | def SetVectorAngle(*args, **kwargs): | |
1332 | """SetVectorAngle(double degrees)""" | |
1333 | return _core.Point2D_SetVectorAngle(*args, **kwargs) | |
1334 | ||
d14a1e28 RD |
1335 | def SetPolarCoordinates(self, angle, length): |
1336 | self.SetVectorLength(length) | |
1337 | self.SetVectorAngle(angle) | |
1338 | def Normalize(self): | |
1339 | self.SetVectorLength(1.0) | |
1340 | ||
e811c8ce RD |
1341 | def GetDistance(*args, **kwargs): |
1342 | """GetDistance(Point2D pt) -> double""" | |
1343 | return _core.Point2D_GetDistance(*args, **kwargs) | |
1344 | ||
1345 | def GetDistanceSquare(*args, **kwargs): | |
1346 | """GetDistanceSquare(Point2D pt) -> double""" | |
1347 | return _core.Point2D_GetDistanceSquare(*args, **kwargs) | |
1348 | ||
1349 | def GetDotProduct(*args, **kwargs): | |
1350 | """GetDotProduct(Point2D vec) -> double""" | |
1351 | return _core.Point2D_GetDotProduct(*args, **kwargs) | |
1352 | ||
1353 | def GetCrossProduct(*args, **kwargs): | |
1354 | """GetCrossProduct(Point2D vec) -> double""" | |
1355 | return _core.Point2D_GetCrossProduct(*args, **kwargs) | |
1356 | ||
1357 | def __neg__(*args, **kwargs): | |
0df68c9f RD |
1358 | """ |
1359 | __neg__() -> Point2D | |
e811c8ce | 1360 | |
0df68c9f RD |
1361 | the reflection of this point |
1362 | """ | |
e811c8ce RD |
1363 | return _core.Point2D___neg__(*args, **kwargs) |
1364 | ||
1365 | def __iadd__(*args, **kwargs): | |
1366 | """__iadd__(Point2D pt) -> Point2D""" | |
1367 | return _core.Point2D___iadd__(*args, **kwargs) | |
1368 | ||
1369 | def __isub__(*args, **kwargs): | |
1370 | """__isub__(Point2D pt) -> Point2D""" | |
1371 | return _core.Point2D___isub__(*args, **kwargs) | |
1372 | ||
1373 | def __imul__(*args, **kwargs): | |
1374 | """__imul__(Point2D pt) -> Point2D""" | |
1375 | return _core.Point2D___imul__(*args, **kwargs) | |
1376 | ||
1377 | def __idiv__(*args, **kwargs): | |
1378 | """__idiv__(Point2D pt) -> Point2D""" | |
1379 | return _core.Point2D___idiv__(*args, **kwargs) | |
1380 | ||
1381 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
1382 | """ |
1383 | __eq__(Point2D pt) -> bool | |
e811c8ce | 1384 | |
0df68c9f RD |
1385 | Test for equality |
1386 | """ | |
e811c8ce RD |
1387 | return _core.Point2D___eq__(*args, **kwargs) |
1388 | ||
1389 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
1390 | """ |
1391 | __ne__(Point2D pt) -> bool | |
e811c8ce | 1392 | |
0df68c9f RD |
1393 | Test for inequality |
1394 | """ | |
e811c8ce RD |
1395 | return _core.Point2D___ne__(*args, **kwargs) |
1396 | ||
d14a1e28 RD |
1397 | x = property(_core.Point2D_x_get, _core.Point2D_x_set) |
1398 | y = property(_core.Point2D_y_get, _core.Point2D_y_set) | |
e811c8ce RD |
1399 | def Set(*args, **kwargs): |
1400 | """Set(double x=0, double y=0)""" | |
1401 | return _core.Point2D_Set(*args, **kwargs) | |
1402 | ||
1403 | def Get(*args, **kwargs): | |
0df68c9f RD |
1404 | """ |
1405 | Get() -> (x,y) | |
e811c8ce | 1406 | |
0df68c9f RD |
1407 | Return x and y properties as a tuple. |
1408 | """ | |
e811c8ce RD |
1409 | return _core.Point2D_Get(*args, **kwargs) |
1410 | ||
1411 | asTuple = Get | |
1412 | def __str__(self): return str(self.Get()) | |
1413 | def __repr__(self): return 'wx.Point2D'+str(self.Get()) | |
1414 | def __len__(self): return len(self.Get()) | |
1415 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 1416 | def __setitem__(self, index, val): |
e811c8ce RD |
1417 | if index == 0: self.x = val |
1418 | elif index == 1: self.y = val | |
d14a1e28 | 1419 | else: raise IndexError |
e811c8ce | 1420 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
d14a1e28 | 1421 | def __getinitargs__(self): return () |
e811c8ce | 1422 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
1423 | def __setstate__(self, state): self.Set(*state) |
1424 | ||
1425 | ||
1426 | ||
1427 | class Point2DPtr(Point2D): | |
1428 | def __init__(self, this): | |
1429 | self.this = this | |
1430 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1431 | self.__class__ = Point2D | |
1432 | _core.Point2D_swigregister(Point2DPtr) | |
1433 | ||
1434 | def Point2DCopy(*args, **kwargs): | |
0df68c9f RD |
1435 | """ |
1436 | Point2DCopy(Point2D pt) -> Point2D | |
e811c8ce | 1437 | |
0df68c9f RD |
1438 | Create a w.Point2D object. |
1439 | """ | |
d14a1e28 RD |
1440 | val = _core.new_Point2DCopy(*args, **kwargs) |
1441 | val.thisown = 1 | |
1442 | return val | |
1443 | ||
1444 | def Point2DFromPoint(*args, **kwargs): | |
0df68c9f RD |
1445 | """ |
1446 | Point2DFromPoint(Point pt) -> Point2D | |
e811c8ce | 1447 | |
0df68c9f RD |
1448 | Create a w.Point2D object. |
1449 | """ | |
d14a1e28 RD |
1450 | val = _core.new_Point2DFromPoint(*args, **kwargs) |
1451 | val.thisown = 1 | |
1452 | return val | |
1453 | ||
1454 | #--------------------------------------------------------------------------- | |
1455 | ||
1456 | FromStart = _core.FromStart | |
1457 | FromCurrent = _core.FromCurrent | |
1458 | FromEnd = _core.FromEnd | |
1459 | class InputStream(object): | |
e811c8ce RD |
1460 | def __repr__(self): |
1461 | return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1462 | def __init__(self, *args, **kwargs): |
e811c8ce | 1463 | """__init__(PyObject p) -> InputStream""" |
d14a1e28 RD |
1464 | newobj = _core.new_InputStream(*args, **kwargs) |
1465 | self.this = newobj.this | |
1466 | self.thisown = 1 | |
1467 | del newobj.thisown | |
e811c8ce RD |
1468 | def close(*args, **kwargs): |
1469 | """close()""" | |
1470 | return _core.InputStream_close(*args, **kwargs) | |
1471 | ||
1472 | def flush(*args, **kwargs): | |
1473 | """flush()""" | |
1474 | return _core.InputStream_flush(*args, **kwargs) | |
1475 | ||
1476 | def eof(*args, **kwargs): | |
1477 | """eof() -> bool""" | |
1478 | return _core.InputStream_eof(*args, **kwargs) | |
1479 | ||
1480 | def read(*args, **kwargs): | |
1481 | """read(int size=-1) -> PyObject""" | |
1482 | return _core.InputStream_read(*args, **kwargs) | |
1483 | ||
1484 | def readline(*args, **kwargs): | |
1485 | """readline(int size=-1) -> PyObject""" | |
1486 | return _core.InputStream_readline(*args, **kwargs) | |
1487 | ||
1488 | def readlines(*args, **kwargs): | |
1489 | """readlines(int sizehint=-1) -> PyObject""" | |
1490 | return _core.InputStream_readlines(*args, **kwargs) | |
1491 | ||
1492 | def seek(*args, **kwargs): | |
1493 | """seek(int offset, int whence=0)""" | |
1494 | return _core.InputStream_seek(*args, **kwargs) | |
1495 | ||
1496 | def tell(*args, **kwargs): | |
1497 | """tell() -> int""" | |
1498 | return _core.InputStream_tell(*args, **kwargs) | |
1499 | ||
1500 | def Peek(*args, **kwargs): | |
1501 | """Peek() -> char""" | |
1502 | return _core.InputStream_Peek(*args, **kwargs) | |
1503 | ||
1504 | def GetC(*args, **kwargs): | |
1505 | """GetC() -> char""" | |
1506 | return _core.InputStream_GetC(*args, **kwargs) | |
1507 | ||
1508 | def LastRead(*args, **kwargs): | |
1509 | """LastRead() -> size_t""" | |
1510 | return _core.InputStream_LastRead(*args, **kwargs) | |
1511 | ||
1512 | def CanRead(*args, **kwargs): | |
1513 | """CanRead() -> bool""" | |
1514 | return _core.InputStream_CanRead(*args, **kwargs) | |
1515 | ||
1516 | def Eof(*args, **kwargs): | |
1517 | """Eof() -> bool""" | |
1518 | return _core.InputStream_Eof(*args, **kwargs) | |
1519 | ||
1520 | def Ungetch(*args, **kwargs): | |
1521 | """Ungetch(char c) -> bool""" | |
1522 | return _core.InputStream_Ungetch(*args, **kwargs) | |
1523 | ||
1524 | def SeekI(*args, **kwargs): | |
1525 | """SeekI(long pos, wxSeekMode mode=FromStart) -> long""" | |
1526 | return _core.InputStream_SeekI(*args, **kwargs) | |
1527 | ||
1528 | def TellI(*args, **kwargs): | |
1529 | """TellI() -> long""" | |
1530 | return _core.InputStream_TellI(*args, **kwargs) | |
1531 | ||
d14a1e28 RD |
1532 | |
1533 | class InputStreamPtr(InputStream): | |
1534 | def __init__(self, this): | |
1535 | self.this = this | |
1536 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1537 | self.__class__ = InputStream | |
1538 | _core.InputStream_swigregister(InputStreamPtr) | |
1539 | cvar = _core.cvar | |
1540 | DefaultPosition = cvar.DefaultPosition | |
1541 | DefaultSize = cvar.DefaultSize | |
1542 | ||
1543 | class OutputStream(object): | |
d14a1e28 RD |
1544 | def __init__(self): raise RuntimeError, "No constructor defined" |
1545 | def __repr__(self): | |
1546 | return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
1547 | def write(*args, **kwargs): |
1548 | """write(PyObject obj)""" | |
1549 | return _core.OutputStream_write(*args, **kwargs) | |
1550 | ||
d14a1e28 RD |
1551 | |
1552 | class OutputStreamPtr(OutputStream): | |
1553 | def __init__(self, this): | |
1554 | self.this = this | |
1555 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1556 | self.__class__ = OutputStream | |
1557 | _core.OutputStream_swigregister(OutputStreamPtr) | |
1558 | ||
1559 | #--------------------------------------------------------------------------- | |
1560 | ||
1561 | class FSFile(Object): | |
e811c8ce RD |
1562 | def __repr__(self): |
1563 | return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1564 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
1565 | """ |
1566 | __init__(wxInputStream stream, wxString loc, wxString mimetype, | |
1567 | wxString anchor, wxDateTime modif) -> FSFile | |
1568 | """ | |
d14a1e28 RD |
1569 | newobj = _core.new_FSFile(*args, **kwargs) |
1570 | self.this = newobj.this | |
1571 | self.thisown = 1 | |
1572 | del newobj.thisown | |
1573 | def __del__(self, destroy=_core.delete_FSFile): | |
e811c8ce | 1574 | """__del__()""" |
d14a1e28 RD |
1575 | try: |
1576 | if self.thisown: destroy(self) | |
1577 | except: pass | |
e811c8ce RD |
1578 | |
1579 | def GetStream(*args, **kwargs): | |
1580 | """GetStream() -> wxInputStream""" | |
1581 | return _core.FSFile_GetStream(*args, **kwargs) | |
1582 | ||
1583 | def GetMimeType(*args, **kwargs): | |
1584 | """GetMimeType() -> wxString""" | |
1585 | return _core.FSFile_GetMimeType(*args, **kwargs) | |
1586 | ||
1587 | def GetLocation(*args, **kwargs): | |
1588 | """GetLocation() -> wxString""" | |
1589 | return _core.FSFile_GetLocation(*args, **kwargs) | |
1590 | ||
1591 | def GetAnchor(*args, **kwargs): | |
1592 | """GetAnchor() -> wxString""" | |
1593 | return _core.FSFile_GetAnchor(*args, **kwargs) | |
1594 | ||
1595 | def GetModificationTime(*args, **kwargs): | |
1596 | """GetModificationTime() -> wxDateTime""" | |
1597 | return _core.FSFile_GetModificationTime(*args, **kwargs) | |
1598 | ||
d14a1e28 RD |
1599 | |
1600 | class FSFilePtr(FSFile): | |
1601 | def __init__(self, this): | |
1602 | self.this = this | |
1603 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1604 | self.__class__ = FSFile | |
1605 | _core.FSFile_swigregister(FSFilePtr) | |
1606 | ||
1607 | class CPPFileSystemHandler(object): | |
1608 | def __init__(self): raise RuntimeError, "No constructor defined" | |
1609 | def __repr__(self): | |
1610 | return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1611 | ||
1612 | class CPPFileSystemHandlerPtr(CPPFileSystemHandler): | |
1613 | def __init__(self, this): | |
1614 | self.this = this | |
1615 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1616 | self.__class__ = CPPFileSystemHandler | |
1617 | _core.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr) | |
1618 | ||
1619 | class FileSystemHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1620 | def __repr__(self): |
1621 | return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1622 | def __init__(self, *args, **kwargs): |
e811c8ce | 1623 | """__init__() -> FileSystemHandler""" |
d14a1e28 RD |
1624 | newobj = _core.new_FileSystemHandler(*args, **kwargs) |
1625 | self.this = newobj.this | |
1626 | self.thisown = 1 | |
1627 | del newobj.thisown | |
1628 | self._setCallbackInfo(self, FileSystemHandler) | |
e811c8ce RD |
1629 | |
1630 | def _setCallbackInfo(*args, **kwargs): | |
1631 | """_setCallbackInfo(PyObject self, PyObject _class)""" | |
1632 | return _core.FileSystemHandler__setCallbackInfo(*args, **kwargs) | |
1633 | ||
1634 | def CanOpen(*args, **kwargs): | |
1635 | """CanOpen(wxString location) -> bool""" | |
1636 | return _core.FileSystemHandler_CanOpen(*args, **kwargs) | |
1637 | ||
1638 | def OpenFile(*args, **kwargs): | |
1639 | """OpenFile(FileSystem fs, wxString location) -> FSFile""" | |
1640 | return _core.FileSystemHandler_OpenFile(*args, **kwargs) | |
1641 | ||
1642 | def FindFirst(*args, **kwargs): | |
1643 | """FindFirst(wxString spec, int flags=0) -> wxString""" | |
1644 | return _core.FileSystemHandler_FindFirst(*args, **kwargs) | |
1645 | ||
1646 | def FindNext(*args, **kwargs): | |
1647 | """FindNext() -> wxString""" | |
1648 | return _core.FileSystemHandler_FindNext(*args, **kwargs) | |
1649 | ||
1650 | def GetProtocol(*args, **kwargs): | |
1651 | """GetProtocol(wxString location) -> wxString""" | |
1652 | return _core.FileSystemHandler_GetProtocol(*args, **kwargs) | |
1653 | ||
1654 | def GetLeftLocation(*args, **kwargs): | |
1655 | """GetLeftLocation(wxString location) -> wxString""" | |
1656 | return _core.FileSystemHandler_GetLeftLocation(*args, **kwargs) | |
1657 | ||
1658 | def GetAnchor(*args, **kwargs): | |
1659 | """GetAnchor(wxString location) -> wxString""" | |
1660 | return _core.FileSystemHandler_GetAnchor(*args, **kwargs) | |
1661 | ||
1662 | def GetRightLocation(*args, **kwargs): | |
1663 | """GetRightLocation(wxString location) -> wxString""" | |
1664 | return _core.FileSystemHandler_GetRightLocation(*args, **kwargs) | |
1665 | ||
1666 | def GetMimeTypeFromExt(*args, **kwargs): | |
1667 | """GetMimeTypeFromExt(wxString location) -> wxString""" | |
1668 | return _core.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs) | |
1669 | ||
d14a1e28 RD |
1670 | |
1671 | class FileSystemHandlerPtr(FileSystemHandler): | |
1672 | def __init__(self, this): | |
1673 | self.this = this | |
1674 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1675 | self.__class__ = FileSystemHandler | |
1676 | _core.FileSystemHandler_swigregister(FileSystemHandlerPtr) | |
1677 | ||
1678 | class FileSystem(Object): | |
e811c8ce RD |
1679 | def __repr__(self): |
1680 | return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1681 | def __init__(self, *args, **kwargs): |
e811c8ce | 1682 | """__init__() -> FileSystem""" |
d14a1e28 RD |
1683 | newobj = _core.new_FileSystem(*args, **kwargs) |
1684 | self.this = newobj.this | |
1685 | self.thisown = 1 | |
1686 | del newobj.thisown | |
1687 | def __del__(self, destroy=_core.delete_FileSystem): | |
e811c8ce | 1688 | """__del__()""" |
d14a1e28 RD |
1689 | try: |
1690 | if self.thisown: destroy(self) | |
1691 | except: pass | |
e811c8ce RD |
1692 | |
1693 | def ChangePathTo(*args, **kwargs): | |
1694 | """ChangePathTo(wxString location, bool is_dir=False)""" | |
1695 | return _core.FileSystem_ChangePathTo(*args, **kwargs) | |
1696 | ||
1697 | def GetPath(*args, **kwargs): | |
1698 | """GetPath() -> wxString""" | |
1699 | return _core.FileSystem_GetPath(*args, **kwargs) | |
1700 | ||
1701 | def OpenFile(*args, **kwargs): | |
1702 | """OpenFile(wxString location) -> FSFile""" | |
1703 | return _core.FileSystem_OpenFile(*args, **kwargs) | |
1704 | ||
1705 | def FindFirst(*args, **kwargs): | |
1706 | """FindFirst(wxString spec, int flags=0) -> wxString""" | |
1707 | return _core.FileSystem_FindFirst(*args, **kwargs) | |
1708 | ||
1709 | def FindNext(*args, **kwargs): | |
1710 | """FindNext() -> wxString""" | |
1711 | return _core.FileSystem_FindNext(*args, **kwargs) | |
1712 | ||
1713 | def AddHandler(*args, **kwargs): | |
1714 | """FileSystem.AddHandler(CPPFileSystemHandler handler)""" | |
1715 | return _core.FileSystem_AddHandler(*args, **kwargs) | |
1716 | ||
1717 | AddHandler = staticmethod(AddHandler) | |
1718 | def CleanUpHandlers(*args, **kwargs): | |
1719 | """FileSystem.CleanUpHandlers()""" | |
1720 | return _core.FileSystem_CleanUpHandlers(*args, **kwargs) | |
1721 | ||
1722 | CleanUpHandlers = staticmethod(CleanUpHandlers) | |
1723 | def FileNameToURL(*args, **kwargs): | |
1724 | """FileSystem.FileNameToURL(wxString filename) -> wxString""" | |
1725 | return _core.FileSystem_FileNameToURL(*args, **kwargs) | |
1726 | ||
1727 | FileNameToURL = staticmethod(FileNameToURL) | |
d14a1e28 RD |
1728 | |
1729 | class FileSystemPtr(FileSystem): | |
1730 | def __init__(self, this): | |
1731 | self.this = this | |
1732 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1733 | self.__class__ = FileSystem | |
1734 | _core.FileSystem_swigregister(FileSystemPtr) | |
1735 | ||
e811c8ce RD |
1736 | def FileSystem_AddHandler(*args, **kwargs): |
1737 | """FileSystem_AddHandler(CPPFileSystemHandler handler)""" | |
1738 | return _core.FileSystem_AddHandler(*args, **kwargs) | |
d14a1e28 | 1739 | |
e811c8ce RD |
1740 | def FileSystem_CleanUpHandlers(*args, **kwargs): |
1741 | """FileSystem_CleanUpHandlers()""" | |
1742 | return _core.FileSystem_CleanUpHandlers(*args, **kwargs) | |
d14a1e28 | 1743 | |
e811c8ce RD |
1744 | def FileSystem_FileNameToURL(*args, **kwargs): |
1745 | """FileSystem_FileNameToURL(wxString filename) -> wxString""" | |
1746 | return _core.FileSystem_FileNameToURL(*args, **kwargs) | |
d14a1e28 RD |
1747 | |
1748 | ||
e811c8ce RD |
1749 | def FileSystem_URLToFileName(*args, **kwargs): |
1750 | """FileSystem_URLToFileName(wxString url) -> wxString""" | |
1751 | return _core.FileSystem_URLToFileName(*args, **kwargs) | |
d14a1e28 | 1752 | class InternetFSHandler(CPPFileSystemHandler): |
e811c8ce RD |
1753 | def __repr__(self): |
1754 | return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1755 | def __init__(self, *args, **kwargs): |
e811c8ce | 1756 | """__init__() -> InternetFSHandler""" |
d14a1e28 RD |
1757 | newobj = _core.new_InternetFSHandler(*args, **kwargs) |
1758 | self.this = newobj.this | |
1759 | self.thisown = 1 | |
1760 | del newobj.thisown | |
e811c8ce RD |
1761 | def CanOpen(*args, **kwargs): |
1762 | """CanOpen(wxString location) -> bool""" | |
1763 | return _core.InternetFSHandler_CanOpen(*args, **kwargs) | |
1764 | ||
1765 | def OpenFile(*args, **kwargs): | |
1766 | """OpenFile(FileSystem fs, wxString location) -> FSFile""" | |
1767 | return _core.InternetFSHandler_OpenFile(*args, **kwargs) | |
1768 | ||
d14a1e28 RD |
1769 | |
1770 | class InternetFSHandlerPtr(InternetFSHandler): | |
1771 | def __init__(self, this): | |
1772 | self.this = this | |
1773 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1774 | self.__class__ = InternetFSHandler | |
1775 | _core.InternetFSHandler_swigregister(InternetFSHandlerPtr) | |
1776 | ||
1777 | class ZipFSHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1778 | def __repr__(self): |
1779 | return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1780 | def __init__(self, *args, **kwargs): |
e811c8ce | 1781 | """__init__() -> ZipFSHandler""" |
d14a1e28 RD |
1782 | newobj = _core.new_ZipFSHandler(*args, **kwargs) |
1783 | self.this = newobj.this | |
1784 | self.thisown = 1 | |
1785 | del newobj.thisown | |
e811c8ce RD |
1786 | def CanOpen(*args, **kwargs): |
1787 | """CanOpen(wxString location) -> bool""" | |
1788 | return _core.ZipFSHandler_CanOpen(*args, **kwargs) | |
1789 | ||
1790 | def OpenFile(*args, **kwargs): | |
1791 | """OpenFile(FileSystem fs, wxString location) -> FSFile""" | |
1792 | return _core.ZipFSHandler_OpenFile(*args, **kwargs) | |
1793 | ||
1794 | def FindFirst(*args, **kwargs): | |
1795 | """FindFirst(wxString spec, int flags=0) -> wxString""" | |
1796 | return _core.ZipFSHandler_FindFirst(*args, **kwargs) | |
1797 | ||
1798 | def FindNext(*args, **kwargs): | |
1799 | """FindNext() -> wxString""" | |
1800 | return _core.ZipFSHandler_FindNext(*args, **kwargs) | |
1801 | ||
d14a1e28 RD |
1802 | |
1803 | class ZipFSHandlerPtr(ZipFSHandler): | |
1804 | def __init__(self, this): | |
1805 | self.this = this | |
1806 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1807 | self.__class__ = ZipFSHandler | |
1808 | _core.ZipFSHandler_swigregister(ZipFSHandlerPtr) | |
1809 | ||
1810 | ||
e811c8ce RD |
1811 | def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs): |
1812 | """__wxMemoryFSHandler_AddFile_wxImage(wxString filename, Image image, long type)""" | |
1813 | return _core.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs) | |
d14a1e28 | 1814 | |
e811c8ce RD |
1815 | def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs): |
1816 | """__wxMemoryFSHandler_AddFile_wxBitmap(wxString filename, wxBitmap bitmap, long type)""" | |
1817 | return _core.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs) | |
d14a1e28 | 1818 | |
e811c8ce RD |
1819 | def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs): |
1820 | """__wxMemoryFSHandler_AddFile_Data(wxString filename, PyObject data)""" | |
1821 | return _core.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs) | |
d14a1e28 RD |
1822 | def MemoryFSHandler_AddFile(filename, a, b=''): |
1823 | if isinstance(a, wx.Image): | |
1824 | __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) | |
1825 | elif isinstance(a, wx.Bitmap): | |
1826 | __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) | |
1827 | elif type(a) == str: | |
1828 | __wxMemoryFSHandler_AddFile_Data(filename, a) | |
1829 | else: raise TypeError, 'wx.Image, wx.Bitmap or string expected' | |
1830 | ||
1831 | class MemoryFSHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1832 | def __repr__(self): |
1833 | return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1834 | def __init__(self, *args, **kwargs): |
e811c8ce | 1835 | """__init__() -> MemoryFSHandler""" |
d14a1e28 RD |
1836 | newobj = _core.new_MemoryFSHandler(*args, **kwargs) |
1837 | self.this = newobj.this | |
1838 | self.thisown = 1 | |
1839 | del newobj.thisown | |
e811c8ce RD |
1840 | def RemoveFile(*args, **kwargs): |
1841 | """MemoryFSHandler.RemoveFile(wxString filename)""" | |
1842 | return _core.MemoryFSHandler_RemoveFile(*args, **kwargs) | |
1843 | ||
1844 | RemoveFile = staticmethod(RemoveFile) | |
d14a1e28 | 1845 | AddFile = staticmethod(MemoryFSHandler_AddFile) |
e811c8ce RD |
1846 | def CanOpen(*args, **kwargs): |
1847 | """CanOpen(wxString location) -> bool""" | |
1848 | return _core.MemoryFSHandler_CanOpen(*args, **kwargs) | |
1849 | ||
1850 | def OpenFile(*args, **kwargs): | |
1851 | """OpenFile(FileSystem fs, wxString location) -> FSFile""" | |
1852 | return _core.MemoryFSHandler_OpenFile(*args, **kwargs) | |
1853 | ||
1854 | def FindFirst(*args, **kwargs): | |
1855 | """FindFirst(wxString spec, int flags=0) -> wxString""" | |
1856 | return _core.MemoryFSHandler_FindFirst(*args, **kwargs) | |
1857 | ||
1858 | def FindNext(*args, **kwargs): | |
1859 | """FindNext() -> wxString""" | |
1860 | return _core.MemoryFSHandler_FindNext(*args, **kwargs) | |
1861 | ||
d14a1e28 RD |
1862 | |
1863 | class MemoryFSHandlerPtr(MemoryFSHandler): | |
1864 | def __init__(self, this): | |
1865 | self.this = this | |
1866 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1867 | self.__class__ = MemoryFSHandler | |
1868 | _core.MemoryFSHandler_swigregister(MemoryFSHandlerPtr) | |
1869 | ||
e811c8ce RD |
1870 | def MemoryFSHandler_RemoveFile(*args, **kwargs): |
1871 | """MemoryFSHandler_RemoveFile(wxString filename)""" | |
1872 | return _core.MemoryFSHandler_RemoveFile(*args, **kwargs) | |
d14a1e28 RD |
1873 | |
1874 | #--------------------------------------------------------------------------- | |
1875 | ||
1876 | class ImageHandler(Object): | |
d14a1e28 RD |
1877 | def __init__(self): raise RuntimeError, "No constructor defined" |
1878 | def __repr__(self): | |
1879 | return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
1880 | def GetName(*args, **kwargs): |
1881 | """GetName() -> wxString""" | |
1882 | return _core.ImageHandler_GetName(*args, **kwargs) | |
1883 | ||
1884 | def GetExtension(*args, **kwargs): | |
1885 | """GetExtension() -> wxString""" | |
1886 | return _core.ImageHandler_GetExtension(*args, **kwargs) | |
1887 | ||
1888 | def GetType(*args, **kwargs): | |
1889 | """GetType() -> long""" | |
1890 | return _core.ImageHandler_GetType(*args, **kwargs) | |
1891 | ||
1892 | def GetMimeType(*args, **kwargs): | |
1893 | """GetMimeType() -> wxString""" | |
1894 | return _core.ImageHandler_GetMimeType(*args, **kwargs) | |
1895 | ||
1896 | def CanRead(*args, **kwargs): | |
1897 | """CanRead(wxString name) -> bool""" | |
1898 | return _core.ImageHandler_CanRead(*args, **kwargs) | |
1899 | ||
1900 | def SetName(*args, **kwargs): | |
1901 | """SetName(wxString name)""" | |
1902 | return _core.ImageHandler_SetName(*args, **kwargs) | |
1903 | ||
1904 | def SetExtension(*args, **kwargs): | |
1905 | """SetExtension(wxString extension)""" | |
1906 | return _core.ImageHandler_SetExtension(*args, **kwargs) | |
1907 | ||
1908 | def SetType(*args, **kwargs): | |
1909 | """SetType(long type)""" | |
1910 | return _core.ImageHandler_SetType(*args, **kwargs) | |
1911 | ||
1912 | def SetMimeType(*args, **kwargs): | |
1913 | """SetMimeType(wxString mimetype)""" | |
1914 | return _core.ImageHandler_SetMimeType(*args, **kwargs) | |
1915 | ||
d14a1e28 RD |
1916 | |
1917 | class ImageHandlerPtr(ImageHandler): | |
1918 | def __init__(self, this): | |
1919 | self.this = this | |
1920 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1921 | self.__class__ = ImageHandler | |
1922 | _core.ImageHandler_swigregister(ImageHandlerPtr) | |
1923 | ||
1924 | class ImageHistogram(object): | |
e811c8ce RD |
1925 | def __repr__(self): |
1926 | return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1927 | def __init__(self, *args, **kwargs): |
e811c8ce | 1928 | """__init__() -> ImageHistogram""" |
d14a1e28 RD |
1929 | newobj = _core.new_ImageHistogram(*args, **kwargs) |
1930 | self.this = newobj.this | |
1931 | self.thisown = 1 | |
1932 | del newobj.thisown | |
e811c8ce | 1933 | def MakeKey(*args, **kwargs): |
0df68c9f RD |
1934 | """ |
1935 | ImageHistogram.MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long | |
e811c8ce | 1936 | |
0df68c9f RD |
1937 | Get the key in the histogram for the given RGB values |
1938 | """ | |
e811c8ce RD |
1939 | return _core.ImageHistogram_MakeKey(*args, **kwargs) |
1940 | ||
1941 | MakeKey = staticmethod(MakeKey) | |
1942 | def FindFirstUnusedColour(*args, **kwargs): | |
0df68c9f RD |
1943 | """ |
1944 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
e811c8ce | 1945 | |
0df68c9f RD |
1946 | Find first colour that is not used in the image and has higher RGB values than |
1947 | startR, startG, startB. Returns a tuple consisting of a success flag and rgb | |
1948 | values. | |
1949 | """ | |
e811c8ce RD |
1950 | return _core.ImageHistogram_FindFirstUnusedColour(*args, **kwargs) |
1951 | ||
d14a1e28 RD |
1952 | |
1953 | class ImageHistogramPtr(ImageHistogram): | |
1954 | def __init__(self, this): | |
1955 | self.this = this | |
1956 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1957 | self.__class__ = ImageHistogram | |
1958 | _core.ImageHistogram_swigregister(ImageHistogramPtr) | |
1959 | ||
e811c8ce | 1960 | def ImageHistogram_MakeKey(*args, **kwargs): |
0df68c9f RD |
1961 | """ |
1962 | ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long | |
e811c8ce | 1963 | |
0df68c9f RD |
1964 | Get the key in the histogram for the given RGB values |
1965 | """ | |
e811c8ce | 1966 | return _core.ImageHistogram_MakeKey(*args, **kwargs) |
d14a1e28 RD |
1967 | |
1968 | class Image(Object): | |
e811c8ce RD |
1969 | def __repr__(self): |
1970 | return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1971 | def __init__(self, *args, **kwargs): |
e811c8ce | 1972 | """__init__(wxString name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
d14a1e28 RD |
1973 | newobj = _core.new_Image(*args, **kwargs) |
1974 | self.this = newobj.this | |
1975 | self.thisown = 1 | |
1976 | del newobj.thisown | |
1977 | def __del__(self, destroy=_core.delete_Image): | |
e811c8ce | 1978 | """__del__()""" |
d14a1e28 RD |
1979 | try: |
1980 | if self.thisown: destroy(self) | |
1981 | except: pass | |
e811c8ce RD |
1982 | |
1983 | def Create(*args, **kwargs): | |
1984 | """Create(int width, int height)""" | |
1985 | return _core.Image_Create(*args, **kwargs) | |
1986 | ||
1987 | def Destroy(*args, **kwargs): | |
0df68c9f RD |
1988 | """ |
1989 | Destroy() | |
e811c8ce | 1990 | |
0df68c9f RD |
1991 | Deletes the C++ object this Python object is a proxy for. |
1992 | """ | |
e811c8ce RD |
1993 | return _core.Image_Destroy(*args, **kwargs) |
1994 | ||
1995 | def Scale(*args, **kwargs): | |
1996 | """Scale(int width, int height) -> Image""" | |
1997 | return _core.Image_Scale(*args, **kwargs) | |
1998 | ||
1999 | def ShrinkBy(*args, **kwargs): | |
2000 | """ShrinkBy(int xFactor, int yFactor) -> Image""" | |
2001 | return _core.Image_ShrinkBy(*args, **kwargs) | |
2002 | ||
2003 | def Rescale(*args, **kwargs): | |
2004 | """Rescale(int width, int height) -> Image""" | |
2005 | return _core.Image_Rescale(*args, **kwargs) | |
2006 | ||
2007 | def SetRGB(*args, **kwargs): | |
2008 | """SetRGB(int x, int y, unsigned char r, unsigned char g, unsigned char b)""" | |
2009 | return _core.Image_SetRGB(*args, **kwargs) | |
2010 | ||
2011 | def GetRed(*args, **kwargs): | |
2012 | """GetRed(int x, int y) -> unsigned char""" | |
2013 | return _core.Image_GetRed(*args, **kwargs) | |
2014 | ||
2015 | def GetGreen(*args, **kwargs): | |
2016 | """GetGreen(int x, int y) -> unsigned char""" | |
2017 | return _core.Image_GetGreen(*args, **kwargs) | |
2018 | ||
2019 | def GetBlue(*args, **kwargs): | |
2020 | """GetBlue(int x, int y) -> unsigned char""" | |
2021 | return _core.Image_GetBlue(*args, **kwargs) | |
2022 | ||
2023 | def SetAlpha(*args, **kwargs): | |
2024 | """SetAlpha(int x, int y, unsigned char alpha)""" | |
2025 | return _core.Image_SetAlpha(*args, **kwargs) | |
2026 | ||
2027 | def GetAlpha(*args, **kwargs): | |
2028 | """GetAlpha(int x, int y) -> unsigned char""" | |
2029 | return _core.Image_GetAlpha(*args, **kwargs) | |
2030 | ||
2031 | def HasAlpha(*args, **kwargs): | |
2032 | """HasAlpha() -> bool""" | |
2033 | return _core.Image_HasAlpha(*args, **kwargs) | |
2034 | ||
2035 | def FindFirstUnusedColour(*args, **kwargs): | |
0df68c9f RD |
2036 | """ |
2037 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
e811c8ce | 2038 | |
0df68c9f RD |
2039 | Find first colour that is not used in the image and has higher RGB values than |
2040 | startR, startG, startB. Returns a tuple consisting of a success flag and rgb | |
2041 | values. | |
2042 | """ | |
e811c8ce RD |
2043 | return _core.Image_FindFirstUnusedColour(*args, **kwargs) |
2044 | ||
2045 | def SetMaskFromImage(*args, **kwargs): | |
2046 | """SetMaskFromImage(Image mask, byte mr, byte mg, byte mb) -> bool""" | |
2047 | return _core.Image_SetMaskFromImage(*args, **kwargs) | |
2048 | ||
2049 | def CanRead(*args, **kwargs): | |
2050 | """Image.CanRead(wxString name) -> bool""" | |
2051 | return _core.Image_CanRead(*args, **kwargs) | |
2052 | ||
2053 | CanRead = staticmethod(CanRead) | |
2054 | def GetImageCount(*args, **kwargs): | |
2055 | """Image.GetImageCount(wxString name, long type=BITMAP_TYPE_ANY) -> int""" | |
2056 | return _core.Image_GetImageCount(*args, **kwargs) | |
2057 | ||
2058 | GetImageCount = staticmethod(GetImageCount) | |
2059 | def LoadFile(*args, **kwargs): | |
2060 | """LoadFile(wxString name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" | |
2061 | return _core.Image_LoadFile(*args, **kwargs) | |
2062 | ||
2063 | def LoadMimeFile(*args, **kwargs): | |
2064 | """LoadMimeFile(wxString name, wxString mimetype, int index=-1) -> bool""" | |
2065 | return _core.Image_LoadMimeFile(*args, **kwargs) | |
2066 | ||
2067 | def SaveFile(*args, **kwargs): | |
2068 | """SaveFile(wxString name, int type) -> bool""" | |
2069 | return _core.Image_SaveFile(*args, **kwargs) | |
2070 | ||
2071 | def SaveMimeFile(*args, **kwargs): | |
2072 | """SaveMimeFile(wxString name, wxString mimetype) -> bool""" | |
2073 | return _core.Image_SaveMimeFile(*args, **kwargs) | |
2074 | ||
2075 | def CanReadStream(*args, **kwargs): | |
2076 | """Image.CanReadStream(wxInputStream stream) -> bool""" | |
2077 | return _core.Image_CanReadStream(*args, **kwargs) | |
2078 | ||
2079 | CanReadStream = staticmethod(CanReadStream) | |
2080 | def LoadStream(*args, **kwargs): | |
2081 | """LoadStream(wxInputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" | |
2082 | return _core.Image_LoadStream(*args, **kwargs) | |
2083 | ||
2084 | def LoadMimeStream(*args, **kwargs): | |
2085 | """LoadMimeStream(wxInputStream stream, wxString mimetype, int index=-1) -> bool""" | |
2086 | return _core.Image_LoadMimeStream(*args, **kwargs) | |
2087 | ||
2088 | def Ok(*args, **kwargs): | |
2089 | """Ok() -> bool""" | |
2090 | return _core.Image_Ok(*args, **kwargs) | |
2091 | ||
2092 | def GetWidth(*args, **kwargs): | |
2093 | """GetWidth() -> int""" | |
2094 | return _core.Image_GetWidth(*args, **kwargs) | |
2095 | ||
2096 | def GetHeight(*args, **kwargs): | |
2097 | """GetHeight() -> int""" | |
2098 | return _core.Image_GetHeight(*args, **kwargs) | |
2099 | ||
2100 | def GetSubImage(*args, **kwargs): | |
2101 | """GetSubImage(Rect rect) -> Image""" | |
2102 | return _core.Image_GetSubImage(*args, **kwargs) | |
2103 | ||
2104 | def Copy(*args, **kwargs): | |
2105 | """Copy() -> Image""" | |
2106 | return _core.Image_Copy(*args, **kwargs) | |
2107 | ||
2108 | def Paste(*args, **kwargs): | |
2109 | """Paste(Image image, int x, int y)""" | |
2110 | return _core.Image_Paste(*args, **kwargs) | |
2111 | ||
2112 | def GetData(*args, **kwargs): | |
2113 | """GetData() -> PyObject""" | |
2114 | return _core.Image_GetData(*args, **kwargs) | |
2115 | ||
2116 | def SetData(*args, **kwargs): | |
2117 | """SetData(PyObject data)""" | |
2118 | return _core.Image_SetData(*args, **kwargs) | |
2119 | ||
2120 | def GetDataBuffer(*args, **kwargs): | |
2121 | """GetDataBuffer() -> PyObject""" | |
2122 | return _core.Image_GetDataBuffer(*args, **kwargs) | |
2123 | ||
2124 | def SetDataBuffer(*args, **kwargs): | |
2125 | """SetDataBuffer(PyObject data)""" | |
2126 | return _core.Image_SetDataBuffer(*args, **kwargs) | |
2127 | ||
2128 | def GetAlphaData(*args, **kwargs): | |
2129 | """GetAlphaData() -> PyObject""" | |
2130 | return _core.Image_GetAlphaData(*args, **kwargs) | |
2131 | ||
2132 | def SetAlphaData(*args, **kwargs): | |
2133 | """SetAlphaData(PyObject data)""" | |
2134 | return _core.Image_SetAlphaData(*args, **kwargs) | |
2135 | ||
2136 | def GetAlphaBuffer(*args, **kwargs): | |
2137 | """GetAlphaBuffer() -> PyObject""" | |
2138 | return _core.Image_GetAlphaBuffer(*args, **kwargs) | |
2139 | ||
2140 | def SetAlphaBuffer(*args, **kwargs): | |
2141 | """SetAlphaBuffer(PyObject data)""" | |
2142 | return _core.Image_SetAlphaBuffer(*args, **kwargs) | |
2143 | ||
2144 | def SetMaskColour(*args, **kwargs): | |
2145 | """SetMaskColour(unsigned char r, unsigned char g, unsigned char b)""" | |
2146 | return _core.Image_SetMaskColour(*args, **kwargs) | |
2147 | ||
2148 | def GetMaskRed(*args, **kwargs): | |
2149 | """GetMaskRed() -> unsigned char""" | |
2150 | return _core.Image_GetMaskRed(*args, **kwargs) | |
2151 | ||
2152 | def GetMaskGreen(*args, **kwargs): | |
2153 | """GetMaskGreen() -> unsigned char""" | |
2154 | return _core.Image_GetMaskGreen(*args, **kwargs) | |
2155 | ||
2156 | def GetMaskBlue(*args, **kwargs): | |
2157 | """GetMaskBlue() -> unsigned char""" | |
2158 | return _core.Image_GetMaskBlue(*args, **kwargs) | |
2159 | ||
2160 | def SetMask(*args, **kwargs): | |
2161 | """SetMask(bool mask=True)""" | |
2162 | return _core.Image_SetMask(*args, **kwargs) | |
2163 | ||
2164 | def HasMask(*args, **kwargs): | |
2165 | """HasMask() -> bool""" | |
2166 | return _core.Image_HasMask(*args, **kwargs) | |
2167 | ||
2168 | def Rotate(*args, **kwargs): | |
0df68c9f RD |
2169 | """ |
2170 | Rotate(double angle, Point centre_of_rotation, bool interpolating=True, | |
2171 | Point offset_after_rotation=None) -> Image | |
2172 | """ | |
e811c8ce RD |
2173 | return _core.Image_Rotate(*args, **kwargs) |
2174 | ||
2175 | def Rotate90(*args, **kwargs): | |
2176 | """Rotate90(bool clockwise=True) -> Image""" | |
2177 | return _core.Image_Rotate90(*args, **kwargs) | |
2178 | ||
2179 | def Mirror(*args, **kwargs): | |
2180 | """Mirror(bool horizontally=True) -> Image""" | |
2181 | return _core.Image_Mirror(*args, **kwargs) | |
2182 | ||
2183 | def Replace(*args, **kwargs): | |
0df68c9f RD |
2184 | """ |
2185 | Replace(unsigned char r1, unsigned char g1, unsigned char b1, | |
2186 | unsigned char r2, unsigned char g2, unsigned char b2) | |
2187 | """ | |
e811c8ce RD |
2188 | return _core.Image_Replace(*args, **kwargs) |
2189 | ||
2190 | def ConvertToMono(*args, **kwargs): | |
2191 | """ConvertToMono(unsigned char r, unsigned char g, unsigned char b) -> Image""" | |
2192 | return _core.Image_ConvertToMono(*args, **kwargs) | |
2193 | ||
2194 | def SetOption(*args, **kwargs): | |
2195 | """SetOption(wxString name, wxString value)""" | |
2196 | return _core.Image_SetOption(*args, **kwargs) | |
2197 | ||
2198 | def SetOptionInt(*args, **kwargs): | |
2199 | """SetOptionInt(wxString name, int value)""" | |
2200 | return _core.Image_SetOptionInt(*args, **kwargs) | |
2201 | ||
2202 | def GetOption(*args, **kwargs): | |
2203 | """GetOption(wxString name) -> wxString""" | |
2204 | return _core.Image_GetOption(*args, **kwargs) | |
2205 | ||
2206 | def GetOptionInt(*args, **kwargs): | |
2207 | """GetOptionInt(wxString name) -> int""" | |
2208 | return _core.Image_GetOptionInt(*args, **kwargs) | |
2209 | ||
2210 | def HasOption(*args, **kwargs): | |
2211 | """HasOption(wxString name) -> bool""" | |
2212 | return _core.Image_HasOption(*args, **kwargs) | |
2213 | ||
2214 | def CountColours(*args, **kwargs): | |
2215 | """CountColours(unsigned long stopafter=(unsigned long) -1) -> unsigned long""" | |
2216 | return _core.Image_CountColours(*args, **kwargs) | |
2217 | ||
2218 | def ComputeHistogram(*args, **kwargs): | |
2219 | """ComputeHistogram(ImageHistogram h) -> unsigned long""" | |
2220 | return _core.Image_ComputeHistogram(*args, **kwargs) | |
2221 | ||
2222 | def AddHandler(*args, **kwargs): | |
2223 | """Image.AddHandler(ImageHandler handler)""" | |
2224 | return _core.Image_AddHandler(*args, **kwargs) | |
2225 | ||
2226 | AddHandler = staticmethod(AddHandler) | |
2227 | def InsertHandler(*args, **kwargs): | |
2228 | """Image.InsertHandler(ImageHandler handler)""" | |
2229 | return _core.Image_InsertHandler(*args, **kwargs) | |
2230 | ||
2231 | InsertHandler = staticmethod(InsertHandler) | |
2232 | def RemoveHandler(*args, **kwargs): | |
2233 | """Image.RemoveHandler(wxString name) -> bool""" | |
2234 | return _core.Image_RemoveHandler(*args, **kwargs) | |
2235 | ||
2236 | RemoveHandler = staticmethod(RemoveHandler) | |
2237 | def GetImageExtWildcard(*args, **kwargs): | |
2238 | """Image.GetImageExtWildcard() -> wxString""" | |
2239 | return _core.Image_GetImageExtWildcard(*args, **kwargs) | |
2240 | ||
2241 | GetImageExtWildcard = staticmethod(GetImageExtWildcard) | |
2242 | def ConvertToBitmap(*args, **kwargs): | |
2243 | """ConvertToBitmap() -> wxBitmap""" | |
2244 | return _core.Image_ConvertToBitmap(*args, **kwargs) | |
2245 | ||
2246 | def ConvertToMonoBitmap(*args, **kwargs): | |
2247 | """ConvertToMonoBitmap(unsigned char red, unsigned char green, unsigned char blue) -> wxBitmap""" | |
2248 | return _core.Image_ConvertToMonoBitmap(*args, **kwargs) | |
2249 | ||
2250 | def __nonzero__(self): return self.Ok() | |
d14a1e28 RD |
2251 | |
2252 | class ImagePtr(Image): | |
2253 | def __init__(self, this): | |
2254 | self.this = this | |
2255 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2256 | self.__class__ = Image | |
2257 | _core.Image_swigregister(ImagePtr) | |
2258 | ||
2259 | def ImageFromMime(*args, **kwargs): | |
e811c8ce | 2260 | """ImageFromMime(wxString name, wxString mimetype, int index=-1) -> Image""" |
d14a1e28 RD |
2261 | val = _core.new_ImageFromMime(*args, **kwargs) |
2262 | val.thisown = 1 | |
2263 | return val | |
2264 | ||
2265 | def ImageFromStream(*args, **kwargs): | |
e811c8ce | 2266 | """ImageFromStream(wxInputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
d14a1e28 RD |
2267 | val = _core.new_ImageFromStream(*args, **kwargs) |
2268 | val.thisown = 1 | |
2269 | return val | |
2270 | ||
2271 | def ImageFromStreamMime(*args, **kwargs): | |
e811c8ce | 2272 | """ImageFromStreamMime(wxInputStream stream, wxString mimetype, int index=-1) -> Image""" |
d14a1e28 RD |
2273 | val = _core.new_ImageFromStreamMime(*args, **kwargs) |
2274 | val.thisown = 1 | |
2275 | return val | |
2276 | ||
2277 | def EmptyImage(*args, **kwargs): | |
e811c8ce | 2278 | """EmptyImage(int width=0, int height=0, bool clear=True) -> Image""" |
d14a1e28 RD |
2279 | val = _core.new_EmptyImage(*args, **kwargs) |
2280 | val.thisown = 1 | |
2281 | return val | |
2282 | ||
2283 | def ImageFromBitmap(*args, **kwargs): | |
e811c8ce | 2284 | """ImageFromBitmap(wxBitmap bitmap) -> Image""" |
d14a1e28 RD |
2285 | val = _core.new_ImageFromBitmap(*args, **kwargs) |
2286 | val.thisown = 1 | |
2287 | return val | |
2288 | ||
2289 | def ImageFromData(*args, **kwargs): | |
e811c8ce | 2290 | """ImageFromData(int width, int height, unsigned char data) -> Image""" |
d14a1e28 RD |
2291 | val = _core.new_ImageFromData(*args, **kwargs) |
2292 | val.thisown = 1 | |
2293 | return val | |
2294 | ||
e811c8ce RD |
2295 | def Image_CanRead(*args, **kwargs): |
2296 | """Image_CanRead(wxString name) -> bool""" | |
2297 | return _core.Image_CanRead(*args, **kwargs) | |
d14a1e28 | 2298 | |
e811c8ce RD |
2299 | def Image_GetImageCount(*args, **kwargs): |
2300 | """Image_GetImageCount(wxString name, long type=BITMAP_TYPE_ANY) -> int""" | |
2301 | return _core.Image_GetImageCount(*args, **kwargs) | |
d14a1e28 | 2302 | |
e811c8ce RD |
2303 | def Image_CanReadStream(*args, **kwargs): |
2304 | """Image_CanReadStream(wxInputStream stream) -> bool""" | |
2305 | return _core.Image_CanReadStream(*args, **kwargs) | |
d14a1e28 | 2306 | |
e811c8ce RD |
2307 | def Image_AddHandler(*args, **kwargs): |
2308 | """Image_AddHandler(ImageHandler handler)""" | |
2309 | return _core.Image_AddHandler(*args, **kwargs) | |
d14a1e28 | 2310 | |
e811c8ce RD |
2311 | def Image_InsertHandler(*args, **kwargs): |
2312 | """Image_InsertHandler(ImageHandler handler)""" | |
2313 | return _core.Image_InsertHandler(*args, **kwargs) | |
d14a1e28 | 2314 | |
e811c8ce RD |
2315 | def Image_RemoveHandler(*args, **kwargs): |
2316 | """Image_RemoveHandler(wxString name) -> bool""" | |
2317 | return _core.Image_RemoveHandler(*args, **kwargs) | |
d14a1e28 | 2318 | |
e811c8ce RD |
2319 | def Image_GetImageExtWildcard(*args, **kwargs): |
2320 | """Image_GetImageExtWildcard() -> wxString""" | |
2321 | return _core.Image_GetImageExtWildcard(*args, **kwargs) | |
d14a1e28 RD |
2322 | |
2323 | ||
e811c8ce RD |
2324 | def InitAllImageHandlers(*args, **kwargs): |
2325 | """InitAllImageHandlers()""" | |
2326 | return _core.InitAllImageHandlers(*args, **kwargs) | |
d14a1e28 RD |
2327 | IMAGE_RESOLUTION_INCHES = _core.IMAGE_RESOLUTION_INCHES |
2328 | IMAGE_RESOLUTION_CM = _core.IMAGE_RESOLUTION_CM | |
2329 | BMP_24BPP = _core.BMP_24BPP | |
2330 | BMP_8BPP = _core.BMP_8BPP | |
2331 | BMP_8BPP_GREY = _core.BMP_8BPP_GREY | |
2332 | BMP_8BPP_GRAY = _core.BMP_8BPP_GRAY | |
2333 | BMP_8BPP_RED = _core.BMP_8BPP_RED | |
2334 | BMP_8BPP_PALETTE = _core.BMP_8BPP_PALETTE | |
2335 | BMP_4BPP = _core.BMP_4BPP | |
2336 | BMP_1BPP = _core.BMP_1BPP | |
2337 | BMP_1BPP_BW = _core.BMP_1BPP_BW | |
2338 | class BMPHandler(ImageHandler): | |
e811c8ce RD |
2339 | def __repr__(self): |
2340 | return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2341 | def __init__(self, *args, **kwargs): |
e811c8ce | 2342 | """__init__() -> BMPHandler""" |
d14a1e28 RD |
2343 | newobj = _core.new_BMPHandler(*args, **kwargs) |
2344 | self.this = newobj.this | |
2345 | self.thisown = 1 | |
2346 | del newobj.thisown | |
d14a1e28 RD |
2347 | |
2348 | class BMPHandlerPtr(BMPHandler): | |
2349 | def __init__(self, this): | |
2350 | self.this = this | |
2351 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2352 | self.__class__ = BMPHandler | |
2353 | _core.BMPHandler_swigregister(BMPHandlerPtr) | |
2354 | NullImage = cvar.NullImage | |
2355 | IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT | |
2356 | IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X | |
2357 | IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y | |
2358 | IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION | |
2359 | IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT | |
2360 | ||
2361 | class ICOHandler(BMPHandler): | |
e811c8ce RD |
2362 | def __repr__(self): |
2363 | return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2364 | def __init__(self, *args, **kwargs): |
e811c8ce | 2365 | """__init__() -> ICOHandler""" |
d14a1e28 RD |
2366 | newobj = _core.new_ICOHandler(*args, **kwargs) |
2367 | self.this = newobj.this | |
2368 | self.thisown = 1 | |
2369 | del newobj.thisown | |
d14a1e28 RD |
2370 | |
2371 | class ICOHandlerPtr(ICOHandler): | |
2372 | def __init__(self, this): | |
2373 | self.this = this | |
2374 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2375 | self.__class__ = ICOHandler | |
2376 | _core.ICOHandler_swigregister(ICOHandlerPtr) | |
2377 | ||
2378 | class CURHandler(ICOHandler): | |
e811c8ce RD |
2379 | def __repr__(self): |
2380 | return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2381 | def __init__(self, *args, **kwargs): |
e811c8ce | 2382 | """__init__() -> CURHandler""" |
d14a1e28 RD |
2383 | newobj = _core.new_CURHandler(*args, **kwargs) |
2384 | self.this = newobj.this | |
2385 | self.thisown = 1 | |
2386 | del newobj.thisown | |
d14a1e28 RD |
2387 | |
2388 | class CURHandlerPtr(CURHandler): | |
2389 | def __init__(self, this): | |
2390 | self.this = this | |
2391 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2392 | self.__class__ = CURHandler | |
2393 | _core.CURHandler_swigregister(CURHandlerPtr) | |
2394 | ||
2395 | class ANIHandler(CURHandler): | |
e811c8ce RD |
2396 | def __repr__(self): |
2397 | return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2398 | def __init__(self, *args, **kwargs): |
e811c8ce | 2399 | """__init__() -> ANIHandler""" |
d14a1e28 RD |
2400 | newobj = _core.new_ANIHandler(*args, **kwargs) |
2401 | self.this = newobj.this | |
2402 | self.thisown = 1 | |
2403 | del newobj.thisown | |
d14a1e28 RD |
2404 | |
2405 | class ANIHandlerPtr(ANIHandler): | |
2406 | def __init__(self, this): | |
2407 | self.this = this | |
2408 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2409 | self.__class__ = ANIHandler | |
2410 | _core.ANIHandler_swigregister(ANIHandlerPtr) | |
2411 | ||
2412 | class PNGHandler(ImageHandler): | |
e811c8ce RD |
2413 | def __repr__(self): |
2414 | return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2415 | def __init__(self, *args, **kwargs): |
e811c8ce | 2416 | """__init__() -> PNGHandler""" |
d14a1e28 RD |
2417 | newobj = _core.new_PNGHandler(*args, **kwargs) |
2418 | self.this = newobj.this | |
2419 | self.thisown = 1 | |
2420 | del newobj.thisown | |
d14a1e28 RD |
2421 | |
2422 | class PNGHandlerPtr(PNGHandler): | |
2423 | def __init__(self, this): | |
2424 | self.this = this | |
2425 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2426 | self.__class__ = PNGHandler | |
2427 | _core.PNGHandler_swigregister(PNGHandlerPtr) | |
2428 | ||
2429 | class GIFHandler(ImageHandler): | |
e811c8ce RD |
2430 | def __repr__(self): |
2431 | return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2432 | def __init__(self, *args, **kwargs): |
e811c8ce | 2433 | """__init__() -> GIFHandler""" |
d14a1e28 RD |
2434 | newobj = _core.new_GIFHandler(*args, **kwargs) |
2435 | self.this = newobj.this | |
2436 | self.thisown = 1 | |
2437 | del newobj.thisown | |
d14a1e28 RD |
2438 | |
2439 | class GIFHandlerPtr(GIFHandler): | |
2440 | def __init__(self, this): | |
2441 | self.this = this | |
2442 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2443 | self.__class__ = GIFHandler | |
2444 | _core.GIFHandler_swigregister(GIFHandlerPtr) | |
2445 | ||
2446 | class PCXHandler(ImageHandler): | |
e811c8ce RD |
2447 | def __repr__(self): |
2448 | return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2449 | def __init__(self, *args, **kwargs): |
e811c8ce | 2450 | """__init__() -> PCXHandler""" |
d14a1e28 RD |
2451 | newobj = _core.new_PCXHandler(*args, **kwargs) |
2452 | self.this = newobj.this | |
2453 | self.thisown = 1 | |
2454 | del newobj.thisown | |
d14a1e28 RD |
2455 | |
2456 | class PCXHandlerPtr(PCXHandler): | |
2457 | def __init__(self, this): | |
2458 | self.this = this | |
2459 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2460 | self.__class__ = PCXHandler | |
2461 | _core.PCXHandler_swigregister(PCXHandlerPtr) | |
2462 | ||
2463 | class JPEGHandler(ImageHandler): | |
e811c8ce RD |
2464 | def __repr__(self): |
2465 | return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2466 | def __init__(self, *args, **kwargs): |
e811c8ce | 2467 | """__init__() -> JPEGHandler""" |
d14a1e28 RD |
2468 | newobj = _core.new_JPEGHandler(*args, **kwargs) |
2469 | self.this = newobj.this | |
2470 | self.thisown = 1 | |
2471 | del newobj.thisown | |
d14a1e28 RD |
2472 | |
2473 | class JPEGHandlerPtr(JPEGHandler): | |
2474 | def __init__(self, this): | |
2475 | self.this = this | |
2476 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2477 | self.__class__ = JPEGHandler | |
2478 | _core.JPEGHandler_swigregister(JPEGHandlerPtr) | |
2479 | ||
2480 | class PNMHandler(ImageHandler): | |
e811c8ce RD |
2481 | def __repr__(self): |
2482 | return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2483 | def __init__(self, *args, **kwargs): |
e811c8ce | 2484 | """__init__() -> PNMHandler""" |
d14a1e28 RD |
2485 | newobj = _core.new_PNMHandler(*args, **kwargs) |
2486 | self.this = newobj.this | |
2487 | self.thisown = 1 | |
2488 | del newobj.thisown | |
d14a1e28 RD |
2489 | |
2490 | class PNMHandlerPtr(PNMHandler): | |
2491 | def __init__(self, this): | |
2492 | self.this = this | |
2493 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2494 | self.__class__ = PNMHandler | |
2495 | _core.PNMHandler_swigregister(PNMHandlerPtr) | |
2496 | ||
2497 | class XPMHandler(ImageHandler): | |
e811c8ce RD |
2498 | def __repr__(self): |
2499 | return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2500 | def __init__(self, *args, **kwargs): |
e811c8ce | 2501 | """__init__() -> XPMHandler""" |
d14a1e28 RD |
2502 | newobj = _core.new_XPMHandler(*args, **kwargs) |
2503 | self.this = newobj.this | |
2504 | self.thisown = 1 | |
2505 | del newobj.thisown | |
d14a1e28 RD |
2506 | |
2507 | class XPMHandlerPtr(XPMHandler): | |
2508 | def __init__(self, this): | |
2509 | self.this = this | |
2510 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2511 | self.__class__ = XPMHandler | |
2512 | _core.XPMHandler_swigregister(XPMHandlerPtr) | |
2513 | ||
2514 | class TIFFHandler(ImageHandler): | |
e811c8ce RD |
2515 | def __repr__(self): |
2516 | return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2517 | def __init__(self, *args, **kwargs): |
e811c8ce | 2518 | """__init__() -> TIFFHandler""" |
d14a1e28 RD |
2519 | newobj = _core.new_TIFFHandler(*args, **kwargs) |
2520 | self.this = newobj.this | |
2521 | self.thisown = 1 | |
2522 | del newobj.thisown | |
d14a1e28 RD |
2523 | |
2524 | class TIFFHandlerPtr(TIFFHandler): | |
2525 | def __init__(self, this): | |
2526 | self.this = this | |
2527 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2528 | self.__class__ = TIFFHandler | |
2529 | _core.TIFFHandler_swigregister(TIFFHandlerPtr) | |
2530 | ||
2531 | #--------------------------------------------------------------------------- | |
2532 | ||
2533 | class EvtHandler(Object): | |
e811c8ce RD |
2534 | def __repr__(self): |
2535 | return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2536 | def __init__(self, *args, **kwargs): |
e811c8ce | 2537 | """__init__() -> EvtHandler""" |
d14a1e28 RD |
2538 | newobj = _core.new_EvtHandler(*args, **kwargs) |
2539 | self.this = newobj.this | |
2540 | self.thisown = 1 | |
2541 | del newobj.thisown | |
e811c8ce RD |
2542 | def GetNextHandler(*args, **kwargs): |
2543 | """GetNextHandler() -> EvtHandler""" | |
2544 | return _core.EvtHandler_GetNextHandler(*args, **kwargs) | |
2545 | ||
2546 | def GetPreviousHandler(*args, **kwargs): | |
2547 | """GetPreviousHandler() -> EvtHandler""" | |
2548 | return _core.EvtHandler_GetPreviousHandler(*args, **kwargs) | |
2549 | ||
2550 | def SetNextHandler(*args, **kwargs): | |
2551 | """SetNextHandler(EvtHandler handler)""" | |
2552 | return _core.EvtHandler_SetNextHandler(*args, **kwargs) | |
2553 | ||
2554 | def SetPreviousHandler(*args, **kwargs): | |
2555 | """SetPreviousHandler(EvtHandler handler)""" | |
2556 | return _core.EvtHandler_SetPreviousHandler(*args, **kwargs) | |
2557 | ||
2558 | def GetEvtHandlerEnabled(*args, **kwargs): | |
2559 | """GetEvtHandlerEnabled() -> bool""" | |
2560 | return _core.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs) | |
2561 | ||
2562 | def SetEvtHandlerEnabled(*args, **kwargs): | |
2563 | """SetEvtHandlerEnabled(bool enabled)""" | |
2564 | return _core.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs) | |
2565 | ||
2566 | def ProcessEvent(*args, **kwargs): | |
2567 | """ProcessEvent(Event event) -> bool""" | |
2568 | return _core.EvtHandler_ProcessEvent(*args, **kwargs) | |
2569 | ||
2570 | def AddPendingEvent(*args, **kwargs): | |
2571 | """AddPendingEvent(Event event)""" | |
2572 | return _core.EvtHandler_AddPendingEvent(*args, **kwargs) | |
2573 | ||
2574 | def ProcessPendingEvents(*args, **kwargs): | |
2575 | """ProcessPendingEvents()""" | |
2576 | return _core.EvtHandler_ProcessPendingEvents(*args, **kwargs) | |
2577 | ||
2578 | def Connect(*args, **kwargs): | |
2579 | """Connect(int id, int lastId, int eventType, PyObject func)""" | |
2580 | return _core.EvtHandler_Connect(*args, **kwargs) | |
2581 | ||
2582 | def Disconnect(*args, **kwargs): | |
2583 | """Disconnect(int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool""" | |
2584 | return _core.EvtHandler_Disconnect(*args, **kwargs) | |
2585 | ||
2586 | def _setOORInfo(*args, **kwargs): | |
2587 | """_setOORInfo(PyObject _self)""" | |
2588 | return _core.EvtHandler__setOORInfo(*args, **kwargs) | |
2589 | ||
d14a1e28 RD |
2590 | def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
2591 | """ | |
2592 | Bind an event to an event handler. | |
2593 | ||
2594 | event One of the EVT_* objects that specifies the | |
2595 | type of event to bind, | |
2596 | ||
2597 | handler A callable object to be invoked when the event | |
2598 | is delivered to self. Pass None to disconnect an | |
2599 | event handler. | |
2600 | ||
2601 | source Sometimes the event originates from a different window | |
2602 | than self, but you still want to catch it in self. (For | |
2603 | example, a button event delivered to a frame.) By | |
2604 | passing the source of the event, the event handling | |
2605 | system is able to differentiate between the same event | |
2606 | type from different controls. | |
2607 | ||
2608 | id,id2 Used for menu IDs or for event types that require a | |
2609 | range of IDs | |
2610 | """ | |
2611 | if source is not None: | |
2612 | id = source.GetId() | |
2613 | event.Bind(self, id, id2, handler) | |
2614 | ||
2615 | ||
d14a1e28 RD |
2616 | |
2617 | class EvtHandlerPtr(EvtHandler): | |
2618 | def __init__(self, this): | |
2619 | self.this = this | |
2620 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2621 | self.__class__ = EvtHandler | |
2622 | _core.EvtHandler_swigregister(EvtHandlerPtr) | |
2623 | ||
2624 | #--------------------------------------------------------------------------- | |
2625 | ||
2626 | class PyEventBinder(object): | |
2627 | """ | |
2628 | Instances of this class are used to bind specific events to event | |
2629 | handlers. | |
2630 | """ | |
2631 | def __init__(self, evtType, expectedIDs=0): | |
2632 | if expectedIDs not in [0, 1, 2]: | |
2633 | raise ValueError, "Invalid number of expectedIDs" | |
2634 | self.expectedIDs = expectedIDs | |
2635 | ||
2636 | if type(evtType) == list or type(evtType) == tuple: | |
2637 | self.evtType = evtType | |
2638 | else: | |
2639 | self.evtType = [evtType] | |
2640 | ||
2641 | ||
2642 | def Bind(self, target, id1, id2, function): | |
2643 | """Bind this set of event types to target.""" | |
2644 | for et in self.evtType: | |
2645 | target.Connect(id1, id2, et, function) | |
2646 | ||
2647 | ||
2648 | def __call__(self, *args): | |
2649 | """ | |
2650 | For backwards compatibility with the old EVT_* functions. | |
2651 | Should be called with either (window, func), (window, ID, | |
2652 | func) or (window, ID1, ID2, func) parameters depending on the | |
2653 | type of the event. | |
2654 | """ | |
2655 | assert len(args) == 2 + self.expectedIDs | |
2656 | id1 = wx.ID_ANY | |
2657 | id2 = wx.ID_ANY | |
2658 | target = args[0] | |
2659 | if self.expectedIDs == 0: | |
2660 | func = args[1] | |
2661 | elif self.expectedIDs == 1: | |
2662 | id1 = args[1] | |
2663 | func = args[2] | |
2664 | elif self.expectedIDs == 2: | |
2665 | id1 = args[1] | |
2666 | id2 = args[2] | |
2667 | func = args[3] | |
2668 | else: | |
2669 | raise ValueError, "Unexpected number of IDs" | |
2670 | ||
2671 | self.Bind(target, id1, id2, func) | |
2672 | ||
2673 | ||
2674 | # These two are square pegs that don't fit the PyEventBinder hole... | |
2675 | def EVT_COMMAND(win, id, cmd, func): | |
2676 | win.Connect(id, -1, cmd, func) | |
2677 | def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): | |
2678 | win.Connect(id1, id2, cmd, func) | |
2679 | ||
2680 | ||
2681 | #--------------------------------------------------------------------------- | |
2682 | ||
2683 | #--------------------------------------------------------------------------- | |
2684 | ||
2685 | EVENT_PROPAGATE_NONE = _core.EVENT_PROPAGATE_NONE | |
2686 | EVENT_PROPAGATE_MAX = _core.EVENT_PROPAGATE_MAX | |
2687 | ||
e811c8ce RD |
2688 | def NewEventType(*args, **kwargs): |
2689 | """NewEventType() -> wxEventType""" | |
2690 | return _core.NewEventType(*args, **kwargs) | |
d14a1e28 RD |
2691 | wxEVT_NULL = _core.wxEVT_NULL |
2692 | wxEVT_FIRST = _core.wxEVT_FIRST | |
2693 | wxEVT_USER_FIRST = _core.wxEVT_USER_FIRST | |
2694 | wxEVT_COMMAND_BUTTON_CLICKED = _core.wxEVT_COMMAND_BUTTON_CLICKED | |
2695 | wxEVT_COMMAND_CHECKBOX_CLICKED = _core.wxEVT_COMMAND_CHECKBOX_CLICKED | |
2696 | wxEVT_COMMAND_CHOICE_SELECTED = _core.wxEVT_COMMAND_CHOICE_SELECTED | |
2697 | wxEVT_COMMAND_LISTBOX_SELECTED = _core.wxEVT_COMMAND_LISTBOX_SELECTED | |
2698 | wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED | |
2699 | wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED | |
2700 | wxEVT_COMMAND_MENU_SELECTED = _core.wxEVT_COMMAND_MENU_SELECTED | |
2701 | wxEVT_COMMAND_TOOL_CLICKED = _core.wxEVT_COMMAND_TOOL_CLICKED | |
2702 | wxEVT_COMMAND_SLIDER_UPDATED = _core.wxEVT_COMMAND_SLIDER_UPDATED | |
2703 | wxEVT_COMMAND_RADIOBOX_SELECTED = _core.wxEVT_COMMAND_RADIOBOX_SELECTED | |
2704 | wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core.wxEVT_COMMAND_RADIOBUTTON_SELECTED | |
2705 | wxEVT_COMMAND_SCROLLBAR_UPDATED = _core.wxEVT_COMMAND_SCROLLBAR_UPDATED | |
2706 | wxEVT_COMMAND_VLBOX_SELECTED = _core.wxEVT_COMMAND_VLBOX_SELECTED | |
2707 | wxEVT_COMMAND_COMBOBOX_SELECTED = _core.wxEVT_COMMAND_COMBOBOX_SELECTED | |
2708 | wxEVT_COMMAND_TOOL_RCLICKED = _core.wxEVT_COMMAND_TOOL_RCLICKED | |
2709 | wxEVT_COMMAND_TOOL_ENTER = _core.wxEVT_COMMAND_TOOL_ENTER | |
2710 | wxEVT_LEFT_DOWN = _core.wxEVT_LEFT_DOWN | |
2711 | wxEVT_LEFT_UP = _core.wxEVT_LEFT_UP | |
2712 | wxEVT_MIDDLE_DOWN = _core.wxEVT_MIDDLE_DOWN | |
2713 | wxEVT_MIDDLE_UP = _core.wxEVT_MIDDLE_UP | |
2714 | wxEVT_RIGHT_DOWN = _core.wxEVT_RIGHT_DOWN | |
2715 | wxEVT_RIGHT_UP = _core.wxEVT_RIGHT_UP | |
2716 | wxEVT_MOTION = _core.wxEVT_MOTION | |
2717 | wxEVT_ENTER_WINDOW = _core.wxEVT_ENTER_WINDOW | |
2718 | wxEVT_LEAVE_WINDOW = _core.wxEVT_LEAVE_WINDOW | |
2719 | wxEVT_LEFT_DCLICK = _core.wxEVT_LEFT_DCLICK | |
2720 | wxEVT_MIDDLE_DCLICK = _core.wxEVT_MIDDLE_DCLICK | |
2721 | wxEVT_RIGHT_DCLICK = _core.wxEVT_RIGHT_DCLICK | |
2722 | wxEVT_SET_FOCUS = _core.wxEVT_SET_FOCUS | |
2723 | wxEVT_KILL_FOCUS = _core.wxEVT_KILL_FOCUS | |
2724 | wxEVT_CHILD_FOCUS = _core.wxEVT_CHILD_FOCUS | |
2725 | wxEVT_MOUSEWHEEL = _core.wxEVT_MOUSEWHEEL | |
2726 | wxEVT_NC_LEFT_DOWN = _core.wxEVT_NC_LEFT_DOWN | |
2727 | wxEVT_NC_LEFT_UP = _core.wxEVT_NC_LEFT_UP | |
2728 | wxEVT_NC_MIDDLE_DOWN = _core.wxEVT_NC_MIDDLE_DOWN | |
2729 | wxEVT_NC_MIDDLE_UP = _core.wxEVT_NC_MIDDLE_UP | |
2730 | wxEVT_NC_RIGHT_DOWN = _core.wxEVT_NC_RIGHT_DOWN | |
2731 | wxEVT_NC_RIGHT_UP = _core.wxEVT_NC_RIGHT_UP | |
2732 | wxEVT_NC_MOTION = _core.wxEVT_NC_MOTION | |
2733 | wxEVT_NC_ENTER_WINDOW = _core.wxEVT_NC_ENTER_WINDOW | |
2734 | wxEVT_NC_LEAVE_WINDOW = _core.wxEVT_NC_LEAVE_WINDOW | |
2735 | wxEVT_NC_LEFT_DCLICK = _core.wxEVT_NC_LEFT_DCLICK | |
2736 | wxEVT_NC_MIDDLE_DCLICK = _core.wxEVT_NC_MIDDLE_DCLICK | |
2737 | wxEVT_NC_RIGHT_DCLICK = _core.wxEVT_NC_RIGHT_DCLICK | |
2738 | wxEVT_CHAR = _core.wxEVT_CHAR | |
2739 | wxEVT_CHAR_HOOK = _core.wxEVT_CHAR_HOOK | |
2740 | wxEVT_NAVIGATION_KEY = _core.wxEVT_NAVIGATION_KEY | |
2741 | wxEVT_KEY_DOWN = _core.wxEVT_KEY_DOWN | |
2742 | wxEVT_KEY_UP = _core.wxEVT_KEY_UP | |
2743 | wxEVT_HOTKEY = _core.wxEVT_HOTKEY | |
2744 | wxEVT_SET_CURSOR = _core.wxEVT_SET_CURSOR | |
2745 | wxEVT_SCROLL_TOP = _core.wxEVT_SCROLL_TOP | |
2746 | wxEVT_SCROLL_BOTTOM = _core.wxEVT_SCROLL_BOTTOM | |
2747 | wxEVT_SCROLL_LINEUP = _core.wxEVT_SCROLL_LINEUP | |
2748 | wxEVT_SCROLL_LINEDOWN = _core.wxEVT_SCROLL_LINEDOWN | |
2749 | wxEVT_SCROLL_PAGEUP = _core.wxEVT_SCROLL_PAGEUP | |
2750 | wxEVT_SCROLL_PAGEDOWN = _core.wxEVT_SCROLL_PAGEDOWN | |
2751 | wxEVT_SCROLL_THUMBTRACK = _core.wxEVT_SCROLL_THUMBTRACK | |
2752 | wxEVT_SCROLL_THUMBRELEASE = _core.wxEVT_SCROLL_THUMBRELEASE | |
2753 | wxEVT_SCROLL_ENDSCROLL = _core.wxEVT_SCROLL_ENDSCROLL | |
2754 | wxEVT_SCROLLWIN_TOP = _core.wxEVT_SCROLLWIN_TOP | |
2755 | wxEVT_SCROLLWIN_BOTTOM = _core.wxEVT_SCROLLWIN_BOTTOM | |
2756 | wxEVT_SCROLLWIN_LINEUP = _core.wxEVT_SCROLLWIN_LINEUP | |
2757 | wxEVT_SCROLLWIN_LINEDOWN = _core.wxEVT_SCROLLWIN_LINEDOWN | |
2758 | wxEVT_SCROLLWIN_PAGEUP = _core.wxEVT_SCROLLWIN_PAGEUP | |
2759 | wxEVT_SCROLLWIN_PAGEDOWN = _core.wxEVT_SCROLLWIN_PAGEDOWN | |
2760 | wxEVT_SCROLLWIN_THUMBTRACK = _core.wxEVT_SCROLLWIN_THUMBTRACK | |
2761 | wxEVT_SCROLLWIN_THUMBRELEASE = _core.wxEVT_SCROLLWIN_THUMBRELEASE | |
2762 | wxEVT_SIZE = _core.wxEVT_SIZE | |
2763 | wxEVT_MOVE = _core.wxEVT_MOVE | |
2764 | wxEVT_CLOSE_WINDOW = _core.wxEVT_CLOSE_WINDOW | |
2765 | wxEVT_END_SESSION = _core.wxEVT_END_SESSION | |
2766 | wxEVT_QUERY_END_SESSION = _core.wxEVT_QUERY_END_SESSION | |
2767 | wxEVT_ACTIVATE_APP = _core.wxEVT_ACTIVATE_APP | |
2768 | wxEVT_POWER = _core.wxEVT_POWER | |
2769 | wxEVT_ACTIVATE = _core.wxEVT_ACTIVATE | |
2770 | wxEVT_CREATE = _core.wxEVT_CREATE | |
2771 | wxEVT_DESTROY = _core.wxEVT_DESTROY | |
2772 | wxEVT_SHOW = _core.wxEVT_SHOW | |
2773 | wxEVT_ICONIZE = _core.wxEVT_ICONIZE | |
2774 | wxEVT_MAXIMIZE = _core.wxEVT_MAXIMIZE | |
2775 | wxEVT_MOUSE_CAPTURE_CHANGED = _core.wxEVT_MOUSE_CAPTURE_CHANGED | |
2776 | wxEVT_PAINT = _core.wxEVT_PAINT | |
2777 | wxEVT_ERASE_BACKGROUND = _core.wxEVT_ERASE_BACKGROUND | |
2778 | wxEVT_NC_PAINT = _core.wxEVT_NC_PAINT | |
2779 | wxEVT_PAINT_ICON = _core.wxEVT_PAINT_ICON | |
2780 | wxEVT_MENU_OPEN = _core.wxEVT_MENU_OPEN | |
2781 | wxEVT_MENU_CLOSE = _core.wxEVT_MENU_CLOSE | |
2782 | wxEVT_MENU_HIGHLIGHT = _core.wxEVT_MENU_HIGHLIGHT | |
2783 | wxEVT_CONTEXT_MENU = _core.wxEVT_CONTEXT_MENU | |
2784 | wxEVT_SYS_COLOUR_CHANGED = _core.wxEVT_SYS_COLOUR_CHANGED | |
2785 | wxEVT_DISPLAY_CHANGED = _core.wxEVT_DISPLAY_CHANGED | |
2786 | wxEVT_SETTING_CHANGED = _core.wxEVT_SETTING_CHANGED | |
2787 | wxEVT_QUERY_NEW_PALETTE = _core.wxEVT_QUERY_NEW_PALETTE | |
2788 | wxEVT_PALETTE_CHANGED = _core.wxEVT_PALETTE_CHANGED | |
2789 | wxEVT_DROP_FILES = _core.wxEVT_DROP_FILES | |
2790 | wxEVT_DRAW_ITEM = _core.wxEVT_DRAW_ITEM | |
2791 | wxEVT_MEASURE_ITEM = _core.wxEVT_MEASURE_ITEM | |
2792 | wxEVT_COMPARE_ITEM = _core.wxEVT_COMPARE_ITEM | |
2793 | wxEVT_INIT_DIALOG = _core.wxEVT_INIT_DIALOG | |
2794 | wxEVT_IDLE = _core.wxEVT_IDLE | |
2795 | wxEVT_UPDATE_UI = _core.wxEVT_UPDATE_UI | |
2796 | wxEVT_SIZING = _core.wxEVT_SIZING | |
2797 | wxEVT_MOVING = _core.wxEVT_MOVING | |
2798 | wxEVT_COMMAND_LEFT_CLICK = _core.wxEVT_COMMAND_LEFT_CLICK | |
2799 | wxEVT_COMMAND_LEFT_DCLICK = _core.wxEVT_COMMAND_LEFT_DCLICK | |
2800 | wxEVT_COMMAND_RIGHT_CLICK = _core.wxEVT_COMMAND_RIGHT_CLICK | |
2801 | wxEVT_COMMAND_RIGHT_DCLICK = _core.wxEVT_COMMAND_RIGHT_DCLICK | |
2802 | wxEVT_COMMAND_SET_FOCUS = _core.wxEVT_COMMAND_SET_FOCUS | |
2803 | wxEVT_COMMAND_KILL_FOCUS = _core.wxEVT_COMMAND_KILL_FOCUS | |
2804 | wxEVT_COMMAND_ENTER = _core.wxEVT_COMMAND_ENTER | |
2805 | # | |
2806 | # Create some event binders | |
2807 | EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE ) | |
2808 | EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING ) | |
2809 | EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE ) | |
2810 | EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING ) | |
2811 | EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW ) | |
2812 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
2813 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
2814 | EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT ) | |
2815 | EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT ) | |
2816 | EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND ) | |
2817 | EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR ) | |
2818 | EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN ) | |
2819 | EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP ) | |
2820 | EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) | |
2821 | EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK ) | |
2822 | EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN ) | |
2823 | EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE ) | |
2824 | EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1) | |
2825 | EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT ) | |
2826 | EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS ) | |
2827 | EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS ) | |
2828 | EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS ) | |
2829 | EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE ) | |
2830 | EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP ) | |
2831 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
2832 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
2833 | EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES ) | |
2834 | EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG ) | |
2835 | EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED ) | |
2836 | EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED ) | |
2837 | EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW ) | |
2838 | EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE ) | |
2839 | EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE ) | |
2840 | EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY ) | |
2841 | EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED ) | |
2842 | EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE ) | |
2843 | EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE ) | |
2844 | EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY ) | |
2845 | EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR ) | |
2846 | EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED ) | |
2847 | ||
2848 | EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN ) | |
2849 | EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP ) | |
2850 | EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN ) | |
2851 | EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP ) | |
2852 | EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN ) | |
2853 | EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP ) | |
2854 | EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION ) | |
2855 | EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK ) | |
2856 | EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK ) | |
2857 | EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK ) | |
2858 | EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW ) | |
2859 | EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW ) | |
2860 | EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL ) | |
2861 | ||
2862 | EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN, | |
2863 | wxEVT_LEFT_UP, | |
2864 | wxEVT_MIDDLE_DOWN, | |
2865 | wxEVT_MIDDLE_UP, | |
2866 | wxEVT_RIGHT_DOWN, | |
2867 | wxEVT_RIGHT_UP, | |
2868 | wxEVT_MOTION, | |
2869 | wxEVT_LEFT_DCLICK, | |
2870 | wxEVT_MIDDLE_DCLICK, | |
2871 | wxEVT_RIGHT_DCLICK, | |
2872 | wxEVT_ENTER_WINDOW, | |
2873 | wxEVT_LEAVE_WINDOW, | |
2874 | wxEVT_MOUSEWHEEL | |
2875 | ]) | |
2876 | ||
2877 | ||
2878 | # Scrolling from wxWindow (sent to wxScrolledWindow) | |
2879 | EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, | |
2880 | wxEVT_SCROLLWIN_BOTTOM, | |
2881 | wxEVT_SCROLLWIN_LINEUP, | |
2882 | wxEVT_SCROLLWIN_LINEDOWN, | |
2883 | wxEVT_SCROLLWIN_PAGEUP, | |
2884 | wxEVT_SCROLLWIN_PAGEDOWN, | |
2885 | wxEVT_SCROLLWIN_THUMBTRACK, | |
2886 | wxEVT_SCROLLWIN_THUMBRELEASE, | |
2887 | ]) | |
2888 | ||
2889 | EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP ) | |
2890 | EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM ) | |
2891 | EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP ) | |
2892 | EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN ) | |
2893 | EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP ) | |
2894 | EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN ) | |
2895 | EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK ) | |
2896 | EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE ) | |
2897 | ||
2898 | # Scrolling from wxSlider and wxScrollBar | |
2899 | EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
2900 | wxEVT_SCROLL_BOTTOM, | |
2901 | wxEVT_SCROLL_LINEUP, | |
2902 | wxEVT_SCROLL_LINEDOWN, | |
2903 | wxEVT_SCROLL_PAGEUP, | |
2904 | wxEVT_SCROLL_PAGEDOWN, | |
2905 | wxEVT_SCROLL_THUMBTRACK, | |
2906 | wxEVT_SCROLL_THUMBRELEASE, | |
2907 | wxEVT_SCROLL_ENDSCROLL, | |
2908 | ]) | |
2909 | ||
2910 | EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP ) | |
2911 | EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM ) | |
2912 | EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP ) | |
2913 | EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN ) | |
2914 | EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP ) | |
2915 | EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN ) | |
2916 | EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK ) | |
2917 | EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE ) | |
2918 | EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL ) | |
2919 | ||
2920 | # Scrolling from wxSlider and wxScrollBar, with an id | |
2921 | EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
2922 | wxEVT_SCROLL_BOTTOM, | |
2923 | wxEVT_SCROLL_LINEUP, | |
2924 | wxEVT_SCROLL_LINEDOWN, | |
2925 | wxEVT_SCROLL_PAGEUP, | |
2926 | wxEVT_SCROLL_PAGEDOWN, | |
2927 | wxEVT_SCROLL_THUMBTRACK, | |
2928 | wxEVT_SCROLL_THUMBRELEASE, | |
2929 | wxEVT_SCROLL_ENDSCROLL, | |
2930 | ], 1) | |
2931 | ||
2932 | EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1) | |
2933 | EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1) | |
2934 | EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1) | |
2935 | EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1) | |
2936 | EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1) | |
2937 | EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1) | |
2938 | EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) | |
2939 | EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1) | |
2940 | EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1) | |
2941 | ||
2942 | EVT_SPIN_UP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1) | |
2943 | EVT_SPIN_DOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1) | |
2944 | EVT_SPIN = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) | |
2945 | ||
2946 | EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1) | |
2947 | EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1) | |
2948 | EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1) | |
2949 | EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1) | |
2950 | EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1) | |
2951 | EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1) | |
2952 | EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2) | |
2953 | EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1) | |
2954 | EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1) | |
2955 | EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1) | |
2956 | ||
2957 | EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1) | |
2958 | EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1) | |
2959 | EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1) | |
2960 | EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1) | |
2961 | EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2) | |
2962 | EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1) | |
2963 | EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2) | |
2964 | EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1) | |
2965 | EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1) | |
2966 | ||
2967 | ||
2968 | EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1) | |
2969 | EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1) | |
2970 | EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1) | |
2971 | EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1) | |
2972 | EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1) | |
2973 | EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1) | |
2974 | EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1) | |
2975 | ||
2976 | EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE ) | |
2977 | ||
2978 | EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1) | |
2979 | EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2) | |
2980 | ||
2981 | EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) | |
2982 | ||
2983 | ||
2984 | ||
2985 | #--------------------------------------------------------------------------- | |
2986 | ||
2987 | class Event(Object): | |
e811c8ce RD |
2988 | def __init__(self): raise RuntimeError, "No constructor defined" |
2989 | def __repr__(self): | |
2990 | return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2991 | def __del__(self, destroy=_core.delete_Event): |
e811c8ce | 2992 | """__del__()""" |
d14a1e28 RD |
2993 | try: |
2994 | if self.thisown: destroy(self) | |
2995 | except: pass | |
e811c8ce RD |
2996 | |
2997 | def SetEventType(*args, **kwargs): | |
2998 | """SetEventType(wxEventType typ)""" | |
2999 | return _core.Event_SetEventType(*args, **kwargs) | |
3000 | ||
3001 | def GetEventType(*args, **kwargs): | |
3002 | """GetEventType() -> wxEventType""" | |
3003 | return _core.Event_GetEventType(*args, **kwargs) | |
3004 | ||
3005 | def GetEventObject(*args, **kwargs): | |
3006 | """GetEventObject() -> Object""" | |
3007 | return _core.Event_GetEventObject(*args, **kwargs) | |
3008 | ||
3009 | def SetEventObject(*args, **kwargs): | |
3010 | """SetEventObject(Object obj)""" | |
3011 | return _core.Event_SetEventObject(*args, **kwargs) | |
3012 | ||
3013 | def GetTimestamp(*args, **kwargs): | |
3014 | """GetTimestamp() -> long""" | |
3015 | return _core.Event_GetTimestamp(*args, **kwargs) | |
3016 | ||
3017 | def SetTimestamp(*args, **kwargs): | |
3018 | """SetTimestamp(long ts=0)""" | |
3019 | return _core.Event_SetTimestamp(*args, **kwargs) | |
3020 | ||
3021 | def GetId(*args, **kwargs): | |
3022 | """GetId() -> int""" | |
3023 | return _core.Event_GetId(*args, **kwargs) | |
3024 | ||
3025 | def SetId(*args, **kwargs): | |
3026 | """SetId(int Id)""" | |
3027 | return _core.Event_SetId(*args, **kwargs) | |
3028 | ||
3029 | def IsCommandEvent(*args, **kwargs): | |
3030 | """IsCommandEvent() -> bool""" | |
3031 | return _core.Event_IsCommandEvent(*args, **kwargs) | |
3032 | ||
3033 | def Skip(*args, **kwargs): | |
3034 | """Skip(bool skip=True)""" | |
3035 | return _core.Event_Skip(*args, **kwargs) | |
3036 | ||
3037 | def GetSkipped(*args, **kwargs): | |
3038 | """GetSkipped() -> bool""" | |
3039 | return _core.Event_GetSkipped(*args, **kwargs) | |
3040 | ||
3041 | def ShouldPropagate(*args, **kwargs): | |
3042 | """ShouldPropagate() -> bool""" | |
3043 | return _core.Event_ShouldPropagate(*args, **kwargs) | |
3044 | ||
3045 | def StopPropagation(*args, **kwargs): | |
3046 | """StopPropagation() -> int""" | |
3047 | return _core.Event_StopPropagation(*args, **kwargs) | |
3048 | ||
3049 | def ResumePropagation(*args, **kwargs): | |
3050 | """ResumePropagation(int propagationLevel)""" | |
3051 | return _core.Event_ResumePropagation(*args, **kwargs) | |
3052 | ||
3053 | def Clone(*args, **kwargs): | |
3054 | """Clone() -> Event""" | |
3055 | return _core.Event_Clone(*args, **kwargs) | |
3056 | ||
d14a1e28 RD |
3057 | |
3058 | class EventPtr(Event): | |
3059 | def __init__(self, this): | |
3060 | self.this = this | |
3061 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3062 | self.__class__ = Event | |
3063 | _core.Event_swigregister(EventPtr) | |
3064 | ||
3065 | #--------------------------------------------------------------------------- | |
3066 | ||
3067 | class PropagationDisabler(object): | |
e811c8ce RD |
3068 | def __repr__(self): |
3069 | return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3070 | def __init__(self, *args, **kwargs): |
e811c8ce | 3071 | """__init__(Event event) -> PropagationDisabler""" |
d14a1e28 RD |
3072 | newobj = _core.new_PropagationDisabler(*args, **kwargs) |
3073 | self.this = newobj.this | |
3074 | self.thisown = 1 | |
3075 | del newobj.thisown | |
3076 | def __del__(self, destroy=_core.delete_PropagationDisabler): | |
e811c8ce | 3077 | """__del__()""" |
d14a1e28 RD |
3078 | try: |
3079 | if self.thisown: destroy(self) | |
3080 | except: pass | |
e811c8ce | 3081 | |
d14a1e28 RD |
3082 | |
3083 | class PropagationDisablerPtr(PropagationDisabler): | |
3084 | def __init__(self, this): | |
3085 | self.this = this | |
3086 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3087 | self.__class__ = PropagationDisabler | |
3088 | _core.PropagationDisabler_swigregister(PropagationDisablerPtr) | |
3089 | ||
3090 | class PropagateOnce(object): | |
e811c8ce RD |
3091 | def __repr__(self): |
3092 | return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3093 | def __init__(self, *args, **kwargs): |
e811c8ce | 3094 | """__init__(Event event) -> PropagateOnce""" |
d14a1e28 RD |
3095 | newobj = _core.new_PropagateOnce(*args, **kwargs) |
3096 | self.this = newobj.this | |
3097 | self.thisown = 1 | |
3098 | del newobj.thisown | |
3099 | def __del__(self, destroy=_core.delete_PropagateOnce): | |
e811c8ce | 3100 | """__del__()""" |
d14a1e28 RD |
3101 | try: |
3102 | if self.thisown: destroy(self) | |
3103 | except: pass | |
e811c8ce | 3104 | |
d14a1e28 RD |
3105 | |
3106 | class PropagateOncePtr(PropagateOnce): | |
3107 | def __init__(self, this): | |
3108 | self.this = this | |
3109 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3110 | self.__class__ = PropagateOnce | |
3111 | _core.PropagateOnce_swigregister(PropagateOncePtr) | |
3112 | ||
3113 | #--------------------------------------------------------------------------- | |
3114 | ||
3115 | class CommandEvent(Event): | |
e811c8ce RD |
3116 | def __repr__(self): |
3117 | return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3118 | def __init__(self, *args, **kwargs): |
e811c8ce | 3119 | """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent""" |
d14a1e28 RD |
3120 | newobj = _core.new_CommandEvent(*args, **kwargs) |
3121 | self.this = newobj.this | |
3122 | self.thisown = 1 | |
3123 | del newobj.thisown | |
e811c8ce RD |
3124 | def GetSelection(*args, **kwargs): |
3125 | """GetSelection() -> int""" | |
3126 | return _core.CommandEvent_GetSelection(*args, **kwargs) | |
3127 | ||
3128 | def SetString(*args, **kwargs): | |
3129 | """SetString(wxString s)""" | |
3130 | return _core.CommandEvent_SetString(*args, **kwargs) | |
3131 | ||
3132 | def GetString(*args, **kwargs): | |
3133 | """GetString() -> wxString""" | |
3134 | return _core.CommandEvent_GetString(*args, **kwargs) | |
3135 | ||
3136 | def IsChecked(*args, **kwargs): | |
3137 | """IsChecked() -> bool""" | |
3138 | return _core.CommandEvent_IsChecked(*args, **kwargs) | |
3139 | ||
242b7b46 | 3140 | Checked = IsChecked |
e811c8ce RD |
3141 | def IsSelection(*args, **kwargs): |
3142 | """IsSelection() -> bool""" | |
3143 | return _core.CommandEvent_IsSelection(*args, **kwargs) | |
3144 | ||
3145 | def SetExtraLong(*args, **kwargs): | |
3146 | """SetExtraLong(long extraLong)""" | |
3147 | return _core.CommandEvent_SetExtraLong(*args, **kwargs) | |
3148 | ||
3149 | def GetExtraLong(*args, **kwargs): | |
3150 | """GetExtraLong() -> long""" | |
3151 | return _core.CommandEvent_GetExtraLong(*args, **kwargs) | |
3152 | ||
3153 | def SetInt(*args, **kwargs): | |
3154 | """SetInt(int i)""" | |
3155 | return _core.CommandEvent_SetInt(*args, **kwargs) | |
3156 | ||
3157 | def GetInt(*args, **kwargs): | |
3158 | """GetInt() -> long""" | |
3159 | return _core.CommandEvent_GetInt(*args, **kwargs) | |
3160 | ||
3161 | def Clone(*args, **kwargs): | |
3162 | """Clone() -> Event""" | |
3163 | return _core.CommandEvent_Clone(*args, **kwargs) | |
3164 | ||
d14a1e28 RD |
3165 | |
3166 | class CommandEventPtr(CommandEvent): | |
3167 | def __init__(self, this): | |
3168 | self.this = this | |
3169 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3170 | self.__class__ = CommandEvent | |
3171 | _core.CommandEvent_swigregister(CommandEventPtr) | |
3172 | ||
3173 | #--------------------------------------------------------------------------- | |
3174 | ||
3175 | class NotifyEvent(CommandEvent): | |
e811c8ce RD |
3176 | def __repr__(self): |
3177 | return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3178 | def __init__(self, *args, **kwargs): |
e811c8ce | 3179 | """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent""" |
d14a1e28 RD |
3180 | newobj = _core.new_NotifyEvent(*args, **kwargs) |
3181 | self.this = newobj.this | |
3182 | self.thisown = 1 | |
3183 | del newobj.thisown | |
e811c8ce RD |
3184 | def Veto(*args, **kwargs): |
3185 | """Veto()""" | |
3186 | return _core.NotifyEvent_Veto(*args, **kwargs) | |
3187 | ||
3188 | def Allow(*args, **kwargs): | |
3189 | """Allow()""" | |
3190 | return _core.NotifyEvent_Allow(*args, **kwargs) | |
3191 | ||
3192 | def IsAllowed(*args, **kwargs): | |
3193 | """IsAllowed() -> bool""" | |
3194 | return _core.NotifyEvent_IsAllowed(*args, **kwargs) | |
3195 | ||
d14a1e28 RD |
3196 | |
3197 | class NotifyEventPtr(NotifyEvent): | |
3198 | def __init__(self, this): | |
3199 | self.this = this | |
3200 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3201 | self.__class__ = NotifyEvent | |
3202 | _core.NotifyEvent_swigregister(NotifyEventPtr) | |
3203 | ||
3204 | #--------------------------------------------------------------------------- | |
3205 | ||
3206 | class ScrollEvent(CommandEvent): | |
e811c8ce RD |
3207 | def __repr__(self): |
3208 | return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3209 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
3210 | """ |
3211 | __init__(wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0, | |
3212 | int orient=0) -> ScrollEvent | |
3213 | """ | |
d14a1e28 RD |
3214 | newobj = _core.new_ScrollEvent(*args, **kwargs) |
3215 | self.this = newobj.this | |
3216 | self.thisown = 1 | |
3217 | del newobj.thisown | |
e811c8ce RD |
3218 | def GetOrientation(*args, **kwargs): |
3219 | """GetOrientation() -> int""" | |
3220 | return _core.ScrollEvent_GetOrientation(*args, **kwargs) | |
3221 | ||
3222 | def GetPosition(*args, **kwargs): | |
3223 | """GetPosition() -> int""" | |
3224 | return _core.ScrollEvent_GetPosition(*args, **kwargs) | |
3225 | ||
3226 | def SetOrientation(*args, **kwargs): | |
3227 | """SetOrientation(int orient)""" | |
3228 | return _core.ScrollEvent_SetOrientation(*args, **kwargs) | |
3229 | ||
3230 | def SetPosition(*args, **kwargs): | |
3231 | """SetPosition(int pos)""" | |
3232 | return _core.ScrollEvent_SetPosition(*args, **kwargs) | |
3233 | ||
d14a1e28 RD |
3234 | |
3235 | class ScrollEventPtr(ScrollEvent): | |
3236 | def __init__(self, this): | |
3237 | self.this = this | |
3238 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3239 | self.__class__ = ScrollEvent | |
3240 | _core.ScrollEvent_swigregister(ScrollEventPtr) | |
3241 | ||
3242 | #--------------------------------------------------------------------------- | |
3243 | ||
3244 | class ScrollWinEvent(Event): | |
e811c8ce RD |
3245 | def __repr__(self): |
3246 | return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3247 | def __init__(self, *args, **kwargs): |
e811c8ce | 3248 | """__init__(wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent""" |
d14a1e28 RD |
3249 | newobj = _core.new_ScrollWinEvent(*args, **kwargs) |
3250 | self.this = newobj.this | |
3251 | self.thisown = 1 | |
3252 | del newobj.thisown | |
e811c8ce RD |
3253 | def GetOrientation(*args, **kwargs): |
3254 | """GetOrientation() -> int""" | |
3255 | return _core.ScrollWinEvent_GetOrientation(*args, **kwargs) | |
3256 | ||
3257 | def GetPosition(*args, **kwargs): | |
3258 | """GetPosition() -> int""" | |
3259 | return _core.ScrollWinEvent_GetPosition(*args, **kwargs) | |
3260 | ||
3261 | def SetOrientation(*args, **kwargs): | |
3262 | """SetOrientation(int orient)""" | |
3263 | return _core.ScrollWinEvent_SetOrientation(*args, **kwargs) | |
3264 | ||
3265 | def SetPosition(*args, **kwargs): | |
3266 | """SetPosition(int pos)""" | |
3267 | return _core.ScrollWinEvent_SetPosition(*args, **kwargs) | |
3268 | ||
d14a1e28 RD |
3269 | |
3270 | class ScrollWinEventPtr(ScrollWinEvent): | |
3271 | def __init__(self, this): | |
3272 | self.this = this | |
3273 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3274 | self.__class__ = ScrollWinEvent | |
3275 | _core.ScrollWinEvent_swigregister(ScrollWinEventPtr) | |
3276 | ||
3277 | #--------------------------------------------------------------------------- | |
3278 | ||
3279 | MOUSE_BTN_ANY = _core.MOUSE_BTN_ANY | |
3280 | MOUSE_BTN_NONE = _core.MOUSE_BTN_NONE | |
3281 | MOUSE_BTN_LEFT = _core.MOUSE_BTN_LEFT | |
3282 | MOUSE_BTN_MIDDLE = _core.MOUSE_BTN_MIDDLE | |
3283 | MOUSE_BTN_RIGHT = _core.MOUSE_BTN_RIGHT | |
3284 | class MouseEvent(Event): | |
e811c8ce RD |
3285 | def __repr__(self): |
3286 | return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3287 | def __init__(self, *args, **kwargs): |
e811c8ce | 3288 | """__init__(wxEventType mouseType=wxEVT_NULL) -> MouseEvent""" |
d14a1e28 RD |
3289 | newobj = _core.new_MouseEvent(*args, **kwargs) |
3290 | self.this = newobj.this | |
3291 | self.thisown = 1 | |
3292 | del newobj.thisown | |
e811c8ce RD |
3293 | def IsButton(*args, **kwargs): |
3294 | """IsButton() -> bool""" | |
3295 | return _core.MouseEvent_IsButton(*args, **kwargs) | |
3296 | ||
3297 | def ButtonDown(*args, **kwargs): | |
3298 | """ButtonDown(int but=MOUSE_BTN_ANY) -> bool""" | |
3299 | return _core.MouseEvent_ButtonDown(*args, **kwargs) | |
3300 | ||
3301 | def ButtonDClick(*args, **kwargs): | |
3302 | """ButtonDClick(int but=MOUSE_BTN_ANY) -> bool""" | |
3303 | return _core.MouseEvent_ButtonDClick(*args, **kwargs) | |
3304 | ||
3305 | def ButtonUp(*args, **kwargs): | |
3306 | """ButtonUp(int but=MOUSE_BTN_ANY) -> bool""" | |
3307 | return _core.MouseEvent_ButtonUp(*args, **kwargs) | |
3308 | ||
3309 | def Button(*args, **kwargs): | |
3310 | """Button(int but) -> bool""" | |
3311 | return _core.MouseEvent_Button(*args, **kwargs) | |
3312 | ||
3313 | def ButtonIsDown(*args, **kwargs): | |
3314 | """ButtonIsDown(int but) -> bool""" | |
3315 | return _core.MouseEvent_ButtonIsDown(*args, **kwargs) | |
3316 | ||
3317 | def GetButton(*args, **kwargs): | |
3318 | """GetButton() -> int""" | |
3319 | return _core.MouseEvent_GetButton(*args, **kwargs) | |
3320 | ||
3321 | def ControlDown(*args, **kwargs): | |
3322 | """ControlDown() -> bool""" | |
3323 | return _core.MouseEvent_ControlDown(*args, **kwargs) | |
3324 | ||
3325 | def MetaDown(*args, **kwargs): | |
3326 | """MetaDown() -> bool""" | |
3327 | return _core.MouseEvent_MetaDown(*args, **kwargs) | |
3328 | ||
3329 | def AltDown(*args, **kwargs): | |
3330 | """AltDown() -> bool""" | |
3331 | return _core.MouseEvent_AltDown(*args, **kwargs) | |
3332 | ||
3333 | def ShiftDown(*args, **kwargs): | |
3334 | """ShiftDown() -> bool""" | |
3335 | return _core.MouseEvent_ShiftDown(*args, **kwargs) | |
3336 | ||
3337 | def LeftDown(*args, **kwargs): | |
3338 | """LeftDown() -> bool""" | |
3339 | return _core.MouseEvent_LeftDown(*args, **kwargs) | |
3340 | ||
3341 | def MiddleDown(*args, **kwargs): | |
3342 | """MiddleDown() -> bool""" | |
3343 | return _core.MouseEvent_MiddleDown(*args, **kwargs) | |
3344 | ||
3345 | def RightDown(*args, **kwargs): | |
3346 | """RightDown() -> bool""" | |
3347 | return _core.MouseEvent_RightDown(*args, **kwargs) | |
3348 | ||
3349 | def LeftUp(*args, **kwargs): | |
3350 | """LeftUp() -> bool""" | |
3351 | return _core.MouseEvent_LeftUp(*args, **kwargs) | |
3352 | ||
3353 | def MiddleUp(*args, **kwargs): | |
3354 | """MiddleUp() -> bool""" | |
3355 | return _core.MouseEvent_MiddleUp(*args, **kwargs) | |
3356 | ||
3357 | def RightUp(*args, **kwargs): | |
3358 | """RightUp() -> bool""" | |
3359 | return _core.MouseEvent_RightUp(*args, **kwargs) | |
3360 | ||
3361 | def LeftDClick(*args, **kwargs): | |
3362 | """LeftDClick() -> bool""" | |
3363 | return _core.MouseEvent_LeftDClick(*args, **kwargs) | |
3364 | ||
3365 | def MiddleDClick(*args, **kwargs): | |
3366 | """MiddleDClick() -> bool""" | |
3367 | return _core.MouseEvent_MiddleDClick(*args, **kwargs) | |
3368 | ||
3369 | def RightDClick(*args, **kwargs): | |
3370 | """RightDClick() -> bool""" | |
3371 | return _core.MouseEvent_RightDClick(*args, **kwargs) | |
3372 | ||
3373 | def LeftIsDown(*args, **kwargs): | |
3374 | """LeftIsDown() -> bool""" | |
3375 | return _core.MouseEvent_LeftIsDown(*args, **kwargs) | |
3376 | ||
3377 | def MiddleIsDown(*args, **kwargs): | |
3378 | """MiddleIsDown() -> bool""" | |
3379 | return _core.MouseEvent_MiddleIsDown(*args, **kwargs) | |
3380 | ||
3381 | def RightIsDown(*args, **kwargs): | |
3382 | """RightIsDown() -> bool""" | |
3383 | return _core.MouseEvent_RightIsDown(*args, **kwargs) | |
3384 | ||
3385 | def Dragging(*args, **kwargs): | |
3386 | """Dragging() -> bool""" | |
3387 | return _core.MouseEvent_Dragging(*args, **kwargs) | |
3388 | ||
3389 | def Moving(*args, **kwargs): | |
3390 | """Moving() -> bool""" | |
3391 | return _core.MouseEvent_Moving(*args, **kwargs) | |
3392 | ||
3393 | def Entering(*args, **kwargs): | |
3394 | """Entering() -> bool""" | |
3395 | return _core.MouseEvent_Entering(*args, **kwargs) | |
3396 | ||
3397 | def Leaving(*args, **kwargs): | |
3398 | """Leaving() -> bool""" | |
3399 | return _core.MouseEvent_Leaving(*args, **kwargs) | |
3400 | ||
3401 | def GetPosition(*args, **kwargs): | |
0df68c9f RD |
3402 | """ |
3403 | GetPosition() -> Point | |
e811c8ce | 3404 | |
0df68c9f RD |
3405 | Returns the position of the mouse in window coordinates when the event happened. |
3406 | """ | |
e811c8ce RD |
3407 | return _core.MouseEvent_GetPosition(*args, **kwargs) |
3408 | ||
3409 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3410 | """ |
3411 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3412 | |
0df68c9f RD |
3413 | Returns the position of the mouse in window coordinates when the event happened. |
3414 | """ | |
e811c8ce RD |
3415 | return _core.MouseEvent_GetPositionTuple(*args, **kwargs) |
3416 | ||
3417 | def GetLogicalPosition(*args, **kwargs): | |
3418 | """GetLogicalPosition(wxDC dc) -> Point""" | |
3419 | return _core.MouseEvent_GetLogicalPosition(*args, **kwargs) | |
3420 | ||
3421 | def GetX(*args, **kwargs): | |
3422 | """GetX() -> int""" | |
3423 | return _core.MouseEvent_GetX(*args, **kwargs) | |
3424 | ||
3425 | def GetY(*args, **kwargs): | |
3426 | """GetY() -> int""" | |
3427 | return _core.MouseEvent_GetY(*args, **kwargs) | |
3428 | ||
3429 | def GetWheelRotation(*args, **kwargs): | |
3430 | """GetWheelRotation() -> int""" | |
3431 | return _core.MouseEvent_GetWheelRotation(*args, **kwargs) | |
3432 | ||
3433 | def GetWheelDelta(*args, **kwargs): | |
3434 | """GetWheelDelta() -> int""" | |
3435 | return _core.MouseEvent_GetWheelDelta(*args, **kwargs) | |
3436 | ||
3437 | def GetLinesPerAction(*args, **kwargs): | |
3438 | """GetLinesPerAction() -> int""" | |
3439 | return _core.MouseEvent_GetLinesPerAction(*args, **kwargs) | |
3440 | ||
3441 | def IsPageScroll(*args, **kwargs): | |
3442 | """IsPageScroll() -> bool""" | |
3443 | return _core.MouseEvent_IsPageScroll(*args, **kwargs) | |
3444 | ||
d14a1e28 RD |
3445 | m_x = property(_core.MouseEvent_m_x_get, _core.MouseEvent_m_x_set) |
3446 | m_y = property(_core.MouseEvent_m_y_get, _core.MouseEvent_m_y_set) | |
3447 | m_leftDown = property(_core.MouseEvent_m_leftDown_get, _core.MouseEvent_m_leftDown_set) | |
3448 | m_middleDown = property(_core.MouseEvent_m_middleDown_get, _core.MouseEvent_m_middleDown_set) | |
3449 | m_rightDown = property(_core.MouseEvent_m_rightDown_get, _core.MouseEvent_m_rightDown_set) | |
3450 | m_controlDown = property(_core.MouseEvent_m_controlDown_get, _core.MouseEvent_m_controlDown_set) | |
3451 | m_shiftDown = property(_core.MouseEvent_m_shiftDown_get, _core.MouseEvent_m_shiftDown_set) | |
3452 | m_altDown = property(_core.MouseEvent_m_altDown_get, _core.MouseEvent_m_altDown_set) | |
3453 | m_metaDown = property(_core.MouseEvent_m_metaDown_get, _core.MouseEvent_m_metaDown_set) | |
3454 | m_wheelRotation = property(_core.MouseEvent_m_wheelRotation_get, _core.MouseEvent_m_wheelRotation_set) | |
3455 | m_wheelDelta = property(_core.MouseEvent_m_wheelDelta_get, _core.MouseEvent_m_wheelDelta_set) | |
3456 | m_linesPerAction = property(_core.MouseEvent_m_linesPerAction_get, _core.MouseEvent_m_linesPerAction_set) | |
d14a1e28 RD |
3457 | |
3458 | class MouseEventPtr(MouseEvent): | |
3459 | def __init__(self, this): | |
3460 | self.this = this | |
3461 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3462 | self.__class__ = MouseEvent | |
3463 | _core.MouseEvent_swigregister(MouseEventPtr) | |
3464 | ||
3465 | #--------------------------------------------------------------------------- | |
3466 | ||
3467 | class SetCursorEvent(Event): | |
e811c8ce RD |
3468 | def __repr__(self): |
3469 | return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3470 | def __init__(self, *args, **kwargs): |
e811c8ce | 3471 | """__init__(int x=0, int y=0) -> SetCursorEvent""" |
d14a1e28 RD |
3472 | newobj = _core.new_SetCursorEvent(*args, **kwargs) |
3473 | self.this = newobj.this | |
3474 | self.thisown = 1 | |
3475 | del newobj.thisown | |
e811c8ce RD |
3476 | def GetX(*args, **kwargs): |
3477 | """GetX() -> int""" | |
3478 | return _core.SetCursorEvent_GetX(*args, **kwargs) | |
3479 | ||
3480 | def GetY(*args, **kwargs): | |
3481 | """GetY() -> int""" | |
3482 | return _core.SetCursorEvent_GetY(*args, **kwargs) | |
3483 | ||
3484 | def SetCursor(*args, **kwargs): | |
3485 | """SetCursor(wxCursor cursor)""" | |
3486 | return _core.SetCursorEvent_SetCursor(*args, **kwargs) | |
3487 | ||
3488 | def GetCursor(*args, **kwargs): | |
3489 | """GetCursor() -> wxCursor""" | |
3490 | return _core.SetCursorEvent_GetCursor(*args, **kwargs) | |
3491 | ||
3492 | def HasCursor(*args, **kwargs): | |
3493 | """HasCursor() -> bool""" | |
3494 | return _core.SetCursorEvent_HasCursor(*args, **kwargs) | |
3495 | ||
d14a1e28 RD |
3496 | |
3497 | class SetCursorEventPtr(SetCursorEvent): | |
3498 | def __init__(self, this): | |
3499 | self.this = this | |
3500 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3501 | self.__class__ = SetCursorEvent | |
3502 | _core.SetCursorEvent_swigregister(SetCursorEventPtr) | |
3503 | ||
3504 | #--------------------------------------------------------------------------- | |
3505 | ||
3506 | class KeyEvent(Event): | |
e811c8ce RD |
3507 | def __repr__(self): |
3508 | return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3509 | def __init__(self, *args, **kwargs): |
e811c8ce | 3510 | """__init__(wxEventType keyType=wxEVT_NULL) -> KeyEvent""" |
d14a1e28 RD |
3511 | newobj = _core.new_KeyEvent(*args, **kwargs) |
3512 | self.this = newobj.this | |
3513 | self.thisown = 1 | |
3514 | del newobj.thisown | |
e811c8ce RD |
3515 | def ControlDown(*args, **kwargs): |
3516 | """ControlDown() -> bool""" | |
3517 | return _core.KeyEvent_ControlDown(*args, **kwargs) | |
3518 | ||
3519 | def MetaDown(*args, **kwargs): | |
3520 | """MetaDown() -> bool""" | |
3521 | return _core.KeyEvent_MetaDown(*args, **kwargs) | |
3522 | ||
3523 | def AltDown(*args, **kwargs): | |
3524 | """AltDown() -> bool""" | |
3525 | return _core.KeyEvent_AltDown(*args, **kwargs) | |
3526 | ||
3527 | def ShiftDown(*args, **kwargs): | |
3528 | """ShiftDown() -> bool""" | |
3529 | return _core.KeyEvent_ShiftDown(*args, **kwargs) | |
3530 | ||
3531 | def HasModifiers(*args, **kwargs): | |
3532 | """HasModifiers() -> bool""" | |
3533 | return _core.KeyEvent_HasModifiers(*args, **kwargs) | |
3534 | ||
3535 | def GetKeyCode(*args, **kwargs): | |
3536 | """GetKeyCode() -> int""" | |
3537 | return _core.KeyEvent_GetKeyCode(*args, **kwargs) | |
3538 | ||
d14a1e28 | 3539 | KeyCode = GetKeyCode |
e811c8ce RD |
3540 | def GetUniChar(*args, **kwargs): |
3541 | """GetUniChar() -> int""" | |
3542 | return _core.KeyEvent_GetUniChar(*args, **kwargs) | |
3543 | ||
3544 | def GetRawKeyCode(*args, **kwargs): | |
3545 | """GetRawKeyCode() -> unsigned int""" | |
3546 | return _core.KeyEvent_GetRawKeyCode(*args, **kwargs) | |
3547 | ||
3548 | def GetRawKeyFlags(*args, **kwargs): | |
3549 | """GetRawKeyFlags() -> unsigned int""" | |
3550 | return _core.KeyEvent_GetRawKeyFlags(*args, **kwargs) | |
3551 | ||
3552 | def GetPosition(*args, **kwargs): | |
0df68c9f RD |
3553 | """ |
3554 | GetPosition() -> Point | |
e811c8ce | 3555 | |
0df68c9f RD |
3556 | Find the position of the event. |
3557 | """ | |
e811c8ce RD |
3558 | return _core.KeyEvent_GetPosition(*args, **kwargs) |
3559 | ||
3560 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3561 | """ |
3562 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3563 | |
0df68c9f RD |
3564 | Find the position of the event. |
3565 | """ | |
e811c8ce RD |
3566 | return _core.KeyEvent_GetPositionTuple(*args, **kwargs) |
3567 | ||
3568 | def GetX(*args, **kwargs): | |
3569 | """GetX() -> int""" | |
3570 | return _core.KeyEvent_GetX(*args, **kwargs) | |
3571 | ||
3572 | def GetY(*args, **kwargs): | |
3573 | """GetY() -> int""" | |
3574 | return _core.KeyEvent_GetY(*args, **kwargs) | |
3575 | ||
d14a1e28 RD |
3576 | m_x = property(_core.KeyEvent_m_x_get, _core.KeyEvent_m_x_set) |
3577 | m_y = property(_core.KeyEvent_m_y_get, _core.KeyEvent_m_y_set) | |
3578 | m_keyCode = property(_core.KeyEvent_m_keyCode_get, _core.KeyEvent_m_keyCode_set) | |
3579 | m_controlDown = property(_core.KeyEvent_m_controlDown_get, _core.KeyEvent_m_controlDown_set) | |
3580 | m_shiftDown = property(_core.KeyEvent_m_shiftDown_get, _core.KeyEvent_m_shiftDown_set) | |
3581 | m_altDown = property(_core.KeyEvent_m_altDown_get, _core.KeyEvent_m_altDown_set) | |
3582 | m_metaDown = property(_core.KeyEvent_m_metaDown_get, _core.KeyEvent_m_metaDown_set) | |
3583 | m_scanCode = property(_core.KeyEvent_m_scanCode_get, _core.KeyEvent_m_scanCode_set) | |
3584 | m_rawCode = property(_core.KeyEvent_m_rawCode_get, _core.KeyEvent_m_rawCode_set) | |
3585 | m_rawFlags = property(_core.KeyEvent_m_rawFlags_get, _core.KeyEvent_m_rawFlags_set) | |
d14a1e28 RD |
3586 | |
3587 | class KeyEventPtr(KeyEvent): | |
3588 | def __init__(self, this): | |
3589 | self.this = this | |
3590 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3591 | self.__class__ = KeyEvent | |
3592 | _core.KeyEvent_swigregister(KeyEventPtr) | |
3593 | ||
3594 | #--------------------------------------------------------------------------- | |
3595 | ||
3596 | class SizeEvent(Event): | |
e811c8ce RD |
3597 | def __repr__(self): |
3598 | return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3599 | def __init__(self, *args, **kwargs): |
e811c8ce | 3600 | """__init__(Size sz=DefaultSize, int winid=0) -> SizeEvent""" |
d14a1e28 RD |
3601 | newobj = _core.new_SizeEvent(*args, **kwargs) |
3602 | self.this = newobj.this | |
3603 | self.thisown = 1 | |
3604 | del newobj.thisown | |
e811c8ce RD |
3605 | def GetSize(*args, **kwargs): |
3606 | """GetSize() -> Size""" | |
3607 | return _core.SizeEvent_GetSize(*args, **kwargs) | |
3608 | ||
3609 | def GetRect(*args, **kwargs): | |
3610 | """GetRect() -> Rect""" | |
3611 | return _core.SizeEvent_GetRect(*args, **kwargs) | |
3612 | ||
3613 | def SetRect(*args, **kwargs): | |
3614 | """SetRect(Rect rect)""" | |
3615 | return _core.SizeEvent_SetRect(*args, **kwargs) | |
3616 | ||
3617 | def SetSize(*args, **kwargs): | |
3618 | """SetSize(Size size)""" | |
3619 | return _core.SizeEvent_SetSize(*args, **kwargs) | |
3620 | ||
d14a1e28 RD |
3621 | m_size = property(_core.SizeEvent_m_size_get, _core.SizeEvent_m_size_set) |
3622 | m_rect = property(_core.SizeEvent_m_rect_get, _core.SizeEvent_m_rect_set) | |
d14a1e28 RD |
3623 | |
3624 | class SizeEventPtr(SizeEvent): | |
3625 | def __init__(self, this): | |
3626 | self.this = this | |
3627 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3628 | self.__class__ = SizeEvent | |
3629 | _core.SizeEvent_swigregister(SizeEventPtr) | |
3630 | ||
3631 | #--------------------------------------------------------------------------- | |
3632 | ||
3633 | class MoveEvent(Event): | |
e811c8ce RD |
3634 | def __repr__(self): |
3635 | return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3636 | def __init__(self, *args, **kwargs): |
e811c8ce | 3637 | """__init__(Point pos=DefaultPosition, int winid=0) -> MoveEvent""" |
d14a1e28 RD |
3638 | newobj = _core.new_MoveEvent(*args, **kwargs) |
3639 | self.this = newobj.this | |
3640 | self.thisown = 1 | |
3641 | del newobj.thisown | |
e811c8ce RD |
3642 | def GetPosition(*args, **kwargs): |
3643 | """GetPosition() -> Point""" | |
3644 | return _core.MoveEvent_GetPosition(*args, **kwargs) | |
3645 | ||
3646 | def GetRect(*args, **kwargs): | |
3647 | """GetRect() -> Rect""" | |
3648 | return _core.MoveEvent_GetRect(*args, **kwargs) | |
3649 | ||
3650 | def SetRect(*args, **kwargs): | |
3651 | """SetRect(Rect rect)""" | |
3652 | return _core.MoveEvent_SetRect(*args, **kwargs) | |
3653 | ||
3654 | def SetPosition(*args, **kwargs): | |
3655 | """SetPosition(Point pos)""" | |
3656 | return _core.MoveEvent_SetPosition(*args, **kwargs) | |
3657 | ||
d14a1e28 RD |
3658 | m_pos = property(_core.MoveEvent_m_pos_get, _core.MoveEvent_m_pos_set) |
3659 | m_rect = property(_core.MoveEvent_m_rect_get, _core.MoveEvent_m_rect_set) | |
d14a1e28 RD |
3660 | |
3661 | class MoveEventPtr(MoveEvent): | |
3662 | def __init__(self, this): | |
3663 | self.this = this | |
3664 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3665 | self.__class__ = MoveEvent | |
3666 | _core.MoveEvent_swigregister(MoveEventPtr) | |
3667 | ||
3668 | #--------------------------------------------------------------------------- | |
3669 | ||
3670 | class PaintEvent(Event): | |
e811c8ce RD |
3671 | def __repr__(self): |
3672 | return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3673 | def __init__(self, *args, **kwargs): |
e811c8ce | 3674 | """__init__(int Id=0) -> PaintEvent""" |
d14a1e28 RD |
3675 | newobj = _core.new_PaintEvent(*args, **kwargs) |
3676 | self.this = newobj.this | |
3677 | self.thisown = 1 | |
3678 | del newobj.thisown | |
d14a1e28 RD |
3679 | |
3680 | class PaintEventPtr(PaintEvent): | |
3681 | def __init__(self, this): | |
3682 | self.this = this | |
3683 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3684 | self.__class__ = PaintEvent | |
3685 | _core.PaintEvent_swigregister(PaintEventPtr) | |
3686 | ||
3687 | class NcPaintEvent(Event): | |
e811c8ce RD |
3688 | def __repr__(self): |
3689 | return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3690 | def __init__(self, *args, **kwargs): |
e811c8ce | 3691 | """__init__(int winid=0) -> NcPaintEvent""" |
d14a1e28 RD |
3692 | newobj = _core.new_NcPaintEvent(*args, **kwargs) |
3693 | self.this = newobj.this | |
3694 | self.thisown = 1 | |
3695 | del newobj.thisown | |
d14a1e28 RD |
3696 | |
3697 | class NcPaintEventPtr(NcPaintEvent): | |
3698 | def __init__(self, this): | |
3699 | self.this = this | |
3700 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3701 | self.__class__ = NcPaintEvent | |
3702 | _core.NcPaintEvent_swigregister(NcPaintEventPtr) | |
3703 | ||
3704 | #--------------------------------------------------------------------------- | |
3705 | ||
3706 | class EraseEvent(Event): | |
e811c8ce RD |
3707 | def __repr__(self): |
3708 | return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3709 | def __init__(self, *args, **kwargs): |
e811c8ce | 3710 | """__init__(int Id=0, wxDC dc=(wxDC *) NULL) -> EraseEvent""" |
d14a1e28 RD |
3711 | newobj = _core.new_EraseEvent(*args, **kwargs) |
3712 | self.this = newobj.this | |
3713 | self.thisown = 1 | |
3714 | del newobj.thisown | |
e811c8ce RD |
3715 | def GetDC(*args, **kwargs): |
3716 | """GetDC() -> wxDC""" | |
3717 | return _core.EraseEvent_GetDC(*args, **kwargs) | |
3718 | ||
d14a1e28 RD |
3719 | |
3720 | class EraseEventPtr(EraseEvent): | |
3721 | def __init__(self, this): | |
3722 | self.this = this | |
3723 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3724 | self.__class__ = EraseEvent | |
3725 | _core.EraseEvent_swigregister(EraseEventPtr) | |
3726 | ||
3727 | #--------------------------------------------------------------------------- | |
3728 | ||
3729 | class FocusEvent(Event): | |
e811c8ce RD |
3730 | def __repr__(self): |
3731 | return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3732 | def __init__(self, *args, **kwargs): |
e811c8ce | 3733 | """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent""" |
d14a1e28 RD |
3734 | newobj = _core.new_FocusEvent(*args, **kwargs) |
3735 | self.this = newobj.this | |
3736 | self.thisown = 1 | |
3737 | del newobj.thisown | |
e811c8ce RD |
3738 | def GetWindow(*args, **kwargs): |
3739 | """GetWindow() -> Window""" | |
3740 | return _core.FocusEvent_GetWindow(*args, **kwargs) | |
3741 | ||
3742 | def SetWindow(*args, **kwargs): | |
3743 | """SetWindow(Window win)""" | |
3744 | return _core.FocusEvent_SetWindow(*args, **kwargs) | |
3745 | ||
d14a1e28 RD |
3746 | |
3747 | class FocusEventPtr(FocusEvent): | |
3748 | def __init__(self, this): | |
3749 | self.this = this | |
3750 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3751 | self.__class__ = FocusEvent | |
3752 | _core.FocusEvent_swigregister(FocusEventPtr) | |
3753 | ||
3754 | #--------------------------------------------------------------------------- | |
3755 | ||
3756 | class ChildFocusEvent(CommandEvent): | |
e811c8ce RD |
3757 | def __repr__(self): |
3758 | return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3759 | def __init__(self, *args, **kwargs): |
e811c8ce | 3760 | """__init__(Window win=None) -> ChildFocusEvent""" |
d14a1e28 RD |
3761 | newobj = _core.new_ChildFocusEvent(*args, **kwargs) |
3762 | self.this = newobj.this | |
3763 | self.thisown = 1 | |
3764 | del newobj.thisown | |
e811c8ce RD |
3765 | def GetWindow(*args, **kwargs): |
3766 | """GetWindow() -> Window""" | |
3767 | return _core.ChildFocusEvent_GetWindow(*args, **kwargs) | |
3768 | ||
d14a1e28 RD |
3769 | |
3770 | class ChildFocusEventPtr(ChildFocusEvent): | |
3771 | def __init__(self, this): | |
3772 | self.this = this | |
3773 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3774 | self.__class__ = ChildFocusEvent | |
3775 | _core.ChildFocusEvent_swigregister(ChildFocusEventPtr) | |
3776 | ||
3777 | #--------------------------------------------------------------------------- | |
3778 | ||
3779 | class ActivateEvent(Event): | |
e811c8ce RD |
3780 | def __repr__(self): |
3781 | return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3782 | def __init__(self, *args, **kwargs): |
e811c8ce | 3783 | """__init__(wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent""" |
d14a1e28 RD |
3784 | newobj = _core.new_ActivateEvent(*args, **kwargs) |
3785 | self.this = newobj.this | |
3786 | self.thisown = 1 | |
3787 | del newobj.thisown | |
e811c8ce RD |
3788 | def GetActive(*args, **kwargs): |
3789 | """GetActive() -> bool""" | |
3790 | return _core.ActivateEvent_GetActive(*args, **kwargs) | |
3791 | ||
d14a1e28 RD |
3792 | |
3793 | class ActivateEventPtr(ActivateEvent): | |
3794 | def __init__(self, this): | |
3795 | self.this = this | |
3796 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3797 | self.__class__ = ActivateEvent | |
3798 | _core.ActivateEvent_swigregister(ActivateEventPtr) | |
3799 | ||
3800 | #--------------------------------------------------------------------------- | |
3801 | ||
3802 | class InitDialogEvent(Event): | |
e811c8ce RD |
3803 | def __repr__(self): |
3804 | return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3805 | def __init__(self, *args, **kwargs): |
e811c8ce | 3806 | """__init__(int Id=0) -> InitDialogEvent""" |
d14a1e28 RD |
3807 | newobj = _core.new_InitDialogEvent(*args, **kwargs) |
3808 | self.this = newobj.this | |
3809 | self.thisown = 1 | |
3810 | del newobj.thisown | |
d14a1e28 RD |
3811 | |
3812 | class InitDialogEventPtr(InitDialogEvent): | |
3813 | def __init__(self, this): | |
3814 | self.this = this | |
3815 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3816 | self.__class__ = InitDialogEvent | |
3817 | _core.InitDialogEvent_swigregister(InitDialogEventPtr) | |
3818 | ||
3819 | #--------------------------------------------------------------------------- | |
3820 | ||
3821 | class MenuEvent(Event): | |
e811c8ce RD |
3822 | def __repr__(self): |
3823 | return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3824 | def __init__(self, *args, **kwargs): |
e811c8ce | 3825 | """__init__(wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent""" |
d14a1e28 RD |
3826 | newobj = _core.new_MenuEvent(*args, **kwargs) |
3827 | self.this = newobj.this | |
3828 | self.thisown = 1 | |
3829 | del newobj.thisown | |
e811c8ce RD |
3830 | def GetMenuId(*args, **kwargs): |
3831 | """GetMenuId() -> int""" | |
3832 | return _core.MenuEvent_GetMenuId(*args, **kwargs) | |
3833 | ||
3834 | def IsPopup(*args, **kwargs): | |
3835 | """IsPopup() -> bool""" | |
3836 | return _core.MenuEvent_IsPopup(*args, **kwargs) | |
3837 | ||
3838 | def GetMenu(*args, **kwargs): | |
3839 | """GetMenu() -> Menu""" | |
3840 | return _core.MenuEvent_GetMenu(*args, **kwargs) | |
3841 | ||
d14a1e28 RD |
3842 | |
3843 | class MenuEventPtr(MenuEvent): | |
3844 | def __init__(self, this): | |
3845 | self.this = this | |
3846 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3847 | self.__class__ = MenuEvent | |
3848 | _core.MenuEvent_swigregister(MenuEventPtr) | |
3849 | ||
3850 | #--------------------------------------------------------------------------- | |
3851 | ||
3852 | class CloseEvent(Event): | |
e811c8ce RD |
3853 | def __repr__(self): |
3854 | return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3855 | def __init__(self, *args, **kwargs): |
e811c8ce | 3856 | """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent""" |
d14a1e28 RD |
3857 | newobj = _core.new_CloseEvent(*args, **kwargs) |
3858 | self.this = newobj.this | |
3859 | self.thisown = 1 | |
3860 | del newobj.thisown | |
e811c8ce RD |
3861 | def SetLoggingOff(*args, **kwargs): |
3862 | """SetLoggingOff(bool logOff)""" | |
3863 | return _core.CloseEvent_SetLoggingOff(*args, **kwargs) | |
3864 | ||
3865 | def GetLoggingOff(*args, **kwargs): | |
3866 | """GetLoggingOff() -> bool""" | |
3867 | return _core.CloseEvent_GetLoggingOff(*args, **kwargs) | |
3868 | ||
3869 | def Veto(*args, **kwargs): | |
3870 | """Veto(bool veto=True)""" | |
3871 | return _core.CloseEvent_Veto(*args, **kwargs) | |
3872 | ||
3873 | def SetCanVeto(*args, **kwargs): | |
3874 | """SetCanVeto(bool canVeto)""" | |
3875 | return _core.CloseEvent_SetCanVeto(*args, **kwargs) | |
3876 | ||
3877 | def CanVeto(*args, **kwargs): | |
3878 | """CanVeto() -> bool""" | |
3879 | return _core.CloseEvent_CanVeto(*args, **kwargs) | |
3880 | ||
3881 | def GetVeto(*args, **kwargs): | |
3882 | """GetVeto() -> bool""" | |
3883 | return _core.CloseEvent_GetVeto(*args, **kwargs) | |
3884 | ||
d14a1e28 RD |
3885 | |
3886 | class CloseEventPtr(CloseEvent): | |
3887 | def __init__(self, this): | |
3888 | self.this = this | |
3889 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3890 | self.__class__ = CloseEvent | |
3891 | _core.CloseEvent_swigregister(CloseEventPtr) | |
3892 | ||
3893 | #--------------------------------------------------------------------------- | |
3894 | ||
3895 | class ShowEvent(Event): | |
e811c8ce RD |
3896 | def __repr__(self): |
3897 | return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3898 | def __init__(self, *args, **kwargs): |
e811c8ce | 3899 | """__init__(int winid=0, bool show=False) -> ShowEvent""" |
d14a1e28 RD |
3900 | newobj = _core.new_ShowEvent(*args, **kwargs) |
3901 | self.this = newobj.this | |
3902 | self.thisown = 1 | |
3903 | del newobj.thisown | |
e811c8ce RD |
3904 | def SetShow(*args, **kwargs): |
3905 | """SetShow(bool show)""" | |
3906 | return _core.ShowEvent_SetShow(*args, **kwargs) | |
3907 | ||
3908 | def GetShow(*args, **kwargs): | |
3909 | """GetShow() -> bool""" | |
3910 | return _core.ShowEvent_GetShow(*args, **kwargs) | |
3911 | ||
d14a1e28 RD |
3912 | |
3913 | class ShowEventPtr(ShowEvent): | |
3914 | def __init__(self, this): | |
3915 | self.this = this | |
3916 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3917 | self.__class__ = ShowEvent | |
3918 | _core.ShowEvent_swigregister(ShowEventPtr) | |
3919 | ||
3920 | #--------------------------------------------------------------------------- | |
3921 | ||
3922 | class IconizeEvent(Event): | |
e811c8ce RD |
3923 | def __repr__(self): |
3924 | return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3925 | def __init__(self, *args, **kwargs): |
e811c8ce | 3926 | """__init__(int id=0, bool iconized=True) -> IconizeEvent""" |
d14a1e28 RD |
3927 | newobj = _core.new_IconizeEvent(*args, **kwargs) |
3928 | self.this = newobj.this | |
3929 | self.thisown = 1 | |
3930 | del newobj.thisown | |
e811c8ce RD |
3931 | def Iconized(*args, **kwargs): |
3932 | """Iconized() -> bool""" | |
3933 | return _core.IconizeEvent_Iconized(*args, **kwargs) | |
3934 | ||
d14a1e28 RD |
3935 | |
3936 | class IconizeEventPtr(IconizeEvent): | |
3937 | def __init__(self, this): | |
3938 | self.this = this | |
3939 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3940 | self.__class__ = IconizeEvent | |
3941 | _core.IconizeEvent_swigregister(IconizeEventPtr) | |
3942 | ||
3943 | #--------------------------------------------------------------------------- | |
3944 | ||
3945 | class MaximizeEvent(Event): | |
e811c8ce RD |
3946 | def __repr__(self): |
3947 | return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3948 | def __init__(self, *args, **kwargs): |
e811c8ce | 3949 | """__init__(int id=0) -> MaximizeEvent""" |
d14a1e28 RD |
3950 | newobj = _core.new_MaximizeEvent(*args, **kwargs) |
3951 | self.this = newobj.this | |
3952 | self.thisown = 1 | |
3953 | del newobj.thisown | |
d14a1e28 RD |
3954 | |
3955 | class MaximizeEventPtr(MaximizeEvent): | |
3956 | def __init__(self, this): | |
3957 | self.this = this | |
3958 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3959 | self.__class__ = MaximizeEvent | |
3960 | _core.MaximizeEvent_swigregister(MaximizeEventPtr) | |
3961 | ||
3962 | #--------------------------------------------------------------------------- | |
3963 | ||
3964 | class DropFilesEvent(Event): | |
d14a1e28 RD |
3965 | def __init__(self): raise RuntimeError, "No constructor defined" |
3966 | def __repr__(self): | |
3967 | return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
3968 | def GetPosition(*args, **kwargs): |
3969 | """GetPosition() -> Point""" | |
3970 | return _core.DropFilesEvent_GetPosition(*args, **kwargs) | |
3971 | ||
3972 | def GetNumberOfFiles(*args, **kwargs): | |
3973 | """GetNumberOfFiles() -> int""" | |
3974 | return _core.DropFilesEvent_GetNumberOfFiles(*args, **kwargs) | |
3975 | ||
3976 | def GetFiles(*args, **kwargs): | |
3977 | """GetFiles() -> PyObject""" | |
3978 | return _core.DropFilesEvent_GetFiles(*args, **kwargs) | |
3979 | ||
d14a1e28 RD |
3980 | |
3981 | class DropFilesEventPtr(DropFilesEvent): | |
3982 | def __init__(self, this): | |
3983 | self.this = this | |
3984 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3985 | self.__class__ = DropFilesEvent | |
3986 | _core.DropFilesEvent_swigregister(DropFilesEventPtr) | |
3987 | ||
3988 | #--------------------------------------------------------------------------- | |
3989 | ||
3990 | UPDATE_UI_PROCESS_ALL = _core.UPDATE_UI_PROCESS_ALL | |
3991 | UPDATE_UI_PROCESS_SPECIFIED = _core.UPDATE_UI_PROCESS_SPECIFIED | |
3992 | class UpdateUIEvent(CommandEvent): | |
e811c8ce RD |
3993 | def __repr__(self): |
3994 | return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3995 | def __init__(self, *args, **kwargs): |
e811c8ce | 3996 | """__init__(int commandId=0) -> UpdateUIEvent""" |
d14a1e28 RD |
3997 | newobj = _core.new_UpdateUIEvent(*args, **kwargs) |
3998 | self.this = newobj.this | |
3999 | self.thisown = 1 | |
4000 | del newobj.thisown | |
e811c8ce RD |
4001 | def GetChecked(*args, **kwargs): |
4002 | """GetChecked() -> bool""" | |
4003 | return _core.UpdateUIEvent_GetChecked(*args, **kwargs) | |
4004 | ||
4005 | def GetEnabled(*args, **kwargs): | |
4006 | """GetEnabled() -> bool""" | |
4007 | return _core.UpdateUIEvent_GetEnabled(*args, **kwargs) | |
4008 | ||
4009 | def GetText(*args, **kwargs): | |
4010 | """GetText() -> wxString""" | |
4011 | return _core.UpdateUIEvent_GetText(*args, **kwargs) | |
4012 | ||
4013 | def GetSetText(*args, **kwargs): | |
4014 | """GetSetText() -> bool""" | |
4015 | return _core.UpdateUIEvent_GetSetText(*args, **kwargs) | |
4016 | ||
4017 | def GetSetChecked(*args, **kwargs): | |
4018 | """GetSetChecked() -> bool""" | |
4019 | return _core.UpdateUIEvent_GetSetChecked(*args, **kwargs) | |
4020 | ||
4021 | def GetSetEnabled(*args, **kwargs): | |
4022 | """GetSetEnabled() -> bool""" | |
4023 | return _core.UpdateUIEvent_GetSetEnabled(*args, **kwargs) | |
4024 | ||
4025 | def Check(*args, **kwargs): | |
4026 | """Check(bool check)""" | |
4027 | return _core.UpdateUIEvent_Check(*args, **kwargs) | |
4028 | ||
4029 | def Enable(*args, **kwargs): | |
4030 | """Enable(bool enable)""" | |
4031 | return _core.UpdateUIEvent_Enable(*args, **kwargs) | |
4032 | ||
4033 | def SetText(*args, **kwargs): | |
4034 | """SetText(wxString text)""" | |
4035 | return _core.UpdateUIEvent_SetText(*args, **kwargs) | |
4036 | ||
4037 | def SetUpdateInterval(*args, **kwargs): | |
4038 | """UpdateUIEvent.SetUpdateInterval(long updateInterval)""" | |
4039 | return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) | |
4040 | ||
4041 | SetUpdateInterval = staticmethod(SetUpdateInterval) | |
4042 | def GetUpdateInterval(*args, **kwargs): | |
4043 | """UpdateUIEvent.GetUpdateInterval() -> long""" | |
4044 | return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) | |
4045 | ||
4046 | GetUpdateInterval = staticmethod(GetUpdateInterval) | |
4047 | def CanUpdate(*args, **kwargs): | |
4048 | """UpdateUIEvent.CanUpdate(Window win) -> bool""" | |
4049 | return _core.UpdateUIEvent_CanUpdate(*args, **kwargs) | |
4050 | ||
4051 | CanUpdate = staticmethod(CanUpdate) | |
4052 | def ResetUpdateTime(*args, **kwargs): | |
4053 | """UpdateUIEvent.ResetUpdateTime()""" | |
4054 | return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) | |
4055 | ||
4056 | ResetUpdateTime = staticmethod(ResetUpdateTime) | |
4057 | def SetMode(*args, **kwargs): | |
4058 | """UpdateUIEvent.SetMode(wxUpdateUIMode mode)""" | |
4059 | return _core.UpdateUIEvent_SetMode(*args, **kwargs) | |
4060 | ||
4061 | SetMode = staticmethod(SetMode) | |
4062 | def GetMode(*args, **kwargs): | |
4063 | """UpdateUIEvent.GetMode() -> wxUpdateUIMode""" | |
4064 | return _core.UpdateUIEvent_GetMode(*args, **kwargs) | |
4065 | ||
4066 | GetMode = staticmethod(GetMode) | |
d14a1e28 RD |
4067 | |
4068 | class UpdateUIEventPtr(UpdateUIEvent): | |
4069 | def __init__(self, this): | |
4070 | self.this = this | |
4071 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4072 | self.__class__ = UpdateUIEvent | |
4073 | _core.UpdateUIEvent_swigregister(UpdateUIEventPtr) | |
4074 | ||
e811c8ce RD |
4075 | def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): |
4076 | """UpdateUIEvent_SetUpdateInterval(long updateInterval)""" | |
4077 | return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) | |
d14a1e28 | 4078 | |
e811c8ce RD |
4079 | def UpdateUIEvent_GetUpdateInterval(*args, **kwargs): |
4080 | """UpdateUIEvent_GetUpdateInterval() -> long""" | |
4081 | return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) | |
d14a1e28 | 4082 | |
e811c8ce RD |
4083 | def UpdateUIEvent_CanUpdate(*args, **kwargs): |
4084 | """UpdateUIEvent_CanUpdate(Window win) -> bool""" | |
4085 | return _core.UpdateUIEvent_CanUpdate(*args, **kwargs) | |
d14a1e28 | 4086 | |
e811c8ce RD |
4087 | def UpdateUIEvent_ResetUpdateTime(*args, **kwargs): |
4088 | """UpdateUIEvent_ResetUpdateTime()""" | |
4089 | return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) | |
d14a1e28 | 4090 | |
e811c8ce RD |
4091 | def UpdateUIEvent_SetMode(*args, **kwargs): |
4092 | """UpdateUIEvent_SetMode(wxUpdateUIMode mode)""" | |
4093 | return _core.UpdateUIEvent_SetMode(*args, **kwargs) | |
d14a1e28 | 4094 | |
e811c8ce RD |
4095 | def UpdateUIEvent_GetMode(*args, **kwargs): |
4096 | """UpdateUIEvent_GetMode() -> wxUpdateUIMode""" | |
4097 | return _core.UpdateUIEvent_GetMode(*args, **kwargs) | |
d14a1e28 RD |
4098 | |
4099 | #--------------------------------------------------------------------------- | |
4100 | ||
4101 | class SysColourChangedEvent(Event): | |
e811c8ce RD |
4102 | def __repr__(self): |
4103 | return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4104 | def __init__(self, *args, **kwargs): |
e811c8ce | 4105 | """__init__() -> SysColourChangedEvent""" |
d14a1e28 RD |
4106 | newobj = _core.new_SysColourChangedEvent(*args, **kwargs) |
4107 | self.this = newobj.this | |
4108 | self.thisown = 1 | |
4109 | del newobj.thisown | |
d14a1e28 RD |
4110 | |
4111 | class SysColourChangedEventPtr(SysColourChangedEvent): | |
4112 | def __init__(self, this): | |
4113 | self.this = this | |
4114 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4115 | self.__class__ = SysColourChangedEvent | |
4116 | _core.SysColourChangedEvent_swigregister(SysColourChangedEventPtr) | |
4117 | ||
4118 | #--------------------------------------------------------------------------- | |
4119 | ||
4120 | class MouseCaptureChangedEvent(Event): | |
e811c8ce RD |
4121 | def __repr__(self): |
4122 | return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4123 | def __init__(self, *args, **kwargs): |
e811c8ce | 4124 | """__init__(int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent""" |
d14a1e28 RD |
4125 | newobj = _core.new_MouseCaptureChangedEvent(*args, **kwargs) |
4126 | self.this = newobj.this | |
4127 | self.thisown = 1 | |
4128 | del newobj.thisown | |
e811c8ce RD |
4129 | def GetCapturedWindow(*args, **kwargs): |
4130 | """GetCapturedWindow() -> Window""" | |
4131 | return _core.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs) | |
4132 | ||
d14a1e28 RD |
4133 | |
4134 | class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent): | |
4135 | def __init__(self, this): | |
4136 | self.this = this | |
4137 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4138 | self.__class__ = MouseCaptureChangedEvent | |
4139 | _core.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr) | |
4140 | ||
4141 | #--------------------------------------------------------------------------- | |
4142 | ||
4143 | class DisplayChangedEvent(Event): | |
e811c8ce RD |
4144 | def __repr__(self): |
4145 | return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4146 | def __init__(self, *args, **kwargs): |
e811c8ce | 4147 | """__init__() -> DisplayChangedEvent""" |
d14a1e28 RD |
4148 | newobj = _core.new_DisplayChangedEvent(*args, **kwargs) |
4149 | self.this = newobj.this | |
4150 | self.thisown = 1 | |
4151 | del newobj.thisown | |
d14a1e28 RD |
4152 | |
4153 | class DisplayChangedEventPtr(DisplayChangedEvent): | |
4154 | def __init__(self, this): | |
4155 | self.this = this | |
4156 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4157 | self.__class__ = DisplayChangedEvent | |
4158 | _core.DisplayChangedEvent_swigregister(DisplayChangedEventPtr) | |
4159 | ||
4160 | #--------------------------------------------------------------------------- | |
4161 | ||
4162 | class PaletteChangedEvent(Event): | |
e811c8ce RD |
4163 | def __repr__(self): |
4164 | return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4165 | def __init__(self, *args, **kwargs): |
e811c8ce | 4166 | """__init__(int id=0) -> PaletteChangedEvent""" |
d14a1e28 RD |
4167 | newobj = _core.new_PaletteChangedEvent(*args, **kwargs) |
4168 | self.this = newobj.this | |
4169 | self.thisown = 1 | |
4170 | del newobj.thisown | |
e811c8ce RD |
4171 | def SetChangedWindow(*args, **kwargs): |
4172 | """SetChangedWindow(Window win)""" | |
4173 | return _core.PaletteChangedEvent_SetChangedWindow(*args, **kwargs) | |
4174 | ||
4175 | def GetChangedWindow(*args, **kwargs): | |
4176 | """GetChangedWindow() -> Window""" | |
4177 | return _core.PaletteChangedEvent_GetChangedWindow(*args, **kwargs) | |
4178 | ||
d14a1e28 RD |
4179 | |
4180 | class PaletteChangedEventPtr(PaletteChangedEvent): | |
4181 | def __init__(self, this): | |
4182 | self.this = this | |
4183 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4184 | self.__class__ = PaletteChangedEvent | |
4185 | _core.PaletteChangedEvent_swigregister(PaletteChangedEventPtr) | |
4186 | ||
4187 | #--------------------------------------------------------------------------- | |
4188 | ||
4189 | class QueryNewPaletteEvent(Event): | |
e811c8ce RD |
4190 | def __repr__(self): |
4191 | return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4192 | def __init__(self, *args, **kwargs): |
e811c8ce | 4193 | """__init__(int winid=0) -> QueryNewPaletteEvent""" |
d14a1e28 RD |
4194 | newobj = _core.new_QueryNewPaletteEvent(*args, **kwargs) |
4195 | self.this = newobj.this | |
4196 | self.thisown = 1 | |
4197 | del newobj.thisown | |
e811c8ce RD |
4198 | def SetPaletteRealized(*args, **kwargs): |
4199 | """SetPaletteRealized(bool realized)""" | |
4200 | return _core.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs) | |
4201 | ||
4202 | def GetPaletteRealized(*args, **kwargs): | |
4203 | """GetPaletteRealized() -> bool""" | |
4204 | return _core.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs) | |
4205 | ||
d14a1e28 RD |
4206 | |
4207 | class QueryNewPaletteEventPtr(QueryNewPaletteEvent): | |
4208 | def __init__(self, this): | |
4209 | self.this = this | |
4210 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4211 | self.__class__ = QueryNewPaletteEvent | |
4212 | _core.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr) | |
4213 | ||
4214 | #--------------------------------------------------------------------------- | |
4215 | ||
4216 | class NavigationKeyEvent(Event): | |
e811c8ce RD |
4217 | def __repr__(self): |
4218 | return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4219 | def __init__(self, *args, **kwargs): |
e811c8ce | 4220 | """__init__() -> NavigationKeyEvent""" |
d14a1e28 RD |
4221 | newobj = _core.new_NavigationKeyEvent(*args, **kwargs) |
4222 | self.this = newobj.this | |
4223 | self.thisown = 1 | |
4224 | del newobj.thisown | |
e811c8ce RD |
4225 | def GetDirection(*args, **kwargs): |
4226 | """GetDirection() -> bool""" | |
4227 | return _core.NavigationKeyEvent_GetDirection(*args, **kwargs) | |
4228 | ||
4229 | def SetDirection(*args, **kwargs): | |
4230 | """SetDirection(bool bForward)""" | |
4231 | return _core.NavigationKeyEvent_SetDirection(*args, **kwargs) | |
4232 | ||
4233 | def IsWindowChange(*args, **kwargs): | |
4234 | """IsWindowChange() -> bool""" | |
4235 | return _core.NavigationKeyEvent_IsWindowChange(*args, **kwargs) | |
4236 | ||
4237 | def SetWindowChange(*args, **kwargs): | |
4238 | """SetWindowChange(bool bIs)""" | |
4239 | return _core.NavigationKeyEvent_SetWindowChange(*args, **kwargs) | |
4240 | ||
4241 | def GetCurrentFocus(*args, **kwargs): | |
4242 | """GetCurrentFocus() -> Window""" | |
4243 | return _core.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs) | |
4244 | ||
4245 | def SetCurrentFocus(*args, **kwargs): | |
4246 | """SetCurrentFocus(Window win)""" | |
4247 | return _core.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs) | |
4248 | ||
d14a1e28 RD |
4249 | |
4250 | class NavigationKeyEventPtr(NavigationKeyEvent): | |
4251 | def __init__(self, this): | |
4252 | self.this = this | |
4253 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4254 | self.__class__ = NavigationKeyEvent | |
4255 | _core.NavigationKeyEvent_swigregister(NavigationKeyEventPtr) | |
4256 | ||
4257 | #--------------------------------------------------------------------------- | |
4258 | ||
4259 | class WindowCreateEvent(CommandEvent): | |
e811c8ce RD |
4260 | def __repr__(self): |
4261 | return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4262 | def __init__(self, *args, **kwargs): |
e811c8ce | 4263 | """__init__(Window win=None) -> WindowCreateEvent""" |
d14a1e28 RD |
4264 | newobj = _core.new_WindowCreateEvent(*args, **kwargs) |
4265 | self.this = newobj.this | |
4266 | self.thisown = 1 | |
4267 | del newobj.thisown | |
e811c8ce RD |
4268 | def GetWindow(*args, **kwargs): |
4269 | """GetWindow() -> Window""" | |
4270 | return _core.WindowCreateEvent_GetWindow(*args, **kwargs) | |
4271 | ||
d14a1e28 RD |
4272 | |
4273 | class WindowCreateEventPtr(WindowCreateEvent): | |
4274 | def __init__(self, this): | |
4275 | self.this = this | |
4276 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4277 | self.__class__ = WindowCreateEvent | |
4278 | _core.WindowCreateEvent_swigregister(WindowCreateEventPtr) | |
4279 | ||
4280 | class WindowDestroyEvent(CommandEvent): | |
e811c8ce RD |
4281 | def __repr__(self): |
4282 | return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4283 | def __init__(self, *args, **kwargs): |
e811c8ce | 4284 | """__init__(Window win=None) -> WindowDestroyEvent""" |
d14a1e28 RD |
4285 | newobj = _core.new_WindowDestroyEvent(*args, **kwargs) |
4286 | self.this = newobj.this | |
4287 | self.thisown = 1 | |
4288 | del newobj.thisown | |
e811c8ce RD |
4289 | def GetWindow(*args, **kwargs): |
4290 | """GetWindow() -> Window""" | |
4291 | return _core.WindowDestroyEvent_GetWindow(*args, **kwargs) | |
4292 | ||
d14a1e28 RD |
4293 | |
4294 | class WindowDestroyEventPtr(WindowDestroyEvent): | |
4295 | def __init__(self, this): | |
4296 | self.this = this | |
4297 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4298 | self.__class__ = WindowDestroyEvent | |
4299 | _core.WindowDestroyEvent_swigregister(WindowDestroyEventPtr) | |
4300 | ||
4301 | #--------------------------------------------------------------------------- | |
4302 | ||
4303 | class ContextMenuEvent(CommandEvent): | |
e811c8ce RD |
4304 | def __repr__(self): |
4305 | return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4306 | def __init__(self, *args, **kwargs): |
e811c8ce | 4307 | """__init__(wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent""" |
d14a1e28 RD |
4308 | newobj = _core.new_ContextMenuEvent(*args, **kwargs) |
4309 | self.this = newobj.this | |
4310 | self.thisown = 1 | |
4311 | del newobj.thisown | |
e811c8ce RD |
4312 | def GetPosition(*args, **kwargs): |
4313 | """GetPosition() -> Point""" | |
4314 | return _core.ContextMenuEvent_GetPosition(*args, **kwargs) | |
4315 | ||
4316 | def SetPosition(*args, **kwargs): | |
4317 | """SetPosition(Point pos)""" | |
4318 | return _core.ContextMenuEvent_SetPosition(*args, **kwargs) | |
4319 | ||
d14a1e28 RD |
4320 | |
4321 | class ContextMenuEventPtr(ContextMenuEvent): | |
4322 | def __init__(self, this): | |
4323 | self.this = this | |
4324 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4325 | self.__class__ = ContextMenuEvent | |
4326 | _core.ContextMenuEvent_swigregister(ContextMenuEventPtr) | |
4327 | ||
4328 | #--------------------------------------------------------------------------- | |
4329 | ||
4330 | IDLE_PROCESS_ALL = _core.IDLE_PROCESS_ALL | |
4331 | IDLE_PROCESS_SPECIFIED = _core.IDLE_PROCESS_SPECIFIED | |
4332 | class IdleEvent(Event): | |
e811c8ce RD |
4333 | def __repr__(self): |
4334 | return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4335 | def __init__(self, *args, **kwargs): |
e811c8ce | 4336 | """__init__() -> IdleEvent""" |
d14a1e28 RD |
4337 | newobj = _core.new_IdleEvent(*args, **kwargs) |
4338 | self.this = newobj.this | |
4339 | self.thisown = 1 | |
4340 | del newobj.thisown | |
e811c8ce RD |
4341 | def RequestMore(*args, **kwargs): |
4342 | """RequestMore(bool needMore=True)""" | |
4343 | return _core.IdleEvent_RequestMore(*args, **kwargs) | |
4344 | ||
4345 | def MoreRequested(*args, **kwargs): | |
4346 | """MoreRequested() -> bool""" | |
4347 | return _core.IdleEvent_MoreRequested(*args, **kwargs) | |
4348 | ||
4349 | def SetMode(*args, **kwargs): | |
4350 | """IdleEvent.SetMode(wxIdleMode mode)""" | |
4351 | return _core.IdleEvent_SetMode(*args, **kwargs) | |
4352 | ||
4353 | SetMode = staticmethod(SetMode) | |
4354 | def GetMode(*args, **kwargs): | |
4355 | """IdleEvent.GetMode() -> wxIdleMode""" | |
4356 | return _core.IdleEvent_GetMode(*args, **kwargs) | |
4357 | ||
4358 | GetMode = staticmethod(GetMode) | |
4359 | def CanSend(*args, **kwargs): | |
4360 | """IdleEvent.CanSend(Window win) -> bool""" | |
4361 | return _core.IdleEvent_CanSend(*args, **kwargs) | |
4362 | ||
4363 | CanSend = staticmethod(CanSend) | |
d14a1e28 RD |
4364 | |
4365 | class IdleEventPtr(IdleEvent): | |
4366 | def __init__(self, this): | |
4367 | self.this = this | |
4368 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4369 | self.__class__ = IdleEvent | |
4370 | _core.IdleEvent_swigregister(IdleEventPtr) | |
4371 | ||
e811c8ce RD |
4372 | def IdleEvent_SetMode(*args, **kwargs): |
4373 | """IdleEvent_SetMode(wxIdleMode mode)""" | |
4374 | return _core.IdleEvent_SetMode(*args, **kwargs) | |
d14a1e28 | 4375 | |
e811c8ce RD |
4376 | def IdleEvent_GetMode(*args, **kwargs): |
4377 | """IdleEvent_GetMode() -> wxIdleMode""" | |
4378 | return _core.IdleEvent_GetMode(*args, **kwargs) | |
d14a1e28 | 4379 | |
e811c8ce RD |
4380 | def IdleEvent_CanSend(*args, **kwargs): |
4381 | """IdleEvent_CanSend(Window win) -> bool""" | |
4382 | return _core.IdleEvent_CanSend(*args, **kwargs) | |
d14a1e28 RD |
4383 | |
4384 | #--------------------------------------------------------------------------- | |
4385 | ||
4386 | class PyEvent(Event): | |
e811c8ce RD |
4387 | def __repr__(self): |
4388 | return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4389 | def __init__(self, *args, **kwargs): |
e811c8ce | 4390 | """__init__(int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent""" |
d14a1e28 RD |
4391 | newobj = _core.new_PyEvent(*args, **kwargs) |
4392 | self.this = newobj.this | |
4393 | self.thisown = 1 | |
4394 | del newobj.thisown | |
4395 | self.SetSelf(self) | |
e811c8ce | 4396 | |
d14a1e28 | 4397 | def __del__(self, destroy=_core.delete_PyEvent): |
e811c8ce | 4398 | """__del__()""" |
d14a1e28 RD |
4399 | try: |
4400 | if self.thisown: destroy(self) | |
4401 | except: pass | |
e811c8ce RD |
4402 | |
4403 | def SetSelf(*args, **kwargs): | |
4404 | """SetSelf(PyObject self)""" | |
4405 | return _core.PyEvent_SetSelf(*args, **kwargs) | |
4406 | ||
4407 | def GetSelf(*args, **kwargs): | |
4408 | """GetSelf() -> PyObject""" | |
4409 | return _core.PyEvent_GetSelf(*args, **kwargs) | |
4410 | ||
d14a1e28 RD |
4411 | |
4412 | class PyEventPtr(PyEvent): | |
4413 | def __init__(self, this): | |
4414 | self.this = this | |
4415 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4416 | self.__class__ = PyEvent | |
4417 | _core.PyEvent_swigregister(PyEventPtr) | |
4418 | ||
4419 | class PyCommandEvent(CommandEvent): | |
e811c8ce RD |
4420 | def __repr__(self): |
4421 | return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4422 | def __init__(self, *args, **kwargs): |
e811c8ce | 4423 | """__init__(wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent""" |
d14a1e28 RD |
4424 | newobj = _core.new_PyCommandEvent(*args, **kwargs) |
4425 | self.this = newobj.this | |
4426 | self.thisown = 1 | |
4427 | del newobj.thisown | |
4428 | self.SetSelf(self) | |
e811c8ce | 4429 | |
d14a1e28 | 4430 | def __del__(self, destroy=_core.delete_PyCommandEvent): |
e811c8ce | 4431 | """__del__()""" |
d14a1e28 RD |
4432 | try: |
4433 | if self.thisown: destroy(self) | |
4434 | except: pass | |
e811c8ce RD |
4435 | |
4436 | def SetSelf(*args, **kwargs): | |
4437 | """SetSelf(PyObject self)""" | |
4438 | return _core.PyCommandEvent_SetSelf(*args, **kwargs) | |
4439 | ||
4440 | def GetSelf(*args, **kwargs): | |
4441 | """GetSelf() -> PyObject""" | |
4442 | return _core.PyCommandEvent_GetSelf(*args, **kwargs) | |
4443 | ||
d14a1e28 RD |
4444 | |
4445 | class PyCommandEventPtr(PyCommandEvent): | |
4446 | def __init__(self, this): | |
4447 | self.this = this | |
4448 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4449 | self.__class__ = PyCommandEvent | |
4450 | _core.PyCommandEvent_swigregister(PyCommandEventPtr) | |
4451 | ||
4452 | #--------------------------------------------------------------------------- | |
4453 | ||
4454 | PYAPP_ASSERT_SUPPRESS = _core.PYAPP_ASSERT_SUPPRESS | |
4455 | PYAPP_ASSERT_EXCEPTION = _core.PYAPP_ASSERT_EXCEPTION | |
4456 | PYAPP_ASSERT_DIALOG = _core.PYAPP_ASSERT_DIALOG | |
4457 | PYAPP_ASSERT_LOG = _core.PYAPP_ASSERT_LOG | |
4458 | PRINT_WINDOWS = _core.PRINT_WINDOWS | |
4459 | PRINT_POSTSCRIPT = _core.PRINT_POSTSCRIPT | |
4460 | class PyApp(EvtHandler): | |
e811c8ce RD |
4461 | def __repr__(self): |
4462 | return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4463 | def __init__(self, *args, **kwargs): |
e811c8ce | 4464 | """__init__() -> PyApp""" |
d14a1e28 RD |
4465 | newobj = _core.new_PyApp(*args, **kwargs) |
4466 | self.this = newobj.this | |
4467 | self.thisown = 1 | |
4468 | del newobj.thisown | |
4469 | self._setCallbackInfo(self, PyApp) | |
4470 | self._setOORInfo(self) | |
e811c8ce | 4471 | |
d14a1e28 | 4472 | def __del__(self, destroy=_core.delete_PyApp): |
e811c8ce | 4473 | """__del__()""" |
d14a1e28 RD |
4474 | try: |
4475 | if self.thisown: destroy(self) | |
4476 | except: pass | |
e811c8ce RD |
4477 | |
4478 | def _setCallbackInfo(*args, **kwargs): | |
4479 | """_setCallbackInfo(PyObject self, PyObject _class)""" | |
4480 | return _core.PyApp__setCallbackInfo(*args, **kwargs) | |
4481 | ||
4482 | def GetAppName(*args, **kwargs): | |
0df68c9f RD |
4483 | """ |
4484 | GetAppName() -> wxString | |
6c3b4aae | 4485 | |
0df68c9f RD |
4486 | Get the application name. |
4487 | """ | |
e811c8ce RD |
4488 | return _core.PyApp_GetAppName(*args, **kwargs) |
4489 | ||
4490 | def SetAppName(*args, **kwargs): | |
0df68c9f RD |
4491 | """ |
4492 | SetAppName(wxString name) | |
6c3b4aae | 4493 | |
0df68c9f RD |
4494 | Set the application name. This value may be used automatically |
4495 | by wxConfig and such. | |
4496 | """ | |
e811c8ce RD |
4497 | return _core.PyApp_SetAppName(*args, **kwargs) |
4498 | ||
4499 | def GetClassName(*args, **kwargs): | |
0df68c9f RD |
4500 | """ |
4501 | GetClassName() -> wxString | |
e811c8ce | 4502 | |
0df68c9f RD |
4503 | Get the application's class name. |
4504 | """ | |
e811c8ce RD |
4505 | return _core.PyApp_GetClassName(*args, **kwargs) |
4506 | ||
4507 | def SetClassName(*args, **kwargs): | |
0df68c9f RD |
4508 | """ |
4509 | SetClassName(wxString name) | |
6c3b4aae | 4510 | |
0df68c9f RD |
4511 | Set the application's class name. This value may be used for X-resources if |
4512 | applicable for the platform | |
4513 | """ | |
e811c8ce RD |
4514 | return _core.PyApp_SetClassName(*args, **kwargs) |
4515 | ||
4516 | def GetVendorName(*args, **kwargs): | |
0df68c9f RD |
4517 | """ |
4518 | GetVendorName() -> wxString | |
6c3b4aae | 4519 | |
0df68c9f RD |
4520 | Get the application's vendor name. |
4521 | """ | |
e811c8ce RD |
4522 | return _core.PyApp_GetVendorName(*args, **kwargs) |
4523 | ||
4524 | def SetVendorName(*args, **kwargs): | |
0df68c9f RD |
4525 | """ |
4526 | SetVendorName(wxString name) | |
6c3b4aae | 4527 | |
0df68c9f RD |
4528 | Set the application's vendor name. This value may be used automatically |
4529 | by wxConfig and such. | |
4530 | """ | |
e811c8ce RD |
4531 | return _core.PyApp_SetVendorName(*args, **kwargs) |
4532 | ||
4533 | def GetTraits(*args, **kwargs): | |
0df68c9f RD |
4534 | """ |
4535 | GetTraits() -> wxAppTraits | |
6c3b4aae | 4536 | |
0df68c9f RD |
4537 | Create the app traits object to which we delegate for everything which either |
4538 | should be configurable by the user (then he can change the default behaviour | |
4539 | simply by overriding CreateTraits() and returning his own traits object) or | |
4540 | which is GUI/console dependent as then wxAppTraits allows us to abstract the | |
4541 | differences behind the common facade | |
4542 | """ | |
e811c8ce RD |
4543 | return _core.PyApp_GetTraits(*args, **kwargs) |
4544 | ||
4545 | def ProcessPendingEvents(*args, **kwargs): | |
0df68c9f RD |
4546 | """ |
4547 | ProcessPendingEvents() | |
6c3b4aae | 4548 | |
0df68c9f RD |
4549 | Process all events in the wxPendingEvents list -- it is necessary to call this |
4550 | function to process posted events. This happens during each event loop | |
4551 | iteration. | |
4552 | """ | |
e811c8ce RD |
4553 | return _core.PyApp_ProcessPendingEvents(*args, **kwargs) |
4554 | ||
4555 | def Yield(*args, **kwargs): | |
0df68c9f RD |
4556 | """ |
4557 | Yield(bool onlyIfNeeded=False) -> bool | |
6c3b4aae | 4558 | |
0df68c9f RD |
4559 | Process all currently pending events right now, instead of waiting until |
4560 | return to the event loop. It is an error to call Yield() recursively unless | |
4561 | the value of onlyIfNeeded is True. | |
6c3b4aae | 4562 | |
0df68c9f RD |
4563 | WARNING: This function is dangerous as it can lead to unexpected |
4564 | reentrancies (i.e. when called from an event handler it | |
4565 | may result in calling the same event handler again), use | |
4566 | with _extreme_ care or, better, don't use at all! | |
4567 | ||
4568 | """ | |
e811c8ce RD |
4569 | return _core.PyApp_Yield(*args, **kwargs) |
4570 | ||
4571 | def WakeUpIdle(*args, **kwargs): | |
0df68c9f RD |
4572 | """ |
4573 | WakeUpIdle() | |
6c3b4aae | 4574 | |
0df68c9f RD |
4575 | Make sure that idle events are sent again |
4576 | """ | |
e811c8ce RD |
4577 | return _core.PyApp_WakeUpIdle(*args, **kwargs) |
4578 | ||
4579 | def MainLoop(*args, **kwargs): | |
0df68c9f RD |
4580 | """ |
4581 | MainLoop() -> int | |
6c3b4aae | 4582 | |
0df68c9f RD |
4583 | Execute the main GUI loop, the function returns when the loop ends. |
4584 | """ | |
e811c8ce RD |
4585 | return _core.PyApp_MainLoop(*args, **kwargs) |
4586 | ||
4587 | def Exit(*args, **kwargs): | |
0df68c9f RD |
4588 | """ |
4589 | Exit() | |
6c3b4aae | 4590 | |
0df68c9f RD |
4591 | Exit the main loop thus terminating the application. |
4592 | """ | |
e811c8ce RD |
4593 | return _core.PyApp_Exit(*args, **kwargs) |
4594 | ||
4595 | def ExitMainLoop(*args, **kwargs): | |
0df68c9f RD |
4596 | """ |
4597 | ExitMainLoop() | |
6c3b4aae | 4598 | |
0df68c9f RD |
4599 | Exit the main GUI loop during the next iteration (i.e. it does not |
4600 | stop the program immediately!) | |
4601 | """ | |
e811c8ce RD |
4602 | return _core.PyApp_ExitMainLoop(*args, **kwargs) |
4603 | ||
4604 | def Pending(*args, **kwargs): | |
0df68c9f RD |
4605 | """ |
4606 | Pending() -> bool | |
6c3b4aae | 4607 | |
0df68c9f RD |
4608 | Returns True if there are unprocessed events in the event queue. |
4609 | """ | |
e811c8ce RD |
4610 | return _core.PyApp_Pending(*args, **kwargs) |
4611 | ||
4612 | def Dispatch(*args, **kwargs): | |
0df68c9f RD |
4613 | """ |
4614 | Dispatch() -> bool | |
6c3b4aae | 4615 | |
0df68c9f RD |
4616 | Process the first event in the event queue (blocks until an event |
4617 | appears if there are none currently) | |
4618 | """ | |
e811c8ce RD |
4619 | return _core.PyApp_Dispatch(*args, **kwargs) |
4620 | ||
4621 | def ProcessIdle(*args, **kwargs): | |
0df68c9f RD |
4622 | """ |
4623 | ProcessIdle() -> bool | |
6c3b4aae | 4624 | |
0df68c9f RD |
4625 | Called from the MainLoop when the application becomes idle and sends an |
4626 | IdleEvent to all interested parties. Returns True is more idle events are | |
4627 | needed, False if not. | |
4628 | """ | |
e811c8ce RD |
4629 | return _core.PyApp_ProcessIdle(*args, **kwargs) |
4630 | ||
4631 | def SendIdleEvents(*args, **kwargs): | |
0df68c9f RD |
4632 | """ |
4633 | SendIdleEvents(Window win, IdleEvent event) -> bool | |
e811c8ce | 4634 | |
0df68c9f RD |
4635 | Send idle event to window and all subwindows. Returns True if more idle time |
4636 | is requested. | |
4637 | """ | |
6c3b4aae | 4638 | return _core.PyApp_SendIdleEvents(*args, **kwargs) |
e811c8ce RD |
4639 | |
4640 | def IsActive(*args, **kwargs): | |
0df68c9f RD |
4641 | """ |
4642 | IsActive() -> bool | |
6c3b4aae | 4643 | |
0df68c9f RD |
4644 | Return True if our app has focus. |
4645 | """ | |
e811c8ce RD |
4646 | return _core.PyApp_IsActive(*args, **kwargs) |
4647 | ||
4648 | def SetTopWindow(*args, **kwargs): | |
0df68c9f RD |
4649 | """ |
4650 | SetTopWindow(Window win) | |
6c3b4aae | 4651 | |
0df68c9f RD |
4652 | Set the "main" top level window |
4653 | """ | |
e811c8ce RD |
4654 | return _core.PyApp_SetTopWindow(*args, **kwargs) |
4655 | ||
4656 | def GetTopWindow(*args, **kwargs): | |
0df68c9f RD |
4657 | """ |
4658 | GetTopWindow() -> Window | |
6c3b4aae | 4659 | |
0df68c9f RD |
4660 | Return the "main" top level window (if it hadn't been set previously with |
4661 | SetTopWindow(), will return just some top level window and, if there not any, | |
4662 | will return None) | |
4663 | """ | |
e811c8ce RD |
4664 | return _core.PyApp_GetTopWindow(*args, **kwargs) |
4665 | ||
4666 | def SetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f RD |
4667 | """ |
4668 | SetExitOnFrameDelete(bool flag) | |
4669 | ||
4670 | Control the exit behaviour: by default, the program will exit the main loop | |
4671 | (and so, usually, terminate) when the last top-level program window is | |
4672 | deleted. Beware that if you disable this behaviour (with | |
4673 | SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly | |
4674 | from somewhere. | |
4675 | ||
4676 | """ | |
e811c8ce RD |
4677 | return _core.PyApp_SetExitOnFrameDelete(*args, **kwargs) |
4678 | ||
4679 | def GetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f RD |
4680 | """ |
4681 | GetExitOnFrameDelete() -> bool | |
6c3b4aae | 4682 | |
0df68c9f RD |
4683 | Get the current exit behaviour setting. |
4684 | """ | |
e811c8ce RD |
4685 | return _core.PyApp_GetExitOnFrameDelete(*args, **kwargs) |
4686 | ||
4687 | def SetUseBestVisual(*args, **kwargs): | |
0df68c9f RD |
4688 | """ |
4689 | SetUseBestVisual(bool flag) | |
6c3b4aae | 4690 | |
0df68c9f RD |
4691 | Set whether the app should try to use the best available visual on systems |
4692 | where more than one is available, (Sun, SGI, XFree86 4, etc.) | |
4693 | """ | |
e811c8ce RD |
4694 | return _core.PyApp_SetUseBestVisual(*args, **kwargs) |
4695 | ||
4696 | def GetUseBestVisual(*args, **kwargs): | |
0df68c9f RD |
4697 | """ |
4698 | GetUseBestVisual() -> bool | |
6c3b4aae | 4699 | |
0df68c9f RD |
4700 | Get current UseBestVisual setting. |
4701 | """ | |
e811c8ce RD |
4702 | return _core.PyApp_GetUseBestVisual(*args, **kwargs) |
4703 | ||
4704 | def SetPrintMode(*args, **kwargs): | |
4705 | """SetPrintMode(int mode)""" | |
4706 | return _core.PyApp_SetPrintMode(*args, **kwargs) | |
4707 | ||
4708 | def GetPrintMode(*args, **kwargs): | |
4709 | """GetPrintMode() -> int""" | |
4710 | return _core.PyApp_GetPrintMode(*args, **kwargs) | |
4711 | ||
e811c8ce | 4712 | def SetAssertMode(*args, **kwargs): |
0df68c9f RD |
4713 | """ |
4714 | SetAssertMode(int mode) | |
6c3b4aae | 4715 | |
0df68c9f RD |
4716 | Set the OnAssert behaviour for debug and hybrid builds. The following flags |
4717 | may be or'd together: | |
6c3b4aae | 4718 | |
0df68c9f RD |
4719 | wxPYAPP_ASSERT_SUPPRESS Don't do anything |
4720 | wxPYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default) | |
4721 | wxPYAPP_ASSERT_DIALOG Display a message dialog | |
4722 | wxPYAPP_ASSERT_LOG Write the assertion info to the wxLog | |
4723 | ||
4724 | """ | |
e811c8ce RD |
4725 | return _core.PyApp_SetAssertMode(*args, **kwargs) |
4726 | ||
6c3b4aae | 4727 | def GetAssertMode(*args, **kwargs): |
0df68c9f RD |
4728 | """ |
4729 | GetAssertMode() -> int | |
6c3b4aae | 4730 | |
0df68c9f RD |
4731 | Get the current OnAssert behaviour setting. |
4732 | """ | |
6c3b4aae RD |
4733 | return _core.PyApp_GetAssertMode(*args, **kwargs) |
4734 | ||
e811c8ce RD |
4735 | def GetMacSupportPCMenuShortcuts(*args, **kwargs): |
4736 | """PyApp.GetMacSupportPCMenuShortcuts() -> bool""" | |
4737 | return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) | |
4738 | ||
4739 | GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) | |
4740 | def GetMacAboutMenuItemId(*args, **kwargs): | |
4741 | """PyApp.GetMacAboutMenuItemId() -> long""" | |
4742 | return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs) | |
4743 | ||
4744 | GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) | |
4745 | def GetMacPreferencesMenuItemId(*args, **kwargs): | |
4746 | """PyApp.GetMacPreferencesMenuItemId() -> long""" | |
4747 | return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) | |
4748 | ||
4749 | GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) | |
4750 | def GetMacExitMenuItemId(*args, **kwargs): | |
4751 | """PyApp.GetMacExitMenuItemId() -> long""" | |
4752 | return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs) | |
4753 | ||
4754 | GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) | |
4755 | def GetMacHelpMenuTitleName(*args, **kwargs): | |
4756 | """PyApp.GetMacHelpMenuTitleName() -> wxString""" | |
4757 | return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) | |
4758 | ||
4759 | GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) | |
4760 | def SetMacSupportPCMenuShortcuts(*args, **kwargs): | |
4761 | """PyApp.SetMacSupportPCMenuShortcuts(bool val)""" | |
4762 | return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) | |
4763 | ||
4764 | SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) | |
4765 | def SetMacAboutMenuItemId(*args, **kwargs): | |
4766 | """PyApp.SetMacAboutMenuItemId(long val)""" | |
4767 | return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs) | |
4768 | ||
4769 | SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) | |
4770 | def SetMacPreferencesMenuItemId(*args, **kwargs): | |
4771 | """PyApp.SetMacPreferencesMenuItemId(long val)""" | |
4772 | return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) | |
4773 | ||
4774 | SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) | |
4775 | def SetMacExitMenuItemId(*args, **kwargs): | |
4776 | """PyApp.SetMacExitMenuItemId(long val)""" | |
4777 | return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs) | |
4778 | ||
4779 | SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) | |
4780 | def SetMacHelpMenuTitleName(*args, **kwargs): | |
4781 | """PyApp.SetMacHelpMenuTitleName(wxString val)""" | |
4782 | return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) | |
4783 | ||
4784 | SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) | |
4785 | def _BootstrapApp(*args, **kwargs): | |
0df68c9f RD |
4786 | """ |
4787 | _BootstrapApp() | |
6c3b4aae | 4788 | |
0df68c9f RD |
4789 | For internal use only |
4790 | """ | |
e811c8ce RD |
4791 | return _core.PyApp__BootstrapApp(*args, **kwargs) |
4792 | ||
4793 | def GetComCtl32Version(*args, **kwargs): | |
0df68c9f RD |
4794 | """ |
4795 | PyApp.GetComCtl32Version() -> int | |
6c3b4aae | 4796 | |
0df68c9f RD |
4797 | Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it |
4798 | wasn't found at all. Raises an exception on non-Windows platforms. | |
4799 | """ | |
e811c8ce RD |
4800 | return _core.PyApp_GetComCtl32Version(*args, **kwargs) |
4801 | ||
4802 | GetComCtl32Version = staticmethod(GetComCtl32Version) | |
d14a1e28 RD |
4803 | |
4804 | class PyAppPtr(PyApp): | |
4805 | def __init__(self, this): | |
4806 | self.this = this | |
4807 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4808 | self.__class__ = PyApp | |
4809 | _core.PyApp_swigregister(PyAppPtr) | |
4810 | ||
e811c8ce RD |
4811 | def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs): |
4812 | """PyApp_GetMacSupportPCMenuShortcuts() -> bool""" | |
4813 | return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) | |
d14a1e28 | 4814 | |
e811c8ce RD |
4815 | def PyApp_GetMacAboutMenuItemId(*args, **kwargs): |
4816 | """PyApp_GetMacAboutMenuItemId() -> long""" | |
4817 | return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs) | |
d14a1e28 | 4818 | |
e811c8ce RD |
4819 | def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs): |
4820 | """PyApp_GetMacPreferencesMenuItemId() -> long""" | |
4821 | return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) | |
d14a1e28 | 4822 | |
e811c8ce RD |
4823 | def PyApp_GetMacExitMenuItemId(*args, **kwargs): |
4824 | """PyApp_GetMacExitMenuItemId() -> long""" | |
4825 | return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs) | |
d14a1e28 | 4826 | |
e811c8ce RD |
4827 | def PyApp_GetMacHelpMenuTitleName(*args, **kwargs): |
4828 | """PyApp_GetMacHelpMenuTitleName() -> wxString""" | |
4829 | return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) | |
d14a1e28 | 4830 | |
e811c8ce RD |
4831 | def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs): |
4832 | """PyApp_SetMacSupportPCMenuShortcuts(bool val)""" | |
4833 | return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) | |
d14a1e28 | 4834 | |
e811c8ce RD |
4835 | def PyApp_SetMacAboutMenuItemId(*args, **kwargs): |
4836 | """PyApp_SetMacAboutMenuItemId(long val)""" | |
4837 | return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs) | |
d14a1e28 | 4838 | |
e811c8ce RD |
4839 | def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs): |
4840 | """PyApp_SetMacPreferencesMenuItemId(long val)""" | |
4841 | return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) | |
d14a1e28 | 4842 | |
e811c8ce RD |
4843 | def PyApp_SetMacExitMenuItemId(*args, **kwargs): |
4844 | """PyApp_SetMacExitMenuItemId(long val)""" | |
4845 | return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs) | |
d14a1e28 | 4846 | |
e811c8ce RD |
4847 | def PyApp_SetMacHelpMenuTitleName(*args, **kwargs): |
4848 | """PyApp_SetMacHelpMenuTitleName(wxString val)""" | |
4849 | return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) | |
d14a1e28 | 4850 | |
e811c8ce | 4851 | def PyApp_GetComCtl32Version(*args, **kwargs): |
0df68c9f RD |
4852 | """ |
4853 | PyApp_GetComCtl32Version() -> int | |
6c3b4aae | 4854 | |
0df68c9f RD |
4855 | Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it |
4856 | wasn't found at all. Raises an exception on non-Windows platforms. | |
4857 | """ | |
e811c8ce | 4858 | return _core.PyApp_GetComCtl32Version(*args, **kwargs) |
d14a1e28 RD |
4859 | |
4860 | #--------------------------------------------------------------------------- | |
4861 | ||
4862 | ||
e811c8ce | 4863 | def Exit(*args, **kwargs): |
0df68c9f RD |
4864 | """ |
4865 | Exit() | |
6c3b4aae | 4866 | |
0df68c9f RD |
4867 | Force an exit of the application. Convenience for wx.GetApp().Exit() |
4868 | """ | |
e811c8ce | 4869 | return _core.Exit(*args, **kwargs) |
d14a1e28 | 4870 | |
e811c8ce | 4871 | def Yield(*args, **kwargs): |
0df68c9f RD |
4872 | """ |
4873 | Yield() -> bool | |
6c3b4aae | 4874 | |
0df68c9f RD |
4875 | Yield to other apps/messages. Convenience for wx.GetApp().Yield() |
4876 | """ | |
e811c8ce | 4877 | return _core.Yield(*args, **kwargs) |
d14a1e28 | 4878 | |
e811c8ce | 4879 | def YieldIfNeeded(*args, **kwargs): |
0df68c9f RD |
4880 | """ |
4881 | YieldIfNeeded() -> bool | |
6c3b4aae | 4882 | |
0df68c9f RD |
4883 | Yield to other apps/messages. Convenience for wx.GetApp().Yield(True) |
4884 | """ | |
e811c8ce | 4885 | return _core.YieldIfNeeded(*args, **kwargs) |
d14a1e28 | 4886 | |
e811c8ce | 4887 | def SafeYield(*args, **kwargs): |
0df68c9f RD |
4888 | """ |
4889 | SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool | |
6c3b4aae | 4890 | |
0df68c9f RD |
4891 | This function is similar to wx.Yield, except that it disables the user input |
4892 | to all program windows before calling wx.Yield and re-enables it again | |
4893 | afterwards. If win is not None, this window will remain enabled, allowing the | |
4894 | implementation of some limited user interaction. | |
6c3b4aae | 4895 | |
0df68c9f RD |
4896 | Returns the result of the call to wx.Yield. |
4897 | """ | |
e811c8ce | 4898 | return _core.SafeYield(*args, **kwargs) |
d14a1e28 | 4899 | |
e811c8ce | 4900 | def WakeUpIdle(*args, **kwargs): |
0df68c9f RD |
4901 | """ |
4902 | WakeUpIdle() | |
6c3b4aae | 4903 | |
0df68c9f RD |
4904 | Cause the message queue to become empty again, so idle events will be sent. |
4905 | """ | |
e811c8ce | 4906 | return _core.WakeUpIdle(*args, **kwargs) |
d14a1e28 | 4907 | |
e811c8ce | 4908 | def PostEvent(*args, **kwargs): |
0df68c9f RD |
4909 | """ |
4910 | PostEvent(EvtHandler dest, Event event) | |
6c3b4aae | 4911 | |
0df68c9f RD |
4912 | Send an event to a window or other wx.EvtHandler to be processed later. |
4913 | """ | |
e811c8ce | 4914 | return _core.PostEvent(*args, **kwargs) |
d14a1e28 | 4915 | |
e811c8ce | 4916 | def App_CleanUp(*args, **kwargs): |
0df68c9f RD |
4917 | """ |
4918 | App_CleanUp() | |
6c3b4aae | 4919 | |
0df68c9f RD |
4920 | For internal use only, it is used to cleanup after wxWindows when Python shuts down. |
4921 | """ | |
e811c8ce | 4922 | return _core.App_CleanUp(*args, **kwargs) |
d14a1e28 | 4923 | |
e811c8ce | 4924 | def GetApp(*args, **kwargs): |
0df68c9f RD |
4925 | """ |
4926 | GetApp() -> PyApp | |
6c3b4aae | 4927 | |
0df68c9f RD |
4928 | Return a reference to the current wxApp object. |
4929 | """ | |
e811c8ce | 4930 | return _core.GetApp(*args, **kwargs) |
d14a1e28 RD |
4931 | #---------------------------------------------------------------------- |
4932 | ||
4933 | class PyOnDemandOutputWindow: | |
6c3b4aae RD |
4934 | """ |
4935 | A class that can be used for redirecting Python's stdout and | |
4936 | stderr streams. It will do nothing until something is wrriten to | |
4937 | the stream at which point it will create a Frame with a text area | |
4938 | and write the text there. | |
4939 | """ | |
d14a1e28 RD |
4940 | def __init__(self, title = "wxPython: stdout/stderr"): |
4941 | self.frame = None | |
4942 | self.title = title | |
4943 | self.parent = None | |
4944 | ||
4945 | def SetParent(self, parent): | |
6c3b4aae | 4946 | """Set the window to be used as the popup Frame's parent.""" |
d14a1e28 RD |
4947 | self.parent = parent |
4948 | ||
6c3b4aae RD |
4949 | |
4950 | def CreateOutputWindow(self, st): | |
4951 | self.frame = wx.Frame(self.parent, -1, self.title, | |
4952 | style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE) | |
4953 | self.text = wxTextCtrl(self.frame, -1, "", | |
4954 | style = wx.TE_MULTILINE | wx.TE_READONLY) | |
4955 | self.frame.SetSize((450, 300)) | |
4956 | self.frame.Show(True) | |
4957 | EVT_CLOSE(self.frame, self.OnCloseWindow) | |
4958 | ||
d14a1e28 RD |
4959 | |
4960 | # These methods provide the file-like output behaviour. | |
6c3b4aae RD |
4961 | def write(self, text): |
4962 | """ | |
4963 | Create the output window if needed and write the string to it. | |
4964 | If not called in the context of the gui thread then uses | |
4965 | CallAfter to do the work there. | |
4966 | """ | |
4967 | if self.frame is None: | |
4968 | if not wx.Thread_IsMain(): | |
4969 | wx.CallAfter(self.CreateOutputWindow, text) | |
4970 | else: | |
4971 | self.CreateOutputWindow(text) | |
4972 | else: | |
4973 | if not wx.Thread_IsMain(): | |
4974 | wx.CallAfter(self.text.AppendText, text) | |
4975 | else: | |
4976 | self.text.AppendText(text) | |
4977 | ||
d14a1e28 RD |
4978 | |
4979 | def close(self): | |
6c3b4aae RD |
4980 | if self.frame is not None: |
4981 | wx.CallAfter(self.frame.Close) | |
4982 | ||
d14a1e28 | 4983 | |
6c3b4aae RD |
4984 | def OnCloseWindow(self, event): |
4985 | if self.frame is not None: | |
4986 | self.frame.Destroy() | |
4987 | self.frame = None | |
4988 | self.text = None | |
d14a1e28 RD |
4989 | |
4990 | #---------------------------------------------------------------------- | |
d14a1e28 RD |
4991 | |
4992 | _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__') | |
4993 | ||
4994 | class App(wx.PyApp): | |
6c3b4aae RD |
4995 | """ |
4996 | The main application class. Derive from this and implement an OnInit | |
4997 | method that creates a frame and then calls self.SetTopWindow(frame) | |
4998 | """ | |
d14a1e28 RD |
4999 | outputWindowClass = PyOnDemandOutputWindow |
5000 | ||
5001 | def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False): | |
5002 | wx.PyApp.__init__(self) | |
5003 | ||
5004 | if wx.Platform == "__WXMAC__": | |
5005 | try: | |
5006 | import MacOS | |
5007 | if not MacOS.WMAvailable(): | |
5008 | print """\ | |
5009 | This program needs access to the screen. Please run with 'pythonw', | |
5010 | not 'python', and only when you are logged in on the main display of | |
5011 | your Mac.""" | |
5012 | _sys.exit(1) | |
5013 | except: | |
5014 | pass | |
5015 | ||
5016 | # This has to be done before OnInit | |
5017 | self.SetUseBestVisual(useBestVisual) | |
5018 | ||
5019 | # Set the default handler for SIGINT. This fixes a problem | |
5020 | # where if Ctrl-C is pressed in the console that started this | |
5021 | # app then it will not appear to do anything, (not even send | |
5022 | # KeyboardInterrupt???) but will later segfault on exit. By | |
5023 | # setting the default handler then the app will exit, as | |
5024 | # expected (depending on platform.) | |
5025 | try: | |
5026 | import signal | |
5027 | signal.signal(signal.SIGINT, signal.SIG_DFL) | |
5028 | except: | |
5029 | pass | |
5030 | ||
5031 | # Save and redirect the stdio to a window? | |
5032 | self.stdioWin = None | |
5033 | self.saveStdio = (_sys.stdout, _sys.stderr) | |
5034 | if redirect: | |
5035 | self.RedirectStdio(filename) | |
5036 | ||
5037 | # This finishes the initialization of wxWindows and then calls | |
5038 | # the OnInit that should be present in the derived class | |
5039 | self._BootstrapApp() | |
5040 | ||
5041 | ||
5042 | def __del__(self): | |
5043 | try: | |
5044 | self.RestoreStdio() # Just in case the MainLoop was overridden | |
5045 | except: | |
5046 | pass | |
5047 | ||
5048 | ||
5049 | def SetTopWindow(self, frame): | |
1e0c8722 | 5050 | """Set the \"main\" top level window""" |
d14a1e28 RD |
5051 | if self.stdioWin: |
5052 | self.stdioWin.SetParent(frame) | |
5053 | wx.PyApp.SetTopWindow(self, frame) | |
5054 | ||
5055 | ||
5056 | def MainLoop(self): | |
1e0c8722 | 5057 | """Execute the main GUI event loop""" |
d14a1e28 RD |
5058 | wx.PyApp.MainLoop(self) |
5059 | self.RestoreStdio() | |
5060 | ||
5061 | ||
5062 | def RedirectStdio(self, filename): | |
1e0c8722 | 5063 | """Redirect sys.stdout and sys.stderr to a file or a popup window.""" |
d14a1e28 RD |
5064 | if filename: |
5065 | _sys.stdout = _sys.stderr = open(filename, 'a') | |
5066 | else: | |
5067 | self.stdioWin = self.outputWindowClass() | |
5068 | _sys.stdout = _sys.stderr = self.stdioWin | |
5069 | ||
5070 | ||
5071 | def RestoreStdio(self): | |
5072 | _sys.stdout, _sys.stderr = self.saveStdio | |
5073 | ||
5074 | ||
5075 | ||
5076 | # change from wxPyApp_ to wxApp_ | |
5077 | App_GetMacSupportPCMenuShortcuts = _core.PyApp_GetMacSupportPCMenuShortcuts | |
5078 | App_GetMacAboutMenuItemId = _core.PyApp_GetMacAboutMenuItemId | |
5079 | App_GetMacPreferencesMenuItemId = _core.PyApp_GetMacPreferencesMenuItemId | |
5080 | App_GetMacExitMenuItemId = _core.PyApp_GetMacExitMenuItemId | |
5081 | App_GetMacHelpMenuTitleName = _core.PyApp_GetMacHelpMenuTitleName | |
5082 | App_SetMacSupportPCMenuShortcuts = _core.PyApp_SetMacSupportPCMenuShortcuts | |
5083 | App_SetMacAboutMenuItemId = _core.PyApp_SetMacAboutMenuItemId | |
5084 | App_SetMacPreferencesMenuItemId = _core.PyApp_SetMacPreferencesMenuItemId | |
5085 | App_SetMacExitMenuItemId = _core.PyApp_SetMacExitMenuItemId | |
5086 | App_SetMacHelpMenuTitleName = _core.PyApp_SetMacHelpMenuTitleName | |
5087 | App_GetComCtl32Version = _core.PyApp_GetComCtl32Version | |
5088 | ||
5089 | #---------------------------------------------------------------------------- | |
5090 | ||
5091 | class PySimpleApp(wx.App): | |
6c3b4aae RD |
5092 | """ |
5093 | A simple application class. You can just create one of these and | |
5094 | then then make your top level windows later, and not have to worry | |
5095 | about OnInit.""" | |
5096 | ||
5097 | def __init__(self, redirect=False, filename=None, useBestVisual=False): | |
5098 | wx.App.__init__(self, redirect, filename, useBestVisual) | |
5099 | ||
d14a1e28 RD |
5100 | def OnInit(self): |
5101 | wx.InitAllImageHandlers() | |
5102 | return True | |
5103 | ||
5104 | ||
6c3b4aae | 5105 | # Is anybody using this one? |
d14a1e28 RD |
5106 | class PyWidgetTester(wx.App): |
5107 | def __init__(self, size = (250, 100)): | |
5108 | self.size = size | |
5109 | wx.App.__init__(self, 0) | |
5110 | ||
5111 | def OnInit(self): | |
5112 | self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size) | |
5113 | self.SetTopWindow(self.frame) | |
5114 | return True | |
5115 | ||
5116 | def SetWidget(self, widgetClass, *args): | |
5117 | w = widgetClass(self.frame, *args) | |
5118 | self.frame.Show(True) | |
5119 | ||
5120 | #---------------------------------------------------------------------------- | |
5121 | # DO NOT hold any other references to this object. This is how we | |
5122 | # know when to cleanup system resources that wxWin is holding. When | |
5123 | # the sys module is unloaded, the refcount on sys.__wxPythonCleanup | |
5124 | # goes to zero and it calls the wxApp_CleanUp function. | |
5125 | ||
5126 | class __wxPyCleanup: | |
5127 | def __init__(self): | |
5128 | self.cleanup = _core.App_CleanUp | |
5129 | def __del__(self): | |
5130 | self.cleanup() | |
5131 | ||
5132 | _sys.__wxPythonCleanup = __wxPyCleanup() | |
5133 | ||
5134 | ## # another possible solution, but it gets called too early... | |
5135 | ## if sys.version[0] == '2': | |
5136 | ## import atexit | |
5137 | ## atexit.register(_core.wxApp_CleanUp) | |
5138 | ## else: | |
5139 | ## sys.exitfunc = _core.wxApp_CleanUp | |
5140 | ||
5141 | ||
5142 | #---------------------------------------------------------------------------- | |
5143 | ||
5144 | #--------------------------------------------------------------------------- | |
5145 | ||
1e0c8722 | 5146 | class AcceleratorEntry(object): |
1e0c8722 RD |
5147 | def __repr__(self): |
5148 | return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5149 | def __init__(self, *args, **kwargs): | |
5150 | """__init__(int flags=0, int keyCode=0, int cmd=0, MenuItem item=None) -> AcceleratorEntry""" | |
5151 | newobj = _core.new_AcceleratorEntry(*args, **kwargs) | |
5152 | self.this = newobj.this | |
5153 | self.thisown = 1 | |
5154 | del newobj.thisown | |
5155 | def __del__(self, destroy=_core.delete_AcceleratorEntry): | |
5156 | """__del__()""" | |
5157 | try: | |
5158 | if self.thisown: destroy(self) | |
5159 | except: pass | |
5160 | ||
5161 | def Set(*args, **kwargs): | |
5162 | """Set(int flags, int keyCode, int cmd, MenuItem item=None)""" | |
5163 | return _core.AcceleratorEntry_Set(*args, **kwargs) | |
5164 | ||
5165 | def SetMenuItem(*args, **kwargs): | |
5166 | """SetMenuItem(MenuItem item)""" | |
5167 | return _core.AcceleratorEntry_SetMenuItem(*args, **kwargs) | |
5168 | ||
5169 | def GetMenuItem(*args, **kwargs): | |
5170 | """GetMenuItem() -> MenuItem""" | |
5171 | return _core.AcceleratorEntry_GetMenuItem(*args, **kwargs) | |
5172 | ||
5173 | def GetFlags(*args, **kwargs): | |
5174 | """GetFlags() -> int""" | |
5175 | return _core.AcceleratorEntry_GetFlags(*args, **kwargs) | |
5176 | ||
5177 | def GetKeyCode(*args, **kwargs): | |
5178 | """GetKeyCode() -> int""" | |
5179 | return _core.AcceleratorEntry_GetKeyCode(*args, **kwargs) | |
5180 | ||
5181 | def GetCommand(*args, **kwargs): | |
5182 | """GetCommand() -> int""" | |
5183 | return _core.AcceleratorEntry_GetCommand(*args, **kwargs) | |
5184 | ||
5185 | ||
5186 | class AcceleratorEntryPtr(AcceleratorEntry): | |
5187 | def __init__(self, this): | |
5188 | self.this = this | |
5189 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5190 | self.__class__ = AcceleratorEntry | |
5191 | _core.AcceleratorEntry_swigregister(AcceleratorEntryPtr) | |
5192 | ||
5193 | class AcceleratorTable(Object): | |
1e0c8722 RD |
5194 | def __repr__(self): |
5195 | return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5196 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
5197 | """ |
5198 | __init__(entries) -> AcceleratorTable | |
1e0c8722 | 5199 | |
0df68c9f RD |
5200 | Construct an AcceleratorTable from a list of AcceleratorEntry items or |
5201 | 3-tuples (flags, keyCode, cmdID) | |
5202 | """ | |
1e0c8722 RD |
5203 | newobj = _core.new_AcceleratorTable(*args, **kwargs) |
5204 | self.this = newobj.this | |
5205 | self.thisown = 1 | |
5206 | del newobj.thisown | |
5207 | def __del__(self, destroy=_core.delete_AcceleratorTable): | |
5208 | """__del__()""" | |
5209 | try: | |
5210 | if self.thisown: destroy(self) | |
5211 | except: pass | |
5212 | ||
5213 | def Ok(*args, **kwargs): | |
5214 | """Ok() -> bool""" | |
5215 | return _core.AcceleratorTable_Ok(*args, **kwargs) | |
5216 | ||
5217 | ||
5218 | class AcceleratorTablePtr(AcceleratorTable): | |
5219 | def __init__(self, this): | |
5220 | self.this = this | |
5221 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5222 | self.__class__ = AcceleratorTable | |
5223 | _core.AcceleratorTable_swigregister(AcceleratorTablePtr) | |
5224 | ||
5225 | ||
5226 | def GetAccelFromString(*args, **kwargs): | |
5227 | """GetAccelFromString(wxString label) -> AcceleratorEntry""" | |
5228 | return _core.GetAccelFromString(*args, **kwargs) | |
5229 | #--------------------------------------------------------------------------- | |
5230 | ||
d14a1e28 | 5231 | class Window(EvtHandler): |
e811c8ce RD |
5232 | def __repr__(self): |
5233 | return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5234 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
5235 | """ |
5236 | __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
5237 | long style=0, wxString name=PanelNameStr) -> Window | |
5238 | """ | |
d14a1e28 RD |
5239 | newobj = _core.new_Window(*args, **kwargs) |
5240 | self.this = newobj.this | |
5241 | self.thisown = 1 | |
5242 | del newobj.thisown | |
5243 | self._setOORInfo(self) | |
d14a1e28 | 5244 | |
e811c8ce | 5245 | def Create(*args, **kwargs): |
0df68c9f RD |
5246 | """ |
5247 | Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
5248 | long style=0, wxString name=PanelNameStr) -> bool | |
5249 | """ | |
e811c8ce | 5250 | return _core.Window_Create(*args, **kwargs) |
d14a1e28 | 5251 | |
e811c8ce RD |
5252 | def Close(*args, **kwargs): |
5253 | """Close(bool force=False) -> bool""" | |
5254 | return _core.Window_Close(*args, **kwargs) | |
d14a1e28 | 5255 | |
e811c8ce | 5256 | def Destroy(*args, **kwargs): |
0df68c9f RD |
5257 | """ |
5258 | Destroy() -> bool | |
d14a1e28 | 5259 | |
0df68c9f RD |
5260 | Deletes the C++ object this Python object is a proxy for. |
5261 | """ | |
e811c8ce | 5262 | return _core.Window_Destroy(*args, **kwargs) |
d14a1e28 | 5263 | |
e811c8ce RD |
5264 | def DestroyChildren(*args, **kwargs): |
5265 | """DestroyChildren() -> bool""" | |
5266 | return _core.Window_DestroyChildren(*args, **kwargs) | |
d14a1e28 | 5267 | |
e811c8ce RD |
5268 | def IsBeingDeleted(*args, **kwargs): |
5269 | """IsBeingDeleted() -> bool""" | |
5270 | return _core.Window_IsBeingDeleted(*args, **kwargs) | |
d14a1e28 | 5271 | |
e811c8ce RD |
5272 | def SetTitle(*args, **kwargs): |
5273 | """SetTitle(wxString title)""" | |
5274 | return _core.Window_SetTitle(*args, **kwargs) | |
d14a1e28 | 5275 | |
e811c8ce RD |
5276 | def GetTitle(*args, **kwargs): |
5277 | """GetTitle() -> wxString""" | |
5278 | return _core.Window_GetTitle(*args, **kwargs) | |
d14a1e28 | 5279 | |
e811c8ce RD |
5280 | def SetLabel(*args, **kwargs): |
5281 | """SetLabel(wxString label)""" | |
5282 | return _core.Window_SetLabel(*args, **kwargs) | |
d14a1e28 | 5283 | |
e811c8ce RD |
5284 | def GetLabel(*args, **kwargs): |
5285 | """GetLabel() -> wxString""" | |
5286 | return _core.Window_GetLabel(*args, **kwargs) | |
d14a1e28 | 5287 | |
e811c8ce RD |
5288 | def SetName(*args, **kwargs): |
5289 | """SetName(wxString name)""" | |
5290 | return _core.Window_SetName(*args, **kwargs) | |
d14a1e28 | 5291 | |
e811c8ce RD |
5292 | def GetName(*args, **kwargs): |
5293 | """GetName() -> wxString""" | |
5294 | return _core.Window_GetName(*args, **kwargs) | |
d14a1e28 | 5295 | |
e811c8ce RD |
5296 | def SetId(*args, **kwargs): |
5297 | """SetId(int winid)""" | |
5298 | return _core.Window_SetId(*args, **kwargs) | |
d14a1e28 | 5299 | |
e811c8ce RD |
5300 | def GetId(*args, **kwargs): |
5301 | """GetId() -> int""" | |
5302 | return _core.Window_GetId(*args, **kwargs) | |
d14a1e28 | 5303 | |
e811c8ce RD |
5304 | def NewControlId(*args, **kwargs): |
5305 | """Window.NewControlId() -> int""" | |
5306 | return _core.Window_NewControlId(*args, **kwargs) | |
d14a1e28 | 5307 | |
e811c8ce RD |
5308 | NewControlId = staticmethod(NewControlId) |
5309 | def NextControlId(*args, **kwargs): | |
5310 | """Window.NextControlId(int winid) -> int""" | |
5311 | return _core.Window_NextControlId(*args, **kwargs) | |
d14a1e28 | 5312 | |
e811c8ce RD |
5313 | NextControlId = staticmethod(NextControlId) |
5314 | def PrevControlId(*args, **kwargs): | |
5315 | """Window.PrevControlId(int winid) -> int""" | |
5316 | return _core.Window_PrevControlId(*args, **kwargs) | |
d14a1e28 | 5317 | |
e811c8ce RD |
5318 | PrevControlId = staticmethod(PrevControlId) |
5319 | def SetSize(*args, **kwargs): | |
5320 | """SetSize(Size size)""" | |
5321 | return _core.Window_SetSize(*args, **kwargs) | |
d14a1e28 | 5322 | |
e811c8ce RD |
5323 | def SetDimensions(*args, **kwargs): |
5324 | """SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)""" | |
5325 | return _core.Window_SetDimensions(*args, **kwargs) | |
d14a1e28 | 5326 | |
e811c8ce RD |
5327 | def SetRect(*args, **kwargs): |
5328 | """SetRect(Rect rect, int sizeFlags=SIZE_AUTO)""" | |
5329 | return _core.Window_SetRect(*args, **kwargs) | |
d14a1e28 | 5330 | |
e811c8ce RD |
5331 | def SetSizeWH(*args, **kwargs): |
5332 | """SetSizeWH(int width, int height)""" | |
5333 | return _core.Window_SetSizeWH(*args, **kwargs) | |
d14a1e28 | 5334 | |
e811c8ce RD |
5335 | def Move(*args, **kwargs): |
5336 | """Move(Point pt, int flags=SIZE_USE_EXISTING)""" | |
5337 | return _core.Window_Move(*args, **kwargs) | |
d14a1e28 | 5338 | |
e811c8ce RD |
5339 | SetPosition = Move |
5340 | def MoveXY(*args, **kwargs): | |
5341 | """MoveXY(int x, int y, int flags=SIZE_USE_EXISTING)""" | |
5342 | return _core.Window_MoveXY(*args, **kwargs) | |
5343 | ||
5344 | def Raise(*args, **kwargs): | |
5345 | """Raise()""" | |
5346 | return _core.Window_Raise(*args, **kwargs) | |
5347 | ||
5348 | def Lower(*args, **kwargs): | |
5349 | """Lower()""" | |
5350 | return _core.Window_Lower(*args, **kwargs) | |
5351 | ||
5352 | def SetClientSize(*args, **kwargs): | |
5353 | """SetClientSize(Size size)""" | |
5354 | return _core.Window_SetClientSize(*args, **kwargs) | |
5355 | ||
5356 | def SetClientSizeWH(*args, **kwargs): | |
5357 | """SetClientSizeWH(int width, int height)""" | |
5358 | return _core.Window_SetClientSizeWH(*args, **kwargs) | |
5359 | ||
5360 | def SetClientRect(*args, **kwargs): | |
5361 | """SetClientRect(Rect rect)""" | |
5362 | return _core.Window_SetClientRect(*args, **kwargs) | |
5363 | ||
5364 | def GetPosition(*args, **kwargs): | |
0df68c9f RD |
5365 | """ |
5366 | GetPosition() -> Point | |
e811c8ce | 5367 | |
0df68c9f RD |
5368 | Get the window's position. |
5369 | """ | |
e811c8ce RD |
5370 | return _core.Window_GetPosition(*args, **kwargs) |
5371 | ||
5372 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
5373 | """ |
5374 | GetPositionTuple() -> (x,y) | |
e811c8ce | 5375 | |
0df68c9f RD |
5376 | Get the window's position. |
5377 | """ | |
e811c8ce RD |
5378 | return _core.Window_GetPositionTuple(*args, **kwargs) |
5379 | ||
5380 | def GetSize(*args, **kwargs): | |
0df68c9f RD |
5381 | """ |
5382 | GetSize() -> Size | |
e811c8ce | 5383 | |
0df68c9f RD |
5384 | Get the window size. |
5385 | """ | |
e811c8ce RD |
5386 | return _core.Window_GetSize(*args, **kwargs) |
5387 | ||
5388 | def GetSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5389 | """ |
5390 | GetSizeTuple() -> (width, height) | |
e811c8ce | 5391 | |
0df68c9f RD |
5392 | Get the window size. |
5393 | """ | |
e811c8ce RD |
5394 | return _core.Window_GetSizeTuple(*args, **kwargs) |
5395 | ||
5396 | def GetRect(*args, **kwargs): | |
5397 | """GetRect() -> Rect""" | |
5398 | return _core.Window_GetRect(*args, **kwargs) | |
5399 | ||
5400 | def GetClientSize(*args, **kwargs): | |
0df68c9f RD |
5401 | """ |
5402 | GetClientSize() -> Size | |
e811c8ce | 5403 | |
0df68c9f RD |
5404 | Get the window's client size. |
5405 | """ | |
e811c8ce RD |
5406 | return _core.Window_GetClientSize(*args, **kwargs) |
5407 | ||
5408 | def GetClientSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5409 | """ |
5410 | GetClientSizeTuple() -> (width, height) | |
e811c8ce | 5411 | |
0df68c9f RD |
5412 | Get the window's client size. |
5413 | """ | |
e811c8ce RD |
5414 | return _core.Window_GetClientSizeTuple(*args, **kwargs) |
5415 | ||
5416 | def GetClientAreaOrigin(*args, **kwargs): | |
5417 | """GetClientAreaOrigin() -> Point""" | |
5418 | return _core.Window_GetClientAreaOrigin(*args, **kwargs) | |
5419 | ||
5420 | def GetClientRect(*args, **kwargs): | |
5421 | """GetClientRect() -> Rect""" | |
5422 | return _core.Window_GetClientRect(*args, **kwargs) | |
5423 | ||
5424 | def GetBestSize(*args, **kwargs): | |
0df68c9f RD |
5425 | """ |
5426 | GetBestSize() -> Size | |
e811c8ce | 5427 | |
0df68c9f RD |
5428 | Get the size best suited for the window (in fact, minimal acceptable size |
5429 | using which it will still look "nice") | |
5430 | """ | |
e811c8ce RD |
5431 | return _core.Window_GetBestSize(*args, **kwargs) |
5432 | ||
5433 | def GetBestSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5434 | """ |
5435 | GetBestSizeTuple() -> (width, height) | |
e811c8ce | 5436 | |
0df68c9f RD |
5437 | Get the size best suited for the window (in fact, minimal acceptable size |
5438 | using which it will still look "nice") | |
5439 | """ | |
e811c8ce RD |
5440 | return _core.Window_GetBestSizeTuple(*args, **kwargs) |
5441 | ||
5442 | def GetAdjustedBestSize(*args, **kwargs): | |
5443 | """GetAdjustedBestSize() -> Size""" | |
5444 | return _core.Window_GetAdjustedBestSize(*args, **kwargs) | |
5445 | ||
5446 | def Center(*args, **kwargs): | |
5447 | """Center(int direction=BOTH)""" | |
5448 | return _core.Window_Center(*args, **kwargs) | |
5449 | ||
5450 | Centre = Center | |
5451 | def CenterOnScreen(*args, **kwargs): | |
5452 | """CenterOnScreen(int dir=BOTH)""" | |
5453 | return _core.Window_CenterOnScreen(*args, **kwargs) | |
5454 | ||
5455 | CentreOnScreen = CenterOnScreen | |
5456 | def CenterOnParent(*args, **kwargs): | |
5457 | """CenterOnParent(int dir=BOTH)""" | |
5458 | return _core.Window_CenterOnParent(*args, **kwargs) | |
5459 | ||
5460 | CentreOnParent = CenterOnParent | |
5461 | def Fit(*args, **kwargs): | |
5462 | """Fit()""" | |
5463 | return _core.Window_Fit(*args, **kwargs) | |
5464 | ||
5465 | def FitInside(*args, **kwargs): | |
5466 | """FitInside()""" | |
5467 | return _core.Window_FitInside(*args, **kwargs) | |
5468 | ||
5469 | def SetSizeHints(*args, **kwargs): | |
0df68c9f RD |
5470 | """ |
5471 | SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, | |
5472 | int incH=-1) | |
5473 | """ | |
e811c8ce RD |
5474 | return _core.Window_SetSizeHints(*args, **kwargs) |
5475 | ||
5476 | def SetVirtualSizeHints(*args, **kwargs): | |
5477 | """SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1)""" | |
5478 | return _core.Window_SetVirtualSizeHints(*args, **kwargs) | |
5479 | ||
5480 | def GetMinWidth(*args, **kwargs): | |
5481 | """GetMinWidth() -> int""" | |
5482 | return _core.Window_GetMinWidth(*args, **kwargs) | |
5483 | ||
5484 | def GetMinHeight(*args, **kwargs): | |
5485 | """GetMinHeight() -> int""" | |
5486 | return _core.Window_GetMinHeight(*args, **kwargs) | |
5487 | ||
5488 | def GetMaxWidth(*args, **kwargs): | |
5489 | """GetMaxWidth() -> int""" | |
5490 | return _core.Window_GetMaxWidth(*args, **kwargs) | |
5491 | ||
5492 | def GetMaxHeight(*args, **kwargs): | |
5493 | """GetMaxHeight() -> int""" | |
5494 | return _core.Window_GetMaxHeight(*args, **kwargs) | |
5495 | ||
5496 | def GetMaxSize(*args, **kwargs): | |
5497 | """GetMaxSize() -> Size""" | |
5498 | return _core.Window_GetMaxSize(*args, **kwargs) | |
5499 | ||
5500 | def SetVirtualSize(*args, **kwargs): | |
0df68c9f RD |
5501 | """ |
5502 | SetVirtualSize(Size size) | |
e811c8ce | 5503 | |
0df68c9f RD |
5504 | Set the the virtual size of a window. For most windows this is just the |
5505 | client area of the window, but for some like scrolled windows it is more or | |
5506 | less independent of the screen window size. | |
5507 | """ | |
e811c8ce RD |
5508 | return _core.Window_SetVirtualSize(*args, **kwargs) |
5509 | ||
5510 | def SetVirtualSizeWH(*args, **kwargs): | |
0df68c9f RD |
5511 | """ |
5512 | SetVirtualSizeWH(int w, int h) | |
e811c8ce | 5513 | |
0df68c9f RD |
5514 | Set the the virtual size of a window. For most windows this is just the |
5515 | client area of the window, but for some like scrolled windows it is more or | |
5516 | less independent of the screen window size. | |
5517 | """ | |
e811c8ce RD |
5518 | return _core.Window_SetVirtualSizeWH(*args, **kwargs) |
5519 | ||
5520 | def GetVirtualSize(*args, **kwargs): | |
0df68c9f RD |
5521 | """ |
5522 | GetVirtualSize() -> Size | |
e811c8ce | 5523 | |
0df68c9f RD |
5524 | Get the the virtual size of the window. For most windows this is just |
5525 | the client area of the window, but for some like scrolled windows it is | |
5526 | more or less independent of the screen window size. | |
5527 | """ | |
e811c8ce RD |
5528 | return _core.Window_GetVirtualSize(*args, **kwargs) |
5529 | ||
5530 | def GetVirtualSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5531 | """ |
5532 | GetVirtualSizeTuple() -> (width, height) | |
e811c8ce | 5533 | |
0df68c9f RD |
5534 | Get the the virtual size of the window. For most windows this is just |
5535 | the client area of the window, but for some like scrolled windows it is | |
5536 | more or less independent of the screen window size. | |
5537 | """ | |
e811c8ce RD |
5538 | return _core.Window_GetVirtualSizeTuple(*args, **kwargs) |
5539 | ||
5540 | def GetBestVirtualSize(*args, **kwargs): | |
5541 | """GetBestVirtualSize() -> Size""" | |
5542 | return _core.Window_GetBestVirtualSize(*args, **kwargs) | |
5543 | ||
5544 | def Show(*args, **kwargs): | |
5545 | """Show(bool show=True) -> bool""" | |
5546 | return _core.Window_Show(*args, **kwargs) | |
5547 | ||
5548 | def Hide(*args, **kwargs): | |
5549 | """Hide() -> bool""" | |
5550 | return _core.Window_Hide(*args, **kwargs) | |
5551 | ||
5552 | def Enable(*args, **kwargs): | |
5553 | """Enable(bool enable=True) -> bool""" | |
5554 | return _core.Window_Enable(*args, **kwargs) | |
5555 | ||
5556 | def Disable(*args, **kwargs): | |
5557 | """Disable() -> bool""" | |
5558 | return _core.Window_Disable(*args, **kwargs) | |
5559 | ||
5560 | def IsShown(*args, **kwargs): | |
5561 | """IsShown() -> bool""" | |
5562 | return _core.Window_IsShown(*args, **kwargs) | |
5563 | ||
5564 | def IsEnabled(*args, **kwargs): | |
5565 | """IsEnabled() -> bool""" | |
5566 | return _core.Window_IsEnabled(*args, **kwargs) | |
5567 | ||
5568 | def SetWindowStyleFlag(*args, **kwargs): | |
5569 | """SetWindowStyleFlag(long style)""" | |
5570 | return _core.Window_SetWindowStyleFlag(*args, **kwargs) | |
5571 | ||
5572 | def GetWindowStyleFlag(*args, **kwargs): | |
5573 | """GetWindowStyleFlag() -> long""" | |
5574 | return _core.Window_GetWindowStyleFlag(*args, **kwargs) | |
5575 | ||
5576 | def SetWindowStyle(*args, **kwargs): | |
5577 | """SetWindowStyle(long style)""" | |
5578 | return _core.Window_SetWindowStyle(*args, **kwargs) | |
5579 | ||
5580 | def GetWindowStyle(*args, **kwargs): | |
5581 | """GetWindowStyle() -> long""" | |
5582 | return _core.Window_GetWindowStyle(*args, **kwargs) | |
5583 | ||
5584 | def HasFlag(*args, **kwargs): | |
5585 | """HasFlag(int flag) -> bool""" | |
5586 | return _core.Window_HasFlag(*args, **kwargs) | |
5587 | ||
5588 | def IsRetained(*args, **kwargs): | |
5589 | """IsRetained() -> bool""" | |
5590 | return _core.Window_IsRetained(*args, **kwargs) | |
5591 | ||
5592 | def SetExtraStyle(*args, **kwargs): | |
5593 | """SetExtraStyle(long exStyle)""" | |
5594 | return _core.Window_SetExtraStyle(*args, **kwargs) | |
5595 | ||
5596 | def GetExtraStyle(*args, **kwargs): | |
5597 | """GetExtraStyle() -> long""" | |
5598 | return _core.Window_GetExtraStyle(*args, **kwargs) | |
5599 | ||
5600 | def MakeModal(*args, **kwargs): | |
5601 | """MakeModal(bool modal=True)""" | |
5602 | return _core.Window_MakeModal(*args, **kwargs) | |
5603 | ||
5604 | def SetThemeEnabled(*args, **kwargs): | |
5605 | """SetThemeEnabled(bool enableTheme)""" | |
5606 | return _core.Window_SetThemeEnabled(*args, **kwargs) | |
5607 | ||
5608 | def GetThemeEnabled(*args, **kwargs): | |
5609 | """GetThemeEnabled() -> bool""" | |
5610 | return _core.Window_GetThemeEnabled(*args, **kwargs) | |
5611 | ||
5612 | def ShouldInheritColours(*args, **kwargs): | |
5613 | """ShouldInheritColours() -> bool""" | |
5614 | return _core.Window_ShouldInheritColours(*args, **kwargs) | |
5615 | ||
5616 | def SetFocus(*args, **kwargs): | |
5617 | """SetFocus()""" | |
5618 | return _core.Window_SetFocus(*args, **kwargs) | |
5619 | ||
5620 | def SetFocusFromKbd(*args, **kwargs): | |
5621 | """SetFocusFromKbd()""" | |
5622 | return _core.Window_SetFocusFromKbd(*args, **kwargs) | |
5623 | ||
5624 | def FindFocus(*args, **kwargs): | |
5625 | """Window.FindFocus() -> Window""" | |
5626 | return _core.Window_FindFocus(*args, **kwargs) | |
5627 | ||
5628 | FindFocus = staticmethod(FindFocus) | |
5629 | def AcceptsFocus(*args, **kwargs): | |
5630 | """AcceptsFocus() -> bool""" | |
5631 | return _core.Window_AcceptsFocus(*args, **kwargs) | |
5632 | ||
5633 | def AcceptsFocusFromKeyboard(*args, **kwargs): | |
5634 | """AcceptsFocusFromKeyboard() -> bool""" | |
5635 | return _core.Window_AcceptsFocusFromKeyboard(*args, **kwargs) | |
5636 | ||
5637 | def GetDefaultItem(*args, **kwargs): | |
5638 | """GetDefaultItem() -> Window""" | |
5639 | return _core.Window_GetDefaultItem(*args, **kwargs) | |
5640 | ||
5641 | def SetDefaultItem(*args, **kwargs): | |
5642 | """SetDefaultItem(Window child) -> Window""" | |
5643 | return _core.Window_SetDefaultItem(*args, **kwargs) | |
5644 | ||
5645 | def SetTmpDefaultItem(*args, **kwargs): | |
5646 | """SetTmpDefaultItem(Window win)""" | |
5647 | return _core.Window_SetTmpDefaultItem(*args, **kwargs) | |
5648 | ||
5649 | def GetChildren(*args, **kwargs): | |
5650 | """GetChildren() -> PyObject""" | |
5651 | return _core.Window_GetChildren(*args, **kwargs) | |
5652 | ||
5653 | def GetParent(*args, **kwargs): | |
5654 | """GetParent() -> Window""" | |
5655 | return _core.Window_GetParent(*args, **kwargs) | |
5656 | ||
5657 | def GetGrandParent(*args, **kwargs): | |
5658 | """GetGrandParent() -> Window""" | |
5659 | return _core.Window_GetGrandParent(*args, **kwargs) | |
5660 | ||
5661 | def IsTopLevel(*args, **kwargs): | |
5662 | """IsTopLevel() -> bool""" | |
5663 | return _core.Window_IsTopLevel(*args, **kwargs) | |
5664 | ||
5665 | def Reparent(*args, **kwargs): | |
5666 | """Reparent(Window newParent) -> bool""" | |
5667 | return _core.Window_Reparent(*args, **kwargs) | |
5668 | ||
5669 | def AddChild(*args, **kwargs): | |
5670 | """AddChild(Window child)""" | |
5671 | return _core.Window_AddChild(*args, **kwargs) | |
5672 | ||
5673 | def RemoveChild(*args, **kwargs): | |
5674 | """RemoveChild(Window child)""" | |
5675 | return _core.Window_RemoveChild(*args, **kwargs) | |
5676 | ||
5677 | def FindWindowById(*args, **kwargs): | |
5678 | """FindWindowById(long winid) -> Window""" | |
5679 | return _core.Window_FindWindowById(*args, **kwargs) | |
5680 | ||
5681 | def FindWindowByName(*args, **kwargs): | |
5682 | """FindWindowByName(wxString name) -> Window""" | |
5683 | return _core.Window_FindWindowByName(*args, **kwargs) | |
5684 | ||
5685 | def GetEventHandler(*args, **kwargs): | |
5686 | """GetEventHandler() -> EvtHandler""" | |
5687 | return _core.Window_GetEventHandler(*args, **kwargs) | |
5688 | ||
5689 | def SetEventHandler(*args, **kwargs): | |
5690 | """SetEventHandler(EvtHandler handler)""" | |
5691 | return _core.Window_SetEventHandler(*args, **kwargs) | |
5692 | ||
5693 | def PushEventHandler(*args, **kwargs): | |
5694 | """PushEventHandler(EvtHandler handler)""" | |
5695 | return _core.Window_PushEventHandler(*args, **kwargs) | |
5696 | ||
5697 | def PopEventHandler(*args, **kwargs): | |
5698 | """PopEventHandler(bool deleteHandler=False) -> EvtHandler""" | |
5699 | return _core.Window_PopEventHandler(*args, **kwargs) | |
5700 | ||
5701 | def RemoveEventHandler(*args, **kwargs): | |
5702 | """RemoveEventHandler(EvtHandler handler) -> bool""" | |
5703 | return _core.Window_RemoveEventHandler(*args, **kwargs) | |
5704 | ||
5705 | def SetValidator(*args, **kwargs): | |
5706 | """SetValidator(Validator validator)""" | |
5707 | return _core.Window_SetValidator(*args, **kwargs) | |
5708 | ||
5709 | def GetValidator(*args, **kwargs): | |
5710 | """GetValidator() -> Validator""" | |
5711 | return _core.Window_GetValidator(*args, **kwargs) | |
5712 | ||
5713 | def SetAcceleratorTable(*args, **kwargs): | |
1e0c8722 | 5714 | """SetAcceleratorTable(AcceleratorTable accel)""" |
e811c8ce RD |
5715 | return _core.Window_SetAcceleratorTable(*args, **kwargs) |
5716 | ||
5717 | def GetAcceleratorTable(*args, **kwargs): | |
1e0c8722 | 5718 | """GetAcceleratorTable() -> AcceleratorTable""" |
e811c8ce RD |
5719 | return _core.Window_GetAcceleratorTable(*args, **kwargs) |
5720 | ||
5721 | def RegisterHotKey(*args, **kwargs): | |
5722 | """RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool""" | |
5723 | return _core.Window_RegisterHotKey(*args, **kwargs) | |
5724 | ||
5725 | def UnregisterHotKey(*args, **kwargs): | |
5726 | """UnregisterHotKey(int hotkeyId) -> bool""" | |
5727 | return _core.Window_UnregisterHotKey(*args, **kwargs) | |
5728 | ||
5729 | def ConvertDialogPointToPixels(*args, **kwargs): | |
5730 | """ConvertDialogPointToPixels(Point pt) -> Point""" | |
5731 | return _core.Window_ConvertDialogPointToPixels(*args, **kwargs) | |
5732 | ||
5733 | def ConvertDialogSizeToPixels(*args, **kwargs): | |
5734 | """ConvertDialogSizeToPixels(Size sz) -> Size""" | |
5735 | return _core.Window_ConvertDialogSizeToPixels(*args, **kwargs) | |
5736 | ||
5737 | def DLG_PNT(*args, **kwargs): | |
5738 | """DLG_PNT(Point pt) -> Point""" | |
5739 | return _core.Window_DLG_PNT(*args, **kwargs) | |
5740 | ||
5741 | def DLG_SZE(*args, **kwargs): | |
5742 | """DLG_SZE(Size sz) -> Size""" | |
5743 | return _core.Window_DLG_SZE(*args, **kwargs) | |
5744 | ||
5745 | def ConvertPixelPointToDialog(*args, **kwargs): | |
5746 | """ConvertPixelPointToDialog(Point pt) -> Point""" | |
5747 | return _core.Window_ConvertPixelPointToDialog(*args, **kwargs) | |
5748 | ||
5749 | def ConvertPixelSizeToDialog(*args, **kwargs): | |
5750 | """ConvertPixelSizeToDialog(Size sz) -> Size""" | |
5751 | return _core.Window_ConvertPixelSizeToDialog(*args, **kwargs) | |
5752 | ||
5753 | def WarpPointer(*args, **kwargs): | |
5754 | """WarpPointer(int x, int y)""" | |
5755 | return _core.Window_WarpPointer(*args, **kwargs) | |
5756 | ||
5757 | def CaptureMouse(*args, **kwargs): | |
5758 | """CaptureMouse()""" | |
5759 | return _core.Window_CaptureMouse(*args, **kwargs) | |
5760 | ||
5761 | def ReleaseMouse(*args, **kwargs): | |
5762 | """ReleaseMouse()""" | |
5763 | return _core.Window_ReleaseMouse(*args, **kwargs) | |
5764 | ||
5765 | def GetCapture(*args, **kwargs): | |
5766 | """Window.GetCapture() -> Window""" | |
5767 | return _core.Window_GetCapture(*args, **kwargs) | |
5768 | ||
5769 | GetCapture = staticmethod(GetCapture) | |
5770 | def HasCapture(*args, **kwargs): | |
5771 | """HasCapture() -> bool""" | |
5772 | return _core.Window_HasCapture(*args, **kwargs) | |
5773 | ||
5774 | def Refresh(*args, **kwargs): | |
5775 | """Refresh(bool eraseBackground=True, Rect rect=None)""" | |
5776 | return _core.Window_Refresh(*args, **kwargs) | |
5777 | ||
5778 | def RefreshRect(*args, **kwargs): | |
5779 | """RefreshRect(Rect rect)""" | |
5780 | return _core.Window_RefreshRect(*args, **kwargs) | |
5781 | ||
5782 | def Update(*args, **kwargs): | |
5783 | """Update()""" | |
5784 | return _core.Window_Update(*args, **kwargs) | |
5785 | ||
5786 | def ClearBackground(*args, **kwargs): | |
5787 | """ClearBackground()""" | |
5788 | return _core.Window_ClearBackground(*args, **kwargs) | |
5789 | ||
5790 | def Freeze(*args, **kwargs): | |
5791 | """Freeze()""" | |
5792 | return _core.Window_Freeze(*args, **kwargs) | |
5793 | ||
5794 | def Thaw(*args, **kwargs): | |
5795 | """Thaw()""" | |
5796 | return _core.Window_Thaw(*args, **kwargs) | |
5797 | ||
5798 | def PrepareDC(*args, **kwargs): | |
5799 | """PrepareDC(wxDC dc)""" | |
5800 | return _core.Window_PrepareDC(*args, **kwargs) | |
5801 | ||
5802 | def GetUpdateRegion(*args, **kwargs): | |
5803 | """GetUpdateRegion() -> wxRegion""" | |
5804 | return _core.Window_GetUpdateRegion(*args, **kwargs) | |
5805 | ||
5806 | def GetUpdateClientRect(*args, **kwargs): | |
5807 | """GetUpdateClientRect() -> Rect""" | |
5808 | return _core.Window_GetUpdateClientRect(*args, **kwargs) | |
5809 | ||
5810 | def IsExposed(*args, **kwargs): | |
5811 | """IsExposed(int x, int y, int w=1, int h=1) -> bool""" | |
5812 | return _core.Window_IsExposed(*args, **kwargs) | |
5813 | ||
5814 | def IsExposedPoint(*args, **kwargs): | |
5815 | """IsExposedPoint(Point pt) -> bool""" | |
5816 | return _core.Window_IsExposedPoint(*args, **kwargs) | |
5817 | ||
5818 | def isExposedRect(*args, **kwargs): | |
5819 | """isExposedRect(Rect rect) -> bool""" | |
5820 | return _core.Window_isExposedRect(*args, **kwargs) | |
5821 | ||
5822 | def SetBackgroundColour(*args, **kwargs): | |
5823 | """SetBackgroundColour(wxColour colour) -> bool""" | |
5824 | return _core.Window_SetBackgroundColour(*args, **kwargs) | |
5825 | ||
5826 | def SetForegroundColour(*args, **kwargs): | |
5827 | """SetForegroundColour(wxColour colour) -> bool""" | |
5828 | return _core.Window_SetForegroundColour(*args, **kwargs) | |
5829 | ||
5830 | def GetBackgroundColour(*args, **kwargs): | |
5831 | """GetBackgroundColour() -> wxColour""" | |
5832 | return _core.Window_GetBackgroundColour(*args, **kwargs) | |
5833 | ||
5834 | def GetForegroundColour(*args, **kwargs): | |
5835 | """GetForegroundColour() -> wxColour""" | |
5836 | return _core.Window_GetForegroundColour(*args, **kwargs) | |
5837 | ||
5838 | def SetCursor(*args, **kwargs): | |
5839 | """SetCursor(wxCursor cursor) -> bool""" | |
5840 | return _core.Window_SetCursor(*args, **kwargs) | |
5841 | ||
5842 | def GetCursor(*args, **kwargs): | |
5843 | """GetCursor() -> wxCursor""" | |
5844 | return _core.Window_GetCursor(*args, **kwargs) | |
5845 | ||
5846 | def SetFont(*args, **kwargs): | |
5847 | """SetFont(wxFont font) -> bool""" | |
5848 | return _core.Window_SetFont(*args, **kwargs) | |
5849 | ||
5850 | def GetFont(*args, **kwargs): | |
5851 | """GetFont() -> wxFont""" | |
5852 | return _core.Window_GetFont(*args, **kwargs) | |
5853 | ||
5854 | def SetCaret(*args, **kwargs): | |
5855 | """SetCaret(wxCaret caret)""" | |
5856 | return _core.Window_SetCaret(*args, **kwargs) | |
5857 | ||
5858 | def GetCaret(*args, **kwargs): | |
5859 | """GetCaret() -> wxCaret""" | |
5860 | return _core.Window_GetCaret(*args, **kwargs) | |
5861 | ||
5862 | def GetCharHeight(*args, **kwargs): | |
5863 | """GetCharHeight() -> int""" | |
5864 | return _core.Window_GetCharHeight(*args, **kwargs) | |
5865 | ||
5866 | def GetCharWidth(*args, **kwargs): | |
5867 | """GetCharWidth() -> int""" | |
5868 | return _core.Window_GetCharWidth(*args, **kwargs) | |
5869 | ||
5870 | def GetTextExtent(*args, **kwargs): | |
0df68c9f RD |
5871 | """ |
5872 | GetTextExtent(wxString string) -> (width, height) | |
e811c8ce | 5873 | |
0df68c9f RD |
5874 | Get the width and height of the text using the current font. |
5875 | """ | |
e811c8ce RD |
5876 | return _core.Window_GetTextExtent(*args, **kwargs) |
5877 | ||
5878 | def GetFullTextExtent(*args, **kwargs): | |
0df68c9f RD |
5879 | """ |
5880 | GetFullTextExtent(wxString string, Font font=None) -> | |
5881 | (width, height, descent, externalLeading) | |
e811c8ce | 5882 | |
0df68c9f RD |
5883 | Get the width, height, decent and leading of the text using the current or specified font. |
5884 | """ | |
e811c8ce RD |
5885 | return _core.Window_GetFullTextExtent(*args, **kwargs) |
5886 | ||
5887 | def ClientToScreenXY(*args, **kwargs): | |
5888 | """ClientToScreenXY(int x, int y)""" | |
5889 | return _core.Window_ClientToScreenXY(*args, **kwargs) | |
5890 | ||
5891 | def ScreenToClientXY(*args, **kwargs): | |
5892 | """ScreenToClientXY(int x, int y)""" | |
5893 | return _core.Window_ScreenToClientXY(*args, **kwargs) | |
5894 | ||
5895 | def ClientToScreen(*args, **kwargs): | |
5896 | """ClientToScreen(Point pt) -> Point""" | |
5897 | return _core.Window_ClientToScreen(*args, **kwargs) | |
5898 | ||
5899 | def ScreenToClient(*args, **kwargs): | |
5900 | """ScreenToClient(Point pt) -> Point""" | |
5901 | return _core.Window_ScreenToClient(*args, **kwargs) | |
5902 | ||
5903 | def HitTestXY(*args, **kwargs): | |
5904 | """HitTestXY(int x, int y) -> wxHitTest""" | |
5905 | return _core.Window_HitTestXY(*args, **kwargs) | |
5906 | ||
5907 | def HitTest(*args, **kwargs): | |
5908 | """HitTest(Point pt) -> wxHitTest""" | |
5909 | return _core.Window_HitTest(*args, **kwargs) | |
5910 | ||
5911 | def GetBorderFlags(*args, **kwargs): | |
5912 | """GetBorderFlags(long flags) -> wxBorder""" | |
5913 | return _core.Window_GetBorderFlags(*args, **kwargs) | |
5914 | ||
5915 | def GetBorder(*args, **kwargs): | |
5916 | """GetBorder() -> wxBorder""" | |
5917 | return _core.Window_GetBorder(*args, **kwargs) | |
5918 | ||
5919 | def UpdateWindowUI(*args, **kwargs): | |
5920 | """UpdateWindowUI(long flags=UPDATE_UI_NONE)""" | |
5921 | return _core.Window_UpdateWindowUI(*args, **kwargs) | |
5922 | ||
5923 | def PopupMenuXY(*args, **kwargs): | |
5924 | """PopupMenuXY(Menu menu, int x, int y) -> bool""" | |
5925 | return _core.Window_PopupMenuXY(*args, **kwargs) | |
5926 | ||
5927 | def PopupMenu(*args, **kwargs): | |
5928 | """PopupMenu(Menu menu, Point pos) -> bool""" | |
5929 | return _core.Window_PopupMenu(*args, **kwargs) | |
5930 | ||
5931 | def GetHandle(*args, **kwargs): | |
5932 | """GetHandle() -> long""" | |
5933 | return _core.Window_GetHandle(*args, **kwargs) | |
5934 | ||
5935 | def HasScrollbar(*args, **kwargs): | |
5936 | """HasScrollbar(int orient) -> bool""" | |
5937 | return _core.Window_HasScrollbar(*args, **kwargs) | |
5938 | ||
5939 | def SetScrollbar(*args, **kwargs): | |
5940 | """SetScrollbar(int orient, int pos, int thumbvisible, int range, bool refresh=True)""" | |
5941 | return _core.Window_SetScrollbar(*args, **kwargs) | |
5942 | ||
5943 | def SetScrollPos(*args, **kwargs): | |
5944 | """SetScrollPos(int orient, int pos, bool refresh=True)""" | |
5945 | return _core.Window_SetScrollPos(*args, **kwargs) | |
5946 | ||
5947 | def GetScrollPos(*args, **kwargs): | |
5948 | """GetScrollPos(int orient) -> int""" | |
5949 | return _core.Window_GetScrollPos(*args, **kwargs) | |
5950 | ||
5951 | def GetScrollThumb(*args, **kwargs): | |
5952 | """GetScrollThumb(int orient) -> int""" | |
5953 | return _core.Window_GetScrollThumb(*args, **kwargs) | |
5954 | ||
5955 | def GetScrollRange(*args, **kwargs): | |
5956 | """GetScrollRange(int orient) -> int""" | |
5957 | return _core.Window_GetScrollRange(*args, **kwargs) | |
5958 | ||
5959 | def ScrollWindow(*args, **kwargs): | |
5960 | """ScrollWindow(int dx, int dy, Rect rect=None)""" | |
5961 | return _core.Window_ScrollWindow(*args, **kwargs) | |
5962 | ||
5963 | def ScrollLines(*args, **kwargs): | |
5964 | """ScrollLines(int lines) -> bool""" | |
5965 | return _core.Window_ScrollLines(*args, **kwargs) | |
5966 | ||
5967 | def ScrollPages(*args, **kwargs): | |
5968 | """ScrollPages(int pages) -> bool""" | |
5969 | return _core.Window_ScrollPages(*args, **kwargs) | |
5970 | ||
5971 | def LineUp(*args, **kwargs): | |
5972 | """LineUp() -> bool""" | |
5973 | return _core.Window_LineUp(*args, **kwargs) | |
5974 | ||
5975 | def LineDown(*args, **kwargs): | |
5976 | """LineDown() -> bool""" | |
5977 | return _core.Window_LineDown(*args, **kwargs) | |
5978 | ||
5979 | def PageUp(*args, **kwargs): | |
5980 | """PageUp() -> bool""" | |
5981 | return _core.Window_PageUp(*args, **kwargs) | |
5982 | ||
5983 | def PageDown(*args, **kwargs): | |
5984 | """PageDown() -> bool""" | |
5985 | return _core.Window_PageDown(*args, **kwargs) | |
5986 | ||
5987 | def SetHelpText(*args, **kwargs): | |
5988 | """SetHelpText(wxString text)""" | |
5989 | return _core.Window_SetHelpText(*args, **kwargs) | |
5990 | ||
5991 | def SetHelpTextForId(*args, **kwargs): | |
5992 | """SetHelpTextForId(wxString text)""" | |
5993 | return _core.Window_SetHelpTextForId(*args, **kwargs) | |
5994 | ||
5995 | def GetHelpText(*args, **kwargs): | |
5996 | """GetHelpText() -> wxString""" | |
5997 | return _core.Window_GetHelpText(*args, **kwargs) | |
5998 | ||
5999 | def SetToolTipString(*args, **kwargs): | |
6000 | """SetToolTipString(wxString tip)""" | |
6001 | return _core.Window_SetToolTipString(*args, **kwargs) | |
6002 | ||
6003 | def SetToolTip(*args, **kwargs): | |
6004 | """SetToolTip(wxToolTip tip)""" | |
6005 | return _core.Window_SetToolTip(*args, **kwargs) | |
6006 | ||
6007 | def GetToolTip(*args, **kwargs): | |
6008 | """GetToolTip() -> wxToolTip""" | |
6009 | return _core.Window_GetToolTip(*args, **kwargs) | |
6010 | ||
6011 | def SetDropTarget(*args, **kwargs): | |
7722248d | 6012 | """SetDropTarget(wxPyDropTarget dropTarget)""" |
e811c8ce RD |
6013 | val = _core.Window_SetDropTarget(*args, **kwargs) |
6014 | args[1].thisown = 0 | |
6015 | return val | |
6016 | ||
6017 | def GetDropTarget(*args, **kwargs): | |
7722248d | 6018 | """GetDropTarget() -> wxPyDropTarget""" |
e811c8ce RD |
6019 | return _core.Window_GetDropTarget(*args, **kwargs) |
6020 | ||
6021 | def SetConstraints(*args, **kwargs): | |
6022 | """SetConstraints(LayoutConstraints constraints)""" | |
6023 | return _core.Window_SetConstraints(*args, **kwargs) | |
6024 | ||
6025 | def GetConstraints(*args, **kwargs): | |
6026 | """GetConstraints() -> LayoutConstraints""" | |
6027 | return _core.Window_GetConstraints(*args, **kwargs) | |
6028 | ||
6029 | def SetAutoLayout(*args, **kwargs): | |
6030 | """SetAutoLayout(bool autoLayout)""" | |
6031 | return _core.Window_SetAutoLayout(*args, **kwargs) | |
6032 | ||
6033 | def GetAutoLayout(*args, **kwargs): | |
6034 | """GetAutoLayout() -> bool""" | |
6035 | return _core.Window_GetAutoLayout(*args, **kwargs) | |
6036 | ||
6037 | def Layout(*args, **kwargs): | |
6038 | """Layout() -> bool""" | |
6039 | return _core.Window_Layout(*args, **kwargs) | |
6040 | ||
6041 | def SetSizer(*args, **kwargs): | |
6042 | """SetSizer(Sizer sizer, bool deleteOld=True)""" | |
6043 | return _core.Window_SetSizer(*args, **kwargs) | |
6044 | ||
6045 | def SetSizerAndFit(*args, **kwargs): | |
6046 | """SetSizerAndFit(Sizer sizer, bool deleteOld=True)""" | |
6047 | return _core.Window_SetSizerAndFit(*args, **kwargs) | |
6048 | ||
6049 | def GetSizer(*args, **kwargs): | |
6050 | """GetSizer() -> Sizer""" | |
6051 | return _core.Window_GetSizer(*args, **kwargs) | |
6052 | ||
6053 | def SetContainingSizer(*args, **kwargs): | |
6054 | """SetContainingSizer(Sizer sizer)""" | |
6055 | return _core.Window_SetContainingSizer(*args, **kwargs) | |
6056 | ||
6057 | def GetContainingSizer(*args, **kwargs): | |
6058 | """GetContainingSizer() -> Sizer""" | |
6059 | return _core.Window_GetContainingSizer(*args, **kwargs) | |
6060 | ||
6061 | def PostCreate(self, pre): | |
6062 | """Phase 3 of the 2-phase create <wink!> | |
6063 | Call this method after precreating the window with the 2-phase create method.""" | |
6064 | self.this = pre.this | |
6065 | self.thisown = pre.thisown | |
6066 | pre.thisown = 0 | |
6067 | if hasattr(self, '_setOORInfo'): | |
6068 | self._setOORInfo(self) | |
6069 | if hasattr(self, '_setCallbackInfo'): | |
6070 | self._setCallbackInfo(self, self.__class__) | |
6071 | ||
6072 | ||
6073 | class WindowPtr(Window): | |
6074 | def __init__(self, this): | |
6075 | self.this = this | |
6076 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6077 | self.__class__ = Window | |
6078 | _core.Window_swigregister(WindowPtr) | |
1e0c8722 | 6079 | NullAcceleratorTable = cvar.NullAcceleratorTable |
e811c8ce RD |
6080 | PanelNameStr = cvar.PanelNameStr |
6081 | ||
6082 | def PreWindow(*args, **kwargs): | |
6083 | """PreWindow() -> Window""" | |
6084 | val = _core.new_PreWindow(*args, **kwargs) | |
6085 | val.thisown = 1 | |
6086 | return val | |
6087 | ||
6088 | def Window_NewControlId(*args, **kwargs): | |
6089 | """Window_NewControlId() -> int""" | |
6090 | return _core.Window_NewControlId(*args, **kwargs) | |
6091 | ||
6092 | def Window_NextControlId(*args, **kwargs): | |
6093 | """Window_NextControlId(int winid) -> int""" | |
6094 | return _core.Window_NextControlId(*args, **kwargs) | |
6095 | ||
6096 | def Window_PrevControlId(*args, **kwargs): | |
6097 | """Window_PrevControlId(int winid) -> int""" | |
6098 | return _core.Window_PrevControlId(*args, **kwargs) | |
6099 | ||
6100 | def Window_FindFocus(*args, **kwargs): | |
6101 | """Window_FindFocus() -> Window""" | |
6102 | return _core.Window_FindFocus(*args, **kwargs) | |
6103 | ||
6104 | def Window_GetCapture(*args, **kwargs): | |
6105 | """Window_GetCapture() -> Window""" | |
6106 | return _core.Window_GetCapture(*args, **kwargs) | |
6107 | ||
6108 | def DLG_PNT(win, point_or_x, y=None): | |
6109 | if y is None: | |
6110 | return win.ConvertDialogPointToPixels(point_or_x) | |
6111 | else: | |
fd3f2efe | 6112 | return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y)) |
e811c8ce RD |
6113 | |
6114 | def DLG_SZE(win, size_width, height=None): | |
6115 | if height is None: | |
6116 | return win.ConvertDialogSizeToPixels(size_width) | |
6117 | else: | |
fd3f2efe | 6118 | return win.ConvertDialogSizeToPixels(wx.Size(size_width, height)) |
e811c8ce RD |
6119 | |
6120 | ||
6121 | def FindWindowById(*args, **kwargs): | |
6122 | """FindWindowById(long id, Window parent=None) -> Window""" | |
6123 | return _core.FindWindowById(*args, **kwargs) | |
6124 | ||
6125 | def FindWindowByName(*args, **kwargs): | |
6126 | """FindWindowByName(wxString name, Window parent=None) -> Window""" | |
6127 | return _core.FindWindowByName(*args, **kwargs) | |
6128 | ||
6129 | def FindWindowByLabel(*args, **kwargs): | |
6130 | """FindWindowByLabel(wxString label, Window parent=None) -> Window""" | |
6131 | return _core.FindWindowByLabel(*args, **kwargs) | |
6132 | ||
6133 | def Window_FromHWND(*args, **kwargs): | |
6134 | """Window_FromHWND(unsigned long hWnd) -> Window""" | |
6135 | return _core.Window_FromHWND(*args, **kwargs) | |
6136 | #--------------------------------------------------------------------------- | |
6137 | ||
6138 | class Validator(EvtHandler): | |
e811c8ce RD |
6139 | def __repr__(self): |
6140 | return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
6141 | def __init__(self, *args, **kwargs): | |
6142 | """__init__() -> Validator""" | |
6143 | newobj = _core.new_Validator(*args, **kwargs) | |
d14a1e28 RD |
6144 | self.this = newobj.this |
6145 | self.thisown = 1 | |
6146 | del newobj.thisown | |
6147 | self._setOORInfo(self) | |
e811c8ce RD |
6148 | |
6149 | def Clone(*args, **kwargs): | |
6150 | """Clone() -> Validator""" | |
6151 | return _core.Validator_Clone(*args, **kwargs) | |
6152 | ||
6153 | def Validate(*args, **kwargs): | |
6154 | """Validate(Window parent) -> bool""" | |
6155 | return _core.Validator_Validate(*args, **kwargs) | |
6156 | ||
6157 | def TransferToWindow(*args, **kwargs): | |
6158 | """TransferToWindow() -> bool""" | |
6159 | return _core.Validator_TransferToWindow(*args, **kwargs) | |
6160 | ||
6161 | def TransferFromWindow(*args, **kwargs): | |
6162 | """TransferFromWindow() -> bool""" | |
6163 | return _core.Validator_TransferFromWindow(*args, **kwargs) | |
6164 | ||
6165 | def GetWindow(*args, **kwargs): | |
6166 | """GetWindow() -> Window""" | |
6167 | return _core.Validator_GetWindow(*args, **kwargs) | |
6168 | ||
6169 | def SetWindow(*args, **kwargs): | |
6170 | """SetWindow(Window window)""" | |
6171 | return _core.Validator_SetWindow(*args, **kwargs) | |
6172 | ||
6173 | def IsSilent(*args, **kwargs): | |
6174 | """Validator.IsSilent() -> bool""" | |
6175 | return _core.Validator_IsSilent(*args, **kwargs) | |
6176 | ||
6177 | IsSilent = staticmethod(IsSilent) | |
6178 | def SetBellOnError(*args, **kwargs): | |
6179 | """Validator.SetBellOnError(int doIt=True)""" | |
6180 | return _core.Validator_SetBellOnError(*args, **kwargs) | |
6181 | ||
6182 | SetBellOnError = staticmethod(SetBellOnError) | |
6183 | ||
6184 | class ValidatorPtr(Validator): | |
6185 | def __init__(self, this): | |
6186 | self.this = this | |
6187 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6188 | self.__class__ = Validator | |
6189 | _core.Validator_swigregister(ValidatorPtr) | |
6190 | ||
6191 | def Validator_IsSilent(*args, **kwargs): | |
6192 | """Validator_IsSilent() -> bool""" | |
6193 | return _core.Validator_IsSilent(*args, **kwargs) | |
6194 | ||
6195 | def Validator_SetBellOnError(*args, **kwargs): | |
6196 | """Validator_SetBellOnError(int doIt=True)""" | |
6197 | return _core.Validator_SetBellOnError(*args, **kwargs) | |
6198 | ||
6199 | class PyValidator(Validator): | |
e811c8ce RD |
6200 | def __repr__(self): |
6201 | return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
6202 | def __init__(self, *args, **kwargs): | |
6203 | """__init__() -> PyValidator""" | |
6204 | newobj = _core.new_PyValidator(*args, **kwargs) | |
6205 | self.this = newobj.this | |
6206 | self.thisown = 1 | |
6207 | del newobj.thisown | |
6208 | ||
6209 | self._setCallbackInfo(self, PyValidator, 1) | |
6210 | self._setOORInfo(self) | |
6211 | ||
6212 | def _setCallbackInfo(*args, **kwargs): | |
6213 | """_setCallbackInfo(PyObject self, PyObject _class, int incref=True)""" | |
6214 | return _core.PyValidator__setCallbackInfo(*args, **kwargs) | |
6215 | ||
6216 | ||
6217 | class PyValidatorPtr(PyValidator): | |
6218 | def __init__(self, this): | |
6219 | self.this = this | |
6220 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6221 | self.__class__ = PyValidator | |
6222 | _core.PyValidator_swigregister(PyValidatorPtr) | |
6223 | ||
6224 | #--------------------------------------------------------------------------- | |
6225 | ||
6226 | class Menu(EvtHandler): | |
d14a1e28 RD |
6227 | def __repr__(self): |
6228 | return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
6229 | def __init__(self, *args, **kwargs): |
6230 | """__init__(wxString title=wxPyEmptyString, long style=0) -> Menu""" | |
6231 | newobj = _core.new_Menu(*args, **kwargs) | |
6232 | self.this = newobj.this | |
6233 | self.thisown = 1 | |
6234 | del newobj.thisown | |
6235 | self._setOORInfo(self) | |
6236 | ||
6237 | def Append(*args, **kwargs): | |
0df68c9f | 6238 | """ |
242b7b46 | 6239 | Append(int id, wxString text, wxString help=wxPyEmptyString, |
0df68c9f RD |
6240 | wxItemKind kind=ITEM_NORMAL) |
6241 | """ | |
e811c8ce RD |
6242 | return _core.Menu_Append(*args, **kwargs) |
6243 | ||
6244 | def AppendSeparator(*args, **kwargs): | |
6245 | """AppendSeparator()""" | |
6246 | return _core.Menu_AppendSeparator(*args, **kwargs) | |
6247 | ||
6248 | def AppendCheckItem(*args, **kwargs): | |
242b7b46 | 6249 | """AppendCheckItem(int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6250 | return _core.Menu_AppendCheckItem(*args, **kwargs) |
6251 | ||
6252 | def AppendRadioItem(*args, **kwargs): | |
242b7b46 | 6253 | """AppendRadioItem(int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6254 | return _core.Menu_AppendRadioItem(*args, **kwargs) |
6255 | ||
6256 | def AppendMenu(*args, **kwargs): | |
242b7b46 | 6257 | """AppendMenu(int id, wxString text, Menu submenu, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6258 | return _core.Menu_AppendMenu(*args, **kwargs) |
6259 | ||
6260 | def AppendItem(*args, **kwargs): | |
6261 | """AppendItem(MenuItem item)""" | |
6262 | return _core.Menu_AppendItem(*args, **kwargs) | |
6263 | ||
6264 | def Break(*args, **kwargs): | |
6265 | """Break()""" | |
6266 | return _core.Menu_Break(*args, **kwargs) | |
6267 | ||
6268 | def InsertItem(*args, **kwargs): | |
6269 | """InsertItem(size_t pos, MenuItem item) -> bool""" | |
6270 | return _core.Menu_InsertItem(*args, **kwargs) | |
6271 | ||
6272 | def Insert(*args, **kwargs): | |
0df68c9f | 6273 | """ |
242b7b46 | 6274 | Insert(size_t pos, int id, wxString text, wxString help=wxPyEmptyString, |
0df68c9f RD |
6275 | wxItemKind kind=ITEM_NORMAL) |
6276 | """ | |
e811c8ce RD |
6277 | return _core.Menu_Insert(*args, **kwargs) |
6278 | ||
6279 | def InsertSeparator(*args, **kwargs): | |
6280 | """InsertSeparator(size_t pos)""" | |
6281 | return _core.Menu_InsertSeparator(*args, **kwargs) | |
6282 | ||
6283 | def InsertCheckItem(*args, **kwargs): | |
242b7b46 | 6284 | """InsertCheckItem(size_t pos, int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6285 | return _core.Menu_InsertCheckItem(*args, **kwargs) |
6286 | ||
6287 | def InsertRadioItem(*args, **kwargs): | |
242b7b46 | 6288 | """InsertRadioItem(size_t pos, int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6289 | return _core.Menu_InsertRadioItem(*args, **kwargs) |
6290 | ||
6291 | def InsertMenu(*args, **kwargs): | |
242b7b46 | 6292 | """InsertMenu(size_t pos, int id, wxString text, Menu submenu, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6293 | return _core.Menu_InsertMenu(*args, **kwargs) |
6294 | ||
6295 | def PrependItem(*args, **kwargs): | |
6296 | """PrependItem(MenuItem item)""" | |
6297 | return _core.Menu_PrependItem(*args, **kwargs) | |
6298 | ||
6299 | def Prepend(*args, **kwargs): | |
0df68c9f | 6300 | """ |
242b7b46 | 6301 | Prepend(int id, wxString text, wxString help=wxPyEmptyString, |
0df68c9f RD |
6302 | wxItemKind kind=ITEM_NORMAL) |
6303 | """ | |
e811c8ce RD |
6304 | return _core.Menu_Prepend(*args, **kwargs) |
6305 | ||
6306 | def PrependSeparator(*args, **kwargs): | |
6307 | """PrependSeparator()""" | |
6308 | return _core.Menu_PrependSeparator(*args, **kwargs) | |
6309 | ||
6310 | def PrependCheckItem(*args, **kwargs): | |
242b7b46 | 6311 | """PrependCheckItem(int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6312 | return _core.Menu_PrependCheckItem(*args, **kwargs) |
6313 | ||
6314 | def PrependRadioItem(*args, **kwargs): | |
242b7b46 | 6315 | """PrependRadioItem(int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6316 | return _core.Menu_PrependRadioItem(*args, **kwargs) |
6317 | ||
6318 | def PrependMenu(*args, **kwargs): | |
242b7b46 | 6319 | """PrependMenu(int id, wxString text, Menu submenu, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6320 | return _core.Menu_PrependMenu(*args, **kwargs) |
6321 | ||
6322 | def Remove(*args, **kwargs): | |
242b7b46 | 6323 | """Remove(int id) -> MenuItem""" |
e811c8ce RD |
6324 | return _core.Menu_Remove(*args, **kwargs) |
6325 | ||
6326 | def RemoveItem(*args, **kwargs): | |
6327 | """RemoveItem(MenuItem item) -> MenuItem""" | |
6328 | return _core.Menu_RemoveItem(*args, **kwargs) | |
6329 | ||
6330 | def Delete(*args, **kwargs): | |
242b7b46 | 6331 | """Delete(int id) -> bool""" |
e811c8ce RD |
6332 | return _core.Menu_Delete(*args, **kwargs) |
6333 | ||
6334 | def DeleteItem(*args, **kwargs): | |
6335 | """DeleteItem(MenuItem item) -> bool""" | |
6336 | return _core.Menu_DeleteItem(*args, **kwargs) | |
6337 | ||
6338 | def Destroy(*args, **kwargs): | |
0df68c9f RD |
6339 | """ |
6340 | Destroy() | |
e811c8ce | 6341 | |
0df68c9f RD |
6342 | Deletes the C++ object this Python object is a proxy for. |
6343 | """ | |
e811c8ce RD |
6344 | return _core.Menu_Destroy(*args, **kwargs) |
6345 | ||
6346 | def DestroyId(*args, **kwargs): | |
0df68c9f | 6347 | """ |
242b7b46 | 6348 | DestroyId(int id) -> bool |
e811c8ce | 6349 | |
0df68c9f RD |
6350 | Deletes the C++ object this Python object is a proxy for. |
6351 | """ | |
e811c8ce RD |
6352 | return _core.Menu_DestroyId(*args, **kwargs) |
6353 | ||
6354 | def DestroyItem(*args, **kwargs): | |
0df68c9f RD |
6355 | """ |
6356 | DestroyItem(MenuItem item) -> bool | |
e811c8ce | 6357 | |
0df68c9f RD |
6358 | Deletes the C++ object this Python object is a proxy for. |
6359 | """ | |
e811c8ce RD |
6360 | return _core.Menu_DestroyItem(*args, **kwargs) |
6361 | ||
6362 | def GetMenuItemCount(*args, **kwargs): | |
6363 | """GetMenuItemCount() -> size_t""" | |
6364 | return _core.Menu_GetMenuItemCount(*args, **kwargs) | |
6365 | ||
6366 | def GetMenuItems(*args, **kwargs): | |
6367 | """GetMenuItems() -> PyObject""" | |
6368 | return _core.Menu_GetMenuItems(*args, **kwargs) | |
6369 | ||
6370 | def FindItem(*args, **kwargs): | |
6371 | """FindItem(wxString item) -> int""" | |
6372 | return _core.Menu_FindItem(*args, **kwargs) | |
6373 | ||
6374 | def FindItemById(*args, **kwargs): | |
242b7b46 | 6375 | """FindItemById(int id) -> MenuItem""" |
e811c8ce RD |
6376 | return _core.Menu_FindItemById(*args, **kwargs) |
6377 | ||
6378 | def FindItemByPosition(*args, **kwargs): | |
6379 | """FindItemByPosition(size_t position) -> MenuItem""" | |
6380 | return _core.Menu_FindItemByPosition(*args, **kwargs) | |
6381 | ||
6382 | def Enable(*args, **kwargs): | |
242b7b46 | 6383 | """Enable(int id, bool enable)""" |
e811c8ce RD |
6384 | return _core.Menu_Enable(*args, **kwargs) |
6385 | ||
6386 | def IsEnabled(*args, **kwargs): | |
242b7b46 | 6387 | """IsEnabled(int id) -> bool""" |
e811c8ce RD |
6388 | return _core.Menu_IsEnabled(*args, **kwargs) |
6389 | ||
6390 | def Check(*args, **kwargs): | |
242b7b46 | 6391 | """Check(int id, bool check)""" |
e811c8ce RD |
6392 | return _core.Menu_Check(*args, **kwargs) |
6393 | ||
6394 | def IsChecked(*args, **kwargs): | |
242b7b46 | 6395 | """IsChecked(int id) -> bool""" |
e811c8ce RD |
6396 | return _core.Menu_IsChecked(*args, **kwargs) |
6397 | ||
6398 | def SetLabel(*args, **kwargs): | |
242b7b46 | 6399 | """SetLabel(int id, wxString label)""" |
e811c8ce RD |
6400 | return _core.Menu_SetLabel(*args, **kwargs) |
6401 | ||
6402 | def GetLabel(*args, **kwargs): | |
242b7b46 | 6403 | """GetLabel(int id) -> wxString""" |
e811c8ce RD |
6404 | return _core.Menu_GetLabel(*args, **kwargs) |
6405 | ||
6406 | def SetHelpString(*args, **kwargs): | |
242b7b46 | 6407 | """SetHelpString(int id, wxString helpString)""" |
e811c8ce RD |
6408 | return _core.Menu_SetHelpString(*args, **kwargs) |
6409 | ||
6410 | def GetHelpString(*args, **kwargs): | |
242b7b46 | 6411 | """GetHelpString(int id) -> wxString""" |
e811c8ce RD |
6412 | return _core.Menu_GetHelpString(*args, **kwargs) |
6413 | ||
6414 | def SetTitle(*args, **kwargs): | |
6415 | """SetTitle(wxString title)""" | |
6416 | return _core.Menu_SetTitle(*args, **kwargs) | |
6417 | ||
6418 | def GetTitle(*args, **kwargs): | |
6419 | """GetTitle() -> wxString""" | |
6420 | return _core.Menu_GetTitle(*args, **kwargs) | |
6421 | ||
6422 | def SetEventHandler(*args, **kwargs): | |
6423 | """SetEventHandler(EvtHandler handler)""" | |
6424 | return _core.Menu_SetEventHandler(*args, **kwargs) | |
6425 | ||
6426 | def GetEventHandler(*args, **kwargs): | |
6427 | """GetEventHandler() -> EvtHandler""" | |
6428 | return _core.Menu_GetEventHandler(*args, **kwargs) | |
6429 | ||
6430 | def SetInvokingWindow(*args, **kwargs): | |
6431 | """SetInvokingWindow(Window win)""" | |
6432 | return _core.Menu_SetInvokingWindow(*args, **kwargs) | |
6433 | ||
6434 | def GetInvokingWindow(*args, **kwargs): | |
6435 | """GetInvokingWindow() -> Window""" | |
6436 | return _core.Menu_GetInvokingWindow(*args, **kwargs) | |
6437 | ||
6438 | def GetStyle(*args, **kwargs): | |
6439 | """GetStyle() -> long""" | |
6440 | return _core.Menu_GetStyle(*args, **kwargs) | |
6441 | ||
6442 | def UpdateUI(*args, **kwargs): | |
6443 | """UpdateUI(EvtHandler source=None)""" | |
6444 | return _core.Menu_UpdateUI(*args, **kwargs) | |
6445 | ||
6446 | def GetMenuBar(*args, **kwargs): | |
6447 | """GetMenuBar() -> MenuBar""" | |
6448 | return _core.Menu_GetMenuBar(*args, **kwargs) | |
6449 | ||
6450 | def Attach(*args, **kwargs): | |
6451 | """Attach(wxMenuBarBase menubar)""" | |
6452 | return _core.Menu_Attach(*args, **kwargs) | |
6453 | ||
6454 | def Detach(*args, **kwargs): | |
6455 | """Detach()""" | |
6456 | return _core.Menu_Detach(*args, **kwargs) | |
6457 | ||
6458 | def IsAttached(*args, **kwargs): | |
6459 | """IsAttached() -> bool""" | |
6460 | return _core.Menu_IsAttached(*args, **kwargs) | |
6461 | ||
6462 | def SetParent(*args, **kwargs): | |
6463 | """SetParent(Menu parent)""" | |
6464 | return _core.Menu_SetParent(*args, **kwargs) | |
6465 | ||
6466 | def GetParent(*args, **kwargs): | |
6467 | """GetParent() -> Menu""" | |
6468 | return _core.Menu_GetParent(*args, **kwargs) | |
6469 | ||
d14a1e28 RD |
6470 | |
6471 | class MenuPtr(Menu): | |
6472 | def __init__(self, this): | |
6473 | self.this = this | |
6474 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6475 | self.__class__ = Menu | |
6476 | _core.Menu_swigregister(MenuPtr) | |
6477 | DefaultValidator = cvar.DefaultValidator | |
6478 | ||
6479 | #--------------------------------------------------------------------------- | |
6480 | ||
6481 | class MenuBar(Window): | |
e811c8ce RD |
6482 | def __repr__(self): |
6483 | return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 6484 | def __init__(self, *args, **kwargs): |
e811c8ce | 6485 | """__init__(long style=0) -> MenuBar""" |
d14a1e28 RD |
6486 | newobj = _core.new_MenuBar(*args, **kwargs) |
6487 | self.this = newobj.this | |
6488 | self.thisown = 1 | |
6489 | del newobj.thisown | |
6490 | self._setOORInfo(self) | |
e811c8ce RD |
6491 | |
6492 | def Append(*args, **kwargs): | |
6493 | """Append(Menu menu, wxString title) -> bool""" | |
6494 | return _core.MenuBar_Append(*args, **kwargs) | |
6495 | ||
6496 | def Insert(*args, **kwargs): | |
6497 | """Insert(size_t pos, Menu menu, wxString title) -> bool""" | |
6498 | return _core.MenuBar_Insert(*args, **kwargs) | |
6499 | ||
6500 | def GetMenuCount(*args, **kwargs): | |
6501 | """GetMenuCount() -> size_t""" | |
6502 | return _core.MenuBar_GetMenuCount(*args, **kwargs) | |
6503 | ||
6504 | def GetMenu(*args, **kwargs): | |
6505 | """GetMenu(size_t pos) -> Menu""" | |
6506 | return _core.MenuBar_GetMenu(*args, **kwargs) | |
6507 | ||
6508 | def Replace(*args, **kwargs): | |
6509 | """Replace(size_t pos, Menu menu, wxString title) -> Menu""" | |
6510 | return _core.MenuBar_Replace(*args, **kwargs) | |
6511 | ||
6512 | def Remove(*args, **kwargs): | |
6513 | """Remove(size_t pos) -> Menu""" | |
6514 | return _core.MenuBar_Remove(*args, **kwargs) | |
6515 | ||
6516 | def EnableTop(*args, **kwargs): | |
6517 | """EnableTop(size_t pos, bool enable)""" | |
6518 | return _core.MenuBar_EnableTop(*args, **kwargs) | |
6519 | ||
6520 | def IsEnabledTop(*args, **kwargs): | |
6521 | """IsEnabledTop(size_t pos) -> bool""" | |
6522 | return _core.MenuBar_IsEnabledTop(*args, **kwargs) | |
6523 | ||
6524 | def SetLabelTop(*args, **kwargs): | |
6525 | """SetLabelTop(size_t pos, wxString label)""" | |
6526 | return _core.MenuBar_SetLabelTop(*args, **kwargs) | |
6527 | ||
6528 | def GetLabelTop(*args, **kwargs): | |
6529 | """GetLabelTop(size_t pos) -> wxString""" | |
6530 | return _core.MenuBar_GetLabelTop(*args, **kwargs) | |
6531 | ||
6532 | def FindMenuItem(*args, **kwargs): | |
6533 | """FindMenuItem(wxString menu, wxString item) -> int""" | |
6534 | return _core.MenuBar_FindMenuItem(*args, **kwargs) | |
6535 | ||
6536 | def FindItemById(*args, **kwargs): | |
242b7b46 | 6537 | """FindItemById(int id) -> MenuItem""" |
e811c8ce RD |
6538 | return _core.MenuBar_FindItemById(*args, **kwargs) |
6539 | ||
6540 | def FindMenu(*args, **kwargs): | |
6541 | """FindMenu(wxString title) -> int""" | |
6542 | return _core.MenuBar_FindMenu(*args, **kwargs) | |
6543 | ||
6544 | def Enable(*args, **kwargs): | |
242b7b46 | 6545 | """Enable(int id, bool enable)""" |
e811c8ce RD |
6546 | return _core.MenuBar_Enable(*args, **kwargs) |
6547 | ||
6548 | def Check(*args, **kwargs): | |
242b7b46 | 6549 | """Check(int id, bool check)""" |
e811c8ce RD |
6550 | return _core.MenuBar_Check(*args, **kwargs) |
6551 | ||
6552 | def IsChecked(*args, **kwargs): | |
242b7b46 | 6553 | """IsChecked(int id) -> bool""" |
e811c8ce RD |
6554 | return _core.MenuBar_IsChecked(*args, **kwargs) |
6555 | ||
6556 | def IsEnabled(*args, **kwargs): | |
242b7b46 | 6557 | """IsEnabled(int id) -> bool""" |
e811c8ce RD |
6558 | return _core.MenuBar_IsEnabled(*args, **kwargs) |
6559 | ||
6560 | def SetLabel(*args, **kwargs): | |
242b7b46 | 6561 | """SetLabel(int id, wxString label)""" |
e811c8ce RD |
6562 | return _core.MenuBar_SetLabel(*args, **kwargs) |
6563 | ||
6564 | def GetLabel(*args, **kwargs): | |
242b7b46 | 6565 | """GetLabel(int id) -> wxString""" |
e811c8ce RD |
6566 | return _core.MenuBar_GetLabel(*args, **kwargs) |
6567 | ||
6568 | def SetHelpString(*args, **kwargs): | |
242b7b46 | 6569 | """SetHelpString(int id, wxString helpString)""" |
e811c8ce RD |
6570 | return _core.MenuBar_SetHelpString(*args, **kwargs) |
6571 | ||
6572 | def GetHelpString(*args, **kwargs): | |
242b7b46 | 6573 | """GetHelpString(int id) -> wxString""" |
e811c8ce RD |
6574 | return _core.MenuBar_GetHelpString(*args, **kwargs) |
6575 | ||
6576 | def GetFrame(*args, **kwargs): | |
6577 | """GetFrame() -> wxFrame""" | |
6578 | return _core.MenuBar_GetFrame(*args, **kwargs) | |
6579 | ||
6580 | def IsAttached(*args, **kwargs): | |
6581 | """IsAttached() -> bool""" | |
6582 | return _core.MenuBar_IsAttached(*args, **kwargs) | |
6583 | ||
6584 | def Attach(*args, **kwargs): | |
6585 | """Attach(wxFrame frame)""" | |
6586 | return _core.MenuBar_Attach(*args, **kwargs) | |
6587 | ||
6588 | def Detach(*args, **kwargs): | |
6589 | """Detach()""" | |
6590 | return _core.MenuBar_Detach(*args, **kwargs) | |
6591 | ||
d14a1e28 RD |
6592 | |
6593 | class MenuBarPtr(MenuBar): | |
6594 | def __init__(self, this): | |
6595 | self.this = this | |
6596 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6597 | self.__class__ = MenuBar | |
6598 | _core.MenuBar_swigregister(MenuBarPtr) | |
6599 | ||
6600 | #--------------------------------------------------------------------------- | |
6601 | ||
6602 | class MenuItem(Object): | |
e811c8ce RD |
6603 | def __repr__(self): |
6604 | return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 6605 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
6606 | """ |
6607 | __init__(Menu parentMenu=None, int id=ID_SEPARATOR, wxString text=wxPyEmptyString, | |
6608 | wxString help=wxPyEmptyString, | |
6609 | wxItemKind kind=ITEM_NORMAL, Menu subMenu=None) -> MenuItem | |
6610 | """ | |
d14a1e28 RD |
6611 | newobj = _core.new_MenuItem(*args, **kwargs) |
6612 | self.this = newobj.this | |
6613 | self.thisown = 1 | |
6614 | del newobj.thisown | |
e811c8ce RD |
6615 | def GetMenu(*args, **kwargs): |
6616 | """GetMenu() -> Menu""" | |
6617 | return _core.MenuItem_GetMenu(*args, **kwargs) | |
6618 | ||
6619 | def SetMenu(*args, **kwargs): | |
6620 | """SetMenu(Menu menu)""" | |
6621 | return _core.MenuItem_SetMenu(*args, **kwargs) | |
6622 | ||
6623 | def SetId(*args, **kwargs): | |
242b7b46 | 6624 | """SetId(int id)""" |
e811c8ce RD |
6625 | return _core.MenuItem_SetId(*args, **kwargs) |
6626 | ||
6627 | def GetId(*args, **kwargs): | |
6628 | """GetId() -> int""" | |
6629 | return _core.MenuItem_GetId(*args, **kwargs) | |
6630 | ||
6631 | def IsSeparator(*args, **kwargs): | |
6632 | """IsSeparator() -> bool""" | |
6633 | return _core.MenuItem_IsSeparator(*args, **kwargs) | |
6634 | ||
6635 | def SetText(*args, **kwargs): | |
6636 | """SetText(wxString str)""" | |
6637 | return _core.MenuItem_SetText(*args, **kwargs) | |
6638 | ||
6639 | def GetLabel(*args, **kwargs): | |
6640 | """GetLabel() -> wxString""" | |
6641 | return _core.MenuItem_GetLabel(*args, **kwargs) | |
6642 | ||
6643 | def GetText(*args, **kwargs): | |
6644 | """GetText() -> wxString""" | |
6645 | return _core.MenuItem_GetText(*args, **kwargs) | |
6646 | ||
6647 | def GetLabelFromText(*args, **kwargs): | |
6648 | """MenuItem.GetLabelFromText(wxString text) -> wxString""" | |
6649 | return _core.MenuItem_GetLabelFromText(*args, **kwargs) | |
6650 | ||
6651 | GetLabelFromText = staticmethod(GetLabelFromText) | |
6652 | def GetKind(*args, **kwargs): | |
6653 | """GetKind() -> wxItemKind""" | |
6654 | return _core.MenuItem_GetKind(*args, **kwargs) | |
6655 | ||
6656 | def SetCheckable(*args, **kwargs): | |
6657 | """SetCheckable(bool checkable)""" | |
6658 | return _core.MenuItem_SetCheckable(*args, **kwargs) | |
6659 | ||
6660 | def IsCheckable(*args, **kwargs): | |
6661 | """IsCheckable() -> bool""" | |
6662 | return _core.MenuItem_IsCheckable(*args, **kwargs) | |
6663 | ||
6664 | def IsSubMenu(*args, **kwargs): | |
6665 | """IsSubMenu() -> bool""" | |
6666 | return _core.MenuItem_IsSubMenu(*args, **kwargs) | |
6667 | ||
6668 | def SetSubMenu(*args, **kwargs): | |
6669 | """SetSubMenu(Menu menu)""" | |
6670 | return _core.MenuItem_SetSubMenu(*args, **kwargs) | |
6671 | ||
6672 | def GetSubMenu(*args, **kwargs): | |
6673 | """GetSubMenu() -> Menu""" | |
6674 | return _core.MenuItem_GetSubMenu(*args, **kwargs) | |
6675 | ||
6676 | def Enable(*args, **kwargs): | |
6677 | """Enable(bool enable=True)""" | |
6678 | return _core.MenuItem_Enable(*args, **kwargs) | |
6679 | ||
6680 | def IsEnabled(*args, **kwargs): | |
6681 | """IsEnabled() -> bool""" | |
6682 | return _core.MenuItem_IsEnabled(*args, **kwargs) | |
6683 | ||
6684 | def Check(*args, **kwargs): | |
6685 | """Check(bool check=True)""" | |
6686 | return _core.MenuItem_Check(*args, **kwargs) | |
6687 | ||
6688 | def IsChecked(*args, **kwargs): | |
6689 | """IsChecked() -> bool""" | |
6690 | return _core.MenuItem_IsChecked(*args, **kwargs) | |
6691 | ||
6692 | def Toggle(*args, **kwargs): | |
6693 | """Toggle()""" | |
6694 | return _core.MenuItem_Toggle(*args, **kwargs) | |
6695 | ||
6696 | def SetHelp(*args, **kwargs): | |
6697 | """SetHelp(wxString str)""" | |
6698 | return _core.MenuItem_SetHelp(*args, **kwargs) | |
6699 | ||
6700 | def GetHelp(*args, **kwargs): | |
6701 | """GetHelp() -> wxString""" | |
6702 | return _core.MenuItem_GetHelp(*args, **kwargs) | |
6703 | ||
6704 | def GetAccel(*args, **kwargs): | |
1e0c8722 | 6705 | """GetAccel() -> AcceleratorEntry""" |
e811c8ce RD |
6706 | return _core.MenuItem_GetAccel(*args, **kwargs) |
6707 | ||
6708 | def SetAccel(*args, **kwargs): | |
1e0c8722 | 6709 | """SetAccel(AcceleratorEntry accel)""" |
e811c8ce RD |
6710 | return _core.MenuItem_SetAccel(*args, **kwargs) |
6711 | ||
6712 | def GetDefaultMarginWidth(*args, **kwargs): | |
6713 | """MenuItem.GetDefaultMarginWidth() -> int""" | |
6714 | return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs) | |
6715 | ||
6716 | GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) | |
6717 | def SetBitmap(*args, **kwargs): | |
6718 | """SetBitmap(wxBitmap bitmap)""" | |
6719 | return _core.MenuItem_SetBitmap(*args, **kwargs) | |
6720 | ||
6721 | def GetBitmap(*args, **kwargs): | |
6722 | """GetBitmap() -> wxBitmap""" | |
6723 | return _core.MenuItem_GetBitmap(*args, **kwargs) | |
6724 | ||
d14a1e28 RD |
6725 | |
6726 | class MenuItemPtr(MenuItem): | |
6727 | def __init__(self, this): | |
6728 | self.this = this | |
6729 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6730 | self.__class__ = MenuItem | |
6731 | _core.MenuItem_swigregister(MenuItemPtr) | |
6732 | ||
e811c8ce RD |
6733 | def MenuItem_GetLabelFromText(*args, **kwargs): |
6734 | """MenuItem_GetLabelFromText(wxString text) -> wxString""" | |
6735 | return _core.MenuItem_GetLabelFromText(*args, **kwargs) | |
d14a1e28 | 6736 | |
e811c8ce RD |
6737 | def MenuItem_GetDefaultMarginWidth(*args, **kwargs): |
6738 | """MenuItem_GetDefaultMarginWidth() -> int""" | |
6739 | return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs) | |
d14a1e28 RD |
6740 | |
6741 | #--------------------------------------------------------------------------- | |
6742 | ||
6743 | class Control(Window): | |
e811c8ce RD |
6744 | def __repr__(self): |
6745 | return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 6746 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
6747 | """ |
6748 | __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
6749 | long style=0, Validator validator=DefaultValidator, | |
6750 | wxString name=wxPyControlNameStr) -> Control | |
6751 | """ | |
d14a1e28 RD |
6752 | newobj = _core.new_Control(*args, **kwargs) |
6753 | self.this = newobj.this | |
6754 | self.thisown = 1 | |
6755 | del newobj.thisown | |
6756 | self._setOORInfo(self) | |
e811c8ce RD |
6757 | |
6758 | def Create(*args, **kwargs): | |
0df68c9f RD |
6759 | """ |
6760 | Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
6761 | long style=0, Validator validator=DefaultValidator, | |
6762 | wxString name=wxPyControlNameStr) -> bool | |
6763 | """ | |
e811c8ce RD |
6764 | return _core.Control_Create(*args, **kwargs) |
6765 | ||
6766 | def Command(*args, **kwargs): | |
6767 | """Command(CommandEvent event)""" | |
6768 | return _core.Control_Command(*args, **kwargs) | |
6769 | ||
6770 | def GetLabel(*args, **kwargs): | |
6771 | """GetLabel() -> wxString""" | |
6772 | return _core.Control_GetLabel(*args, **kwargs) | |
6773 | ||
6774 | def SetLabel(*args, **kwargs): | |
6775 | """SetLabel(wxString label)""" | |
6776 | return _core.Control_SetLabel(*args, **kwargs) | |
6777 | ||
d14a1e28 RD |
6778 | |
6779 | class ControlPtr(Control): | |
6780 | def __init__(self, this): | |
6781 | self.this = this | |
6782 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6783 | self.__class__ = Control | |
6784 | _core.Control_swigregister(ControlPtr) | |
6785 | ||
6786 | def PreControl(*args, **kwargs): | |
e811c8ce | 6787 | """PreControl() -> Control""" |
d14a1e28 RD |
6788 | val = _core.new_PreControl(*args, **kwargs) |
6789 | val.thisown = 1 | |
6790 | return val | |
6791 | ||
6792 | #--------------------------------------------------------------------------- | |
6793 | ||
6794 | class ItemContainer(object): | |
d14a1e28 RD |
6795 | def __init__(self): raise RuntimeError, "No constructor defined" |
6796 | def __repr__(self): | |
6797 | return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
6798 | def Append(*args, **kwargs): |
6799 | """Append(wxString item, PyObject clientData=None) -> int""" | |
6800 | return _core.ItemContainer_Append(*args, **kwargs) | |
6801 | ||
6802 | def AppendItems(*args, **kwargs): | |
6803 | """AppendItems(wxArrayString strings)""" | |
6804 | return _core.ItemContainer_AppendItems(*args, **kwargs) | |
6805 | ||
6806 | def Insert(*args, **kwargs): | |
6807 | """Insert(wxString item, int pos, PyObject clientData=None) -> int""" | |
6808 | return _core.ItemContainer_Insert(*args, **kwargs) | |
6809 | ||
6810 | def Clear(*args, **kwargs): | |
6811 | """Clear()""" | |
6812 | return _core.ItemContainer_Clear(*args, **kwargs) | |
6813 | ||
6814 | def Delete(*args, **kwargs): | |
6815 | """Delete(int n)""" | |
6816 | return _core.ItemContainer_Delete(*args, **kwargs) | |
6817 | ||
6818 | def GetCount(*args, **kwargs): | |
6819 | """GetCount() -> int""" | |
6820 | return _core.ItemContainer_GetCount(*args, **kwargs) | |
6821 | ||
6822 | def IsEmpty(*args, **kwargs): | |
6823 | """IsEmpty() -> bool""" | |
6824 | return _core.ItemContainer_IsEmpty(*args, **kwargs) | |
6825 | ||
6826 | def GetString(*args, **kwargs): | |
6827 | """GetString(int n) -> wxString""" | |
6828 | return _core.ItemContainer_GetString(*args, **kwargs) | |
6829 | ||
6830 | def GetStrings(*args, **kwargs): | |
6831 | """GetStrings() -> wxArrayString""" | |
6832 | return _core.ItemContainer_GetStrings(*args, **kwargs) | |
6833 | ||
6834 | def SetString(*args, **kwargs): | |
6835 | """SetString(int n, wxString s)""" | |
6836 | return _core.ItemContainer_SetString(*args, **kwargs) | |
6837 | ||
6838 | def FindString(*args, **kwargs): | |
6839 | """FindString(wxString s) -> int""" | |
6840 | return _core.ItemContainer_FindString(*args, **kwargs) | |
6841 | ||
6842 | def Select(*args, **kwargs): | |
6843 | """Select(int n)""" | |
6844 | return _core.ItemContainer_Select(*args, **kwargs) | |
6845 | ||
6846 | def GetSelection(*args, **kwargs): | |
6847 | """GetSelection() -> int""" | |
6848 | return _core.ItemContainer_GetSelection(*args, **kwargs) | |
6849 | ||
6850 | def GetStringSelection(*args, **kwargs): | |
6851 | """GetStringSelection() -> wxString""" | |
6852 | return _core.ItemContainer_GetStringSelection(*args, **kwargs) | |
6853 | ||
6854 | def GetClientData(*args, **kwargs): | |
6855 | """GetClientData(int n) -> PyObject""" | |
6856 | return _core.ItemContainer_GetClientData(*args, **kwargs) | |
6857 | ||
6858 | def SetClientData(*args, **kwargs): | |
6859 | """SetClientData(int n, PyObject clientData)""" | |
6860 | return _core.ItemContainer_SetClientData(*args, **kwargs) | |
6861 | ||
d14a1e28 RD |
6862 | |
6863 | class ItemContainerPtr(ItemContainer): | |
6864 | def __init__(self, this): | |
6865 | self.this = this | |
6866 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6867 | self.__class__ = ItemContainer | |
6868 | _core.ItemContainer_swigregister(ItemContainerPtr) | |
6869 | ||
6870 | #--------------------------------------------------------------------------- | |
6871 | ||
6872 | class ControlWithItems(Control,ItemContainer): | |
6873 | def __init__(self): raise RuntimeError, "No constructor defined" | |
6874 | def __repr__(self): | |
6875 | return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
6876 | ||
6877 | class ControlWithItemsPtr(ControlWithItems): | |
6878 | def __init__(self, this): | |
6879 | self.this = this | |
6880 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6881 | self.__class__ = ControlWithItems | |
6882 | _core.ControlWithItems_swigregister(ControlWithItemsPtr) | |
6883 | ||
6884 | #--------------------------------------------------------------------------- | |
6885 | ||
6886 | class SizerItem(Object): | |
e811c8ce RD |
6887 | def __repr__(self): |
6888 | return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 6889 | def __init__(self, *args, **kwargs): |
e811c8ce | 6890 | """__init__() -> SizerItem""" |
d14a1e28 RD |
6891 | newobj = _core.new_SizerItem(*args, **kwargs) |
6892 | self.this = newobj.this | |
6893 | self.thisown = 1 | |
6894 | del newobj.thisown | |
e811c8ce RD |
6895 | def DeleteWindows(*args, **kwargs): |
6896 | """DeleteWindows()""" | |
6897 | return _core.SizerItem_DeleteWindows(*args, **kwargs) | |
6898 | ||
6899 | def DetachSizer(*args, **kwargs): | |
6900 | """DetachSizer()""" | |
6901 | return _core.SizerItem_DetachSizer(*args, **kwargs) | |
6902 | ||
6903 | def GetSize(*args, **kwargs): | |
6904 | """GetSize() -> Size""" | |
6905 | return _core.SizerItem_GetSize(*args, **kwargs) | |
6906 | ||
6907 | def CalcMin(*args, **kwargs): | |
6908 | """CalcMin() -> Size""" | |
6909 | return _core.SizerItem_CalcMin(*args, **kwargs) | |
6910 | ||
6911 | def SetDimension(*args, **kwargs): | |
6912 | """SetDimension(Point pos, Size size)""" | |
6913 | return _core.SizerItem_SetDimension(*args, **kwargs) | |
6914 | ||
6915 | def GetMinSize(*args, **kwargs): | |
6916 | """GetMinSize() -> Size""" | |
6917 | return _core.SizerItem_GetMinSize(*args, **kwargs) | |
6918 | ||
6919 | def SetInitSize(*args, **kwargs): | |
6920 | """SetInitSize(int x, int y)""" | |
6921 | return _core.SizerItem_SetInitSize(*args, **kwargs) | |
6922 | ||
6923 | def SetRatioWH(*args, **kwargs): | |
6924 | """SetRatioWH(int width, int height)""" | |
6925 | return _core.SizerItem_SetRatioWH(*args, **kwargs) | |
6926 | ||
6927 | def SetRatioSize(*args, **kwargs): | |
6928 | """SetRatioSize(Size size)""" | |
6929 | return _core.SizerItem_SetRatioSize(*args, **kwargs) | |
6930 | ||
6931 | def SetRatio(*args, **kwargs): | |
6932 | """SetRatio(float ratio)""" | |
6933 | return _core.SizerItem_SetRatio(*args, **kwargs) | |
6934 | ||
6935 | def GetRatio(*args, **kwargs): | |
6936 | """GetRatio() -> float""" | |
6937 | return _core.SizerItem_GetRatio(*args, **kwargs) | |
6938 | ||
6939 | def IsWindow(*args, **kwargs): | |
6940 | """IsWindow() -> bool""" | |
6941 | return _core.SizerItem_IsWindow(*args, **kwargs) | |
6942 | ||
6943 | def IsSizer(*args, **kwargs): | |
6944 | """IsSizer() -> bool""" | |
6945 | return _core.SizerItem_IsSizer(*args, **kwargs) | |
6946 | ||
6947 | def IsSpacer(*args, **kwargs): | |
6948 | """IsSpacer() -> bool""" | |
6949 | return _core.SizerItem_IsSpacer(*args, **kwargs) | |
6950 | ||
6951 | def SetProportion(*args, **kwargs): | |
6952 | """SetProportion(int proportion)""" | |
6953 | return _core.SizerItem_SetProportion(*args, **kwargs) | |
6954 | ||
6955 | def GetProportion(*args, **kwargs): | |
6956 | """GetProportion() -> int""" | |
6957 | return _core.SizerItem_GetProportion(*args, **kwargs) | |
6958 | ||
6959 | def SetFlag(*args, **kwargs): | |
6960 | """SetFlag(int flag)""" | |
6961 | return _core.SizerItem_SetFlag(*args, **kwargs) | |
6962 | ||
6963 | def GetFlag(*args, **kwargs): | |
6964 | """GetFlag() -> int""" | |
6965 | return _core.SizerItem_GetFlag(*args, **kwargs) | |
6966 | ||
6967 | def SetBorder(*args, **kwargs): | |
6968 | """SetBorder(int border)""" | |
6969 | return _core.SizerItem_SetBorder(*args, **kwargs) | |
6970 | ||
6971 | def GetBorder(*args, **kwargs): | |
6972 | """GetBorder() -> int""" | |
6973 | return _core.SizerItem_GetBorder(*args, **kwargs) | |
6974 | ||
6975 | def GetWindow(*args, **kwargs): | |
6976 | """GetWindow() -> Window""" | |
6977 | return _core.SizerItem_GetWindow(*args, **kwargs) | |
6978 | ||
6979 | def SetWindow(*args, **kwargs): | |
6980 | """SetWindow(Window window)""" | |
6981 | return _core.SizerItem_SetWindow(*args, **kwargs) | |
6982 | ||
6983 | def GetSizer(*args, **kwargs): | |
6984 | """GetSizer() -> Sizer""" | |
6985 | return _core.SizerItem_GetSizer(*args, **kwargs) | |
6986 | ||
6987 | def SetSizer(*args, **kwargs): | |
6988 | """SetSizer(Sizer sizer)""" | |
6989 | return _core.SizerItem_SetSizer(*args, **kwargs) | |
6990 | ||
6991 | def GetSpacer(*args, **kwargs): | |
6992 | """GetSpacer() -> Size""" | |
6993 | return _core.SizerItem_GetSpacer(*args, **kwargs) | |
6994 | ||
6995 | def SetSpacer(*args, **kwargs): | |
6996 | """SetSpacer(Size size)""" | |
6997 | return _core.SizerItem_SetSpacer(*args, **kwargs) | |
6998 | ||
6999 | def Show(*args, **kwargs): | |
7000 | """Show(bool show)""" | |
7001 | return _core.SizerItem_Show(*args, **kwargs) | |
7002 | ||
7003 | def IsShown(*args, **kwargs): | |
7004 | """IsShown() -> bool""" | |
7005 | return _core.SizerItem_IsShown(*args, **kwargs) | |
7006 | ||
7007 | def GetPosition(*args, **kwargs): | |
7008 | """GetPosition() -> Point""" | |
7009 | return _core.SizerItem_GetPosition(*args, **kwargs) | |
7010 | ||
7011 | def GetUserData(*args, **kwargs): | |
7012 | """GetUserData() -> PyObject""" | |
7013 | return _core.SizerItem_GetUserData(*args, **kwargs) | |
7014 | ||
d14a1e28 RD |
7015 | |
7016 | class SizerItemPtr(SizerItem): | |
7017 | def __init__(self, this): | |
7018 | self.this = this | |
7019 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7020 | self.__class__ = SizerItem | |
7021 | _core.SizerItem_swigregister(SizerItemPtr) | |
7022 | ||
7023 | def SizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
7024 | """ |
7025 | SizerItemSpacer(int width, int height, int proportion, int flag, int border, | |
7026 | Object userData) -> SizerItem | |
7027 | """ | |
d14a1e28 RD |
7028 | val = _core.new_SizerItemSpacer(*args, **kwargs) |
7029 | val.thisown = 1 | |
7030 | return val | |
7031 | ||
7032 | def SizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
7033 | """ |
7034 | SizerItemWindow(Window window, int proportion, int flag, int border, | |
7035 | Object userData) -> SizerItem | |
7036 | """ | |
d14a1e28 RD |
7037 | val = _core.new_SizerItemWindow(*args, **kwargs) |
7038 | val.thisown = 1 | |
7039 | return val | |
7040 | ||
7041 | def SizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
7042 | """ |
7043 | SizerItemSizer(Sizer sizer, int proportion, int flag, int border, | |
7044 | Object userData) -> SizerItem | |
7045 | """ | |
d14a1e28 RD |
7046 | val = _core.new_SizerItemSizer(*args, **kwargs) |
7047 | val.thisown = 1 | |
7048 | return val | |
7049 | ||
7050 | class Sizer(Object): | |
e811c8ce RD |
7051 | def __init__(self): raise RuntimeError, "No constructor defined" |
7052 | def __repr__(self): | |
7053 | return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
7054 | def _setOORInfo(*args, **kwargs): | |
7055 | """_setOORInfo(PyObject _self)""" | |
7056 | return _core.Sizer__setOORInfo(*args, **kwargs) | |
7057 | ||
7058 | def Add(*args, **kwargs): | |
0df68c9f RD |
7059 | """ |
7060 | Add(PyObject item, int proportion=0, int flag=0, int border=0, | |
7061 | PyObject userData=None) | |
7062 | """ | |
e811c8ce RD |
7063 | return _core.Sizer_Add(*args, **kwargs) |
7064 | ||
7065 | def Insert(*args, **kwargs): | |
0df68c9f RD |
7066 | """ |
7067 | Insert(int before, PyObject item, int proportion=0, int flag=0, | |
7068 | int border=0, PyObject userData=None) | |
7069 | """ | |
e811c8ce RD |
7070 | return _core.Sizer_Insert(*args, **kwargs) |
7071 | ||
7072 | def Prepend(*args, **kwargs): | |
0df68c9f RD |
7073 | """ |
7074 | Prepend(PyObject item, int proportion=0, int flag=0, int border=0, | |
7075 | PyObject userData=None) | |
7076 | """ | |
e811c8ce RD |
7077 | return _core.Sizer_Prepend(*args, **kwargs) |
7078 | ||
7079 | def Remove(*args, **kwargs): | |
7080 | """Remove(PyObject item) -> bool""" | |
7081 | return _core.Sizer_Remove(*args, **kwargs) | |
7082 | ||
7083 | def _SetItemMinSize(*args, **kwargs): | |
7084 | """_SetItemMinSize(PyObject item, Size size)""" | |
7085 | return _core.Sizer__SetItemMinSize(*args, **kwargs) | |
7086 | ||
7087 | def AddItem(*args, **kwargs): | |
7088 | """AddItem(SizerItem item)""" | |
7089 | return _core.Sizer_AddItem(*args, **kwargs) | |
7090 | ||
7091 | def InsertItem(*args, **kwargs): | |
7092 | """InsertItem(size_t index, SizerItem item)""" | |
7093 | return _core.Sizer_InsertItem(*args, **kwargs) | |
7094 | ||
7095 | def PrependItem(*args, **kwargs): | |
7096 | """PrependItem(SizerItem item)""" | |
7097 | return _core.Sizer_PrependItem(*args, **kwargs) | |
7098 | ||
d14a1e28 RD |
7099 | def AddMany(self, widgets): |
7100 | for childinfo in widgets: | |
e811c8ce | 7101 | if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)): |
d14a1e28 RD |
7102 | childinfo = (childinfo, ) |
7103 | self.Add(*childinfo) | |
7104 | ||
7105 | ||
7106 | AddWindow = AddSizer = AddSpacer = Add | |
7107 | PrependWindow = PrependSizer = PrependSpacer = Prepend | |
7108 | InsertWindow = InsertSizer = InsertSpacer = Insert | |
7109 | RemoveWindow = RemoveSizer = RemovePos = Remove | |
7110 | ||
7111 | ||
7112 | def SetItemMinSize(self, item, *args): | |
7113 | if len(args) == 2: | |
7114 | return self._SetItemMinSize(item, args) | |
7115 | else: | |
7116 | return self._SetItemMinSize(item, args[0]) | |
7117 | ||
e811c8ce RD |
7118 | def SetDimension(*args, **kwargs): |
7119 | """SetDimension(int x, int y, int width, int height)""" | |
7120 | return _core.Sizer_SetDimension(*args, **kwargs) | |
7121 | ||
7122 | def SetMinSize(*args, **kwargs): | |
7123 | """SetMinSize(Size size)""" | |
7124 | return _core.Sizer_SetMinSize(*args, **kwargs) | |
7125 | ||
7126 | def GetSize(*args, **kwargs): | |
7127 | """GetSize() -> Size""" | |
7128 | return _core.Sizer_GetSize(*args, **kwargs) | |
7129 | ||
7130 | def GetPosition(*args, **kwargs): | |
7131 | """GetPosition() -> Point""" | |
7132 | return _core.Sizer_GetPosition(*args, **kwargs) | |
7133 | ||
7134 | def GetMinSize(*args, **kwargs): | |
7135 | """GetMinSize() -> Size""" | |
7136 | return _core.Sizer_GetMinSize(*args, **kwargs) | |
7137 | ||
d14a1e28 RD |
7138 | def GetSizeTuple(self): |
7139 | return self.GetSize().asTuple() | |
7140 | def GetPositionTuple(self): | |
7141 | return self.GetPosition().asTuple() | |
7142 | def GetMinSizeTuple(self): | |
7143 | return self.GetMinSize().asTuple() | |
7144 | ||
e811c8ce RD |
7145 | def RecalcSizes(*args, **kwargs): |
7146 | """RecalcSizes()""" | |
7147 | return _core.Sizer_RecalcSizes(*args, **kwargs) | |
7148 | ||
7149 | def CalcMin(*args, **kwargs): | |
7150 | """CalcMin() -> Size""" | |
7151 | return _core.Sizer_CalcMin(*args, **kwargs) | |
7152 | ||
7153 | def Layout(*args, **kwargs): | |
7154 | """Layout()""" | |
7155 | return _core.Sizer_Layout(*args, **kwargs) | |
7156 | ||
7157 | def Fit(*args, **kwargs): | |
7158 | """Fit(Window window) -> Size""" | |
7159 | return _core.Sizer_Fit(*args, **kwargs) | |
7160 | ||
7161 | def FitInside(*args, **kwargs): | |
7162 | """FitInside(Window window)""" | |
7163 | return _core.Sizer_FitInside(*args, **kwargs) | |
7164 | ||
7165 | def SetSizeHints(*args, **kwargs): | |
7166 | """SetSizeHints(Window window)""" | |
7167 | return _core.Sizer_SetSizeHints(*args, **kwargs) | |
7168 | ||
7169 | def SetVirtualSizeHints(*args, **kwargs): | |
7170 | """SetVirtualSizeHints(Window window)""" | |
7171 | return _core.Sizer_SetVirtualSizeHints(*args, **kwargs) | |
7172 | ||
7173 | def Clear(*args, **kwargs): | |
7174 | """Clear(bool delete_windows=False)""" | |
7175 | return _core.Sizer_Clear(*args, **kwargs) | |
7176 | ||
7177 | def DeleteWindows(*args, **kwargs): | |
7178 | """DeleteWindows()""" | |
7179 | return _core.Sizer_DeleteWindows(*args, **kwargs) | |
7180 | ||
7181 | def GetChildren(*args, **kwargs): | |
7182 | """GetChildren() -> PyObject""" | |
7183 | return _core.Sizer_GetChildren(*args, **kwargs) | |
7184 | ||
7185 | def Show(*args, **kwargs): | |
7186 | """Show(PyObject item, bool show=True)""" | |
7187 | return _core.Sizer_Show(*args, **kwargs) | |
7188 | ||
7189 | def Hide(*args, **kwargs): | |
7190 | """Hide(PyObject item)""" | |
7191 | return _core.Sizer_Hide(*args, **kwargs) | |
7192 | ||
7193 | def IsShown(*args, **kwargs): | |
7194 | """IsShown(PyObject item) -> bool""" | |
7195 | return _core.Sizer_IsShown(*args, **kwargs) | |
7196 | ||
7197 | def ShowItems(*args, **kwargs): | |
7198 | """ShowItems(bool show)""" | |
7199 | return _core.Sizer_ShowItems(*args, **kwargs) | |
7200 | ||
d14a1e28 RD |
7201 | |
7202 | class SizerPtr(Sizer): | |
7203 | def __init__(self, this): | |
7204 | self.this = this | |
7205 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7206 | self.__class__ = Sizer | |
7207 | _core.Sizer_swigregister(SizerPtr) | |
7208 | ||
7209 | class PySizer(Sizer): | |
e811c8ce RD |
7210 | def __repr__(self): |
7211 | return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7212 | def __init__(self, *args, **kwargs): |
e811c8ce | 7213 | """__init__() -> PySizer""" |
d14a1e28 RD |
7214 | newobj = _core.new_PySizer(*args, **kwargs) |
7215 | self.this = newobj.this | |
7216 | self.thisown = 1 | |
7217 | del newobj.thisown | |
7218 | self._setCallbackInfo(self, PySizer);self._setOORInfo(self) | |
e811c8ce RD |
7219 | |
7220 | def _setCallbackInfo(*args, **kwargs): | |
7221 | """_setCallbackInfo(PyObject self, PyObject _class)""" | |
7222 | return _core.PySizer__setCallbackInfo(*args, **kwargs) | |
7223 | ||
d14a1e28 RD |
7224 | |
7225 | class PySizerPtr(PySizer): | |
7226 | def __init__(self, this): | |
7227 | self.this = this | |
7228 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7229 | self.__class__ = PySizer | |
7230 | _core.PySizer_swigregister(PySizerPtr) | |
7231 | ||
7232 | #--------------------------------------------------------------------------- | |
7233 | ||
7234 | class BoxSizer(Sizer): | |
e811c8ce RD |
7235 | def __repr__(self): |
7236 | return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7237 | def __init__(self, *args, **kwargs): |
e811c8ce | 7238 | """__init__(int orient=HORIZONTAL) -> BoxSizer""" |
d14a1e28 RD |
7239 | newobj = _core.new_BoxSizer(*args, **kwargs) |
7240 | self.this = newobj.this | |
7241 | self.thisown = 1 | |
7242 | del newobj.thisown | |
7243 | self._setOORInfo(self) | |
e811c8ce RD |
7244 | |
7245 | def GetOrientation(*args, **kwargs): | |
7246 | """GetOrientation() -> int""" | |
7247 | return _core.BoxSizer_GetOrientation(*args, **kwargs) | |
7248 | ||
7249 | def SetOrientation(*args, **kwargs): | |
7250 | """SetOrientation(int orient)""" | |
7251 | return _core.BoxSizer_SetOrientation(*args, **kwargs) | |
7252 | ||
7253 | def RecalcSizes(*args, **kwargs): | |
7254 | """RecalcSizes()""" | |
7255 | return _core.BoxSizer_RecalcSizes(*args, **kwargs) | |
7256 | ||
7257 | def CalcMin(*args, **kwargs): | |
7258 | """CalcMin() -> Size""" | |
7259 | return _core.BoxSizer_CalcMin(*args, **kwargs) | |
7260 | ||
d14a1e28 RD |
7261 | |
7262 | class BoxSizerPtr(BoxSizer): | |
7263 | def __init__(self, this): | |
7264 | self.this = this | |
7265 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7266 | self.__class__ = BoxSizer | |
7267 | _core.BoxSizer_swigregister(BoxSizerPtr) | |
7268 | ||
7269 | #--------------------------------------------------------------------------- | |
7270 | ||
7271 | class StaticBoxSizer(BoxSizer): | |
e811c8ce RD |
7272 | def __repr__(self): |
7273 | return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7274 | def __init__(self, *args, **kwargs): |
e811c8ce | 7275 | """__init__(wxStaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer""" |
d14a1e28 RD |
7276 | newobj = _core.new_StaticBoxSizer(*args, **kwargs) |
7277 | self.this = newobj.this | |
7278 | self.thisown = 1 | |
7279 | del newobj.thisown | |
7280 | self._setOORInfo(self) | |
e811c8ce RD |
7281 | |
7282 | def GetStaticBox(*args, **kwargs): | |
7283 | """GetStaticBox() -> wxStaticBox""" | |
7284 | return _core.StaticBoxSizer_GetStaticBox(*args, **kwargs) | |
7285 | ||
7286 | def RecalcSizes(*args, **kwargs): | |
7287 | """RecalcSizes()""" | |
7288 | return _core.StaticBoxSizer_RecalcSizes(*args, **kwargs) | |
7289 | ||
7290 | def CalcMin(*args, **kwargs): | |
7291 | """CalcMin() -> Size""" | |
7292 | return _core.StaticBoxSizer_CalcMin(*args, **kwargs) | |
7293 | ||
d14a1e28 RD |
7294 | |
7295 | class StaticBoxSizerPtr(StaticBoxSizer): | |
7296 | def __init__(self, this): | |
7297 | self.this = this | |
7298 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7299 | self.__class__ = StaticBoxSizer | |
7300 | _core.StaticBoxSizer_swigregister(StaticBoxSizerPtr) | |
7301 | ||
7302 | #--------------------------------------------------------------------------- | |
7303 | ||
7304 | class GridSizer(Sizer): | |
e811c8ce RD |
7305 | def __repr__(self): |
7306 | return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7307 | def __init__(self, *args, **kwargs): |
e811c8ce | 7308 | """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer""" |
d14a1e28 RD |
7309 | newobj = _core.new_GridSizer(*args, **kwargs) |
7310 | self.this = newobj.this | |
7311 | self.thisown = 1 | |
7312 | del newobj.thisown | |
7313 | self._setOORInfo(self) | |
e811c8ce RD |
7314 | |
7315 | def RecalcSizes(*args, **kwargs): | |
7316 | """RecalcSizes()""" | |
7317 | return _core.GridSizer_RecalcSizes(*args, **kwargs) | |
7318 | ||
7319 | def CalcMin(*args, **kwargs): | |
7320 | """CalcMin() -> Size""" | |
7321 | return _core.GridSizer_CalcMin(*args, **kwargs) | |
7322 | ||
7323 | def SetCols(*args, **kwargs): | |
7324 | """SetCols(int cols)""" | |
7325 | return _core.GridSizer_SetCols(*args, **kwargs) | |
7326 | ||
7327 | def SetRows(*args, **kwargs): | |
7328 | """SetRows(int rows)""" | |
7329 | return _core.GridSizer_SetRows(*args, **kwargs) | |
7330 | ||
7331 | def SetVGap(*args, **kwargs): | |
7332 | """SetVGap(int gap)""" | |
7333 | return _core.GridSizer_SetVGap(*args, **kwargs) | |
7334 | ||
7335 | def SetHGap(*args, **kwargs): | |
7336 | """SetHGap(int gap)""" | |
7337 | return _core.GridSizer_SetHGap(*args, **kwargs) | |
7338 | ||
7339 | def GetCols(*args, **kwargs): | |
7340 | """GetCols() -> int""" | |
7341 | return _core.GridSizer_GetCols(*args, **kwargs) | |
7342 | ||
7343 | def GetRows(*args, **kwargs): | |
7344 | """GetRows() -> int""" | |
7345 | return _core.GridSizer_GetRows(*args, **kwargs) | |
7346 | ||
7347 | def GetVGap(*args, **kwargs): | |
7348 | """GetVGap() -> int""" | |
7349 | return _core.GridSizer_GetVGap(*args, **kwargs) | |
7350 | ||
7351 | def GetHGap(*args, **kwargs): | |
7352 | """GetHGap() -> int""" | |
7353 | return _core.GridSizer_GetHGap(*args, **kwargs) | |
7354 | ||
d14a1e28 RD |
7355 | |
7356 | class GridSizerPtr(GridSizer): | |
7357 | def __init__(self, this): | |
7358 | self.this = this | |
7359 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7360 | self.__class__ = GridSizer | |
7361 | _core.GridSizer_swigregister(GridSizerPtr) | |
7362 | ||
7363 | #--------------------------------------------------------------------------- | |
7364 | ||
7365 | FLEX_GROWMODE_NONE = _core.FLEX_GROWMODE_NONE | |
7366 | FLEX_GROWMODE_SPECIFIED = _core.FLEX_GROWMODE_SPECIFIED | |
7367 | FLEX_GROWMODE_ALL = _core.FLEX_GROWMODE_ALL | |
7368 | class FlexGridSizer(GridSizer): | |
e811c8ce RD |
7369 | def __repr__(self): |
7370 | return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7371 | def __init__(self, *args, **kwargs): |
e811c8ce | 7372 | """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer""" |
d14a1e28 RD |
7373 | newobj = _core.new_FlexGridSizer(*args, **kwargs) |
7374 | self.this = newobj.this | |
7375 | self.thisown = 1 | |
7376 | del newobj.thisown | |
7377 | self._setOORInfo(self) | |
e811c8ce RD |
7378 | |
7379 | def RecalcSizes(*args, **kwargs): | |
7380 | """RecalcSizes()""" | |
7381 | return _core.FlexGridSizer_RecalcSizes(*args, **kwargs) | |
7382 | ||
7383 | def CalcMin(*args, **kwargs): | |
7384 | """CalcMin() -> Size""" | |
7385 | return _core.FlexGridSizer_CalcMin(*args, **kwargs) | |
7386 | ||
7387 | def AddGrowableRow(*args, **kwargs): | |
7388 | """AddGrowableRow(size_t idx, int proportion=0)""" | |
7389 | return _core.FlexGridSizer_AddGrowableRow(*args, **kwargs) | |
7390 | ||
7391 | def RemoveGrowableRow(*args, **kwargs): | |
7392 | """RemoveGrowableRow(size_t idx)""" | |
7393 | return _core.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) | |
7394 | ||
7395 | def AddGrowableCol(*args, **kwargs): | |
7396 | """AddGrowableCol(size_t idx, int proportion=0)""" | |
7397 | return _core.FlexGridSizer_AddGrowableCol(*args, **kwargs) | |
7398 | ||
7399 | def RemoveGrowableCol(*args, **kwargs): | |
7400 | """RemoveGrowableCol(size_t idx)""" | |
7401 | return _core.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) | |
7402 | ||
7403 | def SetFlexibleDirection(*args, **kwargs): | |
7404 | """SetFlexibleDirection(int direction)""" | |
7405 | return _core.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) | |
7406 | ||
7407 | def GetFlexibleDirection(*args, **kwargs): | |
7408 | """GetFlexibleDirection() -> int""" | |
7409 | return _core.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) | |
7410 | ||
7411 | def SetNonFlexibleGrowMode(*args, **kwargs): | |
7412 | """SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode)""" | |
7413 | return _core.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) | |
7414 | ||
7415 | def GetNonFlexibleGrowMode(*args, **kwargs): | |
7416 | """GetNonFlexibleGrowMode() -> wxFlexSizerGrowMode""" | |
7417 | return _core.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) | |
7418 | ||
7419 | def GetRowHeights(*args, **kwargs): | |
7420 | """GetRowHeights() -> wxArrayInt""" | |
7421 | return _core.FlexGridSizer_GetRowHeights(*args, **kwargs) | |
7422 | ||
7423 | def GetColWidths(*args, **kwargs): | |
7424 | """GetColWidths() -> wxArrayInt""" | |
7425 | return _core.FlexGridSizer_GetColWidths(*args, **kwargs) | |
7426 | ||
d14a1e28 RD |
7427 | |
7428 | class FlexGridSizerPtr(FlexGridSizer): | |
7429 | def __init__(self, this): | |
7430 | self.this = this | |
7431 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7432 | self.__class__ = FlexGridSizer | |
7433 | _core.FlexGridSizer_swigregister(FlexGridSizerPtr) | |
7434 | ||
7435 | #--------------------------------------------------------------------------- | |
7436 | ||
7437 | class GBPosition(object): | |
e811c8ce RD |
7438 | def __repr__(self): |
7439 | return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7440 | def __init__(self, *args, **kwargs): |
e811c8ce | 7441 | """__init__(int row=0, int col=0) -> GBPosition""" |
d14a1e28 RD |
7442 | newobj = _core.new_GBPosition(*args, **kwargs) |
7443 | self.this = newobj.this | |
7444 | self.thisown = 1 | |
7445 | del newobj.thisown | |
e811c8ce RD |
7446 | def GetRow(*args, **kwargs): |
7447 | """GetRow() -> int""" | |
7448 | return _core.GBPosition_GetRow(*args, **kwargs) | |
7449 | ||
7450 | def GetCol(*args, **kwargs): | |
7451 | """GetCol() -> int""" | |
7452 | return _core.GBPosition_GetCol(*args, **kwargs) | |
7453 | ||
7454 | def SetRow(*args, **kwargs): | |
7455 | """SetRow(int row)""" | |
7456 | return _core.GBPosition_SetRow(*args, **kwargs) | |
7457 | ||
7458 | def SetCol(*args, **kwargs): | |
7459 | """SetCol(int col)""" | |
7460 | return _core.GBPosition_SetCol(*args, **kwargs) | |
7461 | ||
7462 | def __eq__(*args, **kwargs): | |
7463 | """__eq__(GBPosition p) -> bool""" | |
7464 | return _core.GBPosition___eq__(*args, **kwargs) | |
7465 | ||
7466 | def __ne__(*args, **kwargs): | |
7467 | """__ne__(GBPosition p) -> bool""" | |
7468 | return _core.GBPosition___ne__(*args, **kwargs) | |
7469 | ||
7470 | def Set(*args, **kwargs): | |
7471 | """Set(int row=0, int col=0)""" | |
7472 | return _core.GBPosition_Set(*args, **kwargs) | |
7473 | ||
7474 | def Get(*args, **kwargs): | |
7475 | """Get() -> PyObject""" | |
7476 | return _core.GBPosition_Get(*args, **kwargs) | |
7477 | ||
7478 | asTuple = Get | |
7479 | def __str__(self): return str(self.Get()) | |
7480 | def __repr__(self): return 'wx.GBPosition'+str(self.Get()) | |
7481 | def __len__(self): return len(self.Get()) | |
7482 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
7483 | def __setitem__(self, index, val): |
7484 | if index == 0: self.SetRow(val) | |
7485 | elif index == 1: self.SetCol(val) | |
7486 | else: raise IndexError | |
e811c8ce | 7487 | def __nonzero__(self): return self.Get() != (0,0) |
d14a1e28 | 7488 | def __getinitargs__(self): return () |
e811c8ce | 7489 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
7490 | def __setstate__(self, state): self.Set(*state) |
7491 | ||
7492 | row = property(GetRow, SetRow) | |
7493 | col = property(GetCol, SetCol) | |
7494 | ||
7495 | ||
7496 | class GBPositionPtr(GBPosition): | |
7497 | def __init__(self, this): | |
7498 | self.this = this | |
7499 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7500 | self.__class__ = GBPosition | |
7501 | _core.GBPosition_swigregister(GBPositionPtr) | |
7502 | ||
7503 | class GBSpan(object): | |
e811c8ce RD |
7504 | def __repr__(self): |
7505 | return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7506 | def __init__(self, *args, **kwargs): |
e811c8ce | 7507 | """__init__(int rowspan=1, int colspan=1) -> GBSpan""" |
d14a1e28 RD |
7508 | newobj = _core.new_GBSpan(*args, **kwargs) |
7509 | self.this = newobj.this | |
7510 | self.thisown = 1 | |
7511 | del newobj.thisown | |
e811c8ce RD |
7512 | def GetRowspan(*args, **kwargs): |
7513 | """GetRowspan() -> int""" | |
7514 | return _core.GBSpan_GetRowspan(*args, **kwargs) | |
7515 | ||
7516 | def GetColspan(*args, **kwargs): | |
7517 | """GetColspan() -> int""" | |
7518 | return _core.GBSpan_GetColspan(*args, **kwargs) | |
7519 | ||
7520 | def SetRowspan(*args, **kwargs): | |
7521 | """SetRowspan(int rowspan)""" | |
7522 | return _core.GBSpan_SetRowspan(*args, **kwargs) | |
7523 | ||
7524 | def SetColspan(*args, **kwargs): | |
7525 | """SetColspan(int colspan)""" | |
7526 | return _core.GBSpan_SetColspan(*args, **kwargs) | |
7527 | ||
7528 | def __eq__(*args, **kwargs): | |
7529 | """__eq__(GBSpan o) -> bool""" | |
7530 | return _core.GBSpan___eq__(*args, **kwargs) | |
7531 | ||
7532 | def __ne__(*args, **kwargs): | |
7533 | """__ne__(GBSpan o) -> bool""" | |
7534 | return _core.GBSpan___ne__(*args, **kwargs) | |
7535 | ||
7536 | def Set(*args, **kwargs): | |
7537 | """Set(int rowspan=1, int colspan=1)""" | |
7538 | return _core.GBSpan_Set(*args, **kwargs) | |
7539 | ||
7540 | def Get(*args, **kwargs): | |
7541 | """Get() -> PyObject""" | |
7542 | return _core.GBSpan_Get(*args, **kwargs) | |
7543 | ||
7544 | asTuple = Get | |
7545 | def __str__(self): return str(self.Get()) | |
7546 | def __repr__(self): return 'wx.GBSpan'+str(self.Get()) | |
7547 | def __len__(self): return len(self.Get()) | |
7548 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
7549 | def __setitem__(self, index, val): |
7550 | if index == 0: self.SetRowspan(val) | |
7551 | elif index == 1: self.SetColspan(val) | |
7552 | else: raise IndexError | |
e811c8ce | 7553 | def __nonzero__(self): return self.Get() != (0,0) |
d14a1e28 | 7554 | def __getinitargs__(self): return () |
e811c8ce | 7555 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
7556 | def __setstate__(self, state): self.Set(*state) |
7557 | ||
7558 | rowspan = property(GetRowspan, SetRowspan) | |
7559 | colspan = property(GetColspan, SetColspan) | |
7560 | ||
7561 | ||
7562 | class GBSpanPtr(GBSpan): | |
7563 | def __init__(self, this): | |
7564 | self.this = this | |
7565 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7566 | self.__class__ = GBSpan | |
7567 | _core.GBSpan_swigregister(GBSpanPtr) | |
7568 | ||
7569 | class GBSizerItem(SizerItem): | |
e811c8ce RD |
7570 | def __repr__(self): |
7571 | return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7572 | def __init__(self, *args, **kwargs): |
e811c8ce | 7573 | """__init__() -> GBSizerItem""" |
d14a1e28 RD |
7574 | newobj = _core.new_GBSizerItem(*args, **kwargs) |
7575 | self.this = newobj.this | |
7576 | self.thisown = 1 | |
7577 | del newobj.thisown | |
e811c8ce RD |
7578 | def GetPos(*args, **kwargs): |
7579 | """GetPos() -> GBPosition""" | |
7580 | return _core.GBSizerItem_GetPos(*args, **kwargs) | |
7581 | ||
7582 | def GetPosTuple(self): return self.GetPos().Get() | |
7583 | def GetSpan(*args, **kwargs): | |
7584 | """GetSpan() -> GBSpan""" | |
7585 | return _core.GBSizerItem_GetSpan(*args, **kwargs) | |
7586 | ||
7587 | def GetSpanTuple(self): return self.GetSpan().Get() | |
7588 | def SetPos(*args, **kwargs): | |
7589 | """SetPos(GBPosition pos) -> bool""" | |
7590 | return _core.GBSizerItem_SetPos(*args, **kwargs) | |
7591 | ||
7592 | def SetSpan(*args, **kwargs): | |
7593 | """SetSpan(GBSpan span) -> bool""" | |
7594 | return _core.GBSizerItem_SetSpan(*args, **kwargs) | |
7595 | ||
7596 | def Intersects(*args): | |
0df68c9f RD |
7597 | """ |
7598 | Intersects(GBSizerItem other) -> bool | |
7599 | Intersects(GBPosition pos, GBSpan span) -> bool | |
7600 | """ | |
e811c8ce RD |
7601 | return _core.GBSizerItem_Intersects(*args) |
7602 | ||
7603 | def GetEndPos(*args, **kwargs): | |
7604 | """GetEndPos(int row, int col)""" | |
7605 | return _core.GBSizerItem_GetEndPos(*args, **kwargs) | |
7606 | ||
7607 | def GetGBSizer(*args, **kwargs): | |
7608 | """GetGBSizer() -> GridBagSizer""" | |
7609 | return _core.GBSizerItem_GetGBSizer(*args, **kwargs) | |
7610 | ||
7611 | def SetGBSizer(*args, **kwargs): | |
7612 | """SetGBSizer(GridBagSizer sizer)""" | |
7613 | return _core.GBSizerItem_SetGBSizer(*args, **kwargs) | |
7614 | ||
d14a1e28 RD |
7615 | |
7616 | class GBSizerItemPtr(GBSizerItem): | |
7617 | def __init__(self, this): | |
7618 | self.this = this | |
7619 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7620 | self.__class__ = GBSizerItem | |
7621 | _core.GBSizerItem_swigregister(GBSizerItemPtr) | |
7622 | DefaultSpan = cvar.DefaultSpan | |
7623 | ||
7624 | def GBSizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
7625 | """ |
7626 | GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, | |
7627 | int border, Object userData) -> GBSizerItem | |
7628 | """ | |
d14a1e28 RD |
7629 | val = _core.new_GBSizerItemWindow(*args, **kwargs) |
7630 | val.thisown = 1 | |
7631 | return val | |
7632 | ||
7633 | def GBSizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
7634 | """ |
7635 | GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, | |
7636 | int border, Object userData) -> GBSizerItem | |
7637 | """ | |
d14a1e28 RD |
7638 | val = _core.new_GBSizerItemSizer(*args, **kwargs) |
7639 | val.thisown = 1 | |
7640 | return val | |
7641 | ||
7642 | def GBSizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
7643 | """ |
7644 | GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, | |
7645 | int flag, int border, Object userData) -> GBSizerItem | |
7646 | """ | |
d14a1e28 RD |
7647 | val = _core.new_GBSizerItemSpacer(*args, **kwargs) |
7648 | val.thisown = 1 | |
7649 | return val | |
7650 | ||
7651 | class GridBagSizer(FlexGridSizer): | |
e811c8ce RD |
7652 | def __repr__(self): |
7653 | return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7654 | def __init__(self, *args, **kwargs): |
e811c8ce | 7655 | """__init__(int vgap=0, int hgap=0) -> GridBagSizer""" |
d14a1e28 RD |
7656 | newobj = _core.new_GridBagSizer(*args, **kwargs) |
7657 | self.this = newobj.this | |
7658 | self.thisown = 1 | |
7659 | del newobj.thisown | |
e811c8ce | 7660 | def Add(*args, **kwargs): |
0df68c9f RD |
7661 | """ |
7662 | Add(PyObject item, GBPosition pos, GBSpan span=DefaultSpan, | |
7663 | int flag=0, int border=0, PyObject userData=None) -> bool | |
7664 | """ | |
e811c8ce RD |
7665 | return _core.GridBagSizer_Add(*args, **kwargs) |
7666 | ||
7667 | def AddItem(*args, **kwargs): | |
7668 | """AddItem(GBSizerItem item) -> bool""" | |
7669 | return _core.GridBagSizer_AddItem(*args, **kwargs) | |
7670 | ||
7671 | def GetEmptyCellSize(*args, **kwargs): | |
7672 | """GetEmptyCellSize() -> Size""" | |
7673 | return _core.GridBagSizer_GetEmptyCellSize(*args, **kwargs) | |
7674 | ||
7675 | def SetEmptyCellSize(*args, **kwargs): | |
7676 | """SetEmptyCellSize(Size sz)""" | |
7677 | return _core.GridBagSizer_SetEmptyCellSize(*args, **kwargs) | |
7678 | ||
7679 | def GetItemPosition(*args): | |
0df68c9f RD |
7680 | """ |
7681 | GetItemPosition(Window window) -> GBPosition | |
7682 | GetItemPosition(Sizer sizer) -> GBPosition | |
7683 | GetItemPosition(size_t index) -> GBPosition | |
7684 | """ | |
e811c8ce RD |
7685 | return _core.GridBagSizer_GetItemPosition(*args) |
7686 | ||
7687 | def SetItemPosition(*args): | |
0df68c9f RD |
7688 | """ |
7689 | SetItemPosition(Window window, GBPosition pos) -> bool | |
7690 | SetItemPosition(Sizer sizer, GBPosition pos) -> bool | |
7691 | SetItemPosition(size_t index, GBPosition pos) -> bool | |
7692 | """ | |
e811c8ce RD |
7693 | return _core.GridBagSizer_SetItemPosition(*args) |
7694 | ||
7695 | def GetItemSpan(*args): | |
0df68c9f RD |
7696 | """ |
7697 | GetItemSpan(Window window) -> GBSpan | |
7698 | GetItemSpan(Sizer sizer) -> GBSpan | |
7699 | GetItemSpan(size_t index) -> GBSpan | |
7700 | """ | |
e811c8ce RD |
7701 | return _core.GridBagSizer_GetItemSpan(*args) |
7702 | ||
7703 | def SetItemSpan(*args): | |
0df68c9f RD |
7704 | """ |
7705 | SetItemSpan(Window window, GBSpan span) -> bool | |
7706 | SetItemSpan(Sizer sizer, GBSpan span) -> bool | |
7707 | SetItemSpan(size_t index, GBSpan span) -> bool | |
7708 | """ | |
e811c8ce RD |
7709 | return _core.GridBagSizer_SetItemSpan(*args) |
7710 | ||
7711 | def FindItem(*args): | |
0df68c9f RD |
7712 | """ |
7713 | FindItem(Window window) -> GBSizerItem | |
7714 | FindItem(Sizer sizer) -> GBSizerItem | |
7715 | """ | |
e811c8ce RD |
7716 | return _core.GridBagSizer_FindItem(*args) |
7717 | ||
7718 | def FindItemAtPosition(*args, **kwargs): | |
7719 | """FindItemAtPosition(GBPosition pos) -> GBSizerItem""" | |
7720 | return _core.GridBagSizer_FindItemAtPosition(*args, **kwargs) | |
7721 | ||
7722 | def FindItemAtPoint(*args, **kwargs): | |
7723 | """FindItemAtPoint(Point pt) -> GBSizerItem""" | |
7724 | return _core.GridBagSizer_FindItemAtPoint(*args, **kwargs) | |
7725 | ||
7726 | def FindItemWithData(*args, **kwargs): | |
7727 | """FindItemWithData(Object userData) -> GBSizerItem""" | |
7728 | return _core.GridBagSizer_FindItemWithData(*args, **kwargs) | |
7729 | ||
7730 | def RecalcSizes(*args, **kwargs): | |
7731 | """RecalcSizes()""" | |
7732 | return _core.GridBagSizer_RecalcSizes(*args, **kwargs) | |
7733 | ||
7734 | def CalcMin(*args, **kwargs): | |
7735 | """CalcMin() -> Size""" | |
7736 | return _core.GridBagSizer_CalcMin(*args, **kwargs) | |
7737 | ||
7738 | def CheckForIntersection(*args): | |
0df68c9f RD |
7739 | """ |
7740 | CheckForIntersection(GBSizerItem item, GBSizerItem excludeItem=None) -> bool | |
7741 | CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool | |
7742 | """ | |
e811c8ce RD |
7743 | return _core.GridBagSizer_CheckForIntersection(*args) |
7744 | ||
d14a1e28 RD |
7745 | |
7746 | class GridBagSizerPtr(GridBagSizer): | |
7747 | def __init__(self, this): | |
7748 | self.this = this | |
7749 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7750 | self.__class__ = GridBagSizer | |
7751 | _core.GridBagSizer_swigregister(GridBagSizerPtr) | |
7752 | ||
7753 | #--------------------------------------------------------------------------- | |
7754 | ||
7755 | Left = _core.Left | |
7756 | Top = _core.Top | |
7757 | Right = _core.Right | |
7758 | Bottom = _core.Bottom | |
7759 | Width = _core.Width | |
7760 | Height = _core.Height | |
7761 | Centre = _core.Centre | |
7762 | Center = _core.Center | |
7763 | CentreX = _core.CentreX | |
7764 | CentreY = _core.CentreY | |
7765 | Unconstrained = _core.Unconstrained | |
7766 | AsIs = _core.AsIs | |
7767 | PercentOf = _core.PercentOf | |
7768 | Above = _core.Above | |
7769 | Below = _core.Below | |
7770 | LeftOf = _core.LeftOf | |
7771 | RightOf = _core.RightOf | |
7772 | SameAs = _core.SameAs | |
7773 | Absolute = _core.Absolute | |
7774 | class IndividualLayoutConstraint(Object): | |
d14a1e28 RD |
7775 | def __init__(self): raise RuntimeError, "No constructor defined" |
7776 | def __repr__(self): | |
7777 | return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 7778 | def Set(*args, **kwargs): |
0df68c9f RD |
7779 | """ |
7780 | Set(wxRelationship rel, Window otherW, wxEdge otherE, int val=0, | |
7781 | int marg=wxLAYOUT_DEFAULT_MARGIN) | |
7782 | """ | |
e811c8ce RD |
7783 | return _core.IndividualLayoutConstraint_Set(*args, **kwargs) |
7784 | ||
7785 | def LeftOf(*args, **kwargs): | |
7786 | """LeftOf(Window sibling, int marg=0)""" | |
7787 | return _core.IndividualLayoutConstraint_LeftOf(*args, **kwargs) | |
7788 | ||
7789 | def RightOf(*args, **kwargs): | |
7790 | """RightOf(Window sibling, int marg=0)""" | |
7791 | return _core.IndividualLayoutConstraint_RightOf(*args, **kwargs) | |
7792 | ||
7793 | def Above(*args, **kwargs): | |
7794 | """Above(Window sibling, int marg=0)""" | |
7795 | return _core.IndividualLayoutConstraint_Above(*args, **kwargs) | |
7796 | ||
7797 | def Below(*args, **kwargs): | |
7798 | """Below(Window sibling, int marg=0)""" | |
7799 | return _core.IndividualLayoutConstraint_Below(*args, **kwargs) | |
7800 | ||
7801 | def SameAs(*args, **kwargs): | |
7802 | """SameAs(Window otherW, wxEdge edge, int marg=0)""" | |
7803 | return _core.IndividualLayoutConstraint_SameAs(*args, **kwargs) | |
7804 | ||
7805 | def PercentOf(*args, **kwargs): | |
7806 | """PercentOf(Window otherW, wxEdge wh, int per)""" | |
7807 | return _core.IndividualLayoutConstraint_PercentOf(*args, **kwargs) | |
7808 | ||
7809 | def Absolute(*args, **kwargs): | |
7810 | """Absolute(int val)""" | |
7811 | return _core.IndividualLayoutConstraint_Absolute(*args, **kwargs) | |
7812 | ||
7813 | def Unconstrained(*args, **kwargs): | |
7814 | """Unconstrained()""" | |
7815 | return _core.IndividualLayoutConstraint_Unconstrained(*args, **kwargs) | |
7816 | ||
7817 | def AsIs(*args, **kwargs): | |
7818 | """AsIs()""" | |
7819 | return _core.IndividualLayoutConstraint_AsIs(*args, **kwargs) | |
7820 | ||
7821 | def GetOtherWindow(*args, **kwargs): | |
7822 | """GetOtherWindow() -> Window""" | |
7823 | return _core.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs) | |
7824 | ||
7825 | def GetMyEdge(*args, **kwargs): | |
7826 | """GetMyEdge() -> wxEdge""" | |
7827 | return _core.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs) | |
7828 | ||
7829 | def SetEdge(*args, **kwargs): | |
7830 | """SetEdge(wxEdge which)""" | |
7831 | return _core.IndividualLayoutConstraint_SetEdge(*args, **kwargs) | |
7832 | ||
7833 | def SetValue(*args, **kwargs): | |
7834 | """SetValue(int v)""" | |
7835 | return _core.IndividualLayoutConstraint_SetValue(*args, **kwargs) | |
7836 | ||
7837 | def GetMargin(*args, **kwargs): | |
7838 | """GetMargin() -> int""" | |
7839 | return _core.IndividualLayoutConstraint_GetMargin(*args, **kwargs) | |
7840 | ||
7841 | def SetMargin(*args, **kwargs): | |
7842 | """SetMargin(int m)""" | |
7843 | return _core.IndividualLayoutConstraint_SetMargin(*args, **kwargs) | |
7844 | ||
7845 | def GetValue(*args, **kwargs): | |
7846 | """GetValue() -> int""" | |
7847 | return _core.IndividualLayoutConstraint_GetValue(*args, **kwargs) | |
7848 | ||
7849 | def GetPercent(*args, **kwargs): | |
7850 | """GetPercent() -> int""" | |
7851 | return _core.IndividualLayoutConstraint_GetPercent(*args, **kwargs) | |
7852 | ||
7853 | def GetOtherEdge(*args, **kwargs): | |
7854 | """GetOtherEdge() -> int""" | |
7855 | return _core.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs) | |
7856 | ||
7857 | def GetDone(*args, **kwargs): | |
7858 | """GetDone() -> bool""" | |
7859 | return _core.IndividualLayoutConstraint_GetDone(*args, **kwargs) | |
7860 | ||
7861 | def SetDone(*args, **kwargs): | |
7862 | """SetDone(bool d)""" | |
7863 | return _core.IndividualLayoutConstraint_SetDone(*args, **kwargs) | |
7864 | ||
7865 | def GetRelationship(*args, **kwargs): | |
7866 | """GetRelationship() -> wxRelationship""" | |
7867 | return _core.IndividualLayoutConstraint_GetRelationship(*args, **kwargs) | |
7868 | ||
7869 | def SetRelationship(*args, **kwargs): | |
7870 | """SetRelationship(wxRelationship r)""" | |
7871 | return _core.IndividualLayoutConstraint_SetRelationship(*args, **kwargs) | |
7872 | ||
7873 | def ResetIfWin(*args, **kwargs): | |
7874 | """ResetIfWin(Window otherW) -> bool""" | |
7875 | return _core.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs) | |
7876 | ||
7877 | def SatisfyConstraint(*args, **kwargs): | |
7878 | """SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool""" | |
7879 | return _core.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs) | |
7880 | ||
7881 | def GetEdge(*args, **kwargs): | |
7882 | """GetEdge(wxEdge which, Window thisWin, Window other) -> int""" | |
7883 | return _core.IndividualLayoutConstraint_GetEdge(*args, **kwargs) | |
7884 | ||
d14a1e28 RD |
7885 | |
7886 | class IndividualLayoutConstraintPtr(IndividualLayoutConstraint): | |
7887 | def __init__(self, this): | |
7888 | self.this = this | |
7889 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7890 | self.__class__ = IndividualLayoutConstraint | |
7891 | _core.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr) | |
7892 | ||
7893 | class LayoutConstraints(Object): | |
e811c8ce RD |
7894 | def __repr__(self): |
7895 | return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
7896 | left = property(_core.LayoutConstraints_left_get) |
7897 | top = property(_core.LayoutConstraints_top_get) | |
7898 | right = property(_core.LayoutConstraints_right_get) | |
7899 | bottom = property(_core.LayoutConstraints_bottom_get) | |
7900 | width = property(_core.LayoutConstraints_width_get) | |
7901 | height = property(_core.LayoutConstraints_height_get) | |
7902 | centreX = property(_core.LayoutConstraints_centreX_get) | |
7903 | centreY = property(_core.LayoutConstraints_centreY_get) | |
7904 | def __init__(self, *args, **kwargs): | |
e811c8ce | 7905 | """__init__() -> LayoutConstraints""" |
d14a1e28 RD |
7906 | newobj = _core.new_LayoutConstraints(*args, **kwargs) |
7907 | self.this = newobj.this | |
7908 | self.thisown = 1 | |
7909 | del newobj.thisown | |
e811c8ce | 7910 | def SatisfyConstraints(*args, **kwargs): |
6c3b4aae | 7911 | """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)""" |
e811c8ce RD |
7912 | return _core.LayoutConstraints_SatisfyConstraints(*args, **kwargs) |
7913 | ||
7914 | def AreSatisfied(*args, **kwargs): | |
7915 | """AreSatisfied() -> bool""" | |
7916 | return _core.LayoutConstraints_AreSatisfied(*args, **kwargs) | |
7917 | ||
d14a1e28 RD |
7918 | |
7919 | class LayoutConstraintsPtr(LayoutConstraints): | |
7920 | def __init__(self, this): | |
7921 | self.this = this | |
7922 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7923 | self.__class__ = LayoutConstraints | |
7924 | _core.LayoutConstraints_swigregister(LayoutConstraintsPtr) | |
7925 | ||
7926 | #---------------------------------------------------------------------------- | |
7927 | ||
322913ce | 7928 | # Use Python's bool constants if available, make some if not |
d14a1e28 RD |
7929 | try: |
7930 | True | |
7931 | except NameError: | |
322913ce RD |
7932 | __builtins__.True = 1==1 |
7933 | __builtins__.False = 1==0 | |
d14a1e28 | 7934 | |
d14a1e28 RD |
7935 | |
7936 | ||
7937 | # workarounds for bad wxRTTI names | |
7938 | __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge' | |
7939 | __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider' | |
7940 | __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar' | |
7941 | ||
7942 | ||
7943 | #---------------------------------------------------------------------------- | |
7944 | # Load version numbers from __version__... Ensure that major and minor | |
7945 | # versions are the same for both wxPython and wxWindows. | |
7946 | ||
7947 | from __version__ import * | |
7948 | __version__ = VERSION_STRING | |
7949 | ||
7950 | assert MAJOR_VERSION == _core.MAJOR_VERSION, "wxPython/wxWindows version mismatch" | |
7951 | assert MINOR_VERSION == _core.MINOR_VERSION, "wxPython/wxWindows version mismatch" | |
7952 | if RELEASE_VERSION != _core.RELEASE_VERSION: | |
7953 | import warnings | |
7954 | warnings.warn("wxPython/wxWindows release number mismatch") | |
7955 | ||
7956 | #---------------------------------------------------------------------------- | |
7957 | ||
7958 | class PyDeadObjectError(AttributeError): | |
7959 | pass | |
7960 | ||
7961 | ||
7962 | class _wxPyDeadObject(object): | |
7963 | """ | |
7964 | Instances of wx objects that are OOR capable will have their __class__ | |
7965 | changed to this class when the C++ object is deleted. This should help | |
7966 | prevent crashes due to referencing a bogus C++ pointer. | |
7967 | """ | |
7968 | reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)" | |
7969 | attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed." | |
7970 | ||
7971 | def __repr__( self ): | |
7972 | if not hasattr(self, "_name"): | |
7973 | self._name = "[unknown]" | |
7974 | return self.reprStr % self._name | |
7975 | ||
7976 | def __getattr__( self, *args ): | |
7977 | if not hasattr(self, "_name"): | |
7978 | self._name = "[unknown]" | |
7979 | raise PyDeadObjectError( self.attrStr % self._name ) | |
7980 | ||
7981 | def __nonzero__(self): | |
7982 | return 0 | |
7983 | ||
7984 | ||
7985 | #---------------------------------------------------------------------------- | |
7986 | _wxPyCallAfterId = None | |
7987 | ||
7988 | def CallAfter(callable, *args, **kw): | |
7989 | """ | |
7990 | Call the specified function after the current and pending event | |
7991 | handlers have been completed. This is also good for making GUI | |
7992 | method calls from non-GUI threads. | |
7993 | """ | |
7994 | app = wx.GetApp() | |
7995 | assert app, 'No wxApp created yet' | |
7996 | ||
7997 | global _wxPyCallAfterId | |
7998 | if _wxPyCallAfterId is None: | |
7999 | _wxPyCallAfterId = wx.NewEventType() | |
8000 | app.Connect(-1, -1, _wxPyCallAfterId, | |
8001 | lambda event: event.callable(*event.args, **event.kw) ) | |
8002 | evt = wx.PyEvent() | |
8003 | evt.SetEventType(_wxPyCallAfterId) | |
8004 | evt.callable = callable | |
8005 | evt.args = args | |
8006 | evt.kw = kw | |
8007 | wx.PostEvent(app, evt) | |
8008 | ||
8009 | ||
8010 | #---------------------------------------------------------------------------- | |
8011 | ||
8012 | ||
8013 | class FutureCall: | |
8014 | """ | |
8015 | A convenience class for wxTimer, that calls the given callable | |
8016 | object once after the given amount of milliseconds, passing any | |
8017 | positional or keyword args. The return value of the callable is | |
8018 | availbale after it has been run with the GetResult method. | |
8019 | ||
8020 | If you don't need to get the return value or restart the timer | |
8021 | then there is no need to hold a reference to this object. It will | |
8022 | hold a reference to itself while the timer is running (the timer | |
8023 | has a reference to self.Notify) but the cycle will be broken when | |
8024 | the timer completes, automatically cleaning up the wx.FutureCall | |
8025 | object. | |
8026 | """ | |
8027 | def __init__(self, millis, callable, *args, **kwargs): | |
8028 | self.millis = millis | |
8029 | self.callable = callable | |
8030 | self.SetArgs(*args, **kwargs) | |
8031 | self.runCount = 0 | |
8032 | self.hasRun = False | |
8033 | self.result = None | |
8034 | self.timer = None | |
8035 | self.Start() | |
8036 | ||
8037 | def __del__(self): | |
8038 | self.Stop() | |
8039 | ||
8040 | ||
8041 | def Start(self, millis=None, *args, **kwargs): | |
8042 | """ | |
8043 | (Re)start the timer | |
8044 | """ | |
8045 | self.hasRun = False | |
8046 | if millis is not None: | |
8047 | self.millis = millis | |
8048 | if args or kwargs: | |
8049 | self.SetArgs(*args, **kwargs) | |
8050 | self.Stop() | |
8051 | self.timer = wx.PyTimer(self.Notify) | |
8052 | self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) | |
8053 | Restart = Start | |
8054 | ||
8055 | ||
8056 | def Stop(self): | |
8057 | """ | |
8058 | Stop and destroy the timer. | |
8059 | """ | |
8060 | if self.timer is not None: | |
8061 | self.timer.Stop() | |
8062 | self.timer = None | |
8063 | ||
8064 | ||
8065 | def GetInterval(self): | |
8066 | if self.timer is not None: | |
8067 | return self.timer.GetInterval() | |
8068 | else: | |
8069 | return 0 | |
8070 | ||
8071 | ||
8072 | def IsRunning(self): | |
8073 | return self.timer is not None and self.timer.IsRunning() | |
8074 | ||
8075 | ||
8076 | def SetArgs(self, *args, **kwargs): | |
8077 | """ | |
8078 | (Re)set the args passed to the callable object. This is | |
8079 | useful in conjunction with Restart if you want to schedule a | |
8080 | new call to the same callable object but with different | |
8081 | parameters. | |
8082 | """ | |
8083 | self.args = args | |
8084 | self.kwargs = kwargs | |
8085 | ||
8086 | ||
8087 | def HasRun(self): | |
8088 | return self.hasRun | |
8089 | ||
8090 | def GetResult(self): | |
8091 | return self.result | |
8092 | ||
8093 | def Notify(self): | |
8094 | """ | |
8095 | The timer has expired so call the callable. | |
8096 | """ | |
8097 | if self.callable and getattr(self.callable, 'im_self', True): | |
8098 | self.runCount += 1 | |
8099 | self.result = self.callable(*self.args, **self.kwargs) | |
8100 | self.hasRun = True | |
8101 | wx.CallAfter(self.Stop) | |
8102 | ||
8103 | ||
8104 | #---------------------------------------------------------------------------- | |
8105 | #---------------------------------------------------------------------------- | |
8106 | ||
8107 | # Import other modules in this package that should show up in the | |
8108 | # "core" wx namespace | |
8109 | from gdi import * | |
8110 | from windows import * | |
8111 | from controls import * | |
8112 | from misc import * | |
8113 | ||
8114 | #---------------------------------------------------------------------------- | |
8115 | #---------------------------------------------------------------------------- | |
8116 | ||
8117 |