1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
6 #// Give a reference to the dictionary of this module to the C++ extension
8 _core
._wxPySetDictionary
(vars())
10 #// A little trick to make 'wx' be a reference to this module so wx.Names can
13 wx
= _sys
.modules
[__name__
]
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
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
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
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
112 YES_NO
= _core
.YES_NO
113 CANCEL
= _core
.CANCEL
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
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
196 ID_CANCEL
= _core
.ID_CANCEL
197 ID_APPLY
= _core
.ID_APPLY
198 ID_YES
= _core
.ID_YES
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
216 HIDE_READONLY
= _core
.HIDE_READONLY
217 OVERWRITE_PROMPT
= _core
.OVERWRITE_PROMPT
218 FILE_MUST_EXIST
= _core
.FILE_MUST_EXIST
219 MULTIPLE
= _core
.MULTIPLE
220 CHANGE_DIR
= _core
.CHANGE_DIR
221 ACCEL_ALT
= _core
.ACCEL_ALT
222 ACCEL_CTRL
= _core
.ACCEL_CTRL
223 ACCEL_SHIFT
= _core
.ACCEL_SHIFT
224 ACCEL_NORMAL
= _core
.ACCEL_NORMAL
225 PD_AUTO_HIDE
= _core
.PD_AUTO_HIDE
226 PD_APP_MODAL
= _core
.PD_APP_MODAL
227 PD_CAN_ABORT
= _core
.PD_CAN_ABORT
228 PD_ELAPSED_TIME
= _core
.PD_ELAPSED_TIME
229 PD_ESTIMATED_TIME
= _core
.PD_ESTIMATED_TIME
230 PD_REMAINING_TIME
= _core
.PD_REMAINING_TIME
231 DD_NEW_DIR_BUTTON
= _core
.DD_NEW_DIR_BUTTON
232 DD_DEFAULT_STYLE
= _core
.DD_DEFAULT_STYLE
233 MENU_TEAROFF
= _core
.MENU_TEAROFF
234 MB_DOCKABLE
= _core
.MB_DOCKABLE
235 NO_FULL_REPAINT_ON_RESIZE
= _core
.NO_FULL_REPAINT_ON_RESIZE
236 FULL_REPAINT_ON_RESIZE
= _core
.FULL_REPAINT_ON_RESIZE
237 LI_HORIZONTAL
= _core
.LI_HORIZONTAL
238 LI_VERTICAL
= _core
.LI_VERTICAL
239 WS_EX_VALIDATE_RECURSIVELY
= _core
.WS_EX_VALIDATE_RECURSIVELY
240 WS_EX_BLOCK_EVENTS
= _core
.WS_EX_BLOCK_EVENTS
241 WS_EX_TRANSIENT
= _core
.WS_EX_TRANSIENT
242 WS_EX_THEMED_BACKGROUND
= _core
.WS_EX_THEMED_BACKGROUND
243 WS_EX_PROCESS_IDLE
= _core
.WS_EX_PROCESS_IDLE
244 WS_EX_PROCESS_UI_UPDATES
= _core
.WS_EX_PROCESS_UI_UPDATES
245 MM_TEXT
= _core
.MM_TEXT
246 MM_LOMETRIC
= _core
.MM_LOMETRIC
247 MM_HIMETRIC
= _core
.MM_HIMETRIC
248 MM_LOENGLISH
= _core
.MM_LOENGLISH
249 MM_HIENGLISH
= _core
.MM_HIENGLISH
250 MM_TWIPS
= _core
.MM_TWIPS
251 MM_ISOTROPIC
= _core
.MM_ISOTROPIC
252 MM_ANISOTROPIC
= _core
.MM_ANISOTROPIC
253 MM_POINTS
= _core
.MM_POINTS
254 MM_METRIC
= _core
.MM_METRIC
255 CENTRE
= _core
.CENTRE
256 CENTER
= _core
.CENTER
257 HORIZONTAL
= _core
.HORIZONTAL
258 VERTICAL
= _core
.VERTICAL
265 BOTTOM
= _core
.BOTTOM
271 ALIGN_NOT
= _core
.ALIGN_NOT
272 ALIGN_CENTER_HORIZONTAL
= _core
.ALIGN_CENTER_HORIZONTAL
273 ALIGN_CENTRE_HORIZONTAL
= _core
.ALIGN_CENTRE_HORIZONTAL
274 ALIGN_LEFT
= _core
.ALIGN_LEFT
275 ALIGN_TOP
= _core
.ALIGN_TOP
276 ALIGN_RIGHT
= _core
.ALIGN_RIGHT
277 ALIGN_BOTTOM
= _core
.ALIGN_BOTTOM
278 ALIGN_CENTER_VERTICAL
= _core
.ALIGN_CENTER_VERTICAL
279 ALIGN_CENTRE_VERTICAL
= _core
.ALIGN_CENTRE_VERTICAL
280 ALIGN_CENTER
= _core
.ALIGN_CENTER
281 ALIGN_CENTRE
= _core
.ALIGN_CENTRE
282 ALIGN_MASK
= _core
.ALIGN_MASK
283 STRETCH_NOT
= _core
.STRETCH_NOT
284 SHRINK
= _core
.SHRINK
286 EXPAND
= _core
.EXPAND
287 SHAPED
= _core
.SHAPED
288 ADJUST_MINSIZE
= _core
.ADJUST_MINSIZE
290 BORDER_DEFAULT
= _core
.BORDER_DEFAULT
291 BORDER_NONE
= _core
.BORDER_NONE
292 BORDER_STATIC
= _core
.BORDER_STATIC
293 BORDER_SIMPLE
= _core
.BORDER_SIMPLE
294 BORDER_RAISED
= _core
.BORDER_RAISED
295 BORDER_SUNKEN
= _core
.BORDER_SUNKEN
296 BORDER_DOUBLE
= _core
.BORDER_DOUBLE
297 BORDER_MASK
= _core
.BORDER_MASK
298 DEFAULT
= _core
.DEFAULT
299 DECORATIVE
= _core
.DECORATIVE
301 SCRIPT
= _core
.SCRIPT
303 MODERN
= _core
.MODERN
304 TELETYPE
= _core
.TELETYPE
305 VARIABLE
= _core
.VARIABLE
307 NORMAL
= _core
.NORMAL
310 ITALIC
= _core
.ITALIC
314 LONG_DASH
= _core
.LONG_DASH
315 SHORT_DASH
= _core
.SHORT_DASH
316 DOT_DASH
= _core
.DOT_DASH
317 USER_DASH
= _core
.USER_DASH
318 TRANSPARENT
= _core
.TRANSPARENT
319 STIPPLE
= _core
.STIPPLE
320 BDIAGONAL_HATCH
= _core
.BDIAGONAL_HATCH
321 CROSSDIAG_HATCH
= _core
.CROSSDIAG_HATCH
322 FDIAGONAL_HATCH
= _core
.FDIAGONAL_HATCH
323 CROSS_HATCH
= _core
.CROSS_HATCH
324 HORIZONTAL_HATCH
= _core
.HORIZONTAL_HATCH
325 VERTICAL_HATCH
= _core
.VERTICAL_HATCH
326 JOIN_BEVEL
= _core
.JOIN_BEVEL
327 JOIN_MITER
= _core
.JOIN_MITER
328 JOIN_ROUND
= _core
.JOIN_ROUND
329 CAP_ROUND
= _core
.CAP_ROUND
330 CAP_PROJECTING
= _core
.CAP_PROJECTING
331 CAP_BUTT
= _core
.CAP_BUTT
334 INVERT
= _core
.INVERT
335 OR_REVERSE
= _core
.OR_REVERSE
336 AND_REVERSE
= _core
.AND_REVERSE
339 AND_INVERT
= _core
.AND_INVERT
343 SRC_INVERT
= _core
.SRC_INVERT
344 OR_INVERT
= _core
.OR_INVERT
348 WXK_BACK
= _core
.WXK_BACK
349 WXK_TAB
= _core
.WXK_TAB
350 WXK_RETURN
= _core
.WXK_RETURN
351 WXK_ESCAPE
= _core
.WXK_ESCAPE
352 WXK_SPACE
= _core
.WXK_SPACE
353 WXK_DELETE
= _core
.WXK_DELETE
354 WXK_START
= _core
.WXK_START
355 WXK_LBUTTON
= _core
.WXK_LBUTTON
356 WXK_RBUTTON
= _core
.WXK_RBUTTON
357 WXK_CANCEL
= _core
.WXK_CANCEL
358 WXK_MBUTTON
= _core
.WXK_MBUTTON
359 WXK_CLEAR
= _core
.WXK_CLEAR
360 WXK_SHIFT
= _core
.WXK_SHIFT
361 WXK_ALT
= _core
.WXK_ALT
362 WXK_CONTROL
= _core
.WXK_CONTROL
363 WXK_MENU
= _core
.WXK_MENU
364 WXK_PAUSE
= _core
.WXK_PAUSE
365 WXK_CAPITAL
= _core
.WXK_CAPITAL
366 WXK_PRIOR
= _core
.WXK_PRIOR
367 WXK_NEXT
= _core
.WXK_NEXT
368 WXK_END
= _core
.WXK_END
369 WXK_HOME
= _core
.WXK_HOME
370 WXK_LEFT
= _core
.WXK_LEFT
371 WXK_UP
= _core
.WXK_UP
372 WXK_RIGHT
= _core
.WXK_RIGHT
373 WXK_DOWN
= _core
.WXK_DOWN
374 WXK_SELECT
= _core
.WXK_SELECT
375 WXK_PRINT
= _core
.WXK_PRINT
376 WXK_EXECUTE
= _core
.WXK_EXECUTE
377 WXK_SNAPSHOT
= _core
.WXK_SNAPSHOT
378 WXK_INSERT
= _core
.WXK_INSERT
379 WXK_HELP
= _core
.WXK_HELP
380 WXK_NUMPAD0
= _core
.WXK_NUMPAD0
381 WXK_NUMPAD1
= _core
.WXK_NUMPAD1
382 WXK_NUMPAD2
= _core
.WXK_NUMPAD2
383 WXK_NUMPAD3
= _core
.WXK_NUMPAD3
384 WXK_NUMPAD4
= _core
.WXK_NUMPAD4
385 WXK_NUMPAD5
= _core
.WXK_NUMPAD5
386 WXK_NUMPAD6
= _core
.WXK_NUMPAD6
387 WXK_NUMPAD7
= _core
.WXK_NUMPAD7
388 WXK_NUMPAD8
= _core
.WXK_NUMPAD8
389 WXK_NUMPAD9
= _core
.WXK_NUMPAD9
390 WXK_MULTIPLY
= _core
.WXK_MULTIPLY
391 WXK_ADD
= _core
.WXK_ADD
392 WXK_SEPARATOR
= _core
.WXK_SEPARATOR
393 WXK_SUBTRACT
= _core
.WXK_SUBTRACT
394 WXK_DECIMAL
= _core
.WXK_DECIMAL
395 WXK_DIVIDE
= _core
.WXK_DIVIDE
396 WXK_F1
= _core
.WXK_F1
397 WXK_F2
= _core
.WXK_F2
398 WXK_F3
= _core
.WXK_F3
399 WXK_F4
= _core
.WXK_F4
400 WXK_F5
= _core
.WXK_F5
401 WXK_F6
= _core
.WXK_F6
402 WXK_F7
= _core
.WXK_F7
403 WXK_F8
= _core
.WXK_F8
404 WXK_F9
= _core
.WXK_F9
405 WXK_F10
= _core
.WXK_F10
406 WXK_F11
= _core
.WXK_F11
407 WXK_F12
= _core
.WXK_F12
408 WXK_F13
= _core
.WXK_F13
409 WXK_F14
= _core
.WXK_F14
410 WXK_F15
= _core
.WXK_F15
411 WXK_F16
= _core
.WXK_F16
412 WXK_F17
= _core
.WXK_F17
413 WXK_F18
= _core
.WXK_F18
414 WXK_F19
= _core
.WXK_F19
415 WXK_F20
= _core
.WXK_F20
416 WXK_F21
= _core
.WXK_F21
417 WXK_F22
= _core
.WXK_F22
418 WXK_F23
= _core
.WXK_F23
419 WXK_F24
= _core
.WXK_F24
420 WXK_NUMLOCK
= _core
.WXK_NUMLOCK
421 WXK_SCROLL
= _core
.WXK_SCROLL
422 WXK_PAGEUP
= _core
.WXK_PAGEUP
423 WXK_PAGEDOWN
= _core
.WXK_PAGEDOWN
424 WXK_NUMPAD_SPACE
= _core
.WXK_NUMPAD_SPACE
425 WXK_NUMPAD_TAB
= _core
.WXK_NUMPAD_TAB
426 WXK_NUMPAD_ENTER
= _core
.WXK_NUMPAD_ENTER
427 WXK_NUMPAD_F1
= _core
.WXK_NUMPAD_F1
428 WXK_NUMPAD_F2
= _core
.WXK_NUMPAD_F2
429 WXK_NUMPAD_F3
= _core
.WXK_NUMPAD_F3
430 WXK_NUMPAD_F4
= _core
.WXK_NUMPAD_F4
431 WXK_NUMPAD_HOME
= _core
.WXK_NUMPAD_HOME
432 WXK_NUMPAD_LEFT
= _core
.WXK_NUMPAD_LEFT
433 WXK_NUMPAD_UP
= _core
.WXK_NUMPAD_UP
434 WXK_NUMPAD_RIGHT
= _core
.WXK_NUMPAD_RIGHT
435 WXK_NUMPAD_DOWN
= _core
.WXK_NUMPAD_DOWN
436 WXK_NUMPAD_PRIOR
= _core
.WXK_NUMPAD_PRIOR
437 WXK_NUMPAD_PAGEUP
= _core
.WXK_NUMPAD_PAGEUP
438 WXK_NUMPAD_NEXT
= _core
.WXK_NUMPAD_NEXT
439 WXK_NUMPAD_PAGEDOWN
= _core
.WXK_NUMPAD_PAGEDOWN
440 WXK_NUMPAD_END
= _core
.WXK_NUMPAD_END
441 WXK_NUMPAD_BEGIN
= _core
.WXK_NUMPAD_BEGIN
442 WXK_NUMPAD_INSERT
= _core
.WXK_NUMPAD_INSERT
443 WXK_NUMPAD_DELETE
= _core
.WXK_NUMPAD_DELETE
444 WXK_NUMPAD_EQUAL
= _core
.WXK_NUMPAD_EQUAL
445 WXK_NUMPAD_MULTIPLY
= _core
.WXK_NUMPAD_MULTIPLY
446 WXK_NUMPAD_ADD
= _core
.WXK_NUMPAD_ADD
447 WXK_NUMPAD_SEPARATOR
= _core
.WXK_NUMPAD_SEPARATOR
448 WXK_NUMPAD_SUBTRACT
= _core
.WXK_NUMPAD_SUBTRACT
449 WXK_NUMPAD_DECIMAL
= _core
.WXK_NUMPAD_DECIMAL
450 WXK_NUMPAD_DIVIDE
= _core
.WXK_NUMPAD_DIVIDE
451 WXK_WINDOWS_LEFT
= _core
.WXK_WINDOWS_LEFT
452 WXK_WINDOWS_RIGHT
= _core
.WXK_WINDOWS_RIGHT
453 WXK_WINDOWS_MENU
= _core
.WXK_WINDOWS_MENU
454 PAPER_NONE
= _core
.PAPER_NONE
455 PAPER_LETTER
= _core
.PAPER_LETTER
456 PAPER_LEGAL
= _core
.PAPER_LEGAL
457 PAPER_A4
= _core
.PAPER_A4
458 PAPER_CSHEET
= _core
.PAPER_CSHEET
459 PAPER_DSHEET
= _core
.PAPER_DSHEET
460 PAPER_ESHEET
= _core
.PAPER_ESHEET
461 PAPER_LETTERSMALL
= _core
.PAPER_LETTERSMALL
462 PAPER_TABLOID
= _core
.PAPER_TABLOID
463 PAPER_LEDGER
= _core
.PAPER_LEDGER
464 PAPER_STATEMENT
= _core
.PAPER_STATEMENT
465 PAPER_EXECUTIVE
= _core
.PAPER_EXECUTIVE
466 PAPER_A3
= _core
.PAPER_A3
467 PAPER_A4SMALL
= _core
.PAPER_A4SMALL
468 PAPER_A5
= _core
.PAPER_A5
469 PAPER_B4
= _core
.PAPER_B4
470 PAPER_B5
= _core
.PAPER_B5
471 PAPER_FOLIO
= _core
.PAPER_FOLIO
472 PAPER_QUARTO
= _core
.PAPER_QUARTO
473 PAPER_10X14
= _core
.PAPER_10X14
474 PAPER_11X17
= _core
.PAPER_11X17
475 PAPER_NOTE
= _core
.PAPER_NOTE
476 PAPER_ENV_9
= _core
.PAPER_ENV_9
477 PAPER_ENV_10
= _core
.PAPER_ENV_10
478 PAPER_ENV_11
= _core
.PAPER_ENV_11
479 PAPER_ENV_12
= _core
.PAPER_ENV_12
480 PAPER_ENV_14
= _core
.PAPER_ENV_14
481 PAPER_ENV_DL
= _core
.PAPER_ENV_DL
482 PAPER_ENV_C5
= _core
.PAPER_ENV_C5
483 PAPER_ENV_C3
= _core
.PAPER_ENV_C3
484 PAPER_ENV_C4
= _core
.PAPER_ENV_C4
485 PAPER_ENV_C6
= _core
.PAPER_ENV_C6
486 PAPER_ENV_C65
= _core
.PAPER_ENV_C65
487 PAPER_ENV_B4
= _core
.PAPER_ENV_B4
488 PAPER_ENV_B5
= _core
.PAPER_ENV_B5
489 PAPER_ENV_B6
= _core
.PAPER_ENV_B6
490 PAPER_ENV_ITALY
= _core
.PAPER_ENV_ITALY
491 PAPER_ENV_MONARCH
= _core
.PAPER_ENV_MONARCH
492 PAPER_ENV_PERSONAL
= _core
.PAPER_ENV_PERSONAL
493 PAPER_FANFOLD_US
= _core
.PAPER_FANFOLD_US
494 PAPER_FANFOLD_STD_GERMAN
= _core
.PAPER_FANFOLD_STD_GERMAN
495 PAPER_FANFOLD_LGL_GERMAN
= _core
.PAPER_FANFOLD_LGL_GERMAN
496 PAPER_ISO_B4
= _core
.PAPER_ISO_B4
497 PAPER_JAPANESE_POSTCARD
= _core
.PAPER_JAPANESE_POSTCARD
498 PAPER_9X11
= _core
.PAPER_9X11
499 PAPER_10X11
= _core
.PAPER_10X11
500 PAPER_15X11
= _core
.PAPER_15X11
501 PAPER_ENV_INVITE
= _core
.PAPER_ENV_INVITE
502 PAPER_LETTER_EXTRA
= _core
.PAPER_LETTER_EXTRA
503 PAPER_LEGAL_EXTRA
= _core
.PAPER_LEGAL_EXTRA
504 PAPER_TABLOID_EXTRA
= _core
.PAPER_TABLOID_EXTRA
505 PAPER_A4_EXTRA
= _core
.PAPER_A4_EXTRA
506 PAPER_LETTER_TRANSVERSE
= _core
.PAPER_LETTER_TRANSVERSE
507 PAPER_A4_TRANSVERSE
= _core
.PAPER_A4_TRANSVERSE
508 PAPER_LETTER_EXTRA_TRANSVERSE
= _core
.PAPER_LETTER_EXTRA_TRANSVERSE
509 PAPER_A_PLUS
= _core
.PAPER_A_PLUS
510 PAPER_B_PLUS
= _core
.PAPER_B_PLUS
511 PAPER_LETTER_PLUS
= _core
.PAPER_LETTER_PLUS
512 PAPER_A4_PLUS
= _core
.PAPER_A4_PLUS
513 PAPER_A5_TRANSVERSE
= _core
.PAPER_A5_TRANSVERSE
514 PAPER_B5_TRANSVERSE
= _core
.PAPER_B5_TRANSVERSE
515 PAPER_A3_EXTRA
= _core
.PAPER_A3_EXTRA
516 PAPER_A5_EXTRA
= _core
.PAPER_A5_EXTRA
517 PAPER_B5_EXTRA
= _core
.PAPER_B5_EXTRA
518 PAPER_A2
= _core
.PAPER_A2
519 PAPER_A3_TRANSVERSE
= _core
.PAPER_A3_TRANSVERSE
520 PAPER_A3_EXTRA_TRANSVERSE
= _core
.PAPER_A3_EXTRA_TRANSVERSE
521 DUPLEX_SIMPLEX
= _core
.DUPLEX_SIMPLEX
522 DUPLEX_HORIZONTAL
= _core
.DUPLEX_HORIZONTAL
523 DUPLEX_VERTICAL
= _core
.DUPLEX_VERTICAL
524 ITEM_SEPARATOR
= _core
.ITEM_SEPARATOR
525 ITEM_NORMAL
= _core
.ITEM_NORMAL
526 ITEM_CHECK
= _core
.ITEM_CHECK
527 ITEM_RADIO
= _core
.ITEM_RADIO
528 ITEM_MAX
= _core
.ITEM_MAX
529 HT_NOWHERE
= _core
.HT_NOWHERE
530 HT_SCROLLBAR_FIRST
= _core
.HT_SCROLLBAR_FIRST
531 HT_SCROLLBAR_ARROW_LINE_1
= _core
.HT_SCROLLBAR_ARROW_LINE_1
532 HT_SCROLLBAR_ARROW_LINE_2
= _core
.HT_SCROLLBAR_ARROW_LINE_2
533 HT_SCROLLBAR_ARROW_PAGE_1
= _core
.HT_SCROLLBAR_ARROW_PAGE_1
534 HT_SCROLLBAR_ARROW_PAGE_2
= _core
.HT_SCROLLBAR_ARROW_PAGE_2
535 HT_SCROLLBAR_THUMB
= _core
.HT_SCROLLBAR_THUMB
536 HT_SCROLLBAR_BAR_1
= _core
.HT_SCROLLBAR_BAR_1
537 HT_SCROLLBAR_BAR_2
= _core
.HT_SCROLLBAR_BAR_2
538 HT_SCROLLBAR_LAST
= _core
.HT_SCROLLBAR_LAST
539 HT_WINDOW_OUTSIDE
= _core
.HT_WINDOW_OUTSIDE
540 HT_WINDOW_INSIDE
= _core
.HT_WINDOW_INSIDE
541 HT_WINDOW_VERT_SCROLLBAR
= _core
.HT_WINDOW_VERT_SCROLLBAR
542 HT_WINDOW_HORZ_SCROLLBAR
= _core
.HT_WINDOW_HORZ_SCROLLBAR
543 HT_WINDOW_CORNER
= _core
.HT_WINDOW_CORNER
544 HT_MAX
= _core
.HT_MAX
545 MOD_NONE
= _core
.MOD_NONE
546 MOD_ALT
= _core
.MOD_ALT
547 MOD_CONTROL
= _core
.MOD_CONTROL
548 MOD_SHIFT
= _core
.MOD_SHIFT
549 MOD_WIN
= _core
.MOD_WIN
550 UPDATE_UI_NONE
= _core
.UPDATE_UI_NONE
551 UPDATE_UI_RECURSE
= _core
.UPDATE_UI_RECURSE
552 UPDATE_UI_FROMIDLE
= _core
.UPDATE_UI_FROMIDLE
553 #---------------------------------------------------------------------------
555 class Object(object):
557 The base class for most wx objects, although in wxPython not
558 much functionality is needed nor exposed.
560 def __init__(self
): raise RuntimeError, "No constructor defined"
562 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
563 def GetClassName(*args
, **kwargs
):
565 GetClassName() -> String
567 Returns the class name of the C++ object using wxRTTI.
569 return _core
.Object_GetClassName(*args
, **kwargs
)
571 def Destroy(*args
, **kwargs
):
575 Deletes the C++ object this Python object is a proxy for.
577 return _core
.Object_Destroy(*args
, **kwargs
)
580 class ObjectPtr(Object
):
581 def __init__(self
, this
):
583 if not hasattr(self
,"thisown"): self
.thisown
= 0
584 self
.__class
__ = Object
585 _core
.Object_swigregister(ObjectPtr
)
586 _wxPySetDictionary
= _core
._wxPySetDictionary
588 _wxPyFixStockObjects
= _core
._wxPyFixStockObjects
591 EmptyString
= cvar
.EmptyString
593 #---------------------------------------------------------------------------
595 BITMAP_TYPE_INVALID
= _core
.BITMAP_TYPE_INVALID
596 BITMAP_TYPE_BMP
= _core
.BITMAP_TYPE_BMP
597 BITMAP_TYPE_ICO
= _core
.BITMAP_TYPE_ICO
598 BITMAP_TYPE_CUR
= _core
.BITMAP_TYPE_CUR
599 BITMAP_TYPE_XBM
= _core
.BITMAP_TYPE_XBM
600 BITMAP_TYPE_XBM_DATA
= _core
.BITMAP_TYPE_XBM_DATA
601 BITMAP_TYPE_XPM
= _core
.BITMAP_TYPE_XPM
602 BITMAP_TYPE_XPM_DATA
= _core
.BITMAP_TYPE_XPM_DATA
603 BITMAP_TYPE_TIF
= _core
.BITMAP_TYPE_TIF
604 BITMAP_TYPE_GIF
= _core
.BITMAP_TYPE_GIF
605 BITMAP_TYPE_PNG
= _core
.BITMAP_TYPE_PNG
606 BITMAP_TYPE_JPEG
= _core
.BITMAP_TYPE_JPEG
607 BITMAP_TYPE_PNM
= _core
.BITMAP_TYPE_PNM
608 BITMAP_TYPE_PCX
= _core
.BITMAP_TYPE_PCX
609 BITMAP_TYPE_PICT
= _core
.BITMAP_TYPE_PICT
610 BITMAP_TYPE_ICON
= _core
.BITMAP_TYPE_ICON
611 BITMAP_TYPE_ANI
= _core
.BITMAP_TYPE_ANI
612 BITMAP_TYPE_IFF
= _core
.BITMAP_TYPE_IFF
613 BITMAP_TYPE_MACCURSOR
= _core
.BITMAP_TYPE_MACCURSOR
614 BITMAP_TYPE_ANY
= _core
.BITMAP_TYPE_ANY
615 CURSOR_NONE
= _core
.CURSOR_NONE
616 CURSOR_ARROW
= _core
.CURSOR_ARROW
617 CURSOR_RIGHT_ARROW
= _core
.CURSOR_RIGHT_ARROW
618 CURSOR_BULLSEYE
= _core
.CURSOR_BULLSEYE
619 CURSOR_CHAR
= _core
.CURSOR_CHAR
620 CURSOR_CROSS
= _core
.CURSOR_CROSS
621 CURSOR_HAND
= _core
.CURSOR_HAND
622 CURSOR_IBEAM
= _core
.CURSOR_IBEAM
623 CURSOR_LEFT_BUTTON
= _core
.CURSOR_LEFT_BUTTON
624 CURSOR_MAGNIFIER
= _core
.CURSOR_MAGNIFIER
625 CURSOR_MIDDLE_BUTTON
= _core
.CURSOR_MIDDLE_BUTTON
626 CURSOR_NO_ENTRY
= _core
.CURSOR_NO_ENTRY
627 CURSOR_PAINT_BRUSH
= _core
.CURSOR_PAINT_BRUSH
628 CURSOR_PENCIL
= _core
.CURSOR_PENCIL
629 CURSOR_POINT_LEFT
= _core
.CURSOR_POINT_LEFT
630 CURSOR_POINT_RIGHT
= _core
.CURSOR_POINT_RIGHT
631 CURSOR_QUESTION_ARROW
= _core
.CURSOR_QUESTION_ARROW
632 CURSOR_RIGHT_BUTTON
= _core
.CURSOR_RIGHT_BUTTON
633 CURSOR_SIZENESW
= _core
.CURSOR_SIZENESW
634 CURSOR_SIZENS
= _core
.CURSOR_SIZENS
635 CURSOR_SIZENWSE
= _core
.CURSOR_SIZENWSE
636 CURSOR_SIZEWE
= _core
.CURSOR_SIZEWE
637 CURSOR_SIZING
= _core
.CURSOR_SIZING
638 CURSOR_SPRAYCAN
= _core
.CURSOR_SPRAYCAN
639 CURSOR_WAIT
= _core
.CURSOR_WAIT
640 CURSOR_WATCH
= _core
.CURSOR_WATCH
641 CURSOR_BLANK
= _core
.CURSOR_BLANK
642 CURSOR_DEFAULT
= _core
.CURSOR_DEFAULT
643 CURSOR_COPY_ARROW
= _core
.CURSOR_COPY_ARROW
644 CURSOR_ARROWWAIT
= _core
.CURSOR_ARROWWAIT
645 CURSOR_MAX
= _core
.CURSOR_MAX
646 #---------------------------------------------------------------------------
650 wx.Size is a useful data structure used to represent the size of something.
651 It simply contians integer width and height proprtites. In most places in
652 wxPython where a wx.Size is expected a (width,height) tuple can be used
656 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
657 width
= property(_core
.Size_width_get
, _core
.Size_width_set
)
658 height
= property(_core
.Size_height_get
, _core
.Size_height_set
)
659 x
= width
; y
= height
660 def __init__(self
, *args
, **kwargs
):
662 __init__(int w=0, int h=0) -> Size
664 Creates a size object.
666 newobj
= _core
.new_Size(*args
, **kwargs
)
667 self
.this
= newobj
.this
670 def __del__(self
, destroy
=_core
.delete_Size
):
673 if self
.thisown
: destroy(self
)
676 def __eq__(*args
, **kwargs
):
678 __eq__(Size sz) -> bool
680 Test for equality of wx.Size objects.
682 return _core
.Size___eq__(*args
, **kwargs
)
684 def __ne__(*args
, **kwargs
):
686 __ne__(Size sz) -> bool
690 return _core
.Size___ne__(*args
, **kwargs
)
692 def __add__(*args
, **kwargs
):
694 __add__(Size sz) -> Size
696 Add sz's proprties to this and return the result.
698 return _core
.Size___add__(*args
, **kwargs
)
700 def __sub__(*args
, **kwargs
):
702 __sub__(Size sz) -> Size
704 Subtract sz's properties from this and return the result.
706 return _core
.Size___sub__(*args
, **kwargs
)
708 def IncTo(*args
, **kwargs
):
712 Increments this object so that both of its dimensions are not less
713 than the corresponding dimensions of the size.
715 return _core
.Size_IncTo(*args
, **kwargs
)
717 def DecTo(*args
, **kwargs
):
721 Decrements this object so that both of its dimensions are not greater
722 than the corresponding dimensions of the size.
724 return _core
.Size_DecTo(*args
, **kwargs
)
726 def Set(*args
, **kwargs
):
730 Set both width and height.
732 return _core
.Size_Set(*args
, **kwargs
)
734 def SetWidth(*args
, **kwargs
):
735 """SetWidth(int w)"""
736 return _core
.Size_SetWidth(*args
, **kwargs
)
738 def SetHeight(*args
, **kwargs
):
739 """SetHeight(int h)"""
740 return _core
.Size_SetHeight(*args
, **kwargs
)
742 def GetWidth(*args
, **kwargs
):
743 """GetWidth() -> int"""
744 return _core
.Size_GetWidth(*args
, **kwargs
)
746 def GetHeight(*args
, **kwargs
):
747 """GetHeight() -> int"""
748 return _core
.Size_GetHeight(*args
, **kwargs
)
750 def Get(*args
, **kwargs
):
752 Get() -> (width,height)
754 Returns the width and height properties as a tuple.
756 return _core
.Size_Get(*args
, **kwargs
)
759 def __str__(self
): return str(self
.Get())
760 def __repr__(self
): return 'wx.Size'+str(self
.Get())
761 def __len__(self
): return len(self
.Get())
762 def __getitem__(self
, index
): return self
.Get()[index
]
763 def __setitem__(self
, index
, val
):
764 if index
== 0: self
.width
= val
765 elif index
== 1: self
.height
= val
766 else: raise IndexError
767 def __nonzero__(self
): return self
.Get() != (0,0)
768 __safe_for_unpickling__
= True
769 def __reduce__(self
): return (wx
.Size
, self
.Get())
773 def __init__(self
, this
):
775 if not hasattr(self
,"thisown"): self
.thisown
= 0
776 self
.__class
__ = Size
777 _core
.Size_swigregister(SizePtr
)
779 #---------------------------------------------------------------------------
781 class RealPoint(object):
783 A data structure for representing a point or position with floating point x
784 and y properties. In wxPython most places that expect a wx.RealPoint can also
785 accept a (x,y) tuple.
788 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
789 x
= property(_core
.RealPoint_x_get
, _core
.RealPoint_x_set
)
790 y
= property(_core
.RealPoint_y_get
, _core
.RealPoint_y_set
)
791 def __init__(self
, *args
, **kwargs
):
793 __init__(double x=0.0, double y=0.0) -> RealPoint
795 Create a wx.RealPoint object
797 newobj
= _core
.new_RealPoint(*args
, **kwargs
)
798 self
.this
= newobj
.this
801 def __del__(self
, destroy
=_core
.delete_RealPoint
):
804 if self
.thisown
: destroy(self
)
807 def __eq__(*args
, **kwargs
):
809 __eq__(RealPoint pt) -> bool
811 Test for equality of wx.RealPoint objects.
813 return _core
.RealPoint___eq__(*args
, **kwargs
)
815 def __ne__(*args
, **kwargs
):
817 __ne__(RealPoint pt) -> bool
819 Test for inequality of wx.RealPoint objects.
821 return _core
.RealPoint___ne__(*args
, **kwargs
)
823 def __add__(*args
, **kwargs
):
825 __add__(RealPoint pt) -> RealPoint
827 Add pt's proprties to this and return the result.
829 return _core
.RealPoint___add__(*args
, **kwargs
)
831 def __sub__(*args
, **kwargs
):
833 __sub__(RealPoint pt) -> RealPoint
835 Subtract pt's proprties from this and return the result
837 return _core
.RealPoint___sub__(*args
, **kwargs
)
839 def Set(*args
, **kwargs
):
841 Set(double x, double y)
843 Set both the x and y properties
845 return _core
.RealPoint_Set(*args
, **kwargs
)
847 def Get(*args
, **kwargs
):
851 Return the x and y properties as a tuple.
853 return _core
.RealPoint_Get(*args
, **kwargs
)
856 def __str__(self
): return str(self
.Get())
857 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
858 def __len__(self
): return len(self
.Get())
859 def __getitem__(self
, index
): return self
.Get()[index
]
860 def __setitem__(self
, index
, val
):
861 if index
== 0: self
.x
= val
862 elif index
== 1: self
.y
= val
863 else: raise IndexError
864 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
865 __safe_for_unpickling__
= True
866 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
869 class RealPointPtr(RealPoint
):
870 def __init__(self
, this
):
872 if not hasattr(self
,"thisown"): self
.thisown
= 0
873 self
.__class
__ = RealPoint
874 _core
.RealPoint_swigregister(RealPointPtr
)
876 #---------------------------------------------------------------------------
880 A data structure for representing a point or position with integer x and y
881 properties. Most places in wxPython that expect a wx.Point can also accept a
885 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
886 x
= property(_core
.Point_x_get
, _core
.Point_x_set
)
887 y
= property(_core
.Point_y_get
, _core
.Point_y_set
)
888 def __init__(self
, *args
, **kwargs
):
890 __init__(int x=0, int y=0) -> Point
892 Create a wx.Point object
894 newobj
= _core
.new_Point(*args
, **kwargs
)
895 self
.this
= newobj
.this
898 def __del__(self
, destroy
=_core
.delete_Point
):
901 if self
.thisown
: destroy(self
)
904 def __eq__(*args
, **kwargs
):
906 __eq__(Point pt) -> bool
908 Test for equality of wx.Point objects.
910 return _core
.Point___eq__(*args
, **kwargs
)
912 def __ne__(*args
, **kwargs
):
914 __ne__(Point pt) -> bool
916 Test for inequality of wx.Point objects.
918 return _core
.Point___ne__(*args
, **kwargs
)
920 def __add__(*args
, **kwargs
):
922 __add__(Point pt) -> Point
924 Add pt's proprties to this and return the result.
926 return _core
.Point___add__(*args
, **kwargs
)
928 def __sub__(*args
, **kwargs
):
930 __sub__(Point pt) -> Point
932 Subtract pt's proprties from this and return the result
934 return _core
.Point___sub__(*args
, **kwargs
)
936 def __iadd__(*args
, **kwargs
):
938 __iadd__(Point pt) -> Point
940 Add pt to this object.
942 return _core
.Point___iadd__(*args
, **kwargs
)
944 def __isub__(*args
, **kwargs
):
946 __isub__(Point pt) -> Point
948 Subtract pt from this object.
950 return _core
.Point___isub__(*args
, **kwargs
)
952 def Set(*args
, **kwargs
):
956 Set both the x and y properties
958 return _core
.Point_Set(*args
, **kwargs
)
960 def Get(*args
, **kwargs
):
964 Return the x and y properties as a tuple.
966 return _core
.Point_Get(*args
, **kwargs
)
969 def __str__(self
): return str(self
.Get())
970 def __repr__(self
): return 'wx.Point'+str(self
.Get())
971 def __len__(self
): return len(self
.Get())
972 def __getitem__(self
, index
): return self
.Get()[index
]
973 def __setitem__(self
, index
, val
):
974 if index
== 0: self
.x
= val
975 elif index
== 1: self
.y
= val
976 else: raise IndexError
977 def __nonzero__(self
): return self
.Get() != (0,0)
978 __safe_for_unpickling__
= True
979 def __reduce__(self
): return (wx
.Point
, self
.Get())
982 class PointPtr(Point
):
983 def __init__(self
, this
):
985 if not hasattr(self
,"thisown"): self
.thisown
= 0
986 self
.__class
__ = Point
987 _core
.Point_swigregister(PointPtr
)
989 #---------------------------------------------------------------------------
993 A class for representing and manipulating rectangles. It has x, y, width and
994 height properties. In wxPython most palces that expect a wx.Rect can also
995 accept a (x,y,width,height) tuple.
998 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
999 def __init__(self
, *args
, **kwargs
):
1001 __init__(int x=0, int y=0, int width=0, int height=0) -> Rect
1003 Create a new Rect object.
1005 newobj
= _core
.new_Rect(*args
, **kwargs
)
1006 self
.this
= newobj
.this
1009 def __del__(self
, destroy
=_core
.delete_Rect
):
1012 if self
.thisown
: destroy(self
)
1015 def GetX(*args
, **kwargs
):
1017 return _core
.Rect_GetX(*args
, **kwargs
)
1019 def SetX(*args
, **kwargs
):
1021 return _core
.Rect_SetX(*args
, **kwargs
)
1023 def GetY(*args
, **kwargs
):
1025 return _core
.Rect_GetY(*args
, **kwargs
)
1027 def SetY(*args
, **kwargs
):
1029 return _core
.Rect_SetY(*args
, **kwargs
)
1031 def GetWidth(*args
, **kwargs
):
1032 """GetWidth() -> int"""
1033 return _core
.Rect_GetWidth(*args
, **kwargs
)
1035 def SetWidth(*args
, **kwargs
):
1036 """SetWidth(int w)"""
1037 return _core
.Rect_SetWidth(*args
, **kwargs
)
1039 def GetHeight(*args
, **kwargs
):
1040 """GetHeight() -> int"""
1041 return _core
.Rect_GetHeight(*args
, **kwargs
)
1043 def SetHeight(*args
, **kwargs
):
1044 """SetHeight(int h)"""
1045 return _core
.Rect_SetHeight(*args
, **kwargs
)
1047 def GetPosition(*args
, **kwargs
):
1048 """GetPosition() -> Point"""
1049 return _core
.Rect_GetPosition(*args
, **kwargs
)
1051 def SetPosition(*args
, **kwargs
):
1052 """SetPosition(Point p)"""
1053 return _core
.Rect_SetPosition(*args
, **kwargs
)
1055 def GetSize(*args
, **kwargs
):
1056 """GetSize() -> Size"""
1057 return _core
.Rect_GetSize(*args
, **kwargs
)
1059 def SetSize(*args
, **kwargs
):
1060 """SetSize(Size s)"""
1061 return _core
.Rect_SetSize(*args
, **kwargs
)
1063 def GetTopLeft(*args
, **kwargs
):
1064 """GetTopLeft() -> Point"""
1065 return _core
.Rect_GetTopLeft(*args
, **kwargs
)
1067 def SetTopLeft(*args
, **kwargs
):
1068 """SetTopLeft(Point p)"""
1069 return _core
.Rect_SetTopLeft(*args
, **kwargs
)
1071 def GetBottomRight(*args
, **kwargs
):
1072 """GetBottomRight() -> Point"""
1073 return _core
.Rect_GetBottomRight(*args
, **kwargs
)
1075 def SetBottomRight(*args
, **kwargs
):
1076 """SetBottomRight(Point p)"""
1077 return _core
.Rect_SetBottomRight(*args
, **kwargs
)
1079 def GetLeft(*args
, **kwargs
):
1080 """GetLeft() -> int"""
1081 return _core
.Rect_GetLeft(*args
, **kwargs
)
1083 def GetTop(*args
, **kwargs
):
1084 """GetTop() -> int"""
1085 return _core
.Rect_GetTop(*args
, **kwargs
)
1087 def GetBottom(*args
, **kwargs
):
1088 """GetBottom() -> int"""
1089 return _core
.Rect_GetBottom(*args
, **kwargs
)
1091 def GetRight(*args
, **kwargs
):
1092 """GetRight() -> int"""
1093 return _core
.Rect_GetRight(*args
, **kwargs
)
1095 def SetLeft(*args
, **kwargs
):
1096 """SetLeft(int left)"""
1097 return _core
.Rect_SetLeft(*args
, **kwargs
)
1099 def SetRight(*args
, **kwargs
):
1100 """SetRight(int right)"""
1101 return _core
.Rect_SetRight(*args
, **kwargs
)
1103 def SetTop(*args
, **kwargs
):
1104 """SetTop(int top)"""
1105 return _core
.Rect_SetTop(*args
, **kwargs
)
1107 def SetBottom(*args
, **kwargs
):
1108 """SetBottom(int bottom)"""
1109 return _core
.Rect_SetBottom(*args
, **kwargs
)
1111 position
= property(GetPosition
, SetPosition
)
1112 size
= property(GetSize
, SetSize
)
1113 left
= property(GetLeft
, SetLeft
)
1114 right
= property(GetRight
, SetRight
)
1115 top
= property(GetTop
, SetTop
)
1116 bottom
= property(GetBottom
, SetBottom
)
1118 def Inflate(*args
, **kwargs
):
1120 Inflate(int dx, int dy) -> Rect
1122 Increase the rectangle size by dx in x direction and dy in y direction. Both
1123 (or one of) parameters may be negative to decrease the rectangle size.
1125 return _core
.Rect_Inflate(*args
, **kwargs
)
1127 def Deflate(*args
, **kwargs
):
1129 Deflate(int dx, int dy) -> Rect
1131 Decrease the rectangle size by dx in x direction and dy in y direction. Both
1132 (or one of) parameters may be negative to increase the rectngle size. This
1133 method is the opposite of Inflate.
1135 return _core
.Rect_Deflate(*args
, **kwargs
)
1137 def OffsetXY(*args
, **kwargs
):
1139 OffsetXY(int dx, int dy)
1141 Moves the rectangle by the specified offset. If dx is positive, the rectangle
1142 is moved to the right, if dy is positive, it is moved to the bottom, otherwise
1143 it is moved to the left or top respectively.
1145 return _core
.Rect_OffsetXY(*args
, **kwargs
)
1147 def Offset(*args
, **kwargs
):
1151 Same as OffsetXY but uses dx,dy from Point
1153 return _core
.Rect_Offset(*args
, **kwargs
)
1155 def Intersect(*args
, **kwargs
):
1157 Intersect(Rect rect) -> Rect
1159 Return the intersectsion of this rectangle and rect.
1161 return _core
.Rect_Intersect(*args
, **kwargs
)
1163 def __add__(*args
, **kwargs
):
1165 __add__(Rect rect) -> Rect
1167 Add the properties of rect to this rectangle and return the result.
1169 return _core
.Rect___add__(*args
, **kwargs
)
1171 def __iadd__(*args
, **kwargs
):
1173 __iadd__(Rect rect) -> Rect
1175 Add the properties of rect to this rectangle, updating this rectangle.
1177 return _core
.Rect___iadd__(*args
, **kwargs
)
1179 def __eq__(*args
, **kwargs
):
1181 __eq__(Rect rect) -> bool
1185 return _core
.Rect___eq__(*args
, **kwargs
)
1187 def __ne__(*args
, **kwargs
):
1189 __ne__(Rect rect) -> bool
1191 Test for inequality.
1193 return _core
.Rect___ne__(*args
, **kwargs
)
1195 def InsideXY(*args
, **kwargs
):
1197 InsideXY(int x, int y) -> bool
1199 Return True if the point is (not strcitly) inside the rect.
1201 return _core
.Rect_InsideXY(*args
, **kwargs
)
1203 def Inside(*args
, **kwargs
):
1205 Inside(Point pt) -> bool
1207 Return True if the point is (not strcitly) inside the rect.
1209 return _core
.Rect_Inside(*args
, **kwargs
)
1211 def Intersects(*args
, **kwargs
):
1213 Intersects(Rect rect) -> bool
1215 Returns True if the rectangles have a non empty intersection.
1217 return _core
.Rect_Intersects(*args
, **kwargs
)
1219 x
= property(_core
.Rect_x_get
, _core
.Rect_x_set
)
1220 y
= property(_core
.Rect_y_get
, _core
.Rect_y_set
)
1221 width
= property(_core
.Rect_width_get
, _core
.Rect_width_set
)
1222 height
= property(_core
.Rect_height_get
, _core
.Rect_height_set
)
1223 def Set(*args
, **kwargs
):
1225 Set(int x=0, int y=0, int width=0, int height=0)
1227 Set all rectangle properties.
1229 return _core
.Rect_Set(*args
, **kwargs
)
1231 def Get(*args
, **kwargs
):
1233 Get() -> (x,y,width,height)
1235 Return the rectangle properties as a tuple.
1237 return _core
.Rect_Get(*args
, **kwargs
)
1240 def __str__(self
): return str(self
.Get())
1241 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1242 def __len__(self
): return len(self
.Get())
1243 def __getitem__(self
, index
): return self
.Get()[index
]
1244 def __setitem__(self
, index
, val
):
1245 if index
== 0: self
.x
= val
1246 elif index
== 1: self
.y
= val
1247 elif index
== 2: self
.width
= val
1248 elif index
== 3: self
.height
= val
1249 else: raise IndexError
1250 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1251 __safe_for_unpickling__
= True
1252 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1255 class RectPtr(Rect
):
1256 def __init__(self
, this
):
1258 if not hasattr(self
,"thisown"): self
.thisown
= 0
1259 self
.__class
__ = Rect
1260 _core
.Rect_swigregister(RectPtr
)
1262 def RectPP(*args
, **kwargs
):
1264 RectPP(Point topLeft, Point bottomRight) -> Rect
1266 Create a new Rect object from Points representing two corners.
1268 val
= _core
.new_RectPP(*args
, **kwargs
)
1272 def RectPS(*args
, **kwargs
):
1274 RectPS(Point pos, Size size) -> Rect
1276 Create a new Rect from a position and size.
1278 val
= _core
.new_RectPS(*args
, **kwargs
)
1283 def IntersectRect(*args
, **kwargs
):
1285 IntersectRect(Rect r1, Rect r2) -> Rect
1287 Calculate and return the intersection of r1 and r2.
1289 return _core
.IntersectRect(*args
, **kwargs
)
1290 #---------------------------------------------------------------------------
1292 class Point2D(object):
1293 """wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values."""
1295 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1296 def __init__(self
, *args
, **kwargs
):
1298 __init__(double x=0.0, double y=0.0) -> Point2D
1300 Create a w.Point2D object.
1302 newobj
= _core
.new_Point2D(*args
, **kwargs
)
1303 self
.this
= newobj
.this
1306 def GetFloor(*args
, **kwargs
):
1312 return _core
.Point2D_GetFloor(*args
, **kwargs
)
1314 def GetRounded(*args
, **kwargs
):
1316 GetRounded() -> (x,y)
1320 return _core
.Point2D_GetRounded(*args
, **kwargs
)
1322 def GetVectorLength(*args
, **kwargs
):
1323 """GetVectorLength() -> double"""
1324 return _core
.Point2D_GetVectorLength(*args
, **kwargs
)
1326 def GetVectorAngle(*args
, **kwargs
):
1327 """GetVectorAngle() -> double"""
1328 return _core
.Point2D_GetVectorAngle(*args
, **kwargs
)
1330 def SetVectorLength(*args
, **kwargs
):
1331 """SetVectorLength(double length)"""
1332 return _core
.Point2D_SetVectorLength(*args
, **kwargs
)
1334 def SetVectorAngle(*args
, **kwargs
):
1335 """SetVectorAngle(double degrees)"""
1336 return _core
.Point2D_SetVectorAngle(*args
, **kwargs
)
1338 def SetPolarCoordinates(self
, angle
, length
):
1339 self
.SetVectorLength(length
)
1340 self
.SetVectorAngle(angle
)
1341 def Normalize(self
):
1342 self
.SetVectorLength(1.0)
1344 def GetDistance(*args
, **kwargs
):
1345 """GetDistance(Point2D pt) -> double"""
1346 return _core
.Point2D_GetDistance(*args
, **kwargs
)
1348 def GetDistanceSquare(*args
, **kwargs
):
1349 """GetDistanceSquare(Point2D pt) -> double"""
1350 return _core
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1352 def GetDotProduct(*args
, **kwargs
):
1353 """GetDotProduct(Point2D vec) -> double"""
1354 return _core
.Point2D_GetDotProduct(*args
, **kwargs
)
1356 def GetCrossProduct(*args
, **kwargs
):
1357 """GetCrossProduct(Point2D vec) -> double"""
1358 return _core
.Point2D_GetCrossProduct(*args
, **kwargs
)
1360 def __neg__(*args
, **kwargs
):
1362 __neg__() -> Point2D
1364 the reflection of this point
1366 return _core
.Point2D___neg__(*args
, **kwargs
)
1368 def __iadd__(*args
, **kwargs
):
1369 """__iadd__(Point2D pt) -> Point2D"""
1370 return _core
.Point2D___iadd__(*args
, **kwargs
)
1372 def __isub__(*args
, **kwargs
):
1373 """__isub__(Point2D pt) -> Point2D"""
1374 return _core
.Point2D___isub__(*args
, **kwargs
)
1376 def __imul__(*args
, **kwargs
):
1377 """__imul__(Point2D pt) -> Point2D"""
1378 return _core
.Point2D___imul__(*args
, **kwargs
)
1380 def __idiv__(*args
, **kwargs
):
1381 """__idiv__(Point2D pt) -> Point2D"""
1382 return _core
.Point2D___idiv__(*args
, **kwargs
)
1384 def __eq__(*args
, **kwargs
):
1386 __eq__(Point2D pt) -> bool
1390 return _core
.Point2D___eq__(*args
, **kwargs
)
1392 def __ne__(*args
, **kwargs
):
1394 __ne__(Point2D pt) -> bool
1398 return _core
.Point2D___ne__(*args
, **kwargs
)
1400 x
= property(_core
.Point2D_x_get
, _core
.Point2D_x_set
)
1401 y
= property(_core
.Point2D_y_get
, _core
.Point2D_y_set
)
1402 def Set(*args
, **kwargs
):
1403 """Set(double x=0, double y=0)"""
1404 return _core
.Point2D_Set(*args
, **kwargs
)
1406 def Get(*args
, **kwargs
):
1410 Return x and y properties as a tuple.
1412 return _core
.Point2D_Get(*args
, **kwargs
)
1415 def __str__(self
): return str(self
.Get())
1416 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1417 def __len__(self
): return len(self
.Get())
1418 def __getitem__(self
, index
): return self
.Get()[index
]
1419 def __setitem__(self
, index
, val
):
1420 if index
== 0: self
.x
= val
1421 elif index
== 1: self
.y
= val
1422 else: raise IndexError
1423 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1424 __safe_for_unpickling__
= True
1425 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1428 class Point2DPtr(Point2D
):
1429 def __init__(self
, this
):
1431 if not hasattr(self
,"thisown"): self
.thisown
= 0
1432 self
.__class
__ = Point2D
1433 _core
.Point2D_swigregister(Point2DPtr
)
1435 def Point2DCopy(*args
, **kwargs
):
1437 Point2DCopy(Point2D pt) -> Point2D
1439 Create a w.Point2D object.
1441 val
= _core
.new_Point2DCopy(*args
, **kwargs
)
1445 def Point2DFromPoint(*args
, **kwargs
):
1447 Point2DFromPoint(Point pt) -> Point2D
1449 Create a w.Point2D object.
1451 val
= _core
.new_Point2DFromPoint(*args
, **kwargs
)
1455 #---------------------------------------------------------------------------
1457 FromStart
= _core
.FromStart
1458 FromCurrent
= _core
.FromCurrent
1459 FromEnd
= _core
.FromEnd
1460 class InputStream(object):
1462 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1463 def __init__(self
, *args
, **kwargs
):
1464 """__init__(PyObject p) -> InputStream"""
1465 newobj
= _core
.new_InputStream(*args
, **kwargs
)
1466 self
.this
= newobj
.this
1469 def close(*args
, **kwargs
):
1471 return _core
.InputStream_close(*args
, **kwargs
)
1473 def flush(*args
, **kwargs
):
1475 return _core
.InputStream_flush(*args
, **kwargs
)
1477 def eof(*args
, **kwargs
):
1479 return _core
.InputStream_eof(*args
, **kwargs
)
1481 def read(*args
, **kwargs
):
1482 """read(int size=-1) -> PyObject"""
1483 return _core
.InputStream_read(*args
, **kwargs
)
1485 def readline(*args
, **kwargs
):
1486 """readline(int size=-1) -> PyObject"""
1487 return _core
.InputStream_readline(*args
, **kwargs
)
1489 def readlines(*args
, **kwargs
):
1490 """readlines(int sizehint=-1) -> PyObject"""
1491 return _core
.InputStream_readlines(*args
, **kwargs
)
1493 def seek(*args
, **kwargs
):
1494 """seek(int offset, int whence=0)"""
1495 return _core
.InputStream_seek(*args
, **kwargs
)
1497 def tell(*args
, **kwargs
):
1499 return _core
.InputStream_tell(*args
, **kwargs
)
1501 def Peek(*args
, **kwargs
):
1502 """Peek() -> char"""
1503 return _core
.InputStream_Peek(*args
, **kwargs
)
1505 def GetC(*args
, **kwargs
):
1506 """GetC() -> char"""
1507 return _core
.InputStream_GetC(*args
, **kwargs
)
1509 def LastRead(*args
, **kwargs
):
1510 """LastRead() -> size_t"""
1511 return _core
.InputStream_LastRead(*args
, **kwargs
)
1513 def CanRead(*args
, **kwargs
):
1514 """CanRead() -> bool"""
1515 return _core
.InputStream_CanRead(*args
, **kwargs
)
1517 def Eof(*args
, **kwargs
):
1519 return _core
.InputStream_Eof(*args
, **kwargs
)
1521 def Ungetch(*args
, **kwargs
):
1522 """Ungetch(char c) -> bool"""
1523 return _core
.InputStream_Ungetch(*args
, **kwargs
)
1525 def SeekI(*args
, **kwargs
):
1526 """SeekI(long pos, int mode=FromStart) -> long"""
1527 return _core
.InputStream_SeekI(*args
, **kwargs
)
1529 def TellI(*args
, **kwargs
):
1530 """TellI() -> long"""
1531 return _core
.InputStream_TellI(*args
, **kwargs
)
1534 class InputStreamPtr(InputStream
):
1535 def __init__(self
, this
):
1537 if not hasattr(self
,"thisown"): self
.thisown
= 0
1538 self
.__class
__ = InputStream
1539 _core
.InputStream_swigregister(InputStreamPtr
)
1540 DefaultPosition
= cvar
.DefaultPosition
1541 DefaultSize
= cvar
.DefaultSize
1543 class OutputStream(object):
1544 def __init__(self
): raise RuntimeError, "No constructor defined"
1546 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1547 def write(*args
, **kwargs
):
1548 """write(PyObject obj)"""
1549 return _core
.OutputStream_write(*args
, **kwargs
)
1552 class OutputStreamPtr(OutputStream
):
1553 def __init__(self
, this
):
1555 if not hasattr(self
,"thisown"): self
.thisown
= 0
1556 self
.__class
__ = OutputStream
1557 _core
.OutputStream_swigregister(OutputStreamPtr
)
1559 #---------------------------------------------------------------------------
1561 class FSFile(Object
):
1563 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1564 def __init__(self
, *args
, **kwargs
):
1566 __init__(InputStream stream, String loc, String mimetype, String anchor,
1567 DateTime modif) -> FSFile
1569 newobj
= _core
.new_FSFile(*args
, **kwargs
)
1570 self
.this
= newobj
.this
1573 def __del__(self
, destroy
=_core
.delete_FSFile
):
1576 if self
.thisown
: destroy(self
)
1579 def GetStream(*args
, **kwargs
):
1580 """GetStream() -> InputStream"""
1581 return _core
.FSFile_GetStream(*args
, **kwargs
)
1583 def GetMimeType(*args
, **kwargs
):
1584 """GetMimeType() -> String"""
1585 return _core
.FSFile_GetMimeType(*args
, **kwargs
)
1587 def GetLocation(*args
, **kwargs
):
1588 """GetLocation() -> String"""
1589 return _core
.FSFile_GetLocation(*args
, **kwargs
)
1591 def GetAnchor(*args
, **kwargs
):
1592 """GetAnchor() -> String"""
1593 return _core
.FSFile_GetAnchor(*args
, **kwargs
)
1595 def GetModificationTime(*args
, **kwargs
):
1596 """GetModificationTime() -> DateTime"""
1597 return _core
.FSFile_GetModificationTime(*args
, **kwargs
)
1600 class FSFilePtr(FSFile
):
1601 def __init__(self
, this
):
1603 if not hasattr(self
,"thisown"): self
.thisown
= 0
1604 self
.__class
__ = FSFile
1605 _core
.FSFile_swigregister(FSFilePtr
)
1607 class CPPFileSystemHandler(object):
1608 def __init__(self
): raise RuntimeError, "No constructor defined"
1610 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1612 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1613 def __init__(self
, this
):
1615 if not hasattr(self
,"thisown"): self
.thisown
= 0
1616 self
.__class
__ = CPPFileSystemHandler
1617 _core
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1619 class FileSystemHandler(CPPFileSystemHandler
):
1621 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1622 def __init__(self
, *args
, **kwargs
):
1623 """__init__() -> FileSystemHandler"""
1624 newobj
= _core
.new_FileSystemHandler(*args
, **kwargs
)
1625 self
.this
= newobj
.this
1628 self
._setCallbackInfo
(self
, FileSystemHandler
)
1630 def _setCallbackInfo(*args
, **kwargs
):
1631 """_setCallbackInfo(PyObject self, PyObject _class)"""
1632 return _core
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1634 def CanOpen(*args
, **kwargs
):
1635 """CanOpen(String location) -> bool"""
1636 return _core
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1638 def OpenFile(*args
, **kwargs
):
1639 """OpenFile(FileSystem fs, String location) -> FSFile"""
1640 return _core
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1642 def FindFirst(*args
, **kwargs
):
1643 """FindFirst(String spec, int flags=0) -> String"""
1644 return _core
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1646 def FindNext(*args
, **kwargs
):
1647 """FindNext() -> String"""
1648 return _core
.FileSystemHandler_FindNext(*args
, **kwargs
)
1650 def GetProtocol(*args
, **kwargs
):
1651 """GetProtocol(String location) -> String"""
1652 return _core
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1654 def GetLeftLocation(*args
, **kwargs
):
1655 """GetLeftLocation(String location) -> String"""
1656 return _core
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1658 def GetAnchor(*args
, **kwargs
):
1659 """GetAnchor(String location) -> String"""
1660 return _core
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1662 def GetRightLocation(*args
, **kwargs
):
1663 """GetRightLocation(String location) -> String"""
1664 return _core
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1666 def GetMimeTypeFromExt(*args
, **kwargs
):
1667 """GetMimeTypeFromExt(String location) -> String"""
1668 return _core
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1671 class FileSystemHandlerPtr(FileSystemHandler
):
1672 def __init__(self
, this
):
1674 if not hasattr(self
,"thisown"): self
.thisown
= 0
1675 self
.__class
__ = FileSystemHandler
1676 _core
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1678 class FileSystem(Object
):
1680 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1681 def __init__(self
, *args
, **kwargs
):
1682 """__init__() -> FileSystem"""
1683 newobj
= _core
.new_FileSystem(*args
, **kwargs
)
1684 self
.this
= newobj
.this
1687 def __del__(self
, destroy
=_core
.delete_FileSystem
):
1690 if self
.thisown
: destroy(self
)
1693 def ChangePathTo(*args
, **kwargs
):
1694 """ChangePathTo(String location, bool is_dir=False)"""
1695 return _core
.FileSystem_ChangePathTo(*args
, **kwargs
)
1697 def GetPath(*args
, **kwargs
):
1698 """GetPath() -> String"""
1699 return _core
.FileSystem_GetPath(*args
, **kwargs
)
1701 def OpenFile(*args
, **kwargs
):
1702 """OpenFile(String location) -> FSFile"""
1703 return _core
.FileSystem_OpenFile(*args
, **kwargs
)
1705 def FindFirst(*args
, **kwargs
):
1706 """FindFirst(String spec, int flags=0) -> String"""
1707 return _core
.FileSystem_FindFirst(*args
, **kwargs
)
1709 def FindNext(*args
, **kwargs
):
1710 """FindNext() -> String"""
1711 return _core
.FileSystem_FindNext(*args
, **kwargs
)
1713 def AddHandler(*args
, **kwargs
):
1714 """AddHandler(CPPFileSystemHandler handler)"""
1715 return _core
.FileSystem_AddHandler(*args
, **kwargs
)
1717 AddHandler
= staticmethod(AddHandler
)
1718 def CleanUpHandlers(*args
, **kwargs
):
1719 """CleanUpHandlers()"""
1720 return _core
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1722 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1723 def FileNameToURL(*args
, **kwargs
):
1724 """FileNameToURL(String filename) -> String"""
1725 return _core
.FileSystem_FileNameToURL(*args
, **kwargs
)
1727 FileNameToURL
= staticmethod(FileNameToURL
)
1729 class FileSystemPtr(FileSystem
):
1730 def __init__(self
, this
):
1732 if not hasattr(self
,"thisown"): self
.thisown
= 0
1733 self
.__class
__ = FileSystem
1734 _core
.FileSystem_swigregister(FileSystemPtr
)
1736 def FileSystem_AddHandler(*args
, **kwargs
):
1737 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1738 return _core
.FileSystem_AddHandler(*args
, **kwargs
)
1740 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1741 """FileSystem_CleanUpHandlers()"""
1742 return _core
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1744 def FileSystem_FileNameToURL(*args
, **kwargs
):
1745 """FileSystem_FileNameToURL(String filename) -> String"""
1746 return _core
.FileSystem_FileNameToURL(*args
, **kwargs
)
1749 def FileSystem_URLToFileName(*args
, **kwargs
):
1750 """FileSystem_URLToFileName(String url) -> String"""
1751 return _core
.FileSystem_URLToFileName(*args
, **kwargs
)
1752 class InternetFSHandler(CPPFileSystemHandler
):
1754 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1755 def __init__(self
, *args
, **kwargs
):
1756 """__init__() -> InternetFSHandler"""
1757 newobj
= _core
.new_InternetFSHandler(*args
, **kwargs
)
1758 self
.this
= newobj
.this
1761 def CanOpen(*args
, **kwargs
):
1762 """CanOpen(String location) -> bool"""
1763 return _core
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1765 def OpenFile(*args
, **kwargs
):
1766 """OpenFile(FileSystem fs, String location) -> FSFile"""
1767 return _core
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1770 class InternetFSHandlerPtr(InternetFSHandler
):
1771 def __init__(self
, this
):
1773 if not hasattr(self
,"thisown"): self
.thisown
= 0
1774 self
.__class
__ = InternetFSHandler
1775 _core
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1777 class ZipFSHandler(CPPFileSystemHandler
):
1779 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1780 def __init__(self
, *args
, **kwargs
):
1781 """__init__() -> ZipFSHandler"""
1782 newobj
= _core
.new_ZipFSHandler(*args
, **kwargs
)
1783 self
.this
= newobj
.this
1786 def CanOpen(*args
, **kwargs
):
1787 """CanOpen(String location) -> bool"""
1788 return _core
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1790 def OpenFile(*args
, **kwargs
):
1791 """OpenFile(FileSystem fs, String location) -> FSFile"""
1792 return _core
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1794 def FindFirst(*args
, **kwargs
):
1795 """FindFirst(String spec, int flags=0) -> String"""
1796 return _core
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1798 def FindNext(*args
, **kwargs
):
1799 """FindNext() -> String"""
1800 return _core
.ZipFSHandler_FindNext(*args
, **kwargs
)
1803 class ZipFSHandlerPtr(ZipFSHandler
):
1804 def __init__(self
, this
):
1806 if not hasattr(self
,"thisown"): self
.thisown
= 0
1807 self
.__class
__ = ZipFSHandler
1808 _core
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1811 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1812 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1813 return _core
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1815 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1816 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1817 return _core
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1819 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1820 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1821 return _core
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1822 def MemoryFSHandler_AddFile(filename
, a
, b
=''):
1823 if isinstance(a
, wx
.Image
):
1824 __wxMemoryFSHandler_AddFile_wxImage(filename
, a
, b
)
1825 elif isinstance(a
, wx
.Bitmap
):
1826 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, a
, b
)
1827 elif type(a
) == str:
1828 __wxMemoryFSHandler_AddFile_Data(filename
, a
)
1829 else: raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1831 class MemoryFSHandler(CPPFileSystemHandler
):
1833 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1834 def __init__(self
, *args
, **kwargs
):
1835 """__init__() -> MemoryFSHandler"""
1836 newobj
= _core
.new_MemoryFSHandler(*args
, **kwargs
)
1837 self
.this
= newobj
.this
1840 def RemoveFile(*args
, **kwargs
):
1841 """RemoveFile(String filename)"""
1842 return _core
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1844 RemoveFile
= staticmethod(RemoveFile
)
1845 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1846 def CanOpen(*args
, **kwargs
):
1847 """CanOpen(String location) -> bool"""
1848 return _core
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1850 def OpenFile(*args
, **kwargs
):
1851 """OpenFile(FileSystem fs, String location) -> FSFile"""
1852 return _core
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
1854 def FindFirst(*args
, **kwargs
):
1855 """FindFirst(String spec, int flags=0) -> String"""
1856 return _core
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
1858 def FindNext(*args
, **kwargs
):
1859 """FindNext() -> String"""
1860 return _core
.MemoryFSHandler_FindNext(*args
, **kwargs
)
1863 class MemoryFSHandlerPtr(MemoryFSHandler
):
1864 def __init__(self
, this
):
1866 if not hasattr(self
,"thisown"): self
.thisown
= 0
1867 self
.__class
__ = MemoryFSHandler
1868 _core
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
1870 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
1871 """MemoryFSHandler_RemoveFile(String filename)"""
1872 return _core
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1874 #---------------------------------------------------------------------------
1876 class ImageHandler(Object
):
1877 def __init__(self
): raise RuntimeError, "No constructor defined"
1879 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1880 def GetName(*args
, **kwargs
):
1881 """GetName() -> String"""
1882 return _core
.ImageHandler_GetName(*args
, **kwargs
)
1884 def GetExtension(*args
, **kwargs
):
1885 """GetExtension() -> String"""
1886 return _core
.ImageHandler_GetExtension(*args
, **kwargs
)
1888 def GetType(*args
, **kwargs
):
1889 """GetType() -> long"""
1890 return _core
.ImageHandler_GetType(*args
, **kwargs
)
1892 def GetMimeType(*args
, **kwargs
):
1893 """GetMimeType() -> String"""
1894 return _core
.ImageHandler_GetMimeType(*args
, **kwargs
)
1896 def CanRead(*args
, **kwargs
):
1897 """CanRead(String name) -> bool"""
1898 return _core
.ImageHandler_CanRead(*args
, **kwargs
)
1900 def SetName(*args
, **kwargs
):
1901 """SetName(String name)"""
1902 return _core
.ImageHandler_SetName(*args
, **kwargs
)
1904 def SetExtension(*args
, **kwargs
):
1905 """SetExtension(String extension)"""
1906 return _core
.ImageHandler_SetExtension(*args
, **kwargs
)
1908 def SetType(*args
, **kwargs
):
1909 """SetType(long type)"""
1910 return _core
.ImageHandler_SetType(*args
, **kwargs
)
1912 def SetMimeType(*args
, **kwargs
):
1913 """SetMimeType(String mimetype)"""
1914 return _core
.ImageHandler_SetMimeType(*args
, **kwargs
)
1917 class ImageHandlerPtr(ImageHandler
):
1918 def __init__(self
, this
):
1920 if not hasattr(self
,"thisown"): self
.thisown
= 0
1921 self
.__class
__ = ImageHandler
1922 _core
.ImageHandler_swigregister(ImageHandlerPtr
)
1924 class ImageHistogram(object):
1926 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1927 def __init__(self
, *args
, **kwargs
):
1928 """__init__() -> ImageHistogram"""
1929 newobj
= _core
.new_ImageHistogram(*args
, **kwargs
)
1930 self
.this
= newobj
.this
1933 def MakeKey(*args
, **kwargs
):
1935 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
1937 Get the key in the histogram for the given RGB values
1939 return _core
.ImageHistogram_MakeKey(*args
, **kwargs
)
1941 MakeKey
= staticmethod(MakeKey
)
1942 def FindFirstUnusedColour(*args
, **kwargs
):
1944 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
1946 Find first colour that is not used in the image and has higher RGB values than
1947 startR, startG, startB. Returns a tuple consisting of a success flag and rgb
1950 return _core
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
1953 class ImageHistogramPtr(ImageHistogram
):
1954 def __init__(self
, this
):
1956 if not hasattr(self
,"thisown"): self
.thisown
= 0
1957 self
.__class
__ = ImageHistogram
1958 _core
.ImageHistogram_swigregister(ImageHistogramPtr
)
1960 def ImageHistogram_MakeKey(*args
, **kwargs
):
1962 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
1964 Get the key in the histogram for the given RGB values
1966 return _core
.ImageHistogram_MakeKey(*args
, **kwargs
)
1968 class Image(Object
):
1970 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1971 def __init__(self
, *args
, **kwargs
):
1972 """__init__(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
1973 newobj
= _core
.new_Image(*args
, **kwargs
)
1974 self
.this
= newobj
.this
1977 def __del__(self
, destroy
=_core
.delete_Image
):
1980 if self
.thisown
: destroy(self
)
1983 def Create(*args
, **kwargs
):
1984 """Create(int width, int height)"""
1985 return _core
.Image_Create(*args
, **kwargs
)
1987 def Destroy(*args
, **kwargs
):
1991 Deletes the C++ object this Python object is a proxy for.
1993 return _core
.Image_Destroy(*args
, **kwargs
)
1995 def Scale(*args
, **kwargs
):
1996 """Scale(int width, int height) -> Image"""
1997 return _core
.Image_Scale(*args
, **kwargs
)
1999 def ShrinkBy(*args
, **kwargs
):
2000 """ShrinkBy(int xFactor, int yFactor) -> Image"""
2001 return _core
.Image_ShrinkBy(*args
, **kwargs
)
2003 def Rescale(*args
, **kwargs
):
2004 """Rescale(int width, int height) -> Image"""
2005 return _core
.Image_Rescale(*args
, **kwargs
)
2007 def SetRGB(*args
, **kwargs
):
2008 """SetRGB(int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2009 return _core
.Image_SetRGB(*args
, **kwargs
)
2011 def GetRed(*args
, **kwargs
):
2012 """GetRed(int x, int y) -> unsigned char"""
2013 return _core
.Image_GetRed(*args
, **kwargs
)
2015 def GetGreen(*args
, **kwargs
):
2016 """GetGreen(int x, int y) -> unsigned char"""
2017 return _core
.Image_GetGreen(*args
, **kwargs
)
2019 def GetBlue(*args
, **kwargs
):
2020 """GetBlue(int x, int y) -> unsigned char"""
2021 return _core
.Image_GetBlue(*args
, **kwargs
)
2023 def SetAlpha(*args
, **kwargs
):
2024 """SetAlpha(int x, int y, unsigned char alpha)"""
2025 return _core
.Image_SetAlpha(*args
, **kwargs
)
2027 def GetAlpha(*args
, **kwargs
):
2028 """GetAlpha(int x, int y) -> unsigned char"""
2029 return _core
.Image_GetAlpha(*args
, **kwargs
)
2031 def HasAlpha(*args
, **kwargs
):
2032 """HasAlpha() -> bool"""
2033 return _core
.Image_HasAlpha(*args
, **kwargs
)
2035 def FindFirstUnusedColour(*args
, **kwargs
):
2037 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2039 Find first colour that is not used in the image and has higher RGB values than
2040 startR, startG, startB. Returns a tuple consisting of a success flag and rgb
2043 return _core
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2045 def SetMaskFromImage(*args
, **kwargs
):
2046 """SetMaskFromImage(Image mask, byte mr, byte mg, byte mb) -> bool"""
2047 return _core
.Image_SetMaskFromImage(*args
, **kwargs
)
2049 def CanRead(*args
, **kwargs
):
2050 """CanRead(String name) -> bool"""
2051 return _core
.Image_CanRead(*args
, **kwargs
)
2053 CanRead
= staticmethod(CanRead
)
2054 def GetImageCount(*args
, **kwargs
):
2055 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2056 return _core
.Image_GetImageCount(*args
, **kwargs
)
2058 GetImageCount
= staticmethod(GetImageCount
)
2059 def LoadFile(*args
, **kwargs
):
2060 """LoadFile(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2061 return _core
.Image_LoadFile(*args
, **kwargs
)
2063 def LoadMimeFile(*args
, **kwargs
):
2064 """LoadMimeFile(String name, String mimetype, int index=-1) -> bool"""
2065 return _core
.Image_LoadMimeFile(*args
, **kwargs
)
2067 def SaveFile(*args
, **kwargs
):
2068 """SaveFile(String name, int type) -> bool"""
2069 return _core
.Image_SaveFile(*args
, **kwargs
)
2071 def SaveMimeFile(*args
, **kwargs
):
2072 """SaveMimeFile(String name, String mimetype) -> bool"""
2073 return _core
.Image_SaveMimeFile(*args
, **kwargs
)
2075 def CanReadStream(*args
, **kwargs
):
2076 """CanReadStream(InputStream stream) -> bool"""
2077 return _core
.Image_CanReadStream(*args
, **kwargs
)
2079 CanReadStream
= staticmethod(CanReadStream
)
2080 def LoadStream(*args
, **kwargs
):
2081 """LoadStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2082 return _core
.Image_LoadStream(*args
, **kwargs
)
2084 def LoadMimeStream(*args
, **kwargs
):
2085 """LoadMimeStream(InputStream stream, String mimetype, int index=-1) -> bool"""
2086 return _core
.Image_LoadMimeStream(*args
, **kwargs
)
2088 def Ok(*args
, **kwargs
):
2090 return _core
.Image_Ok(*args
, **kwargs
)
2092 def GetWidth(*args
, **kwargs
):
2093 """GetWidth() -> int"""
2094 return _core
.Image_GetWidth(*args
, **kwargs
)
2096 def GetHeight(*args
, **kwargs
):
2097 """GetHeight() -> int"""
2098 return _core
.Image_GetHeight(*args
, **kwargs
)
2100 def GetSubImage(*args
, **kwargs
):
2101 """GetSubImage(Rect rect) -> Image"""
2102 return _core
.Image_GetSubImage(*args
, **kwargs
)
2104 def Copy(*args
, **kwargs
):
2105 """Copy() -> Image"""
2106 return _core
.Image_Copy(*args
, **kwargs
)
2108 def Paste(*args
, **kwargs
):
2109 """Paste(Image image, int x, int y)"""
2110 return _core
.Image_Paste(*args
, **kwargs
)
2112 def GetData(*args
, **kwargs
):
2113 """GetData() -> PyObject"""
2114 return _core
.Image_GetData(*args
, **kwargs
)
2116 def SetData(*args
, **kwargs
):
2117 """SetData(PyObject data)"""
2118 return _core
.Image_SetData(*args
, **kwargs
)
2120 def GetDataBuffer(*args
, **kwargs
):
2121 """GetDataBuffer() -> PyObject"""
2122 return _core
.Image_GetDataBuffer(*args
, **kwargs
)
2124 def SetDataBuffer(*args
, **kwargs
):
2125 """SetDataBuffer(PyObject data)"""
2126 return _core
.Image_SetDataBuffer(*args
, **kwargs
)
2128 def GetAlphaData(*args
, **kwargs
):
2129 """GetAlphaData() -> PyObject"""
2130 return _core
.Image_GetAlphaData(*args
, **kwargs
)
2132 def SetAlphaData(*args
, **kwargs
):
2133 """SetAlphaData(PyObject data)"""
2134 return _core
.Image_SetAlphaData(*args
, **kwargs
)
2136 def GetAlphaBuffer(*args
, **kwargs
):
2137 """GetAlphaBuffer() -> PyObject"""
2138 return _core
.Image_GetAlphaBuffer(*args
, **kwargs
)
2140 def SetAlphaBuffer(*args
, **kwargs
):
2141 """SetAlphaBuffer(PyObject data)"""
2142 return _core
.Image_SetAlphaBuffer(*args
, **kwargs
)
2144 def SetMaskColour(*args
, **kwargs
):
2145 """SetMaskColour(unsigned char r, unsigned char g, unsigned char b)"""
2146 return _core
.Image_SetMaskColour(*args
, **kwargs
)
2148 def GetMaskRed(*args
, **kwargs
):
2149 """GetMaskRed() -> unsigned char"""
2150 return _core
.Image_GetMaskRed(*args
, **kwargs
)
2152 def GetMaskGreen(*args
, **kwargs
):
2153 """GetMaskGreen() -> unsigned char"""
2154 return _core
.Image_GetMaskGreen(*args
, **kwargs
)
2156 def GetMaskBlue(*args
, **kwargs
):
2157 """GetMaskBlue() -> unsigned char"""
2158 return _core
.Image_GetMaskBlue(*args
, **kwargs
)
2160 def SetMask(*args
, **kwargs
):
2161 """SetMask(bool mask=True)"""
2162 return _core
.Image_SetMask(*args
, **kwargs
)
2164 def HasMask(*args
, **kwargs
):
2165 """HasMask() -> bool"""
2166 return _core
.Image_HasMask(*args
, **kwargs
)
2168 def Rotate(*args
, **kwargs
):
2170 Rotate(double angle, Point centre_of_rotation, bool interpolating=True,
2171 Point offset_after_rotation=None) -> Image
2173 return _core
.Image_Rotate(*args
, **kwargs
)
2175 def Rotate90(*args
, **kwargs
):
2176 """Rotate90(bool clockwise=True) -> Image"""
2177 return _core
.Image_Rotate90(*args
, **kwargs
)
2179 def Mirror(*args
, **kwargs
):
2180 """Mirror(bool horizontally=True) -> Image"""
2181 return _core
.Image_Mirror(*args
, **kwargs
)
2183 def Replace(*args
, **kwargs
):
2185 Replace(unsigned char r1, unsigned char g1, unsigned char b1,
2186 unsigned char r2, unsigned char g2, unsigned char b2)
2188 return _core
.Image_Replace(*args
, **kwargs
)
2190 def ConvertToMono(*args
, **kwargs
):
2191 """ConvertToMono(unsigned char r, unsigned char g, unsigned char b) -> Image"""
2192 return _core
.Image_ConvertToMono(*args
, **kwargs
)
2194 def SetOption(*args
, **kwargs
):
2195 """SetOption(String name, String value)"""
2196 return _core
.Image_SetOption(*args
, **kwargs
)
2198 def SetOptionInt(*args
, **kwargs
):
2199 """SetOptionInt(String name, int value)"""
2200 return _core
.Image_SetOptionInt(*args
, **kwargs
)
2202 def GetOption(*args
, **kwargs
):
2203 """GetOption(String name) -> String"""
2204 return _core
.Image_GetOption(*args
, **kwargs
)
2206 def GetOptionInt(*args
, **kwargs
):
2207 """GetOptionInt(String name) -> int"""
2208 return _core
.Image_GetOptionInt(*args
, **kwargs
)
2210 def HasOption(*args
, **kwargs
):
2211 """HasOption(String name) -> bool"""
2212 return _core
.Image_HasOption(*args
, **kwargs
)
2214 def CountColours(*args
, **kwargs
):
2215 """CountColours(unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2216 return _core
.Image_CountColours(*args
, **kwargs
)
2218 def ComputeHistogram(*args
, **kwargs
):
2219 """ComputeHistogram(ImageHistogram h) -> unsigned long"""
2220 return _core
.Image_ComputeHistogram(*args
, **kwargs
)
2222 def AddHandler(*args
, **kwargs
):
2223 """AddHandler(ImageHandler handler)"""
2224 return _core
.Image_AddHandler(*args
, **kwargs
)
2226 AddHandler
= staticmethod(AddHandler
)
2227 def InsertHandler(*args
, **kwargs
):
2228 """InsertHandler(ImageHandler handler)"""
2229 return _core
.Image_InsertHandler(*args
, **kwargs
)
2231 InsertHandler
= staticmethod(InsertHandler
)
2232 def RemoveHandler(*args
, **kwargs
):
2233 """RemoveHandler(String name) -> bool"""
2234 return _core
.Image_RemoveHandler(*args
, **kwargs
)
2236 RemoveHandler
= staticmethod(RemoveHandler
)
2237 def GetImageExtWildcard(*args
, **kwargs
):
2238 """GetImageExtWildcard() -> String"""
2239 return _core
.Image_GetImageExtWildcard(*args
, **kwargs
)
2241 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2242 def ConvertToBitmap(*args
, **kwargs
):
2243 """ConvertToBitmap() -> Bitmap"""
2244 return _core
.Image_ConvertToBitmap(*args
, **kwargs
)
2246 def ConvertToMonoBitmap(*args
, **kwargs
):
2247 """ConvertToMonoBitmap(unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2248 return _core
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2250 def __nonzero__(self
): return self
.Ok()
2252 class ImagePtr(Image
):
2253 def __init__(self
, this
):
2255 if not hasattr(self
,"thisown"): self
.thisown
= 0
2256 self
.__class
__ = Image
2257 _core
.Image_swigregister(ImagePtr
)
2259 def ImageFromMime(*args
, **kwargs
):
2260 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2261 val
= _core
.new_ImageFromMime(*args
, **kwargs
)
2265 def ImageFromStream(*args
, **kwargs
):
2266 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2267 val
= _core
.new_ImageFromStream(*args
, **kwargs
)
2271 def ImageFromStreamMime(*args
, **kwargs
):
2272 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2273 val
= _core
.new_ImageFromStreamMime(*args
, **kwargs
)
2277 def EmptyImage(*args
, **kwargs
):
2278 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2279 val
= _core
.new_EmptyImage(*args
, **kwargs
)
2283 def ImageFromBitmap(*args
, **kwargs
):
2284 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2285 val
= _core
.new_ImageFromBitmap(*args
, **kwargs
)
2289 def ImageFromData(*args
, **kwargs
):
2290 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2291 val
= _core
.new_ImageFromData(*args
, **kwargs
)
2295 def Image_CanRead(*args
, **kwargs
):
2296 """Image_CanRead(String name) -> bool"""
2297 return _core
.Image_CanRead(*args
, **kwargs
)
2299 def Image_GetImageCount(*args
, **kwargs
):
2300 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2301 return _core
.Image_GetImageCount(*args
, **kwargs
)
2303 def Image_CanReadStream(*args
, **kwargs
):
2304 """Image_CanReadStream(InputStream stream) -> bool"""
2305 return _core
.Image_CanReadStream(*args
, **kwargs
)
2307 def Image_AddHandler(*args
, **kwargs
):
2308 """Image_AddHandler(ImageHandler handler)"""
2309 return _core
.Image_AddHandler(*args
, **kwargs
)
2311 def Image_InsertHandler(*args
, **kwargs
):
2312 """Image_InsertHandler(ImageHandler handler)"""
2313 return _core
.Image_InsertHandler(*args
, **kwargs
)
2315 def Image_RemoveHandler(*args
, **kwargs
):
2316 """Image_RemoveHandler(String name) -> bool"""
2317 return _core
.Image_RemoveHandler(*args
, **kwargs
)
2319 def Image_GetImageExtWildcard(*args
, **kwargs
):
2320 """Image_GetImageExtWildcard() -> String"""
2321 return _core
.Image_GetImageExtWildcard(*args
, **kwargs
)
2324 def InitAllImageHandlers(*args
, **kwargs
):
2325 """InitAllImageHandlers()"""
2326 return _core
.InitAllImageHandlers(*args
, **kwargs
)
2327 IMAGE_RESOLUTION_INCHES
= _core
.IMAGE_RESOLUTION_INCHES
2328 IMAGE_RESOLUTION_CM
= _core
.IMAGE_RESOLUTION_CM
2329 BMP_24BPP
= _core
.BMP_24BPP
2330 BMP_8BPP
= _core
.BMP_8BPP
2331 BMP_8BPP_GREY
= _core
.BMP_8BPP_GREY
2332 BMP_8BPP_GRAY
= _core
.BMP_8BPP_GRAY
2333 BMP_8BPP_RED
= _core
.BMP_8BPP_RED
2334 BMP_8BPP_PALETTE
= _core
.BMP_8BPP_PALETTE
2335 BMP_4BPP
= _core
.BMP_4BPP
2336 BMP_1BPP
= _core
.BMP_1BPP
2337 BMP_1BPP_BW
= _core
.BMP_1BPP_BW
2338 class BMPHandler(ImageHandler
):
2340 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2341 def __init__(self
, *args
, **kwargs
):
2342 """__init__() -> BMPHandler"""
2343 newobj
= _core
.new_BMPHandler(*args
, **kwargs
)
2344 self
.this
= newobj
.this
2348 class BMPHandlerPtr(BMPHandler
):
2349 def __init__(self
, this
):
2351 if not hasattr(self
,"thisown"): self
.thisown
= 0
2352 self
.__class
__ = BMPHandler
2353 _core
.BMPHandler_swigregister(BMPHandlerPtr
)
2354 NullImage
= cvar
.NullImage
2355 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2356 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2357 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2358 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2359 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2361 class ICOHandler(BMPHandler
):
2363 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2364 def __init__(self
, *args
, **kwargs
):
2365 """__init__() -> ICOHandler"""
2366 newobj
= _core
.new_ICOHandler(*args
, **kwargs
)
2367 self
.this
= newobj
.this
2371 class ICOHandlerPtr(ICOHandler
):
2372 def __init__(self
, this
):
2374 if not hasattr(self
,"thisown"): self
.thisown
= 0
2375 self
.__class
__ = ICOHandler
2376 _core
.ICOHandler_swigregister(ICOHandlerPtr
)
2378 class CURHandler(ICOHandler
):
2380 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2381 def __init__(self
, *args
, **kwargs
):
2382 """__init__() -> CURHandler"""
2383 newobj
= _core
.new_CURHandler(*args
, **kwargs
)
2384 self
.this
= newobj
.this
2388 class CURHandlerPtr(CURHandler
):
2389 def __init__(self
, this
):
2391 if not hasattr(self
,"thisown"): self
.thisown
= 0
2392 self
.__class
__ = CURHandler
2393 _core
.CURHandler_swigregister(CURHandlerPtr
)
2395 class ANIHandler(CURHandler
):
2397 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2398 def __init__(self
, *args
, **kwargs
):
2399 """__init__() -> ANIHandler"""
2400 newobj
= _core
.new_ANIHandler(*args
, **kwargs
)
2401 self
.this
= newobj
.this
2405 class ANIHandlerPtr(ANIHandler
):
2406 def __init__(self
, this
):
2408 if not hasattr(self
,"thisown"): self
.thisown
= 0
2409 self
.__class
__ = ANIHandler
2410 _core
.ANIHandler_swigregister(ANIHandlerPtr
)
2412 class PNGHandler(ImageHandler
):
2414 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2415 def __init__(self
, *args
, **kwargs
):
2416 """__init__() -> PNGHandler"""
2417 newobj
= _core
.new_PNGHandler(*args
, **kwargs
)
2418 self
.this
= newobj
.this
2422 class PNGHandlerPtr(PNGHandler
):
2423 def __init__(self
, this
):
2425 if not hasattr(self
,"thisown"): self
.thisown
= 0
2426 self
.__class
__ = PNGHandler
2427 _core
.PNGHandler_swigregister(PNGHandlerPtr
)
2429 class GIFHandler(ImageHandler
):
2431 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2432 def __init__(self
, *args
, **kwargs
):
2433 """__init__() -> GIFHandler"""
2434 newobj
= _core
.new_GIFHandler(*args
, **kwargs
)
2435 self
.this
= newobj
.this
2439 class GIFHandlerPtr(GIFHandler
):
2440 def __init__(self
, this
):
2442 if not hasattr(self
,"thisown"): self
.thisown
= 0
2443 self
.__class
__ = GIFHandler
2444 _core
.GIFHandler_swigregister(GIFHandlerPtr
)
2446 class PCXHandler(ImageHandler
):
2448 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2449 def __init__(self
, *args
, **kwargs
):
2450 """__init__() -> PCXHandler"""
2451 newobj
= _core
.new_PCXHandler(*args
, **kwargs
)
2452 self
.this
= newobj
.this
2456 class PCXHandlerPtr(PCXHandler
):
2457 def __init__(self
, this
):
2459 if not hasattr(self
,"thisown"): self
.thisown
= 0
2460 self
.__class
__ = PCXHandler
2461 _core
.PCXHandler_swigregister(PCXHandlerPtr
)
2463 class JPEGHandler(ImageHandler
):
2465 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2466 def __init__(self
, *args
, **kwargs
):
2467 """__init__() -> JPEGHandler"""
2468 newobj
= _core
.new_JPEGHandler(*args
, **kwargs
)
2469 self
.this
= newobj
.this
2473 class JPEGHandlerPtr(JPEGHandler
):
2474 def __init__(self
, this
):
2476 if not hasattr(self
,"thisown"): self
.thisown
= 0
2477 self
.__class
__ = JPEGHandler
2478 _core
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2480 class PNMHandler(ImageHandler
):
2482 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2483 def __init__(self
, *args
, **kwargs
):
2484 """__init__() -> PNMHandler"""
2485 newobj
= _core
.new_PNMHandler(*args
, **kwargs
)
2486 self
.this
= newobj
.this
2490 class PNMHandlerPtr(PNMHandler
):
2491 def __init__(self
, this
):
2493 if not hasattr(self
,"thisown"): self
.thisown
= 0
2494 self
.__class
__ = PNMHandler
2495 _core
.PNMHandler_swigregister(PNMHandlerPtr
)
2497 class XPMHandler(ImageHandler
):
2499 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2500 def __init__(self
, *args
, **kwargs
):
2501 """__init__() -> XPMHandler"""
2502 newobj
= _core
.new_XPMHandler(*args
, **kwargs
)
2503 self
.this
= newobj
.this
2507 class XPMHandlerPtr(XPMHandler
):
2508 def __init__(self
, this
):
2510 if not hasattr(self
,"thisown"): self
.thisown
= 0
2511 self
.__class
__ = XPMHandler
2512 _core
.XPMHandler_swigregister(XPMHandlerPtr
)
2514 class TIFFHandler(ImageHandler
):
2516 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2517 def __init__(self
, *args
, **kwargs
):
2518 """__init__() -> TIFFHandler"""
2519 newobj
= _core
.new_TIFFHandler(*args
, **kwargs
)
2520 self
.this
= newobj
.this
2524 class TIFFHandlerPtr(TIFFHandler
):
2525 def __init__(self
, this
):
2527 if not hasattr(self
,"thisown"): self
.thisown
= 0
2528 self
.__class
__ = TIFFHandler
2529 _core
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2531 #---------------------------------------------------------------------------
2533 class EvtHandler(Object
):
2535 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2536 def __init__(self
, *args
, **kwargs
):
2537 """__init__() -> EvtHandler"""
2538 newobj
= _core
.new_EvtHandler(*args
, **kwargs
)
2539 self
.this
= newobj
.this
2542 def GetNextHandler(*args
, **kwargs
):
2543 """GetNextHandler() -> EvtHandler"""
2544 return _core
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2546 def GetPreviousHandler(*args
, **kwargs
):
2547 """GetPreviousHandler() -> EvtHandler"""
2548 return _core
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2550 def SetNextHandler(*args
, **kwargs
):
2551 """SetNextHandler(EvtHandler handler)"""
2552 return _core
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2554 def SetPreviousHandler(*args
, **kwargs
):
2555 """SetPreviousHandler(EvtHandler handler)"""
2556 return _core
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2558 def GetEvtHandlerEnabled(*args
, **kwargs
):
2559 """GetEvtHandlerEnabled() -> bool"""
2560 return _core
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2562 def SetEvtHandlerEnabled(*args
, **kwargs
):
2563 """SetEvtHandlerEnabled(bool enabled)"""
2564 return _core
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2566 def ProcessEvent(*args
, **kwargs
):
2567 """ProcessEvent(Event event) -> bool"""
2568 return _core
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2570 def AddPendingEvent(*args
, **kwargs
):
2571 """AddPendingEvent(Event event)"""
2572 return _core
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2574 def ProcessPendingEvents(*args
, **kwargs
):
2575 """ProcessPendingEvents()"""
2576 return _core
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2578 def Connect(*args
, **kwargs
):
2579 """Connect(int id, int lastId, int eventType, PyObject func)"""
2580 return _core
.EvtHandler_Connect(*args
, **kwargs
)
2582 def Disconnect(*args
, **kwargs
):
2583 """Disconnect(int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2584 return _core
.EvtHandler_Disconnect(*args
, **kwargs
)
2586 def _setOORInfo(*args
, **kwargs
):
2587 """_setOORInfo(PyObject _self)"""
2588 return _core
.EvtHandler__setOORInfo(*args
, **kwargs
)
2590 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2592 Bind an event to an event handler.
2594 event One of the EVT_* objects that specifies the
2595 type of event to bind,
2597 handler A callable object to be invoked when the event
2598 is delivered to self. Pass None to disconnect an
2601 source Sometimes the event originates from a different window
2602 than self, but you still want to catch it in self. (For
2603 example, a button event delivered to a frame.) By
2604 passing the source of the event, the event handling
2605 system is able to differentiate between the same event
2606 type from different controls.
2608 id,id2 Used for menu IDs or for event types that require a
2611 if source
is not None:
2613 event
.Bind(self
, id, id2
, handler
)
2617 class EvtHandlerPtr(EvtHandler
):
2618 def __init__(self
, this
):
2620 if not hasattr(self
,"thisown"): self
.thisown
= 0
2621 self
.__class
__ = EvtHandler
2622 _core
.EvtHandler_swigregister(EvtHandlerPtr
)
2624 #---------------------------------------------------------------------------
2626 class PyEventBinder(object):
2628 Instances of this class are used to bind specific events to event
2631 def __init__(self
, evtType
, expectedIDs
=0):
2632 if expectedIDs
not in [0, 1, 2]:
2633 raise ValueError, "Invalid number of expectedIDs"
2634 self
.expectedIDs
= expectedIDs
2636 if type(evtType
) == list or type(evtType
) == tuple:
2637 self
.evtType
= evtType
2639 self
.evtType
= [evtType
]
2642 def Bind(self
, target
, id1
, id2
, function
):
2643 """Bind this set of event types to target."""
2644 for et
in self
.evtType
:
2645 target
.Connect(id1
, id2
, et
, function
)
2648 def __call__(self
, *args
):
2650 For backwards compatibility with the old EVT_* functions.
2651 Should be called with either (window, func), (window, ID,
2652 func) or (window, ID1, ID2, func) parameters depending on the
2655 assert len(args
) == 2 + self
.expectedIDs
2659 if self
.expectedIDs
== 0:
2661 elif self
.expectedIDs
== 1:
2664 elif self
.expectedIDs
== 2:
2669 raise ValueError, "Unexpected number of IDs"
2671 self
.Bind(target
, id1
, id2
, func
)
2674 # These two are square pegs that don't fit the PyEventBinder hole...
2675 def EVT_COMMAND(win
, id, cmd
, func
):
2676 win
.Connect(id, -1, cmd
, func
)
2677 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2678 win
.Connect(id1
, id2
, cmd
, func
)
2681 #---------------------------------------------------------------------------
2683 #---------------------------------------------------------------------------
2685 EVENT_PROPAGATE_NONE
= _core
.EVENT_PROPAGATE_NONE
2686 EVENT_PROPAGATE_MAX
= _core
.EVENT_PROPAGATE_MAX
2688 def NewEventType(*args
, **kwargs
):
2689 """NewEventType() -> wxEventType"""
2690 return _core
.NewEventType(*args
, **kwargs
)
2691 wxEVT_NULL
= _core
.wxEVT_NULL
2692 wxEVT_FIRST
= _core
.wxEVT_FIRST
2693 wxEVT_USER_FIRST
= _core
.wxEVT_USER_FIRST
2694 wxEVT_COMMAND_BUTTON_CLICKED
= _core
.wxEVT_COMMAND_BUTTON_CLICKED
2695 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core
.wxEVT_COMMAND_CHECKBOX_CLICKED
2696 wxEVT_COMMAND_CHOICE_SELECTED
= _core
.wxEVT_COMMAND_CHOICE_SELECTED
2697 wxEVT_COMMAND_LISTBOX_SELECTED
= _core
.wxEVT_COMMAND_LISTBOX_SELECTED
2698 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2699 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2700 wxEVT_COMMAND_MENU_SELECTED
= _core
.wxEVT_COMMAND_MENU_SELECTED
2701 wxEVT_COMMAND_TOOL_CLICKED
= _core
.wxEVT_COMMAND_TOOL_CLICKED
2702 wxEVT_COMMAND_SLIDER_UPDATED
= _core
.wxEVT_COMMAND_SLIDER_UPDATED
2703 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core
.wxEVT_COMMAND_RADIOBOX_SELECTED
2704 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2705 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core
.wxEVT_COMMAND_SCROLLBAR_UPDATED
2706 wxEVT_COMMAND_VLBOX_SELECTED
= _core
.wxEVT_COMMAND_VLBOX_SELECTED
2707 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core
.wxEVT_COMMAND_COMBOBOX_SELECTED
2708 wxEVT_COMMAND_TOOL_RCLICKED
= _core
.wxEVT_COMMAND_TOOL_RCLICKED
2709 wxEVT_COMMAND_TOOL_ENTER
= _core
.wxEVT_COMMAND_TOOL_ENTER
2710 wxEVT_LEFT_DOWN
= _core
.wxEVT_LEFT_DOWN
2711 wxEVT_LEFT_UP
= _core
.wxEVT_LEFT_UP
2712 wxEVT_MIDDLE_DOWN
= _core
.wxEVT_MIDDLE_DOWN
2713 wxEVT_MIDDLE_UP
= _core
.wxEVT_MIDDLE_UP
2714 wxEVT_RIGHT_DOWN
= _core
.wxEVT_RIGHT_DOWN
2715 wxEVT_RIGHT_UP
= _core
.wxEVT_RIGHT_UP
2716 wxEVT_MOTION
= _core
.wxEVT_MOTION
2717 wxEVT_ENTER_WINDOW
= _core
.wxEVT_ENTER_WINDOW
2718 wxEVT_LEAVE_WINDOW
= _core
.wxEVT_LEAVE_WINDOW
2719 wxEVT_LEFT_DCLICK
= _core
.wxEVT_LEFT_DCLICK
2720 wxEVT_MIDDLE_DCLICK
= _core
.wxEVT_MIDDLE_DCLICK
2721 wxEVT_RIGHT_DCLICK
= _core
.wxEVT_RIGHT_DCLICK
2722 wxEVT_SET_FOCUS
= _core
.wxEVT_SET_FOCUS
2723 wxEVT_KILL_FOCUS
= _core
.wxEVT_KILL_FOCUS
2724 wxEVT_CHILD_FOCUS
= _core
.wxEVT_CHILD_FOCUS
2725 wxEVT_MOUSEWHEEL
= _core
.wxEVT_MOUSEWHEEL
2726 wxEVT_NC_LEFT_DOWN
= _core
.wxEVT_NC_LEFT_DOWN
2727 wxEVT_NC_LEFT_UP
= _core
.wxEVT_NC_LEFT_UP
2728 wxEVT_NC_MIDDLE_DOWN
= _core
.wxEVT_NC_MIDDLE_DOWN
2729 wxEVT_NC_MIDDLE_UP
= _core
.wxEVT_NC_MIDDLE_UP
2730 wxEVT_NC_RIGHT_DOWN
= _core
.wxEVT_NC_RIGHT_DOWN
2731 wxEVT_NC_RIGHT_UP
= _core
.wxEVT_NC_RIGHT_UP
2732 wxEVT_NC_MOTION
= _core
.wxEVT_NC_MOTION
2733 wxEVT_NC_ENTER_WINDOW
= _core
.wxEVT_NC_ENTER_WINDOW
2734 wxEVT_NC_LEAVE_WINDOW
= _core
.wxEVT_NC_LEAVE_WINDOW
2735 wxEVT_NC_LEFT_DCLICK
= _core
.wxEVT_NC_LEFT_DCLICK
2736 wxEVT_NC_MIDDLE_DCLICK
= _core
.wxEVT_NC_MIDDLE_DCLICK
2737 wxEVT_NC_RIGHT_DCLICK
= _core
.wxEVT_NC_RIGHT_DCLICK
2738 wxEVT_CHAR
= _core
.wxEVT_CHAR
2739 wxEVT_CHAR_HOOK
= _core
.wxEVT_CHAR_HOOK
2740 wxEVT_NAVIGATION_KEY
= _core
.wxEVT_NAVIGATION_KEY
2741 wxEVT_KEY_DOWN
= _core
.wxEVT_KEY_DOWN
2742 wxEVT_KEY_UP
= _core
.wxEVT_KEY_UP
2743 wxEVT_HOTKEY
= _core
.wxEVT_HOTKEY
2744 wxEVT_SET_CURSOR
= _core
.wxEVT_SET_CURSOR
2745 wxEVT_SCROLL_TOP
= _core
.wxEVT_SCROLL_TOP
2746 wxEVT_SCROLL_BOTTOM
= _core
.wxEVT_SCROLL_BOTTOM
2747 wxEVT_SCROLL_LINEUP
= _core
.wxEVT_SCROLL_LINEUP
2748 wxEVT_SCROLL_LINEDOWN
= _core
.wxEVT_SCROLL_LINEDOWN
2749 wxEVT_SCROLL_PAGEUP
= _core
.wxEVT_SCROLL_PAGEUP
2750 wxEVT_SCROLL_PAGEDOWN
= _core
.wxEVT_SCROLL_PAGEDOWN
2751 wxEVT_SCROLL_THUMBTRACK
= _core
.wxEVT_SCROLL_THUMBTRACK
2752 wxEVT_SCROLL_THUMBRELEASE
= _core
.wxEVT_SCROLL_THUMBRELEASE
2753 wxEVT_SCROLL_ENDSCROLL
= _core
.wxEVT_SCROLL_ENDSCROLL
2754 wxEVT_SCROLLWIN_TOP
= _core
.wxEVT_SCROLLWIN_TOP
2755 wxEVT_SCROLLWIN_BOTTOM
= _core
.wxEVT_SCROLLWIN_BOTTOM
2756 wxEVT_SCROLLWIN_LINEUP
= _core
.wxEVT_SCROLLWIN_LINEUP
2757 wxEVT_SCROLLWIN_LINEDOWN
= _core
.wxEVT_SCROLLWIN_LINEDOWN
2758 wxEVT_SCROLLWIN_PAGEUP
= _core
.wxEVT_SCROLLWIN_PAGEUP
2759 wxEVT_SCROLLWIN_PAGEDOWN
= _core
.wxEVT_SCROLLWIN_PAGEDOWN
2760 wxEVT_SCROLLWIN_THUMBTRACK
= _core
.wxEVT_SCROLLWIN_THUMBTRACK
2761 wxEVT_SCROLLWIN_THUMBRELEASE
= _core
.wxEVT_SCROLLWIN_THUMBRELEASE
2762 wxEVT_SIZE
= _core
.wxEVT_SIZE
2763 wxEVT_MOVE
= _core
.wxEVT_MOVE
2764 wxEVT_CLOSE_WINDOW
= _core
.wxEVT_CLOSE_WINDOW
2765 wxEVT_END_SESSION
= _core
.wxEVT_END_SESSION
2766 wxEVT_QUERY_END_SESSION
= _core
.wxEVT_QUERY_END_SESSION
2767 wxEVT_ACTIVATE_APP
= _core
.wxEVT_ACTIVATE_APP
2768 wxEVT_POWER
= _core
.wxEVT_POWER
2769 wxEVT_ACTIVATE
= _core
.wxEVT_ACTIVATE
2770 wxEVT_CREATE
= _core
.wxEVT_CREATE
2771 wxEVT_DESTROY
= _core
.wxEVT_DESTROY
2772 wxEVT_SHOW
= _core
.wxEVT_SHOW
2773 wxEVT_ICONIZE
= _core
.wxEVT_ICONIZE
2774 wxEVT_MAXIMIZE
= _core
.wxEVT_MAXIMIZE
2775 wxEVT_MOUSE_CAPTURE_CHANGED
= _core
.wxEVT_MOUSE_CAPTURE_CHANGED
2776 wxEVT_PAINT
= _core
.wxEVT_PAINT
2777 wxEVT_ERASE_BACKGROUND
= _core
.wxEVT_ERASE_BACKGROUND
2778 wxEVT_NC_PAINT
= _core
.wxEVT_NC_PAINT
2779 wxEVT_PAINT_ICON
= _core
.wxEVT_PAINT_ICON
2780 wxEVT_MENU_OPEN
= _core
.wxEVT_MENU_OPEN
2781 wxEVT_MENU_CLOSE
= _core
.wxEVT_MENU_CLOSE
2782 wxEVT_MENU_HIGHLIGHT
= _core
.wxEVT_MENU_HIGHLIGHT
2783 wxEVT_CONTEXT_MENU
= _core
.wxEVT_CONTEXT_MENU
2784 wxEVT_SYS_COLOUR_CHANGED
= _core
.wxEVT_SYS_COLOUR_CHANGED
2785 wxEVT_DISPLAY_CHANGED
= _core
.wxEVT_DISPLAY_CHANGED
2786 wxEVT_SETTING_CHANGED
= _core
.wxEVT_SETTING_CHANGED
2787 wxEVT_QUERY_NEW_PALETTE
= _core
.wxEVT_QUERY_NEW_PALETTE
2788 wxEVT_PALETTE_CHANGED
= _core
.wxEVT_PALETTE_CHANGED
2789 wxEVT_DROP_FILES
= _core
.wxEVT_DROP_FILES
2790 wxEVT_DRAW_ITEM
= _core
.wxEVT_DRAW_ITEM
2791 wxEVT_MEASURE_ITEM
= _core
.wxEVT_MEASURE_ITEM
2792 wxEVT_COMPARE_ITEM
= _core
.wxEVT_COMPARE_ITEM
2793 wxEVT_INIT_DIALOG
= _core
.wxEVT_INIT_DIALOG
2794 wxEVT_IDLE
= _core
.wxEVT_IDLE
2795 wxEVT_UPDATE_UI
= _core
.wxEVT_UPDATE_UI
2796 wxEVT_SIZING
= _core
.wxEVT_SIZING
2797 wxEVT_MOVING
= _core
.wxEVT_MOVING
2798 wxEVT_COMMAND_LEFT_CLICK
= _core
.wxEVT_COMMAND_LEFT_CLICK
2799 wxEVT_COMMAND_LEFT_DCLICK
= _core
.wxEVT_COMMAND_LEFT_DCLICK
2800 wxEVT_COMMAND_RIGHT_CLICK
= _core
.wxEVT_COMMAND_RIGHT_CLICK
2801 wxEVT_COMMAND_RIGHT_DCLICK
= _core
.wxEVT_COMMAND_RIGHT_DCLICK
2802 wxEVT_COMMAND_SET_FOCUS
= _core
.wxEVT_COMMAND_SET_FOCUS
2803 wxEVT_COMMAND_KILL_FOCUS
= _core
.wxEVT_COMMAND_KILL_FOCUS
2804 wxEVT_COMMAND_ENTER
= _core
.wxEVT_COMMAND_ENTER
2806 # Create some event binders
2807 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
2808 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
2809 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
2810 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
2811 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
2812 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
2813 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
2814 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
2815 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
2816 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
2817 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
2818 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
2819 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
2820 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
2821 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
2822 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
2823 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
2824 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
2825 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
2826 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
2827 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
2828 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
2829 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
2830 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
2831 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
2832 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
2833 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
2834 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
2835 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
2836 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
2837 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
2838 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
2839 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
2840 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
2841 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
2842 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
2843 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
2844 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
2845 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
2846 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
2848 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
2849 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
2850 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
2851 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
2852 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
2853 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
2854 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
2855 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
2856 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
2857 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
2858 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
2859 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
2860 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
2862 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
2870 wxEVT_MIDDLE_DCLICK
,
2878 # Scrolling from wxWindow (sent to wxScrolledWindow)
2879 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
2880 wxEVT_SCROLLWIN_BOTTOM
,
2881 wxEVT_SCROLLWIN_LINEUP
,
2882 wxEVT_SCROLLWIN_LINEDOWN
,
2883 wxEVT_SCROLLWIN_PAGEUP
,
2884 wxEVT_SCROLLWIN_PAGEDOWN
,
2885 wxEVT_SCROLLWIN_THUMBTRACK
,
2886 wxEVT_SCROLLWIN_THUMBRELEASE
,
2889 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
2890 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
2891 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
2892 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
2893 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
2894 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
2895 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
2896 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
2898 # Scrolling from wxSlider and wxScrollBar
2899 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
2900 wxEVT_SCROLL_BOTTOM
,
2901 wxEVT_SCROLL_LINEUP
,
2902 wxEVT_SCROLL_LINEDOWN
,
2903 wxEVT_SCROLL_PAGEUP
,
2904 wxEVT_SCROLL_PAGEDOWN
,
2905 wxEVT_SCROLL_THUMBTRACK
,
2906 wxEVT_SCROLL_THUMBRELEASE
,
2907 wxEVT_SCROLL_ENDSCROLL
,
2910 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
2911 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
2912 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
2913 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
2914 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
2915 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
2916 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
2917 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
2918 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
2920 # Scrolling from wxSlider and wxScrollBar, with an id
2921 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
2922 wxEVT_SCROLL_BOTTOM
,
2923 wxEVT_SCROLL_LINEUP
,
2924 wxEVT_SCROLL_LINEDOWN
,
2925 wxEVT_SCROLL_PAGEUP
,
2926 wxEVT_SCROLL_PAGEDOWN
,
2927 wxEVT_SCROLL_THUMBTRACK
,
2928 wxEVT_SCROLL_THUMBRELEASE
,
2929 wxEVT_SCROLL_ENDSCROLL
,
2932 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
2933 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
2934 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
2935 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
2936 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
2937 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
2938 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
2939 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
2940 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
2942 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
2943 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
2944 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
2945 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
2946 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
2947 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
2948 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
2949 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
2950 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
2951 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
2953 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
2954 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
2955 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
2956 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
2957 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
2958 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
2959 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
2960 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
2961 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
2964 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
2965 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
2966 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
2967 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
2968 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
2969 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
2970 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
2972 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
2974 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
2975 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
2977 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
2981 #---------------------------------------------------------------------------
2983 class Event(Object
):
2984 def __init__(self
): raise RuntimeError, "No constructor defined"
2986 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2987 def __del__(self
, destroy
=_core
.delete_Event
):
2990 if self
.thisown
: destroy(self
)
2993 def SetEventType(*args
, **kwargs
):
2994 """SetEventType(wxEventType typ)"""
2995 return _core
.Event_SetEventType(*args
, **kwargs
)
2997 def GetEventType(*args
, **kwargs
):
2998 """GetEventType() -> wxEventType"""
2999 return _core
.Event_GetEventType(*args
, **kwargs
)
3001 def GetEventObject(*args
, **kwargs
):
3002 """GetEventObject() -> Object"""
3003 return _core
.Event_GetEventObject(*args
, **kwargs
)
3005 def SetEventObject(*args
, **kwargs
):
3006 """SetEventObject(Object obj)"""
3007 return _core
.Event_SetEventObject(*args
, **kwargs
)
3009 def GetTimestamp(*args
, **kwargs
):
3010 """GetTimestamp() -> long"""
3011 return _core
.Event_GetTimestamp(*args
, **kwargs
)
3013 def SetTimestamp(*args
, **kwargs
):
3014 """SetTimestamp(long ts=0)"""
3015 return _core
.Event_SetTimestamp(*args
, **kwargs
)
3017 def GetId(*args
, **kwargs
):
3018 """GetId() -> int"""
3019 return _core
.Event_GetId(*args
, **kwargs
)
3021 def SetId(*args
, **kwargs
):
3023 return _core
.Event_SetId(*args
, **kwargs
)
3025 def IsCommandEvent(*args
, **kwargs
):
3026 """IsCommandEvent() -> bool"""
3027 return _core
.Event_IsCommandEvent(*args
, **kwargs
)
3029 def Skip(*args
, **kwargs
):
3030 """Skip(bool skip=True)"""
3031 return _core
.Event_Skip(*args
, **kwargs
)
3033 def GetSkipped(*args
, **kwargs
):
3034 """GetSkipped() -> bool"""
3035 return _core
.Event_GetSkipped(*args
, **kwargs
)
3037 def ShouldPropagate(*args
, **kwargs
):
3038 """ShouldPropagate() -> bool"""
3039 return _core
.Event_ShouldPropagate(*args
, **kwargs
)
3041 def StopPropagation(*args
, **kwargs
):
3042 """StopPropagation() -> int"""
3043 return _core
.Event_StopPropagation(*args
, **kwargs
)
3045 def ResumePropagation(*args
, **kwargs
):
3046 """ResumePropagation(int propagationLevel)"""
3047 return _core
.Event_ResumePropagation(*args
, **kwargs
)
3049 def Clone(*args
, **kwargs
):
3050 """Clone() -> Event"""
3051 return _core
.Event_Clone(*args
, **kwargs
)
3054 class EventPtr(Event
):
3055 def __init__(self
, this
):
3057 if not hasattr(self
,"thisown"): self
.thisown
= 0
3058 self
.__class
__ = Event
3059 _core
.Event_swigregister(EventPtr
)
3061 #---------------------------------------------------------------------------
3063 class PropagationDisabler(object):
3065 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3066 def __init__(self
, *args
, **kwargs
):
3067 """__init__(Event event) -> PropagationDisabler"""
3068 newobj
= _core
.new_PropagationDisabler(*args
, **kwargs
)
3069 self
.this
= newobj
.this
3072 def __del__(self
, destroy
=_core
.delete_PropagationDisabler
):
3075 if self
.thisown
: destroy(self
)
3079 class PropagationDisablerPtr(PropagationDisabler
):
3080 def __init__(self
, this
):
3082 if not hasattr(self
,"thisown"): self
.thisown
= 0
3083 self
.__class
__ = PropagationDisabler
3084 _core
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3086 class PropagateOnce(object):
3088 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3089 def __init__(self
, *args
, **kwargs
):
3090 """__init__(Event event) -> PropagateOnce"""
3091 newobj
= _core
.new_PropagateOnce(*args
, **kwargs
)
3092 self
.this
= newobj
.this
3095 def __del__(self
, destroy
=_core
.delete_PropagateOnce
):
3098 if self
.thisown
: destroy(self
)
3102 class PropagateOncePtr(PropagateOnce
):
3103 def __init__(self
, this
):
3105 if not hasattr(self
,"thisown"): self
.thisown
= 0
3106 self
.__class
__ = PropagateOnce
3107 _core
.PropagateOnce_swigregister(PropagateOncePtr
)
3109 #---------------------------------------------------------------------------
3111 class CommandEvent(Event
):
3113 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3114 def __init__(self
, *args
, **kwargs
):
3115 """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3116 newobj
= _core
.new_CommandEvent(*args
, **kwargs
)
3117 self
.this
= newobj
.this
3120 def GetSelection(*args
, **kwargs
):
3121 """GetSelection() -> int"""
3122 return _core
.CommandEvent_GetSelection(*args
, **kwargs
)
3124 def SetString(*args
, **kwargs
):
3125 """SetString(String s)"""
3126 return _core
.CommandEvent_SetString(*args
, **kwargs
)
3128 def GetString(*args
, **kwargs
):
3129 """GetString() -> String"""
3130 return _core
.CommandEvent_GetString(*args
, **kwargs
)
3132 def IsChecked(*args
, **kwargs
):
3133 """IsChecked() -> bool"""
3134 return _core
.CommandEvent_IsChecked(*args
, **kwargs
)
3137 def IsSelection(*args
, **kwargs
):
3138 """IsSelection() -> bool"""
3139 return _core
.CommandEvent_IsSelection(*args
, **kwargs
)
3141 def SetExtraLong(*args
, **kwargs
):
3142 """SetExtraLong(long extraLong)"""
3143 return _core
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3145 def GetExtraLong(*args
, **kwargs
):
3146 """GetExtraLong() -> long"""
3147 return _core
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3149 def SetInt(*args
, **kwargs
):
3151 return _core
.CommandEvent_SetInt(*args
, **kwargs
)
3153 def GetInt(*args
, **kwargs
):
3154 """GetInt() -> long"""
3155 return _core
.CommandEvent_GetInt(*args
, **kwargs
)
3157 def Clone(*args
, **kwargs
):
3158 """Clone() -> Event"""
3159 return _core
.CommandEvent_Clone(*args
, **kwargs
)
3162 class CommandEventPtr(CommandEvent
):
3163 def __init__(self
, this
):
3165 if not hasattr(self
,"thisown"): self
.thisown
= 0
3166 self
.__class
__ = CommandEvent
3167 _core
.CommandEvent_swigregister(CommandEventPtr
)
3169 #---------------------------------------------------------------------------
3171 class NotifyEvent(CommandEvent
):
3173 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3174 def __init__(self
, *args
, **kwargs
):
3175 """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3176 newobj
= _core
.new_NotifyEvent(*args
, **kwargs
)
3177 self
.this
= newobj
.this
3180 def Veto(*args
, **kwargs
):
3182 return _core
.NotifyEvent_Veto(*args
, **kwargs
)
3184 def Allow(*args
, **kwargs
):
3186 return _core
.NotifyEvent_Allow(*args
, **kwargs
)
3188 def IsAllowed(*args
, **kwargs
):
3189 """IsAllowed() -> bool"""
3190 return _core
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3193 class NotifyEventPtr(NotifyEvent
):
3194 def __init__(self
, this
):
3196 if not hasattr(self
,"thisown"): self
.thisown
= 0
3197 self
.__class
__ = NotifyEvent
3198 _core
.NotifyEvent_swigregister(NotifyEventPtr
)
3200 #---------------------------------------------------------------------------
3202 class ScrollEvent(CommandEvent
):
3204 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3205 def __init__(self
, *args
, **kwargs
):
3207 __init__(wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3208 int orient=0) -> ScrollEvent
3210 newobj
= _core
.new_ScrollEvent(*args
, **kwargs
)
3211 self
.this
= newobj
.this
3214 def GetOrientation(*args
, **kwargs
):
3215 """GetOrientation() -> int"""
3216 return _core
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3218 def GetPosition(*args
, **kwargs
):
3219 """GetPosition() -> int"""
3220 return _core
.ScrollEvent_GetPosition(*args
, **kwargs
)
3222 def SetOrientation(*args
, **kwargs
):
3223 """SetOrientation(int orient)"""
3224 return _core
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3226 def SetPosition(*args
, **kwargs
):
3227 """SetPosition(int pos)"""
3228 return _core
.ScrollEvent_SetPosition(*args
, **kwargs
)
3231 class ScrollEventPtr(ScrollEvent
):
3232 def __init__(self
, this
):
3234 if not hasattr(self
,"thisown"): self
.thisown
= 0
3235 self
.__class
__ = ScrollEvent
3236 _core
.ScrollEvent_swigregister(ScrollEventPtr
)
3238 #---------------------------------------------------------------------------
3240 class ScrollWinEvent(Event
):
3242 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3243 def __init__(self
, *args
, **kwargs
):
3244 """__init__(wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3245 newobj
= _core
.new_ScrollWinEvent(*args
, **kwargs
)
3246 self
.this
= newobj
.this
3249 def GetOrientation(*args
, **kwargs
):
3250 """GetOrientation() -> int"""
3251 return _core
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3253 def GetPosition(*args
, **kwargs
):
3254 """GetPosition() -> int"""
3255 return _core
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3257 def SetOrientation(*args
, **kwargs
):
3258 """SetOrientation(int orient)"""
3259 return _core
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3261 def SetPosition(*args
, **kwargs
):
3262 """SetPosition(int pos)"""
3263 return _core
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3266 class ScrollWinEventPtr(ScrollWinEvent
):
3267 def __init__(self
, this
):
3269 if not hasattr(self
,"thisown"): self
.thisown
= 0
3270 self
.__class
__ = ScrollWinEvent
3271 _core
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3273 #---------------------------------------------------------------------------
3275 MOUSE_BTN_ANY
= _core
.MOUSE_BTN_ANY
3276 MOUSE_BTN_NONE
= _core
.MOUSE_BTN_NONE
3277 MOUSE_BTN_LEFT
= _core
.MOUSE_BTN_LEFT
3278 MOUSE_BTN_MIDDLE
= _core
.MOUSE_BTN_MIDDLE
3279 MOUSE_BTN_RIGHT
= _core
.MOUSE_BTN_RIGHT
3280 class MouseEvent(Event
):
3282 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3283 def __init__(self
, *args
, **kwargs
):
3284 """__init__(wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3285 newobj
= _core
.new_MouseEvent(*args
, **kwargs
)
3286 self
.this
= newobj
.this
3289 def IsButton(*args
, **kwargs
):
3290 """IsButton() -> bool"""
3291 return _core
.MouseEvent_IsButton(*args
, **kwargs
)
3293 def ButtonDown(*args
, **kwargs
):
3294 """ButtonDown(int but=MOUSE_BTN_ANY) -> bool"""
3295 return _core
.MouseEvent_ButtonDown(*args
, **kwargs
)
3297 def ButtonDClick(*args
, **kwargs
):
3298 """ButtonDClick(int but=MOUSE_BTN_ANY) -> bool"""
3299 return _core
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3301 def ButtonUp(*args
, **kwargs
):
3302 """ButtonUp(int but=MOUSE_BTN_ANY) -> bool"""
3303 return _core
.MouseEvent_ButtonUp(*args
, **kwargs
)
3305 def Button(*args
, **kwargs
):
3306 """Button(int but) -> bool"""
3307 return _core
.MouseEvent_Button(*args
, **kwargs
)
3309 def ButtonIsDown(*args
, **kwargs
):
3310 """ButtonIsDown(int but) -> bool"""
3311 return _core
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3313 def GetButton(*args
, **kwargs
):
3314 """GetButton() -> int"""
3315 return _core
.MouseEvent_GetButton(*args
, **kwargs
)
3317 def ControlDown(*args
, **kwargs
):
3318 """ControlDown() -> bool"""
3319 return _core
.MouseEvent_ControlDown(*args
, **kwargs
)
3321 def MetaDown(*args
, **kwargs
):
3322 """MetaDown() -> bool"""
3323 return _core
.MouseEvent_MetaDown(*args
, **kwargs
)
3325 def AltDown(*args
, **kwargs
):
3326 """AltDown() -> bool"""
3327 return _core
.MouseEvent_AltDown(*args
, **kwargs
)
3329 def ShiftDown(*args
, **kwargs
):
3330 """ShiftDown() -> bool"""
3331 return _core
.MouseEvent_ShiftDown(*args
, **kwargs
)
3333 def LeftDown(*args
, **kwargs
):
3334 """LeftDown() -> bool"""
3335 return _core
.MouseEvent_LeftDown(*args
, **kwargs
)
3337 def MiddleDown(*args
, **kwargs
):
3338 """MiddleDown() -> bool"""
3339 return _core
.MouseEvent_MiddleDown(*args
, **kwargs
)
3341 def RightDown(*args
, **kwargs
):
3342 """RightDown() -> bool"""
3343 return _core
.MouseEvent_RightDown(*args
, **kwargs
)
3345 def LeftUp(*args
, **kwargs
):
3346 """LeftUp() -> bool"""
3347 return _core
.MouseEvent_LeftUp(*args
, **kwargs
)
3349 def MiddleUp(*args
, **kwargs
):
3350 """MiddleUp() -> bool"""
3351 return _core
.MouseEvent_MiddleUp(*args
, **kwargs
)
3353 def RightUp(*args
, **kwargs
):
3354 """RightUp() -> bool"""
3355 return _core
.MouseEvent_RightUp(*args
, **kwargs
)
3357 def LeftDClick(*args
, **kwargs
):
3358 """LeftDClick() -> bool"""
3359 return _core
.MouseEvent_LeftDClick(*args
, **kwargs
)
3361 def MiddleDClick(*args
, **kwargs
):
3362 """MiddleDClick() -> bool"""
3363 return _core
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3365 def RightDClick(*args
, **kwargs
):
3366 """RightDClick() -> bool"""
3367 return _core
.MouseEvent_RightDClick(*args
, **kwargs
)
3369 def LeftIsDown(*args
, **kwargs
):
3370 """LeftIsDown() -> bool"""
3371 return _core
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3373 def MiddleIsDown(*args
, **kwargs
):
3374 """MiddleIsDown() -> bool"""
3375 return _core
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3377 def RightIsDown(*args
, **kwargs
):
3378 """RightIsDown() -> bool"""
3379 return _core
.MouseEvent_RightIsDown(*args
, **kwargs
)
3381 def Dragging(*args
, **kwargs
):
3382 """Dragging() -> bool"""
3383 return _core
.MouseEvent_Dragging(*args
, **kwargs
)
3385 def Moving(*args
, **kwargs
):
3386 """Moving() -> bool"""
3387 return _core
.MouseEvent_Moving(*args
, **kwargs
)
3389 def Entering(*args
, **kwargs
):
3390 """Entering() -> bool"""
3391 return _core
.MouseEvent_Entering(*args
, **kwargs
)
3393 def Leaving(*args
, **kwargs
):
3394 """Leaving() -> bool"""
3395 return _core
.MouseEvent_Leaving(*args
, **kwargs
)
3397 def GetPosition(*args
, **kwargs
):
3399 GetPosition() -> Point
3401 Returns the position of the mouse in window coordinates when the event happened.
3403 return _core
.MouseEvent_GetPosition(*args
, **kwargs
)
3405 def GetPositionTuple(*args
, **kwargs
):
3407 GetPositionTuple() -> (x,y)
3409 Returns the position of the mouse in window coordinates when the event happened.
3411 return _core
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3413 def GetLogicalPosition(*args
, **kwargs
):
3414 """GetLogicalPosition(DC dc) -> Point"""
3415 return _core
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3417 def GetX(*args
, **kwargs
):
3419 return _core
.MouseEvent_GetX(*args
, **kwargs
)
3421 def GetY(*args
, **kwargs
):
3423 return _core
.MouseEvent_GetY(*args
, **kwargs
)
3425 def GetWheelRotation(*args
, **kwargs
):
3426 """GetWheelRotation() -> int"""
3427 return _core
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3429 def GetWheelDelta(*args
, **kwargs
):
3430 """GetWheelDelta() -> int"""
3431 return _core
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3433 def GetLinesPerAction(*args
, **kwargs
):
3434 """GetLinesPerAction() -> int"""
3435 return _core
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3437 def IsPageScroll(*args
, **kwargs
):
3438 """IsPageScroll() -> bool"""
3439 return _core
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3441 m_x
= property(_core
.MouseEvent_m_x_get
, _core
.MouseEvent_m_x_set
)
3442 m_y
= property(_core
.MouseEvent_m_y_get
, _core
.MouseEvent_m_y_set
)
3443 m_leftDown
= property(_core
.MouseEvent_m_leftDown_get
, _core
.MouseEvent_m_leftDown_set
)
3444 m_middleDown
= property(_core
.MouseEvent_m_middleDown_get
, _core
.MouseEvent_m_middleDown_set
)
3445 m_rightDown
= property(_core
.MouseEvent_m_rightDown_get
, _core
.MouseEvent_m_rightDown_set
)
3446 m_controlDown
= property(_core
.MouseEvent_m_controlDown_get
, _core
.MouseEvent_m_controlDown_set
)
3447 m_shiftDown
= property(_core
.MouseEvent_m_shiftDown_get
, _core
.MouseEvent_m_shiftDown_set
)
3448 m_altDown
= property(_core
.MouseEvent_m_altDown_get
, _core
.MouseEvent_m_altDown_set
)
3449 m_metaDown
= property(_core
.MouseEvent_m_metaDown_get
, _core
.MouseEvent_m_metaDown_set
)
3450 m_wheelRotation
= property(_core
.MouseEvent_m_wheelRotation_get
, _core
.MouseEvent_m_wheelRotation_set
)
3451 m_wheelDelta
= property(_core
.MouseEvent_m_wheelDelta_get
, _core
.MouseEvent_m_wheelDelta_set
)
3452 m_linesPerAction
= property(_core
.MouseEvent_m_linesPerAction_get
, _core
.MouseEvent_m_linesPerAction_set
)
3454 class MouseEventPtr(MouseEvent
):
3455 def __init__(self
, this
):
3457 if not hasattr(self
,"thisown"): self
.thisown
= 0
3458 self
.__class
__ = MouseEvent
3459 _core
.MouseEvent_swigregister(MouseEventPtr
)
3461 #---------------------------------------------------------------------------
3463 class SetCursorEvent(Event
):
3465 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3466 def __init__(self
, *args
, **kwargs
):
3467 """__init__(int x=0, int y=0) -> SetCursorEvent"""
3468 newobj
= _core
.new_SetCursorEvent(*args
, **kwargs
)
3469 self
.this
= newobj
.this
3472 def GetX(*args
, **kwargs
):
3474 return _core
.SetCursorEvent_GetX(*args
, **kwargs
)
3476 def GetY(*args
, **kwargs
):
3478 return _core
.SetCursorEvent_GetY(*args
, **kwargs
)
3480 def SetCursor(*args
, **kwargs
):
3481 """SetCursor(Cursor cursor)"""
3482 return _core
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3484 def GetCursor(*args
, **kwargs
):
3485 """GetCursor() -> Cursor"""
3486 return _core
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3488 def HasCursor(*args
, **kwargs
):
3489 """HasCursor() -> bool"""
3490 return _core
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3493 class SetCursorEventPtr(SetCursorEvent
):
3494 def __init__(self
, this
):
3496 if not hasattr(self
,"thisown"): self
.thisown
= 0
3497 self
.__class
__ = SetCursorEvent
3498 _core
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3500 #---------------------------------------------------------------------------
3502 class KeyEvent(Event
):
3504 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3505 def __init__(self
, *args
, **kwargs
):
3506 """__init__(wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3507 newobj
= _core
.new_KeyEvent(*args
, **kwargs
)
3508 self
.this
= newobj
.this
3511 def ControlDown(*args
, **kwargs
):
3512 """ControlDown() -> bool"""
3513 return _core
.KeyEvent_ControlDown(*args
, **kwargs
)
3515 def MetaDown(*args
, **kwargs
):
3516 """MetaDown() -> bool"""
3517 return _core
.KeyEvent_MetaDown(*args
, **kwargs
)
3519 def AltDown(*args
, **kwargs
):
3520 """AltDown() -> bool"""
3521 return _core
.KeyEvent_AltDown(*args
, **kwargs
)
3523 def ShiftDown(*args
, **kwargs
):
3524 """ShiftDown() -> bool"""
3525 return _core
.KeyEvent_ShiftDown(*args
, **kwargs
)
3527 def HasModifiers(*args
, **kwargs
):
3528 """HasModifiers() -> bool"""
3529 return _core
.KeyEvent_HasModifiers(*args
, **kwargs
)
3531 def GetKeyCode(*args
, **kwargs
):
3532 """GetKeyCode() -> int"""
3533 return _core
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3535 KeyCode
= GetKeyCode
3536 def GetUniChar(*args
, **kwargs
):
3537 """GetUniChar() -> int"""
3538 return _core
.KeyEvent_GetUniChar(*args
, **kwargs
)
3540 def GetRawKeyCode(*args
, **kwargs
):
3541 """GetRawKeyCode() -> unsigned int"""
3542 return _core
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3544 def GetRawKeyFlags(*args
, **kwargs
):
3545 """GetRawKeyFlags() -> unsigned int"""
3546 return _core
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3548 def GetPosition(*args
, **kwargs
):
3550 GetPosition() -> Point
3552 Find the position of the event.
3554 return _core
.KeyEvent_GetPosition(*args
, **kwargs
)
3556 def GetPositionTuple(*args
, **kwargs
):
3558 GetPositionTuple() -> (x,y)
3560 Find the position of the event.
3562 return _core
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3564 def GetX(*args
, **kwargs
):
3566 return _core
.KeyEvent_GetX(*args
, **kwargs
)
3568 def GetY(*args
, **kwargs
):
3570 return _core
.KeyEvent_GetY(*args
, **kwargs
)
3572 m_x
= property(_core
.KeyEvent_m_x_get
, _core
.KeyEvent_m_x_set
)
3573 m_y
= property(_core
.KeyEvent_m_y_get
, _core
.KeyEvent_m_y_set
)
3574 m_keyCode
= property(_core
.KeyEvent_m_keyCode_get
, _core
.KeyEvent_m_keyCode_set
)
3575 m_controlDown
= property(_core
.KeyEvent_m_controlDown_get
, _core
.KeyEvent_m_controlDown_set
)
3576 m_shiftDown
= property(_core
.KeyEvent_m_shiftDown_get
, _core
.KeyEvent_m_shiftDown_set
)
3577 m_altDown
= property(_core
.KeyEvent_m_altDown_get
, _core
.KeyEvent_m_altDown_set
)
3578 m_metaDown
= property(_core
.KeyEvent_m_metaDown_get
, _core
.KeyEvent_m_metaDown_set
)
3579 m_scanCode
= property(_core
.KeyEvent_m_scanCode_get
, _core
.KeyEvent_m_scanCode_set
)
3580 m_rawCode
= property(_core
.KeyEvent_m_rawCode_get
, _core
.KeyEvent_m_rawCode_set
)
3581 m_rawFlags
= property(_core
.KeyEvent_m_rawFlags_get
, _core
.KeyEvent_m_rawFlags_set
)
3583 class KeyEventPtr(KeyEvent
):
3584 def __init__(self
, this
):
3586 if not hasattr(self
,"thisown"): self
.thisown
= 0
3587 self
.__class
__ = KeyEvent
3588 _core
.KeyEvent_swigregister(KeyEventPtr
)
3590 #---------------------------------------------------------------------------
3592 class SizeEvent(Event
):
3594 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3595 def __init__(self
, *args
, **kwargs
):
3596 """__init__(Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3597 newobj
= _core
.new_SizeEvent(*args
, **kwargs
)
3598 self
.this
= newobj
.this
3601 def GetSize(*args
, **kwargs
):
3602 """GetSize() -> Size"""
3603 return _core
.SizeEvent_GetSize(*args
, **kwargs
)
3605 def GetRect(*args
, **kwargs
):
3606 """GetRect() -> Rect"""
3607 return _core
.SizeEvent_GetRect(*args
, **kwargs
)
3609 def SetRect(*args
, **kwargs
):
3610 """SetRect(Rect rect)"""
3611 return _core
.SizeEvent_SetRect(*args
, **kwargs
)
3613 def SetSize(*args
, **kwargs
):
3614 """SetSize(Size size)"""
3615 return _core
.SizeEvent_SetSize(*args
, **kwargs
)
3617 m_size
= property(_core
.SizeEvent_m_size_get
, _core
.SizeEvent_m_size_set
)
3618 m_rect
= property(_core
.SizeEvent_m_rect_get
, _core
.SizeEvent_m_rect_set
)
3620 class SizeEventPtr(SizeEvent
):
3621 def __init__(self
, this
):
3623 if not hasattr(self
,"thisown"): self
.thisown
= 0
3624 self
.__class
__ = SizeEvent
3625 _core
.SizeEvent_swigregister(SizeEventPtr
)
3627 #---------------------------------------------------------------------------
3629 class MoveEvent(Event
):
3631 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3632 def __init__(self
, *args
, **kwargs
):
3633 """__init__(Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3634 newobj
= _core
.new_MoveEvent(*args
, **kwargs
)
3635 self
.this
= newobj
.this
3638 def GetPosition(*args
, **kwargs
):
3639 """GetPosition() -> Point"""
3640 return _core
.MoveEvent_GetPosition(*args
, **kwargs
)
3642 def GetRect(*args
, **kwargs
):
3643 """GetRect() -> Rect"""
3644 return _core
.MoveEvent_GetRect(*args
, **kwargs
)
3646 def SetRect(*args
, **kwargs
):
3647 """SetRect(Rect rect)"""
3648 return _core
.MoveEvent_SetRect(*args
, **kwargs
)
3650 def SetPosition(*args
, **kwargs
):
3651 """SetPosition(Point pos)"""
3652 return _core
.MoveEvent_SetPosition(*args
, **kwargs
)
3654 m_pos
= property(_core
.MoveEvent_m_pos_get
, _core
.MoveEvent_m_pos_set
)
3655 m_rect
= property(_core
.MoveEvent_m_rect_get
, _core
.MoveEvent_m_rect_set
)
3657 class MoveEventPtr(MoveEvent
):
3658 def __init__(self
, this
):
3660 if not hasattr(self
,"thisown"): self
.thisown
= 0
3661 self
.__class
__ = MoveEvent
3662 _core
.MoveEvent_swigregister(MoveEventPtr
)
3664 #---------------------------------------------------------------------------
3666 class PaintEvent(Event
):
3668 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3669 def __init__(self
, *args
, **kwargs
):
3670 """__init__(int Id=0) -> PaintEvent"""
3671 newobj
= _core
.new_PaintEvent(*args
, **kwargs
)
3672 self
.this
= newobj
.this
3676 class PaintEventPtr(PaintEvent
):
3677 def __init__(self
, this
):
3679 if not hasattr(self
,"thisown"): self
.thisown
= 0
3680 self
.__class
__ = PaintEvent
3681 _core
.PaintEvent_swigregister(PaintEventPtr
)
3683 class NcPaintEvent(Event
):
3685 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3686 def __init__(self
, *args
, **kwargs
):
3687 """__init__(int winid=0) -> NcPaintEvent"""
3688 newobj
= _core
.new_NcPaintEvent(*args
, **kwargs
)
3689 self
.this
= newobj
.this
3693 class NcPaintEventPtr(NcPaintEvent
):
3694 def __init__(self
, this
):
3696 if not hasattr(self
,"thisown"): self
.thisown
= 0
3697 self
.__class
__ = NcPaintEvent
3698 _core
.NcPaintEvent_swigregister(NcPaintEventPtr
)
3700 #---------------------------------------------------------------------------
3702 class EraseEvent(Event
):
3704 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3705 def __init__(self
, *args
, **kwargs
):
3706 """__init__(int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3707 newobj
= _core
.new_EraseEvent(*args
, **kwargs
)
3708 self
.this
= newobj
.this
3711 def GetDC(*args
, **kwargs
):
3713 return _core
.EraseEvent_GetDC(*args
, **kwargs
)
3716 class EraseEventPtr(EraseEvent
):
3717 def __init__(self
, this
):
3719 if not hasattr(self
,"thisown"): self
.thisown
= 0
3720 self
.__class
__ = EraseEvent
3721 _core
.EraseEvent_swigregister(EraseEventPtr
)
3723 #---------------------------------------------------------------------------
3725 class FocusEvent(Event
):
3727 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3728 def __init__(self
, *args
, **kwargs
):
3729 """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
3730 newobj
= _core
.new_FocusEvent(*args
, **kwargs
)
3731 self
.this
= newobj
.this
3734 def GetWindow(*args
, **kwargs
):
3735 """GetWindow() -> Window"""
3736 return _core
.FocusEvent_GetWindow(*args
, **kwargs
)
3738 def SetWindow(*args
, **kwargs
):
3739 """SetWindow(Window win)"""
3740 return _core
.FocusEvent_SetWindow(*args
, **kwargs
)
3743 class FocusEventPtr(FocusEvent
):
3744 def __init__(self
, this
):
3746 if not hasattr(self
,"thisown"): self
.thisown
= 0
3747 self
.__class
__ = FocusEvent
3748 _core
.FocusEvent_swigregister(FocusEventPtr
)
3750 #---------------------------------------------------------------------------
3752 class ChildFocusEvent(CommandEvent
):
3754 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3755 def __init__(self
, *args
, **kwargs
):
3756 """__init__(Window win=None) -> ChildFocusEvent"""
3757 newobj
= _core
.new_ChildFocusEvent(*args
, **kwargs
)
3758 self
.this
= newobj
.this
3761 def GetWindow(*args
, **kwargs
):
3762 """GetWindow() -> Window"""
3763 return _core
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
3766 class ChildFocusEventPtr(ChildFocusEvent
):
3767 def __init__(self
, this
):
3769 if not hasattr(self
,"thisown"): self
.thisown
= 0
3770 self
.__class
__ = ChildFocusEvent
3771 _core
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
3773 #---------------------------------------------------------------------------
3775 class ActivateEvent(Event
):
3777 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3778 def __init__(self
, *args
, **kwargs
):
3779 """__init__(wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
3780 newobj
= _core
.new_ActivateEvent(*args
, **kwargs
)
3781 self
.this
= newobj
.this
3784 def GetActive(*args
, **kwargs
):
3785 """GetActive() -> bool"""
3786 return _core
.ActivateEvent_GetActive(*args
, **kwargs
)
3789 class ActivateEventPtr(ActivateEvent
):
3790 def __init__(self
, this
):
3792 if not hasattr(self
,"thisown"): self
.thisown
= 0
3793 self
.__class
__ = ActivateEvent
3794 _core
.ActivateEvent_swigregister(ActivateEventPtr
)
3796 #---------------------------------------------------------------------------
3798 class InitDialogEvent(Event
):
3800 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3801 def __init__(self
, *args
, **kwargs
):
3802 """__init__(int Id=0) -> InitDialogEvent"""
3803 newobj
= _core
.new_InitDialogEvent(*args
, **kwargs
)
3804 self
.this
= newobj
.this
3808 class InitDialogEventPtr(InitDialogEvent
):
3809 def __init__(self
, this
):
3811 if not hasattr(self
,"thisown"): self
.thisown
= 0
3812 self
.__class
__ = InitDialogEvent
3813 _core
.InitDialogEvent_swigregister(InitDialogEventPtr
)
3815 #---------------------------------------------------------------------------
3817 class MenuEvent(Event
):
3819 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3820 def __init__(self
, *args
, **kwargs
):
3821 """__init__(wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
3822 newobj
= _core
.new_MenuEvent(*args
, **kwargs
)
3823 self
.this
= newobj
.this
3826 def GetMenuId(*args
, **kwargs
):
3827 """GetMenuId() -> int"""
3828 return _core
.MenuEvent_GetMenuId(*args
, **kwargs
)
3830 def IsPopup(*args
, **kwargs
):
3831 """IsPopup() -> bool"""
3832 return _core
.MenuEvent_IsPopup(*args
, **kwargs
)
3834 def GetMenu(*args
, **kwargs
):
3835 """GetMenu() -> Menu"""
3836 return _core
.MenuEvent_GetMenu(*args
, **kwargs
)
3839 class MenuEventPtr(MenuEvent
):
3840 def __init__(self
, this
):
3842 if not hasattr(self
,"thisown"): self
.thisown
= 0
3843 self
.__class
__ = MenuEvent
3844 _core
.MenuEvent_swigregister(MenuEventPtr
)
3846 #---------------------------------------------------------------------------
3848 class CloseEvent(Event
):
3850 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3851 def __init__(self
, *args
, **kwargs
):
3852 """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
3853 newobj
= _core
.new_CloseEvent(*args
, **kwargs
)
3854 self
.this
= newobj
.this
3857 def SetLoggingOff(*args
, **kwargs
):
3858 """SetLoggingOff(bool logOff)"""
3859 return _core
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
3861 def GetLoggingOff(*args
, **kwargs
):
3862 """GetLoggingOff() -> bool"""
3863 return _core
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
3865 def Veto(*args
, **kwargs
):
3866 """Veto(bool veto=True)"""
3867 return _core
.CloseEvent_Veto(*args
, **kwargs
)
3869 def SetCanVeto(*args
, **kwargs
):
3870 """SetCanVeto(bool canVeto)"""
3871 return _core
.CloseEvent_SetCanVeto(*args
, **kwargs
)
3873 def CanVeto(*args
, **kwargs
):
3874 """CanVeto() -> bool"""
3875 return _core
.CloseEvent_CanVeto(*args
, **kwargs
)
3877 def GetVeto(*args
, **kwargs
):
3878 """GetVeto() -> bool"""
3879 return _core
.CloseEvent_GetVeto(*args
, **kwargs
)
3882 class CloseEventPtr(CloseEvent
):
3883 def __init__(self
, this
):
3885 if not hasattr(self
,"thisown"): self
.thisown
= 0
3886 self
.__class
__ = CloseEvent
3887 _core
.CloseEvent_swigregister(CloseEventPtr
)
3889 #---------------------------------------------------------------------------
3891 class ShowEvent(Event
):
3893 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3894 def __init__(self
, *args
, **kwargs
):
3895 """__init__(int winid=0, bool show=False) -> ShowEvent"""
3896 newobj
= _core
.new_ShowEvent(*args
, **kwargs
)
3897 self
.this
= newobj
.this
3900 def SetShow(*args
, **kwargs
):
3901 """SetShow(bool show)"""
3902 return _core
.ShowEvent_SetShow(*args
, **kwargs
)
3904 def GetShow(*args
, **kwargs
):
3905 """GetShow() -> bool"""
3906 return _core
.ShowEvent_GetShow(*args
, **kwargs
)
3909 class ShowEventPtr(ShowEvent
):
3910 def __init__(self
, this
):
3912 if not hasattr(self
,"thisown"): self
.thisown
= 0
3913 self
.__class
__ = ShowEvent
3914 _core
.ShowEvent_swigregister(ShowEventPtr
)
3916 #---------------------------------------------------------------------------
3918 class IconizeEvent(Event
):
3920 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3921 def __init__(self
, *args
, **kwargs
):
3922 """__init__(int id=0, bool iconized=True) -> IconizeEvent"""
3923 newobj
= _core
.new_IconizeEvent(*args
, **kwargs
)
3924 self
.this
= newobj
.this
3927 def Iconized(*args
, **kwargs
):
3928 """Iconized() -> bool"""
3929 return _core
.IconizeEvent_Iconized(*args
, **kwargs
)
3932 class IconizeEventPtr(IconizeEvent
):
3933 def __init__(self
, this
):
3935 if not hasattr(self
,"thisown"): self
.thisown
= 0
3936 self
.__class
__ = IconizeEvent
3937 _core
.IconizeEvent_swigregister(IconizeEventPtr
)
3939 #---------------------------------------------------------------------------
3941 class MaximizeEvent(Event
):
3943 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3944 def __init__(self
, *args
, **kwargs
):
3945 """__init__(int id=0) -> MaximizeEvent"""
3946 newobj
= _core
.new_MaximizeEvent(*args
, **kwargs
)
3947 self
.this
= newobj
.this
3951 class MaximizeEventPtr(MaximizeEvent
):
3952 def __init__(self
, this
):
3954 if not hasattr(self
,"thisown"): self
.thisown
= 0
3955 self
.__class
__ = MaximizeEvent
3956 _core
.MaximizeEvent_swigregister(MaximizeEventPtr
)
3958 #---------------------------------------------------------------------------
3960 class DropFilesEvent(Event
):
3961 def __init__(self
): raise RuntimeError, "No constructor defined"
3963 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3964 def GetPosition(*args
, **kwargs
):
3965 """GetPosition() -> Point"""
3966 return _core
.DropFilesEvent_GetPosition(*args
, **kwargs
)
3968 def GetNumberOfFiles(*args
, **kwargs
):
3969 """GetNumberOfFiles() -> int"""
3970 return _core
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
3972 def GetFiles(*args
, **kwargs
):
3973 """GetFiles() -> PyObject"""
3974 return _core
.DropFilesEvent_GetFiles(*args
, **kwargs
)
3977 class DropFilesEventPtr(DropFilesEvent
):
3978 def __init__(self
, this
):
3980 if not hasattr(self
,"thisown"): self
.thisown
= 0
3981 self
.__class
__ = DropFilesEvent
3982 _core
.DropFilesEvent_swigregister(DropFilesEventPtr
)
3984 #---------------------------------------------------------------------------
3986 UPDATE_UI_PROCESS_ALL
= _core
.UPDATE_UI_PROCESS_ALL
3987 UPDATE_UI_PROCESS_SPECIFIED
= _core
.UPDATE_UI_PROCESS_SPECIFIED
3988 class UpdateUIEvent(CommandEvent
):
3990 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3991 def __init__(self
, *args
, **kwargs
):
3992 """__init__(int commandId=0) -> UpdateUIEvent"""
3993 newobj
= _core
.new_UpdateUIEvent(*args
, **kwargs
)
3994 self
.this
= newobj
.this
3997 def GetChecked(*args
, **kwargs
):
3998 """GetChecked() -> bool"""
3999 return _core
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4001 def GetEnabled(*args
, **kwargs
):
4002 """GetEnabled() -> bool"""
4003 return _core
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4005 def GetText(*args
, **kwargs
):
4006 """GetText() -> String"""
4007 return _core
.UpdateUIEvent_GetText(*args
, **kwargs
)
4009 def GetSetText(*args
, **kwargs
):
4010 """GetSetText() -> bool"""
4011 return _core
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4013 def GetSetChecked(*args
, **kwargs
):
4014 """GetSetChecked() -> bool"""
4015 return _core
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4017 def GetSetEnabled(*args
, **kwargs
):
4018 """GetSetEnabled() -> bool"""
4019 return _core
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4021 def Check(*args
, **kwargs
):
4022 """Check(bool check)"""
4023 return _core
.UpdateUIEvent_Check(*args
, **kwargs
)
4025 def Enable(*args
, **kwargs
):
4026 """Enable(bool enable)"""
4027 return _core
.UpdateUIEvent_Enable(*args
, **kwargs
)
4029 def SetText(*args
, **kwargs
):
4030 """SetText(String text)"""
4031 return _core
.UpdateUIEvent_SetText(*args
, **kwargs
)
4033 def SetUpdateInterval(*args
, **kwargs
):
4034 """SetUpdateInterval(long updateInterval)"""
4035 return _core
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4037 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4038 def GetUpdateInterval(*args
, **kwargs
):
4039 """GetUpdateInterval() -> long"""
4040 return _core
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4042 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4043 def CanUpdate(*args
, **kwargs
):
4044 """CanUpdate(Window win) -> bool"""
4045 return _core
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4047 CanUpdate
= staticmethod(CanUpdate
)
4048 def ResetUpdateTime(*args
, **kwargs
):
4049 """ResetUpdateTime()"""
4050 return _core
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4052 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4053 def SetMode(*args
, **kwargs
):
4054 """SetMode(int mode)"""
4055 return _core
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4057 SetMode
= staticmethod(SetMode
)
4058 def GetMode(*args
, **kwargs
):
4059 """GetMode() -> int"""
4060 return _core
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4062 GetMode
= staticmethod(GetMode
)
4064 class UpdateUIEventPtr(UpdateUIEvent
):
4065 def __init__(self
, this
):
4067 if not hasattr(self
,"thisown"): self
.thisown
= 0
4068 self
.__class
__ = UpdateUIEvent
4069 _core
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4071 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4072 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4073 return _core
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4075 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4076 """UpdateUIEvent_GetUpdateInterval() -> long"""
4077 return _core
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4079 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4080 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4081 return _core
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4083 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4084 """UpdateUIEvent_ResetUpdateTime()"""
4085 return _core
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4087 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4088 """UpdateUIEvent_SetMode(int mode)"""
4089 return _core
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4091 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4092 """UpdateUIEvent_GetMode() -> int"""
4093 return _core
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4095 #---------------------------------------------------------------------------
4097 class SysColourChangedEvent(Event
):
4099 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4100 def __init__(self
, *args
, **kwargs
):
4101 """__init__() -> SysColourChangedEvent"""
4102 newobj
= _core
.new_SysColourChangedEvent(*args
, **kwargs
)
4103 self
.this
= newobj
.this
4107 class SysColourChangedEventPtr(SysColourChangedEvent
):
4108 def __init__(self
, this
):
4110 if not hasattr(self
,"thisown"): self
.thisown
= 0
4111 self
.__class
__ = SysColourChangedEvent
4112 _core
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4114 #---------------------------------------------------------------------------
4116 class MouseCaptureChangedEvent(Event
):
4118 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4119 def __init__(self
, *args
, **kwargs
):
4120 """__init__(int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4121 newobj
= _core
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4122 self
.this
= newobj
.this
4125 def GetCapturedWindow(*args
, **kwargs
):
4126 """GetCapturedWindow() -> Window"""
4127 return _core
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4130 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4131 def __init__(self
, this
):
4133 if not hasattr(self
,"thisown"): self
.thisown
= 0
4134 self
.__class
__ = MouseCaptureChangedEvent
4135 _core
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4137 #---------------------------------------------------------------------------
4139 class DisplayChangedEvent(Event
):
4141 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4142 def __init__(self
, *args
, **kwargs
):
4143 """__init__() -> DisplayChangedEvent"""
4144 newobj
= _core
.new_DisplayChangedEvent(*args
, **kwargs
)
4145 self
.this
= newobj
.this
4149 class DisplayChangedEventPtr(DisplayChangedEvent
):
4150 def __init__(self
, this
):
4152 if not hasattr(self
,"thisown"): self
.thisown
= 0
4153 self
.__class
__ = DisplayChangedEvent
4154 _core
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4156 #---------------------------------------------------------------------------
4158 class PaletteChangedEvent(Event
):
4160 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4161 def __init__(self
, *args
, **kwargs
):
4162 """__init__(int id=0) -> PaletteChangedEvent"""
4163 newobj
= _core
.new_PaletteChangedEvent(*args
, **kwargs
)
4164 self
.this
= newobj
.this
4167 def SetChangedWindow(*args
, **kwargs
):
4168 """SetChangedWindow(Window win)"""
4169 return _core
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4171 def GetChangedWindow(*args
, **kwargs
):
4172 """GetChangedWindow() -> Window"""
4173 return _core
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4176 class PaletteChangedEventPtr(PaletteChangedEvent
):
4177 def __init__(self
, this
):
4179 if not hasattr(self
,"thisown"): self
.thisown
= 0
4180 self
.__class
__ = PaletteChangedEvent
4181 _core
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4183 #---------------------------------------------------------------------------
4185 class QueryNewPaletteEvent(Event
):
4187 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4188 def __init__(self
, *args
, **kwargs
):
4189 """__init__(int winid=0) -> QueryNewPaletteEvent"""
4190 newobj
= _core
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4191 self
.this
= newobj
.this
4194 def SetPaletteRealized(*args
, **kwargs
):
4195 """SetPaletteRealized(bool realized)"""
4196 return _core
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4198 def GetPaletteRealized(*args
, **kwargs
):
4199 """GetPaletteRealized() -> bool"""
4200 return _core
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4203 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4204 def __init__(self
, this
):
4206 if not hasattr(self
,"thisown"): self
.thisown
= 0
4207 self
.__class
__ = QueryNewPaletteEvent
4208 _core
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4210 #---------------------------------------------------------------------------
4212 class NavigationKeyEvent(Event
):
4214 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4215 def __init__(self
, *args
, **kwargs
):
4216 """__init__() -> NavigationKeyEvent"""
4217 newobj
= _core
.new_NavigationKeyEvent(*args
, **kwargs
)
4218 self
.this
= newobj
.this
4221 def GetDirection(*args
, **kwargs
):
4222 """GetDirection() -> bool"""
4223 return _core
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4225 def SetDirection(*args
, **kwargs
):
4226 """SetDirection(bool bForward)"""
4227 return _core
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4229 def IsWindowChange(*args
, **kwargs
):
4230 """IsWindowChange() -> bool"""
4231 return _core
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4233 def SetWindowChange(*args
, **kwargs
):
4234 """SetWindowChange(bool bIs)"""
4235 return _core
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4237 def GetCurrentFocus(*args
, **kwargs
):
4238 """GetCurrentFocus() -> Window"""
4239 return _core
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4241 def SetCurrentFocus(*args
, **kwargs
):
4242 """SetCurrentFocus(Window win)"""
4243 return _core
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4246 class NavigationKeyEventPtr(NavigationKeyEvent
):
4247 def __init__(self
, this
):
4249 if not hasattr(self
,"thisown"): self
.thisown
= 0
4250 self
.__class
__ = NavigationKeyEvent
4251 _core
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4253 #---------------------------------------------------------------------------
4255 class WindowCreateEvent(CommandEvent
):
4257 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4258 def __init__(self
, *args
, **kwargs
):
4259 """__init__(Window win=None) -> WindowCreateEvent"""
4260 newobj
= _core
.new_WindowCreateEvent(*args
, **kwargs
)
4261 self
.this
= newobj
.this
4264 def GetWindow(*args
, **kwargs
):
4265 """GetWindow() -> Window"""
4266 return _core
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4269 class WindowCreateEventPtr(WindowCreateEvent
):
4270 def __init__(self
, this
):
4272 if not hasattr(self
,"thisown"): self
.thisown
= 0
4273 self
.__class
__ = WindowCreateEvent
4274 _core
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4276 class WindowDestroyEvent(CommandEvent
):
4278 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4279 def __init__(self
, *args
, **kwargs
):
4280 """__init__(Window win=None) -> WindowDestroyEvent"""
4281 newobj
= _core
.new_WindowDestroyEvent(*args
, **kwargs
)
4282 self
.this
= newobj
.this
4285 def GetWindow(*args
, **kwargs
):
4286 """GetWindow() -> Window"""
4287 return _core
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4290 class WindowDestroyEventPtr(WindowDestroyEvent
):
4291 def __init__(self
, this
):
4293 if not hasattr(self
,"thisown"): self
.thisown
= 0
4294 self
.__class
__ = WindowDestroyEvent
4295 _core
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4297 #---------------------------------------------------------------------------
4299 class ContextMenuEvent(CommandEvent
):
4301 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4302 def __init__(self
, *args
, **kwargs
):
4303 """__init__(wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4304 newobj
= _core
.new_ContextMenuEvent(*args
, **kwargs
)
4305 self
.this
= newobj
.this
4308 def GetPosition(*args
, **kwargs
):
4309 """GetPosition() -> Point"""
4310 return _core
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4312 def SetPosition(*args
, **kwargs
):
4313 """SetPosition(Point pos)"""
4314 return _core
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4317 class ContextMenuEventPtr(ContextMenuEvent
):
4318 def __init__(self
, this
):
4320 if not hasattr(self
,"thisown"): self
.thisown
= 0
4321 self
.__class
__ = ContextMenuEvent
4322 _core
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4324 #---------------------------------------------------------------------------
4326 IDLE_PROCESS_ALL
= _core
.IDLE_PROCESS_ALL
4327 IDLE_PROCESS_SPECIFIED
= _core
.IDLE_PROCESS_SPECIFIED
4328 class IdleEvent(Event
):
4330 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4331 def __init__(self
, *args
, **kwargs
):
4332 """__init__() -> IdleEvent"""
4333 newobj
= _core
.new_IdleEvent(*args
, **kwargs
)
4334 self
.this
= newobj
.this
4337 def RequestMore(*args
, **kwargs
):
4338 """RequestMore(bool needMore=True)"""
4339 return _core
.IdleEvent_RequestMore(*args
, **kwargs
)
4341 def MoreRequested(*args
, **kwargs
):
4342 """MoreRequested() -> bool"""
4343 return _core
.IdleEvent_MoreRequested(*args
, **kwargs
)
4345 def SetMode(*args
, **kwargs
):
4346 """SetMode(int mode)"""
4347 return _core
.IdleEvent_SetMode(*args
, **kwargs
)
4349 SetMode
= staticmethod(SetMode
)
4350 def GetMode(*args
, **kwargs
):
4351 """GetMode() -> int"""
4352 return _core
.IdleEvent_GetMode(*args
, **kwargs
)
4354 GetMode
= staticmethod(GetMode
)
4355 def CanSend(*args
, **kwargs
):
4356 """CanSend(Window win) -> bool"""
4357 return _core
.IdleEvent_CanSend(*args
, **kwargs
)
4359 CanSend
= staticmethod(CanSend
)
4361 class IdleEventPtr(IdleEvent
):
4362 def __init__(self
, this
):
4364 if not hasattr(self
,"thisown"): self
.thisown
= 0
4365 self
.__class
__ = IdleEvent
4366 _core
.IdleEvent_swigregister(IdleEventPtr
)
4368 def IdleEvent_SetMode(*args
, **kwargs
):
4369 """IdleEvent_SetMode(int mode)"""
4370 return _core
.IdleEvent_SetMode(*args
, **kwargs
)
4372 def IdleEvent_GetMode(*args
, **kwargs
):
4373 """IdleEvent_GetMode() -> int"""
4374 return _core
.IdleEvent_GetMode(*args
, **kwargs
)
4376 def IdleEvent_CanSend(*args
, **kwargs
):
4377 """IdleEvent_CanSend(Window win) -> bool"""
4378 return _core
.IdleEvent_CanSend(*args
, **kwargs
)
4380 #---------------------------------------------------------------------------
4382 class PyEvent(Event
):
4384 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4385 def __init__(self
, *args
, **kwargs
):
4386 """__init__(int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4387 newobj
= _core
.new_PyEvent(*args
, **kwargs
)
4388 self
.this
= newobj
.this
4393 def __del__(self
, destroy
=_core
.delete_PyEvent
):
4396 if self
.thisown
: destroy(self
)
4399 def SetSelf(*args
, **kwargs
):
4400 """SetSelf(PyObject self)"""
4401 return _core
.PyEvent_SetSelf(*args
, **kwargs
)
4403 def GetSelf(*args
, **kwargs
):
4404 """GetSelf() -> PyObject"""
4405 return _core
.PyEvent_GetSelf(*args
, **kwargs
)
4408 class PyEventPtr(PyEvent
):
4409 def __init__(self
, this
):
4411 if not hasattr(self
,"thisown"): self
.thisown
= 0
4412 self
.__class
__ = PyEvent
4413 _core
.PyEvent_swigregister(PyEventPtr
)
4415 class PyCommandEvent(CommandEvent
):
4417 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4418 def __init__(self
, *args
, **kwargs
):
4419 """__init__(wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4420 newobj
= _core
.new_PyCommandEvent(*args
, **kwargs
)
4421 self
.this
= newobj
.this
4426 def __del__(self
, destroy
=_core
.delete_PyCommandEvent
):
4429 if self
.thisown
: destroy(self
)
4432 def SetSelf(*args
, **kwargs
):
4433 """SetSelf(PyObject self)"""
4434 return _core
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4436 def GetSelf(*args
, **kwargs
):
4437 """GetSelf() -> PyObject"""
4438 return _core
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4441 class PyCommandEventPtr(PyCommandEvent
):
4442 def __init__(self
, this
):
4444 if not hasattr(self
,"thisown"): self
.thisown
= 0
4445 self
.__class
__ = PyCommandEvent
4446 _core
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4448 #---------------------------------------------------------------------------
4450 PYAPP_ASSERT_SUPPRESS
= _core
.PYAPP_ASSERT_SUPPRESS
4451 PYAPP_ASSERT_EXCEPTION
= _core
.PYAPP_ASSERT_EXCEPTION
4452 PYAPP_ASSERT_DIALOG
= _core
.PYAPP_ASSERT_DIALOG
4453 PYAPP_ASSERT_LOG
= _core
.PYAPP_ASSERT_LOG
4454 PRINT_WINDOWS
= _core
.PRINT_WINDOWS
4455 PRINT_POSTSCRIPT
= _core
.PRINT_POSTSCRIPT
4456 class PyApp(EvtHandler
):
4458 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4459 def __init__(self
, *args
, **kwargs
):
4463 Create a new application object, starting the bootstrap process.
4465 newobj
= _core
.new_PyApp(*args
, **kwargs
)
4466 self
.this
= newobj
.this
4469 self
._setCallbackInfo
(self
, PyApp
)
4470 self
._setOORInfo
(self
)
4472 def __del__(self
, destroy
=_core
.delete_PyApp
):
4475 if self
.thisown
: destroy(self
)
4478 def _setCallbackInfo(*args
, **kwargs
):
4479 """_setCallbackInfo(PyObject self, PyObject _class)"""
4480 return _core
.PyApp__setCallbackInfo(*args
, **kwargs
)
4482 def GetAppName(*args
, **kwargs
):
4484 GetAppName() -> String
4486 Get the application name.
4488 return _core
.PyApp_GetAppName(*args
, **kwargs
)
4490 def SetAppName(*args
, **kwargs
):
4492 SetAppName(String name)
4494 Set the application name. This value may be used automatically
4495 by wx.Config and such.
4497 return _core
.PyApp_SetAppName(*args
, **kwargs
)
4499 def GetClassName(*args
, **kwargs
):
4501 GetClassName() -> String
4503 Get the application's class name.
4505 return _core
.PyApp_GetClassName(*args
, **kwargs
)
4507 def SetClassName(*args
, **kwargs
):
4509 SetClassName(String name)
4511 Set the application's class name. This value may be used for X-resources if
4512 applicable for the platform
4514 return _core
.PyApp_SetClassName(*args
, **kwargs
)
4516 def GetVendorName(*args
, **kwargs
):
4518 GetVendorName() -> String
4520 Get the application's vendor name.
4522 return _core
.PyApp_GetVendorName(*args
, **kwargs
)
4524 def SetVendorName(*args
, **kwargs
):
4526 SetVendorName(String name)
4528 Set the application's vendor name. This value may be used automatically
4529 by wx.Config and such.
4531 return _core
.PyApp_SetVendorName(*args
, **kwargs
)
4533 def GetTraits(*args
, **kwargs
):
4535 GetTraits() -> wxAppTraits
4537 Create the app traits object to which we delegate for everything which either
4538 should be configurable by the user (then he can change the default behaviour
4539 simply by overriding CreateTraits() and returning his own traits object) or
4540 which is GUI/console dependent as then wx.AppTraits allows us to abstract the
4541 differences behind the common facade
4543 return _core
.PyApp_GetTraits(*args
, **kwargs
)
4545 def ProcessPendingEvents(*args
, **kwargs
):
4547 ProcessPendingEvents()
4549 Process all events in the Pending Events list -- it is necessary to call this
4550 function to process posted events. This happens during each event loop
4553 return _core
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4555 def Yield(*args
, **kwargs
):
4557 Yield(bool onlyIfNeeded=False) -> bool
4559 Process all currently pending events right now, instead of waiting until
4560 return to the event loop. It is an error to call Yield() recursively unless
4561 the value of onlyIfNeeded is True.
4563 WARNING: This function is dangerous as it can lead to unexpected
4564 reentrancies (i.e. when called from an event handler it
4565 may result in calling the same event handler again), use
4566 with _extreme_ care or, better, don't use at all!
4569 return _core
.PyApp_Yield(*args
, **kwargs
)
4571 def WakeUpIdle(*args
, **kwargs
):
4575 Make sure that idle events are sent again
4577 return _core
.PyApp_WakeUpIdle(*args
, **kwargs
)
4579 def MainLoop(*args
, **kwargs
):
4583 Execute the main GUI loop, the function returns when the loop ends.
4585 return _core
.PyApp_MainLoop(*args
, **kwargs
)
4587 def Exit(*args
, **kwargs
):
4591 Exit the main loop thus terminating the application.
4593 return _core
.PyApp_Exit(*args
, **kwargs
)
4595 def ExitMainLoop(*args
, **kwargs
):
4599 Exit the main GUI loop during the next iteration (i.e. it does not
4600 stop the program immediately!)
4602 return _core
.PyApp_ExitMainLoop(*args
, **kwargs
)
4604 def Pending(*args
, **kwargs
):
4608 Returns True if there are unprocessed events in the event queue.
4610 return _core
.PyApp_Pending(*args
, **kwargs
)
4612 def Dispatch(*args
, **kwargs
):
4616 Process the first event in the event queue (blocks until an event
4617 appears if there are none currently)
4619 return _core
.PyApp_Dispatch(*args
, **kwargs
)
4621 def ProcessIdle(*args
, **kwargs
):
4623 ProcessIdle() -> bool
4625 Called from the MainLoop when the application becomes idle and sends an
4626 IdleEvent to all interested parties. Returns True is more idle events are
4627 needed, False if not.
4629 return _core
.PyApp_ProcessIdle(*args
, **kwargs
)
4631 def SendIdleEvents(*args
, **kwargs
):
4633 SendIdleEvents(Window win, IdleEvent event) -> bool
4635 Send idle event to window and all subwindows. Returns True if more idle time
4638 return _core
.PyApp_SendIdleEvents(*args
, **kwargs
)
4640 def IsActive(*args
, **kwargs
):
4644 Return True if our app has focus.
4646 return _core
.PyApp_IsActive(*args
, **kwargs
)
4648 def SetTopWindow(*args
, **kwargs
):
4650 SetTopWindow(Window win)
4652 Set the "main" top level window
4654 return _core
.PyApp_SetTopWindow(*args
, **kwargs
)
4656 def GetTopWindow(*args
, **kwargs
):
4658 GetTopWindow() -> Window
4660 Return the "main" top level window (if it hadn't been set previously with
4661 SetTopWindow(), will return just some top level window and, if there not any,
4664 return _core
.PyApp_GetTopWindow(*args
, **kwargs
)
4666 def SetExitOnFrameDelete(*args
, **kwargs
):
4668 SetExitOnFrameDelete(bool flag)
4670 Control the exit behaviour: by default, the program will exit the main loop
4671 (and so, usually, terminate) when the last top-level program window is
4672 deleted. Beware that if you disable this behaviour (with
4673 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly
4677 return _core
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
4679 def GetExitOnFrameDelete(*args
, **kwargs
):
4681 GetExitOnFrameDelete() -> bool
4683 Get the current exit behaviour setting.
4685 return _core
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
4687 def SetUseBestVisual(*args
, **kwargs
):
4689 SetUseBestVisual(bool flag)
4691 Set whether the app should try to use the best available visual on systems
4692 where more than one is available, (Sun, SGI, XFree86 4, etc.)
4694 return _core
.PyApp_SetUseBestVisual(*args
, **kwargs
)
4696 def GetUseBestVisual(*args
, **kwargs
):
4698 GetUseBestVisual() -> bool
4700 Get current UseBestVisual setting.
4702 return _core
.PyApp_GetUseBestVisual(*args
, **kwargs
)
4704 def SetPrintMode(*args
, **kwargs
):
4705 """SetPrintMode(int mode)"""
4706 return _core
.PyApp_SetPrintMode(*args
, **kwargs
)
4708 def GetPrintMode(*args
, **kwargs
):
4709 """GetPrintMode() -> int"""
4710 return _core
.PyApp_GetPrintMode(*args
, **kwargs
)
4712 def SetAssertMode(*args
, **kwargs
):
4714 SetAssertMode(int mode)
4716 Set the OnAssert behaviour for debug and hybrid builds. The following flags
4717 may be or'd together:
4719 wx.PYAPP_ASSERT_SUPPRESS Don't do anything
4720 wx.PYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default)
4721 wx.PYAPP_ASSERT_DIALOG Display a message dialog
4722 wx.PYAPP_ASSERT_LOG Write the assertion info to the wx.Log
4725 return _core
.PyApp_SetAssertMode(*args
, **kwargs
)
4727 def GetAssertMode(*args
, **kwargs
):
4729 GetAssertMode() -> int
4731 Get the current OnAssert behaviour setting.
4733 return _core
.PyApp_GetAssertMode(*args
, **kwargs
)
4735 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4736 """GetMacSupportPCMenuShortcuts() -> bool"""
4737 return _core
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4739 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
4740 def GetMacAboutMenuItemId(*args
, **kwargs
):
4741 """GetMacAboutMenuItemId() -> long"""
4742 return _core
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
4744 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
4745 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
4746 """GetMacPreferencesMenuItemId() -> long"""
4747 return _core
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
4749 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
4750 def GetMacExitMenuItemId(*args
, **kwargs
):
4751 """GetMacExitMenuItemId() -> long"""
4752 return _core
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
4754 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
4755 def GetMacHelpMenuTitleName(*args
, **kwargs
):
4756 """GetMacHelpMenuTitleName() -> String"""
4757 return _core
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
4759 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
4760 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4761 """SetMacSupportPCMenuShortcuts(bool val)"""
4762 return _core
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4764 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
4765 def SetMacAboutMenuItemId(*args
, **kwargs
):
4766 """SetMacAboutMenuItemId(long val)"""
4767 return _core
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
4769 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
4770 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
4771 """SetMacPreferencesMenuItemId(long val)"""
4772 return _core
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
4774 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
4775 def SetMacExitMenuItemId(*args
, **kwargs
):
4776 """SetMacExitMenuItemId(long val)"""
4777 return _core
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
4779 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
4780 def SetMacHelpMenuTitleName(*args
, **kwargs
):
4781 """SetMacHelpMenuTitleName(String val)"""
4782 return _core
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
4784 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
4785 def _BootstrapApp(*args
, **kwargs
):
4789 For internal use only
4791 return _core
.PyApp__BootstrapApp(*args
, **kwargs
)
4793 def GetComCtl32Version(*args
, **kwargs
):
4795 GetComCtl32Version() -> int
4797 Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it
4798 wasn't found at all. Raises an exception on non-Windows platforms.
4800 return _core
.PyApp_GetComCtl32Version(*args
, **kwargs
)
4802 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
4804 class PyAppPtr(PyApp
):
4805 def __init__(self
, this
):
4807 if not hasattr(self
,"thisown"): self
.thisown
= 0
4808 self
.__class
__ = PyApp
4809 _core
.PyApp_swigregister(PyAppPtr
)
4811 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4812 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
4813 return _core
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4815 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
4816 """PyApp_GetMacAboutMenuItemId() -> long"""
4817 return _core
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
4819 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
4820 """PyApp_GetMacPreferencesMenuItemId() -> long"""
4821 return _core
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
4823 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
4824 """PyApp_GetMacExitMenuItemId() -> long"""
4825 return _core
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
4827 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
4828 """PyApp_GetMacHelpMenuTitleName() -> String"""
4829 return _core
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
4831 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4832 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
4833 return _core
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4835 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
4836 """PyApp_SetMacAboutMenuItemId(long val)"""
4837 return _core
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
4839 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
4840 """PyApp_SetMacPreferencesMenuItemId(long val)"""
4841 return _core
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
4843 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
4844 """PyApp_SetMacExitMenuItemId(long val)"""
4845 return _core
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
4847 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
4848 """PyApp_SetMacHelpMenuTitleName(String val)"""
4849 return _core
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
4851 def PyApp_GetComCtl32Version(*args
, **kwargs
):
4853 PyApp_GetComCtl32Version() -> int
4855 Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it
4856 wasn't found at all. Raises an exception on non-Windows platforms.
4858 return _core
.PyApp_GetComCtl32Version(*args
, **kwargs
)
4860 #---------------------------------------------------------------------------
4863 def Exit(*args
, **kwargs
):
4867 Force an exit of the application. Convenience for wx.GetApp().Exit()
4869 return _core
.Exit(*args
, **kwargs
)
4871 def Yield(*args
, **kwargs
):
4875 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
4877 return _core
.Yield(*args
, **kwargs
)
4879 def YieldIfNeeded(*args
, **kwargs
):
4881 YieldIfNeeded() -> bool
4883 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
4885 return _core
.YieldIfNeeded(*args
, **kwargs
)
4887 def SafeYield(*args
, **kwargs
):
4889 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
4891 This function is similar to wx.Yield, except that it disables the user input
4892 to all program windows before calling wx.Yield and re-enables it again
4893 afterwards. If win is not None, this window will remain enabled, allowing the
4894 implementation of some limited user interaction.
4896 Returns the result of the call to wx.Yield.
4898 return _core
.SafeYield(*args
, **kwargs
)
4900 def WakeUpIdle(*args
, **kwargs
):
4904 Cause the message queue to become empty again, so idle events will be sent.
4906 return _core
.WakeUpIdle(*args
, **kwargs
)
4908 def PostEvent(*args
, **kwargs
):
4910 PostEvent(EvtHandler dest, Event event)
4912 Send an event to a window or other wx.EvtHandler to be processed later.
4914 return _core
.PostEvent(*args
, **kwargs
)
4916 def App_CleanUp(*args
, **kwargs
):
4920 For internal use only, it is used to cleanup after wxWindows when Python shuts down.
4922 return _core
.App_CleanUp(*args
, **kwargs
)
4924 def GetApp(*args
, **kwargs
):
4928 Return a reference to the current wx.App object.
4930 return _core
.GetApp(*args
, **kwargs
)
4931 #----------------------------------------------------------------------
4933 class PyOnDemandOutputWindow
:
4935 A class that can be used for redirecting Python's stdout and
4936 stderr streams. It will do nothing until something is wrriten to
4937 the stream at which point it will create a Frame with a text area
4938 and write the text there.
4940 def __init__(self
, title
= "wxPython: stdout/stderr"):
4945 def SetParent(self
, parent
):
4946 """Set the window to be used as the popup Frame's parent."""
4947 self
.parent
= parent
4950 def CreateOutputWindow(self
, st
):
4951 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
,
4952 style
=wx
.DEFAULT_FRAME_STYLE | wx
.NO_FULL_REPAINT_ON_RESIZE
)
4953 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
4954 style
= wx
.TE_MULTILINE | wx
.TE_READONLY
)
4955 self
.text
.AppendText(st
)
4956 self
.frame
.SetSize((450, 300))
4957 self
.frame
.Show(True)
4958 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
4961 # These methods provide the file-like output behaviour.
4962 def write(self
, text
):
4964 Create the output window if needed and write the string to it.
4965 If not called in the context of the gui thread then uses
4966 CallAfter to do the work there.
4968 if self
.frame
is None:
4969 if not wx
.Thread_IsMain():
4970 wx
.CallAfter(self
.CreateOutputWindow
, text
)
4972 self
.CreateOutputWindow(text
)
4974 if not wx
.Thread_IsMain():
4975 wx
.CallAfter(self
.text
.AppendText
, text
)
4977 self
.text
.AppendText(text
)
4981 if self
.frame
is not None:
4982 wx
.CallAfter(self
.frame
.Close
)
4985 def OnCloseWindow(self
, event
):
4986 if self
.frame
is not None:
4987 self
.frame
.Destroy()
4991 #----------------------------------------------------------------------
4993 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
4995 class App(wx
.PyApp
):
4997 The main application class. Derive from this and implement an OnInit
4998 method that creates a frame and then calls self.SetTopWindow(frame)
5000 outputWindowClass
= PyOnDemandOutputWindow
5002 def __init__(self
, redirect
=_defRedirect
, filename
=None, useBestVisual
=False):
5003 wx
.PyApp
.__init
__(self
)
5005 if wx
.Platform
== "__WXMAC__":
5008 if not MacOS
.WMAvailable():
5010 This program needs access to the screen. Please run with 'pythonw',
5011 not 'python', and only when you are logged in on the main display of
5017 # This has to be done before OnInit
5018 self
.SetUseBestVisual(useBestVisual
)
5020 # Set the default handler for SIGINT. This fixes a problem
5021 # where if Ctrl-C is pressed in the console that started this
5022 # app then it will not appear to do anything, (not even send
5023 # KeyboardInterrupt???) but will later segfault on exit. By
5024 # setting the default handler then the app will exit, as
5025 # expected (depending on platform.)
5028 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5032 # Save and redirect the stdio to a window?
5033 self
.stdioWin
= None
5034 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5036 self
.RedirectStdio(filename
)
5038 # This finishes the initialization of wxWindows and then calls
5039 # the OnInit that should be present in the derived class
5040 self
._BootstrapApp
()
5045 self
.RestoreStdio() # Just in case the MainLoop was overridden
5050 def SetTopWindow(self
, frame
):
5051 """Set the \"main\" top level window"""
5053 self
.stdioWin
.SetParent(frame
)
5054 wx
.PyApp
.SetTopWindow(self
, frame
)
5058 """Execute the main GUI event loop"""
5059 wx
.PyApp
.MainLoop(self
)
5063 def RedirectStdio(self
, filename
):
5064 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5066 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5068 self
.stdioWin
= self
.outputWindowClass()
5069 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5072 def RestoreStdio(self
):
5073 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5077 # change from wxPyApp_ to wxApp_
5078 App_GetMacSupportPCMenuShortcuts
= _core
.PyApp_GetMacSupportPCMenuShortcuts
5079 App_GetMacAboutMenuItemId
= _core
.PyApp_GetMacAboutMenuItemId
5080 App_GetMacPreferencesMenuItemId
= _core
.PyApp_GetMacPreferencesMenuItemId
5081 App_GetMacExitMenuItemId
= _core
.PyApp_GetMacExitMenuItemId
5082 App_GetMacHelpMenuTitleName
= _core
.PyApp_GetMacHelpMenuTitleName
5083 App_SetMacSupportPCMenuShortcuts
= _core
.PyApp_SetMacSupportPCMenuShortcuts
5084 App_SetMacAboutMenuItemId
= _core
.PyApp_SetMacAboutMenuItemId
5085 App_SetMacPreferencesMenuItemId
= _core
.PyApp_SetMacPreferencesMenuItemId
5086 App_SetMacExitMenuItemId
= _core
.PyApp_SetMacExitMenuItemId
5087 App_SetMacHelpMenuTitleName
= _core
.PyApp_SetMacHelpMenuTitleName
5088 App_GetComCtl32Version
= _core
.PyApp_GetComCtl32Version
5090 #----------------------------------------------------------------------------
5092 class PySimpleApp(wx
.App
):
5094 A simple application class. You can just create one of these and
5095 then then make your top level windows later, and not have to worry
5098 def __init__(self
, redirect
=False, filename
=None, useBestVisual
=False):
5099 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
)
5102 wx
.InitAllImageHandlers()
5106 # Is anybody using this one?
5107 class PyWidgetTester(wx
.App
):
5108 def __init__(self
, size
= (250, 100)):
5110 wx
.App
.__init
__(self
, 0)
5113 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5114 self
.SetTopWindow(self
.frame
)
5117 def SetWidget(self
, widgetClass
, *args
):
5118 w
= widgetClass(self
.frame
, *args
)
5119 self
.frame
.Show(True)
5121 #----------------------------------------------------------------------------
5122 # DO NOT hold any other references to this object. This is how we
5123 # know when to cleanup system resources that wxWin is holding. When
5124 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5125 # goes to zero and it calls the wxApp_CleanUp function.
5127 class __wxPyCleanup
:
5129 self
.cleanup
= _core
.App_CleanUp
5133 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5135 ## # another possible solution, but it gets called too early...
5136 ## if sys.version[0] == '2':
5138 ## atexit.register(_core.wxApp_CleanUp)
5140 ## sys.exitfunc = _core.wxApp_CleanUp
5143 #----------------------------------------------------------------------------
5145 #---------------------------------------------------------------------------
5147 class AcceleratorEntry(object):
5149 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5150 def __init__(self
, *args
, **kwargs
):
5151 """__init__(int flags=0, int keyCode=0, int cmd=0, MenuItem item=None) -> AcceleratorEntry"""
5152 newobj
= _core
.new_AcceleratorEntry(*args
, **kwargs
)
5153 self
.this
= newobj
.this
5156 def __del__(self
, destroy
=_core
.delete_AcceleratorEntry
):
5159 if self
.thisown
: destroy(self
)
5162 def Set(*args
, **kwargs
):
5163 """Set(int flags, int keyCode, int cmd, MenuItem item=None)"""
5164 return _core
.AcceleratorEntry_Set(*args
, **kwargs
)
5166 def SetMenuItem(*args
, **kwargs
):
5167 """SetMenuItem(MenuItem item)"""
5168 return _core
.AcceleratorEntry_SetMenuItem(*args
, **kwargs
)
5170 def GetMenuItem(*args
, **kwargs
):
5171 """GetMenuItem() -> MenuItem"""
5172 return _core
.AcceleratorEntry_GetMenuItem(*args
, **kwargs
)
5174 def GetFlags(*args
, **kwargs
):
5175 """GetFlags() -> int"""
5176 return _core
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5178 def GetKeyCode(*args
, **kwargs
):
5179 """GetKeyCode() -> int"""
5180 return _core
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5182 def GetCommand(*args
, **kwargs
):
5183 """GetCommand() -> int"""
5184 return _core
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5187 class AcceleratorEntryPtr(AcceleratorEntry
):
5188 def __init__(self
, this
):
5190 if not hasattr(self
,"thisown"): self
.thisown
= 0
5191 self
.__class
__ = AcceleratorEntry
5192 _core
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5194 class AcceleratorTable(Object
):
5196 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5197 def __init__(self
, *args
, **kwargs
):
5199 __init__(entries) -> AcceleratorTable
5201 Construct an AcceleratorTable from a list of AcceleratorEntry items or
5202 3-tuples (flags, keyCode, cmdID)
5204 newobj
= _core
.new_AcceleratorTable(*args
, **kwargs
)
5205 self
.this
= newobj
.this
5208 def __del__(self
, destroy
=_core
.delete_AcceleratorTable
):
5211 if self
.thisown
: destroy(self
)
5214 def Ok(*args
, **kwargs
):
5216 return _core
.AcceleratorTable_Ok(*args
, **kwargs
)
5219 class AcceleratorTablePtr(AcceleratorTable
):
5220 def __init__(self
, this
):
5222 if not hasattr(self
,"thisown"): self
.thisown
= 0
5223 self
.__class
__ = AcceleratorTable
5224 _core
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5227 def GetAccelFromString(*args
, **kwargs
):
5228 """GetAccelFromString(String label) -> AcceleratorEntry"""
5229 return _core
.GetAccelFromString(*args
, **kwargs
)
5230 #---------------------------------------------------------------------------
5232 WINDOW_VARIANT_DEFAULT
= _core
.WINDOW_VARIANT_DEFAULT
5233 WINDOW_VARIANT_NORMAL
= _core
.WINDOW_VARIANT_NORMAL
5234 WINDOW_VARIANT_SMALL
= _core
.WINDOW_VARIANT_SMALL
5235 WINDOW_VARIANT_MINI
= _core
.WINDOW_VARIANT_MINI
5236 WINDOW_VARIANT_LARGE
= _core
.WINDOW_VARIANT_LARGE
5237 class Window(EvtHandler
):
5239 wx.Window is the base class for all windows and represents any visible
5240 object on the screen. All controls, top level windows and so on are
5241 wx.Windows. Sizers and device contexts are not however, as they don't
5242 appear on screen themselves.
5246 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5247 def __init__(self
, *args
, **kwargs
):
5249 __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
5250 long style=0, String name=PanelNameStr) -> Window
5252 Construct and show a generic Window.
5254 newobj
= _core
.new_Window(*args
, **kwargs
)
5255 self
.this
= newobj
.this
5258 self
._setOORInfo
(self
)
5260 def Create(*args
, **kwargs
):
5262 Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
5263 long style=0, String name=PanelNameStr) -> bool
5265 Create the GUI part of the Window for 2-phase creation mode.
5267 return _core
.Window_Create(*args
, **kwargs
)
5269 def Close(*args
, **kwargs
):
5271 Close(bool force=False) -> bool
5273 This function simply generates a EVT_CLOSE event whose handler usually
5274 tries to close the window. It doesn't close the window itself,
5275 however. If force is False (the default) then the window's close
5276 handler will be allowed to veto the destruction of the window.
5278 Usually Close is only used with the top level windows (wx.Frame and
5279 wx.Dialog classes) as the others are not supposed to have any special
5282 The close handler should check whether the window is being deleted
5283 forcibly, using wx.CloseEvent.GetForce, in which case it should
5284 destroy the window using wx.Window.Destroy.
5286 Note that calling Close does not guarantee that the window will be
5287 destroyed; but it provides a way to simulate a manual close of a
5288 window, which may or may not be implemented by destroying the
5289 window. The default EVT_CLOSE handler for wx.Dialog does not
5290 necessarily delete the dialog, since it will simply simulate an
5291 wxID_CANCEL event which is handled by the appropriate button event
5292 handler and may do anything at all.
5294 To guarantee that the window will be destroyed, call wx.Window.Destroy
5297 return _core
.Window_Close(*args
, **kwargs
)
5299 def Destroy(*args
, **kwargs
):
5303 Destroys the window safely. Frames and dialogs are not destroyed
5304 immediately when this function is called -- they are added to a list
5305 of windows to be deleted on idle time, when all the window's events
5306 have been processed. This prevents problems with events being sent to
5307 non-existent windows.
5309 Returns True if the window has either been successfully deleted, or it
5310 has been added to the list of windows pending real deletion.
5312 return _core
.Window_Destroy(*args
, **kwargs
)
5314 def DestroyChildren(*args
, **kwargs
):
5316 DestroyChildren() -> bool
5318 Destroys all children of a window. Called automatically by the destructor.
5320 return _core
.Window_DestroyChildren(*args
, **kwargs
)
5322 def IsBeingDeleted(*args
, **kwargs
):
5324 IsBeingDeleted() -> bool
5326 Is the window in the process of being deleted?
5328 return _core
.Window_IsBeingDeleted(*args
, **kwargs
)
5330 def SetTitle(*args
, **kwargs
):
5332 SetTitle(String title)
5334 Sets the window's title. Applicable only to frames and dialogs.
5336 return _core
.Window_SetTitle(*args
, **kwargs
)
5338 def GetTitle(*args
, **kwargs
):
5340 GetTitle() -> String
5342 Gets the window's title. Applicable only to frames and dialogs.
5344 return _core
.Window_GetTitle(*args
, **kwargs
)
5346 def SetLabel(*args
, **kwargs
):
5348 SetLabel(String label)
5350 Set the text which the window shows in its label if applicable.
5352 return _core
.Window_SetLabel(*args
, **kwargs
)
5354 def GetLabel(*args
, **kwargs
):
5356 GetLabel() -> String
5358 Generic way of getting a label from any window, for
5359 identification purposes. The interpretation of this function
5360 differs from class to class. For frames and dialogs, the value
5361 returned is the title. For buttons or static text controls, it is
5362 the button text. This function can be useful for meta-programs
5363 (such as testing tools or special-needs access programs) which
5364 need to identify windows by name.
5366 return _core
.Window_GetLabel(*args
, **kwargs
)
5368 def SetName(*args
, **kwargs
):
5370 SetName(String name)
5372 Sets the window's name. The window name is used for ressource
5373 setting in X, it is not the same as the window title/label
5375 return _core
.Window_SetName(*args
, **kwargs
)
5377 def GetName(*args
, **kwargs
):
5381 Returns the window's name. This name is not guaranteed to be
5382 unique; it is up to the programmer to supply an appropriate name
5383 in the window constructor or via wx.Window.SetName.
5385 return _core
.Window_GetName(*args
, **kwargs
)
5387 def SetWindowVariant(*args
, **kwargs
):
5389 SetWindowVariant(int variant)
5391 Sets the variant of the window/font size to use for this window,
5392 if the platform supports variants, (for example, wxMac.)
5394 return _core
.Window_SetWindowVariant(*args
, **kwargs
)
5396 def GetWindowVariant(*args
, **kwargs
):
5397 """GetWindowVariant() -> int"""
5398 return _core
.Window_GetWindowVariant(*args
, **kwargs
)
5400 def SetId(*args
, **kwargs
):
5404 Sets the identifier of the window. Each window has an integer
5405 identifier. If the application has not provided one, an identifier
5406 will be generated. Normally, the identifier should be provided on
5407 creation and should not be modified subsequently.
5409 return _core
.Window_SetId(*args
, **kwargs
)
5411 def GetId(*args
, **kwargs
):
5415 Returns the identifier of the window. Each window has an integer
5416 identifier. If the application has not provided one (or the default Id
5417 -1 is used) then an unique identifier with a negative value will be
5420 return _core
.Window_GetId(*args
, **kwargs
)
5422 def NewControlId(*args
, **kwargs
):
5424 NewControlId() -> int
5426 Generate a control id for the controls which were not given one.
5428 return _core
.Window_NewControlId(*args
, **kwargs
)
5430 NewControlId
= staticmethod(NewControlId
)
5431 def NextControlId(*args
, **kwargs
):
5433 NextControlId(int winid) -> int
5435 Get the id of the control following the one with the given
5438 return _core
.Window_NextControlId(*args
, **kwargs
)
5440 NextControlId
= staticmethod(NextControlId
)
5441 def PrevControlId(*args
, **kwargs
):
5443 PrevControlId(int winid) -> int
5445 Get the id of the control preceding the one with the given
5448 return _core
.Window_PrevControlId(*args
, **kwargs
)
5450 PrevControlId
= staticmethod(PrevControlId
)
5451 def SetSize(*args
, **kwargs
):
5455 Sets the size of the window in pixels.
5457 return _core
.Window_SetSize(*args
, **kwargs
)
5459 def SetDimensions(*args
, **kwargs
):
5461 SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
5463 Sets the position and size of the window in pixels. The sizeFlags
5464 parameter indicates the interpretation of the other params if they are
5465 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
5466 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
5467 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
5468 dimensions of -1 and less to be interpreted as real dimensions, not
5471 return _core
.Window_SetDimensions(*args
, **kwargs
)
5473 def SetRect(*args
, **kwargs
):
5475 SetRect(Rect rect, int sizeFlags=SIZE_AUTO)
5477 Sets the position and size of the window in pixels using a wx.Rect.
5479 return _core
.Window_SetRect(*args
, **kwargs
)
5481 def SetSizeWH(*args
, **kwargs
):
5483 SetSizeWH(int width, int height)
5485 Sets the size of the window in pixels.
5487 return _core
.Window_SetSizeWH(*args
, **kwargs
)
5489 def Move(*args
, **kwargs
):
5491 Move(Point pt, int flags=SIZE_USE_EXISTING)
5493 Moves the window to the given position.
5495 return _core
.Window_Move(*args
, **kwargs
)
5498 def MoveXY(*args
, **kwargs
):
5500 MoveXY(int x, int y, int flags=SIZE_USE_EXISTING)
5502 Moves the window to the given position.
5504 return _core
.Window_MoveXY(*args
, **kwargs
)
5506 def Raise(*args
, **kwargs
):
5510 Raises the window to the top of the window hierarchy if it is a
5511 managed window (dialog or frame).
5513 return _core
.Window_Raise(*args
, **kwargs
)
5515 def Lower(*args
, **kwargs
):
5519 Lowers the window to the bottom of the window hierarchy if it is a
5520 managed window (dialog or frame).
5522 return _core
.Window_Lower(*args
, **kwargs
)
5524 def SetClientSize(*args
, **kwargs
):
5526 SetClientSize(Size size)
5528 This sets the size of the window client area in pixels. Using this
5529 function to size a window tends to be more device-independent than
5530 wx.Window.SetSize, since the application need not worry about what
5531 dimensions the border or title bar have when trying to fit the window
5532 around panel items, for example.
5534 return _core
.Window_SetClientSize(*args
, **kwargs
)
5536 def SetClientSizeWH(*args
, **kwargs
):
5538 SetClientSizeWH(int width, int height)
5540 This sets the size of the window client area in pixels. Using this
5541 function to size a window tends to be more device-independent than
5542 wx.Window.SetSize, since the application need not worry about what
5543 dimensions the border or title bar have when trying to fit the window
5544 around panel items, for example.
5546 return _core
.Window_SetClientSizeWH(*args
, **kwargs
)
5548 def SetClientRect(*args
, **kwargs
):
5550 SetClientRect(Rect rect)
5552 This sets the size of the window client area in pixels. Using this
5553 function to size a window tends to be more device-independent than
5554 wx.Window.SetSize, since the application need not worry about what
5555 dimensions the border or title bar have when trying to fit the window
5556 around panel items, for example.
5558 return _core
.Window_SetClientRect(*args
, **kwargs
)
5560 def GetPosition(*args
, **kwargs
):
5562 GetPosition() -> Point
5564 Get the window's position.
5566 return _core
.Window_GetPosition(*args
, **kwargs
)
5568 def GetPositionTuple(*args
, **kwargs
):
5570 GetPositionTuple() -> (x,y)
5572 Get the window's position.
5574 return _core
.Window_GetPositionTuple(*args
, **kwargs
)
5576 def GetSize(*args
, **kwargs
):
5580 Get the window size.
5582 return _core
.Window_GetSize(*args
, **kwargs
)
5584 def GetSizeTuple(*args
, **kwargs
):
5586 GetSizeTuple() -> (width, height)
5588 Get the window size.
5590 return _core
.Window_GetSizeTuple(*args
, **kwargs
)
5592 def GetRect(*args
, **kwargs
):
5596 Returns the size and position of the window as a wx.Rect object.
5598 return _core
.Window_GetRect(*args
, **kwargs
)
5600 def GetClientSize(*args
, **kwargs
):
5602 GetClientSize() -> Size
5604 This gets the size of the window's 'client area' in pixels. The client
5605 area is the area which may be drawn on by the programmer, excluding
5606 title bar, border, scrollbars, etc.
5608 return _core
.Window_GetClientSize(*args
, **kwargs
)
5610 def GetClientSizeTuple(*args
, **kwargs
):
5612 GetClientSizeTuple() -> (width, height)
5614 This gets the size of the window's 'client area' in pixels. The client
5615 area is the area which may be drawn on by the programmer, excluding
5616 title bar, border, scrollbars, etc.
5618 return _core
.Window_GetClientSizeTuple(*args
, **kwargs
)
5620 def GetClientAreaOrigin(*args
, **kwargs
):
5622 GetClientAreaOrigin() -> Point
5624 Get the origin of the client area of the window relative to the
5625 window's top left corner (the client area may be shifted because of
5626 the borders, scrollbars, other decorations...)
5628 return _core
.Window_GetClientAreaOrigin(*args
, **kwargs
)
5630 def GetClientRect(*args
, **kwargs
):
5632 GetClientRect() -> Rect
5634 Get the client area position and size as a wx.Rect object.
5636 return _core
.Window_GetClientRect(*args
, **kwargs
)
5638 def GetBestSize(*args
, **kwargs
):
5640 GetBestSize() -> Size
5642 This functions returns the best acceptable minimal size for the
5643 window, if applicable. For example, for a static text control, it will be
5644 the minimal size such that the control label is not truncated. For
5645 windows containing subwindows (suzh aswx.Panel), the size returned
5646 by this function will be the same as the size the window would have
5647 had after calling Fit.
5649 return _core
.Window_GetBestSize(*args
, **kwargs
)
5651 def GetBestSizeTuple(*args
, **kwargs
):
5653 GetBestSizeTuple() -> (width, height)
5655 This functions returns the best acceptable minimal size for the
5656 window, if applicable. For example, for a static text control, it will be
5657 the minimal size such that the control label is not truncated. For
5658 windows containing subwindows (suzh aswx.Panel), the size returned
5659 by this function will be the same as the size the window would have
5660 had after calling Fit.
5662 return _core
.Window_GetBestSizeTuple(*args
, **kwargs
)
5664 def GetAdjustedBestSize(*args
, **kwargs
):
5666 GetAdjustedBestSize() -> Size
5668 This method is similar to GetBestSize, except in one
5669 thing. GetBestSize should return the minimum untruncated size of the
5670 window, while this method will return the largest of BestSize and any
5671 user specified minimum size. ie. it is the minimum size the window
5672 should currently be drawn at, not the minimal size it can possibly
5675 return _core
.Window_GetAdjustedBestSize(*args
, **kwargs
)
5677 def Center(*args
, **kwargs
):
5679 Center(int direction=BOTH)
5681 Centers the window. The parameter specifies the direction for
5682 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
5683 also include wx.CENTER_ON_SCREEN flag if you want to center the window
5684 on the entire screen and not on its parent window. If it is a
5685 top-level window and has no parent then it will always be centered
5686 relative to the screen.
5688 return _core
.Window_Center(*args
, **kwargs
)
5691 def CenterOnScreen(*args
, **kwargs
):
5693 CenterOnScreen(int dir=BOTH)
5695 Center on screen (only works for top level windows)
5697 return _core
.Window_CenterOnScreen(*args
, **kwargs
)
5699 CentreOnScreen
= CenterOnScreen
5700 def CenterOnParent(*args
, **kwargs
):
5702 CenterOnParent(int dir=BOTH)
5704 Center with respect to the the parent window
5706 return _core
.Window_CenterOnParent(*args
, **kwargs
)
5708 CentreOnParent
= CenterOnParent
5709 def Fit(*args
, **kwargs
):
5713 Sizes the window so that it fits around its subwindows. This function
5714 won't do anything if there are no subwindows and will only really work
5715 correctly if sizers are used for the subwindows layout. Also, if the
5716 window has exactly one subwindow it is better (faster and the result
5717 is more precise as Fit adds some margin to account for fuzziness of
5718 its calculations) to call window.SetClientSize(child.GetSize())
5719 instead of calling Fit.
5721 return _core
.Window_Fit(*args
, **kwargs
)
5723 def FitInside(*args
, **kwargs
):
5727 Similar to Fit, but sizes the interior (virtual) size of a
5728 window. Mainly useful with scrolled windows to reset scrollbars after
5729 sizing changes that do not trigger a size event, and/or scrolled
5730 windows without an interior sizer. This function similarly won't do
5731 anything if there are no subwindows.
5733 return _core
.Window_FitInside(*args
, **kwargs
)
5735 def SetSizeHints(*args
, **kwargs
):
5737 SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
5740 Allows specification of minimum and maximum window sizes, and window
5741 size increments. If a pair of values is not set (or set to -1), the
5742 default values will be used. If this function is called, the user
5743 will not be able to size the window outside the given bounds. The
5744 resizing increments are only significant under Motif or Xt.
5746 return _core
.Window_SetSizeHints(*args
, **kwargs
)
5748 def SetVirtualSizeHints(*args
, **kwargs
):
5750 SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1)
5752 Allows specification of minimum and maximum virtual window sizes. If a
5753 pair of values is not set (or set to -1), the default values will be
5754 used. If this function is called, the user will not be able to size
5755 the virtual area of the window outside the given bounds.
5757 return _core
.Window_SetVirtualSizeHints(*args
, **kwargs
)
5759 def GetMinWidth(*args
, **kwargs
):
5760 """GetMinWidth() -> int"""
5761 return _core
.Window_GetMinWidth(*args
, **kwargs
)
5763 def GetMinHeight(*args
, **kwargs
):
5764 """GetMinHeight() -> int"""
5765 return _core
.Window_GetMinHeight(*args
, **kwargs
)
5767 def GetMaxWidth(*args
, **kwargs
):
5768 """GetMaxWidth() -> int"""
5769 return _core
.Window_GetMaxWidth(*args
, **kwargs
)
5771 def GetMaxHeight(*args
, **kwargs
):
5772 """GetMaxHeight() -> int"""
5773 return _core
.Window_GetMaxHeight(*args
, **kwargs
)
5775 def GetMaxSize(*args
, **kwargs
):
5776 """GetMaxSize() -> Size"""
5777 return _core
.Window_GetMaxSize(*args
, **kwargs
)
5779 def SetVirtualSize(*args
, **kwargs
):
5781 SetVirtualSize(Size size)
5783 Set the the virtual size of a window in pixels. For most windows this
5784 is just the client area of the window, but for some like scrolled
5785 windows it is more or less independent of the screen window size.
5787 return _core
.Window_SetVirtualSize(*args
, **kwargs
)
5789 def SetVirtualSizeWH(*args
, **kwargs
):
5791 SetVirtualSizeWH(int w, int h)
5793 Set the the virtual size of a window in pixels. For most windows this
5794 is just the client area of the window, but for some like scrolled
5795 windows it is more or less independent of the screen window size.
5797 return _core
.Window_SetVirtualSizeWH(*args
, **kwargs
)
5799 def GetVirtualSize(*args
, **kwargs
):
5801 GetVirtualSize() -> Size
5803 Get the the virtual size of the window in pixels. For most windows
5804 this is just the client area of the window, but for some like scrolled
5805 windows it is more or less independent of the screen window size.
5807 return _core
.Window_GetVirtualSize(*args
, **kwargs
)
5809 def GetVirtualSizeTuple(*args
, **kwargs
):
5811 GetVirtualSizeTuple() -> (width, height)
5813 Get the the virtual size of the window in pixels. For most windows
5814 this is just the client area of the window, but for some like scrolled
5815 windows it is more or less independent of the screen window size.
5817 return _core
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
5819 def GetBestVirtualSize(*args
, **kwargs
):
5821 GetBestVirtualSize() -> Size
5823 Return the largest of ClientSize and BestSize (as determined by a
5824 sizer, interior children, or other means)
5826 return _core
.Window_GetBestVirtualSize(*args
, **kwargs
)
5828 def Show(*args
, **kwargs
):
5830 Show(bool show=True) -> bool
5832 Shows or hides the window. You may need to call Raise for a top level
5833 window if you want to bring it to top, although this is not needed if
5834 Show is called immediately after the frame creation. Returns True if
5835 the window has been shown or hidden or False if nothing was done
5836 because it already was in the requested state.
5838 return _core
.Window_Show(*args
, **kwargs
)
5840 def Hide(*args
, **kwargs
):
5844 Equivalent to calling Show(False).
5846 return _core
.Window_Hide(*args
, **kwargs
)
5848 def Enable(*args
, **kwargs
):
5850 Enable(bool enable=True) -> bool
5852 Enable or disable the window for user input. Note that when a parent
5853 window is disabled, all of its children are disabled as well and they
5854 are reenabled again when the parent is. Returns true if the window
5855 has been enabled or disabled, false if nothing was done, i.e. if the
5856 window had already been in the specified state.
5858 return _core
.Window_Enable(*args
, **kwargs
)
5860 def Disable(*args
, **kwargs
):
5864 Disables the window, same as Enable(false).
5866 return _core
.Window_Disable(*args
, **kwargs
)
5868 def IsShown(*args
, **kwargs
):
5872 Returns true if the window is shown, false if it has been hidden.
5874 return _core
.Window_IsShown(*args
, **kwargs
)
5876 def IsEnabled(*args
, **kwargs
):
5880 Returns true if the window is enabled for input, false otherwise.
5882 return _core
.Window_IsEnabled(*args
, **kwargs
)
5884 def SetWindowStyleFlag(*args
, **kwargs
):
5886 SetWindowStyleFlag(long style)
5888 Sets the style of the window. Please note that some styles cannot be
5889 changed after the window creation and that Refresh() might be called
5890 after changing the others for the change to take place immediately.
5892 return _core
.Window_SetWindowStyleFlag(*args
, **kwargs
)
5894 def GetWindowStyleFlag(*args
, **kwargs
):
5896 GetWindowStyleFlag() -> long
5898 Gets the window style that was passed to the constructor or Create
5901 return _core
.Window_GetWindowStyleFlag(*args
, **kwargs
)
5903 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
5904 def HasFlag(*args
, **kwargs
):
5906 HasFlag(int flag) -> bool
5908 Test if the given style is set for this window.
5910 return _core
.Window_HasFlag(*args
, **kwargs
)
5912 def IsRetained(*args
, **kwargs
):
5914 IsRetained() -> bool
5916 Returns true if the window is retained, false otherwise. Retained
5917 windows are only available on X platforms.
5919 return _core
.Window_IsRetained(*args
, **kwargs
)
5921 def SetExtraStyle(*args
, **kwargs
):
5923 SetExtraStyle(long exStyle)
5925 Sets the extra style bits for the window. Extra styles are the less
5926 often used style bits which can't be set with the constructor or with
5927 SetWindowStyleFlag()
5929 return _core
.Window_SetExtraStyle(*args
, **kwargs
)
5931 def GetExtraStyle(*args
, **kwargs
):
5933 GetExtraStyle() -> long
5935 Returns the extra style bits for the window.
5937 return _core
.Window_GetExtraStyle(*args
, **kwargs
)
5939 def MakeModal(*args
, **kwargs
):
5941 MakeModal(bool modal=True)
5943 Disables all other windows in the application so that the user can
5944 only interact with this window. Passing False will reverse this
5947 return _core
.Window_MakeModal(*args
, **kwargs
)
5949 def SetThemeEnabled(*args
, **kwargs
):
5951 SetThemeEnabled(bool enableTheme)
5953 This function tells a window if it should use the system's "theme"
5954 code to draw the windows' background instead if its own background
5955 drawing code. This will only have an effect on platforms that support
5956 the notion of themes in user defined windows. One such platform is
5957 GTK+ where windows can have (very colourful) backgrounds defined by a
5958 user's selected theme.
5960 Dialogs, notebook pages and the status bar have this flag set to true
5961 by default so that the default look and feel is simulated best.
5963 return _core
.Window_SetThemeEnabled(*args
, **kwargs
)
5965 def GetThemeEnabled(*args
, **kwargs
):
5967 GetThemeEnabled() -> bool
5969 Return the themeEnabled flag.
5971 return _core
.Window_GetThemeEnabled(*args
, **kwargs
)
5973 def SetFocus(*args
, **kwargs
):
5977 Set's the focus to this window, allowing it to receive keyboard input.
5979 return _core
.Window_SetFocus(*args
, **kwargs
)
5981 def SetFocusFromKbd(*args
, **kwargs
):
5985 Set focus to this window as the result of a keyboard action. Normally
5986 only called internally.
5988 return _core
.Window_SetFocusFromKbd(*args
, **kwargs
)
5990 def FindFocus(*args
, **kwargs
):
5992 FindFocus() -> Window
5994 Returns the window or control that currently has the keyboard focus,
5997 return _core
.Window_FindFocus(*args
, **kwargs
)
5999 FindFocus
= staticmethod(FindFocus
)
6000 def AcceptsFocus(*args
, **kwargs
):
6002 AcceptsFocus() -> bool
6004 Can this window have focus?
6006 return _core
.Window_AcceptsFocus(*args
, **kwargs
)
6008 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6010 AcceptsFocusFromKeyboard() -> bool
6012 Can this window be given focus by keyboard navigation? if not, the
6013 only way to give it focus (provided it accepts it at all) is to click
6016 return _core
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6018 def GetDefaultItem(*args
, **kwargs
):
6020 GetDefaultItem() -> Window
6022 Get the default child of this parent, i.e. the one which is activated
6023 by pressing <Enter> such as the OK button on a wx.Dialog.
6025 return _core
.Window_GetDefaultItem(*args
, **kwargs
)
6027 def SetDefaultItem(*args
, **kwargs
):
6029 SetDefaultItem(Window child) -> Window
6031 Set this child as default, return the old default.
6033 return _core
.Window_SetDefaultItem(*args
, **kwargs
)
6035 def SetTmpDefaultItem(*args
, **kwargs
):
6037 SetTmpDefaultItem(Window win)
6039 Set this child as temporary default
6041 return _core
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6043 def GetChildren(*args
, **kwargs
):
6045 GetChildren() -> PyObject
6047 Returns a list of the window's children. NOTE: Currently this is a
6048 copy of the child window list maintained by the window, so the return
6049 value of this function is only valid as long as the window's children
6052 return _core
.Window_GetChildren(*args
, **kwargs
)
6054 def GetParent(*args
, **kwargs
):
6056 GetParent() -> Window
6058 Returns the parent window of this window, or None if there isn't one.
6060 return _core
.Window_GetParent(*args
, **kwargs
)
6062 def GetGrandParent(*args
, **kwargs
):
6064 GetGrandParent() -> Window
6066 Returns the parent of the parent of this window, or None if there isn't one.
6068 return _core
.Window_GetGrandParent(*args
, **kwargs
)
6070 def IsTopLevel(*args
, **kwargs
):
6072 IsTopLevel() -> bool
6074 Returns true if the given window is a top-level one. Currently all
6075 frames and dialogs are always considered to be top-level windows (even
6076 if they have a parent window).
6078 return _core
.Window_IsTopLevel(*args
, **kwargs
)
6080 def Reparent(*args
, **kwargs
):
6082 Reparent(Window newParent) -> bool
6084 Reparents the window, i.e the window will be removed from its current
6085 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6086 re-inserted into another. Available on Windows and GTK. Returns True
6087 if the parent was changed, False otherwise (error or newParent ==
6090 return _core
.Window_Reparent(*args
, **kwargs
)
6092 def AddChild(*args
, **kwargs
):
6094 AddChild(Window child)
6096 Adds a child window. This is called automatically by window creation
6097 functions so should not be required by the application programmer.
6099 return _core
.Window_AddChild(*args
, **kwargs
)
6101 def RemoveChild(*args
, **kwargs
):
6103 RemoveChild(Window child)
6105 Removes a child window. This is called automatically by window
6106 deletion functions so should not be required by the application
6109 return _core
.Window_RemoveChild(*args
, **kwargs
)
6111 def FindWindowById(*args
, **kwargs
):
6113 FindWindowById(long winid) -> Window
6115 Find a chld of this window by window ID
6117 return _core
.Window_FindWindowById(*args
, **kwargs
)
6119 def FindWindowByName(*args
, **kwargs
):
6121 FindWindowByName(String name) -> Window
6123 Find a child of this window by name
6125 return _core
.Window_FindWindowByName(*args
, **kwargs
)
6127 def GetEventHandler(*args
, **kwargs
):
6129 GetEventHandler() -> EvtHandler
6131 Returns the event handler for this window. By default, the window is
6132 its own event handler.
6134 return _core
.Window_GetEventHandler(*args
, **kwargs
)
6136 def SetEventHandler(*args
, **kwargs
):
6138 SetEventHandler(EvtHandler handler)
6140 Sets the event handler for this window. An event handler is an object
6141 that is capable of processing the events sent to a window. By default,
6142 the window is its own event handler, but an application may wish to
6143 substitute another, for example to allow central implementation of
6144 event-handling for a variety of different window classes.
6146 It is usually better to use wx.Window.PushEventHandler since this sets
6147 up a chain of event handlers, where an event not handled by one event
6148 handler is handed to the next one in the chain.
6150 return _core
.Window_SetEventHandler(*args
, **kwargs
)
6152 def PushEventHandler(*args
, **kwargs
):
6154 PushEventHandler(EvtHandler handler)
6156 Pushes this event handler onto the event handler stack for the window.
6157 An event handler is an object that is capable of processing the events
6158 sent to a window. By default, the window is its own event handler, but
6159 an application may wish to substitute another, for example to allow
6160 central implementation of event-handling for a variety of different
6163 wx.Window.PushEventHandler allows an application to set up a chain of
6164 event handlers, where an event not handled by one event handler is
6165 handed to the next one in the chain. Use wx.Window.PopEventHandler to
6166 remove the event handler.
6168 return _core
.Window_PushEventHandler(*args
, **kwargs
)
6170 def PopEventHandler(*args
, **kwargs
):
6172 PopEventHandler(bool deleteHandler=False) -> EvtHandler
6174 Removes and returns the top-most event handler on the event handler
6175 stack. If deleteHandler is True then the wx.EvtHandler object will be
6176 destroyed after it is popped.
6178 return _core
.Window_PopEventHandler(*args
, **kwargs
)
6180 def RemoveEventHandler(*args
, **kwargs
):
6182 RemoveEventHandler(EvtHandler handler) -> bool
6184 Find the given handler in the event handler chain and remove (but
6185 not delete) it from the event handler chain, return True if it was
6186 found and False otherwise (this also results in an assert failure so
6187 this function should only be called when the handler is supposed to
6190 return _core
.Window_RemoveEventHandler(*args
, **kwargs
)
6192 def SetValidator(*args
, **kwargs
):
6194 SetValidator(Validator validator)
6196 Deletes the current validator (if any) and sets the window validator,
6197 having called wx.Validator.Clone to create a new validator of this
6200 return _core
.Window_SetValidator(*args
, **kwargs
)
6202 def GetValidator(*args
, **kwargs
):
6204 GetValidator() -> Validator
6206 Returns a pointer to the current validator for the window, or None if
6209 return _core
.Window_GetValidator(*args
, **kwargs
)
6211 def SetAcceleratorTable(*args
, **kwargs
):
6213 SetAcceleratorTable(AcceleratorTable accel)
6215 Sets the accelerator table for this window.
6217 return _core
.Window_SetAcceleratorTable(*args
, **kwargs
)
6219 def GetAcceleratorTable(*args
, **kwargs
):
6221 GetAcceleratorTable() -> AcceleratorTable
6223 Gets the accelerator table for this window.
6225 return _core
.Window_GetAcceleratorTable(*args
, **kwargs
)
6227 def RegisterHotKey(*args
, **kwargs
):
6229 RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool
6231 Registers a system wide hotkey. Every time the user presses the hotkey
6232 registered here, this window will receive a hotkey event. It will
6233 receive the event even if the application is in the background and
6234 does not have the input focus because the user is working with some
6235 other application. To bind an event handler function to this hotkey
6236 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6237 hotkey was registered successfully.
6239 return _core
.Window_RegisterHotKey(*args
, **kwargs
)
6241 def UnregisterHotKey(*args
, **kwargs
):
6243 UnregisterHotKey(int hotkeyId) -> bool
6245 Unregisters a system wide hotkey.
6247 return _core
.Window_UnregisterHotKey(*args
, **kwargs
)
6249 def ConvertDialogPointToPixels(*args
, **kwargs
):
6251 ConvertDialogPointToPixels(Point pt) -> Point
6253 Converts a point or size from dialog units to pixels. Dialog units
6254 are used for maintaining a dialog's proportions even if the font
6255 changes. For the x dimension, the dialog units are multiplied by the
6256 average character width and then divided by 4. For the y dimension,
6257 the dialog units are multiplied by the average character height and
6260 return _core
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
6262 def ConvertDialogSizeToPixels(*args
, **kwargs
):
6264 ConvertDialogSizeToPixels(Size sz) -> Size
6266 Converts a point or size from dialog units to pixels. Dialog units
6267 are used for maintaining a dialog's proportions even if the font
6268 changes. For the x dimension, the dialog units are multiplied by the
6269 average character width and then divided by 4. For the y dimension,
6270 the dialog units are multiplied by the average character height and
6273 return _core
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
6275 def DLG_PNT(*args
, **kwargs
):
6277 DLG_PNT(Point pt) -> Point
6279 Converts a point or size from dialog units to pixels. Dialog units
6280 are used for maintaining a dialog's proportions even if the font
6281 changes. For the x dimension, the dialog units are multiplied by the
6282 average character width and then divided by 4. For the y dimension,
6283 the dialog units are multiplied by the average character height and
6286 return _core
.Window_DLG_PNT(*args
, **kwargs
)
6288 def DLG_SZE(*args
, **kwargs
):
6290 DLG_SZE(Size sz) -> Size
6292 Converts a point or size from dialog units to pixels. Dialog units
6293 are used for maintaining a dialog's proportions even if the font
6294 changes. For the x dimension, the dialog units are multiplied by the
6295 average character width and then divided by 4. For the y dimension,
6296 the dialog units are multiplied by the average character height and
6299 return _core
.Window_DLG_SZE(*args
, **kwargs
)
6301 def ConvertPixelPointToDialog(*args
, **kwargs
):
6302 """ConvertPixelPointToDialog(Point pt) -> Point"""
6303 return _core
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
6305 def ConvertPixelSizeToDialog(*args
, **kwargs
):
6306 """ConvertPixelSizeToDialog(Size sz) -> Size"""
6307 return _core
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
6309 def WarpPointer(*args
, **kwargs
):
6311 WarpPointer(int x, int y)
6313 Moves the pointer to the given position on the window.
6315 NOTE: This function is not supported under Mac because Apple Human
6316 Interface Guidelines forbid moving the mouse cursor programmatically.
6318 return _core
.Window_WarpPointer(*args
, **kwargs
)
6320 def CaptureMouse(*args
, **kwargs
):
6324 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
6325 release the capture.
6327 Note that wxWindows maintains the stack of windows having captured the
6328 mouse and when the mouse is released the capture returns to the window
6329 which had had captured it previously and it is only really released if
6330 there were no previous window. In particular, this means that you must
6331 release the mouse as many times as you capture it.
6333 return _core
.Window_CaptureMouse(*args
, **kwargs
)
6335 def ReleaseMouse(*args
, **kwargs
):
6339 Releases mouse input captured with wx.Window.CaptureMouse.
6341 return _core
.Window_ReleaseMouse(*args
, **kwargs
)
6343 def GetCapture(*args
, **kwargs
):
6345 GetCapture() -> Window
6347 Returns the window which currently captures the mouse or None
6349 return _core
.Window_GetCapture(*args
, **kwargs
)
6351 GetCapture
= staticmethod(GetCapture
)
6352 def HasCapture(*args
, **kwargs
):
6354 HasCapture() -> bool
6356 Returns true if this window has the current mouse capture.
6358 return _core
.Window_HasCapture(*args
, **kwargs
)
6360 def Refresh(*args
, **kwargs
):
6362 Refresh(bool eraseBackground=True, Rect rect=None)
6364 Mark the specified rectangle (or the whole window) as "dirty" so it
6365 will be repainted. Causes an EVT_PAINT event to be generated and sent
6368 return _core
.Window_Refresh(*args
, **kwargs
)
6370 def RefreshRect(*args
, **kwargs
):
6372 RefreshRect(Rect rect)
6374 Redraws the contents of the given rectangle: the area inside it will
6375 be repainted. This is the same as Refresh but has a nicer syntax.
6377 return _core
.Window_RefreshRect(*args
, **kwargs
)
6379 def Update(*args
, **kwargs
):
6383 Calling this method immediately repaints the invalidated area of the
6384 window instead of waiting for the EVT_PAINT event to happen, (normally
6385 this would usually only happen when the flow of control returns to the
6386 event loop.) Notice that this function doesn't refresh the window and
6387 does nothing if the window has been already repainted. Use Refresh
6388 first if you want to immediately redraw the window (or some portion of
6389 it) unconditionally.
6391 return _core
.Window_Update(*args
, **kwargs
)
6393 def ClearBackground(*args
, **kwargs
):
6397 Clears the window by filling it with the current background
6398 colour. Does not cause an erase background event to be generated.
6400 return _core
.Window_ClearBackground(*args
, **kwargs
)
6402 def Freeze(*args
, **kwargs
):
6406 Freezes the window or, in other words, prevents any updates from taking place
6407 on screen, the window is not redrawn at all. Thaw must be called to reenable
6408 window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw
6409 being delayed until all the nesting has been undone.
6411 This method is useful for visual appearance optimization (for example,
6412 it is a good idea to use it before inserting large amount of text into
6413 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
6414 for all controls so it is mostly just a hint to wxWindows and not a
6415 mandatory directive.
6417 return _core
.Window_Freeze(*args
, **kwargs
)
6419 def Thaw(*args
, **kwargs
):
6423 Reenables window updating after a previous call to Freeze. Calls to
6424 Freeze/Thaw may be nested, so Thaw must be called the same number of times
6425 that Freeze was before the window will be updated.
6427 return _core
.Window_Thaw(*args
, **kwargs
)
6429 def PrepareDC(*args
, **kwargs
):
6433 Call this function to prepare the device context for drawing a
6434 scrolled image. It sets the device origin according to the current
6437 return _core
.Window_PrepareDC(*args
, **kwargs
)
6439 def GetUpdateRegion(*args
, **kwargs
):
6441 GetUpdateRegion() -> Region
6443 Returns the region specifying which parts of the window have been
6444 damaged. Should only be called within an EVT_PAINT handler.
6446 return _core
.Window_GetUpdateRegion(*args
, **kwargs
)
6448 def GetUpdateClientRect(*args
, **kwargs
):
6450 GetUpdateClientRect() -> Rect
6452 Get the update rectangle region bounding box in client coords.
6454 return _core
.Window_GetUpdateClientRect(*args
, **kwargs
)
6456 def IsExposed(*args
, **kwargs
):
6458 IsExposed(int x, int y, int w=1, int h=1) -> bool
6460 Returns true if the given point or rectangle area has been exposed
6461 since the last repaint. Call this in an paint event handler to
6462 optimize redrawing by only redrawing those areas, which have been
6465 return _core
.Window_IsExposed(*args
, **kwargs
)
6467 def IsExposedPoint(*args
, **kwargs
):
6469 IsExposedPoint(Point pt) -> bool
6471 Returns true if the given point or rectangle area has been exposed
6472 since the last repaint. Call this in an paint event handler to
6473 optimize redrawing by only redrawing those areas, which have been
6476 return _core
.Window_IsExposedPoint(*args
, **kwargs
)
6478 def IsExposedRect(*args
, **kwargs
):
6480 IsExposedRect(Rect rect) -> bool
6482 Returns true if the given point or rectangle area has been exposed
6483 since the last repaint. Call this in an paint event handler to
6484 optimize redrawing by only redrawing those areas, which have been
6487 return _core
.Window_IsExposedRect(*args
, **kwargs
)
6489 def SetBackgroundColour(*args
, **kwargs
):
6491 SetBackgroundColour(Colour colour) -> bool
6493 Sets the background colour of the window. Returns True if the colour
6494 was changed. The background colour is usually painted by the default
6495 EVT_ERASE_BACKGROUND event handler function under Windows and
6496 automatically under GTK.
6498 Note that setting the background colour does not cause an immediate
6499 refresh, so you may wish to call ClearBackground or Refresh after
6500 calling this function.
6502 Use this function with care under GTK+ as the new appearance of the
6503 window might not look equally well when used with themes, i.e GTK+'s
6504 ability to change its look as the user wishes with run-time loadable
6507 return _core
.Window_SetBackgroundColour(*args
, **kwargs
)
6509 def SetForegroundColour(*args
, **kwargs
):
6511 SetForegroundColour(Colour colour) -> bool
6513 Sets the foreground colour of the window. Returns True is the colour
6514 was changed. The interpretation of foreground colour is dependent on
6515 the window class; it may be the text colour or other colour, or it may
6518 return _core
.Window_SetForegroundColour(*args
, **kwargs
)
6520 def GetBackgroundColour(*args
, **kwargs
):
6522 GetBackgroundColour() -> Colour
6524 Returns the background colour of the window.
6526 return _core
.Window_GetBackgroundColour(*args
, **kwargs
)
6528 def GetForegroundColour(*args
, **kwargs
):
6530 GetForegroundColour() -> Colour
6532 Returns the foreground colour of the window. The interpretation of
6533 foreground colour is dependent on the window class; it may be the text
6534 colour or other colour, or it may not be used at all.
6536 return _core
.Window_GetForegroundColour(*args
, **kwargs
)
6538 def SetCursor(*args
, **kwargs
):
6540 SetCursor(Cursor cursor) -> bool
6542 Sets the window's cursor. Notice that the window cursor also sets it
6543 for the children of the window implicitly.
6545 The cursor may be wx.NullCursor in which case the window cursor will
6546 be reset back to default.
6548 return _core
.Window_SetCursor(*args
, **kwargs
)
6550 def GetCursor(*args
, **kwargs
):
6552 GetCursor() -> Cursor
6554 Return the cursor associated with this window.
6556 return _core
.Window_GetCursor(*args
, **kwargs
)
6558 def SetFont(*args
, **kwargs
):
6560 SetFont(Font font) -> bool
6562 Sets the font for this window.
6564 return _core
.Window_SetFont(*args
, **kwargs
)
6566 def GetFont(*args
, **kwargs
):
6570 Returns the default font used for this window.
6572 return _core
.Window_GetFont(*args
, **kwargs
)
6574 def SetCaret(*args
, **kwargs
):
6576 SetCaret(Caret caret)
6578 Sets the caret associated with the window.
6580 return _core
.Window_SetCaret(*args
, **kwargs
)
6582 def GetCaret(*args
, **kwargs
):
6586 Returns the caret associated with the window.
6588 return _core
.Window_GetCaret(*args
, **kwargs
)
6590 def GetCharHeight(*args
, **kwargs
):
6592 GetCharHeight() -> int
6594 Get the (average) character size for the current font.
6596 return _core
.Window_GetCharHeight(*args
, **kwargs
)
6598 def GetCharWidth(*args
, **kwargs
):
6600 GetCharWidth() -> int
6602 Get the (average) character size for the current font.
6604 return _core
.Window_GetCharWidth(*args
, **kwargs
)
6606 def GetTextExtent(*args
, **kwargs
):
6608 GetTextExtent(String string) -> (width, height)
6610 Get the width and height of the text using the current font.
6612 return _core
.Window_GetTextExtent(*args
, **kwargs
)
6614 def GetFullTextExtent(*args
, **kwargs
):
6616 GetFullTextExtent(String string, Font font=None) ->
6617 (width, height, descent, externalLeading)
6619 Get the width, height, decent and leading of the text using the
6620 current or specified font.
6622 return _core
.Window_GetFullTextExtent(*args
, **kwargs
)
6624 def ClientToScreenXY(*args
, **kwargs
):
6626 ClientToScreenXY(int x, int y) -> (x,y)
6628 Converts to screen coordinates from coordinates relative to this window.
6630 return _core
.Window_ClientToScreenXY(*args
, **kwargs
)
6632 def ScreenToClientXY(*args
, **kwargs
):
6634 ScreenToClientXY(int x, int y) -> (x,y)
6636 Converts from screen to client window coordinates.
6638 return _core
.Window_ScreenToClientXY(*args
, **kwargs
)
6640 def ClientToScreen(*args
, **kwargs
):
6642 ClientToScreen(Point pt) -> Point
6644 Converts to screen coordinates from coordinates relative to this window.
6646 return _core
.Window_ClientToScreen(*args
, **kwargs
)
6648 def ScreenToClient(*args
, **kwargs
):
6650 ScreenToClient(Point pt) -> Point
6652 Converts from screen to client window coordinates.
6654 return _core
.Window_ScreenToClient(*args
, **kwargs
)
6656 def HitTestXY(*args
, **kwargs
):
6658 HitTestXY(int x, int y) -> int
6660 Test where the given (in client coords) point lies
6662 return _core
.Window_HitTestXY(*args
, **kwargs
)
6664 def HitTest(*args
, **kwargs
):
6666 HitTest(Point pt) -> int
6668 Test where the given (in client coords) point lies
6670 return _core
.Window_HitTest(*args
, **kwargs
)
6672 def GetBorder(*args
):
6674 GetBorder(long flags) -> int
6677 Get border for the flags of this window
6679 return _core
.Window_GetBorder(*args
)
6681 def UpdateWindowUI(*args
, **kwargs
):
6683 UpdateWindowUI(long flags=UPDATE_UI_NONE)
6685 This function sends EVT_UPDATE_UI events to the window. The particular
6686 implementation depends on the window; for example a wx.ToolBar will
6687 send an update UI event for each toolbar button, and a wx.Frame will
6688 send an update UI event for each menubar menu item. You can call this
6689 function from your application to ensure that your UI is up-to-date at
6690 a particular point in time (as far as your EVT_UPDATE_UI handlers are
6691 concerned). This may be necessary if you have called
6692 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
6693 limit the overhead that wxWindows incurs by sending update UI events
6696 The flags should be a bitlist of one or more of the following values:
6698 wx.UPDATE_UI_NONE No particular value
6699 wx.UPDATE_UI_RECURSE Call the function for descendants
6700 wx.UPDATE_UI_FROMIDLE Invoked from OnIdle
6702 If you are calling this function from an OnIdle function, make sure
6703 you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to
6704 only update the UI elements that need to be updated in idle time. Some
6705 windows update their elements only when necessary, for example when a
6706 menu is about to be shown. The following is an example of how to call
6707 UpdateWindowUI from an idle function.
6709 def OnIdle(self, evt):
6710 if wx.UpdateUIEvent.CanUpdate(self):
6711 self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE);
6714 return _core
.Window_UpdateWindowUI(*args
, **kwargs
)
6716 def PopupMenuXY(*args
, **kwargs
):
6718 PopupMenuXY(Menu menu, int x, int y) -> bool
6720 Pops up the given menu at the specified coordinates, relative to this
6721 window, and returns control when the user has dismissed the menu. If a
6722 menu item is selected, the corresponding menu event is generated and
6723 will be processed as usual.
6725 return _core
.Window_PopupMenuXY(*args
, **kwargs
)
6727 def PopupMenu(*args
, **kwargs
):
6729 PopupMenu(Menu menu, Point pos) -> bool
6731 Pops up the given menu at the specified coordinates, relative to this
6732 window, and returns control when the user has dismissed the menu. If a
6733 menu item is selected, the corresponding menu event is generated and
6734 will be processed as usual.
6736 return _core
.Window_PopupMenu(*args
, **kwargs
)
6738 def GetHandle(*args
, **kwargs
):
6742 Returns the platform-specific handle (as a long integer) of the
6743 physical window. Currently on wxMac it returns the handle of the
6744 toplevel parent of the window.
6746 return _core
.Window_GetHandle(*args
, **kwargs
)
6748 def OnPaint(*args
, **kwargs
):
6749 """OnPaint(PaintEvent event)"""
6750 return _core
.Window_OnPaint(*args
, **kwargs
)
6752 def HasScrollbar(*args
, **kwargs
):
6754 HasScrollbar(int orient) -> bool
6756 Does the window have the scrollbar for this orientation?
6758 return _core
.Window_HasScrollbar(*args
, **kwargs
)
6760 def SetScrollbar(*args
, **kwargs
):
6762 SetScrollbar(int orientation, int pos, int thumbvisible, int range,
6765 Sets the scrollbar properties of a built-in scrollbar.
6767 orientation: Determines the scrollbar whose page size is to be
6768 set. May be wx.HORIZONTAL or wx.VERTICAL.
6770 position: The position of the scrollbar in scroll units.
6772 thumbSize: The size of the thumb, or visible portion of the
6773 scrollbar, in scroll units.
6775 range: The maximum position of the scrollbar.
6777 refresh: True to redraw the scrollbar, false otherwise.
6779 return _core
.Window_SetScrollbar(*args
, **kwargs
)
6781 def SetScrollPos(*args
, **kwargs
):
6783 SetScrollPos(int orientation, int pos, bool refresh=True)
6785 Sets the position of one of the built-in scrollbars.
6787 return _core
.Window_SetScrollPos(*args
, **kwargs
)
6789 def GetScrollPos(*args
, **kwargs
):
6791 GetScrollPos(int orientation) -> int
6793 Returns the built-in scrollbar position.
6795 return _core
.Window_GetScrollPos(*args
, **kwargs
)
6797 def GetScrollThumb(*args
, **kwargs
):
6799 GetScrollThumb(int orientation) -> int
6801 Returns the built-in scrollbar thumb size.
6803 return _core
.Window_GetScrollThumb(*args
, **kwargs
)
6805 def GetScrollRange(*args
, **kwargs
):
6807 GetScrollRange(int orientation) -> int
6809 Returns the built-in scrollbar range.
6811 return _core
.Window_GetScrollRange(*args
, **kwargs
)
6813 def ScrollWindow(*args
, **kwargs
):
6815 ScrollWindow(int dx, int dy, Rect rect=None)
6817 Physically scrolls the pixels in the window and move child windows
6818 accordingly. Use this function to optimise your scrolling
6819 implementations, to minimise the area that must be redrawn. Note that
6820 it is rarely required to call this function from a user program.
6822 dx: Amount to scroll horizontally.
6824 dy: Amount to scroll vertically.
6826 rect: Rectangle to invalidate. If this is None, the whole window
6827 is invalidated. If you pass a rectangle corresponding to the
6828 area of the window exposed by the scroll, your painting
6829 handler can optimize painting by checking for the
6832 return _core
.Window_ScrollWindow(*args
, **kwargs
)
6834 def ScrollLines(*args
, **kwargs
):
6836 ScrollLines(int lines) -> bool
6838 If the platform and window class supports it, scrolls the window by
6839 the given number of lines down, if lines is positive, or up if lines
6840 is negative. Returns True if the window was scrolled, False if it was
6841 already on top/bottom and nothing was done.
6843 return _core
.Window_ScrollLines(*args
, **kwargs
)
6845 def ScrollPages(*args
, **kwargs
):
6847 ScrollPages(int pages) -> bool
6849 If the platform and window class supports it, scrolls the window by
6850 the given number of pages down, if pages is positive, or up if pages
6851 is negative. Returns True if the window was scrolled, False if it was
6852 already on top/bottom and nothing was done.
6854 return _core
.Window_ScrollPages(*args
, **kwargs
)
6856 def LineUp(*args
, **kwargs
):
6860 This is just a wrapper for ScrollLines(-1).
6862 return _core
.Window_LineUp(*args
, **kwargs
)
6864 def LineDown(*args
, **kwargs
):
6868 This is just a wrapper for ScrollLines(1).
6870 return _core
.Window_LineDown(*args
, **kwargs
)
6872 def PageUp(*args
, **kwargs
):
6876 This is just a wrapper for ScrollPages(-1).
6878 return _core
.Window_PageUp(*args
, **kwargs
)
6880 def PageDown(*args
, **kwargs
):
6884 This is just a wrapper for ScrollPages(1).
6886 return _core
.Window_PageDown(*args
, **kwargs
)
6888 def SetHelpText(*args
, **kwargs
):
6890 SetHelpText(String text)
6892 Sets the help text to be used as context-sensitive help for this
6893 window. Note that the text is actually stored by the current
6894 wxHelpProvider implementation, and not in the window object itself.
6896 return _core
.Window_SetHelpText(*args
, **kwargs
)
6898 def SetHelpTextForId(*args
, **kwargs
):
6900 SetHelpTextForId(String text)
6902 Associate this help text with all windows with the same id as this
6905 return _core
.Window_SetHelpTextForId(*args
, **kwargs
)
6907 def GetHelpText(*args
, **kwargs
):
6909 GetHelpText() -> String
6911 Gets the help text to be used as context-sensitive help for this
6912 window. Note that the text is actually stored by the current
6913 wxHelpProvider implementation, and not in the window object itself.
6915 return _core
.Window_GetHelpText(*args
, **kwargs
)
6917 def SetToolTipString(*args
, **kwargs
):
6919 SetToolTipString(String tip)
6921 Attach a tooltip to the window.
6923 return _core
.Window_SetToolTipString(*args
, **kwargs
)
6925 def SetToolTip(*args
, **kwargs
):
6927 SetToolTip(ToolTip tip)
6929 Attach a tooltip to the window.
6931 return _core
.Window_SetToolTip(*args
, **kwargs
)
6933 def GetToolTip(*args
, **kwargs
):
6935 GetToolTip() -> ToolTip
6937 get the associated tooltip or None if none
6939 return _core
.Window_GetToolTip(*args
, **kwargs
)
6941 def SetDropTarget(*args
, **kwargs
):
6943 SetDropTarget(DropTarget dropTarget)
6945 Associates a drop target with this window. If the window already has
6946 a drop target, it is deleted.
6948 return _core
.Window_SetDropTarget(*args
, **kwargs
)
6950 def GetDropTarget(*args
, **kwargs
):
6952 GetDropTarget() -> DropTarget
6954 Returns the associated drop target, which may be None.
6956 return _core
.Window_GetDropTarget(*args
, **kwargs
)
6958 def DragAcceptFiles(*args
, **kwargs
):
6960 DragAcceptFiles(bool accept)
6962 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
6963 Only available on Windows.
6965 return _core
.Window_DragAcceptFiles(*args
, **kwargs
)
6967 def SetConstraints(*args
, **kwargs
):
6969 SetConstraints(LayoutConstraints constraints)
6971 Sets the window to have the given layout constraints. If an existing
6972 layout constraints object is already owned by the window, it will be
6973 deleted. Pass None to disassociate and delete the window's current
6976 You must call SetAutoLayout to tell a window to use the constraints
6977 automatically in its default EVT_SIZE handler; otherwise, you must
6978 handle EVT_SIZE yourself and call Layout() explicitly. When setting
6979 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
6982 return _core
.Window_SetConstraints(*args
, **kwargs
)
6984 def GetConstraints(*args
, **kwargs
):
6986 GetConstraints() -> LayoutConstraints
6988 Returns a pointer to the window's layout constraints, or None if there
6991 return _core
.Window_GetConstraints(*args
, **kwargs
)
6993 def SetAutoLayout(*args
, **kwargs
):
6995 SetAutoLayout(bool autoLayout)
6997 Determines whether the Layout function will be called automatically
6998 when the window is resized. It is called implicitly by SetSizer but
6999 if you use SetConstraints you should call it manually or otherwise the
7000 window layout won't be correctly updated when its size changes.
7002 return _core
.Window_SetAutoLayout(*args
, **kwargs
)
7004 def GetAutoLayout(*args
, **kwargs
):
7006 GetAutoLayout() -> bool
7008 Returns the current autoLayout setting
7010 return _core
.Window_GetAutoLayout(*args
, **kwargs
)
7012 def Layout(*args
, **kwargs
):
7016 Invokes the constraint-based layout algorithm or the sizer-based
7017 algorithm for this window. See SetAutoLayout: when auto layout is on,
7018 this function gets called automatically by the default EVT_SIZE
7019 handler when the window is resized.
7021 return _core
.Window_Layout(*args
, **kwargs
)
7023 def SetSizer(*args
, **kwargs
):
7025 SetSizer(Sizer sizer, bool deleteOld=True)
7027 Sets the window to have the given layout sizer. The window will then
7028 own the object, and will take care of its deletion. If an existing
7029 layout sizer object is already owned by the window, it will be deleted
7030 if the deleteOld parameter is true. Note that this function will also
7031 call SetAutoLayout implicitly with a True parameter if the sizer is
7032 non-NoneL and False otherwise.
7034 return _core
.Window_SetSizer(*args
, **kwargs
)
7036 def SetSizerAndFit(*args
, **kwargs
):
7038 SetSizerAndFit(Sizer sizer, bool deleteOld=True)
7040 The same as SetSizer, except it also sets the size hints for the
7041 window based on the sizer's minimum size.
7043 return _core
.Window_SetSizerAndFit(*args
, **kwargs
)
7045 def GetSizer(*args
, **kwargs
):
7049 Return the sizer associated with the window by a previous call to
7050 SetSizer or None if there isn't one.
7052 return _core
.Window_GetSizer(*args
, **kwargs
)
7054 def SetContainingSizer(*args
, **kwargs
):
7056 SetContainingSizer(Sizer sizer)
7058 This normally does not need to be called by application code. It is
7059 called internally when a window is added to a sizer, and is used so
7060 the window can remove itself from the sizer when it is destroyed.
7062 return _core
.Window_SetContainingSizer(*args
, **kwargs
)
7064 def GetContainingSizer(*args
, **kwargs
):
7066 GetContainingSizer() -> Sizer
7068 Return the sizer that this window is a member of, if any, otherwise None.
7070 return _core
.Window_GetContainingSizer(*args
, **kwargs
)
7072 def PostCreate(self
, pre
):
7074 Phase 3 of the 2-phase create <wink!>
7075 Call this method after precreating the window with the 2-phase create method.
7077 self
.this
= pre
.this
7078 self
.thisown
= pre
.thisown
7080 if hasattr(self
, '_setOORInfo'):
7081 self
._setOORInfo
(self
)
7082 if hasattr(self
, '_setCallbackInfo'):
7083 self
._setCallbackInfo
(self
, self
.__class
__)
7086 class WindowPtr(Window
):
7087 def __init__(self
, this
):
7089 if not hasattr(self
,"thisown"): self
.thisown
= 0
7090 self
.__class
__ = Window
7091 _core
.Window_swigregister(WindowPtr
)
7092 NullAcceleratorTable
= cvar
.NullAcceleratorTable
7093 PanelNameStr
= cvar
.PanelNameStr
7095 def PreWindow(*args
, **kwargs
):
7097 PreWindow() -> Window
7099 Precreate a Window for 2-phase creation.
7101 val
= _core
.new_PreWindow(*args
, **kwargs
)
7105 def Window_NewControlId(*args
, **kwargs
):
7107 Window_NewControlId() -> int
7109 Generate a control id for the controls which were not given one.
7111 return _core
.Window_NewControlId(*args
, **kwargs
)
7113 def Window_NextControlId(*args
, **kwargs
):
7115 Window_NextControlId(int winid) -> int
7117 Get the id of the control following the one with the given
7120 return _core
.Window_NextControlId(*args
, **kwargs
)
7122 def Window_PrevControlId(*args
, **kwargs
):
7124 Window_PrevControlId(int winid) -> int
7126 Get the id of the control preceding the one with the given
7129 return _core
.Window_PrevControlId(*args
, **kwargs
)
7131 def Window_FindFocus(*args
, **kwargs
):
7133 Window_FindFocus() -> Window
7135 Returns the window or control that currently has the keyboard focus,
7138 return _core
.Window_FindFocus(*args
, **kwargs
)
7140 def Window_GetCapture(*args
, **kwargs
):
7142 Window_GetCapture() -> Window
7144 Returns the window which currently captures the mouse or None
7146 return _core
.Window_GetCapture(*args
, **kwargs
)
7148 def DLG_PNT(win
, point_or_x
, y
=None):
7150 Convenience function for converting a Point or (x,y) in
7151 dialog units to pixel units.
7154 return win
.ConvertDialogPointToPixels(point_or_x
)
7156 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
7158 def DLG_SZE(win
, size_width
, height
=None):
7160 Convenience function for converting a Size or (w,h) in
7161 dialog units to pixel units.
7164 return win
.ConvertDialogSizeToPixels(size_width
)
7166 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
7169 def FindWindowById(*args
, **kwargs
):
7171 FindWindowById(long id, Window parent=None) -> Window
7173 Find the first window in the application with the given id. If parent
7174 is None, the search will start from all top-level frames and dialog
7175 boxes; if non-None, the search will be limited to the given window
7176 hierarchy. The search is recursive in both cases.
7178 return _core
.FindWindowById(*args
, **kwargs
)
7180 def FindWindowByName(*args
, **kwargs
):
7182 FindWindowByName(String name, Window parent=None) -> Window
7184 Find a window by its name (as given in a window constructor or Create
7185 function call). If parent is None, the search will start from all
7186 top-level frames and dialog boxes; if non-None, the search will be
7187 limited to the given window hierarchy. The search is recursive in both
7190 If no window with such name is found, wx.FindWindowByLabel is called.
7192 return _core
.FindWindowByName(*args
, **kwargs
)
7194 def FindWindowByLabel(*args
, **kwargs
):
7196 FindWindowByLabel(String label, Window parent=None) -> Window
7198 Find a window by its label. Depending on the type of window, the label
7199 may be a window title or panel item label. If parent is None, the
7200 search will start from all top-level frames and dialog boxes; if
7201 non-None, the search will be limited to the given window
7202 hierarchy. The search is recursive in both cases.
7204 return _core
.FindWindowByLabel(*args
, **kwargs
)
7206 def Window_FromHWND(*args
, **kwargs
):
7207 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
7208 return _core
.Window_FromHWND(*args
, **kwargs
)
7209 #---------------------------------------------------------------------------
7211 class Validator(EvtHandler
):
7213 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7214 def __init__(self
, *args
, **kwargs
):
7215 """__init__() -> Validator"""
7216 newobj
= _core
.new_Validator(*args
, **kwargs
)
7217 self
.this
= newobj
.this
7220 self
._setOORInfo
(self
)
7222 def Clone(*args
, **kwargs
):
7223 """Clone() -> Validator"""
7224 return _core
.Validator_Clone(*args
, **kwargs
)
7226 def Validate(*args
, **kwargs
):
7227 """Validate(Window parent) -> bool"""
7228 return _core
.Validator_Validate(*args
, **kwargs
)
7230 def TransferToWindow(*args
, **kwargs
):
7231 """TransferToWindow() -> bool"""
7232 return _core
.Validator_TransferToWindow(*args
, **kwargs
)
7234 def TransferFromWindow(*args
, **kwargs
):
7235 """TransferFromWindow() -> bool"""
7236 return _core
.Validator_TransferFromWindow(*args
, **kwargs
)
7238 def GetWindow(*args
, **kwargs
):
7239 """GetWindow() -> Window"""
7240 return _core
.Validator_GetWindow(*args
, **kwargs
)
7242 def SetWindow(*args
, **kwargs
):
7243 """SetWindow(Window window)"""
7244 return _core
.Validator_SetWindow(*args
, **kwargs
)
7246 def IsSilent(*args
, **kwargs
):
7247 """IsSilent() -> bool"""
7248 return _core
.Validator_IsSilent(*args
, **kwargs
)
7250 IsSilent
= staticmethod(IsSilent
)
7251 def SetBellOnError(*args
, **kwargs
):
7252 """SetBellOnError(int doIt=True)"""
7253 return _core
.Validator_SetBellOnError(*args
, **kwargs
)
7255 SetBellOnError
= staticmethod(SetBellOnError
)
7257 class ValidatorPtr(Validator
):
7258 def __init__(self
, this
):
7260 if not hasattr(self
,"thisown"): self
.thisown
= 0
7261 self
.__class
__ = Validator
7262 _core
.Validator_swigregister(ValidatorPtr
)
7264 def Validator_IsSilent(*args
, **kwargs
):
7265 """Validator_IsSilent() -> bool"""
7266 return _core
.Validator_IsSilent(*args
, **kwargs
)
7268 def Validator_SetBellOnError(*args
, **kwargs
):
7269 """Validator_SetBellOnError(int doIt=True)"""
7270 return _core
.Validator_SetBellOnError(*args
, **kwargs
)
7272 class PyValidator(Validator
):
7274 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7275 def __init__(self
, *args
, **kwargs
):
7276 """__init__() -> PyValidator"""
7277 newobj
= _core
.new_PyValidator(*args
, **kwargs
)
7278 self
.this
= newobj
.this
7282 self
._setCallbackInfo
(self
, PyValidator
, 1)
7283 self
._setOORInfo
(self
)
7285 def _setCallbackInfo(*args
, **kwargs
):
7286 """_setCallbackInfo(PyObject self, PyObject _class, int incref=True)"""
7287 return _core
.PyValidator__setCallbackInfo(*args
, **kwargs
)
7290 class PyValidatorPtr(PyValidator
):
7291 def __init__(self
, this
):
7293 if not hasattr(self
,"thisown"): self
.thisown
= 0
7294 self
.__class
__ = PyValidator
7295 _core
.PyValidator_swigregister(PyValidatorPtr
)
7297 #---------------------------------------------------------------------------
7299 class Menu(EvtHandler
):
7301 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7302 def __init__(self
, *args
, **kwargs
):
7303 """__init__(String title=EmptyString, long style=0) -> Menu"""
7304 newobj
= _core
.new_Menu(*args
, **kwargs
)
7305 self
.this
= newobj
.this
7308 self
._setOORInfo
(self
)
7310 def Append(*args
, **kwargs
):
7311 """Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7312 return _core
.Menu_Append(*args
, **kwargs
)
7314 def AppendSeparator(*args
, **kwargs
):
7315 """AppendSeparator() -> MenuItem"""
7316 return _core
.Menu_AppendSeparator(*args
, **kwargs
)
7318 def AppendCheckItem(*args
, **kwargs
):
7319 """AppendCheckItem(int id, String text, String help=EmptyString) -> MenuItem"""
7320 return _core
.Menu_AppendCheckItem(*args
, **kwargs
)
7322 def AppendRadioItem(*args
, **kwargs
):
7323 """AppendRadioItem(int id, String text, String help=EmptyString) -> MenuItem"""
7324 return _core
.Menu_AppendRadioItem(*args
, **kwargs
)
7326 def AppendMenu(*args
, **kwargs
):
7327 """AppendMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7328 return _core
.Menu_AppendMenu(*args
, **kwargs
)
7330 def AppendItem(*args
, **kwargs
):
7331 """AppendItem(MenuItem item) -> MenuItem"""
7332 return _core
.Menu_AppendItem(*args
, **kwargs
)
7334 def Break(*args
, **kwargs
):
7336 return _core
.Menu_Break(*args
, **kwargs
)
7338 def InsertItem(*args
, **kwargs
):
7339 """InsertItem(size_t pos, MenuItem item) -> MenuItem"""
7340 return _core
.Menu_InsertItem(*args
, **kwargs
)
7342 def Insert(*args
, **kwargs
):
7344 Insert(size_t pos, int id, String text, String help=EmptyString,
7345 int kind=ITEM_NORMAL) -> MenuItem
7347 return _core
.Menu_Insert(*args
, **kwargs
)
7349 def InsertSeparator(*args
, **kwargs
):
7350 """InsertSeparator(size_t pos) -> MenuItem"""
7351 return _core
.Menu_InsertSeparator(*args
, **kwargs
)
7353 def InsertCheckItem(*args
, **kwargs
):
7354 """InsertCheckItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
7355 return _core
.Menu_InsertCheckItem(*args
, **kwargs
)
7357 def InsertRadioItem(*args
, **kwargs
):
7358 """InsertRadioItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
7359 return _core
.Menu_InsertRadioItem(*args
, **kwargs
)
7361 def InsertMenu(*args
, **kwargs
):
7362 """InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7363 return _core
.Menu_InsertMenu(*args
, **kwargs
)
7365 def PrependItem(*args
, **kwargs
):
7366 """PrependItem(MenuItem item) -> MenuItem"""
7367 return _core
.Menu_PrependItem(*args
, **kwargs
)
7369 def Prepend(*args
, **kwargs
):
7370 """Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7371 return _core
.Menu_Prepend(*args
, **kwargs
)
7373 def PrependSeparator(*args
, **kwargs
):
7374 """PrependSeparator() -> MenuItem"""
7375 return _core
.Menu_PrependSeparator(*args
, **kwargs
)
7377 def PrependCheckItem(*args
, **kwargs
):
7378 """PrependCheckItem(int id, String text, String help=EmptyString) -> MenuItem"""
7379 return _core
.Menu_PrependCheckItem(*args
, **kwargs
)
7381 def PrependRadioItem(*args
, **kwargs
):
7382 """PrependRadioItem(int id, String text, String help=EmptyString) -> MenuItem"""
7383 return _core
.Menu_PrependRadioItem(*args
, **kwargs
)
7385 def PrependMenu(*args
, **kwargs
):
7386 """PrependMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7387 return _core
.Menu_PrependMenu(*args
, **kwargs
)
7389 def Remove(*args
, **kwargs
):
7390 """Remove(int id) -> MenuItem"""
7391 return _core
.Menu_Remove(*args
, **kwargs
)
7393 def RemoveItem(*args
, **kwargs
):
7394 """RemoveItem(MenuItem item) -> MenuItem"""
7395 return _core
.Menu_RemoveItem(*args
, **kwargs
)
7397 def Delete(*args
, **kwargs
):
7398 """Delete(int id) -> bool"""
7399 return _core
.Menu_Delete(*args
, **kwargs
)
7401 def DeleteItem(*args
, **kwargs
):
7402 """DeleteItem(MenuItem item) -> bool"""
7403 return _core
.Menu_DeleteItem(*args
, **kwargs
)
7405 def Destroy(*args
, **kwargs
):
7409 Deletes the C++ object this Python object is a proxy for.
7411 return _core
.Menu_Destroy(*args
, **kwargs
)
7413 def DestroyId(*args
, **kwargs
):
7415 DestroyId(int id) -> bool
7417 Deletes the C++ object this Python object is a proxy for.
7419 return _core
.Menu_DestroyId(*args
, **kwargs
)
7421 def DestroyItem(*args
, **kwargs
):
7423 DestroyItem(MenuItem item) -> bool
7425 Deletes the C++ object this Python object is a proxy for.
7427 return _core
.Menu_DestroyItem(*args
, **kwargs
)
7429 def GetMenuItemCount(*args
, **kwargs
):
7430 """GetMenuItemCount() -> size_t"""
7431 return _core
.Menu_GetMenuItemCount(*args
, **kwargs
)
7433 def GetMenuItems(*args
, **kwargs
):
7434 """GetMenuItems() -> PyObject"""
7435 return _core
.Menu_GetMenuItems(*args
, **kwargs
)
7437 def FindItem(*args
, **kwargs
):
7438 """FindItem(String item) -> int"""
7439 return _core
.Menu_FindItem(*args
, **kwargs
)
7441 def FindItemById(*args
, **kwargs
):
7442 """FindItemById(int id) -> MenuItem"""
7443 return _core
.Menu_FindItemById(*args
, **kwargs
)
7445 def FindItemByPosition(*args
, **kwargs
):
7446 """FindItemByPosition(size_t position) -> MenuItem"""
7447 return _core
.Menu_FindItemByPosition(*args
, **kwargs
)
7449 def Enable(*args
, **kwargs
):
7450 """Enable(int id, bool enable)"""
7451 return _core
.Menu_Enable(*args
, **kwargs
)
7453 def IsEnabled(*args
, **kwargs
):
7454 """IsEnabled(int id) -> bool"""
7455 return _core
.Menu_IsEnabled(*args
, **kwargs
)
7457 def Check(*args
, **kwargs
):
7458 """Check(int id, bool check)"""
7459 return _core
.Menu_Check(*args
, **kwargs
)
7461 def IsChecked(*args
, **kwargs
):
7462 """IsChecked(int id) -> bool"""
7463 return _core
.Menu_IsChecked(*args
, **kwargs
)
7465 def SetLabel(*args
, **kwargs
):
7466 """SetLabel(int id, String label)"""
7467 return _core
.Menu_SetLabel(*args
, **kwargs
)
7469 def GetLabel(*args
, **kwargs
):
7470 """GetLabel(int id) -> String"""
7471 return _core
.Menu_GetLabel(*args
, **kwargs
)
7473 def SetHelpString(*args
, **kwargs
):
7474 """SetHelpString(int id, String helpString)"""
7475 return _core
.Menu_SetHelpString(*args
, **kwargs
)
7477 def GetHelpString(*args
, **kwargs
):
7478 """GetHelpString(int id) -> String"""
7479 return _core
.Menu_GetHelpString(*args
, **kwargs
)
7481 def SetTitle(*args
, **kwargs
):
7482 """SetTitle(String title)"""
7483 return _core
.Menu_SetTitle(*args
, **kwargs
)
7485 def GetTitle(*args
, **kwargs
):
7486 """GetTitle() -> String"""
7487 return _core
.Menu_GetTitle(*args
, **kwargs
)
7489 def SetEventHandler(*args
, **kwargs
):
7490 """SetEventHandler(EvtHandler handler)"""
7491 return _core
.Menu_SetEventHandler(*args
, **kwargs
)
7493 def GetEventHandler(*args
, **kwargs
):
7494 """GetEventHandler() -> EvtHandler"""
7495 return _core
.Menu_GetEventHandler(*args
, **kwargs
)
7497 def SetInvokingWindow(*args
, **kwargs
):
7498 """SetInvokingWindow(Window win)"""
7499 return _core
.Menu_SetInvokingWindow(*args
, **kwargs
)
7501 def GetInvokingWindow(*args
, **kwargs
):
7502 """GetInvokingWindow() -> Window"""
7503 return _core
.Menu_GetInvokingWindow(*args
, **kwargs
)
7505 def GetStyle(*args
, **kwargs
):
7506 """GetStyle() -> long"""
7507 return _core
.Menu_GetStyle(*args
, **kwargs
)
7509 def UpdateUI(*args
, **kwargs
):
7510 """UpdateUI(EvtHandler source=None)"""
7511 return _core
.Menu_UpdateUI(*args
, **kwargs
)
7513 def GetMenuBar(*args
, **kwargs
):
7514 """GetMenuBar() -> MenuBar"""
7515 return _core
.Menu_GetMenuBar(*args
, **kwargs
)
7517 def Attach(*args
, **kwargs
):
7518 """Attach(wxMenuBarBase menubar)"""
7519 return _core
.Menu_Attach(*args
, **kwargs
)
7521 def Detach(*args
, **kwargs
):
7523 return _core
.Menu_Detach(*args
, **kwargs
)
7525 def IsAttached(*args
, **kwargs
):
7526 """IsAttached() -> bool"""
7527 return _core
.Menu_IsAttached(*args
, **kwargs
)
7529 def SetParent(*args
, **kwargs
):
7530 """SetParent(Menu parent)"""
7531 return _core
.Menu_SetParent(*args
, **kwargs
)
7533 def GetParent(*args
, **kwargs
):
7534 """GetParent() -> Menu"""
7535 return _core
.Menu_GetParent(*args
, **kwargs
)
7538 class MenuPtr(Menu
):
7539 def __init__(self
, this
):
7541 if not hasattr(self
,"thisown"): self
.thisown
= 0
7542 self
.__class
__ = Menu
7543 _core
.Menu_swigregister(MenuPtr
)
7544 DefaultValidator
= cvar
.DefaultValidator
7546 #---------------------------------------------------------------------------
7548 class MenuBar(Window
):
7550 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7551 def __init__(self
, *args
, **kwargs
):
7552 """__init__(long style=0) -> MenuBar"""
7553 newobj
= _core
.new_MenuBar(*args
, **kwargs
)
7554 self
.this
= newobj
.this
7557 self
._setOORInfo
(self
)
7559 def Append(*args
, **kwargs
):
7560 """Append(Menu menu, String title) -> bool"""
7561 return _core
.MenuBar_Append(*args
, **kwargs
)
7563 def Insert(*args
, **kwargs
):
7564 """Insert(size_t pos, Menu menu, String title) -> bool"""
7565 return _core
.MenuBar_Insert(*args
, **kwargs
)
7567 def GetMenuCount(*args
, **kwargs
):
7568 """GetMenuCount() -> size_t"""
7569 return _core
.MenuBar_GetMenuCount(*args
, **kwargs
)
7571 def GetMenu(*args
, **kwargs
):
7572 """GetMenu(size_t pos) -> Menu"""
7573 return _core
.MenuBar_GetMenu(*args
, **kwargs
)
7575 def Replace(*args
, **kwargs
):
7576 """Replace(size_t pos, Menu menu, String title) -> Menu"""
7577 return _core
.MenuBar_Replace(*args
, **kwargs
)
7579 def Remove(*args
, **kwargs
):
7580 """Remove(size_t pos) -> Menu"""
7581 return _core
.MenuBar_Remove(*args
, **kwargs
)
7583 def EnableTop(*args
, **kwargs
):
7584 """EnableTop(size_t pos, bool enable)"""
7585 return _core
.MenuBar_EnableTop(*args
, **kwargs
)
7587 def IsEnabledTop(*args
, **kwargs
):
7588 """IsEnabledTop(size_t pos) -> bool"""
7589 return _core
.MenuBar_IsEnabledTop(*args
, **kwargs
)
7591 def SetLabelTop(*args
, **kwargs
):
7592 """SetLabelTop(size_t pos, String label)"""
7593 return _core
.MenuBar_SetLabelTop(*args
, **kwargs
)
7595 def GetLabelTop(*args
, **kwargs
):
7596 """GetLabelTop(size_t pos) -> String"""
7597 return _core
.MenuBar_GetLabelTop(*args
, **kwargs
)
7599 def FindMenuItem(*args
, **kwargs
):
7600 """FindMenuItem(String menu, String item) -> int"""
7601 return _core
.MenuBar_FindMenuItem(*args
, **kwargs
)
7603 def FindItemById(*args
, **kwargs
):
7604 """FindItemById(int id) -> MenuItem"""
7605 return _core
.MenuBar_FindItemById(*args
, **kwargs
)
7607 def FindMenu(*args
, **kwargs
):
7608 """FindMenu(String title) -> int"""
7609 return _core
.MenuBar_FindMenu(*args
, **kwargs
)
7611 def Enable(*args
, **kwargs
):
7612 """Enable(int id, bool enable)"""
7613 return _core
.MenuBar_Enable(*args
, **kwargs
)
7615 def Check(*args
, **kwargs
):
7616 """Check(int id, bool check)"""
7617 return _core
.MenuBar_Check(*args
, **kwargs
)
7619 def IsChecked(*args
, **kwargs
):
7620 """IsChecked(int id) -> bool"""
7621 return _core
.MenuBar_IsChecked(*args
, **kwargs
)
7623 def IsEnabled(*args
, **kwargs
):
7624 """IsEnabled(int id) -> bool"""
7625 return _core
.MenuBar_IsEnabled(*args
, **kwargs
)
7627 def SetLabel(*args
, **kwargs
):
7628 """SetLabel(int id, String label)"""
7629 return _core
.MenuBar_SetLabel(*args
, **kwargs
)
7631 def GetLabel(*args
, **kwargs
):
7632 """GetLabel(int id) -> String"""
7633 return _core
.MenuBar_GetLabel(*args
, **kwargs
)
7635 def SetHelpString(*args
, **kwargs
):
7636 """SetHelpString(int id, String helpString)"""
7637 return _core
.MenuBar_SetHelpString(*args
, **kwargs
)
7639 def GetHelpString(*args
, **kwargs
):
7640 """GetHelpString(int id) -> String"""
7641 return _core
.MenuBar_GetHelpString(*args
, **kwargs
)
7643 def GetFrame(*args
, **kwargs
):
7644 """GetFrame() -> wxFrame"""
7645 return _core
.MenuBar_GetFrame(*args
, **kwargs
)
7647 def IsAttached(*args
, **kwargs
):
7648 """IsAttached() -> bool"""
7649 return _core
.MenuBar_IsAttached(*args
, **kwargs
)
7651 def Attach(*args
, **kwargs
):
7652 """Attach(wxFrame frame)"""
7653 return _core
.MenuBar_Attach(*args
, **kwargs
)
7655 def Detach(*args
, **kwargs
):
7657 return _core
.MenuBar_Detach(*args
, **kwargs
)
7660 class MenuBarPtr(MenuBar
):
7661 def __init__(self
, this
):
7663 if not hasattr(self
,"thisown"): self
.thisown
= 0
7664 self
.__class
__ = MenuBar
7665 _core
.MenuBar_swigregister(MenuBarPtr
)
7667 #---------------------------------------------------------------------------
7669 class MenuItem(Object
):
7671 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7672 def __init__(self
, *args
, **kwargs
):
7674 __init__(Menu parentMenu=None, int id=ID_SEPARATOR, String text=EmptyString,
7675 String help=EmptyString, int kind=ITEM_NORMAL,
7676 Menu subMenu=None) -> MenuItem
7678 newobj
= _core
.new_MenuItem(*args
, **kwargs
)
7679 self
.this
= newobj
.this
7682 def GetMenu(*args
, **kwargs
):
7683 """GetMenu() -> Menu"""
7684 return _core
.MenuItem_GetMenu(*args
, **kwargs
)
7686 def SetMenu(*args
, **kwargs
):
7687 """SetMenu(Menu menu)"""
7688 return _core
.MenuItem_SetMenu(*args
, **kwargs
)
7690 def SetId(*args
, **kwargs
):
7692 return _core
.MenuItem_SetId(*args
, **kwargs
)
7694 def GetId(*args
, **kwargs
):
7695 """GetId() -> int"""
7696 return _core
.MenuItem_GetId(*args
, **kwargs
)
7698 def IsSeparator(*args
, **kwargs
):
7699 """IsSeparator() -> bool"""
7700 return _core
.MenuItem_IsSeparator(*args
, **kwargs
)
7702 def SetText(*args
, **kwargs
):
7703 """SetText(String str)"""
7704 return _core
.MenuItem_SetText(*args
, **kwargs
)
7706 def GetLabel(*args
, **kwargs
):
7707 """GetLabel() -> String"""
7708 return _core
.MenuItem_GetLabel(*args
, **kwargs
)
7710 def GetText(*args
, **kwargs
):
7711 """GetText() -> String"""
7712 return _core
.MenuItem_GetText(*args
, **kwargs
)
7714 def GetLabelFromText(*args
, **kwargs
):
7715 """GetLabelFromText(String text) -> String"""
7716 return _core
.MenuItem_GetLabelFromText(*args
, **kwargs
)
7718 GetLabelFromText
= staticmethod(GetLabelFromText
)
7719 def GetKind(*args
, **kwargs
):
7720 """GetKind() -> int"""
7721 return _core
.MenuItem_GetKind(*args
, **kwargs
)
7723 def SetCheckable(*args
, **kwargs
):
7724 """SetCheckable(bool checkable)"""
7725 return _core
.MenuItem_SetCheckable(*args
, **kwargs
)
7727 def IsCheckable(*args
, **kwargs
):
7728 """IsCheckable() -> bool"""
7729 return _core
.MenuItem_IsCheckable(*args
, **kwargs
)
7731 def IsSubMenu(*args
, **kwargs
):
7732 """IsSubMenu() -> bool"""
7733 return _core
.MenuItem_IsSubMenu(*args
, **kwargs
)
7735 def SetSubMenu(*args
, **kwargs
):
7736 """SetSubMenu(Menu menu)"""
7737 return _core
.MenuItem_SetSubMenu(*args
, **kwargs
)
7739 def GetSubMenu(*args
, **kwargs
):
7740 """GetSubMenu() -> Menu"""
7741 return _core
.MenuItem_GetSubMenu(*args
, **kwargs
)
7743 def Enable(*args
, **kwargs
):
7744 """Enable(bool enable=True)"""
7745 return _core
.MenuItem_Enable(*args
, **kwargs
)
7747 def IsEnabled(*args
, **kwargs
):
7748 """IsEnabled() -> bool"""
7749 return _core
.MenuItem_IsEnabled(*args
, **kwargs
)
7751 def Check(*args
, **kwargs
):
7752 """Check(bool check=True)"""
7753 return _core
.MenuItem_Check(*args
, **kwargs
)
7755 def IsChecked(*args
, **kwargs
):
7756 """IsChecked() -> bool"""
7757 return _core
.MenuItem_IsChecked(*args
, **kwargs
)
7759 def Toggle(*args
, **kwargs
):
7761 return _core
.MenuItem_Toggle(*args
, **kwargs
)
7763 def SetHelp(*args
, **kwargs
):
7764 """SetHelp(String str)"""
7765 return _core
.MenuItem_SetHelp(*args
, **kwargs
)
7767 def GetHelp(*args
, **kwargs
):
7768 """GetHelp() -> String"""
7769 return _core
.MenuItem_GetHelp(*args
, **kwargs
)
7771 def GetAccel(*args
, **kwargs
):
7772 """GetAccel() -> AcceleratorEntry"""
7773 return _core
.MenuItem_GetAccel(*args
, **kwargs
)
7775 def SetAccel(*args
, **kwargs
):
7776 """SetAccel(AcceleratorEntry accel)"""
7777 return _core
.MenuItem_SetAccel(*args
, **kwargs
)
7779 def SetFont(*args
, **kwargs
):
7780 """SetFont(Font font)"""
7781 return _core
.MenuItem_SetFont(*args
, **kwargs
)
7783 def GetFont(*args
, **kwargs
):
7784 """GetFont() -> Font"""
7785 return _core
.MenuItem_GetFont(*args
, **kwargs
)
7787 def SetTextColour(*args
, **kwargs
):
7788 """SetTextColour(Colour colText)"""
7789 return _core
.MenuItem_SetTextColour(*args
, **kwargs
)
7791 def GetTextColour(*args
, **kwargs
):
7792 """GetTextColour() -> Colour"""
7793 return _core
.MenuItem_GetTextColour(*args
, **kwargs
)
7795 def SetBackgroundColour(*args
, **kwargs
):
7796 """SetBackgroundColour(Colour colBack)"""
7797 return _core
.MenuItem_SetBackgroundColour(*args
, **kwargs
)
7799 def GetBackgroundColour(*args
, **kwargs
):
7800 """GetBackgroundColour() -> Colour"""
7801 return _core
.MenuItem_GetBackgroundColour(*args
, **kwargs
)
7803 def SetBitmaps(*args
, **kwargs
):
7804 """SetBitmaps(Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
7805 return _core
.MenuItem_SetBitmaps(*args
, **kwargs
)
7807 def SetDisabledBitmap(*args
, **kwargs
):
7808 """SetDisabledBitmap(Bitmap bmpDisabled)"""
7809 return _core
.MenuItem_SetDisabledBitmap(*args
, **kwargs
)
7811 def GetDisabledBitmap(*args
, **kwargs
):
7812 """GetDisabledBitmap() -> Bitmap"""
7813 return _core
.MenuItem_GetDisabledBitmap(*args
, **kwargs
)
7815 def SetMarginWidth(*args
, **kwargs
):
7816 """SetMarginWidth(int nWidth)"""
7817 return _core
.MenuItem_SetMarginWidth(*args
, **kwargs
)
7819 def GetMarginWidth(*args
, **kwargs
):
7820 """GetMarginWidth() -> int"""
7821 return _core
.MenuItem_GetMarginWidth(*args
, **kwargs
)
7823 def GetDefaultMarginWidth(*args
, **kwargs
):
7824 """GetDefaultMarginWidth() -> int"""
7825 return _core
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
7827 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
7828 def IsOwnerDrawn(*args
, **kwargs
):
7829 """IsOwnerDrawn() -> bool"""
7830 return _core
.MenuItem_IsOwnerDrawn(*args
, **kwargs
)
7832 def SetOwnerDrawn(*args
, **kwargs
):
7833 """SetOwnerDrawn(bool ownerDrawn=True)"""
7834 return _core
.MenuItem_SetOwnerDrawn(*args
, **kwargs
)
7836 def ResetOwnerDrawn(*args
, **kwargs
):
7837 """ResetOwnerDrawn()"""
7838 return _core
.MenuItem_ResetOwnerDrawn(*args
, **kwargs
)
7840 def SetBitmap(*args
, **kwargs
):
7841 """SetBitmap(Bitmap bitmap)"""
7842 return _core
.MenuItem_SetBitmap(*args
, **kwargs
)
7844 def GetBitmap(*args
, **kwargs
):
7845 """GetBitmap() -> Bitmap"""
7846 return _core
.MenuItem_GetBitmap(*args
, **kwargs
)
7849 class MenuItemPtr(MenuItem
):
7850 def __init__(self
, this
):
7852 if not hasattr(self
,"thisown"): self
.thisown
= 0
7853 self
.__class
__ = MenuItem
7854 _core
.MenuItem_swigregister(MenuItemPtr
)
7856 def MenuItem_GetLabelFromText(*args
, **kwargs
):
7857 """MenuItem_GetLabelFromText(String text) -> String"""
7858 return _core
.MenuItem_GetLabelFromText(*args
, **kwargs
)
7860 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
7861 """MenuItem_GetDefaultMarginWidth() -> int"""
7862 return _core
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
7864 #---------------------------------------------------------------------------
7866 class Control(Window
):
7868 This is the base class for a control or 'widget'.
7870 A control is generally a small window which processes user input and/or
7871 displays one or more item of data.
7874 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7875 def __init__(self
, *args
, **kwargs
):
7877 __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
7878 long style=0, Validator validator=DefaultValidator,
7879 String name=ControlNameStr) -> Control
7881 Create a Control. Normally you should only call this from a
7882 subclass' __init__ as a plain old wx.Control is not very useful.
7884 newobj
= _core
.new_Control(*args
, **kwargs
)
7885 self
.this
= newobj
.this
7888 self
._setOORInfo
(self
)
7890 def Create(*args
, **kwargs
):
7892 Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
7893 long style=0, Validator validator=DefaultValidator,
7894 String name=ControlNameStr) -> bool
7896 Do the 2nd phase and create the GUI control.
7898 return _core
.Control_Create(*args
, **kwargs
)
7900 def Command(*args
, **kwargs
):
7902 Command(CommandEvent event)
7904 Simulates the effect of the user issuing a command to the
7905 item. See wxCommandEvent.
7907 return _core
.Control_Command(*args
, **kwargs
)
7909 def GetLabel(*args
, **kwargs
):
7911 GetLabel() -> String
7913 Return a control's text.
7915 return _core
.Control_GetLabel(*args
, **kwargs
)
7917 def SetLabel(*args
, **kwargs
):
7919 SetLabel(String label)
7921 Sets the item's text.
7923 return _core
.Control_SetLabel(*args
, **kwargs
)
7926 class ControlPtr(Control
):
7927 def __init__(self
, this
):
7929 if not hasattr(self
,"thisown"): self
.thisown
= 0
7930 self
.__class
__ = Control
7931 _core
.Control_swigregister(ControlPtr
)
7932 ControlNameStr
= cvar
.ControlNameStr
7934 def PreControl(*args
, **kwargs
):
7936 PreControl() -> Control
7938 Precreate a Control control for 2-phase creation
7940 val
= _core
.new_PreControl(*args
, **kwargs
)
7944 #---------------------------------------------------------------------------
7946 class ItemContainer(object):
7948 wx.ItemContainer defines an interface which is implemented by all
7949 controls which have string subitems, each of which may be
7950 selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and
7951 wx.ComboBox (which implements an extended interface deriving from
7954 It defines the methods for accessing the control's items and
7955 although each of the derived classes implements them differently,
7956 they still all conform to the same interface.
7958 The items in a wx.ItemContainer have (non empty) string labels
7959 and, optionally, client data associated with them.
7962 def __init__(self
): raise RuntimeError, "No constructor defined"
7964 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7965 def Append(*args
, **kwargs
):
7967 Append(String item, PyObject clientData=None) -> int
7969 Adds the item to the control, associating the given data with the
7970 item if not None. The return value is the index of the newly
7971 added item which may be different from the last one if the
7972 control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style).
7974 return _core
.ItemContainer_Append(*args
, **kwargs
)
7976 def AppendItems(*args
, **kwargs
):
7978 AppendItems(wxArrayString strings)
7980 Apend several items at once to the control. Notice that calling
7981 this method may be much faster than appending the items one by
7982 one if you need to add a lot of items.
7984 return _core
.ItemContainer_AppendItems(*args
, **kwargs
)
7986 def Insert(*args
, **kwargs
):
7988 Insert(String item, int pos, PyObject clientData=None) -> int
7990 Insert an item into the control before the item at the pos index,
7991 optionally associating some data object with the item.
7993 return _core
.ItemContainer_Insert(*args
, **kwargs
)
7995 def Clear(*args
, **kwargs
):
7999 Removes all items from the control.
8001 return _core
.ItemContainer_Clear(*args
, **kwargs
)
8003 def Delete(*args
, **kwargs
):
8007 Deletes the item at the zero-based index 'n' from the control.
8008 Note that it is an error (signalled by a PyAssertionError
8009 exception if enabled) to remove an item with the index negative
8010 or greater or equal than the number of items in the control.
8012 return _core
.ItemContainer_Delete(*args
, **kwargs
)
8014 def GetCount(*args
, **kwargs
):
8018 Returns the number of items in the control.
8020 return _core
.ItemContainer_GetCount(*args
, **kwargs
)
8022 def IsEmpty(*args
, **kwargs
):
8026 Returns True if the control is empty or False if it has some items.
8028 return _core
.ItemContainer_IsEmpty(*args
, **kwargs
)
8030 def GetString(*args
, **kwargs
):
8032 GetString(int n) -> String
8034 Returns the label of the item with the given index.
8036 return _core
.ItemContainer_GetString(*args
, **kwargs
)
8038 def GetStrings(*args
, **kwargs
):
8039 """GetStrings() -> wxArrayString"""
8040 return _core
.ItemContainer_GetStrings(*args
, **kwargs
)
8042 def SetString(*args
, **kwargs
):
8044 SetString(int n, String s)
8046 Sets the label for the given item.
8048 return _core
.ItemContainer_SetString(*args
, **kwargs
)
8050 def FindString(*args
, **kwargs
):
8052 FindString(String s) -> int
8054 Finds an item whose label matches the given string. Returns the
8055 zero-based position of the item, or wx.NOT_FOUND if the string
8058 return _core
.ItemContainer_FindString(*args
, **kwargs
)
8060 def Select(*args
, **kwargs
):
8064 Sets the item at index 'n' to be the selected item.
8066 return _core
.ItemContainer_Select(*args
, **kwargs
)
8068 SetSelection
= Select
8069 def GetSelection(*args
, **kwargs
):
8071 GetSelection() -> int
8073 Returns the index of the selected item or wx.NOT_FOUND if no item is selected.
8075 return _core
.ItemContainer_GetSelection(*args
, **kwargs
)
8077 def GetStringSelection(*args
, **kwargs
):
8079 GetStringSelection() -> String
8081 Returns the label of the selected item or an empty string if no item is selected.
8083 return _core
.ItemContainer_GetStringSelection(*args
, **kwargs
)
8085 def GetClientData(*args
, **kwargs
):
8087 GetClientData(int n) -> PyObject
8089 Returns the client data associated with the given item, (if any.)
8091 return _core
.ItemContainer_GetClientData(*args
, **kwargs
)
8093 def SetClientData(*args
, **kwargs
):
8095 SetClientData(int n, PyObject clientData)
8097 Associate the given client data with the item at position n.
8099 return _core
.ItemContainer_SetClientData(*args
, **kwargs
)
8102 class ItemContainerPtr(ItemContainer
):
8103 def __init__(self
, this
):
8105 if not hasattr(self
,"thisown"): self
.thisown
= 0
8106 self
.__class
__ = ItemContainer
8107 _core
.ItemContainer_swigregister(ItemContainerPtr
)
8109 #---------------------------------------------------------------------------
8111 class ControlWithItems(Control
,ItemContainer
):
8113 wx.ControlWithItems combines the wx.ItemContainer class with the
8114 wx.Control class, and is used for the base class of various
8115 controls that have items.
8117 def __init__(self
): raise RuntimeError, "No constructor defined"
8119 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8121 class ControlWithItemsPtr(ControlWithItems
):
8122 def __init__(self
, this
):
8124 if not hasattr(self
,"thisown"): self
.thisown
= 0
8125 self
.__class
__ = ControlWithItems
8126 _core
.ControlWithItems_swigregister(ControlWithItemsPtr
)
8128 #---------------------------------------------------------------------------
8130 class SizerItem(Object
):
8132 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8133 def __init__(self
, *args
, **kwargs
):
8134 """__init__() -> SizerItem"""
8135 newobj
= _core
.new_SizerItem(*args
, **kwargs
)
8136 self
.this
= newobj
.this
8139 def DeleteWindows(*args
, **kwargs
):
8140 """DeleteWindows()"""
8141 return _core
.SizerItem_DeleteWindows(*args
, **kwargs
)
8143 def DetachSizer(*args
, **kwargs
):
8145 return _core
.SizerItem_DetachSizer(*args
, **kwargs
)
8147 def GetSize(*args
, **kwargs
):
8148 """GetSize() -> Size"""
8149 return _core
.SizerItem_GetSize(*args
, **kwargs
)
8151 def CalcMin(*args
, **kwargs
):
8152 """CalcMin() -> Size"""
8153 return _core
.SizerItem_CalcMin(*args
, **kwargs
)
8155 def SetDimension(*args
, **kwargs
):
8156 """SetDimension(Point pos, Size size)"""
8157 return _core
.SizerItem_SetDimension(*args
, **kwargs
)
8159 def GetMinSize(*args
, **kwargs
):
8160 """GetMinSize() -> Size"""
8161 return _core
.SizerItem_GetMinSize(*args
, **kwargs
)
8163 def SetInitSize(*args
, **kwargs
):
8164 """SetInitSize(int x, int y)"""
8165 return _core
.SizerItem_SetInitSize(*args
, **kwargs
)
8167 def SetRatioWH(*args
, **kwargs
):
8168 """SetRatioWH(int width, int height)"""
8169 return _core
.SizerItem_SetRatioWH(*args
, **kwargs
)
8171 def SetRatioSize(*args
, **kwargs
):
8172 """SetRatioSize(Size size)"""
8173 return _core
.SizerItem_SetRatioSize(*args
, **kwargs
)
8175 def SetRatio(*args
, **kwargs
):
8176 """SetRatio(float ratio)"""
8177 return _core
.SizerItem_SetRatio(*args
, **kwargs
)
8179 def GetRatio(*args
, **kwargs
):
8180 """GetRatio() -> float"""
8181 return _core
.SizerItem_GetRatio(*args
, **kwargs
)
8183 def IsWindow(*args
, **kwargs
):
8184 """IsWindow() -> bool"""
8185 return _core
.SizerItem_IsWindow(*args
, **kwargs
)
8187 def IsSizer(*args
, **kwargs
):
8188 """IsSizer() -> bool"""
8189 return _core
.SizerItem_IsSizer(*args
, **kwargs
)
8191 def IsSpacer(*args
, **kwargs
):
8192 """IsSpacer() -> bool"""
8193 return _core
.SizerItem_IsSpacer(*args
, **kwargs
)
8195 def SetProportion(*args
, **kwargs
):
8196 """SetProportion(int proportion)"""
8197 return _core
.SizerItem_SetProportion(*args
, **kwargs
)
8199 def GetProportion(*args
, **kwargs
):
8200 """GetProportion() -> int"""
8201 return _core
.SizerItem_GetProportion(*args
, **kwargs
)
8203 def SetFlag(*args
, **kwargs
):
8204 """SetFlag(int flag)"""
8205 return _core
.SizerItem_SetFlag(*args
, **kwargs
)
8207 def GetFlag(*args
, **kwargs
):
8208 """GetFlag() -> int"""
8209 return _core
.SizerItem_GetFlag(*args
, **kwargs
)
8211 def SetBorder(*args
, **kwargs
):
8212 """SetBorder(int border)"""
8213 return _core
.SizerItem_SetBorder(*args
, **kwargs
)
8215 def GetBorder(*args
, **kwargs
):
8216 """GetBorder() -> int"""
8217 return _core
.SizerItem_GetBorder(*args
, **kwargs
)
8219 def GetWindow(*args
, **kwargs
):
8220 """GetWindow() -> Window"""
8221 return _core
.SizerItem_GetWindow(*args
, **kwargs
)
8223 def SetWindow(*args
, **kwargs
):
8224 """SetWindow(Window window)"""
8225 return _core
.SizerItem_SetWindow(*args
, **kwargs
)
8227 def GetSizer(*args
, **kwargs
):
8228 """GetSizer() -> Sizer"""
8229 return _core
.SizerItem_GetSizer(*args
, **kwargs
)
8231 def SetSizer(*args
, **kwargs
):
8232 """SetSizer(Sizer sizer)"""
8233 return _core
.SizerItem_SetSizer(*args
, **kwargs
)
8235 def GetSpacer(*args
, **kwargs
):
8236 """GetSpacer() -> Size"""
8237 return _core
.SizerItem_GetSpacer(*args
, **kwargs
)
8239 def SetSpacer(*args
, **kwargs
):
8240 """SetSpacer(Size size)"""
8241 return _core
.SizerItem_SetSpacer(*args
, **kwargs
)
8243 def Show(*args
, **kwargs
):
8244 """Show(bool show)"""
8245 return _core
.SizerItem_Show(*args
, **kwargs
)
8247 def IsShown(*args
, **kwargs
):
8248 """IsShown() -> bool"""
8249 return _core
.SizerItem_IsShown(*args
, **kwargs
)
8251 def GetPosition(*args
, **kwargs
):
8252 """GetPosition() -> Point"""
8253 return _core
.SizerItem_GetPosition(*args
, **kwargs
)
8255 def GetUserData(*args
, **kwargs
):
8256 """GetUserData() -> PyObject"""
8257 return _core
.SizerItem_GetUserData(*args
, **kwargs
)
8260 class SizerItemPtr(SizerItem
):
8261 def __init__(self
, this
):
8263 if not hasattr(self
,"thisown"): self
.thisown
= 0
8264 self
.__class
__ = SizerItem
8265 _core
.SizerItem_swigregister(SizerItemPtr
)
8267 def SizerItemSpacer(*args
, **kwargs
):
8269 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
8270 Object userData) -> SizerItem
8272 val
= _core
.new_SizerItemSpacer(*args
, **kwargs
)
8276 def SizerItemWindow(*args
, **kwargs
):
8278 SizerItemWindow(Window window, int proportion, int flag, int border,
8279 Object userData) -> SizerItem
8281 val
= _core
.new_SizerItemWindow(*args
, **kwargs
)
8285 def SizerItemSizer(*args
, **kwargs
):
8287 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
8288 Object userData) -> SizerItem
8290 val
= _core
.new_SizerItemSizer(*args
, **kwargs
)
8294 class Sizer(Object
):
8295 def __init__(self
): raise RuntimeError, "No constructor defined"
8297 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8298 def _setOORInfo(*args
, **kwargs
):
8299 """_setOORInfo(PyObject _self)"""
8300 return _core
.Sizer__setOORInfo(*args
, **kwargs
)
8302 def Add(*args
, **kwargs
):
8304 Add(PyObject item, int proportion=0, int flag=0, int border=0,
8305 PyObject userData=None)
8307 return _core
.Sizer_Add(*args
, **kwargs
)
8309 def Insert(*args
, **kwargs
):
8311 Insert(int before, PyObject item, int proportion=0, int flag=0,
8312 int border=0, PyObject userData=None)
8314 return _core
.Sizer_Insert(*args
, **kwargs
)
8316 def Prepend(*args
, **kwargs
):
8318 Prepend(PyObject item, int proportion=0, int flag=0, int border=0,
8319 PyObject userData=None)
8321 return _core
.Sizer_Prepend(*args
, **kwargs
)
8323 def Remove(*args
, **kwargs
):
8324 """Remove(PyObject item) -> bool"""
8325 return _core
.Sizer_Remove(*args
, **kwargs
)
8327 def _SetItemMinSize(*args
, **kwargs
):
8328 """_SetItemMinSize(PyObject item, Size size)"""
8329 return _core
.Sizer__SetItemMinSize(*args
, **kwargs
)
8331 def AddItem(*args
, **kwargs
):
8332 """AddItem(SizerItem item)"""
8333 return _core
.Sizer_AddItem(*args
, **kwargs
)
8335 def InsertItem(*args
, **kwargs
):
8336 """InsertItem(size_t index, SizerItem item)"""
8337 return _core
.Sizer_InsertItem(*args
, **kwargs
)
8339 def PrependItem(*args
, **kwargs
):
8340 """PrependItem(SizerItem item)"""
8341 return _core
.Sizer_PrependItem(*args
, **kwargs
)
8343 def AddMany(self
, widgets
):
8344 for childinfo
in widgets
:
8345 if type(childinfo
) != type(()) or (len(childinfo
) == 2 and type(childinfo
[0]) == type(1)):
8346 childinfo
= (childinfo
, )
8347 self
.Add(*childinfo
)
8349 # for backwards compatibility only, please do not use in new code
8350 AddWindow
= AddSizer
= AddSpacer
= Add
8351 PrependWindow
= PrependSizer
= PrependSpacer
= Prepend
8352 InsertWindow
= InsertSizer
= InsertSpacer
= Insert
8353 RemoveWindow
= RemoveSizer
= RemovePos
= Remove
8356 def SetItemMinSize(self
, item
, *args
):
8358 return self
._SetItemMinSize
(item
, args
)
8360 return self
._SetItemMinSize
(item
, args
[0])
8362 def SetDimension(*args
, **kwargs
):
8363 """SetDimension(int x, int y, int width, int height)"""
8364 return _core
.Sizer_SetDimension(*args
, **kwargs
)
8366 def SetMinSize(*args
, **kwargs
):
8367 """SetMinSize(Size size)"""
8368 return _core
.Sizer_SetMinSize(*args
, **kwargs
)
8370 def GetSize(*args
, **kwargs
):
8371 """GetSize() -> Size"""
8372 return _core
.Sizer_GetSize(*args
, **kwargs
)
8374 def GetPosition(*args
, **kwargs
):
8375 """GetPosition() -> Point"""
8376 return _core
.Sizer_GetPosition(*args
, **kwargs
)
8378 def GetMinSize(*args
, **kwargs
):
8379 """GetMinSize() -> Size"""
8380 return _core
.Sizer_GetMinSize(*args
, **kwargs
)
8382 def GetSizeTuple(self
):
8383 return self
.GetSize().asTuple()
8384 def GetPositionTuple(self
):
8385 return self
.GetPosition().asTuple()
8386 def GetMinSizeTuple(self
):
8387 return self
.GetMinSize().asTuple()
8389 def RecalcSizes(*args
, **kwargs
):
8391 return _core
.Sizer_RecalcSizes(*args
, **kwargs
)
8393 def CalcMin(*args
, **kwargs
):
8394 """CalcMin() -> Size"""
8395 return _core
.Sizer_CalcMin(*args
, **kwargs
)
8397 def Layout(*args
, **kwargs
):
8399 return _core
.Sizer_Layout(*args
, **kwargs
)
8401 def Fit(*args
, **kwargs
):
8402 """Fit(Window window) -> Size"""
8403 return _core
.Sizer_Fit(*args
, **kwargs
)
8405 def FitInside(*args
, **kwargs
):
8406 """FitInside(Window window)"""
8407 return _core
.Sizer_FitInside(*args
, **kwargs
)
8409 def SetSizeHints(*args
, **kwargs
):
8410 """SetSizeHints(Window window)"""
8411 return _core
.Sizer_SetSizeHints(*args
, **kwargs
)
8413 def SetVirtualSizeHints(*args
, **kwargs
):
8414 """SetVirtualSizeHints(Window window)"""
8415 return _core
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
8417 def Clear(*args
, **kwargs
):
8418 """Clear(bool delete_windows=False)"""
8419 return _core
.Sizer_Clear(*args
, **kwargs
)
8421 def DeleteWindows(*args
, **kwargs
):
8422 """DeleteWindows()"""
8423 return _core
.Sizer_DeleteWindows(*args
, **kwargs
)
8425 def GetChildren(*args
, **kwargs
):
8426 """GetChildren() -> PyObject"""
8427 return _core
.Sizer_GetChildren(*args
, **kwargs
)
8429 def Show(*args
, **kwargs
):
8430 """Show(PyObject item, bool show=True)"""
8431 return _core
.Sizer_Show(*args
, **kwargs
)
8433 def Hide(*args
, **kwargs
):
8434 """Hide(PyObject item)"""
8435 return _core
.Sizer_Hide(*args
, **kwargs
)
8437 def IsShown(*args
, **kwargs
):
8438 """IsShown(PyObject item) -> bool"""
8439 return _core
.Sizer_IsShown(*args
, **kwargs
)
8441 def ShowItems(*args
, **kwargs
):
8442 """ShowItems(bool show)"""
8443 return _core
.Sizer_ShowItems(*args
, **kwargs
)
8446 class SizerPtr(Sizer
):
8447 def __init__(self
, this
):
8449 if not hasattr(self
,"thisown"): self
.thisown
= 0
8450 self
.__class
__ = Sizer
8451 _core
.Sizer_swigregister(SizerPtr
)
8453 class PySizer(Sizer
):
8455 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8456 def __init__(self
, *args
, **kwargs
):
8457 """__init__() -> PySizer"""
8458 newobj
= _core
.new_PySizer(*args
, **kwargs
)
8459 self
.this
= newobj
.this
8462 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
8464 def _setCallbackInfo(*args
, **kwargs
):
8465 """_setCallbackInfo(PyObject self, PyObject _class)"""
8466 return _core
.PySizer__setCallbackInfo(*args
, **kwargs
)
8469 class PySizerPtr(PySizer
):
8470 def __init__(self
, this
):
8472 if not hasattr(self
,"thisown"): self
.thisown
= 0
8473 self
.__class
__ = PySizer
8474 _core
.PySizer_swigregister(PySizerPtr
)
8476 #---------------------------------------------------------------------------
8478 class BoxSizer(Sizer
):
8480 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8481 def __init__(self
, *args
, **kwargs
):
8482 """__init__(int orient=HORIZONTAL) -> BoxSizer"""
8483 newobj
= _core
.new_BoxSizer(*args
, **kwargs
)
8484 self
.this
= newobj
.this
8487 self
._setOORInfo
(self
)
8489 def GetOrientation(*args
, **kwargs
):
8490 """GetOrientation() -> int"""
8491 return _core
.BoxSizer_GetOrientation(*args
, **kwargs
)
8493 def SetOrientation(*args
, **kwargs
):
8494 """SetOrientation(int orient)"""
8495 return _core
.BoxSizer_SetOrientation(*args
, **kwargs
)
8497 def RecalcSizes(*args
, **kwargs
):
8499 return _core
.BoxSizer_RecalcSizes(*args
, **kwargs
)
8501 def CalcMin(*args
, **kwargs
):
8502 """CalcMin() -> Size"""
8503 return _core
.BoxSizer_CalcMin(*args
, **kwargs
)
8506 class BoxSizerPtr(BoxSizer
):
8507 def __init__(self
, this
):
8509 if not hasattr(self
,"thisown"): self
.thisown
= 0
8510 self
.__class
__ = BoxSizer
8511 _core
.BoxSizer_swigregister(BoxSizerPtr
)
8513 #---------------------------------------------------------------------------
8515 class StaticBoxSizer(BoxSizer
):
8517 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8518 def __init__(self
, *args
, **kwargs
):
8519 """__init__(wxStaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer"""
8520 newobj
= _core
.new_StaticBoxSizer(*args
, **kwargs
)
8521 self
.this
= newobj
.this
8524 self
._setOORInfo
(self
)
8526 def GetStaticBox(*args
, **kwargs
):
8527 """GetStaticBox() -> wxStaticBox"""
8528 return _core
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
8530 def RecalcSizes(*args
, **kwargs
):
8532 return _core
.StaticBoxSizer_RecalcSizes(*args
, **kwargs
)
8534 def CalcMin(*args
, **kwargs
):
8535 """CalcMin() -> Size"""
8536 return _core
.StaticBoxSizer_CalcMin(*args
, **kwargs
)
8539 class StaticBoxSizerPtr(StaticBoxSizer
):
8540 def __init__(self
, this
):
8542 if not hasattr(self
,"thisown"): self
.thisown
= 0
8543 self
.__class
__ = StaticBoxSizer
8544 _core
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
8546 #---------------------------------------------------------------------------
8548 class GridSizer(Sizer
):
8550 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8551 def __init__(self
, *args
, **kwargs
):
8552 """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer"""
8553 newobj
= _core
.new_GridSizer(*args
, **kwargs
)
8554 self
.this
= newobj
.this
8557 self
._setOORInfo
(self
)
8559 def RecalcSizes(*args
, **kwargs
):
8561 return _core
.GridSizer_RecalcSizes(*args
, **kwargs
)
8563 def CalcMin(*args
, **kwargs
):
8564 """CalcMin() -> Size"""
8565 return _core
.GridSizer_CalcMin(*args
, **kwargs
)
8567 def SetCols(*args
, **kwargs
):
8568 """SetCols(int cols)"""
8569 return _core
.GridSizer_SetCols(*args
, **kwargs
)
8571 def SetRows(*args
, **kwargs
):
8572 """SetRows(int rows)"""
8573 return _core
.GridSizer_SetRows(*args
, **kwargs
)
8575 def SetVGap(*args
, **kwargs
):
8576 """SetVGap(int gap)"""
8577 return _core
.GridSizer_SetVGap(*args
, **kwargs
)
8579 def SetHGap(*args
, **kwargs
):
8580 """SetHGap(int gap)"""
8581 return _core
.GridSizer_SetHGap(*args
, **kwargs
)
8583 def GetCols(*args
, **kwargs
):
8584 """GetCols() -> int"""
8585 return _core
.GridSizer_GetCols(*args
, **kwargs
)
8587 def GetRows(*args
, **kwargs
):
8588 """GetRows() -> int"""
8589 return _core
.GridSizer_GetRows(*args
, **kwargs
)
8591 def GetVGap(*args
, **kwargs
):
8592 """GetVGap() -> int"""
8593 return _core
.GridSizer_GetVGap(*args
, **kwargs
)
8595 def GetHGap(*args
, **kwargs
):
8596 """GetHGap() -> int"""
8597 return _core
.GridSizer_GetHGap(*args
, **kwargs
)
8600 class GridSizerPtr(GridSizer
):
8601 def __init__(self
, this
):
8603 if not hasattr(self
,"thisown"): self
.thisown
= 0
8604 self
.__class
__ = GridSizer
8605 _core
.GridSizer_swigregister(GridSizerPtr
)
8607 #---------------------------------------------------------------------------
8609 FLEX_GROWMODE_NONE
= _core
.FLEX_GROWMODE_NONE
8610 FLEX_GROWMODE_SPECIFIED
= _core
.FLEX_GROWMODE_SPECIFIED
8611 FLEX_GROWMODE_ALL
= _core
.FLEX_GROWMODE_ALL
8612 class FlexGridSizer(GridSizer
):
8614 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8615 def __init__(self
, *args
, **kwargs
):
8616 """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer"""
8617 newobj
= _core
.new_FlexGridSizer(*args
, **kwargs
)
8618 self
.this
= newobj
.this
8621 self
._setOORInfo
(self
)
8623 def RecalcSizes(*args
, **kwargs
):
8625 return _core
.FlexGridSizer_RecalcSizes(*args
, **kwargs
)
8627 def CalcMin(*args
, **kwargs
):
8628 """CalcMin() -> Size"""
8629 return _core
.FlexGridSizer_CalcMin(*args
, **kwargs
)
8631 def AddGrowableRow(*args
, **kwargs
):
8632 """AddGrowableRow(size_t idx, int proportion=0)"""
8633 return _core
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
8635 def RemoveGrowableRow(*args
, **kwargs
):
8636 """RemoveGrowableRow(size_t idx)"""
8637 return _core
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
8639 def AddGrowableCol(*args
, **kwargs
):
8640 """AddGrowableCol(size_t idx, int proportion=0)"""
8641 return _core
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
8643 def RemoveGrowableCol(*args
, **kwargs
):
8644 """RemoveGrowableCol(size_t idx)"""
8645 return _core
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
8647 def SetFlexibleDirection(*args
, **kwargs
):
8648 """SetFlexibleDirection(int direction)"""
8649 return _core
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
8651 def GetFlexibleDirection(*args
, **kwargs
):
8652 """GetFlexibleDirection() -> int"""
8653 return _core
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
8655 def SetNonFlexibleGrowMode(*args
, **kwargs
):
8656 """SetNonFlexibleGrowMode(int mode)"""
8657 return _core
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
8659 def GetNonFlexibleGrowMode(*args
, **kwargs
):
8660 """GetNonFlexibleGrowMode() -> int"""
8661 return _core
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
8663 def GetRowHeights(*args
, **kwargs
):
8664 """GetRowHeights() -> wxArrayInt"""
8665 return _core
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
8667 def GetColWidths(*args
, **kwargs
):
8668 """GetColWidths() -> wxArrayInt"""
8669 return _core
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
8672 class FlexGridSizerPtr(FlexGridSizer
):
8673 def __init__(self
, this
):
8675 if not hasattr(self
,"thisown"): self
.thisown
= 0
8676 self
.__class
__ = FlexGridSizer
8677 _core
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
8679 #---------------------------------------------------------------------------
8681 class GBPosition(object):
8683 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8684 def __init__(self
, *args
, **kwargs
):
8685 """__init__(int row=0, int col=0) -> GBPosition"""
8686 newobj
= _core
.new_GBPosition(*args
, **kwargs
)
8687 self
.this
= newobj
.this
8690 def GetRow(*args
, **kwargs
):
8691 """GetRow() -> int"""
8692 return _core
.GBPosition_GetRow(*args
, **kwargs
)
8694 def GetCol(*args
, **kwargs
):
8695 """GetCol() -> int"""
8696 return _core
.GBPosition_GetCol(*args
, **kwargs
)
8698 def SetRow(*args
, **kwargs
):
8699 """SetRow(int row)"""
8700 return _core
.GBPosition_SetRow(*args
, **kwargs
)
8702 def SetCol(*args
, **kwargs
):
8703 """SetCol(int col)"""
8704 return _core
.GBPosition_SetCol(*args
, **kwargs
)
8706 def __eq__(*args
, **kwargs
):
8707 """__eq__(GBPosition other) -> bool"""
8708 return _core
.GBPosition___eq__(*args
, **kwargs
)
8710 def __ne__(*args
, **kwargs
):
8711 """__ne__(GBPosition other) -> bool"""
8712 return _core
.GBPosition___ne__(*args
, **kwargs
)
8714 def Set(*args
, **kwargs
):
8715 """Set(int row=0, int col=0)"""
8716 return _core
.GBPosition_Set(*args
, **kwargs
)
8718 def Get(*args
, **kwargs
):
8719 """Get() -> PyObject"""
8720 return _core
.GBPosition_Get(*args
, **kwargs
)
8723 def __str__(self
): return str(self
.Get())
8724 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
8725 def __len__(self
): return len(self
.Get())
8726 def __getitem__(self
, index
): return self
.Get()[index
]
8727 def __setitem__(self
, index
, val
):
8728 if index
== 0: self
.SetRow(val
)
8729 elif index
== 1: self
.SetCol(val
)
8730 else: raise IndexError
8731 def __nonzero__(self
): return self
.Get() != (0,0)
8732 __safe_for_unpickling__
= True
8733 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
8735 row
= property(GetRow
, SetRow
)
8736 col
= property(GetCol
, SetCol
)
8739 class GBPositionPtr(GBPosition
):
8740 def __init__(self
, this
):
8742 if not hasattr(self
,"thisown"): self
.thisown
= 0
8743 self
.__class
__ = GBPosition
8744 _core
.GBPosition_swigregister(GBPositionPtr
)
8746 class GBSpan(object):
8748 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8749 def __init__(self
, *args
, **kwargs
):
8750 """__init__(int rowspan=1, int colspan=1) -> GBSpan"""
8751 newobj
= _core
.new_GBSpan(*args
, **kwargs
)
8752 self
.this
= newobj
.this
8755 def GetRowspan(*args
, **kwargs
):
8756 """GetRowspan() -> int"""
8757 return _core
.GBSpan_GetRowspan(*args
, **kwargs
)
8759 def GetColspan(*args
, **kwargs
):
8760 """GetColspan() -> int"""
8761 return _core
.GBSpan_GetColspan(*args
, **kwargs
)
8763 def SetRowspan(*args
, **kwargs
):
8764 """SetRowspan(int rowspan)"""
8765 return _core
.GBSpan_SetRowspan(*args
, **kwargs
)
8767 def SetColspan(*args
, **kwargs
):
8768 """SetColspan(int colspan)"""
8769 return _core
.GBSpan_SetColspan(*args
, **kwargs
)
8771 def __eq__(*args
, **kwargs
):
8772 """__eq__(GBSpan other) -> bool"""
8773 return _core
.GBSpan___eq__(*args
, **kwargs
)
8775 def __ne__(*args
, **kwargs
):
8776 """__ne__(GBSpan other) -> bool"""
8777 return _core
.GBSpan___ne__(*args
, **kwargs
)
8779 def Set(*args
, **kwargs
):
8780 """Set(int rowspan=1, int colspan=1)"""
8781 return _core
.GBSpan_Set(*args
, **kwargs
)
8783 def Get(*args
, **kwargs
):
8784 """Get() -> PyObject"""
8785 return _core
.GBSpan_Get(*args
, **kwargs
)
8788 def __str__(self
): return str(self
.Get())
8789 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
8790 def __len__(self
): return len(self
.Get())
8791 def __getitem__(self
, index
): return self
.Get()[index
]
8792 def __setitem__(self
, index
, val
):
8793 if index
== 0: self
.SetRowspan(val
)
8794 elif index
== 1: self
.SetColspan(val
)
8795 else: raise IndexError
8796 def __nonzero__(self
): return self
.Get() != (0,0)
8797 __safe_for_unpickling__
= True
8798 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
8800 rowspan
= property(GetRowspan
, SetRowspan
)
8801 colspan
= property(GetColspan
, SetColspan
)
8804 class GBSpanPtr(GBSpan
):
8805 def __init__(self
, this
):
8807 if not hasattr(self
,"thisown"): self
.thisown
= 0
8808 self
.__class
__ = GBSpan
8809 _core
.GBSpan_swigregister(GBSpanPtr
)
8811 class GBSizerItem(SizerItem
):
8813 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8814 def __init__(self
, *args
, **kwargs
):
8815 """__init__() -> GBSizerItem"""
8816 newobj
= _core
.new_GBSizerItem(*args
, **kwargs
)
8817 self
.this
= newobj
.this
8820 def GetPos(*args
, **kwargs
):
8821 """GetPos() -> GBPosition"""
8822 return _core
.GBSizerItem_GetPos(*args
, **kwargs
)
8824 def GetPosTuple(self
): return self
.GetPos().Get()
8825 def GetSpan(*args
, **kwargs
):
8826 """GetSpan() -> GBSpan"""
8827 return _core
.GBSizerItem_GetSpan(*args
, **kwargs
)
8829 def GetSpanTuple(self
): return self
.GetSpan().Get()
8830 def SetPos(*args
, **kwargs
):
8831 """SetPos(GBPosition pos) -> bool"""
8832 return _core
.GBSizerItem_SetPos(*args
, **kwargs
)
8834 def SetSpan(*args
, **kwargs
):
8835 """SetSpan(GBSpan span) -> bool"""
8836 return _core
.GBSizerItem_SetSpan(*args
, **kwargs
)
8838 def Intersects(*args
):
8840 Intersects(GBSizerItem other) -> bool
8841 Intersects(GBPosition pos, GBSpan span) -> bool
8843 return _core
.GBSizerItem_Intersects(*args
)
8845 def GetEndPos(*args
, **kwargs
):
8846 """GetEndPos(int row, int col)"""
8847 return _core
.GBSizerItem_GetEndPos(*args
, **kwargs
)
8849 def GetGBSizer(*args
, **kwargs
):
8850 """GetGBSizer() -> GridBagSizer"""
8851 return _core
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
8853 def SetGBSizer(*args
, **kwargs
):
8854 """SetGBSizer(GridBagSizer sizer)"""
8855 return _core
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
8858 class GBSizerItemPtr(GBSizerItem
):
8859 def __init__(self
, this
):
8861 if not hasattr(self
,"thisown"): self
.thisown
= 0
8862 self
.__class
__ = GBSizerItem
8863 _core
.GBSizerItem_swigregister(GBSizerItemPtr
)
8864 DefaultSpan
= cvar
.DefaultSpan
8866 def GBSizerItemWindow(*args
, **kwargs
):
8868 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
8869 int border, Object userData) -> GBSizerItem
8871 val
= _core
.new_GBSizerItemWindow(*args
, **kwargs
)
8875 def GBSizerItemSizer(*args
, **kwargs
):
8877 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
8878 int border, Object userData) -> GBSizerItem
8880 val
= _core
.new_GBSizerItemSizer(*args
, **kwargs
)
8884 def GBSizerItemSpacer(*args
, **kwargs
):
8886 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
8887 int flag, int border, Object userData) -> GBSizerItem
8889 val
= _core
.new_GBSizerItemSpacer(*args
, **kwargs
)
8893 class GridBagSizer(FlexGridSizer
):
8895 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8896 def __init__(self
, *args
, **kwargs
):
8897 """__init__(int vgap=0, int hgap=0) -> GridBagSizer"""
8898 newobj
= _core
.new_GridBagSizer(*args
, **kwargs
)
8899 self
.this
= newobj
.this
8902 def Add(*args
, **kwargs
):
8904 Add(PyObject item, GBPosition pos, GBSpan span=DefaultSpan,
8905 int flag=0, int border=0, PyObject userData=None) -> bool
8907 return _core
.GridBagSizer_Add(*args
, **kwargs
)
8909 def AddItem(*args
, **kwargs
):
8910 """AddItem(GBSizerItem item) -> bool"""
8911 return _core
.GridBagSizer_AddItem(*args
, **kwargs
)
8913 def GetEmptyCellSize(*args
, **kwargs
):
8914 """GetEmptyCellSize() -> Size"""
8915 return _core
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
8917 def SetEmptyCellSize(*args
, **kwargs
):
8918 """SetEmptyCellSize(Size sz)"""
8919 return _core
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
8921 def GetItemPosition(*args
):
8923 GetItemPosition(Window window) -> GBPosition
8924 GetItemPosition(Sizer sizer) -> GBPosition
8925 GetItemPosition(size_t index) -> GBPosition
8927 return _core
.GridBagSizer_GetItemPosition(*args
)
8929 def SetItemPosition(*args
):
8931 SetItemPosition(Window window, GBPosition pos) -> bool
8932 SetItemPosition(Sizer sizer, GBPosition pos) -> bool
8933 SetItemPosition(size_t index, GBPosition pos) -> bool
8935 return _core
.GridBagSizer_SetItemPosition(*args
)
8937 def GetItemSpan(*args
):
8939 GetItemSpan(Window window) -> GBSpan
8940 GetItemSpan(Sizer sizer) -> GBSpan
8941 GetItemSpan(size_t index) -> GBSpan
8943 return _core
.GridBagSizer_GetItemSpan(*args
)
8945 def SetItemSpan(*args
):
8947 SetItemSpan(Window window, GBSpan span) -> bool
8948 SetItemSpan(Sizer sizer, GBSpan span) -> bool
8949 SetItemSpan(size_t index, GBSpan span) -> bool
8951 return _core
.GridBagSizer_SetItemSpan(*args
)
8953 def FindItem(*args
):
8955 FindItem(Window window) -> GBSizerItem
8956 FindItem(Sizer sizer) -> GBSizerItem
8958 return _core
.GridBagSizer_FindItem(*args
)
8960 def FindItemAtPosition(*args
, **kwargs
):
8961 """FindItemAtPosition(GBPosition pos) -> GBSizerItem"""
8962 return _core
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
8964 def FindItemAtPoint(*args
, **kwargs
):
8965 """FindItemAtPoint(Point pt) -> GBSizerItem"""
8966 return _core
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
8968 def FindItemWithData(*args
, **kwargs
):
8969 """FindItemWithData(Object userData) -> GBSizerItem"""
8970 return _core
.GridBagSizer_FindItemWithData(*args
, **kwargs
)
8972 def RecalcSizes(*args
, **kwargs
):
8974 return _core
.GridBagSizer_RecalcSizes(*args
, **kwargs
)
8976 def CalcMin(*args
, **kwargs
):
8977 """CalcMin() -> Size"""
8978 return _core
.GridBagSizer_CalcMin(*args
, **kwargs
)
8980 def CheckForIntersection(*args
):
8982 CheckForIntersection(GBSizerItem item, GBSizerItem excludeItem=None) -> bool
8983 CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
8985 return _core
.GridBagSizer_CheckForIntersection(*args
)
8988 class GridBagSizerPtr(GridBagSizer
):
8989 def __init__(self
, this
):
8991 if not hasattr(self
,"thisown"): self
.thisown
= 0
8992 self
.__class
__ = GridBagSizer
8993 _core
.GridBagSizer_swigregister(GridBagSizerPtr
)
8995 #---------------------------------------------------------------------------
9000 Bottom
= _core
.Bottom
9002 Height
= _core
.Height
9003 Centre
= _core
.Centre
9004 Center
= _core
.Center
9005 CentreX
= _core
.CentreX
9006 CentreY
= _core
.CentreY
9007 Unconstrained
= _core
.Unconstrained
9009 PercentOf
= _core
.PercentOf
9012 LeftOf
= _core
.LeftOf
9013 RightOf
= _core
.RightOf
9014 SameAs
= _core
.SameAs
9015 Absolute
= _core
.Absolute
9016 class IndividualLayoutConstraint(Object
):
9018 Objects of this class are stored in the wx.LayoutConstraint class as one of
9019 eight possible constraints that a window can be involved in. You will never
9020 need to create an instance of wx.IndividualLayoutConstraint, rather you should
9021 use create a wx.LayoutContstraints instance and use the individual contstraints
9024 Constraints are initially set to have the relationship wx.Unconstrained, which
9025 means that their values should be calculated by looking at known constraints.
9027 The Edge specifies the type of edge or dimension of a window.
9031 wx.Left The left edge.
9032 wx.Top The top edge.
9033 wx.Right The right edge.
9034 wx.Bottom The bottom edge.
9035 wx.CentreX The x-coordinate of the centre of the window.
9036 wx.CentreY The y-coordinate of the centre of the window.
9039 The Relationship specifies the relationship that this edge or dimension has
9040 with another specified edge or dimension. Normally, the user doesn't use these
9041 directly because functions such as Below and RightOf are a convenience for
9042 using the more general Set function.
9046 wx.Unconstrained The edge or dimension is unconstrained
9047 (the default for edges.)
9048 wx.AsIs The edge or dimension is to be taken from the current
9049 window position or size (the default for dimensions.)
9050 wx.Above The edge should be above another edge.
9051 wx.Below The edge should be below another edge.
9052 wx.LeftOf The edge should be to the left of another edge.
9053 wx.RightOf The edge should be to the right of another edge.
9054 wx.SameAs The edge or dimension should be the same as another edge
9056 wx.PercentOf The edge or dimension should be a percentage of another
9058 wx.Absolute The edge or dimension should be a given absolute value.
9062 def __init__(self
): raise RuntimeError, "No constructor defined"
9064 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9065 def Set(*args
, **kwargs
):
9066 """Set(int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)"""
9067 return _core
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
9069 def LeftOf(*args
, **kwargs
):
9071 LeftOf(Window sibling, int marg=0)
9073 Sibling relationship
9075 return _core
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
9077 def RightOf(*args
, **kwargs
):
9079 RightOf(Window sibling, int marg=0)
9081 Sibling relationship
9083 return _core
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
9085 def Above(*args
, **kwargs
):
9087 Above(Window sibling, int marg=0)
9089 Sibling relationship
9091 return _core
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
9093 def Below(*args
, **kwargs
):
9095 Below(Window sibling, int marg=0)
9097 Sibling relationship
9099 return _core
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
9101 def SameAs(*args
, **kwargs
):
9103 SameAs(Window otherW, int edge, int marg=0)
9105 'Same edge' alignment
9107 return _core
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
9109 def PercentOf(*args
, **kwargs
):
9111 PercentOf(Window otherW, int wh, int per)
9113 The edge is a percentage of the other window's edge
9115 return _core
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
9117 def Absolute(*args
, **kwargs
):
9121 Edge has absolute value
9123 return _core
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
9125 def Unconstrained(*args
, **kwargs
):
9129 Dimension is unconstrained
9131 return _core
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
9133 def AsIs(*args
, **kwargs
):
9137 Dimension is 'as is' (use current size settings)
9139 return _core
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
9141 def GetOtherWindow(*args
, **kwargs
):
9142 """GetOtherWindow() -> Window"""
9143 return _core
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
9145 def GetMyEdge(*args
, **kwargs
):
9146 """GetMyEdge() -> int"""
9147 return _core
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
9149 def SetEdge(*args
, **kwargs
):
9150 """SetEdge(int which)"""
9151 return _core
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
9153 def SetValue(*args
, **kwargs
):
9154 """SetValue(int v)"""
9155 return _core
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
9157 def GetMargin(*args
, **kwargs
):
9158 """GetMargin() -> int"""
9159 return _core
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
9161 def SetMargin(*args
, **kwargs
):
9162 """SetMargin(int m)"""
9163 return _core
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
9165 def GetValue(*args
, **kwargs
):
9166 """GetValue() -> int"""
9167 return _core
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
9169 def GetPercent(*args
, **kwargs
):
9170 """GetPercent() -> int"""
9171 return _core
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
9173 def GetOtherEdge(*args
, **kwargs
):
9174 """GetOtherEdge() -> int"""
9175 return _core
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
9177 def GetDone(*args
, **kwargs
):
9178 """GetDone() -> bool"""
9179 return _core
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
9181 def SetDone(*args
, **kwargs
):
9182 """SetDone(bool d)"""
9183 return _core
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
9185 def GetRelationship(*args
, **kwargs
):
9186 """GetRelationship() -> int"""
9187 return _core
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
9189 def SetRelationship(*args
, **kwargs
):
9190 """SetRelationship(int r)"""
9191 return _core
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
9193 def ResetIfWin(*args
, **kwargs
):
9195 ResetIfWin(Window otherW) -> bool
9197 Reset constraint if it mentions otherWin
9199 return _core
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
9201 def SatisfyConstraint(*args
, **kwargs
):
9203 SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool
9205 Try to satisfy constraint
9207 return _core
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
9209 def GetEdge(*args
, **kwargs
):
9211 GetEdge(int which, Window thisWin, Window other) -> int
9213 Get the value of this edge or dimension, or if this
9214 is not determinable, -1.
9216 return _core
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
9219 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
9220 def __init__(self
, this
):
9222 if not hasattr(self
,"thisown"): self
.thisown
= 0
9223 self
.__class
__ = IndividualLayoutConstraint
9224 _core
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
9226 class LayoutConstraints(Object
):
9228 Note: constraints are now deprecated and you should use sizers instead.
9230 Objects of this class can be associated with a window to define its layout
9231 constraints, with respect to siblings or its parent.
9233 The class consists of the following eight constraints of class
9234 wx.IndividualLayoutConstraint, some or all of which should be accessed
9235 directly to set the appropriate constraints.
9237 * left: represents the left hand edge of the window
9238 * right: represents the right hand edge of the window
9239 * top: represents the top edge of the window
9240 * bottom: represents the bottom edge of the window
9241 * width: represents the width of the window
9242 * height: represents the height of the window
9243 * centreX: represents the horizontal centre point of the window
9244 * centreY: represents the vertical centre point of the window
9246 Most constraints are initially set to have the relationship wxUnconstrained,
9247 which means that their values should be calculated by looking at known
9248 constraints. The exceptions are width and height, which are set to wxAsIs to
9249 ensure that if the user does not specify a constraint, the existing width and
9250 height will be used, to be compatible with panel items which often have take a
9251 default size. If the constraint is wxAsIs, the dimension will not be changed.
9255 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9256 left
= property(_core
.LayoutConstraints_left_get
)
9257 top
= property(_core
.LayoutConstraints_top_get
)
9258 right
= property(_core
.LayoutConstraints_right_get
)
9259 bottom
= property(_core
.LayoutConstraints_bottom_get
)
9260 width
= property(_core
.LayoutConstraints_width_get
)
9261 height
= property(_core
.LayoutConstraints_height_get
)
9262 centreX
= property(_core
.LayoutConstraints_centreX_get
)
9263 centreY
= property(_core
.LayoutConstraints_centreY_get
)
9264 def __init__(self
, *args
, **kwargs
):
9265 """__init__() -> LayoutConstraints"""
9266 newobj
= _core
.new_LayoutConstraints(*args
, **kwargs
)
9267 self
.this
= newobj
.this
9270 def SatisfyConstraints(*args
, **kwargs
):
9271 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
9272 return _core
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
9274 def AreSatisfied(*args
, **kwargs
):
9275 """AreSatisfied() -> bool"""
9276 return _core
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
9279 class LayoutConstraintsPtr(LayoutConstraints
):
9280 def __init__(self
, this
):
9282 if not hasattr(self
,"thisown"): self
.thisown
= 0
9283 self
.__class
__ = LayoutConstraints
9284 _core
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
9286 #----------------------------------------------------------------------------
9288 # Use Python's bool constants if available, make some if not
9292 __builtins__
.True = 1==1
9293 __builtins__
.False = 1==0
9297 # workarounds for bad wxRTTI names
9298 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
9299 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
9300 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
9303 #----------------------------------------------------------------------------
9304 # Load version numbers from __version__... Ensure that major and minor
9305 # versions are the same for both wxPython and wxWindows.
9307 from __version__
import *
9308 __version__
= VERSION_STRING
9310 assert MAJOR_VERSION
== _core
.MAJOR_VERSION
, "wxPython/wxWindows version mismatch"
9311 assert MINOR_VERSION
== _core
.MINOR_VERSION
, "wxPython/wxWindows version mismatch"
9312 if RELEASE_VERSION
!= _core
.RELEASE_VERSION
:
9314 warnings
.warn("wxPython/wxWindows release number mismatch")
9316 #----------------------------------------------------------------------------
9318 class PyDeadObjectError(AttributeError):
9321 class _wxPyDeadObject(object):
9323 Instances of wx objects that are OOR capable will have their __class__
9324 changed to this class when the C++ object is deleted. This should help
9325 prevent crashes due to referencing a bogus C++ pointer.
9327 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
9328 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
9331 if not hasattr(self
, "_name"):
9332 self
._name
= "[unknown]"
9333 return self
.reprStr
% self
._name
9335 def __getattr__(self
, *args
):
9336 if not hasattr(self
, "_name"):
9337 self
._name
= "[unknown]"
9338 raise PyDeadObjectError(self
.attrStr
% self
._name
)
9340 def __nonzero__(self
):
9345 class PyUnbornObjectError(AttributeError):
9348 class _wxPyUnbornObject(object):
9350 Some stock objects are created when the wx.core module is
9351 imported, but their C++ instance is not created until the wx.App
9352 object is created and initialized. These object instances will
9353 temporarily have their __class__ changed to this class so an
9354 exception will be raised if they are used before the C++ instance
9358 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
9359 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
9362 #if not hasattr(self, "_name"):
9363 # self._name = "[unknown]"
9364 return self
.reprStr
#% self._name
9366 def __getattr__(self
, *args
):
9367 #if not hasattr(self, "_name"):
9368 # self._name = "[unknown]"
9369 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
9371 def __nonzero__(self
):
9375 #----------------------------------------------------------------------------
9376 _wxPyCallAfterId
= None
9378 def CallAfter(callable, *args
, **kw
):
9380 Call the specified function after the current and pending event
9381 handlers have been completed. This is also good for making GUI
9382 method calls from non-GUI threads.
9385 assert app
, 'No wxApp created yet'
9387 global _wxPyCallAfterId
9388 if _wxPyCallAfterId
is None:
9389 _wxPyCallAfterId
= wx
.NewEventType()
9390 app
.Connect(-1, -1, _wxPyCallAfterId
,
9391 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
9393 evt
.SetEventType(_wxPyCallAfterId
)
9394 evt
.callable = callable
9397 wx
.PostEvent(app
, evt
)
9400 #----------------------------------------------------------------------------
9405 A convenience class for wx.Timer, that calls the given callable
9406 object once after the given amount of milliseconds, passing any
9407 positional or keyword args. The return value of the callable is
9408 availbale after it has been run with the GetResult method.
9410 If you don't need to get the return value or restart the timer
9411 then there is no need to hold a reference to this object. It will
9412 hold a reference to itself while the timer is running (the timer
9413 has a reference to self.Notify) but the cycle will be broken when
9414 the timer completes, automatically cleaning up the wx.FutureCall
9417 def __init__(self
, millis
, callable, *args
, **kwargs
):
9418 self
.millis
= millis
9419 self
.callable = callable
9420 self
.SetArgs(*args
, **kwargs
)
9422 self
.running
= False
9432 def Start(self
, millis
=None, *args
, **kwargs
):
9437 if millis
is not None:
9438 self
.millis
= millis
9440 self
.SetArgs(*args
, **kwargs
)
9442 self
.timer
= wx
.PyTimer(self
.Notify
)
9443 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
9450 Stop and destroy the timer.
9452 if self
.timer
is not None:
9457 def GetInterval(self
):
9458 if self
.timer
is not None:
9459 return self
.timer
.GetInterval()
9464 def IsRunning(self
):
9465 return self
.timer
is not None and self
.timer
.IsRunning()
9468 def SetArgs(self
, *args
, **kwargs
):
9470 (Re)set the args passed to the callable object. This is
9471 useful in conjunction with Restart if you want to schedule a
9472 new call to the same callable object but with different
9476 self
.kwargs
= kwargs
9482 def GetResult(self
):
9487 The timer has expired so call the callable.
9489 if self
.callable and getattr(self
.callable, 'im_self', True):
9491 self
.running
= False
9492 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
9494 if not self
.running
:
9495 # if it wasn't restarted, then cleanup
9496 wx
.CallAfter(self
.Stop
)
9499 #----------------------------------------------------------------------------
9500 #----------------------------------------------------------------------------
9502 # Import other modules in this package that should show up in the
9503 # "core" wx namespace
9505 from windows
import *
9506 from controls
import *
9510 # Fixup the stock objects since they can't be used yet. (They will be
9511 # restored in wx.PyApp.OnInit.)
9512 _core
._wxPyFixStockObjects
()
9514 #----------------------------------------------------------------------------
9515 #----------------------------------------------------------------------------