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