]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/core.py
Oops
[wxWidgets.git] / wxPython / src / msw / core.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _core
5
6 #// Give a reference to the dictionary of this module to the C++ extension
7 #// code.
8 _core._wxPySetDictionary(vars())
9
10 #// A little trick to make 'wx' be a reference to this module so wx.Names can
11 #// be used here.
12 import sys as _sys
13 wx = _sys.modules[__name__]
14
15 NOT_FOUND = _core.NOT_FOUND
16 VSCROLL = _core.VSCROLL
17 HSCROLL = _core.HSCROLL
18 CAPTION = _core.CAPTION
19 DOUBLE_BORDER = _core.DOUBLE_BORDER
20 SUNKEN_BORDER = _core.SUNKEN_BORDER
21 RAISED_BORDER = _core.RAISED_BORDER
22 BORDER = _core.BORDER
23 SIMPLE_BORDER = _core.SIMPLE_BORDER
24 STATIC_BORDER = _core.STATIC_BORDER
25 TRANSPARENT_WINDOW = _core.TRANSPARENT_WINDOW
26 NO_BORDER = _core.NO_BORDER
27 USER_COLOURS = _core.USER_COLOURS
28 NO_3D = _core.NO_3D
29 TAB_TRAVERSAL = _core.TAB_TRAVERSAL
30 WANTS_CHARS = _core.WANTS_CHARS
31 POPUP_WINDOW = _core.POPUP_WINDOW
32 CENTER_FRAME = _core.CENTER_FRAME
33 CENTRE_ON_SCREEN = _core.CENTRE_ON_SCREEN
34 CENTER_ON_SCREEN = _core.CENTER_ON_SCREEN
35 STAY_ON_TOP = _core.STAY_ON_TOP
36 ICONIZE = _core.ICONIZE
37 MINIMIZE = _core.MINIMIZE
38 MAXIMIZE = _core.MAXIMIZE
39 CLOSE_BOX = _core.CLOSE_BOX
40 THICK_FRAME = _core.THICK_FRAME
41 SYSTEM_MENU = _core.SYSTEM_MENU
42 MINIMIZE_BOX = _core.MINIMIZE_BOX
43 MAXIMIZE_BOX = _core.MAXIMIZE_BOX
44 TINY_CAPTION_HORIZ = _core.TINY_CAPTION_HORIZ
45 TINY_CAPTION_VERT = _core.TINY_CAPTION_VERT
46 RESIZE_BOX = _core.RESIZE_BOX
47 RESIZE_BORDER = _core.RESIZE_BORDER
48 DIALOG_MODAL = _core.DIALOG_MODAL
49 DIALOG_MODELESS = _core.DIALOG_MODELESS
50 DIALOG_NO_PARENT = _core.DIALOG_NO_PARENT
51 DEFAULT_FRAME_STYLE = _core.DEFAULT_FRAME_STYLE
52 DEFAULT_DIALOG_STYLE = _core.DEFAULT_DIALOG_STYLE
53 FRAME_TOOL_WINDOW = _core.FRAME_TOOL_WINDOW
54 FRAME_FLOAT_ON_PARENT = _core.FRAME_FLOAT_ON_PARENT
55 FRAME_NO_WINDOW_MENU = _core.FRAME_NO_WINDOW_MENU
56 FRAME_NO_TASKBAR = _core.FRAME_NO_TASKBAR
57 FRAME_SHAPED = _core.FRAME_SHAPED
58 ED_CLIENT_MARGIN = _core.ED_CLIENT_MARGIN
59 ED_BUTTONS_BOTTOM = _core.ED_BUTTONS_BOTTOM
60 ED_BUTTONS_RIGHT = _core.ED_BUTTONS_RIGHT
61 ED_STATIC_LINE = _core.ED_STATIC_LINE
62 EXT_DIALOG_STYLE = _core.EXT_DIALOG_STYLE
63 CLIP_CHILDREN = _core.CLIP_CHILDREN
64 CLIP_SIBLINGS = _core.CLIP_SIBLINGS
65 RETAINED = _core.RETAINED
66 BACKINGSTORE = _core.BACKINGSTORE
67 COLOURED = _core.COLOURED
68 FIXED_LENGTH = _core.FIXED_LENGTH
69 LB_NEEDED_SB = _core.LB_NEEDED_SB
70 LB_ALWAYS_SB = _core.LB_ALWAYS_SB
71 LB_SORT = _core.LB_SORT
72 LB_SINGLE = _core.LB_SINGLE
73 LB_MULTIPLE = _core.LB_MULTIPLE
74 LB_EXTENDED = _core.LB_EXTENDED
75 LB_OWNERDRAW = _core.LB_OWNERDRAW
76 LB_HSCROLL = _core.LB_HSCROLL
77 PROCESS_ENTER = _core.PROCESS_ENTER
78 PASSWORD = _core.PASSWORD
79 CB_SIMPLE = _core.CB_SIMPLE
80 CB_DROPDOWN = _core.CB_DROPDOWN
81 CB_SORT = _core.CB_SORT
82 CB_READONLY = _core.CB_READONLY
83 RA_HORIZONTAL = _core.RA_HORIZONTAL
84 RA_VERTICAL = _core.RA_VERTICAL
85 RA_SPECIFY_ROWS = _core.RA_SPECIFY_ROWS
86 RA_SPECIFY_COLS = _core.RA_SPECIFY_COLS
87 RB_GROUP = _core.RB_GROUP
88 RB_SINGLE = _core.RB_SINGLE
89 SL_HORIZONTAL = _core.SL_HORIZONTAL
90 SL_VERTICAL = _core.SL_VERTICAL
91 SL_AUTOTICKS = _core.SL_AUTOTICKS
92 SL_LABELS = _core.SL_LABELS
93 SL_LEFT = _core.SL_LEFT
94 SL_TOP = _core.SL_TOP
95 SL_RIGHT = _core.SL_RIGHT
96 SL_BOTTOM = _core.SL_BOTTOM
97 SL_BOTH = _core.SL_BOTH
98 SL_SELRANGE = _core.SL_SELRANGE
99 SB_HORIZONTAL = _core.SB_HORIZONTAL
100 SB_VERTICAL = _core.SB_VERTICAL
101 ST_SIZEGRIP = _core.ST_SIZEGRIP
102 ST_NO_AUTORESIZE = _core.ST_NO_AUTORESIZE
103 FLOOD_SURFACE = _core.FLOOD_SURFACE
104 FLOOD_BORDER = _core.FLOOD_BORDER
105 ODDEVEN_RULE = _core.ODDEVEN_RULE
106 WINDING_RULE = _core.WINDING_RULE
107 TOOL_TOP = _core.TOOL_TOP
108 TOOL_BOTTOM = _core.TOOL_BOTTOM
109 TOOL_LEFT = _core.TOOL_LEFT
110 TOOL_RIGHT = _core.TOOL_RIGHT
111 OK = _core.OK
112 YES_NO = _core.YES_NO
113 CANCEL = _core.CANCEL
114 YES = _core.YES
115 NO = _core.NO
116 NO_DEFAULT = _core.NO_DEFAULT
117 YES_DEFAULT = _core.YES_DEFAULT
118 ICON_EXCLAMATION = _core.ICON_EXCLAMATION
119 ICON_HAND = _core.ICON_HAND
120 ICON_QUESTION = _core.ICON_QUESTION
121 ICON_INFORMATION = _core.ICON_INFORMATION
122 ICON_STOP = _core.ICON_STOP
123 ICON_ASTERISK = _core.ICON_ASTERISK
124 ICON_MASK = _core.ICON_MASK
125 ICON_WARNING = _core.ICON_WARNING
126 ICON_ERROR = _core.ICON_ERROR
127 FORWARD = _core.FORWARD
128 BACKWARD = _core.BACKWARD
129 RESET = _core.RESET
130 HELP = _core.HELP
131 MORE = _core.MORE
132 SETUP = _core.SETUP
133 SIZE_AUTO_WIDTH = _core.SIZE_AUTO_WIDTH
134 SIZE_AUTO_HEIGHT = _core.SIZE_AUTO_HEIGHT
135 SIZE_AUTO = _core.SIZE_AUTO
136 SIZE_USE_EXISTING = _core.SIZE_USE_EXISTING
137 SIZE_ALLOW_MINUS_ONE = _core.SIZE_ALLOW_MINUS_ONE
138 PORTRAIT = _core.PORTRAIT
139 LANDSCAPE = _core.LANDSCAPE
140 PRINT_QUALITY_HIGH = _core.PRINT_QUALITY_HIGH
141 PRINT_QUALITY_MEDIUM = _core.PRINT_QUALITY_MEDIUM
142 PRINT_QUALITY_LOW = _core.PRINT_QUALITY_LOW
143 PRINT_QUALITY_DRAFT = _core.PRINT_QUALITY_DRAFT
144 ID_ANY = _core.ID_ANY
145 ID_SEPARATOR = _core.ID_SEPARATOR
146 ID_LOWEST = _core.ID_LOWEST
147 ID_OPEN = _core.ID_OPEN
148 ID_CLOSE = _core.ID_CLOSE
149 ID_NEW = _core.ID_NEW
150 ID_SAVE = _core.ID_SAVE
151 ID_SAVEAS = _core.ID_SAVEAS
152 ID_REVERT = _core.ID_REVERT
153 ID_EXIT = _core.ID_EXIT
154 ID_UNDO = _core.ID_UNDO
155 ID_REDO = _core.ID_REDO
156 ID_HELP = _core.ID_HELP
157 ID_PRINT = _core.ID_PRINT
158 ID_PRINT_SETUP = _core.ID_PRINT_SETUP
159 ID_PREVIEW = _core.ID_PREVIEW
160 ID_ABOUT = _core.ID_ABOUT
161 ID_HELP_CONTENTS = _core.ID_HELP_CONTENTS
162 ID_HELP_COMMANDS = _core.ID_HELP_COMMANDS
163 ID_HELP_PROCEDURES = _core.ID_HELP_PROCEDURES
164 ID_HELP_CONTEXT = _core.ID_HELP_CONTEXT
165 ID_CLOSE_ALL = _core.ID_CLOSE_ALL
166 ID_PREFERENCES = _core.ID_PREFERENCES
167 ID_CUT = _core.ID_CUT
168 ID_COPY = _core.ID_COPY
169 ID_PASTE = _core.ID_PASTE
170 ID_CLEAR = _core.ID_CLEAR
171 ID_FIND = _core.ID_FIND
172 ID_DUPLICATE = _core.ID_DUPLICATE
173 ID_SELECTALL = _core.ID_SELECTALL
174 ID_DELETE = _core.ID_DELETE
175 ID_REPLACE = _core.ID_REPLACE
176 ID_REPLACE_ALL = _core.ID_REPLACE_ALL
177 ID_PROPERTIES = _core.ID_PROPERTIES
178 ID_VIEW_DETAILS = _core.ID_VIEW_DETAILS
179 ID_VIEW_LARGEICONS = _core.ID_VIEW_LARGEICONS
180 ID_VIEW_SMALLICONS = _core.ID_VIEW_SMALLICONS
181 ID_VIEW_LIST = _core.ID_VIEW_LIST
182 ID_VIEW_SORTDATE = _core.ID_VIEW_SORTDATE
183 ID_VIEW_SORTNAME = _core.ID_VIEW_SORTNAME
184 ID_VIEW_SORTSIZE = _core.ID_VIEW_SORTSIZE
185 ID_VIEW_SORTTYPE = _core.ID_VIEW_SORTTYPE
186 ID_FILE1 = _core.ID_FILE1
187 ID_FILE2 = _core.ID_FILE2
188 ID_FILE3 = _core.ID_FILE3
189 ID_FILE4 = _core.ID_FILE4
190 ID_FILE5 = _core.ID_FILE5
191 ID_FILE6 = _core.ID_FILE6
192 ID_FILE7 = _core.ID_FILE7
193 ID_FILE8 = _core.ID_FILE8
194 ID_FILE9 = _core.ID_FILE9
195 ID_OK = _core.ID_OK
196 ID_CANCEL = _core.ID_CANCEL
197 ID_APPLY = _core.ID_APPLY
198 ID_YES = _core.ID_YES
199 ID_NO = _core.ID_NO
200 ID_STATIC = _core.ID_STATIC
201 ID_FORWARD = _core.ID_FORWARD
202 ID_BACKWARD = _core.ID_BACKWARD
203 ID_DEFAULT = _core.ID_DEFAULT
204 ID_MORE = _core.ID_MORE
205 ID_SETUP = _core.ID_SETUP
206 ID_RESET = _core.ID_RESET
207 ID_CONTEXT_HELP = _core.ID_CONTEXT_HELP
208 ID_YESTOALL = _core.ID_YESTOALL
209 ID_NOTOALL = _core.ID_NOTOALL
210 ID_ABORT = _core.ID_ABORT
211 ID_RETRY = _core.ID_RETRY
212 ID_IGNORE = _core.ID_IGNORE
213 ID_HIGHEST = _core.ID_HIGHEST
214 OPEN = _core.OPEN
215 SAVE = _core.SAVE
216 HIDE_READONLY = _core.HIDE_READONLY
217 OVERWRITE_PROMPT = _core.OVERWRITE_PROMPT
218 FILE_MUST_EXIST = _core.FILE_MUST_EXIST
219 MULTIPLE = _core.MULTIPLE
220 CHANGE_DIR = _core.CHANGE_DIR
221 ACCEL_ALT = _core.ACCEL_ALT
222 ACCEL_CTRL = _core.ACCEL_CTRL
223 ACCEL_SHIFT = _core.ACCEL_SHIFT
224 ACCEL_NORMAL = _core.ACCEL_NORMAL
225 PD_AUTO_HIDE = _core.PD_AUTO_HIDE
226 PD_APP_MODAL = _core.PD_APP_MODAL
227 PD_CAN_ABORT = _core.PD_CAN_ABORT
228 PD_ELAPSED_TIME = _core.PD_ELAPSED_TIME
229 PD_ESTIMATED_TIME = _core.PD_ESTIMATED_TIME
230 PD_REMAINING_TIME = _core.PD_REMAINING_TIME
231 DD_NEW_DIR_BUTTON = _core.DD_NEW_DIR_BUTTON
232 DD_DEFAULT_STYLE = _core.DD_DEFAULT_STYLE
233 MENU_TEAROFF = _core.MENU_TEAROFF
234 MB_DOCKABLE = _core.MB_DOCKABLE
235 NO_FULL_REPAINT_ON_RESIZE = _core.NO_FULL_REPAINT_ON_RESIZE
236 FULL_REPAINT_ON_RESIZE = _core.FULL_REPAINT_ON_RESIZE
237 LI_HORIZONTAL = _core.LI_HORIZONTAL
238 LI_VERTICAL = _core.LI_VERTICAL
239 WS_EX_VALIDATE_RECURSIVELY = _core.WS_EX_VALIDATE_RECURSIVELY
240 WS_EX_BLOCK_EVENTS = _core.WS_EX_BLOCK_EVENTS
241 WS_EX_TRANSIENT = _core.WS_EX_TRANSIENT
242 WS_EX_THEMED_BACKGROUND = _core.WS_EX_THEMED_BACKGROUND
243 WS_EX_PROCESS_IDLE = _core.WS_EX_PROCESS_IDLE
244 WS_EX_PROCESS_UI_UPDATES = _core.WS_EX_PROCESS_UI_UPDATES
245 MM_TEXT = _core.MM_TEXT
246 MM_LOMETRIC = _core.MM_LOMETRIC
247 MM_HIMETRIC = _core.MM_HIMETRIC
248 MM_LOENGLISH = _core.MM_LOENGLISH
249 MM_HIENGLISH = _core.MM_HIENGLISH
250 MM_TWIPS = _core.MM_TWIPS
251 MM_ISOTROPIC = _core.MM_ISOTROPIC
252 MM_ANISOTROPIC = _core.MM_ANISOTROPIC
253 MM_POINTS = _core.MM_POINTS
254 MM_METRIC = _core.MM_METRIC
255 CENTRE = _core.CENTRE
256 CENTER = _core.CENTER
257 HORIZONTAL = _core.HORIZONTAL
258 VERTICAL = _core.VERTICAL
259 BOTH = _core.BOTH
260 LEFT = _core.LEFT
261 RIGHT = _core.RIGHT
262 UP = _core.UP
263 DOWN = _core.DOWN
264 TOP = _core.TOP
265 BOTTOM = _core.BOTTOM
266 NORTH = _core.NORTH
267 SOUTH = _core.SOUTH
268 WEST = _core.WEST
269 EAST = _core.EAST
270 ALL = _core.ALL
271 ALIGN_NOT = _core.ALIGN_NOT
272 ALIGN_CENTER_HORIZONTAL = _core.ALIGN_CENTER_HORIZONTAL
273 ALIGN_CENTRE_HORIZONTAL = _core.ALIGN_CENTRE_HORIZONTAL
274 ALIGN_LEFT = _core.ALIGN_LEFT
275 ALIGN_TOP = _core.ALIGN_TOP
276 ALIGN_RIGHT = _core.ALIGN_RIGHT
277 ALIGN_BOTTOM = _core.ALIGN_BOTTOM
278 ALIGN_CENTER_VERTICAL = _core.ALIGN_CENTER_VERTICAL
279 ALIGN_CENTRE_VERTICAL = _core.ALIGN_CENTRE_VERTICAL
280 ALIGN_CENTER = _core.ALIGN_CENTER
281 ALIGN_CENTRE = _core.ALIGN_CENTRE
282 ALIGN_MASK = _core.ALIGN_MASK
283 STRETCH_NOT = _core.STRETCH_NOT
284 SHRINK = _core.SHRINK
285 GROW = _core.GROW
286 EXPAND = _core.EXPAND
287 SHAPED = _core.SHAPED
288 FIXED_SIZE = _core.FIXED_SIZE
289 TILE = _core.TILE
290 ADJUST_MINSIZE = _core.ADJUST_MINSIZE
291 BORDER_DEFAULT = _core.BORDER_DEFAULT
292 BORDER_NONE = _core.BORDER_NONE
293 BORDER_STATIC = _core.BORDER_STATIC
294 BORDER_SIMPLE = _core.BORDER_SIMPLE
295 BORDER_RAISED = _core.BORDER_RAISED
296 BORDER_SUNKEN = _core.BORDER_SUNKEN
297 BORDER_DOUBLE = _core.BORDER_DOUBLE
298 BORDER_MASK = _core.BORDER_MASK
299 DEFAULT = _core.DEFAULT
300 DECORATIVE = _core.DECORATIVE
301 ROMAN = _core.ROMAN
302 SCRIPT = _core.SCRIPT
303 SWISS = _core.SWISS
304 MODERN = _core.MODERN
305 TELETYPE = _core.TELETYPE
306 VARIABLE = _core.VARIABLE
307 FIXED = _core.FIXED
308 NORMAL = _core.NORMAL
309 LIGHT = _core.LIGHT
310 BOLD = _core.BOLD
311 ITALIC = _core.ITALIC
312 SLANT = _core.SLANT
313 SOLID = _core.SOLID
314 DOT = _core.DOT
315 LONG_DASH = _core.LONG_DASH
316 SHORT_DASH = _core.SHORT_DASH
317 DOT_DASH = _core.DOT_DASH
318 USER_DASH = _core.USER_DASH
319 TRANSPARENT = _core.TRANSPARENT
320 STIPPLE = _core.STIPPLE
321 BDIAGONAL_HATCH = _core.BDIAGONAL_HATCH
322 CROSSDIAG_HATCH = _core.CROSSDIAG_HATCH
323 FDIAGONAL_HATCH = _core.FDIAGONAL_HATCH
324 CROSS_HATCH = _core.CROSS_HATCH
325 HORIZONTAL_HATCH = _core.HORIZONTAL_HATCH
326 VERTICAL_HATCH = _core.VERTICAL_HATCH
327 JOIN_BEVEL = _core.JOIN_BEVEL
328 JOIN_MITER = _core.JOIN_MITER
329 JOIN_ROUND = _core.JOIN_ROUND
330 CAP_ROUND = _core.CAP_ROUND
331 CAP_PROJECTING = _core.CAP_PROJECTING
332 CAP_BUTT = _core.CAP_BUTT
333 CLEAR = _core.CLEAR
334 XOR = _core.XOR
335 INVERT = _core.INVERT
336 OR_REVERSE = _core.OR_REVERSE
337 AND_REVERSE = _core.AND_REVERSE
338 COPY = _core.COPY
339 AND = _core.AND
340 AND_INVERT = _core.AND_INVERT
341 NO_OP = _core.NO_OP
342 NOR = _core.NOR
343 EQUIV = _core.EQUIV
344 SRC_INVERT = _core.SRC_INVERT
345 OR_INVERT = _core.OR_INVERT
346 NAND = _core.NAND
347 OR = _core.OR
348 SET = _core.SET
349 WXK_BACK = _core.WXK_BACK
350 WXK_TAB = _core.WXK_TAB
351 WXK_RETURN = _core.WXK_RETURN
352 WXK_ESCAPE = _core.WXK_ESCAPE
353 WXK_SPACE = _core.WXK_SPACE
354 WXK_DELETE = _core.WXK_DELETE
355 WXK_START = _core.WXK_START
356 WXK_LBUTTON = _core.WXK_LBUTTON
357 WXK_RBUTTON = _core.WXK_RBUTTON
358 WXK_CANCEL = _core.WXK_CANCEL
359 WXK_MBUTTON = _core.WXK_MBUTTON
360 WXK_CLEAR = _core.WXK_CLEAR
361 WXK_SHIFT = _core.WXK_SHIFT
362 WXK_ALT = _core.WXK_ALT
363 WXK_CONTROL = _core.WXK_CONTROL
364 WXK_MENU = _core.WXK_MENU
365 WXK_PAUSE = _core.WXK_PAUSE
366 WXK_CAPITAL = _core.WXK_CAPITAL
367 WXK_PRIOR = _core.WXK_PRIOR
368 WXK_NEXT = _core.WXK_NEXT
369 WXK_END = _core.WXK_END
370 WXK_HOME = _core.WXK_HOME
371 WXK_LEFT = _core.WXK_LEFT
372 WXK_UP = _core.WXK_UP
373 WXK_RIGHT = _core.WXK_RIGHT
374 WXK_DOWN = _core.WXK_DOWN
375 WXK_SELECT = _core.WXK_SELECT
376 WXK_PRINT = _core.WXK_PRINT
377 WXK_EXECUTE = _core.WXK_EXECUTE
378 WXK_SNAPSHOT = _core.WXK_SNAPSHOT
379 WXK_INSERT = _core.WXK_INSERT
380 WXK_HELP = _core.WXK_HELP
381 WXK_NUMPAD0 = _core.WXK_NUMPAD0
382 WXK_NUMPAD1 = _core.WXK_NUMPAD1
383 WXK_NUMPAD2 = _core.WXK_NUMPAD2
384 WXK_NUMPAD3 = _core.WXK_NUMPAD3
385 WXK_NUMPAD4 = _core.WXK_NUMPAD4
386 WXK_NUMPAD5 = _core.WXK_NUMPAD5
387 WXK_NUMPAD6 = _core.WXK_NUMPAD6
388 WXK_NUMPAD7 = _core.WXK_NUMPAD7
389 WXK_NUMPAD8 = _core.WXK_NUMPAD8
390 WXK_NUMPAD9 = _core.WXK_NUMPAD9
391 WXK_MULTIPLY = _core.WXK_MULTIPLY
392 WXK_ADD = _core.WXK_ADD
393 WXK_SEPARATOR = _core.WXK_SEPARATOR
394 WXK_SUBTRACT = _core.WXK_SUBTRACT
395 WXK_DECIMAL = _core.WXK_DECIMAL
396 WXK_DIVIDE = _core.WXK_DIVIDE
397 WXK_F1 = _core.WXK_F1
398 WXK_F2 = _core.WXK_F2
399 WXK_F3 = _core.WXK_F3
400 WXK_F4 = _core.WXK_F4
401 WXK_F5 = _core.WXK_F5
402 WXK_F6 = _core.WXK_F6
403 WXK_F7 = _core.WXK_F7
404 WXK_F8 = _core.WXK_F8
405 WXK_F9 = _core.WXK_F9
406 WXK_F10 = _core.WXK_F10
407 WXK_F11 = _core.WXK_F11
408 WXK_F12 = _core.WXK_F12
409 WXK_F13 = _core.WXK_F13
410 WXK_F14 = _core.WXK_F14
411 WXK_F15 = _core.WXK_F15
412 WXK_F16 = _core.WXK_F16
413 WXK_F17 = _core.WXK_F17
414 WXK_F18 = _core.WXK_F18
415 WXK_F19 = _core.WXK_F19
416 WXK_F20 = _core.WXK_F20
417 WXK_F21 = _core.WXK_F21
418 WXK_F22 = _core.WXK_F22
419 WXK_F23 = _core.WXK_F23
420 WXK_F24 = _core.WXK_F24
421 WXK_NUMLOCK = _core.WXK_NUMLOCK
422 WXK_SCROLL = _core.WXK_SCROLL
423 WXK_PAGEUP = _core.WXK_PAGEUP
424 WXK_PAGEDOWN = _core.WXK_PAGEDOWN
425 WXK_NUMPAD_SPACE = _core.WXK_NUMPAD_SPACE
426 WXK_NUMPAD_TAB = _core.WXK_NUMPAD_TAB
427 WXK_NUMPAD_ENTER = _core.WXK_NUMPAD_ENTER
428 WXK_NUMPAD_F1 = _core.WXK_NUMPAD_F1
429 WXK_NUMPAD_F2 = _core.WXK_NUMPAD_F2
430 WXK_NUMPAD_F3 = _core.WXK_NUMPAD_F3
431 WXK_NUMPAD_F4 = _core.WXK_NUMPAD_F4
432 WXK_NUMPAD_HOME = _core.WXK_NUMPAD_HOME
433 WXK_NUMPAD_LEFT = _core.WXK_NUMPAD_LEFT
434 WXK_NUMPAD_UP = _core.WXK_NUMPAD_UP
435 WXK_NUMPAD_RIGHT = _core.WXK_NUMPAD_RIGHT
436 WXK_NUMPAD_DOWN = _core.WXK_NUMPAD_DOWN
437 WXK_NUMPAD_PRIOR = _core.WXK_NUMPAD_PRIOR
438 WXK_NUMPAD_PAGEUP = _core.WXK_NUMPAD_PAGEUP
439 WXK_NUMPAD_NEXT = _core.WXK_NUMPAD_NEXT
440 WXK_NUMPAD_PAGEDOWN = _core.WXK_NUMPAD_PAGEDOWN
441 WXK_NUMPAD_END = _core.WXK_NUMPAD_END
442 WXK_NUMPAD_BEGIN = _core.WXK_NUMPAD_BEGIN
443 WXK_NUMPAD_INSERT = _core.WXK_NUMPAD_INSERT
444 WXK_NUMPAD_DELETE = _core.WXK_NUMPAD_DELETE
445 WXK_NUMPAD_EQUAL = _core.WXK_NUMPAD_EQUAL
446 WXK_NUMPAD_MULTIPLY = _core.WXK_NUMPAD_MULTIPLY
447 WXK_NUMPAD_ADD = _core.WXK_NUMPAD_ADD
448 WXK_NUMPAD_SEPARATOR = _core.WXK_NUMPAD_SEPARATOR
449 WXK_NUMPAD_SUBTRACT = _core.WXK_NUMPAD_SUBTRACT
450 WXK_NUMPAD_DECIMAL = _core.WXK_NUMPAD_DECIMAL
451 WXK_NUMPAD_DIVIDE = _core.WXK_NUMPAD_DIVIDE
452 WXK_WINDOWS_LEFT = _core.WXK_WINDOWS_LEFT
453 WXK_WINDOWS_RIGHT = _core.WXK_WINDOWS_RIGHT
454 WXK_WINDOWS_MENU = _core.WXK_WINDOWS_MENU
455 PAPER_NONE = _core.PAPER_NONE
456 PAPER_LETTER = _core.PAPER_LETTER
457 PAPER_LEGAL = _core.PAPER_LEGAL
458 PAPER_A4 = _core.PAPER_A4
459 PAPER_CSHEET = _core.PAPER_CSHEET
460 PAPER_DSHEET = _core.PAPER_DSHEET
461 PAPER_ESHEET = _core.PAPER_ESHEET
462 PAPER_LETTERSMALL = _core.PAPER_LETTERSMALL
463 PAPER_TABLOID = _core.PAPER_TABLOID
464 PAPER_LEDGER = _core.PAPER_LEDGER
465 PAPER_STATEMENT = _core.PAPER_STATEMENT
466 PAPER_EXECUTIVE = _core.PAPER_EXECUTIVE
467 PAPER_A3 = _core.PAPER_A3
468 PAPER_A4SMALL = _core.PAPER_A4SMALL
469 PAPER_A5 = _core.PAPER_A5
470 PAPER_B4 = _core.PAPER_B4
471 PAPER_B5 = _core.PAPER_B5
472 PAPER_FOLIO = _core.PAPER_FOLIO
473 PAPER_QUARTO = _core.PAPER_QUARTO
474 PAPER_10X14 = _core.PAPER_10X14
475 PAPER_11X17 = _core.PAPER_11X17
476 PAPER_NOTE = _core.PAPER_NOTE
477 PAPER_ENV_9 = _core.PAPER_ENV_9
478 PAPER_ENV_10 = _core.PAPER_ENV_10
479 PAPER_ENV_11 = _core.PAPER_ENV_11
480 PAPER_ENV_12 = _core.PAPER_ENV_12
481 PAPER_ENV_14 = _core.PAPER_ENV_14
482 PAPER_ENV_DL = _core.PAPER_ENV_DL
483 PAPER_ENV_C5 = _core.PAPER_ENV_C5
484 PAPER_ENV_C3 = _core.PAPER_ENV_C3
485 PAPER_ENV_C4 = _core.PAPER_ENV_C4
486 PAPER_ENV_C6 = _core.PAPER_ENV_C6
487 PAPER_ENV_C65 = _core.PAPER_ENV_C65
488 PAPER_ENV_B4 = _core.PAPER_ENV_B4
489 PAPER_ENV_B5 = _core.PAPER_ENV_B5
490 PAPER_ENV_B6 = _core.PAPER_ENV_B6
491 PAPER_ENV_ITALY = _core.PAPER_ENV_ITALY
492 PAPER_ENV_MONARCH = _core.PAPER_ENV_MONARCH
493 PAPER_ENV_PERSONAL = _core.PAPER_ENV_PERSONAL
494 PAPER_FANFOLD_US = _core.PAPER_FANFOLD_US
495 PAPER_FANFOLD_STD_GERMAN = _core.PAPER_FANFOLD_STD_GERMAN
496 PAPER_FANFOLD_LGL_GERMAN = _core.PAPER_FANFOLD_LGL_GERMAN
497 PAPER_ISO_B4 = _core.PAPER_ISO_B4
498 PAPER_JAPANESE_POSTCARD = _core.PAPER_JAPANESE_POSTCARD
499 PAPER_9X11 = _core.PAPER_9X11
500 PAPER_10X11 = _core.PAPER_10X11
501 PAPER_15X11 = _core.PAPER_15X11
502 PAPER_ENV_INVITE = _core.PAPER_ENV_INVITE
503 PAPER_LETTER_EXTRA = _core.PAPER_LETTER_EXTRA
504 PAPER_LEGAL_EXTRA = _core.PAPER_LEGAL_EXTRA
505 PAPER_TABLOID_EXTRA = _core.PAPER_TABLOID_EXTRA
506 PAPER_A4_EXTRA = _core.PAPER_A4_EXTRA
507 PAPER_LETTER_TRANSVERSE = _core.PAPER_LETTER_TRANSVERSE
508 PAPER_A4_TRANSVERSE = _core.PAPER_A4_TRANSVERSE
509 PAPER_LETTER_EXTRA_TRANSVERSE = _core.PAPER_LETTER_EXTRA_TRANSVERSE
510 PAPER_A_PLUS = _core.PAPER_A_PLUS
511 PAPER_B_PLUS = _core.PAPER_B_PLUS
512 PAPER_LETTER_PLUS = _core.PAPER_LETTER_PLUS
513 PAPER_A4_PLUS = _core.PAPER_A4_PLUS
514 PAPER_A5_TRANSVERSE = _core.PAPER_A5_TRANSVERSE
515 PAPER_B5_TRANSVERSE = _core.PAPER_B5_TRANSVERSE
516 PAPER_A3_EXTRA = _core.PAPER_A3_EXTRA
517 PAPER_A5_EXTRA = _core.PAPER_A5_EXTRA
518 PAPER_B5_EXTRA = _core.PAPER_B5_EXTRA
519 PAPER_A2 = _core.PAPER_A2
520 PAPER_A3_TRANSVERSE = _core.PAPER_A3_TRANSVERSE
521 PAPER_A3_EXTRA_TRANSVERSE = _core.PAPER_A3_EXTRA_TRANSVERSE
522 DUPLEX_SIMPLEX = _core.DUPLEX_SIMPLEX
523 DUPLEX_HORIZONTAL = _core.DUPLEX_HORIZONTAL
524 DUPLEX_VERTICAL = _core.DUPLEX_VERTICAL
525 ITEM_SEPARATOR = _core.ITEM_SEPARATOR
526 ITEM_NORMAL = _core.ITEM_NORMAL
527 ITEM_CHECK = _core.ITEM_CHECK
528 ITEM_RADIO = _core.ITEM_RADIO
529 ITEM_MAX = _core.ITEM_MAX
530 HT_NOWHERE = _core.HT_NOWHERE
531 HT_SCROLLBAR_FIRST = _core.HT_SCROLLBAR_FIRST
532 HT_SCROLLBAR_ARROW_LINE_1 = _core.HT_SCROLLBAR_ARROW_LINE_1
533 HT_SCROLLBAR_ARROW_LINE_2 = _core.HT_SCROLLBAR_ARROW_LINE_2
534 HT_SCROLLBAR_ARROW_PAGE_1 = _core.HT_SCROLLBAR_ARROW_PAGE_1
535 HT_SCROLLBAR_ARROW_PAGE_2 = _core.HT_SCROLLBAR_ARROW_PAGE_2
536 HT_SCROLLBAR_THUMB = _core.HT_SCROLLBAR_THUMB
537 HT_SCROLLBAR_BAR_1 = _core.HT_SCROLLBAR_BAR_1
538 HT_SCROLLBAR_BAR_2 = _core.HT_SCROLLBAR_BAR_2
539 HT_SCROLLBAR_LAST = _core.HT_SCROLLBAR_LAST
540 HT_WINDOW_OUTSIDE = _core.HT_WINDOW_OUTSIDE
541 HT_WINDOW_INSIDE = _core.HT_WINDOW_INSIDE
542 HT_WINDOW_VERT_SCROLLBAR = _core.HT_WINDOW_VERT_SCROLLBAR
543 HT_WINDOW_HORZ_SCROLLBAR = _core.HT_WINDOW_HORZ_SCROLLBAR
544 HT_WINDOW_CORNER = _core.HT_WINDOW_CORNER
545 HT_MAX = _core.HT_MAX
546 MOD_NONE = _core.MOD_NONE
547 MOD_ALT = _core.MOD_ALT
548 MOD_CONTROL = _core.MOD_CONTROL
549 MOD_SHIFT = _core.MOD_SHIFT
550 MOD_WIN = _core.MOD_WIN
551 UPDATE_UI_NONE = _core.UPDATE_UI_NONE
552 UPDATE_UI_RECURSE = _core.UPDATE_UI_RECURSE
553 UPDATE_UI_FROMIDLE = _core.UPDATE_UI_FROMIDLE
554 #---------------------------------------------------------------------------
555
556 class Object(object):
557 """
558 The base class for most wx objects, although in wxPython not
559 much functionality is needed nor exposed.
560 """
561 def __init__(self): raise RuntimeError, "No constructor defined"
562 def __repr__(self):
563 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
564 def GetClassName(*args, **kwargs):
565 """
566 GetClassName() -> String
567
568 Returns the class name of the C++ object using wxRTTI.
569 """
570 return _core.Object_GetClassName(*args, **kwargs)
571
572 def Destroy(*args, **kwargs):
573 """
574 Destroy()
575
576 Deletes the C++ object this Python object is a proxy for.
577 """
578 return _core.Object_Destroy(*args, **kwargs)
579
580
581 class ObjectPtr(Object):
582 def __init__(self, this):
583 self.this = this
584 if not hasattr(self,"thisown"): self.thisown = 0
585 self.__class__ = Object
586 _core.Object_swigregister(ObjectPtr)
587 _wxPySetDictionary = _core._wxPySetDictionary
588
589 _wxPyFixStockObjects = _core._wxPyFixStockObjects
590
591 cvar = _core.cvar
592 EmptyString = cvar.EmptyString
593
594 #---------------------------------------------------------------------------
595
596 BITMAP_TYPE_INVALID = _core.BITMAP_TYPE_INVALID
597 BITMAP_TYPE_BMP = _core.BITMAP_TYPE_BMP
598 BITMAP_TYPE_ICO = _core.BITMAP_TYPE_ICO
599 BITMAP_TYPE_CUR = _core.BITMAP_TYPE_CUR
600 BITMAP_TYPE_XBM = _core.BITMAP_TYPE_XBM
601 BITMAP_TYPE_XBM_DATA = _core.BITMAP_TYPE_XBM_DATA
602 BITMAP_TYPE_XPM = _core.BITMAP_TYPE_XPM
603 BITMAP_TYPE_XPM_DATA = _core.BITMAP_TYPE_XPM_DATA
604 BITMAP_TYPE_TIF = _core.BITMAP_TYPE_TIF
605 BITMAP_TYPE_GIF = _core.BITMAP_TYPE_GIF
606 BITMAP_TYPE_PNG = _core.BITMAP_TYPE_PNG
607 BITMAP_TYPE_JPEG = _core.BITMAP_TYPE_JPEG
608 BITMAP_TYPE_PNM = _core.BITMAP_TYPE_PNM
609 BITMAP_TYPE_PCX = _core.BITMAP_TYPE_PCX
610 BITMAP_TYPE_PICT = _core.BITMAP_TYPE_PICT
611 BITMAP_TYPE_ICON = _core.BITMAP_TYPE_ICON
612 BITMAP_TYPE_ANI = _core.BITMAP_TYPE_ANI
613 BITMAP_TYPE_IFF = _core.BITMAP_TYPE_IFF
614 BITMAP_TYPE_MACCURSOR = _core.BITMAP_TYPE_MACCURSOR
615 BITMAP_TYPE_ANY = _core.BITMAP_TYPE_ANY
616 CURSOR_NONE = _core.CURSOR_NONE
617 CURSOR_ARROW = _core.CURSOR_ARROW
618 CURSOR_RIGHT_ARROW = _core.CURSOR_RIGHT_ARROW
619 CURSOR_BULLSEYE = _core.CURSOR_BULLSEYE
620 CURSOR_CHAR = _core.CURSOR_CHAR
621 CURSOR_CROSS = _core.CURSOR_CROSS
622 CURSOR_HAND = _core.CURSOR_HAND
623 CURSOR_IBEAM = _core.CURSOR_IBEAM
624 CURSOR_LEFT_BUTTON = _core.CURSOR_LEFT_BUTTON
625 CURSOR_MAGNIFIER = _core.CURSOR_MAGNIFIER
626 CURSOR_MIDDLE_BUTTON = _core.CURSOR_MIDDLE_BUTTON
627 CURSOR_NO_ENTRY = _core.CURSOR_NO_ENTRY
628 CURSOR_PAINT_BRUSH = _core.CURSOR_PAINT_BRUSH
629 CURSOR_PENCIL = _core.CURSOR_PENCIL
630 CURSOR_POINT_LEFT = _core.CURSOR_POINT_LEFT
631 CURSOR_POINT_RIGHT = _core.CURSOR_POINT_RIGHT
632 CURSOR_QUESTION_ARROW = _core.CURSOR_QUESTION_ARROW
633 CURSOR_RIGHT_BUTTON = _core.CURSOR_RIGHT_BUTTON
634 CURSOR_SIZENESW = _core.CURSOR_SIZENESW
635 CURSOR_SIZENS = _core.CURSOR_SIZENS
636 CURSOR_SIZENWSE = _core.CURSOR_SIZENWSE
637 CURSOR_SIZEWE = _core.CURSOR_SIZEWE
638 CURSOR_SIZING = _core.CURSOR_SIZING
639 CURSOR_SPRAYCAN = _core.CURSOR_SPRAYCAN
640 CURSOR_WAIT = _core.CURSOR_WAIT
641 CURSOR_WATCH = _core.CURSOR_WATCH
642 CURSOR_BLANK = _core.CURSOR_BLANK
643 CURSOR_DEFAULT = _core.CURSOR_DEFAULT
644 CURSOR_COPY_ARROW = _core.CURSOR_COPY_ARROW
645 CURSOR_ARROWWAIT = _core.CURSOR_ARROWWAIT
646 CURSOR_MAX = _core.CURSOR_MAX
647 #---------------------------------------------------------------------------
648
649 class Size(object):
650 """
651 wx.Size is a useful data structure used to represent the size of something.
652 It simply contians integer width and height proprtites. In most places in
653 wxPython where a wx.Size is expected a (width,height) tuple can be used
654 instead.
655 """
656 def __repr__(self):
657 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
658 width = property(_core.Size_width_get, _core.Size_width_set)
659 height = property(_core.Size_height_get, _core.Size_height_set)
660 x = width; y = height
661 def __init__(self, *args, **kwargs):
662 """
663 __init__(int w=0, int h=0) -> Size
664
665 Creates a size object.
666 """
667 newobj = _core.new_Size(*args, **kwargs)
668 self.this = newobj.this
669 self.thisown = 1
670 del newobj.thisown
671 def __del__(self, destroy=_core.delete_Size):
672 """__del__()"""
673 try:
674 if self.thisown: destroy(self)
675 except: pass
676
677 def __eq__(*args, **kwargs):
678 """
679 __eq__(Size sz) -> bool
680
681 Test for equality of wx.Size objects.
682 """
683 return _core.Size___eq__(*args, **kwargs)
684
685 def __ne__(*args, **kwargs):
686 """
687 __ne__(Size sz) -> bool
688
689 Test for inequality.
690 """
691 return _core.Size___ne__(*args, **kwargs)
692
693 def __add__(*args, **kwargs):
694 """
695 __add__(Size sz) -> Size
696
697 Add sz's proprties to this and return the result.
698 """
699 return _core.Size___add__(*args, **kwargs)
700
701 def __sub__(*args, **kwargs):
702 """
703 __sub__(Size sz) -> Size
704
705 Subtract sz's properties from this and return the result.
706 """
707 return _core.Size___sub__(*args, **kwargs)
708
709 def IncTo(*args, **kwargs):
710 """
711 IncTo(Size sz)
712
713 Increments this object so that both of its dimensions are not less
714 than the corresponding dimensions of the size.
715 """
716 return _core.Size_IncTo(*args, **kwargs)
717
718 def DecTo(*args, **kwargs):
719 """
720 DecTo(Size sz)
721
722 Decrements this object so that both of its dimensions are not greater
723 than the corresponding dimensions of the size.
724 """
725 return _core.Size_DecTo(*args, **kwargs)
726
727 def Set(*args, **kwargs):
728 """
729 Set(int w, int h)
730
731 Set both width and height.
732 """
733 return _core.Size_Set(*args, **kwargs)
734
735 def SetWidth(*args, **kwargs):
736 """SetWidth(int w)"""
737 return _core.Size_SetWidth(*args, **kwargs)
738
739 def SetHeight(*args, **kwargs):
740 """SetHeight(int h)"""
741 return _core.Size_SetHeight(*args, **kwargs)
742
743 def GetWidth(*args, **kwargs):
744 """GetWidth() -> int"""
745 return _core.Size_GetWidth(*args, **kwargs)
746
747 def GetHeight(*args, **kwargs):
748 """GetHeight() -> int"""
749 return _core.Size_GetHeight(*args, **kwargs)
750
751 def IsFullySpecified(*args, **kwargs):
752 """
753 IsFullySpecified() -> bool
754
755 Returns True if both components of the size are non-default values.
756 """
757 return _core.Size_IsFullySpecified(*args, **kwargs)
758
759 def SetDefaults(*args, **kwargs):
760 """
761 SetDefaults(Size size)
762
763 Combine this size with the other one replacing the default
764 components of this object (i.e. equal to -1) with those of the
765 other.
766 """
767 return _core.Size_SetDefaults(*args, **kwargs)
768
769 def Get(*args, **kwargs):
770 """
771 Get() -> (width,height)
772
773 Returns the width and height properties as a tuple.
774 """
775 return _core.Size_Get(*args, **kwargs)
776
777 asTuple = Get
778 def __str__(self): return str(self.Get())
779 def __repr__(self): return 'wx.Size'+str(self.Get())
780 def __len__(self): return len(self.Get())
781 def __getitem__(self, index): return self.Get()[index]
782 def __setitem__(self, index, val):
783 if index == 0: self.width = val
784 elif index == 1: self.height = val
785 else: raise IndexError
786 def __nonzero__(self): return self.Get() != (0,0)
787 __safe_for_unpickling__ = True
788 def __reduce__(self): return (wx.Size, self.Get())
789
790
791 class SizePtr(Size):
792 def __init__(self, this):
793 self.this = this
794 if not hasattr(self,"thisown"): self.thisown = 0
795 self.__class__ = Size
796 _core.Size_swigregister(SizePtr)
797
798 #---------------------------------------------------------------------------
799
800 class RealPoint(object):
801 """
802 A data structure for representing a point or position with floating point x
803 and y properties. In wxPython most places that expect a wx.RealPoint can also
804 accept a (x,y) tuple.
805 """
806 def __repr__(self):
807 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
808 x = property(_core.RealPoint_x_get, _core.RealPoint_x_set)
809 y = property(_core.RealPoint_y_get, _core.RealPoint_y_set)
810 def __init__(self, *args, **kwargs):
811 """
812 __init__(double x=0.0, double y=0.0) -> RealPoint
813
814 Create a wx.RealPoint object
815 """
816 newobj = _core.new_RealPoint(*args, **kwargs)
817 self.this = newobj.this
818 self.thisown = 1
819 del newobj.thisown
820 def __del__(self, destroy=_core.delete_RealPoint):
821 """__del__()"""
822 try:
823 if self.thisown: destroy(self)
824 except: pass
825
826 def __eq__(*args, **kwargs):
827 """
828 __eq__(RealPoint pt) -> bool
829
830 Test for equality of wx.RealPoint objects.
831 """
832 return _core.RealPoint___eq__(*args, **kwargs)
833
834 def __ne__(*args, **kwargs):
835 """
836 __ne__(RealPoint pt) -> bool
837
838 Test for inequality of wx.RealPoint objects.
839 """
840 return _core.RealPoint___ne__(*args, **kwargs)
841
842 def __add__(*args, **kwargs):
843 """
844 __add__(RealPoint pt) -> RealPoint
845
846 Add pt's proprties to this and return the result.
847 """
848 return _core.RealPoint___add__(*args, **kwargs)
849
850 def __sub__(*args, **kwargs):
851 """
852 __sub__(RealPoint pt) -> RealPoint
853
854 Subtract pt's proprties from this and return the result
855 """
856 return _core.RealPoint___sub__(*args, **kwargs)
857
858 def Set(*args, **kwargs):
859 """
860 Set(double x, double y)
861
862 Set both the x and y properties
863 """
864 return _core.RealPoint_Set(*args, **kwargs)
865
866 def Get(*args, **kwargs):
867 """
868 Get() -> (x,y)
869
870 Return the x and y properties as a tuple.
871 """
872 return _core.RealPoint_Get(*args, **kwargs)
873
874 asTuple = Get
875 def __str__(self): return str(self.Get())
876 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
877 def __len__(self): return len(self.Get())
878 def __getitem__(self, index): return self.Get()[index]
879 def __setitem__(self, index, val):
880 if index == 0: self.x = val
881 elif index == 1: self.y = val
882 else: raise IndexError
883 def __nonzero__(self): return self.Get() != (0.0, 0.0)
884 __safe_for_unpickling__ = True
885 def __reduce__(self): return (wx.RealPoint, self.Get())
886
887
888 class RealPointPtr(RealPoint):
889 def __init__(self, this):
890 self.this = this
891 if not hasattr(self,"thisown"): self.thisown = 0
892 self.__class__ = RealPoint
893 _core.RealPoint_swigregister(RealPointPtr)
894
895 #---------------------------------------------------------------------------
896
897 class Point(object):
898 """
899 A data structure for representing a point or position with integer x and y
900 properties. Most places in wxPython that expect a wx.Point can also accept a
901 (x,y) tuple.
902 """
903 def __repr__(self):
904 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
905 x = property(_core.Point_x_get, _core.Point_x_set)
906 y = property(_core.Point_y_get, _core.Point_y_set)
907 def __init__(self, *args, **kwargs):
908 """
909 __init__(int x=0, int y=0) -> Point
910
911 Create a wx.Point object
912 """
913 newobj = _core.new_Point(*args, **kwargs)
914 self.this = newobj.this
915 self.thisown = 1
916 del newobj.thisown
917 def __del__(self, destroy=_core.delete_Point):
918 """__del__()"""
919 try:
920 if self.thisown: destroy(self)
921 except: pass
922
923 def __eq__(*args, **kwargs):
924 """
925 __eq__(Point pt) -> bool
926
927 Test for equality of wx.Point objects.
928 """
929 return _core.Point___eq__(*args, **kwargs)
930
931 def __ne__(*args, **kwargs):
932 """
933 __ne__(Point pt) -> bool
934
935 Test for inequality of wx.Point objects.
936 """
937 return _core.Point___ne__(*args, **kwargs)
938
939 def __add__(*args, **kwargs):
940 """
941 __add__(Point pt) -> Point
942
943 Add pt's proprties to this and return the result.
944 """
945 return _core.Point___add__(*args, **kwargs)
946
947 def __sub__(*args, **kwargs):
948 """
949 __sub__(Point pt) -> Point
950
951 Subtract pt's proprties from this and return the result
952 """
953 return _core.Point___sub__(*args, **kwargs)
954
955 def __iadd__(*args, **kwargs):
956 """
957 __iadd__(Point pt) -> Point
958
959 Add pt to this object.
960 """
961 return _core.Point___iadd__(*args, **kwargs)
962
963 def __isub__(*args, **kwargs):
964 """
965 __isub__(Point pt) -> Point
966
967 Subtract pt from this object.
968 """
969 return _core.Point___isub__(*args, **kwargs)
970
971 def Set(*args, **kwargs):
972 """
973 Set(long x, long y)
974
975 Set both the x and y properties
976 """
977 return _core.Point_Set(*args, **kwargs)
978
979 def Get(*args, **kwargs):
980 """
981 Get() -> (x,y)
982
983 Return the x and y properties as a tuple.
984 """
985 return _core.Point_Get(*args, **kwargs)
986
987 asTuple = Get
988 def __str__(self): return str(self.Get())
989 def __repr__(self): return 'wx.Point'+str(self.Get())
990 def __len__(self): return len(self.Get())
991 def __getitem__(self, index): return self.Get()[index]
992 def __setitem__(self, index, val):
993 if index == 0: self.x = val
994 elif index == 1: self.y = val
995 else: raise IndexError
996 def __nonzero__(self): return self.Get() != (0,0)
997 __safe_for_unpickling__ = True
998 def __reduce__(self): return (wx.Point, self.Get())
999
1000
1001 class PointPtr(Point):
1002 def __init__(self, this):
1003 self.this = this
1004 if not hasattr(self,"thisown"): self.thisown = 0
1005 self.__class__ = Point
1006 _core.Point_swigregister(PointPtr)
1007
1008 #---------------------------------------------------------------------------
1009
1010 class Rect(object):
1011 """
1012 A class for representing and manipulating rectangles. It has x, y, width and
1013 height properties. In wxPython most palces that expect a wx.Rect can also
1014 accept a (x,y,width,height) tuple.
1015 """
1016 def __repr__(self):
1017 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1018 def __init__(self, *args, **kwargs):
1019 """
1020 __init__(int x=0, int y=0, int width=0, int height=0) -> Rect
1021
1022 Create a new Rect object.
1023 """
1024 newobj = _core.new_Rect(*args, **kwargs)
1025 self.this = newobj.this
1026 self.thisown = 1
1027 del newobj.thisown
1028 def __del__(self, destroy=_core.delete_Rect):
1029 """__del__()"""
1030 try:
1031 if self.thisown: destroy(self)
1032 except: pass
1033
1034 def GetX(*args, **kwargs):
1035 """GetX() -> int"""
1036 return _core.Rect_GetX(*args, **kwargs)
1037
1038 def SetX(*args, **kwargs):
1039 """SetX(int x)"""
1040 return _core.Rect_SetX(*args, **kwargs)
1041
1042 def GetY(*args, **kwargs):
1043 """GetY() -> int"""
1044 return _core.Rect_GetY(*args, **kwargs)
1045
1046 def SetY(*args, **kwargs):
1047 """SetY(int y)"""
1048 return _core.Rect_SetY(*args, **kwargs)
1049
1050 def GetWidth(*args, **kwargs):
1051 """GetWidth() -> int"""
1052 return _core.Rect_GetWidth(*args, **kwargs)
1053
1054 def SetWidth(*args, **kwargs):
1055 """SetWidth(int w)"""
1056 return _core.Rect_SetWidth(*args, **kwargs)
1057
1058 def GetHeight(*args, **kwargs):
1059 """GetHeight() -> int"""
1060 return _core.Rect_GetHeight(*args, **kwargs)
1061
1062 def SetHeight(*args, **kwargs):
1063 """SetHeight(int h)"""
1064 return _core.Rect_SetHeight(*args, **kwargs)
1065
1066 def GetPosition(*args, **kwargs):
1067 """GetPosition() -> Point"""
1068 return _core.Rect_GetPosition(*args, **kwargs)
1069
1070 def SetPosition(*args, **kwargs):
1071 """SetPosition(Point p)"""
1072 return _core.Rect_SetPosition(*args, **kwargs)
1073
1074 def GetSize(*args, **kwargs):
1075 """GetSize() -> Size"""
1076 return _core.Rect_GetSize(*args, **kwargs)
1077
1078 def SetSize(*args, **kwargs):
1079 """SetSize(Size s)"""
1080 return _core.Rect_SetSize(*args, **kwargs)
1081
1082 def GetTopLeft(*args, **kwargs):
1083 """GetTopLeft() -> Point"""
1084 return _core.Rect_GetTopLeft(*args, **kwargs)
1085
1086 def SetTopLeft(*args, **kwargs):
1087 """SetTopLeft(Point p)"""
1088 return _core.Rect_SetTopLeft(*args, **kwargs)
1089
1090 def GetBottomRight(*args, **kwargs):
1091 """GetBottomRight() -> Point"""
1092 return _core.Rect_GetBottomRight(*args, **kwargs)
1093
1094 def SetBottomRight(*args, **kwargs):
1095 """SetBottomRight(Point p)"""
1096 return _core.Rect_SetBottomRight(*args, **kwargs)
1097
1098 def GetLeft(*args, **kwargs):
1099 """GetLeft() -> int"""
1100 return _core.Rect_GetLeft(*args, **kwargs)
1101
1102 def GetTop(*args, **kwargs):
1103 """GetTop() -> int"""
1104 return _core.Rect_GetTop(*args, **kwargs)
1105
1106 def GetBottom(*args, **kwargs):
1107 """GetBottom() -> int"""
1108 return _core.Rect_GetBottom(*args, **kwargs)
1109
1110 def GetRight(*args, **kwargs):
1111 """GetRight() -> int"""
1112 return _core.Rect_GetRight(*args, **kwargs)
1113
1114 def SetLeft(*args, **kwargs):
1115 """SetLeft(int left)"""
1116 return _core.Rect_SetLeft(*args, **kwargs)
1117
1118 def SetRight(*args, **kwargs):
1119 """SetRight(int right)"""
1120 return _core.Rect_SetRight(*args, **kwargs)
1121
1122 def SetTop(*args, **kwargs):
1123 """SetTop(int top)"""
1124 return _core.Rect_SetTop(*args, **kwargs)
1125
1126 def SetBottom(*args, **kwargs):
1127 """SetBottom(int bottom)"""
1128 return _core.Rect_SetBottom(*args, **kwargs)
1129
1130 position = property(GetPosition, SetPosition)
1131 size = property(GetSize, SetSize)
1132 left = property(GetLeft, SetLeft)
1133 right = property(GetRight, SetRight)
1134 top = property(GetTop, SetTop)
1135 bottom = property(GetBottom, SetBottom)
1136
1137 def Inflate(*args, **kwargs):
1138 """
1139 Inflate(int dx, int dy) -> Rect
1140
1141 Increase the rectangle size by dx in x direction and dy in y direction. Both
1142 (or one of) parameters may be negative to decrease the rectangle size.
1143 """
1144 return _core.Rect_Inflate(*args, **kwargs)
1145
1146 def Deflate(*args, **kwargs):
1147 """
1148 Deflate(int dx, int dy) -> Rect
1149
1150 Decrease the rectangle size by dx in x direction and dy in y direction. Both
1151 (or one of) parameters may be negative to increase the rectngle size. This
1152 method is the opposite of Inflate.
1153 """
1154 return _core.Rect_Deflate(*args, **kwargs)
1155
1156 def OffsetXY(*args, **kwargs):
1157 """
1158 OffsetXY(int dx, int dy)
1159
1160 Moves the rectangle by the specified offset. If dx is positive, the rectangle
1161 is moved to the right, if dy is positive, it is moved to the bottom, otherwise
1162 it is moved to the left or top respectively.
1163 """
1164 return _core.Rect_OffsetXY(*args, **kwargs)
1165
1166 def Offset(*args, **kwargs):
1167 """
1168 Offset(Point pt)
1169
1170 Same as OffsetXY but uses dx,dy from Point
1171 """
1172 return _core.Rect_Offset(*args, **kwargs)
1173
1174 def Intersect(*args, **kwargs):
1175 """
1176 Intersect(Rect rect) -> Rect
1177
1178 Return the intersectsion of this rectangle and rect.
1179 """
1180 return _core.Rect_Intersect(*args, **kwargs)
1181
1182 def __add__(*args, **kwargs):
1183 """
1184 __add__(Rect rect) -> Rect
1185
1186 Add the properties of rect to this rectangle and return the result.
1187 """
1188 return _core.Rect___add__(*args, **kwargs)
1189
1190 def __iadd__(*args, **kwargs):
1191 """
1192 __iadd__(Rect rect) -> Rect
1193
1194 Add the properties of rect to this rectangle, updating this rectangle.
1195 """
1196 return _core.Rect___iadd__(*args, **kwargs)
1197
1198 def __eq__(*args, **kwargs):
1199 """
1200 __eq__(Rect rect) -> bool
1201
1202 Test for equality.
1203 """
1204 return _core.Rect___eq__(*args, **kwargs)
1205
1206 def __ne__(*args, **kwargs):
1207 """
1208 __ne__(Rect rect) -> bool
1209
1210 Test for inequality.
1211 """
1212 return _core.Rect___ne__(*args, **kwargs)
1213
1214 def InsideXY(*args, **kwargs):
1215 """
1216 InsideXY(int x, int y) -> bool
1217
1218 Return True if the point is (not strcitly) inside the rect.
1219 """
1220 return _core.Rect_InsideXY(*args, **kwargs)
1221
1222 def Inside(*args, **kwargs):
1223 """
1224 Inside(Point pt) -> bool
1225
1226 Return True if the point is (not strcitly) inside the rect.
1227 """
1228 return _core.Rect_Inside(*args, **kwargs)
1229
1230 def Intersects(*args, **kwargs):
1231 """
1232 Intersects(Rect rect) -> bool
1233
1234 Returns True if the rectangles have a non empty intersection.
1235 """
1236 return _core.Rect_Intersects(*args, **kwargs)
1237
1238 x = property(_core.Rect_x_get, _core.Rect_x_set)
1239 y = property(_core.Rect_y_get, _core.Rect_y_set)
1240 width = property(_core.Rect_width_get, _core.Rect_width_set)
1241 height = property(_core.Rect_height_get, _core.Rect_height_set)
1242 def Set(*args, **kwargs):
1243 """
1244 Set(int x=0, int y=0, int width=0, int height=0)
1245
1246 Set all rectangle properties.
1247 """
1248 return _core.Rect_Set(*args, **kwargs)
1249
1250 def Get(*args, **kwargs):
1251 """
1252 Get() -> (x,y,width,height)
1253
1254 Return the rectangle properties as a tuple.
1255 """
1256 return _core.Rect_Get(*args, **kwargs)
1257
1258 asTuple = Get
1259 def __str__(self): return str(self.Get())
1260 def __repr__(self): return 'wx.Rect'+str(self.Get())
1261 def __len__(self): return len(self.Get())
1262 def __getitem__(self, index): return self.Get()[index]
1263 def __setitem__(self, index, val):
1264 if index == 0: self.x = val
1265 elif index == 1: self.y = val
1266 elif index == 2: self.width = val
1267 elif index == 3: self.height = val
1268 else: raise IndexError
1269 def __nonzero__(self): return self.Get() != (0,0,0,0)
1270 __safe_for_unpickling__ = True
1271 def __reduce__(self): return (wx.Rect, self.Get())
1272
1273
1274 class RectPtr(Rect):
1275 def __init__(self, this):
1276 self.this = this
1277 if not hasattr(self,"thisown"): self.thisown = 0
1278 self.__class__ = Rect
1279 _core.Rect_swigregister(RectPtr)
1280
1281 def RectPP(*args, **kwargs):
1282 """
1283 RectPP(Point topLeft, Point bottomRight) -> Rect
1284
1285 Create a new Rect object from Points representing two corners.
1286 """
1287 val = _core.new_RectPP(*args, **kwargs)
1288 val.thisown = 1
1289 return val
1290
1291 def RectPS(*args, **kwargs):
1292 """
1293 RectPS(Point pos, Size size) -> Rect
1294
1295 Create a new Rect from a position and size.
1296 """
1297 val = _core.new_RectPS(*args, **kwargs)
1298 val.thisown = 1
1299 return val
1300
1301
1302 def IntersectRect(*args, **kwargs):
1303 """
1304 IntersectRect(Rect r1, Rect r2) -> Rect
1305
1306 Calculate and return the intersection of r1 and r2.
1307 """
1308 return _core.IntersectRect(*args, **kwargs)
1309 #---------------------------------------------------------------------------
1310
1311 class Point2D(object):
1312 """wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values."""
1313 def __repr__(self):
1314 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1315 def __init__(self, *args, **kwargs):
1316 """
1317 __init__(double x=0.0, double y=0.0) -> Point2D
1318
1319 Create a w.Point2D object.
1320 """
1321 newobj = _core.new_Point2D(*args, **kwargs)
1322 self.this = newobj.this
1323 self.thisown = 1
1324 del newobj.thisown
1325 def GetFloor(*args, **kwargs):
1326 """
1327 GetFloor() -> (x,y)
1328
1329 Convert to integer
1330 """
1331 return _core.Point2D_GetFloor(*args, **kwargs)
1332
1333 def GetRounded(*args, **kwargs):
1334 """
1335 GetRounded() -> (x,y)
1336
1337 Convert to integer
1338 """
1339 return _core.Point2D_GetRounded(*args, **kwargs)
1340
1341 def GetVectorLength(*args, **kwargs):
1342 """GetVectorLength() -> double"""
1343 return _core.Point2D_GetVectorLength(*args, **kwargs)
1344
1345 def GetVectorAngle(*args, **kwargs):
1346 """GetVectorAngle() -> double"""
1347 return _core.Point2D_GetVectorAngle(*args, **kwargs)
1348
1349 def SetVectorLength(*args, **kwargs):
1350 """SetVectorLength(double length)"""
1351 return _core.Point2D_SetVectorLength(*args, **kwargs)
1352
1353 def SetVectorAngle(*args, **kwargs):
1354 """SetVectorAngle(double degrees)"""
1355 return _core.Point2D_SetVectorAngle(*args, **kwargs)
1356
1357 def SetPolarCoordinates(self, angle, length):
1358 self.SetVectorLength(length)
1359 self.SetVectorAngle(angle)
1360 def Normalize(self):
1361 self.SetVectorLength(1.0)
1362
1363 def GetDistance(*args, **kwargs):
1364 """GetDistance(Point2D pt) -> double"""
1365 return _core.Point2D_GetDistance(*args, **kwargs)
1366
1367 def GetDistanceSquare(*args, **kwargs):
1368 """GetDistanceSquare(Point2D pt) -> double"""
1369 return _core.Point2D_GetDistanceSquare(*args, **kwargs)
1370
1371 def GetDotProduct(*args, **kwargs):
1372 """GetDotProduct(Point2D vec) -> double"""
1373 return _core.Point2D_GetDotProduct(*args, **kwargs)
1374
1375 def GetCrossProduct(*args, **kwargs):
1376 """GetCrossProduct(Point2D vec) -> double"""
1377 return _core.Point2D_GetCrossProduct(*args, **kwargs)
1378
1379 def __neg__(*args, **kwargs):
1380 """
1381 __neg__() -> Point2D
1382
1383 the reflection of this point
1384 """
1385 return _core.Point2D___neg__(*args, **kwargs)
1386
1387 def __iadd__(*args, **kwargs):
1388 """__iadd__(Point2D pt) -> Point2D"""
1389 return _core.Point2D___iadd__(*args, **kwargs)
1390
1391 def __isub__(*args, **kwargs):
1392 """__isub__(Point2D pt) -> Point2D"""
1393 return _core.Point2D___isub__(*args, **kwargs)
1394
1395 def __imul__(*args, **kwargs):
1396 """__imul__(Point2D pt) -> Point2D"""
1397 return _core.Point2D___imul__(*args, **kwargs)
1398
1399 def __idiv__(*args, **kwargs):
1400 """__idiv__(Point2D pt) -> Point2D"""
1401 return _core.Point2D___idiv__(*args, **kwargs)
1402
1403 def __eq__(*args, **kwargs):
1404 """
1405 __eq__(Point2D pt) -> bool
1406
1407 Test for equality
1408 """
1409 return _core.Point2D___eq__(*args, **kwargs)
1410
1411 def __ne__(*args, **kwargs):
1412 """
1413 __ne__(Point2D pt) -> bool
1414
1415 Test for inequality
1416 """
1417 return _core.Point2D___ne__(*args, **kwargs)
1418
1419 x = property(_core.Point2D_x_get, _core.Point2D_x_set)
1420 y = property(_core.Point2D_y_get, _core.Point2D_y_set)
1421 def Set(*args, **kwargs):
1422 """Set(double x=0, double y=0)"""
1423 return _core.Point2D_Set(*args, **kwargs)
1424
1425 def Get(*args, **kwargs):
1426 """
1427 Get() -> (x,y)
1428
1429 Return x and y properties as a tuple.
1430 """
1431 return _core.Point2D_Get(*args, **kwargs)
1432
1433 asTuple = Get
1434 def __str__(self): return str(self.Get())
1435 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1436 def __len__(self): return len(self.Get())
1437 def __getitem__(self, index): return self.Get()[index]
1438 def __setitem__(self, index, val):
1439 if index == 0: self.x = val
1440 elif index == 1: self.y = val
1441 else: raise IndexError
1442 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1443 __safe_for_unpickling__ = True
1444 def __reduce__(self): return (wx.Point2D, self.Get())
1445
1446
1447 class Point2DPtr(Point2D):
1448 def __init__(self, this):
1449 self.this = this
1450 if not hasattr(self,"thisown"): self.thisown = 0
1451 self.__class__ = Point2D
1452 _core.Point2D_swigregister(Point2DPtr)
1453
1454 def Point2DCopy(*args, **kwargs):
1455 """
1456 Point2DCopy(Point2D pt) -> Point2D
1457
1458 Create a w.Point2D object.
1459 """
1460 val = _core.new_Point2DCopy(*args, **kwargs)
1461 val.thisown = 1
1462 return val
1463
1464 def Point2DFromPoint(*args, **kwargs):
1465 """
1466 Point2DFromPoint(Point pt) -> Point2D
1467
1468 Create a w.Point2D object.
1469 """
1470 val = _core.new_Point2DFromPoint(*args, **kwargs)
1471 val.thisown = 1
1472 return val
1473
1474 #---------------------------------------------------------------------------
1475
1476 FromStart = _core.FromStart
1477 FromCurrent = _core.FromCurrent
1478 FromEnd = _core.FromEnd
1479 class InputStream(object):
1480 def __repr__(self):
1481 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1482 def __init__(self, *args, **kwargs):
1483 """__init__(PyObject p) -> InputStream"""
1484 newobj = _core.new_InputStream(*args, **kwargs)
1485 self.this = newobj.this
1486 self.thisown = 1
1487 del newobj.thisown
1488 def close(*args, **kwargs):
1489 """close()"""
1490 return _core.InputStream_close(*args, **kwargs)
1491
1492 def flush(*args, **kwargs):
1493 """flush()"""
1494 return _core.InputStream_flush(*args, **kwargs)
1495
1496 def eof(*args, **kwargs):
1497 """eof() -> bool"""
1498 return _core.InputStream_eof(*args, **kwargs)
1499
1500 def read(*args, **kwargs):
1501 """read(int size=-1) -> PyObject"""
1502 return _core.InputStream_read(*args, **kwargs)
1503
1504 def readline(*args, **kwargs):
1505 """readline(int size=-1) -> PyObject"""
1506 return _core.InputStream_readline(*args, **kwargs)
1507
1508 def readlines(*args, **kwargs):
1509 """readlines(int sizehint=-1) -> PyObject"""
1510 return _core.InputStream_readlines(*args, **kwargs)
1511
1512 def seek(*args, **kwargs):
1513 """seek(int offset, int whence=0)"""
1514 return _core.InputStream_seek(*args, **kwargs)
1515
1516 def tell(*args, **kwargs):
1517 """tell() -> int"""
1518 return _core.InputStream_tell(*args, **kwargs)
1519
1520 def Peek(*args, **kwargs):
1521 """Peek() -> char"""
1522 return _core.InputStream_Peek(*args, **kwargs)
1523
1524 def GetC(*args, **kwargs):
1525 """GetC() -> char"""
1526 return _core.InputStream_GetC(*args, **kwargs)
1527
1528 def LastRead(*args, **kwargs):
1529 """LastRead() -> size_t"""
1530 return _core.InputStream_LastRead(*args, **kwargs)
1531
1532 def CanRead(*args, **kwargs):
1533 """CanRead() -> bool"""
1534 return _core.InputStream_CanRead(*args, **kwargs)
1535
1536 def Eof(*args, **kwargs):
1537 """Eof() -> bool"""
1538 return _core.InputStream_Eof(*args, **kwargs)
1539
1540 def Ungetch(*args, **kwargs):
1541 """Ungetch(char c) -> bool"""
1542 return _core.InputStream_Ungetch(*args, **kwargs)
1543
1544 def SeekI(*args, **kwargs):
1545 """SeekI(long pos, int mode=FromStart) -> long"""
1546 return _core.InputStream_SeekI(*args, **kwargs)
1547
1548 def TellI(*args, **kwargs):
1549 """TellI() -> long"""
1550 return _core.InputStream_TellI(*args, **kwargs)
1551
1552
1553 class InputStreamPtr(InputStream):
1554 def __init__(self, this):
1555 self.this = this
1556 if not hasattr(self,"thisown"): self.thisown = 0
1557 self.__class__ = InputStream
1558 _core.InputStream_swigregister(InputStreamPtr)
1559 DefaultPosition = cvar.DefaultPosition
1560 DefaultSize = cvar.DefaultSize
1561
1562 class OutputStream(object):
1563 def __init__(self): raise RuntimeError, "No constructor defined"
1564 def __repr__(self):
1565 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1566 def write(*args, **kwargs):
1567 """write(PyObject obj)"""
1568 return _core.OutputStream_write(*args, **kwargs)
1569
1570
1571 class OutputStreamPtr(OutputStream):
1572 def __init__(self, this):
1573 self.this = this
1574 if not hasattr(self,"thisown"): self.thisown = 0
1575 self.__class__ = OutputStream
1576 _core.OutputStream_swigregister(OutputStreamPtr)
1577
1578 #---------------------------------------------------------------------------
1579
1580 class FSFile(Object):
1581 def __repr__(self):
1582 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1583 def __init__(self, *args, **kwargs):
1584 """
1585 __init__(InputStream stream, String loc, String mimetype, String anchor,
1586 DateTime modif) -> FSFile
1587 """
1588 newobj = _core.new_FSFile(*args, **kwargs)
1589 self.this = newobj.this
1590 self.thisown = 1
1591 del newobj.thisown
1592 def __del__(self, destroy=_core.delete_FSFile):
1593 """__del__()"""
1594 try:
1595 if self.thisown: destroy(self)
1596 except: pass
1597
1598 def GetStream(*args, **kwargs):
1599 """GetStream() -> InputStream"""
1600 return _core.FSFile_GetStream(*args, **kwargs)
1601
1602 def GetMimeType(*args, **kwargs):
1603 """GetMimeType() -> String"""
1604 return _core.FSFile_GetMimeType(*args, **kwargs)
1605
1606 def GetLocation(*args, **kwargs):
1607 """GetLocation() -> String"""
1608 return _core.FSFile_GetLocation(*args, **kwargs)
1609
1610 def GetAnchor(*args, **kwargs):
1611 """GetAnchor() -> String"""
1612 return _core.FSFile_GetAnchor(*args, **kwargs)
1613
1614 def GetModificationTime(*args, **kwargs):
1615 """GetModificationTime() -> DateTime"""
1616 return _core.FSFile_GetModificationTime(*args, **kwargs)
1617
1618
1619 class FSFilePtr(FSFile):
1620 def __init__(self, this):
1621 self.this = this
1622 if not hasattr(self,"thisown"): self.thisown = 0
1623 self.__class__ = FSFile
1624 _core.FSFile_swigregister(FSFilePtr)
1625
1626 class CPPFileSystemHandler(object):
1627 def __init__(self): raise RuntimeError, "No constructor defined"
1628 def __repr__(self):
1629 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1630
1631 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1632 def __init__(self, this):
1633 self.this = this
1634 if not hasattr(self,"thisown"): self.thisown = 0
1635 self.__class__ = CPPFileSystemHandler
1636 _core.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1637
1638 class FileSystemHandler(CPPFileSystemHandler):
1639 def __repr__(self):
1640 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1641 def __init__(self, *args, **kwargs):
1642 """__init__() -> FileSystemHandler"""
1643 newobj = _core.new_FileSystemHandler(*args, **kwargs)
1644 self.this = newobj.this
1645 self.thisown = 1
1646 del newobj.thisown
1647 self._setCallbackInfo(self, FileSystemHandler)
1648
1649 def _setCallbackInfo(*args, **kwargs):
1650 """_setCallbackInfo(PyObject self, PyObject _class)"""
1651 return _core.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1652
1653 def CanOpen(*args, **kwargs):
1654 """CanOpen(String location) -> bool"""
1655 return _core.FileSystemHandler_CanOpen(*args, **kwargs)
1656
1657 def OpenFile(*args, **kwargs):
1658 """OpenFile(FileSystem fs, String location) -> FSFile"""
1659 return _core.FileSystemHandler_OpenFile(*args, **kwargs)
1660
1661 def FindFirst(*args, **kwargs):
1662 """FindFirst(String spec, int flags=0) -> String"""
1663 return _core.FileSystemHandler_FindFirst(*args, **kwargs)
1664
1665 def FindNext(*args, **kwargs):
1666 """FindNext() -> String"""
1667 return _core.FileSystemHandler_FindNext(*args, **kwargs)
1668
1669 def GetProtocol(*args, **kwargs):
1670 """GetProtocol(String location) -> String"""
1671 return _core.FileSystemHandler_GetProtocol(*args, **kwargs)
1672
1673 def GetLeftLocation(*args, **kwargs):
1674 """GetLeftLocation(String location) -> String"""
1675 return _core.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1676
1677 def GetAnchor(*args, **kwargs):
1678 """GetAnchor(String location) -> String"""
1679 return _core.FileSystemHandler_GetAnchor(*args, **kwargs)
1680
1681 def GetRightLocation(*args, **kwargs):
1682 """GetRightLocation(String location) -> String"""
1683 return _core.FileSystemHandler_GetRightLocation(*args, **kwargs)
1684
1685 def GetMimeTypeFromExt(*args, **kwargs):
1686 """GetMimeTypeFromExt(String location) -> String"""
1687 return _core.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1688
1689
1690 class FileSystemHandlerPtr(FileSystemHandler):
1691 def __init__(self, this):
1692 self.this = this
1693 if not hasattr(self,"thisown"): self.thisown = 0
1694 self.__class__ = FileSystemHandler
1695 _core.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1696
1697 class FileSystem(Object):
1698 def __repr__(self):
1699 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1700 def __init__(self, *args, **kwargs):
1701 """__init__() -> FileSystem"""
1702 newobj = _core.new_FileSystem(*args, **kwargs)
1703 self.this = newobj.this
1704 self.thisown = 1
1705 del newobj.thisown
1706 def __del__(self, destroy=_core.delete_FileSystem):
1707 """__del__()"""
1708 try:
1709 if self.thisown: destroy(self)
1710 except: pass
1711
1712 def ChangePathTo(*args, **kwargs):
1713 """ChangePathTo(String location, bool is_dir=False)"""
1714 return _core.FileSystem_ChangePathTo(*args, **kwargs)
1715
1716 def GetPath(*args, **kwargs):
1717 """GetPath() -> String"""
1718 return _core.FileSystem_GetPath(*args, **kwargs)
1719
1720 def OpenFile(*args, **kwargs):
1721 """OpenFile(String location) -> FSFile"""
1722 return _core.FileSystem_OpenFile(*args, **kwargs)
1723
1724 def FindFirst(*args, **kwargs):
1725 """FindFirst(String spec, int flags=0) -> String"""
1726 return _core.FileSystem_FindFirst(*args, **kwargs)
1727
1728 def FindNext(*args, **kwargs):
1729 """FindNext() -> String"""
1730 return _core.FileSystem_FindNext(*args, **kwargs)
1731
1732 def AddHandler(*args, **kwargs):
1733 """AddHandler(CPPFileSystemHandler handler)"""
1734 return _core.FileSystem_AddHandler(*args, **kwargs)
1735
1736 AddHandler = staticmethod(AddHandler)
1737 def CleanUpHandlers(*args, **kwargs):
1738 """CleanUpHandlers()"""
1739 return _core.FileSystem_CleanUpHandlers(*args, **kwargs)
1740
1741 CleanUpHandlers = staticmethod(CleanUpHandlers)
1742 def FileNameToURL(*args, **kwargs):
1743 """FileNameToURL(String filename) -> String"""
1744 return _core.FileSystem_FileNameToURL(*args, **kwargs)
1745
1746 FileNameToURL = staticmethod(FileNameToURL)
1747
1748 class FileSystemPtr(FileSystem):
1749 def __init__(self, this):
1750 self.this = this
1751 if not hasattr(self,"thisown"): self.thisown = 0
1752 self.__class__ = FileSystem
1753 _core.FileSystem_swigregister(FileSystemPtr)
1754
1755 def FileSystem_AddHandler(*args, **kwargs):
1756 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1757 return _core.FileSystem_AddHandler(*args, **kwargs)
1758
1759 def FileSystem_CleanUpHandlers(*args, **kwargs):
1760 """FileSystem_CleanUpHandlers()"""
1761 return _core.FileSystem_CleanUpHandlers(*args, **kwargs)
1762
1763 def FileSystem_FileNameToURL(*args, **kwargs):
1764 """FileSystem_FileNameToURL(String filename) -> String"""
1765 return _core.FileSystem_FileNameToURL(*args, **kwargs)
1766
1767
1768 def FileSystem_URLToFileName(*args, **kwargs):
1769 """FileSystem_URLToFileName(String url) -> String"""
1770 return _core.FileSystem_URLToFileName(*args, **kwargs)
1771 class InternetFSHandler(CPPFileSystemHandler):
1772 def __repr__(self):
1773 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1774 def __init__(self, *args, **kwargs):
1775 """__init__() -> InternetFSHandler"""
1776 newobj = _core.new_InternetFSHandler(*args, **kwargs)
1777 self.this = newobj.this
1778 self.thisown = 1
1779 del newobj.thisown
1780 def CanOpen(*args, **kwargs):
1781 """CanOpen(String location) -> bool"""
1782 return _core.InternetFSHandler_CanOpen(*args, **kwargs)
1783
1784 def OpenFile(*args, **kwargs):
1785 """OpenFile(FileSystem fs, String location) -> FSFile"""
1786 return _core.InternetFSHandler_OpenFile(*args, **kwargs)
1787
1788
1789 class InternetFSHandlerPtr(InternetFSHandler):
1790 def __init__(self, this):
1791 self.this = this
1792 if not hasattr(self,"thisown"): self.thisown = 0
1793 self.__class__ = InternetFSHandler
1794 _core.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1795
1796 class ZipFSHandler(CPPFileSystemHandler):
1797 def __repr__(self):
1798 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1799 def __init__(self, *args, **kwargs):
1800 """__init__() -> ZipFSHandler"""
1801 newobj = _core.new_ZipFSHandler(*args, **kwargs)
1802 self.this = newobj.this
1803 self.thisown = 1
1804 del newobj.thisown
1805 def CanOpen(*args, **kwargs):
1806 """CanOpen(String location) -> bool"""
1807 return _core.ZipFSHandler_CanOpen(*args, **kwargs)
1808
1809 def OpenFile(*args, **kwargs):
1810 """OpenFile(FileSystem fs, String location) -> FSFile"""
1811 return _core.ZipFSHandler_OpenFile(*args, **kwargs)
1812
1813 def FindFirst(*args, **kwargs):
1814 """FindFirst(String spec, int flags=0) -> String"""
1815 return _core.ZipFSHandler_FindFirst(*args, **kwargs)
1816
1817 def FindNext(*args, **kwargs):
1818 """FindNext() -> String"""
1819 return _core.ZipFSHandler_FindNext(*args, **kwargs)
1820
1821
1822 class ZipFSHandlerPtr(ZipFSHandler):
1823 def __init__(self, this):
1824 self.this = this
1825 if not hasattr(self,"thisown"): self.thisown = 0
1826 self.__class__ = ZipFSHandler
1827 _core.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1828
1829
1830 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1831 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1832 return _core.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1833
1834 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1835 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1836 return _core.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1837
1838 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1839 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1840 return _core.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1841 def MemoryFSHandler_AddFile(filename, a, b=''):
1842 if isinstance(a, wx.Image):
1843 __wxMemoryFSHandler_AddFile_wxImage(filename, a, b)
1844 elif isinstance(a, wx.Bitmap):
1845 __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b)
1846 elif type(a) == str:
1847 __wxMemoryFSHandler_AddFile_Data(filename, a)
1848 else: raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1849
1850 class MemoryFSHandler(CPPFileSystemHandler):
1851 def __repr__(self):
1852 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1853 def __init__(self, *args, **kwargs):
1854 """__init__() -> MemoryFSHandler"""
1855 newobj = _core.new_MemoryFSHandler(*args, **kwargs)
1856 self.this = newobj.this
1857 self.thisown = 1
1858 del newobj.thisown
1859 def RemoveFile(*args, **kwargs):
1860 """RemoveFile(String filename)"""
1861 return _core.MemoryFSHandler_RemoveFile(*args, **kwargs)
1862
1863 RemoveFile = staticmethod(RemoveFile)
1864 AddFile = staticmethod(MemoryFSHandler_AddFile)
1865 def CanOpen(*args, **kwargs):
1866 """CanOpen(String location) -> bool"""
1867 return _core.MemoryFSHandler_CanOpen(*args, **kwargs)
1868
1869 def OpenFile(*args, **kwargs):
1870 """OpenFile(FileSystem fs, String location) -> FSFile"""
1871 return _core.MemoryFSHandler_OpenFile(*args, **kwargs)
1872
1873 def FindFirst(*args, **kwargs):
1874 """FindFirst(String spec, int flags=0) -> String"""
1875 return _core.MemoryFSHandler_FindFirst(*args, **kwargs)
1876
1877 def FindNext(*args, **kwargs):
1878 """FindNext() -> String"""
1879 return _core.MemoryFSHandler_FindNext(*args, **kwargs)
1880
1881
1882 class MemoryFSHandlerPtr(MemoryFSHandler):
1883 def __init__(self, this):
1884 self.this = this
1885 if not hasattr(self,"thisown"): self.thisown = 0
1886 self.__class__ = MemoryFSHandler
1887 _core.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
1888
1889 def MemoryFSHandler_RemoveFile(*args, **kwargs):
1890 """MemoryFSHandler_RemoveFile(String filename)"""
1891 return _core.MemoryFSHandler_RemoveFile(*args, **kwargs)
1892
1893 #---------------------------------------------------------------------------
1894
1895 class ImageHandler(Object):
1896 def __init__(self): raise RuntimeError, "No constructor defined"
1897 def __repr__(self):
1898 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1899 def GetName(*args, **kwargs):
1900 """GetName() -> String"""
1901 return _core.ImageHandler_GetName(*args, **kwargs)
1902
1903 def GetExtension(*args, **kwargs):
1904 """GetExtension() -> String"""
1905 return _core.ImageHandler_GetExtension(*args, **kwargs)
1906
1907 def GetType(*args, **kwargs):
1908 """GetType() -> long"""
1909 return _core.ImageHandler_GetType(*args, **kwargs)
1910
1911 def GetMimeType(*args, **kwargs):
1912 """GetMimeType() -> String"""
1913 return _core.ImageHandler_GetMimeType(*args, **kwargs)
1914
1915 def CanRead(*args, **kwargs):
1916 """CanRead(String name) -> bool"""
1917 return _core.ImageHandler_CanRead(*args, **kwargs)
1918
1919 def SetName(*args, **kwargs):
1920 """SetName(String name)"""
1921 return _core.ImageHandler_SetName(*args, **kwargs)
1922
1923 def SetExtension(*args, **kwargs):
1924 """SetExtension(String extension)"""
1925 return _core.ImageHandler_SetExtension(*args, **kwargs)
1926
1927 def SetType(*args, **kwargs):
1928 """SetType(long type)"""
1929 return _core.ImageHandler_SetType(*args, **kwargs)
1930
1931 def SetMimeType(*args, **kwargs):
1932 """SetMimeType(String mimetype)"""
1933 return _core.ImageHandler_SetMimeType(*args, **kwargs)
1934
1935
1936 class ImageHandlerPtr(ImageHandler):
1937 def __init__(self, this):
1938 self.this = this
1939 if not hasattr(self,"thisown"): self.thisown = 0
1940 self.__class__ = ImageHandler
1941 _core.ImageHandler_swigregister(ImageHandlerPtr)
1942
1943 class ImageHistogram(object):
1944 def __repr__(self):
1945 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1946 def __init__(self, *args, **kwargs):
1947 """__init__() -> ImageHistogram"""
1948 newobj = _core.new_ImageHistogram(*args, **kwargs)
1949 self.this = newobj.this
1950 self.thisown = 1
1951 del newobj.thisown
1952 def MakeKey(*args, **kwargs):
1953 """
1954 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
1955
1956 Get the key in the histogram for the given RGB values
1957 """
1958 return _core.ImageHistogram_MakeKey(*args, **kwargs)
1959
1960 MakeKey = staticmethod(MakeKey)
1961 def FindFirstUnusedColour(*args, **kwargs):
1962 """
1963 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
1964
1965 Find first colour that is not used in the image and has higher RGB values than
1966 startR, startG, startB. Returns a tuple consisting of a success flag and rgb
1967 values.
1968 """
1969 return _core.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
1970
1971
1972 class ImageHistogramPtr(ImageHistogram):
1973 def __init__(self, this):
1974 self.this = this
1975 if not hasattr(self,"thisown"): self.thisown = 0
1976 self.__class__ = ImageHistogram
1977 _core.ImageHistogram_swigregister(ImageHistogramPtr)
1978
1979 def ImageHistogram_MakeKey(*args, **kwargs):
1980 """
1981 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
1982
1983 Get the key in the histogram for the given RGB values
1984 """
1985 return _core.ImageHistogram_MakeKey(*args, **kwargs)
1986
1987 class Image(Object):
1988 def __repr__(self):
1989 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1990 def __init__(self, *args, **kwargs):
1991 """__init__(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
1992 newobj = _core.new_Image(*args, **kwargs)
1993 self.this = newobj.this
1994 self.thisown = 1
1995 del newobj.thisown
1996 def __del__(self, destroy=_core.delete_Image):
1997 """__del__()"""
1998 try:
1999 if self.thisown: destroy(self)
2000 except: pass
2001
2002 def Create(*args, **kwargs):
2003 """Create(int width, int height)"""
2004 return _core.Image_Create(*args, **kwargs)
2005
2006 def Destroy(*args, **kwargs):
2007 """
2008 Destroy()
2009
2010 Deletes the C++ object this Python object is a proxy for.
2011 """
2012 return _core.Image_Destroy(*args, **kwargs)
2013
2014 def Scale(*args, **kwargs):
2015 """Scale(int width, int height) -> Image"""
2016 return _core.Image_Scale(*args, **kwargs)
2017
2018 def ShrinkBy(*args, **kwargs):
2019 """ShrinkBy(int xFactor, int yFactor) -> Image"""
2020 return _core.Image_ShrinkBy(*args, **kwargs)
2021
2022 def Rescale(*args, **kwargs):
2023 """Rescale(int width, int height) -> Image"""
2024 return _core.Image_Rescale(*args, **kwargs)
2025
2026 def SetRGB(*args, **kwargs):
2027 """SetRGB(int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2028 return _core.Image_SetRGB(*args, **kwargs)
2029
2030 def GetRed(*args, **kwargs):
2031 """GetRed(int x, int y) -> unsigned char"""
2032 return _core.Image_GetRed(*args, **kwargs)
2033
2034 def GetGreen(*args, **kwargs):
2035 """GetGreen(int x, int y) -> unsigned char"""
2036 return _core.Image_GetGreen(*args, **kwargs)
2037
2038 def GetBlue(*args, **kwargs):
2039 """GetBlue(int x, int y) -> unsigned char"""
2040 return _core.Image_GetBlue(*args, **kwargs)
2041
2042 def SetAlpha(*args, **kwargs):
2043 """SetAlpha(int x, int y, unsigned char alpha)"""
2044 return _core.Image_SetAlpha(*args, **kwargs)
2045
2046 def GetAlpha(*args, **kwargs):
2047 """GetAlpha(int x, int y) -> unsigned char"""
2048 return _core.Image_GetAlpha(*args, **kwargs)
2049
2050 def HasAlpha(*args, **kwargs):
2051 """HasAlpha() -> bool"""
2052 return _core.Image_HasAlpha(*args, **kwargs)
2053
2054 def FindFirstUnusedColour(*args, **kwargs):
2055 """
2056 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2057
2058 Find first colour that is not used in the image and has higher RGB values than
2059 startR, startG, startB. Returns a tuple consisting of a success flag and rgb
2060 values.
2061 """
2062 return _core.Image_FindFirstUnusedColour(*args, **kwargs)
2063
2064 def SetMaskFromImage(*args, **kwargs):
2065 """SetMaskFromImage(Image mask, byte mr, byte mg, byte mb) -> bool"""
2066 return _core.Image_SetMaskFromImage(*args, **kwargs)
2067
2068 def CanRead(*args, **kwargs):
2069 """CanRead(String name) -> bool"""
2070 return _core.Image_CanRead(*args, **kwargs)
2071
2072 CanRead = staticmethod(CanRead)
2073 def GetImageCount(*args, **kwargs):
2074 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2075 return _core.Image_GetImageCount(*args, **kwargs)
2076
2077 GetImageCount = staticmethod(GetImageCount)
2078 def LoadFile(*args, **kwargs):
2079 """LoadFile(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2080 return _core.Image_LoadFile(*args, **kwargs)
2081
2082 def LoadMimeFile(*args, **kwargs):
2083 """LoadMimeFile(String name, String mimetype, int index=-1) -> bool"""
2084 return _core.Image_LoadMimeFile(*args, **kwargs)
2085
2086 def SaveFile(*args, **kwargs):
2087 """SaveFile(String name, int type) -> bool"""
2088 return _core.Image_SaveFile(*args, **kwargs)
2089
2090 def SaveMimeFile(*args, **kwargs):
2091 """SaveMimeFile(String name, String mimetype) -> bool"""
2092 return _core.Image_SaveMimeFile(*args, **kwargs)
2093
2094 def CanReadStream(*args, **kwargs):
2095 """CanReadStream(InputStream stream) -> bool"""
2096 return _core.Image_CanReadStream(*args, **kwargs)
2097
2098 CanReadStream = staticmethod(CanReadStream)
2099 def LoadStream(*args, **kwargs):
2100 """LoadStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2101 return _core.Image_LoadStream(*args, **kwargs)
2102
2103 def LoadMimeStream(*args, **kwargs):
2104 """LoadMimeStream(InputStream stream, String mimetype, int index=-1) -> bool"""
2105 return _core.Image_LoadMimeStream(*args, **kwargs)
2106
2107 def Ok(*args, **kwargs):
2108 """Ok() -> bool"""
2109 return _core.Image_Ok(*args, **kwargs)
2110
2111 def GetWidth(*args, **kwargs):
2112 """GetWidth() -> int"""
2113 return _core.Image_GetWidth(*args, **kwargs)
2114
2115 def GetHeight(*args, **kwargs):
2116 """GetHeight() -> int"""
2117 return _core.Image_GetHeight(*args, **kwargs)
2118
2119 def GetSubImage(*args, **kwargs):
2120 """GetSubImage(Rect rect) -> Image"""
2121 return _core.Image_GetSubImage(*args, **kwargs)
2122
2123 def Copy(*args, **kwargs):
2124 """Copy() -> Image"""
2125 return _core.Image_Copy(*args, **kwargs)
2126
2127 def Paste(*args, **kwargs):
2128 """Paste(Image image, int x, int y)"""
2129 return _core.Image_Paste(*args, **kwargs)
2130
2131 def GetData(*args, **kwargs):
2132 """GetData() -> PyObject"""
2133 return _core.Image_GetData(*args, **kwargs)
2134
2135 def SetData(*args, **kwargs):
2136 """SetData(PyObject data)"""
2137 return _core.Image_SetData(*args, **kwargs)
2138
2139 def GetDataBuffer(*args, **kwargs):
2140 """GetDataBuffer() -> PyObject"""
2141 return _core.Image_GetDataBuffer(*args, **kwargs)
2142
2143 def SetDataBuffer(*args, **kwargs):
2144 """SetDataBuffer(PyObject data)"""
2145 return _core.Image_SetDataBuffer(*args, **kwargs)
2146
2147 def GetAlphaData(*args, **kwargs):
2148 """GetAlphaData() -> PyObject"""
2149 return _core.Image_GetAlphaData(*args, **kwargs)
2150
2151 def SetAlphaData(*args, **kwargs):
2152 """SetAlphaData(PyObject data)"""
2153 return _core.Image_SetAlphaData(*args, **kwargs)
2154
2155 def GetAlphaBuffer(*args, **kwargs):
2156 """GetAlphaBuffer() -> PyObject"""
2157 return _core.Image_GetAlphaBuffer(*args, **kwargs)
2158
2159 def SetAlphaBuffer(*args, **kwargs):
2160 """SetAlphaBuffer(PyObject data)"""
2161 return _core.Image_SetAlphaBuffer(*args, **kwargs)
2162
2163 def SetMaskColour(*args, **kwargs):
2164 """SetMaskColour(unsigned char r, unsigned char g, unsigned char b)"""
2165 return _core.Image_SetMaskColour(*args, **kwargs)
2166
2167 def GetMaskRed(*args, **kwargs):
2168 """GetMaskRed() -> unsigned char"""
2169 return _core.Image_GetMaskRed(*args, **kwargs)
2170
2171 def GetMaskGreen(*args, **kwargs):
2172 """GetMaskGreen() -> unsigned char"""
2173 return _core.Image_GetMaskGreen(*args, **kwargs)
2174
2175 def GetMaskBlue(*args, **kwargs):
2176 """GetMaskBlue() -> unsigned char"""
2177 return _core.Image_GetMaskBlue(*args, **kwargs)
2178
2179 def SetMask(*args, **kwargs):
2180 """SetMask(bool mask=True)"""
2181 return _core.Image_SetMask(*args, **kwargs)
2182
2183 def HasMask(*args, **kwargs):
2184 """HasMask() -> bool"""
2185 return _core.Image_HasMask(*args, **kwargs)
2186
2187 def Rotate(*args, **kwargs):
2188 """
2189 Rotate(double angle, Point centre_of_rotation, bool interpolating=True,
2190 Point offset_after_rotation=None) -> Image
2191 """
2192 return _core.Image_Rotate(*args, **kwargs)
2193
2194 def Rotate90(*args, **kwargs):
2195 """Rotate90(bool clockwise=True) -> Image"""
2196 return _core.Image_Rotate90(*args, **kwargs)
2197
2198 def Mirror(*args, **kwargs):
2199 """Mirror(bool horizontally=True) -> Image"""
2200 return _core.Image_Mirror(*args, **kwargs)
2201
2202 def Replace(*args, **kwargs):
2203 """
2204 Replace(unsigned char r1, unsigned char g1, unsigned char b1,
2205 unsigned char r2, unsigned char g2, unsigned char b2)
2206 """
2207 return _core.Image_Replace(*args, **kwargs)
2208
2209 def ConvertToMono(*args, **kwargs):
2210 """ConvertToMono(unsigned char r, unsigned char g, unsigned char b) -> Image"""
2211 return _core.Image_ConvertToMono(*args, **kwargs)
2212
2213 def SetOption(*args, **kwargs):
2214 """SetOption(String name, String value)"""
2215 return _core.Image_SetOption(*args, **kwargs)
2216
2217 def SetOptionInt(*args, **kwargs):
2218 """SetOptionInt(String name, int value)"""
2219 return _core.Image_SetOptionInt(*args, **kwargs)
2220
2221 def GetOption(*args, **kwargs):
2222 """GetOption(String name) -> String"""
2223 return _core.Image_GetOption(*args, **kwargs)
2224
2225 def GetOptionInt(*args, **kwargs):
2226 """GetOptionInt(String name) -> int"""
2227 return _core.Image_GetOptionInt(*args, **kwargs)
2228
2229 def HasOption(*args, **kwargs):
2230 """HasOption(String name) -> bool"""
2231 return _core.Image_HasOption(*args, **kwargs)
2232
2233 def CountColours(*args, **kwargs):
2234 """CountColours(unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2235 return _core.Image_CountColours(*args, **kwargs)
2236
2237 def ComputeHistogram(*args, **kwargs):
2238 """ComputeHistogram(ImageHistogram h) -> unsigned long"""
2239 return _core.Image_ComputeHistogram(*args, **kwargs)
2240
2241 def AddHandler(*args, **kwargs):
2242 """AddHandler(ImageHandler handler)"""
2243 return _core.Image_AddHandler(*args, **kwargs)
2244
2245 AddHandler = staticmethod(AddHandler)
2246 def InsertHandler(*args, **kwargs):
2247 """InsertHandler(ImageHandler handler)"""
2248 return _core.Image_InsertHandler(*args, **kwargs)
2249
2250 InsertHandler = staticmethod(InsertHandler)
2251 def RemoveHandler(*args, **kwargs):
2252 """RemoveHandler(String name) -> bool"""
2253 return _core.Image_RemoveHandler(*args, **kwargs)
2254
2255 RemoveHandler = staticmethod(RemoveHandler)
2256 def GetImageExtWildcard(*args, **kwargs):
2257 """GetImageExtWildcard() -> String"""
2258 return _core.Image_GetImageExtWildcard(*args, **kwargs)
2259
2260 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2261 def ConvertToBitmap(*args, **kwargs):
2262 """ConvertToBitmap() -> Bitmap"""
2263 return _core.Image_ConvertToBitmap(*args, **kwargs)
2264
2265 def ConvertToMonoBitmap(*args, **kwargs):
2266 """ConvertToMonoBitmap(unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2267 return _core.Image_ConvertToMonoBitmap(*args, **kwargs)
2268
2269 def __nonzero__(self): return self.Ok()
2270
2271 class ImagePtr(Image):
2272 def __init__(self, this):
2273 self.this = this
2274 if not hasattr(self,"thisown"): self.thisown = 0
2275 self.__class__ = Image
2276 _core.Image_swigregister(ImagePtr)
2277
2278 def ImageFromMime(*args, **kwargs):
2279 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2280 val = _core.new_ImageFromMime(*args, **kwargs)
2281 val.thisown = 1
2282 return val
2283
2284 def ImageFromStream(*args, **kwargs):
2285 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2286 val = _core.new_ImageFromStream(*args, **kwargs)
2287 val.thisown = 1
2288 return val
2289
2290 def ImageFromStreamMime(*args, **kwargs):
2291 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2292 val = _core.new_ImageFromStreamMime(*args, **kwargs)
2293 val.thisown = 1
2294 return val
2295
2296 def EmptyImage(*args, **kwargs):
2297 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2298 val = _core.new_EmptyImage(*args, **kwargs)
2299 val.thisown = 1
2300 return val
2301
2302 def ImageFromBitmap(*args, **kwargs):
2303 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2304 val = _core.new_ImageFromBitmap(*args, **kwargs)
2305 val.thisown = 1
2306 return val
2307
2308 def ImageFromData(*args, **kwargs):
2309 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2310 val = _core.new_ImageFromData(*args, **kwargs)
2311 val.thisown = 1
2312 return val
2313
2314 def Image_CanRead(*args, **kwargs):
2315 """Image_CanRead(String name) -> bool"""
2316 return _core.Image_CanRead(*args, **kwargs)
2317
2318 def Image_GetImageCount(*args, **kwargs):
2319 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2320 return _core.Image_GetImageCount(*args, **kwargs)
2321
2322 def Image_CanReadStream(*args, **kwargs):
2323 """Image_CanReadStream(InputStream stream) -> bool"""
2324 return _core.Image_CanReadStream(*args, **kwargs)
2325
2326 def Image_AddHandler(*args, **kwargs):
2327 """Image_AddHandler(ImageHandler handler)"""
2328 return _core.Image_AddHandler(*args, **kwargs)
2329
2330 def Image_InsertHandler(*args, **kwargs):
2331 """Image_InsertHandler(ImageHandler handler)"""
2332 return _core.Image_InsertHandler(*args, **kwargs)
2333
2334 def Image_RemoveHandler(*args, **kwargs):
2335 """Image_RemoveHandler(String name) -> bool"""
2336 return _core.Image_RemoveHandler(*args, **kwargs)
2337
2338 def Image_GetImageExtWildcard(*args, **kwargs):
2339 """Image_GetImageExtWildcard() -> String"""
2340 return _core.Image_GetImageExtWildcard(*args, **kwargs)
2341
2342
2343 def InitAllImageHandlers(*args, **kwargs):
2344 """InitAllImageHandlers()"""
2345 return _core.InitAllImageHandlers(*args, **kwargs)
2346 IMAGE_RESOLUTION_INCHES = _core.IMAGE_RESOLUTION_INCHES
2347 IMAGE_RESOLUTION_CM = _core.IMAGE_RESOLUTION_CM
2348 BMP_24BPP = _core.BMP_24BPP
2349 BMP_8BPP = _core.BMP_8BPP
2350 BMP_8BPP_GREY = _core.BMP_8BPP_GREY
2351 BMP_8BPP_GRAY = _core.BMP_8BPP_GRAY
2352 BMP_8BPP_RED = _core.BMP_8BPP_RED
2353 BMP_8BPP_PALETTE = _core.BMP_8BPP_PALETTE
2354 BMP_4BPP = _core.BMP_4BPP
2355 BMP_1BPP = _core.BMP_1BPP
2356 BMP_1BPP_BW = _core.BMP_1BPP_BW
2357 class BMPHandler(ImageHandler):
2358 def __repr__(self):
2359 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2360 def __init__(self, *args, **kwargs):
2361 """__init__() -> BMPHandler"""
2362 newobj = _core.new_BMPHandler(*args, **kwargs)
2363 self.this = newobj.this
2364 self.thisown = 1
2365 del newobj.thisown
2366
2367 class BMPHandlerPtr(BMPHandler):
2368 def __init__(self, this):
2369 self.this = this
2370 if not hasattr(self,"thisown"): self.thisown = 0
2371 self.__class__ = BMPHandler
2372 _core.BMPHandler_swigregister(BMPHandlerPtr)
2373 NullImage = cvar.NullImage
2374 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2375 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2376 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2377 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2378 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2379
2380 class ICOHandler(BMPHandler):
2381 def __repr__(self):
2382 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2383 def __init__(self, *args, **kwargs):
2384 """__init__() -> ICOHandler"""
2385 newobj = _core.new_ICOHandler(*args, **kwargs)
2386 self.this = newobj.this
2387 self.thisown = 1
2388 del newobj.thisown
2389
2390 class ICOHandlerPtr(ICOHandler):
2391 def __init__(self, this):
2392 self.this = this
2393 if not hasattr(self,"thisown"): self.thisown = 0
2394 self.__class__ = ICOHandler
2395 _core.ICOHandler_swigregister(ICOHandlerPtr)
2396
2397 class CURHandler(ICOHandler):
2398 def __repr__(self):
2399 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2400 def __init__(self, *args, **kwargs):
2401 """__init__() -> CURHandler"""
2402 newobj = _core.new_CURHandler(*args, **kwargs)
2403 self.this = newobj.this
2404 self.thisown = 1
2405 del newobj.thisown
2406
2407 class CURHandlerPtr(CURHandler):
2408 def __init__(self, this):
2409 self.this = this
2410 if not hasattr(self,"thisown"): self.thisown = 0
2411 self.__class__ = CURHandler
2412 _core.CURHandler_swigregister(CURHandlerPtr)
2413
2414 class ANIHandler(CURHandler):
2415 def __repr__(self):
2416 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2417 def __init__(self, *args, **kwargs):
2418 """__init__() -> ANIHandler"""
2419 newobj = _core.new_ANIHandler(*args, **kwargs)
2420 self.this = newobj.this
2421 self.thisown = 1
2422 del newobj.thisown
2423
2424 class ANIHandlerPtr(ANIHandler):
2425 def __init__(self, this):
2426 self.this = this
2427 if not hasattr(self,"thisown"): self.thisown = 0
2428 self.__class__ = ANIHandler
2429 _core.ANIHandler_swigregister(ANIHandlerPtr)
2430
2431 class PNGHandler(ImageHandler):
2432 def __repr__(self):
2433 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2434 def __init__(self, *args, **kwargs):
2435 """__init__() -> PNGHandler"""
2436 newobj = _core.new_PNGHandler(*args, **kwargs)
2437 self.this = newobj.this
2438 self.thisown = 1
2439 del newobj.thisown
2440
2441 class PNGHandlerPtr(PNGHandler):
2442 def __init__(self, this):
2443 self.this = this
2444 if not hasattr(self,"thisown"): self.thisown = 0
2445 self.__class__ = PNGHandler
2446 _core.PNGHandler_swigregister(PNGHandlerPtr)
2447
2448 class GIFHandler(ImageHandler):
2449 def __repr__(self):
2450 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2451 def __init__(self, *args, **kwargs):
2452 """__init__() -> GIFHandler"""
2453 newobj = _core.new_GIFHandler(*args, **kwargs)
2454 self.this = newobj.this
2455 self.thisown = 1
2456 del newobj.thisown
2457
2458 class GIFHandlerPtr(GIFHandler):
2459 def __init__(self, this):
2460 self.this = this
2461 if not hasattr(self,"thisown"): self.thisown = 0
2462 self.__class__ = GIFHandler
2463 _core.GIFHandler_swigregister(GIFHandlerPtr)
2464
2465 class PCXHandler(ImageHandler):
2466 def __repr__(self):
2467 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2468 def __init__(self, *args, **kwargs):
2469 """__init__() -> PCXHandler"""
2470 newobj = _core.new_PCXHandler(*args, **kwargs)
2471 self.this = newobj.this
2472 self.thisown = 1
2473 del newobj.thisown
2474
2475 class PCXHandlerPtr(PCXHandler):
2476 def __init__(self, this):
2477 self.this = this
2478 if not hasattr(self,"thisown"): self.thisown = 0
2479 self.__class__ = PCXHandler
2480 _core.PCXHandler_swigregister(PCXHandlerPtr)
2481
2482 class JPEGHandler(ImageHandler):
2483 def __repr__(self):
2484 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2485 def __init__(self, *args, **kwargs):
2486 """__init__() -> JPEGHandler"""
2487 newobj = _core.new_JPEGHandler(*args, **kwargs)
2488 self.this = newobj.this
2489 self.thisown = 1
2490 del newobj.thisown
2491
2492 class JPEGHandlerPtr(JPEGHandler):
2493 def __init__(self, this):
2494 self.this = this
2495 if not hasattr(self,"thisown"): self.thisown = 0
2496 self.__class__ = JPEGHandler
2497 _core.JPEGHandler_swigregister(JPEGHandlerPtr)
2498
2499 class PNMHandler(ImageHandler):
2500 def __repr__(self):
2501 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2502 def __init__(self, *args, **kwargs):
2503 """__init__() -> PNMHandler"""
2504 newobj = _core.new_PNMHandler(*args, **kwargs)
2505 self.this = newobj.this
2506 self.thisown = 1
2507 del newobj.thisown
2508
2509 class PNMHandlerPtr(PNMHandler):
2510 def __init__(self, this):
2511 self.this = this
2512 if not hasattr(self,"thisown"): self.thisown = 0
2513 self.__class__ = PNMHandler
2514 _core.PNMHandler_swigregister(PNMHandlerPtr)
2515
2516 class XPMHandler(ImageHandler):
2517 def __repr__(self):
2518 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2519 def __init__(self, *args, **kwargs):
2520 """__init__() -> XPMHandler"""
2521 newobj = _core.new_XPMHandler(*args, **kwargs)
2522 self.this = newobj.this
2523 self.thisown = 1
2524 del newobj.thisown
2525
2526 class XPMHandlerPtr(XPMHandler):
2527 def __init__(self, this):
2528 self.this = this
2529 if not hasattr(self,"thisown"): self.thisown = 0
2530 self.__class__ = XPMHandler
2531 _core.XPMHandler_swigregister(XPMHandlerPtr)
2532
2533 class TIFFHandler(ImageHandler):
2534 def __repr__(self):
2535 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2536 def __init__(self, *args, **kwargs):
2537 """__init__() -> TIFFHandler"""
2538 newobj = _core.new_TIFFHandler(*args, **kwargs)
2539 self.this = newobj.this
2540 self.thisown = 1
2541 del newobj.thisown
2542
2543 class TIFFHandlerPtr(TIFFHandler):
2544 def __init__(self, this):
2545 self.this = this
2546 if not hasattr(self,"thisown"): self.thisown = 0
2547 self.__class__ = TIFFHandler
2548 _core.TIFFHandler_swigregister(TIFFHandlerPtr)
2549
2550 #---------------------------------------------------------------------------
2551
2552 class EvtHandler(Object):
2553 def __repr__(self):
2554 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2555 def __init__(self, *args, **kwargs):
2556 """__init__() -> EvtHandler"""
2557 newobj = _core.new_EvtHandler(*args, **kwargs)
2558 self.this = newobj.this
2559 self.thisown = 1
2560 del newobj.thisown
2561 def GetNextHandler(*args, **kwargs):
2562 """GetNextHandler() -> EvtHandler"""
2563 return _core.EvtHandler_GetNextHandler(*args, **kwargs)
2564
2565 def GetPreviousHandler(*args, **kwargs):
2566 """GetPreviousHandler() -> EvtHandler"""
2567 return _core.EvtHandler_GetPreviousHandler(*args, **kwargs)
2568
2569 def SetNextHandler(*args, **kwargs):
2570 """SetNextHandler(EvtHandler handler)"""
2571 return _core.EvtHandler_SetNextHandler(*args, **kwargs)
2572
2573 def SetPreviousHandler(*args, **kwargs):
2574 """SetPreviousHandler(EvtHandler handler)"""
2575 return _core.EvtHandler_SetPreviousHandler(*args, **kwargs)
2576
2577 def GetEvtHandlerEnabled(*args, **kwargs):
2578 """GetEvtHandlerEnabled() -> bool"""
2579 return _core.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2580
2581 def SetEvtHandlerEnabled(*args, **kwargs):
2582 """SetEvtHandlerEnabled(bool enabled)"""
2583 return _core.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2584
2585 def ProcessEvent(*args, **kwargs):
2586 """ProcessEvent(Event event) -> bool"""
2587 return _core.EvtHandler_ProcessEvent(*args, **kwargs)
2588
2589 def AddPendingEvent(*args, **kwargs):
2590 """AddPendingEvent(Event event)"""
2591 return _core.EvtHandler_AddPendingEvent(*args, **kwargs)
2592
2593 def ProcessPendingEvents(*args, **kwargs):
2594 """ProcessPendingEvents()"""
2595 return _core.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2596
2597 def Connect(*args, **kwargs):
2598 """Connect(int id, int lastId, int eventType, PyObject func)"""
2599 return _core.EvtHandler_Connect(*args, **kwargs)
2600
2601 def Disconnect(*args, **kwargs):
2602 """Disconnect(int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2603 return _core.EvtHandler_Disconnect(*args, **kwargs)
2604
2605 def _setOORInfo(*args, **kwargs):
2606 """_setOORInfo(PyObject _self)"""
2607 return _core.EvtHandler__setOORInfo(*args, **kwargs)
2608
2609 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2610 """
2611 Bind an event to an event handler.
2612
2613 event One of the EVT_* objects that specifies the
2614 type of event to bind,
2615
2616 handler A callable object to be invoked when the event
2617 is delivered to self. Pass None to disconnect an
2618 event handler.
2619
2620 source Sometimes the event originates from a different window
2621 than self, but you still want to catch it in self. (For
2622 example, a button event delivered to a frame.) By
2623 passing the source of the event, the event handling
2624 system is able to differentiate between the same event
2625 type from different controls.
2626
2627 id,id2 Used for menu IDs or for event types that require a
2628 range of IDs
2629 """
2630 if source is not None:
2631 id = source.GetId()
2632 event.Bind(self, id, id2, handler)
2633
2634
2635
2636 class EvtHandlerPtr(EvtHandler):
2637 def __init__(self, this):
2638 self.this = this
2639 if not hasattr(self,"thisown"): self.thisown = 0
2640 self.__class__ = EvtHandler
2641 _core.EvtHandler_swigregister(EvtHandlerPtr)
2642
2643 #---------------------------------------------------------------------------
2644
2645 class PyEventBinder(object):
2646 """
2647 Instances of this class are used to bind specific events to event
2648 handlers.
2649 """
2650 def __init__(self, evtType, expectedIDs=0):
2651 if expectedIDs not in [0, 1, 2]:
2652 raise ValueError, "Invalid number of expectedIDs"
2653 self.expectedIDs = expectedIDs
2654
2655 if type(evtType) == list or type(evtType) == tuple:
2656 self.evtType = evtType
2657 else:
2658 self.evtType = [evtType]
2659
2660
2661 def Bind(self, target, id1, id2, function):
2662 """Bind this set of event types to target."""
2663 for et in self.evtType:
2664 target.Connect(id1, id2, et, function)
2665
2666
2667 def __call__(self, *args):
2668 """
2669 For backwards compatibility with the old EVT_* functions.
2670 Should be called with either (window, func), (window, ID,
2671 func) or (window, ID1, ID2, func) parameters depending on the
2672 type of the event.
2673 """
2674 assert len(args) == 2 + self.expectedIDs
2675 id1 = wx.ID_ANY
2676 id2 = wx.ID_ANY
2677 target = args[0]
2678 if self.expectedIDs == 0:
2679 func = args[1]
2680 elif self.expectedIDs == 1:
2681 id1 = args[1]
2682 func = args[2]
2683 elif self.expectedIDs == 2:
2684 id1 = args[1]
2685 id2 = args[2]
2686 func = args[3]
2687 else:
2688 raise ValueError, "Unexpected number of IDs"
2689
2690 self.Bind(target, id1, id2, func)
2691
2692
2693 # These two are square pegs that don't fit the PyEventBinder hole...
2694 def EVT_COMMAND(win, id, cmd, func):
2695 win.Connect(id, -1, cmd, func)
2696 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2697 win.Connect(id1, id2, cmd, func)
2698
2699
2700 #---------------------------------------------------------------------------
2701
2702 #---------------------------------------------------------------------------
2703
2704 EVENT_PROPAGATE_NONE = _core.EVENT_PROPAGATE_NONE
2705 EVENT_PROPAGATE_MAX = _core.EVENT_PROPAGATE_MAX
2706
2707 def NewEventType(*args, **kwargs):
2708 """NewEventType() -> wxEventType"""
2709 return _core.NewEventType(*args, **kwargs)
2710 wxEVT_NULL = _core.wxEVT_NULL
2711 wxEVT_FIRST = _core.wxEVT_FIRST
2712 wxEVT_USER_FIRST = _core.wxEVT_USER_FIRST
2713 wxEVT_COMMAND_BUTTON_CLICKED = _core.wxEVT_COMMAND_BUTTON_CLICKED
2714 wxEVT_COMMAND_CHECKBOX_CLICKED = _core.wxEVT_COMMAND_CHECKBOX_CLICKED
2715 wxEVT_COMMAND_CHOICE_SELECTED = _core.wxEVT_COMMAND_CHOICE_SELECTED
2716 wxEVT_COMMAND_LISTBOX_SELECTED = _core.wxEVT_COMMAND_LISTBOX_SELECTED
2717 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2718 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2719 wxEVT_COMMAND_MENU_SELECTED = _core.wxEVT_COMMAND_MENU_SELECTED
2720 wxEVT_COMMAND_TOOL_CLICKED = _core.wxEVT_COMMAND_TOOL_CLICKED
2721 wxEVT_COMMAND_SLIDER_UPDATED = _core.wxEVT_COMMAND_SLIDER_UPDATED
2722 wxEVT_COMMAND_RADIOBOX_SELECTED = _core.wxEVT_COMMAND_RADIOBOX_SELECTED
2723 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2724 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core.wxEVT_COMMAND_SCROLLBAR_UPDATED
2725 wxEVT_COMMAND_VLBOX_SELECTED = _core.wxEVT_COMMAND_VLBOX_SELECTED
2726 wxEVT_COMMAND_COMBOBOX_SELECTED = _core.wxEVT_COMMAND_COMBOBOX_SELECTED
2727 wxEVT_COMMAND_TOOL_RCLICKED = _core.wxEVT_COMMAND_TOOL_RCLICKED
2728 wxEVT_COMMAND_TOOL_ENTER = _core.wxEVT_COMMAND_TOOL_ENTER
2729 wxEVT_LEFT_DOWN = _core.wxEVT_LEFT_DOWN
2730 wxEVT_LEFT_UP = _core.wxEVT_LEFT_UP
2731 wxEVT_MIDDLE_DOWN = _core.wxEVT_MIDDLE_DOWN
2732 wxEVT_MIDDLE_UP = _core.wxEVT_MIDDLE_UP
2733 wxEVT_RIGHT_DOWN = _core.wxEVT_RIGHT_DOWN
2734 wxEVT_RIGHT_UP = _core.wxEVT_RIGHT_UP
2735 wxEVT_MOTION = _core.wxEVT_MOTION
2736 wxEVT_ENTER_WINDOW = _core.wxEVT_ENTER_WINDOW
2737 wxEVT_LEAVE_WINDOW = _core.wxEVT_LEAVE_WINDOW
2738 wxEVT_LEFT_DCLICK = _core.wxEVT_LEFT_DCLICK
2739 wxEVT_MIDDLE_DCLICK = _core.wxEVT_MIDDLE_DCLICK
2740 wxEVT_RIGHT_DCLICK = _core.wxEVT_RIGHT_DCLICK
2741 wxEVT_SET_FOCUS = _core.wxEVT_SET_FOCUS
2742 wxEVT_KILL_FOCUS = _core.wxEVT_KILL_FOCUS
2743 wxEVT_CHILD_FOCUS = _core.wxEVT_CHILD_FOCUS
2744 wxEVT_MOUSEWHEEL = _core.wxEVT_MOUSEWHEEL
2745 wxEVT_NC_LEFT_DOWN = _core.wxEVT_NC_LEFT_DOWN
2746 wxEVT_NC_LEFT_UP = _core.wxEVT_NC_LEFT_UP
2747 wxEVT_NC_MIDDLE_DOWN = _core.wxEVT_NC_MIDDLE_DOWN
2748 wxEVT_NC_MIDDLE_UP = _core.wxEVT_NC_MIDDLE_UP
2749 wxEVT_NC_RIGHT_DOWN = _core.wxEVT_NC_RIGHT_DOWN
2750 wxEVT_NC_RIGHT_UP = _core.wxEVT_NC_RIGHT_UP
2751 wxEVT_NC_MOTION = _core.wxEVT_NC_MOTION
2752 wxEVT_NC_ENTER_WINDOW = _core.wxEVT_NC_ENTER_WINDOW
2753 wxEVT_NC_LEAVE_WINDOW = _core.wxEVT_NC_LEAVE_WINDOW
2754 wxEVT_NC_LEFT_DCLICK = _core.wxEVT_NC_LEFT_DCLICK
2755 wxEVT_NC_MIDDLE_DCLICK = _core.wxEVT_NC_MIDDLE_DCLICK
2756 wxEVT_NC_RIGHT_DCLICK = _core.wxEVT_NC_RIGHT_DCLICK
2757 wxEVT_CHAR = _core.wxEVT_CHAR
2758 wxEVT_CHAR_HOOK = _core.wxEVT_CHAR_HOOK
2759 wxEVT_NAVIGATION_KEY = _core.wxEVT_NAVIGATION_KEY
2760 wxEVT_KEY_DOWN = _core.wxEVT_KEY_DOWN
2761 wxEVT_KEY_UP = _core.wxEVT_KEY_UP
2762 wxEVT_HOTKEY = _core.wxEVT_HOTKEY
2763 wxEVT_SET_CURSOR = _core.wxEVT_SET_CURSOR
2764 wxEVT_SCROLL_TOP = _core.wxEVT_SCROLL_TOP
2765 wxEVT_SCROLL_BOTTOM = _core.wxEVT_SCROLL_BOTTOM
2766 wxEVT_SCROLL_LINEUP = _core.wxEVT_SCROLL_LINEUP
2767 wxEVT_SCROLL_LINEDOWN = _core.wxEVT_SCROLL_LINEDOWN
2768 wxEVT_SCROLL_PAGEUP = _core.wxEVT_SCROLL_PAGEUP
2769 wxEVT_SCROLL_PAGEDOWN = _core.wxEVT_SCROLL_PAGEDOWN
2770 wxEVT_SCROLL_THUMBTRACK = _core.wxEVT_SCROLL_THUMBTRACK
2771 wxEVT_SCROLL_THUMBRELEASE = _core.wxEVT_SCROLL_THUMBRELEASE
2772 wxEVT_SCROLL_ENDSCROLL = _core.wxEVT_SCROLL_ENDSCROLL
2773 wxEVT_SCROLLWIN_TOP = _core.wxEVT_SCROLLWIN_TOP
2774 wxEVT_SCROLLWIN_BOTTOM = _core.wxEVT_SCROLLWIN_BOTTOM
2775 wxEVT_SCROLLWIN_LINEUP = _core.wxEVT_SCROLLWIN_LINEUP
2776 wxEVT_SCROLLWIN_LINEDOWN = _core.wxEVT_SCROLLWIN_LINEDOWN
2777 wxEVT_SCROLLWIN_PAGEUP = _core.wxEVT_SCROLLWIN_PAGEUP
2778 wxEVT_SCROLLWIN_PAGEDOWN = _core.wxEVT_SCROLLWIN_PAGEDOWN
2779 wxEVT_SCROLLWIN_THUMBTRACK = _core.wxEVT_SCROLLWIN_THUMBTRACK
2780 wxEVT_SCROLLWIN_THUMBRELEASE = _core.wxEVT_SCROLLWIN_THUMBRELEASE
2781 wxEVT_SIZE = _core.wxEVT_SIZE
2782 wxEVT_MOVE = _core.wxEVT_MOVE
2783 wxEVT_CLOSE_WINDOW = _core.wxEVT_CLOSE_WINDOW
2784 wxEVT_END_SESSION = _core.wxEVT_END_SESSION
2785 wxEVT_QUERY_END_SESSION = _core.wxEVT_QUERY_END_SESSION
2786 wxEVT_ACTIVATE_APP = _core.wxEVT_ACTIVATE_APP
2787 wxEVT_POWER = _core.wxEVT_POWER
2788 wxEVT_ACTIVATE = _core.wxEVT_ACTIVATE
2789 wxEVT_CREATE = _core.wxEVT_CREATE
2790 wxEVT_DESTROY = _core.wxEVT_DESTROY
2791 wxEVT_SHOW = _core.wxEVT_SHOW
2792 wxEVT_ICONIZE = _core.wxEVT_ICONIZE
2793 wxEVT_MAXIMIZE = _core.wxEVT_MAXIMIZE
2794 wxEVT_MOUSE_CAPTURE_CHANGED = _core.wxEVT_MOUSE_CAPTURE_CHANGED
2795 wxEVT_PAINT = _core.wxEVT_PAINT
2796 wxEVT_ERASE_BACKGROUND = _core.wxEVT_ERASE_BACKGROUND
2797 wxEVT_NC_PAINT = _core.wxEVT_NC_PAINT
2798 wxEVT_PAINT_ICON = _core.wxEVT_PAINT_ICON
2799 wxEVT_MENU_OPEN = _core.wxEVT_MENU_OPEN
2800 wxEVT_MENU_CLOSE = _core.wxEVT_MENU_CLOSE
2801 wxEVT_MENU_HIGHLIGHT = _core.wxEVT_MENU_HIGHLIGHT
2802 wxEVT_CONTEXT_MENU = _core.wxEVT_CONTEXT_MENU
2803 wxEVT_SYS_COLOUR_CHANGED = _core.wxEVT_SYS_COLOUR_CHANGED
2804 wxEVT_DISPLAY_CHANGED = _core.wxEVT_DISPLAY_CHANGED
2805 wxEVT_SETTING_CHANGED = _core.wxEVT_SETTING_CHANGED
2806 wxEVT_QUERY_NEW_PALETTE = _core.wxEVT_QUERY_NEW_PALETTE
2807 wxEVT_PALETTE_CHANGED = _core.wxEVT_PALETTE_CHANGED
2808 wxEVT_DROP_FILES = _core.wxEVT_DROP_FILES
2809 wxEVT_DRAW_ITEM = _core.wxEVT_DRAW_ITEM
2810 wxEVT_MEASURE_ITEM = _core.wxEVT_MEASURE_ITEM
2811 wxEVT_COMPARE_ITEM = _core.wxEVT_COMPARE_ITEM
2812 wxEVT_INIT_DIALOG = _core.wxEVT_INIT_DIALOG
2813 wxEVT_IDLE = _core.wxEVT_IDLE
2814 wxEVT_UPDATE_UI = _core.wxEVT_UPDATE_UI
2815 wxEVT_SIZING = _core.wxEVT_SIZING
2816 wxEVT_MOVING = _core.wxEVT_MOVING
2817 wxEVT_COMMAND_LEFT_CLICK = _core.wxEVT_COMMAND_LEFT_CLICK
2818 wxEVT_COMMAND_LEFT_DCLICK = _core.wxEVT_COMMAND_LEFT_DCLICK
2819 wxEVT_COMMAND_RIGHT_CLICK = _core.wxEVT_COMMAND_RIGHT_CLICK
2820 wxEVT_COMMAND_RIGHT_DCLICK = _core.wxEVT_COMMAND_RIGHT_DCLICK
2821 wxEVT_COMMAND_SET_FOCUS = _core.wxEVT_COMMAND_SET_FOCUS
2822 wxEVT_COMMAND_KILL_FOCUS = _core.wxEVT_COMMAND_KILL_FOCUS
2823 wxEVT_COMMAND_ENTER = _core.wxEVT_COMMAND_ENTER
2824 #
2825 # Create some event binders
2826 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
2827 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
2828 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
2829 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
2830 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
2831 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
2832 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
2833 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
2834 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
2835 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
2836 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
2837 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
2838 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
2839 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
2840 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
2841 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
2842 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
2843 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
2844 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
2845 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
2846 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
2847 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
2848 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
2849 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
2850 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
2851 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
2852 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
2853 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
2854 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
2855 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
2856 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
2857 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
2858 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
2859 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
2860 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
2861 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
2862 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
2863 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
2864 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
2865 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
2866
2867 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
2868 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
2869 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
2870 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
2871 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
2872 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
2873 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
2874 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
2875 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
2876 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
2877 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
2878 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
2879 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
2880
2881 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
2882 wxEVT_LEFT_UP,
2883 wxEVT_MIDDLE_DOWN,
2884 wxEVT_MIDDLE_UP,
2885 wxEVT_RIGHT_DOWN,
2886 wxEVT_RIGHT_UP,
2887 wxEVT_MOTION,
2888 wxEVT_LEFT_DCLICK,
2889 wxEVT_MIDDLE_DCLICK,
2890 wxEVT_RIGHT_DCLICK,
2891 wxEVT_ENTER_WINDOW,
2892 wxEVT_LEAVE_WINDOW,
2893 wxEVT_MOUSEWHEEL
2894 ])
2895
2896
2897 # Scrolling from wxWindow (sent to wxScrolledWindow)
2898 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
2899 wxEVT_SCROLLWIN_BOTTOM,
2900 wxEVT_SCROLLWIN_LINEUP,
2901 wxEVT_SCROLLWIN_LINEDOWN,
2902 wxEVT_SCROLLWIN_PAGEUP,
2903 wxEVT_SCROLLWIN_PAGEDOWN,
2904 wxEVT_SCROLLWIN_THUMBTRACK,
2905 wxEVT_SCROLLWIN_THUMBRELEASE,
2906 ])
2907
2908 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
2909 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
2910 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
2911 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
2912 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
2913 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
2914 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
2915 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
2916
2917 # Scrolling from wxSlider and wxScrollBar
2918 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
2919 wxEVT_SCROLL_BOTTOM,
2920 wxEVT_SCROLL_LINEUP,
2921 wxEVT_SCROLL_LINEDOWN,
2922 wxEVT_SCROLL_PAGEUP,
2923 wxEVT_SCROLL_PAGEDOWN,
2924 wxEVT_SCROLL_THUMBTRACK,
2925 wxEVT_SCROLL_THUMBRELEASE,
2926 wxEVT_SCROLL_ENDSCROLL,
2927 ])
2928
2929 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
2930 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
2931 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
2932 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
2933 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
2934 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
2935 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
2936 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
2937 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
2938
2939 # Scrolling from wxSlider and wxScrollBar, with an id
2940 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
2941 wxEVT_SCROLL_BOTTOM,
2942 wxEVT_SCROLL_LINEUP,
2943 wxEVT_SCROLL_LINEDOWN,
2944 wxEVT_SCROLL_PAGEUP,
2945 wxEVT_SCROLL_PAGEDOWN,
2946 wxEVT_SCROLL_THUMBTRACK,
2947 wxEVT_SCROLL_THUMBRELEASE,
2948 wxEVT_SCROLL_ENDSCROLL,
2949 ], 1)
2950
2951 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
2952 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
2953 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
2954 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
2955 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
2956 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
2957 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
2958 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
2959 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
2960
2961 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
2962 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
2963 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
2964 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
2965 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
2966 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
2967 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
2968 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
2969 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
2970 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
2971
2972 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
2973 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
2974 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
2975 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
2976 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
2977 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
2978 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
2979 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
2980 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
2981
2982
2983 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
2984 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
2985 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
2986 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
2987 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
2988 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
2989 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
2990
2991 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
2992
2993 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
2994 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
2995
2996 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
2997
2998
2999
3000 #---------------------------------------------------------------------------
3001
3002 class Event(Object):
3003 def __init__(self): raise RuntimeError, "No constructor defined"
3004 def __repr__(self):
3005 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3006 def __del__(self, destroy=_core.delete_Event):
3007 """__del__()"""
3008 try:
3009 if self.thisown: destroy(self)
3010 except: pass
3011
3012 def SetEventType(*args, **kwargs):
3013 """SetEventType(wxEventType typ)"""
3014 return _core.Event_SetEventType(*args, **kwargs)
3015
3016 def GetEventType(*args, **kwargs):
3017 """GetEventType() -> wxEventType"""
3018 return _core.Event_GetEventType(*args, **kwargs)
3019
3020 def GetEventObject(*args, **kwargs):
3021 """GetEventObject() -> Object"""
3022 return _core.Event_GetEventObject(*args, **kwargs)
3023
3024 def SetEventObject(*args, **kwargs):
3025 """SetEventObject(Object obj)"""
3026 return _core.Event_SetEventObject(*args, **kwargs)
3027
3028 def GetTimestamp(*args, **kwargs):
3029 """GetTimestamp() -> long"""
3030 return _core.Event_GetTimestamp(*args, **kwargs)
3031
3032 def SetTimestamp(*args, **kwargs):
3033 """SetTimestamp(long ts=0)"""
3034 return _core.Event_SetTimestamp(*args, **kwargs)
3035
3036 def GetId(*args, **kwargs):
3037 """GetId() -> int"""
3038 return _core.Event_GetId(*args, **kwargs)
3039
3040 def SetId(*args, **kwargs):
3041 """SetId(int Id)"""
3042 return _core.Event_SetId(*args, **kwargs)
3043
3044 def IsCommandEvent(*args, **kwargs):
3045 """IsCommandEvent() -> bool"""
3046 return _core.Event_IsCommandEvent(*args, **kwargs)
3047
3048 def Skip(*args, **kwargs):
3049 """Skip(bool skip=True)"""
3050 return _core.Event_Skip(*args, **kwargs)
3051
3052 def GetSkipped(*args, **kwargs):
3053 """GetSkipped() -> bool"""
3054 return _core.Event_GetSkipped(*args, **kwargs)
3055
3056 def ShouldPropagate(*args, **kwargs):
3057 """ShouldPropagate() -> bool"""
3058 return _core.Event_ShouldPropagate(*args, **kwargs)
3059
3060 def StopPropagation(*args, **kwargs):
3061 """StopPropagation() -> int"""
3062 return _core.Event_StopPropagation(*args, **kwargs)
3063
3064 def ResumePropagation(*args, **kwargs):
3065 """ResumePropagation(int propagationLevel)"""
3066 return _core.Event_ResumePropagation(*args, **kwargs)
3067
3068 def Clone(*args, **kwargs):
3069 """Clone() -> Event"""
3070 return _core.Event_Clone(*args, **kwargs)
3071
3072
3073 class EventPtr(Event):
3074 def __init__(self, this):
3075 self.this = this
3076 if not hasattr(self,"thisown"): self.thisown = 0
3077 self.__class__ = Event
3078 _core.Event_swigregister(EventPtr)
3079
3080 #---------------------------------------------------------------------------
3081
3082 class PropagationDisabler(object):
3083 def __repr__(self):
3084 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3085 def __init__(self, *args, **kwargs):
3086 """__init__(Event event) -> PropagationDisabler"""
3087 newobj = _core.new_PropagationDisabler(*args, **kwargs)
3088 self.this = newobj.this
3089 self.thisown = 1
3090 del newobj.thisown
3091 def __del__(self, destroy=_core.delete_PropagationDisabler):
3092 """__del__()"""
3093 try:
3094 if self.thisown: destroy(self)
3095 except: pass
3096
3097
3098 class PropagationDisablerPtr(PropagationDisabler):
3099 def __init__(self, this):
3100 self.this = this
3101 if not hasattr(self,"thisown"): self.thisown = 0
3102 self.__class__ = PropagationDisabler
3103 _core.PropagationDisabler_swigregister(PropagationDisablerPtr)
3104
3105 class PropagateOnce(object):
3106 def __repr__(self):
3107 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3108 def __init__(self, *args, **kwargs):
3109 """__init__(Event event) -> PropagateOnce"""
3110 newobj = _core.new_PropagateOnce(*args, **kwargs)
3111 self.this = newobj.this
3112 self.thisown = 1
3113 del newobj.thisown
3114 def __del__(self, destroy=_core.delete_PropagateOnce):
3115 """__del__()"""
3116 try:
3117 if self.thisown: destroy(self)
3118 except: pass
3119
3120
3121 class PropagateOncePtr(PropagateOnce):
3122 def __init__(self, this):
3123 self.this = this
3124 if not hasattr(self,"thisown"): self.thisown = 0
3125 self.__class__ = PropagateOnce
3126 _core.PropagateOnce_swigregister(PropagateOncePtr)
3127
3128 #---------------------------------------------------------------------------
3129
3130 class CommandEvent(Event):
3131 def __repr__(self):
3132 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3133 def __init__(self, *args, **kwargs):
3134 """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3135 newobj = _core.new_CommandEvent(*args, **kwargs)
3136 self.this = newobj.this
3137 self.thisown = 1
3138 del newobj.thisown
3139 def GetSelection(*args, **kwargs):
3140 """GetSelection() -> int"""
3141 return _core.CommandEvent_GetSelection(*args, **kwargs)
3142
3143 def SetString(*args, **kwargs):
3144 """SetString(String s)"""
3145 return _core.CommandEvent_SetString(*args, **kwargs)
3146
3147 def GetString(*args, **kwargs):
3148 """GetString() -> String"""
3149 return _core.CommandEvent_GetString(*args, **kwargs)
3150
3151 def IsChecked(*args, **kwargs):
3152 """IsChecked() -> bool"""
3153 return _core.CommandEvent_IsChecked(*args, **kwargs)
3154
3155 Checked = IsChecked
3156 def IsSelection(*args, **kwargs):
3157 """IsSelection() -> bool"""
3158 return _core.CommandEvent_IsSelection(*args, **kwargs)
3159
3160 def SetExtraLong(*args, **kwargs):
3161 """SetExtraLong(long extraLong)"""
3162 return _core.CommandEvent_SetExtraLong(*args, **kwargs)
3163
3164 def GetExtraLong(*args, **kwargs):
3165 """GetExtraLong() -> long"""
3166 return _core.CommandEvent_GetExtraLong(*args, **kwargs)
3167
3168 def SetInt(*args, **kwargs):
3169 """SetInt(int i)"""
3170 return _core.CommandEvent_SetInt(*args, **kwargs)
3171
3172 def GetInt(*args, **kwargs):
3173 """GetInt() -> long"""
3174 return _core.CommandEvent_GetInt(*args, **kwargs)
3175
3176 def Clone(*args, **kwargs):
3177 """Clone() -> Event"""
3178 return _core.CommandEvent_Clone(*args, **kwargs)
3179
3180
3181 class CommandEventPtr(CommandEvent):
3182 def __init__(self, this):
3183 self.this = this
3184 if not hasattr(self,"thisown"): self.thisown = 0
3185 self.__class__ = CommandEvent
3186 _core.CommandEvent_swigregister(CommandEventPtr)
3187
3188 #---------------------------------------------------------------------------
3189
3190 class NotifyEvent(CommandEvent):
3191 def __repr__(self):
3192 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3193 def __init__(self, *args, **kwargs):
3194 """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3195 newobj = _core.new_NotifyEvent(*args, **kwargs)
3196 self.this = newobj.this
3197 self.thisown = 1
3198 del newobj.thisown
3199 def Veto(*args, **kwargs):
3200 """Veto()"""
3201 return _core.NotifyEvent_Veto(*args, **kwargs)
3202
3203 def Allow(*args, **kwargs):
3204 """Allow()"""
3205 return _core.NotifyEvent_Allow(*args, **kwargs)
3206
3207 def IsAllowed(*args, **kwargs):
3208 """IsAllowed() -> bool"""
3209 return _core.NotifyEvent_IsAllowed(*args, **kwargs)
3210
3211
3212 class NotifyEventPtr(NotifyEvent):
3213 def __init__(self, this):
3214 self.this = this
3215 if not hasattr(self,"thisown"): self.thisown = 0
3216 self.__class__ = NotifyEvent
3217 _core.NotifyEvent_swigregister(NotifyEventPtr)
3218
3219 #---------------------------------------------------------------------------
3220
3221 class ScrollEvent(CommandEvent):
3222 def __repr__(self):
3223 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3224 def __init__(self, *args, **kwargs):
3225 """
3226 __init__(wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3227 int orient=0) -> ScrollEvent
3228 """
3229 newobj = _core.new_ScrollEvent(*args, **kwargs)
3230 self.this = newobj.this
3231 self.thisown = 1
3232 del newobj.thisown
3233 def GetOrientation(*args, **kwargs):
3234 """GetOrientation() -> int"""
3235 return _core.ScrollEvent_GetOrientation(*args, **kwargs)
3236
3237 def GetPosition(*args, **kwargs):
3238 """GetPosition() -> int"""
3239 return _core.ScrollEvent_GetPosition(*args, **kwargs)
3240
3241 def SetOrientation(*args, **kwargs):
3242 """SetOrientation(int orient)"""
3243 return _core.ScrollEvent_SetOrientation(*args, **kwargs)
3244
3245 def SetPosition(*args, **kwargs):
3246 """SetPosition(int pos)"""
3247 return _core.ScrollEvent_SetPosition(*args, **kwargs)
3248
3249
3250 class ScrollEventPtr(ScrollEvent):
3251 def __init__(self, this):
3252 self.this = this
3253 if not hasattr(self,"thisown"): self.thisown = 0
3254 self.__class__ = ScrollEvent
3255 _core.ScrollEvent_swigregister(ScrollEventPtr)
3256
3257 #---------------------------------------------------------------------------
3258
3259 class ScrollWinEvent(Event):
3260 def __repr__(self):
3261 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3262 def __init__(self, *args, **kwargs):
3263 """__init__(wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3264 newobj = _core.new_ScrollWinEvent(*args, **kwargs)
3265 self.this = newobj.this
3266 self.thisown = 1
3267 del newobj.thisown
3268 def GetOrientation(*args, **kwargs):
3269 """GetOrientation() -> int"""
3270 return _core.ScrollWinEvent_GetOrientation(*args, **kwargs)
3271
3272 def GetPosition(*args, **kwargs):
3273 """GetPosition() -> int"""
3274 return _core.ScrollWinEvent_GetPosition(*args, **kwargs)
3275
3276 def SetOrientation(*args, **kwargs):
3277 """SetOrientation(int orient)"""
3278 return _core.ScrollWinEvent_SetOrientation(*args, **kwargs)
3279
3280 def SetPosition(*args, **kwargs):
3281 """SetPosition(int pos)"""
3282 return _core.ScrollWinEvent_SetPosition(*args, **kwargs)
3283
3284
3285 class ScrollWinEventPtr(ScrollWinEvent):
3286 def __init__(self, this):
3287 self.this = this
3288 if not hasattr(self,"thisown"): self.thisown = 0
3289 self.__class__ = ScrollWinEvent
3290 _core.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3291
3292 #---------------------------------------------------------------------------
3293
3294 MOUSE_BTN_ANY = _core.MOUSE_BTN_ANY
3295 MOUSE_BTN_NONE = _core.MOUSE_BTN_NONE
3296 MOUSE_BTN_LEFT = _core.MOUSE_BTN_LEFT
3297 MOUSE_BTN_MIDDLE = _core.MOUSE_BTN_MIDDLE
3298 MOUSE_BTN_RIGHT = _core.MOUSE_BTN_RIGHT
3299 class MouseEvent(Event):
3300 def __repr__(self):
3301 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3302 def __init__(self, *args, **kwargs):
3303 """__init__(wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3304 newobj = _core.new_MouseEvent(*args, **kwargs)
3305 self.this = newobj.this
3306 self.thisown = 1
3307 del newobj.thisown
3308 def IsButton(*args, **kwargs):
3309 """IsButton() -> bool"""
3310 return _core.MouseEvent_IsButton(*args, **kwargs)
3311
3312 def ButtonDown(*args, **kwargs):
3313 """ButtonDown(int but=MOUSE_BTN_ANY) -> bool"""
3314 return _core.MouseEvent_ButtonDown(*args, **kwargs)
3315
3316 def ButtonDClick(*args, **kwargs):
3317 """ButtonDClick(int but=MOUSE_BTN_ANY) -> bool"""
3318 return _core.MouseEvent_ButtonDClick(*args, **kwargs)
3319
3320 def ButtonUp(*args, **kwargs):
3321 """ButtonUp(int but=MOUSE_BTN_ANY) -> bool"""
3322 return _core.MouseEvent_ButtonUp(*args, **kwargs)
3323
3324 def Button(*args, **kwargs):
3325 """Button(int but) -> bool"""
3326 return _core.MouseEvent_Button(*args, **kwargs)
3327
3328 def ButtonIsDown(*args, **kwargs):
3329 """ButtonIsDown(int but) -> bool"""
3330 return _core.MouseEvent_ButtonIsDown(*args, **kwargs)
3331
3332 def GetButton(*args, **kwargs):
3333 """GetButton() -> int"""
3334 return _core.MouseEvent_GetButton(*args, **kwargs)
3335
3336 def ControlDown(*args, **kwargs):
3337 """ControlDown() -> bool"""
3338 return _core.MouseEvent_ControlDown(*args, **kwargs)
3339
3340 def MetaDown(*args, **kwargs):
3341 """MetaDown() -> bool"""
3342 return _core.MouseEvent_MetaDown(*args, **kwargs)
3343
3344 def AltDown(*args, **kwargs):
3345 """AltDown() -> bool"""
3346 return _core.MouseEvent_AltDown(*args, **kwargs)
3347
3348 def ShiftDown(*args, **kwargs):
3349 """ShiftDown() -> bool"""
3350 return _core.MouseEvent_ShiftDown(*args, **kwargs)
3351
3352 def LeftDown(*args, **kwargs):
3353 """LeftDown() -> bool"""
3354 return _core.MouseEvent_LeftDown(*args, **kwargs)
3355
3356 def MiddleDown(*args, **kwargs):
3357 """MiddleDown() -> bool"""
3358 return _core.MouseEvent_MiddleDown(*args, **kwargs)
3359
3360 def RightDown(*args, **kwargs):
3361 """RightDown() -> bool"""
3362 return _core.MouseEvent_RightDown(*args, **kwargs)
3363
3364 def LeftUp(*args, **kwargs):
3365 """LeftUp() -> bool"""
3366 return _core.MouseEvent_LeftUp(*args, **kwargs)
3367
3368 def MiddleUp(*args, **kwargs):
3369 """MiddleUp() -> bool"""
3370 return _core.MouseEvent_MiddleUp(*args, **kwargs)
3371
3372 def RightUp(*args, **kwargs):
3373 """RightUp() -> bool"""
3374 return _core.MouseEvent_RightUp(*args, **kwargs)
3375
3376 def LeftDClick(*args, **kwargs):
3377 """LeftDClick() -> bool"""
3378 return _core.MouseEvent_LeftDClick(*args, **kwargs)
3379
3380 def MiddleDClick(*args, **kwargs):
3381 """MiddleDClick() -> bool"""
3382 return _core.MouseEvent_MiddleDClick(*args, **kwargs)
3383
3384 def RightDClick(*args, **kwargs):
3385 """RightDClick() -> bool"""
3386 return _core.MouseEvent_RightDClick(*args, **kwargs)
3387
3388 def LeftIsDown(*args, **kwargs):
3389 """LeftIsDown() -> bool"""
3390 return _core.MouseEvent_LeftIsDown(*args, **kwargs)
3391
3392 def MiddleIsDown(*args, **kwargs):
3393 """MiddleIsDown() -> bool"""
3394 return _core.MouseEvent_MiddleIsDown(*args, **kwargs)
3395
3396 def RightIsDown(*args, **kwargs):
3397 """RightIsDown() -> bool"""
3398 return _core.MouseEvent_RightIsDown(*args, **kwargs)
3399
3400 def Dragging(*args, **kwargs):
3401 """Dragging() -> bool"""
3402 return _core.MouseEvent_Dragging(*args, **kwargs)
3403
3404 def Moving(*args, **kwargs):
3405 """Moving() -> bool"""
3406 return _core.MouseEvent_Moving(*args, **kwargs)
3407
3408 def Entering(*args, **kwargs):
3409 """Entering() -> bool"""
3410 return _core.MouseEvent_Entering(*args, **kwargs)
3411
3412 def Leaving(*args, **kwargs):
3413 """Leaving() -> bool"""
3414 return _core.MouseEvent_Leaving(*args, **kwargs)
3415
3416 def GetPosition(*args, **kwargs):
3417 """
3418 GetPosition() -> Point
3419
3420 Returns the position of the mouse in window coordinates when the event happened.
3421 """
3422 return _core.MouseEvent_GetPosition(*args, **kwargs)
3423
3424 def GetPositionTuple(*args, **kwargs):
3425 """
3426 GetPositionTuple() -> (x,y)
3427
3428 Returns the position of the mouse in window coordinates when the event happened.
3429 """
3430 return _core.MouseEvent_GetPositionTuple(*args, **kwargs)
3431
3432 def GetLogicalPosition(*args, **kwargs):
3433 """GetLogicalPosition(DC dc) -> Point"""
3434 return _core.MouseEvent_GetLogicalPosition(*args, **kwargs)
3435
3436 def GetX(*args, **kwargs):
3437 """GetX() -> int"""
3438 return _core.MouseEvent_GetX(*args, **kwargs)
3439
3440 def GetY(*args, **kwargs):
3441 """GetY() -> int"""
3442 return _core.MouseEvent_GetY(*args, **kwargs)
3443
3444 def GetWheelRotation(*args, **kwargs):
3445 """GetWheelRotation() -> int"""
3446 return _core.MouseEvent_GetWheelRotation(*args, **kwargs)
3447
3448 def GetWheelDelta(*args, **kwargs):
3449 """GetWheelDelta() -> int"""
3450 return _core.MouseEvent_GetWheelDelta(*args, **kwargs)
3451
3452 def GetLinesPerAction(*args, **kwargs):
3453 """GetLinesPerAction() -> int"""
3454 return _core.MouseEvent_GetLinesPerAction(*args, **kwargs)
3455
3456 def IsPageScroll(*args, **kwargs):
3457 """IsPageScroll() -> bool"""
3458 return _core.MouseEvent_IsPageScroll(*args, **kwargs)
3459
3460 m_x = property(_core.MouseEvent_m_x_get, _core.MouseEvent_m_x_set)
3461 m_y = property(_core.MouseEvent_m_y_get, _core.MouseEvent_m_y_set)
3462 m_leftDown = property(_core.MouseEvent_m_leftDown_get, _core.MouseEvent_m_leftDown_set)
3463 m_middleDown = property(_core.MouseEvent_m_middleDown_get, _core.MouseEvent_m_middleDown_set)
3464 m_rightDown = property(_core.MouseEvent_m_rightDown_get, _core.MouseEvent_m_rightDown_set)
3465 m_controlDown = property(_core.MouseEvent_m_controlDown_get, _core.MouseEvent_m_controlDown_set)
3466 m_shiftDown = property(_core.MouseEvent_m_shiftDown_get, _core.MouseEvent_m_shiftDown_set)
3467 m_altDown = property(_core.MouseEvent_m_altDown_get, _core.MouseEvent_m_altDown_set)
3468 m_metaDown = property(_core.MouseEvent_m_metaDown_get, _core.MouseEvent_m_metaDown_set)
3469 m_wheelRotation = property(_core.MouseEvent_m_wheelRotation_get, _core.MouseEvent_m_wheelRotation_set)
3470 m_wheelDelta = property(_core.MouseEvent_m_wheelDelta_get, _core.MouseEvent_m_wheelDelta_set)
3471 m_linesPerAction = property(_core.MouseEvent_m_linesPerAction_get, _core.MouseEvent_m_linesPerAction_set)
3472
3473 class MouseEventPtr(MouseEvent):
3474 def __init__(self, this):
3475 self.this = this
3476 if not hasattr(self,"thisown"): self.thisown = 0
3477 self.__class__ = MouseEvent
3478 _core.MouseEvent_swigregister(MouseEventPtr)
3479
3480 #---------------------------------------------------------------------------
3481
3482 class SetCursorEvent(Event):
3483 def __repr__(self):
3484 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3485 def __init__(self, *args, **kwargs):
3486 """__init__(int x=0, int y=0) -> SetCursorEvent"""
3487 newobj = _core.new_SetCursorEvent(*args, **kwargs)
3488 self.this = newobj.this
3489 self.thisown = 1
3490 del newobj.thisown
3491 def GetX(*args, **kwargs):
3492 """GetX() -> int"""
3493 return _core.SetCursorEvent_GetX(*args, **kwargs)
3494
3495 def GetY(*args, **kwargs):
3496 """GetY() -> int"""
3497 return _core.SetCursorEvent_GetY(*args, **kwargs)
3498
3499 def SetCursor(*args, **kwargs):
3500 """SetCursor(Cursor cursor)"""
3501 return _core.SetCursorEvent_SetCursor(*args, **kwargs)
3502
3503 def GetCursor(*args, **kwargs):
3504 """GetCursor() -> Cursor"""
3505 return _core.SetCursorEvent_GetCursor(*args, **kwargs)
3506
3507 def HasCursor(*args, **kwargs):
3508 """HasCursor() -> bool"""
3509 return _core.SetCursorEvent_HasCursor(*args, **kwargs)
3510
3511
3512 class SetCursorEventPtr(SetCursorEvent):
3513 def __init__(self, this):
3514 self.this = this
3515 if not hasattr(self,"thisown"): self.thisown = 0
3516 self.__class__ = SetCursorEvent
3517 _core.SetCursorEvent_swigregister(SetCursorEventPtr)
3518
3519 #---------------------------------------------------------------------------
3520
3521 class KeyEvent(Event):
3522 def __repr__(self):
3523 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3524 def __init__(self, *args, **kwargs):
3525 """__init__(wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3526 newobj = _core.new_KeyEvent(*args, **kwargs)
3527 self.this = newobj.this
3528 self.thisown = 1
3529 del newobj.thisown
3530 def ControlDown(*args, **kwargs):
3531 """ControlDown() -> bool"""
3532 return _core.KeyEvent_ControlDown(*args, **kwargs)
3533
3534 def MetaDown(*args, **kwargs):
3535 """MetaDown() -> bool"""
3536 return _core.KeyEvent_MetaDown(*args, **kwargs)
3537
3538 def AltDown(*args, **kwargs):
3539 """AltDown() -> bool"""
3540 return _core.KeyEvent_AltDown(*args, **kwargs)
3541
3542 def ShiftDown(*args, **kwargs):
3543 """ShiftDown() -> bool"""
3544 return _core.KeyEvent_ShiftDown(*args, **kwargs)
3545
3546 def HasModifiers(*args, **kwargs):
3547 """HasModifiers() -> bool"""
3548 return _core.KeyEvent_HasModifiers(*args, **kwargs)
3549
3550 def GetKeyCode(*args, **kwargs):
3551 """GetKeyCode() -> int"""
3552 return _core.KeyEvent_GetKeyCode(*args, **kwargs)
3553
3554 KeyCode = GetKeyCode
3555 def GetUniChar(*args, **kwargs):
3556 """GetUniChar() -> int"""
3557 return _core.KeyEvent_GetUniChar(*args, **kwargs)
3558
3559 def GetRawKeyCode(*args, **kwargs):
3560 """GetRawKeyCode() -> unsigned int"""
3561 return _core.KeyEvent_GetRawKeyCode(*args, **kwargs)
3562
3563 def GetRawKeyFlags(*args, **kwargs):
3564 """GetRawKeyFlags() -> unsigned int"""
3565 return _core.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3566
3567 def GetPosition(*args, **kwargs):
3568 """
3569 GetPosition() -> Point
3570
3571 Find the position of the event.
3572 """
3573 return _core.KeyEvent_GetPosition(*args, **kwargs)
3574
3575 def GetPositionTuple(*args, **kwargs):
3576 """
3577 GetPositionTuple() -> (x,y)
3578
3579 Find the position of the event.
3580 """
3581 return _core.KeyEvent_GetPositionTuple(*args, **kwargs)
3582
3583 def GetX(*args, **kwargs):
3584 """GetX() -> int"""
3585 return _core.KeyEvent_GetX(*args, **kwargs)
3586
3587 def GetY(*args, **kwargs):
3588 """GetY() -> int"""
3589 return _core.KeyEvent_GetY(*args, **kwargs)
3590
3591 m_x = property(_core.KeyEvent_m_x_get, _core.KeyEvent_m_x_set)
3592 m_y = property(_core.KeyEvent_m_y_get, _core.KeyEvent_m_y_set)
3593 m_keyCode = property(_core.KeyEvent_m_keyCode_get, _core.KeyEvent_m_keyCode_set)
3594 m_controlDown = property(_core.KeyEvent_m_controlDown_get, _core.KeyEvent_m_controlDown_set)
3595 m_shiftDown = property(_core.KeyEvent_m_shiftDown_get, _core.KeyEvent_m_shiftDown_set)
3596 m_altDown = property(_core.KeyEvent_m_altDown_get, _core.KeyEvent_m_altDown_set)
3597 m_metaDown = property(_core.KeyEvent_m_metaDown_get, _core.KeyEvent_m_metaDown_set)
3598 m_scanCode = property(_core.KeyEvent_m_scanCode_get, _core.KeyEvent_m_scanCode_set)
3599 m_rawCode = property(_core.KeyEvent_m_rawCode_get, _core.KeyEvent_m_rawCode_set)
3600 m_rawFlags = property(_core.KeyEvent_m_rawFlags_get, _core.KeyEvent_m_rawFlags_set)
3601
3602 class KeyEventPtr(KeyEvent):
3603 def __init__(self, this):
3604 self.this = this
3605 if not hasattr(self,"thisown"): self.thisown = 0
3606 self.__class__ = KeyEvent
3607 _core.KeyEvent_swigregister(KeyEventPtr)
3608
3609 #---------------------------------------------------------------------------
3610
3611 class SizeEvent(Event):
3612 def __repr__(self):
3613 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3614 def __init__(self, *args, **kwargs):
3615 """__init__(Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3616 newobj = _core.new_SizeEvent(*args, **kwargs)
3617 self.this = newobj.this
3618 self.thisown = 1
3619 del newobj.thisown
3620 def GetSize(*args, **kwargs):
3621 """GetSize() -> Size"""
3622 return _core.SizeEvent_GetSize(*args, **kwargs)
3623
3624 def GetRect(*args, **kwargs):
3625 """GetRect() -> Rect"""
3626 return _core.SizeEvent_GetRect(*args, **kwargs)
3627
3628 def SetRect(*args, **kwargs):
3629 """SetRect(Rect rect)"""
3630 return _core.SizeEvent_SetRect(*args, **kwargs)
3631
3632 def SetSize(*args, **kwargs):
3633 """SetSize(Size size)"""
3634 return _core.SizeEvent_SetSize(*args, **kwargs)
3635
3636 m_size = property(_core.SizeEvent_m_size_get, _core.SizeEvent_m_size_set)
3637 m_rect = property(_core.SizeEvent_m_rect_get, _core.SizeEvent_m_rect_set)
3638
3639 class SizeEventPtr(SizeEvent):
3640 def __init__(self, this):
3641 self.this = this
3642 if not hasattr(self,"thisown"): self.thisown = 0
3643 self.__class__ = SizeEvent
3644 _core.SizeEvent_swigregister(SizeEventPtr)
3645
3646 #---------------------------------------------------------------------------
3647
3648 class MoveEvent(Event):
3649 def __repr__(self):
3650 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3651 def __init__(self, *args, **kwargs):
3652 """__init__(Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3653 newobj = _core.new_MoveEvent(*args, **kwargs)
3654 self.this = newobj.this
3655 self.thisown = 1
3656 del newobj.thisown
3657 def GetPosition(*args, **kwargs):
3658 """GetPosition() -> Point"""
3659 return _core.MoveEvent_GetPosition(*args, **kwargs)
3660
3661 def GetRect(*args, **kwargs):
3662 """GetRect() -> Rect"""
3663 return _core.MoveEvent_GetRect(*args, **kwargs)
3664
3665 def SetRect(*args, **kwargs):
3666 """SetRect(Rect rect)"""
3667 return _core.MoveEvent_SetRect(*args, **kwargs)
3668
3669 def SetPosition(*args, **kwargs):
3670 """SetPosition(Point pos)"""
3671 return _core.MoveEvent_SetPosition(*args, **kwargs)
3672
3673 m_pos = property(_core.MoveEvent_m_pos_get, _core.MoveEvent_m_pos_set)
3674 m_rect = property(_core.MoveEvent_m_rect_get, _core.MoveEvent_m_rect_set)
3675
3676 class MoveEventPtr(MoveEvent):
3677 def __init__(self, this):
3678 self.this = this
3679 if not hasattr(self,"thisown"): self.thisown = 0
3680 self.__class__ = MoveEvent
3681 _core.MoveEvent_swigregister(MoveEventPtr)
3682
3683 #---------------------------------------------------------------------------
3684
3685 class PaintEvent(Event):
3686 def __repr__(self):
3687 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3688 def __init__(self, *args, **kwargs):
3689 """__init__(int Id=0) -> PaintEvent"""
3690 newobj = _core.new_PaintEvent(*args, **kwargs)
3691 self.this = newobj.this
3692 self.thisown = 1
3693 del newobj.thisown
3694
3695 class PaintEventPtr(PaintEvent):
3696 def __init__(self, this):
3697 self.this = this
3698 if not hasattr(self,"thisown"): self.thisown = 0
3699 self.__class__ = PaintEvent
3700 _core.PaintEvent_swigregister(PaintEventPtr)
3701
3702 class NcPaintEvent(Event):
3703 def __repr__(self):
3704 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3705 def __init__(self, *args, **kwargs):
3706 """__init__(int winid=0) -> NcPaintEvent"""
3707 newobj = _core.new_NcPaintEvent(*args, **kwargs)
3708 self.this = newobj.this
3709 self.thisown = 1
3710 del newobj.thisown
3711
3712 class NcPaintEventPtr(NcPaintEvent):
3713 def __init__(self, this):
3714 self.this = this
3715 if not hasattr(self,"thisown"): self.thisown = 0
3716 self.__class__ = NcPaintEvent
3717 _core.NcPaintEvent_swigregister(NcPaintEventPtr)
3718
3719 #---------------------------------------------------------------------------
3720
3721 class EraseEvent(Event):
3722 def __repr__(self):
3723 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3724 def __init__(self, *args, **kwargs):
3725 """__init__(int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3726 newobj = _core.new_EraseEvent(*args, **kwargs)
3727 self.this = newobj.this
3728 self.thisown = 1
3729 del newobj.thisown
3730 def GetDC(*args, **kwargs):
3731 """GetDC() -> DC"""
3732 return _core.EraseEvent_GetDC(*args, **kwargs)
3733
3734
3735 class EraseEventPtr(EraseEvent):
3736 def __init__(self, this):
3737 self.this = this
3738 if not hasattr(self,"thisown"): self.thisown = 0
3739 self.__class__ = EraseEvent
3740 _core.EraseEvent_swigregister(EraseEventPtr)
3741
3742 #---------------------------------------------------------------------------
3743
3744 class FocusEvent(Event):
3745 def __repr__(self):
3746 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3747 def __init__(self, *args, **kwargs):
3748 """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
3749 newobj = _core.new_FocusEvent(*args, **kwargs)
3750 self.this = newobj.this
3751 self.thisown = 1
3752 del newobj.thisown
3753 def GetWindow(*args, **kwargs):
3754 """GetWindow() -> Window"""
3755 return _core.FocusEvent_GetWindow(*args, **kwargs)
3756
3757 def SetWindow(*args, **kwargs):
3758 """SetWindow(Window win)"""
3759 return _core.FocusEvent_SetWindow(*args, **kwargs)
3760
3761
3762 class FocusEventPtr(FocusEvent):
3763 def __init__(self, this):
3764 self.this = this
3765 if not hasattr(self,"thisown"): self.thisown = 0
3766 self.__class__ = FocusEvent
3767 _core.FocusEvent_swigregister(FocusEventPtr)
3768
3769 #---------------------------------------------------------------------------
3770
3771 class ChildFocusEvent(CommandEvent):
3772 def __repr__(self):
3773 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3774 def __init__(self, *args, **kwargs):
3775 """__init__(Window win=None) -> ChildFocusEvent"""
3776 newobj = _core.new_ChildFocusEvent(*args, **kwargs)
3777 self.this = newobj.this
3778 self.thisown = 1
3779 del newobj.thisown
3780 def GetWindow(*args, **kwargs):
3781 """GetWindow() -> Window"""
3782 return _core.ChildFocusEvent_GetWindow(*args, **kwargs)
3783
3784
3785 class ChildFocusEventPtr(ChildFocusEvent):
3786 def __init__(self, this):
3787 self.this = this
3788 if not hasattr(self,"thisown"): self.thisown = 0
3789 self.__class__ = ChildFocusEvent
3790 _core.ChildFocusEvent_swigregister(ChildFocusEventPtr)
3791
3792 #---------------------------------------------------------------------------
3793
3794 class ActivateEvent(Event):
3795 def __repr__(self):
3796 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3797 def __init__(self, *args, **kwargs):
3798 """__init__(wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
3799 newobj = _core.new_ActivateEvent(*args, **kwargs)
3800 self.this = newobj.this
3801 self.thisown = 1
3802 del newobj.thisown
3803 def GetActive(*args, **kwargs):
3804 """GetActive() -> bool"""
3805 return _core.ActivateEvent_GetActive(*args, **kwargs)
3806
3807
3808 class ActivateEventPtr(ActivateEvent):
3809 def __init__(self, this):
3810 self.this = this
3811 if not hasattr(self,"thisown"): self.thisown = 0
3812 self.__class__ = ActivateEvent
3813 _core.ActivateEvent_swigregister(ActivateEventPtr)
3814
3815 #---------------------------------------------------------------------------
3816
3817 class InitDialogEvent(Event):
3818 def __repr__(self):
3819 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3820 def __init__(self, *args, **kwargs):
3821 """__init__(int Id=0) -> InitDialogEvent"""
3822 newobj = _core.new_InitDialogEvent(*args, **kwargs)
3823 self.this = newobj.this
3824 self.thisown = 1
3825 del newobj.thisown
3826
3827 class InitDialogEventPtr(InitDialogEvent):
3828 def __init__(self, this):
3829 self.this = this
3830 if not hasattr(self,"thisown"): self.thisown = 0
3831 self.__class__ = InitDialogEvent
3832 _core.InitDialogEvent_swigregister(InitDialogEventPtr)
3833
3834 #---------------------------------------------------------------------------
3835
3836 class MenuEvent(Event):
3837 def __repr__(self):
3838 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3839 def __init__(self, *args, **kwargs):
3840 """__init__(wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
3841 newobj = _core.new_MenuEvent(*args, **kwargs)
3842 self.this = newobj.this
3843 self.thisown = 1
3844 del newobj.thisown
3845 def GetMenuId(*args, **kwargs):
3846 """GetMenuId() -> int"""
3847 return _core.MenuEvent_GetMenuId(*args, **kwargs)
3848
3849 def IsPopup(*args, **kwargs):
3850 """IsPopup() -> bool"""
3851 return _core.MenuEvent_IsPopup(*args, **kwargs)
3852
3853 def GetMenu(*args, **kwargs):
3854 """GetMenu() -> Menu"""
3855 return _core.MenuEvent_GetMenu(*args, **kwargs)
3856
3857
3858 class MenuEventPtr(MenuEvent):
3859 def __init__(self, this):
3860 self.this = this
3861 if not hasattr(self,"thisown"): self.thisown = 0
3862 self.__class__ = MenuEvent
3863 _core.MenuEvent_swigregister(MenuEventPtr)
3864
3865 #---------------------------------------------------------------------------
3866
3867 class CloseEvent(Event):
3868 def __repr__(self):
3869 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3870 def __init__(self, *args, **kwargs):
3871 """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
3872 newobj = _core.new_CloseEvent(*args, **kwargs)
3873 self.this = newobj.this
3874 self.thisown = 1
3875 del newobj.thisown
3876 def SetLoggingOff(*args, **kwargs):
3877 """SetLoggingOff(bool logOff)"""
3878 return _core.CloseEvent_SetLoggingOff(*args, **kwargs)
3879
3880 def GetLoggingOff(*args, **kwargs):
3881 """GetLoggingOff() -> bool"""
3882 return _core.CloseEvent_GetLoggingOff(*args, **kwargs)
3883
3884 def Veto(*args, **kwargs):
3885 """Veto(bool veto=True)"""
3886 return _core.CloseEvent_Veto(*args, **kwargs)
3887
3888 def SetCanVeto(*args, **kwargs):
3889 """SetCanVeto(bool canVeto)"""
3890 return _core.CloseEvent_SetCanVeto(*args, **kwargs)
3891
3892 def CanVeto(*args, **kwargs):
3893 """CanVeto() -> bool"""
3894 return _core.CloseEvent_CanVeto(*args, **kwargs)
3895
3896 def GetVeto(*args, **kwargs):
3897 """GetVeto() -> bool"""
3898 return _core.CloseEvent_GetVeto(*args, **kwargs)
3899
3900
3901 class CloseEventPtr(CloseEvent):
3902 def __init__(self, this):
3903 self.this = this
3904 if not hasattr(self,"thisown"): self.thisown = 0
3905 self.__class__ = CloseEvent
3906 _core.CloseEvent_swigregister(CloseEventPtr)
3907
3908 #---------------------------------------------------------------------------
3909
3910 class ShowEvent(Event):
3911 def __repr__(self):
3912 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3913 def __init__(self, *args, **kwargs):
3914 """__init__(int winid=0, bool show=False) -> ShowEvent"""
3915 newobj = _core.new_ShowEvent(*args, **kwargs)
3916 self.this = newobj.this
3917 self.thisown = 1
3918 del newobj.thisown
3919 def SetShow(*args, **kwargs):
3920 """SetShow(bool show)"""
3921 return _core.ShowEvent_SetShow(*args, **kwargs)
3922
3923 def GetShow(*args, **kwargs):
3924 """GetShow() -> bool"""
3925 return _core.ShowEvent_GetShow(*args, **kwargs)
3926
3927
3928 class ShowEventPtr(ShowEvent):
3929 def __init__(self, this):
3930 self.this = this
3931 if not hasattr(self,"thisown"): self.thisown = 0
3932 self.__class__ = ShowEvent
3933 _core.ShowEvent_swigregister(ShowEventPtr)
3934
3935 #---------------------------------------------------------------------------
3936
3937 class IconizeEvent(Event):
3938 def __repr__(self):
3939 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3940 def __init__(self, *args, **kwargs):
3941 """__init__(int id=0, bool iconized=True) -> IconizeEvent"""
3942 newobj = _core.new_IconizeEvent(*args, **kwargs)
3943 self.this = newobj.this
3944 self.thisown = 1
3945 del newobj.thisown
3946 def Iconized(*args, **kwargs):
3947 """Iconized() -> bool"""
3948 return _core.IconizeEvent_Iconized(*args, **kwargs)
3949
3950
3951 class IconizeEventPtr(IconizeEvent):
3952 def __init__(self, this):
3953 self.this = this
3954 if not hasattr(self,"thisown"): self.thisown = 0
3955 self.__class__ = IconizeEvent
3956 _core.IconizeEvent_swigregister(IconizeEventPtr)
3957
3958 #---------------------------------------------------------------------------
3959
3960 class MaximizeEvent(Event):
3961 def __repr__(self):
3962 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3963 def __init__(self, *args, **kwargs):
3964 """__init__(int id=0) -> MaximizeEvent"""
3965 newobj = _core.new_MaximizeEvent(*args, **kwargs)
3966 self.this = newobj.this
3967 self.thisown = 1
3968 del newobj.thisown
3969
3970 class MaximizeEventPtr(MaximizeEvent):
3971 def __init__(self, this):
3972 self.this = this
3973 if not hasattr(self,"thisown"): self.thisown = 0
3974 self.__class__ = MaximizeEvent
3975 _core.MaximizeEvent_swigregister(MaximizeEventPtr)
3976
3977 #---------------------------------------------------------------------------
3978
3979 class DropFilesEvent(Event):
3980 def __init__(self): raise RuntimeError, "No constructor defined"
3981 def __repr__(self):
3982 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3983 def GetPosition(*args, **kwargs):
3984 """GetPosition() -> Point"""
3985 return _core.DropFilesEvent_GetPosition(*args, **kwargs)
3986
3987 def GetNumberOfFiles(*args, **kwargs):
3988 """GetNumberOfFiles() -> int"""
3989 return _core.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
3990
3991 def GetFiles(*args, **kwargs):
3992 """GetFiles() -> PyObject"""
3993 return _core.DropFilesEvent_GetFiles(*args, **kwargs)
3994
3995
3996 class DropFilesEventPtr(DropFilesEvent):
3997 def __init__(self, this):
3998 self.this = this
3999 if not hasattr(self,"thisown"): self.thisown = 0
4000 self.__class__ = DropFilesEvent
4001 _core.DropFilesEvent_swigregister(DropFilesEventPtr)
4002
4003 #---------------------------------------------------------------------------
4004
4005 UPDATE_UI_PROCESS_ALL = _core.UPDATE_UI_PROCESS_ALL
4006 UPDATE_UI_PROCESS_SPECIFIED = _core.UPDATE_UI_PROCESS_SPECIFIED
4007 class UpdateUIEvent(CommandEvent):
4008 def __repr__(self):
4009 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4010 def __init__(self, *args, **kwargs):
4011 """__init__(int commandId=0) -> UpdateUIEvent"""
4012 newobj = _core.new_UpdateUIEvent(*args, **kwargs)
4013 self.this = newobj.this
4014 self.thisown = 1
4015 del newobj.thisown
4016 def GetChecked(*args, **kwargs):
4017 """GetChecked() -> bool"""
4018 return _core.UpdateUIEvent_GetChecked(*args, **kwargs)
4019
4020 def GetEnabled(*args, **kwargs):
4021 """GetEnabled() -> bool"""
4022 return _core.UpdateUIEvent_GetEnabled(*args, **kwargs)
4023
4024 def GetText(*args, **kwargs):
4025 """GetText() -> String"""
4026 return _core.UpdateUIEvent_GetText(*args, **kwargs)
4027
4028 def GetSetText(*args, **kwargs):
4029 """GetSetText() -> bool"""
4030 return _core.UpdateUIEvent_GetSetText(*args, **kwargs)
4031
4032 def GetSetChecked(*args, **kwargs):
4033 """GetSetChecked() -> bool"""
4034 return _core.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4035
4036 def GetSetEnabled(*args, **kwargs):
4037 """GetSetEnabled() -> bool"""
4038 return _core.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4039
4040 def Check(*args, **kwargs):
4041 """Check(bool check)"""
4042 return _core.UpdateUIEvent_Check(*args, **kwargs)
4043
4044 def Enable(*args, **kwargs):
4045 """Enable(bool enable)"""
4046 return _core.UpdateUIEvent_Enable(*args, **kwargs)
4047
4048 def SetText(*args, **kwargs):
4049 """SetText(String text)"""
4050 return _core.UpdateUIEvent_SetText(*args, **kwargs)
4051
4052 def SetUpdateInterval(*args, **kwargs):
4053 """SetUpdateInterval(long updateInterval)"""
4054 return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4055
4056 SetUpdateInterval = staticmethod(SetUpdateInterval)
4057 def GetUpdateInterval(*args, **kwargs):
4058 """GetUpdateInterval() -> long"""
4059 return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4060
4061 GetUpdateInterval = staticmethod(GetUpdateInterval)
4062 def CanUpdate(*args, **kwargs):
4063 """CanUpdate(Window win) -> bool"""
4064 return _core.UpdateUIEvent_CanUpdate(*args, **kwargs)
4065
4066 CanUpdate = staticmethod(CanUpdate)
4067 def ResetUpdateTime(*args, **kwargs):
4068 """ResetUpdateTime()"""
4069 return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4070
4071 ResetUpdateTime = staticmethod(ResetUpdateTime)
4072 def SetMode(*args, **kwargs):
4073 """SetMode(int mode)"""
4074 return _core.UpdateUIEvent_SetMode(*args, **kwargs)
4075
4076 SetMode = staticmethod(SetMode)
4077 def GetMode(*args, **kwargs):
4078 """GetMode() -> int"""
4079 return _core.UpdateUIEvent_GetMode(*args, **kwargs)
4080
4081 GetMode = staticmethod(GetMode)
4082
4083 class UpdateUIEventPtr(UpdateUIEvent):
4084 def __init__(self, this):
4085 self.this = this
4086 if not hasattr(self,"thisown"): self.thisown = 0
4087 self.__class__ = UpdateUIEvent
4088 _core.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4089
4090 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4091 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4092 return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4093
4094 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4095 """UpdateUIEvent_GetUpdateInterval() -> long"""
4096 return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4097
4098 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4099 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4100 return _core.UpdateUIEvent_CanUpdate(*args, **kwargs)
4101
4102 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4103 """UpdateUIEvent_ResetUpdateTime()"""
4104 return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4105
4106 def UpdateUIEvent_SetMode(*args, **kwargs):
4107 """UpdateUIEvent_SetMode(int mode)"""
4108 return _core.UpdateUIEvent_SetMode(*args, **kwargs)
4109
4110 def UpdateUIEvent_GetMode(*args, **kwargs):
4111 """UpdateUIEvent_GetMode() -> int"""
4112 return _core.UpdateUIEvent_GetMode(*args, **kwargs)
4113
4114 #---------------------------------------------------------------------------
4115
4116 class SysColourChangedEvent(Event):
4117 def __repr__(self):
4118 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4119 def __init__(self, *args, **kwargs):
4120 """__init__() -> SysColourChangedEvent"""
4121 newobj = _core.new_SysColourChangedEvent(*args, **kwargs)
4122 self.this = newobj.this
4123 self.thisown = 1
4124 del newobj.thisown
4125
4126 class SysColourChangedEventPtr(SysColourChangedEvent):
4127 def __init__(self, this):
4128 self.this = this
4129 if not hasattr(self,"thisown"): self.thisown = 0
4130 self.__class__ = SysColourChangedEvent
4131 _core.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4132
4133 #---------------------------------------------------------------------------
4134
4135 class MouseCaptureChangedEvent(Event):
4136 def __repr__(self):
4137 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4138 def __init__(self, *args, **kwargs):
4139 """__init__(int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4140 newobj = _core.new_MouseCaptureChangedEvent(*args, **kwargs)
4141 self.this = newobj.this
4142 self.thisown = 1
4143 del newobj.thisown
4144 def GetCapturedWindow(*args, **kwargs):
4145 """GetCapturedWindow() -> Window"""
4146 return _core.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4147
4148
4149 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4150 def __init__(self, this):
4151 self.this = this
4152 if not hasattr(self,"thisown"): self.thisown = 0
4153 self.__class__ = MouseCaptureChangedEvent
4154 _core.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4155
4156 #---------------------------------------------------------------------------
4157
4158 class DisplayChangedEvent(Event):
4159 def __repr__(self):
4160 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4161 def __init__(self, *args, **kwargs):
4162 """__init__() -> DisplayChangedEvent"""
4163 newobj = _core.new_DisplayChangedEvent(*args, **kwargs)
4164 self.this = newobj.this
4165 self.thisown = 1
4166 del newobj.thisown
4167
4168 class DisplayChangedEventPtr(DisplayChangedEvent):
4169 def __init__(self, this):
4170 self.this = this
4171 if not hasattr(self,"thisown"): self.thisown = 0
4172 self.__class__ = DisplayChangedEvent
4173 _core.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4174
4175 #---------------------------------------------------------------------------
4176
4177 class PaletteChangedEvent(Event):
4178 def __repr__(self):
4179 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4180 def __init__(self, *args, **kwargs):
4181 """__init__(int id=0) -> PaletteChangedEvent"""
4182 newobj = _core.new_PaletteChangedEvent(*args, **kwargs)
4183 self.this = newobj.this
4184 self.thisown = 1
4185 del newobj.thisown
4186 def SetChangedWindow(*args, **kwargs):
4187 """SetChangedWindow(Window win)"""
4188 return _core.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4189
4190 def GetChangedWindow(*args, **kwargs):
4191 """GetChangedWindow() -> Window"""
4192 return _core.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4193
4194
4195 class PaletteChangedEventPtr(PaletteChangedEvent):
4196 def __init__(self, this):
4197 self.this = this
4198 if not hasattr(self,"thisown"): self.thisown = 0
4199 self.__class__ = PaletteChangedEvent
4200 _core.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4201
4202 #---------------------------------------------------------------------------
4203
4204 class QueryNewPaletteEvent(Event):
4205 def __repr__(self):
4206 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4207 def __init__(self, *args, **kwargs):
4208 """__init__(int winid=0) -> QueryNewPaletteEvent"""
4209 newobj = _core.new_QueryNewPaletteEvent(*args, **kwargs)
4210 self.this = newobj.this
4211 self.thisown = 1
4212 del newobj.thisown
4213 def SetPaletteRealized(*args, **kwargs):
4214 """SetPaletteRealized(bool realized)"""
4215 return _core.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4216
4217 def GetPaletteRealized(*args, **kwargs):
4218 """GetPaletteRealized() -> bool"""
4219 return _core.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4220
4221
4222 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4223 def __init__(self, this):
4224 self.this = this
4225 if not hasattr(self,"thisown"): self.thisown = 0
4226 self.__class__ = QueryNewPaletteEvent
4227 _core.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4228
4229 #---------------------------------------------------------------------------
4230
4231 class NavigationKeyEvent(Event):
4232 def __repr__(self):
4233 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4234 def __init__(self, *args, **kwargs):
4235 """__init__() -> NavigationKeyEvent"""
4236 newobj = _core.new_NavigationKeyEvent(*args, **kwargs)
4237 self.this = newobj.this
4238 self.thisown = 1
4239 del newobj.thisown
4240 def GetDirection(*args, **kwargs):
4241 """GetDirection() -> bool"""
4242 return _core.NavigationKeyEvent_GetDirection(*args, **kwargs)
4243
4244 def SetDirection(*args, **kwargs):
4245 """SetDirection(bool bForward)"""
4246 return _core.NavigationKeyEvent_SetDirection(*args, **kwargs)
4247
4248 def IsWindowChange(*args, **kwargs):
4249 """IsWindowChange() -> bool"""
4250 return _core.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4251
4252 def SetWindowChange(*args, **kwargs):
4253 """SetWindowChange(bool bIs)"""
4254 return _core.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4255
4256 def GetCurrentFocus(*args, **kwargs):
4257 """GetCurrentFocus() -> Window"""
4258 return _core.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4259
4260 def SetCurrentFocus(*args, **kwargs):
4261 """SetCurrentFocus(Window win)"""
4262 return _core.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4263
4264
4265 class NavigationKeyEventPtr(NavigationKeyEvent):
4266 def __init__(self, this):
4267 self.this = this
4268 if not hasattr(self,"thisown"): self.thisown = 0
4269 self.__class__ = NavigationKeyEvent
4270 _core.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4271
4272 #---------------------------------------------------------------------------
4273
4274 class WindowCreateEvent(CommandEvent):
4275 def __repr__(self):
4276 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4277 def __init__(self, *args, **kwargs):
4278 """__init__(Window win=None) -> WindowCreateEvent"""
4279 newobj = _core.new_WindowCreateEvent(*args, **kwargs)
4280 self.this = newobj.this
4281 self.thisown = 1
4282 del newobj.thisown
4283 def GetWindow(*args, **kwargs):
4284 """GetWindow() -> Window"""
4285 return _core.WindowCreateEvent_GetWindow(*args, **kwargs)
4286
4287
4288 class WindowCreateEventPtr(WindowCreateEvent):
4289 def __init__(self, this):
4290 self.this = this
4291 if not hasattr(self,"thisown"): self.thisown = 0
4292 self.__class__ = WindowCreateEvent
4293 _core.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4294
4295 class WindowDestroyEvent(CommandEvent):
4296 def __repr__(self):
4297 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4298 def __init__(self, *args, **kwargs):
4299 """__init__(Window win=None) -> WindowDestroyEvent"""
4300 newobj = _core.new_WindowDestroyEvent(*args, **kwargs)
4301 self.this = newobj.this
4302 self.thisown = 1
4303 del newobj.thisown
4304 def GetWindow(*args, **kwargs):
4305 """GetWindow() -> Window"""
4306 return _core.WindowDestroyEvent_GetWindow(*args, **kwargs)
4307
4308
4309 class WindowDestroyEventPtr(WindowDestroyEvent):
4310 def __init__(self, this):
4311 self.this = this
4312 if not hasattr(self,"thisown"): self.thisown = 0
4313 self.__class__ = WindowDestroyEvent
4314 _core.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4315
4316 #---------------------------------------------------------------------------
4317
4318 class ContextMenuEvent(CommandEvent):
4319 def __repr__(self):
4320 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4321 def __init__(self, *args, **kwargs):
4322 """__init__(wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4323 newobj = _core.new_ContextMenuEvent(*args, **kwargs)
4324 self.this = newobj.this
4325 self.thisown = 1
4326 del newobj.thisown
4327 def GetPosition(*args, **kwargs):
4328 """GetPosition() -> Point"""
4329 return _core.ContextMenuEvent_GetPosition(*args, **kwargs)
4330
4331 def SetPosition(*args, **kwargs):
4332 """SetPosition(Point pos)"""
4333 return _core.ContextMenuEvent_SetPosition(*args, **kwargs)
4334
4335
4336 class ContextMenuEventPtr(ContextMenuEvent):
4337 def __init__(self, this):
4338 self.this = this
4339 if not hasattr(self,"thisown"): self.thisown = 0
4340 self.__class__ = ContextMenuEvent
4341 _core.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4342
4343 #---------------------------------------------------------------------------
4344
4345 IDLE_PROCESS_ALL = _core.IDLE_PROCESS_ALL
4346 IDLE_PROCESS_SPECIFIED = _core.IDLE_PROCESS_SPECIFIED
4347 class IdleEvent(Event):
4348 def __repr__(self):
4349 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4350 def __init__(self, *args, **kwargs):
4351 """__init__() -> IdleEvent"""
4352 newobj = _core.new_IdleEvent(*args, **kwargs)
4353 self.this = newobj.this
4354 self.thisown = 1
4355 del newobj.thisown
4356 def RequestMore(*args, **kwargs):
4357 """RequestMore(bool needMore=True)"""
4358 return _core.IdleEvent_RequestMore(*args, **kwargs)
4359
4360 def MoreRequested(*args, **kwargs):
4361 """MoreRequested() -> bool"""
4362 return _core.IdleEvent_MoreRequested(*args, **kwargs)
4363
4364 def SetMode(*args, **kwargs):
4365 """SetMode(int mode)"""
4366 return _core.IdleEvent_SetMode(*args, **kwargs)
4367
4368 SetMode = staticmethod(SetMode)
4369 def GetMode(*args, **kwargs):
4370 """GetMode() -> int"""
4371 return _core.IdleEvent_GetMode(*args, **kwargs)
4372
4373 GetMode = staticmethod(GetMode)
4374 def CanSend(*args, **kwargs):
4375 """CanSend(Window win) -> bool"""
4376 return _core.IdleEvent_CanSend(*args, **kwargs)
4377
4378 CanSend = staticmethod(CanSend)
4379
4380 class IdleEventPtr(IdleEvent):
4381 def __init__(self, this):
4382 self.this = this
4383 if not hasattr(self,"thisown"): self.thisown = 0
4384 self.__class__ = IdleEvent
4385 _core.IdleEvent_swigregister(IdleEventPtr)
4386
4387 def IdleEvent_SetMode(*args, **kwargs):
4388 """IdleEvent_SetMode(int mode)"""
4389 return _core.IdleEvent_SetMode(*args, **kwargs)
4390
4391 def IdleEvent_GetMode(*args, **kwargs):
4392 """IdleEvent_GetMode() -> int"""
4393 return _core.IdleEvent_GetMode(*args, **kwargs)
4394
4395 def IdleEvent_CanSend(*args, **kwargs):
4396 """IdleEvent_CanSend(Window win) -> bool"""
4397 return _core.IdleEvent_CanSend(*args, **kwargs)
4398
4399 #---------------------------------------------------------------------------
4400
4401 class PyEvent(Event):
4402 def __repr__(self):
4403 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4404 def __init__(self, *args, **kwargs):
4405 """__init__(int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4406 newobj = _core.new_PyEvent(*args, **kwargs)
4407 self.this = newobj.this
4408 self.thisown = 1
4409 del newobj.thisown
4410 self.SetSelf(self)
4411
4412 def __del__(self, destroy=_core.delete_PyEvent):
4413 """__del__()"""
4414 try:
4415 if self.thisown: destroy(self)
4416 except: pass
4417
4418 def SetSelf(*args, **kwargs):
4419 """SetSelf(PyObject self)"""
4420 return _core.PyEvent_SetSelf(*args, **kwargs)
4421
4422 def GetSelf(*args, **kwargs):
4423 """GetSelf() -> PyObject"""
4424 return _core.PyEvent_GetSelf(*args, **kwargs)
4425
4426
4427 class PyEventPtr(PyEvent):
4428 def __init__(self, this):
4429 self.this = this
4430 if not hasattr(self,"thisown"): self.thisown = 0
4431 self.__class__ = PyEvent
4432 _core.PyEvent_swigregister(PyEventPtr)
4433
4434 class PyCommandEvent(CommandEvent):
4435 def __repr__(self):
4436 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4437 def __init__(self, *args, **kwargs):
4438 """__init__(wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4439 newobj = _core.new_PyCommandEvent(*args, **kwargs)
4440 self.this = newobj.this
4441 self.thisown = 1
4442 del newobj.thisown
4443 self.SetSelf(self)
4444
4445 def __del__(self, destroy=_core.delete_PyCommandEvent):
4446 """__del__()"""
4447 try:
4448 if self.thisown: destroy(self)
4449 except: pass
4450
4451 def SetSelf(*args, **kwargs):
4452 """SetSelf(PyObject self)"""
4453 return _core.PyCommandEvent_SetSelf(*args, **kwargs)
4454
4455 def GetSelf(*args, **kwargs):
4456 """GetSelf() -> PyObject"""
4457 return _core.PyCommandEvent_GetSelf(*args, **kwargs)
4458
4459
4460 class PyCommandEventPtr(PyCommandEvent):
4461 def __init__(self, this):
4462 self.this = this
4463 if not hasattr(self,"thisown"): self.thisown = 0
4464 self.__class__ = PyCommandEvent
4465 _core.PyCommandEvent_swigregister(PyCommandEventPtr)
4466
4467 #---------------------------------------------------------------------------
4468
4469 PYAPP_ASSERT_SUPPRESS = _core.PYAPP_ASSERT_SUPPRESS
4470 PYAPP_ASSERT_EXCEPTION = _core.PYAPP_ASSERT_EXCEPTION
4471 PYAPP_ASSERT_DIALOG = _core.PYAPP_ASSERT_DIALOG
4472 PYAPP_ASSERT_LOG = _core.PYAPP_ASSERT_LOG
4473 PRINT_WINDOWS = _core.PRINT_WINDOWS
4474 PRINT_POSTSCRIPT = _core.PRINT_POSTSCRIPT
4475 class PyApp(EvtHandler):
4476 def __repr__(self):
4477 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4478 def __init__(self, *args, **kwargs):
4479 """
4480 __init__() -> PyApp
4481
4482 Create a new application object, starting the bootstrap process.
4483 """
4484 newobj = _core.new_PyApp(*args, **kwargs)
4485 self.this = newobj.this
4486 self.thisown = 1
4487 del newobj.thisown
4488 self._setCallbackInfo(self, PyApp)
4489 self._setOORInfo(self)
4490
4491 def __del__(self, destroy=_core.delete_PyApp):
4492 """__del__()"""
4493 try:
4494 if self.thisown: destroy(self)
4495 except: pass
4496
4497 def _setCallbackInfo(*args, **kwargs):
4498 """_setCallbackInfo(PyObject self, PyObject _class)"""
4499 return _core.PyApp__setCallbackInfo(*args, **kwargs)
4500
4501 def GetAppName(*args, **kwargs):
4502 """
4503 GetAppName() -> String
4504
4505 Get the application name.
4506 """
4507 return _core.PyApp_GetAppName(*args, **kwargs)
4508
4509 def SetAppName(*args, **kwargs):
4510 """
4511 SetAppName(String name)
4512
4513 Set the application name. This value may be used automatically
4514 by wx.Config and such.
4515 """
4516 return _core.PyApp_SetAppName(*args, **kwargs)
4517
4518 def GetClassName(*args, **kwargs):
4519 """
4520 GetClassName() -> String
4521
4522 Get the application's class name.
4523 """
4524 return _core.PyApp_GetClassName(*args, **kwargs)
4525
4526 def SetClassName(*args, **kwargs):
4527 """
4528 SetClassName(String name)
4529
4530 Set the application's class name. This value may be used for X-resources if
4531 applicable for the platform
4532 """
4533 return _core.PyApp_SetClassName(*args, **kwargs)
4534
4535 def GetVendorName(*args, **kwargs):
4536 """
4537 GetVendorName() -> String
4538
4539 Get the application's vendor name.
4540 """
4541 return _core.PyApp_GetVendorName(*args, **kwargs)
4542
4543 def SetVendorName(*args, **kwargs):
4544 """
4545 SetVendorName(String name)
4546
4547 Set the application's vendor name. This value may be used automatically
4548 by wx.Config and such.
4549 """
4550 return _core.PyApp_SetVendorName(*args, **kwargs)
4551
4552 def GetTraits(*args, **kwargs):
4553 """
4554 GetTraits() -> wxAppTraits
4555
4556 Create the app traits object to which we delegate for everything which either
4557 should be configurable by the user (then he can change the default behaviour
4558 simply by overriding CreateTraits() and returning his own traits object) or
4559 which is GUI/console dependent as then wx.AppTraits allows us to abstract the
4560 differences behind the common facade
4561 """
4562 return _core.PyApp_GetTraits(*args, **kwargs)
4563
4564 def ProcessPendingEvents(*args, **kwargs):
4565 """
4566 ProcessPendingEvents()
4567
4568 Process all events in the Pending Events list -- it is necessary to call this
4569 function to process posted events. This happens during each event loop
4570 iteration.
4571 """
4572 return _core.PyApp_ProcessPendingEvents(*args, **kwargs)
4573
4574 def Yield(*args, **kwargs):
4575 """
4576 Yield(bool onlyIfNeeded=False) -> bool
4577
4578 Process all currently pending events right now, instead of waiting until
4579 return to the event loop. It is an error to call Yield() recursively unless
4580 the value of onlyIfNeeded is True.
4581
4582 WARNING: This function is dangerous as it can lead to unexpected
4583 reentrancies (i.e. when called from an event handler it
4584 may result in calling the same event handler again), use
4585 with _extreme_ care or, better, don't use at all!
4586
4587 """
4588 return _core.PyApp_Yield(*args, **kwargs)
4589
4590 def WakeUpIdle(*args, **kwargs):
4591 """
4592 WakeUpIdle()
4593
4594 Make sure that idle events are sent again
4595 """
4596 return _core.PyApp_WakeUpIdle(*args, **kwargs)
4597
4598 def MainLoop(*args, **kwargs):
4599 """
4600 MainLoop() -> int
4601
4602 Execute the main GUI loop, the function returns when the loop ends.
4603 """
4604 return _core.PyApp_MainLoop(*args, **kwargs)
4605
4606 def Exit(*args, **kwargs):
4607 """
4608 Exit()
4609
4610 Exit the main loop thus terminating the application.
4611 """
4612 return _core.PyApp_Exit(*args, **kwargs)
4613
4614 def ExitMainLoop(*args, **kwargs):
4615 """
4616 ExitMainLoop()
4617
4618 Exit the main GUI loop during the next iteration (i.e. it does not
4619 stop the program immediately!)
4620 """
4621 return _core.PyApp_ExitMainLoop(*args, **kwargs)
4622
4623 def Pending(*args, **kwargs):
4624 """
4625 Pending() -> bool
4626
4627 Returns True if there are unprocessed events in the event queue.
4628 """
4629 return _core.PyApp_Pending(*args, **kwargs)
4630
4631 def Dispatch(*args, **kwargs):
4632 """
4633 Dispatch() -> bool
4634
4635 Process the first event in the event queue (blocks until an event
4636 appears if there are none currently)
4637 """
4638 return _core.PyApp_Dispatch(*args, **kwargs)
4639
4640 def ProcessIdle(*args, **kwargs):
4641 """
4642 ProcessIdle() -> bool
4643
4644 Called from the MainLoop when the application becomes idle and sends an
4645 IdleEvent to all interested parties. Returns True is more idle events are
4646 needed, False if not.
4647 """
4648 return _core.PyApp_ProcessIdle(*args, **kwargs)
4649
4650 def SendIdleEvents(*args, **kwargs):
4651 """
4652 SendIdleEvents(Window win, IdleEvent event) -> bool
4653
4654 Send idle event to window and all subwindows. Returns True if more idle time
4655 is requested.
4656 """
4657 return _core.PyApp_SendIdleEvents(*args, **kwargs)
4658
4659 def IsActive(*args, **kwargs):
4660 """
4661 IsActive() -> bool
4662
4663 Return True if our app has focus.
4664 """
4665 return _core.PyApp_IsActive(*args, **kwargs)
4666
4667 def SetTopWindow(*args, **kwargs):
4668 """
4669 SetTopWindow(Window win)
4670
4671 Set the "main" top level window
4672 """
4673 return _core.PyApp_SetTopWindow(*args, **kwargs)
4674
4675 def GetTopWindow(*args, **kwargs):
4676 """
4677 GetTopWindow() -> Window
4678
4679 Return the "main" top level window (if it hadn't been set previously with
4680 SetTopWindow(), will return just some top level window and, if there not any,
4681 will return None)
4682 """
4683 return _core.PyApp_GetTopWindow(*args, **kwargs)
4684
4685 def SetExitOnFrameDelete(*args, **kwargs):
4686 """
4687 SetExitOnFrameDelete(bool flag)
4688
4689 Control the exit behaviour: by default, the program will exit the main loop
4690 (and so, usually, terminate) when the last top-level program window is
4691 deleted. Beware that if you disable this behaviour (with
4692 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly
4693 from somewhere.
4694
4695 """
4696 return _core.PyApp_SetExitOnFrameDelete(*args, **kwargs)
4697
4698 def GetExitOnFrameDelete(*args, **kwargs):
4699 """
4700 GetExitOnFrameDelete() -> bool
4701
4702 Get the current exit behaviour setting.
4703 """
4704 return _core.PyApp_GetExitOnFrameDelete(*args, **kwargs)
4705
4706 def SetUseBestVisual(*args, **kwargs):
4707 """
4708 SetUseBestVisual(bool flag)
4709
4710 Set whether the app should try to use the best available visual on systems
4711 where more than one is available, (Sun, SGI, XFree86 4, etc.)
4712 """
4713 return _core.PyApp_SetUseBestVisual(*args, **kwargs)
4714
4715 def GetUseBestVisual(*args, **kwargs):
4716 """
4717 GetUseBestVisual() -> bool
4718
4719 Get current UseBestVisual setting.
4720 """
4721 return _core.PyApp_GetUseBestVisual(*args, **kwargs)
4722
4723 def SetPrintMode(*args, **kwargs):
4724 """SetPrintMode(int mode)"""
4725 return _core.PyApp_SetPrintMode(*args, **kwargs)
4726
4727 def GetPrintMode(*args, **kwargs):
4728 """GetPrintMode() -> int"""
4729 return _core.PyApp_GetPrintMode(*args, **kwargs)
4730
4731 def SetAssertMode(*args, **kwargs):
4732 """
4733 SetAssertMode(int mode)
4734
4735 Set the OnAssert behaviour for debug and hybrid builds. The following flags
4736 may be or'd together:
4737
4738 wx.PYAPP_ASSERT_SUPPRESS Don't do anything
4739 wx.PYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default)
4740 wx.PYAPP_ASSERT_DIALOG Display a message dialog
4741 wx.PYAPP_ASSERT_LOG Write the assertion info to the wx.Log
4742
4743 """
4744 return _core.PyApp_SetAssertMode(*args, **kwargs)
4745
4746 def GetAssertMode(*args, **kwargs):
4747 """
4748 GetAssertMode() -> int
4749
4750 Get the current OnAssert behaviour setting.
4751 """
4752 return _core.PyApp_GetAssertMode(*args, **kwargs)
4753
4754 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
4755 """GetMacSupportPCMenuShortcuts() -> bool"""
4756 return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
4757
4758 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
4759 def GetMacAboutMenuItemId(*args, **kwargs):
4760 """GetMacAboutMenuItemId() -> long"""
4761 return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
4762
4763 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
4764 def GetMacPreferencesMenuItemId(*args, **kwargs):
4765 """GetMacPreferencesMenuItemId() -> long"""
4766 return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
4767
4768 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
4769 def GetMacExitMenuItemId(*args, **kwargs):
4770 """GetMacExitMenuItemId() -> long"""
4771 return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs)
4772
4773 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
4774 def GetMacHelpMenuTitleName(*args, **kwargs):
4775 """GetMacHelpMenuTitleName() -> String"""
4776 return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
4777
4778 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
4779 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
4780 """SetMacSupportPCMenuShortcuts(bool val)"""
4781 return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
4782
4783 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
4784 def SetMacAboutMenuItemId(*args, **kwargs):
4785 """SetMacAboutMenuItemId(long val)"""
4786 return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
4787
4788 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
4789 def SetMacPreferencesMenuItemId(*args, **kwargs):
4790 """SetMacPreferencesMenuItemId(long val)"""
4791 return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
4792
4793 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
4794 def SetMacExitMenuItemId(*args, **kwargs):
4795 """SetMacExitMenuItemId(long val)"""
4796 return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs)
4797
4798 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
4799 def SetMacHelpMenuTitleName(*args, **kwargs):
4800 """SetMacHelpMenuTitleName(String val)"""
4801 return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
4802
4803 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
4804 def _BootstrapApp(*args, **kwargs):
4805 """
4806 _BootstrapApp()
4807
4808 For internal use only
4809 """
4810 return _core.PyApp__BootstrapApp(*args, **kwargs)
4811
4812 def GetComCtl32Version(*args, **kwargs):
4813 """
4814 GetComCtl32Version() -> int
4815
4816 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
4817 0 if it wasn't found at all. Raises an exception on non-Windows
4818 platforms.
4819 """
4820 return _core.PyApp_GetComCtl32Version(*args, **kwargs)
4821
4822 GetComCtl32Version = staticmethod(GetComCtl32Version)
4823
4824 class PyAppPtr(PyApp):
4825 def __init__(self, this):
4826 self.this = this
4827 if not hasattr(self,"thisown"): self.thisown = 0
4828 self.__class__ = PyApp
4829 _core.PyApp_swigregister(PyAppPtr)
4830
4831 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
4832 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
4833 return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
4834
4835 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
4836 """PyApp_GetMacAboutMenuItemId() -> long"""
4837 return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
4838
4839 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
4840 """PyApp_GetMacPreferencesMenuItemId() -> long"""
4841 return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
4842
4843 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
4844 """PyApp_GetMacExitMenuItemId() -> long"""
4845 return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs)
4846
4847 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
4848 """PyApp_GetMacHelpMenuTitleName() -> String"""
4849 return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
4850
4851 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
4852 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
4853 return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
4854
4855 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
4856 """PyApp_SetMacAboutMenuItemId(long val)"""
4857 return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
4858
4859 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
4860 """PyApp_SetMacPreferencesMenuItemId(long val)"""
4861 return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
4862
4863 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
4864 """PyApp_SetMacExitMenuItemId(long val)"""
4865 return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs)
4866
4867 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
4868 """PyApp_SetMacHelpMenuTitleName(String val)"""
4869 return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
4870
4871 def PyApp_GetComCtl32Version(*args, **kwargs):
4872 """
4873 PyApp_GetComCtl32Version() -> int
4874
4875 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
4876 0 if it wasn't found at all. Raises an exception on non-Windows
4877 platforms.
4878 """
4879 return _core.PyApp_GetComCtl32Version(*args, **kwargs)
4880
4881 #---------------------------------------------------------------------------
4882
4883
4884 def Exit(*args, **kwargs):
4885 """
4886 Exit()
4887
4888 Force an exit of the application. Convenience for wx.GetApp().Exit()
4889 """
4890 return _core.Exit(*args, **kwargs)
4891
4892 def Yield(*args, **kwargs):
4893 """
4894 Yield() -> bool
4895
4896 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
4897 """
4898 return _core.Yield(*args, **kwargs)
4899
4900 def YieldIfNeeded(*args, **kwargs):
4901 """
4902 YieldIfNeeded() -> bool
4903
4904 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
4905 """
4906 return _core.YieldIfNeeded(*args, **kwargs)
4907
4908 def SafeYield(*args, **kwargs):
4909 """
4910 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
4911
4912 This function is similar to wx.Yield, except that it disables the user input
4913 to all program windows before calling wx.Yield and re-enables it again
4914 afterwards. If win is not None, this window will remain enabled, allowing the
4915 implementation of some limited user interaction.
4916
4917 Returns the result of the call to wx.Yield.
4918 """
4919 return _core.SafeYield(*args, **kwargs)
4920
4921 def WakeUpIdle(*args, **kwargs):
4922 """
4923 WakeUpIdle()
4924
4925 Cause the message queue to become empty again, so idle events will be sent.
4926 """
4927 return _core.WakeUpIdle(*args, **kwargs)
4928
4929 def PostEvent(*args, **kwargs):
4930 """
4931 PostEvent(EvtHandler dest, Event event)
4932
4933 Send an event to a window or other wx.EvtHandler to be processed later.
4934 """
4935 return _core.PostEvent(*args, **kwargs)
4936
4937 def App_CleanUp(*args, **kwargs):
4938 """
4939 App_CleanUp()
4940
4941 For internal use only, it is used to cleanup after wxWindows when Python shuts down.
4942 """
4943 return _core.App_CleanUp(*args, **kwargs)
4944
4945 def GetApp(*args, **kwargs):
4946 """
4947 GetApp() -> PyApp
4948
4949 Return a reference to the current wx.App object.
4950 """
4951 return _core.GetApp(*args, **kwargs)
4952 #----------------------------------------------------------------------
4953
4954 class PyOnDemandOutputWindow:
4955 """
4956 A class that can be used for redirecting Python's stdout and
4957 stderr streams. It will do nothing until something is wrriten to
4958 the stream at which point it will create a Frame with a text area
4959 and write the text there.
4960 """
4961 def __init__(self, title = "wxPython: stdout/stderr"):
4962 self.frame = None
4963 self.title = title
4964 self.parent = None
4965
4966 def SetParent(self, parent):
4967 """Set the window to be used as the popup Frame's parent."""
4968 self.parent = parent
4969
4970
4971 def CreateOutputWindow(self, st):
4972 self.frame = wx.Frame(self.parent, -1, self.title,
4973 style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
4974 self.text = wx.TextCtrl(self.frame, -1, "",
4975 style = wx.TE_MULTILINE | wx.TE_READONLY)
4976 self.text.AppendText(st)
4977 self.frame.SetSize((450, 300))
4978 self.frame.Show(True)
4979 EVT_CLOSE(self.frame, self.OnCloseWindow)
4980
4981
4982 def OnCloseWindow(self, event):
4983 if self.frame is not None:
4984 self.frame.Destroy()
4985 self.frame = None
4986 self.text = None
4987
4988
4989 # These methods provide the file-like output behaviour.
4990 def write(self, text):
4991 """
4992 Create the output window if needed and write the string to it.
4993 If not called in the context of the gui thread then uses
4994 CallAfter to do the work there.
4995 """
4996 if self.frame is None:
4997 if not wx.Thread_IsMain():
4998 wx.CallAfter(self.CreateOutputWindow, text)
4999 else:
5000 self.CreateOutputWindow(text)
5001 else:
5002 if not wx.Thread_IsMain():
5003 wx.CallAfter(self.text.AppendText, text)
5004 else:
5005 self.text.AppendText(text)
5006
5007
5008 def close(self):
5009 if self.frame is not None:
5010 wx.CallAfter(self.frame.Close)
5011
5012
5013
5014 #----------------------------------------------------------------------
5015
5016 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5017
5018 class App(wx.PyApp):
5019 """
5020 The main application class. Derive from this and implement an OnInit
5021 method that creates a frame and then calls self.SetTopWindow(frame)
5022 """
5023 outputWindowClass = PyOnDemandOutputWindow
5024
5025 def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False):
5026 wx.PyApp.__init__(self)
5027
5028 if wx.Platform == "__WXMAC__":
5029 try:
5030 import MacOS
5031 if not MacOS.WMAvailable():
5032 print """\
5033 This program needs access to the screen. Please run with 'pythonw',
5034 not 'python', and only when you are logged in on the main display of
5035 your Mac."""
5036 _sys.exit(1)
5037 except:
5038 pass
5039
5040 # This has to be done before OnInit
5041 self.SetUseBestVisual(useBestVisual)
5042
5043 # Set the default handler for SIGINT. This fixes a problem
5044 # where if Ctrl-C is pressed in the console that started this
5045 # app then it will not appear to do anything, (not even send
5046 # KeyboardInterrupt???) but will later segfault on exit. By
5047 # setting the default handler then the app will exit, as
5048 # expected (depending on platform.)
5049 try:
5050 import signal
5051 signal.signal(signal.SIGINT, signal.SIG_DFL)
5052 except:
5053 pass
5054
5055 # Save and redirect the stdio to a window?
5056 self.stdioWin = None
5057 self.saveStdio = (_sys.stdout, _sys.stderr)
5058 if redirect:
5059 self.RedirectStdio(filename)
5060
5061 # This finishes the initialization of wxWindows and then calls
5062 # the OnInit that should be present in the derived class
5063 self._BootstrapApp()
5064
5065
5066 def __del__(self):
5067 try:
5068 self.RestoreStdio() # Just in case the MainLoop was overridden
5069 except:
5070 pass
5071
5072
5073 def SetTopWindow(self, frame):
5074 """Set the \"main\" top level window"""
5075 if self.stdioWin:
5076 self.stdioWin.SetParent(frame)
5077 wx.PyApp.SetTopWindow(self, frame)
5078
5079
5080 def MainLoop(self):
5081 """Execute the main GUI event loop"""
5082 wx.PyApp.MainLoop(self)
5083 self.RestoreStdio()
5084
5085
5086 def RedirectStdio(self, filename=None):
5087 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5088 if filename:
5089 _sys.stdout = _sys.stderr = open(filename, 'a')
5090 else:
5091 self.stdioWin = self.outputWindowClass()
5092 _sys.stdout = _sys.stderr = self.stdioWin
5093
5094
5095 def RestoreStdio(self):
5096 _sys.stdout, _sys.stderr = self.saveStdio
5097
5098
5099
5100 # change from wxPyApp_ to wxApp_
5101 App_GetMacSupportPCMenuShortcuts = _core.PyApp_GetMacSupportPCMenuShortcuts
5102 App_GetMacAboutMenuItemId = _core.PyApp_GetMacAboutMenuItemId
5103 App_GetMacPreferencesMenuItemId = _core.PyApp_GetMacPreferencesMenuItemId
5104 App_GetMacExitMenuItemId = _core.PyApp_GetMacExitMenuItemId
5105 App_GetMacHelpMenuTitleName = _core.PyApp_GetMacHelpMenuTitleName
5106 App_SetMacSupportPCMenuShortcuts = _core.PyApp_SetMacSupportPCMenuShortcuts
5107 App_SetMacAboutMenuItemId = _core.PyApp_SetMacAboutMenuItemId
5108 App_SetMacPreferencesMenuItemId = _core.PyApp_SetMacPreferencesMenuItemId
5109 App_SetMacExitMenuItemId = _core.PyApp_SetMacExitMenuItemId
5110 App_SetMacHelpMenuTitleName = _core.PyApp_SetMacHelpMenuTitleName
5111 App_GetComCtl32Version = _core.PyApp_GetComCtl32Version
5112
5113 #----------------------------------------------------------------------------
5114
5115 class PySimpleApp(wx.App):
5116 """
5117 A simple application class. You can just create one of these and
5118 then then make your top level windows later, and not have to worry
5119 about OnInit."""
5120
5121 def __init__(self, redirect=False, filename=None, useBestVisual=False):
5122 wx.App.__init__(self, redirect, filename, useBestVisual)
5123
5124 def OnInit(self):
5125 wx.InitAllImageHandlers()
5126 return True
5127
5128
5129 # Is anybody using this one?
5130 class PyWidgetTester(wx.App):
5131 def __init__(self, size = (250, 100)):
5132 self.size = size
5133 wx.App.__init__(self, 0)
5134
5135 def OnInit(self):
5136 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5137 self.SetTopWindow(self.frame)
5138 return True
5139
5140 def SetWidget(self, widgetClass, *args):
5141 w = widgetClass(self.frame, *args)
5142 self.frame.Show(True)
5143
5144 #----------------------------------------------------------------------------
5145 # DO NOT hold any other references to this object. This is how we
5146 # know when to cleanup system resources that wxWin is holding. When
5147 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5148 # goes to zero and it calls the wxApp_CleanUp function.
5149
5150 class __wxPyCleanup:
5151 def __init__(self):
5152 self.cleanup = _core.App_CleanUp
5153 def __del__(self):
5154 self.cleanup()
5155
5156 _sys.__wxPythonCleanup = __wxPyCleanup()
5157
5158 ## # another possible solution, but it gets called too early...
5159 ## if sys.version[0] == '2':
5160 ## import atexit
5161 ## atexit.register(_core.wxApp_CleanUp)
5162 ## else:
5163 ## sys.exitfunc = _core.wxApp_CleanUp
5164
5165
5166 #----------------------------------------------------------------------------
5167
5168 #---------------------------------------------------------------------------
5169
5170 class AcceleratorEntry(object):
5171 def __repr__(self):
5172 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5173 def __init__(self, *args, **kwargs):
5174 """__init__(int flags=0, int keyCode=0, int cmd=0, MenuItem item=None) -> AcceleratorEntry"""
5175 newobj = _core.new_AcceleratorEntry(*args, **kwargs)
5176 self.this = newobj.this
5177 self.thisown = 1
5178 del newobj.thisown
5179 def __del__(self, destroy=_core.delete_AcceleratorEntry):
5180 """__del__()"""
5181 try:
5182 if self.thisown: destroy(self)
5183 except: pass
5184
5185 def Set(*args, **kwargs):
5186 """Set(int flags, int keyCode, int cmd, MenuItem item=None)"""
5187 return _core.AcceleratorEntry_Set(*args, **kwargs)
5188
5189 def SetMenuItem(*args, **kwargs):
5190 """SetMenuItem(MenuItem item)"""
5191 return _core.AcceleratorEntry_SetMenuItem(*args, **kwargs)
5192
5193 def GetMenuItem(*args, **kwargs):
5194 """GetMenuItem() -> MenuItem"""
5195 return _core.AcceleratorEntry_GetMenuItem(*args, **kwargs)
5196
5197 def GetFlags(*args, **kwargs):
5198 """GetFlags() -> int"""
5199 return _core.AcceleratorEntry_GetFlags(*args, **kwargs)
5200
5201 def GetKeyCode(*args, **kwargs):
5202 """GetKeyCode() -> int"""
5203 return _core.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5204
5205 def GetCommand(*args, **kwargs):
5206 """GetCommand() -> int"""
5207 return _core.AcceleratorEntry_GetCommand(*args, **kwargs)
5208
5209
5210 class AcceleratorEntryPtr(AcceleratorEntry):
5211 def __init__(self, this):
5212 self.this = this
5213 if not hasattr(self,"thisown"): self.thisown = 0
5214 self.__class__ = AcceleratorEntry
5215 _core.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5216
5217 class AcceleratorTable(Object):
5218 def __repr__(self):
5219 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5220 def __init__(self, *args, **kwargs):
5221 """
5222 __init__(entries) -> AcceleratorTable
5223
5224 Construct an AcceleratorTable from a list of AcceleratorEntry items or
5225 3-tuples (flags, keyCode, cmdID)
5226 """
5227 newobj = _core.new_AcceleratorTable(*args, **kwargs)
5228 self.this = newobj.this
5229 self.thisown = 1
5230 del newobj.thisown
5231 def __del__(self, destroy=_core.delete_AcceleratorTable):
5232 """__del__()"""
5233 try:
5234 if self.thisown: destroy(self)
5235 except: pass
5236
5237 def Ok(*args, **kwargs):
5238 """Ok() -> bool"""
5239 return _core.AcceleratorTable_Ok(*args, **kwargs)
5240
5241
5242 class AcceleratorTablePtr(AcceleratorTable):
5243 def __init__(self, this):
5244 self.this = this
5245 if not hasattr(self,"thisown"): self.thisown = 0
5246 self.__class__ = AcceleratorTable
5247 _core.AcceleratorTable_swigregister(AcceleratorTablePtr)
5248
5249
5250 def GetAccelFromString(*args, **kwargs):
5251 """GetAccelFromString(String label) -> AcceleratorEntry"""
5252 return _core.GetAccelFromString(*args, **kwargs)
5253 #---------------------------------------------------------------------------
5254
5255 class VisualAttributes(object):
5256 """struct containing all the visual attributes of a control"""
5257 def __repr__(self):
5258 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5259 def __init__(self, *args, **kwargs):
5260 """
5261 __init__() -> VisualAttributes
5262
5263 struct containing all the visual attributes of a control
5264 """
5265 newobj = _core.new_VisualAttributes(*args, **kwargs)
5266 self.this = newobj.this
5267 self.thisown = 1
5268 del newobj.thisown
5269 def __del__(self, destroy=_core.delete_VisualAttributes):
5270 """__del__()"""
5271 try:
5272 if self.thisown: destroy(self)
5273 except: pass
5274
5275 font = property(_core.VisualAttributes_font_get, _core.VisualAttributes_font_set)
5276 colFg = property(_core.VisualAttributes_colFg_get, _core.VisualAttributes_colFg_set)
5277 colBg = property(_core.VisualAttributes_colBg_get, _core.VisualAttributes_colBg_set)
5278
5279 class VisualAttributesPtr(VisualAttributes):
5280 def __init__(self, this):
5281 self.this = this
5282 if not hasattr(self,"thisown"): self.thisown = 0
5283 self.__class__ = VisualAttributes
5284 _core.VisualAttributes_swigregister(VisualAttributesPtr)
5285 NullAcceleratorTable = cvar.NullAcceleratorTable
5286 PanelNameStr = cvar.PanelNameStr
5287
5288 WINDOW_VARIANT_NORMAL = _core.WINDOW_VARIANT_NORMAL
5289 WINDOW_VARIANT_SMALL = _core.WINDOW_VARIANT_SMALL
5290 WINDOW_VARIANT_MINI = _core.WINDOW_VARIANT_MINI
5291 WINDOW_VARIANT_LARGE = _core.WINDOW_VARIANT_LARGE
5292 WINDOW_VARIANT_MAX = _core.WINDOW_VARIANT_MAX
5293 class Window(EvtHandler):
5294 """
5295 wx.Window is the base class for all windows and represents any visible
5296 object on the screen. All controls, top level windows and so on are
5297 wx.Windows. Sizers and device contexts are not however, as they don't
5298 appear on screen themselves.
5299
5300 """
5301 def __repr__(self):
5302 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5303 def __init__(self, *args, **kwargs):
5304 """
5305 __init__(Window parent, int id=-1, Point pos=DefaultPosition,
5306 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5307
5308 Construct and show a generic Window.
5309 """
5310 newobj = _core.new_Window(*args, **kwargs)
5311 self.this = newobj.this
5312 self.thisown = 1
5313 del newobj.thisown
5314 self._setOORInfo(self)
5315
5316 def Create(*args, **kwargs):
5317 """
5318 Create(Window parent, int id=-1, Point pos=DefaultPosition,
5319 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5320
5321 Create the GUI part of the Window for 2-phase creation mode.
5322 """
5323 return _core.Window_Create(*args, **kwargs)
5324
5325 def Close(*args, **kwargs):
5326 """
5327 Close(bool force=False) -> bool
5328
5329 This function simply generates a EVT_CLOSE event whose handler usually
5330 tries to close the window. It doesn't close the window itself,
5331 however. If force is False (the default) then the window's close
5332 handler will be allowed to veto the destruction of the window.
5333
5334 Usually Close is only used with the top level windows (wx.Frame and
5335 wx.Dialog classes) as the others are not supposed to have any special
5336 EVT_CLOSE logic.
5337
5338 The close handler should check whether the window is being deleted
5339 forcibly, using wx.CloseEvent.GetForce, in which case it should
5340 destroy the window using wx.Window.Destroy.
5341
5342 Note that calling Close does not guarantee that the window will be
5343 destroyed; but it provides a way to simulate a manual close of a
5344 window, which may or may not be implemented by destroying the
5345 window. The default EVT_CLOSE handler for wx.Dialog does not
5346 necessarily delete the dialog, since it will simply simulate an
5347 wxID_CANCEL event which is handled by the appropriate button event
5348 handler and may do anything at all.
5349
5350 To guarantee that the window will be destroyed, call wx.Window.Destroy
5351 instead.
5352 """
5353 return _core.Window_Close(*args, **kwargs)
5354
5355 def Destroy(*args, **kwargs):
5356 """
5357 Destroy() -> bool
5358
5359 Destroys the window safely. Frames and dialogs are not destroyed
5360 immediately when this function is called -- they are added to a list
5361 of windows to be deleted on idle time, when all the window's events
5362 have been processed. This prevents problems with events being sent to
5363 non-existent windows.
5364
5365 Returns True if the window has either been successfully deleted, or it
5366 has been added to the list of windows pending real deletion.
5367 """
5368 return _core.Window_Destroy(*args, **kwargs)
5369
5370 def DestroyChildren(*args, **kwargs):
5371 """
5372 DestroyChildren() -> bool
5373
5374 Destroys all children of a window. Called automatically by the destructor.
5375 """
5376 return _core.Window_DestroyChildren(*args, **kwargs)
5377
5378 def IsBeingDeleted(*args, **kwargs):
5379 """
5380 IsBeingDeleted() -> bool
5381
5382 Is the window in the process of being deleted?
5383 """
5384 return _core.Window_IsBeingDeleted(*args, **kwargs)
5385
5386 def SetTitle(*args, **kwargs):
5387 """
5388 SetTitle(String title)
5389
5390 Sets the window's title. Applicable only to frames and dialogs.
5391 """
5392 return _core.Window_SetTitle(*args, **kwargs)
5393
5394 def GetTitle(*args, **kwargs):
5395 """
5396 GetTitle() -> String
5397
5398 Gets the window's title. Applicable only to frames and dialogs.
5399 """
5400 return _core.Window_GetTitle(*args, **kwargs)
5401
5402 def SetLabel(*args, **kwargs):
5403 """
5404 SetLabel(String label)
5405
5406 Set the text which the window shows in its label if applicable.
5407 """
5408 return _core.Window_SetLabel(*args, **kwargs)
5409
5410 def GetLabel(*args, **kwargs):
5411 """
5412 GetLabel() -> String
5413
5414 Generic way of getting a label from any window, for
5415 identification purposes. The interpretation of this function
5416 differs from class to class. For frames and dialogs, the value
5417 returned is the title. For buttons or static text controls, it is
5418 the button text. This function can be useful for meta-programs
5419 such as testing tools or special-needs access programs)which
5420 need to identify windows by name.
5421 """
5422 return _core.Window_GetLabel(*args, **kwargs)
5423
5424 def SetName(*args, **kwargs):
5425 """
5426 SetName(String name)
5427
5428 Sets the window's name. The window name is used for ressource
5429 setting in X, it is not the same as the window title/label
5430 """
5431 return _core.Window_SetName(*args, **kwargs)
5432
5433 def GetName(*args, **kwargs):
5434 """
5435 GetName() -> String
5436
5437 Returns the windows name. This name is not guaranteed to be
5438 unique; it is up to the programmer to supply an appropriate name
5439 in the window constructor or via wx.Window.SetName.
5440 """
5441 return _core.Window_GetName(*args, **kwargs)
5442
5443 def SetWindowVariant(*args, **kwargs):
5444 """
5445 SetWindowVariant(int variant)
5446
5447 Sets the variant of the window/font size to use for this window,
5448 if the platform supports variants, for example, wxMac. Variant values are:
5449
5450 wx.WINDOW_VARIANT_NORMAL Normal size
5451 wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal)
5452 wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal)
5453 wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal)
5454
5455 """
5456 return _core.Window_SetWindowVariant(*args, **kwargs)
5457
5458 def GetWindowVariant(*args, **kwargs):
5459 """GetWindowVariant() -> int"""
5460 return _core.Window_GetWindowVariant(*args, **kwargs)
5461
5462 def SetId(*args, **kwargs):
5463 """
5464 SetId(int winid)
5465
5466 Sets the identifier of the window. Each window has an integer
5467 identifier. If the application has not provided one, an identifier
5468 will be generated. Normally, the identifier should be provided on
5469 creation and should not be modified subsequently.
5470 """
5471 return _core.Window_SetId(*args, **kwargs)
5472
5473 def GetId(*args, **kwargs):
5474 """
5475 GetId() -> int
5476
5477 Returns the identifier of the window. Each window has an integer
5478 identifier. If the application has not provided one (or the default Id
5479 -1 is used) then an unique identifier with a negative value will be
5480 generated.
5481 """
5482 return _core.Window_GetId(*args, **kwargs)
5483
5484 def NewControlId(*args, **kwargs):
5485 """
5486 NewControlId() -> int
5487
5488 Generate a control id for the controls which were not given one.
5489 """
5490 return _core.Window_NewControlId(*args, **kwargs)
5491
5492 NewControlId = staticmethod(NewControlId)
5493 def NextControlId(*args, **kwargs):
5494 """
5495 NextControlId(int winid) -> int
5496
5497 Get the id of the control following the one with the given
5498 (autogenerated) id
5499 """
5500 return _core.Window_NextControlId(*args, **kwargs)
5501
5502 NextControlId = staticmethod(NextControlId)
5503 def PrevControlId(*args, **kwargs):
5504 """
5505 PrevControlId(int winid) -> int
5506
5507 Get the id of the control preceding the one with the given
5508 (autogenerated) id
5509 """
5510 return _core.Window_PrevControlId(*args, **kwargs)
5511
5512 PrevControlId = staticmethod(PrevControlId)
5513 def SetSize(*args, **kwargs):
5514 """
5515 SetSize(Size size)
5516
5517 Sets the size of the window in pixels.
5518 """
5519 return _core.Window_SetSize(*args, **kwargs)
5520
5521 def SetDimensions(*args, **kwargs):
5522 """
5523 SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
5524
5525 Sets the position and size of the window in pixels. The sizeFlags
5526 parameter indicates the interpretation of the other params if they are
5527 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
5528 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
5529 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
5530 dimensions of -1 and less to be interpreted as real dimensions, not
5531 default values.
5532 """
5533 return _core.Window_SetDimensions(*args, **kwargs)
5534
5535 def SetRect(*args, **kwargs):
5536 """
5537 SetRect(Rect rect, int sizeFlags=SIZE_AUTO)
5538
5539 Sets the position and size of the window in pixels using a wx.Rect.
5540 """
5541 return _core.Window_SetRect(*args, **kwargs)
5542
5543 def SetSizeWH(*args, **kwargs):
5544 """
5545 SetSizeWH(int width, int height)
5546
5547 Sets the size of the window in pixels.
5548 """
5549 return _core.Window_SetSizeWH(*args, **kwargs)
5550
5551 def Move(*args, **kwargs):
5552 """
5553 Move(Point pt, int flags=SIZE_USE_EXISTING)
5554
5555 Moves the window to the given position.
5556 """
5557 return _core.Window_Move(*args, **kwargs)
5558
5559 SetPosition = Move
5560 def MoveXY(*args, **kwargs):
5561 """
5562 MoveXY(int x, int y, int flags=SIZE_USE_EXISTING)
5563
5564 Moves the window to the given position.
5565 """
5566 return _core.Window_MoveXY(*args, **kwargs)
5567
5568 def Raise(*args, **kwargs):
5569 """
5570 Raise()
5571
5572 Raises the window to the top of the window hierarchy if it is a
5573 managed window (dialog or frame).
5574 """
5575 return _core.Window_Raise(*args, **kwargs)
5576
5577 def Lower(*args, **kwargs):
5578 """
5579 Lower()
5580
5581 Lowers the window to the bottom of the window hierarchy if it is a
5582 managed window (dialog or frame).
5583 """
5584 return _core.Window_Lower(*args, **kwargs)
5585
5586 def SetClientSize(*args, **kwargs):
5587 """
5588 SetClientSize(Size size)
5589
5590 This sets the size of the window client area in pixels. Using this
5591 function to size a window tends to be more device-independent than
5592 wx.Window.SetSize, since the application need not worry about what
5593 dimensions the border or title bar have when trying to fit the window
5594 around panel items, for example.
5595 """
5596 return _core.Window_SetClientSize(*args, **kwargs)
5597
5598 def SetClientSizeWH(*args, **kwargs):
5599 """
5600 SetClientSizeWH(int width, int height)
5601
5602 This sets the size of the window client area in pixels. Using this
5603 function to size a window tends to be more device-independent than
5604 wx.Window.SetSize, since the application need not worry about what
5605 dimensions the border or title bar have when trying to fit the window
5606 around panel items, for example.
5607 """
5608 return _core.Window_SetClientSizeWH(*args, **kwargs)
5609
5610 def SetClientRect(*args, **kwargs):
5611 """
5612 SetClientRect(Rect rect)
5613
5614 This sets the size of the window client area in pixels. Using this
5615 function to size a window tends to be more device-independent than
5616 wx.Window.SetSize, since the application need not worry about what
5617 dimensions the border or title bar have when trying to fit the window
5618 around panel items, for example.
5619 """
5620 return _core.Window_SetClientRect(*args, **kwargs)
5621
5622 def GetPosition(*args, **kwargs):
5623 """
5624 GetPosition() -> Point
5625
5626 Get the window's position.
5627 """
5628 return _core.Window_GetPosition(*args, **kwargs)
5629
5630 def GetPositionTuple(*args, **kwargs):
5631 """
5632 GetPositionTuple() -> (x,y)
5633
5634 Get the window's position.
5635 """
5636 return _core.Window_GetPositionTuple(*args, **kwargs)
5637
5638 def GetSize(*args, **kwargs):
5639 """
5640 GetSize() -> Size
5641
5642 Get the window size.
5643 """
5644 return _core.Window_GetSize(*args, **kwargs)
5645
5646 def GetSizeTuple(*args, **kwargs):
5647 """
5648 GetSizeTuple() -> (width, height)
5649
5650 Get the window size.
5651 """
5652 return _core.Window_GetSizeTuple(*args, **kwargs)
5653
5654 def GetRect(*args, **kwargs):
5655 """
5656 GetRect() -> Rect
5657
5658 Returns the size and position of the window as a wx.Rect object.
5659 """
5660 return _core.Window_GetRect(*args, **kwargs)
5661
5662 def GetClientSize(*args, **kwargs):
5663 """
5664 GetClientSize() -> Size
5665
5666 This gets the size of the window's 'client area' in pixels. The client
5667 area is the area which may be drawn on by the programmer, excluding
5668 title bar, border, scrollbars, etc.
5669 """
5670 return _core.Window_GetClientSize(*args, **kwargs)
5671
5672 def GetClientSizeTuple(*args, **kwargs):
5673 """
5674 GetClientSizeTuple() -> (width, height)
5675
5676 This gets the size of the window's 'client area' in pixels. The client
5677 area is the area which may be drawn on by the programmer, excluding
5678 title bar, border, scrollbars, etc.
5679 """
5680 return _core.Window_GetClientSizeTuple(*args, **kwargs)
5681
5682 def GetClientAreaOrigin(*args, **kwargs):
5683 """
5684 GetClientAreaOrigin() -> Point
5685
5686 Get the origin of the client area of the window relative to the
5687 window's top left corner (the client area may be shifted because of
5688 the borders, scrollbars, other decorations...)
5689 """
5690 return _core.Window_GetClientAreaOrigin(*args, **kwargs)
5691
5692 def GetClientRect(*args, **kwargs):
5693 """
5694 GetClientRect() -> Rect
5695
5696 Get the client area position and size as a wx.Rect object.
5697 """
5698 return _core.Window_GetClientRect(*args, **kwargs)
5699
5700 def GetBestSize(*args, **kwargs):
5701 """
5702 GetBestSize() -> Size
5703
5704 This functions returns the best acceptable minimal size for the
5705 window, if applicable. For example, for a static text control, it will be
5706 the minimal size such that the control label is not truncated. For
5707 windows containing subwindows (suzh aswx.Panel), the size returned
5708 by this function will be the same as the size the window would have
5709 had after calling Fit.
5710 """
5711 return _core.Window_GetBestSize(*args, **kwargs)
5712
5713 def GetBestSizeTuple(*args, **kwargs):
5714 """
5715 GetBestSizeTuple() -> (width, height)
5716
5717 This functions returns the best acceptable minimal size for the
5718 window, if applicable. For example, for a static text control, it will be
5719 the minimal size such that the control label is not truncated. For
5720 windows containing subwindows (suzh aswx.Panel), the size returned
5721 by this function will be the same as the size the window would have
5722 had after calling Fit.
5723 """
5724 return _core.Window_GetBestSizeTuple(*args, **kwargs)
5725
5726 def GetAdjustedBestSize(*args, **kwargs):
5727 """
5728 GetAdjustedBestSize() -> Size
5729
5730 This method is similar to GetBestSize, except in one
5731 thing. GetBestSize should return the minimum untruncated size of the
5732 window, while this method will return the largest of BestSize and any
5733 user specified minimum size. ie. it is the minimum size the window
5734 should currently be drawn at, not the minimal size it can possibly
5735 tolerate.
5736 """
5737 return _core.Window_GetAdjustedBestSize(*args, **kwargs)
5738
5739 def Center(*args, **kwargs):
5740 """
5741 Center(int direction=BOTH)
5742
5743 Centers the window. The parameter specifies the direction for
5744 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
5745 also include wx.CENTER_ON_SCREEN flag if you want to center the window
5746 on the entire screen and not on its parent window. If it is a
5747 top-level window and has no parent then it will always be centered
5748 relative to the screen.
5749 """
5750 return _core.Window_Center(*args, **kwargs)
5751
5752 Centre = Center
5753 def CenterOnScreen(*args, **kwargs):
5754 """
5755 CenterOnScreen(int dir=BOTH)
5756
5757 Center on screen (only works for top level windows)
5758 """
5759 return _core.Window_CenterOnScreen(*args, **kwargs)
5760
5761 CentreOnScreen = CenterOnScreen
5762 def CenterOnParent(*args, **kwargs):
5763 """
5764 CenterOnParent(int dir=BOTH)
5765
5766 Center with respect to the the parent window
5767 """
5768 return _core.Window_CenterOnParent(*args, **kwargs)
5769
5770 CentreOnParent = CenterOnParent
5771 def Fit(*args, **kwargs):
5772 """
5773 Fit()
5774
5775 Sizes the window so that it fits around its subwindows. This function
5776 won't do anything if there are no subwindows and will only really work
5777 correctly if sizers are used for the subwindows layout. Also, if the
5778 window has exactly one subwindow it is better (faster and the result
5779 is more precise as Fit adds some margin to account for fuzziness of
5780 its calculations) to call window.SetClientSize(child.GetSize())
5781 instead of calling Fit.
5782 """
5783 return _core.Window_Fit(*args, **kwargs)
5784
5785 def FitInside(*args, **kwargs):
5786 """
5787 FitInside()
5788
5789 Similar to Fit, but sizes the interior (virtual) size of a
5790 window. Mainly useful with scrolled windows to reset scrollbars after
5791 sizing changes that do not trigger a size event, and/or scrolled
5792 windows without an interior sizer. This function similarly won't do
5793 anything if there are no subwindows.
5794 """
5795 return _core.Window_FitInside(*args, **kwargs)
5796
5797 def SetSizeHints(*args):
5798 """
5799 SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
5800 int incH=-1)
5801 SetSizeHints(Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
5802
5803 Allows specification of minimum and maximum window sizes, and window
5804 size increments. If a pair of values is not set (or set to -1), the
5805 default values will be used. If this function is called, the user
5806 will not be able to size the window outside the given bounds. The
5807 resizing increments are only significant under Motif or Xt.
5808 """
5809 return _core.Window_SetSizeHints(*args)
5810
5811 def SetVirtualSizeHints(*args):
5812 """
5813 SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1)
5814 SetVirtualSizeHints(Size minSize, Size maxSize=DefaultSize)
5815
5816 Allows specification of minimum and maximum virtual window sizes. If a
5817 pair of values is not set (or set to -1), the default values will be
5818 used. If this function is called, the user will not be able to size
5819 the virtual area of the window outside the given bounds.
5820 """
5821 return _core.Window_SetVirtualSizeHints(*args)
5822
5823 def GetMinWidth(*args, **kwargs):
5824 """GetMinWidth() -> int"""
5825 return _core.Window_GetMinWidth(*args, **kwargs)
5826
5827 def GetMinHeight(*args, **kwargs):
5828 """GetMinHeight() -> int"""
5829 return _core.Window_GetMinHeight(*args, **kwargs)
5830
5831 def GetMaxWidth(*args, **kwargs):
5832 """GetMaxWidth() -> int"""
5833 return _core.Window_GetMaxWidth(*args, **kwargs)
5834
5835 def GetMaxHeight(*args, **kwargs):
5836 """GetMaxHeight() -> int"""
5837 return _core.Window_GetMaxHeight(*args, **kwargs)
5838
5839 def GetMaxSize(*args, **kwargs):
5840 """GetMaxSize() -> Size"""
5841 return _core.Window_GetMaxSize(*args, **kwargs)
5842
5843 def GetMinSize(*args, **kwargs):
5844 """GetMinSize() -> Size"""
5845 return _core.Window_GetMinSize(*args, **kwargs)
5846
5847 def SetVirtualSize(*args, **kwargs):
5848 """
5849 SetVirtualSize(Size size)
5850
5851 Set the the virtual size of a window in pixels. For most windows this
5852 is just the client area of the window, but for some like scrolled
5853 windows it is more or less independent of the screen window size.
5854 """
5855 return _core.Window_SetVirtualSize(*args, **kwargs)
5856
5857 def SetVirtualSizeWH(*args, **kwargs):
5858 """
5859 SetVirtualSizeWH(int w, int h)
5860
5861 Set the the virtual size of a window in pixels. For most windows this
5862 is just the client area of the window, but for some like scrolled
5863 windows it is more or less independent of the screen window size.
5864 """
5865 return _core.Window_SetVirtualSizeWH(*args, **kwargs)
5866
5867 def GetVirtualSize(*args, **kwargs):
5868 """
5869 GetVirtualSize() -> Size
5870
5871 Get the the virtual size of the window in pixels. For most windows
5872 this is just the client area of the window, but for some like scrolled
5873 windows it is more or less independent of the screen window size.
5874 """
5875 return _core.Window_GetVirtualSize(*args, **kwargs)
5876
5877 def GetVirtualSizeTuple(*args, **kwargs):
5878 """
5879 GetVirtualSizeTuple() -> (width, height)
5880
5881 Get the the virtual size of the window in pixels. For most windows
5882 this is just the client area of the window, but for some like scrolled
5883 windows it is more or less independent of the screen window size.
5884 """
5885 return _core.Window_GetVirtualSizeTuple(*args, **kwargs)
5886
5887 def GetBestVirtualSize(*args, **kwargs):
5888 """
5889 GetBestVirtualSize() -> Size
5890
5891 Return the largest of ClientSize and BestSize (as determined by a
5892 sizer, interior children, or other means)
5893 """
5894 return _core.Window_GetBestVirtualSize(*args, **kwargs)
5895
5896 def Show(*args, **kwargs):
5897 """
5898 Show(bool show=True) -> bool
5899
5900 Shows or hides the window. You may need to call Raise for a top level
5901 window if you want to bring it to top, although this is not needed if
5902 Show is called immediately after the frame creation. Returns True if
5903 the window has been shown or hidden or False if nothing was done
5904 because it already was in the requested state.
5905 """
5906 return _core.Window_Show(*args, **kwargs)
5907
5908 def Hide(*args, **kwargs):
5909 """
5910 Hide() -> bool
5911
5912 Equivalent to calling Show(False).
5913 """
5914 return _core.Window_Hide(*args, **kwargs)
5915
5916 def Enable(*args, **kwargs):
5917 """
5918 Enable(bool enable=True) -> bool
5919
5920 Enable or disable the window for user input. Note that when a parent
5921 window is disabled, all of its children are disabled as well and they
5922 are reenabled again when the parent is. Returns true if the window
5923 has been enabled or disabled, false if nothing was done, i.e. if the
5924 window had already been in the specified state.
5925 """
5926 return _core.Window_Enable(*args, **kwargs)
5927
5928 def Disable(*args, **kwargs):
5929 """
5930 Disable() -> bool
5931
5932 Disables the window, same as Enable(false).
5933 """
5934 return _core.Window_Disable(*args, **kwargs)
5935
5936 def IsShown(*args, **kwargs):
5937 """
5938 IsShown() -> bool
5939
5940 Returns true if the window is shown, false if it has been hidden.
5941 """
5942 return _core.Window_IsShown(*args, **kwargs)
5943
5944 def IsEnabled(*args, **kwargs):
5945 """
5946 IsEnabled() -> bool
5947
5948 Returns true if the window is enabled for input, false otherwise.
5949 """
5950 return _core.Window_IsEnabled(*args, **kwargs)
5951
5952 def SetWindowStyleFlag(*args, **kwargs):
5953 """
5954 SetWindowStyleFlag(long style)
5955
5956 Sets the style of the window. Please note that some styles cannot be
5957 changed after the window creation and that Refresh() might be called
5958 after changing the others for the change to take place immediately.
5959 """
5960 return _core.Window_SetWindowStyleFlag(*args, **kwargs)
5961
5962 def GetWindowStyleFlag(*args, **kwargs):
5963 """
5964 GetWindowStyleFlag() -> long
5965
5966 Gets the window style that was passed to the constructor or Create
5967 method.
5968 """
5969 return _core.Window_GetWindowStyleFlag(*args, **kwargs)
5970
5971 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
5972 def HasFlag(*args, **kwargs):
5973 """
5974 HasFlag(int flag) -> bool
5975
5976 Test if the given style is set for this window.
5977 """
5978 return _core.Window_HasFlag(*args, **kwargs)
5979
5980 def IsRetained(*args, **kwargs):
5981 """
5982 IsRetained() -> bool
5983
5984 Returns true if the window is retained, false otherwise. Retained
5985 windows are only available on X platforms.
5986 """
5987 return _core.Window_IsRetained(*args, **kwargs)
5988
5989 def SetExtraStyle(*args, **kwargs):
5990 """
5991 SetExtraStyle(long exStyle)
5992
5993 Sets the extra style bits for the window. Extra styles are the less
5994 often used style bits which can't be set with the constructor or with
5995 SetWindowStyleFlag()
5996 """
5997 return _core.Window_SetExtraStyle(*args, **kwargs)
5998
5999 def GetExtraStyle(*args, **kwargs):
6000 """
6001 GetExtraStyle() -> long
6002
6003 Returns the extra style bits for the window.
6004 """
6005 return _core.Window_GetExtraStyle(*args, **kwargs)
6006
6007 def MakeModal(*args, **kwargs):
6008 """
6009 MakeModal(bool modal=True)
6010
6011 Disables all other windows in the application so that the user can
6012 only interact with this window. Passing False will reverse this
6013 effect.
6014 """
6015 return _core.Window_MakeModal(*args, **kwargs)
6016
6017 def SetThemeEnabled(*args, **kwargs):
6018 """
6019 SetThemeEnabled(bool enableTheme)
6020
6021 This function tells a window if it should use the system's "theme"
6022 code to draw the windows' background instead if its own background
6023 drawing code. This will only have an effect on platforms that support
6024 the notion of themes in user defined windows. One such platform is
6025 GTK+ where windows can have (very colourful) backgrounds defined by a
6026 user's selected theme.
6027
6028 Dialogs, notebook pages and the status bar have this flag set to true
6029 by default so that the default look and feel is simulated best.
6030 """
6031 return _core.Window_SetThemeEnabled(*args, **kwargs)
6032
6033 def GetThemeEnabled(*args, **kwargs):
6034 """
6035 GetThemeEnabled() -> bool
6036
6037 Return the themeEnabled flag.
6038 """
6039 return _core.Window_GetThemeEnabled(*args, **kwargs)
6040
6041 def SetFocus(*args, **kwargs):
6042 """
6043 SetFocus()
6044
6045 Set's the focus to this window, allowing it to receive keyboard input.
6046 """
6047 return _core.Window_SetFocus(*args, **kwargs)
6048
6049 def SetFocusFromKbd(*args, **kwargs):
6050 """
6051 SetFocusFromKbd()
6052
6053 Set focus to this window as the result of a keyboard action. Normally
6054 only called internally.
6055 """
6056 return _core.Window_SetFocusFromKbd(*args, **kwargs)
6057
6058 def FindFocus(*args, **kwargs):
6059 """
6060 FindFocus() -> Window
6061
6062 Returns the window or control that currently has the keyboard focus,
6063 or None.
6064 """
6065 return _core.Window_FindFocus(*args, **kwargs)
6066
6067 FindFocus = staticmethod(FindFocus)
6068 def AcceptsFocus(*args, **kwargs):
6069 """
6070 AcceptsFocus() -> bool
6071
6072 Can this window have focus?
6073 """
6074 return _core.Window_AcceptsFocus(*args, **kwargs)
6075
6076 def AcceptsFocusFromKeyboard(*args, **kwargs):
6077 """
6078 AcceptsFocusFromKeyboard() -> bool
6079
6080 Can this window be given focus by keyboard navigation? if not, the
6081 only way to give it focus (provided it accepts it at all) is to click
6082 it.
6083 """
6084 return _core.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6085
6086 def GetDefaultItem(*args, **kwargs):
6087 """
6088 GetDefaultItem() -> Window
6089
6090 Get the default child of this parent, i.e. the one which is activated
6091 by pressing <Enter> such as the OK button on a wx.Dialog.
6092 """
6093 return _core.Window_GetDefaultItem(*args, **kwargs)
6094
6095 def SetDefaultItem(*args, **kwargs):
6096 """
6097 SetDefaultItem(Window child) -> Window
6098
6099 Set this child as default, return the old default.
6100 """
6101 return _core.Window_SetDefaultItem(*args, **kwargs)
6102
6103 def SetTmpDefaultItem(*args, **kwargs):
6104 """
6105 SetTmpDefaultItem(Window win)
6106
6107 Set this child as temporary default
6108 """
6109 return _core.Window_SetTmpDefaultItem(*args, **kwargs)
6110
6111 def GetChildren(*args, **kwargs):
6112 """
6113 GetChildren() -> PyObject
6114
6115 Returns a list of the window's children. NOTE: Currently this is a
6116 copy of the child window list maintained by the window, so the return
6117 value of this function is only valid as long as the window's children
6118 do not change.
6119 """
6120 return _core.Window_GetChildren(*args, **kwargs)
6121
6122 def GetParent(*args, **kwargs):
6123 """
6124 GetParent() -> Window
6125
6126 Returns the parent window of this window, or None if there isn't one.
6127 """
6128 return _core.Window_GetParent(*args, **kwargs)
6129
6130 def GetGrandParent(*args, **kwargs):
6131 """
6132 GetGrandParent() -> Window
6133
6134 Returns the parent of the parent of this window, or None if there isn't one.
6135 """
6136 return _core.Window_GetGrandParent(*args, **kwargs)
6137
6138 def IsTopLevel(*args, **kwargs):
6139 """
6140 IsTopLevel() -> bool
6141
6142 Returns true if the given window is a top-level one. Currently all
6143 frames and dialogs are always considered to be top-level windows (even
6144 if they have a parent window).
6145 """
6146 return _core.Window_IsTopLevel(*args, **kwargs)
6147
6148 def Reparent(*args, **kwargs):
6149 """
6150 Reparent(Window newParent) -> bool
6151
6152 Reparents the window, i.e the window will be removed from its current
6153 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6154 re-inserted into another. Available on Windows and GTK. Returns True
6155 if the parent was changed, False otherwise (error or newParent ==
6156 oldParent)
6157 """
6158 return _core.Window_Reparent(*args, **kwargs)
6159
6160 def AddChild(*args, **kwargs):
6161 """
6162 AddChild(Window child)
6163
6164 Adds a child window. This is called automatically by window creation
6165 functions so should not be required by the application programmer.
6166 """
6167 return _core.Window_AddChild(*args, **kwargs)
6168
6169 def RemoveChild(*args, **kwargs):
6170 """
6171 RemoveChild(Window child)
6172
6173 Removes a child window. This is called automatically by window
6174 deletion functions so should not be required by the application
6175 programmer.
6176 """
6177 return _core.Window_RemoveChild(*args, **kwargs)
6178
6179 def FindWindowById(*args, **kwargs):
6180 """
6181 FindWindowById(long winid) -> Window
6182
6183 Find a chld of this window by window ID
6184 """
6185 return _core.Window_FindWindowById(*args, **kwargs)
6186
6187 def FindWindowByName(*args, **kwargs):
6188 """
6189 FindWindowByName(String name) -> Window
6190
6191 Find a child of this window by name
6192 """
6193 return _core.Window_FindWindowByName(*args, **kwargs)
6194
6195 def GetEventHandler(*args, **kwargs):
6196 """
6197 GetEventHandler() -> EvtHandler
6198
6199 Returns the event handler for this window. By default, the window is
6200 its own event handler.
6201 """
6202 return _core.Window_GetEventHandler(*args, **kwargs)
6203
6204 def SetEventHandler(*args, **kwargs):
6205 """
6206 SetEventHandler(EvtHandler handler)
6207
6208 Sets the event handler for this window. An event handler is an object
6209 that is capable of processing the events sent to a window. By default,
6210 the window is its own event handler, but an application may wish to
6211 substitute another, for example to allow central implementation of
6212 event-handling for a variety of different window classes.
6213
6214 It is usually better to use wx.Window.PushEventHandler since this sets
6215 up a chain of event handlers, where an event not handled by one event
6216 handler is handed to the next one in the chain.
6217 """
6218 return _core.Window_SetEventHandler(*args, **kwargs)
6219
6220 def PushEventHandler(*args, **kwargs):
6221 """
6222 PushEventHandler(EvtHandler handler)
6223
6224 Pushes this event handler onto the event handler stack for the window.
6225 An event handler is an object that is capable of processing the events
6226 sent to a window. By default, the window is its own event handler, but
6227 an application may wish to substitute another, for example to allow
6228 central implementation of event-handling for a variety of different
6229 window classes.
6230
6231 wx.Window.PushEventHandler allows an application to set up a chain of
6232 event handlers, where an event not handled by one event handler is
6233 handed to the next one in the chain. Use wx.Window.PopEventHandler to
6234 remove the event handler.
6235 """
6236 return _core.Window_PushEventHandler(*args, **kwargs)
6237
6238 def PopEventHandler(*args, **kwargs):
6239 """
6240 PopEventHandler(bool deleteHandler=False) -> EvtHandler
6241
6242 Removes and returns the top-most event handler on the event handler
6243 stack. If deleteHandler is True then the wx.EvtHandler object will be
6244 destroyed after it is popped.
6245 """
6246 return _core.Window_PopEventHandler(*args, **kwargs)
6247
6248 def RemoveEventHandler(*args, **kwargs):
6249 """
6250 RemoveEventHandler(EvtHandler handler) -> bool
6251
6252 Find the given handler in the event handler chain and remove (but
6253 not delete) it from the event handler chain, return True if it was
6254 found and False otherwise (this also results in an assert failure so
6255 this function should only be called when the handler is supposed to
6256 be there.)
6257 """
6258 return _core.Window_RemoveEventHandler(*args, **kwargs)
6259
6260 def SetValidator(*args, **kwargs):
6261 """
6262 SetValidator(Validator validator)
6263
6264 Deletes the current validator (if any) and sets the window validator,
6265 having called wx.Validator.Clone to create a new validator of this
6266 type.
6267 """
6268 return _core.Window_SetValidator(*args, **kwargs)
6269
6270 def GetValidator(*args, **kwargs):
6271 """
6272 GetValidator() -> Validator
6273
6274 Returns a pointer to the current validator for the window, or None if
6275 there is none.
6276 """
6277 return _core.Window_GetValidator(*args, **kwargs)
6278
6279 def Validate(*args, **kwargs):
6280 """
6281 Validate() -> bool
6282
6283 Validates the current values of the child controls using their
6284 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
6285 extra style flag set, the method will also call Validate() of all
6286 child windows. Returns false if any of the validations failed.
6287 """
6288 return _core.Window_Validate(*args, **kwargs)
6289
6290 def TransferDataToWindow(*args, **kwargs):
6291 """
6292 TransferDataToWindow() -> bool
6293
6294 Transfers values to child controls from data areas specified by
6295 their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
6296 extra style flag set, the method will also call
6297 TransferDataToWindow() of all child windows.
6298 """
6299 return _core.Window_TransferDataToWindow(*args, **kwargs)
6300
6301 def TransferDataFromWindow(*args, **kwargs):
6302 """
6303 TransferDataFromWindow() -> bool
6304
6305 Transfers values from child controls to data areas specified by
6306 their validators. Returns false if a transfer failed. If the
6307 window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the
6308 method will also call TransferDataFromWindow() of all child
6309 windows.
6310 """
6311 return _core.Window_TransferDataFromWindow(*args, **kwargs)
6312
6313 def InitDialog(*args, **kwargs):
6314 """
6315 InitDialog()
6316
6317 Sends an EVT_INIT_DIALOG event, whose handler usually transfers
6318 data to the dialog via validators.
6319 """
6320 return _core.Window_InitDialog(*args, **kwargs)
6321
6322 def SetAcceleratorTable(*args, **kwargs):
6323 """
6324 SetAcceleratorTable(AcceleratorTable accel)
6325
6326 Sets the accelerator table for this window.
6327 """
6328 return _core.Window_SetAcceleratorTable(*args, **kwargs)
6329
6330 def GetAcceleratorTable(*args, **kwargs):
6331 """
6332 GetAcceleratorTable() -> AcceleratorTable
6333
6334 Gets the accelerator table for this window.
6335 """
6336 return _core.Window_GetAcceleratorTable(*args, **kwargs)
6337
6338 def RegisterHotKey(*args, **kwargs):
6339 """
6340 RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool
6341
6342 Registers a system wide hotkey. Every time the user presses the hotkey
6343 registered here, this window will receive a hotkey event. It will
6344 receive the event even if the application is in the background and
6345 does not have the input focus because the user is working with some
6346 other application. To bind an event handler function to this hotkey
6347 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6348 hotkey was registered successfully.
6349 """
6350 return _core.Window_RegisterHotKey(*args, **kwargs)
6351
6352 def UnregisterHotKey(*args, **kwargs):
6353 """
6354 UnregisterHotKey(int hotkeyId) -> bool
6355
6356 Unregisters a system wide hotkey.
6357 """
6358 return _core.Window_UnregisterHotKey(*args, **kwargs)
6359
6360 def ConvertDialogPointToPixels(*args, **kwargs):
6361 """
6362 ConvertDialogPointToPixels(Point pt) -> Point
6363
6364 Converts a point or size from dialog units to pixels. Dialog units
6365 are used for maintaining a dialog's proportions even if the font
6366 changes. For the x dimension, the dialog units are multiplied by the
6367 average character width and then divided by 4. For the y dimension,
6368 the dialog units are multiplied by the average character height and
6369 then divided by 8.
6370 """
6371 return _core.Window_ConvertDialogPointToPixels(*args, **kwargs)
6372
6373 def ConvertDialogSizeToPixels(*args, **kwargs):
6374 """
6375 ConvertDialogSizeToPixels(Size sz) -> Size
6376
6377 Converts a point or size from dialog units to pixels. Dialog units
6378 are used for maintaining a dialog's proportions even if the font
6379 changes. For the x dimension, the dialog units are multiplied by the
6380 average character width and then divided by 4. For the y dimension,
6381 the dialog units are multiplied by the average character height and
6382 then divided by 8.
6383 """
6384 return _core.Window_ConvertDialogSizeToPixels(*args, **kwargs)
6385
6386 def DLG_PNT(*args, **kwargs):
6387 """
6388 DLG_PNT(Point pt) -> Point
6389
6390 Converts a point or size from dialog units to pixels. Dialog units
6391 are used for maintaining a dialog's proportions even if the font
6392 changes. For the x dimension, the dialog units are multiplied by the
6393 average character width and then divided by 4. For the y dimension,
6394 the dialog units are multiplied by the average character height and
6395 then divided by 8.
6396 """
6397 return _core.Window_DLG_PNT(*args, **kwargs)
6398
6399 def DLG_SZE(*args, **kwargs):
6400 """
6401 DLG_SZE(Size sz) -> Size
6402
6403 Converts a point or size from dialog units to pixels. Dialog units
6404 are used for maintaining a dialog's proportions even if the font
6405 changes. For the x dimension, the dialog units are multiplied by the
6406 average character width and then divided by 4. For the y dimension,
6407 the dialog units are multiplied by the average character height and
6408 then divided by 8.
6409 """
6410 return _core.Window_DLG_SZE(*args, **kwargs)
6411
6412 def ConvertPixelPointToDialog(*args, **kwargs):
6413 """ConvertPixelPointToDialog(Point pt) -> Point"""
6414 return _core.Window_ConvertPixelPointToDialog(*args, **kwargs)
6415
6416 def ConvertPixelSizeToDialog(*args, **kwargs):
6417 """ConvertPixelSizeToDialog(Size sz) -> Size"""
6418 return _core.Window_ConvertPixelSizeToDialog(*args, **kwargs)
6419
6420 def WarpPointer(*args, **kwargs):
6421 """
6422 WarpPointer(int x, int y)
6423
6424 Moves the pointer to the given position on the window.
6425
6426 NOTE: This function is not supported under Mac because Apple Human
6427 Interface Guidelines forbid moving the mouse cursor programmatically.
6428 """
6429 return _core.Window_WarpPointer(*args, **kwargs)
6430
6431 def CaptureMouse(*args, **kwargs):
6432 """
6433 CaptureMouse()
6434
6435 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
6436 release the capture.
6437
6438 Note that wxWindows maintains the stack of windows having captured the
6439 mouse and when the mouse is released the capture returns to the window
6440 which had had captured it previously and it is only really released if
6441 there were no previous window. In particular, this means that you must
6442 release the mouse as many times as you capture it.
6443 """
6444 return _core.Window_CaptureMouse(*args, **kwargs)
6445
6446 def ReleaseMouse(*args, **kwargs):
6447 """
6448 ReleaseMouse()
6449
6450 Releases mouse input captured with wx.Window.CaptureMouse.
6451 """
6452 return _core.Window_ReleaseMouse(*args, **kwargs)
6453
6454 def GetCapture(*args, **kwargs):
6455 """
6456 GetCapture() -> Window
6457
6458 Returns the window which currently captures the mouse or None
6459 """
6460 return _core.Window_GetCapture(*args, **kwargs)
6461
6462 GetCapture = staticmethod(GetCapture)
6463 def HasCapture(*args, **kwargs):
6464 """
6465 HasCapture() -> bool
6466
6467 Returns true if this window has the current mouse capture.
6468 """
6469 return _core.Window_HasCapture(*args, **kwargs)
6470
6471 def Refresh(*args, **kwargs):
6472 """
6473 Refresh(bool eraseBackground=True, Rect rect=None)
6474
6475 Mark the specified rectangle (or the whole window) as "dirty" so it
6476 will be repainted. Causes an EVT_PAINT event to be generated and sent
6477 to the window.
6478 """
6479 return _core.Window_Refresh(*args, **kwargs)
6480
6481 def RefreshRect(*args, **kwargs):
6482 """
6483 RefreshRect(Rect rect)
6484
6485 Redraws the contents of the given rectangle: the area inside it will
6486 be repainted. This is the same as Refresh but has a nicer syntax.
6487 """
6488 return _core.Window_RefreshRect(*args, **kwargs)
6489
6490 def Update(*args, **kwargs):
6491 """
6492 Update()
6493
6494 Calling this method immediately repaints the invalidated area of the
6495 window instead of waiting for the EVT_PAINT event to happen, (normally
6496 this would usually only happen when the flow of control returns to the
6497 event loop.) Notice that this function doesn't refresh the window and
6498 does nothing if the window has been already repainted. Use Refresh
6499 first if you want to immediately redraw the window (or some portion of
6500 it) unconditionally.
6501 """
6502 return _core.Window_Update(*args, **kwargs)
6503
6504 def ClearBackground(*args, **kwargs):
6505 """
6506 ClearBackground()
6507
6508 Clears the window by filling it with the current background
6509 colour. Does not cause an erase background event to be generated.
6510 """
6511 return _core.Window_ClearBackground(*args, **kwargs)
6512
6513 def Freeze(*args, **kwargs):
6514 """
6515 Freeze()
6516
6517 Freezes the window or, in other words, prevents any updates from taking place
6518 on screen, the window is not redrawn at all. Thaw must be called to reenable
6519 window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw
6520 being delayed until all the nesting has been undone.
6521
6522 This method is useful for visual appearance optimization (for example,
6523 it is a good idea to use it before inserting large amount of text into
6524 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
6525 for all controls so it is mostly just a hint to wxWindows and not a
6526 mandatory directive.
6527 """
6528 return _core.Window_Freeze(*args, **kwargs)
6529
6530 def Thaw(*args, **kwargs):
6531 """
6532 Thaw()
6533
6534 Reenables window updating after a previous call to Freeze. Calls to
6535 Freeze/Thaw may be nested, so Thaw must be called the same number of times
6536 that Freeze was before the window will be updated.
6537 """
6538 return _core.Window_Thaw(*args, **kwargs)
6539
6540 def PrepareDC(*args, **kwargs):
6541 """
6542 PrepareDC(DC dc)
6543
6544 Call this function to prepare the device context for drawing a
6545 scrolled image. It sets the device origin according to the current
6546 scroll position.
6547 """
6548 return _core.Window_PrepareDC(*args, **kwargs)
6549
6550 def GetUpdateRegion(*args, **kwargs):
6551 """
6552 GetUpdateRegion() -> Region
6553
6554 Returns the region specifying which parts of the window have been
6555 damaged. Should only be called within an EVT_PAINT handler.
6556 """
6557 return _core.Window_GetUpdateRegion(*args, **kwargs)
6558
6559 def GetUpdateClientRect(*args, **kwargs):
6560 """
6561 GetUpdateClientRect() -> Rect
6562
6563 Get the update rectangle region bounding box in client coords.
6564 """
6565 return _core.Window_GetUpdateClientRect(*args, **kwargs)
6566
6567 def IsExposed(*args, **kwargs):
6568 """
6569 IsExposed(int x, int y, int w=1, int h=1) -> bool
6570
6571 Returns true if the given point or rectangle area has been exposed
6572 since the last repaint. Call this in an paint event handler to
6573 optimize redrawing by only redrawing those areas, which have been
6574 exposed.
6575 """
6576 return _core.Window_IsExposed(*args, **kwargs)
6577
6578 def IsExposedPoint(*args, **kwargs):
6579 """
6580 IsExposedPoint(Point pt) -> bool
6581
6582 Returns true if the given point or rectangle area has been exposed
6583 since the last repaint. Call this in an paint event handler to
6584 optimize redrawing by only redrawing those areas, which have been
6585 exposed.
6586 """
6587 return _core.Window_IsExposedPoint(*args, **kwargs)
6588
6589 def IsExposedRect(*args, **kwargs):
6590 """
6591 IsExposedRect(Rect rect) -> bool
6592
6593 Returns true if the given point or rectangle area has been exposed
6594 since the last repaint. Call this in an paint event handler to
6595 optimize redrawing by only redrawing those areas, which have been
6596 exposed.
6597 """
6598 return _core.Window_IsExposedRect(*args, **kwargs)
6599
6600 def GetDefaultAttributes(*args, **kwargs):
6601 """
6602 GetDefaultAttributes() -> VisualAttributes
6603
6604 Get the default attributes for an instance of this class. This
6605 is useful if you want to use the same font or colour in your own
6606 control as in a standard control -- which is a much better idea
6607 than hard coding specific colours or fonts which might look
6608 completely out of place on the users system, especially if it
6609 uses themes.
6610 """
6611 return _core.Window_GetDefaultAttributes(*args, **kwargs)
6612
6613 def GetClassDefaultAttributes(*args, **kwargs):
6614 """
6615 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
6616
6617 Get the default attributes for this class. This is useful if
6618 you want to use the same font or colour in your own control as
6619 in a standard control -- which is a much better idea than hard
6620 coding specific colours or fonts which might look completely out
6621 of place on the users system, especially if it uses themes.
6622
6623 The variant parameter is only relevant under Mac currently and is
6624 ignore under other platforms. Under Mac, it will change the size of the
6625 returned font. See SetWindowVariant for more about this.
6626 """
6627 return _core.Window_GetClassDefaultAttributes(*args, **kwargs)
6628
6629 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
6630 def SetBackgroundColour(*args, **kwargs):
6631 """
6632 SetBackgroundColour(Colour colour) -> bool
6633
6634 Sets the background colour of the window. Returns True if the colour
6635 was changed. The background colour is usually painted by the default
6636 EVT_ERASE_BACKGROUND event handler function under Windows and
6637 automatically under GTK.
6638
6639 Note that setting the background colour does not cause an immediate
6640 refresh, so you may wish to call ClearBackground or Refresh after
6641 calling this function.
6642
6643 Use this function with care under GTK+ as the new appearance of the
6644 window might not look equally well when used with themes, i.e GTK+'s
6645 ability to change its look as the user wishes with run-time loadable
6646 modules.
6647 """
6648 return _core.Window_SetBackgroundColour(*args, **kwargs)
6649
6650 def SetForegroundColour(*args, **kwargs):
6651 """
6652 SetForegroundColour(Colour colour) -> bool
6653
6654 Sets the foreground colour of the window. Returns True is the colour
6655 was changed. The interpretation of foreground colour is dependent on
6656 the window class; it may be the text colour or other colour, or it may
6657 not be used at all.
6658 """
6659 return _core.Window_SetForegroundColour(*args, **kwargs)
6660
6661 def GetBackgroundColour(*args, **kwargs):
6662 """
6663 GetBackgroundColour() -> Colour
6664
6665 Returns the background colour of the window.
6666 """
6667 return _core.Window_GetBackgroundColour(*args, **kwargs)
6668
6669 def GetForegroundColour(*args, **kwargs):
6670 """
6671 GetForegroundColour() -> Colour
6672
6673 Returns the foreground colour of the window. The interpretation of
6674 foreground colour is dependent on the window class; it may be the text
6675 colour or other colour, or it may not be used at all.
6676 """
6677 return _core.Window_GetForegroundColour(*args, **kwargs)
6678
6679 def SetCursor(*args, **kwargs):
6680 """
6681 SetCursor(Cursor cursor) -> bool
6682
6683 Sets the window's cursor. Notice that the window cursor also sets it
6684 for the children of the window implicitly.
6685
6686 The cursor may be wx.NullCursor in which case the window cursor will
6687 be reset back to default.
6688 """
6689 return _core.Window_SetCursor(*args, **kwargs)
6690
6691 def GetCursor(*args, **kwargs):
6692 """
6693 GetCursor() -> Cursor
6694
6695 Return the cursor associated with this window.
6696 """
6697 return _core.Window_GetCursor(*args, **kwargs)
6698
6699 def SetFont(*args, **kwargs):
6700 """
6701 SetFont(Font font) -> bool
6702
6703 Sets the font for this window.
6704 """
6705 return _core.Window_SetFont(*args, **kwargs)
6706
6707 def GetFont(*args, **kwargs):
6708 """
6709 GetFont() -> Font
6710
6711 Returns the default font used for this window.
6712 """
6713 return _core.Window_GetFont(*args, **kwargs)
6714
6715 def SetCaret(*args, **kwargs):
6716 """
6717 SetCaret(Caret caret)
6718
6719 Sets the caret associated with the window.
6720 """
6721 return _core.Window_SetCaret(*args, **kwargs)
6722
6723 def GetCaret(*args, **kwargs):
6724 """
6725 GetCaret() -> Caret
6726
6727 Returns the caret associated with the window.
6728 """
6729 return _core.Window_GetCaret(*args, **kwargs)
6730
6731 def GetCharHeight(*args, **kwargs):
6732 """
6733 GetCharHeight() -> int
6734
6735 Get the (average) character size for the current font.
6736 """
6737 return _core.Window_GetCharHeight(*args, **kwargs)
6738
6739 def GetCharWidth(*args, **kwargs):
6740 """
6741 GetCharWidth() -> int
6742
6743 Get the (average) character size for the current font.
6744 """
6745 return _core.Window_GetCharWidth(*args, **kwargs)
6746
6747 def GetTextExtent(*args, **kwargs):
6748 """
6749 GetTextExtent(String string) -> (width, height)
6750
6751 Get the width and height of the text using the current font.
6752 """
6753 return _core.Window_GetTextExtent(*args, **kwargs)
6754
6755 def GetFullTextExtent(*args, **kwargs):
6756 """
6757 GetFullTextExtent(String string, Font font=None) ->
6758 (width, height, descent, externalLeading)
6759
6760 Get the width, height, decent and leading of the text using the
6761 current or specified font.
6762 """
6763 return _core.Window_GetFullTextExtent(*args, **kwargs)
6764
6765 def ClientToScreenXY(*args, **kwargs):
6766 """
6767 ClientToScreenXY(int x, int y) -> (x,y)
6768
6769 Converts to screen coordinates from coordinates relative to this window.
6770 """
6771 return _core.Window_ClientToScreenXY(*args, **kwargs)
6772
6773 def ScreenToClientXY(*args, **kwargs):
6774 """
6775 ScreenToClientXY(int x, int y) -> (x,y)
6776
6777 Converts from screen to client window coordinates.
6778 """
6779 return _core.Window_ScreenToClientXY(*args, **kwargs)
6780
6781 def ClientToScreen(*args, **kwargs):
6782 """
6783 ClientToScreen(Point pt) -> Point
6784
6785 Converts to screen coordinates from coordinates relative to this window.
6786 """
6787 return _core.Window_ClientToScreen(*args, **kwargs)
6788
6789 def ScreenToClient(*args, **kwargs):
6790 """
6791 ScreenToClient(Point pt) -> Point
6792
6793 Converts from screen to client window coordinates.
6794 """
6795 return _core.Window_ScreenToClient(*args, **kwargs)
6796
6797 def HitTestXY(*args, **kwargs):
6798 """
6799 HitTestXY(int x, int y) -> int
6800
6801 Test where the given (in client coords) point lies
6802 """
6803 return _core.Window_HitTestXY(*args, **kwargs)
6804
6805 def HitTest(*args, **kwargs):
6806 """
6807 HitTest(Point pt) -> int
6808
6809 Test where the given (in client coords) point lies
6810 """
6811 return _core.Window_HitTest(*args, **kwargs)
6812
6813 def GetBorder(*args):
6814 """
6815 GetBorder(long flags) -> int
6816 GetBorder() -> int
6817
6818 Get border for the flags of this window
6819 """
6820 return _core.Window_GetBorder(*args)
6821
6822 def UpdateWindowUI(*args, **kwargs):
6823 """
6824 UpdateWindowUI(long flags=UPDATE_UI_NONE)
6825
6826 This function sends EVT_UPDATE_UI events to the window. The particular
6827 implementation depends on the window; for example a wx.ToolBar will
6828 send an update UI event for each toolbar button, and a wx.Frame will
6829 send an update UI event for each menubar menu item. You can call this
6830 function from your application to ensure that your UI is up-to-date at
6831 a particular point in time (as far as your EVT_UPDATE_UI handlers are
6832 concerned). This may be necessary if you have called
6833 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
6834 limit the overhead that wxWindows incurs by sending update UI events
6835 in idle time.
6836
6837 The flags should be a bitlist of one or more of the following values:
6838
6839 wx.UPDATE_UI_NONE No particular value
6840 wx.UPDATE_UI_RECURSE Call the function for descendants
6841 wx.UPDATE_UI_FROMIDLE Invoked from OnIdle
6842
6843 If you are calling this function from an OnIdle function, make sure
6844 you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to
6845 only update the UI elements that need to be updated in idle time. Some
6846 windows update their elements only when necessary, for example when a
6847 menu is about to be shown. The following is an example of how to call
6848 UpdateWindowUI from an idle function.
6849
6850 def OnIdle(self, evt):
6851 if wx.UpdateUIEvent.CanUpdate(self):
6852 self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE);
6853
6854 """
6855 return _core.Window_UpdateWindowUI(*args, **kwargs)
6856
6857 def PopupMenuXY(*args, **kwargs):
6858 """
6859 PopupMenuXY(Menu menu, int x, int y) -> bool
6860
6861 Pops up the given menu at the specified coordinates, relative to this
6862 window, and returns control when the user has dismissed the menu. If a
6863 menu item is selected, the corresponding menu event is generated and
6864 will be processed as usual.
6865 """
6866 return _core.Window_PopupMenuXY(*args, **kwargs)
6867
6868 def PopupMenu(*args, **kwargs):
6869 """
6870 PopupMenu(Menu menu, Point pos) -> bool
6871
6872 Pops up the given menu at the specified coordinates, relative to this
6873 window, and returns control when the user has dismissed the menu. If a
6874 menu item is selected, the corresponding menu event is generated and
6875 will be processed as usual.
6876 """
6877 return _core.Window_PopupMenu(*args, **kwargs)
6878
6879 def GetHandle(*args, **kwargs):
6880 """
6881 GetHandle() -> long
6882
6883 Returns the platform-specific handle (as a long integer) of the
6884 physical window. Currently on wxMac it returns the handle of the
6885 toplevel parent of the window.
6886 """
6887 return _core.Window_GetHandle(*args, **kwargs)
6888
6889 def OnPaint(*args, **kwargs):
6890 """OnPaint(PaintEvent event)"""
6891 return _core.Window_OnPaint(*args, **kwargs)
6892
6893 def HasScrollbar(*args, **kwargs):
6894 """
6895 HasScrollbar(int orient) -> bool
6896
6897 Does the window have the scrollbar for this orientation?
6898 """
6899 return _core.Window_HasScrollbar(*args, **kwargs)
6900
6901 def SetScrollbar(*args, **kwargs):
6902 """
6903 SetScrollbar(int orientation, int pos, int thumbvisible, int range,
6904 bool refresh=True)
6905
6906 Sets the scrollbar properties of a built-in scrollbar.
6907
6908 orientation: Determines the scrollbar whose page size is to be
6909 set. May be wx.HORIZONTAL or wx.VERTICAL.
6910
6911 position: The position of the scrollbar in scroll units.
6912
6913 thumbSize: The size of the thumb, or visible portion of the
6914 scrollbar, in scroll units.
6915
6916 range: The maximum position of the scrollbar.
6917
6918 refresh: True to redraw the scrollbar, false otherwise.
6919 """
6920 return _core.Window_SetScrollbar(*args, **kwargs)
6921
6922 def SetScrollPos(*args, **kwargs):
6923 """
6924 SetScrollPos(int orientation, int pos, bool refresh=True)
6925
6926 Sets the position of one of the built-in scrollbars.
6927 """
6928 return _core.Window_SetScrollPos(*args, **kwargs)
6929
6930 def GetScrollPos(*args, **kwargs):
6931 """
6932 GetScrollPos(int orientation) -> int
6933
6934 Returns the built-in scrollbar position.
6935 """
6936 return _core.Window_GetScrollPos(*args, **kwargs)
6937
6938 def GetScrollThumb(*args, **kwargs):
6939 """
6940 GetScrollThumb(int orientation) -> int
6941
6942 Returns the built-in scrollbar thumb size.
6943 """
6944 return _core.Window_GetScrollThumb(*args, **kwargs)
6945
6946 def GetScrollRange(*args, **kwargs):
6947 """
6948 GetScrollRange(int orientation) -> int
6949
6950 Returns the built-in scrollbar range.
6951 """
6952 return _core.Window_GetScrollRange(*args, **kwargs)
6953
6954 def ScrollWindow(*args, **kwargs):
6955 """
6956 ScrollWindow(int dx, int dy, Rect rect=None)
6957
6958 Physically scrolls the pixels in the window and move child windows
6959 accordingly. Use this function to optimise your scrolling
6960 implementations, to minimise the area that must be redrawn. Note that
6961 it is rarely required to call this function from a user program.
6962
6963 dx: Amount to scroll horizontally.
6964
6965 dy: Amount to scroll vertically.
6966
6967 rect: Rectangle to invalidate. If this is None, the whole window
6968 is invalidated. If you pass a rectangle corresponding to the
6969 area of the window exposed by the scroll, your painting
6970 handler can optimize painting by checking for the
6971 invalidated region.
6972 """
6973 return _core.Window_ScrollWindow(*args, **kwargs)
6974
6975 def ScrollLines(*args, **kwargs):
6976 """
6977 ScrollLines(int lines) -> bool
6978
6979 If the platform and window class supports it, scrolls the window by
6980 the given number of lines down, if lines is positive, or up if lines
6981 is negative. Returns True if the window was scrolled, False if it was
6982 already on top/bottom and nothing was done.
6983 """
6984 return _core.Window_ScrollLines(*args, **kwargs)
6985
6986 def ScrollPages(*args, **kwargs):
6987 """
6988 ScrollPages(int pages) -> bool
6989
6990 If the platform and window class supports it, scrolls the window by
6991 the given number of pages down, if pages is positive, or up if pages
6992 is negative. Returns True if the window was scrolled, False if it was
6993 already on top/bottom and nothing was done.
6994 """
6995 return _core.Window_ScrollPages(*args, **kwargs)
6996
6997 def LineUp(*args, **kwargs):
6998 """
6999 LineUp() -> bool
7000
7001 This is just a wrapper for ScrollLines(-1).
7002 """
7003 return _core.Window_LineUp(*args, **kwargs)
7004
7005 def LineDown(*args, **kwargs):
7006 """
7007 LineDown() -> bool
7008
7009 This is just a wrapper for ScrollLines(1).
7010 """
7011 return _core.Window_LineDown(*args, **kwargs)
7012
7013 def PageUp(*args, **kwargs):
7014 """
7015 PageUp() -> bool
7016
7017 This is just a wrapper for ScrollPages(-1).
7018 """
7019 return _core.Window_PageUp(*args, **kwargs)
7020
7021 def PageDown(*args, **kwargs):
7022 """
7023 PageDown() -> bool
7024
7025 This is just a wrapper for ScrollPages(1).
7026 """
7027 return _core.Window_PageDown(*args, **kwargs)
7028
7029 def SetHelpText(*args, **kwargs):
7030 """
7031 SetHelpText(String text)
7032
7033 Sets the help text to be used as context-sensitive help for this
7034 window. Note that the text is actually stored by the current
7035 wxHelpProvider implementation, and not in the window object itself.
7036 """
7037 return _core.Window_SetHelpText(*args, **kwargs)
7038
7039 def SetHelpTextForId(*args, **kwargs):
7040 """
7041 SetHelpTextForId(String text)
7042
7043 Associate this help text with all windows with the same id as this
7044 one.
7045 """
7046 return _core.Window_SetHelpTextForId(*args, **kwargs)
7047
7048 def GetHelpText(*args, **kwargs):
7049 """
7050 GetHelpText() -> String
7051
7052 Gets the help text to be used as context-sensitive help for this
7053 window. Note that the text is actually stored by the current
7054 wxHelpProvider implementation, and not in the window object itself.
7055 """
7056 return _core.Window_GetHelpText(*args, **kwargs)
7057
7058 def SetToolTipString(*args, **kwargs):
7059 """
7060 SetToolTipString(String tip)
7061
7062 Attach a tooltip to the window.
7063 """
7064 return _core.Window_SetToolTipString(*args, **kwargs)
7065
7066 def SetToolTip(*args, **kwargs):
7067 """
7068 SetToolTip(ToolTip tip)
7069
7070 Attach a tooltip to the window.
7071 """
7072 return _core.Window_SetToolTip(*args, **kwargs)
7073
7074 def GetToolTip(*args, **kwargs):
7075 """
7076 GetToolTip() -> ToolTip
7077
7078 get the associated tooltip or None if none
7079 """
7080 return _core.Window_GetToolTip(*args, **kwargs)
7081
7082 def SetDropTarget(*args, **kwargs):
7083 """
7084 SetDropTarget(DropTarget dropTarget)
7085
7086 Associates a drop target with this window. If the window already has
7087 a drop target, it is deleted.
7088 """
7089 return _core.Window_SetDropTarget(*args, **kwargs)
7090
7091 def GetDropTarget(*args, **kwargs):
7092 """
7093 GetDropTarget() -> DropTarget
7094
7095 Returns the associated drop target, which may be None.
7096 """
7097 return _core.Window_GetDropTarget(*args, **kwargs)
7098
7099 def DragAcceptFiles(*args, **kwargs):
7100 """
7101 DragAcceptFiles(bool accept)
7102
7103 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7104 Only available on Windows.
7105 """
7106 return _core.Window_DragAcceptFiles(*args, **kwargs)
7107
7108 def SetConstraints(*args, **kwargs):
7109 """
7110 SetConstraints(LayoutConstraints constraints)
7111
7112 Sets the window to have the given layout constraints. If an existing
7113 layout constraints object is already owned by the window, it will be
7114 deleted. Pass None to disassociate and delete the window's current
7115 constraints.
7116
7117 You must call SetAutoLayout to tell a window to use the constraints
7118 automatically in its default EVT_SIZE handler; otherwise, you must
7119 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7120 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7121 effect.
7122 """
7123 return _core.Window_SetConstraints(*args, **kwargs)
7124
7125 def GetConstraints(*args, **kwargs):
7126 """
7127 GetConstraints() -> LayoutConstraints
7128
7129 Returns a pointer to the window's layout constraints, or None if there
7130 are none.
7131 """
7132 return _core.Window_GetConstraints(*args, **kwargs)
7133
7134 def SetAutoLayout(*args, **kwargs):
7135 """
7136 SetAutoLayout(bool autoLayout)
7137
7138 Determines whether the Layout function will be called automatically
7139 when the window is resized. It is called implicitly by SetSizer but
7140 if you use SetConstraints you should call it manually or otherwise the
7141 window layout won't be correctly updated when its size changes.
7142 """
7143 return _core.Window_SetAutoLayout(*args, **kwargs)
7144
7145 def GetAutoLayout(*args, **kwargs):
7146 """
7147 GetAutoLayout() -> bool
7148
7149 Returns the current autoLayout setting
7150 """
7151 return _core.Window_GetAutoLayout(*args, **kwargs)
7152
7153 def Layout(*args, **kwargs):
7154 """
7155 Layout() -> bool
7156
7157 Invokes the constraint-based layout algorithm or the sizer-based
7158 algorithm for this window. See SetAutoLayout: when auto layout is on,
7159 this function gets called automatically by the default EVT_SIZE
7160 handler when the window is resized.
7161 """
7162 return _core.Window_Layout(*args, **kwargs)
7163
7164 def SetSizer(*args, **kwargs):
7165 """
7166 SetSizer(Sizer sizer, bool deleteOld=True)
7167
7168 Sets the window to have the given layout sizer. The window will then
7169 own the object, and will take care of its deletion. If an existing
7170 layout sizer object is already owned by the window, it will be deleted
7171 if the deleteOld parameter is true. Note that this function will also
7172 call SetAutoLayout implicitly with a True parameter if the sizer is
7173 non-NoneL and False otherwise.
7174 """
7175 return _core.Window_SetSizer(*args, **kwargs)
7176
7177 def SetSizerAndFit(*args, **kwargs):
7178 """
7179 SetSizerAndFit(Sizer sizer, bool deleteOld=True)
7180
7181 The same as SetSizer, except it also sets the size hints for the
7182 window based on the sizer's minimum size.
7183 """
7184 return _core.Window_SetSizerAndFit(*args, **kwargs)
7185
7186 def GetSizer(*args, **kwargs):
7187 """
7188 GetSizer() -> Sizer
7189
7190 Return the sizer associated with the window by a previous call to
7191 SetSizer or None if there isn't one.
7192 """
7193 return _core.Window_GetSizer(*args, **kwargs)
7194
7195 def SetContainingSizer(*args, **kwargs):
7196 """
7197 SetContainingSizer(Sizer sizer)
7198
7199 This normally does not need to be called by application code. It is
7200 called internally when a window is added to a sizer, and is used so
7201 the window can remove itself from the sizer when it is destroyed.
7202 """
7203 return _core.Window_SetContainingSizer(*args, **kwargs)
7204
7205 def GetContainingSizer(*args, **kwargs):
7206 """
7207 GetContainingSizer() -> Sizer
7208
7209 Return the sizer that this window is a member of, if any, otherwise None.
7210 """
7211 return _core.Window_GetContainingSizer(*args, **kwargs)
7212
7213 def PostCreate(self, pre):
7214 """
7215 Phase 3 of the 2-phase create <wink!>
7216 Call this method after precreating the window with the 2-phase create method.
7217 """
7218 self.this = pre.this
7219 self.thisown = pre.thisown
7220 pre.thisown = 0
7221 if hasattr(self, '_setOORInfo'):
7222 self._setOORInfo(self)
7223 if hasattr(self, '_setCallbackInfo'):
7224 self._setCallbackInfo(self, self.__class__)
7225
7226
7227 class WindowPtr(Window):
7228 def __init__(self, this):
7229 self.this = this
7230 if not hasattr(self,"thisown"): self.thisown = 0
7231 self.__class__ = Window
7232 _core.Window_swigregister(WindowPtr)
7233
7234 def PreWindow(*args, **kwargs):
7235 """
7236 PreWindow() -> Window
7237
7238 Precreate a Window for 2-phase creation.
7239 """
7240 val = _core.new_PreWindow(*args, **kwargs)
7241 val.thisown = 1
7242 return val
7243
7244 def Window_NewControlId(*args, **kwargs):
7245 """
7246 Window_NewControlId() -> int
7247
7248 Generate a control id for the controls which were not given one.
7249 """
7250 return _core.Window_NewControlId(*args, **kwargs)
7251
7252 def Window_NextControlId(*args, **kwargs):
7253 """
7254 Window_NextControlId(int winid) -> int
7255
7256 Get the id of the control following the one with the given
7257 (autogenerated) id
7258 """
7259 return _core.Window_NextControlId(*args, **kwargs)
7260
7261 def Window_PrevControlId(*args, **kwargs):
7262 """
7263 Window_PrevControlId(int winid) -> int
7264
7265 Get the id of the control preceding the one with the given
7266 (autogenerated) id
7267 """
7268 return _core.Window_PrevControlId(*args, **kwargs)
7269
7270 def Window_FindFocus(*args, **kwargs):
7271 """
7272 Window_FindFocus() -> Window
7273
7274 Returns the window or control that currently has the keyboard focus,
7275 or None.
7276 """
7277 return _core.Window_FindFocus(*args, **kwargs)
7278
7279 def Window_GetCapture(*args, **kwargs):
7280 """
7281 Window_GetCapture() -> Window
7282
7283 Returns the window which currently captures the mouse or None
7284 """
7285 return _core.Window_GetCapture(*args, **kwargs)
7286
7287 def Window_GetClassDefaultAttributes(*args, **kwargs):
7288 """
7289 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7290
7291 Get the default attributes for this class. This is useful if
7292 you want to use the same font or colour in your own control as
7293 in a standard control -- which is a much better idea than hard
7294 coding specific colours or fonts which might look completely out
7295 of place on the users system, especially if it uses themes.
7296
7297 The variant parameter is only relevant under Mac currently and is
7298 ignore under other platforms. Under Mac, it will change the size of the
7299 returned font. See SetWindowVariant for more about this.
7300 """
7301 return _core.Window_GetClassDefaultAttributes(*args, **kwargs)
7302
7303 def DLG_PNT(win, point_or_x, y=None):
7304 """
7305 Convenience function for converting a Point or (x,y) in
7306 dialog units to pixel units.
7307 """
7308 if y is None:
7309 return win.ConvertDialogPointToPixels(point_or_x)
7310 else:
7311 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
7312
7313 def DLG_SZE(win, size_width, height=None):
7314 """
7315 Convenience function for converting a Size or (w,h) in
7316 dialog units to pixel units.
7317 """
7318 if height is None:
7319 return win.ConvertDialogSizeToPixels(size_width)
7320 else:
7321 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
7322
7323
7324 def FindWindowById(*args, **kwargs):
7325 """
7326 FindWindowById(long id, Window parent=None) -> Window
7327
7328 Find the first window in the application with the given id. If parent
7329 is None, the search will start from all top-level frames and dialog
7330 boxes; if non-None, the search will be limited to the given window
7331 hierarchy. The search is recursive in both cases.
7332 """
7333 return _core.FindWindowById(*args, **kwargs)
7334
7335 def FindWindowByName(*args, **kwargs):
7336 """
7337 FindWindowByName(String name, Window parent=None) -> Window
7338
7339 Find a window by its name (as given in a window constructor or Create
7340 function call). If parent is None, the search will start from all
7341 top-level frames and dialog boxes; if non-None, the search will be
7342 limited to the given window hierarchy. The search is recursive in both
7343 cases.
7344
7345 If no window with such name is found, wx.FindWindowByLabel is called.
7346 """
7347 return _core.FindWindowByName(*args, **kwargs)
7348
7349 def FindWindowByLabel(*args, **kwargs):
7350 """
7351 FindWindowByLabel(String label, Window parent=None) -> Window
7352
7353 Find a window by its label. Depending on the type of window, the label
7354 may be a window title or panel item label. If parent is None, the
7355 search will start from all top-level frames and dialog boxes; if
7356 non-None, the search will be limited to the given window
7357 hierarchy. The search is recursive in both cases.
7358 """
7359 return _core.FindWindowByLabel(*args, **kwargs)
7360
7361 def Window_FromHWND(*args, **kwargs):
7362 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
7363 return _core.Window_FromHWND(*args, **kwargs)
7364 #---------------------------------------------------------------------------
7365
7366 class Validator(EvtHandler):
7367 def __repr__(self):
7368 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7369 def __init__(self, *args, **kwargs):
7370 """__init__() -> Validator"""
7371 newobj = _core.new_Validator(*args, **kwargs)
7372 self.this = newobj.this
7373 self.thisown = 1
7374 del newobj.thisown
7375 self._setOORInfo(self)
7376
7377 def Clone(*args, **kwargs):
7378 """Clone() -> Validator"""
7379 return _core.Validator_Clone(*args, **kwargs)
7380
7381 def Validate(*args, **kwargs):
7382 """Validate(Window parent) -> bool"""
7383 return _core.Validator_Validate(*args, **kwargs)
7384
7385 def TransferToWindow(*args, **kwargs):
7386 """TransferToWindow() -> bool"""
7387 return _core.Validator_TransferToWindow(*args, **kwargs)
7388
7389 def TransferFromWindow(*args, **kwargs):
7390 """TransferFromWindow() -> bool"""
7391 return _core.Validator_TransferFromWindow(*args, **kwargs)
7392
7393 def GetWindow(*args, **kwargs):
7394 """GetWindow() -> Window"""
7395 return _core.Validator_GetWindow(*args, **kwargs)
7396
7397 def SetWindow(*args, **kwargs):
7398 """SetWindow(Window window)"""
7399 return _core.Validator_SetWindow(*args, **kwargs)
7400
7401 def IsSilent(*args, **kwargs):
7402 """IsSilent() -> bool"""
7403 return _core.Validator_IsSilent(*args, **kwargs)
7404
7405 IsSilent = staticmethod(IsSilent)
7406 def SetBellOnError(*args, **kwargs):
7407 """SetBellOnError(int doIt=True)"""
7408 return _core.Validator_SetBellOnError(*args, **kwargs)
7409
7410 SetBellOnError = staticmethod(SetBellOnError)
7411
7412 class ValidatorPtr(Validator):
7413 def __init__(self, this):
7414 self.this = this
7415 if not hasattr(self,"thisown"): self.thisown = 0
7416 self.__class__ = Validator
7417 _core.Validator_swigregister(ValidatorPtr)
7418
7419 def Validator_IsSilent(*args, **kwargs):
7420 """Validator_IsSilent() -> bool"""
7421 return _core.Validator_IsSilent(*args, **kwargs)
7422
7423 def Validator_SetBellOnError(*args, **kwargs):
7424 """Validator_SetBellOnError(int doIt=True)"""
7425 return _core.Validator_SetBellOnError(*args, **kwargs)
7426
7427 class PyValidator(Validator):
7428 def __repr__(self):
7429 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7430 def __init__(self, *args, **kwargs):
7431 """__init__() -> PyValidator"""
7432 newobj = _core.new_PyValidator(*args, **kwargs)
7433 self.this = newobj.this
7434 self.thisown = 1
7435 del newobj.thisown
7436
7437 self._setCallbackInfo(self, PyValidator, 1)
7438 self._setOORInfo(self)
7439
7440 def _setCallbackInfo(*args, **kwargs):
7441 """_setCallbackInfo(PyObject self, PyObject _class, int incref=True)"""
7442 return _core.PyValidator__setCallbackInfo(*args, **kwargs)
7443
7444
7445 class PyValidatorPtr(PyValidator):
7446 def __init__(self, this):
7447 self.this = this
7448 if not hasattr(self,"thisown"): self.thisown = 0
7449 self.__class__ = PyValidator
7450 _core.PyValidator_swigregister(PyValidatorPtr)
7451
7452 #---------------------------------------------------------------------------
7453
7454 class Menu(EvtHandler):
7455 def __repr__(self):
7456 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7457 def __init__(self, *args, **kwargs):
7458 """__init__(String title=EmptyString, long style=0) -> Menu"""
7459 newobj = _core.new_Menu(*args, **kwargs)
7460 self.this = newobj.this
7461 self.thisown = 1
7462 del newobj.thisown
7463 self._setOORInfo(self)
7464
7465 def Append(*args, **kwargs):
7466 """Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7467 return _core.Menu_Append(*args, **kwargs)
7468
7469 def AppendSeparator(*args, **kwargs):
7470 """AppendSeparator() -> MenuItem"""
7471 return _core.Menu_AppendSeparator(*args, **kwargs)
7472
7473 def AppendCheckItem(*args, **kwargs):
7474 """AppendCheckItem(int id, String text, String help=EmptyString) -> MenuItem"""
7475 return _core.Menu_AppendCheckItem(*args, **kwargs)
7476
7477 def AppendRadioItem(*args, **kwargs):
7478 """AppendRadioItem(int id, String text, String help=EmptyString) -> MenuItem"""
7479 return _core.Menu_AppendRadioItem(*args, **kwargs)
7480
7481 def AppendMenu(*args, **kwargs):
7482 """AppendMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7483 return _core.Menu_AppendMenu(*args, **kwargs)
7484
7485 def AppendItem(*args, **kwargs):
7486 """AppendItem(MenuItem item) -> MenuItem"""
7487 return _core.Menu_AppendItem(*args, **kwargs)
7488
7489 def Break(*args, **kwargs):
7490 """Break()"""
7491 return _core.Menu_Break(*args, **kwargs)
7492
7493 def InsertItem(*args, **kwargs):
7494 """InsertItem(size_t pos, MenuItem item) -> MenuItem"""
7495 return _core.Menu_InsertItem(*args, **kwargs)
7496
7497 def Insert(*args, **kwargs):
7498 """
7499 Insert(size_t pos, int id, String text, String help=EmptyString,
7500 int kind=ITEM_NORMAL) -> MenuItem
7501 """
7502 return _core.Menu_Insert(*args, **kwargs)
7503
7504 def InsertSeparator(*args, **kwargs):
7505 """InsertSeparator(size_t pos) -> MenuItem"""
7506 return _core.Menu_InsertSeparator(*args, **kwargs)
7507
7508 def InsertCheckItem(*args, **kwargs):
7509 """InsertCheckItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
7510 return _core.Menu_InsertCheckItem(*args, **kwargs)
7511
7512 def InsertRadioItem(*args, **kwargs):
7513 """InsertRadioItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
7514 return _core.Menu_InsertRadioItem(*args, **kwargs)
7515
7516 def InsertMenu(*args, **kwargs):
7517 """InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7518 return _core.Menu_InsertMenu(*args, **kwargs)
7519
7520 def PrependItem(*args, **kwargs):
7521 """PrependItem(MenuItem item) -> MenuItem"""
7522 return _core.Menu_PrependItem(*args, **kwargs)
7523
7524 def Prepend(*args, **kwargs):
7525 """Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7526 return _core.Menu_Prepend(*args, **kwargs)
7527
7528 def PrependSeparator(*args, **kwargs):
7529 """PrependSeparator() -> MenuItem"""
7530 return _core.Menu_PrependSeparator(*args, **kwargs)
7531
7532 def PrependCheckItem(*args, **kwargs):
7533 """PrependCheckItem(int id, String text, String help=EmptyString) -> MenuItem"""
7534 return _core.Menu_PrependCheckItem(*args, **kwargs)
7535
7536 def PrependRadioItem(*args, **kwargs):
7537 """PrependRadioItem(int id, String text, String help=EmptyString) -> MenuItem"""
7538 return _core.Menu_PrependRadioItem(*args, **kwargs)
7539
7540 def PrependMenu(*args, **kwargs):
7541 """PrependMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7542 return _core.Menu_PrependMenu(*args, **kwargs)
7543
7544 def Remove(*args, **kwargs):
7545 """Remove(int id) -> MenuItem"""
7546 return _core.Menu_Remove(*args, **kwargs)
7547
7548 def RemoveItem(*args, **kwargs):
7549 """RemoveItem(MenuItem item) -> MenuItem"""
7550 return _core.Menu_RemoveItem(*args, **kwargs)
7551
7552 def Delete(*args, **kwargs):
7553 """Delete(int id) -> bool"""
7554 return _core.Menu_Delete(*args, **kwargs)
7555
7556 def DeleteItem(*args, **kwargs):
7557 """DeleteItem(MenuItem item) -> bool"""
7558 return _core.Menu_DeleteItem(*args, **kwargs)
7559
7560 def Destroy(*args, **kwargs):
7561 """
7562 Destroy()
7563
7564 Deletes the C++ object this Python object is a proxy for.
7565 """
7566 return _core.Menu_Destroy(*args, **kwargs)
7567
7568 def DestroyId(*args, **kwargs):
7569 """
7570 DestroyId(int id) -> bool
7571
7572 Deletes the C++ object this Python object is a proxy for.
7573 """
7574 return _core.Menu_DestroyId(*args, **kwargs)
7575
7576 def DestroyItem(*args, **kwargs):
7577 """
7578 DestroyItem(MenuItem item) -> bool
7579
7580 Deletes the C++ object this Python object is a proxy for.
7581 """
7582 return _core.Menu_DestroyItem(*args, **kwargs)
7583
7584 def GetMenuItemCount(*args, **kwargs):
7585 """GetMenuItemCount() -> size_t"""
7586 return _core.Menu_GetMenuItemCount(*args, **kwargs)
7587
7588 def GetMenuItems(*args, **kwargs):
7589 """GetMenuItems() -> PyObject"""
7590 return _core.Menu_GetMenuItems(*args, **kwargs)
7591
7592 def FindItem(*args, **kwargs):
7593 """FindItem(String item) -> int"""
7594 return _core.Menu_FindItem(*args, **kwargs)
7595
7596 def FindItemById(*args, **kwargs):
7597 """FindItemById(int id) -> MenuItem"""
7598 return _core.Menu_FindItemById(*args, **kwargs)
7599
7600 def FindItemByPosition(*args, **kwargs):
7601 """FindItemByPosition(size_t position) -> MenuItem"""
7602 return _core.Menu_FindItemByPosition(*args, **kwargs)
7603
7604 def Enable(*args, **kwargs):
7605 """Enable(int id, bool enable)"""
7606 return _core.Menu_Enable(*args, **kwargs)
7607
7608 def IsEnabled(*args, **kwargs):
7609 """IsEnabled(int id) -> bool"""
7610 return _core.Menu_IsEnabled(*args, **kwargs)
7611
7612 def Check(*args, **kwargs):
7613 """Check(int id, bool check)"""
7614 return _core.Menu_Check(*args, **kwargs)
7615
7616 def IsChecked(*args, **kwargs):
7617 """IsChecked(int id) -> bool"""
7618 return _core.Menu_IsChecked(*args, **kwargs)
7619
7620 def SetLabel(*args, **kwargs):
7621 """SetLabel(int id, String label)"""
7622 return _core.Menu_SetLabel(*args, **kwargs)
7623
7624 def GetLabel(*args, **kwargs):
7625 """GetLabel(int id) -> String"""
7626 return _core.Menu_GetLabel(*args, **kwargs)
7627
7628 def SetHelpString(*args, **kwargs):
7629 """SetHelpString(int id, String helpString)"""
7630 return _core.Menu_SetHelpString(*args, **kwargs)
7631
7632 def GetHelpString(*args, **kwargs):
7633 """GetHelpString(int id) -> String"""
7634 return _core.Menu_GetHelpString(*args, **kwargs)
7635
7636 def SetTitle(*args, **kwargs):
7637 """SetTitle(String title)"""
7638 return _core.Menu_SetTitle(*args, **kwargs)
7639
7640 def GetTitle(*args, **kwargs):
7641 """GetTitle() -> String"""
7642 return _core.Menu_GetTitle(*args, **kwargs)
7643
7644 def SetEventHandler(*args, **kwargs):
7645 """SetEventHandler(EvtHandler handler)"""
7646 return _core.Menu_SetEventHandler(*args, **kwargs)
7647
7648 def GetEventHandler(*args, **kwargs):
7649 """GetEventHandler() -> EvtHandler"""
7650 return _core.Menu_GetEventHandler(*args, **kwargs)
7651
7652 def SetInvokingWindow(*args, **kwargs):
7653 """SetInvokingWindow(Window win)"""
7654 return _core.Menu_SetInvokingWindow(*args, **kwargs)
7655
7656 def GetInvokingWindow(*args, **kwargs):
7657 """GetInvokingWindow() -> Window"""
7658 return _core.Menu_GetInvokingWindow(*args, **kwargs)
7659
7660 def GetStyle(*args, **kwargs):
7661 """GetStyle() -> long"""
7662 return _core.Menu_GetStyle(*args, **kwargs)
7663
7664 def UpdateUI(*args, **kwargs):
7665 """UpdateUI(EvtHandler source=None)"""
7666 return _core.Menu_UpdateUI(*args, **kwargs)
7667
7668 def GetMenuBar(*args, **kwargs):
7669 """GetMenuBar() -> MenuBar"""
7670 return _core.Menu_GetMenuBar(*args, **kwargs)
7671
7672 def Attach(*args, **kwargs):
7673 """Attach(wxMenuBarBase menubar)"""
7674 return _core.Menu_Attach(*args, **kwargs)
7675
7676 def Detach(*args, **kwargs):
7677 """Detach()"""
7678 return _core.Menu_Detach(*args, **kwargs)
7679
7680 def IsAttached(*args, **kwargs):
7681 """IsAttached() -> bool"""
7682 return _core.Menu_IsAttached(*args, **kwargs)
7683
7684 def SetParent(*args, **kwargs):
7685 """SetParent(Menu parent)"""
7686 return _core.Menu_SetParent(*args, **kwargs)
7687
7688 def GetParent(*args, **kwargs):
7689 """GetParent() -> Menu"""
7690 return _core.Menu_GetParent(*args, **kwargs)
7691
7692
7693 class MenuPtr(Menu):
7694 def __init__(self, this):
7695 self.this = this
7696 if not hasattr(self,"thisown"): self.thisown = 0
7697 self.__class__ = Menu
7698 _core.Menu_swigregister(MenuPtr)
7699 DefaultValidator = cvar.DefaultValidator
7700
7701 #---------------------------------------------------------------------------
7702
7703 class MenuBar(Window):
7704 def __repr__(self):
7705 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7706 def __init__(self, *args, **kwargs):
7707 """__init__(long style=0) -> MenuBar"""
7708 newobj = _core.new_MenuBar(*args, **kwargs)
7709 self.this = newobj.this
7710 self.thisown = 1
7711 del newobj.thisown
7712 self._setOORInfo(self)
7713
7714 def Append(*args, **kwargs):
7715 """Append(Menu menu, String title) -> bool"""
7716 return _core.MenuBar_Append(*args, **kwargs)
7717
7718 def Insert(*args, **kwargs):
7719 """Insert(size_t pos, Menu menu, String title) -> bool"""
7720 return _core.MenuBar_Insert(*args, **kwargs)
7721
7722 def GetMenuCount(*args, **kwargs):
7723 """GetMenuCount() -> size_t"""
7724 return _core.MenuBar_GetMenuCount(*args, **kwargs)
7725
7726 def GetMenu(*args, **kwargs):
7727 """GetMenu(size_t pos) -> Menu"""
7728 return _core.MenuBar_GetMenu(*args, **kwargs)
7729
7730 def Replace(*args, **kwargs):
7731 """Replace(size_t pos, Menu menu, String title) -> Menu"""
7732 return _core.MenuBar_Replace(*args, **kwargs)
7733
7734 def Remove(*args, **kwargs):
7735 """Remove(size_t pos) -> Menu"""
7736 return _core.MenuBar_Remove(*args, **kwargs)
7737
7738 def EnableTop(*args, **kwargs):
7739 """EnableTop(size_t pos, bool enable)"""
7740 return _core.MenuBar_EnableTop(*args, **kwargs)
7741
7742 def IsEnabledTop(*args, **kwargs):
7743 """IsEnabledTop(size_t pos) -> bool"""
7744 return _core.MenuBar_IsEnabledTop(*args, **kwargs)
7745
7746 def SetLabelTop(*args, **kwargs):
7747 """SetLabelTop(size_t pos, String label)"""
7748 return _core.MenuBar_SetLabelTop(*args, **kwargs)
7749
7750 def GetLabelTop(*args, **kwargs):
7751 """GetLabelTop(size_t pos) -> String"""
7752 return _core.MenuBar_GetLabelTop(*args, **kwargs)
7753
7754 def FindMenuItem(*args, **kwargs):
7755 """FindMenuItem(String menu, String item) -> int"""
7756 return _core.MenuBar_FindMenuItem(*args, **kwargs)
7757
7758 def FindItemById(*args, **kwargs):
7759 """FindItemById(int id) -> MenuItem"""
7760 return _core.MenuBar_FindItemById(*args, **kwargs)
7761
7762 def FindMenu(*args, **kwargs):
7763 """FindMenu(String title) -> int"""
7764 return _core.MenuBar_FindMenu(*args, **kwargs)
7765
7766 def Enable(*args, **kwargs):
7767 """Enable(int id, bool enable)"""
7768 return _core.MenuBar_Enable(*args, **kwargs)
7769
7770 def Check(*args, **kwargs):
7771 """Check(int id, bool check)"""
7772 return _core.MenuBar_Check(*args, **kwargs)
7773
7774 def IsChecked(*args, **kwargs):
7775 """IsChecked(int id) -> bool"""
7776 return _core.MenuBar_IsChecked(*args, **kwargs)
7777
7778 def IsEnabled(*args, **kwargs):
7779 """IsEnabled(int id) -> bool"""
7780 return _core.MenuBar_IsEnabled(*args, **kwargs)
7781
7782 def SetLabel(*args, **kwargs):
7783 """SetLabel(int id, String label)"""
7784 return _core.MenuBar_SetLabel(*args, **kwargs)
7785
7786 def GetLabel(*args, **kwargs):
7787 """GetLabel(int id) -> String"""
7788 return _core.MenuBar_GetLabel(*args, **kwargs)
7789
7790 def SetHelpString(*args, **kwargs):
7791 """SetHelpString(int id, String helpString)"""
7792 return _core.MenuBar_SetHelpString(*args, **kwargs)
7793
7794 def GetHelpString(*args, **kwargs):
7795 """GetHelpString(int id) -> String"""
7796 return _core.MenuBar_GetHelpString(*args, **kwargs)
7797
7798 def GetFrame(*args, **kwargs):
7799 """GetFrame() -> wxFrame"""
7800 return _core.MenuBar_GetFrame(*args, **kwargs)
7801
7802 def IsAttached(*args, **kwargs):
7803 """IsAttached() -> bool"""
7804 return _core.MenuBar_IsAttached(*args, **kwargs)
7805
7806 def Attach(*args, **kwargs):
7807 """Attach(wxFrame frame)"""
7808 return _core.MenuBar_Attach(*args, **kwargs)
7809
7810 def Detach(*args, **kwargs):
7811 """Detach()"""
7812 return _core.MenuBar_Detach(*args, **kwargs)
7813
7814
7815 class MenuBarPtr(MenuBar):
7816 def __init__(self, this):
7817 self.this = this
7818 if not hasattr(self,"thisown"): self.thisown = 0
7819 self.__class__ = MenuBar
7820 _core.MenuBar_swigregister(MenuBarPtr)
7821
7822 #---------------------------------------------------------------------------
7823
7824 class MenuItem(Object):
7825 def __repr__(self):
7826 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7827 def __init__(self, *args, **kwargs):
7828 """
7829 __init__(Menu parentMenu=None, int id=ID_SEPARATOR, String text=EmptyString,
7830 String help=EmptyString, int kind=ITEM_NORMAL,
7831 Menu subMenu=None) -> MenuItem
7832 """
7833 newobj = _core.new_MenuItem(*args, **kwargs)
7834 self.this = newobj.this
7835 self.thisown = 1
7836 del newobj.thisown
7837 def GetMenu(*args, **kwargs):
7838 """GetMenu() -> Menu"""
7839 return _core.MenuItem_GetMenu(*args, **kwargs)
7840
7841 def SetMenu(*args, **kwargs):
7842 """SetMenu(Menu menu)"""
7843 return _core.MenuItem_SetMenu(*args, **kwargs)
7844
7845 def SetId(*args, **kwargs):
7846 """SetId(int id)"""
7847 return _core.MenuItem_SetId(*args, **kwargs)
7848
7849 def GetId(*args, **kwargs):
7850 """GetId() -> int"""
7851 return _core.MenuItem_GetId(*args, **kwargs)
7852
7853 def IsSeparator(*args, **kwargs):
7854 """IsSeparator() -> bool"""
7855 return _core.MenuItem_IsSeparator(*args, **kwargs)
7856
7857 def SetText(*args, **kwargs):
7858 """SetText(String str)"""
7859 return _core.MenuItem_SetText(*args, **kwargs)
7860
7861 def GetLabel(*args, **kwargs):
7862 """GetLabel() -> String"""
7863 return _core.MenuItem_GetLabel(*args, **kwargs)
7864
7865 def GetText(*args, **kwargs):
7866 """GetText() -> String"""
7867 return _core.MenuItem_GetText(*args, **kwargs)
7868
7869 def GetLabelFromText(*args, **kwargs):
7870 """GetLabelFromText(String text) -> String"""
7871 return _core.MenuItem_GetLabelFromText(*args, **kwargs)
7872
7873 GetLabelFromText = staticmethod(GetLabelFromText)
7874 def GetKind(*args, **kwargs):
7875 """GetKind() -> int"""
7876 return _core.MenuItem_GetKind(*args, **kwargs)
7877
7878 def SetCheckable(*args, **kwargs):
7879 """SetCheckable(bool checkable)"""
7880 return _core.MenuItem_SetCheckable(*args, **kwargs)
7881
7882 def IsCheckable(*args, **kwargs):
7883 """IsCheckable() -> bool"""
7884 return _core.MenuItem_IsCheckable(*args, **kwargs)
7885
7886 def IsSubMenu(*args, **kwargs):
7887 """IsSubMenu() -> bool"""
7888 return _core.MenuItem_IsSubMenu(*args, **kwargs)
7889
7890 def SetSubMenu(*args, **kwargs):
7891 """SetSubMenu(Menu menu)"""
7892 return _core.MenuItem_SetSubMenu(*args, **kwargs)
7893
7894 def GetSubMenu(*args, **kwargs):
7895 """GetSubMenu() -> Menu"""
7896 return _core.MenuItem_GetSubMenu(*args, **kwargs)
7897
7898 def Enable(*args, **kwargs):
7899 """Enable(bool enable=True)"""
7900 return _core.MenuItem_Enable(*args, **kwargs)
7901
7902 def IsEnabled(*args, **kwargs):
7903 """IsEnabled() -> bool"""
7904 return _core.MenuItem_IsEnabled(*args, **kwargs)
7905
7906 def Check(*args, **kwargs):
7907 """Check(bool check=True)"""
7908 return _core.MenuItem_Check(*args, **kwargs)
7909
7910 def IsChecked(*args, **kwargs):
7911 """IsChecked() -> bool"""
7912 return _core.MenuItem_IsChecked(*args, **kwargs)
7913
7914 def Toggle(*args, **kwargs):
7915 """Toggle()"""
7916 return _core.MenuItem_Toggle(*args, **kwargs)
7917
7918 def SetHelp(*args, **kwargs):
7919 """SetHelp(String str)"""
7920 return _core.MenuItem_SetHelp(*args, **kwargs)
7921
7922 def GetHelp(*args, **kwargs):
7923 """GetHelp() -> String"""
7924 return _core.MenuItem_GetHelp(*args, **kwargs)
7925
7926 def GetAccel(*args, **kwargs):
7927 """GetAccel() -> AcceleratorEntry"""
7928 return _core.MenuItem_GetAccel(*args, **kwargs)
7929
7930 def SetAccel(*args, **kwargs):
7931 """SetAccel(AcceleratorEntry accel)"""
7932 return _core.MenuItem_SetAccel(*args, **kwargs)
7933
7934 def SetFont(*args, **kwargs):
7935 """SetFont(Font font)"""
7936 return _core.MenuItem_SetFont(*args, **kwargs)
7937
7938 def GetFont(*args, **kwargs):
7939 """GetFont() -> Font"""
7940 return _core.MenuItem_GetFont(*args, **kwargs)
7941
7942 def SetTextColour(*args, **kwargs):
7943 """SetTextColour(Colour colText)"""
7944 return _core.MenuItem_SetTextColour(*args, **kwargs)
7945
7946 def GetTextColour(*args, **kwargs):
7947 """GetTextColour() -> Colour"""
7948 return _core.MenuItem_GetTextColour(*args, **kwargs)
7949
7950 def SetBackgroundColour(*args, **kwargs):
7951 """SetBackgroundColour(Colour colBack)"""
7952 return _core.MenuItem_SetBackgroundColour(*args, **kwargs)
7953
7954 def GetBackgroundColour(*args, **kwargs):
7955 """GetBackgroundColour() -> Colour"""
7956 return _core.MenuItem_GetBackgroundColour(*args, **kwargs)
7957
7958 def SetBitmaps(*args, **kwargs):
7959 """SetBitmaps(Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
7960 return _core.MenuItem_SetBitmaps(*args, **kwargs)
7961
7962 def SetDisabledBitmap(*args, **kwargs):
7963 """SetDisabledBitmap(Bitmap bmpDisabled)"""
7964 return _core.MenuItem_SetDisabledBitmap(*args, **kwargs)
7965
7966 def GetDisabledBitmap(*args, **kwargs):
7967 """GetDisabledBitmap() -> Bitmap"""
7968 return _core.MenuItem_GetDisabledBitmap(*args, **kwargs)
7969
7970 def SetMarginWidth(*args, **kwargs):
7971 """SetMarginWidth(int nWidth)"""
7972 return _core.MenuItem_SetMarginWidth(*args, **kwargs)
7973
7974 def GetMarginWidth(*args, **kwargs):
7975 """GetMarginWidth() -> int"""
7976 return _core.MenuItem_GetMarginWidth(*args, **kwargs)
7977
7978 def GetDefaultMarginWidth(*args, **kwargs):
7979 """GetDefaultMarginWidth() -> int"""
7980 return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
7981
7982 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
7983 def IsOwnerDrawn(*args, **kwargs):
7984 """IsOwnerDrawn() -> bool"""
7985 return _core.MenuItem_IsOwnerDrawn(*args, **kwargs)
7986
7987 def SetOwnerDrawn(*args, **kwargs):
7988 """SetOwnerDrawn(bool ownerDrawn=True)"""
7989 return _core.MenuItem_SetOwnerDrawn(*args, **kwargs)
7990
7991 def ResetOwnerDrawn(*args, **kwargs):
7992 """ResetOwnerDrawn()"""
7993 return _core.MenuItem_ResetOwnerDrawn(*args, **kwargs)
7994
7995 def SetBitmap(*args, **kwargs):
7996 """SetBitmap(Bitmap bitmap)"""
7997 return _core.MenuItem_SetBitmap(*args, **kwargs)
7998
7999 def GetBitmap(*args, **kwargs):
8000 """GetBitmap() -> Bitmap"""
8001 return _core.MenuItem_GetBitmap(*args, **kwargs)
8002
8003
8004 class MenuItemPtr(MenuItem):
8005 def __init__(self, this):
8006 self.this = this
8007 if not hasattr(self,"thisown"): self.thisown = 0
8008 self.__class__ = MenuItem
8009 _core.MenuItem_swigregister(MenuItemPtr)
8010
8011 def MenuItem_GetLabelFromText(*args, **kwargs):
8012 """MenuItem_GetLabelFromText(String text) -> String"""
8013 return _core.MenuItem_GetLabelFromText(*args, **kwargs)
8014
8015 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8016 """MenuItem_GetDefaultMarginWidth() -> int"""
8017 return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8018
8019 #---------------------------------------------------------------------------
8020
8021 class Control(Window):
8022 """
8023 This is the base class for a control or 'widget'.
8024
8025 A control is generally a small window which processes user input and/or
8026 displays one or more item of data.
8027 """
8028 def __repr__(self):
8029 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8030 def __init__(self, *args, **kwargs):
8031 """
8032 __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
8033 long style=0, Validator validator=DefaultValidator,
8034 String name=ControlNameStr) -> Control
8035
8036 Create a Control. Normally you should only call this from a
8037 subclass' __init__ as a plain old wx.Control is not very useful.
8038 """
8039 newobj = _core.new_Control(*args, **kwargs)
8040 self.this = newobj.this
8041 self.thisown = 1
8042 del newobj.thisown
8043 self._setOORInfo(self)
8044
8045 def Create(*args, **kwargs):
8046 """
8047 Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
8048 long style=0, Validator validator=DefaultValidator,
8049 String name=ControlNameStr) -> bool
8050
8051 Do the 2nd phase and create the GUI control.
8052 """
8053 return _core.Control_Create(*args, **kwargs)
8054
8055 def Command(*args, **kwargs):
8056 """
8057 Command(CommandEvent event)
8058
8059 Simulates the effect of the user issuing a command to the
8060 item. See wx.CommandEvent.
8061 """
8062 return _core.Control_Command(*args, **kwargs)
8063
8064 def GetLabel(*args, **kwargs):
8065 """
8066 GetLabel() -> String
8067
8068 Return a control's text.
8069 """
8070 return _core.Control_GetLabel(*args, **kwargs)
8071
8072 def SetLabel(*args, **kwargs):
8073 """
8074 SetLabel(String label)
8075
8076 Sets the item's text.
8077 """
8078 return _core.Control_SetLabel(*args, **kwargs)
8079
8080 def GetClassDefaultAttributes(*args, **kwargs):
8081 """
8082 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8083
8084 Get the default attributes for this class. This is useful if
8085 you want to use the same font or colour in your own control as
8086 in a standard control -- which is a much better idea than hard
8087 coding specific colours or fonts which might look completely out
8088 of place on the users system, especially if it uses themes.
8089
8090 The variant parameter is only relevant under Mac currently and is
8091 ignore under other platforms. Under Mac, it will change the size of the
8092 returned font. See SetWindowVariant for more about this.
8093 """
8094 return _core.Control_GetClassDefaultAttributes(*args, **kwargs)
8095
8096 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8097
8098 class ControlPtr(Control):
8099 def __init__(self, this):
8100 self.this = this
8101 if not hasattr(self,"thisown"): self.thisown = 0
8102 self.__class__ = Control
8103 _core.Control_swigregister(ControlPtr)
8104 ControlNameStr = cvar.ControlNameStr
8105
8106 def PreControl(*args, **kwargs):
8107 """
8108 PreControl() -> Control
8109
8110 Precreate a Control control for 2-phase creation
8111 """
8112 val = _core.new_PreControl(*args, **kwargs)
8113 val.thisown = 1
8114 return val
8115
8116 def Control_GetClassDefaultAttributes(*args, **kwargs):
8117 """
8118 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8119
8120 Get the default attributes for this class. This is useful if
8121 you want to use the same font or colour in your own control as
8122 in a standard control -- which is a much better idea than hard
8123 coding specific colours or fonts which might look completely out
8124 of place on the users system, especially if it uses themes.
8125
8126 The variant parameter is only relevant under Mac currently and is
8127 ignore under other platforms. Under Mac, it will change the size of the
8128 returned font. See SetWindowVariant for more about this.
8129 """
8130 return _core.Control_GetClassDefaultAttributes(*args, **kwargs)
8131
8132 #---------------------------------------------------------------------------
8133
8134 class ItemContainer(object):
8135 """
8136 wx.ItemContainer defines an interface which is implemented by all
8137 controls which have string subitems, each of which may be
8138 selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and
8139 wx.ComboBox (which implements an extended interface deriving from
8140 this one)
8141
8142 It defines the methods for accessing the control's items and
8143 although each of the derived classes implements them differently,
8144 they still all conform to the same interface.
8145
8146 The items in a wx.ItemContainer have (non empty) string labels
8147 and, optionally, client data associated with them.
8148
8149 """
8150 def __init__(self): raise RuntimeError, "No constructor defined"
8151 def __repr__(self):
8152 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8153 def Append(*args, **kwargs):
8154 """
8155 Append(String item, PyObject clientData=None) -> int
8156
8157 Adds the item to the control, associating the given data with the
8158 item if not None. The return value is the index of the newly
8159 added item which may be different from the last one if the
8160 control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style).
8161 """
8162 return _core.ItemContainer_Append(*args, **kwargs)
8163
8164 def AppendItems(*args, **kwargs):
8165 """
8166 AppendItems(wxArrayString strings)
8167
8168 Apend several items at once to the control. Notice that calling
8169 this method may be much faster than appending the items one by
8170 one if you need to add a lot of items.
8171 """
8172 return _core.ItemContainer_AppendItems(*args, **kwargs)
8173
8174 def Insert(*args, **kwargs):
8175 """
8176 Insert(String item, int pos, PyObject clientData=None) -> int
8177
8178 Insert an item into the control before the item at the pos index,
8179 optionally associating some data object with the item.
8180 """
8181 return _core.ItemContainer_Insert(*args, **kwargs)
8182
8183 def Clear(*args, **kwargs):
8184 """
8185 Clear()
8186
8187 Removes all items from the control.
8188 """
8189 return _core.ItemContainer_Clear(*args, **kwargs)
8190
8191 def Delete(*args, **kwargs):
8192 """
8193 Delete(int n)
8194
8195 Deletes the item at the zero-based index 'n' from the control.
8196 Note that it is an error (signalled by a PyAssertionError
8197 exception if enabled) to remove an item with the index negative
8198 or greater or equal than the number of items in the control.
8199 """
8200 return _core.ItemContainer_Delete(*args, **kwargs)
8201
8202 def GetCount(*args, **kwargs):
8203 """
8204 GetCount() -> int
8205
8206 Returns the number of items in the control.
8207 """
8208 return _core.ItemContainer_GetCount(*args, **kwargs)
8209
8210 def IsEmpty(*args, **kwargs):
8211 """
8212 IsEmpty() -> bool
8213
8214 Returns True if the control is empty or False if it has some items.
8215 """
8216 return _core.ItemContainer_IsEmpty(*args, **kwargs)
8217
8218 def GetString(*args, **kwargs):
8219 """
8220 GetString(int n) -> String
8221
8222 Returns the label of the item with the given index.
8223 """
8224 return _core.ItemContainer_GetString(*args, **kwargs)
8225
8226 def GetStrings(*args, **kwargs):
8227 """GetStrings() -> wxArrayString"""
8228 return _core.ItemContainer_GetStrings(*args, **kwargs)
8229
8230 def SetString(*args, **kwargs):
8231 """
8232 SetString(int n, String s)
8233
8234 Sets the label for the given item.
8235 """
8236 return _core.ItemContainer_SetString(*args, **kwargs)
8237
8238 def FindString(*args, **kwargs):
8239 """
8240 FindString(String s) -> int
8241
8242 Finds an item whose label matches the given string. Returns the
8243 zero-based position of the item, or wx.NOT_FOUND if the string
8244 was not found.
8245 """
8246 return _core.ItemContainer_FindString(*args, **kwargs)
8247
8248 def Select(*args, **kwargs):
8249 """
8250 Select(int n)
8251
8252 Sets the item at index 'n' to be the selected item.
8253 """
8254 return _core.ItemContainer_Select(*args, **kwargs)
8255
8256 SetSelection = Select
8257 def GetSelection(*args, **kwargs):
8258 """
8259 GetSelection() -> int
8260
8261 Returns the index of the selected item or wx.NOT_FOUND if no item is selected.
8262 """
8263 return _core.ItemContainer_GetSelection(*args, **kwargs)
8264
8265 def GetStringSelection(*args, **kwargs):
8266 """
8267 GetStringSelection() -> String
8268
8269 Returns the label of the selected item or an empty string if no item is selected.
8270 """
8271 return _core.ItemContainer_GetStringSelection(*args, **kwargs)
8272
8273 def GetClientData(*args, **kwargs):
8274 """
8275 GetClientData(int n) -> PyObject
8276
8277 Returns the client data associated with the given item, (if any.)
8278 """
8279 return _core.ItemContainer_GetClientData(*args, **kwargs)
8280
8281 def SetClientData(*args, **kwargs):
8282 """
8283 SetClientData(int n, PyObject clientData)
8284
8285 Associate the given client data with the item at position n.
8286 """
8287 return _core.ItemContainer_SetClientData(*args, **kwargs)
8288
8289
8290 class ItemContainerPtr(ItemContainer):
8291 def __init__(self, this):
8292 self.this = this
8293 if not hasattr(self,"thisown"): self.thisown = 0
8294 self.__class__ = ItemContainer
8295 _core.ItemContainer_swigregister(ItemContainerPtr)
8296
8297 #---------------------------------------------------------------------------
8298
8299 class ControlWithItems(Control,ItemContainer):
8300 """
8301 wx.ControlWithItems combines the wx.ItemContainer class with the
8302 wx.Control class, and is used for the base class of various
8303 controls that have items.
8304 """
8305 def __init__(self): raise RuntimeError, "No constructor defined"
8306 def __repr__(self):
8307 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8308
8309 class ControlWithItemsPtr(ControlWithItems):
8310 def __init__(self, this):
8311 self.this = this
8312 if not hasattr(self,"thisown"): self.thisown = 0
8313 self.__class__ = ControlWithItems
8314 _core.ControlWithItems_swigregister(ControlWithItemsPtr)
8315
8316 #---------------------------------------------------------------------------
8317
8318 class SizerItem(Object):
8319 def __repr__(self):
8320 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8321 def __init__(self, *args, **kwargs):
8322 """__init__() -> SizerItem"""
8323 newobj = _core.new_SizerItem(*args, **kwargs)
8324 self.this = newobj.this
8325 self.thisown = 1
8326 del newobj.thisown
8327 def DeleteWindows(*args, **kwargs):
8328 """DeleteWindows()"""
8329 return _core.SizerItem_DeleteWindows(*args, **kwargs)
8330
8331 def DetachSizer(*args, **kwargs):
8332 """DetachSizer()"""
8333 return _core.SizerItem_DetachSizer(*args, **kwargs)
8334
8335 def GetSize(*args, **kwargs):
8336 """GetSize() -> Size"""
8337 return _core.SizerItem_GetSize(*args, **kwargs)
8338
8339 def CalcMin(*args, **kwargs):
8340 """CalcMin() -> Size"""
8341 return _core.SizerItem_CalcMin(*args, **kwargs)
8342
8343 def SetDimension(*args, **kwargs):
8344 """SetDimension(Point pos, Size size)"""
8345 return _core.SizerItem_SetDimension(*args, **kwargs)
8346
8347 def GetMinSize(*args, **kwargs):
8348 """GetMinSize() -> Size"""
8349 return _core.SizerItem_GetMinSize(*args, **kwargs)
8350
8351 def SetInitSize(*args, **kwargs):
8352 """SetInitSize(int x, int y)"""
8353 return _core.SizerItem_SetInitSize(*args, **kwargs)
8354
8355 def SetRatioWH(*args, **kwargs):
8356 """SetRatioWH(int width, int height)"""
8357 return _core.SizerItem_SetRatioWH(*args, **kwargs)
8358
8359 def SetRatioSize(*args, **kwargs):
8360 """SetRatioSize(Size size)"""
8361 return _core.SizerItem_SetRatioSize(*args, **kwargs)
8362
8363 def SetRatio(*args, **kwargs):
8364 """SetRatio(float ratio)"""
8365 return _core.SizerItem_SetRatio(*args, **kwargs)
8366
8367 def GetRatio(*args, **kwargs):
8368 """GetRatio() -> float"""
8369 return _core.SizerItem_GetRatio(*args, **kwargs)
8370
8371 def IsWindow(*args, **kwargs):
8372 """IsWindow() -> bool"""
8373 return _core.SizerItem_IsWindow(*args, **kwargs)
8374
8375 def IsSizer(*args, **kwargs):
8376 """IsSizer() -> bool"""
8377 return _core.SizerItem_IsSizer(*args, **kwargs)
8378
8379 def IsSpacer(*args, **kwargs):
8380 """IsSpacer() -> bool"""
8381 return _core.SizerItem_IsSpacer(*args, **kwargs)
8382
8383 def SetProportion(*args, **kwargs):
8384 """SetProportion(int proportion)"""
8385 return _core.SizerItem_SetProportion(*args, **kwargs)
8386
8387 def GetProportion(*args, **kwargs):
8388 """GetProportion() -> int"""
8389 return _core.SizerItem_GetProportion(*args, **kwargs)
8390
8391 SetOption = SetProportion
8392 GetOption = GetProportion
8393 def SetFlag(*args, **kwargs):
8394 """SetFlag(int flag)"""
8395 return _core.SizerItem_SetFlag(*args, **kwargs)
8396
8397 def GetFlag(*args, **kwargs):
8398 """GetFlag() -> int"""
8399 return _core.SizerItem_GetFlag(*args, **kwargs)
8400
8401 def SetBorder(*args, **kwargs):
8402 """SetBorder(int border)"""
8403 return _core.SizerItem_SetBorder(*args, **kwargs)
8404
8405 def GetBorder(*args, **kwargs):
8406 """GetBorder() -> int"""
8407 return _core.SizerItem_GetBorder(*args, **kwargs)
8408
8409 def GetWindow(*args, **kwargs):
8410 """GetWindow() -> Window"""
8411 return _core.SizerItem_GetWindow(*args, **kwargs)
8412
8413 def SetWindow(*args, **kwargs):
8414 """SetWindow(Window window)"""
8415 return _core.SizerItem_SetWindow(*args, **kwargs)
8416
8417 def GetSizer(*args, **kwargs):
8418 """GetSizer() -> Sizer"""
8419 return _core.SizerItem_GetSizer(*args, **kwargs)
8420
8421 def SetSizer(*args, **kwargs):
8422 """SetSizer(Sizer sizer)"""
8423 return _core.SizerItem_SetSizer(*args, **kwargs)
8424
8425 def GetSpacer(*args, **kwargs):
8426 """GetSpacer() -> Size"""
8427 return _core.SizerItem_GetSpacer(*args, **kwargs)
8428
8429 def SetSpacer(*args, **kwargs):
8430 """SetSpacer(Size size)"""
8431 return _core.SizerItem_SetSpacer(*args, **kwargs)
8432
8433 def Show(*args, **kwargs):
8434 """Show(bool show)"""
8435 return _core.SizerItem_Show(*args, **kwargs)
8436
8437 def IsShown(*args, **kwargs):
8438 """IsShown() -> bool"""
8439 return _core.SizerItem_IsShown(*args, **kwargs)
8440
8441 def GetPosition(*args, **kwargs):
8442 """GetPosition() -> Point"""
8443 return _core.SizerItem_GetPosition(*args, **kwargs)
8444
8445 def GetUserData(*args, **kwargs):
8446 """GetUserData() -> PyObject"""
8447 return _core.SizerItem_GetUserData(*args, **kwargs)
8448
8449
8450 class SizerItemPtr(SizerItem):
8451 def __init__(self, this):
8452 self.this = this
8453 if not hasattr(self,"thisown"): self.thisown = 0
8454 self.__class__ = SizerItem
8455 _core.SizerItem_swigregister(SizerItemPtr)
8456
8457 def SizerItemSpacer(*args, **kwargs):
8458 """
8459 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
8460 Object userData) -> SizerItem
8461 """
8462 val = _core.new_SizerItemSpacer(*args, **kwargs)
8463 val.thisown = 1
8464 return val
8465
8466 def SizerItemWindow(*args, **kwargs):
8467 """
8468 SizerItemWindow(Window window, int proportion, int flag, int border,
8469 Object userData) -> SizerItem
8470 """
8471 val = _core.new_SizerItemWindow(*args, **kwargs)
8472 val.thisown = 1
8473 return val
8474
8475 def SizerItemSizer(*args, **kwargs):
8476 """
8477 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
8478 Object userData) -> SizerItem
8479 """
8480 val = _core.new_SizerItemSizer(*args, **kwargs)
8481 val.thisown = 1
8482 return val
8483
8484 class Sizer(Object):
8485 def __init__(self): raise RuntimeError, "No constructor defined"
8486 def __repr__(self):
8487 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8488 def _setOORInfo(*args, **kwargs):
8489 """_setOORInfo(PyObject _self)"""
8490 return _core.Sizer__setOORInfo(*args, **kwargs)
8491
8492 def Add(*args, **kwargs):
8493 """
8494 Add(PyObject item, int proportion=0, int flag=0, int border=0,
8495 PyObject userData=None)
8496 """
8497 return _core.Sizer_Add(*args, **kwargs)
8498
8499 def Insert(*args, **kwargs):
8500 """
8501 Insert(int before, PyObject item, int proportion=0, int flag=0,
8502 int border=0, PyObject userData=None)
8503 """
8504 return _core.Sizer_Insert(*args, **kwargs)
8505
8506 def Prepend(*args, **kwargs):
8507 """
8508 Prepend(PyObject item, int proportion=0, int flag=0, int border=0,
8509 PyObject userData=None)
8510 """
8511 return _core.Sizer_Prepend(*args, **kwargs)
8512
8513 def Remove(*args, **kwargs):
8514 """Remove(PyObject item) -> bool"""
8515 return _core.Sizer_Remove(*args, **kwargs)
8516
8517 def _SetItemMinSize(*args, **kwargs):
8518 """_SetItemMinSize(PyObject item, Size size)"""
8519 return _core.Sizer__SetItemMinSize(*args, **kwargs)
8520
8521 def AddItem(*args, **kwargs):
8522 """AddItem(SizerItem item)"""
8523 return _core.Sizer_AddItem(*args, **kwargs)
8524
8525 def InsertItem(*args, **kwargs):
8526 """InsertItem(size_t index, SizerItem item)"""
8527 return _core.Sizer_InsertItem(*args, **kwargs)
8528
8529 def PrependItem(*args, **kwargs):
8530 """PrependItem(SizerItem item)"""
8531 return _core.Sizer_PrependItem(*args, **kwargs)
8532
8533 def AddMany(self, widgets):
8534 for childinfo in widgets:
8535 if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)):
8536 childinfo = (childinfo, )
8537 self.Add(*childinfo)
8538
8539 # for backwards compatibility only, please do not use in new code
8540 AddWindow = AddSizer = AddSpacer = Add
8541 PrependWindow = PrependSizer = PrependSpacer = Prepend
8542 InsertWindow = InsertSizer = InsertSpacer = Insert
8543 RemoveWindow = RemoveSizer = RemovePos = Remove
8544
8545
8546 def SetItemMinSize(self, item, *args):
8547 if len(args) == 2:
8548 return self._SetItemMinSize(item, args)
8549 else:
8550 return self._SetItemMinSize(item, args[0])
8551
8552 def SetDimension(*args, **kwargs):
8553 """SetDimension(int x, int y, int width, int height)"""
8554 return _core.Sizer_SetDimension(*args, **kwargs)
8555
8556 def SetMinSize(*args, **kwargs):
8557 """SetMinSize(Size size)"""
8558 return _core.Sizer_SetMinSize(*args, **kwargs)
8559
8560 def GetSize(*args, **kwargs):
8561 """GetSize() -> Size"""
8562 return _core.Sizer_GetSize(*args, **kwargs)
8563
8564 def GetPosition(*args, **kwargs):
8565 """GetPosition() -> Point"""
8566 return _core.Sizer_GetPosition(*args, **kwargs)
8567
8568 def GetMinSize(*args, **kwargs):
8569 """GetMinSize() -> Size"""
8570 return _core.Sizer_GetMinSize(*args, **kwargs)
8571
8572 def GetSizeTuple(self):
8573 return self.GetSize().asTuple()
8574 def GetPositionTuple(self):
8575 return self.GetPosition().asTuple()
8576 def GetMinSizeTuple(self):
8577 return self.GetMinSize().asTuple()
8578
8579 def RecalcSizes(*args, **kwargs):
8580 """RecalcSizes()"""
8581 return _core.Sizer_RecalcSizes(*args, **kwargs)
8582
8583 def CalcMin(*args, **kwargs):
8584 """CalcMin() -> Size"""
8585 return _core.Sizer_CalcMin(*args, **kwargs)
8586
8587 def Layout(*args, **kwargs):
8588 """Layout()"""
8589 return _core.Sizer_Layout(*args, **kwargs)
8590
8591 def Fit(*args, **kwargs):
8592 """Fit(Window window) -> Size"""
8593 return _core.Sizer_Fit(*args, **kwargs)
8594
8595 def FitInside(*args, **kwargs):
8596 """FitInside(Window window)"""
8597 return _core.Sizer_FitInside(*args, **kwargs)
8598
8599 def SetSizeHints(*args, **kwargs):
8600 """SetSizeHints(Window window)"""
8601 return _core.Sizer_SetSizeHints(*args, **kwargs)
8602
8603 def SetVirtualSizeHints(*args, **kwargs):
8604 """SetVirtualSizeHints(Window window)"""
8605 return _core.Sizer_SetVirtualSizeHints(*args, **kwargs)
8606
8607 def Clear(*args, **kwargs):
8608 """Clear(bool delete_windows=False)"""
8609 return _core.Sizer_Clear(*args, **kwargs)
8610
8611 def DeleteWindows(*args, **kwargs):
8612 """DeleteWindows()"""
8613 return _core.Sizer_DeleteWindows(*args, **kwargs)
8614
8615 def GetChildren(*args, **kwargs):
8616 """GetChildren() -> PyObject"""
8617 return _core.Sizer_GetChildren(*args, **kwargs)
8618
8619 def Show(*args, **kwargs):
8620 """Show(PyObject item, bool show=True)"""
8621 return _core.Sizer_Show(*args, **kwargs)
8622
8623 def Hide(*args, **kwargs):
8624 """Hide(PyObject item)"""
8625 return _core.Sizer_Hide(*args, **kwargs)
8626
8627 def IsShown(*args, **kwargs):
8628 """IsShown(PyObject item) -> bool"""
8629 return _core.Sizer_IsShown(*args, **kwargs)
8630
8631 def ShowItems(*args, **kwargs):
8632 """ShowItems(bool show)"""
8633 return _core.Sizer_ShowItems(*args, **kwargs)
8634
8635
8636 class SizerPtr(Sizer):
8637 def __init__(self, this):
8638 self.this = this
8639 if not hasattr(self,"thisown"): self.thisown = 0
8640 self.__class__ = Sizer
8641 _core.Sizer_swigregister(SizerPtr)
8642
8643 class PySizer(Sizer):
8644 def __repr__(self):
8645 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8646 def __init__(self, *args, **kwargs):
8647 """__init__() -> PySizer"""
8648 newobj = _core.new_PySizer(*args, **kwargs)
8649 self.this = newobj.this
8650 self.thisown = 1
8651 del newobj.thisown
8652 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
8653
8654 def _setCallbackInfo(*args, **kwargs):
8655 """_setCallbackInfo(PyObject self, PyObject _class)"""
8656 return _core.PySizer__setCallbackInfo(*args, **kwargs)
8657
8658
8659 class PySizerPtr(PySizer):
8660 def __init__(self, this):
8661 self.this = this
8662 if not hasattr(self,"thisown"): self.thisown = 0
8663 self.__class__ = PySizer
8664 _core.PySizer_swigregister(PySizerPtr)
8665
8666 #---------------------------------------------------------------------------
8667
8668 class BoxSizer(Sizer):
8669 def __repr__(self):
8670 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8671 def __init__(self, *args, **kwargs):
8672 """__init__(int orient=HORIZONTAL) -> BoxSizer"""
8673 newobj = _core.new_BoxSizer(*args, **kwargs)
8674 self.this = newobj.this
8675 self.thisown = 1
8676 del newobj.thisown
8677 self._setOORInfo(self)
8678
8679 def GetOrientation(*args, **kwargs):
8680 """GetOrientation() -> int"""
8681 return _core.BoxSizer_GetOrientation(*args, **kwargs)
8682
8683 def SetOrientation(*args, **kwargs):
8684 """SetOrientation(int orient)"""
8685 return _core.BoxSizer_SetOrientation(*args, **kwargs)
8686
8687 def RecalcSizes(*args, **kwargs):
8688 """RecalcSizes()"""
8689 return _core.BoxSizer_RecalcSizes(*args, **kwargs)
8690
8691 def CalcMin(*args, **kwargs):
8692 """CalcMin() -> Size"""
8693 return _core.BoxSizer_CalcMin(*args, **kwargs)
8694
8695
8696 class BoxSizerPtr(BoxSizer):
8697 def __init__(self, this):
8698 self.this = this
8699 if not hasattr(self,"thisown"): self.thisown = 0
8700 self.__class__ = BoxSizer
8701 _core.BoxSizer_swigregister(BoxSizerPtr)
8702
8703 #---------------------------------------------------------------------------
8704
8705 class StaticBoxSizer(BoxSizer):
8706 def __repr__(self):
8707 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8708 def __init__(self, *args, **kwargs):
8709 """__init__(wxStaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer"""
8710 newobj = _core.new_StaticBoxSizer(*args, **kwargs)
8711 self.this = newobj.this
8712 self.thisown = 1
8713 del newobj.thisown
8714 self._setOORInfo(self)
8715
8716 def GetStaticBox(*args, **kwargs):
8717 """GetStaticBox() -> wxStaticBox"""
8718 return _core.StaticBoxSizer_GetStaticBox(*args, **kwargs)
8719
8720 def RecalcSizes(*args, **kwargs):
8721 """RecalcSizes()"""
8722 return _core.StaticBoxSizer_RecalcSizes(*args, **kwargs)
8723
8724 def CalcMin(*args, **kwargs):
8725 """CalcMin() -> Size"""
8726 return _core.StaticBoxSizer_CalcMin(*args, **kwargs)
8727
8728
8729 class StaticBoxSizerPtr(StaticBoxSizer):
8730 def __init__(self, this):
8731 self.this = this
8732 if not hasattr(self,"thisown"): self.thisown = 0
8733 self.__class__ = StaticBoxSizer
8734 _core.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
8735
8736 #---------------------------------------------------------------------------
8737
8738 class GridSizer(Sizer):
8739 def __repr__(self):
8740 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8741 def __init__(self, *args, **kwargs):
8742 """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer"""
8743 newobj = _core.new_GridSizer(*args, **kwargs)
8744 self.this = newobj.this
8745 self.thisown = 1
8746 del newobj.thisown
8747 self._setOORInfo(self)
8748
8749 def RecalcSizes(*args, **kwargs):
8750 """RecalcSizes()"""
8751 return _core.GridSizer_RecalcSizes(*args, **kwargs)
8752
8753 def CalcMin(*args, **kwargs):
8754 """CalcMin() -> Size"""
8755 return _core.GridSizer_CalcMin(*args, **kwargs)
8756
8757 def SetCols(*args, **kwargs):
8758 """SetCols(int cols)"""
8759 return _core.GridSizer_SetCols(*args, **kwargs)
8760
8761 def SetRows(*args, **kwargs):
8762 """SetRows(int rows)"""
8763 return _core.GridSizer_SetRows(*args, **kwargs)
8764
8765 def SetVGap(*args, **kwargs):
8766 """SetVGap(int gap)"""
8767 return _core.GridSizer_SetVGap(*args, **kwargs)
8768
8769 def SetHGap(*args, **kwargs):
8770 """SetHGap(int gap)"""
8771 return _core.GridSizer_SetHGap(*args, **kwargs)
8772
8773 def GetCols(*args, **kwargs):
8774 """GetCols() -> int"""
8775 return _core.GridSizer_GetCols(*args, **kwargs)
8776
8777 def GetRows(*args, **kwargs):
8778 """GetRows() -> int"""
8779 return _core.GridSizer_GetRows(*args, **kwargs)
8780
8781 def GetVGap(*args, **kwargs):
8782 """GetVGap() -> int"""
8783 return _core.GridSizer_GetVGap(*args, **kwargs)
8784
8785 def GetHGap(*args, **kwargs):
8786 """GetHGap() -> int"""
8787 return _core.GridSizer_GetHGap(*args, **kwargs)
8788
8789
8790 class GridSizerPtr(GridSizer):
8791 def __init__(self, this):
8792 self.this = this
8793 if not hasattr(self,"thisown"): self.thisown = 0
8794 self.__class__ = GridSizer
8795 _core.GridSizer_swigregister(GridSizerPtr)
8796
8797 #---------------------------------------------------------------------------
8798
8799 FLEX_GROWMODE_NONE = _core.FLEX_GROWMODE_NONE
8800 FLEX_GROWMODE_SPECIFIED = _core.FLEX_GROWMODE_SPECIFIED
8801 FLEX_GROWMODE_ALL = _core.FLEX_GROWMODE_ALL
8802 class FlexGridSizer(GridSizer):
8803 def __repr__(self):
8804 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8805 def __init__(self, *args, **kwargs):
8806 """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer"""
8807 newobj = _core.new_FlexGridSizer(*args, **kwargs)
8808 self.this = newobj.this
8809 self.thisown = 1
8810 del newobj.thisown
8811 self._setOORInfo(self)
8812
8813 def RecalcSizes(*args, **kwargs):
8814 """RecalcSizes()"""
8815 return _core.FlexGridSizer_RecalcSizes(*args, **kwargs)
8816
8817 def CalcMin(*args, **kwargs):
8818 """CalcMin() -> Size"""
8819 return _core.FlexGridSizer_CalcMin(*args, **kwargs)
8820
8821 def AddGrowableRow(*args, **kwargs):
8822 """AddGrowableRow(size_t idx, int proportion=0)"""
8823 return _core.FlexGridSizer_AddGrowableRow(*args, **kwargs)
8824
8825 def RemoveGrowableRow(*args, **kwargs):
8826 """RemoveGrowableRow(size_t idx)"""
8827 return _core.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
8828
8829 def AddGrowableCol(*args, **kwargs):
8830 """AddGrowableCol(size_t idx, int proportion=0)"""
8831 return _core.FlexGridSizer_AddGrowableCol(*args, **kwargs)
8832
8833 def RemoveGrowableCol(*args, **kwargs):
8834 """RemoveGrowableCol(size_t idx)"""
8835 return _core.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
8836
8837 def SetFlexibleDirection(*args, **kwargs):
8838 """SetFlexibleDirection(int direction)"""
8839 return _core.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
8840
8841 def GetFlexibleDirection(*args, **kwargs):
8842 """GetFlexibleDirection() -> int"""
8843 return _core.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
8844
8845 def SetNonFlexibleGrowMode(*args, **kwargs):
8846 """SetNonFlexibleGrowMode(int mode)"""
8847 return _core.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
8848
8849 def GetNonFlexibleGrowMode(*args, **kwargs):
8850 """GetNonFlexibleGrowMode() -> int"""
8851 return _core.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
8852
8853 def GetRowHeights(*args, **kwargs):
8854 """GetRowHeights() -> wxArrayInt"""
8855 return _core.FlexGridSizer_GetRowHeights(*args, **kwargs)
8856
8857 def GetColWidths(*args, **kwargs):
8858 """GetColWidths() -> wxArrayInt"""
8859 return _core.FlexGridSizer_GetColWidths(*args, **kwargs)
8860
8861
8862 class FlexGridSizerPtr(FlexGridSizer):
8863 def __init__(self, this):
8864 self.this = this
8865 if not hasattr(self,"thisown"): self.thisown = 0
8866 self.__class__ = FlexGridSizer
8867 _core.FlexGridSizer_swigregister(FlexGridSizerPtr)
8868
8869 #---------------------------------------------------------------------------
8870
8871 class GBPosition(object):
8872 def __repr__(self):
8873 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8874 def __init__(self, *args, **kwargs):
8875 """__init__(int row=0, int col=0) -> GBPosition"""
8876 newobj = _core.new_GBPosition(*args, **kwargs)
8877 self.this = newobj.this
8878 self.thisown = 1
8879 del newobj.thisown
8880 def GetRow(*args, **kwargs):
8881 """GetRow() -> int"""
8882 return _core.GBPosition_GetRow(*args, **kwargs)
8883
8884 def GetCol(*args, **kwargs):
8885 """GetCol() -> int"""
8886 return _core.GBPosition_GetCol(*args, **kwargs)
8887
8888 def SetRow(*args, **kwargs):
8889 """SetRow(int row)"""
8890 return _core.GBPosition_SetRow(*args, **kwargs)
8891
8892 def SetCol(*args, **kwargs):
8893 """SetCol(int col)"""
8894 return _core.GBPosition_SetCol(*args, **kwargs)
8895
8896 def __eq__(*args, **kwargs):
8897 """__eq__(GBPosition other) -> bool"""
8898 return _core.GBPosition___eq__(*args, **kwargs)
8899
8900 def __ne__(*args, **kwargs):
8901 """__ne__(GBPosition other) -> bool"""
8902 return _core.GBPosition___ne__(*args, **kwargs)
8903
8904 def Set(*args, **kwargs):
8905 """Set(int row=0, int col=0)"""
8906 return _core.GBPosition_Set(*args, **kwargs)
8907
8908 def Get(*args, **kwargs):
8909 """Get() -> PyObject"""
8910 return _core.GBPosition_Get(*args, **kwargs)
8911
8912 asTuple = Get
8913 def __str__(self): return str(self.Get())
8914 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
8915 def __len__(self): return len(self.Get())
8916 def __getitem__(self, index): return self.Get()[index]
8917 def __setitem__(self, index, val):
8918 if index == 0: self.SetRow(val)
8919 elif index == 1: self.SetCol(val)
8920 else: raise IndexError
8921 def __nonzero__(self): return self.Get() != (0,0)
8922 __safe_for_unpickling__ = True
8923 def __reduce__(self): return (wx.GBPosition, self.Get())
8924
8925 row = property(GetRow, SetRow)
8926 col = property(GetCol, SetCol)
8927
8928
8929 class GBPositionPtr(GBPosition):
8930 def __init__(self, this):
8931 self.this = this
8932 if not hasattr(self,"thisown"): self.thisown = 0
8933 self.__class__ = GBPosition
8934 _core.GBPosition_swigregister(GBPositionPtr)
8935
8936 class GBSpan(object):
8937 def __repr__(self):
8938 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8939 def __init__(self, *args, **kwargs):
8940 """__init__(int rowspan=1, int colspan=1) -> GBSpan"""
8941 newobj = _core.new_GBSpan(*args, **kwargs)
8942 self.this = newobj.this
8943 self.thisown = 1
8944 del newobj.thisown
8945 def GetRowspan(*args, **kwargs):
8946 """GetRowspan() -> int"""
8947 return _core.GBSpan_GetRowspan(*args, **kwargs)
8948
8949 def GetColspan(*args, **kwargs):
8950 """GetColspan() -> int"""
8951 return _core.GBSpan_GetColspan(*args, **kwargs)
8952
8953 def SetRowspan(*args, **kwargs):
8954 """SetRowspan(int rowspan)"""
8955 return _core.GBSpan_SetRowspan(*args, **kwargs)
8956
8957 def SetColspan(*args, **kwargs):
8958 """SetColspan(int colspan)"""
8959 return _core.GBSpan_SetColspan(*args, **kwargs)
8960
8961 def __eq__(*args, **kwargs):
8962 """__eq__(GBSpan other) -> bool"""
8963 return _core.GBSpan___eq__(*args, **kwargs)
8964
8965 def __ne__(*args, **kwargs):
8966 """__ne__(GBSpan other) -> bool"""
8967 return _core.GBSpan___ne__(*args, **kwargs)
8968
8969 def Set(*args, **kwargs):
8970 """Set(int rowspan=1, int colspan=1)"""
8971 return _core.GBSpan_Set(*args, **kwargs)
8972
8973 def Get(*args, **kwargs):
8974 """Get() -> PyObject"""
8975 return _core.GBSpan_Get(*args, **kwargs)
8976
8977 asTuple = Get
8978 def __str__(self): return str(self.Get())
8979 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
8980 def __len__(self): return len(self.Get())
8981 def __getitem__(self, index): return self.Get()[index]
8982 def __setitem__(self, index, val):
8983 if index == 0: self.SetRowspan(val)
8984 elif index == 1: self.SetColspan(val)
8985 else: raise IndexError
8986 def __nonzero__(self): return self.Get() != (0,0)
8987 __safe_for_unpickling__ = True
8988 def __reduce__(self): return (wx.GBSpan, self.Get())
8989
8990 rowspan = property(GetRowspan, SetRowspan)
8991 colspan = property(GetColspan, SetColspan)
8992
8993
8994 class GBSpanPtr(GBSpan):
8995 def __init__(self, this):
8996 self.this = this
8997 if not hasattr(self,"thisown"): self.thisown = 0
8998 self.__class__ = GBSpan
8999 _core.GBSpan_swigregister(GBSpanPtr)
9000
9001 class GBSizerItem(SizerItem):
9002 def __repr__(self):
9003 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9004 def __init__(self, *args, **kwargs):
9005 """__init__() -> GBSizerItem"""
9006 newobj = _core.new_GBSizerItem(*args, **kwargs)
9007 self.this = newobj.this
9008 self.thisown = 1
9009 del newobj.thisown
9010 def GetPos(*args, **kwargs):
9011 """GetPos() -> GBPosition"""
9012 return _core.GBSizerItem_GetPos(*args, **kwargs)
9013
9014 def GetPosTuple(self): return self.GetPos().Get()
9015 def GetSpan(*args, **kwargs):
9016 """GetSpan() -> GBSpan"""
9017 return _core.GBSizerItem_GetSpan(*args, **kwargs)
9018
9019 def GetSpanTuple(self): return self.GetSpan().Get()
9020 def SetPos(*args, **kwargs):
9021 """SetPos(GBPosition pos) -> bool"""
9022 return _core.GBSizerItem_SetPos(*args, **kwargs)
9023
9024 def SetSpan(*args, **kwargs):
9025 """SetSpan(GBSpan span) -> bool"""
9026 return _core.GBSizerItem_SetSpan(*args, **kwargs)
9027
9028 def Intersects(*args):
9029 """
9030 Intersects(GBSizerItem other) -> bool
9031 Intersects(GBPosition pos, GBSpan span) -> bool
9032 """
9033 return _core.GBSizerItem_Intersects(*args)
9034
9035 def GetEndPos(*args, **kwargs):
9036 """GetEndPos(int row, int col)"""
9037 return _core.GBSizerItem_GetEndPos(*args, **kwargs)
9038
9039 def GetGBSizer(*args, **kwargs):
9040 """GetGBSizer() -> GridBagSizer"""
9041 return _core.GBSizerItem_GetGBSizer(*args, **kwargs)
9042
9043 def SetGBSizer(*args, **kwargs):
9044 """SetGBSizer(GridBagSizer sizer)"""
9045 return _core.GBSizerItem_SetGBSizer(*args, **kwargs)
9046
9047
9048 class GBSizerItemPtr(GBSizerItem):
9049 def __init__(self, this):
9050 self.this = this
9051 if not hasattr(self,"thisown"): self.thisown = 0
9052 self.__class__ = GBSizerItem
9053 _core.GBSizerItem_swigregister(GBSizerItemPtr)
9054 DefaultSpan = cvar.DefaultSpan
9055
9056 def GBSizerItemWindow(*args, **kwargs):
9057 """
9058 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
9059 int border, Object userData) -> GBSizerItem
9060 """
9061 val = _core.new_GBSizerItemWindow(*args, **kwargs)
9062 val.thisown = 1
9063 return val
9064
9065 def GBSizerItemSizer(*args, **kwargs):
9066 """
9067 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
9068 int border, Object userData) -> GBSizerItem
9069 """
9070 val = _core.new_GBSizerItemSizer(*args, **kwargs)
9071 val.thisown = 1
9072 return val
9073
9074 def GBSizerItemSpacer(*args, **kwargs):
9075 """
9076 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
9077 int flag, int border, Object userData) -> GBSizerItem
9078 """
9079 val = _core.new_GBSizerItemSpacer(*args, **kwargs)
9080 val.thisown = 1
9081 return val
9082
9083 class GridBagSizer(FlexGridSizer):
9084 def __repr__(self):
9085 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9086 def __init__(self, *args, **kwargs):
9087 """__init__(int vgap=0, int hgap=0) -> GridBagSizer"""
9088 newobj = _core.new_GridBagSizer(*args, **kwargs)
9089 self.this = newobj.this
9090 self.thisown = 1
9091 del newobj.thisown
9092 def Add(*args, **kwargs):
9093 """
9094 Add(PyObject item, GBPosition pos, GBSpan span=DefaultSpan,
9095 int flag=0, int border=0, PyObject userData=None) -> bool
9096 """
9097 return _core.GridBagSizer_Add(*args, **kwargs)
9098
9099 def AddItem(*args, **kwargs):
9100 """AddItem(GBSizerItem item) -> bool"""
9101 return _core.GridBagSizer_AddItem(*args, **kwargs)
9102
9103 def GetEmptyCellSize(*args, **kwargs):
9104 """GetEmptyCellSize() -> Size"""
9105 return _core.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
9106
9107 def SetEmptyCellSize(*args, **kwargs):
9108 """SetEmptyCellSize(Size sz)"""
9109 return _core.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
9110
9111 def GetItemPosition(*args):
9112 """
9113 GetItemPosition(Window window) -> GBPosition
9114 GetItemPosition(Sizer sizer) -> GBPosition
9115 GetItemPosition(size_t index) -> GBPosition
9116 """
9117 return _core.GridBagSizer_GetItemPosition(*args)
9118
9119 def SetItemPosition(*args):
9120 """
9121 SetItemPosition(Window window, GBPosition pos) -> bool
9122 SetItemPosition(Sizer sizer, GBPosition pos) -> bool
9123 SetItemPosition(size_t index, GBPosition pos) -> bool
9124 """
9125 return _core.GridBagSizer_SetItemPosition(*args)
9126
9127 def GetItemSpan(*args):
9128 """
9129 GetItemSpan(Window window) -> GBSpan
9130 GetItemSpan(Sizer sizer) -> GBSpan
9131 GetItemSpan(size_t index) -> GBSpan
9132 """
9133 return _core.GridBagSizer_GetItemSpan(*args)
9134
9135 def SetItemSpan(*args):
9136 """
9137 SetItemSpan(Window window, GBSpan span) -> bool
9138 SetItemSpan(Sizer sizer, GBSpan span) -> bool
9139 SetItemSpan(size_t index, GBSpan span) -> bool
9140 """
9141 return _core.GridBagSizer_SetItemSpan(*args)
9142
9143 def FindItem(*args):
9144 """
9145 FindItem(Window window) -> GBSizerItem
9146 FindItem(Sizer sizer) -> GBSizerItem
9147 """
9148 return _core.GridBagSizer_FindItem(*args)
9149
9150 def FindItemAtPosition(*args, **kwargs):
9151 """FindItemAtPosition(GBPosition pos) -> GBSizerItem"""
9152 return _core.GridBagSizer_FindItemAtPosition(*args, **kwargs)
9153
9154 def FindItemAtPoint(*args, **kwargs):
9155 """FindItemAtPoint(Point pt) -> GBSizerItem"""
9156 return _core.GridBagSizer_FindItemAtPoint(*args, **kwargs)
9157
9158 def FindItemWithData(*args, **kwargs):
9159 """FindItemWithData(Object userData) -> GBSizerItem"""
9160 return _core.GridBagSizer_FindItemWithData(*args, **kwargs)
9161
9162 def RecalcSizes(*args, **kwargs):
9163 """RecalcSizes()"""
9164 return _core.GridBagSizer_RecalcSizes(*args, **kwargs)
9165
9166 def CalcMin(*args, **kwargs):
9167 """CalcMin() -> Size"""
9168 return _core.GridBagSizer_CalcMin(*args, **kwargs)
9169
9170 def CheckForIntersection(*args):
9171 """
9172 CheckForIntersection(GBSizerItem item, GBSizerItem excludeItem=None) -> bool
9173 CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
9174 """
9175 return _core.GridBagSizer_CheckForIntersection(*args)
9176
9177
9178 class GridBagSizerPtr(GridBagSizer):
9179 def __init__(self, this):
9180 self.this = this
9181 if not hasattr(self,"thisown"): self.thisown = 0
9182 self.__class__ = GridBagSizer
9183 _core.GridBagSizer_swigregister(GridBagSizerPtr)
9184
9185 #---------------------------------------------------------------------------
9186
9187 Left = _core.Left
9188 Top = _core.Top
9189 Right = _core.Right
9190 Bottom = _core.Bottom
9191 Width = _core.Width
9192 Height = _core.Height
9193 Centre = _core.Centre
9194 Center = _core.Center
9195 CentreX = _core.CentreX
9196 CentreY = _core.CentreY
9197 Unconstrained = _core.Unconstrained
9198 AsIs = _core.AsIs
9199 PercentOf = _core.PercentOf
9200 Above = _core.Above
9201 Below = _core.Below
9202 LeftOf = _core.LeftOf
9203 RightOf = _core.RightOf
9204 SameAs = _core.SameAs
9205 Absolute = _core.Absolute
9206 class IndividualLayoutConstraint(Object):
9207 """
9208 Objects of this class are stored in the wx.LayoutConstraint class as one of
9209 eight possible constraints that a window can be involved in. You will never
9210 need to create an instance of wx.IndividualLayoutConstraint, rather you should
9211 use create a wx.LayoutContstraints instance and use the individual contstraints
9212 that it contains.
9213
9214 Constraints are initially set to have the relationship wx.Unconstrained, which
9215 means that their values should be calculated by looking at known constraints.
9216
9217 The Edge specifies the type of edge or dimension of a window.
9218
9219 Edges
9220
9221 wx.Left The left edge.
9222 wx.Top The top edge.
9223 wx.Right The right edge.
9224 wx.Bottom The bottom edge.
9225 wx.CentreX The x-coordinate of the centre of the window.
9226 wx.CentreY The y-coordinate of the centre of the window.
9227
9228
9229 The Relationship specifies the relationship that this edge or dimension has
9230 with another specified edge or dimension. Normally, the user doesn't use these
9231 directly because functions such as Below and RightOf are a convenience for
9232 using the more general Set function.
9233
9234 Relationships
9235
9236 wx.Unconstrained The edge or dimension is unconstrained
9237 (the default for edges.)
9238 wx.AsIs The edge or dimension is to be taken from the current
9239 window position or size (the default for dimensions.)
9240 wx.Above The edge should be above another edge.
9241 wx.Below The edge should be below another edge.
9242 wx.LeftOf The edge should be to the left of another edge.
9243 wx.RightOf The edge should be to the right of another edge.
9244 wx.SameAs The edge or dimension should be the same as another edge
9245 or dimension.
9246 wx.PercentOf The edge or dimension should be a percentage of another
9247 edge or dimension.
9248 wx.Absolute The edge or dimension should be a given absolute value.
9249
9250
9251 """
9252 def __init__(self): raise RuntimeError, "No constructor defined"
9253 def __repr__(self):
9254 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9255 def Set(*args, **kwargs):
9256 """Set(int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)"""
9257 return _core.IndividualLayoutConstraint_Set(*args, **kwargs)
9258
9259 def LeftOf(*args, **kwargs):
9260 """
9261 LeftOf(Window sibling, int marg=0)
9262
9263 Sibling relationship
9264 """
9265 return _core.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
9266
9267 def RightOf(*args, **kwargs):
9268 """
9269 RightOf(Window sibling, int marg=0)
9270
9271 Sibling relationship
9272 """
9273 return _core.IndividualLayoutConstraint_RightOf(*args, **kwargs)
9274
9275 def Above(*args, **kwargs):
9276 """
9277 Above(Window sibling, int marg=0)
9278
9279 Sibling relationship
9280 """
9281 return _core.IndividualLayoutConstraint_Above(*args, **kwargs)
9282
9283 def Below(*args, **kwargs):
9284 """
9285 Below(Window sibling, int marg=0)
9286
9287 Sibling relationship
9288 """
9289 return _core.IndividualLayoutConstraint_Below(*args, **kwargs)
9290
9291 def SameAs(*args, **kwargs):
9292 """
9293 SameAs(Window otherW, int edge, int marg=0)
9294
9295 'Same edge' alignment
9296 """
9297 return _core.IndividualLayoutConstraint_SameAs(*args, **kwargs)
9298
9299 def PercentOf(*args, **kwargs):
9300 """
9301 PercentOf(Window otherW, int wh, int per)
9302
9303 The edge is a percentage of the other window's edge
9304 """
9305 return _core.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
9306
9307 def Absolute(*args, **kwargs):
9308 """
9309 Absolute(int val)
9310
9311 Edge has absolute value
9312 """
9313 return _core.IndividualLayoutConstraint_Absolute(*args, **kwargs)
9314
9315 def Unconstrained(*args, **kwargs):
9316 """
9317 Unconstrained()
9318
9319 Dimension is unconstrained
9320 """
9321 return _core.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
9322
9323 def AsIs(*args, **kwargs):
9324 """
9325 AsIs()
9326
9327 Dimension is 'as is' (use current size settings)
9328 """
9329 return _core.IndividualLayoutConstraint_AsIs(*args, **kwargs)
9330
9331 def GetOtherWindow(*args, **kwargs):
9332 """GetOtherWindow() -> Window"""
9333 return _core.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
9334
9335 def GetMyEdge(*args, **kwargs):
9336 """GetMyEdge() -> int"""
9337 return _core.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
9338
9339 def SetEdge(*args, **kwargs):
9340 """SetEdge(int which)"""
9341 return _core.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
9342
9343 def SetValue(*args, **kwargs):
9344 """SetValue(int v)"""
9345 return _core.IndividualLayoutConstraint_SetValue(*args, **kwargs)
9346
9347 def GetMargin(*args, **kwargs):
9348 """GetMargin() -> int"""
9349 return _core.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
9350
9351 def SetMargin(*args, **kwargs):
9352 """SetMargin(int m)"""
9353 return _core.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
9354
9355 def GetValue(*args, **kwargs):
9356 """GetValue() -> int"""
9357 return _core.IndividualLayoutConstraint_GetValue(*args, **kwargs)
9358
9359 def GetPercent(*args, **kwargs):
9360 """GetPercent() -> int"""
9361 return _core.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
9362
9363 def GetOtherEdge(*args, **kwargs):
9364 """GetOtherEdge() -> int"""
9365 return _core.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
9366
9367 def GetDone(*args, **kwargs):
9368 """GetDone() -> bool"""
9369 return _core.IndividualLayoutConstraint_GetDone(*args, **kwargs)
9370
9371 def SetDone(*args, **kwargs):
9372 """SetDone(bool d)"""
9373 return _core.IndividualLayoutConstraint_SetDone(*args, **kwargs)
9374
9375 def GetRelationship(*args, **kwargs):
9376 """GetRelationship() -> int"""
9377 return _core.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
9378
9379 def SetRelationship(*args, **kwargs):
9380 """SetRelationship(int r)"""
9381 return _core.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
9382
9383 def ResetIfWin(*args, **kwargs):
9384 """
9385 ResetIfWin(Window otherW) -> bool
9386
9387 Reset constraint if it mentions otherWin
9388 """
9389 return _core.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
9390
9391 def SatisfyConstraint(*args, **kwargs):
9392 """
9393 SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool
9394
9395 Try to satisfy constraint
9396 """
9397 return _core.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
9398
9399 def GetEdge(*args, **kwargs):
9400 """
9401 GetEdge(int which, Window thisWin, Window other) -> int
9402
9403 Get the value of this edge or dimension, or if this
9404 is not determinable, -1.
9405 """
9406 return _core.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
9407
9408
9409 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
9410 def __init__(self, this):
9411 self.this = this
9412 if not hasattr(self,"thisown"): self.thisown = 0
9413 self.__class__ = IndividualLayoutConstraint
9414 _core.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
9415
9416 class LayoutConstraints(Object):
9417 """
9418 Note: constraints are now deprecated and you should use sizers instead.
9419
9420 Objects of this class can be associated with a window to define its layout
9421 constraints, with respect to siblings or its parent.
9422
9423 The class consists of the following eight constraints of class
9424 wx.IndividualLayoutConstraint, some or all of which should be accessed
9425 directly to set the appropriate constraints.
9426
9427 * left: represents the left hand edge of the window
9428 * right: represents the right hand edge of the window
9429 * top: represents the top edge of the window
9430 * bottom: represents the bottom edge of the window
9431 * width: represents the width of the window
9432 * height: represents the height of the window
9433 * centreX: represents the horizontal centre point of the window
9434 * centreY: represents the vertical centre point of the window
9435
9436 Most constraints are initially set to have the relationship wxUnconstrained,
9437 which means that their values should be calculated by looking at known
9438 constraints. The exceptions are width and height, which are set to wxAsIs to
9439 ensure that if the user does not specify a constraint, the existing width and
9440 height will be used, to be compatible with panel items which often have take a
9441 default size. If the constraint is wxAsIs, the dimension will not be changed.
9442
9443 """
9444 def __repr__(self):
9445 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9446 left = property(_core.LayoutConstraints_left_get)
9447 top = property(_core.LayoutConstraints_top_get)
9448 right = property(_core.LayoutConstraints_right_get)
9449 bottom = property(_core.LayoutConstraints_bottom_get)
9450 width = property(_core.LayoutConstraints_width_get)
9451 height = property(_core.LayoutConstraints_height_get)
9452 centreX = property(_core.LayoutConstraints_centreX_get)
9453 centreY = property(_core.LayoutConstraints_centreY_get)
9454 def __init__(self, *args, **kwargs):
9455 """__init__() -> LayoutConstraints"""
9456 newobj = _core.new_LayoutConstraints(*args, **kwargs)
9457 self.this = newobj.this
9458 self.thisown = 1
9459 del newobj.thisown
9460 def SatisfyConstraints(*args, **kwargs):
9461 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
9462 return _core.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
9463
9464 def AreSatisfied(*args, **kwargs):
9465 """AreSatisfied() -> bool"""
9466 return _core.LayoutConstraints_AreSatisfied(*args, **kwargs)
9467
9468
9469 class LayoutConstraintsPtr(LayoutConstraints):
9470 def __init__(self, this):
9471 self.this = this
9472 if not hasattr(self,"thisown"): self.thisown = 0
9473 self.__class__ = LayoutConstraints
9474 _core.LayoutConstraints_swigregister(LayoutConstraintsPtr)
9475
9476 #----------------------------------------------------------------------------
9477
9478 # Use Python's bool constants if available, make some if not
9479 try:
9480 True
9481 except NameError:
9482 __builtins__.True = 1==1
9483 __builtins__.False = 1==0
9484 def bool(value): return not not value
9485 __builtins__.bool = bool
9486
9487
9488
9489 # workarounds for bad wxRTTI names
9490 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
9491 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
9492 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
9493
9494
9495 #----------------------------------------------------------------------------
9496 # Load version numbers from __version__... Ensure that major and minor
9497 # versions are the same for both wxPython and wxWindows.
9498
9499 from __version__ import *
9500 __version__ = VERSION_STRING
9501
9502 assert MAJOR_VERSION == _core.MAJOR_VERSION, "wxPython/wxWindows version mismatch"
9503 assert MINOR_VERSION == _core.MINOR_VERSION, "wxPython/wxWindows version mismatch"
9504 if RELEASE_VERSION != _core.RELEASE_VERSION:
9505 import warnings
9506 warnings.warn("wxPython/wxWindows release number mismatch")
9507
9508 #----------------------------------------------------------------------------
9509
9510 class PyDeadObjectError(AttributeError):
9511 pass
9512
9513 class _wxPyDeadObject(object):
9514 """
9515 Instances of wx objects that are OOR capable will have their __class__
9516 changed to this class when the C++ object is deleted. This should help
9517 prevent crashes due to referencing a bogus C++ pointer.
9518 """
9519 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
9520 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
9521
9522 def __repr__(self):
9523 if not hasattr(self, "_name"):
9524 self._name = "[unknown]"
9525 return self.reprStr % self._name
9526
9527 def __getattr__(self, *args):
9528 if not hasattr(self, "_name"):
9529 self._name = "[unknown]"
9530 raise PyDeadObjectError(self.attrStr % self._name)
9531
9532 def __nonzero__(self):
9533 return 0
9534
9535
9536
9537 class PyUnbornObjectError(AttributeError):
9538 pass
9539
9540 class _wxPyUnbornObject(object):
9541 """
9542 Some stock objects are created when the wx.core module is
9543 imported, but their C++ instance is not created until the wx.App
9544 object is created and initialized. These object instances will
9545 temporarily have their __class__ changed to this class so an
9546 exception will be raised if they are used before the C++ instance
9547 is ready.
9548 """
9549
9550 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
9551 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
9552
9553 def __repr__(self):
9554 #if not hasattr(self, "_name"):
9555 # self._name = "[unknown]"
9556 return self.reprStr #% self._name
9557
9558 def __getattr__(self, *args):
9559 #if not hasattr(self, "_name"):
9560 # self._name = "[unknown]"
9561 raise PyUnbornObjectError(self.attrStr) # % self._name )
9562
9563 def __nonzero__(self):
9564 return 0
9565
9566
9567 #----------------------------------------------------------------------------
9568 _wxPyCallAfterId = None
9569
9570 def CallAfter(callable, *args, **kw):
9571 """
9572 Call the specified function after the current and pending event
9573 handlers have been completed. This is also good for making GUI
9574 method calls from non-GUI threads.
9575 """
9576 app = wx.GetApp()
9577 assert app, 'No wxApp created yet'
9578
9579 global _wxPyCallAfterId
9580 if _wxPyCallAfterId is None:
9581 _wxPyCallAfterId = wx.NewEventType()
9582 app.Connect(-1, -1, _wxPyCallAfterId,
9583 lambda event: event.callable(*event.args, **event.kw) )
9584 evt = wx.PyEvent()
9585 evt.SetEventType(_wxPyCallAfterId)
9586 evt.callable = callable
9587 evt.args = args
9588 evt.kw = kw
9589 wx.PostEvent(app, evt)
9590
9591
9592 #----------------------------------------------------------------------------
9593
9594
9595 class FutureCall:
9596 """
9597 A convenience class for wx.Timer, that calls the given callable
9598 object once after the given amount of milliseconds, passing any
9599 positional or keyword args. The return value of the callable is
9600 availbale after it has been run with the GetResult method.
9601
9602 If you don't need to get the return value or restart the timer
9603 then there is no need to hold a reference to this object. It will
9604 hold a reference to itself while the timer is running (the timer
9605 has a reference to self.Notify) but the cycle will be broken when
9606 the timer completes, automatically cleaning up the wx.FutureCall
9607 object.
9608 """
9609 def __init__(self, millis, callable, *args, **kwargs):
9610 self.millis = millis
9611 self.callable = callable
9612 self.SetArgs(*args, **kwargs)
9613 self.runCount = 0
9614 self.running = False
9615 self.hasRun = False
9616 self.result = None
9617 self.timer = None
9618 self.Start()
9619
9620 def __del__(self):
9621 self.Stop()
9622
9623
9624 def Start(self, millis=None, *args, **kwargs):
9625 """
9626 (Re)start the timer
9627 """
9628 self.hasRun = False
9629 if millis is not None:
9630 self.millis = millis
9631 if args or kwargs:
9632 self.SetArgs(*args, **kwargs)
9633 self.Stop()
9634 self.timer = wx.PyTimer(self.Notify)
9635 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
9636 self.running = True
9637 Restart = Start
9638
9639
9640 def Stop(self):
9641 """
9642 Stop and destroy the timer.
9643 """
9644 if self.timer is not None:
9645 self.timer.Stop()
9646 self.timer = None
9647
9648
9649 def GetInterval(self):
9650 if self.timer is not None:
9651 return self.timer.GetInterval()
9652 else:
9653 return 0
9654
9655
9656 def IsRunning(self):
9657 return self.timer is not None and self.timer.IsRunning()
9658
9659
9660 def SetArgs(self, *args, **kwargs):
9661 """
9662 (Re)set the args passed to the callable object. This is
9663 useful in conjunction with Restart if you want to schedule a
9664 new call to the same callable object but with different
9665 parameters.
9666 """
9667 self.args = args
9668 self.kwargs = kwargs
9669
9670
9671 def HasRun(self):
9672 return self.hasRun
9673
9674 def GetResult(self):
9675 return self.result
9676
9677 def Notify(self):
9678 """
9679 The timer has expired so call the callable.
9680 """
9681 if self.callable and getattr(self.callable, 'im_self', True):
9682 self.runCount += 1
9683 self.running = False
9684 self.result = self.callable(*self.args, **self.kwargs)
9685 self.hasRun = True
9686 if not self.running:
9687 # if it wasn't restarted, then cleanup
9688 wx.CallAfter(self.Stop)
9689
9690
9691 #----------------------------------------------------------------------------
9692 #----------------------------------------------------------------------------
9693
9694 # Import other modules in this package that should show up in the
9695 # "core" wx namespace
9696 from gdi import *
9697 from windows import *
9698 from controls import *
9699 from misc import *
9700
9701
9702 # Fixup the stock objects since they can't be used yet. (They will be
9703 # restored in wx.PyApp.OnInit.)
9704 _core._wxPyFixStockObjects()
9705
9706 #----------------------------------------------------------------------------
9707 #----------------------------------------------------------------------------
9708
9709