]>
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 | |
236 | LI_HORIZONTAL = _core.LI_HORIZONTAL | |
237 | LI_VERTICAL = _core.LI_VERTICAL | |
238 | WS_EX_VALIDATE_RECURSIVELY = _core.WS_EX_VALIDATE_RECURSIVELY | |
239 | WS_EX_BLOCK_EVENTS = _core.WS_EX_BLOCK_EVENTS | |
240 | WS_EX_TRANSIENT = _core.WS_EX_TRANSIENT | |
241 | WS_EX_THEMED_BACKGROUND = _core.WS_EX_THEMED_BACKGROUND | |
242 | WS_EX_PROCESS_IDLE = _core.WS_EX_PROCESS_IDLE | |
243 | WS_EX_PROCESS_UI_UPDATES = _core.WS_EX_PROCESS_UI_UPDATES | |
244 | MM_TEXT = _core.MM_TEXT | |
245 | MM_LOMETRIC = _core.MM_LOMETRIC | |
246 | MM_HIMETRIC = _core.MM_HIMETRIC | |
247 | MM_LOENGLISH = _core.MM_LOENGLISH | |
248 | MM_HIENGLISH = _core.MM_HIENGLISH | |
249 | MM_TWIPS = _core.MM_TWIPS | |
250 | MM_ISOTROPIC = _core.MM_ISOTROPIC | |
251 | MM_ANISOTROPIC = _core.MM_ANISOTROPIC | |
252 | MM_POINTS = _core.MM_POINTS | |
253 | MM_METRIC = _core.MM_METRIC | |
254 | CENTRE = _core.CENTRE | |
255 | CENTER = _core.CENTER | |
256 | HORIZONTAL = _core.HORIZONTAL | |
257 | VERTICAL = _core.VERTICAL | |
258 | BOTH = _core.BOTH | |
259 | LEFT = _core.LEFT | |
260 | RIGHT = _core.RIGHT | |
261 | UP = _core.UP | |
262 | DOWN = _core.DOWN | |
263 | TOP = _core.TOP | |
264 | BOTTOM = _core.BOTTOM | |
265 | NORTH = _core.NORTH | |
266 | SOUTH = _core.SOUTH | |
267 | WEST = _core.WEST | |
268 | EAST = _core.EAST | |
269 | ALL = _core.ALL | |
270 | ALIGN_NOT = _core.ALIGN_NOT | |
271 | ALIGN_CENTER_HORIZONTAL = _core.ALIGN_CENTER_HORIZONTAL | |
272 | ALIGN_CENTRE_HORIZONTAL = _core.ALIGN_CENTRE_HORIZONTAL | |
273 | ALIGN_LEFT = _core.ALIGN_LEFT | |
274 | ALIGN_TOP = _core.ALIGN_TOP | |
275 | ALIGN_RIGHT = _core.ALIGN_RIGHT | |
276 | ALIGN_BOTTOM = _core.ALIGN_BOTTOM | |
277 | ALIGN_CENTER_VERTICAL = _core.ALIGN_CENTER_VERTICAL | |
278 | ALIGN_CENTRE_VERTICAL = _core.ALIGN_CENTRE_VERTICAL | |
279 | ALIGN_CENTER = _core.ALIGN_CENTER | |
280 | ALIGN_CENTRE = _core.ALIGN_CENTRE | |
281 | ALIGN_MASK = _core.ALIGN_MASK | |
282 | STRETCH_NOT = _core.STRETCH_NOT | |
283 | SHRINK = _core.SHRINK | |
284 | GROW = _core.GROW | |
285 | EXPAND = _core.EXPAND | |
286 | SHAPED = _core.SHAPED | |
287 | ADJUST_MINSIZE = _core.ADJUST_MINSIZE | |
288 | TILE = _core.TILE | |
289 | BORDER_DEFAULT = _core.BORDER_DEFAULT | |
290 | BORDER_NONE = _core.BORDER_NONE | |
291 | BORDER_STATIC = _core.BORDER_STATIC | |
292 | BORDER_SIMPLE = _core.BORDER_SIMPLE | |
293 | BORDER_RAISED = _core.BORDER_RAISED | |
294 | BORDER_SUNKEN = _core.BORDER_SUNKEN | |
295 | BORDER_DOUBLE = _core.BORDER_DOUBLE | |
296 | BORDER_MASK = _core.BORDER_MASK | |
297 | DEFAULT = _core.DEFAULT | |
298 | DECORATIVE = _core.DECORATIVE | |
299 | ROMAN = _core.ROMAN | |
300 | SCRIPT = _core.SCRIPT | |
301 | SWISS = _core.SWISS | |
302 | MODERN = _core.MODERN | |
303 | TELETYPE = _core.TELETYPE | |
304 | VARIABLE = _core.VARIABLE | |
305 | FIXED = _core.FIXED | |
306 | NORMAL = _core.NORMAL | |
307 | LIGHT = _core.LIGHT | |
308 | BOLD = _core.BOLD | |
309 | ITALIC = _core.ITALIC | |
310 | SLANT = _core.SLANT | |
311 | SOLID = _core.SOLID | |
312 | DOT = _core.DOT | |
313 | LONG_DASH = _core.LONG_DASH | |
314 | SHORT_DASH = _core.SHORT_DASH | |
315 | DOT_DASH = _core.DOT_DASH | |
316 | USER_DASH = _core.USER_DASH | |
317 | TRANSPARENT = _core.TRANSPARENT | |
318 | STIPPLE = _core.STIPPLE | |
319 | BDIAGONAL_HATCH = _core.BDIAGONAL_HATCH | |
320 | CROSSDIAG_HATCH = _core.CROSSDIAG_HATCH | |
321 | FDIAGONAL_HATCH = _core.FDIAGONAL_HATCH | |
322 | CROSS_HATCH = _core.CROSS_HATCH | |
323 | HORIZONTAL_HATCH = _core.HORIZONTAL_HATCH | |
324 | VERTICAL_HATCH = _core.VERTICAL_HATCH | |
325 | JOIN_BEVEL = _core.JOIN_BEVEL | |
326 | JOIN_MITER = _core.JOIN_MITER | |
327 | JOIN_ROUND = _core.JOIN_ROUND | |
328 | CAP_ROUND = _core.CAP_ROUND | |
329 | CAP_PROJECTING = _core.CAP_PROJECTING | |
330 | CAP_BUTT = _core.CAP_BUTT | |
331 | CLEAR = _core.CLEAR | |
332 | XOR = _core.XOR | |
333 | INVERT = _core.INVERT | |
334 | OR_REVERSE = _core.OR_REVERSE | |
335 | AND_REVERSE = _core.AND_REVERSE | |
336 | COPY = _core.COPY | |
337 | AND = _core.AND | |
338 | AND_INVERT = _core.AND_INVERT | |
339 | NO_OP = _core.NO_OP | |
340 | NOR = _core.NOR | |
341 | EQUIV = _core.EQUIV | |
342 | SRC_INVERT = _core.SRC_INVERT | |
343 | OR_INVERT = _core.OR_INVERT | |
344 | NAND = _core.NAND | |
345 | OR = _core.OR | |
346 | SET = _core.SET | |
347 | WXK_BACK = _core.WXK_BACK | |
348 | WXK_TAB = _core.WXK_TAB | |
349 | WXK_RETURN = _core.WXK_RETURN | |
350 | WXK_ESCAPE = _core.WXK_ESCAPE | |
351 | WXK_SPACE = _core.WXK_SPACE | |
352 | WXK_DELETE = _core.WXK_DELETE | |
353 | WXK_START = _core.WXK_START | |
354 | WXK_LBUTTON = _core.WXK_LBUTTON | |
355 | WXK_RBUTTON = _core.WXK_RBUTTON | |
356 | WXK_CANCEL = _core.WXK_CANCEL | |
357 | WXK_MBUTTON = _core.WXK_MBUTTON | |
358 | WXK_CLEAR = _core.WXK_CLEAR | |
359 | WXK_SHIFT = _core.WXK_SHIFT | |
360 | WXK_ALT = _core.WXK_ALT | |
361 | WXK_CONTROL = _core.WXK_CONTROL | |
362 | WXK_MENU = _core.WXK_MENU | |
363 | WXK_PAUSE = _core.WXK_PAUSE | |
364 | WXK_CAPITAL = _core.WXK_CAPITAL | |
365 | WXK_PRIOR = _core.WXK_PRIOR | |
366 | WXK_NEXT = _core.WXK_NEXT | |
367 | WXK_END = _core.WXK_END | |
368 | WXK_HOME = _core.WXK_HOME | |
369 | WXK_LEFT = _core.WXK_LEFT | |
370 | WXK_UP = _core.WXK_UP | |
371 | WXK_RIGHT = _core.WXK_RIGHT | |
372 | WXK_DOWN = _core.WXK_DOWN | |
373 | WXK_SELECT = _core.WXK_SELECT | |
374 | WXK_PRINT = _core.WXK_PRINT | |
375 | WXK_EXECUTE = _core.WXK_EXECUTE | |
376 | WXK_SNAPSHOT = _core.WXK_SNAPSHOT | |
377 | WXK_INSERT = _core.WXK_INSERT | |
378 | WXK_HELP = _core.WXK_HELP | |
379 | WXK_NUMPAD0 = _core.WXK_NUMPAD0 | |
380 | WXK_NUMPAD1 = _core.WXK_NUMPAD1 | |
381 | WXK_NUMPAD2 = _core.WXK_NUMPAD2 | |
382 | WXK_NUMPAD3 = _core.WXK_NUMPAD3 | |
383 | WXK_NUMPAD4 = _core.WXK_NUMPAD4 | |
384 | WXK_NUMPAD5 = _core.WXK_NUMPAD5 | |
385 | WXK_NUMPAD6 = _core.WXK_NUMPAD6 | |
386 | WXK_NUMPAD7 = _core.WXK_NUMPAD7 | |
387 | WXK_NUMPAD8 = _core.WXK_NUMPAD8 | |
388 | WXK_NUMPAD9 = _core.WXK_NUMPAD9 | |
389 | WXK_MULTIPLY = _core.WXK_MULTIPLY | |
390 | WXK_ADD = _core.WXK_ADD | |
391 | WXK_SEPARATOR = _core.WXK_SEPARATOR | |
392 | WXK_SUBTRACT = _core.WXK_SUBTRACT | |
393 | WXK_DECIMAL = _core.WXK_DECIMAL | |
394 | WXK_DIVIDE = _core.WXK_DIVIDE | |
395 | WXK_F1 = _core.WXK_F1 | |
396 | WXK_F2 = _core.WXK_F2 | |
397 | WXK_F3 = _core.WXK_F3 | |
398 | WXK_F4 = _core.WXK_F4 | |
399 | WXK_F5 = _core.WXK_F5 | |
400 | WXK_F6 = _core.WXK_F6 | |
401 | WXK_F7 = _core.WXK_F7 | |
402 | WXK_F8 = _core.WXK_F8 | |
403 | WXK_F9 = _core.WXK_F9 | |
404 | WXK_F10 = _core.WXK_F10 | |
405 | WXK_F11 = _core.WXK_F11 | |
406 | WXK_F12 = _core.WXK_F12 | |
407 | WXK_F13 = _core.WXK_F13 | |
408 | WXK_F14 = _core.WXK_F14 | |
409 | WXK_F15 = _core.WXK_F15 | |
410 | WXK_F16 = _core.WXK_F16 | |
411 | WXK_F17 = _core.WXK_F17 | |
412 | WXK_F18 = _core.WXK_F18 | |
413 | WXK_F19 = _core.WXK_F19 | |
414 | WXK_F20 = _core.WXK_F20 | |
415 | WXK_F21 = _core.WXK_F21 | |
416 | WXK_F22 = _core.WXK_F22 | |
417 | WXK_F23 = _core.WXK_F23 | |
418 | WXK_F24 = _core.WXK_F24 | |
419 | WXK_NUMLOCK = _core.WXK_NUMLOCK | |
420 | WXK_SCROLL = _core.WXK_SCROLL | |
421 | WXK_PAGEUP = _core.WXK_PAGEUP | |
422 | WXK_PAGEDOWN = _core.WXK_PAGEDOWN | |
423 | WXK_NUMPAD_SPACE = _core.WXK_NUMPAD_SPACE | |
424 | WXK_NUMPAD_TAB = _core.WXK_NUMPAD_TAB | |
425 | WXK_NUMPAD_ENTER = _core.WXK_NUMPAD_ENTER | |
426 | WXK_NUMPAD_F1 = _core.WXK_NUMPAD_F1 | |
427 | WXK_NUMPAD_F2 = _core.WXK_NUMPAD_F2 | |
428 | WXK_NUMPAD_F3 = _core.WXK_NUMPAD_F3 | |
429 | WXK_NUMPAD_F4 = _core.WXK_NUMPAD_F4 | |
430 | WXK_NUMPAD_HOME = _core.WXK_NUMPAD_HOME | |
431 | WXK_NUMPAD_LEFT = _core.WXK_NUMPAD_LEFT | |
432 | WXK_NUMPAD_UP = _core.WXK_NUMPAD_UP | |
433 | WXK_NUMPAD_RIGHT = _core.WXK_NUMPAD_RIGHT | |
434 | WXK_NUMPAD_DOWN = _core.WXK_NUMPAD_DOWN | |
435 | WXK_NUMPAD_PRIOR = _core.WXK_NUMPAD_PRIOR | |
436 | WXK_NUMPAD_PAGEUP = _core.WXK_NUMPAD_PAGEUP | |
437 | WXK_NUMPAD_NEXT = _core.WXK_NUMPAD_NEXT | |
438 | WXK_NUMPAD_PAGEDOWN = _core.WXK_NUMPAD_PAGEDOWN | |
439 | WXK_NUMPAD_END = _core.WXK_NUMPAD_END | |
440 | WXK_NUMPAD_BEGIN = _core.WXK_NUMPAD_BEGIN | |
441 | WXK_NUMPAD_INSERT = _core.WXK_NUMPAD_INSERT | |
442 | WXK_NUMPAD_DELETE = _core.WXK_NUMPAD_DELETE | |
443 | WXK_NUMPAD_EQUAL = _core.WXK_NUMPAD_EQUAL | |
444 | WXK_NUMPAD_MULTIPLY = _core.WXK_NUMPAD_MULTIPLY | |
445 | WXK_NUMPAD_ADD = _core.WXK_NUMPAD_ADD | |
446 | WXK_NUMPAD_SEPARATOR = _core.WXK_NUMPAD_SEPARATOR | |
447 | WXK_NUMPAD_SUBTRACT = _core.WXK_NUMPAD_SUBTRACT | |
448 | WXK_NUMPAD_DECIMAL = _core.WXK_NUMPAD_DECIMAL | |
449 | WXK_NUMPAD_DIVIDE = _core.WXK_NUMPAD_DIVIDE | |
450 | WXK_WINDOWS_LEFT = _core.WXK_WINDOWS_LEFT | |
451 | WXK_WINDOWS_RIGHT = _core.WXK_WINDOWS_RIGHT | |
452 | WXK_WINDOWS_MENU = _core.WXK_WINDOWS_MENU | |
453 | PAPER_NONE = _core.PAPER_NONE | |
454 | PAPER_LETTER = _core.PAPER_LETTER | |
455 | PAPER_LEGAL = _core.PAPER_LEGAL | |
456 | PAPER_A4 = _core.PAPER_A4 | |
457 | PAPER_CSHEET = _core.PAPER_CSHEET | |
458 | PAPER_DSHEET = _core.PAPER_DSHEET | |
459 | PAPER_ESHEET = _core.PAPER_ESHEET | |
460 | PAPER_LETTERSMALL = _core.PAPER_LETTERSMALL | |
461 | PAPER_TABLOID = _core.PAPER_TABLOID | |
462 | PAPER_LEDGER = _core.PAPER_LEDGER | |
463 | PAPER_STATEMENT = _core.PAPER_STATEMENT | |
464 | PAPER_EXECUTIVE = _core.PAPER_EXECUTIVE | |
465 | PAPER_A3 = _core.PAPER_A3 | |
466 | PAPER_A4SMALL = _core.PAPER_A4SMALL | |
467 | PAPER_A5 = _core.PAPER_A5 | |
468 | PAPER_B4 = _core.PAPER_B4 | |
469 | PAPER_B5 = _core.PAPER_B5 | |
470 | PAPER_FOLIO = _core.PAPER_FOLIO | |
471 | PAPER_QUARTO = _core.PAPER_QUARTO | |
472 | PAPER_10X14 = _core.PAPER_10X14 | |
473 | PAPER_11X17 = _core.PAPER_11X17 | |
474 | PAPER_NOTE = _core.PAPER_NOTE | |
475 | PAPER_ENV_9 = _core.PAPER_ENV_9 | |
476 | PAPER_ENV_10 = _core.PAPER_ENV_10 | |
477 | PAPER_ENV_11 = _core.PAPER_ENV_11 | |
478 | PAPER_ENV_12 = _core.PAPER_ENV_12 | |
479 | PAPER_ENV_14 = _core.PAPER_ENV_14 | |
480 | PAPER_ENV_DL = _core.PAPER_ENV_DL | |
481 | PAPER_ENV_C5 = _core.PAPER_ENV_C5 | |
482 | PAPER_ENV_C3 = _core.PAPER_ENV_C3 | |
483 | PAPER_ENV_C4 = _core.PAPER_ENV_C4 | |
484 | PAPER_ENV_C6 = _core.PAPER_ENV_C6 | |
485 | PAPER_ENV_C65 = _core.PAPER_ENV_C65 | |
486 | PAPER_ENV_B4 = _core.PAPER_ENV_B4 | |
487 | PAPER_ENV_B5 = _core.PAPER_ENV_B5 | |
488 | PAPER_ENV_B6 = _core.PAPER_ENV_B6 | |
489 | PAPER_ENV_ITALY = _core.PAPER_ENV_ITALY | |
490 | PAPER_ENV_MONARCH = _core.PAPER_ENV_MONARCH | |
491 | PAPER_ENV_PERSONAL = _core.PAPER_ENV_PERSONAL | |
492 | PAPER_FANFOLD_US = _core.PAPER_FANFOLD_US | |
493 | PAPER_FANFOLD_STD_GERMAN = _core.PAPER_FANFOLD_STD_GERMAN | |
494 | PAPER_FANFOLD_LGL_GERMAN = _core.PAPER_FANFOLD_LGL_GERMAN | |
495 | PAPER_ISO_B4 = _core.PAPER_ISO_B4 | |
496 | PAPER_JAPANESE_POSTCARD = _core.PAPER_JAPANESE_POSTCARD | |
497 | PAPER_9X11 = _core.PAPER_9X11 | |
498 | PAPER_10X11 = _core.PAPER_10X11 | |
499 | PAPER_15X11 = _core.PAPER_15X11 | |
500 | PAPER_ENV_INVITE = _core.PAPER_ENV_INVITE | |
501 | PAPER_LETTER_EXTRA = _core.PAPER_LETTER_EXTRA | |
502 | PAPER_LEGAL_EXTRA = _core.PAPER_LEGAL_EXTRA | |
503 | PAPER_TABLOID_EXTRA = _core.PAPER_TABLOID_EXTRA | |
504 | PAPER_A4_EXTRA = _core.PAPER_A4_EXTRA | |
505 | PAPER_LETTER_TRANSVERSE = _core.PAPER_LETTER_TRANSVERSE | |
506 | PAPER_A4_TRANSVERSE = _core.PAPER_A4_TRANSVERSE | |
507 | PAPER_LETTER_EXTRA_TRANSVERSE = _core.PAPER_LETTER_EXTRA_TRANSVERSE | |
508 | PAPER_A_PLUS = _core.PAPER_A_PLUS | |
509 | PAPER_B_PLUS = _core.PAPER_B_PLUS | |
510 | PAPER_LETTER_PLUS = _core.PAPER_LETTER_PLUS | |
511 | PAPER_A4_PLUS = _core.PAPER_A4_PLUS | |
512 | PAPER_A5_TRANSVERSE = _core.PAPER_A5_TRANSVERSE | |
513 | PAPER_B5_TRANSVERSE = _core.PAPER_B5_TRANSVERSE | |
514 | PAPER_A3_EXTRA = _core.PAPER_A3_EXTRA | |
515 | PAPER_A5_EXTRA = _core.PAPER_A5_EXTRA | |
516 | PAPER_B5_EXTRA = _core.PAPER_B5_EXTRA | |
517 | PAPER_A2 = _core.PAPER_A2 | |
518 | PAPER_A3_TRANSVERSE = _core.PAPER_A3_TRANSVERSE | |
519 | PAPER_A3_EXTRA_TRANSVERSE = _core.PAPER_A3_EXTRA_TRANSVERSE | |
520 | DUPLEX_SIMPLEX = _core.DUPLEX_SIMPLEX | |
521 | DUPLEX_HORIZONTAL = _core.DUPLEX_HORIZONTAL | |
522 | DUPLEX_VERTICAL = _core.DUPLEX_VERTICAL | |
523 | ITEM_SEPARATOR = _core.ITEM_SEPARATOR | |
524 | ITEM_NORMAL = _core.ITEM_NORMAL | |
525 | ITEM_CHECK = _core.ITEM_CHECK | |
526 | ITEM_RADIO = _core.ITEM_RADIO | |
527 | ITEM_MAX = _core.ITEM_MAX | |
528 | HT_NOWHERE = _core.HT_NOWHERE | |
529 | HT_SCROLLBAR_FIRST = _core.HT_SCROLLBAR_FIRST | |
530 | HT_SCROLLBAR_ARROW_LINE_1 = _core.HT_SCROLLBAR_ARROW_LINE_1 | |
531 | HT_SCROLLBAR_ARROW_LINE_2 = _core.HT_SCROLLBAR_ARROW_LINE_2 | |
532 | HT_SCROLLBAR_ARROW_PAGE_1 = _core.HT_SCROLLBAR_ARROW_PAGE_1 | |
533 | HT_SCROLLBAR_ARROW_PAGE_2 = _core.HT_SCROLLBAR_ARROW_PAGE_2 | |
534 | HT_SCROLLBAR_THUMB = _core.HT_SCROLLBAR_THUMB | |
535 | HT_SCROLLBAR_BAR_1 = _core.HT_SCROLLBAR_BAR_1 | |
536 | HT_SCROLLBAR_BAR_2 = _core.HT_SCROLLBAR_BAR_2 | |
537 | HT_SCROLLBAR_LAST = _core.HT_SCROLLBAR_LAST | |
538 | HT_WINDOW_OUTSIDE = _core.HT_WINDOW_OUTSIDE | |
539 | HT_WINDOW_INSIDE = _core.HT_WINDOW_INSIDE | |
540 | HT_WINDOW_VERT_SCROLLBAR = _core.HT_WINDOW_VERT_SCROLLBAR | |
541 | HT_WINDOW_HORZ_SCROLLBAR = _core.HT_WINDOW_HORZ_SCROLLBAR | |
542 | HT_WINDOW_CORNER = _core.HT_WINDOW_CORNER | |
543 | HT_MAX = _core.HT_MAX | |
544 | MOD_NONE = _core.MOD_NONE | |
545 | MOD_ALT = _core.MOD_ALT | |
546 | MOD_CONTROL = _core.MOD_CONTROL | |
547 | MOD_SHIFT = _core.MOD_SHIFT | |
548 | MOD_WIN = _core.MOD_WIN | |
549 | UPDATE_UI_NONE = _core.UPDATE_UI_NONE | |
550 | UPDATE_UI_RECURSE = _core.UPDATE_UI_RECURSE | |
551 | UPDATE_UI_FROMIDLE = _core.UPDATE_UI_FROMIDLE | |
552 | #--------------------------------------------------------------------------- | |
553 | ||
554 | class Object(object): | |
0df68c9f RD |
555 | """ |
556 | The base class for most wx objects, although in wxPython not | |
557 | much functionality is needed nor exposed. | |
558 | """ | |
d14a1e28 RD |
559 | def __init__(self): raise RuntimeError, "No constructor defined" |
560 | def __repr__(self): | |
561 | return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 562 | def GetClassName(*args, **kwargs): |
0df68c9f RD |
563 | """ |
564 | GetClassName() -> wxString | |
e811c8ce | 565 | |
0df68c9f RD |
566 | Returns the class name of the C++ object using wxRTTI. |
567 | """ | |
e811c8ce RD |
568 | return _core.Object_GetClassName(*args, **kwargs) |
569 | ||
570 | def Destroy(*args, **kwargs): | |
0df68c9f RD |
571 | """ |
572 | Destroy() | |
e811c8ce | 573 | |
0df68c9f RD |
574 | Deletes the C++ object this Python object is a proxy for. |
575 | """ | |
e811c8ce RD |
576 | return _core.Object_Destroy(*args, **kwargs) |
577 | ||
d14a1e28 RD |
578 | |
579 | class ObjectPtr(Object): | |
580 | def __init__(self, this): | |
581 | self.this = this | |
582 | if not hasattr(self,"thisown"): self.thisown = 0 | |
583 | self.__class__ = Object | |
584 | _core.Object_swigregister(ObjectPtr) | |
585 | _wxPySetDictionary = _core._wxPySetDictionary | |
586 | ||
587 | ||
588 | #--------------------------------------------------------------------------- | |
589 | ||
590 | BITMAP_TYPE_INVALID = _core.BITMAP_TYPE_INVALID | |
591 | BITMAP_TYPE_BMP = _core.BITMAP_TYPE_BMP | |
592 | BITMAP_TYPE_BMP_RESOURCE = _core.BITMAP_TYPE_BMP_RESOURCE | |
593 | BITMAP_TYPE_RESOURCE = _core.BITMAP_TYPE_RESOURCE | |
594 | BITMAP_TYPE_ICO = _core.BITMAP_TYPE_ICO | |
595 | BITMAP_TYPE_ICO_RESOURCE = _core.BITMAP_TYPE_ICO_RESOURCE | |
596 | BITMAP_TYPE_CUR = _core.BITMAP_TYPE_CUR | |
597 | BITMAP_TYPE_CUR_RESOURCE = _core.BITMAP_TYPE_CUR_RESOURCE | |
598 | BITMAP_TYPE_XBM = _core.BITMAP_TYPE_XBM | |
599 | BITMAP_TYPE_XBM_DATA = _core.BITMAP_TYPE_XBM_DATA | |
600 | BITMAP_TYPE_XPM = _core.BITMAP_TYPE_XPM | |
601 | BITMAP_TYPE_XPM_DATA = _core.BITMAP_TYPE_XPM_DATA | |
602 | BITMAP_TYPE_TIF = _core.BITMAP_TYPE_TIF | |
603 | BITMAP_TYPE_TIF_RESOURCE = _core.BITMAP_TYPE_TIF_RESOURCE | |
604 | BITMAP_TYPE_GIF = _core.BITMAP_TYPE_GIF | |
605 | BITMAP_TYPE_GIF_RESOURCE = _core.BITMAP_TYPE_GIF_RESOURCE | |
606 | BITMAP_TYPE_PNG = _core.BITMAP_TYPE_PNG | |
607 | BITMAP_TYPE_PNG_RESOURCE = _core.BITMAP_TYPE_PNG_RESOURCE | |
608 | BITMAP_TYPE_JPEG = _core.BITMAP_TYPE_JPEG | |
609 | BITMAP_TYPE_JPEG_RESOURCE = _core.BITMAP_TYPE_JPEG_RESOURCE | |
610 | BITMAP_TYPE_PNM = _core.BITMAP_TYPE_PNM | |
611 | BITMAP_TYPE_PNM_RESOURCE = _core.BITMAP_TYPE_PNM_RESOURCE | |
612 | BITMAP_TYPE_PCX = _core.BITMAP_TYPE_PCX | |
613 | BITMAP_TYPE_PCX_RESOURCE = _core.BITMAP_TYPE_PCX_RESOURCE | |
614 | BITMAP_TYPE_PICT = _core.BITMAP_TYPE_PICT | |
615 | BITMAP_TYPE_PICT_RESOURCE = _core.BITMAP_TYPE_PICT_RESOURCE | |
616 | BITMAP_TYPE_ICON = _core.BITMAP_TYPE_ICON | |
617 | BITMAP_TYPE_ICON_RESOURCE = _core.BITMAP_TYPE_ICON_RESOURCE | |
618 | BITMAP_TYPE_ANI = _core.BITMAP_TYPE_ANI | |
619 | BITMAP_TYPE_IFF = _core.BITMAP_TYPE_IFF | |
620 | BITMAP_TYPE_MACCURSOR = _core.BITMAP_TYPE_MACCURSOR | |
621 | BITMAP_TYPE_MACCURSOR_RESOURCE = _core.BITMAP_TYPE_MACCURSOR_RESOURCE | |
622 | BITMAP_TYPE_ANY = _core.BITMAP_TYPE_ANY | |
623 | CURSOR_NONE = _core.CURSOR_NONE | |
624 | CURSOR_ARROW = _core.CURSOR_ARROW | |
625 | CURSOR_RIGHT_ARROW = _core.CURSOR_RIGHT_ARROW | |
626 | CURSOR_BULLSEYE = _core.CURSOR_BULLSEYE | |
627 | CURSOR_CHAR = _core.CURSOR_CHAR | |
628 | CURSOR_CROSS = _core.CURSOR_CROSS | |
629 | CURSOR_HAND = _core.CURSOR_HAND | |
630 | CURSOR_IBEAM = _core.CURSOR_IBEAM | |
631 | CURSOR_LEFT_BUTTON = _core.CURSOR_LEFT_BUTTON | |
632 | CURSOR_MAGNIFIER = _core.CURSOR_MAGNIFIER | |
633 | CURSOR_MIDDLE_BUTTON = _core.CURSOR_MIDDLE_BUTTON | |
634 | CURSOR_NO_ENTRY = _core.CURSOR_NO_ENTRY | |
635 | CURSOR_PAINT_BRUSH = _core.CURSOR_PAINT_BRUSH | |
636 | CURSOR_PENCIL = _core.CURSOR_PENCIL | |
637 | CURSOR_POINT_LEFT = _core.CURSOR_POINT_LEFT | |
638 | CURSOR_POINT_RIGHT = _core.CURSOR_POINT_RIGHT | |
639 | CURSOR_QUESTION_ARROW = _core.CURSOR_QUESTION_ARROW | |
640 | CURSOR_RIGHT_BUTTON = _core.CURSOR_RIGHT_BUTTON | |
641 | CURSOR_SIZENESW = _core.CURSOR_SIZENESW | |
642 | CURSOR_SIZENS = _core.CURSOR_SIZENS | |
643 | CURSOR_SIZENWSE = _core.CURSOR_SIZENWSE | |
644 | CURSOR_SIZEWE = _core.CURSOR_SIZEWE | |
645 | CURSOR_SIZING = _core.CURSOR_SIZING | |
646 | CURSOR_SPRAYCAN = _core.CURSOR_SPRAYCAN | |
647 | CURSOR_WAIT = _core.CURSOR_WAIT | |
648 | CURSOR_WATCH = _core.CURSOR_WATCH | |
649 | CURSOR_BLANK = _core.CURSOR_BLANK | |
650 | CURSOR_DEFAULT = _core.CURSOR_DEFAULT | |
651 | CURSOR_COPY_ARROW = _core.CURSOR_COPY_ARROW | |
652 | CURSOR_ARROWWAIT = _core.CURSOR_ARROWWAIT | |
653 | CURSOR_MAX = _core.CURSOR_MAX | |
654 | #--------------------------------------------------------------------------- | |
655 | ||
656 | class Size(object): | |
0df68c9f RD |
657 | """ |
658 | wx.Size is a useful data structure used to represent the size of something. | |
659 | It simply contians integer width and height proprtites. In most places in | |
660 | wxPython where a wx.Size is expected a (width,height) tuple can be used | |
661 | instead. | |
662 | """ | |
e811c8ce RD |
663 | def __repr__(self): |
664 | return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
665 | width = property(_core.Size_width_get, _core.Size_width_set) |
666 | height = property(_core.Size_height_get, _core.Size_height_set) | |
242b7b46 | 667 | x = width; y = height |
d14a1e28 | 668 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
669 | """ |
670 | __init__(int w=0, int h=0) -> Size | |
e811c8ce | 671 | |
0df68c9f RD |
672 | Creates a size object. |
673 | """ | |
d14a1e28 RD |
674 | newobj = _core.new_Size(*args, **kwargs) |
675 | self.this = newobj.this | |
676 | self.thisown = 1 | |
677 | del newobj.thisown | |
678 | def __del__(self, destroy=_core.delete_Size): | |
e811c8ce | 679 | """__del__()""" |
d14a1e28 RD |
680 | try: |
681 | if self.thisown: destroy(self) | |
682 | except: pass | |
e811c8ce RD |
683 | |
684 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
685 | """ |
686 | __eq__(Size sz) -> bool | |
e811c8ce | 687 | |
0df68c9f RD |
688 | Test for equality of wx.Size objects. |
689 | """ | |
e811c8ce RD |
690 | return _core.Size___eq__(*args, **kwargs) |
691 | ||
692 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
693 | """ |
694 | __ne__(Size sz) -> bool | |
e811c8ce | 695 | |
0df68c9f RD |
696 | Test for inequality. |
697 | """ | |
e811c8ce RD |
698 | return _core.Size___ne__(*args, **kwargs) |
699 | ||
700 | def __add__(*args, **kwargs): | |
0df68c9f RD |
701 | """ |
702 | __add__(Size sz) -> Size | |
e811c8ce | 703 | |
0df68c9f RD |
704 | Add sz's proprties to this and return the result. |
705 | """ | |
e811c8ce RD |
706 | return _core.Size___add__(*args, **kwargs) |
707 | ||
708 | def __sub__(*args, **kwargs): | |
0df68c9f RD |
709 | """ |
710 | __sub__(Size sz) -> Size | |
e811c8ce | 711 | |
0df68c9f RD |
712 | Subtract sz's properties from this and return the result. |
713 | """ | |
e811c8ce RD |
714 | return _core.Size___sub__(*args, **kwargs) |
715 | ||
716 | def IncTo(*args, **kwargs): | |
0df68c9f RD |
717 | """ |
718 | IncTo(Size sz) | |
e811c8ce | 719 | |
0df68c9f RD |
720 | Increments this object so that both of its dimensions are not less |
721 | than the corresponding dimensions of the size. | |
722 | """ | |
e811c8ce RD |
723 | return _core.Size_IncTo(*args, **kwargs) |
724 | ||
725 | def DecTo(*args, **kwargs): | |
0df68c9f RD |
726 | """ |
727 | DecTo(Size sz) | |
e811c8ce | 728 | |
0df68c9f RD |
729 | Decrements this object so that both of its dimensions are not greater |
730 | than the corresponding dimensions of the size. | |
731 | """ | |
e811c8ce RD |
732 | return _core.Size_DecTo(*args, **kwargs) |
733 | ||
734 | def Set(*args, **kwargs): | |
0df68c9f RD |
735 | """ |
736 | Set(int w, int h) | |
e811c8ce | 737 | |
0df68c9f RD |
738 | Set both width and height. |
739 | """ | |
e811c8ce RD |
740 | return _core.Size_Set(*args, **kwargs) |
741 | ||
742 | def SetWidth(*args, **kwargs): | |
743 | """SetWidth(int w)""" | |
744 | return _core.Size_SetWidth(*args, **kwargs) | |
745 | ||
746 | def SetHeight(*args, **kwargs): | |
747 | """SetHeight(int h)""" | |
748 | return _core.Size_SetHeight(*args, **kwargs) | |
749 | ||
750 | def GetWidth(*args, **kwargs): | |
751 | """GetWidth() -> int""" | |
752 | return _core.Size_GetWidth(*args, **kwargs) | |
753 | ||
754 | def GetHeight(*args, **kwargs): | |
755 | """GetHeight() -> int""" | |
756 | return _core.Size_GetHeight(*args, **kwargs) | |
757 | ||
758 | def Get(*args, **kwargs): | |
0df68c9f RD |
759 | """ |
760 | Get() -> (width,height) | |
e811c8ce | 761 | |
0df68c9f RD |
762 | Returns the width and height properties as a tuple. |
763 | """ | |
e811c8ce RD |
764 | return _core.Size_Get(*args, **kwargs) |
765 | ||
766 | asTuple = Get | |
767 | def __str__(self): return str(self.Get()) | |
768 | def __repr__(self): return 'wx.Size'+str(self.Get()) | |
769 | def __len__(self): return len(self.Get()) | |
770 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
771 | def __setitem__(self, index, val): |
772 | if index == 0: self.width = val | |
773 | elif index == 1: self.height = val | |
774 | else: raise IndexError | |
e811c8ce | 775 | def __nonzero__(self): return self.Get() != (0,0) |
d14a1e28 | 776 | def __getinitargs__(self): return () |
e811c8ce | 777 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
778 | def __setstate__(self, state): self.Set(*state) |
779 | ||
780 | ||
781 | class SizePtr(Size): | |
782 | def __init__(self, this): | |
783 | self.this = this | |
784 | if not hasattr(self,"thisown"): self.thisown = 0 | |
785 | self.__class__ = Size | |
786 | _core.Size_swigregister(SizePtr) | |
787 | ||
788 | #--------------------------------------------------------------------------- | |
789 | ||
790 | class RealPoint(object): | |
0df68c9f RD |
791 | """ |
792 | A data structure for representing a point or position with floating point x | |
793 | and y properties. In wxPython most places that expect a wx.RealPoint can also | |
794 | accept a (x,y) tuple. | |
795 | """ | |
e811c8ce RD |
796 | def __repr__(self): |
797 | return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
798 | x = property(_core.RealPoint_x_get, _core.RealPoint_x_set) |
799 | y = property(_core.RealPoint_y_get, _core.RealPoint_y_set) | |
800 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
801 | """ |
802 | __init__(double x=0.0, double y=0.0) -> RealPoint | |
e811c8ce | 803 | |
0df68c9f RD |
804 | Create a wx.RealPoint object |
805 | """ | |
d14a1e28 RD |
806 | newobj = _core.new_RealPoint(*args, **kwargs) |
807 | self.this = newobj.this | |
808 | self.thisown = 1 | |
809 | del newobj.thisown | |
810 | def __del__(self, destroy=_core.delete_RealPoint): | |
e811c8ce | 811 | """__del__()""" |
d14a1e28 RD |
812 | try: |
813 | if self.thisown: destroy(self) | |
814 | except: pass | |
e811c8ce RD |
815 | |
816 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
817 | """ |
818 | __eq__(RealPoint pt) -> bool | |
e811c8ce | 819 | |
0df68c9f RD |
820 | Test for equality of wx.RealPoint objects. |
821 | """ | |
e811c8ce RD |
822 | return _core.RealPoint___eq__(*args, **kwargs) |
823 | ||
824 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
825 | """ |
826 | __ne__(RealPoint pt) -> bool | |
e811c8ce | 827 | |
0df68c9f RD |
828 | Test for inequality of wx.RealPoint objects. |
829 | """ | |
e811c8ce RD |
830 | return _core.RealPoint___ne__(*args, **kwargs) |
831 | ||
832 | def __add__(*args, **kwargs): | |
0df68c9f RD |
833 | """ |
834 | __add__(RealPoint pt) -> RealPoint | |
e811c8ce | 835 | |
0df68c9f RD |
836 | Add pt's proprties to this and return the result. |
837 | """ | |
e811c8ce RD |
838 | return _core.RealPoint___add__(*args, **kwargs) |
839 | ||
840 | def __sub__(*args, **kwargs): | |
0df68c9f RD |
841 | """ |
842 | __sub__(RealPoint pt) -> RealPoint | |
e811c8ce | 843 | |
0df68c9f RD |
844 | Subtract pt's proprties from this and return the result |
845 | """ | |
e811c8ce RD |
846 | return _core.RealPoint___sub__(*args, **kwargs) |
847 | ||
848 | def Set(*args, **kwargs): | |
0df68c9f RD |
849 | """ |
850 | Set(double x, double y) | |
e811c8ce | 851 | |
0df68c9f RD |
852 | Set both the x and y properties |
853 | """ | |
e811c8ce RD |
854 | return _core.RealPoint_Set(*args, **kwargs) |
855 | ||
856 | def Get(*args, **kwargs): | |
0df68c9f RD |
857 | """ |
858 | Get() -> (x,y) | |
e811c8ce | 859 | |
0df68c9f RD |
860 | Return the x and y properties as a tuple. |
861 | """ | |
e811c8ce RD |
862 | return _core.RealPoint_Get(*args, **kwargs) |
863 | ||
864 | asTuple = Get | |
865 | def __str__(self): return str(self.Get()) | |
866 | def __repr__(self): return 'wx.RealPoint'+str(self.Get()) | |
867 | def __len__(self): return len(self.Get()) | |
868 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 869 | def __setitem__(self, index, val): |
e811c8ce RD |
870 | if index == 0: self.x = val |
871 | elif index == 1: self.y = val | |
d14a1e28 | 872 | else: raise IndexError |
e811c8ce | 873 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
d14a1e28 | 874 | def __getinitargs__(self): return () |
e811c8ce | 875 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
876 | def __setstate__(self, state): self.Set(*state) |
877 | ||
878 | ||
879 | class RealPointPtr(RealPoint): | |
880 | def __init__(self, this): | |
881 | self.this = this | |
882 | if not hasattr(self,"thisown"): self.thisown = 0 | |
883 | self.__class__ = RealPoint | |
884 | _core.RealPoint_swigregister(RealPointPtr) | |
885 | ||
886 | #--------------------------------------------------------------------------- | |
887 | ||
888 | class Point(object): | |
0df68c9f RD |
889 | """ |
890 | A data structure for representing a point or position with integer x and y | |
891 | properties. Most places in wxPython that expect a wx.Point can also accept a | |
892 | (x,y) tuple. | |
893 | """ | |
e811c8ce RD |
894 | def __repr__(self): |
895 | return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
896 | x = property(_core.Point_x_get, _core.Point_x_set) |
897 | y = property(_core.Point_y_get, _core.Point_y_set) | |
898 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
899 | """ |
900 | __init__(int x=0, int y=0) -> Point | |
e811c8ce | 901 | |
0df68c9f RD |
902 | Create a wx.Point object |
903 | """ | |
d14a1e28 RD |
904 | newobj = _core.new_Point(*args, **kwargs) |
905 | self.this = newobj.this | |
906 | self.thisown = 1 | |
907 | del newobj.thisown | |
908 | def __del__(self, destroy=_core.delete_Point): | |
e811c8ce | 909 | """__del__()""" |
d14a1e28 RD |
910 | try: |
911 | if self.thisown: destroy(self) | |
912 | except: pass | |
e811c8ce RD |
913 | |
914 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
915 | """ |
916 | __eq__(Point pt) -> bool | |
e811c8ce | 917 | |
0df68c9f RD |
918 | Test for equality of wx.Point objects. |
919 | """ | |
e811c8ce RD |
920 | return _core.Point___eq__(*args, **kwargs) |
921 | ||
922 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
923 | """ |
924 | __ne__(Point pt) -> bool | |
e811c8ce | 925 | |
0df68c9f RD |
926 | Test for inequality of wx.Point objects. |
927 | """ | |
e811c8ce RD |
928 | return _core.Point___ne__(*args, **kwargs) |
929 | ||
930 | def __add__(*args, **kwargs): | |
0df68c9f RD |
931 | """ |
932 | __add__(Point pt) -> Point | |
e811c8ce | 933 | |
0df68c9f RD |
934 | Add pt's proprties to this and return the result. |
935 | """ | |
e811c8ce RD |
936 | return _core.Point___add__(*args, **kwargs) |
937 | ||
938 | def __sub__(*args, **kwargs): | |
0df68c9f RD |
939 | """ |
940 | __sub__(Point pt) -> Point | |
e811c8ce | 941 | |
0df68c9f RD |
942 | Subtract pt's proprties from this and return the result |
943 | """ | |
e811c8ce RD |
944 | return _core.Point___sub__(*args, **kwargs) |
945 | ||
946 | def __iadd__(*args, **kwargs): | |
0df68c9f RD |
947 | """ |
948 | __iadd__(Point pt) -> Point | |
e811c8ce | 949 | |
0df68c9f RD |
950 | Add pt to this object. |
951 | """ | |
e811c8ce RD |
952 | return _core.Point___iadd__(*args, **kwargs) |
953 | ||
954 | def __isub__(*args, **kwargs): | |
0df68c9f RD |
955 | """ |
956 | __isub__(Point pt) -> Point | |
e811c8ce | 957 | |
0df68c9f RD |
958 | Subtract pt from this object. |
959 | """ | |
e811c8ce RD |
960 | return _core.Point___isub__(*args, **kwargs) |
961 | ||
962 | def Set(*args, **kwargs): | |
0df68c9f RD |
963 | """ |
964 | Set(long x, long y) | |
e811c8ce | 965 | |
0df68c9f RD |
966 | Set both the x and y properties |
967 | """ | |
e811c8ce RD |
968 | return _core.Point_Set(*args, **kwargs) |
969 | ||
970 | def Get(*args, **kwargs): | |
0df68c9f RD |
971 | """ |
972 | Get() -> (x,y) | |
e811c8ce | 973 | |
0df68c9f RD |
974 | Return the x and y properties as a tuple. |
975 | """ | |
e811c8ce RD |
976 | return _core.Point_Get(*args, **kwargs) |
977 | ||
978 | asTuple = Get | |
979 | def __str__(self): return str(self.Get()) | |
980 | def __repr__(self): return 'wx.Point'+str(self.Get()) | |
981 | def __len__(self): return len(self.Get()) | |
982 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
983 | def __setitem__(self, index, val): |
984 | if index == 0: self.x = val | |
985 | elif index == 1: self.y = val | |
986 | else: raise IndexError | |
e811c8ce | 987 | def __nonzero__(self): return self.Get() != (0,0) |
d14a1e28 | 988 | def __getinitargs__(self): return () |
e811c8ce | 989 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
990 | def __setstate__(self, state): self.Set(*state) |
991 | ||
992 | ||
993 | class PointPtr(Point): | |
994 | def __init__(self, this): | |
995 | self.this = this | |
996 | if not hasattr(self,"thisown"): self.thisown = 0 | |
997 | self.__class__ = Point | |
998 | _core.Point_swigregister(PointPtr) | |
999 | ||
1000 | #--------------------------------------------------------------------------- | |
1001 | ||
1002 | class Rect(object): | |
0df68c9f RD |
1003 | """ |
1004 | A class for representing and manipulating rectangles. It has x, y, width and | |
1005 | height properties. In wxPython most palces that expect a wx.Rect can also | |
1006 | accept a (x,y,width,height) tuple. | |
1007 | """ | |
e811c8ce RD |
1008 | def __repr__(self): |
1009 | return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1010 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
1011 | """ |
1012 | __init__(int x=0, int y=0, int width=0, int height=0) -> Rect | |
e811c8ce | 1013 | |
0df68c9f RD |
1014 | Create a new Rect object. |
1015 | """ | |
d14a1e28 RD |
1016 | newobj = _core.new_Rect(*args, **kwargs) |
1017 | self.this = newobj.this | |
1018 | self.thisown = 1 | |
1019 | del newobj.thisown | |
1020 | def __del__(self, destroy=_core.delete_Rect): | |
e811c8ce | 1021 | """__del__()""" |
d14a1e28 RD |
1022 | try: |
1023 | if self.thisown: destroy(self) | |
1024 | except: pass | |
e811c8ce RD |
1025 | |
1026 | def GetX(*args, **kwargs): | |
1027 | """GetX() -> int""" | |
1028 | return _core.Rect_GetX(*args, **kwargs) | |
1029 | ||
1030 | def SetX(*args, **kwargs): | |
1031 | """SetX(int x)""" | |
1032 | return _core.Rect_SetX(*args, **kwargs) | |
1033 | ||
1034 | def GetY(*args, **kwargs): | |
1035 | """GetY() -> int""" | |
1036 | return _core.Rect_GetY(*args, **kwargs) | |
1037 | ||
1038 | def SetY(*args, **kwargs): | |
1039 | """SetY(int y)""" | |
1040 | return _core.Rect_SetY(*args, **kwargs) | |
1041 | ||
1042 | def GetWidth(*args, **kwargs): | |
1043 | """GetWidth() -> int""" | |
1044 | return _core.Rect_GetWidth(*args, **kwargs) | |
1045 | ||
1046 | def SetWidth(*args, **kwargs): | |
1047 | """SetWidth(int w)""" | |
1048 | return _core.Rect_SetWidth(*args, **kwargs) | |
1049 | ||
1050 | def GetHeight(*args, **kwargs): | |
1051 | """GetHeight() -> int""" | |
1052 | return _core.Rect_GetHeight(*args, **kwargs) | |
1053 | ||
1054 | def SetHeight(*args, **kwargs): | |
1055 | """SetHeight(int h)""" | |
1056 | return _core.Rect_SetHeight(*args, **kwargs) | |
1057 | ||
1058 | def GetPosition(*args, **kwargs): | |
1059 | """GetPosition() -> Point""" | |
1060 | return _core.Rect_GetPosition(*args, **kwargs) | |
1061 | ||
1062 | def SetPosition(*args, **kwargs): | |
1063 | """SetPosition(Point p)""" | |
1064 | return _core.Rect_SetPosition(*args, **kwargs) | |
1065 | ||
1066 | def GetSize(*args, **kwargs): | |
1067 | """GetSize() -> Size""" | |
1068 | return _core.Rect_GetSize(*args, **kwargs) | |
1069 | ||
1070 | def SetSize(*args, **kwargs): | |
1071 | """SetSize(Size s)""" | |
1072 | return _core.Rect_SetSize(*args, **kwargs) | |
1073 | ||
1074 | def GetLeft(*args, **kwargs): | |
1075 | """GetLeft() -> int""" | |
1076 | return _core.Rect_GetLeft(*args, **kwargs) | |
1077 | ||
1078 | def GetTop(*args, **kwargs): | |
1079 | """GetTop() -> int""" | |
1080 | return _core.Rect_GetTop(*args, **kwargs) | |
1081 | ||
1082 | def GetBottom(*args, **kwargs): | |
1083 | """GetBottom() -> int""" | |
1084 | return _core.Rect_GetBottom(*args, **kwargs) | |
1085 | ||
1086 | def GetRight(*args, **kwargs): | |
1087 | """GetRight() -> int""" | |
1088 | return _core.Rect_GetRight(*args, **kwargs) | |
1089 | ||
1090 | def SetLeft(*args, **kwargs): | |
1091 | """SetLeft(int left)""" | |
1092 | return _core.Rect_SetLeft(*args, **kwargs) | |
1093 | ||
1094 | def SetRight(*args, **kwargs): | |
1095 | """SetRight(int right)""" | |
1096 | return _core.Rect_SetRight(*args, **kwargs) | |
1097 | ||
1098 | def SetTop(*args, **kwargs): | |
1099 | """SetTop(int top)""" | |
1100 | return _core.Rect_SetTop(*args, **kwargs) | |
1101 | ||
1102 | def SetBottom(*args, **kwargs): | |
1103 | """SetBottom(int bottom)""" | |
1104 | return _core.Rect_SetBottom(*args, **kwargs) | |
1105 | ||
1106 | position = property(GetPosition, SetPosition) | |
1107 | size = property(GetSize, SetSize) | |
1108 | left = property(GetLeft, SetLeft) | |
1109 | right = property(GetRight, SetRight) | |
1110 | top = property(GetTop, SetTop) | |
1111 | bottom = property(GetBottom, SetBottom) | |
1112 | ||
1113 | def Inflate(*args, **kwargs): | |
0df68c9f RD |
1114 | """ |
1115 | Inflate(int dx, int dy) -> Rect | |
e811c8ce | 1116 | |
0df68c9f RD |
1117 | Increase the rectangle size by dx in x direction and dy in y direction. Both |
1118 | (or one of) parameters may be negative to decrease the rectangle size. | |
1119 | """ | |
e811c8ce RD |
1120 | return _core.Rect_Inflate(*args, **kwargs) |
1121 | ||
1122 | def Deflate(*args, **kwargs): | |
0df68c9f RD |
1123 | """ |
1124 | Deflate(int dx, int dy) -> Rect | |
e811c8ce | 1125 | |
0df68c9f RD |
1126 | Decrease the rectangle size by dx in x direction and dy in y direction. Both |
1127 | (or one of) parameters may be negative to increase the rectngle size. This | |
1128 | method is the opposite of Inflate. | |
1129 | """ | |
e811c8ce RD |
1130 | return _core.Rect_Deflate(*args, **kwargs) |
1131 | ||
1132 | def OffsetXY(*args, **kwargs): | |
0df68c9f RD |
1133 | """ |
1134 | OffsetXY(int dx, int dy) | |
e811c8ce | 1135 | |
0df68c9f RD |
1136 | Moves the rectangle by the specified offset. If dx is positive, the rectangle |
1137 | is moved to the right, if dy is positive, it is moved to the bottom, otherwise | |
1138 | it is moved to the left or top respectively. | |
1139 | """ | |
e811c8ce RD |
1140 | return _core.Rect_OffsetXY(*args, **kwargs) |
1141 | ||
1142 | def Offset(*args, **kwargs): | |
0df68c9f RD |
1143 | """ |
1144 | Offset(Point pt) | |
e811c8ce | 1145 | |
0df68c9f RD |
1146 | Same as OffsetXY but uses dx,dy from Point |
1147 | """ | |
e811c8ce RD |
1148 | return _core.Rect_Offset(*args, **kwargs) |
1149 | ||
1150 | def Intersect(*args, **kwargs): | |
0df68c9f RD |
1151 | """ |
1152 | Intersect(Rect rect) -> Rect | |
e811c8ce | 1153 | |
0df68c9f RD |
1154 | Return the intersectsion of this rectangle and rect. |
1155 | """ | |
e811c8ce RD |
1156 | return _core.Rect_Intersect(*args, **kwargs) |
1157 | ||
1158 | def __add__(*args, **kwargs): | |
0df68c9f RD |
1159 | """ |
1160 | __add__(Rect rect) -> Rect | |
e811c8ce | 1161 | |
0df68c9f RD |
1162 | Add the properties of rect to this rectangle and return the result. |
1163 | """ | |
e811c8ce RD |
1164 | return _core.Rect___add__(*args, **kwargs) |
1165 | ||
1166 | def __iadd__(*args, **kwargs): | |
0df68c9f RD |
1167 | """ |
1168 | __iadd__(Rect rect) -> Rect | |
e811c8ce | 1169 | |
0df68c9f RD |
1170 | Add the properties of rect to this rectangle, updating this rectangle. |
1171 | """ | |
e811c8ce RD |
1172 | return _core.Rect___iadd__(*args, **kwargs) |
1173 | ||
1174 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
1175 | """ |
1176 | __eq__(Rect rect) -> bool | |
e811c8ce | 1177 | |
0df68c9f RD |
1178 | Test for equality. |
1179 | """ | |
e811c8ce RD |
1180 | return _core.Rect___eq__(*args, **kwargs) |
1181 | ||
1182 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
1183 | """ |
1184 | __ne__(Rect rect) -> bool | |
e811c8ce | 1185 | |
0df68c9f RD |
1186 | Test for inequality. |
1187 | """ | |
e811c8ce RD |
1188 | return _core.Rect___ne__(*args, **kwargs) |
1189 | ||
1190 | def InsideXY(*args, **kwargs): | |
0df68c9f RD |
1191 | """ |
1192 | InsideXY(int x, int y) -> bool | |
e811c8ce | 1193 | |
0df68c9f RD |
1194 | Return True if the point is (not strcitly) inside the rect. |
1195 | """ | |
e811c8ce RD |
1196 | return _core.Rect_InsideXY(*args, **kwargs) |
1197 | ||
1198 | def Inside(*args, **kwargs): | |
0df68c9f RD |
1199 | """ |
1200 | Inside(Point pt) -> bool | |
e811c8ce | 1201 | |
0df68c9f RD |
1202 | Return True if the point is (not strcitly) inside the rect. |
1203 | """ | |
e811c8ce RD |
1204 | return _core.Rect_Inside(*args, **kwargs) |
1205 | ||
1206 | def Intersects(*args, **kwargs): | |
0df68c9f RD |
1207 | """ |
1208 | Intersects(Rect rect) -> bool | |
e811c8ce | 1209 | |
0df68c9f RD |
1210 | Returns True if the rectangles have a non empty intersection. |
1211 | """ | |
e811c8ce RD |
1212 | return _core.Rect_Intersects(*args, **kwargs) |
1213 | ||
d14a1e28 RD |
1214 | x = property(_core.Rect_x_get, _core.Rect_x_set) |
1215 | y = property(_core.Rect_y_get, _core.Rect_y_set) | |
1216 | width = property(_core.Rect_width_get, _core.Rect_width_set) | |
1217 | height = property(_core.Rect_height_get, _core.Rect_height_set) | |
e811c8ce | 1218 | def Set(*args, **kwargs): |
0df68c9f RD |
1219 | """ |
1220 | Set(int x=0, int y=0, int width=0, int height=0) | |
e811c8ce | 1221 | |
0df68c9f RD |
1222 | Set all rectangle properties. |
1223 | """ | |
e811c8ce RD |
1224 | return _core.Rect_Set(*args, **kwargs) |
1225 | ||
1226 | def Get(*args, **kwargs): | |
0df68c9f RD |
1227 | """ |
1228 | Get() -> (x,y,width,height) | |
e811c8ce | 1229 | |
0df68c9f RD |
1230 | Return the rectangle properties as a tuple. |
1231 | """ | |
e811c8ce RD |
1232 | return _core.Rect_Get(*args, **kwargs) |
1233 | ||
1234 | asTuple = Get | |
1235 | def __str__(self): return str(self.Get()) | |
1236 | def __repr__(self): return 'wx.Rect'+str(self.Get()) | |
1237 | def __len__(self): return len(self.Get()) | |
1238 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1239 | def __setitem__(self, index, val): |
1240 | if index == 0: self.x = val | |
1241 | elif index == 1: self.y = val | |
1242 | elif index == 2: self.width = val | |
1243 | elif index == 3: self.height = val | |
1244 | else: raise IndexError | |
e811c8ce | 1245 | def __nonzero__(self): return self.Get() != (0,0,0,0) |
d14a1e28 | 1246 | def __getinitargs__(self): return () |
e811c8ce | 1247 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
1248 | def __setstate__(self, state): self.Set(*state) |
1249 | ||
1250 | ||
1251 | class RectPtr(Rect): | |
1252 | def __init__(self, this): | |
1253 | self.this = this | |
1254 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1255 | self.__class__ = Rect | |
1256 | _core.Rect_swigregister(RectPtr) | |
1257 | ||
1258 | def RectPP(*args, **kwargs): | |
0df68c9f RD |
1259 | """ |
1260 | RectPP(Point topLeft, Point bottomRight) -> Rect | |
e811c8ce | 1261 | |
0df68c9f RD |
1262 | Create a new Rect object from Points representing two corners. |
1263 | """ | |
d14a1e28 RD |
1264 | val = _core.new_RectPP(*args, **kwargs) |
1265 | val.thisown = 1 | |
1266 | return val | |
1267 | ||
1268 | def RectPS(*args, **kwargs): | |
0df68c9f RD |
1269 | """ |
1270 | RectPS(Point pos, Size size) -> Rect | |
e811c8ce | 1271 | |
0df68c9f RD |
1272 | Create a new Rect from a position and size. |
1273 | """ | |
d14a1e28 RD |
1274 | val = _core.new_RectPS(*args, **kwargs) |
1275 | val.thisown = 1 | |
1276 | return val | |
1277 | ||
1278 | ||
e811c8ce | 1279 | def IntersectRect(*args, **kwargs): |
0df68c9f RD |
1280 | """ |
1281 | IntersectRect(Rect r1, Rect r2) -> Rect | |
e811c8ce | 1282 | |
0df68c9f RD |
1283 | Calculate and return the intersection of r1 and r2. |
1284 | """ | |
e811c8ce | 1285 | return _core.IntersectRect(*args, **kwargs) |
d14a1e28 RD |
1286 | #--------------------------------------------------------------------------- |
1287 | ||
1288 | class Point2D(object): | |
e811c8ce RD |
1289 | """wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values.""" |
1290 | def __repr__(self): | |
1291 | return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1292 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
1293 | """ |
1294 | __init__(double x=0.0, double y=0.0) -> Point2D | |
e811c8ce | 1295 | |
0df68c9f RD |
1296 | Create a w.Point2D object. |
1297 | """ | |
d14a1e28 RD |
1298 | newobj = _core.new_Point2D(*args, **kwargs) |
1299 | self.this = newobj.this | |
1300 | self.thisown = 1 | |
1301 | del newobj.thisown | |
e811c8ce | 1302 | def GetFloor(*args, **kwargs): |
0df68c9f RD |
1303 | """ |
1304 | GetFloor() -> (x,y) | |
e811c8ce | 1305 | |
0df68c9f RD |
1306 | Convert to integer |
1307 | """ | |
e811c8ce RD |
1308 | return _core.Point2D_GetFloor(*args, **kwargs) |
1309 | ||
1310 | def GetRounded(*args, **kwargs): | |
0df68c9f RD |
1311 | """ |
1312 | GetRounded() -> (x,y) | |
e811c8ce | 1313 | |
0df68c9f RD |
1314 | Convert to integer |
1315 | """ | |
e811c8ce RD |
1316 | return _core.Point2D_GetRounded(*args, **kwargs) |
1317 | ||
1318 | def GetVectorLength(*args, **kwargs): | |
1319 | """GetVectorLength() -> double""" | |
1320 | return _core.Point2D_GetVectorLength(*args, **kwargs) | |
1321 | ||
1322 | def GetVectorAngle(*args, **kwargs): | |
1323 | """GetVectorAngle() -> double""" | |
1324 | return _core.Point2D_GetVectorAngle(*args, **kwargs) | |
1325 | ||
1326 | def SetVectorLength(*args, **kwargs): | |
1327 | """SetVectorLength(double length)""" | |
1328 | return _core.Point2D_SetVectorLength(*args, **kwargs) | |
1329 | ||
1330 | def SetVectorAngle(*args, **kwargs): | |
1331 | """SetVectorAngle(double degrees)""" | |
1332 | return _core.Point2D_SetVectorAngle(*args, **kwargs) | |
1333 | ||
d14a1e28 RD |
1334 | def SetPolarCoordinates(self, angle, length): |
1335 | self.SetVectorLength(length) | |
1336 | self.SetVectorAngle(angle) | |
1337 | def Normalize(self): | |
1338 | self.SetVectorLength(1.0) | |
1339 | ||
e811c8ce RD |
1340 | def GetDistance(*args, **kwargs): |
1341 | """GetDistance(Point2D pt) -> double""" | |
1342 | return _core.Point2D_GetDistance(*args, **kwargs) | |
1343 | ||
1344 | def GetDistanceSquare(*args, **kwargs): | |
1345 | """GetDistanceSquare(Point2D pt) -> double""" | |
1346 | return _core.Point2D_GetDistanceSquare(*args, **kwargs) | |
1347 | ||
1348 | def GetDotProduct(*args, **kwargs): | |
1349 | """GetDotProduct(Point2D vec) -> double""" | |
1350 | return _core.Point2D_GetDotProduct(*args, **kwargs) | |
1351 | ||
1352 | def GetCrossProduct(*args, **kwargs): | |
1353 | """GetCrossProduct(Point2D vec) -> double""" | |
1354 | return _core.Point2D_GetCrossProduct(*args, **kwargs) | |
1355 | ||
1356 | def __neg__(*args, **kwargs): | |
0df68c9f RD |
1357 | """ |
1358 | __neg__() -> Point2D | |
e811c8ce | 1359 | |
0df68c9f RD |
1360 | the reflection of this point |
1361 | """ | |
e811c8ce RD |
1362 | return _core.Point2D___neg__(*args, **kwargs) |
1363 | ||
1364 | def __iadd__(*args, **kwargs): | |
1365 | """__iadd__(Point2D pt) -> Point2D""" | |
1366 | return _core.Point2D___iadd__(*args, **kwargs) | |
1367 | ||
1368 | def __isub__(*args, **kwargs): | |
1369 | """__isub__(Point2D pt) -> Point2D""" | |
1370 | return _core.Point2D___isub__(*args, **kwargs) | |
1371 | ||
1372 | def __imul__(*args, **kwargs): | |
1373 | """__imul__(Point2D pt) -> Point2D""" | |
1374 | return _core.Point2D___imul__(*args, **kwargs) | |
1375 | ||
1376 | def __idiv__(*args, **kwargs): | |
1377 | """__idiv__(Point2D pt) -> Point2D""" | |
1378 | return _core.Point2D___idiv__(*args, **kwargs) | |
1379 | ||
1380 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
1381 | """ |
1382 | __eq__(Point2D pt) -> bool | |
e811c8ce | 1383 | |
0df68c9f RD |
1384 | Test for equality |
1385 | """ | |
e811c8ce RD |
1386 | return _core.Point2D___eq__(*args, **kwargs) |
1387 | ||
1388 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
1389 | """ |
1390 | __ne__(Point2D pt) -> bool | |
e811c8ce | 1391 | |
0df68c9f RD |
1392 | Test for inequality |
1393 | """ | |
e811c8ce RD |
1394 | return _core.Point2D___ne__(*args, **kwargs) |
1395 | ||
d14a1e28 RD |
1396 | x = property(_core.Point2D_x_get, _core.Point2D_x_set) |
1397 | y = property(_core.Point2D_y_get, _core.Point2D_y_set) | |
e811c8ce RD |
1398 | def Set(*args, **kwargs): |
1399 | """Set(double x=0, double y=0)""" | |
1400 | return _core.Point2D_Set(*args, **kwargs) | |
1401 | ||
1402 | def Get(*args, **kwargs): | |
0df68c9f RD |
1403 | """ |
1404 | Get() -> (x,y) | |
e811c8ce | 1405 | |
0df68c9f RD |
1406 | Return x and y properties as a tuple. |
1407 | """ | |
e811c8ce RD |
1408 | return _core.Point2D_Get(*args, **kwargs) |
1409 | ||
1410 | asTuple = Get | |
1411 | def __str__(self): return str(self.Get()) | |
1412 | def __repr__(self): return 'wx.Point2D'+str(self.Get()) | |
1413 | def __len__(self): return len(self.Get()) | |
1414 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 1415 | def __setitem__(self, index, val): |
e811c8ce RD |
1416 | if index == 0: self.x = val |
1417 | elif index == 1: self.y = val | |
d14a1e28 | 1418 | else: raise IndexError |
e811c8ce | 1419 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
d14a1e28 | 1420 | def __getinitargs__(self): return () |
e811c8ce | 1421 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
1422 | def __setstate__(self, state): self.Set(*state) |
1423 | ||
1424 | ||
1425 | ||
1426 | class Point2DPtr(Point2D): | |
1427 | def __init__(self, this): | |
1428 | self.this = this | |
1429 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1430 | self.__class__ = Point2D | |
1431 | _core.Point2D_swigregister(Point2DPtr) | |
1432 | ||
1433 | def Point2DCopy(*args, **kwargs): | |
0df68c9f RD |
1434 | """ |
1435 | Point2DCopy(Point2D pt) -> Point2D | |
e811c8ce | 1436 | |
0df68c9f RD |
1437 | Create a w.Point2D object. |
1438 | """ | |
d14a1e28 RD |
1439 | val = _core.new_Point2DCopy(*args, **kwargs) |
1440 | val.thisown = 1 | |
1441 | return val | |
1442 | ||
1443 | def Point2DFromPoint(*args, **kwargs): | |
0df68c9f RD |
1444 | """ |
1445 | Point2DFromPoint(Point pt) -> Point2D | |
e811c8ce | 1446 | |
0df68c9f RD |
1447 | Create a w.Point2D object. |
1448 | """ | |
d14a1e28 RD |
1449 | val = _core.new_Point2DFromPoint(*args, **kwargs) |
1450 | val.thisown = 1 | |
1451 | return val | |
1452 | ||
1453 | #--------------------------------------------------------------------------- | |
1454 | ||
1455 | FromStart = _core.FromStart | |
1456 | FromCurrent = _core.FromCurrent | |
1457 | FromEnd = _core.FromEnd | |
1458 | class InputStream(object): | |
e811c8ce RD |
1459 | def __repr__(self): |
1460 | return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1461 | def __init__(self, *args, **kwargs): |
e811c8ce | 1462 | """__init__(PyObject p) -> InputStream""" |
d14a1e28 RD |
1463 | newobj = _core.new_InputStream(*args, **kwargs) |
1464 | self.this = newobj.this | |
1465 | self.thisown = 1 | |
1466 | del newobj.thisown | |
e811c8ce RD |
1467 | def close(*args, **kwargs): |
1468 | """close()""" | |
1469 | return _core.InputStream_close(*args, **kwargs) | |
1470 | ||
1471 | def flush(*args, **kwargs): | |
1472 | """flush()""" | |
1473 | return _core.InputStream_flush(*args, **kwargs) | |
1474 | ||
1475 | def eof(*args, **kwargs): | |
1476 | """eof() -> bool""" | |
1477 | return _core.InputStream_eof(*args, **kwargs) | |
1478 | ||
1479 | def read(*args, **kwargs): | |
1480 | """read(int size=-1) -> PyObject""" | |
1481 | return _core.InputStream_read(*args, **kwargs) | |
1482 | ||
1483 | def readline(*args, **kwargs): | |
1484 | """readline(int size=-1) -> PyObject""" | |
1485 | return _core.InputStream_readline(*args, **kwargs) | |
1486 | ||
1487 | def readlines(*args, **kwargs): | |
1488 | """readlines(int sizehint=-1) -> PyObject""" | |
1489 | return _core.InputStream_readlines(*args, **kwargs) | |
1490 | ||
1491 | def seek(*args, **kwargs): | |
1492 | """seek(int offset, int whence=0)""" | |
1493 | return _core.InputStream_seek(*args, **kwargs) | |
1494 | ||
1495 | def tell(*args, **kwargs): | |
1496 | """tell() -> int""" | |
1497 | return _core.InputStream_tell(*args, **kwargs) | |
1498 | ||
1499 | def Peek(*args, **kwargs): | |
1500 | """Peek() -> char""" | |
1501 | return _core.InputStream_Peek(*args, **kwargs) | |
1502 | ||
1503 | def GetC(*args, **kwargs): | |
1504 | """GetC() -> char""" | |
1505 | return _core.InputStream_GetC(*args, **kwargs) | |
1506 | ||
1507 | def LastRead(*args, **kwargs): | |
1508 | """LastRead() -> size_t""" | |
1509 | return _core.InputStream_LastRead(*args, **kwargs) | |
1510 | ||
1511 | def CanRead(*args, **kwargs): | |
1512 | """CanRead() -> bool""" | |
1513 | return _core.InputStream_CanRead(*args, **kwargs) | |
1514 | ||
1515 | def Eof(*args, **kwargs): | |
1516 | """Eof() -> bool""" | |
1517 | return _core.InputStream_Eof(*args, **kwargs) | |
1518 | ||
1519 | def Ungetch(*args, **kwargs): | |
1520 | """Ungetch(char c) -> bool""" | |
1521 | return _core.InputStream_Ungetch(*args, **kwargs) | |
1522 | ||
1523 | def SeekI(*args, **kwargs): | |
1524 | """SeekI(long pos, wxSeekMode mode=FromStart) -> long""" | |
1525 | return _core.InputStream_SeekI(*args, **kwargs) | |
1526 | ||
1527 | def TellI(*args, **kwargs): | |
1528 | """TellI() -> long""" | |
1529 | return _core.InputStream_TellI(*args, **kwargs) | |
1530 | ||
d14a1e28 RD |
1531 | |
1532 | class InputStreamPtr(InputStream): | |
1533 | def __init__(self, this): | |
1534 | self.this = this | |
1535 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1536 | self.__class__ = InputStream | |
1537 | _core.InputStream_swigregister(InputStreamPtr) | |
1538 | cvar = _core.cvar | |
1539 | DefaultPosition = cvar.DefaultPosition | |
1540 | DefaultSize = cvar.DefaultSize | |
1541 | ||
1542 | class OutputStream(object): | |
d14a1e28 RD |
1543 | def __init__(self): raise RuntimeError, "No constructor defined" |
1544 | def __repr__(self): | |
1545 | return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
1546 | def write(*args, **kwargs): |
1547 | """write(PyObject obj)""" | |
1548 | return _core.OutputStream_write(*args, **kwargs) | |
1549 | ||
d14a1e28 RD |
1550 | |
1551 | class OutputStreamPtr(OutputStream): | |
1552 | def __init__(self, this): | |
1553 | self.this = this | |
1554 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1555 | self.__class__ = OutputStream | |
1556 | _core.OutputStream_swigregister(OutputStreamPtr) | |
1557 | ||
1558 | #--------------------------------------------------------------------------- | |
1559 | ||
1560 | class FSFile(Object): | |
e811c8ce RD |
1561 | def __repr__(self): |
1562 | return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1563 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
1564 | """ |
1565 | __init__(wxInputStream stream, wxString loc, wxString mimetype, | |
1566 | wxString anchor, wxDateTime modif) -> FSFile | |
1567 | """ | |
d14a1e28 RD |
1568 | newobj = _core.new_FSFile(*args, **kwargs) |
1569 | self.this = newobj.this | |
1570 | self.thisown = 1 | |
1571 | del newobj.thisown | |
1572 | def __del__(self, destroy=_core.delete_FSFile): | |
e811c8ce | 1573 | """__del__()""" |
d14a1e28 RD |
1574 | try: |
1575 | if self.thisown: destroy(self) | |
1576 | except: pass | |
e811c8ce RD |
1577 | |
1578 | def GetStream(*args, **kwargs): | |
1579 | """GetStream() -> wxInputStream""" | |
1580 | return _core.FSFile_GetStream(*args, **kwargs) | |
1581 | ||
1582 | def GetMimeType(*args, **kwargs): | |
1583 | """GetMimeType() -> wxString""" | |
1584 | return _core.FSFile_GetMimeType(*args, **kwargs) | |
1585 | ||
1586 | def GetLocation(*args, **kwargs): | |
1587 | """GetLocation() -> wxString""" | |
1588 | return _core.FSFile_GetLocation(*args, **kwargs) | |
1589 | ||
1590 | def GetAnchor(*args, **kwargs): | |
1591 | """GetAnchor() -> wxString""" | |
1592 | return _core.FSFile_GetAnchor(*args, **kwargs) | |
1593 | ||
1594 | def GetModificationTime(*args, **kwargs): | |
1595 | """GetModificationTime() -> wxDateTime""" | |
1596 | return _core.FSFile_GetModificationTime(*args, **kwargs) | |
1597 | ||
d14a1e28 RD |
1598 | |
1599 | class FSFilePtr(FSFile): | |
1600 | def __init__(self, this): | |
1601 | self.this = this | |
1602 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1603 | self.__class__ = FSFile | |
1604 | _core.FSFile_swigregister(FSFilePtr) | |
1605 | ||
1606 | class CPPFileSystemHandler(object): | |
1607 | def __init__(self): raise RuntimeError, "No constructor defined" | |
1608 | def __repr__(self): | |
1609 | return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1610 | ||
1611 | class CPPFileSystemHandlerPtr(CPPFileSystemHandler): | |
1612 | def __init__(self, this): | |
1613 | self.this = this | |
1614 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1615 | self.__class__ = CPPFileSystemHandler | |
1616 | _core.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr) | |
1617 | ||
1618 | class FileSystemHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1619 | def __repr__(self): |
1620 | return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1621 | def __init__(self, *args, **kwargs): |
e811c8ce | 1622 | """__init__() -> FileSystemHandler""" |
d14a1e28 RD |
1623 | newobj = _core.new_FileSystemHandler(*args, **kwargs) |
1624 | self.this = newobj.this | |
1625 | self.thisown = 1 | |
1626 | del newobj.thisown | |
1627 | self._setCallbackInfo(self, FileSystemHandler) | |
e811c8ce RD |
1628 | |
1629 | def _setCallbackInfo(*args, **kwargs): | |
1630 | """_setCallbackInfo(PyObject self, PyObject _class)""" | |
1631 | return _core.FileSystemHandler__setCallbackInfo(*args, **kwargs) | |
1632 | ||
1633 | def CanOpen(*args, **kwargs): | |
1634 | """CanOpen(wxString location) -> bool""" | |
1635 | return _core.FileSystemHandler_CanOpen(*args, **kwargs) | |
1636 | ||
1637 | def OpenFile(*args, **kwargs): | |
1638 | """OpenFile(FileSystem fs, wxString location) -> FSFile""" | |
1639 | return _core.FileSystemHandler_OpenFile(*args, **kwargs) | |
1640 | ||
1641 | def FindFirst(*args, **kwargs): | |
1642 | """FindFirst(wxString spec, int flags=0) -> wxString""" | |
1643 | return _core.FileSystemHandler_FindFirst(*args, **kwargs) | |
1644 | ||
1645 | def FindNext(*args, **kwargs): | |
1646 | """FindNext() -> wxString""" | |
1647 | return _core.FileSystemHandler_FindNext(*args, **kwargs) | |
1648 | ||
1649 | def GetProtocol(*args, **kwargs): | |
1650 | """GetProtocol(wxString location) -> wxString""" | |
1651 | return _core.FileSystemHandler_GetProtocol(*args, **kwargs) | |
1652 | ||
1653 | def GetLeftLocation(*args, **kwargs): | |
1654 | """GetLeftLocation(wxString location) -> wxString""" | |
1655 | return _core.FileSystemHandler_GetLeftLocation(*args, **kwargs) | |
1656 | ||
1657 | def GetAnchor(*args, **kwargs): | |
1658 | """GetAnchor(wxString location) -> wxString""" | |
1659 | return _core.FileSystemHandler_GetAnchor(*args, **kwargs) | |
1660 | ||
1661 | def GetRightLocation(*args, **kwargs): | |
1662 | """GetRightLocation(wxString location) -> wxString""" | |
1663 | return _core.FileSystemHandler_GetRightLocation(*args, **kwargs) | |
1664 | ||
1665 | def GetMimeTypeFromExt(*args, **kwargs): | |
1666 | """GetMimeTypeFromExt(wxString location) -> wxString""" | |
1667 | return _core.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs) | |
1668 | ||
d14a1e28 RD |
1669 | |
1670 | class FileSystemHandlerPtr(FileSystemHandler): | |
1671 | def __init__(self, this): | |
1672 | self.this = this | |
1673 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1674 | self.__class__ = FileSystemHandler | |
1675 | _core.FileSystemHandler_swigregister(FileSystemHandlerPtr) | |
1676 | ||
1677 | class FileSystem(Object): | |
e811c8ce RD |
1678 | def __repr__(self): |
1679 | return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1680 | def __init__(self, *args, **kwargs): |
e811c8ce | 1681 | """__init__() -> FileSystem""" |
d14a1e28 RD |
1682 | newobj = _core.new_FileSystem(*args, **kwargs) |
1683 | self.this = newobj.this | |
1684 | self.thisown = 1 | |
1685 | del newobj.thisown | |
1686 | def __del__(self, destroy=_core.delete_FileSystem): | |
e811c8ce | 1687 | """__del__()""" |
d14a1e28 RD |
1688 | try: |
1689 | if self.thisown: destroy(self) | |
1690 | except: pass | |
e811c8ce RD |
1691 | |
1692 | def ChangePathTo(*args, **kwargs): | |
1693 | """ChangePathTo(wxString location, bool is_dir=False)""" | |
1694 | return _core.FileSystem_ChangePathTo(*args, **kwargs) | |
1695 | ||
1696 | def GetPath(*args, **kwargs): | |
1697 | """GetPath() -> wxString""" | |
1698 | return _core.FileSystem_GetPath(*args, **kwargs) | |
1699 | ||
1700 | def OpenFile(*args, **kwargs): | |
1701 | """OpenFile(wxString location) -> FSFile""" | |
1702 | return _core.FileSystem_OpenFile(*args, **kwargs) | |
1703 | ||
1704 | def FindFirst(*args, **kwargs): | |
1705 | """FindFirst(wxString spec, int flags=0) -> wxString""" | |
1706 | return _core.FileSystem_FindFirst(*args, **kwargs) | |
1707 | ||
1708 | def FindNext(*args, **kwargs): | |
1709 | """FindNext() -> wxString""" | |
1710 | return _core.FileSystem_FindNext(*args, **kwargs) | |
1711 | ||
1712 | def AddHandler(*args, **kwargs): | |
1713 | """FileSystem.AddHandler(CPPFileSystemHandler handler)""" | |
1714 | return _core.FileSystem_AddHandler(*args, **kwargs) | |
1715 | ||
1716 | AddHandler = staticmethod(AddHandler) | |
1717 | def CleanUpHandlers(*args, **kwargs): | |
1718 | """FileSystem.CleanUpHandlers()""" | |
1719 | return _core.FileSystem_CleanUpHandlers(*args, **kwargs) | |
1720 | ||
1721 | CleanUpHandlers = staticmethod(CleanUpHandlers) | |
1722 | def FileNameToURL(*args, **kwargs): | |
1723 | """FileSystem.FileNameToURL(wxString filename) -> wxString""" | |
1724 | return _core.FileSystem_FileNameToURL(*args, **kwargs) | |
1725 | ||
1726 | FileNameToURL = staticmethod(FileNameToURL) | |
d14a1e28 RD |
1727 | |
1728 | class FileSystemPtr(FileSystem): | |
1729 | def __init__(self, this): | |
1730 | self.this = this | |
1731 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1732 | self.__class__ = FileSystem | |
1733 | _core.FileSystem_swigregister(FileSystemPtr) | |
1734 | ||
e811c8ce RD |
1735 | def FileSystem_AddHandler(*args, **kwargs): |
1736 | """FileSystem_AddHandler(CPPFileSystemHandler handler)""" | |
1737 | return _core.FileSystem_AddHandler(*args, **kwargs) | |
d14a1e28 | 1738 | |
e811c8ce RD |
1739 | def FileSystem_CleanUpHandlers(*args, **kwargs): |
1740 | """FileSystem_CleanUpHandlers()""" | |
1741 | return _core.FileSystem_CleanUpHandlers(*args, **kwargs) | |
d14a1e28 | 1742 | |
e811c8ce RD |
1743 | def FileSystem_FileNameToURL(*args, **kwargs): |
1744 | """FileSystem_FileNameToURL(wxString filename) -> wxString""" | |
1745 | return _core.FileSystem_FileNameToURL(*args, **kwargs) | |
d14a1e28 RD |
1746 | |
1747 | ||
e811c8ce RD |
1748 | def FileSystem_URLToFileName(*args, **kwargs): |
1749 | """FileSystem_URLToFileName(wxString url) -> wxString""" | |
1750 | return _core.FileSystem_URLToFileName(*args, **kwargs) | |
d14a1e28 | 1751 | class InternetFSHandler(CPPFileSystemHandler): |
e811c8ce RD |
1752 | def __repr__(self): |
1753 | return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1754 | def __init__(self, *args, **kwargs): |
e811c8ce | 1755 | """__init__() -> InternetFSHandler""" |
d14a1e28 RD |
1756 | newobj = _core.new_InternetFSHandler(*args, **kwargs) |
1757 | self.this = newobj.this | |
1758 | self.thisown = 1 | |
1759 | del newobj.thisown | |
e811c8ce RD |
1760 | def CanOpen(*args, **kwargs): |
1761 | """CanOpen(wxString location) -> bool""" | |
1762 | return _core.InternetFSHandler_CanOpen(*args, **kwargs) | |
1763 | ||
1764 | def OpenFile(*args, **kwargs): | |
1765 | """OpenFile(FileSystem fs, wxString location) -> FSFile""" | |
1766 | return _core.InternetFSHandler_OpenFile(*args, **kwargs) | |
1767 | ||
d14a1e28 RD |
1768 | |
1769 | class InternetFSHandlerPtr(InternetFSHandler): | |
1770 | def __init__(self, this): | |
1771 | self.this = this | |
1772 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1773 | self.__class__ = InternetFSHandler | |
1774 | _core.InternetFSHandler_swigregister(InternetFSHandlerPtr) | |
1775 | ||
1776 | class ZipFSHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1777 | def __repr__(self): |
1778 | return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1779 | def __init__(self, *args, **kwargs): |
e811c8ce | 1780 | """__init__() -> ZipFSHandler""" |
d14a1e28 RD |
1781 | newobj = _core.new_ZipFSHandler(*args, **kwargs) |
1782 | self.this = newobj.this | |
1783 | self.thisown = 1 | |
1784 | del newobj.thisown | |
e811c8ce RD |
1785 | def CanOpen(*args, **kwargs): |
1786 | """CanOpen(wxString location) -> bool""" | |
1787 | return _core.ZipFSHandler_CanOpen(*args, **kwargs) | |
1788 | ||
1789 | def OpenFile(*args, **kwargs): | |
1790 | """OpenFile(FileSystem fs, wxString location) -> FSFile""" | |
1791 | return _core.ZipFSHandler_OpenFile(*args, **kwargs) | |
1792 | ||
1793 | def FindFirst(*args, **kwargs): | |
1794 | """FindFirst(wxString spec, int flags=0) -> wxString""" | |
1795 | return _core.ZipFSHandler_FindFirst(*args, **kwargs) | |
1796 | ||
1797 | def FindNext(*args, **kwargs): | |
1798 | """FindNext() -> wxString""" | |
1799 | return _core.ZipFSHandler_FindNext(*args, **kwargs) | |
1800 | ||
d14a1e28 RD |
1801 | |
1802 | class ZipFSHandlerPtr(ZipFSHandler): | |
1803 | def __init__(self, this): | |
1804 | self.this = this | |
1805 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1806 | self.__class__ = ZipFSHandler | |
1807 | _core.ZipFSHandler_swigregister(ZipFSHandlerPtr) | |
1808 | ||
1809 | ||
e811c8ce RD |
1810 | def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs): |
1811 | """__wxMemoryFSHandler_AddFile_wxImage(wxString filename, Image image, long type)""" | |
1812 | return _core.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs) | |
d14a1e28 | 1813 | |
e811c8ce RD |
1814 | def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs): |
1815 | """__wxMemoryFSHandler_AddFile_wxBitmap(wxString filename, wxBitmap bitmap, long type)""" | |
1816 | return _core.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs) | |
d14a1e28 | 1817 | |
e811c8ce RD |
1818 | def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs): |
1819 | """__wxMemoryFSHandler_AddFile_Data(wxString filename, PyObject data)""" | |
1820 | return _core.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs) | |
d14a1e28 RD |
1821 | def MemoryFSHandler_AddFile(filename, a, b=''): |
1822 | if isinstance(a, wx.Image): | |
1823 | __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) | |
1824 | elif isinstance(a, wx.Bitmap): | |
1825 | __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) | |
1826 | elif type(a) == str: | |
1827 | __wxMemoryFSHandler_AddFile_Data(filename, a) | |
1828 | else: raise TypeError, 'wx.Image, wx.Bitmap or string expected' | |
1829 | ||
1830 | class MemoryFSHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1831 | def __repr__(self): |
1832 | return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1833 | def __init__(self, *args, **kwargs): |
e811c8ce | 1834 | """__init__() -> MemoryFSHandler""" |
d14a1e28 RD |
1835 | newobj = _core.new_MemoryFSHandler(*args, **kwargs) |
1836 | self.this = newobj.this | |
1837 | self.thisown = 1 | |
1838 | del newobj.thisown | |
e811c8ce RD |
1839 | def RemoveFile(*args, **kwargs): |
1840 | """MemoryFSHandler.RemoveFile(wxString filename)""" | |
1841 | return _core.MemoryFSHandler_RemoveFile(*args, **kwargs) | |
1842 | ||
1843 | RemoveFile = staticmethod(RemoveFile) | |
d14a1e28 | 1844 | AddFile = staticmethod(MemoryFSHandler_AddFile) |
e811c8ce RD |
1845 | def CanOpen(*args, **kwargs): |
1846 | """CanOpen(wxString location) -> bool""" | |
1847 | return _core.MemoryFSHandler_CanOpen(*args, **kwargs) | |
1848 | ||
1849 | def OpenFile(*args, **kwargs): | |
1850 | """OpenFile(FileSystem fs, wxString location) -> FSFile""" | |
1851 | return _core.MemoryFSHandler_OpenFile(*args, **kwargs) | |
1852 | ||
1853 | def FindFirst(*args, **kwargs): | |
1854 | """FindFirst(wxString spec, int flags=0) -> wxString""" | |
1855 | return _core.MemoryFSHandler_FindFirst(*args, **kwargs) | |
1856 | ||
1857 | def FindNext(*args, **kwargs): | |
1858 | """FindNext() -> wxString""" | |
1859 | return _core.MemoryFSHandler_FindNext(*args, **kwargs) | |
1860 | ||
d14a1e28 RD |
1861 | |
1862 | class MemoryFSHandlerPtr(MemoryFSHandler): | |
1863 | def __init__(self, this): | |
1864 | self.this = this | |
1865 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1866 | self.__class__ = MemoryFSHandler | |
1867 | _core.MemoryFSHandler_swigregister(MemoryFSHandlerPtr) | |
1868 | ||
e811c8ce RD |
1869 | def MemoryFSHandler_RemoveFile(*args, **kwargs): |
1870 | """MemoryFSHandler_RemoveFile(wxString filename)""" | |
1871 | return _core.MemoryFSHandler_RemoveFile(*args, **kwargs) | |
d14a1e28 RD |
1872 | |
1873 | #--------------------------------------------------------------------------- | |
1874 | ||
1875 | class ImageHandler(Object): | |
d14a1e28 RD |
1876 | def __init__(self): raise RuntimeError, "No constructor defined" |
1877 | def __repr__(self): | |
1878 | return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
1879 | def GetName(*args, **kwargs): |
1880 | """GetName() -> wxString""" | |
1881 | return _core.ImageHandler_GetName(*args, **kwargs) | |
1882 | ||
1883 | def GetExtension(*args, **kwargs): | |
1884 | """GetExtension() -> wxString""" | |
1885 | return _core.ImageHandler_GetExtension(*args, **kwargs) | |
1886 | ||
1887 | def GetType(*args, **kwargs): | |
1888 | """GetType() -> long""" | |
1889 | return _core.ImageHandler_GetType(*args, **kwargs) | |
1890 | ||
1891 | def GetMimeType(*args, **kwargs): | |
1892 | """GetMimeType() -> wxString""" | |
1893 | return _core.ImageHandler_GetMimeType(*args, **kwargs) | |
1894 | ||
1895 | def CanRead(*args, **kwargs): | |
1896 | """CanRead(wxString name) -> bool""" | |
1897 | return _core.ImageHandler_CanRead(*args, **kwargs) | |
1898 | ||
1899 | def SetName(*args, **kwargs): | |
1900 | """SetName(wxString name)""" | |
1901 | return _core.ImageHandler_SetName(*args, **kwargs) | |
1902 | ||
1903 | def SetExtension(*args, **kwargs): | |
1904 | """SetExtension(wxString extension)""" | |
1905 | return _core.ImageHandler_SetExtension(*args, **kwargs) | |
1906 | ||
1907 | def SetType(*args, **kwargs): | |
1908 | """SetType(long type)""" | |
1909 | return _core.ImageHandler_SetType(*args, **kwargs) | |
1910 | ||
1911 | def SetMimeType(*args, **kwargs): | |
1912 | """SetMimeType(wxString mimetype)""" | |
1913 | return _core.ImageHandler_SetMimeType(*args, **kwargs) | |
1914 | ||
d14a1e28 RD |
1915 | |
1916 | class ImageHandlerPtr(ImageHandler): | |
1917 | def __init__(self, this): | |
1918 | self.this = this | |
1919 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1920 | self.__class__ = ImageHandler | |
1921 | _core.ImageHandler_swigregister(ImageHandlerPtr) | |
1922 | ||
1923 | class ImageHistogram(object): | |
e811c8ce RD |
1924 | def __repr__(self): |
1925 | return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1926 | def __init__(self, *args, **kwargs): |
e811c8ce | 1927 | """__init__() -> ImageHistogram""" |
d14a1e28 RD |
1928 | newobj = _core.new_ImageHistogram(*args, **kwargs) |
1929 | self.this = newobj.this | |
1930 | self.thisown = 1 | |
1931 | del newobj.thisown | |
e811c8ce | 1932 | def MakeKey(*args, **kwargs): |
0df68c9f RD |
1933 | """ |
1934 | ImageHistogram.MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long | |
e811c8ce | 1935 | |
0df68c9f RD |
1936 | Get the key in the histogram for the given RGB values |
1937 | """ | |
e811c8ce RD |
1938 | return _core.ImageHistogram_MakeKey(*args, **kwargs) |
1939 | ||
1940 | MakeKey = staticmethod(MakeKey) | |
1941 | def FindFirstUnusedColour(*args, **kwargs): | |
0df68c9f RD |
1942 | """ |
1943 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
e811c8ce | 1944 | |
0df68c9f RD |
1945 | Find first colour that is not used in the image and has higher RGB values than |
1946 | startR, startG, startB. Returns a tuple consisting of a success flag and rgb | |
1947 | values. | |
1948 | """ | |
e811c8ce RD |
1949 | return _core.ImageHistogram_FindFirstUnusedColour(*args, **kwargs) |
1950 | ||
d14a1e28 RD |
1951 | |
1952 | class ImageHistogramPtr(ImageHistogram): | |
1953 | def __init__(self, this): | |
1954 | self.this = this | |
1955 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1956 | self.__class__ = ImageHistogram | |
1957 | _core.ImageHistogram_swigregister(ImageHistogramPtr) | |
1958 | ||
e811c8ce | 1959 | def ImageHistogram_MakeKey(*args, **kwargs): |
0df68c9f RD |
1960 | """ |
1961 | ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long | |
e811c8ce | 1962 | |
0df68c9f RD |
1963 | Get the key in the histogram for the given RGB values |
1964 | """ | |
e811c8ce | 1965 | return _core.ImageHistogram_MakeKey(*args, **kwargs) |
d14a1e28 RD |
1966 | |
1967 | class Image(Object): | |
e811c8ce RD |
1968 | def __repr__(self): |
1969 | return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1970 | def __init__(self, *args, **kwargs): |
e811c8ce | 1971 | """__init__(wxString name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
d14a1e28 RD |
1972 | newobj = _core.new_Image(*args, **kwargs) |
1973 | self.this = newobj.this | |
1974 | self.thisown = 1 | |
1975 | del newobj.thisown | |
1976 | def __del__(self, destroy=_core.delete_Image): | |
e811c8ce | 1977 | """__del__()""" |
d14a1e28 RD |
1978 | try: |
1979 | if self.thisown: destroy(self) | |
1980 | except: pass | |
e811c8ce RD |
1981 | |
1982 | def Create(*args, **kwargs): | |
1983 | """Create(int width, int height)""" | |
1984 | return _core.Image_Create(*args, **kwargs) | |
1985 | ||
1986 | def Destroy(*args, **kwargs): | |
0df68c9f RD |
1987 | """ |
1988 | Destroy() | |
e811c8ce | 1989 | |
0df68c9f RD |
1990 | Deletes the C++ object this Python object is a proxy for. |
1991 | """ | |
e811c8ce RD |
1992 | return _core.Image_Destroy(*args, **kwargs) |
1993 | ||
1994 | def Scale(*args, **kwargs): | |
1995 | """Scale(int width, int height) -> Image""" | |
1996 | return _core.Image_Scale(*args, **kwargs) | |
1997 | ||
1998 | def ShrinkBy(*args, **kwargs): | |
1999 | """ShrinkBy(int xFactor, int yFactor) -> Image""" | |
2000 | return _core.Image_ShrinkBy(*args, **kwargs) | |
2001 | ||
2002 | def Rescale(*args, **kwargs): | |
2003 | """Rescale(int width, int height) -> Image""" | |
2004 | return _core.Image_Rescale(*args, **kwargs) | |
2005 | ||
2006 | def SetRGB(*args, **kwargs): | |
2007 | """SetRGB(int x, int y, unsigned char r, unsigned char g, unsigned char b)""" | |
2008 | return _core.Image_SetRGB(*args, **kwargs) | |
2009 | ||
2010 | def GetRed(*args, **kwargs): | |
2011 | """GetRed(int x, int y) -> unsigned char""" | |
2012 | return _core.Image_GetRed(*args, **kwargs) | |
2013 | ||
2014 | def GetGreen(*args, **kwargs): | |
2015 | """GetGreen(int x, int y) -> unsigned char""" | |
2016 | return _core.Image_GetGreen(*args, **kwargs) | |
2017 | ||
2018 | def GetBlue(*args, **kwargs): | |
2019 | """GetBlue(int x, int y) -> unsigned char""" | |
2020 | return _core.Image_GetBlue(*args, **kwargs) | |
2021 | ||
2022 | def SetAlpha(*args, **kwargs): | |
2023 | """SetAlpha(int x, int y, unsigned char alpha)""" | |
2024 | return _core.Image_SetAlpha(*args, **kwargs) | |
2025 | ||
2026 | def GetAlpha(*args, **kwargs): | |
2027 | """GetAlpha(int x, int y) -> unsigned char""" | |
2028 | return _core.Image_GetAlpha(*args, **kwargs) | |
2029 | ||
2030 | def HasAlpha(*args, **kwargs): | |
2031 | """HasAlpha() -> bool""" | |
2032 | return _core.Image_HasAlpha(*args, **kwargs) | |
2033 | ||
2034 | def FindFirstUnusedColour(*args, **kwargs): | |
0df68c9f RD |
2035 | """ |
2036 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
e811c8ce | 2037 | |
0df68c9f RD |
2038 | Find first colour that is not used in the image and has higher RGB values than |
2039 | startR, startG, startB. Returns a tuple consisting of a success flag and rgb | |
2040 | values. | |
2041 | """ | |
e811c8ce RD |
2042 | return _core.Image_FindFirstUnusedColour(*args, **kwargs) |
2043 | ||
2044 | def SetMaskFromImage(*args, **kwargs): | |
2045 | """SetMaskFromImage(Image mask, byte mr, byte mg, byte mb) -> bool""" | |
2046 | return _core.Image_SetMaskFromImage(*args, **kwargs) | |
2047 | ||
2048 | def CanRead(*args, **kwargs): | |
2049 | """Image.CanRead(wxString name) -> bool""" | |
2050 | return _core.Image_CanRead(*args, **kwargs) | |
2051 | ||
2052 | CanRead = staticmethod(CanRead) | |
2053 | def GetImageCount(*args, **kwargs): | |
2054 | """Image.GetImageCount(wxString name, long type=BITMAP_TYPE_ANY) -> int""" | |
2055 | return _core.Image_GetImageCount(*args, **kwargs) | |
2056 | ||
2057 | GetImageCount = staticmethod(GetImageCount) | |
2058 | def LoadFile(*args, **kwargs): | |
2059 | """LoadFile(wxString name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" | |
2060 | return _core.Image_LoadFile(*args, **kwargs) | |
2061 | ||
2062 | def LoadMimeFile(*args, **kwargs): | |
2063 | """LoadMimeFile(wxString name, wxString mimetype, int index=-1) -> bool""" | |
2064 | return _core.Image_LoadMimeFile(*args, **kwargs) | |
2065 | ||
2066 | def SaveFile(*args, **kwargs): | |
2067 | """SaveFile(wxString name, int type) -> bool""" | |
2068 | return _core.Image_SaveFile(*args, **kwargs) | |
2069 | ||
2070 | def SaveMimeFile(*args, **kwargs): | |
2071 | """SaveMimeFile(wxString name, wxString mimetype) -> bool""" | |
2072 | return _core.Image_SaveMimeFile(*args, **kwargs) | |
2073 | ||
2074 | def CanReadStream(*args, **kwargs): | |
2075 | """Image.CanReadStream(wxInputStream stream) -> bool""" | |
2076 | return _core.Image_CanReadStream(*args, **kwargs) | |
2077 | ||
2078 | CanReadStream = staticmethod(CanReadStream) | |
2079 | def LoadStream(*args, **kwargs): | |
2080 | """LoadStream(wxInputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" | |
2081 | return _core.Image_LoadStream(*args, **kwargs) | |
2082 | ||
2083 | def LoadMimeStream(*args, **kwargs): | |
2084 | """LoadMimeStream(wxInputStream stream, wxString mimetype, int index=-1) -> bool""" | |
2085 | return _core.Image_LoadMimeStream(*args, **kwargs) | |
2086 | ||
2087 | def Ok(*args, **kwargs): | |
2088 | """Ok() -> bool""" | |
2089 | return _core.Image_Ok(*args, **kwargs) | |
2090 | ||
2091 | def GetWidth(*args, **kwargs): | |
2092 | """GetWidth() -> int""" | |
2093 | return _core.Image_GetWidth(*args, **kwargs) | |
2094 | ||
2095 | def GetHeight(*args, **kwargs): | |
2096 | """GetHeight() -> int""" | |
2097 | return _core.Image_GetHeight(*args, **kwargs) | |
2098 | ||
2099 | def GetSubImage(*args, **kwargs): | |
2100 | """GetSubImage(Rect rect) -> Image""" | |
2101 | return _core.Image_GetSubImage(*args, **kwargs) | |
2102 | ||
2103 | def Copy(*args, **kwargs): | |
2104 | """Copy() -> Image""" | |
2105 | return _core.Image_Copy(*args, **kwargs) | |
2106 | ||
2107 | def Paste(*args, **kwargs): | |
2108 | """Paste(Image image, int x, int y)""" | |
2109 | return _core.Image_Paste(*args, **kwargs) | |
2110 | ||
2111 | def GetData(*args, **kwargs): | |
2112 | """GetData() -> PyObject""" | |
2113 | return _core.Image_GetData(*args, **kwargs) | |
2114 | ||
2115 | def SetData(*args, **kwargs): | |
2116 | """SetData(PyObject data)""" | |
2117 | return _core.Image_SetData(*args, **kwargs) | |
2118 | ||
2119 | def GetDataBuffer(*args, **kwargs): | |
2120 | """GetDataBuffer() -> PyObject""" | |
2121 | return _core.Image_GetDataBuffer(*args, **kwargs) | |
2122 | ||
2123 | def SetDataBuffer(*args, **kwargs): | |
2124 | """SetDataBuffer(PyObject data)""" | |
2125 | return _core.Image_SetDataBuffer(*args, **kwargs) | |
2126 | ||
2127 | def GetAlphaData(*args, **kwargs): | |
2128 | """GetAlphaData() -> PyObject""" | |
2129 | return _core.Image_GetAlphaData(*args, **kwargs) | |
2130 | ||
2131 | def SetAlphaData(*args, **kwargs): | |
2132 | """SetAlphaData(PyObject data)""" | |
2133 | return _core.Image_SetAlphaData(*args, **kwargs) | |
2134 | ||
2135 | def GetAlphaBuffer(*args, **kwargs): | |
2136 | """GetAlphaBuffer() -> PyObject""" | |
2137 | return _core.Image_GetAlphaBuffer(*args, **kwargs) | |
2138 | ||
2139 | def SetAlphaBuffer(*args, **kwargs): | |
2140 | """SetAlphaBuffer(PyObject data)""" | |
2141 | return _core.Image_SetAlphaBuffer(*args, **kwargs) | |
2142 | ||
2143 | def SetMaskColour(*args, **kwargs): | |
2144 | """SetMaskColour(unsigned char r, unsigned char g, unsigned char b)""" | |
2145 | return _core.Image_SetMaskColour(*args, **kwargs) | |
2146 | ||
2147 | def GetMaskRed(*args, **kwargs): | |
2148 | """GetMaskRed() -> unsigned char""" | |
2149 | return _core.Image_GetMaskRed(*args, **kwargs) | |
2150 | ||
2151 | def GetMaskGreen(*args, **kwargs): | |
2152 | """GetMaskGreen() -> unsigned char""" | |
2153 | return _core.Image_GetMaskGreen(*args, **kwargs) | |
2154 | ||
2155 | def GetMaskBlue(*args, **kwargs): | |
2156 | """GetMaskBlue() -> unsigned char""" | |
2157 | return _core.Image_GetMaskBlue(*args, **kwargs) | |
2158 | ||
2159 | def SetMask(*args, **kwargs): | |
2160 | """SetMask(bool mask=True)""" | |
2161 | return _core.Image_SetMask(*args, **kwargs) | |
2162 | ||
2163 | def HasMask(*args, **kwargs): | |
2164 | """HasMask() -> bool""" | |
2165 | return _core.Image_HasMask(*args, **kwargs) | |
2166 | ||
2167 | def Rotate(*args, **kwargs): | |
0df68c9f RD |
2168 | """ |
2169 | Rotate(double angle, Point centre_of_rotation, bool interpolating=True, | |
2170 | Point offset_after_rotation=None) -> Image | |
2171 | """ | |
e811c8ce RD |
2172 | return _core.Image_Rotate(*args, **kwargs) |
2173 | ||
2174 | def Rotate90(*args, **kwargs): | |
2175 | """Rotate90(bool clockwise=True) -> Image""" | |
2176 | return _core.Image_Rotate90(*args, **kwargs) | |
2177 | ||
2178 | def Mirror(*args, **kwargs): | |
2179 | """Mirror(bool horizontally=True) -> Image""" | |
2180 | return _core.Image_Mirror(*args, **kwargs) | |
2181 | ||
2182 | def Replace(*args, **kwargs): | |
0df68c9f RD |
2183 | """ |
2184 | Replace(unsigned char r1, unsigned char g1, unsigned char b1, | |
2185 | unsigned char r2, unsigned char g2, unsigned char b2) | |
2186 | """ | |
e811c8ce RD |
2187 | return _core.Image_Replace(*args, **kwargs) |
2188 | ||
2189 | def ConvertToMono(*args, **kwargs): | |
2190 | """ConvertToMono(unsigned char r, unsigned char g, unsigned char b) -> Image""" | |
2191 | return _core.Image_ConvertToMono(*args, **kwargs) | |
2192 | ||
2193 | def SetOption(*args, **kwargs): | |
2194 | """SetOption(wxString name, wxString value)""" | |
2195 | return _core.Image_SetOption(*args, **kwargs) | |
2196 | ||
2197 | def SetOptionInt(*args, **kwargs): | |
2198 | """SetOptionInt(wxString name, int value)""" | |
2199 | return _core.Image_SetOptionInt(*args, **kwargs) | |
2200 | ||
2201 | def GetOption(*args, **kwargs): | |
2202 | """GetOption(wxString name) -> wxString""" | |
2203 | return _core.Image_GetOption(*args, **kwargs) | |
2204 | ||
2205 | def GetOptionInt(*args, **kwargs): | |
2206 | """GetOptionInt(wxString name) -> int""" | |
2207 | return _core.Image_GetOptionInt(*args, **kwargs) | |
2208 | ||
2209 | def HasOption(*args, **kwargs): | |
2210 | """HasOption(wxString name) -> bool""" | |
2211 | return _core.Image_HasOption(*args, **kwargs) | |
2212 | ||
2213 | def CountColours(*args, **kwargs): | |
2214 | """CountColours(unsigned long stopafter=(unsigned long) -1) -> unsigned long""" | |
2215 | return _core.Image_CountColours(*args, **kwargs) | |
2216 | ||
2217 | def ComputeHistogram(*args, **kwargs): | |
2218 | """ComputeHistogram(ImageHistogram h) -> unsigned long""" | |
2219 | return _core.Image_ComputeHistogram(*args, **kwargs) | |
2220 | ||
2221 | def AddHandler(*args, **kwargs): | |
2222 | """Image.AddHandler(ImageHandler handler)""" | |
2223 | return _core.Image_AddHandler(*args, **kwargs) | |
2224 | ||
2225 | AddHandler = staticmethod(AddHandler) | |
2226 | def InsertHandler(*args, **kwargs): | |
2227 | """Image.InsertHandler(ImageHandler handler)""" | |
2228 | return _core.Image_InsertHandler(*args, **kwargs) | |
2229 | ||
2230 | InsertHandler = staticmethod(InsertHandler) | |
2231 | def RemoveHandler(*args, **kwargs): | |
2232 | """Image.RemoveHandler(wxString name) -> bool""" | |
2233 | return _core.Image_RemoveHandler(*args, **kwargs) | |
2234 | ||
2235 | RemoveHandler = staticmethod(RemoveHandler) | |
2236 | def GetImageExtWildcard(*args, **kwargs): | |
2237 | """Image.GetImageExtWildcard() -> wxString""" | |
2238 | return _core.Image_GetImageExtWildcard(*args, **kwargs) | |
2239 | ||
2240 | GetImageExtWildcard = staticmethod(GetImageExtWildcard) | |
2241 | def ConvertToBitmap(*args, **kwargs): | |
2242 | """ConvertToBitmap() -> wxBitmap""" | |
2243 | return _core.Image_ConvertToBitmap(*args, **kwargs) | |
2244 | ||
2245 | def ConvertToMonoBitmap(*args, **kwargs): | |
2246 | """ConvertToMonoBitmap(unsigned char red, unsigned char green, unsigned char blue) -> wxBitmap""" | |
2247 | return _core.Image_ConvertToMonoBitmap(*args, **kwargs) | |
2248 | ||
2249 | def __nonzero__(self): return self.Ok() | |
d14a1e28 RD |
2250 | |
2251 | class ImagePtr(Image): | |
2252 | def __init__(self, this): | |
2253 | self.this = this | |
2254 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2255 | self.__class__ = Image | |
2256 | _core.Image_swigregister(ImagePtr) | |
2257 | ||
2258 | def ImageFromMime(*args, **kwargs): | |
e811c8ce | 2259 | """ImageFromMime(wxString name, wxString mimetype, int index=-1) -> Image""" |
d14a1e28 RD |
2260 | val = _core.new_ImageFromMime(*args, **kwargs) |
2261 | val.thisown = 1 | |
2262 | return val | |
2263 | ||
2264 | def ImageFromStream(*args, **kwargs): | |
e811c8ce | 2265 | """ImageFromStream(wxInputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
d14a1e28 RD |
2266 | val = _core.new_ImageFromStream(*args, **kwargs) |
2267 | val.thisown = 1 | |
2268 | return val | |
2269 | ||
2270 | def ImageFromStreamMime(*args, **kwargs): | |
e811c8ce | 2271 | """ImageFromStreamMime(wxInputStream stream, wxString mimetype, int index=-1) -> Image""" |
d14a1e28 RD |
2272 | val = _core.new_ImageFromStreamMime(*args, **kwargs) |
2273 | val.thisown = 1 | |
2274 | return val | |
2275 | ||
2276 | def EmptyImage(*args, **kwargs): | |
e811c8ce | 2277 | """EmptyImage(int width=0, int height=0, bool clear=True) -> Image""" |
d14a1e28 RD |
2278 | val = _core.new_EmptyImage(*args, **kwargs) |
2279 | val.thisown = 1 | |
2280 | return val | |
2281 | ||
2282 | def ImageFromBitmap(*args, **kwargs): | |
e811c8ce | 2283 | """ImageFromBitmap(wxBitmap bitmap) -> Image""" |
d14a1e28 RD |
2284 | val = _core.new_ImageFromBitmap(*args, **kwargs) |
2285 | val.thisown = 1 | |
2286 | return val | |
2287 | ||
2288 | def ImageFromData(*args, **kwargs): | |
e811c8ce | 2289 | """ImageFromData(int width, int height, unsigned char data) -> Image""" |
d14a1e28 RD |
2290 | val = _core.new_ImageFromData(*args, **kwargs) |
2291 | val.thisown = 1 | |
2292 | return val | |
2293 | ||
e811c8ce RD |
2294 | def Image_CanRead(*args, **kwargs): |
2295 | """Image_CanRead(wxString name) -> bool""" | |
2296 | return _core.Image_CanRead(*args, **kwargs) | |
d14a1e28 | 2297 | |
e811c8ce RD |
2298 | def Image_GetImageCount(*args, **kwargs): |
2299 | """Image_GetImageCount(wxString name, long type=BITMAP_TYPE_ANY) -> int""" | |
2300 | return _core.Image_GetImageCount(*args, **kwargs) | |
d14a1e28 | 2301 | |
e811c8ce RD |
2302 | def Image_CanReadStream(*args, **kwargs): |
2303 | """Image_CanReadStream(wxInputStream stream) -> bool""" | |
2304 | return _core.Image_CanReadStream(*args, **kwargs) | |
d14a1e28 | 2305 | |
e811c8ce RD |
2306 | def Image_AddHandler(*args, **kwargs): |
2307 | """Image_AddHandler(ImageHandler handler)""" | |
2308 | return _core.Image_AddHandler(*args, **kwargs) | |
d14a1e28 | 2309 | |
e811c8ce RD |
2310 | def Image_InsertHandler(*args, **kwargs): |
2311 | """Image_InsertHandler(ImageHandler handler)""" | |
2312 | return _core.Image_InsertHandler(*args, **kwargs) | |
d14a1e28 | 2313 | |
e811c8ce RD |
2314 | def Image_RemoveHandler(*args, **kwargs): |
2315 | """Image_RemoveHandler(wxString name) -> bool""" | |
2316 | return _core.Image_RemoveHandler(*args, **kwargs) | |
d14a1e28 | 2317 | |
e811c8ce RD |
2318 | def Image_GetImageExtWildcard(*args, **kwargs): |
2319 | """Image_GetImageExtWildcard() -> wxString""" | |
2320 | return _core.Image_GetImageExtWildcard(*args, **kwargs) | |
d14a1e28 RD |
2321 | |
2322 | ||
e811c8ce RD |
2323 | def InitAllImageHandlers(*args, **kwargs): |
2324 | """InitAllImageHandlers()""" | |
2325 | return _core.InitAllImageHandlers(*args, **kwargs) | |
d14a1e28 RD |
2326 | IMAGE_RESOLUTION_INCHES = _core.IMAGE_RESOLUTION_INCHES |
2327 | IMAGE_RESOLUTION_CM = _core.IMAGE_RESOLUTION_CM | |
2328 | BMP_24BPP = _core.BMP_24BPP | |
2329 | BMP_8BPP = _core.BMP_8BPP | |
2330 | BMP_8BPP_GREY = _core.BMP_8BPP_GREY | |
2331 | BMP_8BPP_GRAY = _core.BMP_8BPP_GRAY | |
2332 | BMP_8BPP_RED = _core.BMP_8BPP_RED | |
2333 | BMP_8BPP_PALETTE = _core.BMP_8BPP_PALETTE | |
2334 | BMP_4BPP = _core.BMP_4BPP | |
2335 | BMP_1BPP = _core.BMP_1BPP | |
2336 | BMP_1BPP_BW = _core.BMP_1BPP_BW | |
2337 | class BMPHandler(ImageHandler): | |
e811c8ce RD |
2338 | def __repr__(self): |
2339 | return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2340 | def __init__(self, *args, **kwargs): |
e811c8ce | 2341 | """__init__() -> BMPHandler""" |
d14a1e28 RD |
2342 | newobj = _core.new_BMPHandler(*args, **kwargs) |
2343 | self.this = newobj.this | |
2344 | self.thisown = 1 | |
2345 | del newobj.thisown | |
d14a1e28 RD |
2346 | |
2347 | class BMPHandlerPtr(BMPHandler): | |
2348 | def __init__(self, this): | |
2349 | self.this = this | |
2350 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2351 | self.__class__ = BMPHandler | |
2352 | _core.BMPHandler_swigregister(BMPHandlerPtr) | |
2353 | NullImage = cvar.NullImage | |
2354 | IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT | |
2355 | IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X | |
2356 | IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y | |
2357 | IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION | |
2358 | IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT | |
2359 | ||
2360 | class ICOHandler(BMPHandler): | |
e811c8ce RD |
2361 | def __repr__(self): |
2362 | return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2363 | def __init__(self, *args, **kwargs): |
e811c8ce | 2364 | """__init__() -> ICOHandler""" |
d14a1e28 RD |
2365 | newobj = _core.new_ICOHandler(*args, **kwargs) |
2366 | self.this = newobj.this | |
2367 | self.thisown = 1 | |
2368 | del newobj.thisown | |
d14a1e28 RD |
2369 | |
2370 | class ICOHandlerPtr(ICOHandler): | |
2371 | def __init__(self, this): | |
2372 | self.this = this | |
2373 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2374 | self.__class__ = ICOHandler | |
2375 | _core.ICOHandler_swigregister(ICOHandlerPtr) | |
2376 | ||
2377 | class CURHandler(ICOHandler): | |
e811c8ce RD |
2378 | def __repr__(self): |
2379 | return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2380 | def __init__(self, *args, **kwargs): |
e811c8ce | 2381 | """__init__() -> CURHandler""" |
d14a1e28 RD |
2382 | newobj = _core.new_CURHandler(*args, **kwargs) |
2383 | self.this = newobj.this | |
2384 | self.thisown = 1 | |
2385 | del newobj.thisown | |
d14a1e28 RD |
2386 | |
2387 | class CURHandlerPtr(CURHandler): | |
2388 | def __init__(self, this): | |
2389 | self.this = this | |
2390 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2391 | self.__class__ = CURHandler | |
2392 | _core.CURHandler_swigregister(CURHandlerPtr) | |
2393 | ||
2394 | class ANIHandler(CURHandler): | |
e811c8ce RD |
2395 | def __repr__(self): |
2396 | return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2397 | def __init__(self, *args, **kwargs): |
e811c8ce | 2398 | """__init__() -> ANIHandler""" |
d14a1e28 RD |
2399 | newobj = _core.new_ANIHandler(*args, **kwargs) |
2400 | self.this = newobj.this | |
2401 | self.thisown = 1 | |
2402 | del newobj.thisown | |
d14a1e28 RD |
2403 | |
2404 | class ANIHandlerPtr(ANIHandler): | |
2405 | def __init__(self, this): | |
2406 | self.this = this | |
2407 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2408 | self.__class__ = ANIHandler | |
2409 | _core.ANIHandler_swigregister(ANIHandlerPtr) | |
2410 | ||
2411 | class PNGHandler(ImageHandler): | |
e811c8ce RD |
2412 | def __repr__(self): |
2413 | return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2414 | def __init__(self, *args, **kwargs): |
e811c8ce | 2415 | """__init__() -> PNGHandler""" |
d14a1e28 RD |
2416 | newobj = _core.new_PNGHandler(*args, **kwargs) |
2417 | self.this = newobj.this | |
2418 | self.thisown = 1 | |
2419 | del newobj.thisown | |
d14a1e28 RD |
2420 | |
2421 | class PNGHandlerPtr(PNGHandler): | |
2422 | def __init__(self, this): | |
2423 | self.this = this | |
2424 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2425 | self.__class__ = PNGHandler | |
2426 | _core.PNGHandler_swigregister(PNGHandlerPtr) | |
2427 | ||
2428 | class GIFHandler(ImageHandler): | |
e811c8ce RD |
2429 | def __repr__(self): |
2430 | return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2431 | def __init__(self, *args, **kwargs): |
e811c8ce | 2432 | """__init__() -> GIFHandler""" |
d14a1e28 RD |
2433 | newobj = _core.new_GIFHandler(*args, **kwargs) |
2434 | self.this = newobj.this | |
2435 | self.thisown = 1 | |
2436 | del newobj.thisown | |
d14a1e28 RD |
2437 | |
2438 | class GIFHandlerPtr(GIFHandler): | |
2439 | def __init__(self, this): | |
2440 | self.this = this | |
2441 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2442 | self.__class__ = GIFHandler | |
2443 | _core.GIFHandler_swigregister(GIFHandlerPtr) | |
2444 | ||
2445 | class PCXHandler(ImageHandler): | |
e811c8ce RD |
2446 | def __repr__(self): |
2447 | return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2448 | def __init__(self, *args, **kwargs): |
e811c8ce | 2449 | """__init__() -> PCXHandler""" |
d14a1e28 RD |
2450 | newobj = _core.new_PCXHandler(*args, **kwargs) |
2451 | self.this = newobj.this | |
2452 | self.thisown = 1 | |
2453 | del newobj.thisown | |
d14a1e28 RD |
2454 | |
2455 | class PCXHandlerPtr(PCXHandler): | |
2456 | def __init__(self, this): | |
2457 | self.this = this | |
2458 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2459 | self.__class__ = PCXHandler | |
2460 | _core.PCXHandler_swigregister(PCXHandlerPtr) | |
2461 | ||
2462 | class JPEGHandler(ImageHandler): | |
e811c8ce RD |
2463 | def __repr__(self): |
2464 | return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2465 | def __init__(self, *args, **kwargs): |
e811c8ce | 2466 | """__init__() -> JPEGHandler""" |
d14a1e28 RD |
2467 | newobj = _core.new_JPEGHandler(*args, **kwargs) |
2468 | self.this = newobj.this | |
2469 | self.thisown = 1 | |
2470 | del newobj.thisown | |
d14a1e28 RD |
2471 | |
2472 | class JPEGHandlerPtr(JPEGHandler): | |
2473 | def __init__(self, this): | |
2474 | self.this = this | |
2475 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2476 | self.__class__ = JPEGHandler | |
2477 | _core.JPEGHandler_swigregister(JPEGHandlerPtr) | |
2478 | ||
2479 | class PNMHandler(ImageHandler): | |
e811c8ce RD |
2480 | def __repr__(self): |
2481 | return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2482 | def __init__(self, *args, **kwargs): |
e811c8ce | 2483 | """__init__() -> PNMHandler""" |
d14a1e28 RD |
2484 | newobj = _core.new_PNMHandler(*args, **kwargs) |
2485 | self.this = newobj.this | |
2486 | self.thisown = 1 | |
2487 | del newobj.thisown | |
d14a1e28 RD |
2488 | |
2489 | class PNMHandlerPtr(PNMHandler): | |
2490 | def __init__(self, this): | |
2491 | self.this = this | |
2492 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2493 | self.__class__ = PNMHandler | |
2494 | _core.PNMHandler_swigregister(PNMHandlerPtr) | |
2495 | ||
2496 | class XPMHandler(ImageHandler): | |
e811c8ce RD |
2497 | def __repr__(self): |
2498 | return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2499 | def __init__(self, *args, **kwargs): |
e811c8ce | 2500 | """__init__() -> XPMHandler""" |
d14a1e28 RD |
2501 | newobj = _core.new_XPMHandler(*args, **kwargs) |
2502 | self.this = newobj.this | |
2503 | self.thisown = 1 | |
2504 | del newobj.thisown | |
d14a1e28 RD |
2505 | |
2506 | class XPMHandlerPtr(XPMHandler): | |
2507 | def __init__(self, this): | |
2508 | self.this = this | |
2509 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2510 | self.__class__ = XPMHandler | |
2511 | _core.XPMHandler_swigregister(XPMHandlerPtr) | |
2512 | ||
2513 | class TIFFHandler(ImageHandler): | |
e811c8ce RD |
2514 | def __repr__(self): |
2515 | return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2516 | def __init__(self, *args, **kwargs): |
e811c8ce | 2517 | """__init__() -> TIFFHandler""" |
d14a1e28 RD |
2518 | newobj = _core.new_TIFFHandler(*args, **kwargs) |
2519 | self.this = newobj.this | |
2520 | self.thisown = 1 | |
2521 | del newobj.thisown | |
d14a1e28 RD |
2522 | |
2523 | class TIFFHandlerPtr(TIFFHandler): | |
2524 | def __init__(self, this): | |
2525 | self.this = this | |
2526 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2527 | self.__class__ = TIFFHandler | |
2528 | _core.TIFFHandler_swigregister(TIFFHandlerPtr) | |
2529 | ||
2530 | #--------------------------------------------------------------------------- | |
2531 | ||
2532 | class EvtHandler(Object): | |
e811c8ce RD |
2533 | def __repr__(self): |
2534 | return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2535 | def __init__(self, *args, **kwargs): |
e811c8ce | 2536 | """__init__() -> EvtHandler""" |
d14a1e28 RD |
2537 | newobj = _core.new_EvtHandler(*args, **kwargs) |
2538 | self.this = newobj.this | |
2539 | self.thisown = 1 | |
2540 | del newobj.thisown | |
e811c8ce RD |
2541 | def GetNextHandler(*args, **kwargs): |
2542 | """GetNextHandler() -> EvtHandler""" | |
2543 | return _core.EvtHandler_GetNextHandler(*args, **kwargs) | |
2544 | ||
2545 | def GetPreviousHandler(*args, **kwargs): | |
2546 | """GetPreviousHandler() -> EvtHandler""" | |
2547 | return _core.EvtHandler_GetPreviousHandler(*args, **kwargs) | |
2548 | ||
2549 | def SetNextHandler(*args, **kwargs): | |
2550 | """SetNextHandler(EvtHandler handler)""" | |
2551 | return _core.EvtHandler_SetNextHandler(*args, **kwargs) | |
2552 | ||
2553 | def SetPreviousHandler(*args, **kwargs): | |
2554 | """SetPreviousHandler(EvtHandler handler)""" | |
2555 | return _core.EvtHandler_SetPreviousHandler(*args, **kwargs) | |
2556 | ||
2557 | def GetEvtHandlerEnabled(*args, **kwargs): | |
2558 | """GetEvtHandlerEnabled() -> bool""" | |
2559 | return _core.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs) | |
2560 | ||
2561 | def SetEvtHandlerEnabled(*args, **kwargs): | |
2562 | """SetEvtHandlerEnabled(bool enabled)""" | |
2563 | return _core.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs) | |
2564 | ||
2565 | def ProcessEvent(*args, **kwargs): | |
2566 | """ProcessEvent(Event event) -> bool""" | |
2567 | return _core.EvtHandler_ProcessEvent(*args, **kwargs) | |
2568 | ||
2569 | def AddPendingEvent(*args, **kwargs): | |
2570 | """AddPendingEvent(Event event)""" | |
2571 | return _core.EvtHandler_AddPendingEvent(*args, **kwargs) | |
2572 | ||
2573 | def ProcessPendingEvents(*args, **kwargs): | |
2574 | """ProcessPendingEvents()""" | |
2575 | return _core.EvtHandler_ProcessPendingEvents(*args, **kwargs) | |
2576 | ||
2577 | def Connect(*args, **kwargs): | |
2578 | """Connect(int id, int lastId, int eventType, PyObject func)""" | |
2579 | return _core.EvtHandler_Connect(*args, **kwargs) | |
2580 | ||
2581 | def Disconnect(*args, **kwargs): | |
2582 | """Disconnect(int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool""" | |
2583 | return _core.EvtHandler_Disconnect(*args, **kwargs) | |
2584 | ||
2585 | def _setOORInfo(*args, **kwargs): | |
2586 | """_setOORInfo(PyObject _self)""" | |
2587 | return _core.EvtHandler__setOORInfo(*args, **kwargs) | |
2588 | ||
d14a1e28 RD |
2589 | def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
2590 | """ | |
2591 | Bind an event to an event handler. | |
2592 | ||
2593 | event One of the EVT_* objects that specifies the | |
2594 | type of event to bind, | |
2595 | ||
2596 | handler A callable object to be invoked when the event | |
2597 | is delivered to self. Pass None to disconnect an | |
2598 | event handler. | |
2599 | ||
2600 | source Sometimes the event originates from a different window | |
2601 | than self, but you still want to catch it in self. (For | |
2602 | example, a button event delivered to a frame.) By | |
2603 | passing the source of the event, the event handling | |
2604 | system is able to differentiate between the same event | |
2605 | type from different controls. | |
2606 | ||
2607 | id,id2 Used for menu IDs or for event types that require a | |
2608 | range of IDs | |
2609 | """ | |
2610 | if source is not None: | |
2611 | id = source.GetId() | |
2612 | event.Bind(self, id, id2, handler) | |
2613 | ||
2614 | ||
d14a1e28 RD |
2615 | |
2616 | class EvtHandlerPtr(EvtHandler): | |
2617 | def __init__(self, this): | |
2618 | self.this = this | |
2619 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2620 | self.__class__ = EvtHandler | |
2621 | _core.EvtHandler_swigregister(EvtHandlerPtr) | |
2622 | ||
2623 | #--------------------------------------------------------------------------- | |
2624 | ||
2625 | class PyEventBinder(object): | |
2626 | """ | |
2627 | Instances of this class are used to bind specific events to event | |
2628 | handlers. | |
2629 | """ | |
2630 | def __init__(self, evtType, expectedIDs=0): | |
2631 | if expectedIDs not in [0, 1, 2]: | |
2632 | raise ValueError, "Invalid number of expectedIDs" | |
2633 | self.expectedIDs = expectedIDs | |
2634 | ||
2635 | if type(evtType) == list or type(evtType) == tuple: | |
2636 | self.evtType = evtType | |
2637 | else: | |
2638 | self.evtType = [evtType] | |
2639 | ||
2640 | ||
2641 | def Bind(self, target, id1, id2, function): | |
2642 | """Bind this set of event types to target.""" | |
2643 | for et in self.evtType: | |
2644 | target.Connect(id1, id2, et, function) | |
2645 | ||
2646 | ||
2647 | def __call__(self, *args): | |
2648 | """ | |
2649 | For backwards compatibility with the old EVT_* functions. | |
2650 | Should be called with either (window, func), (window, ID, | |
2651 | func) or (window, ID1, ID2, func) parameters depending on the | |
2652 | type of the event. | |
2653 | """ | |
2654 | assert len(args) == 2 + self.expectedIDs | |
2655 | id1 = wx.ID_ANY | |
2656 | id2 = wx.ID_ANY | |
2657 | target = args[0] | |
2658 | if self.expectedIDs == 0: | |
2659 | func = args[1] | |
2660 | elif self.expectedIDs == 1: | |
2661 | id1 = args[1] | |
2662 | func = args[2] | |
2663 | elif self.expectedIDs == 2: | |
2664 | id1 = args[1] | |
2665 | id2 = args[2] | |
2666 | func = args[3] | |
2667 | else: | |
2668 | raise ValueError, "Unexpected number of IDs" | |
2669 | ||
2670 | self.Bind(target, id1, id2, func) | |
2671 | ||
2672 | ||
2673 | # These two are square pegs that don't fit the PyEventBinder hole... | |
2674 | def EVT_COMMAND(win, id, cmd, func): | |
2675 | win.Connect(id, -1, cmd, func) | |
2676 | def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): | |
2677 | win.Connect(id1, id2, cmd, func) | |
2678 | ||
2679 | ||
2680 | #--------------------------------------------------------------------------- | |
2681 | ||
2682 | #--------------------------------------------------------------------------- | |
2683 | ||
2684 | EVENT_PROPAGATE_NONE = _core.EVENT_PROPAGATE_NONE | |
2685 | EVENT_PROPAGATE_MAX = _core.EVENT_PROPAGATE_MAX | |
2686 | ||
e811c8ce RD |
2687 | def NewEventType(*args, **kwargs): |
2688 | """NewEventType() -> wxEventType""" | |
2689 | return _core.NewEventType(*args, **kwargs) | |
d14a1e28 RD |
2690 | wxEVT_NULL = _core.wxEVT_NULL |
2691 | wxEVT_FIRST = _core.wxEVT_FIRST | |
2692 | wxEVT_USER_FIRST = _core.wxEVT_USER_FIRST | |
2693 | wxEVT_COMMAND_BUTTON_CLICKED = _core.wxEVT_COMMAND_BUTTON_CLICKED | |
2694 | wxEVT_COMMAND_CHECKBOX_CLICKED = _core.wxEVT_COMMAND_CHECKBOX_CLICKED | |
2695 | wxEVT_COMMAND_CHOICE_SELECTED = _core.wxEVT_COMMAND_CHOICE_SELECTED | |
2696 | wxEVT_COMMAND_LISTBOX_SELECTED = _core.wxEVT_COMMAND_LISTBOX_SELECTED | |
2697 | wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED | |
2698 | wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED | |
2699 | wxEVT_COMMAND_MENU_SELECTED = _core.wxEVT_COMMAND_MENU_SELECTED | |
2700 | wxEVT_COMMAND_TOOL_CLICKED = _core.wxEVT_COMMAND_TOOL_CLICKED | |
2701 | wxEVT_COMMAND_SLIDER_UPDATED = _core.wxEVT_COMMAND_SLIDER_UPDATED | |
2702 | wxEVT_COMMAND_RADIOBOX_SELECTED = _core.wxEVT_COMMAND_RADIOBOX_SELECTED | |
2703 | wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core.wxEVT_COMMAND_RADIOBUTTON_SELECTED | |
2704 | wxEVT_COMMAND_SCROLLBAR_UPDATED = _core.wxEVT_COMMAND_SCROLLBAR_UPDATED | |
2705 | wxEVT_COMMAND_VLBOX_SELECTED = _core.wxEVT_COMMAND_VLBOX_SELECTED | |
2706 | wxEVT_COMMAND_COMBOBOX_SELECTED = _core.wxEVT_COMMAND_COMBOBOX_SELECTED | |
2707 | wxEVT_COMMAND_TOOL_RCLICKED = _core.wxEVT_COMMAND_TOOL_RCLICKED | |
2708 | wxEVT_COMMAND_TOOL_ENTER = _core.wxEVT_COMMAND_TOOL_ENTER | |
2709 | wxEVT_LEFT_DOWN = _core.wxEVT_LEFT_DOWN | |
2710 | wxEVT_LEFT_UP = _core.wxEVT_LEFT_UP | |
2711 | wxEVT_MIDDLE_DOWN = _core.wxEVT_MIDDLE_DOWN | |
2712 | wxEVT_MIDDLE_UP = _core.wxEVT_MIDDLE_UP | |
2713 | wxEVT_RIGHT_DOWN = _core.wxEVT_RIGHT_DOWN | |
2714 | wxEVT_RIGHT_UP = _core.wxEVT_RIGHT_UP | |
2715 | wxEVT_MOTION = _core.wxEVT_MOTION | |
2716 | wxEVT_ENTER_WINDOW = _core.wxEVT_ENTER_WINDOW | |
2717 | wxEVT_LEAVE_WINDOW = _core.wxEVT_LEAVE_WINDOW | |
2718 | wxEVT_LEFT_DCLICK = _core.wxEVT_LEFT_DCLICK | |
2719 | wxEVT_MIDDLE_DCLICK = _core.wxEVT_MIDDLE_DCLICK | |
2720 | wxEVT_RIGHT_DCLICK = _core.wxEVT_RIGHT_DCLICK | |
2721 | wxEVT_SET_FOCUS = _core.wxEVT_SET_FOCUS | |
2722 | wxEVT_KILL_FOCUS = _core.wxEVT_KILL_FOCUS | |
2723 | wxEVT_CHILD_FOCUS = _core.wxEVT_CHILD_FOCUS | |
2724 | wxEVT_MOUSEWHEEL = _core.wxEVT_MOUSEWHEEL | |
2725 | wxEVT_NC_LEFT_DOWN = _core.wxEVT_NC_LEFT_DOWN | |
2726 | wxEVT_NC_LEFT_UP = _core.wxEVT_NC_LEFT_UP | |
2727 | wxEVT_NC_MIDDLE_DOWN = _core.wxEVT_NC_MIDDLE_DOWN | |
2728 | wxEVT_NC_MIDDLE_UP = _core.wxEVT_NC_MIDDLE_UP | |
2729 | wxEVT_NC_RIGHT_DOWN = _core.wxEVT_NC_RIGHT_DOWN | |
2730 | wxEVT_NC_RIGHT_UP = _core.wxEVT_NC_RIGHT_UP | |
2731 | wxEVT_NC_MOTION = _core.wxEVT_NC_MOTION | |
2732 | wxEVT_NC_ENTER_WINDOW = _core.wxEVT_NC_ENTER_WINDOW | |
2733 | wxEVT_NC_LEAVE_WINDOW = _core.wxEVT_NC_LEAVE_WINDOW | |
2734 | wxEVT_NC_LEFT_DCLICK = _core.wxEVT_NC_LEFT_DCLICK | |
2735 | wxEVT_NC_MIDDLE_DCLICK = _core.wxEVT_NC_MIDDLE_DCLICK | |
2736 | wxEVT_NC_RIGHT_DCLICK = _core.wxEVT_NC_RIGHT_DCLICK | |
2737 | wxEVT_CHAR = _core.wxEVT_CHAR | |
2738 | wxEVT_CHAR_HOOK = _core.wxEVT_CHAR_HOOK | |
2739 | wxEVT_NAVIGATION_KEY = _core.wxEVT_NAVIGATION_KEY | |
2740 | wxEVT_KEY_DOWN = _core.wxEVT_KEY_DOWN | |
2741 | wxEVT_KEY_UP = _core.wxEVT_KEY_UP | |
2742 | wxEVT_HOTKEY = _core.wxEVT_HOTKEY | |
2743 | wxEVT_SET_CURSOR = _core.wxEVT_SET_CURSOR | |
2744 | wxEVT_SCROLL_TOP = _core.wxEVT_SCROLL_TOP | |
2745 | wxEVT_SCROLL_BOTTOM = _core.wxEVT_SCROLL_BOTTOM | |
2746 | wxEVT_SCROLL_LINEUP = _core.wxEVT_SCROLL_LINEUP | |
2747 | wxEVT_SCROLL_LINEDOWN = _core.wxEVT_SCROLL_LINEDOWN | |
2748 | wxEVT_SCROLL_PAGEUP = _core.wxEVT_SCROLL_PAGEUP | |
2749 | wxEVT_SCROLL_PAGEDOWN = _core.wxEVT_SCROLL_PAGEDOWN | |
2750 | wxEVT_SCROLL_THUMBTRACK = _core.wxEVT_SCROLL_THUMBTRACK | |
2751 | wxEVT_SCROLL_THUMBRELEASE = _core.wxEVT_SCROLL_THUMBRELEASE | |
2752 | wxEVT_SCROLL_ENDSCROLL = _core.wxEVT_SCROLL_ENDSCROLL | |
2753 | wxEVT_SCROLLWIN_TOP = _core.wxEVT_SCROLLWIN_TOP | |
2754 | wxEVT_SCROLLWIN_BOTTOM = _core.wxEVT_SCROLLWIN_BOTTOM | |
2755 | wxEVT_SCROLLWIN_LINEUP = _core.wxEVT_SCROLLWIN_LINEUP | |
2756 | wxEVT_SCROLLWIN_LINEDOWN = _core.wxEVT_SCROLLWIN_LINEDOWN | |
2757 | wxEVT_SCROLLWIN_PAGEUP = _core.wxEVT_SCROLLWIN_PAGEUP | |
2758 | wxEVT_SCROLLWIN_PAGEDOWN = _core.wxEVT_SCROLLWIN_PAGEDOWN | |
2759 | wxEVT_SCROLLWIN_THUMBTRACK = _core.wxEVT_SCROLLWIN_THUMBTRACK | |
2760 | wxEVT_SCROLLWIN_THUMBRELEASE = _core.wxEVT_SCROLLWIN_THUMBRELEASE | |
2761 | wxEVT_SIZE = _core.wxEVT_SIZE | |
2762 | wxEVT_MOVE = _core.wxEVT_MOVE | |
2763 | wxEVT_CLOSE_WINDOW = _core.wxEVT_CLOSE_WINDOW | |
2764 | wxEVT_END_SESSION = _core.wxEVT_END_SESSION | |
2765 | wxEVT_QUERY_END_SESSION = _core.wxEVT_QUERY_END_SESSION | |
2766 | wxEVT_ACTIVATE_APP = _core.wxEVT_ACTIVATE_APP | |
2767 | wxEVT_POWER = _core.wxEVT_POWER | |
2768 | wxEVT_ACTIVATE = _core.wxEVT_ACTIVATE | |
2769 | wxEVT_CREATE = _core.wxEVT_CREATE | |
2770 | wxEVT_DESTROY = _core.wxEVT_DESTROY | |
2771 | wxEVT_SHOW = _core.wxEVT_SHOW | |
2772 | wxEVT_ICONIZE = _core.wxEVT_ICONIZE | |
2773 | wxEVT_MAXIMIZE = _core.wxEVT_MAXIMIZE | |
2774 | wxEVT_MOUSE_CAPTURE_CHANGED = _core.wxEVT_MOUSE_CAPTURE_CHANGED | |
2775 | wxEVT_PAINT = _core.wxEVT_PAINT | |
2776 | wxEVT_ERASE_BACKGROUND = _core.wxEVT_ERASE_BACKGROUND | |
2777 | wxEVT_NC_PAINT = _core.wxEVT_NC_PAINT | |
2778 | wxEVT_PAINT_ICON = _core.wxEVT_PAINT_ICON | |
2779 | wxEVT_MENU_OPEN = _core.wxEVT_MENU_OPEN | |
2780 | wxEVT_MENU_CLOSE = _core.wxEVT_MENU_CLOSE | |
2781 | wxEVT_MENU_HIGHLIGHT = _core.wxEVT_MENU_HIGHLIGHT | |
2782 | wxEVT_CONTEXT_MENU = _core.wxEVT_CONTEXT_MENU | |
2783 | wxEVT_SYS_COLOUR_CHANGED = _core.wxEVT_SYS_COLOUR_CHANGED | |
2784 | wxEVT_DISPLAY_CHANGED = _core.wxEVT_DISPLAY_CHANGED | |
2785 | wxEVT_SETTING_CHANGED = _core.wxEVT_SETTING_CHANGED | |
2786 | wxEVT_QUERY_NEW_PALETTE = _core.wxEVT_QUERY_NEW_PALETTE | |
2787 | wxEVT_PALETTE_CHANGED = _core.wxEVT_PALETTE_CHANGED | |
2788 | wxEVT_DROP_FILES = _core.wxEVT_DROP_FILES | |
2789 | wxEVT_DRAW_ITEM = _core.wxEVT_DRAW_ITEM | |
2790 | wxEVT_MEASURE_ITEM = _core.wxEVT_MEASURE_ITEM | |
2791 | wxEVT_COMPARE_ITEM = _core.wxEVT_COMPARE_ITEM | |
2792 | wxEVT_INIT_DIALOG = _core.wxEVT_INIT_DIALOG | |
2793 | wxEVT_IDLE = _core.wxEVT_IDLE | |
2794 | wxEVT_UPDATE_UI = _core.wxEVT_UPDATE_UI | |
2795 | wxEVT_SIZING = _core.wxEVT_SIZING | |
2796 | wxEVT_MOVING = _core.wxEVT_MOVING | |
2797 | wxEVT_COMMAND_LEFT_CLICK = _core.wxEVT_COMMAND_LEFT_CLICK | |
2798 | wxEVT_COMMAND_LEFT_DCLICK = _core.wxEVT_COMMAND_LEFT_DCLICK | |
2799 | wxEVT_COMMAND_RIGHT_CLICK = _core.wxEVT_COMMAND_RIGHT_CLICK | |
2800 | wxEVT_COMMAND_RIGHT_DCLICK = _core.wxEVT_COMMAND_RIGHT_DCLICK | |
2801 | wxEVT_COMMAND_SET_FOCUS = _core.wxEVT_COMMAND_SET_FOCUS | |
2802 | wxEVT_COMMAND_KILL_FOCUS = _core.wxEVT_COMMAND_KILL_FOCUS | |
2803 | wxEVT_COMMAND_ENTER = _core.wxEVT_COMMAND_ENTER | |
2804 | # | |
2805 | # Create some event binders | |
2806 | EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE ) | |
2807 | EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING ) | |
2808 | EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE ) | |
2809 | EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING ) | |
2810 | EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW ) | |
2811 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
2812 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
2813 | EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT ) | |
2814 | EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT ) | |
2815 | EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND ) | |
2816 | EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR ) | |
2817 | EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN ) | |
2818 | EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP ) | |
2819 | EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) | |
2820 | EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK ) | |
2821 | EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN ) | |
2822 | EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE ) | |
2823 | EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1) | |
2824 | EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT ) | |
2825 | EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS ) | |
2826 | EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS ) | |
2827 | EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS ) | |
2828 | EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE ) | |
2829 | EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP ) | |
2830 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
2831 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
2832 | EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES ) | |
2833 | EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG ) | |
2834 | EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED ) | |
2835 | EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED ) | |
2836 | EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW ) | |
2837 | EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE ) | |
2838 | EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE ) | |
2839 | EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY ) | |
2840 | EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED ) | |
2841 | EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE ) | |
2842 | EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE ) | |
2843 | EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY ) | |
2844 | EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR ) | |
2845 | EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED ) | |
2846 | ||
2847 | EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN ) | |
2848 | EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP ) | |
2849 | EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN ) | |
2850 | EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP ) | |
2851 | EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN ) | |
2852 | EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP ) | |
2853 | EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION ) | |
2854 | EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK ) | |
2855 | EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK ) | |
2856 | EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK ) | |
2857 | EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW ) | |
2858 | EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW ) | |
2859 | EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL ) | |
2860 | ||
2861 | EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN, | |
2862 | wxEVT_LEFT_UP, | |
2863 | wxEVT_MIDDLE_DOWN, | |
2864 | wxEVT_MIDDLE_UP, | |
2865 | wxEVT_RIGHT_DOWN, | |
2866 | wxEVT_RIGHT_UP, | |
2867 | wxEVT_MOTION, | |
2868 | wxEVT_LEFT_DCLICK, | |
2869 | wxEVT_MIDDLE_DCLICK, | |
2870 | wxEVT_RIGHT_DCLICK, | |
2871 | wxEVT_ENTER_WINDOW, | |
2872 | wxEVT_LEAVE_WINDOW, | |
2873 | wxEVT_MOUSEWHEEL | |
2874 | ]) | |
2875 | ||
2876 | ||
2877 | # Scrolling from wxWindow (sent to wxScrolledWindow) | |
2878 | EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, | |
2879 | wxEVT_SCROLLWIN_BOTTOM, | |
2880 | wxEVT_SCROLLWIN_LINEUP, | |
2881 | wxEVT_SCROLLWIN_LINEDOWN, | |
2882 | wxEVT_SCROLLWIN_PAGEUP, | |
2883 | wxEVT_SCROLLWIN_PAGEDOWN, | |
2884 | wxEVT_SCROLLWIN_THUMBTRACK, | |
2885 | wxEVT_SCROLLWIN_THUMBRELEASE, | |
2886 | ]) | |
2887 | ||
2888 | EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP ) | |
2889 | EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM ) | |
2890 | EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP ) | |
2891 | EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN ) | |
2892 | EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP ) | |
2893 | EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN ) | |
2894 | EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK ) | |
2895 | EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE ) | |
2896 | ||
2897 | # Scrolling from wxSlider and wxScrollBar | |
2898 | EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
2899 | wxEVT_SCROLL_BOTTOM, | |
2900 | wxEVT_SCROLL_LINEUP, | |
2901 | wxEVT_SCROLL_LINEDOWN, | |
2902 | wxEVT_SCROLL_PAGEUP, | |
2903 | wxEVT_SCROLL_PAGEDOWN, | |
2904 | wxEVT_SCROLL_THUMBTRACK, | |
2905 | wxEVT_SCROLL_THUMBRELEASE, | |
2906 | wxEVT_SCROLL_ENDSCROLL, | |
2907 | ]) | |
2908 | ||
2909 | EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP ) | |
2910 | EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM ) | |
2911 | EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP ) | |
2912 | EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN ) | |
2913 | EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP ) | |
2914 | EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN ) | |
2915 | EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK ) | |
2916 | EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE ) | |
2917 | EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL ) | |
2918 | ||
2919 | # Scrolling from wxSlider and wxScrollBar, with an id | |
2920 | EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
2921 | wxEVT_SCROLL_BOTTOM, | |
2922 | wxEVT_SCROLL_LINEUP, | |
2923 | wxEVT_SCROLL_LINEDOWN, | |
2924 | wxEVT_SCROLL_PAGEUP, | |
2925 | wxEVT_SCROLL_PAGEDOWN, | |
2926 | wxEVT_SCROLL_THUMBTRACK, | |
2927 | wxEVT_SCROLL_THUMBRELEASE, | |
2928 | wxEVT_SCROLL_ENDSCROLL, | |
2929 | ], 1) | |
2930 | ||
2931 | EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1) | |
2932 | EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1) | |
2933 | EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1) | |
2934 | EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1) | |
2935 | EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1) | |
2936 | EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1) | |
2937 | EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) | |
2938 | EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1) | |
2939 | EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1) | |
2940 | ||
2941 | EVT_SPIN_UP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1) | |
2942 | EVT_SPIN_DOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1) | |
2943 | EVT_SPIN = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) | |
2944 | ||
2945 | EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1) | |
2946 | EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1) | |
2947 | EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1) | |
2948 | EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1) | |
2949 | EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1) | |
2950 | EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1) | |
2951 | EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2) | |
2952 | EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1) | |
2953 | EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1) | |
2954 | EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1) | |
2955 | ||
2956 | EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1) | |
2957 | EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1) | |
2958 | EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1) | |
2959 | EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1) | |
2960 | EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2) | |
2961 | EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1) | |
2962 | EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2) | |
2963 | EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1) | |
2964 | EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1) | |
2965 | ||
2966 | ||
2967 | EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1) | |
2968 | EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1) | |
2969 | EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1) | |
2970 | EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1) | |
2971 | EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1) | |
2972 | EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1) | |
2973 | EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1) | |
2974 | ||
2975 | EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE ) | |
2976 | ||
2977 | EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1) | |
2978 | EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2) | |
2979 | ||
2980 | EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) | |
2981 | ||
2982 | ||
2983 | ||
2984 | #--------------------------------------------------------------------------- | |
2985 | ||
2986 | class Event(Object): | |
e811c8ce RD |
2987 | def __init__(self): raise RuntimeError, "No constructor defined" |
2988 | def __repr__(self): | |
2989 | return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2990 | def __del__(self, destroy=_core.delete_Event): |
e811c8ce | 2991 | """__del__()""" |
d14a1e28 RD |
2992 | try: |
2993 | if self.thisown: destroy(self) | |
2994 | except: pass | |
e811c8ce RD |
2995 | |
2996 | def SetEventType(*args, **kwargs): | |
2997 | """SetEventType(wxEventType typ)""" | |
2998 | return _core.Event_SetEventType(*args, **kwargs) | |
2999 | ||
3000 | def GetEventType(*args, **kwargs): | |
3001 | """GetEventType() -> wxEventType""" | |
3002 | return _core.Event_GetEventType(*args, **kwargs) | |
3003 | ||
3004 | def GetEventObject(*args, **kwargs): | |
3005 | """GetEventObject() -> Object""" | |
3006 | return _core.Event_GetEventObject(*args, **kwargs) | |
3007 | ||
3008 | def SetEventObject(*args, **kwargs): | |
3009 | """SetEventObject(Object obj)""" | |
3010 | return _core.Event_SetEventObject(*args, **kwargs) | |
3011 | ||
3012 | def GetTimestamp(*args, **kwargs): | |
3013 | """GetTimestamp() -> long""" | |
3014 | return _core.Event_GetTimestamp(*args, **kwargs) | |
3015 | ||
3016 | def SetTimestamp(*args, **kwargs): | |
3017 | """SetTimestamp(long ts=0)""" | |
3018 | return _core.Event_SetTimestamp(*args, **kwargs) | |
3019 | ||
3020 | def GetId(*args, **kwargs): | |
3021 | """GetId() -> int""" | |
3022 | return _core.Event_GetId(*args, **kwargs) | |
3023 | ||
3024 | def SetId(*args, **kwargs): | |
3025 | """SetId(int Id)""" | |
3026 | return _core.Event_SetId(*args, **kwargs) | |
3027 | ||
3028 | def IsCommandEvent(*args, **kwargs): | |
3029 | """IsCommandEvent() -> bool""" | |
3030 | return _core.Event_IsCommandEvent(*args, **kwargs) | |
3031 | ||
3032 | def Skip(*args, **kwargs): | |
3033 | """Skip(bool skip=True)""" | |
3034 | return _core.Event_Skip(*args, **kwargs) | |
3035 | ||
3036 | def GetSkipped(*args, **kwargs): | |
3037 | """GetSkipped() -> bool""" | |
3038 | return _core.Event_GetSkipped(*args, **kwargs) | |
3039 | ||
3040 | def ShouldPropagate(*args, **kwargs): | |
3041 | """ShouldPropagate() -> bool""" | |
3042 | return _core.Event_ShouldPropagate(*args, **kwargs) | |
3043 | ||
3044 | def StopPropagation(*args, **kwargs): | |
3045 | """StopPropagation() -> int""" | |
3046 | return _core.Event_StopPropagation(*args, **kwargs) | |
3047 | ||
3048 | def ResumePropagation(*args, **kwargs): | |
3049 | """ResumePropagation(int propagationLevel)""" | |
3050 | return _core.Event_ResumePropagation(*args, **kwargs) | |
3051 | ||
3052 | def Clone(*args, **kwargs): | |
3053 | """Clone() -> Event""" | |
3054 | return _core.Event_Clone(*args, **kwargs) | |
3055 | ||
d14a1e28 RD |
3056 | |
3057 | class EventPtr(Event): | |
3058 | def __init__(self, this): | |
3059 | self.this = this | |
3060 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3061 | self.__class__ = Event | |
3062 | _core.Event_swigregister(EventPtr) | |
3063 | ||
3064 | #--------------------------------------------------------------------------- | |
3065 | ||
3066 | class PropagationDisabler(object): | |
e811c8ce RD |
3067 | def __repr__(self): |
3068 | return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3069 | def __init__(self, *args, **kwargs): |
e811c8ce | 3070 | """__init__(Event event) -> PropagationDisabler""" |
d14a1e28 RD |
3071 | newobj = _core.new_PropagationDisabler(*args, **kwargs) |
3072 | self.this = newobj.this | |
3073 | self.thisown = 1 | |
3074 | del newobj.thisown | |
3075 | def __del__(self, destroy=_core.delete_PropagationDisabler): | |
e811c8ce | 3076 | """__del__()""" |
d14a1e28 RD |
3077 | try: |
3078 | if self.thisown: destroy(self) | |
3079 | except: pass | |
e811c8ce | 3080 | |
d14a1e28 RD |
3081 | |
3082 | class PropagationDisablerPtr(PropagationDisabler): | |
3083 | def __init__(self, this): | |
3084 | self.this = this | |
3085 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3086 | self.__class__ = PropagationDisabler | |
3087 | _core.PropagationDisabler_swigregister(PropagationDisablerPtr) | |
3088 | ||
3089 | class PropagateOnce(object): | |
e811c8ce RD |
3090 | def __repr__(self): |
3091 | return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3092 | def __init__(self, *args, **kwargs): |
e811c8ce | 3093 | """__init__(Event event) -> PropagateOnce""" |
d14a1e28 RD |
3094 | newobj = _core.new_PropagateOnce(*args, **kwargs) |
3095 | self.this = newobj.this | |
3096 | self.thisown = 1 | |
3097 | del newobj.thisown | |
3098 | def __del__(self, destroy=_core.delete_PropagateOnce): | |
e811c8ce | 3099 | """__del__()""" |
d14a1e28 RD |
3100 | try: |
3101 | if self.thisown: destroy(self) | |
3102 | except: pass | |
e811c8ce | 3103 | |
d14a1e28 RD |
3104 | |
3105 | class PropagateOncePtr(PropagateOnce): | |
3106 | def __init__(self, this): | |
3107 | self.this = this | |
3108 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3109 | self.__class__ = PropagateOnce | |
3110 | _core.PropagateOnce_swigregister(PropagateOncePtr) | |
3111 | ||
3112 | #--------------------------------------------------------------------------- | |
3113 | ||
3114 | class CommandEvent(Event): | |
e811c8ce RD |
3115 | def __repr__(self): |
3116 | return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3117 | def __init__(self, *args, **kwargs): |
e811c8ce | 3118 | """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent""" |
d14a1e28 RD |
3119 | newobj = _core.new_CommandEvent(*args, **kwargs) |
3120 | self.this = newobj.this | |
3121 | self.thisown = 1 | |
3122 | del newobj.thisown | |
e811c8ce RD |
3123 | def GetSelection(*args, **kwargs): |
3124 | """GetSelection() -> int""" | |
3125 | return _core.CommandEvent_GetSelection(*args, **kwargs) | |
3126 | ||
3127 | def SetString(*args, **kwargs): | |
3128 | """SetString(wxString s)""" | |
3129 | return _core.CommandEvent_SetString(*args, **kwargs) | |
3130 | ||
3131 | def GetString(*args, **kwargs): | |
3132 | """GetString() -> wxString""" | |
3133 | return _core.CommandEvent_GetString(*args, **kwargs) | |
3134 | ||
3135 | def IsChecked(*args, **kwargs): | |
3136 | """IsChecked() -> bool""" | |
3137 | return _core.CommandEvent_IsChecked(*args, **kwargs) | |
3138 | ||
242b7b46 | 3139 | Checked = IsChecked |
e811c8ce RD |
3140 | def IsSelection(*args, **kwargs): |
3141 | """IsSelection() -> bool""" | |
3142 | return _core.CommandEvent_IsSelection(*args, **kwargs) | |
3143 | ||
3144 | def SetExtraLong(*args, **kwargs): | |
3145 | """SetExtraLong(long extraLong)""" | |
3146 | return _core.CommandEvent_SetExtraLong(*args, **kwargs) | |
3147 | ||
3148 | def GetExtraLong(*args, **kwargs): | |
3149 | """GetExtraLong() -> long""" | |
3150 | return _core.CommandEvent_GetExtraLong(*args, **kwargs) | |
3151 | ||
3152 | def SetInt(*args, **kwargs): | |
3153 | """SetInt(int i)""" | |
3154 | return _core.CommandEvent_SetInt(*args, **kwargs) | |
3155 | ||
3156 | def GetInt(*args, **kwargs): | |
3157 | """GetInt() -> long""" | |
3158 | return _core.CommandEvent_GetInt(*args, **kwargs) | |
3159 | ||
3160 | def Clone(*args, **kwargs): | |
3161 | """Clone() -> Event""" | |
3162 | return _core.CommandEvent_Clone(*args, **kwargs) | |
3163 | ||
d14a1e28 RD |
3164 | |
3165 | class CommandEventPtr(CommandEvent): | |
3166 | def __init__(self, this): | |
3167 | self.this = this | |
3168 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3169 | self.__class__ = CommandEvent | |
3170 | _core.CommandEvent_swigregister(CommandEventPtr) | |
3171 | ||
3172 | #--------------------------------------------------------------------------- | |
3173 | ||
3174 | class NotifyEvent(CommandEvent): | |
e811c8ce RD |
3175 | def __repr__(self): |
3176 | return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3177 | def __init__(self, *args, **kwargs): |
e811c8ce | 3178 | """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent""" |
d14a1e28 RD |
3179 | newobj = _core.new_NotifyEvent(*args, **kwargs) |
3180 | self.this = newobj.this | |
3181 | self.thisown = 1 | |
3182 | del newobj.thisown | |
e811c8ce RD |
3183 | def Veto(*args, **kwargs): |
3184 | """Veto()""" | |
3185 | return _core.NotifyEvent_Veto(*args, **kwargs) | |
3186 | ||
3187 | def Allow(*args, **kwargs): | |
3188 | """Allow()""" | |
3189 | return _core.NotifyEvent_Allow(*args, **kwargs) | |
3190 | ||
3191 | def IsAllowed(*args, **kwargs): | |
3192 | """IsAllowed() -> bool""" | |
3193 | return _core.NotifyEvent_IsAllowed(*args, **kwargs) | |
3194 | ||
d14a1e28 RD |
3195 | |
3196 | class NotifyEventPtr(NotifyEvent): | |
3197 | def __init__(self, this): | |
3198 | self.this = this | |
3199 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3200 | self.__class__ = NotifyEvent | |
3201 | _core.NotifyEvent_swigregister(NotifyEventPtr) | |
3202 | ||
3203 | #--------------------------------------------------------------------------- | |
3204 | ||
3205 | class ScrollEvent(CommandEvent): | |
e811c8ce RD |
3206 | def __repr__(self): |
3207 | return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3208 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
3209 | """ |
3210 | __init__(wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0, | |
3211 | int orient=0) -> ScrollEvent | |
3212 | """ | |
d14a1e28 RD |
3213 | newobj = _core.new_ScrollEvent(*args, **kwargs) |
3214 | self.this = newobj.this | |
3215 | self.thisown = 1 | |
3216 | del newobj.thisown | |
e811c8ce RD |
3217 | def GetOrientation(*args, **kwargs): |
3218 | """GetOrientation() -> int""" | |
3219 | return _core.ScrollEvent_GetOrientation(*args, **kwargs) | |
3220 | ||
3221 | def GetPosition(*args, **kwargs): | |
3222 | """GetPosition() -> int""" | |
3223 | return _core.ScrollEvent_GetPosition(*args, **kwargs) | |
3224 | ||
3225 | def SetOrientation(*args, **kwargs): | |
3226 | """SetOrientation(int orient)""" | |
3227 | return _core.ScrollEvent_SetOrientation(*args, **kwargs) | |
3228 | ||
3229 | def SetPosition(*args, **kwargs): | |
3230 | """SetPosition(int pos)""" | |
3231 | return _core.ScrollEvent_SetPosition(*args, **kwargs) | |
3232 | ||
d14a1e28 RD |
3233 | |
3234 | class ScrollEventPtr(ScrollEvent): | |
3235 | def __init__(self, this): | |
3236 | self.this = this | |
3237 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3238 | self.__class__ = ScrollEvent | |
3239 | _core.ScrollEvent_swigregister(ScrollEventPtr) | |
3240 | ||
3241 | #--------------------------------------------------------------------------- | |
3242 | ||
3243 | class ScrollWinEvent(Event): | |
e811c8ce RD |
3244 | def __repr__(self): |
3245 | return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3246 | def __init__(self, *args, **kwargs): |
e811c8ce | 3247 | """__init__(wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent""" |
d14a1e28 RD |
3248 | newobj = _core.new_ScrollWinEvent(*args, **kwargs) |
3249 | self.this = newobj.this | |
3250 | self.thisown = 1 | |
3251 | del newobj.thisown | |
e811c8ce RD |
3252 | def GetOrientation(*args, **kwargs): |
3253 | """GetOrientation() -> int""" | |
3254 | return _core.ScrollWinEvent_GetOrientation(*args, **kwargs) | |
3255 | ||
3256 | def GetPosition(*args, **kwargs): | |
3257 | """GetPosition() -> int""" | |
3258 | return _core.ScrollWinEvent_GetPosition(*args, **kwargs) | |
3259 | ||
3260 | def SetOrientation(*args, **kwargs): | |
3261 | """SetOrientation(int orient)""" | |
3262 | return _core.ScrollWinEvent_SetOrientation(*args, **kwargs) | |
3263 | ||
3264 | def SetPosition(*args, **kwargs): | |
3265 | """SetPosition(int pos)""" | |
3266 | return _core.ScrollWinEvent_SetPosition(*args, **kwargs) | |
3267 | ||
d14a1e28 RD |
3268 | |
3269 | class ScrollWinEventPtr(ScrollWinEvent): | |
3270 | def __init__(self, this): | |
3271 | self.this = this | |
3272 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3273 | self.__class__ = ScrollWinEvent | |
3274 | _core.ScrollWinEvent_swigregister(ScrollWinEventPtr) | |
3275 | ||
3276 | #--------------------------------------------------------------------------- | |
3277 | ||
3278 | MOUSE_BTN_ANY = _core.MOUSE_BTN_ANY | |
3279 | MOUSE_BTN_NONE = _core.MOUSE_BTN_NONE | |
3280 | MOUSE_BTN_LEFT = _core.MOUSE_BTN_LEFT | |
3281 | MOUSE_BTN_MIDDLE = _core.MOUSE_BTN_MIDDLE | |
3282 | MOUSE_BTN_RIGHT = _core.MOUSE_BTN_RIGHT | |
3283 | class MouseEvent(Event): | |
e811c8ce RD |
3284 | def __repr__(self): |
3285 | return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3286 | def __init__(self, *args, **kwargs): |
e811c8ce | 3287 | """__init__(wxEventType mouseType=wxEVT_NULL) -> MouseEvent""" |
d14a1e28 RD |
3288 | newobj = _core.new_MouseEvent(*args, **kwargs) |
3289 | self.this = newobj.this | |
3290 | self.thisown = 1 | |
3291 | del newobj.thisown | |
e811c8ce RD |
3292 | def IsButton(*args, **kwargs): |
3293 | """IsButton() -> bool""" | |
3294 | return _core.MouseEvent_IsButton(*args, **kwargs) | |
3295 | ||
3296 | def ButtonDown(*args, **kwargs): | |
3297 | """ButtonDown(int but=MOUSE_BTN_ANY) -> bool""" | |
3298 | return _core.MouseEvent_ButtonDown(*args, **kwargs) | |
3299 | ||
3300 | def ButtonDClick(*args, **kwargs): | |
3301 | """ButtonDClick(int but=MOUSE_BTN_ANY) -> bool""" | |
3302 | return _core.MouseEvent_ButtonDClick(*args, **kwargs) | |
3303 | ||
3304 | def ButtonUp(*args, **kwargs): | |
3305 | """ButtonUp(int but=MOUSE_BTN_ANY) -> bool""" | |
3306 | return _core.MouseEvent_ButtonUp(*args, **kwargs) | |
3307 | ||
3308 | def Button(*args, **kwargs): | |
3309 | """Button(int but) -> bool""" | |
3310 | return _core.MouseEvent_Button(*args, **kwargs) | |
3311 | ||
3312 | def ButtonIsDown(*args, **kwargs): | |
3313 | """ButtonIsDown(int but) -> bool""" | |
3314 | return _core.MouseEvent_ButtonIsDown(*args, **kwargs) | |
3315 | ||
3316 | def GetButton(*args, **kwargs): | |
3317 | """GetButton() -> int""" | |
3318 | return _core.MouseEvent_GetButton(*args, **kwargs) | |
3319 | ||
3320 | def ControlDown(*args, **kwargs): | |
3321 | """ControlDown() -> bool""" | |
3322 | return _core.MouseEvent_ControlDown(*args, **kwargs) | |
3323 | ||
3324 | def MetaDown(*args, **kwargs): | |
3325 | """MetaDown() -> bool""" | |
3326 | return _core.MouseEvent_MetaDown(*args, **kwargs) | |
3327 | ||
3328 | def AltDown(*args, **kwargs): | |
3329 | """AltDown() -> bool""" | |
3330 | return _core.MouseEvent_AltDown(*args, **kwargs) | |
3331 | ||
3332 | def ShiftDown(*args, **kwargs): | |
3333 | """ShiftDown() -> bool""" | |
3334 | return _core.MouseEvent_ShiftDown(*args, **kwargs) | |
3335 | ||
3336 | def LeftDown(*args, **kwargs): | |
3337 | """LeftDown() -> bool""" | |
3338 | return _core.MouseEvent_LeftDown(*args, **kwargs) | |
3339 | ||
3340 | def MiddleDown(*args, **kwargs): | |
3341 | """MiddleDown() -> bool""" | |
3342 | return _core.MouseEvent_MiddleDown(*args, **kwargs) | |
3343 | ||
3344 | def RightDown(*args, **kwargs): | |
3345 | """RightDown() -> bool""" | |
3346 | return _core.MouseEvent_RightDown(*args, **kwargs) | |
3347 | ||
3348 | def LeftUp(*args, **kwargs): | |
3349 | """LeftUp() -> bool""" | |
3350 | return _core.MouseEvent_LeftUp(*args, **kwargs) | |
3351 | ||
3352 | def MiddleUp(*args, **kwargs): | |
3353 | """MiddleUp() -> bool""" | |
3354 | return _core.MouseEvent_MiddleUp(*args, **kwargs) | |
3355 | ||
3356 | def RightUp(*args, **kwargs): | |
3357 | """RightUp() -> bool""" | |
3358 | return _core.MouseEvent_RightUp(*args, **kwargs) | |
3359 | ||
3360 | def LeftDClick(*args, **kwargs): | |
3361 | """LeftDClick() -> bool""" | |
3362 | return _core.MouseEvent_LeftDClick(*args, **kwargs) | |
3363 | ||
3364 | def MiddleDClick(*args, **kwargs): | |
3365 | """MiddleDClick() -> bool""" | |
3366 | return _core.MouseEvent_MiddleDClick(*args, **kwargs) | |
3367 | ||
3368 | def RightDClick(*args, **kwargs): | |
3369 | """RightDClick() -> bool""" | |
3370 | return _core.MouseEvent_RightDClick(*args, **kwargs) | |
3371 | ||
3372 | def LeftIsDown(*args, **kwargs): | |
3373 | """LeftIsDown() -> bool""" | |
3374 | return _core.MouseEvent_LeftIsDown(*args, **kwargs) | |
3375 | ||
3376 | def MiddleIsDown(*args, **kwargs): | |
3377 | """MiddleIsDown() -> bool""" | |
3378 | return _core.MouseEvent_MiddleIsDown(*args, **kwargs) | |
3379 | ||
3380 | def RightIsDown(*args, **kwargs): | |
3381 | """RightIsDown() -> bool""" | |
3382 | return _core.MouseEvent_RightIsDown(*args, **kwargs) | |
3383 | ||
3384 | def Dragging(*args, **kwargs): | |
3385 | """Dragging() -> bool""" | |
3386 | return _core.MouseEvent_Dragging(*args, **kwargs) | |
3387 | ||
3388 | def Moving(*args, **kwargs): | |
3389 | """Moving() -> bool""" | |
3390 | return _core.MouseEvent_Moving(*args, **kwargs) | |
3391 | ||
3392 | def Entering(*args, **kwargs): | |
3393 | """Entering() -> bool""" | |
3394 | return _core.MouseEvent_Entering(*args, **kwargs) | |
3395 | ||
3396 | def Leaving(*args, **kwargs): | |
3397 | """Leaving() -> bool""" | |
3398 | return _core.MouseEvent_Leaving(*args, **kwargs) | |
3399 | ||
3400 | def GetPosition(*args, **kwargs): | |
0df68c9f RD |
3401 | """ |
3402 | GetPosition() -> Point | |
e811c8ce | 3403 | |
0df68c9f RD |
3404 | Returns the position of the mouse in window coordinates when the event happened. |
3405 | """ | |
e811c8ce RD |
3406 | return _core.MouseEvent_GetPosition(*args, **kwargs) |
3407 | ||
3408 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3409 | """ |
3410 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3411 | |
0df68c9f RD |
3412 | Returns the position of the mouse in window coordinates when the event happened. |
3413 | """ | |
e811c8ce RD |
3414 | return _core.MouseEvent_GetPositionTuple(*args, **kwargs) |
3415 | ||
3416 | def GetLogicalPosition(*args, **kwargs): | |
3417 | """GetLogicalPosition(wxDC dc) -> Point""" | |
3418 | return _core.MouseEvent_GetLogicalPosition(*args, **kwargs) | |
3419 | ||
3420 | def GetX(*args, **kwargs): | |
3421 | """GetX() -> int""" | |
3422 | return _core.MouseEvent_GetX(*args, **kwargs) | |
3423 | ||
3424 | def GetY(*args, **kwargs): | |
3425 | """GetY() -> int""" | |
3426 | return _core.MouseEvent_GetY(*args, **kwargs) | |
3427 | ||
3428 | def GetWheelRotation(*args, **kwargs): | |
3429 | """GetWheelRotation() -> int""" | |
3430 | return _core.MouseEvent_GetWheelRotation(*args, **kwargs) | |
3431 | ||
3432 | def GetWheelDelta(*args, **kwargs): | |
3433 | """GetWheelDelta() -> int""" | |
3434 | return _core.MouseEvent_GetWheelDelta(*args, **kwargs) | |
3435 | ||
3436 | def GetLinesPerAction(*args, **kwargs): | |
3437 | """GetLinesPerAction() -> int""" | |
3438 | return _core.MouseEvent_GetLinesPerAction(*args, **kwargs) | |
3439 | ||
3440 | def IsPageScroll(*args, **kwargs): | |
3441 | """IsPageScroll() -> bool""" | |
3442 | return _core.MouseEvent_IsPageScroll(*args, **kwargs) | |
3443 | ||
d14a1e28 RD |
3444 | m_x = property(_core.MouseEvent_m_x_get, _core.MouseEvent_m_x_set) |
3445 | m_y = property(_core.MouseEvent_m_y_get, _core.MouseEvent_m_y_set) | |
3446 | m_leftDown = property(_core.MouseEvent_m_leftDown_get, _core.MouseEvent_m_leftDown_set) | |
3447 | m_middleDown = property(_core.MouseEvent_m_middleDown_get, _core.MouseEvent_m_middleDown_set) | |
3448 | m_rightDown = property(_core.MouseEvent_m_rightDown_get, _core.MouseEvent_m_rightDown_set) | |
3449 | m_controlDown = property(_core.MouseEvent_m_controlDown_get, _core.MouseEvent_m_controlDown_set) | |
3450 | m_shiftDown = property(_core.MouseEvent_m_shiftDown_get, _core.MouseEvent_m_shiftDown_set) | |
3451 | m_altDown = property(_core.MouseEvent_m_altDown_get, _core.MouseEvent_m_altDown_set) | |
3452 | m_metaDown = property(_core.MouseEvent_m_metaDown_get, _core.MouseEvent_m_metaDown_set) | |
3453 | m_wheelRotation = property(_core.MouseEvent_m_wheelRotation_get, _core.MouseEvent_m_wheelRotation_set) | |
3454 | m_wheelDelta = property(_core.MouseEvent_m_wheelDelta_get, _core.MouseEvent_m_wheelDelta_set) | |
3455 | m_linesPerAction = property(_core.MouseEvent_m_linesPerAction_get, _core.MouseEvent_m_linesPerAction_set) | |
d14a1e28 RD |
3456 | |
3457 | class MouseEventPtr(MouseEvent): | |
3458 | def __init__(self, this): | |
3459 | self.this = this | |
3460 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3461 | self.__class__ = MouseEvent | |
3462 | _core.MouseEvent_swigregister(MouseEventPtr) | |
3463 | ||
3464 | #--------------------------------------------------------------------------- | |
3465 | ||
3466 | class SetCursorEvent(Event): | |
e811c8ce RD |
3467 | def __repr__(self): |
3468 | return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3469 | def __init__(self, *args, **kwargs): |
e811c8ce | 3470 | """__init__(int x=0, int y=0) -> SetCursorEvent""" |
d14a1e28 RD |
3471 | newobj = _core.new_SetCursorEvent(*args, **kwargs) |
3472 | self.this = newobj.this | |
3473 | self.thisown = 1 | |
3474 | del newobj.thisown | |
e811c8ce RD |
3475 | def GetX(*args, **kwargs): |
3476 | """GetX() -> int""" | |
3477 | return _core.SetCursorEvent_GetX(*args, **kwargs) | |
3478 | ||
3479 | def GetY(*args, **kwargs): | |
3480 | """GetY() -> int""" | |
3481 | return _core.SetCursorEvent_GetY(*args, **kwargs) | |
3482 | ||
3483 | def SetCursor(*args, **kwargs): | |
3484 | """SetCursor(wxCursor cursor)""" | |
3485 | return _core.SetCursorEvent_SetCursor(*args, **kwargs) | |
3486 | ||
3487 | def GetCursor(*args, **kwargs): | |
3488 | """GetCursor() -> wxCursor""" | |
3489 | return _core.SetCursorEvent_GetCursor(*args, **kwargs) | |
3490 | ||
3491 | def HasCursor(*args, **kwargs): | |
3492 | """HasCursor() -> bool""" | |
3493 | return _core.SetCursorEvent_HasCursor(*args, **kwargs) | |
3494 | ||
d14a1e28 RD |
3495 | |
3496 | class SetCursorEventPtr(SetCursorEvent): | |
3497 | def __init__(self, this): | |
3498 | self.this = this | |
3499 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3500 | self.__class__ = SetCursorEvent | |
3501 | _core.SetCursorEvent_swigregister(SetCursorEventPtr) | |
3502 | ||
3503 | #--------------------------------------------------------------------------- | |
3504 | ||
3505 | class KeyEvent(Event): | |
e811c8ce RD |
3506 | def __repr__(self): |
3507 | return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3508 | def __init__(self, *args, **kwargs): |
e811c8ce | 3509 | """__init__(wxEventType keyType=wxEVT_NULL) -> KeyEvent""" |
d14a1e28 RD |
3510 | newobj = _core.new_KeyEvent(*args, **kwargs) |
3511 | self.this = newobj.this | |
3512 | self.thisown = 1 | |
3513 | del newobj.thisown | |
e811c8ce RD |
3514 | def ControlDown(*args, **kwargs): |
3515 | """ControlDown() -> bool""" | |
3516 | return _core.KeyEvent_ControlDown(*args, **kwargs) | |
3517 | ||
3518 | def MetaDown(*args, **kwargs): | |
3519 | """MetaDown() -> bool""" | |
3520 | return _core.KeyEvent_MetaDown(*args, **kwargs) | |
3521 | ||
3522 | def AltDown(*args, **kwargs): | |
3523 | """AltDown() -> bool""" | |
3524 | return _core.KeyEvent_AltDown(*args, **kwargs) | |
3525 | ||
3526 | def ShiftDown(*args, **kwargs): | |
3527 | """ShiftDown() -> bool""" | |
3528 | return _core.KeyEvent_ShiftDown(*args, **kwargs) | |
3529 | ||
3530 | def HasModifiers(*args, **kwargs): | |
3531 | """HasModifiers() -> bool""" | |
3532 | return _core.KeyEvent_HasModifiers(*args, **kwargs) | |
3533 | ||
3534 | def GetKeyCode(*args, **kwargs): | |
3535 | """GetKeyCode() -> int""" | |
3536 | return _core.KeyEvent_GetKeyCode(*args, **kwargs) | |
3537 | ||
d14a1e28 | 3538 | KeyCode = GetKeyCode |
e811c8ce RD |
3539 | def GetUniChar(*args, **kwargs): |
3540 | """GetUniChar() -> int""" | |
3541 | return _core.KeyEvent_GetUniChar(*args, **kwargs) | |
3542 | ||
3543 | def GetRawKeyCode(*args, **kwargs): | |
3544 | """GetRawKeyCode() -> unsigned int""" | |
3545 | return _core.KeyEvent_GetRawKeyCode(*args, **kwargs) | |
3546 | ||
3547 | def GetRawKeyFlags(*args, **kwargs): | |
3548 | """GetRawKeyFlags() -> unsigned int""" | |
3549 | return _core.KeyEvent_GetRawKeyFlags(*args, **kwargs) | |
3550 | ||
3551 | def GetPosition(*args, **kwargs): | |
0df68c9f RD |
3552 | """ |
3553 | GetPosition() -> Point | |
e811c8ce | 3554 | |
0df68c9f RD |
3555 | Find the position of the event. |
3556 | """ | |
e811c8ce RD |
3557 | return _core.KeyEvent_GetPosition(*args, **kwargs) |
3558 | ||
3559 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3560 | """ |
3561 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3562 | |
0df68c9f RD |
3563 | Find the position of the event. |
3564 | """ | |
e811c8ce RD |
3565 | return _core.KeyEvent_GetPositionTuple(*args, **kwargs) |
3566 | ||
3567 | def GetX(*args, **kwargs): | |
3568 | """GetX() -> int""" | |
3569 | return _core.KeyEvent_GetX(*args, **kwargs) | |
3570 | ||
3571 | def GetY(*args, **kwargs): | |
3572 | """GetY() -> int""" | |
3573 | return _core.KeyEvent_GetY(*args, **kwargs) | |
3574 | ||
d14a1e28 RD |
3575 | m_x = property(_core.KeyEvent_m_x_get, _core.KeyEvent_m_x_set) |
3576 | m_y = property(_core.KeyEvent_m_y_get, _core.KeyEvent_m_y_set) | |
3577 | m_keyCode = property(_core.KeyEvent_m_keyCode_get, _core.KeyEvent_m_keyCode_set) | |
3578 | m_controlDown = property(_core.KeyEvent_m_controlDown_get, _core.KeyEvent_m_controlDown_set) | |
3579 | m_shiftDown = property(_core.KeyEvent_m_shiftDown_get, _core.KeyEvent_m_shiftDown_set) | |
3580 | m_altDown = property(_core.KeyEvent_m_altDown_get, _core.KeyEvent_m_altDown_set) | |
3581 | m_metaDown = property(_core.KeyEvent_m_metaDown_get, _core.KeyEvent_m_metaDown_set) | |
3582 | m_scanCode = property(_core.KeyEvent_m_scanCode_get, _core.KeyEvent_m_scanCode_set) | |
3583 | m_rawCode = property(_core.KeyEvent_m_rawCode_get, _core.KeyEvent_m_rawCode_set) | |
3584 | m_rawFlags = property(_core.KeyEvent_m_rawFlags_get, _core.KeyEvent_m_rawFlags_set) | |
d14a1e28 RD |
3585 | |
3586 | class KeyEventPtr(KeyEvent): | |
3587 | def __init__(self, this): | |
3588 | self.this = this | |
3589 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3590 | self.__class__ = KeyEvent | |
3591 | _core.KeyEvent_swigregister(KeyEventPtr) | |
3592 | ||
3593 | #--------------------------------------------------------------------------- | |
3594 | ||
3595 | class SizeEvent(Event): | |
e811c8ce RD |
3596 | def __repr__(self): |
3597 | return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3598 | def __init__(self, *args, **kwargs): |
e811c8ce | 3599 | """__init__(Size sz=DefaultSize, int winid=0) -> SizeEvent""" |
d14a1e28 RD |
3600 | newobj = _core.new_SizeEvent(*args, **kwargs) |
3601 | self.this = newobj.this | |
3602 | self.thisown = 1 | |
3603 | del newobj.thisown | |
e811c8ce RD |
3604 | def GetSize(*args, **kwargs): |
3605 | """GetSize() -> Size""" | |
3606 | return _core.SizeEvent_GetSize(*args, **kwargs) | |
3607 | ||
3608 | def GetRect(*args, **kwargs): | |
3609 | """GetRect() -> Rect""" | |
3610 | return _core.SizeEvent_GetRect(*args, **kwargs) | |
3611 | ||
3612 | def SetRect(*args, **kwargs): | |
3613 | """SetRect(Rect rect)""" | |
3614 | return _core.SizeEvent_SetRect(*args, **kwargs) | |
3615 | ||
3616 | def SetSize(*args, **kwargs): | |
3617 | """SetSize(Size size)""" | |
3618 | return _core.SizeEvent_SetSize(*args, **kwargs) | |
3619 | ||
d14a1e28 RD |
3620 | m_size = property(_core.SizeEvent_m_size_get, _core.SizeEvent_m_size_set) |
3621 | m_rect = property(_core.SizeEvent_m_rect_get, _core.SizeEvent_m_rect_set) | |
d14a1e28 RD |
3622 | |
3623 | class SizeEventPtr(SizeEvent): | |
3624 | def __init__(self, this): | |
3625 | self.this = this | |
3626 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3627 | self.__class__ = SizeEvent | |
3628 | _core.SizeEvent_swigregister(SizeEventPtr) | |
3629 | ||
3630 | #--------------------------------------------------------------------------- | |
3631 | ||
3632 | class MoveEvent(Event): | |
e811c8ce RD |
3633 | def __repr__(self): |
3634 | return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3635 | def __init__(self, *args, **kwargs): |
e811c8ce | 3636 | """__init__(Point pos=DefaultPosition, int winid=0) -> MoveEvent""" |
d14a1e28 RD |
3637 | newobj = _core.new_MoveEvent(*args, **kwargs) |
3638 | self.this = newobj.this | |
3639 | self.thisown = 1 | |
3640 | del newobj.thisown | |
e811c8ce RD |
3641 | def GetPosition(*args, **kwargs): |
3642 | """GetPosition() -> Point""" | |
3643 | return _core.MoveEvent_GetPosition(*args, **kwargs) | |
3644 | ||
3645 | def GetRect(*args, **kwargs): | |
3646 | """GetRect() -> Rect""" | |
3647 | return _core.MoveEvent_GetRect(*args, **kwargs) | |
3648 | ||
3649 | def SetRect(*args, **kwargs): | |
3650 | """SetRect(Rect rect)""" | |
3651 | return _core.MoveEvent_SetRect(*args, **kwargs) | |
3652 | ||
3653 | def SetPosition(*args, **kwargs): | |
3654 | """SetPosition(Point pos)""" | |
3655 | return _core.MoveEvent_SetPosition(*args, **kwargs) | |
3656 | ||
d14a1e28 RD |
3657 | m_pos = property(_core.MoveEvent_m_pos_get, _core.MoveEvent_m_pos_set) |
3658 | m_rect = property(_core.MoveEvent_m_rect_get, _core.MoveEvent_m_rect_set) | |
d14a1e28 RD |
3659 | |
3660 | class MoveEventPtr(MoveEvent): | |
3661 | def __init__(self, this): | |
3662 | self.this = this | |
3663 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3664 | self.__class__ = MoveEvent | |
3665 | _core.MoveEvent_swigregister(MoveEventPtr) | |
3666 | ||
3667 | #--------------------------------------------------------------------------- | |
3668 | ||
3669 | class PaintEvent(Event): | |
e811c8ce RD |
3670 | def __repr__(self): |
3671 | return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3672 | def __init__(self, *args, **kwargs): |
e811c8ce | 3673 | """__init__(int Id=0) -> PaintEvent""" |
d14a1e28 RD |
3674 | newobj = _core.new_PaintEvent(*args, **kwargs) |
3675 | self.this = newobj.this | |
3676 | self.thisown = 1 | |
3677 | del newobj.thisown | |
d14a1e28 RD |
3678 | |
3679 | class PaintEventPtr(PaintEvent): | |
3680 | def __init__(self, this): | |
3681 | self.this = this | |
3682 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3683 | self.__class__ = PaintEvent | |
3684 | _core.PaintEvent_swigregister(PaintEventPtr) | |
3685 | ||
3686 | class NcPaintEvent(Event): | |
e811c8ce RD |
3687 | def __repr__(self): |
3688 | return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3689 | def __init__(self, *args, **kwargs): |
e811c8ce | 3690 | """__init__(int winid=0) -> NcPaintEvent""" |
d14a1e28 RD |
3691 | newobj = _core.new_NcPaintEvent(*args, **kwargs) |
3692 | self.this = newobj.this | |
3693 | self.thisown = 1 | |
3694 | del newobj.thisown | |
d14a1e28 RD |
3695 | |
3696 | class NcPaintEventPtr(NcPaintEvent): | |
3697 | def __init__(self, this): | |
3698 | self.this = this | |
3699 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3700 | self.__class__ = NcPaintEvent | |
3701 | _core.NcPaintEvent_swigregister(NcPaintEventPtr) | |
3702 | ||
3703 | #--------------------------------------------------------------------------- | |
3704 | ||
3705 | class EraseEvent(Event): | |
e811c8ce RD |
3706 | def __repr__(self): |
3707 | return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3708 | def __init__(self, *args, **kwargs): |
e811c8ce | 3709 | """__init__(int Id=0, wxDC dc=(wxDC *) NULL) -> EraseEvent""" |
d14a1e28 RD |
3710 | newobj = _core.new_EraseEvent(*args, **kwargs) |
3711 | self.this = newobj.this | |
3712 | self.thisown = 1 | |
3713 | del newobj.thisown | |
e811c8ce RD |
3714 | def GetDC(*args, **kwargs): |
3715 | """GetDC() -> wxDC""" | |
3716 | return _core.EraseEvent_GetDC(*args, **kwargs) | |
3717 | ||
d14a1e28 RD |
3718 | |
3719 | class EraseEventPtr(EraseEvent): | |
3720 | def __init__(self, this): | |
3721 | self.this = this | |
3722 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3723 | self.__class__ = EraseEvent | |
3724 | _core.EraseEvent_swigregister(EraseEventPtr) | |
3725 | ||
3726 | #--------------------------------------------------------------------------- | |
3727 | ||
3728 | class FocusEvent(Event): | |
e811c8ce RD |
3729 | def __repr__(self): |
3730 | return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3731 | def __init__(self, *args, **kwargs): |
e811c8ce | 3732 | """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent""" |
d14a1e28 RD |
3733 | newobj = _core.new_FocusEvent(*args, **kwargs) |
3734 | self.this = newobj.this | |
3735 | self.thisown = 1 | |
3736 | del newobj.thisown | |
e811c8ce RD |
3737 | def GetWindow(*args, **kwargs): |
3738 | """GetWindow() -> Window""" | |
3739 | return _core.FocusEvent_GetWindow(*args, **kwargs) | |
3740 | ||
3741 | def SetWindow(*args, **kwargs): | |
3742 | """SetWindow(Window win)""" | |
3743 | return _core.FocusEvent_SetWindow(*args, **kwargs) | |
3744 | ||
d14a1e28 RD |
3745 | |
3746 | class FocusEventPtr(FocusEvent): | |
3747 | def __init__(self, this): | |
3748 | self.this = this | |
3749 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3750 | self.__class__ = FocusEvent | |
3751 | _core.FocusEvent_swigregister(FocusEventPtr) | |
3752 | ||
3753 | #--------------------------------------------------------------------------- | |
3754 | ||
3755 | class ChildFocusEvent(CommandEvent): | |
e811c8ce RD |
3756 | def __repr__(self): |
3757 | return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3758 | def __init__(self, *args, **kwargs): |
e811c8ce | 3759 | """__init__(Window win=None) -> ChildFocusEvent""" |
d14a1e28 RD |
3760 | newobj = _core.new_ChildFocusEvent(*args, **kwargs) |
3761 | self.this = newobj.this | |
3762 | self.thisown = 1 | |
3763 | del newobj.thisown | |
e811c8ce RD |
3764 | def GetWindow(*args, **kwargs): |
3765 | """GetWindow() -> Window""" | |
3766 | return _core.ChildFocusEvent_GetWindow(*args, **kwargs) | |
3767 | ||
d14a1e28 RD |
3768 | |
3769 | class ChildFocusEventPtr(ChildFocusEvent): | |
3770 | def __init__(self, this): | |
3771 | self.this = this | |
3772 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3773 | self.__class__ = ChildFocusEvent | |
3774 | _core.ChildFocusEvent_swigregister(ChildFocusEventPtr) | |
3775 | ||
3776 | #--------------------------------------------------------------------------- | |
3777 | ||
3778 | class ActivateEvent(Event): | |
e811c8ce RD |
3779 | def __repr__(self): |
3780 | return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3781 | def __init__(self, *args, **kwargs): |
e811c8ce | 3782 | """__init__(wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent""" |
d14a1e28 RD |
3783 | newobj = _core.new_ActivateEvent(*args, **kwargs) |
3784 | self.this = newobj.this | |
3785 | self.thisown = 1 | |
3786 | del newobj.thisown | |
e811c8ce RD |
3787 | def GetActive(*args, **kwargs): |
3788 | """GetActive() -> bool""" | |
3789 | return _core.ActivateEvent_GetActive(*args, **kwargs) | |
3790 | ||
d14a1e28 RD |
3791 | |
3792 | class ActivateEventPtr(ActivateEvent): | |
3793 | def __init__(self, this): | |
3794 | self.this = this | |
3795 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3796 | self.__class__ = ActivateEvent | |
3797 | _core.ActivateEvent_swigregister(ActivateEventPtr) | |
3798 | ||
3799 | #--------------------------------------------------------------------------- | |
3800 | ||
3801 | class InitDialogEvent(Event): | |
e811c8ce RD |
3802 | def __repr__(self): |
3803 | return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3804 | def __init__(self, *args, **kwargs): |
e811c8ce | 3805 | """__init__(int Id=0) -> InitDialogEvent""" |
d14a1e28 RD |
3806 | newobj = _core.new_InitDialogEvent(*args, **kwargs) |
3807 | self.this = newobj.this | |
3808 | self.thisown = 1 | |
3809 | del newobj.thisown | |
d14a1e28 RD |
3810 | |
3811 | class InitDialogEventPtr(InitDialogEvent): | |
3812 | def __init__(self, this): | |
3813 | self.this = this | |
3814 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3815 | self.__class__ = InitDialogEvent | |
3816 | _core.InitDialogEvent_swigregister(InitDialogEventPtr) | |
3817 | ||
3818 | #--------------------------------------------------------------------------- | |
3819 | ||
3820 | class MenuEvent(Event): | |
e811c8ce RD |
3821 | def __repr__(self): |
3822 | return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3823 | def __init__(self, *args, **kwargs): |
e811c8ce | 3824 | """__init__(wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent""" |
d14a1e28 RD |
3825 | newobj = _core.new_MenuEvent(*args, **kwargs) |
3826 | self.this = newobj.this | |
3827 | self.thisown = 1 | |
3828 | del newobj.thisown | |
e811c8ce RD |
3829 | def GetMenuId(*args, **kwargs): |
3830 | """GetMenuId() -> int""" | |
3831 | return _core.MenuEvent_GetMenuId(*args, **kwargs) | |
3832 | ||
3833 | def IsPopup(*args, **kwargs): | |
3834 | """IsPopup() -> bool""" | |
3835 | return _core.MenuEvent_IsPopup(*args, **kwargs) | |
3836 | ||
3837 | def GetMenu(*args, **kwargs): | |
3838 | """GetMenu() -> Menu""" | |
3839 | return _core.MenuEvent_GetMenu(*args, **kwargs) | |
3840 | ||
d14a1e28 RD |
3841 | |
3842 | class MenuEventPtr(MenuEvent): | |
3843 | def __init__(self, this): | |
3844 | self.this = this | |
3845 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3846 | self.__class__ = MenuEvent | |
3847 | _core.MenuEvent_swigregister(MenuEventPtr) | |
3848 | ||
3849 | #--------------------------------------------------------------------------- | |
3850 | ||
3851 | class CloseEvent(Event): | |
e811c8ce RD |
3852 | def __repr__(self): |
3853 | return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3854 | def __init__(self, *args, **kwargs): |
e811c8ce | 3855 | """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent""" |
d14a1e28 RD |
3856 | newobj = _core.new_CloseEvent(*args, **kwargs) |
3857 | self.this = newobj.this | |
3858 | self.thisown = 1 | |
3859 | del newobj.thisown | |
e811c8ce RD |
3860 | def SetLoggingOff(*args, **kwargs): |
3861 | """SetLoggingOff(bool logOff)""" | |
3862 | return _core.CloseEvent_SetLoggingOff(*args, **kwargs) | |
3863 | ||
3864 | def GetLoggingOff(*args, **kwargs): | |
3865 | """GetLoggingOff() -> bool""" | |
3866 | return _core.CloseEvent_GetLoggingOff(*args, **kwargs) | |
3867 | ||
3868 | def Veto(*args, **kwargs): | |
3869 | """Veto(bool veto=True)""" | |
3870 | return _core.CloseEvent_Veto(*args, **kwargs) | |
3871 | ||
3872 | def SetCanVeto(*args, **kwargs): | |
3873 | """SetCanVeto(bool canVeto)""" | |
3874 | return _core.CloseEvent_SetCanVeto(*args, **kwargs) | |
3875 | ||
3876 | def CanVeto(*args, **kwargs): | |
3877 | """CanVeto() -> bool""" | |
3878 | return _core.CloseEvent_CanVeto(*args, **kwargs) | |
3879 | ||
3880 | def GetVeto(*args, **kwargs): | |
3881 | """GetVeto() -> bool""" | |
3882 | return _core.CloseEvent_GetVeto(*args, **kwargs) | |
3883 | ||
d14a1e28 RD |
3884 | |
3885 | class CloseEventPtr(CloseEvent): | |
3886 | def __init__(self, this): | |
3887 | self.this = this | |
3888 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3889 | self.__class__ = CloseEvent | |
3890 | _core.CloseEvent_swigregister(CloseEventPtr) | |
3891 | ||
3892 | #--------------------------------------------------------------------------- | |
3893 | ||
3894 | class ShowEvent(Event): | |
e811c8ce RD |
3895 | def __repr__(self): |
3896 | return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3897 | def __init__(self, *args, **kwargs): |
e811c8ce | 3898 | """__init__(int winid=0, bool show=False) -> ShowEvent""" |
d14a1e28 RD |
3899 | newobj = _core.new_ShowEvent(*args, **kwargs) |
3900 | self.this = newobj.this | |
3901 | self.thisown = 1 | |
3902 | del newobj.thisown | |
e811c8ce RD |
3903 | def SetShow(*args, **kwargs): |
3904 | """SetShow(bool show)""" | |
3905 | return _core.ShowEvent_SetShow(*args, **kwargs) | |
3906 | ||
3907 | def GetShow(*args, **kwargs): | |
3908 | """GetShow() -> bool""" | |
3909 | return _core.ShowEvent_GetShow(*args, **kwargs) | |
3910 | ||
d14a1e28 RD |
3911 | |
3912 | class ShowEventPtr(ShowEvent): | |
3913 | def __init__(self, this): | |
3914 | self.this = this | |
3915 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3916 | self.__class__ = ShowEvent | |
3917 | _core.ShowEvent_swigregister(ShowEventPtr) | |
3918 | ||
3919 | #--------------------------------------------------------------------------- | |
3920 | ||
3921 | class IconizeEvent(Event): | |
e811c8ce RD |
3922 | def __repr__(self): |
3923 | return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3924 | def __init__(self, *args, **kwargs): |
e811c8ce | 3925 | """__init__(int id=0, bool iconized=True) -> IconizeEvent""" |
d14a1e28 RD |
3926 | newobj = _core.new_IconizeEvent(*args, **kwargs) |
3927 | self.this = newobj.this | |
3928 | self.thisown = 1 | |
3929 | del newobj.thisown | |
e811c8ce RD |
3930 | def Iconized(*args, **kwargs): |
3931 | """Iconized() -> bool""" | |
3932 | return _core.IconizeEvent_Iconized(*args, **kwargs) | |
3933 | ||
d14a1e28 RD |
3934 | |
3935 | class IconizeEventPtr(IconizeEvent): | |
3936 | def __init__(self, this): | |
3937 | self.this = this | |
3938 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3939 | self.__class__ = IconizeEvent | |
3940 | _core.IconizeEvent_swigregister(IconizeEventPtr) | |
3941 | ||
3942 | #--------------------------------------------------------------------------- | |
3943 | ||
3944 | class MaximizeEvent(Event): | |
e811c8ce RD |
3945 | def __repr__(self): |
3946 | return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3947 | def __init__(self, *args, **kwargs): |
e811c8ce | 3948 | """__init__(int id=0) -> MaximizeEvent""" |
d14a1e28 RD |
3949 | newobj = _core.new_MaximizeEvent(*args, **kwargs) |
3950 | self.this = newobj.this | |
3951 | self.thisown = 1 | |
3952 | del newobj.thisown | |
d14a1e28 RD |
3953 | |
3954 | class MaximizeEventPtr(MaximizeEvent): | |
3955 | def __init__(self, this): | |
3956 | self.this = this | |
3957 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3958 | self.__class__ = MaximizeEvent | |
3959 | _core.MaximizeEvent_swigregister(MaximizeEventPtr) | |
3960 | ||
3961 | #--------------------------------------------------------------------------- | |
3962 | ||
3963 | class DropFilesEvent(Event): | |
d14a1e28 RD |
3964 | def __init__(self): raise RuntimeError, "No constructor defined" |
3965 | def __repr__(self): | |
3966 | return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
3967 | def GetPosition(*args, **kwargs): |
3968 | """GetPosition() -> Point""" | |
3969 | return _core.DropFilesEvent_GetPosition(*args, **kwargs) | |
3970 | ||
3971 | def GetNumberOfFiles(*args, **kwargs): | |
3972 | """GetNumberOfFiles() -> int""" | |
3973 | return _core.DropFilesEvent_GetNumberOfFiles(*args, **kwargs) | |
3974 | ||
3975 | def GetFiles(*args, **kwargs): | |
3976 | """GetFiles() -> PyObject""" | |
3977 | return _core.DropFilesEvent_GetFiles(*args, **kwargs) | |
3978 | ||
d14a1e28 RD |
3979 | |
3980 | class DropFilesEventPtr(DropFilesEvent): | |
3981 | def __init__(self, this): | |
3982 | self.this = this | |
3983 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3984 | self.__class__ = DropFilesEvent | |
3985 | _core.DropFilesEvent_swigregister(DropFilesEventPtr) | |
3986 | ||
3987 | #--------------------------------------------------------------------------- | |
3988 | ||
3989 | UPDATE_UI_PROCESS_ALL = _core.UPDATE_UI_PROCESS_ALL | |
3990 | UPDATE_UI_PROCESS_SPECIFIED = _core.UPDATE_UI_PROCESS_SPECIFIED | |
3991 | class UpdateUIEvent(CommandEvent): | |
e811c8ce RD |
3992 | def __repr__(self): |
3993 | return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3994 | def __init__(self, *args, **kwargs): |
e811c8ce | 3995 | """__init__(int commandId=0) -> UpdateUIEvent""" |
d14a1e28 RD |
3996 | newobj = _core.new_UpdateUIEvent(*args, **kwargs) |
3997 | self.this = newobj.this | |
3998 | self.thisown = 1 | |
3999 | del newobj.thisown | |
e811c8ce RD |
4000 | def GetChecked(*args, **kwargs): |
4001 | """GetChecked() -> bool""" | |
4002 | return _core.UpdateUIEvent_GetChecked(*args, **kwargs) | |
4003 | ||
4004 | def GetEnabled(*args, **kwargs): | |
4005 | """GetEnabled() -> bool""" | |
4006 | return _core.UpdateUIEvent_GetEnabled(*args, **kwargs) | |
4007 | ||
4008 | def GetText(*args, **kwargs): | |
4009 | """GetText() -> wxString""" | |
4010 | return _core.UpdateUIEvent_GetText(*args, **kwargs) | |
4011 | ||
4012 | def GetSetText(*args, **kwargs): | |
4013 | """GetSetText() -> bool""" | |
4014 | return _core.UpdateUIEvent_GetSetText(*args, **kwargs) | |
4015 | ||
4016 | def GetSetChecked(*args, **kwargs): | |
4017 | """GetSetChecked() -> bool""" | |
4018 | return _core.UpdateUIEvent_GetSetChecked(*args, **kwargs) | |
4019 | ||
4020 | def GetSetEnabled(*args, **kwargs): | |
4021 | """GetSetEnabled() -> bool""" | |
4022 | return _core.UpdateUIEvent_GetSetEnabled(*args, **kwargs) | |
4023 | ||
4024 | def Check(*args, **kwargs): | |
4025 | """Check(bool check)""" | |
4026 | return _core.UpdateUIEvent_Check(*args, **kwargs) | |
4027 | ||
4028 | def Enable(*args, **kwargs): | |
4029 | """Enable(bool enable)""" | |
4030 | return _core.UpdateUIEvent_Enable(*args, **kwargs) | |
4031 | ||
4032 | def SetText(*args, **kwargs): | |
4033 | """SetText(wxString text)""" | |
4034 | return _core.UpdateUIEvent_SetText(*args, **kwargs) | |
4035 | ||
4036 | def SetUpdateInterval(*args, **kwargs): | |
4037 | """UpdateUIEvent.SetUpdateInterval(long updateInterval)""" | |
4038 | return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) | |
4039 | ||
4040 | SetUpdateInterval = staticmethod(SetUpdateInterval) | |
4041 | def GetUpdateInterval(*args, **kwargs): | |
4042 | """UpdateUIEvent.GetUpdateInterval() -> long""" | |
4043 | return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) | |
4044 | ||
4045 | GetUpdateInterval = staticmethod(GetUpdateInterval) | |
4046 | def CanUpdate(*args, **kwargs): | |
4047 | """UpdateUIEvent.CanUpdate(Window win) -> bool""" | |
4048 | return _core.UpdateUIEvent_CanUpdate(*args, **kwargs) | |
4049 | ||
4050 | CanUpdate = staticmethod(CanUpdate) | |
4051 | def ResetUpdateTime(*args, **kwargs): | |
4052 | """UpdateUIEvent.ResetUpdateTime()""" | |
4053 | return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) | |
4054 | ||
4055 | ResetUpdateTime = staticmethod(ResetUpdateTime) | |
4056 | def SetMode(*args, **kwargs): | |
4057 | """UpdateUIEvent.SetMode(wxUpdateUIMode mode)""" | |
4058 | return _core.UpdateUIEvent_SetMode(*args, **kwargs) | |
4059 | ||
4060 | SetMode = staticmethod(SetMode) | |
4061 | def GetMode(*args, **kwargs): | |
4062 | """UpdateUIEvent.GetMode() -> wxUpdateUIMode""" | |
4063 | return _core.UpdateUIEvent_GetMode(*args, **kwargs) | |
4064 | ||
4065 | GetMode = staticmethod(GetMode) | |
d14a1e28 RD |
4066 | |
4067 | class UpdateUIEventPtr(UpdateUIEvent): | |
4068 | def __init__(self, this): | |
4069 | self.this = this | |
4070 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4071 | self.__class__ = UpdateUIEvent | |
4072 | _core.UpdateUIEvent_swigregister(UpdateUIEventPtr) | |
4073 | ||
e811c8ce RD |
4074 | def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): |
4075 | """UpdateUIEvent_SetUpdateInterval(long updateInterval)""" | |
4076 | return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) | |
d14a1e28 | 4077 | |
e811c8ce RD |
4078 | def UpdateUIEvent_GetUpdateInterval(*args, **kwargs): |
4079 | """UpdateUIEvent_GetUpdateInterval() -> long""" | |
4080 | return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) | |
d14a1e28 | 4081 | |
e811c8ce RD |
4082 | def UpdateUIEvent_CanUpdate(*args, **kwargs): |
4083 | """UpdateUIEvent_CanUpdate(Window win) -> bool""" | |
4084 | return _core.UpdateUIEvent_CanUpdate(*args, **kwargs) | |
d14a1e28 | 4085 | |
e811c8ce RD |
4086 | def UpdateUIEvent_ResetUpdateTime(*args, **kwargs): |
4087 | """UpdateUIEvent_ResetUpdateTime()""" | |
4088 | return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) | |
d14a1e28 | 4089 | |
e811c8ce RD |
4090 | def UpdateUIEvent_SetMode(*args, **kwargs): |
4091 | """UpdateUIEvent_SetMode(wxUpdateUIMode mode)""" | |
4092 | return _core.UpdateUIEvent_SetMode(*args, **kwargs) | |
d14a1e28 | 4093 | |
e811c8ce RD |
4094 | def UpdateUIEvent_GetMode(*args, **kwargs): |
4095 | """UpdateUIEvent_GetMode() -> wxUpdateUIMode""" | |
4096 | return _core.UpdateUIEvent_GetMode(*args, **kwargs) | |
d14a1e28 RD |
4097 | |
4098 | #--------------------------------------------------------------------------- | |
4099 | ||
4100 | class SysColourChangedEvent(Event): | |
e811c8ce RD |
4101 | def __repr__(self): |
4102 | return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4103 | def __init__(self, *args, **kwargs): |
e811c8ce | 4104 | """__init__() -> SysColourChangedEvent""" |
d14a1e28 RD |
4105 | newobj = _core.new_SysColourChangedEvent(*args, **kwargs) |
4106 | self.this = newobj.this | |
4107 | self.thisown = 1 | |
4108 | del newobj.thisown | |
d14a1e28 RD |
4109 | |
4110 | class SysColourChangedEventPtr(SysColourChangedEvent): | |
4111 | def __init__(self, this): | |
4112 | self.this = this | |
4113 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4114 | self.__class__ = SysColourChangedEvent | |
4115 | _core.SysColourChangedEvent_swigregister(SysColourChangedEventPtr) | |
4116 | ||
4117 | #--------------------------------------------------------------------------- | |
4118 | ||
4119 | class MouseCaptureChangedEvent(Event): | |
e811c8ce RD |
4120 | def __repr__(self): |
4121 | return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4122 | def __init__(self, *args, **kwargs): |
e811c8ce | 4123 | """__init__(int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent""" |
d14a1e28 RD |
4124 | newobj = _core.new_MouseCaptureChangedEvent(*args, **kwargs) |
4125 | self.this = newobj.this | |
4126 | self.thisown = 1 | |
4127 | del newobj.thisown | |
e811c8ce RD |
4128 | def GetCapturedWindow(*args, **kwargs): |
4129 | """GetCapturedWindow() -> Window""" | |
4130 | return _core.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs) | |
4131 | ||
d14a1e28 RD |
4132 | |
4133 | class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent): | |
4134 | def __init__(self, this): | |
4135 | self.this = this | |
4136 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4137 | self.__class__ = MouseCaptureChangedEvent | |
4138 | _core.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr) | |
4139 | ||
4140 | #--------------------------------------------------------------------------- | |
4141 | ||
4142 | class DisplayChangedEvent(Event): | |
e811c8ce RD |
4143 | def __repr__(self): |
4144 | return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4145 | def __init__(self, *args, **kwargs): |
e811c8ce | 4146 | """__init__() -> DisplayChangedEvent""" |
d14a1e28 RD |
4147 | newobj = _core.new_DisplayChangedEvent(*args, **kwargs) |
4148 | self.this = newobj.this | |
4149 | self.thisown = 1 | |
4150 | del newobj.thisown | |
d14a1e28 RD |
4151 | |
4152 | class DisplayChangedEventPtr(DisplayChangedEvent): | |
4153 | def __init__(self, this): | |
4154 | self.this = this | |
4155 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4156 | self.__class__ = DisplayChangedEvent | |
4157 | _core.DisplayChangedEvent_swigregister(DisplayChangedEventPtr) | |
4158 | ||
4159 | #--------------------------------------------------------------------------- | |
4160 | ||
4161 | class PaletteChangedEvent(Event): | |
e811c8ce RD |
4162 | def __repr__(self): |
4163 | return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4164 | def __init__(self, *args, **kwargs): |
e811c8ce | 4165 | """__init__(int id=0) -> PaletteChangedEvent""" |
d14a1e28 RD |
4166 | newobj = _core.new_PaletteChangedEvent(*args, **kwargs) |
4167 | self.this = newobj.this | |
4168 | self.thisown = 1 | |
4169 | del newobj.thisown | |
e811c8ce RD |
4170 | def SetChangedWindow(*args, **kwargs): |
4171 | """SetChangedWindow(Window win)""" | |
4172 | return _core.PaletteChangedEvent_SetChangedWindow(*args, **kwargs) | |
4173 | ||
4174 | def GetChangedWindow(*args, **kwargs): | |
4175 | """GetChangedWindow() -> Window""" | |
4176 | return _core.PaletteChangedEvent_GetChangedWindow(*args, **kwargs) | |
4177 | ||
d14a1e28 RD |
4178 | |
4179 | class PaletteChangedEventPtr(PaletteChangedEvent): | |
4180 | def __init__(self, this): | |
4181 | self.this = this | |
4182 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4183 | self.__class__ = PaletteChangedEvent | |
4184 | _core.PaletteChangedEvent_swigregister(PaletteChangedEventPtr) | |
4185 | ||
4186 | #--------------------------------------------------------------------------- | |
4187 | ||
4188 | class QueryNewPaletteEvent(Event): | |
e811c8ce RD |
4189 | def __repr__(self): |
4190 | return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4191 | def __init__(self, *args, **kwargs): |
e811c8ce | 4192 | """__init__(int winid=0) -> QueryNewPaletteEvent""" |
d14a1e28 RD |
4193 | newobj = _core.new_QueryNewPaletteEvent(*args, **kwargs) |
4194 | self.this = newobj.this | |
4195 | self.thisown = 1 | |
4196 | del newobj.thisown | |
e811c8ce RD |
4197 | def SetPaletteRealized(*args, **kwargs): |
4198 | """SetPaletteRealized(bool realized)""" | |
4199 | return _core.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs) | |
4200 | ||
4201 | def GetPaletteRealized(*args, **kwargs): | |
4202 | """GetPaletteRealized() -> bool""" | |
4203 | return _core.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs) | |
4204 | ||
d14a1e28 RD |
4205 | |
4206 | class QueryNewPaletteEventPtr(QueryNewPaletteEvent): | |
4207 | def __init__(self, this): | |
4208 | self.this = this | |
4209 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4210 | self.__class__ = QueryNewPaletteEvent | |
4211 | _core.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr) | |
4212 | ||
4213 | #--------------------------------------------------------------------------- | |
4214 | ||
4215 | class NavigationKeyEvent(Event): | |
e811c8ce RD |
4216 | def __repr__(self): |
4217 | return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4218 | def __init__(self, *args, **kwargs): |
e811c8ce | 4219 | """__init__() -> NavigationKeyEvent""" |
d14a1e28 RD |
4220 | newobj = _core.new_NavigationKeyEvent(*args, **kwargs) |
4221 | self.this = newobj.this | |
4222 | self.thisown = 1 | |
4223 | del newobj.thisown | |
e811c8ce RD |
4224 | def GetDirection(*args, **kwargs): |
4225 | """GetDirection() -> bool""" | |
4226 | return _core.NavigationKeyEvent_GetDirection(*args, **kwargs) | |
4227 | ||
4228 | def SetDirection(*args, **kwargs): | |
4229 | """SetDirection(bool bForward)""" | |
4230 | return _core.NavigationKeyEvent_SetDirection(*args, **kwargs) | |
4231 | ||
4232 | def IsWindowChange(*args, **kwargs): | |
4233 | """IsWindowChange() -> bool""" | |
4234 | return _core.NavigationKeyEvent_IsWindowChange(*args, **kwargs) | |
4235 | ||
4236 | def SetWindowChange(*args, **kwargs): | |
4237 | """SetWindowChange(bool bIs)""" | |
4238 | return _core.NavigationKeyEvent_SetWindowChange(*args, **kwargs) | |
4239 | ||
4240 | def GetCurrentFocus(*args, **kwargs): | |
4241 | """GetCurrentFocus() -> Window""" | |
4242 | return _core.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs) | |
4243 | ||
4244 | def SetCurrentFocus(*args, **kwargs): | |
4245 | """SetCurrentFocus(Window win)""" | |
4246 | return _core.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs) | |
4247 | ||
d14a1e28 RD |
4248 | |
4249 | class NavigationKeyEventPtr(NavigationKeyEvent): | |
4250 | def __init__(self, this): | |
4251 | self.this = this | |
4252 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4253 | self.__class__ = NavigationKeyEvent | |
4254 | _core.NavigationKeyEvent_swigregister(NavigationKeyEventPtr) | |
4255 | ||
4256 | #--------------------------------------------------------------------------- | |
4257 | ||
4258 | class WindowCreateEvent(CommandEvent): | |
e811c8ce RD |
4259 | def __repr__(self): |
4260 | return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4261 | def __init__(self, *args, **kwargs): |
e811c8ce | 4262 | """__init__(Window win=None) -> WindowCreateEvent""" |
d14a1e28 RD |
4263 | newobj = _core.new_WindowCreateEvent(*args, **kwargs) |
4264 | self.this = newobj.this | |
4265 | self.thisown = 1 | |
4266 | del newobj.thisown | |
e811c8ce RD |
4267 | def GetWindow(*args, **kwargs): |
4268 | """GetWindow() -> Window""" | |
4269 | return _core.WindowCreateEvent_GetWindow(*args, **kwargs) | |
4270 | ||
d14a1e28 RD |
4271 | |
4272 | class WindowCreateEventPtr(WindowCreateEvent): | |
4273 | def __init__(self, this): | |
4274 | self.this = this | |
4275 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4276 | self.__class__ = WindowCreateEvent | |
4277 | _core.WindowCreateEvent_swigregister(WindowCreateEventPtr) | |
4278 | ||
4279 | class WindowDestroyEvent(CommandEvent): | |
e811c8ce RD |
4280 | def __repr__(self): |
4281 | return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4282 | def __init__(self, *args, **kwargs): |
e811c8ce | 4283 | """__init__(Window win=None) -> WindowDestroyEvent""" |
d14a1e28 RD |
4284 | newobj = _core.new_WindowDestroyEvent(*args, **kwargs) |
4285 | self.this = newobj.this | |
4286 | self.thisown = 1 | |
4287 | del newobj.thisown | |
e811c8ce RD |
4288 | def GetWindow(*args, **kwargs): |
4289 | """GetWindow() -> Window""" | |
4290 | return _core.WindowDestroyEvent_GetWindow(*args, **kwargs) | |
4291 | ||
d14a1e28 RD |
4292 | |
4293 | class WindowDestroyEventPtr(WindowDestroyEvent): | |
4294 | def __init__(self, this): | |
4295 | self.this = this | |
4296 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4297 | self.__class__ = WindowDestroyEvent | |
4298 | _core.WindowDestroyEvent_swigregister(WindowDestroyEventPtr) | |
4299 | ||
4300 | #--------------------------------------------------------------------------- | |
4301 | ||
4302 | class ContextMenuEvent(CommandEvent): | |
e811c8ce RD |
4303 | def __repr__(self): |
4304 | return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4305 | def __init__(self, *args, **kwargs): |
e811c8ce | 4306 | """__init__(wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent""" |
d14a1e28 RD |
4307 | newobj = _core.new_ContextMenuEvent(*args, **kwargs) |
4308 | self.this = newobj.this | |
4309 | self.thisown = 1 | |
4310 | del newobj.thisown | |
e811c8ce RD |
4311 | def GetPosition(*args, **kwargs): |
4312 | """GetPosition() -> Point""" | |
4313 | return _core.ContextMenuEvent_GetPosition(*args, **kwargs) | |
4314 | ||
4315 | def SetPosition(*args, **kwargs): | |
4316 | """SetPosition(Point pos)""" | |
4317 | return _core.ContextMenuEvent_SetPosition(*args, **kwargs) | |
4318 | ||
d14a1e28 RD |
4319 | |
4320 | class ContextMenuEventPtr(ContextMenuEvent): | |
4321 | def __init__(self, this): | |
4322 | self.this = this | |
4323 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4324 | self.__class__ = ContextMenuEvent | |
4325 | _core.ContextMenuEvent_swigregister(ContextMenuEventPtr) | |
4326 | ||
4327 | #--------------------------------------------------------------------------- | |
4328 | ||
4329 | IDLE_PROCESS_ALL = _core.IDLE_PROCESS_ALL | |
4330 | IDLE_PROCESS_SPECIFIED = _core.IDLE_PROCESS_SPECIFIED | |
4331 | class IdleEvent(Event): | |
e811c8ce RD |
4332 | def __repr__(self): |
4333 | return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4334 | def __init__(self, *args, **kwargs): |
e811c8ce | 4335 | """__init__() -> IdleEvent""" |
d14a1e28 RD |
4336 | newobj = _core.new_IdleEvent(*args, **kwargs) |
4337 | self.this = newobj.this | |
4338 | self.thisown = 1 | |
4339 | del newobj.thisown | |
e811c8ce RD |
4340 | def RequestMore(*args, **kwargs): |
4341 | """RequestMore(bool needMore=True)""" | |
4342 | return _core.IdleEvent_RequestMore(*args, **kwargs) | |
4343 | ||
4344 | def MoreRequested(*args, **kwargs): | |
4345 | """MoreRequested() -> bool""" | |
4346 | return _core.IdleEvent_MoreRequested(*args, **kwargs) | |
4347 | ||
4348 | def SetMode(*args, **kwargs): | |
4349 | """IdleEvent.SetMode(wxIdleMode mode)""" | |
4350 | return _core.IdleEvent_SetMode(*args, **kwargs) | |
4351 | ||
4352 | SetMode = staticmethod(SetMode) | |
4353 | def GetMode(*args, **kwargs): | |
4354 | """IdleEvent.GetMode() -> wxIdleMode""" | |
4355 | return _core.IdleEvent_GetMode(*args, **kwargs) | |
4356 | ||
4357 | GetMode = staticmethod(GetMode) | |
4358 | def CanSend(*args, **kwargs): | |
4359 | """IdleEvent.CanSend(Window win) -> bool""" | |
4360 | return _core.IdleEvent_CanSend(*args, **kwargs) | |
4361 | ||
4362 | CanSend = staticmethod(CanSend) | |
d14a1e28 RD |
4363 | |
4364 | class IdleEventPtr(IdleEvent): | |
4365 | def __init__(self, this): | |
4366 | self.this = this | |
4367 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4368 | self.__class__ = IdleEvent | |
4369 | _core.IdleEvent_swigregister(IdleEventPtr) | |
4370 | ||
e811c8ce RD |
4371 | def IdleEvent_SetMode(*args, **kwargs): |
4372 | """IdleEvent_SetMode(wxIdleMode mode)""" | |
4373 | return _core.IdleEvent_SetMode(*args, **kwargs) | |
d14a1e28 | 4374 | |
e811c8ce RD |
4375 | def IdleEvent_GetMode(*args, **kwargs): |
4376 | """IdleEvent_GetMode() -> wxIdleMode""" | |
4377 | return _core.IdleEvent_GetMode(*args, **kwargs) | |
d14a1e28 | 4378 | |
e811c8ce RD |
4379 | def IdleEvent_CanSend(*args, **kwargs): |
4380 | """IdleEvent_CanSend(Window win) -> bool""" | |
4381 | return _core.IdleEvent_CanSend(*args, **kwargs) | |
d14a1e28 RD |
4382 | |
4383 | #--------------------------------------------------------------------------- | |
4384 | ||
4385 | class PyEvent(Event): | |
e811c8ce RD |
4386 | def __repr__(self): |
4387 | return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4388 | def __init__(self, *args, **kwargs): |
e811c8ce | 4389 | """__init__(int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent""" |
d14a1e28 RD |
4390 | newobj = _core.new_PyEvent(*args, **kwargs) |
4391 | self.this = newobj.this | |
4392 | self.thisown = 1 | |
4393 | del newobj.thisown | |
4394 | self.SetSelf(self) | |
e811c8ce | 4395 | |
d14a1e28 | 4396 | def __del__(self, destroy=_core.delete_PyEvent): |
e811c8ce | 4397 | """__del__()""" |
d14a1e28 RD |
4398 | try: |
4399 | if self.thisown: destroy(self) | |
4400 | except: pass | |
e811c8ce RD |
4401 | |
4402 | def SetSelf(*args, **kwargs): | |
4403 | """SetSelf(PyObject self)""" | |
4404 | return _core.PyEvent_SetSelf(*args, **kwargs) | |
4405 | ||
4406 | def GetSelf(*args, **kwargs): | |
4407 | """GetSelf() -> PyObject""" | |
4408 | return _core.PyEvent_GetSelf(*args, **kwargs) | |
4409 | ||
d14a1e28 RD |
4410 | |
4411 | class PyEventPtr(PyEvent): | |
4412 | def __init__(self, this): | |
4413 | self.this = this | |
4414 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4415 | self.__class__ = PyEvent | |
4416 | _core.PyEvent_swigregister(PyEventPtr) | |
4417 | ||
4418 | class PyCommandEvent(CommandEvent): | |
e811c8ce RD |
4419 | def __repr__(self): |
4420 | return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4421 | def __init__(self, *args, **kwargs): |
e811c8ce | 4422 | """__init__(wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent""" |
d14a1e28 RD |
4423 | newobj = _core.new_PyCommandEvent(*args, **kwargs) |
4424 | self.this = newobj.this | |
4425 | self.thisown = 1 | |
4426 | del newobj.thisown | |
4427 | self.SetSelf(self) | |
e811c8ce | 4428 | |
d14a1e28 | 4429 | def __del__(self, destroy=_core.delete_PyCommandEvent): |
e811c8ce | 4430 | """__del__()""" |
d14a1e28 RD |
4431 | try: |
4432 | if self.thisown: destroy(self) | |
4433 | except: pass | |
e811c8ce RD |
4434 | |
4435 | def SetSelf(*args, **kwargs): | |
4436 | """SetSelf(PyObject self)""" | |
4437 | return _core.PyCommandEvent_SetSelf(*args, **kwargs) | |
4438 | ||
4439 | def GetSelf(*args, **kwargs): | |
4440 | """GetSelf() -> PyObject""" | |
4441 | return _core.PyCommandEvent_GetSelf(*args, **kwargs) | |
4442 | ||
d14a1e28 RD |
4443 | |
4444 | class PyCommandEventPtr(PyCommandEvent): | |
4445 | def __init__(self, this): | |
4446 | self.this = this | |
4447 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4448 | self.__class__ = PyCommandEvent | |
4449 | _core.PyCommandEvent_swigregister(PyCommandEventPtr) | |
4450 | ||
4451 | #--------------------------------------------------------------------------- | |
4452 | ||
4453 | PYAPP_ASSERT_SUPPRESS = _core.PYAPP_ASSERT_SUPPRESS | |
4454 | PYAPP_ASSERT_EXCEPTION = _core.PYAPP_ASSERT_EXCEPTION | |
4455 | PYAPP_ASSERT_DIALOG = _core.PYAPP_ASSERT_DIALOG | |
4456 | PYAPP_ASSERT_LOG = _core.PYAPP_ASSERT_LOG | |
4457 | PRINT_WINDOWS = _core.PRINT_WINDOWS | |
4458 | PRINT_POSTSCRIPT = _core.PRINT_POSTSCRIPT | |
4459 | class PyApp(EvtHandler): | |
e811c8ce RD |
4460 | def __repr__(self): |
4461 | return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4462 | def __init__(self, *args, **kwargs): |
e811c8ce | 4463 | """__init__() -> PyApp""" |
d14a1e28 RD |
4464 | newobj = _core.new_PyApp(*args, **kwargs) |
4465 | self.this = newobj.this | |
4466 | self.thisown = 1 | |
4467 | del newobj.thisown | |
4468 | self._setCallbackInfo(self, PyApp) | |
4469 | self._setOORInfo(self) | |
e811c8ce | 4470 | |
d14a1e28 | 4471 | def __del__(self, destroy=_core.delete_PyApp): |
e811c8ce | 4472 | """__del__()""" |
d14a1e28 RD |
4473 | try: |
4474 | if self.thisown: destroy(self) | |
4475 | except: pass | |
e811c8ce RD |
4476 | |
4477 | def _setCallbackInfo(*args, **kwargs): | |
4478 | """_setCallbackInfo(PyObject self, PyObject _class)""" | |
4479 | return _core.PyApp__setCallbackInfo(*args, **kwargs) | |
4480 | ||
4481 | def GetAppName(*args, **kwargs): | |
0df68c9f RD |
4482 | """ |
4483 | GetAppName() -> wxString | |
6c3b4aae | 4484 | |
0df68c9f RD |
4485 | Get the application name. |
4486 | """ | |
e811c8ce RD |
4487 | return _core.PyApp_GetAppName(*args, **kwargs) |
4488 | ||
4489 | def SetAppName(*args, **kwargs): | |
0df68c9f RD |
4490 | """ |
4491 | SetAppName(wxString name) | |
6c3b4aae | 4492 | |
0df68c9f RD |
4493 | Set the application name. This value may be used automatically |
4494 | by wxConfig and such. | |
4495 | """ | |
e811c8ce RD |
4496 | return _core.PyApp_SetAppName(*args, **kwargs) |
4497 | ||
4498 | def GetClassName(*args, **kwargs): | |
0df68c9f RD |
4499 | """ |
4500 | GetClassName() -> wxString | |
e811c8ce | 4501 | |
0df68c9f RD |
4502 | Get the application's class name. |
4503 | """ | |
e811c8ce RD |
4504 | return _core.PyApp_GetClassName(*args, **kwargs) |
4505 | ||
4506 | def SetClassName(*args, **kwargs): | |
0df68c9f RD |
4507 | """ |
4508 | SetClassName(wxString name) | |
6c3b4aae | 4509 | |
0df68c9f RD |
4510 | Set the application's class name. This value may be used for X-resources if |
4511 | applicable for the platform | |
4512 | """ | |
e811c8ce RD |
4513 | return _core.PyApp_SetClassName(*args, **kwargs) |
4514 | ||
4515 | def GetVendorName(*args, **kwargs): | |
0df68c9f RD |
4516 | """ |
4517 | GetVendorName() -> wxString | |
6c3b4aae | 4518 | |
0df68c9f RD |
4519 | Get the application's vendor name. |
4520 | """ | |
e811c8ce RD |
4521 | return _core.PyApp_GetVendorName(*args, **kwargs) |
4522 | ||
4523 | def SetVendorName(*args, **kwargs): | |
0df68c9f RD |
4524 | """ |
4525 | SetVendorName(wxString name) | |
6c3b4aae | 4526 | |
0df68c9f RD |
4527 | Set the application's vendor name. This value may be used automatically |
4528 | by wxConfig and such. | |
4529 | """ | |
e811c8ce RD |
4530 | return _core.PyApp_SetVendorName(*args, **kwargs) |
4531 | ||
4532 | def GetTraits(*args, **kwargs): | |
0df68c9f RD |
4533 | """ |
4534 | GetTraits() -> wxAppTraits | |
6c3b4aae | 4535 | |
0df68c9f RD |
4536 | Create the app traits object to which we delegate for everything which either |
4537 | should be configurable by the user (then he can change the default behaviour | |
4538 | simply by overriding CreateTraits() and returning his own traits object) or | |
4539 | which is GUI/console dependent as then wxAppTraits allows us to abstract the | |
4540 | differences behind the common facade | |
4541 | """ | |
e811c8ce RD |
4542 | return _core.PyApp_GetTraits(*args, **kwargs) |
4543 | ||
4544 | def ProcessPendingEvents(*args, **kwargs): | |
0df68c9f RD |
4545 | """ |
4546 | ProcessPendingEvents() | |
6c3b4aae | 4547 | |
0df68c9f RD |
4548 | Process all events in the wxPendingEvents list -- it is necessary to call this |
4549 | function to process posted events. This happens during each event loop | |
4550 | iteration. | |
4551 | """ | |
e811c8ce RD |
4552 | return _core.PyApp_ProcessPendingEvents(*args, **kwargs) |
4553 | ||
4554 | def Yield(*args, **kwargs): | |
0df68c9f RD |
4555 | """ |
4556 | Yield(bool onlyIfNeeded=False) -> bool | |
6c3b4aae | 4557 | |
0df68c9f RD |
4558 | Process all currently pending events right now, instead of waiting until |
4559 | return to the event loop. It is an error to call Yield() recursively unless | |
4560 | the value of onlyIfNeeded is True. | |
6c3b4aae | 4561 | |
0df68c9f RD |
4562 | WARNING: This function is dangerous as it can lead to unexpected |
4563 | reentrancies (i.e. when called from an event handler it | |
4564 | may result in calling the same event handler again), use | |
4565 | with _extreme_ care or, better, don't use at all! | |
4566 | ||
4567 | """ | |
e811c8ce RD |
4568 | return _core.PyApp_Yield(*args, **kwargs) |
4569 | ||
4570 | def WakeUpIdle(*args, **kwargs): | |
0df68c9f RD |
4571 | """ |
4572 | WakeUpIdle() | |
6c3b4aae | 4573 | |
0df68c9f RD |
4574 | Make sure that idle events are sent again |
4575 | """ | |
e811c8ce RD |
4576 | return _core.PyApp_WakeUpIdle(*args, **kwargs) |
4577 | ||
4578 | def MainLoop(*args, **kwargs): | |
0df68c9f RD |
4579 | """ |
4580 | MainLoop() -> int | |
6c3b4aae | 4581 | |
0df68c9f RD |
4582 | Execute the main GUI loop, the function returns when the loop ends. |
4583 | """ | |
e811c8ce RD |
4584 | return _core.PyApp_MainLoop(*args, **kwargs) |
4585 | ||
4586 | def Exit(*args, **kwargs): | |
0df68c9f RD |
4587 | """ |
4588 | Exit() | |
6c3b4aae | 4589 | |
0df68c9f RD |
4590 | Exit the main loop thus terminating the application. |
4591 | """ | |
e811c8ce RD |
4592 | return _core.PyApp_Exit(*args, **kwargs) |
4593 | ||
4594 | def ExitMainLoop(*args, **kwargs): | |
0df68c9f RD |
4595 | """ |
4596 | ExitMainLoop() | |
6c3b4aae | 4597 | |
0df68c9f RD |
4598 | Exit the main GUI loop during the next iteration (i.e. it does not |
4599 | stop the program immediately!) | |
4600 | """ | |
e811c8ce RD |
4601 | return _core.PyApp_ExitMainLoop(*args, **kwargs) |
4602 | ||
4603 | def Pending(*args, **kwargs): | |
0df68c9f RD |
4604 | """ |
4605 | Pending() -> bool | |
6c3b4aae | 4606 | |
0df68c9f RD |
4607 | Returns True if there are unprocessed events in the event queue. |
4608 | """ | |
e811c8ce RD |
4609 | return _core.PyApp_Pending(*args, **kwargs) |
4610 | ||
4611 | def Dispatch(*args, **kwargs): | |
0df68c9f RD |
4612 | """ |
4613 | Dispatch() -> bool | |
6c3b4aae | 4614 | |
0df68c9f RD |
4615 | Process the first event in the event queue (blocks until an event |
4616 | appears if there are none currently) | |
4617 | """ | |
e811c8ce RD |
4618 | return _core.PyApp_Dispatch(*args, **kwargs) |
4619 | ||
4620 | def ProcessIdle(*args, **kwargs): | |
0df68c9f RD |
4621 | """ |
4622 | ProcessIdle() -> bool | |
6c3b4aae | 4623 | |
0df68c9f RD |
4624 | Called from the MainLoop when the application becomes idle and sends an |
4625 | IdleEvent to all interested parties. Returns True is more idle events are | |
4626 | needed, False if not. | |
4627 | """ | |
e811c8ce RD |
4628 | return _core.PyApp_ProcessIdle(*args, **kwargs) |
4629 | ||
4630 | def SendIdleEvents(*args, **kwargs): | |
0df68c9f RD |
4631 | """ |
4632 | SendIdleEvents(Window win, IdleEvent event) -> bool | |
e811c8ce | 4633 | |
0df68c9f RD |
4634 | Send idle event to window and all subwindows. Returns True if more idle time |
4635 | is requested. | |
4636 | """ | |
6c3b4aae | 4637 | return _core.PyApp_SendIdleEvents(*args, **kwargs) |
e811c8ce RD |
4638 | |
4639 | def IsActive(*args, **kwargs): | |
0df68c9f RD |
4640 | """ |
4641 | IsActive() -> bool | |
6c3b4aae | 4642 | |
0df68c9f RD |
4643 | Return True if our app has focus. |
4644 | """ | |
e811c8ce RD |
4645 | return _core.PyApp_IsActive(*args, **kwargs) |
4646 | ||
4647 | def SetTopWindow(*args, **kwargs): | |
0df68c9f RD |
4648 | """ |
4649 | SetTopWindow(Window win) | |
6c3b4aae | 4650 | |
0df68c9f RD |
4651 | Set the "main" top level window |
4652 | """ | |
e811c8ce RD |
4653 | return _core.PyApp_SetTopWindow(*args, **kwargs) |
4654 | ||
4655 | def GetTopWindow(*args, **kwargs): | |
0df68c9f RD |
4656 | """ |
4657 | GetTopWindow() -> Window | |
6c3b4aae | 4658 | |
0df68c9f RD |
4659 | Return the "main" top level window (if it hadn't been set previously with |
4660 | SetTopWindow(), will return just some top level window and, if there not any, | |
4661 | will return None) | |
4662 | """ | |
e811c8ce RD |
4663 | return _core.PyApp_GetTopWindow(*args, **kwargs) |
4664 | ||
4665 | def SetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f RD |
4666 | """ |
4667 | SetExitOnFrameDelete(bool flag) | |
4668 | ||
4669 | Control the exit behaviour: by default, the program will exit the main loop | |
4670 | (and so, usually, terminate) when the last top-level program window is | |
4671 | deleted. Beware that if you disable this behaviour (with | |
4672 | SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly | |
4673 | from somewhere. | |
4674 | ||
4675 | """ | |
e811c8ce RD |
4676 | return _core.PyApp_SetExitOnFrameDelete(*args, **kwargs) |
4677 | ||
4678 | def GetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f RD |
4679 | """ |
4680 | GetExitOnFrameDelete() -> bool | |
6c3b4aae | 4681 | |
0df68c9f RD |
4682 | Get the current exit behaviour setting. |
4683 | """ | |
e811c8ce RD |
4684 | return _core.PyApp_GetExitOnFrameDelete(*args, **kwargs) |
4685 | ||
4686 | def SetUseBestVisual(*args, **kwargs): | |
0df68c9f RD |
4687 | """ |
4688 | SetUseBestVisual(bool flag) | |
6c3b4aae | 4689 | |
0df68c9f RD |
4690 | Set whether the app should try to use the best available visual on systems |
4691 | where more than one is available, (Sun, SGI, XFree86 4, etc.) | |
4692 | """ | |
e811c8ce RD |
4693 | return _core.PyApp_SetUseBestVisual(*args, **kwargs) |
4694 | ||
4695 | def GetUseBestVisual(*args, **kwargs): | |
0df68c9f RD |
4696 | """ |
4697 | GetUseBestVisual() -> bool | |
6c3b4aae | 4698 | |
0df68c9f RD |
4699 | Get current UseBestVisual setting. |
4700 | """ | |
e811c8ce RD |
4701 | return _core.PyApp_GetUseBestVisual(*args, **kwargs) |
4702 | ||
4703 | def SetPrintMode(*args, **kwargs): | |
4704 | """SetPrintMode(int mode)""" | |
4705 | return _core.PyApp_SetPrintMode(*args, **kwargs) | |
4706 | ||
4707 | def GetPrintMode(*args, **kwargs): | |
4708 | """GetPrintMode() -> int""" | |
4709 | return _core.PyApp_GetPrintMode(*args, **kwargs) | |
4710 | ||
e811c8ce | 4711 | def SetAssertMode(*args, **kwargs): |
0df68c9f RD |
4712 | """ |
4713 | SetAssertMode(int mode) | |
6c3b4aae | 4714 | |
0df68c9f RD |
4715 | Set the OnAssert behaviour for debug and hybrid builds. The following flags |
4716 | may be or'd together: | |
6c3b4aae | 4717 | |
0df68c9f RD |
4718 | wxPYAPP_ASSERT_SUPPRESS Don't do anything |
4719 | wxPYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default) | |
4720 | wxPYAPP_ASSERT_DIALOG Display a message dialog | |
4721 | wxPYAPP_ASSERT_LOG Write the assertion info to the wxLog | |
4722 | ||
4723 | """ | |
e811c8ce RD |
4724 | return _core.PyApp_SetAssertMode(*args, **kwargs) |
4725 | ||
6c3b4aae | 4726 | def GetAssertMode(*args, **kwargs): |
0df68c9f RD |
4727 | """ |
4728 | GetAssertMode() -> int | |
6c3b4aae | 4729 | |
0df68c9f RD |
4730 | Get the current OnAssert behaviour setting. |
4731 | """ | |
6c3b4aae RD |
4732 | return _core.PyApp_GetAssertMode(*args, **kwargs) |
4733 | ||
e811c8ce RD |
4734 | def GetMacSupportPCMenuShortcuts(*args, **kwargs): |
4735 | """PyApp.GetMacSupportPCMenuShortcuts() -> bool""" | |
4736 | return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) | |
4737 | ||
4738 | GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) | |
4739 | def GetMacAboutMenuItemId(*args, **kwargs): | |
4740 | """PyApp.GetMacAboutMenuItemId() -> long""" | |
4741 | return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs) | |
4742 | ||
4743 | GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) | |
4744 | def GetMacPreferencesMenuItemId(*args, **kwargs): | |
4745 | """PyApp.GetMacPreferencesMenuItemId() -> long""" | |
4746 | return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) | |
4747 | ||
4748 | GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) | |
4749 | def GetMacExitMenuItemId(*args, **kwargs): | |
4750 | """PyApp.GetMacExitMenuItemId() -> long""" | |
4751 | return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs) | |
4752 | ||
4753 | GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) | |
4754 | def GetMacHelpMenuTitleName(*args, **kwargs): | |
4755 | """PyApp.GetMacHelpMenuTitleName() -> wxString""" | |
4756 | return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) | |
4757 | ||
4758 | GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) | |
4759 | def SetMacSupportPCMenuShortcuts(*args, **kwargs): | |
4760 | """PyApp.SetMacSupportPCMenuShortcuts(bool val)""" | |
4761 | return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) | |
4762 | ||
4763 | SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) | |
4764 | def SetMacAboutMenuItemId(*args, **kwargs): | |
4765 | """PyApp.SetMacAboutMenuItemId(long val)""" | |
4766 | return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs) | |
4767 | ||
4768 | SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) | |
4769 | def SetMacPreferencesMenuItemId(*args, **kwargs): | |
4770 | """PyApp.SetMacPreferencesMenuItemId(long val)""" | |
4771 | return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) | |
4772 | ||
4773 | SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) | |
4774 | def SetMacExitMenuItemId(*args, **kwargs): | |
4775 | """PyApp.SetMacExitMenuItemId(long val)""" | |
4776 | return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs) | |
4777 | ||
4778 | SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) | |
4779 | def SetMacHelpMenuTitleName(*args, **kwargs): | |
4780 | """PyApp.SetMacHelpMenuTitleName(wxString val)""" | |
4781 | return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) | |
4782 | ||
4783 | SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) | |
4784 | def _BootstrapApp(*args, **kwargs): | |
0df68c9f RD |
4785 | """ |
4786 | _BootstrapApp() | |
6c3b4aae | 4787 | |
0df68c9f RD |
4788 | For internal use only |
4789 | """ | |
e811c8ce RD |
4790 | return _core.PyApp__BootstrapApp(*args, **kwargs) |
4791 | ||
4792 | def GetComCtl32Version(*args, **kwargs): | |
0df68c9f RD |
4793 | """ |
4794 | PyApp.GetComCtl32Version() -> int | |
6c3b4aae | 4795 | |
0df68c9f RD |
4796 | Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it |
4797 | wasn't found at all. Raises an exception on non-Windows platforms. | |
4798 | """ | |
e811c8ce RD |
4799 | return _core.PyApp_GetComCtl32Version(*args, **kwargs) |
4800 | ||
4801 | GetComCtl32Version = staticmethod(GetComCtl32Version) | |
d14a1e28 RD |
4802 | |
4803 | class PyAppPtr(PyApp): | |
4804 | def __init__(self, this): | |
4805 | self.this = this | |
4806 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4807 | self.__class__ = PyApp | |
4808 | _core.PyApp_swigregister(PyAppPtr) | |
4809 | ||
e811c8ce RD |
4810 | def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs): |
4811 | """PyApp_GetMacSupportPCMenuShortcuts() -> bool""" | |
4812 | return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) | |
d14a1e28 | 4813 | |
e811c8ce RD |
4814 | def PyApp_GetMacAboutMenuItemId(*args, **kwargs): |
4815 | """PyApp_GetMacAboutMenuItemId() -> long""" | |
4816 | return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs) | |
d14a1e28 | 4817 | |
e811c8ce RD |
4818 | def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs): |
4819 | """PyApp_GetMacPreferencesMenuItemId() -> long""" | |
4820 | return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) | |
d14a1e28 | 4821 | |
e811c8ce RD |
4822 | def PyApp_GetMacExitMenuItemId(*args, **kwargs): |
4823 | """PyApp_GetMacExitMenuItemId() -> long""" | |
4824 | return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs) | |
d14a1e28 | 4825 | |
e811c8ce RD |
4826 | def PyApp_GetMacHelpMenuTitleName(*args, **kwargs): |
4827 | """PyApp_GetMacHelpMenuTitleName() -> wxString""" | |
4828 | return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) | |
d14a1e28 | 4829 | |
e811c8ce RD |
4830 | def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs): |
4831 | """PyApp_SetMacSupportPCMenuShortcuts(bool val)""" | |
4832 | return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) | |
d14a1e28 | 4833 | |
e811c8ce RD |
4834 | def PyApp_SetMacAboutMenuItemId(*args, **kwargs): |
4835 | """PyApp_SetMacAboutMenuItemId(long val)""" | |
4836 | return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs) | |
d14a1e28 | 4837 | |
e811c8ce RD |
4838 | def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs): |
4839 | """PyApp_SetMacPreferencesMenuItemId(long val)""" | |
4840 | return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) | |
d14a1e28 | 4841 | |
e811c8ce RD |
4842 | def PyApp_SetMacExitMenuItemId(*args, **kwargs): |
4843 | """PyApp_SetMacExitMenuItemId(long val)""" | |
4844 | return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs) | |
d14a1e28 | 4845 | |
e811c8ce RD |
4846 | def PyApp_SetMacHelpMenuTitleName(*args, **kwargs): |
4847 | """PyApp_SetMacHelpMenuTitleName(wxString val)""" | |
4848 | return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) | |
d14a1e28 | 4849 | |
e811c8ce | 4850 | def PyApp_GetComCtl32Version(*args, **kwargs): |
0df68c9f RD |
4851 | """ |
4852 | PyApp_GetComCtl32Version() -> int | |
6c3b4aae | 4853 | |
0df68c9f RD |
4854 | Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it |
4855 | wasn't found at all. Raises an exception on non-Windows platforms. | |
4856 | """ | |
e811c8ce | 4857 | return _core.PyApp_GetComCtl32Version(*args, **kwargs) |
d14a1e28 RD |
4858 | |
4859 | #--------------------------------------------------------------------------- | |
4860 | ||
4861 | ||
e811c8ce | 4862 | def Exit(*args, **kwargs): |
0df68c9f RD |
4863 | """ |
4864 | Exit() | |
6c3b4aae | 4865 | |
0df68c9f RD |
4866 | Force an exit of the application. Convenience for wx.GetApp().Exit() |
4867 | """ | |
e811c8ce | 4868 | return _core.Exit(*args, **kwargs) |
d14a1e28 | 4869 | |
e811c8ce | 4870 | def Yield(*args, **kwargs): |
0df68c9f RD |
4871 | """ |
4872 | Yield() -> bool | |
6c3b4aae | 4873 | |
0df68c9f RD |
4874 | Yield to other apps/messages. Convenience for wx.GetApp().Yield() |
4875 | """ | |
e811c8ce | 4876 | return _core.Yield(*args, **kwargs) |
d14a1e28 | 4877 | |
e811c8ce | 4878 | def YieldIfNeeded(*args, **kwargs): |
0df68c9f RD |
4879 | """ |
4880 | YieldIfNeeded() -> bool | |
6c3b4aae | 4881 | |
0df68c9f RD |
4882 | Yield to other apps/messages. Convenience for wx.GetApp().Yield(True) |
4883 | """ | |
e811c8ce | 4884 | return _core.YieldIfNeeded(*args, **kwargs) |
d14a1e28 | 4885 | |
e811c8ce | 4886 | def SafeYield(*args, **kwargs): |
0df68c9f RD |
4887 | """ |
4888 | SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool | |
6c3b4aae | 4889 | |
0df68c9f RD |
4890 | This function is similar to wx.Yield, except that it disables the user input |
4891 | to all program windows before calling wx.Yield and re-enables it again | |
4892 | afterwards. If win is not None, this window will remain enabled, allowing the | |
4893 | implementation of some limited user interaction. | |
6c3b4aae | 4894 | |
0df68c9f RD |
4895 | Returns the result of the call to wx.Yield. |
4896 | """ | |
e811c8ce | 4897 | return _core.SafeYield(*args, **kwargs) |
d14a1e28 | 4898 | |
e811c8ce | 4899 | def WakeUpIdle(*args, **kwargs): |
0df68c9f RD |
4900 | """ |
4901 | WakeUpIdle() | |
6c3b4aae | 4902 | |
0df68c9f RD |
4903 | Cause the message queue to become empty again, so idle events will be sent. |
4904 | """ | |
e811c8ce | 4905 | return _core.WakeUpIdle(*args, **kwargs) |
d14a1e28 | 4906 | |
e811c8ce | 4907 | def PostEvent(*args, **kwargs): |
0df68c9f RD |
4908 | """ |
4909 | PostEvent(EvtHandler dest, Event event) | |
6c3b4aae | 4910 | |
0df68c9f RD |
4911 | Send an event to a window or other wx.EvtHandler to be processed later. |
4912 | """ | |
e811c8ce | 4913 | return _core.PostEvent(*args, **kwargs) |
d14a1e28 | 4914 | |
e811c8ce | 4915 | def App_CleanUp(*args, **kwargs): |
0df68c9f RD |
4916 | """ |
4917 | App_CleanUp() | |
6c3b4aae | 4918 | |
0df68c9f RD |
4919 | For internal use only, it is used to cleanup after wxWindows when Python shuts down. |
4920 | """ | |
e811c8ce | 4921 | return _core.App_CleanUp(*args, **kwargs) |
d14a1e28 | 4922 | |
e811c8ce | 4923 | def GetApp(*args, **kwargs): |
0df68c9f RD |
4924 | """ |
4925 | GetApp() -> PyApp | |
6c3b4aae | 4926 | |
0df68c9f RD |
4927 | Return a reference to the current wxApp object. |
4928 | """ | |
e811c8ce | 4929 | return _core.GetApp(*args, **kwargs) |
d14a1e28 RD |
4930 | #---------------------------------------------------------------------- |
4931 | ||
4932 | class PyOnDemandOutputWindow: | |
6c3b4aae RD |
4933 | """ |
4934 | A class that can be used for redirecting Python's stdout and | |
4935 | stderr streams. It will do nothing until something is wrriten to | |
4936 | the stream at which point it will create a Frame with a text area | |
4937 | and write the text there. | |
4938 | """ | |
d14a1e28 RD |
4939 | def __init__(self, title = "wxPython: stdout/stderr"): |
4940 | self.frame = None | |
4941 | self.title = title | |
4942 | self.parent = None | |
4943 | ||
4944 | def SetParent(self, parent): | |
6c3b4aae | 4945 | """Set the window to be used as the popup Frame's parent.""" |
d14a1e28 RD |
4946 | self.parent = parent |
4947 | ||
6c3b4aae RD |
4948 | |
4949 | def CreateOutputWindow(self, st): | |
4950 | self.frame = wx.Frame(self.parent, -1, self.title, | |
4951 | style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE) | |
4952 | self.text = wxTextCtrl(self.frame, -1, "", | |
4953 | style = wx.TE_MULTILINE | wx.TE_READONLY) | |
4954 | self.frame.SetSize((450, 300)) | |
4955 | self.frame.Show(True) | |
4956 | EVT_CLOSE(self.frame, self.OnCloseWindow) | |
4957 | ||
d14a1e28 RD |
4958 | |
4959 | # These methods provide the file-like output behaviour. | |
6c3b4aae RD |
4960 | def write(self, text): |
4961 | """ | |
4962 | Create the output window if needed and write the string to it. | |
4963 | If not called in the context of the gui thread then uses | |
4964 | CallAfter to do the work there. | |
4965 | """ | |
4966 | if self.frame is None: | |
4967 | if not wx.Thread_IsMain(): | |
4968 | wx.CallAfter(self.CreateOutputWindow, text) | |
4969 | else: | |
4970 | self.CreateOutputWindow(text) | |
4971 | else: | |
4972 | if not wx.Thread_IsMain(): | |
4973 | wx.CallAfter(self.text.AppendText, text) | |
4974 | else: | |
4975 | self.text.AppendText(text) | |
4976 | ||
d14a1e28 RD |
4977 | |
4978 | def close(self): | |
6c3b4aae RD |
4979 | if self.frame is not None: |
4980 | wx.CallAfter(self.frame.Close) | |
4981 | ||
d14a1e28 | 4982 | |
6c3b4aae RD |
4983 | def OnCloseWindow(self, event): |
4984 | if self.frame is not None: | |
4985 | self.frame.Destroy() | |
4986 | self.frame = None | |
4987 | self.text = None | |
d14a1e28 RD |
4988 | |
4989 | #---------------------------------------------------------------------- | |
d14a1e28 RD |
4990 | |
4991 | _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__') | |
4992 | ||
4993 | class App(wx.PyApp): | |
6c3b4aae RD |
4994 | """ |
4995 | The main application class. Derive from this and implement an OnInit | |
4996 | method that creates a frame and then calls self.SetTopWindow(frame) | |
4997 | """ | |
d14a1e28 RD |
4998 | outputWindowClass = PyOnDemandOutputWindow |
4999 | ||
5000 | def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False): | |
5001 | wx.PyApp.__init__(self) | |
5002 | ||
5003 | if wx.Platform == "__WXMAC__": | |
5004 | try: | |
5005 | import MacOS | |
5006 | if not MacOS.WMAvailable(): | |
5007 | print """\ | |
5008 | This program needs access to the screen. Please run with 'pythonw', | |
5009 | not 'python', and only when you are logged in on the main display of | |
5010 | your Mac.""" | |
5011 | _sys.exit(1) | |
5012 | except: | |
5013 | pass | |
5014 | ||
5015 | # This has to be done before OnInit | |
5016 | self.SetUseBestVisual(useBestVisual) | |
5017 | ||
5018 | # Set the default handler for SIGINT. This fixes a problem | |
5019 | # where if Ctrl-C is pressed in the console that started this | |
5020 | # app then it will not appear to do anything, (not even send | |
5021 | # KeyboardInterrupt???) but will later segfault on exit. By | |
5022 | # setting the default handler then the app will exit, as | |
5023 | # expected (depending on platform.) | |
5024 | try: | |
5025 | import signal | |
5026 | signal.signal(signal.SIGINT, signal.SIG_DFL) | |
5027 | except: | |
5028 | pass | |
5029 | ||
5030 | # Save and redirect the stdio to a window? | |
5031 | self.stdioWin = None | |
5032 | self.saveStdio = (_sys.stdout, _sys.stderr) | |
5033 | if redirect: | |
5034 | self.RedirectStdio(filename) | |
5035 | ||
5036 | # This finishes the initialization of wxWindows and then calls | |
5037 | # the OnInit that should be present in the derived class | |
5038 | self._BootstrapApp() | |
5039 | ||
5040 | ||
5041 | def __del__(self): | |
5042 | try: | |
5043 | self.RestoreStdio() # Just in case the MainLoop was overridden | |
5044 | except: | |
5045 | pass | |
5046 | ||
5047 | ||
5048 | def SetTopWindow(self, frame): | |
1e0c8722 | 5049 | """Set the \"main\" top level window""" |
d14a1e28 RD |
5050 | if self.stdioWin: |
5051 | self.stdioWin.SetParent(frame) | |
5052 | wx.PyApp.SetTopWindow(self, frame) | |
5053 | ||
5054 | ||
5055 | def MainLoop(self): | |
1e0c8722 | 5056 | """Execute the main GUI event loop""" |
d14a1e28 RD |
5057 | wx.PyApp.MainLoop(self) |
5058 | self.RestoreStdio() | |
5059 | ||
5060 | ||
5061 | def RedirectStdio(self, filename): | |
1e0c8722 | 5062 | """Redirect sys.stdout and sys.stderr to a file or a popup window.""" |
d14a1e28 RD |
5063 | if filename: |
5064 | _sys.stdout = _sys.stderr = open(filename, 'a') | |
5065 | else: | |
5066 | self.stdioWin = self.outputWindowClass() | |
5067 | _sys.stdout = _sys.stderr = self.stdioWin | |
5068 | ||
5069 | ||
5070 | def RestoreStdio(self): | |
5071 | _sys.stdout, _sys.stderr = self.saveStdio | |
5072 | ||
5073 | ||
5074 | ||
5075 | # change from wxPyApp_ to wxApp_ | |
5076 | App_GetMacSupportPCMenuShortcuts = _core.PyApp_GetMacSupportPCMenuShortcuts | |
5077 | App_GetMacAboutMenuItemId = _core.PyApp_GetMacAboutMenuItemId | |
5078 | App_GetMacPreferencesMenuItemId = _core.PyApp_GetMacPreferencesMenuItemId | |
5079 | App_GetMacExitMenuItemId = _core.PyApp_GetMacExitMenuItemId | |
5080 | App_GetMacHelpMenuTitleName = _core.PyApp_GetMacHelpMenuTitleName | |
5081 | App_SetMacSupportPCMenuShortcuts = _core.PyApp_SetMacSupportPCMenuShortcuts | |
5082 | App_SetMacAboutMenuItemId = _core.PyApp_SetMacAboutMenuItemId | |
5083 | App_SetMacPreferencesMenuItemId = _core.PyApp_SetMacPreferencesMenuItemId | |
5084 | App_SetMacExitMenuItemId = _core.PyApp_SetMacExitMenuItemId | |
5085 | App_SetMacHelpMenuTitleName = _core.PyApp_SetMacHelpMenuTitleName | |
5086 | App_GetComCtl32Version = _core.PyApp_GetComCtl32Version | |
5087 | ||
5088 | #---------------------------------------------------------------------------- | |
5089 | ||
5090 | class PySimpleApp(wx.App): | |
6c3b4aae RD |
5091 | """ |
5092 | A simple application class. You can just create one of these and | |
5093 | then then make your top level windows later, and not have to worry | |
5094 | about OnInit.""" | |
5095 | ||
5096 | def __init__(self, redirect=False, filename=None, useBestVisual=False): | |
5097 | wx.App.__init__(self, redirect, filename, useBestVisual) | |
5098 | ||
d14a1e28 RD |
5099 | def OnInit(self): |
5100 | wx.InitAllImageHandlers() | |
5101 | return True | |
5102 | ||
5103 | ||
6c3b4aae | 5104 | # Is anybody using this one? |
d14a1e28 RD |
5105 | class PyWidgetTester(wx.App): |
5106 | def __init__(self, size = (250, 100)): | |
5107 | self.size = size | |
5108 | wx.App.__init__(self, 0) | |
5109 | ||
5110 | def OnInit(self): | |
5111 | self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size) | |
5112 | self.SetTopWindow(self.frame) | |
5113 | return True | |
5114 | ||
5115 | def SetWidget(self, widgetClass, *args): | |
5116 | w = widgetClass(self.frame, *args) | |
5117 | self.frame.Show(True) | |
5118 | ||
5119 | #---------------------------------------------------------------------------- | |
5120 | # DO NOT hold any other references to this object. This is how we | |
5121 | # know when to cleanup system resources that wxWin is holding. When | |
5122 | # the sys module is unloaded, the refcount on sys.__wxPythonCleanup | |
5123 | # goes to zero and it calls the wxApp_CleanUp function. | |
5124 | ||
5125 | class __wxPyCleanup: | |
5126 | def __init__(self): | |
5127 | self.cleanup = _core.App_CleanUp | |
5128 | def __del__(self): | |
5129 | self.cleanup() | |
5130 | ||
5131 | _sys.__wxPythonCleanup = __wxPyCleanup() | |
5132 | ||
5133 | ## # another possible solution, but it gets called too early... | |
5134 | ## if sys.version[0] == '2': | |
5135 | ## import atexit | |
5136 | ## atexit.register(_core.wxApp_CleanUp) | |
5137 | ## else: | |
5138 | ## sys.exitfunc = _core.wxApp_CleanUp | |
5139 | ||
5140 | ||
5141 | #---------------------------------------------------------------------------- | |
5142 | ||
5143 | #--------------------------------------------------------------------------- | |
5144 | ||
1e0c8722 | 5145 | class AcceleratorEntry(object): |
1e0c8722 RD |
5146 | def __repr__(self): |
5147 | return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5148 | def __init__(self, *args, **kwargs): | |
5149 | """__init__(int flags=0, int keyCode=0, int cmd=0, MenuItem item=None) -> AcceleratorEntry""" | |
5150 | newobj = _core.new_AcceleratorEntry(*args, **kwargs) | |
5151 | self.this = newobj.this | |
5152 | self.thisown = 1 | |
5153 | del newobj.thisown | |
5154 | def __del__(self, destroy=_core.delete_AcceleratorEntry): | |
5155 | """__del__()""" | |
5156 | try: | |
5157 | if self.thisown: destroy(self) | |
5158 | except: pass | |
5159 | ||
5160 | def Set(*args, **kwargs): | |
5161 | """Set(int flags, int keyCode, int cmd, MenuItem item=None)""" | |
5162 | return _core.AcceleratorEntry_Set(*args, **kwargs) | |
5163 | ||
5164 | def SetMenuItem(*args, **kwargs): | |
5165 | """SetMenuItem(MenuItem item)""" | |
5166 | return _core.AcceleratorEntry_SetMenuItem(*args, **kwargs) | |
5167 | ||
5168 | def GetMenuItem(*args, **kwargs): | |
5169 | """GetMenuItem() -> MenuItem""" | |
5170 | return _core.AcceleratorEntry_GetMenuItem(*args, **kwargs) | |
5171 | ||
5172 | def GetFlags(*args, **kwargs): | |
5173 | """GetFlags() -> int""" | |
5174 | return _core.AcceleratorEntry_GetFlags(*args, **kwargs) | |
5175 | ||
5176 | def GetKeyCode(*args, **kwargs): | |
5177 | """GetKeyCode() -> int""" | |
5178 | return _core.AcceleratorEntry_GetKeyCode(*args, **kwargs) | |
5179 | ||
5180 | def GetCommand(*args, **kwargs): | |
5181 | """GetCommand() -> int""" | |
5182 | return _core.AcceleratorEntry_GetCommand(*args, **kwargs) | |
5183 | ||
5184 | ||
5185 | class AcceleratorEntryPtr(AcceleratorEntry): | |
5186 | def __init__(self, this): | |
5187 | self.this = this | |
5188 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5189 | self.__class__ = AcceleratorEntry | |
5190 | _core.AcceleratorEntry_swigregister(AcceleratorEntryPtr) | |
5191 | ||
5192 | class AcceleratorTable(Object): | |
1e0c8722 RD |
5193 | def __repr__(self): |
5194 | return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5195 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
5196 | """ |
5197 | __init__(entries) -> AcceleratorTable | |
1e0c8722 | 5198 | |
0df68c9f RD |
5199 | Construct an AcceleratorTable from a list of AcceleratorEntry items or |
5200 | 3-tuples (flags, keyCode, cmdID) | |
5201 | """ | |
1e0c8722 RD |
5202 | newobj = _core.new_AcceleratorTable(*args, **kwargs) |
5203 | self.this = newobj.this | |
5204 | self.thisown = 1 | |
5205 | del newobj.thisown | |
5206 | def __del__(self, destroy=_core.delete_AcceleratorTable): | |
5207 | """__del__()""" | |
5208 | try: | |
5209 | if self.thisown: destroy(self) | |
5210 | except: pass | |
5211 | ||
5212 | def Ok(*args, **kwargs): | |
5213 | """Ok() -> bool""" | |
5214 | return _core.AcceleratorTable_Ok(*args, **kwargs) | |
5215 | ||
5216 | ||
5217 | class AcceleratorTablePtr(AcceleratorTable): | |
5218 | def __init__(self, this): | |
5219 | self.this = this | |
5220 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5221 | self.__class__ = AcceleratorTable | |
5222 | _core.AcceleratorTable_swigregister(AcceleratorTablePtr) | |
5223 | ||
5224 | ||
5225 | def GetAccelFromString(*args, **kwargs): | |
5226 | """GetAccelFromString(wxString label) -> AcceleratorEntry""" | |
5227 | return _core.GetAccelFromString(*args, **kwargs) | |
5228 | #--------------------------------------------------------------------------- | |
5229 | ||
d14a1e28 | 5230 | class Window(EvtHandler): |
e811c8ce RD |
5231 | def __repr__(self): |
5232 | return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5233 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
5234 | """ |
5235 | __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
5236 | long style=0, wxString name=PanelNameStr) -> Window | |
5237 | """ | |
d14a1e28 RD |
5238 | newobj = _core.new_Window(*args, **kwargs) |
5239 | self.this = newobj.this | |
5240 | self.thisown = 1 | |
5241 | del newobj.thisown | |
5242 | self._setOORInfo(self) | |
d14a1e28 | 5243 | |
e811c8ce | 5244 | def Create(*args, **kwargs): |
0df68c9f RD |
5245 | """ |
5246 | Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
5247 | long style=0, wxString name=PanelNameStr) -> bool | |
5248 | """ | |
e811c8ce | 5249 | return _core.Window_Create(*args, **kwargs) |
d14a1e28 | 5250 | |
e811c8ce RD |
5251 | def Close(*args, **kwargs): |
5252 | """Close(bool force=False) -> bool""" | |
5253 | return _core.Window_Close(*args, **kwargs) | |
d14a1e28 | 5254 | |
e811c8ce | 5255 | def Destroy(*args, **kwargs): |
0df68c9f RD |
5256 | """ |
5257 | Destroy() -> bool | |
d14a1e28 | 5258 | |
0df68c9f RD |
5259 | Deletes the C++ object this Python object is a proxy for. |
5260 | """ | |
e811c8ce | 5261 | return _core.Window_Destroy(*args, **kwargs) |
d14a1e28 | 5262 | |
e811c8ce RD |
5263 | def DestroyChildren(*args, **kwargs): |
5264 | """DestroyChildren() -> bool""" | |
5265 | return _core.Window_DestroyChildren(*args, **kwargs) | |
d14a1e28 | 5266 | |
e811c8ce RD |
5267 | def IsBeingDeleted(*args, **kwargs): |
5268 | """IsBeingDeleted() -> bool""" | |
5269 | return _core.Window_IsBeingDeleted(*args, **kwargs) | |
d14a1e28 | 5270 | |
e811c8ce RD |
5271 | def SetTitle(*args, **kwargs): |
5272 | """SetTitle(wxString title)""" | |
5273 | return _core.Window_SetTitle(*args, **kwargs) | |
d14a1e28 | 5274 | |
e811c8ce RD |
5275 | def GetTitle(*args, **kwargs): |
5276 | """GetTitle() -> wxString""" | |
5277 | return _core.Window_GetTitle(*args, **kwargs) | |
d14a1e28 | 5278 | |
e811c8ce RD |
5279 | def SetLabel(*args, **kwargs): |
5280 | """SetLabel(wxString label)""" | |
5281 | return _core.Window_SetLabel(*args, **kwargs) | |
d14a1e28 | 5282 | |
e811c8ce RD |
5283 | def GetLabel(*args, **kwargs): |
5284 | """GetLabel() -> wxString""" | |
5285 | return _core.Window_GetLabel(*args, **kwargs) | |
d14a1e28 | 5286 | |
e811c8ce RD |
5287 | def SetName(*args, **kwargs): |
5288 | """SetName(wxString name)""" | |
5289 | return _core.Window_SetName(*args, **kwargs) | |
d14a1e28 | 5290 | |
e811c8ce RD |
5291 | def GetName(*args, **kwargs): |
5292 | """GetName() -> wxString""" | |
5293 | return _core.Window_GetName(*args, **kwargs) | |
d14a1e28 | 5294 | |
e811c8ce RD |
5295 | def SetId(*args, **kwargs): |
5296 | """SetId(int winid)""" | |
5297 | return _core.Window_SetId(*args, **kwargs) | |
d14a1e28 | 5298 | |
e811c8ce RD |
5299 | def GetId(*args, **kwargs): |
5300 | """GetId() -> int""" | |
5301 | return _core.Window_GetId(*args, **kwargs) | |
d14a1e28 | 5302 | |
e811c8ce RD |
5303 | def NewControlId(*args, **kwargs): |
5304 | """Window.NewControlId() -> int""" | |
5305 | return _core.Window_NewControlId(*args, **kwargs) | |
d14a1e28 | 5306 | |
e811c8ce RD |
5307 | NewControlId = staticmethod(NewControlId) |
5308 | def NextControlId(*args, **kwargs): | |
5309 | """Window.NextControlId(int winid) -> int""" | |
5310 | return _core.Window_NextControlId(*args, **kwargs) | |
d14a1e28 | 5311 | |
e811c8ce RD |
5312 | NextControlId = staticmethod(NextControlId) |
5313 | def PrevControlId(*args, **kwargs): | |
5314 | """Window.PrevControlId(int winid) -> int""" | |
5315 | return _core.Window_PrevControlId(*args, **kwargs) | |
d14a1e28 | 5316 | |
e811c8ce RD |
5317 | PrevControlId = staticmethod(PrevControlId) |
5318 | def SetSize(*args, **kwargs): | |
5319 | """SetSize(Size size)""" | |
5320 | return _core.Window_SetSize(*args, **kwargs) | |
d14a1e28 | 5321 | |
e811c8ce RD |
5322 | def SetDimensions(*args, **kwargs): |
5323 | """SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)""" | |
5324 | return _core.Window_SetDimensions(*args, **kwargs) | |
d14a1e28 | 5325 | |
e811c8ce RD |
5326 | def SetRect(*args, **kwargs): |
5327 | """SetRect(Rect rect, int sizeFlags=SIZE_AUTO)""" | |
5328 | return _core.Window_SetRect(*args, **kwargs) | |
d14a1e28 | 5329 | |
e811c8ce RD |
5330 | def SetSizeWH(*args, **kwargs): |
5331 | """SetSizeWH(int width, int height)""" | |
5332 | return _core.Window_SetSizeWH(*args, **kwargs) | |
d14a1e28 | 5333 | |
e811c8ce RD |
5334 | def Move(*args, **kwargs): |
5335 | """Move(Point pt, int flags=SIZE_USE_EXISTING)""" | |
5336 | return _core.Window_Move(*args, **kwargs) | |
d14a1e28 | 5337 | |
e811c8ce RD |
5338 | SetPosition = Move |
5339 | def MoveXY(*args, **kwargs): | |
5340 | """MoveXY(int x, int y, int flags=SIZE_USE_EXISTING)""" | |
5341 | return _core.Window_MoveXY(*args, **kwargs) | |
5342 | ||
5343 | def Raise(*args, **kwargs): | |
5344 | """Raise()""" | |
5345 | return _core.Window_Raise(*args, **kwargs) | |
5346 | ||
5347 | def Lower(*args, **kwargs): | |
5348 | """Lower()""" | |
5349 | return _core.Window_Lower(*args, **kwargs) | |
5350 | ||
5351 | def SetClientSize(*args, **kwargs): | |
5352 | """SetClientSize(Size size)""" | |
5353 | return _core.Window_SetClientSize(*args, **kwargs) | |
5354 | ||
5355 | def SetClientSizeWH(*args, **kwargs): | |
5356 | """SetClientSizeWH(int width, int height)""" | |
5357 | return _core.Window_SetClientSizeWH(*args, **kwargs) | |
5358 | ||
5359 | def SetClientRect(*args, **kwargs): | |
5360 | """SetClientRect(Rect rect)""" | |
5361 | return _core.Window_SetClientRect(*args, **kwargs) | |
5362 | ||
5363 | def GetPosition(*args, **kwargs): | |
0df68c9f RD |
5364 | """ |
5365 | GetPosition() -> Point | |
e811c8ce | 5366 | |
0df68c9f RD |
5367 | Get the window's position. |
5368 | """ | |
e811c8ce RD |
5369 | return _core.Window_GetPosition(*args, **kwargs) |
5370 | ||
5371 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
5372 | """ |
5373 | GetPositionTuple() -> (x,y) | |
e811c8ce | 5374 | |
0df68c9f RD |
5375 | Get the window's position. |
5376 | """ | |
e811c8ce RD |
5377 | return _core.Window_GetPositionTuple(*args, **kwargs) |
5378 | ||
5379 | def GetSize(*args, **kwargs): | |
0df68c9f RD |
5380 | """ |
5381 | GetSize() -> Size | |
e811c8ce | 5382 | |
0df68c9f RD |
5383 | Get the window size. |
5384 | """ | |
e811c8ce RD |
5385 | return _core.Window_GetSize(*args, **kwargs) |
5386 | ||
5387 | def GetSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5388 | """ |
5389 | GetSizeTuple() -> (width, height) | |
e811c8ce | 5390 | |
0df68c9f RD |
5391 | Get the window size. |
5392 | """ | |
e811c8ce RD |
5393 | return _core.Window_GetSizeTuple(*args, **kwargs) |
5394 | ||
5395 | def GetRect(*args, **kwargs): | |
5396 | """GetRect() -> Rect""" | |
5397 | return _core.Window_GetRect(*args, **kwargs) | |
5398 | ||
5399 | def GetClientSize(*args, **kwargs): | |
0df68c9f RD |
5400 | """ |
5401 | GetClientSize() -> Size | |
e811c8ce | 5402 | |
0df68c9f RD |
5403 | Get the window's client size. |
5404 | """ | |
e811c8ce RD |
5405 | return _core.Window_GetClientSize(*args, **kwargs) |
5406 | ||
5407 | def GetClientSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5408 | """ |
5409 | GetClientSizeTuple() -> (width, height) | |
e811c8ce | 5410 | |
0df68c9f RD |
5411 | Get the window's client size. |
5412 | """ | |
e811c8ce RD |
5413 | return _core.Window_GetClientSizeTuple(*args, **kwargs) |
5414 | ||
5415 | def GetClientAreaOrigin(*args, **kwargs): | |
5416 | """GetClientAreaOrigin() -> Point""" | |
5417 | return _core.Window_GetClientAreaOrigin(*args, **kwargs) | |
5418 | ||
5419 | def GetClientRect(*args, **kwargs): | |
5420 | """GetClientRect() -> Rect""" | |
5421 | return _core.Window_GetClientRect(*args, **kwargs) | |
5422 | ||
5423 | def GetBestSize(*args, **kwargs): | |
0df68c9f RD |
5424 | """ |
5425 | GetBestSize() -> Size | |
e811c8ce | 5426 | |
0df68c9f RD |
5427 | Get the size best suited for the window (in fact, minimal acceptable size |
5428 | using which it will still look "nice") | |
5429 | """ | |
e811c8ce RD |
5430 | return _core.Window_GetBestSize(*args, **kwargs) |
5431 | ||
5432 | def GetBestSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5433 | """ |
5434 | GetBestSizeTuple() -> (width, height) | |
e811c8ce | 5435 | |
0df68c9f RD |
5436 | Get the size best suited for the window (in fact, minimal acceptable size |
5437 | using which it will still look "nice") | |
5438 | """ | |
e811c8ce RD |
5439 | return _core.Window_GetBestSizeTuple(*args, **kwargs) |
5440 | ||
5441 | def GetAdjustedBestSize(*args, **kwargs): | |
5442 | """GetAdjustedBestSize() -> Size""" | |
5443 | return _core.Window_GetAdjustedBestSize(*args, **kwargs) | |
5444 | ||
5445 | def Center(*args, **kwargs): | |
5446 | """Center(int direction=BOTH)""" | |
5447 | return _core.Window_Center(*args, **kwargs) | |
5448 | ||
5449 | Centre = Center | |
5450 | def CenterOnScreen(*args, **kwargs): | |
5451 | """CenterOnScreen(int dir=BOTH)""" | |
5452 | return _core.Window_CenterOnScreen(*args, **kwargs) | |
5453 | ||
5454 | CentreOnScreen = CenterOnScreen | |
5455 | def CenterOnParent(*args, **kwargs): | |
5456 | """CenterOnParent(int dir=BOTH)""" | |
5457 | return _core.Window_CenterOnParent(*args, **kwargs) | |
5458 | ||
5459 | CentreOnParent = CenterOnParent | |
5460 | def Fit(*args, **kwargs): | |
5461 | """Fit()""" | |
5462 | return _core.Window_Fit(*args, **kwargs) | |
5463 | ||
5464 | def FitInside(*args, **kwargs): | |
5465 | """FitInside()""" | |
5466 | return _core.Window_FitInside(*args, **kwargs) | |
5467 | ||
5468 | def SetSizeHints(*args, **kwargs): | |
0df68c9f RD |
5469 | """ |
5470 | SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, | |
5471 | int incH=-1) | |
5472 | """ | |
e811c8ce RD |
5473 | return _core.Window_SetSizeHints(*args, **kwargs) |
5474 | ||
5475 | def SetVirtualSizeHints(*args, **kwargs): | |
5476 | """SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1)""" | |
5477 | return _core.Window_SetVirtualSizeHints(*args, **kwargs) | |
5478 | ||
5479 | def GetMinWidth(*args, **kwargs): | |
5480 | """GetMinWidth() -> int""" | |
5481 | return _core.Window_GetMinWidth(*args, **kwargs) | |
5482 | ||
5483 | def GetMinHeight(*args, **kwargs): | |
5484 | """GetMinHeight() -> int""" | |
5485 | return _core.Window_GetMinHeight(*args, **kwargs) | |
5486 | ||
5487 | def GetMaxWidth(*args, **kwargs): | |
5488 | """GetMaxWidth() -> int""" | |
5489 | return _core.Window_GetMaxWidth(*args, **kwargs) | |
5490 | ||
5491 | def GetMaxHeight(*args, **kwargs): | |
5492 | """GetMaxHeight() -> int""" | |
5493 | return _core.Window_GetMaxHeight(*args, **kwargs) | |
5494 | ||
5495 | def GetMaxSize(*args, **kwargs): | |
5496 | """GetMaxSize() -> Size""" | |
5497 | return _core.Window_GetMaxSize(*args, **kwargs) | |
5498 | ||
5499 | def SetVirtualSize(*args, **kwargs): | |
0df68c9f RD |
5500 | """ |
5501 | SetVirtualSize(Size size) | |
e811c8ce | 5502 | |
0df68c9f RD |
5503 | Set the the virtual size of a window. For most windows this is just the |
5504 | client area of the window, but for some like scrolled windows it is more or | |
5505 | less independent of the screen window size. | |
5506 | """ | |
e811c8ce RD |
5507 | return _core.Window_SetVirtualSize(*args, **kwargs) |
5508 | ||
5509 | def SetVirtualSizeWH(*args, **kwargs): | |
0df68c9f RD |
5510 | """ |
5511 | SetVirtualSizeWH(int w, int h) | |
e811c8ce | 5512 | |
0df68c9f RD |
5513 | Set the the virtual size of a window. For most windows this is just the |
5514 | client area of the window, but for some like scrolled windows it is more or | |
5515 | less independent of the screen window size. | |
5516 | """ | |
e811c8ce RD |
5517 | return _core.Window_SetVirtualSizeWH(*args, **kwargs) |
5518 | ||
5519 | def GetVirtualSize(*args, **kwargs): | |
0df68c9f RD |
5520 | """ |
5521 | GetVirtualSize() -> Size | |
e811c8ce | 5522 | |
0df68c9f RD |
5523 | Get the the virtual size of the window. For most windows this is just |
5524 | the client area of the window, but for some like scrolled windows it is | |
5525 | more or less independent of the screen window size. | |
5526 | """ | |
e811c8ce RD |
5527 | return _core.Window_GetVirtualSize(*args, **kwargs) |
5528 | ||
5529 | def GetVirtualSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5530 | """ |
5531 | GetVirtualSizeTuple() -> (width, height) | |
e811c8ce | 5532 | |
0df68c9f RD |
5533 | Get the the virtual size of the window. For most windows this is just |
5534 | the client area of the window, but for some like scrolled windows it is | |
5535 | more or less independent of the screen window size. | |
5536 | """ | |
e811c8ce RD |
5537 | return _core.Window_GetVirtualSizeTuple(*args, **kwargs) |
5538 | ||
5539 | def GetBestVirtualSize(*args, **kwargs): | |
5540 | """GetBestVirtualSize() -> Size""" | |
5541 | return _core.Window_GetBestVirtualSize(*args, **kwargs) | |
5542 | ||
5543 | def Show(*args, **kwargs): | |
5544 | """Show(bool show=True) -> bool""" | |
5545 | return _core.Window_Show(*args, **kwargs) | |
5546 | ||
5547 | def Hide(*args, **kwargs): | |
5548 | """Hide() -> bool""" | |
5549 | return _core.Window_Hide(*args, **kwargs) | |
5550 | ||
5551 | def Enable(*args, **kwargs): | |
5552 | """Enable(bool enable=True) -> bool""" | |
5553 | return _core.Window_Enable(*args, **kwargs) | |
5554 | ||
5555 | def Disable(*args, **kwargs): | |
5556 | """Disable() -> bool""" | |
5557 | return _core.Window_Disable(*args, **kwargs) | |
5558 | ||
5559 | def IsShown(*args, **kwargs): | |
5560 | """IsShown() -> bool""" | |
5561 | return _core.Window_IsShown(*args, **kwargs) | |
5562 | ||
5563 | def IsEnabled(*args, **kwargs): | |
5564 | """IsEnabled() -> bool""" | |
5565 | return _core.Window_IsEnabled(*args, **kwargs) | |
5566 | ||
5567 | def SetWindowStyleFlag(*args, **kwargs): | |
5568 | """SetWindowStyleFlag(long style)""" | |
5569 | return _core.Window_SetWindowStyleFlag(*args, **kwargs) | |
5570 | ||
5571 | def GetWindowStyleFlag(*args, **kwargs): | |
5572 | """GetWindowStyleFlag() -> long""" | |
5573 | return _core.Window_GetWindowStyleFlag(*args, **kwargs) | |
5574 | ||
5575 | def SetWindowStyle(*args, **kwargs): | |
5576 | """SetWindowStyle(long style)""" | |
5577 | return _core.Window_SetWindowStyle(*args, **kwargs) | |
5578 | ||
5579 | def GetWindowStyle(*args, **kwargs): | |
5580 | """GetWindowStyle() -> long""" | |
5581 | return _core.Window_GetWindowStyle(*args, **kwargs) | |
5582 | ||
5583 | def HasFlag(*args, **kwargs): | |
5584 | """HasFlag(int flag) -> bool""" | |
5585 | return _core.Window_HasFlag(*args, **kwargs) | |
5586 | ||
5587 | def IsRetained(*args, **kwargs): | |
5588 | """IsRetained() -> bool""" | |
5589 | return _core.Window_IsRetained(*args, **kwargs) | |
5590 | ||
5591 | def SetExtraStyle(*args, **kwargs): | |
5592 | """SetExtraStyle(long exStyle)""" | |
5593 | return _core.Window_SetExtraStyle(*args, **kwargs) | |
5594 | ||
5595 | def GetExtraStyle(*args, **kwargs): | |
5596 | """GetExtraStyle() -> long""" | |
5597 | return _core.Window_GetExtraStyle(*args, **kwargs) | |
5598 | ||
5599 | def MakeModal(*args, **kwargs): | |
5600 | """MakeModal(bool modal=True)""" | |
5601 | return _core.Window_MakeModal(*args, **kwargs) | |
5602 | ||
5603 | def SetThemeEnabled(*args, **kwargs): | |
5604 | """SetThemeEnabled(bool enableTheme)""" | |
5605 | return _core.Window_SetThemeEnabled(*args, **kwargs) | |
5606 | ||
5607 | def GetThemeEnabled(*args, **kwargs): | |
5608 | """GetThemeEnabled() -> bool""" | |
5609 | return _core.Window_GetThemeEnabled(*args, **kwargs) | |
5610 | ||
5611 | def ShouldInheritColours(*args, **kwargs): | |
5612 | """ShouldInheritColours() -> bool""" | |
5613 | return _core.Window_ShouldInheritColours(*args, **kwargs) | |
5614 | ||
5615 | def SetFocus(*args, **kwargs): | |
5616 | """SetFocus()""" | |
5617 | return _core.Window_SetFocus(*args, **kwargs) | |
5618 | ||
5619 | def SetFocusFromKbd(*args, **kwargs): | |
5620 | """SetFocusFromKbd()""" | |
5621 | return _core.Window_SetFocusFromKbd(*args, **kwargs) | |
5622 | ||
5623 | def FindFocus(*args, **kwargs): | |
5624 | """Window.FindFocus() -> Window""" | |
5625 | return _core.Window_FindFocus(*args, **kwargs) | |
5626 | ||
5627 | FindFocus = staticmethod(FindFocus) | |
5628 | def AcceptsFocus(*args, **kwargs): | |
5629 | """AcceptsFocus() -> bool""" | |
5630 | return _core.Window_AcceptsFocus(*args, **kwargs) | |
5631 | ||
5632 | def AcceptsFocusFromKeyboard(*args, **kwargs): | |
5633 | """AcceptsFocusFromKeyboard() -> bool""" | |
5634 | return _core.Window_AcceptsFocusFromKeyboard(*args, **kwargs) | |
5635 | ||
5636 | def GetDefaultItem(*args, **kwargs): | |
5637 | """GetDefaultItem() -> Window""" | |
5638 | return _core.Window_GetDefaultItem(*args, **kwargs) | |
5639 | ||
5640 | def SetDefaultItem(*args, **kwargs): | |
5641 | """SetDefaultItem(Window child) -> Window""" | |
5642 | return _core.Window_SetDefaultItem(*args, **kwargs) | |
5643 | ||
5644 | def SetTmpDefaultItem(*args, **kwargs): | |
5645 | """SetTmpDefaultItem(Window win)""" | |
5646 | return _core.Window_SetTmpDefaultItem(*args, **kwargs) | |
5647 | ||
5648 | def GetChildren(*args, **kwargs): | |
5649 | """GetChildren() -> PyObject""" | |
5650 | return _core.Window_GetChildren(*args, **kwargs) | |
5651 | ||
5652 | def GetParent(*args, **kwargs): | |
5653 | """GetParent() -> Window""" | |
5654 | return _core.Window_GetParent(*args, **kwargs) | |
5655 | ||
5656 | def GetGrandParent(*args, **kwargs): | |
5657 | """GetGrandParent() -> Window""" | |
5658 | return _core.Window_GetGrandParent(*args, **kwargs) | |
5659 | ||
5660 | def IsTopLevel(*args, **kwargs): | |
5661 | """IsTopLevel() -> bool""" | |
5662 | return _core.Window_IsTopLevel(*args, **kwargs) | |
5663 | ||
5664 | def Reparent(*args, **kwargs): | |
5665 | """Reparent(Window newParent) -> bool""" | |
5666 | return _core.Window_Reparent(*args, **kwargs) | |
5667 | ||
5668 | def AddChild(*args, **kwargs): | |
5669 | """AddChild(Window child)""" | |
5670 | return _core.Window_AddChild(*args, **kwargs) | |
5671 | ||
5672 | def RemoveChild(*args, **kwargs): | |
5673 | """RemoveChild(Window child)""" | |
5674 | return _core.Window_RemoveChild(*args, **kwargs) | |
5675 | ||
5676 | def FindWindowById(*args, **kwargs): | |
5677 | """FindWindowById(long winid) -> Window""" | |
5678 | return _core.Window_FindWindowById(*args, **kwargs) | |
5679 | ||
5680 | def FindWindowByName(*args, **kwargs): | |
5681 | """FindWindowByName(wxString name) -> Window""" | |
5682 | return _core.Window_FindWindowByName(*args, **kwargs) | |
5683 | ||
5684 | def GetEventHandler(*args, **kwargs): | |
5685 | """GetEventHandler() -> EvtHandler""" | |
5686 | return _core.Window_GetEventHandler(*args, **kwargs) | |
5687 | ||
5688 | def SetEventHandler(*args, **kwargs): | |
5689 | """SetEventHandler(EvtHandler handler)""" | |
5690 | return _core.Window_SetEventHandler(*args, **kwargs) | |
5691 | ||
5692 | def PushEventHandler(*args, **kwargs): | |
5693 | """PushEventHandler(EvtHandler handler)""" | |
5694 | return _core.Window_PushEventHandler(*args, **kwargs) | |
5695 | ||
5696 | def PopEventHandler(*args, **kwargs): | |
5697 | """PopEventHandler(bool deleteHandler=False) -> EvtHandler""" | |
5698 | return _core.Window_PopEventHandler(*args, **kwargs) | |
5699 | ||
5700 | def RemoveEventHandler(*args, **kwargs): | |
5701 | """RemoveEventHandler(EvtHandler handler) -> bool""" | |
5702 | return _core.Window_RemoveEventHandler(*args, **kwargs) | |
5703 | ||
5704 | def SetValidator(*args, **kwargs): | |
5705 | """SetValidator(Validator validator)""" | |
5706 | return _core.Window_SetValidator(*args, **kwargs) | |
5707 | ||
5708 | def GetValidator(*args, **kwargs): | |
5709 | """GetValidator() -> Validator""" | |
5710 | return _core.Window_GetValidator(*args, **kwargs) | |
5711 | ||
5712 | def SetAcceleratorTable(*args, **kwargs): | |
1e0c8722 | 5713 | """SetAcceleratorTable(AcceleratorTable accel)""" |
e811c8ce RD |
5714 | return _core.Window_SetAcceleratorTable(*args, **kwargs) |
5715 | ||
5716 | def GetAcceleratorTable(*args, **kwargs): | |
1e0c8722 | 5717 | """GetAcceleratorTable() -> AcceleratorTable""" |
e811c8ce RD |
5718 | return _core.Window_GetAcceleratorTable(*args, **kwargs) |
5719 | ||
5720 | def RegisterHotKey(*args, **kwargs): | |
5721 | """RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool""" | |
5722 | return _core.Window_RegisterHotKey(*args, **kwargs) | |
5723 | ||
5724 | def UnregisterHotKey(*args, **kwargs): | |
5725 | """UnregisterHotKey(int hotkeyId) -> bool""" | |
5726 | return _core.Window_UnregisterHotKey(*args, **kwargs) | |
5727 | ||
5728 | def ConvertDialogPointToPixels(*args, **kwargs): | |
5729 | """ConvertDialogPointToPixels(Point pt) -> Point""" | |
5730 | return _core.Window_ConvertDialogPointToPixels(*args, **kwargs) | |
5731 | ||
5732 | def ConvertDialogSizeToPixels(*args, **kwargs): | |
5733 | """ConvertDialogSizeToPixels(Size sz) -> Size""" | |
5734 | return _core.Window_ConvertDialogSizeToPixels(*args, **kwargs) | |
5735 | ||
5736 | def DLG_PNT(*args, **kwargs): | |
5737 | """DLG_PNT(Point pt) -> Point""" | |
5738 | return _core.Window_DLG_PNT(*args, **kwargs) | |
5739 | ||
5740 | def DLG_SZE(*args, **kwargs): | |
5741 | """DLG_SZE(Size sz) -> Size""" | |
5742 | return _core.Window_DLG_SZE(*args, **kwargs) | |
5743 | ||
5744 | def ConvertPixelPointToDialog(*args, **kwargs): | |
5745 | """ConvertPixelPointToDialog(Point pt) -> Point""" | |
5746 | return _core.Window_ConvertPixelPointToDialog(*args, **kwargs) | |
5747 | ||
5748 | def ConvertPixelSizeToDialog(*args, **kwargs): | |
5749 | """ConvertPixelSizeToDialog(Size sz) -> Size""" | |
5750 | return _core.Window_ConvertPixelSizeToDialog(*args, **kwargs) | |
5751 | ||
5752 | def WarpPointer(*args, **kwargs): | |
5753 | """WarpPointer(int x, int y)""" | |
5754 | return _core.Window_WarpPointer(*args, **kwargs) | |
5755 | ||
5756 | def CaptureMouse(*args, **kwargs): | |
5757 | """CaptureMouse()""" | |
5758 | return _core.Window_CaptureMouse(*args, **kwargs) | |
5759 | ||
5760 | def ReleaseMouse(*args, **kwargs): | |
5761 | """ReleaseMouse()""" | |
5762 | return _core.Window_ReleaseMouse(*args, **kwargs) | |
5763 | ||
5764 | def GetCapture(*args, **kwargs): | |
5765 | """Window.GetCapture() -> Window""" | |
5766 | return _core.Window_GetCapture(*args, **kwargs) | |
5767 | ||
5768 | GetCapture = staticmethod(GetCapture) | |
5769 | def HasCapture(*args, **kwargs): | |
5770 | """HasCapture() -> bool""" | |
5771 | return _core.Window_HasCapture(*args, **kwargs) | |
5772 | ||
5773 | def Refresh(*args, **kwargs): | |
5774 | """Refresh(bool eraseBackground=True, Rect rect=None)""" | |
5775 | return _core.Window_Refresh(*args, **kwargs) | |
5776 | ||
5777 | def RefreshRect(*args, **kwargs): | |
5778 | """RefreshRect(Rect rect)""" | |
5779 | return _core.Window_RefreshRect(*args, **kwargs) | |
5780 | ||
5781 | def Update(*args, **kwargs): | |
5782 | """Update()""" | |
5783 | return _core.Window_Update(*args, **kwargs) | |
5784 | ||
5785 | def ClearBackground(*args, **kwargs): | |
5786 | """ClearBackground()""" | |
5787 | return _core.Window_ClearBackground(*args, **kwargs) | |
5788 | ||
5789 | def Freeze(*args, **kwargs): | |
5790 | """Freeze()""" | |
5791 | return _core.Window_Freeze(*args, **kwargs) | |
5792 | ||
5793 | def Thaw(*args, **kwargs): | |
5794 | """Thaw()""" | |
5795 | return _core.Window_Thaw(*args, **kwargs) | |
5796 | ||
5797 | def PrepareDC(*args, **kwargs): | |
5798 | """PrepareDC(wxDC dc)""" | |
5799 | return _core.Window_PrepareDC(*args, **kwargs) | |
5800 | ||
5801 | def GetUpdateRegion(*args, **kwargs): | |
5802 | """GetUpdateRegion() -> wxRegion""" | |
5803 | return _core.Window_GetUpdateRegion(*args, **kwargs) | |
5804 | ||
5805 | def GetUpdateClientRect(*args, **kwargs): | |
5806 | """GetUpdateClientRect() -> Rect""" | |
5807 | return _core.Window_GetUpdateClientRect(*args, **kwargs) | |
5808 | ||
5809 | def IsExposed(*args, **kwargs): | |
5810 | """IsExposed(int x, int y, int w=1, int h=1) -> bool""" | |
5811 | return _core.Window_IsExposed(*args, **kwargs) | |
5812 | ||
5813 | def IsExposedPoint(*args, **kwargs): | |
5814 | """IsExposedPoint(Point pt) -> bool""" | |
5815 | return _core.Window_IsExposedPoint(*args, **kwargs) | |
5816 | ||
5817 | def isExposedRect(*args, **kwargs): | |
5818 | """isExposedRect(Rect rect) -> bool""" | |
5819 | return _core.Window_isExposedRect(*args, **kwargs) | |
5820 | ||
5821 | def SetBackgroundColour(*args, **kwargs): | |
5822 | """SetBackgroundColour(wxColour colour) -> bool""" | |
5823 | return _core.Window_SetBackgroundColour(*args, **kwargs) | |
5824 | ||
5825 | def SetForegroundColour(*args, **kwargs): | |
5826 | """SetForegroundColour(wxColour colour) -> bool""" | |
5827 | return _core.Window_SetForegroundColour(*args, **kwargs) | |
5828 | ||
5829 | def GetBackgroundColour(*args, **kwargs): | |
5830 | """GetBackgroundColour() -> wxColour""" | |
5831 | return _core.Window_GetBackgroundColour(*args, **kwargs) | |
5832 | ||
5833 | def GetForegroundColour(*args, **kwargs): | |
5834 | """GetForegroundColour() -> wxColour""" | |
5835 | return _core.Window_GetForegroundColour(*args, **kwargs) | |
5836 | ||
5837 | def SetCursor(*args, **kwargs): | |
5838 | """SetCursor(wxCursor cursor) -> bool""" | |
5839 | return _core.Window_SetCursor(*args, **kwargs) | |
5840 | ||
5841 | def GetCursor(*args, **kwargs): | |
5842 | """GetCursor() -> wxCursor""" | |
5843 | return _core.Window_GetCursor(*args, **kwargs) | |
5844 | ||
5845 | def SetFont(*args, **kwargs): | |
5846 | """SetFont(wxFont font) -> bool""" | |
5847 | return _core.Window_SetFont(*args, **kwargs) | |
5848 | ||
5849 | def GetFont(*args, **kwargs): | |
5850 | """GetFont() -> wxFont""" | |
5851 | return _core.Window_GetFont(*args, **kwargs) | |
5852 | ||
5853 | def SetCaret(*args, **kwargs): | |
5854 | """SetCaret(wxCaret caret)""" | |
5855 | return _core.Window_SetCaret(*args, **kwargs) | |
5856 | ||
5857 | def GetCaret(*args, **kwargs): | |
5858 | """GetCaret() -> wxCaret""" | |
5859 | return _core.Window_GetCaret(*args, **kwargs) | |
5860 | ||
5861 | def GetCharHeight(*args, **kwargs): | |
5862 | """GetCharHeight() -> int""" | |
5863 | return _core.Window_GetCharHeight(*args, **kwargs) | |
5864 | ||
5865 | def GetCharWidth(*args, **kwargs): | |
5866 | """GetCharWidth() -> int""" | |
5867 | return _core.Window_GetCharWidth(*args, **kwargs) | |
5868 | ||
5869 | def GetTextExtent(*args, **kwargs): | |
0df68c9f RD |
5870 | """ |
5871 | GetTextExtent(wxString string) -> (width, height) | |
e811c8ce | 5872 | |
0df68c9f RD |
5873 | Get the width and height of the text using the current font. |
5874 | """ | |
e811c8ce RD |
5875 | return _core.Window_GetTextExtent(*args, **kwargs) |
5876 | ||
5877 | def GetFullTextExtent(*args, **kwargs): | |
0df68c9f RD |
5878 | """ |
5879 | GetFullTextExtent(wxString string, Font font=None) -> | |
5880 | (width, height, descent, externalLeading) | |
e811c8ce | 5881 | |
0df68c9f RD |
5882 | Get the width, height, decent and leading of the text using the current or specified font. |
5883 | """ | |
e811c8ce RD |
5884 | return _core.Window_GetFullTextExtent(*args, **kwargs) |
5885 | ||
5886 | def ClientToScreenXY(*args, **kwargs): | |
5887 | """ClientToScreenXY(int x, int y)""" | |
5888 | return _core.Window_ClientToScreenXY(*args, **kwargs) | |
5889 | ||
5890 | def ScreenToClientXY(*args, **kwargs): | |
5891 | """ScreenToClientXY(int x, int y)""" | |
5892 | return _core.Window_ScreenToClientXY(*args, **kwargs) | |
5893 | ||
5894 | def ClientToScreen(*args, **kwargs): | |
5895 | """ClientToScreen(Point pt) -> Point""" | |
5896 | return _core.Window_ClientToScreen(*args, **kwargs) | |
5897 | ||
5898 | def ScreenToClient(*args, **kwargs): | |
5899 | """ScreenToClient(Point pt) -> Point""" | |
5900 | return _core.Window_ScreenToClient(*args, **kwargs) | |
5901 | ||
5902 | def HitTestXY(*args, **kwargs): | |
5903 | """HitTestXY(int x, int y) -> wxHitTest""" | |
5904 | return _core.Window_HitTestXY(*args, **kwargs) | |
5905 | ||
5906 | def HitTest(*args, **kwargs): | |
5907 | """HitTest(Point pt) -> wxHitTest""" | |
5908 | return _core.Window_HitTest(*args, **kwargs) | |
5909 | ||
5910 | def GetBorderFlags(*args, **kwargs): | |
5911 | """GetBorderFlags(long flags) -> wxBorder""" | |
5912 | return _core.Window_GetBorderFlags(*args, **kwargs) | |
5913 | ||
5914 | def GetBorder(*args, **kwargs): | |
5915 | """GetBorder() -> wxBorder""" | |
5916 | return _core.Window_GetBorder(*args, **kwargs) | |
5917 | ||
5918 | def UpdateWindowUI(*args, **kwargs): | |
5919 | """UpdateWindowUI(long flags=UPDATE_UI_NONE)""" | |
5920 | return _core.Window_UpdateWindowUI(*args, **kwargs) | |
5921 | ||
5922 | def PopupMenuXY(*args, **kwargs): | |
5923 | """PopupMenuXY(Menu menu, int x, int y) -> bool""" | |
5924 | return _core.Window_PopupMenuXY(*args, **kwargs) | |
5925 | ||
5926 | def PopupMenu(*args, **kwargs): | |
5927 | """PopupMenu(Menu menu, Point pos) -> bool""" | |
5928 | return _core.Window_PopupMenu(*args, **kwargs) | |
5929 | ||
5930 | def GetHandle(*args, **kwargs): | |
5931 | """GetHandle() -> long""" | |
5932 | return _core.Window_GetHandle(*args, **kwargs) | |
5933 | ||
5934 | def HasScrollbar(*args, **kwargs): | |
5935 | """HasScrollbar(int orient) -> bool""" | |
5936 | return _core.Window_HasScrollbar(*args, **kwargs) | |
5937 | ||
5938 | def SetScrollbar(*args, **kwargs): | |
5939 | """SetScrollbar(int orient, int pos, int thumbvisible, int range, bool refresh=True)""" | |
5940 | return _core.Window_SetScrollbar(*args, **kwargs) | |
5941 | ||
5942 | def SetScrollPos(*args, **kwargs): | |
5943 | """SetScrollPos(int orient, int pos, bool refresh=True)""" | |
5944 | return _core.Window_SetScrollPos(*args, **kwargs) | |
5945 | ||
5946 | def GetScrollPos(*args, **kwargs): | |
5947 | """GetScrollPos(int orient) -> int""" | |
5948 | return _core.Window_GetScrollPos(*args, **kwargs) | |
5949 | ||
5950 | def GetScrollThumb(*args, **kwargs): | |
5951 | """GetScrollThumb(int orient) -> int""" | |
5952 | return _core.Window_GetScrollThumb(*args, **kwargs) | |
5953 | ||
5954 | def GetScrollRange(*args, **kwargs): | |
5955 | """GetScrollRange(int orient) -> int""" | |
5956 | return _core.Window_GetScrollRange(*args, **kwargs) | |
5957 | ||
5958 | def ScrollWindow(*args, **kwargs): | |
5959 | """ScrollWindow(int dx, int dy, Rect rect=None)""" | |
5960 | return _core.Window_ScrollWindow(*args, **kwargs) | |
5961 | ||
5962 | def ScrollLines(*args, **kwargs): | |
5963 | """ScrollLines(int lines) -> bool""" | |
5964 | return _core.Window_ScrollLines(*args, **kwargs) | |
5965 | ||
5966 | def ScrollPages(*args, **kwargs): | |
5967 | """ScrollPages(int pages) -> bool""" | |
5968 | return _core.Window_ScrollPages(*args, **kwargs) | |
5969 | ||
5970 | def LineUp(*args, **kwargs): | |
5971 | """LineUp() -> bool""" | |
5972 | return _core.Window_LineUp(*args, **kwargs) | |
5973 | ||
5974 | def LineDown(*args, **kwargs): | |
5975 | """LineDown() -> bool""" | |
5976 | return _core.Window_LineDown(*args, **kwargs) | |
5977 | ||
5978 | def PageUp(*args, **kwargs): | |
5979 | """PageUp() -> bool""" | |
5980 | return _core.Window_PageUp(*args, **kwargs) | |
5981 | ||
5982 | def PageDown(*args, **kwargs): | |
5983 | """PageDown() -> bool""" | |
5984 | return _core.Window_PageDown(*args, **kwargs) | |
5985 | ||
5986 | def SetHelpText(*args, **kwargs): | |
5987 | """SetHelpText(wxString text)""" | |
5988 | return _core.Window_SetHelpText(*args, **kwargs) | |
5989 | ||
5990 | def SetHelpTextForId(*args, **kwargs): | |
5991 | """SetHelpTextForId(wxString text)""" | |
5992 | return _core.Window_SetHelpTextForId(*args, **kwargs) | |
5993 | ||
5994 | def GetHelpText(*args, **kwargs): | |
5995 | """GetHelpText() -> wxString""" | |
5996 | return _core.Window_GetHelpText(*args, **kwargs) | |
5997 | ||
5998 | def SetToolTipString(*args, **kwargs): | |
5999 | """SetToolTipString(wxString tip)""" | |
6000 | return _core.Window_SetToolTipString(*args, **kwargs) | |
6001 | ||
6002 | def SetToolTip(*args, **kwargs): | |
6003 | """SetToolTip(wxToolTip tip)""" | |
6004 | return _core.Window_SetToolTip(*args, **kwargs) | |
6005 | ||
6006 | def GetToolTip(*args, **kwargs): | |
6007 | """GetToolTip() -> wxToolTip""" | |
6008 | return _core.Window_GetToolTip(*args, **kwargs) | |
6009 | ||
6010 | def SetDropTarget(*args, **kwargs): | |
7722248d | 6011 | """SetDropTarget(wxPyDropTarget dropTarget)""" |
e811c8ce RD |
6012 | val = _core.Window_SetDropTarget(*args, **kwargs) |
6013 | args[1].thisown = 0 | |
6014 | return val | |
6015 | ||
6016 | def GetDropTarget(*args, **kwargs): | |
7722248d | 6017 | """GetDropTarget() -> wxPyDropTarget""" |
e811c8ce RD |
6018 | return _core.Window_GetDropTarget(*args, **kwargs) |
6019 | ||
6020 | def SetConstraints(*args, **kwargs): | |
6021 | """SetConstraints(LayoutConstraints constraints)""" | |
6022 | return _core.Window_SetConstraints(*args, **kwargs) | |
6023 | ||
6024 | def GetConstraints(*args, **kwargs): | |
6025 | """GetConstraints() -> LayoutConstraints""" | |
6026 | return _core.Window_GetConstraints(*args, **kwargs) | |
6027 | ||
6028 | def SetAutoLayout(*args, **kwargs): | |
6029 | """SetAutoLayout(bool autoLayout)""" | |
6030 | return _core.Window_SetAutoLayout(*args, **kwargs) | |
6031 | ||
6032 | def GetAutoLayout(*args, **kwargs): | |
6033 | """GetAutoLayout() -> bool""" | |
6034 | return _core.Window_GetAutoLayout(*args, **kwargs) | |
6035 | ||
6036 | def Layout(*args, **kwargs): | |
6037 | """Layout() -> bool""" | |
6038 | return _core.Window_Layout(*args, **kwargs) | |
6039 | ||
6040 | def SetSizer(*args, **kwargs): | |
6041 | """SetSizer(Sizer sizer, bool deleteOld=True)""" | |
6042 | return _core.Window_SetSizer(*args, **kwargs) | |
6043 | ||
6044 | def SetSizerAndFit(*args, **kwargs): | |
6045 | """SetSizerAndFit(Sizer sizer, bool deleteOld=True)""" | |
6046 | return _core.Window_SetSizerAndFit(*args, **kwargs) | |
6047 | ||
6048 | def GetSizer(*args, **kwargs): | |
6049 | """GetSizer() -> Sizer""" | |
6050 | return _core.Window_GetSizer(*args, **kwargs) | |
6051 | ||
6052 | def SetContainingSizer(*args, **kwargs): | |
6053 | """SetContainingSizer(Sizer sizer)""" | |
6054 | return _core.Window_SetContainingSizer(*args, **kwargs) | |
6055 | ||
6056 | def GetContainingSizer(*args, **kwargs): | |
6057 | """GetContainingSizer() -> Sizer""" | |
6058 | return _core.Window_GetContainingSizer(*args, **kwargs) | |
6059 | ||
6060 | def PostCreate(self, pre): | |
6061 | """Phase 3 of the 2-phase create <wink!> | |
6062 | Call this method after precreating the window with the 2-phase create method.""" | |
6063 | self.this = pre.this | |
6064 | self.thisown = pre.thisown | |
6065 | pre.thisown = 0 | |
6066 | if hasattr(self, '_setOORInfo'): | |
6067 | self._setOORInfo(self) | |
6068 | if hasattr(self, '_setCallbackInfo'): | |
6069 | self._setCallbackInfo(self, self.__class__) | |
6070 | ||
6071 | ||
6072 | class WindowPtr(Window): | |
6073 | def __init__(self, this): | |
6074 | self.this = this | |
6075 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6076 | self.__class__ = Window | |
6077 | _core.Window_swigregister(WindowPtr) | |
1e0c8722 | 6078 | NullAcceleratorTable = cvar.NullAcceleratorTable |
e811c8ce RD |
6079 | PanelNameStr = cvar.PanelNameStr |
6080 | ||
6081 | def PreWindow(*args, **kwargs): | |
6082 | """PreWindow() -> Window""" | |
6083 | val = _core.new_PreWindow(*args, **kwargs) | |
6084 | val.thisown = 1 | |
6085 | return val | |
6086 | ||
6087 | def Window_NewControlId(*args, **kwargs): | |
6088 | """Window_NewControlId() -> int""" | |
6089 | return _core.Window_NewControlId(*args, **kwargs) | |
6090 | ||
6091 | def Window_NextControlId(*args, **kwargs): | |
6092 | """Window_NextControlId(int winid) -> int""" | |
6093 | return _core.Window_NextControlId(*args, **kwargs) | |
6094 | ||
6095 | def Window_PrevControlId(*args, **kwargs): | |
6096 | """Window_PrevControlId(int winid) -> int""" | |
6097 | return _core.Window_PrevControlId(*args, **kwargs) | |
6098 | ||
6099 | def Window_FindFocus(*args, **kwargs): | |
6100 | """Window_FindFocus() -> Window""" | |
6101 | return _core.Window_FindFocus(*args, **kwargs) | |
6102 | ||
6103 | def Window_GetCapture(*args, **kwargs): | |
6104 | """Window_GetCapture() -> Window""" | |
6105 | return _core.Window_GetCapture(*args, **kwargs) | |
6106 | ||
6107 | def DLG_PNT(win, point_or_x, y=None): | |
6108 | if y is None: | |
6109 | return win.ConvertDialogPointToPixels(point_or_x) | |
6110 | else: | |
fd3f2efe | 6111 | return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y)) |
e811c8ce RD |
6112 | |
6113 | def DLG_SZE(win, size_width, height=None): | |
6114 | if height is None: | |
6115 | return win.ConvertDialogSizeToPixels(size_width) | |
6116 | else: | |
fd3f2efe | 6117 | return win.ConvertDialogSizeToPixels(wx.Size(size_width, height)) |
e811c8ce RD |
6118 | |
6119 | ||
6120 | def FindWindowById(*args, **kwargs): | |
6121 | """FindWindowById(long id, Window parent=None) -> Window""" | |
6122 | return _core.FindWindowById(*args, **kwargs) | |
6123 | ||
6124 | def FindWindowByName(*args, **kwargs): | |
6125 | """FindWindowByName(wxString name, Window parent=None) -> Window""" | |
6126 | return _core.FindWindowByName(*args, **kwargs) | |
6127 | ||
6128 | def FindWindowByLabel(*args, **kwargs): | |
6129 | """FindWindowByLabel(wxString label, Window parent=None) -> Window""" | |
6130 | return _core.FindWindowByLabel(*args, **kwargs) | |
6131 | ||
6132 | def Window_FromHWND(*args, **kwargs): | |
6133 | """Window_FromHWND(unsigned long hWnd) -> Window""" | |
6134 | return _core.Window_FromHWND(*args, **kwargs) | |
6135 | #--------------------------------------------------------------------------- | |
6136 | ||
6137 | class Validator(EvtHandler): | |
e811c8ce RD |
6138 | def __repr__(self): |
6139 | return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
6140 | def __init__(self, *args, **kwargs): | |
6141 | """__init__() -> Validator""" | |
6142 | newobj = _core.new_Validator(*args, **kwargs) | |
d14a1e28 RD |
6143 | self.this = newobj.this |
6144 | self.thisown = 1 | |
6145 | del newobj.thisown | |
6146 | self._setOORInfo(self) | |
e811c8ce RD |
6147 | |
6148 | def Clone(*args, **kwargs): | |
6149 | """Clone() -> Validator""" | |
6150 | return _core.Validator_Clone(*args, **kwargs) | |
6151 | ||
6152 | def Validate(*args, **kwargs): | |
6153 | """Validate(Window parent) -> bool""" | |
6154 | return _core.Validator_Validate(*args, **kwargs) | |
6155 | ||
6156 | def TransferToWindow(*args, **kwargs): | |
6157 | """TransferToWindow() -> bool""" | |
6158 | return _core.Validator_TransferToWindow(*args, **kwargs) | |
6159 | ||
6160 | def TransferFromWindow(*args, **kwargs): | |
6161 | """TransferFromWindow() -> bool""" | |
6162 | return _core.Validator_TransferFromWindow(*args, **kwargs) | |
6163 | ||
6164 | def GetWindow(*args, **kwargs): | |
6165 | """GetWindow() -> Window""" | |
6166 | return _core.Validator_GetWindow(*args, **kwargs) | |
6167 | ||
6168 | def SetWindow(*args, **kwargs): | |
6169 | """SetWindow(Window window)""" | |
6170 | return _core.Validator_SetWindow(*args, **kwargs) | |
6171 | ||
6172 | def IsSilent(*args, **kwargs): | |
6173 | """Validator.IsSilent() -> bool""" | |
6174 | return _core.Validator_IsSilent(*args, **kwargs) | |
6175 | ||
6176 | IsSilent = staticmethod(IsSilent) | |
6177 | def SetBellOnError(*args, **kwargs): | |
6178 | """Validator.SetBellOnError(int doIt=True)""" | |
6179 | return _core.Validator_SetBellOnError(*args, **kwargs) | |
6180 | ||
6181 | SetBellOnError = staticmethod(SetBellOnError) | |
6182 | ||
6183 | class ValidatorPtr(Validator): | |
6184 | def __init__(self, this): | |
6185 | self.this = this | |
6186 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6187 | self.__class__ = Validator | |
6188 | _core.Validator_swigregister(ValidatorPtr) | |
6189 | ||
6190 | def Validator_IsSilent(*args, **kwargs): | |
6191 | """Validator_IsSilent() -> bool""" | |
6192 | return _core.Validator_IsSilent(*args, **kwargs) | |
6193 | ||
6194 | def Validator_SetBellOnError(*args, **kwargs): | |
6195 | """Validator_SetBellOnError(int doIt=True)""" | |
6196 | return _core.Validator_SetBellOnError(*args, **kwargs) | |
6197 | ||
6198 | class PyValidator(Validator): | |
e811c8ce RD |
6199 | def __repr__(self): |
6200 | return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
6201 | def __init__(self, *args, **kwargs): | |
6202 | """__init__() -> PyValidator""" | |
6203 | newobj = _core.new_PyValidator(*args, **kwargs) | |
6204 | self.this = newobj.this | |
6205 | self.thisown = 1 | |
6206 | del newobj.thisown | |
6207 | ||
6208 | self._setCallbackInfo(self, PyValidator, 1) | |
6209 | self._setOORInfo(self) | |
6210 | ||
6211 | def _setCallbackInfo(*args, **kwargs): | |
6212 | """_setCallbackInfo(PyObject self, PyObject _class, int incref=True)""" | |
6213 | return _core.PyValidator__setCallbackInfo(*args, **kwargs) | |
6214 | ||
6215 | ||
6216 | class PyValidatorPtr(PyValidator): | |
6217 | def __init__(self, this): | |
6218 | self.this = this | |
6219 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6220 | self.__class__ = PyValidator | |
6221 | _core.PyValidator_swigregister(PyValidatorPtr) | |
6222 | ||
6223 | #--------------------------------------------------------------------------- | |
6224 | ||
6225 | class Menu(EvtHandler): | |
d14a1e28 RD |
6226 | def __repr__(self): |
6227 | return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
6228 | def __init__(self, *args, **kwargs): |
6229 | """__init__(wxString title=wxPyEmptyString, long style=0) -> Menu""" | |
6230 | newobj = _core.new_Menu(*args, **kwargs) | |
6231 | self.this = newobj.this | |
6232 | self.thisown = 1 | |
6233 | del newobj.thisown | |
6234 | self._setOORInfo(self) | |
6235 | ||
6236 | def Append(*args, **kwargs): | |
0df68c9f | 6237 | """ |
242b7b46 | 6238 | Append(int id, wxString text, wxString help=wxPyEmptyString, |
0df68c9f RD |
6239 | wxItemKind kind=ITEM_NORMAL) |
6240 | """ | |
e811c8ce RD |
6241 | return _core.Menu_Append(*args, **kwargs) |
6242 | ||
6243 | def AppendSeparator(*args, **kwargs): | |
6244 | """AppendSeparator()""" | |
6245 | return _core.Menu_AppendSeparator(*args, **kwargs) | |
6246 | ||
6247 | def AppendCheckItem(*args, **kwargs): | |
242b7b46 | 6248 | """AppendCheckItem(int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6249 | return _core.Menu_AppendCheckItem(*args, **kwargs) |
6250 | ||
6251 | def AppendRadioItem(*args, **kwargs): | |
242b7b46 | 6252 | """AppendRadioItem(int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6253 | return _core.Menu_AppendRadioItem(*args, **kwargs) |
6254 | ||
6255 | def AppendMenu(*args, **kwargs): | |
242b7b46 | 6256 | """AppendMenu(int id, wxString text, Menu submenu, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6257 | return _core.Menu_AppendMenu(*args, **kwargs) |
6258 | ||
6259 | def AppendItem(*args, **kwargs): | |
6260 | """AppendItem(MenuItem item)""" | |
6261 | return _core.Menu_AppendItem(*args, **kwargs) | |
6262 | ||
6263 | def Break(*args, **kwargs): | |
6264 | """Break()""" | |
6265 | return _core.Menu_Break(*args, **kwargs) | |
6266 | ||
6267 | def InsertItem(*args, **kwargs): | |
6268 | """InsertItem(size_t pos, MenuItem item) -> bool""" | |
6269 | return _core.Menu_InsertItem(*args, **kwargs) | |
6270 | ||
6271 | def Insert(*args, **kwargs): | |
0df68c9f | 6272 | """ |
242b7b46 | 6273 | Insert(size_t pos, int id, wxString text, wxString help=wxPyEmptyString, |
0df68c9f RD |
6274 | wxItemKind kind=ITEM_NORMAL) |
6275 | """ | |
e811c8ce RD |
6276 | return _core.Menu_Insert(*args, **kwargs) |
6277 | ||
6278 | def InsertSeparator(*args, **kwargs): | |
6279 | """InsertSeparator(size_t pos)""" | |
6280 | return _core.Menu_InsertSeparator(*args, **kwargs) | |
6281 | ||
6282 | def InsertCheckItem(*args, **kwargs): | |
242b7b46 | 6283 | """InsertCheckItem(size_t pos, int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6284 | return _core.Menu_InsertCheckItem(*args, **kwargs) |
6285 | ||
6286 | def InsertRadioItem(*args, **kwargs): | |
242b7b46 | 6287 | """InsertRadioItem(size_t pos, int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6288 | return _core.Menu_InsertRadioItem(*args, **kwargs) |
6289 | ||
6290 | def InsertMenu(*args, **kwargs): | |
242b7b46 | 6291 | """InsertMenu(size_t pos, int id, wxString text, Menu submenu, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6292 | return _core.Menu_InsertMenu(*args, **kwargs) |
6293 | ||
6294 | def PrependItem(*args, **kwargs): | |
6295 | """PrependItem(MenuItem item)""" | |
6296 | return _core.Menu_PrependItem(*args, **kwargs) | |
6297 | ||
6298 | def Prepend(*args, **kwargs): | |
0df68c9f | 6299 | """ |
242b7b46 | 6300 | Prepend(int id, wxString text, wxString help=wxPyEmptyString, |
0df68c9f RD |
6301 | wxItemKind kind=ITEM_NORMAL) |
6302 | """ | |
e811c8ce RD |
6303 | return _core.Menu_Prepend(*args, **kwargs) |
6304 | ||
6305 | def PrependSeparator(*args, **kwargs): | |
6306 | """PrependSeparator()""" | |
6307 | return _core.Menu_PrependSeparator(*args, **kwargs) | |
6308 | ||
6309 | def PrependCheckItem(*args, **kwargs): | |
242b7b46 | 6310 | """PrependCheckItem(int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6311 | return _core.Menu_PrependCheckItem(*args, **kwargs) |
6312 | ||
6313 | def PrependRadioItem(*args, **kwargs): | |
242b7b46 | 6314 | """PrependRadioItem(int id, wxString text, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6315 | return _core.Menu_PrependRadioItem(*args, **kwargs) |
6316 | ||
6317 | def PrependMenu(*args, **kwargs): | |
242b7b46 | 6318 | """PrependMenu(int id, wxString text, Menu submenu, wxString help=wxPyEmptyString)""" |
e811c8ce RD |
6319 | return _core.Menu_PrependMenu(*args, **kwargs) |
6320 | ||
6321 | def Remove(*args, **kwargs): | |
242b7b46 | 6322 | """Remove(int id) -> MenuItem""" |
e811c8ce RD |
6323 | return _core.Menu_Remove(*args, **kwargs) |
6324 | ||
6325 | def RemoveItem(*args, **kwargs): | |
6326 | """RemoveItem(MenuItem item) -> MenuItem""" | |
6327 | return _core.Menu_RemoveItem(*args, **kwargs) | |
6328 | ||
6329 | def Delete(*args, **kwargs): | |
242b7b46 | 6330 | """Delete(int id) -> bool""" |
e811c8ce RD |
6331 | return _core.Menu_Delete(*args, **kwargs) |
6332 | ||
6333 | def DeleteItem(*args, **kwargs): | |
6334 | """DeleteItem(MenuItem item) -> bool""" | |
6335 | return _core.Menu_DeleteItem(*args, **kwargs) | |
6336 | ||
6337 | def Destroy(*args, **kwargs): | |
0df68c9f RD |
6338 | """ |
6339 | Destroy() | |
e811c8ce | 6340 | |
0df68c9f RD |
6341 | Deletes the C++ object this Python object is a proxy for. |
6342 | """ | |
e811c8ce RD |
6343 | return _core.Menu_Destroy(*args, **kwargs) |
6344 | ||
6345 | def DestroyId(*args, **kwargs): | |
0df68c9f | 6346 | """ |
242b7b46 | 6347 | DestroyId(int id) -> bool |
e811c8ce | 6348 | |
0df68c9f RD |
6349 | Deletes the C++ object this Python object is a proxy for. |
6350 | """ | |
e811c8ce RD |
6351 | return _core.Menu_DestroyId(*args, **kwargs) |
6352 | ||
6353 | def DestroyItem(*args, **kwargs): | |
0df68c9f RD |
6354 | """ |
6355 | DestroyItem(MenuItem item) -> bool | |
e811c8ce | 6356 | |
0df68c9f RD |
6357 | Deletes the C++ object this Python object is a proxy for. |
6358 | """ | |
e811c8ce RD |
6359 | return _core.Menu_DestroyItem(*args, **kwargs) |
6360 | ||
6361 | def GetMenuItemCount(*args, **kwargs): | |
6362 | """GetMenuItemCount() -> size_t""" | |
6363 | return _core.Menu_GetMenuItemCount(*args, **kwargs) | |
6364 | ||
6365 | def GetMenuItems(*args, **kwargs): | |
6366 | """GetMenuItems() -> PyObject""" | |
6367 | return _core.Menu_GetMenuItems(*args, **kwargs) | |
6368 | ||
6369 | def FindItem(*args, **kwargs): | |
6370 | """FindItem(wxString item) -> int""" | |
6371 | return _core.Menu_FindItem(*args, **kwargs) | |
6372 | ||
6373 | def FindItemById(*args, **kwargs): | |
242b7b46 | 6374 | """FindItemById(int id) -> MenuItem""" |
e811c8ce RD |
6375 | return _core.Menu_FindItemById(*args, **kwargs) |
6376 | ||
6377 | def FindItemByPosition(*args, **kwargs): | |
6378 | """FindItemByPosition(size_t position) -> MenuItem""" | |
6379 | return _core.Menu_FindItemByPosition(*args, **kwargs) | |
6380 | ||
6381 | def Enable(*args, **kwargs): | |
242b7b46 | 6382 | """Enable(int id, bool enable)""" |
e811c8ce RD |
6383 | return _core.Menu_Enable(*args, **kwargs) |
6384 | ||
6385 | def IsEnabled(*args, **kwargs): | |
242b7b46 | 6386 | """IsEnabled(int id) -> bool""" |
e811c8ce RD |
6387 | return _core.Menu_IsEnabled(*args, **kwargs) |
6388 | ||
6389 | def Check(*args, **kwargs): | |
242b7b46 | 6390 | """Check(int id, bool check)""" |
e811c8ce RD |
6391 | return _core.Menu_Check(*args, **kwargs) |
6392 | ||
6393 | def IsChecked(*args, **kwargs): | |
242b7b46 | 6394 | """IsChecked(int id) -> bool""" |
e811c8ce RD |
6395 | return _core.Menu_IsChecked(*args, **kwargs) |
6396 | ||
6397 | def SetLabel(*args, **kwargs): | |
242b7b46 | 6398 | """SetLabel(int id, wxString label)""" |
e811c8ce RD |
6399 | return _core.Menu_SetLabel(*args, **kwargs) |
6400 | ||
6401 | def GetLabel(*args, **kwargs): | |
242b7b46 | 6402 | """GetLabel(int id) -> wxString""" |
e811c8ce RD |
6403 | return _core.Menu_GetLabel(*args, **kwargs) |
6404 | ||
6405 | def SetHelpString(*args, **kwargs): | |
242b7b46 | 6406 | """SetHelpString(int id, wxString helpString)""" |
e811c8ce RD |
6407 | return _core.Menu_SetHelpString(*args, **kwargs) |
6408 | ||
6409 | def GetHelpString(*args, **kwargs): | |
242b7b46 | 6410 | """GetHelpString(int id) -> wxString""" |
e811c8ce RD |
6411 | return _core.Menu_GetHelpString(*args, **kwargs) |
6412 | ||
6413 | def SetTitle(*args, **kwargs): | |
6414 | """SetTitle(wxString title)""" | |
6415 | return _core.Menu_SetTitle(*args, **kwargs) | |
6416 | ||
6417 | def GetTitle(*args, **kwargs): | |
6418 | """GetTitle() -> wxString""" | |
6419 | return _core.Menu_GetTitle(*args, **kwargs) | |
6420 | ||
6421 | def SetEventHandler(*args, **kwargs): | |
6422 | """SetEventHandler(EvtHandler handler)""" | |
6423 | return _core.Menu_SetEventHandler(*args, **kwargs) | |
6424 | ||
6425 | def GetEventHandler(*args, **kwargs): | |
6426 | """GetEventHandler() -> EvtHandler""" | |
6427 | return _core.Menu_GetEventHandler(*args, **kwargs) | |
6428 | ||
6429 | def SetInvokingWindow(*args, **kwargs): | |
6430 | """SetInvokingWindow(Window win)""" | |
6431 | return _core.Menu_SetInvokingWindow(*args, **kwargs) | |
6432 | ||
6433 | def GetInvokingWindow(*args, **kwargs): | |
6434 | """GetInvokingWindow() -> Window""" | |
6435 | return _core.Menu_GetInvokingWindow(*args, **kwargs) | |
6436 | ||
6437 | def GetStyle(*args, **kwargs): | |
6438 | """GetStyle() -> long""" | |
6439 | return _core.Menu_GetStyle(*args, **kwargs) | |
6440 | ||
6441 | def UpdateUI(*args, **kwargs): | |
6442 | """UpdateUI(EvtHandler source=None)""" | |
6443 | return _core.Menu_UpdateUI(*args, **kwargs) | |
6444 | ||
6445 | def GetMenuBar(*args, **kwargs): | |
6446 | """GetMenuBar() -> MenuBar""" | |
6447 | return _core.Menu_GetMenuBar(*args, **kwargs) | |
6448 | ||
6449 | def Attach(*args, **kwargs): | |
6450 | """Attach(wxMenuBarBase menubar)""" | |
6451 | return _core.Menu_Attach(*args, **kwargs) | |
6452 | ||
6453 | def Detach(*args, **kwargs): | |
6454 | """Detach()""" | |
6455 | return _core.Menu_Detach(*args, **kwargs) | |
6456 | ||
6457 | def IsAttached(*args, **kwargs): | |
6458 | """IsAttached() -> bool""" | |
6459 | return _core.Menu_IsAttached(*args, **kwargs) | |
6460 | ||
6461 | def SetParent(*args, **kwargs): | |
6462 | """SetParent(Menu parent)""" | |
6463 | return _core.Menu_SetParent(*args, **kwargs) | |
6464 | ||
6465 | def GetParent(*args, **kwargs): | |
6466 | """GetParent() -> Menu""" | |
6467 | return _core.Menu_GetParent(*args, **kwargs) | |
6468 | ||
d14a1e28 RD |
6469 | |
6470 | class MenuPtr(Menu): | |
6471 | def __init__(self, this): | |
6472 | self.this = this | |
6473 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6474 | self.__class__ = Menu | |
6475 | _core.Menu_swigregister(MenuPtr) | |
6476 | DefaultValidator = cvar.DefaultValidator | |
6477 | ||
6478 | #--------------------------------------------------------------------------- | |
6479 | ||
6480 | class MenuBar(Window): | |
e811c8ce RD |
6481 | def __repr__(self): |
6482 | return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 6483 | def __init__(self, *args, **kwargs): |
e811c8ce | 6484 | """__init__(long style=0) -> MenuBar""" |
d14a1e28 RD |
6485 | newobj = _core.new_MenuBar(*args, **kwargs) |
6486 | self.this = newobj.this | |
6487 | self.thisown = 1 | |
6488 | del newobj.thisown | |
6489 | self._setOORInfo(self) | |
e811c8ce RD |
6490 | |
6491 | def Append(*args, **kwargs): | |
6492 | """Append(Menu menu, wxString title) -> bool""" | |
6493 | return _core.MenuBar_Append(*args, **kwargs) | |
6494 | ||
6495 | def Insert(*args, **kwargs): | |
6496 | """Insert(size_t pos, Menu menu, wxString title) -> bool""" | |
6497 | return _core.MenuBar_Insert(*args, **kwargs) | |
6498 | ||
6499 | def GetMenuCount(*args, **kwargs): | |
6500 | """GetMenuCount() -> size_t""" | |
6501 | return _core.MenuBar_GetMenuCount(*args, **kwargs) | |
6502 | ||
6503 | def GetMenu(*args, **kwargs): | |
6504 | """GetMenu(size_t pos) -> Menu""" | |
6505 | return _core.MenuBar_GetMenu(*args, **kwargs) | |
6506 | ||
6507 | def Replace(*args, **kwargs): | |
6508 | """Replace(size_t pos, Menu menu, wxString title) -> Menu""" | |
6509 | return _core.MenuBar_Replace(*args, **kwargs) | |
6510 | ||
6511 | def Remove(*args, **kwargs): | |
6512 | """Remove(size_t pos) -> Menu""" | |
6513 | return _core.MenuBar_Remove(*args, **kwargs) | |
6514 | ||
6515 | def EnableTop(*args, **kwargs): | |
6516 | """EnableTop(size_t pos, bool enable)""" | |
6517 | return _core.MenuBar_EnableTop(*args, **kwargs) | |
6518 | ||
6519 | def IsEnabledTop(*args, **kwargs): | |
6520 | """IsEnabledTop(size_t pos) -> bool""" | |
6521 | return _core.MenuBar_IsEnabledTop(*args, **kwargs) | |
6522 | ||
6523 | def SetLabelTop(*args, **kwargs): | |
6524 | """SetLabelTop(size_t pos, wxString label)""" | |
6525 | return _core.MenuBar_SetLabelTop(*args, **kwargs) | |
6526 | ||
6527 | def GetLabelTop(*args, **kwargs): | |
6528 | """GetLabelTop(size_t pos) -> wxString""" | |
6529 | return _core.MenuBar_GetLabelTop(*args, **kwargs) | |
6530 | ||
6531 | def FindMenuItem(*args, **kwargs): | |
6532 | """FindMenuItem(wxString menu, wxString item) -> int""" | |
6533 | return _core.MenuBar_FindMenuItem(*args, **kwargs) | |
6534 | ||
6535 | def FindItemById(*args, **kwargs): | |
242b7b46 | 6536 | """FindItemById(int id) -> MenuItem""" |
e811c8ce RD |
6537 | return _core.MenuBar_FindItemById(*args, **kwargs) |
6538 | ||
6539 | def FindMenu(*args, **kwargs): | |
6540 | """FindMenu(wxString title) -> int""" | |
6541 | return _core.MenuBar_FindMenu(*args, **kwargs) | |
6542 | ||
6543 | def Enable(*args, **kwargs): | |
242b7b46 | 6544 | """Enable(int id, bool enable)""" |
e811c8ce RD |
6545 | return _core.MenuBar_Enable(*args, **kwargs) |
6546 | ||
6547 | def Check(*args, **kwargs): | |
242b7b46 | 6548 | """Check(int id, bool check)""" |
e811c8ce RD |
6549 | return _core.MenuBar_Check(*args, **kwargs) |
6550 | ||
6551 | def IsChecked(*args, **kwargs): | |
242b7b46 | 6552 | """IsChecked(int id) -> bool""" |
e811c8ce RD |
6553 | return _core.MenuBar_IsChecked(*args, **kwargs) |
6554 | ||
6555 | def IsEnabled(*args, **kwargs): | |
242b7b46 | 6556 | """IsEnabled(int id) -> bool""" |
e811c8ce RD |
6557 | return _core.MenuBar_IsEnabled(*args, **kwargs) |
6558 | ||
6559 | def SetLabel(*args, **kwargs): | |
242b7b46 | 6560 | """SetLabel(int id, wxString label)""" |
e811c8ce RD |
6561 | return _core.MenuBar_SetLabel(*args, **kwargs) |
6562 | ||
6563 | def GetLabel(*args, **kwargs): | |
242b7b46 | 6564 | """GetLabel(int id) -> wxString""" |
e811c8ce RD |
6565 | return _core.MenuBar_GetLabel(*args, **kwargs) |
6566 | ||
6567 | def SetHelpString(*args, **kwargs): | |
242b7b46 | 6568 | """SetHelpString(int id, wxString helpString)""" |
e811c8ce RD |
6569 | return _core.MenuBar_SetHelpString(*args, **kwargs) |
6570 | ||
6571 | def GetHelpString(*args, **kwargs): | |
242b7b46 | 6572 | """GetHelpString(int id) -> wxString""" |
e811c8ce RD |
6573 | return _core.MenuBar_GetHelpString(*args, **kwargs) |
6574 | ||
6575 | def GetFrame(*args, **kwargs): | |
6576 | """GetFrame() -> wxFrame""" | |
6577 | return _core.MenuBar_GetFrame(*args, **kwargs) | |
6578 | ||
6579 | def IsAttached(*args, **kwargs): | |
6580 | """IsAttached() -> bool""" | |
6581 | return _core.MenuBar_IsAttached(*args, **kwargs) | |
6582 | ||
6583 | def Attach(*args, **kwargs): | |
6584 | """Attach(wxFrame frame)""" | |
6585 | return _core.MenuBar_Attach(*args, **kwargs) | |
6586 | ||
6587 | def Detach(*args, **kwargs): | |
6588 | """Detach()""" | |
6589 | return _core.MenuBar_Detach(*args, **kwargs) | |
6590 | ||
d14a1e28 RD |
6591 | |
6592 | class MenuBarPtr(MenuBar): | |
6593 | def __init__(self, this): | |
6594 | self.this = this | |
6595 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6596 | self.__class__ = MenuBar | |
6597 | _core.MenuBar_swigregister(MenuBarPtr) | |
6598 | ||
6599 | #--------------------------------------------------------------------------- | |
6600 | ||
6601 | class MenuItem(Object): | |
e811c8ce RD |
6602 | def __repr__(self): |
6603 | return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 6604 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
6605 | """ |
6606 | __init__(Menu parentMenu=None, int id=ID_SEPARATOR, wxString text=wxPyEmptyString, | |
6607 | wxString help=wxPyEmptyString, | |
6608 | wxItemKind kind=ITEM_NORMAL, Menu subMenu=None) -> MenuItem | |
6609 | """ | |
d14a1e28 RD |
6610 | newobj = _core.new_MenuItem(*args, **kwargs) |
6611 | self.this = newobj.this | |
6612 | self.thisown = 1 | |
6613 | del newobj.thisown | |
e811c8ce RD |
6614 | def GetMenu(*args, **kwargs): |
6615 | """GetMenu() -> Menu""" | |
6616 | return _core.MenuItem_GetMenu(*args, **kwargs) | |
6617 | ||
6618 | def SetMenu(*args, **kwargs): | |
6619 | """SetMenu(Menu menu)""" | |
6620 | return _core.MenuItem_SetMenu(*args, **kwargs) | |
6621 | ||
6622 | def SetId(*args, **kwargs): | |
242b7b46 | 6623 | """SetId(int id)""" |
e811c8ce RD |
6624 | return _core.MenuItem_SetId(*args, **kwargs) |
6625 | ||
6626 | def GetId(*args, **kwargs): | |
6627 | """GetId() -> int""" | |
6628 | return _core.MenuItem_GetId(*args, **kwargs) | |
6629 | ||
6630 | def IsSeparator(*args, **kwargs): | |
6631 | """IsSeparator() -> bool""" | |
6632 | return _core.MenuItem_IsSeparator(*args, **kwargs) | |
6633 | ||
6634 | def SetText(*args, **kwargs): | |
6635 | """SetText(wxString str)""" | |
6636 | return _core.MenuItem_SetText(*args, **kwargs) | |
6637 | ||
6638 | def GetLabel(*args, **kwargs): | |
6639 | """GetLabel() -> wxString""" | |
6640 | return _core.MenuItem_GetLabel(*args, **kwargs) | |
6641 | ||
6642 | def GetText(*args, **kwargs): | |
6643 | """GetText() -> wxString""" | |
6644 | return _core.MenuItem_GetText(*args, **kwargs) | |
6645 | ||
6646 | def GetLabelFromText(*args, **kwargs): | |
6647 | """MenuItem.GetLabelFromText(wxString text) -> wxString""" | |
6648 | return _core.MenuItem_GetLabelFromText(*args, **kwargs) | |
6649 | ||
6650 | GetLabelFromText = staticmethod(GetLabelFromText) | |
6651 | def GetKind(*args, **kwargs): | |
6652 | """GetKind() -> wxItemKind""" | |
6653 | return _core.MenuItem_GetKind(*args, **kwargs) | |
6654 | ||
6655 | def SetCheckable(*args, **kwargs): | |
6656 | """SetCheckable(bool checkable)""" | |
6657 | return _core.MenuItem_SetCheckable(*args, **kwargs) | |
6658 | ||
6659 | def IsCheckable(*args, **kwargs): | |
6660 | """IsCheckable() -> bool""" | |
6661 | return _core.MenuItem_IsCheckable(*args, **kwargs) | |
6662 | ||
6663 | def IsSubMenu(*args, **kwargs): | |
6664 | """IsSubMenu() -> bool""" | |
6665 | return _core.MenuItem_IsSubMenu(*args, **kwargs) | |
6666 | ||
6667 | def SetSubMenu(*args, **kwargs): | |
6668 | """SetSubMenu(Menu menu)""" | |
6669 | return _core.MenuItem_SetSubMenu(*args, **kwargs) | |
6670 | ||
6671 | def GetSubMenu(*args, **kwargs): | |
6672 | """GetSubMenu() -> Menu""" | |
6673 | return _core.MenuItem_GetSubMenu(*args, **kwargs) | |
6674 | ||
6675 | def Enable(*args, **kwargs): | |
6676 | """Enable(bool enable=True)""" | |
6677 | return _core.MenuItem_Enable(*args, **kwargs) | |
6678 | ||
6679 | def IsEnabled(*args, **kwargs): | |
6680 | """IsEnabled() -> bool""" | |
6681 | return _core.MenuItem_IsEnabled(*args, **kwargs) | |
6682 | ||
6683 | def Check(*args, **kwargs): | |
6684 | """Check(bool check=True)""" | |
6685 | return _core.MenuItem_Check(*args, **kwargs) | |
6686 | ||
6687 | def IsChecked(*args, **kwargs): | |
6688 | """IsChecked() -> bool""" | |
6689 | return _core.MenuItem_IsChecked(*args, **kwargs) | |
6690 | ||
6691 | def Toggle(*args, **kwargs): | |
6692 | """Toggle()""" | |
6693 | return _core.MenuItem_Toggle(*args, **kwargs) | |
6694 | ||
6695 | def SetHelp(*args, **kwargs): | |
6696 | """SetHelp(wxString str)""" | |
6697 | return _core.MenuItem_SetHelp(*args, **kwargs) | |
6698 | ||
6699 | def GetHelp(*args, **kwargs): | |
6700 | """GetHelp() -> wxString""" | |
6701 | return _core.MenuItem_GetHelp(*args, **kwargs) | |
6702 | ||
6703 | def GetAccel(*args, **kwargs): | |
1e0c8722 | 6704 | """GetAccel() -> AcceleratorEntry""" |
e811c8ce RD |
6705 | return _core.MenuItem_GetAccel(*args, **kwargs) |
6706 | ||
6707 | def SetAccel(*args, **kwargs): | |
1e0c8722 | 6708 | """SetAccel(AcceleratorEntry accel)""" |
e811c8ce RD |
6709 | return _core.MenuItem_SetAccel(*args, **kwargs) |
6710 | ||
6711 | def GetDefaultMarginWidth(*args, **kwargs): | |
6712 | """MenuItem.GetDefaultMarginWidth() -> int""" | |
6713 | return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs) | |
6714 | ||
6715 | GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) | |
6716 | def SetBitmap(*args, **kwargs): | |
6717 | """SetBitmap(wxBitmap bitmap)""" | |
6718 | return _core.MenuItem_SetBitmap(*args, **kwargs) | |
6719 | ||
6720 | def GetBitmap(*args, **kwargs): | |
6721 | """GetBitmap() -> wxBitmap""" | |
6722 | return _core.MenuItem_GetBitmap(*args, **kwargs) | |
6723 | ||
d14a1e28 RD |
6724 | |
6725 | class MenuItemPtr(MenuItem): | |
6726 | def __init__(self, this): | |
6727 | self.this = this | |
6728 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6729 | self.__class__ = MenuItem | |
6730 | _core.MenuItem_swigregister(MenuItemPtr) | |
6731 | ||
e811c8ce RD |
6732 | def MenuItem_GetLabelFromText(*args, **kwargs): |
6733 | """MenuItem_GetLabelFromText(wxString text) -> wxString""" | |
6734 | return _core.MenuItem_GetLabelFromText(*args, **kwargs) | |
d14a1e28 | 6735 | |
e811c8ce RD |
6736 | def MenuItem_GetDefaultMarginWidth(*args, **kwargs): |
6737 | """MenuItem_GetDefaultMarginWidth() -> int""" | |
6738 | return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs) | |
d14a1e28 RD |
6739 | |
6740 | #--------------------------------------------------------------------------- | |
6741 | ||
6742 | class Control(Window): | |
e811c8ce RD |
6743 | def __repr__(self): |
6744 | return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 6745 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
6746 | """ |
6747 | __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
6748 | long style=0, Validator validator=DefaultValidator, | |
6749 | wxString name=wxPyControlNameStr) -> Control | |
6750 | """ | |
d14a1e28 RD |
6751 | newobj = _core.new_Control(*args, **kwargs) |
6752 | self.this = newobj.this | |
6753 | self.thisown = 1 | |
6754 | del newobj.thisown | |
6755 | self._setOORInfo(self) | |
e811c8ce RD |
6756 | |
6757 | def Create(*args, **kwargs): | |
0df68c9f RD |
6758 | """ |
6759 | Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
6760 | long style=0, Validator validator=DefaultValidator, | |
6761 | wxString name=wxPyControlNameStr) -> bool | |
6762 | """ | |
e811c8ce RD |
6763 | return _core.Control_Create(*args, **kwargs) |
6764 | ||
6765 | def Command(*args, **kwargs): | |
6766 | """Command(CommandEvent event)""" | |
6767 | return _core.Control_Command(*args, **kwargs) | |
6768 | ||
6769 | def GetLabel(*args, **kwargs): | |
6770 | """GetLabel() -> wxString""" | |
6771 | return _core.Control_GetLabel(*args, **kwargs) | |
6772 | ||
6773 | def SetLabel(*args, **kwargs): | |
6774 | """SetLabel(wxString label)""" | |
6775 | return _core.Control_SetLabel(*args, **kwargs) | |
6776 | ||
d14a1e28 RD |
6777 | |
6778 | class ControlPtr(Control): | |
6779 | def __init__(self, this): | |
6780 | self.this = this | |
6781 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6782 | self.__class__ = Control | |
6783 | _core.Control_swigregister(ControlPtr) | |
6784 | ||
6785 | def PreControl(*args, **kwargs): | |
e811c8ce | 6786 | """PreControl() -> Control""" |
d14a1e28 RD |
6787 | val = _core.new_PreControl(*args, **kwargs) |
6788 | val.thisown = 1 | |
6789 | return val | |
6790 | ||
6791 | #--------------------------------------------------------------------------- | |
6792 | ||
6793 | class ItemContainer(object): | |
d14a1e28 RD |
6794 | def __init__(self): raise RuntimeError, "No constructor defined" |
6795 | def __repr__(self): | |
6796 | return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
6797 | def Append(*args, **kwargs): |
6798 | """Append(wxString item, PyObject clientData=None) -> int""" | |
6799 | return _core.ItemContainer_Append(*args, **kwargs) | |
6800 | ||
6801 | def AppendItems(*args, **kwargs): | |
6802 | """AppendItems(wxArrayString strings)""" | |
6803 | return _core.ItemContainer_AppendItems(*args, **kwargs) | |
6804 | ||
6805 | def Insert(*args, **kwargs): | |
6806 | """Insert(wxString item, int pos, PyObject clientData=None) -> int""" | |
6807 | return _core.ItemContainer_Insert(*args, **kwargs) | |
6808 | ||
6809 | def Clear(*args, **kwargs): | |
6810 | """Clear()""" | |
6811 | return _core.ItemContainer_Clear(*args, **kwargs) | |
6812 | ||
6813 | def Delete(*args, **kwargs): | |
6814 | """Delete(int n)""" | |
6815 | return _core.ItemContainer_Delete(*args, **kwargs) | |
6816 | ||
6817 | def GetCount(*args, **kwargs): | |
6818 | """GetCount() -> int""" | |
6819 | return _core.ItemContainer_GetCount(*args, **kwargs) | |
6820 | ||
6821 | def IsEmpty(*args, **kwargs): | |
6822 | """IsEmpty() -> bool""" | |
6823 | return _core.ItemContainer_IsEmpty(*args, **kwargs) | |
6824 | ||
6825 | def GetString(*args, **kwargs): | |
6826 | """GetString(int n) -> wxString""" | |
6827 | return _core.ItemContainer_GetString(*args, **kwargs) | |
6828 | ||
6829 | def GetStrings(*args, **kwargs): | |
6830 | """GetStrings() -> wxArrayString""" | |
6831 | return _core.ItemContainer_GetStrings(*args, **kwargs) | |
6832 | ||
6833 | def SetString(*args, **kwargs): | |
6834 | """SetString(int n, wxString s)""" | |
6835 | return _core.ItemContainer_SetString(*args, **kwargs) | |
6836 | ||
6837 | def FindString(*args, **kwargs): | |
6838 | """FindString(wxString s) -> int""" | |
6839 | return _core.ItemContainer_FindString(*args, **kwargs) | |
6840 | ||
6841 | def Select(*args, **kwargs): | |
6842 | """Select(int n)""" | |
6843 | return _core.ItemContainer_Select(*args, **kwargs) | |
6844 | ||
6845 | def GetSelection(*args, **kwargs): | |
6846 | """GetSelection() -> int""" | |
6847 | return _core.ItemContainer_GetSelection(*args, **kwargs) | |
6848 | ||
6849 | def GetStringSelection(*args, **kwargs): | |
6850 | """GetStringSelection() -> wxString""" | |
6851 | return _core.ItemContainer_GetStringSelection(*args, **kwargs) | |
6852 | ||
6853 | def GetClientData(*args, **kwargs): | |
6854 | """GetClientData(int n) -> PyObject""" | |
6855 | return _core.ItemContainer_GetClientData(*args, **kwargs) | |
6856 | ||
6857 | def SetClientData(*args, **kwargs): | |
6858 | """SetClientData(int n, PyObject clientData)""" | |
6859 | return _core.ItemContainer_SetClientData(*args, **kwargs) | |
6860 | ||
d14a1e28 RD |
6861 | |
6862 | class ItemContainerPtr(ItemContainer): | |
6863 | def __init__(self, this): | |
6864 | self.this = this | |
6865 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6866 | self.__class__ = ItemContainer | |
6867 | _core.ItemContainer_swigregister(ItemContainerPtr) | |
6868 | ||
6869 | #--------------------------------------------------------------------------- | |
6870 | ||
6871 | class ControlWithItems(Control,ItemContainer): | |
6872 | def __init__(self): raise RuntimeError, "No constructor defined" | |
6873 | def __repr__(self): | |
6874 | return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
6875 | ||
6876 | class ControlWithItemsPtr(ControlWithItems): | |
6877 | def __init__(self, this): | |
6878 | self.this = this | |
6879 | if not hasattr(self,"thisown"): self.thisown = 0 | |
6880 | self.__class__ = ControlWithItems | |
6881 | _core.ControlWithItems_swigregister(ControlWithItemsPtr) | |
6882 | ||
6883 | #--------------------------------------------------------------------------- | |
6884 | ||
6885 | class SizerItem(Object): | |
e811c8ce RD |
6886 | def __repr__(self): |
6887 | return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 6888 | def __init__(self, *args, **kwargs): |
e811c8ce | 6889 | """__init__() -> SizerItem""" |
d14a1e28 RD |
6890 | newobj = _core.new_SizerItem(*args, **kwargs) |
6891 | self.this = newobj.this | |
6892 | self.thisown = 1 | |
6893 | del newobj.thisown | |
e811c8ce RD |
6894 | def DeleteWindows(*args, **kwargs): |
6895 | """DeleteWindows()""" | |
6896 | return _core.SizerItem_DeleteWindows(*args, **kwargs) | |
6897 | ||
6898 | def DetachSizer(*args, **kwargs): | |
6899 | """DetachSizer()""" | |
6900 | return _core.SizerItem_DetachSizer(*args, **kwargs) | |
6901 | ||
6902 | def GetSize(*args, **kwargs): | |
6903 | """GetSize() -> Size""" | |
6904 | return _core.SizerItem_GetSize(*args, **kwargs) | |
6905 | ||
6906 | def CalcMin(*args, **kwargs): | |
6907 | """CalcMin() -> Size""" | |
6908 | return _core.SizerItem_CalcMin(*args, **kwargs) | |
6909 | ||
6910 | def SetDimension(*args, **kwargs): | |
6911 | """SetDimension(Point pos, Size size)""" | |
6912 | return _core.SizerItem_SetDimension(*args, **kwargs) | |
6913 | ||
6914 | def GetMinSize(*args, **kwargs): | |
6915 | """GetMinSize() -> Size""" | |
6916 | return _core.SizerItem_GetMinSize(*args, **kwargs) | |
6917 | ||
6918 | def SetInitSize(*args, **kwargs): | |
6919 | """SetInitSize(int x, int y)""" | |
6920 | return _core.SizerItem_SetInitSize(*args, **kwargs) | |
6921 | ||
6922 | def SetRatioWH(*args, **kwargs): | |
6923 | """SetRatioWH(int width, int height)""" | |
6924 | return _core.SizerItem_SetRatioWH(*args, **kwargs) | |
6925 | ||
6926 | def SetRatioSize(*args, **kwargs): | |
6927 | """SetRatioSize(Size size)""" | |
6928 | return _core.SizerItem_SetRatioSize(*args, **kwargs) | |
6929 | ||
6930 | def SetRatio(*args, **kwargs): | |
6931 | """SetRatio(float ratio)""" | |
6932 | return _core.SizerItem_SetRatio(*args, **kwargs) | |
6933 | ||
6934 | def GetRatio(*args, **kwargs): | |
6935 | """GetRatio() -> float""" | |
6936 | return _core.SizerItem_GetRatio(*args, **kwargs) | |
6937 | ||
6938 | def IsWindow(*args, **kwargs): | |
6939 | """IsWindow() -> bool""" | |
6940 | return _core.SizerItem_IsWindow(*args, **kwargs) | |
6941 | ||
6942 | def IsSizer(*args, **kwargs): | |
6943 | """IsSizer() -> bool""" | |
6944 | return _core.SizerItem_IsSizer(*args, **kwargs) | |
6945 | ||
6946 | def IsSpacer(*args, **kwargs): | |
6947 | """IsSpacer() -> bool""" | |
6948 | return _core.SizerItem_IsSpacer(*args, **kwargs) | |
6949 | ||
6950 | def SetProportion(*args, **kwargs): | |
6951 | """SetProportion(int proportion)""" | |
6952 | return _core.SizerItem_SetProportion(*args, **kwargs) | |
6953 | ||
6954 | def GetProportion(*args, **kwargs): | |
6955 | """GetProportion() -> int""" | |
6956 | return _core.SizerItem_GetProportion(*args, **kwargs) | |
6957 | ||
6958 | def SetFlag(*args, **kwargs): | |
6959 | """SetFlag(int flag)""" | |
6960 | return _core.SizerItem_SetFlag(*args, **kwargs) | |
6961 | ||
6962 | def GetFlag(*args, **kwargs): | |
6963 | """GetFlag() -> int""" | |
6964 | return _core.SizerItem_GetFlag(*args, **kwargs) | |
6965 | ||
6966 | def SetBorder(*args, **kwargs): | |
6967 | """SetBorder(int border)""" | |
6968 | return _core.SizerItem_SetBorder(*args, **kwargs) | |
6969 | ||
6970 | def GetBorder(*args, **kwargs): | |
6971 | """GetBorder() -> int""" | |
6972 | return _core.SizerItem_GetBorder(*args, **kwargs) | |
6973 | ||
6974 | def GetWindow(*args, **kwargs): | |
6975 | """GetWindow() -> Window""" | |
6976 | return _core.SizerItem_GetWindow(*args, **kwargs) | |
6977 | ||
6978 | def SetWindow(*args, **kwargs): | |
6979 | """SetWindow(Window window)""" | |
6980 | return _core.SizerItem_SetWindow(*args, **kwargs) | |
6981 | ||
6982 | def GetSizer(*args, **kwargs): | |
6983 | """GetSizer() -> Sizer""" | |
6984 | return _core.SizerItem_GetSizer(*args, **kwargs) | |
6985 | ||
6986 | def SetSizer(*args, **kwargs): | |
6987 | """SetSizer(Sizer sizer)""" | |
6988 | return _core.SizerItem_SetSizer(*args, **kwargs) | |
6989 | ||
6990 | def GetSpacer(*args, **kwargs): | |
6991 | """GetSpacer() -> Size""" | |
6992 | return _core.SizerItem_GetSpacer(*args, **kwargs) | |
6993 | ||
6994 | def SetSpacer(*args, **kwargs): | |
6995 | """SetSpacer(Size size)""" | |
6996 | return _core.SizerItem_SetSpacer(*args, **kwargs) | |
6997 | ||
6998 | def Show(*args, **kwargs): | |
6999 | """Show(bool show)""" | |
7000 | return _core.SizerItem_Show(*args, **kwargs) | |
7001 | ||
7002 | def IsShown(*args, **kwargs): | |
7003 | """IsShown() -> bool""" | |
7004 | return _core.SizerItem_IsShown(*args, **kwargs) | |
7005 | ||
7006 | def GetPosition(*args, **kwargs): | |
7007 | """GetPosition() -> Point""" | |
7008 | return _core.SizerItem_GetPosition(*args, **kwargs) | |
7009 | ||
7010 | def GetUserData(*args, **kwargs): | |
7011 | """GetUserData() -> PyObject""" | |
7012 | return _core.SizerItem_GetUserData(*args, **kwargs) | |
7013 | ||
d14a1e28 RD |
7014 | |
7015 | class SizerItemPtr(SizerItem): | |
7016 | def __init__(self, this): | |
7017 | self.this = this | |
7018 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7019 | self.__class__ = SizerItem | |
7020 | _core.SizerItem_swigregister(SizerItemPtr) | |
7021 | ||
7022 | def SizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
7023 | """ |
7024 | SizerItemSpacer(int width, int height, int proportion, int flag, int border, | |
7025 | Object userData) -> SizerItem | |
7026 | """ | |
d14a1e28 RD |
7027 | val = _core.new_SizerItemSpacer(*args, **kwargs) |
7028 | val.thisown = 1 | |
7029 | return val | |
7030 | ||
7031 | def SizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
7032 | """ |
7033 | SizerItemWindow(Window window, int proportion, int flag, int border, | |
7034 | Object userData) -> SizerItem | |
7035 | """ | |
d14a1e28 RD |
7036 | val = _core.new_SizerItemWindow(*args, **kwargs) |
7037 | val.thisown = 1 | |
7038 | return val | |
7039 | ||
7040 | def SizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
7041 | """ |
7042 | SizerItemSizer(Sizer sizer, int proportion, int flag, int border, | |
7043 | Object userData) -> SizerItem | |
7044 | """ | |
d14a1e28 RD |
7045 | val = _core.new_SizerItemSizer(*args, **kwargs) |
7046 | val.thisown = 1 | |
7047 | return val | |
7048 | ||
7049 | class Sizer(Object): | |
e811c8ce RD |
7050 | def __init__(self): raise RuntimeError, "No constructor defined" |
7051 | def __repr__(self): | |
7052 | return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
7053 | def _setOORInfo(*args, **kwargs): | |
7054 | """_setOORInfo(PyObject _self)""" | |
7055 | return _core.Sizer__setOORInfo(*args, **kwargs) | |
7056 | ||
7057 | def Add(*args, **kwargs): | |
0df68c9f RD |
7058 | """ |
7059 | Add(PyObject item, int proportion=0, int flag=0, int border=0, | |
7060 | PyObject userData=None) | |
7061 | """ | |
e811c8ce RD |
7062 | return _core.Sizer_Add(*args, **kwargs) |
7063 | ||
7064 | def Insert(*args, **kwargs): | |
0df68c9f RD |
7065 | """ |
7066 | Insert(int before, PyObject item, int proportion=0, int flag=0, | |
7067 | int border=0, PyObject userData=None) | |
7068 | """ | |
e811c8ce RD |
7069 | return _core.Sizer_Insert(*args, **kwargs) |
7070 | ||
7071 | def Prepend(*args, **kwargs): | |
0df68c9f RD |
7072 | """ |
7073 | Prepend(PyObject item, int proportion=0, int flag=0, int border=0, | |
7074 | PyObject userData=None) | |
7075 | """ | |
e811c8ce RD |
7076 | return _core.Sizer_Prepend(*args, **kwargs) |
7077 | ||
7078 | def Remove(*args, **kwargs): | |
7079 | """Remove(PyObject item) -> bool""" | |
7080 | return _core.Sizer_Remove(*args, **kwargs) | |
7081 | ||
7082 | def _SetItemMinSize(*args, **kwargs): | |
7083 | """_SetItemMinSize(PyObject item, Size size)""" | |
7084 | return _core.Sizer__SetItemMinSize(*args, **kwargs) | |
7085 | ||
7086 | def AddItem(*args, **kwargs): | |
7087 | """AddItem(SizerItem item)""" | |
7088 | return _core.Sizer_AddItem(*args, **kwargs) | |
7089 | ||
7090 | def InsertItem(*args, **kwargs): | |
7091 | """InsertItem(size_t index, SizerItem item)""" | |
7092 | return _core.Sizer_InsertItem(*args, **kwargs) | |
7093 | ||
7094 | def PrependItem(*args, **kwargs): | |
7095 | """PrependItem(SizerItem item)""" | |
7096 | return _core.Sizer_PrependItem(*args, **kwargs) | |
7097 | ||
d14a1e28 RD |
7098 | def AddMany(self, widgets): |
7099 | for childinfo in widgets: | |
e811c8ce | 7100 | if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)): |
d14a1e28 RD |
7101 | childinfo = (childinfo, ) |
7102 | self.Add(*childinfo) | |
7103 | ||
7104 | ||
7105 | AddWindow = AddSizer = AddSpacer = Add | |
7106 | PrependWindow = PrependSizer = PrependSpacer = Prepend | |
7107 | InsertWindow = InsertSizer = InsertSpacer = Insert | |
7108 | RemoveWindow = RemoveSizer = RemovePos = Remove | |
7109 | ||
7110 | ||
7111 | def SetItemMinSize(self, item, *args): | |
7112 | if len(args) == 2: | |
7113 | return self._SetItemMinSize(item, args) | |
7114 | else: | |
7115 | return self._SetItemMinSize(item, args[0]) | |
7116 | ||
e811c8ce RD |
7117 | def SetDimension(*args, **kwargs): |
7118 | """SetDimension(int x, int y, int width, int height)""" | |
7119 | return _core.Sizer_SetDimension(*args, **kwargs) | |
7120 | ||
7121 | def SetMinSize(*args, **kwargs): | |
7122 | """SetMinSize(Size size)""" | |
7123 | return _core.Sizer_SetMinSize(*args, **kwargs) | |
7124 | ||
7125 | def GetSize(*args, **kwargs): | |
7126 | """GetSize() -> Size""" | |
7127 | return _core.Sizer_GetSize(*args, **kwargs) | |
7128 | ||
7129 | def GetPosition(*args, **kwargs): | |
7130 | """GetPosition() -> Point""" | |
7131 | return _core.Sizer_GetPosition(*args, **kwargs) | |
7132 | ||
7133 | def GetMinSize(*args, **kwargs): | |
7134 | """GetMinSize() -> Size""" | |
7135 | return _core.Sizer_GetMinSize(*args, **kwargs) | |
7136 | ||
d14a1e28 RD |
7137 | def GetSizeTuple(self): |
7138 | return self.GetSize().asTuple() | |
7139 | def GetPositionTuple(self): | |
7140 | return self.GetPosition().asTuple() | |
7141 | def GetMinSizeTuple(self): | |
7142 | return self.GetMinSize().asTuple() | |
7143 | ||
e811c8ce RD |
7144 | def RecalcSizes(*args, **kwargs): |
7145 | """RecalcSizes()""" | |
7146 | return _core.Sizer_RecalcSizes(*args, **kwargs) | |
7147 | ||
7148 | def CalcMin(*args, **kwargs): | |
7149 | """CalcMin() -> Size""" | |
7150 | return _core.Sizer_CalcMin(*args, **kwargs) | |
7151 | ||
7152 | def Layout(*args, **kwargs): | |
7153 | """Layout()""" | |
7154 | return _core.Sizer_Layout(*args, **kwargs) | |
7155 | ||
7156 | def Fit(*args, **kwargs): | |
7157 | """Fit(Window window) -> Size""" | |
7158 | return _core.Sizer_Fit(*args, **kwargs) | |
7159 | ||
7160 | def FitInside(*args, **kwargs): | |
7161 | """FitInside(Window window)""" | |
7162 | return _core.Sizer_FitInside(*args, **kwargs) | |
7163 | ||
7164 | def SetSizeHints(*args, **kwargs): | |
7165 | """SetSizeHints(Window window)""" | |
7166 | return _core.Sizer_SetSizeHints(*args, **kwargs) | |
7167 | ||
7168 | def SetVirtualSizeHints(*args, **kwargs): | |
7169 | """SetVirtualSizeHints(Window window)""" | |
7170 | return _core.Sizer_SetVirtualSizeHints(*args, **kwargs) | |
7171 | ||
7172 | def Clear(*args, **kwargs): | |
7173 | """Clear(bool delete_windows=False)""" | |
7174 | return _core.Sizer_Clear(*args, **kwargs) | |
7175 | ||
7176 | def DeleteWindows(*args, **kwargs): | |
7177 | """DeleteWindows()""" | |
7178 | return _core.Sizer_DeleteWindows(*args, **kwargs) | |
7179 | ||
7180 | def GetChildren(*args, **kwargs): | |
7181 | """GetChildren() -> PyObject""" | |
7182 | return _core.Sizer_GetChildren(*args, **kwargs) | |
7183 | ||
7184 | def Show(*args, **kwargs): | |
7185 | """Show(PyObject item, bool show=True)""" | |
7186 | return _core.Sizer_Show(*args, **kwargs) | |
7187 | ||
7188 | def Hide(*args, **kwargs): | |
7189 | """Hide(PyObject item)""" | |
7190 | return _core.Sizer_Hide(*args, **kwargs) | |
7191 | ||
7192 | def IsShown(*args, **kwargs): | |
7193 | """IsShown(PyObject item) -> bool""" | |
7194 | return _core.Sizer_IsShown(*args, **kwargs) | |
7195 | ||
7196 | def ShowItems(*args, **kwargs): | |
7197 | """ShowItems(bool show)""" | |
7198 | return _core.Sizer_ShowItems(*args, **kwargs) | |
7199 | ||
d14a1e28 RD |
7200 | |
7201 | class SizerPtr(Sizer): | |
7202 | def __init__(self, this): | |
7203 | self.this = this | |
7204 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7205 | self.__class__ = Sizer | |
7206 | _core.Sizer_swigregister(SizerPtr) | |
7207 | ||
7208 | class PySizer(Sizer): | |
e811c8ce RD |
7209 | def __repr__(self): |
7210 | return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7211 | def __init__(self, *args, **kwargs): |
e811c8ce | 7212 | """__init__() -> PySizer""" |
d14a1e28 RD |
7213 | newobj = _core.new_PySizer(*args, **kwargs) |
7214 | self.this = newobj.this | |
7215 | self.thisown = 1 | |
7216 | del newobj.thisown | |
7217 | self._setCallbackInfo(self, PySizer);self._setOORInfo(self) | |
e811c8ce RD |
7218 | |
7219 | def _setCallbackInfo(*args, **kwargs): | |
7220 | """_setCallbackInfo(PyObject self, PyObject _class)""" | |
7221 | return _core.PySizer__setCallbackInfo(*args, **kwargs) | |
7222 | ||
d14a1e28 RD |
7223 | |
7224 | class PySizerPtr(PySizer): | |
7225 | def __init__(self, this): | |
7226 | self.this = this | |
7227 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7228 | self.__class__ = PySizer | |
7229 | _core.PySizer_swigregister(PySizerPtr) | |
7230 | ||
7231 | #--------------------------------------------------------------------------- | |
7232 | ||
7233 | class BoxSizer(Sizer): | |
e811c8ce RD |
7234 | def __repr__(self): |
7235 | return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7236 | def __init__(self, *args, **kwargs): |
e811c8ce | 7237 | """__init__(int orient=HORIZONTAL) -> BoxSizer""" |
d14a1e28 RD |
7238 | newobj = _core.new_BoxSizer(*args, **kwargs) |
7239 | self.this = newobj.this | |
7240 | self.thisown = 1 | |
7241 | del newobj.thisown | |
7242 | self._setOORInfo(self) | |
e811c8ce RD |
7243 | |
7244 | def GetOrientation(*args, **kwargs): | |
7245 | """GetOrientation() -> int""" | |
7246 | return _core.BoxSizer_GetOrientation(*args, **kwargs) | |
7247 | ||
7248 | def SetOrientation(*args, **kwargs): | |
7249 | """SetOrientation(int orient)""" | |
7250 | return _core.BoxSizer_SetOrientation(*args, **kwargs) | |
7251 | ||
7252 | def RecalcSizes(*args, **kwargs): | |
7253 | """RecalcSizes()""" | |
7254 | return _core.BoxSizer_RecalcSizes(*args, **kwargs) | |
7255 | ||
7256 | def CalcMin(*args, **kwargs): | |
7257 | """CalcMin() -> Size""" | |
7258 | return _core.BoxSizer_CalcMin(*args, **kwargs) | |
7259 | ||
d14a1e28 RD |
7260 | |
7261 | class BoxSizerPtr(BoxSizer): | |
7262 | def __init__(self, this): | |
7263 | self.this = this | |
7264 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7265 | self.__class__ = BoxSizer | |
7266 | _core.BoxSizer_swigregister(BoxSizerPtr) | |
7267 | ||
7268 | #--------------------------------------------------------------------------- | |
7269 | ||
7270 | class StaticBoxSizer(BoxSizer): | |
e811c8ce RD |
7271 | def __repr__(self): |
7272 | return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7273 | def __init__(self, *args, **kwargs): |
e811c8ce | 7274 | """__init__(wxStaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer""" |
d14a1e28 RD |
7275 | newobj = _core.new_StaticBoxSizer(*args, **kwargs) |
7276 | self.this = newobj.this | |
7277 | self.thisown = 1 | |
7278 | del newobj.thisown | |
7279 | self._setOORInfo(self) | |
e811c8ce RD |
7280 | |
7281 | def GetStaticBox(*args, **kwargs): | |
7282 | """GetStaticBox() -> wxStaticBox""" | |
7283 | return _core.StaticBoxSizer_GetStaticBox(*args, **kwargs) | |
7284 | ||
7285 | def RecalcSizes(*args, **kwargs): | |
7286 | """RecalcSizes()""" | |
7287 | return _core.StaticBoxSizer_RecalcSizes(*args, **kwargs) | |
7288 | ||
7289 | def CalcMin(*args, **kwargs): | |
7290 | """CalcMin() -> Size""" | |
7291 | return _core.StaticBoxSizer_CalcMin(*args, **kwargs) | |
7292 | ||
d14a1e28 RD |
7293 | |
7294 | class StaticBoxSizerPtr(StaticBoxSizer): | |
7295 | def __init__(self, this): | |
7296 | self.this = this | |
7297 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7298 | self.__class__ = StaticBoxSizer | |
7299 | _core.StaticBoxSizer_swigregister(StaticBoxSizerPtr) | |
7300 | ||
7301 | #--------------------------------------------------------------------------- | |
7302 | ||
7303 | class GridSizer(Sizer): | |
e811c8ce RD |
7304 | def __repr__(self): |
7305 | return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7306 | def __init__(self, *args, **kwargs): |
e811c8ce | 7307 | """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer""" |
d14a1e28 RD |
7308 | newobj = _core.new_GridSizer(*args, **kwargs) |
7309 | self.this = newobj.this | |
7310 | self.thisown = 1 | |
7311 | del newobj.thisown | |
7312 | self._setOORInfo(self) | |
e811c8ce RD |
7313 | |
7314 | def RecalcSizes(*args, **kwargs): | |
7315 | """RecalcSizes()""" | |
7316 | return _core.GridSizer_RecalcSizes(*args, **kwargs) | |
7317 | ||
7318 | def CalcMin(*args, **kwargs): | |
7319 | """CalcMin() -> Size""" | |
7320 | return _core.GridSizer_CalcMin(*args, **kwargs) | |
7321 | ||
7322 | def SetCols(*args, **kwargs): | |
7323 | """SetCols(int cols)""" | |
7324 | return _core.GridSizer_SetCols(*args, **kwargs) | |
7325 | ||
7326 | def SetRows(*args, **kwargs): | |
7327 | """SetRows(int rows)""" | |
7328 | return _core.GridSizer_SetRows(*args, **kwargs) | |
7329 | ||
7330 | def SetVGap(*args, **kwargs): | |
7331 | """SetVGap(int gap)""" | |
7332 | return _core.GridSizer_SetVGap(*args, **kwargs) | |
7333 | ||
7334 | def SetHGap(*args, **kwargs): | |
7335 | """SetHGap(int gap)""" | |
7336 | return _core.GridSizer_SetHGap(*args, **kwargs) | |
7337 | ||
7338 | def GetCols(*args, **kwargs): | |
7339 | """GetCols() -> int""" | |
7340 | return _core.GridSizer_GetCols(*args, **kwargs) | |
7341 | ||
7342 | def GetRows(*args, **kwargs): | |
7343 | """GetRows() -> int""" | |
7344 | return _core.GridSizer_GetRows(*args, **kwargs) | |
7345 | ||
7346 | def GetVGap(*args, **kwargs): | |
7347 | """GetVGap() -> int""" | |
7348 | return _core.GridSizer_GetVGap(*args, **kwargs) | |
7349 | ||
7350 | def GetHGap(*args, **kwargs): | |
7351 | """GetHGap() -> int""" | |
7352 | return _core.GridSizer_GetHGap(*args, **kwargs) | |
7353 | ||
d14a1e28 RD |
7354 | |
7355 | class GridSizerPtr(GridSizer): | |
7356 | def __init__(self, this): | |
7357 | self.this = this | |
7358 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7359 | self.__class__ = GridSizer | |
7360 | _core.GridSizer_swigregister(GridSizerPtr) | |
7361 | ||
7362 | #--------------------------------------------------------------------------- | |
7363 | ||
7364 | FLEX_GROWMODE_NONE = _core.FLEX_GROWMODE_NONE | |
7365 | FLEX_GROWMODE_SPECIFIED = _core.FLEX_GROWMODE_SPECIFIED | |
7366 | FLEX_GROWMODE_ALL = _core.FLEX_GROWMODE_ALL | |
7367 | class FlexGridSizer(GridSizer): | |
e811c8ce RD |
7368 | def __repr__(self): |
7369 | return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7370 | def __init__(self, *args, **kwargs): |
e811c8ce | 7371 | """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer""" |
d14a1e28 RD |
7372 | newobj = _core.new_FlexGridSizer(*args, **kwargs) |
7373 | self.this = newobj.this | |
7374 | self.thisown = 1 | |
7375 | del newobj.thisown | |
7376 | self._setOORInfo(self) | |
e811c8ce RD |
7377 | |
7378 | def RecalcSizes(*args, **kwargs): | |
7379 | """RecalcSizes()""" | |
7380 | return _core.FlexGridSizer_RecalcSizes(*args, **kwargs) | |
7381 | ||
7382 | def CalcMin(*args, **kwargs): | |
7383 | """CalcMin() -> Size""" | |
7384 | return _core.FlexGridSizer_CalcMin(*args, **kwargs) | |
7385 | ||
7386 | def AddGrowableRow(*args, **kwargs): | |
7387 | """AddGrowableRow(size_t idx, int proportion=0)""" | |
7388 | return _core.FlexGridSizer_AddGrowableRow(*args, **kwargs) | |
7389 | ||
7390 | def RemoveGrowableRow(*args, **kwargs): | |
7391 | """RemoveGrowableRow(size_t idx)""" | |
7392 | return _core.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) | |
7393 | ||
7394 | def AddGrowableCol(*args, **kwargs): | |
7395 | """AddGrowableCol(size_t idx, int proportion=0)""" | |
7396 | return _core.FlexGridSizer_AddGrowableCol(*args, **kwargs) | |
7397 | ||
7398 | def RemoveGrowableCol(*args, **kwargs): | |
7399 | """RemoveGrowableCol(size_t idx)""" | |
7400 | return _core.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) | |
7401 | ||
7402 | def SetFlexibleDirection(*args, **kwargs): | |
7403 | """SetFlexibleDirection(int direction)""" | |
7404 | return _core.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) | |
7405 | ||
7406 | def GetFlexibleDirection(*args, **kwargs): | |
7407 | """GetFlexibleDirection() -> int""" | |
7408 | return _core.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) | |
7409 | ||
7410 | def SetNonFlexibleGrowMode(*args, **kwargs): | |
7411 | """SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode)""" | |
7412 | return _core.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) | |
7413 | ||
7414 | def GetNonFlexibleGrowMode(*args, **kwargs): | |
7415 | """GetNonFlexibleGrowMode() -> wxFlexSizerGrowMode""" | |
7416 | return _core.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) | |
7417 | ||
7418 | def GetRowHeights(*args, **kwargs): | |
7419 | """GetRowHeights() -> wxArrayInt""" | |
7420 | return _core.FlexGridSizer_GetRowHeights(*args, **kwargs) | |
7421 | ||
7422 | def GetColWidths(*args, **kwargs): | |
7423 | """GetColWidths() -> wxArrayInt""" | |
7424 | return _core.FlexGridSizer_GetColWidths(*args, **kwargs) | |
7425 | ||
d14a1e28 RD |
7426 | |
7427 | class FlexGridSizerPtr(FlexGridSizer): | |
7428 | def __init__(self, this): | |
7429 | self.this = this | |
7430 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7431 | self.__class__ = FlexGridSizer | |
7432 | _core.FlexGridSizer_swigregister(FlexGridSizerPtr) | |
7433 | ||
7434 | #--------------------------------------------------------------------------- | |
7435 | ||
7436 | class GBPosition(object): | |
e811c8ce RD |
7437 | def __repr__(self): |
7438 | return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7439 | def __init__(self, *args, **kwargs): |
e811c8ce | 7440 | """__init__(int row=0, int col=0) -> GBPosition""" |
d14a1e28 RD |
7441 | newobj = _core.new_GBPosition(*args, **kwargs) |
7442 | self.this = newobj.this | |
7443 | self.thisown = 1 | |
7444 | del newobj.thisown | |
e811c8ce RD |
7445 | def GetRow(*args, **kwargs): |
7446 | """GetRow() -> int""" | |
7447 | return _core.GBPosition_GetRow(*args, **kwargs) | |
7448 | ||
7449 | def GetCol(*args, **kwargs): | |
7450 | """GetCol() -> int""" | |
7451 | return _core.GBPosition_GetCol(*args, **kwargs) | |
7452 | ||
7453 | def SetRow(*args, **kwargs): | |
7454 | """SetRow(int row)""" | |
7455 | return _core.GBPosition_SetRow(*args, **kwargs) | |
7456 | ||
7457 | def SetCol(*args, **kwargs): | |
7458 | """SetCol(int col)""" | |
7459 | return _core.GBPosition_SetCol(*args, **kwargs) | |
7460 | ||
7461 | def __eq__(*args, **kwargs): | |
7462 | """__eq__(GBPosition p) -> bool""" | |
7463 | return _core.GBPosition___eq__(*args, **kwargs) | |
7464 | ||
7465 | def __ne__(*args, **kwargs): | |
7466 | """__ne__(GBPosition p) -> bool""" | |
7467 | return _core.GBPosition___ne__(*args, **kwargs) | |
7468 | ||
7469 | def Set(*args, **kwargs): | |
7470 | """Set(int row=0, int col=0)""" | |
7471 | return _core.GBPosition_Set(*args, **kwargs) | |
7472 | ||
7473 | def Get(*args, **kwargs): | |
7474 | """Get() -> PyObject""" | |
7475 | return _core.GBPosition_Get(*args, **kwargs) | |
7476 | ||
7477 | asTuple = Get | |
7478 | def __str__(self): return str(self.Get()) | |
7479 | def __repr__(self): return 'wx.GBPosition'+str(self.Get()) | |
7480 | def __len__(self): return len(self.Get()) | |
7481 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
7482 | def __setitem__(self, index, val): |
7483 | if index == 0: self.SetRow(val) | |
7484 | elif index == 1: self.SetCol(val) | |
7485 | else: raise IndexError | |
e811c8ce | 7486 | def __nonzero__(self): return self.Get() != (0,0) |
d14a1e28 | 7487 | def __getinitargs__(self): return () |
e811c8ce | 7488 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
7489 | def __setstate__(self, state): self.Set(*state) |
7490 | ||
7491 | row = property(GetRow, SetRow) | |
7492 | col = property(GetCol, SetCol) | |
7493 | ||
7494 | ||
7495 | class GBPositionPtr(GBPosition): | |
7496 | def __init__(self, this): | |
7497 | self.this = this | |
7498 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7499 | self.__class__ = GBPosition | |
7500 | _core.GBPosition_swigregister(GBPositionPtr) | |
7501 | ||
7502 | class GBSpan(object): | |
e811c8ce RD |
7503 | def __repr__(self): |
7504 | return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7505 | def __init__(self, *args, **kwargs): |
e811c8ce | 7506 | """__init__(int rowspan=1, int colspan=1) -> GBSpan""" |
d14a1e28 RD |
7507 | newobj = _core.new_GBSpan(*args, **kwargs) |
7508 | self.this = newobj.this | |
7509 | self.thisown = 1 | |
7510 | del newobj.thisown | |
e811c8ce RD |
7511 | def GetRowspan(*args, **kwargs): |
7512 | """GetRowspan() -> int""" | |
7513 | return _core.GBSpan_GetRowspan(*args, **kwargs) | |
7514 | ||
7515 | def GetColspan(*args, **kwargs): | |
7516 | """GetColspan() -> int""" | |
7517 | return _core.GBSpan_GetColspan(*args, **kwargs) | |
7518 | ||
7519 | def SetRowspan(*args, **kwargs): | |
7520 | """SetRowspan(int rowspan)""" | |
7521 | return _core.GBSpan_SetRowspan(*args, **kwargs) | |
7522 | ||
7523 | def SetColspan(*args, **kwargs): | |
7524 | """SetColspan(int colspan)""" | |
7525 | return _core.GBSpan_SetColspan(*args, **kwargs) | |
7526 | ||
7527 | def __eq__(*args, **kwargs): | |
7528 | """__eq__(GBSpan o) -> bool""" | |
7529 | return _core.GBSpan___eq__(*args, **kwargs) | |
7530 | ||
7531 | def __ne__(*args, **kwargs): | |
7532 | """__ne__(GBSpan o) -> bool""" | |
7533 | return _core.GBSpan___ne__(*args, **kwargs) | |
7534 | ||
7535 | def Set(*args, **kwargs): | |
7536 | """Set(int rowspan=1, int colspan=1)""" | |
7537 | return _core.GBSpan_Set(*args, **kwargs) | |
7538 | ||
7539 | def Get(*args, **kwargs): | |
7540 | """Get() -> PyObject""" | |
7541 | return _core.GBSpan_Get(*args, **kwargs) | |
7542 | ||
7543 | asTuple = Get | |
7544 | def __str__(self): return str(self.Get()) | |
7545 | def __repr__(self): return 'wx.GBSpan'+str(self.Get()) | |
7546 | def __len__(self): return len(self.Get()) | |
7547 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
7548 | def __setitem__(self, index, val): |
7549 | if index == 0: self.SetRowspan(val) | |
7550 | elif index == 1: self.SetColspan(val) | |
7551 | else: raise IndexError | |
e811c8ce | 7552 | def __nonzero__(self): return self.Get() != (0,0) |
d14a1e28 | 7553 | def __getinitargs__(self): return () |
e811c8ce | 7554 | def __getstate__(self): return self.Get() |
d14a1e28 RD |
7555 | def __setstate__(self, state): self.Set(*state) |
7556 | ||
7557 | rowspan = property(GetRowspan, SetRowspan) | |
7558 | colspan = property(GetColspan, SetColspan) | |
7559 | ||
7560 | ||
7561 | class GBSpanPtr(GBSpan): | |
7562 | def __init__(self, this): | |
7563 | self.this = this | |
7564 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7565 | self.__class__ = GBSpan | |
7566 | _core.GBSpan_swigregister(GBSpanPtr) | |
7567 | ||
7568 | class GBSizerItem(SizerItem): | |
e811c8ce RD |
7569 | def __repr__(self): |
7570 | return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7571 | def __init__(self, *args, **kwargs): |
e811c8ce | 7572 | """__init__() -> GBSizerItem""" |
d14a1e28 RD |
7573 | newobj = _core.new_GBSizerItem(*args, **kwargs) |
7574 | self.this = newobj.this | |
7575 | self.thisown = 1 | |
7576 | del newobj.thisown | |
e811c8ce RD |
7577 | def GetPos(*args, **kwargs): |
7578 | """GetPos() -> GBPosition""" | |
7579 | return _core.GBSizerItem_GetPos(*args, **kwargs) | |
7580 | ||
7581 | def GetPosTuple(self): return self.GetPos().Get() | |
7582 | def GetSpan(*args, **kwargs): | |
7583 | """GetSpan() -> GBSpan""" | |
7584 | return _core.GBSizerItem_GetSpan(*args, **kwargs) | |
7585 | ||
7586 | def GetSpanTuple(self): return self.GetSpan().Get() | |
7587 | def SetPos(*args, **kwargs): | |
7588 | """SetPos(GBPosition pos) -> bool""" | |
7589 | return _core.GBSizerItem_SetPos(*args, **kwargs) | |
7590 | ||
7591 | def SetSpan(*args, **kwargs): | |
7592 | """SetSpan(GBSpan span) -> bool""" | |
7593 | return _core.GBSizerItem_SetSpan(*args, **kwargs) | |
7594 | ||
7595 | def Intersects(*args): | |
0df68c9f RD |
7596 | """ |
7597 | Intersects(GBSizerItem other) -> bool | |
7598 | Intersects(GBPosition pos, GBSpan span) -> bool | |
7599 | """ | |
e811c8ce RD |
7600 | return _core.GBSizerItem_Intersects(*args) |
7601 | ||
7602 | def GetEndPos(*args, **kwargs): | |
7603 | """GetEndPos(int row, int col)""" | |
7604 | return _core.GBSizerItem_GetEndPos(*args, **kwargs) | |
7605 | ||
7606 | def GetGBSizer(*args, **kwargs): | |
7607 | """GetGBSizer() -> GridBagSizer""" | |
7608 | return _core.GBSizerItem_GetGBSizer(*args, **kwargs) | |
7609 | ||
7610 | def SetGBSizer(*args, **kwargs): | |
7611 | """SetGBSizer(GridBagSizer sizer)""" | |
7612 | return _core.GBSizerItem_SetGBSizer(*args, **kwargs) | |
7613 | ||
d14a1e28 RD |
7614 | |
7615 | class GBSizerItemPtr(GBSizerItem): | |
7616 | def __init__(self, this): | |
7617 | self.this = this | |
7618 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7619 | self.__class__ = GBSizerItem | |
7620 | _core.GBSizerItem_swigregister(GBSizerItemPtr) | |
7621 | DefaultSpan = cvar.DefaultSpan | |
7622 | ||
7623 | def GBSizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
7624 | """ |
7625 | GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, | |
7626 | int border, Object userData) -> GBSizerItem | |
7627 | """ | |
d14a1e28 RD |
7628 | val = _core.new_GBSizerItemWindow(*args, **kwargs) |
7629 | val.thisown = 1 | |
7630 | return val | |
7631 | ||
7632 | def GBSizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
7633 | """ |
7634 | GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, | |
7635 | int border, Object userData) -> GBSizerItem | |
7636 | """ | |
d14a1e28 RD |
7637 | val = _core.new_GBSizerItemSizer(*args, **kwargs) |
7638 | val.thisown = 1 | |
7639 | return val | |
7640 | ||
7641 | def GBSizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
7642 | """ |
7643 | GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, | |
7644 | int flag, int border, Object userData) -> GBSizerItem | |
7645 | """ | |
d14a1e28 RD |
7646 | val = _core.new_GBSizerItemSpacer(*args, **kwargs) |
7647 | val.thisown = 1 | |
7648 | return val | |
7649 | ||
7650 | class GridBagSizer(FlexGridSizer): | |
e811c8ce RD |
7651 | def __repr__(self): |
7652 | return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7653 | def __init__(self, *args, **kwargs): |
e811c8ce | 7654 | """__init__(int vgap=0, int hgap=0) -> GridBagSizer""" |
d14a1e28 RD |
7655 | newobj = _core.new_GridBagSizer(*args, **kwargs) |
7656 | self.this = newobj.this | |
7657 | self.thisown = 1 | |
7658 | del newobj.thisown | |
e811c8ce | 7659 | def Add(*args, **kwargs): |
0df68c9f RD |
7660 | """ |
7661 | Add(PyObject item, GBPosition pos, GBSpan span=DefaultSpan, | |
7662 | int flag=0, int border=0, PyObject userData=None) -> bool | |
7663 | """ | |
e811c8ce RD |
7664 | return _core.GridBagSizer_Add(*args, **kwargs) |
7665 | ||
7666 | def AddItem(*args, **kwargs): | |
7667 | """AddItem(GBSizerItem item) -> bool""" | |
7668 | return _core.GridBagSizer_AddItem(*args, **kwargs) | |
7669 | ||
7670 | def GetEmptyCellSize(*args, **kwargs): | |
7671 | """GetEmptyCellSize() -> Size""" | |
7672 | return _core.GridBagSizer_GetEmptyCellSize(*args, **kwargs) | |
7673 | ||
7674 | def SetEmptyCellSize(*args, **kwargs): | |
7675 | """SetEmptyCellSize(Size sz)""" | |
7676 | return _core.GridBagSizer_SetEmptyCellSize(*args, **kwargs) | |
7677 | ||
7678 | def GetItemPosition(*args): | |
0df68c9f RD |
7679 | """ |
7680 | GetItemPosition(Window window) -> GBPosition | |
7681 | GetItemPosition(Sizer sizer) -> GBPosition | |
7682 | GetItemPosition(size_t index) -> GBPosition | |
7683 | """ | |
e811c8ce RD |
7684 | return _core.GridBagSizer_GetItemPosition(*args) |
7685 | ||
7686 | def SetItemPosition(*args): | |
0df68c9f RD |
7687 | """ |
7688 | SetItemPosition(Window window, GBPosition pos) -> bool | |
7689 | SetItemPosition(Sizer sizer, GBPosition pos) -> bool | |
7690 | SetItemPosition(size_t index, GBPosition pos) -> bool | |
7691 | """ | |
e811c8ce RD |
7692 | return _core.GridBagSizer_SetItemPosition(*args) |
7693 | ||
7694 | def GetItemSpan(*args): | |
0df68c9f RD |
7695 | """ |
7696 | GetItemSpan(Window window) -> GBSpan | |
7697 | GetItemSpan(Sizer sizer) -> GBSpan | |
7698 | GetItemSpan(size_t index) -> GBSpan | |
7699 | """ | |
e811c8ce RD |
7700 | return _core.GridBagSizer_GetItemSpan(*args) |
7701 | ||
7702 | def SetItemSpan(*args): | |
0df68c9f RD |
7703 | """ |
7704 | SetItemSpan(Window window, GBSpan span) -> bool | |
7705 | SetItemSpan(Sizer sizer, GBSpan span) -> bool | |
7706 | SetItemSpan(size_t index, GBSpan span) -> bool | |
7707 | """ | |
e811c8ce RD |
7708 | return _core.GridBagSizer_SetItemSpan(*args) |
7709 | ||
7710 | def FindItem(*args): | |
0df68c9f RD |
7711 | """ |
7712 | FindItem(Window window) -> GBSizerItem | |
7713 | FindItem(Sizer sizer) -> GBSizerItem | |
7714 | """ | |
e811c8ce RD |
7715 | return _core.GridBagSizer_FindItem(*args) |
7716 | ||
7717 | def FindItemAtPosition(*args, **kwargs): | |
7718 | """FindItemAtPosition(GBPosition pos) -> GBSizerItem""" | |
7719 | return _core.GridBagSizer_FindItemAtPosition(*args, **kwargs) | |
7720 | ||
7721 | def FindItemAtPoint(*args, **kwargs): | |
7722 | """FindItemAtPoint(Point pt) -> GBSizerItem""" | |
7723 | return _core.GridBagSizer_FindItemAtPoint(*args, **kwargs) | |
7724 | ||
7725 | def FindItemWithData(*args, **kwargs): | |
7726 | """FindItemWithData(Object userData) -> GBSizerItem""" | |
7727 | return _core.GridBagSizer_FindItemWithData(*args, **kwargs) | |
7728 | ||
7729 | def RecalcSizes(*args, **kwargs): | |
7730 | """RecalcSizes()""" | |
7731 | return _core.GridBagSizer_RecalcSizes(*args, **kwargs) | |
7732 | ||
7733 | def CalcMin(*args, **kwargs): | |
7734 | """CalcMin() -> Size""" | |
7735 | return _core.GridBagSizer_CalcMin(*args, **kwargs) | |
7736 | ||
7737 | def CheckForIntersection(*args): | |
0df68c9f RD |
7738 | """ |
7739 | CheckForIntersection(GBSizerItem item, GBSizerItem excludeItem=None) -> bool | |
7740 | CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool | |
7741 | """ | |
e811c8ce RD |
7742 | return _core.GridBagSizer_CheckForIntersection(*args) |
7743 | ||
d14a1e28 RD |
7744 | |
7745 | class GridBagSizerPtr(GridBagSizer): | |
7746 | def __init__(self, this): | |
7747 | self.this = this | |
7748 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7749 | self.__class__ = GridBagSizer | |
7750 | _core.GridBagSizer_swigregister(GridBagSizerPtr) | |
7751 | ||
7752 | #--------------------------------------------------------------------------- | |
7753 | ||
7754 | Left = _core.Left | |
7755 | Top = _core.Top | |
7756 | Right = _core.Right | |
7757 | Bottom = _core.Bottom | |
7758 | Width = _core.Width | |
7759 | Height = _core.Height | |
7760 | Centre = _core.Centre | |
7761 | Center = _core.Center | |
7762 | CentreX = _core.CentreX | |
7763 | CentreY = _core.CentreY | |
7764 | Unconstrained = _core.Unconstrained | |
7765 | AsIs = _core.AsIs | |
7766 | PercentOf = _core.PercentOf | |
7767 | Above = _core.Above | |
7768 | Below = _core.Below | |
7769 | LeftOf = _core.LeftOf | |
7770 | RightOf = _core.RightOf | |
7771 | SameAs = _core.SameAs | |
7772 | Absolute = _core.Absolute | |
7773 | class IndividualLayoutConstraint(Object): | |
d14a1e28 RD |
7774 | def __init__(self): raise RuntimeError, "No constructor defined" |
7775 | def __repr__(self): | |
7776 | return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 7777 | def Set(*args, **kwargs): |
0df68c9f RD |
7778 | """ |
7779 | Set(wxRelationship rel, Window otherW, wxEdge otherE, int val=0, | |
7780 | int marg=wxLAYOUT_DEFAULT_MARGIN) | |
7781 | """ | |
e811c8ce RD |
7782 | return _core.IndividualLayoutConstraint_Set(*args, **kwargs) |
7783 | ||
7784 | def LeftOf(*args, **kwargs): | |
7785 | """LeftOf(Window sibling, int marg=0)""" | |
7786 | return _core.IndividualLayoutConstraint_LeftOf(*args, **kwargs) | |
7787 | ||
7788 | def RightOf(*args, **kwargs): | |
7789 | """RightOf(Window sibling, int marg=0)""" | |
7790 | return _core.IndividualLayoutConstraint_RightOf(*args, **kwargs) | |
7791 | ||
7792 | def Above(*args, **kwargs): | |
7793 | """Above(Window sibling, int marg=0)""" | |
7794 | return _core.IndividualLayoutConstraint_Above(*args, **kwargs) | |
7795 | ||
7796 | def Below(*args, **kwargs): | |
7797 | """Below(Window sibling, int marg=0)""" | |
7798 | return _core.IndividualLayoutConstraint_Below(*args, **kwargs) | |
7799 | ||
7800 | def SameAs(*args, **kwargs): | |
7801 | """SameAs(Window otherW, wxEdge edge, int marg=0)""" | |
7802 | return _core.IndividualLayoutConstraint_SameAs(*args, **kwargs) | |
7803 | ||
7804 | def PercentOf(*args, **kwargs): | |
7805 | """PercentOf(Window otherW, wxEdge wh, int per)""" | |
7806 | return _core.IndividualLayoutConstraint_PercentOf(*args, **kwargs) | |
7807 | ||
7808 | def Absolute(*args, **kwargs): | |
7809 | """Absolute(int val)""" | |
7810 | return _core.IndividualLayoutConstraint_Absolute(*args, **kwargs) | |
7811 | ||
7812 | def Unconstrained(*args, **kwargs): | |
7813 | """Unconstrained()""" | |
7814 | return _core.IndividualLayoutConstraint_Unconstrained(*args, **kwargs) | |
7815 | ||
7816 | def AsIs(*args, **kwargs): | |
7817 | """AsIs()""" | |
7818 | return _core.IndividualLayoutConstraint_AsIs(*args, **kwargs) | |
7819 | ||
7820 | def GetOtherWindow(*args, **kwargs): | |
7821 | """GetOtherWindow() -> Window""" | |
7822 | return _core.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs) | |
7823 | ||
7824 | def GetMyEdge(*args, **kwargs): | |
7825 | """GetMyEdge() -> wxEdge""" | |
7826 | return _core.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs) | |
7827 | ||
7828 | def SetEdge(*args, **kwargs): | |
7829 | """SetEdge(wxEdge which)""" | |
7830 | return _core.IndividualLayoutConstraint_SetEdge(*args, **kwargs) | |
7831 | ||
7832 | def SetValue(*args, **kwargs): | |
7833 | """SetValue(int v)""" | |
7834 | return _core.IndividualLayoutConstraint_SetValue(*args, **kwargs) | |
7835 | ||
7836 | def GetMargin(*args, **kwargs): | |
7837 | """GetMargin() -> int""" | |
7838 | return _core.IndividualLayoutConstraint_GetMargin(*args, **kwargs) | |
7839 | ||
7840 | def SetMargin(*args, **kwargs): | |
7841 | """SetMargin(int m)""" | |
7842 | return _core.IndividualLayoutConstraint_SetMargin(*args, **kwargs) | |
7843 | ||
7844 | def GetValue(*args, **kwargs): | |
7845 | """GetValue() -> int""" | |
7846 | return _core.IndividualLayoutConstraint_GetValue(*args, **kwargs) | |
7847 | ||
7848 | def GetPercent(*args, **kwargs): | |
7849 | """GetPercent() -> int""" | |
7850 | return _core.IndividualLayoutConstraint_GetPercent(*args, **kwargs) | |
7851 | ||
7852 | def GetOtherEdge(*args, **kwargs): | |
7853 | """GetOtherEdge() -> int""" | |
7854 | return _core.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs) | |
7855 | ||
7856 | def GetDone(*args, **kwargs): | |
7857 | """GetDone() -> bool""" | |
7858 | return _core.IndividualLayoutConstraint_GetDone(*args, **kwargs) | |
7859 | ||
7860 | def SetDone(*args, **kwargs): | |
7861 | """SetDone(bool d)""" | |
7862 | return _core.IndividualLayoutConstraint_SetDone(*args, **kwargs) | |
7863 | ||
7864 | def GetRelationship(*args, **kwargs): | |
7865 | """GetRelationship() -> wxRelationship""" | |
7866 | return _core.IndividualLayoutConstraint_GetRelationship(*args, **kwargs) | |
7867 | ||
7868 | def SetRelationship(*args, **kwargs): | |
7869 | """SetRelationship(wxRelationship r)""" | |
7870 | return _core.IndividualLayoutConstraint_SetRelationship(*args, **kwargs) | |
7871 | ||
7872 | def ResetIfWin(*args, **kwargs): | |
7873 | """ResetIfWin(Window otherW) -> bool""" | |
7874 | return _core.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs) | |
7875 | ||
7876 | def SatisfyConstraint(*args, **kwargs): | |
7877 | """SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool""" | |
7878 | return _core.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs) | |
7879 | ||
7880 | def GetEdge(*args, **kwargs): | |
7881 | """GetEdge(wxEdge which, Window thisWin, Window other) -> int""" | |
7882 | return _core.IndividualLayoutConstraint_GetEdge(*args, **kwargs) | |
7883 | ||
d14a1e28 RD |
7884 | |
7885 | class IndividualLayoutConstraintPtr(IndividualLayoutConstraint): | |
7886 | def __init__(self, this): | |
7887 | self.this = this | |
7888 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7889 | self.__class__ = IndividualLayoutConstraint | |
7890 | _core.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr) | |
7891 | ||
7892 | class LayoutConstraints(Object): | |
e811c8ce RD |
7893 | def __repr__(self): |
7894 | return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
7895 | left = property(_core.LayoutConstraints_left_get) |
7896 | top = property(_core.LayoutConstraints_top_get) | |
7897 | right = property(_core.LayoutConstraints_right_get) | |
7898 | bottom = property(_core.LayoutConstraints_bottom_get) | |
7899 | width = property(_core.LayoutConstraints_width_get) | |
7900 | height = property(_core.LayoutConstraints_height_get) | |
7901 | centreX = property(_core.LayoutConstraints_centreX_get) | |
7902 | centreY = property(_core.LayoutConstraints_centreY_get) | |
7903 | def __init__(self, *args, **kwargs): | |
e811c8ce | 7904 | """__init__() -> LayoutConstraints""" |
d14a1e28 RD |
7905 | newobj = _core.new_LayoutConstraints(*args, **kwargs) |
7906 | self.this = newobj.this | |
7907 | self.thisown = 1 | |
7908 | del newobj.thisown | |
e811c8ce | 7909 | def SatisfyConstraints(*args, **kwargs): |
6c3b4aae | 7910 | """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)""" |
e811c8ce RD |
7911 | return _core.LayoutConstraints_SatisfyConstraints(*args, **kwargs) |
7912 | ||
7913 | def AreSatisfied(*args, **kwargs): | |
7914 | """AreSatisfied() -> bool""" | |
7915 | return _core.LayoutConstraints_AreSatisfied(*args, **kwargs) | |
7916 | ||
d14a1e28 RD |
7917 | |
7918 | class LayoutConstraintsPtr(LayoutConstraints): | |
7919 | def __init__(self, this): | |
7920 | self.this = this | |
7921 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7922 | self.__class__ = LayoutConstraints | |
7923 | _core.LayoutConstraints_swigregister(LayoutConstraintsPtr) | |
7924 | ||
7925 | #---------------------------------------------------------------------------- | |
7926 | ||
322913ce | 7927 | # Use Python's bool constants if available, make some if not |
d14a1e28 RD |
7928 | try: |
7929 | True | |
7930 | except NameError: | |
322913ce RD |
7931 | __builtins__.True = 1==1 |
7932 | __builtins__.False = 1==0 | |
d14a1e28 | 7933 | |
d14a1e28 RD |
7934 | |
7935 | ||
7936 | # workarounds for bad wxRTTI names | |
7937 | __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge' | |
7938 | __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider' | |
7939 | __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar' | |
7940 | ||
7941 | ||
7942 | #---------------------------------------------------------------------------- | |
7943 | # Load version numbers from __version__... Ensure that major and minor | |
7944 | # versions are the same for both wxPython and wxWindows. | |
7945 | ||
7946 | from __version__ import * | |
7947 | __version__ = VERSION_STRING | |
7948 | ||
7949 | assert MAJOR_VERSION == _core.MAJOR_VERSION, "wxPython/wxWindows version mismatch" | |
7950 | assert MINOR_VERSION == _core.MINOR_VERSION, "wxPython/wxWindows version mismatch" | |
7951 | if RELEASE_VERSION != _core.RELEASE_VERSION: | |
7952 | import warnings | |
7953 | warnings.warn("wxPython/wxWindows release number mismatch") | |
7954 | ||
7955 | #---------------------------------------------------------------------------- | |
7956 | ||
7957 | class PyDeadObjectError(AttributeError): | |
7958 | pass | |
7959 | ||
7960 | ||
7961 | class _wxPyDeadObject(object): | |
7962 | """ | |
7963 | Instances of wx objects that are OOR capable will have their __class__ | |
7964 | changed to this class when the C++ object is deleted. This should help | |
7965 | prevent crashes due to referencing a bogus C++ pointer. | |
7966 | """ | |
7967 | reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)" | |
7968 | attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed." | |
7969 | ||
7970 | def __repr__( self ): | |
7971 | if not hasattr(self, "_name"): | |
7972 | self._name = "[unknown]" | |
7973 | return self.reprStr % self._name | |
7974 | ||
7975 | def __getattr__( self, *args ): | |
7976 | if not hasattr(self, "_name"): | |
7977 | self._name = "[unknown]" | |
7978 | raise PyDeadObjectError( self.attrStr % self._name ) | |
7979 | ||
7980 | def __nonzero__(self): | |
7981 | return 0 | |
7982 | ||
7983 | ||
7984 | #---------------------------------------------------------------------------- | |
7985 | _wxPyCallAfterId = None | |
7986 | ||
7987 | def CallAfter(callable, *args, **kw): | |
7988 | """ | |
7989 | Call the specified function after the current and pending event | |
7990 | handlers have been completed. This is also good for making GUI | |
7991 | method calls from non-GUI threads. | |
7992 | """ | |
7993 | app = wx.GetApp() | |
7994 | assert app, 'No wxApp created yet' | |
7995 | ||
7996 | global _wxPyCallAfterId | |
7997 | if _wxPyCallAfterId is None: | |
7998 | _wxPyCallAfterId = wx.NewEventType() | |
7999 | app.Connect(-1, -1, _wxPyCallAfterId, | |
8000 | lambda event: event.callable(*event.args, **event.kw) ) | |
8001 | evt = wx.PyEvent() | |
8002 | evt.SetEventType(_wxPyCallAfterId) | |
8003 | evt.callable = callable | |
8004 | evt.args = args | |
8005 | evt.kw = kw | |
8006 | wx.PostEvent(app, evt) | |
8007 | ||
8008 | ||
8009 | #---------------------------------------------------------------------------- | |
8010 | ||
8011 | ||
8012 | class FutureCall: | |
8013 | """ | |
8014 | A convenience class for wxTimer, that calls the given callable | |
8015 | object once after the given amount of milliseconds, passing any | |
8016 | positional or keyword args. The return value of the callable is | |
8017 | availbale after it has been run with the GetResult method. | |
8018 | ||
8019 | If you don't need to get the return value or restart the timer | |
8020 | then there is no need to hold a reference to this object. It will | |
8021 | hold a reference to itself while the timer is running (the timer | |
8022 | has a reference to self.Notify) but the cycle will be broken when | |
8023 | the timer completes, automatically cleaning up the wx.FutureCall | |
8024 | object. | |
8025 | """ | |
8026 | def __init__(self, millis, callable, *args, **kwargs): | |
8027 | self.millis = millis | |
8028 | self.callable = callable | |
8029 | self.SetArgs(*args, **kwargs) | |
8030 | self.runCount = 0 | |
8031 | self.hasRun = False | |
8032 | self.result = None | |
8033 | self.timer = None | |
8034 | self.Start() | |
8035 | ||
8036 | def __del__(self): | |
8037 | self.Stop() | |
8038 | ||
8039 | ||
8040 | def Start(self, millis=None, *args, **kwargs): | |
8041 | """ | |
8042 | (Re)start the timer | |
8043 | """ | |
8044 | self.hasRun = False | |
8045 | if millis is not None: | |
8046 | self.millis = millis | |
8047 | if args or kwargs: | |
8048 | self.SetArgs(*args, **kwargs) | |
8049 | self.Stop() | |
8050 | self.timer = wx.PyTimer(self.Notify) | |
8051 | self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) | |
8052 | Restart = Start | |
8053 | ||
8054 | ||
8055 | def Stop(self): | |
8056 | """ | |
8057 | Stop and destroy the timer. | |
8058 | """ | |
8059 | if self.timer is not None: | |
8060 | self.timer.Stop() | |
8061 | self.timer = None | |
8062 | ||
8063 | ||
8064 | def GetInterval(self): | |
8065 | if self.timer is not None: | |
8066 | return self.timer.GetInterval() | |
8067 | else: | |
8068 | return 0 | |
8069 | ||
8070 | ||
8071 | def IsRunning(self): | |
8072 | return self.timer is not None and self.timer.IsRunning() | |
8073 | ||
8074 | ||
8075 | def SetArgs(self, *args, **kwargs): | |
8076 | """ | |
8077 | (Re)set the args passed to the callable object. This is | |
8078 | useful in conjunction with Restart if you want to schedule a | |
8079 | new call to the same callable object but with different | |
8080 | parameters. | |
8081 | """ | |
8082 | self.args = args | |
8083 | self.kwargs = kwargs | |
8084 | ||
8085 | ||
8086 | def HasRun(self): | |
8087 | return self.hasRun | |
8088 | ||
8089 | def GetResult(self): | |
8090 | return self.result | |
8091 | ||
8092 | def Notify(self): | |
8093 | """ | |
8094 | The timer has expired so call the callable. | |
8095 | """ | |
8096 | if self.callable and getattr(self.callable, 'im_self', True): | |
8097 | self.runCount += 1 | |
8098 | self.result = self.callable(*self.args, **self.kwargs) | |
8099 | self.hasRun = True | |
8100 | wx.CallAfter(self.Stop) | |
8101 | ||
8102 | ||
8103 | #---------------------------------------------------------------------------- | |
8104 | #---------------------------------------------------------------------------- | |
8105 | ||
8106 | # Import other modules in this package that should show up in the | |
8107 | # "core" wx namespace | |
8108 | from gdi import * | |
8109 | from windows import * | |
8110 | from controls import * | |
8111 | from misc import * | |
8112 | ||
8113 | #---------------------------------------------------------------------------- | |
8114 | #---------------------------------------------------------------------------- | |
8115 | ||
8116 |