]>
Commit | Line | Data |
---|---|---|
d14a1e28 RD |
1 | # This file was created automatically by SWIG. |
2 | # Don't modify this file, modify the SWIG interface instead. | |
3 | ||
54f9ee45 | 4 | import _core_ |
d14a1e28 RD |
5 | |
6 | #// Give a reference to the dictionary of this module to the C++ extension | |
7 | #// code. | |
54f9ee45 | 8 | _core_._wxPySetDictionary(vars()) |
d14a1e28 RD |
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 | ||
66c033b4 RD |
15 | |
16 | #---------------------------------------------------------------------------- | |
17 | ||
18 | def _deprecated(callable, msg=None): | |
19 | """ | |
20 | Create a wrapper function that will raise a DeprecationWarning | |
21 | before calling the callable. | |
22 | """ | |
23 | if msg is None: | |
24 | msg = "%s is deprecated" % callable | |
25 | def deprecatedWrapper(*args, **kwargs): | |
26 | import warnings | |
27 | warnings.warn(msg, DeprecationWarning, stacklevel=2) | |
28 | return callable(*args, **kwargs) | |
29 | deprecatedWrapper.__doc__ = msg | |
30 | return deprecatedWrapper | |
31 | ||
32 | ||
33 | #---------------------------------------------------------------------------- | |
34 | ||
54f9ee45 RD |
35 | NOT_FOUND = _core_.NOT_FOUND |
36 | VSCROLL = _core_.VSCROLL | |
37 | HSCROLL = _core_.HSCROLL | |
38 | CAPTION = _core_.CAPTION | |
39 | DOUBLE_BORDER = _core_.DOUBLE_BORDER | |
40 | SUNKEN_BORDER = _core_.SUNKEN_BORDER | |
41 | RAISED_BORDER = _core_.RAISED_BORDER | |
42 | BORDER = _core_.BORDER | |
43 | SIMPLE_BORDER = _core_.SIMPLE_BORDER | |
44 | STATIC_BORDER = _core_.STATIC_BORDER | |
45 | TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW | |
46 | NO_BORDER = _core_.NO_BORDER | |
47 | TAB_TRAVERSAL = _core_.TAB_TRAVERSAL | |
48 | WANTS_CHARS = _core_.WANTS_CHARS | |
49 | POPUP_WINDOW = _core_.POPUP_WINDOW | |
50 | CENTER_FRAME = _core_.CENTER_FRAME | |
51 | CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN | |
52 | CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN | |
53 | ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN | |
54 | ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM | |
55 | ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT | |
56 | ED_STATIC_LINE = _core_.ED_STATIC_LINE | |
57 | EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE | |
58 | CLIP_CHILDREN = _core_.CLIP_CHILDREN | |
59 | CLIP_SIBLINGS = _core_.CLIP_SIBLINGS | |
60 | ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB | |
61 | RETAINED = _core_.RETAINED | |
62 | BACKINGSTORE = _core_.BACKINGSTORE | |
63 | COLOURED = _core_.COLOURED | |
64 | FIXED_LENGTH = _core_.FIXED_LENGTH | |
65 | LB_NEEDED_SB = _core_.LB_NEEDED_SB | |
66 | LB_ALWAYS_SB = _core_.LB_ALWAYS_SB | |
67 | LB_SORT = _core_.LB_SORT | |
68 | LB_SINGLE = _core_.LB_SINGLE | |
69 | LB_MULTIPLE = _core_.LB_MULTIPLE | |
70 | LB_EXTENDED = _core_.LB_EXTENDED | |
71 | LB_OWNERDRAW = _core_.LB_OWNERDRAW | |
72 | LB_HSCROLL = _core_.LB_HSCROLL | |
73 | PROCESS_ENTER = _core_.PROCESS_ENTER | |
74 | PASSWORD = _core_.PASSWORD | |
75 | CB_SIMPLE = _core_.CB_SIMPLE | |
76 | CB_DROPDOWN = _core_.CB_DROPDOWN | |
77 | CB_SORT = _core_.CB_SORT | |
78 | CB_READONLY = _core_.CB_READONLY | |
79 | RA_HORIZONTAL = _core_.RA_HORIZONTAL | |
80 | RA_VERTICAL = _core_.RA_VERTICAL | |
81 | RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS | |
82 | RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS | |
83 | RB_GROUP = _core_.RB_GROUP | |
84 | RB_SINGLE = _core_.RB_SINGLE | |
85 | SL_HORIZONTAL = _core_.SL_HORIZONTAL | |
86 | SL_VERTICAL = _core_.SL_VERTICAL | |
87 | SL_AUTOTICKS = _core_.SL_AUTOTICKS | |
88 | SL_LABELS = _core_.SL_LABELS | |
89 | SL_LEFT = _core_.SL_LEFT | |
90 | SL_TOP = _core_.SL_TOP | |
91 | SL_RIGHT = _core_.SL_RIGHT | |
92 | SL_BOTTOM = _core_.SL_BOTTOM | |
93 | SL_BOTH = _core_.SL_BOTH | |
94 | SL_SELRANGE = _core_.SL_SELRANGE | |
95 | SB_HORIZONTAL = _core_.SB_HORIZONTAL | |
96 | SB_VERTICAL = _core_.SB_VERTICAL | |
97 | ST_SIZEGRIP = _core_.ST_SIZEGRIP | |
98 | ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE | |
99 | FLOOD_SURFACE = _core_.FLOOD_SURFACE | |
100 | FLOOD_BORDER = _core_.FLOOD_BORDER | |
101 | ODDEVEN_RULE = _core_.ODDEVEN_RULE | |
102 | WINDING_RULE = _core_.WINDING_RULE | |
103 | TOOL_TOP = _core_.TOOL_TOP | |
104 | TOOL_BOTTOM = _core_.TOOL_BOTTOM | |
105 | TOOL_LEFT = _core_.TOOL_LEFT | |
106 | TOOL_RIGHT = _core_.TOOL_RIGHT | |
107 | OK = _core_.OK | |
108 | YES_NO = _core_.YES_NO | |
109 | CANCEL = _core_.CANCEL | |
110 | YES = _core_.YES | |
111 | NO = _core_.NO | |
112 | NO_DEFAULT = _core_.NO_DEFAULT | |
113 | YES_DEFAULT = _core_.YES_DEFAULT | |
114 | ICON_EXCLAMATION = _core_.ICON_EXCLAMATION | |
115 | ICON_HAND = _core_.ICON_HAND | |
116 | ICON_QUESTION = _core_.ICON_QUESTION | |
117 | ICON_INFORMATION = _core_.ICON_INFORMATION | |
118 | ICON_STOP = _core_.ICON_STOP | |
119 | ICON_ASTERISK = _core_.ICON_ASTERISK | |
120 | ICON_MASK = _core_.ICON_MASK | |
121 | ICON_WARNING = _core_.ICON_WARNING | |
122 | ICON_ERROR = _core_.ICON_ERROR | |
123 | FORWARD = _core_.FORWARD | |
124 | BACKWARD = _core_.BACKWARD | |
125 | RESET = _core_.RESET | |
126 | HELP = _core_.HELP | |
127 | MORE = _core_.MORE | |
128 | SETUP = _core_.SETUP | |
129 | SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH | |
130 | SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT | |
131 | SIZE_AUTO = _core_.SIZE_AUTO | |
132 | SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING | |
133 | SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE | |
134 | PORTRAIT = _core_.PORTRAIT | |
135 | LANDSCAPE = _core_.LANDSCAPE | |
136 | PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH | |
137 | PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM | |
138 | PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW | |
139 | PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT | |
140 | ID_ANY = _core_.ID_ANY | |
141 | ID_SEPARATOR = _core_.ID_SEPARATOR | |
142 | ID_LOWEST = _core_.ID_LOWEST | |
143 | ID_OPEN = _core_.ID_OPEN | |
144 | ID_CLOSE = _core_.ID_CLOSE | |
145 | ID_NEW = _core_.ID_NEW | |
146 | ID_SAVE = _core_.ID_SAVE | |
147 | ID_SAVEAS = _core_.ID_SAVEAS | |
148 | ID_REVERT = _core_.ID_REVERT | |
149 | ID_EXIT = _core_.ID_EXIT | |
150 | ID_UNDO = _core_.ID_UNDO | |
151 | ID_REDO = _core_.ID_REDO | |
152 | ID_HELP = _core_.ID_HELP | |
153 | ID_PRINT = _core_.ID_PRINT | |
154 | ID_PRINT_SETUP = _core_.ID_PRINT_SETUP | |
155 | ID_PREVIEW = _core_.ID_PREVIEW | |
156 | ID_ABOUT = _core_.ID_ABOUT | |
157 | ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS | |
158 | ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS | |
159 | ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES | |
160 | ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT | |
161 | ID_CLOSE_ALL = _core_.ID_CLOSE_ALL | |
162 | ID_PREFERENCES = _core_.ID_PREFERENCES | |
163 | ID_CUT = _core_.ID_CUT | |
164 | ID_COPY = _core_.ID_COPY | |
165 | ID_PASTE = _core_.ID_PASTE | |
166 | ID_CLEAR = _core_.ID_CLEAR | |
167 | ID_FIND = _core_.ID_FIND | |
168 | ID_DUPLICATE = _core_.ID_DUPLICATE | |
169 | ID_SELECTALL = _core_.ID_SELECTALL | |
170 | ID_DELETE = _core_.ID_DELETE | |
171 | ID_REPLACE = _core_.ID_REPLACE | |
172 | ID_REPLACE_ALL = _core_.ID_REPLACE_ALL | |
173 | ID_PROPERTIES = _core_.ID_PROPERTIES | |
174 | ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS | |
175 | ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS | |
176 | ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS | |
177 | ID_VIEW_LIST = _core_.ID_VIEW_LIST | |
178 | ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE | |
179 | ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME | |
180 | ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE | |
181 | ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE | |
182 | ID_FILE1 = _core_.ID_FILE1 | |
183 | ID_FILE2 = _core_.ID_FILE2 | |
184 | ID_FILE3 = _core_.ID_FILE3 | |
185 | ID_FILE4 = _core_.ID_FILE4 | |
186 | ID_FILE5 = _core_.ID_FILE5 | |
187 | ID_FILE6 = _core_.ID_FILE6 | |
188 | ID_FILE7 = _core_.ID_FILE7 | |
189 | ID_FILE8 = _core_.ID_FILE8 | |
190 | ID_FILE9 = _core_.ID_FILE9 | |
191 | ID_OK = _core_.ID_OK | |
192 | ID_CANCEL = _core_.ID_CANCEL | |
193 | ID_APPLY = _core_.ID_APPLY | |
194 | ID_YES = _core_.ID_YES | |
195 | ID_NO = _core_.ID_NO | |
196 | ID_STATIC = _core_.ID_STATIC | |
197 | ID_FORWARD = _core_.ID_FORWARD | |
198 | ID_BACKWARD = _core_.ID_BACKWARD | |
199 | ID_DEFAULT = _core_.ID_DEFAULT | |
200 | ID_MORE = _core_.ID_MORE | |
201 | ID_SETUP = _core_.ID_SETUP | |
202 | ID_RESET = _core_.ID_RESET | |
203 | ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP | |
204 | ID_YESTOALL = _core_.ID_YESTOALL | |
205 | ID_NOTOALL = _core_.ID_NOTOALL | |
206 | ID_ABORT = _core_.ID_ABORT | |
207 | ID_RETRY = _core_.ID_RETRY | |
208 | ID_IGNORE = _core_.ID_IGNORE | |
7bc1e663 RD |
209 | ID_ADD = _core_.ID_ADD |
210 | ID_REMOVE = _core_.ID_REMOVE | |
211 | ID_UP = _core_.ID_UP | |
212 | ID_DOWN = _core_.ID_DOWN | |
213 | ID_HOME = _core_.ID_HOME | |
214 | ID_REFRESH = _core_.ID_REFRESH | |
215 | ID_STOP = _core_.ID_STOP | |
216 | ID_INDEX = _core_.ID_INDEX | |
217 | ID_BOLD = _core_.ID_BOLD | |
218 | ID_ITALIC = _core_.ID_ITALIC | |
219 | ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER | |
220 | ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL | |
221 | ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT | |
222 | ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT | |
223 | ID_UNDERLINE = _core_.ID_UNDERLINE | |
224 | ID_INDENT = _core_.ID_INDENT | |
225 | ID_UNINDENT = _core_.ID_UNINDENT | |
226 | ID_ZOOM_100 = _core_.ID_ZOOM_100 | |
227 | ID_ZOOM_FIT = _core_.ID_ZOOM_FIT | |
228 | ID_ZOOM_IN = _core_.ID_ZOOM_IN | |
229 | ID_ZOOM_OUT = _core_.ID_ZOOM_OUT | |
230 | ID_UNDELETE = _core_.ID_UNDELETE | |
231 | ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED | |
54f9ee45 RD |
232 | ID_HIGHEST = _core_.ID_HIGHEST |
233 | OPEN = _core_.OPEN | |
234 | SAVE = _core_.SAVE | |
235 | HIDE_READONLY = _core_.HIDE_READONLY | |
236 | OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT | |
237 | FILE_MUST_EXIST = _core_.FILE_MUST_EXIST | |
238 | MULTIPLE = _core_.MULTIPLE | |
239 | CHANGE_DIR = _core_.CHANGE_DIR | |
240 | ACCEL_ALT = _core_.ACCEL_ALT | |
241 | ACCEL_CTRL = _core_.ACCEL_CTRL | |
242 | ACCEL_SHIFT = _core_.ACCEL_SHIFT | |
243 | ACCEL_NORMAL = _core_.ACCEL_NORMAL | |
244 | PD_AUTO_HIDE = _core_.PD_AUTO_HIDE | |
245 | PD_APP_MODAL = _core_.PD_APP_MODAL | |
246 | PD_CAN_ABORT = _core_.PD_CAN_ABORT | |
247 | PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME | |
248 | PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME | |
249 | PD_REMAINING_TIME = _core_.PD_REMAINING_TIME | |
250 | DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON | |
251 | DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE | |
252 | MENU_TEAROFF = _core_.MENU_TEAROFF | |
253 | MB_DOCKABLE = _core_.MB_DOCKABLE | |
254 | NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE | |
255 | FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE | |
256 | LI_HORIZONTAL = _core_.LI_HORIZONTAL | |
257 | LI_VERTICAL = _core_.LI_VERTICAL | |
258 | WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY | |
259 | WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS | |
260 | WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT | |
261 | WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND | |
262 | WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE | |
263 | WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES | |
264 | MM_TEXT = _core_.MM_TEXT | |
265 | MM_LOMETRIC = _core_.MM_LOMETRIC | |
266 | MM_HIMETRIC = _core_.MM_HIMETRIC | |
267 | MM_LOENGLISH = _core_.MM_LOENGLISH | |
268 | MM_HIENGLISH = _core_.MM_HIENGLISH | |
269 | MM_TWIPS = _core_.MM_TWIPS | |
270 | MM_ISOTROPIC = _core_.MM_ISOTROPIC | |
271 | MM_ANISOTROPIC = _core_.MM_ANISOTROPIC | |
272 | MM_POINTS = _core_.MM_POINTS | |
273 | MM_METRIC = _core_.MM_METRIC | |
274 | CENTRE = _core_.CENTRE | |
275 | CENTER = _core_.CENTER | |
276 | HORIZONTAL = _core_.HORIZONTAL | |
277 | VERTICAL = _core_.VERTICAL | |
278 | BOTH = _core_.BOTH | |
279 | LEFT = _core_.LEFT | |
280 | RIGHT = _core_.RIGHT | |
281 | UP = _core_.UP | |
282 | DOWN = _core_.DOWN | |
283 | TOP = _core_.TOP | |
284 | BOTTOM = _core_.BOTTOM | |
285 | NORTH = _core_.NORTH | |
286 | SOUTH = _core_.SOUTH | |
287 | WEST = _core_.WEST | |
288 | EAST = _core_.EAST | |
289 | ALL = _core_.ALL | |
290 | ALIGN_NOT = _core_.ALIGN_NOT | |
291 | ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL | |
292 | ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL | |
293 | ALIGN_LEFT = _core_.ALIGN_LEFT | |
294 | ALIGN_TOP = _core_.ALIGN_TOP | |
295 | ALIGN_RIGHT = _core_.ALIGN_RIGHT | |
296 | ALIGN_BOTTOM = _core_.ALIGN_BOTTOM | |
297 | ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL | |
298 | ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL | |
299 | ALIGN_CENTER = _core_.ALIGN_CENTER | |
300 | ALIGN_CENTRE = _core_.ALIGN_CENTRE | |
301 | ALIGN_MASK = _core_.ALIGN_MASK | |
302 | STRETCH_NOT = _core_.STRETCH_NOT | |
303 | SHRINK = _core_.SHRINK | |
304 | GROW = _core_.GROW | |
305 | EXPAND = _core_.EXPAND | |
306 | SHAPED = _core_.SHAPED | |
307 | FIXED_MINSIZE = _core_.FIXED_MINSIZE | |
308 | TILE = _core_.TILE | |
309 | ADJUST_MINSIZE = _core_.ADJUST_MINSIZE | |
310 | BORDER_DEFAULT = _core_.BORDER_DEFAULT | |
311 | BORDER_NONE = _core_.BORDER_NONE | |
312 | BORDER_STATIC = _core_.BORDER_STATIC | |
313 | BORDER_SIMPLE = _core_.BORDER_SIMPLE | |
314 | BORDER_RAISED = _core_.BORDER_RAISED | |
315 | BORDER_SUNKEN = _core_.BORDER_SUNKEN | |
316 | BORDER_DOUBLE = _core_.BORDER_DOUBLE | |
317 | BORDER_MASK = _core_.BORDER_MASK | |
7bc1e663 RD |
318 | BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM |
319 | BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR | |
320 | BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM | |
54f9ee45 RD |
321 | DEFAULT = _core_.DEFAULT |
322 | DECORATIVE = _core_.DECORATIVE | |
323 | ROMAN = _core_.ROMAN | |
324 | SCRIPT = _core_.SCRIPT | |
325 | SWISS = _core_.SWISS | |
326 | MODERN = _core_.MODERN | |
327 | TELETYPE = _core_.TELETYPE | |
328 | VARIABLE = _core_.VARIABLE | |
329 | FIXED = _core_.FIXED | |
330 | NORMAL = _core_.NORMAL | |
331 | LIGHT = _core_.LIGHT | |
332 | BOLD = _core_.BOLD | |
333 | ITALIC = _core_.ITALIC | |
334 | SLANT = _core_.SLANT | |
335 | SOLID = _core_.SOLID | |
336 | DOT = _core_.DOT | |
337 | LONG_DASH = _core_.LONG_DASH | |
338 | SHORT_DASH = _core_.SHORT_DASH | |
339 | DOT_DASH = _core_.DOT_DASH | |
340 | USER_DASH = _core_.USER_DASH | |
341 | TRANSPARENT = _core_.TRANSPARENT | |
342 | STIPPLE = _core_.STIPPLE | |
343 | BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH | |
344 | CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH | |
345 | FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH | |
346 | CROSS_HATCH = _core_.CROSS_HATCH | |
347 | HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH | |
348 | VERTICAL_HATCH = _core_.VERTICAL_HATCH | |
349 | JOIN_BEVEL = _core_.JOIN_BEVEL | |
350 | JOIN_MITER = _core_.JOIN_MITER | |
351 | JOIN_ROUND = _core_.JOIN_ROUND | |
352 | CAP_ROUND = _core_.CAP_ROUND | |
353 | CAP_PROJECTING = _core_.CAP_PROJECTING | |
354 | CAP_BUTT = _core_.CAP_BUTT | |
355 | CLEAR = _core_.CLEAR | |
356 | XOR = _core_.XOR | |
357 | INVERT = _core_.INVERT | |
358 | OR_REVERSE = _core_.OR_REVERSE | |
359 | AND_REVERSE = _core_.AND_REVERSE | |
360 | COPY = _core_.COPY | |
361 | AND = _core_.AND | |
362 | AND_INVERT = _core_.AND_INVERT | |
363 | NO_OP = _core_.NO_OP | |
364 | NOR = _core_.NOR | |
365 | EQUIV = _core_.EQUIV | |
366 | SRC_INVERT = _core_.SRC_INVERT | |
367 | OR_INVERT = _core_.OR_INVERT | |
368 | NAND = _core_.NAND | |
369 | OR = _core_.OR | |
370 | SET = _core_.SET | |
371 | WXK_BACK = _core_.WXK_BACK | |
372 | WXK_TAB = _core_.WXK_TAB | |
373 | WXK_RETURN = _core_.WXK_RETURN | |
374 | WXK_ESCAPE = _core_.WXK_ESCAPE | |
375 | WXK_SPACE = _core_.WXK_SPACE | |
376 | WXK_DELETE = _core_.WXK_DELETE | |
377 | WXK_START = _core_.WXK_START | |
378 | WXK_LBUTTON = _core_.WXK_LBUTTON | |
379 | WXK_RBUTTON = _core_.WXK_RBUTTON | |
380 | WXK_CANCEL = _core_.WXK_CANCEL | |
381 | WXK_MBUTTON = _core_.WXK_MBUTTON | |
382 | WXK_CLEAR = _core_.WXK_CLEAR | |
383 | WXK_SHIFT = _core_.WXK_SHIFT | |
384 | WXK_ALT = _core_.WXK_ALT | |
385 | WXK_CONTROL = _core_.WXK_CONTROL | |
386 | WXK_MENU = _core_.WXK_MENU | |
387 | WXK_PAUSE = _core_.WXK_PAUSE | |
388 | WXK_CAPITAL = _core_.WXK_CAPITAL | |
389 | WXK_PRIOR = _core_.WXK_PRIOR | |
390 | WXK_NEXT = _core_.WXK_NEXT | |
391 | WXK_END = _core_.WXK_END | |
392 | WXK_HOME = _core_.WXK_HOME | |
393 | WXK_LEFT = _core_.WXK_LEFT | |
394 | WXK_UP = _core_.WXK_UP | |
395 | WXK_RIGHT = _core_.WXK_RIGHT | |
396 | WXK_DOWN = _core_.WXK_DOWN | |
397 | WXK_SELECT = _core_.WXK_SELECT | |
398 | WXK_PRINT = _core_.WXK_PRINT | |
399 | WXK_EXECUTE = _core_.WXK_EXECUTE | |
400 | WXK_SNAPSHOT = _core_.WXK_SNAPSHOT | |
401 | WXK_INSERT = _core_.WXK_INSERT | |
402 | WXK_HELP = _core_.WXK_HELP | |
403 | WXK_NUMPAD0 = _core_.WXK_NUMPAD0 | |
404 | WXK_NUMPAD1 = _core_.WXK_NUMPAD1 | |
405 | WXK_NUMPAD2 = _core_.WXK_NUMPAD2 | |
406 | WXK_NUMPAD3 = _core_.WXK_NUMPAD3 | |
407 | WXK_NUMPAD4 = _core_.WXK_NUMPAD4 | |
408 | WXK_NUMPAD5 = _core_.WXK_NUMPAD5 | |
409 | WXK_NUMPAD6 = _core_.WXK_NUMPAD6 | |
410 | WXK_NUMPAD7 = _core_.WXK_NUMPAD7 | |
411 | WXK_NUMPAD8 = _core_.WXK_NUMPAD8 | |
412 | WXK_NUMPAD9 = _core_.WXK_NUMPAD9 | |
413 | WXK_MULTIPLY = _core_.WXK_MULTIPLY | |
414 | WXK_ADD = _core_.WXK_ADD | |
415 | WXK_SEPARATOR = _core_.WXK_SEPARATOR | |
416 | WXK_SUBTRACT = _core_.WXK_SUBTRACT | |
417 | WXK_DECIMAL = _core_.WXK_DECIMAL | |
418 | WXK_DIVIDE = _core_.WXK_DIVIDE | |
419 | WXK_F1 = _core_.WXK_F1 | |
420 | WXK_F2 = _core_.WXK_F2 | |
421 | WXK_F3 = _core_.WXK_F3 | |
422 | WXK_F4 = _core_.WXK_F4 | |
423 | WXK_F5 = _core_.WXK_F5 | |
424 | WXK_F6 = _core_.WXK_F6 | |
425 | WXK_F7 = _core_.WXK_F7 | |
426 | WXK_F8 = _core_.WXK_F8 | |
427 | WXK_F9 = _core_.WXK_F9 | |
428 | WXK_F10 = _core_.WXK_F10 | |
429 | WXK_F11 = _core_.WXK_F11 | |
430 | WXK_F12 = _core_.WXK_F12 | |
431 | WXK_F13 = _core_.WXK_F13 | |
432 | WXK_F14 = _core_.WXK_F14 | |
433 | WXK_F15 = _core_.WXK_F15 | |
434 | WXK_F16 = _core_.WXK_F16 | |
435 | WXK_F17 = _core_.WXK_F17 | |
436 | WXK_F18 = _core_.WXK_F18 | |
437 | WXK_F19 = _core_.WXK_F19 | |
438 | WXK_F20 = _core_.WXK_F20 | |
439 | WXK_F21 = _core_.WXK_F21 | |
440 | WXK_F22 = _core_.WXK_F22 | |
441 | WXK_F23 = _core_.WXK_F23 | |
442 | WXK_F24 = _core_.WXK_F24 | |
443 | WXK_NUMLOCK = _core_.WXK_NUMLOCK | |
444 | WXK_SCROLL = _core_.WXK_SCROLL | |
445 | WXK_PAGEUP = _core_.WXK_PAGEUP | |
446 | WXK_PAGEDOWN = _core_.WXK_PAGEDOWN | |
447 | WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE | |
448 | WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB | |
449 | WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER | |
450 | WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1 | |
451 | WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2 | |
452 | WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3 | |
453 | WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4 | |
454 | WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME | |
455 | WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT | |
456 | WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP | |
457 | WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT | |
458 | WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN | |
459 | WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR | |
460 | WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP | |
461 | WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT | |
462 | WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN | |
463 | WXK_NUMPAD_END = _core_.WXK_NUMPAD_END | |
464 | WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN | |
465 | WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT | |
466 | WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE | |
467 | WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL | |
468 | WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY | |
469 | WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD | |
470 | WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR | |
471 | WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT | |
472 | WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL | |
473 | WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE | |
474 | WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT | |
475 | WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT | |
476 | WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU | |
477 | PAPER_NONE = _core_.PAPER_NONE | |
478 | PAPER_LETTER = _core_.PAPER_LETTER | |
479 | PAPER_LEGAL = _core_.PAPER_LEGAL | |
480 | PAPER_A4 = _core_.PAPER_A4 | |
481 | PAPER_CSHEET = _core_.PAPER_CSHEET | |
482 | PAPER_DSHEET = _core_.PAPER_DSHEET | |
483 | PAPER_ESHEET = _core_.PAPER_ESHEET | |
484 | PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL | |
485 | PAPER_TABLOID = _core_.PAPER_TABLOID | |
486 | PAPER_LEDGER = _core_.PAPER_LEDGER | |
487 | PAPER_STATEMENT = _core_.PAPER_STATEMENT | |
488 | PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE | |
489 | PAPER_A3 = _core_.PAPER_A3 | |
490 | PAPER_A4SMALL = _core_.PAPER_A4SMALL | |
491 | PAPER_A5 = _core_.PAPER_A5 | |
492 | PAPER_B4 = _core_.PAPER_B4 | |
493 | PAPER_B5 = _core_.PAPER_B5 | |
494 | PAPER_FOLIO = _core_.PAPER_FOLIO | |
495 | PAPER_QUARTO = _core_.PAPER_QUARTO | |
496 | PAPER_10X14 = _core_.PAPER_10X14 | |
497 | PAPER_11X17 = _core_.PAPER_11X17 | |
498 | PAPER_NOTE = _core_.PAPER_NOTE | |
499 | PAPER_ENV_9 = _core_.PAPER_ENV_9 | |
500 | PAPER_ENV_10 = _core_.PAPER_ENV_10 | |
501 | PAPER_ENV_11 = _core_.PAPER_ENV_11 | |
502 | PAPER_ENV_12 = _core_.PAPER_ENV_12 | |
503 | PAPER_ENV_14 = _core_.PAPER_ENV_14 | |
504 | PAPER_ENV_DL = _core_.PAPER_ENV_DL | |
505 | PAPER_ENV_C5 = _core_.PAPER_ENV_C5 | |
506 | PAPER_ENV_C3 = _core_.PAPER_ENV_C3 | |
507 | PAPER_ENV_C4 = _core_.PAPER_ENV_C4 | |
508 | PAPER_ENV_C6 = _core_.PAPER_ENV_C6 | |
509 | PAPER_ENV_C65 = _core_.PAPER_ENV_C65 | |
510 | PAPER_ENV_B4 = _core_.PAPER_ENV_B4 | |
511 | PAPER_ENV_B5 = _core_.PAPER_ENV_B5 | |
512 | PAPER_ENV_B6 = _core_.PAPER_ENV_B6 | |
513 | PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY | |
514 | PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH | |
515 | PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL | |
516 | PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US | |
517 | PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN | |
518 | PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN | |
519 | PAPER_ISO_B4 = _core_.PAPER_ISO_B4 | |
520 | PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD | |
521 | PAPER_9X11 = _core_.PAPER_9X11 | |
522 | PAPER_10X11 = _core_.PAPER_10X11 | |
523 | PAPER_15X11 = _core_.PAPER_15X11 | |
524 | PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE | |
525 | PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA | |
526 | PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA | |
527 | PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA | |
528 | PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA | |
529 | PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE | |
530 | PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE | |
531 | PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE | |
532 | PAPER_A_PLUS = _core_.PAPER_A_PLUS | |
533 | PAPER_B_PLUS = _core_.PAPER_B_PLUS | |
534 | PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS | |
535 | PAPER_A4_PLUS = _core_.PAPER_A4_PLUS | |
536 | PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE | |
537 | PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE | |
538 | PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA | |
539 | PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA | |
540 | PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA | |
541 | PAPER_A2 = _core_.PAPER_A2 | |
542 | PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE | |
543 | PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE | |
544 | DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX | |
545 | DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL | |
546 | DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL | |
547 | ITEM_SEPARATOR = _core_.ITEM_SEPARATOR | |
548 | ITEM_NORMAL = _core_.ITEM_NORMAL | |
549 | ITEM_CHECK = _core_.ITEM_CHECK | |
550 | ITEM_RADIO = _core_.ITEM_RADIO | |
551 | ITEM_MAX = _core_.ITEM_MAX | |
552 | HT_NOWHERE = _core_.HT_NOWHERE | |
553 | HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST | |
554 | HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1 | |
555 | HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2 | |
556 | HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1 | |
557 | HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2 | |
558 | HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB | |
559 | HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1 | |
560 | HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2 | |
561 | HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST | |
562 | HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE | |
563 | HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE | |
564 | HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR | |
565 | HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR | |
566 | HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER | |
567 | HT_MAX = _core_.HT_MAX | |
568 | MOD_NONE = _core_.MOD_NONE | |
569 | MOD_ALT = _core_.MOD_ALT | |
570 | MOD_CONTROL = _core_.MOD_CONTROL | |
571 | MOD_SHIFT = _core_.MOD_SHIFT | |
572 | MOD_WIN = _core_.MOD_WIN | |
573 | UPDATE_UI_NONE = _core_.UPDATE_UI_NONE | |
574 | UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE | |
575 | UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE | |
d14a1e28 RD |
576 | #--------------------------------------------------------------------------- |
577 | ||
578 | class Object(object): | |
0df68c9f RD |
579 | """ |
580 | The base class for most wx objects, although in wxPython not | |
581 | much functionality is needed nor exposed. | |
582 | """ | |
d14a1e28 RD |
583 | def __init__(self): raise RuntimeError, "No constructor defined" |
584 | def __repr__(self): | |
585 | return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 586 | def GetClassName(*args, **kwargs): |
0df68c9f | 587 | """ |
a95a7133 | 588 | GetClassName(self) -> String |
e811c8ce | 589 | |
a95a7133 | 590 | Returns the class name of the C++ class using wxRTTI. |
0df68c9f | 591 | """ |
54f9ee45 | 592 | return _core_.Object_GetClassName(*args, **kwargs) |
e811c8ce RD |
593 | |
594 | def Destroy(*args, **kwargs): | |
0df68c9f | 595 | """ |
a95a7133 | 596 | Destroy(self) |
e811c8ce | 597 | |
0df68c9f RD |
598 | Deletes the C++ object this Python object is a proxy for. |
599 | """ | |
54f9ee45 | 600 | return _core_.Object_Destroy(*args, **kwargs) |
e811c8ce | 601 | |
d14a1e28 RD |
602 | |
603 | class ObjectPtr(Object): | |
604 | def __init__(self, this): | |
605 | self.this = this | |
606 | if not hasattr(self,"thisown"): self.thisown = 0 | |
607 | self.__class__ = Object | |
54f9ee45 RD |
608 | _core_.Object_swigregister(ObjectPtr) |
609 | _wxPySetDictionary = _core_._wxPySetDictionary | |
d14a1e28 | 610 | |
54f9ee45 | 611 | _wxPyFixStockObjects = _core_._wxPyFixStockObjects |
3a04f143 | 612 | |
54f9ee45 | 613 | cvar = _core_.cvar |
196addbf | 614 | EmptyString = cvar.EmptyString |
d14a1e28 RD |
615 | |
616 | #--------------------------------------------------------------------------- | |
617 | ||
54f9ee45 RD |
618 | BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID |
619 | BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP | |
620 | BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO | |
621 | BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR | |
622 | BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM | |
623 | BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA | |
624 | BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM | |
625 | BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA | |
626 | BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF | |
627 | BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF | |
628 | BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG | |
629 | BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG | |
630 | BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM | |
631 | BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX | |
632 | BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT | |
633 | BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON | |
634 | BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI | |
635 | BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF | |
636 | BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR | |
637 | BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY | |
638 | CURSOR_NONE = _core_.CURSOR_NONE | |
639 | CURSOR_ARROW = _core_.CURSOR_ARROW | |
640 | CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW | |
641 | CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE | |
642 | CURSOR_CHAR = _core_.CURSOR_CHAR | |
643 | CURSOR_CROSS = _core_.CURSOR_CROSS | |
644 | CURSOR_HAND = _core_.CURSOR_HAND | |
645 | CURSOR_IBEAM = _core_.CURSOR_IBEAM | |
646 | CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON | |
647 | CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER | |
648 | CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON | |
649 | CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY | |
650 | CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH | |
651 | CURSOR_PENCIL = _core_.CURSOR_PENCIL | |
652 | CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT | |
653 | CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT | |
654 | CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW | |
655 | CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON | |
656 | CURSOR_SIZENESW = _core_.CURSOR_SIZENESW | |
657 | CURSOR_SIZENS = _core_.CURSOR_SIZENS | |
658 | CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE | |
659 | CURSOR_SIZEWE = _core_.CURSOR_SIZEWE | |
660 | CURSOR_SIZING = _core_.CURSOR_SIZING | |
661 | CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN | |
662 | CURSOR_WAIT = _core_.CURSOR_WAIT | |
663 | CURSOR_WATCH = _core_.CURSOR_WATCH | |
664 | CURSOR_BLANK = _core_.CURSOR_BLANK | |
665 | CURSOR_DEFAULT = _core_.CURSOR_DEFAULT | |
666 | CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW | |
667 | CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT | |
668 | CURSOR_MAX = _core_.CURSOR_MAX | |
d14a1e28 RD |
669 | #--------------------------------------------------------------------------- |
670 | ||
671 | class Size(object): | |
0df68c9f | 672 | """ |
41e2b43e RD |
673 | wx.Size is a useful data structure used to represent the size of |
674 | something. It simply contians integer width and height proprtites. | |
675 | In most places in wxPython where a wx.Size is expected a | |
676 | (width,height) tuple can be used instead. | |
0df68c9f | 677 | """ |
e811c8ce RD |
678 | def __repr__(self): |
679 | return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
680 | width = property(_core_.Size_width_get, _core_.Size_width_set) |
681 | height = property(_core_.Size_height_get, _core_.Size_height_set) | |
242b7b46 | 682 | x = width; y = height |
d14a1e28 | 683 | def __init__(self, *args, **kwargs): |
0df68c9f | 684 | """ |
a95a7133 | 685 | __init__(self, int w=0, int h=0) -> Size |
e811c8ce | 686 | |
0df68c9f RD |
687 | Creates a size object. |
688 | """ | |
54f9ee45 | 689 | newobj = _core_.new_Size(*args, **kwargs) |
d14a1e28 RD |
690 | self.this = newobj.this |
691 | self.thisown = 1 | |
692 | del newobj.thisown | |
54f9ee45 | 693 | def __del__(self, destroy=_core_.delete_Size): |
a95a7133 | 694 | """__del__(self)""" |
d14a1e28 RD |
695 | try: |
696 | if self.thisown: destroy(self) | |
697 | except: pass | |
e811c8ce RD |
698 | |
699 | def __eq__(*args, **kwargs): | |
0df68c9f | 700 | """ |
a95a7133 | 701 | __eq__(self, Size sz) -> bool |
e811c8ce | 702 | |
0df68c9f RD |
703 | Test for equality of wx.Size objects. |
704 | """ | |
54f9ee45 | 705 | return _core_.Size___eq__(*args, **kwargs) |
e811c8ce RD |
706 | |
707 | def __ne__(*args, **kwargs): | |
0df68c9f | 708 | """ |
a95a7133 | 709 | __ne__(self, Size sz) -> bool |
e811c8ce | 710 | |
0df68c9f RD |
711 | Test for inequality. |
712 | """ | |
54f9ee45 | 713 | return _core_.Size___ne__(*args, **kwargs) |
e811c8ce RD |
714 | |
715 | def __add__(*args, **kwargs): | |
0df68c9f | 716 | """ |
a95a7133 | 717 | __add__(self, Size sz) -> Size |
e811c8ce | 718 | |
0df68c9f RD |
719 | Add sz's proprties to this and return the result. |
720 | """ | |
54f9ee45 | 721 | return _core_.Size___add__(*args, **kwargs) |
e811c8ce RD |
722 | |
723 | def __sub__(*args, **kwargs): | |
0df68c9f | 724 | """ |
a95a7133 | 725 | __sub__(self, Size sz) -> Size |
e811c8ce | 726 | |
0df68c9f RD |
727 | Subtract sz's properties from this and return the result. |
728 | """ | |
54f9ee45 | 729 | return _core_.Size___sub__(*args, **kwargs) |
e811c8ce RD |
730 | |
731 | def IncTo(*args, **kwargs): | |
0df68c9f | 732 | """ |
a95a7133 | 733 | IncTo(self, Size sz) |
e811c8ce | 734 | |
0df68c9f RD |
735 | Increments this object so that both of its dimensions are not less |
736 | than the corresponding dimensions of the size. | |
737 | """ | |
54f9ee45 | 738 | return _core_.Size_IncTo(*args, **kwargs) |
e811c8ce RD |
739 | |
740 | def DecTo(*args, **kwargs): | |
0df68c9f | 741 | """ |
a95a7133 | 742 | DecTo(self, Size sz) |
e811c8ce | 743 | |
0df68c9f RD |
744 | Decrements this object so that both of its dimensions are not greater |
745 | than the corresponding dimensions of the size. | |
746 | """ | |
54f9ee45 | 747 | return _core_.Size_DecTo(*args, **kwargs) |
e811c8ce RD |
748 | |
749 | def Set(*args, **kwargs): | |
0df68c9f | 750 | """ |
a95a7133 | 751 | Set(self, int w, int h) |
e811c8ce | 752 | |
0df68c9f RD |
753 | Set both width and height. |
754 | """ | |
54f9ee45 | 755 | return _core_.Size_Set(*args, **kwargs) |
e811c8ce RD |
756 | |
757 | def SetWidth(*args, **kwargs): | |
a95a7133 | 758 | """SetWidth(self, int w)""" |
54f9ee45 | 759 | return _core_.Size_SetWidth(*args, **kwargs) |
e811c8ce RD |
760 | |
761 | def SetHeight(*args, **kwargs): | |
a95a7133 | 762 | """SetHeight(self, int h)""" |
54f9ee45 | 763 | return _core_.Size_SetHeight(*args, **kwargs) |
e811c8ce RD |
764 | |
765 | def GetWidth(*args, **kwargs): | |
a95a7133 | 766 | """GetWidth(self) -> int""" |
54f9ee45 | 767 | return _core_.Size_GetWidth(*args, **kwargs) |
e811c8ce RD |
768 | |
769 | def GetHeight(*args, **kwargs): | |
a95a7133 | 770 | """GetHeight(self) -> int""" |
54f9ee45 | 771 | return _core_.Size_GetHeight(*args, **kwargs) |
e811c8ce | 772 | |
74a57fcd RD |
773 | def IsFullySpecified(*args, **kwargs): |
774 | """ | |
a95a7133 | 775 | IsFullySpecified(self) -> bool |
74a57fcd RD |
776 | |
777 | Returns True if both components of the size are non-default values. | |
778 | """ | |
54f9ee45 | 779 | return _core_.Size_IsFullySpecified(*args, **kwargs) |
74a57fcd RD |
780 | |
781 | def SetDefaults(*args, **kwargs): | |
782 | """ | |
a95a7133 | 783 | SetDefaults(self, Size size) |
74a57fcd | 784 | |
41e2b43e RD |
785 | Combine this size with the other one replacing the default components |
786 | of this object (i.e. equal to -1) with those of the other. | |
74a57fcd | 787 | """ |
54f9ee45 | 788 | return _core_.Size_SetDefaults(*args, **kwargs) |
74a57fcd | 789 | |
e811c8ce | 790 | def Get(*args, **kwargs): |
0df68c9f RD |
791 | """ |
792 | Get() -> (width,height) | |
e811c8ce | 793 | |
0df68c9f RD |
794 | Returns the width and height properties as a tuple. |
795 | """ | |
54f9ee45 | 796 | return _core_.Size_Get(*args, **kwargs) |
e811c8ce | 797 | |
41e2b43e | 798 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
799 | def __str__(self): return str(self.Get()) |
800 | def __repr__(self): return 'wx.Size'+str(self.Get()) | |
801 | def __len__(self): return len(self.Get()) | |
802 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
803 | def __setitem__(self, index, val): |
804 | if index == 0: self.width = val | |
805 | elif index == 1: self.height = val | |
806 | else: raise IndexError | |
e811c8ce | 807 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
808 | __safe_for_unpickling__ = True |
809 | def __reduce__(self): return (wx.Size, self.Get()) | |
d14a1e28 RD |
810 | |
811 | ||
812 | class SizePtr(Size): | |
813 | def __init__(self, this): | |
814 | self.this = this | |
815 | if not hasattr(self,"thisown"): self.thisown = 0 | |
816 | self.__class__ = Size | |
54f9ee45 | 817 | _core_.Size_swigregister(SizePtr) |
d14a1e28 RD |
818 | |
819 | #--------------------------------------------------------------------------- | |
820 | ||
821 | class RealPoint(object): | |
0df68c9f | 822 | """ |
41e2b43e RD |
823 | A data structure for representing a point or position with floating |
824 | point x and y properties. In wxPython most places that expect a | |
825 | wx.RealPoint can also accept a (x,y) tuple. | |
0df68c9f | 826 | """ |
e811c8ce RD |
827 | def __repr__(self): |
828 | return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
829 | x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set) |
830 | y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set) | |
d14a1e28 | 831 | def __init__(self, *args, **kwargs): |
0df68c9f | 832 | """ |
a95a7133 | 833 | __init__(self, double x=0.0, double y=0.0) -> RealPoint |
e811c8ce | 834 | |
0df68c9f RD |
835 | Create a wx.RealPoint object |
836 | """ | |
54f9ee45 | 837 | newobj = _core_.new_RealPoint(*args, **kwargs) |
d14a1e28 RD |
838 | self.this = newobj.this |
839 | self.thisown = 1 | |
840 | del newobj.thisown | |
54f9ee45 | 841 | def __del__(self, destroy=_core_.delete_RealPoint): |
a95a7133 | 842 | """__del__(self)""" |
d14a1e28 RD |
843 | try: |
844 | if self.thisown: destroy(self) | |
845 | except: pass | |
e811c8ce RD |
846 | |
847 | def __eq__(*args, **kwargs): | |
0df68c9f | 848 | """ |
a95a7133 | 849 | __eq__(self, RealPoint pt) -> bool |
e811c8ce | 850 | |
0df68c9f RD |
851 | Test for equality of wx.RealPoint objects. |
852 | """ | |
54f9ee45 | 853 | return _core_.RealPoint___eq__(*args, **kwargs) |
e811c8ce RD |
854 | |
855 | def __ne__(*args, **kwargs): | |
0df68c9f | 856 | """ |
a95a7133 | 857 | __ne__(self, RealPoint pt) -> bool |
e811c8ce | 858 | |
0df68c9f RD |
859 | Test for inequality of wx.RealPoint objects. |
860 | """ | |
54f9ee45 | 861 | return _core_.RealPoint___ne__(*args, **kwargs) |
e811c8ce RD |
862 | |
863 | def __add__(*args, **kwargs): | |
0df68c9f | 864 | """ |
a95a7133 | 865 | __add__(self, RealPoint pt) -> RealPoint |
e811c8ce | 866 | |
0df68c9f RD |
867 | Add pt's proprties to this and return the result. |
868 | """ | |
54f9ee45 | 869 | return _core_.RealPoint___add__(*args, **kwargs) |
e811c8ce RD |
870 | |
871 | def __sub__(*args, **kwargs): | |
0df68c9f | 872 | """ |
a95a7133 | 873 | __sub__(self, RealPoint pt) -> RealPoint |
e811c8ce | 874 | |
0df68c9f RD |
875 | Subtract pt's proprties from this and return the result |
876 | """ | |
54f9ee45 | 877 | return _core_.RealPoint___sub__(*args, **kwargs) |
e811c8ce RD |
878 | |
879 | def Set(*args, **kwargs): | |
0df68c9f | 880 | """ |
a95a7133 | 881 | Set(self, double x, double y) |
e811c8ce | 882 | |
0df68c9f RD |
883 | Set both the x and y properties |
884 | """ | |
54f9ee45 | 885 | return _core_.RealPoint_Set(*args, **kwargs) |
e811c8ce RD |
886 | |
887 | def Get(*args, **kwargs): | |
0df68c9f RD |
888 | """ |
889 | Get() -> (x,y) | |
e811c8ce | 890 | |
0df68c9f RD |
891 | Return the x and y properties as a tuple. |
892 | """ | |
54f9ee45 | 893 | return _core_.RealPoint_Get(*args, **kwargs) |
e811c8ce | 894 | |
41e2b43e | 895 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
896 | def __str__(self): return str(self.Get()) |
897 | def __repr__(self): return 'wx.RealPoint'+str(self.Get()) | |
898 | def __len__(self): return len(self.Get()) | |
899 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 900 | def __setitem__(self, index, val): |
e811c8ce RD |
901 | if index == 0: self.x = val |
902 | elif index == 1: self.y = val | |
d14a1e28 | 903 | else: raise IndexError |
e811c8ce | 904 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
905 | __safe_for_unpickling__ = True |
906 | def __reduce__(self): return (wx.RealPoint, self.Get()) | |
d14a1e28 RD |
907 | |
908 | ||
909 | class RealPointPtr(RealPoint): | |
910 | def __init__(self, this): | |
911 | self.this = this | |
912 | if not hasattr(self,"thisown"): self.thisown = 0 | |
913 | self.__class__ = RealPoint | |
54f9ee45 | 914 | _core_.RealPoint_swigregister(RealPointPtr) |
d14a1e28 RD |
915 | |
916 | #--------------------------------------------------------------------------- | |
917 | ||
918 | class Point(object): | |
0df68c9f | 919 | """ |
41e2b43e RD |
920 | A data structure for representing a point or position with integer x |
921 | and y properties. Most places in wxPython that expect a wx.Point can | |
922 | also accept a (x,y) tuple. | |
0df68c9f | 923 | """ |
e811c8ce RD |
924 | def __repr__(self): |
925 | return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
926 | x = property(_core_.Point_x_get, _core_.Point_x_set) |
927 | y = property(_core_.Point_y_get, _core_.Point_y_set) | |
d14a1e28 | 928 | def __init__(self, *args, **kwargs): |
0df68c9f | 929 | """ |
a95a7133 | 930 | __init__(self, int x=0, int y=0) -> Point |
e811c8ce | 931 | |
0df68c9f RD |
932 | Create a wx.Point object |
933 | """ | |
54f9ee45 | 934 | newobj = _core_.new_Point(*args, **kwargs) |
d14a1e28 RD |
935 | self.this = newobj.this |
936 | self.thisown = 1 | |
937 | del newobj.thisown | |
54f9ee45 | 938 | def __del__(self, destroy=_core_.delete_Point): |
a95a7133 | 939 | """__del__(self)""" |
d14a1e28 RD |
940 | try: |
941 | if self.thisown: destroy(self) | |
942 | except: pass | |
e811c8ce RD |
943 | |
944 | def __eq__(*args, **kwargs): | |
0df68c9f | 945 | """ |
a95a7133 | 946 | __eq__(self, Point pt) -> bool |
e811c8ce | 947 | |
0df68c9f RD |
948 | Test for equality of wx.Point objects. |
949 | """ | |
54f9ee45 | 950 | return _core_.Point___eq__(*args, **kwargs) |
e811c8ce RD |
951 | |
952 | def __ne__(*args, **kwargs): | |
0df68c9f | 953 | """ |
a95a7133 | 954 | __ne__(self, Point pt) -> bool |
e811c8ce | 955 | |
0df68c9f RD |
956 | Test for inequality of wx.Point objects. |
957 | """ | |
54f9ee45 | 958 | return _core_.Point___ne__(*args, **kwargs) |
e811c8ce RD |
959 | |
960 | def __add__(*args, **kwargs): | |
0df68c9f | 961 | """ |
a95a7133 | 962 | __add__(self, Point pt) -> Point |
e811c8ce | 963 | |
0df68c9f RD |
964 | Add pt's proprties to this and return the result. |
965 | """ | |
54f9ee45 | 966 | return _core_.Point___add__(*args, **kwargs) |
e811c8ce RD |
967 | |
968 | def __sub__(*args, **kwargs): | |
0df68c9f | 969 | """ |
a95a7133 | 970 | __sub__(self, Point pt) -> Point |
e811c8ce | 971 | |
0df68c9f RD |
972 | Subtract pt's proprties from this and return the result |
973 | """ | |
54f9ee45 | 974 | return _core_.Point___sub__(*args, **kwargs) |
e811c8ce RD |
975 | |
976 | def __iadd__(*args, **kwargs): | |
0df68c9f | 977 | """ |
a95a7133 | 978 | __iadd__(self, Point pt) -> Point |
e811c8ce | 979 | |
0df68c9f RD |
980 | Add pt to this object. |
981 | """ | |
54f9ee45 | 982 | return _core_.Point___iadd__(*args, **kwargs) |
e811c8ce RD |
983 | |
984 | def __isub__(*args, **kwargs): | |
0df68c9f | 985 | """ |
a95a7133 | 986 | __isub__(self, Point pt) -> Point |
e811c8ce | 987 | |
0df68c9f RD |
988 | Subtract pt from this object. |
989 | """ | |
54f9ee45 | 990 | return _core_.Point___isub__(*args, **kwargs) |
e811c8ce RD |
991 | |
992 | def Set(*args, **kwargs): | |
0df68c9f | 993 | """ |
a95a7133 | 994 | Set(self, long x, long y) |
e811c8ce | 995 | |
0df68c9f RD |
996 | Set both the x and y properties |
997 | """ | |
54f9ee45 | 998 | return _core_.Point_Set(*args, **kwargs) |
e811c8ce RD |
999 | |
1000 | def Get(*args, **kwargs): | |
0df68c9f RD |
1001 | """ |
1002 | Get() -> (x,y) | |
e811c8ce | 1003 | |
0df68c9f RD |
1004 | Return the x and y properties as a tuple. |
1005 | """ | |
54f9ee45 | 1006 | return _core_.Point_Get(*args, **kwargs) |
e811c8ce | 1007 | |
41e2b43e | 1008 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1009 | def __str__(self): return str(self.Get()) |
1010 | def __repr__(self): return 'wx.Point'+str(self.Get()) | |
1011 | def __len__(self): return len(self.Get()) | |
1012 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1013 | def __setitem__(self, index, val): |
1014 | if index == 0: self.x = val | |
1015 | elif index == 1: self.y = val | |
1016 | else: raise IndexError | |
e811c8ce | 1017 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
1018 | __safe_for_unpickling__ = True |
1019 | def __reduce__(self): return (wx.Point, self.Get()) | |
d14a1e28 RD |
1020 | |
1021 | ||
1022 | class PointPtr(Point): | |
1023 | def __init__(self, this): | |
1024 | self.this = this | |
1025 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1026 | self.__class__ = Point | |
54f9ee45 | 1027 | _core_.Point_swigregister(PointPtr) |
d14a1e28 RD |
1028 | |
1029 | #--------------------------------------------------------------------------- | |
1030 | ||
1031 | class Rect(object): | |
0df68c9f | 1032 | """ |
41e2b43e RD |
1033 | A class for representing and manipulating rectangles. It has x, y, |
1034 | width and height properties. In wxPython most palces that expect a | |
1035 | wx.Rect can also accept a (x,y,width,height) tuple. | |
0df68c9f | 1036 | """ |
e811c8ce RD |
1037 | def __repr__(self): |
1038 | return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1039 | def __init__(self, *args, **kwargs): |
0df68c9f | 1040 | """ |
a95a7133 | 1041 | __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect |
e811c8ce | 1042 | |
0df68c9f RD |
1043 | Create a new Rect object. |
1044 | """ | |
54f9ee45 | 1045 | newobj = _core_.new_Rect(*args, **kwargs) |
d14a1e28 RD |
1046 | self.this = newobj.this |
1047 | self.thisown = 1 | |
1048 | del newobj.thisown | |
54f9ee45 | 1049 | def __del__(self, destroy=_core_.delete_Rect): |
a95a7133 | 1050 | """__del__(self)""" |
d14a1e28 RD |
1051 | try: |
1052 | if self.thisown: destroy(self) | |
1053 | except: pass | |
e811c8ce RD |
1054 | |
1055 | def GetX(*args, **kwargs): | |
a95a7133 | 1056 | """GetX(self) -> int""" |
54f9ee45 | 1057 | return _core_.Rect_GetX(*args, **kwargs) |
e811c8ce RD |
1058 | |
1059 | def SetX(*args, **kwargs): | |
a95a7133 | 1060 | """SetX(self, int x)""" |
54f9ee45 | 1061 | return _core_.Rect_SetX(*args, **kwargs) |
e811c8ce RD |
1062 | |
1063 | def GetY(*args, **kwargs): | |
a95a7133 | 1064 | """GetY(self) -> int""" |
54f9ee45 | 1065 | return _core_.Rect_GetY(*args, **kwargs) |
e811c8ce RD |
1066 | |
1067 | def SetY(*args, **kwargs): | |
a95a7133 | 1068 | """SetY(self, int y)""" |
54f9ee45 | 1069 | return _core_.Rect_SetY(*args, **kwargs) |
e811c8ce RD |
1070 | |
1071 | def GetWidth(*args, **kwargs): | |
a95a7133 | 1072 | """GetWidth(self) -> int""" |
54f9ee45 | 1073 | return _core_.Rect_GetWidth(*args, **kwargs) |
e811c8ce RD |
1074 | |
1075 | def SetWidth(*args, **kwargs): | |
a95a7133 | 1076 | """SetWidth(self, int w)""" |
54f9ee45 | 1077 | return _core_.Rect_SetWidth(*args, **kwargs) |
e811c8ce RD |
1078 | |
1079 | def GetHeight(*args, **kwargs): | |
a95a7133 | 1080 | """GetHeight(self) -> int""" |
54f9ee45 | 1081 | return _core_.Rect_GetHeight(*args, **kwargs) |
e811c8ce RD |
1082 | |
1083 | def SetHeight(*args, **kwargs): | |
a95a7133 | 1084 | """SetHeight(self, int h)""" |
54f9ee45 | 1085 | return _core_.Rect_SetHeight(*args, **kwargs) |
e811c8ce RD |
1086 | |
1087 | def GetPosition(*args, **kwargs): | |
a95a7133 | 1088 | """GetPosition(self) -> Point""" |
54f9ee45 | 1089 | return _core_.Rect_GetPosition(*args, **kwargs) |
e811c8ce RD |
1090 | |
1091 | def SetPosition(*args, **kwargs): | |
a95a7133 | 1092 | """SetPosition(self, Point p)""" |
54f9ee45 | 1093 | return _core_.Rect_SetPosition(*args, **kwargs) |
e811c8ce RD |
1094 | |
1095 | def GetSize(*args, **kwargs): | |
a95a7133 | 1096 | """GetSize(self) -> Size""" |
54f9ee45 | 1097 | return _core_.Rect_GetSize(*args, **kwargs) |
e811c8ce RD |
1098 | |
1099 | def SetSize(*args, **kwargs): | |
a95a7133 | 1100 | """SetSize(self, Size s)""" |
54f9ee45 | 1101 | return _core_.Rect_SetSize(*args, **kwargs) |
e811c8ce | 1102 | |
c9c7117a | 1103 | def GetTopLeft(*args, **kwargs): |
a95a7133 | 1104 | """GetTopLeft(self) -> Point""" |
54f9ee45 | 1105 | return _core_.Rect_GetTopLeft(*args, **kwargs) |
c9c7117a RD |
1106 | |
1107 | def SetTopLeft(*args, **kwargs): | |
a95a7133 | 1108 | """SetTopLeft(self, Point p)""" |
54f9ee45 | 1109 | return _core_.Rect_SetTopLeft(*args, **kwargs) |
c9c7117a RD |
1110 | |
1111 | def GetBottomRight(*args, **kwargs): | |
a95a7133 | 1112 | """GetBottomRight(self) -> Point""" |
54f9ee45 | 1113 | return _core_.Rect_GetBottomRight(*args, **kwargs) |
c9c7117a RD |
1114 | |
1115 | def SetBottomRight(*args, **kwargs): | |
a95a7133 | 1116 | """SetBottomRight(self, Point p)""" |
54f9ee45 | 1117 | return _core_.Rect_SetBottomRight(*args, **kwargs) |
c9c7117a | 1118 | |
e811c8ce | 1119 | def GetLeft(*args, **kwargs): |
a95a7133 | 1120 | """GetLeft(self) -> int""" |
54f9ee45 | 1121 | return _core_.Rect_GetLeft(*args, **kwargs) |
e811c8ce RD |
1122 | |
1123 | def GetTop(*args, **kwargs): | |
a95a7133 | 1124 | """GetTop(self) -> int""" |
54f9ee45 | 1125 | return _core_.Rect_GetTop(*args, **kwargs) |
e811c8ce RD |
1126 | |
1127 | def GetBottom(*args, **kwargs): | |
a95a7133 | 1128 | """GetBottom(self) -> int""" |
54f9ee45 | 1129 | return _core_.Rect_GetBottom(*args, **kwargs) |
e811c8ce RD |
1130 | |
1131 | def GetRight(*args, **kwargs): | |
a95a7133 | 1132 | """GetRight(self) -> int""" |
54f9ee45 | 1133 | return _core_.Rect_GetRight(*args, **kwargs) |
e811c8ce RD |
1134 | |
1135 | def SetLeft(*args, **kwargs): | |
a95a7133 | 1136 | """SetLeft(self, int left)""" |
54f9ee45 | 1137 | return _core_.Rect_SetLeft(*args, **kwargs) |
e811c8ce RD |
1138 | |
1139 | def SetRight(*args, **kwargs): | |
a95a7133 | 1140 | """SetRight(self, int right)""" |
54f9ee45 | 1141 | return _core_.Rect_SetRight(*args, **kwargs) |
e811c8ce RD |
1142 | |
1143 | def SetTop(*args, **kwargs): | |
a95a7133 | 1144 | """SetTop(self, int top)""" |
54f9ee45 | 1145 | return _core_.Rect_SetTop(*args, **kwargs) |
e811c8ce RD |
1146 | |
1147 | def SetBottom(*args, **kwargs): | |
a95a7133 | 1148 | """SetBottom(self, int bottom)""" |
54f9ee45 | 1149 | return _core_.Rect_SetBottom(*args, **kwargs) |
e811c8ce RD |
1150 | |
1151 | position = property(GetPosition, SetPosition) | |
1152 | size = property(GetSize, SetSize) | |
1153 | left = property(GetLeft, SetLeft) | |
1154 | right = property(GetRight, SetRight) | |
1155 | top = property(GetTop, SetTop) | |
1156 | bottom = property(GetBottom, SetBottom) | |
1157 | ||
1158 | def Inflate(*args, **kwargs): | |
0df68c9f | 1159 | """ |
a95a7133 | 1160 | Inflate(self, int dx, int dy) -> Rect |
e811c8ce | 1161 | |
41e2b43e RD |
1162 | Increase the rectangle size by dx in x direction and dy in y |
1163 | direction. Both or one of) parameters may be negative to decrease the | |
1164 | rectangle size. | |
0df68c9f | 1165 | """ |
54f9ee45 | 1166 | return _core_.Rect_Inflate(*args, **kwargs) |
e811c8ce RD |
1167 | |
1168 | def Deflate(*args, **kwargs): | |
0df68c9f | 1169 | """ |
a95a7133 | 1170 | Deflate(self, int dx, int dy) -> Rect |
e811c8ce | 1171 | |
41e2b43e RD |
1172 | Decrease the rectangle size by dx in x direction and dy in y |
1173 | direction. Both or one of) parameters may be negative to increase the | |
1174 | rectngle size. This method is the opposite of Inflate. | |
0df68c9f | 1175 | """ |
54f9ee45 | 1176 | return _core_.Rect_Deflate(*args, **kwargs) |
e811c8ce RD |
1177 | |
1178 | def OffsetXY(*args, **kwargs): | |
0df68c9f | 1179 | """ |
a95a7133 | 1180 | OffsetXY(self, int dx, int dy) |
e811c8ce | 1181 | |
41e2b43e RD |
1182 | Moves the rectangle by the specified offset. If dx is positive, the |
1183 | rectangle is moved to the right, if dy is positive, it is moved to the | |
1184 | bottom, otherwise it is moved to the left or top respectively. | |
0df68c9f | 1185 | """ |
54f9ee45 | 1186 | return _core_.Rect_OffsetXY(*args, **kwargs) |
e811c8ce RD |
1187 | |
1188 | def Offset(*args, **kwargs): | |
0df68c9f | 1189 | """ |
a95a7133 | 1190 | Offset(self, Point pt) |
e811c8ce | 1191 | |
0df68c9f RD |
1192 | Same as OffsetXY but uses dx,dy from Point |
1193 | """ | |
54f9ee45 | 1194 | return _core_.Rect_Offset(*args, **kwargs) |
e811c8ce RD |
1195 | |
1196 | def Intersect(*args, **kwargs): | |
0df68c9f | 1197 | """ |
a95a7133 | 1198 | Intersect(self, Rect rect) -> Rect |
e811c8ce | 1199 | |
0df68c9f RD |
1200 | Return the intersectsion of this rectangle and rect. |
1201 | """ | |
54f9ee45 | 1202 | return _core_.Rect_Intersect(*args, **kwargs) |
e811c8ce RD |
1203 | |
1204 | def __add__(*args, **kwargs): | |
0df68c9f | 1205 | """ |
a95a7133 | 1206 | __add__(self, Rect rect) -> Rect |
e811c8ce | 1207 | |
0df68c9f RD |
1208 | Add the properties of rect to this rectangle and return the result. |
1209 | """ | |
54f9ee45 | 1210 | return _core_.Rect___add__(*args, **kwargs) |
e811c8ce RD |
1211 | |
1212 | def __iadd__(*args, **kwargs): | |
0df68c9f | 1213 | """ |
a95a7133 | 1214 | __iadd__(self, Rect rect) -> Rect |
e811c8ce | 1215 | |
0df68c9f RD |
1216 | Add the properties of rect to this rectangle, updating this rectangle. |
1217 | """ | |
54f9ee45 | 1218 | return _core_.Rect___iadd__(*args, **kwargs) |
e811c8ce RD |
1219 | |
1220 | def __eq__(*args, **kwargs): | |
0df68c9f | 1221 | """ |
a95a7133 | 1222 | __eq__(self, Rect rect) -> bool |
e811c8ce | 1223 | |
0df68c9f RD |
1224 | Test for equality. |
1225 | """ | |
54f9ee45 | 1226 | return _core_.Rect___eq__(*args, **kwargs) |
e811c8ce RD |
1227 | |
1228 | def __ne__(*args, **kwargs): | |
0df68c9f | 1229 | """ |
a95a7133 | 1230 | __ne__(self, Rect rect) -> bool |
e811c8ce | 1231 | |
0df68c9f RD |
1232 | Test for inequality. |
1233 | """ | |
54f9ee45 | 1234 | return _core_.Rect___ne__(*args, **kwargs) |
e811c8ce RD |
1235 | |
1236 | def InsideXY(*args, **kwargs): | |
0df68c9f | 1237 | """ |
a95a7133 | 1238 | InsideXY(self, int x, int y) -> bool |
e811c8ce | 1239 | |
0df68c9f RD |
1240 | Return True if the point is (not strcitly) inside the rect. |
1241 | """ | |
54f9ee45 | 1242 | return _core_.Rect_InsideXY(*args, **kwargs) |
e811c8ce RD |
1243 | |
1244 | def Inside(*args, **kwargs): | |
0df68c9f | 1245 | """ |
a95a7133 | 1246 | Inside(self, Point pt) -> bool |
e811c8ce | 1247 | |
0df68c9f RD |
1248 | Return True if the point is (not strcitly) inside the rect. |
1249 | """ | |
54f9ee45 | 1250 | return _core_.Rect_Inside(*args, **kwargs) |
e811c8ce RD |
1251 | |
1252 | def Intersects(*args, **kwargs): | |
0df68c9f | 1253 | """ |
a95a7133 | 1254 | Intersects(self, Rect rect) -> bool |
e811c8ce | 1255 | |
0df68c9f RD |
1256 | Returns True if the rectangles have a non empty intersection. |
1257 | """ | |
54f9ee45 | 1258 | return _core_.Rect_Intersects(*args, **kwargs) |
e811c8ce | 1259 | |
54f9ee45 RD |
1260 | x = property(_core_.Rect_x_get, _core_.Rect_x_set) |
1261 | y = property(_core_.Rect_y_get, _core_.Rect_y_set) | |
1262 | width = property(_core_.Rect_width_get, _core_.Rect_width_set) | |
1263 | height = property(_core_.Rect_height_get, _core_.Rect_height_set) | |
e811c8ce | 1264 | def Set(*args, **kwargs): |
0df68c9f | 1265 | """ |
a95a7133 | 1266 | Set(self, int x=0, int y=0, int width=0, int height=0) |
e811c8ce | 1267 | |
0df68c9f RD |
1268 | Set all rectangle properties. |
1269 | """ | |
54f9ee45 | 1270 | return _core_.Rect_Set(*args, **kwargs) |
e811c8ce RD |
1271 | |
1272 | def Get(*args, **kwargs): | |
0df68c9f RD |
1273 | """ |
1274 | Get() -> (x,y,width,height) | |
e811c8ce | 1275 | |
0df68c9f RD |
1276 | Return the rectangle properties as a tuple. |
1277 | """ | |
54f9ee45 | 1278 | return _core_.Rect_Get(*args, **kwargs) |
e811c8ce | 1279 | |
41e2b43e | 1280 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1281 | def __str__(self): return str(self.Get()) |
1282 | def __repr__(self): return 'wx.Rect'+str(self.Get()) | |
1283 | def __len__(self): return len(self.Get()) | |
1284 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
1285 | def __setitem__(self, index, val): |
1286 | if index == 0: self.x = val | |
1287 | elif index == 1: self.y = val | |
1288 | elif index == 2: self.width = val | |
1289 | elif index == 3: self.height = val | |
1290 | else: raise IndexError | |
e811c8ce | 1291 | def __nonzero__(self): return self.Get() != (0,0,0,0) |
74e96f3d RD |
1292 | __safe_for_unpickling__ = True |
1293 | def __reduce__(self): return (wx.Rect, self.Get()) | |
d14a1e28 RD |
1294 | |
1295 | ||
1296 | class RectPtr(Rect): | |
1297 | def __init__(self, this): | |
1298 | self.this = this | |
1299 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1300 | self.__class__ = Rect | |
54f9ee45 | 1301 | _core_.Rect_swigregister(RectPtr) |
d14a1e28 RD |
1302 | |
1303 | def RectPP(*args, **kwargs): | |
0df68c9f RD |
1304 | """ |
1305 | RectPP(Point topLeft, Point bottomRight) -> Rect | |
e811c8ce | 1306 | |
0df68c9f RD |
1307 | Create a new Rect object from Points representing two corners. |
1308 | """ | |
54f9ee45 | 1309 | val = _core_.new_RectPP(*args, **kwargs) |
d14a1e28 RD |
1310 | val.thisown = 1 |
1311 | return val | |
1312 | ||
1313 | def RectPS(*args, **kwargs): | |
0df68c9f RD |
1314 | """ |
1315 | RectPS(Point pos, Size size) -> Rect | |
e811c8ce | 1316 | |
0df68c9f RD |
1317 | Create a new Rect from a position and size. |
1318 | """ | |
54f9ee45 | 1319 | val = _core_.new_RectPS(*args, **kwargs) |
d14a1e28 RD |
1320 | val.thisown = 1 |
1321 | return val | |
1322 | ||
1323 | ||
e811c8ce | 1324 | def IntersectRect(*args, **kwargs): |
0df68c9f RD |
1325 | """ |
1326 | IntersectRect(Rect r1, Rect r2) -> Rect | |
e811c8ce | 1327 | |
0df68c9f RD |
1328 | Calculate and return the intersection of r1 and r2. |
1329 | """ | |
54f9ee45 | 1330 | return _core_.IntersectRect(*args, **kwargs) |
d14a1e28 RD |
1331 | #--------------------------------------------------------------------------- |
1332 | ||
1333 | class Point2D(object): | |
41e2b43e RD |
1334 | """ |
1335 | wx.Point2Ds represent a point or a vector in a 2d coordinate system | |
1336 | with floating point values. | |
1337 | """ | |
e811c8ce RD |
1338 | def __repr__(self): |
1339 | return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1340 | def __init__(self, *args, **kwargs): |
0df68c9f | 1341 | """ |
a95a7133 | 1342 | __init__(self, double x=0.0, double y=0.0) -> Point2D |
e811c8ce | 1343 | |
0df68c9f RD |
1344 | Create a w.Point2D object. |
1345 | """ | |
54f9ee45 | 1346 | newobj = _core_.new_Point2D(*args, **kwargs) |
d14a1e28 RD |
1347 | self.this = newobj.this |
1348 | self.thisown = 1 | |
1349 | del newobj.thisown | |
e811c8ce | 1350 | def GetFloor(*args, **kwargs): |
fd2dc343 RD |
1351 | """ |
1352 | GetFloor() -> (x,y) | |
1353 | ||
1354 | Convert to integer | |
1355 | """ | |
54f9ee45 | 1356 | return _core_.Point2D_GetFloor(*args, **kwargs) |
e811c8ce RD |
1357 | |
1358 | def GetRounded(*args, **kwargs): | |
fd2dc343 RD |
1359 | """ |
1360 | GetRounded() -> (x,y) | |
1361 | ||
1362 | Convert to integer | |
1363 | """ | |
54f9ee45 | 1364 | return _core_.Point2D_GetRounded(*args, **kwargs) |
e811c8ce RD |
1365 | |
1366 | def GetVectorLength(*args, **kwargs): | |
a95a7133 | 1367 | """GetVectorLength(self) -> double""" |
54f9ee45 | 1368 | return _core_.Point2D_GetVectorLength(*args, **kwargs) |
e811c8ce RD |
1369 | |
1370 | def GetVectorAngle(*args, **kwargs): | |
a95a7133 | 1371 | """GetVectorAngle(self) -> double""" |
54f9ee45 | 1372 | return _core_.Point2D_GetVectorAngle(*args, **kwargs) |
e811c8ce RD |
1373 | |
1374 | def SetVectorLength(*args, **kwargs): | |
a95a7133 | 1375 | """SetVectorLength(self, double length)""" |
54f9ee45 | 1376 | return _core_.Point2D_SetVectorLength(*args, **kwargs) |
e811c8ce RD |
1377 | |
1378 | def SetVectorAngle(*args, **kwargs): | |
a95a7133 | 1379 | """SetVectorAngle(self, double degrees)""" |
54f9ee45 | 1380 | return _core_.Point2D_SetVectorAngle(*args, **kwargs) |
e811c8ce | 1381 | |
d14a1e28 RD |
1382 | def SetPolarCoordinates(self, angle, length): |
1383 | self.SetVectorLength(length) | |
1384 | self.SetVectorAngle(angle) | |
1385 | def Normalize(self): | |
1386 | self.SetVectorLength(1.0) | |
1387 | ||
e811c8ce | 1388 | def GetDistance(*args, **kwargs): |
a95a7133 | 1389 | """GetDistance(self, Point2D pt) -> double""" |
54f9ee45 | 1390 | return _core_.Point2D_GetDistance(*args, **kwargs) |
e811c8ce RD |
1391 | |
1392 | def GetDistanceSquare(*args, **kwargs): | |
a95a7133 | 1393 | """GetDistanceSquare(self, Point2D pt) -> double""" |
54f9ee45 | 1394 | return _core_.Point2D_GetDistanceSquare(*args, **kwargs) |
e811c8ce RD |
1395 | |
1396 | def GetDotProduct(*args, **kwargs): | |
a95a7133 | 1397 | """GetDotProduct(self, Point2D vec) -> double""" |
54f9ee45 | 1398 | return _core_.Point2D_GetDotProduct(*args, **kwargs) |
e811c8ce RD |
1399 | |
1400 | def GetCrossProduct(*args, **kwargs): | |
a95a7133 | 1401 | """GetCrossProduct(self, Point2D vec) -> double""" |
54f9ee45 | 1402 | return _core_.Point2D_GetCrossProduct(*args, **kwargs) |
e811c8ce RD |
1403 | |
1404 | def __neg__(*args, **kwargs): | |
0df68c9f | 1405 | """ |
a95a7133 | 1406 | __neg__(self) -> Point2D |
e811c8ce | 1407 | |
0df68c9f RD |
1408 | the reflection of this point |
1409 | """ | |
54f9ee45 | 1410 | return _core_.Point2D___neg__(*args, **kwargs) |
e811c8ce RD |
1411 | |
1412 | def __iadd__(*args, **kwargs): | |
a95a7133 | 1413 | """__iadd__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1414 | return _core_.Point2D___iadd__(*args, **kwargs) |
e811c8ce RD |
1415 | |
1416 | def __isub__(*args, **kwargs): | |
a95a7133 | 1417 | """__isub__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1418 | return _core_.Point2D___isub__(*args, **kwargs) |
e811c8ce RD |
1419 | |
1420 | def __imul__(*args, **kwargs): | |
a95a7133 | 1421 | """__imul__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1422 | return _core_.Point2D___imul__(*args, **kwargs) |
e811c8ce RD |
1423 | |
1424 | def __idiv__(*args, **kwargs): | |
a95a7133 | 1425 | """__idiv__(self, Point2D pt) -> Point2D""" |
54f9ee45 | 1426 | return _core_.Point2D___idiv__(*args, **kwargs) |
e811c8ce RD |
1427 | |
1428 | def __eq__(*args, **kwargs): | |
0df68c9f | 1429 | """ |
a95a7133 | 1430 | __eq__(self, Point2D pt) -> bool |
e811c8ce | 1431 | |
0df68c9f RD |
1432 | Test for equality |
1433 | """ | |
54f9ee45 | 1434 | return _core_.Point2D___eq__(*args, **kwargs) |
e811c8ce RD |
1435 | |
1436 | def __ne__(*args, **kwargs): | |
0df68c9f | 1437 | """ |
a95a7133 | 1438 | __ne__(self, Point2D pt) -> bool |
e811c8ce | 1439 | |
0df68c9f RD |
1440 | Test for inequality |
1441 | """ | |
54f9ee45 | 1442 | return _core_.Point2D___ne__(*args, **kwargs) |
e811c8ce | 1443 | |
54f9ee45 RD |
1444 | x = property(_core_.Point2D_x_get, _core_.Point2D_x_set) |
1445 | y = property(_core_.Point2D_y_get, _core_.Point2D_y_set) | |
e811c8ce | 1446 | def Set(*args, **kwargs): |
a95a7133 | 1447 | """Set(self, double x=0, double y=0)""" |
54f9ee45 | 1448 | return _core_.Point2D_Set(*args, **kwargs) |
e811c8ce RD |
1449 | |
1450 | def Get(*args, **kwargs): | |
0df68c9f RD |
1451 | """ |
1452 | Get() -> (x,y) | |
e811c8ce | 1453 | |
0df68c9f RD |
1454 | Return x and y properties as a tuple. |
1455 | """ | |
54f9ee45 | 1456 | return _core_.Point2D_Get(*args, **kwargs) |
e811c8ce | 1457 | |
41e2b43e | 1458 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
1459 | def __str__(self): return str(self.Get()) |
1460 | def __repr__(self): return 'wx.Point2D'+str(self.Get()) | |
1461 | def __len__(self): return len(self.Get()) | |
1462 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 | 1463 | def __setitem__(self, index, val): |
e811c8ce RD |
1464 | if index == 0: self.x = val |
1465 | elif index == 1: self.y = val | |
d14a1e28 | 1466 | else: raise IndexError |
e811c8ce | 1467 | def __nonzero__(self): return self.Get() != (0.0, 0.0) |
74e96f3d RD |
1468 | __safe_for_unpickling__ = True |
1469 | def __reduce__(self): return (wx.Point2D, self.Get()) | |
d14a1e28 RD |
1470 | |
1471 | ||
1472 | class Point2DPtr(Point2D): | |
1473 | def __init__(self, this): | |
1474 | self.this = this | |
1475 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1476 | self.__class__ = Point2D | |
54f9ee45 | 1477 | _core_.Point2D_swigregister(Point2DPtr) |
d14a1e28 RD |
1478 | |
1479 | def Point2DCopy(*args, **kwargs): | |
0df68c9f RD |
1480 | """ |
1481 | Point2DCopy(Point2D pt) -> Point2D | |
e811c8ce | 1482 | |
0df68c9f RD |
1483 | Create a w.Point2D object. |
1484 | """ | |
54f9ee45 | 1485 | val = _core_.new_Point2DCopy(*args, **kwargs) |
d14a1e28 RD |
1486 | val.thisown = 1 |
1487 | return val | |
1488 | ||
1489 | def Point2DFromPoint(*args, **kwargs): | |
0df68c9f RD |
1490 | """ |
1491 | Point2DFromPoint(Point pt) -> Point2D | |
e811c8ce | 1492 | |
0df68c9f RD |
1493 | Create a w.Point2D object. |
1494 | """ | |
54f9ee45 | 1495 | val = _core_.new_Point2DFromPoint(*args, **kwargs) |
d14a1e28 RD |
1496 | val.thisown = 1 |
1497 | return val | |
1498 | ||
1499 | #--------------------------------------------------------------------------- | |
1500 | ||
54f9ee45 RD |
1501 | FromStart = _core_.FromStart |
1502 | FromCurrent = _core_.FromCurrent | |
1503 | FromEnd = _core_.FromEnd | |
d14a1e28 | 1504 | class InputStream(object): |
e811c8ce RD |
1505 | def __repr__(self): |
1506 | return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1507 | def __init__(self, *args, **kwargs): |
a95a7133 | 1508 | """__init__(self, PyObject p) -> InputStream""" |
54f9ee45 | 1509 | newobj = _core_.new_InputStream(*args, **kwargs) |
d14a1e28 RD |
1510 | self.this = newobj.this |
1511 | self.thisown = 1 | |
1512 | del newobj.thisown | |
e811c8ce | 1513 | def close(*args, **kwargs): |
a95a7133 | 1514 | """close(self)""" |
54f9ee45 | 1515 | return _core_.InputStream_close(*args, **kwargs) |
e811c8ce RD |
1516 | |
1517 | def flush(*args, **kwargs): | |
a95a7133 | 1518 | """flush(self)""" |
54f9ee45 | 1519 | return _core_.InputStream_flush(*args, **kwargs) |
e811c8ce RD |
1520 | |
1521 | def eof(*args, **kwargs): | |
a95a7133 | 1522 | """eof(self) -> bool""" |
54f9ee45 | 1523 | return _core_.InputStream_eof(*args, **kwargs) |
e811c8ce RD |
1524 | |
1525 | def read(*args, **kwargs): | |
a95a7133 | 1526 | """read(self, int size=-1) -> PyObject""" |
54f9ee45 | 1527 | return _core_.InputStream_read(*args, **kwargs) |
e811c8ce RD |
1528 | |
1529 | def readline(*args, **kwargs): | |
a95a7133 | 1530 | """readline(self, int size=-1) -> PyObject""" |
54f9ee45 | 1531 | return _core_.InputStream_readline(*args, **kwargs) |
e811c8ce RD |
1532 | |
1533 | def readlines(*args, **kwargs): | |
a95a7133 | 1534 | """readlines(self, int sizehint=-1) -> PyObject""" |
54f9ee45 | 1535 | return _core_.InputStream_readlines(*args, **kwargs) |
e811c8ce RD |
1536 | |
1537 | def seek(*args, **kwargs): | |
a95a7133 | 1538 | """seek(self, int offset, int whence=0)""" |
54f9ee45 | 1539 | return _core_.InputStream_seek(*args, **kwargs) |
e811c8ce RD |
1540 | |
1541 | def tell(*args, **kwargs): | |
a95a7133 | 1542 | """tell(self) -> int""" |
54f9ee45 | 1543 | return _core_.InputStream_tell(*args, **kwargs) |
e811c8ce RD |
1544 | |
1545 | def Peek(*args, **kwargs): | |
a95a7133 | 1546 | """Peek(self) -> char""" |
54f9ee45 | 1547 | return _core_.InputStream_Peek(*args, **kwargs) |
e811c8ce RD |
1548 | |
1549 | def GetC(*args, **kwargs): | |
a95a7133 | 1550 | """GetC(self) -> char""" |
54f9ee45 | 1551 | return _core_.InputStream_GetC(*args, **kwargs) |
e811c8ce RD |
1552 | |
1553 | def LastRead(*args, **kwargs): | |
a95a7133 | 1554 | """LastRead(self) -> size_t""" |
54f9ee45 | 1555 | return _core_.InputStream_LastRead(*args, **kwargs) |
e811c8ce RD |
1556 | |
1557 | def CanRead(*args, **kwargs): | |
a95a7133 | 1558 | """CanRead(self) -> bool""" |
54f9ee45 | 1559 | return _core_.InputStream_CanRead(*args, **kwargs) |
e811c8ce RD |
1560 | |
1561 | def Eof(*args, **kwargs): | |
a95a7133 | 1562 | """Eof(self) -> bool""" |
54f9ee45 | 1563 | return _core_.InputStream_Eof(*args, **kwargs) |
e811c8ce RD |
1564 | |
1565 | def Ungetch(*args, **kwargs): | |
a95a7133 | 1566 | """Ungetch(self, char c) -> bool""" |
54f9ee45 | 1567 | return _core_.InputStream_Ungetch(*args, **kwargs) |
e811c8ce RD |
1568 | |
1569 | def SeekI(*args, **kwargs): | |
a95a7133 | 1570 | """SeekI(self, long pos, int mode=FromStart) -> long""" |
54f9ee45 | 1571 | return _core_.InputStream_SeekI(*args, **kwargs) |
e811c8ce RD |
1572 | |
1573 | def TellI(*args, **kwargs): | |
a95a7133 | 1574 | """TellI(self) -> long""" |
54f9ee45 | 1575 | return _core_.InputStream_TellI(*args, **kwargs) |
e811c8ce | 1576 | |
d14a1e28 RD |
1577 | |
1578 | class InputStreamPtr(InputStream): | |
1579 | def __init__(self, this): | |
1580 | self.this = this | |
1581 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1582 | self.__class__ = InputStream | |
54f9ee45 | 1583 | _core_.InputStream_swigregister(InputStreamPtr) |
d14a1e28 RD |
1584 | DefaultPosition = cvar.DefaultPosition |
1585 | DefaultSize = cvar.DefaultSize | |
1586 | ||
1587 | class OutputStream(object): | |
d14a1e28 RD |
1588 | def __init__(self): raise RuntimeError, "No constructor defined" |
1589 | def __repr__(self): | |
1590 | return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 1591 | def write(*args, **kwargs): |
a95a7133 | 1592 | """write(self, PyObject obj)""" |
54f9ee45 | 1593 | return _core_.OutputStream_write(*args, **kwargs) |
e811c8ce | 1594 | |
d14a1e28 RD |
1595 | |
1596 | class OutputStreamPtr(OutputStream): | |
1597 | def __init__(self, this): | |
1598 | self.this = this | |
1599 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1600 | self.__class__ = OutputStream | |
54f9ee45 | 1601 | _core_.OutputStream_swigregister(OutputStreamPtr) |
d14a1e28 RD |
1602 | |
1603 | #--------------------------------------------------------------------------- | |
1604 | ||
1605 | class FSFile(Object): | |
e811c8ce RD |
1606 | def __repr__(self): |
1607 | return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1608 | def __init__(self, *args, **kwargs): |
0df68c9f | 1609 | """ |
a95a7133 | 1610 | __init__(self, InputStream stream, String loc, String mimetype, String anchor, |
196addbf | 1611 | DateTime modif) -> FSFile |
0df68c9f | 1612 | """ |
54f9ee45 | 1613 | newobj = _core_.new_FSFile(*args, **kwargs) |
d14a1e28 RD |
1614 | self.this = newobj.this |
1615 | self.thisown = 1 | |
1616 | del newobj.thisown | |
4cf4100f RD |
1617 | self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem |
1618 | ||
54f9ee45 | 1619 | def __del__(self, destroy=_core_.delete_FSFile): |
a95a7133 | 1620 | """__del__(self)""" |
d14a1e28 RD |
1621 | try: |
1622 | if self.thisown: destroy(self) | |
1623 | except: pass | |
e811c8ce RD |
1624 | |
1625 | def GetStream(*args, **kwargs): | |
a95a7133 | 1626 | """GetStream(self) -> InputStream""" |
54f9ee45 | 1627 | return _core_.FSFile_GetStream(*args, **kwargs) |
e811c8ce RD |
1628 | |
1629 | def GetMimeType(*args, **kwargs): | |
a95a7133 | 1630 | """GetMimeType(self) -> String""" |
54f9ee45 | 1631 | return _core_.FSFile_GetMimeType(*args, **kwargs) |
e811c8ce RD |
1632 | |
1633 | def GetLocation(*args, **kwargs): | |
a95a7133 | 1634 | """GetLocation(self) -> String""" |
54f9ee45 | 1635 | return _core_.FSFile_GetLocation(*args, **kwargs) |
e811c8ce RD |
1636 | |
1637 | def GetAnchor(*args, **kwargs): | |
a95a7133 | 1638 | """GetAnchor(self) -> String""" |
54f9ee45 | 1639 | return _core_.FSFile_GetAnchor(*args, **kwargs) |
e811c8ce RD |
1640 | |
1641 | def GetModificationTime(*args, **kwargs): | |
a95a7133 | 1642 | """GetModificationTime(self) -> DateTime""" |
54f9ee45 | 1643 | return _core_.FSFile_GetModificationTime(*args, **kwargs) |
e811c8ce | 1644 | |
d14a1e28 RD |
1645 | |
1646 | class FSFilePtr(FSFile): | |
1647 | def __init__(self, this): | |
1648 | self.this = this | |
1649 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1650 | self.__class__ = FSFile | |
54f9ee45 | 1651 | _core_.FSFile_swigregister(FSFilePtr) |
d14a1e28 RD |
1652 | |
1653 | class CPPFileSystemHandler(object): | |
1654 | def __init__(self): raise RuntimeError, "No constructor defined" | |
1655 | def __repr__(self): | |
1656 | return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1657 | ||
1658 | class CPPFileSystemHandlerPtr(CPPFileSystemHandler): | |
1659 | def __init__(self, this): | |
1660 | self.this = this | |
1661 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1662 | self.__class__ = CPPFileSystemHandler | |
54f9ee45 | 1663 | _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr) |
d14a1e28 RD |
1664 | |
1665 | class FileSystemHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1666 | def __repr__(self): |
1667 | return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1668 | def __init__(self, *args, **kwargs): |
a95a7133 | 1669 | """__init__(self) -> FileSystemHandler""" |
54f9ee45 | 1670 | newobj = _core_.new_FileSystemHandler(*args, **kwargs) |
d14a1e28 RD |
1671 | self.this = newobj.this |
1672 | self.thisown = 1 | |
1673 | del newobj.thisown | |
1674 | self._setCallbackInfo(self, FileSystemHandler) | |
e811c8ce RD |
1675 | |
1676 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 1677 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 1678 | return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
1679 | |
1680 | def CanOpen(*args, **kwargs): | |
a95a7133 | 1681 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1682 | return _core_.FileSystemHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1683 | |
1684 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1685 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1686 | return _core_.FileSystemHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1687 | |
1688 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1689 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1690 | return _core_.FileSystemHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1691 | |
1692 | def FindNext(*args, **kwargs): | |
a95a7133 | 1693 | """FindNext(self) -> String""" |
54f9ee45 | 1694 | return _core_.FileSystemHandler_FindNext(*args, **kwargs) |
e811c8ce RD |
1695 | |
1696 | def GetProtocol(*args, **kwargs): | |
a95a7133 | 1697 | """GetProtocol(self, String location) -> String""" |
54f9ee45 | 1698 | return _core_.FileSystemHandler_GetProtocol(*args, **kwargs) |
e811c8ce RD |
1699 | |
1700 | def GetLeftLocation(*args, **kwargs): | |
a95a7133 | 1701 | """GetLeftLocation(self, String location) -> String""" |
54f9ee45 | 1702 | return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs) |
e811c8ce RD |
1703 | |
1704 | def GetAnchor(*args, **kwargs): | |
a95a7133 | 1705 | """GetAnchor(self, String location) -> String""" |
54f9ee45 | 1706 | return _core_.FileSystemHandler_GetAnchor(*args, **kwargs) |
e811c8ce RD |
1707 | |
1708 | def GetRightLocation(*args, **kwargs): | |
a95a7133 | 1709 | """GetRightLocation(self, String location) -> String""" |
54f9ee45 | 1710 | return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs) |
e811c8ce RD |
1711 | |
1712 | def GetMimeTypeFromExt(*args, **kwargs): | |
a95a7133 | 1713 | """GetMimeTypeFromExt(self, String location) -> String""" |
54f9ee45 | 1714 | return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs) |
e811c8ce | 1715 | |
d14a1e28 RD |
1716 | |
1717 | class FileSystemHandlerPtr(FileSystemHandler): | |
1718 | def __init__(self, this): | |
1719 | self.this = this | |
1720 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1721 | self.__class__ = FileSystemHandler | |
54f9ee45 | 1722 | _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr) |
d14a1e28 RD |
1723 | |
1724 | class FileSystem(Object): | |
e811c8ce RD |
1725 | def __repr__(self): |
1726 | return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1727 | def __init__(self, *args, **kwargs): |
a95a7133 | 1728 | """__init__(self) -> FileSystem""" |
54f9ee45 | 1729 | newobj = _core_.new_FileSystem(*args, **kwargs) |
d14a1e28 RD |
1730 | self.this = newobj.this |
1731 | self.thisown = 1 | |
1732 | del newobj.thisown | |
54f9ee45 | 1733 | def __del__(self, destroy=_core_.delete_FileSystem): |
a95a7133 | 1734 | """__del__(self)""" |
d14a1e28 RD |
1735 | try: |
1736 | if self.thisown: destroy(self) | |
1737 | except: pass | |
e811c8ce RD |
1738 | |
1739 | def ChangePathTo(*args, **kwargs): | |
a95a7133 | 1740 | """ChangePathTo(self, String location, bool is_dir=False)""" |
54f9ee45 | 1741 | return _core_.FileSystem_ChangePathTo(*args, **kwargs) |
e811c8ce RD |
1742 | |
1743 | def GetPath(*args, **kwargs): | |
a95a7133 | 1744 | """GetPath(self) -> String""" |
54f9ee45 | 1745 | return _core_.FileSystem_GetPath(*args, **kwargs) |
e811c8ce RD |
1746 | |
1747 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1748 | """OpenFile(self, String location) -> FSFile""" |
54f9ee45 | 1749 | return _core_.FileSystem_OpenFile(*args, **kwargs) |
e811c8ce RD |
1750 | |
1751 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1752 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1753 | return _core_.FileSystem_FindFirst(*args, **kwargs) |
e811c8ce RD |
1754 | |
1755 | def FindNext(*args, **kwargs): | |
a95a7133 | 1756 | """FindNext(self) -> String""" |
54f9ee45 | 1757 | return _core_.FileSystem_FindNext(*args, **kwargs) |
e811c8ce RD |
1758 | |
1759 | def AddHandler(*args, **kwargs): | |
66c033b4 | 1760 | """AddHandler(CPPFileSystemHandler handler)""" |
54f9ee45 | 1761 | return _core_.FileSystem_AddHandler(*args, **kwargs) |
e811c8ce RD |
1762 | |
1763 | AddHandler = staticmethod(AddHandler) | |
1764 | def CleanUpHandlers(*args, **kwargs): | |
66c033b4 | 1765 | """CleanUpHandlers()""" |
54f9ee45 | 1766 | return _core_.FileSystem_CleanUpHandlers(*args, **kwargs) |
e811c8ce RD |
1767 | |
1768 | CleanUpHandlers = staticmethod(CleanUpHandlers) | |
1769 | def FileNameToURL(*args, **kwargs): | |
66c033b4 | 1770 | """FileNameToURL(String filename) -> String""" |
54f9ee45 | 1771 | return _core_.FileSystem_FileNameToURL(*args, **kwargs) |
e811c8ce RD |
1772 | |
1773 | FileNameToURL = staticmethod(FileNameToURL) | |
2ef75293 RD |
1774 | def URLToFileName(*args, **kwargs): |
1775 | """URLToFileName(String url) -> String""" | |
1776 | return _core_.FileSystem_URLToFileName(*args, **kwargs) | |
1777 | ||
1778 | URLToFileName = staticmethod(URLToFileName) | |
d14a1e28 RD |
1779 | |
1780 | class FileSystemPtr(FileSystem): | |
1781 | def __init__(self, this): | |
1782 | self.this = this | |
1783 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1784 | self.__class__ = FileSystem | |
54f9ee45 | 1785 | _core_.FileSystem_swigregister(FileSystemPtr) |
d14a1e28 | 1786 | |
e811c8ce RD |
1787 | def FileSystem_AddHandler(*args, **kwargs): |
1788 | """FileSystem_AddHandler(CPPFileSystemHandler handler)""" | |
54f9ee45 | 1789 | return _core_.FileSystem_AddHandler(*args, **kwargs) |
d14a1e28 | 1790 | |
e811c8ce RD |
1791 | def FileSystem_CleanUpHandlers(*args, **kwargs): |
1792 | """FileSystem_CleanUpHandlers()""" | |
54f9ee45 | 1793 | return _core_.FileSystem_CleanUpHandlers(*args, **kwargs) |
d14a1e28 | 1794 | |
e811c8ce | 1795 | def FileSystem_FileNameToURL(*args, **kwargs): |
196addbf | 1796 | """FileSystem_FileNameToURL(String filename) -> String""" |
54f9ee45 | 1797 | return _core_.FileSystem_FileNameToURL(*args, **kwargs) |
d14a1e28 | 1798 | |
e811c8ce | 1799 | def FileSystem_URLToFileName(*args, **kwargs): |
196addbf | 1800 | """FileSystem_URLToFileName(String url) -> String""" |
54f9ee45 | 1801 | return _core_.FileSystem_URLToFileName(*args, **kwargs) |
2ef75293 | 1802 | |
d14a1e28 | 1803 | class InternetFSHandler(CPPFileSystemHandler): |
e811c8ce RD |
1804 | def __repr__(self): |
1805 | return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1806 | def __init__(self, *args, **kwargs): |
a95a7133 | 1807 | """__init__(self) -> InternetFSHandler""" |
54f9ee45 | 1808 | newobj = _core_.new_InternetFSHandler(*args, **kwargs) |
d14a1e28 RD |
1809 | self.this = newobj.this |
1810 | self.thisown = 1 | |
1811 | del newobj.thisown | |
e811c8ce | 1812 | def CanOpen(*args, **kwargs): |
a95a7133 | 1813 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1814 | return _core_.InternetFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1815 | |
1816 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1817 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1818 | return _core_.InternetFSHandler_OpenFile(*args, **kwargs) |
e811c8ce | 1819 | |
d14a1e28 RD |
1820 | |
1821 | class InternetFSHandlerPtr(InternetFSHandler): | |
1822 | def __init__(self, this): | |
1823 | self.this = this | |
1824 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1825 | self.__class__ = InternetFSHandler | |
54f9ee45 | 1826 | _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr) |
d14a1e28 RD |
1827 | |
1828 | class ZipFSHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1829 | def __repr__(self): |
1830 | return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1831 | def __init__(self, *args, **kwargs): |
a95a7133 | 1832 | """__init__(self) -> ZipFSHandler""" |
54f9ee45 | 1833 | newobj = _core_.new_ZipFSHandler(*args, **kwargs) |
d14a1e28 RD |
1834 | self.this = newobj.this |
1835 | self.thisown = 1 | |
1836 | del newobj.thisown | |
e811c8ce | 1837 | def CanOpen(*args, **kwargs): |
a95a7133 | 1838 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1839 | return _core_.ZipFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1840 | |
1841 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1842 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1843 | return _core_.ZipFSHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1844 | |
1845 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1846 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1847 | return _core_.ZipFSHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1848 | |
1849 | def FindNext(*args, **kwargs): | |
a95a7133 | 1850 | """FindNext(self) -> String""" |
54f9ee45 | 1851 | return _core_.ZipFSHandler_FindNext(*args, **kwargs) |
e811c8ce | 1852 | |
d14a1e28 RD |
1853 | |
1854 | class ZipFSHandlerPtr(ZipFSHandler): | |
1855 | def __init__(self, this): | |
1856 | self.this = this | |
1857 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1858 | self.__class__ = ZipFSHandler | |
54f9ee45 | 1859 | _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr) |
d14a1e28 RD |
1860 | |
1861 | ||
e811c8ce | 1862 | def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs): |
196addbf | 1863 | """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)""" |
54f9ee45 | 1864 | return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs) |
d14a1e28 | 1865 | |
e811c8ce | 1866 | def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs): |
196addbf | 1867 | """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)""" |
54f9ee45 | 1868 | return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs) |
d14a1e28 | 1869 | |
e811c8ce | 1870 | def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs): |
196addbf | 1871 | """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)""" |
54f9ee45 | 1872 | return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs) |
2ef75293 RD |
1873 | def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1): |
1874 | """ | |
1875 | Add 'file' to the memory filesystem. The dataItem parameter can | |
1876 | either be a `wx.Bitmap`, `wx.Image` or a string that can contain | |
1877 | arbitrary data. If a bitmap or image is used then the imgType | |
1878 | parameter should specify what kind of image file it should be | |
1879 | written as, wx.BITMAP_TYPE_PNG, etc. | |
1880 | """ | |
1881 | if isinstance(dataItem, wx.Image): | |
1882 | __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType) | |
1883 | elif isinstance(dataItem, wx.Bitmap): | |
1884 | __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType) | |
1885 | elif type(dataItem) == str: | |
1886 | __wxMemoryFSHandler_AddFile_Data(filename, dataItem) | |
1887 | else: | |
1888 | raise TypeError, 'wx.Image, wx.Bitmap or string expected' | |
d14a1e28 RD |
1889 | |
1890 | class MemoryFSHandler(CPPFileSystemHandler): | |
e811c8ce RD |
1891 | def __repr__(self): |
1892 | return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1893 | def __init__(self, *args, **kwargs): |
a95a7133 | 1894 | """__init__(self) -> MemoryFSHandler""" |
54f9ee45 | 1895 | newobj = _core_.new_MemoryFSHandler(*args, **kwargs) |
d14a1e28 RD |
1896 | self.this = newobj.this |
1897 | self.thisown = 1 | |
1898 | del newobj.thisown | |
e811c8ce | 1899 | def RemoveFile(*args, **kwargs): |
66c033b4 | 1900 | """RemoveFile(String filename)""" |
54f9ee45 | 1901 | return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) |
e811c8ce RD |
1902 | |
1903 | RemoveFile = staticmethod(RemoveFile) | |
d14a1e28 | 1904 | AddFile = staticmethod(MemoryFSHandler_AddFile) |
e811c8ce | 1905 | def CanOpen(*args, **kwargs): |
a95a7133 | 1906 | """CanOpen(self, String location) -> bool""" |
54f9ee45 | 1907 | return _core_.MemoryFSHandler_CanOpen(*args, **kwargs) |
e811c8ce RD |
1908 | |
1909 | def OpenFile(*args, **kwargs): | |
a95a7133 | 1910 | """OpenFile(self, FileSystem fs, String location) -> FSFile""" |
54f9ee45 | 1911 | return _core_.MemoryFSHandler_OpenFile(*args, **kwargs) |
e811c8ce RD |
1912 | |
1913 | def FindFirst(*args, **kwargs): | |
a95a7133 | 1914 | """FindFirst(self, String spec, int flags=0) -> String""" |
54f9ee45 | 1915 | return _core_.MemoryFSHandler_FindFirst(*args, **kwargs) |
e811c8ce RD |
1916 | |
1917 | def FindNext(*args, **kwargs): | |
a95a7133 | 1918 | """FindNext(self) -> String""" |
54f9ee45 | 1919 | return _core_.MemoryFSHandler_FindNext(*args, **kwargs) |
e811c8ce | 1920 | |
d14a1e28 RD |
1921 | |
1922 | class MemoryFSHandlerPtr(MemoryFSHandler): | |
1923 | def __init__(self, this): | |
1924 | self.this = this | |
1925 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1926 | self.__class__ = MemoryFSHandler | |
54f9ee45 | 1927 | _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr) |
d14a1e28 | 1928 | |
e811c8ce | 1929 | def MemoryFSHandler_RemoveFile(*args, **kwargs): |
196addbf | 1930 | """MemoryFSHandler_RemoveFile(String filename)""" |
54f9ee45 | 1931 | return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) |
d14a1e28 RD |
1932 | |
1933 | #--------------------------------------------------------------------------- | |
1934 | ||
1935 | class ImageHandler(Object): | |
d14a1e28 RD |
1936 | def __init__(self): raise RuntimeError, "No constructor defined" |
1937 | def __repr__(self): | |
1938 | return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 1939 | def GetName(*args, **kwargs): |
a95a7133 | 1940 | """GetName(self) -> String""" |
54f9ee45 | 1941 | return _core_.ImageHandler_GetName(*args, **kwargs) |
e811c8ce RD |
1942 | |
1943 | def GetExtension(*args, **kwargs): | |
a95a7133 | 1944 | """GetExtension(self) -> String""" |
54f9ee45 | 1945 | return _core_.ImageHandler_GetExtension(*args, **kwargs) |
e811c8ce RD |
1946 | |
1947 | def GetType(*args, **kwargs): | |
a95a7133 | 1948 | """GetType(self) -> long""" |
54f9ee45 | 1949 | return _core_.ImageHandler_GetType(*args, **kwargs) |
e811c8ce RD |
1950 | |
1951 | def GetMimeType(*args, **kwargs): | |
a95a7133 | 1952 | """GetMimeType(self) -> String""" |
54f9ee45 | 1953 | return _core_.ImageHandler_GetMimeType(*args, **kwargs) |
e811c8ce RD |
1954 | |
1955 | def CanRead(*args, **kwargs): | |
a95a7133 | 1956 | """CanRead(self, String name) -> bool""" |
54f9ee45 | 1957 | return _core_.ImageHandler_CanRead(*args, **kwargs) |
e811c8ce RD |
1958 | |
1959 | def SetName(*args, **kwargs): | |
a95a7133 | 1960 | """SetName(self, String name)""" |
54f9ee45 | 1961 | return _core_.ImageHandler_SetName(*args, **kwargs) |
e811c8ce RD |
1962 | |
1963 | def SetExtension(*args, **kwargs): | |
a95a7133 | 1964 | """SetExtension(self, String extension)""" |
54f9ee45 | 1965 | return _core_.ImageHandler_SetExtension(*args, **kwargs) |
e811c8ce RD |
1966 | |
1967 | def SetType(*args, **kwargs): | |
a95a7133 | 1968 | """SetType(self, long type)""" |
54f9ee45 | 1969 | return _core_.ImageHandler_SetType(*args, **kwargs) |
e811c8ce RD |
1970 | |
1971 | def SetMimeType(*args, **kwargs): | |
a95a7133 | 1972 | """SetMimeType(self, String mimetype)""" |
54f9ee45 | 1973 | return _core_.ImageHandler_SetMimeType(*args, **kwargs) |
e811c8ce | 1974 | |
d14a1e28 RD |
1975 | |
1976 | class ImageHandlerPtr(ImageHandler): | |
1977 | def __init__(self, this): | |
1978 | self.this = this | |
1979 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1980 | self.__class__ = ImageHandler | |
54f9ee45 | 1981 | _core_.ImageHandler_swigregister(ImageHandlerPtr) |
d14a1e28 RD |
1982 | |
1983 | class ImageHistogram(object): | |
e811c8ce RD |
1984 | def __repr__(self): |
1985 | return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 1986 | def __init__(self, *args, **kwargs): |
a95a7133 | 1987 | """__init__(self) -> ImageHistogram""" |
54f9ee45 | 1988 | newobj = _core_.new_ImageHistogram(*args, **kwargs) |
d14a1e28 RD |
1989 | self.this = newobj.this |
1990 | self.thisown = 1 | |
1991 | del newobj.thisown | |
e811c8ce | 1992 | def MakeKey(*args, **kwargs): |
0df68c9f | 1993 | """ |
66c033b4 | 1994 | MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long |
e811c8ce | 1995 | |
0df68c9f RD |
1996 | Get the key in the histogram for the given RGB values |
1997 | """ | |
54f9ee45 | 1998 | return _core_.ImageHistogram_MakeKey(*args, **kwargs) |
e811c8ce RD |
1999 | |
2000 | MakeKey = staticmethod(MakeKey) | |
2001 | def FindFirstUnusedColour(*args, **kwargs): | |
fd2dc343 RD |
2002 | """ |
2003 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
2004 | ||
2005 | Find first colour that is not used in the image and has higher RGB | |
2006 | values than startR, startG, startB. Returns a tuple consisting of a | |
2007 | success flag and rgb values. | |
2008 | """ | |
54f9ee45 | 2009 | return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs) |
e811c8ce | 2010 | |
d14a1e28 RD |
2011 | |
2012 | class ImageHistogramPtr(ImageHistogram): | |
2013 | def __init__(self, this): | |
2014 | self.this = this | |
2015 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2016 | self.__class__ = ImageHistogram | |
54f9ee45 | 2017 | _core_.ImageHistogram_swigregister(ImageHistogramPtr) |
d14a1e28 | 2018 | |
e811c8ce | 2019 | def ImageHistogram_MakeKey(*args, **kwargs): |
0df68c9f RD |
2020 | """ |
2021 | ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long | |
e811c8ce | 2022 | |
0df68c9f RD |
2023 | Get the key in the histogram for the given RGB values |
2024 | """ | |
54f9ee45 | 2025 | return _core_.ImageHistogram_MakeKey(*args, **kwargs) |
d14a1e28 RD |
2026 | |
2027 | class Image(Object): | |
e811c8ce RD |
2028 | def __repr__(self): |
2029 | return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2030 | def __init__(self, *args, **kwargs): |
a95a7133 | 2031 | """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
54f9ee45 | 2032 | newobj = _core_.new_Image(*args, **kwargs) |
d14a1e28 RD |
2033 | self.this = newobj.this |
2034 | self.thisown = 1 | |
2035 | del newobj.thisown | |
54f9ee45 | 2036 | def __del__(self, destroy=_core_.delete_Image): |
a95a7133 | 2037 | """__del__(self)""" |
d14a1e28 RD |
2038 | try: |
2039 | if self.thisown: destroy(self) | |
2040 | except: pass | |
e811c8ce RD |
2041 | |
2042 | def Create(*args, **kwargs): | |
a95a7133 | 2043 | """Create(self, int width, int height)""" |
54f9ee45 | 2044 | return _core_.Image_Create(*args, **kwargs) |
e811c8ce RD |
2045 | |
2046 | def Destroy(*args, **kwargs): | |
0df68c9f | 2047 | """ |
a95a7133 | 2048 | Destroy(self) |
e811c8ce | 2049 | |
0df68c9f RD |
2050 | Deletes the C++ object this Python object is a proxy for. |
2051 | """ | |
54f9ee45 | 2052 | return _core_.Image_Destroy(*args, **kwargs) |
e811c8ce RD |
2053 | |
2054 | def Scale(*args, **kwargs): | |
a95a7133 | 2055 | """Scale(self, int width, int height) -> Image""" |
54f9ee45 | 2056 | return _core_.Image_Scale(*args, **kwargs) |
e811c8ce RD |
2057 | |
2058 | def ShrinkBy(*args, **kwargs): | |
a95a7133 | 2059 | """ShrinkBy(self, int xFactor, int yFactor) -> Image""" |
54f9ee45 | 2060 | return _core_.Image_ShrinkBy(*args, **kwargs) |
e811c8ce RD |
2061 | |
2062 | def Rescale(*args, **kwargs): | |
a95a7133 | 2063 | """Rescale(self, int width, int height) -> Image""" |
54f9ee45 | 2064 | return _core_.Image_Rescale(*args, **kwargs) |
e811c8ce RD |
2065 | |
2066 | def SetRGB(*args, **kwargs): | |
a95a7133 | 2067 | """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)""" |
54f9ee45 | 2068 | return _core_.Image_SetRGB(*args, **kwargs) |
e811c8ce RD |
2069 | |
2070 | def GetRed(*args, **kwargs): | |
a95a7133 | 2071 | """GetRed(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2072 | return _core_.Image_GetRed(*args, **kwargs) |
e811c8ce RD |
2073 | |
2074 | def GetGreen(*args, **kwargs): | |
a95a7133 | 2075 | """GetGreen(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2076 | return _core_.Image_GetGreen(*args, **kwargs) |
e811c8ce RD |
2077 | |
2078 | def GetBlue(*args, **kwargs): | |
a95a7133 | 2079 | """GetBlue(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2080 | return _core_.Image_GetBlue(*args, **kwargs) |
e811c8ce RD |
2081 | |
2082 | def SetAlpha(*args, **kwargs): | |
a95a7133 | 2083 | """SetAlpha(self, int x, int y, unsigned char alpha)""" |
54f9ee45 | 2084 | return _core_.Image_SetAlpha(*args, **kwargs) |
e811c8ce RD |
2085 | |
2086 | def GetAlpha(*args, **kwargs): | |
a95a7133 | 2087 | """GetAlpha(self, int x, int y) -> unsigned char""" |
54f9ee45 | 2088 | return _core_.Image_GetAlpha(*args, **kwargs) |
e811c8ce RD |
2089 | |
2090 | def HasAlpha(*args, **kwargs): | |
a95a7133 | 2091 | """HasAlpha(self) -> bool""" |
54f9ee45 | 2092 | return _core_.Image_HasAlpha(*args, **kwargs) |
e811c8ce RD |
2093 | |
2094 | def FindFirstUnusedColour(*args, **kwargs): | |
fd2dc343 RD |
2095 | """ |
2096 | FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b) | |
2097 | ||
2098 | Find first colour that is not used in the image and has higher RGB | |
2099 | values than startR, startG, startB. Returns a tuple consisting of a | |
2100 | success flag and rgb values. | |
2101 | """ | |
54f9ee45 | 2102 | return _core_.Image_FindFirstUnusedColour(*args, **kwargs) |
e811c8ce | 2103 | |
4cf4100f RD |
2104 | def ConvertAlphaToMask(*args, **kwargs): |
2105 | """ | |
2106 | ConvertAlphaToMask(self, byte threshold=128) -> bool | |
2107 | ||
2108 | If the image has alpha channel, this method converts it to mask. All pixels | |
2109 | with alpha value less than ``threshold`` are replaced with mask colour and the | |
2110 | alpha channel is removed. Mask colour is chosen automatically using | |
2111 | `FindFirstUnusedColour`. | |
2112 | ||
2113 | If the image image doesn't have alpha channel, ConvertAlphaToMask does | |
2114 | nothing. | |
2115 | """ | |
2116 | return _core_.Image_ConvertAlphaToMask(*args, **kwargs) | |
2117 | ||
e811c8ce | 2118 | def SetMaskFromImage(*args, **kwargs): |
a95a7133 | 2119 | """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool""" |
54f9ee45 | 2120 | return _core_.Image_SetMaskFromImage(*args, **kwargs) |
e811c8ce RD |
2121 | |
2122 | def CanRead(*args, **kwargs): | |
66c033b4 | 2123 | """CanRead(String name) -> bool""" |
54f9ee45 | 2124 | return _core_.Image_CanRead(*args, **kwargs) |
e811c8ce RD |
2125 | |
2126 | CanRead = staticmethod(CanRead) | |
2127 | def GetImageCount(*args, **kwargs): | |
66c033b4 | 2128 | """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" |
54f9ee45 | 2129 | return _core_.Image_GetImageCount(*args, **kwargs) |
e811c8ce RD |
2130 | |
2131 | GetImageCount = staticmethod(GetImageCount) | |
2132 | def LoadFile(*args, **kwargs): | |
a95a7133 | 2133 | """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" |
54f9ee45 | 2134 | return _core_.Image_LoadFile(*args, **kwargs) |
e811c8ce RD |
2135 | |
2136 | def LoadMimeFile(*args, **kwargs): | |
a95a7133 | 2137 | """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool""" |
54f9ee45 | 2138 | return _core_.Image_LoadMimeFile(*args, **kwargs) |
e811c8ce RD |
2139 | |
2140 | def SaveFile(*args, **kwargs): | |
a95a7133 | 2141 | """SaveFile(self, String name, int type) -> bool""" |
54f9ee45 | 2142 | return _core_.Image_SaveFile(*args, **kwargs) |
e811c8ce RD |
2143 | |
2144 | def SaveMimeFile(*args, **kwargs): | |
a95a7133 | 2145 | """SaveMimeFile(self, String name, String mimetype) -> bool""" |
54f9ee45 | 2146 | return _core_.Image_SaveMimeFile(*args, **kwargs) |
e811c8ce RD |
2147 | |
2148 | def CanReadStream(*args, **kwargs): | |
66c033b4 | 2149 | """CanReadStream(InputStream stream) -> bool""" |
54f9ee45 | 2150 | return _core_.Image_CanReadStream(*args, **kwargs) |
e811c8ce RD |
2151 | |
2152 | CanReadStream = staticmethod(CanReadStream) | |
2153 | def LoadStream(*args, **kwargs): | |
a95a7133 | 2154 | """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool""" |
54f9ee45 | 2155 | return _core_.Image_LoadStream(*args, **kwargs) |
e811c8ce RD |
2156 | |
2157 | def LoadMimeStream(*args, **kwargs): | |
a95a7133 | 2158 | """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool""" |
54f9ee45 | 2159 | return _core_.Image_LoadMimeStream(*args, **kwargs) |
e811c8ce RD |
2160 | |
2161 | def Ok(*args, **kwargs): | |
a95a7133 | 2162 | """Ok(self) -> bool""" |
54f9ee45 | 2163 | return _core_.Image_Ok(*args, **kwargs) |
e811c8ce RD |
2164 | |
2165 | def GetWidth(*args, **kwargs): | |
a95a7133 | 2166 | """GetWidth(self) -> int""" |
54f9ee45 | 2167 | return _core_.Image_GetWidth(*args, **kwargs) |
e811c8ce RD |
2168 | |
2169 | def GetHeight(*args, **kwargs): | |
a95a7133 | 2170 | """GetHeight(self) -> int""" |
54f9ee45 | 2171 | return _core_.Image_GetHeight(*args, **kwargs) |
e811c8ce | 2172 | |
b2df227b | 2173 | def GetSize(*args, **kwargs): |
a95a7133 | 2174 | """GetSize(self) -> Size""" |
54f9ee45 | 2175 | return _core_.Image_GetSize(*args, **kwargs) |
b2df227b | 2176 | |
e811c8ce | 2177 | def GetSubImage(*args, **kwargs): |
a95a7133 | 2178 | """GetSubImage(self, Rect rect) -> Image""" |
54f9ee45 | 2179 | return _core_.Image_GetSubImage(*args, **kwargs) |
e811c8ce RD |
2180 | |
2181 | def Copy(*args, **kwargs): | |
a95a7133 | 2182 | """Copy(self) -> Image""" |
54f9ee45 | 2183 | return _core_.Image_Copy(*args, **kwargs) |
e811c8ce RD |
2184 | |
2185 | def Paste(*args, **kwargs): | |
a95a7133 | 2186 | """Paste(self, Image image, int x, int y)""" |
54f9ee45 | 2187 | return _core_.Image_Paste(*args, **kwargs) |
e811c8ce RD |
2188 | |
2189 | def GetData(*args, **kwargs): | |
a95a7133 | 2190 | """GetData(self) -> PyObject""" |
54f9ee45 | 2191 | return _core_.Image_GetData(*args, **kwargs) |
e811c8ce RD |
2192 | |
2193 | def SetData(*args, **kwargs): | |
a95a7133 | 2194 | """SetData(self, PyObject data)""" |
54f9ee45 | 2195 | return _core_.Image_SetData(*args, **kwargs) |
e811c8ce RD |
2196 | |
2197 | def GetDataBuffer(*args, **kwargs): | |
a95a7133 | 2198 | """GetDataBuffer(self) -> PyObject""" |
54f9ee45 | 2199 | return _core_.Image_GetDataBuffer(*args, **kwargs) |
e811c8ce RD |
2200 | |
2201 | def SetDataBuffer(*args, **kwargs): | |
a95a7133 | 2202 | """SetDataBuffer(self, PyObject data)""" |
54f9ee45 | 2203 | return _core_.Image_SetDataBuffer(*args, **kwargs) |
e811c8ce RD |
2204 | |
2205 | def GetAlphaData(*args, **kwargs): | |
a95a7133 | 2206 | """GetAlphaData(self) -> PyObject""" |
54f9ee45 | 2207 | return _core_.Image_GetAlphaData(*args, **kwargs) |
e811c8ce RD |
2208 | |
2209 | def SetAlphaData(*args, **kwargs): | |
a95a7133 | 2210 | """SetAlphaData(self, PyObject data)""" |
54f9ee45 | 2211 | return _core_.Image_SetAlphaData(*args, **kwargs) |
e811c8ce RD |
2212 | |
2213 | def GetAlphaBuffer(*args, **kwargs): | |
a95a7133 | 2214 | """GetAlphaBuffer(self) -> PyObject""" |
54f9ee45 | 2215 | return _core_.Image_GetAlphaBuffer(*args, **kwargs) |
e811c8ce RD |
2216 | |
2217 | def SetAlphaBuffer(*args, **kwargs): | |
a95a7133 | 2218 | """SetAlphaBuffer(self, PyObject data)""" |
54f9ee45 | 2219 | return _core_.Image_SetAlphaBuffer(*args, **kwargs) |
e811c8ce RD |
2220 | |
2221 | def SetMaskColour(*args, **kwargs): | |
a95a7133 | 2222 | """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)""" |
54f9ee45 | 2223 | return _core_.Image_SetMaskColour(*args, **kwargs) |
e811c8ce RD |
2224 | |
2225 | def GetMaskRed(*args, **kwargs): | |
a95a7133 | 2226 | """GetMaskRed(self) -> unsigned char""" |
54f9ee45 | 2227 | return _core_.Image_GetMaskRed(*args, **kwargs) |
e811c8ce RD |
2228 | |
2229 | def GetMaskGreen(*args, **kwargs): | |
a95a7133 | 2230 | """GetMaskGreen(self) -> unsigned char""" |
54f9ee45 | 2231 | return _core_.Image_GetMaskGreen(*args, **kwargs) |
e811c8ce RD |
2232 | |
2233 | def GetMaskBlue(*args, **kwargs): | |
a95a7133 | 2234 | """GetMaskBlue(self) -> unsigned char""" |
54f9ee45 | 2235 | return _core_.Image_GetMaskBlue(*args, **kwargs) |
e811c8ce RD |
2236 | |
2237 | def SetMask(*args, **kwargs): | |
a95a7133 | 2238 | """SetMask(self, bool mask=True)""" |
54f9ee45 | 2239 | return _core_.Image_SetMask(*args, **kwargs) |
e811c8ce RD |
2240 | |
2241 | def HasMask(*args, **kwargs): | |
a95a7133 | 2242 | """HasMask(self) -> bool""" |
54f9ee45 | 2243 | return _core_.Image_HasMask(*args, **kwargs) |
e811c8ce RD |
2244 | |
2245 | def Rotate(*args, **kwargs): | |
0df68c9f | 2246 | """ |
a95a7133 | 2247 | Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True, |
0df68c9f RD |
2248 | Point offset_after_rotation=None) -> Image |
2249 | """ | |
54f9ee45 | 2250 | return _core_.Image_Rotate(*args, **kwargs) |
e811c8ce RD |
2251 | |
2252 | def Rotate90(*args, **kwargs): | |
a95a7133 | 2253 | """Rotate90(self, bool clockwise=True) -> Image""" |
54f9ee45 | 2254 | return _core_.Image_Rotate90(*args, **kwargs) |
e811c8ce RD |
2255 | |
2256 | def Mirror(*args, **kwargs): | |
a95a7133 | 2257 | """Mirror(self, bool horizontally=True) -> Image""" |
54f9ee45 | 2258 | return _core_.Image_Mirror(*args, **kwargs) |
e811c8ce RD |
2259 | |
2260 | def Replace(*args, **kwargs): | |
0df68c9f | 2261 | """ |
a95a7133 | 2262 | Replace(self, unsigned char r1, unsigned char g1, unsigned char b1, |
0df68c9f RD |
2263 | unsigned char r2, unsigned char g2, unsigned char b2) |
2264 | """ | |
54f9ee45 | 2265 | return _core_.Image_Replace(*args, **kwargs) |
e811c8ce RD |
2266 | |
2267 | def ConvertToMono(*args, **kwargs): | |
a95a7133 | 2268 | """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image""" |
54f9ee45 | 2269 | return _core_.Image_ConvertToMono(*args, **kwargs) |
e811c8ce RD |
2270 | |
2271 | def SetOption(*args, **kwargs): | |
a95a7133 | 2272 | """SetOption(self, String name, String value)""" |
54f9ee45 | 2273 | return _core_.Image_SetOption(*args, **kwargs) |
e811c8ce RD |
2274 | |
2275 | def SetOptionInt(*args, **kwargs): | |
a95a7133 | 2276 | """SetOptionInt(self, String name, int value)""" |
54f9ee45 | 2277 | return _core_.Image_SetOptionInt(*args, **kwargs) |
e811c8ce RD |
2278 | |
2279 | def GetOption(*args, **kwargs): | |
a95a7133 | 2280 | """GetOption(self, String name) -> String""" |
54f9ee45 | 2281 | return _core_.Image_GetOption(*args, **kwargs) |
e811c8ce RD |
2282 | |
2283 | def GetOptionInt(*args, **kwargs): | |
a95a7133 | 2284 | """GetOptionInt(self, String name) -> int""" |
54f9ee45 | 2285 | return _core_.Image_GetOptionInt(*args, **kwargs) |
e811c8ce RD |
2286 | |
2287 | def HasOption(*args, **kwargs): | |
a95a7133 | 2288 | """HasOption(self, String name) -> bool""" |
54f9ee45 | 2289 | return _core_.Image_HasOption(*args, **kwargs) |
e811c8ce RD |
2290 | |
2291 | def CountColours(*args, **kwargs): | |
a95a7133 | 2292 | """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long""" |
54f9ee45 | 2293 | return _core_.Image_CountColours(*args, **kwargs) |
e811c8ce RD |
2294 | |
2295 | def ComputeHistogram(*args, **kwargs): | |
a95a7133 | 2296 | """ComputeHistogram(self, ImageHistogram h) -> unsigned long""" |
54f9ee45 | 2297 | return _core_.Image_ComputeHistogram(*args, **kwargs) |
e811c8ce RD |
2298 | |
2299 | def AddHandler(*args, **kwargs): | |
66c033b4 | 2300 | """AddHandler(ImageHandler handler)""" |
54f9ee45 | 2301 | return _core_.Image_AddHandler(*args, **kwargs) |
e811c8ce RD |
2302 | |
2303 | AddHandler = staticmethod(AddHandler) | |
2304 | def InsertHandler(*args, **kwargs): | |
66c033b4 | 2305 | """InsertHandler(ImageHandler handler)""" |
54f9ee45 | 2306 | return _core_.Image_InsertHandler(*args, **kwargs) |
e811c8ce RD |
2307 | |
2308 | InsertHandler = staticmethod(InsertHandler) | |
2309 | def RemoveHandler(*args, **kwargs): | |
66c033b4 | 2310 | """RemoveHandler(String name) -> bool""" |
54f9ee45 | 2311 | return _core_.Image_RemoveHandler(*args, **kwargs) |
e811c8ce RD |
2312 | |
2313 | RemoveHandler = staticmethod(RemoveHandler) | |
2314 | def GetImageExtWildcard(*args, **kwargs): | |
66c033b4 | 2315 | """GetImageExtWildcard() -> String""" |
54f9ee45 | 2316 | return _core_.Image_GetImageExtWildcard(*args, **kwargs) |
e811c8ce RD |
2317 | |
2318 | GetImageExtWildcard = staticmethod(GetImageExtWildcard) | |
2319 | def ConvertToBitmap(*args, **kwargs): | |
1fbf26be | 2320 | """ConvertToBitmap(self, int depth=-1) -> Bitmap""" |
54f9ee45 | 2321 | return _core_.Image_ConvertToBitmap(*args, **kwargs) |
e811c8ce RD |
2322 | |
2323 | def ConvertToMonoBitmap(*args, **kwargs): | |
a95a7133 | 2324 | """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap""" |
54f9ee45 | 2325 | return _core_.Image_ConvertToMonoBitmap(*args, **kwargs) |
e811c8ce RD |
2326 | |
2327 | def __nonzero__(self): return self.Ok() | |
d14a1e28 RD |
2328 | |
2329 | class ImagePtr(Image): | |
2330 | def __init__(self, this): | |
2331 | self.this = this | |
2332 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2333 | self.__class__ = Image | |
54f9ee45 | 2334 | _core_.Image_swigregister(ImagePtr) |
d14a1e28 RD |
2335 | |
2336 | def ImageFromMime(*args, **kwargs): | |
196addbf | 2337 | """ImageFromMime(String name, String mimetype, int index=-1) -> Image""" |
54f9ee45 | 2338 | val = _core_.new_ImageFromMime(*args, **kwargs) |
d14a1e28 RD |
2339 | val.thisown = 1 |
2340 | return val | |
2341 | ||
2342 | def ImageFromStream(*args, **kwargs): | |
196addbf | 2343 | """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image""" |
54f9ee45 | 2344 | val = _core_.new_ImageFromStream(*args, **kwargs) |
d14a1e28 RD |
2345 | val.thisown = 1 |
2346 | return val | |
2347 | ||
2348 | def ImageFromStreamMime(*args, **kwargs): | |
196addbf | 2349 | """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image""" |
54f9ee45 | 2350 | val = _core_.new_ImageFromStreamMime(*args, **kwargs) |
d14a1e28 RD |
2351 | val.thisown = 1 |
2352 | return val | |
2353 | ||
66c033b4 RD |
2354 | def EmptyImage(*args, **kwargs): |
2355 | """EmptyImage(int width=0, int height=0, bool clear=True) -> Image""" | |
2356 | val = _core_.new_EmptyImage(*args, **kwargs) | |
d14a1e28 RD |
2357 | val.thisown = 1 |
2358 | return val | |
2359 | ||
2360 | def ImageFromBitmap(*args, **kwargs): | |
196addbf | 2361 | """ImageFromBitmap(Bitmap bitmap) -> Image""" |
54f9ee45 | 2362 | val = _core_.new_ImageFromBitmap(*args, **kwargs) |
d14a1e28 RD |
2363 | val.thisown = 1 |
2364 | return val | |
2365 | ||
2366 | def ImageFromData(*args, **kwargs): | |
e811c8ce | 2367 | """ImageFromData(int width, int height, unsigned char data) -> Image""" |
54f9ee45 | 2368 | val = _core_.new_ImageFromData(*args, **kwargs) |
d14a1e28 RD |
2369 | val.thisown = 1 |
2370 | return val | |
2371 | ||
e811c8ce | 2372 | def Image_CanRead(*args, **kwargs): |
196addbf | 2373 | """Image_CanRead(String name) -> bool""" |
54f9ee45 | 2374 | return _core_.Image_CanRead(*args, **kwargs) |
d14a1e28 | 2375 | |
e811c8ce | 2376 | def Image_GetImageCount(*args, **kwargs): |
196addbf | 2377 | """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int""" |
54f9ee45 | 2378 | return _core_.Image_GetImageCount(*args, **kwargs) |
d14a1e28 | 2379 | |
e811c8ce | 2380 | def Image_CanReadStream(*args, **kwargs): |
196addbf | 2381 | """Image_CanReadStream(InputStream stream) -> bool""" |
54f9ee45 | 2382 | return _core_.Image_CanReadStream(*args, **kwargs) |
d14a1e28 | 2383 | |
e811c8ce RD |
2384 | def Image_AddHandler(*args, **kwargs): |
2385 | """Image_AddHandler(ImageHandler handler)""" | |
54f9ee45 | 2386 | return _core_.Image_AddHandler(*args, **kwargs) |
d14a1e28 | 2387 | |
e811c8ce RD |
2388 | def Image_InsertHandler(*args, **kwargs): |
2389 | """Image_InsertHandler(ImageHandler handler)""" | |
54f9ee45 | 2390 | return _core_.Image_InsertHandler(*args, **kwargs) |
d14a1e28 | 2391 | |
e811c8ce | 2392 | def Image_RemoveHandler(*args, **kwargs): |
196addbf | 2393 | """Image_RemoveHandler(String name) -> bool""" |
54f9ee45 | 2394 | return _core_.Image_RemoveHandler(*args, **kwargs) |
d14a1e28 | 2395 | |
e811c8ce | 2396 | def Image_GetImageExtWildcard(*args, **kwargs): |
196addbf | 2397 | """Image_GetImageExtWildcard() -> String""" |
54f9ee45 | 2398 | return _core_.Image_GetImageExtWildcard(*args, **kwargs) |
d14a1e28 | 2399 | |
5e4ca4a8 RD |
2400 | def InitAllImageHandlers(): |
2401 | """ | |
2402 | The former functionality of InitAllImageHanders is now done internal to | |
2403 | the _core_ extension module and so this function has become a simple NOP. | |
2404 | """ | |
2405 | pass | |
d14a1e28 | 2406 | |
54f9ee45 RD |
2407 | IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES |
2408 | IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM | |
2409 | BMP_24BPP = _core_.BMP_24BPP | |
2410 | BMP_8BPP = _core_.BMP_8BPP | |
2411 | BMP_8BPP_GREY = _core_.BMP_8BPP_GREY | |
2412 | BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY | |
2413 | BMP_8BPP_RED = _core_.BMP_8BPP_RED | |
2414 | BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE | |
2415 | BMP_4BPP = _core_.BMP_4BPP | |
2416 | BMP_1BPP = _core_.BMP_1BPP | |
2417 | BMP_1BPP_BW = _core_.BMP_1BPP_BW | |
d14a1e28 | 2418 | class BMPHandler(ImageHandler): |
e811c8ce RD |
2419 | def __repr__(self): |
2420 | return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2421 | def __init__(self, *args, **kwargs): |
a95a7133 | 2422 | """__init__(self) -> BMPHandler""" |
54f9ee45 | 2423 | newobj = _core_.new_BMPHandler(*args, **kwargs) |
d14a1e28 RD |
2424 | self.this = newobj.this |
2425 | self.thisown = 1 | |
2426 | del newobj.thisown | |
d14a1e28 RD |
2427 | |
2428 | class BMPHandlerPtr(BMPHandler): | |
2429 | def __init__(self, this): | |
2430 | self.this = this | |
2431 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2432 | self.__class__ = BMPHandler | |
54f9ee45 | 2433 | _core_.BMPHandler_swigregister(BMPHandlerPtr) |
d14a1e28 RD |
2434 | NullImage = cvar.NullImage |
2435 | IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT | |
2436 | IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X | |
2437 | IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y | |
2438 | IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION | |
2439 | IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT | |
2440 | ||
2441 | class ICOHandler(BMPHandler): | |
e811c8ce RD |
2442 | def __repr__(self): |
2443 | return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2444 | def __init__(self, *args, **kwargs): |
a95a7133 | 2445 | """__init__(self) -> ICOHandler""" |
54f9ee45 | 2446 | newobj = _core_.new_ICOHandler(*args, **kwargs) |
d14a1e28 RD |
2447 | self.this = newobj.this |
2448 | self.thisown = 1 | |
2449 | del newobj.thisown | |
d14a1e28 RD |
2450 | |
2451 | class ICOHandlerPtr(ICOHandler): | |
2452 | def __init__(self, this): | |
2453 | self.this = this | |
2454 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2455 | self.__class__ = ICOHandler | |
54f9ee45 | 2456 | _core_.ICOHandler_swigregister(ICOHandlerPtr) |
d14a1e28 RD |
2457 | |
2458 | class CURHandler(ICOHandler): | |
e811c8ce RD |
2459 | def __repr__(self): |
2460 | return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2461 | def __init__(self, *args, **kwargs): |
a95a7133 | 2462 | """__init__(self) -> CURHandler""" |
54f9ee45 | 2463 | newobj = _core_.new_CURHandler(*args, **kwargs) |
d14a1e28 RD |
2464 | self.this = newobj.this |
2465 | self.thisown = 1 | |
2466 | del newobj.thisown | |
d14a1e28 RD |
2467 | |
2468 | class CURHandlerPtr(CURHandler): | |
2469 | def __init__(self, this): | |
2470 | self.this = this | |
2471 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2472 | self.__class__ = CURHandler | |
54f9ee45 | 2473 | _core_.CURHandler_swigregister(CURHandlerPtr) |
d14a1e28 RD |
2474 | |
2475 | class ANIHandler(CURHandler): | |
e811c8ce RD |
2476 | def __repr__(self): |
2477 | return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2478 | def __init__(self, *args, **kwargs): |
a95a7133 | 2479 | """__init__(self) -> ANIHandler""" |
54f9ee45 | 2480 | newobj = _core_.new_ANIHandler(*args, **kwargs) |
d14a1e28 RD |
2481 | self.this = newobj.this |
2482 | self.thisown = 1 | |
2483 | del newobj.thisown | |
d14a1e28 RD |
2484 | |
2485 | class ANIHandlerPtr(ANIHandler): | |
2486 | def __init__(self, this): | |
2487 | self.this = this | |
2488 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2489 | self.__class__ = ANIHandler | |
54f9ee45 | 2490 | _core_.ANIHandler_swigregister(ANIHandlerPtr) |
d14a1e28 RD |
2491 | |
2492 | class PNGHandler(ImageHandler): | |
e811c8ce RD |
2493 | def __repr__(self): |
2494 | return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2495 | def __init__(self, *args, **kwargs): |
a95a7133 | 2496 | """__init__(self) -> PNGHandler""" |
54f9ee45 | 2497 | newobj = _core_.new_PNGHandler(*args, **kwargs) |
d14a1e28 RD |
2498 | self.this = newobj.this |
2499 | self.thisown = 1 | |
2500 | del newobj.thisown | |
d14a1e28 RD |
2501 | |
2502 | class PNGHandlerPtr(PNGHandler): | |
2503 | def __init__(self, this): | |
2504 | self.this = this | |
2505 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2506 | self.__class__ = PNGHandler | |
54f9ee45 | 2507 | _core_.PNGHandler_swigregister(PNGHandlerPtr) |
d14a1e28 RD |
2508 | |
2509 | class GIFHandler(ImageHandler): | |
e811c8ce RD |
2510 | def __repr__(self): |
2511 | return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2512 | def __init__(self, *args, **kwargs): |
a95a7133 | 2513 | """__init__(self) -> GIFHandler""" |
54f9ee45 | 2514 | newobj = _core_.new_GIFHandler(*args, **kwargs) |
d14a1e28 RD |
2515 | self.this = newobj.this |
2516 | self.thisown = 1 | |
2517 | del newobj.thisown | |
d14a1e28 RD |
2518 | |
2519 | class GIFHandlerPtr(GIFHandler): | |
2520 | def __init__(self, this): | |
2521 | self.this = this | |
2522 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2523 | self.__class__ = GIFHandler | |
54f9ee45 | 2524 | _core_.GIFHandler_swigregister(GIFHandlerPtr) |
d14a1e28 RD |
2525 | |
2526 | class PCXHandler(ImageHandler): | |
e811c8ce RD |
2527 | def __repr__(self): |
2528 | return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2529 | def __init__(self, *args, **kwargs): |
a95a7133 | 2530 | """__init__(self) -> PCXHandler""" |
54f9ee45 | 2531 | newobj = _core_.new_PCXHandler(*args, **kwargs) |
d14a1e28 RD |
2532 | self.this = newobj.this |
2533 | self.thisown = 1 | |
2534 | del newobj.thisown | |
d14a1e28 RD |
2535 | |
2536 | class PCXHandlerPtr(PCXHandler): | |
2537 | def __init__(self, this): | |
2538 | self.this = this | |
2539 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2540 | self.__class__ = PCXHandler | |
54f9ee45 | 2541 | _core_.PCXHandler_swigregister(PCXHandlerPtr) |
d14a1e28 RD |
2542 | |
2543 | class JPEGHandler(ImageHandler): | |
e811c8ce RD |
2544 | def __repr__(self): |
2545 | return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2546 | def __init__(self, *args, **kwargs): |
a95a7133 | 2547 | """__init__(self) -> JPEGHandler""" |
54f9ee45 | 2548 | newobj = _core_.new_JPEGHandler(*args, **kwargs) |
d14a1e28 RD |
2549 | self.this = newobj.this |
2550 | self.thisown = 1 | |
2551 | del newobj.thisown | |
d14a1e28 RD |
2552 | |
2553 | class JPEGHandlerPtr(JPEGHandler): | |
2554 | def __init__(self, this): | |
2555 | self.this = this | |
2556 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2557 | self.__class__ = JPEGHandler | |
54f9ee45 | 2558 | _core_.JPEGHandler_swigregister(JPEGHandlerPtr) |
d14a1e28 RD |
2559 | |
2560 | class PNMHandler(ImageHandler): | |
e811c8ce RD |
2561 | def __repr__(self): |
2562 | return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2563 | def __init__(self, *args, **kwargs): |
a95a7133 | 2564 | """__init__(self) -> PNMHandler""" |
54f9ee45 | 2565 | newobj = _core_.new_PNMHandler(*args, **kwargs) |
d14a1e28 RD |
2566 | self.this = newobj.this |
2567 | self.thisown = 1 | |
2568 | del newobj.thisown | |
d14a1e28 RD |
2569 | |
2570 | class PNMHandlerPtr(PNMHandler): | |
2571 | def __init__(self, this): | |
2572 | self.this = this | |
2573 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2574 | self.__class__ = PNMHandler | |
54f9ee45 | 2575 | _core_.PNMHandler_swigregister(PNMHandlerPtr) |
d14a1e28 RD |
2576 | |
2577 | class XPMHandler(ImageHandler): | |
e811c8ce RD |
2578 | def __repr__(self): |
2579 | return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2580 | def __init__(self, *args, **kwargs): |
a95a7133 | 2581 | """__init__(self) -> XPMHandler""" |
54f9ee45 | 2582 | newobj = _core_.new_XPMHandler(*args, **kwargs) |
d14a1e28 RD |
2583 | self.this = newobj.this |
2584 | self.thisown = 1 | |
2585 | del newobj.thisown | |
d14a1e28 RD |
2586 | |
2587 | class XPMHandlerPtr(XPMHandler): | |
2588 | def __init__(self, this): | |
2589 | self.this = this | |
2590 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2591 | self.__class__ = XPMHandler | |
54f9ee45 | 2592 | _core_.XPMHandler_swigregister(XPMHandlerPtr) |
d14a1e28 RD |
2593 | |
2594 | class TIFFHandler(ImageHandler): | |
e811c8ce RD |
2595 | def __repr__(self): |
2596 | return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2597 | def __init__(self, *args, **kwargs): |
a95a7133 | 2598 | """__init__(self) -> TIFFHandler""" |
54f9ee45 | 2599 | newobj = _core_.new_TIFFHandler(*args, **kwargs) |
d14a1e28 RD |
2600 | self.this = newobj.this |
2601 | self.thisown = 1 | |
2602 | del newobj.thisown | |
d14a1e28 RD |
2603 | |
2604 | class TIFFHandlerPtr(TIFFHandler): | |
2605 | def __init__(self, this): | |
2606 | self.this = this | |
2607 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2608 | self.__class__ = TIFFHandler | |
54f9ee45 | 2609 | _core_.TIFFHandler_swigregister(TIFFHandlerPtr) |
d14a1e28 | 2610 | |
c0de73ae RD |
2611 | QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS |
2612 | QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE | |
2613 | class Quantize(object): | |
2614 | """Performs quantization, or colour reduction, on a wxImage.""" | |
2615 | def __init__(self): raise RuntimeError, "No constructor defined" | |
2616 | def __repr__(self): | |
2617 | return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2618 | def Quantize(*args, **kwargs): | |
2619 | """ | |
2620 | Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool | |
2621 | ||
2622 | Reduce the colours in the source image and put the result into the | |
2623 | destination image, setting the palette in the destination if | |
2624 | needed. Both images may be the same, to overwrite the source image. | |
2625 | """ | |
2626 | return _core_.Quantize_Quantize(*args, **kwargs) | |
2627 | ||
2628 | Quantize = staticmethod(Quantize) | |
2629 | ||
2630 | class QuantizePtr(Quantize): | |
2631 | def __init__(self, this): | |
2632 | self.this = this | |
2633 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2634 | self.__class__ = Quantize | |
2635 | _core_.Quantize_swigregister(QuantizePtr) | |
2636 | ||
2637 | def Quantize_Quantize(*args, **kwargs): | |
2638 | """ | |
2639 | Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool | |
2640 | ||
2641 | Reduce the colours in the source image and put the result into the | |
2642 | destination image, setting the palette in the destination if | |
2643 | needed. Both images may be the same, to overwrite the source image. | |
2644 | """ | |
2645 | return _core_.Quantize_Quantize(*args, **kwargs) | |
2646 | ||
d14a1e28 RD |
2647 | #--------------------------------------------------------------------------- |
2648 | ||
2649 | class EvtHandler(Object): | |
e811c8ce RD |
2650 | def __repr__(self): |
2651 | return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 2652 | def __init__(self, *args, **kwargs): |
a95a7133 | 2653 | """__init__(self) -> EvtHandler""" |
54f9ee45 | 2654 | newobj = _core_.new_EvtHandler(*args, **kwargs) |
d14a1e28 RD |
2655 | self.this = newobj.this |
2656 | self.thisown = 1 | |
2657 | del newobj.thisown | |
e811c8ce | 2658 | def GetNextHandler(*args, **kwargs): |
a95a7133 | 2659 | """GetNextHandler(self) -> EvtHandler""" |
54f9ee45 | 2660 | return _core_.EvtHandler_GetNextHandler(*args, **kwargs) |
e811c8ce RD |
2661 | |
2662 | def GetPreviousHandler(*args, **kwargs): | |
a95a7133 | 2663 | """GetPreviousHandler(self) -> EvtHandler""" |
54f9ee45 | 2664 | return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs) |
e811c8ce RD |
2665 | |
2666 | def SetNextHandler(*args, **kwargs): | |
a95a7133 | 2667 | """SetNextHandler(self, EvtHandler handler)""" |
54f9ee45 | 2668 | return _core_.EvtHandler_SetNextHandler(*args, **kwargs) |
e811c8ce RD |
2669 | |
2670 | def SetPreviousHandler(*args, **kwargs): | |
a95a7133 | 2671 | """SetPreviousHandler(self, EvtHandler handler)""" |
54f9ee45 | 2672 | return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs) |
e811c8ce RD |
2673 | |
2674 | def GetEvtHandlerEnabled(*args, **kwargs): | |
a95a7133 | 2675 | """GetEvtHandlerEnabled(self) -> bool""" |
54f9ee45 | 2676 | return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs) |
e811c8ce RD |
2677 | |
2678 | def SetEvtHandlerEnabled(*args, **kwargs): | |
a95a7133 | 2679 | """SetEvtHandlerEnabled(self, bool enabled)""" |
54f9ee45 | 2680 | return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs) |
e811c8ce RD |
2681 | |
2682 | def ProcessEvent(*args, **kwargs): | |
a95a7133 | 2683 | """ProcessEvent(self, Event event) -> bool""" |
54f9ee45 | 2684 | return _core_.EvtHandler_ProcessEvent(*args, **kwargs) |
e811c8ce RD |
2685 | |
2686 | def AddPendingEvent(*args, **kwargs): | |
a95a7133 | 2687 | """AddPendingEvent(self, Event event)""" |
54f9ee45 | 2688 | return _core_.EvtHandler_AddPendingEvent(*args, **kwargs) |
e811c8ce RD |
2689 | |
2690 | def ProcessPendingEvents(*args, **kwargs): | |
a95a7133 | 2691 | """ProcessPendingEvents(self)""" |
54f9ee45 | 2692 | return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs) |
e811c8ce RD |
2693 | |
2694 | def Connect(*args, **kwargs): | |
a95a7133 | 2695 | """Connect(self, int id, int lastId, int eventType, PyObject func)""" |
54f9ee45 | 2696 | return _core_.EvtHandler_Connect(*args, **kwargs) |
e811c8ce RD |
2697 | |
2698 | def Disconnect(*args, **kwargs): | |
a95a7133 | 2699 | """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool""" |
54f9ee45 | 2700 | return _core_.EvtHandler_Disconnect(*args, **kwargs) |
e811c8ce RD |
2701 | |
2702 | def _setOORInfo(*args, **kwargs): | |
a95a7133 | 2703 | """_setOORInfo(self, PyObject _self)""" |
54f9ee45 | 2704 | return _core_.EvtHandler__setOORInfo(*args, **kwargs) |
e811c8ce | 2705 | |
d14a1e28 RD |
2706 | def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
2707 | """ | |
2708 | Bind an event to an event handler. | |
2709 | ||
db3e571a RD |
2710 | :param event: One of the EVT_* objects that specifies the |
2711 | type of event to bind, | |
d14a1e28 | 2712 | |
db3e571a RD |
2713 | :param handler: A callable object to be invoked when the |
2714 | event is delivered to self. Pass None to | |
2715 | disconnect an event handler. | |
d14a1e28 | 2716 | |
db3e571a RD |
2717 | :param source: Sometimes the event originates from a |
2718 | different window than self, but you still | |
2719 | want to catch it in self. (For example, a | |
2720 | button event delivered to a frame.) By | |
2721 | passing the source of the event, the event | |
2722 | handling system is able to differentiate | |
2723 | between the same event type from different | |
2724 | controls. | |
d14a1e28 | 2725 | |
db3e571a RD |
2726 | :param id: Used to spcify the event source by ID instead |
2727 | of instance. | |
2728 | ||
2729 | :param id2: Used when it is desirable to bind a handler | |
2730 | to a range of IDs, such as with EVT_MENU_RANGE. | |
d14a1e28 RD |
2731 | """ |
2732 | if source is not None: | |
2733 | id = source.GetId() | |
2734 | event.Bind(self, id, id2, handler) | |
2735 | ||
66c033b4 RD |
2736 | def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): |
2737 | """ | |
2738 | Disconencts the event handler binding for event from self. | |
2739 | Returns True if successful. | |
2740 | """ | |
2741 | if source is not None: | |
2742 | id = source.GetId() | |
2743 | return event.Unbind(self, id, id2) | |
d14a1e28 | 2744 | |
d14a1e28 RD |
2745 | |
2746 | class EvtHandlerPtr(EvtHandler): | |
2747 | def __init__(self, this): | |
2748 | self.this = this | |
2749 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2750 | self.__class__ = EvtHandler | |
54f9ee45 | 2751 | _core_.EvtHandler_swigregister(EvtHandlerPtr) |
d14a1e28 RD |
2752 | |
2753 | #--------------------------------------------------------------------------- | |
2754 | ||
2755 | class PyEventBinder(object): | |
2756 | """ | |
2757 | Instances of this class are used to bind specific events to event | |
2758 | handlers. | |
2759 | """ | |
2760 | def __init__(self, evtType, expectedIDs=0): | |
2761 | if expectedIDs not in [0, 1, 2]: | |
2762 | raise ValueError, "Invalid number of expectedIDs" | |
2763 | self.expectedIDs = expectedIDs | |
2764 | ||
2765 | if type(evtType) == list or type(evtType) == tuple: | |
2766 | self.evtType = evtType | |
2767 | else: | |
2768 | self.evtType = [evtType] | |
2769 | ||
2770 | ||
2771 | def Bind(self, target, id1, id2, function): | |
2772 | """Bind this set of event types to target.""" | |
2773 | for et in self.evtType: | |
2774 | target.Connect(id1, id2, et, function) | |
2775 | ||
66c033b4 RD |
2776 | |
2777 | def Unbind(self, target, id1, id2): | |
2778 | """Remove an event binding.""" | |
2779 | success = 0 | |
2780 | for et in self.evtType: | |
2781 | success += target.Disconnect(id1, id2, et) | |
2782 | return success != 0 | |
2783 | ||
d14a1e28 RD |
2784 | |
2785 | def __call__(self, *args): | |
2786 | """ | |
2787 | For backwards compatibility with the old EVT_* functions. | |
2788 | Should be called with either (window, func), (window, ID, | |
2789 | func) or (window, ID1, ID2, func) parameters depending on the | |
2790 | type of the event. | |
2791 | """ | |
2792 | assert len(args) == 2 + self.expectedIDs | |
2793 | id1 = wx.ID_ANY | |
2794 | id2 = wx.ID_ANY | |
2795 | target = args[0] | |
2796 | if self.expectedIDs == 0: | |
2797 | func = args[1] | |
2798 | elif self.expectedIDs == 1: | |
2799 | id1 = args[1] | |
2800 | func = args[2] | |
2801 | elif self.expectedIDs == 2: | |
2802 | id1 = args[1] | |
2803 | id2 = args[2] | |
2804 | func = args[3] | |
2805 | else: | |
2806 | raise ValueError, "Unexpected number of IDs" | |
2807 | ||
2808 | self.Bind(target, id1, id2, func) | |
2809 | ||
2810 | ||
2811 | # These two are square pegs that don't fit the PyEventBinder hole... | |
2812 | def EVT_COMMAND(win, id, cmd, func): | |
2813 | win.Connect(id, -1, cmd, func) | |
2814 | def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): | |
2815 | win.Connect(id1, id2, cmd, func) | |
2816 | ||
2817 | ||
2818 | #--------------------------------------------------------------------------- | |
2819 | ||
2820 | #--------------------------------------------------------------------------- | |
2821 | ||
54f9ee45 RD |
2822 | EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE |
2823 | EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX | |
d14a1e28 | 2824 | |
e811c8ce RD |
2825 | def NewEventType(*args, **kwargs): |
2826 | """NewEventType() -> wxEventType""" | |
54f9ee45 RD |
2827 | return _core_.NewEventType(*args, **kwargs) |
2828 | wxEVT_NULL = _core_.wxEVT_NULL | |
2829 | wxEVT_FIRST = _core_.wxEVT_FIRST | |
2830 | wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST | |
2831 | wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED | |
2832 | wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED | |
2833 | wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED | |
2834 | wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED | |
2835 | wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED | |
2836 | wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED | |
2837 | wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED | |
2838 | wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED | |
2839 | wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED | |
2840 | wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED | |
2841 | wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED | |
2842 | wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED | |
2843 | wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED | |
2844 | wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED | |
2845 | wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED | |
2846 | wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER | |
2847 | wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN | |
2848 | wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP | |
2849 | wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN | |
2850 | wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP | |
2851 | wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN | |
2852 | wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP | |
2853 | wxEVT_MOTION = _core_.wxEVT_MOTION | |
2854 | wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW | |
2855 | wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW | |
2856 | wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK | |
2857 | wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK | |
2858 | wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK | |
2859 | wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS | |
2860 | wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS | |
2861 | wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS | |
2862 | wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL | |
2863 | wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN | |
2864 | wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP | |
2865 | wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN | |
2866 | wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP | |
2867 | wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN | |
2868 | wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP | |
2869 | wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION | |
2870 | wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW | |
2871 | wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW | |
2872 | wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK | |
2873 | wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK | |
2874 | wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK | |
2875 | wxEVT_CHAR = _core_.wxEVT_CHAR | |
2876 | wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK | |
2877 | wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY | |
2878 | wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN | |
2879 | wxEVT_KEY_UP = _core_.wxEVT_KEY_UP | |
2880 | wxEVT_HOTKEY = _core_.wxEVT_HOTKEY | |
2881 | wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR | |
2882 | wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP | |
2883 | wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM | |
2884 | wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP | |
2885 | wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN | |
2886 | wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP | |
2887 | wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN | |
2888 | wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK | |
2889 | wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE | |
2890 | wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL | |
2891 | wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP | |
2892 | wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM | |
2893 | wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP | |
2894 | wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN | |
2895 | wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP | |
2896 | wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN | |
2897 | wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK | |
2898 | wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE | |
2899 | wxEVT_SIZE = _core_.wxEVT_SIZE | |
2900 | wxEVT_MOVE = _core_.wxEVT_MOVE | |
2901 | wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW | |
2902 | wxEVT_END_SESSION = _core_.wxEVT_END_SESSION | |
2903 | wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION | |
2904 | wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP | |
2905 | wxEVT_POWER = _core_.wxEVT_POWER | |
2906 | wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE | |
2907 | wxEVT_CREATE = _core_.wxEVT_CREATE | |
2908 | wxEVT_DESTROY = _core_.wxEVT_DESTROY | |
2909 | wxEVT_SHOW = _core_.wxEVT_SHOW | |
2910 | wxEVT_ICONIZE = _core_.wxEVT_ICONIZE | |
2911 | wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE | |
2912 | wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED | |
2913 | wxEVT_PAINT = _core_.wxEVT_PAINT | |
2914 | wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND | |
2915 | wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT | |
2916 | wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON | |
2917 | wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN | |
2918 | wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE | |
2919 | wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT | |
2920 | wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU | |
2921 | wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED | |
2922 | wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED | |
2923 | wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED | |
2924 | wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE | |
2925 | wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED | |
2926 | wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES | |
2927 | wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM | |
2928 | wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM | |
2929 | wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM | |
2930 | wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG | |
2931 | wxEVT_IDLE = _core_.wxEVT_IDLE | |
2932 | wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI | |
2933 | wxEVT_SIZING = _core_.wxEVT_SIZING | |
2934 | wxEVT_MOVING = _core_.wxEVT_MOVING | |
2935 | wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK | |
2936 | wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK | |
2937 | wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK | |
2938 | wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK | |
2939 | wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS | |
2940 | wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS | |
2941 | wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER | |
d14a1e28 RD |
2942 | # |
2943 | # Create some event binders | |
2944 | EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE ) | |
2945 | EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING ) | |
2946 | EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE ) | |
2947 | EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING ) | |
2948 | EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW ) | |
2949 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
2950 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
2951 | EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT ) | |
2952 | EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT ) | |
2953 | EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND ) | |
2954 | EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR ) | |
2955 | EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN ) | |
2956 | EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP ) | |
2957 | EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) | |
2958 | EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK ) | |
2959 | EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN ) | |
2960 | EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE ) | |
2961 | EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1) | |
2962 | EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT ) | |
2963 | EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS ) | |
2964 | EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS ) | |
2965 | EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS ) | |
2966 | EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE ) | |
2967 | EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP ) | |
2968 | EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) | |
2969 | EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) | |
2970 | EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES ) | |
2971 | EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG ) | |
2972 | EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED ) | |
2973 | EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED ) | |
2974 | EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW ) | |
2975 | EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE ) | |
2976 | EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE ) | |
2977 | EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY ) | |
2978 | EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED ) | |
2979 | EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE ) | |
2980 | EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE ) | |
2981 | EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY ) | |
2982 | EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR ) | |
2983 | EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED ) | |
2984 | ||
2985 | EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN ) | |
2986 | EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP ) | |
2987 | EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN ) | |
2988 | EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP ) | |
2989 | EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN ) | |
2990 | EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP ) | |
2991 | EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION ) | |
2992 | EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK ) | |
2993 | EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK ) | |
2994 | EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK ) | |
2995 | EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW ) | |
2996 | EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW ) | |
2997 | EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL ) | |
2998 | ||
2999 | EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN, | |
3000 | wxEVT_LEFT_UP, | |
3001 | wxEVT_MIDDLE_DOWN, | |
3002 | wxEVT_MIDDLE_UP, | |
3003 | wxEVT_RIGHT_DOWN, | |
3004 | wxEVT_RIGHT_UP, | |
3005 | wxEVT_MOTION, | |
3006 | wxEVT_LEFT_DCLICK, | |
3007 | wxEVT_MIDDLE_DCLICK, | |
3008 | wxEVT_RIGHT_DCLICK, | |
3009 | wxEVT_ENTER_WINDOW, | |
3010 | wxEVT_LEAVE_WINDOW, | |
3011 | wxEVT_MOUSEWHEEL | |
3012 | ]) | |
3013 | ||
3014 | ||
3015 | # Scrolling from wxWindow (sent to wxScrolledWindow) | |
3016 | EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, | |
3017 | wxEVT_SCROLLWIN_BOTTOM, | |
3018 | wxEVT_SCROLLWIN_LINEUP, | |
3019 | wxEVT_SCROLLWIN_LINEDOWN, | |
3020 | wxEVT_SCROLLWIN_PAGEUP, | |
3021 | wxEVT_SCROLLWIN_PAGEDOWN, | |
3022 | wxEVT_SCROLLWIN_THUMBTRACK, | |
3023 | wxEVT_SCROLLWIN_THUMBRELEASE, | |
3024 | ]) | |
3025 | ||
3026 | EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP ) | |
3027 | EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM ) | |
3028 | EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP ) | |
3029 | EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN ) | |
3030 | EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP ) | |
3031 | EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN ) | |
3032 | EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK ) | |
3033 | EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE ) | |
3034 | ||
3035 | # Scrolling from wxSlider and wxScrollBar | |
3036 | EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
3037 | wxEVT_SCROLL_BOTTOM, | |
3038 | wxEVT_SCROLL_LINEUP, | |
3039 | wxEVT_SCROLL_LINEDOWN, | |
3040 | wxEVT_SCROLL_PAGEUP, | |
3041 | wxEVT_SCROLL_PAGEDOWN, | |
3042 | wxEVT_SCROLL_THUMBTRACK, | |
3043 | wxEVT_SCROLL_THUMBRELEASE, | |
3044 | wxEVT_SCROLL_ENDSCROLL, | |
3045 | ]) | |
3046 | ||
3047 | EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP ) | |
3048 | EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM ) | |
3049 | EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP ) | |
3050 | EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN ) | |
3051 | EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP ) | |
3052 | EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN ) | |
3053 | EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK ) | |
3054 | EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE ) | |
3055 | EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL ) | |
3056 | ||
3057 | # Scrolling from wxSlider and wxScrollBar, with an id | |
3058 | EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, | |
3059 | wxEVT_SCROLL_BOTTOM, | |
3060 | wxEVT_SCROLL_LINEUP, | |
3061 | wxEVT_SCROLL_LINEDOWN, | |
3062 | wxEVT_SCROLL_PAGEUP, | |
3063 | wxEVT_SCROLL_PAGEDOWN, | |
3064 | wxEVT_SCROLL_THUMBTRACK, | |
3065 | wxEVT_SCROLL_THUMBRELEASE, | |
3066 | wxEVT_SCROLL_ENDSCROLL, | |
3067 | ], 1) | |
3068 | ||
3069 | EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1) | |
3070 | EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1) | |
3071 | EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1) | |
3072 | EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1) | |
3073 | EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1) | |
3074 | EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1) | |
3075 | EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) | |
3076 | EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1) | |
3077 | EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1) | |
3078 | ||
d14a1e28 RD |
3079 | EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1) |
3080 | EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1) | |
3081 | EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1) | |
3082 | EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1) | |
3083 | EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1) | |
3084 | EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1) | |
3085 | EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2) | |
3086 | EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1) | |
3087 | EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1) | |
3088 | EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1) | |
3089 | ||
3090 | EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1) | |
3091 | EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1) | |
3092 | EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1) | |
3093 | EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1) | |
3094 | EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2) | |
3095 | EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1) | |
3096 | EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2) | |
3097 | EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1) | |
3098 | EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1) | |
3099 | ||
3100 | ||
3101 | EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1) | |
3102 | EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1) | |
3103 | EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1) | |
3104 | EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1) | |
3105 | EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1) | |
3106 | EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1) | |
3107 | EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1) | |
3108 | ||
3109 | EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE ) | |
3110 | ||
3111 | EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1) | |
3112 | EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2) | |
3113 | ||
3114 | EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) | |
3115 | ||
3116 | ||
3117 | ||
3118 | #--------------------------------------------------------------------------- | |
3119 | ||
3120 | class Event(Object): | |
e811c8ce RD |
3121 | def __init__(self): raise RuntimeError, "No constructor defined" |
3122 | def __repr__(self): | |
3123 | return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 | 3124 | def __del__(self, destroy=_core_.delete_Event): |
a95a7133 | 3125 | """__del__(self)""" |
d14a1e28 RD |
3126 | try: |
3127 | if self.thisown: destroy(self) | |
3128 | except: pass | |
e811c8ce RD |
3129 | |
3130 | def SetEventType(*args, **kwargs): | |
a95a7133 | 3131 | """SetEventType(self, wxEventType typ)""" |
54f9ee45 | 3132 | return _core_.Event_SetEventType(*args, **kwargs) |
e811c8ce RD |
3133 | |
3134 | def GetEventType(*args, **kwargs): | |
a95a7133 | 3135 | """GetEventType(self) -> wxEventType""" |
54f9ee45 | 3136 | return _core_.Event_GetEventType(*args, **kwargs) |
e811c8ce RD |
3137 | |
3138 | def GetEventObject(*args, **kwargs): | |
a95a7133 | 3139 | """GetEventObject(self) -> Object""" |
54f9ee45 | 3140 | return _core_.Event_GetEventObject(*args, **kwargs) |
e811c8ce RD |
3141 | |
3142 | def SetEventObject(*args, **kwargs): | |
a95a7133 | 3143 | """SetEventObject(self, Object obj)""" |
54f9ee45 | 3144 | return _core_.Event_SetEventObject(*args, **kwargs) |
e811c8ce RD |
3145 | |
3146 | def GetTimestamp(*args, **kwargs): | |
a95a7133 | 3147 | """GetTimestamp(self) -> long""" |
54f9ee45 | 3148 | return _core_.Event_GetTimestamp(*args, **kwargs) |
e811c8ce RD |
3149 | |
3150 | def SetTimestamp(*args, **kwargs): | |
a95a7133 | 3151 | """SetTimestamp(self, long ts=0)""" |
54f9ee45 | 3152 | return _core_.Event_SetTimestamp(*args, **kwargs) |
e811c8ce RD |
3153 | |
3154 | def GetId(*args, **kwargs): | |
a95a7133 | 3155 | """GetId(self) -> int""" |
54f9ee45 | 3156 | return _core_.Event_GetId(*args, **kwargs) |
e811c8ce RD |
3157 | |
3158 | def SetId(*args, **kwargs): | |
a95a7133 | 3159 | """SetId(self, int Id)""" |
54f9ee45 | 3160 | return _core_.Event_SetId(*args, **kwargs) |
e811c8ce RD |
3161 | |
3162 | def IsCommandEvent(*args, **kwargs): | |
a95a7133 | 3163 | """IsCommandEvent(self) -> bool""" |
54f9ee45 | 3164 | return _core_.Event_IsCommandEvent(*args, **kwargs) |
e811c8ce RD |
3165 | |
3166 | def Skip(*args, **kwargs): | |
a95a7133 | 3167 | """Skip(self, bool skip=True)""" |
54f9ee45 | 3168 | return _core_.Event_Skip(*args, **kwargs) |
e811c8ce RD |
3169 | |
3170 | def GetSkipped(*args, **kwargs): | |
a95a7133 | 3171 | """GetSkipped(self) -> bool""" |
54f9ee45 | 3172 | return _core_.Event_GetSkipped(*args, **kwargs) |
e811c8ce RD |
3173 | |
3174 | def ShouldPropagate(*args, **kwargs): | |
a95a7133 | 3175 | """ShouldPropagate(self) -> bool""" |
54f9ee45 | 3176 | return _core_.Event_ShouldPropagate(*args, **kwargs) |
e811c8ce RD |
3177 | |
3178 | def StopPropagation(*args, **kwargs): | |
a95a7133 | 3179 | """StopPropagation(self) -> int""" |
54f9ee45 | 3180 | return _core_.Event_StopPropagation(*args, **kwargs) |
e811c8ce RD |
3181 | |
3182 | def ResumePropagation(*args, **kwargs): | |
a95a7133 | 3183 | """ResumePropagation(self, int propagationLevel)""" |
54f9ee45 | 3184 | return _core_.Event_ResumePropagation(*args, **kwargs) |
e811c8ce RD |
3185 | |
3186 | def Clone(*args, **kwargs): | |
a95a7133 | 3187 | """Clone(self) -> Event""" |
54f9ee45 | 3188 | return _core_.Event_Clone(*args, **kwargs) |
e811c8ce | 3189 | |
d14a1e28 RD |
3190 | |
3191 | class EventPtr(Event): | |
3192 | def __init__(self, this): | |
3193 | self.this = this | |
3194 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3195 | self.__class__ = Event | |
54f9ee45 | 3196 | _core_.Event_swigregister(EventPtr) |
d14a1e28 RD |
3197 | |
3198 | #--------------------------------------------------------------------------- | |
3199 | ||
3200 | class PropagationDisabler(object): | |
e811c8ce RD |
3201 | def __repr__(self): |
3202 | return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3203 | def __init__(self, *args, **kwargs): |
a95a7133 | 3204 | """__init__(self, Event event) -> PropagationDisabler""" |
54f9ee45 | 3205 | newobj = _core_.new_PropagationDisabler(*args, **kwargs) |
d14a1e28 RD |
3206 | self.this = newobj.this |
3207 | self.thisown = 1 | |
3208 | del newobj.thisown | |
54f9ee45 | 3209 | def __del__(self, destroy=_core_.delete_PropagationDisabler): |
a95a7133 | 3210 | """__del__(self)""" |
d14a1e28 RD |
3211 | try: |
3212 | if self.thisown: destroy(self) | |
3213 | except: pass | |
e811c8ce | 3214 | |
d14a1e28 RD |
3215 | |
3216 | class PropagationDisablerPtr(PropagationDisabler): | |
3217 | def __init__(self, this): | |
3218 | self.this = this | |
3219 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3220 | self.__class__ = PropagationDisabler | |
54f9ee45 | 3221 | _core_.PropagationDisabler_swigregister(PropagationDisablerPtr) |
d14a1e28 RD |
3222 | |
3223 | class PropagateOnce(object): | |
e811c8ce RD |
3224 | def __repr__(self): |
3225 | return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3226 | def __init__(self, *args, **kwargs): |
a95a7133 | 3227 | """__init__(self, Event event) -> PropagateOnce""" |
54f9ee45 | 3228 | newobj = _core_.new_PropagateOnce(*args, **kwargs) |
d14a1e28 RD |
3229 | self.this = newobj.this |
3230 | self.thisown = 1 | |
3231 | del newobj.thisown | |
54f9ee45 | 3232 | def __del__(self, destroy=_core_.delete_PropagateOnce): |
a95a7133 | 3233 | """__del__(self)""" |
d14a1e28 RD |
3234 | try: |
3235 | if self.thisown: destroy(self) | |
3236 | except: pass | |
e811c8ce | 3237 | |
d14a1e28 RD |
3238 | |
3239 | class PropagateOncePtr(PropagateOnce): | |
3240 | def __init__(self, this): | |
3241 | self.this = this | |
3242 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3243 | self.__class__ = PropagateOnce | |
54f9ee45 | 3244 | _core_.PropagateOnce_swigregister(PropagateOncePtr) |
d14a1e28 RD |
3245 | |
3246 | #--------------------------------------------------------------------------- | |
3247 | ||
3248 | class CommandEvent(Event): | |
e811c8ce RD |
3249 | def __repr__(self): |
3250 | return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3251 | def __init__(self, *args, **kwargs): |
a95a7133 | 3252 | """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent""" |
54f9ee45 | 3253 | newobj = _core_.new_CommandEvent(*args, **kwargs) |
d14a1e28 RD |
3254 | self.this = newobj.this |
3255 | self.thisown = 1 | |
3256 | del newobj.thisown | |
e811c8ce | 3257 | def GetSelection(*args, **kwargs): |
a95a7133 | 3258 | """GetSelection(self) -> int""" |
54f9ee45 | 3259 | return _core_.CommandEvent_GetSelection(*args, **kwargs) |
e811c8ce RD |
3260 | |
3261 | def SetString(*args, **kwargs): | |
a95a7133 | 3262 | """SetString(self, String s)""" |
54f9ee45 | 3263 | return _core_.CommandEvent_SetString(*args, **kwargs) |
e811c8ce RD |
3264 | |
3265 | def GetString(*args, **kwargs): | |
a95a7133 | 3266 | """GetString(self) -> String""" |
54f9ee45 | 3267 | return _core_.CommandEvent_GetString(*args, **kwargs) |
e811c8ce RD |
3268 | |
3269 | def IsChecked(*args, **kwargs): | |
a95a7133 | 3270 | """IsChecked(self) -> bool""" |
54f9ee45 | 3271 | return _core_.CommandEvent_IsChecked(*args, **kwargs) |
e811c8ce | 3272 | |
242b7b46 | 3273 | Checked = IsChecked |
e811c8ce | 3274 | def IsSelection(*args, **kwargs): |
a95a7133 | 3275 | """IsSelection(self) -> bool""" |
54f9ee45 | 3276 | return _core_.CommandEvent_IsSelection(*args, **kwargs) |
e811c8ce RD |
3277 | |
3278 | def SetExtraLong(*args, **kwargs): | |
a95a7133 | 3279 | """SetExtraLong(self, long extraLong)""" |
54f9ee45 | 3280 | return _core_.CommandEvent_SetExtraLong(*args, **kwargs) |
e811c8ce RD |
3281 | |
3282 | def GetExtraLong(*args, **kwargs): | |
a95a7133 | 3283 | """GetExtraLong(self) -> long""" |
54f9ee45 | 3284 | return _core_.CommandEvent_GetExtraLong(*args, **kwargs) |
e811c8ce RD |
3285 | |
3286 | def SetInt(*args, **kwargs): | |
a95a7133 | 3287 | """SetInt(self, int i)""" |
54f9ee45 | 3288 | return _core_.CommandEvent_SetInt(*args, **kwargs) |
e811c8ce RD |
3289 | |
3290 | def GetInt(*args, **kwargs): | |
a95a7133 | 3291 | """GetInt(self) -> long""" |
54f9ee45 | 3292 | return _core_.CommandEvent_GetInt(*args, **kwargs) |
e811c8ce RD |
3293 | |
3294 | def Clone(*args, **kwargs): | |
a95a7133 | 3295 | """Clone(self) -> Event""" |
54f9ee45 | 3296 | return _core_.CommandEvent_Clone(*args, **kwargs) |
e811c8ce | 3297 | |
d14a1e28 RD |
3298 | |
3299 | class CommandEventPtr(CommandEvent): | |
3300 | def __init__(self, this): | |
3301 | self.this = this | |
3302 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3303 | self.__class__ = CommandEvent | |
54f9ee45 | 3304 | _core_.CommandEvent_swigregister(CommandEventPtr) |
d14a1e28 RD |
3305 | |
3306 | #--------------------------------------------------------------------------- | |
3307 | ||
3308 | class NotifyEvent(CommandEvent): | |
e811c8ce RD |
3309 | def __repr__(self): |
3310 | return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3311 | def __init__(self, *args, **kwargs): |
a95a7133 | 3312 | """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent""" |
54f9ee45 | 3313 | newobj = _core_.new_NotifyEvent(*args, **kwargs) |
d14a1e28 RD |
3314 | self.this = newobj.this |
3315 | self.thisown = 1 | |
3316 | del newobj.thisown | |
e811c8ce | 3317 | def Veto(*args, **kwargs): |
a95a7133 | 3318 | """Veto(self)""" |
54f9ee45 | 3319 | return _core_.NotifyEvent_Veto(*args, **kwargs) |
e811c8ce RD |
3320 | |
3321 | def Allow(*args, **kwargs): | |
a95a7133 | 3322 | """Allow(self)""" |
54f9ee45 | 3323 | return _core_.NotifyEvent_Allow(*args, **kwargs) |
e811c8ce RD |
3324 | |
3325 | def IsAllowed(*args, **kwargs): | |
a95a7133 | 3326 | """IsAllowed(self) -> bool""" |
54f9ee45 | 3327 | return _core_.NotifyEvent_IsAllowed(*args, **kwargs) |
e811c8ce | 3328 | |
d14a1e28 RD |
3329 | |
3330 | class NotifyEventPtr(NotifyEvent): | |
3331 | def __init__(self, this): | |
3332 | self.this = this | |
3333 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3334 | self.__class__ = NotifyEvent | |
54f9ee45 | 3335 | _core_.NotifyEvent_swigregister(NotifyEventPtr) |
d14a1e28 RD |
3336 | |
3337 | #--------------------------------------------------------------------------- | |
3338 | ||
3339 | class ScrollEvent(CommandEvent): | |
e811c8ce RD |
3340 | def __repr__(self): |
3341 | return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3342 | def __init__(self, *args, **kwargs): |
0df68c9f | 3343 | """ |
a95a7133 | 3344 | __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0, |
0df68c9f RD |
3345 | int orient=0) -> ScrollEvent |
3346 | """ | |
54f9ee45 | 3347 | newobj = _core_.new_ScrollEvent(*args, **kwargs) |
d14a1e28 RD |
3348 | self.this = newobj.this |
3349 | self.thisown = 1 | |
3350 | del newobj.thisown | |
e811c8ce | 3351 | def GetOrientation(*args, **kwargs): |
a95a7133 | 3352 | """GetOrientation(self) -> int""" |
54f9ee45 | 3353 | return _core_.ScrollEvent_GetOrientation(*args, **kwargs) |
e811c8ce RD |
3354 | |
3355 | def GetPosition(*args, **kwargs): | |
a95a7133 | 3356 | """GetPosition(self) -> int""" |
54f9ee45 | 3357 | return _core_.ScrollEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3358 | |
3359 | def SetOrientation(*args, **kwargs): | |
a95a7133 | 3360 | """SetOrientation(self, int orient)""" |
54f9ee45 | 3361 | return _core_.ScrollEvent_SetOrientation(*args, **kwargs) |
e811c8ce RD |
3362 | |
3363 | def SetPosition(*args, **kwargs): | |
a95a7133 | 3364 | """SetPosition(self, int pos)""" |
54f9ee45 | 3365 | return _core_.ScrollEvent_SetPosition(*args, **kwargs) |
e811c8ce | 3366 | |
d14a1e28 RD |
3367 | |
3368 | class ScrollEventPtr(ScrollEvent): | |
3369 | def __init__(self, this): | |
3370 | self.this = this | |
3371 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3372 | self.__class__ = ScrollEvent | |
54f9ee45 | 3373 | _core_.ScrollEvent_swigregister(ScrollEventPtr) |
d14a1e28 RD |
3374 | |
3375 | #--------------------------------------------------------------------------- | |
3376 | ||
3377 | class ScrollWinEvent(Event): | |
e811c8ce RD |
3378 | def __repr__(self): |
3379 | return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3380 | def __init__(self, *args, **kwargs): |
a95a7133 | 3381 | """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent""" |
54f9ee45 | 3382 | newobj = _core_.new_ScrollWinEvent(*args, **kwargs) |
d14a1e28 RD |
3383 | self.this = newobj.this |
3384 | self.thisown = 1 | |
3385 | del newobj.thisown | |
e811c8ce | 3386 | def GetOrientation(*args, **kwargs): |
a95a7133 | 3387 | """GetOrientation(self) -> int""" |
54f9ee45 | 3388 | return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs) |
e811c8ce RD |
3389 | |
3390 | def GetPosition(*args, **kwargs): | |
a95a7133 | 3391 | """GetPosition(self) -> int""" |
54f9ee45 | 3392 | return _core_.ScrollWinEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3393 | |
3394 | def SetOrientation(*args, **kwargs): | |
a95a7133 | 3395 | """SetOrientation(self, int orient)""" |
54f9ee45 | 3396 | return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs) |
e811c8ce RD |
3397 | |
3398 | def SetPosition(*args, **kwargs): | |
a95a7133 | 3399 | """SetPosition(self, int pos)""" |
54f9ee45 | 3400 | return _core_.ScrollWinEvent_SetPosition(*args, **kwargs) |
e811c8ce | 3401 | |
d14a1e28 RD |
3402 | |
3403 | class ScrollWinEventPtr(ScrollWinEvent): | |
3404 | def __init__(self, this): | |
3405 | self.this = this | |
3406 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3407 | self.__class__ = ScrollWinEvent | |
54f9ee45 | 3408 | _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr) |
d14a1e28 RD |
3409 | |
3410 | #--------------------------------------------------------------------------- | |
3411 | ||
54f9ee45 RD |
3412 | MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY |
3413 | MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE | |
3414 | MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT | |
3415 | MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE | |
3416 | MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT | |
d14a1e28 | 3417 | class MouseEvent(Event): |
e811c8ce RD |
3418 | def __repr__(self): |
3419 | return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3420 | def __init__(self, *args, **kwargs): |
a95a7133 | 3421 | """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent""" |
54f9ee45 | 3422 | newobj = _core_.new_MouseEvent(*args, **kwargs) |
d14a1e28 RD |
3423 | self.this = newobj.this |
3424 | self.thisown = 1 | |
3425 | del newobj.thisown | |
e811c8ce | 3426 | def IsButton(*args, **kwargs): |
a95a7133 | 3427 | """IsButton(self) -> bool""" |
54f9ee45 | 3428 | return _core_.MouseEvent_IsButton(*args, **kwargs) |
e811c8ce RD |
3429 | |
3430 | def ButtonDown(*args, **kwargs): | |
a95a7133 | 3431 | """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool""" |
54f9ee45 | 3432 | return _core_.MouseEvent_ButtonDown(*args, **kwargs) |
e811c8ce RD |
3433 | |
3434 | def ButtonDClick(*args, **kwargs): | |
a95a7133 | 3435 | """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool""" |
54f9ee45 | 3436 | return _core_.MouseEvent_ButtonDClick(*args, **kwargs) |
e811c8ce RD |
3437 | |
3438 | def ButtonUp(*args, **kwargs): | |
a95a7133 | 3439 | """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool""" |
54f9ee45 | 3440 | return _core_.MouseEvent_ButtonUp(*args, **kwargs) |
e811c8ce RD |
3441 | |
3442 | def Button(*args, **kwargs): | |
a95a7133 | 3443 | """Button(self, int but) -> bool""" |
54f9ee45 | 3444 | return _core_.MouseEvent_Button(*args, **kwargs) |
e811c8ce RD |
3445 | |
3446 | def ButtonIsDown(*args, **kwargs): | |
a95a7133 | 3447 | """ButtonIsDown(self, int but) -> bool""" |
54f9ee45 | 3448 | return _core_.MouseEvent_ButtonIsDown(*args, **kwargs) |
e811c8ce RD |
3449 | |
3450 | def GetButton(*args, **kwargs): | |
a95a7133 | 3451 | """GetButton(self) -> int""" |
54f9ee45 | 3452 | return _core_.MouseEvent_GetButton(*args, **kwargs) |
e811c8ce RD |
3453 | |
3454 | def ControlDown(*args, **kwargs): | |
a95a7133 | 3455 | """ControlDown(self) -> bool""" |
54f9ee45 | 3456 | return _core_.MouseEvent_ControlDown(*args, **kwargs) |
e811c8ce RD |
3457 | |
3458 | def MetaDown(*args, **kwargs): | |
a95a7133 | 3459 | """MetaDown(self) -> bool""" |
54f9ee45 | 3460 | return _core_.MouseEvent_MetaDown(*args, **kwargs) |
e811c8ce RD |
3461 | |
3462 | def AltDown(*args, **kwargs): | |
a95a7133 | 3463 | """AltDown(self) -> bool""" |
54f9ee45 | 3464 | return _core_.MouseEvent_AltDown(*args, **kwargs) |
e811c8ce RD |
3465 | |
3466 | def ShiftDown(*args, **kwargs): | |
a95a7133 | 3467 | """ShiftDown(self) -> bool""" |
54f9ee45 | 3468 | return _core_.MouseEvent_ShiftDown(*args, **kwargs) |
e811c8ce | 3469 | |
412d302d RD |
3470 | def CmdDown(*args, **kwargs): |
3471 | """ | |
3472 | CmdDown(self) -> bool | |
3473 | ||
3474 | "Cmd" is a pseudo key which is the same as Control for PC and Unix | |
3475 | platforms but the special "Apple" (a.k.a as "Command") key on | |
3476 | Macs: it makes often sense to use it instead of, say, `ControlDown` | |
3477 | because Cmd key is used for the same thing under Mac as Ctrl | |
3478 | elsewhere. The Ctrl still exists, it's just not used for this | |
3479 | purpose. So for non-Mac platforms this is the same as `ControlDown` | |
3480 | and Macs this is the same as `MetaDown`. | |
3481 | """ | |
3482 | return _core_.MouseEvent_CmdDown(*args, **kwargs) | |
3483 | ||
e811c8ce | 3484 | def LeftDown(*args, **kwargs): |
a95a7133 | 3485 | """LeftDown(self) -> bool""" |
54f9ee45 | 3486 | return _core_.MouseEvent_LeftDown(*args, **kwargs) |
e811c8ce RD |
3487 | |
3488 | def MiddleDown(*args, **kwargs): | |
a95a7133 | 3489 | """MiddleDown(self) -> bool""" |
54f9ee45 | 3490 | return _core_.MouseEvent_MiddleDown(*args, **kwargs) |
e811c8ce RD |
3491 | |
3492 | def RightDown(*args, **kwargs): | |
a95a7133 | 3493 | """RightDown(self) -> bool""" |
54f9ee45 | 3494 | return _core_.MouseEvent_RightDown(*args, **kwargs) |
e811c8ce RD |
3495 | |
3496 | def LeftUp(*args, **kwargs): | |
a95a7133 | 3497 | """LeftUp(self) -> bool""" |
54f9ee45 | 3498 | return _core_.MouseEvent_LeftUp(*args, **kwargs) |
e811c8ce RD |
3499 | |
3500 | def MiddleUp(*args, **kwargs): | |
a95a7133 | 3501 | """MiddleUp(self) -> bool""" |
54f9ee45 | 3502 | return _core_.MouseEvent_MiddleUp(*args, **kwargs) |
e811c8ce RD |
3503 | |
3504 | def RightUp(*args, **kwargs): | |
a95a7133 | 3505 | """RightUp(self) -> bool""" |
54f9ee45 | 3506 | return _core_.MouseEvent_RightUp(*args, **kwargs) |
e811c8ce RD |
3507 | |
3508 | def LeftDClick(*args, **kwargs): | |
a95a7133 | 3509 | """LeftDClick(self) -> bool""" |
54f9ee45 | 3510 | return _core_.MouseEvent_LeftDClick(*args, **kwargs) |
e811c8ce RD |
3511 | |
3512 | def MiddleDClick(*args, **kwargs): | |
a95a7133 | 3513 | """MiddleDClick(self) -> bool""" |
54f9ee45 | 3514 | return _core_.MouseEvent_MiddleDClick(*args, **kwargs) |
e811c8ce RD |
3515 | |
3516 | def RightDClick(*args, **kwargs): | |
a95a7133 | 3517 | """RightDClick(self) -> bool""" |
54f9ee45 | 3518 | return _core_.MouseEvent_RightDClick(*args, **kwargs) |
e811c8ce RD |
3519 | |
3520 | def LeftIsDown(*args, **kwargs): | |
a95a7133 | 3521 | """LeftIsDown(self) -> bool""" |
54f9ee45 | 3522 | return _core_.MouseEvent_LeftIsDown(*args, **kwargs) |
e811c8ce RD |
3523 | |
3524 | def MiddleIsDown(*args, **kwargs): | |
a95a7133 | 3525 | """MiddleIsDown(self) -> bool""" |
54f9ee45 | 3526 | return _core_.MouseEvent_MiddleIsDown(*args, **kwargs) |
e811c8ce RD |
3527 | |
3528 | def RightIsDown(*args, **kwargs): | |
a95a7133 | 3529 | """RightIsDown(self) -> bool""" |
54f9ee45 | 3530 | return _core_.MouseEvent_RightIsDown(*args, **kwargs) |
e811c8ce RD |
3531 | |
3532 | def Dragging(*args, **kwargs): | |
a95a7133 | 3533 | """Dragging(self) -> bool""" |
54f9ee45 | 3534 | return _core_.MouseEvent_Dragging(*args, **kwargs) |
e811c8ce RD |
3535 | |
3536 | def Moving(*args, **kwargs): | |
a95a7133 | 3537 | """Moving(self) -> bool""" |
54f9ee45 | 3538 | return _core_.MouseEvent_Moving(*args, **kwargs) |
e811c8ce RD |
3539 | |
3540 | def Entering(*args, **kwargs): | |
a95a7133 | 3541 | """Entering(self) -> bool""" |
54f9ee45 | 3542 | return _core_.MouseEvent_Entering(*args, **kwargs) |
e811c8ce RD |
3543 | |
3544 | def Leaving(*args, **kwargs): | |
a95a7133 | 3545 | """Leaving(self) -> bool""" |
54f9ee45 | 3546 | return _core_.MouseEvent_Leaving(*args, **kwargs) |
e811c8ce RD |
3547 | |
3548 | def GetPosition(*args, **kwargs): | |
0df68c9f | 3549 | """ |
a95a7133 | 3550 | GetPosition(self) -> Point |
e811c8ce | 3551 | |
41e2b43e RD |
3552 | Returns the position of the mouse in window coordinates when the event |
3553 | happened. | |
0df68c9f | 3554 | """ |
54f9ee45 | 3555 | return _core_.MouseEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3556 | |
3557 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3558 | """ |
3559 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3560 | |
41e2b43e RD |
3561 | Returns the position of the mouse in window coordinates when the event |
3562 | happened. | |
0df68c9f | 3563 | """ |
54f9ee45 | 3564 | return _core_.MouseEvent_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
3565 | |
3566 | def GetLogicalPosition(*args, **kwargs): | |
a95a7133 | 3567 | """GetLogicalPosition(self, DC dc) -> Point""" |
54f9ee45 | 3568 | return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs) |
e811c8ce RD |
3569 | |
3570 | def GetX(*args, **kwargs): | |
a95a7133 | 3571 | """GetX(self) -> int""" |
54f9ee45 | 3572 | return _core_.MouseEvent_GetX(*args, **kwargs) |
e811c8ce RD |
3573 | |
3574 | def GetY(*args, **kwargs): | |
a95a7133 | 3575 | """GetY(self) -> int""" |
54f9ee45 | 3576 | return _core_.MouseEvent_GetY(*args, **kwargs) |
e811c8ce RD |
3577 | |
3578 | def GetWheelRotation(*args, **kwargs): | |
a95a7133 | 3579 | """GetWheelRotation(self) -> int""" |
54f9ee45 | 3580 | return _core_.MouseEvent_GetWheelRotation(*args, **kwargs) |
e811c8ce RD |
3581 | |
3582 | def GetWheelDelta(*args, **kwargs): | |
a95a7133 | 3583 | """GetWheelDelta(self) -> int""" |
54f9ee45 | 3584 | return _core_.MouseEvent_GetWheelDelta(*args, **kwargs) |
e811c8ce RD |
3585 | |
3586 | def GetLinesPerAction(*args, **kwargs): | |
a95a7133 | 3587 | """GetLinesPerAction(self) -> int""" |
54f9ee45 | 3588 | return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs) |
e811c8ce RD |
3589 | |
3590 | def IsPageScroll(*args, **kwargs): | |
a95a7133 | 3591 | """IsPageScroll(self) -> bool""" |
54f9ee45 RD |
3592 | return _core_.MouseEvent_IsPageScroll(*args, **kwargs) |
3593 | ||
3594 | m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set) | |
3595 | m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set) | |
3596 | m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set) | |
3597 | m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set) | |
3598 | m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set) | |
3599 | m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set) | |
3600 | m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set) | |
3601 | m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set) | |
3602 | m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set) | |
3603 | m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set) | |
3604 | m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set) | |
3605 | m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set) | |
d14a1e28 RD |
3606 | |
3607 | class MouseEventPtr(MouseEvent): | |
3608 | def __init__(self, this): | |
3609 | self.this = this | |
3610 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3611 | self.__class__ = MouseEvent | |
54f9ee45 | 3612 | _core_.MouseEvent_swigregister(MouseEventPtr) |
d14a1e28 RD |
3613 | |
3614 | #--------------------------------------------------------------------------- | |
3615 | ||
3616 | class SetCursorEvent(Event): | |
e811c8ce RD |
3617 | def __repr__(self): |
3618 | return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3619 | def __init__(self, *args, **kwargs): |
a95a7133 | 3620 | """__init__(self, int x=0, int y=0) -> SetCursorEvent""" |
54f9ee45 | 3621 | newobj = _core_.new_SetCursorEvent(*args, **kwargs) |
d14a1e28 RD |
3622 | self.this = newobj.this |
3623 | self.thisown = 1 | |
3624 | del newobj.thisown | |
e811c8ce | 3625 | def GetX(*args, **kwargs): |
a95a7133 | 3626 | """GetX(self) -> int""" |
54f9ee45 | 3627 | return _core_.SetCursorEvent_GetX(*args, **kwargs) |
e811c8ce RD |
3628 | |
3629 | def GetY(*args, **kwargs): | |
a95a7133 | 3630 | """GetY(self) -> int""" |
54f9ee45 | 3631 | return _core_.SetCursorEvent_GetY(*args, **kwargs) |
e811c8ce RD |
3632 | |
3633 | def SetCursor(*args, **kwargs): | |
a95a7133 | 3634 | """SetCursor(self, Cursor cursor)""" |
54f9ee45 | 3635 | return _core_.SetCursorEvent_SetCursor(*args, **kwargs) |
e811c8ce RD |
3636 | |
3637 | def GetCursor(*args, **kwargs): | |
a95a7133 | 3638 | """GetCursor(self) -> Cursor""" |
54f9ee45 | 3639 | return _core_.SetCursorEvent_GetCursor(*args, **kwargs) |
e811c8ce RD |
3640 | |
3641 | def HasCursor(*args, **kwargs): | |
a95a7133 | 3642 | """HasCursor(self) -> bool""" |
54f9ee45 | 3643 | return _core_.SetCursorEvent_HasCursor(*args, **kwargs) |
e811c8ce | 3644 | |
d14a1e28 RD |
3645 | |
3646 | class SetCursorEventPtr(SetCursorEvent): | |
3647 | def __init__(self, this): | |
3648 | self.this = this | |
3649 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3650 | self.__class__ = SetCursorEvent | |
54f9ee45 | 3651 | _core_.SetCursorEvent_swigregister(SetCursorEventPtr) |
d14a1e28 RD |
3652 | |
3653 | #--------------------------------------------------------------------------- | |
3654 | ||
3655 | class KeyEvent(Event): | |
e811c8ce RD |
3656 | def __repr__(self): |
3657 | return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3658 | def __init__(self, *args, **kwargs): |
a95a7133 | 3659 | """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent""" |
54f9ee45 | 3660 | newobj = _core_.new_KeyEvent(*args, **kwargs) |
d14a1e28 RD |
3661 | self.this = newobj.this |
3662 | self.thisown = 1 | |
3663 | del newobj.thisown | |
e811c8ce | 3664 | def ControlDown(*args, **kwargs): |
a95a7133 | 3665 | """ControlDown(self) -> bool""" |
54f9ee45 | 3666 | return _core_.KeyEvent_ControlDown(*args, **kwargs) |
e811c8ce RD |
3667 | |
3668 | def MetaDown(*args, **kwargs): | |
a95a7133 | 3669 | """MetaDown(self) -> bool""" |
54f9ee45 | 3670 | return _core_.KeyEvent_MetaDown(*args, **kwargs) |
e811c8ce RD |
3671 | |
3672 | def AltDown(*args, **kwargs): | |
a95a7133 | 3673 | """AltDown(self) -> bool""" |
54f9ee45 | 3674 | return _core_.KeyEvent_AltDown(*args, **kwargs) |
e811c8ce RD |
3675 | |
3676 | def ShiftDown(*args, **kwargs): | |
a95a7133 | 3677 | """ShiftDown(self) -> bool""" |
54f9ee45 | 3678 | return _core_.KeyEvent_ShiftDown(*args, **kwargs) |
e811c8ce | 3679 | |
412d302d RD |
3680 | def CmdDown(*args, **kwargs): |
3681 | """ | |
3682 | CmdDown(self) -> bool | |
3683 | ||
3684 | "Cmd" is a pseudo key which is the same as Control for PC and Unix | |
3685 | platforms but the special "Apple" (a.k.a as "Command") key on | |
3686 | Macs: it makes often sense to use it instead of, say, `ControlDown` | |
3687 | because Cmd key is used for the same thing under Mac as Ctrl | |
3688 | elsewhere. The Ctrl still exists, it's just not used for this | |
3689 | purpose. So for non-Mac platforms this is the same as `ControlDown` | |
3690 | and Macs this is the same as `MetaDown`. | |
3691 | """ | |
3692 | return _core_.KeyEvent_CmdDown(*args, **kwargs) | |
3693 | ||
e811c8ce | 3694 | def HasModifiers(*args, **kwargs): |
a95a7133 | 3695 | """HasModifiers(self) -> bool""" |
54f9ee45 | 3696 | return _core_.KeyEvent_HasModifiers(*args, **kwargs) |
e811c8ce RD |
3697 | |
3698 | def GetKeyCode(*args, **kwargs): | |
a95a7133 | 3699 | """GetKeyCode(self) -> int""" |
54f9ee45 | 3700 | return _core_.KeyEvent_GetKeyCode(*args, **kwargs) |
e811c8ce | 3701 | |
d14a1e28 | 3702 | KeyCode = GetKeyCode |
19272049 RD |
3703 | def GetUnicodeKey(*args, **kwargs): |
3704 | """GetUnicodeKey(self) -> int""" | |
3705 | return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs) | |
e811c8ce | 3706 | |
19272049 | 3707 | GetUniChar = GetUnicodeKey |
e811c8ce | 3708 | def GetRawKeyCode(*args, **kwargs): |
a95a7133 | 3709 | """GetRawKeyCode(self) -> unsigned int""" |
54f9ee45 | 3710 | return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs) |
e811c8ce RD |
3711 | |
3712 | def GetRawKeyFlags(*args, **kwargs): | |
a95a7133 | 3713 | """GetRawKeyFlags(self) -> unsigned int""" |
54f9ee45 | 3714 | return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs) |
e811c8ce RD |
3715 | |
3716 | def GetPosition(*args, **kwargs): | |
0df68c9f | 3717 | """ |
a95a7133 | 3718 | GetPosition(self) -> Point |
e811c8ce | 3719 | |
0df68c9f RD |
3720 | Find the position of the event. |
3721 | """ | |
54f9ee45 | 3722 | return _core_.KeyEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3723 | |
3724 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
3725 | """ |
3726 | GetPositionTuple() -> (x,y) | |
e811c8ce | 3727 | |
0df68c9f RD |
3728 | Find the position of the event. |
3729 | """ | |
54f9ee45 | 3730 | return _core_.KeyEvent_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
3731 | |
3732 | def GetX(*args, **kwargs): | |
a95a7133 | 3733 | """GetX(self) -> int""" |
54f9ee45 | 3734 | return _core_.KeyEvent_GetX(*args, **kwargs) |
e811c8ce RD |
3735 | |
3736 | def GetY(*args, **kwargs): | |
a95a7133 | 3737 | """GetY(self) -> int""" |
54f9ee45 RD |
3738 | return _core_.KeyEvent_GetY(*args, **kwargs) |
3739 | ||
3740 | m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set) | |
3741 | m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set) | |
3742 | m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set) | |
3743 | m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set) | |
3744 | m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set) | |
3745 | m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set) | |
3746 | m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set) | |
3747 | m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set) | |
3748 | m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set) | |
3749 | m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set) | |
d14a1e28 RD |
3750 | |
3751 | class KeyEventPtr(KeyEvent): | |
3752 | def __init__(self, this): | |
3753 | self.this = this | |
3754 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3755 | self.__class__ = KeyEvent | |
54f9ee45 | 3756 | _core_.KeyEvent_swigregister(KeyEventPtr) |
d14a1e28 RD |
3757 | |
3758 | #--------------------------------------------------------------------------- | |
3759 | ||
3760 | class SizeEvent(Event): | |
e811c8ce RD |
3761 | def __repr__(self): |
3762 | return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3763 | def __init__(self, *args, **kwargs): |
a95a7133 | 3764 | """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent""" |
54f9ee45 | 3765 | newobj = _core_.new_SizeEvent(*args, **kwargs) |
d14a1e28 RD |
3766 | self.this = newobj.this |
3767 | self.thisown = 1 | |
3768 | del newobj.thisown | |
e811c8ce | 3769 | def GetSize(*args, **kwargs): |
a95a7133 | 3770 | """GetSize(self) -> Size""" |
54f9ee45 | 3771 | return _core_.SizeEvent_GetSize(*args, **kwargs) |
e811c8ce RD |
3772 | |
3773 | def GetRect(*args, **kwargs): | |
a95a7133 | 3774 | """GetRect(self) -> Rect""" |
54f9ee45 | 3775 | return _core_.SizeEvent_GetRect(*args, **kwargs) |
e811c8ce RD |
3776 | |
3777 | def SetRect(*args, **kwargs): | |
a95a7133 | 3778 | """SetRect(self, Rect rect)""" |
54f9ee45 | 3779 | return _core_.SizeEvent_SetRect(*args, **kwargs) |
e811c8ce RD |
3780 | |
3781 | def SetSize(*args, **kwargs): | |
a95a7133 | 3782 | """SetSize(self, Size size)""" |
54f9ee45 | 3783 | return _core_.SizeEvent_SetSize(*args, **kwargs) |
e811c8ce | 3784 | |
54f9ee45 RD |
3785 | m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set) |
3786 | m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set) | |
d14a1e28 RD |
3787 | |
3788 | class SizeEventPtr(SizeEvent): | |
3789 | def __init__(self, this): | |
3790 | self.this = this | |
3791 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3792 | self.__class__ = SizeEvent | |
54f9ee45 | 3793 | _core_.SizeEvent_swigregister(SizeEventPtr) |
d14a1e28 RD |
3794 | |
3795 | #--------------------------------------------------------------------------- | |
3796 | ||
3797 | class MoveEvent(Event): | |
e811c8ce RD |
3798 | def __repr__(self): |
3799 | return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3800 | def __init__(self, *args, **kwargs): |
a95a7133 | 3801 | """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent""" |
54f9ee45 | 3802 | newobj = _core_.new_MoveEvent(*args, **kwargs) |
d14a1e28 RD |
3803 | self.this = newobj.this |
3804 | self.thisown = 1 | |
3805 | del newobj.thisown | |
e811c8ce | 3806 | def GetPosition(*args, **kwargs): |
a95a7133 | 3807 | """GetPosition(self) -> Point""" |
54f9ee45 | 3808 | return _core_.MoveEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
3809 | |
3810 | def GetRect(*args, **kwargs): | |
a95a7133 | 3811 | """GetRect(self) -> Rect""" |
54f9ee45 | 3812 | return _core_.MoveEvent_GetRect(*args, **kwargs) |
e811c8ce RD |
3813 | |
3814 | def SetRect(*args, **kwargs): | |
a95a7133 | 3815 | """SetRect(self, Rect rect)""" |
54f9ee45 | 3816 | return _core_.MoveEvent_SetRect(*args, **kwargs) |
e811c8ce RD |
3817 | |
3818 | def SetPosition(*args, **kwargs): | |
a95a7133 | 3819 | """SetPosition(self, Point pos)""" |
54f9ee45 | 3820 | return _core_.MoveEvent_SetPosition(*args, **kwargs) |
e811c8ce | 3821 | |
54f9ee45 RD |
3822 | m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set) |
3823 | m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set) | |
d14a1e28 RD |
3824 | |
3825 | class MoveEventPtr(MoveEvent): | |
3826 | def __init__(self, this): | |
3827 | self.this = this | |
3828 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3829 | self.__class__ = MoveEvent | |
54f9ee45 | 3830 | _core_.MoveEvent_swigregister(MoveEventPtr) |
d14a1e28 RD |
3831 | |
3832 | #--------------------------------------------------------------------------- | |
3833 | ||
3834 | class PaintEvent(Event): | |
e811c8ce RD |
3835 | def __repr__(self): |
3836 | return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3837 | def __init__(self, *args, **kwargs): |
a95a7133 | 3838 | """__init__(self, int Id=0) -> PaintEvent""" |
54f9ee45 | 3839 | newobj = _core_.new_PaintEvent(*args, **kwargs) |
d14a1e28 RD |
3840 | self.this = newobj.this |
3841 | self.thisown = 1 | |
3842 | del newobj.thisown | |
d14a1e28 RD |
3843 | |
3844 | class PaintEventPtr(PaintEvent): | |
3845 | def __init__(self, this): | |
3846 | self.this = this | |
3847 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3848 | self.__class__ = PaintEvent | |
54f9ee45 | 3849 | _core_.PaintEvent_swigregister(PaintEventPtr) |
d14a1e28 RD |
3850 | |
3851 | class NcPaintEvent(Event): | |
e811c8ce RD |
3852 | def __repr__(self): |
3853 | return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3854 | def __init__(self, *args, **kwargs): |
a95a7133 | 3855 | """__init__(self, int winid=0) -> NcPaintEvent""" |
54f9ee45 | 3856 | newobj = _core_.new_NcPaintEvent(*args, **kwargs) |
d14a1e28 RD |
3857 | self.this = newobj.this |
3858 | self.thisown = 1 | |
3859 | del newobj.thisown | |
d14a1e28 RD |
3860 | |
3861 | class NcPaintEventPtr(NcPaintEvent): | |
3862 | def __init__(self, this): | |
3863 | self.this = this | |
3864 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3865 | self.__class__ = NcPaintEvent | |
54f9ee45 | 3866 | _core_.NcPaintEvent_swigregister(NcPaintEventPtr) |
d14a1e28 RD |
3867 | |
3868 | #--------------------------------------------------------------------------- | |
3869 | ||
3870 | class EraseEvent(Event): | |
e811c8ce RD |
3871 | def __repr__(self): |
3872 | return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3873 | def __init__(self, *args, **kwargs): |
a95a7133 | 3874 | """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent""" |
54f9ee45 | 3875 | newobj = _core_.new_EraseEvent(*args, **kwargs) |
d14a1e28 RD |
3876 | self.this = newobj.this |
3877 | self.thisown = 1 | |
3878 | del newobj.thisown | |
e811c8ce | 3879 | def GetDC(*args, **kwargs): |
a95a7133 | 3880 | """GetDC(self) -> DC""" |
54f9ee45 | 3881 | return _core_.EraseEvent_GetDC(*args, **kwargs) |
e811c8ce | 3882 | |
d14a1e28 RD |
3883 | |
3884 | class EraseEventPtr(EraseEvent): | |
3885 | def __init__(self, this): | |
3886 | self.this = this | |
3887 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3888 | self.__class__ = EraseEvent | |
54f9ee45 | 3889 | _core_.EraseEvent_swigregister(EraseEventPtr) |
d14a1e28 RD |
3890 | |
3891 | #--------------------------------------------------------------------------- | |
3892 | ||
3893 | class FocusEvent(Event): | |
e811c8ce RD |
3894 | def __repr__(self): |
3895 | return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3896 | def __init__(self, *args, **kwargs): |
a95a7133 | 3897 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent""" |
54f9ee45 | 3898 | newobj = _core_.new_FocusEvent(*args, **kwargs) |
d14a1e28 RD |
3899 | self.this = newobj.this |
3900 | self.thisown = 1 | |
3901 | del newobj.thisown | |
e811c8ce | 3902 | def GetWindow(*args, **kwargs): |
a95a7133 | 3903 | """GetWindow(self) -> Window""" |
54f9ee45 | 3904 | return _core_.FocusEvent_GetWindow(*args, **kwargs) |
e811c8ce RD |
3905 | |
3906 | def SetWindow(*args, **kwargs): | |
a95a7133 | 3907 | """SetWindow(self, Window win)""" |
54f9ee45 | 3908 | return _core_.FocusEvent_SetWindow(*args, **kwargs) |
e811c8ce | 3909 | |
d14a1e28 RD |
3910 | |
3911 | class FocusEventPtr(FocusEvent): | |
3912 | def __init__(self, this): | |
3913 | self.this = this | |
3914 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3915 | self.__class__ = FocusEvent | |
54f9ee45 | 3916 | _core_.FocusEvent_swigregister(FocusEventPtr) |
d14a1e28 RD |
3917 | |
3918 | #--------------------------------------------------------------------------- | |
3919 | ||
3920 | class ChildFocusEvent(CommandEvent): | |
e811c8ce RD |
3921 | def __repr__(self): |
3922 | return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3923 | def __init__(self, *args, **kwargs): |
a95a7133 | 3924 | """__init__(self, Window win=None) -> ChildFocusEvent""" |
54f9ee45 | 3925 | newobj = _core_.new_ChildFocusEvent(*args, **kwargs) |
d14a1e28 RD |
3926 | self.this = newobj.this |
3927 | self.thisown = 1 | |
3928 | del newobj.thisown | |
e811c8ce | 3929 | def GetWindow(*args, **kwargs): |
a95a7133 | 3930 | """GetWindow(self) -> Window""" |
54f9ee45 | 3931 | return _core_.ChildFocusEvent_GetWindow(*args, **kwargs) |
e811c8ce | 3932 | |
d14a1e28 RD |
3933 | |
3934 | class ChildFocusEventPtr(ChildFocusEvent): | |
3935 | def __init__(self, this): | |
3936 | self.this = this | |
3937 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3938 | self.__class__ = ChildFocusEvent | |
54f9ee45 | 3939 | _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr) |
d14a1e28 RD |
3940 | |
3941 | #--------------------------------------------------------------------------- | |
3942 | ||
3943 | class ActivateEvent(Event): | |
e811c8ce RD |
3944 | def __repr__(self): |
3945 | return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3946 | def __init__(self, *args, **kwargs): |
a95a7133 | 3947 | """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent""" |
54f9ee45 | 3948 | newobj = _core_.new_ActivateEvent(*args, **kwargs) |
d14a1e28 RD |
3949 | self.this = newobj.this |
3950 | self.thisown = 1 | |
3951 | del newobj.thisown | |
e811c8ce | 3952 | def GetActive(*args, **kwargs): |
a95a7133 | 3953 | """GetActive(self) -> bool""" |
54f9ee45 | 3954 | return _core_.ActivateEvent_GetActive(*args, **kwargs) |
e811c8ce | 3955 | |
d14a1e28 RD |
3956 | |
3957 | class ActivateEventPtr(ActivateEvent): | |
3958 | def __init__(self, this): | |
3959 | self.this = this | |
3960 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3961 | self.__class__ = ActivateEvent | |
54f9ee45 | 3962 | _core_.ActivateEvent_swigregister(ActivateEventPtr) |
d14a1e28 RD |
3963 | |
3964 | #--------------------------------------------------------------------------- | |
3965 | ||
3966 | class InitDialogEvent(Event): | |
e811c8ce RD |
3967 | def __repr__(self): |
3968 | return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3969 | def __init__(self, *args, **kwargs): |
a95a7133 | 3970 | """__init__(self, int Id=0) -> InitDialogEvent""" |
54f9ee45 | 3971 | newobj = _core_.new_InitDialogEvent(*args, **kwargs) |
d14a1e28 RD |
3972 | self.this = newobj.this |
3973 | self.thisown = 1 | |
3974 | del newobj.thisown | |
d14a1e28 RD |
3975 | |
3976 | class InitDialogEventPtr(InitDialogEvent): | |
3977 | def __init__(self, this): | |
3978 | self.this = this | |
3979 | if not hasattr(self,"thisown"): self.thisown = 0 | |
3980 | self.__class__ = InitDialogEvent | |
54f9ee45 | 3981 | _core_.InitDialogEvent_swigregister(InitDialogEventPtr) |
d14a1e28 RD |
3982 | |
3983 | #--------------------------------------------------------------------------- | |
3984 | ||
3985 | class MenuEvent(Event): | |
e811c8ce RD |
3986 | def __repr__(self): |
3987 | return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 3988 | def __init__(self, *args, **kwargs): |
a95a7133 | 3989 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent""" |
54f9ee45 | 3990 | newobj = _core_.new_MenuEvent(*args, **kwargs) |
d14a1e28 RD |
3991 | self.this = newobj.this |
3992 | self.thisown = 1 | |
3993 | del newobj.thisown | |
e811c8ce | 3994 | def GetMenuId(*args, **kwargs): |
a95a7133 | 3995 | """GetMenuId(self) -> int""" |
54f9ee45 | 3996 | return _core_.MenuEvent_GetMenuId(*args, **kwargs) |
e811c8ce RD |
3997 | |
3998 | def IsPopup(*args, **kwargs): | |
a95a7133 | 3999 | """IsPopup(self) -> bool""" |
54f9ee45 | 4000 | return _core_.MenuEvent_IsPopup(*args, **kwargs) |
e811c8ce RD |
4001 | |
4002 | def GetMenu(*args, **kwargs): | |
a95a7133 | 4003 | """GetMenu(self) -> Menu""" |
54f9ee45 | 4004 | return _core_.MenuEvent_GetMenu(*args, **kwargs) |
e811c8ce | 4005 | |
d14a1e28 RD |
4006 | |
4007 | class MenuEventPtr(MenuEvent): | |
4008 | def __init__(self, this): | |
4009 | self.this = this | |
4010 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4011 | self.__class__ = MenuEvent | |
54f9ee45 | 4012 | _core_.MenuEvent_swigregister(MenuEventPtr) |
d14a1e28 RD |
4013 | |
4014 | #--------------------------------------------------------------------------- | |
4015 | ||
4016 | class CloseEvent(Event): | |
e811c8ce RD |
4017 | def __repr__(self): |
4018 | return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4019 | def __init__(self, *args, **kwargs): |
a95a7133 | 4020 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent""" |
54f9ee45 | 4021 | newobj = _core_.new_CloseEvent(*args, **kwargs) |
d14a1e28 RD |
4022 | self.this = newobj.this |
4023 | self.thisown = 1 | |
4024 | del newobj.thisown | |
e811c8ce | 4025 | def SetLoggingOff(*args, **kwargs): |
a95a7133 | 4026 | """SetLoggingOff(self, bool logOff)""" |
54f9ee45 | 4027 | return _core_.CloseEvent_SetLoggingOff(*args, **kwargs) |
e811c8ce RD |
4028 | |
4029 | def GetLoggingOff(*args, **kwargs): | |
a95a7133 | 4030 | """GetLoggingOff(self) -> bool""" |
54f9ee45 | 4031 | return _core_.CloseEvent_GetLoggingOff(*args, **kwargs) |
e811c8ce RD |
4032 | |
4033 | def Veto(*args, **kwargs): | |
a95a7133 | 4034 | """Veto(self, bool veto=True)""" |
54f9ee45 | 4035 | return _core_.CloseEvent_Veto(*args, **kwargs) |
e811c8ce RD |
4036 | |
4037 | def SetCanVeto(*args, **kwargs): | |
a95a7133 | 4038 | """SetCanVeto(self, bool canVeto)""" |
54f9ee45 | 4039 | return _core_.CloseEvent_SetCanVeto(*args, **kwargs) |
e811c8ce RD |
4040 | |
4041 | def CanVeto(*args, **kwargs): | |
a95a7133 | 4042 | """CanVeto(self) -> bool""" |
54f9ee45 | 4043 | return _core_.CloseEvent_CanVeto(*args, **kwargs) |
e811c8ce RD |
4044 | |
4045 | def GetVeto(*args, **kwargs): | |
a95a7133 | 4046 | """GetVeto(self) -> bool""" |
54f9ee45 | 4047 | return _core_.CloseEvent_GetVeto(*args, **kwargs) |
e811c8ce | 4048 | |
d14a1e28 RD |
4049 | |
4050 | class CloseEventPtr(CloseEvent): | |
4051 | def __init__(self, this): | |
4052 | self.this = this | |
4053 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4054 | self.__class__ = CloseEvent | |
54f9ee45 | 4055 | _core_.CloseEvent_swigregister(CloseEventPtr) |
d14a1e28 RD |
4056 | |
4057 | #--------------------------------------------------------------------------- | |
4058 | ||
4059 | class ShowEvent(Event): | |
e811c8ce RD |
4060 | def __repr__(self): |
4061 | return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4062 | def __init__(self, *args, **kwargs): |
a95a7133 | 4063 | """__init__(self, int winid=0, bool show=False) -> ShowEvent""" |
54f9ee45 | 4064 | newobj = _core_.new_ShowEvent(*args, **kwargs) |
d14a1e28 RD |
4065 | self.this = newobj.this |
4066 | self.thisown = 1 | |
4067 | del newobj.thisown | |
e811c8ce | 4068 | def SetShow(*args, **kwargs): |
a95a7133 | 4069 | """SetShow(self, bool show)""" |
54f9ee45 | 4070 | return _core_.ShowEvent_SetShow(*args, **kwargs) |
e811c8ce RD |
4071 | |
4072 | def GetShow(*args, **kwargs): | |
a95a7133 | 4073 | """GetShow(self) -> bool""" |
54f9ee45 | 4074 | return _core_.ShowEvent_GetShow(*args, **kwargs) |
e811c8ce | 4075 | |
d14a1e28 RD |
4076 | |
4077 | class ShowEventPtr(ShowEvent): | |
4078 | def __init__(self, this): | |
4079 | self.this = this | |
4080 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4081 | self.__class__ = ShowEvent | |
54f9ee45 | 4082 | _core_.ShowEvent_swigregister(ShowEventPtr) |
d14a1e28 RD |
4083 | |
4084 | #--------------------------------------------------------------------------- | |
4085 | ||
4086 | class IconizeEvent(Event): | |
e811c8ce RD |
4087 | def __repr__(self): |
4088 | return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4089 | def __init__(self, *args, **kwargs): |
a95a7133 | 4090 | """__init__(self, int id=0, bool iconized=True) -> IconizeEvent""" |
54f9ee45 | 4091 | newobj = _core_.new_IconizeEvent(*args, **kwargs) |
d14a1e28 RD |
4092 | self.this = newobj.this |
4093 | self.thisown = 1 | |
4094 | del newobj.thisown | |
e811c8ce | 4095 | def Iconized(*args, **kwargs): |
a95a7133 | 4096 | """Iconized(self) -> bool""" |
54f9ee45 | 4097 | return _core_.IconizeEvent_Iconized(*args, **kwargs) |
e811c8ce | 4098 | |
d14a1e28 RD |
4099 | |
4100 | class IconizeEventPtr(IconizeEvent): | |
4101 | def __init__(self, this): | |
4102 | self.this = this | |
4103 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4104 | self.__class__ = IconizeEvent | |
54f9ee45 | 4105 | _core_.IconizeEvent_swigregister(IconizeEventPtr) |
d14a1e28 RD |
4106 | |
4107 | #--------------------------------------------------------------------------- | |
4108 | ||
4109 | class MaximizeEvent(Event): | |
e811c8ce RD |
4110 | def __repr__(self): |
4111 | return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4112 | def __init__(self, *args, **kwargs): |
a95a7133 | 4113 | """__init__(self, int id=0) -> MaximizeEvent""" |
54f9ee45 | 4114 | newobj = _core_.new_MaximizeEvent(*args, **kwargs) |
d14a1e28 RD |
4115 | self.this = newobj.this |
4116 | self.thisown = 1 | |
4117 | del newobj.thisown | |
d14a1e28 RD |
4118 | |
4119 | class MaximizeEventPtr(MaximizeEvent): | |
4120 | def __init__(self, this): | |
4121 | self.this = this | |
4122 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4123 | self.__class__ = MaximizeEvent | |
54f9ee45 | 4124 | _core_.MaximizeEvent_swigregister(MaximizeEventPtr) |
d14a1e28 RD |
4125 | |
4126 | #--------------------------------------------------------------------------- | |
4127 | ||
4128 | class DropFilesEvent(Event): | |
d14a1e28 RD |
4129 | def __init__(self): raise RuntimeError, "No constructor defined" |
4130 | def __repr__(self): | |
4131 | return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 4132 | def GetPosition(*args, **kwargs): |
a95a7133 | 4133 | """GetPosition(self) -> Point""" |
54f9ee45 | 4134 | return _core_.DropFilesEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4135 | |
4136 | def GetNumberOfFiles(*args, **kwargs): | |
a95a7133 | 4137 | """GetNumberOfFiles(self) -> int""" |
54f9ee45 | 4138 | return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs) |
e811c8ce RD |
4139 | |
4140 | def GetFiles(*args, **kwargs): | |
a95a7133 | 4141 | """GetFiles(self) -> PyObject""" |
54f9ee45 | 4142 | return _core_.DropFilesEvent_GetFiles(*args, **kwargs) |
e811c8ce | 4143 | |
d14a1e28 RD |
4144 | |
4145 | class DropFilesEventPtr(DropFilesEvent): | |
4146 | def __init__(self, this): | |
4147 | self.this = this | |
4148 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4149 | self.__class__ = DropFilesEvent | |
54f9ee45 | 4150 | _core_.DropFilesEvent_swigregister(DropFilesEventPtr) |
d14a1e28 RD |
4151 | |
4152 | #--------------------------------------------------------------------------- | |
4153 | ||
54f9ee45 RD |
4154 | UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL |
4155 | UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED | |
d14a1e28 | 4156 | class UpdateUIEvent(CommandEvent): |
e811c8ce RD |
4157 | def __repr__(self): |
4158 | return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4159 | def __init__(self, *args, **kwargs): |
a95a7133 | 4160 | """__init__(self, int commandId=0) -> UpdateUIEvent""" |
54f9ee45 | 4161 | newobj = _core_.new_UpdateUIEvent(*args, **kwargs) |
d14a1e28 RD |
4162 | self.this = newobj.this |
4163 | self.thisown = 1 | |
4164 | del newobj.thisown | |
e811c8ce | 4165 | def GetChecked(*args, **kwargs): |
a95a7133 | 4166 | """GetChecked(self) -> bool""" |
54f9ee45 | 4167 | return _core_.UpdateUIEvent_GetChecked(*args, **kwargs) |
e811c8ce RD |
4168 | |
4169 | def GetEnabled(*args, **kwargs): | |
a95a7133 | 4170 | """GetEnabled(self) -> bool""" |
54f9ee45 | 4171 | return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs) |
e811c8ce RD |
4172 | |
4173 | def GetText(*args, **kwargs): | |
a95a7133 | 4174 | """GetText(self) -> String""" |
54f9ee45 | 4175 | return _core_.UpdateUIEvent_GetText(*args, **kwargs) |
e811c8ce RD |
4176 | |
4177 | def GetSetText(*args, **kwargs): | |
a95a7133 | 4178 | """GetSetText(self) -> bool""" |
54f9ee45 | 4179 | return _core_.UpdateUIEvent_GetSetText(*args, **kwargs) |
e811c8ce RD |
4180 | |
4181 | def GetSetChecked(*args, **kwargs): | |
a95a7133 | 4182 | """GetSetChecked(self) -> bool""" |
54f9ee45 | 4183 | return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs) |
e811c8ce RD |
4184 | |
4185 | def GetSetEnabled(*args, **kwargs): | |
a95a7133 | 4186 | """GetSetEnabled(self) -> bool""" |
54f9ee45 | 4187 | return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs) |
e811c8ce RD |
4188 | |
4189 | def Check(*args, **kwargs): | |
a95a7133 | 4190 | """Check(self, bool check)""" |
54f9ee45 | 4191 | return _core_.UpdateUIEvent_Check(*args, **kwargs) |
e811c8ce RD |
4192 | |
4193 | def Enable(*args, **kwargs): | |
a95a7133 | 4194 | """Enable(self, bool enable)""" |
54f9ee45 | 4195 | return _core_.UpdateUIEvent_Enable(*args, **kwargs) |
e811c8ce RD |
4196 | |
4197 | def SetText(*args, **kwargs): | |
a95a7133 | 4198 | """SetText(self, String text)""" |
54f9ee45 | 4199 | return _core_.UpdateUIEvent_SetText(*args, **kwargs) |
e811c8ce RD |
4200 | |
4201 | def SetUpdateInterval(*args, **kwargs): | |
66c033b4 | 4202 | """SetUpdateInterval(long updateInterval)""" |
54f9ee45 | 4203 | return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) |
e811c8ce RD |
4204 | |
4205 | SetUpdateInterval = staticmethod(SetUpdateInterval) | |
4206 | def GetUpdateInterval(*args, **kwargs): | |
66c033b4 | 4207 | """GetUpdateInterval() -> long""" |
54f9ee45 | 4208 | return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) |
e811c8ce RD |
4209 | |
4210 | GetUpdateInterval = staticmethod(GetUpdateInterval) | |
4211 | def CanUpdate(*args, **kwargs): | |
66c033b4 | 4212 | """CanUpdate(Window win) -> bool""" |
54f9ee45 | 4213 | return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) |
e811c8ce RD |
4214 | |
4215 | CanUpdate = staticmethod(CanUpdate) | |
4216 | def ResetUpdateTime(*args, **kwargs): | |
66c033b4 | 4217 | """ResetUpdateTime()""" |
54f9ee45 | 4218 | return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) |
e811c8ce RD |
4219 | |
4220 | ResetUpdateTime = staticmethod(ResetUpdateTime) | |
4221 | def SetMode(*args, **kwargs): | |
66c033b4 | 4222 | """SetMode(int mode)""" |
54f9ee45 | 4223 | return _core_.UpdateUIEvent_SetMode(*args, **kwargs) |
e811c8ce RD |
4224 | |
4225 | SetMode = staticmethod(SetMode) | |
4226 | def GetMode(*args, **kwargs): | |
66c033b4 | 4227 | """GetMode() -> int""" |
54f9ee45 | 4228 | return _core_.UpdateUIEvent_GetMode(*args, **kwargs) |
e811c8ce RD |
4229 | |
4230 | GetMode = staticmethod(GetMode) | |
d14a1e28 RD |
4231 | |
4232 | class UpdateUIEventPtr(UpdateUIEvent): | |
4233 | def __init__(self, this): | |
4234 | self.this = this | |
4235 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4236 | self.__class__ = UpdateUIEvent | |
54f9ee45 | 4237 | _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr) |
d14a1e28 | 4238 | |
e811c8ce RD |
4239 | def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): |
4240 | """UpdateUIEvent_SetUpdateInterval(long updateInterval)""" | |
54f9ee45 | 4241 | return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) |
d14a1e28 | 4242 | |
e811c8ce RD |
4243 | def UpdateUIEvent_GetUpdateInterval(*args, **kwargs): |
4244 | """UpdateUIEvent_GetUpdateInterval() -> long""" | |
54f9ee45 | 4245 | return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) |
d14a1e28 | 4246 | |
e811c8ce RD |
4247 | def UpdateUIEvent_CanUpdate(*args, **kwargs): |
4248 | """UpdateUIEvent_CanUpdate(Window win) -> bool""" | |
54f9ee45 | 4249 | return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) |
d14a1e28 | 4250 | |
e811c8ce RD |
4251 | def UpdateUIEvent_ResetUpdateTime(*args, **kwargs): |
4252 | """UpdateUIEvent_ResetUpdateTime()""" | |
54f9ee45 | 4253 | return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) |
d14a1e28 | 4254 | |
e811c8ce | 4255 | def UpdateUIEvent_SetMode(*args, **kwargs): |
196addbf | 4256 | """UpdateUIEvent_SetMode(int mode)""" |
54f9ee45 | 4257 | return _core_.UpdateUIEvent_SetMode(*args, **kwargs) |
d14a1e28 | 4258 | |
e811c8ce | 4259 | def UpdateUIEvent_GetMode(*args, **kwargs): |
196addbf | 4260 | """UpdateUIEvent_GetMode() -> int""" |
54f9ee45 | 4261 | return _core_.UpdateUIEvent_GetMode(*args, **kwargs) |
d14a1e28 RD |
4262 | |
4263 | #--------------------------------------------------------------------------- | |
4264 | ||
4265 | class SysColourChangedEvent(Event): | |
e811c8ce RD |
4266 | def __repr__(self): |
4267 | return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4268 | def __init__(self, *args, **kwargs): |
a95a7133 | 4269 | """__init__(self) -> SysColourChangedEvent""" |
54f9ee45 | 4270 | newobj = _core_.new_SysColourChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4271 | self.this = newobj.this |
4272 | self.thisown = 1 | |
4273 | del newobj.thisown | |
d14a1e28 RD |
4274 | |
4275 | class SysColourChangedEventPtr(SysColourChangedEvent): | |
4276 | def __init__(self, this): | |
4277 | self.this = this | |
4278 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4279 | self.__class__ = SysColourChangedEvent | |
54f9ee45 | 4280 | _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr) |
d14a1e28 RD |
4281 | |
4282 | #--------------------------------------------------------------------------- | |
4283 | ||
4284 | class MouseCaptureChangedEvent(Event): | |
e811c8ce RD |
4285 | def __repr__(self): |
4286 | return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4287 | def __init__(self, *args, **kwargs): |
a95a7133 | 4288 | """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent""" |
54f9ee45 | 4289 | newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4290 | self.this = newobj.this |
4291 | self.thisown = 1 | |
4292 | del newobj.thisown | |
e811c8ce | 4293 | def GetCapturedWindow(*args, **kwargs): |
a95a7133 | 4294 | """GetCapturedWindow(self) -> Window""" |
54f9ee45 | 4295 | return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs) |
e811c8ce | 4296 | |
d14a1e28 RD |
4297 | |
4298 | class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent): | |
4299 | def __init__(self, this): | |
4300 | self.this = this | |
4301 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4302 | self.__class__ = MouseCaptureChangedEvent | |
54f9ee45 | 4303 | _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr) |
d14a1e28 RD |
4304 | |
4305 | #--------------------------------------------------------------------------- | |
4306 | ||
4307 | class DisplayChangedEvent(Event): | |
e811c8ce RD |
4308 | def __repr__(self): |
4309 | return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4310 | def __init__(self, *args, **kwargs): |
a95a7133 | 4311 | """__init__(self) -> DisplayChangedEvent""" |
54f9ee45 | 4312 | newobj = _core_.new_DisplayChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4313 | self.this = newobj.this |
4314 | self.thisown = 1 | |
4315 | del newobj.thisown | |
d14a1e28 RD |
4316 | |
4317 | class DisplayChangedEventPtr(DisplayChangedEvent): | |
4318 | def __init__(self, this): | |
4319 | self.this = this | |
4320 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4321 | self.__class__ = DisplayChangedEvent | |
54f9ee45 | 4322 | _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr) |
d14a1e28 RD |
4323 | |
4324 | #--------------------------------------------------------------------------- | |
4325 | ||
4326 | class PaletteChangedEvent(Event): | |
e811c8ce RD |
4327 | def __repr__(self): |
4328 | return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4329 | def __init__(self, *args, **kwargs): |
a95a7133 | 4330 | """__init__(self, int id=0) -> PaletteChangedEvent""" |
54f9ee45 | 4331 | newobj = _core_.new_PaletteChangedEvent(*args, **kwargs) |
d14a1e28 RD |
4332 | self.this = newobj.this |
4333 | self.thisown = 1 | |
4334 | del newobj.thisown | |
e811c8ce | 4335 | def SetChangedWindow(*args, **kwargs): |
a95a7133 | 4336 | """SetChangedWindow(self, Window win)""" |
54f9ee45 | 4337 | return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs) |
e811c8ce RD |
4338 | |
4339 | def GetChangedWindow(*args, **kwargs): | |
a95a7133 | 4340 | """GetChangedWindow(self) -> Window""" |
54f9ee45 | 4341 | return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs) |
e811c8ce | 4342 | |
d14a1e28 RD |
4343 | |
4344 | class PaletteChangedEventPtr(PaletteChangedEvent): | |
4345 | def __init__(self, this): | |
4346 | self.this = this | |
4347 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4348 | self.__class__ = PaletteChangedEvent | |
54f9ee45 | 4349 | _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr) |
d14a1e28 RD |
4350 | |
4351 | #--------------------------------------------------------------------------- | |
4352 | ||
4353 | class QueryNewPaletteEvent(Event): | |
e811c8ce RD |
4354 | def __repr__(self): |
4355 | return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4356 | def __init__(self, *args, **kwargs): |
a95a7133 | 4357 | """__init__(self, int winid=0) -> QueryNewPaletteEvent""" |
54f9ee45 | 4358 | newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs) |
d14a1e28 RD |
4359 | self.this = newobj.this |
4360 | self.thisown = 1 | |
4361 | del newobj.thisown | |
e811c8ce | 4362 | def SetPaletteRealized(*args, **kwargs): |
a95a7133 | 4363 | """SetPaletteRealized(self, bool realized)""" |
54f9ee45 | 4364 | return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs) |
e811c8ce RD |
4365 | |
4366 | def GetPaletteRealized(*args, **kwargs): | |
a95a7133 | 4367 | """GetPaletteRealized(self) -> bool""" |
54f9ee45 | 4368 | return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs) |
e811c8ce | 4369 | |
d14a1e28 RD |
4370 | |
4371 | class QueryNewPaletteEventPtr(QueryNewPaletteEvent): | |
4372 | def __init__(self, this): | |
4373 | self.this = this | |
4374 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4375 | self.__class__ = QueryNewPaletteEvent | |
54f9ee45 | 4376 | _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr) |
d14a1e28 RD |
4377 | |
4378 | #--------------------------------------------------------------------------- | |
4379 | ||
4380 | class NavigationKeyEvent(Event): | |
e811c8ce RD |
4381 | def __repr__(self): |
4382 | return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4383 | def __init__(self, *args, **kwargs): |
a95a7133 | 4384 | """__init__(self) -> NavigationKeyEvent""" |
54f9ee45 | 4385 | newobj = _core_.new_NavigationKeyEvent(*args, **kwargs) |
d14a1e28 RD |
4386 | self.this = newobj.this |
4387 | self.thisown = 1 | |
4388 | del newobj.thisown | |
e811c8ce | 4389 | def GetDirection(*args, **kwargs): |
a95a7133 | 4390 | """GetDirection(self) -> bool""" |
54f9ee45 | 4391 | return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs) |
e811c8ce RD |
4392 | |
4393 | def SetDirection(*args, **kwargs): | |
908b74cd | 4394 | """SetDirection(self, bool forward)""" |
54f9ee45 | 4395 | return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs) |
e811c8ce RD |
4396 | |
4397 | def IsWindowChange(*args, **kwargs): | |
a95a7133 | 4398 | """IsWindowChange(self) -> bool""" |
54f9ee45 | 4399 | return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs) |
e811c8ce RD |
4400 | |
4401 | def SetWindowChange(*args, **kwargs): | |
908b74cd | 4402 | """SetWindowChange(self, bool ischange)""" |
54f9ee45 | 4403 | return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs) |
e811c8ce | 4404 | |
908b74cd RD |
4405 | def SetFlags(*args, **kwargs): |
4406 | """SetFlags(self, long flags)""" | |
4407 | return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs) | |
4408 | ||
e811c8ce | 4409 | def GetCurrentFocus(*args, **kwargs): |
a95a7133 | 4410 | """GetCurrentFocus(self) -> Window""" |
54f9ee45 | 4411 | return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs) |
e811c8ce RD |
4412 | |
4413 | def SetCurrentFocus(*args, **kwargs): | |
a95a7133 | 4414 | """SetCurrentFocus(self, Window win)""" |
54f9ee45 | 4415 | return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs) |
e811c8ce | 4416 | |
b0f7404b | 4417 | IsBackward = _core_.NavigationKeyEvent_IsBackward |
908b74cd RD |
4418 | IsForward = _core_.NavigationKeyEvent_IsForward |
4419 | WinChange = _core_.NavigationKeyEvent_WinChange | |
d14a1e28 RD |
4420 | |
4421 | class NavigationKeyEventPtr(NavigationKeyEvent): | |
4422 | def __init__(self, this): | |
4423 | self.this = this | |
4424 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4425 | self.__class__ = NavigationKeyEvent | |
54f9ee45 | 4426 | _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr) |
d14a1e28 RD |
4427 | |
4428 | #--------------------------------------------------------------------------- | |
4429 | ||
4430 | class WindowCreateEvent(CommandEvent): | |
e811c8ce RD |
4431 | def __repr__(self): |
4432 | return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4433 | def __init__(self, *args, **kwargs): |
a95a7133 | 4434 | """__init__(self, Window win=None) -> WindowCreateEvent""" |
54f9ee45 | 4435 | newobj = _core_.new_WindowCreateEvent(*args, **kwargs) |
d14a1e28 RD |
4436 | self.this = newobj.this |
4437 | self.thisown = 1 | |
4438 | del newobj.thisown | |
e811c8ce | 4439 | def GetWindow(*args, **kwargs): |
a95a7133 | 4440 | """GetWindow(self) -> Window""" |
54f9ee45 | 4441 | return _core_.WindowCreateEvent_GetWindow(*args, **kwargs) |
e811c8ce | 4442 | |
d14a1e28 RD |
4443 | |
4444 | class WindowCreateEventPtr(WindowCreateEvent): | |
4445 | def __init__(self, this): | |
4446 | self.this = this | |
4447 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4448 | self.__class__ = WindowCreateEvent | |
54f9ee45 | 4449 | _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr) |
d14a1e28 RD |
4450 | |
4451 | class WindowDestroyEvent(CommandEvent): | |
e811c8ce RD |
4452 | def __repr__(self): |
4453 | return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4454 | def __init__(self, *args, **kwargs): |
a95a7133 | 4455 | """__init__(self, Window win=None) -> WindowDestroyEvent""" |
54f9ee45 | 4456 | newobj = _core_.new_WindowDestroyEvent(*args, **kwargs) |
d14a1e28 RD |
4457 | self.this = newobj.this |
4458 | self.thisown = 1 | |
4459 | del newobj.thisown | |
e811c8ce | 4460 | def GetWindow(*args, **kwargs): |
a95a7133 | 4461 | """GetWindow(self) -> Window""" |
54f9ee45 | 4462 | return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs) |
e811c8ce | 4463 | |
d14a1e28 RD |
4464 | |
4465 | class WindowDestroyEventPtr(WindowDestroyEvent): | |
4466 | def __init__(self, this): | |
4467 | self.this = this | |
4468 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4469 | self.__class__ = WindowDestroyEvent | |
54f9ee45 | 4470 | _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr) |
d14a1e28 RD |
4471 | |
4472 | #--------------------------------------------------------------------------- | |
4473 | ||
4474 | class ContextMenuEvent(CommandEvent): | |
e811c8ce RD |
4475 | def __repr__(self): |
4476 | return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4477 | def __init__(self, *args, **kwargs): |
a95a7133 | 4478 | """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent""" |
54f9ee45 | 4479 | newobj = _core_.new_ContextMenuEvent(*args, **kwargs) |
d14a1e28 RD |
4480 | self.this = newobj.this |
4481 | self.thisown = 1 | |
4482 | del newobj.thisown | |
e811c8ce | 4483 | def GetPosition(*args, **kwargs): |
a95a7133 | 4484 | """GetPosition(self) -> Point""" |
54f9ee45 | 4485 | return _core_.ContextMenuEvent_GetPosition(*args, **kwargs) |
e811c8ce RD |
4486 | |
4487 | def SetPosition(*args, **kwargs): | |
a95a7133 | 4488 | """SetPosition(self, Point pos)""" |
54f9ee45 | 4489 | return _core_.ContextMenuEvent_SetPosition(*args, **kwargs) |
e811c8ce | 4490 | |
d14a1e28 RD |
4491 | |
4492 | class ContextMenuEventPtr(ContextMenuEvent): | |
4493 | def __init__(self, this): | |
4494 | self.this = this | |
4495 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4496 | self.__class__ = ContextMenuEvent | |
54f9ee45 | 4497 | _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr) |
d14a1e28 RD |
4498 | |
4499 | #--------------------------------------------------------------------------- | |
4500 | ||
54f9ee45 RD |
4501 | IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL |
4502 | IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED | |
d14a1e28 | 4503 | class IdleEvent(Event): |
e811c8ce RD |
4504 | def __repr__(self): |
4505 | return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4506 | def __init__(self, *args, **kwargs): |
a95a7133 | 4507 | """__init__(self) -> IdleEvent""" |
54f9ee45 | 4508 | newobj = _core_.new_IdleEvent(*args, **kwargs) |
d14a1e28 RD |
4509 | self.this = newobj.this |
4510 | self.thisown = 1 | |
4511 | del newobj.thisown | |
e811c8ce | 4512 | def RequestMore(*args, **kwargs): |
a95a7133 | 4513 | """RequestMore(self, bool needMore=True)""" |
54f9ee45 | 4514 | return _core_.IdleEvent_RequestMore(*args, **kwargs) |
e811c8ce RD |
4515 | |
4516 | def MoreRequested(*args, **kwargs): | |
a95a7133 | 4517 | """MoreRequested(self) -> bool""" |
54f9ee45 | 4518 | return _core_.IdleEvent_MoreRequested(*args, **kwargs) |
e811c8ce RD |
4519 | |
4520 | def SetMode(*args, **kwargs): | |
66c033b4 | 4521 | """SetMode(int mode)""" |
54f9ee45 | 4522 | return _core_.IdleEvent_SetMode(*args, **kwargs) |
e811c8ce RD |
4523 | |
4524 | SetMode = staticmethod(SetMode) | |
4525 | def GetMode(*args, **kwargs): | |
66c033b4 | 4526 | """GetMode() -> int""" |
54f9ee45 | 4527 | return _core_.IdleEvent_GetMode(*args, **kwargs) |
e811c8ce RD |
4528 | |
4529 | GetMode = staticmethod(GetMode) | |
4530 | def CanSend(*args, **kwargs): | |
66c033b4 | 4531 | """CanSend(Window win) -> bool""" |
54f9ee45 | 4532 | return _core_.IdleEvent_CanSend(*args, **kwargs) |
e811c8ce RD |
4533 | |
4534 | CanSend = staticmethod(CanSend) | |
d14a1e28 RD |
4535 | |
4536 | class IdleEventPtr(IdleEvent): | |
4537 | def __init__(self, this): | |
4538 | self.this = this | |
4539 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4540 | self.__class__ = IdleEvent | |
54f9ee45 | 4541 | _core_.IdleEvent_swigregister(IdleEventPtr) |
d14a1e28 | 4542 | |
e811c8ce | 4543 | def IdleEvent_SetMode(*args, **kwargs): |
196addbf | 4544 | """IdleEvent_SetMode(int mode)""" |
54f9ee45 | 4545 | return _core_.IdleEvent_SetMode(*args, **kwargs) |
d14a1e28 | 4546 | |
e811c8ce | 4547 | def IdleEvent_GetMode(*args, **kwargs): |
196addbf | 4548 | """IdleEvent_GetMode() -> int""" |
54f9ee45 | 4549 | return _core_.IdleEvent_GetMode(*args, **kwargs) |
d14a1e28 | 4550 | |
e811c8ce RD |
4551 | def IdleEvent_CanSend(*args, **kwargs): |
4552 | """IdleEvent_CanSend(Window win) -> bool""" | |
54f9ee45 | 4553 | return _core_.IdleEvent_CanSend(*args, **kwargs) |
d14a1e28 RD |
4554 | |
4555 | #--------------------------------------------------------------------------- | |
4556 | ||
4557 | class PyEvent(Event): | |
e811c8ce RD |
4558 | def __repr__(self): |
4559 | return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4560 | def __init__(self, *args, **kwargs): |
a95a7133 | 4561 | """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent""" |
54f9ee45 | 4562 | newobj = _core_.new_PyEvent(*args, **kwargs) |
d14a1e28 RD |
4563 | self.this = newobj.this |
4564 | self.thisown = 1 | |
4565 | del newobj.thisown | |
4566 | self.SetSelf(self) | |
e811c8ce | 4567 | |
54f9ee45 | 4568 | def __del__(self, destroy=_core_.delete_PyEvent): |
a95a7133 | 4569 | """__del__(self)""" |
d14a1e28 RD |
4570 | try: |
4571 | if self.thisown: destroy(self) | |
4572 | except: pass | |
e811c8ce RD |
4573 | |
4574 | def SetSelf(*args, **kwargs): | |
a95a7133 | 4575 | """SetSelf(self, PyObject self)""" |
54f9ee45 | 4576 | return _core_.PyEvent_SetSelf(*args, **kwargs) |
e811c8ce RD |
4577 | |
4578 | def GetSelf(*args, **kwargs): | |
a95a7133 | 4579 | """GetSelf(self) -> PyObject""" |
54f9ee45 | 4580 | return _core_.PyEvent_GetSelf(*args, **kwargs) |
e811c8ce | 4581 | |
d14a1e28 RD |
4582 | |
4583 | class PyEventPtr(PyEvent): | |
4584 | def __init__(self, this): | |
4585 | self.this = this | |
4586 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4587 | self.__class__ = PyEvent | |
54f9ee45 | 4588 | _core_.PyEvent_swigregister(PyEventPtr) |
d14a1e28 RD |
4589 | |
4590 | class PyCommandEvent(CommandEvent): | |
e811c8ce RD |
4591 | def __repr__(self): |
4592 | return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4593 | def __init__(self, *args, **kwargs): |
a95a7133 | 4594 | """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent""" |
54f9ee45 | 4595 | newobj = _core_.new_PyCommandEvent(*args, **kwargs) |
d14a1e28 RD |
4596 | self.this = newobj.this |
4597 | self.thisown = 1 | |
4598 | del newobj.thisown | |
4599 | self.SetSelf(self) | |
e811c8ce | 4600 | |
54f9ee45 | 4601 | def __del__(self, destroy=_core_.delete_PyCommandEvent): |
a95a7133 | 4602 | """__del__(self)""" |
d14a1e28 RD |
4603 | try: |
4604 | if self.thisown: destroy(self) | |
4605 | except: pass | |
e811c8ce RD |
4606 | |
4607 | def SetSelf(*args, **kwargs): | |
a95a7133 | 4608 | """SetSelf(self, PyObject self)""" |
54f9ee45 | 4609 | return _core_.PyCommandEvent_SetSelf(*args, **kwargs) |
e811c8ce RD |
4610 | |
4611 | def GetSelf(*args, **kwargs): | |
a95a7133 | 4612 | """GetSelf(self) -> PyObject""" |
54f9ee45 | 4613 | return _core_.PyCommandEvent_GetSelf(*args, **kwargs) |
e811c8ce | 4614 | |
d14a1e28 RD |
4615 | |
4616 | class PyCommandEventPtr(PyCommandEvent): | |
4617 | def __init__(self, this): | |
4618 | self.this = this | |
4619 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4620 | self.__class__ = PyCommandEvent | |
54f9ee45 | 4621 | _core_.PyCommandEvent_swigregister(PyCommandEventPtr) |
d14a1e28 RD |
4622 | |
4623 | #--------------------------------------------------------------------------- | |
4624 | ||
54f9ee45 RD |
4625 | PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS |
4626 | PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION | |
4627 | PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG | |
4628 | PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG | |
4629 | PRINT_WINDOWS = _core_.PRINT_WINDOWS | |
4630 | PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT | |
d14a1e28 | 4631 | class PyApp(EvtHandler): |
66c033b4 RD |
4632 | """ |
4633 | The ``wx.PyApp`` class is an *implementation detail*, please use the | |
4634 | `wx.App` class (or some other derived class) instead. | |
4635 | """ | |
e811c8ce RD |
4636 | def __repr__(self): |
4637 | return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 4638 | def __init__(self, *args, **kwargs): |
98e665d3 | 4639 | """ |
a95a7133 | 4640 | __init__(self) -> PyApp |
98e665d3 RD |
4641 | |
4642 | Create a new application object, starting the bootstrap process. | |
4643 | """ | |
54f9ee45 | 4644 | newobj = _core_.new_PyApp(*args, **kwargs) |
d14a1e28 RD |
4645 | self.this = newobj.this |
4646 | self.thisown = 1 | |
4647 | del newobj.thisown | |
4648 | self._setCallbackInfo(self, PyApp) | |
4649 | self._setOORInfo(self) | |
e811c8ce | 4650 | |
54f9ee45 | 4651 | def __del__(self, destroy=_core_.delete_PyApp): |
a95a7133 | 4652 | """__del__(self)""" |
d14a1e28 RD |
4653 | try: |
4654 | if self.thisown: destroy(self) | |
4655 | except: pass | |
e811c8ce RD |
4656 | |
4657 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 4658 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 4659 | return _core_.PyApp__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
4660 | |
4661 | def GetAppName(*args, **kwargs): | |
0df68c9f | 4662 | """ |
a95a7133 | 4663 | GetAppName(self) -> String |
6c3b4aae | 4664 | |
0df68c9f RD |
4665 | Get the application name. |
4666 | """ | |
54f9ee45 | 4667 | return _core_.PyApp_GetAppName(*args, **kwargs) |
e811c8ce RD |
4668 | |
4669 | def SetAppName(*args, **kwargs): | |
0df68c9f | 4670 | """ |
a95a7133 | 4671 | SetAppName(self, String name) |
6c3b4aae | 4672 | |
66c033b4 RD |
4673 | Set the application name. This value may be used automatically by |
4674 | `wx.Config` and such. | |
0df68c9f | 4675 | """ |
54f9ee45 | 4676 | return _core_.PyApp_SetAppName(*args, **kwargs) |
e811c8ce RD |
4677 | |
4678 | def GetClassName(*args, **kwargs): | |
0df68c9f | 4679 | """ |
a95a7133 | 4680 | GetClassName(self) -> String |
e811c8ce | 4681 | |
0df68c9f RD |
4682 | Get the application's class name. |
4683 | """ | |
54f9ee45 | 4684 | return _core_.PyApp_GetClassName(*args, **kwargs) |
e811c8ce RD |
4685 | |
4686 | def SetClassName(*args, **kwargs): | |
0df68c9f | 4687 | """ |
a95a7133 | 4688 | SetClassName(self, String name) |
6c3b4aae | 4689 | |
66c033b4 RD |
4690 | Set the application's class name. This value may be used for |
4691 | X-resources if applicable for the platform | |
0df68c9f | 4692 | """ |
54f9ee45 | 4693 | return _core_.PyApp_SetClassName(*args, **kwargs) |
e811c8ce RD |
4694 | |
4695 | def GetVendorName(*args, **kwargs): | |
0df68c9f | 4696 | """ |
a95a7133 | 4697 | GetVendorName(self) -> String |
6c3b4aae | 4698 | |
0df68c9f RD |
4699 | Get the application's vendor name. |
4700 | """ | |
54f9ee45 | 4701 | return _core_.PyApp_GetVendorName(*args, **kwargs) |
e811c8ce RD |
4702 | |
4703 | def SetVendorName(*args, **kwargs): | |
0df68c9f | 4704 | """ |
a95a7133 | 4705 | SetVendorName(self, String name) |
6c3b4aae | 4706 | |
66c033b4 RD |
4707 | Set the application's vendor name. This value may be used |
4708 | automatically by `wx.Config` and such. | |
0df68c9f | 4709 | """ |
54f9ee45 | 4710 | return _core_.PyApp_SetVendorName(*args, **kwargs) |
e811c8ce RD |
4711 | |
4712 | def GetTraits(*args, **kwargs): | |
0df68c9f | 4713 | """ |
a95a7133 | 4714 | GetTraits(self) -> wxAppTraits |
6c3b4aae | 4715 | |
66c033b4 RD |
4716 | Return (and create if necessary) the app traits object to which we |
4717 | delegate for everything which either should be configurable by the | |
4718 | user (then he can change the default behaviour simply by overriding | |
4719 | CreateTraits() and returning his own traits object) or which is | |
4720 | GUI/console dependent as then wx.AppTraits allows us to abstract the | |
4721 | differences behind the common facade. | |
4722 | ||
4723 | :todo: Add support for overriding CreateAppTraits in wxPython. | |
0df68c9f | 4724 | """ |
54f9ee45 | 4725 | return _core_.PyApp_GetTraits(*args, **kwargs) |
e811c8ce RD |
4726 | |
4727 | def ProcessPendingEvents(*args, **kwargs): | |
0df68c9f | 4728 | """ |
a95a7133 | 4729 | ProcessPendingEvents(self) |
6c3b4aae | 4730 | |
66c033b4 RD |
4731 | Process all events in the Pending Events list -- it is necessary to |
4732 | call this function to process posted events. This normally happens | |
4733 | during each event loop iteration. | |
0df68c9f | 4734 | """ |
54f9ee45 | 4735 | return _core_.PyApp_ProcessPendingEvents(*args, **kwargs) |
e811c8ce RD |
4736 | |
4737 | def Yield(*args, **kwargs): | |
0df68c9f | 4738 | """ |
a95a7133 | 4739 | Yield(self, bool onlyIfNeeded=False) -> bool |
6c3b4aae | 4740 | |
66c033b4 RD |
4741 | Process all currently pending events right now, instead of waiting |
4742 | until return to the event loop. It is an error to call ``Yield`` | |
4743 | recursively unless the value of ``onlyIfNeeded`` is True. | |
6c3b4aae | 4744 | |
66c033b4 | 4745 | :warning: This function is dangerous as it can lead to unexpected |
41e2b43e RD |
4746 | reentrancies (i.e. when called from an event handler it may |
4747 | result in calling the same event handler again), use with | |
4748 | extreme care or, better, don't use at all! | |
0df68c9f | 4749 | |
66c033b4 | 4750 | :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield` |
41e2b43e | 4751 | |
0df68c9f | 4752 | """ |
54f9ee45 | 4753 | return _core_.PyApp_Yield(*args, **kwargs) |
e811c8ce RD |
4754 | |
4755 | def WakeUpIdle(*args, **kwargs): | |
0df68c9f | 4756 | """ |
a95a7133 | 4757 | WakeUpIdle(self) |
6c3b4aae | 4758 | |
66c033b4 RD |
4759 | Make sure that idle events are sent again. |
4760 | :see: `wx.WakeUpIdle` | |
0df68c9f | 4761 | """ |
54f9ee45 | 4762 | return _core_.PyApp_WakeUpIdle(*args, **kwargs) |
e811c8ce | 4763 | |
1fc3b23a RD |
4764 | def IsMainLoopRunning(*args, **kwargs): |
4765 | """ | |
4766 | IsMainLoopRunning() -> bool | |
4767 | ||
4768 | Returns True if we're running the main loop, i.e. if the events can | |
4769 | currently be dispatched. | |
4770 | """ | |
4771 | return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) | |
4772 | ||
4773 | IsMainLoopRunning = staticmethod(IsMainLoopRunning) | |
e811c8ce | 4774 | def MainLoop(*args, **kwargs): |
0df68c9f | 4775 | """ |
a95a7133 | 4776 | MainLoop(self) -> int |
6c3b4aae | 4777 | |
66c033b4 RD |
4778 | Execute the main GUI loop, the function doesn't normally return until |
4779 | all top level windows have been closed and destroyed. | |
0df68c9f | 4780 | """ |
54f9ee45 | 4781 | return _core_.PyApp_MainLoop(*args, **kwargs) |
e811c8ce RD |
4782 | |
4783 | def Exit(*args, **kwargs): | |
0df68c9f | 4784 | """ |
a95a7133 | 4785 | Exit(self) |
6c3b4aae | 4786 | |
0df68c9f | 4787 | Exit the main loop thus terminating the application. |
66c033b4 | 4788 | :see: `wx.Exit` |
0df68c9f | 4789 | """ |
54f9ee45 | 4790 | return _core_.PyApp_Exit(*args, **kwargs) |
e811c8ce RD |
4791 | |
4792 | def ExitMainLoop(*args, **kwargs): | |
0df68c9f | 4793 | """ |
a95a7133 | 4794 | ExitMainLoop(self) |
6c3b4aae | 4795 | |
66c033b4 RD |
4796 | Exit the main GUI loop during the next iteration of the main |
4797 | loop, (i.e. it does not stop the program immediately!) | |
0df68c9f | 4798 | """ |
54f9ee45 | 4799 | return _core_.PyApp_ExitMainLoop(*args, **kwargs) |
e811c8ce RD |
4800 | |
4801 | def Pending(*args, **kwargs): | |
0df68c9f | 4802 | """ |
a95a7133 | 4803 | Pending(self) -> bool |
6c3b4aae | 4804 | |
0df68c9f RD |
4805 | Returns True if there are unprocessed events in the event queue. |
4806 | """ | |
54f9ee45 | 4807 | return _core_.PyApp_Pending(*args, **kwargs) |
e811c8ce RD |
4808 | |
4809 | def Dispatch(*args, **kwargs): | |
0df68c9f | 4810 | """ |
a95a7133 | 4811 | Dispatch(self) -> bool |
6c3b4aae | 4812 | |
0df68c9f RD |
4813 | Process the first event in the event queue (blocks until an event |
4814 | appears if there are none currently) | |
4815 | """ | |
54f9ee45 | 4816 | return _core_.PyApp_Dispatch(*args, **kwargs) |
e811c8ce RD |
4817 | |
4818 | def ProcessIdle(*args, **kwargs): | |
0df68c9f | 4819 | """ |
a95a7133 | 4820 | ProcessIdle(self) -> bool |
6c3b4aae | 4821 | |
66c033b4 RD |
4822 | Called from the MainLoop when the application becomes idle (there are |
4823 | no pending events) and sends a `wx.IdleEvent` to all interested | |
4824 | parties. Returns True if more idle events are needed, False if not. | |
0df68c9f | 4825 | """ |
54f9ee45 | 4826 | return _core_.PyApp_ProcessIdle(*args, **kwargs) |
e811c8ce RD |
4827 | |
4828 | def SendIdleEvents(*args, **kwargs): | |
0df68c9f | 4829 | """ |
a95a7133 | 4830 | SendIdleEvents(self, Window win, IdleEvent event) -> bool |
e811c8ce | 4831 | |
66c033b4 RD |
4832 | Send idle event to window and all subwindows. Returns True if more |
4833 | idle time is requested. | |
0df68c9f | 4834 | """ |
54f9ee45 | 4835 | return _core_.PyApp_SendIdleEvents(*args, **kwargs) |
e811c8ce RD |
4836 | |
4837 | def IsActive(*args, **kwargs): | |
0df68c9f | 4838 | """ |
a95a7133 | 4839 | IsActive(self) -> bool |
6c3b4aae | 4840 | |
0df68c9f RD |
4841 | Return True if our app has focus. |
4842 | """ | |
54f9ee45 | 4843 | return _core_.PyApp_IsActive(*args, **kwargs) |
e811c8ce RD |
4844 | |
4845 | def SetTopWindow(*args, **kwargs): | |
0df68c9f | 4846 | """ |
a95a7133 | 4847 | SetTopWindow(self, Window win) |
6c3b4aae | 4848 | |
66c033b4 | 4849 | Set the *main* top level window |
0df68c9f | 4850 | """ |
54f9ee45 | 4851 | return _core_.PyApp_SetTopWindow(*args, **kwargs) |
e811c8ce RD |
4852 | |
4853 | def GetTopWindow(*args, **kwargs): | |
0df68c9f | 4854 | """ |
a95a7133 | 4855 | GetTopWindow(self) -> Window |
6c3b4aae | 4856 | |
66c033b4 RD |
4857 | Return the *main* top level window (if it hadn't been set previously |
4858 | with SetTopWindow(), will return just some top level window and, if | |
4859 | there not any, will return None) | |
0df68c9f | 4860 | """ |
54f9ee45 | 4861 | return _core_.PyApp_GetTopWindow(*args, **kwargs) |
e811c8ce RD |
4862 | |
4863 | def SetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f | 4864 | """ |
a95a7133 | 4865 | SetExitOnFrameDelete(self, bool flag) |
0df68c9f | 4866 | |
66c033b4 RD |
4867 | Control the exit behaviour: by default, the program will exit the main |
4868 | loop (and so, usually, terminate) when the last top-level program | |
4869 | window is deleted. Beware that if you disable this behaviour (with | |
4870 | SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() | |
4871 | explicitly from somewhere. | |
0df68c9f | 4872 | """ |
54f9ee45 | 4873 | return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs) |
e811c8ce RD |
4874 | |
4875 | def GetExitOnFrameDelete(*args, **kwargs): | |
0df68c9f | 4876 | """ |
a95a7133 | 4877 | GetExitOnFrameDelete(self) -> bool |
6c3b4aae | 4878 | |
0df68c9f RD |
4879 | Get the current exit behaviour setting. |
4880 | """ | |
54f9ee45 | 4881 | return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs) |
e811c8ce RD |
4882 | |
4883 | def SetUseBestVisual(*args, **kwargs): | |
0df68c9f | 4884 | """ |
a95a7133 | 4885 | SetUseBestVisual(self, bool flag) |
6c3b4aae | 4886 | |
66c033b4 RD |
4887 | Set whether the app should try to use the best available visual on |
4888 | systems where more than one is available, (Sun, SGI, XFree86 4, etc.) | |
0df68c9f | 4889 | """ |
54f9ee45 | 4890 | return _core_.PyApp_SetUseBestVisual(*args, **kwargs) |
e811c8ce RD |
4891 | |
4892 | def GetUseBestVisual(*args, **kwargs): | |
0df68c9f | 4893 | """ |
a95a7133 | 4894 | GetUseBestVisual(self) -> bool |
6c3b4aae | 4895 | |
0df68c9f RD |
4896 | Get current UseBestVisual setting. |
4897 | """ | |
54f9ee45 | 4898 | return _core_.PyApp_GetUseBestVisual(*args, **kwargs) |
e811c8ce RD |
4899 | |
4900 | def SetPrintMode(*args, **kwargs): | |
a95a7133 | 4901 | """SetPrintMode(self, int mode)""" |
54f9ee45 | 4902 | return _core_.PyApp_SetPrintMode(*args, **kwargs) |
e811c8ce RD |
4903 | |
4904 | def GetPrintMode(*args, **kwargs): | |
a95a7133 | 4905 | """GetPrintMode(self) -> int""" |
54f9ee45 | 4906 | return _core_.PyApp_GetPrintMode(*args, **kwargs) |
e811c8ce | 4907 | |
e811c8ce | 4908 | def SetAssertMode(*args, **kwargs): |
0df68c9f | 4909 | """ |
a95a7133 | 4910 | SetAssertMode(self, int mode) |
6c3b4aae | 4911 | |
41e2b43e | 4912 | Set the OnAssert behaviour for debug and hybrid builds. |
0df68c9f | 4913 | """ |
54f9ee45 | 4914 | return _core_.PyApp_SetAssertMode(*args, **kwargs) |
e811c8ce | 4915 | |
6c3b4aae | 4916 | def GetAssertMode(*args, **kwargs): |
0df68c9f | 4917 | """ |
a95a7133 | 4918 | GetAssertMode(self) -> int |
6c3b4aae | 4919 | |
0df68c9f RD |
4920 | Get the current OnAssert behaviour setting. |
4921 | """ | |
54f9ee45 | 4922 | return _core_.PyApp_GetAssertMode(*args, **kwargs) |
6c3b4aae | 4923 | |
e811c8ce | 4924 | def GetMacSupportPCMenuShortcuts(*args, **kwargs): |
66c033b4 | 4925 | """GetMacSupportPCMenuShortcuts() -> bool""" |
54f9ee45 | 4926 | return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) |
e811c8ce RD |
4927 | |
4928 | GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) | |
4929 | def GetMacAboutMenuItemId(*args, **kwargs): | |
66c033b4 | 4930 | """GetMacAboutMenuItemId() -> long""" |
54f9ee45 | 4931 | return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs) |
e811c8ce RD |
4932 | |
4933 | GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) | |
4934 | def GetMacPreferencesMenuItemId(*args, **kwargs): | |
66c033b4 | 4935 | """GetMacPreferencesMenuItemId() -> long""" |
54f9ee45 | 4936 | return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) |
e811c8ce RD |
4937 | |
4938 | GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) | |
4939 | def GetMacExitMenuItemId(*args, **kwargs): | |
66c033b4 | 4940 | """GetMacExitMenuItemId() -> long""" |
54f9ee45 | 4941 | return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs) |
e811c8ce RD |
4942 | |
4943 | GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) | |
4944 | def GetMacHelpMenuTitleName(*args, **kwargs): | |
66c033b4 | 4945 | """GetMacHelpMenuTitleName() -> String""" |
54f9ee45 | 4946 | return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) |
e811c8ce RD |
4947 | |
4948 | GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) | |
4949 | def SetMacSupportPCMenuShortcuts(*args, **kwargs): | |
66c033b4 | 4950 | """SetMacSupportPCMenuShortcuts(bool val)""" |
54f9ee45 | 4951 | return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) |
e811c8ce RD |
4952 | |
4953 | SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) | |
4954 | def SetMacAboutMenuItemId(*args, **kwargs): | |
66c033b4 | 4955 | """SetMacAboutMenuItemId(long val)""" |
54f9ee45 | 4956 | return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) |
e811c8ce RD |
4957 | |
4958 | SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) | |
4959 | def SetMacPreferencesMenuItemId(*args, **kwargs): | |
66c033b4 | 4960 | """SetMacPreferencesMenuItemId(long val)""" |
54f9ee45 | 4961 | return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) |
e811c8ce RD |
4962 | |
4963 | SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) | |
4964 | def SetMacExitMenuItemId(*args, **kwargs): | |
66c033b4 | 4965 | """SetMacExitMenuItemId(long val)""" |
54f9ee45 | 4966 | return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) |
e811c8ce RD |
4967 | |
4968 | SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) | |
4969 | def SetMacHelpMenuTitleName(*args, **kwargs): | |
66c033b4 | 4970 | """SetMacHelpMenuTitleName(String val)""" |
54f9ee45 | 4971 | return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) |
e811c8ce RD |
4972 | |
4973 | SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) | |
4974 | def _BootstrapApp(*args, **kwargs): | |
0df68c9f | 4975 | """ |
a95a7133 | 4976 | _BootstrapApp(self) |
6c3b4aae | 4977 | |
0df68c9f RD |
4978 | For internal use only |
4979 | """ | |
54f9ee45 | 4980 | return _core_.PyApp__BootstrapApp(*args, **kwargs) |
e811c8ce RD |
4981 | |
4982 | def GetComCtl32Version(*args, **kwargs): | |
0df68c9f | 4983 | """ |
66c033b4 | 4984 | GetComCtl32Version() -> int |
6c3b4aae | 4985 | |
66c033b4 RD |
4986 | Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if |
4987 | it wasn't found at all. Raises an exception on non-Windows platforms. | |
0df68c9f | 4988 | """ |
54f9ee45 | 4989 | return _core_.PyApp_GetComCtl32Version(*args, **kwargs) |
e811c8ce RD |
4990 | |
4991 | GetComCtl32Version = staticmethod(GetComCtl32Version) | |
d14a1e28 RD |
4992 | |
4993 | class PyAppPtr(PyApp): | |
4994 | def __init__(self, this): | |
4995 | self.this = this | |
4996 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4997 | self.__class__ = PyApp | |
54f9ee45 | 4998 | _core_.PyApp_swigregister(PyAppPtr) |
d14a1e28 | 4999 | |
1fc3b23a RD |
5000 | def PyApp_IsMainLoopRunning(*args, **kwargs): |
5001 | """ | |
5002 | PyApp_IsMainLoopRunning() -> bool | |
5003 | ||
5004 | Returns True if we're running the main loop, i.e. if the events can | |
5005 | currently be dispatched. | |
5006 | """ | |
5007 | return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) | |
5008 | ||
e811c8ce RD |
5009 | def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs): |
5010 | """PyApp_GetMacSupportPCMenuShortcuts() -> bool""" | |
54f9ee45 | 5011 | return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) |
d14a1e28 | 5012 | |
e811c8ce RD |
5013 | def PyApp_GetMacAboutMenuItemId(*args, **kwargs): |
5014 | """PyApp_GetMacAboutMenuItemId() -> long""" | |
54f9ee45 | 5015 | return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs) |
d14a1e28 | 5016 | |
e811c8ce RD |
5017 | def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs): |
5018 | """PyApp_GetMacPreferencesMenuItemId() -> long""" | |
54f9ee45 | 5019 | return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) |
d14a1e28 | 5020 | |
e811c8ce RD |
5021 | def PyApp_GetMacExitMenuItemId(*args, **kwargs): |
5022 | """PyApp_GetMacExitMenuItemId() -> long""" | |
54f9ee45 | 5023 | return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs) |
d14a1e28 | 5024 | |
e811c8ce | 5025 | def PyApp_GetMacHelpMenuTitleName(*args, **kwargs): |
196addbf | 5026 | """PyApp_GetMacHelpMenuTitleName() -> String""" |
54f9ee45 | 5027 | return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) |
d14a1e28 | 5028 | |
e811c8ce RD |
5029 | def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs): |
5030 | """PyApp_SetMacSupportPCMenuShortcuts(bool val)""" | |
54f9ee45 | 5031 | return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) |
d14a1e28 | 5032 | |
e811c8ce RD |
5033 | def PyApp_SetMacAboutMenuItemId(*args, **kwargs): |
5034 | """PyApp_SetMacAboutMenuItemId(long val)""" | |
54f9ee45 | 5035 | return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) |
d14a1e28 | 5036 | |
e811c8ce RD |
5037 | def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs): |
5038 | """PyApp_SetMacPreferencesMenuItemId(long val)""" | |
54f9ee45 | 5039 | return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) |
d14a1e28 | 5040 | |
e811c8ce RD |
5041 | def PyApp_SetMacExitMenuItemId(*args, **kwargs): |
5042 | """PyApp_SetMacExitMenuItemId(long val)""" | |
54f9ee45 | 5043 | return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) |
d14a1e28 | 5044 | |
e811c8ce | 5045 | def PyApp_SetMacHelpMenuTitleName(*args, **kwargs): |
196addbf | 5046 | """PyApp_SetMacHelpMenuTitleName(String val)""" |
54f9ee45 | 5047 | return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) |
d14a1e28 | 5048 | |
e811c8ce | 5049 | def PyApp_GetComCtl32Version(*args, **kwargs): |
0df68c9f RD |
5050 | """ |
5051 | PyApp_GetComCtl32Version() -> int | |
6c3b4aae | 5052 | |
66c033b4 RD |
5053 | Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if |
5054 | it wasn't found at all. Raises an exception on non-Windows platforms. | |
0df68c9f | 5055 | """ |
54f9ee45 | 5056 | return _core_.PyApp_GetComCtl32Version(*args, **kwargs) |
d14a1e28 RD |
5057 | |
5058 | #--------------------------------------------------------------------------- | |
5059 | ||
5060 | ||
e811c8ce | 5061 | def Exit(*args, **kwargs): |
0df68c9f RD |
5062 | """ |
5063 | Exit() | |
6c3b4aae | 5064 | |
0df68c9f RD |
5065 | Force an exit of the application. Convenience for wx.GetApp().Exit() |
5066 | """ | |
54f9ee45 | 5067 | return _core_.Exit(*args, **kwargs) |
d14a1e28 | 5068 | |
e811c8ce | 5069 | def Yield(*args, **kwargs): |
0df68c9f RD |
5070 | """ |
5071 | Yield() -> bool | |
6c3b4aae | 5072 | |
0df68c9f RD |
5073 | Yield to other apps/messages. Convenience for wx.GetApp().Yield() |
5074 | """ | |
54f9ee45 | 5075 | return _core_.Yield(*args, **kwargs) |
d14a1e28 | 5076 | |
e811c8ce | 5077 | def YieldIfNeeded(*args, **kwargs): |
0df68c9f RD |
5078 | """ |
5079 | YieldIfNeeded() -> bool | |
6c3b4aae | 5080 | |
0df68c9f RD |
5081 | Yield to other apps/messages. Convenience for wx.GetApp().Yield(True) |
5082 | """ | |
54f9ee45 | 5083 | return _core_.YieldIfNeeded(*args, **kwargs) |
d14a1e28 | 5084 | |
e811c8ce | 5085 | def SafeYield(*args, **kwargs): |
0df68c9f RD |
5086 | """ |
5087 | SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool | |
6c3b4aae | 5088 | |
66c033b4 RD |
5089 | This function is similar to `wx.Yield`, except that it disables the |
5090 | user input to all program windows before calling `wx.Yield` and | |
5091 | re-enables it again afterwards. If ``win`` is not None, this window | |
5092 | will remain enabled, allowing the implementation of some limited user | |
5093 | interaction. | |
6c3b4aae | 5094 | |
66c033b4 | 5095 | :Returns: the result of the call to `wx.Yield`. |
0df68c9f | 5096 | """ |
54f9ee45 | 5097 | return _core_.SafeYield(*args, **kwargs) |
d14a1e28 | 5098 | |
e811c8ce | 5099 | def WakeUpIdle(*args, **kwargs): |
0df68c9f RD |
5100 | """ |
5101 | WakeUpIdle() | |
6c3b4aae | 5102 | |
66c033b4 RD |
5103 | Cause the message queue to become empty again, so idle events will be |
5104 | sent. | |
0df68c9f | 5105 | """ |
54f9ee45 | 5106 | return _core_.WakeUpIdle(*args, **kwargs) |
d14a1e28 | 5107 | |
e811c8ce | 5108 | def PostEvent(*args, **kwargs): |
0df68c9f RD |
5109 | """ |
5110 | PostEvent(EvtHandler dest, Event event) | |
6c3b4aae | 5111 | |
66c033b4 RD |
5112 | Send an event to a window or other wx.EvtHandler to be processed |
5113 | later. | |
0df68c9f | 5114 | """ |
54f9ee45 | 5115 | return _core_.PostEvent(*args, **kwargs) |
d14a1e28 | 5116 | |
e811c8ce | 5117 | def App_CleanUp(*args, **kwargs): |
0df68c9f RD |
5118 | """ |
5119 | App_CleanUp() | |
6c3b4aae | 5120 | |
41e2b43e | 5121 | For internal use only, it is used to cleanup after wxWidgets when |
66c033b4 | 5122 | Python shuts down. |
0df68c9f | 5123 | """ |
54f9ee45 | 5124 | return _core_.App_CleanUp(*args, **kwargs) |
d14a1e28 | 5125 | |
e811c8ce | 5126 | def GetApp(*args, **kwargs): |
0df68c9f RD |
5127 | """ |
5128 | GetApp() -> PyApp | |
6c3b4aae | 5129 | |
196addbf | 5130 | Return a reference to the current wx.App object. |
0df68c9f | 5131 | """ |
54f9ee45 | 5132 | return _core_.GetApp(*args, **kwargs) |
d14a1e28 RD |
5133 | #---------------------------------------------------------------------- |
5134 | ||
5135 | class PyOnDemandOutputWindow: | |
6c3b4aae RD |
5136 | """ |
5137 | A class that can be used for redirecting Python's stdout and | |
5138 | stderr streams. It will do nothing until something is wrriten to | |
5139 | the stream at which point it will create a Frame with a text area | |
5140 | and write the text there. | |
5141 | """ | |
d14a1e28 RD |
5142 | def __init__(self, title = "wxPython: stdout/stderr"): |
5143 | self.frame = None | |
5144 | self.title = title | |
412d302d RD |
5145 | self.pos = wx.DefaultPosition |
5146 | self.size = (450, 300) | |
d14a1e28 RD |
5147 | self.parent = None |
5148 | ||
5149 | def SetParent(self, parent): | |
6c3b4aae | 5150 | """Set the window to be used as the popup Frame's parent.""" |
d14a1e28 RD |
5151 | self.parent = parent |
5152 | ||
6c3b4aae RD |
5153 | |
5154 | def CreateOutputWindow(self, st): | |
412d302d RD |
5155 | self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size, |
5156 | style=wx.DEFAULT_FRAME_STYLE) | |
196addbf | 5157 | self.text = wx.TextCtrl(self.frame, -1, "", |
412d302d | 5158 | style=wx.TE_MULTILINE|wx.TE_READONLY) |
d1e20054 | 5159 | self.text.AppendText(st) |
6c3b4aae RD |
5160 | self.frame.Show(True) |
5161 | EVT_CLOSE(self.frame, self.OnCloseWindow) | |
5162 | ||
d14a1e28 | 5163 | |
7409c0c6 RD |
5164 | def OnCloseWindow(self, event): |
5165 | if self.frame is not None: | |
5166 | self.frame.Destroy() | |
5167 | self.frame = None | |
5168 | self.text = None | |
5169 | ||
5170 | ||
d14a1e28 | 5171 | # These methods provide the file-like output behaviour. |
6c3b4aae RD |
5172 | def write(self, text): |
5173 | """ | |
5174 | Create the output window if needed and write the string to it. | |
5175 | If not called in the context of the gui thread then uses | |
5176 | CallAfter to do the work there. | |
5177 | """ | |
5178 | if self.frame is None: | |
5179 | if not wx.Thread_IsMain(): | |
5180 | wx.CallAfter(self.CreateOutputWindow, text) | |
5181 | else: | |
5182 | self.CreateOutputWindow(text) | |
5183 | else: | |
5184 | if not wx.Thread_IsMain(): | |
5185 | wx.CallAfter(self.text.AppendText, text) | |
5186 | else: | |
5187 | self.text.AppendText(text) | |
5188 | ||
d14a1e28 RD |
5189 | |
5190 | def close(self): | |
6c3b4aae RD |
5191 | if self.frame is not None: |
5192 | wx.CallAfter(self.frame.Close) | |
5193 | ||
d14a1e28 | 5194 | |
19272049 RD |
5195 | def flush(self): |
5196 | pass | |
5197 | ||
5198 | ||
d14a1e28 RD |
5199 | |
5200 | #---------------------------------------------------------------------- | |
d14a1e28 RD |
5201 | |
5202 | _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__') | |
5203 | ||
5204 | class App(wx.PyApp): | |
6c3b4aae | 5205 | """ |
66c033b4 RD |
5206 | The ``wx.App`` class represents the application and is used to: |
5207 | ||
5208 | * bootstrap the wxPython system and initialize the underlying | |
5209 | gui toolkit | |
5210 | * set and get application-wide properties | |
5211 | * implement the windowing system main message or event loop, | |
5212 | and to dispatch events to window instances | |
5213 | * etc. | |
5214 | ||
5215 | Every application must have a ``wx.App`` instance, and all | |
5216 | creation of UI objects should be delayed until after the | |
03e37cd5 RD |
5217 | ``wx.App`` object has been created in order to ensure that the gui |
5218 | platform and wxWidgets have been fully initialized. | |
66c033b4 RD |
5219 | |
5220 | Normally you would derive from this class and implement an | |
5221 | ``OnInit`` method that creates a frame and then calls | |
5222 | ``self.SetTopWindow(frame)``. | |
5223 | ||
03e37cd5 | 5224 | :see: `wx.PySimpleApp` for a simpler app class that can be used |
1c0f361b | 5225 | directly. |
6c3b4aae | 5226 | """ |
66c033b4 | 5227 | |
d14a1e28 RD |
5228 | outputWindowClass = PyOnDemandOutputWindow |
5229 | ||
03e37cd5 RD |
5230 | def __init__(self, redirect=_defRedirect, filename=None, |
5231 | useBestVisual=False, clearSigInt=True): | |
66c033b4 RD |
5232 | """ |
5233 | Construct a ``wx.App`` object. | |
5234 | ||
03e37cd5 RD |
5235 | :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be |
5236 | redirected? Defaults to True on Windows and Mac, False | |
5237 | otherwise. If `filename` is None then output will be | |
5238 | redirected to a window that pops up as needed. (You can | |
5239 | control what kind of window is created for the output by | |
5240 | resetting the class variable ``outputWindowClass`` to a | |
5241 | class of your choosing.) | |
66c033b4 | 5242 | |
03e37cd5 RD |
5243 | :param filename: The name of a file to redirect output to, if |
5244 | redirect is True. | |
66c033b4 RD |
5245 | |
5246 | :param useBestVisual: Should the app try to use the best | |
03e37cd5 RD |
5247 | available visual provided by the system (only relevant on |
5248 | systems that have more than one visual.) This parameter | |
5249 | must be used instead of calling `SetUseBestVisual` later | |
5250 | on because it must be set before the underlying GUI | |
5251 | toolkit is initialized. | |
5252 | ||
5253 | :param clearSigInt: Should SIGINT be cleared? This allows the | |
5254 | app to terminate upon a Ctrl-C in the console like other | |
5255 | GUI apps will. | |
66c033b4 RD |
5256 | |
5257 | :note: You should override OnInit to do applicaition | |
5258 | initialization to ensure that the system, toolkit and | |
5259 | wxWidgets are fully initialized. | |
5260 | """ | |
d14a1e28 RD |
5261 | wx.PyApp.__init__(self) |
5262 | ||
5263 | if wx.Platform == "__WXMAC__": | |
5264 | try: | |
5265 | import MacOS | |
5266 | if not MacOS.WMAvailable(): | |
5267 | print """\ | |
5268 | This program needs access to the screen. Please run with 'pythonw', | |
5269 | not 'python', and only when you are logged in on the main display of | |
5270 | your Mac.""" | |
5271 | _sys.exit(1) | |
36cadbf7 RD |
5272 | except SystemExit: |
5273 | raise | |
d14a1e28 RD |
5274 | except: |
5275 | pass | |
5276 | ||
5277 | # This has to be done before OnInit | |
5278 | self.SetUseBestVisual(useBestVisual) | |
5279 | ||
5280 | # Set the default handler for SIGINT. This fixes a problem | |
5281 | # where if Ctrl-C is pressed in the console that started this | |
5282 | # app then it will not appear to do anything, (not even send | |
5283 | # KeyboardInterrupt???) but will later segfault on exit. By | |
5284 | # setting the default handler then the app will exit, as | |
5285 | # expected (depending on platform.) | |
03e37cd5 RD |
5286 | if clearSigInt: |
5287 | try: | |
5288 | import signal | |
5289 | signal.signal(signal.SIGINT, signal.SIG_DFL) | |
5290 | except: | |
5291 | pass | |
d14a1e28 RD |
5292 | |
5293 | # Save and redirect the stdio to a window? | |
5294 | self.stdioWin = None | |
5295 | self.saveStdio = (_sys.stdout, _sys.stderr) | |
5296 | if redirect: | |
5297 | self.RedirectStdio(filename) | |
5298 | ||
5299 | # This finishes the initialization of wxWindows and then calls | |
5300 | # the OnInit that should be present in the derived class | |
5301 | self._BootstrapApp() | |
5302 | ||
5303 | ||
5304 | def __del__(self): | |
5305 | try: | |
5306 | self.RestoreStdio() # Just in case the MainLoop was overridden | |
5307 | except: | |
5308 | pass | |
5309 | ||
5310 | ||
5311 | def SetTopWindow(self, frame): | |
1e0c8722 | 5312 | """Set the \"main\" top level window""" |
d14a1e28 RD |
5313 | if self.stdioWin: |
5314 | self.stdioWin.SetParent(frame) | |
5315 | wx.PyApp.SetTopWindow(self, frame) | |
5316 | ||
5317 | ||
5318 | def MainLoop(self): | |
1e0c8722 | 5319 | """Execute the main GUI event loop""" |
d14a1e28 RD |
5320 | wx.PyApp.MainLoop(self) |
5321 | self.RestoreStdio() | |
5322 | ||
5323 | ||
7409c0c6 | 5324 | def RedirectStdio(self, filename=None): |
1e0c8722 | 5325 | """Redirect sys.stdout and sys.stderr to a file or a popup window.""" |
d14a1e28 RD |
5326 | if filename: |
5327 | _sys.stdout = _sys.stderr = open(filename, 'a') | |
5328 | else: | |
5329 | self.stdioWin = self.outputWindowClass() | |
5330 | _sys.stdout = _sys.stderr = self.stdioWin | |
5331 | ||
5332 | ||
5333 | def RestoreStdio(self): | |
5334 | _sys.stdout, _sys.stderr = self.saveStdio | |
5335 | ||
5336 | ||
412d302d RD |
5337 | def SetOutputWindowAttributes(self, title=None, pos=None, size=None): |
5338 | """ | |
5339 | Set the title, position and/or size of the output window if | |
f5b96ee1 RD |
5340 | the stdio has been redirected. This should be called before |
5341 | any output would cause the output window to be created. | |
412d302d RD |
5342 | """ |
5343 | if self.stdioWin: | |
5344 | if title is not None: | |
5345 | self.stdioWin.title = title | |
5346 | if pos is not None: | |
5347 | self.stdioWin.pos = pos | |
5348 | if size is not None: | |
5349 | self.stdioWin.size = size | |
5350 | ||
5351 | ||
5352 | ||
d14a1e28 | 5353 | |
66c033b4 | 5354 | # change from wx.PyApp_XX to wx.App_XX |
54f9ee45 RD |
5355 | App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts |
5356 | App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId | |
5357 | App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId | |
5358 | App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId | |
5359 | App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName | |
5360 | App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts | |
5361 | App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId | |
5362 | App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId | |
5363 | App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId | |
5364 | App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName | |
5365 | App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version | |
d14a1e28 RD |
5366 | |
5367 | #---------------------------------------------------------------------------- | |
5368 | ||
5369 | class PySimpleApp(wx.App): | |
6c3b4aae RD |
5370 | """ |
5371 | A simple application class. You can just create one of these and | |
5372 | then then make your top level windows later, and not have to worry | |
66c033b4 RD |
5373 | about OnInit. For example:: |
5374 | ||
5375 | app = wx.PySimpleApp() | |
5376 | frame = wx.Frame(None, title='Hello World') | |
5377 | frame.Show() | |
5378 | app.MainLoop() | |
5379 | ||
5380 | :see: `wx.App` | |
5381 | """ | |
6c3b4aae | 5382 | |
03e37cd5 RD |
5383 | def __init__(self, redirect=False, filename=None, |
5384 | useBestVisual=False, clearSigInt=True): | |
66c033b4 RD |
5385 | """ |
5386 | :see: `wx.App.__init__` | |
5387 | """ | |
03e37cd5 | 5388 | wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt) |
6c3b4aae | 5389 | |
d14a1e28 | 5390 | def OnInit(self): |
d14a1e28 RD |
5391 | return True |
5392 | ||
5393 | ||
66c033b4 | 5394 | |
6c3b4aae | 5395 | # Is anybody using this one? |
d14a1e28 RD |
5396 | class PyWidgetTester(wx.App): |
5397 | def __init__(self, size = (250, 100)): | |
5398 | self.size = size | |
5399 | wx.App.__init__(self, 0) | |
5400 | ||
5401 | def OnInit(self): | |
196addbf | 5402 | self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size) |
d14a1e28 RD |
5403 | self.SetTopWindow(self.frame) |
5404 | return True | |
5405 | ||
66c033b4 RD |
5406 | def SetWidget(self, widgetClass, *args, **kwargs): |
5407 | w = widgetClass(self.frame, *args, **kwargs) | |
d14a1e28 RD |
5408 | self.frame.Show(True) |
5409 | ||
5410 | #---------------------------------------------------------------------------- | |
5411 | # DO NOT hold any other references to this object. This is how we | |
66c033b4 | 5412 | # know when to cleanup system resources that wxWidgets is holding. When |
d14a1e28 | 5413 | # the sys module is unloaded, the refcount on sys.__wxPythonCleanup |
66c033b4 | 5414 | # goes to zero and it calls the wx.App_CleanUp function. |
d14a1e28 RD |
5415 | |
5416 | class __wxPyCleanup: | |
5417 | def __init__(self): | |
54f9ee45 | 5418 | self.cleanup = _core_.App_CleanUp |
d14a1e28 RD |
5419 | def __del__(self): |
5420 | self.cleanup() | |
5421 | ||
5422 | _sys.__wxPythonCleanup = __wxPyCleanup() | |
5423 | ||
5424 | ## # another possible solution, but it gets called too early... | |
66c033b4 RD |
5425 | ## import atexit |
5426 | ## atexit.register(_core_.wxApp_CleanUp) | |
d14a1e28 RD |
5427 | |
5428 | ||
5429 | #---------------------------------------------------------------------------- | |
5430 | ||
5431 | #--------------------------------------------------------------------------- | |
2ef75293 RD |
5432 | |
5433 | class EventLoop(object): | |
5434 | def __repr__(self): | |
5435 | return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5436 | def __init__(self, *args, **kwargs): | |
5437 | """__init__(self) -> EventLoop""" | |
5438 | newobj = _core_.new_EventLoop(*args, **kwargs) | |
5439 | self.this = newobj.this | |
5440 | self.thisown = 1 | |
5441 | del newobj.thisown | |
5442 | def __del__(self, destroy=_core_.delete_EventLoop): | |
5443 | """__del__(self)""" | |
5444 | try: | |
5445 | if self.thisown: destroy(self) | |
5446 | except: pass | |
5447 | ||
5448 | def Run(*args, **kwargs): | |
5449 | """Run(self) -> int""" | |
5450 | return _core_.EventLoop_Run(*args, **kwargs) | |
5451 | ||
5452 | def Exit(*args, **kwargs): | |
5453 | """Exit(self, int rc=0)""" | |
5454 | return _core_.EventLoop_Exit(*args, **kwargs) | |
5455 | ||
5456 | def Pending(*args, **kwargs): | |
5457 | """Pending(self) -> bool""" | |
5458 | return _core_.EventLoop_Pending(*args, **kwargs) | |
5459 | ||
5460 | def Dispatch(*args, **kwargs): | |
5461 | """Dispatch(self) -> bool""" | |
5462 | return _core_.EventLoop_Dispatch(*args, **kwargs) | |
5463 | ||
5464 | def IsRunning(*args, **kwargs): | |
5465 | """IsRunning(self) -> bool""" | |
5466 | return _core_.EventLoop_IsRunning(*args, **kwargs) | |
5467 | ||
5468 | def GetActive(*args, **kwargs): | |
5469 | """GetActive() -> EventLoop""" | |
5470 | return _core_.EventLoop_GetActive(*args, **kwargs) | |
5471 | ||
5472 | GetActive = staticmethod(GetActive) | |
5473 | def SetActive(*args, **kwargs): | |
5474 | """SetActive(EventLoop loop)""" | |
5475 | return _core_.EventLoop_SetActive(*args, **kwargs) | |
5476 | ||
5477 | SetActive = staticmethod(SetActive) | |
5478 | ||
5479 | class EventLoopPtr(EventLoop): | |
5480 | def __init__(self, this): | |
5481 | self.this = this | |
5482 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5483 | self.__class__ = EventLoop | |
5484 | _core_.EventLoop_swigregister(EventLoopPtr) | |
5485 | ||
5486 | def EventLoop_GetActive(*args, **kwargs): | |
5487 | """EventLoop_GetActive() -> EventLoop""" | |
5488 | return _core_.EventLoop_GetActive(*args, **kwargs) | |
5489 | ||
5490 | def EventLoop_SetActive(*args, **kwargs): | |
5491 | """EventLoop_SetActive(EventLoop loop)""" | |
5492 | return _core_.EventLoop_SetActive(*args, **kwargs) | |
5493 | ||
5494 | #--------------------------------------------------------------------------- | |
d14a1e28 | 5495 | |
1e0c8722 | 5496 | class AcceleratorEntry(object): |
66c033b4 RD |
5497 | """ |
5498 | A class used to define items in an `wx.AcceleratorTable`. wxPython | |
5499 | programs can choose to use wx.AcceleratorEntry objects, but using a | |
5500 | list of 3-tuple of integers (flags, keyCode, cmdID) usually works just | |
41e2b43e | 5501 | as well. See `__init__` for of the tuple values. |
66c033b4 RD |
5502 | |
5503 | :see: `wx.AcceleratorTable` | |
5504 | """ | |
1e0c8722 RD |
5505 | def __repr__(self): |
5506 | return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5507 | def __init__(self, *args, **kwargs): | |
66c033b4 RD |
5508 | """ |
5509 | __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry | |
5510 | ||
5511 | Construct a wx.AcceleratorEntry. | |
66c033b4 | 5512 | """ |
54f9ee45 | 5513 | newobj = _core_.new_AcceleratorEntry(*args, **kwargs) |
1e0c8722 RD |
5514 | self.this = newobj.this |
5515 | self.thisown = 1 | |
5516 | del newobj.thisown | |
54f9ee45 | 5517 | def __del__(self, destroy=_core_.delete_AcceleratorEntry): |
a95a7133 | 5518 | """__del__(self)""" |
1e0c8722 RD |
5519 | try: |
5520 | if self.thisown: destroy(self) | |
5521 | except: pass | |
5522 | ||
5523 | def Set(*args, **kwargs): | |
66c033b4 RD |
5524 | """ |
5525 | Set(self, int flags, int keyCode, int cmd) | |
1e0c8722 | 5526 | |
66c033b4 RD |
5527 | (Re)set the attributes of a wx.AcceleratorEntry. |
5528 | :see `__init__` | |
5529 | """ | |
5530 | return _core_.AcceleratorEntry_Set(*args, **kwargs) | |
1e0c8722 RD |
5531 | |
5532 | def GetFlags(*args, **kwargs): | |
66c033b4 RD |
5533 | """ |
5534 | GetFlags(self) -> int | |
5535 | ||
5536 | Get the AcceleratorEntry's flags. | |
5537 | """ | |
54f9ee45 | 5538 | return _core_.AcceleratorEntry_GetFlags(*args, **kwargs) |
1e0c8722 RD |
5539 | |
5540 | def GetKeyCode(*args, **kwargs): | |
66c033b4 RD |
5541 | """ |
5542 | GetKeyCode(self) -> int | |
5543 | ||
5544 | Get the AcceleratorEntry's keycode. | |
5545 | """ | |
54f9ee45 | 5546 | return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs) |
1e0c8722 RD |
5547 | |
5548 | def GetCommand(*args, **kwargs): | |
66c033b4 RD |
5549 | """ |
5550 | GetCommand(self) -> int | |
5551 | ||
5552 | Get the AcceleratorEntry's command ID. | |
5553 | """ | |
54f9ee45 | 5554 | return _core_.AcceleratorEntry_GetCommand(*args, **kwargs) |
1e0c8722 RD |
5555 | |
5556 | ||
5557 | class AcceleratorEntryPtr(AcceleratorEntry): | |
5558 | def __init__(self, this): | |
5559 | self.this = this | |
5560 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5561 | self.__class__ = AcceleratorEntry | |
54f9ee45 | 5562 | _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr) |
1e0c8722 RD |
5563 | |
5564 | class AcceleratorTable(Object): | |
66c033b4 RD |
5565 | """ |
5566 | An accelerator table allows the application to specify a table of | |
5567 | keyboard shortcuts for menus or other commands. On Windows, menu or | |
5568 | button commands are supported; on GTK, only menu commands are | |
5569 | supported. | |
66c033b4 | 5570 | """ |
1e0c8722 RD |
5571 | def __repr__(self): |
5572 | return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5573 | def __init__(self, *args, **kwargs): | |
0df68c9f RD |
5574 | """ |
5575 | __init__(entries) -> AcceleratorTable | |
1e0c8722 | 5576 | |
66c033b4 RD |
5577 | Construct an AcceleratorTable from a list of `wx.AcceleratorEntry` |
5578 | items or or of 3-tuples (flags, keyCode, cmdID) | |
5579 | ||
5580 | :see: `wx.AcceleratorEntry` | |
0df68c9f | 5581 | """ |
54f9ee45 | 5582 | newobj = _core_.new_AcceleratorTable(*args, **kwargs) |
1e0c8722 RD |
5583 | self.this = newobj.this |
5584 | self.thisown = 1 | |
5585 | del newobj.thisown | |
54f9ee45 | 5586 | def __del__(self, destroy=_core_.delete_AcceleratorTable): |
a95a7133 | 5587 | """__del__(self)""" |
1e0c8722 RD |
5588 | try: |
5589 | if self.thisown: destroy(self) | |
5590 | except: pass | |
5591 | ||
5592 | def Ok(*args, **kwargs): | |
a95a7133 | 5593 | """Ok(self) -> bool""" |
54f9ee45 | 5594 | return _core_.AcceleratorTable_Ok(*args, **kwargs) |
1e0c8722 RD |
5595 | |
5596 | ||
5597 | class AcceleratorTablePtr(AcceleratorTable): | |
5598 | def __init__(self, this): | |
5599 | self.this = this | |
5600 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5601 | self.__class__ = AcceleratorTable | |
54f9ee45 | 5602 | _core_.AcceleratorTable_swigregister(AcceleratorTablePtr) |
1e0c8722 RD |
5603 | |
5604 | ||
5605 | def GetAccelFromString(*args, **kwargs): | |
196addbf | 5606 | """GetAccelFromString(String label) -> AcceleratorEntry""" |
54f9ee45 | 5607 | return _core_.GetAccelFromString(*args, **kwargs) |
1e0c8722 RD |
5608 | #--------------------------------------------------------------------------- |
5609 | ||
74a57fcd RD |
5610 | class VisualAttributes(object): |
5611 | """struct containing all the visual attributes of a control""" | |
5612 | def __repr__(self): | |
5613 | return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5614 | def __init__(self, *args, **kwargs): | |
5615 | """ | |
a95a7133 | 5616 | __init__(self) -> VisualAttributes |
74a57fcd RD |
5617 | |
5618 | struct containing all the visual attributes of a control | |
5619 | """ | |
54f9ee45 | 5620 | newobj = _core_.new_VisualAttributes(*args, **kwargs) |
74a57fcd RD |
5621 | self.this = newobj.this |
5622 | self.thisown = 1 | |
5623 | del newobj.thisown | |
54f9ee45 | 5624 | def __del__(self, destroy=_core_.delete_VisualAttributes): |
a95a7133 | 5625 | """__del__(self)""" |
74a57fcd RD |
5626 | try: |
5627 | if self.thisown: destroy(self) | |
5628 | except: pass | |
5629 | ||
54f9ee45 RD |
5630 | font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set) |
5631 | colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set) | |
5632 | colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set) | |
74a57fcd RD |
5633 | |
5634 | class VisualAttributesPtr(VisualAttributes): | |
5635 | def __init__(self, this): | |
5636 | self.this = this | |
5637 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5638 | self.__class__ = VisualAttributes | |
54f9ee45 | 5639 | _core_.VisualAttributes_swigregister(VisualAttributesPtr) |
74a57fcd RD |
5640 | NullAcceleratorTable = cvar.NullAcceleratorTable |
5641 | PanelNameStr = cvar.PanelNameStr | |
5642 | ||
54f9ee45 RD |
5643 | WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL |
5644 | WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL | |
5645 | WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI | |
5646 | WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE | |
5647 | WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX | |
d14a1e28 | 5648 | class Window(EvtHandler): |
15afbcd0 RD |
5649 | """ |
5650 | wx.Window is the base class for all windows and represents any visible | |
5651 | object on the screen. All controls, top level windows and so on are | |
5652 | wx.Windows. Sizers and device contexts are not however, as they don't | |
5653 | appear on screen themselves. | |
5654 | ||
5655 | """ | |
e811c8ce RD |
5656 | def __repr__(self): |
5657 | return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 5658 | def __init__(self, *args, **kwargs): |
0df68c9f | 5659 | """ |
a95a7133 | 5660 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
74a57fcd | 5661 | Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window |
15afbcd0 RD |
5662 | |
5663 | Construct and show a generic Window. | |
0df68c9f | 5664 | """ |
54f9ee45 | 5665 | newobj = _core_.new_Window(*args, **kwargs) |
d14a1e28 RD |
5666 | self.this = newobj.this |
5667 | self.thisown = 1 | |
5668 | del newobj.thisown | |
5669 | self._setOORInfo(self) | |
d14a1e28 | 5670 | |
e811c8ce | 5671 | def Create(*args, **kwargs): |
0df68c9f | 5672 | """ |
a95a7133 | 5673 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
74a57fcd | 5674 | Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool |
15afbcd0 RD |
5675 | |
5676 | Create the GUI part of the Window for 2-phase creation mode. | |
0df68c9f | 5677 | """ |
54f9ee45 | 5678 | return _core_.Window_Create(*args, **kwargs) |
d14a1e28 | 5679 | |
e811c8ce | 5680 | def Close(*args, **kwargs): |
15afbcd0 | 5681 | """ |
a95a7133 | 5682 | Close(self, bool force=False) -> bool |
15afbcd0 RD |
5683 | |
5684 | This function simply generates a EVT_CLOSE event whose handler usually | |
5685 | tries to close the window. It doesn't close the window itself, | |
5686 | however. If force is False (the default) then the window's close | |
5687 | handler will be allowed to veto the destruction of the window. | |
15afbcd0 | 5688 | """ |
54f9ee45 | 5689 | return _core_.Window_Close(*args, **kwargs) |
d14a1e28 | 5690 | |
e811c8ce | 5691 | def Destroy(*args, **kwargs): |
0df68c9f | 5692 | """ |
a95a7133 | 5693 | Destroy(self) -> bool |
d14a1e28 | 5694 | |
15afbcd0 RD |
5695 | Destroys the window safely. Frames and dialogs are not destroyed |
5696 | immediately when this function is called -- they are added to a list | |
5697 | of windows to be deleted on idle time, when all the window's events | |
5698 | have been processed. This prevents problems with events being sent to | |
5699 | non-existent windows. | |
5700 | ||
5701 | Returns True if the window has either been successfully deleted, or it | |
5702 | has been added to the list of windows pending real deletion. | |
0df68c9f | 5703 | """ |
54f9ee45 | 5704 | return _core_.Window_Destroy(*args, **kwargs) |
d14a1e28 | 5705 | |
e811c8ce | 5706 | def DestroyChildren(*args, **kwargs): |
15afbcd0 | 5707 | """ |
a95a7133 | 5708 | DestroyChildren(self) -> bool |
15afbcd0 | 5709 | |
41e2b43e RD |
5710 | Destroys all children of a window. Called automatically by the |
5711 | destructor. | |
15afbcd0 | 5712 | """ |
54f9ee45 | 5713 | return _core_.Window_DestroyChildren(*args, **kwargs) |
d14a1e28 | 5714 | |
e811c8ce | 5715 | def IsBeingDeleted(*args, **kwargs): |
15afbcd0 | 5716 | """ |
a95a7133 | 5717 | IsBeingDeleted(self) -> bool |
15afbcd0 RD |
5718 | |
5719 | Is the window in the process of being deleted? | |
5720 | """ | |
54f9ee45 | 5721 | return _core_.Window_IsBeingDeleted(*args, **kwargs) |
d14a1e28 | 5722 | |
e811c8ce | 5723 | def SetTitle(*args, **kwargs): |
15afbcd0 | 5724 | """ |
a95a7133 | 5725 | SetTitle(self, String title) |
15afbcd0 RD |
5726 | |
5727 | Sets the window's title. Applicable only to frames and dialogs. | |
5728 | """ | |
54f9ee45 | 5729 | return _core_.Window_SetTitle(*args, **kwargs) |
d14a1e28 | 5730 | |
e811c8ce | 5731 | def GetTitle(*args, **kwargs): |
15afbcd0 | 5732 | """ |
a95a7133 | 5733 | GetTitle(self) -> String |
15afbcd0 RD |
5734 | |
5735 | Gets the window's title. Applicable only to frames and dialogs. | |
5736 | """ | |
54f9ee45 | 5737 | return _core_.Window_GetTitle(*args, **kwargs) |
d14a1e28 | 5738 | |
e811c8ce | 5739 | def SetLabel(*args, **kwargs): |
15afbcd0 | 5740 | """ |
a95a7133 | 5741 | SetLabel(self, String label) |
15afbcd0 RD |
5742 | |
5743 | Set the text which the window shows in its label if applicable. | |
5744 | """ | |
54f9ee45 | 5745 | return _core_.Window_SetLabel(*args, **kwargs) |
d14a1e28 | 5746 | |
e811c8ce | 5747 | def GetLabel(*args, **kwargs): |
15afbcd0 | 5748 | """ |
a95a7133 | 5749 | GetLabel(self) -> String |
15afbcd0 | 5750 | |
41e2b43e RD |
5751 | Generic way of getting a label from any window, for identification |
5752 | purposes. The interpretation of this function differs from class to | |
5753 | class. For frames and dialogs, the value returned is the title. For | |
5754 | buttons or static text controls, it is the button text. This function | |
5755 | can be useful for meta-programs such as testing tools or special-needs | |
5756 | access programs)which need to identify windows by name. | |
15afbcd0 | 5757 | """ |
54f9ee45 | 5758 | return _core_.Window_GetLabel(*args, **kwargs) |
d14a1e28 | 5759 | |
e811c8ce | 5760 | def SetName(*args, **kwargs): |
15afbcd0 | 5761 | """ |
a95a7133 | 5762 | SetName(self, String name) |
15afbcd0 | 5763 | |
41e2b43e RD |
5764 | Sets the window's name. The window name is used for ressource setting |
5765 | in X, it is not the same as the window title/label | |
15afbcd0 | 5766 | """ |
54f9ee45 | 5767 | return _core_.Window_SetName(*args, **kwargs) |
d14a1e28 | 5768 | |
e811c8ce | 5769 | def GetName(*args, **kwargs): |
15afbcd0 | 5770 | """ |
a95a7133 | 5771 | GetName(self) -> String |
15afbcd0 | 5772 | |
41e2b43e RD |
5773 | Returns the windows name. This name is not guaranteed to be unique; |
5774 | it is up to the programmer to supply an appropriate name in the window | |
5775 | constructor or via wx.Window.SetName. | |
15afbcd0 | 5776 | """ |
54f9ee45 | 5777 | return _core_.Window_GetName(*args, **kwargs) |
d14a1e28 | 5778 | |
4276dc52 RD |
5779 | def SetWindowVariant(*args, **kwargs): |
5780 | """ | |
a95a7133 | 5781 | SetWindowVariant(self, int variant) |
4276dc52 | 5782 | |
41e2b43e RD |
5783 | Sets the variant of the window/font size to use for this window, if |
5784 | the platform supports variants, for example, wxMac. | |
4276dc52 | 5785 | """ |
54f9ee45 | 5786 | return _core_.Window_SetWindowVariant(*args, **kwargs) |
4276dc52 RD |
5787 | |
5788 | def GetWindowVariant(*args, **kwargs): | |
a95a7133 | 5789 | """GetWindowVariant(self) -> int""" |
54f9ee45 | 5790 | return _core_.Window_GetWindowVariant(*args, **kwargs) |
4276dc52 | 5791 | |
e811c8ce | 5792 | def SetId(*args, **kwargs): |
15afbcd0 | 5793 | """ |
a95a7133 | 5794 | SetId(self, int winid) |
15afbcd0 RD |
5795 | |
5796 | Sets the identifier of the window. Each window has an integer | |
5797 | identifier. If the application has not provided one, an identifier | |
5798 | will be generated. Normally, the identifier should be provided on | |
5799 | creation and should not be modified subsequently. | |
5800 | """ | |
54f9ee45 | 5801 | return _core_.Window_SetId(*args, **kwargs) |
d14a1e28 | 5802 | |
e811c8ce | 5803 | def GetId(*args, **kwargs): |
15afbcd0 | 5804 | """ |
a95a7133 | 5805 | GetId(self) -> int |
15afbcd0 RD |
5806 | |
5807 | Returns the identifier of the window. Each window has an integer | |
5808 | identifier. If the application has not provided one (or the default Id | |
5809 | -1 is used) then an unique identifier with a negative value will be | |
5810 | generated. | |
5811 | """ | |
54f9ee45 | 5812 | return _core_.Window_GetId(*args, **kwargs) |
d14a1e28 | 5813 | |
e811c8ce | 5814 | def NewControlId(*args, **kwargs): |
15afbcd0 | 5815 | """ |
66c033b4 | 5816 | NewControlId() -> int |
15afbcd0 RD |
5817 | |
5818 | Generate a control id for the controls which were not given one. | |
5819 | """ | |
54f9ee45 | 5820 | return _core_.Window_NewControlId(*args, **kwargs) |
d14a1e28 | 5821 | |
e811c8ce RD |
5822 | NewControlId = staticmethod(NewControlId) |
5823 | def NextControlId(*args, **kwargs): | |
15afbcd0 | 5824 | """ |
66c033b4 | 5825 | NextControlId(int winid) -> int |
15afbcd0 RD |
5826 | |
5827 | Get the id of the control following the one with the given | |
41e2b43e | 5828 | autogenerated) id |
15afbcd0 | 5829 | """ |
54f9ee45 | 5830 | return _core_.Window_NextControlId(*args, **kwargs) |
d14a1e28 | 5831 | |
e811c8ce RD |
5832 | NextControlId = staticmethod(NextControlId) |
5833 | def PrevControlId(*args, **kwargs): | |
15afbcd0 | 5834 | """ |
66c033b4 | 5835 | PrevControlId(int winid) -> int |
15afbcd0 RD |
5836 | |
5837 | Get the id of the control preceding the one with the given | |
41e2b43e | 5838 | autogenerated) id |
15afbcd0 | 5839 | """ |
54f9ee45 | 5840 | return _core_.Window_PrevControlId(*args, **kwargs) |
d14a1e28 | 5841 | |
e811c8ce RD |
5842 | PrevControlId = staticmethod(PrevControlId) |
5843 | def SetSize(*args, **kwargs): | |
15afbcd0 | 5844 | """ |
a95a7133 | 5845 | SetSize(self, Size size) |
15afbcd0 RD |
5846 | |
5847 | Sets the size of the window in pixels. | |
5848 | """ | |
54f9ee45 | 5849 | return _core_.Window_SetSize(*args, **kwargs) |
d14a1e28 | 5850 | |
e811c8ce | 5851 | def SetDimensions(*args, **kwargs): |
15afbcd0 | 5852 | """ |
a95a7133 | 5853 | SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) |
15afbcd0 RD |
5854 | |
5855 | Sets the position and size of the window in pixels. The sizeFlags | |
5856 | parameter indicates the interpretation of the other params if they are | |
5857 | -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default | |
5858 | shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be | |
5859 | used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow | |
5860 | dimensions of -1 and less to be interpreted as real dimensions, not | |
5861 | default values. | |
5862 | """ | |
54f9ee45 | 5863 | return _core_.Window_SetDimensions(*args, **kwargs) |
d14a1e28 | 5864 | |
e811c8ce | 5865 | def SetRect(*args, **kwargs): |
15afbcd0 | 5866 | """ |
a95a7133 | 5867 | SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO) |
15afbcd0 RD |
5868 | |
5869 | Sets the position and size of the window in pixels using a wx.Rect. | |
5870 | """ | |
54f9ee45 | 5871 | return _core_.Window_SetRect(*args, **kwargs) |
d14a1e28 | 5872 | |
e811c8ce | 5873 | def SetSizeWH(*args, **kwargs): |
15afbcd0 | 5874 | """ |
a95a7133 | 5875 | SetSizeWH(self, int width, int height) |
15afbcd0 RD |
5876 | |
5877 | Sets the size of the window in pixels. | |
5878 | """ | |
54f9ee45 | 5879 | return _core_.Window_SetSizeWH(*args, **kwargs) |
d14a1e28 | 5880 | |
e811c8ce | 5881 | def Move(*args, **kwargs): |
15afbcd0 | 5882 | """ |
a95a7133 | 5883 | Move(self, Point pt, int flags=SIZE_USE_EXISTING) |
15afbcd0 RD |
5884 | |
5885 | Moves the window to the given position. | |
5886 | """ | |
54f9ee45 | 5887 | return _core_.Window_Move(*args, **kwargs) |
d14a1e28 | 5888 | |
e811c8ce RD |
5889 | SetPosition = Move |
5890 | def MoveXY(*args, **kwargs): | |
15afbcd0 | 5891 | """ |
a95a7133 | 5892 | MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING) |
15afbcd0 RD |
5893 | |
5894 | Moves the window to the given position. | |
5895 | """ | |
54f9ee45 | 5896 | return _core_.Window_MoveXY(*args, **kwargs) |
e811c8ce | 5897 | |
f8167d6e RD |
5898 | def SetBestFittingSize(*args, **kwargs): |
5899 | """ | |
5900 | SetBestFittingSize(self, Size size=DefaultSize) | |
5901 | ||
5902 | A 'Smart' SetSize that will fill in default size components with the | |
5903 | window's *best size* values. Also set's the minsize for use with sizers. | |
5904 | """ | |
5905 | return _core_.Window_SetBestFittingSize(*args, **kwargs) | |
5906 | ||
e811c8ce | 5907 | def Raise(*args, **kwargs): |
15afbcd0 | 5908 | """ |
a95a7133 | 5909 | Raise(self) |
15afbcd0 RD |
5910 | |
5911 | Raises the window to the top of the window hierarchy if it is a | |
5912 | managed window (dialog or frame). | |
5913 | """ | |
54f9ee45 | 5914 | return _core_.Window_Raise(*args, **kwargs) |
e811c8ce RD |
5915 | |
5916 | def Lower(*args, **kwargs): | |
15afbcd0 | 5917 | """ |
a95a7133 | 5918 | Lower(self) |
15afbcd0 RD |
5919 | |
5920 | Lowers the window to the bottom of the window hierarchy if it is a | |
5921 | managed window (dialog or frame). | |
5922 | """ | |
54f9ee45 | 5923 | return _core_.Window_Lower(*args, **kwargs) |
e811c8ce RD |
5924 | |
5925 | def SetClientSize(*args, **kwargs): | |
15afbcd0 | 5926 | """ |
a95a7133 | 5927 | SetClientSize(self, Size size) |
15afbcd0 RD |
5928 | |
5929 | This sets the size of the window client area in pixels. Using this | |
5930 | function to size a window tends to be more device-independent than | |
5931 | wx.Window.SetSize, since the application need not worry about what | |
5932 | dimensions the border or title bar have when trying to fit the window | |
5933 | around panel items, for example. | |
5934 | """ | |
54f9ee45 | 5935 | return _core_.Window_SetClientSize(*args, **kwargs) |
e811c8ce RD |
5936 | |
5937 | def SetClientSizeWH(*args, **kwargs): | |
15afbcd0 | 5938 | """ |
a95a7133 | 5939 | SetClientSizeWH(self, int width, int height) |
15afbcd0 RD |
5940 | |
5941 | This sets the size of the window client area in pixels. Using this | |
5942 | function to size a window tends to be more device-independent than | |
5943 | wx.Window.SetSize, since the application need not worry about what | |
5944 | dimensions the border or title bar have when trying to fit the window | |
5945 | around panel items, for example. | |
5946 | """ | |
54f9ee45 | 5947 | return _core_.Window_SetClientSizeWH(*args, **kwargs) |
e811c8ce RD |
5948 | |
5949 | def SetClientRect(*args, **kwargs): | |
15afbcd0 | 5950 | """ |
a95a7133 | 5951 | SetClientRect(self, Rect rect) |
15afbcd0 RD |
5952 | |
5953 | This sets the size of the window client area in pixels. Using this | |
5954 | function to size a window tends to be more device-independent than | |
5955 | wx.Window.SetSize, since the application need not worry about what | |
5956 | dimensions the border or title bar have when trying to fit the window | |
5957 | around panel items, for example. | |
5958 | """ | |
54f9ee45 | 5959 | return _core_.Window_SetClientRect(*args, **kwargs) |
e811c8ce RD |
5960 | |
5961 | def GetPosition(*args, **kwargs): | |
0df68c9f | 5962 | """ |
a95a7133 | 5963 | GetPosition(self) -> Point |
e811c8ce | 5964 | |
0df68c9f RD |
5965 | Get the window's position. |
5966 | """ | |
54f9ee45 | 5967 | return _core_.Window_GetPosition(*args, **kwargs) |
e811c8ce RD |
5968 | |
5969 | def GetPositionTuple(*args, **kwargs): | |
0df68c9f RD |
5970 | """ |
5971 | GetPositionTuple() -> (x,y) | |
e811c8ce | 5972 | |
0df68c9f RD |
5973 | Get the window's position. |
5974 | """ | |
54f9ee45 | 5975 | return _core_.Window_GetPositionTuple(*args, **kwargs) |
e811c8ce RD |
5976 | |
5977 | def GetSize(*args, **kwargs): | |
0df68c9f | 5978 | """ |
a95a7133 | 5979 | GetSize(self) -> Size |
e811c8ce | 5980 | |
0df68c9f RD |
5981 | Get the window size. |
5982 | """ | |
54f9ee45 | 5983 | return _core_.Window_GetSize(*args, **kwargs) |
e811c8ce RD |
5984 | |
5985 | def GetSizeTuple(*args, **kwargs): | |
0df68c9f RD |
5986 | """ |
5987 | GetSizeTuple() -> (width, height) | |
e811c8ce | 5988 | |
0df68c9f RD |
5989 | Get the window size. |
5990 | """ | |
54f9ee45 | 5991 | return _core_.Window_GetSizeTuple(*args, **kwargs) |
e811c8ce RD |
5992 | |
5993 | def GetRect(*args, **kwargs): | |
15afbcd0 | 5994 | """ |
a95a7133 | 5995 | GetRect(self) -> Rect |
15afbcd0 RD |
5996 | |
5997 | Returns the size and position of the window as a wx.Rect object. | |
5998 | """ | |
54f9ee45 | 5999 | return _core_.Window_GetRect(*args, **kwargs) |
e811c8ce RD |
6000 | |
6001 | def GetClientSize(*args, **kwargs): | |
0df68c9f | 6002 | """ |
a95a7133 | 6003 | GetClientSize(self) -> Size |
e811c8ce | 6004 | |
15afbcd0 RD |
6005 | This gets the size of the window's 'client area' in pixels. The client |
6006 | area is the area which may be drawn on by the programmer, excluding | |
6007 | title bar, border, scrollbars, etc. | |
0df68c9f | 6008 | """ |
54f9ee45 | 6009 | return _core_.Window_GetClientSize(*args, **kwargs) |
e811c8ce RD |
6010 | |
6011 | def GetClientSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6012 | """ |
6013 | GetClientSizeTuple() -> (width, height) | |
e811c8ce | 6014 | |
15afbcd0 RD |
6015 | This gets the size of the window's 'client area' in pixels. The client |
6016 | area is the area which may be drawn on by the programmer, excluding | |
6017 | title bar, border, scrollbars, etc. | |
0df68c9f | 6018 | """ |
54f9ee45 | 6019 | return _core_.Window_GetClientSizeTuple(*args, **kwargs) |
e811c8ce RD |
6020 | |
6021 | def GetClientAreaOrigin(*args, **kwargs): | |
15afbcd0 | 6022 | """ |
a95a7133 | 6023 | GetClientAreaOrigin(self) -> Point |
15afbcd0 RD |
6024 | |
6025 | Get the origin of the client area of the window relative to the | |
6026 | window's top left corner (the client area may be shifted because of | |
6027 | the borders, scrollbars, other decorations...) | |
6028 | """ | |
54f9ee45 | 6029 | return _core_.Window_GetClientAreaOrigin(*args, **kwargs) |
e811c8ce RD |
6030 | |
6031 | def GetClientRect(*args, **kwargs): | |
15afbcd0 | 6032 | """ |
a95a7133 | 6033 | GetClientRect(self) -> Rect |
15afbcd0 | 6034 | |
61863841 | 6035 | Get the client area position and size as a `wx.Rect` object. |
15afbcd0 | 6036 | """ |
54f9ee45 | 6037 | return _core_.Window_GetClientRect(*args, **kwargs) |
e811c8ce RD |
6038 | |
6039 | def GetBestSize(*args, **kwargs): | |
0df68c9f | 6040 | """ |
a95a7133 | 6041 | GetBestSize(self) -> Size |
e811c8ce | 6042 | |
248ed943 | 6043 | This function returns the best acceptable minimal size for the |
41e2b43e RD |
6044 | window, if applicable. For example, for a static text control, it will |
6045 | be the minimal size such that the control label is not truncated. For | |
6046 | windows containing subwindows (suzh aswx.Panel), the size returned by | |
6047 | this function will be the same as the size the window would have had | |
6048 | after calling Fit. | |
0df68c9f | 6049 | """ |
54f9ee45 | 6050 | return _core_.Window_GetBestSize(*args, **kwargs) |
e811c8ce RD |
6051 | |
6052 | def GetBestSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6053 | """ |
6054 | GetBestSizeTuple() -> (width, height) | |
e811c8ce | 6055 | |
248ed943 | 6056 | This function returns the best acceptable minimal size for the |
41e2b43e RD |
6057 | window, if applicable. For example, for a static text control, it will |
6058 | be the minimal size such that the control label is not truncated. For | |
6059 | windows containing subwindows (suzh aswx.Panel), the size returned by | |
6060 | this function will be the same as the size the window would have had | |
6061 | after calling Fit. | |
0df68c9f | 6062 | """ |
54f9ee45 | 6063 | return _core_.Window_GetBestSizeTuple(*args, **kwargs) |
e811c8ce | 6064 | |
dfbb5885 RD |
6065 | def InvalidateBestSize(*args, **kwargs): |
6066 | """ | |
6067 | InvalidateBestSize(self) | |
6068 | ||
6069 | Reset the cached best size value so it will be recalculated the next | |
6070 | time it is needed. | |
6071 | """ | |
6072 | return _core_.Window_InvalidateBestSize(*args, **kwargs) | |
6073 | ||
6074 | def GetBestFittingSize(*args, **kwargs): | |
6075 | """ | |
6076 | GetBestFittingSize(self) -> Size | |
6077 | ||
6078 | This function will merge the window's best size into the window's | |
6079 | minimum size, giving priority to the min size components, and returns | |
6080 | the results. | |
6081 | ||
6082 | """ | |
6083 | return _core_.Window_GetBestFittingSize(*args, **kwargs) | |
6084 | ||
e811c8ce | 6085 | def GetAdjustedBestSize(*args, **kwargs): |
15afbcd0 | 6086 | """ |
a95a7133 | 6087 | GetAdjustedBestSize(self) -> Size |
15afbcd0 RD |
6088 | |
6089 | This method is similar to GetBestSize, except in one | |
6090 | thing. GetBestSize should return the minimum untruncated size of the | |
6091 | window, while this method will return the largest of BestSize and any | |
6092 | user specified minimum size. ie. it is the minimum size the window | |
6093 | should currently be drawn at, not the minimal size it can possibly | |
6094 | tolerate. | |
6095 | """ | |
54f9ee45 | 6096 | return _core_.Window_GetAdjustedBestSize(*args, **kwargs) |
e811c8ce RD |
6097 | |
6098 | def Center(*args, **kwargs): | |
15afbcd0 | 6099 | """ |
a95a7133 | 6100 | Center(self, int direction=BOTH) |
15afbcd0 RD |
6101 | |
6102 | Centers the window. The parameter specifies the direction for | |
6103 | cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may | |
6104 | also include wx.CENTER_ON_SCREEN flag if you want to center the window | |
6105 | on the entire screen and not on its parent window. If it is a | |
6106 | top-level window and has no parent then it will always be centered | |
6107 | relative to the screen. | |
6108 | """ | |
54f9ee45 | 6109 | return _core_.Window_Center(*args, **kwargs) |
e811c8ce RD |
6110 | |
6111 | Centre = Center | |
6112 | def CenterOnScreen(*args, **kwargs): | |
15afbcd0 | 6113 | """ |
a95a7133 | 6114 | CenterOnScreen(self, int dir=BOTH) |
15afbcd0 RD |
6115 | |
6116 | Center on screen (only works for top level windows) | |
6117 | """ | |
54f9ee45 | 6118 | return _core_.Window_CenterOnScreen(*args, **kwargs) |
e811c8ce RD |
6119 | |
6120 | CentreOnScreen = CenterOnScreen | |
6121 | def CenterOnParent(*args, **kwargs): | |
15afbcd0 | 6122 | """ |
a95a7133 | 6123 | CenterOnParent(self, int dir=BOTH) |
15afbcd0 RD |
6124 | |
6125 | Center with respect to the the parent window | |
6126 | """ | |
54f9ee45 | 6127 | return _core_.Window_CenterOnParent(*args, **kwargs) |
e811c8ce RD |
6128 | |
6129 | CentreOnParent = CenterOnParent | |
6130 | def Fit(*args, **kwargs): | |
15afbcd0 | 6131 | """ |
a95a7133 | 6132 | Fit(self) |
15afbcd0 RD |
6133 | |
6134 | Sizes the window so that it fits around its subwindows. This function | |
6135 | won't do anything if there are no subwindows and will only really work | |
6136 | correctly if sizers are used for the subwindows layout. Also, if the | |
6137 | window has exactly one subwindow it is better (faster and the result | |
6138 | is more precise as Fit adds some margin to account for fuzziness of | |
6139 | its calculations) to call window.SetClientSize(child.GetSize()) | |
6140 | instead of calling Fit. | |
6141 | """ | |
54f9ee45 | 6142 | return _core_.Window_Fit(*args, **kwargs) |
e811c8ce RD |
6143 | |
6144 | def FitInside(*args, **kwargs): | |
15afbcd0 | 6145 | """ |
a95a7133 | 6146 | FitInside(self) |
15afbcd0 RD |
6147 | |
6148 | Similar to Fit, but sizes the interior (virtual) size of a | |
6149 | window. Mainly useful with scrolled windows to reset scrollbars after | |
6150 | sizing changes that do not trigger a size event, and/or scrolled | |
6151 | windows without an interior sizer. This function similarly won't do | |
6152 | anything if there are no subwindows. | |
6153 | """ | |
54f9ee45 | 6154 | return _core_.Window_FitInside(*args, **kwargs) |
e811c8ce | 6155 | |
f16ab95d | 6156 | def SetSizeHints(*args, **kwargs): |
0df68c9f | 6157 | """ |
a95a7133 | 6158 | SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, |
0df68c9f | 6159 | int incH=-1) |
15afbcd0 RD |
6160 | |
6161 | Allows specification of minimum and maximum window sizes, and window | |
6162 | size increments. If a pair of values is not set (or set to -1), the | |
6163 | default values will be used. If this function is called, the user | |
908b74cd RD |
6164 | will not be able to size the window outside the given bounds (if it is |
6165 | a top-level window.) Sizers will also inspect the minimum window size | |
6166 | and will use that value if set when calculating layout. | |
6167 | ||
6168 | The resizing increments are only significant under Motif or Xt. | |
0df68c9f | 6169 | """ |
f16ab95d | 6170 | return _core_.Window_SetSizeHints(*args, **kwargs) |
e811c8ce | 6171 | |
f16ab95d RD |
6172 | def SetSizeHintsSz(*args, **kwargs): |
6173 | """ | |
6174 | SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) | |
6175 | ||
6176 | Allows specification of minimum and maximum window sizes, and window | |
6177 | size increments. If a pair of values is not set (or set to -1), the | |
6178 | default values will be used. If this function is called, the user | |
6179 | will not be able to size the window outside the given bounds (if it is | |
6180 | a top-level window.) Sizers will also inspect the minimum window size | |
6181 | and will use that value if set when calculating layout. | |
6182 | ||
6183 | The resizing increments are only significant under Motif or Xt. | |
6184 | """ | |
6185 | return _core_.Window_SetSizeHintsSz(*args, **kwargs) | |
6186 | ||
6187 | def SetVirtualSizeHints(*args, **kwargs): | |
15afbcd0 | 6188 | """ |
908b74cd | 6189 | SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) |
15afbcd0 RD |
6190 | |
6191 | Allows specification of minimum and maximum virtual window sizes. If a | |
6192 | pair of values is not set (or set to -1), the default values will be | |
6193 | used. If this function is called, the user will not be able to size | |
6194 | the virtual area of the window outside the given bounds. | |
6195 | """ | |
f16ab95d RD |
6196 | return _core_.Window_SetVirtualSizeHints(*args, **kwargs) |
6197 | ||
6198 | def SetVirtualSizeHintsSz(*args, **kwargs): | |
6199 | """ | |
6200 | SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) | |
6201 | ||
6202 | Allows specification of minimum and maximum virtual window sizes. If a | |
6203 | pair of values is not set (or set to -1), the default values will be | |
6204 | used. If this function is called, the user will not be able to size | |
6205 | the virtual area of the window outside the given bounds. | |
6206 | """ | |
6207 | return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs) | |
e811c8ce | 6208 | |
908b74cd RD |
6209 | def GetMaxSize(*args, **kwargs): |
6210 | """GetMaxSize(self) -> Size""" | |
6211 | return _core_.Window_GetMaxSize(*args, **kwargs) | |
6212 | ||
6213 | def GetMinSize(*args, **kwargs): | |
6214 | """GetMinSize(self) -> Size""" | |
6215 | return _core_.Window_GetMinSize(*args, **kwargs) | |
6216 | ||
6217 | def SetMinSize(*args, **kwargs): | |
6218 | """ | |
6219 | SetMinSize(self, Size minSize) | |
6220 | ||
6221 | A more convenient method than `SetSizeHints` for setting just the | |
6222 | min size. | |
6223 | """ | |
6224 | return _core_.Window_SetMinSize(*args, **kwargs) | |
6225 | ||
6226 | def SetMaxSize(*args, **kwargs): | |
6227 | """ | |
6228 | SetMaxSize(self, Size maxSize) | |
6229 | ||
6230 | A more convenient method than `SetSizeHints` for setting just the | |
6231 | max size. | |
6232 | """ | |
6233 | return _core_.Window_SetMaxSize(*args, **kwargs) | |
6234 | ||
e811c8ce | 6235 | def GetMinWidth(*args, **kwargs): |
a95a7133 | 6236 | """GetMinWidth(self) -> int""" |
54f9ee45 | 6237 | return _core_.Window_GetMinWidth(*args, **kwargs) |
e811c8ce RD |
6238 | |
6239 | def GetMinHeight(*args, **kwargs): | |
a95a7133 | 6240 | """GetMinHeight(self) -> int""" |
54f9ee45 | 6241 | return _core_.Window_GetMinHeight(*args, **kwargs) |
e811c8ce RD |
6242 | |
6243 | def GetMaxWidth(*args, **kwargs): | |
a95a7133 | 6244 | """GetMaxWidth(self) -> int""" |
54f9ee45 | 6245 | return _core_.Window_GetMaxWidth(*args, **kwargs) |
e811c8ce RD |
6246 | |
6247 | def GetMaxHeight(*args, **kwargs): | |
a95a7133 | 6248 | """GetMaxHeight(self) -> int""" |
54f9ee45 | 6249 | return _core_.Window_GetMaxHeight(*args, **kwargs) |
e811c8ce | 6250 | |
e811c8ce | 6251 | def SetVirtualSize(*args, **kwargs): |
0df68c9f | 6252 | """ |
a95a7133 | 6253 | SetVirtualSize(self, Size size) |
e811c8ce | 6254 | |
15afbcd0 RD |
6255 | Set the the virtual size of a window in pixels. For most windows this |
6256 | is just the client area of the window, but for some like scrolled | |
6257 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6258 | """ |
54f9ee45 | 6259 | return _core_.Window_SetVirtualSize(*args, **kwargs) |
e811c8ce RD |
6260 | |
6261 | def SetVirtualSizeWH(*args, **kwargs): | |
0df68c9f | 6262 | """ |
a95a7133 | 6263 | SetVirtualSizeWH(self, int w, int h) |
e811c8ce | 6264 | |
15afbcd0 RD |
6265 | Set the the virtual size of a window in pixels. For most windows this |
6266 | is just the client area of the window, but for some like scrolled | |
6267 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6268 | """ |
54f9ee45 | 6269 | return _core_.Window_SetVirtualSizeWH(*args, **kwargs) |
e811c8ce RD |
6270 | |
6271 | def GetVirtualSize(*args, **kwargs): | |
0df68c9f | 6272 | """ |
a95a7133 | 6273 | GetVirtualSize(self) -> Size |
e811c8ce | 6274 | |
15afbcd0 RD |
6275 | Get the the virtual size of the window in pixels. For most windows |
6276 | this is just the client area of the window, but for some like scrolled | |
6277 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6278 | """ |
54f9ee45 | 6279 | return _core_.Window_GetVirtualSize(*args, **kwargs) |
e811c8ce RD |
6280 | |
6281 | def GetVirtualSizeTuple(*args, **kwargs): | |
0df68c9f RD |
6282 | """ |
6283 | GetVirtualSizeTuple() -> (width, height) | |
e811c8ce | 6284 | |
15afbcd0 RD |
6285 | Get the the virtual size of the window in pixels. For most windows |
6286 | this is just the client area of the window, but for some like scrolled | |
6287 | windows it is more or less independent of the screen window size. | |
0df68c9f | 6288 | """ |
54f9ee45 | 6289 | return _core_.Window_GetVirtualSizeTuple(*args, **kwargs) |
e811c8ce RD |
6290 | |
6291 | def GetBestVirtualSize(*args, **kwargs): | |
15afbcd0 | 6292 | """ |
a95a7133 | 6293 | GetBestVirtualSize(self) -> Size |
15afbcd0 RD |
6294 | |
6295 | Return the largest of ClientSize and BestSize (as determined by a | |
6296 | sizer, interior children, or other means) | |
6297 | """ | |
54f9ee45 | 6298 | return _core_.Window_GetBestVirtualSize(*args, **kwargs) |
e811c8ce RD |
6299 | |
6300 | def Show(*args, **kwargs): | |
15afbcd0 | 6301 | """ |
a95a7133 | 6302 | Show(self, bool show=True) -> bool |
15afbcd0 RD |
6303 | |
6304 | Shows or hides the window. You may need to call Raise for a top level | |
6305 | window if you want to bring it to top, although this is not needed if | |
6306 | Show is called immediately after the frame creation. Returns True if | |
6307 | the window has been shown or hidden or False if nothing was done | |
6308 | because it already was in the requested state. | |
6309 | """ | |
54f9ee45 | 6310 | return _core_.Window_Show(*args, **kwargs) |
e811c8ce RD |
6311 | |
6312 | def Hide(*args, **kwargs): | |
15afbcd0 | 6313 | """ |
a95a7133 | 6314 | Hide(self) -> bool |
15afbcd0 RD |
6315 | |
6316 | Equivalent to calling Show(False). | |
6317 | """ | |
54f9ee45 | 6318 | return _core_.Window_Hide(*args, **kwargs) |
e811c8ce RD |
6319 | |
6320 | def Enable(*args, **kwargs): | |
15afbcd0 | 6321 | """ |
a95a7133 | 6322 | Enable(self, bool enable=True) -> bool |
15afbcd0 RD |
6323 | |
6324 | Enable or disable the window for user input. Note that when a parent | |
6325 | window is disabled, all of its children are disabled as well and they | |
6326 | are reenabled again when the parent is. Returns true if the window | |
6327 | has been enabled or disabled, false if nothing was done, i.e. if the | |
6328 | window had already been in the specified state. | |
6329 | """ | |
54f9ee45 | 6330 | return _core_.Window_Enable(*args, **kwargs) |
e811c8ce RD |
6331 | |
6332 | def Disable(*args, **kwargs): | |
15afbcd0 | 6333 | """ |
a95a7133 | 6334 | Disable(self) -> bool |
15afbcd0 RD |
6335 | |
6336 | Disables the window, same as Enable(false). | |
6337 | """ | |
54f9ee45 | 6338 | return _core_.Window_Disable(*args, **kwargs) |
e811c8ce RD |
6339 | |
6340 | def IsShown(*args, **kwargs): | |
15afbcd0 | 6341 | """ |
a95a7133 | 6342 | IsShown(self) -> bool |
15afbcd0 RD |
6343 | |
6344 | Returns true if the window is shown, false if it has been hidden. | |
6345 | """ | |
54f9ee45 | 6346 | return _core_.Window_IsShown(*args, **kwargs) |
e811c8ce RD |
6347 | |
6348 | def IsEnabled(*args, **kwargs): | |
15afbcd0 | 6349 | """ |
a95a7133 | 6350 | IsEnabled(self) -> bool |
15afbcd0 RD |
6351 | |
6352 | Returns true if the window is enabled for input, false otherwise. | |
6353 | """ | |
54f9ee45 | 6354 | return _core_.Window_IsEnabled(*args, **kwargs) |
e811c8ce RD |
6355 | |
6356 | def SetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 | 6357 | """ |
a95a7133 | 6358 | SetWindowStyleFlag(self, long style) |
15afbcd0 | 6359 | |
41e2b43e RD |
6360 | Sets the style of the window. Please note that some styles cannot be |
6361 | changed after the window creation and that Refresh() might need to be | |
6362 | called after changing the others for the change to take place | |
6363 | immediately. | |
15afbcd0 | 6364 | """ |
54f9ee45 | 6365 | return _core_.Window_SetWindowStyleFlag(*args, **kwargs) |
e811c8ce RD |
6366 | |
6367 | def GetWindowStyleFlag(*args, **kwargs): | |
15afbcd0 | 6368 | """ |
a95a7133 | 6369 | GetWindowStyleFlag(self) -> long |
e811c8ce | 6370 | |
15afbcd0 RD |
6371 | Gets the window style that was passed to the constructor or Create |
6372 | method. | |
6373 | """ | |
54f9ee45 | 6374 | return _core_.Window_GetWindowStyleFlag(*args, **kwargs) |
e811c8ce | 6375 | |
15afbcd0 | 6376 | SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag |
e811c8ce | 6377 | def HasFlag(*args, **kwargs): |
15afbcd0 | 6378 | """ |
a95a7133 | 6379 | HasFlag(self, int flag) -> bool |
15afbcd0 RD |
6380 | |
6381 | Test if the given style is set for this window. | |
6382 | """ | |
54f9ee45 | 6383 | return _core_.Window_HasFlag(*args, **kwargs) |
e811c8ce RD |
6384 | |
6385 | def IsRetained(*args, **kwargs): | |
15afbcd0 | 6386 | """ |
a95a7133 | 6387 | IsRetained(self) -> bool |
15afbcd0 RD |
6388 | |
6389 | Returns true if the window is retained, false otherwise. Retained | |
6390 | windows are only available on X platforms. | |
6391 | """ | |
54f9ee45 | 6392 | return _core_.Window_IsRetained(*args, **kwargs) |
e811c8ce RD |
6393 | |
6394 | def SetExtraStyle(*args, **kwargs): | |
15afbcd0 | 6395 | """ |
a95a7133 | 6396 | SetExtraStyle(self, long exStyle) |
15afbcd0 RD |
6397 | |
6398 | Sets the extra style bits for the window. Extra styles are the less | |
6399 | often used style bits which can't be set with the constructor or with | |
6400 | SetWindowStyleFlag() | |
6401 | """ | |
54f9ee45 | 6402 | return _core_.Window_SetExtraStyle(*args, **kwargs) |
e811c8ce RD |
6403 | |
6404 | def GetExtraStyle(*args, **kwargs): | |
15afbcd0 | 6405 | """ |
a95a7133 | 6406 | GetExtraStyle(self) -> long |
15afbcd0 RD |
6407 | |
6408 | Returns the extra style bits for the window. | |
6409 | """ | |
54f9ee45 | 6410 | return _core_.Window_GetExtraStyle(*args, **kwargs) |
e811c8ce RD |
6411 | |
6412 | def MakeModal(*args, **kwargs): | |
15afbcd0 | 6413 | """ |
a95a7133 | 6414 | MakeModal(self, bool modal=True) |
15afbcd0 RD |
6415 | |
6416 | Disables all other windows in the application so that the user can | |
6417 | only interact with this window. Passing False will reverse this | |
6418 | effect. | |
6419 | """ | |
54f9ee45 | 6420 | return _core_.Window_MakeModal(*args, **kwargs) |
e811c8ce RD |
6421 | |
6422 | def SetThemeEnabled(*args, **kwargs): | |
15afbcd0 | 6423 | """ |
a95a7133 | 6424 | SetThemeEnabled(self, bool enableTheme) |
15afbcd0 RD |
6425 | |
6426 | This function tells a window if it should use the system's "theme" | |
6427 | code to draw the windows' background instead if its own background | |
6428 | drawing code. This will only have an effect on platforms that support | |
6429 | the notion of themes in user defined windows. One such platform is | |
6430 | GTK+ where windows can have (very colourful) backgrounds defined by a | |
6431 | user's selected theme. | |
6432 | ||
6433 | Dialogs, notebook pages and the status bar have this flag set to true | |
6434 | by default so that the default look and feel is simulated best. | |
6435 | """ | |
54f9ee45 | 6436 | return _core_.Window_SetThemeEnabled(*args, **kwargs) |
e811c8ce RD |
6437 | |
6438 | def GetThemeEnabled(*args, **kwargs): | |
15afbcd0 | 6439 | """ |
a95a7133 | 6440 | GetThemeEnabled(self) -> bool |
e811c8ce | 6441 | |
15afbcd0 RD |
6442 | Return the themeEnabled flag. |
6443 | """ | |
54f9ee45 | 6444 | return _core_.Window_GetThemeEnabled(*args, **kwargs) |
e811c8ce RD |
6445 | |
6446 | def SetFocus(*args, **kwargs): | |
15afbcd0 | 6447 | """ |
a95a7133 | 6448 | SetFocus(self) |
15afbcd0 RD |
6449 | |
6450 | Set's the focus to this window, allowing it to receive keyboard input. | |
6451 | """ | |
54f9ee45 | 6452 | return _core_.Window_SetFocus(*args, **kwargs) |
e811c8ce RD |
6453 | |
6454 | def SetFocusFromKbd(*args, **kwargs): | |
15afbcd0 | 6455 | """ |
a95a7133 | 6456 | SetFocusFromKbd(self) |
15afbcd0 RD |
6457 | |
6458 | Set focus to this window as the result of a keyboard action. Normally | |
6459 | only called internally. | |
6460 | """ | |
54f9ee45 | 6461 | return _core_.Window_SetFocusFromKbd(*args, **kwargs) |
e811c8ce RD |
6462 | |
6463 | def FindFocus(*args, **kwargs): | |
15afbcd0 | 6464 | """ |
66c033b4 | 6465 | FindFocus() -> Window |
15afbcd0 RD |
6466 | |
6467 | Returns the window or control that currently has the keyboard focus, | |
6468 | or None. | |
6469 | """ | |
54f9ee45 | 6470 | return _core_.Window_FindFocus(*args, **kwargs) |
e811c8ce RD |
6471 | |
6472 | FindFocus = staticmethod(FindFocus) | |
6473 | def AcceptsFocus(*args, **kwargs): | |
15afbcd0 | 6474 | """ |
a95a7133 | 6475 | AcceptsFocus(self) -> bool |
15afbcd0 RD |
6476 | |
6477 | Can this window have focus? | |
6478 | """ | |
54f9ee45 | 6479 | return _core_.Window_AcceptsFocus(*args, **kwargs) |
e811c8ce RD |
6480 | |
6481 | def AcceptsFocusFromKeyboard(*args, **kwargs): | |
15afbcd0 | 6482 | """ |
a95a7133 | 6483 | AcceptsFocusFromKeyboard(self) -> bool |
15afbcd0 RD |
6484 | |
6485 | Can this window be given focus by keyboard navigation? if not, the | |
6486 | only way to give it focus (provided it accepts it at all) is to click | |
6487 | it. | |
6488 | """ | |
54f9ee45 | 6489 | return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs) |
e811c8ce RD |
6490 | |
6491 | def GetDefaultItem(*args, **kwargs): | |
15afbcd0 | 6492 | """ |
a95a7133 | 6493 | GetDefaultItem(self) -> Window |
15afbcd0 RD |
6494 | |
6495 | Get the default child of this parent, i.e. the one which is activated | |
6496 | by pressing <Enter> such as the OK button on a wx.Dialog. | |
6497 | """ | |
54f9ee45 | 6498 | return _core_.Window_GetDefaultItem(*args, **kwargs) |
e811c8ce RD |
6499 | |
6500 | def SetDefaultItem(*args, **kwargs): | |
15afbcd0 | 6501 | """ |
a95a7133 | 6502 | SetDefaultItem(self, Window child) -> Window |
15afbcd0 RD |
6503 | |
6504 | Set this child as default, return the old default. | |
6505 | """ | |
54f9ee45 | 6506 | return _core_.Window_SetDefaultItem(*args, **kwargs) |
e811c8ce RD |
6507 | |
6508 | def SetTmpDefaultItem(*args, **kwargs): | |
15afbcd0 | 6509 | """ |
a95a7133 | 6510 | SetTmpDefaultItem(self, Window win) |
15afbcd0 RD |
6511 | |
6512 | Set this child as temporary default | |
6513 | """ | |
54f9ee45 | 6514 | return _core_.Window_SetTmpDefaultItem(*args, **kwargs) |
e811c8ce | 6515 | |
908b74cd RD |
6516 | def Navigate(*args, **kwargs): |
6517 | """ | |
6518 | Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool | |
6519 | ||
fd2dc343 RD |
6520 | Does keyboard navigation from this window to another, by sending a |
6521 | `wx.NavigationKeyEvent`. | |
908b74cd RD |
6522 | """ |
6523 | return _core_.Window_Navigate(*args, **kwargs) | |
6524 | ||
7f98d120 RD |
6525 | def MoveAfterInTabOrder(*args, **kwargs): |
6526 | """ | |
6527 | MoveAfterInTabOrder(self, Window win) | |
6528 | ||
6529 | Moves this window in the tab navigation order after the specified | |
6530 | sibling window. This means that when the user presses the TAB key on | |
6531 | that other window, the focus switches to this window. | |
6532 | ||
6533 | The default tab order is the same as creation order. This function | |
6534 | and `MoveBeforeInTabOrder` allow to change it after creating all the | |
6535 | windows. | |
6536 | ||
6537 | """ | |
6538 | return _core_.Window_MoveAfterInTabOrder(*args, **kwargs) | |
6539 | ||
6540 | def MoveBeforeInTabOrder(*args, **kwargs): | |
6541 | """ | |
6542 | MoveBeforeInTabOrder(self, Window win) | |
6543 | ||
6544 | Same as `MoveAfterInTabOrder` except that it inserts this window just | |
6545 | before win instead of putting it right after it. | |
6546 | """ | |
6547 | return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs) | |
6548 | ||
e811c8ce | 6549 | def GetChildren(*args, **kwargs): |
15afbcd0 | 6550 | """ |
a95a7133 | 6551 | GetChildren(self) -> PyObject |
15afbcd0 RD |
6552 | |
6553 | Returns a list of the window's children. NOTE: Currently this is a | |
6554 | copy of the child window list maintained by the window, so the return | |
6555 | value of this function is only valid as long as the window's children | |
6556 | do not change. | |
6557 | """ | |
54f9ee45 | 6558 | return _core_.Window_GetChildren(*args, **kwargs) |
e811c8ce RD |
6559 | |
6560 | def GetParent(*args, **kwargs): | |
15afbcd0 | 6561 | """ |
a95a7133 | 6562 | GetParent(self) -> Window |
15afbcd0 RD |
6563 | |
6564 | Returns the parent window of this window, or None if there isn't one. | |
6565 | """ | |
54f9ee45 | 6566 | return _core_.Window_GetParent(*args, **kwargs) |
e811c8ce RD |
6567 | |
6568 | def GetGrandParent(*args, **kwargs): | |
15afbcd0 | 6569 | """ |
a95a7133 | 6570 | GetGrandParent(self) -> Window |
15afbcd0 | 6571 | |
41e2b43e RD |
6572 | Returns the parent of the parent of this window, or None if there |
6573 | isn't one. | |
15afbcd0 | 6574 | """ |
54f9ee45 | 6575 | return _core_.Window_GetGrandParent(*args, **kwargs) |
e811c8ce RD |
6576 | |
6577 | def IsTopLevel(*args, **kwargs): | |
15afbcd0 | 6578 | """ |
a95a7133 | 6579 | IsTopLevel(self) -> bool |
15afbcd0 RD |
6580 | |
6581 | Returns true if the given window is a top-level one. Currently all | |
6582 | frames and dialogs are always considered to be top-level windows (even | |
6583 | if they have a parent window). | |
6584 | """ | |
54f9ee45 | 6585 | return _core_.Window_IsTopLevel(*args, **kwargs) |
e811c8ce RD |
6586 | |
6587 | def Reparent(*args, **kwargs): | |
15afbcd0 | 6588 | """ |
a95a7133 | 6589 | Reparent(self, Window newParent) -> bool |
15afbcd0 RD |
6590 | |
6591 | Reparents the window, i.e the window will be removed from its current | |
6592 | parent window (e.g. a non-standard toolbar in a wxFrame) and then | |
6593 | re-inserted into another. Available on Windows and GTK. Returns True | |
6594 | if the parent was changed, False otherwise (error or newParent == | |
6595 | oldParent) | |
6596 | """ | |
54f9ee45 | 6597 | return _core_.Window_Reparent(*args, **kwargs) |
e811c8ce RD |
6598 | |
6599 | def AddChild(*args, **kwargs): | |
15afbcd0 | 6600 | """ |
a95a7133 | 6601 | AddChild(self, Window child) |
15afbcd0 RD |
6602 | |
6603 | Adds a child window. This is called automatically by window creation | |
6604 | functions so should not be required by the application programmer. | |
6605 | """ | |
54f9ee45 | 6606 | return _core_.Window_AddChild(*args, **kwargs) |
e811c8ce RD |
6607 | |
6608 | def RemoveChild(*args, **kwargs): | |
15afbcd0 | 6609 | """ |
a95a7133 | 6610 | RemoveChild(self, Window child) |
15afbcd0 RD |
6611 | |
6612 | Removes a child window. This is called automatically by window | |
6613 | deletion functions so should not be required by the application | |
6614 | programmer. | |
6615 | """ | |
54f9ee45 | 6616 | return _core_.Window_RemoveChild(*args, **kwargs) |
e811c8ce RD |
6617 | |
6618 | def FindWindowById(*args, **kwargs): | |
15afbcd0 | 6619 | """ |
a95a7133 | 6620 | FindWindowById(self, long winid) -> Window |
15afbcd0 RD |
6621 | |
6622 | Find a chld of this window by window ID | |
6623 | """ | |
54f9ee45 | 6624 | return _core_.Window_FindWindowById(*args, **kwargs) |
e811c8ce RD |
6625 | |
6626 | def FindWindowByName(*args, **kwargs): | |
15afbcd0 | 6627 | """ |
a95a7133 | 6628 | FindWindowByName(self, String name) -> Window |
15afbcd0 RD |
6629 | |
6630 | Find a child of this window by name | |
6631 | """ | |
54f9ee45 | 6632 | return _core_.Window_FindWindowByName(*args, **kwargs) |
e811c8ce RD |
6633 | |
6634 | def GetEventHandler(*args, **kwargs): | |
15afbcd0 | 6635 | """ |
a95a7133 | 6636 | GetEventHandler(self) -> EvtHandler |
15afbcd0 RD |
6637 | |
6638 | Returns the event handler for this window. By default, the window is | |
6639 | its own event handler. | |
6640 | """ | |
54f9ee45 | 6641 | return _core_.Window_GetEventHandler(*args, **kwargs) |
e811c8ce RD |
6642 | |
6643 | def SetEventHandler(*args, **kwargs): | |
15afbcd0 | 6644 | """ |
a95a7133 | 6645 | SetEventHandler(self, EvtHandler handler) |
15afbcd0 RD |
6646 | |
6647 | Sets the event handler for this window. An event handler is an object | |
6648 | that is capable of processing the events sent to a window. By default, | |
6649 | the window is its own event handler, but an application may wish to | |
6650 | substitute another, for example to allow central implementation of | |
6651 | event-handling for a variety of different window classes. | |
6652 | ||
41e2b43e | 6653 | It is usually better to use `wx.Window.PushEventHandler` since this sets |
15afbcd0 RD |
6654 | up a chain of event handlers, where an event not handled by one event |
6655 | handler is handed to the next one in the chain. | |
6656 | """ | |
54f9ee45 | 6657 | return _core_.Window_SetEventHandler(*args, **kwargs) |
e811c8ce RD |
6658 | |
6659 | def PushEventHandler(*args, **kwargs): | |
15afbcd0 | 6660 | """ |
a95a7133 | 6661 | PushEventHandler(self, EvtHandler handler) |
15afbcd0 RD |
6662 | |
6663 | Pushes this event handler onto the event handler stack for the window. | |
6664 | An event handler is an object that is capable of processing the events | |
6665 | sent to a window. By default, the window is its own event handler, but | |
6666 | an application may wish to substitute another, for example to allow | |
6667 | central implementation of event-handling for a variety of different | |
6668 | window classes. | |
6669 | ||
6670 | wx.Window.PushEventHandler allows an application to set up a chain of | |
6671 | event handlers, where an event not handled by one event handler is | |
41e2b43e | 6672 | handed to the next one in the chain. Use `wx.Window.PopEventHandler` to |
15afbcd0 RD |
6673 | remove the event handler. |
6674 | """ | |
54f9ee45 | 6675 | return _core_.Window_PushEventHandler(*args, **kwargs) |
e811c8ce RD |
6676 | |
6677 | def PopEventHandler(*args, **kwargs): | |
15afbcd0 | 6678 | """ |
a95a7133 | 6679 | PopEventHandler(self, bool deleteHandler=False) -> EvtHandler |
15afbcd0 RD |
6680 | |
6681 | Removes and returns the top-most event handler on the event handler | |
6682 | stack. If deleteHandler is True then the wx.EvtHandler object will be | |
6683 | destroyed after it is popped. | |
6684 | """ | |
54f9ee45 | 6685 | return _core_.Window_PopEventHandler(*args, **kwargs) |
e811c8ce RD |
6686 | |
6687 | def RemoveEventHandler(*args, **kwargs): | |
15afbcd0 | 6688 | """ |
a95a7133 | 6689 | RemoveEventHandler(self, EvtHandler handler) -> bool |
15afbcd0 | 6690 | |
41e2b43e RD |
6691 | Find the given handler in the event handler chain and remove (but not |
6692 | delete) it from the event handler chain, return True if it was found | |
6693 | and False otherwise (this also results in an assert failure so this | |
6694 | function should only be called when the handler is supposed to be | |
6695 | there.) | |
15afbcd0 | 6696 | """ |
54f9ee45 | 6697 | return _core_.Window_RemoveEventHandler(*args, **kwargs) |
e811c8ce RD |
6698 | |
6699 | def SetValidator(*args, **kwargs): | |
15afbcd0 | 6700 | """ |
a95a7133 | 6701 | SetValidator(self, Validator validator) |
15afbcd0 RD |
6702 | |
6703 | Deletes the current validator (if any) and sets the window validator, | |
6704 | having called wx.Validator.Clone to create a new validator of this | |
6705 | type. | |
6706 | """ | |
54f9ee45 | 6707 | return _core_.Window_SetValidator(*args, **kwargs) |
e811c8ce RD |
6708 | |
6709 | def GetValidator(*args, **kwargs): | |
15afbcd0 | 6710 | """ |
a95a7133 | 6711 | GetValidator(self) -> Validator |
15afbcd0 RD |
6712 | |
6713 | Returns a pointer to the current validator for the window, or None if | |
6714 | there is none. | |
6715 | """ | |
54f9ee45 | 6716 | return _core_.Window_GetValidator(*args, **kwargs) |
e811c8ce | 6717 | |
74a57fcd RD |
6718 | def Validate(*args, **kwargs): |
6719 | """ | |
a95a7133 | 6720 | Validate(self) -> bool |
74a57fcd RD |
6721 | |
6722 | Validates the current values of the child controls using their | |
41e2b43e RD |
6723 | validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra |
6724 | style flag set, the method will also call Validate() of all child | |
6725 | windows. Returns false if any of the validations failed. | |
74a57fcd | 6726 | """ |
54f9ee45 | 6727 | return _core_.Window_Validate(*args, **kwargs) |
74a57fcd RD |
6728 | |
6729 | def TransferDataToWindow(*args, **kwargs): | |
6730 | """ | |
a95a7133 | 6731 | TransferDataToWindow(self) -> bool |
74a57fcd | 6732 | |
41e2b43e RD |
6733 | Transfers values to child controls from data areas specified by their |
6734 | validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra | |
6735 | style flag set, the method will also call TransferDataToWindow() of | |
6736 | all child windows. | |
74a57fcd | 6737 | """ |
54f9ee45 | 6738 | return _core_.Window_TransferDataToWindow(*args, **kwargs) |
74a57fcd RD |
6739 | |
6740 | def TransferDataFromWindow(*args, **kwargs): | |
6741 | """ | |
a95a7133 | 6742 | TransferDataFromWindow(self) -> bool |
74a57fcd | 6743 | |
41e2b43e RD |
6744 | Transfers values from child controls to data areas specified by their |
6745 | validators. Returns false if a transfer failed. If the window has | |
6746 | wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will | |
6747 | also call TransferDataFromWindow() of all child windows. | |
74a57fcd | 6748 | """ |
54f9ee45 | 6749 | return _core_.Window_TransferDataFromWindow(*args, **kwargs) |
74a57fcd RD |
6750 | |
6751 | def InitDialog(*args, **kwargs): | |
6752 | """ | |
a95a7133 | 6753 | InitDialog(self) |
74a57fcd | 6754 | |
41e2b43e RD |
6755 | Sends an EVT_INIT_DIALOG event, whose handler usually transfers data |
6756 | to the dialog via validators. | |
74a57fcd | 6757 | """ |
54f9ee45 | 6758 | return _core_.Window_InitDialog(*args, **kwargs) |
74a57fcd | 6759 | |
e811c8ce | 6760 | def SetAcceleratorTable(*args, **kwargs): |
15afbcd0 | 6761 | """ |
a95a7133 | 6762 | SetAcceleratorTable(self, AcceleratorTable accel) |
15afbcd0 RD |
6763 | |
6764 | Sets the accelerator table for this window. | |
6765 | """ | |
54f9ee45 | 6766 | return _core_.Window_SetAcceleratorTable(*args, **kwargs) |
e811c8ce RD |
6767 | |
6768 | def GetAcceleratorTable(*args, **kwargs): | |
15afbcd0 | 6769 | """ |
a95a7133 | 6770 | GetAcceleratorTable(self) -> AcceleratorTable |
15afbcd0 RD |
6771 | |
6772 | Gets the accelerator table for this window. | |
6773 | """ | |
54f9ee45 | 6774 | return _core_.Window_GetAcceleratorTable(*args, **kwargs) |
e811c8ce RD |
6775 | |
6776 | def RegisterHotKey(*args, **kwargs): | |
15afbcd0 | 6777 | """ |
a95a7133 | 6778 | RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool |
15afbcd0 RD |
6779 | |
6780 | Registers a system wide hotkey. Every time the user presses the hotkey | |
6781 | registered here, this window will receive a hotkey event. It will | |
6782 | receive the event even if the application is in the background and | |
6783 | does not have the input focus because the user is working with some | |
6784 | other application. To bind an event handler function to this hotkey | |
6785 | use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the | |
6786 | hotkey was registered successfully. | |
6787 | """ | |
54f9ee45 | 6788 | return _core_.Window_RegisterHotKey(*args, **kwargs) |
e811c8ce RD |
6789 | |
6790 | def UnregisterHotKey(*args, **kwargs): | |
15afbcd0 | 6791 | """ |
a95a7133 | 6792 | UnregisterHotKey(self, int hotkeyId) -> bool |
15afbcd0 RD |
6793 | |
6794 | Unregisters a system wide hotkey. | |
6795 | """ | |
54f9ee45 | 6796 | return _core_.Window_UnregisterHotKey(*args, **kwargs) |
e811c8ce RD |
6797 | |
6798 | def ConvertDialogPointToPixels(*args, **kwargs): | |
15afbcd0 | 6799 | """ |
a95a7133 | 6800 | ConvertDialogPointToPixels(self, Point pt) -> Point |
15afbcd0 RD |
6801 | |
6802 | Converts a point or size from dialog units to pixels. Dialog units | |
6803 | are used for maintaining a dialog's proportions even if the font | |
6804 | changes. For the x dimension, the dialog units are multiplied by the | |
6805 | average character width and then divided by 4. For the y dimension, | |
6806 | the dialog units are multiplied by the average character height and | |
6807 | then divided by 8. | |
6808 | """ | |
54f9ee45 | 6809 | return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs) |
e811c8ce RD |
6810 | |
6811 | def ConvertDialogSizeToPixels(*args, **kwargs): | |
15afbcd0 | 6812 | """ |
a95a7133 | 6813 | ConvertDialogSizeToPixels(self, Size sz) -> Size |
15afbcd0 RD |
6814 | |
6815 | Converts a point or size from dialog units to pixels. Dialog units | |
6816 | are used for maintaining a dialog's proportions even if the font | |
6817 | changes. For the x dimension, the dialog units are multiplied by the | |
6818 | average character width and then divided by 4. For the y dimension, | |
6819 | the dialog units are multiplied by the average character height and | |
6820 | then divided by 8. | |
6821 | """ | |
54f9ee45 | 6822 | return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs) |
e811c8ce RD |
6823 | |
6824 | def DLG_PNT(*args, **kwargs): | |
15afbcd0 | 6825 | """ |
a95a7133 | 6826 | DLG_PNT(self, Point pt) -> Point |
15afbcd0 RD |
6827 | |
6828 | Converts a point or size from dialog units to pixels. Dialog units | |
6829 | are used for maintaining a dialog's proportions even if the font | |
6830 | changes. For the x dimension, the dialog units are multiplied by the | |
6831 | average character width and then divided by 4. For the y dimension, | |
6832 | the dialog units are multiplied by the average character height and | |
6833 | then divided by 8. | |
6834 | """ | |
54f9ee45 | 6835 | return _core_.Window_DLG_PNT(*args, **kwargs) |
e811c8ce RD |
6836 | |
6837 | def DLG_SZE(*args, **kwargs): | |
15afbcd0 | 6838 | """ |
a95a7133 | 6839 | DLG_SZE(self, Size sz) -> Size |
15afbcd0 RD |
6840 | |
6841 | Converts a point or size from dialog units to pixels. Dialog units | |
6842 | are used for maintaining a dialog's proportions even if the font | |
6843 | changes. For the x dimension, the dialog units are multiplied by the | |
6844 | average character width and then divided by 4. For the y dimension, | |
6845 | the dialog units are multiplied by the average character height and | |
6846 | then divided by 8. | |
6847 | """ | |
54f9ee45 | 6848 | return _core_.Window_DLG_SZE(*args, **kwargs) |
e811c8ce RD |
6849 | |
6850 | def ConvertPixelPointToDialog(*args, **kwargs): | |
a95a7133 | 6851 | """ConvertPixelPointToDialog(self, Point pt) -> Point""" |
54f9ee45 | 6852 | return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs) |
e811c8ce RD |
6853 | |
6854 | def ConvertPixelSizeToDialog(*args, **kwargs): | |
a95a7133 | 6855 | """ConvertPixelSizeToDialog(self, Size sz) -> Size""" |
54f9ee45 | 6856 | return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs) |
e811c8ce RD |
6857 | |
6858 | def WarpPointer(*args, **kwargs): | |
15afbcd0 | 6859 | """ |
a95a7133 | 6860 | WarpPointer(self, int x, int y) |
15afbcd0 RD |
6861 | |
6862 | Moves the pointer to the given position on the window. | |
6863 | ||
6864 | NOTE: This function is not supported under Mac because Apple Human | |
6865 | Interface Guidelines forbid moving the mouse cursor programmatically. | |
6866 | """ | |
54f9ee45 | 6867 | return _core_.Window_WarpPointer(*args, **kwargs) |
e811c8ce RD |
6868 | |
6869 | def CaptureMouse(*args, **kwargs): | |
15afbcd0 | 6870 | """ |
a95a7133 | 6871 | CaptureMouse(self) |
15afbcd0 RD |
6872 | |
6873 | Directs all mouse input to this window. Call wx.Window.ReleaseMouse to | |
6874 | release the capture. | |
6875 | ||
6876 | Note that wxWindows maintains the stack of windows having captured the | |
6877 | mouse and when the mouse is released the capture returns to the window | |
6878 | which had had captured it previously and it is only really released if | |
6879 | there were no previous window. In particular, this means that you must | |
6880 | release the mouse as many times as you capture it. | |
6881 | """ | |
54f9ee45 | 6882 | return _core_.Window_CaptureMouse(*args, **kwargs) |
e811c8ce RD |
6883 | |
6884 | def ReleaseMouse(*args, **kwargs): | |
15afbcd0 | 6885 | """ |
a95a7133 | 6886 | ReleaseMouse(self) |
15afbcd0 RD |
6887 | |
6888 | Releases mouse input captured with wx.Window.CaptureMouse. | |
6889 | """ | |
54f9ee45 | 6890 | return _core_.Window_ReleaseMouse(*args, **kwargs) |
e811c8ce RD |
6891 | |
6892 | def GetCapture(*args, **kwargs): | |
15afbcd0 | 6893 | """ |
66c033b4 | 6894 | GetCapture() -> Window |
15afbcd0 RD |
6895 | |
6896 | Returns the window which currently captures the mouse or None | |
6897 | """ | |
54f9ee45 | 6898 | return _core_.Window_GetCapture(*args, **kwargs) |
e811c8ce RD |
6899 | |
6900 | GetCapture = staticmethod(GetCapture) | |
6901 | def HasCapture(*args, **kwargs): | |
15afbcd0 | 6902 | """ |
a95a7133 | 6903 | HasCapture(self) -> bool |
15afbcd0 RD |
6904 | |
6905 | Returns true if this window has the current mouse capture. | |
6906 | """ | |
54f9ee45 | 6907 | return _core_.Window_HasCapture(*args, **kwargs) |
e811c8ce RD |
6908 | |
6909 | def Refresh(*args, **kwargs): | |
15afbcd0 | 6910 | """ |
a95a7133 | 6911 | Refresh(self, bool eraseBackground=True, Rect rect=None) |
15afbcd0 RD |
6912 | |
6913 | Mark the specified rectangle (or the whole window) as "dirty" so it | |
6914 | will be repainted. Causes an EVT_PAINT event to be generated and sent | |
6915 | to the window. | |
6916 | """ | |
54f9ee45 | 6917 | return _core_.Window_Refresh(*args, **kwargs) |
e811c8ce RD |
6918 | |
6919 | def RefreshRect(*args, **kwargs): | |
15afbcd0 | 6920 | """ |
a95a7133 | 6921 | RefreshRect(self, Rect rect) |
15afbcd0 RD |
6922 | |
6923 | Redraws the contents of the given rectangle: the area inside it will | |
6924 | be repainted. This is the same as Refresh but has a nicer syntax. | |
6925 | """ | |
54f9ee45 | 6926 | return _core_.Window_RefreshRect(*args, **kwargs) |
e811c8ce RD |
6927 | |
6928 | def Update(*args, **kwargs): | |
15afbcd0 | 6929 | """ |
a95a7133 | 6930 | Update(self) |
15afbcd0 RD |
6931 | |
6932 | Calling this method immediately repaints the invalidated area of the | |
6933 | window instead of waiting for the EVT_PAINT event to happen, (normally | |
6934 | this would usually only happen when the flow of control returns to the | |
6935 | event loop.) Notice that this function doesn't refresh the window and | |
6936 | does nothing if the window has been already repainted. Use Refresh | |
6937 | first if you want to immediately redraw the window (or some portion of | |
6938 | it) unconditionally. | |
6939 | """ | |
54f9ee45 | 6940 | return _core_.Window_Update(*args, **kwargs) |
e811c8ce RD |
6941 | |
6942 | def ClearBackground(*args, **kwargs): | |
15afbcd0 | 6943 | """ |
a95a7133 | 6944 | ClearBackground(self) |
15afbcd0 RD |
6945 | |
6946 | Clears the window by filling it with the current background | |
6947 | colour. Does not cause an erase background event to be generated. | |
6948 | """ | |
54f9ee45 | 6949 | return _core_.Window_ClearBackground(*args, **kwargs) |
e811c8ce RD |
6950 | |
6951 | def Freeze(*args, **kwargs): | |
15afbcd0 | 6952 | """ |
a95a7133 | 6953 | Freeze(self) |
15afbcd0 | 6954 | |
41e2b43e RD |
6955 | Freezes the window or, in other words, prevents any updates from |
6956 | taking place on screen, the window is not redrawn at all. Thaw must be | |
6957 | called to reenable window redrawing. Calls to Freeze/Thaw may be | |
6958 | nested, with the actual Thaw being delayed until all the nesting has | |
6959 | been undone. | |
15afbcd0 RD |
6960 | |
6961 | This method is useful for visual appearance optimization (for example, | |
6962 | it is a good idea to use it before inserting large amount of text into | |
6963 | a wxTextCtrl under wxGTK) but is not implemented on all platforms nor | |
6964 | for all controls so it is mostly just a hint to wxWindows and not a | |
6965 | mandatory directive. | |
6966 | """ | |
54f9ee45 | 6967 | return _core_.Window_Freeze(*args, **kwargs) |
e811c8ce RD |
6968 | |
6969 | def Thaw(*args, **kwargs): | |
15afbcd0 | 6970 | """ |
a95a7133 | 6971 | Thaw(self) |
15afbcd0 | 6972 | |
4276dc52 | 6973 | Reenables window updating after a previous call to Freeze. Calls to |
41e2b43e RD |
6974 | Freeze/Thaw may be nested, so Thaw must be called the same number of |
6975 | times that Freeze was before the window will be updated. | |
15afbcd0 | 6976 | """ |
54f9ee45 | 6977 | return _core_.Window_Thaw(*args, **kwargs) |
e811c8ce RD |
6978 | |
6979 | def PrepareDC(*args, **kwargs): | |
15afbcd0 | 6980 | """ |
a95a7133 | 6981 | PrepareDC(self, DC dc) |
15afbcd0 RD |
6982 | |
6983 | Call this function to prepare the device context for drawing a | |
6984 | scrolled image. It sets the device origin according to the current | |
6985 | scroll position. | |
6986 | """ | |
54f9ee45 | 6987 | return _core_.Window_PrepareDC(*args, **kwargs) |
e811c8ce RD |
6988 | |
6989 | def GetUpdateRegion(*args, **kwargs): | |
15afbcd0 | 6990 | """ |
a95a7133 | 6991 | GetUpdateRegion(self) -> Region |
15afbcd0 RD |
6992 | |
6993 | Returns the region specifying which parts of the window have been | |
6994 | damaged. Should only be called within an EVT_PAINT handler. | |
6995 | """ | |
54f9ee45 | 6996 | return _core_.Window_GetUpdateRegion(*args, **kwargs) |
e811c8ce RD |
6997 | |
6998 | def GetUpdateClientRect(*args, **kwargs): | |
15afbcd0 | 6999 | """ |
a95a7133 | 7000 | GetUpdateClientRect(self) -> Rect |
15afbcd0 RD |
7001 | |
7002 | Get the update rectangle region bounding box in client coords. | |
7003 | """ | |
54f9ee45 | 7004 | return _core_.Window_GetUpdateClientRect(*args, **kwargs) |
e811c8ce RD |
7005 | |
7006 | def IsExposed(*args, **kwargs): | |
15afbcd0 | 7007 | """ |
a95a7133 | 7008 | IsExposed(self, int x, int y, int w=1, int h=1) -> bool |
15afbcd0 RD |
7009 | |
7010 | Returns true if the given point or rectangle area has been exposed | |
7011 | since the last repaint. Call this in an paint event handler to | |
7012 | optimize redrawing by only redrawing those areas, which have been | |
7013 | exposed. | |
7014 | """ | |
54f9ee45 | 7015 | return _core_.Window_IsExposed(*args, **kwargs) |
e811c8ce RD |
7016 | |
7017 | def IsExposedPoint(*args, **kwargs): | |
15afbcd0 | 7018 | """ |
a95a7133 | 7019 | IsExposedPoint(self, Point pt) -> bool |
15afbcd0 RD |
7020 | |
7021 | Returns true if the given point or rectangle area has been exposed | |
7022 | since the last repaint. Call this in an paint event handler to | |
7023 | optimize redrawing by only redrawing those areas, which have been | |
7024 | exposed. | |
7025 | """ | |
54f9ee45 | 7026 | return _core_.Window_IsExposedPoint(*args, **kwargs) |
e811c8ce | 7027 | |
4276dc52 | 7028 | def IsExposedRect(*args, **kwargs): |
15afbcd0 | 7029 | """ |
a95a7133 | 7030 | IsExposedRect(self, Rect rect) -> bool |
15afbcd0 RD |
7031 | |
7032 | Returns true if the given point or rectangle area has been exposed | |
7033 | since the last repaint. Call this in an paint event handler to | |
7034 | optimize redrawing by only redrawing those areas, which have been | |
7035 | exposed. | |
7036 | """ | |
54f9ee45 | 7037 | return _core_.Window_IsExposedRect(*args, **kwargs) |
e811c8ce | 7038 | |
74a57fcd RD |
7039 | def GetDefaultAttributes(*args, **kwargs): |
7040 | """ | |
a95a7133 | 7041 | GetDefaultAttributes(self) -> VisualAttributes |
74a57fcd | 7042 | |
41e2b43e RD |
7043 | Get the default attributes for an instance of this class. This is |
7044 | useful if you want to use the same font or colour in your own control | |
7045 | as in a standard control -- which is a much better idea than hard | |
7046 | coding specific colours or fonts which might look completely out of | |
db3e571a | 7047 | place on the user's system, especially if it uses themes. |
74a57fcd | 7048 | """ |
54f9ee45 | 7049 | return _core_.Window_GetDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
7050 | |
7051 | def GetClassDefaultAttributes(*args, **kwargs): | |
7052 | """ | |
66c033b4 | 7053 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes |
74a57fcd | 7054 | |
41e2b43e RD |
7055 | Get the default attributes for this class. This is useful if you want |
7056 | to use the same font or colour in your own control as in a standard | |
7057 | control -- which is a much better idea than hard coding specific | |
db3e571a RD |
7058 | colours or fonts which might look completely out of place on the |
7059 | user's system, especially if it uses themes. | |
74a57fcd RD |
7060 | |
7061 | The variant parameter is only relevant under Mac currently and is | |
41e2b43e | 7062 | ignore under other platforms. Under Mac, it will change the size of |
db3e571a RD |
7063 | the returned font. See `wx.Window.SetWindowVariant` for more about |
7064 | this. | |
74a57fcd | 7065 | """ |
54f9ee45 | 7066 | return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
7067 | |
7068 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
e811c8ce | 7069 | def SetBackgroundColour(*args, **kwargs): |
15afbcd0 | 7070 | """ |
a95a7133 | 7071 | SetBackgroundColour(self, Colour colour) -> bool |
15afbcd0 RD |
7072 | |
7073 | Sets the background colour of the window. Returns True if the colour | |
7074 | was changed. The background colour is usually painted by the default | |
7075 | EVT_ERASE_BACKGROUND event handler function under Windows and | |
f8167d6e RD |
7076 | automatically under GTK. Using `wx.NullColour` will reset the window |
7077 | to the default background colour. | |
15afbcd0 | 7078 | |
db3e571a | 7079 | Note that setting the background colour may not cause an immediate |
f8167d6e | 7080 | refresh, so you may wish to call `ClearBackground` or `Refresh` after |
15afbcd0 RD |
7081 | calling this function. |
7082 | ||
f8167d6e RD |
7083 | Using this function will disable attempts to use themes for this |
7084 | window, if the system supports them. Use with care since usually the | |
7085 | themes represent the appearance chosen by the user to be used for all | |
7086 | applications on the system. | |
15afbcd0 | 7087 | """ |
54f9ee45 | 7088 | return _core_.Window_SetBackgroundColour(*args, **kwargs) |
e811c8ce | 7089 | |
412d302d RD |
7090 | def SetOwnBackgroundColour(*args, **kwargs): |
7091 | """SetOwnBackgroundColour(self, Colour colour)""" | |
7092 | return _core_.Window_SetOwnBackgroundColour(*args, **kwargs) | |
b2df227b | 7093 | |
e811c8ce | 7094 | def SetForegroundColour(*args, **kwargs): |
15afbcd0 | 7095 | """ |
a95a7133 | 7096 | SetForegroundColour(self, Colour colour) -> bool |
15afbcd0 RD |
7097 | |
7098 | Sets the foreground colour of the window. Returns True is the colour | |
7099 | was changed. The interpretation of foreground colour is dependent on | |
7100 | the window class; it may be the text colour or other colour, or it may | |
7101 | not be used at all. | |
7102 | """ | |
54f9ee45 | 7103 | return _core_.Window_SetForegroundColour(*args, **kwargs) |
e811c8ce | 7104 | |
fa47d7a7 VS |
7105 | def SetOwnForegroundColour(*args, **kwargs): |
7106 | """SetOwnForegroundColour(self, Colour colour)""" | |
7107 | return _core_.Window_SetOwnForegroundColour(*args, **kwargs) | |
b2df227b | 7108 | |
e811c8ce | 7109 | def GetBackgroundColour(*args, **kwargs): |
15afbcd0 | 7110 | """ |
a95a7133 | 7111 | GetBackgroundColour(self) -> Colour |
15afbcd0 RD |
7112 | |
7113 | Returns the background colour of the window. | |
7114 | """ | |
54f9ee45 | 7115 | return _core_.Window_GetBackgroundColour(*args, **kwargs) |
e811c8ce RD |
7116 | |
7117 | def GetForegroundColour(*args, **kwargs): | |
15afbcd0 | 7118 | """ |
a95a7133 | 7119 | GetForegroundColour(self) -> Colour |
15afbcd0 RD |
7120 | |
7121 | Returns the foreground colour of the window. The interpretation of | |
7122 | foreground colour is dependent on the window class; it may be the text | |
7123 | colour or other colour, or it may not be used at all. | |
7124 | """ | |
54f9ee45 | 7125 | return _core_.Window_GetForegroundColour(*args, **kwargs) |
e811c8ce | 7126 | |
7bc1e663 RD |
7127 | def SetBackgroundStyle(*args, **kwargs): |
7128 | """ | |
7129 | SetBackgroundStyle(self, int style) -> bool | |
7130 | ||
7131 | Returns the background style of the window. The background style | |
7132 | indicates how the background of the window is drawn. | |
7133 | ||
7134 | ====================== ======================================== | |
7135 | wx.BG_STYLE_SYSTEM The background colour or pattern should | |
7136 | be determined by the system | |
7137 | wx.BG_STYLE_COLOUR The background should be a solid colour | |
7138 | wx.BG_STYLE_CUSTOM The background will be implemented by the | |
7139 | application. | |
7140 | ====================== ======================================== | |
7141 | ||
7142 | On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of | |
7143 | a custom background, such as a tiled bitmap. Currently the style has | |
7144 | no effect on other platforms. | |
7145 | ||
7146 | :see: `GetBackgroundStyle`, `SetBackgroundColour` | |
7147 | """ | |
7148 | return _core_.Window_SetBackgroundStyle(*args, **kwargs) | |
7149 | ||
7150 | def GetBackgroundStyle(*args, **kwargs): | |
7151 | """ | |
7152 | GetBackgroundStyle(self) -> int | |
7153 | ||
7154 | Returns the background style of the window. | |
7155 | ||
7156 | :see: `SetBackgroundStyle` | |
7157 | """ | |
7158 | return _core_.Window_GetBackgroundStyle(*args, **kwargs) | |
7159 | ||
e811c8ce | 7160 | def SetCursor(*args, **kwargs): |
15afbcd0 | 7161 | """ |
a95a7133 | 7162 | SetCursor(self, Cursor cursor) -> bool |
15afbcd0 RD |
7163 | |
7164 | Sets the window's cursor. Notice that the window cursor also sets it | |
7165 | for the children of the window implicitly. | |
7166 | ||
7167 | The cursor may be wx.NullCursor in which case the window cursor will | |
7168 | be reset back to default. | |
7169 | """ | |
54f9ee45 | 7170 | return _core_.Window_SetCursor(*args, **kwargs) |
e811c8ce RD |
7171 | |
7172 | def GetCursor(*args, **kwargs): | |
15afbcd0 | 7173 | """ |
a95a7133 | 7174 | GetCursor(self) -> Cursor |
15afbcd0 RD |
7175 | |
7176 | Return the cursor associated with this window. | |
7177 | """ | |
54f9ee45 | 7178 | return _core_.Window_GetCursor(*args, **kwargs) |
e811c8ce RD |
7179 | |
7180 | def SetFont(*args, **kwargs): | |
15afbcd0 | 7181 | """ |
a95a7133 | 7182 | SetFont(self, Font font) -> bool |
15afbcd0 RD |
7183 | |
7184 | Sets the font for this window. | |
7185 | """ | |
54f9ee45 | 7186 | return _core_.Window_SetFont(*args, **kwargs) |
e811c8ce | 7187 | |
fa47d7a7 VS |
7188 | def SetOwnFont(*args, **kwargs): |
7189 | """SetOwnFont(self, Font font)""" | |
7190 | return _core_.Window_SetOwnFont(*args, **kwargs) | |
b2df227b | 7191 | |
e811c8ce | 7192 | def GetFont(*args, **kwargs): |
15afbcd0 | 7193 | """ |
a95a7133 | 7194 | GetFont(self) -> Font |
15afbcd0 | 7195 | |
4276dc52 | 7196 | Returns the default font used for this window. |
15afbcd0 | 7197 | """ |
54f9ee45 | 7198 | return _core_.Window_GetFont(*args, **kwargs) |
e811c8ce RD |
7199 | |
7200 | def SetCaret(*args, **kwargs): | |
15afbcd0 | 7201 | """ |
a95a7133 | 7202 | SetCaret(self, Caret caret) |
15afbcd0 RD |
7203 | |
7204 | Sets the caret associated with the window. | |
7205 | """ | |
54f9ee45 | 7206 | return _core_.Window_SetCaret(*args, **kwargs) |
e811c8ce RD |
7207 | |
7208 | def GetCaret(*args, **kwargs): | |
15afbcd0 | 7209 | """ |
a95a7133 | 7210 | GetCaret(self) -> Caret |
15afbcd0 RD |
7211 | |
7212 | Returns the caret associated with the window. | |
7213 | """ | |
54f9ee45 | 7214 | return _core_.Window_GetCaret(*args, **kwargs) |
e811c8ce RD |
7215 | |
7216 | def GetCharHeight(*args, **kwargs): | |
15afbcd0 | 7217 | """ |
a95a7133 | 7218 | GetCharHeight(self) -> int |
15afbcd0 RD |
7219 | |
7220 | Get the (average) character size for the current font. | |
7221 | """ | |
54f9ee45 | 7222 | return _core_.Window_GetCharHeight(*args, **kwargs) |
e811c8ce RD |
7223 | |
7224 | def GetCharWidth(*args, **kwargs): | |
15afbcd0 | 7225 | """ |
a95a7133 | 7226 | GetCharWidth(self) -> int |
15afbcd0 RD |
7227 | |
7228 | Get the (average) character size for the current font. | |
7229 | """ | |
54f9ee45 | 7230 | return _core_.Window_GetCharWidth(*args, **kwargs) |
e811c8ce RD |
7231 | |
7232 | def GetTextExtent(*args, **kwargs): | |
fd2dc343 RD |
7233 | """ |
7234 | GetTextExtent(String string) -> (width, height) | |
7235 | ||
7236 | Get the width and height of the text using the current font. | |
7237 | """ | |
54f9ee45 | 7238 | return _core_.Window_GetTextExtent(*args, **kwargs) |
e811c8ce RD |
7239 | |
7240 | def GetFullTextExtent(*args, **kwargs): | |
0df68c9f | 7241 | """ |
196addbf | 7242 | GetFullTextExtent(String string, Font font=None) -> |
0df68c9f | 7243 | (width, height, descent, externalLeading) |
e811c8ce | 7244 | |
15afbcd0 RD |
7245 | Get the width, height, decent and leading of the text using the |
7246 | current or specified font. | |
0df68c9f | 7247 | """ |
54f9ee45 | 7248 | return _core_.Window_GetFullTextExtent(*args, **kwargs) |
e811c8ce RD |
7249 | |
7250 | def ClientToScreenXY(*args, **kwargs): | |
15afbcd0 RD |
7251 | """ |
7252 | ClientToScreenXY(int x, int y) -> (x,y) | |
7253 | ||
7254 | Converts to screen coordinates from coordinates relative to this window. | |
7255 | """ | |
54f9ee45 | 7256 | return _core_.Window_ClientToScreenXY(*args, **kwargs) |
e811c8ce RD |
7257 | |
7258 | def ScreenToClientXY(*args, **kwargs): | |
15afbcd0 RD |
7259 | """ |
7260 | ScreenToClientXY(int x, int y) -> (x,y) | |
7261 | ||
7262 | Converts from screen to client window coordinates. | |
7263 | """ | |
54f9ee45 | 7264 | return _core_.Window_ScreenToClientXY(*args, **kwargs) |
e811c8ce RD |
7265 | |
7266 | def ClientToScreen(*args, **kwargs): | |
15afbcd0 | 7267 | """ |
a95a7133 | 7268 | ClientToScreen(self, Point pt) -> Point |
15afbcd0 RD |
7269 | |
7270 | Converts to screen coordinates from coordinates relative to this window. | |
7271 | """ | |
54f9ee45 | 7272 | return _core_.Window_ClientToScreen(*args, **kwargs) |
e811c8ce RD |
7273 | |
7274 | def ScreenToClient(*args, **kwargs): | |
15afbcd0 | 7275 | """ |
a95a7133 | 7276 | ScreenToClient(self, Point pt) -> Point |
15afbcd0 RD |
7277 | |
7278 | Converts from screen to client window coordinates. | |
7279 | """ | |
54f9ee45 | 7280 | return _core_.Window_ScreenToClient(*args, **kwargs) |
e811c8ce RD |
7281 | |
7282 | def HitTestXY(*args, **kwargs): | |
15afbcd0 | 7283 | """ |
a95a7133 | 7284 | HitTestXY(self, int x, int y) -> int |
15afbcd0 RD |
7285 | |
7286 | Test where the given (in client coords) point lies | |
7287 | """ | |
54f9ee45 | 7288 | return _core_.Window_HitTestXY(*args, **kwargs) |
e811c8ce RD |
7289 | |
7290 | def HitTest(*args, **kwargs): | |
15afbcd0 | 7291 | """ |
a95a7133 | 7292 | HitTest(self, Point pt) -> int |
15afbcd0 RD |
7293 | |
7294 | Test where the given (in client coords) point lies | |
7295 | """ | |
54f9ee45 | 7296 | return _core_.Window_HitTest(*args, **kwargs) |
e811c8ce | 7297 | |
15afbcd0 RD |
7298 | def GetBorder(*args): |
7299 | """ | |
a95a7133 RD |
7300 | GetBorder(self, long flags) -> int |
7301 | GetBorder(self) -> int | |
e811c8ce | 7302 | |
15afbcd0 RD |
7303 | Get border for the flags of this window |
7304 | """ | |
54f9ee45 | 7305 | return _core_.Window_GetBorder(*args) |
e811c8ce RD |
7306 | |
7307 | def UpdateWindowUI(*args, **kwargs): | |
15afbcd0 | 7308 | """ |
a95a7133 | 7309 | UpdateWindowUI(self, long flags=UPDATE_UI_NONE) |
15afbcd0 RD |
7310 | |
7311 | This function sends EVT_UPDATE_UI events to the window. The particular | |
7312 | implementation depends on the window; for example a wx.ToolBar will | |
7313 | send an update UI event for each toolbar button, and a wx.Frame will | |
7314 | send an update UI event for each menubar menu item. You can call this | |
7315 | function from your application to ensure that your UI is up-to-date at | |
7316 | a particular point in time (as far as your EVT_UPDATE_UI handlers are | |
7317 | concerned). This may be necessary if you have called | |
7318 | wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to | |
7319 | limit the overhead that wxWindows incurs by sending update UI events | |
7320 | in idle time. | |
15afbcd0 | 7321 | """ |
54f9ee45 | 7322 | return _core_.Window_UpdateWindowUI(*args, **kwargs) |
e811c8ce RD |
7323 | |
7324 | def PopupMenuXY(*args, **kwargs): | |
15afbcd0 | 7325 | """ |
b0503257 | 7326 | PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool |
15afbcd0 | 7327 | |
b0503257 RD |
7328 | Pops up the given menu at the specified coordinates, relative to this window, |
7329 | and returns control when the user has dismissed the menu. If a menu item is | |
7330 | selected, the corresponding menu event is generated and will be processed as | |
7331 | usual. If the default position is given then the current position of the | |
7332 | mouse cursor will be used. | |
15afbcd0 | 7333 | """ |
54f9ee45 | 7334 | return _core_.Window_PopupMenuXY(*args, **kwargs) |
e811c8ce | 7335 | |
15afbcd0 RD |
7336 | def PopupMenu(*args, **kwargs): |
7337 | """ | |
b0503257 | 7338 | PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool |
15afbcd0 | 7339 | |
b0503257 RD |
7340 | Pops up the given menu at the specified coordinates, relative to this window, |
7341 | and returns control when the user has dismissed the menu. If a menu item is | |
7342 | selected, the corresponding menu event is generated and will be processed as | |
7343 | usual. If the default position is given then the current position of the | |
7344 | mouse cursor will be used. | |
15afbcd0 | 7345 | """ |
54f9ee45 | 7346 | return _core_.Window_PopupMenu(*args, **kwargs) |
15afbcd0 RD |
7347 | |
7348 | def GetHandle(*args, **kwargs): | |
7349 | """ | |
a95a7133 | 7350 | GetHandle(self) -> long |
15afbcd0 RD |
7351 | |
7352 | Returns the platform-specific handle (as a long integer) of the | |
7353 | physical window. Currently on wxMac it returns the handle of the | |
7354 | toplevel parent of the window. | |
7355 | """ | |
54f9ee45 | 7356 | return _core_.Window_GetHandle(*args, **kwargs) |
15afbcd0 | 7357 | |
7e63a440 RD |
7358 | def AssociateHandle(*args, **kwargs): |
7359 | """ | |
7360 | AssociateHandle(self, long handle) | |
7361 | ||
7362 | Associate the window with a new native handle | |
7363 | """ | |
7364 | return _core_.Window_AssociateHandle(*args, **kwargs) | |
7365 | ||
7366 | def DissociateHandle(*args, **kwargs): | |
7367 | """ | |
7368 | DissociateHandle(self) | |
7369 | ||
7370 | Dissociate the current native handle from the window | |
7371 | """ | |
7372 | return _core_.Window_DissociateHandle(*args, **kwargs) | |
7373 | ||
15afbcd0 RD |
7374 | def HasScrollbar(*args, **kwargs): |
7375 | """ | |
a95a7133 | 7376 | HasScrollbar(self, int orient) -> bool |
15afbcd0 RD |
7377 | |
7378 | Does the window have the scrollbar for this orientation? | |
7379 | """ | |
54f9ee45 | 7380 | return _core_.Window_HasScrollbar(*args, **kwargs) |
15afbcd0 RD |
7381 | |
7382 | def SetScrollbar(*args, **kwargs): | |
7383 | """ | |
41e2b43e | 7384 | SetScrollbar(self, int orientation, int position, int thumbSize, int range, |
15afbcd0 RD |
7385 | bool refresh=True) |
7386 | ||
7387 | Sets the scrollbar properties of a built-in scrollbar. | |
15afbcd0 | 7388 | """ |
54f9ee45 | 7389 | return _core_.Window_SetScrollbar(*args, **kwargs) |
e811c8ce RD |
7390 | |
7391 | def SetScrollPos(*args, **kwargs): | |
15afbcd0 | 7392 | """ |
a95a7133 | 7393 | SetScrollPos(self, int orientation, int pos, bool refresh=True) |
15afbcd0 RD |
7394 | |
7395 | Sets the position of one of the built-in scrollbars. | |
7396 | """ | |
54f9ee45 | 7397 | return _core_.Window_SetScrollPos(*args, **kwargs) |
e811c8ce RD |
7398 | |
7399 | def GetScrollPos(*args, **kwargs): | |
15afbcd0 | 7400 | """ |
a95a7133 | 7401 | GetScrollPos(self, int orientation) -> int |
15afbcd0 RD |
7402 | |
7403 | Returns the built-in scrollbar position. | |
7404 | """ | |
54f9ee45 | 7405 | return _core_.Window_GetScrollPos(*args, **kwargs) |
e811c8ce RD |
7406 | |
7407 | def GetScrollThumb(*args, **kwargs): | |
15afbcd0 | 7408 | """ |
a95a7133 | 7409 | GetScrollThumb(self, int orientation) -> int |
15afbcd0 RD |
7410 | |
7411 | Returns the built-in scrollbar thumb size. | |
7412 | """ | |
54f9ee45 | 7413 | return _core_.Window_GetScrollThumb(*args, **kwargs) |
e811c8ce RD |
7414 | |
7415 | def GetScrollRange(*args, **kwargs): | |
15afbcd0 | 7416 | """ |
a95a7133 | 7417 | GetScrollRange(self, int orientation) -> int |
15afbcd0 RD |
7418 | |
7419 | Returns the built-in scrollbar range. | |
7420 | """ | |
54f9ee45 | 7421 | return _core_.Window_GetScrollRange(*args, **kwargs) |
e811c8ce RD |
7422 | |
7423 | def ScrollWindow(*args, **kwargs): | |
15afbcd0 | 7424 | """ |
a95a7133 | 7425 | ScrollWindow(self, int dx, int dy, Rect rect=None) |
15afbcd0 RD |
7426 | |
7427 | Physically scrolls the pixels in the window and move child windows | |
7428 | accordingly. Use this function to optimise your scrolling | |
7429 | implementations, to minimise the area that must be redrawn. Note that | |
7430 | it is rarely required to call this function from a user program. | |
15afbcd0 | 7431 | """ |
54f9ee45 | 7432 | return _core_.Window_ScrollWindow(*args, **kwargs) |
e811c8ce RD |
7433 | |
7434 | def ScrollLines(*args, **kwargs): | |
15afbcd0 | 7435 | """ |
a95a7133 | 7436 | ScrollLines(self, int lines) -> bool |
15afbcd0 RD |
7437 | |
7438 | If the platform and window class supports it, scrolls the window by | |
7439 | the given number of lines down, if lines is positive, or up if lines | |
7440 | is negative. Returns True if the window was scrolled, False if it was | |
7441 | already on top/bottom and nothing was done. | |
7442 | """ | |
54f9ee45 | 7443 | return _core_.Window_ScrollLines(*args, **kwargs) |
e811c8ce RD |
7444 | |
7445 | def ScrollPages(*args, **kwargs): | |
15afbcd0 | 7446 | """ |
a95a7133 | 7447 | ScrollPages(self, int pages) -> bool |
15afbcd0 | 7448 | |
41e2b43e | 7449 | If the platform and window class supports it, scrolls the window by |
15afbcd0 RD |
7450 | the given number of pages down, if pages is positive, or up if pages |
7451 | is negative. Returns True if the window was scrolled, False if it was | |
7452 | already on top/bottom and nothing was done. | |
7453 | """ | |
54f9ee45 | 7454 | return _core_.Window_ScrollPages(*args, **kwargs) |
e811c8ce RD |
7455 | |
7456 | def LineUp(*args, **kwargs): | |
15afbcd0 | 7457 | """ |
a95a7133 | 7458 | LineUp(self) -> bool |
15afbcd0 RD |
7459 | |
7460 | This is just a wrapper for ScrollLines(-1). | |
7461 | """ | |
54f9ee45 | 7462 | return _core_.Window_LineUp(*args, **kwargs) |
e811c8ce RD |
7463 | |
7464 | def LineDown(*args, **kwargs): | |
15afbcd0 | 7465 | """ |
a95a7133 | 7466 | LineDown(self) -> bool |
15afbcd0 RD |
7467 | |
7468 | This is just a wrapper for ScrollLines(1). | |
7469 | """ | |
54f9ee45 | 7470 | return _core_.Window_LineDown(*args, **kwargs) |
e811c8ce RD |
7471 | |
7472 | def PageUp(*args, **kwargs): | |
15afbcd0 | 7473 | """ |
a95a7133 | 7474 | PageUp(self) -> bool |
15afbcd0 RD |
7475 | |
7476 | This is just a wrapper for ScrollPages(-1). | |
7477 | """ | |
54f9ee45 | 7478 | return _core_.Window_PageUp(*args, **kwargs) |
e811c8ce RD |
7479 | |
7480 | def PageDown(*args, **kwargs): | |
15afbcd0 | 7481 | """ |
a95a7133 | 7482 | PageDown(self) -> bool |
15afbcd0 RD |
7483 | |
7484 | This is just a wrapper for ScrollPages(1). | |
7485 | """ | |
54f9ee45 | 7486 | return _core_.Window_PageDown(*args, **kwargs) |
e811c8ce RD |
7487 | |
7488 | def SetHelpText(*args, **kwargs): | |
15afbcd0 | 7489 | """ |
a95a7133 | 7490 | SetHelpText(self, String text) |
15afbcd0 RD |
7491 | |
7492 | Sets the help text to be used as context-sensitive help for this | |
7493 | window. Note that the text is actually stored by the current | |
7494 | wxHelpProvider implementation, and not in the window object itself. | |
7495 | """ | |
54f9ee45 | 7496 | return _core_.Window_SetHelpText(*args, **kwargs) |
e811c8ce RD |
7497 | |
7498 | def SetHelpTextForId(*args, **kwargs): | |
15afbcd0 | 7499 | """ |
a95a7133 | 7500 | SetHelpTextForId(self, String text) |
15afbcd0 RD |
7501 | |
7502 | Associate this help text with all windows with the same id as this | |
7503 | one. | |
7504 | """ | |
54f9ee45 | 7505 | return _core_.Window_SetHelpTextForId(*args, **kwargs) |
e811c8ce RD |
7506 | |
7507 | def GetHelpText(*args, **kwargs): | |
15afbcd0 | 7508 | """ |
a95a7133 | 7509 | GetHelpText(self) -> String |
15afbcd0 RD |
7510 | |
7511 | Gets the help text to be used as context-sensitive help for this | |
7512 | window. Note that the text is actually stored by the current | |
7513 | wxHelpProvider implementation, and not in the window object itself. | |
7514 | """ | |
54f9ee45 | 7515 | return _core_.Window_GetHelpText(*args, **kwargs) |
e811c8ce RD |
7516 | |
7517 | def SetToolTipString(*args, **kwargs): | |
15afbcd0 | 7518 | """ |
a95a7133 | 7519 | SetToolTipString(self, String tip) |
15afbcd0 RD |
7520 | |
7521 | Attach a tooltip to the window. | |
7522 | """ | |
54f9ee45 | 7523 | return _core_.Window_SetToolTipString(*args, **kwargs) |
e811c8ce RD |
7524 | |
7525 | def SetToolTip(*args, **kwargs): | |
15afbcd0 | 7526 | """ |
a95a7133 | 7527 | SetToolTip(self, ToolTip tip) |
15afbcd0 RD |
7528 | |
7529 | Attach a tooltip to the window. | |
7530 | """ | |
54f9ee45 | 7531 | return _core_.Window_SetToolTip(*args, **kwargs) |
e811c8ce RD |
7532 | |
7533 | def GetToolTip(*args, **kwargs): | |
15afbcd0 | 7534 | """ |
a95a7133 | 7535 | GetToolTip(self) -> ToolTip |
15afbcd0 RD |
7536 | |
7537 | get the associated tooltip or None if none | |
7538 | """ | |
54f9ee45 | 7539 | return _core_.Window_GetToolTip(*args, **kwargs) |
e811c8ce RD |
7540 | |
7541 | def SetDropTarget(*args, **kwargs): | |
15afbcd0 | 7542 | """ |
a95a7133 | 7543 | SetDropTarget(self, DropTarget dropTarget) |
15afbcd0 RD |
7544 | |
7545 | Associates a drop target with this window. If the window already has | |
7546 | a drop target, it is deleted. | |
7547 | """ | |
54f9ee45 | 7548 | return _core_.Window_SetDropTarget(*args, **kwargs) |
e811c8ce RD |
7549 | |
7550 | def GetDropTarget(*args, **kwargs): | |
15afbcd0 | 7551 | """ |
a95a7133 | 7552 | GetDropTarget(self) -> DropTarget |
15afbcd0 RD |
7553 | |
7554 | Returns the associated drop target, which may be None. | |
7555 | """ | |
54f9ee45 | 7556 | return _core_.Window_GetDropTarget(*args, **kwargs) |
e811c8ce RD |
7557 | |
7558 | def SetConstraints(*args, **kwargs): | |
15afbcd0 | 7559 | """ |
a95a7133 | 7560 | SetConstraints(self, LayoutConstraints constraints) |
15afbcd0 RD |
7561 | |
7562 | Sets the window to have the given layout constraints. If an existing | |
7563 | layout constraints object is already owned by the window, it will be | |
7564 | deleted. Pass None to disassociate and delete the window's current | |
7565 | constraints. | |
7566 | ||
7567 | You must call SetAutoLayout to tell a window to use the constraints | |
7568 | automatically in its default EVT_SIZE handler; otherwise, you must | |
7569 | handle EVT_SIZE yourself and call Layout() explicitly. When setting | |
7570 | both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have | |
7571 | effect. | |
7572 | """ | |
54f9ee45 | 7573 | return _core_.Window_SetConstraints(*args, **kwargs) |
e811c8ce RD |
7574 | |
7575 | def GetConstraints(*args, **kwargs): | |
15afbcd0 | 7576 | """ |
a95a7133 | 7577 | GetConstraints(self) -> LayoutConstraints |
15afbcd0 RD |
7578 | |
7579 | Returns a pointer to the window's layout constraints, or None if there | |
7580 | are none. | |
7581 | """ | |
54f9ee45 | 7582 | return _core_.Window_GetConstraints(*args, **kwargs) |
e811c8ce RD |
7583 | |
7584 | def SetAutoLayout(*args, **kwargs): | |
15afbcd0 | 7585 | """ |
a95a7133 | 7586 | SetAutoLayout(self, bool autoLayout) |
15afbcd0 RD |
7587 | |
7588 | Determines whether the Layout function will be called automatically | |
7589 | when the window is resized. It is called implicitly by SetSizer but | |
7590 | if you use SetConstraints you should call it manually or otherwise the | |
7591 | window layout won't be correctly updated when its size changes. | |
7592 | """ | |
54f9ee45 | 7593 | return _core_.Window_SetAutoLayout(*args, **kwargs) |
e811c8ce RD |
7594 | |
7595 | def GetAutoLayout(*args, **kwargs): | |
15afbcd0 | 7596 | """ |
a95a7133 | 7597 | GetAutoLayout(self) -> bool |
15afbcd0 RD |
7598 | |
7599 | Returns the current autoLayout setting | |
7600 | """ | |
54f9ee45 | 7601 | return _core_.Window_GetAutoLayout(*args, **kwargs) |
e811c8ce RD |
7602 | |
7603 | def Layout(*args, **kwargs): | |
15afbcd0 | 7604 | """ |
a95a7133 | 7605 | Layout(self) -> bool |
15afbcd0 RD |
7606 | |
7607 | Invokes the constraint-based layout algorithm or the sizer-based | |
7608 | algorithm for this window. See SetAutoLayout: when auto layout is on, | |
7609 | this function gets called automatically by the default EVT_SIZE | |
7610 | handler when the window is resized. | |
7611 | """ | |
54f9ee45 | 7612 | return _core_.Window_Layout(*args, **kwargs) |
e811c8ce RD |
7613 | |
7614 | def SetSizer(*args, **kwargs): | |
15afbcd0 | 7615 | """ |
a95a7133 | 7616 | SetSizer(self, Sizer sizer, bool deleteOld=True) |
15afbcd0 RD |
7617 | |
7618 | Sets the window to have the given layout sizer. The window will then | |
7619 | own the object, and will take care of its deletion. If an existing | |
7620 | layout sizer object is already owned by the window, it will be deleted | |
7621 | if the deleteOld parameter is true. Note that this function will also | |
7622 | call SetAutoLayout implicitly with a True parameter if the sizer is | |
ae8162c8 | 7623 | non-None, and False otherwise. |
15afbcd0 | 7624 | """ |
54f9ee45 | 7625 | return _core_.Window_SetSizer(*args, **kwargs) |
e811c8ce RD |
7626 | |
7627 | def SetSizerAndFit(*args, **kwargs): | |
15afbcd0 | 7628 | """ |
a95a7133 | 7629 | SetSizerAndFit(self, Sizer sizer, bool deleteOld=True) |
15afbcd0 RD |
7630 | |
7631 | The same as SetSizer, except it also sets the size hints for the | |
7632 | window based on the sizer's minimum size. | |
7633 | """ | |
54f9ee45 | 7634 | return _core_.Window_SetSizerAndFit(*args, **kwargs) |
e811c8ce RD |
7635 | |
7636 | def GetSizer(*args, **kwargs): | |
15afbcd0 | 7637 | """ |
a95a7133 | 7638 | GetSizer(self) -> Sizer |
15afbcd0 RD |
7639 | |
7640 | Return the sizer associated with the window by a previous call to | |
7641 | SetSizer or None if there isn't one. | |
7642 | """ | |
54f9ee45 | 7643 | return _core_.Window_GetSizer(*args, **kwargs) |
e811c8ce RD |
7644 | |
7645 | def SetContainingSizer(*args, **kwargs): | |
15afbcd0 | 7646 | """ |
a95a7133 | 7647 | SetContainingSizer(self, Sizer sizer) |
15afbcd0 RD |
7648 | |
7649 | This normally does not need to be called by application code. It is | |
7650 | called internally when a window is added to a sizer, and is used so | |
7651 | the window can remove itself from the sizer when it is destroyed. | |
7652 | """ | |
54f9ee45 | 7653 | return _core_.Window_SetContainingSizer(*args, **kwargs) |
e811c8ce RD |
7654 | |
7655 | def GetContainingSizer(*args, **kwargs): | |
15afbcd0 | 7656 | """ |
a95a7133 | 7657 | GetContainingSizer(self) -> Sizer |
15afbcd0 RD |
7658 | |
7659 | Return the sizer that this window is a member of, if any, otherwise None. | |
7660 | """ | |
54f9ee45 | 7661 | return _core_.Window_GetContainingSizer(*args, **kwargs) |
e811c8ce | 7662 | |
a95a7133 RD |
7663 | def InheritAttributes(*args, **kwargs): |
7664 | """ | |
7665 | InheritAttributes(self) | |
7666 | ||
41e2b43e RD |
7667 | This function is (or should be, in case of custom controls) called |
7668 | during window creation to intelligently set up the window visual | |
7669 | attributes, that is the font and the foreground and background | |
7670 | colours. | |
7671 | ||
7672 | By 'intelligently' the following is meant: by default, all windows use | |
7673 | their own default attributes. However if some of the parent's | |
7674 | attributes are explicitly changed (that is, using SetFont and not | |
fa47d7a7 | 7675 | SetOwnFont) and if the corresponding attribute hadn't been |
41e2b43e RD |
7676 | explicitly set for this window itself, then this window takes the same |
7677 | value as used by the parent. In addition, if the window overrides | |
7678 | ShouldInheritColours to return false, the colours will not be changed | |
7679 | no matter what and only the font might. | |
7680 | ||
34621cc5 | 7681 | This rather complicated logic is necessary in order to accommodate the |
ec9b55ca | 7682 | different usage scenarios. The most common one is when all default |
41e2b43e RD |
7683 | attributes are used and in this case, nothing should be inherited as |
7684 | in modern GUIs different controls use different fonts (and colours) | |
7685 | than their siblings so they can't inherit the same value from the | |
7686 | parent. However it was also deemed desirable to allow to simply change | |
7687 | the attributes of all children at once by just changing the font or | |
7688 | colour of their common parent, hence in this case we do inherit the | |
7689 | parents attributes. | |
7690 | ||
a95a7133 | 7691 | """ |
54f9ee45 | 7692 | return _core_.Window_InheritAttributes(*args, **kwargs) |
a95a7133 RD |
7693 | |
7694 | def ShouldInheritColours(*args, **kwargs): | |
7695 | """ | |
7696 | ShouldInheritColours(self) -> bool | |
7697 | ||
7698 | Return true from here to allow the colours of this window to be | |
41e2b43e RD |
7699 | changed by InheritAttributes, returning false forbids inheriting them |
7700 | from the parent window. | |
a95a7133 | 7701 | |
41e2b43e RD |
7702 | The base class version returns false, but this method is overridden in |
7703 | wxControl where it returns true. | |
a95a7133 | 7704 | """ |
54f9ee45 | 7705 | return _core_.Window_ShouldInheritColours(*args, **kwargs) |
a95a7133 | 7706 | |
e811c8ce | 7707 | def PostCreate(self, pre): |
15afbcd0 RD |
7708 | """ |
7709 | Phase 3 of the 2-phase create <wink!> | |
7710 | Call this method after precreating the window with the 2-phase create method. | |
7711 | """ | |
e811c8ce RD |
7712 | self.this = pre.this |
7713 | self.thisown = pre.thisown | |
7714 | pre.thisown = 0 | |
7715 | if hasattr(self, '_setOORInfo'): | |
7716 | self._setOORInfo(self) | |
7717 | if hasattr(self, '_setCallbackInfo'): | |
7718 | self._setCallbackInfo(self, self.__class__) | |
7719 | ||
7720 | ||
7721 | class WindowPtr(Window): | |
7722 | def __init__(self, this): | |
7723 | self.this = this | |
7724 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7725 | self.__class__ = Window | |
54f9ee45 | 7726 | _core_.Window_swigregister(WindowPtr) |
e811c8ce RD |
7727 | |
7728 | def PreWindow(*args, **kwargs): | |
15afbcd0 RD |
7729 | """ |
7730 | PreWindow() -> Window | |
7731 | ||
7732 | Precreate a Window for 2-phase creation. | |
7733 | """ | |
54f9ee45 | 7734 | val = _core_.new_PreWindow(*args, **kwargs) |
e811c8ce RD |
7735 | val.thisown = 1 |
7736 | return val | |
7737 | ||
7738 | def Window_NewControlId(*args, **kwargs): | |
15afbcd0 RD |
7739 | """ |
7740 | Window_NewControlId() -> int | |
7741 | ||
7742 | Generate a control id for the controls which were not given one. | |
7743 | """ | |
54f9ee45 | 7744 | return _core_.Window_NewControlId(*args, **kwargs) |
e811c8ce RD |
7745 | |
7746 | def Window_NextControlId(*args, **kwargs): | |
15afbcd0 RD |
7747 | """ |
7748 | Window_NextControlId(int winid) -> int | |
7749 | ||
7750 | Get the id of the control following the one with the given | |
41e2b43e | 7751 | autogenerated) id |
15afbcd0 | 7752 | """ |
54f9ee45 | 7753 | return _core_.Window_NextControlId(*args, **kwargs) |
e811c8ce RD |
7754 | |
7755 | def Window_PrevControlId(*args, **kwargs): | |
15afbcd0 RD |
7756 | """ |
7757 | Window_PrevControlId(int winid) -> int | |
7758 | ||
7759 | Get the id of the control preceding the one with the given | |
41e2b43e | 7760 | autogenerated) id |
15afbcd0 | 7761 | """ |
54f9ee45 | 7762 | return _core_.Window_PrevControlId(*args, **kwargs) |
e811c8ce RD |
7763 | |
7764 | def Window_FindFocus(*args, **kwargs): | |
15afbcd0 RD |
7765 | """ |
7766 | Window_FindFocus() -> Window | |
7767 | ||
7768 | Returns the window or control that currently has the keyboard focus, | |
7769 | or None. | |
7770 | """ | |
54f9ee45 | 7771 | return _core_.Window_FindFocus(*args, **kwargs) |
e811c8ce RD |
7772 | |
7773 | def Window_GetCapture(*args, **kwargs): | |
15afbcd0 RD |
7774 | """ |
7775 | Window_GetCapture() -> Window | |
7776 | ||
7777 | Returns the window which currently captures the mouse or None | |
7778 | """ | |
54f9ee45 | 7779 | return _core_.Window_GetCapture(*args, **kwargs) |
e811c8ce | 7780 | |
74a57fcd RD |
7781 | def Window_GetClassDefaultAttributes(*args, **kwargs): |
7782 | """ | |
7783 | Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
7784 | ||
41e2b43e RD |
7785 | Get the default attributes for this class. This is useful if you want |
7786 | to use the same font or colour in your own control as in a standard | |
7787 | control -- which is a much better idea than hard coding specific | |
db3e571a RD |
7788 | colours or fonts which might look completely out of place on the |
7789 | user's system, especially if it uses themes. | |
74a57fcd RD |
7790 | |
7791 | The variant parameter is only relevant under Mac currently and is | |
41e2b43e | 7792 | ignore under other platforms. Under Mac, it will change the size of |
db3e571a RD |
7793 | the returned font. See `wx.Window.SetWindowVariant` for more about |
7794 | this. | |
74a57fcd | 7795 | """ |
54f9ee45 | 7796 | return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 7797 | |
e811c8ce | 7798 | def DLG_PNT(win, point_or_x, y=None): |
15afbcd0 RD |
7799 | """ |
7800 | Convenience function for converting a Point or (x,y) in | |
7801 | dialog units to pixel units. | |
7802 | """ | |
e811c8ce RD |
7803 | if y is None: |
7804 | return win.ConvertDialogPointToPixels(point_or_x) | |
7805 | else: | |
fd3f2efe | 7806 | return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y)) |
e811c8ce RD |
7807 | |
7808 | def DLG_SZE(win, size_width, height=None): | |
15afbcd0 RD |
7809 | """ |
7810 | Convenience function for converting a Size or (w,h) in | |
7811 | dialog units to pixel units. | |
7812 | """ | |
e811c8ce RD |
7813 | if height is None: |
7814 | return win.ConvertDialogSizeToPixels(size_width) | |
7815 | else: | |
fd3f2efe | 7816 | return win.ConvertDialogSizeToPixels(wx.Size(size_width, height)) |
e811c8ce RD |
7817 | |
7818 | ||
7819 | def FindWindowById(*args, **kwargs): | |
15afbcd0 RD |
7820 | """ |
7821 | FindWindowById(long id, Window parent=None) -> Window | |
7822 | ||
7823 | Find the first window in the application with the given id. If parent | |
7824 | is None, the search will start from all top-level frames and dialog | |
7825 | boxes; if non-None, the search will be limited to the given window | |
7826 | hierarchy. The search is recursive in both cases. | |
7827 | """ | |
54f9ee45 | 7828 | return _core_.FindWindowById(*args, **kwargs) |
e811c8ce RD |
7829 | |
7830 | def FindWindowByName(*args, **kwargs): | |
15afbcd0 RD |
7831 | """ |
7832 | FindWindowByName(String name, Window parent=None) -> Window | |
7833 | ||
7834 | Find a window by its name (as given in a window constructor or Create | |
7835 | function call). If parent is None, the search will start from all | |
7836 | top-level frames and dialog boxes; if non-None, the search will be | |
7837 | limited to the given window hierarchy. The search is recursive in both | |
7838 | cases. | |
7839 | ||
7840 | If no window with such name is found, wx.FindWindowByLabel is called. | |
7841 | """ | |
54f9ee45 | 7842 | return _core_.FindWindowByName(*args, **kwargs) |
e811c8ce RD |
7843 | |
7844 | def FindWindowByLabel(*args, **kwargs): | |
15afbcd0 RD |
7845 | """ |
7846 | FindWindowByLabel(String label, Window parent=None) -> Window | |
7847 | ||
7848 | Find a window by its label. Depending on the type of window, the label | |
7849 | may be a window title or panel item label. If parent is None, the | |
7850 | search will start from all top-level frames and dialog boxes; if | |
7851 | non-None, the search will be limited to the given window | |
7852 | hierarchy. The search is recursive in both cases. | |
7853 | """ | |
54f9ee45 | 7854 | return _core_.FindWindowByLabel(*args, **kwargs) |
e811c8ce RD |
7855 | |
7856 | def Window_FromHWND(*args, **kwargs): | |
4276dc52 | 7857 | """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window""" |
54f9ee45 | 7858 | return _core_.Window_FromHWND(*args, **kwargs) |
e811c8ce RD |
7859 | #--------------------------------------------------------------------------- |
7860 | ||
7861 | class Validator(EvtHandler): | |
e811c8ce RD |
7862 | def __repr__(self): |
7863 | return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
7864 | def __init__(self, *args, **kwargs): | |
a95a7133 | 7865 | """__init__(self) -> Validator""" |
54f9ee45 | 7866 | newobj = _core_.new_Validator(*args, **kwargs) |
d14a1e28 RD |
7867 | self.this = newobj.this |
7868 | self.thisown = 1 | |
7869 | del newobj.thisown | |
7870 | self._setOORInfo(self) | |
e811c8ce RD |
7871 | |
7872 | def Clone(*args, **kwargs): | |
a95a7133 | 7873 | """Clone(self) -> Validator""" |
54f9ee45 | 7874 | return _core_.Validator_Clone(*args, **kwargs) |
e811c8ce RD |
7875 | |
7876 | def Validate(*args, **kwargs): | |
a95a7133 | 7877 | """Validate(self, Window parent) -> bool""" |
54f9ee45 | 7878 | return _core_.Validator_Validate(*args, **kwargs) |
e811c8ce RD |
7879 | |
7880 | def TransferToWindow(*args, **kwargs): | |
a95a7133 | 7881 | """TransferToWindow(self) -> bool""" |
54f9ee45 | 7882 | return _core_.Validator_TransferToWindow(*args, **kwargs) |
e811c8ce RD |
7883 | |
7884 | def TransferFromWindow(*args, **kwargs): | |
a95a7133 | 7885 | """TransferFromWindow(self) -> bool""" |
54f9ee45 | 7886 | return _core_.Validator_TransferFromWindow(*args, **kwargs) |
e811c8ce RD |
7887 | |
7888 | def GetWindow(*args, **kwargs): | |
a95a7133 | 7889 | """GetWindow(self) -> Window""" |
54f9ee45 | 7890 | return _core_.Validator_GetWindow(*args, **kwargs) |
e811c8ce RD |
7891 | |
7892 | def SetWindow(*args, **kwargs): | |
a95a7133 | 7893 | """SetWindow(self, Window window)""" |
54f9ee45 | 7894 | return _core_.Validator_SetWindow(*args, **kwargs) |
e811c8ce RD |
7895 | |
7896 | def IsSilent(*args, **kwargs): | |
66c033b4 | 7897 | """IsSilent() -> bool""" |
54f9ee45 | 7898 | return _core_.Validator_IsSilent(*args, **kwargs) |
e811c8ce RD |
7899 | |
7900 | IsSilent = staticmethod(IsSilent) | |
7901 | def SetBellOnError(*args, **kwargs): | |
66c033b4 | 7902 | """SetBellOnError(int doIt=True)""" |
54f9ee45 | 7903 | return _core_.Validator_SetBellOnError(*args, **kwargs) |
e811c8ce RD |
7904 | |
7905 | SetBellOnError = staticmethod(SetBellOnError) | |
7906 | ||
7907 | class ValidatorPtr(Validator): | |
7908 | def __init__(self, this): | |
7909 | self.this = this | |
7910 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7911 | self.__class__ = Validator | |
54f9ee45 | 7912 | _core_.Validator_swigregister(ValidatorPtr) |
e811c8ce RD |
7913 | |
7914 | def Validator_IsSilent(*args, **kwargs): | |
7915 | """Validator_IsSilent() -> bool""" | |
54f9ee45 | 7916 | return _core_.Validator_IsSilent(*args, **kwargs) |
e811c8ce RD |
7917 | |
7918 | def Validator_SetBellOnError(*args, **kwargs): | |
7919 | """Validator_SetBellOnError(int doIt=True)""" | |
54f9ee45 | 7920 | return _core_.Validator_SetBellOnError(*args, **kwargs) |
e811c8ce RD |
7921 | |
7922 | class PyValidator(Validator): | |
e811c8ce RD |
7923 | def __repr__(self): |
7924 | return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
7925 | def __init__(self, *args, **kwargs): | |
a95a7133 | 7926 | """__init__(self) -> PyValidator""" |
54f9ee45 | 7927 | newobj = _core_.new_PyValidator(*args, **kwargs) |
e811c8ce RD |
7928 | self.this = newobj.this |
7929 | self.thisown = 1 | |
7930 | del newobj.thisown | |
7931 | ||
7932 | self._setCallbackInfo(self, PyValidator, 1) | |
7933 | self._setOORInfo(self) | |
7934 | ||
7935 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 7936 | """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)""" |
54f9ee45 | 7937 | return _core_.PyValidator__setCallbackInfo(*args, **kwargs) |
e811c8ce RD |
7938 | |
7939 | ||
7940 | class PyValidatorPtr(PyValidator): | |
7941 | def __init__(self, this): | |
7942 | self.this = this | |
7943 | if not hasattr(self,"thisown"): self.thisown = 0 | |
7944 | self.__class__ = PyValidator | |
54f9ee45 | 7945 | _core_.PyValidator_swigregister(PyValidatorPtr) |
e811c8ce RD |
7946 | |
7947 | #--------------------------------------------------------------------------- | |
7948 | ||
7949 | class Menu(EvtHandler): | |
d14a1e28 RD |
7950 | def __repr__(self): |
7951 | return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 7952 | def __init__(self, *args, **kwargs): |
a95a7133 | 7953 | """__init__(self, String title=EmptyString, long style=0) -> Menu""" |
54f9ee45 | 7954 | newobj = _core_.new_Menu(*args, **kwargs) |
e811c8ce RD |
7955 | self.this = newobj.this |
7956 | self.thisown = 1 | |
7957 | del newobj.thisown | |
7958 | self._setOORInfo(self) | |
7959 | ||
7960 | def Append(*args, **kwargs): | |
a95a7133 | 7961 | """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
54f9ee45 | 7962 | return _core_.Menu_Append(*args, **kwargs) |
e811c8ce RD |
7963 | |
7964 | def AppendSeparator(*args, **kwargs): | |
a95a7133 | 7965 | """AppendSeparator(self) -> MenuItem""" |
54f9ee45 | 7966 | return _core_.Menu_AppendSeparator(*args, **kwargs) |
e811c8ce RD |
7967 | |
7968 | def AppendCheckItem(*args, **kwargs): | |
a95a7133 | 7969 | """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 7970 | return _core_.Menu_AppendCheckItem(*args, **kwargs) |
e811c8ce RD |
7971 | |
7972 | def AppendRadioItem(*args, **kwargs): | |
a95a7133 | 7973 | """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 7974 | return _core_.Menu_AppendRadioItem(*args, **kwargs) |
e811c8ce RD |
7975 | |
7976 | def AppendMenu(*args, **kwargs): | |
a95a7133 | 7977 | """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 7978 | return _core_.Menu_AppendMenu(*args, **kwargs) |
e811c8ce RD |
7979 | |
7980 | def AppendItem(*args, **kwargs): | |
a95a7133 | 7981 | """AppendItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 7982 | return _core_.Menu_AppendItem(*args, **kwargs) |
e811c8ce RD |
7983 | |
7984 | def Break(*args, **kwargs): | |
a95a7133 | 7985 | """Break(self)""" |
54f9ee45 | 7986 | return _core_.Menu_Break(*args, **kwargs) |
e811c8ce RD |
7987 | |
7988 | def InsertItem(*args, **kwargs): | |
a95a7133 | 7989 | """InsertItem(self, size_t pos, MenuItem item) -> MenuItem""" |
54f9ee45 | 7990 | return _core_.Menu_InsertItem(*args, **kwargs) |
e811c8ce RD |
7991 | |
7992 | def Insert(*args, **kwargs): | |
0df68c9f | 7993 | """ |
a95a7133 | 7994 | Insert(self, size_t pos, int id, String text, String help=EmptyString, |
a41e16b6 | 7995 | int kind=ITEM_NORMAL) -> MenuItem |
0df68c9f | 7996 | """ |
54f9ee45 | 7997 | return _core_.Menu_Insert(*args, **kwargs) |
e811c8ce RD |
7998 | |
7999 | def InsertSeparator(*args, **kwargs): | |
a95a7133 | 8000 | """InsertSeparator(self, size_t pos) -> MenuItem""" |
54f9ee45 | 8001 | return _core_.Menu_InsertSeparator(*args, **kwargs) |
e811c8ce RD |
8002 | |
8003 | def InsertCheckItem(*args, **kwargs): | |
a95a7133 | 8004 | """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8005 | return _core_.Menu_InsertCheckItem(*args, **kwargs) |
e811c8ce RD |
8006 | |
8007 | def InsertRadioItem(*args, **kwargs): | |
a95a7133 | 8008 | """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8009 | return _core_.Menu_InsertRadioItem(*args, **kwargs) |
e811c8ce RD |
8010 | |
8011 | def InsertMenu(*args, **kwargs): | |
a95a7133 | 8012 | """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8013 | return _core_.Menu_InsertMenu(*args, **kwargs) |
e811c8ce RD |
8014 | |
8015 | def PrependItem(*args, **kwargs): | |
a95a7133 | 8016 | """PrependItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 8017 | return _core_.Menu_PrependItem(*args, **kwargs) |
e811c8ce RD |
8018 | |
8019 | def Prepend(*args, **kwargs): | |
a95a7133 | 8020 | """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem""" |
54f9ee45 | 8021 | return _core_.Menu_Prepend(*args, **kwargs) |
e811c8ce RD |
8022 | |
8023 | def PrependSeparator(*args, **kwargs): | |
a95a7133 | 8024 | """PrependSeparator(self) -> MenuItem""" |
54f9ee45 | 8025 | return _core_.Menu_PrependSeparator(*args, **kwargs) |
e811c8ce RD |
8026 | |
8027 | def PrependCheckItem(*args, **kwargs): | |
a95a7133 | 8028 | """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8029 | return _core_.Menu_PrependCheckItem(*args, **kwargs) |
e811c8ce RD |
8030 | |
8031 | def PrependRadioItem(*args, **kwargs): | |
a95a7133 | 8032 | """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8033 | return _core_.Menu_PrependRadioItem(*args, **kwargs) |
e811c8ce RD |
8034 | |
8035 | def PrependMenu(*args, **kwargs): | |
a95a7133 | 8036 | """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" |
54f9ee45 | 8037 | return _core_.Menu_PrependMenu(*args, **kwargs) |
e811c8ce RD |
8038 | |
8039 | def Remove(*args, **kwargs): | |
a95a7133 | 8040 | """Remove(self, int id) -> MenuItem""" |
54f9ee45 | 8041 | return _core_.Menu_Remove(*args, **kwargs) |
e811c8ce RD |
8042 | |
8043 | def RemoveItem(*args, **kwargs): | |
a95a7133 | 8044 | """RemoveItem(self, MenuItem item) -> MenuItem""" |
54f9ee45 | 8045 | return _core_.Menu_RemoveItem(*args, **kwargs) |
e811c8ce RD |
8046 | |
8047 | def Delete(*args, **kwargs): | |
a95a7133 | 8048 | """Delete(self, int id) -> bool""" |
54f9ee45 | 8049 | return _core_.Menu_Delete(*args, **kwargs) |
e811c8ce RD |
8050 | |
8051 | def DeleteItem(*args, **kwargs): | |
a95a7133 | 8052 | """DeleteItem(self, MenuItem item) -> bool""" |
54f9ee45 | 8053 | return _core_.Menu_DeleteItem(*args, **kwargs) |
e811c8ce RD |
8054 | |
8055 | def Destroy(*args, **kwargs): | |
0df68c9f | 8056 | """ |
a95a7133 | 8057 | Destroy(self) |
e811c8ce | 8058 | |
0df68c9f RD |
8059 | Deletes the C++ object this Python object is a proxy for. |
8060 | """ | |
54f9ee45 | 8061 | return _core_.Menu_Destroy(*args, **kwargs) |
e811c8ce RD |
8062 | |
8063 | def DestroyId(*args, **kwargs): | |
0df68c9f | 8064 | """ |
a95a7133 | 8065 | DestroyId(self, int id) -> bool |
e811c8ce | 8066 | |
0df68c9f RD |
8067 | Deletes the C++ object this Python object is a proxy for. |
8068 | """ | |
54f9ee45 | 8069 | return _core_.Menu_DestroyId(*args, **kwargs) |
e811c8ce RD |
8070 | |
8071 | def DestroyItem(*args, **kwargs): | |
0df68c9f | 8072 | """ |
a95a7133 | 8073 | DestroyItem(self, MenuItem item) -> bool |
e811c8ce | 8074 | |
0df68c9f RD |
8075 | Deletes the C++ object this Python object is a proxy for. |
8076 | """ | |
54f9ee45 | 8077 | return _core_.Menu_DestroyItem(*args, **kwargs) |
e811c8ce RD |
8078 | |
8079 | def GetMenuItemCount(*args, **kwargs): | |
a95a7133 | 8080 | """GetMenuItemCount(self) -> size_t""" |
54f9ee45 | 8081 | return _core_.Menu_GetMenuItemCount(*args, **kwargs) |
e811c8ce RD |
8082 | |
8083 | def GetMenuItems(*args, **kwargs): | |
a95a7133 | 8084 | """GetMenuItems(self) -> PyObject""" |
54f9ee45 | 8085 | return _core_.Menu_GetMenuItems(*args, **kwargs) |
e811c8ce RD |
8086 | |
8087 | def FindItem(*args, **kwargs): | |
a95a7133 | 8088 | """FindItem(self, String item) -> int""" |
54f9ee45 | 8089 | return _core_.Menu_FindItem(*args, **kwargs) |
e811c8ce RD |
8090 | |
8091 | def FindItemById(*args, **kwargs): | |
a95a7133 | 8092 | """FindItemById(self, int id) -> MenuItem""" |
54f9ee45 | 8093 | return _core_.Menu_FindItemById(*args, **kwargs) |
e811c8ce RD |
8094 | |
8095 | def FindItemByPosition(*args, **kwargs): | |
a95a7133 | 8096 | """FindItemByPosition(self, size_t position) -> MenuItem""" |
54f9ee45 | 8097 | return _core_.Menu_FindItemByPosition(*args, **kwargs) |
e811c8ce RD |
8098 | |
8099 | def Enable(*args, **kwargs): | |
a95a7133 | 8100 | """Enable(self, int id, bool enable)""" |
54f9ee45 | 8101 | return _core_.Menu_Enable(*args, **kwargs) |
e811c8ce RD |
8102 | |
8103 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 8104 | """IsEnabled(self, int id) -> bool""" |
54f9ee45 | 8105 | return _core_.Menu_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8106 | |
8107 | def Check(*args, **kwargs): | |
a95a7133 | 8108 | """Check(self, int id, bool check)""" |
54f9ee45 | 8109 | return _core_.Menu_Check(*args, **kwargs) |
e811c8ce RD |
8110 | |
8111 | def IsChecked(*args, **kwargs): | |
a95a7133 | 8112 | """IsChecked(self, int id) -> bool""" |
54f9ee45 | 8113 | return _core_.Menu_IsChecked(*args, **kwargs) |
e811c8ce RD |
8114 | |
8115 | def SetLabel(*args, **kwargs): | |
a95a7133 | 8116 | """SetLabel(self, int id, String label)""" |
54f9ee45 | 8117 | return _core_.Menu_SetLabel(*args, **kwargs) |
e811c8ce RD |
8118 | |
8119 | def GetLabel(*args, **kwargs): | |
a95a7133 | 8120 | """GetLabel(self, int id) -> String""" |
54f9ee45 | 8121 | return _core_.Menu_GetLabel(*args, **kwargs) |
e811c8ce RD |
8122 | |
8123 | def SetHelpString(*args, **kwargs): | |
a95a7133 | 8124 | """SetHelpString(self, int id, String helpString)""" |
54f9ee45 | 8125 | return _core_.Menu_SetHelpString(*args, **kwargs) |
e811c8ce RD |
8126 | |
8127 | def GetHelpString(*args, **kwargs): | |
a95a7133 | 8128 | """GetHelpString(self, int id) -> String""" |
54f9ee45 | 8129 | return _core_.Menu_GetHelpString(*args, **kwargs) |
e811c8ce RD |
8130 | |
8131 | def SetTitle(*args, **kwargs): | |
a95a7133 | 8132 | """SetTitle(self, String title)""" |
54f9ee45 | 8133 | return _core_.Menu_SetTitle(*args, **kwargs) |
e811c8ce RD |
8134 | |
8135 | def GetTitle(*args, **kwargs): | |
a95a7133 | 8136 | """GetTitle(self) -> String""" |
54f9ee45 | 8137 | return _core_.Menu_GetTitle(*args, **kwargs) |
e811c8ce RD |
8138 | |
8139 | def SetEventHandler(*args, **kwargs): | |
a95a7133 | 8140 | """SetEventHandler(self, EvtHandler handler)""" |
54f9ee45 | 8141 | return _core_.Menu_SetEventHandler(*args, **kwargs) |
e811c8ce RD |
8142 | |
8143 | def GetEventHandler(*args, **kwargs): | |
a95a7133 | 8144 | """GetEventHandler(self) -> EvtHandler""" |
54f9ee45 | 8145 | return _core_.Menu_GetEventHandler(*args, **kwargs) |
e811c8ce RD |
8146 | |
8147 | def SetInvokingWindow(*args, **kwargs): | |
a95a7133 | 8148 | """SetInvokingWindow(self, Window win)""" |
54f9ee45 | 8149 | return _core_.Menu_SetInvokingWindow(*args, **kwargs) |
e811c8ce RD |
8150 | |
8151 | def GetInvokingWindow(*args, **kwargs): | |
a95a7133 | 8152 | """GetInvokingWindow(self) -> Window""" |
54f9ee45 | 8153 | return _core_.Menu_GetInvokingWindow(*args, **kwargs) |
e811c8ce RD |
8154 | |
8155 | def GetStyle(*args, **kwargs): | |
a95a7133 | 8156 | """GetStyle(self) -> long""" |
54f9ee45 | 8157 | return _core_.Menu_GetStyle(*args, **kwargs) |
e811c8ce RD |
8158 | |
8159 | def UpdateUI(*args, **kwargs): | |
a95a7133 | 8160 | """UpdateUI(self, EvtHandler source=None)""" |
54f9ee45 | 8161 | return _core_.Menu_UpdateUI(*args, **kwargs) |
e811c8ce RD |
8162 | |
8163 | def GetMenuBar(*args, **kwargs): | |
a95a7133 | 8164 | """GetMenuBar(self) -> MenuBar""" |
54f9ee45 | 8165 | return _core_.Menu_GetMenuBar(*args, **kwargs) |
e811c8ce RD |
8166 | |
8167 | def Attach(*args, **kwargs): | |
a95a7133 | 8168 | """Attach(self, wxMenuBarBase menubar)""" |
54f9ee45 | 8169 | return _core_.Menu_Attach(*args, **kwargs) |
e811c8ce RD |
8170 | |
8171 | def Detach(*args, **kwargs): | |
a95a7133 | 8172 | """Detach(self)""" |
54f9ee45 | 8173 | return _core_.Menu_Detach(*args, **kwargs) |
e811c8ce RD |
8174 | |
8175 | def IsAttached(*args, **kwargs): | |
a95a7133 | 8176 | """IsAttached(self) -> bool""" |
54f9ee45 | 8177 | return _core_.Menu_IsAttached(*args, **kwargs) |
e811c8ce RD |
8178 | |
8179 | def SetParent(*args, **kwargs): | |
a95a7133 | 8180 | """SetParent(self, Menu parent)""" |
54f9ee45 | 8181 | return _core_.Menu_SetParent(*args, **kwargs) |
e811c8ce RD |
8182 | |
8183 | def GetParent(*args, **kwargs): | |
a95a7133 | 8184 | """GetParent(self) -> Menu""" |
54f9ee45 | 8185 | return _core_.Menu_GetParent(*args, **kwargs) |
e811c8ce | 8186 | |
d14a1e28 RD |
8187 | |
8188 | class MenuPtr(Menu): | |
8189 | def __init__(self, this): | |
8190 | self.this = this | |
8191 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8192 | self.__class__ = Menu | |
54f9ee45 | 8193 | _core_.Menu_swigregister(MenuPtr) |
d14a1e28 RD |
8194 | DefaultValidator = cvar.DefaultValidator |
8195 | ||
8196 | #--------------------------------------------------------------------------- | |
8197 | ||
8198 | class MenuBar(Window): | |
e811c8ce RD |
8199 | def __repr__(self): |
8200 | return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8201 | def __init__(self, *args, **kwargs): |
a95a7133 | 8202 | """__init__(self, long style=0) -> MenuBar""" |
54f9ee45 | 8203 | newobj = _core_.new_MenuBar(*args, **kwargs) |
d14a1e28 RD |
8204 | self.this = newobj.this |
8205 | self.thisown = 1 | |
8206 | del newobj.thisown | |
8207 | self._setOORInfo(self) | |
e811c8ce RD |
8208 | |
8209 | def Append(*args, **kwargs): | |
a95a7133 | 8210 | """Append(self, Menu menu, String title) -> bool""" |
54f9ee45 | 8211 | return _core_.MenuBar_Append(*args, **kwargs) |
e811c8ce RD |
8212 | |
8213 | def Insert(*args, **kwargs): | |
a95a7133 | 8214 | """Insert(self, size_t pos, Menu menu, String title) -> bool""" |
54f9ee45 | 8215 | return _core_.MenuBar_Insert(*args, **kwargs) |
e811c8ce RD |
8216 | |
8217 | def GetMenuCount(*args, **kwargs): | |
a95a7133 | 8218 | """GetMenuCount(self) -> size_t""" |
54f9ee45 | 8219 | return _core_.MenuBar_GetMenuCount(*args, **kwargs) |
e811c8ce RD |
8220 | |
8221 | def GetMenu(*args, **kwargs): | |
a95a7133 | 8222 | """GetMenu(self, size_t pos) -> Menu""" |
54f9ee45 | 8223 | return _core_.MenuBar_GetMenu(*args, **kwargs) |
e811c8ce RD |
8224 | |
8225 | def Replace(*args, **kwargs): | |
a95a7133 | 8226 | """Replace(self, size_t pos, Menu menu, String title) -> Menu""" |
54f9ee45 | 8227 | return _core_.MenuBar_Replace(*args, **kwargs) |
e811c8ce RD |
8228 | |
8229 | def Remove(*args, **kwargs): | |
a95a7133 | 8230 | """Remove(self, size_t pos) -> Menu""" |
54f9ee45 | 8231 | return _core_.MenuBar_Remove(*args, **kwargs) |
e811c8ce RD |
8232 | |
8233 | def EnableTop(*args, **kwargs): | |
a95a7133 | 8234 | """EnableTop(self, size_t pos, bool enable)""" |
54f9ee45 | 8235 | return _core_.MenuBar_EnableTop(*args, **kwargs) |
e811c8ce RD |
8236 | |
8237 | def IsEnabledTop(*args, **kwargs): | |
a95a7133 | 8238 | """IsEnabledTop(self, size_t pos) -> bool""" |
54f9ee45 | 8239 | return _core_.MenuBar_IsEnabledTop(*args, **kwargs) |
e811c8ce RD |
8240 | |
8241 | def SetLabelTop(*args, **kwargs): | |
a95a7133 | 8242 | """SetLabelTop(self, size_t pos, String label)""" |
54f9ee45 | 8243 | return _core_.MenuBar_SetLabelTop(*args, **kwargs) |
e811c8ce RD |
8244 | |
8245 | def GetLabelTop(*args, **kwargs): | |
a95a7133 | 8246 | """GetLabelTop(self, size_t pos) -> String""" |
54f9ee45 | 8247 | return _core_.MenuBar_GetLabelTop(*args, **kwargs) |
e811c8ce RD |
8248 | |
8249 | def FindMenuItem(*args, **kwargs): | |
a95a7133 | 8250 | """FindMenuItem(self, String menu, String item) -> int""" |
54f9ee45 | 8251 | return _core_.MenuBar_FindMenuItem(*args, **kwargs) |
e811c8ce RD |
8252 | |
8253 | def FindItemById(*args, **kwargs): | |
a95a7133 | 8254 | """FindItemById(self, int id) -> MenuItem""" |
54f9ee45 | 8255 | return _core_.MenuBar_FindItemById(*args, **kwargs) |
e811c8ce RD |
8256 | |
8257 | def FindMenu(*args, **kwargs): | |
a95a7133 | 8258 | """FindMenu(self, String title) -> int""" |
54f9ee45 | 8259 | return _core_.MenuBar_FindMenu(*args, **kwargs) |
e811c8ce RD |
8260 | |
8261 | def Enable(*args, **kwargs): | |
a95a7133 | 8262 | """Enable(self, int id, bool enable)""" |
54f9ee45 | 8263 | return _core_.MenuBar_Enable(*args, **kwargs) |
e811c8ce RD |
8264 | |
8265 | def Check(*args, **kwargs): | |
a95a7133 | 8266 | """Check(self, int id, bool check)""" |
54f9ee45 | 8267 | return _core_.MenuBar_Check(*args, **kwargs) |
e811c8ce RD |
8268 | |
8269 | def IsChecked(*args, **kwargs): | |
a95a7133 | 8270 | """IsChecked(self, int id) -> bool""" |
54f9ee45 | 8271 | return _core_.MenuBar_IsChecked(*args, **kwargs) |
e811c8ce RD |
8272 | |
8273 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 8274 | """IsEnabled(self, int id) -> bool""" |
54f9ee45 | 8275 | return _core_.MenuBar_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8276 | |
8277 | def SetLabel(*args, **kwargs): | |
a95a7133 | 8278 | """SetLabel(self, int id, String label)""" |
54f9ee45 | 8279 | return _core_.MenuBar_SetLabel(*args, **kwargs) |
e811c8ce RD |
8280 | |
8281 | def GetLabel(*args, **kwargs): | |
a95a7133 | 8282 | """GetLabel(self, int id) -> String""" |
54f9ee45 | 8283 | return _core_.MenuBar_GetLabel(*args, **kwargs) |
e811c8ce RD |
8284 | |
8285 | def SetHelpString(*args, **kwargs): | |
a95a7133 | 8286 | """SetHelpString(self, int id, String helpString)""" |
54f9ee45 | 8287 | return _core_.MenuBar_SetHelpString(*args, **kwargs) |
e811c8ce RD |
8288 | |
8289 | def GetHelpString(*args, **kwargs): | |
a95a7133 | 8290 | """GetHelpString(self, int id) -> String""" |
54f9ee45 | 8291 | return _core_.MenuBar_GetHelpString(*args, **kwargs) |
e811c8ce RD |
8292 | |
8293 | def GetFrame(*args, **kwargs): | |
a95a7133 | 8294 | """GetFrame(self) -> wxFrame""" |
54f9ee45 | 8295 | return _core_.MenuBar_GetFrame(*args, **kwargs) |
e811c8ce RD |
8296 | |
8297 | def IsAttached(*args, **kwargs): | |
a95a7133 | 8298 | """IsAttached(self) -> bool""" |
54f9ee45 | 8299 | return _core_.MenuBar_IsAttached(*args, **kwargs) |
e811c8ce RD |
8300 | |
8301 | def Attach(*args, **kwargs): | |
a95a7133 | 8302 | """Attach(self, wxFrame frame)""" |
54f9ee45 | 8303 | return _core_.MenuBar_Attach(*args, **kwargs) |
e811c8ce RD |
8304 | |
8305 | def Detach(*args, **kwargs): | |
a95a7133 | 8306 | """Detach(self)""" |
54f9ee45 | 8307 | return _core_.MenuBar_Detach(*args, **kwargs) |
e811c8ce | 8308 | |
d14a1e28 RD |
8309 | |
8310 | class MenuBarPtr(MenuBar): | |
8311 | def __init__(self, this): | |
8312 | self.this = this | |
8313 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8314 | self.__class__ = MenuBar | |
54f9ee45 | 8315 | _core_.MenuBar_swigregister(MenuBarPtr) |
d14a1e28 RD |
8316 | |
8317 | #--------------------------------------------------------------------------- | |
8318 | ||
8319 | class MenuItem(Object): | |
e811c8ce RD |
8320 | def __repr__(self): |
8321 | return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8322 | def __init__(self, *args, **kwargs): |
0df68c9f | 8323 | """ |
a95a7133 | 8324 | __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString, |
196addbf RD |
8325 | String help=EmptyString, int kind=ITEM_NORMAL, |
8326 | Menu subMenu=None) -> MenuItem | |
0df68c9f | 8327 | """ |
54f9ee45 | 8328 | newobj = _core_.new_MenuItem(*args, **kwargs) |
d14a1e28 RD |
8329 | self.this = newobj.this |
8330 | self.thisown = 1 | |
8331 | del newobj.thisown | |
e811c8ce | 8332 | def GetMenu(*args, **kwargs): |
a95a7133 | 8333 | """GetMenu(self) -> Menu""" |
54f9ee45 | 8334 | return _core_.MenuItem_GetMenu(*args, **kwargs) |
e811c8ce RD |
8335 | |
8336 | def SetMenu(*args, **kwargs): | |
a95a7133 | 8337 | """SetMenu(self, Menu menu)""" |
54f9ee45 | 8338 | return _core_.MenuItem_SetMenu(*args, **kwargs) |
e811c8ce RD |
8339 | |
8340 | def SetId(*args, **kwargs): | |
a95a7133 | 8341 | """SetId(self, int id)""" |
54f9ee45 | 8342 | return _core_.MenuItem_SetId(*args, **kwargs) |
e811c8ce RD |
8343 | |
8344 | def GetId(*args, **kwargs): | |
a95a7133 | 8345 | """GetId(self) -> int""" |
54f9ee45 | 8346 | return _core_.MenuItem_GetId(*args, **kwargs) |
e811c8ce RD |
8347 | |
8348 | def IsSeparator(*args, **kwargs): | |
a95a7133 | 8349 | """IsSeparator(self) -> bool""" |
54f9ee45 | 8350 | return _core_.MenuItem_IsSeparator(*args, **kwargs) |
e811c8ce RD |
8351 | |
8352 | def SetText(*args, **kwargs): | |
a95a7133 | 8353 | """SetText(self, String str)""" |
54f9ee45 | 8354 | return _core_.MenuItem_SetText(*args, **kwargs) |
e811c8ce RD |
8355 | |
8356 | def GetLabel(*args, **kwargs): | |
a95a7133 | 8357 | """GetLabel(self) -> String""" |
54f9ee45 | 8358 | return _core_.MenuItem_GetLabel(*args, **kwargs) |
e811c8ce RD |
8359 | |
8360 | def GetText(*args, **kwargs): | |
a95a7133 | 8361 | """GetText(self) -> String""" |
54f9ee45 | 8362 | return _core_.MenuItem_GetText(*args, **kwargs) |
e811c8ce RD |
8363 | |
8364 | def GetLabelFromText(*args, **kwargs): | |
66c033b4 | 8365 | """GetLabelFromText(String text) -> String""" |
54f9ee45 | 8366 | return _core_.MenuItem_GetLabelFromText(*args, **kwargs) |
e811c8ce RD |
8367 | |
8368 | GetLabelFromText = staticmethod(GetLabelFromText) | |
8369 | def GetKind(*args, **kwargs): | |
a95a7133 | 8370 | """GetKind(self) -> int""" |
54f9ee45 | 8371 | return _core_.MenuItem_GetKind(*args, **kwargs) |
e811c8ce | 8372 | |
a95a7133 RD |
8373 | def SetKind(*args, **kwargs): |
8374 | """SetKind(self, int kind)""" | |
54f9ee45 | 8375 | return _core_.MenuItem_SetKind(*args, **kwargs) |
a95a7133 | 8376 | |
e811c8ce | 8377 | def SetCheckable(*args, **kwargs): |
a95a7133 | 8378 | """SetCheckable(self, bool checkable)""" |
54f9ee45 | 8379 | return _core_.MenuItem_SetCheckable(*args, **kwargs) |
e811c8ce RD |
8380 | |
8381 | def IsCheckable(*args, **kwargs): | |
a95a7133 | 8382 | """IsCheckable(self) -> bool""" |
54f9ee45 | 8383 | return _core_.MenuItem_IsCheckable(*args, **kwargs) |
e811c8ce RD |
8384 | |
8385 | def IsSubMenu(*args, **kwargs): | |
a95a7133 | 8386 | """IsSubMenu(self) -> bool""" |
54f9ee45 | 8387 | return _core_.MenuItem_IsSubMenu(*args, **kwargs) |
e811c8ce RD |
8388 | |
8389 | def SetSubMenu(*args, **kwargs): | |
a95a7133 | 8390 | """SetSubMenu(self, Menu menu)""" |
54f9ee45 | 8391 | return _core_.MenuItem_SetSubMenu(*args, **kwargs) |
e811c8ce RD |
8392 | |
8393 | def GetSubMenu(*args, **kwargs): | |
a95a7133 | 8394 | """GetSubMenu(self) -> Menu""" |
54f9ee45 | 8395 | return _core_.MenuItem_GetSubMenu(*args, **kwargs) |
e811c8ce RD |
8396 | |
8397 | def Enable(*args, **kwargs): | |
a95a7133 | 8398 | """Enable(self, bool enable=True)""" |
54f9ee45 | 8399 | return _core_.MenuItem_Enable(*args, **kwargs) |
e811c8ce RD |
8400 | |
8401 | def IsEnabled(*args, **kwargs): | |
a95a7133 | 8402 | """IsEnabled(self) -> bool""" |
54f9ee45 | 8403 | return _core_.MenuItem_IsEnabled(*args, **kwargs) |
e811c8ce RD |
8404 | |
8405 | def Check(*args, **kwargs): | |
a95a7133 | 8406 | """Check(self, bool check=True)""" |
54f9ee45 | 8407 | return _core_.MenuItem_Check(*args, **kwargs) |
e811c8ce RD |
8408 | |
8409 | def IsChecked(*args, **kwargs): | |
a95a7133 | 8410 | """IsChecked(self) -> bool""" |
54f9ee45 | 8411 | return _core_.MenuItem_IsChecked(*args, **kwargs) |
e811c8ce RD |
8412 | |
8413 | def Toggle(*args, **kwargs): | |
a95a7133 | 8414 | """Toggle(self)""" |
54f9ee45 | 8415 | return _core_.MenuItem_Toggle(*args, **kwargs) |
e811c8ce RD |
8416 | |
8417 | def SetHelp(*args, **kwargs): | |
a95a7133 | 8418 | """SetHelp(self, String str)""" |
54f9ee45 | 8419 | return _core_.MenuItem_SetHelp(*args, **kwargs) |
e811c8ce RD |
8420 | |
8421 | def GetHelp(*args, **kwargs): | |
a95a7133 | 8422 | """GetHelp(self) -> String""" |
54f9ee45 | 8423 | return _core_.MenuItem_GetHelp(*args, **kwargs) |
e811c8ce RD |
8424 | |
8425 | def GetAccel(*args, **kwargs): | |
a95a7133 | 8426 | """GetAccel(self) -> AcceleratorEntry""" |
54f9ee45 | 8427 | return _core_.MenuItem_GetAccel(*args, **kwargs) |
e811c8ce RD |
8428 | |
8429 | def SetAccel(*args, **kwargs): | |
a95a7133 | 8430 | """SetAccel(self, AcceleratorEntry accel)""" |
54f9ee45 | 8431 | return _core_.MenuItem_SetAccel(*args, **kwargs) |
e811c8ce RD |
8432 | |
8433 | def GetDefaultMarginWidth(*args, **kwargs): | |
66c033b4 | 8434 | """GetDefaultMarginWidth() -> int""" |
54f9ee45 | 8435 | return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs) |
e811c8ce RD |
8436 | |
8437 | GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) | |
8438 | def SetBitmap(*args, **kwargs): | |
a95a7133 | 8439 | """SetBitmap(self, Bitmap bitmap)""" |
54f9ee45 | 8440 | return _core_.MenuItem_SetBitmap(*args, **kwargs) |
e811c8ce RD |
8441 | |
8442 | def GetBitmap(*args, **kwargs): | |
a95a7133 | 8443 | """GetBitmap(self) -> Bitmap""" |
54f9ee45 | 8444 | return _core_.MenuItem_GetBitmap(*args, **kwargs) |
e811c8ce | 8445 | |
d14a1e28 RD |
8446 | |
8447 | class MenuItemPtr(MenuItem): | |
8448 | def __init__(self, this): | |
8449 | self.this = this | |
8450 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8451 | self.__class__ = MenuItem | |
54f9ee45 | 8452 | _core_.MenuItem_swigregister(MenuItemPtr) |
d14a1e28 | 8453 | |
e811c8ce | 8454 | def MenuItem_GetLabelFromText(*args, **kwargs): |
196addbf | 8455 | """MenuItem_GetLabelFromText(String text) -> String""" |
54f9ee45 | 8456 | return _core_.MenuItem_GetLabelFromText(*args, **kwargs) |
d14a1e28 | 8457 | |
e811c8ce RD |
8458 | def MenuItem_GetDefaultMarginWidth(*args, **kwargs): |
8459 | """MenuItem_GetDefaultMarginWidth() -> int""" | |
54f9ee45 | 8460 | return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs) |
d14a1e28 RD |
8461 | |
8462 | #--------------------------------------------------------------------------- | |
8463 | ||
8464 | class Control(Window): | |
15afbcd0 RD |
8465 | """ |
8466 | This is the base class for a control or 'widget'. | |
8467 | ||
41e2b43e RD |
8468 | A control is generally a small window which processes user input |
8469 | and/or displays one or more item of data. | |
15afbcd0 | 8470 | """ |
e811c8ce RD |
8471 | def __repr__(self): |
8472 | return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8473 | def __init__(self, *args, **kwargs): |
0df68c9f | 8474 | """ |
248ed943 RD |
8475 | __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, |
8476 | Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 8477 | String name=ControlNameStr) -> Control |
15afbcd0 | 8478 | |
41e2b43e RD |
8479 | Create a Control. Normally you should only call this from a subclass' |
8480 | __init__ as a plain old wx.Control is not very useful. | |
0df68c9f | 8481 | """ |
54f9ee45 | 8482 | newobj = _core_.new_Control(*args, **kwargs) |
d14a1e28 RD |
8483 | self.this = newobj.this |
8484 | self.thisown = 1 | |
8485 | del newobj.thisown | |
8486 | self._setOORInfo(self) | |
e811c8ce RD |
8487 | |
8488 | def Create(*args, **kwargs): | |
0df68c9f | 8489 | """ |
248ed943 RD |
8490 | Create(self, Window parent, int id=-1, Point pos=DefaultPosition, |
8491 | Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, | |
b2dc1044 | 8492 | String name=ControlNameStr) -> bool |
15afbcd0 RD |
8493 | |
8494 | Do the 2nd phase and create the GUI control. | |
0df68c9f | 8495 | """ |
54f9ee45 | 8496 | return _core_.Control_Create(*args, **kwargs) |
e811c8ce RD |
8497 | |
8498 | def Command(*args, **kwargs): | |
15afbcd0 | 8499 | """ |
a95a7133 | 8500 | Command(self, CommandEvent event) |
15afbcd0 | 8501 | |
41e2b43e RD |
8502 | Simulates the effect of the user issuing a command to the item. |
8503 | ||
8504 | :see: `wx.CommandEvent` | |
8505 | ||
15afbcd0 | 8506 | """ |
54f9ee45 | 8507 | return _core_.Control_Command(*args, **kwargs) |
e811c8ce RD |
8508 | |
8509 | def GetLabel(*args, **kwargs): | |
15afbcd0 | 8510 | """ |
a95a7133 | 8511 | GetLabel(self) -> String |
15afbcd0 RD |
8512 | |
8513 | Return a control's text. | |
8514 | """ | |
54f9ee45 | 8515 | return _core_.Control_GetLabel(*args, **kwargs) |
e811c8ce RD |
8516 | |
8517 | def SetLabel(*args, **kwargs): | |
15afbcd0 | 8518 | """ |
a95a7133 | 8519 | SetLabel(self, String label) |
15afbcd0 RD |
8520 | |
8521 | Sets the item's text. | |
8522 | """ | |
54f9ee45 | 8523 | return _core_.Control_SetLabel(*args, **kwargs) |
e811c8ce | 8524 | |
74a57fcd | 8525 | def GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
8526 | """ |
8527 | GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
8528 | ||
8529 | Get the default attributes for this class. This is useful if you want | |
8530 | to use the same font or colour in your own control as in a standard | |
8531 | control -- which is a much better idea than hard coding specific | |
8532 | colours or fonts which might look completely out of place on the | |
8533 | user's system, especially if it uses themes. | |
8534 | ||
8535 | The variant parameter is only relevant under Mac currently and is | |
8536 | ignore under other platforms. Under Mac, it will change the size of | |
8537 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
8538 | this. | |
8539 | """ | |
54f9ee45 | 8540 | return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd RD |
8541 | |
8542 | GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) | |
d14a1e28 RD |
8543 | |
8544 | class ControlPtr(Control): | |
8545 | def __init__(self, this): | |
8546 | self.this = this | |
8547 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8548 | self.__class__ = Control | |
54f9ee45 | 8549 | _core_.Control_swigregister(ControlPtr) |
b2dc1044 | 8550 | ControlNameStr = cvar.ControlNameStr |
d14a1e28 RD |
8551 | |
8552 | def PreControl(*args, **kwargs): | |
15afbcd0 RD |
8553 | """ |
8554 | PreControl() -> Control | |
8555 | ||
8556 | Precreate a Control control for 2-phase creation | |
8557 | """ | |
54f9ee45 | 8558 | val = _core_.new_PreControl(*args, **kwargs) |
d14a1e28 RD |
8559 | val.thisown = 1 |
8560 | return val | |
8561 | ||
74a57fcd | 8562 | def Control_GetClassDefaultAttributes(*args, **kwargs): |
110da5b0 RD |
8563 | """ |
8564 | Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes | |
8565 | ||
8566 | Get the default attributes for this class. This is useful if you want | |
8567 | to use the same font or colour in your own control as in a standard | |
8568 | control -- which is a much better idea than hard coding specific | |
8569 | colours or fonts which might look completely out of place on the | |
8570 | user's system, especially if it uses themes. | |
8571 | ||
8572 | The variant parameter is only relevant under Mac currently and is | |
8573 | ignore under other platforms. Under Mac, it will change the size of | |
8574 | the returned font. See `wx.Window.SetWindowVariant` for more about | |
8575 | this. | |
8576 | """ | |
54f9ee45 | 8577 | return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) |
74a57fcd | 8578 | |
d14a1e28 RD |
8579 | #--------------------------------------------------------------------------- |
8580 | ||
8581 | class ItemContainer(object): | |
15afbcd0 RD |
8582 | """ |
8583 | wx.ItemContainer defines an interface which is implemented by all | |
41e2b43e RD |
8584 | controls which have string subitems, each of which may be selected, |
8585 | such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as | |
8586 | `wx.ComboBox` which implements an extended interface deriving from | |
8587 | this one. | |
15afbcd0 | 8588 | |
41e2b43e RD |
8589 | It defines the methods for accessing the control's items and although |
8590 | each of the derived classes implements them differently, they still | |
8591 | all conform to the same interface. | |
15afbcd0 | 8592 | |
41e2b43e RD |
8593 | The items in a wx.ItemContainer have (non empty) string labels and, |
8594 | optionally, client data associated with them. | |
15afbcd0 RD |
8595 | |
8596 | """ | |
d14a1e28 RD |
8597 | def __init__(self): raise RuntimeError, "No constructor defined" |
8598 | def __repr__(self): | |
8599 | return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 8600 | def Append(*args, **kwargs): |
15afbcd0 | 8601 | """ |
a95a7133 | 8602 | Append(self, String item, PyObject clientData=None) -> int |
15afbcd0 | 8603 | |
41e2b43e RD |
8604 | Adds the item to the control, associating the given data with the item |
8605 | if not None. The return value is the index of the newly added item | |
8606 | which may be different from the last one if the control is sorted (e.g. | |
8607 | has wx.LB_SORT or wx.CB_SORT style). | |
15afbcd0 | 8608 | """ |
54f9ee45 | 8609 | return _core_.ItemContainer_Append(*args, **kwargs) |
e811c8ce RD |
8610 | |
8611 | def AppendItems(*args, **kwargs): | |
15afbcd0 | 8612 | """ |
f5b96ee1 | 8613 | AppendItems(self, List strings) |
15afbcd0 | 8614 | |
41e2b43e RD |
8615 | Apend several items at once to the control. Notice that calling this |
8616 | method may be much faster than appending the items one by one if you | |
8617 | need to add a lot of items. | |
15afbcd0 | 8618 | """ |
54f9ee45 | 8619 | return _core_.ItemContainer_AppendItems(*args, **kwargs) |
e811c8ce RD |
8620 | |
8621 | def Insert(*args, **kwargs): | |
15afbcd0 | 8622 | """ |
a95a7133 | 8623 | Insert(self, String item, int pos, PyObject clientData=None) -> int |
15afbcd0 | 8624 | |
41e2b43e | 8625 | Insert an item into the control before the item at the ``pos`` index, |
15afbcd0 RD |
8626 | optionally associating some data object with the item. |
8627 | """ | |
54f9ee45 | 8628 | return _core_.ItemContainer_Insert(*args, **kwargs) |
e811c8ce RD |
8629 | |
8630 | def Clear(*args, **kwargs): | |
15afbcd0 | 8631 | """ |
a95a7133 | 8632 | Clear(self) |
15afbcd0 RD |
8633 | |
8634 | Removes all items from the control. | |
8635 | """ | |
54f9ee45 | 8636 | return _core_.ItemContainer_Clear(*args, **kwargs) |
e811c8ce RD |
8637 | |
8638 | def Delete(*args, **kwargs): | |
15afbcd0 | 8639 | """ |
a95a7133 | 8640 | Delete(self, int n) |
15afbcd0 | 8641 | |
41e2b43e RD |
8642 | Deletes the item at the zero-based index 'n' from the control. Note |
8643 | that it is an error (signalled by a `wx.PyAssertionError` exception if | |
8644 | enabled) to remove an item with the index negative or greater or equal | |
8645 | than the number of items in the control. | |
15afbcd0 | 8646 | """ |
54f9ee45 | 8647 | return _core_.ItemContainer_Delete(*args, **kwargs) |
e811c8ce RD |
8648 | |
8649 | def GetCount(*args, **kwargs): | |
15afbcd0 | 8650 | """ |
a95a7133 | 8651 | GetCount(self) -> int |
15afbcd0 RD |
8652 | |
8653 | Returns the number of items in the control. | |
8654 | """ | |
54f9ee45 | 8655 | return _core_.ItemContainer_GetCount(*args, **kwargs) |
e811c8ce RD |
8656 | |
8657 | def IsEmpty(*args, **kwargs): | |
15afbcd0 | 8658 | """ |
a95a7133 | 8659 | IsEmpty(self) -> bool |
15afbcd0 RD |
8660 | |
8661 | Returns True if the control is empty or False if it has some items. | |
8662 | """ | |
54f9ee45 | 8663 | return _core_.ItemContainer_IsEmpty(*args, **kwargs) |
e811c8ce RD |
8664 | |
8665 | def GetString(*args, **kwargs): | |
15afbcd0 | 8666 | """ |
a95a7133 | 8667 | GetString(self, int n) -> String |
15afbcd0 RD |
8668 | |
8669 | Returns the label of the item with the given index. | |
8670 | """ | |
54f9ee45 | 8671 | return _core_.ItemContainer_GetString(*args, **kwargs) |
e811c8ce RD |
8672 | |
8673 | def GetStrings(*args, **kwargs): | |
a95a7133 | 8674 | """GetStrings(self) -> wxArrayString""" |
54f9ee45 | 8675 | return _core_.ItemContainer_GetStrings(*args, **kwargs) |
e811c8ce RD |
8676 | |
8677 | def SetString(*args, **kwargs): | |
15afbcd0 | 8678 | """ |
a95a7133 | 8679 | SetString(self, int n, String s) |
15afbcd0 RD |
8680 | |
8681 | Sets the label for the given item. | |
8682 | """ | |
54f9ee45 | 8683 | return _core_.ItemContainer_SetString(*args, **kwargs) |
e811c8ce RD |
8684 | |
8685 | def FindString(*args, **kwargs): | |
15afbcd0 | 8686 | """ |
a95a7133 | 8687 | FindString(self, String s) -> int |
15afbcd0 RD |
8688 | |
8689 | Finds an item whose label matches the given string. Returns the | |
41e2b43e RD |
8690 | zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not |
8691 | found. | |
15afbcd0 | 8692 | """ |
54f9ee45 | 8693 | return _core_.ItemContainer_FindString(*args, **kwargs) |
e811c8ce RD |
8694 | |
8695 | def Select(*args, **kwargs): | |
15afbcd0 | 8696 | """ |
a95a7133 | 8697 | Select(self, int n) |
15afbcd0 RD |
8698 | |
8699 | Sets the item at index 'n' to be the selected item. | |
8700 | """ | |
54f9ee45 | 8701 | return _core_.ItemContainer_Select(*args, **kwargs) |
e811c8ce | 8702 | |
15afbcd0 | 8703 | SetSelection = Select |
e811c8ce | 8704 | def GetSelection(*args, **kwargs): |
15afbcd0 | 8705 | """ |
a95a7133 | 8706 | GetSelection(self) -> int |
15afbcd0 | 8707 | |
41e2b43e RD |
8708 | Returns the index of the selected item or ``wx.NOT_FOUND`` if no item |
8709 | is selected. | |
15afbcd0 | 8710 | """ |
54f9ee45 | 8711 | return _core_.ItemContainer_GetSelection(*args, **kwargs) |
e811c8ce RD |
8712 | |
8713 | def GetStringSelection(*args, **kwargs): | |
15afbcd0 | 8714 | """ |
a95a7133 | 8715 | GetStringSelection(self) -> String |
15afbcd0 | 8716 | |
41e2b43e RD |
8717 | Returns the label of the selected item or an empty string if no item |
8718 | is selected. | |
15afbcd0 | 8719 | """ |
54f9ee45 | 8720 | return _core_.ItemContainer_GetStringSelection(*args, **kwargs) |
e811c8ce RD |
8721 | |
8722 | def GetClientData(*args, **kwargs): | |
15afbcd0 | 8723 | """ |
a95a7133 | 8724 | GetClientData(self, int n) -> PyObject |
15afbcd0 RD |
8725 | |
8726 | Returns the client data associated with the given item, (if any.) | |
8727 | """ | |
54f9ee45 | 8728 | return _core_.ItemContainer_GetClientData(*args, **kwargs) |
e811c8ce RD |
8729 | |
8730 | def SetClientData(*args, **kwargs): | |
15afbcd0 | 8731 | """ |
a95a7133 | 8732 | SetClientData(self, int n, PyObject clientData) |
15afbcd0 RD |
8733 | |
8734 | Associate the given client data with the item at position n. | |
8735 | """ | |
54f9ee45 | 8736 | return _core_.ItemContainer_SetClientData(*args, **kwargs) |
e811c8ce | 8737 | |
d14a1e28 RD |
8738 | |
8739 | class ItemContainerPtr(ItemContainer): | |
8740 | def __init__(self, this): | |
8741 | self.this = this | |
8742 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8743 | self.__class__ = ItemContainer | |
54f9ee45 | 8744 | _core_.ItemContainer_swigregister(ItemContainerPtr) |
d14a1e28 RD |
8745 | |
8746 | #--------------------------------------------------------------------------- | |
8747 | ||
8748 | class ControlWithItems(Control,ItemContainer): | |
15afbcd0 | 8749 | """ |
41e2b43e RD |
8750 | wx.ControlWithItems combines the ``wx.ItemContainer`` class with the |
8751 | wx.Control class, and is used for the base class of various controls | |
8752 | that have items. | |
15afbcd0 | 8753 | """ |
d14a1e28 RD |
8754 | def __init__(self): raise RuntimeError, "No constructor defined" |
8755 | def __repr__(self): | |
8756 | return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
8757 | ||
8758 | class ControlWithItemsPtr(ControlWithItems): | |
8759 | def __init__(self, this): | |
8760 | self.this = this | |
8761 | if not hasattr(self,"thisown"): self.thisown = 0 | |
8762 | self.__class__ = ControlWithItems | |
54f9ee45 | 8763 | _core_.ControlWithItems_swigregister(ControlWithItemsPtr) |
d14a1e28 RD |
8764 | |
8765 | #--------------------------------------------------------------------------- | |
8766 | ||
8767 | class SizerItem(Object): | |
248ed943 RD |
8768 | """ |
8769 | The wx.SizerItem class is used to track the position, size and other | |
8770 | attributes of each item managed by a `wx.Sizer`. In normal usage user | |
8771 | code should never need to deal directly with a wx.SizerItem, but | |
8772 | custom classes derived from `wx.PySizer` will probably need to use the | |
8773 | collection of wx.SizerItems held by wx.Sizer when calculating layout. | |
8774 | ||
8775 | :see: `wx.Sizer`, `wx.GBSizerItem` | |
8776 | """ | |
e811c8ce RD |
8777 | def __repr__(self): |
8778 | return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 8779 | def __init__(self, *args, **kwargs): |
248ed943 RD |
8780 | """ |
8781 | __init__(self) -> SizerItem | |
8782 | ||
8783 | Constructs an empty wx.SizerItem. Either a window, sizer or spacer | |
8784 | size will need to be set before this item can be used in a Sizer. | |
8785 | ||
8786 | You will probably never need to create a wx.SizerItem directly as they | |
8787 | are created automatically when the sizer's Add, Insert or Prepend | |
8788 | methods are called. | |
8789 | ||
8790 | :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer` | |
8791 | """ | |
54f9ee45 | 8792 | newobj = _core_.new_SizerItem(*args, **kwargs) |
d14a1e28 RD |
8793 | self.this = newobj.this |
8794 | self.thisown = 1 | |
8795 | del newobj.thisown | |
e811c8ce | 8796 | def DeleteWindows(*args, **kwargs): |
248ed943 RD |
8797 | """ |
8798 | DeleteWindows(self) | |
8799 | ||
8800 | Destroy the window or the windows in a subsizer, depending on the type | |
8801 | of item. | |
8802 | """ | |
54f9ee45 | 8803 | return _core_.SizerItem_DeleteWindows(*args, **kwargs) |
e811c8ce RD |
8804 | |
8805 | def DetachSizer(*args, **kwargs): | |
248ed943 RD |
8806 | """ |
8807 | DetachSizer(self) | |
8808 | ||
8809 | Enable deleting the SizerItem without destroying the contained sizer. | |
8810 | """ | |
54f9ee45 | 8811 | return _core_.SizerItem_DetachSizer(*args, **kwargs) |
e811c8ce RD |
8812 | |
8813 | def GetSize(*args, **kwargs): | |
248ed943 RD |
8814 | """ |
8815 | GetSize(self) -> Size | |
8816 | ||
8817 | Get the current size of the item, as set in the last Layout. | |
8818 | """ | |
54f9ee45 | 8819 | return _core_.SizerItem_GetSize(*args, **kwargs) |
e811c8ce RD |
8820 | |
8821 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
8822 | """ |
8823 | CalcMin(self) -> Size | |
8824 | ||
8825 | Calculates the minimum desired size for the item, including any space | |
8826 | needed by borders. | |
8827 | """ | |
54f9ee45 | 8828 | return _core_.SizerItem_CalcMin(*args, **kwargs) |
e811c8ce RD |
8829 | |
8830 | def SetDimension(*args, **kwargs): | |
248ed943 RD |
8831 | """ |
8832 | SetDimension(self, Point pos, Size size) | |
8833 | ||
8834 | Set the position and size of the space allocated for this item by the | |
8835 | sizer, and adjust the position and size of the item (window or | |
8836 | subsizer) to be within that space taking alignment and borders into | |
8837 | account. | |
8838 | """ | |
54f9ee45 | 8839 | return _core_.SizerItem_SetDimension(*args, **kwargs) |
e811c8ce RD |
8840 | |
8841 | def GetMinSize(*args, **kwargs): | |
248ed943 RD |
8842 | """ |
8843 | GetMinSize(self) -> Size | |
8844 | ||
8845 | Get the minimum size needed for the item. | |
8846 | """ | |
54f9ee45 | 8847 | return _core_.SizerItem_GetMinSize(*args, **kwargs) |
e811c8ce | 8848 | |
dfbb5885 RD |
8849 | def GetMinSizeWithBorder(*args, **kwargs): |
8850 | """ | |
8851 | GetMinSizeWithBorder(self) -> Size | |
8852 | ||
8853 | Get the minimum size needed for the item with space for the borders | |
8854 | added, if needed. | |
8855 | """ | |
8856 | return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs) | |
8857 | ||
e811c8ce | 8858 | def SetInitSize(*args, **kwargs): |
a95a7133 | 8859 | """SetInitSize(self, int x, int y)""" |
54f9ee45 | 8860 | return _core_.SizerItem_SetInitSize(*args, **kwargs) |
e811c8ce RD |
8861 | |
8862 | def SetRatioWH(*args, **kwargs): | |
248ed943 RD |
8863 | """ |
8864 | SetRatioWH(self, int width, int height) | |
8865 | ||
8866 | Set the ratio item attribute. | |
8867 | """ | |
54f9ee45 | 8868 | return _core_.SizerItem_SetRatioWH(*args, **kwargs) |
e811c8ce RD |
8869 | |
8870 | def SetRatioSize(*args, **kwargs): | |
248ed943 RD |
8871 | """ |
8872 | SetRatioSize(self, Size size) | |
8873 | ||
8874 | Set the ratio item attribute. | |
8875 | """ | |
54f9ee45 | 8876 | return _core_.SizerItem_SetRatioSize(*args, **kwargs) |
e811c8ce RD |
8877 | |
8878 | def SetRatio(*args, **kwargs): | |
248ed943 RD |
8879 | """ |
8880 | SetRatio(self, float ratio) | |
8881 | ||
8882 | Set the ratio item attribute. | |
8883 | """ | |
54f9ee45 | 8884 | return _core_.SizerItem_SetRatio(*args, **kwargs) |
e811c8ce RD |
8885 | |
8886 | def GetRatio(*args, **kwargs): | |
248ed943 RD |
8887 | """ |
8888 | GetRatio(self) -> float | |
8889 | ||
8890 | Set the ratio item attribute. | |
8891 | """ | |
54f9ee45 | 8892 | return _core_.SizerItem_GetRatio(*args, **kwargs) |
e811c8ce RD |
8893 | |
8894 | def IsWindow(*args, **kwargs): | |
248ed943 RD |
8895 | """ |
8896 | IsWindow(self) -> bool | |
8897 | ||
8898 | Is this sizer item a window? | |
8899 | """ | |
54f9ee45 | 8900 | return _core_.SizerItem_IsWindow(*args, **kwargs) |
e811c8ce RD |
8901 | |
8902 | def IsSizer(*args, **kwargs): | |
248ed943 RD |
8903 | """ |
8904 | IsSizer(self) -> bool | |
8905 | ||
8906 | Is this sizer item a subsizer? | |
8907 | """ | |
54f9ee45 | 8908 | return _core_.SizerItem_IsSizer(*args, **kwargs) |
e811c8ce RD |
8909 | |
8910 | def IsSpacer(*args, **kwargs): | |
248ed943 RD |
8911 | """ |
8912 | IsSpacer(self) -> bool | |
8913 | ||
8914 | Is this sizer item a spacer? | |
8915 | """ | |
54f9ee45 | 8916 | return _core_.SizerItem_IsSpacer(*args, **kwargs) |
e811c8ce RD |
8917 | |
8918 | def SetProportion(*args, **kwargs): | |
248ed943 RD |
8919 | """ |
8920 | SetProportion(self, int proportion) | |
8921 | ||
8922 | Set the proportion value for this item. | |
8923 | """ | |
54f9ee45 | 8924 | return _core_.SizerItem_SetProportion(*args, **kwargs) |
e811c8ce RD |
8925 | |
8926 | def GetProportion(*args, **kwargs): | |
248ed943 RD |
8927 | """ |
8928 | GetProportion(self) -> int | |
8929 | ||
8930 | Get the proportion value for this item. | |
8931 | """ | |
54f9ee45 | 8932 | return _core_.SizerItem_GetProportion(*args, **kwargs) |
e811c8ce | 8933 | |
248ed943 RD |
8934 | SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.") |
8935 | GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.") | |
e811c8ce | 8936 | def SetFlag(*args, **kwargs): |
248ed943 RD |
8937 | """ |
8938 | SetFlag(self, int flag) | |
8939 | ||
8940 | Set the flag value for this item. | |
8941 | """ | |
54f9ee45 | 8942 | return _core_.SizerItem_SetFlag(*args, **kwargs) |
e811c8ce RD |
8943 | |
8944 | def GetFlag(*args, **kwargs): | |
248ed943 RD |
8945 | """ |
8946 | GetFlag(self) -> int | |
8947 | ||
8948 | Get the flag value for this item. | |
8949 | """ | |
54f9ee45 | 8950 | return _core_.SizerItem_GetFlag(*args, **kwargs) |
e811c8ce RD |
8951 | |
8952 | def SetBorder(*args, **kwargs): | |
248ed943 RD |
8953 | """ |
8954 | SetBorder(self, int border) | |
8955 | ||
8956 | Set the border value for this item. | |
8957 | """ | |
54f9ee45 | 8958 | return _core_.SizerItem_SetBorder(*args, **kwargs) |
e811c8ce RD |
8959 | |
8960 | def GetBorder(*args, **kwargs): | |
248ed943 RD |
8961 | """ |
8962 | GetBorder(self) -> int | |
8963 | ||
8964 | Get the border value for this item. | |
8965 | """ | |
54f9ee45 | 8966 | return _core_.SizerItem_GetBorder(*args, **kwargs) |
e811c8ce RD |
8967 | |
8968 | def GetWindow(*args, **kwargs): | |
248ed943 RD |
8969 | """ |
8970 | GetWindow(self) -> Window | |
8971 | ||
8972 | Get the window (if any) that is managed by this sizer item. | |
8973 | """ | |
54f9ee45 | 8974 | return _core_.SizerItem_GetWindow(*args, **kwargs) |
e811c8ce RD |
8975 | |
8976 | def SetWindow(*args, **kwargs): | |
248ed943 RD |
8977 | """ |
8978 | SetWindow(self, Window window) | |
8979 | ||
8980 | Set the window to be managed by this sizer item. | |
8981 | """ | |
54f9ee45 | 8982 | return _core_.SizerItem_SetWindow(*args, **kwargs) |
e811c8ce RD |
8983 | |
8984 | def GetSizer(*args, **kwargs): | |
248ed943 RD |
8985 | """ |
8986 | GetSizer(self) -> Sizer | |
8987 | ||
8988 | Get the subsizer (if any) that is managed by this sizer item. | |
8989 | """ | |
54f9ee45 | 8990 | return _core_.SizerItem_GetSizer(*args, **kwargs) |
e811c8ce RD |
8991 | |
8992 | def SetSizer(*args, **kwargs): | |
248ed943 RD |
8993 | """ |
8994 | SetSizer(self, Sizer sizer) | |
8995 | ||
8996 | Set the subsizer to be managed by this sizer item. | |
8997 | """ | |
54f9ee45 | 8998 | return _core_.SizerItem_SetSizer(*args, **kwargs) |
e811c8ce RD |
8999 | |
9000 | def GetSpacer(*args, **kwargs): | |
248ed943 RD |
9001 | """ |
9002 | GetSpacer(self) -> Size | |
9003 | ||
9004 | Get the size of the spacer managed by this sizer item. | |
9005 | """ | |
54f9ee45 | 9006 | return _core_.SizerItem_GetSpacer(*args, **kwargs) |
e811c8ce RD |
9007 | |
9008 | def SetSpacer(*args, **kwargs): | |
248ed943 RD |
9009 | """ |
9010 | SetSpacer(self, Size size) | |
9011 | ||
9012 | Set the size of the spacer to be managed by this sizer item. | |
9013 | """ | |
54f9ee45 | 9014 | return _core_.SizerItem_SetSpacer(*args, **kwargs) |
e811c8ce RD |
9015 | |
9016 | def Show(*args, **kwargs): | |
248ed943 RD |
9017 | """ |
9018 | Show(self, bool show) | |
9019 | ||
9020 | Set the show item attribute, which sizers use to determine if the item | |
9021 | is to be made part of the layout or not. If the item is tracking a | |
9022 | window then it is shown or hidden as needed. | |
9023 | """ | |
54f9ee45 | 9024 | return _core_.SizerItem_Show(*args, **kwargs) |
e811c8ce RD |
9025 | |
9026 | def IsShown(*args, **kwargs): | |
248ed943 RD |
9027 | """ |
9028 | IsShown(self) -> bool | |
9029 | ||
9030 | Is the item to be shown in the layout? | |
9031 | """ | |
54f9ee45 | 9032 | return _core_.SizerItem_IsShown(*args, **kwargs) |
e811c8ce RD |
9033 | |
9034 | def GetPosition(*args, **kwargs): | |
248ed943 RD |
9035 | """ |
9036 | GetPosition(self) -> Point | |
9037 | ||
9038 | Returns the current position of the item, as set in the last Layout. | |
9039 | """ | |
54f9ee45 | 9040 | return _core_.SizerItem_GetPosition(*args, **kwargs) |
e811c8ce RD |
9041 | |
9042 | def GetUserData(*args, **kwargs): | |
248ed943 RD |
9043 | """ |
9044 | GetUserData(self) -> PyObject | |
9045 | ||
9046 | Returns the userData associated with this sizer item, or None if there | |
9047 | isn't any. | |
9048 | """ | |
54f9ee45 | 9049 | return _core_.SizerItem_GetUserData(*args, **kwargs) |
e811c8ce | 9050 | |
d14a1e28 RD |
9051 | |
9052 | class SizerItemPtr(SizerItem): | |
9053 | def __init__(self, this): | |
9054 | self.this = this | |
9055 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9056 | self.__class__ = SizerItem | |
54f9ee45 | 9057 | _core_.SizerItem_swigregister(SizerItemPtr) |
d14a1e28 | 9058 | |
248ed943 | 9059 | def SizerItemWindow(*args, **kwargs): |
0df68c9f | 9060 | """ |
248ed943 RD |
9061 | SizerItemWindow(Window window, int proportion, int flag, int border, |
9062 | PyObject userData=None) -> SizerItem | |
9063 | ||
9064 | Constructs a `wx.SizerItem` for tracking a window. | |
0df68c9f | 9065 | """ |
248ed943 | 9066 | val = _core_.new_SizerItemWindow(*args, **kwargs) |
d14a1e28 RD |
9067 | val.thisown = 1 |
9068 | return val | |
9069 | ||
248ed943 | 9070 | def SizerItemSpacer(*args, **kwargs): |
0df68c9f | 9071 | """ |
248ed943 RD |
9072 | SizerItemSpacer(int width, int height, int proportion, int flag, int border, |
9073 | PyObject userData=None) -> SizerItem | |
9074 | ||
9075 | Constructs a `wx.SizerItem` for tracking a spacer. | |
0df68c9f | 9076 | """ |
248ed943 | 9077 | val = _core_.new_SizerItemSpacer(*args, **kwargs) |
d14a1e28 RD |
9078 | val.thisown = 1 |
9079 | return val | |
9080 | ||
9081 | def SizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
9082 | """ |
9083 | SizerItemSizer(Sizer sizer, int proportion, int flag, int border, | |
248ed943 RD |
9084 | PyObject userData=None) -> SizerItem |
9085 | ||
9086 | Constructs a `wx.SizerItem` for tracking a subsizer | |
0df68c9f | 9087 | """ |
54f9ee45 | 9088 | val = _core_.new_SizerItemSizer(*args, **kwargs) |
d14a1e28 RD |
9089 | val.thisown = 1 |
9090 | return val | |
9091 | ||
9092 | class Sizer(Object): | |
248ed943 RD |
9093 | """ |
9094 | wx.Sizer is the abstract base class used for laying out subwindows in | |
9095 | a window. You cannot use wx.Sizer directly; instead, you will have to | |
9096 | use one of the sizer classes derived from it such as `wx.BoxSizer`, | |
9097 | `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer` | |
9098 | and `wx.GridBagSizer`. | |
9099 | ||
9100 | The concept implemented by sizers in wxWidgets is closely related to | |
9101 | layout tools in other GUI toolkits, such as Java's AWT, the GTK | |
9102 | toolkit or the Qt toolkit. It is based upon the idea of the individual | |
9103 | subwindows reporting their minimal required size and their ability to | |
9104 | get stretched if the size of the parent window has changed. This will | |
9105 | most often mean that the programmer does not set the original size of | |
9106 | a dialog in the beginning, rather the dialog will assigned a sizer and | |
9107 | this sizer will be queried about the recommended size. The sizer in | |
9108 | turn will query its children, which can be normal windows or contorls, | |
9109 | empty space or other sizers, so that a hierarchy of sizers can be | |
9110 | constructed. Note that wxSizer does not derive from wxWindow and thus | |
9111 | do not interfere with tab ordering and requires very little resources | |
9112 | compared to a real window on screen. | |
9113 | ||
9114 | What makes sizers so well fitted for use in wxWidgets is the fact that | |
9115 | every control reports its own minimal size and the algorithm can | |
9116 | handle differences in font sizes or different window (dialog item) | |
9117 | sizes on different platforms without problems. If for example the | |
9118 | standard font as well as the overall design of Mac widgets requires | |
9119 | more space than on Windows, then the initial size of a dialog using a | |
9120 | sizer will automatically be bigger on Mac than on Windows. | |
9121 | """ | |
e811c8ce RD |
9122 | def __init__(self): raise RuntimeError, "No constructor defined" |
9123 | def __repr__(self): | |
9124 | return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
9125 | def _setOORInfo(*args, **kwargs): | |
a95a7133 | 9126 | """_setOORInfo(self, PyObject _self)""" |
54f9ee45 | 9127 | return _core_.Sizer__setOORInfo(*args, **kwargs) |
e811c8ce RD |
9128 | |
9129 | def Add(*args, **kwargs): | |
0df68c9f | 9130 | """ |
248ed943 | 9131 | Add(self, item, int proportion=0, int flag=0, int border=0, |
0df68c9f | 9132 | PyObject userData=None) |
248ed943 RD |
9133 | |
9134 | Appends a child item to the sizer. | |
0df68c9f | 9135 | """ |
54f9ee45 | 9136 | return _core_.Sizer_Add(*args, **kwargs) |
e811c8ce RD |
9137 | |
9138 | def Insert(*args, **kwargs): | |
0df68c9f | 9139 | """ |
248ed943 RD |
9140 | Insert(self, int before, item, int proportion=0, int flag=0, int border=0, |
9141 | PyObject userData=None) | |
9142 | ||
9143 | Inserts a new item into the list of items managed by this sizer before | |
9144 | the item at index *before*. See `Add` for a description of the parameters. | |
0df68c9f | 9145 | """ |
54f9ee45 | 9146 | return _core_.Sizer_Insert(*args, **kwargs) |
e811c8ce RD |
9147 | |
9148 | def Prepend(*args, **kwargs): | |
0df68c9f | 9149 | """ |
248ed943 | 9150 | Prepend(self, item, int proportion=0, int flag=0, int border=0, |
0df68c9f | 9151 | PyObject userData=None) |
248ed943 RD |
9152 | |
9153 | Adds a new item to the begining of the list of sizer items managed by | |
9154 | this sizer. See `Add` for a description of the parameters. | |
0df68c9f | 9155 | """ |
54f9ee45 | 9156 | return _core_.Sizer_Prepend(*args, **kwargs) |
e811c8ce RD |
9157 | |
9158 | def Remove(*args, **kwargs): | |
248ed943 RD |
9159 | """ |
9160 | Remove(self, item) -> bool | |
9161 | ||
9162 | Removes an item from the sizer and destroys it. This method does not | |
9163 | cause any layout or resizing to take place, call `Layout` to update | |
9164 | the layout on screen after removing a child from the sizer. The | |
9165 | *item* parameter can be either a window, a sizer, or the zero-based | |
9166 | index of an item to remove. Returns True if the child item was found | |
9167 | and removed. | |
9168 | """ | |
54f9ee45 | 9169 | return _core_.Sizer_Remove(*args, **kwargs) |
e811c8ce | 9170 | |
1c0f361b | 9171 | def Detach(*args, **kwargs): |
248ed943 RD |
9172 | """ |
9173 | Detach(self, item) -> bool | |
9174 | ||
9175 | Detaches an item from the sizer without destroying it. This method | |
9176 | does not cause any layout or resizing to take place, call `Layout` to | |
9177 | do so. The *item* parameter can be either a window, a sizer, or the | |
9178 | zero-based index of the item to be detached. Returns True if the child item | |
9179 | was found and detached. | |
9180 | """ | |
1c0f361b RD |
9181 | return _core_.Sizer_Detach(*args, **kwargs) |
9182 | ||
e811c8ce | 9183 | def _SetItemMinSize(*args, **kwargs): |
a95a7133 | 9184 | """_SetItemMinSize(self, PyObject item, Size size)""" |
54f9ee45 | 9185 | return _core_.Sizer__SetItemMinSize(*args, **kwargs) |
e811c8ce | 9186 | |
248ed943 RD |
9187 | def SetItemMinSize(self, item, *args): |
9188 | """ | |
9189 | SetItemMinSize(self, item, Size size) | |
9190 | ||
9191 | Sets the minimum size that will be allocated for an item in the sizer. | |
9192 | The *item* parameter can be either a window, a sizer, or the | |
9193 | zero-based index of the item. If a window or sizer is given then it | |
9194 | will be searched for recursivly in subsizers if neccessary. | |
9195 | """ | |
9196 | if len(args) == 2: | |
9197 | # for backward compatibility accept separate width,height args too | |
9198 | return self._SetItemMinSize(item, args) | |
9199 | else: | |
9200 | return self._SetItemMinSize(item, args[0]) | |
9201 | ||
e811c8ce | 9202 | def AddItem(*args, **kwargs): |
248ed943 RD |
9203 | """ |
9204 | AddItem(self, SizerItem item) | |
9205 | ||
9206 | Adds a `wx.SizerItem` to the sizer. | |
9207 | """ | |
54f9ee45 | 9208 | return _core_.Sizer_AddItem(*args, **kwargs) |
e811c8ce RD |
9209 | |
9210 | def InsertItem(*args, **kwargs): | |
248ed943 RD |
9211 | """ |
9212 | InsertItem(self, int index, SizerItem item) | |
9213 | ||
9214 | Inserts a `wx.SizerItem` to the sizer at the position given by *index*. | |
9215 | """ | |
54f9ee45 | 9216 | return _core_.Sizer_InsertItem(*args, **kwargs) |
e811c8ce RD |
9217 | |
9218 | def PrependItem(*args, **kwargs): | |
248ed943 RD |
9219 | """ |
9220 | PrependItem(self, SizerItem item) | |
9221 | ||
9222 | Prepends a `wx.SizerItem` to the sizer. | |
9223 | """ | |
54f9ee45 | 9224 | return _core_.Sizer_PrependItem(*args, **kwargs) |
e811c8ce | 9225 | |
248ed943 | 9226 | def AddMany(self, items): |
66c033b4 RD |
9227 | """ |
9228 | AddMany is a convenience method for adding several items | |
9229 | to a sizer at one time. Simply pass it a list of tuples, | |
9230 | where each tuple consists of the parameters that you | |
9231 | would normally pass to the `Add` method. | |
9232 | """ | |
248ed943 RD |
9233 | for item in items: |
9234 | if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)): | |
9235 | item = (item, ) | |
9236 | self.Add(*item) | |
d14a1e28 | 9237 | |
74e96f3d | 9238 | # for backwards compatibility only, please do not use in new code |
66c033b4 RD |
9239 | AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.") |
9240 | AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.") | |
9241 | AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.") | |
9242 | PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.") | |
9243 | PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.") | |
9244 | PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.") | |
9245 | InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.") | |
9246 | InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.") | |
9247 | InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.") | |
9248 | RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.") | |
9249 | RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.") | |
9250 | RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.") | |
d14a1e28 RD |
9251 | |
9252 | ||
e811c8ce | 9253 | def SetDimension(*args, **kwargs): |
248ed943 RD |
9254 | """ |
9255 | SetDimension(self, int x, int y, int width, int height) | |
9256 | ||
9257 | Call this to force the sizer to take the given dimension and thus | |
9258 | force the items owned by the sizer to resize themselves according to | |
9259 | the rules defined by the parameter in the `Add`, `Insert` or `Prepend` | |
9260 | methods. | |
9261 | """ | |
54f9ee45 | 9262 | return _core_.Sizer_SetDimension(*args, **kwargs) |
e811c8ce RD |
9263 | |
9264 | def SetMinSize(*args, **kwargs): | |
248ed943 RD |
9265 | """ |
9266 | SetMinSize(self, Size size) | |
9267 | ||
9268 | Call this to give the sizer a minimal size. Normally, the sizer will | |
9269 | calculate its minimal size based purely on how much space its children | |
9270 | need. After calling this method `GetMinSize` will return either the | |
9271 | minimal size as requested by its children or the minimal size set | |
9272 | here, depending on which is bigger. | |
9273 | """ | |
54f9ee45 | 9274 | return _core_.Sizer_SetMinSize(*args, **kwargs) |
e811c8ce RD |
9275 | |
9276 | def GetSize(*args, **kwargs): | |
248ed943 RD |
9277 | """ |
9278 | GetSize(self) -> Size | |
9279 | ||
9280 | Returns the current size of the space managed by the sizer. | |
9281 | """ | |
54f9ee45 | 9282 | return _core_.Sizer_GetSize(*args, **kwargs) |
e811c8ce RD |
9283 | |
9284 | def GetPosition(*args, **kwargs): | |
248ed943 RD |
9285 | """ |
9286 | GetPosition(self) -> Point | |
9287 | ||
9288 | Returns the current position of the sizer's managed space. | |
9289 | """ | |
54f9ee45 | 9290 | return _core_.Sizer_GetPosition(*args, **kwargs) |
e811c8ce RD |
9291 | |
9292 | def GetMinSize(*args, **kwargs): | |
248ed943 RD |
9293 | """ |
9294 | GetMinSize(self) -> Size | |
9295 | ||
9296 | Returns the minimal size of the sizer. This is either the combined | |
9297 | minimal size of all the children and their borders or the minimal size | |
9298 | set by SetMinSize, depending on which is bigger. | |
9299 | """ | |
54f9ee45 | 9300 | return _core_.Sizer_GetMinSize(*args, **kwargs) |
e811c8ce | 9301 | |
d14a1e28 | 9302 | def GetSizeTuple(self): |
1c0f361b | 9303 | return self.GetSize().Get() |
d14a1e28 | 9304 | def GetPositionTuple(self): |
1c0f361b | 9305 | return self.GetPosition().Get() |
d14a1e28 | 9306 | def GetMinSizeTuple(self): |
1c0f361b | 9307 | return self.GetMinSize().Get() |
d14a1e28 | 9308 | |
e811c8ce | 9309 | def RecalcSizes(*args, **kwargs): |
248ed943 RD |
9310 | """ |
9311 | RecalcSizes(self) | |
9312 | ||
9313 | Using the sizes calculated by `CalcMin` reposition and resize all the | |
9314 | items managed by this sizer. You should not need to call this directly as | |
9315 | it is called by `Layout`. | |
9316 | """ | |
54f9ee45 | 9317 | return _core_.Sizer_RecalcSizes(*args, **kwargs) |
e811c8ce RD |
9318 | |
9319 | def CalcMin(*args, **kwargs): | |
248ed943 RD |
9320 | """ |
9321 | CalcMin(self) -> Size | |
9322 | ||
9323 | This method is where the sizer will do the actual calculation of its | |
9324 | children's minimal sizes. You should not need to call this directly as | |
9325 | it is called by `Layout`. | |
9326 | """ | |
54f9ee45 | 9327 | return _core_.Sizer_CalcMin(*args, **kwargs) |
e811c8ce RD |
9328 | |
9329 | def Layout(*args, **kwargs): | |
248ed943 RD |
9330 | """ |
9331 | Layout(self) | |
9332 | ||
9333 | This method will force the recalculation and layout of the items | |
9334 | controlled by the sizer using the current space allocated to the | |
9335 | sizer. Normally this is called automatically from the owning window's | |
9336 | EVT_SIZE handler, but it is also useful to call it from user code when | |
9337 | one of the items in a sizer change size, or items are added or | |
9338 | removed. | |
9339 | """ | |
54f9ee45 | 9340 | return _core_.Sizer_Layout(*args, **kwargs) |
e811c8ce RD |
9341 | |
9342 | def Fit(*args, **kwargs): | |
248ed943 RD |
9343 | """ |
9344 | Fit(self, Window window) -> Size | |
9345 | ||
9346 | Tell the sizer to resize the *window* to match the sizer's minimal | |
9347 | size. This is commonly done in the constructor of the window itself in | |
9348 | order to set its initial size to match the needs of the children as | |
9349 | determined by the sizer. Returns the new size. | |
9350 | ||
9351 | For a top level window this is the total window size, not the client size. | |
9352 | """ | |
54f9ee45 | 9353 | return _core_.Sizer_Fit(*args, **kwargs) |
e811c8ce RD |
9354 | |
9355 | def FitInside(*args, **kwargs): | |
248ed943 RD |
9356 | """ |
9357 | FitInside(self, Window window) | |
9358 | ||
9359 | Tell the sizer to resize the *virtual size* of the *window* to match the | |
9360 | sizer's minimal size. This will not alter the on screen size of the | |
9361 | window, but may cause the addition/removal/alteration of scrollbars | |
9362 | required to view the virtual area in windows which manage it. | |
9363 | ||
9364 | :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints` | |
9365 | ||
9366 | """ | |
54f9ee45 | 9367 | return _core_.Sizer_FitInside(*args, **kwargs) |
e811c8ce RD |
9368 | |
9369 | def SetSizeHints(*args, **kwargs): | |
248ed943 RD |
9370 | """ |
9371 | SetSizeHints(self, Window window) | |
9372 | ||
9373 | Tell the sizer to set (and `Fit`) the minimal size of the *window* to | |
9374 | match the sizer's minimal size. This is commonly done in the | |
9375 | constructor of the window itself if the window is resizable (as are | |
9376 | many dialogs under Unix and frames on probably all platforms) in order | |
9377 | to prevent the window from being sized smaller than the minimal size | |
9378 | required by the sizer. | |
9379 | """ | |
54f9ee45 | 9380 | return _core_.Sizer_SetSizeHints(*args, **kwargs) |
e811c8ce RD |
9381 | |
9382 | def SetVirtualSizeHints(*args, **kwargs): | |
248ed943 RD |
9383 | """ |
9384 | SetVirtualSizeHints(self, Window window) | |
9385 | ||
9386 | Tell the sizer to set the minimal size of the window virtual area to | |
9387 | match the sizer's minimal size. For windows with managed scrollbars | |
9388 | this will set them appropriately. | |
9389 | ||
9390 | :see: `wx.ScrolledWindow.SetScrollbars` | |
9391 | ||
9392 | """ | |
54f9ee45 | 9393 | return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs) |
e811c8ce RD |
9394 | |
9395 | def Clear(*args, **kwargs): | |
248ed943 RD |
9396 | """ |
9397 | Clear(self, bool deleteWindows=False) | |
9398 | ||
9399 | Clear all items from the sizer, optionally destroying the window items | |
9400 | as well. | |
9401 | """ | |
54f9ee45 | 9402 | return _core_.Sizer_Clear(*args, **kwargs) |
e811c8ce RD |
9403 | |
9404 | def DeleteWindows(*args, **kwargs): | |
248ed943 RD |
9405 | """ |
9406 | DeleteWindows(self) | |
9407 | ||
9408 | Destroy all windows managed by the sizer. | |
9409 | """ | |
54f9ee45 | 9410 | return _core_.Sizer_DeleteWindows(*args, **kwargs) |
e811c8ce RD |
9411 | |
9412 | def GetChildren(*args, **kwargs): | |
248ed943 RD |
9413 | """ |
9414 | GetChildren(sefl) -> list | |
9415 | ||
9416 | Returns a list of all the `wx.SizerItem` objects managed by the sizer. | |
9417 | """ | |
54f9ee45 | 9418 | return _core_.Sizer_GetChildren(*args, **kwargs) |
e811c8ce RD |
9419 | |
9420 | def Show(*args, **kwargs): | |
248ed943 | 9421 | """ |
ae8162c8 | 9422 | Show(self, item, bool show=True, bool recursive=false) -> bool |
e811c8ce | 9423 | |
248ed943 RD |
9424 | Shows or hides an item managed by the sizer. To make a sizer item |
9425 | disappear or reappear, use Show followed by `Layout`. The *item* | |
9426 | parameter can be either a window, a sizer, or the zero-based index of | |
7e63a440 RD |
9427 | the item. Use the recursive parameter to show or hide an item in a |
9428 | subsizer. Returns True if the item was found. | |
248ed943 RD |
9429 | """ |
9430 | return _core_.Sizer_Show(*args, **kwargs) | |
e811c8ce RD |
9431 | |
9432 | def IsShown(*args, **kwargs): | |
248ed943 RD |
9433 | """ |
9434 | IsShown(self, item) | |
9435 | ||
9436 | Determines if the item is currently shown. sizer. To make a sizer | |
9437 | item disappear or reappear, use Show followed by `Layout`. The *item* | |
9438 | parameter can be either a window, a sizer, or the zero-based index of | |
9439 | the item. | |
9440 | """ | |
54f9ee45 | 9441 | return _core_.Sizer_IsShown(*args, **kwargs) |
e811c8ce | 9442 | |
7e63a440 | 9443 | def Hide(self, item, recursive=False): |
248ed943 | 9444 | """ |
7e63a440 | 9445 | A convenience method for Show(item, False, recursive). |
248ed943 | 9446 | """ |
06759a38 | 9447 | return self.Show(item, False, recursive) |
248ed943 | 9448 | |
e811c8ce | 9449 | def ShowItems(*args, **kwargs): |
248ed943 RD |
9450 | """ |
9451 | ShowItems(self, bool show) | |
9452 | ||
84f85550 | 9453 | Recursively call `wx.SizerItem.Show` on all sizer items. |
248ed943 | 9454 | """ |
54f9ee45 | 9455 | return _core_.Sizer_ShowItems(*args, **kwargs) |
e811c8ce | 9456 | |
d14a1e28 RD |
9457 | |
9458 | class SizerPtr(Sizer): | |
9459 | def __init__(self, this): | |
9460 | self.this = this | |
9461 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9462 | self.__class__ = Sizer | |
54f9ee45 | 9463 | _core_.Sizer_swigregister(SizerPtr) |
d14a1e28 RD |
9464 | |
9465 | class PySizer(Sizer): | |
248ed943 RD |
9466 | """ |
9467 | wx.PySizer is a special version of `wx.Sizer` that has been | |
9468 | instrumented to allow the C++ virtual methods to be overloaded in | |
9469 | Python derived classes. You would derive from this class if you are | |
9470 | wanting to implement a custom sizer in Python code. Simply implement | |
9471 | `CalcMin` and `RecalcSizes` in the derived class and you're all set. | |
9472 | For example:: | |
9473 | ||
9474 | class MySizer(wx.PySizer): | |
9475 | def __init__(self): | |
9476 | wx.PySizer.__init__(self) | |
9477 | ||
9478 | def CalcMin(self): | |
9479 | for item in self.GetChildren(): | |
9480 | # calculate the total minimum width and height needed | |
9481 | # by all items in the sizer according to this sizer's | |
9482 | # layout algorithm. | |
9483 | ... | |
9484 | return wx.Size(width, height) | |
9485 | ||
9486 | def RecalcSizes(self): | |
9487 | # find the space allotted to this sizer | |
9488 | pos = self.GetPosition() | |
9489 | size = self.GetSize() | |
9490 | for item in self.GetChildren(): | |
9491 | # Recalculate (if necessary) the position and size of | |
9492 | # each item and then call item.SetDimension to do the | |
9493 | # actual positioning and sizing of the items within the | |
9494 | # space alloted to this sizer. | |
9495 | ... | |
9496 | item.SetDimension(itemPos, itemSize) | |
9497 | ||
9498 | ||
9499 | When `Layout` is called it first calls `CalcMin` followed by | |
9500 | `RecalcSizes` so you can optimize a bit by saving the results of | |
9501 | `CalcMin` and resuing them in `RecalcSizes`. | |
9502 | ||
9503 | :see: `wx.SizerItem`, `wx.Sizer.GetChildren` | |
9504 | ||
9505 | ||
9506 | """ | |
e811c8ce RD |
9507 | def __repr__(self): |
9508 | return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9509 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9510 | """ |
9511 | __init__(self) -> PySizer | |
9512 | ||
9513 | Creates a wx.PySizer. Must be called from the __init__ in the derived | |
9514 | class. | |
9515 | """ | |
54f9ee45 | 9516 | newobj = _core_.new_PySizer(*args, **kwargs) |
d14a1e28 RD |
9517 | self.this = newobj.this |
9518 | self.thisown = 1 | |
9519 | del newobj.thisown | |
9520 | self._setCallbackInfo(self, PySizer);self._setOORInfo(self) | |
e811c8ce RD |
9521 | |
9522 | def _setCallbackInfo(*args, **kwargs): | |
a95a7133 | 9523 | """_setCallbackInfo(self, PyObject self, PyObject _class)""" |
54f9ee45 | 9524 | return _core_.PySizer__setCallbackInfo(*args, **kwargs) |
e811c8ce | 9525 | |
d14a1e28 RD |
9526 | |
9527 | class PySizerPtr(PySizer): | |
9528 | def __init__(self, this): | |
9529 | self.this = this | |
9530 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9531 | self.__class__ = PySizer | |
54f9ee45 | 9532 | _core_.PySizer_swigregister(PySizerPtr) |
d14a1e28 RD |
9533 | |
9534 | #--------------------------------------------------------------------------- | |
9535 | ||
9536 | class BoxSizer(Sizer): | |
248ed943 RD |
9537 | """ |
9538 | The basic idea behind a box sizer is that windows will most often be | |
9539 | laid out in rather simple basic geometry, typically in a row or a | |
9540 | column or nested hierarchies of either. A wx.BoxSizer will lay out | |
9541 | its items in a simple row or column, depending on the orientation | |
9542 | parameter passed to the constructor. | |
9543 | """ | |
e811c8ce RD |
9544 | def __repr__(self): |
9545 | return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9546 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9547 | """ |
9548 | __init__(self, int orient=HORIZONTAL) -> BoxSizer | |
9549 | ||
9550 | Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL`` | |
9551 | or ``wx.HORIZONTAL`` for creating either a column sizer or a row | |
9552 | sizer. | |
9553 | """ | |
54f9ee45 | 9554 | newobj = _core_.new_BoxSizer(*args, **kwargs) |
d14a1e28 RD |
9555 | self.this = newobj.this |
9556 | self.thisown = 1 | |
9557 | del newobj.thisown | |
9558 | self._setOORInfo(self) | |
e811c8ce RD |
9559 | |
9560 | def GetOrientation(*args, **kwargs): | |
248ed943 RD |
9561 | """ |
9562 | GetOrientation(self) -> int | |
9563 | ||
9564 | Returns the current orientation of the sizer. | |
9565 | """ | |
54f9ee45 | 9566 | return _core_.BoxSizer_GetOrientation(*args, **kwargs) |
e811c8ce RD |
9567 | |
9568 | def SetOrientation(*args, **kwargs): | |
248ed943 RD |
9569 | """ |
9570 | SetOrientation(self, int orient) | |
e811c8ce | 9571 | |
248ed943 RD |
9572 | Resets the orientation of the sizer. |
9573 | """ | |
9574 | return _core_.BoxSizer_SetOrientation(*args, **kwargs) | |
e811c8ce | 9575 | |
d14a1e28 RD |
9576 | |
9577 | class BoxSizerPtr(BoxSizer): | |
9578 | def __init__(self, this): | |
9579 | self.this = this | |
9580 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9581 | self.__class__ = BoxSizer | |
54f9ee45 | 9582 | _core_.BoxSizer_swigregister(BoxSizerPtr) |
d14a1e28 RD |
9583 | |
9584 | #--------------------------------------------------------------------------- | |
9585 | ||
9586 | class StaticBoxSizer(BoxSizer): | |
248ed943 RD |
9587 | """ |
9588 | wx.StaticBoxSizer derives from and functions identically to the | |
9589 | `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer | |
9590 | manages. Note that this static box must be created separately and | |
9591 | passed to the sizer constructor. | |
9592 | """ | |
e811c8ce RD |
9593 | def __repr__(self): |
9594 | return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9595 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9596 | """ |
9597 | __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer | |
9598 | ||
9599 | Constructor. It takes an associated static box and the orientation | |
9600 | *orient* as parameters - orient can be either of ``wx.VERTICAL`` or | |
9601 | ``wx.HORIZONTAL``. | |
9602 | """ | |
54f9ee45 | 9603 | newobj = _core_.new_StaticBoxSizer(*args, **kwargs) |
d14a1e28 RD |
9604 | self.this = newobj.this |
9605 | self.thisown = 1 | |
9606 | del newobj.thisown | |
9607 | self._setOORInfo(self) | |
e811c8ce RD |
9608 | |
9609 | def GetStaticBox(*args, **kwargs): | |
248ed943 RD |
9610 | """ |
9611 | GetStaticBox(self) -> StaticBox | |
e811c8ce | 9612 | |
248ed943 RD |
9613 | Returns the static box associated with this sizer. |
9614 | """ | |
9615 | return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs) | |
e811c8ce | 9616 | |
d14a1e28 RD |
9617 | |
9618 | class StaticBoxSizerPtr(StaticBoxSizer): | |
9619 | def __init__(self, this): | |
9620 | self.this = this | |
9621 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9622 | self.__class__ = StaticBoxSizer | |
54f9ee45 | 9623 | _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr) |
d14a1e28 RD |
9624 | |
9625 | #--------------------------------------------------------------------------- | |
9626 | ||
9627 | class GridSizer(Sizer): | |
248ed943 RD |
9628 | """ |
9629 | A grid sizer is a sizer which lays out its children in a | |
9630 | two-dimensional table with all cells having the same size. In other | |
9631 | words, the width of each cell within the grid is the width of the | |
9632 | widest item added to the sizer and the height of each grid cell is the | |
9633 | height of the tallest item. An optional vertical and/or horizontal | |
9634 | gap between items can also be specified (in pixels.) | |
9635 | ||
9636 | Items are placed in the cells of the grid in the order they are added, | |
9637 | in row-major order. In other words, the first row is filled first, | |
9638 | then the second, and so on until all items have been added. (If | |
9639 | neccessary, additional rows will be added as items are added.) If you | |
9640 | need to have greater control over the cells that items are placed in | |
9641 | then use the `wx.GridBagSizer`. | |
9642 | ||
9643 | """ | |
e811c8ce RD |
9644 | def __repr__(self): |
9645 | return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9646 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9647 | """ |
9648 | __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer | |
9649 | ||
9650 | Constructor for a wx.GridSizer. *rows* and *cols* determine the number | |
9651 | of columns and rows in the sizer - if either of the parameters is | |
9652 | zero, it will be calculated to from the total number of children in | |
9653 | the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* | |
9654 | define extra space between all children. | |
9655 | """ | |
54f9ee45 | 9656 | newobj = _core_.new_GridSizer(*args, **kwargs) |
d14a1e28 RD |
9657 | self.this = newobj.this |
9658 | self.thisown = 1 | |
9659 | del newobj.thisown | |
9660 | self._setOORInfo(self) | |
e811c8ce | 9661 | |
e811c8ce | 9662 | def SetCols(*args, **kwargs): |
248ed943 RD |
9663 | """ |
9664 | SetCols(self, int cols) | |
9665 | ||
9666 | Sets the number of columns in the sizer. | |
9667 | """ | |
54f9ee45 | 9668 | return _core_.GridSizer_SetCols(*args, **kwargs) |
e811c8ce RD |
9669 | |
9670 | def SetRows(*args, **kwargs): | |
248ed943 RD |
9671 | """ |
9672 | SetRows(self, int rows) | |
9673 | ||
9674 | Sets the number of rows in the sizer. | |
9675 | """ | |
54f9ee45 | 9676 | return _core_.GridSizer_SetRows(*args, **kwargs) |
e811c8ce RD |
9677 | |
9678 | def SetVGap(*args, **kwargs): | |
248ed943 RD |
9679 | """ |
9680 | SetVGap(self, int gap) | |
9681 | ||
9682 | Sets the vertical gap (in pixels) between the cells in the sizer. | |
9683 | """ | |
54f9ee45 | 9684 | return _core_.GridSizer_SetVGap(*args, **kwargs) |
e811c8ce RD |
9685 | |
9686 | def SetHGap(*args, **kwargs): | |
248ed943 RD |
9687 | """ |
9688 | SetHGap(self, int gap) | |
9689 | ||
9690 | Sets the horizontal gap (in pixels) between cells in the sizer | |
9691 | """ | |
54f9ee45 | 9692 | return _core_.GridSizer_SetHGap(*args, **kwargs) |
e811c8ce RD |
9693 | |
9694 | def GetCols(*args, **kwargs): | |
248ed943 RD |
9695 | """ |
9696 | GetCols(self) -> int | |
9697 | ||
9698 | Returns the number of columns in the sizer. | |
9699 | """ | |
54f9ee45 | 9700 | return _core_.GridSizer_GetCols(*args, **kwargs) |
e811c8ce RD |
9701 | |
9702 | def GetRows(*args, **kwargs): | |
248ed943 RD |
9703 | """ |
9704 | GetRows(self) -> int | |
9705 | ||
9706 | Returns the number of rows in the sizer. | |
9707 | """ | |
54f9ee45 | 9708 | return _core_.GridSizer_GetRows(*args, **kwargs) |
e811c8ce RD |
9709 | |
9710 | def GetVGap(*args, **kwargs): | |
248ed943 RD |
9711 | """ |
9712 | GetVGap(self) -> int | |
9713 | ||
9714 | Returns the vertical gap (in pixels) between the cells in the sizer. | |
9715 | """ | |
54f9ee45 | 9716 | return _core_.GridSizer_GetVGap(*args, **kwargs) |
e811c8ce RD |
9717 | |
9718 | def GetHGap(*args, **kwargs): | |
248ed943 RD |
9719 | """ |
9720 | GetHGap(self) -> int | |
9721 | ||
9722 | Returns the horizontal gap (in pixels) between cells in the sizer. | |
9723 | """ | |
54f9ee45 | 9724 | return _core_.GridSizer_GetHGap(*args, **kwargs) |
e811c8ce | 9725 | |
d14a1e28 RD |
9726 | |
9727 | class GridSizerPtr(GridSizer): | |
9728 | def __init__(self, this): | |
9729 | self.this = this | |
9730 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9731 | self.__class__ = GridSizer | |
54f9ee45 | 9732 | _core_.GridSizer_swigregister(GridSizerPtr) |
d14a1e28 RD |
9733 | |
9734 | #--------------------------------------------------------------------------- | |
9735 | ||
54f9ee45 RD |
9736 | FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE |
9737 | FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED | |
9738 | FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL | |
d14a1e28 | 9739 | class FlexGridSizer(GridSizer): |
248ed943 RD |
9740 | """ |
9741 | A flex grid sizer is a sizer which lays out its children in a | |
9742 | two-dimensional table with all table cells in one row having the same | |
9743 | height and all cells in one column having the same width, but all | |
9744 | rows or all columns are not necessarily the same height or width as in | |
9745 | the `wx.GridSizer`. | |
9746 | ||
9747 | wx.FlexGridSizer can also size items equally in one direction but | |
9748 | unequally ("flexibly") in the other. If the sizer is only flexible | |
9749 | in one direction (this can be changed using `SetFlexibleDirection`), it | |
9750 | needs to be decided how the sizer should grow in the other ("non | |
9751 | flexible") direction in order to fill the available space. The | |
9752 | `SetNonFlexibleGrowMode` method serves this purpose. | |
9753 | ||
9754 | ||
9755 | """ | |
e811c8ce RD |
9756 | def __repr__(self): |
9757 | return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9758 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9759 | """ |
9760 | __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer | |
9761 | ||
9762 | Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the | |
9763 | number of columns and rows in the sizer - if either of the parameters | |
9764 | is zero, it will be calculated to from the total number of children in | |
9765 | the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* | |
9766 | define extra space between all children. | |
9767 | """ | |
54f9ee45 | 9768 | newobj = _core_.new_FlexGridSizer(*args, **kwargs) |
d14a1e28 RD |
9769 | self.this = newobj.this |
9770 | self.thisown = 1 | |
9771 | del newobj.thisown | |
9772 | self._setOORInfo(self) | |
e811c8ce | 9773 | |
248ed943 RD |
9774 | def AddGrowableRow(*args, **kwargs): |
9775 | """ | |
9776 | AddGrowableRow(self, size_t idx, int proportion=0) | |
e811c8ce | 9777 | |
248ed943 RD |
9778 | Specifies that row *idx* (starting from zero) should be grown if there |
9779 | is extra space available to the sizer. | |
e811c8ce | 9780 | |
248ed943 RD |
9781 | The *proportion* parameter has the same meaning as the stretch factor |
9782 | for the box sizers except that if all proportions are 0, then all | |
9783 | columns are resized equally (instead of not being resized at all). | |
9784 | """ | |
54f9ee45 | 9785 | return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs) |
e811c8ce RD |
9786 | |
9787 | def RemoveGrowableRow(*args, **kwargs): | |
248ed943 RD |
9788 | """ |
9789 | RemoveGrowableRow(self, size_t idx) | |
9790 | ||
9791 | Specifies that row *idx* is no longer growable. | |
9792 | """ | |
54f9ee45 | 9793 | return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) |
e811c8ce RD |
9794 | |
9795 | def AddGrowableCol(*args, **kwargs): | |
248ed943 RD |
9796 | """ |
9797 | AddGrowableCol(self, size_t idx, int proportion=0) | |
9798 | ||
9799 | Specifies that column *idx* (starting from zero) should be grown if | |
9800 | there is extra space available to the sizer. | |
9801 | ||
9802 | The *proportion* parameter has the same meaning as the stretch factor | |
9803 | for the box sizers except that if all proportions are 0, then all | |
9804 | columns are resized equally (instead of not being resized at all). | |
9805 | """ | |
54f9ee45 | 9806 | return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs) |
e811c8ce RD |
9807 | |
9808 | def RemoveGrowableCol(*args, **kwargs): | |
248ed943 RD |
9809 | """ |
9810 | RemoveGrowableCol(self, size_t idx) | |
9811 | ||
9812 | Specifies that column *idx* is no longer growable. | |
9813 | """ | |
54f9ee45 | 9814 | return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) |
e811c8ce RD |
9815 | |
9816 | def SetFlexibleDirection(*args, **kwargs): | |
248ed943 RD |
9817 | """ |
9818 | SetFlexibleDirection(self, int direction) | |
9819 | ||
9820 | Specifies whether the sizer should flexibly resize its columns, rows, | |
9821 | or both. Argument *direction* can be one of the following values. Any | |
9822 | other value is ignored. | |
9823 | ||
9824 | ============== ======================================= | |
9825 | wx.VERTICAL Rows are flexibly sized. | |
9826 | wx.HORIZONTAL Columns are flexibly sized. | |
9827 | wx.BOTH Both rows and columns are flexibly sized | |
9828 | (this is the default value). | |
9829 | ============== ======================================= | |
9830 | ||
9831 | Note that this method does not trigger relayout. | |
9832 | ||
9833 | """ | |
54f9ee45 | 9834 | return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) |
e811c8ce RD |
9835 | |
9836 | def GetFlexibleDirection(*args, **kwargs): | |
248ed943 RD |
9837 | """ |
9838 | GetFlexibleDirection(self) -> int | |
9839 | ||
9840 | Returns a value that specifies whether the sizer | |
9841 | flexibly resizes its columns, rows, or both (default). | |
9842 | ||
9843 | :see: `SetFlexibleDirection` | |
9844 | """ | |
54f9ee45 | 9845 | return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) |
e811c8ce RD |
9846 | |
9847 | def SetNonFlexibleGrowMode(*args, **kwargs): | |
248ed943 RD |
9848 | """ |
9849 | SetNonFlexibleGrowMode(self, int mode) | |
9850 | ||
9851 | Specifies how the sizer should grow in the non-flexible direction if | |
9852 | there is one (so `SetFlexibleDirection` must have been called | |
9853 | previously). Argument *mode* can be one of the following values: | |
9854 | ||
9855 | ========================== ================================================= | |
9856 | wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction. | |
9857 | wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with | |
9858 | `AddGrowableCol` and `AddGrowableRow`. In this | |
9859 | case equal sizing applies to minimum sizes of | |
9860 | columns or rows (this is the default value). | |
9861 | wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in | |
9862 | the non flexible direction, whether they are | |
9863 | growable or not in the flexbile direction. | |
9864 | ========================== ================================================= | |
9865 | ||
9866 | Note that this method does not trigger relayout. | |
9867 | ||
9868 | ||
9869 | """ | |
54f9ee45 | 9870 | return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) |
e811c8ce RD |
9871 | |
9872 | def GetNonFlexibleGrowMode(*args, **kwargs): | |
248ed943 RD |
9873 | """ |
9874 | GetNonFlexibleGrowMode(self) -> int | |
9875 | ||
9876 | Returns the value that specifies how the sizer grows in the | |
9877 | non-flexible direction if there is one. | |
9878 | ||
9879 | :see: `SetNonFlexibleGrowMode` | |
9880 | """ | |
54f9ee45 | 9881 | return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) |
e811c8ce RD |
9882 | |
9883 | def GetRowHeights(*args, **kwargs): | |
fd2dc343 RD |
9884 | """ |
9885 | GetRowHeights(self) -> list | |
9886 | ||
9887 | Returns a list of integers representing the heights of each of the | |
9888 | rows in the sizer. | |
9889 | """ | |
54f9ee45 | 9890 | return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs) |
e811c8ce RD |
9891 | |
9892 | def GetColWidths(*args, **kwargs): | |
fd2dc343 RD |
9893 | """ |
9894 | GetColWidths(self) -> list | |
9895 | ||
9896 | Returns a list of integers representing the widths of each of the | |
9897 | columns in the sizer. | |
9898 | """ | |
54f9ee45 | 9899 | return _core_.FlexGridSizer_GetColWidths(*args, **kwargs) |
e811c8ce | 9900 | |
d14a1e28 RD |
9901 | |
9902 | class FlexGridSizerPtr(FlexGridSizer): | |
9903 | def __init__(self, this): | |
9904 | self.this = this | |
9905 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9906 | self.__class__ = FlexGridSizer | |
54f9ee45 | 9907 | _core_.FlexGridSizer_swigregister(FlexGridSizerPtr) |
d14a1e28 RD |
9908 | |
9909 | #--------------------------------------------------------------------------- | |
9910 | ||
9911 | class GBPosition(object): | |
248ed943 RD |
9912 | """ |
9913 | This class represents the position of an item in a virtual grid of | |
9914 | rows and columns managed by a `wx.GridBagSizer`. wxPython has | |
9915 | typemaps that will automatically convert from a 2-element sequence of | |
9916 | integers to a wx.GBPosition, so you can use the more pythonic | |
9917 | representation of the position nearly transparently in Python code. | |
9918 | """ | |
e811c8ce RD |
9919 | def __repr__(self): |
9920 | return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 9921 | def __init__(self, *args, **kwargs): |
248ed943 RD |
9922 | """ |
9923 | __init__(self, int row=0, int col=0) -> GBPosition | |
9924 | ||
9925 | This class represents the position of an item in a virtual grid of | |
9926 | rows and columns managed by a `wx.GridBagSizer`. wxPython has | |
9927 | typemaps that will automatically convert from a 2-element sequence of | |
9928 | integers to a wx.GBPosition, so you can use the more pythonic | |
9929 | representation of the position nearly transparently in Python code. | |
9930 | """ | |
54f9ee45 | 9931 | newobj = _core_.new_GBPosition(*args, **kwargs) |
d14a1e28 RD |
9932 | self.this = newobj.this |
9933 | self.thisown = 1 | |
9934 | del newobj.thisown | |
e811c8ce | 9935 | def GetRow(*args, **kwargs): |
a95a7133 | 9936 | """GetRow(self) -> int""" |
54f9ee45 | 9937 | return _core_.GBPosition_GetRow(*args, **kwargs) |
e811c8ce RD |
9938 | |
9939 | def GetCol(*args, **kwargs): | |
a95a7133 | 9940 | """GetCol(self) -> int""" |
54f9ee45 | 9941 | return _core_.GBPosition_GetCol(*args, **kwargs) |
e811c8ce RD |
9942 | |
9943 | def SetRow(*args, **kwargs): | |
a95a7133 | 9944 | """SetRow(self, int row)""" |
54f9ee45 | 9945 | return _core_.GBPosition_SetRow(*args, **kwargs) |
e811c8ce RD |
9946 | |
9947 | def SetCol(*args, **kwargs): | |
a95a7133 | 9948 | """SetCol(self, int col)""" |
54f9ee45 | 9949 | return _core_.GBPosition_SetCol(*args, **kwargs) |
e811c8ce RD |
9950 | |
9951 | def __eq__(*args, **kwargs): | |
a95a7133 | 9952 | """__eq__(self, GBPosition other) -> bool""" |
54f9ee45 | 9953 | return _core_.GBPosition___eq__(*args, **kwargs) |
e811c8ce RD |
9954 | |
9955 | def __ne__(*args, **kwargs): | |
a95a7133 | 9956 | """__ne__(self, GBPosition other) -> bool""" |
54f9ee45 | 9957 | return _core_.GBPosition___ne__(*args, **kwargs) |
e811c8ce RD |
9958 | |
9959 | def Set(*args, **kwargs): | |
a95a7133 | 9960 | """Set(self, int row=0, int col=0)""" |
54f9ee45 | 9961 | return _core_.GBPosition_Set(*args, **kwargs) |
e811c8ce RD |
9962 | |
9963 | def Get(*args, **kwargs): | |
a95a7133 | 9964 | """Get(self) -> PyObject""" |
54f9ee45 | 9965 | return _core_.GBPosition_Get(*args, **kwargs) |
e811c8ce | 9966 | |
41e2b43e | 9967 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
9968 | def __str__(self): return str(self.Get()) |
9969 | def __repr__(self): return 'wx.GBPosition'+str(self.Get()) | |
9970 | def __len__(self): return len(self.Get()) | |
9971 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
9972 | def __setitem__(self, index, val): |
9973 | if index == 0: self.SetRow(val) | |
9974 | elif index == 1: self.SetCol(val) | |
9975 | else: raise IndexError | |
e811c8ce | 9976 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
9977 | __safe_for_unpickling__ = True |
9978 | def __reduce__(self): return (wx.GBPosition, self.Get()) | |
d14a1e28 RD |
9979 | |
9980 | row = property(GetRow, SetRow) | |
9981 | col = property(GetCol, SetCol) | |
9982 | ||
9983 | ||
9984 | class GBPositionPtr(GBPosition): | |
9985 | def __init__(self, this): | |
9986 | self.this = this | |
9987 | if not hasattr(self,"thisown"): self.thisown = 0 | |
9988 | self.__class__ = GBPosition | |
54f9ee45 | 9989 | _core_.GBPosition_swigregister(GBPositionPtr) |
d14a1e28 RD |
9990 | |
9991 | class GBSpan(object): | |
248ed943 RD |
9992 | """ |
9993 | This class is used to hold the row and column spanning attributes of | |
9994 | items in a `wx.GridBagSizer`. wxPython has typemaps that will | |
9995 | automatically convert from a 2-element sequence of integers to a | |
9996 | wx.GBSpan, so you can use the more pythonic representation of the span | |
9997 | nearly transparently in Python code. | |
9998 | ||
9999 | """ | |
e811c8ce RD |
10000 | def __repr__(self): |
10001 | return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10002 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10003 | """ |
10004 | __init__(self, int rowspan=1, int colspan=1) -> GBSpan | |
10005 | ||
10006 | Construct a new wxGBSpan, optionally setting the rowspan and | |
10007 | colspan. The default is (1,1). (Meaning that the item occupies one | |
10008 | cell in each direction. | |
10009 | """ | |
54f9ee45 | 10010 | newobj = _core_.new_GBSpan(*args, **kwargs) |
d14a1e28 RD |
10011 | self.this = newobj.this |
10012 | self.thisown = 1 | |
10013 | del newobj.thisown | |
e811c8ce | 10014 | def GetRowspan(*args, **kwargs): |
a95a7133 | 10015 | """GetRowspan(self) -> int""" |
54f9ee45 | 10016 | return _core_.GBSpan_GetRowspan(*args, **kwargs) |
e811c8ce RD |
10017 | |
10018 | def GetColspan(*args, **kwargs): | |
a95a7133 | 10019 | """GetColspan(self) -> int""" |
54f9ee45 | 10020 | return _core_.GBSpan_GetColspan(*args, **kwargs) |
e811c8ce RD |
10021 | |
10022 | def SetRowspan(*args, **kwargs): | |
a95a7133 | 10023 | """SetRowspan(self, int rowspan)""" |
54f9ee45 | 10024 | return _core_.GBSpan_SetRowspan(*args, **kwargs) |
e811c8ce RD |
10025 | |
10026 | def SetColspan(*args, **kwargs): | |
a95a7133 | 10027 | """SetColspan(self, int colspan)""" |
54f9ee45 | 10028 | return _core_.GBSpan_SetColspan(*args, **kwargs) |
e811c8ce RD |
10029 | |
10030 | def __eq__(*args, **kwargs): | |
a95a7133 | 10031 | """__eq__(self, GBSpan other) -> bool""" |
54f9ee45 | 10032 | return _core_.GBSpan___eq__(*args, **kwargs) |
e811c8ce RD |
10033 | |
10034 | def __ne__(*args, **kwargs): | |
a95a7133 | 10035 | """__ne__(self, GBSpan other) -> bool""" |
54f9ee45 | 10036 | return _core_.GBSpan___ne__(*args, **kwargs) |
e811c8ce RD |
10037 | |
10038 | def Set(*args, **kwargs): | |
a95a7133 | 10039 | """Set(self, int rowspan=1, int colspan=1)""" |
54f9ee45 | 10040 | return _core_.GBSpan_Set(*args, **kwargs) |
e811c8ce RD |
10041 | |
10042 | def Get(*args, **kwargs): | |
a95a7133 | 10043 | """Get(self) -> PyObject""" |
54f9ee45 | 10044 | return _core_.GBSpan_Get(*args, **kwargs) |
e811c8ce | 10045 | |
41e2b43e | 10046 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
e811c8ce RD |
10047 | def __str__(self): return str(self.Get()) |
10048 | def __repr__(self): return 'wx.GBSpan'+str(self.Get()) | |
10049 | def __len__(self): return len(self.Get()) | |
10050 | def __getitem__(self, index): return self.Get()[index] | |
d14a1e28 RD |
10051 | def __setitem__(self, index, val): |
10052 | if index == 0: self.SetRowspan(val) | |
10053 | elif index == 1: self.SetColspan(val) | |
10054 | else: raise IndexError | |
e811c8ce | 10055 | def __nonzero__(self): return self.Get() != (0,0) |
74e96f3d RD |
10056 | __safe_for_unpickling__ = True |
10057 | def __reduce__(self): return (wx.GBSpan, self.Get()) | |
d14a1e28 RD |
10058 | |
10059 | rowspan = property(GetRowspan, SetRowspan) | |
10060 | colspan = property(GetColspan, SetColspan) | |
10061 | ||
10062 | ||
10063 | class GBSpanPtr(GBSpan): | |
10064 | def __init__(self, this): | |
10065 | self.this = this | |
10066 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10067 | self.__class__ = GBSpan | |
54f9ee45 | 10068 | _core_.GBSpan_swigregister(GBSpanPtr) |
d14a1e28 RD |
10069 | |
10070 | class GBSizerItem(SizerItem): | |
248ed943 RD |
10071 | """ |
10072 | The wx.GBSizerItem class is used to track the additional data about | |
10073 | items in a `wx.GridBagSizer` such as the item's position in the grid | |
10074 | and how many rows or columns it spans. | |
10075 | ||
10076 | """ | |
e811c8ce RD |
10077 | def __repr__(self): |
10078 | return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10079 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10080 | """ |
10081 | __init__(self) -> GBSizerItem | |
10082 | ||
10083 | Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer | |
10084 | size will need to be set, as well as a position and span before this | |
10085 | item can be used in a Sizer. | |
10086 | ||
10087 | You will probably never need to create a wx.GBSizerItem directly as they | |
10088 | are created automatically when the sizer's Add method is called. | |
10089 | """ | |
54f9ee45 | 10090 | newobj = _core_.new_GBSizerItem(*args, **kwargs) |
d14a1e28 RD |
10091 | self.this = newobj.this |
10092 | self.thisown = 1 | |
10093 | del newobj.thisown | |
e811c8ce | 10094 | def GetPos(*args, **kwargs): |
248ed943 RD |
10095 | """ |
10096 | GetPos(self) -> GBPosition | |
10097 | ||
10098 | Get the grid position of the item | |
10099 | """ | |
54f9ee45 | 10100 | return _core_.GBSizerItem_GetPos(*args, **kwargs) |
e811c8ce RD |
10101 | |
10102 | def GetPosTuple(self): return self.GetPos().Get() | |
10103 | def GetSpan(*args, **kwargs): | |
248ed943 RD |
10104 | """ |
10105 | GetSpan(self) -> GBSpan | |
10106 | ||
10107 | Get the row and column spanning of the item | |
10108 | """ | |
54f9ee45 | 10109 | return _core_.GBSizerItem_GetSpan(*args, **kwargs) |
e811c8ce RD |
10110 | |
10111 | def GetSpanTuple(self): return self.GetSpan().Get() | |
10112 | def SetPos(*args, **kwargs): | |
248ed943 RD |
10113 | """ |
10114 | SetPos(self, GBPosition pos) -> bool | |
10115 | ||
10116 | If the item is already a member of a sizer then first ensure that | |
10117 | there is no other item that would intersect with this one at the new | |
10118 | position, then set the new position. Returns True if the change is | |
10119 | successful and after the next Layout() the item will be moved. | |
10120 | """ | |
54f9ee45 | 10121 | return _core_.GBSizerItem_SetPos(*args, **kwargs) |
e811c8ce RD |
10122 | |
10123 | def SetSpan(*args, **kwargs): | |
248ed943 RD |
10124 | """ |
10125 | SetSpan(self, GBSpan span) -> bool | |
10126 | ||
10127 | If the item is already a member of a sizer then first ensure that | |
10128 | there is no other item that would intersect with this one with its new | |
10129 | spanning size, then set the new spanning. Returns True if the change | |
10130 | is successful and after the next Layout() the item will be resized. | |
10131 | ||
10132 | """ | |
54f9ee45 | 10133 | return _core_.GBSizerItem_SetSpan(*args, **kwargs) |
e811c8ce | 10134 | |
248ed943 | 10135 | def Intersects(*args, **kwargs): |
0df68c9f | 10136 | """ |
a95a7133 | 10137 | Intersects(self, GBSizerItem other) -> bool |
248ed943 RD |
10138 | |
10139 | Returns True if this item and the other item instersect. | |
0df68c9f | 10140 | """ |
248ed943 RD |
10141 | return _core_.GBSizerItem_Intersects(*args, **kwargs) |
10142 | ||
10143 | def IntersectsPos(*args, **kwargs): | |
10144 | """ | |
10145 | IntersectsPos(self, GBPosition pos, GBSpan span) -> bool | |
10146 | ||
10147 | Returns True if the given pos/span would intersect with this item. | |
10148 | """ | |
10149 | return _core_.GBSizerItem_IntersectsPos(*args, **kwargs) | |
e811c8ce RD |
10150 | |
10151 | def GetEndPos(*args, **kwargs): | |
248ed943 RD |
10152 | """ |
10153 | GetEndPos(self) -> GBPosition | |
10154 | ||
10155 | Get the row and column of the endpoint of this item. | |
10156 | """ | |
54f9ee45 | 10157 | return _core_.GBSizerItem_GetEndPos(*args, **kwargs) |
e811c8ce RD |
10158 | |
10159 | def GetGBSizer(*args, **kwargs): | |
248ed943 RD |
10160 | """ |
10161 | GetGBSizer(self) -> GridBagSizer | |
10162 | ||
10163 | Get the sizer this item is a member of. | |
10164 | """ | |
54f9ee45 | 10165 | return _core_.GBSizerItem_GetGBSizer(*args, **kwargs) |
e811c8ce RD |
10166 | |
10167 | def SetGBSizer(*args, **kwargs): | |
248ed943 RD |
10168 | """ |
10169 | SetGBSizer(self, GridBagSizer sizer) | |
10170 | ||
10171 | Set the sizer this item is a member of. | |
10172 | """ | |
54f9ee45 | 10173 | return _core_.GBSizerItem_SetGBSizer(*args, **kwargs) |
e811c8ce | 10174 | |
d14a1e28 RD |
10175 | |
10176 | class GBSizerItemPtr(GBSizerItem): | |
10177 | def __init__(self, this): | |
10178 | self.this = this | |
10179 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10180 | self.__class__ = GBSizerItem | |
54f9ee45 | 10181 | _core_.GBSizerItem_swigregister(GBSizerItemPtr) |
d14a1e28 RD |
10182 | DefaultSpan = cvar.DefaultSpan |
10183 | ||
10184 | def GBSizerItemWindow(*args, **kwargs): | |
0df68c9f RD |
10185 | """ |
10186 | GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, | |
248ed943 RD |
10187 | int border, PyObject userData=None) -> GBSizerItem |
10188 | ||
10189 | Construct a `wx.GBSizerItem` for a window. | |
0df68c9f | 10190 | """ |
54f9ee45 | 10191 | val = _core_.new_GBSizerItemWindow(*args, **kwargs) |
d14a1e28 RD |
10192 | val.thisown = 1 |
10193 | return val | |
10194 | ||
10195 | def GBSizerItemSizer(*args, **kwargs): | |
0df68c9f RD |
10196 | """ |
10197 | GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, | |
248ed943 RD |
10198 | int border, PyObject userData=None) -> GBSizerItem |
10199 | ||
10200 | Construct a `wx.GBSizerItem` for a sizer | |
0df68c9f | 10201 | """ |
54f9ee45 | 10202 | val = _core_.new_GBSizerItemSizer(*args, **kwargs) |
d14a1e28 RD |
10203 | val.thisown = 1 |
10204 | return val | |
10205 | ||
10206 | def GBSizerItemSpacer(*args, **kwargs): | |
0df68c9f RD |
10207 | """ |
10208 | GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, | |
248ed943 RD |
10209 | int flag, int border, PyObject userData=None) -> GBSizerItem |
10210 | ||
10211 | Construct a `wx.GBSizerItem` for a spacer. | |
0df68c9f | 10212 | """ |
54f9ee45 | 10213 | val = _core_.new_GBSizerItemSpacer(*args, **kwargs) |
d14a1e28 RD |
10214 | val.thisown = 1 |
10215 | return val | |
10216 | ||
10217 | class GridBagSizer(FlexGridSizer): | |
248ed943 RD |
10218 | """ |
10219 | A `wx.Sizer` that can lay out items in a virtual grid like a | |
10220 | `wx.FlexGridSizer` but in this case explicit positioning of the items | |
10221 | is allowed using `wx.GBPosition`, and items can optionally span more | |
10222 | than one row and/or column using `wx.GBSpan`. The total size of the | |
10223 | virtual grid is determined by the largest row and column that items are | |
10224 | positioned at, adjusted for spanning. | |
10225 | ||
10226 | """ | |
e811c8ce RD |
10227 | def __repr__(self): |
10228 | return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
d14a1e28 | 10229 | def __init__(self, *args, **kwargs): |
248ed943 RD |
10230 | """ |
10231 | __init__(self, int vgap=0, int hgap=0) -> GridBagSizer | |
10232 | ||
10233 | Constructor, with optional parameters to specify the gap between the | |
10234 | rows and columns. | |
10235 | """ | |
54f9ee45 | 10236 | newobj = _core_.new_GridBagSizer(*args, **kwargs) |
d14a1e28 RD |
10237 | self.this = newobj.this |
10238 | self.thisown = 1 | |
10239 | del newobj.thisown | |
e811c8ce | 10240 | def Add(*args, **kwargs): |
0df68c9f | 10241 | """ |
248ed943 RD |
10242 | Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0, |
10243 | int border=0, userData=None) | |
10244 | ||
10245 | Adds an item to the sizer at the grid cell *pos*, optionally spanning | |
10246 | more than one row or column as specified with *span*. The remaining | |
10247 | args behave similarly to `wx.Sizer.Add`. | |
10248 | ||
10249 | Returns True if the item was successfully placed at the given cell | |
10250 | position, False if something was already there. | |
10251 | ||
0df68c9f | 10252 | """ |
54f9ee45 | 10253 | return _core_.GridBagSizer_Add(*args, **kwargs) |
e811c8ce RD |
10254 | |
10255 | def AddItem(*args, **kwargs): | |
248ed943 RD |
10256 | """ |
10257 | Add(self, GBSizerItem item) -> bool | |
10258 | ||
10259 | Add an item to the sizer using a `wx.GBSizerItem`. Returns True if | |
10260 | the item was successfully placed at its given cell position, False if | |
10261 | something was already there. | |
10262 | """ | |
54f9ee45 | 10263 | return _core_.GridBagSizer_AddItem(*args, **kwargs) |
e811c8ce | 10264 | |
84f85550 RD |
10265 | def GetCellSize(*args, **kwargs): |
10266 | """ | |
10267 | GetCellSize(self, int row, int col) -> Size | |
10268 | ||
10269 | Get the size of the specified cell, including hgap and | |
10270 | vgap. Only valid after a Layout. | |
10271 | """ | |
10272 | return _core_.GridBagSizer_GetCellSize(*args, **kwargs) | |
10273 | ||
e811c8ce | 10274 | def GetEmptyCellSize(*args, **kwargs): |
248ed943 RD |
10275 | """ |
10276 | GetEmptyCellSize(self) -> Size | |
10277 | ||
10278 | Get the size used for cells in the grid with no item. | |
10279 | """ | |
54f9ee45 | 10280 | return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs) |
e811c8ce RD |
10281 | |
10282 | def SetEmptyCellSize(*args, **kwargs): | |
248ed943 RD |
10283 | """ |
10284 | SetEmptyCellSize(self, Size sz) | |
10285 | ||
10286 | Set the size used for cells in the grid with no item. | |
10287 | """ | |
54f9ee45 | 10288 | return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs) |
e811c8ce RD |
10289 | |
10290 | def GetItemPosition(*args): | |
0df68c9f | 10291 | """ |
248ed943 RD |
10292 | GetItemPosition(self, item) -> GBPosition |
10293 | ||
10294 | Get the grid position of the specified *item* where *item* is either a | |
10295 | window or subsizer that is a member of this sizer, or a zero-based | |
10296 | index of an item. | |
0df68c9f | 10297 | """ |
54f9ee45 | 10298 | return _core_.GridBagSizer_GetItemPosition(*args) |
e811c8ce RD |
10299 | |
10300 | def SetItemPosition(*args): | |
0df68c9f | 10301 | """ |
248ed943 RD |
10302 | SetItemPosition(self, item, GBPosition pos) -> bool |
10303 | ||
10304 | Set the grid position of the specified *item* where *item* is either a | |
10305 | window or subsizer that is a member of this sizer, or a zero-based | |
10306 | index of an item. Returns True on success. If the move is not | |
10307 | allowed (because an item is already there) then False is returned. | |
10308 | ||
0df68c9f | 10309 | """ |
54f9ee45 | 10310 | return _core_.GridBagSizer_SetItemPosition(*args) |
e811c8ce RD |
10311 | |
10312 | def GetItemSpan(*args): | |
0df68c9f | 10313 | """ |
248ed943 RD |
10314 | GetItemSpan(self, item) -> GBSpan |
10315 | ||
10316 | Get the row/col spanning of the specified *item* where *item* is | |
10317 | either a window or subsizer that is a member of this sizer, or a | |
10318 | zero-based index of an item. | |
0df68c9f | 10319 | """ |
54f9ee45 | 10320 | return _core_.GridBagSizer_GetItemSpan(*args) |
e811c8ce RD |
10321 | |
10322 | def SetItemSpan(*args): | |
0df68c9f | 10323 | """ |
248ed943 RD |
10324 | SetItemSpan(self, item, GBSpan span) -> bool |
10325 | ||
10326 | Set the row/col spanning of the specified *item* where *item* is | |
10327 | either a window or subsizer that is a member of this sizer, or a | |
10328 | zero-based index of an item. Returns True on success. If the move is | |
10329 | not allowed (because an item is already there) then False is returned. | |
0df68c9f | 10330 | """ |
54f9ee45 | 10331 | return _core_.GridBagSizer_SetItemSpan(*args) |
e811c8ce RD |
10332 | |
10333 | def FindItem(*args): | |
0df68c9f | 10334 | """ |
248ed943 RD |
10335 | FindItem(self, item) -> GBSizerItem |
10336 | ||
10337 | Find the sizer item for the given window or subsizer, returns None if | |
10338 | not found. (non-recursive) | |
0df68c9f | 10339 | """ |
54f9ee45 | 10340 | return _core_.GridBagSizer_FindItem(*args) |
e811c8ce RD |
10341 | |
10342 | def FindItemAtPosition(*args, **kwargs): | |
248ed943 RD |
10343 | """ |
10344 | FindItemAtPosition(self, GBPosition pos) -> GBSizerItem | |
10345 | ||
10346 | Return the sizer item for the given grid cell, or None if there is no | |
10347 | item at that position. (non-recursive) | |
10348 | """ | |
54f9ee45 | 10349 | return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs) |
e811c8ce RD |
10350 | |
10351 | def FindItemAtPoint(*args, **kwargs): | |
248ed943 RD |
10352 | """ |
10353 | FindItemAtPoint(self, Point pt) -> GBSizerItem | |
10354 | ||
10355 | Return the sizer item located at the point given in *pt*, or None if | |
10356 | there is no item at that point. The (x,y) coordinates in pt correspond | |
10357 | to the client coordinates of the window using the sizer for | |
10358 | layout. (non-recursive) | |
10359 | """ | |
54f9ee45 | 10360 | return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs) |
e811c8ce | 10361 | |
248ed943 RD |
10362 | def CheckForIntersection(*args, **kwargs): |
10363 | """ | |
10364 | CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool | |
e811c8ce | 10365 | |
248ed943 RD |
10366 | Look at all items and see if any intersect (or would overlap) the |
10367 | given *item*. Returns True if so, False if there would be no overlap. | |
10368 | If an *excludeItem* is given then it will not be checked for | |
10369 | intersection, for example it may be the item we are checking the | |
10370 | position of. | |
e811c8ce | 10371 | |
248ed943 RD |
10372 | """ |
10373 | return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs) | |
e811c8ce | 10374 | |
248ed943 | 10375 | def CheckForIntersectionPos(*args, **kwargs): |
0df68c9f | 10376 | """ |
248ed943 RD |
10377 | CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool |
10378 | ||
10379 | Look at all items and see if any intersect (or would overlap) the | |
10380 | given position and span. Returns True if so, False if there would be | |
10381 | no overlap. If an *excludeItem* is given then it will not be checked | |
10382 | for intersection, for example it may be the item we are checking the | |
10383 | position of. | |
0df68c9f | 10384 | """ |
248ed943 | 10385 | return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs) |
e811c8ce | 10386 | |
d14a1e28 RD |
10387 | |
10388 | class GridBagSizerPtr(GridBagSizer): | |
10389 | def __init__(self, this): | |
10390 | self.this = this | |
10391 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10392 | self.__class__ = GridBagSizer | |
54f9ee45 | 10393 | _core_.GridBagSizer_swigregister(GridBagSizerPtr) |
d14a1e28 RD |
10394 | |
10395 | #--------------------------------------------------------------------------- | |
10396 | ||
54f9ee45 RD |
10397 | Left = _core_.Left |
10398 | Top = _core_.Top | |
10399 | Right = _core_.Right | |
10400 | Bottom = _core_.Bottom | |
10401 | Width = _core_.Width | |
10402 | Height = _core_.Height | |
10403 | Centre = _core_.Centre | |
10404 | Center = _core_.Center | |
10405 | CentreX = _core_.CentreX | |
10406 | CentreY = _core_.CentreY | |
10407 | Unconstrained = _core_.Unconstrained | |
10408 | AsIs = _core_.AsIs | |
10409 | PercentOf = _core_.PercentOf | |
10410 | Above = _core_.Above | |
10411 | Below = _core_.Below | |
10412 | LeftOf = _core_.LeftOf | |
10413 | RightOf = _core_.RightOf | |
10414 | SameAs = _core_.SameAs | |
10415 | Absolute = _core_.Absolute | |
d14a1e28 | 10416 | class IndividualLayoutConstraint(Object): |
15afbcd0 | 10417 | """ |
41e2b43e RD |
10418 | Objects of this class are stored in the `wx.LayoutConstraints` class as |
10419 | one of eight possible constraints that a window can be involved in. | |
10420 | You will never need to create an instance of | |
10421 | wx.IndividualLayoutConstraint, rather you should create a | |
10422 | `wx.LayoutConstraints` instance and use the individual contstraints | |
15afbcd0 | 10423 | that it contains. |
15afbcd0 | 10424 | """ |
d14a1e28 RD |
10425 | def __init__(self): raise RuntimeError, "No constructor defined" |
10426 | def __repr__(self): | |
10427 | return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
e811c8ce | 10428 | def Set(*args, **kwargs): |
41e2b43e RD |
10429 | """ |
10430 | Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN) | |
10431 | ||
10432 | Sets the properties of the constraint. Normally called by one of the | |
10433 | convenience functions such as Above, RightOf, SameAs. | |
10434 | """ | |
54f9ee45 | 10435 | return _core_.IndividualLayoutConstraint_Set(*args, **kwargs) |
e811c8ce RD |
10436 | |
10437 | def LeftOf(*args, **kwargs): | |
15afbcd0 | 10438 | """ |
a95a7133 | 10439 | LeftOf(self, Window sibling, int marg=0) |
15afbcd0 | 10440 | |
41e2b43e RD |
10441 | Constrains this edge to be to the left of the given window, with an |
10442 | optional margin. Implicitly, this is relative to the left edge of the | |
10443 | other window. | |
15afbcd0 | 10444 | """ |
54f9ee45 | 10445 | return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs) |
e811c8ce RD |
10446 | |
10447 | def RightOf(*args, **kwargs): | |
15afbcd0 | 10448 | """ |
a95a7133 | 10449 | RightOf(self, Window sibling, int marg=0) |
15afbcd0 | 10450 | |
41e2b43e RD |
10451 | Constrains this edge to be to the right of the given window, with an |
10452 | optional margin. Implicitly, this is relative to the right edge of the | |
10453 | other window. | |
15afbcd0 | 10454 | """ |
54f9ee45 | 10455 | return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs) |
e811c8ce RD |
10456 | |
10457 | def Above(*args, **kwargs): | |
15afbcd0 | 10458 | """ |
a95a7133 | 10459 | Above(self, Window sibling, int marg=0) |
15afbcd0 | 10460 | |
41e2b43e RD |
10461 | Constrains this edge to be above the given window, with an optional |
10462 | margin. Implicitly, this is relative to the top edge of the other | |
10463 | window. | |
15afbcd0 | 10464 | """ |
54f9ee45 | 10465 | return _core_.IndividualLayoutConstraint_Above(*args, **kwargs) |
e811c8ce RD |
10466 | |
10467 | def Below(*args, **kwargs): | |
15afbcd0 | 10468 | """ |
a95a7133 | 10469 | Below(self, Window sibling, int marg=0) |
15afbcd0 | 10470 | |
41e2b43e RD |
10471 | Constrains this edge to be below the given window, with an optional |
10472 | margin. Implicitly, this is relative to the bottom edge of the other | |
10473 | window. | |
15afbcd0 | 10474 | """ |
54f9ee45 | 10475 | return _core_.IndividualLayoutConstraint_Below(*args, **kwargs) |
e811c8ce RD |
10476 | |
10477 | def SameAs(*args, **kwargs): | |
15afbcd0 | 10478 | """ |
a95a7133 | 10479 | SameAs(self, Window otherW, int edge, int marg=0) |
15afbcd0 | 10480 | |
41e2b43e RD |
10481 | Constrains this edge or dimension to be to the same as the edge of the |
10482 | given window, with an optional margin. | |
15afbcd0 | 10483 | """ |
54f9ee45 | 10484 | return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs) |
e811c8ce RD |
10485 | |
10486 | def PercentOf(*args, **kwargs): | |
15afbcd0 | 10487 | """ |
a95a7133 | 10488 | PercentOf(self, Window otherW, int wh, int per) |
15afbcd0 | 10489 | |
41e2b43e RD |
10490 | Constrains this edge or dimension to be to a percentage of the given |
10491 | window, with an optional margin. | |
15afbcd0 | 10492 | """ |
54f9ee45 | 10493 | return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs) |
e811c8ce RD |
10494 | |
10495 | def Absolute(*args, **kwargs): | |
15afbcd0 | 10496 | """ |
a95a7133 | 10497 | Absolute(self, int val) |
15afbcd0 | 10498 | |
41e2b43e | 10499 | Constrains this edge or dimension to be the given absolute value. |
15afbcd0 | 10500 | """ |
54f9ee45 | 10501 | return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs) |
e811c8ce RD |
10502 | |
10503 | def Unconstrained(*args, **kwargs): | |
15afbcd0 | 10504 | """ |
a95a7133 | 10505 | Unconstrained(self) |
15afbcd0 | 10506 | |
41e2b43e RD |
10507 | Sets this edge or dimension to be unconstrained, that is, dependent on |
10508 | other edges and dimensions from which this value can be deduced. | |
15afbcd0 | 10509 | """ |
54f9ee45 | 10510 | return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs) |
e811c8ce RD |
10511 | |
10512 | def AsIs(*args, **kwargs): | |
15afbcd0 | 10513 | """ |
a95a7133 | 10514 | AsIs(self) |
15afbcd0 | 10515 | |
41e2b43e RD |
10516 | Sets this edge or constraint to be whatever the window's value is at |
10517 | the moment. If either of the width and height constraints are *as is*, | |
10518 | the window will not be resized, but moved instead. This is important | |
10519 | when considering panel items which are intended to have a default | |
10520 | size, such as a button, which may take its size from the size of the | |
10521 | button label. | |
15afbcd0 | 10522 | """ |
54f9ee45 | 10523 | return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs) |
e811c8ce RD |
10524 | |
10525 | def GetOtherWindow(*args, **kwargs): | |
a95a7133 | 10526 | """GetOtherWindow(self) -> Window""" |
54f9ee45 | 10527 | return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs) |
e811c8ce RD |
10528 | |
10529 | def GetMyEdge(*args, **kwargs): | |
a95a7133 | 10530 | """GetMyEdge(self) -> int""" |
54f9ee45 | 10531 | return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs) |
e811c8ce RD |
10532 | |
10533 | def SetEdge(*args, **kwargs): | |
a95a7133 | 10534 | """SetEdge(self, int which)""" |
54f9ee45 | 10535 | return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs) |
e811c8ce RD |
10536 | |
10537 | def SetValue(*args, **kwargs): | |
a95a7133 | 10538 | """SetValue(self, int v)""" |
54f9ee45 | 10539 | return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs) |
e811c8ce RD |
10540 | |
10541 | def GetMargin(*args, **kwargs): | |
a95a7133 | 10542 | """GetMargin(self) -> int""" |
54f9ee45 | 10543 | return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs) |
e811c8ce RD |
10544 | |
10545 | def SetMargin(*args, **kwargs): | |
a95a7133 | 10546 | """SetMargin(self, int m)""" |
54f9ee45 | 10547 | return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs) |
e811c8ce RD |
10548 | |
10549 | def GetValue(*args, **kwargs): | |
a95a7133 | 10550 | """GetValue(self) -> int""" |
54f9ee45 | 10551 | return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs) |
e811c8ce RD |
10552 | |
10553 | def GetPercent(*args, **kwargs): | |
a95a7133 | 10554 | """GetPercent(self) -> int""" |
54f9ee45 | 10555 | return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs) |
e811c8ce RD |
10556 | |
10557 | def GetOtherEdge(*args, **kwargs): | |
a95a7133 | 10558 | """GetOtherEdge(self) -> int""" |
54f9ee45 | 10559 | return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs) |
e811c8ce RD |
10560 | |
10561 | def GetDone(*args, **kwargs): | |
a95a7133 | 10562 | """GetDone(self) -> bool""" |
54f9ee45 | 10563 | return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs) |
e811c8ce RD |
10564 | |
10565 | def SetDone(*args, **kwargs): | |
a95a7133 | 10566 | """SetDone(self, bool d)""" |
54f9ee45 | 10567 | return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs) |
e811c8ce RD |
10568 | |
10569 | def GetRelationship(*args, **kwargs): | |
a95a7133 | 10570 | """GetRelationship(self) -> int""" |
54f9ee45 | 10571 | return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs) |
e811c8ce RD |
10572 | |
10573 | def SetRelationship(*args, **kwargs): | |
a95a7133 | 10574 | """SetRelationship(self, int r)""" |
54f9ee45 | 10575 | return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs) |
e811c8ce RD |
10576 | |
10577 | def ResetIfWin(*args, **kwargs): | |
15afbcd0 | 10578 | """ |
a95a7133 | 10579 | ResetIfWin(self, Window otherW) -> bool |
15afbcd0 RD |
10580 | |
10581 | Reset constraint if it mentions otherWin | |
10582 | """ | |
54f9ee45 | 10583 | return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs) |
e811c8ce RD |
10584 | |
10585 | def SatisfyConstraint(*args, **kwargs): | |
15afbcd0 | 10586 | """ |
a95a7133 | 10587 | SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool |
15afbcd0 RD |
10588 | |
10589 | Try to satisfy constraint | |
10590 | """ | |
54f9ee45 | 10591 | return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs) |
e811c8ce RD |
10592 | |
10593 | def GetEdge(*args, **kwargs): | |
15afbcd0 | 10594 | """ |
a95a7133 | 10595 | GetEdge(self, int which, Window thisWin, Window other) -> int |
15afbcd0 RD |
10596 | |
10597 | Get the value of this edge or dimension, or if this | |
10598 | is not determinable, -1. | |
10599 | """ | |
54f9ee45 | 10600 | return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs) |
e811c8ce | 10601 | |
d14a1e28 RD |
10602 | |
10603 | class IndividualLayoutConstraintPtr(IndividualLayoutConstraint): | |
10604 | def __init__(self, this): | |
10605 | self.this = this | |
10606 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10607 | self.__class__ = IndividualLayoutConstraint | |
54f9ee45 | 10608 | _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr) |
d14a1e28 RD |
10609 | |
10610 | class LayoutConstraints(Object): | |
15afbcd0 | 10611 | """ |
41e2b43e RD |
10612 | **Note:** constraints are now deprecated and you should use sizers |
10613 | instead. | |
15afbcd0 | 10614 | |
41e2b43e RD |
10615 | Objects of this class can be associated with a window to define its |
10616 | layout constraints, with respect to siblings or its parent. | |
15afbcd0 RD |
10617 | |
10618 | The class consists of the following eight constraints of class | |
10619 | wx.IndividualLayoutConstraint, some or all of which should be accessed | |
10620 | directly to set the appropriate constraints. | |
10621 | ||
10622 | * left: represents the left hand edge of the window | |
10623 | * right: represents the right hand edge of the window | |
10624 | * top: represents the top edge of the window | |
10625 | * bottom: represents the bottom edge of the window | |
10626 | * width: represents the width of the window | |
10627 | * height: represents the height of the window | |
10628 | * centreX: represents the horizontal centre point of the window | |
10629 | * centreY: represents the vertical centre point of the window | |
10630 | ||
41e2b43e RD |
10631 | Most constraints are initially set to have the relationship |
10632 | wxUnconstrained, which means that their values should be calculated by | |
10633 | looking at known constraints. The exceptions are width and height, | |
10634 | which are set to wxAsIs to ensure that if the user does not specify a | |
10635 | constraint, the existing width and height will be used, to be | |
10636 | compatible with panel items which often have take a default size. If | |
10637 | the constraint is ``wx.AsIs``, the dimension will not be changed. | |
10638 | ||
10639 | :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints` | |
15afbcd0 RD |
10640 | |
10641 | """ | |
e811c8ce RD |
10642 | def __repr__(self): |
10643 | return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
54f9ee45 RD |
10644 | left = property(_core_.LayoutConstraints_left_get) |
10645 | top = property(_core_.LayoutConstraints_top_get) | |
10646 | right = property(_core_.LayoutConstraints_right_get) | |
10647 | bottom = property(_core_.LayoutConstraints_bottom_get) | |
10648 | width = property(_core_.LayoutConstraints_width_get) | |
10649 | height = property(_core_.LayoutConstraints_height_get) | |
10650 | centreX = property(_core_.LayoutConstraints_centreX_get) | |
10651 | centreY = property(_core_.LayoutConstraints_centreY_get) | |
d14a1e28 | 10652 | def __init__(self, *args, **kwargs): |
a95a7133 | 10653 | """__init__(self) -> LayoutConstraints""" |
54f9ee45 | 10654 | newobj = _core_.new_LayoutConstraints(*args, **kwargs) |
d14a1e28 RD |
10655 | self.this = newobj.this |
10656 | self.thisown = 1 | |
10657 | del newobj.thisown | |
e811c8ce | 10658 | def SatisfyConstraints(*args, **kwargs): |
6c3b4aae | 10659 | """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)""" |
54f9ee45 | 10660 | return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs) |
e811c8ce RD |
10661 | |
10662 | def AreSatisfied(*args, **kwargs): | |
a95a7133 | 10663 | """AreSatisfied(self) -> bool""" |
54f9ee45 | 10664 | return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs) |
e811c8ce | 10665 | |
d14a1e28 RD |
10666 | |
10667 | class LayoutConstraintsPtr(LayoutConstraints): | |
10668 | def __init__(self, this): | |
10669 | self.this = this | |
10670 | if not hasattr(self,"thisown"): self.thisown = 0 | |
10671 | self.__class__ = LayoutConstraints | |
54f9ee45 | 10672 | _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr) |
d14a1e28 RD |
10673 | |
10674 | #---------------------------------------------------------------------------- | |
10675 | ||
322913ce | 10676 | # Use Python's bool constants if available, make some if not |
d14a1e28 RD |
10677 | try: |
10678 | True | |
10679 | except NameError: | |
322913ce RD |
10680 | __builtins__.True = 1==1 |
10681 | __builtins__.False = 1==0 | |
4f89f6a3 RD |
10682 | def bool(value): return not not value |
10683 | __builtins__.bool = bool | |
d14a1e28 | 10684 | |
d14a1e28 RD |
10685 | |
10686 | ||
10687 | # workarounds for bad wxRTTI names | |
10688 | __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge' | |
10689 | __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider' | |
10690 | __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar' | |
10691 | ||
10692 | ||
10693 | #---------------------------------------------------------------------------- | |
10694 | # Load version numbers from __version__... Ensure that major and minor | |
7bc1e663 | 10695 | # versions are the same for both wxPython and wxWidgets. |
d14a1e28 RD |
10696 | |
10697 | from __version__ import * | |
10698 | __version__ = VERSION_STRING | |
10699 | ||
7bc1e663 RD |
10700 | assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch" |
10701 | assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch" | |
54f9ee45 | 10702 | if RELEASE_VERSION != _core_.RELEASE_VERSION: |
d14a1e28 | 10703 | import warnings |
7bc1e663 | 10704 | warnings.warn("wxPython/wxWidgets release number mismatch") |
d14a1e28 RD |
10705 | |
10706 | #---------------------------------------------------------------------------- | |
10707 | ||
10708 | class PyDeadObjectError(AttributeError): | |
10709 | pass | |
10710 | ||
d14a1e28 RD |
10711 | class _wxPyDeadObject(object): |
10712 | """ | |
10713 | Instances of wx objects that are OOR capable will have their __class__ | |
10714 | changed to this class when the C++ object is deleted. This should help | |
10715 | prevent crashes due to referencing a bogus C++ pointer. | |
10716 | """ | |
10717 | reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)" | |
10718 | attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed." | |
10719 | ||
3a04f143 | 10720 | def __repr__(self): |
d14a1e28 RD |
10721 | if not hasattr(self, "_name"): |
10722 | self._name = "[unknown]" | |
10723 | return self.reprStr % self._name | |
10724 | ||
3a04f143 | 10725 | def __getattr__(self, *args): |
d14a1e28 RD |
10726 | if not hasattr(self, "_name"): |
10727 | self._name = "[unknown]" | |
3a04f143 RD |
10728 | raise PyDeadObjectError(self.attrStr % self._name) |
10729 | ||
10730 | def __nonzero__(self): | |
10731 | return 0 | |
10732 | ||
10733 | ||
10734 | ||
10735 | class PyUnbornObjectError(AttributeError): | |
10736 | pass | |
10737 | ||
10738 | class _wxPyUnbornObject(object): | |
10739 | """ | |
54f9ee45 | 10740 | Some stock objects are created when the wx._core module is |
3a04f143 RD |
10741 | imported, but their C++ instance is not created until the wx.App |
10742 | object is created and initialized. These object instances will | |
10743 | temporarily have their __class__ changed to this class so an | |
10744 | exception will be raised if they are used before the C++ instance | |
10745 | is ready. | |
10746 | """ | |
10747 | ||
10748 | reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)" | |
10749 | attrStr = "The C++ part of this object has not been initialized, attribute access not allowed." | |
10750 | ||
10751 | def __repr__(self): | |
10752 | #if not hasattr(self, "_name"): | |
10753 | # self._name = "[unknown]" | |
10754 | return self.reprStr #% self._name | |
10755 | ||
10756 | def __getattr__(self, *args): | |
10757 | #if not hasattr(self, "_name"): | |
10758 | # self._name = "[unknown]" | |
10759 | raise PyUnbornObjectError(self.attrStr) # % self._name ) | |
d14a1e28 RD |
10760 | |
10761 | def __nonzero__(self): | |
10762 | return 0 | |
10763 | ||
10764 | ||
10765 | #---------------------------------------------------------------------------- | |
10766 | _wxPyCallAfterId = None | |
10767 | ||
10768 | def CallAfter(callable, *args, **kw): | |
10769 | """ | |
10770 | Call the specified function after the current and pending event | |
10771 | handlers have been completed. This is also good for making GUI | |
61863841 RD |
10772 | method calls from non-GUI threads. Any extra positional or |
10773 | keyword args are passed on to the callable when it is called. | |
10774 | ||
10775 | :see: `wx.FutureCall` | |
d14a1e28 RD |
10776 | """ |
10777 | app = wx.GetApp() | |
dfbb5885 | 10778 | assert app is not None, 'No wx.App created yet' |
d14a1e28 RD |
10779 | |
10780 | global _wxPyCallAfterId | |
10781 | if _wxPyCallAfterId is None: | |
10782 | _wxPyCallAfterId = wx.NewEventType() | |
10783 | app.Connect(-1, -1, _wxPyCallAfterId, | |
10784 | lambda event: event.callable(*event.args, **event.kw) ) | |
10785 | evt = wx.PyEvent() | |
10786 | evt.SetEventType(_wxPyCallAfterId) | |
10787 | evt.callable = callable | |
10788 | evt.args = args | |
10789 | evt.kw = kw | |
10790 | wx.PostEvent(app, evt) | |
10791 | ||
10792 | ||
10793 | #---------------------------------------------------------------------------- | |
10794 | ||
10795 | ||
10796 | class FutureCall: | |
10797 | """ | |
4276dc52 | 10798 | A convenience class for wx.Timer, that calls the given callable |
d14a1e28 RD |
10799 | object once after the given amount of milliseconds, passing any |
10800 | positional or keyword args. The return value of the callable is | |
61863841 | 10801 | availbale after it has been run with the `GetResult` method. |
d14a1e28 RD |
10802 | |
10803 | If you don't need to get the return value or restart the timer | |
10804 | then there is no need to hold a reference to this object. It will | |
10805 | hold a reference to itself while the timer is running (the timer | |
10806 | has a reference to self.Notify) but the cycle will be broken when | |
10807 | the timer completes, automatically cleaning up the wx.FutureCall | |
10808 | object. | |
61863841 RD |
10809 | |
10810 | :see: `wx.CallAfter` | |
d14a1e28 RD |
10811 | """ |
10812 | def __init__(self, millis, callable, *args, **kwargs): | |
10813 | self.millis = millis | |
10814 | self.callable = callable | |
10815 | self.SetArgs(*args, **kwargs) | |
10816 | self.runCount = 0 | |
4276dc52 | 10817 | self.running = False |
d14a1e28 RD |
10818 | self.hasRun = False |
10819 | self.result = None | |
10820 | self.timer = None | |
10821 | self.Start() | |
10822 | ||
10823 | def __del__(self): | |
10824 | self.Stop() | |
10825 | ||
10826 | ||
10827 | def Start(self, millis=None, *args, **kwargs): | |
10828 | """ | |
10829 | (Re)start the timer | |
10830 | """ | |
10831 | self.hasRun = False | |
10832 | if millis is not None: | |
10833 | self.millis = millis | |
10834 | if args or kwargs: | |
10835 | self.SetArgs(*args, **kwargs) | |
10836 | self.Stop() | |
10837 | self.timer = wx.PyTimer(self.Notify) | |
10838 | self.timer.Start(self.millis, wx.TIMER_ONE_SHOT) | |
4276dc52 | 10839 | self.running = True |
d14a1e28 RD |
10840 | Restart = Start |
10841 | ||
10842 | ||
10843 | def Stop(self): | |
10844 | """ | |
10845 | Stop and destroy the timer. | |
10846 | """ | |
10847 | if self.timer is not None: | |
10848 | self.timer.Stop() | |
10849 | self.timer = None | |
10850 | ||
10851 | ||
10852 | def GetInterval(self): | |
10853 | if self.timer is not None: | |
10854 | return self.timer.GetInterval() | |
10855 | else: | |
10856 | return 0 | |
10857 | ||
10858 | ||
10859 | def IsRunning(self): | |
10860 | return self.timer is not None and self.timer.IsRunning() | |
10861 | ||
10862 | ||
10863 | def SetArgs(self, *args, **kwargs): | |
10864 | """ | |
10865 | (Re)set the args passed to the callable object. This is | |
10866 | useful in conjunction with Restart if you want to schedule a | |
10867 | new call to the same callable object but with different | |
10868 | parameters. | |
10869 | """ | |
10870 | self.args = args | |
10871 | self.kwargs = kwargs | |
10872 | ||
10873 | ||
10874 | def HasRun(self): | |
10875 | return self.hasRun | |
10876 | ||
10877 | def GetResult(self): | |
10878 | return self.result | |
10879 | ||
10880 | def Notify(self): | |
10881 | """ | |
10882 | The timer has expired so call the callable. | |
10883 | """ | |
10884 | if self.callable and getattr(self.callable, 'im_self', True): | |
10885 | self.runCount += 1 | |
4276dc52 | 10886 | self.running = False |
d14a1e28 RD |
10887 | self.result = self.callable(*self.args, **self.kwargs) |
10888 | self.hasRun = True | |
4276dc52 RD |
10889 | if not self.running: |
10890 | # if it wasn't restarted, then cleanup | |
10891 | wx.CallAfter(self.Stop) | |
d14a1e28 RD |
10892 | |
10893 | ||
a95a7133 RD |
10894 | |
10895 | #---------------------------------------------------------------------------- | |
10896 | # Control which items in this module should be documented by epydoc. | |
10897 | # We allow only classes and functions, which will help reduce the size | |
10898 | # of the docs by filtering out the zillions of constants, EVT objects, | |
10899 | # and etc that don't make much sense by themselves, but are instead | |
10900 | # documented (or will be) as part of the classes/functions/methods | |
10901 | # where they should be used. | |
10902 | ||
66c033b4 RD |
10903 | class __DocFilter: |
10904 | """ | |
10905 | A filter for epydoc that only allows non-Ptr classes and | |
10906 | fucntions, in order to reduce the clutter in the API docs. | |
10907 | """ | |
10908 | def __init__(self, globals): | |
10909 | self._globals = globals | |
10910 | ||
10911 | def __call__(self, name): | |
10912 | import types | |
10913 | obj = self._globals.get(name, None) | |
10914 | if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]: | |
10915 | return False | |
10916 | if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'): | |
10917 | return False | |
10918 | return True | |
a95a7133 | 10919 | |
d14a1e28 RD |
10920 | #---------------------------------------------------------------------------- |
10921 | #---------------------------------------------------------------------------- | |
10922 | ||
10923 | # Import other modules in this package that should show up in the | |
10924 | # "core" wx namespace | |
54f9ee45 RD |
10925 | from _gdi import * |
10926 | from _windows import * | |
10927 | from _controls import * | |
10928 | from _misc import * | |
d14a1e28 | 10929 | |
3a04f143 RD |
10930 | |
10931 | # Fixup the stock objects since they can't be used yet. (They will be | |
10932 | # restored in wx.PyApp.OnInit.) | |
54f9ee45 | 10933 | _core_._wxPyFixStockObjects() |
3a04f143 | 10934 | |
d14a1e28 RD |
10935 | #---------------------------------------------------------------------------- |
10936 | #---------------------------------------------------------------------------- | |
10937 | ||
10938 |