]>
Commit | Line | Data |
---|---|---|
d14a1e28 RD |
1 | # This file was created automatically by SWIG. |
2 | # Don't modify this file, modify the SWIG interface instead. | |
3 | ||
4 | import _core | |
5 | ||
6 | #// Give a reference to the dictionary of this module to the C++ extension | |
7 | #// code. | |
8 | _core._wxPySetDictionary(vars()) | |
9 | ||
10 | #// A little trick to make 'wx' be a reference to this module so wx.Names can | |
11 | #// be used here. | |
12 | import sys as _sys | |
13 | wx = _sys.modules[__name__] | |
14 | ||
15 | NOT_FOUND = _core.NOT_FOUND | |
16 | VSCROLL = _core.VSCROLL | |
17 | HSCROLL = _core.HSCROLL | |
18 | CAPTION = _core.CAPTION | |
19 | DOUBLE_BORDER = _core.DOUBLE_BORDER | |
20 | SUNKEN_BORDER = _core.SUNKEN_BORDER | |
21 | RAISED_BORDER = _core.RAISED_BORDER | |
22 | BORDER = _core.BORDER | |
23 | SIMPLE_BORDER = _core.SIMPLE_BORDER | |
24 | STATIC_BORDER = _core.STATIC_BORDER | |
25 | TRANSPARENT_WINDOW = _core.TRANSPARENT_WINDOW | |
26 | NO_BORDER = _core.NO_BORDER | |
27 | USER_COLOURS = _core.USER_COLOURS | |
28 | NO_3D = _core.NO_3D | |
29 | TAB_TRAVERSAL = _core.TAB_TRAVERSAL | |
30 | WANTS_CHARS = _core.WANTS_CHARS | |
31 | POPUP_WINDOW = _core.POPUP_WINDOW | |
32 | CENTER_FRAME = _core.CENTER_FRAME | |
33 | CENTRE_ON_SCREEN = _core.CENTRE_ON_SCREEN | |
34 | CENTER_ON_SCREEN = _core.CENTER_ON_SCREEN | |
35 | STAY_ON_TOP = _core.STAY_ON_TOP | |
36 | ICONIZE = _core.ICONIZE | |
37 | MINIMIZE = _core.MINIMIZE | |
38 | MAXIMIZE = _core.MAXIMIZE | |
39 | CLOSE_BOX = _core.CLOSE_BOX | |
40 | THICK_FRAME = _core.THICK_FRAME | |
41 | SYSTEM_MENU = _core.SYSTEM_MENU | |
42 | MINIMIZE_BOX = _core.MINIMIZE_BOX | |
43 | MAXIMIZE_BOX = _core.MAXIMIZE_BOX | |
44 | TINY_CAPTION_HORIZ = _core.TINY_CAPTION_HORIZ | |
45 | TINY_CAPTION_VERT = _core.TINY_CAPTION_VERT | |
46 | RESIZE_BOX = _core.RESIZE_BOX | |
47 | RESIZE_BORDER = _core.RESIZE_BORDER | |
48 | DIALOG_MODAL = _core.DIALOG_MODAL | |
49 | DIALOG_MODELESS = _core.DIALOG_MODELESS | |
50 | DIALOG_NO_PARENT = _core.DIALOG_NO_PARENT | |
51 | DEFAULT_FRAME_STYLE = _core.DEFAULT_FRAME_STYLE | |
52 | DEFAULT_DIALOG_STYLE = _core.DEFAULT_DIALOG_STYLE | |
53 | FRAME_TOOL_WINDOW = _core.FRAME_TOOL_WINDOW | |
54 | FRAME_FLOAT_ON_PARENT = _core.FRAME_FLOAT_ON_PARENT | |
55 | FRAME_NO_WINDOW_MENU = _core.FRAME_NO_WINDOW_MENU | |
56 | FRAME_NO_TASKBAR = _core.FRAME_NO_TASKBAR | |
57 | FRAME_SHAPED = _core.FRAME_SHAPED | |
58 | ED_CLIENT_MARGIN = _core.ED_CLIENT_MARGIN | |
59 | ED_BUTTONS_BOTTOM = _core.ED_BUTTONS_BOTTOM | |
60 | ED_BUTTONS_RIGHT = _core.ED_BUTTONS_RIGHT | |
61 | ED_STATIC_LINE = _core.ED_STATIC_LINE | |
62 | EXT_DIALOG_STYLE = _core.EXT_DIALOG_STYLE | |
63 | CLIP_CHILDREN = _core.CLIP_CHILDREN | |
64 | CLIP_SIBLINGS = _core.CLIP_SIBLINGS | |
65 | RETAINED = _core.RETAINED | |
66 | BACKINGSTORE = _core.BACKINGSTORE | |
67 | COLOURED = _core.COLOURED | |
68 | FIXED_LENGTH = _core.FIXED_LENGTH | |
69 | LB_NEEDED_SB = _core.LB_NEEDED_SB | |
70 | LB_ALWAYS_SB = _core.LB_ALWAYS_SB | |
71 | LB_SORT = _core.LB_SORT | |
72 | LB_SINGLE = _core.LB_SINGLE | |
73 | LB_MULTIPLE = _core.LB_MULTIPLE | |
74 | LB_EXTENDED = _core.LB_EXTENDED | |
75 | LB_OWNERDRAW = _core.LB_OWNERDRAW | |
76 | LB_HSCROLL = _core.LB_HSCROLL | |
77 | PROCESS_ENTER = _core.PROCESS_ENTER | |
78 | PASSWORD = _core.PASSWORD | |
79 | CB_SIMPLE = _core.CB_SIMPLE | |
80 | CB_DROPDOWN = _core.CB_DROPDOWN | |
81 | CB_SORT = _core.CB_SORT | |
82 | CB_READONLY = _core.CB_READONLY | |
83 | RA_HORIZONTAL = _core.RA_HORIZONTAL | |
84 | RA_VERTICAL = _core.RA_VERTICAL | |
85 | RA_SPECIFY_ROWS = _core.RA_SPECIFY_ROWS | |
86 | RA_SPECIFY_COLS = _core.RA_SPECIFY_COLS | |
87 | RB_GROUP = _core.RB_GROUP | |
88 | RB_SINGLE = _core.RB_SINGLE | |
89 | SL_HORIZONTAL = _core.SL_HORIZONTAL | |
90 | SL_VERTICAL = _core.SL_VERTICAL | |
91 | SL_AUTOTICKS = _core.SL_AUTOTICKS | |
92 | SL_LABELS = _core.SL_LABELS | |
93 | SL_LEFT = _core.SL_LEFT | |
94 | SL_TOP = _core.SL_TOP | |
95 | SL_RIGHT = _core.SL_RIGHT | |
96 | SL_BOTTOM = _core.SL_BOTTOM | |
97 | SL_BOTH = _core.SL_BOTH | |
98 | SL_SELRANGE = _core.SL_SELRANGE | |
99 | SB_HORIZONTAL = _core.SB_HORIZONTAL | |
100 | SB_VERTICAL = _core.SB_VERTICAL | |
101 | ST_SIZEGRIP = _core.ST_SIZEGRIP | |
102 | ST_NO_AUTORESIZE = _core.ST_NO_AUTORESIZE | |
103 | FLOOD_SURFACE = _core.FLOOD_SURFACE | |
104 | FLOOD_BORDER = _core.FLOOD_BORDER | |
105 | ODDEVEN_RULE = _core.ODDEVEN_RULE | |
106 | WINDING_RULE = _core.WINDING_RULE | |
107 | TOOL_TOP = _core.TOOL_TOP | |
108 | TOOL_BOTTOM = _core.TOOL_BOTTOM | |
109 | TOOL_LEFT = _core.TOOL_LEFT | |
110 | TOOL_RIGHT = _core.TOOL_RIGHT | |
111 | OK = _core.OK | |
112 | YES_NO = _core.YES_NO | |
113 | CANCEL = _core.CANCEL | |
114 | YES = _core.YES | |
115 | NO = _core.NO | |
116 | NO_DEFAULT = _core.NO_DEFAULT | |
117 | YES_DEFAULT = _core.YES_DEFAULT | |
118 | ICON_EXCLAMATION = _core.ICON_EXCLAMATION | |
119 | ICON_HAND = _core.ICON_HAND | |
120 | ICON_QUESTION = _core.ICON_QUESTION | |
121 | ICON_INFORMATION = _core.ICON_INFORMATION | |
122 | ICON_STOP = _core.ICON_STOP | |
123 | ICON_ASTERISK = _core.ICON_ASTERISK | |
124 | ICON_MASK = _core.ICON_MASK | |
125 | ICON_WARNING = _core.ICON_WARNING | |
126 | ICON_ERROR = _core.ICON_ERROR | |
127 | FORWARD = _core.FORWARD | |
128 | BACKWARD = _core.BACKWARD | |
129 | RESET = _core.RESET | |
130 | HELP = _core.HELP | |
131 | MORE = _core.MORE | |
132 | SETUP = _core.SETUP | |
133 | SIZE_AUTO_WIDTH = _core.SIZE_AUTO_WIDTH | |
134 | SIZE_AUTO_HEIGHT = _core.SIZE_AUTO_HEIGHT | |
135 | SIZE_AUTO = _core.SIZE_AUTO | |
136 | SIZE_USE_EXISTING = _core.SIZE_USE_EXISTING | |
137 | SIZE_ALLOW_MINUS_ONE = _core.SIZE_ALLOW_MINUS_ONE | |
138 | PORTRAIT = _core.PORTRAIT | |
139 | LANDSCAPE = _core.LANDSCAPE | |
140 | PRINT_QUALITY_HIGH = _core.PRINT_QUALITY_HIGH | |
141 | PRINT_QUALITY_MEDIUM = _core.PRINT_QUALITY_MEDIUM | |
142 | PRINT_QUALITY_LOW = _core.PRINT_QUALITY_LOW | |
143 | PRINT_QUALITY_DRAFT = _core.PRINT_QUALITY_DRAFT | |
144 | ID_ANY = _core.ID_ANY | |
145 | ID_SEPARATOR = _core.ID_SEPARATOR | |
146 | ID_LOWEST = _core.ID_LOWEST | |
147 | ID_OPEN = _core.ID_OPEN | |
148 | ID_CLOSE = _core.ID_CLOSE | |
149 | ID_NEW = _core.ID_NEW | |
150 | ID_SAVE = _core.ID_SAVE | |
151 | ID_SAVEAS = _core.ID_SAVEAS | |
152 | ID_REVERT = _core.ID_REVERT | |
153 | ID_EXIT = _core.ID_EXIT | |
154 | ID_UNDO = _core.ID_UNDO | |
155 | ID_REDO = _core.ID_REDO | |
156 | ID_HELP = _core.ID_HELP | |
157 | ID_PRINT = _core.ID_PRINT | |
158 | ID_PRINT_SETUP = _core.ID_PRINT_SETUP | |
159 | ID_PREVIEW = _core.ID_PREVIEW | |
160 | ID_ABOUT = _core.ID_ABOUT | |
161 | ID_HELP_CONTENTS = _core.ID_HELP_CONTENTS | |
162 | ID_HELP_COMMANDS = _core.ID_HELP_COMMANDS | |
163 | ID_HELP_PROCEDURES = _core.ID_HELP_PROCEDURES | |
164 | ID_HELP_CONTEXT = _core.ID_HELP_CONTEXT | |
165 | ID_CLOSE_ALL = _core.ID_CLOSE_ALL | |
166 | ID_PREFERENCES = _core.ID_PREFERENCES | |
167 | ID_CUT = _core.ID_CUT | |
168 | ID_COPY = _core.ID_COPY | |
169 | ID_PASTE = _core.ID_PASTE | |
170 | ID_CLEAR = _core.ID_CLEAR | |
171 | ID_FIND = _core.ID_FIND | |
172 | ID_DUPLICATE = _core.ID_DUPLICATE | |
173 | ID_SELECTALL = _core.ID_SELECTALL | |
174 | ID_DELETE = _core.ID_DELETE | |
175 | ID_REPLACE = _core.ID_REPLACE | |
176 | ID_REPLACE_ALL = _core.ID_REPLACE_ALL | |
177 | ID_PROPERTIES = _core.ID_PROPERTIES | |
178 | ID_VIEW_DETAILS = _core.ID_VIEW_DETAILS | |
179 | ID_VIEW_LARGEICONS = _core.ID_VIEW_LARGEICONS | |
180 | ID_VIEW_SMALLICONS = _core.ID_VIEW_SMALLICONS | |
181 | ID_VIEW_LIST = _core.ID_VIEW_LIST | |
182 | ID_VIEW_SORTDATE = _core.ID_VIEW_SORTDATE | |
183 | ID_VIEW_SORTNAME = _core.ID_VIEW_SORTNAME | |
184 | ID_VIEW_SORTSIZE = _core.ID_VIEW_SORTSIZE | |
185 | ID_VIEW_SORTTYPE = _core.ID_VIEW_SORTTYPE | |
186 | ID_FILE1 = _core.ID_FILE1 | |
187 | ID_FILE2 = _core.ID_FILE2 | |
188 | ID_FILE3 = _core.ID_FILE3 | |
189 | ID_FILE4 = _core.ID_FILE4 | |
190 | ID_FILE5 = _core.ID_FILE5 | |
191 | ID_FILE6 = _core.ID_FILE6 | |
192 | ID_FILE7 = _core.ID_FILE7 | |
193 | ID_FILE8 = _core.ID_FILE8 | |
194 | ID_FILE9 = _core.ID_FILE9 | |
195 | ID_OK = _core.ID_OK | |
196 | ID_CANCEL = _core.ID_CANCEL | |
197 | ID_APPLY = _core.ID_APPLY | |
198 | ID_YES = _core.ID_YES | |
199 | ID_NO = _core.ID_NO | |
200 | ID_STATIC = _core.ID_STATIC | |
201 | ID_FORWARD = _core.ID_FORWARD | |
202 | ID_BACKWARD = _core.ID_BACKWARD | |
203 | ID_DEFAULT = _core.ID_DEFAULT | |
204 | ID_MORE = _core.ID_MORE | |
205 | ID_SETUP = _core.ID_SETUP | |
206 | ID_RESET = _core.ID_RESET | |
207 | ID_CONTEXT_HELP = _core.ID_CONTEXT_HELP | |
208 | ID_YESTOALL = _core.ID_YESTOALL | |
209 | ID_NOTOALL = _core.ID_NOTOALL | |
210 | ID_ABORT = _core.ID_ABORT | |
211 | ID_RETRY = _core.ID_RETRY | |
212 | ID_IGNORE = _core.ID_IGNORE | |
213 | ID_HIGHEST = _core.ID_HIGHEST | |
214 | OPEN = _core.OPEN | |
215 | SAVE = _core.SAVE | |
216 | HIDE_READONLY = _core.HIDE_READONLY | |
217 | OVERWRITE_PROMPT = _core.OVERWRITE_PROMPT | |
218 | FILE_MUST_EXIST = _core.FILE_MUST_EXIST | |
219 | MULTIPLE = _core.MULTIPLE | |
220 | CHANGE_DIR = _core.CHANGE_DIR | |
221 | ACCEL_ALT = _core.ACCEL_ALT | |
222 | ACCEL_CTRL = _core.ACCEL_CTRL | |
223 | ACCEL_SHIFT = _core.ACCEL_SHIFT | |
224 | ACCEL_NORMAL = _core.ACCEL_NORMAL | |
225 | PD_AUTO_HIDE = _core.PD_AUTO_HIDE | |
226 | PD_APP_MODAL = _core.PD_APP_MODAL | |
227 | PD_CAN_ABORT = _core.PD_CAN_ABORT | |
228 | PD_ELAPSED_TIME = _core.PD_ELAPSED_TIME | |
229 | PD_ESTIMATED_TIME = _core.PD_ESTIMATED_TIME | |
230 | PD_REMAINING_TIME = _core.PD_REMAINING_TIME | |
231 | DD_NEW_DIR_BUTTON = _core.DD_NEW_DIR_BUTTON | |
232 | DD_DEFAULT_STYLE = _core.DD_DEFAULT_STYLE | |
233 | MENU_TEAROFF = _core.MENU_TEAROFF | |
234 | MB_DOCKABLE = _core.MB_DOCKABLE | |
235 | NO_FULL_REPAINT_ON_RESIZE = _core.NO_FULL_REPAINT_ON_RESIZE | |
cc6dd355 | 236 | FULL_REPAINT_ON_RESIZE = _core.FULL_REPAINT_ON_RESIZE |
d14a1e28 RD |
237 | LI_HORIZONTAL = _core.LI_HORIZONTAL |
238 | LI_VERTICAL = _core.LI_VERTICAL | |
239 | WS_EX_VALIDATE_RECURSIVELY = _core.WS_EX_VALIDATE_RECURSIVELY | |
240 | WS_EX_BLOCK_EVENTS = _core.WS_EX_BLOCK_EVENTS | |
241 | WS_EX_TRANSIENT = _core.WS_EX_TRANSIENT | |
242 | WS_EX_THEMED_BACKGROUND = _core.WS_EX_THEMED_BACKGROUND | |
243 | WS_EX_PROCESS_IDLE = _core.WS_EX_PROCESS_IDLE | |
244 | WS_EX_PROCESS_UI_UPDATES = _core.WS_EX_PROCESS_UI_UPDATES | |
245 | MM_TEXT = _core.MM_TEXT | |
246 | MM_LOMETRIC = _core.MM_LOMETRIC | |
247 | MM_HIMETRIC = _core.MM_HIMETRIC | |
248 | MM_LOENGLISH = _core.MM_LOENGLISH | |
249 | MM_HIENGLISH = _core.MM_HIENGLISH | |
250 | MM_TWIPS = _core.MM_TWIPS | |
251 | MM_ISOTROPIC = _core.MM_ISOTROPIC | |
252 | MM_ANISOTROPIC = _core.MM_ANISOTROPIC | |
253 | MM_POINTS = _core.MM_POINTS | |
254 | MM_METRIC = _core.MM_METRIC | |
255 | CENTRE = _core.CENTRE | |
256 | CENTER = _core.CENTER | |
257 | HORIZONTAL = _core.HORIZONTAL | |
258 | VERTICAL = _core.VERTICAL | |
259 | BOTH = _core.BOTH | |
260 | LEFT = _core.LEFT | |
261 | RIGHT = _core.RIGHT | |
262 | UP = _core.UP | |
263 | DOWN = _core.DOWN | |
264 | TOP = _core.TOP | |
265 | BOTTOM = _core.BOTTOM | |
266 | NORTH = _core.NORTH | |
267 | SOUTH = _core.SOUTH | |
268 | WEST = _core.WEST | |
269 | EAST = _core.EAST | |
270 | ALL = _core.ALL | |
271 | ALIGN_NOT = _core.ALIGN_NOT | |
272 | ALIGN_CENTER_HORIZONTAL = _core.ALIGN_CENTER_HORIZONTAL | |
273 | ALIGN_CENTRE_HORIZONTAL = _core.ALIGN_CENTRE_HORIZONTAL | |
274 | ALIGN_LEFT = _core.ALIGN_LEFT | |
275 | ALIGN_TOP = _core.ALIGN_TOP | |
276 | ALIGN_RIGHT = _core.ALIGN_RIGHT | |
277 | ALIGN_BOTTOM = _core.ALIGN_BOTTOM | |
278 | ALIGN_CENTER_VERTICAL = _core.ALIGN_CENTER_VERTICAL | |
279 | ALIGN_CENTRE_VERTICAL = _core.ALIGN_CENTRE_VERTICAL | |
280 | ALIGN_CENTER = _core.ALIGN_CENTER | |
281 | ALIGN_CENTRE = _core.ALIGN_CENTRE | |
282 | ALIGN_MASK = _core.ALIGN_MASK | |
283 | STRETCH_NOT = _core.STRETCH_NOT | |
284 | SHRINK = _core.SHRINK | |
285 | GROW = _core.GROW | |
286 | EXPAND = _core.EXPAND | |
287 | SHAPED = _core.SHAPED | |
288 | ADJUST_MINSIZE = _core.ADJUST_MINSIZE | |
289 | TILE = _core.TILE | |
290 | BORDER_DEFAULT = _core.BORDER_DEFAULT | |
291 | BORDER_NONE = _core.BORDER_NONE | |
292 | BORDER_STATIC = _core.BORDER_STATIC | |
293 | BORDER_SIMPLE = _core.BORDER_SIMPLE | |
294 | BORDER_RAISED = _core.BORDER_RAISED | |
295 | BORDER_SUNKEN = _core.BORDER_SUNKEN | |
296 | BORDER_DOUBLE = _core.BORDER_DOUBLE | |
297 | BORDER_MASK = _core.BORDER_MASK | |
298 | DEFAULT = _core.DEFAULT | |
299 | DECORATIVE = _core.DECORATIVE | |
300 | ROMAN = _core.ROMAN | |
301 | SCRIPT = _core.SCRIPT | |
302 | SWISS = _core.SWISS | |
303 | MODERN = _core.MODERN | |
304 | TELETYPE = _core.TELETYPE | |
305 | VARIABLE = _core.VARIABLE | |
306 | FIXED = _core.FIXED | |
307 | NORMAL = _core.NORMAL | |
308 | LIGHT = _core.LIGHT | |
309 | BOLD = _core.BOLD | |
310 | ITALIC = _core.ITALIC | |
311 | SLANT = _core.SLANT | |
312 | SOLID = _core.SOLID | |
313 | DOT = _core.DOT | |
314 | LONG_DASH = _core.LONG_DASH | |
315 | SHORT_DASH = _core.SHORT_DASH | |
316 | DOT_DASH = _core.DOT_DASH | |
317 | USER_DASH = _core.USER_DASH | |
318 | TRANSPARENT = _core.TRANSPARENT | |
319 | STIPPLE = _core.STIPPLE | |
320 | BDIAGONAL_HATCH = _core.BDIAGONAL_HATCH | |
321 | CROSSDIAG_HATCH = _core.CROSSDIAG_HATCH | |
322 | FDIAGONAL_HATCH = _core.FDIAGONAL_HATCH | |
323 | CROSS_HATCH = _core.CROSS_HATCH | |
324 | HORIZONTAL_HATCH = _core.HORIZONTAL_HATCH | |
325 | VERTICAL_HATCH = _core.VERTICAL_HATCH | |
326 | JOIN_BEVEL = _core.JOIN_BEVEL | |
327 | JOIN_MITER = _core.JOIN_MITER | |
328 | JOIN_ROUND = _core.JOIN_ROUND | |
329 | CAP_ROUND = _core.CAP_ROUND | |
330 | CAP_PROJECTING = _core.CAP_PROJECTING | |
331 | CAP_BUTT = _core.CAP_BUTT | |
332 | CLEAR = _core.CLEAR | |
333 | XOR = _core.XOR | |
334 | INVERT = _core.INVERT | |
335 | OR_REVERSE = _core.OR_REVERSE | |
336 | AND_REVERSE = _core.AND_REVERSE | |
337 | COPY = _core.COPY | |
338 | AND = _core.AND | |
339 | AND_INVERT = _core.AND_INVERT | |
340 | NO_OP = _core.NO_OP | |
341 | NOR = _core.NOR | |
342 | EQUIV = _core.EQUIV | |
343 | SRC_INVERT = _core.SRC_INVERT | |
344 | OR_INVERT = _core.OR_INVERT | |
345 | NAND = _core.NAND | |
346 | OR = _core.OR | |
347 | SET = _core.SET | |
348 | WXK_BACK = _core.WXK_BACK | |
349 | WXK_TAB = _core.WXK_TAB | |
350 | WXK_RETURN = _core.WXK_RETURN | |
351 | WXK_ESCAPE = _core.WXK_ESCAPE | |
352 | WXK_SPACE = _core.WXK_SPACE | |
353 | WXK_DELETE = _core.WXK_DELETE | |
354 | WXK_START = _core.WXK_START | |
355 | WXK_LBUTTON = _core.WXK_LBUTTON | |
356 | WXK_RBUTTON = _core.WXK_RBUTTON | |
357 | WXK_CANCEL = _core.WXK_CANCEL | |
358 | WXK_MBUTTON = _core.WXK_MBUTTON | |
359 | WXK_CLEAR = _core.WXK_CLEAR | |
360 | WXK_SHIFT = _core.WXK_SHIFT | |
361 | WXK_ALT = _core.WXK_ALT | |
362 | WXK_CONTROL = _core.WXK_CONTROL | |
363 | WXK_MENU = _core.WXK_MENU | |
364 | WXK_PAUSE = _core.WXK_PAUSE | |
365 | WXK_CAPITAL = _core.WXK_CAPITAL | |
366 | WXK_PRIOR = _core.WXK_PRIOR | |
367 | WXK_NEXT = _core.WXK_NEXT | |
368 | WXK_END = _core.WXK_END | |
369 | WXK_HOME = _core.WXK_HOME | |
370 | WXK_LEFT = _core.WXK_LEFT | |
371 | WXK_UP = _core.WXK_UP | |
372 | WXK_RIGHT = _core.WXK_RIGHT | |
373 | WXK_DOWN = _core.WXK_DOWN | |
374 | WXK_SELECT = _core.WXK_SELECT | |
375 | WXK_PRINT = _core.WXK_PRINT | |
376 | WXK_EXECUTE = _core.WXK_EXECUTE | |
377 | WXK_SNAPSHOT = _core.WXK_SNAPSHOT | |
378 | WXK_INSERT = _core.WXK_INSERT | |
379 | WXK_HELP = _core.WXK_HELP | |
380 | WXK_NUMPAD0 = _core.WXK_NUMPAD0 | |
381 | WXK_NUMPAD1 = _core.WXK_NUMPAD1 | |
382 | WXK_NUMPAD2 = _core.WXK_NUMPAD2 | |
383 | WXK_NUMPAD3 = _core.WXK_NUMPAD3 | |
384 | WXK_NUMPAD4 = _core.WXK_NUMPAD4 | |
385 | WXK_NUMPAD5 = _core.WXK_NUMPAD5 | |
386 | WXK_NUMPAD6 = _core.WXK_NUMPAD6 | |
387 | WXK_NUMPAD7 = _core.WXK_NUMPAD7 | |
388 | WXK_NUMPAD8 = _core.WXK_NUMPAD8 | |
389 | WXK_NUMPAD9 = _core.WXK_NUMPAD9 | |
390 | WXK_MULTIPLY = _core.WXK_MULTIPLY | |
391 | WXK_ADD = _core.WXK_ADD | |
392 | WXK_SEPARATOR = _core.WXK_SEPARATOR | |
393 | WXK_SUBTRACT = _core.WXK_SUBTRACT | |
394 | WXK_DECIMAL = _core.WXK_DECIMAL | |
395 | WXK_DIVIDE = _core.WXK_DIVIDE | |
396 | WXK_F1 = _core.WXK_F1 | |
397 | WXK_F2 = _core.WXK_F2 | |
398 | WXK_F3 = _core.WXK_F3 | |
399 | WXK_F4 = _core.WXK_F4 | |
400 | WXK_F5 = _core.WXK_F5 | |
401 | WXK_F6 = _core.WXK_F6 | |
402 | WXK_F7 = _core.WXK_F7 | |
403 | WXK_F8 = _core.WXK_F8 | |
404 | WXK_F9 = _core.WXK_F9 | |
405 | WXK_F10 = _core.WXK_F10 | |
406 | WXK_F11 = _core.WXK_F11 | |
407 | WXK_F12 = _core.WXK_F12 | |
408 | WXK_F13 = _core.WXK_F13 | |
409 | WXK_F14 = _core.WXK_F14 | |
410 | WXK_F15 = _core.WXK_F15 | |
411 | WXK_F16 = _core.WXK_F16 | |
412 | WXK_F17 = _core.WXK_F17 | |
413 | WXK_F18 = _core.WXK_F18 | |
414 | WXK_F19 = _core.WXK_F19 | |
415 | WXK_F20 = _core.WXK_F20 | |
416 | WXK_F21 = _core.WXK_F21 | |
417 | WXK_F22 = _core.WXK_F22 | |
418 | WXK_F23 = _core.WXK_F23 | |
419 | WXK_F24 = _core.WXK_F24 | |
420 | WXK_NUMLOCK = _core.WXK_NUMLOCK | |
421 | WXK_SCROLL = _core.WXK_SCROLL | |
422 | WXK_PAGEUP = _core.WXK_PAGEUP | |
423 | WXK_PAGEDOWN = _core.WXK_PAGEDOWN | |
424 | WXK_NUMPAD_SPACE = _core.WXK_NUMPAD_SPACE | |
425 | WXK_NUMPAD_TAB = _core.WXK_NUMPAD_TAB | |
426 | WXK_NUMPAD_ENTER = _core.WXK_NUMPAD_ENTER | |
427 | WXK_NUMPAD_F1 = _core.WXK_NUMPAD_F1 | |
428 | WXK_NUMPAD_F2 = _core.WXK_NUMPAD_F2 | |
429 | WXK_NUMPAD_F3 = _core.WXK_NUMPAD_F3 | |
430 | WXK_NUMPAD_F4 = _core.WXK_NUMPAD_F4 | |
431 | WXK_NUMPAD_HOME = _core.WXK_NUMPAD_HOME | |
432 | WXK_NUMPAD_LEFT = _core.WXK_NUMPAD_LEFT | |
433 | WXK_NUMPAD_UP = _core.WXK_NUMPAD_UP | |
434 | WXK_NUMPAD_RIGHT = _core.WXK_NUMPAD_RIGHT | |
435 | WXK_NUMPAD_DOWN = _core.WXK_NUMPAD_DOWN | |
436 | WXK_NUMPAD_PRIOR = _core.WXK_NUMPAD_PRIOR | |
437 | WXK_NUMPAD_PAGEUP = _core.WXK_NUMPAD_PAGEUP | |
438 | WXK_NUMPAD_NEXT = _core.WXK_NUMPAD_NEXT | |
439 | WXK_NUMPAD_PAGEDOWN = _core.WXK_NUMPAD_PAGEDOWN | |
440 | WXK_NUMPAD_END = _core.WXK_NUMPAD_END | |
441 | WXK_NUMPAD_BEGIN = _core.WXK_NUMPAD_BEGIN | |
442 | WXK_NUMPAD_INSERT = _core.WXK_NUMPAD_INSERT | |
443 | WXK_NUMPAD_DELETE = _core.WXK_NUMPAD_DELETE | |
444 | WXK_NUMPAD_EQUAL = _core.WXK_NUMPAD_EQUAL | |
445 | WXK_NUMPAD_MULTIPLY = _core.WXK_NUMPAD_MULTIPLY | |
446 | WXK_NUMPAD_ADD = _core.WXK_NUMPAD_ADD | |
447 | WXK_NUMPAD_SEPARATOR = _core.WXK_NUMPAD_SEPARATOR | |
448 | WXK_NUMPAD_SUBTRACT = _core.WXK_NUMPAD_SUBTRACT | |
449 | WXK_NUMPAD_DECIMAL = _core.WXK_NUMPAD_DECIMAL | |
450 | WXK_NUMPAD_DIVIDE = _core.WXK_NUMPAD_DIVIDE | |
451 | WXK_WINDOWS_LEFT = _core.WXK_WINDOWS_LEFT | |
452 | WXK_WINDOWS_RIGHT = _core.WXK_WINDOWS_RIGHT | |
453 | WXK_WINDOWS_MENU = _core.WXK_WINDOWS_MENU | |
454 | PAPER_NONE = _core.PAPER_NONE | |
455 | PAPER_LETTER = _core.PAPER_LETTER | |
456 | PAPER_LEGAL = _core.PAPER_LEGAL | |
457 | PAPER_A4 = _core.PAPER_A4 | |
458 | PAPER_CSHEET = _core.PAPER_CSHEET | |
459 | PAPER_DSHEET = _core.PAPER_DSHEET | |
460 | PAPER_ESHEET = _core.PAPER_ESHEET | |
461 | PAPER_LETTERSMALL = _core.PAPER_LETTERSMALL | |
462 | PAPER_TABLOID = _core.PAPER_TABLOID | |
463 | PAPER_LEDGER = _core.PAPER_LEDGER | |
464 | PAPER_STATEMENT = _core.PAPER_STATEMENT | |
465 | PAPER_EXECUTIVE = _core.PAPER_EXECUTIVE | |
466 | PAPER_A3 = _core.PAPER_A3 | |
467 | PAPER_A4SMALL = _core.PAPER_A4SMALL | |
468 | PAPER_A5 = _core.PAPER_A5 | |
469 | PAPER_B4 = _core.PAPER_B4 | |
470 | PAPER_B5 = _core.PAPER_B5 | |
471 | PAPER_FOLIO = _core.PAPER_FOLIO | |
472 | PAPER_QUARTO = _core.PAPER_QUARTO | |
473 | PAPER_10X14 = _core.PAPER_10X14 | |
474 | PAPER_11X17 = _core.PAPER_11X17 | |
475 | PAPER_NOTE = _core.PAPER_NOTE | |
476 | PAPER_ENV_9 = _core.PAPER_ENV_9 | |
477 | PAPER_ENV_10 = _core.PAPER_ENV_10 | |
478 | PAPER_ENV_11 = _core.PAPER_ENV_11 | |
479 | PAPER_ENV_12 = _core.PAPER_ENV_12 | |
480 | PAPER_ENV_14 = _core.PAPER_ENV_14 | |
481 | PAPER_ENV_DL = _core.PAPER_ENV_DL | |
482 | PAPER_ENV_C5 = _core.PAPER_ENV_C5 | |
483 | PAPER_ENV_C3 = _core.PAPER_ENV_C3 | |
484 | PAPER_ENV_C4 = _core.PAPER_ENV_C4 | |
485 | PAPER_ENV_C6 = _core.PAPER_ENV_C6 | |
486 | PAPER_ENV_C65 = _core.PAPER_ENV_C65 | |
487 | PAPER_ENV_B4 = _core.PAPER_ENV_B4 | |
488 | PAPER_ENV_B5 = _core.PAPER_ENV_B5 | |
489 | PAPER_ENV_B6 = _core.PAPER_ENV_B6 | |
490 | PAPER_ENV_ITALY = _core.PAPER_ENV_ITALY | |
491 | PAPER_ENV_MONARCH = _core.PAPER_ENV_MONARCH | |
492 | PAPER_ENV_PERSONAL = _core.PAPER_ENV_PERSONAL | |
493 | PAPER_FANFOLD_US = _core.PAPER_FANFOLD_US | |
494 | PAPER_FANFOLD_STD_GERMAN = _core.PAPER_FANFOLD_STD_GERMAN | |
495 | PAPER_FANFOLD_LGL_GERMAN = _core.PAPER_FANFOLD_LGL_GERMAN | |
496 | PAPER_ISO_B4 = _core.PAPER_ISO_B4 | |
497 | PAPER_JAPANESE_POSTCARD = _core.PAPER_JAPANESE_POSTCARD | |
498 | PAPER_9X11 = _core.PAPER_9X11 | |
499 | PAPER_10X11 = _core.PAPER_10X11 | |
500 | PAPER_15X11 = _core.PAPER_15X11 | |
501 | PAPER_ENV_INVITE = _core.PAPER_ENV_INVITE | |
502 | PAPER_LETTER_EXTRA = _core.PAPER_LETTER_EXTRA | |
503 | PAPER_LEGAL_EXTRA = _core.PAPER_LEGAL_EXTRA | |
504 | PAPER_TABLOID_EXTRA = _core.PAPER_TABLOID_EXTRA | |
505 | PAPER_A4_EXTRA = _core.PAPER_A4_EXTRA | |
506 | PAPER_LETTER_TRANSVERSE = _core.PAPER_LETTER_TRANSVERSE | |
507 | PAPER_A4_TRANSVERSE = _core.PAPER_A4_TRANSVERSE | |
508 | PAPER_LETTER_EXTRA_TRANSVERSE = _core.PAPER_LETTER_EXTRA_TRANSVERSE | |
509 | PAPER_A_PLUS = _core.PAPER_A_PLUS | |
510 | PAPER_B_PLUS = _core.PAPER_B_PLUS | |
511 | PAPER_LETTER_PLUS = _core.PAPER_LETTER_PLUS | |
512 | PAPER_A4_PLUS = _core.PAPER_A4_PLUS | |
513 | PAPER_A5_TRANSVERSE = _core.PAPER_A5_TRANSVERSE | |
514 | PAPER_B5_TRANSVERSE = _core.PAPER_B5_TRANSVERSE | |
515 | PAPER_A3_EXTRA = _core.PAPER_A3_EXTRA | |
516 | PAPER_A5_EXTRA = _core.PAPER_A5_EXTRA | |
517 | PAPER_B5_EXTRA = _core.PAPER_B5_EXTRA | |
518 | PAPER_A2 = _core.PAPER_A2 | |
519 | PAPER_A3_TRANSVERSE = _core.PAPER_A3_TRANSVERSE | |
520 | PAPER_A3_EXTRA_TRANSVERSE = _core.PAPER_A3_EXTRA_TRANSVERSE | |
521 | DUPLEX_SIMPLEX = _core.DUPLEX_SIMPLEX | |
522 | DUPLEX_HORIZONTAL = _core.DUPLEX_HORIZONTAL | |
523 | DUPLEX_VERTICAL = _core.DUPLEX_VERTICAL | |
524 | ITEM_SEPARATOR = _core.ITEM_SEPARATOR | |
525 | ITEM_NORMAL = _core.ITEM_NORMAL | |
526 | ITEM_CHECK = _core.ITEM_CHECK | |
527 | ITEM_RADIO = _core.ITEM_RADIO | |
528 | ITEM_MAX = _core.ITEM_MAX | |
529 | HT_NOWHERE = _core.HT_NOWHERE | |
530 | HT_SCROLLBAR_FIRST = _core.HT_SCROLLBAR_FIRST | |
531 | HT_SCROLLBAR_ARROW_LINE_1 = _core.HT_SCROLLBAR_ARROW_LINE_1 | |
532 | HT_SCROLLBAR_ARROW_LINE_2 = _core.HT_SCROLLBAR_ARROW_LINE_2 | |
533 | HT_SCROLLBAR_ARROW_PAGE_1 = _core.HT_SCROLLBAR_ARROW_PAGE_1 | |
534 | HT_SCROLLBAR_ARROW_PAGE_2 = _core.HT_SCROLLBAR_ARROW_PAGE_2 | |
535 | HT_SCROLLBAR_THUMB = _core.HT_SCROLLBAR_THUMB | |
536 | HT_SCROLLBAR_BAR_1 = _core.HT_SCROLLBAR_BAR_1 | |
537 | HT_SCROLLBAR_BAR_2 = _core.HT_SCROLLBAR_BAR_2 | |
538 | HT_SCROLLBAR_LAST = _core.HT_SCROLLBAR_LAST | |
539 | HT_WINDOW_OUTSIDE = _core.HT_WINDOW_OUTSIDE | |
540 | HT_WINDOW_INSIDE = _core.HT_WINDOW_INSIDE | |
541 | HT_WINDOW_VERT_SCROLLBAR = _core.HT_WINDOW_VERT_SCROLLBAR | |
542 | HT_WINDOW_HORZ_SCROLLBAR = _core.HT_WINDOW_HORZ_SCROLLBAR | |
543 | HT_WINDOW_CORNER = _core.HT_WINDOW_CORNER | |
544 | HT_MAX = _core.HT_MAX | |
545 | MOD_NONE = _core.MOD_NONE | |
546 | MOD_ALT = _core.MOD_ALT | |
547 | MOD_CONTROL = _core.MOD_CONTROL | |
548 | MOD_SHIFT = _core.MOD_SHIFT | |
549 | MOD_WIN = _core.MOD_WIN | |
550 | UPDATE_UI_NONE = _core.UPDATE_UI_NONE | |
551 | UPDATE_UI_RECURSE = _core.UPDATE_UI_RECURSE | |
552 | UPDATE_UI_FROMIDLE = _core.UPDATE_UI_FROMIDLE | |
553 | #--------------------------------------------------------------------------- | |
554 | ||
555 | class Object(object): | |
0df68c9f RD |
556 | """ |
557 | The base class for most wx objects, although in wxPython not | |
558 | much functionality is needed nor exposed. | |
559 | """ | |
d14a1e28 RD |
560 | def __init__(self): raise RuntimeError, "No constructor defined" |
561 | def __repr__(self): | |
562 | return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 563 | def GetClassName(*args, **kwargs): |
0df68c9f | 564 | """ |
196addbf | 565 | GetClassName() -> String |
e811c8ce | 566 | |
0df68c9f RD |
567 | Returns the class name of the C++ object using wxRTTI. |
568 | """ | |
e811c8ce RD |
569 | return _core.Object_GetClassName(*args, **kwargs) |
570 | ||
571 | def Destroy(*args, **kwargs): | |
0df68c9f RD |
572 | """ |
573 | Destroy() | |
e811c8ce | 574 | |
0df68c9f RD |
575 | Deletes the C++ object this Python object is a proxy for. |
576 | """ | |
e811c8ce RD |
577 | return _core.Object_Destroy(*args, **kwargs) |
578 | ||
d14a1e28 RD |
579 | |
580 | class ObjectPtr(Object): | |
581 | def __init__(self, this): | |
582 | self.this = this | |
583 | if not hasattr(self,"thisown"): self.thisown = 0 | |
584 | self.__class__ = Object | |
585 | _core.Object_swigregister(ObjectPtr) | |
586 | _wxPySetDictionary = _core._wxPySetDictionary | |
587 | ||
3a04f143 RD |
588 | _wxPyFixStockObjects = _core._wxPyFixStockObjects |
589 | ||
196addbf RD |
590 | cvar = _core.cvar |
591 | EmptyString = cvar.EmptyString | |
d14a1e28 RD |
592 | |
593 | #--------------------------------------------------------------------------- | |
594 | ||
595 | BITMAP_TYPE_INVALID = _core.BITMAP_TYPE_INVALID | |
596 | BITMAP_TYPE_BMP = _core.BITMAP_TYPE_BMP | |
d14a1e28 | 597 | BITMAP_TYPE_ICO = _core.BITMAP_TYPE_ICO |
d14a1e28 | 598 | BITMAP_TYPE_CUR = _core.BITMAP_TYPE_CUR |
d14a1e28 RD |
599 | BITMAP_TYPE_XBM = _core.BITMAP_TYPE_XBM |
600 | BITMAP_TYPE_XBM_DATA = _core.BITMAP_TYPE_XBM_DATA | |
601 | BITMAP_TYPE_XPM = _core.BITMAP_TYPE_XPM | |
602 | BITMAP_TYPE_XPM_DATA = _core.BITMAP_TYPE_XPM_DATA | |
603 | BITMAP_TYPE_TIF = _core.BITMAP_TYPE_TIF | |
d14a1e28 | 604 | BITMAP_TYPE_GIF = _core.BITMAP_TYPE_GIF |
d14a1e28 | 605 | BITMAP_TYPE_PNG = _core.BITMAP_TYPE_PNG |
d14a1e28 | 606 | BITMAP_TYPE_JPEG = _core.BITMAP_TYPE_JPEG |
d14a1e28 | 607 | BITMAP_TYPE_PNM = _core.BITMAP_TYPE_PNM |
d14a1e28 | 608 | BITMAP_TYPE_PCX = _core.BITMAP_TYPE_PCX |
d14a1e28 | 609 | BITMAP_TYPE_PICT = _core.BITMAP_TYPE_PICT |
d14a1e28 | 610 | BITMAP_TYPE_ICON = _core.BITMAP_TYPE_ICON |
d14a1e28 RD |
611 | BITMAP_TYPE_ANI = _core.BITMAP_TYPE_ANI |
612 | BITMAP_TYPE_IFF = _core.BITMAP_TYPE_IFF | |
613 | BITMAP_TYPE_MACCURSOR = _core.BITMAP_TYPE_MACCURSOR | |
d14a1e28 RD |
614 | BITMAP_TYPE_ANY = _core.BITMAP_TYPE_ANY |
615 | CURSOR_NONE = _core.CURSOR_NONE | |
616 | CURSOR_ARROW = _core.CURSOR_ARROW | |
617 | CURSOR_RIGHT_ARROW = _core.CURSOR_RIGHT_ARROW | |
618 | CURSOR_BULLSEYE = _core.CURSOR_BULLSEYE | |
619 | CURSOR_CHAR = _core.CURSOR_CHAR | |
620 | CURSOR_CROSS = _core.CURSOR_CROSS | |
621 | CURSOR_HAND = _core.CURSOR_HAND | |
622 | CURSOR_IBEAM = _core.CURSOR_IBEAM | |
623 | CURSOR_LEFT_BUTTON = _core.CURSOR_LEFT_BUTTON | |
624 | CURSOR_MAGNIFIER = _core.CURSOR_MAGNIFIER | |
625 | CURSOR_MIDDLE_BUTTON = _core.CURSOR_MIDDLE_BUTTON | |
626 | CURSOR_NO_ENTRY = _core.CURSOR_NO_ENTRY | |
627 | CURSOR_PAINT_BRUSH = _core.CURSOR_PAINT_BRUSH | |
628 | CURSOR_PENCIL = _core.CURSOR_PENCIL | |
629 | CURSOR_POINT_LEFT = _core.CURSOR_POINT_LEFT | |
630 | CURSOR_POINT_RIGHT = _core.CURSOR_POINT_RIGHT | |
631 | CURSOR_QUESTION_ARROW = _core.CURSOR_QUESTION_ARROW | |
632 | CURSOR_RIGHT_BUTTON = _core.CURSOR_RIGHT_BUTTON | |
633 | CURSOR_SIZENESW = _core.CURSOR_SIZENESW | |
634 | CURSOR_SIZENS = _core.CURSOR_SIZENS | |
635 | CURSOR_SIZENWSE = _core.CURSOR_SIZENWSE | |
636 | CURSOR_SIZEWE = _core.CURSOR_SIZEWE | |
637 | CURSOR_SIZING = _core.CURSOR_SIZING | |
638 | CURSOR_SPRAYCAN = _core.CURSOR_SPRAYCAN | |
639 | CURSOR_WAIT = _core.CURSOR_WAIT | |
640 | CURSOR_WATCH = _core.CURSOR_WATCH | |
641 | CURSOR_BLANK = _core.CURSOR_BLANK | |
642 | CURSOR_DEFAULT = _core.CURSOR_DEFAULT | |
643 | CURSOR_COPY_ARROW = _core.CURSOR_COPY_ARROW | |
644 | CURSOR_ARROWWAIT = _core.CURSOR_ARROWWAIT | |
645 | CURSOR_MAX = _core.CURSOR_MAX | |
646 | #--------------------------------------------------------------------------- | |
647 | ||
648 | class Size(object): | |
0df68c9f RD |
649 | """ |
650 | wx.Size is a useful data structure used to represent the size of something. | |
651 | It simply contians integer width and height proprtites. In most places in | |
652 | wxPython where a wx.Size is expected a (width,height) tuple can be used | |
653 | instead. | |
654 | """ | |
e811c8ce RD |
655 | def __repr__(self): |
656 | return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
657 | width = property(_core.Size_width_get, _core.Size_width_set) |
658 | height = property(_core.Size_height_get, _core.Size_height_set) | |
242b7b46 | 659 | x = width; y = height |
d14a1e28 | 660 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
661 | """ |
662 | __init__(int w=0, int h=0) -> Size | |
e811c8ce | 663 | |
0df68c9f RD |
664 | Creates a size object. |
665 | """ | |
d14a1e28 RD |
666 | newobj = _core.new_Size(*args, **kwargs) |
667 | self.this = newobj.this | |
668 | self.thisown = 1 | |
669 | del newobj.thisown | |
670 | def __del__(self, destroy=_core.delete_Size): | |
e811c8ce | 671 | """__del__()""" |
d14a1e28 RD |
672 | try: |
673 | if self.thisown: destroy(self) | |
674 | except: pass | |
e811c8ce RD |
675 | |
676 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
677 | """ |
678 | __eq__(Size sz) -> bool | |
e811c8ce | 679 | |
0df68c9f RD |
680 | Test for equality of wx.Size objects. |
681 | """ | |
e811c8ce RD |
682 | return _core.Size___eq__(*args, **kwargs) |
683 | ||
684 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
685 | """ |
686 | __ne__(Size sz) -> bool | |
e811c8ce | 687 | |
0df68c9f RD |
688 | Test for inequality. |
689 | """ | |
e811c8ce RD |
690 | return _core.Size___ne__(*args, **kwargs) |
691 | ||
692 | def __add__(*args, **kwargs): | |
0df68c9f RD |
693 | """ |
694 | __add__(Size sz) -> Size | |
e811c8ce | 695 | |
0df68c9f RD |
696 | Add sz's proprties to this and return the result. |
697 | """ | |
e811c8ce RD |
698 | return _core.Size___add__(*args, **kwargs) |
699 | ||
700 | def __sub__(*args, **kwargs): | |
0df68c9f RD |
701 | """ |
702 | __sub__(Size sz) -> Size | |
e811c8ce | 703 | |
0df68c9f RD |
704 | Subtract sz's properties from this and return the result. |
705 | """ | |
e811c8ce RD |
706 | return _core.Size___sub__(*args, **kwargs) |
707 | ||
708 | def IncTo(*args, **kwargs): | |
0df68c9f RD |
709 | """ |
710 | IncTo(Size sz) | |
e811c8ce | 711 | |
0df68c9f RD |
712 | Increments this object so that both of its dimensions are not less |
713 | than the corresponding dimensions of the size. | |
714 | """ | |
e811c8ce RD |
715 | return _core.Size_IncTo(*args, **kwargs) |
716 | ||
717 | def DecTo(*args, **kwargs): | |
0df68c9f RD |
718 | """ |
719 | DecTo(Size sz) | |
e811c8ce | 720 | |
0df68c9f RD |
721 | Decrements this object so that both of its dimensions are not greater |
722 | than the corresponding dimensions of the size. | |
723 | """ | |
e811c8ce RD |
724 | return _core.Size_DecTo(*args, **kwargs) |
725 | ||
726 | def Set(*args, **kwargs): | |
0df68c9f RD |
727 | """ |
728 | Set(int w, int h) | |
e811c8ce | 729 | |
0df68c9f RD |
730 | Set both width and height. |
731 | """ | |
e811c8ce RD |
732 | return _core.Size_Set(*args, **kwargs) |
733 | ||
734 | def SetWidth(*args, **kwargs): | |
735 | """SetWidth(int w)""" | |
736 | return _core.Size_SetWidth(*args, **kwargs) | |
737 | ||
738 | def SetHeight(*args, **kwargs): | |
739 | """SetHeight(int h)""" | |
740 | return _core.Size_SetHeight(*args, **kwargs) | |
741 | ||
742 | def GetWidth(*args, **kwargs): | |
743 | """GetWidth() -> int""" | |
744 | return _core.Size_GetWidth(*args, **kwargs) | |
745 | ||
746 | def GetHeight(*args, **kwargs): | |
747 | """GetHeight() -> int""" | |
748 | return _core.Size_GetHeight(*args, **kwargs) | |
749 | ||
750 | def Get(*args, **kwargs): | |
0df68c9f RD |
751 | """ |
752 | Get() -> (width,height) | |
e811c8ce | 753 | |
0df68c9f RD |
754 | Returns the width and height properties as a tuple. |
755 | """ | |
e811c8ce RD |
756 | return _core.Size_Get(*args, **kwargs) |
757 | ||
758 | asTuple = Get | |
759 | def __str__(self): return str(self.Get()) | |
760 | def __repr__(self): return 'wx.Size'+str(self.Get()) | |
761 | def __len__(self): return len(self.Get()) | |
762 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
763 | def __setitem__(self, index, val): |
764 | if index == 0: self.width = val | |
765 | elif index == 1: self.height = val | |
766 | else: raise IndexError | |
e811c8ce | 767 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
768 | __safe_for_unpickling__ = True |
769 | def __reduce__(self): return (wx.Size, self.Get()) | |
d14a1e28 RD |
770 | |
771 | ||
772 | class SizePtr(Size): | |
773 | def __init__(self, this): | |
774 | self.this = this | |
775 | if not hasattr(self,"thisown"): self.thisown = 0 | |
776 | self.__class__ = Size | |
777 | _core.Size_swigregister(SizePtr) | |
778 | ||
779 | #--------------------------------------------------------------------------- | |
780 | ||
781 | class RealPoint(object): | |
0df68c9f RD |
782 | """ |
783 | A data structure for representing a point or position with floating point x | |
784 | and y properties. In wxPython most places that expect a wx.RealPoint can also | |
785 | accept a (x,y) tuple. | |
786 | """ | |
e811c8ce RD |
787 | def __repr__(self): |
788 | return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
789 | x = property(_core.RealPoint_x_get, _core.RealPoint_x_set) |
790 | y = property(_core.RealPoint_y_get, _core.RealPoint_y_set) | |
791 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
792 | """ |
793 | __init__(double x=0.0, double y=0.0) -> RealPoint | |
e811c8ce | 794 | |
0df68c9f RD |
795 | Create a wx.RealPoint object |
796 | """ | |
d14a1e28 RD |
797 | newobj = _core.new_RealPoint(*args, **kwargs) |
798 | self.this = newobj.this | |
799 | self.thisown = 1 | |
800 | del newobj.thisown | |
801 | def __del__(self, destroy=_core.delete_RealPoint): | |
e811c8ce | 802 | """__del__()""" |
d14a1e28 RD |
803 | try: |
804 | if self.thisown: destroy(self) | |
805 | except: pass | |
e811c8ce RD |
806 | |
807 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
808 | """ |
809 | __eq__(RealPoint pt) -> bool | |
e811c8ce | 810 | |
0df68c9f RD |
811 | Test for equality of wx.RealPoint objects. |
812 | """ | |
e811c8ce RD |
813 | return _core.RealPoint___eq__(*args, **kwargs) |
814 | ||
815 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
816 | """ |
817 | __ne__(RealPoint pt) -> bool | |
e811c8ce | 818 | |
0df68c9f RD |
819 | Test for inequality of wx.RealPoint objects. |
820 | """ | |
e811c8ce RD |
821 | return _core.RealPoint___ne__(*args, **kwargs) |
822 | ||
823 | def __add__(*args, **kwargs): | |
0df68c9f RD |
824 | """ |
825 | __add__(RealPoint pt) -> RealPoint | |
e811c8ce | 826 | |
0df68c9f RD |
827 | Add pt's proprties to this and return the result. |
828 | """ | |
e811c8ce RD |
829 | return _core.RealPoint___add__(*args, **kwargs) |
830 | ||
831 | def __sub__(*args, **kwargs): | |
0df68c9f RD |
832 | """ |
833 | __sub__(RealPoint pt) -> RealPoint | |
e811c8ce | 834 | |
0df68c9f RD |
835 | Subtract pt's proprties from this and return the result |
836 | """ | |
e811c8ce RD |
837 | return _core.RealPoint___sub__(*args, **kwargs) |
838 | ||
839 | def Set(*args, **kwargs): | |
0df68c9f RD |
840 | """ |
841 | Set(double x, double y) | |
e811c8ce | 842 | |
0df68c9f RD |
843 | Set both the x and y properties |
844 | """ | |
e811c8ce RD |
845 | return _core.RealPoint_Set(*args, **kwargs) |
846 | ||
847 | def Get(*args, **kwargs): | |
0df68c9f RD |
848 | """ |
849 | Get() -> (x,y) | |
e811c8ce | 850 | |
0df68c9f RD |
851 | Return the x and y properties as a tuple. |
852 | """ | |
e811c8ce RD |
853 | return _core.RealPoint_Get(*args, **kwargs) |
854 | ||
855 | asTuple = Get | |
856 | def __str__(self): return str(self.Get()) | |
857 | def __repr__(self): return 'wx.RealPoint'+str(self.Get()) | |
858 | def __len__(self): return len(self.Get()) | |
859 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 860 | def __setitem__(self, index, val): |
e811c8ce RD |
861 | if index == 0: self.x = val |
862 | elif index == 1: self.y = val | |
d14a1e28 | 863 | else: raise IndexError |
e811c8ce | 864 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
865 | __safe_for_unpickling__ = True |
866 | def __reduce__(self): return (wx.RealPoint, self.Get()) | |
d14a1e28 RD |
867 | |
868 | ||
869 | class RealPointPtr(RealPoint): | |
870 | def __init__(self, this): | |
871 | self.this = this | |
872 | if not hasattr(self,"thisown"): self.thisown = 0 | |
873 | self.__class__ = RealPoint | |
874 | _core.RealPoint_swigregister(RealPointPtr) | |
875 | ||
876 | #--------------------------------------------------------------------------- | |
877 | ||
878 | class Point(object): | |
0df68c9f RD |
879 | """ |
880 | A data structure for representing a point or position with integer x and y | |
881 | properties. Most places in wxPython that expect a wx.Point can also accept a | |
882 | (x,y) tuple. | |
883 | """ | |
e811c8ce RD |
884 | def __repr__(self): |
885 | return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
886 | x = property(_core.Point_x_get, _core.Point_x_set) |
887 | y = property(_core.Point_y_get, _core.Point_y_set) | |
888 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
889 | """ |
890 | __init__(int x=0, int y=0) -> Point | |
e811c8ce | 891 | |
0df68c9f RD |
892 | Create a wx.Point object |
893 | """ | |
d14a1e28 RD |
894 | newobj = _core.new_Point(*args, **kwargs) |
895 | self.this = newobj.this | |
896 | self.thisown = 1 | |
897 | del newobj.thisown | |
898 | def __del__(self, destroy=_core.delete_Point): | |
e811c8ce | 899 | """__del__()""" |
d14a1e28 RD |
900 | try: |
901 | if self.thisown: destroy(self) | |
902 | except: pass | |
e811c8ce RD |
903 | |
904 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
905 | """ |
906 | __eq__(Point pt) -> bool | |
e811c8ce | 907 | |
0df68c9f RD |
908 | Test for equality of wx.Point objects. |
909 | """ | |
e811c8ce RD |
910 | return _core.Point___eq__(*args, **kwargs) |
911 | ||
912 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
913 | """ |
914 | __ne__(Point pt) -> bool | |
e811c8ce | 915 | |
0df68c9f RD |
916 | Test for inequality of wx.Point objects. |
917 | """ | |
e811c8ce RD |
918 | return _core.Point___ne__(*args, **kwargs) |
919 | ||
920 | def __add__(*args, **kwargs): | |
0df68c9f RD |
921 | """ |
922 | __add__(Point pt) -> Point | |
e811c8ce | 923 | |
0df68c9f RD |
924 | Add pt's proprties to this and return the result. |
925 | """ | |
e811c8ce RD |
926 | return _core.Point___add__(*args, **kwargs) |
927 | ||
928 | def __sub__(*args, **kwargs): | |
0df68c9f RD |
929 | """ |
930 | __sub__(Point pt) -> Point | |
e811c8ce | 931 | |
0df68c9f RD |
932 | Subtract pt's proprties from this and return the result |
933 | """ | |
e811c8ce RD |
934 | return _core.Point___sub__(*args, **kwargs) |
935 | ||
936 | def __iadd__(*args, **kwargs): | |
0df68c9f RD |
937 | """ |
938 | __iadd__(Point pt) -> Point | |
e811c8ce | 939 | |
0df68c9f RD |
940 | Add pt to this object. |
941 | """ | |
e811c8ce RD |
942 | return _core.Point___iadd__(*args, **kwargs) |
943 | ||
944 | def __isub__(*args, **kwargs): | |
0df68c9f RD |
945 | """ |
946 | __isub__(Point pt) -> Point | |
e811c8ce | 947 | |
0df68c9f RD |
948 | Subtract pt from this object. |
949 | """ | |
e811c8ce RD |
950 | return _core.Point___isub__(*args, **kwargs) |
951 | ||
952 | def Set(*args, **kwargs): | |
0df68c9f RD |
953 | """ |
954 | Set(long x, long y) | |
e811c8ce | 955 | |
0df68c9f RD |
956 | Set both the x and y properties |
957 | """ | |
e811c8ce RD |
958 | return _core.Point_Set(*args, **kwargs) |
959 | ||
960 | def Get(*args, **kwargs): | |
0df68c9f RD |
961 | """ |
962 | Get() -> (x,y) | |
e811c8ce | 963 | |
0df68c9f RD |
964 | Return the x and y properties as a tuple. |
965 | """ | |
e811c8ce RD |
966 | return _core.Point_Get(*args, **kwargs) |
967 | ||
968 | asTuple = Get | |
969 | def __str__(self): return str(self.Get()) | |
970 | def __repr__(self): return 'wx.Point'+str(self.Get()) | |
971 | def __len__(self): return len(self.Get()) | |
972 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
973 | def __setitem__(self, index, val): |
974 | if index == 0: self.x = val | |
975 | elif index == 1: self.y = val | |
976 | else: raise IndexError | |
e811c8ce | 977 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
978 | __safe_for_unpickling__ = True |
979 | def __reduce__(self): return (wx.Point, self.Get()) | |
d14a1e28 RD |
980 | |
981 | ||
982 | class PointPtr(Point): | |
983 | def __init__(self, this): | |
984 | self.this = this | |
985 | if not hasattr(self,"thisown"): self.thisown = 0 | |
986 | self.__class__ = Point | |
987 | _core.Point_swigregister(PointPtr) | |
988 | ||
989 | #--------------------------------------------------------------------------- | |
990 | ||
991 | class Rect(object): | |
0df68c9f RD |
992 | """ |
993 | A class for representing and manipulating rectangles. It has x, y, width and | |
994 | height properties. In wxPython most palces that expect a wx.Rect can also | |
995 | accept a (x,y,width,height) tuple. | |
996 | """ | |
e811c8ce RD |
997 | def __repr__(self): |
998 | return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 999 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
1000 | """ |
1001 | __init__(int x=0, int y=0, int width=0, int height=0) -> Rect | |
e811c8ce | 1002 | |
0df68c9f RD |
1003 | Create a new Rect object. |
1004 | """ | |
d14a1e28 RD |
1005 | newobj = _core.new_Rect(*args, **kwargs) |
1006 | self.this = newobj.this | |
1007 | self.thisown = 1 | |
1008 | del newobj.thisown | |
1009 | def __del__(self, destroy=_core.delete_Rect): | |
e811c8ce | 1010 | """__del__()""" |
d14a1e28 RD |
1011 | try: |
1012 | if self.thisown: destroy(self) | |
1013 | except: pass | |
e811c8ce RD |
1014 | |
1015 | def GetX(*args, **kwargs): | |
1016 | """GetX() -> int""" | |
1017 | return _core.Rect_GetX(*args, **kwargs) | |
1018 | ||
1019 | def SetX(*args, **kwargs): | |
1020 | """SetX(int x)""" | |
1021 | return _core.Rect_SetX(*args, **kwargs) | |
1022 | ||
1023 | def GetY(*args, **kwargs): | |
1024 | """GetY() -> int""" | |
1025 | return _core.Rect_GetY(*args, **kwargs) | |
1026 | ||
1027 | def SetY(*args, **kwargs): | |
1028 | """SetY(int y)""" | |
1029 | return _core.Rect_SetY(*args, **kwargs) | |
1030 | ||
1031 | def GetWidth(*args, **kwargs): | |
1032 | """GetWidth() -> int""" | |
1033 | return _core.Rect_GetWidth(*args, **kwargs) | |
1034 | ||
1035 | def SetWidth(*args, **kwargs): | |
1036 | """SetWidth(int w)""" | |
1037 | return _core.Rect_SetWidth(*args, **kwargs) | |
1038 | ||
1039 | def GetHeight(*args, **kwargs): | |
1040 | """GetHeight() -> int""" | |
1041 | return _core.Rect_GetHeight(*args, **kwargs) | |
1042 | ||
1043 | def SetHeight(*args, **kwargs): | |
1044 | """SetHeight(int h)""" | |
1045 | return _core.Rect_SetHeight(*args, **kwargs) | |
1046 | ||
1047 | def GetPosition(*args, **kwargs): | |
1048 | """GetPosition() -> Point""" | |
1049 | return _core.Rect_GetPosition(*args, **kwargs) | |
1050 | ||
1051 | def SetPosition(*args, **kwargs): | |
1052 | """SetPosition(Point p)""" | |
1053 | return _core.Rect_SetPosition(*args, **kwargs) | |
1054 | ||
1055 | def GetSize(*args, **kwargs): | |
1056 | """GetSize() -> Size""" | |
1057 | return _core.Rect_GetSize(*args, **kwargs) | |
1058 | ||
1059 | def SetSize(*args, **kwargs): | |
1060 | """SetSize(Size s)""" | |
1061 | return _core.Rect_SetSize(*args, **kwargs) | |
1062 | ||
c9c7117a RD |
1063 | def GetTopLeft(*args, **kwargs): |
1064 | """GetTopLeft() -> Point""" | |
1065 | return _core.Rect_GetTopLeft(*args, **kwargs) | |
1066 | ||
1067 | def SetTopLeft(*args, **kwargs): | |
1068 | """SetTopLeft(Point p)""" | |
1069 | return _core.Rect_SetTopLeft(*args, **kwargs) | |
1070 | ||
1071 | def GetBottomRight(*args, **kwargs): | |
1072 | """GetBottomRight() -> Point""" | |
1073 | return _core.Rect_GetBottomRight(*args, **kwargs) | |
1074 | ||
1075 | def SetBottomRight(*args, **kwargs): | |
1076 | """SetBottomRight(Point p)""" | |
1077 | return _core.Rect_SetBottomRight(*args, **kwargs) | |
1078 | ||
e811c8ce RD |
1079 | def GetLeft(*args, **kwargs): |
1080 | """GetLeft() -> int""" | |
1081 | return _core.Rect_GetLeft(*args, **kwargs) | |
1082 | ||
1083 | def GetTop(*args, **kwargs): | |
1084 | """GetTop() -> int""" | |
1085 | return _core.Rect_GetTop(*args, **kwargs) | |
1086 | ||
1087 | def GetBottom(*args, **kwargs): | |
1088 | """GetBottom() -> int""" | |
1089 | return _core.Rect_GetBottom(*args, **kwargs) | |
1090 | ||
1091 | def GetRight(*args, **kwargs): | |
1092 | """GetRight() -> int""" | |
1093 | return _core.Rect_GetRight(*args, **kwargs) | |
1094 | ||
1095 | def SetLeft(*args, **kwargs): | |
1096 | """SetLeft(int left)""" | |
1097 | return _core.Rect_SetLeft(*args, **kwargs) | |
1098 | ||
1099 | def SetRight(*args, **kwargs): | |
1100 | """SetRight(int right)""" | |
1101 | return _core.Rect_SetRight(*args, **kwargs) | |
1102 | ||
1103 | def SetTop(*args, **kwargs): | |
1104 | """SetTop(int top)""" | |
1105 | return _core.Rect_SetTop(*args, **kwargs) | |
1106 | ||
1107 | def SetBottom(*args, **kwargs): | |
1108 | """SetBottom(int bottom)""" | |
1109 | return _core.Rect_SetBottom(*args, **kwargs) | |
1110 | ||
1111 | position = property(GetPosition, SetPosition) | |
1112 | size = property(GetSize, SetSize) | |
1113 | left = property(GetLeft, SetLeft) | |
1114 | right = property(GetRight, SetRight) | |
1115 | top = property(GetTop, SetTop) | |
1116 | bottom = property(GetBottom, SetBottom) | |
1117 | ||
1118 | def Inflate(*args, **kwargs): | |
0df68c9f RD |
1119 | """ |
1120 | Inflate(int dx, int dy) -> Rect | |
e811c8ce | 1121 | |
0df68c9f RD |
1122 | Increase the rectangle size by dx in x direction and dy in y direction. Both |
1123 | (or one of) parameters may be negative to decrease the rectangle size. | |
1124 | """ | |
e811c8ce RD |
1125 | return _core.Rect_Inflate(*args, **kwargs) |
1126 | ||
1127 | def Deflate(*args, **kwargs): | |
0df68c9f RD |
1128 | """ |
1129 | Deflate(int dx, int dy) -> Rect | |
e811c8ce | 1130 | |
0df68c9f RD |
1131 | Decrease the rectangle size by dx in x direction and dy in y direction. Both |
1132 | (or one of) parameters may be negative to increase the rectngle size. This | |
1133 | method is the opposite of Inflate. | |
1134 | """ | |
e811c8ce RD |
1135 | return _core.Rect_Deflate(*args, **kwargs) |
1136 | ||
1137 | def OffsetXY(*args, **kwargs): | |
0df68c9f RD |
1138 | """ |
1139 | OffsetXY(int dx, int dy) | |
e811c8ce | 1140 | |
0df68c9f RD |
1141 | Moves the rectangle by the specified offset. If dx is positive, the rectangle |
1142 | is moved to the right, if dy is positive, it is moved to the bottom, otherwise | |
1143 | it is moved to the left or top respectively. | |
1144 | """ | |
e811c8ce RD |
1145 | return _core.Rect_OffsetXY(*args, **kwargs) |
1146 | ||
1147 | def Offset(*args, **kwargs): | |
0df68c9f RD |
1148 | """ |
1149 | Offset(Point pt) | |
e811c8ce | 1150 | |
0df68c9f RD |
1151 | Same as OffsetXY but uses dx,dy from Point |
1152 | """ | |
e811c8ce RD |
1153 | return _core.Rect_Offset(*args, **kwargs) |
1154 | ||
1155 | def Intersect(*args, **kwargs): | |
0df68c9f RD |
1156 | """ |
1157 | Intersect(Rect rect) -> Rect | |
e811c8ce | 1158 | |
0df68c9f RD |
1159 | Return the intersectsion of this rectangle and rect. |
1160 | """ | |
e811c8ce RD |
1161 | return _core.Rect_Intersect(*args, **kwargs) |
1162 | ||
1163 | def __add__(*args, **kwargs): | |
0df68c9f RD |
1164 | """ |
1165 | __add__(Rect rect) -> Rect | |
e811c8ce | 1166 | |
0df68c9f RD |
1167 | Add the properties of rect to this rectangle and return the result. |
1168 | """ | |
e811c8ce RD |
1169 | return _core.Rect___add__(*args, **kwargs) |
1170 | ||
1171 | def __iadd__(*args, **kwargs): | |
0df68c9f RD |
1172 | """ |
1173 | __iadd__(Rect rect) -> Rect | |
e811c8ce | 1174 | |
0df68c9f RD |
1175 | Add the properties of rect to this rectangle, updating this rectangle. |
1176 | """ | |
e811c8ce RD |
1177 | return _core.Rect___iadd__(*args, **kwargs) |
1178 | ||
1179 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
1180 | """ |
1181 | __eq__(Rect rect) -> bool | |
e811c8ce | 1182 | |
0df68c9f RD |
1183 | Test for equality. |
1184 | """ | |
e811c8ce RD |
1185 | return _core.Rect___eq__(*args, **kwargs) |
1186 | ||
1187 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
1188 | """ |
1189 | __ne__(Rect rect) -> bool | |
e811c8ce | 1190 | |
0df68c9f RD |
1191 | Test for inequality. |
1192 | """ | |
e811c8ce RD |
1193 | return _core.Rect___ne__(*args, **kwargs) |
1194 | ||
1195 | def InsideXY(*args, **kwargs): | |
0df68c9f RD |
1196 | """ |
1197 | InsideXY(int x, int y) -> bool | |
e811c8ce | 1198 | |
0df68c9f RD |
1199 | Return True if the point is (not strcitly) inside the rect. |
1200 | """ | |
e811c8ce RD |
1201 | return _core.Rect_InsideXY(*args, **kwargs) |
1202 | ||
1203 | def Inside(*args, **kwargs): | |
0df68c9f RD |
1204 | """ |
1205 | Inside(Point pt) -> bool | |
e811c8ce | 1206 | |
0df68c9f RD |
1207 | Return True if the point is (not strcitly) inside the rect. |
1208 | """ | |
e811c8ce RD |
1209 | return _core.Rect_Inside(*args, **kwargs) |
1210 | ||
1211 | def Intersects(*args, **kwargs): | |
0df68c9f RD |
1212 | """ |
1213 | Intersects(Rect rect) -> bool | |
e811c8ce | 1214 | |
0df68c9f RD |
1215 | Returns True if the rectangles have a non empty intersection. |
1216 | """ | |
e811c8ce RD |
1217 | return _core.Rect_Intersects(*args, **kwargs) |
1218 | ||
d14a1e28 RD |
1219 | x = property(_core.Rect_x_get, _core.Rect_x_set) |
1220 | y = property(_core.Rect_y_get, _core.Rect_y_set) | |
1221 | width = property(_core.Rect_width_get, _core.Rect_width_set) | |
1222 | height = property(_core.Rect_height_get, _core.Rect_height_set) | |
e811c8ce | 1223 | def Set(*args, **kwargs): |
0df68c9f RD |
1224 | """ |
1225 | Set(int x=0, int y=0, int width=0, int height=0) | |
e811c8ce | 1226 | |
0df68c9f RD |
1227 | Set all rectangle properties. |
1228 | """ | |
e811c8ce RD |
1229 | return _core.Rect_Set(*args, **kwargs) |
1230 | ||
1231 | def Get(*args, **kwargs): | |
0df68c9f RD |
1232 | """ |
1233 | Get() -> (x,y,width,height) | |
e811c8ce | 1234 | |
0df68c9f RD |
1235 | Return the rectangle properties as a tuple. |
1236 | """ | |
e811c8ce RD |
1237 | return _core.Rect_Get(*args, **kwargs) |
1238 | ||
1239 | asTuple = Get | |
1240 | def __str__(self): return str(self.Get()) | |
1241 | def __repr__(self): return 'wx.Rect'+str(self.Get()) | |
1242 | def __len__(self): return len(self.Get()) | |
1243 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1244 | def __setitem__(self, index, val): |
1245 | if index == 0: self.x = val | |
1246 | elif index == 1: self.y = val | |
1247 | elif index == 2: self.width = val | |
1248 | elif index == 3: self.height = val | |
1249 | else: raise IndexError | |
e811c8ce | 1250 | def __nonzero__(self): return self.Get() != (0,0,0,0) |
74e96f3d RD |
1251 | __safe_for_unpickling__ = True |
1252 | def __reduce__(self): return (wx.Rect, self.Get()) | |
d14a1e28 RD |
1253 | |
1254 | ||
1255 | class RectPtr(Rect): | |
1256 | def __init__(self, this): | |
1257 | self.this = this | |
1258 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1259 | self.__class__ = Rect | |
1260 | _core.Rect_swigregister(RectPtr) | |
1261 | ||
1262 | def RectPP(*args, **kwargs): | |
0df68c9f RD |
1263 | """ |
1264 | RectPP(Point topLeft, Point bottomRight) -> Rect | |
e811c8ce | 1265 | |
0df68c9f RD |
1266 | Create a new Rect object from Points representing two corners. |
1267 | """ | |
d14a1e28 RD |
1268 | val = _core.new_RectPP(*args, **kwargs) |
1269 | val.thisown = 1 | |
1270 | return val | |
1271 | ||
1272 | def RectPS(*args, **kwargs): | |
0df68c9f RD |
1273 | """ |
1274 | RectPS(Point pos, Size size) -> Rect | |
e811c8ce | 1275 | |
0df68c9f RD |
1276 | Create a new Rect from a position and size. |
1277 | """ | |
d14a1e28 RD |
1278 | val = _core.new_RectPS(*args, **kwargs) |
1279 | val.thisown = 1 | |
1280 | return val | |
1281 | ||
1282 | ||
e811c8ce | 1283 | def IntersectRect(*args, **kwargs): |
0df68c9f RD |
1284 | """ |
1285 | IntersectRect(Rect r1, Rect r2) -> Rect | |
e811c8ce | 1286 | |
0df68c9f RD |
1287 | Calculate and return the intersection of r1 and r2. |
1288 | """ | |
e811c8ce | 1289 | return _core.IntersectRect(*args, **kwargs) |
d14a1e28 RD |
1290 | #--------------------------------------------------------------------------- |
1291 | ||
1292 | class Point2D(object): | |
e811c8ce RD |
1293 | """wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values.""" |
1294 | def __repr__(self): | |
1295 | return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1296 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
1297 | """ |
1298 | __init__(double x=0.0, double y=0.0) -> Point2D | |
e811c8ce | 1299 | |
0df68c9f RD |
1300 | Create a w.Point2D object. |
1301 | """ | |
d14a1e28 RD |
1302 | newobj = _core.new_Point2D(*args, **kwargs) |
1303 | self.this = newobj.this | |
1304 | self.thisown = 1 | |
1305 | del newobj.thisown | |
e811c8ce | 1306 | def GetFloor(*args, **kwargs): |
0df68c9f RD |
1307 | """ |
1308 | GetFloor() -> (x,y) | |
e811c8ce | 1309 | |
0df68c9f RD |
1310 | Convert to integer |
1311 | """ | |
e811c8ce RD |
1312 | return _core.Point2D_GetFloor(*args, **kwargs) |
1313 | ||
1314 | def GetRounded(*args, **kwargs): | |
0df68c9f RD |
1315 | """ |
1316 | GetRounded() -> (x,y) | |
e811c8ce | 1317 | |
0df68c9f RD |
1318 | Convert to integer |
1319 | """ | |
e811c8ce RD |
1320 | return _core.Point2D_GetRounded(*args, **kwargs) |
1321 | ||
1322 | def GetVectorLength(*args, **kwargs): | |
1323 | """GetVectorLength() -> double""" | |
1324 | return _core.Point2D_GetVectorLength(*args, **kwargs) | |
1325 | ||
1326 | def GetVectorAngle(*args, **kwargs): | |
1327 | """GetVectorAngle() -> double""" | |
1328 | return _core.Point2D_GetVectorAngle(*args, **kwargs) | |
1329 | ||
1330 | def SetVectorLength(*args, **kwargs): | |
1331 | """SetVectorLength(double length)""" | |
1332 | return _core.Point2D_SetVectorLength(*args, **kwargs) | |
1333 | ||
1334 | def SetVectorAngle(*args, **kwargs): | |
1335 | """SetVectorAngle(double degrees)""" | |
1336 | return _core.Point2D_SetVectorAngle(*args, **kwargs) | |
1337 | ||
d14a1e28 RD |
1338 | def SetPolarCoordinates(self, angle, length): |
1339 | self.SetVectorLength(length) | |
1340 | self.SetVectorAngle(angle) | |
1341 | def Normalize(self): | |
1342 | self.SetVectorLength(1.0) | |
1343 | ||
e811c8ce RD |
1344 | def GetDistance(*args, **kwargs): |
1345 | """GetDistance(Point2D pt) -> double""" | |
1346 | return _core.Point2D_GetDistance(*args, **kwargs) | |
1347 | ||
1348 | def GetDistanceSquare(*args, **kwargs): | |
1349 | """GetDistanceSquare(Point2D pt) -> double""" | |
1350 | return _core.Point2D_GetDistanceSquare(*args, **kwargs) | |
1351 | ||
1352 | def GetDotProduct(*args, **kwargs): | |
1353 | """GetDotProduct(Point2D vec) -> double""" | |
1354 | return _core.Point2D_GetDotProduct(*args, **kwargs) | |
1355 | ||
1356 | def GetCrossProduct(*args, **kwargs): | |
1357 | """GetCrossProduct(Point2D vec) -> double""" | |
1358 | return _core.Point2D_GetCrossProduct(*args, **kwargs) | |
1359 | ||
1360 | def __neg__(*args, **kwargs): | |
0df68c9f RD |
1361 | """ |
1362 | __neg__() -> Point2D | |
e811c8ce | 1363 | |
0df68c9f RD |
1364 | the reflection of this point |
1365 | """ | |
e811c8ce RD |
1366 | return _core.Point2D___neg__(*args, **kwargs) |
1367 | ||
1368 | def __iadd__(*args, **kwargs): | |
1369 | """__iadd__(Point2D pt) -> Point2D""" | |
1370 | return _core.Point2D___iadd__(*args, **kwargs) | |
1371 | ||
1372 | def __isub__(*args, **kwargs): | |
1373 | """__isub__(Point2D pt) -> Point2D""" | |
1374 | return _core.Point2D___isub__(*args, **kwargs) | |
1375 | ||
1376 | def __imul__(*args, **kwargs): | |
1377 | """__imul__(Point2D pt) -> Point2D""" | |
1378 | return _core.Point2D___imul__(*args, **kwargs) | |
1379 | ||
1380 | def __idiv__(*args, **kwargs): | |
1381 | """__idiv__(Point2D pt) -> Point2D""" | |
1382 | return _core.Point2D___idiv__(*args, **kwargs) | |
1383 | ||
1384 | def __eq__(*args, **kwargs): | |
0df68c9f RD |
1385 | """ |
1386 | __eq__(Point2D pt) -> bool | |
e811c8ce | 1387 | |
0df68c9f RD |
1388 | Test for equality |
1389 | """ | |
e811c8ce RD |
1390 | return _core.Point2D___eq__(*args, **kwargs) |
1391 | ||
1392 | def __ne__(*args, **kwargs): | |
0df68c9f RD |
1393 | """ |
1394 | __ne__(Point2D pt) -> bool | |
e811c8ce | 1395 | |
0df68c9f RD |
1396 | Test for inequality |
1397 | """ | |
e811c8ce RD |
1398 | return _core.Point2D___ne__(*args, **kwargs) |
1399 | ||
d14a1e28 RD |
1400 | x = property(_core.Point2D_x_get, _core.Point2D_x_set) |
1401 | y = property(_core.Point2D_y_get, _core.Point2D_y_set) | |
e811c8ce RD |
1402 | def Set(*args, **kwargs): |
1403 | """Set(double x=0, double y=0)""" | |
1404 | return _core.Point2D_Set(*args, **kwargs) | |
1405 | ||
1406 | def Get(*args, **kwargs): | |
0df68c9f RD |
1407 | """ |
1408 | Get() -> (x,y) | |
e811c8ce | 1409 | |
0df68c9f RD |
1410 | Return x and y properties as a tuple. |
1411 | """ | |
e811c8ce RD |
1412 | return _core.Point2D_Get(*args, **kwargs) |
1413 | ||
1414 | asTuple = Get | |
1415 | def __str__(self): return str(self.Get()) | |
1416 | def __repr__(self): return 'wx.Point2D'+str(self.Get()) | |
1417 | def __len__(self): return len(self.Get()) | |
1418 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 1419 | def __setitem__(self, index, val): |
e811c8ce RD |
1420 | if index == 0: self.x = val |
1421 | elif index == 1: self.y = val | |
d14a1e28 | 1422 | else: raise IndexError |
e811c8ce | 1423 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
1424 | __safe_for_unpickling__ = True |
1425 | def __reduce__(self): return (wx.Point2D, self.Get()) | |
d14a1e28 RD |
1426 | |
1427 | ||
1428 | class Point2DPtr(Point2D): | |
1429 | def __init__(self, this): | |
1430 | self.this = this | |
1431 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1432 | self.__class__ = Point2D | |
1433 | _core.Point2D_swigregister(Point2DPtr) | |
1434 | ||
1435 | def Point2DCopy(*args, **kwargs): | |
0df68c9f RD |
1436 | """ |
1437 | Point2DCopy(Point2D pt) -> Point2D | |
e811c8ce | 1438 | |
0df68c9f RD |
1439 | Create a w.Point2D object. |
1440 | """ | |
d14a1e28 RD |
1441 | val = _core.new_Point2DCopy(*args, **kwargs) |
1442 | val.thisown = 1 | |
1443 | return val | |
1444 | ||
1445 | def Point2DFromPoint(*args, **kwargs): | |
0df68c9f RD |
1446 | """ |
1447 | Point2DFromPoint(Point pt) -> Point2D | |
e811c8ce | 1448 | |
0df68c9f RD |
1449 | Create a w.Point2D object. |
1450 | """ | |
d14a1e28 RD |
1451 | val = _core.new_Point2DFromPoint(*args, **kwargs) |
1452 | val.thisown = 1 | |
1453 | return val | |
1454 | ||
1455 | #--------------------------------------------------------------------------- | |
1456 | ||
1457 | FromStart = _core.FromStart | |
1458 | FromCurrent = _core.FromCurrent | |
1459 | FromEnd = _core.FromEnd | |
1460 | class InputStream(object): | |
e811c8ce RD |
1461 | def __repr__(self): |
1462 | return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1463 | def __init__(self, *args, **kwargs): |
e811c8ce | 1464 | """__init__(PyObject p) -> InputStream""" |
d14a1e28 RD |
1465 | newobj = _core.new_InputStream(*args, **kwargs) |
1466 | self.this = newobj.this | |
1467 | self.thisown = 1 | |
1468 | del newobj.thisown | |
e811c8ce RD |
1469 | def close(*args, **kwargs): |
1470 | """close()""" | |
1471 | return _core.InputStream_close(*args, **kwargs) | |
1472 | ||
1473 | def flush(*args, **kwargs): | |
1474 | """flush()""" | |
1475 | return _core.InputStream_flush(*args, **kwargs) | |
1476 | ||
1477 | def eof(*args, **kwargs): | |
1478 | """eof() -> bool""" | |
1479 | return _core.InputStream_eof(*args, **kwargs) | |
1480 | ||
1481 | def read(*args, **kwargs): | |
1482 | """read(int size=-1) -> PyObject""" | |
1483 | return _core.InputStream_read(*args, **kwargs) | |
1484 | ||
1485 | def readline(*args, **kwargs): | |
1486 | """readline(int size=-1) -> PyObject""" | |
1487 | return _core.InputStream_readline(*args, **kwargs) | |
1488 | ||
1489 | def readlines(*args, **kwargs): | |
1490 | """readlines(int sizehint=-1) -> PyObject""" | |
1491 | return _core.InputStream_readlines(*args, **kwargs) | |
1492 | ||
1493 | def seek(*args, **kwargs): | |
1494 | """seek(int offset, int whence=0)""" | |
1495 | return _core.InputStream_seek(*args, **kwargs) | |
1496 | ||
1497 | def tell(*args, **kwargs): | |
1498 | """tell() -> int""" | |
1499 | return _core.InputStream_tell(*args, **kwargs) | |
1500 | ||
1501 | def Peek(*args, **kwargs): | |
1502 | """Peek() -> char""" | |
1503 | return _core.InputStream_Peek(*args, **kwargs) | |
1504 | ||
1505 | def GetC(*args, **kwargs): | |
1506 | """GetC() -> char""" | |
1507 | return _core.InputStream_GetC(*args, **kwargs) | |
1508 | ||
1509 | def LastRead(*args, **kwargs): | |
1510 | """LastRead() -> size_t""" | |
1511 | return _core.InputStream_LastRead(*args, **kwargs) | |
1512 | ||
1513 | def CanRead(*args, **kwargs): | |
1514 | """CanRead() -> bool""" | |
1515 | return _core.InputStream_CanRead(*args, **kwargs) | |
1516 | ||
1517 | def Eof(*args, **kwargs): | |
1518 | """Eof() -> bool""" | |
1519 | return _core.InputStream_Eof(*args, **kwargs) | |
1520 | ||
1521 | def Ungetch(*args, **kwargs): | |
1522 | """Ungetch(char c) -> bool""" | |
1523 | return _core.InputStream_Ungetch(*args, **kwargs) | |
1524 | ||
1525 | def SeekI(*args, **kwargs): | |
196addbf | 1526 | """SeekI(long pos, int mode=FromStart) -> long""" |
e811c8ce RD |
1527 | return _core.InputStream_SeekI(*args, **kwargs) |
1528 | ||
1529 | def TellI(*args, **kwargs): | |
1530 | """TellI() -> long""" | |
1531 | return _core.InputStream_TellI(*args, **kwargs) | |
1532 | ||
d14a1e28 RD |
1533 | |
1534 | class InputStreamPtr(InputStream): | |
1535 | def __init__(self, this): | |
1536 | self.this = this | |
1537 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1538 | self.__class__ = InputStream | |
1539 | _core.InputStream_swigregister(InputStreamPtr) | |
d14a1e28 RD |
1540 | DefaultPosition = cvar.DefaultPosition |
1541 | DefaultSize = cvar.DefaultSize | |
1542 | ||
1543 | class OutputStream(object): | |
d14a1e28 RD |
1544 | def __init__(self): raise RuntimeError, "No constructor defined" |
1545 | def __repr__(self): | |
1546 | return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
1547 | def write(*args, **kwargs): |
1548 | """write(PyObject obj)""" | |
1549 | return _core.OutputStream_write(*args, **kwargs) | |
1550 | ||
d14a1e28 RD |
1551 | |
1552 | class OutputStreamPtr(OutputStream): | |
1553 | def __init__(self, this): | |
1554 | self.this = this | |
1555 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1556 | self.__class__ = OutputStream | |
1557 | _core.OutputStream_swigregister(OutputStreamPtr) | |
1558 | ||
1559 | #--------------------------------------------------------------------------- | |
1560 | ||
1561 | class FSFile(Object): | |
e811c8ce RD |
1562 | def __repr__(self): |
1563 | return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1564 | def __init__(self, *args, **kwargs): |
0df68c9f | 1565 | """ |
196addbf RD |
1566 | __init__(InputStream stream, String loc, String mimetype, String anchor, |
1567 | DateTime modif) -> FSFile | |
0df68c9f | 1568 | """ |
d14a1e28 RD |
1569 | newobj = _core.new_FSFile(*args, **kwargs) |
1570 | self.this = newobj.this | |
1571 | self.thisown = 1 | |
1572 | del newobj.thisown | |
1573 | def __del__(self, destroy=_core.delete_FSFile): | |
e811c8ce | 1574 | """__del__()""" |
d14a1e28 RD |
1575 | try: |
1576 | if self.thisown: destroy(self) | |
1577 | except: pass | |
e811c8ce RD |
1578 | |
1579 | def GetStream(*args, **kwargs): | |
196addbf | 1580 | """GetStream() -> InputStream""" |
e811c8ce RD |
1581 | return _core.FSFile_GetStream(*args, **kwargs) |
1582 | ||
1583 | def GetMimeType(*args, **kwargs): | |
196addbf | 1584 | """GetMimeType() -> String""" |
e811c8ce RD |
1585 | return _core.FSFile_GetMimeType(*args, **kwargs) |
1586 | ||
1587 | def GetLocation(*args, **kwargs): | |
196addbf | 1588 | """GetLocation() -> String""" |
e811c8ce RD |
1589 | return _core.FSFile_GetLocation(*args, **kwargs) |
1590 | ||
1591 | def GetAnchor(*args, **kwargs): | |
196addbf | 1592 | """GetAnchor() -> String""" |
e811c8ce RD |
1593 | return _core.FSFile_GetAnchor(*args, **kwargs) |
1594 | ||
1595 | def GetModificationTime(*args, **kwargs): | |
196addbf | 1596 | """GetModificationTime() -> DateTime""" |
e811c8ce RD |
1597 | return _core.FSFile_GetModificationTime(*args, **kwargs) |
1598 | ||
d14a1e28 RD |
1599 | |
1600 | class FSFilePtr(FSFile): | |
1601 | def __init__(self, this): | |
1602 | self.this = this | |
1603 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1604 | self.__class__ = FSFile | |
1605 | _core.FSFile_swigregister(FSFilePtr) | |
1606 | ||
1607 | class CPPFileSystemHandler(object): | |
1608 | def __init__(self): raise RuntimeError, "No constructor defined" | |
1609 | def __repr__(self): | |
1610 | return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1611 | ||
1612 | class CPPFileSystemHandlerPtr(CPPFileSystemHandler): | |
1613 | def __init__(self, this): | |
1614 | self.this = this | |
1615 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1616 | self.__class__ = CPPFileSystemHandler | |
1617 | _core.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr) | |
1618 | ||
1619 | class FileSystemHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1620 | def __repr__(self): |
1621 | return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1622 | def __init__(self, *args, **kwargs): |
e811c8ce | 1623 | """__init__() -> FileSystemHandler""" |
d14a1e28 RD |
1624 | newobj = _core.new_FileSystemHandler(*args, **kwargs) |
1625 | self.this = newobj.this | |
1626 | self.thisown = 1 | |
1627 | del newobj.thisown | |
1628 | self._setCallbackInfo(self, FileSystemHandler) | |
e811c8ce RD |
1629 | |
1630 | def _setCallbackInfo(*args, **kwargs): | |
1631 | """_setCallbackInfo(PyObject self, PyObject _class)""" | |
1632 | return _core.FileSystemHandler__setCallbackInfo(*args, **kwargs) | |
1633 | ||
1634 | def CanOpen(*args, **kwargs): | |
196addbf | 1635 | """CanOpen(String location) -> bool""" |
e811c8ce RD |
1636 | return _core.FileSystemHandler_CanOpen(*args, **kwargs) |
1637 | ||
1638 | def OpenFile(*args, **kwargs): | |
196addbf | 1639 | """OpenFile(FileSystem fs, String location) -> FSFile""" |
e811c8ce RD |
1640 | return _core.FileSystemHandler_OpenFile(*args, **kwargs) |
1641 | ||
1642 | def FindFirst(*args, **kwargs): | |
196addbf | 1643 | """FindFirst(String spec, int flags=0) -> String""" |
e811c8ce RD |
1644 | return _core.FileSystemHandler_FindFirst(*args, **kwargs) |
1645 | ||
1646 | def FindNext(*args, **kwargs): | |
196addbf | 1647 | """FindNext() -> String""" |
e811c8ce RD |
1648 | return _core.FileSystemHandler_FindNext(*args, **kwargs) |
1649 | ||
1650 | def GetProtocol(*args, **kwargs): | |
196addbf | 1651 | """GetProtocol(String location) -> String""" |
e811c8ce RD |
1652 | return _core.FileSystemHandler_GetProtocol(*args, **kwargs) |
1653 | ||
1654 | def GetLeftLocation(*args, **kwargs): | |
196addbf | 1655 | """GetLeftLocation(String location) -> String""" |
e811c8ce RD |
1656 | return _core.FileSystemHandler_GetLeftLocation(*args, **kwargs) |
1657 | ||
1658 | def GetAnchor(*args, **kwargs): | |
196addbf | 1659 | """GetAnchor(String location) -> String""" |
e811c8ce RD |
1660 | return _core.FileSystemHandler_GetAnchor(*args, **kwargs) |
1661 | ||
1662 | def GetRightLocation(*args, **kwargs): | |
196addbf | 1663 | """GetRightLocation(String location) -> String""" |
e811c8ce RD |
1664 | return _core.FileSystemHandler_GetRightLocation(*args, **kwargs) |
1665 | ||
1666 | def GetMimeTypeFromExt(*args, **kwargs): | |
196addbf | 1667 | """GetMimeTypeFromExt(String location) -> String""" |
e811c8ce RD |
1668 | return _core.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs) |
1669 | ||
d14a1e28 RD |
1670 | |
1671 | class FileSystemHandlerPtr(FileSystemHandler): | |
1672 | def __init__(self, this): | |
1673 | self.this = this | |
1674 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1675 | self.__class__ = FileSystemHandler | |
1676 | _core.FileSystemHandler_swigregister(FileSystemHandlerPtr) | |
1677 | ||
1678 | class FileSystem(Object): | |
e811c8ce RD |
1679 | def __repr__(self): |
1680 | return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1681 | def __init__(self, *args, **kwargs): |
e811c8ce | 1682 | """__init__() -> FileSystem""" |
d14a1e28 RD |
1683 | newobj = _core.new_FileSystem(*args, **kwargs) |
1684 | self.this = newobj.this | |
1685 | self.thisown = 1 | |
1686 | del newobj.thisown | |
1687 | def __del__(self, destroy=_core.delete_FileSystem): | |
e811c8ce | 1688 | """__del__()""" |
d14a1e28 RD |
1689 | try: |
1690 | if self.thisown: destroy(self) | |
1691 | except: pass | |
e811c8ce RD |
1692 | |
1693 | def ChangePathTo(*args, **kwargs): | |
196addbf | 1694 | """ChangePathTo(String location, bool is_dir=False)""" |
e811c8ce RD |
1695 | return _core.FileSystem_ChangePathTo(*args, **kwargs) |
1696 | ||
1697 | def GetPath(*args, **kwargs): | |
196addbf | 1698 | """GetPath() -> String""" |
e811c8ce RD |
1699 | return _core.FileSystem_GetPath(*args, **kwargs) |
1700 | ||
1701 | def OpenFile(*args, **kwargs): | |
196addbf | 1702 | """OpenFile(String location) -> FSFile""" |
e811c8ce RD |
1703 | return _core.FileSystem_OpenFile(*args, **kwargs) |
1704 | ||
1705 | def FindFirst(*args, **kwargs): | |
196addbf | 1706 | """FindFirst(String spec, int flags=0) -> String""" |
e811c8ce RD |
1707 | return _core.FileSystem_FindFirst(*args, **kwargs) |
1708 | ||
1709 | def FindNext(*args, **kwargs): | |
196addbf | 1710 | """FindNext() -> String""" |
e811c8ce RD |
1711 | return _core.FileSystem_FindNext(*args, **kwargs) |
1712 | ||
1713 | def AddHandler(*args, **kwargs): | |
a41e16b6 | 1714 | """AddHandler(CPPFileSystemHandler handler)""" |
e811c8ce RD |
1715 | return _core.FileSystem_AddHandler(*args, **kwargs) |
1716 | ||
1717 | AddHandler = staticmethod(AddHandler) | |
1718 | def CleanUpHandlers(*args, **kwargs): | |
a41e16b6 | 1719 | """CleanUpHandlers()""" |
e811c8ce RD |
1720 | return _core.FileSystem_CleanUpHandlers(*args, **kwargs) |
1721 | ||
1722 | CleanUpHandlers = staticmethod(CleanUpHandlers) | |
1723 | def FileNameToURL(*args, **kwargs): | |
a41e16b6 | 1724 | """FileNameToURL(String filename) -> String""" |
e811c8ce RD |
1725 | return _core.FileSystem_FileNameToURL(*args, **kwargs) |
1726 | ||
1727 | FileNameToURL = staticmethod(FileNameToURL) | |
d14a1e28 RD |
1728 | |
1729 | class FileSystemPtr(FileSystem): | |
1730 | def __init__(self, this): | |
1731 | self.this = this | |
1732 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1733 | self.__class__ = FileSystem | |
1734 | _core.FileSystem_swigregister(FileSystemPtr) | |
1735 | ||
e811c8ce RD |
1736 | def FileSystem_AddHandler(*args, **kwargs): |
1737 | """FileSystem_AddHandler(CPPFileSystemHandler handler)""" | |
1738 | return _core.FileSystem_AddHandler(*args, **kwargs) | |
d14a1e28 | 1739 | |
e811c8ce RD |
1740 | def FileSystem_CleanUpHandlers(*args, **kwargs): |
1741 | """FileSystem_CleanUpHandlers()""" | |
1742 | return _core.FileSystem_CleanUpHandlers(*args, **kwargs) | |
d14a1e28 | 1743 | |
e811c8ce | 1744 | def FileSystem_FileNameToURL(*args, **kwargs): |
196addbf | 1745 | """FileSystem_FileNameToURL(String filename) -> String""" |
e811c8ce | 1746 | return _core.FileSystem_FileNameToURL(*args, **kwargs) |
d14a1e28 RD |
1747 | |
1748 | ||
e811c8ce | 1749 | def FileSystem_URLToFileName(*args, **kwargs): |
196addbf | 1750 | """FileSystem_URLToFileName(String url) -> String""" |
e811c8ce | 1751 | return _core.FileSystem_URLToFileName(*args, **kwargs) |
d14a1e28 | 1752 | class InternetFSHandler(CPPFileSystemHandler): |
e811c8ce RD |
1753 | def __repr__(self): |
1754 | return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1755 | def __init__(self, *args, **kwargs): |
e811c8ce | 1756 | """__init__() -> InternetFSHandler""" |
d14a1e28 RD |
1757 | newobj = _core.new_InternetFSHandler(*args, **kwargs) |
1758 | self.this = newobj.this | |
1759 | self.thisown = 1 | |
1760 | del newobj.thisown | |
e811c8ce | 1761 | def CanOpen(*args, **kwargs): |
196addbf | 1762 | """CanOpen(String location) -> bool""" |
e811c8ce RD |
1763 | return _core.InternetFSHandler_CanOpen(*args, **kwargs) |
1764 | ||
1765 | def OpenFile(*args, **kwargs): | |
196addbf | 1766 | """OpenFile(FileSystem fs, String location) -> FSFile""" |
e811c8ce RD |
1767 | return _core.InternetFSHandler_OpenFile(*args, **kwargs) |
1768 | ||
d14a1e28 RD |
1769 | |
1770 | class InternetFSHandlerPtr(InternetFSHandler): | |
1771 | def __init__(self, this): | |
1772 | self.this = this | |
1773 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1774 | self.__class__ = InternetFSHandler | |
1775 | _core.InternetFSHandler_swigregister(InternetFSHandlerPtr) | |
1776 | ||
1777 | class ZipFSHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1778 | def __repr__(self): |
1779 | return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1780 | def __init__(self, *args, **kwargs): |
e811c8ce | 1781 | """__init__() -> ZipFSHandler""" |
d14a1e28 RD |
1782 | newobj = _core.new_ZipFSHandler(*args, **kwargs) |
1783 | self.this = newobj.this | |
1784 | self.thisown = 1 | |
1785 | del newobj.thisown | |
e811c8ce | 1786 | def CanOpen(*args, **kwargs): |
196addbf | 1787 | """CanOpen(String location) -> bool""" |
e811c8ce RD |
1788 | return _core.ZipFSHandler_CanOpen(*args, **kwargs) |
1789 | ||
1790 | def OpenFile(*args, **kwargs): | |
196addbf | 1791 | """OpenFile(FileSystem fs, String location) -> FSFile""" |
e811c8ce RD |
1792 | return _core.ZipFSHandler_OpenFile(*args, **kwargs) |
1793 | ||
1794 | def FindFirst(*args, **kwargs): | |
196addbf | 1795 | """FindFirst(String spec, int flags=0) -> String""" |
e811c8ce RD |
1796 | return _core.ZipFSHandler_FindFirst(*args, **kwargs) |
1797 | ||
1798 | def FindNext(*args, **kwargs): | |
196addbf | 1799 | """FindNext() -> String""" |
e811c8ce RD |
1800 | return _core.ZipFSHandler_FindNext(*args, **kwargs) |
1801 | ||
d14a1e28 RD |
1802 | |
1803 | class ZipFSHandlerPtr(ZipFSHandler): | |
1804 | def __init__(self, this): | |
1805 | self.this = this | |
1806 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1807 | self.__class__ = ZipFSHandler | |
1808 | _core.ZipFSHandler_swigregister(ZipFSHandlerPtr) | |
1809 | ||
1810 | ||
e811c8ce | 1811 | def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs): |
196addbf | 1812 | """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)""" |
e811c8ce | 1813 | return _core.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs) |
d14a1e28 | 1814 | |
e811c8ce | 1815 | def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs): |
196addbf | 1816 | """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)""" |
e811c8ce | 1817 | return _core.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs) |
d14a1e28 | 1818 | |
e811c8ce | 1819 | def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs): |
196addbf | 1820 | """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)""" |
e811c8ce | 1821 | return _core.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs) |
d14a1e28 RD |
1822 | def MemoryFSHandler_AddFile(filename, a, b=''): |
1823 | if isinstance(a, wx.Image): | |
1824 | __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) | |
1825 | elif isinstance(a, wx.Bitmap): | |
1826 | __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) | |
1827 | elif type(a) == str: | |
1828 | __wxMemoryFSHandler_AddFile_Data(filename, a) | |
1829 | else: raise TypeError, 'wx.Image, wx.Bitmap or string expected' | |
1830 | ||
1831 | class MemoryFSHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1832 | def __repr__(self): |
1833 | return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1834 | def __init__(self, *args, **kwargs): |
e811c8ce | 1835 | """__init__() -> MemoryFSHandler""" |
d14a1e28 RD |
1836 | newobj = _core.new_MemoryFSHandler(*args, **kwargs) |
1837 | self.this = newobj.this | |
1838 | self.thisown = 1 | |
1839 | del newobj.thisown | |
e811c8ce | 1840 | def RemoveFile(*args, **kwargs): |
a41e16b6 | 1841 | """RemoveFile(String filename)""" |
e811c8ce RD |
1842 | return _core.MemoryFSHandler_RemoveFile(*args, **kwargs) |
1843 | ||
1844 | RemoveFile = staticmethod(RemoveFile) | |
d14a1e28 | 1845 | AddFile = staticmethod(MemoryFSHandler_AddFile) |
e811c8ce | 1846 | def CanOpen(*args, **kwargs): |
196addbf | 1847 | """CanOpen(String location) -> bool""" |
e811c8ce RD |
1848 | return _core.MemoryFSHandler_CanOpen(*args, **kwargs) |
1849 | ||
1850 | def OpenFile(*args, **kwargs): | |
196addbf | 1851 | """OpenFile(FileSystem fs, String location) -> FSFile""" |
e811c8ce RD |
1852 | return _core.MemoryFSHandler_OpenFile(*args, **kwargs) |
1853 | ||
1854 | def FindFirst(*args, **kwargs): | |
196addbf | 1855 | """FindFirst(String spec, int flags=0) -> String""" |
e811c8ce RD |
1856 | return _core.MemoryFSHandler_FindFirst(*args, **kwargs) |
1857 | ||
1858 | def FindNext(*args, **kwargs): | |
196addbf | 1859 | """FindNext() -> String""" |
e811c8ce RD |
1860 | return _core.MemoryFSHandler_FindNext(*args, **kwargs) |
1861 | ||
d14a1e28 RD |
1862 | |
1863 | class MemoryFSHandlerPtr(MemoryFSHandler): | |
1864 | def __init__(self, this): | |
1865 | self.this = this | |
1866 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1867 | self.__class__ = MemoryFSHandler | |
1868 | _core.MemoryFSHandler_swigregister(MemoryFSHandlerPtr) | |
1869 | ||
e811c8ce | 1870 | def MemoryFSHandler_RemoveFile(*args, **kwargs): |
196addbf | 1871 | """MemoryFSHandler_RemoveFile(String filename)""" |
e811c8ce | 1872 | return _core.MemoryFSHandler_RemoveFile(*args, **kwargs) |
d14a1e28 RD |
1873 | |
1874 | #--------------------------------------------------------------------------- | |
1875 | ||
1876 | class ImageHandler(Object): | |
d14a1e28 RD |
1877 | def __init__(self): raise RuntimeError, "No constructor defined" |
1878 | def __repr__(self): | |
1879 | return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 1880 | def GetName(*args, **kwargs): |
196addbf | 1881 | """GetName() -> String""" |
e811c8ce RD |
1882 | return _core.ImageHandler_GetName(*args, **kwargs) |
1883 | ||
1884 | def GetExtension(*args, **kwargs): | |
196addbf | 1885 | """GetExtension() -> String""" |
e811c8ce RD |
1886 | return _core.ImageHandler_GetExtension(*args, **kwargs) |
1887 | ||
1888 | def GetType(*args, **kwargs): | |
1889 | """GetType() -> long""" | |
1890 | return _core.ImageHandler_GetType(*args, **kwargs) | |
1891 | ||
1892 | def GetMimeType(*args, **kwargs): | |
196addbf | 1893 | """GetMimeType() -> String""" |
e811c8ce RD |
1894 | return _core.ImageHandler_GetMimeType(*args, **kwargs) |
1895 | ||
1896 | def CanRead(*args, **kwargs): | |
196addbf | 1897 | """CanRead(String name) -> bool""" |
e811c8ce RD |
1898 | return _core.ImageHandler_CanRead(*args, **kwargs) |
1899 | ||
1900 | def SetName(*args, **kwargs): | |
196addbf | 1901 | """SetName(String name)""" |
e811c8ce RD |
1902 | return _core.ImageHandler_SetName(*args, **kwargs) |
1903 | ||
1904 | def SetExtension(*args, **kwargs): | |
196addbf | 1905 | """SetExtension(String extension)""" |
e811c8ce RD |
1906 | return _core.ImageHandler_SetExtension(*args, **kwargs) |
1907 | ||
1908 | def SetType(*args, **kwargs): | |
1909 | """SetType(long type)""" | |
1910 | return _core.ImageHandler_SetType(*args, **kwargs) | |
1911 | ||
1912 | def SetMimeType(*args, **kwargs): | |
196addbf | 1913 | """SetMimeType(String mimetype)""" |
e811c8ce RD |
1914 | return _core.ImageHandler_SetMimeType(*args, **kwargs) |
1915 | ||
d14a1e28 RD |
1916 | |
1917 | class ImageHandlerPtr(ImageHandler): | |
1918 | def __init__(self, this): | |
1919 | self.this = this | |
1920 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1921 | self.__class__ = ImageHandler | |
1922 | _core.ImageHandler_swigregister(ImageHandlerPtr) | |
1923 | ||
1924 | class ImageHistogram(object): | |
e811c8ce RD |
1925 | def __repr__(self): |
1926 | return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1927 | def __init__(self, *args, **kwargs): |
e811c8ce | 1928 | """__init__() -> ImageHistogram""" |
d14a1e28 RD |
1929 | newobj = _core.new_ImageHistogram(*args, **kwargs) |
1930 | self.this = newobj.this | |
1931 | self.thisown = 1 | |
1932 | del newobj.thisown | |
e811c8ce | 1933 | def MakeKey(*args, **kwargs): |
0df68c9f | 1934 | """ |
a41e16b6 | 1935 | MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long |
e811c8ce | 1936 | |
0df68c9f RD |
1937 | Get the key in the histogram for the given RGB values |
1938 | """ | |
e811c8ce RD |
1939 | return _core.ImageHistogram_MakeKey(*args, **kwargs) |
1940 | ||
1941 | MakeKey = staticmethod(MakeKey) | |
1942 | def FindFirstUnusedColour(*args, **kwargs): | |
0df68c9f RD |
1943 | """ |
1944 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
e811c8ce | 1945 | |
0df68c9f RD |
1946 | Find first colour that is not used in the image and has higher RGB values than |
1947 | startR, startG, startB. Returns a tuple consisting of a success flag and rgb | |
1948 | values. | |
1949 | """ | |
e811c8ce RD |
1950 | return _core.ImageHistogram_FindFirstUnusedColour(*args, **kwargs) |
1951 | ||
d14a1e28 RD |
1952 | |
1953 | class ImageHistogramPtr(ImageHistogram): | |
1954 | def __init__(self, this): | |
1955 | self.this = this | |
1956 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1957 | self.__class__ = ImageHistogram | |
1958 | _core.ImageHistogram_swigregister(ImageHistogramPtr) | |
1959 | ||
e811c8ce | 1960 | def ImageHistogram_MakeKey(*args, **kwargs): |
0df68c9f RD |
1961 | """ |
1962 | ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long | |
e811c8ce | 1963 | |
0df68c9f RD |
1964 | Get the key in the histogram for the given RGB values |
1965 | """ | |
e811c8ce | 1966 | return _core.ImageHistogram_MakeKey(*args, **kwargs) |
d14a1e28 RD |
1967 | |
1968 | class Image(Object): | |
e811c8ce RD |
1969 | def __repr__(self): |
1970 | return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1971 | def __init__(self, *args, **kwargs): |
196addbf | 1972 | """__init__(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
d14a1e28 RD |
1973 | newobj = _core.new_Image(*args, **kwargs) |
1974 | self.this = newobj.this | |
1975 | self.thisown = 1 | |
1976 | del newobj.thisown | |
1977 | def __del__(self, destroy=_core.delete_Image): | |
e811c8ce | 1978 | """__del__()""" |
d14a1e28 RD |
1979 | try: |
1980 | if self.thisown: destroy(self) | |
1981 | except: pass | |
e811c8ce RD |
1982 | |
1983 | def Create(*args, **kwargs): | |
1984 | """Create(int width, int height)""" | |
1985 | return _core.Image_Create(*args, **kwargs) | |
1986 | ||
1987 | def Destroy(*args, **kwargs): | |
0df68c9f RD |
1988 | """ |
1989 | Destroy() | |
e811c8ce | 1990 | |
0df68c9f RD |
1991 | Deletes the C++ object this Python object is a proxy for. |
1992 | """ | |
e811c8ce RD |
1993 | return _core.Image_Destroy(*args, **kwargs) |
1994 | ||
1995 | def Scale(*args, **kwargs): | |
1996 | """Scale(int width, int height) -> Image""" | |
1997 | return _core.Image_Scale(*args, **kwargs) | |
1998 | ||
1999 | def ShrinkBy(*args, **kwargs): | |
2000 | """ShrinkBy(int xFactor, int yFactor) -> Image""" | |
2001 | return _core.Image_ShrinkBy(*args, **kwargs) | |
2002 | ||
2003 | def Rescale(*args, **kwargs): | |
2004 | """Rescale(int width, int height) -> Image""" | |
2005 | return _core.Image_Rescale(*args, **kwargs) | |
2006 | ||
2007 | def SetRGB(*args, **kwargs): | |
2008 | """SetRGB(int x, int y, unsigned char r, unsigned char g, unsigned char b)""" | |
2009 | return _core.Image_SetRGB(*args, **kwargs) | |
2010 | ||
2011 | def GetRed(*args, **kwargs): | |
2012 | """GetRed(int x, int y) -> unsigned char""" | |
2013 | return _core.Image_GetRed(*args, **kwargs) | |
2014 | ||
2015 | def GetGreen(*args, **kwargs): | |
2016 | """GetGreen(int x, int y) -> unsigned char""" | |
2017 | return _core.Image_GetGreen(*args, **kwargs) | |
2018 | ||
2019 | def GetBlue(*args, **kwargs): | |
2020 | """GetBlue(int x, int y) -> unsigned char""" | |
2021 | return _core.Image_GetBlue(*args, **kwargs) | |
2022 | ||
2023 | def SetAlpha(*args, **kwargs): | |
2024 | """SetAlpha(int x, int y, unsigned char alpha)""" | |
2025 | return _core.Image_SetAlpha(*args, **kwargs) | |
2026 | ||
2027 | def GetAlpha(*args, **kwargs): | |
2028 | """GetAlpha(int x, int y) -> unsigned char""" | |
2029 | return _core.Image_GetAlpha(*args, **kwargs) | |
2030 | ||
2031 | def HasAlpha(*args, **kwargs): | |
2032 | """HasAlpha() -> bool""" | |
2033 | return _core.Image_HasAlpha(*args, **kwargs) | |
2034 | ||
2035 | def FindFirstUnusedColour(*args, **kwargs): | |
0df68c9f RD |
2036 | """ |
2037 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
e811c8ce | 2038 | |
0df68c9f RD |
2039 | Find first colour that is not used in the image and has higher RGB values than |
2040 | startR, startG, startB. Returns a tuple consisting of a success flag and rgb | |
2041 | values. | |
2042 | """ | |
e811c8ce RD |
2043 | return _core.Image_FindFirstUnusedColour(*args, **kwargs) |
2044 | ||
2045 | def SetMaskFromImage(*args, **kwargs): | |
2046 | """SetMaskFromImage(Image mask, byte mr, byte mg, byte mb) -> bool""" | |
2047 | return _core.Image_SetMaskFromImage(*args, **kwargs) | |
2048 | ||
2049 | def CanRead(*args, **kwargs): | |
a41e16b6 | 2050 | """CanRead(String name) -> bool""" |
e811c8ce RD |
2051 | return _core.Image_CanRead(*args, **kwargs) |
2052 | ||
2053 | CanRead = staticmethod(CanRead) | |
2054 | def GetImageCount(*args, **kwargs): | |
a41e16b6 | 2055 | """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" |
e811c8ce RD |
2056 | return _core.Image_GetImageCount(*args, **kwargs) |
2057 | ||
2058 | GetImageCount = staticmethod(GetImageCount) | |
2059 | def LoadFile(*args, **kwargs): | |
196addbf | 2060 | """LoadFile(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" |
e811c8ce RD |
2061 | return _core.Image_LoadFile(*args, **kwargs) |
2062 | ||
2063 | def LoadMimeFile(*args, **kwargs): | |
196addbf | 2064 | """LoadMimeFile(String name, String mimetype, int index=-1) -> bool""" |
e811c8ce RD |
2065 | return _core.Image_LoadMimeFile(*args, **kwargs) |
2066 | ||
2067 | def SaveFile(*args, **kwargs): | |
196addbf | 2068 | """SaveFile(String name, int type) -> bool""" |
e811c8ce RD |
2069 | return _core.Image_SaveFile(*args, **kwargs) |
2070 | ||
2071 | def SaveMimeFile(*args, **kwargs): | |
196addbf | 2072 | """SaveMimeFile(String name, String mimetype) -> bool""" |
e811c8ce RD |
2073 | return _core.Image_SaveMimeFile(*args, **kwargs) |
2074 | ||
2075 | def CanReadStream(*args, **kwargs): | |
a41e16b6 | 2076 | """CanReadStream(InputStream stream) -> bool""" |
e811c8ce RD |
2077 | return _core.Image_CanReadStream(*args, **kwargs) |
2078 | ||
2079 | CanReadStream = staticmethod(CanReadStream) | |
2080 | def LoadStream(*args, **kwargs): | |
196addbf | 2081 | """LoadStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" |
e811c8ce RD |
2082 | return _core.Image_LoadStream(*args, **kwargs) |
2083 | ||
2084 | def LoadMimeStream(*args, **kwargs): | |
196addbf | 2085 | """LoadMimeStream(InputStream stream, String mimetype, int index=-1) -> bool""" |
e811c8ce RD |
2086 | return _core.Image_LoadMimeStream(*args, **kwargs) |
2087 | ||
2088 | def Ok(*args, **kwargs): | |
2089 | """Ok() -> bool""" | |
2090 | return _core.Image_Ok(*args, **kwargs) | |
2091 | ||
2092 | def GetWidth(*args, **kwargs): | |
2093 | """GetWidth() -> int""" | |
2094 | return _core.Image_GetWidth(*args, **kwargs) | |
2095 | ||
2096 | def GetHeight(*args, **kwargs): | |
2097 | """GetHeight() -> int""" | |
2098 | return _core.Image_GetHeight(*args, **kwargs) | |
2099 | ||
2100 | def GetSubImage(*args, **kwargs): | |
2101 | """GetSubImage(Rect rect) -> Image""" | |
2102 | return _core.Image_GetSubImage(*args, **kwargs) | |
2103 | ||
2104 | def Copy(*args, **kwargs): | |
2105 | """Copy() -> Image""" | |
2106 | return _core.Image_Copy(*args, **kwargs) | |
2107 | ||
2108 | def Paste(*args, **kwargs): | |
2109 | """Paste(Image image, int x, int y)""" | |
2110 | return _core.Image_Paste(*args, **kwargs) | |
2111 | ||
2112 | def GetData(*args, **kwargs): | |
2113 | """GetData() -> PyObject""" | |
2114 | return _core.Image_GetData(*args, **kwargs) | |
2115 | ||
2116 | def SetData(*args, **kwargs): | |
2117 | """SetData(PyObject data)""" | |
2118 | return _core.Image_SetData(*args, **kwargs) | |
2119 | ||
2120 | def GetDataBuffer(*args, **kwargs): | |
2121 | """GetDataBuffer() -> PyObject""" | |
2122 | return _core.Image_GetDataBuffer(*args, **kwargs) | |
2123 | ||
2124 | def SetDataBuffer(*args, **kwargs): | |
2125 | """SetDataBuffer(PyObject data)""" | |
2126 | return _core.Image_SetDataBuffer(*args, **kwargs) | |
2127 | ||
2128 | def GetAlphaData(*args, **kwargs): | |
2129 | """GetAlphaData() -> PyObject""" | |
2130 | return _core.Image_GetAlphaData(*args, **kwargs) | |
2131 | ||
2132 | def SetAlphaData(*args, **kwargs): | |
2133 | """SetAlphaData(PyObject data)""" | |
2134 | return _core.Image_SetAlphaData(*args, **kwargs) | |
2135 | ||
2136 | def GetAlphaBuffer(*args, **kwargs): | |
2137 | """GetAlphaBuffer() -> PyObject""" | |
2138 | return _core.Image_GetAlphaBuffer(*args, **kwargs) | |
2139 | ||
2140 | def SetAlphaBuffer(*args, **kwargs): | |
2141 | """SetAlphaBuffer(PyObject data)""" | |
2142 | return _core.Image_SetAlphaBuffer(*args, **kwargs) | |
2143 | ||
2144 | def SetMaskColour(*args, **kwargs): | |
2145 | """SetMaskColour(unsigned char r, unsigned char g, unsigned char b)""" | |
2146 | return _core.Image_SetMaskColour(*args, **kwargs) | |
2147 | ||
2148 | def GetMaskRed(*args, **kwargs): | |
2149 | """GetMaskRed() -> unsigned char""" | |
2150 | return _core.Image_GetMaskRed(*args, **kwargs) | |
2151 | ||
2152 | def GetMaskGreen(*args, **kwargs): | |
2153 | """GetMaskGreen() -> unsigned char""" | |
2154 | return _core.Image_GetMaskGreen(*args, **kwargs) | |
2155 | ||
2156 | def GetMaskBlue(*args, **kwargs): | |
2157 | """GetMaskBlue() -> unsigned char""" | |
2158 | return _core.Image_GetMaskBlue(*args, **kwargs) | |
2159 | ||
2160 | def SetMask(*args, **kwargs): | |
2161 | """SetMask(bool mask=True)""" | |
2162 | return _core.Image_SetMask(*args, **kwargs) | |
2163 | ||
2164 | def HasMask(*args, **kwargs): | |
2165 | """HasMask() -> bool""" | |
2166 | return _core.Image_HasMask(*args, **kwargs) | |
2167 | ||
2168 | def Rotate(*args, **kwargs): | |
0df68c9f RD |
2169 | """ |
2170 | Rotate(double angle, Point centre_of_rotation, bool interpolating=True, | |
2171 | Point offset_after_rotation=None) -> Image | |
2172 | """ | |
e811c8ce RD |
2173 | return _core.Image_Rotate(*args, **kwargs) |
2174 | ||
2175 | def Rotate90(*args, **kwargs): | |
2176 | """Rotate90(bool clockwise=True) -> Image""" | |
2177 | return _core.Image_Rotate90(*args, **kwargs) | |
2178 | ||
2179 | def Mirror(*args, **kwargs): | |
2180 | """Mirror(bool horizontally=True) -> Image""" | |
2181 | return _core.Image_Mirror(*args, **kwargs) | |
2182 | ||
2183 | def Replace(*args, **kwargs): | |
0df68c9f RD |
2184 | """ |
2185 | Replace(unsigned char r1, unsigned char g1, unsigned char b1, | |
2186 | unsigned char r2, unsigned char g2, unsigned char b2) | |
2187 | """ | |
e811c8ce RD |
2188 | return _core.Image_Replace(*args, **kwargs) |
2189 | ||
2190 | def ConvertToMono(*args, **kwargs): | |
2191 | """ConvertToMono(unsigned char r, unsigned char g, unsigned char b) -> Image""" | |
2192 | return _core.Image_ConvertToMono(*args, **kwargs) | |
2193 | ||
2194 | def SetOption(*args, **kwargs): | |
196addbf | 2195 | """SetOption(String name, String value)""" |
e811c8ce RD |
2196 | return _core.Image_SetOption(*args, **kwargs) |
2197 | ||
2198 | def SetOptionInt(*args, **kwargs): | |
196addbf | 2199 | """SetOptionInt(String name, int value)""" |
e811c8ce RD |
2200 | return _core.Image_SetOptionInt(*args, **kwargs) |
2201 | ||
2202 | def GetOption(*args, **kwargs): | |
196addbf | 2203 | """GetOption(String name) -> String""" |
e811c8ce RD |
2204 | return _core.Image_GetOption(*args, **kwargs) |
2205 | ||
2206 | def GetOptionInt(*args, **kwargs): | |
196addbf | 2207 | """GetOptionInt(String name) -> int""" |
e811c8ce RD |
2208 | return _core.Image_GetOptionInt(*args, **kwargs) |
2209 | ||
2210 | def HasOption(*args, **kwargs): | |
196addbf | 2211 | """HasOption(String name) -> bool""" |
e811c8ce RD |
2212 | return _core.Image_HasOption(*args, **kwargs) |
2213 | ||
2214 | def CountColours(*args, **kwargs): | |
2215 | """CountColours(unsigned long stopafter=(unsigned long) -1) -> unsigned long""" | |
2216 | return _core.Image_CountColours(*args, **kwargs) | |
2217 | ||
2218 | def ComputeHistogram(*args, **kwargs): | |
2219 | """ComputeHistogram(ImageHistogram h) -> unsigned long""" | |
2220 | return _core.Image_ComputeHistogram(*args, **kwargs) | |
2221 | ||
2222 | def AddHandler(*args, **kwargs): | |
a41e16b6 | 2223 | """AddHandler(ImageHandler handler)""" |
e811c8ce RD |
2224 | return _core.Image_AddHandler(*args, **kwargs) |
2225 | ||
2226 | AddHandler = staticmethod(AddHandler) | |
2227 | def InsertHandler(*args, **kwargs): | |
a41e16b6 | 2228 | """InsertHandler(ImageHandler handler)""" |
e811c8ce RD |
2229 | return _core.Image_InsertHandler(*args, **kwargs) |
2230 | ||
2231 | InsertHandler = staticmethod(InsertHandler) | |
2232 | def RemoveHandler(*args, **kwargs): | |
a41e16b6 | 2233 | """RemoveHandler(String name) -> bool""" |
e811c8ce RD |
2234 | return _core.Image_RemoveHandler(*args, **kwargs) |
2235 | ||
2236 | RemoveHandler = staticmethod(RemoveHandler) | |
2237 | def GetImageExtWildcard(*args, **kwargs): | |
a41e16b6 | 2238 | """GetImageExtWildcard() -> String""" |
e811c8ce RD |
2239 | return _core.Image_GetImageExtWildcard(*args, **kwargs) |
2240 | ||
2241 | GetImageExtWildcard = staticmethod(GetImageExtWildcard) | |
2242 | def ConvertToBitmap(*args, **kwargs): | |
196addbf | 2243 | """ConvertToBitmap() -> Bitmap""" |
e811c8ce RD |
2244 | return _core.Image_ConvertToBitmap(*args, **kwargs) |
2245 | ||
2246 | def ConvertToMonoBitmap(*args, **kwargs): | |
196addbf | 2247 | """ConvertToMonoBitmap(unsigned char red, unsigned char green, unsigned char blue) -> Bitmap""" |
e811c8ce RD |
2248 | return _core.Image_ConvertToMonoBitmap(*args, **kwargs) |
2249 | ||
2250 | def __nonzero__(self): return self.Ok() | |
d14a1e28 RD |
2251 | |
2252 | class ImagePtr(Image): | |
2253 | def __init__(self, this): | |
2254 | self.this = this | |
2255 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2256 | self.__class__ = Image | |
2257 | _core.Image_swigregister(ImagePtr) | |
2258 | ||
2259 | def ImageFromMime(*args, **kwargs): | |
196addbf | 2260 | """ImageFromMime(String name, String mimetype, int index=-1) -> Image""" |
d14a1e28 RD |
2261 | val = _core.new_ImageFromMime(*args, **kwargs) |
2262 | val.thisown = 1 | |
2263 | return val | |
2264 | ||
2265 | def ImageFromStream(*args, **kwargs): | |
196addbf | 2266 | """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
d14a1e28 RD |
2267 | val = _core.new_ImageFromStream(*args, **kwargs) |
2268 | val.thisown = 1 | |
2269 | return val | |
2270 | ||
2271 | def ImageFromStreamMime(*args, **kwargs): | |
196addbf | 2272 | """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image""" |
d14a1e28 RD |
2273 | val = _core.new_ImageFromStreamMime(*args, **kwargs) |
2274 | val.thisown = 1 | |
2275 | return val | |
2276 | ||
2277 | def EmptyImage(*args, **kwargs): | |
e811c8ce | 2278 | """EmptyImage(int width=0, int height=0, bool clear=True) -> Image""" |
d14a1e28 RD |
2279 | val = _core.new_EmptyImage(*args, **kwargs) |
2280 | val.thisown = 1 | |
2281 | return val | |
2282 | ||
2283 | def ImageFromBitmap(*args, **kwargs): | |
196addbf | 2284 | """ImageFromBitmap(Bitmap bitmap) -> Image""" |
d14a1e28 RD |
2285 | val = _core.new_ImageFromBitmap(*args, **kwargs) |
2286 | val.thisown = 1 | |
2287 | return val | |
2288 | ||
2289 | def ImageFromData(*args, **kwargs): | |
e811c8ce | 2290 | """ImageFromData(int width, int height, unsigned char data) -> Image""" |
d14a1e28 RD |
2291 | val = _core.new_ImageFromData(*args, **kwargs) |
2292 | val.thisown = 1 | |
2293 | return val | |
2294 | ||
e811c8ce | 2295 | def Image_CanRead(*args, **kwargs): |
196addbf | 2296 | """Image_CanRead(String name) -> bool""" |
e811c8ce | 2297 | return _core.Image_CanRead(*args, **kwargs) |
d14a1e28 | 2298 | |
e811c8ce | 2299 | def Image_GetImageCount(*args, **kwargs): |
196addbf | 2300 | """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" |
e811c8ce | 2301 | return _core.Image_GetImageCount(*args, **kwargs) |
d14a1e28 | 2302 | |
e811c8ce | 2303 | def Image_CanReadStream(*args, **kwargs): |
196addbf | 2304 | """Image_CanReadStream(InputStream stream) -> bool""" |
e811c8ce | 2305 | return _core.Image_CanReadStream(*args, **kwargs) |
d14a1e28 | 2306 | |
e811c8ce RD |
2307 | def Image_AddHandler(*args, **kwargs): |
2308 | """Image_AddHandler(ImageHandler handler)""" | |
2309 | return _core.Image_AddHandler(*args, **kwargs) | |
d14a1e28 | 2310 | |
e811c8ce RD |
2311 | def Image_InsertHandler(*args, **kwargs): |
2312 | """Image_InsertHandler(ImageHandler handler)""" | |
2313 | return _core.Image_InsertHandler(*args, **kwargs) | |
d14a1e28 | 2314 | |
e811c8ce | 2315 | def Image_RemoveHandler(*args, **kwargs): |
196addbf | 2316 | """Image_RemoveHandler(String name) -> bool""" |
e811c8ce | 2317 | return _core.Image_RemoveHandler(*args, **kwargs) |
d14a1e28 | 2318 | |
e811c8ce | 2319 | def Image_GetImageExtWildcard(*args, **kwargs): |
196addbf | 2320 | """Image_GetImageExtWildcard() -> String""" |
e811c8ce | 2321 | return _core.Image_GetImageExtWildcard(*args, **kwargs) |
d14a1e28 RD |
2322 | |
2323 | ||
e811c8ce RD |
2324 | def InitAllImageHandlers(*args, **kwargs): |
2325 | """InitAllImageHandlers()""" | |
2326 | return _core.InitAllImageHandlers(*args, **kwargs) | |
d14a1e28 RD |
2327 | IMAGE_RESOLUTION_INCHES = _core.IMAGE_RESOLUTION_INCHES |
2328 | IMAGE_RESOLUTION_CM = _core.IMAGE_RESOLUTION_CM | |
2329 | BMP_24BPP = _core.BMP_24BPP | |
2330 | BMP_8BPP = _core.BMP_8BPP | |
2331 | BMP_8BPP_GREY = _core.BMP_8BPP_GREY | |
2332 | BMP_8BPP_GRAY = _core.BMP_8BPP_GRAY | |
2333 | BMP_8BPP_RED = _core.BMP_8BPP_RED | |
2334 | BMP_8BPP_PALETTE = _core.BMP_8BPP_PALETTE | |
2335 | BMP_4BPP = _core.BMP_4BPP | |
2336 | BMP_1BPP = _core.BMP_1BPP | |
2337 | BMP_1BPP_BW = _core.BMP_1BPP_BW | |
2338 | class BMPHandler(ImageHandler): | |
e811c8ce RD |
2339 | def __repr__(self): |
2340 | return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2341 | def __init__(self, *args, **kwargs): |
e811c8ce | 2342 | """__init__() -> BMPHandler""" |
d14a1e28 RD |
2343 | newobj = _core.new_BMPHandler(*args, **kwargs) |
2344 | self.this = newobj.this | |
2345 | self.thisown = 1 | |
2346 | del newobj.thisown | |
d14a1e28 RD |
2347 | |
2348 | class BMPHandlerPtr(BMPHandler): | |
2349 | def __init__(self, this): | |
2350 | self.this = this | |
2351 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2352 | self.__class__ = BMPHandler | |
2353 | _core.BMPHandler_swigregister(BMPHandlerPtr) | |
2354 | NullImage = cvar.NullImage | |
2355 | IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT | |
2356 | IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X | |
2357 | IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y | |
2358 | IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION | |
2359 | IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT | |
2360 | ||
2361 | class ICOHandler(BMPHandler): | |
e811c8ce RD |
2362 | def __repr__(self): |
2363 | return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2364 | def __init__(self, *args, **kwargs): |
e811c8ce | 2365 | """__init__() -> ICOHandler""" |
d14a1e28 RD |
2366 | newobj = _core.new_ICOHandler(*args, **kwargs) |
2367 | self.this = newobj.this | |
2368 | self.thisown = 1 | |
2369 | del newobj.thisown | |
d14a1e28 RD |
2370 | |
2371 | class ICOHandlerPtr(ICOHandler): | |
2372 | def __init__(self, this): | |
2373 | self.this = this | |
2374 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2375 | self.__class__ = ICOHandler | |
2376 | _core.ICOHandler_swigregister(ICOHandlerPtr) | |
2377 | ||
2378 | class CURHandler(ICOHandler): | |
e811c8ce RD |
2379 | def __repr__(self): |
2380 | return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2381 | def __init__(self, *args, **kwargs): |
e811c8ce | 2382 | """__init__() -> CURHandler""" |
d14a1e28 RD |
2383 | newobj = _core.new_CURHandler(*args, **kwargs) |
2384 | self.this = newobj.this | |
2385 | self.thisown = 1 | |
2386 | del newobj.thisown | |
d14a1e28 RD |
2387 | |
2388 | class CURHandlerPtr(CURHandler): | |
2389 | def __init__(self, this): | |
2390 | self.this = this | |
2391 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2392 | self.__class__ = CURHandler | |
2393 | _core.CURHandler_swigregister(CURHandlerPtr) | |
2394 | ||
2395 | class ANIHandler(CURHandler): | |
e811c8ce RD |
2396 | def __repr__(self): |
2397 | return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2398 | def __init__(self, *args, **kwargs): |
e811c8ce | 2399 | """__init__() -> ANIHandler""" |
d14a1e28 RD |
2400 | newobj = _core.new_ANIHandler(*args, **kwargs) |
2401 | self.this = newobj.this | |
2402 | self.thisown = 1 | |
2403 | del newobj.thisown | |
d14a1e28 RD |
2404 | |
2405 | class ANIHandlerPtr(ANIHandler): | |
2406 | def __init__(self, this): | |
2407 | self.this = this | |
2408 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2409 | self.__class__ = ANIHandler | |
2410 | _core.ANIHandler_swigregister(ANIHandlerPtr) | |
2411 | ||
2412 | class PNGHandler(ImageHandler): | |
e811c8ce RD |
2413 | def __repr__(self): |
2414 | return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2415 | def __init__(self, *args, **kwargs): |
e811c8ce | 2416 | """__init__() -> PNGHandler""" |
d14a1e28 RD |
2417 | newobj = _core.new_PNGHandler(*args, **kwargs) |
2418 | self.this = newobj.this | |
2419 | self.thisown = 1 | |
2420 | del newobj.thisown | |
d14a1e28 RD |
2421 | |
2422 | class PNGHandlerPtr(PNGHandler): | |
2423 | def __init__(self, this): | |
2424 | self.this = this | |
2425 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2426 | self.__class__ = PNGHandler | |
2427 | _core.PNGHandler_swigregister(PNGHandlerPtr) | |
2428 | ||
2429 | class GIFHandler(ImageHandler): | |
e811c8ce RD |
2430 | def __repr__(self): |
2431 | return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2432 | def __init__(self, *args, **kwargs): |
e811c8ce | 2433 | """__init__() -> GIFHandler""" |
d14a1e28 RD |
2434 | newobj = _core.new_GIFHandler(*args, **kwargs) |
2435 | self.this = newobj.this | |
2436 | self.thisown = 1 | |
2437 | del newobj.thisown | |
d14a1e28 RD |
2438 | |
2439 | class GIFHandlerPtr(GIFHandler): | |
2440 | def __init__(self, this): | |
2441 | self.this = this | |
2442 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2443 | self.__class__ = GIFHandler | |
2444 | _core.GIFHandler_swigregister(GIFHandlerPtr) | |
2445 | ||
2446 | class PCXHandler(ImageHandler): | |
e811c8ce RD |
2447 | def __repr__(self): |
2448 | return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2449 | def __init__(self, *args, **kwargs): |
e811c8ce | 2450 | """__init__() -> PCXHandler""" |
d14a1e28 RD |
2451 | newobj = _core.new_PCXHandler(*args, **kwargs) |
2452 | self.this = newobj.this | |
2453 | self.thisown = 1 | |
2454 | del newobj.thisown | |
d14a1e28 RD |
2455 | |
2456 | class PCXHandlerPtr(PCXHandler): | |
2457 | def __init__(self, this): | |
2458 | self.this = this | |
2459 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2460 | self.__class__ = PCXHandler | |
2461 | _core.PCXHandler_swigregister(PCXHandlerPtr) | |
2462 | ||
2463 | class JPEGHandler(ImageHandler): | |
e811c8ce RD |
2464 | def __repr__(self): |
2465 | return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2466 | def __init__(self, *args, **kwargs): |
e811c8ce | 2467 | """__init__() -> JPEGHandler""" |
d14a1e28 RD |
2468 | newobj = _core.new_JPEGHandler(*args, **kwargs) |
2469 | self.this = newobj.this | |
2470 | self.thisown = 1 | |
2471 | del newobj.thisown | |
d14a1e28 RD |
2472 | |
2473 | class JPEGHandlerPtr(JPEGHandler): | |
2474 | def __init__(self, this): | |
2475 | self.this = this | |
2476 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2477 | self.__class__ = JPEGHandler | |
2478 | _core.JPEGHandler_swigregister(JPEGHandlerPtr) | |
2479 | ||
2480 | class PNMHandler(ImageHandler): | |
e811c8ce RD |
2481 | def __repr__(self): |
2482 | return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2483 | def __init__(self, *args, **kwargs): |
e811c8ce | 2484 | """__init__() -> PNMHandler""" |
d14a1e28 RD |
2485 | newobj = _core.new_PNMHandler(*args, **kwargs) |
2486 | self.this = newobj.this | |
2487 | self.thisown = 1 | |
2488 | del newobj.thisown | |
d14a1e28 RD |
2489 | |
2490 | class PNMHandlerPtr(PNMHandler): | |
2491 | def __init__(self, this): | |
2492 | self.this = this | |
2493 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2494 | self.__class__ = PNMHandler | |
2495 | _core.PNMHandler_swigregister(PNMHandlerPtr) | |
2496 | ||
2497 | class XPMHandler(ImageHandler): | |
e811c8ce RD |
2498 | def __repr__(self): |
2499 | return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2500 | def __init__(self, *args, **kwargs): |
e811c8ce | 2501 | """__init__() -> XPMHandler""" |
d14a1e28 RD |
2502 | newobj = _core.new_XPMHandler(*args, **kwargs) |
2503 | self.this = newobj.this | |
2504 | self.thisown = 1 | |
2505 | del newobj.thisown | |
d14a1e28 RD |
2506 | |
2507 | class XPMHandlerPtr(XPMHandler): | |
2508 | def __init__(self, this): | |
2509 | self.this = this | |
2510 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2511 | self.__class__ = XPMHandler | |
2512 | _core.XPMHandler_swigregister(XPMHandlerPtr) | |
2513 | ||
2514 | class TIFFHandler(ImageHandler): | |
e811c8ce RD |
2515 | def __repr__(self): |
2516 | return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2517 | def __init__(self, *args, **kwargs): |
e811c8ce | 2518 | """__init__() -> TIFFHandler""" |
d14a1e28 RD |
2519 | newobj = _core.new_TIFFHandler(*args, **kwargs) |
2520 | self.this = newobj.this | |
2521 | self.thisown = 1 | |
2522 | del newobj.thisown | |
d14a1e28 RD |
2523 | |
2524 | class TIFFHandlerPtr(TIFFHandler): | |
2525 | def __init__(self, this): | |
2526 | self.this = this | |
2527 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2528 | self.__class__ = TIFFHandler | |
2529 | _core.TIFFHandler_swigregister(TIFFHandlerPtr) | |
2530 | ||
2531 | #--------------------------------------------------------------------------- | |
2532 | ||
2533 | class EvtHandler(Object): | |
e811c8ce RD |
2534 | def __repr__(self): |
2535 | return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2536 | def __init__(self, *args, **kwargs): |
e811c8ce | 2537 | """__init__() -> EvtHandler""" |
d14a1e28 RD |
2538 | newobj = _core.new_EvtHandler(*args, **kwargs) |
2539 | self.this = newobj.this | |
2540 | self.thisown = 1 | |
2541 | del newobj.thisown | |
e811c8ce RD |
2542 | def GetNextHandler(*args, **kwargs): |
2543 | """GetNextHandler() -> EvtHandler""" | |
2544 | return _core.EvtHandler_GetNextHandler(*args, **kwargs) | |
2545 | ||
2546 | def GetPreviousHandler(*args, **kwargs): | |
2547 | """GetPreviousHandler() -> EvtHandler""" | |
2548 | return _core.EvtHandler_GetPreviousHandler(*args, **kwargs) | |
2549 | ||
2550 | def SetNextHandler(*args, **kwargs): | |
2551 | """SetNextHandler(EvtHandler handler)""" | |
2552 | return _core.EvtHandler_SetNextHandler(*args, **kwargs) | |
2553 | ||
2554 | def SetPreviousHandler(*args, **kwargs): | |
2555 | """SetPreviousHandler(EvtHandler handler)""" | |
2556 | return _core.EvtHandler_SetPreviousHandler(*args, **kwargs) | |
2557 | ||
2558 | def GetEvtHandlerEnabled(*args, **kwargs): | |
2559 | """GetEvtHandlerEnabled() -> bool""" | |
2560 | return _core.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs) | |
2561 | ||
2562 | def SetEvtHandlerEnabled(*args, **kwargs): | |
2563 | """SetEvtHandlerEnabled(bool enabled)""" | |
2564 | return _core.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs) | |
2565 | ||
2566 | def ProcessEvent(*args, **kwargs): | |
2567 | """ProcessEvent(Event event) -> bool""" | |
2568 | return _core.EvtHandler_ProcessEvent(*args, **kwargs) | |
2569 | ||
2570 | def AddPendingEvent(*args, **kwargs): | |
2571 | """AddPendingEvent(Event event)""" | |
2572 | return _core.EvtHandler_AddPendingEvent(*args, **kwargs) | |
2573 | ||
2574 | def ProcessPendingEvents(*args, **kwargs): | |
2575 | """ProcessPendingEvents()""" | |
2576 | return _core.EvtHandler_ProcessPendingEvents(*args, **kwargs) | |
2577 | ||
2578 | def Connect(*args, **kwargs): | |
2579 | """Connect(int id, int lastId, int eventType, PyObject func)""" | |
2580 | return _core.EvtHandler_Connect(*args, **kwargs) | |
2581 | ||
2582 | def Disconnect(*args, **kwargs): | |
2583 | """Disconnect(int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool""" | |
2584 | return _core.EvtHandler_Disconnect(*args, **kwargs) | |
2585 | ||
2586 | def _setOORInfo(*args, **kwargs): | |
2587 | """_setOORInfo(PyObject _self)""" | |
2588 | return _core.EvtHandler__setOORInfo(*args, **kwargs) | |
2589 | ||
d14a1e28 RD |
2590 | def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
2591 | """ | |
2592 | Bind an event to an event handler. | |
2593 | ||
2594 | event One of the EVT_* objects that specifies the | |
2595 | type of event to bind, | |
2596 | ||
2597 | handler A callable object to be invoked when the event | |
2598 | is delivered to self. Pass None to disconnect an | |
2599 | event handler. | |
2600 | ||
2601 | source Sometimes the event originates from a different window | |
2602 | than self, but you still want to catch it in self. (For | |
2603 | example, a button event delivered to a frame.) By | |
2604 | passing the source of the event, the event handling | |
2605 | system is able to differentiate between the same event | |
2606 | type from different controls. | |
2607 | ||
2608 | id,id2 Used for menu IDs or for event types that require a | |
2609 | range of IDs | |
2610 | """ | |
2611 | if source is not None: | |
2612 | id = source.GetId() | |
2613 | event.Bind(self, id, id2, handler) | |
2614 | ||
2615 | ||
d14a1e28 RD |
2616 | |
2617 | class EvtHandlerPtr(EvtHandler): | |
2618 | def __init__(self, this): | |
2619 | self.this = this | |
2620 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2621 | self.__class__ = EvtHandler | |
2622 | _core.EvtHandler_swigregister(EvtHandlerPtr) | |
2623 | ||
2624 | #--------------------------------------------------------------------------- | |
2625 | ||
2626 | class PyEventBinder(object): | |
2627 | """ | |
2628 | Instances of this class are used to bind specific events to event | |
2629 | handlers. | |
2630 | """ | |
2631 | def __init__(self, evtType, expectedIDs=0): | |
2632 | if expectedIDs not in [0, 1, 2]: | |
2633 | raise ValueError, "Invalid number of expectedIDs" | |
2634 | self.expectedIDs = expectedIDs | |
2635 | ||
2636 | if type(evtType) == list or type(evtType) == tuple: | |
2637 | self.evtType = evtType | |
2638 | else: | |
2639 | self.evtType = [evtType] | |
2640 | ||
2641 | ||
2642 | def Bind(self, target, id1, id2, function): | |
2643 | """Bind this set of event types to target.""" | |
2644 | for et in self.evtType: | |
2645 | target.Connect(id1, id2, et, function) | |
2646 | ||
2647 | ||
2648 | def __call__(self, *args): | |
2649 | """ | |
2650 | For backwards compatibility with the old EVT_* functions. | |
2651 | Should be called with either (window, func), (window, ID, | |
2652 | func) or (window, ID1, ID2, func) parameters depending on the | |
2653 | type of the event. | |
2654 | """ | |
2655 | assert len(args) == 2 + self.expectedIDs | |
2656 | id1 = wx.ID_ANY | |
2657 | id2 = wx.ID_ANY | |
2658 | target = args[0] | |
2659 | if self.expectedIDs == 0: | |
2660 | func = args[1] | |
2661 | elif self.expectedIDs == 1: | |
2662 | id1 = args[1] | |
2663 | func = args[2] | |
2664 | elif self.expectedIDs == 2: | |
2665 | id1 = args[1] | |
2666 | id2 = args[2] | |
2667 | func = args[3] | |
2668 | else: | |
2669 | raise ValueError, "Unexpected number of IDs" | |
2670 | ||
2671 | self.Bind(target, id1, id2, func) | |
2672 | ||
2673 | ||
2674 | # These two are square pegs that don't fit the PyEventBinder hole... | |
2675 | def EVT_COMMAND(win, id, cmd, func): | |
2676 | win.Connect(id, -1, cmd, func) | |
2677 | def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): | |
2678 | win.Connect(id1, id2, cmd, func) | |
2679 | ||
2680 | ||
2681 | #--------------------------------------------------------------------------- | |
2682 | ||
2683 | #--------------------------------------------------------------------------- | |
2684 | ||
2685 | EVENT_PROPAGATE_NONE = _core.EVENT_PROPAGATE_NONE | |
2686 | EVENT_PROPAGATE_MAX = _core.EVENT_PROPAGATE_MAX | |
2687 | ||
e811c8ce RD |
2688 | def NewEventType(*args, **kwargs): |
2689 | """NewEventType() -> wxEventType""" | |
2690 | return _core.NewEventType(*args, **kwargs) | |
d14a1e28 RD |
2691 | wxEVT_NULL = _core.wxEVT_NULL |
2692 | wxEVT_FIRST = _core.wxEVT_FIRST | |
2693 | wxEVT_USER_FIRST = _core.wxEVT_USER_FIRST | |
2694 | wxEVT_COMMAND_BUTTON_CLICKED = _core.wxEVT_COMMAND_BUTTON_CLICKED | |
2695 | wxEVT_COMMAND_CHECKBOX_CLICKED = _core.wxEVT_COMMAND_CHECKBOX_CLICKED | |
2696 | wxEVT_COMMAND_CHOICE_SELECTED = _core.wxEVT_COMMAND_CHOICE_SELECTED | |
2697 | wxEVT_COMMAND_LISTBOX_SELECTED = _core.wxEVT_COMMAND_LISTBOX_SELECTED | |
2698 | wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED | |
2699 | wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED | |
2700 | wxEVT_COMMAND_MENU_SELECTED = _core.wxEVT_COMMAND_MENU_SELECTED | |
2701 | wxEVT_COMMAND_TOOL_CLICKED = _core.wxEVT_COMMAND_TOOL_CLICKED | |
2702 | wxEVT_COMMAND_SLIDER_UPDATED = _core.wxEVT_COMMAND_SLIDER_UPDATED | |
2703 | wxEVT_COMMAND_RADIOBOX_SELECTED = _core.wxEVT_COMMAND_RADIOBOX_SELECTED | |
2704 | wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core.wxEVT_COMMAND_RADIOBUTTON_SELECTED | |
2705 | wxEVT_COMMAND_SCROLLBAR_UPDATED = _core.wxEVT_COMMAND_SCROLLBAR_UPDATED | |
2706 | wxEVT_COMMAND_VLBOX_SELECTED = _core.wxEVT_COMMAND_VLBOX_SELECTED | |
2707 | wxEVT_COMMAND_COMBOBOX_SELECTED = _core.wxEVT_COMMAND_COMBOBOX_SELECTED | |
2708 | wxEVT_COMMAND_TOOL_RCLICKED = _core.wxEVT_COMMAND_TOOL_RCLICKED | |
2709 | wxEVT_COMMAND_TOOL_ENTER = _core.wxEVT_COMMAND_TOOL_ENTER | |
2710 | wxEVT_LEFT_DOWN = _core.wxEVT_LEFT_DOWN | |
2711 | wxEVT_LEFT_UP = _core.wxEVT_LEFT_UP | |
2712 | wxEVT_MIDDLE_DOWN = _core.wxEVT_MIDDLE_DOWN | |
2713 | wxEVT_MIDDLE_UP = _core.wxEVT_MIDDLE_UP | |
2714 | wxEVT_RIGHT_DOWN = _core.wxEVT_RIGHT_DOWN | |
2715 | wxEVT_RIGHT_UP = _core.wxEVT_RIGHT_UP | |
2716 | wxEVT_MOTION = _core.wxEVT_MOTION | |
2717 | wxEVT_ENTER_WINDOW = _core.wxEVT_ENTER_WINDOW | |
2718 | wxEVT_LEAVE_WINDOW = _core.wxEVT_LEAVE_WINDOW | |
2719 | wxEVT_LEFT_DCLICK = _core.wxEVT_LEFT_DCLICK | |
2720 | wxEVT_MIDDLE_DCLICK = _core.wxEVT_MIDDLE_DCLICK | |
2721 | wxEVT_RIGHT_DCLICK = _core.wxEVT_RIGHT_DCLICK | |
2722 | wxEVT_SET_FOCUS = _core.wxEVT_SET_FOCUS | |
2723 | wxEVT_KILL_FOCUS = _core.wxEVT_KILL_FOCUS | |
2724 | wxEVT_CHILD_FOCUS = _core.wxEVT_CHILD_FOCUS | |
2725 | wxEVT_MOUSEWHEEL = _core.wxEVT_MOUSEWHEEL | |
2726 | wxEVT_NC_LEFT_DOWN = _core.wxEVT_NC_LEFT_DOWN | |
2727 | wxEVT_NC_LEFT_UP = _core.wxEVT_NC_LEFT_UP | |
2728 | wxEVT_NC_MIDDLE_DOWN = _core.wxEVT_NC_MIDDLE_DOWN | |
2729 | wxEVT_NC_MIDDLE_UP = _core.wxEVT_NC_MIDDLE_UP | |
2730 | wxEVT_NC_RIGHT_DOWN = _core.wxEVT_NC_RIGHT_DOWN | |
2731 | wxEVT_NC_RIGHT_UP = _core.wxEVT_NC_RIGHT_UP | |
2732 | wxEVT_NC_MOTION = _core.wxEVT_NC_MOTION | |
2733 | wxEVT_NC_ENTER_WINDOW = _core.wxEVT_NC_ENTER_WINDOW | |
2734 | wxEVT_NC_LEAVE_WINDOW = _core.wxEVT_NC_LEAVE_WINDOW | |
2735 | wxEVT_NC_LEFT_DCLICK = _core.wxEVT_NC_LEFT_DCLICK | |
2736 | wxEVT_NC_MIDDLE_DCLICK = _core.wxEVT_NC_MIDDLE_DCLICK | |
2737 | wxEVT_NC_RIGHT_DCLICK = _core.wxEVT_NC_RIGHT_DCLICK | |
2738 | wxEVT_CHAR = _core.wxEVT_CHAR | |
2739 | wxEVT_CHAR_HOOK = _core.wxEVT_CHAR_HOOK | |
2740 | wxEVT_NAVIGATION_KEY = _core.wxEVT_NAVIGATION_KEY | |
2741 | wxEVT_KEY_DOWN = _core.wxEVT_KEY_DOWN | |
2742 | wxEVT_KEY_UP = _core.wxEVT_KEY_UP | |
2743 | wxEVT_HOTKEY = _core.wxEVT_HOTKEY | |
2744 | wxEVT_SET_CURSOR = _core.wxEVT_SET_CURSOR | |
2745 | wxEVT_SCROLL_TOP = _core.wxEVT_SCROLL_TOP | |
2746 | wxEVT_SCROLL_BOTTOM = _core.wxEVT_SCROLL_BOTTOM | |
2747 | wxEVT_SCROLL_LINEUP = _core.wxEVT_SCROLL_LINEUP | |
2748 | wxEVT_SCROLL_LINEDOWN = _core.wxEVT_SCROLL_LINEDOWN | |
2749 | wxEVT_SCROLL_PAGEUP = _core.wxEVT_SCROLL_PAGEUP | |
2750 | wxEVT_SCROLL_PAGEDOWN = _core.wxEVT_SCROLL_PAGEDOWN | |
2751 | wxEVT_SCROLL_THUMBTRACK = _core.wxEVT_SCROLL_THUMBTRACK | |
2752 | wxEVT_SCROLL_THUMBRELEASE = _core.wxEVT_SCROLL_THUMBRELEASE | |
2753 | wxEVT_SCROLL_ENDSCROLL = _core.wxEVT_SCROLL_ENDSCROLL | |
2754 | wxEVT_SCROLLWIN_TOP = _core.wxEVT_SCROLLWIN_TOP | |
2755 | wxEVT_SCROLLWIN_BOTTOM = _core.wxEVT_SCROLLWIN_BOTTOM | |
2756 | wxEVT_SCROLLWIN_LINEUP = _core.wxEVT_SCROLLWIN_LINEUP | |
2757 | wxEVT_SCROLLWIN_LINEDOWN = _core.wxEVT_SCROLLWIN_LINEDOWN | |
2758 | wxEVT_SCROLLWIN_PAGEUP = _core.wxEVT_SCROLLWIN_PAGEUP | |
2759 | wxEVT_SCROLLWIN_PAGEDOWN = _core.wxEVT_SCROLLWIN_PAGEDOWN | |
2760 | wxEVT_SCROLLWIN_THUMBTRACK = _core.wxEVT_SCROLLWIN_THUMBTRACK | |
2761 | wxEVT_SCROLLWIN_THUMBRELEASE = _core.wxEVT_SCROLLWIN_THUMBRELEASE | |
2762 | wxEVT_SIZE = _core.wxEVT_SIZE | |
2763 | wxEVT_MOVE = _core.wxEVT_MOVE | |
2764 | wxEVT_CLOSE_WINDOW = _core.wxEVT_CLOSE_WINDOW | |
2765 | wxEVT_END_SESSION = _core.wxEVT_END_SESSION | |
2766 | wxEVT_QUERY_END_SESSION = _core.wxEVT_QUERY_END_SESSION | |
2767 | wxEVT_ACTIVATE_APP = _core.wxEVT_ACTIVATE_APP | |
2768 | wxEVT_POWER = _core.wxEVT_POWER | |
2769 | wxEVT_ACTIVATE = _core.wxEVT_ACTIVATE | |
2770 | wxEVT_CREATE = _core.wxEVT_CREATE | |
2771 | wxEVT_DESTROY = _core.wxEVT_DESTROY | |
2772 | wxEVT_SHOW = _core.wxEVT_SHOW | |
2773 | wxEVT_ICONIZE = _core.wxEVT_ICONIZE | |
2774 | wxEVT_MAXIMIZE = _core.wxEVT_MAXIMIZE | |
2775 | wxEVT_MOUSE_CAPTURE_CHANGED = _core.wxEVT_MOUSE_CAPTURE_CHANGED | |
2776 | wxEVT_PAINT = _core.wxEVT_PAINT | |
2777 | wxEVT_ERASE_BACKGROUND = _core.wxEVT_ERASE_BACKGROUND | |
2778 | wxEVT_NC_PAINT = _core.wxEVT_NC_PAINT | |
2779 | wxEVT_PAINT_ICON = _core.wxEVT_PAINT_ICON | |
2780 | wxEVT_MENU_OPEN = _core.wxEVT_MENU_OPEN | |
2781 | wxEVT_MENU_CLOSE = _core.wxEVT_MENU_CLOSE | |
2782 | wxEVT_MENU_HIGHLIGHT = _core.wxEVT_MENU_HIGHLIGHT | |
2783 | wxEVT_CONTEXT_MENU = _core.wxEVT_CONTEXT_MENU | |
2784 | wxEVT_SYS_COLOUR_CHANGED = _core.wxEVT_SYS_COLOUR_CHANGED | |
2785 | wxEVT_DISPLAY_CHANGED = _core.wxEVT_DISPLAY_CHANGED | |
2786 | wxEVT_SETTING_CHANGED = _core.wxEVT_SETTING_CHANGED | |
2787 | wxEVT_QUERY_NEW_PALETTE = _core.wxEVT_QUERY_NEW_PALETTE | |
2788 | wxEVT_PALETTE_CHANGED = _core.wxEVT_PALETTE_CHANGED | |
2789 | wxEVT_DROP_FILES = _core.wxEVT_DROP_FILES | |
2790 | wxEVT_DRAW_ITEM = _core.wxEVT_DRAW_ITEM | |
2791 | wxEVT_MEASURE_ITEM = _core.wxEVT_MEASURE_ITEM | |
2792 | wxEVT_COMPARE_ITEM = _core.wxEVT_COMPARE_ITEM | |
2793 | wxEVT_INIT_DIALOG = _core.wxEVT_INIT_DIALOG | |
2794 | wxEVT_IDLE = _core.wxEVT_IDLE | |
2795 | wxEVT_UPDATE_UI = _core.wxEVT_UPDATE_UI | |
2796 | wxEVT_SIZING = _core.wxEVT_SIZING | |
2797 | wxEVT_MOVING = _core.wxEVT_MOVING | |
2798 | wxEVT_COMMAND_LEFT_CLICK = _core.wxEVT_COMMAND_LEFT_CLICK | |
2799 | wxEVT_COMMAND_LEFT_DCLICK = _core.wxEVT_COMMAND_LEFT_DCLICK | |
2800 | wxEVT_COMMAND_RIGHT_CLICK = _core.wxEVT_COMMAND_RIGHT_CLICK | |
2801 | wxEVT_COMMAND_RIGHT_DCLICK = _core.wxEVT_COMMAND_RIGHT_DCLICK | |
2802 | wxEVT_COMMAND_SET_FOCUS = _core.wxEVT_COMMAND_SET_FOCUS | |
2803 | wxEVT_COMMAND_KILL_FOCUS = _core.wxEVT_COMMAND_KILL_FOCUS | |
2804 | wxEVT_COMMAND_ENTER = _core.wxEVT_COMMAND_ENTER | |
2805 | # | |
2806 | # Create some event binders | |
2807 | EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE ) | |
2808 | EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING ) | |
2809 | EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE ) | |
2810 | EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING ) | |
2811 | EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW ) | |
2812 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
2813 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
2814 | EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT ) | |
2815 | EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT ) | |
2816 | EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND ) | |
2817 | EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR ) | |
2818 | EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN ) | |
2819 | EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP ) | |
2820 | EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) | |
2821 | EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK ) | |
2822 | EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN ) | |
2823 | EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE ) | |
2824 | EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1) | |
2825 | EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT ) | |
2826 | EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS ) | |
2827 | EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS ) | |
2828 | EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS ) | |
2829 | EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE ) | |
2830 | EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP ) | |
2831 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
2832 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
2833 | EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES ) | |
2834 | EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG ) | |
2835 | EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED ) | |
2836 | EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED ) | |
2837 | EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW ) | |
2838 | EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE ) | |
2839 | EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE ) | |
2840 | EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY ) | |
2841 | EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED ) | |
2842 | EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE ) | |
2843 | EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE ) | |
2844 | EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY ) | |
2845 | EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR ) | |
2846 | EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED ) | |
2847 | ||
2848 | EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN ) | |
2849 | EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP ) | |
2850 | EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN ) | |
2851 | EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP ) | |
2852 | EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN ) | |
2853 | EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP ) | |
2854 | EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION ) | |
2855 | EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK ) | |
2856 | EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK ) | |
2857 | EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK ) | |
2858 | EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW ) | |
2859 | EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW ) | |
2860 | EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL ) | |
2861 | ||
2862 | EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN, | |
2863 | wxEVT_LEFT_UP, | |
2864 | wxEVT_MIDDLE_DOWN, | |
2865 | wxEVT_MIDDLE_UP, | |
2866 | wxEVT_RIGHT_DOWN, | |
2867 | wxEVT_RIGHT_UP, | |
2868 | wxEVT_MOTION, | |
2869 | wxEVT_LEFT_DCLICK, | |
2870 | wxEVT_MIDDLE_DCLICK, | |
2871 | wxEVT_RIGHT_DCLICK, | |
2872 | wxEVT_ENTER_WINDOW, | |
2873 | wxEVT_LEAVE_WINDOW, | |
2874 | wxEVT_MOUSEWHEEL | |
2875 | ]) | |
2876 | ||
2877 | ||
2878 | # Scrolling from wxWindow (sent to wxScrolledWindow) | |
2879 | EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, | |
2880 | wxEVT_SCROLLWIN_BOTTOM, | |
2881 | wxEVT_SCROLLWIN_LINEUP, | |
2882 | wxEVT_SCROLLWIN_LINEDOWN, | |
2883 | wxEVT_SCROLLWIN_PAGEUP, | |
2884 | wxEVT_SCROLLWIN_PAGEDOWN, | |
2885 | wxEVT_SCROLLWIN_THUMBTRACK, | |
2886 | wxEVT_SCROLLWIN_THUMBRELEASE, | |
2887 | ]) | |
2888 | ||
2889 | EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP ) | |
2890 | EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM ) | |
2891 | EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP ) | |
2892 | EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN ) | |
2893 | EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP ) | |
2894 | EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN ) | |
2895 | EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK ) | |
2896 | EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE ) | |
2897 | ||
2898 | # Scrolling from wxSlider and wxScrollBar | |
2899 | EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
2900 | wxEVT_SCROLL_BOTTOM, | |
2901 | wxEVT_SCROLL_LINEUP, | |
2902 | wxEVT_SCROLL_LINEDOWN, | |
2903 | wxEVT_SCROLL_PAGEUP, | |
2904 | wxEVT_SCROLL_PAGEDOWN, | |
2905 | wxEVT_SCROLL_THUMBTRACK, | |
2906 | wxEVT_SCROLL_THUMBRELEASE, | |
2907 | wxEVT_SCROLL_ENDSCROLL, | |
2908 | ]) | |
2909 | ||
2910 | EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP ) | |
2911 | EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM ) | |
2912 | EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP ) | |
2913 | EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN ) | |
2914 | EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP ) | |
2915 | EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN ) | |
2916 | EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK ) | |
2917 | EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE ) | |
2918 | EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL ) | |
2919 | ||
2920 | # Scrolling from wxSlider and wxScrollBar, with an id | |
2921 | EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
2922 | wxEVT_SCROLL_BOTTOM, | |
2923 | wxEVT_SCROLL_LINEUP, | |
2924 | wxEVT_SCROLL_LINEDOWN, | |
2925 | wxEVT_SCROLL_PAGEUP, | |
2926 | wxEVT_SCROLL_PAGEDOWN, | |
2927 | wxEVT_SCROLL_THUMBTRACK, | |
2928 | wxEVT_SCROLL_THUMBRELEASE, | |
2929 | wxEVT_SCROLL_ENDSCROLL, | |
2930 | ], 1) | |
2931 | ||
2932 | EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1) | |
2933 | EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1) | |
2934 | EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1) | |
2935 | EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1) | |
2936 | EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1) | |
2937 | EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1) | |
2938 | EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) | |
2939 | EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1) | |
2940 | EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1) | |
2941 | ||
d14a1e28 RD |
2942 | EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1) |
2943 | EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1) | |
2944 | EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1) | |
2945 | EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1) | |
2946 | EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1) | |
2947 | EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1) | |
2948 | EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2) | |
2949 | EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1) | |
2950 | EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1) | |
2951 | EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1) | |
2952 | ||
2953 | EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1) | |
2954 | EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1) | |
2955 | EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1) | |
2956 | EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1) | |
2957 | EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2) | |
2958 | EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1) | |
2959 | EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2) | |
2960 | EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1) | |
2961 | EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1) | |
2962 | ||
2963 | ||
2964 | EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1) | |
2965 | EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1) | |
2966 | EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1) | |
2967 | EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1) | |
2968 | EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1) | |
2969 | EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1) | |
2970 | EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1) | |
2971 | ||
2972 | EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE ) | |
2973 | ||
2974 | EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1) | |
2975 | EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2) | |
2976 | ||
2977 | EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) | |
2978 | ||
2979 | ||
2980 | ||
2981 | #--------------------------------------------------------------------------- | |
2982 | ||
2983 | class Event(Object): | |
e811c8ce RD |
2984 | def __init__(self): raise RuntimeError, "No constructor defined" |
2985 | def __repr__(self): | |
2986 | return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2987 | def __del__(self, destroy=_core.delete_Event): |
e811c8ce | 2988 | """__del__()""" |
d14a1e28 RD |
2989 | try: |
2990 | if self.thisown: destroy(self) | |
2991 | except: pass | |
e811c8ce RD |
2992 | |
2993 | def SetEventType(*args, **kwargs): | |
2994 | """SetEventType(wxEventType typ)""" | |
2995 | return _core.Event_SetEventType(*args, **kwargs) | |
2996 | ||
2997 | def GetEventType(*args, **kwargs): | |
2998 | """GetEventType() -> wxEventType""" | |
2999 | return _core.Event_GetEventType(*args, **kwargs) | |
3000 | ||
3001 | def GetEventObject(*args, **kwargs): | |
3002 | """GetEventObject() -> Object""" | |
3003 | return _core.Event_GetEventObject(*args, **kwargs) | |
3004 | ||
3005 | def SetEventObject(*args, **kwargs): | |
3006 | """SetEventObject(Object obj)""" | |
3007 | return _core.Event_SetEventObject(*args, **kwargs) | |
3008 | ||
3009 | def GetTimestamp(*args, **kwargs): | |
3010 | """GetTimestamp() -> long""" | |
3011 | return _core.Event_GetTimestamp(*args, **kwargs) | |
3012 | ||
3013 | def SetTimestamp(*args, **kwargs): | |
3014 | """SetTimestamp(long ts=0)""" | |
3015 | return _core.Event_SetTimestamp(*args, **kwargs) | |
3016 | ||
3017 | def GetId(*args, **kwargs): | |
3018 | """GetId() -> int""" | |
3019 | return _core.Event_GetId(*args, **kwargs) | |
3020 | ||
3021 | def SetId(*args, **kwargs): | |
3022 | """SetId(int Id)""" | |
3023 | return _core.Event_SetId(*args, **kwargs) | |
3024 | ||
3025 | def IsCommandEvent(*args, **kwargs): | |
3026 | """IsCommandEvent() -> bool""" | |
3027 | return _core.Event_IsCommandEvent(*args, **kwargs) | |
3028 | ||
3029 | def Skip(*args, **kwargs): | |
3030 | """Skip(bool skip=True)""" | |
3031 | return _core.Event_Skip(*args, **kwargs) | |
3032 | ||
3033 | def GetSkipped(*args, **kwargs): | |
3034 | """GetSkipped() -> bool""" | |
3035 | return _core.Event_GetSkipped(*args, **kwargs) | |
3036 | ||
3037 | def ShouldPropagate(*args, **kwargs): | |
3038 | """ShouldPropagate() -> bool""" | |
3039 | return _core.Event_ShouldPropagate(*args, **kwargs) | |
3040 | ||
3041 | def StopPropagation(*args, **kwargs): | |
3042 | """StopPropagation() -> int""" | |
3043 | return _core.Event_StopPropagation(*args, **kwargs) | |
3044 | ||
3045 | def ResumePropagation(*args, **kwargs): | |
3046 | """ResumePropagation(int propagationLevel)""" | |
3047 | return _core.Event_ResumePropagation(*args, **kwargs) | |
3048 | ||
3049 | def Clone(*args, **kwargs): | |
3050 | """Clone() -> Event""" | |
3051 | return _core.Event_Clone(*args, **kwargs) | |
3052 | ||
d14a1e28 RD |
3053 | |
3054 | class EventPtr(Event): | |
3055 | def __init__(self, this): | |
3056 | self.this = this | |
3057 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3058 | self.__class__ = Event | |
3059 | _core.Event_swigregister(EventPtr) | |
3060 | ||
3061 | #--------------------------------------------------------------------------- | |
3062 | ||
3063 | class PropagationDisabler(object): | |
e811c8ce RD |
3064 | def __repr__(self): |
3065 | return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3066 | def __init__(self, *args, **kwargs): |
e811c8ce | 3067 | """__init__(Event event) -> PropagationDisabler""" |
d14a1e28 RD |
3068 | newobj = _core.new_PropagationDisabler(*args, **kwargs) |
3069 | self.this = newobj.this | |
3070 | self.thisown = 1 | |
3071 | del newobj.thisown | |
3072 | def __del__(self, destroy=_core.delete_PropagationDisabler): | |
e811c8ce | 3073 | """__del__()""" |
d14a1e28 RD |
3074 | try: |
3075 | if self.thisown: destroy(self) | |
3076 | except: pass | |
e811c8ce | 3077 | |
d14a1e28 RD |
3078 | |
3079 | class PropagationDisablerPtr(PropagationDisabler): | |
3080 | def __init__(self, this): | |
3081 | self.this = this | |
3082 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3083 | self.__class__ = PropagationDisabler | |
3084 | _core.PropagationDisabler_swigregister(PropagationDisablerPtr) | |
3085 | ||
3086 | class PropagateOnce(object): | |
e811c8ce RD |
3087 | def __repr__(self): |
3088 | return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3089 | def __init__(self, *args, **kwargs): |
e811c8ce | 3090 | """__init__(Event event) -> PropagateOnce""" |
d14a1e28 RD |
3091 | newobj = _core.new_PropagateOnce(*args, **kwargs) |
3092 | self.this = newobj.this | |
3093 | self.thisown = 1 | |
3094 | del newobj.thisown | |
3095 | def __del__(self, destroy=_core.delete_PropagateOnce): | |
e811c8ce | 3096 | """__del__()""" |
d14a1e28 RD |
3097 | try: |
3098 | if self.thisown: destroy(self) | |
3099 | except: pass | |
e811c8ce | 3100 | |
d14a1e28 RD |
3101 | |
3102 | class PropagateOncePtr(PropagateOnce): | |
3103 | def __init__(self, this): | |
3104 | self.this = this | |
3105 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3106 | self.__class__ = PropagateOnce | |
3107 | _core.PropagateOnce_swigregister(PropagateOncePtr) | |
3108 | ||
3109 | #--------------------------------------------------------------------------- | |
3110 | ||
3111 | class CommandEvent(Event): | |
e811c8ce RD |
3112 | def __repr__(self): |
3113 | return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3114 | def __init__(self, *args, **kwargs): |
e811c8ce | 3115 | """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent""" |
d14a1e28 RD |
3116 | newobj = _core.new_CommandEvent(*args, **kwargs) |
3117 | self.this = newobj.this | |
3118 | self.thisown = 1 | |
3119 | del newobj.thisown | |
e811c8ce RD |
3120 | def GetSelection(*args, **kwargs): |
3121 | """GetSelection() -> int""" | |
3122 | return _core.CommandEvent_GetSelection(*args, **kwargs) | |
3123 | ||
3124 | def SetString(*args, **kwargs): | |
196addbf | 3125 | """SetString(String s)""" |
e811c8ce RD |
3126 | return _core.CommandEvent_SetString(*args, **kwargs) |
3127 | ||
3128 | def GetString(*args, **kwargs): | |
196addbf | 3129 | """GetString() -> String""" |
e811c8ce RD |
3130 | return _core.CommandEvent_GetString(*args, **kwargs) |
3131 | ||
3132 | def IsChecked(*args, **kwargs): | |
3133 | """IsChecked() -> bool""" | |
3134 | return _core.CommandEvent_IsChecked(*args, **kwargs) | |
3135 | ||
242b7b46 | 3136 | Checked = IsChecked |
e811c8ce RD |
3137 | def IsSelection(*args, **kwargs): |
3138 | """IsSelection() -> bool""" | |
3139 | return _core.CommandEvent_IsSelection(*args, **kwargs) | |
3140 | ||
3141 | def SetExtraLong(*args, **kwargs): | |
3142 | """SetExtraLong(long extraLong)""" | |
3143 | return _core.CommandEvent_SetExtraLong(*args, **kwargs) | |
3144 | ||
3145 | def GetExtraLong(*args, **kwargs): | |
3146 | """GetExtraLong() -> long""" | |
3147 | return _core.CommandEvent_GetExtraLong(*args, **kwargs) | |
3148 | ||
3149 | def SetInt(*args, **kwargs): | |
3150 | """SetInt(int i)""" | |
3151 | return _core.CommandEvent_SetInt(*args, **kwargs) | |
3152 | ||
3153 | def GetInt(*args, **kwargs): | |
3154 | """GetInt() -> long""" | |
3155 | return _core.CommandEvent_GetInt(*args, **kwargs) | |
3156 | ||
3157 | def Clone(*args, **kwargs): | |
3158 | """Clone() -> Event""" | |
3159 | return _core.CommandEvent_Clone(*args, **kwargs) | |
3160 | ||
d14a1e28 RD |
3161 | |
3162 | class CommandEventPtr(CommandEvent): | |
3163 | def __init__(self, this): | |
3164 | self.this = this | |
3165 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3166 | self.__class__ = CommandEvent | |
3167 | _core.CommandEvent_swigregister(CommandEventPtr) | |
3168 | ||
3169 | #--------------------------------------------------------------------------- | |
3170 | ||
3171 | class NotifyEvent(CommandEvent): | |
e811c8ce RD |
3172 | def __repr__(self): |
3173 | return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3174 | def __init__(self, *args, **kwargs): |
e811c8ce | 3175 | """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent""" |
d14a1e28 RD |
3176 | newobj = _core.new_NotifyEvent(*args, **kwargs) |
3177 | self.this = newobj.this | |
3178 | self.thisown = 1 | |
3179 | del newobj.thisown | |
e811c8ce RD |
3180 | def Veto(*args, **kwargs): |
3181 | """Veto()""" | |
3182 | return _core.NotifyEvent_Veto(*args, **kwargs) | |
3183 | ||
3184 | def Allow(*args, **kwargs): | |
3185 | """Allow()""" | |
3186 | return _core.NotifyEvent_Allow(*args, **kwargs) | |
3187 | ||
3188 | def IsAllowed(*args, **kwargs): | |
3189 | """IsAllowed() -> bool""" | |
3190 | return _core.NotifyEvent_IsAllowed(*args, **kwargs) | |
3191 | ||
d14a1e28 RD |
3192 | |
3193 | class NotifyEventPtr(NotifyEvent): | |
3194 | def __init__(self, this): | |
3195 | self.this = this | |
3196 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3197 | self.__class__ = NotifyEvent | |
3198 | _core.NotifyEvent_swigregister(NotifyEventPtr) | |
3199 | ||
3200 | #--------------------------------------------------------------------------- | |
3201 | ||
3202 | class ScrollEvent(CommandEvent): | |
e811c8ce RD |
3203 | def __repr__(self): |
3204 | return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3205 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
3206 | """ |
3207 | __init__(wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0, | |
3208 | int orient=0) -> ScrollEvent | |
3209 | """ | |
d14a1e28 RD |
3210 | newobj = _core.new_ScrollEvent(*args, **kwargs) |
3211 | self.this = newobj.this | |
3212 | self.thisown = 1 | |
3213 | del newobj.thisown | |
e811c8ce RD |
3214 | def GetOrientation(*args, **kwargs): |
3215 | """GetOrientation() -> int""" | |
3216 | return _core.ScrollEvent_GetOrientation(*args, **kwargs) | |
3217 | ||
3218 | def GetPosition(*args, **kwargs): | |
3219 | """GetPosition() -> int""" | |
3220 | return _core.ScrollEvent_GetPosition(*args, **kwargs) | |
3221 | ||
3222 | def SetOrientation(*args, **kwargs): | |
3223 | """SetOrientation(int orient)""" | |
3224 | return _core.ScrollEvent_SetOrientation(*args, **kwargs) | |
3225 | ||
3226 | def SetPosition(*args, **kwargs): | |
3227 | """SetPosition(int pos)""" | |
3228 | return _core.ScrollEvent_SetPosition(*args, **kwargs) | |
3229 | ||
d14a1e28 RD |
3230 | |
3231 | class ScrollEventPtr(ScrollEvent): | |
3232 | def __init__(self, this): | |
3233 | self.this = this | |
3234 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3235 | self.__class__ = ScrollEvent | |
3236 | _core.ScrollEvent_swigregister(ScrollEventPtr) | |
3237 | ||
3238 | #--------------------------------------------------------------------------- | |
3239 | ||
3240 | class ScrollWinEvent(Event): | |
e811c8ce RD |
3241 | def __repr__(self): |
3242 | return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3243 | def __init__(self, *args, **kwargs): |
e811c8ce | 3244 | """__init__(wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent""" |
d14a1e28 RD |
3245 | newobj = _core.new_ScrollWinEvent(*args, **kwargs) |
3246 | self.this = newobj.this | |
3247 | self.thisown = 1 | |
3248 | del newobj.thisown | |
e811c8ce RD |
3249 | def GetOrientation(*args, **kwargs): |
3250 | """GetOrientation() -> int""" | |
3251 | return _core.ScrollWinEvent_GetOrientation(*args, **kwargs) | |
3252 | ||
3253 | def GetPosition(*args, **kwargs): | |
3254 | """GetPosition() -> int""" | |
3255 | return _core.ScrollWinEvent_GetPosition(*args, **kwargs) | |
3256 | ||
3257 | def SetOrientation(*args, **kwargs): | |
3258 | """SetOrientation(int orient)""" | |
3259 | return _core.ScrollWinEvent_SetOrientation(*args, **kwargs) | |
3260 | ||
3261 | def SetPosition(*args, **kwargs): | |
3262 | """SetPosition(int pos)""" | |
3263 | return _core.ScrollWinEvent_SetPosition(*args, **kwargs) | |
3264 | ||
d14a1e28 RD |
3265 | |
3266 | class ScrollWinEventPtr(ScrollWinEvent): | |
3267 | def __init__(self, this): | |
3268 | self.this = this | |
3269 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3270 | self.__class__ = ScrollWinEvent | |
3271 | _core.ScrollWinEvent_swigregister(ScrollWinEventPtr) | |
3272 | ||
3273 | #--------------------------------------------------------------------------- | |
3274 | ||
3275 | MOUSE_BTN_ANY = _core.MOUSE_BTN_ANY | |
3276 | MOUSE_BTN_NONE = _core.MOUSE_BTN_NONE | |
3277 | MOUSE_BTN_LEFT = _core.MOUSE_BTN_LEFT | |
3278 | MOUSE_BTN_MIDDLE = _core.MOUSE_BTN_MIDDLE | |
3279 | MOUSE_BTN_RIGHT = _core.MOUSE_BTN_RIGHT | |
3280 | class MouseEvent(Event): | |
e811c8ce RD |
3281 | def __repr__(self): |
3282 | return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3283 | def __init__(self, *args, **kwargs): |
e811c8ce | 3284 | """__init__(wxEventType mouseType=wxEVT_NULL) -> MouseEvent""" |
d14a1e28 RD |
3285 | newobj = _core.new_MouseEvent(*args, **kwargs) |
3286 | self.this = newobj.this | |
3287 | self.thisown = 1 | |
3288 | del newobj.thisown | |
e811c8ce RD |
3289 | def IsButton(*args, **kwargs): |
3290 | """IsButton() -> bool""" | |
3291 | return _core.MouseEvent_IsButton(*args, **kwargs) | |
3292 | ||
3293 | def ButtonDown(*args, **kwargs): | |
3294 | """ButtonDown(int but=MOUSE_BTN_ANY) -> bool""" | |
3295 | return _core.MouseEvent_ButtonDown(*args, **kwargs) | |
3296 | ||
3297 | def ButtonDClick(*args, **kwargs): | |
3298 | """ButtonDClick(int but=MOUSE_BTN_ANY) -> bool""" | |
3299 | return _core.MouseEvent_ButtonDClick(*args, **kwargs) | |
3300 | ||
3301 | def ButtonUp(*args, **kwargs): | |
3302 | """ButtonUp(int but=MOUSE_BTN_ANY) -> bool""" | |
3303 | return _core.MouseEvent_ButtonUp(*args, **kwargs) | |
3304 | ||
3305 | def Button(*args, **kwargs): | |
3306 | """Button(int but) -> bool""" | |
3307 | return _core.MouseEvent_Button(*args, **kwargs) | |
3308 | ||
3309 | def ButtonIsDown(*args, **kwargs): | |
3310 | """ButtonIsDown(int but) -> bool""" | |
3311 | return _core.MouseEvent_ButtonIsDown(*args, **kwargs) | |
3312 | ||
3313 | def GetButton(*args, **kwargs): | |
3314 | """GetButton() -> int""" | |
3315 | return _core.MouseEvent_GetButton(*args, **kwargs) | |
3316 | ||
3317 | def ControlDown(*args, **kwargs): | |
3318 | """ControlDown() -> bool""" | |
3319 | return _core.MouseEvent_ControlDown(*args, **kwargs) | |
3320 | ||
3321 | def MetaDown(*args, **kwargs): | |
3322 | """MetaDown() -> bool""" | |
3323 | return _core.MouseEvent_MetaDown(*args, **kwargs) | |
3324 | ||
3325 | def AltDown(*args, **kwargs): | |
3326 | """AltDown() -> bool""" | |
3327 | return _core.MouseEvent_AltDown(*args, **kwargs) | |
3328 | ||
3329 | def ShiftDown(*args, **kwargs): | |
3330 | """ShiftDown() -> bool""" | |
3331 | return _core.MouseEvent_ShiftDown(*args, **kwargs) | |
3332 | ||
3333 | def LeftDown(*args, **kwargs): | |
3334 | """LeftDown() -> bool""" | |
3335 | return _core.MouseEvent_LeftDown(*args, **kwargs) | |
3336 | ||
3337 | def MiddleDown(*args, **kwargs): | |
3338 | """MiddleDown() -> bool""" | |
3339 | return _core.MouseEvent_MiddleDown(*args, **kwargs) | |
3340 | ||
3341 | def RightDown(*args, **kwargs): | |
3342 | """RightDown() -> bool""" | |
3343 | return _core.MouseEvent_RightDown(*args, **kwargs) | |
3344 | ||
3345 | def LeftUp(*args, **kwargs): | |
3346 | """LeftUp() -> bool""" | |
3347 | return _core.MouseEvent_LeftUp(*args, **kwargs) | |
3348 | ||
3349 | def MiddleUp(*args, **kwargs): | |
3350 | """MiddleUp() -> bool""" | |
3351 | return _core.MouseEvent_MiddleUp(*args, **kwargs) | |
3352 | ||
3353 | def RightUp(*args, **kwargs): | |
3354 | """RightUp() -> bool""" | |
3355 | return _core.MouseEvent_RightUp(*args, **kwargs) | |
3356 | ||
3357 | def LeftDClick(*args, **kwargs): | |
3358 | """LeftDClick() -> bool""" | |
3359 | return _core.MouseEvent_LeftDClick(*args, **kwargs) | |
3360 | ||
3361 | def MiddleDClick(*args, **kwargs): | |
3362 | """MiddleDClick() -> bool""" | |
3363 | return _core.MouseEvent_MiddleDClick(*args, **kwargs) | |
3364 | ||
3365 | def RightDClick(*args, **kwargs): | |
3366 | """RightDClick() -> bool""" | |
3367 | return _core.MouseEvent_RightDClick(*args, **kwargs) | |
3368 | ||
3369 | def LeftIsDown(*args, **kwargs): | |
3370 | """LeftIsDown() -> bool""" | |
3371 | return _core.MouseEvent_LeftIsDown(*args, **kwargs) | |
3372 | ||
3373 | def MiddleIsDown(*args, **kwargs): | |
3374 | """MiddleIsDown() -> bool""" | |
3375 | return _core.MouseEvent_MiddleIsDown(*args, **kwargs) | |
3376 | ||
3377 | def RightIsDown(*args, **kwargs): | |
3378 | """RightIsDown() -> bool""" | |
3379 | return _core.MouseEvent_RightIsDown(*args, **kwargs) | |
3380 | ||
3381 | def Dragging(*args, **kwargs): | |
3382 | """Dragging() -> bool""" | |
3383 | return _core.MouseEvent_Dragging(*args, **kwargs) | |
3384 | ||
3385 | def Moving(*args, **kwargs): | |
3386 | """Moving() -> bool""" | |
3387 | return _core.MouseEvent_Moving(*args, **kwargs) | |
3388 | ||
3389 | def Entering(*args, **kwargs): | |
3390 | """Entering() -> bool""" | |
3391 | return _core.MouseEvent_Entering(*args, **kwargs) | |
3392 | ||
3393 | def Leaving(*args, **kwargs): | |
3394 | """Leaving() -> bool""" | |
3395 | return _core.MouseEvent_Leaving(*args, **kwargs) | |
3396 | ||
3397 | def GetPosition(*args, **kwargs): | |
0df68c9f RD |
3398 | """ |
3399 | GetPosition() -> Point | |
e811c8ce | 3400 | |
0df68c9f RD |
3401 | Returns the position of the mouse in window coordinates when the event happened. |
3402 | """ | |
e811c8ce RD |
3403 | return _core.MouseEvent_GetPosition(*args, **kwargs) |
3404 | ||
3405 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3406 | """ |
3407 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3408 | |
0df68c9f RD |
3409 | Returns the position of the mouse in window coordinates when the event happened. |
3410 | """ | |
e811c8ce RD |
3411 | return _core.MouseEvent_GetPositionTuple(*args, **kwargs) |
3412 | ||
3413 | def GetLogicalPosition(*args, **kwargs): | |
196addbf | 3414 | """GetLogicalPosition(DC dc) -> Point""" |
e811c8ce RD |
3415 | return _core.MouseEvent_GetLogicalPosition(*args, **kwargs) |
3416 | ||
3417 | def GetX(*args, **kwargs): | |
3418 | """GetX() -> int""" | |
3419 | return _core.MouseEvent_GetX(*args, **kwargs) | |
3420 | ||
3421 | def GetY(*args, **kwargs): | |
3422 | """GetY() -> int""" | |
3423 | return _core.MouseEvent_GetY(*args, **kwargs) | |
3424 | ||
3425 | def GetWheelRotation(*args, **kwargs): | |
3426 | """GetWheelRotation() -> int""" | |
3427 | return _core.MouseEvent_GetWheelRotation(*args, **kwargs) | |
3428 | ||
3429 | def GetWheelDelta(*args, **kwargs): | |
3430 | """GetWheelDelta() -> int""" | |
3431 | return _core.MouseEvent_GetWheelDelta(*args, **kwargs) | |
3432 | ||
3433 | def GetLinesPerAction(*args, **kwargs): | |
3434 | """GetLinesPerAction() -> int""" | |
3435 | return _core.MouseEvent_GetLinesPerAction(*args, **kwargs) | |
3436 | ||
3437 | def IsPageScroll(*args, **kwargs): | |
3438 | """IsPageScroll() -> bool""" | |
3439 | return _core.MouseEvent_IsPageScroll(*args, **kwargs) | |
3440 | ||
d14a1e28 RD |
3441 | m_x = property(_core.MouseEvent_m_x_get, _core.MouseEvent_m_x_set) |
3442 | m_y = property(_core.MouseEvent_m_y_get, _core.MouseEvent_m_y_set) | |
3443 | m_leftDown = property(_core.MouseEvent_m_leftDown_get, _core.MouseEvent_m_leftDown_set) | |
3444 | m_middleDown = property(_core.MouseEvent_m_middleDown_get, _core.MouseEvent_m_middleDown_set) | |
3445 | m_rightDown = property(_core.MouseEvent_m_rightDown_get, _core.MouseEvent_m_rightDown_set) | |
3446 | m_controlDown = property(_core.MouseEvent_m_controlDown_get, _core.MouseEvent_m_controlDown_set) | |
3447 | m_shiftDown = property(_core.MouseEvent_m_shiftDown_get, _core.MouseEvent_m_shiftDown_set) | |
3448 | m_altDown = property(_core.MouseEvent_m_altDown_get, _core.MouseEvent_m_altDown_set) | |
3449 | m_metaDown = property(_core.MouseEvent_m_metaDown_get, _core.MouseEvent_m_metaDown_set) | |
3450 | m_wheelRotation = property(_core.MouseEvent_m_wheelRotation_get, _core.MouseEvent_m_wheelRotation_set) | |
3451 | m_wheelDelta = property(_core.MouseEvent_m_wheelDelta_get, _core.MouseEvent_m_wheelDelta_set) | |
3452 | m_linesPerAction = property(_core.MouseEvent_m_linesPerAction_get, _core.MouseEvent_m_linesPerAction_set) | |
d14a1e28 RD |
3453 | |
3454 | class MouseEventPtr(MouseEvent): | |
3455 | def __init__(self, this): | |
3456 | self.this = this | |
3457 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3458 | self.__class__ = MouseEvent | |
3459 | _core.MouseEvent_swigregister(MouseEventPtr) | |
3460 | ||
3461 | #--------------------------------------------------------------------------- | |
3462 | ||
3463 | class SetCursorEvent(Event): | |
e811c8ce RD |
3464 | def __repr__(self): |
3465 | return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3466 | def __init__(self, *args, **kwargs): |
e811c8ce | 3467 | """__init__(int x=0, int y=0) -> SetCursorEvent""" |
d14a1e28 RD |
3468 | newobj = _core.new_SetCursorEvent(*args, **kwargs) |
3469 | self.this = newobj.this | |
3470 | self.thisown = 1 | |
3471 | del newobj.thisown | |
e811c8ce RD |
3472 | def GetX(*args, **kwargs): |
3473 | """GetX() -> int""" | |
3474 | return _core.SetCursorEvent_GetX(*args, **kwargs) | |
3475 | ||
3476 | def GetY(*args, **kwargs): | |
3477 | """GetY() -> int""" | |
3478 | return _core.SetCursorEvent_GetY(*args, **kwargs) | |
3479 | ||
3480 | def SetCursor(*args, **kwargs): | |
196addbf | 3481 | """SetCursor(Cursor cursor)""" |
e811c8ce RD |
3482 | return _core.SetCursorEvent_SetCursor(*args, **kwargs) |
3483 | ||
3484 | def GetCursor(*args, **kwargs): | |
196addbf | 3485 | """GetCursor() -> Cursor""" |
e811c8ce RD |
3486 | return _core.SetCursorEvent_GetCursor(*args, **kwargs) |
3487 | ||
3488 | def HasCursor(*args, **kwargs): | |
3489 | """HasCursor() -> bool""" | |
3490 | return _core.SetCursorEvent_HasCursor(*args, **kwargs) | |
3491 | ||
d14a1e28 RD |
3492 | |
3493 | class SetCursorEventPtr(SetCursorEvent): | |
3494 | def __init__(self, this): | |
3495 | self.this = this | |
3496 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3497 | self.__class__ = SetCursorEvent | |
3498 | _core.SetCursorEvent_swigregister(SetCursorEventPtr) | |
3499 | ||
3500 | #--------------------------------------------------------------------------- | |
3501 | ||
3502 | class KeyEvent(Event): | |
e811c8ce RD |
3503 | def __repr__(self): |
3504 | return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3505 | def __init__(self, *args, **kwargs): |
e811c8ce | 3506 | """__init__(wxEventType keyType=wxEVT_NULL) -> KeyEvent""" |
d14a1e28 RD |
3507 | newobj = _core.new_KeyEvent(*args, **kwargs) |
3508 | self.this = newobj.this | |
3509 | self.thisown = 1 | |
3510 | del newobj.thisown | |
e811c8ce RD |
3511 | def ControlDown(*args, **kwargs): |
3512 | """ControlDown() -> bool""" | |
3513 | return _core.KeyEvent_ControlDown(*args, **kwargs) | |
3514 | ||
3515 | def MetaDown(*args, **kwargs): | |
3516 | """MetaDown() -> bool""" | |
3517 | return _core.KeyEvent_MetaDown(*args, **kwargs) | |
3518 | ||
3519 | def AltDown(*args, **kwargs): | |
3520 | """AltDown() -> bool""" | |
3521 | return _core.KeyEvent_AltDown(*args, **kwargs) | |
3522 | ||
3523 | def ShiftDown(*args, **kwargs): | |
3524 | """ShiftDown() -> bool""" | |
3525 | return _core.KeyEvent_ShiftDown(*args, **kwargs) | |
3526 | ||
3527 | def HasModifiers(*args, **kwargs): | |
3528 | """HasModifiers() -> bool""" | |
3529 | return _core.KeyEvent_HasModifiers(*args, **kwargs) | |
3530 | ||
3531 | def GetKeyCode(*args, **kwargs): | |
3532 | """GetKeyCode() -> int""" | |
3533 | return _core.KeyEvent_GetKeyCode(*args, **kwargs) | |
3534 | ||
d14a1e28 | 3535 | KeyCode = GetKeyCode |
e811c8ce RD |
3536 | def GetUniChar(*args, **kwargs): |
3537 | """GetUniChar() -> int""" | |
3538 | return _core.KeyEvent_GetUniChar(*args, **kwargs) | |
3539 | ||
3540 | def GetRawKeyCode(*args, **kwargs): | |
3541 | """GetRawKeyCode() -> unsigned int""" | |
3542 | return _core.KeyEvent_GetRawKeyCode(*args, **kwargs) | |
3543 | ||
3544 | def GetRawKeyFlags(*args, **kwargs): | |
3545 | """GetRawKeyFlags() -> unsigned int""" | |
3546 | return _core.KeyEvent_GetRawKeyFlags(*args, **kwargs) | |
3547 | ||
3548 | def GetPosition(*args, **kwargs): | |
0df68c9f RD |
3549 | """ |
3550 | GetPosition() -> Point | |
e811c8ce | 3551 | |
0df68c9f RD |
3552 | Find the position of the event. |
3553 | """ | |
e811c8ce RD |
3554 | return _core.KeyEvent_GetPosition(*args, **kwargs) |
3555 | ||
3556 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3557 | """ |
3558 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3559 | |
0df68c9f RD |
3560 | Find the position of the event. |
3561 | """ | |
e811c8ce RD |
3562 | return _core.KeyEvent_GetPositionTuple(*args, **kwargs) |
3563 | ||
3564 | def GetX(*args, **kwargs): | |
3565 | """GetX() -> int""" | |
3566 | return _core.KeyEvent_GetX(*args, **kwargs) | |
3567 | ||
3568 | def GetY(*args, **kwargs): | |
3569 | """GetY() -> int""" | |
3570 | return _core.KeyEvent_GetY(*args, **kwargs) | |
3571 | ||
d14a1e28 RD |
3572 | m_x = property(_core.KeyEvent_m_x_get, _core.KeyEvent_m_x_set) |
3573 | m_y = property(_core.KeyEvent_m_y_get, _core.KeyEvent_m_y_set) | |
3574 | m_keyCode = property(_core.KeyEvent_m_keyCode_get, _core.KeyEvent_m_keyCode_set) | |
3575 | m_controlDown = property(_core.KeyEvent_m_controlDown_get, _core.KeyEvent_m_controlDown_set) | |
3576 | m_shiftDown = property(_core.KeyEvent_m_shiftDown_get, _core.KeyEvent_m_shiftDown_set) | |
3577 | m_altDown = property(_core.KeyEvent_m_altDown_get, _core.KeyEvent_m_altDown_set) | |
3578 | m_metaDown = property(_core.KeyEvent_m_metaDown_get, _core.KeyEvent_m_metaDown_set) | |
3579 | m_scanCode = property(_core.KeyEvent_m_scanCode_get, _core.KeyEvent_m_scanCode_set) | |
3580 | m_rawCode = property(_core.KeyEvent_m_rawCode_get, _core.KeyEvent_m_rawCode_set) | |
3581 | m_rawFlags = property(_core.KeyEvent_m_rawFlags_get, _core.KeyEvent_m_rawFlags_set) | |
d14a1e28 RD |
3582 | |
3583 | class KeyEventPtr(KeyEvent): | |
3584 | def __init__(self, this): | |
3585 | self.this = this | |
3586 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3587 | self.__class__ = KeyEvent | |
3588 | _core.KeyEvent_swigregister(KeyEventPtr) | |
3589 | ||
3590 | #--------------------------------------------------------------------------- | |
3591 | ||
3592 | class SizeEvent(Event): | |
e811c8ce RD |
3593 | def __repr__(self): |
3594 | return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3595 | def __init__(self, *args, **kwargs): |
e811c8ce | 3596 | """__init__(Size sz=DefaultSize, int winid=0) -> SizeEvent""" |
d14a1e28 RD |
3597 | newobj = _core.new_SizeEvent(*args, **kwargs) |
3598 | self.this = newobj.this | |
3599 | self.thisown = 1 | |
3600 | del newobj.thisown | |
e811c8ce RD |
3601 | def GetSize(*args, **kwargs): |
3602 | """GetSize() -> Size""" | |
3603 | return _core.SizeEvent_GetSize(*args, **kwargs) | |
3604 | ||
3605 | def GetRect(*args, **kwargs): | |
3606 | """GetRect() -> Rect""" | |
3607 | return _core.SizeEvent_GetRect(*args, **kwargs) | |
3608 | ||
3609 | def SetRect(*args, **kwargs): | |
3610 | """SetRect(Rect rect)""" | |
3611 | return _core.SizeEvent_SetRect(*args, **kwargs) | |
3612 | ||
3613 | def SetSize(*args, **kwargs): | |
3614 | """SetSize(Size size)""" | |
3615 | return _core.SizeEvent_SetSize(*args, **kwargs) | |
3616 | ||
d14a1e28 RD |
3617 | m_size = property(_core.SizeEvent_m_size_get, _core.SizeEvent_m_size_set) |
3618 | m_rect = property(_core.SizeEvent_m_rect_get, _core.SizeEvent_m_rect_set) | |
d14a1e28 RD |
3619 | |
3620 | class SizeEventPtr(SizeEvent): | |
3621 | def __init__(self, this): | |
3622 | self.this = this | |
3623 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3624 | self.__class__ = SizeEvent | |
3625 | _core.SizeEvent_swigregister(SizeEventPtr) | |
3626 | ||
3627 | #--------------------------------------------------------------------------- | |
3628 | ||
3629 | class MoveEvent(Event): | |
e811c8ce RD |
3630 | def __repr__(self): |
3631 | return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3632 | def __init__(self, *args, **kwargs): |
e811c8ce | 3633 | """__init__(Point pos=DefaultPosition, int winid=0) -> MoveEvent""" |
d14a1e28 RD |
3634 | newobj = _core.new_MoveEvent(*args, **kwargs) |
3635 | self.this = newobj.this | |
3636 | self.thisown = 1 | |
3637 | del newobj.thisown | |
e811c8ce RD |
3638 | def GetPosition(*args, **kwargs): |
3639 | """GetPosition() -> Point""" | |
3640 | return _core.MoveEvent_GetPosition(*args, **kwargs) | |
3641 | ||
3642 | def GetRect(*args, **kwargs): | |
3643 | """GetRect() -> Rect""" | |
3644 | return _core.MoveEvent_GetRect(*args, **kwargs) | |
3645 | ||
3646 | def SetRect(*args, **kwargs): | |
3647 | """SetRect(Rect rect)""" | |
3648 | return _core.MoveEvent_SetRect(*args, **kwargs) | |
3649 | ||
3650 | def SetPosition(*args, **kwargs): | |
3651 | """SetPosition(Point pos)""" | |
3652 | return _core.MoveEvent_SetPosition(*args, **kwargs) | |
3653 | ||
d14a1e28 RD |
3654 | m_pos = property(_core.MoveEvent_m_pos_get, _core.MoveEvent_m_pos_set) |
3655 | m_rect = property(_core.MoveEvent_m_rect_get, _core.MoveEvent_m_rect_set) | |
d14a1e28 RD |
3656 | |
3657 | class MoveEventPtr(MoveEvent): | |
3658 | def __init__(self, this): | |
3659 | self.this = this | |
3660 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3661 | self.__class__ = MoveEvent | |
3662 | _core.MoveEvent_swigregister(MoveEventPtr) | |
3663 | ||
3664 | #--------------------------------------------------------------------------- | |
3665 | ||
3666 | class PaintEvent(Event): | |
e811c8ce RD |
3667 | def __repr__(self): |
3668 | return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3669 | def __init__(self, *args, **kwargs): |
e811c8ce | 3670 | """__init__(int Id=0) -> PaintEvent""" |
d14a1e28 RD |
3671 | newobj = _core.new_PaintEvent(*args, **kwargs) |
3672 | self.this = newobj.this | |
3673 | self.thisown = 1 | |
3674 | del newobj.thisown | |
d14a1e28 RD |
3675 | |
3676 | class PaintEventPtr(PaintEvent): | |
3677 | def __init__(self, this): | |
3678 | self.this = this | |
3679 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3680 | self.__class__ = PaintEvent | |
3681 | _core.PaintEvent_swigregister(PaintEventPtr) | |
3682 | ||
3683 | class NcPaintEvent(Event): | |
e811c8ce RD |
3684 | def __repr__(self): |
3685 | return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3686 | def __init__(self, *args, **kwargs): |
e811c8ce | 3687 | """__init__(int winid=0) -> NcPaintEvent""" |
d14a1e28 RD |
3688 | newobj = _core.new_NcPaintEvent(*args, **kwargs) |
3689 | self.this = newobj.this | |
3690 | self.thisown = 1 | |
3691 | del newobj.thisown | |
d14a1e28 RD |
3692 | |
3693 | class NcPaintEventPtr(NcPaintEvent): | |
3694 | def __init__(self, this): | |
3695 | self.this = this | |
3696 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3697 | self.__class__ = NcPaintEvent | |
3698 | _core.NcPaintEvent_swigregister(NcPaintEventPtr) | |
3699 | ||
3700 | #--------------------------------------------------------------------------- | |
3701 | ||
3702 | class EraseEvent(Event): | |
e811c8ce RD |
3703 | def __repr__(self): |
3704 | return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3705 | def __init__(self, *args, **kwargs): |
196addbf | 3706 | """__init__(int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent""" |
d14a1e28 RD |
3707 | newobj = _core.new_EraseEvent(*args, **kwargs) |
3708 | self.this = newobj.this | |
3709 | self.thisown = 1 | |
3710 | del newobj.thisown | |
e811c8ce | 3711 | def GetDC(*args, **kwargs): |
196addbf | 3712 | """GetDC() -> DC""" |
e811c8ce RD |
3713 | return _core.EraseEvent_GetDC(*args, **kwargs) |
3714 | ||
d14a1e28 RD |
3715 | |
3716 | class EraseEventPtr(EraseEvent): | |
3717 | def __init__(self, this): | |
3718 | self.this = this | |
3719 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3720 | self.__class__ = EraseEvent | |
3721 | _core.EraseEvent_swigregister(EraseEventPtr) | |
3722 | ||
3723 | #--------------------------------------------------------------------------- | |
3724 | ||
3725 | class FocusEvent(Event): | |
e811c8ce RD |
3726 | def __repr__(self): |
3727 | return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3728 | def __init__(self, *args, **kwargs): |
e811c8ce | 3729 | """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent""" |
d14a1e28 RD |
3730 | newobj = _core.new_FocusEvent(*args, **kwargs) |
3731 | self.this = newobj.this | |
3732 | self.thisown = 1 | |
3733 | del newobj.thisown | |
e811c8ce RD |
3734 | def GetWindow(*args, **kwargs): |
3735 | """GetWindow() -> Window""" | |
3736 | return _core.FocusEvent_GetWindow(*args, **kwargs) | |
3737 | ||
3738 | def SetWindow(*args, **kwargs): | |
3739 | """SetWindow(Window win)""" | |
3740 | return _core.FocusEvent_SetWindow(*args, **kwargs) | |
3741 | ||
d14a1e28 RD |
3742 | |
3743 | class FocusEventPtr(FocusEvent): | |
3744 | def __init__(self, this): | |
3745 | self.this = this | |
3746 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3747 | self.__class__ = FocusEvent | |
3748 | _core.FocusEvent_swigregister(FocusEventPtr) | |
3749 | ||
3750 | #--------------------------------------------------------------------------- | |
3751 | ||
3752 | class ChildFocusEvent(CommandEvent): | |
e811c8ce RD |
3753 | def __repr__(self): |
3754 | return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3755 | def __init__(self, *args, **kwargs): |
e811c8ce | 3756 | """__init__(Window win=None) -> ChildFocusEvent""" |
d14a1e28 RD |
3757 | newobj = _core.new_ChildFocusEvent(*args, **kwargs) |
3758 | self.this = newobj.this | |
3759 | self.thisown = 1 | |
3760 | del newobj.thisown | |
e811c8ce RD |
3761 | def GetWindow(*args, **kwargs): |
3762 | """GetWindow() -> Window""" | |
3763 | return _core.ChildFocusEvent_GetWindow(*args, **kwargs) | |
3764 | ||
d14a1e28 RD |
3765 | |
3766 | class ChildFocusEventPtr(ChildFocusEvent): | |
3767 | def __init__(self, this): | |
3768 | self.this = this | |
3769 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3770 | self.__class__ = ChildFocusEvent | |
3771 | _core.ChildFocusEvent_swigregister(ChildFocusEventPtr) | |
3772 | ||
3773 | #--------------------------------------------------------------------------- | |
3774 | ||
3775 | class ActivateEvent(Event): | |
e811c8ce RD |
3776 | def __repr__(self): |
3777 | return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3778 | def __init__(self, *args, **kwargs): |
e811c8ce | 3779 | """__init__(wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent""" |
d14a1e28 RD |
3780 | newobj = _core.new_ActivateEvent(*args, **kwargs) |
3781 | self.this = newobj.this | |
3782 | self.thisown = 1 | |
3783 | del newobj.thisown | |
e811c8ce RD |
3784 | def GetActive(*args, **kwargs): |
3785 | """GetActive() -> bool""" | |
3786 | return _core.ActivateEvent_GetActive(*args, **kwargs) | |
3787 | ||
d14a1e28 RD |
3788 | |
3789 | class ActivateEventPtr(ActivateEvent): | |
3790 | def __init__(self, this): | |
3791 | self.this = this | |
3792 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3793 | self.__class__ = ActivateEvent | |
3794 | _core.ActivateEvent_swigregister(ActivateEventPtr) | |
3795 | ||
3796 | #--------------------------------------------------------------------------- | |
3797 | ||
3798 | class InitDialogEvent(Event): | |
e811c8ce RD |
3799 | def __repr__(self): |
3800 | return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3801 | def __init__(self, *args, **kwargs): |
e811c8ce | 3802 | """__init__(int Id=0) -> InitDialogEvent""" |
d14a1e28 RD |
3803 | newobj = _core.new_InitDialogEvent(*args, **kwargs) |
3804 | self.this = newobj.this | |
3805 | self.thisown = 1 | |
3806 | del newobj.thisown | |
d14a1e28 RD |
3807 | |
3808 | class InitDialogEventPtr(InitDialogEvent): | |
3809 | def __init__(self, this): | |
3810 | self.this = this | |
3811 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3812 | self.__class__ = InitDialogEvent | |
3813 | _core.InitDialogEvent_swigregister(InitDialogEventPtr) | |
3814 | ||
3815 | #--------------------------------------------------------------------------- | |
3816 | ||
3817 | class MenuEvent(Event): | |
e811c8ce RD |
3818 | def __repr__(self): |
3819 | return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3820 | def __init__(self, *args, **kwargs): |
e811c8ce | 3821 | """__init__(wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent""" |
d14a1e28 RD |
3822 | newobj = _core.new_MenuEvent(*args, **kwargs) |
3823 | self.this = newobj.this | |
3824 | self.thisown = 1 | |
3825 | del newobj.thisown | |
e811c8ce RD |
3826 | def GetMenuId(*args, **kwargs): |
3827 | """GetMenuId() -> int""" | |
3828 | return _core.MenuEvent_GetMenuId(*args, **kwargs) | |
3829 | ||
3830 | def IsPopup(*args, **kwargs): | |
3831 | """IsPopup() -> bool""" | |
3832 | return _core.MenuEvent_IsPopup(*args, **kwargs) | |
3833 | ||
3834 | def GetMenu(*args, **kwargs): | |
3835 | """GetMenu() -> Menu""" | |
3836 | return _core.MenuEvent_GetMenu(*args, **kwargs) | |
3837 | ||
d14a1e28 RD |
3838 | |
3839 | class MenuEventPtr(MenuEvent): | |
3840 | def __init__(self, this): | |
3841 | self.this = this | |
3842 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3843 | self.__class__ = MenuEvent | |
3844 | _core.MenuEvent_swigregister(MenuEventPtr) | |
3845 | ||
3846 | #--------------------------------------------------------------------------- | |
3847 | ||
3848 | class CloseEvent(Event): | |
e811c8ce RD |
3849 | def __repr__(self): |
3850 | return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3851 | def __init__(self, *args, **kwargs): |
e811c8ce | 3852 | """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent""" |
d14a1e28 RD |
3853 | newobj = _core.new_CloseEvent(*args, **kwargs) |
3854 | self.this = newobj.this | |
3855 | self.thisown = 1 | |
3856 | del newobj.thisown | |
e811c8ce RD |
3857 | def SetLoggingOff(*args, **kwargs): |
3858 | """SetLoggingOff(bool logOff)""" | |
3859 | return _core.CloseEvent_SetLoggingOff(*args, **kwargs) | |
3860 | ||
3861 | def GetLoggingOff(*args, **kwargs): | |
3862 | """GetLoggingOff() -> bool""" | |
3863 | return _core.CloseEvent_GetLoggingOff(*args, **kwargs) | |
3864 | ||
3865 | def Veto(*args, **kwargs): | |
3866 | """Veto(bool veto=True)""" | |
3867 | return _core.CloseEvent_Veto(*args, **kwargs) | |
3868 | ||
3869 | def SetCanVeto(*args, **kwargs): | |
3870 | """SetCanVeto(bool canVeto)""" | |
3871 | return _core.CloseEvent_SetCanVeto(*args, **kwargs) | |
3872 | ||
3873 | def CanVeto(*args, **kwargs): | |
3874 | """CanVeto() -> bool""" | |
3875 | return _core.CloseEvent_CanVeto(*args, **kwargs) | |
3876 | ||
3877 | def GetVeto(*args, **kwargs): | |
3878 | """GetVeto() -> bool""" | |
3879 | return _core.CloseEvent_GetVeto(*args, **kwargs) | |
3880 | ||
d14a1e28 RD |
3881 | |
3882 | class CloseEventPtr(CloseEvent): | |
3883 | def __init__(self, this): | |
3884 | self.this = this | |
3885 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3886 | self.__class__ = CloseEvent | |
3887 | _core.CloseEvent_swigregister(CloseEventPtr) | |
3888 | ||
3889 | #--------------------------------------------------------------------------- | |
3890 | ||
3891 | class ShowEvent(Event): | |
e811c8ce RD |
3892 | def __repr__(self): |
3893 | return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3894 | def __init__(self, *args, **kwargs): |
e811c8ce | 3895 | """__init__(int winid=0, bool show=False) -> ShowEvent""" |
d14a1e28 RD |
3896 | newobj = _core.new_ShowEvent(*args, **kwargs) |
3897 | self.this = newobj.this | |
3898 | self.thisown = 1 | |
3899 | del newobj.thisown | |
e811c8ce RD |
3900 | def SetShow(*args, **kwargs): |
3901 | """SetShow(bool show)""" | |
3902 | return _core.ShowEvent_SetShow(*args, **kwargs) | |
3903 | ||
3904 | def GetShow(*args, **kwargs): | |
3905 | """GetShow() -> bool""" | |
3906 | return _core.ShowEvent_GetShow(*args, **kwargs) | |
3907 | ||
d14a1e28 RD |
3908 | |
3909 | class ShowEventPtr(ShowEvent): | |
3910 | def __init__(self, this): | |
3911 | self.this = this | |
3912 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3913 | self.__class__ = ShowEvent | |
3914 | _core.ShowEvent_swigregister(ShowEventPtr) | |
3915 | ||
3916 | #--------------------------------------------------------------------------- | |
3917 | ||
3918 | class IconizeEvent(Event): | |
e811c8ce RD |
3919 | def __repr__(self): |
3920 | return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3921 | def __init__(self, *args, **kwargs): |
e811c8ce | 3922 | """__init__(int id=0, bool iconized=True) -> IconizeEvent""" |
d14a1e28 RD |
3923 | newobj = _core.new_IconizeEvent(*args, **kwargs) |
3924 | self.this = newobj.this | |
3925 | self.thisown = 1 | |
3926 | del newobj.thisown | |
e811c8ce RD |
3927 | def Iconized(*args, **kwargs): |
3928 | """Iconized() -> bool""" | |
3929 | return _core.IconizeEvent_Iconized(*args, **kwargs) | |
3930 | ||
d14a1e28 RD |
3931 | |
3932 | class IconizeEventPtr(IconizeEvent): | |
3933 | def __init__(self, this): | |
3934 | self.this = this | |
3935 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3936 | self.__class__ = IconizeEvent | |
3937 | _core.IconizeEvent_swigregister(IconizeEventPtr) | |
3938 | ||
3939 | #--------------------------------------------------------------------------- | |
3940 | ||
3941 | class MaximizeEvent(Event): | |
e811c8ce RD |
3942 | def __repr__(self): |
3943 | return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3944 | def __init__(self, *args, **kwargs): |
e811c8ce | 3945 | """__init__(int id=0) -> MaximizeEvent""" |
d14a1e28 RD |
3946 | newobj = _core.new_MaximizeEvent(*args, **kwargs) |
3947 | self.this = newobj.this | |
3948 | self.thisown = 1 | |
3949 | del newobj.thisown | |
d14a1e28 RD |
3950 | |
3951 | class MaximizeEventPtr(MaximizeEvent): | |
3952 | def __init__(self, this): | |
3953 | self.this = this | |
3954 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3955 | self.__class__ = MaximizeEvent | |
3956 | _core.MaximizeEvent_swigregister(MaximizeEventPtr) | |
3957 | ||
3958 | #--------------------------------------------------------------------------- | |
3959 | ||
3960 | class DropFilesEvent(Event): | |
d14a1e28 RD |
3961 | def __init__(self): raise RuntimeError, "No constructor defined" |
3962 | def __repr__(self): | |
3963 | return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce RD |
3964 | def GetPosition(*args, **kwargs): |
3965 | """GetPosition() -> Point""" | |
3966 | return _core.DropFilesEvent_GetPosition(*args, **kwargs) | |
3967 | ||
3968 | def GetNumberOfFiles(*args, **kwargs): | |
3969 | """GetNumberOfFiles() -> int""" | |
3970 | return _core.DropFilesEvent_GetNumberOfFiles(*args, **kwargs) | |
3971 | ||
3972 | def GetFiles(*args, **kwargs): | |
3973 | """GetFiles() -> PyObject""" | |
3974 | return _core.DropFilesEvent_GetFiles(*args, **kwargs) | |
3975 | ||
d14a1e28 RD |
3976 | |
3977 | class DropFilesEventPtr(DropFilesEvent): | |
3978 | def __init__(self, this): | |
3979 | self.this = this | |
3980 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3981 | self.__class__ = DropFilesEvent | |
3982 | _core.DropFilesEvent_swigregister(DropFilesEventPtr) | |
3983 | ||
3984 | #--------------------------------------------------------------------------- | |
3985 | ||
3986 | UPDATE_UI_PROCESS_ALL = _core.UPDATE_UI_PROCESS_ALL | |
3987 | UPDATE_UI_PROCESS_SPECIFIED = _core.UPDATE_UI_PROCESS_SPECIFIED | |
3988 | class UpdateUIEvent(CommandEvent): | |
e811c8ce RD |
3989 | def __repr__(self): |
3990 | return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3991 | def __init__(self, *args, **kwargs): |
e811c8ce | 3992 | """__init__(int commandId=0) -> UpdateUIEvent""" |
d14a1e28 RD |
3993 | newobj = _core.new_UpdateUIEvent(*args, **kwargs) |
3994 | self.this = newobj.this | |
3995 | self.thisown = 1 | |
3996 | del newobj.thisown | |
e811c8ce RD |
3997 | def GetChecked(*args, **kwargs): |
3998 | """GetChecked() -> bool""" | |
3999 | return _core.UpdateUIEvent_GetChecked(*args, **kwargs) | |
4000 | ||
4001 | def GetEnabled(*args, **kwargs): | |
4002 | """GetEnabled() -> bool""" | |
4003 | return _core.UpdateUIEvent_GetEnabled(*args, **kwargs) | |
4004 | ||
4005 | def GetText(*args, **kwargs): | |
196addbf | 4006 | """GetText() -> String""" |
e811c8ce RD |
4007 | return _core.UpdateUIEvent_GetText(*args, **kwargs) |
4008 | ||
4009 | def GetSetText(*args, **kwargs): | |
4010 | """GetSetText() -> bool""" | |
4011 | return _core.UpdateUIEvent_GetSetText(*args, **kwargs) | |
4012 | ||
4013 | def GetSetChecked(*args, **kwargs): | |
4014 | """GetSetChecked() -> bool""" | |
4015 | return _core.UpdateUIEvent_GetSetChecked(*args, **kwargs) | |
4016 | ||
4017 | def GetSetEnabled(*args, **kwargs): | |
4018 | """GetSetEnabled() -> bool""" | |
4019 | return _core.UpdateUIEvent_GetSetEnabled(*args, **kwargs) | |
4020 | ||
4021 | def Check(*args, **kwargs): | |
4022 | """Check(bool check)""" | |
4023 | return _core.UpdateUIEvent_Check(*args, **kwargs) | |
4024 | ||
4025 | def Enable(*args, **kwargs): | |
4026 | """Enable(bool enable)""" | |
4027 | return _core.UpdateUIEvent_Enable(*args, **kwargs) | |
4028 | ||
4029 | def SetText(*args, **kwargs): | |
196addbf | 4030 | """SetText(String text)""" |
e811c8ce RD |
4031 | return _core.UpdateUIEvent_SetText(*args, **kwargs) |
4032 | ||
4033 | def SetUpdateInterval(*args, **kwargs): | |
a41e16b6 | 4034 | """SetUpdateInterval(long updateInterval)""" |
e811c8ce RD |
4035 | return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) |
4036 | ||
4037 | SetUpdateInterval = staticmethod(SetUpdateInterval) | |
4038 | def GetUpdateInterval(*args, **kwargs): | |
a41e16b6 | 4039 | """GetUpdateInterval() -> long""" |
e811c8ce RD |
4040 | return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) |
4041 | ||
4042 | GetUpdateInterval = staticmethod(GetUpdateInterval) | |
4043 | def CanUpdate(*args, **kwargs): | |
a41e16b6 | 4044 | """CanUpdate(Window win) -> bool""" |
e811c8ce RD |
4045 | return _core.UpdateUIEvent_CanUpdate(*args, **kwargs) |
4046 | ||
4047 | CanUpdate = staticmethod(CanUpdate) | |
4048 | def ResetUpdateTime(*args, **kwargs): | |
a41e16b6 | 4049 | """ResetUpdateTime()""" |
e811c8ce RD |
4050 | return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) |
4051 | ||
4052 | ResetUpdateTime = staticmethod(ResetUpdateTime) | |
4053 | def SetMode(*args, **kwargs): | |
a41e16b6 | 4054 | """SetMode(int mode)""" |
e811c8ce RD |
4055 | return _core.UpdateUIEvent_SetMode(*args, **kwargs) |
4056 | ||
4057 | SetMode = staticmethod(SetMode) | |
4058 | def GetMode(*args, **kwargs): | |
a41e16b6 | 4059 | """GetMode() -> int""" |
e811c8ce RD |
4060 | return _core.UpdateUIEvent_GetMode(*args, **kwargs) |
4061 | ||
4062 | GetMode = staticmethod(GetMode) | |
d14a1e28 RD |
4063 | |
4064 | class UpdateUIEventPtr(UpdateUIEvent): | |
4065 | def __init__(self, this): | |
4066 | self.this = this | |
4067 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4068 | self.__class__ = UpdateUIEvent | |
4069 | _core.UpdateUIEvent_swigregister(UpdateUIEventPtr) | |
4070 | ||
e811c8ce RD |
4071 | def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): |
4072 | """UpdateUIEvent_SetUpdateInterval(long updateInterval)""" | |
4073 | return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) | |
d14a1e28 | 4074 | |
e811c8ce RD |
4075 | def UpdateUIEvent_GetUpdateInterval(*args, **kwargs): |
4076 | """UpdateUIEvent_GetUpdateInterval() -> long""" | |
4077 | return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) | |
d14a1e28 | 4078 | |
e811c8ce RD |
4079 | def UpdateUIEvent_CanUpdate(*args, **kwargs): |
4080 | """UpdateUIEvent_CanUpdate(Window win) -> bool""" | |
4081 | return _core.UpdateUIEvent_CanUpdate(*args, **kwargs) | |
d14a1e28 | 4082 | |
e811c8ce RD |
4083 | def UpdateUIEvent_ResetUpdateTime(*args, **kwargs): |
4084 | """UpdateUIEvent_ResetUpdateTime()""" | |
4085 | return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) | |
d14a1e28 | 4086 | |
e811c8ce | 4087 | def UpdateUIEvent_SetMode(*args, **kwargs): |
196addbf | 4088 | """UpdateUIEvent_SetMode(int mode)""" |
e811c8ce | 4089 | return _core.UpdateUIEvent_SetMode(*args, **kwargs) |
d14a1e28 | 4090 | |
e811c8ce | 4091 | def UpdateUIEvent_GetMode(*args, **kwargs): |
196addbf | 4092 | """UpdateUIEvent_GetMode() -> int""" |
e811c8ce | 4093 | return _core.UpdateUIEvent_GetMode(*args, **kwargs) |
d14a1e28 RD |
4094 | |
4095 | #--------------------------------------------------------------------------- | |
4096 | ||
4097 | class SysColourChangedEvent(Event): | |
e811c8ce RD |
4098 | def __repr__(self): |
4099 | return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4100 | def __init__(self, *args, **kwargs): |
e811c8ce | 4101 | """__init__() -> SysColourChangedEvent""" |
d14a1e28 RD |
4102 | newobj = _core.new_SysColourChangedEvent(*args, **kwargs) |
4103 | self.this = newobj.this | |
4104 | self.thisown = 1 | |
4105 | del newobj.thisown | |
d14a1e28 RD |
4106 | |
4107 | class SysColourChangedEventPtr(SysColourChangedEvent): | |
4108 | def __init__(self, this): | |
4109 | self.this = this | |
4110 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4111 | self.__class__ = SysColourChangedEvent | |
4112 | _core.SysColourChangedEvent_swigregister(SysColourChangedEventPtr) | |
4113 | ||
4114 | #--------------------------------------------------------------------------- | |
4115 | ||
4116 | class MouseCaptureChangedEvent(Event): | |
e811c8ce RD |
4117 | def __repr__(self): |
4118 | return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4119 | def __init__(self, *args, **kwargs): |
e811c8ce | 4120 | """__init__(int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent""" |
d14a1e28 RD |
4121 | newobj = _core.new_MouseCaptureChangedEvent(*args, **kwargs) |
4122 | self.this = newobj.this | |
4123 | self.thisown = 1 | |
4124 | del newobj.thisown | |
e811c8ce RD |
4125 | def GetCapturedWindow(*args, **kwargs): |
4126 | """GetCapturedWindow() -> Window""" | |
4127 | return _core.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs) | |
4128 | ||
d14a1e28 RD |
4129 | |
4130 | class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent): | |
4131 | def __init__(self, this): | |
4132 | self.this = this | |
4133 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4134 | self.__class__ = MouseCaptureChangedEvent | |
4135 | _core.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr) | |
4136 | ||
4137 | #--------------------------------------------------------------------------- | |
4138 | ||
4139 | class DisplayChangedEvent(Event): | |
e811c8ce RD |
4140 | def __repr__(self): |
4141 | return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4142 | def __init__(self, *args, **kwargs): |
e811c8ce | 4143 | """__init__() -> DisplayChangedEvent""" |
d14a1e28 RD |
4144 | newobj = _core.new_DisplayChangedEvent(*args, **kwargs) |
4145 | self.this = newobj.this | |
4146 | self.thisown = 1 | |
4147 | del newobj.thisown | |
d14a1e28 RD |
4148 | |
4149 | class DisplayChangedEventPtr(DisplayChangedEvent): | |
4150 | def __init__(self, this): | |
4151 | self.this = this | |
4152 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4153 | self.__class__ = DisplayChangedEvent | |
4154 | _core.DisplayChangedEvent_swigregister(DisplayChangedEventPtr) | |
4155 | ||
4156 | #--------------------------------------------------------------------------- | |
4157 | ||
4158 | class PaletteChangedEvent(Event): | |
e811c8ce RD |
4159 | def __repr__(self): |
4160 | return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4161 | def __init__(self, *args, **kwargs): |
e811c8ce | 4162 | """__init__(int id=0) -> PaletteChangedEvent""" |
d14a1e28 RD |
4163 | newobj = _core.new_PaletteChangedEvent(*args, **kwargs) |
4164 | self.this = newobj.this | |
4165 | self.thisown = 1 | |
4166 | del newobj.thisown | |
e811c8ce RD |
4167 | def SetChangedWindow(*args, **kwargs): |
4168 | """SetChangedWindow(Window win)""" | |
4169 | return _core.PaletteChangedEvent_SetChangedWindow(*args, **kwargs) | |
4170 | ||
4171 | def GetChangedWindow(*args, **kwargs): | |
4172 | """GetChangedWindow() -> Window""" | |
4173 | return _core.PaletteChangedEvent_GetChangedWindow(*args, **kwargs) | |
4174 | ||
d14a1e28 RD |
4175 | |
4176 | class PaletteChangedEventPtr(PaletteChangedEvent): | |
4177 | def __init__(self, this): | |
4178 | self.this = this | |
4179 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4180 | self.__class__ = PaletteChangedEvent | |
4181 | _core.PaletteChangedEvent_swigregister(PaletteChangedEventPtr) | |
4182 | ||
4183 | #--------------------------------------------------------------------------- | |
4184 | ||
4185 | class QueryNewPaletteEvent(Event): | |
e811c8ce RD |
4186 | def __repr__(self): |
4187 | return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4188 | def __init__(self, *args, **kwargs): |
e811c8ce | 4189 | """__init__(int winid=0) -> QueryNewPaletteEvent""" |
d14a1e28 RD |
4190 | newobj = _core.new_QueryNewPaletteEvent(*args, **kwargs) |
4191 | self.this = newobj.this | |
4192 | self.thisown = 1 | |
4193 | del newobj.thisown | |
e811c8ce RD |
4194 | def SetPaletteRealized(*args, **kwargs): |
4195 | """SetPaletteRealized(bool realized)""" | |
4196 | return _core.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs) | |
4197 | ||
4198 | def GetPaletteRealized(*args, **kwargs): | |
4199 | """GetPaletteRealized() -> bool""" | |
4200 | return _core.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs) | |
4201 | ||
d14a1e28 RD |
4202 | |
4203 | class QueryNewPaletteEventPtr(QueryNewPaletteEvent): | |
4204 | def __init__(self, this): | |
4205 | self.this = this | |
4206 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4207 | self.__class__ = QueryNewPaletteEvent | |
4208 | _core.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr) | |
4209 | ||
4210 | #--------------------------------------------------------------------------- | |
4211 | ||
4212 | class NavigationKeyEvent(Event): | |
e811c8ce RD |
4213 | def __repr__(self): |
4214 | return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4215 | def __init__(self, *args, **kwargs): |
e811c8ce | 4216 | """__init__() -> NavigationKeyEvent""" |
d14a1e28 RD |
4217 | newobj = _core.new_NavigationKeyEvent(*args, **kwargs) |
4218 | self.this = newobj.this | |
4219 | self.thisown = 1 | |
4220 | del newobj.thisown | |
e811c8ce RD |
4221 | def GetDirection(*args, **kwargs): |
4222 | """GetDirection() -> bool""" | |
4223 | return _core.NavigationKeyEvent_GetDirection(*args, **kwargs) | |
4224 | ||
4225 | def SetDirection(*args, **kwargs): | |
4226 | """SetDirection(bool bForward)""" | |
4227 | return _core.NavigationKeyEvent_SetDirection(*args, **kwargs) | |
4228 | ||
4229 | def IsWindowChange(*args, **kwargs): | |
4230 | """IsWindowChange() -> bool""" | |
4231 | return _core.NavigationKeyEvent_IsWindowChange(*args, **kwargs) | |
4232 | ||
4233 | def SetWindowChange(*args, **kwargs): | |
4234 | """SetWindowChange(bool bIs)""" | |
4235 | return _core.NavigationKeyEvent_SetWindowChange(*args, **kwargs) | |
4236 | ||
4237 | def GetCurrentFocus(*args, **kwargs): | |
4238 | """GetCurrentFocus() -> Window""" | |
4239 | return _core.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs) | |
4240 | ||
4241 | def SetCurrentFocus(*args, **kwargs): | |
4242 | """SetCurrentFocus(Window win)""" | |
4243 | return _core.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs) | |
4244 | ||
d14a1e28 RD |
4245 | |
4246 | class NavigationKeyEventPtr(NavigationKeyEvent): | |
4247 | def __init__(self, this): | |
4248 | self.this = this | |
4249 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4250 | self.__class__ = NavigationKeyEvent | |
4251 | _core.NavigationKeyEvent_swigregister(NavigationKeyEventPtr) | |
4252 | ||
4253 | #--------------------------------------------------------------------------- | |
4254 | ||
4255 | class WindowCreateEvent(CommandEvent): | |
e811c8ce RD |
4256 | def __repr__(self): |
4257 | return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4258 | def __init__(self, *args, **kwargs): |
e811c8ce | 4259 | """__init__(Window win=None) -> WindowCreateEvent""" |
d14a1e28 RD |
4260 | newobj = _core.new_WindowCreateEvent(*args, **kwargs) |
4261 | self.this = newobj.this | |
4262 | self.thisown = 1 | |
4263 | del newobj.thisown | |
e811c8ce RD |
4264 | def GetWindow(*args, **kwargs): |
4265 | """GetWindow() -> Window""" | |
4266 | return _core.WindowCreateEvent_GetWindow(*args, **kwargs) | |
4267 | ||
d14a1e28 RD |
4268 | |
4269 | class WindowCreateEventPtr(WindowCreateEvent): | |
4270 | def __init__(self, this): | |
4271 | self.this = this | |
4272 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4273 | self.__class__ = WindowCreateEvent | |
4274 | _core.WindowCreateEvent_swigregister(WindowCreateEventPtr) | |
4275 | ||
4276 | class WindowDestroyEvent(CommandEvent): | |
e811c8ce RD |
4277 | def __repr__(self): |
4278 | return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4279 | def __init__(self, *args, **kwargs): |
e811c8ce | 4280 | """__init__(Window win=None) -> WindowDestroyEvent""" |
d14a1e28 RD |
4281 | newobj = _core.new_WindowDestroyEvent(*args, **kwargs) |
4282 | self.this = newobj.this | |
4283 | self.thisown = 1 | |
4284 | del newobj.thisown | |
e811c8ce RD |
4285 | def GetWindow(*args, **kwargs): |
4286 | """GetWindow() -> Window""" | |
4287 | return _core.WindowDestroyEvent_GetWindow(*args, **kwargs) | |
4288 | ||
d14a1e28 RD |
4289 | |
4290 | class WindowDestroyEventPtr(WindowDestroyEvent): | |
4291 | def __init__(self, this): | |
4292 | self.this = this | |
4293 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4294 | self.__class__ = WindowDestroyEvent | |
4295 | _core.WindowDestroyEvent_swigregister(WindowDestroyEventPtr) | |
4296 | ||
4297 | #--------------------------------------------------------------------------- | |
4298 | ||
4299 | class ContextMenuEvent(CommandEvent): | |
e811c8ce RD |
4300 | def __repr__(self): |
4301 | return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4302 | def __init__(self, *args, **kwargs): |
e811c8ce | 4303 | """__init__(wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent""" |
d14a1e28 RD |
4304 | newobj = _core.new_ContextMenuEvent(*args, **kwargs) |
4305 | self.this = newobj.this | |
4306 | self.thisown = 1 | |
4307 | del newobj.thisown | |
e811c8ce RD |
4308 | def GetPosition(*args, **kwargs): |
4309 | """GetPosition() -> Point""" | |
4310 | return _core.ContextMenuEvent_GetPosition(*args, **kwargs) | |
4311 | ||
4312 | def SetPosition(*args, **kwargs): | |
4313 | """SetPosition(Point pos)""" | |
4314 | return _core.ContextMenuEvent_SetPosition(*args, **kwargs) | |
4315 | ||
d14a1e28 RD |
4316 | |
4317 | class ContextMenuEventPtr(ContextMenuEvent): | |
4318 | def __init__(self, this): | |
4319 | self.this = this | |
4320 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4321 | self.__class__ = ContextMenuEvent | |
4322 | _core.ContextMenuEvent_swigregister(ContextMenuEventPtr) | |
4323 | ||
4324 | #--------------------------------------------------------------------------- | |
4325 | ||
4326 | IDLE_PROCESS_ALL = _core.IDLE_PROCESS_ALL | |
4327 | IDLE_PROCESS_SPECIFIED = _core.IDLE_PROCESS_SPECIFIED | |
4328 | class IdleEvent(Event): | |
e811c8ce RD |
4329 | def __repr__(self): |
4330 | return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4331 | def __init__(self, *args, **kwargs): |
e811c8ce | 4332 | """__init__() -> IdleEvent""" |
d14a1e28 RD |
4333 | newobj = _core.new_IdleEvent(*args, **kwargs) |
4334 | self.this = newobj.this | |
4335 | self.thisown = 1 | |
4336 | del newobj.thisown | |
e811c8ce RD |
4337 | def RequestMore(*args, **kwargs): |
4338 | """RequestMore(bool needMore=True)""" | |
4339 | return _core.IdleEvent_RequestMore(*args, **kwargs) | |
4340 | ||
4341 | def MoreRequested(*args, **kwargs): | |
4342 | """MoreRequested() -> bool""" | |
4343 | return _core.IdleEvent_MoreRequested(*args, **kwargs) | |
4344 | ||
4345 | def SetMode(*args, **kwargs): | |
a41e16b6 | 4346 | """SetMode(int mode)""" |
e811c8ce RD |
4347 | return _core.IdleEvent_SetMode(*args, **kwargs) |
4348 | ||
4349 | SetMode = staticmethod(SetMode) | |
4350 | def GetMode(*args, **kwargs): | |
a41e16b6 | 4351 | """GetMode() -> int""" |
e811c8ce RD |
4352 | return _core.IdleEvent_GetMode(*args, **kwargs) |
4353 | ||
4354 | GetMode = staticmethod(GetMode) | |
4355 | def CanSend(*args, **kwargs): | |
a41e16b6 | 4356 | """CanSend(Window win) -> bool""" |
e811c8ce RD |
4357 | return _core.IdleEvent_CanSend(*args, **kwargs) |
4358 | ||
4359 | CanSend = staticmethod(CanSend) | |
d14a1e28 RD |
4360 | |
4361 | class IdleEventPtr(IdleEvent): | |
4362 | def __init__(self, this): | |
4363 | self.this = this | |
4364 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4365 | self.__class__ = IdleEvent | |
4366 | _core.IdleEvent_swigregister(IdleEventPtr) | |
4367 | ||
e811c8ce | 4368 | def IdleEvent_SetMode(*args, **kwargs): |
196addbf | 4369 | """IdleEvent_SetMode(int mode)""" |
e811c8ce | 4370 | return _core.IdleEvent_SetMode(*args, **kwargs) |
d14a1e28 | 4371 | |
e811c8ce | 4372 | def IdleEvent_GetMode(*args, **kwargs): |
196addbf | 4373 | """IdleEvent_GetMode() -> int""" |
e811c8ce | 4374 | return _core.IdleEvent_GetMode(*args, **kwargs) |
d14a1e28 | 4375 | |
e811c8ce RD |
4376 | def IdleEvent_CanSend(*args, **kwargs): |
4377 | """IdleEvent_CanSend(Window win) -> bool""" | |
4378 | return _core.IdleEvent_CanSend(*args, **kwargs) | |
d14a1e28 RD |
4379 | |
4380 | #--------------------------------------------------------------------------- | |
4381 | ||
4382 | class PyEvent(Event): | |
e811c8ce RD |
4383 | def __repr__(self): |
4384 | return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4385 | def __init__(self, *args, **kwargs): |
e811c8ce | 4386 | """__init__(int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent""" |
d14a1e28 RD |
4387 | newobj = _core.new_PyEvent(*args, **kwargs) |
4388 | self.this = newobj.this | |
4389 | self.thisown = 1 | |
4390 | del newobj.thisown | |
4391 | self.SetSelf(self) | |
e811c8ce | 4392 | |
d14a1e28 | 4393 | def __del__(self, destroy=_core.delete_PyEvent): |
e811c8ce | 4394 | """__del__()""" |
d14a1e28 RD |
4395 | try: |
4396 | if self.thisown: destroy(self) | |
4397 | except: pass | |
e811c8ce RD |
4398 | |
4399 | def SetSelf(*args, **kwargs): | |
4400 | """SetSelf(PyObject self)""" | |
4401 | return _core.PyEvent_SetSelf(*args, **kwargs) | |
4402 | ||
4403 | def GetSelf(*args, **kwargs): | |
4404 | """GetSelf() -> PyObject""" | |
4405 | return _core.PyEvent_GetSelf(*args, **kwargs) | |
4406 | ||
d14a1e28 RD |
4407 | |
4408 | class PyEventPtr(PyEvent): | |
4409 | def __init__(self, this): | |
4410 | self.this = this | |
4411 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4412 | self.__class__ = PyEvent | |
4413 | _core.PyEvent_swigregister(PyEventPtr) | |
4414 | ||
4415 | class PyCommandEvent(CommandEvent): | |
e811c8ce RD |
4416 | def __repr__(self): |
4417 | return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4418 | def __init__(self, *args, **kwargs): |
e811c8ce | 4419 | """__init__(wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent""" |
d14a1e28 RD |
4420 | newobj = _core.new_PyCommandEvent(*args, **kwargs) |
4421 | self.this = newobj.this | |
4422 | self.thisown = 1 | |
4423 | del newobj.thisown | |
4424 | self.SetSelf(self) | |
e811c8ce | 4425 | |
d14a1e28 | 4426 | def __del__(self, destroy=_core.delete_PyCommandEvent): |
e811c8ce | 4427 | """__del__()""" |
d14a1e28 RD |
4428 | try: |
4429 | if self.thisown: destroy(self) | |
4430 | except: pass | |
e811c8ce RD |
4431 | |
4432 | def SetSelf(*args, **kwargs): | |
4433 | """SetSelf(PyObject self)""" | |
4434 | return _core.PyCommandEvent_SetSelf(*args, **kwargs) | |
4435 | ||
4436 | def GetSelf(*args, **kwargs): | |
4437 | """GetSelf() -> PyObject""" | |
4438 | return _core.PyCommandEvent_GetSelf(*args, **kwargs) | |
4439 | ||
d14a1e28 RD |
4440 | |
4441 | class PyCommandEventPtr(PyCommandEvent): | |
4442 | def __init__(self, this): | |
4443 | self.this = this | |
4444 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4445 | self.__class__ = PyCommandEvent | |
4446 | _core.PyCommandEvent_swigregister(PyCommandEventPtr) | |
4447 | ||
4448 | #--------------------------------------------------------------------------- | |
4449 | ||
4450 | PYAPP_ASSERT_SUPPRESS = _core.PYAPP_ASSERT_SUPPRESS | |
4451 | PYAPP_ASSERT_EXCEPTION = _core.PYAPP_ASSERT_EXCEPTION | |
4452 | PYAPP_ASSERT_DIALOG = _core.PYAPP_ASSERT_DIALOG | |
4453 | PYAPP_ASSERT_LOG = _core.PYAPP_ASSERT_LOG | |
4454 | PRINT_WINDOWS = _core.PRINT_WINDOWS | |
4455 | PRINT_POSTSCRIPT = _core.PRINT_POSTSCRIPT | |
4456 | class PyApp(EvtHandler): | |
e811c8ce RD |
4457 | def __repr__(self): |
4458 | return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4459 | def __init__(self, *args, **kwargs): |
98e665d3 RD |
4460 | """ |
4461 | __init__() -> PyApp | |
4462 | ||
4463 | Create a new application object, starting the bootstrap process. | |
4464 | """ | |
d14a1e28 RD |
4465 | newobj = _core.new_PyApp(*args, **kwargs) |
4466 | self.this = newobj.this | |
4467 | self.thisown = 1 | |
4468 | del newobj.thisown | |
4469 | self._setCallbackInfo(self, PyApp) | |
4470 | self._setOORInfo(self) | |
e811c8ce | 4471 | |
d14a1e28 | 4472 | def __del__(self, destroy=_core.delete_PyApp): |
e811c8ce | 4473 | """__del__()""" |
d14a1e28 RD |
4474 | try: |
4475 | if self.thisown: destroy(self) | |
4476 | except: pass | |
e811c8ce RD |
4477 | |
4478 | def _setCallbackInfo(*args, **kwargs): | |
4479 | """_setCallbackInfo(PyObject self, PyObject _class)""" | |
4480 | return _core.PyApp__setCallbackInfo(*args, **kwargs) | |
4481 | ||
4482 | def GetAppName(*args, **kwargs): | |
0df68c9f | 4483 | """ |
196addbf | 4484 | GetAppName() -> String |
6c3b4aae | 4485 | |
0df68c9f RD |
4486 | Get the application name. |
4487 | """ | |
e811c8ce RD |
4488 | return _core.PyApp_GetAppName(*args, **kwargs) |
4489 | ||
4490 | def SetAppName(*args, **kwargs): | |
0df68c9f | 4491 | """ |
196addbf | 4492 | SetAppName(String name) |
6c3b4aae | 4493 | |
0df68c9f | 4494 | Set the application name. This value may be used automatically |
196addbf | 4495 | by wx.Config and such. |
0df68c9f | 4496 | """ |
e811c8ce RD |
4497 | return _core.PyApp_SetAppName(*args, **kwargs) |
4498 | ||
4499 | def GetClassName(*args, **kwargs): | |
0df68c9f | 4500 | """ |
196addbf | 4501 | GetClassName() -> String |
e811c8ce | 4502 | |
0df68c9f RD |
4503 | Get the application's class name. |
4504 | """ | |
e811c8ce RD |
4505 | return _core.PyApp_GetClassName(*args, **kwargs) |
4506 | ||
4507 | def SetClassName(*args, **kwargs): | |
0df68c9f | 4508 | """ |
196addbf | 4509 | SetClassName(String name) |
6c3b4aae | 4510 | |
0df68c9f RD |
4511 | Set the application's class name. This value may be used for X-resources if |
4512 | applicable for the platform | |
4513 | """ | |
e811c8ce RD |
4514 | return _core.PyApp_SetClassName(*args, **kwargs) |
4515 | ||
4516 | def GetVendorName(*args, **kwargs): | |
0df68c9f | 4517 | """ |
196addbf | 4518 | GetVendorName() -> String |
6c3b4aae | 4519 | |
0df68c9f RD |
4520 | Get the application's vendor name. |
4521 | """ | |
e811c8ce RD |
4522 | return _core.PyApp_GetVendorName(*args, **kwargs) |
4523 | ||
4524 | def SetVendorName(*args, **kwargs): | |
0df68c9f | 4525 | """ |
196addbf | 4526 | SetVendorName(String name) |
6c3b4aae | 4527 | |
0df68c9f | 4528 | Set the application's vendor name. This value may be used automatically |
196addbf | 4529 | by wx.Config and such. |
0df68c9f | 4530 | """ |
e811c8ce RD |
4531 | return _core.PyApp_SetVendorName(*args, **kwargs) |
4532 | ||
4533 | def GetTraits(*args, **kwargs): | |
0df68c9f RD |
4534 | """ |
4535 | GetTraits() -> wxAppTraits | |
6c3b4aae | 4536 | |
0df68c9f RD |
4537 | Create the app traits object to which we delegate for everything which either |
4538 | should be configurable by the user (then he can change the default behaviour | |
4539 | simply by overriding CreateTraits() and returning his own traits object) or | |
196addbf | 4540 | which is GUI/console dependent as then wx.AppTraits allows us to abstract the |
0df68c9f RD |
4541 | differences behind the common facade |
4542 | """ | |
e811c8ce RD |
4543 | return _core.PyApp_GetTraits(*args, **kwargs) |
4544 | ||
4545 | def ProcessPendingEvents(*args, **kwargs): | |
0df68c9f RD |
4546 | """ |
4547 | ProcessPendingEvents() | |
6c3b4aae | 4548 | |
196addbf | 4549 | Process all events in the Pending Events list -- it is necessary to call this |
0df68c9f RD |
4550 | function to process posted events. This happens during each event loop |
4551 | iteration. | |
4552 | """ | |
e811c8ce RD |
4553 | return _core.PyApp_ProcessPendingEvents(*args, **kwargs) |
4554 | ||
4555 | def Yield(*args, **kwargs): | |
0df68c9f RD |
4556 | """ |
4557 | Yield(bool onlyIfNeeded=False) -> bool | |
6c3b4aae | 4558 | |
0df68c9f RD |
4559 | Process all currently pending events right now, instead of waiting until |
4560 | return to the event loop. It is an error to call Yield() recursively unless | |
4561 | the value of onlyIfNeeded is True. | |
6c3b4aae | 4562 | |
0df68c9f RD |
4563 | WARNING: This function is dangerous as it can lead to unexpected |
4564 | reentrancies (i.e. when called from an event handler it | |
4565 | may result in calling the same event handler again), use | |
4566 | with _extreme_ care or, better, don't use at all! | |
4567 | ||
4568 | """ | |
e811c8ce RD |
4569 | return _core.PyApp_Yield(*args, **kwargs) |
4570 | ||
4571 | def WakeUpIdle(*args, **kwargs): | |
0df68c9f RD |
4572 | """ |
4573 | WakeUpIdle() | |
6c3b4aae | 4574 | |
0df68c9f RD |
4575 | Make sure that idle events are sent again |
4576 | """ | |
e811c8ce RD |
4577 | return _core.PyApp_WakeUpIdle(*args, **kwargs) |
4578 | ||
4579 | def MainLoop(*args, **kwargs): | |
0df68c9f RD |
4580 | """ |
4581 | MainLoop() -> int | |
6c3b4aae | 4582 | |
0df68c9f RD |
4583 | Execute the main GUI loop, the function returns when the loop ends. |
4584 | """ | |
e811c8ce RD |
4585 | return _core.PyApp_MainLoop(*args, **kwargs) |
4586 | ||
4587 | def Exit(*args, **kwargs): | |
0df68c9f RD |
4588 | """ |
4589 | Exit() | |
6c3b4aae | 4590 | |
0df68c9f RD |
4591 | Exit the main loop thus terminating the application. |
4592 | """ | |
e811c8ce RD |
4593 | return _core.PyApp_Exit(*args, **kwargs) |
4594 | ||
4595 | def ExitMainLoop(*args, **kwargs): | |
0df68c9f RD |
4596 | """ |
4597 | ExitMainLoop() | |
6c3b4aae | 4598 | |
0df68c9f RD |
4599 | Exit the main GUI loop during the next iteration (i.e. it does not |
4600 | stop the program immediately!) | |
4601 | """ | |
e811c8ce RD |
4602 | return _core.PyApp_ExitMainLoop(*args, **kwargs) |
4603 | ||
4604 | def Pending(*args, **kwargs): | |
0df68c9f RD |
4605 | """ |
4606 | Pending() -> bool | |
6c3b4aae | 4607 | |
0df68c9f RD |
4608 | Returns True if there are unprocessed events in the event queue. |
4609 | """ | |
e811c8ce RD |
4610 | return _core.PyApp_Pending(*args, **kwargs) |
4611 | ||
4612 | def Dispatch(*args, **kwargs): | |
0df68c9f RD |
4613 | """ |
4614 | Dispatch() -> bool | |
6c3b4aae | 4615 | |
0df68c9f RD |
4616 | Process the first event in the event queue (blocks until an event |
4617 | appears if there are none currently) | |
4618 | """ | |
e811c8ce RD |
4619 | return _core.PyApp_Dispatch(*args, **kwargs) |
4620 | ||
4621 | def ProcessIdle(*args, **kwargs): | |
0df68c9f RD |
4622 | """ |
4623 | ProcessIdle() -> bool | |
6c3b4aae | 4624 | |
0df68c9f RD |
4625 | Called from the MainLoop when the application becomes idle and sends an |
4626 | IdleEvent to all interested parties. Returns True is more idle events are | |
4627 | needed, False if not. | |
4628 | """ | |
e811c8ce RD |
4629 | return _core.PyApp_ProcessIdle(*args, **kwargs) |
4630 | ||
4631 | def SendIdleEvents(*args, **kwargs): | |
0df68c9f RD |
4632 | """ |
4633 | SendIdleEvents(Window win, IdleEvent event) -> bool | |
e811c8ce | 4634 | |
0df68c9f RD |
4635 | Send idle event to window and all subwindows. Returns True if more idle time |
4636 | is requested. | |
4637 | """ | |
6c3b4aae | 4638 | return _core.PyApp_SendIdleEvents(*args, **kwargs) |
e811c8ce RD |
4639 | |
4640 | def IsActive(*args, **kwargs): | |
0df68c9f RD |
4641 | """ |
4642 | IsActive() -> bool | |
6c3b4aae | 4643 | |
0df68c9f RD |
4644 | Return True if our app has focus. |
4645 | """ | |
e811c8ce RD |
4646 | return _core.PyApp_IsActive(*args, **kwargs) |
4647 | ||
4648 | def SetTopWindow(*args, **kwargs): | |
0df68c9f RD |
4649 | """ |
4650 | SetTopWindow(Window win) | |
6c3b4aae | 4651 | |
0df68c9f RD |
4652 | Set the "main" top level window |
4653 | """ | |
e811c8ce RD |
4654 | return _core.PyApp_SetTopWindow(*args, **kwargs) |
4655 | ||
4656 | def GetTopWindow(*args, **kwargs): | |
0df68c9f RD |
4657 | """ |
4658 | GetTopWindow() -> Window | |
6c3b4aae | 4659 | |
0df68c9f RD |
4660 | Return the "main" top level window (if it hadn't been set previously with |
4661 | SetTopWindow(), will return just some top level window and, if there not any, | |
4662 | will return None) | |
4663 | """ | |
e811c8ce RD |
4664 | return _core.PyApp_GetTopWindow(*args, **kwargs) |
4665 | ||
4666 | def SetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f RD |
4667 | """ |
4668 | SetExitOnFrameDelete(bool flag) | |
4669 | ||
4670 | Control the exit behaviour: by default, the program will exit the main loop | |
4671 | (and so, usually, terminate) when the last top-level program window is | |
4672 | deleted. Beware that if you disable this behaviour (with | |
4673 | SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly | |
4674 | from somewhere. | |
4675 | ||
4676 | """ | |
e811c8ce RD |
4677 | return _core.PyApp_SetExitOnFrameDelete(*args, **kwargs) |
4678 | ||
4679 | def GetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f RD |
4680 | """ |
4681 | GetExitOnFrameDelete() -> bool | |
6c3b4aae | 4682 | |
0df68c9f RD |
4683 | Get the current exit behaviour setting. |
4684 | """ | |
e811c8ce RD |
4685 | return _core.PyApp_GetExitOnFrameDelete(*args, **kwargs) |
4686 | ||
4687 | def SetUseBestVisual(*args, **kwargs): | |
0df68c9f RD |
4688 | """ |
4689 | SetUseBestVisual(bool flag) | |
6c3b4aae | 4690 | |
0df68c9f RD |
4691 | Set whether the app should try to use the best available visual on systems |
4692 | where more than one is available, (Sun, SGI, XFree86 4, etc.) | |
4693 | """ | |
e811c8ce RD |
4694 | return _core.PyApp_SetUseBestVisual(*args, **kwargs) |
4695 | ||
4696 | def GetUseBestVisual(*args, **kwargs): | |
0df68c9f RD |
4697 | """ |
4698 | GetUseBestVisual() -> bool | |
6c3b4aae | 4699 | |
0df68c9f RD |
4700 | Get current UseBestVisual setting. |
4701 | """ | |
e811c8ce RD |
4702 | return _core.PyApp_GetUseBestVisual(*args, **kwargs) |
4703 | ||
4704 | def SetPrintMode(*args, **kwargs): | |
4705 | """SetPrintMode(int mode)""" | |
4706 | return _core.PyApp_SetPrintMode(*args, **kwargs) | |
4707 | ||
4708 | def GetPrintMode(*args, **kwargs): | |
4709 | """GetPrintMode() -> int""" | |
4710 | return _core.PyApp_GetPrintMode(*args, **kwargs) | |
4711 | ||
e811c8ce | 4712 | def SetAssertMode(*args, **kwargs): |
0df68c9f RD |
4713 | """ |
4714 | SetAssertMode(int mode) | |
6c3b4aae | 4715 | |
0df68c9f RD |
4716 | Set the OnAssert behaviour for debug and hybrid builds. The following flags |
4717 | may be or'd together: | |
6c3b4aae | 4718 | |
196addbf RD |
4719 | wx.PYAPP_ASSERT_SUPPRESS Don't do anything |
4720 | wx.PYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default) | |
4721 | wx.PYAPP_ASSERT_DIALOG Display a message dialog | |
4722 | wx.PYAPP_ASSERT_LOG Write the assertion info to the wx.Log | |
0df68c9f RD |
4723 | |
4724 | """ | |
e811c8ce RD |
4725 | return _core.PyApp_SetAssertMode(*args, **kwargs) |
4726 | ||
6c3b4aae | 4727 | def GetAssertMode(*args, **kwargs): |
0df68c9f RD |
4728 | """ |
4729 | GetAssertMode() -> int | |
6c3b4aae | 4730 | |
0df68c9f RD |
4731 | Get the current OnAssert behaviour setting. |
4732 | """ | |
6c3b4aae RD |
4733 | return _core.PyApp_GetAssertMode(*args, **kwargs) |
4734 | ||
e811c8ce | 4735 | def GetMacSupportPCMenuShortcuts(*args, **kwargs): |
a41e16b6 | 4736 | """GetMacSupportPCMenuShortcuts() -> bool""" |
e811c8ce RD |
4737 | return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) |
4738 | ||
4739 | GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) | |
4740 | def GetMacAboutMenuItemId(*args, **kwargs): | |
a41e16b6 | 4741 | """GetMacAboutMenuItemId() -> long""" |
e811c8ce RD |
4742 | return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs) |
4743 | ||
4744 | GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) | |
4745 | def GetMacPreferencesMenuItemId(*args, **kwargs): | |
a41e16b6 | 4746 | """GetMacPreferencesMenuItemId() -> long""" |
e811c8ce RD |
4747 | return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) |
4748 | ||
4749 | GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) | |
4750 | def GetMacExitMenuItemId(*args, **kwargs): | |
a41e16b6 | 4751 | """GetMacExitMenuItemId() -> long""" |
e811c8ce RD |
4752 | return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs) |
4753 | ||
4754 | GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) | |
4755 | def GetMacHelpMenuTitleName(*args, **kwargs): | |
a41e16b6 | 4756 | """GetMacHelpMenuTitleName() -> String""" |
e811c8ce RD |
4757 | return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) |
4758 | ||
4759 | GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) | |
4760 | def SetMacSupportPCMenuShortcuts(*args, **kwargs): | |
a41e16b6 | 4761 | """SetMacSupportPCMenuShortcuts(bool val)""" |
e811c8ce RD |
4762 | return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) |
4763 | ||
4764 | SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) | |
4765 | def SetMacAboutMenuItemId(*args, **kwargs): | |
a41e16b6 | 4766 | """SetMacAboutMenuItemId(long val)""" |
e811c8ce RD |
4767 | return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs) |
4768 | ||
4769 | SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) | |
4770 | def SetMacPreferencesMenuItemId(*args, **kwargs): | |
a41e16b6 | 4771 | """SetMacPreferencesMenuItemId(long val)""" |
e811c8ce RD |
4772 | return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) |
4773 | ||
4774 | SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) | |
4775 | def SetMacExitMenuItemId(*args, **kwargs): | |
a41e16b6 | 4776 | """SetMacExitMenuItemId(long val)""" |
e811c8ce RD |
4777 | return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs) |
4778 | ||
4779 | SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) | |
4780 | def SetMacHelpMenuTitleName(*args, **kwargs): | |
a41e16b6 | 4781 | """SetMacHelpMenuTitleName(String val)""" |
e811c8ce RD |
4782 | return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) |
4783 | ||
4784 | SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) | |
4785 | def _BootstrapApp(*args, **kwargs): | |
0df68c9f RD |
4786 | """ |
4787 | _BootstrapApp() | |
6c3b4aae | 4788 | |
0df68c9f RD |
4789 | For internal use only |
4790 | """ | |
e811c8ce RD |
4791 | return _core.PyApp__BootstrapApp(*args, **kwargs) |
4792 | ||
4793 | def GetComCtl32Version(*args, **kwargs): | |
0df68c9f | 4794 | """ |
a41e16b6 | 4795 | GetComCtl32Version() -> int |
6c3b4aae | 4796 | |
0df68c9f RD |
4797 | Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it |
4798 | wasn't found at all. Raises an exception on non-Windows platforms. | |
4799 | """ | |
e811c8ce RD |
4800 | return _core.PyApp_GetComCtl32Version(*args, **kwargs) |
4801 | ||
4802 | GetComCtl32Version = staticmethod(GetComCtl32Version) | |
d14a1e28 RD |
4803 | |
4804 | class PyAppPtr(PyApp): | |
4805 | def __init__(self, this): | |
4806 | self.this = this | |
4807 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4808 | self.__class__ = PyApp | |
4809 | _core.PyApp_swigregister(PyAppPtr) | |
4810 | ||
e811c8ce RD |
4811 | def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs): |
4812 | """PyApp_GetMacSupportPCMenuShortcuts() -> bool""" | |
4813 | return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) | |
d14a1e28 | 4814 | |
e811c8ce RD |
4815 | def PyApp_GetMacAboutMenuItemId(*args, **kwargs): |
4816 | """PyApp_GetMacAboutMenuItemId() -> long""" | |
4817 | return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs) | |
d14a1e28 | 4818 | |
e811c8ce RD |
4819 | def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs): |
4820 | """PyApp_GetMacPreferencesMenuItemId() -> long""" | |
4821 | return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) | |
d14a1e28 | 4822 | |
e811c8ce RD |
4823 | def PyApp_GetMacExitMenuItemId(*args, **kwargs): |
4824 | """PyApp_GetMacExitMenuItemId() -> long""" | |
4825 | return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs) | |
d14a1e28 | 4826 | |
e811c8ce | 4827 | def PyApp_GetMacHelpMenuTitleName(*args, **kwargs): |
196addbf | 4828 | """PyApp_GetMacHelpMenuTitleName() -> String""" |
e811c8ce | 4829 | return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) |
d14a1e28 | 4830 | |
e811c8ce RD |
4831 | def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs): |
4832 | """PyApp_SetMacSupportPCMenuShortcuts(bool val)""" | |
4833 | return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) | |
d14a1e28 | 4834 | |
e811c8ce RD |
4835 | def PyApp_SetMacAboutMenuItemId(*args, **kwargs): |
4836 | """PyApp_SetMacAboutMenuItemId(long val)""" | |
4837 | return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs) | |
d14a1e28 | 4838 | |
e811c8ce RD |
4839 | def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs): |
4840 | """PyApp_SetMacPreferencesMenuItemId(long val)""" | |
4841 | return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) | |
d14a1e28 | 4842 | |
e811c8ce RD |
4843 | def PyApp_SetMacExitMenuItemId(*args, **kwargs): |
4844 | """PyApp_SetMacExitMenuItemId(long val)""" | |
4845 | return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs) | |
d14a1e28 | 4846 | |
e811c8ce | 4847 | def PyApp_SetMacHelpMenuTitleName(*args, **kwargs): |
196addbf | 4848 | """PyApp_SetMacHelpMenuTitleName(String val)""" |
e811c8ce | 4849 | return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) |
d14a1e28 | 4850 | |
e811c8ce | 4851 | def PyApp_GetComCtl32Version(*args, **kwargs): |
0df68c9f RD |
4852 | """ |
4853 | PyApp_GetComCtl32Version() -> int | |
6c3b4aae | 4854 | |
0df68c9f RD |
4855 | Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it |
4856 | wasn't found at all. Raises an exception on non-Windows platforms. | |
4857 | """ | |
e811c8ce | 4858 | return _core.PyApp_GetComCtl32Version(*args, **kwargs) |
d14a1e28 RD |
4859 | |
4860 | #--------------------------------------------------------------------------- | |
4861 | ||
4862 | ||
e811c8ce | 4863 | def Exit(*args, **kwargs): |
0df68c9f RD |
4864 | """ |
4865 | Exit() | |
6c3b4aae | 4866 | |
0df68c9f RD |
4867 | Force an exit of the application. Convenience for wx.GetApp().Exit() |
4868 | """ | |
e811c8ce | 4869 | return _core.Exit(*args, **kwargs) |
d14a1e28 | 4870 | |
e811c8ce | 4871 | def Yield(*args, **kwargs): |
0df68c9f RD |
4872 | """ |
4873 | Yield() -> bool | |
6c3b4aae | 4874 | |
0df68c9f RD |
4875 | Yield to other apps/messages. Convenience for wx.GetApp().Yield() |
4876 | """ | |
e811c8ce | 4877 | return _core.Yield(*args, **kwargs) |
d14a1e28 | 4878 | |
e811c8ce | 4879 | def YieldIfNeeded(*args, **kwargs): |
0df68c9f RD |
4880 | """ |
4881 | YieldIfNeeded() -> bool | |
6c3b4aae | 4882 | |
0df68c9f RD |
4883 | Yield to other apps/messages. Convenience for wx.GetApp().Yield(True) |
4884 | """ | |
e811c8ce | 4885 | return _core.YieldIfNeeded(*args, **kwargs) |
d14a1e28 | 4886 | |
e811c8ce | 4887 | def SafeYield(*args, **kwargs): |
0df68c9f RD |
4888 | """ |
4889 | SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool | |
6c3b4aae | 4890 | |
0df68c9f RD |
4891 | This function is similar to wx.Yield, except that it disables the user input |
4892 | to all program windows before calling wx.Yield and re-enables it again | |
4893 | afterwards. If win is not None, this window will remain enabled, allowing the | |
4894 | implementation of some limited user interaction. | |
6c3b4aae | 4895 | |
0df68c9f RD |
4896 | Returns the result of the call to wx.Yield. |
4897 | """ | |
e811c8ce | 4898 | return _core.SafeYield(*args, **kwargs) |
d14a1e28 | 4899 | |
e811c8ce | 4900 | def WakeUpIdle(*args, **kwargs): |
0df68c9f RD |
4901 | """ |
4902 | WakeUpIdle() | |
6c3b4aae | 4903 | |
0df68c9f RD |
4904 | Cause the message queue to become empty again, so idle events will be sent. |
4905 | """ | |
e811c8ce | 4906 | return _core.WakeUpIdle(*args, **kwargs) |
d14a1e28 | 4907 | |
e811c8ce | 4908 | def PostEvent(*args, **kwargs): |
0df68c9f RD |
4909 | """ |
4910 | PostEvent(EvtHandler dest, Event event) | |
6c3b4aae | 4911 | |
0df68c9f RD |
4912 | Send an event to a window or other wx.EvtHandler to be processed later. |
4913 | """ | |
e811c8ce | 4914 | return _core.PostEvent(*args, **kwargs) |
d14a1e28 | 4915 | |
e811c8ce | 4916 | def App_CleanUp(*args, **kwargs): |
0df68c9f RD |
4917 | """ |
4918 | App_CleanUp() | |
6c3b4aae | 4919 | |
0df68c9f RD |
4920 | For internal use only, it is used to cleanup after wxWindows when Python shuts down. |
4921 | """ | |
e811c8ce | 4922 | return _core.App_CleanUp(*args, **kwargs) |
d14a1e28 | 4923 | |
e811c8ce | 4924 | def GetApp(*args, **kwargs): |
0df68c9f RD |
4925 | """ |
4926 | GetApp() -> PyApp | |
6c3b4aae | 4927 | |
196addbf | 4928 | Return a reference to the current wx.App object. |
0df68c9f | 4929 | """ |
e811c8ce | 4930 | return _core.GetApp(*args, **kwargs) |
d14a1e28 RD |
4931 | #---------------------------------------------------------------------- |
4932 | ||
4933 | class PyOnDemandOutputWindow: | |
6c3b4aae RD |
4934 | """ |
4935 | A class that can be used for redirecting Python's stdout and | |
4936 | stderr streams. It will do nothing until something is wrriten to | |
4937 | the stream at which point it will create a Frame with a text area | |
4938 | and write the text there. | |
4939 | """ | |
d14a1e28 RD |
4940 | def __init__(self, title = "wxPython: stdout/stderr"): |
4941 | self.frame = None | |
4942 | self.title = title | |
4943 | self.parent = None | |
4944 | ||
4945 | def SetParent(self, parent): | |
6c3b4aae | 4946 | """Set the window to be used as the popup Frame's parent.""" |
d14a1e28 RD |
4947 | self.parent = parent |
4948 | ||
6c3b4aae RD |
4949 | |
4950 | def CreateOutputWindow(self, st): | |
4951 | self.frame = wx.Frame(self.parent, -1, self.title, | |
4952 | style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE) | |
196addbf RD |
4953 | self.text = wx.TextCtrl(self.frame, -1, "", |
4954 | style = wx.TE_MULTILINE | wx.TE_READONLY) | |
d1e20054 | 4955 | self.text.AppendText(st) |
6c3b4aae RD |
4956 | self.frame.SetSize((450, 300)) |
4957 | self.frame.Show(True) | |
4958 | EVT_CLOSE(self.frame, self.OnCloseWindow) | |
4959 | ||
d14a1e28 RD |
4960 | |
4961 | # These methods provide the file-like output behaviour. | |
6c3b4aae RD |
4962 | def write(self, text): |
4963 | """ | |
4964 | Create the output window if needed and write the string to it. | |
4965 | If not called in the context of the gui thread then uses | |
4966 | CallAfter to do the work there. | |
4967 | """ | |
4968 | if self.frame is None: | |
4969 | if not wx.Thread_IsMain(): | |
4970 | wx.CallAfter(self.CreateOutputWindow, text) | |
4971 | else: | |
4972 | self.CreateOutputWindow(text) | |
4973 | else: | |
4974 | if not wx.Thread_IsMain(): | |
4975 | wx.CallAfter(self.text.AppendText, text) | |
4976 | else: | |
4977 | self.text.AppendText(text) | |
4978 | ||
d14a1e28 RD |
4979 | |
4980 | def close(self): | |
6c3b4aae RD |
4981 | if self.frame is not None: |
4982 | wx.CallAfter(self.frame.Close) | |
4983 | ||
d14a1e28 | 4984 | |
6c3b4aae RD |
4985 | def OnCloseWindow(self, event): |
4986 | if self.frame is not None: | |
4987 | self.frame.Destroy() | |
4988 | self.frame = None | |
4989 | self.text = None | |
d14a1e28 RD |
4990 | |
4991 | #---------------------------------------------------------------------- | |
d14a1e28 RD |
4992 | |
4993 | _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__') | |
4994 | ||
4995 | class App(wx.PyApp): | |
6c3b4aae RD |
4996 | """ |
4997 | The main application class. Derive from this and implement an OnInit | |
4998 | method that creates a frame and then calls self.SetTopWindow(frame) | |
4999 | """ | |
d14a1e28 RD |
5000 | outputWindowClass = PyOnDemandOutputWindow |
5001 | ||
5002 | def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False): | |
5003 | wx.PyApp.__init__(self) | |
5004 | ||
5005 | if wx.Platform == "__WXMAC__": | |
5006 | try: | |
5007 | import MacOS | |
5008 | if not MacOS.WMAvailable(): | |
5009 | print """\ | |
5010 | This program needs access to the screen. Please run with 'pythonw', | |
5011 | not 'python', and only when you are logged in on the main display of | |
5012 | your Mac.""" | |
5013 | _sys.exit(1) | |
5014 | except: | |
5015 | pass | |
5016 | ||
5017 | # This has to be done before OnInit | |
5018 | self.SetUseBestVisual(useBestVisual) | |
5019 | ||
5020 | # Set the default handler for SIGINT. This fixes a problem | |
5021 | # where if Ctrl-C is pressed in the console that started this | |
5022 | # app then it will not appear to do anything, (not even send | |
5023 | # KeyboardInterrupt???) but will later segfault on exit. By | |
5024 | # setting the default handler then the app will exit, as | |
5025 | # expected (depending on platform.) | |
5026 | try: | |
5027 | import signal | |
5028 | signal.signal(signal.SIGINT, signal.SIG_DFL) | |
5029 | except: | |
5030 | pass | |
5031 | ||
5032 | # Save and redirect the stdio to a window? | |
5033 | self.stdioWin = None | |
5034 | self.saveStdio = (_sys.stdout, _sys.stderr) | |
5035 | if redirect: | |
5036 | self.RedirectStdio(filename) | |
5037 | ||
5038 | # This finishes the initialization of wxWindows and then calls | |
5039 | # the OnInit that should be present in the derived class | |
5040 | self._BootstrapApp() | |
5041 | ||
5042 | ||
5043 | def __del__(self): | |
5044 | try: | |
5045 | self.RestoreStdio() # Just in case the MainLoop was overridden | |
5046 | except: | |
5047 | pass | |
5048 | ||
5049 | ||
5050 | def SetTopWindow(self, frame): | |
1e0c8722 | 5051 | """Set the \"main\" top level window""" |
d14a1e28 RD |
5052 | if self.stdioWin: |
5053 | self.stdioWin.SetParent(frame) | |
5054 | wx.PyApp.SetTopWindow(self, frame) | |
5055 | ||
5056 | ||
5057 | def MainLoop(self): | |
1e0c8722 | 5058 | """Execute the main GUI event loop""" |
d14a1e28 RD |
5059 | wx.PyApp.MainLoop(self) |
5060 | self.RestoreStdio() | |
5061 | ||
5062 | ||
5063 | def RedirectStdio(self, filename): | |
1e0c8722 | 5064 | """Redirect sys.stdout and sys.stderr to a file or a popup window.""" |
d14a1e28 RD |
5065 | if filename: |
5066 | _sys.stdout = _sys.stderr = open(filename, 'a') | |
5067 | else: | |
5068 | self.stdioWin = self.outputWindowClass() | |
5069 | _sys.stdout = _sys.stderr = self.stdioWin | |
5070 | ||
5071 | ||
5072 | def RestoreStdio(self): | |
5073 | _sys.stdout, _sys.stderr = self.saveStdio | |
5074 | ||
5075 | ||
5076 | ||
5077 | # change from wxPyApp_ to wxApp_ | |
5078 | App_GetMacSupportPCMenuShortcuts = _core.PyApp_GetMacSupportPCMenuShortcuts | |
5079 | App_GetMacAboutMenuItemId = _core.PyApp_GetMacAboutMenuItemId | |
5080 | App_GetMacPreferencesMenuItemId = _core.PyApp_GetMacPreferencesMenuItemId | |
5081 | App_GetMacExitMenuItemId = _core.PyApp_GetMacExitMenuItemId | |
5082 | App_GetMacHelpMenuTitleName = _core.PyApp_GetMacHelpMenuTitleName | |
5083 | App_SetMacSupportPCMenuShortcuts = _core.PyApp_SetMacSupportPCMenuShortcuts | |
5084 | App_SetMacAboutMenuItemId = _core.PyApp_SetMacAboutMenuItemId | |
5085 | App_SetMacPreferencesMenuItemId = _core.PyApp_SetMacPreferencesMenuItemId | |
5086 | App_SetMacExitMenuItemId = _core.PyApp_SetMacExitMenuItemId | |
5087 | App_SetMacHelpMenuTitleName = _core.PyApp_SetMacHelpMenuTitleName | |
5088 | App_GetComCtl32Version = _core.PyApp_GetComCtl32Version | |
5089 | ||
5090 | #---------------------------------------------------------------------------- | |
5091 | ||
5092 | class PySimpleApp(wx.App): | |
6c3b4aae RD |
5093 | """ |
5094 | A simple application class. You can just create one of these and | |
5095 | then then make your top level windows later, and not have to worry | |
5096 | about OnInit.""" | |
5097 | ||
5098 | def __init__(self, redirect=False, filename=None, useBestVisual=False): | |
5099 | wx.App.__init__(self, redirect, filename, useBestVisual) | |
5100 | ||
d14a1e28 RD |
5101 | def OnInit(self): |
5102 | wx.InitAllImageHandlers() | |
5103 | return True | |
5104 | ||
5105 | ||
6c3b4aae | 5106 | # Is anybody using this one? |
d14a1e28 RD |
5107 | class PyWidgetTester(wx.App): |
5108 | def __init__(self, size = (250, 100)): | |
5109 | self.size = size | |
5110 | wx.App.__init__(self, 0) | |
5111 | ||
5112 | def OnInit(self): | |
196addbf | 5113 | self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size) |
d14a1e28 RD |
5114 | self.SetTopWindow(self.frame) |
5115 | return True | |
5116 | ||
5117 | def SetWidget(self, widgetClass, *args): | |
5118 | w = widgetClass(self.frame, *args) | |
5119 | self.frame.Show(True) | |
5120 | ||
5121 | #---------------------------------------------------------------------------- | |
5122 | # DO NOT hold any other references to this object. This is how we | |
5123 | # know when to cleanup system resources that wxWin is holding. When | |
5124 | # the sys module is unloaded, the refcount on sys.__wxPythonCleanup | |
5125 | # goes to zero and it calls the wxApp_CleanUp function. | |
5126 | ||
5127 | class __wxPyCleanup: | |
5128 | def __init__(self): | |
5129 | self.cleanup = _core.App_CleanUp | |
5130 | def __del__(self): | |
5131 | self.cleanup() | |
5132 | ||
5133 | _sys.__wxPythonCleanup = __wxPyCleanup() | |
5134 | ||
5135 | ## # another possible solution, but it gets called too early... | |
5136 | ## if sys.version[0] == '2': | |
5137 | ## import atexit | |
5138 | ## atexit.register(_core.wxApp_CleanUp) | |
5139 | ## else: | |
5140 | ## sys.exitfunc = _core.wxApp_CleanUp | |
5141 | ||
5142 | ||
5143 | #---------------------------------------------------------------------------- | |
5144 | ||
5145 | #--------------------------------------------------------------------------- | |
5146 | ||
1e0c8722 | 5147 | class AcceleratorEntry(object): |
1e0c8722 RD |
5148 | def __repr__(self): |
5149 | return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5150 | def __init__(self, *args, **kwargs): | |
5151 | """__init__(int flags=0, int keyCode=0, int cmd=0, MenuItem item=None) -> AcceleratorEntry""" | |
5152 | newobj = _core.new_AcceleratorEntry(*args, **kwargs) | |
5153 | self.this = newobj.this | |
5154 | self.thisown = 1 | |
5155 | del newobj.thisown | |
5156 | def __del__(self, destroy=_core.delete_AcceleratorEntry): | |
5157 | """__del__()""" | |
5158 | try: | |
5159 | if self.thisown: destroy(self) | |
5160 | except: pass | |
5161 | ||
5162 | def Set(*args, **kwargs): | |
5163 | """Set(int flags, int keyCode, int cmd, MenuItem item=None)""" | |
5164 | return _core.AcceleratorEntry_Set(*args, **kwargs) | |
5165 | ||
5166 | def SetMenuItem(*args, **kwargs): | |
5167 | """SetMenuItem(MenuItem item)""" | |
5168 | return _core.AcceleratorEntry_SetMenuItem(*args, **kwargs) | |
5169 | ||
5170 | def GetMenuItem(*args, **kwargs): | |
5171 | """GetMenuItem() -> MenuItem""" | |
5172 | return _core.AcceleratorEntry_GetMenuItem(*args, **kwargs) | |
5173 | ||
5174 | def GetFlags(*args, **kwargs): | |
5175 | """GetFlags() -> int""" | |
5176 | return _core.AcceleratorEntry_GetFlags(*args, **kwargs) | |
5177 | ||
5178 | def GetKeyCode(*args, **kwargs): | |
5179 | """GetKeyCode() -> int""" | |
5180 | return _core.AcceleratorEntry_GetKeyCode(*args, **kwargs) | |
5181 | ||
5182 | def GetCommand(*args, **kwargs): | |
5183 | """GetCommand() -> int""" | |
5184 | return _core.AcceleratorEntry_GetCommand(*args, **kwargs) | |
5185 | ||
5186 | ||
5187 | class AcceleratorEntryPtr(AcceleratorEntry): | |
5188 | def __init__(self, this): | |
5189 | self.this = this | |
5190 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5191 | self.__class__ = AcceleratorEntry | |
5192 | _core.AcceleratorEntry_swigregister(AcceleratorEntryPtr) | |
5193 | ||
5194 | class AcceleratorTable(Object): | |
1e0c8722 RD |
5195 | def __repr__(self): |
5196 | return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5197 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
5198 | """ |
5199 | __init__(entries) -> AcceleratorTable | |
1e0c8722 | 5200 | |
0df68c9f RD |
5201 | Construct an AcceleratorTable from a list of AcceleratorEntry items or |
5202 | 3-tuples (flags, keyCode, cmdID) | |
5203 | """ | |
1e0c8722 RD |
5204 | newobj = _core.new_AcceleratorTable(*args, **kwargs) |
5205 | self.this = newobj.this | |
5206 | self.thisown = 1 | |
5207 | del newobj.thisown | |
5208 | def __del__(self, destroy=_core.delete_AcceleratorTable): | |
5209 | """__del__()""" | |
5210 | try: | |
5211 | if self.thisown: destroy(self) | |
5212 | except: pass | |
5213 | ||
5214 | def Ok(*args, **kwargs): | |
5215 | """Ok() -> bool""" | |
5216 | return _core.AcceleratorTable_Ok(*args, **kwargs) | |
5217 | ||
5218 | ||
5219 | class AcceleratorTablePtr(AcceleratorTable): | |
5220 | def __init__(self, this): | |
5221 | self.this = this | |
5222 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5223 | self.__class__ = AcceleratorTable | |
5224 | _core.AcceleratorTable_swigregister(AcceleratorTablePtr) | |
5225 | ||
5226 | ||
5227 | def GetAccelFromString(*args, **kwargs): | |
196addbf | 5228 | """GetAccelFromString(String label) -> AcceleratorEntry""" |
1e0c8722 RD |
5229 | return _core.GetAccelFromString(*args, **kwargs) |
5230 | #--------------------------------------------------------------------------- | |
5231 | ||
d14a1e28 | 5232 | class Window(EvtHandler): |
15afbcd0 RD |
5233 | """ |
5234 | wx.Window is the base class for all windows and represents any visible | |
5235 | object on the screen. All controls, top level windows and so on are | |
5236 | wx.Windows. Sizers and device contexts are not however, as they don't | |
5237 | appear on screen themselves. | |
5238 | ||
5239 | """ | |
e811c8ce RD |
5240 | def __repr__(self): |
5241 | return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5242 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
5243 | """ |
5244 | __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
196addbf | 5245 | long style=0, String name=PanelNameStr) -> Window |
15afbcd0 RD |
5246 | |
5247 | Construct and show a generic Window. | |
0df68c9f | 5248 | """ |
d14a1e28 RD |
5249 | newobj = _core.new_Window(*args, **kwargs) |
5250 | self.this = newobj.this | |
5251 | self.thisown = 1 | |
5252 | del newobj.thisown | |
5253 | self._setOORInfo(self) | |
d14a1e28 | 5254 | |
e811c8ce | 5255 | def Create(*args, **kwargs): |
0df68c9f RD |
5256 | """ |
5257 | Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
196addbf | 5258 | long style=0, String name=PanelNameStr) -> bool |
15afbcd0 RD |
5259 | |
5260 | Create the GUI part of the Window for 2-phase creation mode. | |
0df68c9f | 5261 | """ |
e811c8ce | 5262 | return _core.Window_Create(*args, **kwargs) |
d14a1e28 | 5263 | |
e811c8ce | 5264 | def Close(*args, **kwargs): |
15afbcd0 RD |
5265 | """ |
5266 | Close(bool force=False) -> bool | |
5267 | ||
5268 | This function simply generates a EVT_CLOSE event whose handler usually | |
5269 | tries to close the window. It doesn't close the window itself, | |
5270 | however. If force is False (the default) then the window's close | |
5271 | handler will be allowed to veto the destruction of the window. | |
5272 | ||
5273 | Usually Close is only used with the top level windows (wx.Frame and | |
5274 | wx.Dialog classes) as the others are not supposed to have any special | |
5275 | EVT_CLOSE logic. | |
5276 | ||
5277 | The close handler should check whether the window is being deleted | |
5278 | forcibly, using wx.CloseEvent.GetForce, in which case it should | |
5279 | destroy the window using wx.Window.Destroy. | |
5280 | ||
5281 | Note that calling Close does not guarantee that the window will be | |
5282 | destroyed; but it provides a way to simulate a manual close of a | |
5283 | window, which may or may not be implemented by destroying the | |
5284 | window. The default EVT_CLOSE handler for wx.Dialog does not | |
5285 | necessarily delete the dialog, since it will simply simulate an | |
5286 | wxID_CANCEL event which is handled by the appropriate button event | |
5287 | handler and may do anything at all. | |
5288 | ||
5289 | To guarantee that the window will be destroyed, call wx.Window.Destroy | |
5290 | instead. | |
5291 | """ | |
e811c8ce | 5292 | return _core.Window_Close(*args, **kwargs) |
d14a1e28 | 5293 | |
e811c8ce | 5294 | def Destroy(*args, **kwargs): |
0df68c9f RD |
5295 | """ |
5296 | Destroy() -> bool | |
d14a1e28 | 5297 | |
15afbcd0 RD |
5298 | Destroys the window safely. Frames and dialogs are not destroyed |
5299 | immediately when this function is called -- they are added to a list | |
5300 | of windows to be deleted on idle time, when all the window's events | |
5301 | have been processed. This prevents problems with events being sent to | |
5302 | non-existent windows. | |
5303 | ||
5304 | Returns True if the window has either been successfully deleted, or it | |
5305 | has been added to the list of windows pending real deletion. | |
0df68c9f | 5306 | """ |
e811c8ce | 5307 | return _core.Window_Destroy(*args, **kwargs) |
d14a1e28 | 5308 | |
e811c8ce | 5309 | def DestroyChildren(*args, **kwargs): |
15afbcd0 RD |
5310 | """ |
5311 | DestroyChildren() -> bool | |
5312 | ||
5313 | Destroys all children of a window. Called automatically by the destructor. | |
5314 | """ | |
e811c8ce | 5315 | return _core.Window_DestroyChildren(*args, **kwargs) |
d14a1e28 | 5316 | |
e811c8ce | 5317 | def IsBeingDeleted(*args, **kwargs): |
15afbcd0 RD |
5318 | """ |
5319 | IsBeingDeleted() -> bool | |
5320 | ||
5321 | Is the window in the process of being deleted? | |
5322 | """ | |
e811c8ce | 5323 | return _core.Window_IsBeingDeleted(*args, **kwargs) |
d14a1e28 | 5324 | |
e811c8ce | 5325 | def SetTitle(*args, **kwargs): |
15afbcd0 RD |
5326 | """ |
5327 | SetTitle(String title) | |
5328 | ||
5329 | Sets the window's title. Applicable only to frames and dialogs. | |
5330 | """ | |
e811c8ce | 5331 | return _core.Window_SetTitle(*args, **kwargs) |
d14a1e28 | 5332 | |
e811c8ce | 5333 | def GetTitle(*args, **kwargs): |
15afbcd0 RD |
5334 | """ |
5335 | GetTitle() -> String | |
5336 | ||
5337 | Gets the window's title. Applicable only to frames and dialogs. | |
5338 | """ | |
e811c8ce | 5339 | return _core.Window_GetTitle(*args, **kwargs) |
d14a1e28 | 5340 | |
e811c8ce | 5341 | def SetLabel(*args, **kwargs): |
15afbcd0 RD |
5342 | """ |
5343 | SetLabel(String label) | |
5344 | ||
5345 | Set the text which the window shows in its label if applicable. | |
5346 | """ | |
e811c8ce | 5347 | return _core.Window_SetLabel(*args, **kwargs) |
d14a1e28 | 5348 | |
e811c8ce | 5349 | def GetLabel(*args, **kwargs): |
15afbcd0 RD |
5350 | """ |
5351 | GetLabel() -> String | |
5352 | ||
5353 | Generic way of getting a label from any window, for identification | |
5354 | purposes. The interpretation of this function differs from class to | |
5355 | class. For frames and dialogs, the value returned is the title. For | |
5356 | buttons or static text controls, it is the button text. This function | |
5357 | can be useful for meta-programs (such as testing tools or | |
5358 | special-needs access programs) which need to identify windows by name. | |
5359 | """ | |
e811c8ce | 5360 | return _core.Window_GetLabel(*args, **kwargs) |
d14a1e28 | 5361 | |
e811c8ce | 5362 | def SetName(*args, **kwargs): |
15afbcd0 RD |
5363 | """ |
5364 | SetName(String name) | |
5365 | ||
5366 | Sets the window's name. The window name is used for ressource setting | |
5367 | in X, it is not the same as the window title/label | |
5368 | """ | |
e811c8ce | 5369 | return _core.Window_SetName(*args, **kwargs) |
d14a1e28 | 5370 | |
e811c8ce | 5371 | def GetName(*args, **kwargs): |
15afbcd0 RD |
5372 | """ |
5373 | GetName() -> String | |
5374 | ||
5375 | Returns the window's name. This name is not guaranteed to be unique; | |
5376 | it is up to the programmer to supply an appropriate name in the window | |
5377 | constructor or via wx.Window.SetName. | |
5378 | """ | |
e811c8ce | 5379 | return _core.Window_GetName(*args, **kwargs) |
d14a1e28 | 5380 | |
e811c8ce | 5381 | def SetId(*args, **kwargs): |
15afbcd0 RD |
5382 | """ |
5383 | SetId(int winid) | |
5384 | ||
5385 | Sets the identifier of the window. Each window has an integer | |
5386 | identifier. If the application has not provided one, an identifier | |
5387 | will be generated. Normally, the identifier should be provided on | |
5388 | creation and should not be modified subsequently. | |
5389 | """ | |
e811c8ce | 5390 | return _core.Window_SetId(*args, **kwargs) |
d14a1e28 | 5391 | |
e811c8ce | 5392 | def GetId(*args, **kwargs): |
15afbcd0 RD |
5393 | """ |
5394 | GetId() -> int | |
5395 | ||
5396 | Returns the identifier of the window. Each window has an integer | |
5397 | identifier. If the application has not provided one (or the default Id | |
5398 | -1 is used) then an unique identifier with a negative value will be | |
5399 | generated. | |
5400 | """ | |
e811c8ce | 5401 | return _core.Window_GetId(*args, **kwargs) |
d14a1e28 | 5402 | |
e811c8ce | 5403 | def NewControlId(*args, **kwargs): |
15afbcd0 RD |
5404 | """ |
5405 | NewControlId() -> int | |
5406 | ||
5407 | Generate a control id for the controls which were not given one. | |
5408 | """ | |
e811c8ce | 5409 | return _core.Window_NewControlId(*args, **kwargs) |
d14a1e28 | 5410 | |
e811c8ce RD |
5411 | NewControlId = staticmethod(NewControlId) |
5412 | def NextControlId(*args, **kwargs): | |
15afbcd0 RD |
5413 | """ |
5414 | NextControlId(int winid) -> int | |
5415 | ||
5416 | Get the id of the control following the one with the given | |
5417 | (autogenerated) id | |
5418 | """ | |
e811c8ce | 5419 | return _core.Window_NextControlId(*args, **kwargs) |
d14a1e28 | 5420 | |
e811c8ce RD |
5421 | NextControlId = staticmethod(NextControlId) |
5422 | def PrevControlId(*args, **kwargs): | |
15afbcd0 RD |
5423 | """ |
5424 | PrevControlId(int winid) -> int | |
5425 | ||
5426 | Get the id of the control preceding the one with the given | |
5427 | (autogenerated) id | |
5428 | """ | |
e811c8ce | 5429 | return _core.Window_PrevControlId(*args, **kwargs) |
d14a1e28 | 5430 | |
e811c8ce RD |
5431 | PrevControlId = staticmethod(PrevControlId) |
5432 | def SetSize(*args, **kwargs): | |
15afbcd0 RD |
5433 | """ |
5434 | SetSize(Size size) | |
5435 | ||
5436 | Sets the size of the window in pixels. | |
5437 | """ | |
e811c8ce | 5438 | return _core.Window_SetSize(*args, **kwargs) |
d14a1e28 | 5439 | |
e811c8ce | 5440 | def SetDimensions(*args, **kwargs): |
15afbcd0 RD |
5441 | """ |
5442 | SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) | |
5443 | ||
5444 | Sets the position and size of the window in pixels. The sizeFlags | |
5445 | parameter indicates the interpretation of the other params if they are | |
5446 | -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default | |
5447 | shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be | |
5448 | used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow | |
5449 | dimensions of -1 and less to be interpreted as real dimensions, not | |
5450 | default values. | |
5451 | """ | |
e811c8ce | 5452 | return _core.Window_SetDimensions(*args, **kwargs) |
d14a1e28 | 5453 | |
e811c8ce | 5454 | def SetRect(*args, **kwargs): |
15afbcd0 RD |
5455 | """ |
5456 | SetRect(Rect rect, int sizeFlags=SIZE_AUTO) | |
5457 | ||
5458 | Sets the position and size of the window in pixels using a wx.Rect. | |
5459 | """ | |
e811c8ce | 5460 | return _core.Window_SetRect(*args, **kwargs) |
d14a1e28 | 5461 | |
e811c8ce | 5462 | def SetSizeWH(*args, **kwargs): |
15afbcd0 RD |
5463 | """ |
5464 | SetSizeWH(int width, int height) | |
5465 | ||
5466 | Sets the size of the window in pixels. | |
5467 | """ | |
e811c8ce | 5468 | return _core.Window_SetSizeWH(*args, **kwargs) |
d14a1e28 | 5469 | |
e811c8ce | 5470 | def Move(*args, **kwargs): |
15afbcd0 RD |
5471 | """ |
5472 | Move(Point pt, int flags=SIZE_USE_EXISTING) | |
5473 | ||
5474 | Moves the window to the given position. | |
5475 | """ | |
e811c8ce | 5476 | return _core.Window_Move(*args, **kwargs) |
d14a1e28 | 5477 | |
e811c8ce RD |
5478 | SetPosition = Move |
5479 | def MoveXY(*args, **kwargs): | |
15afbcd0 RD |
5480 | """ |
5481 | MoveXY(int x, int y, int flags=SIZE_USE_EXISTING) | |
5482 | ||
5483 | Moves the window to the given position. | |
5484 | """ | |
e811c8ce RD |
5485 | return _core.Window_MoveXY(*args, **kwargs) |
5486 | ||
5487 | def Raise(*args, **kwargs): | |
15afbcd0 RD |
5488 | """ |
5489 | Raise() | |
5490 | ||
5491 | Raises the window to the top of the window hierarchy if it is a | |
5492 | managed window (dialog or frame). | |
5493 | """ | |
e811c8ce RD |
5494 | return _core.Window_Raise(*args, **kwargs) |
5495 | ||
5496 | def Lower(*args, **kwargs): | |
15afbcd0 RD |
5497 | """ |
5498 | Lower() | |
5499 | ||
5500 | Lowers the window to the bottom of the window hierarchy if it is a | |
5501 | managed window (dialog or frame). | |
5502 | """ | |
e811c8ce RD |
5503 | return _core.Window_Lower(*args, **kwargs) |
5504 | ||
5505 | def SetClientSize(*args, **kwargs): | |
15afbcd0 RD |
5506 | """ |
5507 | SetClientSize(Size size) | |
5508 | ||
5509 | This sets the size of the window client area in pixels. Using this | |
5510 | function to size a window tends to be more device-independent than | |
5511 | wx.Window.SetSize, since the application need not worry about what | |
5512 | dimensions the border or title bar have when trying to fit the window | |
5513 | around panel items, for example. | |
5514 | """ | |
e811c8ce RD |
5515 | return _core.Window_SetClientSize(*args, **kwargs) |
5516 | ||
5517 | def SetClientSizeWH(*args, **kwargs): | |
15afbcd0 RD |
5518 | """ |
5519 | SetClientSizeWH(int width, int height) | |
5520 | ||
5521 | This sets the size of the window client area in pixels. Using this | |
5522 | function to size a window tends to be more device-independent than | |
5523 | wx.Window.SetSize, since the application need not worry about what | |
5524 | dimensions the border or title bar have when trying to fit the window | |
5525 | around panel items, for example. | |
5526 | """ | |
e811c8ce RD |
5527 | return _core.Window_SetClientSizeWH(*args, **kwargs) |
5528 | ||
5529 | def SetClientRect(*args, **kwargs): | |
15afbcd0 RD |
5530 | """ |
5531 | SetClientRect(Rect rect) | |
5532 | ||
5533 | This sets the size of the window client area in pixels. Using this | |
5534 | function to size a window tends to be more device-independent than | |
5535 | wx.Window.SetSize, since the application need not worry about what | |
5536 | dimensions the border or title bar have when trying to fit the window | |
5537 | around panel items, for example. | |
5538 | """ | |
e811c8ce RD |
5539 | return _core.Window_SetClientRect(*args, **kwargs) |
5540 | ||
5541 | def GetPosition(*args, **kwargs): | |
0df68c9f RD |
5542 | """ |
5543 | GetPosition() -> Point | |
e811c8ce | 5544 | |
0df68c9f RD |
5545 | Get the window's position. |
5546 | """ | |
e811c8ce RD |
5547 | return _core.Window_GetPosition(*args, **kwargs) |
5548 | ||
5549 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
5550 | """ |
5551 | GetPositionTuple() -> (x,y) | |
e811c8ce | 5552 | |
0df68c9f RD |
5553 | Get the window's position. |
5554 | """ | |
e811c8ce RD |
5555 | return _core.Window_GetPositionTuple(*args, **kwargs) |
5556 | ||
5557 | def GetSize(*args, **kwargs): | |
0df68c9f RD |
5558 | """ |
5559 | GetSize() -> Size | |
e811c8ce | 5560 | |
0df68c9f RD |
5561 | Get the window size. |
5562 | """ | |
e811c8ce RD |
5563 | return _core.Window_GetSize(*args, **kwargs) |
5564 | ||
5565 | def GetSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5566 | """ |
5567 | GetSizeTuple() -> (width, height) | |
e811c8ce | 5568 | |
0df68c9f RD |
5569 | Get the window size. |
5570 | """ | |
e811c8ce RD |
5571 | return _core.Window_GetSizeTuple(*args, **kwargs) |
5572 | ||
5573 | def GetRect(*args, **kwargs): | |
15afbcd0 RD |
5574 | """ |
5575 | GetRect() -> Rect | |
5576 | ||
5577 | Returns the size and position of the window as a wx.Rect object. | |
5578 | """ | |
e811c8ce RD |
5579 | return _core.Window_GetRect(*args, **kwargs) |
5580 | ||
5581 | def GetClientSize(*args, **kwargs): | |
0df68c9f RD |
5582 | """ |
5583 | GetClientSize() -> Size | |
e811c8ce | 5584 | |
15afbcd0 RD |
5585 | This gets the size of the window's 'client area' in pixels. The client |
5586 | area is the area which may be drawn on by the programmer, excluding | |
5587 | title bar, border, scrollbars, etc. | |
0df68c9f | 5588 | """ |
e811c8ce RD |
5589 | return _core.Window_GetClientSize(*args, **kwargs) |
5590 | ||
5591 | def GetClientSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5592 | """ |
5593 | GetClientSizeTuple() -> (width, height) | |
e811c8ce | 5594 | |
15afbcd0 RD |
5595 | This gets the size of the window's 'client area' in pixels. The client |
5596 | area is the area which may be drawn on by the programmer, excluding | |
5597 | title bar, border, scrollbars, etc. | |
0df68c9f | 5598 | """ |
e811c8ce RD |
5599 | return _core.Window_GetClientSizeTuple(*args, **kwargs) |
5600 | ||
5601 | def GetClientAreaOrigin(*args, **kwargs): | |
15afbcd0 RD |
5602 | """ |
5603 | GetClientAreaOrigin() -> Point | |
5604 | ||
5605 | Get the origin of the client area of the window relative to the | |
5606 | window's top left corner (the client area may be shifted because of | |
5607 | the borders, scrollbars, other decorations...) | |
5608 | """ | |
e811c8ce RD |
5609 | return _core.Window_GetClientAreaOrigin(*args, **kwargs) |
5610 | ||
5611 | def GetClientRect(*args, **kwargs): | |
15afbcd0 RD |
5612 | """ |
5613 | GetClientRect() -> Rect | |
5614 | ||
5615 | Get the client area position and size as a wx.Rect object. | |
5616 | """ | |
e811c8ce RD |
5617 | return _core.Window_GetClientRect(*args, **kwargs) |
5618 | ||
5619 | def GetBestSize(*args, **kwargs): | |
0df68c9f RD |
5620 | """ |
5621 | GetBestSize() -> Size | |
e811c8ce | 5622 | |
15afbcd0 RD |
5623 | This functions returns the best acceptable minimal size for the |
5624 | window, if applicable. For example, for a static text control, it will be | |
5625 | the minimal size such that the control label is not truncated. For | |
5626 | windows containing subwindows (suzh aswx.Panel), the size returned | |
5627 | by this function will be the same as the size the window would have | |
5628 | had after calling Fit. | |
0df68c9f | 5629 | """ |
e811c8ce RD |
5630 | return _core.Window_GetBestSize(*args, **kwargs) |
5631 | ||
5632 | def GetBestSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5633 | """ |
5634 | GetBestSizeTuple() -> (width, height) | |
e811c8ce | 5635 | |
15afbcd0 RD |
5636 | This functions returns the best acceptable minimal size for the |
5637 | window, if applicable. For example, for a static text control, it will be | |
5638 | the minimal size such that the control label is not truncated. For | |
5639 | windows containing subwindows (suzh aswx.Panel), the size returned | |
5640 | by this function will be the same as the size the window would have | |
5641 | had after calling Fit. | |
0df68c9f | 5642 | """ |
e811c8ce RD |
5643 | return _core.Window_GetBestSizeTuple(*args, **kwargs) |
5644 | ||
5645 | def GetAdjustedBestSize(*args, **kwargs): | |
15afbcd0 RD |
5646 | """ |
5647 | GetAdjustedBestSize() -> Size | |
5648 | ||
5649 | This method is similar to GetBestSize, except in one | |
5650 | thing. GetBestSize should return the minimum untruncated size of the | |
5651 | window, while this method will return the largest of BestSize and any | |
5652 | user specified minimum size. ie. it is the minimum size the window | |
5653 | should currently be drawn at, not the minimal size it can possibly | |
5654 | tolerate. | |
5655 | """ | |
e811c8ce RD |
5656 | return _core.Window_GetAdjustedBestSize(*args, **kwargs) |
5657 | ||
5658 | def Center(*args, **kwargs): | |
15afbcd0 RD |
5659 | """ |
5660 | Center(int direction=BOTH) | |
5661 | ||
5662 | Centers the window. The parameter specifies the direction for | |
5663 | cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may | |
5664 | also include wx.CENTER_ON_SCREEN flag if you want to center the window | |
5665 | on the entire screen and not on its parent window. If it is a | |
5666 | top-level window and has no parent then it will always be centered | |
5667 | relative to the screen. | |
5668 | """ | |
e811c8ce RD |
5669 | return _core.Window_Center(*args, **kwargs) |
5670 | ||
5671 | Centre = Center | |
5672 | def CenterOnScreen(*args, **kwargs): | |
15afbcd0 RD |
5673 | """ |
5674 | CenterOnScreen(int dir=BOTH) | |
5675 | ||
5676 | Center on screen (only works for top level windows) | |
5677 | """ | |
e811c8ce RD |
5678 | return _core.Window_CenterOnScreen(*args, **kwargs) |
5679 | ||
5680 | CentreOnScreen = CenterOnScreen | |
5681 | def CenterOnParent(*args, **kwargs): | |
15afbcd0 RD |
5682 | """ |
5683 | CenterOnParent(int dir=BOTH) | |
5684 | ||
5685 | Center with respect to the the parent window | |
5686 | """ | |
e811c8ce RD |
5687 | return _core.Window_CenterOnParent(*args, **kwargs) |
5688 | ||
5689 | CentreOnParent = CenterOnParent | |
5690 | def Fit(*args, **kwargs): | |
15afbcd0 RD |
5691 | """ |
5692 | Fit() | |
5693 | ||
5694 | Sizes the window so that it fits around its subwindows. This function | |
5695 | won't do anything if there are no subwindows and will only really work | |
5696 | correctly if sizers are used for the subwindows layout. Also, if the | |
5697 | window has exactly one subwindow it is better (faster and the result | |
5698 | is more precise as Fit adds some margin to account for fuzziness of | |
5699 | its calculations) to call window.SetClientSize(child.GetSize()) | |
5700 | instead of calling Fit. | |
5701 | """ | |
e811c8ce RD |
5702 | return _core.Window_Fit(*args, **kwargs) |
5703 | ||
5704 | def FitInside(*args, **kwargs): | |
15afbcd0 RD |
5705 | """ |
5706 | FitInside() | |
5707 | ||
5708 | Similar to Fit, but sizes the interior (virtual) size of a | |
5709 | window. Mainly useful with scrolled windows to reset scrollbars after | |
5710 | sizing changes that do not trigger a size event, and/or scrolled | |
5711 | windows without an interior sizer. This function similarly won't do | |
5712 | anything if there are no subwindows. | |
5713 | """ | |
e811c8ce RD |
5714 | return _core.Window_FitInside(*args, **kwargs) |
5715 | ||
5716 | def SetSizeHints(*args, **kwargs): | |
0df68c9f RD |
5717 | """ |
5718 | SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, | |
5719 | int incH=-1) | |
15afbcd0 RD |
5720 | |
5721 | Allows specification of minimum and maximum window sizes, and window | |
5722 | size increments. If a pair of values is not set (or set to -1), the | |
5723 | default values will be used. If this function is called, the user | |
5724 | will not be able to size the window outside the given bounds. The | |
5725 | resizing increments are only significant under Motif or Xt. | |
0df68c9f | 5726 | """ |
e811c8ce RD |
5727 | return _core.Window_SetSizeHints(*args, **kwargs) |
5728 | ||
5729 | def SetVirtualSizeHints(*args, **kwargs): | |
15afbcd0 RD |
5730 | """ |
5731 | SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1) | |
5732 | ||
5733 | Allows specification of minimum and maximum virtual window sizes. If a | |
5734 | pair of values is not set (or set to -1), the default values will be | |
5735 | used. If this function is called, the user will not be able to size | |
5736 | the virtual area of the window outside the given bounds. | |
5737 | """ | |
e811c8ce RD |
5738 | return _core.Window_SetVirtualSizeHints(*args, **kwargs) |
5739 | ||
5740 | def GetMinWidth(*args, **kwargs): | |
5741 | """GetMinWidth() -> int""" | |
5742 | return _core.Window_GetMinWidth(*args, **kwargs) | |
5743 | ||
5744 | def GetMinHeight(*args, **kwargs): | |
5745 | """GetMinHeight() -> int""" | |
5746 | return _core.Window_GetMinHeight(*args, **kwargs) | |
5747 | ||
5748 | def GetMaxWidth(*args, **kwargs): | |
5749 | """GetMaxWidth() -> int""" | |
5750 | return _core.Window_GetMaxWidth(*args, **kwargs) | |
5751 | ||
5752 | def GetMaxHeight(*args, **kwargs): | |
5753 | """GetMaxHeight() -> int""" | |
5754 | return _core.Window_GetMaxHeight(*args, **kwargs) | |
5755 | ||
5756 | def GetMaxSize(*args, **kwargs): | |
5757 | """GetMaxSize() -> Size""" | |
5758 | return _core.Window_GetMaxSize(*args, **kwargs) | |
5759 | ||
5760 | def SetVirtualSize(*args, **kwargs): | |
0df68c9f RD |
5761 | """ |
5762 | SetVirtualSize(Size size) | |
e811c8ce | 5763 | |
15afbcd0 RD |
5764 | Set the the virtual size of a window in pixels. For most windows this |
5765 | is just the client area of the window, but for some like scrolled | |
5766 | windows it is more or less independent of the screen window size. | |
0df68c9f | 5767 | """ |
e811c8ce RD |
5768 | return _core.Window_SetVirtualSize(*args, **kwargs) |
5769 | ||
5770 | def SetVirtualSizeWH(*args, **kwargs): | |
0df68c9f RD |
5771 | """ |
5772 | SetVirtualSizeWH(int w, int h) | |
e811c8ce | 5773 | |
15afbcd0 RD |
5774 | Set the the virtual size of a window in pixels. For most windows this |
5775 | is just the client area of the window, but for some like scrolled | |
5776 | windows it is more or less independent of the screen window size. | |
0df68c9f | 5777 | """ |
e811c8ce RD |
5778 | return _core.Window_SetVirtualSizeWH(*args, **kwargs) |
5779 | ||
5780 | def GetVirtualSize(*args, **kwargs): | |
0df68c9f RD |
5781 | """ |
5782 | GetVirtualSize() -> Size | |
e811c8ce | 5783 | |
15afbcd0 RD |
5784 | Get the the virtual size of the window in pixels. For most windows |
5785 | this is just the client area of the window, but for some like scrolled | |
5786 | windows it is more or less independent of the screen window size. | |
0df68c9f | 5787 | """ |
e811c8ce RD |
5788 | return _core.Window_GetVirtualSize(*args, **kwargs) |
5789 | ||
5790 | def GetVirtualSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5791 | """ |
5792 | GetVirtualSizeTuple() -> (width, height) | |
e811c8ce | 5793 | |
15afbcd0 RD |
5794 | Get the the virtual size of the window in pixels. For most windows |
5795 | this is just the client area of the window, but for some like scrolled | |
5796 | windows it is more or less independent of the screen window size. | |
0df68c9f | 5797 | """ |
e811c8ce RD |
5798 | return _core.Window_GetVirtualSizeTuple(*args, **kwargs) |
5799 | ||
5800 | def GetBestVirtualSize(*args, **kwargs): | |
15afbcd0 RD |
5801 | """ |
5802 | GetBestVirtualSize() -> Size | |
5803 | ||
5804 | Return the largest of ClientSize and BestSize (as determined by a | |
5805 | sizer, interior children, or other means) | |
5806 | """ | |
e811c8ce RD |
5807 | return _core.Window_GetBestVirtualSize(*args, **kwargs) |
5808 | ||
5809 | def Show(*args, **kwargs): | |
15afbcd0 RD |
5810 | """ |
5811 | Show(bool show=True) -> bool | |
5812 | ||
5813 | Shows or hides the window. You may need to call Raise for a top level | |
5814 | window if you want to bring it to top, although this is not needed if | |
5815 | Show is called immediately after the frame creation. Returns True if | |
5816 | the window has been shown or hidden or False if nothing was done | |
5817 | because it already was in the requested state. | |
5818 | """ | |
e811c8ce RD |
5819 | return _core.Window_Show(*args, **kwargs) |
5820 | ||
5821 | def Hide(*args, **kwargs): | |
15afbcd0 RD |
5822 | """ |
5823 | Hide() -> bool | |
5824 | ||
5825 | Equivalent to calling Show(False). | |
5826 | """ | |
e811c8ce RD |
5827 | return _core.Window_Hide(*args, **kwargs) |
5828 | ||
5829 | def Enable(*args, **kwargs): | |
15afbcd0 RD |
5830 | """ |
5831 | Enable(bool enable=True) -> bool | |
5832 | ||
5833 | Enable or disable the window for user input. Note that when a parent | |
5834 | window is disabled, all of its children are disabled as well and they | |
5835 | are reenabled again when the parent is. Returns true if the window | |
5836 | has been enabled or disabled, false if nothing was done, i.e. if the | |
5837 | window had already been in the specified state. | |
5838 | """ | |
e811c8ce RD |
5839 | return _core.Window_Enable(*args, **kwargs) |
5840 | ||
5841 | def Disable(*args, **kwargs): | |
15afbcd0 RD |
5842 | """ |
5843 | Disable() -> bool | |
5844 | ||
5845 | Disables the window, same as Enable(false). | |
5846 | """ | |
e811c8ce RD |
5847 | return _core.Window_Disable(*args, **kwargs) |
5848 | ||
5849 | def IsShown(*args, **kwargs): | |
15afbcd0 RD |
5850 | """ |
5851 | IsShown() -> bool | |
5852 | ||
5853 | Returns true if the window is shown, false if it has been hidden. | |
5854 | """ | |
e811c8ce RD |
5855 | return _core.Window_IsShown(*args, **kwargs) |
5856 | ||
5857 | def IsEnabled(*args, **kwargs): | |
15afbcd0 RD |
5858 | """ |
5859 | IsEnabled() -> bool | |
5860 | ||
5861 | Returns true if the window is enabled for input, false otherwise. | |
5862 | """ | |
e811c8ce RD |
5863 | return _core.Window_IsEnabled(*args, **kwargs) |
5864 | ||
5865 | def SetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 RD |
5866 | """ |
5867 | SetWindowStyleFlag(long style) | |
5868 | ||
5869 | Sets the style of the window. Please note that some styles cannot be | |
5870 | changed after the window creation and that Refresh() might be called | |
5871 | after changing the others for the change to take place immediately. | |
5872 | """ | |
e811c8ce RD |
5873 | return _core.Window_SetWindowStyleFlag(*args, **kwargs) |
5874 | ||
5875 | def GetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 RD |
5876 | """ |
5877 | GetWindowStyleFlag() -> long | |
e811c8ce | 5878 | |
15afbcd0 RD |
5879 | Gets the window style that was passed to the constructor or Create |
5880 | method. | |
5881 | """ | |
5882 | return _core.Window_GetWindowStyleFlag(*args, **kwargs) | |
e811c8ce | 5883 | |
15afbcd0 | 5884 | SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag |
e811c8ce | 5885 | def HasFlag(*args, **kwargs): |
15afbcd0 RD |
5886 | """ |
5887 | HasFlag(int flag) -> bool | |
5888 | ||
5889 | Test if the given style is set for this window. | |
5890 | """ | |
e811c8ce RD |
5891 | return _core.Window_HasFlag(*args, **kwargs) |
5892 | ||
5893 | def IsRetained(*args, **kwargs): | |
15afbcd0 RD |
5894 | """ |
5895 | IsRetained() -> bool | |
5896 | ||
5897 | Returns true if the window is retained, false otherwise. Retained | |
5898 | windows are only available on X platforms. | |
5899 | """ | |
e811c8ce RD |
5900 | return _core.Window_IsRetained(*args, **kwargs) |
5901 | ||
5902 | def SetExtraStyle(*args, **kwargs): | |
15afbcd0 RD |
5903 | """ |
5904 | SetExtraStyle(long exStyle) | |
5905 | ||
5906 | Sets the extra style bits for the window. Extra styles are the less | |
5907 | often used style bits which can't be set with the constructor or with | |
5908 | SetWindowStyleFlag() | |
5909 | """ | |
e811c8ce RD |
5910 | return _core.Window_SetExtraStyle(*args, **kwargs) |
5911 | ||
5912 | def GetExtraStyle(*args, **kwargs): | |
15afbcd0 RD |
5913 | """ |
5914 | GetExtraStyle() -> long | |
5915 | ||
5916 | Returns the extra style bits for the window. | |
5917 | """ | |
e811c8ce RD |
5918 | return _core.Window_GetExtraStyle(*args, **kwargs) |
5919 | ||
5920 | def MakeModal(*args, **kwargs): | |
15afbcd0 RD |
5921 | """ |
5922 | MakeModal(bool modal=True) | |
5923 | ||
5924 | Disables all other windows in the application so that the user can | |
5925 | only interact with this window. Passing False will reverse this | |
5926 | effect. | |
5927 | """ | |
e811c8ce RD |
5928 | return _core.Window_MakeModal(*args, **kwargs) |
5929 | ||
5930 | def SetThemeEnabled(*args, **kwargs): | |
15afbcd0 RD |
5931 | """ |
5932 | SetThemeEnabled(bool enableTheme) | |
5933 | ||
5934 | This function tells a window if it should use the system's "theme" | |
5935 | code to draw the windows' background instead if its own background | |
5936 | drawing code. This will only have an effect on platforms that support | |
5937 | the notion of themes in user defined windows. One such platform is | |
5938 | GTK+ where windows can have (very colourful) backgrounds defined by a | |
5939 | user's selected theme. | |
5940 | ||
5941 | Dialogs, notebook pages and the status bar have this flag set to true | |
5942 | by default so that the default look and feel is simulated best. | |
5943 | """ | |
e811c8ce RD |
5944 | return _core.Window_SetThemeEnabled(*args, **kwargs) |
5945 | ||
5946 | def GetThemeEnabled(*args, **kwargs): | |
15afbcd0 RD |
5947 | """ |
5948 | GetThemeEnabled() -> bool | |
e811c8ce | 5949 | |
15afbcd0 RD |
5950 | Return the themeEnabled flag. |
5951 | """ | |
5952 | return _core.Window_GetThemeEnabled(*args, **kwargs) | |
e811c8ce RD |
5953 | |
5954 | def SetFocus(*args, **kwargs): | |
15afbcd0 RD |
5955 | """ |
5956 | SetFocus() | |
5957 | ||
5958 | Set's the focus to this window, allowing it to receive keyboard input. | |
5959 | """ | |
e811c8ce RD |
5960 | return _core.Window_SetFocus(*args, **kwargs) |
5961 | ||
5962 | def SetFocusFromKbd(*args, **kwargs): | |
15afbcd0 RD |
5963 | """ |
5964 | SetFocusFromKbd() | |
5965 | ||
5966 | Set focus to this window as the result of a keyboard action. Normally | |
5967 | only called internally. | |
5968 | """ | |
e811c8ce RD |
5969 | return _core.Window_SetFocusFromKbd(*args, **kwargs) |
5970 | ||
5971 | def FindFocus(*args, **kwargs): | |
15afbcd0 RD |
5972 | """ |
5973 | FindFocus() -> Window | |
5974 | ||
5975 | Returns the window or control that currently has the keyboard focus, | |
5976 | or None. | |
5977 | """ | |
e811c8ce RD |
5978 | return _core.Window_FindFocus(*args, **kwargs) |
5979 | ||
5980 | FindFocus = staticmethod(FindFocus) | |
5981 | def AcceptsFocus(*args, **kwargs): | |
15afbcd0 RD |
5982 | """ |
5983 | AcceptsFocus() -> bool | |
5984 | ||
5985 | Can this window have focus? | |
5986 | """ | |
e811c8ce RD |
5987 | return _core.Window_AcceptsFocus(*args, **kwargs) |
5988 | ||
5989 | def AcceptsFocusFromKeyboard(*args, **kwargs): | |
15afbcd0 RD |
5990 | """ |
5991 | AcceptsFocusFromKeyboard() -> bool | |
5992 | ||
5993 | Can this window be given focus by keyboard navigation? if not, the | |
5994 | only way to give it focus (provided it accepts it at all) is to click | |
5995 | it. | |
5996 | """ | |
e811c8ce RD |
5997 | return _core.Window_AcceptsFocusFromKeyboard(*args, **kwargs) |
5998 | ||
5999 | def GetDefaultItem(*args, **kwargs): | |
15afbcd0 RD |
6000 | """ |
6001 | GetDefaultItem() -> Window | |
6002 | ||
6003 | Get the default child of this parent, i.e. the one which is activated | |
6004 | by pressing <Enter> such as the OK button on a wx.Dialog. | |
6005 | """ | |
e811c8ce RD |
6006 | return _core.Window_GetDefaultItem(*args, **kwargs) |
6007 | ||
6008 | def SetDefaultItem(*args, **kwargs): | |
15afbcd0 RD |
6009 | """ |
6010 | SetDefaultItem(Window child) -> Window | |
6011 | ||
6012 | Set this child as default, return the old default. | |
6013 | """ | |
e811c8ce RD |
6014 | return _core.Window_SetDefaultItem(*args, **kwargs) |
6015 | ||
6016 | def SetTmpDefaultItem(*args, **kwargs): | |
15afbcd0 RD |
6017 | """ |
6018 | SetTmpDefaultItem(Window win) | |
6019 | ||
6020 | Set this child as temporary default | |
6021 | """ | |
e811c8ce RD |
6022 | return _core.Window_SetTmpDefaultItem(*args, **kwargs) |
6023 | ||
6024 | def GetChildren(*args, **kwargs): | |
15afbcd0 RD |
6025 | """ |
6026 | GetChildren() -> PyObject | |
6027 | ||
6028 | Returns a list of the window's children. NOTE: Currently this is a | |
6029 | copy of the child window list maintained by the window, so the return | |
6030 | value of this function is only valid as long as the window's children | |
6031 | do not change. | |
6032 | """ | |
e811c8ce RD |
6033 | return _core.Window_GetChildren(*args, **kwargs) |
6034 | ||
6035 | def GetParent(*args, **kwargs): | |
15afbcd0 RD |
6036 | """ |
6037 | GetParent() -> Window | |
6038 | ||
6039 | Returns the parent window of this window, or None if there isn't one. | |
6040 | """ | |
e811c8ce RD |
6041 | return _core.Window_GetParent(*args, **kwargs) |
6042 | ||
6043 | def GetGrandParent(*args, **kwargs): | |
15afbcd0 RD |
6044 | """ |
6045 | GetGrandParent() -> Window | |
6046 | ||
6047 | Returns the parent of the parent of this window, or None if there isn't one. | |
6048 | """ | |
e811c8ce RD |
6049 | return _core.Window_GetGrandParent(*args, **kwargs) |
6050 | ||
6051 | def IsTopLevel(*args, **kwargs): | |
15afbcd0 RD |
6052 | """ |
6053 | IsTopLevel() -> bool | |
6054 | ||
6055 | Returns true if the given window is a top-level one. Currently all | |
6056 | frames and dialogs are always considered to be top-level windows (even | |
6057 | if they have a parent window). | |
6058 | """ | |
e811c8ce RD |
6059 | return _core.Window_IsTopLevel(*args, **kwargs) |
6060 | ||
6061 | def Reparent(*args, **kwargs): | |
15afbcd0 RD |
6062 | """ |
6063 | Reparent(Window newParent) -> bool | |
6064 | ||
6065 | Reparents the window, i.e the window will be removed from its current | |
6066 | parent window (e.g. a non-standard toolbar in a wxFrame) and then | |
6067 | re-inserted into another. Available on Windows and GTK. Returns True | |
6068 | if the parent was changed, False otherwise (error or newParent == | |
6069 | oldParent) | |
6070 | """ | |
e811c8ce RD |
6071 | return _core.Window_Reparent(*args, **kwargs) |
6072 | ||
6073 | def AddChild(*args, **kwargs): | |
15afbcd0 RD |
6074 | """ |
6075 | AddChild(Window child) | |
6076 | ||
6077 | Adds a child window. This is called automatically by window creation | |
6078 | functions so should not be required by the application programmer. | |
6079 | """ | |
e811c8ce RD |
6080 | return _core.Window_AddChild(*args, **kwargs) |
6081 | ||
6082 | def RemoveChild(*args, **kwargs): | |
15afbcd0 RD |
6083 | """ |
6084 | RemoveChild(Window child) | |
6085 | ||
6086 | Removes a child window. This is called automatically by window | |
6087 | deletion functions so should not be required by the application | |
6088 | programmer. | |
6089 | """ | |
e811c8ce RD |
6090 | return _core.Window_RemoveChild(*args, **kwargs) |
6091 | ||
6092 | def FindWindowById(*args, **kwargs): | |
15afbcd0 RD |
6093 | """ |
6094 | FindWindowById(long winid) -> Window | |
6095 | ||
6096 | Find a chld of this window by window ID | |
6097 | """ | |
e811c8ce RD |
6098 | return _core.Window_FindWindowById(*args, **kwargs) |
6099 | ||
6100 | def FindWindowByName(*args, **kwargs): | |
15afbcd0 RD |
6101 | """ |
6102 | FindWindowByName(String name) -> Window | |
6103 | ||
6104 | Find a child of this window by name | |
6105 | """ | |
e811c8ce RD |
6106 | return _core.Window_FindWindowByName(*args, **kwargs) |
6107 | ||
6108 | def GetEventHandler(*args, **kwargs): | |
15afbcd0 RD |
6109 | """ |
6110 | GetEventHandler() -> EvtHandler | |
6111 | ||
6112 | Returns the event handler for this window. By default, the window is | |
6113 | its own event handler. | |
6114 | """ | |
e811c8ce RD |
6115 | return _core.Window_GetEventHandler(*args, **kwargs) |
6116 | ||
6117 | def SetEventHandler(*args, **kwargs): | |
15afbcd0 RD |
6118 | """ |
6119 | SetEventHandler(EvtHandler handler) | |
6120 | ||
6121 | Sets the event handler for this window. An event handler is an object | |
6122 | that is capable of processing the events sent to a window. By default, | |
6123 | the window is its own event handler, but an application may wish to | |
6124 | substitute another, for example to allow central implementation of | |
6125 | event-handling for a variety of different window classes. | |
6126 | ||
6127 | It is usually better to use wx.Window.PushEventHandler since this sets | |
6128 | up a chain of event handlers, where an event not handled by one event | |
6129 | handler is handed to the next one in the chain. | |
6130 | """ | |
e811c8ce RD |
6131 | return _core.Window_SetEventHandler(*args, **kwargs) |
6132 | ||
6133 | def PushEventHandler(*args, **kwargs): | |
15afbcd0 RD |
6134 | """ |
6135 | PushEventHandler(EvtHandler handler) | |
6136 | ||
6137 | Pushes this event handler onto the event handler stack for the window. | |
6138 | An event handler is an object that is capable of processing the events | |
6139 | sent to a window. By default, the window is its own event handler, but | |
6140 | an application may wish to substitute another, for example to allow | |
6141 | central implementation of event-handling for a variety of different | |
6142 | window classes. | |
6143 | ||
6144 | wx.Window.PushEventHandler allows an application to set up a chain of | |
6145 | event handlers, where an event not handled by one event handler is | |
6146 | handed to the next one in the chain. Use wx.Window.PopEventHandler to | |
6147 | remove the event handler. | |
6148 | """ | |
e811c8ce RD |
6149 | return _core.Window_PushEventHandler(*args, **kwargs) |
6150 | ||
6151 | def PopEventHandler(*args, **kwargs): | |
15afbcd0 RD |
6152 | """ |
6153 | PopEventHandler(bool deleteHandler=False) -> EvtHandler | |
6154 | ||
6155 | Removes and returns the top-most event handler on the event handler | |
6156 | stack. If deleteHandler is True then the wx.EvtHandler object will be | |
6157 | destroyed after it is popped. | |
6158 | """ | |
e811c8ce RD |
6159 | return _core.Window_PopEventHandler(*args, **kwargs) |
6160 | ||
6161 | def RemoveEventHandler(*args, **kwargs): | |
15afbcd0 RD |
6162 | """ |
6163 | RemoveEventHandler(EvtHandler handler) -> bool | |
6164 | ||
6165 | Find the given handler in the event handler chain and remove (but | |
6166 | not delete) it from the event handler chain, return True if it was | |
6167 | found and False otherwise (this also results in an assert failure so | |
6168 | this function should only be called when the handler is supposed to | |
6169 | be there.) | |
6170 | """ | |
e811c8ce RD |
6171 | return _core.Window_RemoveEventHandler(*args, **kwargs) |
6172 | ||
6173 | def SetValidator(*args, **kwargs): | |
15afbcd0 RD |
6174 | """ |
6175 | SetValidator(Validator validator) | |
6176 | ||
6177 | Deletes the current validator (if any) and sets the window validator, | |
6178 | having called wx.Validator.Clone to create a new validator of this | |
6179 | type. | |
6180 | """ | |
e811c8ce RD |
6181 | return _core.Window_SetValidator(*args, **kwargs) |
6182 | ||
6183 | def GetValidator(*args, **kwargs): | |
15afbcd0 RD |
6184 | """ |
6185 | GetValidator() -> Validator | |
6186 | ||
6187 | Returns a pointer to the current validator for the window, or None if | |
6188 | there is none. | |
6189 | """ | |
e811c8ce RD |
6190 | return _core.Window_GetValidator(*args, **kwargs) |
6191 | ||
6192 | def SetAcceleratorTable(*args, **kwargs): | |
15afbcd0 RD |
6193 | """ |
6194 | SetAcceleratorTable(AcceleratorTable accel) | |
6195 | ||
6196 | Sets the accelerator table for this window. | |
6197 | """ | |
e811c8ce RD |
6198 | return _core.Window_SetAcceleratorTable(*args, **kwargs) |
6199 | ||
6200 | def GetAcceleratorTable(*args, **kwargs): | |
15afbcd0 RD |
6201 | """ |
6202 | GetAcceleratorTable() -> AcceleratorTable | |
6203 | ||
6204 | Gets the accelerator table for this window. | |
6205 | """ | |
e811c8ce RD |
6206 | return _core.Window_GetAcceleratorTable(*args, **kwargs) |
6207 | ||
6208 | def RegisterHotKey(*args, **kwargs): | |
15afbcd0 RD |
6209 | """ |
6210 | RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool | |
6211 | ||
6212 | Registers a system wide hotkey. Every time the user presses the hotkey | |
6213 | registered here, this window will receive a hotkey event. It will | |
6214 | receive the event even if the application is in the background and | |
6215 | does not have the input focus because the user is working with some | |
6216 | other application. To bind an event handler function to this hotkey | |
6217 | use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the | |
6218 | hotkey was registered successfully. | |
6219 | """ | |
e811c8ce RD |
6220 | return _core.Window_RegisterHotKey(*args, **kwargs) |
6221 | ||
6222 | def UnregisterHotKey(*args, **kwargs): | |
15afbcd0 RD |
6223 | """ |
6224 | UnregisterHotKey(int hotkeyId) -> bool | |
6225 | ||
6226 | Unregisters a system wide hotkey. | |
6227 | """ | |
e811c8ce RD |
6228 | return _core.Window_UnregisterHotKey(*args, **kwargs) |
6229 | ||
6230 | def ConvertDialogPointToPixels(*args, **kwargs): | |
15afbcd0 RD |
6231 | """ |
6232 | ConvertDialogPointToPixels(Point pt) -> Point | |
6233 | ||
6234 | Converts a point or size from dialog units to pixels. Dialog units | |
6235 | are used for maintaining a dialog's proportions even if the font | |
6236 | changes. For the x dimension, the dialog units are multiplied by the | |
6237 | average character width and then divided by 4. For the y dimension, | |
6238 | the dialog units are multiplied by the average character height and | |
6239 | then divided by 8. | |
6240 | """ | |
e811c8ce RD |
6241 | return _core.Window_ConvertDialogPointToPixels(*args, **kwargs) |
6242 | ||
6243 | def ConvertDialogSizeToPixels(*args, **kwargs): | |
15afbcd0 RD |
6244 | """ |
6245 | ConvertDialogSizeToPixels(Size sz) -> Size | |
6246 | ||
6247 | Converts a point or size from dialog units to pixels. Dialog units | |
6248 | are used for maintaining a dialog's proportions even if the font | |
6249 | changes. For the x dimension, the dialog units are multiplied by the | |
6250 | average character width and then divided by 4. For the y dimension, | |
6251 | the dialog units are multiplied by the average character height and | |
6252 | then divided by 8. | |
6253 | """ | |
e811c8ce RD |
6254 | return _core.Window_ConvertDialogSizeToPixels(*args, **kwargs) |
6255 | ||
6256 | def DLG_PNT(*args, **kwargs): | |
15afbcd0 RD |
6257 | """ |
6258 | DLG_PNT(Point pt) -> Point | |
6259 | ||
6260 | Converts a point or size from dialog units to pixels. Dialog units | |
6261 | are used for maintaining a dialog's proportions even if the font | |
6262 | changes. For the x dimension, the dialog units are multiplied by the | |
6263 | average character width and then divided by 4. For the y dimension, | |
6264 | the dialog units are multiplied by the average character height and | |
6265 | then divided by 8. | |
6266 | """ | |
e811c8ce RD |
6267 | return _core.Window_DLG_PNT(*args, **kwargs) |
6268 | ||
6269 | def DLG_SZE(*args, **kwargs): | |
15afbcd0 RD |
6270 | """ |
6271 | DLG_SZE(Size sz) -> Size | |
6272 | ||
6273 | Converts a point or size from dialog units to pixels. Dialog units | |
6274 | are used for maintaining a dialog's proportions even if the font | |
6275 | changes. For the x dimension, the dialog units are multiplied by the | |
6276 | average character width and then divided by 4. For the y dimension, | |
6277 | the dialog units are multiplied by the average character height and | |
6278 | then divided by 8. | |
6279 | """ | |
e811c8ce RD |
6280 | return _core.Window_DLG_SZE(*args, **kwargs) |
6281 | ||
6282 | def ConvertPixelPointToDialog(*args, **kwargs): | |
6283 | """ConvertPixelPointToDialog(Point pt) -> Point""" | |
6284 | return _core.Window_ConvertPixelPointToDialog(*args, **kwargs) | |
6285 | ||
6286 | def ConvertPixelSizeToDialog(*args, **kwargs): | |
6287 | """ConvertPixelSizeToDialog(Size sz) -> Size""" | |
6288 | return _core.Window_ConvertPixelSizeToDialog(*args, **kwargs) | |
6289 | ||
6290 | def WarpPointer(*args, **kwargs): | |
15afbcd0 RD |
6291 | """ |
6292 | WarpPointer(int x, int y) | |
6293 | ||
6294 | Moves the pointer to the given position on the window. | |
6295 | ||
6296 | NOTE: This function is not supported under Mac because Apple Human | |
6297 | Interface Guidelines forbid moving the mouse cursor programmatically. | |
6298 | """ | |
e811c8ce RD |
6299 | return _core.Window_WarpPointer(*args, **kwargs) |
6300 | ||
6301 | def CaptureMouse(*args, **kwargs): | |
15afbcd0 RD |
6302 | """ |
6303 | CaptureMouse() | |
6304 | ||
6305 | Directs all mouse input to this window. Call wx.Window.ReleaseMouse to | |
6306 | release the capture. | |
6307 | ||
6308 | Note that wxWindows maintains the stack of windows having captured the | |
6309 | mouse and when the mouse is released the capture returns to the window | |
6310 | which had had captured it previously and it is only really released if | |
6311 | there were no previous window. In particular, this means that you must | |
6312 | release the mouse as many times as you capture it. | |
6313 | """ | |
e811c8ce RD |
6314 | return _core.Window_CaptureMouse(*args, **kwargs) |
6315 | ||
6316 | def ReleaseMouse(*args, **kwargs): | |
15afbcd0 RD |
6317 | """ |
6318 | ReleaseMouse() | |
6319 | ||
6320 | Releases mouse input captured with wx.Window.CaptureMouse. | |
6321 | """ | |
e811c8ce RD |
6322 | return _core.Window_ReleaseMouse(*args, **kwargs) |
6323 | ||
6324 | def GetCapture(*args, **kwargs): | |
15afbcd0 RD |
6325 | """ |
6326 | GetCapture() -> Window | |
6327 | ||
6328 | Returns the window which currently captures the mouse or None | |
6329 | """ | |
e811c8ce RD |
6330 | return _core.Window_GetCapture(*args, **kwargs) |
6331 | ||
6332 | GetCapture = staticmethod(GetCapture) | |
6333 | def HasCapture(*args, **kwargs): | |
15afbcd0 RD |
6334 | """ |
6335 | HasCapture() -> bool | |
6336 | ||
6337 | Returns true if this window has the current mouse capture. | |
6338 | """ | |
e811c8ce RD |
6339 | return _core.Window_HasCapture(*args, **kwargs) |
6340 | ||
6341 | def Refresh(*args, **kwargs): | |
15afbcd0 RD |
6342 | """ |
6343 | Refresh(bool eraseBackground=True, Rect rect=None) | |
6344 | ||
6345 | Mark the specified rectangle (or the whole window) as "dirty" so it | |
6346 | will be repainted. Causes an EVT_PAINT event to be generated and sent | |
6347 | to the window. | |
6348 | """ | |
e811c8ce RD |
6349 | return _core.Window_Refresh(*args, **kwargs) |
6350 | ||
6351 | def RefreshRect(*args, **kwargs): | |
15afbcd0 RD |
6352 | """ |
6353 | RefreshRect(Rect rect) | |
6354 | ||
6355 | Redraws the contents of the given rectangle: the area inside it will | |
6356 | be repainted. This is the same as Refresh but has a nicer syntax. | |
6357 | """ | |
e811c8ce RD |
6358 | return _core.Window_RefreshRect(*args, **kwargs) |
6359 | ||
6360 | def Update(*args, **kwargs): | |
15afbcd0 RD |
6361 | """ |
6362 | Update() | |
6363 | ||
6364 | Calling this method immediately repaints the invalidated area of the | |
6365 | window instead of waiting for the EVT_PAINT event to happen, (normally | |
6366 | this would usually only happen when the flow of control returns to the | |
6367 | event loop.) Notice that this function doesn't refresh the window and | |
6368 | does nothing if the window has been already repainted. Use Refresh | |
6369 | first if you want to immediately redraw the window (or some portion of | |
6370 | it) unconditionally. | |
6371 | """ | |
e811c8ce RD |
6372 | return _core.Window_Update(*args, **kwargs) |
6373 | ||
6374 | def ClearBackground(*args, **kwargs): | |
15afbcd0 RD |
6375 | """ |
6376 | ClearBackground() | |
6377 | ||
6378 | Clears the window by filling it with the current background | |
6379 | colour. Does not cause an erase background event to be generated. | |
6380 | """ | |
e811c8ce RD |
6381 | return _core.Window_ClearBackground(*args, **kwargs) |
6382 | ||
6383 | def Freeze(*args, **kwargs): | |
15afbcd0 RD |
6384 | """ |
6385 | Freeze() | |
6386 | ||
6387 | Freezes the window or, in other words, prevents any updates from | |
6388 | taking place on screen, the window is not redrawn at all. Thaw must be | |
6389 | called to reenable window redrawing. | |
6390 | ||
6391 | This method is useful for visual appearance optimization (for example, | |
6392 | it is a good idea to use it before inserting large amount of text into | |
6393 | a wxTextCtrl under wxGTK) but is not implemented on all platforms nor | |
6394 | for all controls so it is mostly just a hint to wxWindows and not a | |
6395 | mandatory directive. | |
6396 | """ | |
e811c8ce RD |
6397 | return _core.Window_Freeze(*args, **kwargs) |
6398 | ||
6399 | def Thaw(*args, **kwargs): | |
15afbcd0 RD |
6400 | """ |
6401 | Thaw() | |
6402 | ||
6403 | Reenables window updating after a previous call to Freeze. | |
6404 | """ | |
e811c8ce RD |
6405 | return _core.Window_Thaw(*args, **kwargs) |
6406 | ||
6407 | def PrepareDC(*args, **kwargs): | |
15afbcd0 RD |
6408 | """ |
6409 | PrepareDC(DC dc) | |
6410 | ||
6411 | Call this function to prepare the device context for drawing a | |
6412 | scrolled image. It sets the device origin according to the current | |
6413 | scroll position. | |
6414 | """ | |
e811c8ce RD |
6415 | return _core.Window_PrepareDC(*args, **kwargs) |
6416 | ||
6417 | def GetUpdateRegion(*args, **kwargs): | |
15afbcd0 RD |
6418 | """ |
6419 | GetUpdateRegion() -> Region | |
6420 | ||
6421 | Returns the region specifying which parts of the window have been | |
6422 | damaged. Should only be called within an EVT_PAINT handler. | |
6423 | """ | |
e811c8ce RD |
6424 | return _core.Window_GetUpdateRegion(*args, **kwargs) |
6425 | ||
6426 | def GetUpdateClientRect(*args, **kwargs): | |
15afbcd0 RD |
6427 | """ |
6428 | GetUpdateClientRect() -> Rect | |
6429 | ||
6430 | Get the update rectangle region bounding box in client coords. | |
6431 | """ | |
e811c8ce RD |
6432 | return _core.Window_GetUpdateClientRect(*args, **kwargs) |
6433 | ||
6434 | def IsExposed(*args, **kwargs): | |
15afbcd0 RD |
6435 | """ |
6436 | IsExposed(int x, int y, int w=1, int h=1) -> bool | |
6437 | ||
6438 | Returns true if the given point or rectangle area has been exposed | |
6439 | since the last repaint. Call this in an paint event handler to | |
6440 | optimize redrawing by only redrawing those areas, which have been | |
6441 | exposed. | |
6442 | """ | |
e811c8ce RD |
6443 | return _core.Window_IsExposed(*args, **kwargs) |
6444 | ||
6445 | def IsExposedPoint(*args, **kwargs): | |
15afbcd0 RD |
6446 | """ |
6447 | IsExposedPoint(Point pt) -> bool | |
6448 | ||
6449 | Returns true if the given point or rectangle area has been exposed | |
6450 | since the last repaint. Call this in an paint event handler to | |
6451 | optimize redrawing by only redrawing those areas, which have been | |
6452 | exposed. | |
6453 | """ | |
e811c8ce RD |
6454 | return _core.Window_IsExposedPoint(*args, **kwargs) |
6455 | ||
6456 | def isExposedRect(*args, **kwargs): | |
15afbcd0 RD |
6457 | """ |
6458 | isExposedRect(Rect rect) -> bool | |
6459 | ||
6460 | Returns true if the given point or rectangle area has been exposed | |
6461 | since the last repaint. Call this in an paint event handler to | |
6462 | optimize redrawing by only redrawing those areas, which have been | |
6463 | exposed. | |
6464 | """ | |
e811c8ce RD |
6465 | return _core.Window_isExposedRect(*args, **kwargs) |
6466 | ||
6467 | def SetBackgroundColour(*args, **kwargs): | |
15afbcd0 RD |
6468 | """ |
6469 | SetBackgroundColour(Colour colour) -> bool | |
6470 | ||
6471 | Sets the background colour of the window. Returns True if the colour | |
6472 | was changed. The background colour is usually painted by the default | |
6473 | EVT_ERASE_BACKGROUND event handler function under Windows and | |
6474 | automatically under GTK. | |
6475 | ||
6476 | Note that setting the background colour does not cause an immediate | |
6477 | refresh, so you may wish to call ClearBackground or Refresh after | |
6478 | calling this function. | |
6479 | ||
6480 | Use this function with care under GTK+ as the new appearance of the | |
6481 | window might not look equally well when used with themes, i.e GTK+'s | |
6482 | ability to change its look as the user wishes with run-time loadable | |
6483 | modules. | |
6484 | """ | |
e811c8ce RD |
6485 | return _core.Window_SetBackgroundColour(*args, **kwargs) |
6486 | ||
6487 | def SetForegroundColour(*args, **kwargs): | |
15afbcd0 RD |
6488 | """ |
6489 | SetForegroundColour(Colour colour) -> bool | |
6490 | ||
6491 | Sets the foreground colour of the window. Returns True is the colour | |
6492 | was changed. The interpretation of foreground colour is dependent on | |
6493 | the window class; it may be the text colour or other colour, or it may | |
6494 | not be used at all. | |
6495 | """ | |
e811c8ce RD |
6496 | return _core.Window_SetForegroundColour(*args, **kwargs) |
6497 | ||
6498 | def GetBackgroundColour(*args, **kwargs): | |
15afbcd0 RD |
6499 | """ |
6500 | GetBackgroundColour() -> Colour | |
6501 | ||
6502 | Returns the background colour of the window. | |
6503 | """ | |
e811c8ce RD |
6504 | return _core.Window_GetBackgroundColour(*args, **kwargs) |
6505 | ||
6506 | def GetForegroundColour(*args, **kwargs): | |
15afbcd0 RD |
6507 | """ |
6508 | GetForegroundColour() -> Colour | |
6509 | ||
6510 | Returns the foreground colour of the window. The interpretation of | |
6511 | foreground colour is dependent on the window class; it may be the text | |
6512 | colour or other colour, or it may not be used at all. | |
6513 | """ | |
e811c8ce RD |
6514 | return _core.Window_GetForegroundColour(*args, **kwargs) |
6515 | ||
6516 | def SetCursor(*args, **kwargs): | |
15afbcd0 RD |
6517 | """ |
6518 | SetCursor(Cursor cursor) -> bool | |
6519 | ||
6520 | Sets the window's cursor. Notice that the window cursor also sets it | |
6521 | for the children of the window implicitly. | |
6522 | ||
6523 | The cursor may be wx.NullCursor in which case the window cursor will | |
6524 | be reset back to default. | |
6525 | """ | |
e811c8ce RD |
6526 | return _core.Window_SetCursor(*args, **kwargs) |
6527 | ||
6528 | def GetCursor(*args, **kwargs): | |
15afbcd0 RD |
6529 | """ |
6530 | GetCursor() -> Cursor | |
6531 | ||
6532 | Return the cursor associated with this window. | |
6533 | """ | |
e811c8ce RD |
6534 | return _core.Window_GetCursor(*args, **kwargs) |
6535 | ||
6536 | def SetFont(*args, **kwargs): | |
15afbcd0 RD |
6537 | """ |
6538 | SetFont(Font font) -> bool | |
6539 | ||
6540 | Sets the font for this window. | |
6541 | """ | |
e811c8ce RD |
6542 | return _core.Window_SetFont(*args, **kwargs) |
6543 | ||
6544 | def GetFont(*args, **kwargs): | |
15afbcd0 RD |
6545 | """ |
6546 | GetFont() -> Font | |
6547 | ||
6548 | Returns a reference to the font for this window. | |
6549 | """ | |
e811c8ce RD |
6550 | return _core.Window_GetFont(*args, **kwargs) |
6551 | ||
6552 | def SetCaret(*args, **kwargs): | |
15afbcd0 RD |
6553 | """ |
6554 | SetCaret(Caret caret) | |
6555 | ||
6556 | Sets the caret associated with the window. | |
6557 | """ | |
e811c8ce RD |
6558 | return _core.Window_SetCaret(*args, **kwargs) |
6559 | ||
6560 | def GetCaret(*args, **kwargs): | |
15afbcd0 RD |
6561 | """ |
6562 | GetCaret() -> Caret | |
6563 | ||
6564 | Returns the caret associated with the window. | |
6565 | """ | |
e811c8ce RD |
6566 | return _core.Window_GetCaret(*args, **kwargs) |
6567 | ||
6568 | def GetCharHeight(*args, **kwargs): | |
15afbcd0 RD |
6569 | """ |
6570 | GetCharHeight() -> int | |
6571 | ||
6572 | Get the (average) character size for the current font. | |
6573 | """ | |
e811c8ce RD |
6574 | return _core.Window_GetCharHeight(*args, **kwargs) |
6575 | ||
6576 | def GetCharWidth(*args, **kwargs): | |
15afbcd0 RD |
6577 | """ |
6578 | GetCharWidth() -> int | |
6579 | ||
6580 | Get the (average) character size for the current font. | |
6581 | """ | |
e811c8ce RD |
6582 | return _core.Window_GetCharWidth(*args, **kwargs) |
6583 | ||
6584 | def GetTextExtent(*args, **kwargs): | |
0df68c9f | 6585 | """ |
196addbf | 6586 | GetTextExtent(String string) -> (width, height) |
e811c8ce | 6587 | |
0df68c9f RD |
6588 | Get the width and height of the text using the current font. |
6589 | """ | |
e811c8ce RD |
6590 | return _core.Window_GetTextExtent(*args, **kwargs) |
6591 | ||
6592 | def GetFullTextExtent(*args, **kwargs): | |
0df68c9f | 6593 | """ |
196addbf | 6594 | GetFullTextExtent(String string, Font font=None) -> |
0df68c9f | 6595 | (width, height, descent, externalLeading) |
e811c8ce | 6596 | |
15afbcd0 RD |
6597 | Get the width, height, decent and leading of the text using the |
6598 | current or specified font. | |
0df68c9f | 6599 | """ |
e811c8ce RD |
6600 | return _core.Window_GetFullTextExtent(*args, **kwargs) |
6601 | ||
6602 | def ClientToScreenXY(*args, **kwargs): | |
15afbcd0 RD |
6603 | """ |
6604 | ClientToScreenXY(int x, int y) -> (x,y) | |
6605 | ||
6606 | Converts to screen coordinates from coordinates relative to this window. | |
6607 | """ | |
e811c8ce RD |
6608 | return _core.Window_ClientToScreenXY(*args, **kwargs) |
6609 | ||
6610 | def ScreenToClientXY(*args, **kwargs): | |
15afbcd0 RD |
6611 | """ |
6612 | ScreenToClientXY(int x, int y) -> (x,y) | |
6613 | ||
6614 | Converts from screen to client window coordinates. | |
6615 | """ | |
e811c8ce RD |
6616 | return _core.Window_ScreenToClientXY(*args, **kwargs) |
6617 | ||
6618 | def ClientToScreen(*args, **kwargs): | |
15afbcd0 RD |
6619 | """ |
6620 | ClientToScreen(Point pt) -> Point | |
6621 | ||
6622 | Converts to screen coordinates from coordinates relative to this window. | |
6623 | """ | |
e811c8ce RD |
6624 | return _core.Window_ClientToScreen(*args, **kwargs) |
6625 | ||
6626 | def ScreenToClient(*args, **kwargs): | |
15afbcd0 RD |
6627 | """ |
6628 | ScreenToClient(Point pt) -> Point | |
6629 | ||
6630 | Converts from screen to client window coordinates. | |
6631 | """ | |
e811c8ce RD |
6632 | return _core.Window_ScreenToClient(*args, **kwargs) |
6633 | ||
6634 | def HitTestXY(*args, **kwargs): | |
15afbcd0 RD |
6635 | """ |
6636 | HitTestXY(int x, int y) -> int | |
6637 | ||
6638 | Test where the given (in client coords) point lies | |
6639 | """ | |
e811c8ce RD |
6640 | return _core.Window_HitTestXY(*args, **kwargs) |
6641 | ||
6642 | def HitTest(*args, **kwargs): | |
15afbcd0 RD |
6643 | """ |
6644 | HitTest(Point pt) -> int | |
6645 | ||
6646 | Test where the given (in client coords) point lies | |
6647 | """ | |
e811c8ce RD |
6648 | return _core.Window_HitTest(*args, **kwargs) |
6649 | ||
15afbcd0 RD |
6650 | def GetBorder(*args): |
6651 | """ | |
6652 | GetBorder(long flags) -> int | |
6653 | GetBorder() -> int | |
e811c8ce | 6654 | |
15afbcd0 RD |
6655 | Get border for the flags of this window |
6656 | """ | |
6657 | return _core.Window_GetBorder(*args) | |
e811c8ce RD |
6658 | |
6659 | def UpdateWindowUI(*args, **kwargs): | |
15afbcd0 RD |
6660 | """ |
6661 | UpdateWindowUI(long flags=UPDATE_UI_NONE) | |
6662 | ||
6663 | This function sends EVT_UPDATE_UI events to the window. The particular | |
6664 | implementation depends on the window; for example a wx.ToolBar will | |
6665 | send an update UI event for each toolbar button, and a wx.Frame will | |
6666 | send an update UI event for each menubar menu item. You can call this | |
6667 | function from your application to ensure that your UI is up-to-date at | |
6668 | a particular point in time (as far as your EVT_UPDATE_UI handlers are | |
6669 | concerned). This may be necessary if you have called | |
6670 | wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to | |
6671 | limit the overhead that wxWindows incurs by sending update UI events | |
6672 | in idle time. | |
6673 | ||
6674 | The flags should be a bitlist of one or more of the following values: | |
6675 | ||
6676 | wx.UPDATE_UI_NONE No particular value | |
6677 | wx.UPDATE_UI_RECURSE Call the function for descendants | |
6678 | wx.UPDATE_UI_FROMIDLE Invoked from OnIdle | |
6679 | ||
6680 | If you are calling this function from an OnIdle function, make sure | |
6681 | you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to | |
6682 | only update the UI elements that need to be updated in idle time. Some | |
6683 | windows update their elements only when necessary, for example when a | |
6684 | menu is about to be shown. The following is an example of how to call | |
6685 | UpdateWindowUI from an idle function. | |
6686 | ||
6687 | def OnIdle(self, evt): | |
6688 | if wx.UpdateUIEvent.CanUpdate(self): | |
6689 | self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE); | |
6690 | ||
6691 | """ | |
e811c8ce RD |
6692 | return _core.Window_UpdateWindowUI(*args, **kwargs) |
6693 | ||
6694 | def PopupMenuXY(*args, **kwargs): | |
15afbcd0 RD |
6695 | """ |
6696 | PopupMenuXY(Menu menu, int x, int y) -> bool | |
6697 | ||
6698 | Pops up the given menu at the specified coordinates, relative to this | |
6699 | window, and returns control when the user has dismissed the menu. If a | |
6700 | menu item is selected, the corresponding menu event is generated and | |
6701 | will be processed as usual. | |
6702 | """ | |
e811c8ce RD |
6703 | return _core.Window_PopupMenuXY(*args, **kwargs) |
6704 | ||
15afbcd0 RD |
6705 | def PopupMenu(*args, **kwargs): |
6706 | """ | |
6707 | PopupMenu(Menu menu, Point pos) -> bool | |
6708 | ||
6709 | Pops up the given menu at the specified coordinates, relative to this | |
6710 | window, and returns control when the user has dismissed the menu. If a | |
6711 | menu item is selected, the corresponding menu event is generated and | |
6712 | will be processed as usual. | |
6713 | """ | |
6714 | return _core.Window_PopupMenu(*args, **kwargs) | |
6715 | ||
6716 | def GetHandle(*args, **kwargs): | |
6717 | """ | |
6718 | GetHandle() -> long | |
6719 | ||
6720 | Returns the platform-specific handle (as a long integer) of the | |
6721 | physical window. Currently on wxMac it returns the handle of the | |
6722 | toplevel parent of the window. | |
6723 | """ | |
6724 | return _core.Window_GetHandle(*args, **kwargs) | |
6725 | ||
6726 | def HasScrollbar(*args, **kwargs): | |
6727 | """ | |
6728 | HasScrollbar(int orient) -> bool | |
6729 | ||
6730 | Does the window have the scrollbar for this orientation? | |
6731 | """ | |
6732 | return _core.Window_HasScrollbar(*args, **kwargs) | |
6733 | ||
6734 | def SetScrollbar(*args, **kwargs): | |
6735 | """ | |
6736 | SetScrollbar(int orientation, int pos, int thumbvisible, int range, | |
6737 | bool refresh=True) | |
6738 | ||
6739 | Sets the scrollbar properties of a built-in scrollbar. | |
6740 | ||
6741 | orientation: Determines the scrollbar whose page size is to be | |
6742 | set. May be wx.HORIZONTAL or wx.VERTICAL. | |
6743 | ||
6744 | position: The position of the scrollbar in scroll units. | |
e811c8ce | 6745 | |
15afbcd0 RD |
6746 | thumbSize: The size of the thumb, or visible portion of the |
6747 | scrollbar, in scroll units. | |
e811c8ce | 6748 | |
15afbcd0 | 6749 | range: The maximum position of the scrollbar. |
e811c8ce | 6750 | |
15afbcd0 RD |
6751 | refresh: True to redraw the scrollbar, false otherwise. |
6752 | """ | |
e811c8ce RD |
6753 | return _core.Window_SetScrollbar(*args, **kwargs) |
6754 | ||
6755 | def SetScrollPos(*args, **kwargs): | |
15afbcd0 RD |
6756 | """ |
6757 | SetScrollPos(int orientation, int pos, bool refresh=True) | |
6758 | ||
6759 | Sets the position of one of the built-in scrollbars. | |
6760 | """ | |
e811c8ce RD |
6761 | return _core.Window_SetScrollPos(*args, **kwargs) |
6762 | ||
6763 | def GetScrollPos(*args, **kwargs): | |
15afbcd0 RD |
6764 | """ |
6765 | GetScrollPos(int orientation) -> int | |
6766 | ||
6767 | Returns the built-in scrollbar position. | |
6768 | """ | |
e811c8ce RD |
6769 | return _core.Window_GetScrollPos(*args, **kwargs) |
6770 | ||
6771 | def GetScrollThumb(*args, **kwargs): | |
15afbcd0 RD |
6772 | """ |
6773 | GetScrollThumb(int orientation) -> int | |
6774 | ||
6775 | Returns the built-in scrollbar thumb size. | |
6776 | """ | |
e811c8ce RD |
6777 | return _core.Window_GetScrollThumb(*args, **kwargs) |
6778 | ||
6779 | def GetScrollRange(*args, **kwargs): | |
15afbcd0 RD |
6780 | """ |
6781 | GetScrollRange(int orientation) -> int | |
6782 | ||
6783 | Returns the built-in scrollbar range. | |
6784 | """ | |
e811c8ce RD |
6785 | return _core.Window_GetScrollRange(*args, **kwargs) |
6786 | ||
6787 | def ScrollWindow(*args, **kwargs): | |
15afbcd0 RD |
6788 | """ |
6789 | ScrollWindow(int dx, int dy, Rect rect=None) | |
6790 | ||
6791 | Physically scrolls the pixels in the window and move child windows | |
6792 | accordingly. Use this function to optimise your scrolling | |
6793 | implementations, to minimise the area that must be redrawn. Note that | |
6794 | it is rarely required to call this function from a user program. | |
6795 | ||
6796 | dx: Amount to scroll horizontally. | |
6797 | ||
6798 | dy: Amount to scroll vertically. | |
6799 | ||
6800 | rect: Rectangle to invalidate. If this is None, the whole window | |
6801 | is invalidated. If you pass a rectangle corresponding to the | |
6802 | area of the window exposed by the scroll, your painting | |
6803 | handler can optimize painting by checking for the | |
6804 | invalidated region. | |
6805 | """ | |
e811c8ce RD |
6806 | return _core.Window_ScrollWindow(*args, **kwargs) |
6807 | ||
6808 | def ScrollLines(*args, **kwargs): | |
15afbcd0 RD |
6809 | """ |
6810 | ScrollLines(int lines) -> bool | |
6811 | ||
6812 | If the platform and window class supports it, scrolls the window by | |
6813 | the given number of lines down, if lines is positive, or up if lines | |
6814 | is negative. Returns True if the window was scrolled, False if it was | |
6815 | already on top/bottom and nothing was done. | |
6816 | """ | |
e811c8ce RD |
6817 | return _core.Window_ScrollLines(*args, **kwargs) |
6818 | ||
6819 | def ScrollPages(*args, **kwargs): | |
15afbcd0 RD |
6820 | """ |
6821 | ScrollPages(int pages) -> bool | |
6822 | ||
6823 | If the platform and window class supports it, scrolls the window by | |
6824 | the given number of pages down, if pages is positive, or up if pages | |
6825 | is negative. Returns True if the window was scrolled, False if it was | |
6826 | already on top/bottom and nothing was done. | |
6827 | """ | |
e811c8ce RD |
6828 | return _core.Window_ScrollPages(*args, **kwargs) |
6829 | ||
6830 | def LineUp(*args, **kwargs): | |
15afbcd0 RD |
6831 | """ |
6832 | LineUp() -> bool | |
6833 | ||
6834 | This is just a wrapper for ScrollLines(-1). | |
6835 | """ | |
e811c8ce RD |
6836 | return _core.Window_LineUp(*args, **kwargs) |
6837 | ||
6838 | def LineDown(*args, **kwargs): | |
15afbcd0 RD |
6839 | """ |
6840 | LineDown() -> bool | |
6841 | ||
6842 | This is just a wrapper for ScrollLines(1). | |
6843 | """ | |
e811c8ce RD |
6844 | return _core.Window_LineDown(*args, **kwargs) |
6845 | ||
6846 | def PageUp(*args, **kwargs): | |
15afbcd0 RD |
6847 | """ |
6848 | PageUp() -> bool | |
6849 | ||
6850 | This is just a wrapper for ScrollPages(-1). | |
6851 | """ | |
e811c8ce RD |
6852 | return _core.Window_PageUp(*args, **kwargs) |
6853 | ||
6854 | def PageDown(*args, **kwargs): | |
15afbcd0 RD |
6855 | """ |
6856 | PageDown() -> bool | |
6857 | ||
6858 | This is just a wrapper for ScrollPages(1). | |
6859 | """ | |
e811c8ce RD |
6860 | return _core.Window_PageDown(*args, **kwargs) |
6861 | ||
6862 | def SetHelpText(*args, **kwargs): | |
15afbcd0 RD |
6863 | """ |
6864 | SetHelpText(String text) | |
6865 | ||
6866 | Sets the help text to be used as context-sensitive help for this | |
6867 | window. Note that the text is actually stored by the current | |
6868 | wxHelpProvider implementation, and not in the window object itself. | |
6869 | """ | |
e811c8ce RD |
6870 | return _core.Window_SetHelpText(*args, **kwargs) |
6871 | ||
6872 | def SetHelpTextForId(*args, **kwargs): | |
15afbcd0 RD |
6873 | """ |
6874 | SetHelpTextForId(String text) | |
6875 | ||
6876 | Associate this help text with all windows with the same id as this | |
6877 | one. | |
6878 | """ | |
e811c8ce RD |
6879 | return _core.Window_SetHelpTextForId(*args, **kwargs) |
6880 | ||
6881 | def GetHelpText(*args, **kwargs): | |
15afbcd0 RD |
6882 | """ |
6883 | GetHelpText() -> String | |
6884 | ||
6885 | Gets the help text to be used as context-sensitive help for this | |
6886 | window. Note that the text is actually stored by the current | |
6887 | wxHelpProvider implementation, and not in the window object itself. | |
6888 | """ | |
e811c8ce RD |
6889 | return _core.Window_GetHelpText(*args, **kwargs) |
6890 | ||
6891 | def SetToolTipString(*args, **kwargs): | |
15afbcd0 RD |
6892 | """ |
6893 | SetToolTipString(String tip) | |
6894 | ||
6895 | Attach a tooltip to the window. | |
6896 | """ | |
e811c8ce RD |
6897 | return _core.Window_SetToolTipString(*args, **kwargs) |
6898 | ||
6899 | def SetToolTip(*args, **kwargs): | |
15afbcd0 RD |
6900 | """ |
6901 | SetToolTip(ToolTip tip) | |
6902 | ||
6903 | Attach a tooltip to the window. | |
6904 | """ | |
e811c8ce RD |
6905 | return _core.Window_SetToolTip(*args, **kwargs) |
6906 | ||
6907 | def GetToolTip(*args, **kwargs): | |
15afbcd0 RD |
6908 | """ |
6909 | GetToolTip() -> ToolTip | |
6910 | ||
6911 | get the associated tooltip or None if none | |
6912 | """ | |
e811c8ce RD |
6913 | return _core.Window_GetToolTip(*args, **kwargs) |
6914 | ||
6915 | def SetDropTarget(*args, **kwargs): | |
15afbcd0 RD |
6916 | """ |
6917 | SetDropTarget(DropTarget dropTarget) | |
6918 | ||
6919 | Associates a drop target with this window. If the window already has | |
6920 | a drop target, it is deleted. | |
6921 | """ | |
58203fa6 | 6922 | return _core.Window_SetDropTarget(*args, **kwargs) |
e811c8ce RD |
6923 | |
6924 | def GetDropTarget(*args, **kwargs): | |
15afbcd0 RD |
6925 | """ |
6926 | GetDropTarget() -> DropTarget | |
6927 | ||
6928 | Returns the associated drop target, which may be None. | |
6929 | """ | |
e811c8ce RD |
6930 | return _core.Window_GetDropTarget(*args, **kwargs) |
6931 | ||
6932 | def SetConstraints(*args, **kwargs): | |
15afbcd0 RD |
6933 | """ |
6934 | SetConstraints(LayoutConstraints constraints) | |
6935 | ||
6936 | Sets the window to have the given layout constraints. If an existing | |
6937 | layout constraints object is already owned by the window, it will be | |
6938 | deleted. Pass None to disassociate and delete the window's current | |
6939 | constraints. | |
6940 | ||
6941 | You must call SetAutoLayout to tell a window to use the constraints | |
6942 | automatically in its default EVT_SIZE handler; otherwise, you must | |
6943 | handle EVT_SIZE yourself and call Layout() explicitly. When setting | |
6944 | both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have | |
6945 | effect. | |
6946 | """ | |
e811c8ce RD |
6947 | return _core.Window_SetConstraints(*args, **kwargs) |
6948 | ||
6949 | def GetConstraints(*args, **kwargs): | |
15afbcd0 RD |
6950 | """ |
6951 | GetConstraints() -> LayoutConstraints | |
6952 | ||
6953 | Returns a pointer to the window's layout constraints, or None if there | |
6954 | are none. | |
6955 | """ | |
e811c8ce RD |
6956 | return _core.Window_GetConstraints(*args, **kwargs) |
6957 | ||
6958 | def SetAutoLayout(*args, **kwargs): | |
15afbcd0 RD |
6959 | """ |
6960 | SetAutoLayout(bool autoLayout) | |
6961 | ||
6962 | Determines whether the Layout function will be called automatically | |
6963 | when the window is resized. It is called implicitly by SetSizer but | |
6964 | if you use SetConstraints you should call it manually or otherwise the | |
6965 | window layout won't be correctly updated when its size changes. | |
6966 | """ | |
e811c8ce RD |
6967 | return _core.Window_SetAutoLayout(*args, **kwargs) |
6968 | ||
6969 | def GetAutoLayout(*args, **kwargs): | |
15afbcd0 RD |
6970 | """ |
6971 | GetAutoLayout() -> bool | |
6972 | ||
6973 | Returns the current autoLayout setting | |
6974 | """ | |
e811c8ce RD |
6975 | return _core.Window_GetAutoLayout(*args, **kwargs) |
6976 | ||
6977 | def Layout(*args, **kwargs): | |
15afbcd0 RD |
6978 | """ |
6979 | Layout() -> bool | |
6980 | ||
6981 | Invokes the constraint-based layout algorithm or the sizer-based | |
6982 | algorithm for this window. See SetAutoLayout: when auto layout is on, | |
6983 | this function gets called automatically by the default EVT_SIZE | |
6984 | handler when the window is resized. | |
6985 | """ | |
e811c8ce RD |
6986 | return _core.Window_Layout(*args, **kwargs) |
6987 | ||
6988 | def SetSizer(*args, **kwargs): | |
15afbcd0 RD |
6989 | """ |
6990 | SetSizer(Sizer sizer, bool deleteOld=True) | |
6991 | ||
6992 | Sets the window to have the given layout sizer. The window will then | |
6993 | own the object, and will take care of its deletion. If an existing | |
6994 | layout sizer object is already owned by the window, it will be deleted | |
6995 | if the deleteOld parameter is true. Note that this function will also | |
6996 | call SetAutoLayout implicitly with a True parameter if the sizer is | |
6997 | non-NoneL and False otherwise. | |
6998 | """ | |
e811c8ce RD |
6999 | return _core.Window_SetSizer(*args, **kwargs) |
7000 | ||
7001 | def SetSizerAndFit(*args, **kwargs): | |
15afbcd0 RD |
7002 | """ |
7003 | SetSizerAndFit(Sizer sizer, bool deleteOld=True) | |
7004 | ||
7005 | The same as SetSizer, except it also sets the size hints for the | |
7006 | window based on the sizer's minimum size. | |
7007 | """ | |
e811c8ce RD |
7008 | return _core.Window_SetSizerAndFit(*args, **kwargs) |
7009 | ||
7010 | def GetSizer(*args, **kwargs): | |
15afbcd0 RD |
7011 | """ |
7012 | GetSizer() -> Sizer | |
7013 | ||
7014 | Return the sizer associated with the window by a previous call to | |
7015 | SetSizer or None if there isn't one. | |
7016 | """ | |
e811c8ce RD |
7017 | return _core.Window_GetSizer(*args, **kwargs) |
7018 | ||
7019 | def SetContainingSizer(*args, **kwargs): | |
15afbcd0 RD |
7020 | """ |
7021 | SetContainingSizer(Sizer sizer) | |
7022 | ||
7023 | This normally does not need to be called by application code. It is | |
7024 | called internally when a window is added to a sizer, and is used so | |
7025 | the window can remove itself from the sizer when it is destroyed. | |
7026 | """ | |
e811c8ce RD |
7027 | return _core.Window_SetContainingSizer(*args, **kwargs) |
7028 | ||
7029 | def GetContainingSizer(*args, **kwargs): | |
15afbcd0 RD |
7030 | """ |
7031 | GetContainingSizer() -> Sizer | |
7032 | ||
7033 | Return the sizer that this window is a member of, if any, otherwise None. | |
7034 | """ | |
e811c8ce RD |
7035 | return _core.Window_GetContainingSizer(*args, **kwargs) |
7036 | ||
7037 | def PostCreate(self, pre): | |
15afbcd0 RD |
7038 | """ |
7039 | Phase 3 of the 2-phase create <wink!> | |
7040 | Call this method after precreating the window with the 2-phase create method. | |
7041 | """ | |
e811c8ce RD |
7042 | self.this = pre.this |
7043 | self.thisown = pre.thisown | |
7044 | pre.thisown = 0 | |
7045 | if hasattr(self, '_setOORInfo'): | |
7046 | self._setOORInfo(self) | |
7047 | if hasattr(self, '_setCallbackInfo'): | |
7048 | self._setCallbackInfo(self, self.__class__) | |
7049 | ||
7050 | ||
7051 | class WindowPtr(Window): | |
7052 | def __init__(self, this): | |
7053 | self.this = this | |
7054 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7055 | self.__class__ = Window | |
7056 | _core.Window_swigregister(WindowPtr) | |
1e0c8722 | 7057 | NullAcceleratorTable = cvar.NullAcceleratorTable |
e811c8ce RD |
7058 | PanelNameStr = cvar.PanelNameStr |
7059 | ||
7060 | def PreWindow(*args, **kwargs): | |
15afbcd0 RD |
7061 | """ |
7062 | PreWindow() -> Window | |
7063 | ||
7064 | Precreate a Window for 2-phase creation. | |
7065 | """ | |
e811c8ce RD |
7066 | val = _core.new_PreWindow(*args, **kwargs) |
7067 | val.thisown = 1 | |
7068 | return val | |
7069 | ||
7070 | def Window_NewControlId(*args, **kwargs): | |
15afbcd0 RD |
7071 | """ |
7072 | Window_NewControlId() -> int | |
7073 | ||
7074 | Generate a control id for the controls which were not given one. | |
7075 | """ | |
e811c8ce RD |
7076 | return _core.Window_NewControlId(*args, **kwargs) |
7077 | ||
7078 | def Window_NextControlId(*args, **kwargs): | |
15afbcd0 RD |
7079 | """ |
7080 | Window_NextControlId(int winid) -> int | |
7081 | ||
7082 | Get the id of the control following the one with the given | |
7083 | (autogenerated) id | |
7084 | """ | |
e811c8ce RD |
7085 | return _core.Window_NextControlId(*args, **kwargs) |
7086 | ||
7087 | def Window_PrevControlId(*args, **kwargs): | |
15afbcd0 RD |
7088 | """ |
7089 | Window_PrevControlId(int winid) -> int | |
7090 | ||
7091 | Get the id of the control preceding the one with the given | |
7092 | (autogenerated) id | |
7093 | """ | |
e811c8ce RD |
7094 | return _core.Window_PrevControlId(*args, **kwargs) |
7095 | ||
7096 | def Window_FindFocus(*args, **kwargs): | |
15afbcd0 RD |
7097 | """ |
7098 | Window_FindFocus() -> Window | |
7099 | ||
7100 | Returns the window or control that currently has the keyboard focus, | |
7101 | or None. | |
7102 | """ | |
e811c8ce RD |
7103 | return _core.Window_FindFocus(*args, **kwargs) |
7104 | ||
7105 | def Window_GetCapture(*args, **kwargs): | |
15afbcd0 RD |
7106 | """ |
7107 | Window_GetCapture() -> Window | |
7108 | ||
7109 | Returns the window which currently captures the mouse or None | |
7110 | """ | |
e811c8ce RD |
7111 | return _core.Window_GetCapture(*args, **kwargs) |
7112 | ||
7113 | def DLG_PNT(win, point_or_x, y=None): | |
15afbcd0 RD |
7114 | """ |
7115 | Convenience function for converting a Point or (x,y) in | |
7116 | dialog units to pixel units. | |
7117 | """ | |
e811c8ce RD |
7118 | if y is None: |
7119 | return win.ConvertDialogPointToPixels(point_or_x) | |
7120 | else: | |
fd3f2efe | 7121 | return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y)) |
e811c8ce RD |
7122 | |
7123 | def DLG_SZE(win, size_width, height=None): | |
15afbcd0 RD |
7124 | """ |
7125 | Convenience function for converting a Size or (w,h) in | |
7126 | dialog units to pixel units. | |
7127 | """ | |
e811c8ce RD |
7128 | if height is None: |
7129 | return win.ConvertDialogSizeToPixels(size_width) | |
7130 | else: | |
fd3f2efe | 7131 | return win.ConvertDialogSizeToPixels(wx.Size(size_width, height)) |
e811c8ce RD |
7132 | |
7133 | ||
7134 | def FindWindowById(*args, **kwargs): | |
15afbcd0 RD |
7135 | """ |
7136 | FindWindowById(long id, Window parent=None) -> Window | |
7137 | ||
7138 | Find the first window in the application with the given id. If parent | |
7139 | is None, the search will start from all top-level frames and dialog | |
7140 | boxes; if non-None, the search will be limited to the given window | |
7141 | hierarchy. The search is recursive in both cases. | |
7142 | """ | |
e811c8ce RD |
7143 | return _core.FindWindowById(*args, **kwargs) |
7144 | ||
7145 | def FindWindowByName(*args, **kwargs): | |
15afbcd0 RD |
7146 | """ |
7147 | FindWindowByName(String name, Window parent=None) -> Window | |
7148 | ||
7149 | Find a window by its name (as given in a window constructor or Create | |
7150 | function call). If parent is None, the search will start from all | |
7151 | top-level frames and dialog boxes; if non-None, the search will be | |
7152 | limited to the given window hierarchy. The search is recursive in both | |
7153 | cases. | |
7154 | ||
7155 | If no window with such name is found, wx.FindWindowByLabel is called. | |
7156 | """ | |
e811c8ce RD |
7157 | return _core.FindWindowByName(*args, **kwargs) |
7158 | ||
7159 | def FindWindowByLabel(*args, **kwargs): | |
15afbcd0 RD |
7160 | """ |
7161 | FindWindowByLabel(String label, Window parent=None) -> Window | |
7162 | ||
7163 | Find a window by its label. Depending on the type of window, the label | |
7164 | may be a window title or panel item label. If parent is None, the | |
7165 | search will start from all top-level frames and dialog boxes; if | |
7166 | non-None, the search will be limited to the given window | |
7167 | hierarchy. The search is recursive in both cases. | |
7168 | """ | |
e811c8ce RD |
7169 | return _core.FindWindowByLabel(*args, **kwargs) |
7170 | ||
7171 | def Window_FromHWND(*args, **kwargs): | |
7172 | """Window_FromHWND(unsigned long hWnd) -> Window""" | |
7173 | return _core.Window_FromHWND(*args, **kwargs) | |
7174 | #--------------------------------------------------------------------------- | |
7175 | ||
7176 | class Validator(EvtHandler): | |
e811c8ce RD |
7177 | def __repr__(self): |
7178 | return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
7179 | def __init__(self, *args, **kwargs): | |
7180 | """__init__() -> Validator""" | |
7181 | newobj = _core.new_Validator(*args, **kwargs) | |
d14a1e28 RD |
7182 | self.this = newobj.this |
7183 | self.thisown = 1 | |
7184 | del newobj.thisown | |
7185 | self._setOORInfo(self) | |
e811c8ce RD |
7186 | |
7187 | def Clone(*args, **kwargs): | |
7188 | """Clone() -> Validator""" | |
7189 | return _core.Validator_Clone(*args, **kwargs) | |
7190 | ||
7191 | def Validate(*args, **kwargs): | |
7192 | """Validate(Window parent) -> bool""" | |
7193 | return _core.Validator_Validate(*args, **kwargs) | |
7194 | ||
7195 | def TransferToWindow(*args, **kwargs): | |
7196 | """TransferToWindow() -> bool""" | |
7197 | return _core.Validator_TransferToWindow(*args, **kwargs) | |
7198 | ||
7199 | def TransferFromWindow(*args, **kwargs): | |
7200 | """TransferFromWindow() -> bool""" | |
7201 | return _core.Validator_TransferFromWindow(*args, **kwargs) | |
7202 | ||
7203 | def GetWindow(*args, **kwargs): | |
7204 | """GetWindow() -> Window""" | |
7205 | return _core.Validator_GetWindow(*args, **kwargs) | |
7206 | ||
7207 | def SetWindow(*args, **kwargs): | |
7208 | """SetWindow(Window window)""" | |
7209 | return _core.Validator_SetWindow(*args, **kwargs) | |
7210 | ||
7211 | def IsSilent(*args, **kwargs): | |
a41e16b6 | 7212 | """IsSilent() -> bool""" |
e811c8ce RD |
7213 | return _core.Validator_IsSilent(*args, **kwargs) |
7214 | ||
7215 | IsSilent = staticmethod(IsSilent) | |
7216 | def SetBellOnError(*args, **kwargs): | |
a41e16b6 | 7217 | """SetBellOnError(int doIt=True)""" |
e811c8ce RD |
7218 | return _core.Validator_SetBellOnError(*args, **kwargs) |
7219 | ||
7220 | SetBellOnError = staticmethod(SetBellOnError) | |
7221 | ||
7222 | class ValidatorPtr(Validator): | |
7223 | def __init__(self, this): | |
7224 | self.this = this | |
7225 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7226 | self.__class__ = Validator | |
7227 | _core.Validator_swigregister(ValidatorPtr) | |
7228 | ||
7229 | def Validator_IsSilent(*args, **kwargs): | |
7230 | """Validator_IsSilent() -> bool""" | |
7231 | return _core.Validator_IsSilent(*args, **kwargs) | |
7232 | ||
7233 | def Validator_SetBellOnError(*args, **kwargs): | |
7234 | """Validator_SetBellOnError(int doIt=True)""" | |
7235 | return _core.Validator_SetBellOnError(*args, **kwargs) | |
7236 | ||
7237 | class PyValidator(Validator): | |
e811c8ce RD |
7238 | def __repr__(self): |
7239 | return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
7240 | def __init__(self, *args, **kwargs): | |
7241 | """__init__() -> PyValidator""" | |
7242 | newobj = _core.new_PyValidator(*args, **kwargs) | |
7243 | self.this = newobj.this | |
7244 | self.thisown = 1 | |
7245 | del newobj.thisown | |
7246 | ||
7247 | self._setCallbackInfo(self, PyValidator, 1) | |
7248 | self._setOORInfo(self) | |
7249 | ||
7250 | def _setCallbackInfo(*args, **kwargs): | |
7251 | """_setCallbackInfo(PyObject self, PyObject _class, int incref=True)""" | |
7252 | return _core.PyValidator__setCallbackInfo(*args, **kwargs) | |
7253 | ||
7254 | ||
7255 | class PyValidatorPtr(PyValidator): | |
7256 | def __init__(self, this): | |
7257 | self.this = this | |
7258 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7259 | self.__class__ = PyValidator | |
7260 | _core.PyValidator_swigregister(PyValidatorPtr) | |
7261 | ||
7262 | #--------------------------------------------------------------------------- | |
7263 | ||
7264 | class Menu(EvtHandler): | |
d14a1e28 RD |
7265 | def __repr__(self): |
7266 | return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 7267 | def __init__(self, *args, **kwargs): |
196addbf | 7268 | """__init__(String title=EmptyString, long style=0) -> Menu""" |
e811c8ce RD |
7269 | newobj = _core.new_Menu(*args, **kwargs) |
7270 | self.this = newobj.this | |
7271 | self.thisown = 1 | |
7272 | del newobj.thisown | |
7273 | self._setOORInfo(self) | |
7274 | ||
7275 | def Append(*args, **kwargs): | |
a41e16b6 | 7276 | """Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
e811c8ce RD |
7277 | return _core.Menu_Append(*args, **kwargs) |
7278 | ||
7279 | def AppendSeparator(*args, **kwargs): | |
a41e16b6 | 7280 | """AppendSeparator() -> MenuItem""" |
e811c8ce RD |
7281 | return _core.Menu_AppendSeparator(*args, **kwargs) |
7282 | ||
7283 | def AppendCheckItem(*args, **kwargs): | |
a41e16b6 | 7284 | """AppendCheckItem(int id, String text, String help=EmptyString) -> MenuItem""" |
e811c8ce RD |
7285 | return _core.Menu_AppendCheckItem(*args, **kwargs) |
7286 | ||
7287 | def AppendRadioItem(*args, **kwargs): | |
a41e16b6 | 7288 | """AppendRadioItem(int id, String text, String help=EmptyString) -> MenuItem""" |
e811c8ce RD |
7289 | return _core.Menu_AppendRadioItem(*args, **kwargs) |
7290 | ||
7291 | def AppendMenu(*args, **kwargs): | |
a41e16b6 | 7292 | """AppendMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
e811c8ce RD |
7293 | return _core.Menu_AppendMenu(*args, **kwargs) |
7294 | ||
7295 | def AppendItem(*args, **kwargs): | |
a41e16b6 | 7296 | """AppendItem(MenuItem item) -> MenuItem""" |
e811c8ce RD |
7297 | return _core.Menu_AppendItem(*args, **kwargs) |
7298 | ||
7299 | def Break(*args, **kwargs): | |
7300 | """Break()""" | |
7301 | return _core.Menu_Break(*args, **kwargs) | |
7302 | ||
7303 | def InsertItem(*args, **kwargs): | |
a41e16b6 | 7304 | """InsertItem(size_t pos, MenuItem item) -> MenuItem""" |
e811c8ce RD |
7305 | return _core.Menu_InsertItem(*args, **kwargs) |
7306 | ||
7307 | def Insert(*args, **kwargs): | |
0df68c9f | 7308 | """ |
196addbf | 7309 | Insert(size_t pos, int id, String text, String help=EmptyString, |
a41e16b6 | 7310 | int kind=ITEM_NORMAL) -> MenuItem |
0df68c9f | 7311 | """ |
e811c8ce RD |
7312 | return _core.Menu_Insert(*args, **kwargs) |
7313 | ||
7314 | def InsertSeparator(*args, **kwargs): | |
a41e16b6 | 7315 | """InsertSeparator(size_t pos) -> MenuItem""" |
e811c8ce RD |
7316 | return _core.Menu_InsertSeparator(*args, **kwargs) |
7317 | ||
7318 | def InsertCheckItem(*args, **kwargs): | |
a41e16b6 | 7319 | """InsertCheckItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
e811c8ce RD |
7320 | return _core.Menu_InsertCheckItem(*args, **kwargs) |
7321 | ||
7322 | def InsertRadioItem(*args, **kwargs): | |
a41e16b6 | 7323 | """InsertRadioItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
e811c8ce RD |
7324 | return _core.Menu_InsertRadioItem(*args, **kwargs) |
7325 | ||
7326 | def InsertMenu(*args, **kwargs): | |
a41e16b6 | 7327 | """InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
e811c8ce RD |
7328 | return _core.Menu_InsertMenu(*args, **kwargs) |
7329 | ||
7330 | def PrependItem(*args, **kwargs): | |
a41e16b6 | 7331 | """PrependItem(MenuItem item) -> MenuItem""" |
e811c8ce RD |
7332 | return _core.Menu_PrependItem(*args, **kwargs) |
7333 | ||
7334 | def Prepend(*args, **kwargs): | |
a41e16b6 | 7335 | """Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
e811c8ce RD |
7336 | return _core.Menu_Prepend(*args, **kwargs) |
7337 | ||
7338 | def PrependSeparator(*args, **kwargs): | |
a41e16b6 | 7339 | """PrependSeparator() -> MenuItem""" |
e811c8ce RD |
7340 | return _core.Menu_PrependSeparator(*args, **kwargs) |
7341 | ||
7342 | def PrependCheckItem(*args, **kwargs): | |
a41e16b6 | 7343 | """PrependCheckItem(int id, String text, String help=EmptyString) -> MenuItem""" |
e811c8ce RD |
7344 | return _core.Menu_PrependCheckItem(*args, **kwargs) |
7345 | ||
7346 | def PrependRadioItem(*args, **kwargs): | |
a41e16b6 | 7347 | """PrependRadioItem(int id, String text, String help=EmptyString) -> MenuItem""" |
e811c8ce RD |
7348 | return _core.Menu_PrependRadioItem(*args, **kwargs) |
7349 | ||
7350 | def PrependMenu(*args, **kwargs): | |
a41e16b6 | 7351 | """PrependMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
e811c8ce RD |
7352 | return _core.Menu_PrependMenu(*args, **kwargs) |
7353 | ||
7354 | def Remove(*args, **kwargs): | |
242b7b46 | 7355 | """Remove(int id) -> MenuItem""" |
e811c8ce RD |
7356 | return _core.Menu_Remove(*args, **kwargs) |
7357 | ||
7358 | def RemoveItem(*args, **kwargs): | |
7359 | """RemoveItem(MenuItem item) -> MenuItem""" | |
7360 | return _core.Menu_RemoveItem(*args, **kwargs) | |
7361 | ||
7362 | def Delete(*args, **kwargs): | |
242b7b46 | 7363 | """Delete(int id) -> bool""" |
e811c8ce RD |
7364 | return _core.Menu_Delete(*args, **kwargs) |
7365 | ||
7366 | def DeleteItem(*args, **kwargs): | |
7367 | """DeleteItem(MenuItem item) -> bool""" | |
7368 | return _core.Menu_DeleteItem(*args, **kwargs) | |
7369 | ||
7370 | def Destroy(*args, **kwargs): | |
0df68c9f RD |
7371 | """ |
7372 | Destroy() | |
e811c8ce | 7373 | |
0df68c9f RD |
7374 | Deletes the C++ object this Python object is a proxy for. |
7375 | """ | |
e811c8ce RD |
7376 | return _core.Menu_Destroy(*args, **kwargs) |
7377 | ||
7378 | def DestroyId(*args, **kwargs): | |
0df68c9f | 7379 | """ |
242b7b46 | 7380 | DestroyId(int id) -> bool |
e811c8ce | 7381 | |
0df68c9f RD |
7382 | Deletes the C++ object this Python object is a proxy for. |
7383 | """ | |
e811c8ce RD |
7384 | return _core.Menu_DestroyId(*args, **kwargs) |
7385 | ||
7386 | def DestroyItem(*args, **kwargs): | |
0df68c9f RD |
7387 | """ |
7388 | DestroyItem(MenuItem item) -> bool | |
e811c8ce | 7389 | |
0df68c9f RD |
7390 | Deletes the C++ object this Python object is a proxy for. |
7391 | """ | |
e811c8ce RD |
7392 | return _core.Menu_DestroyItem(*args, **kwargs) |
7393 | ||
7394 | def GetMenuItemCount(*args, **kwargs): | |
7395 | """GetMenuItemCount() -> size_t""" | |
7396 | return _core.Menu_GetMenuItemCount(*args, **kwargs) | |
7397 | ||
7398 | def GetMenuItems(*args, **kwargs): | |
7399 | """GetMenuItems() -> PyObject""" | |
7400 | return _core.Menu_GetMenuItems(*args, **kwargs) | |
7401 | ||
7402 | def FindItem(*args, **kwargs): | |
196addbf | 7403 | """FindItem(String item) -> int""" |
e811c8ce RD |
7404 | return _core.Menu_FindItem(*args, **kwargs) |
7405 | ||
7406 | def FindItemById(*args, **kwargs): | |
242b7b46 | 7407 | """FindItemById(int id) -> MenuItem""" |
e811c8ce RD |
7408 | return _core.Menu_FindItemById(*args, **kwargs) |
7409 | ||
7410 | def FindItemByPosition(*args, **kwargs): | |
7411 | """FindItemByPosition(size_t position) -> MenuItem""" | |
7412 | return _core.Menu_FindItemByPosition(*args, **kwargs) | |
7413 | ||
7414 | def Enable(*args, **kwargs): | |
242b7b46 | 7415 | """Enable(int id, bool enable)""" |
e811c8ce RD |
7416 | return _core.Menu_Enable(*args, **kwargs) |
7417 | ||
7418 | def IsEnabled(*args, **kwargs): | |
242b7b46 | 7419 | """IsEnabled(int id) -> bool""" |
e811c8ce RD |
7420 | return _core.Menu_IsEnabled(*args, **kwargs) |
7421 | ||
7422 | def Check(*args, **kwargs): | |
242b7b46 | 7423 | """Check(int id, bool check)""" |
e811c8ce RD |
7424 | return _core.Menu_Check(*args, **kwargs) |
7425 | ||
7426 | def IsChecked(*args, **kwargs): | |
242b7b46 | 7427 | """IsChecked(int id) -> bool""" |
e811c8ce RD |
7428 | return _core.Menu_IsChecked(*args, **kwargs) |
7429 | ||
7430 | def SetLabel(*args, **kwargs): | |
196addbf | 7431 | """SetLabel(int id, String label)""" |
e811c8ce RD |
7432 | return _core.Menu_SetLabel(*args, **kwargs) |
7433 | ||
7434 | def GetLabel(*args, **kwargs): | |
196addbf | 7435 | """GetLabel(int id) -> String""" |
e811c8ce RD |
7436 | return _core.Menu_GetLabel(*args, **kwargs) |
7437 | ||
7438 | def SetHelpString(*args, **kwargs): | |
196addbf | 7439 | """SetHelpString(int id, String helpString)""" |
e811c8ce RD |
7440 | return _core.Menu_SetHelpString(*args, **kwargs) |
7441 | ||
7442 | def GetHelpString(*args, **kwargs): | |
196addbf | 7443 | """GetHelpString(int id) -> String""" |
e811c8ce RD |
7444 | return _core.Menu_GetHelpString(*args, **kwargs) |
7445 | ||
7446 | def SetTitle(*args, **kwargs): | |
196addbf | 7447 | """SetTitle(String title)""" |
e811c8ce RD |
7448 | return _core.Menu_SetTitle(*args, **kwargs) |
7449 | ||
7450 | def GetTitle(*args, **kwargs): | |
196addbf | 7451 | """GetTitle() -> String""" |
e811c8ce RD |
7452 | return _core.Menu_GetTitle(*args, **kwargs) |
7453 | ||
7454 | def SetEventHandler(*args, **kwargs): | |
7455 | """SetEventHandler(EvtHandler handler)""" | |
7456 | return _core.Menu_SetEventHandler(*args, **kwargs) | |
7457 | ||
7458 | def GetEventHandler(*args, **kwargs): | |
7459 | """GetEventHandler() -> EvtHandler""" | |
7460 | return _core.Menu_GetEventHandler(*args, **kwargs) | |
7461 | ||
7462 | def SetInvokingWindow(*args, **kwargs): | |
7463 | """SetInvokingWindow(Window win)""" | |
7464 | return _core.Menu_SetInvokingWindow(*args, **kwargs) | |
7465 | ||
7466 | def GetInvokingWindow(*args, **kwargs): | |
7467 | """GetInvokingWindow() -> Window""" | |
7468 | return _core.Menu_GetInvokingWindow(*args, **kwargs) | |
7469 | ||
7470 | def GetStyle(*args, **kwargs): | |
7471 | """GetStyle() -> long""" | |
7472 | return _core.Menu_GetStyle(*args, **kwargs) | |
7473 | ||
7474 | def UpdateUI(*args, **kwargs): | |
7475 | """UpdateUI(EvtHandler source=None)""" | |
7476 | return _core.Menu_UpdateUI(*args, **kwargs) | |
7477 | ||
7478 | def GetMenuBar(*args, **kwargs): | |
7479 | """GetMenuBar() -> MenuBar""" | |
7480 | return _core.Menu_GetMenuBar(*args, **kwargs) | |
7481 | ||
7482 | def Attach(*args, **kwargs): | |
7483 | """Attach(wxMenuBarBase menubar)""" | |
7484 | return _core.Menu_Attach(*args, **kwargs) | |
7485 | ||
7486 | def Detach(*args, **kwargs): | |
7487 | """Detach()""" | |
7488 | return _core.Menu_Detach(*args, **kwargs) | |
7489 | ||
7490 | def IsAttached(*args, **kwargs): | |
7491 | """IsAttached() -> bool""" | |
7492 | return _core.Menu_IsAttached(*args, **kwargs) | |
7493 | ||
7494 | def SetParent(*args, **kwargs): | |
7495 | """SetParent(Menu parent)""" | |
7496 | return _core.Menu_SetParent(*args, **kwargs) | |
7497 | ||
7498 | def GetParent(*args, **kwargs): | |
7499 | """GetParent() -> Menu""" | |
7500 | return _core.Menu_GetParent(*args, **kwargs) | |
7501 | ||
d14a1e28 RD |
7502 | |
7503 | class MenuPtr(Menu): | |
7504 | def __init__(self, this): | |
7505 | self.this = this | |
7506 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7507 | self.__class__ = Menu | |
7508 | _core.Menu_swigregister(MenuPtr) | |
7509 | DefaultValidator = cvar.DefaultValidator | |
7510 | ||
7511 | #--------------------------------------------------------------------------- | |
7512 | ||
7513 | class MenuBar(Window): | |
e811c8ce RD |
7514 | def __repr__(self): |
7515 | return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7516 | def __init__(self, *args, **kwargs): |
e811c8ce | 7517 | """__init__(long style=0) -> MenuBar""" |
d14a1e28 RD |
7518 | newobj = _core.new_MenuBar(*args, **kwargs) |
7519 | self.this = newobj.this | |
7520 | self.thisown = 1 | |
7521 | del newobj.thisown | |
7522 | self._setOORInfo(self) | |
e811c8ce RD |
7523 | |
7524 | def Append(*args, **kwargs): | |
196addbf | 7525 | """Append(Menu menu, String title) -> bool""" |
e811c8ce RD |
7526 | return _core.MenuBar_Append(*args, **kwargs) |
7527 | ||
7528 | def Insert(*args, **kwargs): | |
196addbf | 7529 | """Insert(size_t pos, Menu menu, String title) -> bool""" |
e811c8ce RD |
7530 | return _core.MenuBar_Insert(*args, **kwargs) |
7531 | ||
7532 | def GetMenuCount(*args, **kwargs): | |
7533 | """GetMenuCount() -> size_t""" | |
7534 | return _core.MenuBar_GetMenuCount(*args, **kwargs) | |
7535 | ||
7536 | def GetMenu(*args, **kwargs): | |
7537 | """GetMenu(size_t pos) -> Menu""" | |
7538 | return _core.MenuBar_GetMenu(*args, **kwargs) | |
7539 | ||
7540 | def Replace(*args, **kwargs): | |
196addbf | 7541 | """Replace(size_t pos, Menu menu, String title) -> Menu""" |
e811c8ce RD |
7542 | return _core.MenuBar_Replace(*args, **kwargs) |
7543 | ||
7544 | def Remove(*args, **kwargs): | |
7545 | """Remove(size_t pos) -> Menu""" | |
7546 | return _core.MenuBar_Remove(*args, **kwargs) | |
7547 | ||
7548 | def EnableTop(*args, **kwargs): | |
7549 | """EnableTop(size_t pos, bool enable)""" | |
7550 | return _core.MenuBar_EnableTop(*args, **kwargs) | |
7551 | ||
7552 | def IsEnabledTop(*args, **kwargs): | |
7553 | """IsEnabledTop(size_t pos) -> bool""" | |
7554 | return _core.MenuBar_IsEnabledTop(*args, **kwargs) | |
7555 | ||
7556 | def SetLabelTop(*args, **kwargs): | |
196addbf | 7557 | """SetLabelTop(size_t pos, String label)""" |
e811c8ce RD |
7558 | return _core.MenuBar_SetLabelTop(*args, **kwargs) |
7559 | ||
7560 | def GetLabelTop(*args, **kwargs): | |
196addbf | 7561 | """GetLabelTop(size_t pos) -> String""" |
e811c8ce RD |
7562 | return _core.MenuBar_GetLabelTop(*args, **kwargs) |
7563 | ||
7564 | def FindMenuItem(*args, **kwargs): | |
196addbf | 7565 | """FindMenuItem(String menu, String item) -> int""" |
e811c8ce RD |
7566 | return _core.MenuBar_FindMenuItem(*args, **kwargs) |
7567 | ||
7568 | def FindItemById(*args, **kwargs): | |
242b7b46 | 7569 | """FindItemById(int id) -> MenuItem""" |
e811c8ce RD |
7570 | return _core.MenuBar_FindItemById(*args, **kwargs) |
7571 | ||
7572 | def FindMenu(*args, **kwargs): | |
196addbf | 7573 | """FindMenu(String title) -> int""" |
e811c8ce RD |
7574 | return _core.MenuBar_FindMenu(*args, **kwargs) |
7575 | ||
7576 | def Enable(*args, **kwargs): | |
242b7b46 | 7577 | """Enable(int id, bool enable)""" |
e811c8ce RD |
7578 | return _core.MenuBar_Enable(*args, **kwargs) |
7579 | ||
7580 | def Check(*args, **kwargs): | |
242b7b46 | 7581 | """Check(int id, bool check)""" |
e811c8ce RD |
7582 | return _core.MenuBar_Check(*args, **kwargs) |
7583 | ||
7584 | def IsChecked(*args, **kwargs): | |
242b7b46 | 7585 | """IsChecked(int id) -> bool""" |
e811c8ce RD |
7586 | return _core.MenuBar_IsChecked(*args, **kwargs) |
7587 | ||
7588 | def IsEnabled(*args, **kwargs): | |
242b7b46 | 7589 | """IsEnabled(int id) -> bool""" |
e811c8ce RD |
7590 | return _core.MenuBar_IsEnabled(*args, **kwargs) |
7591 | ||
7592 | def SetLabel(*args, **kwargs): | |
196addbf | 7593 | """SetLabel(int id, String label)""" |
e811c8ce RD |
7594 | return _core.MenuBar_SetLabel(*args, **kwargs) |
7595 | ||
7596 | def GetLabel(*args, **kwargs): | |
196addbf | 7597 | """GetLabel(int id) -> String""" |
e811c8ce RD |
7598 | return _core.MenuBar_GetLabel(*args, **kwargs) |
7599 | ||
7600 | def SetHelpString(*args, **kwargs): | |
196addbf | 7601 | """SetHelpString(int id, String helpString)""" |
e811c8ce RD |
7602 | return _core.MenuBar_SetHelpString(*args, **kwargs) |
7603 | ||
7604 | def GetHelpString(*args, **kwargs): | |
196addbf | 7605 | """GetHelpString(int id) -> String""" |
e811c8ce RD |
7606 | return _core.MenuBar_GetHelpString(*args, **kwargs) |
7607 | ||
7608 | def GetFrame(*args, **kwargs): | |
7609 | """GetFrame() -> wxFrame""" | |
7610 | return _core.MenuBar_GetFrame(*args, **kwargs) | |
7611 | ||
7612 | def IsAttached(*args, **kwargs): | |
7613 | """IsAttached() -> bool""" | |
7614 | return _core.MenuBar_IsAttached(*args, **kwargs) | |
7615 | ||
7616 | def Attach(*args, **kwargs): | |
7617 | """Attach(wxFrame frame)""" | |
7618 | return _core.MenuBar_Attach(*args, **kwargs) | |
7619 | ||
7620 | def Detach(*args, **kwargs): | |
7621 | """Detach()""" | |
7622 | return _core.MenuBar_Detach(*args, **kwargs) | |
7623 | ||
d14a1e28 RD |
7624 | |
7625 | class MenuBarPtr(MenuBar): | |
7626 | def __init__(self, this): | |
7627 | self.this = this | |
7628 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7629 | self.__class__ = MenuBar | |
7630 | _core.MenuBar_swigregister(MenuBarPtr) | |
7631 | ||
7632 | #--------------------------------------------------------------------------- | |
7633 | ||
7634 | class MenuItem(Object): | |
e811c8ce RD |
7635 | def __repr__(self): |
7636 | return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7637 | def __init__(self, *args, **kwargs): |
0df68c9f | 7638 | """ |
196addbf RD |
7639 | __init__(Menu parentMenu=None, int id=ID_SEPARATOR, String text=EmptyString, |
7640 | String help=EmptyString, int kind=ITEM_NORMAL, | |
7641 | Menu subMenu=None) -> MenuItem | |
0df68c9f | 7642 | """ |
d14a1e28 RD |
7643 | newobj = _core.new_MenuItem(*args, **kwargs) |
7644 | self.this = newobj.this | |
7645 | self.thisown = 1 | |
7646 | del newobj.thisown | |
e811c8ce RD |
7647 | def GetMenu(*args, **kwargs): |
7648 | """GetMenu() -> Menu""" | |
7649 | return _core.MenuItem_GetMenu(*args, **kwargs) | |
7650 | ||
7651 | def SetMenu(*args, **kwargs): | |
7652 | """SetMenu(Menu menu)""" | |
7653 | return _core.MenuItem_SetMenu(*args, **kwargs) | |
7654 | ||
7655 | def SetId(*args, **kwargs): | |
242b7b46 | 7656 | """SetId(int id)""" |
e811c8ce RD |
7657 | return _core.MenuItem_SetId(*args, **kwargs) |
7658 | ||
7659 | def GetId(*args, **kwargs): | |
7660 | """GetId() -> int""" | |
7661 | return _core.MenuItem_GetId(*args, **kwargs) | |
7662 | ||
7663 | def IsSeparator(*args, **kwargs): | |
7664 | """IsSeparator() -> bool""" | |
7665 | return _core.MenuItem_IsSeparator(*args, **kwargs) | |
7666 | ||
7667 | def SetText(*args, **kwargs): | |
196addbf | 7668 | """SetText(String str)""" |
e811c8ce RD |
7669 | return _core.MenuItem_SetText(*args, **kwargs) |
7670 | ||
7671 | def GetLabel(*args, **kwargs): | |
196addbf | 7672 | """GetLabel() -> String""" |
e811c8ce RD |
7673 | return _core.MenuItem_GetLabel(*args, **kwargs) |
7674 | ||
7675 | def GetText(*args, **kwargs): | |
196addbf | 7676 | """GetText() -> String""" |
e811c8ce RD |
7677 | return _core.MenuItem_GetText(*args, **kwargs) |
7678 | ||
7679 | def GetLabelFromText(*args, **kwargs): | |
a41e16b6 | 7680 | """GetLabelFromText(String text) -> String""" |
e811c8ce RD |
7681 | return _core.MenuItem_GetLabelFromText(*args, **kwargs) |
7682 | ||
7683 | GetLabelFromText = staticmethod(GetLabelFromText) | |
7684 | def GetKind(*args, **kwargs): | |
196addbf | 7685 | """GetKind() -> int""" |
e811c8ce RD |
7686 | return _core.MenuItem_GetKind(*args, **kwargs) |
7687 | ||
7688 | def SetCheckable(*args, **kwargs): | |
7689 | """SetCheckable(bool checkable)""" | |
7690 | return _core.MenuItem_SetCheckable(*args, **kwargs) | |
7691 | ||
7692 | def IsCheckable(*args, **kwargs): | |
7693 | """IsCheckable() -> bool""" | |
7694 | return _core.MenuItem_IsCheckable(*args, **kwargs) | |
7695 | ||
7696 | def IsSubMenu(*args, **kwargs): | |
7697 | """IsSubMenu() -> bool""" | |
7698 | return _core.MenuItem_IsSubMenu(*args, **kwargs) | |
7699 | ||
7700 | def SetSubMenu(*args, **kwargs): | |
7701 | """SetSubMenu(Menu menu)""" | |
7702 | return _core.MenuItem_SetSubMenu(*args, **kwargs) | |
7703 | ||
7704 | def GetSubMenu(*args, **kwargs): | |
7705 | """GetSubMenu() -> Menu""" | |
7706 | return _core.MenuItem_GetSubMenu(*args, **kwargs) | |
7707 | ||
7708 | def Enable(*args, **kwargs): | |
7709 | """Enable(bool enable=True)""" | |
7710 | return _core.MenuItem_Enable(*args, **kwargs) | |
7711 | ||
7712 | def IsEnabled(*args, **kwargs): | |
7713 | """IsEnabled() -> bool""" | |
7714 | return _core.MenuItem_IsEnabled(*args, **kwargs) | |
7715 | ||
7716 | def Check(*args, **kwargs): | |
7717 | """Check(bool check=True)""" | |
7718 | return _core.MenuItem_Check(*args, **kwargs) | |
7719 | ||
7720 | def IsChecked(*args, **kwargs): | |
7721 | """IsChecked() -> bool""" | |
7722 | return _core.MenuItem_IsChecked(*args, **kwargs) | |
7723 | ||
7724 | def Toggle(*args, **kwargs): | |
7725 | """Toggle()""" | |
7726 | return _core.MenuItem_Toggle(*args, **kwargs) | |
7727 | ||
7728 | def SetHelp(*args, **kwargs): | |
196addbf | 7729 | """SetHelp(String str)""" |
e811c8ce RD |
7730 | return _core.MenuItem_SetHelp(*args, **kwargs) |
7731 | ||
7732 | def GetHelp(*args, **kwargs): | |
196addbf | 7733 | """GetHelp() -> String""" |
e811c8ce RD |
7734 | return _core.MenuItem_GetHelp(*args, **kwargs) |
7735 | ||
7736 | def GetAccel(*args, **kwargs): | |
1e0c8722 | 7737 | """GetAccel() -> AcceleratorEntry""" |
e811c8ce RD |
7738 | return _core.MenuItem_GetAccel(*args, **kwargs) |
7739 | ||
7740 | def SetAccel(*args, **kwargs): | |
1e0c8722 | 7741 | """SetAccel(AcceleratorEntry accel)""" |
e811c8ce RD |
7742 | return _core.MenuItem_SetAccel(*args, **kwargs) |
7743 | ||
7744 | def GetDefaultMarginWidth(*args, **kwargs): | |
a41e16b6 | 7745 | """GetDefaultMarginWidth() -> int""" |
e811c8ce RD |
7746 | return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs) |
7747 | ||
7748 | GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) | |
7749 | def SetBitmap(*args, **kwargs): | |
196addbf | 7750 | """SetBitmap(Bitmap bitmap)""" |
e811c8ce RD |
7751 | return _core.MenuItem_SetBitmap(*args, **kwargs) |
7752 | ||
7753 | def GetBitmap(*args, **kwargs): | |
196addbf | 7754 | """GetBitmap() -> Bitmap""" |
e811c8ce RD |
7755 | return _core.MenuItem_GetBitmap(*args, **kwargs) |
7756 | ||
d14a1e28 RD |
7757 | |
7758 | class MenuItemPtr(MenuItem): | |
7759 | def __init__(self, this): | |
7760 | self.this = this | |
7761 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7762 | self.__class__ = MenuItem | |
7763 | _core.MenuItem_swigregister(MenuItemPtr) | |
7764 | ||
e811c8ce | 7765 | def MenuItem_GetLabelFromText(*args, **kwargs): |
196addbf | 7766 | """MenuItem_GetLabelFromText(String text) -> String""" |
e811c8ce | 7767 | return _core.MenuItem_GetLabelFromText(*args, **kwargs) |
d14a1e28 | 7768 | |
e811c8ce RD |
7769 | def MenuItem_GetDefaultMarginWidth(*args, **kwargs): |
7770 | """MenuItem_GetDefaultMarginWidth() -> int""" | |
7771 | return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs) | |
d14a1e28 RD |
7772 | |
7773 | #--------------------------------------------------------------------------- | |
7774 | ||
7775 | class Control(Window): | |
15afbcd0 RD |
7776 | """ |
7777 | This is the base class for a control or 'widget'. | |
7778 | ||
7779 | A control is generally a small window which processes user input and/or | |
7780 | displays one or more item of data. | |
7781 | """ | |
e811c8ce RD |
7782 | def __repr__(self): |
7783 | return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 7784 | def __init__(self, *args, **kwargs): |
0df68c9f RD |
7785 | """ |
7786 | __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
7787 | long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 7788 | String name=ControlNameStr) -> Control |
15afbcd0 RD |
7789 | |
7790 | Create a Control. Normally you should only call this from a | |
7791 | subclass' __init__ as a plain old wx.Control is not very useful. | |
0df68c9f | 7792 | """ |
d14a1e28 RD |
7793 | newobj = _core.new_Control(*args, **kwargs) |
7794 | self.this = newobj.this | |
7795 | self.thisown = 1 | |
7796 | del newobj.thisown | |
7797 | self._setOORInfo(self) | |
e811c8ce RD |
7798 | |
7799 | def Create(*args, **kwargs): | |
0df68c9f RD |
7800 | """ |
7801 | Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, | |
7802 | long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 7803 | String name=ControlNameStr) -> bool |
15afbcd0 RD |
7804 | |
7805 | Do the 2nd phase and create the GUI control. | |
0df68c9f | 7806 | """ |
e811c8ce RD |
7807 | return _core.Control_Create(*args, **kwargs) |
7808 | ||
7809 | def Command(*args, **kwargs): | |
15afbcd0 RD |
7810 | """ |
7811 | Command(CommandEvent event) | |
7812 | ||
7813 | Simulates the effect of the user issuing a command to the | |
7814 | item. See wxCommandEvent. | |
7815 | """ | |
e811c8ce RD |
7816 | return _core.Control_Command(*args, **kwargs) |
7817 | ||
7818 | def GetLabel(*args, **kwargs): | |
15afbcd0 RD |
7819 | """ |
7820 | GetLabel() -> String | |
7821 | ||
7822 | Return a control's text. | |
7823 | """ | |
e811c8ce RD |
7824 | return _core.Control_GetLabel(*args, **kwargs) |
7825 | ||
7826 | def SetLabel(*args, **kwargs): | |
15afbcd0 RD |
7827 | """ |
7828 | SetLabel(String label) | |
7829 | ||
7830 | Sets the item's text. | |
7831 | """ | |
e811c8ce RD |
7832 | return _core.Control_SetLabel(*args, **kwargs) |
7833 | ||
d14a1e28 RD |
7834 | |
7835 | class ControlPtr(Control): | |
7836 | def __init__(self, this): | |
7837 | self.this = this | |
7838 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7839 | self.__class__ = Control | |
7840 | _core.Control_swigregister(ControlPtr) | |
b2dc1044 | 7841 | ControlNameStr = cvar.ControlNameStr |
d14a1e28 RD |
7842 | |
7843 | def PreControl(*args, **kwargs): | |
15afbcd0 RD |
7844 | """ |
7845 | PreControl() -> Control | |
7846 | ||
7847 | Precreate a Control control for 2-phase creation | |
7848 | """ | |
d14a1e28 RD |
7849 | val = _core.new_PreControl(*args, **kwargs) |
7850 | val.thisown = 1 | |
7851 | return val | |
7852 | ||
7853 | #--------------------------------------------------------------------------- | |
7854 | ||
7855 | class ItemContainer(object): | |
15afbcd0 RD |
7856 | """ |
7857 | wx.ItemContainer defines an interface which is implemented by all | |
7858 | controls which have string subitems, each of which may be | |
7859 | selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and | |
7860 | wx.ComboBox (which implements an extended interface deriving from | |
7861 | this one) | |
7862 | ||
7863 | It defines the methods for accessing the control's items and | |
7864 | although each of the derived classes implements them differently, | |
7865 | they still all conform to the same interface. | |
7866 | ||
7867 | The items in a wx.ItemContainer have (non empty) string labels | |
7868 | and, optionally, client data associated with them. | |
7869 | ||
7870 | """ | |
d14a1e28 RD |
7871 | def __init__(self): raise RuntimeError, "No constructor defined" |
7872 | def __repr__(self): | |
7873 | return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 7874 | def Append(*args, **kwargs): |
15afbcd0 RD |
7875 | """ |
7876 | Append(String item, PyObject clientData=None) -> int | |
7877 | ||
7878 | Adds the item to the control, associating the given data with the | |
7879 | item if not None. The return value is the index of the newly | |
7880 | added item which may be different from the last one if the | |
7881 | control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style). | |
7882 | """ | |
e811c8ce RD |
7883 | return _core.ItemContainer_Append(*args, **kwargs) |
7884 | ||
7885 | def AppendItems(*args, **kwargs): | |
15afbcd0 RD |
7886 | """ |
7887 | AppendItems(wxArrayString strings) | |
7888 | ||
7889 | Apend several items at once to the control. Notice that calling | |
7890 | this method may be much faster than appending the items one by | |
7891 | one if you need to add a lot of items. | |
7892 | """ | |
e811c8ce RD |
7893 | return _core.ItemContainer_AppendItems(*args, **kwargs) |
7894 | ||
7895 | def Insert(*args, **kwargs): | |
15afbcd0 RD |
7896 | """ |
7897 | Insert(String item, int pos, PyObject clientData=None) -> int | |
7898 | ||
7899 | Insert an item into the control before the item at the pos index, | |
7900 | optionally associating some data object with the item. | |
7901 | """ | |
e811c8ce RD |
7902 | return _core.ItemContainer_Insert(*args, **kwargs) |
7903 | ||
7904 | def Clear(*args, **kwargs): | |
15afbcd0 RD |
7905 | """ |
7906 | Clear() | |
7907 | ||
7908 | Removes all items from the control. | |
7909 | """ | |
e811c8ce RD |
7910 | return _core.ItemContainer_Clear(*args, **kwargs) |
7911 | ||
7912 | def Delete(*args, **kwargs): | |
15afbcd0 RD |
7913 | """ |
7914 | Delete(int n) | |
7915 | ||
7916 | Deletes the item at the zero-based index 'n' from the control. | |
7917 | Note that it is an error (signalled by a PyAssertionError | |
7918 | exception if enabled) to remove an item with the index negative | |
7919 | or greater or equal than the number of items in the control. | |
7920 | """ | |
e811c8ce RD |
7921 | return _core.ItemContainer_Delete(*args, **kwargs) |
7922 | ||
7923 | def GetCount(*args, **kwargs): | |
15afbcd0 RD |
7924 | """ |
7925 | GetCount() -> int | |
7926 | ||
7927 | Returns the number of items in the control. | |
7928 | """ | |
e811c8ce RD |
7929 | return _core.ItemContainer_GetCount(*args, **kwargs) |
7930 | ||
7931 | def IsEmpty(*args, **kwargs): | |
15afbcd0 RD |
7932 | """ |
7933 | IsEmpty() -> bool | |
7934 | ||
7935 | Returns True if the control is empty or False if it has some items. | |
7936 | """ | |
e811c8ce RD |
7937 | return _core.ItemContainer_IsEmpty(*args, **kwargs) |
7938 | ||
7939 | def GetString(*args, **kwargs): | |
15afbcd0 RD |
7940 | """ |
7941 | GetString(int n) -> String | |
7942 | ||
7943 | Returns the label of the item with the given index. | |
7944 | """ | |
e811c8ce RD |
7945 | return _core.ItemContainer_GetString(*args, **kwargs) |
7946 | ||
7947 | def GetStrings(*args, **kwargs): | |
7948 | """GetStrings() -> wxArrayString""" | |
7949 | return _core.ItemContainer_GetStrings(*args, **kwargs) | |
7950 | ||
7951 | def SetString(*args, **kwargs): | |
15afbcd0 RD |
7952 | """ |
7953 | SetString(int n, String s) | |
7954 | ||
7955 | Sets the label for the given item. | |
7956 | """ | |
e811c8ce RD |
7957 | return _core.ItemContainer_SetString(*args, **kwargs) |
7958 | ||
7959 | def FindString(*args, **kwargs): | |
15afbcd0 RD |
7960 | """ |
7961 | FindString(String s) -> int | |
7962 | ||
7963 | Finds an item whose label matches the given string. Returns the | |
7964 | zero-based position of the item, or wx.NOT_FOUND if the string | |
7965 | was not found. | |
7966 | """ | |
e811c8ce RD |
7967 | return _core.ItemContainer_FindString(*args, **kwargs) |
7968 | ||
7969 | def Select(*args, **kwargs): | |
15afbcd0 RD |
7970 | """ |
7971 | Select(int n) | |
7972 | ||
7973 | Sets the item at index 'n' to be the selected item. | |
7974 | """ | |
e811c8ce RD |
7975 | return _core.ItemContainer_Select(*args, **kwargs) |
7976 | ||
15afbcd0 | 7977 | SetSelection = Select |
e811c8ce | 7978 | def GetSelection(*args, **kwargs): |
15afbcd0 RD |
7979 | """ |
7980 | GetSelection() -> int | |
7981 | ||
7982 | Returns the index of the selected item or wx.NOT_FOUND if no item is selected. | |
7983 | """ | |
e811c8ce RD |
7984 | return _core.ItemContainer_GetSelection(*args, **kwargs) |
7985 | ||
7986 | def GetStringSelection(*args, **kwargs): | |
15afbcd0 RD |
7987 | """ |
7988 | GetStringSelection() -> String | |
7989 | ||
7990 | Returns the label of the selected item or an empty string if no item is selected. | |
7991 | """ | |
e811c8ce RD |
7992 | return _core.ItemContainer_GetStringSelection(*args, **kwargs) |
7993 | ||
7994 | def GetClientData(*args, **kwargs): | |
15afbcd0 RD |
7995 | """ |
7996 | GetClientData(int n) -> PyObject | |
7997 | ||
7998 | Returns the client data associated with the given item, (if any.) | |
7999 | """ | |
e811c8ce RD |
8000 | return _core.ItemContainer_GetClientData(*args, **kwargs) |
8001 | ||
8002 | def SetClientData(*args, **kwargs): | |
15afbcd0 RD |
8003 | """ |
8004 | SetClientData(int n, PyObject clientData) | |
8005 | ||
8006 | Associate the given client data with the item at position n. | |
8007 | """ | |
e811c8ce RD |
8008 | return _core.ItemContainer_SetClientData(*args, **kwargs) |
8009 | ||
d14a1e28 RD |
8010 | |
8011 | class ItemContainerPtr(ItemContainer): | |
8012 | def __init__(self, this): | |
8013 | self.this = this | |
8014 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8015 | self.__class__ = ItemContainer | |
8016 | _core.ItemContainer_swigregister(ItemContainerPtr) | |
8017 | ||
8018 | #--------------------------------------------------------------------------- | |
8019 | ||
8020 | class ControlWithItems(Control,ItemContainer): | |
15afbcd0 RD |
8021 | """ |
8022 | wx.ControlWithItems combines the wx.ItemContainer class with the | |
8023 | wx.Control class, and is used for the base class of various | |
8024 | controls that have items. | |
8025 | """ | |
d14a1e28 RD |
8026 | def __init__(self): raise RuntimeError, "No constructor defined" |
8027 | def __repr__(self): | |
8028 | return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
8029 | ||
8030 | class ControlWithItemsPtr(ControlWithItems): | |
8031 | def __init__(self, this): | |
8032 | self.this = this | |
8033 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8034 | self.__class__ = ControlWithItems | |
8035 | _core.ControlWithItems_swigregister(ControlWithItemsPtr) | |
8036 | ||
8037 | #--------------------------------------------------------------------------- | |
8038 | ||
8039 | class SizerItem(Object): | |
e811c8ce RD |
8040 | def __repr__(self): |
8041 | return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8042 | def __init__(self, *args, **kwargs): |
e811c8ce | 8043 | """__init__() -> SizerItem""" |
d14a1e28 RD |
8044 | newobj = _core.new_SizerItem(*args, **kwargs) |
8045 | self.this = newobj.this | |
8046 | self.thisown = 1 | |
8047 | del newobj.thisown | |
e811c8ce RD |
8048 | def DeleteWindows(*args, **kwargs): |
8049 | """DeleteWindows()""" | |
8050 | return _core.SizerItem_DeleteWindows(*args, **kwargs) | |
8051 | ||
8052 | def DetachSizer(*args, **kwargs): | |
8053 | """DetachSizer()""" | |
8054 | return _core.SizerItem_DetachSizer(*args, **kwargs) | |
8055 | ||
8056 | def GetSize(*args, **kwargs): | |
8057 | """GetSize() -> Size""" | |
8058 | return _core.SizerItem_GetSize(*args, **kwargs) | |
8059 | ||
8060 | def CalcMin(*args, **kwargs): | |
8061 | """CalcMin() -> Size""" | |
8062 | return _core.SizerItem_CalcMin(*args, **kwargs) | |
8063 | ||
8064 | def SetDimension(*args, **kwargs): | |
8065 | """SetDimension(Point pos, Size size)""" | |
8066 | return _core.SizerItem_SetDimension(*args, **kwargs) | |
8067 | ||
8068 | def GetMinSize(*args, **kwargs): | |
8069 | """GetMinSize() -> Size""" | |
8070 | return _core.SizerItem_GetMinSize(*args, **kwargs) | |
8071 | ||
8072 | def SetInitSize(*args, **kwargs): | |
8073 | """SetInitSize(int x, int y)""" | |
8074 | return _core.SizerItem_SetInitSize(*args, **kwargs) | |
8075 | ||
8076 | def SetRatioWH(*args, **kwargs): | |
8077 | """SetRatioWH(int width, int height)""" | |
8078 | return _core.SizerItem_SetRatioWH(*args, **kwargs) | |
8079 | ||
8080 | def SetRatioSize(*args, **kwargs): | |
8081 | """SetRatioSize(Size size)""" | |
8082 | return _core.SizerItem_SetRatioSize(*args, **kwargs) | |
8083 | ||
8084 | def SetRatio(*args, **kwargs): | |
8085 | """SetRatio(float ratio)""" | |
8086 | return _core.SizerItem_SetRatio(*args, **kwargs) | |
8087 | ||
8088 | def GetRatio(*args, **kwargs): | |
8089 | """GetRatio() -> float""" | |
8090 | return _core.SizerItem_GetRatio(*args, **kwargs) | |
8091 | ||
8092 | def IsWindow(*args, **kwargs): | |
8093 | """IsWindow() -> bool""" | |
8094 | return _core.SizerItem_IsWindow(*args, **kwargs) | |
8095 | ||
8096 | def IsSizer(*args, **kwargs): | |
8097 | """IsSizer() -> bool""" | |
8098 | return _core.SizerItem_IsSizer(*args, **kwargs) | |
8099 | ||
8100 | def IsSpacer(*args, **kwargs): | |
8101 | """IsSpacer() -> bool""" | |
8102 | return _core.SizerItem_IsSpacer(*args, **kwargs) | |
8103 | ||
8104 | def SetProportion(*args, **kwargs): | |
8105 | """SetProportion(int proportion)""" | |
8106 | return _core.SizerItem_SetProportion(*args, **kwargs) | |
8107 | ||
8108 | def GetProportion(*args, **kwargs): | |
8109 | """GetProportion() -> int""" | |
8110 | return _core.SizerItem_GetProportion(*args, **kwargs) | |
8111 | ||
8112 | def SetFlag(*args, **kwargs): | |
8113 | """SetFlag(int flag)""" | |
8114 | return _core.SizerItem_SetFlag(*args, **kwargs) | |
8115 | ||
8116 | def GetFlag(*args, **kwargs): | |
8117 | """GetFlag() -> int""" | |
8118 | return _core.SizerItem_GetFlag(*args, **kwargs) | |
8119 | ||
8120 | def SetBorder(*args, **kwargs): | |
8121 | """SetBorder(int border)""" | |
8122 | return _core.SizerItem_SetBorder(*args, **kwargs) | |
8123 | ||
8124 | def GetBorder(*args, **kwargs): | |
8125 | """GetBorder() -> int""" | |
8126 | return _core.SizerItem_GetBorder(*args, **kwargs) | |
8127 | ||
8128 | def GetWindow(*args, **kwargs): | |
8129 | """GetWindow() -> Window""" | |
8130 | return _core.SizerItem_GetWindow(*args, **kwargs) | |
8131 | ||
8132 | def SetWindow(*args, **kwargs): | |
8133 | """SetWindow(Window window)""" | |
8134 | return _core.SizerItem_SetWindow(*args, **kwargs) | |
8135 | ||
8136 | def GetSizer(*args, **kwargs): | |
8137 | """GetSizer() -> Sizer""" | |
8138 | return _core.SizerItem_GetSizer(*args, **kwargs) | |
8139 | ||
8140 | def SetSizer(*args, **kwargs): | |
8141 | """SetSizer(Sizer sizer)""" | |
8142 | return _core.SizerItem_SetSizer(*args, **kwargs) | |
8143 | ||
8144 | def GetSpacer(*args, **kwargs): | |
8145 | """GetSpacer() -> Size""" | |
8146 | return _core.SizerItem_GetSpacer(*args, **kwargs) | |
8147 | ||
8148 | def SetSpacer(*args, **kwargs): | |
8149 | """SetSpacer(Size size)""" | |
8150 | return _core.SizerItem_SetSpacer(*args, **kwargs) | |
8151 | ||
8152 | def Show(*args, **kwargs): | |
8153 | """Show(bool show)""" | |
8154 | return _core.SizerItem_Show(*args, **kwargs) | |
8155 | ||
8156 | def IsShown(*args, **kwargs): | |
8157 | """IsShown() -> bool""" | |
8158 | return _core.SizerItem_IsShown(*args, **kwargs) | |
8159 | ||
8160 | def GetPosition(*args, **kwargs): | |
8161 | """GetPosition() -> Point""" | |
8162 | return _core.SizerItem_GetPosition(*args, **kwargs) | |
8163 | ||
8164 | def GetUserData(*args, **kwargs): | |
8165 | """GetUserData() -> PyObject""" | |
8166 | return _core.SizerItem_GetUserData(*args, **kwargs) | |
8167 | ||
d14a1e28 RD |
8168 | |
8169 | class SizerItemPtr(SizerItem): | |
8170 | def __init__(self, this): | |
8171 | self.this = this | |
8172 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8173 | self.__class__ = SizerItem | |
8174 | _core.SizerItem_swigregister(SizerItemPtr) | |
8175 | ||
8176 | def SizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
8177 | """ |
8178 | SizerItemSpacer(int width, int height, int proportion, int flag, int border, | |
8179 | Object userData) -> SizerItem | |
8180 | """ | |
d14a1e28 RD |
8181 | val = _core.new_SizerItemSpacer(*args, **kwargs) |
8182 | val.thisown = 1 | |
8183 | return val | |
8184 | ||
8185 | def SizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
8186 | """ |
8187 | SizerItemWindow(Window window, int proportion, int flag, int border, | |
8188 | Object userData) -> SizerItem | |
8189 | """ | |
d14a1e28 RD |
8190 | val = _core.new_SizerItemWindow(*args, **kwargs) |
8191 | val.thisown = 1 | |
8192 | return val | |
8193 | ||
8194 | def SizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
8195 | """ |
8196 | SizerItemSizer(Sizer sizer, int proportion, int flag, int border, | |
8197 | Object userData) -> SizerItem | |
8198 | """ | |
d14a1e28 RD |
8199 | val = _core.new_SizerItemSizer(*args, **kwargs) |
8200 | val.thisown = 1 | |
8201 | return val | |
8202 | ||
8203 | class Sizer(Object): | |
e811c8ce RD |
8204 | def __init__(self): raise RuntimeError, "No constructor defined" |
8205 | def __repr__(self): | |
8206 | return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
8207 | def _setOORInfo(*args, **kwargs): | |
8208 | """_setOORInfo(PyObject _self)""" | |
8209 | return _core.Sizer__setOORInfo(*args, **kwargs) | |
8210 | ||
8211 | def Add(*args, **kwargs): | |
0df68c9f RD |
8212 | """ |
8213 | Add(PyObject item, int proportion=0, int flag=0, int border=0, | |
8214 | PyObject userData=None) | |
8215 | """ | |
e811c8ce RD |
8216 | return _core.Sizer_Add(*args, **kwargs) |
8217 | ||
8218 | def Insert(*args, **kwargs): | |
0df68c9f RD |
8219 | """ |
8220 | Insert(int before, PyObject item, int proportion=0, int flag=0, | |
8221 | int border=0, PyObject userData=None) | |
8222 | """ | |
e811c8ce RD |
8223 | return _core.Sizer_Insert(*args, **kwargs) |
8224 | ||
8225 | def Prepend(*args, **kwargs): | |
0df68c9f RD |
8226 | """ |
8227 | Prepend(PyObject item, int proportion=0, int flag=0, int border=0, | |
8228 | PyObject userData=None) | |
8229 | """ | |
e811c8ce RD |
8230 | return _core.Sizer_Prepend(*args, **kwargs) |
8231 | ||
8232 | def Remove(*args, **kwargs): | |
8233 | """Remove(PyObject item) -> bool""" | |
8234 | return _core.Sizer_Remove(*args, **kwargs) | |
8235 | ||
8236 | def _SetItemMinSize(*args, **kwargs): | |
8237 | """_SetItemMinSize(PyObject item, Size size)""" | |
8238 | return _core.Sizer__SetItemMinSize(*args, **kwargs) | |
8239 | ||
8240 | def AddItem(*args, **kwargs): | |
8241 | """AddItem(SizerItem item)""" | |
8242 | return _core.Sizer_AddItem(*args, **kwargs) | |
8243 | ||
8244 | def InsertItem(*args, **kwargs): | |
8245 | """InsertItem(size_t index, SizerItem item)""" | |
8246 | return _core.Sizer_InsertItem(*args, **kwargs) | |
8247 | ||
8248 | def PrependItem(*args, **kwargs): | |
8249 | """PrependItem(SizerItem item)""" | |
8250 | return _core.Sizer_PrependItem(*args, **kwargs) | |
8251 | ||
d14a1e28 RD |
8252 | def AddMany(self, widgets): |
8253 | for childinfo in widgets: | |
e811c8ce | 8254 | if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)): |
d14a1e28 RD |
8255 | childinfo = (childinfo, ) |
8256 | self.Add(*childinfo) | |
8257 | ||
74e96f3d | 8258 | # for backwards compatibility only, please do not use in new code |
d14a1e28 RD |
8259 | AddWindow = AddSizer = AddSpacer = Add |
8260 | PrependWindow = PrependSizer = PrependSpacer = Prepend | |
8261 | InsertWindow = InsertSizer = InsertSpacer = Insert | |
8262 | RemoveWindow = RemoveSizer = RemovePos = Remove | |
8263 | ||
8264 | ||
8265 | def SetItemMinSize(self, item, *args): | |
8266 | if len(args) == 2: | |
8267 | return self._SetItemMinSize(item, args) | |
8268 | else: | |
8269 | return self._SetItemMinSize(item, args[0]) | |
8270 | ||
e811c8ce RD |
8271 | def SetDimension(*args, **kwargs): |
8272 | """SetDimension(int x, int y, int width, int height)""" | |
8273 | return _core.Sizer_SetDimension(*args, **kwargs) | |
8274 | ||
8275 | def SetMinSize(*args, **kwargs): | |
8276 | """SetMinSize(Size size)""" | |
8277 | return _core.Sizer_SetMinSize(*args, **kwargs) | |
8278 | ||
8279 | def GetSize(*args, **kwargs): | |
8280 | """GetSize() -> Size""" | |
8281 | return _core.Sizer_GetSize(*args, **kwargs) | |
8282 | ||
8283 | def GetPosition(*args, **kwargs): | |
8284 | """GetPosition() -> Point""" | |
8285 | return _core.Sizer_GetPosition(*args, **kwargs) | |
8286 | ||
8287 | def GetMinSize(*args, **kwargs): | |
8288 | """GetMinSize() -> Size""" | |
8289 | return _core.Sizer_GetMinSize(*args, **kwargs) | |
8290 | ||
d14a1e28 RD |
8291 | def GetSizeTuple(self): |
8292 | return self.GetSize().asTuple() | |
8293 | def GetPositionTuple(self): | |
8294 | return self.GetPosition().asTuple() | |
8295 | def GetMinSizeTuple(self): | |
8296 | return self.GetMinSize().asTuple() | |
8297 | ||
e811c8ce RD |
8298 | def RecalcSizes(*args, **kwargs): |
8299 | """RecalcSizes()""" | |
8300 | return _core.Sizer_RecalcSizes(*args, **kwargs) | |
8301 | ||
8302 | def CalcMin(*args, **kwargs): | |
8303 | """CalcMin() -> Size""" | |
8304 | return _core.Sizer_CalcMin(*args, **kwargs) | |
8305 | ||
8306 | def Layout(*args, **kwargs): | |
8307 | """Layout()""" | |
8308 | return _core.Sizer_Layout(*args, **kwargs) | |
8309 | ||
8310 | def Fit(*args, **kwargs): | |
8311 | """Fit(Window window) -> Size""" | |
8312 | return _core.Sizer_Fit(*args, **kwargs) | |
8313 | ||
8314 | def FitInside(*args, **kwargs): | |
8315 | """FitInside(Window window)""" | |
8316 | return _core.Sizer_FitInside(*args, **kwargs) | |
8317 | ||
8318 | def SetSizeHints(*args, **kwargs): | |
8319 | """SetSizeHints(Window window)""" | |
8320 | return _core.Sizer_SetSizeHints(*args, **kwargs) | |
8321 | ||
8322 | def SetVirtualSizeHints(*args, **kwargs): | |
8323 | """SetVirtualSizeHints(Window window)""" | |
8324 | return _core.Sizer_SetVirtualSizeHints(*args, **kwargs) | |
8325 | ||
8326 | def Clear(*args, **kwargs): | |
8327 | """Clear(bool delete_windows=False)""" | |
8328 | return _core.Sizer_Clear(*args, **kwargs) | |
8329 | ||
8330 | def DeleteWindows(*args, **kwargs): | |
8331 | """DeleteWindows()""" | |
8332 | return _core.Sizer_DeleteWindows(*args, **kwargs) | |
8333 | ||
8334 | def GetChildren(*args, **kwargs): | |
8335 | """GetChildren() -> PyObject""" | |
8336 | return _core.Sizer_GetChildren(*args, **kwargs) | |
8337 | ||
8338 | def Show(*args, **kwargs): | |
8339 | """Show(PyObject item, bool show=True)""" | |
8340 | return _core.Sizer_Show(*args, **kwargs) | |
8341 | ||
8342 | def Hide(*args, **kwargs): | |
8343 | """Hide(PyObject item)""" | |
8344 | return _core.Sizer_Hide(*args, **kwargs) | |
8345 | ||
8346 | def IsShown(*args, **kwargs): | |
8347 | """IsShown(PyObject item) -> bool""" | |
8348 | return _core.Sizer_IsShown(*args, **kwargs) | |
8349 | ||
8350 | def ShowItems(*args, **kwargs): | |
8351 | """ShowItems(bool show)""" | |
8352 | return _core.Sizer_ShowItems(*args, **kwargs) | |
8353 | ||
d14a1e28 RD |
8354 | |
8355 | class SizerPtr(Sizer): | |
8356 | def __init__(self, this): | |
8357 | self.this = this | |
8358 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8359 | self.__class__ = Sizer | |
8360 | _core.Sizer_swigregister(SizerPtr) | |
8361 | ||
8362 | class PySizer(Sizer): | |
e811c8ce RD |
8363 | def __repr__(self): |
8364 | return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8365 | def __init__(self, *args, **kwargs): |
e811c8ce | 8366 | """__init__() -> PySizer""" |
d14a1e28 RD |
8367 | newobj = _core.new_PySizer(*args, **kwargs) |
8368 | self.this = newobj.this | |
8369 | self.thisown = 1 | |
8370 | del newobj.thisown | |
8371 | self._setCallbackInfo(self, PySizer);self._setOORInfo(self) | |
e811c8ce RD |
8372 | |
8373 | def _setCallbackInfo(*args, **kwargs): | |
8374 | """_setCallbackInfo(PyObject self, PyObject _class)""" | |
8375 | return _core.PySizer__setCallbackInfo(*args, **kwargs) | |
8376 | ||
d14a1e28 RD |
8377 | |
8378 | class PySizerPtr(PySizer): | |
8379 | def __init__(self, this): | |
8380 | self.this = this | |
8381 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8382 | self.__class__ = PySizer | |
8383 | _core.PySizer_swigregister(PySizerPtr) | |
8384 | ||
8385 | #--------------------------------------------------------------------------- | |
8386 | ||
8387 | class BoxSizer(Sizer): | |
e811c8ce RD |
8388 | def __repr__(self): |
8389 | return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8390 | def __init__(self, *args, **kwargs): |
e811c8ce | 8391 | """__init__(int orient=HORIZONTAL) -> BoxSizer""" |
d14a1e28 RD |
8392 | newobj = _core.new_BoxSizer(*args, **kwargs) |
8393 | self.this = newobj.this | |
8394 | self.thisown = 1 | |
8395 | del newobj.thisown | |
8396 | self._setOORInfo(self) | |
e811c8ce RD |
8397 | |
8398 | def GetOrientation(*args, **kwargs): | |
8399 | """GetOrientation() -> int""" | |
8400 | return _core.BoxSizer_GetOrientation(*args, **kwargs) | |
8401 | ||
8402 | def SetOrientation(*args, **kwargs): | |
8403 | """SetOrientation(int orient)""" | |
8404 | return _core.BoxSizer_SetOrientation(*args, **kwargs) | |
8405 | ||
8406 | def RecalcSizes(*args, **kwargs): | |
8407 | """RecalcSizes()""" | |
8408 | return _core.BoxSizer_RecalcSizes(*args, **kwargs) | |
8409 | ||
8410 | def CalcMin(*args, **kwargs): | |
8411 | """CalcMin() -> Size""" | |
8412 | return _core.BoxSizer_CalcMin(*args, **kwargs) | |
8413 | ||
d14a1e28 RD |
8414 | |
8415 | class BoxSizerPtr(BoxSizer): | |
8416 | def __init__(self, this): | |
8417 | self.this = this | |
8418 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8419 | self.__class__ = BoxSizer | |
8420 | _core.BoxSizer_swigregister(BoxSizerPtr) | |
8421 | ||
8422 | #--------------------------------------------------------------------------- | |
8423 | ||
8424 | class StaticBoxSizer(BoxSizer): | |
e811c8ce RD |
8425 | def __repr__(self): |
8426 | return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8427 | def __init__(self, *args, **kwargs): |
e811c8ce | 8428 | """__init__(wxStaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer""" |
d14a1e28 RD |
8429 | newobj = _core.new_StaticBoxSizer(*args, **kwargs) |
8430 | self.this = newobj.this | |
8431 | self.thisown = 1 | |
8432 | del newobj.thisown | |
8433 | self._setOORInfo(self) | |
e811c8ce RD |
8434 | |
8435 | def GetStaticBox(*args, **kwargs): | |
8436 | """GetStaticBox() -> wxStaticBox""" | |
8437 | return _core.StaticBoxSizer_GetStaticBox(*args, **kwargs) | |
8438 | ||
8439 | def RecalcSizes(*args, **kwargs): | |
8440 | """RecalcSizes()""" | |
8441 | return _core.StaticBoxSizer_RecalcSizes(*args, **kwargs) | |
8442 | ||
8443 | def CalcMin(*args, **kwargs): | |
8444 | """CalcMin() -> Size""" | |
8445 | return _core.StaticBoxSizer_CalcMin(*args, **kwargs) | |
8446 | ||
d14a1e28 RD |
8447 | |
8448 | class StaticBoxSizerPtr(StaticBoxSizer): | |
8449 | def __init__(self, this): | |
8450 | self.this = this | |
8451 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8452 | self.__class__ = StaticBoxSizer | |
8453 | _core.StaticBoxSizer_swigregister(StaticBoxSizerPtr) | |
8454 | ||
8455 | #--------------------------------------------------------------------------- | |
8456 | ||
8457 | class GridSizer(Sizer): | |
e811c8ce RD |
8458 | def __repr__(self): |
8459 | return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8460 | def __init__(self, *args, **kwargs): |
e811c8ce | 8461 | """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer""" |
d14a1e28 RD |
8462 | newobj = _core.new_GridSizer(*args, **kwargs) |
8463 | self.this = newobj.this | |
8464 | self.thisown = 1 | |
8465 | del newobj.thisown | |
8466 | self._setOORInfo(self) | |
e811c8ce RD |
8467 | |
8468 | def RecalcSizes(*args, **kwargs): | |
8469 | """RecalcSizes()""" | |
8470 | return _core.GridSizer_RecalcSizes(*args, **kwargs) | |
8471 | ||
8472 | def CalcMin(*args, **kwargs): | |
8473 | """CalcMin() -> Size""" | |
8474 | return _core.GridSizer_CalcMin(*args, **kwargs) | |
8475 | ||
8476 | def SetCols(*args, **kwargs): | |
8477 | """SetCols(int cols)""" | |
8478 | return _core.GridSizer_SetCols(*args, **kwargs) | |
8479 | ||
8480 | def SetRows(*args, **kwargs): | |
8481 | """SetRows(int rows)""" | |
8482 | return _core.GridSizer_SetRows(*args, **kwargs) | |
8483 | ||
8484 | def SetVGap(*args, **kwargs): | |
8485 | """SetVGap(int gap)""" | |
8486 | return _core.GridSizer_SetVGap(*args, **kwargs) | |
8487 | ||
8488 | def SetHGap(*args, **kwargs): | |
8489 | """SetHGap(int gap)""" | |
8490 | return _core.GridSizer_SetHGap(*args, **kwargs) | |
8491 | ||
8492 | def GetCols(*args, **kwargs): | |
8493 | """GetCols() -> int""" | |
8494 | return _core.GridSizer_GetCols(*args, **kwargs) | |
8495 | ||
8496 | def GetRows(*args, **kwargs): | |
8497 | """GetRows() -> int""" | |
8498 | return _core.GridSizer_GetRows(*args, **kwargs) | |
8499 | ||
8500 | def GetVGap(*args, **kwargs): | |
8501 | """GetVGap() -> int""" | |
8502 | return _core.GridSizer_GetVGap(*args, **kwargs) | |
8503 | ||
8504 | def GetHGap(*args, **kwargs): | |
8505 | """GetHGap() -> int""" | |
8506 | return _core.GridSizer_GetHGap(*args, **kwargs) | |
8507 | ||
d14a1e28 RD |
8508 | |
8509 | class GridSizerPtr(GridSizer): | |
8510 | def __init__(self, this): | |
8511 | self.this = this | |
8512 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8513 | self.__class__ = GridSizer | |
8514 | _core.GridSizer_swigregister(GridSizerPtr) | |
8515 | ||
8516 | #--------------------------------------------------------------------------- | |
8517 | ||
8518 | FLEX_GROWMODE_NONE = _core.FLEX_GROWMODE_NONE | |
8519 | FLEX_GROWMODE_SPECIFIED = _core.FLEX_GROWMODE_SPECIFIED | |
8520 | FLEX_GROWMODE_ALL = _core.FLEX_GROWMODE_ALL | |
8521 | class FlexGridSizer(GridSizer): | |
e811c8ce RD |
8522 | def __repr__(self): |
8523 | return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8524 | def __init__(self, *args, **kwargs): |
e811c8ce | 8525 | """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer""" |
d14a1e28 RD |
8526 | newobj = _core.new_FlexGridSizer(*args, **kwargs) |
8527 | self.this = newobj.this | |
8528 | self.thisown = 1 | |
8529 | del newobj.thisown | |
8530 | self._setOORInfo(self) | |
e811c8ce RD |
8531 | |
8532 | def RecalcSizes(*args, **kwargs): | |
8533 | """RecalcSizes()""" | |
8534 | return _core.FlexGridSizer_RecalcSizes(*args, **kwargs) | |
8535 | ||
8536 | def CalcMin(*args, **kwargs): | |
8537 | """CalcMin() -> Size""" | |
8538 | return _core.FlexGridSizer_CalcMin(*args, **kwargs) | |
8539 | ||
8540 | def AddGrowableRow(*args, **kwargs): | |
8541 | """AddGrowableRow(size_t idx, int proportion=0)""" | |
8542 | return _core.FlexGridSizer_AddGrowableRow(*args, **kwargs) | |
8543 | ||
8544 | def RemoveGrowableRow(*args, **kwargs): | |
8545 | """RemoveGrowableRow(size_t idx)""" | |
8546 | return _core.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) | |
8547 | ||
8548 | def AddGrowableCol(*args, **kwargs): | |
8549 | """AddGrowableCol(size_t idx, int proportion=0)""" | |
8550 | return _core.FlexGridSizer_AddGrowableCol(*args, **kwargs) | |
8551 | ||
8552 | def RemoveGrowableCol(*args, **kwargs): | |
8553 | """RemoveGrowableCol(size_t idx)""" | |
8554 | return _core.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) | |
8555 | ||
8556 | def SetFlexibleDirection(*args, **kwargs): | |
8557 | """SetFlexibleDirection(int direction)""" | |
8558 | return _core.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) | |
8559 | ||
8560 | def GetFlexibleDirection(*args, **kwargs): | |
8561 | """GetFlexibleDirection() -> int""" | |
8562 | return _core.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) | |
8563 | ||
8564 | def SetNonFlexibleGrowMode(*args, **kwargs): | |
196addbf | 8565 | """SetNonFlexibleGrowMode(int mode)""" |
e811c8ce RD |
8566 | return _core.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) |
8567 | ||
8568 | def GetNonFlexibleGrowMode(*args, **kwargs): | |
196addbf | 8569 | """GetNonFlexibleGrowMode() -> int""" |
e811c8ce RD |
8570 | return _core.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) |
8571 | ||
8572 | def GetRowHeights(*args, **kwargs): | |
8573 | """GetRowHeights() -> wxArrayInt""" | |
8574 | return _core.FlexGridSizer_GetRowHeights(*args, **kwargs) | |
8575 | ||
8576 | def GetColWidths(*args, **kwargs): | |
8577 | """GetColWidths() -> wxArrayInt""" | |
8578 | return _core.FlexGridSizer_GetColWidths(*args, **kwargs) | |
8579 | ||
d14a1e28 RD |
8580 | |
8581 | class FlexGridSizerPtr(FlexGridSizer): | |
8582 | def __init__(self, this): | |
8583 | self.this = this | |
8584 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8585 | self.__class__ = FlexGridSizer | |
8586 | _core.FlexGridSizer_swigregister(FlexGridSizerPtr) | |
8587 | ||
8588 | #--------------------------------------------------------------------------- | |
8589 | ||
8590 | class GBPosition(object): | |
e811c8ce RD |
8591 | def __repr__(self): |
8592 | return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8593 | def __init__(self, *args, **kwargs): |
e811c8ce | 8594 | """__init__(int row=0, int col=0) -> GBPosition""" |
d14a1e28 RD |
8595 | newobj = _core.new_GBPosition(*args, **kwargs) |
8596 | self.this = newobj.this | |
8597 | self.thisown = 1 | |
8598 | del newobj.thisown | |
e811c8ce RD |
8599 | def GetRow(*args, **kwargs): |
8600 | """GetRow() -> int""" | |
8601 | return _core.GBPosition_GetRow(*args, **kwargs) | |
8602 | ||
8603 | def GetCol(*args, **kwargs): | |
8604 | """GetCol() -> int""" | |
8605 | return _core.GBPosition_GetCol(*args, **kwargs) | |
8606 | ||
8607 | def SetRow(*args, **kwargs): | |
8608 | """SetRow(int row)""" | |
8609 | return _core.GBPosition_SetRow(*args, **kwargs) | |
8610 | ||
8611 | def SetCol(*args, **kwargs): | |
8612 | """SetCol(int col)""" | |
8613 | return _core.GBPosition_SetCol(*args, **kwargs) | |
8614 | ||
8615 | def __eq__(*args, **kwargs): | |
22faec7d | 8616 | """__eq__(GBPosition other) -> bool""" |
e811c8ce RD |
8617 | return _core.GBPosition___eq__(*args, **kwargs) |
8618 | ||
8619 | def __ne__(*args, **kwargs): | |
22faec7d | 8620 | """__ne__(GBPosition other) -> bool""" |
e811c8ce RD |
8621 | return _core.GBPosition___ne__(*args, **kwargs) |
8622 | ||
8623 | def Set(*args, **kwargs): | |
8624 | """Set(int row=0, int col=0)""" | |
8625 | return _core.GBPosition_Set(*args, **kwargs) | |
8626 | ||
8627 | def Get(*args, **kwargs): | |
8628 | """Get() -> PyObject""" | |
8629 | return _core.GBPosition_Get(*args, **kwargs) | |
8630 | ||
8631 | asTuple = Get | |
8632 | def __str__(self): return str(self.Get()) | |
8633 | def __repr__(self): return 'wx.GBPosition'+str(self.Get()) | |
8634 | def __len__(self): return len(self.Get()) | |
8635 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
8636 | def __setitem__(self, index, val): |
8637 | if index == 0: self.SetRow(val) | |
8638 | elif index == 1: self.SetCol(val) | |
8639 | else: raise IndexError | |
e811c8ce | 8640 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
8641 | __safe_for_unpickling__ = True |
8642 | def __reduce__(self): return (wx.GBPosition, self.Get()) | |
d14a1e28 RD |
8643 | |
8644 | row = property(GetRow, SetRow) | |
8645 | col = property(GetCol, SetCol) | |
8646 | ||
8647 | ||
8648 | class GBPositionPtr(GBPosition): | |
8649 | def __init__(self, this): | |
8650 | self.this = this | |
8651 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8652 | self.__class__ = GBPosition | |
8653 | _core.GBPosition_swigregister(GBPositionPtr) | |
8654 | ||
8655 | class GBSpan(object): | |
e811c8ce RD |
8656 | def __repr__(self): |
8657 | return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8658 | def __init__(self, *args, **kwargs): |
e811c8ce | 8659 | """__init__(int rowspan=1, int colspan=1) -> GBSpan""" |
d14a1e28 RD |
8660 | newobj = _core.new_GBSpan(*args, **kwargs) |
8661 | self.this = newobj.this | |
8662 | self.thisown = 1 | |
8663 | del newobj.thisown | |
e811c8ce RD |
8664 | def GetRowspan(*args, **kwargs): |
8665 | """GetRowspan() -> int""" | |
8666 | return _core.GBSpan_GetRowspan(*args, **kwargs) | |
8667 | ||
8668 | def GetColspan(*args, **kwargs): | |
8669 | """GetColspan() -> int""" | |
8670 | return _core.GBSpan_GetColspan(*args, **kwargs) | |
8671 | ||
8672 | def SetRowspan(*args, **kwargs): | |
8673 | """SetRowspan(int rowspan)""" | |
8674 | return _core.GBSpan_SetRowspan(*args, **kwargs) | |
8675 | ||
8676 | def SetColspan(*args, **kwargs): | |
8677 | """SetColspan(int colspan)""" | |
8678 | return _core.GBSpan_SetColspan(*args, **kwargs) | |
8679 | ||
8680 | def __eq__(*args, **kwargs): | |
22faec7d | 8681 | """__eq__(GBSpan other) -> bool""" |
e811c8ce RD |
8682 | return _core.GBSpan___eq__(*args, **kwargs) |
8683 | ||
8684 | def __ne__(*args, **kwargs): | |
22faec7d | 8685 | """__ne__(GBSpan other) -> bool""" |
e811c8ce RD |
8686 | return _core.GBSpan___ne__(*args, **kwargs) |
8687 | ||
8688 | def Set(*args, **kwargs): | |
8689 | """Set(int rowspan=1, int colspan=1)""" | |
8690 | return _core.GBSpan_Set(*args, **kwargs) | |
8691 | ||
8692 | def Get(*args, **kwargs): | |
8693 | """Get() -> PyObject""" | |
8694 | return _core.GBSpan_Get(*args, **kwargs) | |
8695 | ||
8696 | asTuple = Get | |
8697 | def __str__(self): return str(self.Get()) | |
8698 | def __repr__(self): return 'wx.GBSpan'+str(self.Get()) | |
8699 | def __len__(self): return len(self.Get()) | |
8700 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
8701 | def __setitem__(self, index, val): |
8702 | if index == 0: self.SetRowspan(val) | |
8703 | elif index == 1: self.SetColspan(val) | |
8704 | else: raise IndexError | |
e811c8ce | 8705 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
8706 | __safe_for_unpickling__ = True |
8707 | def __reduce__(self): return (wx.GBSpan, self.Get()) | |
d14a1e28 RD |
8708 | |
8709 | rowspan = property(GetRowspan, SetRowspan) | |
8710 | colspan = property(GetColspan, SetColspan) | |
8711 | ||
8712 | ||
8713 | class GBSpanPtr(GBSpan): | |
8714 | def __init__(self, this): | |
8715 | self.this = this | |
8716 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8717 | self.__class__ = GBSpan | |
8718 | _core.GBSpan_swigregister(GBSpanPtr) | |
8719 | ||
8720 | class GBSizerItem(SizerItem): | |
e811c8ce RD |
8721 | def __repr__(self): |
8722 | return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8723 | def __init__(self, *args, **kwargs): |
e811c8ce | 8724 | """__init__() -> GBSizerItem""" |
d14a1e28 RD |
8725 | newobj = _core.new_GBSizerItem(*args, **kwargs) |
8726 | self.this = newobj.this | |
8727 | self.thisown = 1 | |
8728 | del newobj.thisown | |
e811c8ce RD |
8729 | def GetPos(*args, **kwargs): |
8730 | """GetPos() -> GBPosition""" | |
8731 | return _core.GBSizerItem_GetPos(*args, **kwargs) | |
8732 | ||
8733 | def GetPosTuple(self): return self.GetPos().Get() | |
8734 | def GetSpan(*args, **kwargs): | |
8735 | """GetSpan() -> GBSpan""" | |
8736 | return _core.GBSizerItem_GetSpan(*args, **kwargs) | |
8737 | ||
8738 | def GetSpanTuple(self): return self.GetSpan().Get() | |
8739 | def SetPos(*args, **kwargs): | |
8740 | """SetPos(GBPosition pos) -> bool""" | |
8741 | return _core.GBSizerItem_SetPos(*args, **kwargs) | |
8742 | ||
8743 | def SetSpan(*args, **kwargs): | |
8744 | """SetSpan(GBSpan span) -> bool""" | |
8745 | return _core.GBSizerItem_SetSpan(*args, **kwargs) | |
8746 | ||
8747 | def Intersects(*args): | |
0df68c9f RD |
8748 | """ |
8749 | Intersects(GBSizerItem other) -> bool | |
8750 | Intersects(GBPosition pos, GBSpan span) -> bool | |
8751 | """ | |
e811c8ce RD |
8752 | return _core.GBSizerItem_Intersects(*args) |
8753 | ||
8754 | def GetEndPos(*args, **kwargs): | |
8755 | """GetEndPos(int row, int col)""" | |
8756 | return _core.GBSizerItem_GetEndPos(*args, **kwargs) | |
8757 | ||
8758 | def GetGBSizer(*args, **kwargs): | |
8759 | """GetGBSizer() -> GridBagSizer""" | |
8760 | return _core.GBSizerItem_GetGBSizer(*args, **kwargs) | |
8761 | ||
8762 | def SetGBSizer(*args, **kwargs): | |
8763 | """SetGBSizer(GridBagSizer sizer)""" | |
8764 | return _core.GBSizerItem_SetGBSizer(*args, **kwargs) | |
8765 | ||
d14a1e28 RD |
8766 | |
8767 | class GBSizerItemPtr(GBSizerItem): | |
8768 | def __init__(self, this): | |
8769 | self.this = this | |
8770 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8771 | self.__class__ = GBSizerItem | |
8772 | _core.GBSizerItem_swigregister(GBSizerItemPtr) | |
8773 | DefaultSpan = cvar.DefaultSpan | |
8774 | ||
8775 | def GBSizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
8776 | """ |
8777 | GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, | |
8778 | int border, Object userData) -> GBSizerItem | |
8779 | """ | |
d14a1e28 RD |
8780 | val = _core.new_GBSizerItemWindow(*args, **kwargs) |
8781 | val.thisown = 1 | |
8782 | return val | |
8783 | ||
8784 | def GBSizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
8785 | """ |
8786 | GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, | |
8787 | int border, Object userData) -> GBSizerItem | |
8788 | """ | |
d14a1e28 RD |
8789 | val = _core.new_GBSizerItemSizer(*args, **kwargs) |
8790 | val.thisown = 1 | |
8791 | return val | |
8792 | ||
8793 | def GBSizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
8794 | """ |
8795 | GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, | |
8796 | int flag, int border, Object userData) -> GBSizerItem | |
8797 | """ | |
d14a1e28 RD |
8798 | val = _core.new_GBSizerItemSpacer(*args, **kwargs) |
8799 | val.thisown = 1 | |
8800 | return val | |
8801 | ||
8802 | class GridBagSizer(FlexGridSizer): | |
e811c8ce RD |
8803 | def __repr__(self): |
8804 | return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8805 | def __init__(self, *args, **kwargs): |
e811c8ce | 8806 | """__init__(int vgap=0, int hgap=0) -> GridBagSizer""" |
d14a1e28 RD |
8807 | newobj = _core.new_GridBagSizer(*args, **kwargs) |
8808 | self.this = newobj.this | |
8809 | self.thisown = 1 | |
8810 | del newobj.thisown | |
e811c8ce | 8811 | def Add(*args, **kwargs): |
0df68c9f RD |
8812 | """ |
8813 | Add(PyObject item, GBPosition pos, GBSpan span=DefaultSpan, | |
8814 | int flag=0, int border=0, PyObject userData=None) -> bool | |
8815 | """ | |
e811c8ce RD |
8816 | return _core.GridBagSizer_Add(*args, **kwargs) |
8817 | ||
8818 | def AddItem(*args, **kwargs): | |
8819 | """AddItem(GBSizerItem item) -> bool""" | |
8820 | return _core.GridBagSizer_AddItem(*args, **kwargs) | |
8821 | ||
8822 | def GetEmptyCellSize(*args, **kwargs): | |
8823 | """GetEmptyCellSize() -> Size""" | |
8824 | return _core.GridBagSizer_GetEmptyCellSize(*args, **kwargs) | |
8825 | ||
8826 | def SetEmptyCellSize(*args, **kwargs): | |
8827 | """SetEmptyCellSize(Size sz)""" | |
8828 | return _core.GridBagSizer_SetEmptyCellSize(*args, **kwargs) | |
8829 | ||
8830 | def GetItemPosition(*args): | |
0df68c9f RD |
8831 | """ |
8832 | GetItemPosition(Window window) -> GBPosition | |
8833 | GetItemPosition(Sizer sizer) -> GBPosition | |
8834 | GetItemPosition(size_t index) -> GBPosition | |
8835 | """ | |
e811c8ce RD |
8836 | return _core.GridBagSizer_GetItemPosition(*args) |
8837 | ||
8838 | def SetItemPosition(*args): | |
0df68c9f RD |
8839 | """ |
8840 | SetItemPosition(Window window, GBPosition pos) -> bool | |
8841 | SetItemPosition(Sizer sizer, GBPosition pos) -> bool | |
8842 | SetItemPosition(size_t index, GBPosition pos) -> bool | |
8843 | """ | |
e811c8ce RD |
8844 | return _core.GridBagSizer_SetItemPosition(*args) |
8845 | ||
8846 | def GetItemSpan(*args): | |
0df68c9f RD |
8847 | """ |
8848 | GetItemSpan(Window window) -> GBSpan | |
8849 | GetItemSpan(Sizer sizer) -> GBSpan | |
8850 | GetItemSpan(size_t index) -> GBSpan | |
8851 | """ | |
e811c8ce RD |
8852 | return _core.GridBagSizer_GetItemSpan(*args) |
8853 | ||
8854 | def SetItemSpan(*args): | |
0df68c9f RD |
8855 | """ |
8856 | SetItemSpan(Window window, GBSpan span) -> bool | |
8857 | SetItemSpan(Sizer sizer, GBSpan span) -> bool | |
8858 | SetItemSpan(size_t index, GBSpan span) -> bool | |
8859 | """ | |
e811c8ce RD |
8860 | return _core.GridBagSizer_SetItemSpan(*args) |
8861 | ||
8862 | def FindItem(*args): | |
0df68c9f RD |
8863 | """ |
8864 | FindItem(Window window) -> GBSizerItem | |
8865 | FindItem(Sizer sizer) -> GBSizerItem | |
8866 | """ | |
e811c8ce RD |
8867 | return _core.GridBagSizer_FindItem(*args) |
8868 | ||
8869 | def FindItemAtPosition(*args, **kwargs): | |
8870 | """FindItemAtPosition(GBPosition pos) -> GBSizerItem""" | |
8871 | return _core.GridBagSizer_FindItemAtPosition(*args, **kwargs) | |
8872 | ||
8873 | def FindItemAtPoint(*args, **kwargs): | |
8874 | """FindItemAtPoint(Point pt) -> GBSizerItem""" | |
8875 | return _core.GridBagSizer_FindItemAtPoint(*args, **kwargs) | |
8876 | ||
8877 | def FindItemWithData(*args, **kwargs): | |
8878 | """FindItemWithData(Object userData) -> GBSizerItem""" | |
8879 | return _core.GridBagSizer_FindItemWithData(*args, **kwargs) | |
8880 | ||
8881 | def RecalcSizes(*args, **kwargs): | |
8882 | """RecalcSizes()""" | |
8883 | return _core.GridBagSizer_RecalcSizes(*args, **kwargs) | |
8884 | ||
8885 | def CalcMin(*args, **kwargs): | |
8886 | """CalcMin() -> Size""" | |
8887 | return _core.GridBagSizer_CalcMin(*args, **kwargs) | |
8888 | ||
8889 | def CheckForIntersection(*args): | |
0df68c9f RD |
8890 | """ |
8891 | CheckForIntersection(GBSizerItem item, GBSizerItem excludeItem=None) -> bool | |
8892 | CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool | |
8893 | """ | |
e811c8ce RD |
8894 | return _core.GridBagSizer_CheckForIntersection(*args) |
8895 | ||
d14a1e28 RD |
8896 | |
8897 | class GridBagSizerPtr(GridBagSizer): | |
8898 | def __init__(self, this): | |
8899 | self.this = this | |
8900 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8901 | self.__class__ = GridBagSizer | |
8902 | _core.GridBagSizer_swigregister(GridBagSizerPtr) | |
8903 | ||
8904 | #--------------------------------------------------------------------------- | |
8905 | ||
8906 | Left = _core.Left | |
8907 | Top = _core.Top | |
8908 | Right = _core.Right | |
8909 | Bottom = _core.Bottom | |
8910 | Width = _core.Width | |
8911 | Height = _core.Height | |
8912 | Centre = _core.Centre | |
8913 | Center = _core.Center | |
8914 | CentreX = _core.CentreX | |
8915 | CentreY = _core.CentreY | |
8916 | Unconstrained = _core.Unconstrained | |
8917 | AsIs = _core.AsIs | |
8918 | PercentOf = _core.PercentOf | |
8919 | Above = _core.Above | |
8920 | Below = _core.Below | |
8921 | LeftOf = _core.LeftOf | |
8922 | RightOf = _core.RightOf | |
8923 | SameAs = _core.SameAs | |
8924 | Absolute = _core.Absolute | |
8925 | class IndividualLayoutConstraint(Object): | |
15afbcd0 RD |
8926 | """ |
8927 | Objects of this class are stored in the wx.LayoutConstraint class as one of | |
8928 | eight possible constraints that a window can be involved in. You will never | |
8929 | need to create an instance of wx.IndividualLayoutConstraint, rather you should | |
8930 | use create a wx.LayoutContstraints instance and use the individual contstraints | |
8931 | that it contains. | |
8932 | ||
8933 | Constraints are initially set to have the relationship wx.Unconstrained, which | |
8934 | means that their values should be calculated by looking at known constraints. | |
8935 | ||
8936 | The Edge specifies the type of edge or dimension of a window. | |
8937 | ||
8938 | Edges | |
8939 | ||
8940 | wx.Left The left edge. | |
8941 | wx.Top The top edge. | |
8942 | wx.Right The right edge. | |
8943 | wx.Bottom The bottom edge. | |
8944 | wx.CentreX The x-coordinate of the centre of the window. | |
8945 | wx.CentreY The y-coordinate of the centre of the window. | |
8946 | ||
8947 | ||
8948 | The Relationship specifies the relationship that this edge or dimension has | |
8949 | with another specified edge or dimension. Normally, the user doesn't use these | |
8950 | directly because functions such as Below and RightOf are a convenience for | |
8951 | using the more general Set function. | |
8952 | ||
8953 | Relationships | |
8954 | ||
8955 | wx.Unconstrained The edge or dimension is unconstrained | |
8956 | (the default for edges.) | |
8957 | wx.AsIs The edge or dimension is to be taken from the current | |
8958 | window position or size (the default for dimensions.) | |
8959 | wx.Above The edge should be above another edge. | |
8960 | wx.Below The edge should be below another edge. | |
8961 | wx.LeftOf The edge should be to the left of another edge. | |
8962 | wx.RightOf The edge should be to the right of another edge. | |
8963 | wx.SameAs The edge or dimension should be the same as another edge | |
8964 | or dimension. | |
8965 | wx.PercentOf The edge or dimension should be a percentage of another | |
8966 | edge or dimension. | |
8967 | wx.Absolute The edge or dimension should be a given absolute value. | |
8968 | ||
8969 | ||
8970 | """ | |
d14a1e28 RD |
8971 | def __init__(self): raise RuntimeError, "No constructor defined" |
8972 | def __repr__(self): | |
8973 | return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 8974 | def Set(*args, **kwargs): |
196addbf | 8975 | """Set(int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)""" |
e811c8ce RD |
8976 | return _core.IndividualLayoutConstraint_Set(*args, **kwargs) |
8977 | ||
8978 | def LeftOf(*args, **kwargs): | |
15afbcd0 RD |
8979 | """ |
8980 | LeftOf(Window sibling, int marg=0) | |
8981 | ||
8982 | Sibling relationship | |
8983 | """ | |
e811c8ce RD |
8984 | return _core.IndividualLayoutConstraint_LeftOf(*args, **kwargs) |
8985 | ||
8986 | def RightOf(*args, **kwargs): | |
15afbcd0 RD |
8987 | """ |
8988 | RightOf(Window sibling, int marg=0) | |
8989 | ||
8990 | Sibling relationship | |
8991 | """ | |
e811c8ce RD |
8992 | return _core.IndividualLayoutConstraint_RightOf(*args, **kwargs) |
8993 | ||
8994 | def Above(*args, **kwargs): | |
15afbcd0 RD |
8995 | """ |
8996 | Above(Window sibling, int marg=0) | |
8997 | ||
8998 | Sibling relationship | |
8999 | """ | |
e811c8ce RD |
9000 | return _core.IndividualLayoutConstraint_Above(*args, **kwargs) |
9001 | ||
9002 | def Below(*args, **kwargs): | |
15afbcd0 RD |
9003 | """ |
9004 | Below(Window sibling, int marg=0) | |
9005 | ||
9006 | Sibling relationship | |
9007 | """ | |
e811c8ce RD |
9008 | return _core.IndividualLayoutConstraint_Below(*args, **kwargs) |
9009 | ||
9010 | def SameAs(*args, **kwargs): | |
15afbcd0 RD |
9011 | """ |
9012 | SameAs(Window otherW, int edge, int marg=0) | |
9013 | ||
9014 | 'Same edge' alignment | |
9015 | """ | |
e811c8ce RD |
9016 | return _core.IndividualLayoutConstraint_SameAs(*args, **kwargs) |
9017 | ||
9018 | def PercentOf(*args, **kwargs): | |
15afbcd0 RD |
9019 | """ |
9020 | PercentOf(Window otherW, int wh, int per) | |
9021 | ||
9022 | The edge is a percentage of the other window's edge | |
9023 | """ | |
e811c8ce RD |
9024 | return _core.IndividualLayoutConstraint_PercentOf(*args, **kwargs) |
9025 | ||
9026 | def Absolute(*args, **kwargs): | |
15afbcd0 RD |
9027 | """ |
9028 | Absolute(int val) | |
9029 | ||
9030 | Edge has absolute value | |
9031 | """ | |
e811c8ce RD |
9032 | return _core.IndividualLayoutConstraint_Absolute(*args, **kwargs) |
9033 | ||
9034 | def Unconstrained(*args, **kwargs): | |
15afbcd0 RD |
9035 | """ |
9036 | Unconstrained() | |
9037 | ||
9038 | Dimension is unconstrained | |
9039 | """ | |
e811c8ce RD |
9040 | return _core.IndividualLayoutConstraint_Unconstrained(*args, **kwargs) |
9041 | ||
9042 | def AsIs(*args, **kwargs): | |
15afbcd0 RD |
9043 | """ |
9044 | AsIs() | |
9045 | ||
9046 | Dimension is 'as is' (use current size settings) | |
9047 | """ | |
e811c8ce RD |
9048 | return _core.IndividualLayoutConstraint_AsIs(*args, **kwargs) |
9049 | ||
9050 | def GetOtherWindow(*args, **kwargs): | |
9051 | """GetOtherWindow() -> Window""" | |
9052 | return _core.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs) | |
9053 | ||
9054 | def GetMyEdge(*args, **kwargs): | |
196addbf | 9055 | """GetMyEdge() -> int""" |
e811c8ce RD |
9056 | return _core.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs) |
9057 | ||
9058 | def SetEdge(*args, **kwargs): | |
196addbf | 9059 | """SetEdge(int which)""" |
e811c8ce RD |
9060 | return _core.IndividualLayoutConstraint_SetEdge(*args, **kwargs) |
9061 | ||
9062 | def SetValue(*args, **kwargs): | |
9063 | """SetValue(int v)""" | |
9064 | return _core.IndividualLayoutConstraint_SetValue(*args, **kwargs) | |
9065 | ||
9066 | def GetMargin(*args, **kwargs): | |
9067 | """GetMargin() -> int""" | |
9068 | return _core.IndividualLayoutConstraint_GetMargin(*args, **kwargs) | |
9069 | ||
9070 | def SetMargin(*args, **kwargs): | |
9071 | """SetMargin(int m)""" | |
9072 | return _core.IndividualLayoutConstraint_SetMargin(*args, **kwargs) | |
9073 | ||
9074 | def GetValue(*args, **kwargs): | |
9075 | """GetValue() -> int""" | |
9076 | return _core.IndividualLayoutConstraint_GetValue(*args, **kwargs) | |
9077 | ||
9078 | def GetPercent(*args, **kwargs): | |
9079 | """GetPercent() -> int""" | |
9080 | return _core.IndividualLayoutConstraint_GetPercent(*args, **kwargs) | |
9081 | ||
9082 | def GetOtherEdge(*args, **kwargs): | |
9083 | """GetOtherEdge() -> int""" | |
9084 | return _core.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs) | |
9085 | ||
9086 | def GetDone(*args, **kwargs): | |
9087 | """GetDone() -> bool""" | |
9088 | return _core.IndividualLayoutConstraint_GetDone(*args, **kwargs) | |
9089 | ||
9090 | def SetDone(*args, **kwargs): | |
9091 | """SetDone(bool d)""" | |
9092 | return _core.IndividualLayoutConstraint_SetDone(*args, **kwargs) | |
9093 | ||
9094 | def GetRelationship(*args, **kwargs): | |
196addbf | 9095 | """GetRelationship() -> int""" |
e811c8ce RD |
9096 | return _core.IndividualLayoutConstraint_GetRelationship(*args, **kwargs) |
9097 | ||
9098 | def SetRelationship(*args, **kwargs): | |
196addbf | 9099 | """SetRelationship(int r)""" |
e811c8ce RD |
9100 | return _core.IndividualLayoutConstraint_SetRelationship(*args, **kwargs) |
9101 | ||
9102 | def ResetIfWin(*args, **kwargs): | |
15afbcd0 RD |
9103 | """ |
9104 | ResetIfWin(Window otherW) -> bool | |
9105 | ||
9106 | Reset constraint if it mentions otherWin | |
9107 | """ | |
e811c8ce RD |
9108 | return _core.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs) |
9109 | ||
9110 | def SatisfyConstraint(*args, **kwargs): | |
15afbcd0 RD |
9111 | """ |
9112 | SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool | |
9113 | ||
9114 | Try to satisfy constraint | |
9115 | """ | |
e811c8ce RD |
9116 | return _core.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs) |
9117 | ||
9118 | def GetEdge(*args, **kwargs): | |
15afbcd0 RD |
9119 | """ |
9120 | GetEdge(int which, Window thisWin, Window other) -> int | |
9121 | ||
9122 | Get the value of this edge or dimension, or if this | |
9123 | is not determinable, -1. | |
9124 | """ | |
e811c8ce RD |
9125 | return _core.IndividualLayoutConstraint_GetEdge(*args, **kwargs) |
9126 | ||
d14a1e28 RD |
9127 | |
9128 | class IndividualLayoutConstraintPtr(IndividualLayoutConstraint): | |
9129 | def __init__(self, this): | |
9130 | self.this = this | |
9131 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9132 | self.__class__ = IndividualLayoutConstraint | |
9133 | _core.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr) | |
9134 | ||
9135 | class LayoutConstraints(Object): | |
15afbcd0 RD |
9136 | """ |
9137 | Note: constraints are now deprecated and you should use sizers instead. | |
9138 | ||
9139 | Objects of this class can be associated with a window to define its layout | |
9140 | constraints, with respect to siblings or its parent. | |
9141 | ||
9142 | The class consists of the following eight constraints of class | |
9143 | wx.IndividualLayoutConstraint, some or all of which should be accessed | |
9144 | directly to set the appropriate constraints. | |
9145 | ||
9146 | * left: represents the left hand edge of the window | |
9147 | * right: represents the right hand edge of the window | |
9148 | * top: represents the top edge of the window | |
9149 | * bottom: represents the bottom edge of the window | |
9150 | * width: represents the width of the window | |
9151 | * height: represents the height of the window | |
9152 | * centreX: represents the horizontal centre point of the window | |
9153 | * centreY: represents the vertical centre point of the window | |
9154 | ||
9155 | Most constraints are initially set to have the relationship wxUnconstrained, | |
9156 | which means that their values should be calculated by looking at known | |
9157 | constraints. The exceptions are width and height, which are set to wxAsIs to | |
9158 | ensure that if the user does not specify a constraint, the existing width and | |
9159 | height will be used, to be compatible with panel items which often have take a | |
9160 | default size. If the constraint is wxAsIs, the dimension will not be changed. | |
9161 | ||
9162 | """ | |
e811c8ce RD |
9163 | def __repr__(self): |
9164 | return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 RD |
9165 | left = property(_core.LayoutConstraints_left_get) |
9166 | top = property(_core.LayoutConstraints_top_get) | |
9167 | right = property(_core.LayoutConstraints_right_get) | |
9168 | bottom = property(_core.LayoutConstraints_bottom_get) | |
9169 | width = property(_core.LayoutConstraints_width_get) | |
9170 | height = property(_core.LayoutConstraints_height_get) | |
9171 | centreX = property(_core.LayoutConstraints_centreX_get) | |
9172 | centreY = property(_core.LayoutConstraints_centreY_get) | |
9173 | def __init__(self, *args, **kwargs): | |
e811c8ce | 9174 | """__init__() -> LayoutConstraints""" |
d14a1e28 RD |
9175 | newobj = _core.new_LayoutConstraints(*args, **kwargs) |
9176 | self.this = newobj.this | |
9177 | self.thisown = 1 | |
9178 | del newobj.thisown | |
e811c8ce | 9179 | def SatisfyConstraints(*args, **kwargs): |
6c3b4aae | 9180 | """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)""" |
e811c8ce RD |
9181 | return _core.LayoutConstraints_SatisfyConstraints(*args, **kwargs) |
9182 | ||
9183 | def AreSatisfied(*args, **kwargs): | |
9184 | """AreSatisfied() -> bool""" | |
9185 | return _core.LayoutConstraints_AreSatisfied(*args, **kwargs) | |
9186 | ||
d14a1e28 RD |
9187 | |
9188 | class LayoutConstraintsPtr(LayoutConstraints): | |
9189 | def __init__(self, this): | |
9190 | self.this = this | |
9191 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9192 | self.__class__ = LayoutConstraints | |
9193 | _core.LayoutConstraints_swigregister(LayoutConstraintsPtr) | |
9194 | ||
9195 | #---------------------------------------------------------------------------- | |
9196 | ||
322913ce | 9197 | # Use Python's bool constants if available, make some if not |
d14a1e28 RD |
9198 | try: |
9199 | True | |
9200 | except NameError: | |
322913ce RD |
9201 | __builtins__.True = 1==1 |
9202 | __builtins__.False = 1==0 | |
d14a1e28 | 9203 | |
d14a1e28 RD |
9204 | |
9205 | ||
9206 | # workarounds for bad wxRTTI names | |
9207 | __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge' | |
9208 | __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider' | |
9209 | __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar' | |
9210 | ||
9211 | ||
9212 | #---------------------------------------------------------------------------- | |
9213 | # Load version numbers from __version__... Ensure that major and minor | |
9214 | # versions are the same for both wxPython and wxWindows. | |
9215 | ||
9216 | from __version__ import * | |
9217 | __version__ = VERSION_STRING | |
9218 | ||
9219 | assert MAJOR_VERSION == _core.MAJOR_VERSION, "wxPython/wxWindows version mismatch" | |
9220 | assert MINOR_VERSION == _core.MINOR_VERSION, "wxPython/wxWindows version mismatch" | |
9221 | if RELEASE_VERSION != _core.RELEASE_VERSION: | |
9222 | import warnings | |
9223 | warnings.warn("wxPython/wxWindows release number mismatch") | |
9224 | ||
9225 | #---------------------------------------------------------------------------- | |
9226 | ||
9227 | class PyDeadObjectError(AttributeError): | |
9228 | pass | |
9229 | ||
d14a1e28 RD |
9230 | class _wxPyDeadObject(object): |
9231 | """ | |
9232 | Instances of wx objects that are OOR capable will have their __class__ | |
9233 | changed to this class when the C++ object is deleted. This should help | |
9234 | prevent crashes due to referencing a bogus C++ pointer. | |
9235 | """ | |
9236 | reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)" | |
9237 | attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed." | |
9238 | ||
3a04f143 | 9239 | def __repr__(self): |
d14a1e28 RD |
9240 | if not hasattr(self, "_name"): |
9241 | self._name = "[unknown]" | |
9242 | return self.reprStr % self._name | |
9243 | ||
3a04f143 | 9244 | def __getattr__(self, *args): |
d14a1e28 RD |
9245 | if not hasattr(self, "_name"): |
9246 | self._name = "[unknown]" | |
3a04f143 RD |
9247 | raise PyDeadObjectError(self.attrStr % self._name) |
9248 | ||
9249 | def __nonzero__(self): | |
9250 | return 0 | |
9251 | ||
9252 | ||
9253 | ||
9254 | class PyUnbornObjectError(AttributeError): | |
9255 | pass | |
9256 | ||
9257 | class _wxPyUnbornObject(object): | |
9258 | """ | |
9259 | Some stock objects are created when the wx.core module is | |
9260 | imported, but their C++ instance is not created until the wx.App | |
9261 | object is created and initialized. These object instances will | |
9262 | temporarily have their __class__ changed to this class so an | |
9263 | exception will be raised if they are used before the C++ instance | |
9264 | is ready. | |
9265 | """ | |
9266 | ||
9267 | reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)" | |
9268 | attrStr = "The C++ part of this object has not been initialized, attribute access not allowed." | |
9269 | ||
9270 | def __repr__(self): | |
9271 | #if not hasattr(self, "_name"): | |
9272 | # self._name = "[unknown]" | |
9273 | return self.reprStr #% self._name | |
9274 | ||
9275 | def __getattr__(self, *args): | |
9276 | #if not hasattr(self, "_name"): | |
9277 | # self._name = "[unknown]" | |
9278 | raise PyUnbornObjectError(self.attrStr) # % self._name ) | |
d14a1e28 RD |
9279 | |
9280 | def __nonzero__(self): | |
9281 | return 0 | |
9282 | ||
9283 | ||
9284 | #---------------------------------------------------------------------------- | |
9285 | _wxPyCallAfterId = None | |
9286 | ||
9287 | def CallAfter(callable, *args, **kw): | |
9288 | """ | |
9289 | Call the specified function after the current and pending event | |
9290 | handlers have been completed. This is also good for making GUI | |
9291 | method calls from non-GUI threads. | |
9292 | """ | |
9293 | app = wx.GetApp() | |
9294 | assert app, 'No wxApp created yet' | |
9295 | ||
9296 | global _wxPyCallAfterId | |
9297 | if _wxPyCallAfterId is None: | |
9298 | _wxPyCallAfterId = wx.NewEventType() | |
9299 | app.Connect(-1, -1, _wxPyCallAfterId, | |
9300 | lambda event: event.callable(*event.args, **event.kw) ) | |
9301 | evt = wx.PyEvent() | |
9302 | evt.SetEventType(_wxPyCallAfterId) | |
9303 | evt.callable = callable | |
9304 | evt.args = args | |
9305 | evt.kw = kw | |
9306 | wx.PostEvent(app, evt) | |
9307 | ||
9308 | ||
9309 | #---------------------------------------------------------------------------- | |
9310 | ||
9311 | ||
9312 | class FutureCall: | |
9313 | """ | |
9314 | A convenience class for wxTimer, that calls the given callable | |
9315 | object once after the given amount of milliseconds, passing any | |
9316 | positional or keyword args. The return value of the callable is | |
9317 | availbale after it has been run with the GetResult method. | |
9318 | ||
9319 | If you don't need to get the return value or restart the timer | |
9320 | then there is no need to hold a reference to this object. It will | |
9321 | hold a reference to itself while the timer is running (the timer | |
9322 | has a reference to self.Notify) but the cycle will be broken when | |
9323 | the timer completes, automatically cleaning up the wx.FutureCall | |
9324 | object. | |
9325 | """ | |
9326 | def __init__(self, millis, callable, *args, **kwargs): | |
9327 | self.millis = millis | |
9328 | self.callable = callable | |
9329 | self.SetArgs(*args, **kwargs) | |
9330 | self.runCount = 0 | |
9331 | self.hasRun = False | |
9332 | self.result = None | |
9333 | self.timer = None | |
9334 | self.Start() | |
9335 | ||
9336 | def __del__(self): | |
9337 | self.Stop() | |
9338 | ||
9339 | ||
9340 | def Start(self, millis=None, *args, **kwargs): | |
9341 | """ | |
9342 | (Re)start the timer | |
9343 | """ | |
9344 | self.hasRun = False | |
9345 | if millis is not None: | |
9346 | self.millis = millis | |
9347 | if args or kwargs: | |
9348 | self.SetArgs(*args, **kwargs) | |
9349 | self.Stop() | |
9350 | self.timer = wx.PyTimer(self.Notify) | |
9351 | self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) | |
9352 | Restart = Start | |
9353 | ||
9354 | ||
9355 | def Stop(self): | |
9356 | """ | |
9357 | Stop and destroy the timer. | |
9358 | """ | |
9359 | if self.timer is not None: | |
9360 | self.timer.Stop() | |
9361 | self.timer = None | |
9362 | ||
9363 | ||
9364 | def GetInterval(self): | |
9365 | if self.timer is not None: | |
9366 | return self.timer.GetInterval() | |
9367 | else: | |
9368 | return 0 | |
9369 | ||
9370 | ||
9371 | def IsRunning(self): | |
9372 | return self.timer is not None and self.timer.IsRunning() | |
9373 | ||
9374 | ||
9375 | def SetArgs(self, *args, **kwargs): | |
9376 | """ | |
9377 | (Re)set the args passed to the callable object. This is | |
9378 | useful in conjunction with Restart if you want to schedule a | |
9379 | new call to the same callable object but with different | |
9380 | parameters. | |
9381 | """ | |
9382 | self.args = args | |
9383 | self.kwargs = kwargs | |
9384 | ||
9385 | ||
9386 | def HasRun(self): | |
9387 | return self.hasRun | |
9388 | ||
9389 | def GetResult(self): | |
9390 | return self.result | |
9391 | ||
9392 | def Notify(self): | |
9393 | """ | |
9394 | The timer has expired so call the callable. | |
9395 | """ | |
9396 | if self.callable and getattr(self.callable, 'im_self', True): | |
9397 | self.runCount += 1 | |
9398 | self.result = self.callable(*self.args, **self.kwargs) | |
9399 | self.hasRun = True | |
9400 | wx.CallAfter(self.Stop) | |
9401 | ||
9402 | ||
9403 | #---------------------------------------------------------------------------- | |
9404 | #---------------------------------------------------------------------------- | |
9405 | ||
9406 | # Import other modules in this package that should show up in the | |
9407 | # "core" wx namespace | |
9408 | from gdi import * | |
9409 | from windows import * | |
9410 | from controls import * | |
9411 | from misc import * | |
9412 | ||
3a04f143 RD |
9413 | |
9414 | # Fixup the stock objects since they can't be used yet. (They will be | |
9415 | # restored in wx.PyApp.OnInit.) | |
9416 | _core._wxPyFixStockObjects() | |
9417 | ||
d14a1e28 RD |
9418 | #---------------------------------------------------------------------------- |
9419 | #---------------------------------------------------------------------------- | |
9420 | ||
9421 |