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 TAB_TRAVERSAL
= _core
.TAB_TRAVERSAL
28 WANTS_CHARS
= _core
.WANTS_CHARS
29 POPUP_WINDOW
= _core
.POPUP_WINDOW
30 CENTER_FRAME
= _core
.CENTER_FRAME
31 CENTRE_ON_SCREEN
= _core
.CENTRE_ON_SCREEN
32 CENTER_ON_SCREEN
= _core
.CENTER_ON_SCREEN
33 ED_CLIENT_MARGIN
= _core
.ED_CLIENT_MARGIN
34 ED_BUTTONS_BOTTOM
= _core
.ED_BUTTONS_BOTTOM
35 ED_BUTTONS_RIGHT
= _core
.ED_BUTTONS_RIGHT
36 ED_STATIC_LINE
= _core
.ED_STATIC_LINE
37 EXT_DIALOG_STYLE
= _core
.EXT_DIALOG_STYLE
38 CLIP_CHILDREN
= _core
.CLIP_CHILDREN
39 CLIP_SIBLINGS
= _core
.CLIP_SIBLINGS
40 RETAINED
= _core
.RETAINED
41 BACKINGSTORE
= _core
.BACKINGSTORE
42 COLOURED
= _core
.COLOURED
43 FIXED_LENGTH
= _core
.FIXED_LENGTH
44 LB_NEEDED_SB
= _core
.LB_NEEDED_SB
45 LB_ALWAYS_SB
= _core
.LB_ALWAYS_SB
46 LB_SORT
= _core
.LB_SORT
47 LB_SINGLE
= _core
.LB_SINGLE
48 LB_MULTIPLE
= _core
.LB_MULTIPLE
49 LB_EXTENDED
= _core
.LB_EXTENDED
50 LB_OWNERDRAW
= _core
.LB_OWNERDRAW
51 LB_HSCROLL
= _core
.LB_HSCROLL
52 PROCESS_ENTER
= _core
.PROCESS_ENTER
53 PASSWORD
= _core
.PASSWORD
54 CB_SIMPLE
= _core
.CB_SIMPLE
55 CB_DROPDOWN
= _core
.CB_DROPDOWN
56 CB_SORT
= _core
.CB_SORT
57 CB_READONLY
= _core
.CB_READONLY
58 RA_HORIZONTAL
= _core
.RA_HORIZONTAL
59 RA_VERTICAL
= _core
.RA_VERTICAL
60 RA_SPECIFY_ROWS
= _core
.RA_SPECIFY_ROWS
61 RA_SPECIFY_COLS
= _core
.RA_SPECIFY_COLS
62 RB_GROUP
= _core
.RB_GROUP
63 RB_SINGLE
= _core
.RB_SINGLE
64 SL_HORIZONTAL
= _core
.SL_HORIZONTAL
65 SL_VERTICAL
= _core
.SL_VERTICAL
66 SL_AUTOTICKS
= _core
.SL_AUTOTICKS
67 SL_LABELS
= _core
.SL_LABELS
68 SL_LEFT
= _core
.SL_LEFT
70 SL_RIGHT
= _core
.SL_RIGHT
71 SL_BOTTOM
= _core
.SL_BOTTOM
72 SL_BOTH
= _core
.SL_BOTH
73 SL_SELRANGE
= _core
.SL_SELRANGE
74 SB_HORIZONTAL
= _core
.SB_HORIZONTAL
75 SB_VERTICAL
= _core
.SB_VERTICAL
76 ST_SIZEGRIP
= _core
.ST_SIZEGRIP
77 ST_NO_AUTORESIZE
= _core
.ST_NO_AUTORESIZE
78 FLOOD_SURFACE
= _core
.FLOOD_SURFACE
79 FLOOD_BORDER
= _core
.FLOOD_BORDER
80 ODDEVEN_RULE
= _core
.ODDEVEN_RULE
81 WINDING_RULE
= _core
.WINDING_RULE
82 TOOL_TOP
= _core
.TOOL_TOP
83 TOOL_BOTTOM
= _core
.TOOL_BOTTOM
84 TOOL_LEFT
= _core
.TOOL_LEFT
85 TOOL_RIGHT
= _core
.TOOL_RIGHT
91 NO_DEFAULT
= _core
.NO_DEFAULT
92 YES_DEFAULT
= _core
.YES_DEFAULT
93 ICON_EXCLAMATION
= _core
.ICON_EXCLAMATION
94 ICON_HAND
= _core
.ICON_HAND
95 ICON_QUESTION
= _core
.ICON_QUESTION
96 ICON_INFORMATION
= _core
.ICON_INFORMATION
97 ICON_STOP
= _core
.ICON_STOP
98 ICON_ASTERISK
= _core
.ICON_ASTERISK
99 ICON_MASK
= _core
.ICON_MASK
100 ICON_WARNING
= _core
.ICON_WARNING
101 ICON_ERROR
= _core
.ICON_ERROR
102 FORWARD
= _core
.FORWARD
103 BACKWARD
= _core
.BACKWARD
108 SIZE_AUTO_WIDTH
= _core
.SIZE_AUTO_WIDTH
109 SIZE_AUTO_HEIGHT
= _core
.SIZE_AUTO_HEIGHT
110 SIZE_AUTO
= _core
.SIZE_AUTO
111 SIZE_USE_EXISTING
= _core
.SIZE_USE_EXISTING
112 SIZE_ALLOW_MINUS_ONE
= _core
.SIZE_ALLOW_MINUS_ONE
113 PORTRAIT
= _core
.PORTRAIT
114 LANDSCAPE
= _core
.LANDSCAPE
115 PRINT_QUALITY_HIGH
= _core
.PRINT_QUALITY_HIGH
116 PRINT_QUALITY_MEDIUM
= _core
.PRINT_QUALITY_MEDIUM
117 PRINT_QUALITY_LOW
= _core
.PRINT_QUALITY_LOW
118 PRINT_QUALITY_DRAFT
= _core
.PRINT_QUALITY_DRAFT
119 ID_ANY
= _core
.ID_ANY
120 ID_SEPARATOR
= _core
.ID_SEPARATOR
121 ID_LOWEST
= _core
.ID_LOWEST
122 ID_OPEN
= _core
.ID_OPEN
123 ID_CLOSE
= _core
.ID_CLOSE
124 ID_NEW
= _core
.ID_NEW
125 ID_SAVE
= _core
.ID_SAVE
126 ID_SAVEAS
= _core
.ID_SAVEAS
127 ID_REVERT
= _core
.ID_REVERT
128 ID_EXIT
= _core
.ID_EXIT
129 ID_UNDO
= _core
.ID_UNDO
130 ID_REDO
= _core
.ID_REDO
131 ID_HELP
= _core
.ID_HELP
132 ID_PRINT
= _core
.ID_PRINT
133 ID_PRINT_SETUP
= _core
.ID_PRINT_SETUP
134 ID_PREVIEW
= _core
.ID_PREVIEW
135 ID_ABOUT
= _core
.ID_ABOUT
136 ID_HELP_CONTENTS
= _core
.ID_HELP_CONTENTS
137 ID_HELP_COMMANDS
= _core
.ID_HELP_COMMANDS
138 ID_HELP_PROCEDURES
= _core
.ID_HELP_PROCEDURES
139 ID_HELP_CONTEXT
= _core
.ID_HELP_CONTEXT
140 ID_CLOSE_ALL
= _core
.ID_CLOSE_ALL
141 ID_PREFERENCES
= _core
.ID_PREFERENCES
142 ID_CUT
= _core
.ID_CUT
143 ID_COPY
= _core
.ID_COPY
144 ID_PASTE
= _core
.ID_PASTE
145 ID_CLEAR
= _core
.ID_CLEAR
146 ID_FIND
= _core
.ID_FIND
147 ID_DUPLICATE
= _core
.ID_DUPLICATE
148 ID_SELECTALL
= _core
.ID_SELECTALL
149 ID_DELETE
= _core
.ID_DELETE
150 ID_REPLACE
= _core
.ID_REPLACE
151 ID_REPLACE_ALL
= _core
.ID_REPLACE_ALL
152 ID_PROPERTIES
= _core
.ID_PROPERTIES
153 ID_VIEW_DETAILS
= _core
.ID_VIEW_DETAILS
154 ID_VIEW_LARGEICONS
= _core
.ID_VIEW_LARGEICONS
155 ID_VIEW_SMALLICONS
= _core
.ID_VIEW_SMALLICONS
156 ID_VIEW_LIST
= _core
.ID_VIEW_LIST
157 ID_VIEW_SORTDATE
= _core
.ID_VIEW_SORTDATE
158 ID_VIEW_SORTNAME
= _core
.ID_VIEW_SORTNAME
159 ID_VIEW_SORTSIZE
= _core
.ID_VIEW_SORTSIZE
160 ID_VIEW_SORTTYPE
= _core
.ID_VIEW_SORTTYPE
161 ID_FILE1
= _core
.ID_FILE1
162 ID_FILE2
= _core
.ID_FILE2
163 ID_FILE3
= _core
.ID_FILE3
164 ID_FILE4
= _core
.ID_FILE4
165 ID_FILE5
= _core
.ID_FILE5
166 ID_FILE6
= _core
.ID_FILE6
167 ID_FILE7
= _core
.ID_FILE7
168 ID_FILE8
= _core
.ID_FILE8
169 ID_FILE9
= _core
.ID_FILE9
171 ID_CANCEL
= _core
.ID_CANCEL
172 ID_APPLY
= _core
.ID_APPLY
173 ID_YES
= _core
.ID_YES
175 ID_STATIC
= _core
.ID_STATIC
176 ID_FORWARD
= _core
.ID_FORWARD
177 ID_BACKWARD
= _core
.ID_BACKWARD
178 ID_DEFAULT
= _core
.ID_DEFAULT
179 ID_MORE
= _core
.ID_MORE
180 ID_SETUP
= _core
.ID_SETUP
181 ID_RESET
= _core
.ID_RESET
182 ID_CONTEXT_HELP
= _core
.ID_CONTEXT_HELP
183 ID_YESTOALL
= _core
.ID_YESTOALL
184 ID_NOTOALL
= _core
.ID_NOTOALL
185 ID_ABORT
= _core
.ID_ABORT
186 ID_RETRY
= _core
.ID_RETRY
187 ID_IGNORE
= _core
.ID_IGNORE
188 ID_HIGHEST
= _core
.ID_HIGHEST
191 HIDE_READONLY
= _core
.HIDE_READONLY
192 OVERWRITE_PROMPT
= _core
.OVERWRITE_PROMPT
193 FILE_MUST_EXIST
= _core
.FILE_MUST_EXIST
194 MULTIPLE
= _core
.MULTIPLE
195 CHANGE_DIR
= _core
.CHANGE_DIR
196 ACCEL_ALT
= _core
.ACCEL_ALT
197 ACCEL_CTRL
= _core
.ACCEL_CTRL
198 ACCEL_SHIFT
= _core
.ACCEL_SHIFT
199 ACCEL_NORMAL
= _core
.ACCEL_NORMAL
200 PD_AUTO_HIDE
= _core
.PD_AUTO_HIDE
201 PD_APP_MODAL
= _core
.PD_APP_MODAL
202 PD_CAN_ABORT
= _core
.PD_CAN_ABORT
203 PD_ELAPSED_TIME
= _core
.PD_ELAPSED_TIME
204 PD_ESTIMATED_TIME
= _core
.PD_ESTIMATED_TIME
205 PD_REMAINING_TIME
= _core
.PD_REMAINING_TIME
206 DD_NEW_DIR_BUTTON
= _core
.DD_NEW_DIR_BUTTON
207 DD_DEFAULT_STYLE
= _core
.DD_DEFAULT_STYLE
208 MENU_TEAROFF
= _core
.MENU_TEAROFF
209 MB_DOCKABLE
= _core
.MB_DOCKABLE
210 NO_FULL_REPAINT_ON_RESIZE
= _core
.NO_FULL_REPAINT_ON_RESIZE
211 FULL_REPAINT_ON_RESIZE
= _core
.FULL_REPAINT_ON_RESIZE
212 LI_HORIZONTAL
= _core
.LI_HORIZONTAL
213 LI_VERTICAL
= _core
.LI_VERTICAL
214 WS_EX_VALIDATE_RECURSIVELY
= _core
.WS_EX_VALIDATE_RECURSIVELY
215 WS_EX_BLOCK_EVENTS
= _core
.WS_EX_BLOCK_EVENTS
216 WS_EX_TRANSIENT
= _core
.WS_EX_TRANSIENT
217 WS_EX_THEMED_BACKGROUND
= _core
.WS_EX_THEMED_BACKGROUND
218 WS_EX_PROCESS_IDLE
= _core
.WS_EX_PROCESS_IDLE
219 WS_EX_PROCESS_UI_UPDATES
= _core
.WS_EX_PROCESS_UI_UPDATES
220 MM_TEXT
= _core
.MM_TEXT
221 MM_LOMETRIC
= _core
.MM_LOMETRIC
222 MM_HIMETRIC
= _core
.MM_HIMETRIC
223 MM_LOENGLISH
= _core
.MM_LOENGLISH
224 MM_HIENGLISH
= _core
.MM_HIENGLISH
225 MM_TWIPS
= _core
.MM_TWIPS
226 MM_ISOTROPIC
= _core
.MM_ISOTROPIC
227 MM_ANISOTROPIC
= _core
.MM_ANISOTROPIC
228 MM_POINTS
= _core
.MM_POINTS
229 MM_METRIC
= _core
.MM_METRIC
230 CENTRE
= _core
.CENTRE
231 CENTER
= _core
.CENTER
232 HORIZONTAL
= _core
.HORIZONTAL
233 VERTICAL
= _core
.VERTICAL
240 BOTTOM
= _core
.BOTTOM
246 ALIGN_NOT
= _core
.ALIGN_NOT
247 ALIGN_CENTER_HORIZONTAL
= _core
.ALIGN_CENTER_HORIZONTAL
248 ALIGN_CENTRE_HORIZONTAL
= _core
.ALIGN_CENTRE_HORIZONTAL
249 ALIGN_LEFT
= _core
.ALIGN_LEFT
250 ALIGN_TOP
= _core
.ALIGN_TOP
251 ALIGN_RIGHT
= _core
.ALIGN_RIGHT
252 ALIGN_BOTTOM
= _core
.ALIGN_BOTTOM
253 ALIGN_CENTER_VERTICAL
= _core
.ALIGN_CENTER_VERTICAL
254 ALIGN_CENTRE_VERTICAL
= _core
.ALIGN_CENTRE_VERTICAL
255 ALIGN_CENTER
= _core
.ALIGN_CENTER
256 ALIGN_CENTRE
= _core
.ALIGN_CENTRE
257 ALIGN_MASK
= _core
.ALIGN_MASK
258 STRETCH_NOT
= _core
.STRETCH_NOT
259 SHRINK
= _core
.SHRINK
261 EXPAND
= _core
.EXPAND
262 SHAPED
= _core
.SHAPED
263 FIXED_MINSIZE
= _core
.FIXED_MINSIZE
265 ADJUST_MINSIZE
= _core
.ADJUST_MINSIZE
266 BORDER_DEFAULT
= _core
.BORDER_DEFAULT
267 BORDER_NONE
= _core
.BORDER_NONE
268 BORDER_STATIC
= _core
.BORDER_STATIC
269 BORDER_SIMPLE
= _core
.BORDER_SIMPLE
270 BORDER_RAISED
= _core
.BORDER_RAISED
271 BORDER_SUNKEN
= _core
.BORDER_SUNKEN
272 BORDER_DOUBLE
= _core
.BORDER_DOUBLE
273 BORDER_MASK
= _core
.BORDER_MASK
274 DEFAULT
= _core
.DEFAULT
275 DECORATIVE
= _core
.DECORATIVE
277 SCRIPT
= _core
.SCRIPT
279 MODERN
= _core
.MODERN
280 TELETYPE
= _core
.TELETYPE
281 VARIABLE
= _core
.VARIABLE
283 NORMAL
= _core
.NORMAL
286 ITALIC
= _core
.ITALIC
290 LONG_DASH
= _core
.LONG_DASH
291 SHORT_DASH
= _core
.SHORT_DASH
292 DOT_DASH
= _core
.DOT_DASH
293 USER_DASH
= _core
.USER_DASH
294 TRANSPARENT
= _core
.TRANSPARENT
295 STIPPLE
= _core
.STIPPLE
296 BDIAGONAL_HATCH
= _core
.BDIAGONAL_HATCH
297 CROSSDIAG_HATCH
= _core
.CROSSDIAG_HATCH
298 FDIAGONAL_HATCH
= _core
.FDIAGONAL_HATCH
299 CROSS_HATCH
= _core
.CROSS_HATCH
300 HORIZONTAL_HATCH
= _core
.HORIZONTAL_HATCH
301 VERTICAL_HATCH
= _core
.VERTICAL_HATCH
302 JOIN_BEVEL
= _core
.JOIN_BEVEL
303 JOIN_MITER
= _core
.JOIN_MITER
304 JOIN_ROUND
= _core
.JOIN_ROUND
305 CAP_ROUND
= _core
.CAP_ROUND
306 CAP_PROJECTING
= _core
.CAP_PROJECTING
307 CAP_BUTT
= _core
.CAP_BUTT
310 INVERT
= _core
.INVERT
311 OR_REVERSE
= _core
.OR_REVERSE
312 AND_REVERSE
= _core
.AND_REVERSE
315 AND_INVERT
= _core
.AND_INVERT
319 SRC_INVERT
= _core
.SRC_INVERT
320 OR_INVERT
= _core
.OR_INVERT
324 WXK_BACK
= _core
.WXK_BACK
325 WXK_TAB
= _core
.WXK_TAB
326 WXK_RETURN
= _core
.WXK_RETURN
327 WXK_ESCAPE
= _core
.WXK_ESCAPE
328 WXK_SPACE
= _core
.WXK_SPACE
329 WXK_DELETE
= _core
.WXK_DELETE
330 WXK_START
= _core
.WXK_START
331 WXK_LBUTTON
= _core
.WXK_LBUTTON
332 WXK_RBUTTON
= _core
.WXK_RBUTTON
333 WXK_CANCEL
= _core
.WXK_CANCEL
334 WXK_MBUTTON
= _core
.WXK_MBUTTON
335 WXK_CLEAR
= _core
.WXK_CLEAR
336 WXK_SHIFT
= _core
.WXK_SHIFT
337 WXK_ALT
= _core
.WXK_ALT
338 WXK_CONTROL
= _core
.WXK_CONTROL
339 WXK_MENU
= _core
.WXK_MENU
340 WXK_PAUSE
= _core
.WXK_PAUSE
341 WXK_CAPITAL
= _core
.WXK_CAPITAL
342 WXK_PRIOR
= _core
.WXK_PRIOR
343 WXK_NEXT
= _core
.WXK_NEXT
344 WXK_END
= _core
.WXK_END
345 WXK_HOME
= _core
.WXK_HOME
346 WXK_LEFT
= _core
.WXK_LEFT
347 WXK_UP
= _core
.WXK_UP
348 WXK_RIGHT
= _core
.WXK_RIGHT
349 WXK_DOWN
= _core
.WXK_DOWN
350 WXK_SELECT
= _core
.WXK_SELECT
351 WXK_PRINT
= _core
.WXK_PRINT
352 WXK_EXECUTE
= _core
.WXK_EXECUTE
353 WXK_SNAPSHOT
= _core
.WXK_SNAPSHOT
354 WXK_INSERT
= _core
.WXK_INSERT
355 WXK_HELP
= _core
.WXK_HELP
356 WXK_NUMPAD0
= _core
.WXK_NUMPAD0
357 WXK_NUMPAD1
= _core
.WXK_NUMPAD1
358 WXK_NUMPAD2
= _core
.WXK_NUMPAD2
359 WXK_NUMPAD3
= _core
.WXK_NUMPAD3
360 WXK_NUMPAD4
= _core
.WXK_NUMPAD4
361 WXK_NUMPAD5
= _core
.WXK_NUMPAD5
362 WXK_NUMPAD6
= _core
.WXK_NUMPAD6
363 WXK_NUMPAD7
= _core
.WXK_NUMPAD7
364 WXK_NUMPAD8
= _core
.WXK_NUMPAD8
365 WXK_NUMPAD9
= _core
.WXK_NUMPAD9
366 WXK_MULTIPLY
= _core
.WXK_MULTIPLY
367 WXK_ADD
= _core
.WXK_ADD
368 WXK_SEPARATOR
= _core
.WXK_SEPARATOR
369 WXK_SUBTRACT
= _core
.WXK_SUBTRACT
370 WXK_DECIMAL
= _core
.WXK_DECIMAL
371 WXK_DIVIDE
= _core
.WXK_DIVIDE
372 WXK_F1
= _core
.WXK_F1
373 WXK_F2
= _core
.WXK_F2
374 WXK_F3
= _core
.WXK_F3
375 WXK_F4
= _core
.WXK_F4
376 WXK_F5
= _core
.WXK_F5
377 WXK_F6
= _core
.WXK_F6
378 WXK_F7
= _core
.WXK_F7
379 WXK_F8
= _core
.WXK_F8
380 WXK_F9
= _core
.WXK_F9
381 WXK_F10
= _core
.WXK_F10
382 WXK_F11
= _core
.WXK_F11
383 WXK_F12
= _core
.WXK_F12
384 WXK_F13
= _core
.WXK_F13
385 WXK_F14
= _core
.WXK_F14
386 WXK_F15
= _core
.WXK_F15
387 WXK_F16
= _core
.WXK_F16
388 WXK_F17
= _core
.WXK_F17
389 WXK_F18
= _core
.WXK_F18
390 WXK_F19
= _core
.WXK_F19
391 WXK_F20
= _core
.WXK_F20
392 WXK_F21
= _core
.WXK_F21
393 WXK_F22
= _core
.WXK_F22
394 WXK_F23
= _core
.WXK_F23
395 WXK_F24
= _core
.WXK_F24
396 WXK_NUMLOCK
= _core
.WXK_NUMLOCK
397 WXK_SCROLL
= _core
.WXK_SCROLL
398 WXK_PAGEUP
= _core
.WXK_PAGEUP
399 WXK_PAGEDOWN
= _core
.WXK_PAGEDOWN
400 WXK_NUMPAD_SPACE
= _core
.WXK_NUMPAD_SPACE
401 WXK_NUMPAD_TAB
= _core
.WXK_NUMPAD_TAB
402 WXK_NUMPAD_ENTER
= _core
.WXK_NUMPAD_ENTER
403 WXK_NUMPAD_F1
= _core
.WXK_NUMPAD_F1
404 WXK_NUMPAD_F2
= _core
.WXK_NUMPAD_F2
405 WXK_NUMPAD_F3
= _core
.WXK_NUMPAD_F3
406 WXK_NUMPAD_F4
= _core
.WXK_NUMPAD_F4
407 WXK_NUMPAD_HOME
= _core
.WXK_NUMPAD_HOME
408 WXK_NUMPAD_LEFT
= _core
.WXK_NUMPAD_LEFT
409 WXK_NUMPAD_UP
= _core
.WXK_NUMPAD_UP
410 WXK_NUMPAD_RIGHT
= _core
.WXK_NUMPAD_RIGHT
411 WXK_NUMPAD_DOWN
= _core
.WXK_NUMPAD_DOWN
412 WXK_NUMPAD_PRIOR
= _core
.WXK_NUMPAD_PRIOR
413 WXK_NUMPAD_PAGEUP
= _core
.WXK_NUMPAD_PAGEUP
414 WXK_NUMPAD_NEXT
= _core
.WXK_NUMPAD_NEXT
415 WXK_NUMPAD_PAGEDOWN
= _core
.WXK_NUMPAD_PAGEDOWN
416 WXK_NUMPAD_END
= _core
.WXK_NUMPAD_END
417 WXK_NUMPAD_BEGIN
= _core
.WXK_NUMPAD_BEGIN
418 WXK_NUMPAD_INSERT
= _core
.WXK_NUMPAD_INSERT
419 WXK_NUMPAD_DELETE
= _core
.WXK_NUMPAD_DELETE
420 WXK_NUMPAD_EQUAL
= _core
.WXK_NUMPAD_EQUAL
421 WXK_NUMPAD_MULTIPLY
= _core
.WXK_NUMPAD_MULTIPLY
422 WXK_NUMPAD_ADD
= _core
.WXK_NUMPAD_ADD
423 WXK_NUMPAD_SEPARATOR
= _core
.WXK_NUMPAD_SEPARATOR
424 WXK_NUMPAD_SUBTRACT
= _core
.WXK_NUMPAD_SUBTRACT
425 WXK_NUMPAD_DECIMAL
= _core
.WXK_NUMPAD_DECIMAL
426 WXK_NUMPAD_DIVIDE
= _core
.WXK_NUMPAD_DIVIDE
427 WXK_WINDOWS_LEFT
= _core
.WXK_WINDOWS_LEFT
428 WXK_WINDOWS_RIGHT
= _core
.WXK_WINDOWS_RIGHT
429 WXK_WINDOWS_MENU
= _core
.WXK_WINDOWS_MENU
430 PAPER_NONE
= _core
.PAPER_NONE
431 PAPER_LETTER
= _core
.PAPER_LETTER
432 PAPER_LEGAL
= _core
.PAPER_LEGAL
433 PAPER_A4
= _core
.PAPER_A4
434 PAPER_CSHEET
= _core
.PAPER_CSHEET
435 PAPER_DSHEET
= _core
.PAPER_DSHEET
436 PAPER_ESHEET
= _core
.PAPER_ESHEET
437 PAPER_LETTERSMALL
= _core
.PAPER_LETTERSMALL
438 PAPER_TABLOID
= _core
.PAPER_TABLOID
439 PAPER_LEDGER
= _core
.PAPER_LEDGER
440 PAPER_STATEMENT
= _core
.PAPER_STATEMENT
441 PAPER_EXECUTIVE
= _core
.PAPER_EXECUTIVE
442 PAPER_A3
= _core
.PAPER_A3
443 PAPER_A4SMALL
= _core
.PAPER_A4SMALL
444 PAPER_A5
= _core
.PAPER_A5
445 PAPER_B4
= _core
.PAPER_B4
446 PAPER_B5
= _core
.PAPER_B5
447 PAPER_FOLIO
= _core
.PAPER_FOLIO
448 PAPER_QUARTO
= _core
.PAPER_QUARTO
449 PAPER_10X14
= _core
.PAPER_10X14
450 PAPER_11X17
= _core
.PAPER_11X17
451 PAPER_NOTE
= _core
.PAPER_NOTE
452 PAPER_ENV_9
= _core
.PAPER_ENV_9
453 PAPER_ENV_10
= _core
.PAPER_ENV_10
454 PAPER_ENV_11
= _core
.PAPER_ENV_11
455 PAPER_ENV_12
= _core
.PAPER_ENV_12
456 PAPER_ENV_14
= _core
.PAPER_ENV_14
457 PAPER_ENV_DL
= _core
.PAPER_ENV_DL
458 PAPER_ENV_C5
= _core
.PAPER_ENV_C5
459 PAPER_ENV_C3
= _core
.PAPER_ENV_C3
460 PAPER_ENV_C4
= _core
.PAPER_ENV_C4
461 PAPER_ENV_C6
= _core
.PAPER_ENV_C6
462 PAPER_ENV_C65
= _core
.PAPER_ENV_C65
463 PAPER_ENV_B4
= _core
.PAPER_ENV_B4
464 PAPER_ENV_B5
= _core
.PAPER_ENV_B5
465 PAPER_ENV_B6
= _core
.PAPER_ENV_B6
466 PAPER_ENV_ITALY
= _core
.PAPER_ENV_ITALY
467 PAPER_ENV_MONARCH
= _core
.PAPER_ENV_MONARCH
468 PAPER_ENV_PERSONAL
= _core
.PAPER_ENV_PERSONAL
469 PAPER_FANFOLD_US
= _core
.PAPER_FANFOLD_US
470 PAPER_FANFOLD_STD_GERMAN
= _core
.PAPER_FANFOLD_STD_GERMAN
471 PAPER_FANFOLD_LGL_GERMAN
= _core
.PAPER_FANFOLD_LGL_GERMAN
472 PAPER_ISO_B4
= _core
.PAPER_ISO_B4
473 PAPER_JAPANESE_POSTCARD
= _core
.PAPER_JAPANESE_POSTCARD
474 PAPER_9X11
= _core
.PAPER_9X11
475 PAPER_10X11
= _core
.PAPER_10X11
476 PAPER_15X11
= _core
.PAPER_15X11
477 PAPER_ENV_INVITE
= _core
.PAPER_ENV_INVITE
478 PAPER_LETTER_EXTRA
= _core
.PAPER_LETTER_EXTRA
479 PAPER_LEGAL_EXTRA
= _core
.PAPER_LEGAL_EXTRA
480 PAPER_TABLOID_EXTRA
= _core
.PAPER_TABLOID_EXTRA
481 PAPER_A4_EXTRA
= _core
.PAPER_A4_EXTRA
482 PAPER_LETTER_TRANSVERSE
= _core
.PAPER_LETTER_TRANSVERSE
483 PAPER_A4_TRANSVERSE
= _core
.PAPER_A4_TRANSVERSE
484 PAPER_LETTER_EXTRA_TRANSVERSE
= _core
.PAPER_LETTER_EXTRA_TRANSVERSE
485 PAPER_A_PLUS
= _core
.PAPER_A_PLUS
486 PAPER_B_PLUS
= _core
.PAPER_B_PLUS
487 PAPER_LETTER_PLUS
= _core
.PAPER_LETTER_PLUS
488 PAPER_A4_PLUS
= _core
.PAPER_A4_PLUS
489 PAPER_A5_TRANSVERSE
= _core
.PAPER_A5_TRANSVERSE
490 PAPER_B5_TRANSVERSE
= _core
.PAPER_B5_TRANSVERSE
491 PAPER_A3_EXTRA
= _core
.PAPER_A3_EXTRA
492 PAPER_A5_EXTRA
= _core
.PAPER_A5_EXTRA
493 PAPER_B5_EXTRA
= _core
.PAPER_B5_EXTRA
494 PAPER_A2
= _core
.PAPER_A2
495 PAPER_A3_TRANSVERSE
= _core
.PAPER_A3_TRANSVERSE
496 PAPER_A3_EXTRA_TRANSVERSE
= _core
.PAPER_A3_EXTRA_TRANSVERSE
497 DUPLEX_SIMPLEX
= _core
.DUPLEX_SIMPLEX
498 DUPLEX_HORIZONTAL
= _core
.DUPLEX_HORIZONTAL
499 DUPLEX_VERTICAL
= _core
.DUPLEX_VERTICAL
500 ITEM_SEPARATOR
= _core
.ITEM_SEPARATOR
501 ITEM_NORMAL
= _core
.ITEM_NORMAL
502 ITEM_CHECK
= _core
.ITEM_CHECK
503 ITEM_RADIO
= _core
.ITEM_RADIO
504 ITEM_MAX
= _core
.ITEM_MAX
505 HT_NOWHERE
= _core
.HT_NOWHERE
506 HT_SCROLLBAR_FIRST
= _core
.HT_SCROLLBAR_FIRST
507 HT_SCROLLBAR_ARROW_LINE_1
= _core
.HT_SCROLLBAR_ARROW_LINE_1
508 HT_SCROLLBAR_ARROW_LINE_2
= _core
.HT_SCROLLBAR_ARROW_LINE_2
509 HT_SCROLLBAR_ARROW_PAGE_1
= _core
.HT_SCROLLBAR_ARROW_PAGE_1
510 HT_SCROLLBAR_ARROW_PAGE_2
= _core
.HT_SCROLLBAR_ARROW_PAGE_2
511 HT_SCROLLBAR_THUMB
= _core
.HT_SCROLLBAR_THUMB
512 HT_SCROLLBAR_BAR_1
= _core
.HT_SCROLLBAR_BAR_1
513 HT_SCROLLBAR_BAR_2
= _core
.HT_SCROLLBAR_BAR_2
514 HT_SCROLLBAR_LAST
= _core
.HT_SCROLLBAR_LAST
515 HT_WINDOW_OUTSIDE
= _core
.HT_WINDOW_OUTSIDE
516 HT_WINDOW_INSIDE
= _core
.HT_WINDOW_INSIDE
517 HT_WINDOW_VERT_SCROLLBAR
= _core
.HT_WINDOW_VERT_SCROLLBAR
518 HT_WINDOW_HORZ_SCROLLBAR
= _core
.HT_WINDOW_HORZ_SCROLLBAR
519 HT_WINDOW_CORNER
= _core
.HT_WINDOW_CORNER
520 HT_MAX
= _core
.HT_MAX
521 MOD_NONE
= _core
.MOD_NONE
522 MOD_ALT
= _core
.MOD_ALT
523 MOD_CONTROL
= _core
.MOD_CONTROL
524 MOD_SHIFT
= _core
.MOD_SHIFT
525 MOD_WIN
= _core
.MOD_WIN
526 UPDATE_UI_NONE
= _core
.UPDATE_UI_NONE
527 UPDATE_UI_RECURSE
= _core
.UPDATE_UI_RECURSE
528 UPDATE_UI_FROMIDLE
= _core
.UPDATE_UI_FROMIDLE
529 #---------------------------------------------------------------------------
531 class Object(object):
533 The base class for most wx objects, although in wxPython not
534 much functionality is needed nor exposed.
536 def __init__(self
): raise RuntimeError, "No constructor defined"
538 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
539 def GetClassName(*args
, **kwargs
):
541 GetClassName() -> String
543 Returns the class name of the C++ object using wxRTTI.
545 return _core
.Object_GetClassName(*args
, **kwargs
)
547 def Destroy(*args
, **kwargs
):
551 Deletes the C++ object this Python object is a proxy for.
553 return _core
.Object_Destroy(*args
, **kwargs
)
556 class ObjectPtr(Object
):
557 def __init__(self
, this
):
559 if not hasattr(self
,"thisown"): self
.thisown
= 0
560 self
.__class
__ = Object
561 _core
.Object_swigregister(ObjectPtr
)
562 _wxPySetDictionary
= _core
._wxPySetDictionary
564 _wxPyFixStockObjects
= _core
._wxPyFixStockObjects
567 EmptyString
= cvar
.EmptyString
569 #---------------------------------------------------------------------------
571 BITMAP_TYPE_INVALID
= _core
.BITMAP_TYPE_INVALID
572 BITMAP_TYPE_BMP
= _core
.BITMAP_TYPE_BMP
573 BITMAP_TYPE_ICO
= _core
.BITMAP_TYPE_ICO
574 BITMAP_TYPE_CUR
= _core
.BITMAP_TYPE_CUR
575 BITMAP_TYPE_XBM
= _core
.BITMAP_TYPE_XBM
576 BITMAP_TYPE_XBM_DATA
= _core
.BITMAP_TYPE_XBM_DATA
577 BITMAP_TYPE_XPM
= _core
.BITMAP_TYPE_XPM
578 BITMAP_TYPE_XPM_DATA
= _core
.BITMAP_TYPE_XPM_DATA
579 BITMAP_TYPE_TIF
= _core
.BITMAP_TYPE_TIF
580 BITMAP_TYPE_GIF
= _core
.BITMAP_TYPE_GIF
581 BITMAP_TYPE_PNG
= _core
.BITMAP_TYPE_PNG
582 BITMAP_TYPE_JPEG
= _core
.BITMAP_TYPE_JPEG
583 BITMAP_TYPE_PNM
= _core
.BITMAP_TYPE_PNM
584 BITMAP_TYPE_PCX
= _core
.BITMAP_TYPE_PCX
585 BITMAP_TYPE_PICT
= _core
.BITMAP_TYPE_PICT
586 BITMAP_TYPE_ICON
= _core
.BITMAP_TYPE_ICON
587 BITMAP_TYPE_ANI
= _core
.BITMAP_TYPE_ANI
588 BITMAP_TYPE_IFF
= _core
.BITMAP_TYPE_IFF
589 BITMAP_TYPE_MACCURSOR
= _core
.BITMAP_TYPE_MACCURSOR
590 BITMAP_TYPE_ANY
= _core
.BITMAP_TYPE_ANY
591 CURSOR_NONE
= _core
.CURSOR_NONE
592 CURSOR_ARROW
= _core
.CURSOR_ARROW
593 CURSOR_RIGHT_ARROW
= _core
.CURSOR_RIGHT_ARROW
594 CURSOR_BULLSEYE
= _core
.CURSOR_BULLSEYE
595 CURSOR_CHAR
= _core
.CURSOR_CHAR
596 CURSOR_CROSS
= _core
.CURSOR_CROSS
597 CURSOR_HAND
= _core
.CURSOR_HAND
598 CURSOR_IBEAM
= _core
.CURSOR_IBEAM
599 CURSOR_LEFT_BUTTON
= _core
.CURSOR_LEFT_BUTTON
600 CURSOR_MAGNIFIER
= _core
.CURSOR_MAGNIFIER
601 CURSOR_MIDDLE_BUTTON
= _core
.CURSOR_MIDDLE_BUTTON
602 CURSOR_NO_ENTRY
= _core
.CURSOR_NO_ENTRY
603 CURSOR_PAINT_BRUSH
= _core
.CURSOR_PAINT_BRUSH
604 CURSOR_PENCIL
= _core
.CURSOR_PENCIL
605 CURSOR_POINT_LEFT
= _core
.CURSOR_POINT_LEFT
606 CURSOR_POINT_RIGHT
= _core
.CURSOR_POINT_RIGHT
607 CURSOR_QUESTION_ARROW
= _core
.CURSOR_QUESTION_ARROW
608 CURSOR_RIGHT_BUTTON
= _core
.CURSOR_RIGHT_BUTTON
609 CURSOR_SIZENESW
= _core
.CURSOR_SIZENESW
610 CURSOR_SIZENS
= _core
.CURSOR_SIZENS
611 CURSOR_SIZENWSE
= _core
.CURSOR_SIZENWSE
612 CURSOR_SIZEWE
= _core
.CURSOR_SIZEWE
613 CURSOR_SIZING
= _core
.CURSOR_SIZING
614 CURSOR_SPRAYCAN
= _core
.CURSOR_SPRAYCAN
615 CURSOR_WAIT
= _core
.CURSOR_WAIT
616 CURSOR_WATCH
= _core
.CURSOR_WATCH
617 CURSOR_BLANK
= _core
.CURSOR_BLANK
618 CURSOR_DEFAULT
= _core
.CURSOR_DEFAULT
619 CURSOR_COPY_ARROW
= _core
.CURSOR_COPY_ARROW
620 CURSOR_ARROWWAIT
= _core
.CURSOR_ARROWWAIT
621 CURSOR_MAX
= _core
.CURSOR_MAX
622 #---------------------------------------------------------------------------
626 wx.Size is a useful data structure used to represent the size of something.
627 It simply contians integer width and height proprtites. In most places in
628 wxPython where a wx.Size is expected a (width,height) tuple can be used
632 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
633 width
= property(_core
.Size_width_get
, _core
.Size_width_set
)
634 height
= property(_core
.Size_height_get
, _core
.Size_height_set
)
635 x
= width
; y
= height
636 def __init__(self
, *args
, **kwargs
):
638 __init__(int w=0, int h=0) -> Size
640 Creates a size object.
642 newobj
= _core
.new_Size(*args
, **kwargs
)
643 self
.this
= newobj
.this
646 def __del__(self
, destroy
=_core
.delete_Size
):
649 if self
.thisown
: destroy(self
)
652 def __eq__(*args
, **kwargs
):
654 __eq__(Size sz) -> bool
656 Test for equality of wx.Size objects.
658 return _core
.Size___eq__(*args
, **kwargs
)
660 def __ne__(*args
, **kwargs
):
662 __ne__(Size sz) -> bool
666 return _core
.Size___ne__(*args
, **kwargs
)
668 def __add__(*args
, **kwargs
):
670 __add__(Size sz) -> Size
672 Add sz's proprties to this and return the result.
674 return _core
.Size___add__(*args
, **kwargs
)
676 def __sub__(*args
, **kwargs
):
678 __sub__(Size sz) -> Size
680 Subtract sz's properties from this and return the result.
682 return _core
.Size___sub__(*args
, **kwargs
)
684 def IncTo(*args
, **kwargs
):
688 Increments this object so that both of its dimensions are not less
689 than the corresponding dimensions of the size.
691 return _core
.Size_IncTo(*args
, **kwargs
)
693 def DecTo(*args
, **kwargs
):
697 Decrements this object so that both of its dimensions are not greater
698 than the corresponding dimensions of the size.
700 return _core
.Size_DecTo(*args
, **kwargs
)
702 def Set(*args
, **kwargs
):
706 Set both width and height.
708 return _core
.Size_Set(*args
, **kwargs
)
710 def SetWidth(*args
, **kwargs
):
711 """SetWidth(int w)"""
712 return _core
.Size_SetWidth(*args
, **kwargs
)
714 def SetHeight(*args
, **kwargs
):
715 """SetHeight(int h)"""
716 return _core
.Size_SetHeight(*args
, **kwargs
)
718 def GetWidth(*args
, **kwargs
):
719 """GetWidth() -> int"""
720 return _core
.Size_GetWidth(*args
, **kwargs
)
722 def GetHeight(*args
, **kwargs
):
723 """GetHeight() -> int"""
724 return _core
.Size_GetHeight(*args
, **kwargs
)
726 def IsFullySpecified(*args
, **kwargs
):
728 IsFullySpecified() -> bool
730 Returns True if both components of the size are non-default values.
732 return _core
.Size_IsFullySpecified(*args
, **kwargs
)
734 def SetDefaults(*args
, **kwargs
):
736 SetDefaults(Size size)
738 Combine this size with the other one replacing the default
739 components of this object (i.e. equal to -1) with those of the
742 return _core
.Size_SetDefaults(*args
, **kwargs
)
744 def Get(*args
, **kwargs
):
746 Get() -> (width,height)
748 Returns the width and height properties as a tuple.
750 return _core
.Size_Get(*args
, **kwargs
)
753 def __str__(self
): return str(self
.Get())
754 def __repr__(self
): return 'wx.Size'+str(self
.Get())
755 def __len__(self
): return len(self
.Get())
756 def __getitem__(self
, index
): return self
.Get()[index
]
757 def __setitem__(self
, index
, val
):
758 if index
== 0: self
.width
= val
759 elif index
== 1: self
.height
= val
760 else: raise IndexError
761 def __nonzero__(self
): return self
.Get() != (0,0)
762 __safe_for_unpickling__
= True
763 def __reduce__(self
): return (wx
.Size
, self
.Get())
767 def __init__(self
, this
):
769 if not hasattr(self
,"thisown"): self
.thisown
= 0
770 self
.__class
__ = Size
771 _core
.Size_swigregister(SizePtr
)
773 #---------------------------------------------------------------------------
775 class RealPoint(object):
777 A data structure for representing a point or position with floating point x
778 and y properties. In wxPython most places that expect a wx.RealPoint can also
779 accept a (x,y) tuple.
782 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
783 x
= property(_core
.RealPoint_x_get
, _core
.RealPoint_x_set
)
784 y
= property(_core
.RealPoint_y_get
, _core
.RealPoint_y_set
)
785 def __init__(self
, *args
, **kwargs
):
787 __init__(double x=0.0, double y=0.0) -> RealPoint
789 Create a wx.RealPoint object
791 newobj
= _core
.new_RealPoint(*args
, **kwargs
)
792 self
.this
= newobj
.this
795 def __del__(self
, destroy
=_core
.delete_RealPoint
):
798 if self
.thisown
: destroy(self
)
801 def __eq__(*args
, **kwargs
):
803 __eq__(RealPoint pt) -> bool
805 Test for equality of wx.RealPoint objects.
807 return _core
.RealPoint___eq__(*args
, **kwargs
)
809 def __ne__(*args
, **kwargs
):
811 __ne__(RealPoint pt) -> bool
813 Test for inequality of wx.RealPoint objects.
815 return _core
.RealPoint___ne__(*args
, **kwargs
)
817 def __add__(*args
, **kwargs
):
819 __add__(RealPoint pt) -> RealPoint
821 Add pt's proprties to this and return the result.
823 return _core
.RealPoint___add__(*args
, **kwargs
)
825 def __sub__(*args
, **kwargs
):
827 __sub__(RealPoint pt) -> RealPoint
829 Subtract pt's proprties from this and return the result
831 return _core
.RealPoint___sub__(*args
, **kwargs
)
833 def Set(*args
, **kwargs
):
835 Set(double x, double y)
837 Set both the x and y properties
839 return _core
.RealPoint_Set(*args
, **kwargs
)
841 def Get(*args
, **kwargs
):
845 Return the x and y properties as a tuple.
847 return _core
.RealPoint_Get(*args
, **kwargs
)
850 def __str__(self
): return str(self
.Get())
851 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
852 def __len__(self
): return len(self
.Get())
853 def __getitem__(self
, index
): return self
.Get()[index
]
854 def __setitem__(self
, index
, val
):
855 if index
== 0: self
.x
= val
856 elif index
== 1: self
.y
= val
857 else: raise IndexError
858 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
859 __safe_for_unpickling__
= True
860 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
863 class RealPointPtr(RealPoint
):
864 def __init__(self
, this
):
866 if not hasattr(self
,"thisown"): self
.thisown
= 0
867 self
.__class
__ = RealPoint
868 _core
.RealPoint_swigregister(RealPointPtr
)
870 #---------------------------------------------------------------------------
874 A data structure for representing a point or position with integer x and y
875 properties. Most places in wxPython that expect a wx.Point can also accept a
879 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
880 x
= property(_core
.Point_x_get
, _core
.Point_x_set
)
881 y
= property(_core
.Point_y_get
, _core
.Point_y_set
)
882 def __init__(self
, *args
, **kwargs
):
884 __init__(int x=0, int y=0) -> Point
886 Create a wx.Point object
888 newobj
= _core
.new_Point(*args
, **kwargs
)
889 self
.this
= newobj
.this
892 def __del__(self
, destroy
=_core
.delete_Point
):
895 if self
.thisown
: destroy(self
)
898 def __eq__(*args
, **kwargs
):
900 __eq__(Point pt) -> bool
902 Test for equality of wx.Point objects.
904 return _core
.Point___eq__(*args
, **kwargs
)
906 def __ne__(*args
, **kwargs
):
908 __ne__(Point pt) -> bool
910 Test for inequality of wx.Point objects.
912 return _core
.Point___ne__(*args
, **kwargs
)
914 def __add__(*args
, **kwargs
):
916 __add__(Point pt) -> Point
918 Add pt's proprties to this and return the result.
920 return _core
.Point___add__(*args
, **kwargs
)
922 def __sub__(*args
, **kwargs
):
924 __sub__(Point pt) -> Point
926 Subtract pt's proprties from this and return the result
928 return _core
.Point___sub__(*args
, **kwargs
)
930 def __iadd__(*args
, **kwargs
):
932 __iadd__(Point pt) -> Point
934 Add pt to this object.
936 return _core
.Point___iadd__(*args
, **kwargs
)
938 def __isub__(*args
, **kwargs
):
940 __isub__(Point pt) -> Point
942 Subtract pt from this object.
944 return _core
.Point___isub__(*args
, **kwargs
)
946 def Set(*args
, **kwargs
):
950 Set both the x and y properties
952 return _core
.Point_Set(*args
, **kwargs
)
954 def Get(*args
, **kwargs
):
958 Return the x and y properties as a tuple.
960 return _core
.Point_Get(*args
, **kwargs
)
963 def __str__(self
): return str(self
.Get())
964 def __repr__(self
): return 'wx.Point'+str(self
.Get())
965 def __len__(self
): return len(self
.Get())
966 def __getitem__(self
, index
): return self
.Get()[index
]
967 def __setitem__(self
, index
, val
):
968 if index
== 0: self
.x
= val
969 elif index
== 1: self
.y
= val
970 else: raise IndexError
971 def __nonzero__(self
): return self
.Get() != (0,0)
972 __safe_for_unpickling__
= True
973 def __reduce__(self
): return (wx
.Point
, self
.Get())
976 class PointPtr(Point
):
977 def __init__(self
, this
):
979 if not hasattr(self
,"thisown"): self
.thisown
= 0
980 self
.__class
__ = Point
981 _core
.Point_swigregister(PointPtr
)
983 #---------------------------------------------------------------------------
987 A class for representing and manipulating rectangles. It has x, y, width and
988 height properties. In wxPython most palces that expect a wx.Rect can also
989 accept a (x,y,width,height) tuple.
992 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
993 def __init__(self
, *args
, **kwargs
):
995 __init__(int x=0, int y=0, int width=0, int height=0) -> Rect
997 Create a new Rect object.
999 newobj
= _core
.new_Rect(*args
, **kwargs
)
1000 self
.this
= newobj
.this
1003 def __del__(self
, destroy
=_core
.delete_Rect
):
1006 if self
.thisown
: destroy(self
)
1009 def GetX(*args
, **kwargs
):
1011 return _core
.Rect_GetX(*args
, **kwargs
)
1013 def SetX(*args
, **kwargs
):
1015 return _core
.Rect_SetX(*args
, **kwargs
)
1017 def GetY(*args
, **kwargs
):
1019 return _core
.Rect_GetY(*args
, **kwargs
)
1021 def SetY(*args
, **kwargs
):
1023 return _core
.Rect_SetY(*args
, **kwargs
)
1025 def GetWidth(*args
, **kwargs
):
1026 """GetWidth() -> int"""
1027 return _core
.Rect_GetWidth(*args
, **kwargs
)
1029 def SetWidth(*args
, **kwargs
):
1030 """SetWidth(int w)"""
1031 return _core
.Rect_SetWidth(*args
, **kwargs
)
1033 def GetHeight(*args
, **kwargs
):
1034 """GetHeight() -> int"""
1035 return _core
.Rect_GetHeight(*args
, **kwargs
)
1037 def SetHeight(*args
, **kwargs
):
1038 """SetHeight(int h)"""
1039 return _core
.Rect_SetHeight(*args
, **kwargs
)
1041 def GetPosition(*args
, **kwargs
):
1042 """GetPosition() -> Point"""
1043 return _core
.Rect_GetPosition(*args
, **kwargs
)
1045 def SetPosition(*args
, **kwargs
):
1046 """SetPosition(Point p)"""
1047 return _core
.Rect_SetPosition(*args
, **kwargs
)
1049 def GetSize(*args
, **kwargs
):
1050 """GetSize() -> Size"""
1051 return _core
.Rect_GetSize(*args
, **kwargs
)
1053 def SetSize(*args
, **kwargs
):
1054 """SetSize(Size s)"""
1055 return _core
.Rect_SetSize(*args
, **kwargs
)
1057 def GetTopLeft(*args
, **kwargs
):
1058 """GetTopLeft() -> Point"""
1059 return _core
.Rect_GetTopLeft(*args
, **kwargs
)
1061 def SetTopLeft(*args
, **kwargs
):
1062 """SetTopLeft(Point p)"""
1063 return _core
.Rect_SetTopLeft(*args
, **kwargs
)
1065 def GetBottomRight(*args
, **kwargs
):
1066 """GetBottomRight() -> Point"""
1067 return _core
.Rect_GetBottomRight(*args
, **kwargs
)
1069 def SetBottomRight(*args
, **kwargs
):
1070 """SetBottomRight(Point p)"""
1071 return _core
.Rect_SetBottomRight(*args
, **kwargs
)
1073 def GetLeft(*args
, **kwargs
):
1074 """GetLeft() -> int"""
1075 return _core
.Rect_GetLeft(*args
, **kwargs
)
1077 def GetTop(*args
, **kwargs
):
1078 """GetTop() -> int"""
1079 return _core
.Rect_GetTop(*args
, **kwargs
)
1081 def GetBottom(*args
, **kwargs
):
1082 """GetBottom() -> int"""
1083 return _core
.Rect_GetBottom(*args
, **kwargs
)
1085 def GetRight(*args
, **kwargs
):
1086 """GetRight() -> int"""
1087 return _core
.Rect_GetRight(*args
, **kwargs
)
1089 def SetLeft(*args
, **kwargs
):
1090 """SetLeft(int left)"""
1091 return _core
.Rect_SetLeft(*args
, **kwargs
)
1093 def SetRight(*args
, **kwargs
):
1094 """SetRight(int right)"""
1095 return _core
.Rect_SetRight(*args
, **kwargs
)
1097 def SetTop(*args
, **kwargs
):
1098 """SetTop(int top)"""
1099 return _core
.Rect_SetTop(*args
, **kwargs
)
1101 def SetBottom(*args
, **kwargs
):
1102 """SetBottom(int bottom)"""
1103 return _core
.Rect_SetBottom(*args
, **kwargs
)
1105 position
= property(GetPosition
, SetPosition
)
1106 size
= property(GetSize
, SetSize
)
1107 left
= property(GetLeft
, SetLeft
)
1108 right
= property(GetRight
, SetRight
)
1109 top
= property(GetTop
, SetTop
)
1110 bottom
= property(GetBottom
, SetBottom
)
1112 def Inflate(*args
, **kwargs
):
1114 Inflate(int dx, int dy) -> Rect
1116 Increase the rectangle size by dx in x direction and dy in y direction. Both
1117 (or one of) parameters may be negative to decrease the rectangle size.
1119 return _core
.Rect_Inflate(*args
, **kwargs
)
1121 def Deflate(*args
, **kwargs
):
1123 Deflate(int dx, int dy) -> Rect
1125 Decrease the rectangle size by dx in x direction and dy in y direction. Both
1126 (or one of) parameters may be negative to increase the rectngle size. This
1127 method is the opposite of Inflate.
1129 return _core
.Rect_Deflate(*args
, **kwargs
)
1131 def OffsetXY(*args
, **kwargs
):
1133 OffsetXY(int dx, int dy)
1135 Moves the rectangle by the specified offset. If dx is positive, the rectangle
1136 is moved to the right, if dy is positive, it is moved to the bottom, otherwise
1137 it is moved to the left or top respectively.
1139 return _core
.Rect_OffsetXY(*args
, **kwargs
)
1141 def Offset(*args
, **kwargs
):
1145 Same as OffsetXY but uses dx,dy from Point
1147 return _core
.Rect_Offset(*args
, **kwargs
)
1149 def Intersect(*args
, **kwargs
):
1151 Intersect(Rect rect) -> Rect
1153 Return the intersectsion of this rectangle and rect.
1155 return _core
.Rect_Intersect(*args
, **kwargs
)
1157 def __add__(*args
, **kwargs
):
1159 __add__(Rect rect) -> Rect
1161 Add the properties of rect to this rectangle and return the result.
1163 return _core
.Rect___add__(*args
, **kwargs
)
1165 def __iadd__(*args
, **kwargs
):
1167 __iadd__(Rect rect) -> Rect
1169 Add the properties of rect to this rectangle, updating this rectangle.
1171 return _core
.Rect___iadd__(*args
, **kwargs
)
1173 def __eq__(*args
, **kwargs
):
1175 __eq__(Rect rect) -> bool
1179 return _core
.Rect___eq__(*args
, **kwargs
)
1181 def __ne__(*args
, **kwargs
):
1183 __ne__(Rect rect) -> bool
1185 Test for inequality.
1187 return _core
.Rect___ne__(*args
, **kwargs
)
1189 def InsideXY(*args
, **kwargs
):
1191 InsideXY(int x, int y) -> bool
1193 Return True if the point is (not strcitly) inside the rect.
1195 return _core
.Rect_InsideXY(*args
, **kwargs
)
1197 def Inside(*args
, **kwargs
):
1199 Inside(Point pt) -> bool
1201 Return True if the point is (not strcitly) inside the rect.
1203 return _core
.Rect_Inside(*args
, **kwargs
)
1205 def Intersects(*args
, **kwargs
):
1207 Intersects(Rect rect) -> bool
1209 Returns True if the rectangles have a non empty intersection.
1211 return _core
.Rect_Intersects(*args
, **kwargs
)
1213 x
= property(_core
.Rect_x_get
, _core
.Rect_x_set
)
1214 y
= property(_core
.Rect_y_get
, _core
.Rect_y_set
)
1215 width
= property(_core
.Rect_width_get
, _core
.Rect_width_set
)
1216 height
= property(_core
.Rect_height_get
, _core
.Rect_height_set
)
1217 def Set(*args
, **kwargs
):
1219 Set(int x=0, int y=0, int width=0, int height=0)
1221 Set all rectangle properties.
1223 return _core
.Rect_Set(*args
, **kwargs
)
1225 def Get(*args
, **kwargs
):
1227 Get() -> (x,y,width,height)
1229 Return the rectangle properties as a tuple.
1231 return _core
.Rect_Get(*args
, **kwargs
)
1234 def __str__(self
): return str(self
.Get())
1235 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1236 def __len__(self
): return len(self
.Get())
1237 def __getitem__(self
, index
): return self
.Get()[index
]
1238 def __setitem__(self
, index
, val
):
1239 if index
== 0: self
.x
= val
1240 elif index
== 1: self
.y
= val
1241 elif index
== 2: self
.width
= val
1242 elif index
== 3: self
.height
= val
1243 else: raise IndexError
1244 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1245 __safe_for_unpickling__
= True
1246 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1249 class RectPtr(Rect
):
1250 def __init__(self
, this
):
1252 if not hasattr(self
,"thisown"): self
.thisown
= 0
1253 self
.__class
__ = Rect
1254 _core
.Rect_swigregister(RectPtr
)
1256 def RectPP(*args
, **kwargs
):
1258 RectPP(Point topLeft, Point bottomRight) -> Rect
1260 Create a new Rect object from Points representing two corners.
1262 val
= _core
.new_RectPP(*args
, **kwargs
)
1266 def RectPS(*args
, **kwargs
):
1268 RectPS(Point pos, Size size) -> Rect
1270 Create a new Rect from a position and size.
1272 val
= _core
.new_RectPS(*args
, **kwargs
)
1277 def IntersectRect(*args
, **kwargs
):
1279 IntersectRect(Rect r1, Rect r2) -> Rect
1281 Calculate and return the intersection of r1 and r2.
1283 return _core
.IntersectRect(*args
, **kwargs
)
1284 #---------------------------------------------------------------------------
1286 class Point2D(object):
1287 """wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values."""
1289 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1290 def __init__(self
, *args
, **kwargs
):
1292 __init__(double x=0.0, double y=0.0) -> Point2D
1294 Create a w.Point2D object.
1296 newobj
= _core
.new_Point2D(*args
, **kwargs
)
1297 self
.this
= newobj
.this
1300 def GetFloor(*args
, **kwargs
):
1306 return _core
.Point2D_GetFloor(*args
, **kwargs
)
1308 def GetRounded(*args
, **kwargs
):
1310 GetRounded() -> (x,y)
1314 return _core
.Point2D_GetRounded(*args
, **kwargs
)
1316 def GetVectorLength(*args
, **kwargs
):
1317 """GetVectorLength() -> double"""
1318 return _core
.Point2D_GetVectorLength(*args
, **kwargs
)
1320 def GetVectorAngle(*args
, **kwargs
):
1321 """GetVectorAngle() -> double"""
1322 return _core
.Point2D_GetVectorAngle(*args
, **kwargs
)
1324 def SetVectorLength(*args
, **kwargs
):
1325 """SetVectorLength(double length)"""
1326 return _core
.Point2D_SetVectorLength(*args
, **kwargs
)
1328 def SetVectorAngle(*args
, **kwargs
):
1329 """SetVectorAngle(double degrees)"""
1330 return _core
.Point2D_SetVectorAngle(*args
, **kwargs
)
1332 def SetPolarCoordinates(self
, angle
, length
):
1333 self
.SetVectorLength(length
)
1334 self
.SetVectorAngle(angle
)
1335 def Normalize(self
):
1336 self
.SetVectorLength(1.0)
1338 def GetDistance(*args
, **kwargs
):
1339 """GetDistance(Point2D pt) -> double"""
1340 return _core
.Point2D_GetDistance(*args
, **kwargs
)
1342 def GetDistanceSquare(*args
, **kwargs
):
1343 """GetDistanceSquare(Point2D pt) -> double"""
1344 return _core
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1346 def GetDotProduct(*args
, **kwargs
):
1347 """GetDotProduct(Point2D vec) -> double"""
1348 return _core
.Point2D_GetDotProduct(*args
, **kwargs
)
1350 def GetCrossProduct(*args
, **kwargs
):
1351 """GetCrossProduct(Point2D vec) -> double"""
1352 return _core
.Point2D_GetCrossProduct(*args
, **kwargs
)
1354 def __neg__(*args
, **kwargs
):
1356 __neg__() -> Point2D
1358 the reflection of this point
1360 return _core
.Point2D___neg__(*args
, **kwargs
)
1362 def __iadd__(*args
, **kwargs
):
1363 """__iadd__(Point2D pt) -> Point2D"""
1364 return _core
.Point2D___iadd__(*args
, **kwargs
)
1366 def __isub__(*args
, **kwargs
):
1367 """__isub__(Point2D pt) -> Point2D"""
1368 return _core
.Point2D___isub__(*args
, **kwargs
)
1370 def __imul__(*args
, **kwargs
):
1371 """__imul__(Point2D pt) -> Point2D"""
1372 return _core
.Point2D___imul__(*args
, **kwargs
)
1374 def __idiv__(*args
, **kwargs
):
1375 """__idiv__(Point2D pt) -> Point2D"""
1376 return _core
.Point2D___idiv__(*args
, **kwargs
)
1378 def __eq__(*args
, **kwargs
):
1380 __eq__(Point2D pt) -> bool
1384 return _core
.Point2D___eq__(*args
, **kwargs
)
1386 def __ne__(*args
, **kwargs
):
1388 __ne__(Point2D pt) -> bool
1392 return _core
.Point2D___ne__(*args
, **kwargs
)
1394 x
= property(_core
.Point2D_x_get
, _core
.Point2D_x_set
)
1395 y
= property(_core
.Point2D_y_get
, _core
.Point2D_y_set
)
1396 def Set(*args
, **kwargs
):
1397 """Set(double x=0, double y=0)"""
1398 return _core
.Point2D_Set(*args
, **kwargs
)
1400 def Get(*args
, **kwargs
):
1404 Return x and y properties as a tuple.
1406 return _core
.Point2D_Get(*args
, **kwargs
)
1409 def __str__(self
): return str(self
.Get())
1410 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1411 def __len__(self
): return len(self
.Get())
1412 def __getitem__(self
, index
): return self
.Get()[index
]
1413 def __setitem__(self
, index
, val
):
1414 if index
== 0: self
.x
= val
1415 elif index
== 1: self
.y
= val
1416 else: raise IndexError
1417 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1418 __safe_for_unpickling__
= True
1419 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1422 class Point2DPtr(Point2D
):
1423 def __init__(self
, this
):
1425 if not hasattr(self
,"thisown"): self
.thisown
= 0
1426 self
.__class
__ = Point2D
1427 _core
.Point2D_swigregister(Point2DPtr
)
1429 def Point2DCopy(*args
, **kwargs
):
1431 Point2DCopy(Point2D pt) -> Point2D
1433 Create a w.Point2D object.
1435 val
= _core
.new_Point2DCopy(*args
, **kwargs
)
1439 def Point2DFromPoint(*args
, **kwargs
):
1441 Point2DFromPoint(Point pt) -> Point2D
1443 Create a w.Point2D object.
1445 val
= _core
.new_Point2DFromPoint(*args
, **kwargs
)
1449 #---------------------------------------------------------------------------
1451 FromStart
= _core
.FromStart
1452 FromCurrent
= _core
.FromCurrent
1453 FromEnd
= _core
.FromEnd
1454 class InputStream(object):
1456 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1457 def __init__(self
, *args
, **kwargs
):
1458 """__init__(PyObject p) -> InputStream"""
1459 newobj
= _core
.new_InputStream(*args
, **kwargs
)
1460 self
.this
= newobj
.this
1463 def close(*args
, **kwargs
):
1465 return _core
.InputStream_close(*args
, **kwargs
)
1467 def flush(*args
, **kwargs
):
1469 return _core
.InputStream_flush(*args
, **kwargs
)
1471 def eof(*args
, **kwargs
):
1473 return _core
.InputStream_eof(*args
, **kwargs
)
1475 def read(*args
, **kwargs
):
1476 """read(int size=-1) -> PyObject"""
1477 return _core
.InputStream_read(*args
, **kwargs
)
1479 def readline(*args
, **kwargs
):
1480 """readline(int size=-1) -> PyObject"""
1481 return _core
.InputStream_readline(*args
, **kwargs
)
1483 def readlines(*args
, **kwargs
):
1484 """readlines(int sizehint=-1) -> PyObject"""
1485 return _core
.InputStream_readlines(*args
, **kwargs
)
1487 def seek(*args
, **kwargs
):
1488 """seek(int offset, int whence=0)"""
1489 return _core
.InputStream_seek(*args
, **kwargs
)
1491 def tell(*args
, **kwargs
):
1493 return _core
.InputStream_tell(*args
, **kwargs
)
1495 def Peek(*args
, **kwargs
):
1496 """Peek() -> char"""
1497 return _core
.InputStream_Peek(*args
, **kwargs
)
1499 def GetC(*args
, **kwargs
):
1500 """GetC() -> char"""
1501 return _core
.InputStream_GetC(*args
, **kwargs
)
1503 def LastRead(*args
, **kwargs
):
1504 """LastRead() -> size_t"""
1505 return _core
.InputStream_LastRead(*args
, **kwargs
)
1507 def CanRead(*args
, **kwargs
):
1508 """CanRead() -> bool"""
1509 return _core
.InputStream_CanRead(*args
, **kwargs
)
1511 def Eof(*args
, **kwargs
):
1513 return _core
.InputStream_Eof(*args
, **kwargs
)
1515 def Ungetch(*args
, **kwargs
):
1516 """Ungetch(char c) -> bool"""
1517 return _core
.InputStream_Ungetch(*args
, **kwargs
)
1519 def SeekI(*args
, **kwargs
):
1520 """SeekI(long pos, int mode=FromStart) -> long"""
1521 return _core
.InputStream_SeekI(*args
, **kwargs
)
1523 def TellI(*args
, **kwargs
):
1524 """TellI() -> long"""
1525 return _core
.InputStream_TellI(*args
, **kwargs
)
1528 class InputStreamPtr(InputStream
):
1529 def __init__(self
, this
):
1531 if not hasattr(self
,"thisown"): self
.thisown
= 0
1532 self
.__class
__ = InputStream
1533 _core
.InputStream_swigregister(InputStreamPtr
)
1534 DefaultPosition
= cvar
.DefaultPosition
1535 DefaultSize
= cvar
.DefaultSize
1537 class OutputStream(object):
1538 def __init__(self
): raise RuntimeError, "No constructor defined"
1540 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1541 def write(*args
, **kwargs
):
1542 """write(PyObject obj)"""
1543 return _core
.OutputStream_write(*args
, **kwargs
)
1546 class OutputStreamPtr(OutputStream
):
1547 def __init__(self
, this
):
1549 if not hasattr(self
,"thisown"): self
.thisown
= 0
1550 self
.__class
__ = OutputStream
1551 _core
.OutputStream_swigregister(OutputStreamPtr
)
1553 #---------------------------------------------------------------------------
1555 class FSFile(Object
):
1557 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1558 def __init__(self
, *args
, **kwargs
):
1560 __init__(InputStream stream, String loc, String mimetype, String anchor,
1561 DateTime modif) -> FSFile
1563 newobj
= _core
.new_FSFile(*args
, **kwargs
)
1564 self
.this
= newobj
.this
1567 def __del__(self
, destroy
=_core
.delete_FSFile
):
1570 if self
.thisown
: destroy(self
)
1573 def GetStream(*args
, **kwargs
):
1574 """GetStream() -> InputStream"""
1575 return _core
.FSFile_GetStream(*args
, **kwargs
)
1577 def GetMimeType(*args
, **kwargs
):
1578 """GetMimeType() -> String"""
1579 return _core
.FSFile_GetMimeType(*args
, **kwargs
)
1581 def GetLocation(*args
, **kwargs
):
1582 """GetLocation() -> String"""
1583 return _core
.FSFile_GetLocation(*args
, **kwargs
)
1585 def GetAnchor(*args
, **kwargs
):
1586 """GetAnchor() -> String"""
1587 return _core
.FSFile_GetAnchor(*args
, **kwargs
)
1589 def GetModificationTime(*args
, **kwargs
):
1590 """GetModificationTime() -> DateTime"""
1591 return _core
.FSFile_GetModificationTime(*args
, **kwargs
)
1594 class FSFilePtr(FSFile
):
1595 def __init__(self
, this
):
1597 if not hasattr(self
,"thisown"): self
.thisown
= 0
1598 self
.__class
__ = FSFile
1599 _core
.FSFile_swigregister(FSFilePtr
)
1601 class CPPFileSystemHandler(object):
1602 def __init__(self
): raise RuntimeError, "No constructor defined"
1604 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1606 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1607 def __init__(self
, this
):
1609 if not hasattr(self
,"thisown"): self
.thisown
= 0
1610 self
.__class
__ = CPPFileSystemHandler
1611 _core
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1613 class FileSystemHandler(CPPFileSystemHandler
):
1615 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1616 def __init__(self
, *args
, **kwargs
):
1617 """__init__() -> FileSystemHandler"""
1618 newobj
= _core
.new_FileSystemHandler(*args
, **kwargs
)
1619 self
.this
= newobj
.this
1622 self
._setCallbackInfo
(self
, FileSystemHandler
)
1624 def _setCallbackInfo(*args
, **kwargs
):
1625 """_setCallbackInfo(PyObject self, PyObject _class)"""
1626 return _core
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1628 def CanOpen(*args
, **kwargs
):
1629 """CanOpen(String location) -> bool"""
1630 return _core
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1632 def OpenFile(*args
, **kwargs
):
1633 """OpenFile(FileSystem fs, String location) -> FSFile"""
1634 return _core
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1636 def FindFirst(*args
, **kwargs
):
1637 """FindFirst(String spec, int flags=0) -> String"""
1638 return _core
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1640 def FindNext(*args
, **kwargs
):
1641 """FindNext() -> String"""
1642 return _core
.FileSystemHandler_FindNext(*args
, **kwargs
)
1644 def GetProtocol(*args
, **kwargs
):
1645 """GetProtocol(String location) -> String"""
1646 return _core
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1648 def GetLeftLocation(*args
, **kwargs
):
1649 """GetLeftLocation(String location) -> String"""
1650 return _core
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1652 def GetAnchor(*args
, **kwargs
):
1653 """GetAnchor(String location) -> String"""
1654 return _core
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1656 def GetRightLocation(*args
, **kwargs
):
1657 """GetRightLocation(String location) -> String"""
1658 return _core
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1660 def GetMimeTypeFromExt(*args
, **kwargs
):
1661 """GetMimeTypeFromExt(String location) -> String"""
1662 return _core
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1665 class FileSystemHandlerPtr(FileSystemHandler
):
1666 def __init__(self
, this
):
1668 if not hasattr(self
,"thisown"): self
.thisown
= 0
1669 self
.__class
__ = FileSystemHandler
1670 _core
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1672 class FileSystem(Object
):
1674 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1675 def __init__(self
, *args
, **kwargs
):
1676 """__init__() -> FileSystem"""
1677 newobj
= _core
.new_FileSystem(*args
, **kwargs
)
1678 self
.this
= newobj
.this
1681 def __del__(self
, destroy
=_core
.delete_FileSystem
):
1684 if self
.thisown
: destroy(self
)
1687 def ChangePathTo(*args
, **kwargs
):
1688 """ChangePathTo(String location, bool is_dir=False)"""
1689 return _core
.FileSystem_ChangePathTo(*args
, **kwargs
)
1691 def GetPath(*args
, **kwargs
):
1692 """GetPath() -> String"""
1693 return _core
.FileSystem_GetPath(*args
, **kwargs
)
1695 def OpenFile(*args
, **kwargs
):
1696 """OpenFile(String location) -> FSFile"""
1697 return _core
.FileSystem_OpenFile(*args
, **kwargs
)
1699 def FindFirst(*args
, **kwargs
):
1700 """FindFirst(String spec, int flags=0) -> String"""
1701 return _core
.FileSystem_FindFirst(*args
, **kwargs
)
1703 def FindNext(*args
, **kwargs
):
1704 """FindNext() -> String"""
1705 return _core
.FileSystem_FindNext(*args
, **kwargs
)
1707 def AddHandler(*args
, **kwargs
):
1708 """AddHandler(CPPFileSystemHandler handler)"""
1709 return _core
.FileSystem_AddHandler(*args
, **kwargs
)
1711 AddHandler
= staticmethod(AddHandler
)
1712 def CleanUpHandlers(*args
, **kwargs
):
1713 """CleanUpHandlers()"""
1714 return _core
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1716 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1717 def FileNameToURL(*args
, **kwargs
):
1718 """FileNameToURL(String filename) -> String"""
1719 return _core
.FileSystem_FileNameToURL(*args
, **kwargs
)
1721 FileNameToURL
= staticmethod(FileNameToURL
)
1723 class FileSystemPtr(FileSystem
):
1724 def __init__(self
, this
):
1726 if not hasattr(self
,"thisown"): self
.thisown
= 0
1727 self
.__class
__ = FileSystem
1728 _core
.FileSystem_swigregister(FileSystemPtr
)
1730 def FileSystem_AddHandler(*args
, **kwargs
):
1731 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1732 return _core
.FileSystem_AddHandler(*args
, **kwargs
)
1734 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1735 """FileSystem_CleanUpHandlers()"""
1736 return _core
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1738 def FileSystem_FileNameToURL(*args
, **kwargs
):
1739 """FileSystem_FileNameToURL(String filename) -> String"""
1740 return _core
.FileSystem_FileNameToURL(*args
, **kwargs
)
1743 def FileSystem_URLToFileName(*args
, **kwargs
):
1744 """FileSystem_URLToFileName(String url) -> String"""
1745 return _core
.FileSystem_URLToFileName(*args
, **kwargs
)
1746 class InternetFSHandler(CPPFileSystemHandler
):
1748 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1749 def __init__(self
, *args
, **kwargs
):
1750 """__init__() -> InternetFSHandler"""
1751 newobj
= _core
.new_InternetFSHandler(*args
, **kwargs
)
1752 self
.this
= newobj
.this
1755 def CanOpen(*args
, **kwargs
):
1756 """CanOpen(String location) -> bool"""
1757 return _core
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1759 def OpenFile(*args
, **kwargs
):
1760 """OpenFile(FileSystem fs, String location) -> FSFile"""
1761 return _core
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1764 class InternetFSHandlerPtr(InternetFSHandler
):
1765 def __init__(self
, this
):
1767 if not hasattr(self
,"thisown"): self
.thisown
= 0
1768 self
.__class
__ = InternetFSHandler
1769 _core
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1771 class ZipFSHandler(CPPFileSystemHandler
):
1773 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1774 def __init__(self
, *args
, **kwargs
):
1775 """__init__() -> ZipFSHandler"""
1776 newobj
= _core
.new_ZipFSHandler(*args
, **kwargs
)
1777 self
.this
= newobj
.this
1780 def CanOpen(*args
, **kwargs
):
1781 """CanOpen(String location) -> bool"""
1782 return _core
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1784 def OpenFile(*args
, **kwargs
):
1785 """OpenFile(FileSystem fs, String location) -> FSFile"""
1786 return _core
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1788 def FindFirst(*args
, **kwargs
):
1789 """FindFirst(String spec, int flags=0) -> String"""
1790 return _core
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1792 def FindNext(*args
, **kwargs
):
1793 """FindNext() -> String"""
1794 return _core
.ZipFSHandler_FindNext(*args
, **kwargs
)
1797 class ZipFSHandlerPtr(ZipFSHandler
):
1798 def __init__(self
, this
):
1800 if not hasattr(self
,"thisown"): self
.thisown
= 0
1801 self
.__class
__ = ZipFSHandler
1802 _core
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1805 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1806 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1807 return _core
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1809 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1810 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1811 return _core
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1813 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1814 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1815 return _core
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1816 def MemoryFSHandler_AddFile(filename
, a
, b
=''):
1817 if isinstance(a
, wx
.Image
):
1818 __wxMemoryFSHandler_AddFile_wxImage(filename
, a
, b
)
1819 elif isinstance(a
, wx
.Bitmap
):
1820 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, a
, b
)
1821 elif type(a
) == str:
1822 __wxMemoryFSHandler_AddFile_Data(filename
, a
)
1823 else: raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1825 class MemoryFSHandler(CPPFileSystemHandler
):
1827 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1828 def __init__(self
, *args
, **kwargs
):
1829 """__init__() -> MemoryFSHandler"""
1830 newobj
= _core
.new_MemoryFSHandler(*args
, **kwargs
)
1831 self
.this
= newobj
.this
1834 def RemoveFile(*args
, **kwargs
):
1835 """RemoveFile(String filename)"""
1836 return _core
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1838 RemoveFile
= staticmethod(RemoveFile
)
1839 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1840 def CanOpen(*args
, **kwargs
):
1841 """CanOpen(String location) -> bool"""
1842 return _core
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1844 def OpenFile(*args
, **kwargs
):
1845 """OpenFile(FileSystem fs, String location) -> FSFile"""
1846 return _core
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
1848 def FindFirst(*args
, **kwargs
):
1849 """FindFirst(String spec, int flags=0) -> String"""
1850 return _core
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
1852 def FindNext(*args
, **kwargs
):
1853 """FindNext() -> String"""
1854 return _core
.MemoryFSHandler_FindNext(*args
, **kwargs
)
1857 class MemoryFSHandlerPtr(MemoryFSHandler
):
1858 def __init__(self
, this
):
1860 if not hasattr(self
,"thisown"): self
.thisown
= 0
1861 self
.__class
__ = MemoryFSHandler
1862 _core
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
1864 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
1865 """MemoryFSHandler_RemoveFile(String filename)"""
1866 return _core
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1868 #---------------------------------------------------------------------------
1870 class ImageHandler(Object
):
1871 def __init__(self
): raise RuntimeError, "No constructor defined"
1873 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1874 def GetName(*args
, **kwargs
):
1875 """GetName() -> String"""
1876 return _core
.ImageHandler_GetName(*args
, **kwargs
)
1878 def GetExtension(*args
, **kwargs
):
1879 """GetExtension() -> String"""
1880 return _core
.ImageHandler_GetExtension(*args
, **kwargs
)
1882 def GetType(*args
, **kwargs
):
1883 """GetType() -> long"""
1884 return _core
.ImageHandler_GetType(*args
, **kwargs
)
1886 def GetMimeType(*args
, **kwargs
):
1887 """GetMimeType() -> String"""
1888 return _core
.ImageHandler_GetMimeType(*args
, **kwargs
)
1890 def CanRead(*args
, **kwargs
):
1891 """CanRead(String name) -> bool"""
1892 return _core
.ImageHandler_CanRead(*args
, **kwargs
)
1894 def SetName(*args
, **kwargs
):
1895 """SetName(String name)"""
1896 return _core
.ImageHandler_SetName(*args
, **kwargs
)
1898 def SetExtension(*args
, **kwargs
):
1899 """SetExtension(String extension)"""
1900 return _core
.ImageHandler_SetExtension(*args
, **kwargs
)
1902 def SetType(*args
, **kwargs
):
1903 """SetType(long type)"""
1904 return _core
.ImageHandler_SetType(*args
, **kwargs
)
1906 def SetMimeType(*args
, **kwargs
):
1907 """SetMimeType(String mimetype)"""
1908 return _core
.ImageHandler_SetMimeType(*args
, **kwargs
)
1911 class ImageHandlerPtr(ImageHandler
):
1912 def __init__(self
, this
):
1914 if not hasattr(self
,"thisown"): self
.thisown
= 0
1915 self
.__class
__ = ImageHandler
1916 _core
.ImageHandler_swigregister(ImageHandlerPtr
)
1918 class ImageHistogram(object):
1920 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1921 def __init__(self
, *args
, **kwargs
):
1922 """__init__() -> ImageHistogram"""
1923 newobj
= _core
.new_ImageHistogram(*args
, **kwargs
)
1924 self
.this
= newobj
.this
1927 def MakeKey(*args
, **kwargs
):
1929 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
1931 Get the key in the histogram for the given RGB values
1933 return _core
.ImageHistogram_MakeKey(*args
, **kwargs
)
1935 MakeKey
= staticmethod(MakeKey
)
1936 def FindFirstUnusedColour(*args
, **kwargs
):
1938 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
1940 Find first colour that is not used in the image and has higher RGB values than
1941 startR, startG, startB. Returns a tuple consisting of a success flag and rgb
1944 return _core
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
1947 class ImageHistogramPtr(ImageHistogram
):
1948 def __init__(self
, this
):
1950 if not hasattr(self
,"thisown"): self
.thisown
= 0
1951 self
.__class
__ = ImageHistogram
1952 _core
.ImageHistogram_swigregister(ImageHistogramPtr
)
1954 def ImageHistogram_MakeKey(*args
, **kwargs
):
1956 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
1958 Get the key in the histogram for the given RGB values
1960 return _core
.ImageHistogram_MakeKey(*args
, **kwargs
)
1962 class Image(Object
):
1964 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1965 def __init__(self
, *args
, **kwargs
):
1966 """__init__(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
1967 newobj
= _core
.new_Image(*args
, **kwargs
)
1968 self
.this
= newobj
.this
1971 def __del__(self
, destroy
=_core
.delete_Image
):
1974 if self
.thisown
: destroy(self
)
1977 def Create(*args
, **kwargs
):
1978 """Create(int width, int height)"""
1979 return _core
.Image_Create(*args
, **kwargs
)
1981 def Destroy(*args
, **kwargs
):
1985 Deletes the C++ object this Python object is a proxy for.
1987 return _core
.Image_Destroy(*args
, **kwargs
)
1989 def Scale(*args
, **kwargs
):
1990 """Scale(int width, int height) -> Image"""
1991 return _core
.Image_Scale(*args
, **kwargs
)
1993 def ShrinkBy(*args
, **kwargs
):
1994 """ShrinkBy(int xFactor, int yFactor) -> Image"""
1995 return _core
.Image_ShrinkBy(*args
, **kwargs
)
1997 def Rescale(*args
, **kwargs
):
1998 """Rescale(int width, int height) -> Image"""
1999 return _core
.Image_Rescale(*args
, **kwargs
)
2001 def SetRGB(*args
, **kwargs
):
2002 """SetRGB(int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2003 return _core
.Image_SetRGB(*args
, **kwargs
)
2005 def GetRed(*args
, **kwargs
):
2006 """GetRed(int x, int y) -> unsigned char"""
2007 return _core
.Image_GetRed(*args
, **kwargs
)
2009 def GetGreen(*args
, **kwargs
):
2010 """GetGreen(int x, int y) -> unsigned char"""
2011 return _core
.Image_GetGreen(*args
, **kwargs
)
2013 def GetBlue(*args
, **kwargs
):
2014 """GetBlue(int x, int y) -> unsigned char"""
2015 return _core
.Image_GetBlue(*args
, **kwargs
)
2017 def SetAlpha(*args
, **kwargs
):
2018 """SetAlpha(int x, int y, unsigned char alpha)"""
2019 return _core
.Image_SetAlpha(*args
, **kwargs
)
2021 def GetAlpha(*args
, **kwargs
):
2022 """GetAlpha(int x, int y) -> unsigned char"""
2023 return _core
.Image_GetAlpha(*args
, **kwargs
)
2025 def HasAlpha(*args
, **kwargs
):
2026 """HasAlpha() -> bool"""
2027 return _core
.Image_HasAlpha(*args
, **kwargs
)
2029 def FindFirstUnusedColour(*args
, **kwargs
):
2031 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2033 Find first colour that is not used in the image and has higher RGB values than
2034 startR, startG, startB. Returns a tuple consisting of a success flag and rgb
2037 return _core
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2039 def SetMaskFromImage(*args
, **kwargs
):
2040 """SetMaskFromImage(Image mask, byte mr, byte mg, byte mb) -> bool"""
2041 return _core
.Image_SetMaskFromImage(*args
, **kwargs
)
2043 def CanRead(*args
, **kwargs
):
2044 """CanRead(String name) -> bool"""
2045 return _core
.Image_CanRead(*args
, **kwargs
)
2047 CanRead
= staticmethod(CanRead
)
2048 def GetImageCount(*args
, **kwargs
):
2049 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2050 return _core
.Image_GetImageCount(*args
, **kwargs
)
2052 GetImageCount
= staticmethod(GetImageCount
)
2053 def LoadFile(*args
, **kwargs
):
2054 """LoadFile(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2055 return _core
.Image_LoadFile(*args
, **kwargs
)
2057 def LoadMimeFile(*args
, **kwargs
):
2058 """LoadMimeFile(String name, String mimetype, int index=-1) -> bool"""
2059 return _core
.Image_LoadMimeFile(*args
, **kwargs
)
2061 def SaveFile(*args
, **kwargs
):
2062 """SaveFile(String name, int type) -> bool"""
2063 return _core
.Image_SaveFile(*args
, **kwargs
)
2065 def SaveMimeFile(*args
, **kwargs
):
2066 """SaveMimeFile(String name, String mimetype) -> bool"""
2067 return _core
.Image_SaveMimeFile(*args
, **kwargs
)
2069 def CanReadStream(*args
, **kwargs
):
2070 """CanReadStream(InputStream stream) -> bool"""
2071 return _core
.Image_CanReadStream(*args
, **kwargs
)
2073 CanReadStream
= staticmethod(CanReadStream
)
2074 def LoadStream(*args
, **kwargs
):
2075 """LoadStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2076 return _core
.Image_LoadStream(*args
, **kwargs
)
2078 def LoadMimeStream(*args
, **kwargs
):
2079 """LoadMimeStream(InputStream stream, String mimetype, int index=-1) -> bool"""
2080 return _core
.Image_LoadMimeStream(*args
, **kwargs
)
2082 def Ok(*args
, **kwargs
):
2084 return _core
.Image_Ok(*args
, **kwargs
)
2086 def GetWidth(*args
, **kwargs
):
2087 """GetWidth() -> int"""
2088 return _core
.Image_GetWidth(*args
, **kwargs
)
2090 def GetHeight(*args
, **kwargs
):
2091 """GetHeight() -> int"""
2092 return _core
.Image_GetHeight(*args
, **kwargs
)
2094 def GetSize(*args
, **kwargs
):
2095 """GetSize() -> Size"""
2096 return _core
.Image_GetSize(*args
, **kwargs
)
2098 def GetSubImage(*args
, **kwargs
):
2099 """GetSubImage(Rect rect) -> Image"""
2100 return _core
.Image_GetSubImage(*args
, **kwargs
)
2102 def Copy(*args
, **kwargs
):
2103 """Copy() -> Image"""
2104 return _core
.Image_Copy(*args
, **kwargs
)
2106 def Paste(*args
, **kwargs
):
2107 """Paste(Image image, int x, int y)"""
2108 return _core
.Image_Paste(*args
, **kwargs
)
2110 def GetData(*args
, **kwargs
):
2111 """GetData() -> PyObject"""
2112 return _core
.Image_GetData(*args
, **kwargs
)
2114 def SetData(*args
, **kwargs
):
2115 """SetData(PyObject data)"""
2116 return _core
.Image_SetData(*args
, **kwargs
)
2118 def GetDataBuffer(*args
, **kwargs
):
2119 """GetDataBuffer() -> PyObject"""
2120 return _core
.Image_GetDataBuffer(*args
, **kwargs
)
2122 def SetDataBuffer(*args
, **kwargs
):
2123 """SetDataBuffer(PyObject data)"""
2124 return _core
.Image_SetDataBuffer(*args
, **kwargs
)
2126 def GetAlphaData(*args
, **kwargs
):
2127 """GetAlphaData() -> PyObject"""
2128 return _core
.Image_GetAlphaData(*args
, **kwargs
)
2130 def SetAlphaData(*args
, **kwargs
):
2131 """SetAlphaData(PyObject data)"""
2132 return _core
.Image_SetAlphaData(*args
, **kwargs
)
2134 def GetAlphaBuffer(*args
, **kwargs
):
2135 """GetAlphaBuffer() -> PyObject"""
2136 return _core
.Image_GetAlphaBuffer(*args
, **kwargs
)
2138 def SetAlphaBuffer(*args
, **kwargs
):
2139 """SetAlphaBuffer(PyObject data)"""
2140 return _core
.Image_SetAlphaBuffer(*args
, **kwargs
)
2142 def SetMaskColour(*args
, **kwargs
):
2143 """SetMaskColour(unsigned char r, unsigned char g, unsigned char b)"""
2144 return _core
.Image_SetMaskColour(*args
, **kwargs
)
2146 def GetMaskRed(*args
, **kwargs
):
2147 """GetMaskRed() -> unsigned char"""
2148 return _core
.Image_GetMaskRed(*args
, **kwargs
)
2150 def GetMaskGreen(*args
, **kwargs
):
2151 """GetMaskGreen() -> unsigned char"""
2152 return _core
.Image_GetMaskGreen(*args
, **kwargs
)
2154 def GetMaskBlue(*args
, **kwargs
):
2155 """GetMaskBlue() -> unsigned char"""
2156 return _core
.Image_GetMaskBlue(*args
, **kwargs
)
2158 def SetMask(*args
, **kwargs
):
2159 """SetMask(bool mask=True)"""
2160 return _core
.Image_SetMask(*args
, **kwargs
)
2162 def HasMask(*args
, **kwargs
):
2163 """HasMask() -> bool"""
2164 return _core
.Image_HasMask(*args
, **kwargs
)
2166 def Rotate(*args
, **kwargs
):
2168 Rotate(double angle, Point centre_of_rotation, bool interpolating=True,
2169 Point offset_after_rotation=None) -> Image
2171 return _core
.Image_Rotate(*args
, **kwargs
)
2173 def Rotate90(*args
, **kwargs
):
2174 """Rotate90(bool clockwise=True) -> Image"""
2175 return _core
.Image_Rotate90(*args
, **kwargs
)
2177 def Mirror(*args
, **kwargs
):
2178 """Mirror(bool horizontally=True) -> Image"""
2179 return _core
.Image_Mirror(*args
, **kwargs
)
2181 def Replace(*args
, **kwargs
):
2183 Replace(unsigned char r1, unsigned char g1, unsigned char b1,
2184 unsigned char r2, unsigned char g2, unsigned char b2)
2186 return _core
.Image_Replace(*args
, **kwargs
)
2188 def ConvertToMono(*args
, **kwargs
):
2189 """ConvertToMono(unsigned char r, unsigned char g, unsigned char b) -> Image"""
2190 return _core
.Image_ConvertToMono(*args
, **kwargs
)
2192 def SetOption(*args
, **kwargs
):
2193 """SetOption(String name, String value)"""
2194 return _core
.Image_SetOption(*args
, **kwargs
)
2196 def SetOptionInt(*args
, **kwargs
):
2197 """SetOptionInt(String name, int value)"""
2198 return _core
.Image_SetOptionInt(*args
, **kwargs
)
2200 def GetOption(*args
, **kwargs
):
2201 """GetOption(String name) -> String"""
2202 return _core
.Image_GetOption(*args
, **kwargs
)
2204 def GetOptionInt(*args
, **kwargs
):
2205 """GetOptionInt(String name) -> int"""
2206 return _core
.Image_GetOptionInt(*args
, **kwargs
)
2208 def HasOption(*args
, **kwargs
):
2209 """HasOption(String name) -> bool"""
2210 return _core
.Image_HasOption(*args
, **kwargs
)
2212 def CountColours(*args
, **kwargs
):
2213 """CountColours(unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2214 return _core
.Image_CountColours(*args
, **kwargs
)
2216 def ComputeHistogram(*args
, **kwargs
):
2217 """ComputeHistogram(ImageHistogram h) -> unsigned long"""
2218 return _core
.Image_ComputeHistogram(*args
, **kwargs
)
2220 def AddHandler(*args
, **kwargs
):
2221 """AddHandler(ImageHandler handler)"""
2222 return _core
.Image_AddHandler(*args
, **kwargs
)
2224 AddHandler
= staticmethod(AddHandler
)
2225 def InsertHandler(*args
, **kwargs
):
2226 """InsertHandler(ImageHandler handler)"""
2227 return _core
.Image_InsertHandler(*args
, **kwargs
)
2229 InsertHandler
= staticmethod(InsertHandler
)
2230 def RemoveHandler(*args
, **kwargs
):
2231 """RemoveHandler(String name) -> bool"""
2232 return _core
.Image_RemoveHandler(*args
, **kwargs
)
2234 RemoveHandler
= staticmethod(RemoveHandler
)
2235 def GetImageExtWildcard(*args
, **kwargs
):
2236 """GetImageExtWildcard() -> String"""
2237 return _core
.Image_GetImageExtWildcard(*args
, **kwargs
)
2239 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2240 def ConvertToBitmap(*args
, **kwargs
):
2241 """ConvertToBitmap() -> Bitmap"""
2242 return _core
.Image_ConvertToBitmap(*args
, **kwargs
)
2244 def ConvertToMonoBitmap(*args
, **kwargs
):
2245 """ConvertToMonoBitmap(unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2246 return _core
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2248 def __nonzero__(self
): return self
.Ok()
2250 class ImagePtr(Image
):
2251 def __init__(self
, this
):
2253 if not hasattr(self
,"thisown"): self
.thisown
= 0
2254 self
.__class
__ = Image
2255 _core
.Image_swigregister(ImagePtr
)
2257 def ImageFromMime(*args
, **kwargs
):
2258 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2259 val
= _core
.new_ImageFromMime(*args
, **kwargs
)
2263 def ImageFromStream(*args
, **kwargs
):
2264 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2265 val
= _core
.new_ImageFromStream(*args
, **kwargs
)
2269 def ImageFromStreamMime(*args
, **kwargs
):
2270 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2271 val
= _core
.new_ImageFromStreamMime(*args
, **kwargs
)
2275 def EmptyImage(*args
):
2277 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2278 EmptyImage(Size size, bool clear=True) -> Image
2280 val
= _core
.new_EmptyImage(*args
)
2284 def ImageFromBitmap(*args
, **kwargs
):
2285 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2286 val
= _core
.new_ImageFromBitmap(*args
, **kwargs
)
2290 def ImageFromData(*args
, **kwargs
):
2291 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2292 val
= _core
.new_ImageFromData(*args
, **kwargs
)
2296 def Image_CanRead(*args
, **kwargs
):
2297 """Image_CanRead(String name) -> bool"""
2298 return _core
.Image_CanRead(*args
, **kwargs
)
2300 def Image_GetImageCount(*args
, **kwargs
):
2301 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2302 return _core
.Image_GetImageCount(*args
, **kwargs
)
2304 def Image_CanReadStream(*args
, **kwargs
):
2305 """Image_CanReadStream(InputStream stream) -> bool"""
2306 return _core
.Image_CanReadStream(*args
, **kwargs
)
2308 def Image_AddHandler(*args
, **kwargs
):
2309 """Image_AddHandler(ImageHandler handler)"""
2310 return _core
.Image_AddHandler(*args
, **kwargs
)
2312 def Image_InsertHandler(*args
, **kwargs
):
2313 """Image_InsertHandler(ImageHandler handler)"""
2314 return _core
.Image_InsertHandler(*args
, **kwargs
)
2316 def Image_RemoveHandler(*args
, **kwargs
):
2317 """Image_RemoveHandler(String name) -> bool"""
2318 return _core
.Image_RemoveHandler(*args
, **kwargs
)
2320 def Image_GetImageExtWildcard(*args
, **kwargs
):
2321 """Image_GetImageExtWildcard() -> String"""
2322 return _core
.Image_GetImageExtWildcard(*args
, **kwargs
)
2325 def InitAllImageHandlers(*args
, **kwargs
):
2326 """InitAllImageHandlers()"""
2327 return _core
.InitAllImageHandlers(*args
, **kwargs
)
2328 IMAGE_RESOLUTION_INCHES
= _core
.IMAGE_RESOLUTION_INCHES
2329 IMAGE_RESOLUTION_CM
= _core
.IMAGE_RESOLUTION_CM
2330 BMP_24BPP
= _core
.BMP_24BPP
2331 BMP_8BPP
= _core
.BMP_8BPP
2332 BMP_8BPP_GREY
= _core
.BMP_8BPP_GREY
2333 BMP_8BPP_GRAY
= _core
.BMP_8BPP_GRAY
2334 BMP_8BPP_RED
= _core
.BMP_8BPP_RED
2335 BMP_8BPP_PALETTE
= _core
.BMP_8BPP_PALETTE
2336 BMP_4BPP
= _core
.BMP_4BPP
2337 BMP_1BPP
= _core
.BMP_1BPP
2338 BMP_1BPP_BW
= _core
.BMP_1BPP_BW
2339 class BMPHandler(ImageHandler
):
2341 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2342 def __init__(self
, *args
, **kwargs
):
2343 """__init__() -> BMPHandler"""
2344 newobj
= _core
.new_BMPHandler(*args
, **kwargs
)
2345 self
.this
= newobj
.this
2349 class BMPHandlerPtr(BMPHandler
):
2350 def __init__(self
, this
):
2352 if not hasattr(self
,"thisown"): self
.thisown
= 0
2353 self
.__class
__ = BMPHandler
2354 _core
.BMPHandler_swigregister(BMPHandlerPtr
)
2355 NullImage
= cvar
.NullImage
2356 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2357 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2358 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2359 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2360 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2362 class ICOHandler(BMPHandler
):
2364 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2365 def __init__(self
, *args
, **kwargs
):
2366 """__init__() -> ICOHandler"""
2367 newobj
= _core
.new_ICOHandler(*args
, **kwargs
)
2368 self
.this
= newobj
.this
2372 class ICOHandlerPtr(ICOHandler
):
2373 def __init__(self
, this
):
2375 if not hasattr(self
,"thisown"): self
.thisown
= 0
2376 self
.__class
__ = ICOHandler
2377 _core
.ICOHandler_swigregister(ICOHandlerPtr
)
2379 class CURHandler(ICOHandler
):
2381 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2382 def __init__(self
, *args
, **kwargs
):
2383 """__init__() -> CURHandler"""
2384 newobj
= _core
.new_CURHandler(*args
, **kwargs
)
2385 self
.this
= newobj
.this
2389 class CURHandlerPtr(CURHandler
):
2390 def __init__(self
, this
):
2392 if not hasattr(self
,"thisown"): self
.thisown
= 0
2393 self
.__class
__ = CURHandler
2394 _core
.CURHandler_swigregister(CURHandlerPtr
)
2396 class ANIHandler(CURHandler
):
2398 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2399 def __init__(self
, *args
, **kwargs
):
2400 """__init__() -> ANIHandler"""
2401 newobj
= _core
.new_ANIHandler(*args
, **kwargs
)
2402 self
.this
= newobj
.this
2406 class ANIHandlerPtr(ANIHandler
):
2407 def __init__(self
, this
):
2409 if not hasattr(self
,"thisown"): self
.thisown
= 0
2410 self
.__class
__ = ANIHandler
2411 _core
.ANIHandler_swigregister(ANIHandlerPtr
)
2413 class PNGHandler(ImageHandler
):
2415 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2416 def __init__(self
, *args
, **kwargs
):
2417 """__init__() -> PNGHandler"""
2418 newobj
= _core
.new_PNGHandler(*args
, **kwargs
)
2419 self
.this
= newobj
.this
2423 class PNGHandlerPtr(PNGHandler
):
2424 def __init__(self
, this
):
2426 if not hasattr(self
,"thisown"): self
.thisown
= 0
2427 self
.__class
__ = PNGHandler
2428 _core
.PNGHandler_swigregister(PNGHandlerPtr
)
2430 class GIFHandler(ImageHandler
):
2432 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2433 def __init__(self
, *args
, **kwargs
):
2434 """__init__() -> GIFHandler"""
2435 newobj
= _core
.new_GIFHandler(*args
, **kwargs
)
2436 self
.this
= newobj
.this
2440 class GIFHandlerPtr(GIFHandler
):
2441 def __init__(self
, this
):
2443 if not hasattr(self
,"thisown"): self
.thisown
= 0
2444 self
.__class
__ = GIFHandler
2445 _core
.GIFHandler_swigregister(GIFHandlerPtr
)
2447 class PCXHandler(ImageHandler
):
2449 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2450 def __init__(self
, *args
, **kwargs
):
2451 """__init__() -> PCXHandler"""
2452 newobj
= _core
.new_PCXHandler(*args
, **kwargs
)
2453 self
.this
= newobj
.this
2457 class PCXHandlerPtr(PCXHandler
):
2458 def __init__(self
, this
):
2460 if not hasattr(self
,"thisown"): self
.thisown
= 0
2461 self
.__class
__ = PCXHandler
2462 _core
.PCXHandler_swigregister(PCXHandlerPtr
)
2464 class JPEGHandler(ImageHandler
):
2466 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2467 def __init__(self
, *args
, **kwargs
):
2468 """__init__() -> JPEGHandler"""
2469 newobj
= _core
.new_JPEGHandler(*args
, **kwargs
)
2470 self
.this
= newobj
.this
2474 class JPEGHandlerPtr(JPEGHandler
):
2475 def __init__(self
, this
):
2477 if not hasattr(self
,"thisown"): self
.thisown
= 0
2478 self
.__class
__ = JPEGHandler
2479 _core
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2481 class PNMHandler(ImageHandler
):
2483 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2484 def __init__(self
, *args
, **kwargs
):
2485 """__init__() -> PNMHandler"""
2486 newobj
= _core
.new_PNMHandler(*args
, **kwargs
)
2487 self
.this
= newobj
.this
2491 class PNMHandlerPtr(PNMHandler
):
2492 def __init__(self
, this
):
2494 if not hasattr(self
,"thisown"): self
.thisown
= 0
2495 self
.__class
__ = PNMHandler
2496 _core
.PNMHandler_swigregister(PNMHandlerPtr
)
2498 class XPMHandler(ImageHandler
):
2500 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2501 def __init__(self
, *args
, **kwargs
):
2502 """__init__() -> XPMHandler"""
2503 newobj
= _core
.new_XPMHandler(*args
, **kwargs
)
2504 self
.this
= newobj
.this
2508 class XPMHandlerPtr(XPMHandler
):
2509 def __init__(self
, this
):
2511 if not hasattr(self
,"thisown"): self
.thisown
= 0
2512 self
.__class
__ = XPMHandler
2513 _core
.XPMHandler_swigregister(XPMHandlerPtr
)
2515 class TIFFHandler(ImageHandler
):
2517 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2518 def __init__(self
, *args
, **kwargs
):
2519 """__init__() -> TIFFHandler"""
2520 newobj
= _core
.new_TIFFHandler(*args
, **kwargs
)
2521 self
.this
= newobj
.this
2525 class TIFFHandlerPtr(TIFFHandler
):
2526 def __init__(self
, this
):
2528 if not hasattr(self
,"thisown"): self
.thisown
= 0
2529 self
.__class
__ = TIFFHandler
2530 _core
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2532 #---------------------------------------------------------------------------
2534 class EvtHandler(Object
):
2536 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2537 def __init__(self
, *args
, **kwargs
):
2538 """__init__() -> EvtHandler"""
2539 newobj
= _core
.new_EvtHandler(*args
, **kwargs
)
2540 self
.this
= newobj
.this
2543 def GetNextHandler(*args
, **kwargs
):
2544 """GetNextHandler() -> EvtHandler"""
2545 return _core
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2547 def GetPreviousHandler(*args
, **kwargs
):
2548 """GetPreviousHandler() -> EvtHandler"""
2549 return _core
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2551 def SetNextHandler(*args
, **kwargs
):
2552 """SetNextHandler(EvtHandler handler)"""
2553 return _core
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2555 def SetPreviousHandler(*args
, **kwargs
):
2556 """SetPreviousHandler(EvtHandler handler)"""
2557 return _core
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2559 def GetEvtHandlerEnabled(*args
, **kwargs
):
2560 """GetEvtHandlerEnabled() -> bool"""
2561 return _core
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2563 def SetEvtHandlerEnabled(*args
, **kwargs
):
2564 """SetEvtHandlerEnabled(bool enabled)"""
2565 return _core
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2567 def ProcessEvent(*args
, **kwargs
):
2568 """ProcessEvent(Event event) -> bool"""
2569 return _core
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2571 def AddPendingEvent(*args
, **kwargs
):
2572 """AddPendingEvent(Event event)"""
2573 return _core
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2575 def ProcessPendingEvents(*args
, **kwargs
):
2576 """ProcessPendingEvents()"""
2577 return _core
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2579 def Connect(*args
, **kwargs
):
2580 """Connect(int id, int lastId, int eventType, PyObject func)"""
2581 return _core
.EvtHandler_Connect(*args
, **kwargs
)
2583 def Disconnect(*args
, **kwargs
):
2584 """Disconnect(int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2585 return _core
.EvtHandler_Disconnect(*args
, **kwargs
)
2587 def _setOORInfo(*args
, **kwargs
):
2588 """_setOORInfo(PyObject _self)"""
2589 return _core
.EvtHandler__setOORInfo(*args
, **kwargs
)
2591 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2593 Bind an event to an event handler.
2595 event One of the EVT_* objects that specifies the
2596 type of event to bind,
2598 handler A callable object to be invoked when the event
2599 is delivered to self. Pass None to disconnect an
2602 source Sometimes the event originates from a different window
2603 than self, but you still want to catch it in self. (For
2604 example, a button event delivered to a frame.) By
2605 passing the source of the event, the event handling
2606 system is able to differentiate between the same event
2607 type from different controls.
2609 id,id2 Used for menu IDs or for event types that require a
2612 if source
is not None:
2614 event
.Bind(self
, id, id2
, handler
)
2618 class EvtHandlerPtr(EvtHandler
):
2619 def __init__(self
, this
):
2621 if not hasattr(self
,"thisown"): self
.thisown
= 0
2622 self
.__class
__ = EvtHandler
2623 _core
.EvtHandler_swigregister(EvtHandlerPtr
)
2625 #---------------------------------------------------------------------------
2627 class PyEventBinder(object):
2629 Instances of this class are used to bind specific events to event
2632 def __init__(self
, evtType
, expectedIDs
=0):
2633 if expectedIDs
not in [0, 1, 2]:
2634 raise ValueError, "Invalid number of expectedIDs"
2635 self
.expectedIDs
= expectedIDs
2637 if type(evtType
) == list or type(evtType
) == tuple:
2638 self
.evtType
= evtType
2640 self
.evtType
= [evtType
]
2643 def Bind(self
, target
, id1
, id2
, function
):
2644 """Bind this set of event types to target."""
2645 for et
in self
.evtType
:
2646 target
.Connect(id1
, id2
, et
, function
)
2649 def __call__(self
, *args
):
2651 For backwards compatibility with the old EVT_* functions.
2652 Should be called with either (window, func), (window, ID,
2653 func) or (window, ID1, ID2, func) parameters depending on the
2656 assert len(args
) == 2 + self
.expectedIDs
2660 if self
.expectedIDs
== 0:
2662 elif self
.expectedIDs
== 1:
2665 elif self
.expectedIDs
== 2:
2670 raise ValueError, "Unexpected number of IDs"
2672 self
.Bind(target
, id1
, id2
, func
)
2675 # These two are square pegs that don't fit the PyEventBinder hole...
2676 def EVT_COMMAND(win
, id, cmd
, func
):
2677 win
.Connect(id, -1, cmd
, func
)
2678 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2679 win
.Connect(id1
, id2
, cmd
, func
)
2682 #---------------------------------------------------------------------------
2684 #---------------------------------------------------------------------------
2686 EVENT_PROPAGATE_NONE
= _core
.EVENT_PROPAGATE_NONE
2687 EVENT_PROPAGATE_MAX
= _core
.EVENT_PROPAGATE_MAX
2689 def NewEventType(*args
, **kwargs
):
2690 """NewEventType() -> wxEventType"""
2691 return _core
.NewEventType(*args
, **kwargs
)
2692 wxEVT_NULL
= _core
.wxEVT_NULL
2693 wxEVT_FIRST
= _core
.wxEVT_FIRST
2694 wxEVT_USER_FIRST
= _core
.wxEVT_USER_FIRST
2695 wxEVT_COMMAND_BUTTON_CLICKED
= _core
.wxEVT_COMMAND_BUTTON_CLICKED
2696 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core
.wxEVT_COMMAND_CHECKBOX_CLICKED
2697 wxEVT_COMMAND_CHOICE_SELECTED
= _core
.wxEVT_COMMAND_CHOICE_SELECTED
2698 wxEVT_COMMAND_LISTBOX_SELECTED
= _core
.wxEVT_COMMAND_LISTBOX_SELECTED
2699 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2700 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2701 wxEVT_COMMAND_MENU_SELECTED
= _core
.wxEVT_COMMAND_MENU_SELECTED
2702 wxEVT_COMMAND_TOOL_CLICKED
= _core
.wxEVT_COMMAND_TOOL_CLICKED
2703 wxEVT_COMMAND_SLIDER_UPDATED
= _core
.wxEVT_COMMAND_SLIDER_UPDATED
2704 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core
.wxEVT_COMMAND_RADIOBOX_SELECTED
2705 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2706 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core
.wxEVT_COMMAND_SCROLLBAR_UPDATED
2707 wxEVT_COMMAND_VLBOX_SELECTED
= _core
.wxEVT_COMMAND_VLBOX_SELECTED
2708 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core
.wxEVT_COMMAND_COMBOBOX_SELECTED
2709 wxEVT_COMMAND_TOOL_RCLICKED
= _core
.wxEVT_COMMAND_TOOL_RCLICKED
2710 wxEVT_COMMAND_TOOL_ENTER
= _core
.wxEVT_COMMAND_TOOL_ENTER
2711 wxEVT_LEFT_DOWN
= _core
.wxEVT_LEFT_DOWN
2712 wxEVT_LEFT_UP
= _core
.wxEVT_LEFT_UP
2713 wxEVT_MIDDLE_DOWN
= _core
.wxEVT_MIDDLE_DOWN
2714 wxEVT_MIDDLE_UP
= _core
.wxEVT_MIDDLE_UP
2715 wxEVT_RIGHT_DOWN
= _core
.wxEVT_RIGHT_DOWN
2716 wxEVT_RIGHT_UP
= _core
.wxEVT_RIGHT_UP
2717 wxEVT_MOTION
= _core
.wxEVT_MOTION
2718 wxEVT_ENTER_WINDOW
= _core
.wxEVT_ENTER_WINDOW
2719 wxEVT_LEAVE_WINDOW
= _core
.wxEVT_LEAVE_WINDOW
2720 wxEVT_LEFT_DCLICK
= _core
.wxEVT_LEFT_DCLICK
2721 wxEVT_MIDDLE_DCLICK
= _core
.wxEVT_MIDDLE_DCLICK
2722 wxEVT_RIGHT_DCLICK
= _core
.wxEVT_RIGHT_DCLICK
2723 wxEVT_SET_FOCUS
= _core
.wxEVT_SET_FOCUS
2724 wxEVT_KILL_FOCUS
= _core
.wxEVT_KILL_FOCUS
2725 wxEVT_CHILD_FOCUS
= _core
.wxEVT_CHILD_FOCUS
2726 wxEVT_MOUSEWHEEL
= _core
.wxEVT_MOUSEWHEEL
2727 wxEVT_NC_LEFT_DOWN
= _core
.wxEVT_NC_LEFT_DOWN
2728 wxEVT_NC_LEFT_UP
= _core
.wxEVT_NC_LEFT_UP
2729 wxEVT_NC_MIDDLE_DOWN
= _core
.wxEVT_NC_MIDDLE_DOWN
2730 wxEVT_NC_MIDDLE_UP
= _core
.wxEVT_NC_MIDDLE_UP
2731 wxEVT_NC_RIGHT_DOWN
= _core
.wxEVT_NC_RIGHT_DOWN
2732 wxEVT_NC_RIGHT_UP
= _core
.wxEVT_NC_RIGHT_UP
2733 wxEVT_NC_MOTION
= _core
.wxEVT_NC_MOTION
2734 wxEVT_NC_ENTER_WINDOW
= _core
.wxEVT_NC_ENTER_WINDOW
2735 wxEVT_NC_LEAVE_WINDOW
= _core
.wxEVT_NC_LEAVE_WINDOW
2736 wxEVT_NC_LEFT_DCLICK
= _core
.wxEVT_NC_LEFT_DCLICK
2737 wxEVT_NC_MIDDLE_DCLICK
= _core
.wxEVT_NC_MIDDLE_DCLICK
2738 wxEVT_NC_RIGHT_DCLICK
= _core
.wxEVT_NC_RIGHT_DCLICK
2739 wxEVT_CHAR
= _core
.wxEVT_CHAR
2740 wxEVT_CHAR_HOOK
= _core
.wxEVT_CHAR_HOOK
2741 wxEVT_NAVIGATION_KEY
= _core
.wxEVT_NAVIGATION_KEY
2742 wxEVT_KEY_DOWN
= _core
.wxEVT_KEY_DOWN
2743 wxEVT_KEY_UP
= _core
.wxEVT_KEY_UP
2744 wxEVT_HOTKEY
= _core
.wxEVT_HOTKEY
2745 wxEVT_SET_CURSOR
= _core
.wxEVT_SET_CURSOR
2746 wxEVT_SCROLL_TOP
= _core
.wxEVT_SCROLL_TOP
2747 wxEVT_SCROLL_BOTTOM
= _core
.wxEVT_SCROLL_BOTTOM
2748 wxEVT_SCROLL_LINEUP
= _core
.wxEVT_SCROLL_LINEUP
2749 wxEVT_SCROLL_LINEDOWN
= _core
.wxEVT_SCROLL_LINEDOWN
2750 wxEVT_SCROLL_PAGEUP
= _core
.wxEVT_SCROLL_PAGEUP
2751 wxEVT_SCROLL_PAGEDOWN
= _core
.wxEVT_SCROLL_PAGEDOWN
2752 wxEVT_SCROLL_THUMBTRACK
= _core
.wxEVT_SCROLL_THUMBTRACK
2753 wxEVT_SCROLL_THUMBRELEASE
= _core
.wxEVT_SCROLL_THUMBRELEASE
2754 wxEVT_SCROLL_ENDSCROLL
= _core
.wxEVT_SCROLL_ENDSCROLL
2755 wxEVT_SCROLLWIN_TOP
= _core
.wxEVT_SCROLLWIN_TOP
2756 wxEVT_SCROLLWIN_BOTTOM
= _core
.wxEVT_SCROLLWIN_BOTTOM
2757 wxEVT_SCROLLWIN_LINEUP
= _core
.wxEVT_SCROLLWIN_LINEUP
2758 wxEVT_SCROLLWIN_LINEDOWN
= _core
.wxEVT_SCROLLWIN_LINEDOWN
2759 wxEVT_SCROLLWIN_PAGEUP
= _core
.wxEVT_SCROLLWIN_PAGEUP
2760 wxEVT_SCROLLWIN_PAGEDOWN
= _core
.wxEVT_SCROLLWIN_PAGEDOWN
2761 wxEVT_SCROLLWIN_THUMBTRACK
= _core
.wxEVT_SCROLLWIN_THUMBTRACK
2762 wxEVT_SCROLLWIN_THUMBRELEASE
= _core
.wxEVT_SCROLLWIN_THUMBRELEASE
2763 wxEVT_SIZE
= _core
.wxEVT_SIZE
2764 wxEVT_MOVE
= _core
.wxEVT_MOVE
2765 wxEVT_CLOSE_WINDOW
= _core
.wxEVT_CLOSE_WINDOW
2766 wxEVT_END_SESSION
= _core
.wxEVT_END_SESSION
2767 wxEVT_QUERY_END_SESSION
= _core
.wxEVT_QUERY_END_SESSION
2768 wxEVT_ACTIVATE_APP
= _core
.wxEVT_ACTIVATE_APP
2769 wxEVT_POWER
= _core
.wxEVT_POWER
2770 wxEVT_ACTIVATE
= _core
.wxEVT_ACTIVATE
2771 wxEVT_CREATE
= _core
.wxEVT_CREATE
2772 wxEVT_DESTROY
= _core
.wxEVT_DESTROY
2773 wxEVT_SHOW
= _core
.wxEVT_SHOW
2774 wxEVT_ICONIZE
= _core
.wxEVT_ICONIZE
2775 wxEVT_MAXIMIZE
= _core
.wxEVT_MAXIMIZE
2776 wxEVT_MOUSE_CAPTURE_CHANGED
= _core
.wxEVT_MOUSE_CAPTURE_CHANGED
2777 wxEVT_PAINT
= _core
.wxEVT_PAINT
2778 wxEVT_ERASE_BACKGROUND
= _core
.wxEVT_ERASE_BACKGROUND
2779 wxEVT_NC_PAINT
= _core
.wxEVT_NC_PAINT
2780 wxEVT_PAINT_ICON
= _core
.wxEVT_PAINT_ICON
2781 wxEVT_MENU_OPEN
= _core
.wxEVT_MENU_OPEN
2782 wxEVT_MENU_CLOSE
= _core
.wxEVT_MENU_CLOSE
2783 wxEVT_MENU_HIGHLIGHT
= _core
.wxEVT_MENU_HIGHLIGHT
2784 wxEVT_CONTEXT_MENU
= _core
.wxEVT_CONTEXT_MENU
2785 wxEVT_SYS_COLOUR_CHANGED
= _core
.wxEVT_SYS_COLOUR_CHANGED
2786 wxEVT_DISPLAY_CHANGED
= _core
.wxEVT_DISPLAY_CHANGED
2787 wxEVT_SETTING_CHANGED
= _core
.wxEVT_SETTING_CHANGED
2788 wxEVT_QUERY_NEW_PALETTE
= _core
.wxEVT_QUERY_NEW_PALETTE
2789 wxEVT_PALETTE_CHANGED
= _core
.wxEVT_PALETTE_CHANGED
2790 wxEVT_DROP_FILES
= _core
.wxEVT_DROP_FILES
2791 wxEVT_DRAW_ITEM
= _core
.wxEVT_DRAW_ITEM
2792 wxEVT_MEASURE_ITEM
= _core
.wxEVT_MEASURE_ITEM
2793 wxEVT_COMPARE_ITEM
= _core
.wxEVT_COMPARE_ITEM
2794 wxEVT_INIT_DIALOG
= _core
.wxEVT_INIT_DIALOG
2795 wxEVT_IDLE
= _core
.wxEVT_IDLE
2796 wxEVT_UPDATE_UI
= _core
.wxEVT_UPDATE_UI
2797 wxEVT_SIZING
= _core
.wxEVT_SIZING
2798 wxEVT_MOVING
= _core
.wxEVT_MOVING
2799 wxEVT_COMMAND_LEFT_CLICK
= _core
.wxEVT_COMMAND_LEFT_CLICK
2800 wxEVT_COMMAND_LEFT_DCLICK
= _core
.wxEVT_COMMAND_LEFT_DCLICK
2801 wxEVT_COMMAND_RIGHT_CLICK
= _core
.wxEVT_COMMAND_RIGHT_CLICK
2802 wxEVT_COMMAND_RIGHT_DCLICK
= _core
.wxEVT_COMMAND_RIGHT_DCLICK
2803 wxEVT_COMMAND_SET_FOCUS
= _core
.wxEVT_COMMAND_SET_FOCUS
2804 wxEVT_COMMAND_KILL_FOCUS
= _core
.wxEVT_COMMAND_KILL_FOCUS
2805 wxEVT_COMMAND_ENTER
= _core
.wxEVT_COMMAND_ENTER
2807 # Create some event binders
2808 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
2809 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
2810 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
2811 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
2812 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
2813 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
2814 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
2815 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
2816 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
2817 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
2818 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
2819 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
2820 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
2821 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
2822 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
2823 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
2824 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
2825 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
2826 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
2827 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
2828 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
2829 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
2830 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
2831 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
2832 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
2833 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
2834 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
2835 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
2836 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
2837 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
2838 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
2839 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
2840 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
2841 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
2842 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
2843 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
2844 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
2845 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
2846 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
2847 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
2849 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
2850 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
2851 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
2852 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
2853 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
2854 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
2855 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
2856 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
2857 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
2858 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
2859 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
2860 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
2861 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
2863 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
2871 wxEVT_MIDDLE_DCLICK
,
2879 # Scrolling from wxWindow (sent to wxScrolledWindow)
2880 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
2881 wxEVT_SCROLLWIN_BOTTOM
,
2882 wxEVT_SCROLLWIN_LINEUP
,
2883 wxEVT_SCROLLWIN_LINEDOWN
,
2884 wxEVT_SCROLLWIN_PAGEUP
,
2885 wxEVT_SCROLLWIN_PAGEDOWN
,
2886 wxEVT_SCROLLWIN_THUMBTRACK
,
2887 wxEVT_SCROLLWIN_THUMBRELEASE
,
2890 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
2891 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
2892 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
2893 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
2894 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
2895 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
2896 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
2897 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
2899 # Scrolling from wxSlider and wxScrollBar
2900 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
2901 wxEVT_SCROLL_BOTTOM
,
2902 wxEVT_SCROLL_LINEUP
,
2903 wxEVT_SCROLL_LINEDOWN
,
2904 wxEVT_SCROLL_PAGEUP
,
2905 wxEVT_SCROLL_PAGEDOWN
,
2906 wxEVT_SCROLL_THUMBTRACK
,
2907 wxEVT_SCROLL_THUMBRELEASE
,
2908 wxEVT_SCROLL_ENDSCROLL
,
2911 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
2912 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
2913 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
2914 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
2915 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
2916 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
2917 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
2918 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
2919 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
2921 # Scrolling from wxSlider and wxScrollBar, with an id
2922 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
2923 wxEVT_SCROLL_BOTTOM
,
2924 wxEVT_SCROLL_LINEUP
,
2925 wxEVT_SCROLL_LINEDOWN
,
2926 wxEVT_SCROLL_PAGEUP
,
2927 wxEVT_SCROLL_PAGEDOWN
,
2928 wxEVT_SCROLL_THUMBTRACK
,
2929 wxEVT_SCROLL_THUMBRELEASE
,
2930 wxEVT_SCROLL_ENDSCROLL
,
2933 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
2934 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
2935 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
2936 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
2937 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
2938 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
2939 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
2940 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
2941 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
2943 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
2944 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
2945 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
2946 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
2947 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
2948 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
2949 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
2950 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
2951 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
2952 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
2954 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
2955 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
2956 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
2957 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
2958 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
2959 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
2960 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
2961 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
2962 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
2965 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
2966 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
2967 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
2968 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
2969 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
2970 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
2971 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
2973 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
2975 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
2976 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
2978 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
2982 #---------------------------------------------------------------------------
2984 class Event(Object
):
2985 def __init__(self
): raise RuntimeError, "No constructor defined"
2987 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2988 def __del__(self
, destroy
=_core
.delete_Event
):
2991 if self
.thisown
: destroy(self
)
2994 def SetEventType(*args
, **kwargs
):
2995 """SetEventType(wxEventType typ)"""
2996 return _core
.Event_SetEventType(*args
, **kwargs
)
2998 def GetEventType(*args
, **kwargs
):
2999 """GetEventType() -> wxEventType"""
3000 return _core
.Event_GetEventType(*args
, **kwargs
)
3002 def GetEventObject(*args
, **kwargs
):
3003 """GetEventObject() -> Object"""
3004 return _core
.Event_GetEventObject(*args
, **kwargs
)
3006 def SetEventObject(*args
, **kwargs
):
3007 """SetEventObject(Object obj)"""
3008 return _core
.Event_SetEventObject(*args
, **kwargs
)
3010 def GetTimestamp(*args
, **kwargs
):
3011 """GetTimestamp() -> long"""
3012 return _core
.Event_GetTimestamp(*args
, **kwargs
)
3014 def SetTimestamp(*args
, **kwargs
):
3015 """SetTimestamp(long ts=0)"""
3016 return _core
.Event_SetTimestamp(*args
, **kwargs
)
3018 def GetId(*args
, **kwargs
):
3019 """GetId() -> int"""
3020 return _core
.Event_GetId(*args
, **kwargs
)
3022 def SetId(*args
, **kwargs
):
3024 return _core
.Event_SetId(*args
, **kwargs
)
3026 def IsCommandEvent(*args
, **kwargs
):
3027 """IsCommandEvent() -> bool"""
3028 return _core
.Event_IsCommandEvent(*args
, **kwargs
)
3030 def Skip(*args
, **kwargs
):
3031 """Skip(bool skip=True)"""
3032 return _core
.Event_Skip(*args
, **kwargs
)
3034 def GetSkipped(*args
, **kwargs
):
3035 """GetSkipped() -> bool"""
3036 return _core
.Event_GetSkipped(*args
, **kwargs
)
3038 def ShouldPropagate(*args
, **kwargs
):
3039 """ShouldPropagate() -> bool"""
3040 return _core
.Event_ShouldPropagate(*args
, **kwargs
)
3042 def StopPropagation(*args
, **kwargs
):
3043 """StopPropagation() -> int"""
3044 return _core
.Event_StopPropagation(*args
, **kwargs
)
3046 def ResumePropagation(*args
, **kwargs
):
3047 """ResumePropagation(int propagationLevel)"""
3048 return _core
.Event_ResumePropagation(*args
, **kwargs
)
3050 def Clone(*args
, **kwargs
):
3051 """Clone() -> Event"""
3052 return _core
.Event_Clone(*args
, **kwargs
)
3055 class EventPtr(Event
):
3056 def __init__(self
, this
):
3058 if not hasattr(self
,"thisown"): self
.thisown
= 0
3059 self
.__class
__ = Event
3060 _core
.Event_swigregister(EventPtr
)
3062 #---------------------------------------------------------------------------
3064 class PropagationDisabler(object):
3066 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3067 def __init__(self
, *args
, **kwargs
):
3068 """__init__(Event event) -> PropagationDisabler"""
3069 newobj
= _core
.new_PropagationDisabler(*args
, **kwargs
)
3070 self
.this
= newobj
.this
3073 def __del__(self
, destroy
=_core
.delete_PropagationDisabler
):
3076 if self
.thisown
: destroy(self
)
3080 class PropagationDisablerPtr(PropagationDisabler
):
3081 def __init__(self
, this
):
3083 if not hasattr(self
,"thisown"): self
.thisown
= 0
3084 self
.__class
__ = PropagationDisabler
3085 _core
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3087 class PropagateOnce(object):
3089 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3090 def __init__(self
, *args
, **kwargs
):
3091 """__init__(Event event) -> PropagateOnce"""
3092 newobj
= _core
.new_PropagateOnce(*args
, **kwargs
)
3093 self
.this
= newobj
.this
3096 def __del__(self
, destroy
=_core
.delete_PropagateOnce
):
3099 if self
.thisown
: destroy(self
)
3103 class PropagateOncePtr(PropagateOnce
):
3104 def __init__(self
, this
):
3106 if not hasattr(self
,"thisown"): self
.thisown
= 0
3107 self
.__class
__ = PropagateOnce
3108 _core
.PropagateOnce_swigregister(PropagateOncePtr
)
3110 #---------------------------------------------------------------------------
3112 class CommandEvent(Event
):
3114 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3115 def __init__(self
, *args
, **kwargs
):
3116 """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3117 newobj
= _core
.new_CommandEvent(*args
, **kwargs
)
3118 self
.this
= newobj
.this
3121 def GetSelection(*args
, **kwargs
):
3122 """GetSelection() -> int"""
3123 return _core
.CommandEvent_GetSelection(*args
, **kwargs
)
3125 def SetString(*args
, **kwargs
):
3126 """SetString(String s)"""
3127 return _core
.CommandEvent_SetString(*args
, **kwargs
)
3129 def GetString(*args
, **kwargs
):
3130 """GetString() -> String"""
3131 return _core
.CommandEvent_GetString(*args
, **kwargs
)
3133 def IsChecked(*args
, **kwargs
):
3134 """IsChecked() -> bool"""
3135 return _core
.CommandEvent_IsChecked(*args
, **kwargs
)
3138 def IsSelection(*args
, **kwargs
):
3139 """IsSelection() -> bool"""
3140 return _core
.CommandEvent_IsSelection(*args
, **kwargs
)
3142 def SetExtraLong(*args
, **kwargs
):
3143 """SetExtraLong(long extraLong)"""
3144 return _core
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3146 def GetExtraLong(*args
, **kwargs
):
3147 """GetExtraLong() -> long"""
3148 return _core
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3150 def SetInt(*args
, **kwargs
):
3152 return _core
.CommandEvent_SetInt(*args
, **kwargs
)
3154 def GetInt(*args
, **kwargs
):
3155 """GetInt() -> long"""
3156 return _core
.CommandEvent_GetInt(*args
, **kwargs
)
3158 def Clone(*args
, **kwargs
):
3159 """Clone() -> Event"""
3160 return _core
.CommandEvent_Clone(*args
, **kwargs
)
3163 class CommandEventPtr(CommandEvent
):
3164 def __init__(self
, this
):
3166 if not hasattr(self
,"thisown"): self
.thisown
= 0
3167 self
.__class
__ = CommandEvent
3168 _core
.CommandEvent_swigregister(CommandEventPtr
)
3170 #---------------------------------------------------------------------------
3172 class NotifyEvent(CommandEvent
):
3174 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3175 def __init__(self
, *args
, **kwargs
):
3176 """__init__(wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3177 newobj
= _core
.new_NotifyEvent(*args
, **kwargs
)
3178 self
.this
= newobj
.this
3181 def Veto(*args
, **kwargs
):
3183 return _core
.NotifyEvent_Veto(*args
, **kwargs
)
3185 def Allow(*args
, **kwargs
):
3187 return _core
.NotifyEvent_Allow(*args
, **kwargs
)
3189 def IsAllowed(*args
, **kwargs
):
3190 """IsAllowed() -> bool"""
3191 return _core
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3194 class NotifyEventPtr(NotifyEvent
):
3195 def __init__(self
, this
):
3197 if not hasattr(self
,"thisown"): self
.thisown
= 0
3198 self
.__class
__ = NotifyEvent
3199 _core
.NotifyEvent_swigregister(NotifyEventPtr
)
3201 #---------------------------------------------------------------------------
3203 class ScrollEvent(CommandEvent
):
3205 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3206 def __init__(self
, *args
, **kwargs
):
3208 __init__(wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3209 int orient=0) -> ScrollEvent
3211 newobj
= _core
.new_ScrollEvent(*args
, **kwargs
)
3212 self
.this
= newobj
.this
3215 def GetOrientation(*args
, **kwargs
):
3216 """GetOrientation() -> int"""
3217 return _core
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3219 def GetPosition(*args
, **kwargs
):
3220 """GetPosition() -> int"""
3221 return _core
.ScrollEvent_GetPosition(*args
, **kwargs
)
3223 def SetOrientation(*args
, **kwargs
):
3224 """SetOrientation(int orient)"""
3225 return _core
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3227 def SetPosition(*args
, **kwargs
):
3228 """SetPosition(int pos)"""
3229 return _core
.ScrollEvent_SetPosition(*args
, **kwargs
)
3232 class ScrollEventPtr(ScrollEvent
):
3233 def __init__(self
, this
):
3235 if not hasattr(self
,"thisown"): self
.thisown
= 0
3236 self
.__class
__ = ScrollEvent
3237 _core
.ScrollEvent_swigregister(ScrollEventPtr
)
3239 #---------------------------------------------------------------------------
3241 class ScrollWinEvent(Event
):
3243 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3244 def __init__(self
, *args
, **kwargs
):
3245 """__init__(wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3246 newobj
= _core
.new_ScrollWinEvent(*args
, **kwargs
)
3247 self
.this
= newobj
.this
3250 def GetOrientation(*args
, **kwargs
):
3251 """GetOrientation() -> int"""
3252 return _core
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3254 def GetPosition(*args
, **kwargs
):
3255 """GetPosition() -> int"""
3256 return _core
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3258 def SetOrientation(*args
, **kwargs
):
3259 """SetOrientation(int orient)"""
3260 return _core
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3262 def SetPosition(*args
, **kwargs
):
3263 """SetPosition(int pos)"""
3264 return _core
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3267 class ScrollWinEventPtr(ScrollWinEvent
):
3268 def __init__(self
, this
):
3270 if not hasattr(self
,"thisown"): self
.thisown
= 0
3271 self
.__class
__ = ScrollWinEvent
3272 _core
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3274 #---------------------------------------------------------------------------
3276 MOUSE_BTN_ANY
= _core
.MOUSE_BTN_ANY
3277 MOUSE_BTN_NONE
= _core
.MOUSE_BTN_NONE
3278 MOUSE_BTN_LEFT
= _core
.MOUSE_BTN_LEFT
3279 MOUSE_BTN_MIDDLE
= _core
.MOUSE_BTN_MIDDLE
3280 MOUSE_BTN_RIGHT
= _core
.MOUSE_BTN_RIGHT
3281 class MouseEvent(Event
):
3283 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3284 def __init__(self
, *args
, **kwargs
):
3285 """__init__(wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3286 newobj
= _core
.new_MouseEvent(*args
, **kwargs
)
3287 self
.this
= newobj
.this
3290 def IsButton(*args
, **kwargs
):
3291 """IsButton() -> bool"""
3292 return _core
.MouseEvent_IsButton(*args
, **kwargs
)
3294 def ButtonDown(*args
, **kwargs
):
3295 """ButtonDown(int but=MOUSE_BTN_ANY) -> bool"""
3296 return _core
.MouseEvent_ButtonDown(*args
, **kwargs
)
3298 def ButtonDClick(*args
, **kwargs
):
3299 """ButtonDClick(int but=MOUSE_BTN_ANY) -> bool"""
3300 return _core
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3302 def ButtonUp(*args
, **kwargs
):
3303 """ButtonUp(int but=MOUSE_BTN_ANY) -> bool"""
3304 return _core
.MouseEvent_ButtonUp(*args
, **kwargs
)
3306 def Button(*args
, **kwargs
):
3307 """Button(int but) -> bool"""
3308 return _core
.MouseEvent_Button(*args
, **kwargs
)
3310 def ButtonIsDown(*args
, **kwargs
):
3311 """ButtonIsDown(int but) -> bool"""
3312 return _core
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3314 def GetButton(*args
, **kwargs
):
3315 """GetButton() -> int"""
3316 return _core
.MouseEvent_GetButton(*args
, **kwargs
)
3318 def ControlDown(*args
, **kwargs
):
3319 """ControlDown() -> bool"""
3320 return _core
.MouseEvent_ControlDown(*args
, **kwargs
)
3322 def MetaDown(*args
, **kwargs
):
3323 """MetaDown() -> bool"""
3324 return _core
.MouseEvent_MetaDown(*args
, **kwargs
)
3326 def AltDown(*args
, **kwargs
):
3327 """AltDown() -> bool"""
3328 return _core
.MouseEvent_AltDown(*args
, **kwargs
)
3330 def ShiftDown(*args
, **kwargs
):
3331 """ShiftDown() -> bool"""
3332 return _core
.MouseEvent_ShiftDown(*args
, **kwargs
)
3334 def LeftDown(*args
, **kwargs
):
3335 """LeftDown() -> bool"""
3336 return _core
.MouseEvent_LeftDown(*args
, **kwargs
)
3338 def MiddleDown(*args
, **kwargs
):
3339 """MiddleDown() -> bool"""
3340 return _core
.MouseEvent_MiddleDown(*args
, **kwargs
)
3342 def RightDown(*args
, **kwargs
):
3343 """RightDown() -> bool"""
3344 return _core
.MouseEvent_RightDown(*args
, **kwargs
)
3346 def LeftUp(*args
, **kwargs
):
3347 """LeftUp() -> bool"""
3348 return _core
.MouseEvent_LeftUp(*args
, **kwargs
)
3350 def MiddleUp(*args
, **kwargs
):
3351 """MiddleUp() -> bool"""
3352 return _core
.MouseEvent_MiddleUp(*args
, **kwargs
)
3354 def RightUp(*args
, **kwargs
):
3355 """RightUp() -> bool"""
3356 return _core
.MouseEvent_RightUp(*args
, **kwargs
)
3358 def LeftDClick(*args
, **kwargs
):
3359 """LeftDClick() -> bool"""
3360 return _core
.MouseEvent_LeftDClick(*args
, **kwargs
)
3362 def MiddleDClick(*args
, **kwargs
):
3363 """MiddleDClick() -> bool"""
3364 return _core
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3366 def RightDClick(*args
, **kwargs
):
3367 """RightDClick() -> bool"""
3368 return _core
.MouseEvent_RightDClick(*args
, **kwargs
)
3370 def LeftIsDown(*args
, **kwargs
):
3371 """LeftIsDown() -> bool"""
3372 return _core
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3374 def MiddleIsDown(*args
, **kwargs
):
3375 """MiddleIsDown() -> bool"""
3376 return _core
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3378 def RightIsDown(*args
, **kwargs
):
3379 """RightIsDown() -> bool"""
3380 return _core
.MouseEvent_RightIsDown(*args
, **kwargs
)
3382 def Dragging(*args
, **kwargs
):
3383 """Dragging() -> bool"""
3384 return _core
.MouseEvent_Dragging(*args
, **kwargs
)
3386 def Moving(*args
, **kwargs
):
3387 """Moving() -> bool"""
3388 return _core
.MouseEvent_Moving(*args
, **kwargs
)
3390 def Entering(*args
, **kwargs
):
3391 """Entering() -> bool"""
3392 return _core
.MouseEvent_Entering(*args
, **kwargs
)
3394 def Leaving(*args
, **kwargs
):
3395 """Leaving() -> bool"""
3396 return _core
.MouseEvent_Leaving(*args
, **kwargs
)
3398 def GetPosition(*args
, **kwargs
):
3400 GetPosition() -> Point
3402 Returns the position of the mouse in window coordinates when the event happened.
3404 return _core
.MouseEvent_GetPosition(*args
, **kwargs
)
3406 def GetPositionTuple(*args
, **kwargs
):
3408 GetPositionTuple() -> (x,y)
3410 Returns the position of the mouse in window coordinates when the event happened.
3412 return _core
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3414 def GetLogicalPosition(*args
, **kwargs
):
3415 """GetLogicalPosition(DC dc) -> Point"""
3416 return _core
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3418 def GetX(*args
, **kwargs
):
3420 return _core
.MouseEvent_GetX(*args
, **kwargs
)
3422 def GetY(*args
, **kwargs
):
3424 return _core
.MouseEvent_GetY(*args
, **kwargs
)
3426 def GetWheelRotation(*args
, **kwargs
):
3427 """GetWheelRotation() -> int"""
3428 return _core
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3430 def GetWheelDelta(*args
, **kwargs
):
3431 """GetWheelDelta() -> int"""
3432 return _core
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3434 def GetLinesPerAction(*args
, **kwargs
):
3435 """GetLinesPerAction() -> int"""
3436 return _core
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3438 def IsPageScroll(*args
, **kwargs
):
3439 """IsPageScroll() -> bool"""
3440 return _core
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3442 m_x
= property(_core
.MouseEvent_m_x_get
, _core
.MouseEvent_m_x_set
)
3443 m_y
= property(_core
.MouseEvent_m_y_get
, _core
.MouseEvent_m_y_set
)
3444 m_leftDown
= property(_core
.MouseEvent_m_leftDown_get
, _core
.MouseEvent_m_leftDown_set
)
3445 m_middleDown
= property(_core
.MouseEvent_m_middleDown_get
, _core
.MouseEvent_m_middleDown_set
)
3446 m_rightDown
= property(_core
.MouseEvent_m_rightDown_get
, _core
.MouseEvent_m_rightDown_set
)
3447 m_controlDown
= property(_core
.MouseEvent_m_controlDown_get
, _core
.MouseEvent_m_controlDown_set
)
3448 m_shiftDown
= property(_core
.MouseEvent_m_shiftDown_get
, _core
.MouseEvent_m_shiftDown_set
)
3449 m_altDown
= property(_core
.MouseEvent_m_altDown_get
, _core
.MouseEvent_m_altDown_set
)
3450 m_metaDown
= property(_core
.MouseEvent_m_metaDown_get
, _core
.MouseEvent_m_metaDown_set
)
3451 m_wheelRotation
= property(_core
.MouseEvent_m_wheelRotation_get
, _core
.MouseEvent_m_wheelRotation_set
)
3452 m_wheelDelta
= property(_core
.MouseEvent_m_wheelDelta_get
, _core
.MouseEvent_m_wheelDelta_set
)
3453 m_linesPerAction
= property(_core
.MouseEvent_m_linesPerAction_get
, _core
.MouseEvent_m_linesPerAction_set
)
3455 class MouseEventPtr(MouseEvent
):
3456 def __init__(self
, this
):
3458 if not hasattr(self
,"thisown"): self
.thisown
= 0
3459 self
.__class
__ = MouseEvent
3460 _core
.MouseEvent_swigregister(MouseEventPtr
)
3462 #---------------------------------------------------------------------------
3464 class SetCursorEvent(Event
):
3466 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3467 def __init__(self
, *args
, **kwargs
):
3468 """__init__(int x=0, int y=0) -> SetCursorEvent"""
3469 newobj
= _core
.new_SetCursorEvent(*args
, **kwargs
)
3470 self
.this
= newobj
.this
3473 def GetX(*args
, **kwargs
):
3475 return _core
.SetCursorEvent_GetX(*args
, **kwargs
)
3477 def GetY(*args
, **kwargs
):
3479 return _core
.SetCursorEvent_GetY(*args
, **kwargs
)
3481 def SetCursor(*args
, **kwargs
):
3482 """SetCursor(Cursor cursor)"""
3483 return _core
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3485 def GetCursor(*args
, **kwargs
):
3486 """GetCursor() -> Cursor"""
3487 return _core
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3489 def HasCursor(*args
, **kwargs
):
3490 """HasCursor() -> bool"""
3491 return _core
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3494 class SetCursorEventPtr(SetCursorEvent
):
3495 def __init__(self
, this
):
3497 if not hasattr(self
,"thisown"): self
.thisown
= 0
3498 self
.__class
__ = SetCursorEvent
3499 _core
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3501 #---------------------------------------------------------------------------
3503 class KeyEvent(Event
):
3505 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3506 def __init__(self
, *args
, **kwargs
):
3507 """__init__(wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3508 newobj
= _core
.new_KeyEvent(*args
, **kwargs
)
3509 self
.this
= newobj
.this
3512 def ControlDown(*args
, **kwargs
):
3513 """ControlDown() -> bool"""
3514 return _core
.KeyEvent_ControlDown(*args
, **kwargs
)
3516 def MetaDown(*args
, **kwargs
):
3517 """MetaDown() -> bool"""
3518 return _core
.KeyEvent_MetaDown(*args
, **kwargs
)
3520 def AltDown(*args
, **kwargs
):
3521 """AltDown() -> bool"""
3522 return _core
.KeyEvent_AltDown(*args
, **kwargs
)
3524 def ShiftDown(*args
, **kwargs
):
3525 """ShiftDown() -> bool"""
3526 return _core
.KeyEvent_ShiftDown(*args
, **kwargs
)
3528 def HasModifiers(*args
, **kwargs
):
3529 """HasModifiers() -> bool"""
3530 return _core
.KeyEvent_HasModifiers(*args
, **kwargs
)
3532 def GetKeyCode(*args
, **kwargs
):
3533 """GetKeyCode() -> int"""
3534 return _core
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3536 KeyCode
= GetKeyCode
3537 def GetUniChar(*args
, **kwargs
):
3538 """GetUniChar() -> int"""
3539 return _core
.KeyEvent_GetUniChar(*args
, **kwargs
)
3541 def GetRawKeyCode(*args
, **kwargs
):
3542 """GetRawKeyCode() -> unsigned int"""
3543 return _core
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3545 def GetRawKeyFlags(*args
, **kwargs
):
3546 """GetRawKeyFlags() -> unsigned int"""
3547 return _core
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3549 def GetPosition(*args
, **kwargs
):
3551 GetPosition() -> Point
3553 Find the position of the event.
3555 return _core
.KeyEvent_GetPosition(*args
, **kwargs
)
3557 def GetPositionTuple(*args
, **kwargs
):
3559 GetPositionTuple() -> (x,y)
3561 Find the position of the event.
3563 return _core
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3565 def GetX(*args
, **kwargs
):
3567 return _core
.KeyEvent_GetX(*args
, **kwargs
)
3569 def GetY(*args
, **kwargs
):
3571 return _core
.KeyEvent_GetY(*args
, **kwargs
)
3573 m_x
= property(_core
.KeyEvent_m_x_get
, _core
.KeyEvent_m_x_set
)
3574 m_y
= property(_core
.KeyEvent_m_y_get
, _core
.KeyEvent_m_y_set
)
3575 m_keyCode
= property(_core
.KeyEvent_m_keyCode_get
, _core
.KeyEvent_m_keyCode_set
)
3576 m_controlDown
= property(_core
.KeyEvent_m_controlDown_get
, _core
.KeyEvent_m_controlDown_set
)
3577 m_shiftDown
= property(_core
.KeyEvent_m_shiftDown_get
, _core
.KeyEvent_m_shiftDown_set
)
3578 m_altDown
= property(_core
.KeyEvent_m_altDown_get
, _core
.KeyEvent_m_altDown_set
)
3579 m_metaDown
= property(_core
.KeyEvent_m_metaDown_get
, _core
.KeyEvent_m_metaDown_set
)
3580 m_scanCode
= property(_core
.KeyEvent_m_scanCode_get
, _core
.KeyEvent_m_scanCode_set
)
3581 m_rawCode
= property(_core
.KeyEvent_m_rawCode_get
, _core
.KeyEvent_m_rawCode_set
)
3582 m_rawFlags
= property(_core
.KeyEvent_m_rawFlags_get
, _core
.KeyEvent_m_rawFlags_set
)
3584 class KeyEventPtr(KeyEvent
):
3585 def __init__(self
, this
):
3587 if not hasattr(self
,"thisown"): self
.thisown
= 0
3588 self
.__class
__ = KeyEvent
3589 _core
.KeyEvent_swigregister(KeyEventPtr
)
3591 #---------------------------------------------------------------------------
3593 class SizeEvent(Event
):
3595 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3596 def __init__(self
, *args
, **kwargs
):
3597 """__init__(Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3598 newobj
= _core
.new_SizeEvent(*args
, **kwargs
)
3599 self
.this
= newobj
.this
3602 def GetSize(*args
, **kwargs
):
3603 """GetSize() -> Size"""
3604 return _core
.SizeEvent_GetSize(*args
, **kwargs
)
3606 def GetRect(*args
, **kwargs
):
3607 """GetRect() -> Rect"""
3608 return _core
.SizeEvent_GetRect(*args
, **kwargs
)
3610 def SetRect(*args
, **kwargs
):
3611 """SetRect(Rect rect)"""
3612 return _core
.SizeEvent_SetRect(*args
, **kwargs
)
3614 def SetSize(*args
, **kwargs
):
3615 """SetSize(Size size)"""
3616 return _core
.SizeEvent_SetSize(*args
, **kwargs
)
3618 m_size
= property(_core
.SizeEvent_m_size_get
, _core
.SizeEvent_m_size_set
)
3619 m_rect
= property(_core
.SizeEvent_m_rect_get
, _core
.SizeEvent_m_rect_set
)
3621 class SizeEventPtr(SizeEvent
):
3622 def __init__(self
, this
):
3624 if not hasattr(self
,"thisown"): self
.thisown
= 0
3625 self
.__class
__ = SizeEvent
3626 _core
.SizeEvent_swigregister(SizeEventPtr
)
3628 #---------------------------------------------------------------------------
3630 class MoveEvent(Event
):
3632 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3633 def __init__(self
, *args
, **kwargs
):
3634 """__init__(Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3635 newobj
= _core
.new_MoveEvent(*args
, **kwargs
)
3636 self
.this
= newobj
.this
3639 def GetPosition(*args
, **kwargs
):
3640 """GetPosition() -> Point"""
3641 return _core
.MoveEvent_GetPosition(*args
, **kwargs
)
3643 def GetRect(*args
, **kwargs
):
3644 """GetRect() -> Rect"""
3645 return _core
.MoveEvent_GetRect(*args
, **kwargs
)
3647 def SetRect(*args
, **kwargs
):
3648 """SetRect(Rect rect)"""
3649 return _core
.MoveEvent_SetRect(*args
, **kwargs
)
3651 def SetPosition(*args
, **kwargs
):
3652 """SetPosition(Point pos)"""
3653 return _core
.MoveEvent_SetPosition(*args
, **kwargs
)
3655 m_pos
= property(_core
.MoveEvent_m_pos_get
, _core
.MoveEvent_m_pos_set
)
3656 m_rect
= property(_core
.MoveEvent_m_rect_get
, _core
.MoveEvent_m_rect_set
)
3658 class MoveEventPtr(MoveEvent
):
3659 def __init__(self
, this
):
3661 if not hasattr(self
,"thisown"): self
.thisown
= 0
3662 self
.__class
__ = MoveEvent
3663 _core
.MoveEvent_swigregister(MoveEventPtr
)
3665 #---------------------------------------------------------------------------
3667 class PaintEvent(Event
):
3669 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3670 def __init__(self
, *args
, **kwargs
):
3671 """__init__(int Id=0) -> PaintEvent"""
3672 newobj
= _core
.new_PaintEvent(*args
, **kwargs
)
3673 self
.this
= newobj
.this
3677 class PaintEventPtr(PaintEvent
):
3678 def __init__(self
, this
):
3680 if not hasattr(self
,"thisown"): self
.thisown
= 0
3681 self
.__class
__ = PaintEvent
3682 _core
.PaintEvent_swigregister(PaintEventPtr
)
3684 class NcPaintEvent(Event
):
3686 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3687 def __init__(self
, *args
, **kwargs
):
3688 """__init__(int winid=0) -> NcPaintEvent"""
3689 newobj
= _core
.new_NcPaintEvent(*args
, **kwargs
)
3690 self
.this
= newobj
.this
3694 class NcPaintEventPtr(NcPaintEvent
):
3695 def __init__(self
, this
):
3697 if not hasattr(self
,"thisown"): self
.thisown
= 0
3698 self
.__class
__ = NcPaintEvent
3699 _core
.NcPaintEvent_swigregister(NcPaintEventPtr
)
3701 #---------------------------------------------------------------------------
3703 class EraseEvent(Event
):
3705 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3706 def __init__(self
, *args
, **kwargs
):
3707 """__init__(int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3708 newobj
= _core
.new_EraseEvent(*args
, **kwargs
)
3709 self
.this
= newobj
.this
3712 def GetDC(*args
, **kwargs
):
3714 return _core
.EraseEvent_GetDC(*args
, **kwargs
)
3717 class EraseEventPtr(EraseEvent
):
3718 def __init__(self
, this
):
3720 if not hasattr(self
,"thisown"): self
.thisown
= 0
3721 self
.__class
__ = EraseEvent
3722 _core
.EraseEvent_swigregister(EraseEventPtr
)
3724 #---------------------------------------------------------------------------
3726 class FocusEvent(Event
):
3728 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3729 def __init__(self
, *args
, **kwargs
):
3730 """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
3731 newobj
= _core
.new_FocusEvent(*args
, **kwargs
)
3732 self
.this
= newobj
.this
3735 def GetWindow(*args
, **kwargs
):
3736 """GetWindow() -> Window"""
3737 return _core
.FocusEvent_GetWindow(*args
, **kwargs
)
3739 def SetWindow(*args
, **kwargs
):
3740 """SetWindow(Window win)"""
3741 return _core
.FocusEvent_SetWindow(*args
, **kwargs
)
3744 class FocusEventPtr(FocusEvent
):
3745 def __init__(self
, this
):
3747 if not hasattr(self
,"thisown"): self
.thisown
= 0
3748 self
.__class
__ = FocusEvent
3749 _core
.FocusEvent_swigregister(FocusEventPtr
)
3751 #---------------------------------------------------------------------------
3753 class ChildFocusEvent(CommandEvent
):
3755 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3756 def __init__(self
, *args
, **kwargs
):
3757 """__init__(Window win=None) -> ChildFocusEvent"""
3758 newobj
= _core
.new_ChildFocusEvent(*args
, **kwargs
)
3759 self
.this
= newobj
.this
3762 def GetWindow(*args
, **kwargs
):
3763 """GetWindow() -> Window"""
3764 return _core
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
3767 class ChildFocusEventPtr(ChildFocusEvent
):
3768 def __init__(self
, this
):
3770 if not hasattr(self
,"thisown"): self
.thisown
= 0
3771 self
.__class
__ = ChildFocusEvent
3772 _core
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
3774 #---------------------------------------------------------------------------
3776 class ActivateEvent(Event
):
3778 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3779 def __init__(self
, *args
, **kwargs
):
3780 """__init__(wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
3781 newobj
= _core
.new_ActivateEvent(*args
, **kwargs
)
3782 self
.this
= newobj
.this
3785 def GetActive(*args
, **kwargs
):
3786 """GetActive() -> bool"""
3787 return _core
.ActivateEvent_GetActive(*args
, **kwargs
)
3790 class ActivateEventPtr(ActivateEvent
):
3791 def __init__(self
, this
):
3793 if not hasattr(self
,"thisown"): self
.thisown
= 0
3794 self
.__class
__ = ActivateEvent
3795 _core
.ActivateEvent_swigregister(ActivateEventPtr
)
3797 #---------------------------------------------------------------------------
3799 class InitDialogEvent(Event
):
3801 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3802 def __init__(self
, *args
, **kwargs
):
3803 """__init__(int Id=0) -> InitDialogEvent"""
3804 newobj
= _core
.new_InitDialogEvent(*args
, **kwargs
)
3805 self
.this
= newobj
.this
3809 class InitDialogEventPtr(InitDialogEvent
):
3810 def __init__(self
, this
):
3812 if not hasattr(self
,"thisown"): self
.thisown
= 0
3813 self
.__class
__ = InitDialogEvent
3814 _core
.InitDialogEvent_swigregister(InitDialogEventPtr
)
3816 #---------------------------------------------------------------------------
3818 class MenuEvent(Event
):
3820 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3821 def __init__(self
, *args
, **kwargs
):
3822 """__init__(wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
3823 newobj
= _core
.new_MenuEvent(*args
, **kwargs
)
3824 self
.this
= newobj
.this
3827 def GetMenuId(*args
, **kwargs
):
3828 """GetMenuId() -> int"""
3829 return _core
.MenuEvent_GetMenuId(*args
, **kwargs
)
3831 def IsPopup(*args
, **kwargs
):
3832 """IsPopup() -> bool"""
3833 return _core
.MenuEvent_IsPopup(*args
, **kwargs
)
3835 def GetMenu(*args
, **kwargs
):
3836 """GetMenu() -> Menu"""
3837 return _core
.MenuEvent_GetMenu(*args
, **kwargs
)
3840 class MenuEventPtr(MenuEvent
):
3841 def __init__(self
, this
):
3843 if not hasattr(self
,"thisown"): self
.thisown
= 0
3844 self
.__class
__ = MenuEvent
3845 _core
.MenuEvent_swigregister(MenuEventPtr
)
3847 #---------------------------------------------------------------------------
3849 class CloseEvent(Event
):
3851 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3852 def __init__(self
, *args
, **kwargs
):
3853 """__init__(wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
3854 newobj
= _core
.new_CloseEvent(*args
, **kwargs
)
3855 self
.this
= newobj
.this
3858 def SetLoggingOff(*args
, **kwargs
):
3859 """SetLoggingOff(bool logOff)"""
3860 return _core
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
3862 def GetLoggingOff(*args
, **kwargs
):
3863 """GetLoggingOff() -> bool"""
3864 return _core
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
3866 def Veto(*args
, **kwargs
):
3867 """Veto(bool veto=True)"""
3868 return _core
.CloseEvent_Veto(*args
, **kwargs
)
3870 def SetCanVeto(*args
, **kwargs
):
3871 """SetCanVeto(bool canVeto)"""
3872 return _core
.CloseEvent_SetCanVeto(*args
, **kwargs
)
3874 def CanVeto(*args
, **kwargs
):
3875 """CanVeto() -> bool"""
3876 return _core
.CloseEvent_CanVeto(*args
, **kwargs
)
3878 def GetVeto(*args
, **kwargs
):
3879 """GetVeto() -> bool"""
3880 return _core
.CloseEvent_GetVeto(*args
, **kwargs
)
3883 class CloseEventPtr(CloseEvent
):
3884 def __init__(self
, this
):
3886 if not hasattr(self
,"thisown"): self
.thisown
= 0
3887 self
.__class
__ = CloseEvent
3888 _core
.CloseEvent_swigregister(CloseEventPtr
)
3890 #---------------------------------------------------------------------------
3892 class ShowEvent(Event
):
3894 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3895 def __init__(self
, *args
, **kwargs
):
3896 """__init__(int winid=0, bool show=False) -> ShowEvent"""
3897 newobj
= _core
.new_ShowEvent(*args
, **kwargs
)
3898 self
.this
= newobj
.this
3901 def SetShow(*args
, **kwargs
):
3902 """SetShow(bool show)"""
3903 return _core
.ShowEvent_SetShow(*args
, **kwargs
)
3905 def GetShow(*args
, **kwargs
):
3906 """GetShow() -> bool"""
3907 return _core
.ShowEvent_GetShow(*args
, **kwargs
)
3910 class ShowEventPtr(ShowEvent
):
3911 def __init__(self
, this
):
3913 if not hasattr(self
,"thisown"): self
.thisown
= 0
3914 self
.__class
__ = ShowEvent
3915 _core
.ShowEvent_swigregister(ShowEventPtr
)
3917 #---------------------------------------------------------------------------
3919 class IconizeEvent(Event
):
3921 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3922 def __init__(self
, *args
, **kwargs
):
3923 """__init__(int id=0, bool iconized=True) -> IconizeEvent"""
3924 newobj
= _core
.new_IconizeEvent(*args
, **kwargs
)
3925 self
.this
= newobj
.this
3928 def Iconized(*args
, **kwargs
):
3929 """Iconized() -> bool"""
3930 return _core
.IconizeEvent_Iconized(*args
, **kwargs
)
3933 class IconizeEventPtr(IconizeEvent
):
3934 def __init__(self
, this
):
3936 if not hasattr(self
,"thisown"): self
.thisown
= 0
3937 self
.__class
__ = IconizeEvent
3938 _core
.IconizeEvent_swigregister(IconizeEventPtr
)
3940 #---------------------------------------------------------------------------
3942 class MaximizeEvent(Event
):
3944 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3945 def __init__(self
, *args
, **kwargs
):
3946 """__init__(int id=0) -> MaximizeEvent"""
3947 newobj
= _core
.new_MaximizeEvent(*args
, **kwargs
)
3948 self
.this
= newobj
.this
3952 class MaximizeEventPtr(MaximizeEvent
):
3953 def __init__(self
, this
):
3955 if not hasattr(self
,"thisown"): self
.thisown
= 0
3956 self
.__class
__ = MaximizeEvent
3957 _core
.MaximizeEvent_swigregister(MaximizeEventPtr
)
3959 #---------------------------------------------------------------------------
3961 class DropFilesEvent(Event
):
3962 def __init__(self
): raise RuntimeError, "No constructor defined"
3964 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3965 def GetPosition(*args
, **kwargs
):
3966 """GetPosition() -> Point"""
3967 return _core
.DropFilesEvent_GetPosition(*args
, **kwargs
)
3969 def GetNumberOfFiles(*args
, **kwargs
):
3970 """GetNumberOfFiles() -> int"""
3971 return _core
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
3973 def GetFiles(*args
, **kwargs
):
3974 """GetFiles() -> PyObject"""
3975 return _core
.DropFilesEvent_GetFiles(*args
, **kwargs
)
3978 class DropFilesEventPtr(DropFilesEvent
):
3979 def __init__(self
, this
):
3981 if not hasattr(self
,"thisown"): self
.thisown
= 0
3982 self
.__class
__ = DropFilesEvent
3983 _core
.DropFilesEvent_swigregister(DropFilesEventPtr
)
3985 #---------------------------------------------------------------------------
3987 UPDATE_UI_PROCESS_ALL
= _core
.UPDATE_UI_PROCESS_ALL
3988 UPDATE_UI_PROCESS_SPECIFIED
= _core
.UPDATE_UI_PROCESS_SPECIFIED
3989 class UpdateUIEvent(CommandEvent
):
3991 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3992 def __init__(self
, *args
, **kwargs
):
3993 """__init__(int commandId=0) -> UpdateUIEvent"""
3994 newobj
= _core
.new_UpdateUIEvent(*args
, **kwargs
)
3995 self
.this
= newobj
.this
3998 def GetChecked(*args
, **kwargs
):
3999 """GetChecked() -> bool"""
4000 return _core
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4002 def GetEnabled(*args
, **kwargs
):
4003 """GetEnabled() -> bool"""
4004 return _core
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4006 def GetText(*args
, **kwargs
):
4007 """GetText() -> String"""
4008 return _core
.UpdateUIEvent_GetText(*args
, **kwargs
)
4010 def GetSetText(*args
, **kwargs
):
4011 """GetSetText() -> bool"""
4012 return _core
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4014 def GetSetChecked(*args
, **kwargs
):
4015 """GetSetChecked() -> bool"""
4016 return _core
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4018 def GetSetEnabled(*args
, **kwargs
):
4019 """GetSetEnabled() -> bool"""
4020 return _core
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4022 def Check(*args
, **kwargs
):
4023 """Check(bool check)"""
4024 return _core
.UpdateUIEvent_Check(*args
, **kwargs
)
4026 def Enable(*args
, **kwargs
):
4027 """Enable(bool enable)"""
4028 return _core
.UpdateUIEvent_Enable(*args
, **kwargs
)
4030 def SetText(*args
, **kwargs
):
4031 """SetText(String text)"""
4032 return _core
.UpdateUIEvent_SetText(*args
, **kwargs
)
4034 def SetUpdateInterval(*args
, **kwargs
):
4035 """SetUpdateInterval(long updateInterval)"""
4036 return _core
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4038 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4039 def GetUpdateInterval(*args
, **kwargs
):
4040 """GetUpdateInterval() -> long"""
4041 return _core
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4043 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4044 def CanUpdate(*args
, **kwargs
):
4045 """CanUpdate(Window win) -> bool"""
4046 return _core
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4048 CanUpdate
= staticmethod(CanUpdate
)
4049 def ResetUpdateTime(*args
, **kwargs
):
4050 """ResetUpdateTime()"""
4051 return _core
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4053 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4054 def SetMode(*args
, **kwargs
):
4055 """SetMode(int mode)"""
4056 return _core
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4058 SetMode
= staticmethod(SetMode
)
4059 def GetMode(*args
, **kwargs
):
4060 """GetMode() -> int"""
4061 return _core
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4063 GetMode
= staticmethod(GetMode
)
4065 class UpdateUIEventPtr(UpdateUIEvent
):
4066 def __init__(self
, this
):
4068 if not hasattr(self
,"thisown"): self
.thisown
= 0
4069 self
.__class
__ = UpdateUIEvent
4070 _core
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4072 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4073 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4074 return _core
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4076 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4077 """UpdateUIEvent_GetUpdateInterval() -> long"""
4078 return _core
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4080 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4081 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4082 return _core
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4084 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4085 """UpdateUIEvent_ResetUpdateTime()"""
4086 return _core
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4088 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4089 """UpdateUIEvent_SetMode(int mode)"""
4090 return _core
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4092 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4093 """UpdateUIEvent_GetMode() -> int"""
4094 return _core
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4096 #---------------------------------------------------------------------------
4098 class SysColourChangedEvent(Event
):
4100 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4101 def __init__(self
, *args
, **kwargs
):
4102 """__init__() -> SysColourChangedEvent"""
4103 newobj
= _core
.new_SysColourChangedEvent(*args
, **kwargs
)
4104 self
.this
= newobj
.this
4108 class SysColourChangedEventPtr(SysColourChangedEvent
):
4109 def __init__(self
, this
):
4111 if not hasattr(self
,"thisown"): self
.thisown
= 0
4112 self
.__class
__ = SysColourChangedEvent
4113 _core
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4115 #---------------------------------------------------------------------------
4117 class MouseCaptureChangedEvent(Event
):
4119 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4120 def __init__(self
, *args
, **kwargs
):
4121 """__init__(int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4122 newobj
= _core
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4123 self
.this
= newobj
.this
4126 def GetCapturedWindow(*args
, **kwargs
):
4127 """GetCapturedWindow() -> Window"""
4128 return _core
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4131 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4132 def __init__(self
, this
):
4134 if not hasattr(self
,"thisown"): self
.thisown
= 0
4135 self
.__class
__ = MouseCaptureChangedEvent
4136 _core
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4138 #---------------------------------------------------------------------------
4140 class DisplayChangedEvent(Event
):
4142 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4143 def __init__(self
, *args
, **kwargs
):
4144 """__init__() -> DisplayChangedEvent"""
4145 newobj
= _core
.new_DisplayChangedEvent(*args
, **kwargs
)
4146 self
.this
= newobj
.this
4150 class DisplayChangedEventPtr(DisplayChangedEvent
):
4151 def __init__(self
, this
):
4153 if not hasattr(self
,"thisown"): self
.thisown
= 0
4154 self
.__class
__ = DisplayChangedEvent
4155 _core
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4157 #---------------------------------------------------------------------------
4159 class PaletteChangedEvent(Event
):
4161 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4162 def __init__(self
, *args
, **kwargs
):
4163 """__init__(int id=0) -> PaletteChangedEvent"""
4164 newobj
= _core
.new_PaletteChangedEvent(*args
, **kwargs
)
4165 self
.this
= newobj
.this
4168 def SetChangedWindow(*args
, **kwargs
):
4169 """SetChangedWindow(Window win)"""
4170 return _core
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4172 def GetChangedWindow(*args
, **kwargs
):
4173 """GetChangedWindow() -> Window"""
4174 return _core
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4177 class PaletteChangedEventPtr(PaletteChangedEvent
):
4178 def __init__(self
, this
):
4180 if not hasattr(self
,"thisown"): self
.thisown
= 0
4181 self
.__class
__ = PaletteChangedEvent
4182 _core
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4184 #---------------------------------------------------------------------------
4186 class QueryNewPaletteEvent(Event
):
4188 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4189 def __init__(self
, *args
, **kwargs
):
4190 """__init__(int winid=0) -> QueryNewPaletteEvent"""
4191 newobj
= _core
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4192 self
.this
= newobj
.this
4195 def SetPaletteRealized(*args
, **kwargs
):
4196 """SetPaletteRealized(bool realized)"""
4197 return _core
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4199 def GetPaletteRealized(*args
, **kwargs
):
4200 """GetPaletteRealized() -> bool"""
4201 return _core
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4204 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4205 def __init__(self
, this
):
4207 if not hasattr(self
,"thisown"): self
.thisown
= 0
4208 self
.__class
__ = QueryNewPaletteEvent
4209 _core
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4211 #---------------------------------------------------------------------------
4213 class NavigationKeyEvent(Event
):
4215 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4216 def __init__(self
, *args
, **kwargs
):
4217 """__init__() -> NavigationKeyEvent"""
4218 newobj
= _core
.new_NavigationKeyEvent(*args
, **kwargs
)
4219 self
.this
= newobj
.this
4222 def GetDirection(*args
, **kwargs
):
4223 """GetDirection() -> bool"""
4224 return _core
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4226 def SetDirection(*args
, **kwargs
):
4227 """SetDirection(bool bForward)"""
4228 return _core
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4230 def IsWindowChange(*args
, **kwargs
):
4231 """IsWindowChange() -> bool"""
4232 return _core
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4234 def SetWindowChange(*args
, **kwargs
):
4235 """SetWindowChange(bool bIs)"""
4236 return _core
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4238 def GetCurrentFocus(*args
, **kwargs
):
4239 """GetCurrentFocus() -> Window"""
4240 return _core
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4242 def SetCurrentFocus(*args
, **kwargs
):
4243 """SetCurrentFocus(Window win)"""
4244 return _core
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4247 class NavigationKeyEventPtr(NavigationKeyEvent
):
4248 def __init__(self
, this
):
4250 if not hasattr(self
,"thisown"): self
.thisown
= 0
4251 self
.__class
__ = NavigationKeyEvent
4252 _core
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4254 #---------------------------------------------------------------------------
4256 class WindowCreateEvent(CommandEvent
):
4258 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4259 def __init__(self
, *args
, **kwargs
):
4260 """__init__(Window win=None) -> WindowCreateEvent"""
4261 newobj
= _core
.new_WindowCreateEvent(*args
, **kwargs
)
4262 self
.this
= newobj
.this
4265 def GetWindow(*args
, **kwargs
):
4266 """GetWindow() -> Window"""
4267 return _core
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4270 class WindowCreateEventPtr(WindowCreateEvent
):
4271 def __init__(self
, this
):
4273 if not hasattr(self
,"thisown"): self
.thisown
= 0
4274 self
.__class
__ = WindowCreateEvent
4275 _core
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4277 class WindowDestroyEvent(CommandEvent
):
4279 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4280 def __init__(self
, *args
, **kwargs
):
4281 """__init__(Window win=None) -> WindowDestroyEvent"""
4282 newobj
= _core
.new_WindowDestroyEvent(*args
, **kwargs
)
4283 self
.this
= newobj
.this
4286 def GetWindow(*args
, **kwargs
):
4287 """GetWindow() -> Window"""
4288 return _core
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4291 class WindowDestroyEventPtr(WindowDestroyEvent
):
4292 def __init__(self
, this
):
4294 if not hasattr(self
,"thisown"): self
.thisown
= 0
4295 self
.__class
__ = WindowDestroyEvent
4296 _core
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4298 #---------------------------------------------------------------------------
4300 class ContextMenuEvent(CommandEvent
):
4302 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4303 def __init__(self
, *args
, **kwargs
):
4304 """__init__(wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4305 newobj
= _core
.new_ContextMenuEvent(*args
, **kwargs
)
4306 self
.this
= newobj
.this
4309 def GetPosition(*args
, **kwargs
):
4310 """GetPosition() -> Point"""
4311 return _core
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4313 def SetPosition(*args
, **kwargs
):
4314 """SetPosition(Point pos)"""
4315 return _core
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4318 class ContextMenuEventPtr(ContextMenuEvent
):
4319 def __init__(self
, this
):
4321 if not hasattr(self
,"thisown"): self
.thisown
= 0
4322 self
.__class
__ = ContextMenuEvent
4323 _core
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4325 #---------------------------------------------------------------------------
4327 IDLE_PROCESS_ALL
= _core
.IDLE_PROCESS_ALL
4328 IDLE_PROCESS_SPECIFIED
= _core
.IDLE_PROCESS_SPECIFIED
4329 class IdleEvent(Event
):
4331 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4332 def __init__(self
, *args
, **kwargs
):
4333 """__init__() -> IdleEvent"""
4334 newobj
= _core
.new_IdleEvent(*args
, **kwargs
)
4335 self
.this
= newobj
.this
4338 def RequestMore(*args
, **kwargs
):
4339 """RequestMore(bool needMore=True)"""
4340 return _core
.IdleEvent_RequestMore(*args
, **kwargs
)
4342 def MoreRequested(*args
, **kwargs
):
4343 """MoreRequested() -> bool"""
4344 return _core
.IdleEvent_MoreRequested(*args
, **kwargs
)
4346 def SetMode(*args
, **kwargs
):
4347 """SetMode(int mode)"""
4348 return _core
.IdleEvent_SetMode(*args
, **kwargs
)
4350 SetMode
= staticmethod(SetMode
)
4351 def GetMode(*args
, **kwargs
):
4352 """GetMode() -> int"""
4353 return _core
.IdleEvent_GetMode(*args
, **kwargs
)
4355 GetMode
= staticmethod(GetMode
)
4356 def CanSend(*args
, **kwargs
):
4357 """CanSend(Window win) -> bool"""
4358 return _core
.IdleEvent_CanSend(*args
, **kwargs
)
4360 CanSend
= staticmethod(CanSend
)
4362 class IdleEventPtr(IdleEvent
):
4363 def __init__(self
, this
):
4365 if not hasattr(self
,"thisown"): self
.thisown
= 0
4366 self
.__class
__ = IdleEvent
4367 _core
.IdleEvent_swigregister(IdleEventPtr
)
4369 def IdleEvent_SetMode(*args
, **kwargs
):
4370 """IdleEvent_SetMode(int mode)"""
4371 return _core
.IdleEvent_SetMode(*args
, **kwargs
)
4373 def IdleEvent_GetMode(*args
, **kwargs
):
4374 """IdleEvent_GetMode() -> int"""
4375 return _core
.IdleEvent_GetMode(*args
, **kwargs
)
4377 def IdleEvent_CanSend(*args
, **kwargs
):
4378 """IdleEvent_CanSend(Window win) -> bool"""
4379 return _core
.IdleEvent_CanSend(*args
, **kwargs
)
4381 #---------------------------------------------------------------------------
4383 class PyEvent(Event
):
4385 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4386 def __init__(self
, *args
, **kwargs
):
4387 """__init__(int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4388 newobj
= _core
.new_PyEvent(*args
, **kwargs
)
4389 self
.this
= newobj
.this
4394 def __del__(self
, destroy
=_core
.delete_PyEvent
):
4397 if self
.thisown
: destroy(self
)
4400 def SetSelf(*args
, **kwargs
):
4401 """SetSelf(PyObject self)"""
4402 return _core
.PyEvent_SetSelf(*args
, **kwargs
)
4404 def GetSelf(*args
, **kwargs
):
4405 """GetSelf() -> PyObject"""
4406 return _core
.PyEvent_GetSelf(*args
, **kwargs
)
4409 class PyEventPtr(PyEvent
):
4410 def __init__(self
, this
):
4412 if not hasattr(self
,"thisown"): self
.thisown
= 0
4413 self
.__class
__ = PyEvent
4414 _core
.PyEvent_swigregister(PyEventPtr
)
4416 class PyCommandEvent(CommandEvent
):
4418 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4419 def __init__(self
, *args
, **kwargs
):
4420 """__init__(wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4421 newobj
= _core
.new_PyCommandEvent(*args
, **kwargs
)
4422 self
.this
= newobj
.this
4427 def __del__(self
, destroy
=_core
.delete_PyCommandEvent
):
4430 if self
.thisown
: destroy(self
)
4433 def SetSelf(*args
, **kwargs
):
4434 """SetSelf(PyObject self)"""
4435 return _core
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4437 def GetSelf(*args
, **kwargs
):
4438 """GetSelf() -> PyObject"""
4439 return _core
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4442 class PyCommandEventPtr(PyCommandEvent
):
4443 def __init__(self
, this
):
4445 if not hasattr(self
,"thisown"): self
.thisown
= 0
4446 self
.__class
__ = PyCommandEvent
4447 _core
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4449 #---------------------------------------------------------------------------
4451 PYAPP_ASSERT_SUPPRESS
= _core
.PYAPP_ASSERT_SUPPRESS
4452 PYAPP_ASSERT_EXCEPTION
= _core
.PYAPP_ASSERT_EXCEPTION
4453 PYAPP_ASSERT_DIALOG
= _core
.PYAPP_ASSERT_DIALOG
4454 PYAPP_ASSERT_LOG
= _core
.PYAPP_ASSERT_LOG
4455 PRINT_WINDOWS
= _core
.PRINT_WINDOWS
4456 PRINT_POSTSCRIPT
= _core
.PRINT_POSTSCRIPT
4457 class PyApp(EvtHandler
):
4459 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4460 def __init__(self
, *args
, **kwargs
):
4464 Create a new application object, starting the bootstrap process.
4466 newobj
= _core
.new_PyApp(*args
, **kwargs
)
4467 self
.this
= newobj
.this
4470 self
._setCallbackInfo
(self
, PyApp
)
4471 self
._setOORInfo
(self
)
4473 def __del__(self
, destroy
=_core
.delete_PyApp
):
4476 if self
.thisown
: destroy(self
)
4479 def _setCallbackInfo(*args
, **kwargs
):
4480 """_setCallbackInfo(PyObject self, PyObject _class)"""
4481 return _core
.PyApp__setCallbackInfo(*args
, **kwargs
)
4483 def GetAppName(*args
, **kwargs
):
4485 GetAppName() -> String
4487 Get the application name.
4489 return _core
.PyApp_GetAppName(*args
, **kwargs
)
4491 def SetAppName(*args
, **kwargs
):
4493 SetAppName(String name)
4495 Set the application name. This value may be used automatically
4496 by wx.Config and such.
4498 return _core
.PyApp_SetAppName(*args
, **kwargs
)
4500 def GetClassName(*args
, **kwargs
):
4502 GetClassName() -> String
4504 Get the application's class name.
4506 return _core
.PyApp_GetClassName(*args
, **kwargs
)
4508 def SetClassName(*args
, **kwargs
):
4510 SetClassName(String name)
4512 Set the application's class name. This value may be used for X-resources if
4513 applicable for the platform
4515 return _core
.PyApp_SetClassName(*args
, **kwargs
)
4517 def GetVendorName(*args
, **kwargs
):
4519 GetVendorName() -> String
4521 Get the application's vendor name.
4523 return _core
.PyApp_GetVendorName(*args
, **kwargs
)
4525 def SetVendorName(*args
, **kwargs
):
4527 SetVendorName(String name)
4529 Set the application's vendor name. This value may be used automatically
4530 by wx.Config and such.
4532 return _core
.PyApp_SetVendorName(*args
, **kwargs
)
4534 def GetTraits(*args
, **kwargs
):
4536 GetTraits() -> wxAppTraits
4538 Create the app traits object to which we delegate for everything which either
4539 should be configurable by the user (then he can change the default behaviour
4540 simply by overriding CreateTraits() and returning his own traits object) or
4541 which is GUI/console dependent as then wx.AppTraits allows us to abstract the
4542 differences behind the common facade
4544 return _core
.PyApp_GetTraits(*args
, **kwargs
)
4546 def ProcessPendingEvents(*args
, **kwargs
):
4548 ProcessPendingEvents()
4550 Process all events in the Pending Events list -- it is necessary to call this
4551 function to process posted events. This happens during each event loop
4554 return _core
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4556 def Yield(*args
, **kwargs
):
4558 Yield(bool onlyIfNeeded=False) -> bool
4560 Process all currently pending events right now, instead of waiting until
4561 return to the event loop. It is an error to call Yield() recursively unless
4562 the value of onlyIfNeeded is True.
4564 WARNING: This function is dangerous as it can lead to unexpected
4565 reentrancies (i.e. when called from an event handler it
4566 may result in calling the same event handler again), use
4567 with _extreme_ care or, better, don't use at all!
4570 return _core
.PyApp_Yield(*args
, **kwargs
)
4572 def WakeUpIdle(*args
, **kwargs
):
4576 Make sure that idle events are sent again
4578 return _core
.PyApp_WakeUpIdle(*args
, **kwargs
)
4580 def MainLoop(*args
, **kwargs
):
4584 Execute the main GUI loop, the function returns when the loop ends.
4586 return _core
.PyApp_MainLoop(*args
, **kwargs
)
4588 def Exit(*args
, **kwargs
):
4592 Exit the main loop thus terminating the application.
4594 return _core
.PyApp_Exit(*args
, **kwargs
)
4596 def ExitMainLoop(*args
, **kwargs
):
4600 Exit the main GUI loop during the next iteration (i.e. it does not
4601 stop the program immediately!)
4603 return _core
.PyApp_ExitMainLoop(*args
, **kwargs
)
4605 def Pending(*args
, **kwargs
):
4609 Returns True if there are unprocessed events in the event queue.
4611 return _core
.PyApp_Pending(*args
, **kwargs
)
4613 def Dispatch(*args
, **kwargs
):
4617 Process the first event in the event queue (blocks until an event
4618 appears if there are none currently)
4620 return _core
.PyApp_Dispatch(*args
, **kwargs
)
4622 def ProcessIdle(*args
, **kwargs
):
4624 ProcessIdle() -> bool
4626 Called from the MainLoop when the application becomes idle and sends an
4627 IdleEvent to all interested parties. Returns True is more idle events are
4628 needed, False if not.
4630 return _core
.PyApp_ProcessIdle(*args
, **kwargs
)
4632 def SendIdleEvents(*args
, **kwargs
):
4634 SendIdleEvents(Window win, IdleEvent event) -> bool
4636 Send idle event to window and all subwindows. Returns True if more idle time
4639 return _core
.PyApp_SendIdleEvents(*args
, **kwargs
)
4641 def IsActive(*args
, **kwargs
):
4645 Return True if our app has focus.
4647 return _core
.PyApp_IsActive(*args
, **kwargs
)
4649 def SetTopWindow(*args
, **kwargs
):
4651 SetTopWindow(Window win)
4653 Set the "main" top level window
4655 return _core
.PyApp_SetTopWindow(*args
, **kwargs
)
4657 def GetTopWindow(*args
, **kwargs
):
4659 GetTopWindow() -> Window
4661 Return the "main" top level window (if it hadn't been set previously with
4662 SetTopWindow(), will return just some top level window and, if there not any,
4665 return _core
.PyApp_GetTopWindow(*args
, **kwargs
)
4667 def SetExitOnFrameDelete(*args
, **kwargs
):
4669 SetExitOnFrameDelete(bool flag)
4671 Control the exit behaviour: by default, the program will exit the main loop
4672 (and so, usually, terminate) when the last top-level program window is
4673 deleted. Beware that if you disable this behaviour (with
4674 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly
4678 return _core
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
4680 def GetExitOnFrameDelete(*args
, **kwargs
):
4682 GetExitOnFrameDelete() -> bool
4684 Get the current exit behaviour setting.
4686 return _core
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
4688 def SetUseBestVisual(*args
, **kwargs
):
4690 SetUseBestVisual(bool flag)
4692 Set whether the app should try to use the best available visual on systems
4693 where more than one is available, (Sun, SGI, XFree86 4, etc.)
4695 return _core
.PyApp_SetUseBestVisual(*args
, **kwargs
)
4697 def GetUseBestVisual(*args
, **kwargs
):
4699 GetUseBestVisual() -> bool
4701 Get current UseBestVisual setting.
4703 return _core
.PyApp_GetUseBestVisual(*args
, **kwargs
)
4705 def SetPrintMode(*args
, **kwargs
):
4706 """SetPrintMode(int mode)"""
4707 return _core
.PyApp_SetPrintMode(*args
, **kwargs
)
4709 def GetPrintMode(*args
, **kwargs
):
4710 """GetPrintMode() -> int"""
4711 return _core
.PyApp_GetPrintMode(*args
, **kwargs
)
4713 def SetAssertMode(*args
, **kwargs
):
4715 SetAssertMode(int mode)
4717 Set the OnAssert behaviour for debug and hybrid builds. The following flags
4718 may be or'd together:
4720 wx.PYAPP_ASSERT_SUPPRESS Don't do anything
4721 wx.PYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default)
4722 wx.PYAPP_ASSERT_DIALOG Display a message dialog
4723 wx.PYAPP_ASSERT_LOG Write the assertion info to the wx.Log
4726 return _core
.PyApp_SetAssertMode(*args
, **kwargs
)
4728 def GetAssertMode(*args
, **kwargs
):
4730 GetAssertMode() -> int
4732 Get the current OnAssert behaviour setting.
4734 return _core
.PyApp_GetAssertMode(*args
, **kwargs
)
4736 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4737 """GetMacSupportPCMenuShortcuts() -> bool"""
4738 return _core
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4740 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
4741 def GetMacAboutMenuItemId(*args
, **kwargs
):
4742 """GetMacAboutMenuItemId() -> long"""
4743 return _core
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
4745 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
4746 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
4747 """GetMacPreferencesMenuItemId() -> long"""
4748 return _core
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
4750 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
4751 def GetMacExitMenuItemId(*args
, **kwargs
):
4752 """GetMacExitMenuItemId() -> long"""
4753 return _core
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
4755 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
4756 def GetMacHelpMenuTitleName(*args
, **kwargs
):
4757 """GetMacHelpMenuTitleName() -> String"""
4758 return _core
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
4760 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
4761 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4762 """SetMacSupportPCMenuShortcuts(bool val)"""
4763 return _core
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4765 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
4766 def SetMacAboutMenuItemId(*args
, **kwargs
):
4767 """SetMacAboutMenuItemId(long val)"""
4768 return _core
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
4770 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
4771 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
4772 """SetMacPreferencesMenuItemId(long val)"""
4773 return _core
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
4775 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
4776 def SetMacExitMenuItemId(*args
, **kwargs
):
4777 """SetMacExitMenuItemId(long val)"""
4778 return _core
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
4780 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
4781 def SetMacHelpMenuTitleName(*args
, **kwargs
):
4782 """SetMacHelpMenuTitleName(String val)"""
4783 return _core
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
4785 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
4786 def _BootstrapApp(*args
, **kwargs
):
4790 For internal use only
4792 return _core
.PyApp__BootstrapApp(*args
, **kwargs
)
4794 def GetComCtl32Version(*args
, **kwargs
):
4796 GetComCtl32Version() -> int
4798 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
4799 0 if it wasn't found at all. Raises an exception on non-Windows
4802 return _core
.PyApp_GetComCtl32Version(*args
, **kwargs
)
4804 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
4806 class PyAppPtr(PyApp
):
4807 def __init__(self
, this
):
4809 if not hasattr(self
,"thisown"): self
.thisown
= 0
4810 self
.__class
__ = PyApp
4811 _core
.PyApp_swigregister(PyAppPtr
)
4813 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4814 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
4815 return _core
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4817 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
4818 """PyApp_GetMacAboutMenuItemId() -> long"""
4819 return _core
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
4821 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
4822 """PyApp_GetMacPreferencesMenuItemId() -> long"""
4823 return _core
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
4825 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
4826 """PyApp_GetMacExitMenuItemId() -> long"""
4827 return _core
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
4829 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
4830 """PyApp_GetMacHelpMenuTitleName() -> String"""
4831 return _core
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
4833 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4834 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
4835 return _core
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4837 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
4838 """PyApp_SetMacAboutMenuItemId(long val)"""
4839 return _core
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
4841 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
4842 """PyApp_SetMacPreferencesMenuItemId(long val)"""
4843 return _core
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
4845 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
4846 """PyApp_SetMacExitMenuItemId(long val)"""
4847 return _core
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
4849 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
4850 """PyApp_SetMacHelpMenuTitleName(String val)"""
4851 return _core
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
4853 def PyApp_GetComCtl32Version(*args
, **kwargs
):
4855 PyApp_GetComCtl32Version() -> int
4857 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
4858 0 if it wasn't found at all. Raises an exception on non-Windows
4861 return _core
.PyApp_GetComCtl32Version(*args
, **kwargs
)
4863 #---------------------------------------------------------------------------
4866 def Exit(*args
, **kwargs
):
4870 Force an exit of the application. Convenience for wx.GetApp().Exit()
4872 return _core
.Exit(*args
, **kwargs
)
4874 def Yield(*args
, **kwargs
):
4878 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
4880 return _core
.Yield(*args
, **kwargs
)
4882 def YieldIfNeeded(*args
, **kwargs
):
4884 YieldIfNeeded() -> bool
4886 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
4888 return _core
.YieldIfNeeded(*args
, **kwargs
)
4890 def SafeYield(*args
, **kwargs
):
4892 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
4894 This function is similar to wx.Yield, except that it disables the user input
4895 to all program windows before calling wx.Yield and re-enables it again
4896 afterwards. If win is not None, this window will remain enabled, allowing the
4897 implementation of some limited user interaction.
4899 Returns the result of the call to wx.Yield.
4901 return _core
.SafeYield(*args
, **kwargs
)
4903 def WakeUpIdle(*args
, **kwargs
):
4907 Cause the message queue to become empty again, so idle events will be sent.
4909 return _core
.WakeUpIdle(*args
, **kwargs
)
4911 def PostEvent(*args
, **kwargs
):
4913 PostEvent(EvtHandler dest, Event event)
4915 Send an event to a window or other wx.EvtHandler to be processed later.
4917 return _core
.PostEvent(*args
, **kwargs
)
4919 def App_CleanUp(*args
, **kwargs
):
4923 For internal use only, it is used to cleanup after wxWindows when Python shuts down.
4925 return _core
.App_CleanUp(*args
, **kwargs
)
4927 def GetApp(*args
, **kwargs
):
4931 Return a reference to the current wx.App object.
4933 return _core
.GetApp(*args
, **kwargs
)
4934 #----------------------------------------------------------------------
4936 class PyOnDemandOutputWindow
:
4938 A class that can be used for redirecting Python's stdout and
4939 stderr streams. It will do nothing until something is wrriten to
4940 the stream at which point it will create a Frame with a text area
4941 and write the text there.
4943 def __init__(self
, title
= "wxPython: stdout/stderr"):
4948 def SetParent(self
, parent
):
4949 """Set the window to be used as the popup Frame's parent."""
4950 self
.parent
= parent
4953 def CreateOutputWindow(self
, st
):
4954 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
,
4955 style
=wx
.DEFAULT_FRAME_STYLE | wx
.NO_FULL_REPAINT_ON_RESIZE
)
4956 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
4957 style
= wx
.TE_MULTILINE | wx
.TE_READONLY
)
4958 self
.text
.AppendText(st
)
4959 self
.frame
.SetSize((450, 300))
4960 self
.frame
.Show(True)
4961 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
4964 def OnCloseWindow(self
, event
):
4965 if self
.frame
is not None:
4966 self
.frame
.Destroy()
4971 # These methods provide the file-like output behaviour.
4972 def write(self
, text
):
4974 Create the output window if needed and write the string to it.
4975 If not called in the context of the gui thread then uses
4976 CallAfter to do the work there.
4978 if self
.frame
is None:
4979 if not wx
.Thread_IsMain():
4980 wx
.CallAfter(self
.CreateOutputWindow
, text
)
4982 self
.CreateOutputWindow(text
)
4984 if not wx
.Thread_IsMain():
4985 wx
.CallAfter(self
.text
.AppendText
, text
)
4987 self
.text
.AppendText(text
)
4991 if self
.frame
is not None:
4992 wx
.CallAfter(self
.frame
.Close
)
4996 #----------------------------------------------------------------------
4998 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5000 class App(wx
.PyApp
):
5002 The main application class. Derive from this and implement an OnInit
5003 method that creates a frame and then calls self.SetTopWindow(frame)
5005 outputWindowClass
= PyOnDemandOutputWindow
5007 def __init__(self
, redirect
=_defRedirect
, filename
=None, useBestVisual
=False):
5008 wx
.PyApp
.__init
__(self
)
5010 if wx
.Platform
== "__WXMAC__":
5013 if not MacOS
.WMAvailable():
5015 This program needs access to the screen. Please run with 'pythonw',
5016 not 'python', and only when you are logged in on the main display of
5022 # This has to be done before OnInit
5023 self
.SetUseBestVisual(useBestVisual
)
5025 # Set the default handler for SIGINT. This fixes a problem
5026 # where if Ctrl-C is pressed in the console that started this
5027 # app then it will not appear to do anything, (not even send
5028 # KeyboardInterrupt???) but will later segfault on exit. By
5029 # setting the default handler then the app will exit, as
5030 # expected (depending on platform.)
5033 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5037 # Save and redirect the stdio to a window?
5038 self
.stdioWin
= None
5039 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5041 self
.RedirectStdio(filename
)
5043 # This finishes the initialization of wxWindows and then calls
5044 # the OnInit that should be present in the derived class
5045 self
._BootstrapApp
()
5050 self
.RestoreStdio() # Just in case the MainLoop was overridden
5055 def SetTopWindow(self
, frame
):
5056 """Set the \"main\" top level window"""
5058 self
.stdioWin
.SetParent(frame
)
5059 wx
.PyApp
.SetTopWindow(self
, frame
)
5063 """Execute the main GUI event loop"""
5064 wx
.PyApp
.MainLoop(self
)
5068 def RedirectStdio(self
, filename
=None):
5069 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5071 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5073 self
.stdioWin
= self
.outputWindowClass()
5074 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5077 def RestoreStdio(self
):
5078 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5082 # change from wxPyApp_ to wxApp_
5083 App_GetMacSupportPCMenuShortcuts
= _core
.PyApp_GetMacSupportPCMenuShortcuts
5084 App_GetMacAboutMenuItemId
= _core
.PyApp_GetMacAboutMenuItemId
5085 App_GetMacPreferencesMenuItemId
= _core
.PyApp_GetMacPreferencesMenuItemId
5086 App_GetMacExitMenuItemId
= _core
.PyApp_GetMacExitMenuItemId
5087 App_GetMacHelpMenuTitleName
= _core
.PyApp_GetMacHelpMenuTitleName
5088 App_SetMacSupportPCMenuShortcuts
= _core
.PyApp_SetMacSupportPCMenuShortcuts
5089 App_SetMacAboutMenuItemId
= _core
.PyApp_SetMacAboutMenuItemId
5090 App_SetMacPreferencesMenuItemId
= _core
.PyApp_SetMacPreferencesMenuItemId
5091 App_SetMacExitMenuItemId
= _core
.PyApp_SetMacExitMenuItemId
5092 App_SetMacHelpMenuTitleName
= _core
.PyApp_SetMacHelpMenuTitleName
5093 App_GetComCtl32Version
= _core
.PyApp_GetComCtl32Version
5095 #----------------------------------------------------------------------------
5097 class PySimpleApp(wx
.App
):
5099 A simple application class. You can just create one of these and
5100 then then make your top level windows later, and not have to worry
5103 def __init__(self
, redirect
=False, filename
=None, useBestVisual
=False):
5104 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
)
5107 wx
.InitAllImageHandlers()
5111 # Is anybody using this one?
5112 class PyWidgetTester(wx
.App
):
5113 def __init__(self
, size
= (250, 100)):
5115 wx
.App
.__init
__(self
, 0)
5118 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5119 self
.SetTopWindow(self
.frame
)
5122 def SetWidget(self
, widgetClass
, *args
):
5123 w
= widgetClass(self
.frame
, *args
)
5124 self
.frame
.Show(True)
5126 #----------------------------------------------------------------------------
5127 # DO NOT hold any other references to this object. This is how we
5128 # know when to cleanup system resources that wxWin is holding. When
5129 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5130 # goes to zero and it calls the wxApp_CleanUp function.
5132 class __wxPyCleanup
:
5134 self
.cleanup
= _core
.App_CleanUp
5138 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5140 ## # another possible solution, but it gets called too early...
5141 ## if sys.version[0] == '2':
5143 ## atexit.register(_core.wxApp_CleanUp)
5145 ## sys.exitfunc = _core.wxApp_CleanUp
5148 #----------------------------------------------------------------------------
5150 #---------------------------------------------------------------------------
5152 class AcceleratorEntry(object):
5154 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5155 def __init__(self
, *args
, **kwargs
):
5156 """__init__(int flags=0, int keyCode=0, int cmd=0, MenuItem item=None) -> AcceleratorEntry"""
5157 newobj
= _core
.new_AcceleratorEntry(*args
, **kwargs
)
5158 self
.this
= newobj
.this
5161 def __del__(self
, destroy
=_core
.delete_AcceleratorEntry
):
5164 if self
.thisown
: destroy(self
)
5167 def Set(*args
, **kwargs
):
5168 """Set(int flags, int keyCode, int cmd, MenuItem item=None)"""
5169 return _core
.AcceleratorEntry_Set(*args
, **kwargs
)
5171 def SetMenuItem(*args
, **kwargs
):
5172 """SetMenuItem(MenuItem item)"""
5173 return _core
.AcceleratorEntry_SetMenuItem(*args
, **kwargs
)
5175 def GetMenuItem(*args
, **kwargs
):
5176 """GetMenuItem() -> MenuItem"""
5177 return _core
.AcceleratorEntry_GetMenuItem(*args
, **kwargs
)
5179 def GetFlags(*args
, **kwargs
):
5180 """GetFlags() -> int"""
5181 return _core
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5183 def GetKeyCode(*args
, **kwargs
):
5184 """GetKeyCode() -> int"""
5185 return _core
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5187 def GetCommand(*args
, **kwargs
):
5188 """GetCommand() -> int"""
5189 return _core
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5192 class AcceleratorEntryPtr(AcceleratorEntry
):
5193 def __init__(self
, this
):
5195 if not hasattr(self
,"thisown"): self
.thisown
= 0
5196 self
.__class
__ = AcceleratorEntry
5197 _core
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5199 class AcceleratorTable(Object
):
5201 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5202 def __init__(self
, *args
, **kwargs
):
5204 __init__(entries) -> AcceleratorTable
5206 Construct an AcceleratorTable from a list of AcceleratorEntry items or
5207 3-tuples (flags, keyCode, cmdID)
5209 newobj
= _core
.new_AcceleratorTable(*args
, **kwargs
)
5210 self
.this
= newobj
.this
5213 def __del__(self
, destroy
=_core
.delete_AcceleratorTable
):
5216 if self
.thisown
: destroy(self
)
5219 def Ok(*args
, **kwargs
):
5221 return _core
.AcceleratorTable_Ok(*args
, **kwargs
)
5224 class AcceleratorTablePtr(AcceleratorTable
):
5225 def __init__(self
, this
):
5227 if not hasattr(self
,"thisown"): self
.thisown
= 0
5228 self
.__class
__ = AcceleratorTable
5229 _core
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5232 def GetAccelFromString(*args
, **kwargs
):
5233 """GetAccelFromString(String label) -> AcceleratorEntry"""
5234 return _core
.GetAccelFromString(*args
, **kwargs
)
5235 #---------------------------------------------------------------------------
5237 class VisualAttributes(object):
5238 """struct containing all the visual attributes of a control"""
5240 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5241 def __init__(self
, *args
, **kwargs
):
5243 __init__() -> VisualAttributes
5245 struct containing all the visual attributes of a control
5247 newobj
= _core
.new_VisualAttributes(*args
, **kwargs
)
5248 self
.this
= newobj
.this
5251 def __del__(self
, destroy
=_core
.delete_VisualAttributes
):
5254 if self
.thisown
: destroy(self
)
5257 font
= property(_core
.VisualAttributes_font_get
, _core
.VisualAttributes_font_set
)
5258 colFg
= property(_core
.VisualAttributes_colFg_get
, _core
.VisualAttributes_colFg_set
)
5259 colBg
= property(_core
.VisualAttributes_colBg_get
, _core
.VisualAttributes_colBg_set
)
5261 class VisualAttributesPtr(VisualAttributes
):
5262 def __init__(self
, this
):
5264 if not hasattr(self
,"thisown"): self
.thisown
= 0
5265 self
.__class
__ = VisualAttributes
5266 _core
.VisualAttributes_swigregister(VisualAttributesPtr
)
5267 NullAcceleratorTable
= cvar
.NullAcceleratorTable
5268 PanelNameStr
= cvar
.PanelNameStr
5270 WINDOW_VARIANT_NORMAL
= _core
.WINDOW_VARIANT_NORMAL
5271 WINDOW_VARIANT_SMALL
= _core
.WINDOW_VARIANT_SMALL
5272 WINDOW_VARIANT_MINI
= _core
.WINDOW_VARIANT_MINI
5273 WINDOW_VARIANT_LARGE
= _core
.WINDOW_VARIANT_LARGE
5274 WINDOW_VARIANT_MAX
= _core
.WINDOW_VARIANT_MAX
5275 class Window(EvtHandler
):
5277 wx.Window is the base class for all windows and represents any visible
5278 object on the screen. All controls, top level windows and so on are
5279 wx.Windows. Sizers and device contexts are not however, as they don't
5280 appear on screen themselves.
5284 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5285 def __init__(self
, *args
, **kwargs
):
5287 __init__(Window parent, int id=-1, Point pos=DefaultPosition,
5288 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5290 Construct and show a generic Window.
5292 newobj
= _core
.new_Window(*args
, **kwargs
)
5293 self
.this
= newobj
.this
5296 self
._setOORInfo
(self
)
5298 def Create(*args
, **kwargs
):
5300 Create(Window parent, int id=-1, Point pos=DefaultPosition,
5301 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5303 Create the GUI part of the Window for 2-phase creation mode.
5305 return _core
.Window_Create(*args
, **kwargs
)
5307 def Close(*args
, **kwargs
):
5309 Close(bool force=False) -> bool
5311 This function simply generates a EVT_CLOSE event whose handler usually
5312 tries to close the window. It doesn't close the window itself,
5313 however. If force is False (the default) then the window's close
5314 handler will be allowed to veto the destruction of the window.
5316 Usually Close is only used with the top level windows (wx.Frame and
5317 wx.Dialog classes) as the others are not supposed to have any special
5320 The close handler should check whether the window is being deleted
5321 forcibly, using wx.CloseEvent.GetForce, in which case it should
5322 destroy the window using wx.Window.Destroy.
5324 Note that calling Close does not guarantee that the window will be
5325 destroyed; but it provides a way to simulate a manual close of a
5326 window, which may or may not be implemented by destroying the
5327 window. The default EVT_CLOSE handler for wx.Dialog does not
5328 necessarily delete the dialog, since it will simply simulate an
5329 wxID_CANCEL event which is handled by the appropriate button event
5330 handler and may do anything at all.
5332 To guarantee that the window will be destroyed, call wx.Window.Destroy
5335 return _core
.Window_Close(*args
, **kwargs
)
5337 def Destroy(*args
, **kwargs
):
5341 Destroys the window safely. Frames and dialogs are not destroyed
5342 immediately when this function is called -- they are added to a list
5343 of windows to be deleted on idle time, when all the window's events
5344 have been processed. This prevents problems with events being sent to
5345 non-existent windows.
5347 Returns True if the window has either been successfully deleted, or it
5348 has been added to the list of windows pending real deletion.
5350 return _core
.Window_Destroy(*args
, **kwargs
)
5352 def DestroyChildren(*args
, **kwargs
):
5354 DestroyChildren() -> bool
5356 Destroys all children of a window. Called automatically by the destructor.
5358 return _core
.Window_DestroyChildren(*args
, **kwargs
)
5360 def IsBeingDeleted(*args
, **kwargs
):
5362 IsBeingDeleted() -> bool
5364 Is the window in the process of being deleted?
5366 return _core
.Window_IsBeingDeleted(*args
, **kwargs
)
5368 def SetTitle(*args
, **kwargs
):
5370 SetTitle(String title)
5372 Sets the window's title. Applicable only to frames and dialogs.
5374 return _core
.Window_SetTitle(*args
, **kwargs
)
5376 def GetTitle(*args
, **kwargs
):
5378 GetTitle() -> String
5380 Gets the window's title. Applicable only to frames and dialogs.
5382 return _core
.Window_GetTitle(*args
, **kwargs
)
5384 def SetLabel(*args
, **kwargs
):
5386 SetLabel(String label)
5388 Set the text which the window shows in its label if applicable.
5390 return _core
.Window_SetLabel(*args
, **kwargs
)
5392 def GetLabel(*args
, **kwargs
):
5394 GetLabel() -> String
5396 Generic way of getting a label from any window, for
5397 identification purposes. The interpretation of this function
5398 differs from class to class. For frames and dialogs, the value
5399 returned is the title. For buttons or static text controls, it is
5400 the button text. This function can be useful for meta-programs
5401 such as testing tools or special-needs access programs)which
5402 need to identify windows by name.
5404 return _core
.Window_GetLabel(*args
, **kwargs
)
5406 def SetName(*args
, **kwargs
):
5408 SetName(String name)
5410 Sets the window's name. The window name is used for ressource
5411 setting in X, it is not the same as the window title/label
5413 return _core
.Window_SetName(*args
, **kwargs
)
5415 def GetName(*args
, **kwargs
):
5419 Returns the windows name. This name is not guaranteed to be
5420 unique; it is up to the programmer to supply an appropriate name
5421 in the window constructor or via wx.Window.SetName.
5423 return _core
.Window_GetName(*args
, **kwargs
)
5425 def SetWindowVariant(*args
, **kwargs
):
5427 SetWindowVariant(int variant)
5429 Sets the variant of the window/font size to use for this window,
5430 if the platform supports variants, for example, wxMac. Variant values are:
5432 wx.WINDOW_VARIANT_NORMAL Normal size
5433 wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal)
5434 wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal)
5435 wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal)
5438 return _core
.Window_SetWindowVariant(*args
, **kwargs
)
5440 def GetWindowVariant(*args
, **kwargs
):
5441 """GetWindowVariant() -> int"""
5442 return _core
.Window_GetWindowVariant(*args
, **kwargs
)
5444 def SetId(*args
, **kwargs
):
5448 Sets the identifier of the window. Each window has an integer
5449 identifier. If the application has not provided one, an identifier
5450 will be generated. Normally, the identifier should be provided on
5451 creation and should not be modified subsequently.
5453 return _core
.Window_SetId(*args
, **kwargs
)
5455 def GetId(*args
, **kwargs
):
5459 Returns the identifier of the window. Each window has an integer
5460 identifier. If the application has not provided one (or the default Id
5461 -1 is used) then an unique identifier with a negative value will be
5464 return _core
.Window_GetId(*args
, **kwargs
)
5466 def NewControlId(*args
, **kwargs
):
5468 NewControlId() -> int
5470 Generate a control id for the controls which were not given one.
5472 return _core
.Window_NewControlId(*args
, **kwargs
)
5474 NewControlId
= staticmethod(NewControlId
)
5475 def NextControlId(*args
, **kwargs
):
5477 NextControlId(int winid) -> int
5479 Get the id of the control following the one with the given
5482 return _core
.Window_NextControlId(*args
, **kwargs
)
5484 NextControlId
= staticmethod(NextControlId
)
5485 def PrevControlId(*args
, **kwargs
):
5487 PrevControlId(int winid) -> int
5489 Get the id of the control preceding the one with the given
5492 return _core
.Window_PrevControlId(*args
, **kwargs
)
5494 PrevControlId
= staticmethod(PrevControlId
)
5495 def SetSize(*args
, **kwargs
):
5499 Sets the size of the window in pixels.
5501 return _core
.Window_SetSize(*args
, **kwargs
)
5503 def SetDimensions(*args
, **kwargs
):
5505 SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
5507 Sets the position and size of the window in pixels. The sizeFlags
5508 parameter indicates the interpretation of the other params if they are
5509 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
5510 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
5511 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
5512 dimensions of -1 and less to be interpreted as real dimensions, not
5515 return _core
.Window_SetDimensions(*args
, **kwargs
)
5517 def SetRect(*args
, **kwargs
):
5519 SetRect(Rect rect, int sizeFlags=SIZE_AUTO)
5521 Sets the position and size of the window in pixels using a wx.Rect.
5523 return _core
.Window_SetRect(*args
, **kwargs
)
5525 def SetSizeWH(*args
, **kwargs
):
5527 SetSizeWH(int width, int height)
5529 Sets the size of the window in pixels.
5531 return _core
.Window_SetSizeWH(*args
, **kwargs
)
5533 def Move(*args
, **kwargs
):
5535 Move(Point pt, int flags=SIZE_USE_EXISTING)
5537 Moves the window to the given position.
5539 return _core
.Window_Move(*args
, **kwargs
)
5542 def MoveXY(*args
, **kwargs
):
5544 MoveXY(int x, int y, int flags=SIZE_USE_EXISTING)
5546 Moves the window to the given position.
5548 return _core
.Window_MoveXY(*args
, **kwargs
)
5550 def Raise(*args
, **kwargs
):
5554 Raises the window to the top of the window hierarchy if it is a
5555 managed window (dialog or frame).
5557 return _core
.Window_Raise(*args
, **kwargs
)
5559 def Lower(*args
, **kwargs
):
5563 Lowers the window to the bottom of the window hierarchy if it is a
5564 managed window (dialog or frame).
5566 return _core
.Window_Lower(*args
, **kwargs
)
5568 def SetClientSize(*args
, **kwargs
):
5570 SetClientSize(Size size)
5572 This sets the size of the window client area in pixels. Using this
5573 function to size a window tends to be more device-independent than
5574 wx.Window.SetSize, since the application need not worry about what
5575 dimensions the border or title bar have when trying to fit the window
5576 around panel items, for example.
5578 return _core
.Window_SetClientSize(*args
, **kwargs
)
5580 def SetClientSizeWH(*args
, **kwargs
):
5582 SetClientSizeWH(int width, int height)
5584 This sets the size of the window client area in pixels. Using this
5585 function to size a window tends to be more device-independent than
5586 wx.Window.SetSize, since the application need not worry about what
5587 dimensions the border or title bar have when trying to fit the window
5588 around panel items, for example.
5590 return _core
.Window_SetClientSizeWH(*args
, **kwargs
)
5592 def SetClientRect(*args
, **kwargs
):
5594 SetClientRect(Rect rect)
5596 This sets the size of the window client area in pixels. Using this
5597 function to size a window tends to be more device-independent than
5598 wx.Window.SetSize, since the application need not worry about what
5599 dimensions the border or title bar have when trying to fit the window
5600 around panel items, for example.
5602 return _core
.Window_SetClientRect(*args
, **kwargs
)
5604 def GetPosition(*args
, **kwargs
):
5606 GetPosition() -> Point
5608 Get the window's position.
5610 return _core
.Window_GetPosition(*args
, **kwargs
)
5612 def GetPositionTuple(*args
, **kwargs
):
5614 GetPositionTuple() -> (x,y)
5616 Get the window's position.
5618 return _core
.Window_GetPositionTuple(*args
, **kwargs
)
5620 def GetSize(*args
, **kwargs
):
5624 Get the window size.
5626 return _core
.Window_GetSize(*args
, **kwargs
)
5628 def GetSizeTuple(*args
, **kwargs
):
5630 GetSizeTuple() -> (width, height)
5632 Get the window size.
5634 return _core
.Window_GetSizeTuple(*args
, **kwargs
)
5636 def GetRect(*args
, **kwargs
):
5640 Returns the size and position of the window as a wx.Rect object.
5642 return _core
.Window_GetRect(*args
, **kwargs
)
5644 def GetClientSize(*args
, **kwargs
):
5646 GetClientSize() -> Size
5648 This gets the size of the window's 'client area' in pixels. The client
5649 area is the area which may be drawn on by the programmer, excluding
5650 title bar, border, scrollbars, etc.
5652 return _core
.Window_GetClientSize(*args
, **kwargs
)
5654 def GetClientSizeTuple(*args
, **kwargs
):
5656 GetClientSizeTuple() -> (width, height)
5658 This gets the size of the window's 'client area' in pixels. The client
5659 area is the area which may be drawn on by the programmer, excluding
5660 title bar, border, scrollbars, etc.
5662 return _core
.Window_GetClientSizeTuple(*args
, **kwargs
)
5664 def GetClientAreaOrigin(*args
, **kwargs
):
5666 GetClientAreaOrigin() -> Point
5668 Get the origin of the client area of the window relative to the
5669 window's top left corner (the client area may be shifted because of
5670 the borders, scrollbars, other decorations...)
5672 return _core
.Window_GetClientAreaOrigin(*args
, **kwargs
)
5674 def GetClientRect(*args
, **kwargs
):
5676 GetClientRect() -> Rect
5678 Get the client area position and size as a wx.Rect object.
5680 return _core
.Window_GetClientRect(*args
, **kwargs
)
5682 def GetBestSize(*args
, **kwargs
):
5684 GetBestSize() -> Size
5686 This functions returns the best acceptable minimal size for the
5687 window, if applicable. For example, for a static text control, it will be
5688 the minimal size such that the control label is not truncated. For
5689 windows containing subwindows (suzh aswx.Panel), the size returned
5690 by this function will be the same as the size the window would have
5691 had after calling Fit.
5693 return _core
.Window_GetBestSize(*args
, **kwargs
)
5695 def GetBestSizeTuple(*args
, **kwargs
):
5697 GetBestSizeTuple() -> (width, height)
5699 This functions returns the best acceptable minimal size for the
5700 window, if applicable. For example, for a static text control, it will be
5701 the minimal size such that the control label is not truncated. For
5702 windows containing subwindows (suzh aswx.Panel), the size returned
5703 by this function will be the same as the size the window would have
5704 had after calling Fit.
5706 return _core
.Window_GetBestSizeTuple(*args
, **kwargs
)
5708 def GetAdjustedBestSize(*args
, **kwargs
):
5710 GetAdjustedBestSize() -> Size
5712 This method is similar to GetBestSize, except in one
5713 thing. GetBestSize should return the minimum untruncated size of the
5714 window, while this method will return the largest of BestSize and any
5715 user specified minimum size. ie. it is the minimum size the window
5716 should currently be drawn at, not the minimal size it can possibly
5719 return _core
.Window_GetAdjustedBestSize(*args
, **kwargs
)
5721 def Center(*args
, **kwargs
):
5723 Center(int direction=BOTH)
5725 Centers the window. The parameter specifies the direction for
5726 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
5727 also include wx.CENTER_ON_SCREEN flag if you want to center the window
5728 on the entire screen and not on its parent window. If it is a
5729 top-level window and has no parent then it will always be centered
5730 relative to the screen.
5732 return _core
.Window_Center(*args
, **kwargs
)
5735 def CenterOnScreen(*args
, **kwargs
):
5737 CenterOnScreen(int dir=BOTH)
5739 Center on screen (only works for top level windows)
5741 return _core
.Window_CenterOnScreen(*args
, **kwargs
)
5743 CentreOnScreen
= CenterOnScreen
5744 def CenterOnParent(*args
, **kwargs
):
5746 CenterOnParent(int dir=BOTH)
5748 Center with respect to the the parent window
5750 return _core
.Window_CenterOnParent(*args
, **kwargs
)
5752 CentreOnParent
= CenterOnParent
5753 def Fit(*args
, **kwargs
):
5757 Sizes the window so that it fits around its subwindows. This function
5758 won't do anything if there are no subwindows and will only really work
5759 correctly if sizers are used for the subwindows layout. Also, if the
5760 window has exactly one subwindow it is better (faster and the result
5761 is more precise as Fit adds some margin to account for fuzziness of
5762 its calculations) to call window.SetClientSize(child.GetSize())
5763 instead of calling Fit.
5765 return _core
.Window_Fit(*args
, **kwargs
)
5767 def FitInside(*args
, **kwargs
):
5771 Similar to Fit, but sizes the interior (virtual) size of a
5772 window. Mainly useful with scrolled windows to reset scrollbars after
5773 sizing changes that do not trigger a size event, and/or scrolled
5774 windows without an interior sizer. This function similarly won't do
5775 anything if there are no subwindows.
5777 return _core
.Window_FitInside(*args
, **kwargs
)
5779 def SetSizeHints(*args
):
5781 SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
5783 SetSizeHints(Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
5785 Allows specification of minimum and maximum window sizes, and window
5786 size increments. If a pair of values is not set (or set to -1), the
5787 default values will be used. If this function is called, the user
5788 will not be able to size the window outside the given bounds. The
5789 resizing increments are only significant under Motif or Xt.
5791 return _core
.Window_SetSizeHints(*args
)
5793 def SetVirtualSizeHints(*args
):
5795 SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1)
5796 SetVirtualSizeHints(Size minSize, Size maxSize=DefaultSize)
5798 Allows specification of minimum and maximum virtual window sizes. If a
5799 pair of values is not set (or set to -1), the default values will be
5800 used. If this function is called, the user will not be able to size
5801 the virtual area of the window outside the given bounds.
5803 return _core
.Window_SetVirtualSizeHints(*args
)
5805 def GetMinWidth(*args
, **kwargs
):
5806 """GetMinWidth() -> int"""
5807 return _core
.Window_GetMinWidth(*args
, **kwargs
)
5809 def GetMinHeight(*args
, **kwargs
):
5810 """GetMinHeight() -> int"""
5811 return _core
.Window_GetMinHeight(*args
, **kwargs
)
5813 def GetMaxWidth(*args
, **kwargs
):
5814 """GetMaxWidth() -> int"""
5815 return _core
.Window_GetMaxWidth(*args
, **kwargs
)
5817 def GetMaxHeight(*args
, **kwargs
):
5818 """GetMaxHeight() -> int"""
5819 return _core
.Window_GetMaxHeight(*args
, **kwargs
)
5821 def GetMaxSize(*args
, **kwargs
):
5822 """GetMaxSize() -> Size"""
5823 return _core
.Window_GetMaxSize(*args
, **kwargs
)
5825 def GetMinSize(*args
, **kwargs
):
5826 """GetMinSize() -> Size"""
5827 return _core
.Window_GetMinSize(*args
, **kwargs
)
5829 def SetVirtualSize(*args
, **kwargs
):
5831 SetVirtualSize(Size size)
5833 Set the the virtual size of a window in pixels. For most windows this
5834 is just the client area of the window, but for some like scrolled
5835 windows it is more or less independent of the screen window size.
5837 return _core
.Window_SetVirtualSize(*args
, **kwargs
)
5839 def SetVirtualSizeWH(*args
, **kwargs
):
5841 SetVirtualSizeWH(int w, int h)
5843 Set the the virtual size of a window in pixels. For most windows this
5844 is just the client area of the window, but for some like scrolled
5845 windows it is more or less independent of the screen window size.
5847 return _core
.Window_SetVirtualSizeWH(*args
, **kwargs
)
5849 def GetVirtualSize(*args
, **kwargs
):
5851 GetVirtualSize() -> Size
5853 Get the the virtual size of the window in pixels. For most windows
5854 this is just the client area of the window, but for some like scrolled
5855 windows it is more or less independent of the screen window size.
5857 return _core
.Window_GetVirtualSize(*args
, **kwargs
)
5859 def GetVirtualSizeTuple(*args
, **kwargs
):
5861 GetVirtualSizeTuple() -> (width, height)
5863 Get the the virtual size of the window in pixels. For most windows
5864 this is just the client area of the window, but for some like scrolled
5865 windows it is more or less independent of the screen window size.
5867 return _core
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
5869 def GetBestVirtualSize(*args
, **kwargs
):
5871 GetBestVirtualSize() -> Size
5873 Return the largest of ClientSize and BestSize (as determined by a
5874 sizer, interior children, or other means)
5876 return _core
.Window_GetBestVirtualSize(*args
, **kwargs
)
5878 def Show(*args
, **kwargs
):
5880 Show(bool show=True) -> bool
5882 Shows or hides the window. You may need to call Raise for a top level
5883 window if you want to bring it to top, although this is not needed if
5884 Show is called immediately after the frame creation. Returns True if
5885 the window has been shown or hidden or False if nothing was done
5886 because it already was in the requested state.
5888 return _core
.Window_Show(*args
, **kwargs
)
5890 def Hide(*args
, **kwargs
):
5894 Equivalent to calling Show(False).
5896 return _core
.Window_Hide(*args
, **kwargs
)
5898 def Enable(*args
, **kwargs
):
5900 Enable(bool enable=True) -> bool
5902 Enable or disable the window for user input. Note that when a parent
5903 window is disabled, all of its children are disabled as well and they
5904 are reenabled again when the parent is. Returns true if the window
5905 has been enabled or disabled, false if nothing was done, i.e. if the
5906 window had already been in the specified state.
5908 return _core
.Window_Enable(*args
, **kwargs
)
5910 def Disable(*args
, **kwargs
):
5914 Disables the window, same as Enable(false).
5916 return _core
.Window_Disable(*args
, **kwargs
)
5918 def IsShown(*args
, **kwargs
):
5922 Returns true if the window is shown, false if it has been hidden.
5924 return _core
.Window_IsShown(*args
, **kwargs
)
5926 def IsEnabled(*args
, **kwargs
):
5930 Returns true if the window is enabled for input, false otherwise.
5932 return _core
.Window_IsEnabled(*args
, **kwargs
)
5934 def SetWindowStyleFlag(*args
, **kwargs
):
5936 SetWindowStyleFlag(long style)
5938 Sets the style of the window. Please note that some styles cannot be
5939 changed after the window creation and that Refresh() might be called
5940 after changing the others for the change to take place immediately.
5942 return _core
.Window_SetWindowStyleFlag(*args
, **kwargs
)
5944 def GetWindowStyleFlag(*args
, **kwargs
):
5946 GetWindowStyleFlag() -> long
5948 Gets the window style that was passed to the constructor or Create
5951 return _core
.Window_GetWindowStyleFlag(*args
, **kwargs
)
5953 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
5954 def HasFlag(*args
, **kwargs
):
5956 HasFlag(int flag) -> bool
5958 Test if the given style is set for this window.
5960 return _core
.Window_HasFlag(*args
, **kwargs
)
5962 def IsRetained(*args
, **kwargs
):
5964 IsRetained() -> bool
5966 Returns true if the window is retained, false otherwise. Retained
5967 windows are only available on X platforms.
5969 return _core
.Window_IsRetained(*args
, **kwargs
)
5971 def SetExtraStyle(*args
, **kwargs
):
5973 SetExtraStyle(long exStyle)
5975 Sets the extra style bits for the window. Extra styles are the less
5976 often used style bits which can't be set with the constructor or with
5977 SetWindowStyleFlag()
5979 return _core
.Window_SetExtraStyle(*args
, **kwargs
)
5981 def GetExtraStyle(*args
, **kwargs
):
5983 GetExtraStyle() -> long
5985 Returns the extra style bits for the window.
5987 return _core
.Window_GetExtraStyle(*args
, **kwargs
)
5989 def MakeModal(*args
, **kwargs
):
5991 MakeModal(bool modal=True)
5993 Disables all other windows in the application so that the user can
5994 only interact with this window. Passing False will reverse this
5997 return _core
.Window_MakeModal(*args
, **kwargs
)
5999 def SetThemeEnabled(*args
, **kwargs
):
6001 SetThemeEnabled(bool enableTheme)
6003 This function tells a window if it should use the system's "theme"
6004 code to draw the windows' background instead if its own background
6005 drawing code. This will only have an effect on platforms that support
6006 the notion of themes in user defined windows. One such platform is
6007 GTK+ where windows can have (very colourful) backgrounds defined by a
6008 user's selected theme.
6010 Dialogs, notebook pages and the status bar have this flag set to true
6011 by default so that the default look and feel is simulated best.
6013 return _core
.Window_SetThemeEnabled(*args
, **kwargs
)
6015 def GetThemeEnabled(*args
, **kwargs
):
6017 GetThemeEnabled() -> bool
6019 Return the themeEnabled flag.
6021 return _core
.Window_GetThemeEnabled(*args
, **kwargs
)
6023 def SetFocus(*args
, **kwargs
):
6027 Set's the focus to this window, allowing it to receive keyboard input.
6029 return _core
.Window_SetFocus(*args
, **kwargs
)
6031 def SetFocusFromKbd(*args
, **kwargs
):
6035 Set focus to this window as the result of a keyboard action. Normally
6036 only called internally.
6038 return _core
.Window_SetFocusFromKbd(*args
, **kwargs
)
6040 def FindFocus(*args
, **kwargs
):
6042 FindFocus() -> Window
6044 Returns the window or control that currently has the keyboard focus,
6047 return _core
.Window_FindFocus(*args
, **kwargs
)
6049 FindFocus
= staticmethod(FindFocus
)
6050 def AcceptsFocus(*args
, **kwargs
):
6052 AcceptsFocus() -> bool
6054 Can this window have focus?
6056 return _core
.Window_AcceptsFocus(*args
, **kwargs
)
6058 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6060 AcceptsFocusFromKeyboard() -> bool
6062 Can this window be given focus by keyboard navigation? if not, the
6063 only way to give it focus (provided it accepts it at all) is to click
6066 return _core
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6068 def GetDefaultItem(*args
, **kwargs
):
6070 GetDefaultItem() -> Window
6072 Get the default child of this parent, i.e. the one which is activated
6073 by pressing <Enter> such as the OK button on a wx.Dialog.
6075 return _core
.Window_GetDefaultItem(*args
, **kwargs
)
6077 def SetDefaultItem(*args
, **kwargs
):
6079 SetDefaultItem(Window child) -> Window
6081 Set this child as default, return the old default.
6083 return _core
.Window_SetDefaultItem(*args
, **kwargs
)
6085 def SetTmpDefaultItem(*args
, **kwargs
):
6087 SetTmpDefaultItem(Window win)
6089 Set this child as temporary default
6091 return _core
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6093 def GetChildren(*args
, **kwargs
):
6095 GetChildren() -> PyObject
6097 Returns a list of the window's children. NOTE: Currently this is a
6098 copy of the child window list maintained by the window, so the return
6099 value of this function is only valid as long as the window's children
6102 return _core
.Window_GetChildren(*args
, **kwargs
)
6104 def GetParent(*args
, **kwargs
):
6106 GetParent() -> Window
6108 Returns the parent window of this window, or None if there isn't one.
6110 return _core
.Window_GetParent(*args
, **kwargs
)
6112 def GetGrandParent(*args
, **kwargs
):
6114 GetGrandParent() -> Window
6116 Returns the parent of the parent of this window, or None if there isn't one.
6118 return _core
.Window_GetGrandParent(*args
, **kwargs
)
6120 def IsTopLevel(*args
, **kwargs
):
6122 IsTopLevel() -> bool
6124 Returns true if the given window is a top-level one. Currently all
6125 frames and dialogs are always considered to be top-level windows (even
6126 if they have a parent window).
6128 return _core
.Window_IsTopLevel(*args
, **kwargs
)
6130 def Reparent(*args
, **kwargs
):
6132 Reparent(Window newParent) -> bool
6134 Reparents the window, i.e the window will be removed from its current
6135 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6136 re-inserted into another. Available on Windows and GTK. Returns True
6137 if the parent was changed, False otherwise (error or newParent ==
6140 return _core
.Window_Reparent(*args
, **kwargs
)
6142 def AddChild(*args
, **kwargs
):
6144 AddChild(Window child)
6146 Adds a child window. This is called automatically by window creation
6147 functions so should not be required by the application programmer.
6149 return _core
.Window_AddChild(*args
, **kwargs
)
6151 def RemoveChild(*args
, **kwargs
):
6153 RemoveChild(Window child)
6155 Removes a child window. This is called automatically by window
6156 deletion functions so should not be required by the application
6159 return _core
.Window_RemoveChild(*args
, **kwargs
)
6161 def FindWindowById(*args
, **kwargs
):
6163 FindWindowById(long winid) -> Window
6165 Find a chld of this window by window ID
6167 return _core
.Window_FindWindowById(*args
, **kwargs
)
6169 def FindWindowByName(*args
, **kwargs
):
6171 FindWindowByName(String name) -> Window
6173 Find a child of this window by name
6175 return _core
.Window_FindWindowByName(*args
, **kwargs
)
6177 def GetEventHandler(*args
, **kwargs
):
6179 GetEventHandler() -> EvtHandler
6181 Returns the event handler for this window. By default, the window is
6182 its own event handler.
6184 return _core
.Window_GetEventHandler(*args
, **kwargs
)
6186 def SetEventHandler(*args
, **kwargs
):
6188 SetEventHandler(EvtHandler handler)
6190 Sets the event handler for this window. An event handler is an object
6191 that is capable of processing the events sent to a window. By default,
6192 the window is its own event handler, but an application may wish to
6193 substitute another, for example to allow central implementation of
6194 event-handling for a variety of different window classes.
6196 It is usually better to use wx.Window.PushEventHandler since this sets
6197 up a chain of event handlers, where an event not handled by one event
6198 handler is handed to the next one in the chain.
6200 return _core
.Window_SetEventHandler(*args
, **kwargs
)
6202 def PushEventHandler(*args
, **kwargs
):
6204 PushEventHandler(EvtHandler handler)
6206 Pushes this event handler onto the event handler stack for the window.
6207 An event handler is an object that is capable of processing the events
6208 sent to a window. By default, the window is its own event handler, but
6209 an application may wish to substitute another, for example to allow
6210 central implementation of event-handling for a variety of different
6213 wx.Window.PushEventHandler allows an application to set up a chain of
6214 event handlers, where an event not handled by one event handler is
6215 handed to the next one in the chain. Use wx.Window.PopEventHandler to
6216 remove the event handler.
6218 return _core
.Window_PushEventHandler(*args
, **kwargs
)
6220 def PopEventHandler(*args
, **kwargs
):
6222 PopEventHandler(bool deleteHandler=False) -> EvtHandler
6224 Removes and returns the top-most event handler on the event handler
6225 stack. If deleteHandler is True then the wx.EvtHandler object will be
6226 destroyed after it is popped.
6228 return _core
.Window_PopEventHandler(*args
, **kwargs
)
6230 def RemoveEventHandler(*args
, **kwargs
):
6232 RemoveEventHandler(EvtHandler handler) -> bool
6234 Find the given handler in the event handler chain and remove (but
6235 not delete) it from the event handler chain, return True if it was
6236 found and False otherwise (this also results in an assert failure so
6237 this function should only be called when the handler is supposed to
6240 return _core
.Window_RemoveEventHandler(*args
, **kwargs
)
6242 def SetValidator(*args
, **kwargs
):
6244 SetValidator(Validator validator)
6246 Deletes the current validator (if any) and sets the window validator,
6247 having called wx.Validator.Clone to create a new validator of this
6250 return _core
.Window_SetValidator(*args
, **kwargs
)
6252 def GetValidator(*args
, **kwargs
):
6254 GetValidator() -> Validator
6256 Returns a pointer to the current validator for the window, or None if
6259 return _core
.Window_GetValidator(*args
, **kwargs
)
6261 def Validate(*args
, **kwargs
):
6265 Validates the current values of the child controls using their
6266 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
6267 extra style flag set, the method will also call Validate() of all
6268 child windows. Returns false if any of the validations failed.
6270 return _core
.Window_Validate(*args
, **kwargs
)
6272 def TransferDataToWindow(*args
, **kwargs
):
6274 TransferDataToWindow() -> bool
6276 Transfers values to child controls from data areas specified by
6277 their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
6278 extra style flag set, the method will also call
6279 TransferDataToWindow() of all child windows.
6281 return _core
.Window_TransferDataToWindow(*args
, **kwargs
)
6283 def TransferDataFromWindow(*args
, **kwargs
):
6285 TransferDataFromWindow() -> bool
6287 Transfers values from child controls to data areas specified by
6288 their validators. Returns false if a transfer failed. If the
6289 window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the
6290 method will also call TransferDataFromWindow() of all child
6293 return _core
.Window_TransferDataFromWindow(*args
, **kwargs
)
6295 def InitDialog(*args
, **kwargs
):
6299 Sends an EVT_INIT_DIALOG event, whose handler usually transfers
6300 data to the dialog via validators.
6302 return _core
.Window_InitDialog(*args
, **kwargs
)
6304 def SetAcceleratorTable(*args
, **kwargs
):
6306 SetAcceleratorTable(AcceleratorTable accel)
6308 Sets the accelerator table for this window.
6310 return _core
.Window_SetAcceleratorTable(*args
, **kwargs
)
6312 def GetAcceleratorTable(*args
, **kwargs
):
6314 GetAcceleratorTable() -> AcceleratorTable
6316 Gets the accelerator table for this window.
6318 return _core
.Window_GetAcceleratorTable(*args
, **kwargs
)
6320 def RegisterHotKey(*args
, **kwargs
):
6322 RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool
6324 Registers a system wide hotkey. Every time the user presses the hotkey
6325 registered here, this window will receive a hotkey event. It will
6326 receive the event even if the application is in the background and
6327 does not have the input focus because the user is working with some
6328 other application. To bind an event handler function to this hotkey
6329 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6330 hotkey was registered successfully.
6332 return _core
.Window_RegisterHotKey(*args
, **kwargs
)
6334 def UnregisterHotKey(*args
, **kwargs
):
6336 UnregisterHotKey(int hotkeyId) -> bool
6338 Unregisters a system wide hotkey.
6340 return _core
.Window_UnregisterHotKey(*args
, **kwargs
)
6342 def ConvertDialogPointToPixels(*args
, **kwargs
):
6344 ConvertDialogPointToPixels(Point pt) -> Point
6346 Converts a point or size from dialog units to pixels. Dialog units
6347 are used for maintaining a dialog's proportions even if the font
6348 changes. For the x dimension, the dialog units are multiplied by the
6349 average character width and then divided by 4. For the y dimension,
6350 the dialog units are multiplied by the average character height and
6353 return _core
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
6355 def ConvertDialogSizeToPixels(*args
, **kwargs
):
6357 ConvertDialogSizeToPixels(Size sz) -> Size
6359 Converts a point or size from dialog units to pixels. Dialog units
6360 are used for maintaining a dialog's proportions even if the font
6361 changes. For the x dimension, the dialog units are multiplied by the
6362 average character width and then divided by 4. For the y dimension,
6363 the dialog units are multiplied by the average character height and
6366 return _core
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
6368 def DLG_PNT(*args
, **kwargs
):
6370 DLG_PNT(Point pt) -> Point
6372 Converts a point or size from dialog units to pixels. Dialog units
6373 are used for maintaining a dialog's proportions even if the font
6374 changes. For the x dimension, the dialog units are multiplied by the
6375 average character width and then divided by 4. For the y dimension,
6376 the dialog units are multiplied by the average character height and
6379 return _core
.Window_DLG_PNT(*args
, **kwargs
)
6381 def DLG_SZE(*args
, **kwargs
):
6383 DLG_SZE(Size sz) -> Size
6385 Converts a point or size from dialog units to pixels. Dialog units
6386 are used for maintaining a dialog's proportions even if the font
6387 changes. For the x dimension, the dialog units are multiplied by the
6388 average character width and then divided by 4. For the y dimension,
6389 the dialog units are multiplied by the average character height and
6392 return _core
.Window_DLG_SZE(*args
, **kwargs
)
6394 def ConvertPixelPointToDialog(*args
, **kwargs
):
6395 """ConvertPixelPointToDialog(Point pt) -> Point"""
6396 return _core
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
6398 def ConvertPixelSizeToDialog(*args
, **kwargs
):
6399 """ConvertPixelSizeToDialog(Size sz) -> Size"""
6400 return _core
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
6402 def WarpPointer(*args
, **kwargs
):
6404 WarpPointer(int x, int y)
6406 Moves the pointer to the given position on the window.
6408 NOTE: This function is not supported under Mac because Apple Human
6409 Interface Guidelines forbid moving the mouse cursor programmatically.
6411 return _core
.Window_WarpPointer(*args
, **kwargs
)
6413 def CaptureMouse(*args
, **kwargs
):
6417 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
6418 release the capture.
6420 Note that wxWindows maintains the stack of windows having captured the
6421 mouse and when the mouse is released the capture returns to the window
6422 which had had captured it previously and it is only really released if
6423 there were no previous window. In particular, this means that you must
6424 release the mouse as many times as you capture it.
6426 return _core
.Window_CaptureMouse(*args
, **kwargs
)
6428 def ReleaseMouse(*args
, **kwargs
):
6432 Releases mouse input captured with wx.Window.CaptureMouse.
6434 return _core
.Window_ReleaseMouse(*args
, **kwargs
)
6436 def GetCapture(*args
, **kwargs
):
6438 GetCapture() -> Window
6440 Returns the window which currently captures the mouse or None
6442 return _core
.Window_GetCapture(*args
, **kwargs
)
6444 GetCapture
= staticmethod(GetCapture
)
6445 def HasCapture(*args
, **kwargs
):
6447 HasCapture() -> bool
6449 Returns true if this window has the current mouse capture.
6451 return _core
.Window_HasCapture(*args
, **kwargs
)
6453 def Refresh(*args
, **kwargs
):
6455 Refresh(bool eraseBackground=True, Rect rect=None)
6457 Mark the specified rectangle (or the whole window) as "dirty" so it
6458 will be repainted. Causes an EVT_PAINT event to be generated and sent
6461 return _core
.Window_Refresh(*args
, **kwargs
)
6463 def RefreshRect(*args
, **kwargs
):
6465 RefreshRect(Rect rect)
6467 Redraws the contents of the given rectangle: the area inside it will
6468 be repainted. This is the same as Refresh but has a nicer syntax.
6470 return _core
.Window_RefreshRect(*args
, **kwargs
)
6472 def Update(*args
, **kwargs
):
6476 Calling this method immediately repaints the invalidated area of the
6477 window instead of waiting for the EVT_PAINT event to happen, (normally
6478 this would usually only happen when the flow of control returns to the
6479 event loop.) Notice that this function doesn't refresh the window and
6480 does nothing if the window has been already repainted. Use Refresh
6481 first if you want to immediately redraw the window (or some portion of
6482 it) unconditionally.
6484 return _core
.Window_Update(*args
, **kwargs
)
6486 def ClearBackground(*args
, **kwargs
):
6490 Clears the window by filling it with the current background
6491 colour. Does not cause an erase background event to be generated.
6493 return _core
.Window_ClearBackground(*args
, **kwargs
)
6495 def Freeze(*args
, **kwargs
):
6499 Freezes the window or, in other words, prevents any updates from taking place
6500 on screen, the window is not redrawn at all. Thaw must be called to reenable
6501 window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw
6502 being delayed until all the nesting has been undone.
6504 This method is useful for visual appearance optimization (for example,
6505 it is a good idea to use it before inserting large amount of text into
6506 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
6507 for all controls so it is mostly just a hint to wxWindows and not a
6508 mandatory directive.
6510 return _core
.Window_Freeze(*args
, **kwargs
)
6512 def Thaw(*args
, **kwargs
):
6516 Reenables window updating after a previous call to Freeze. Calls to
6517 Freeze/Thaw may be nested, so Thaw must be called the same number of times
6518 that Freeze was before the window will be updated.
6520 return _core
.Window_Thaw(*args
, **kwargs
)
6522 def PrepareDC(*args
, **kwargs
):
6526 Call this function to prepare the device context for drawing a
6527 scrolled image. It sets the device origin according to the current
6530 return _core
.Window_PrepareDC(*args
, **kwargs
)
6532 def GetUpdateRegion(*args
, **kwargs
):
6534 GetUpdateRegion() -> Region
6536 Returns the region specifying which parts of the window have been
6537 damaged. Should only be called within an EVT_PAINT handler.
6539 return _core
.Window_GetUpdateRegion(*args
, **kwargs
)
6541 def GetUpdateClientRect(*args
, **kwargs
):
6543 GetUpdateClientRect() -> Rect
6545 Get the update rectangle region bounding box in client coords.
6547 return _core
.Window_GetUpdateClientRect(*args
, **kwargs
)
6549 def IsExposed(*args
, **kwargs
):
6551 IsExposed(int x, int y, int w=1, int h=1) -> bool
6553 Returns true if the given point or rectangle area has been exposed
6554 since the last repaint. Call this in an paint event handler to
6555 optimize redrawing by only redrawing those areas, which have been
6558 return _core
.Window_IsExposed(*args
, **kwargs
)
6560 def IsExposedPoint(*args
, **kwargs
):
6562 IsExposedPoint(Point pt) -> bool
6564 Returns true if the given point or rectangle area has been exposed
6565 since the last repaint. Call this in an paint event handler to
6566 optimize redrawing by only redrawing those areas, which have been
6569 return _core
.Window_IsExposedPoint(*args
, **kwargs
)
6571 def IsExposedRect(*args
, **kwargs
):
6573 IsExposedRect(Rect rect) -> bool
6575 Returns true if the given point or rectangle area has been exposed
6576 since the last repaint. Call this in an paint event handler to
6577 optimize redrawing by only redrawing those areas, which have been
6580 return _core
.Window_IsExposedRect(*args
, **kwargs
)
6582 def GetDefaultAttributes(*args
, **kwargs
):
6584 GetDefaultAttributes() -> VisualAttributes
6586 Get the default attributes for an instance of this class. This
6587 is useful if you want to use the same font or colour in your own
6588 control as in a standard control -- which is a much better idea
6589 than hard coding specific colours or fonts which might look
6590 completely out of place on the users system, especially if it
6593 return _core
.Window_GetDefaultAttributes(*args
, **kwargs
)
6595 def GetClassDefaultAttributes(*args
, **kwargs
):
6597 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
6599 Get the default attributes for this class. This is useful if
6600 you want to use the same font or colour in your own control as
6601 in a standard control -- which is a much better idea than hard
6602 coding specific colours or fonts which might look completely out
6603 of place on the users system, especially if it uses themes.
6605 The variant parameter is only relevant under Mac currently and is
6606 ignore under other platforms. Under Mac, it will change the size of the
6607 returned font. See SetWindowVariant for more about this.
6609 return _core
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
6611 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
6612 def SetBackgroundColour(*args
, **kwargs
):
6614 SetBackgroundColour(Colour colour) -> bool
6616 Sets the background colour of the window. Returns True if the colour
6617 was changed. The background colour is usually painted by the default
6618 EVT_ERASE_BACKGROUND event handler function under Windows and
6619 automatically under GTK.
6621 Note that setting the background colour does not cause an immediate
6622 refresh, so you may wish to call ClearBackground or Refresh after
6623 calling this function.
6625 Use this function with care under GTK+ as the new appearance of the
6626 window might not look equally well when used with themes, i.e GTK+'s
6627 ability to change its look as the user wishes with run-time loadable
6630 return _core
.Window_SetBackgroundColour(*args
, **kwargs
)
6632 def SetDefaultBackgroundColour(*args
, **kwargs
):
6633 """SetDefaultBackgroundColour(Colour colour)"""
6634 return _core
.Window_SetDefaultBackgroundColour(*args
, **kwargs
)
6636 def SetForegroundColour(*args
, **kwargs
):
6638 SetForegroundColour(Colour colour) -> bool
6640 Sets the foreground colour of the window. Returns True is the colour
6641 was changed. The interpretation of foreground colour is dependent on
6642 the window class; it may be the text colour or other colour, or it may
6645 return _core
.Window_SetForegroundColour(*args
, **kwargs
)
6647 def SetDefaultForegroundColour(*args
, **kwargs
):
6648 """SetDefaultForegroundColour(Colour colour)"""
6649 return _core
.Window_SetDefaultForegroundColour(*args
, **kwargs
)
6651 def GetBackgroundColour(*args
, **kwargs
):
6653 GetBackgroundColour() -> Colour
6655 Returns the background colour of the window.
6657 return _core
.Window_GetBackgroundColour(*args
, **kwargs
)
6659 def GetForegroundColour(*args
, **kwargs
):
6661 GetForegroundColour() -> Colour
6663 Returns the foreground colour of the window. The interpretation of
6664 foreground colour is dependent on the window class; it may be the text
6665 colour or other colour, or it may not be used at all.
6667 return _core
.Window_GetForegroundColour(*args
, **kwargs
)
6669 def SetCursor(*args
, **kwargs
):
6671 SetCursor(Cursor cursor) -> bool
6673 Sets the window's cursor. Notice that the window cursor also sets it
6674 for the children of the window implicitly.
6676 The cursor may be wx.NullCursor in which case the window cursor will
6677 be reset back to default.
6679 return _core
.Window_SetCursor(*args
, **kwargs
)
6681 def GetCursor(*args
, **kwargs
):
6683 GetCursor() -> Cursor
6685 Return the cursor associated with this window.
6687 return _core
.Window_GetCursor(*args
, **kwargs
)
6689 def SetFont(*args
, **kwargs
):
6691 SetFont(Font font) -> bool
6693 Sets the font for this window.
6695 return _core
.Window_SetFont(*args
, **kwargs
)
6697 def SetDefaultFont(*args
, **kwargs
):
6698 """SetDefaultFont(Font font)"""
6699 return _core
.Window_SetDefaultFont(*args
, **kwargs
)
6701 def GetFont(*args
, **kwargs
):
6705 Returns the default font used for this window.
6707 return _core
.Window_GetFont(*args
, **kwargs
)
6709 def SetCaret(*args
, **kwargs
):
6711 SetCaret(Caret caret)
6713 Sets the caret associated with the window.
6715 return _core
.Window_SetCaret(*args
, **kwargs
)
6717 def GetCaret(*args
, **kwargs
):
6721 Returns the caret associated with the window.
6723 return _core
.Window_GetCaret(*args
, **kwargs
)
6725 def GetCharHeight(*args
, **kwargs
):
6727 GetCharHeight() -> int
6729 Get the (average) character size for the current font.
6731 return _core
.Window_GetCharHeight(*args
, **kwargs
)
6733 def GetCharWidth(*args
, **kwargs
):
6735 GetCharWidth() -> int
6737 Get the (average) character size for the current font.
6739 return _core
.Window_GetCharWidth(*args
, **kwargs
)
6741 def GetTextExtent(*args
, **kwargs
):
6743 GetTextExtent(String string) -> (width, height)
6745 Get the width and height of the text using the current font.
6747 return _core
.Window_GetTextExtent(*args
, **kwargs
)
6749 def GetFullTextExtent(*args
, **kwargs
):
6751 GetFullTextExtent(String string, Font font=None) ->
6752 (width, height, descent, externalLeading)
6754 Get the width, height, decent and leading of the text using the
6755 current or specified font.
6757 return _core
.Window_GetFullTextExtent(*args
, **kwargs
)
6759 def ClientToScreenXY(*args
, **kwargs
):
6761 ClientToScreenXY(int x, int y) -> (x,y)
6763 Converts to screen coordinates from coordinates relative to this window.
6765 return _core
.Window_ClientToScreenXY(*args
, **kwargs
)
6767 def ScreenToClientXY(*args
, **kwargs
):
6769 ScreenToClientXY(int x, int y) -> (x,y)
6771 Converts from screen to client window coordinates.
6773 return _core
.Window_ScreenToClientXY(*args
, **kwargs
)
6775 def ClientToScreen(*args
, **kwargs
):
6777 ClientToScreen(Point pt) -> Point
6779 Converts to screen coordinates from coordinates relative to this window.
6781 return _core
.Window_ClientToScreen(*args
, **kwargs
)
6783 def ScreenToClient(*args
, **kwargs
):
6785 ScreenToClient(Point pt) -> Point
6787 Converts from screen to client window coordinates.
6789 return _core
.Window_ScreenToClient(*args
, **kwargs
)
6791 def HitTestXY(*args
, **kwargs
):
6793 HitTestXY(int x, int y) -> int
6795 Test where the given (in client coords) point lies
6797 return _core
.Window_HitTestXY(*args
, **kwargs
)
6799 def HitTest(*args
, **kwargs
):
6801 HitTest(Point pt) -> int
6803 Test where the given (in client coords) point lies
6805 return _core
.Window_HitTest(*args
, **kwargs
)
6807 def GetBorder(*args
):
6809 GetBorder(long flags) -> int
6812 Get border for the flags of this window
6814 return _core
.Window_GetBorder(*args
)
6816 def UpdateWindowUI(*args
, **kwargs
):
6818 UpdateWindowUI(long flags=UPDATE_UI_NONE)
6820 This function sends EVT_UPDATE_UI events to the window. The particular
6821 implementation depends on the window; for example a wx.ToolBar will
6822 send an update UI event for each toolbar button, and a wx.Frame will
6823 send an update UI event for each menubar menu item. You can call this
6824 function from your application to ensure that your UI is up-to-date at
6825 a particular point in time (as far as your EVT_UPDATE_UI handlers are
6826 concerned). This may be necessary if you have called
6827 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
6828 limit the overhead that wxWindows incurs by sending update UI events
6831 The flags should be a bitlist of one or more of the following values:
6833 wx.UPDATE_UI_NONE No particular value
6834 wx.UPDATE_UI_RECURSE Call the function for descendants
6835 wx.UPDATE_UI_FROMIDLE Invoked from OnIdle
6837 If you are calling this function from an OnIdle function, make sure
6838 you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to
6839 only update the UI elements that need to be updated in idle time. Some
6840 windows update their elements only when necessary, for example when a
6841 menu is about to be shown. The following is an example of how to call
6842 UpdateWindowUI from an idle function.
6844 def OnIdle(self, evt):
6845 if wx.UpdateUIEvent.CanUpdate(self):
6846 self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE);
6849 return _core
.Window_UpdateWindowUI(*args
, **kwargs
)
6851 def PopupMenuXY(*args
, **kwargs
):
6853 PopupMenuXY(Menu menu, int x, int y) -> bool
6855 Pops up the given menu at the specified coordinates, relative to this
6856 window, and returns control when the user has dismissed the menu. If a
6857 menu item is selected, the corresponding menu event is generated and
6858 will be processed as usual.
6860 return _core
.Window_PopupMenuXY(*args
, **kwargs
)
6862 def PopupMenu(*args
, **kwargs
):
6864 PopupMenu(Menu menu, Point pos) -> bool
6866 Pops up the given menu at the specified coordinates, relative to this
6867 window, and returns control when the user has dismissed the menu. If a
6868 menu item is selected, the corresponding menu event is generated and
6869 will be processed as usual.
6871 return _core
.Window_PopupMenu(*args
, **kwargs
)
6873 def GetHandle(*args
, **kwargs
):
6877 Returns the platform-specific handle (as a long integer) of the
6878 physical window. Currently on wxMac it returns the handle of the
6879 toplevel parent of the window.
6881 return _core
.Window_GetHandle(*args
, **kwargs
)
6883 def OnPaint(*args
, **kwargs
):
6884 """OnPaint(PaintEvent event)"""
6885 return _core
.Window_OnPaint(*args
, **kwargs
)
6887 def HasScrollbar(*args
, **kwargs
):
6889 HasScrollbar(int orient) -> bool
6891 Does the window have the scrollbar for this orientation?
6893 return _core
.Window_HasScrollbar(*args
, **kwargs
)
6895 def SetScrollbar(*args
, **kwargs
):
6897 SetScrollbar(int orientation, int pos, int thumbvisible, int range,
6900 Sets the scrollbar properties of a built-in scrollbar.
6902 orientation: Determines the scrollbar whose page size is to be
6903 set. May be wx.HORIZONTAL or wx.VERTICAL.
6905 position: The position of the scrollbar in scroll units.
6907 thumbSize: The size of the thumb, or visible portion of the
6908 scrollbar, in scroll units.
6910 range: The maximum position of the scrollbar.
6912 refresh: True to redraw the scrollbar, false otherwise.
6914 return _core
.Window_SetScrollbar(*args
, **kwargs
)
6916 def SetScrollPos(*args
, **kwargs
):
6918 SetScrollPos(int orientation, int pos, bool refresh=True)
6920 Sets the position of one of the built-in scrollbars.
6922 return _core
.Window_SetScrollPos(*args
, **kwargs
)
6924 def GetScrollPos(*args
, **kwargs
):
6926 GetScrollPos(int orientation) -> int
6928 Returns the built-in scrollbar position.
6930 return _core
.Window_GetScrollPos(*args
, **kwargs
)
6932 def GetScrollThumb(*args
, **kwargs
):
6934 GetScrollThumb(int orientation) -> int
6936 Returns the built-in scrollbar thumb size.
6938 return _core
.Window_GetScrollThumb(*args
, **kwargs
)
6940 def GetScrollRange(*args
, **kwargs
):
6942 GetScrollRange(int orientation) -> int
6944 Returns the built-in scrollbar range.
6946 return _core
.Window_GetScrollRange(*args
, **kwargs
)
6948 def ScrollWindow(*args
, **kwargs
):
6950 ScrollWindow(int dx, int dy, Rect rect=None)
6952 Physically scrolls the pixels in the window and move child windows
6953 accordingly. Use this function to optimise your scrolling
6954 implementations, to minimise the area that must be redrawn. Note that
6955 it is rarely required to call this function from a user program.
6957 dx: Amount to scroll horizontally.
6959 dy: Amount to scroll vertically.
6961 rect: Rectangle to invalidate. If this is None, the whole window
6962 is invalidated. If you pass a rectangle corresponding to the
6963 area of the window exposed by the scroll, your painting
6964 handler can optimize painting by checking for the
6967 return _core
.Window_ScrollWindow(*args
, **kwargs
)
6969 def ScrollLines(*args
, **kwargs
):
6971 ScrollLines(int lines) -> bool
6973 If the platform and window class supports it, scrolls the window by
6974 the given number of lines down, if lines is positive, or up if lines
6975 is negative. Returns True if the window was scrolled, False if it was
6976 already on top/bottom and nothing was done.
6978 return _core
.Window_ScrollLines(*args
, **kwargs
)
6980 def ScrollPages(*args
, **kwargs
):
6982 ScrollPages(int pages) -> bool
6984 If the platform and window class supports it, scrolls the window by
6985 the given number of pages down, if pages is positive, or up if pages
6986 is negative. Returns True if the window was scrolled, False if it was
6987 already on top/bottom and nothing was done.
6989 return _core
.Window_ScrollPages(*args
, **kwargs
)
6991 def LineUp(*args
, **kwargs
):
6995 This is just a wrapper for ScrollLines(-1).
6997 return _core
.Window_LineUp(*args
, **kwargs
)
6999 def LineDown(*args
, **kwargs
):
7003 This is just a wrapper for ScrollLines(1).
7005 return _core
.Window_LineDown(*args
, **kwargs
)
7007 def PageUp(*args
, **kwargs
):
7011 This is just a wrapper for ScrollPages(-1).
7013 return _core
.Window_PageUp(*args
, **kwargs
)
7015 def PageDown(*args
, **kwargs
):
7019 This is just a wrapper for ScrollPages(1).
7021 return _core
.Window_PageDown(*args
, **kwargs
)
7023 def SetHelpText(*args
, **kwargs
):
7025 SetHelpText(String text)
7027 Sets the help text to be used as context-sensitive help for this
7028 window. Note that the text is actually stored by the current
7029 wxHelpProvider implementation, and not in the window object itself.
7031 return _core
.Window_SetHelpText(*args
, **kwargs
)
7033 def SetHelpTextForId(*args
, **kwargs
):
7035 SetHelpTextForId(String text)
7037 Associate this help text with all windows with the same id as this
7040 return _core
.Window_SetHelpTextForId(*args
, **kwargs
)
7042 def GetHelpText(*args
, **kwargs
):
7044 GetHelpText() -> String
7046 Gets the help text to be used as context-sensitive help for this
7047 window. Note that the text is actually stored by the current
7048 wxHelpProvider implementation, and not in the window object itself.
7050 return _core
.Window_GetHelpText(*args
, **kwargs
)
7052 def SetToolTipString(*args
, **kwargs
):
7054 SetToolTipString(String tip)
7056 Attach a tooltip to the window.
7058 return _core
.Window_SetToolTipString(*args
, **kwargs
)
7060 def SetToolTip(*args
, **kwargs
):
7062 SetToolTip(ToolTip tip)
7064 Attach a tooltip to the window.
7066 return _core
.Window_SetToolTip(*args
, **kwargs
)
7068 def GetToolTip(*args
, **kwargs
):
7070 GetToolTip() -> ToolTip
7072 get the associated tooltip or None if none
7074 return _core
.Window_GetToolTip(*args
, **kwargs
)
7076 def SetDropTarget(*args
, **kwargs
):
7078 SetDropTarget(DropTarget dropTarget)
7080 Associates a drop target with this window. If the window already has
7081 a drop target, it is deleted.
7083 return _core
.Window_SetDropTarget(*args
, **kwargs
)
7085 def GetDropTarget(*args
, **kwargs
):
7087 GetDropTarget() -> DropTarget
7089 Returns the associated drop target, which may be None.
7091 return _core
.Window_GetDropTarget(*args
, **kwargs
)
7093 def DragAcceptFiles(*args
, **kwargs
):
7095 DragAcceptFiles(bool accept)
7097 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7098 Only available on Windows.
7100 return _core
.Window_DragAcceptFiles(*args
, **kwargs
)
7102 def SetConstraints(*args
, **kwargs
):
7104 SetConstraints(LayoutConstraints constraints)
7106 Sets the window to have the given layout constraints. If an existing
7107 layout constraints object is already owned by the window, it will be
7108 deleted. Pass None to disassociate and delete the window's current
7111 You must call SetAutoLayout to tell a window to use the constraints
7112 automatically in its default EVT_SIZE handler; otherwise, you must
7113 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7114 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7117 return _core
.Window_SetConstraints(*args
, **kwargs
)
7119 def GetConstraints(*args
, **kwargs
):
7121 GetConstraints() -> LayoutConstraints
7123 Returns a pointer to the window's layout constraints, or None if there
7126 return _core
.Window_GetConstraints(*args
, **kwargs
)
7128 def SetAutoLayout(*args
, **kwargs
):
7130 SetAutoLayout(bool autoLayout)
7132 Determines whether the Layout function will be called automatically
7133 when the window is resized. It is called implicitly by SetSizer but
7134 if you use SetConstraints you should call it manually or otherwise the
7135 window layout won't be correctly updated when its size changes.
7137 return _core
.Window_SetAutoLayout(*args
, **kwargs
)
7139 def GetAutoLayout(*args
, **kwargs
):
7141 GetAutoLayout() -> bool
7143 Returns the current autoLayout setting
7145 return _core
.Window_GetAutoLayout(*args
, **kwargs
)
7147 def Layout(*args
, **kwargs
):
7151 Invokes the constraint-based layout algorithm or the sizer-based
7152 algorithm for this window. See SetAutoLayout: when auto layout is on,
7153 this function gets called automatically by the default EVT_SIZE
7154 handler when the window is resized.
7156 return _core
.Window_Layout(*args
, **kwargs
)
7158 def SetSizer(*args
, **kwargs
):
7160 SetSizer(Sizer sizer, bool deleteOld=True)
7162 Sets the window to have the given layout sizer. The window will then
7163 own the object, and will take care of its deletion. If an existing
7164 layout sizer object is already owned by the window, it will be deleted
7165 if the deleteOld parameter is true. Note that this function will also
7166 call SetAutoLayout implicitly with a True parameter if the sizer is
7167 non-NoneL and False otherwise.
7169 return _core
.Window_SetSizer(*args
, **kwargs
)
7171 def SetSizerAndFit(*args
, **kwargs
):
7173 SetSizerAndFit(Sizer sizer, bool deleteOld=True)
7175 The same as SetSizer, except it also sets the size hints for the
7176 window based on the sizer's minimum size.
7178 return _core
.Window_SetSizerAndFit(*args
, **kwargs
)
7180 def GetSizer(*args
, **kwargs
):
7184 Return the sizer associated with the window by a previous call to
7185 SetSizer or None if there isn't one.
7187 return _core
.Window_GetSizer(*args
, **kwargs
)
7189 def SetContainingSizer(*args
, **kwargs
):
7191 SetContainingSizer(Sizer sizer)
7193 This normally does not need to be called by application code. It is
7194 called internally when a window is added to a sizer, and is used so
7195 the window can remove itself from the sizer when it is destroyed.
7197 return _core
.Window_SetContainingSizer(*args
, **kwargs
)
7199 def GetContainingSizer(*args
, **kwargs
):
7201 GetContainingSizer() -> Sizer
7203 Return the sizer that this window is a member of, if any, otherwise None.
7205 return _core
.Window_GetContainingSizer(*args
, **kwargs
)
7207 def PostCreate(self
, pre
):
7209 Phase 3 of the 2-phase create <wink!>
7210 Call this method after precreating the window with the 2-phase create method.
7212 self
.this
= pre
.this
7213 self
.thisown
= pre
.thisown
7215 if hasattr(self
, '_setOORInfo'):
7216 self
._setOORInfo
(self
)
7217 if hasattr(self
, '_setCallbackInfo'):
7218 self
._setCallbackInfo
(self
, self
.__class
__)
7221 class WindowPtr(Window
):
7222 def __init__(self
, this
):
7224 if not hasattr(self
,"thisown"): self
.thisown
= 0
7225 self
.__class
__ = Window
7226 _core
.Window_swigregister(WindowPtr
)
7228 def PreWindow(*args
, **kwargs
):
7230 PreWindow() -> Window
7232 Precreate a Window for 2-phase creation.
7234 val
= _core
.new_PreWindow(*args
, **kwargs
)
7238 def Window_NewControlId(*args
, **kwargs
):
7240 Window_NewControlId() -> int
7242 Generate a control id for the controls which were not given one.
7244 return _core
.Window_NewControlId(*args
, **kwargs
)
7246 def Window_NextControlId(*args
, **kwargs
):
7248 Window_NextControlId(int winid) -> int
7250 Get the id of the control following the one with the given
7253 return _core
.Window_NextControlId(*args
, **kwargs
)
7255 def Window_PrevControlId(*args
, **kwargs
):
7257 Window_PrevControlId(int winid) -> int
7259 Get the id of the control preceding the one with the given
7262 return _core
.Window_PrevControlId(*args
, **kwargs
)
7264 def Window_FindFocus(*args
, **kwargs
):
7266 Window_FindFocus() -> Window
7268 Returns the window or control that currently has the keyboard focus,
7271 return _core
.Window_FindFocus(*args
, **kwargs
)
7273 def Window_GetCapture(*args
, **kwargs
):
7275 Window_GetCapture() -> Window
7277 Returns the window which currently captures the mouse or None
7279 return _core
.Window_GetCapture(*args
, **kwargs
)
7281 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
7283 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7285 Get the default attributes for this class. This is useful if
7286 you want to use the same font or colour in your own control as
7287 in a standard control -- which is a much better idea than hard
7288 coding specific colours or fonts which might look completely out
7289 of place on the users system, especially if it uses themes.
7291 The variant parameter is only relevant under Mac currently and is
7292 ignore under other platforms. Under Mac, it will change the size of the
7293 returned font. See SetWindowVariant for more about this.
7295 return _core
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7297 def DLG_PNT(win
, point_or_x
, y
=None):
7299 Convenience function for converting a Point or (x,y) in
7300 dialog units to pixel units.
7303 return win
.ConvertDialogPointToPixels(point_or_x
)
7305 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
7307 def DLG_SZE(win
, size_width
, height
=None):
7309 Convenience function for converting a Size or (w,h) in
7310 dialog units to pixel units.
7313 return win
.ConvertDialogSizeToPixels(size_width
)
7315 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
7318 def FindWindowById(*args
, **kwargs
):
7320 FindWindowById(long id, Window parent=None) -> Window
7322 Find the first window in the application with the given id. If parent
7323 is None, the search will start from all top-level frames and dialog
7324 boxes; if non-None, the search will be limited to the given window
7325 hierarchy. The search is recursive in both cases.
7327 return _core
.FindWindowById(*args
, **kwargs
)
7329 def FindWindowByName(*args
, **kwargs
):
7331 FindWindowByName(String name, Window parent=None) -> Window
7333 Find a window by its name (as given in a window constructor or Create
7334 function call). If parent is None, the search will start from all
7335 top-level frames and dialog boxes; if non-None, the search will be
7336 limited to the given window hierarchy. The search is recursive in both
7339 If no window with such name is found, wx.FindWindowByLabel is called.
7341 return _core
.FindWindowByName(*args
, **kwargs
)
7343 def FindWindowByLabel(*args
, **kwargs
):
7345 FindWindowByLabel(String label, Window parent=None) -> Window
7347 Find a window by its label. Depending on the type of window, the label
7348 may be a window title or panel item label. If parent is None, the
7349 search will start from all top-level frames and dialog boxes; if
7350 non-None, the search will be limited to the given window
7351 hierarchy. The search is recursive in both cases.
7353 return _core
.FindWindowByLabel(*args
, **kwargs
)
7355 def Window_FromHWND(*args
, **kwargs
):
7356 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
7357 return _core
.Window_FromHWND(*args
, **kwargs
)
7358 #---------------------------------------------------------------------------
7360 class Validator(EvtHandler
):
7362 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7363 def __init__(self
, *args
, **kwargs
):
7364 """__init__() -> Validator"""
7365 newobj
= _core
.new_Validator(*args
, **kwargs
)
7366 self
.this
= newobj
.this
7369 self
._setOORInfo
(self
)
7371 def Clone(*args
, **kwargs
):
7372 """Clone() -> Validator"""
7373 return _core
.Validator_Clone(*args
, **kwargs
)
7375 def Validate(*args
, **kwargs
):
7376 """Validate(Window parent) -> bool"""
7377 return _core
.Validator_Validate(*args
, **kwargs
)
7379 def TransferToWindow(*args
, **kwargs
):
7380 """TransferToWindow() -> bool"""
7381 return _core
.Validator_TransferToWindow(*args
, **kwargs
)
7383 def TransferFromWindow(*args
, **kwargs
):
7384 """TransferFromWindow() -> bool"""
7385 return _core
.Validator_TransferFromWindow(*args
, **kwargs
)
7387 def GetWindow(*args
, **kwargs
):
7388 """GetWindow() -> Window"""
7389 return _core
.Validator_GetWindow(*args
, **kwargs
)
7391 def SetWindow(*args
, **kwargs
):
7392 """SetWindow(Window window)"""
7393 return _core
.Validator_SetWindow(*args
, **kwargs
)
7395 def IsSilent(*args
, **kwargs
):
7396 """IsSilent() -> bool"""
7397 return _core
.Validator_IsSilent(*args
, **kwargs
)
7399 IsSilent
= staticmethod(IsSilent
)
7400 def SetBellOnError(*args
, **kwargs
):
7401 """SetBellOnError(int doIt=True)"""
7402 return _core
.Validator_SetBellOnError(*args
, **kwargs
)
7404 SetBellOnError
= staticmethod(SetBellOnError
)
7406 class ValidatorPtr(Validator
):
7407 def __init__(self
, this
):
7409 if not hasattr(self
,"thisown"): self
.thisown
= 0
7410 self
.__class
__ = Validator
7411 _core
.Validator_swigregister(ValidatorPtr
)
7413 def Validator_IsSilent(*args
, **kwargs
):
7414 """Validator_IsSilent() -> bool"""
7415 return _core
.Validator_IsSilent(*args
, **kwargs
)
7417 def Validator_SetBellOnError(*args
, **kwargs
):
7418 """Validator_SetBellOnError(int doIt=True)"""
7419 return _core
.Validator_SetBellOnError(*args
, **kwargs
)
7421 class PyValidator(Validator
):
7423 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7424 def __init__(self
, *args
, **kwargs
):
7425 """__init__() -> PyValidator"""
7426 newobj
= _core
.new_PyValidator(*args
, **kwargs
)
7427 self
.this
= newobj
.this
7431 self
._setCallbackInfo
(self
, PyValidator
, 1)
7432 self
._setOORInfo
(self
)
7434 def _setCallbackInfo(*args
, **kwargs
):
7435 """_setCallbackInfo(PyObject self, PyObject _class, int incref=True)"""
7436 return _core
.PyValidator__setCallbackInfo(*args
, **kwargs
)
7439 class PyValidatorPtr(PyValidator
):
7440 def __init__(self
, this
):
7442 if not hasattr(self
,"thisown"): self
.thisown
= 0
7443 self
.__class
__ = PyValidator
7444 _core
.PyValidator_swigregister(PyValidatorPtr
)
7446 #---------------------------------------------------------------------------
7448 class Menu(EvtHandler
):
7450 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7451 def __init__(self
, *args
, **kwargs
):
7452 """__init__(String title=EmptyString, long style=0) -> Menu"""
7453 newobj
= _core
.new_Menu(*args
, **kwargs
)
7454 self
.this
= newobj
.this
7457 self
._setOORInfo
(self
)
7459 def Append(*args
, **kwargs
):
7460 """Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7461 return _core
.Menu_Append(*args
, **kwargs
)
7463 def AppendSeparator(*args
, **kwargs
):
7464 """AppendSeparator() -> MenuItem"""
7465 return _core
.Menu_AppendSeparator(*args
, **kwargs
)
7467 def AppendCheckItem(*args
, **kwargs
):
7468 """AppendCheckItem(int id, String text, String help=EmptyString) -> MenuItem"""
7469 return _core
.Menu_AppendCheckItem(*args
, **kwargs
)
7471 def AppendRadioItem(*args
, **kwargs
):
7472 """AppendRadioItem(int id, String text, String help=EmptyString) -> MenuItem"""
7473 return _core
.Menu_AppendRadioItem(*args
, **kwargs
)
7475 def AppendMenu(*args
, **kwargs
):
7476 """AppendMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7477 return _core
.Menu_AppendMenu(*args
, **kwargs
)
7479 def AppendItem(*args
, **kwargs
):
7480 """AppendItem(MenuItem item) -> MenuItem"""
7481 return _core
.Menu_AppendItem(*args
, **kwargs
)
7483 def Break(*args
, **kwargs
):
7485 return _core
.Menu_Break(*args
, **kwargs
)
7487 def InsertItem(*args
, **kwargs
):
7488 """InsertItem(size_t pos, MenuItem item) -> MenuItem"""
7489 return _core
.Menu_InsertItem(*args
, **kwargs
)
7491 def Insert(*args
, **kwargs
):
7493 Insert(size_t pos, int id, String text, String help=EmptyString,
7494 int kind=ITEM_NORMAL) -> MenuItem
7496 return _core
.Menu_Insert(*args
, **kwargs
)
7498 def InsertSeparator(*args
, **kwargs
):
7499 """InsertSeparator(size_t pos) -> MenuItem"""
7500 return _core
.Menu_InsertSeparator(*args
, **kwargs
)
7502 def InsertCheckItem(*args
, **kwargs
):
7503 """InsertCheckItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
7504 return _core
.Menu_InsertCheckItem(*args
, **kwargs
)
7506 def InsertRadioItem(*args
, **kwargs
):
7507 """InsertRadioItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
7508 return _core
.Menu_InsertRadioItem(*args
, **kwargs
)
7510 def InsertMenu(*args
, **kwargs
):
7511 """InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7512 return _core
.Menu_InsertMenu(*args
, **kwargs
)
7514 def PrependItem(*args
, **kwargs
):
7515 """PrependItem(MenuItem item) -> MenuItem"""
7516 return _core
.Menu_PrependItem(*args
, **kwargs
)
7518 def Prepend(*args
, **kwargs
):
7519 """Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7520 return _core
.Menu_Prepend(*args
, **kwargs
)
7522 def PrependSeparator(*args
, **kwargs
):
7523 """PrependSeparator() -> MenuItem"""
7524 return _core
.Menu_PrependSeparator(*args
, **kwargs
)
7526 def PrependCheckItem(*args
, **kwargs
):
7527 """PrependCheckItem(int id, String text, String help=EmptyString) -> MenuItem"""
7528 return _core
.Menu_PrependCheckItem(*args
, **kwargs
)
7530 def PrependRadioItem(*args
, **kwargs
):
7531 """PrependRadioItem(int id, String text, String help=EmptyString) -> MenuItem"""
7532 return _core
.Menu_PrependRadioItem(*args
, **kwargs
)
7534 def PrependMenu(*args
, **kwargs
):
7535 """PrependMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7536 return _core
.Menu_PrependMenu(*args
, **kwargs
)
7538 def Remove(*args
, **kwargs
):
7539 """Remove(int id) -> MenuItem"""
7540 return _core
.Menu_Remove(*args
, **kwargs
)
7542 def RemoveItem(*args
, **kwargs
):
7543 """RemoveItem(MenuItem item) -> MenuItem"""
7544 return _core
.Menu_RemoveItem(*args
, **kwargs
)
7546 def Delete(*args
, **kwargs
):
7547 """Delete(int id) -> bool"""
7548 return _core
.Menu_Delete(*args
, **kwargs
)
7550 def DeleteItem(*args
, **kwargs
):
7551 """DeleteItem(MenuItem item) -> bool"""
7552 return _core
.Menu_DeleteItem(*args
, **kwargs
)
7554 def Destroy(*args
, **kwargs
):
7558 Deletes the C++ object this Python object is a proxy for.
7560 return _core
.Menu_Destroy(*args
, **kwargs
)
7562 def DestroyId(*args
, **kwargs
):
7564 DestroyId(int id) -> bool
7566 Deletes the C++ object this Python object is a proxy for.
7568 return _core
.Menu_DestroyId(*args
, **kwargs
)
7570 def DestroyItem(*args
, **kwargs
):
7572 DestroyItem(MenuItem item) -> bool
7574 Deletes the C++ object this Python object is a proxy for.
7576 return _core
.Menu_DestroyItem(*args
, **kwargs
)
7578 def GetMenuItemCount(*args
, **kwargs
):
7579 """GetMenuItemCount() -> size_t"""
7580 return _core
.Menu_GetMenuItemCount(*args
, **kwargs
)
7582 def GetMenuItems(*args
, **kwargs
):
7583 """GetMenuItems() -> PyObject"""
7584 return _core
.Menu_GetMenuItems(*args
, **kwargs
)
7586 def FindItem(*args
, **kwargs
):
7587 """FindItem(String item) -> int"""
7588 return _core
.Menu_FindItem(*args
, **kwargs
)
7590 def FindItemById(*args
, **kwargs
):
7591 """FindItemById(int id) -> MenuItem"""
7592 return _core
.Menu_FindItemById(*args
, **kwargs
)
7594 def FindItemByPosition(*args
, **kwargs
):
7595 """FindItemByPosition(size_t position) -> MenuItem"""
7596 return _core
.Menu_FindItemByPosition(*args
, **kwargs
)
7598 def Enable(*args
, **kwargs
):
7599 """Enable(int id, bool enable)"""
7600 return _core
.Menu_Enable(*args
, **kwargs
)
7602 def IsEnabled(*args
, **kwargs
):
7603 """IsEnabled(int id) -> bool"""
7604 return _core
.Menu_IsEnabled(*args
, **kwargs
)
7606 def Check(*args
, **kwargs
):
7607 """Check(int id, bool check)"""
7608 return _core
.Menu_Check(*args
, **kwargs
)
7610 def IsChecked(*args
, **kwargs
):
7611 """IsChecked(int id) -> bool"""
7612 return _core
.Menu_IsChecked(*args
, **kwargs
)
7614 def SetLabel(*args
, **kwargs
):
7615 """SetLabel(int id, String label)"""
7616 return _core
.Menu_SetLabel(*args
, **kwargs
)
7618 def GetLabel(*args
, **kwargs
):
7619 """GetLabel(int id) -> String"""
7620 return _core
.Menu_GetLabel(*args
, **kwargs
)
7622 def SetHelpString(*args
, **kwargs
):
7623 """SetHelpString(int id, String helpString)"""
7624 return _core
.Menu_SetHelpString(*args
, **kwargs
)
7626 def GetHelpString(*args
, **kwargs
):
7627 """GetHelpString(int id) -> String"""
7628 return _core
.Menu_GetHelpString(*args
, **kwargs
)
7630 def SetTitle(*args
, **kwargs
):
7631 """SetTitle(String title)"""
7632 return _core
.Menu_SetTitle(*args
, **kwargs
)
7634 def GetTitle(*args
, **kwargs
):
7635 """GetTitle() -> String"""
7636 return _core
.Menu_GetTitle(*args
, **kwargs
)
7638 def SetEventHandler(*args
, **kwargs
):
7639 """SetEventHandler(EvtHandler handler)"""
7640 return _core
.Menu_SetEventHandler(*args
, **kwargs
)
7642 def GetEventHandler(*args
, **kwargs
):
7643 """GetEventHandler() -> EvtHandler"""
7644 return _core
.Menu_GetEventHandler(*args
, **kwargs
)
7646 def SetInvokingWindow(*args
, **kwargs
):
7647 """SetInvokingWindow(Window win)"""
7648 return _core
.Menu_SetInvokingWindow(*args
, **kwargs
)
7650 def GetInvokingWindow(*args
, **kwargs
):
7651 """GetInvokingWindow() -> Window"""
7652 return _core
.Menu_GetInvokingWindow(*args
, **kwargs
)
7654 def GetStyle(*args
, **kwargs
):
7655 """GetStyle() -> long"""
7656 return _core
.Menu_GetStyle(*args
, **kwargs
)
7658 def UpdateUI(*args
, **kwargs
):
7659 """UpdateUI(EvtHandler source=None)"""
7660 return _core
.Menu_UpdateUI(*args
, **kwargs
)
7662 def GetMenuBar(*args
, **kwargs
):
7663 """GetMenuBar() -> MenuBar"""
7664 return _core
.Menu_GetMenuBar(*args
, **kwargs
)
7666 def Attach(*args
, **kwargs
):
7667 """Attach(wxMenuBarBase menubar)"""
7668 return _core
.Menu_Attach(*args
, **kwargs
)
7670 def Detach(*args
, **kwargs
):
7672 return _core
.Menu_Detach(*args
, **kwargs
)
7674 def IsAttached(*args
, **kwargs
):
7675 """IsAttached() -> bool"""
7676 return _core
.Menu_IsAttached(*args
, **kwargs
)
7678 def SetParent(*args
, **kwargs
):
7679 """SetParent(Menu parent)"""
7680 return _core
.Menu_SetParent(*args
, **kwargs
)
7682 def GetParent(*args
, **kwargs
):
7683 """GetParent() -> Menu"""
7684 return _core
.Menu_GetParent(*args
, **kwargs
)
7687 class MenuPtr(Menu
):
7688 def __init__(self
, this
):
7690 if not hasattr(self
,"thisown"): self
.thisown
= 0
7691 self
.__class
__ = Menu
7692 _core
.Menu_swigregister(MenuPtr
)
7693 DefaultValidator
= cvar
.DefaultValidator
7695 #---------------------------------------------------------------------------
7697 class MenuBar(Window
):
7699 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7700 def __init__(self
, *args
, **kwargs
):
7701 """__init__(long style=0) -> MenuBar"""
7702 newobj
= _core
.new_MenuBar(*args
, **kwargs
)
7703 self
.this
= newobj
.this
7706 self
._setOORInfo
(self
)
7708 def Append(*args
, **kwargs
):
7709 """Append(Menu menu, String title) -> bool"""
7710 return _core
.MenuBar_Append(*args
, **kwargs
)
7712 def Insert(*args
, **kwargs
):
7713 """Insert(size_t pos, Menu menu, String title) -> bool"""
7714 return _core
.MenuBar_Insert(*args
, **kwargs
)
7716 def GetMenuCount(*args
, **kwargs
):
7717 """GetMenuCount() -> size_t"""
7718 return _core
.MenuBar_GetMenuCount(*args
, **kwargs
)
7720 def GetMenu(*args
, **kwargs
):
7721 """GetMenu(size_t pos) -> Menu"""
7722 return _core
.MenuBar_GetMenu(*args
, **kwargs
)
7724 def Replace(*args
, **kwargs
):
7725 """Replace(size_t pos, Menu menu, String title) -> Menu"""
7726 return _core
.MenuBar_Replace(*args
, **kwargs
)
7728 def Remove(*args
, **kwargs
):
7729 """Remove(size_t pos) -> Menu"""
7730 return _core
.MenuBar_Remove(*args
, **kwargs
)
7732 def EnableTop(*args
, **kwargs
):
7733 """EnableTop(size_t pos, bool enable)"""
7734 return _core
.MenuBar_EnableTop(*args
, **kwargs
)
7736 def IsEnabledTop(*args
, **kwargs
):
7737 """IsEnabledTop(size_t pos) -> bool"""
7738 return _core
.MenuBar_IsEnabledTop(*args
, **kwargs
)
7740 def SetLabelTop(*args
, **kwargs
):
7741 """SetLabelTop(size_t pos, String label)"""
7742 return _core
.MenuBar_SetLabelTop(*args
, **kwargs
)
7744 def GetLabelTop(*args
, **kwargs
):
7745 """GetLabelTop(size_t pos) -> String"""
7746 return _core
.MenuBar_GetLabelTop(*args
, **kwargs
)
7748 def FindMenuItem(*args
, **kwargs
):
7749 """FindMenuItem(String menu, String item) -> int"""
7750 return _core
.MenuBar_FindMenuItem(*args
, **kwargs
)
7752 def FindItemById(*args
, **kwargs
):
7753 """FindItemById(int id) -> MenuItem"""
7754 return _core
.MenuBar_FindItemById(*args
, **kwargs
)
7756 def FindMenu(*args
, **kwargs
):
7757 """FindMenu(String title) -> int"""
7758 return _core
.MenuBar_FindMenu(*args
, **kwargs
)
7760 def Enable(*args
, **kwargs
):
7761 """Enable(int id, bool enable)"""
7762 return _core
.MenuBar_Enable(*args
, **kwargs
)
7764 def Check(*args
, **kwargs
):
7765 """Check(int id, bool check)"""
7766 return _core
.MenuBar_Check(*args
, **kwargs
)
7768 def IsChecked(*args
, **kwargs
):
7769 """IsChecked(int id) -> bool"""
7770 return _core
.MenuBar_IsChecked(*args
, **kwargs
)
7772 def IsEnabled(*args
, **kwargs
):
7773 """IsEnabled(int id) -> bool"""
7774 return _core
.MenuBar_IsEnabled(*args
, **kwargs
)
7776 def SetLabel(*args
, **kwargs
):
7777 """SetLabel(int id, String label)"""
7778 return _core
.MenuBar_SetLabel(*args
, **kwargs
)
7780 def GetLabel(*args
, **kwargs
):
7781 """GetLabel(int id) -> String"""
7782 return _core
.MenuBar_GetLabel(*args
, **kwargs
)
7784 def SetHelpString(*args
, **kwargs
):
7785 """SetHelpString(int id, String helpString)"""
7786 return _core
.MenuBar_SetHelpString(*args
, **kwargs
)
7788 def GetHelpString(*args
, **kwargs
):
7789 """GetHelpString(int id) -> String"""
7790 return _core
.MenuBar_GetHelpString(*args
, **kwargs
)
7792 def GetFrame(*args
, **kwargs
):
7793 """GetFrame() -> wxFrame"""
7794 return _core
.MenuBar_GetFrame(*args
, **kwargs
)
7796 def IsAttached(*args
, **kwargs
):
7797 """IsAttached() -> bool"""
7798 return _core
.MenuBar_IsAttached(*args
, **kwargs
)
7800 def Attach(*args
, **kwargs
):
7801 """Attach(wxFrame frame)"""
7802 return _core
.MenuBar_Attach(*args
, **kwargs
)
7804 def Detach(*args
, **kwargs
):
7806 return _core
.MenuBar_Detach(*args
, **kwargs
)
7809 class MenuBarPtr(MenuBar
):
7810 def __init__(self
, this
):
7812 if not hasattr(self
,"thisown"): self
.thisown
= 0
7813 self
.__class
__ = MenuBar
7814 _core
.MenuBar_swigregister(MenuBarPtr
)
7816 #---------------------------------------------------------------------------
7818 class MenuItem(Object
):
7820 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7821 def __init__(self
, *args
, **kwargs
):
7823 __init__(Menu parentMenu=None, int id=ID_SEPARATOR, String text=EmptyString,
7824 String help=EmptyString, int kind=ITEM_NORMAL,
7825 Menu subMenu=None) -> MenuItem
7827 newobj
= _core
.new_MenuItem(*args
, **kwargs
)
7828 self
.this
= newobj
.this
7831 def GetMenu(*args
, **kwargs
):
7832 """GetMenu() -> Menu"""
7833 return _core
.MenuItem_GetMenu(*args
, **kwargs
)
7835 def SetMenu(*args
, **kwargs
):
7836 """SetMenu(Menu menu)"""
7837 return _core
.MenuItem_SetMenu(*args
, **kwargs
)
7839 def SetId(*args
, **kwargs
):
7841 return _core
.MenuItem_SetId(*args
, **kwargs
)
7843 def GetId(*args
, **kwargs
):
7844 """GetId() -> int"""
7845 return _core
.MenuItem_GetId(*args
, **kwargs
)
7847 def IsSeparator(*args
, **kwargs
):
7848 """IsSeparator() -> bool"""
7849 return _core
.MenuItem_IsSeparator(*args
, **kwargs
)
7851 def SetText(*args
, **kwargs
):
7852 """SetText(String str)"""
7853 return _core
.MenuItem_SetText(*args
, **kwargs
)
7855 def GetLabel(*args
, **kwargs
):
7856 """GetLabel() -> String"""
7857 return _core
.MenuItem_GetLabel(*args
, **kwargs
)
7859 def GetText(*args
, **kwargs
):
7860 """GetText() -> String"""
7861 return _core
.MenuItem_GetText(*args
, **kwargs
)
7863 def GetLabelFromText(*args
, **kwargs
):
7864 """GetLabelFromText(String text) -> String"""
7865 return _core
.MenuItem_GetLabelFromText(*args
, **kwargs
)
7867 GetLabelFromText
= staticmethod(GetLabelFromText
)
7868 def GetKind(*args
, **kwargs
):
7869 """GetKind() -> int"""
7870 return _core
.MenuItem_GetKind(*args
, **kwargs
)
7872 def SetCheckable(*args
, **kwargs
):
7873 """SetCheckable(bool checkable)"""
7874 return _core
.MenuItem_SetCheckable(*args
, **kwargs
)
7876 def IsCheckable(*args
, **kwargs
):
7877 """IsCheckable() -> bool"""
7878 return _core
.MenuItem_IsCheckable(*args
, **kwargs
)
7880 def IsSubMenu(*args
, **kwargs
):
7881 """IsSubMenu() -> bool"""
7882 return _core
.MenuItem_IsSubMenu(*args
, **kwargs
)
7884 def SetSubMenu(*args
, **kwargs
):
7885 """SetSubMenu(Menu menu)"""
7886 return _core
.MenuItem_SetSubMenu(*args
, **kwargs
)
7888 def GetSubMenu(*args
, **kwargs
):
7889 """GetSubMenu() -> Menu"""
7890 return _core
.MenuItem_GetSubMenu(*args
, **kwargs
)
7892 def Enable(*args
, **kwargs
):
7893 """Enable(bool enable=True)"""
7894 return _core
.MenuItem_Enable(*args
, **kwargs
)
7896 def IsEnabled(*args
, **kwargs
):
7897 """IsEnabled() -> bool"""
7898 return _core
.MenuItem_IsEnabled(*args
, **kwargs
)
7900 def Check(*args
, **kwargs
):
7901 """Check(bool check=True)"""
7902 return _core
.MenuItem_Check(*args
, **kwargs
)
7904 def IsChecked(*args
, **kwargs
):
7905 """IsChecked() -> bool"""
7906 return _core
.MenuItem_IsChecked(*args
, **kwargs
)
7908 def Toggle(*args
, **kwargs
):
7910 return _core
.MenuItem_Toggle(*args
, **kwargs
)
7912 def SetHelp(*args
, **kwargs
):
7913 """SetHelp(String str)"""
7914 return _core
.MenuItem_SetHelp(*args
, **kwargs
)
7916 def GetHelp(*args
, **kwargs
):
7917 """GetHelp() -> String"""
7918 return _core
.MenuItem_GetHelp(*args
, **kwargs
)
7920 def GetAccel(*args
, **kwargs
):
7921 """GetAccel() -> AcceleratorEntry"""
7922 return _core
.MenuItem_GetAccel(*args
, **kwargs
)
7924 def SetAccel(*args
, **kwargs
):
7925 """SetAccel(AcceleratorEntry accel)"""
7926 return _core
.MenuItem_SetAccel(*args
, **kwargs
)
7928 def SetFont(*args
, **kwargs
):
7929 """SetFont(Font font)"""
7930 return _core
.MenuItem_SetFont(*args
, **kwargs
)
7932 def GetFont(*args
, **kwargs
):
7933 """GetFont() -> Font"""
7934 return _core
.MenuItem_GetFont(*args
, **kwargs
)
7936 def SetTextColour(*args
, **kwargs
):
7937 """SetTextColour(Colour colText)"""
7938 return _core
.MenuItem_SetTextColour(*args
, **kwargs
)
7940 def GetTextColour(*args
, **kwargs
):
7941 """GetTextColour() -> Colour"""
7942 return _core
.MenuItem_GetTextColour(*args
, **kwargs
)
7944 def SetBackgroundColour(*args
, **kwargs
):
7945 """SetBackgroundColour(Colour colBack)"""
7946 return _core
.MenuItem_SetBackgroundColour(*args
, **kwargs
)
7948 def GetBackgroundColour(*args
, **kwargs
):
7949 """GetBackgroundColour() -> Colour"""
7950 return _core
.MenuItem_GetBackgroundColour(*args
, **kwargs
)
7952 def SetBitmaps(*args
, **kwargs
):
7953 """SetBitmaps(Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
7954 return _core
.MenuItem_SetBitmaps(*args
, **kwargs
)
7956 def SetDisabledBitmap(*args
, **kwargs
):
7957 """SetDisabledBitmap(Bitmap bmpDisabled)"""
7958 return _core
.MenuItem_SetDisabledBitmap(*args
, **kwargs
)
7960 def GetDisabledBitmap(*args
, **kwargs
):
7961 """GetDisabledBitmap() -> Bitmap"""
7962 return _core
.MenuItem_GetDisabledBitmap(*args
, **kwargs
)
7964 def SetMarginWidth(*args
, **kwargs
):
7965 """SetMarginWidth(int nWidth)"""
7966 return _core
.MenuItem_SetMarginWidth(*args
, **kwargs
)
7968 def GetMarginWidth(*args
, **kwargs
):
7969 """GetMarginWidth() -> int"""
7970 return _core
.MenuItem_GetMarginWidth(*args
, **kwargs
)
7972 def GetDefaultMarginWidth(*args
, **kwargs
):
7973 """GetDefaultMarginWidth() -> int"""
7974 return _core
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
7976 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
7977 def IsOwnerDrawn(*args
, **kwargs
):
7978 """IsOwnerDrawn() -> bool"""
7979 return _core
.MenuItem_IsOwnerDrawn(*args
, **kwargs
)
7981 def SetOwnerDrawn(*args
, **kwargs
):
7982 """SetOwnerDrawn(bool ownerDrawn=True)"""
7983 return _core
.MenuItem_SetOwnerDrawn(*args
, **kwargs
)
7985 def ResetOwnerDrawn(*args
, **kwargs
):
7986 """ResetOwnerDrawn()"""
7987 return _core
.MenuItem_ResetOwnerDrawn(*args
, **kwargs
)
7989 def SetBitmap(*args
, **kwargs
):
7990 """SetBitmap(Bitmap bitmap)"""
7991 return _core
.MenuItem_SetBitmap(*args
, **kwargs
)
7993 def GetBitmap(*args
, **kwargs
):
7994 """GetBitmap() -> Bitmap"""
7995 return _core
.MenuItem_GetBitmap(*args
, **kwargs
)
7998 class MenuItemPtr(MenuItem
):
7999 def __init__(self
, this
):
8001 if not hasattr(self
,"thisown"): self
.thisown
= 0
8002 self
.__class
__ = MenuItem
8003 _core
.MenuItem_swigregister(MenuItemPtr
)
8005 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8006 """MenuItem_GetLabelFromText(String text) -> String"""
8007 return _core
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8009 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8010 """MenuItem_GetDefaultMarginWidth() -> int"""
8011 return _core
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8013 #---------------------------------------------------------------------------
8015 class Control(Window
):
8017 This is the base class for a control or 'widget'.
8019 A control is generally a small window which processes user input and/or
8020 displays one or more item of data.
8023 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8024 def __init__(self
, *args
, **kwargs
):
8026 __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
8027 long style=0, Validator validator=DefaultValidator,
8028 String name=ControlNameStr) -> Control
8030 Create a Control. Normally you should only call this from a
8031 subclass' __init__ as a plain old wx.Control is not very useful.
8033 newobj
= _core
.new_Control(*args
, **kwargs
)
8034 self
.this
= newobj
.this
8037 self
._setOORInfo
(self
)
8039 def Create(*args
, **kwargs
):
8041 Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
8042 long style=0, Validator validator=DefaultValidator,
8043 String name=ControlNameStr) -> bool
8045 Do the 2nd phase and create the GUI control.
8047 return _core
.Control_Create(*args
, **kwargs
)
8049 def Command(*args
, **kwargs
):
8051 Command(CommandEvent event)
8053 Simulates the effect of the user issuing a command to the
8054 item. See wx.CommandEvent.
8056 return _core
.Control_Command(*args
, **kwargs
)
8058 def GetLabel(*args
, **kwargs
):
8060 GetLabel() -> String
8062 Return a control's text.
8064 return _core
.Control_GetLabel(*args
, **kwargs
)
8066 def SetLabel(*args
, **kwargs
):
8068 SetLabel(String label)
8070 Sets the item's text.
8072 return _core
.Control_SetLabel(*args
, **kwargs
)
8074 def GetClassDefaultAttributes(*args
, **kwargs
):
8076 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8078 Get the default attributes for this class. This is useful if
8079 you want to use the same font or colour in your own control as
8080 in a standard control -- which is a much better idea than hard
8081 coding specific colours or fonts which might look completely out
8082 of place on the users system, especially if it uses themes.
8084 The variant parameter is only relevant under Mac currently and is
8085 ignore under other platforms. Under Mac, it will change the size of the
8086 returned font. See SetWindowVariant for more about this.
8088 return _core
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8090 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
8092 class ControlPtr(Control
):
8093 def __init__(self
, this
):
8095 if not hasattr(self
,"thisown"): self
.thisown
= 0
8096 self
.__class
__ = Control
8097 _core
.Control_swigregister(ControlPtr
)
8098 ControlNameStr
= cvar
.ControlNameStr
8100 def PreControl(*args
, **kwargs
):
8102 PreControl() -> Control
8104 Precreate a Control control for 2-phase creation
8106 val
= _core
.new_PreControl(*args
, **kwargs
)
8110 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
8112 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8114 Get the default attributes for this class. This is useful if
8115 you want to use the same font or colour in your own control as
8116 in a standard control -- which is a much better idea than hard
8117 coding specific colours or fonts which might look completely out
8118 of place on the users system, especially if it uses themes.
8120 The variant parameter is only relevant under Mac currently and is
8121 ignore under other platforms. Under Mac, it will change the size of the
8122 returned font. See SetWindowVariant for more about this.
8124 return _core
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8126 #---------------------------------------------------------------------------
8128 class ItemContainer(object):
8130 wx.ItemContainer defines an interface which is implemented by all
8131 controls which have string subitems, each of which may be
8132 selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and
8133 wx.ComboBox (which implements an extended interface deriving from
8136 It defines the methods for accessing the control's items and
8137 although each of the derived classes implements them differently,
8138 they still all conform to the same interface.
8140 The items in a wx.ItemContainer have (non empty) string labels
8141 and, optionally, client data associated with them.
8144 def __init__(self
): raise RuntimeError, "No constructor defined"
8146 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8147 def Append(*args
, **kwargs
):
8149 Append(String item, PyObject clientData=None) -> int
8151 Adds the item to the control, associating the given data with the
8152 item if not None. The return value is the index of the newly
8153 added item which may be different from the last one if the
8154 control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style).
8156 return _core
.ItemContainer_Append(*args
, **kwargs
)
8158 def AppendItems(*args
, **kwargs
):
8160 AppendItems(wxArrayString strings)
8162 Apend several items at once to the control. Notice that calling
8163 this method may be much faster than appending the items one by
8164 one if you need to add a lot of items.
8166 return _core
.ItemContainer_AppendItems(*args
, **kwargs
)
8168 def Insert(*args
, **kwargs
):
8170 Insert(String item, int pos, PyObject clientData=None) -> int
8172 Insert an item into the control before the item at the pos index,
8173 optionally associating some data object with the item.
8175 return _core
.ItemContainer_Insert(*args
, **kwargs
)
8177 def Clear(*args
, **kwargs
):
8181 Removes all items from the control.
8183 return _core
.ItemContainer_Clear(*args
, **kwargs
)
8185 def Delete(*args
, **kwargs
):
8189 Deletes the item at the zero-based index 'n' from the control.
8190 Note that it is an error (signalled by a PyAssertionError
8191 exception if enabled) to remove an item with the index negative
8192 or greater or equal than the number of items in the control.
8194 return _core
.ItemContainer_Delete(*args
, **kwargs
)
8196 def GetCount(*args
, **kwargs
):
8200 Returns the number of items in the control.
8202 return _core
.ItemContainer_GetCount(*args
, **kwargs
)
8204 def IsEmpty(*args
, **kwargs
):
8208 Returns True if the control is empty or False if it has some items.
8210 return _core
.ItemContainer_IsEmpty(*args
, **kwargs
)
8212 def GetString(*args
, **kwargs
):
8214 GetString(int n) -> String
8216 Returns the label of the item with the given index.
8218 return _core
.ItemContainer_GetString(*args
, **kwargs
)
8220 def GetStrings(*args
, **kwargs
):
8221 """GetStrings() -> wxArrayString"""
8222 return _core
.ItemContainer_GetStrings(*args
, **kwargs
)
8224 def SetString(*args
, **kwargs
):
8226 SetString(int n, String s)
8228 Sets the label for the given item.
8230 return _core
.ItemContainer_SetString(*args
, **kwargs
)
8232 def FindString(*args
, **kwargs
):
8234 FindString(String s) -> int
8236 Finds an item whose label matches the given string. Returns the
8237 zero-based position of the item, or wx.NOT_FOUND if the string
8240 return _core
.ItemContainer_FindString(*args
, **kwargs
)
8242 def Select(*args
, **kwargs
):
8246 Sets the item at index 'n' to be the selected item.
8248 return _core
.ItemContainer_Select(*args
, **kwargs
)
8250 SetSelection
= Select
8251 def GetSelection(*args
, **kwargs
):
8253 GetSelection() -> int
8255 Returns the index of the selected item or wx.NOT_FOUND if no item is selected.
8257 return _core
.ItemContainer_GetSelection(*args
, **kwargs
)
8259 def GetStringSelection(*args
, **kwargs
):
8261 GetStringSelection() -> String
8263 Returns the label of the selected item or an empty string if no item is selected.
8265 return _core
.ItemContainer_GetStringSelection(*args
, **kwargs
)
8267 def GetClientData(*args
, **kwargs
):
8269 GetClientData(int n) -> PyObject
8271 Returns the client data associated with the given item, (if any.)
8273 return _core
.ItemContainer_GetClientData(*args
, **kwargs
)
8275 def SetClientData(*args
, **kwargs
):
8277 SetClientData(int n, PyObject clientData)
8279 Associate the given client data with the item at position n.
8281 return _core
.ItemContainer_SetClientData(*args
, **kwargs
)
8284 class ItemContainerPtr(ItemContainer
):
8285 def __init__(self
, this
):
8287 if not hasattr(self
,"thisown"): self
.thisown
= 0
8288 self
.__class
__ = ItemContainer
8289 _core
.ItemContainer_swigregister(ItemContainerPtr
)
8291 #---------------------------------------------------------------------------
8293 class ControlWithItems(Control
,ItemContainer
):
8295 wx.ControlWithItems combines the wx.ItemContainer class with the
8296 wx.Control class, and is used for the base class of various
8297 controls that have items.
8299 def __init__(self
): raise RuntimeError, "No constructor defined"
8301 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8303 class ControlWithItemsPtr(ControlWithItems
):
8304 def __init__(self
, this
):
8306 if not hasattr(self
,"thisown"): self
.thisown
= 0
8307 self
.__class
__ = ControlWithItems
8308 _core
.ControlWithItems_swigregister(ControlWithItemsPtr
)
8310 #---------------------------------------------------------------------------
8312 class SizerItem(Object
):
8314 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8315 def __init__(self
, *args
, **kwargs
):
8316 """__init__() -> SizerItem"""
8317 newobj
= _core
.new_SizerItem(*args
, **kwargs
)
8318 self
.this
= newobj
.this
8321 def DeleteWindows(*args
, **kwargs
):
8322 """DeleteWindows()"""
8323 return _core
.SizerItem_DeleteWindows(*args
, **kwargs
)
8325 def DetachSizer(*args
, **kwargs
):
8327 return _core
.SizerItem_DetachSizer(*args
, **kwargs
)
8329 def GetSize(*args
, **kwargs
):
8330 """GetSize() -> Size"""
8331 return _core
.SizerItem_GetSize(*args
, **kwargs
)
8333 def CalcMin(*args
, **kwargs
):
8334 """CalcMin() -> Size"""
8335 return _core
.SizerItem_CalcMin(*args
, **kwargs
)
8337 def SetDimension(*args
, **kwargs
):
8338 """SetDimension(Point pos, Size size)"""
8339 return _core
.SizerItem_SetDimension(*args
, **kwargs
)
8341 def GetMinSize(*args
, **kwargs
):
8342 """GetMinSize() -> Size"""
8343 return _core
.SizerItem_GetMinSize(*args
, **kwargs
)
8345 def SetInitSize(*args
, **kwargs
):
8346 """SetInitSize(int x, int y)"""
8347 return _core
.SizerItem_SetInitSize(*args
, **kwargs
)
8349 def SetRatioWH(*args
, **kwargs
):
8350 """SetRatioWH(int width, int height)"""
8351 return _core
.SizerItem_SetRatioWH(*args
, **kwargs
)
8353 def SetRatioSize(*args
, **kwargs
):
8354 """SetRatioSize(Size size)"""
8355 return _core
.SizerItem_SetRatioSize(*args
, **kwargs
)
8357 def SetRatio(*args
, **kwargs
):
8358 """SetRatio(float ratio)"""
8359 return _core
.SizerItem_SetRatio(*args
, **kwargs
)
8361 def GetRatio(*args
, **kwargs
):
8362 """GetRatio() -> float"""
8363 return _core
.SizerItem_GetRatio(*args
, **kwargs
)
8365 def IsWindow(*args
, **kwargs
):
8366 """IsWindow() -> bool"""
8367 return _core
.SizerItem_IsWindow(*args
, **kwargs
)
8369 def IsSizer(*args
, **kwargs
):
8370 """IsSizer() -> bool"""
8371 return _core
.SizerItem_IsSizer(*args
, **kwargs
)
8373 def IsSpacer(*args
, **kwargs
):
8374 """IsSpacer() -> bool"""
8375 return _core
.SizerItem_IsSpacer(*args
, **kwargs
)
8377 def SetProportion(*args
, **kwargs
):
8378 """SetProportion(int proportion)"""
8379 return _core
.SizerItem_SetProportion(*args
, **kwargs
)
8381 def GetProportion(*args
, **kwargs
):
8382 """GetProportion() -> int"""
8383 return _core
.SizerItem_GetProportion(*args
, **kwargs
)
8385 SetOption
= SetProportion
8386 GetOption
= GetProportion
8387 def SetFlag(*args
, **kwargs
):
8388 """SetFlag(int flag)"""
8389 return _core
.SizerItem_SetFlag(*args
, **kwargs
)
8391 def GetFlag(*args
, **kwargs
):
8392 """GetFlag() -> int"""
8393 return _core
.SizerItem_GetFlag(*args
, **kwargs
)
8395 def SetBorder(*args
, **kwargs
):
8396 """SetBorder(int border)"""
8397 return _core
.SizerItem_SetBorder(*args
, **kwargs
)
8399 def GetBorder(*args
, **kwargs
):
8400 """GetBorder() -> int"""
8401 return _core
.SizerItem_GetBorder(*args
, **kwargs
)
8403 def GetWindow(*args
, **kwargs
):
8404 """GetWindow() -> Window"""
8405 return _core
.SizerItem_GetWindow(*args
, **kwargs
)
8407 def SetWindow(*args
, **kwargs
):
8408 """SetWindow(Window window)"""
8409 return _core
.SizerItem_SetWindow(*args
, **kwargs
)
8411 def GetSizer(*args
, **kwargs
):
8412 """GetSizer() -> Sizer"""
8413 return _core
.SizerItem_GetSizer(*args
, **kwargs
)
8415 def SetSizer(*args
, **kwargs
):
8416 """SetSizer(Sizer sizer)"""
8417 return _core
.SizerItem_SetSizer(*args
, **kwargs
)
8419 def GetSpacer(*args
, **kwargs
):
8420 """GetSpacer() -> Size"""
8421 return _core
.SizerItem_GetSpacer(*args
, **kwargs
)
8423 def SetSpacer(*args
, **kwargs
):
8424 """SetSpacer(Size size)"""
8425 return _core
.SizerItem_SetSpacer(*args
, **kwargs
)
8427 def Show(*args
, **kwargs
):
8428 """Show(bool show)"""
8429 return _core
.SizerItem_Show(*args
, **kwargs
)
8431 def IsShown(*args
, **kwargs
):
8432 """IsShown() -> bool"""
8433 return _core
.SizerItem_IsShown(*args
, **kwargs
)
8435 def GetPosition(*args
, **kwargs
):
8436 """GetPosition() -> Point"""
8437 return _core
.SizerItem_GetPosition(*args
, **kwargs
)
8439 def GetUserData(*args
, **kwargs
):
8440 """GetUserData() -> PyObject"""
8441 return _core
.SizerItem_GetUserData(*args
, **kwargs
)
8444 class SizerItemPtr(SizerItem
):
8445 def __init__(self
, this
):
8447 if not hasattr(self
,"thisown"): self
.thisown
= 0
8448 self
.__class
__ = SizerItem
8449 _core
.SizerItem_swigregister(SizerItemPtr
)
8451 def SizerItemSpacer(*args
, **kwargs
):
8453 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
8454 Object userData) -> SizerItem
8456 val
= _core
.new_SizerItemSpacer(*args
, **kwargs
)
8460 def SizerItemWindow(*args
, **kwargs
):
8462 SizerItemWindow(Window window, int proportion, int flag, int border,
8463 Object userData) -> SizerItem
8465 val
= _core
.new_SizerItemWindow(*args
, **kwargs
)
8469 def SizerItemSizer(*args
, **kwargs
):
8471 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
8472 Object userData) -> SizerItem
8474 val
= _core
.new_SizerItemSizer(*args
, **kwargs
)
8478 class Sizer(Object
):
8479 def __init__(self
): raise RuntimeError, "No constructor defined"
8481 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8482 def _setOORInfo(*args
, **kwargs
):
8483 """_setOORInfo(PyObject _self)"""
8484 return _core
.Sizer__setOORInfo(*args
, **kwargs
)
8486 def Add(*args
, **kwargs
):
8488 Add(PyObject item, int proportion=0, int flag=0, int border=0,
8489 PyObject userData=None)
8491 return _core
.Sizer_Add(*args
, **kwargs
)
8493 def Insert(*args
, **kwargs
):
8495 Insert(int before, PyObject item, int proportion=0, int flag=0,
8496 int border=0, PyObject userData=None)
8498 return _core
.Sizer_Insert(*args
, **kwargs
)
8500 def Prepend(*args
, **kwargs
):
8502 Prepend(PyObject item, int proportion=0, int flag=0, int border=0,
8503 PyObject userData=None)
8505 return _core
.Sizer_Prepend(*args
, **kwargs
)
8507 def Remove(*args
, **kwargs
):
8508 """Remove(PyObject item) -> bool"""
8509 return _core
.Sizer_Remove(*args
, **kwargs
)
8511 def _SetItemMinSize(*args
, **kwargs
):
8512 """_SetItemMinSize(PyObject item, Size size)"""
8513 return _core
.Sizer__SetItemMinSize(*args
, **kwargs
)
8515 def AddItem(*args
, **kwargs
):
8516 """AddItem(SizerItem item)"""
8517 return _core
.Sizer_AddItem(*args
, **kwargs
)
8519 def InsertItem(*args
, **kwargs
):
8520 """InsertItem(size_t index, SizerItem item)"""
8521 return _core
.Sizer_InsertItem(*args
, **kwargs
)
8523 def PrependItem(*args
, **kwargs
):
8524 """PrependItem(SizerItem item)"""
8525 return _core
.Sizer_PrependItem(*args
, **kwargs
)
8527 def AddMany(self
, widgets
):
8528 for childinfo
in widgets
:
8529 if type(childinfo
) != type(()) or (len(childinfo
) == 2 and type(childinfo
[0]) == type(1)):
8530 childinfo
= (childinfo
, )
8531 self
.Add(*childinfo
)
8533 # for backwards compatibility only, please do not use in new code
8534 AddWindow
= AddSizer
= AddSpacer
= Add
8535 PrependWindow
= PrependSizer
= PrependSpacer
= Prepend
8536 InsertWindow
= InsertSizer
= InsertSpacer
= Insert
8537 RemoveWindow
= RemoveSizer
= RemovePos
= Remove
8540 def SetItemMinSize(self
, item
, *args
):
8542 return self
._SetItemMinSize
(item
, args
)
8544 return self
._SetItemMinSize
(item
, args
[0])
8546 def SetDimension(*args
, **kwargs
):
8547 """SetDimension(int x, int y, int width, int height)"""
8548 return _core
.Sizer_SetDimension(*args
, **kwargs
)
8550 def SetMinSize(*args
, **kwargs
):
8551 """SetMinSize(Size size)"""
8552 return _core
.Sizer_SetMinSize(*args
, **kwargs
)
8554 def GetSize(*args
, **kwargs
):
8555 """GetSize() -> Size"""
8556 return _core
.Sizer_GetSize(*args
, **kwargs
)
8558 def GetPosition(*args
, **kwargs
):
8559 """GetPosition() -> Point"""
8560 return _core
.Sizer_GetPosition(*args
, **kwargs
)
8562 def GetMinSize(*args
, **kwargs
):
8563 """GetMinSize() -> Size"""
8564 return _core
.Sizer_GetMinSize(*args
, **kwargs
)
8566 def GetSizeTuple(self
):
8567 return self
.GetSize().asTuple()
8568 def GetPositionTuple(self
):
8569 return self
.GetPosition().asTuple()
8570 def GetMinSizeTuple(self
):
8571 return self
.GetMinSize().asTuple()
8573 def RecalcSizes(*args
, **kwargs
):
8575 return _core
.Sizer_RecalcSizes(*args
, **kwargs
)
8577 def CalcMin(*args
, **kwargs
):
8578 """CalcMin() -> Size"""
8579 return _core
.Sizer_CalcMin(*args
, **kwargs
)
8581 def Layout(*args
, **kwargs
):
8583 return _core
.Sizer_Layout(*args
, **kwargs
)
8585 def Fit(*args
, **kwargs
):
8586 """Fit(Window window) -> Size"""
8587 return _core
.Sizer_Fit(*args
, **kwargs
)
8589 def FitInside(*args
, **kwargs
):
8590 """FitInside(Window window)"""
8591 return _core
.Sizer_FitInside(*args
, **kwargs
)
8593 def SetSizeHints(*args
, **kwargs
):
8594 """SetSizeHints(Window window)"""
8595 return _core
.Sizer_SetSizeHints(*args
, **kwargs
)
8597 def SetVirtualSizeHints(*args
, **kwargs
):
8598 """SetVirtualSizeHints(Window window)"""
8599 return _core
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
8601 def Clear(*args
, **kwargs
):
8602 """Clear(bool delete_windows=False)"""
8603 return _core
.Sizer_Clear(*args
, **kwargs
)
8605 def DeleteWindows(*args
, **kwargs
):
8606 """DeleteWindows()"""
8607 return _core
.Sizer_DeleteWindows(*args
, **kwargs
)
8609 def GetChildren(*args
, **kwargs
):
8610 """GetChildren() -> PyObject"""
8611 return _core
.Sizer_GetChildren(*args
, **kwargs
)
8613 def Show(*args
, **kwargs
):
8614 """Show(PyObject item, bool show=True)"""
8615 return _core
.Sizer_Show(*args
, **kwargs
)
8617 def Hide(*args
, **kwargs
):
8618 """Hide(PyObject item)"""
8619 return _core
.Sizer_Hide(*args
, **kwargs
)
8621 def IsShown(*args
, **kwargs
):
8622 """IsShown(PyObject item) -> bool"""
8623 return _core
.Sizer_IsShown(*args
, **kwargs
)
8625 def ShowItems(*args
, **kwargs
):
8626 """ShowItems(bool show)"""
8627 return _core
.Sizer_ShowItems(*args
, **kwargs
)
8630 class SizerPtr(Sizer
):
8631 def __init__(self
, this
):
8633 if not hasattr(self
,"thisown"): self
.thisown
= 0
8634 self
.__class
__ = Sizer
8635 _core
.Sizer_swigregister(SizerPtr
)
8637 class PySizer(Sizer
):
8639 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8640 def __init__(self
, *args
, **kwargs
):
8641 """__init__() -> PySizer"""
8642 newobj
= _core
.new_PySizer(*args
, **kwargs
)
8643 self
.this
= newobj
.this
8646 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
8648 def _setCallbackInfo(*args
, **kwargs
):
8649 """_setCallbackInfo(PyObject self, PyObject _class)"""
8650 return _core
.PySizer__setCallbackInfo(*args
, **kwargs
)
8653 class PySizerPtr(PySizer
):
8654 def __init__(self
, this
):
8656 if not hasattr(self
,"thisown"): self
.thisown
= 0
8657 self
.__class
__ = PySizer
8658 _core
.PySizer_swigregister(PySizerPtr
)
8660 #---------------------------------------------------------------------------
8662 class BoxSizer(Sizer
):
8664 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8665 def __init__(self
, *args
, **kwargs
):
8666 """__init__(int orient=HORIZONTAL) -> BoxSizer"""
8667 newobj
= _core
.new_BoxSizer(*args
, **kwargs
)
8668 self
.this
= newobj
.this
8671 self
._setOORInfo
(self
)
8673 def GetOrientation(*args
, **kwargs
):
8674 """GetOrientation() -> int"""
8675 return _core
.BoxSizer_GetOrientation(*args
, **kwargs
)
8677 def SetOrientation(*args
, **kwargs
):
8678 """SetOrientation(int orient)"""
8679 return _core
.BoxSizer_SetOrientation(*args
, **kwargs
)
8681 def RecalcSizes(*args
, **kwargs
):
8683 return _core
.BoxSizer_RecalcSizes(*args
, **kwargs
)
8685 def CalcMin(*args
, **kwargs
):
8686 """CalcMin() -> Size"""
8687 return _core
.BoxSizer_CalcMin(*args
, **kwargs
)
8690 class BoxSizerPtr(BoxSizer
):
8691 def __init__(self
, this
):
8693 if not hasattr(self
,"thisown"): self
.thisown
= 0
8694 self
.__class
__ = BoxSizer
8695 _core
.BoxSizer_swigregister(BoxSizerPtr
)
8697 #---------------------------------------------------------------------------
8699 class StaticBoxSizer(BoxSizer
):
8701 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8702 def __init__(self
, *args
, **kwargs
):
8703 """__init__(wxStaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer"""
8704 newobj
= _core
.new_StaticBoxSizer(*args
, **kwargs
)
8705 self
.this
= newobj
.this
8708 self
._setOORInfo
(self
)
8710 def GetStaticBox(*args
, **kwargs
):
8711 """GetStaticBox() -> wxStaticBox"""
8712 return _core
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
8714 def RecalcSizes(*args
, **kwargs
):
8716 return _core
.StaticBoxSizer_RecalcSizes(*args
, **kwargs
)
8718 def CalcMin(*args
, **kwargs
):
8719 """CalcMin() -> Size"""
8720 return _core
.StaticBoxSizer_CalcMin(*args
, **kwargs
)
8723 class StaticBoxSizerPtr(StaticBoxSizer
):
8724 def __init__(self
, this
):
8726 if not hasattr(self
,"thisown"): self
.thisown
= 0
8727 self
.__class
__ = StaticBoxSizer
8728 _core
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
8730 #---------------------------------------------------------------------------
8732 class GridSizer(Sizer
):
8734 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8735 def __init__(self
, *args
, **kwargs
):
8736 """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer"""
8737 newobj
= _core
.new_GridSizer(*args
, **kwargs
)
8738 self
.this
= newobj
.this
8741 self
._setOORInfo
(self
)
8743 def RecalcSizes(*args
, **kwargs
):
8745 return _core
.GridSizer_RecalcSizes(*args
, **kwargs
)
8747 def CalcMin(*args
, **kwargs
):
8748 """CalcMin() -> Size"""
8749 return _core
.GridSizer_CalcMin(*args
, **kwargs
)
8751 def SetCols(*args
, **kwargs
):
8752 """SetCols(int cols)"""
8753 return _core
.GridSizer_SetCols(*args
, **kwargs
)
8755 def SetRows(*args
, **kwargs
):
8756 """SetRows(int rows)"""
8757 return _core
.GridSizer_SetRows(*args
, **kwargs
)
8759 def SetVGap(*args
, **kwargs
):
8760 """SetVGap(int gap)"""
8761 return _core
.GridSizer_SetVGap(*args
, **kwargs
)
8763 def SetHGap(*args
, **kwargs
):
8764 """SetHGap(int gap)"""
8765 return _core
.GridSizer_SetHGap(*args
, **kwargs
)
8767 def GetCols(*args
, **kwargs
):
8768 """GetCols() -> int"""
8769 return _core
.GridSizer_GetCols(*args
, **kwargs
)
8771 def GetRows(*args
, **kwargs
):
8772 """GetRows() -> int"""
8773 return _core
.GridSizer_GetRows(*args
, **kwargs
)
8775 def GetVGap(*args
, **kwargs
):
8776 """GetVGap() -> int"""
8777 return _core
.GridSizer_GetVGap(*args
, **kwargs
)
8779 def GetHGap(*args
, **kwargs
):
8780 """GetHGap() -> int"""
8781 return _core
.GridSizer_GetHGap(*args
, **kwargs
)
8784 class GridSizerPtr(GridSizer
):
8785 def __init__(self
, this
):
8787 if not hasattr(self
,"thisown"): self
.thisown
= 0
8788 self
.__class
__ = GridSizer
8789 _core
.GridSizer_swigregister(GridSizerPtr
)
8791 #---------------------------------------------------------------------------
8793 FLEX_GROWMODE_NONE
= _core
.FLEX_GROWMODE_NONE
8794 FLEX_GROWMODE_SPECIFIED
= _core
.FLEX_GROWMODE_SPECIFIED
8795 FLEX_GROWMODE_ALL
= _core
.FLEX_GROWMODE_ALL
8796 class FlexGridSizer(GridSizer
):
8798 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8799 def __init__(self
, *args
, **kwargs
):
8800 """__init__(int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer"""
8801 newobj
= _core
.new_FlexGridSizer(*args
, **kwargs
)
8802 self
.this
= newobj
.this
8805 self
._setOORInfo
(self
)
8807 def RecalcSizes(*args
, **kwargs
):
8809 return _core
.FlexGridSizer_RecalcSizes(*args
, **kwargs
)
8811 def CalcMin(*args
, **kwargs
):
8812 """CalcMin() -> Size"""
8813 return _core
.FlexGridSizer_CalcMin(*args
, **kwargs
)
8815 def AddGrowableRow(*args
, **kwargs
):
8816 """AddGrowableRow(size_t idx, int proportion=0)"""
8817 return _core
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
8819 def RemoveGrowableRow(*args
, **kwargs
):
8820 """RemoveGrowableRow(size_t idx)"""
8821 return _core
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
8823 def AddGrowableCol(*args
, **kwargs
):
8824 """AddGrowableCol(size_t idx, int proportion=0)"""
8825 return _core
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
8827 def RemoveGrowableCol(*args
, **kwargs
):
8828 """RemoveGrowableCol(size_t idx)"""
8829 return _core
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
8831 def SetFlexibleDirection(*args
, **kwargs
):
8832 """SetFlexibleDirection(int direction)"""
8833 return _core
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
8835 def GetFlexibleDirection(*args
, **kwargs
):
8836 """GetFlexibleDirection() -> int"""
8837 return _core
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
8839 def SetNonFlexibleGrowMode(*args
, **kwargs
):
8840 """SetNonFlexibleGrowMode(int mode)"""
8841 return _core
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
8843 def GetNonFlexibleGrowMode(*args
, **kwargs
):
8844 """GetNonFlexibleGrowMode() -> int"""
8845 return _core
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
8847 def GetRowHeights(*args
, **kwargs
):
8848 """GetRowHeights() -> wxArrayInt"""
8849 return _core
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
8851 def GetColWidths(*args
, **kwargs
):
8852 """GetColWidths() -> wxArrayInt"""
8853 return _core
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
8856 class FlexGridSizerPtr(FlexGridSizer
):
8857 def __init__(self
, this
):
8859 if not hasattr(self
,"thisown"): self
.thisown
= 0
8860 self
.__class
__ = FlexGridSizer
8861 _core
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
8863 #---------------------------------------------------------------------------
8865 class GBPosition(object):
8867 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8868 def __init__(self
, *args
, **kwargs
):
8869 """__init__(int row=0, int col=0) -> GBPosition"""
8870 newobj
= _core
.new_GBPosition(*args
, **kwargs
)
8871 self
.this
= newobj
.this
8874 def GetRow(*args
, **kwargs
):
8875 """GetRow() -> int"""
8876 return _core
.GBPosition_GetRow(*args
, **kwargs
)
8878 def GetCol(*args
, **kwargs
):
8879 """GetCol() -> int"""
8880 return _core
.GBPosition_GetCol(*args
, **kwargs
)
8882 def SetRow(*args
, **kwargs
):
8883 """SetRow(int row)"""
8884 return _core
.GBPosition_SetRow(*args
, **kwargs
)
8886 def SetCol(*args
, **kwargs
):
8887 """SetCol(int col)"""
8888 return _core
.GBPosition_SetCol(*args
, **kwargs
)
8890 def __eq__(*args
, **kwargs
):
8891 """__eq__(GBPosition other) -> bool"""
8892 return _core
.GBPosition___eq__(*args
, **kwargs
)
8894 def __ne__(*args
, **kwargs
):
8895 """__ne__(GBPosition other) -> bool"""
8896 return _core
.GBPosition___ne__(*args
, **kwargs
)
8898 def Set(*args
, **kwargs
):
8899 """Set(int row=0, int col=0)"""
8900 return _core
.GBPosition_Set(*args
, **kwargs
)
8902 def Get(*args
, **kwargs
):
8903 """Get() -> PyObject"""
8904 return _core
.GBPosition_Get(*args
, **kwargs
)
8907 def __str__(self
): return str(self
.Get())
8908 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
8909 def __len__(self
): return len(self
.Get())
8910 def __getitem__(self
, index
): return self
.Get()[index
]
8911 def __setitem__(self
, index
, val
):
8912 if index
== 0: self
.SetRow(val
)
8913 elif index
== 1: self
.SetCol(val
)
8914 else: raise IndexError
8915 def __nonzero__(self
): return self
.Get() != (0,0)
8916 __safe_for_unpickling__
= True
8917 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
8919 row
= property(GetRow
, SetRow
)
8920 col
= property(GetCol
, SetCol
)
8923 class GBPositionPtr(GBPosition
):
8924 def __init__(self
, this
):
8926 if not hasattr(self
,"thisown"): self
.thisown
= 0
8927 self
.__class
__ = GBPosition
8928 _core
.GBPosition_swigregister(GBPositionPtr
)
8930 class GBSpan(object):
8932 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8933 def __init__(self
, *args
, **kwargs
):
8934 """__init__(int rowspan=1, int colspan=1) -> GBSpan"""
8935 newobj
= _core
.new_GBSpan(*args
, **kwargs
)
8936 self
.this
= newobj
.this
8939 def GetRowspan(*args
, **kwargs
):
8940 """GetRowspan() -> int"""
8941 return _core
.GBSpan_GetRowspan(*args
, **kwargs
)
8943 def GetColspan(*args
, **kwargs
):
8944 """GetColspan() -> int"""
8945 return _core
.GBSpan_GetColspan(*args
, **kwargs
)
8947 def SetRowspan(*args
, **kwargs
):
8948 """SetRowspan(int rowspan)"""
8949 return _core
.GBSpan_SetRowspan(*args
, **kwargs
)
8951 def SetColspan(*args
, **kwargs
):
8952 """SetColspan(int colspan)"""
8953 return _core
.GBSpan_SetColspan(*args
, **kwargs
)
8955 def __eq__(*args
, **kwargs
):
8956 """__eq__(GBSpan other) -> bool"""
8957 return _core
.GBSpan___eq__(*args
, **kwargs
)
8959 def __ne__(*args
, **kwargs
):
8960 """__ne__(GBSpan other) -> bool"""
8961 return _core
.GBSpan___ne__(*args
, **kwargs
)
8963 def Set(*args
, **kwargs
):
8964 """Set(int rowspan=1, int colspan=1)"""
8965 return _core
.GBSpan_Set(*args
, **kwargs
)
8967 def Get(*args
, **kwargs
):
8968 """Get() -> PyObject"""
8969 return _core
.GBSpan_Get(*args
, **kwargs
)
8972 def __str__(self
): return str(self
.Get())
8973 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
8974 def __len__(self
): return len(self
.Get())
8975 def __getitem__(self
, index
): return self
.Get()[index
]
8976 def __setitem__(self
, index
, val
):
8977 if index
== 0: self
.SetRowspan(val
)
8978 elif index
== 1: self
.SetColspan(val
)
8979 else: raise IndexError
8980 def __nonzero__(self
): return self
.Get() != (0,0)
8981 __safe_for_unpickling__
= True
8982 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
8984 rowspan
= property(GetRowspan
, SetRowspan
)
8985 colspan
= property(GetColspan
, SetColspan
)
8988 class GBSpanPtr(GBSpan
):
8989 def __init__(self
, this
):
8991 if not hasattr(self
,"thisown"): self
.thisown
= 0
8992 self
.__class
__ = GBSpan
8993 _core
.GBSpan_swigregister(GBSpanPtr
)
8995 class GBSizerItem(SizerItem
):
8997 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8998 def __init__(self
, *args
, **kwargs
):
8999 """__init__() -> GBSizerItem"""
9000 newobj
= _core
.new_GBSizerItem(*args
, **kwargs
)
9001 self
.this
= newobj
.this
9004 def GetPos(*args
, **kwargs
):
9005 """GetPos() -> GBPosition"""
9006 return _core
.GBSizerItem_GetPos(*args
, **kwargs
)
9008 def GetPosTuple(self
): return self
.GetPos().Get()
9009 def GetSpan(*args
, **kwargs
):
9010 """GetSpan() -> GBSpan"""
9011 return _core
.GBSizerItem_GetSpan(*args
, **kwargs
)
9013 def GetSpanTuple(self
): return self
.GetSpan().Get()
9014 def SetPos(*args
, **kwargs
):
9015 """SetPos(GBPosition pos) -> bool"""
9016 return _core
.GBSizerItem_SetPos(*args
, **kwargs
)
9018 def SetSpan(*args
, **kwargs
):
9019 """SetSpan(GBSpan span) -> bool"""
9020 return _core
.GBSizerItem_SetSpan(*args
, **kwargs
)
9022 def Intersects(*args
):
9024 Intersects(GBSizerItem other) -> bool
9025 Intersects(GBPosition pos, GBSpan span) -> bool
9027 return _core
.GBSizerItem_Intersects(*args
)
9029 def GetEndPos(*args
, **kwargs
):
9030 """GetEndPos(int row, int col)"""
9031 return _core
.GBSizerItem_GetEndPos(*args
, **kwargs
)
9033 def GetGBSizer(*args
, **kwargs
):
9034 """GetGBSizer() -> GridBagSizer"""
9035 return _core
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
9037 def SetGBSizer(*args
, **kwargs
):
9038 """SetGBSizer(GridBagSizer sizer)"""
9039 return _core
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
9042 class GBSizerItemPtr(GBSizerItem
):
9043 def __init__(self
, this
):
9045 if not hasattr(self
,"thisown"): self
.thisown
= 0
9046 self
.__class
__ = GBSizerItem
9047 _core
.GBSizerItem_swigregister(GBSizerItemPtr
)
9048 DefaultSpan
= cvar
.DefaultSpan
9050 def GBSizerItemWindow(*args
, **kwargs
):
9052 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
9053 int border, Object userData) -> GBSizerItem
9055 val
= _core
.new_GBSizerItemWindow(*args
, **kwargs
)
9059 def GBSizerItemSizer(*args
, **kwargs
):
9061 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
9062 int border, Object userData) -> GBSizerItem
9064 val
= _core
.new_GBSizerItemSizer(*args
, **kwargs
)
9068 def GBSizerItemSpacer(*args
, **kwargs
):
9070 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
9071 int flag, int border, Object userData) -> GBSizerItem
9073 val
= _core
.new_GBSizerItemSpacer(*args
, **kwargs
)
9077 class GridBagSizer(FlexGridSizer
):
9079 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9080 def __init__(self
, *args
, **kwargs
):
9081 """__init__(int vgap=0, int hgap=0) -> GridBagSizer"""
9082 newobj
= _core
.new_GridBagSizer(*args
, **kwargs
)
9083 self
.this
= newobj
.this
9086 def Add(*args
, **kwargs
):
9088 Add(PyObject item, GBPosition pos, GBSpan span=DefaultSpan,
9089 int flag=0, int border=0, PyObject userData=None) -> bool
9091 return _core
.GridBagSizer_Add(*args
, **kwargs
)
9093 def AddItem(*args
, **kwargs
):
9094 """AddItem(GBSizerItem item) -> bool"""
9095 return _core
.GridBagSizer_AddItem(*args
, **kwargs
)
9097 def GetEmptyCellSize(*args
, **kwargs
):
9098 """GetEmptyCellSize() -> Size"""
9099 return _core
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
9101 def SetEmptyCellSize(*args
, **kwargs
):
9102 """SetEmptyCellSize(Size sz)"""
9103 return _core
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
9105 def GetItemPosition(*args
):
9107 GetItemPosition(Window window) -> GBPosition
9108 GetItemPosition(Sizer sizer) -> GBPosition
9109 GetItemPosition(size_t index) -> GBPosition
9111 return _core
.GridBagSizer_GetItemPosition(*args
)
9113 def SetItemPosition(*args
):
9115 SetItemPosition(Window window, GBPosition pos) -> bool
9116 SetItemPosition(Sizer sizer, GBPosition pos) -> bool
9117 SetItemPosition(size_t index, GBPosition pos) -> bool
9119 return _core
.GridBagSizer_SetItemPosition(*args
)
9121 def GetItemSpan(*args
):
9123 GetItemSpan(Window window) -> GBSpan
9124 GetItemSpan(Sizer sizer) -> GBSpan
9125 GetItemSpan(size_t index) -> GBSpan
9127 return _core
.GridBagSizer_GetItemSpan(*args
)
9129 def SetItemSpan(*args
):
9131 SetItemSpan(Window window, GBSpan span) -> bool
9132 SetItemSpan(Sizer sizer, GBSpan span) -> bool
9133 SetItemSpan(size_t index, GBSpan span) -> bool
9135 return _core
.GridBagSizer_SetItemSpan(*args
)
9137 def FindItem(*args
):
9139 FindItem(Window window) -> GBSizerItem
9140 FindItem(Sizer sizer) -> GBSizerItem
9142 return _core
.GridBagSizer_FindItem(*args
)
9144 def FindItemAtPosition(*args
, **kwargs
):
9145 """FindItemAtPosition(GBPosition pos) -> GBSizerItem"""
9146 return _core
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
9148 def FindItemAtPoint(*args
, **kwargs
):
9149 """FindItemAtPoint(Point pt) -> GBSizerItem"""
9150 return _core
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
9152 def FindItemWithData(*args
, **kwargs
):
9153 """FindItemWithData(Object userData) -> GBSizerItem"""
9154 return _core
.GridBagSizer_FindItemWithData(*args
, **kwargs
)
9156 def RecalcSizes(*args
, **kwargs
):
9158 return _core
.GridBagSizer_RecalcSizes(*args
, **kwargs
)
9160 def CalcMin(*args
, **kwargs
):
9161 """CalcMin() -> Size"""
9162 return _core
.GridBagSizer_CalcMin(*args
, **kwargs
)
9164 def CheckForIntersection(*args
):
9166 CheckForIntersection(GBSizerItem item, GBSizerItem excludeItem=None) -> bool
9167 CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
9169 return _core
.GridBagSizer_CheckForIntersection(*args
)
9172 class GridBagSizerPtr(GridBagSizer
):
9173 def __init__(self
, this
):
9175 if not hasattr(self
,"thisown"): self
.thisown
= 0
9176 self
.__class
__ = GridBagSizer
9177 _core
.GridBagSizer_swigregister(GridBagSizerPtr
)
9179 #---------------------------------------------------------------------------
9184 Bottom
= _core
.Bottom
9186 Height
= _core
.Height
9187 Centre
= _core
.Centre
9188 Center
= _core
.Center
9189 CentreX
= _core
.CentreX
9190 CentreY
= _core
.CentreY
9191 Unconstrained
= _core
.Unconstrained
9193 PercentOf
= _core
.PercentOf
9196 LeftOf
= _core
.LeftOf
9197 RightOf
= _core
.RightOf
9198 SameAs
= _core
.SameAs
9199 Absolute
= _core
.Absolute
9200 class IndividualLayoutConstraint(Object
):
9202 Objects of this class are stored in the wx.LayoutConstraint class as one of
9203 eight possible constraints that a window can be involved in. You will never
9204 need to create an instance of wx.IndividualLayoutConstraint, rather you should
9205 use create a wx.LayoutContstraints instance and use the individual contstraints
9208 Constraints are initially set to have the relationship wx.Unconstrained, which
9209 means that their values should be calculated by looking at known constraints.
9211 The Edge specifies the type of edge or dimension of a window.
9215 wx.Left The left edge.
9216 wx.Top The top edge.
9217 wx.Right The right edge.
9218 wx.Bottom The bottom edge.
9219 wx.CentreX The x-coordinate of the centre of the window.
9220 wx.CentreY The y-coordinate of the centre of the window.
9223 The Relationship specifies the relationship that this edge or dimension has
9224 with another specified edge or dimension. Normally, the user doesn't use these
9225 directly because functions such as Below and RightOf are a convenience for
9226 using the more general Set function.
9230 wx.Unconstrained The edge or dimension is unconstrained
9231 (the default for edges.)
9232 wx.AsIs The edge or dimension is to be taken from the current
9233 window position or size (the default for dimensions.)
9234 wx.Above The edge should be above another edge.
9235 wx.Below The edge should be below another edge.
9236 wx.LeftOf The edge should be to the left of another edge.
9237 wx.RightOf The edge should be to the right of another edge.
9238 wx.SameAs The edge or dimension should be the same as another edge
9240 wx.PercentOf The edge or dimension should be a percentage of another
9242 wx.Absolute The edge or dimension should be a given absolute value.
9246 def __init__(self
): raise RuntimeError, "No constructor defined"
9248 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9249 def Set(*args
, **kwargs
):
9250 """Set(int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)"""
9251 return _core
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
9253 def LeftOf(*args
, **kwargs
):
9255 LeftOf(Window sibling, int marg=0)
9257 Sibling relationship
9259 return _core
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
9261 def RightOf(*args
, **kwargs
):
9263 RightOf(Window sibling, int marg=0)
9265 Sibling relationship
9267 return _core
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
9269 def Above(*args
, **kwargs
):
9271 Above(Window sibling, int marg=0)
9273 Sibling relationship
9275 return _core
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
9277 def Below(*args
, **kwargs
):
9279 Below(Window sibling, int marg=0)
9281 Sibling relationship
9283 return _core
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
9285 def SameAs(*args
, **kwargs
):
9287 SameAs(Window otherW, int edge, int marg=0)
9289 'Same edge' alignment
9291 return _core
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
9293 def PercentOf(*args
, **kwargs
):
9295 PercentOf(Window otherW, int wh, int per)
9297 The edge is a percentage of the other window's edge
9299 return _core
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
9301 def Absolute(*args
, **kwargs
):
9305 Edge has absolute value
9307 return _core
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
9309 def Unconstrained(*args
, **kwargs
):
9313 Dimension is unconstrained
9315 return _core
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
9317 def AsIs(*args
, **kwargs
):
9321 Dimension is 'as is' (use current size settings)
9323 return _core
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
9325 def GetOtherWindow(*args
, **kwargs
):
9326 """GetOtherWindow() -> Window"""
9327 return _core
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
9329 def GetMyEdge(*args
, **kwargs
):
9330 """GetMyEdge() -> int"""
9331 return _core
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
9333 def SetEdge(*args
, **kwargs
):
9334 """SetEdge(int which)"""
9335 return _core
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
9337 def SetValue(*args
, **kwargs
):
9338 """SetValue(int v)"""
9339 return _core
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
9341 def GetMargin(*args
, **kwargs
):
9342 """GetMargin() -> int"""
9343 return _core
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
9345 def SetMargin(*args
, **kwargs
):
9346 """SetMargin(int m)"""
9347 return _core
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
9349 def GetValue(*args
, **kwargs
):
9350 """GetValue() -> int"""
9351 return _core
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
9353 def GetPercent(*args
, **kwargs
):
9354 """GetPercent() -> int"""
9355 return _core
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
9357 def GetOtherEdge(*args
, **kwargs
):
9358 """GetOtherEdge() -> int"""
9359 return _core
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
9361 def GetDone(*args
, **kwargs
):
9362 """GetDone() -> bool"""
9363 return _core
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
9365 def SetDone(*args
, **kwargs
):
9366 """SetDone(bool d)"""
9367 return _core
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
9369 def GetRelationship(*args
, **kwargs
):
9370 """GetRelationship() -> int"""
9371 return _core
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
9373 def SetRelationship(*args
, **kwargs
):
9374 """SetRelationship(int r)"""
9375 return _core
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
9377 def ResetIfWin(*args
, **kwargs
):
9379 ResetIfWin(Window otherW) -> bool
9381 Reset constraint if it mentions otherWin
9383 return _core
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
9385 def SatisfyConstraint(*args
, **kwargs
):
9387 SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool
9389 Try to satisfy constraint
9391 return _core
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
9393 def GetEdge(*args
, **kwargs
):
9395 GetEdge(int which, Window thisWin, Window other) -> int
9397 Get the value of this edge or dimension, or if this
9398 is not determinable, -1.
9400 return _core
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
9403 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
9404 def __init__(self
, this
):
9406 if not hasattr(self
,"thisown"): self
.thisown
= 0
9407 self
.__class
__ = IndividualLayoutConstraint
9408 _core
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
9410 class LayoutConstraints(Object
):
9412 Note: constraints are now deprecated and you should use sizers instead.
9414 Objects of this class can be associated with a window to define its layout
9415 constraints, with respect to siblings or its parent.
9417 The class consists of the following eight constraints of class
9418 wx.IndividualLayoutConstraint, some or all of which should be accessed
9419 directly to set the appropriate constraints.
9421 * left: represents the left hand edge of the window
9422 * right: represents the right hand edge of the window
9423 * top: represents the top edge of the window
9424 * bottom: represents the bottom edge of the window
9425 * width: represents the width of the window
9426 * height: represents the height of the window
9427 * centreX: represents the horizontal centre point of the window
9428 * centreY: represents the vertical centre point of the window
9430 Most constraints are initially set to have the relationship wxUnconstrained,
9431 which means that their values should be calculated by looking at known
9432 constraints. The exceptions are width and height, which are set to wxAsIs to
9433 ensure that if the user does not specify a constraint, the existing width and
9434 height will be used, to be compatible with panel items which often have take a
9435 default size. If the constraint is wxAsIs, the dimension will not be changed.
9439 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9440 left
= property(_core
.LayoutConstraints_left_get
)
9441 top
= property(_core
.LayoutConstraints_top_get
)
9442 right
= property(_core
.LayoutConstraints_right_get
)
9443 bottom
= property(_core
.LayoutConstraints_bottom_get
)
9444 width
= property(_core
.LayoutConstraints_width_get
)
9445 height
= property(_core
.LayoutConstraints_height_get
)
9446 centreX
= property(_core
.LayoutConstraints_centreX_get
)
9447 centreY
= property(_core
.LayoutConstraints_centreY_get
)
9448 def __init__(self
, *args
, **kwargs
):
9449 """__init__() -> LayoutConstraints"""
9450 newobj
= _core
.new_LayoutConstraints(*args
, **kwargs
)
9451 self
.this
= newobj
.this
9454 def SatisfyConstraints(*args
, **kwargs
):
9455 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
9456 return _core
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
9458 def AreSatisfied(*args
, **kwargs
):
9459 """AreSatisfied() -> bool"""
9460 return _core
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
9463 class LayoutConstraintsPtr(LayoutConstraints
):
9464 def __init__(self
, this
):
9466 if not hasattr(self
,"thisown"): self
.thisown
= 0
9467 self
.__class
__ = LayoutConstraints
9468 _core
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
9470 #----------------------------------------------------------------------------
9472 # Use Python's bool constants if available, make some if not
9476 __builtins__
.True = 1==1
9477 __builtins__
.False = 1==0
9478 def bool(value
): return not not value
9479 __builtins__
.bool = bool
9483 # workarounds for bad wxRTTI names
9484 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
9485 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
9486 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
9489 #----------------------------------------------------------------------------
9490 # Load version numbers from __version__... Ensure that major and minor
9491 # versions are the same for both wxPython and wxWindows.
9493 from __version__
import *
9494 __version__
= VERSION_STRING
9496 assert MAJOR_VERSION
== _core
.MAJOR_VERSION
, "wxPython/wxWindows version mismatch"
9497 assert MINOR_VERSION
== _core
.MINOR_VERSION
, "wxPython/wxWindows version mismatch"
9498 if RELEASE_VERSION
!= _core
.RELEASE_VERSION
:
9500 warnings
.warn("wxPython/wxWindows release number mismatch")
9502 #----------------------------------------------------------------------------
9504 class PyDeadObjectError(AttributeError):
9507 class _wxPyDeadObject(object):
9509 Instances of wx objects that are OOR capable will have their __class__
9510 changed to this class when the C++ object is deleted. This should help
9511 prevent crashes due to referencing a bogus C++ pointer.
9513 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
9514 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
9517 if not hasattr(self
, "_name"):
9518 self
._name
= "[unknown]"
9519 return self
.reprStr
% self
._name
9521 def __getattr__(self
, *args
):
9522 if not hasattr(self
, "_name"):
9523 self
._name
= "[unknown]"
9524 raise PyDeadObjectError(self
.attrStr
% self
._name
)
9526 def __nonzero__(self
):
9531 class PyUnbornObjectError(AttributeError):
9534 class _wxPyUnbornObject(object):
9536 Some stock objects are created when the wx.core module is
9537 imported, but their C++ instance is not created until the wx.App
9538 object is created and initialized. These object instances will
9539 temporarily have their __class__ changed to this class so an
9540 exception will be raised if they are used before the C++ instance
9544 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
9545 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
9548 #if not hasattr(self, "_name"):
9549 # self._name = "[unknown]"
9550 return self
.reprStr
#% self._name
9552 def __getattr__(self
, *args
):
9553 #if not hasattr(self, "_name"):
9554 # self._name = "[unknown]"
9555 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
9557 def __nonzero__(self
):
9561 #----------------------------------------------------------------------------
9562 _wxPyCallAfterId
= None
9564 def CallAfter(callable, *args
, **kw
):
9566 Call the specified function after the current and pending event
9567 handlers have been completed. This is also good for making GUI
9568 method calls from non-GUI threads.
9571 assert app
, 'No wxApp created yet'
9573 global _wxPyCallAfterId
9574 if _wxPyCallAfterId
is None:
9575 _wxPyCallAfterId
= wx
.NewEventType()
9576 app
.Connect(-1, -1, _wxPyCallAfterId
,
9577 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
9579 evt
.SetEventType(_wxPyCallAfterId
)
9580 evt
.callable = callable
9583 wx
.PostEvent(app
, evt
)
9586 #----------------------------------------------------------------------------
9591 A convenience class for wx.Timer, that calls the given callable
9592 object once after the given amount of milliseconds, passing any
9593 positional or keyword args. The return value of the callable is
9594 availbale after it has been run with the GetResult method.
9596 If you don't need to get the return value or restart the timer
9597 then there is no need to hold a reference to this object. It will
9598 hold a reference to itself while the timer is running (the timer
9599 has a reference to self.Notify) but the cycle will be broken when
9600 the timer completes, automatically cleaning up the wx.FutureCall
9603 def __init__(self
, millis
, callable, *args
, **kwargs
):
9604 self
.millis
= millis
9605 self
.callable = callable
9606 self
.SetArgs(*args
, **kwargs
)
9608 self
.running
= False
9618 def Start(self
, millis
=None, *args
, **kwargs
):
9623 if millis
is not None:
9624 self
.millis
= millis
9626 self
.SetArgs(*args
, **kwargs
)
9628 self
.timer
= wx
.PyTimer(self
.Notify
)
9629 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
9636 Stop and destroy the timer.
9638 if self
.timer
is not None:
9643 def GetInterval(self
):
9644 if self
.timer
is not None:
9645 return self
.timer
.GetInterval()
9650 def IsRunning(self
):
9651 return self
.timer
is not None and self
.timer
.IsRunning()
9654 def SetArgs(self
, *args
, **kwargs
):
9656 (Re)set the args passed to the callable object. This is
9657 useful in conjunction with Restart if you want to schedule a
9658 new call to the same callable object but with different
9662 self
.kwargs
= kwargs
9668 def GetResult(self
):
9673 The timer has expired so call the callable.
9675 if self
.callable and getattr(self
.callable, 'im_self', True):
9677 self
.running
= False
9678 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
9680 if not self
.running
:
9681 # if it wasn't restarted, then cleanup
9682 wx
.CallAfter(self
.Stop
)
9685 #----------------------------------------------------------------------------
9686 #----------------------------------------------------------------------------
9688 # Import other modules in this package that should show up in the
9689 # "core" wx namespace
9691 from windows
import *
9692 from controls
import *
9696 # Fixup the stock objects since they can't be used yet. (They will be
9697 # restored in wx.PyApp.OnInit.)
9698 _core
._wxPyFixStockObjects
()
9700 #----------------------------------------------------------------------------
9701 #----------------------------------------------------------------------------