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