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__
]
16 #----------------------------------------------------------------------------
18 def _deprecated(callable, msg
=None):
20 Create a wrapper function that will raise a DeprecationWarning
21 before calling the callable.
24 msg
= "%s is deprecated" % callable
25 def deprecatedWrapper(*args
, **kwargs
):
27 warnings
.warn(msg
, DeprecationWarning, stacklevel
=2)
28 return callable(*args
, **kwargs
)
29 deprecatedWrapper
.__doc
__ = msg
30 return deprecatedWrapper
33 #----------------------------------------------------------------------------
35 NOT_FOUND
= _core_
.NOT_FOUND
36 VSCROLL
= _core_
.VSCROLL
37 HSCROLL
= _core_
.HSCROLL
38 CAPTION
= _core_
.CAPTION
39 DOUBLE_BORDER
= _core_
.DOUBLE_BORDER
40 SUNKEN_BORDER
= _core_
.SUNKEN_BORDER
41 RAISED_BORDER
= _core_
.RAISED_BORDER
42 BORDER
= _core_
.BORDER
43 SIMPLE_BORDER
= _core_
.SIMPLE_BORDER
44 STATIC_BORDER
= _core_
.STATIC_BORDER
45 TRANSPARENT_WINDOW
= _core_
.TRANSPARENT_WINDOW
46 NO_BORDER
= _core_
.NO_BORDER
47 TAB_TRAVERSAL
= _core_
.TAB_TRAVERSAL
48 WANTS_CHARS
= _core_
.WANTS_CHARS
49 POPUP_WINDOW
= _core_
.POPUP_WINDOW
50 CENTER_FRAME
= _core_
.CENTER_FRAME
51 CENTRE_ON_SCREEN
= _core_
.CENTRE_ON_SCREEN
52 CENTER_ON_SCREEN
= _core_
.CENTER_ON_SCREEN
53 ED_CLIENT_MARGIN
= _core_
.ED_CLIENT_MARGIN
54 ED_BUTTONS_BOTTOM
= _core_
.ED_BUTTONS_BOTTOM
55 ED_BUTTONS_RIGHT
= _core_
.ED_BUTTONS_RIGHT
56 ED_STATIC_LINE
= _core_
.ED_STATIC_LINE
57 EXT_DIALOG_STYLE
= _core_
.EXT_DIALOG_STYLE
58 CLIP_CHILDREN
= _core_
.CLIP_CHILDREN
59 CLIP_SIBLINGS
= _core_
.CLIP_SIBLINGS
60 ALWAYS_SHOW_SB
= _core_
.ALWAYS_SHOW_SB
61 RETAINED
= _core_
.RETAINED
62 BACKINGSTORE
= _core_
.BACKINGSTORE
63 COLOURED
= _core_
.COLOURED
64 FIXED_LENGTH
= _core_
.FIXED_LENGTH
65 LB_NEEDED_SB
= _core_
.LB_NEEDED_SB
66 LB_ALWAYS_SB
= _core_
.LB_ALWAYS_SB
67 LB_SORT
= _core_
.LB_SORT
68 LB_SINGLE
= _core_
.LB_SINGLE
69 LB_MULTIPLE
= _core_
.LB_MULTIPLE
70 LB_EXTENDED
= _core_
.LB_EXTENDED
71 LB_OWNERDRAW
= _core_
.LB_OWNERDRAW
72 LB_HSCROLL
= _core_
.LB_HSCROLL
73 PROCESS_ENTER
= _core_
.PROCESS_ENTER
74 PASSWORD
= _core_
.PASSWORD
75 CB_SIMPLE
= _core_
.CB_SIMPLE
76 CB_DROPDOWN
= _core_
.CB_DROPDOWN
77 CB_SORT
= _core_
.CB_SORT
78 CB_READONLY
= _core_
.CB_READONLY
79 RA_HORIZONTAL
= _core_
.RA_HORIZONTAL
80 RA_VERTICAL
= _core_
.RA_VERTICAL
81 RA_SPECIFY_ROWS
= _core_
.RA_SPECIFY_ROWS
82 RA_SPECIFY_COLS
= _core_
.RA_SPECIFY_COLS
83 RB_GROUP
= _core_
.RB_GROUP
84 RB_SINGLE
= _core_
.RB_SINGLE
85 SL_HORIZONTAL
= _core_
.SL_HORIZONTAL
86 SL_VERTICAL
= _core_
.SL_VERTICAL
87 SL_AUTOTICKS
= _core_
.SL_AUTOTICKS
88 SL_LABELS
= _core_
.SL_LABELS
89 SL_LEFT
= _core_
.SL_LEFT
90 SL_TOP
= _core_
.SL_TOP
91 SL_RIGHT
= _core_
.SL_RIGHT
92 SL_BOTTOM
= _core_
.SL_BOTTOM
93 SL_BOTH
= _core_
.SL_BOTH
94 SL_SELRANGE
= _core_
.SL_SELRANGE
95 SB_HORIZONTAL
= _core_
.SB_HORIZONTAL
96 SB_VERTICAL
= _core_
.SB_VERTICAL
97 ST_SIZEGRIP
= _core_
.ST_SIZEGRIP
98 ST_NO_AUTORESIZE
= _core_
.ST_NO_AUTORESIZE
99 FLOOD_SURFACE
= _core_
.FLOOD_SURFACE
100 FLOOD_BORDER
= _core_
.FLOOD_BORDER
101 ODDEVEN_RULE
= _core_
.ODDEVEN_RULE
102 WINDING_RULE
= _core_
.WINDING_RULE
103 TOOL_TOP
= _core_
.TOOL_TOP
104 TOOL_BOTTOM
= _core_
.TOOL_BOTTOM
105 TOOL_LEFT
= _core_
.TOOL_LEFT
106 TOOL_RIGHT
= _core_
.TOOL_RIGHT
108 YES_NO
= _core_
.YES_NO
109 CANCEL
= _core_
.CANCEL
112 NO_DEFAULT
= _core_
.NO_DEFAULT
113 YES_DEFAULT
= _core_
.YES_DEFAULT
114 ICON_EXCLAMATION
= _core_
.ICON_EXCLAMATION
115 ICON_HAND
= _core_
.ICON_HAND
116 ICON_QUESTION
= _core_
.ICON_QUESTION
117 ICON_INFORMATION
= _core_
.ICON_INFORMATION
118 ICON_STOP
= _core_
.ICON_STOP
119 ICON_ASTERISK
= _core_
.ICON_ASTERISK
120 ICON_MASK
= _core_
.ICON_MASK
121 ICON_WARNING
= _core_
.ICON_WARNING
122 ICON_ERROR
= _core_
.ICON_ERROR
123 FORWARD
= _core_
.FORWARD
124 BACKWARD
= _core_
.BACKWARD
129 SIZE_AUTO_WIDTH
= _core_
.SIZE_AUTO_WIDTH
130 SIZE_AUTO_HEIGHT
= _core_
.SIZE_AUTO_HEIGHT
131 SIZE_AUTO
= _core_
.SIZE_AUTO
132 SIZE_USE_EXISTING
= _core_
.SIZE_USE_EXISTING
133 SIZE_ALLOW_MINUS_ONE
= _core_
.SIZE_ALLOW_MINUS_ONE
134 PORTRAIT
= _core_
.PORTRAIT
135 LANDSCAPE
= _core_
.LANDSCAPE
136 PRINT_QUALITY_HIGH
= _core_
.PRINT_QUALITY_HIGH
137 PRINT_QUALITY_MEDIUM
= _core_
.PRINT_QUALITY_MEDIUM
138 PRINT_QUALITY_LOW
= _core_
.PRINT_QUALITY_LOW
139 PRINT_QUALITY_DRAFT
= _core_
.PRINT_QUALITY_DRAFT
140 ID_ANY
= _core_
.ID_ANY
141 ID_SEPARATOR
= _core_
.ID_SEPARATOR
142 ID_LOWEST
= _core_
.ID_LOWEST
143 ID_OPEN
= _core_
.ID_OPEN
144 ID_CLOSE
= _core_
.ID_CLOSE
145 ID_NEW
= _core_
.ID_NEW
146 ID_SAVE
= _core_
.ID_SAVE
147 ID_SAVEAS
= _core_
.ID_SAVEAS
148 ID_REVERT
= _core_
.ID_REVERT
149 ID_EXIT
= _core_
.ID_EXIT
150 ID_UNDO
= _core_
.ID_UNDO
151 ID_REDO
= _core_
.ID_REDO
152 ID_HELP
= _core_
.ID_HELP
153 ID_PRINT
= _core_
.ID_PRINT
154 ID_PRINT_SETUP
= _core_
.ID_PRINT_SETUP
155 ID_PREVIEW
= _core_
.ID_PREVIEW
156 ID_ABOUT
= _core_
.ID_ABOUT
157 ID_HELP_CONTENTS
= _core_
.ID_HELP_CONTENTS
158 ID_HELP_COMMANDS
= _core_
.ID_HELP_COMMANDS
159 ID_HELP_PROCEDURES
= _core_
.ID_HELP_PROCEDURES
160 ID_HELP_CONTEXT
= _core_
.ID_HELP_CONTEXT
161 ID_CLOSE_ALL
= _core_
.ID_CLOSE_ALL
162 ID_PREFERENCES
= _core_
.ID_PREFERENCES
163 ID_CUT
= _core_
.ID_CUT
164 ID_COPY
= _core_
.ID_COPY
165 ID_PASTE
= _core_
.ID_PASTE
166 ID_CLEAR
= _core_
.ID_CLEAR
167 ID_FIND
= _core_
.ID_FIND
168 ID_DUPLICATE
= _core_
.ID_DUPLICATE
169 ID_SELECTALL
= _core_
.ID_SELECTALL
170 ID_DELETE
= _core_
.ID_DELETE
171 ID_REPLACE
= _core_
.ID_REPLACE
172 ID_REPLACE_ALL
= _core_
.ID_REPLACE_ALL
173 ID_PROPERTIES
= _core_
.ID_PROPERTIES
174 ID_VIEW_DETAILS
= _core_
.ID_VIEW_DETAILS
175 ID_VIEW_LARGEICONS
= _core_
.ID_VIEW_LARGEICONS
176 ID_VIEW_SMALLICONS
= _core_
.ID_VIEW_SMALLICONS
177 ID_VIEW_LIST
= _core_
.ID_VIEW_LIST
178 ID_VIEW_SORTDATE
= _core_
.ID_VIEW_SORTDATE
179 ID_VIEW_SORTNAME
= _core_
.ID_VIEW_SORTNAME
180 ID_VIEW_SORTSIZE
= _core_
.ID_VIEW_SORTSIZE
181 ID_VIEW_SORTTYPE
= _core_
.ID_VIEW_SORTTYPE
182 ID_FILE1
= _core_
.ID_FILE1
183 ID_FILE2
= _core_
.ID_FILE2
184 ID_FILE3
= _core_
.ID_FILE3
185 ID_FILE4
= _core_
.ID_FILE4
186 ID_FILE5
= _core_
.ID_FILE5
187 ID_FILE6
= _core_
.ID_FILE6
188 ID_FILE7
= _core_
.ID_FILE7
189 ID_FILE8
= _core_
.ID_FILE8
190 ID_FILE9
= _core_
.ID_FILE9
192 ID_CANCEL
= _core_
.ID_CANCEL
193 ID_APPLY
= _core_
.ID_APPLY
194 ID_YES
= _core_
.ID_YES
196 ID_STATIC
= _core_
.ID_STATIC
197 ID_FORWARD
= _core_
.ID_FORWARD
198 ID_BACKWARD
= _core_
.ID_BACKWARD
199 ID_DEFAULT
= _core_
.ID_DEFAULT
200 ID_MORE
= _core_
.ID_MORE
201 ID_SETUP
= _core_
.ID_SETUP
202 ID_RESET
= _core_
.ID_RESET
203 ID_CONTEXT_HELP
= _core_
.ID_CONTEXT_HELP
204 ID_YESTOALL
= _core_
.ID_YESTOALL
205 ID_NOTOALL
= _core_
.ID_NOTOALL
206 ID_ABORT
= _core_
.ID_ABORT
207 ID_RETRY
= _core_
.ID_RETRY
208 ID_IGNORE
= _core_
.ID_IGNORE
209 ID_ADD
= _core_
.ID_ADD
210 ID_REMOVE
= _core_
.ID_REMOVE
212 ID_DOWN
= _core_
.ID_DOWN
213 ID_HOME
= _core_
.ID_HOME
214 ID_REFRESH
= _core_
.ID_REFRESH
215 ID_STOP
= _core_
.ID_STOP
216 ID_INDEX
= _core_
.ID_INDEX
217 ID_BOLD
= _core_
.ID_BOLD
218 ID_ITALIC
= _core_
.ID_ITALIC
219 ID_JUSTIFY_CENTER
= _core_
.ID_JUSTIFY_CENTER
220 ID_JUSTIFY_FILL
= _core_
.ID_JUSTIFY_FILL
221 ID_JUSTIFY_RIGHT
= _core_
.ID_JUSTIFY_RIGHT
222 ID_JUSTIFY_LEFT
= _core_
.ID_JUSTIFY_LEFT
223 ID_UNDERLINE
= _core_
.ID_UNDERLINE
224 ID_INDENT
= _core_
.ID_INDENT
225 ID_UNINDENT
= _core_
.ID_UNINDENT
226 ID_ZOOM_100
= _core_
.ID_ZOOM_100
227 ID_ZOOM_FIT
= _core_
.ID_ZOOM_FIT
228 ID_ZOOM_IN
= _core_
.ID_ZOOM_IN
229 ID_ZOOM_OUT
= _core_
.ID_ZOOM_OUT
230 ID_UNDELETE
= _core_
.ID_UNDELETE
231 ID_REVERT_TO_SAVED
= _core_
.ID_REVERT_TO_SAVED
232 ID_HIGHEST
= _core_
.ID_HIGHEST
235 HIDE_READONLY
= _core_
.HIDE_READONLY
236 OVERWRITE_PROMPT
= _core_
.OVERWRITE_PROMPT
237 FILE_MUST_EXIST
= _core_
.FILE_MUST_EXIST
238 MULTIPLE
= _core_
.MULTIPLE
239 CHANGE_DIR
= _core_
.CHANGE_DIR
240 ACCEL_ALT
= _core_
.ACCEL_ALT
241 ACCEL_CTRL
= _core_
.ACCEL_CTRL
242 ACCEL_SHIFT
= _core_
.ACCEL_SHIFT
243 ACCEL_NORMAL
= _core_
.ACCEL_NORMAL
244 PD_AUTO_HIDE
= _core_
.PD_AUTO_HIDE
245 PD_APP_MODAL
= _core_
.PD_APP_MODAL
246 PD_CAN_ABORT
= _core_
.PD_CAN_ABORT
247 PD_ELAPSED_TIME
= _core_
.PD_ELAPSED_TIME
248 PD_ESTIMATED_TIME
= _core_
.PD_ESTIMATED_TIME
249 PD_REMAINING_TIME
= _core_
.PD_REMAINING_TIME
250 DD_NEW_DIR_BUTTON
= _core_
.DD_NEW_DIR_BUTTON
251 DD_DEFAULT_STYLE
= _core_
.DD_DEFAULT_STYLE
252 MENU_TEAROFF
= _core_
.MENU_TEAROFF
253 MB_DOCKABLE
= _core_
.MB_DOCKABLE
254 NO_FULL_REPAINT_ON_RESIZE
= _core_
.NO_FULL_REPAINT_ON_RESIZE
255 FULL_REPAINT_ON_RESIZE
= _core_
.FULL_REPAINT_ON_RESIZE
256 LI_HORIZONTAL
= _core_
.LI_HORIZONTAL
257 LI_VERTICAL
= _core_
.LI_VERTICAL
258 WS_EX_VALIDATE_RECURSIVELY
= _core_
.WS_EX_VALIDATE_RECURSIVELY
259 WS_EX_BLOCK_EVENTS
= _core_
.WS_EX_BLOCK_EVENTS
260 WS_EX_TRANSIENT
= _core_
.WS_EX_TRANSIENT
261 WS_EX_THEMED_BACKGROUND
= _core_
.WS_EX_THEMED_BACKGROUND
262 WS_EX_PROCESS_IDLE
= _core_
.WS_EX_PROCESS_IDLE
263 WS_EX_PROCESS_UI_UPDATES
= _core_
.WS_EX_PROCESS_UI_UPDATES
264 MM_TEXT
= _core_
.MM_TEXT
265 MM_LOMETRIC
= _core_
.MM_LOMETRIC
266 MM_HIMETRIC
= _core_
.MM_HIMETRIC
267 MM_LOENGLISH
= _core_
.MM_LOENGLISH
268 MM_HIENGLISH
= _core_
.MM_HIENGLISH
269 MM_TWIPS
= _core_
.MM_TWIPS
270 MM_ISOTROPIC
= _core_
.MM_ISOTROPIC
271 MM_ANISOTROPIC
= _core_
.MM_ANISOTROPIC
272 MM_POINTS
= _core_
.MM_POINTS
273 MM_METRIC
= _core_
.MM_METRIC
274 CENTRE
= _core_
.CENTRE
275 CENTER
= _core_
.CENTER
276 HORIZONTAL
= _core_
.HORIZONTAL
277 VERTICAL
= _core_
.VERTICAL
284 BOTTOM
= _core_
.BOTTOM
290 ALIGN_NOT
= _core_
.ALIGN_NOT
291 ALIGN_CENTER_HORIZONTAL
= _core_
.ALIGN_CENTER_HORIZONTAL
292 ALIGN_CENTRE_HORIZONTAL
= _core_
.ALIGN_CENTRE_HORIZONTAL
293 ALIGN_LEFT
= _core_
.ALIGN_LEFT
294 ALIGN_TOP
= _core_
.ALIGN_TOP
295 ALIGN_RIGHT
= _core_
.ALIGN_RIGHT
296 ALIGN_BOTTOM
= _core_
.ALIGN_BOTTOM
297 ALIGN_CENTER_VERTICAL
= _core_
.ALIGN_CENTER_VERTICAL
298 ALIGN_CENTRE_VERTICAL
= _core_
.ALIGN_CENTRE_VERTICAL
299 ALIGN_CENTER
= _core_
.ALIGN_CENTER
300 ALIGN_CENTRE
= _core_
.ALIGN_CENTRE
301 ALIGN_MASK
= _core_
.ALIGN_MASK
302 STRETCH_NOT
= _core_
.STRETCH_NOT
303 SHRINK
= _core_
.SHRINK
305 EXPAND
= _core_
.EXPAND
306 SHAPED
= _core_
.SHAPED
307 FIXED_MINSIZE
= _core_
.FIXED_MINSIZE
309 ADJUST_MINSIZE
= _core_
.ADJUST_MINSIZE
310 BORDER_DEFAULT
= _core_
.BORDER_DEFAULT
311 BORDER_NONE
= _core_
.BORDER_NONE
312 BORDER_STATIC
= _core_
.BORDER_STATIC
313 BORDER_SIMPLE
= _core_
.BORDER_SIMPLE
314 BORDER_RAISED
= _core_
.BORDER_RAISED
315 BORDER_SUNKEN
= _core_
.BORDER_SUNKEN
316 BORDER_DOUBLE
= _core_
.BORDER_DOUBLE
317 BORDER_MASK
= _core_
.BORDER_MASK
318 BG_STYLE_SYSTEM
= _core_
.BG_STYLE_SYSTEM
319 BG_STYLE_COLOUR
= _core_
.BG_STYLE_COLOUR
320 BG_STYLE_CUSTOM
= _core_
.BG_STYLE_CUSTOM
321 DEFAULT
= _core_
.DEFAULT
322 DECORATIVE
= _core_
.DECORATIVE
324 SCRIPT
= _core_
.SCRIPT
326 MODERN
= _core_
.MODERN
327 TELETYPE
= _core_
.TELETYPE
328 VARIABLE
= _core_
.VARIABLE
330 NORMAL
= _core_
.NORMAL
333 ITALIC
= _core_
.ITALIC
337 LONG_DASH
= _core_
.LONG_DASH
338 SHORT_DASH
= _core_
.SHORT_DASH
339 DOT_DASH
= _core_
.DOT_DASH
340 USER_DASH
= _core_
.USER_DASH
341 TRANSPARENT
= _core_
.TRANSPARENT
342 STIPPLE
= _core_
.STIPPLE
343 BDIAGONAL_HATCH
= _core_
.BDIAGONAL_HATCH
344 CROSSDIAG_HATCH
= _core_
.CROSSDIAG_HATCH
345 FDIAGONAL_HATCH
= _core_
.FDIAGONAL_HATCH
346 CROSS_HATCH
= _core_
.CROSS_HATCH
347 HORIZONTAL_HATCH
= _core_
.HORIZONTAL_HATCH
348 VERTICAL_HATCH
= _core_
.VERTICAL_HATCH
349 JOIN_BEVEL
= _core_
.JOIN_BEVEL
350 JOIN_MITER
= _core_
.JOIN_MITER
351 JOIN_ROUND
= _core_
.JOIN_ROUND
352 CAP_ROUND
= _core_
.CAP_ROUND
353 CAP_PROJECTING
= _core_
.CAP_PROJECTING
354 CAP_BUTT
= _core_
.CAP_BUTT
357 INVERT
= _core_
.INVERT
358 OR_REVERSE
= _core_
.OR_REVERSE
359 AND_REVERSE
= _core_
.AND_REVERSE
362 AND_INVERT
= _core_
.AND_INVERT
366 SRC_INVERT
= _core_
.SRC_INVERT
367 OR_INVERT
= _core_
.OR_INVERT
371 WXK_BACK
= _core_
.WXK_BACK
372 WXK_TAB
= _core_
.WXK_TAB
373 WXK_RETURN
= _core_
.WXK_RETURN
374 WXK_ESCAPE
= _core_
.WXK_ESCAPE
375 WXK_SPACE
= _core_
.WXK_SPACE
376 WXK_DELETE
= _core_
.WXK_DELETE
377 WXK_START
= _core_
.WXK_START
378 WXK_LBUTTON
= _core_
.WXK_LBUTTON
379 WXK_RBUTTON
= _core_
.WXK_RBUTTON
380 WXK_CANCEL
= _core_
.WXK_CANCEL
381 WXK_MBUTTON
= _core_
.WXK_MBUTTON
382 WXK_CLEAR
= _core_
.WXK_CLEAR
383 WXK_SHIFT
= _core_
.WXK_SHIFT
384 WXK_ALT
= _core_
.WXK_ALT
385 WXK_CONTROL
= _core_
.WXK_CONTROL
386 WXK_MENU
= _core_
.WXK_MENU
387 WXK_PAUSE
= _core_
.WXK_PAUSE
388 WXK_CAPITAL
= _core_
.WXK_CAPITAL
389 WXK_PRIOR
= _core_
.WXK_PRIOR
390 WXK_NEXT
= _core_
.WXK_NEXT
391 WXK_END
= _core_
.WXK_END
392 WXK_HOME
= _core_
.WXK_HOME
393 WXK_LEFT
= _core_
.WXK_LEFT
394 WXK_UP
= _core_
.WXK_UP
395 WXK_RIGHT
= _core_
.WXK_RIGHT
396 WXK_DOWN
= _core_
.WXK_DOWN
397 WXK_SELECT
= _core_
.WXK_SELECT
398 WXK_PRINT
= _core_
.WXK_PRINT
399 WXK_EXECUTE
= _core_
.WXK_EXECUTE
400 WXK_SNAPSHOT
= _core_
.WXK_SNAPSHOT
401 WXK_INSERT
= _core_
.WXK_INSERT
402 WXK_HELP
= _core_
.WXK_HELP
403 WXK_NUMPAD0
= _core_
.WXK_NUMPAD0
404 WXK_NUMPAD1
= _core_
.WXK_NUMPAD1
405 WXK_NUMPAD2
= _core_
.WXK_NUMPAD2
406 WXK_NUMPAD3
= _core_
.WXK_NUMPAD3
407 WXK_NUMPAD4
= _core_
.WXK_NUMPAD4
408 WXK_NUMPAD5
= _core_
.WXK_NUMPAD5
409 WXK_NUMPAD6
= _core_
.WXK_NUMPAD6
410 WXK_NUMPAD7
= _core_
.WXK_NUMPAD7
411 WXK_NUMPAD8
= _core_
.WXK_NUMPAD8
412 WXK_NUMPAD9
= _core_
.WXK_NUMPAD9
413 WXK_MULTIPLY
= _core_
.WXK_MULTIPLY
414 WXK_ADD
= _core_
.WXK_ADD
415 WXK_SEPARATOR
= _core_
.WXK_SEPARATOR
416 WXK_SUBTRACT
= _core_
.WXK_SUBTRACT
417 WXK_DECIMAL
= _core_
.WXK_DECIMAL
418 WXK_DIVIDE
= _core_
.WXK_DIVIDE
419 WXK_F1
= _core_
.WXK_F1
420 WXK_F2
= _core_
.WXK_F2
421 WXK_F3
= _core_
.WXK_F3
422 WXK_F4
= _core_
.WXK_F4
423 WXK_F5
= _core_
.WXK_F5
424 WXK_F6
= _core_
.WXK_F6
425 WXK_F7
= _core_
.WXK_F7
426 WXK_F8
= _core_
.WXK_F8
427 WXK_F9
= _core_
.WXK_F9
428 WXK_F10
= _core_
.WXK_F10
429 WXK_F11
= _core_
.WXK_F11
430 WXK_F12
= _core_
.WXK_F12
431 WXK_F13
= _core_
.WXK_F13
432 WXK_F14
= _core_
.WXK_F14
433 WXK_F15
= _core_
.WXK_F15
434 WXK_F16
= _core_
.WXK_F16
435 WXK_F17
= _core_
.WXK_F17
436 WXK_F18
= _core_
.WXK_F18
437 WXK_F19
= _core_
.WXK_F19
438 WXK_F20
= _core_
.WXK_F20
439 WXK_F21
= _core_
.WXK_F21
440 WXK_F22
= _core_
.WXK_F22
441 WXK_F23
= _core_
.WXK_F23
442 WXK_F24
= _core_
.WXK_F24
443 WXK_NUMLOCK
= _core_
.WXK_NUMLOCK
444 WXK_SCROLL
= _core_
.WXK_SCROLL
445 WXK_PAGEUP
= _core_
.WXK_PAGEUP
446 WXK_PAGEDOWN
= _core_
.WXK_PAGEDOWN
447 WXK_NUMPAD_SPACE
= _core_
.WXK_NUMPAD_SPACE
448 WXK_NUMPAD_TAB
= _core_
.WXK_NUMPAD_TAB
449 WXK_NUMPAD_ENTER
= _core_
.WXK_NUMPAD_ENTER
450 WXK_NUMPAD_F1
= _core_
.WXK_NUMPAD_F1
451 WXK_NUMPAD_F2
= _core_
.WXK_NUMPAD_F2
452 WXK_NUMPAD_F3
= _core_
.WXK_NUMPAD_F3
453 WXK_NUMPAD_F4
= _core_
.WXK_NUMPAD_F4
454 WXK_NUMPAD_HOME
= _core_
.WXK_NUMPAD_HOME
455 WXK_NUMPAD_LEFT
= _core_
.WXK_NUMPAD_LEFT
456 WXK_NUMPAD_UP
= _core_
.WXK_NUMPAD_UP
457 WXK_NUMPAD_RIGHT
= _core_
.WXK_NUMPAD_RIGHT
458 WXK_NUMPAD_DOWN
= _core_
.WXK_NUMPAD_DOWN
459 WXK_NUMPAD_PRIOR
= _core_
.WXK_NUMPAD_PRIOR
460 WXK_NUMPAD_PAGEUP
= _core_
.WXK_NUMPAD_PAGEUP
461 WXK_NUMPAD_NEXT
= _core_
.WXK_NUMPAD_NEXT
462 WXK_NUMPAD_PAGEDOWN
= _core_
.WXK_NUMPAD_PAGEDOWN
463 WXK_NUMPAD_END
= _core_
.WXK_NUMPAD_END
464 WXK_NUMPAD_BEGIN
= _core_
.WXK_NUMPAD_BEGIN
465 WXK_NUMPAD_INSERT
= _core_
.WXK_NUMPAD_INSERT
466 WXK_NUMPAD_DELETE
= _core_
.WXK_NUMPAD_DELETE
467 WXK_NUMPAD_EQUAL
= _core_
.WXK_NUMPAD_EQUAL
468 WXK_NUMPAD_MULTIPLY
= _core_
.WXK_NUMPAD_MULTIPLY
469 WXK_NUMPAD_ADD
= _core_
.WXK_NUMPAD_ADD
470 WXK_NUMPAD_SEPARATOR
= _core_
.WXK_NUMPAD_SEPARATOR
471 WXK_NUMPAD_SUBTRACT
= _core_
.WXK_NUMPAD_SUBTRACT
472 WXK_NUMPAD_DECIMAL
= _core_
.WXK_NUMPAD_DECIMAL
473 WXK_NUMPAD_DIVIDE
= _core_
.WXK_NUMPAD_DIVIDE
474 WXK_WINDOWS_LEFT
= _core_
.WXK_WINDOWS_LEFT
475 WXK_WINDOWS_RIGHT
= _core_
.WXK_WINDOWS_RIGHT
476 WXK_WINDOWS_MENU
= _core_
.WXK_WINDOWS_MENU
477 PAPER_NONE
= _core_
.PAPER_NONE
478 PAPER_LETTER
= _core_
.PAPER_LETTER
479 PAPER_LEGAL
= _core_
.PAPER_LEGAL
480 PAPER_A4
= _core_
.PAPER_A4
481 PAPER_CSHEET
= _core_
.PAPER_CSHEET
482 PAPER_DSHEET
= _core_
.PAPER_DSHEET
483 PAPER_ESHEET
= _core_
.PAPER_ESHEET
484 PAPER_LETTERSMALL
= _core_
.PAPER_LETTERSMALL
485 PAPER_TABLOID
= _core_
.PAPER_TABLOID
486 PAPER_LEDGER
= _core_
.PAPER_LEDGER
487 PAPER_STATEMENT
= _core_
.PAPER_STATEMENT
488 PAPER_EXECUTIVE
= _core_
.PAPER_EXECUTIVE
489 PAPER_A3
= _core_
.PAPER_A3
490 PAPER_A4SMALL
= _core_
.PAPER_A4SMALL
491 PAPER_A5
= _core_
.PAPER_A5
492 PAPER_B4
= _core_
.PAPER_B4
493 PAPER_B5
= _core_
.PAPER_B5
494 PAPER_FOLIO
= _core_
.PAPER_FOLIO
495 PAPER_QUARTO
= _core_
.PAPER_QUARTO
496 PAPER_10X14
= _core_
.PAPER_10X14
497 PAPER_11X17
= _core_
.PAPER_11X17
498 PAPER_NOTE
= _core_
.PAPER_NOTE
499 PAPER_ENV_9
= _core_
.PAPER_ENV_9
500 PAPER_ENV_10
= _core_
.PAPER_ENV_10
501 PAPER_ENV_11
= _core_
.PAPER_ENV_11
502 PAPER_ENV_12
= _core_
.PAPER_ENV_12
503 PAPER_ENV_14
= _core_
.PAPER_ENV_14
504 PAPER_ENV_DL
= _core_
.PAPER_ENV_DL
505 PAPER_ENV_C5
= _core_
.PAPER_ENV_C5
506 PAPER_ENV_C3
= _core_
.PAPER_ENV_C3
507 PAPER_ENV_C4
= _core_
.PAPER_ENV_C4
508 PAPER_ENV_C6
= _core_
.PAPER_ENV_C6
509 PAPER_ENV_C65
= _core_
.PAPER_ENV_C65
510 PAPER_ENV_B4
= _core_
.PAPER_ENV_B4
511 PAPER_ENV_B5
= _core_
.PAPER_ENV_B5
512 PAPER_ENV_B6
= _core_
.PAPER_ENV_B6
513 PAPER_ENV_ITALY
= _core_
.PAPER_ENV_ITALY
514 PAPER_ENV_MONARCH
= _core_
.PAPER_ENV_MONARCH
515 PAPER_ENV_PERSONAL
= _core_
.PAPER_ENV_PERSONAL
516 PAPER_FANFOLD_US
= _core_
.PAPER_FANFOLD_US
517 PAPER_FANFOLD_STD_GERMAN
= _core_
.PAPER_FANFOLD_STD_GERMAN
518 PAPER_FANFOLD_LGL_GERMAN
= _core_
.PAPER_FANFOLD_LGL_GERMAN
519 PAPER_ISO_B4
= _core_
.PAPER_ISO_B4
520 PAPER_JAPANESE_POSTCARD
= _core_
.PAPER_JAPANESE_POSTCARD
521 PAPER_9X11
= _core_
.PAPER_9X11
522 PAPER_10X11
= _core_
.PAPER_10X11
523 PAPER_15X11
= _core_
.PAPER_15X11
524 PAPER_ENV_INVITE
= _core_
.PAPER_ENV_INVITE
525 PAPER_LETTER_EXTRA
= _core_
.PAPER_LETTER_EXTRA
526 PAPER_LEGAL_EXTRA
= _core_
.PAPER_LEGAL_EXTRA
527 PAPER_TABLOID_EXTRA
= _core_
.PAPER_TABLOID_EXTRA
528 PAPER_A4_EXTRA
= _core_
.PAPER_A4_EXTRA
529 PAPER_LETTER_TRANSVERSE
= _core_
.PAPER_LETTER_TRANSVERSE
530 PAPER_A4_TRANSVERSE
= _core_
.PAPER_A4_TRANSVERSE
531 PAPER_LETTER_EXTRA_TRANSVERSE
= _core_
.PAPER_LETTER_EXTRA_TRANSVERSE
532 PAPER_A_PLUS
= _core_
.PAPER_A_PLUS
533 PAPER_B_PLUS
= _core_
.PAPER_B_PLUS
534 PAPER_LETTER_PLUS
= _core_
.PAPER_LETTER_PLUS
535 PAPER_A4_PLUS
= _core_
.PAPER_A4_PLUS
536 PAPER_A5_TRANSVERSE
= _core_
.PAPER_A5_TRANSVERSE
537 PAPER_B5_TRANSVERSE
= _core_
.PAPER_B5_TRANSVERSE
538 PAPER_A3_EXTRA
= _core_
.PAPER_A3_EXTRA
539 PAPER_A5_EXTRA
= _core_
.PAPER_A5_EXTRA
540 PAPER_B5_EXTRA
= _core_
.PAPER_B5_EXTRA
541 PAPER_A2
= _core_
.PAPER_A2
542 PAPER_A3_TRANSVERSE
= _core_
.PAPER_A3_TRANSVERSE
543 PAPER_A3_EXTRA_TRANSVERSE
= _core_
.PAPER_A3_EXTRA_TRANSVERSE
544 DUPLEX_SIMPLEX
= _core_
.DUPLEX_SIMPLEX
545 DUPLEX_HORIZONTAL
= _core_
.DUPLEX_HORIZONTAL
546 DUPLEX_VERTICAL
= _core_
.DUPLEX_VERTICAL
547 ITEM_SEPARATOR
= _core_
.ITEM_SEPARATOR
548 ITEM_NORMAL
= _core_
.ITEM_NORMAL
549 ITEM_CHECK
= _core_
.ITEM_CHECK
550 ITEM_RADIO
= _core_
.ITEM_RADIO
551 ITEM_MAX
= _core_
.ITEM_MAX
552 HT_NOWHERE
= _core_
.HT_NOWHERE
553 HT_SCROLLBAR_FIRST
= _core_
.HT_SCROLLBAR_FIRST
554 HT_SCROLLBAR_ARROW_LINE_1
= _core_
.HT_SCROLLBAR_ARROW_LINE_1
555 HT_SCROLLBAR_ARROW_LINE_2
= _core_
.HT_SCROLLBAR_ARROW_LINE_2
556 HT_SCROLLBAR_ARROW_PAGE_1
= _core_
.HT_SCROLLBAR_ARROW_PAGE_1
557 HT_SCROLLBAR_ARROW_PAGE_2
= _core_
.HT_SCROLLBAR_ARROW_PAGE_2
558 HT_SCROLLBAR_THUMB
= _core_
.HT_SCROLLBAR_THUMB
559 HT_SCROLLBAR_BAR_1
= _core_
.HT_SCROLLBAR_BAR_1
560 HT_SCROLLBAR_BAR_2
= _core_
.HT_SCROLLBAR_BAR_2
561 HT_SCROLLBAR_LAST
= _core_
.HT_SCROLLBAR_LAST
562 HT_WINDOW_OUTSIDE
= _core_
.HT_WINDOW_OUTSIDE
563 HT_WINDOW_INSIDE
= _core_
.HT_WINDOW_INSIDE
564 HT_WINDOW_VERT_SCROLLBAR
= _core_
.HT_WINDOW_VERT_SCROLLBAR
565 HT_WINDOW_HORZ_SCROLLBAR
= _core_
.HT_WINDOW_HORZ_SCROLLBAR
566 HT_WINDOW_CORNER
= _core_
.HT_WINDOW_CORNER
567 HT_MAX
= _core_
.HT_MAX
568 MOD_NONE
= _core_
.MOD_NONE
569 MOD_ALT
= _core_
.MOD_ALT
570 MOD_CONTROL
= _core_
.MOD_CONTROL
571 MOD_SHIFT
= _core_
.MOD_SHIFT
572 MOD_WIN
= _core_
.MOD_WIN
573 UPDATE_UI_NONE
= _core_
.UPDATE_UI_NONE
574 UPDATE_UI_RECURSE
= _core_
.UPDATE_UI_RECURSE
575 UPDATE_UI_FROMIDLE
= _core_
.UPDATE_UI_FROMIDLE
576 #---------------------------------------------------------------------------
578 class Object(object):
580 The base class for most wx objects, although in wxPython not
581 much functionality is needed nor exposed.
583 def __init__(self
): raise RuntimeError, "No constructor defined"
585 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
586 def GetClassName(*args
, **kwargs
):
588 GetClassName(self) -> String
590 Returns the class name of the C++ class using wxRTTI.
592 return _core_
.Object_GetClassName(*args
, **kwargs
)
594 def Destroy(*args
, **kwargs
):
598 Deletes the C++ object this Python object is a proxy for.
600 return _core_
.Object_Destroy(*args
, **kwargs
)
603 class ObjectPtr(Object
):
604 def __init__(self
, this
):
606 if not hasattr(self
,"thisown"): self
.thisown
= 0
607 self
.__class
__ = Object
608 _core_
.Object_swigregister(ObjectPtr
)
609 _wxPySetDictionary
= _core_
._wxPySetDictionary
611 _wxPyFixStockObjects
= _core_
._wxPyFixStockObjects
614 EmptyString
= cvar
.EmptyString
616 #---------------------------------------------------------------------------
618 BITMAP_TYPE_INVALID
= _core_
.BITMAP_TYPE_INVALID
619 BITMAP_TYPE_BMP
= _core_
.BITMAP_TYPE_BMP
620 BITMAP_TYPE_ICO
= _core_
.BITMAP_TYPE_ICO
621 BITMAP_TYPE_CUR
= _core_
.BITMAP_TYPE_CUR
622 BITMAP_TYPE_XBM
= _core_
.BITMAP_TYPE_XBM
623 BITMAP_TYPE_XBM_DATA
= _core_
.BITMAP_TYPE_XBM_DATA
624 BITMAP_TYPE_XPM
= _core_
.BITMAP_TYPE_XPM
625 BITMAP_TYPE_XPM_DATA
= _core_
.BITMAP_TYPE_XPM_DATA
626 BITMAP_TYPE_TIF
= _core_
.BITMAP_TYPE_TIF
627 BITMAP_TYPE_GIF
= _core_
.BITMAP_TYPE_GIF
628 BITMAP_TYPE_PNG
= _core_
.BITMAP_TYPE_PNG
629 BITMAP_TYPE_JPEG
= _core_
.BITMAP_TYPE_JPEG
630 BITMAP_TYPE_PNM
= _core_
.BITMAP_TYPE_PNM
631 BITMAP_TYPE_PCX
= _core_
.BITMAP_TYPE_PCX
632 BITMAP_TYPE_PICT
= _core_
.BITMAP_TYPE_PICT
633 BITMAP_TYPE_ICON
= _core_
.BITMAP_TYPE_ICON
634 BITMAP_TYPE_ANI
= _core_
.BITMAP_TYPE_ANI
635 BITMAP_TYPE_IFF
= _core_
.BITMAP_TYPE_IFF
636 BITMAP_TYPE_MACCURSOR
= _core_
.BITMAP_TYPE_MACCURSOR
637 BITMAP_TYPE_ANY
= _core_
.BITMAP_TYPE_ANY
638 CURSOR_NONE
= _core_
.CURSOR_NONE
639 CURSOR_ARROW
= _core_
.CURSOR_ARROW
640 CURSOR_RIGHT_ARROW
= _core_
.CURSOR_RIGHT_ARROW
641 CURSOR_BULLSEYE
= _core_
.CURSOR_BULLSEYE
642 CURSOR_CHAR
= _core_
.CURSOR_CHAR
643 CURSOR_CROSS
= _core_
.CURSOR_CROSS
644 CURSOR_HAND
= _core_
.CURSOR_HAND
645 CURSOR_IBEAM
= _core_
.CURSOR_IBEAM
646 CURSOR_LEFT_BUTTON
= _core_
.CURSOR_LEFT_BUTTON
647 CURSOR_MAGNIFIER
= _core_
.CURSOR_MAGNIFIER
648 CURSOR_MIDDLE_BUTTON
= _core_
.CURSOR_MIDDLE_BUTTON
649 CURSOR_NO_ENTRY
= _core_
.CURSOR_NO_ENTRY
650 CURSOR_PAINT_BRUSH
= _core_
.CURSOR_PAINT_BRUSH
651 CURSOR_PENCIL
= _core_
.CURSOR_PENCIL
652 CURSOR_POINT_LEFT
= _core_
.CURSOR_POINT_LEFT
653 CURSOR_POINT_RIGHT
= _core_
.CURSOR_POINT_RIGHT
654 CURSOR_QUESTION_ARROW
= _core_
.CURSOR_QUESTION_ARROW
655 CURSOR_RIGHT_BUTTON
= _core_
.CURSOR_RIGHT_BUTTON
656 CURSOR_SIZENESW
= _core_
.CURSOR_SIZENESW
657 CURSOR_SIZENS
= _core_
.CURSOR_SIZENS
658 CURSOR_SIZENWSE
= _core_
.CURSOR_SIZENWSE
659 CURSOR_SIZEWE
= _core_
.CURSOR_SIZEWE
660 CURSOR_SIZING
= _core_
.CURSOR_SIZING
661 CURSOR_SPRAYCAN
= _core_
.CURSOR_SPRAYCAN
662 CURSOR_WAIT
= _core_
.CURSOR_WAIT
663 CURSOR_WATCH
= _core_
.CURSOR_WATCH
664 CURSOR_BLANK
= _core_
.CURSOR_BLANK
665 CURSOR_DEFAULT
= _core_
.CURSOR_DEFAULT
666 CURSOR_COPY_ARROW
= _core_
.CURSOR_COPY_ARROW
667 CURSOR_ARROWWAIT
= _core_
.CURSOR_ARROWWAIT
668 CURSOR_MAX
= _core_
.CURSOR_MAX
669 #---------------------------------------------------------------------------
673 wx.Size is a useful data structure used to represent the size of
674 something. It simply contians integer width and height proprtites.
675 In most places in wxPython where a wx.Size is expected a
676 (width,height) tuple can be used instead.
679 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
680 width
= property(_core_
.Size_width_get
, _core_
.Size_width_set
)
681 height
= property(_core_
.Size_height_get
, _core_
.Size_height_set
)
682 x
= width
; y
= height
683 def __init__(self
, *args
, **kwargs
):
685 __init__(self, int w=0, int h=0) -> Size
687 Creates a size object.
689 newobj
= _core_
.new_Size(*args
, **kwargs
)
690 self
.this
= newobj
.this
693 def __del__(self
, destroy
=_core_
.delete_Size
):
696 if self
.thisown
: destroy(self
)
699 def __eq__(*args
, **kwargs
):
701 __eq__(self, Size sz) -> bool
703 Test for equality of wx.Size objects.
705 return _core_
.Size___eq__(*args
, **kwargs
)
707 def __ne__(*args
, **kwargs
):
709 __ne__(self, Size sz) -> bool
713 return _core_
.Size___ne__(*args
, **kwargs
)
715 def __add__(*args
, **kwargs
):
717 __add__(self, Size sz) -> Size
719 Add sz's proprties to this and return the result.
721 return _core_
.Size___add__(*args
, **kwargs
)
723 def __sub__(*args
, **kwargs
):
725 __sub__(self, Size sz) -> Size
727 Subtract sz's properties from this and return the result.
729 return _core_
.Size___sub__(*args
, **kwargs
)
731 def IncTo(*args
, **kwargs
):
735 Increments this object so that both of its dimensions are not less
736 than the corresponding dimensions of the size.
738 return _core_
.Size_IncTo(*args
, **kwargs
)
740 def DecTo(*args
, **kwargs
):
744 Decrements this object so that both of its dimensions are not greater
745 than the corresponding dimensions of the size.
747 return _core_
.Size_DecTo(*args
, **kwargs
)
749 def Set(*args
, **kwargs
):
751 Set(self, int w, int h)
753 Set both width and height.
755 return _core_
.Size_Set(*args
, **kwargs
)
757 def SetWidth(*args
, **kwargs
):
758 """SetWidth(self, int w)"""
759 return _core_
.Size_SetWidth(*args
, **kwargs
)
761 def SetHeight(*args
, **kwargs
):
762 """SetHeight(self, int h)"""
763 return _core_
.Size_SetHeight(*args
, **kwargs
)
765 def GetWidth(*args
, **kwargs
):
766 """GetWidth(self) -> int"""
767 return _core_
.Size_GetWidth(*args
, **kwargs
)
769 def GetHeight(*args
, **kwargs
):
770 """GetHeight(self) -> int"""
771 return _core_
.Size_GetHeight(*args
, **kwargs
)
773 def IsFullySpecified(*args
, **kwargs
):
775 IsFullySpecified(self) -> bool
777 Returns True if both components of the size are non-default values.
779 return _core_
.Size_IsFullySpecified(*args
, **kwargs
)
781 def SetDefaults(*args
, **kwargs
):
783 SetDefaults(self, Size size)
785 Combine this size with the other one replacing the default components
786 of this object (i.e. equal to -1) with those of the other.
788 return _core_
.Size_SetDefaults(*args
, **kwargs
)
790 def Get(*args
, **kwargs
):
792 Get() -> (width,height)
794 Returns the width and height properties as a tuple.
796 return _core_
.Size_Get(*args
, **kwargs
)
798 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
799 def __str__(self
): return str(self
.Get())
800 def __repr__(self
): return 'wx.Size'+str(self
.Get())
801 def __len__(self
): return len(self
.Get())
802 def __getitem__(self
, index
): return self
.Get()[index
]
803 def __setitem__(self
, index
, val
):
804 if index
== 0: self
.width
= val
805 elif index
== 1: self
.height
= val
806 else: raise IndexError
807 def __nonzero__(self
): return self
.Get() != (0,0)
808 __safe_for_unpickling__
= True
809 def __reduce__(self
): return (wx
.Size
, self
.Get())
813 def __init__(self
, this
):
815 if not hasattr(self
,"thisown"): self
.thisown
= 0
816 self
.__class
__ = Size
817 _core_
.Size_swigregister(SizePtr
)
819 #---------------------------------------------------------------------------
821 class RealPoint(object):
823 A data structure for representing a point or position with floating
824 point x and y properties. In wxPython most places that expect a
825 wx.RealPoint can also accept a (x,y) tuple.
828 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
829 x
= property(_core_
.RealPoint_x_get
, _core_
.RealPoint_x_set
)
830 y
= property(_core_
.RealPoint_y_get
, _core_
.RealPoint_y_set
)
831 def __init__(self
, *args
, **kwargs
):
833 __init__(self, double x=0.0, double y=0.0) -> RealPoint
835 Create a wx.RealPoint object
837 newobj
= _core_
.new_RealPoint(*args
, **kwargs
)
838 self
.this
= newobj
.this
841 def __del__(self
, destroy
=_core_
.delete_RealPoint
):
844 if self
.thisown
: destroy(self
)
847 def __eq__(*args
, **kwargs
):
849 __eq__(self, RealPoint pt) -> bool
851 Test for equality of wx.RealPoint objects.
853 return _core_
.RealPoint___eq__(*args
, **kwargs
)
855 def __ne__(*args
, **kwargs
):
857 __ne__(self, RealPoint pt) -> bool
859 Test for inequality of wx.RealPoint objects.
861 return _core_
.RealPoint___ne__(*args
, **kwargs
)
863 def __add__(*args
, **kwargs
):
865 __add__(self, RealPoint pt) -> RealPoint
867 Add pt's proprties to this and return the result.
869 return _core_
.RealPoint___add__(*args
, **kwargs
)
871 def __sub__(*args
, **kwargs
):
873 __sub__(self, RealPoint pt) -> RealPoint
875 Subtract pt's proprties from this and return the result
877 return _core_
.RealPoint___sub__(*args
, **kwargs
)
879 def Set(*args
, **kwargs
):
881 Set(self, double x, double y)
883 Set both the x and y properties
885 return _core_
.RealPoint_Set(*args
, **kwargs
)
887 def Get(*args
, **kwargs
):
891 Return the x and y properties as a tuple.
893 return _core_
.RealPoint_Get(*args
, **kwargs
)
895 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
896 def __str__(self
): return str(self
.Get())
897 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
898 def __len__(self
): return len(self
.Get())
899 def __getitem__(self
, index
): return self
.Get()[index
]
900 def __setitem__(self
, index
, val
):
901 if index
== 0: self
.x
= val
902 elif index
== 1: self
.y
= val
903 else: raise IndexError
904 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
905 __safe_for_unpickling__
= True
906 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
909 class RealPointPtr(RealPoint
):
910 def __init__(self
, this
):
912 if not hasattr(self
,"thisown"): self
.thisown
= 0
913 self
.__class
__ = RealPoint
914 _core_
.RealPoint_swigregister(RealPointPtr
)
916 #---------------------------------------------------------------------------
920 A data structure for representing a point or position with integer x
921 and y properties. Most places in wxPython that expect a wx.Point can
922 also accept a (x,y) tuple.
925 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
926 x
= property(_core_
.Point_x_get
, _core_
.Point_x_set
)
927 y
= property(_core_
.Point_y_get
, _core_
.Point_y_set
)
928 def __init__(self
, *args
, **kwargs
):
930 __init__(self, int x=0, int y=0) -> Point
932 Create a wx.Point object
934 newobj
= _core_
.new_Point(*args
, **kwargs
)
935 self
.this
= newobj
.this
938 def __del__(self
, destroy
=_core_
.delete_Point
):
941 if self
.thisown
: destroy(self
)
944 def __eq__(*args
, **kwargs
):
946 __eq__(self, Point pt) -> bool
948 Test for equality of wx.Point objects.
950 return _core_
.Point___eq__(*args
, **kwargs
)
952 def __ne__(*args
, **kwargs
):
954 __ne__(self, Point pt) -> bool
956 Test for inequality of wx.Point objects.
958 return _core_
.Point___ne__(*args
, **kwargs
)
960 def __add__(*args
, **kwargs
):
962 __add__(self, Point pt) -> Point
964 Add pt's proprties to this and return the result.
966 return _core_
.Point___add__(*args
, **kwargs
)
968 def __sub__(*args
, **kwargs
):
970 __sub__(self, Point pt) -> Point
972 Subtract pt's proprties from this and return the result
974 return _core_
.Point___sub__(*args
, **kwargs
)
976 def __iadd__(*args
, **kwargs
):
978 __iadd__(self, Point pt) -> Point
980 Add pt to this object.
982 return _core_
.Point___iadd__(*args
, **kwargs
)
984 def __isub__(*args
, **kwargs
):
986 __isub__(self, Point pt) -> Point
988 Subtract pt from this object.
990 return _core_
.Point___isub__(*args
, **kwargs
)
992 def Set(*args
, **kwargs
):
994 Set(self, long x, long y)
996 Set both the x and y properties
998 return _core_
.Point_Set(*args
, **kwargs
)
1000 def Get(*args
, **kwargs
):
1004 Return the x and y properties as a tuple.
1006 return _core_
.Point_Get(*args
, **kwargs
)
1008 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1009 def __str__(self
): return str(self
.Get())
1010 def __repr__(self
): return 'wx.Point'+str(self
.Get())
1011 def __len__(self
): return len(self
.Get())
1012 def __getitem__(self
, index
): return self
.Get()[index
]
1013 def __setitem__(self
, index
, val
):
1014 if index
== 0: self
.x
= val
1015 elif index
== 1: self
.y
= val
1016 else: raise IndexError
1017 def __nonzero__(self
): return self
.Get() != (0,0)
1018 __safe_for_unpickling__
= True
1019 def __reduce__(self
): return (wx
.Point
, self
.Get())
1022 class PointPtr(Point
):
1023 def __init__(self
, this
):
1025 if not hasattr(self
,"thisown"): self
.thisown
= 0
1026 self
.__class
__ = Point
1027 _core_
.Point_swigregister(PointPtr
)
1029 #---------------------------------------------------------------------------
1033 A class for representing and manipulating rectangles. It has x, y,
1034 width and height properties. In wxPython most palces that expect a
1035 wx.Rect can also accept a (x,y,width,height) tuple.
1038 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1039 def __init__(self
, *args
, **kwargs
):
1041 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1043 Create a new Rect object.
1045 newobj
= _core_
.new_Rect(*args
, **kwargs
)
1046 self
.this
= newobj
.this
1049 def __del__(self
, destroy
=_core_
.delete_Rect
):
1052 if self
.thisown
: destroy(self
)
1055 def GetX(*args
, **kwargs
):
1056 """GetX(self) -> int"""
1057 return _core_
.Rect_GetX(*args
, **kwargs
)
1059 def SetX(*args
, **kwargs
):
1060 """SetX(self, int x)"""
1061 return _core_
.Rect_SetX(*args
, **kwargs
)
1063 def GetY(*args
, **kwargs
):
1064 """GetY(self) -> int"""
1065 return _core_
.Rect_GetY(*args
, **kwargs
)
1067 def SetY(*args
, **kwargs
):
1068 """SetY(self, int y)"""
1069 return _core_
.Rect_SetY(*args
, **kwargs
)
1071 def GetWidth(*args
, **kwargs
):
1072 """GetWidth(self) -> int"""
1073 return _core_
.Rect_GetWidth(*args
, **kwargs
)
1075 def SetWidth(*args
, **kwargs
):
1076 """SetWidth(self, int w)"""
1077 return _core_
.Rect_SetWidth(*args
, **kwargs
)
1079 def GetHeight(*args
, **kwargs
):
1080 """GetHeight(self) -> int"""
1081 return _core_
.Rect_GetHeight(*args
, **kwargs
)
1083 def SetHeight(*args
, **kwargs
):
1084 """SetHeight(self, int h)"""
1085 return _core_
.Rect_SetHeight(*args
, **kwargs
)
1087 def GetPosition(*args
, **kwargs
):
1088 """GetPosition(self) -> Point"""
1089 return _core_
.Rect_GetPosition(*args
, **kwargs
)
1091 def SetPosition(*args
, **kwargs
):
1092 """SetPosition(self, Point p)"""
1093 return _core_
.Rect_SetPosition(*args
, **kwargs
)
1095 def GetSize(*args
, **kwargs
):
1096 """GetSize(self) -> Size"""
1097 return _core_
.Rect_GetSize(*args
, **kwargs
)
1099 def SetSize(*args
, **kwargs
):
1100 """SetSize(self, Size s)"""
1101 return _core_
.Rect_SetSize(*args
, **kwargs
)
1103 def GetTopLeft(*args
, **kwargs
):
1104 """GetTopLeft(self) -> Point"""
1105 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1107 def SetTopLeft(*args
, **kwargs
):
1108 """SetTopLeft(self, Point p)"""
1109 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1111 def GetBottomRight(*args
, **kwargs
):
1112 """GetBottomRight(self) -> Point"""
1113 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1115 def SetBottomRight(*args
, **kwargs
):
1116 """SetBottomRight(self, Point p)"""
1117 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1119 def GetLeft(*args
, **kwargs
):
1120 """GetLeft(self) -> int"""
1121 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1123 def GetTop(*args
, **kwargs
):
1124 """GetTop(self) -> int"""
1125 return _core_
.Rect_GetTop(*args
, **kwargs
)
1127 def GetBottom(*args
, **kwargs
):
1128 """GetBottom(self) -> int"""
1129 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1131 def GetRight(*args
, **kwargs
):
1132 """GetRight(self) -> int"""
1133 return _core_
.Rect_GetRight(*args
, **kwargs
)
1135 def SetLeft(*args
, **kwargs
):
1136 """SetLeft(self, int left)"""
1137 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1139 def SetRight(*args
, **kwargs
):
1140 """SetRight(self, int right)"""
1141 return _core_
.Rect_SetRight(*args
, **kwargs
)
1143 def SetTop(*args
, **kwargs
):
1144 """SetTop(self, int top)"""
1145 return _core_
.Rect_SetTop(*args
, **kwargs
)
1147 def SetBottom(*args
, **kwargs
):
1148 """SetBottom(self, int bottom)"""
1149 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1151 position
= property(GetPosition
, SetPosition
)
1152 size
= property(GetSize
, SetSize
)
1153 left
= property(GetLeft
, SetLeft
)
1154 right
= property(GetRight
, SetRight
)
1155 top
= property(GetTop
, SetTop
)
1156 bottom
= property(GetBottom
, SetBottom
)
1158 def Inflate(*args
, **kwargs
):
1160 Inflate(self, int dx, int dy) -> Rect
1162 Increase the rectangle size by dx in x direction and dy in y
1163 direction. Both or one of) parameters may be negative to decrease the
1166 return _core_
.Rect_Inflate(*args
, **kwargs
)
1168 def Deflate(*args
, **kwargs
):
1170 Deflate(self, int dx, int dy) -> Rect
1172 Decrease the rectangle size by dx in x direction and dy in y
1173 direction. Both or one of) parameters may be negative to increase the
1174 rectngle size. This method is the opposite of Inflate.
1176 return _core_
.Rect_Deflate(*args
, **kwargs
)
1178 def OffsetXY(*args
, **kwargs
):
1180 OffsetXY(self, int dx, int dy)
1182 Moves the rectangle by the specified offset. If dx is positive, the
1183 rectangle is moved to the right, if dy is positive, it is moved to the
1184 bottom, otherwise it is moved to the left or top respectively.
1186 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1188 def Offset(*args
, **kwargs
):
1190 Offset(self, Point pt)
1192 Same as OffsetXY but uses dx,dy from Point
1194 return _core_
.Rect_Offset(*args
, **kwargs
)
1196 def Intersect(*args
, **kwargs
):
1198 Intersect(self, Rect rect) -> Rect
1200 Return the intersectsion of this rectangle and rect.
1202 return _core_
.Rect_Intersect(*args
, **kwargs
)
1204 def __add__(*args
, **kwargs
):
1206 __add__(self, Rect rect) -> Rect
1208 Add the properties of rect to this rectangle and return the result.
1210 return _core_
.Rect___add__(*args
, **kwargs
)
1212 def __iadd__(*args
, **kwargs
):
1214 __iadd__(self, Rect rect) -> Rect
1216 Add the properties of rect to this rectangle, updating this rectangle.
1218 return _core_
.Rect___iadd__(*args
, **kwargs
)
1220 def __eq__(*args
, **kwargs
):
1222 __eq__(self, Rect rect) -> bool
1226 return _core_
.Rect___eq__(*args
, **kwargs
)
1228 def __ne__(*args
, **kwargs
):
1230 __ne__(self, Rect rect) -> bool
1232 Test for inequality.
1234 return _core_
.Rect___ne__(*args
, **kwargs
)
1236 def InsideXY(*args
, **kwargs
):
1238 InsideXY(self, int x, int y) -> bool
1240 Return True if the point is (not strcitly) inside the rect.
1242 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1244 def Inside(*args
, **kwargs
):
1246 Inside(self, Point pt) -> bool
1248 Return True if the point is (not strcitly) inside the rect.
1250 return _core_
.Rect_Inside(*args
, **kwargs
)
1252 def Intersects(*args
, **kwargs
):
1254 Intersects(self, Rect rect) -> bool
1256 Returns True if the rectangles have a non empty intersection.
1258 return _core_
.Rect_Intersects(*args
, **kwargs
)
1260 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1261 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1262 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1263 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1264 def Set(*args
, **kwargs
):
1266 Set(self, int x=0, int y=0, int width=0, int height=0)
1268 Set all rectangle properties.
1270 return _core_
.Rect_Set(*args
, **kwargs
)
1272 def Get(*args
, **kwargs
):
1274 Get() -> (x,y,width,height)
1276 Return the rectangle properties as a tuple.
1278 return _core_
.Rect_Get(*args
, **kwargs
)
1280 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1281 def __str__(self
): return str(self
.Get())
1282 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1283 def __len__(self
): return len(self
.Get())
1284 def __getitem__(self
, index
): return self
.Get()[index
]
1285 def __setitem__(self
, index
, val
):
1286 if index
== 0: self
.x
= val
1287 elif index
== 1: self
.y
= val
1288 elif index
== 2: self
.width
= val
1289 elif index
== 3: self
.height
= val
1290 else: raise IndexError
1291 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1292 __safe_for_unpickling__
= True
1293 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1296 class RectPtr(Rect
):
1297 def __init__(self
, this
):
1299 if not hasattr(self
,"thisown"): self
.thisown
= 0
1300 self
.__class
__ = Rect
1301 _core_
.Rect_swigregister(RectPtr
)
1303 def RectPP(*args
, **kwargs
):
1305 RectPP(Point topLeft, Point bottomRight) -> Rect
1307 Create a new Rect object from Points representing two corners.
1309 val
= _core_
.new_RectPP(*args
, **kwargs
)
1313 def RectPS(*args
, **kwargs
):
1315 RectPS(Point pos, Size size) -> Rect
1317 Create a new Rect from a position and size.
1319 val
= _core_
.new_RectPS(*args
, **kwargs
)
1324 def IntersectRect(*args
, **kwargs
):
1326 IntersectRect(Rect r1, Rect r2) -> Rect
1328 Calculate and return the intersection of r1 and r2.
1330 return _core_
.IntersectRect(*args
, **kwargs
)
1331 #---------------------------------------------------------------------------
1333 class Point2D(object):
1335 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1336 with floating point values.
1339 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1340 def __init__(self
, *args
, **kwargs
):
1342 __init__(self, double x=0.0, double y=0.0) -> Point2D
1344 Create a w.Point2D object.
1346 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1347 self
.this
= newobj
.this
1350 def GetFloor(*args
, **kwargs
):
1356 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1358 def GetRounded(*args
, **kwargs
):
1360 GetRounded() -> (x,y)
1364 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1366 def GetVectorLength(*args
, **kwargs
):
1367 """GetVectorLength(self) -> double"""
1368 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1370 def GetVectorAngle(*args
, **kwargs
):
1371 """GetVectorAngle(self) -> double"""
1372 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1374 def SetVectorLength(*args
, **kwargs
):
1375 """SetVectorLength(self, double length)"""
1376 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1378 def SetVectorAngle(*args
, **kwargs
):
1379 """SetVectorAngle(self, double degrees)"""
1380 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1382 def SetPolarCoordinates(self
, angle
, length
):
1383 self
.SetVectorLength(length
)
1384 self
.SetVectorAngle(angle
)
1385 def Normalize(self
):
1386 self
.SetVectorLength(1.0)
1388 def GetDistance(*args
, **kwargs
):
1389 """GetDistance(self, Point2D pt) -> double"""
1390 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1392 def GetDistanceSquare(*args
, **kwargs
):
1393 """GetDistanceSquare(self, Point2D pt) -> double"""
1394 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1396 def GetDotProduct(*args
, **kwargs
):
1397 """GetDotProduct(self, Point2D vec) -> double"""
1398 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1400 def GetCrossProduct(*args
, **kwargs
):
1401 """GetCrossProduct(self, Point2D vec) -> double"""
1402 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1404 def __neg__(*args
, **kwargs
):
1406 __neg__(self) -> Point2D
1408 the reflection of this point
1410 return _core_
.Point2D___neg__(*args
, **kwargs
)
1412 def __iadd__(*args
, **kwargs
):
1413 """__iadd__(self, Point2D pt) -> Point2D"""
1414 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1416 def __isub__(*args
, **kwargs
):
1417 """__isub__(self, Point2D pt) -> Point2D"""
1418 return _core_
.Point2D___isub__(*args
, **kwargs
)
1420 def __imul__(*args
, **kwargs
):
1421 """__imul__(self, Point2D pt) -> Point2D"""
1422 return _core_
.Point2D___imul__(*args
, **kwargs
)
1424 def __idiv__(*args
, **kwargs
):
1425 """__idiv__(self, Point2D pt) -> Point2D"""
1426 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1428 def __eq__(*args
, **kwargs
):
1430 __eq__(self, Point2D pt) -> bool
1434 return _core_
.Point2D___eq__(*args
, **kwargs
)
1436 def __ne__(*args
, **kwargs
):
1438 __ne__(self, Point2D pt) -> bool
1442 return _core_
.Point2D___ne__(*args
, **kwargs
)
1444 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1445 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1446 def Set(*args
, **kwargs
):
1447 """Set(self, double x=0, double y=0)"""
1448 return _core_
.Point2D_Set(*args
, **kwargs
)
1450 def Get(*args
, **kwargs
):
1454 Return x and y properties as a tuple.
1456 return _core_
.Point2D_Get(*args
, **kwargs
)
1458 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1459 def __str__(self
): return str(self
.Get())
1460 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1461 def __len__(self
): return len(self
.Get())
1462 def __getitem__(self
, index
): return self
.Get()[index
]
1463 def __setitem__(self
, index
, val
):
1464 if index
== 0: self
.x
= val
1465 elif index
== 1: self
.y
= val
1466 else: raise IndexError
1467 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1468 __safe_for_unpickling__
= True
1469 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1472 class Point2DPtr(Point2D
):
1473 def __init__(self
, this
):
1475 if not hasattr(self
,"thisown"): self
.thisown
= 0
1476 self
.__class
__ = Point2D
1477 _core_
.Point2D_swigregister(Point2DPtr
)
1479 def Point2DCopy(*args
, **kwargs
):
1481 Point2DCopy(Point2D pt) -> Point2D
1483 Create a w.Point2D object.
1485 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1489 def Point2DFromPoint(*args
, **kwargs
):
1491 Point2DFromPoint(Point pt) -> Point2D
1493 Create a w.Point2D object.
1495 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1499 #---------------------------------------------------------------------------
1501 FromStart
= _core_
.FromStart
1502 FromCurrent
= _core_
.FromCurrent
1503 FromEnd
= _core_
.FromEnd
1504 class InputStream(object):
1506 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1507 def __init__(self
, *args
, **kwargs
):
1508 """__init__(self, PyObject p) -> InputStream"""
1509 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1510 self
.this
= newobj
.this
1513 def close(*args
, **kwargs
):
1515 return _core_
.InputStream_close(*args
, **kwargs
)
1517 def flush(*args
, **kwargs
):
1519 return _core_
.InputStream_flush(*args
, **kwargs
)
1521 def eof(*args
, **kwargs
):
1522 """eof(self) -> bool"""
1523 return _core_
.InputStream_eof(*args
, **kwargs
)
1525 def read(*args
, **kwargs
):
1526 """read(self, int size=-1) -> PyObject"""
1527 return _core_
.InputStream_read(*args
, **kwargs
)
1529 def readline(*args
, **kwargs
):
1530 """readline(self, int size=-1) -> PyObject"""
1531 return _core_
.InputStream_readline(*args
, **kwargs
)
1533 def readlines(*args
, **kwargs
):
1534 """readlines(self, int sizehint=-1) -> PyObject"""
1535 return _core_
.InputStream_readlines(*args
, **kwargs
)
1537 def seek(*args
, **kwargs
):
1538 """seek(self, int offset, int whence=0)"""
1539 return _core_
.InputStream_seek(*args
, **kwargs
)
1541 def tell(*args
, **kwargs
):
1542 """tell(self) -> int"""
1543 return _core_
.InputStream_tell(*args
, **kwargs
)
1545 def Peek(*args
, **kwargs
):
1546 """Peek(self) -> char"""
1547 return _core_
.InputStream_Peek(*args
, **kwargs
)
1549 def GetC(*args
, **kwargs
):
1550 """GetC(self) -> char"""
1551 return _core_
.InputStream_GetC(*args
, **kwargs
)
1553 def LastRead(*args
, **kwargs
):
1554 """LastRead(self) -> size_t"""
1555 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1557 def CanRead(*args
, **kwargs
):
1558 """CanRead(self) -> bool"""
1559 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1561 def Eof(*args
, **kwargs
):
1562 """Eof(self) -> bool"""
1563 return _core_
.InputStream_Eof(*args
, **kwargs
)
1565 def Ungetch(*args
, **kwargs
):
1566 """Ungetch(self, char c) -> bool"""
1567 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1569 def SeekI(*args
, **kwargs
):
1570 """SeekI(self, long pos, int mode=FromStart) -> long"""
1571 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1573 def TellI(*args
, **kwargs
):
1574 """TellI(self) -> long"""
1575 return _core_
.InputStream_TellI(*args
, **kwargs
)
1578 class InputStreamPtr(InputStream
):
1579 def __init__(self
, this
):
1581 if not hasattr(self
,"thisown"): self
.thisown
= 0
1582 self
.__class
__ = InputStream
1583 _core_
.InputStream_swigregister(InputStreamPtr
)
1584 DefaultPosition
= cvar
.DefaultPosition
1585 DefaultSize
= cvar
.DefaultSize
1587 class OutputStream(object):
1588 def __init__(self
): raise RuntimeError, "No constructor defined"
1590 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1591 def write(*args
, **kwargs
):
1592 """write(self, PyObject obj)"""
1593 return _core_
.OutputStream_write(*args
, **kwargs
)
1596 class OutputStreamPtr(OutputStream
):
1597 def __init__(self
, this
):
1599 if not hasattr(self
,"thisown"): self
.thisown
= 0
1600 self
.__class
__ = OutputStream
1601 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1603 #---------------------------------------------------------------------------
1605 class FSFile(Object
):
1607 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1608 def __init__(self
, *args
, **kwargs
):
1610 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1611 DateTime modif) -> FSFile
1613 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1614 self
.this
= newobj
.this
1617 self
.thisown
= 0 # It will normally be deleted by the user of the wxFileSystem
1619 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1622 if self
.thisown
: destroy(self
)
1625 def GetStream(*args
, **kwargs
):
1626 """GetStream(self) -> InputStream"""
1627 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1629 def GetMimeType(*args
, **kwargs
):
1630 """GetMimeType(self) -> String"""
1631 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1633 def GetLocation(*args
, **kwargs
):
1634 """GetLocation(self) -> String"""
1635 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1637 def GetAnchor(*args
, **kwargs
):
1638 """GetAnchor(self) -> String"""
1639 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1641 def GetModificationTime(*args
, **kwargs
):
1642 """GetModificationTime(self) -> DateTime"""
1643 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1646 class FSFilePtr(FSFile
):
1647 def __init__(self
, this
):
1649 if not hasattr(self
,"thisown"): self
.thisown
= 0
1650 self
.__class
__ = FSFile
1651 _core_
.FSFile_swigregister(FSFilePtr
)
1653 class CPPFileSystemHandler(object):
1654 def __init__(self
): raise RuntimeError, "No constructor defined"
1656 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1658 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1659 def __init__(self
, this
):
1661 if not hasattr(self
,"thisown"): self
.thisown
= 0
1662 self
.__class
__ = CPPFileSystemHandler
1663 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1665 class FileSystemHandler(CPPFileSystemHandler
):
1667 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1668 def __init__(self
, *args
, **kwargs
):
1669 """__init__(self) -> FileSystemHandler"""
1670 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1671 self
.this
= newobj
.this
1674 self
._setCallbackInfo
(self
, FileSystemHandler
)
1676 def _setCallbackInfo(*args
, **kwargs
):
1677 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1678 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1680 def CanOpen(*args
, **kwargs
):
1681 """CanOpen(self, String location) -> bool"""
1682 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1684 def OpenFile(*args
, **kwargs
):
1685 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1686 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1688 def FindFirst(*args
, **kwargs
):
1689 """FindFirst(self, String spec, int flags=0) -> String"""
1690 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1692 def FindNext(*args
, **kwargs
):
1693 """FindNext(self) -> String"""
1694 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1696 def GetProtocol(*args
, **kwargs
):
1697 """GetProtocol(self, String location) -> String"""
1698 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1700 def GetLeftLocation(*args
, **kwargs
):
1701 """GetLeftLocation(self, String location) -> String"""
1702 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1704 def GetAnchor(*args
, **kwargs
):
1705 """GetAnchor(self, String location) -> String"""
1706 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1708 def GetRightLocation(*args
, **kwargs
):
1709 """GetRightLocation(self, String location) -> String"""
1710 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1712 def GetMimeTypeFromExt(*args
, **kwargs
):
1713 """GetMimeTypeFromExt(self, String location) -> String"""
1714 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1717 class FileSystemHandlerPtr(FileSystemHandler
):
1718 def __init__(self
, this
):
1720 if not hasattr(self
,"thisown"): self
.thisown
= 0
1721 self
.__class
__ = FileSystemHandler
1722 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1724 class FileSystem(Object
):
1726 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1727 def __init__(self
, *args
, **kwargs
):
1728 """__init__(self) -> FileSystem"""
1729 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1730 self
.this
= newobj
.this
1733 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1736 if self
.thisown
: destroy(self
)
1739 def ChangePathTo(*args
, **kwargs
):
1740 """ChangePathTo(self, String location, bool is_dir=False)"""
1741 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1743 def GetPath(*args
, **kwargs
):
1744 """GetPath(self) -> String"""
1745 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1747 def OpenFile(*args
, **kwargs
):
1748 """OpenFile(self, String location) -> FSFile"""
1749 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1751 def FindFirst(*args
, **kwargs
):
1752 """FindFirst(self, String spec, int flags=0) -> String"""
1753 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1755 def FindNext(*args
, **kwargs
):
1756 """FindNext(self) -> String"""
1757 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1759 def AddHandler(*args
, **kwargs
):
1760 """AddHandler(CPPFileSystemHandler handler)"""
1761 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1763 AddHandler
= staticmethod(AddHandler
)
1764 def CleanUpHandlers(*args
, **kwargs
):
1765 """CleanUpHandlers()"""
1766 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1768 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1769 def FileNameToURL(*args
, **kwargs
):
1770 """FileNameToURL(String filename) -> String"""
1771 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1773 FileNameToURL
= staticmethod(FileNameToURL
)
1774 def URLToFileName(*args
, **kwargs
):
1775 """URLToFileName(String url) -> String"""
1776 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1778 URLToFileName
= staticmethod(URLToFileName
)
1780 class FileSystemPtr(FileSystem
):
1781 def __init__(self
, this
):
1783 if not hasattr(self
,"thisown"): self
.thisown
= 0
1784 self
.__class
__ = FileSystem
1785 _core_
.FileSystem_swigregister(FileSystemPtr
)
1787 def FileSystem_AddHandler(*args
, **kwargs
):
1788 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1789 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1791 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1792 """FileSystem_CleanUpHandlers()"""
1793 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1795 def FileSystem_FileNameToURL(*args
, **kwargs
):
1796 """FileSystem_FileNameToURL(String filename) -> String"""
1797 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1799 def FileSystem_URLToFileName(*args
, **kwargs
):
1800 """FileSystem_URLToFileName(String url) -> String"""
1801 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1803 class InternetFSHandler(CPPFileSystemHandler
):
1805 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1806 def __init__(self
, *args
, **kwargs
):
1807 """__init__(self) -> InternetFSHandler"""
1808 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1809 self
.this
= newobj
.this
1812 def CanOpen(*args
, **kwargs
):
1813 """CanOpen(self, String location) -> bool"""
1814 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1816 def OpenFile(*args
, **kwargs
):
1817 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1818 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1821 class InternetFSHandlerPtr(InternetFSHandler
):
1822 def __init__(self
, this
):
1824 if not hasattr(self
,"thisown"): self
.thisown
= 0
1825 self
.__class
__ = InternetFSHandler
1826 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1828 class ZipFSHandler(CPPFileSystemHandler
):
1830 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1831 def __init__(self
, *args
, **kwargs
):
1832 """__init__(self) -> ZipFSHandler"""
1833 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1834 self
.this
= newobj
.this
1837 def CanOpen(*args
, **kwargs
):
1838 """CanOpen(self, String location) -> bool"""
1839 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1841 def OpenFile(*args
, **kwargs
):
1842 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1843 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1845 def FindFirst(*args
, **kwargs
):
1846 """FindFirst(self, String spec, int flags=0) -> String"""
1847 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1849 def FindNext(*args
, **kwargs
):
1850 """FindNext(self) -> String"""
1851 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1854 class ZipFSHandlerPtr(ZipFSHandler
):
1855 def __init__(self
, this
):
1857 if not hasattr(self
,"thisown"): self
.thisown
= 0
1858 self
.__class
__ = ZipFSHandler
1859 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1862 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1863 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1864 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1866 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1867 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1868 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1870 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1871 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1872 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1873 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1875 Add 'file' to the memory filesystem. The dataItem parameter can
1876 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1877 arbitrary data. If a bitmap or image is used then the imgType
1878 parameter should specify what kind of image file it should be
1879 written as, wx.BITMAP_TYPE_PNG, etc.
1881 if isinstance(dataItem
, wx
.Image
):
1882 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1883 elif isinstance(dataItem
, wx
.Bitmap
):
1884 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1885 elif type(dataItem
) == str:
1886 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1888 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1890 class MemoryFSHandler(CPPFileSystemHandler
):
1892 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1893 def __init__(self
, *args
, **kwargs
):
1894 """__init__(self) -> MemoryFSHandler"""
1895 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
1896 self
.this
= newobj
.this
1899 def RemoveFile(*args
, **kwargs
):
1900 """RemoveFile(String filename)"""
1901 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1903 RemoveFile
= staticmethod(RemoveFile
)
1904 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1905 def CanOpen(*args
, **kwargs
):
1906 """CanOpen(self, String location) -> bool"""
1907 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1909 def OpenFile(*args
, **kwargs
):
1910 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1911 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
1913 def FindFirst(*args
, **kwargs
):
1914 """FindFirst(self, String spec, int flags=0) -> String"""
1915 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
1917 def FindNext(*args
, **kwargs
):
1918 """FindNext(self) -> String"""
1919 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
1922 class MemoryFSHandlerPtr(MemoryFSHandler
):
1923 def __init__(self
, this
):
1925 if not hasattr(self
,"thisown"): self
.thisown
= 0
1926 self
.__class
__ = MemoryFSHandler
1927 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
1929 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
1930 """MemoryFSHandler_RemoveFile(String filename)"""
1931 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1933 #---------------------------------------------------------------------------
1935 class ImageHandler(Object
):
1936 def __init__(self
): raise RuntimeError, "No constructor defined"
1938 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1939 def GetName(*args
, **kwargs
):
1940 """GetName(self) -> String"""
1941 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
1943 def GetExtension(*args
, **kwargs
):
1944 """GetExtension(self) -> String"""
1945 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
1947 def GetType(*args
, **kwargs
):
1948 """GetType(self) -> long"""
1949 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
1951 def GetMimeType(*args
, **kwargs
):
1952 """GetMimeType(self) -> String"""
1953 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
1955 def CanRead(*args
, **kwargs
):
1956 """CanRead(self, String name) -> bool"""
1957 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
1959 def SetName(*args
, **kwargs
):
1960 """SetName(self, String name)"""
1961 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
1963 def SetExtension(*args
, **kwargs
):
1964 """SetExtension(self, String extension)"""
1965 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
1967 def SetType(*args
, **kwargs
):
1968 """SetType(self, long type)"""
1969 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
1971 def SetMimeType(*args
, **kwargs
):
1972 """SetMimeType(self, String mimetype)"""
1973 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
1976 class ImageHandlerPtr(ImageHandler
):
1977 def __init__(self
, this
):
1979 if not hasattr(self
,"thisown"): self
.thisown
= 0
1980 self
.__class
__ = ImageHandler
1981 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
1983 class ImageHistogram(object):
1985 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1986 def __init__(self
, *args
, **kwargs
):
1987 """__init__(self) -> ImageHistogram"""
1988 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
1989 self
.this
= newobj
.this
1992 def MakeKey(*args
, **kwargs
):
1994 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
1996 Get the key in the histogram for the given RGB values
1998 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2000 MakeKey
= staticmethod(MakeKey
)
2001 def FindFirstUnusedColour(*args
, **kwargs
):
2003 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2005 Find first colour that is not used in the image and has higher RGB
2006 values than startR, startG, startB. Returns a tuple consisting of a
2007 success flag and rgb values.
2009 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2012 class ImageHistogramPtr(ImageHistogram
):
2013 def __init__(self
, this
):
2015 if not hasattr(self
,"thisown"): self
.thisown
= 0
2016 self
.__class
__ = ImageHistogram
2017 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2019 def ImageHistogram_MakeKey(*args
, **kwargs
):
2021 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2023 Get the key in the histogram for the given RGB values
2025 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2027 class Image(Object
):
2029 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2030 def __init__(self
, *args
, **kwargs
):
2031 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2032 newobj
= _core_
.new_Image(*args
, **kwargs
)
2033 self
.this
= newobj
.this
2036 def __del__(self
, destroy
=_core_
.delete_Image
):
2039 if self
.thisown
: destroy(self
)
2042 def Create(*args
, **kwargs
):
2043 """Create(self, int width, int height)"""
2044 return _core_
.Image_Create(*args
, **kwargs
)
2046 def Destroy(*args
, **kwargs
):
2050 Deletes the C++ object this Python object is a proxy for.
2052 return _core_
.Image_Destroy(*args
, **kwargs
)
2054 def Scale(*args
, **kwargs
):
2055 """Scale(self, int width, int height) -> Image"""
2056 return _core_
.Image_Scale(*args
, **kwargs
)
2058 def ShrinkBy(*args
, **kwargs
):
2059 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2060 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2062 def Rescale(*args
, **kwargs
):
2063 """Rescale(self, int width, int height) -> Image"""
2064 return _core_
.Image_Rescale(*args
, **kwargs
)
2066 def SetRGB(*args
, **kwargs
):
2067 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2068 return _core_
.Image_SetRGB(*args
, **kwargs
)
2070 def GetRed(*args
, **kwargs
):
2071 """GetRed(self, int x, int y) -> unsigned char"""
2072 return _core_
.Image_GetRed(*args
, **kwargs
)
2074 def GetGreen(*args
, **kwargs
):
2075 """GetGreen(self, int x, int y) -> unsigned char"""
2076 return _core_
.Image_GetGreen(*args
, **kwargs
)
2078 def GetBlue(*args
, **kwargs
):
2079 """GetBlue(self, int x, int y) -> unsigned char"""
2080 return _core_
.Image_GetBlue(*args
, **kwargs
)
2082 def SetAlpha(*args
, **kwargs
):
2083 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2084 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2086 def GetAlpha(*args
, **kwargs
):
2087 """GetAlpha(self, int x, int y) -> unsigned char"""
2088 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2090 def HasAlpha(*args
, **kwargs
):
2091 """HasAlpha(self) -> bool"""
2092 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2094 def FindFirstUnusedColour(*args
, **kwargs
):
2096 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2098 Find first colour that is not used in the image and has higher RGB
2099 values than startR, startG, startB. Returns a tuple consisting of a
2100 success flag and rgb values.
2102 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2104 def ConvertAlphaToMask(*args
, **kwargs
):
2106 ConvertAlphaToMask(self, byte threshold=128) -> bool
2108 If the image has alpha channel, this method converts it to mask. All pixels
2109 with alpha value less than ``threshold`` are replaced with mask colour and the
2110 alpha channel is removed. Mask colour is chosen automatically using
2111 `FindFirstUnusedColour`.
2113 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2116 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2118 def SetMaskFromImage(*args
, **kwargs
):
2119 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2120 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2122 def CanRead(*args
, **kwargs
):
2123 """CanRead(String name) -> bool"""
2124 return _core_
.Image_CanRead(*args
, **kwargs
)
2126 CanRead
= staticmethod(CanRead
)
2127 def GetImageCount(*args
, **kwargs
):
2128 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2129 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2131 GetImageCount
= staticmethod(GetImageCount
)
2132 def LoadFile(*args
, **kwargs
):
2133 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2134 return _core_
.Image_LoadFile(*args
, **kwargs
)
2136 def LoadMimeFile(*args
, **kwargs
):
2137 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2138 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2140 def SaveFile(*args
, **kwargs
):
2141 """SaveFile(self, String name, int type) -> bool"""
2142 return _core_
.Image_SaveFile(*args
, **kwargs
)
2144 def SaveMimeFile(*args
, **kwargs
):
2145 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2146 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2148 def CanReadStream(*args
, **kwargs
):
2149 """CanReadStream(InputStream stream) -> bool"""
2150 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2152 CanReadStream
= staticmethod(CanReadStream
)
2153 def LoadStream(*args
, **kwargs
):
2154 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2155 return _core_
.Image_LoadStream(*args
, **kwargs
)
2157 def LoadMimeStream(*args
, **kwargs
):
2158 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2159 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2161 def Ok(*args
, **kwargs
):
2162 """Ok(self) -> bool"""
2163 return _core_
.Image_Ok(*args
, **kwargs
)
2165 def GetWidth(*args
, **kwargs
):
2166 """GetWidth(self) -> int"""
2167 return _core_
.Image_GetWidth(*args
, **kwargs
)
2169 def GetHeight(*args
, **kwargs
):
2170 """GetHeight(self) -> int"""
2171 return _core_
.Image_GetHeight(*args
, **kwargs
)
2173 def GetSize(*args
, **kwargs
):
2174 """GetSize(self) -> Size"""
2175 return _core_
.Image_GetSize(*args
, **kwargs
)
2177 def GetSubImage(*args
, **kwargs
):
2178 """GetSubImage(self, Rect rect) -> Image"""
2179 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2181 def Copy(*args
, **kwargs
):
2182 """Copy(self) -> Image"""
2183 return _core_
.Image_Copy(*args
, **kwargs
)
2185 def Paste(*args
, **kwargs
):
2186 """Paste(self, Image image, int x, int y)"""
2187 return _core_
.Image_Paste(*args
, **kwargs
)
2189 def GetData(*args
, **kwargs
):
2190 """GetData(self) -> PyObject"""
2191 return _core_
.Image_GetData(*args
, **kwargs
)
2193 def SetData(*args
, **kwargs
):
2194 """SetData(self, PyObject data)"""
2195 return _core_
.Image_SetData(*args
, **kwargs
)
2197 def GetDataBuffer(*args
, **kwargs
):
2198 """GetDataBuffer(self) -> PyObject"""
2199 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2201 def SetDataBuffer(*args
, **kwargs
):
2202 """SetDataBuffer(self, PyObject data)"""
2203 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2205 def GetAlphaData(*args
, **kwargs
):
2206 """GetAlphaData(self) -> PyObject"""
2207 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2209 def SetAlphaData(*args
, **kwargs
):
2210 """SetAlphaData(self, PyObject data)"""
2211 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2213 def GetAlphaBuffer(*args
, **kwargs
):
2214 """GetAlphaBuffer(self) -> PyObject"""
2215 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2217 def SetAlphaBuffer(*args
, **kwargs
):
2218 """SetAlphaBuffer(self, PyObject data)"""
2219 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2221 def SetMaskColour(*args
, **kwargs
):
2222 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2223 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2225 def GetMaskRed(*args
, **kwargs
):
2226 """GetMaskRed(self) -> unsigned char"""
2227 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2229 def GetMaskGreen(*args
, **kwargs
):
2230 """GetMaskGreen(self) -> unsigned char"""
2231 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2233 def GetMaskBlue(*args
, **kwargs
):
2234 """GetMaskBlue(self) -> unsigned char"""
2235 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2237 def SetMask(*args
, **kwargs
):
2238 """SetMask(self, bool mask=True)"""
2239 return _core_
.Image_SetMask(*args
, **kwargs
)
2241 def HasMask(*args
, **kwargs
):
2242 """HasMask(self) -> bool"""
2243 return _core_
.Image_HasMask(*args
, **kwargs
)
2245 def Rotate(*args
, **kwargs
):
2247 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2248 Point offset_after_rotation=None) -> Image
2250 return _core_
.Image_Rotate(*args
, **kwargs
)
2252 def Rotate90(*args
, **kwargs
):
2253 """Rotate90(self, bool clockwise=True) -> Image"""
2254 return _core_
.Image_Rotate90(*args
, **kwargs
)
2256 def Mirror(*args
, **kwargs
):
2257 """Mirror(self, bool horizontally=True) -> Image"""
2258 return _core_
.Image_Mirror(*args
, **kwargs
)
2260 def Replace(*args
, **kwargs
):
2262 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2263 unsigned char r2, unsigned char g2, unsigned char b2)
2265 return _core_
.Image_Replace(*args
, **kwargs
)
2267 def ConvertToMono(*args
, **kwargs
):
2268 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2269 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2271 def SetOption(*args
, **kwargs
):
2272 """SetOption(self, String name, String value)"""
2273 return _core_
.Image_SetOption(*args
, **kwargs
)
2275 def SetOptionInt(*args
, **kwargs
):
2276 """SetOptionInt(self, String name, int value)"""
2277 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2279 def GetOption(*args
, **kwargs
):
2280 """GetOption(self, String name) -> String"""
2281 return _core_
.Image_GetOption(*args
, **kwargs
)
2283 def GetOptionInt(*args
, **kwargs
):
2284 """GetOptionInt(self, String name) -> int"""
2285 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2287 def HasOption(*args
, **kwargs
):
2288 """HasOption(self, String name) -> bool"""
2289 return _core_
.Image_HasOption(*args
, **kwargs
)
2291 def CountColours(*args
, **kwargs
):
2292 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2293 return _core_
.Image_CountColours(*args
, **kwargs
)
2295 def ComputeHistogram(*args
, **kwargs
):
2296 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2297 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2299 def AddHandler(*args
, **kwargs
):
2300 """AddHandler(ImageHandler handler)"""
2301 return _core_
.Image_AddHandler(*args
, **kwargs
)
2303 AddHandler
= staticmethod(AddHandler
)
2304 def InsertHandler(*args
, **kwargs
):
2305 """InsertHandler(ImageHandler handler)"""
2306 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2308 InsertHandler
= staticmethod(InsertHandler
)
2309 def RemoveHandler(*args
, **kwargs
):
2310 """RemoveHandler(String name) -> bool"""
2311 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2313 RemoveHandler
= staticmethod(RemoveHandler
)
2314 def GetImageExtWildcard(*args
, **kwargs
):
2315 """GetImageExtWildcard() -> String"""
2316 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2318 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2319 def ConvertToBitmap(*args
, **kwargs
):
2320 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2321 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2323 def ConvertToMonoBitmap(*args
, **kwargs
):
2324 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2325 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2327 def __nonzero__(self
): return self
.Ok()
2329 class ImagePtr(Image
):
2330 def __init__(self
, this
):
2332 if not hasattr(self
,"thisown"): self
.thisown
= 0
2333 self
.__class
__ = Image
2334 _core_
.Image_swigregister(ImagePtr
)
2336 def ImageFromMime(*args
, **kwargs
):
2337 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2338 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2342 def ImageFromStream(*args
, **kwargs
):
2343 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2344 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2348 def ImageFromStreamMime(*args
, **kwargs
):
2349 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2350 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2354 def EmptyImage(*args
, **kwargs
):
2355 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2356 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2360 def ImageFromBitmap(*args
, **kwargs
):
2361 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2362 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2366 def ImageFromData(*args
, **kwargs
):
2367 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2368 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2372 def Image_CanRead(*args
, **kwargs
):
2373 """Image_CanRead(String name) -> bool"""
2374 return _core_
.Image_CanRead(*args
, **kwargs
)
2376 def Image_GetImageCount(*args
, **kwargs
):
2377 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2378 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2380 def Image_CanReadStream(*args
, **kwargs
):
2381 """Image_CanReadStream(InputStream stream) -> bool"""
2382 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2384 def Image_AddHandler(*args
, **kwargs
):
2385 """Image_AddHandler(ImageHandler handler)"""
2386 return _core_
.Image_AddHandler(*args
, **kwargs
)
2388 def Image_InsertHandler(*args
, **kwargs
):
2389 """Image_InsertHandler(ImageHandler handler)"""
2390 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2392 def Image_RemoveHandler(*args
, **kwargs
):
2393 """Image_RemoveHandler(String name) -> bool"""
2394 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2396 def Image_GetImageExtWildcard(*args
, **kwargs
):
2397 """Image_GetImageExtWildcard() -> String"""
2398 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2400 def InitAllImageHandlers():
2402 The former functionality of InitAllImageHanders is now done internal to
2403 the _core_ extension module and so this function has become a simple NOP.
2407 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2408 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2409 BMP_24BPP
= _core_
.BMP_24BPP
2410 BMP_8BPP
= _core_
.BMP_8BPP
2411 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2412 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2413 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2414 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2415 BMP_4BPP
= _core_
.BMP_4BPP
2416 BMP_1BPP
= _core_
.BMP_1BPP
2417 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2418 class BMPHandler(ImageHandler
):
2420 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2421 def __init__(self
, *args
, **kwargs
):
2422 """__init__(self) -> BMPHandler"""
2423 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2424 self
.this
= newobj
.this
2428 class BMPHandlerPtr(BMPHandler
):
2429 def __init__(self
, this
):
2431 if not hasattr(self
,"thisown"): self
.thisown
= 0
2432 self
.__class
__ = BMPHandler
2433 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2434 NullImage
= cvar
.NullImage
2435 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2436 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2437 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2438 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2439 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2441 class ICOHandler(BMPHandler
):
2443 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2444 def __init__(self
, *args
, **kwargs
):
2445 """__init__(self) -> ICOHandler"""
2446 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2447 self
.this
= newobj
.this
2451 class ICOHandlerPtr(ICOHandler
):
2452 def __init__(self
, this
):
2454 if not hasattr(self
,"thisown"): self
.thisown
= 0
2455 self
.__class
__ = ICOHandler
2456 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2458 class CURHandler(ICOHandler
):
2460 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2461 def __init__(self
, *args
, **kwargs
):
2462 """__init__(self) -> CURHandler"""
2463 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2464 self
.this
= newobj
.this
2468 class CURHandlerPtr(CURHandler
):
2469 def __init__(self
, this
):
2471 if not hasattr(self
,"thisown"): self
.thisown
= 0
2472 self
.__class
__ = CURHandler
2473 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2475 class ANIHandler(CURHandler
):
2477 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2478 def __init__(self
, *args
, **kwargs
):
2479 """__init__(self) -> ANIHandler"""
2480 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2481 self
.this
= newobj
.this
2485 class ANIHandlerPtr(ANIHandler
):
2486 def __init__(self
, this
):
2488 if not hasattr(self
,"thisown"): self
.thisown
= 0
2489 self
.__class
__ = ANIHandler
2490 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2492 class PNGHandler(ImageHandler
):
2494 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2495 def __init__(self
, *args
, **kwargs
):
2496 """__init__(self) -> PNGHandler"""
2497 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2498 self
.this
= newobj
.this
2502 class PNGHandlerPtr(PNGHandler
):
2503 def __init__(self
, this
):
2505 if not hasattr(self
,"thisown"): self
.thisown
= 0
2506 self
.__class
__ = PNGHandler
2507 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2509 class GIFHandler(ImageHandler
):
2511 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2512 def __init__(self
, *args
, **kwargs
):
2513 """__init__(self) -> GIFHandler"""
2514 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2515 self
.this
= newobj
.this
2519 class GIFHandlerPtr(GIFHandler
):
2520 def __init__(self
, this
):
2522 if not hasattr(self
,"thisown"): self
.thisown
= 0
2523 self
.__class
__ = GIFHandler
2524 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2526 class PCXHandler(ImageHandler
):
2528 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2529 def __init__(self
, *args
, **kwargs
):
2530 """__init__(self) -> PCXHandler"""
2531 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2532 self
.this
= newobj
.this
2536 class PCXHandlerPtr(PCXHandler
):
2537 def __init__(self
, this
):
2539 if not hasattr(self
,"thisown"): self
.thisown
= 0
2540 self
.__class
__ = PCXHandler
2541 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2543 class JPEGHandler(ImageHandler
):
2545 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2546 def __init__(self
, *args
, **kwargs
):
2547 """__init__(self) -> JPEGHandler"""
2548 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2549 self
.this
= newobj
.this
2553 class JPEGHandlerPtr(JPEGHandler
):
2554 def __init__(self
, this
):
2556 if not hasattr(self
,"thisown"): self
.thisown
= 0
2557 self
.__class
__ = JPEGHandler
2558 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2560 class PNMHandler(ImageHandler
):
2562 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2563 def __init__(self
, *args
, **kwargs
):
2564 """__init__(self) -> PNMHandler"""
2565 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2566 self
.this
= newobj
.this
2570 class PNMHandlerPtr(PNMHandler
):
2571 def __init__(self
, this
):
2573 if not hasattr(self
,"thisown"): self
.thisown
= 0
2574 self
.__class
__ = PNMHandler
2575 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2577 class XPMHandler(ImageHandler
):
2579 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2580 def __init__(self
, *args
, **kwargs
):
2581 """__init__(self) -> XPMHandler"""
2582 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2583 self
.this
= newobj
.this
2587 class XPMHandlerPtr(XPMHandler
):
2588 def __init__(self
, this
):
2590 if not hasattr(self
,"thisown"): self
.thisown
= 0
2591 self
.__class
__ = XPMHandler
2592 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2594 class TIFFHandler(ImageHandler
):
2596 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2597 def __init__(self
, *args
, **kwargs
):
2598 """__init__(self) -> TIFFHandler"""
2599 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2600 self
.this
= newobj
.this
2604 class TIFFHandlerPtr(TIFFHandler
):
2605 def __init__(self
, this
):
2607 if not hasattr(self
,"thisown"): self
.thisown
= 0
2608 self
.__class
__ = TIFFHandler
2609 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2611 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2612 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2613 class Quantize(object):
2614 """Performs quantization, or colour reduction, on a wxImage."""
2615 def __init__(self
): raise RuntimeError, "No constructor defined"
2617 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2618 def Quantize(*args
, **kwargs
):
2620 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2622 Reduce the colours in the source image and put the result into the
2623 destination image, setting the palette in the destination if
2624 needed. Both images may be the same, to overwrite the source image.
2626 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2628 Quantize
= staticmethod(Quantize
)
2630 class QuantizePtr(Quantize
):
2631 def __init__(self
, this
):
2633 if not hasattr(self
,"thisown"): self
.thisown
= 0
2634 self
.__class
__ = Quantize
2635 _core_
.Quantize_swigregister(QuantizePtr
)
2637 def Quantize_Quantize(*args
, **kwargs
):
2639 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2641 Reduce the colours in the source image and put the result into the
2642 destination image, setting the palette in the destination if
2643 needed. Both images may be the same, to overwrite the source image.
2645 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2647 #---------------------------------------------------------------------------
2649 class EvtHandler(Object
):
2651 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2652 def __init__(self
, *args
, **kwargs
):
2653 """__init__(self) -> EvtHandler"""
2654 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2655 self
.this
= newobj
.this
2658 def GetNextHandler(*args
, **kwargs
):
2659 """GetNextHandler(self) -> EvtHandler"""
2660 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2662 def GetPreviousHandler(*args
, **kwargs
):
2663 """GetPreviousHandler(self) -> EvtHandler"""
2664 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2666 def SetNextHandler(*args
, **kwargs
):
2667 """SetNextHandler(self, EvtHandler handler)"""
2668 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2670 def SetPreviousHandler(*args
, **kwargs
):
2671 """SetPreviousHandler(self, EvtHandler handler)"""
2672 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2674 def GetEvtHandlerEnabled(*args
, **kwargs
):
2675 """GetEvtHandlerEnabled(self) -> bool"""
2676 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2678 def SetEvtHandlerEnabled(*args
, **kwargs
):
2679 """SetEvtHandlerEnabled(self, bool enabled)"""
2680 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2682 def ProcessEvent(*args
, **kwargs
):
2683 """ProcessEvent(self, Event event) -> bool"""
2684 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2686 def AddPendingEvent(*args
, **kwargs
):
2687 """AddPendingEvent(self, Event event)"""
2688 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2690 def ProcessPendingEvents(*args
, **kwargs
):
2691 """ProcessPendingEvents(self)"""
2692 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2694 def Connect(*args
, **kwargs
):
2695 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2696 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
2698 def Disconnect(*args
, **kwargs
):
2699 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2700 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
2702 def _setOORInfo(*args
, **kwargs
):
2703 """_setOORInfo(self, PyObject _self)"""
2704 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
2706 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2708 Bind an event to an event handler.
2710 :param event: One of the EVT_* objects that specifies the
2711 type of event to bind,
2713 :param handler: A callable object to be invoked when the
2714 event is delivered to self. Pass None to
2715 disconnect an event handler.
2717 :param source: Sometimes the event originates from a
2718 different window than self, but you still
2719 want to catch it in self. (For example, a
2720 button event delivered to a frame.) By
2721 passing the source of the event, the event
2722 handling system is able to differentiate
2723 between the same event type from different
2726 :param id: Used to spcify the event source by ID instead
2729 :param id2: Used when it is desirable to bind a handler
2730 to a range of IDs, such as with EVT_MENU_RANGE.
2732 if source
is not None:
2734 event
.Bind(self
, id, id2
, handler
)
2736 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2738 Disconencts the event handler binding for event from self.
2739 Returns True if successful.
2741 if source
is not None:
2743 return event
.Unbind(self
, id, id2
)
2746 class EvtHandlerPtr(EvtHandler
):
2747 def __init__(self
, this
):
2749 if not hasattr(self
,"thisown"): self
.thisown
= 0
2750 self
.__class
__ = EvtHandler
2751 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
2753 #---------------------------------------------------------------------------
2755 class PyEventBinder(object):
2757 Instances of this class are used to bind specific events to event
2760 def __init__(self
, evtType
, expectedIDs
=0):
2761 if expectedIDs
not in [0, 1, 2]:
2762 raise ValueError, "Invalid number of expectedIDs"
2763 self
.expectedIDs
= expectedIDs
2765 if type(evtType
) == list or type(evtType
) == tuple:
2766 self
.evtType
= evtType
2768 self
.evtType
= [evtType
]
2771 def Bind(self
, target
, id1
, id2
, function
):
2772 """Bind this set of event types to target."""
2773 for et
in self
.evtType
:
2774 target
.Connect(id1
, id2
, et
, function
)
2777 def Unbind(self
, target
, id1
, id2
):
2778 """Remove an event binding."""
2780 for et
in self
.evtType
:
2781 success
+= target
.Disconnect(id1
, id2
, et
)
2785 def __call__(self
, *args
):
2787 For backwards compatibility with the old EVT_* functions.
2788 Should be called with either (window, func), (window, ID,
2789 func) or (window, ID1, ID2, func) parameters depending on the
2792 assert len(args
) == 2 + self
.expectedIDs
2796 if self
.expectedIDs
== 0:
2798 elif self
.expectedIDs
== 1:
2801 elif self
.expectedIDs
== 2:
2806 raise ValueError, "Unexpected number of IDs"
2808 self
.Bind(target
, id1
, id2
, func
)
2811 # These two are square pegs that don't fit the PyEventBinder hole...
2812 def EVT_COMMAND(win
, id, cmd
, func
):
2813 win
.Connect(id, -1, cmd
, func
)
2814 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2815 win
.Connect(id1
, id2
, cmd
, func
)
2818 #---------------------------------------------------------------------------
2820 #---------------------------------------------------------------------------
2822 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
2823 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
2825 def NewEventType(*args
, **kwargs
):
2826 """NewEventType() -> wxEventType"""
2827 return _core_
.NewEventType(*args
, **kwargs
)
2828 wxEVT_NULL
= _core_
.wxEVT_NULL
2829 wxEVT_FIRST
= _core_
.wxEVT_FIRST
2830 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
2831 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
2832 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
2833 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
2834 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
2835 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2836 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2837 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
2838 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
2839 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
2840 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
2841 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2842 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
2843 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
2844 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
2845 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
2846 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
2847 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
2848 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
2849 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
2850 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
2851 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
2852 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
2853 wxEVT_MOTION
= _core_
.wxEVT_MOTION
2854 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
2855 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
2856 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
2857 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
2858 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
2859 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
2860 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
2861 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
2862 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
2863 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
2864 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
2865 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
2866 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
2867 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
2868 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
2869 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
2870 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
2871 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
2872 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
2873 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
2874 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
2875 wxEVT_CHAR
= _core_
.wxEVT_CHAR
2876 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
2877 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
2878 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
2879 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
2880 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
2881 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
2882 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
2883 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
2884 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
2885 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
2886 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
2887 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
2888 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
2889 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
2890 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
2891 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
2892 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
2893 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
2894 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
2895 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
2896 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
2897 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
2898 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
2899 wxEVT_SIZE
= _core_
.wxEVT_SIZE
2900 wxEVT_MOVE
= _core_
.wxEVT_MOVE
2901 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
2902 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
2903 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
2904 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
2905 wxEVT_POWER
= _core_
.wxEVT_POWER
2906 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
2907 wxEVT_CREATE
= _core_
.wxEVT_CREATE
2908 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
2909 wxEVT_SHOW
= _core_
.wxEVT_SHOW
2910 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
2911 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
2912 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
2913 wxEVT_PAINT
= _core_
.wxEVT_PAINT
2914 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
2915 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
2916 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
2917 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
2918 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
2919 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
2920 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
2921 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
2922 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
2923 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
2924 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
2925 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
2926 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
2927 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
2928 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
2929 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
2930 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
2931 wxEVT_IDLE
= _core_
.wxEVT_IDLE
2932 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
2933 wxEVT_SIZING
= _core_
.wxEVT_SIZING
2934 wxEVT_MOVING
= _core_
.wxEVT_MOVING
2935 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
2936 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
2937 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
2938 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
2939 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
2940 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
2941 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
2943 # Create some event binders
2944 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
2945 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
2946 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
2947 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
2948 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
2949 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
2950 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
2951 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
2952 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
2953 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
2954 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
2955 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
2956 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
2957 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
2958 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
2959 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
2960 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
2961 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
2962 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
2963 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
2964 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
2965 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
2966 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
2967 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
2968 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
2969 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
2970 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
2971 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
2972 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
2973 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
2974 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
2975 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
2976 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
2977 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
2978 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
2979 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
2980 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
2981 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
2982 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
2983 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
2985 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
2986 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
2987 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
2988 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
2989 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
2990 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
2991 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
2992 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
2993 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
2994 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
2995 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
2996 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
2997 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
2999 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3007 wxEVT_MIDDLE_DCLICK
,
3015 # Scrolling from wxWindow (sent to wxScrolledWindow)
3016 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3017 wxEVT_SCROLLWIN_BOTTOM
,
3018 wxEVT_SCROLLWIN_LINEUP
,
3019 wxEVT_SCROLLWIN_LINEDOWN
,
3020 wxEVT_SCROLLWIN_PAGEUP
,
3021 wxEVT_SCROLLWIN_PAGEDOWN
,
3022 wxEVT_SCROLLWIN_THUMBTRACK
,
3023 wxEVT_SCROLLWIN_THUMBRELEASE
,
3026 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3027 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3028 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3029 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3030 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3031 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3032 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3033 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3035 # Scrolling from wxSlider and wxScrollBar
3036 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3037 wxEVT_SCROLL_BOTTOM
,
3038 wxEVT_SCROLL_LINEUP
,
3039 wxEVT_SCROLL_LINEDOWN
,
3040 wxEVT_SCROLL_PAGEUP
,
3041 wxEVT_SCROLL_PAGEDOWN
,
3042 wxEVT_SCROLL_THUMBTRACK
,
3043 wxEVT_SCROLL_THUMBRELEASE
,
3044 wxEVT_SCROLL_ENDSCROLL
,
3047 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3048 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3049 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3050 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3051 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3052 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3053 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3054 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3055 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3057 # Scrolling from wxSlider and wxScrollBar, with an id
3058 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3059 wxEVT_SCROLL_BOTTOM
,
3060 wxEVT_SCROLL_LINEUP
,
3061 wxEVT_SCROLL_LINEDOWN
,
3062 wxEVT_SCROLL_PAGEUP
,
3063 wxEVT_SCROLL_PAGEDOWN
,
3064 wxEVT_SCROLL_THUMBTRACK
,
3065 wxEVT_SCROLL_THUMBRELEASE
,
3066 wxEVT_SCROLL_ENDSCROLL
,
3069 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3070 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3071 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3072 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3073 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3074 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3075 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3076 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3077 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3079 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3080 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3081 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3082 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3083 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3084 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3085 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3086 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3087 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3088 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3090 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3091 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3092 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3093 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3094 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3095 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3096 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3097 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3098 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3101 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3102 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3103 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3104 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3105 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3106 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3107 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3109 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3111 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3112 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3114 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3118 #---------------------------------------------------------------------------
3120 class Event(Object
):
3121 def __init__(self
): raise RuntimeError, "No constructor defined"
3123 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3124 def __del__(self
, destroy
=_core_
.delete_Event
):
3127 if self
.thisown
: destroy(self
)
3130 def SetEventType(*args
, **kwargs
):
3131 """SetEventType(self, wxEventType typ)"""
3132 return _core_
.Event_SetEventType(*args
, **kwargs
)
3134 def GetEventType(*args
, **kwargs
):
3135 """GetEventType(self) -> wxEventType"""
3136 return _core_
.Event_GetEventType(*args
, **kwargs
)
3138 def GetEventObject(*args
, **kwargs
):
3139 """GetEventObject(self) -> Object"""
3140 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3142 def SetEventObject(*args
, **kwargs
):
3143 """SetEventObject(self, Object obj)"""
3144 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3146 def GetTimestamp(*args
, **kwargs
):
3147 """GetTimestamp(self) -> long"""
3148 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3150 def SetTimestamp(*args
, **kwargs
):
3151 """SetTimestamp(self, long ts=0)"""
3152 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3154 def GetId(*args
, **kwargs
):
3155 """GetId(self) -> int"""
3156 return _core_
.Event_GetId(*args
, **kwargs
)
3158 def SetId(*args
, **kwargs
):
3159 """SetId(self, int Id)"""
3160 return _core_
.Event_SetId(*args
, **kwargs
)
3162 def IsCommandEvent(*args
, **kwargs
):
3163 """IsCommandEvent(self) -> bool"""
3164 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3166 def Skip(*args
, **kwargs
):
3167 """Skip(self, bool skip=True)"""
3168 return _core_
.Event_Skip(*args
, **kwargs
)
3170 def GetSkipped(*args
, **kwargs
):
3171 """GetSkipped(self) -> bool"""
3172 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3174 def ShouldPropagate(*args
, **kwargs
):
3175 """ShouldPropagate(self) -> bool"""
3176 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3178 def StopPropagation(*args
, **kwargs
):
3179 """StopPropagation(self) -> int"""
3180 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3182 def ResumePropagation(*args
, **kwargs
):
3183 """ResumePropagation(self, int propagationLevel)"""
3184 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3186 def Clone(*args
, **kwargs
):
3187 """Clone(self) -> Event"""
3188 return _core_
.Event_Clone(*args
, **kwargs
)
3191 class EventPtr(Event
):
3192 def __init__(self
, this
):
3194 if not hasattr(self
,"thisown"): self
.thisown
= 0
3195 self
.__class
__ = Event
3196 _core_
.Event_swigregister(EventPtr
)
3198 #---------------------------------------------------------------------------
3200 class PropagationDisabler(object):
3202 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3203 def __init__(self
, *args
, **kwargs
):
3204 """__init__(self, Event event) -> PropagationDisabler"""
3205 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3206 self
.this
= newobj
.this
3209 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3212 if self
.thisown
: destroy(self
)
3216 class PropagationDisablerPtr(PropagationDisabler
):
3217 def __init__(self
, this
):
3219 if not hasattr(self
,"thisown"): self
.thisown
= 0
3220 self
.__class
__ = PropagationDisabler
3221 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3223 class PropagateOnce(object):
3225 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3226 def __init__(self
, *args
, **kwargs
):
3227 """__init__(self, Event event) -> PropagateOnce"""
3228 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3229 self
.this
= newobj
.this
3232 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3235 if self
.thisown
: destroy(self
)
3239 class PropagateOncePtr(PropagateOnce
):
3240 def __init__(self
, this
):
3242 if not hasattr(self
,"thisown"): self
.thisown
= 0
3243 self
.__class
__ = PropagateOnce
3244 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3246 #---------------------------------------------------------------------------
3248 class CommandEvent(Event
):
3250 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3251 def __init__(self
, *args
, **kwargs
):
3252 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3253 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3254 self
.this
= newobj
.this
3257 def GetSelection(*args
, **kwargs
):
3258 """GetSelection(self) -> int"""
3259 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3261 def SetString(*args
, **kwargs
):
3262 """SetString(self, String s)"""
3263 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3265 def GetString(*args
, **kwargs
):
3266 """GetString(self) -> String"""
3267 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3269 def IsChecked(*args
, **kwargs
):
3270 """IsChecked(self) -> bool"""
3271 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3274 def IsSelection(*args
, **kwargs
):
3275 """IsSelection(self) -> bool"""
3276 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3278 def SetExtraLong(*args
, **kwargs
):
3279 """SetExtraLong(self, long extraLong)"""
3280 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3282 def GetExtraLong(*args
, **kwargs
):
3283 """GetExtraLong(self) -> long"""
3284 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3286 def SetInt(*args
, **kwargs
):
3287 """SetInt(self, int i)"""
3288 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3290 def GetInt(*args
, **kwargs
):
3291 """GetInt(self) -> long"""
3292 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3294 def Clone(*args
, **kwargs
):
3295 """Clone(self) -> Event"""
3296 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3299 class CommandEventPtr(CommandEvent
):
3300 def __init__(self
, this
):
3302 if not hasattr(self
,"thisown"): self
.thisown
= 0
3303 self
.__class
__ = CommandEvent
3304 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3306 #---------------------------------------------------------------------------
3308 class NotifyEvent(CommandEvent
):
3310 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3311 def __init__(self
, *args
, **kwargs
):
3312 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3313 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3314 self
.this
= newobj
.this
3317 def Veto(*args
, **kwargs
):
3319 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3321 def Allow(*args
, **kwargs
):
3323 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3325 def IsAllowed(*args
, **kwargs
):
3326 """IsAllowed(self) -> bool"""
3327 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3330 class NotifyEventPtr(NotifyEvent
):
3331 def __init__(self
, this
):
3333 if not hasattr(self
,"thisown"): self
.thisown
= 0
3334 self
.__class
__ = NotifyEvent
3335 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3337 #---------------------------------------------------------------------------
3339 class ScrollEvent(CommandEvent
):
3341 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3342 def __init__(self
, *args
, **kwargs
):
3344 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3345 int orient=0) -> ScrollEvent
3347 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3348 self
.this
= newobj
.this
3351 def GetOrientation(*args
, **kwargs
):
3352 """GetOrientation(self) -> int"""
3353 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3355 def GetPosition(*args
, **kwargs
):
3356 """GetPosition(self) -> int"""
3357 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3359 def SetOrientation(*args
, **kwargs
):
3360 """SetOrientation(self, int orient)"""
3361 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3363 def SetPosition(*args
, **kwargs
):
3364 """SetPosition(self, int pos)"""
3365 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3368 class ScrollEventPtr(ScrollEvent
):
3369 def __init__(self
, this
):
3371 if not hasattr(self
,"thisown"): self
.thisown
= 0
3372 self
.__class
__ = ScrollEvent
3373 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3375 #---------------------------------------------------------------------------
3377 class ScrollWinEvent(Event
):
3379 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3380 def __init__(self
, *args
, **kwargs
):
3381 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3382 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3383 self
.this
= newobj
.this
3386 def GetOrientation(*args
, **kwargs
):
3387 """GetOrientation(self) -> int"""
3388 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3390 def GetPosition(*args
, **kwargs
):
3391 """GetPosition(self) -> int"""
3392 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3394 def SetOrientation(*args
, **kwargs
):
3395 """SetOrientation(self, int orient)"""
3396 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3398 def SetPosition(*args
, **kwargs
):
3399 """SetPosition(self, int pos)"""
3400 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3403 class ScrollWinEventPtr(ScrollWinEvent
):
3404 def __init__(self
, this
):
3406 if not hasattr(self
,"thisown"): self
.thisown
= 0
3407 self
.__class
__ = ScrollWinEvent
3408 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3410 #---------------------------------------------------------------------------
3412 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3413 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3414 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3415 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3416 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3417 class MouseEvent(Event
):
3419 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3420 def __init__(self
, *args
, **kwargs
):
3421 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3422 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3423 self
.this
= newobj
.this
3426 def IsButton(*args
, **kwargs
):
3427 """IsButton(self) -> bool"""
3428 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
3430 def ButtonDown(*args
, **kwargs
):
3431 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3432 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
3434 def ButtonDClick(*args
, **kwargs
):
3435 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3436 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3438 def ButtonUp(*args
, **kwargs
):
3439 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3440 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
3442 def Button(*args
, **kwargs
):
3443 """Button(self, int but) -> bool"""
3444 return _core_
.MouseEvent_Button(*args
, **kwargs
)
3446 def ButtonIsDown(*args
, **kwargs
):
3447 """ButtonIsDown(self, int but) -> bool"""
3448 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3450 def GetButton(*args
, **kwargs
):
3451 """GetButton(self) -> int"""
3452 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
3454 def ControlDown(*args
, **kwargs
):
3455 """ControlDown(self) -> bool"""
3456 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
3458 def MetaDown(*args
, **kwargs
):
3459 """MetaDown(self) -> bool"""
3460 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
3462 def AltDown(*args
, **kwargs
):
3463 """AltDown(self) -> bool"""
3464 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
3466 def ShiftDown(*args
, **kwargs
):
3467 """ShiftDown(self) -> bool"""
3468 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
3470 def CmdDown(*args
, **kwargs
):
3472 CmdDown(self) -> bool
3474 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3475 platforms but the special "Apple" (a.k.a as "Command") key on
3476 Macs: it makes often sense to use it instead of, say, `ControlDown`
3477 because Cmd key is used for the same thing under Mac as Ctrl
3478 elsewhere. The Ctrl still exists, it's just not used for this
3479 purpose. So for non-Mac platforms this is the same as `ControlDown`
3480 and Macs this is the same as `MetaDown`.
3482 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
3484 def LeftDown(*args
, **kwargs
):
3485 """LeftDown(self) -> bool"""
3486 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
3488 def MiddleDown(*args
, **kwargs
):
3489 """MiddleDown(self) -> bool"""
3490 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
3492 def RightDown(*args
, **kwargs
):
3493 """RightDown(self) -> bool"""
3494 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
3496 def LeftUp(*args
, **kwargs
):
3497 """LeftUp(self) -> bool"""
3498 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
3500 def MiddleUp(*args
, **kwargs
):
3501 """MiddleUp(self) -> bool"""
3502 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
3504 def RightUp(*args
, **kwargs
):
3505 """RightUp(self) -> bool"""
3506 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
3508 def LeftDClick(*args
, **kwargs
):
3509 """LeftDClick(self) -> bool"""
3510 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
3512 def MiddleDClick(*args
, **kwargs
):
3513 """MiddleDClick(self) -> bool"""
3514 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3516 def RightDClick(*args
, **kwargs
):
3517 """RightDClick(self) -> bool"""
3518 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
3520 def LeftIsDown(*args
, **kwargs
):
3521 """LeftIsDown(self) -> bool"""
3522 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3524 def MiddleIsDown(*args
, **kwargs
):
3525 """MiddleIsDown(self) -> bool"""
3526 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3528 def RightIsDown(*args
, **kwargs
):
3529 """RightIsDown(self) -> bool"""
3530 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
3532 def Dragging(*args
, **kwargs
):
3533 """Dragging(self) -> bool"""
3534 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
3536 def Moving(*args
, **kwargs
):
3537 """Moving(self) -> bool"""
3538 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
3540 def Entering(*args
, **kwargs
):
3541 """Entering(self) -> bool"""
3542 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
3544 def Leaving(*args
, **kwargs
):
3545 """Leaving(self) -> bool"""
3546 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
3548 def GetPosition(*args
, **kwargs
):
3550 GetPosition(self) -> Point
3552 Returns the position of the mouse in window coordinates when the event
3555 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
3557 def GetPositionTuple(*args
, **kwargs
):
3559 GetPositionTuple() -> (x,y)
3561 Returns the position of the mouse in window coordinates when the event
3564 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3566 def GetLogicalPosition(*args
, **kwargs
):
3567 """GetLogicalPosition(self, DC dc) -> Point"""
3568 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3570 def GetX(*args
, **kwargs
):
3571 """GetX(self) -> int"""
3572 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
3574 def GetY(*args
, **kwargs
):
3575 """GetY(self) -> int"""
3576 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
3578 def GetWheelRotation(*args
, **kwargs
):
3579 """GetWheelRotation(self) -> int"""
3580 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3582 def GetWheelDelta(*args
, **kwargs
):
3583 """GetWheelDelta(self) -> int"""
3584 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3586 def GetLinesPerAction(*args
, **kwargs
):
3587 """GetLinesPerAction(self) -> int"""
3588 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3590 def IsPageScroll(*args
, **kwargs
):
3591 """IsPageScroll(self) -> bool"""
3592 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3594 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
3595 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
3596 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
3597 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
3598 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
3599 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
3600 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
3601 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
3602 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
3603 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
3604 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
3605 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
3607 class MouseEventPtr(MouseEvent
):
3608 def __init__(self
, this
):
3610 if not hasattr(self
,"thisown"): self
.thisown
= 0
3611 self
.__class
__ = MouseEvent
3612 _core_
.MouseEvent_swigregister(MouseEventPtr
)
3614 #---------------------------------------------------------------------------
3616 class SetCursorEvent(Event
):
3618 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3619 def __init__(self
, *args
, **kwargs
):
3620 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3621 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
3622 self
.this
= newobj
.this
3625 def GetX(*args
, **kwargs
):
3626 """GetX(self) -> int"""
3627 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
3629 def GetY(*args
, **kwargs
):
3630 """GetY(self) -> int"""
3631 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
3633 def SetCursor(*args
, **kwargs
):
3634 """SetCursor(self, Cursor cursor)"""
3635 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3637 def GetCursor(*args
, **kwargs
):
3638 """GetCursor(self) -> Cursor"""
3639 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3641 def HasCursor(*args
, **kwargs
):
3642 """HasCursor(self) -> bool"""
3643 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3646 class SetCursorEventPtr(SetCursorEvent
):
3647 def __init__(self
, this
):
3649 if not hasattr(self
,"thisown"): self
.thisown
= 0
3650 self
.__class
__ = SetCursorEvent
3651 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3653 #---------------------------------------------------------------------------
3655 class KeyEvent(Event
):
3657 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3658 def __init__(self
, *args
, **kwargs
):
3659 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3660 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
3661 self
.this
= newobj
.this
3664 def ControlDown(*args
, **kwargs
):
3665 """ControlDown(self) -> bool"""
3666 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
3668 def MetaDown(*args
, **kwargs
):
3669 """MetaDown(self) -> bool"""
3670 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
3672 def AltDown(*args
, **kwargs
):
3673 """AltDown(self) -> bool"""
3674 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
3676 def ShiftDown(*args
, **kwargs
):
3677 """ShiftDown(self) -> bool"""
3678 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
3680 def CmdDown(*args
, **kwargs
):
3682 CmdDown(self) -> bool
3684 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3685 platforms but the special "Apple" (a.k.a as "Command") key on
3686 Macs: it makes often sense to use it instead of, say, `ControlDown`
3687 because Cmd key is used for the same thing under Mac as Ctrl
3688 elsewhere. The Ctrl still exists, it's just not used for this
3689 purpose. So for non-Mac platforms this is the same as `ControlDown`
3690 and Macs this is the same as `MetaDown`.
3692 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
3694 def HasModifiers(*args
, **kwargs
):
3695 """HasModifiers(self) -> bool"""
3696 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
3698 def GetKeyCode(*args
, **kwargs
):
3699 """GetKeyCode(self) -> int"""
3700 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3702 KeyCode
= GetKeyCode
3703 def GetUnicodeKey(*args
, **kwargs
):
3704 """GetUnicodeKey(self) -> int"""
3705 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
3707 GetUniChar
= GetUnicodeKey
3708 def GetRawKeyCode(*args
, **kwargs
):
3709 """GetRawKeyCode(self) -> unsigned int"""
3710 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3712 def GetRawKeyFlags(*args
, **kwargs
):
3713 """GetRawKeyFlags(self) -> unsigned int"""
3714 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3716 def GetPosition(*args
, **kwargs
):
3718 GetPosition(self) -> Point
3720 Find the position of the event.
3722 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
3724 def GetPositionTuple(*args
, **kwargs
):
3726 GetPositionTuple() -> (x,y)
3728 Find the position of the event.
3730 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3732 def GetX(*args
, **kwargs
):
3733 """GetX(self) -> int"""
3734 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
3736 def GetY(*args
, **kwargs
):
3737 """GetY(self) -> int"""
3738 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
3740 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
3741 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
3742 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
3743 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
3744 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
3745 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
3746 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
3747 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
3748 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
3749 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
3751 class KeyEventPtr(KeyEvent
):
3752 def __init__(self
, this
):
3754 if not hasattr(self
,"thisown"): self
.thisown
= 0
3755 self
.__class
__ = KeyEvent
3756 _core_
.KeyEvent_swigregister(KeyEventPtr
)
3758 #---------------------------------------------------------------------------
3760 class SizeEvent(Event
):
3762 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3763 def __init__(self
, *args
, **kwargs
):
3764 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3765 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
3766 self
.this
= newobj
.this
3769 def GetSize(*args
, **kwargs
):
3770 """GetSize(self) -> Size"""
3771 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
3773 def GetRect(*args
, **kwargs
):
3774 """GetRect(self) -> Rect"""
3775 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
3777 def SetRect(*args
, **kwargs
):
3778 """SetRect(self, Rect rect)"""
3779 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
3781 def SetSize(*args
, **kwargs
):
3782 """SetSize(self, Size size)"""
3783 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
3785 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
3786 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
3788 class SizeEventPtr(SizeEvent
):
3789 def __init__(self
, this
):
3791 if not hasattr(self
,"thisown"): self
.thisown
= 0
3792 self
.__class
__ = SizeEvent
3793 _core_
.SizeEvent_swigregister(SizeEventPtr
)
3795 #---------------------------------------------------------------------------
3797 class MoveEvent(Event
):
3799 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3800 def __init__(self
, *args
, **kwargs
):
3801 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3802 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
3803 self
.this
= newobj
.this
3806 def GetPosition(*args
, **kwargs
):
3807 """GetPosition(self) -> Point"""
3808 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
3810 def GetRect(*args
, **kwargs
):
3811 """GetRect(self) -> Rect"""
3812 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
3814 def SetRect(*args
, **kwargs
):
3815 """SetRect(self, Rect rect)"""
3816 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
3818 def SetPosition(*args
, **kwargs
):
3819 """SetPosition(self, Point pos)"""
3820 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
3822 m_pos
= property(_core_
.MoveEvent_m_pos_get
, _core_
.MoveEvent_m_pos_set
)
3823 m_rect
= property(_core_
.MoveEvent_m_rect_get
, _core_
.MoveEvent_m_rect_set
)
3825 class MoveEventPtr(MoveEvent
):
3826 def __init__(self
, this
):
3828 if not hasattr(self
,"thisown"): self
.thisown
= 0
3829 self
.__class
__ = MoveEvent
3830 _core_
.MoveEvent_swigregister(MoveEventPtr
)
3832 #---------------------------------------------------------------------------
3834 class PaintEvent(Event
):
3836 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3837 def __init__(self
, *args
, **kwargs
):
3838 """__init__(self, int Id=0) -> PaintEvent"""
3839 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
3840 self
.this
= newobj
.this
3844 class PaintEventPtr(PaintEvent
):
3845 def __init__(self
, this
):
3847 if not hasattr(self
,"thisown"): self
.thisown
= 0
3848 self
.__class
__ = PaintEvent
3849 _core_
.PaintEvent_swigregister(PaintEventPtr
)
3851 class NcPaintEvent(Event
):
3853 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3854 def __init__(self
, *args
, **kwargs
):
3855 """__init__(self, int winid=0) -> NcPaintEvent"""
3856 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
3857 self
.this
= newobj
.this
3861 class NcPaintEventPtr(NcPaintEvent
):
3862 def __init__(self
, this
):
3864 if not hasattr(self
,"thisown"): self
.thisown
= 0
3865 self
.__class
__ = NcPaintEvent
3866 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
3868 #---------------------------------------------------------------------------
3870 class EraseEvent(Event
):
3872 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3873 def __init__(self
, *args
, **kwargs
):
3874 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3875 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
3876 self
.this
= newobj
.this
3879 def GetDC(*args
, **kwargs
):
3880 """GetDC(self) -> DC"""
3881 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
3884 class EraseEventPtr(EraseEvent
):
3885 def __init__(self
, this
):
3887 if not hasattr(self
,"thisown"): self
.thisown
= 0
3888 self
.__class
__ = EraseEvent
3889 _core_
.EraseEvent_swigregister(EraseEventPtr
)
3891 #---------------------------------------------------------------------------
3893 class FocusEvent(Event
):
3895 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3896 def __init__(self
, *args
, **kwargs
):
3897 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
3898 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
3899 self
.this
= newobj
.this
3902 def GetWindow(*args
, **kwargs
):
3903 """GetWindow(self) -> Window"""
3904 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
3906 def SetWindow(*args
, **kwargs
):
3907 """SetWindow(self, Window win)"""
3908 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
3911 class FocusEventPtr(FocusEvent
):
3912 def __init__(self
, this
):
3914 if not hasattr(self
,"thisown"): self
.thisown
= 0
3915 self
.__class
__ = FocusEvent
3916 _core_
.FocusEvent_swigregister(FocusEventPtr
)
3918 #---------------------------------------------------------------------------
3920 class ChildFocusEvent(CommandEvent
):
3922 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3923 def __init__(self
, *args
, **kwargs
):
3924 """__init__(self, Window win=None) -> ChildFocusEvent"""
3925 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
3926 self
.this
= newobj
.this
3929 def GetWindow(*args
, **kwargs
):
3930 """GetWindow(self) -> Window"""
3931 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
3934 class ChildFocusEventPtr(ChildFocusEvent
):
3935 def __init__(self
, this
):
3937 if not hasattr(self
,"thisown"): self
.thisown
= 0
3938 self
.__class
__ = ChildFocusEvent
3939 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
3941 #---------------------------------------------------------------------------
3943 class ActivateEvent(Event
):
3945 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3946 def __init__(self
, *args
, **kwargs
):
3947 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
3948 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
3949 self
.this
= newobj
.this
3952 def GetActive(*args
, **kwargs
):
3953 """GetActive(self) -> bool"""
3954 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
3957 class ActivateEventPtr(ActivateEvent
):
3958 def __init__(self
, this
):
3960 if not hasattr(self
,"thisown"): self
.thisown
= 0
3961 self
.__class
__ = ActivateEvent
3962 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
3964 #---------------------------------------------------------------------------
3966 class InitDialogEvent(Event
):
3968 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3969 def __init__(self
, *args
, **kwargs
):
3970 """__init__(self, int Id=0) -> InitDialogEvent"""
3971 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
3972 self
.this
= newobj
.this
3976 class InitDialogEventPtr(InitDialogEvent
):
3977 def __init__(self
, this
):
3979 if not hasattr(self
,"thisown"): self
.thisown
= 0
3980 self
.__class
__ = InitDialogEvent
3981 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
3983 #---------------------------------------------------------------------------
3985 class MenuEvent(Event
):
3987 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3988 def __init__(self
, *args
, **kwargs
):
3989 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
3990 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
3991 self
.this
= newobj
.this
3994 def GetMenuId(*args
, **kwargs
):
3995 """GetMenuId(self) -> int"""
3996 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
3998 def IsPopup(*args
, **kwargs
):
3999 """IsPopup(self) -> bool"""
4000 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4002 def GetMenu(*args
, **kwargs
):
4003 """GetMenu(self) -> Menu"""
4004 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4007 class MenuEventPtr(MenuEvent
):
4008 def __init__(self
, this
):
4010 if not hasattr(self
,"thisown"): self
.thisown
= 0
4011 self
.__class
__ = MenuEvent
4012 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4014 #---------------------------------------------------------------------------
4016 class CloseEvent(Event
):
4018 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4019 def __init__(self
, *args
, **kwargs
):
4020 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4021 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4022 self
.this
= newobj
.this
4025 def SetLoggingOff(*args
, **kwargs
):
4026 """SetLoggingOff(self, bool logOff)"""
4027 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4029 def GetLoggingOff(*args
, **kwargs
):
4030 """GetLoggingOff(self) -> bool"""
4031 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4033 def Veto(*args
, **kwargs
):
4034 """Veto(self, bool veto=True)"""
4035 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4037 def SetCanVeto(*args
, **kwargs
):
4038 """SetCanVeto(self, bool canVeto)"""
4039 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4041 def CanVeto(*args
, **kwargs
):
4042 """CanVeto(self) -> bool"""
4043 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4045 def GetVeto(*args
, **kwargs
):
4046 """GetVeto(self) -> bool"""
4047 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4050 class CloseEventPtr(CloseEvent
):
4051 def __init__(self
, this
):
4053 if not hasattr(self
,"thisown"): self
.thisown
= 0
4054 self
.__class
__ = CloseEvent
4055 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4057 #---------------------------------------------------------------------------
4059 class ShowEvent(Event
):
4061 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4062 def __init__(self
, *args
, **kwargs
):
4063 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4064 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4065 self
.this
= newobj
.this
4068 def SetShow(*args
, **kwargs
):
4069 """SetShow(self, bool show)"""
4070 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4072 def GetShow(*args
, **kwargs
):
4073 """GetShow(self) -> bool"""
4074 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4077 class ShowEventPtr(ShowEvent
):
4078 def __init__(self
, this
):
4080 if not hasattr(self
,"thisown"): self
.thisown
= 0
4081 self
.__class
__ = ShowEvent
4082 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4084 #---------------------------------------------------------------------------
4086 class IconizeEvent(Event
):
4088 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4089 def __init__(self
, *args
, **kwargs
):
4090 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4091 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4092 self
.this
= newobj
.this
4095 def Iconized(*args
, **kwargs
):
4096 """Iconized(self) -> bool"""
4097 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4100 class IconizeEventPtr(IconizeEvent
):
4101 def __init__(self
, this
):
4103 if not hasattr(self
,"thisown"): self
.thisown
= 0
4104 self
.__class
__ = IconizeEvent
4105 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4107 #---------------------------------------------------------------------------
4109 class MaximizeEvent(Event
):
4111 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4112 def __init__(self
, *args
, **kwargs
):
4113 """__init__(self, int id=0) -> MaximizeEvent"""
4114 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4115 self
.this
= newobj
.this
4119 class MaximizeEventPtr(MaximizeEvent
):
4120 def __init__(self
, this
):
4122 if not hasattr(self
,"thisown"): self
.thisown
= 0
4123 self
.__class
__ = MaximizeEvent
4124 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4126 #---------------------------------------------------------------------------
4128 class DropFilesEvent(Event
):
4129 def __init__(self
): raise RuntimeError, "No constructor defined"
4131 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4132 def GetPosition(*args
, **kwargs
):
4133 """GetPosition(self) -> Point"""
4134 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4136 def GetNumberOfFiles(*args
, **kwargs
):
4137 """GetNumberOfFiles(self) -> int"""
4138 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4140 def GetFiles(*args
, **kwargs
):
4141 """GetFiles(self) -> PyObject"""
4142 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4145 class DropFilesEventPtr(DropFilesEvent
):
4146 def __init__(self
, this
):
4148 if not hasattr(self
,"thisown"): self
.thisown
= 0
4149 self
.__class
__ = DropFilesEvent
4150 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4152 #---------------------------------------------------------------------------
4154 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4155 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4156 class UpdateUIEvent(CommandEvent
):
4158 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4159 def __init__(self
, *args
, **kwargs
):
4160 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4161 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4162 self
.this
= newobj
.this
4165 def GetChecked(*args
, **kwargs
):
4166 """GetChecked(self) -> bool"""
4167 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4169 def GetEnabled(*args
, **kwargs
):
4170 """GetEnabled(self) -> bool"""
4171 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4173 def GetText(*args
, **kwargs
):
4174 """GetText(self) -> String"""
4175 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4177 def GetSetText(*args
, **kwargs
):
4178 """GetSetText(self) -> bool"""
4179 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4181 def GetSetChecked(*args
, **kwargs
):
4182 """GetSetChecked(self) -> bool"""
4183 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4185 def GetSetEnabled(*args
, **kwargs
):
4186 """GetSetEnabled(self) -> bool"""
4187 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4189 def Check(*args
, **kwargs
):
4190 """Check(self, bool check)"""
4191 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4193 def Enable(*args
, **kwargs
):
4194 """Enable(self, bool enable)"""
4195 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4197 def SetText(*args
, **kwargs
):
4198 """SetText(self, String text)"""
4199 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4201 def SetUpdateInterval(*args
, **kwargs
):
4202 """SetUpdateInterval(long updateInterval)"""
4203 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4205 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4206 def GetUpdateInterval(*args
, **kwargs
):
4207 """GetUpdateInterval() -> long"""
4208 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4210 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4211 def CanUpdate(*args
, **kwargs
):
4212 """CanUpdate(Window win) -> bool"""
4213 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4215 CanUpdate
= staticmethod(CanUpdate
)
4216 def ResetUpdateTime(*args
, **kwargs
):
4217 """ResetUpdateTime()"""
4218 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4220 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4221 def SetMode(*args
, **kwargs
):
4222 """SetMode(int mode)"""
4223 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4225 SetMode
= staticmethod(SetMode
)
4226 def GetMode(*args
, **kwargs
):
4227 """GetMode() -> int"""
4228 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4230 GetMode
= staticmethod(GetMode
)
4232 class UpdateUIEventPtr(UpdateUIEvent
):
4233 def __init__(self
, this
):
4235 if not hasattr(self
,"thisown"): self
.thisown
= 0
4236 self
.__class
__ = UpdateUIEvent
4237 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4239 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4240 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4241 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4243 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4244 """UpdateUIEvent_GetUpdateInterval() -> long"""
4245 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4247 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4248 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4249 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4251 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4252 """UpdateUIEvent_ResetUpdateTime()"""
4253 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4255 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4256 """UpdateUIEvent_SetMode(int mode)"""
4257 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4259 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4260 """UpdateUIEvent_GetMode() -> int"""
4261 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4263 #---------------------------------------------------------------------------
4265 class SysColourChangedEvent(Event
):
4267 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4268 def __init__(self
, *args
, **kwargs
):
4269 """__init__(self) -> SysColourChangedEvent"""
4270 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
4271 self
.this
= newobj
.this
4275 class SysColourChangedEventPtr(SysColourChangedEvent
):
4276 def __init__(self
, this
):
4278 if not hasattr(self
,"thisown"): self
.thisown
= 0
4279 self
.__class
__ = SysColourChangedEvent
4280 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4282 #---------------------------------------------------------------------------
4284 class MouseCaptureChangedEvent(Event
):
4286 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4287 def __init__(self
, *args
, **kwargs
):
4288 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4289 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4290 self
.this
= newobj
.this
4293 def GetCapturedWindow(*args
, **kwargs
):
4294 """GetCapturedWindow(self) -> Window"""
4295 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4298 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4299 def __init__(self
, this
):
4301 if not hasattr(self
,"thisown"): self
.thisown
= 0
4302 self
.__class
__ = MouseCaptureChangedEvent
4303 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4305 #---------------------------------------------------------------------------
4307 class DisplayChangedEvent(Event
):
4309 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4310 def __init__(self
, *args
, **kwargs
):
4311 """__init__(self) -> DisplayChangedEvent"""
4312 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
4313 self
.this
= newobj
.this
4317 class DisplayChangedEventPtr(DisplayChangedEvent
):
4318 def __init__(self
, this
):
4320 if not hasattr(self
,"thisown"): self
.thisown
= 0
4321 self
.__class
__ = DisplayChangedEvent
4322 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4324 #---------------------------------------------------------------------------
4326 class PaletteChangedEvent(Event
):
4328 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4329 def __init__(self
, *args
, **kwargs
):
4330 """__init__(self, int id=0) -> PaletteChangedEvent"""
4331 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
4332 self
.this
= newobj
.this
4335 def SetChangedWindow(*args
, **kwargs
):
4336 """SetChangedWindow(self, Window win)"""
4337 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4339 def GetChangedWindow(*args
, **kwargs
):
4340 """GetChangedWindow(self) -> Window"""
4341 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4344 class PaletteChangedEventPtr(PaletteChangedEvent
):
4345 def __init__(self
, this
):
4347 if not hasattr(self
,"thisown"): self
.thisown
= 0
4348 self
.__class
__ = PaletteChangedEvent
4349 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4351 #---------------------------------------------------------------------------
4353 class QueryNewPaletteEvent(Event
):
4355 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4356 def __init__(self
, *args
, **kwargs
):
4357 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4358 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4359 self
.this
= newobj
.this
4362 def SetPaletteRealized(*args
, **kwargs
):
4363 """SetPaletteRealized(self, bool realized)"""
4364 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4366 def GetPaletteRealized(*args
, **kwargs
):
4367 """GetPaletteRealized(self) -> bool"""
4368 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4371 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4372 def __init__(self
, this
):
4374 if not hasattr(self
,"thisown"): self
.thisown
= 0
4375 self
.__class
__ = QueryNewPaletteEvent
4376 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4378 #---------------------------------------------------------------------------
4380 class NavigationKeyEvent(Event
):
4382 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4383 def __init__(self
, *args
, **kwargs
):
4384 """__init__(self) -> NavigationKeyEvent"""
4385 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
4386 self
.this
= newobj
.this
4389 def GetDirection(*args
, **kwargs
):
4390 """GetDirection(self) -> bool"""
4391 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4393 def SetDirection(*args
, **kwargs
):
4394 """SetDirection(self, bool forward)"""
4395 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4397 def IsWindowChange(*args
, **kwargs
):
4398 """IsWindowChange(self) -> bool"""
4399 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4401 def SetWindowChange(*args
, **kwargs
):
4402 """SetWindowChange(self, bool ischange)"""
4403 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4405 def SetFlags(*args
, **kwargs
):
4406 """SetFlags(self, long flags)"""
4407 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
4409 def GetCurrentFocus(*args
, **kwargs
):
4410 """GetCurrentFocus(self) -> Window"""
4411 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4413 def SetCurrentFocus(*args
, **kwargs
):
4414 """SetCurrentFocus(self, Window win)"""
4415 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4417 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
4418 IsForward
= _core_
.NavigationKeyEvent_IsForward
4419 WinChange
= _core_
.NavigationKeyEvent_WinChange
4421 class NavigationKeyEventPtr(NavigationKeyEvent
):
4422 def __init__(self
, this
):
4424 if not hasattr(self
,"thisown"): self
.thisown
= 0
4425 self
.__class
__ = NavigationKeyEvent
4426 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4428 #---------------------------------------------------------------------------
4430 class WindowCreateEvent(CommandEvent
):
4432 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4433 def __init__(self
, *args
, **kwargs
):
4434 """__init__(self, Window win=None) -> WindowCreateEvent"""
4435 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
4436 self
.this
= newobj
.this
4439 def GetWindow(*args
, **kwargs
):
4440 """GetWindow(self) -> Window"""
4441 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4444 class WindowCreateEventPtr(WindowCreateEvent
):
4445 def __init__(self
, this
):
4447 if not hasattr(self
,"thisown"): self
.thisown
= 0
4448 self
.__class
__ = WindowCreateEvent
4449 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4451 class WindowDestroyEvent(CommandEvent
):
4453 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4454 def __init__(self
, *args
, **kwargs
):
4455 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4456 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
4457 self
.this
= newobj
.this
4460 def GetWindow(*args
, **kwargs
):
4461 """GetWindow(self) -> Window"""
4462 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4465 class WindowDestroyEventPtr(WindowDestroyEvent
):
4466 def __init__(self
, this
):
4468 if not hasattr(self
,"thisown"): self
.thisown
= 0
4469 self
.__class
__ = WindowDestroyEvent
4470 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4472 #---------------------------------------------------------------------------
4474 class ContextMenuEvent(CommandEvent
):
4476 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4477 def __init__(self
, *args
, **kwargs
):
4478 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4479 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
4480 self
.this
= newobj
.this
4483 def GetPosition(*args
, **kwargs
):
4484 """GetPosition(self) -> Point"""
4485 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4487 def SetPosition(*args
, **kwargs
):
4488 """SetPosition(self, Point pos)"""
4489 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4492 class ContextMenuEventPtr(ContextMenuEvent
):
4493 def __init__(self
, this
):
4495 if not hasattr(self
,"thisown"): self
.thisown
= 0
4496 self
.__class
__ = ContextMenuEvent
4497 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4499 #---------------------------------------------------------------------------
4501 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
4502 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
4503 class IdleEvent(Event
):
4505 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4506 def __init__(self
, *args
, **kwargs
):
4507 """__init__(self) -> IdleEvent"""
4508 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
4509 self
.this
= newobj
.this
4512 def RequestMore(*args
, **kwargs
):
4513 """RequestMore(self, bool needMore=True)"""
4514 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
4516 def MoreRequested(*args
, **kwargs
):
4517 """MoreRequested(self) -> bool"""
4518 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
4520 def SetMode(*args
, **kwargs
):
4521 """SetMode(int mode)"""
4522 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4524 SetMode
= staticmethod(SetMode
)
4525 def GetMode(*args
, **kwargs
):
4526 """GetMode() -> int"""
4527 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4529 GetMode
= staticmethod(GetMode
)
4530 def CanSend(*args
, **kwargs
):
4531 """CanSend(Window win) -> bool"""
4532 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4534 CanSend
= staticmethod(CanSend
)
4536 class IdleEventPtr(IdleEvent
):
4537 def __init__(self
, this
):
4539 if not hasattr(self
,"thisown"): self
.thisown
= 0
4540 self
.__class
__ = IdleEvent
4541 _core_
.IdleEvent_swigregister(IdleEventPtr
)
4543 def IdleEvent_SetMode(*args
, **kwargs
):
4544 """IdleEvent_SetMode(int mode)"""
4545 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4547 def IdleEvent_GetMode(*args
, **kwargs
):
4548 """IdleEvent_GetMode() -> int"""
4549 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4551 def IdleEvent_CanSend(*args
, **kwargs
):
4552 """IdleEvent_CanSend(Window win) -> bool"""
4553 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4555 #---------------------------------------------------------------------------
4557 class PyEvent(Event
):
4559 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4560 def __init__(self
, *args
, **kwargs
):
4561 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4562 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
4563 self
.this
= newobj
.this
4568 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
4571 if self
.thisown
: destroy(self
)
4574 def SetSelf(*args
, **kwargs
):
4575 """SetSelf(self, PyObject self)"""
4576 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
4578 def GetSelf(*args
, **kwargs
):
4579 """GetSelf(self) -> PyObject"""
4580 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
4583 class PyEventPtr(PyEvent
):
4584 def __init__(self
, this
):
4586 if not hasattr(self
,"thisown"): self
.thisown
= 0
4587 self
.__class
__ = PyEvent
4588 _core_
.PyEvent_swigregister(PyEventPtr
)
4590 class PyCommandEvent(CommandEvent
):
4592 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4593 def __init__(self
, *args
, **kwargs
):
4594 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4595 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
4596 self
.this
= newobj
.this
4601 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
4604 if self
.thisown
: destroy(self
)
4607 def SetSelf(*args
, **kwargs
):
4608 """SetSelf(self, PyObject self)"""
4609 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4611 def GetSelf(*args
, **kwargs
):
4612 """GetSelf(self) -> PyObject"""
4613 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4616 class PyCommandEventPtr(PyCommandEvent
):
4617 def __init__(self
, this
):
4619 if not hasattr(self
,"thisown"): self
.thisown
= 0
4620 self
.__class
__ = PyCommandEvent
4621 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4623 #---------------------------------------------------------------------------
4625 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
4626 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
4627 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
4628 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
4629 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
4630 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
4631 class PyApp(EvtHandler
):
4633 The ``wx.PyApp`` class is an *implementation detail*, please use the
4634 `wx.App` class (or some other derived class) instead.
4637 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4638 def __init__(self
, *args
, **kwargs
):
4640 __init__(self) -> PyApp
4642 Create a new application object, starting the bootstrap process.
4644 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
4645 self
.this
= newobj
.this
4648 self
._setCallbackInfo
(self
, PyApp
)
4649 self
._setOORInfo
(self
)
4651 def __del__(self
, destroy
=_core_
.delete_PyApp
):
4654 if self
.thisown
: destroy(self
)
4657 def _setCallbackInfo(*args
, **kwargs
):
4658 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4659 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
4661 def GetAppName(*args
, **kwargs
):
4663 GetAppName(self) -> String
4665 Get the application name.
4667 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
4669 def SetAppName(*args
, **kwargs
):
4671 SetAppName(self, String name)
4673 Set the application name. This value may be used automatically by
4674 `wx.Config` and such.
4676 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
4678 def GetClassName(*args
, **kwargs
):
4680 GetClassName(self) -> String
4682 Get the application's class name.
4684 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
4686 def SetClassName(*args
, **kwargs
):
4688 SetClassName(self, String name)
4690 Set the application's class name. This value may be used for
4691 X-resources if applicable for the platform
4693 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
4695 def GetVendorName(*args
, **kwargs
):
4697 GetVendorName(self) -> String
4699 Get the application's vendor name.
4701 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
4703 def SetVendorName(*args
, **kwargs
):
4705 SetVendorName(self, String name)
4707 Set the application's vendor name. This value may be used
4708 automatically by `wx.Config` and such.
4710 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
4712 def GetTraits(*args
, **kwargs
):
4714 GetTraits(self) -> wxAppTraits
4716 Return (and create if necessary) the app traits object to which we
4717 delegate for everything which either should be configurable by the
4718 user (then he can change the default behaviour simply by overriding
4719 CreateTraits() and returning his own traits object) or which is
4720 GUI/console dependent as then wx.AppTraits allows us to abstract the
4721 differences behind the common facade.
4723 :todo: Add support for overriding CreateAppTraits in wxPython.
4725 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
4727 def ProcessPendingEvents(*args
, **kwargs
):
4729 ProcessPendingEvents(self)
4731 Process all events in the Pending Events list -- it is necessary to
4732 call this function to process posted events. This normally happens
4733 during each event loop iteration.
4735 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4737 def Yield(*args
, **kwargs
):
4739 Yield(self, bool onlyIfNeeded=False) -> bool
4741 Process all currently pending events right now, instead of waiting
4742 until return to the event loop. It is an error to call ``Yield``
4743 recursively unless the value of ``onlyIfNeeded`` is True.
4745 :warning: This function is dangerous as it can lead to unexpected
4746 reentrancies (i.e. when called from an event handler it may
4747 result in calling the same event handler again), use with
4748 extreme care or, better, don't use at all!
4750 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4753 return _core_
.PyApp_Yield(*args
, **kwargs
)
4755 def WakeUpIdle(*args
, **kwargs
):
4759 Make sure that idle events are sent again.
4760 :see: `wx.WakeUpIdle`
4762 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
4764 def IsMainLoopRunning(*args
, **kwargs
):
4766 IsMainLoopRunning() -> bool
4768 Returns True if we're running the main loop, i.e. if the events can
4769 currently be dispatched.
4771 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
4773 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
4774 def MainLoop(*args
, **kwargs
):
4776 MainLoop(self) -> int
4778 Execute the main GUI loop, the function doesn't normally return until
4779 all top level windows have been closed and destroyed.
4781 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
4783 def Exit(*args
, **kwargs
):
4787 Exit the main loop thus terminating the application.
4790 return _core_
.PyApp_Exit(*args
, **kwargs
)
4792 def ExitMainLoop(*args
, **kwargs
):
4796 Exit the main GUI loop during the next iteration of the main
4797 loop, (i.e. it does not stop the program immediately!)
4799 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
4801 def Pending(*args
, **kwargs
):
4803 Pending(self) -> bool
4805 Returns True if there are unprocessed events in the event queue.
4807 return _core_
.PyApp_Pending(*args
, **kwargs
)
4809 def Dispatch(*args
, **kwargs
):
4811 Dispatch(self) -> bool
4813 Process the first event in the event queue (blocks until an event
4814 appears if there are none currently)
4816 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
4818 def ProcessIdle(*args
, **kwargs
):
4820 ProcessIdle(self) -> bool
4822 Called from the MainLoop when the application becomes idle (there are
4823 no pending events) and sends a `wx.IdleEvent` to all interested
4824 parties. Returns True if more idle events are needed, False if not.
4826 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
4828 def SendIdleEvents(*args
, **kwargs
):
4830 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4832 Send idle event to window and all subwindows. Returns True if more
4833 idle time is requested.
4835 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
4837 def IsActive(*args
, **kwargs
):
4839 IsActive(self) -> bool
4841 Return True if our app has focus.
4843 return _core_
.PyApp_IsActive(*args
, **kwargs
)
4845 def SetTopWindow(*args
, **kwargs
):
4847 SetTopWindow(self, Window win)
4849 Set the *main* top level window
4851 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
4853 def GetTopWindow(*args
, **kwargs
):
4855 GetTopWindow(self) -> Window
4857 Return the *main* top level window (if it hadn't been set previously
4858 with SetTopWindow(), will return just some top level window and, if
4859 there not any, will return None)
4861 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
4863 def SetExitOnFrameDelete(*args
, **kwargs
):
4865 SetExitOnFrameDelete(self, bool flag)
4867 Control the exit behaviour: by default, the program will exit the main
4868 loop (and so, usually, terminate) when the last top-level program
4869 window is deleted. Beware that if you disable this behaviour (with
4870 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
4871 explicitly from somewhere.
4873 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
4875 def GetExitOnFrameDelete(*args
, **kwargs
):
4877 GetExitOnFrameDelete(self) -> bool
4879 Get the current exit behaviour setting.
4881 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
4883 def SetUseBestVisual(*args
, **kwargs
):
4885 SetUseBestVisual(self, bool flag)
4887 Set whether the app should try to use the best available visual on
4888 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
4890 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
4892 def GetUseBestVisual(*args
, **kwargs
):
4894 GetUseBestVisual(self) -> bool
4896 Get current UseBestVisual setting.
4898 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
4900 def SetPrintMode(*args
, **kwargs
):
4901 """SetPrintMode(self, int mode)"""
4902 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
4904 def GetPrintMode(*args
, **kwargs
):
4905 """GetPrintMode(self) -> int"""
4906 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
4908 def SetAssertMode(*args
, **kwargs
):
4910 SetAssertMode(self, int mode)
4912 Set the OnAssert behaviour for debug and hybrid builds.
4914 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
4916 def GetAssertMode(*args
, **kwargs
):
4918 GetAssertMode(self) -> int
4920 Get the current OnAssert behaviour setting.
4922 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
4924 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4925 """GetMacSupportPCMenuShortcuts() -> bool"""
4926 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4928 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
4929 def GetMacAboutMenuItemId(*args
, **kwargs
):
4930 """GetMacAboutMenuItemId() -> long"""
4931 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
4933 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
4934 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
4935 """GetMacPreferencesMenuItemId() -> long"""
4936 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
4938 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
4939 def GetMacExitMenuItemId(*args
, **kwargs
):
4940 """GetMacExitMenuItemId() -> long"""
4941 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
4943 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
4944 def GetMacHelpMenuTitleName(*args
, **kwargs
):
4945 """GetMacHelpMenuTitleName() -> String"""
4946 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
4948 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
4949 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4950 """SetMacSupportPCMenuShortcuts(bool val)"""
4951 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4953 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
4954 def SetMacAboutMenuItemId(*args
, **kwargs
):
4955 """SetMacAboutMenuItemId(long val)"""
4956 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
4958 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
4959 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
4960 """SetMacPreferencesMenuItemId(long val)"""
4961 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
4963 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
4964 def SetMacExitMenuItemId(*args
, **kwargs
):
4965 """SetMacExitMenuItemId(long val)"""
4966 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
4968 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
4969 def SetMacHelpMenuTitleName(*args
, **kwargs
):
4970 """SetMacHelpMenuTitleName(String val)"""
4971 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
4973 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
4974 def _BootstrapApp(*args
, **kwargs
):
4978 For internal use only
4980 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
4982 def GetComCtl32Version(*args
, **kwargs
):
4984 GetComCtl32Version() -> int
4986 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
4987 it wasn't found at all. Raises an exception on non-Windows platforms.
4989 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
4991 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
4993 class PyAppPtr(PyApp
):
4994 def __init__(self
, this
):
4996 if not hasattr(self
,"thisown"): self
.thisown
= 0
4997 self
.__class
__ = PyApp
4998 _core_
.PyApp_swigregister(PyAppPtr
)
5000 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5002 PyApp_IsMainLoopRunning() -> bool
5004 Returns True if we're running the main loop, i.e. if the events can
5005 currently be dispatched.
5007 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5009 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5010 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5011 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5013 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5014 """PyApp_GetMacAboutMenuItemId() -> long"""
5015 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5017 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5018 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5019 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5021 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5022 """PyApp_GetMacExitMenuItemId() -> long"""
5023 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5025 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5026 """PyApp_GetMacHelpMenuTitleName() -> String"""
5027 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5029 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5030 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5031 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5033 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5034 """PyApp_SetMacAboutMenuItemId(long val)"""
5035 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5037 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5038 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5039 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5041 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5042 """PyApp_SetMacExitMenuItemId(long val)"""
5043 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5045 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5046 """PyApp_SetMacHelpMenuTitleName(String val)"""
5047 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5049 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5051 PyApp_GetComCtl32Version() -> int
5053 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5054 it wasn't found at all. Raises an exception on non-Windows platforms.
5056 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5058 #---------------------------------------------------------------------------
5061 def Exit(*args
, **kwargs
):
5065 Force an exit of the application. Convenience for wx.GetApp().Exit()
5067 return _core_
.Exit(*args
, **kwargs
)
5069 def Yield(*args
, **kwargs
):
5073 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5075 return _core_
.Yield(*args
, **kwargs
)
5077 def YieldIfNeeded(*args
, **kwargs
):
5079 YieldIfNeeded() -> bool
5081 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5083 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5085 def SafeYield(*args
, **kwargs
):
5087 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5089 This function is similar to `wx.Yield`, except that it disables the
5090 user input to all program windows before calling `wx.Yield` and
5091 re-enables it again afterwards. If ``win`` is not None, this window
5092 will remain enabled, allowing the implementation of some limited user
5095 :Returns: the result of the call to `wx.Yield`.
5097 return _core_
.SafeYield(*args
, **kwargs
)
5099 def WakeUpIdle(*args
, **kwargs
):
5103 Cause the message queue to become empty again, so idle events will be
5106 return _core_
.WakeUpIdle(*args
, **kwargs
)
5108 def PostEvent(*args
, **kwargs
):
5110 PostEvent(EvtHandler dest, Event event)
5112 Send an event to a window or other wx.EvtHandler to be processed
5115 return _core_
.PostEvent(*args
, **kwargs
)
5117 def App_CleanUp(*args
, **kwargs
):
5121 For internal use only, it is used to cleanup after wxWidgets when
5124 return _core_
.App_CleanUp(*args
, **kwargs
)
5126 def GetApp(*args
, **kwargs
):
5130 Return a reference to the current wx.App object.
5132 return _core_
.GetApp(*args
, **kwargs
)
5133 #----------------------------------------------------------------------
5135 class PyOnDemandOutputWindow
:
5137 A class that can be used for redirecting Python's stdout and
5138 stderr streams. It will do nothing until something is wrriten to
5139 the stream at which point it will create a Frame with a text area
5140 and write the text there.
5142 def __init__(self
, title
= "wxPython: stdout/stderr"):
5145 self
.pos
= wx
.DefaultPosition
5146 self
.size
= (450, 300)
5149 def SetParent(self
, parent
):
5150 """Set the window to be used as the popup Frame's parent."""
5151 self
.parent
= parent
5154 def CreateOutputWindow(self
, st
):
5155 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
5156 style
=wx
.DEFAULT_FRAME_STYLE
)
5157 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
5158 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
5159 self
.text
.AppendText(st
)
5160 self
.frame
.Show(True)
5161 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
5164 def OnCloseWindow(self
, event
):
5165 if self
.frame
is not None:
5166 self
.frame
.Destroy()
5171 # These methods provide the file-like output behaviour.
5172 def write(self
, text
):
5174 Create the output window if needed and write the string to it.
5175 If not called in the context of the gui thread then uses
5176 CallAfter to do the work there.
5178 if self
.frame
is None:
5179 if not wx
.Thread_IsMain():
5180 wx
.CallAfter(self
.CreateOutputWindow
, text
)
5182 self
.CreateOutputWindow(text
)
5184 if not wx
.Thread_IsMain():
5185 wx
.CallAfter(self
.text
.AppendText
, text
)
5187 self
.text
.AppendText(text
)
5191 if self
.frame
is not None:
5192 wx
.CallAfter(self
.frame
.Close
)
5200 #----------------------------------------------------------------------
5202 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5204 class App(wx
.PyApp
):
5206 The ``wx.App`` class represents the application and is used to:
5208 * bootstrap the wxPython system and initialize the underlying
5210 * set and get application-wide properties
5211 * implement the windowing system main message or event loop,
5212 and to dispatch events to window instances
5215 Every application must have a ``wx.App`` instance, and all
5216 creation of UI objects should be delayed until after the
5217 ``wx.App`` object has been created in order to ensure that the gui
5218 platform and wxWidgets have been fully initialized.
5220 Normally you would derive from this class and implement an
5221 ``OnInit`` method that creates a frame and then calls
5222 ``self.SetTopWindow(frame)``.
5224 :see: `wx.PySimpleApp` for a simpler app class that can be used
5228 outputWindowClass
= PyOnDemandOutputWindow
5230 def __init__(self
, redirect
=_defRedirect
, filename
=None,
5231 useBestVisual
=False, clearSigInt
=True):
5233 Construct a ``wx.App`` object.
5235 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5236 redirected? Defaults to True on Windows and Mac, False
5237 otherwise. If `filename` is None then output will be
5238 redirected to a window that pops up as needed. (You can
5239 control what kind of window is created for the output by
5240 resetting the class variable ``outputWindowClass`` to a
5241 class of your choosing.)
5243 :param filename: The name of a file to redirect output to, if
5246 :param useBestVisual: Should the app try to use the best
5247 available visual provided by the system (only relevant on
5248 systems that have more than one visual.) This parameter
5249 must be used instead of calling `SetUseBestVisual` later
5250 on because it must be set before the underlying GUI
5251 toolkit is initialized.
5253 :param clearSigInt: Should SIGINT be cleared? This allows the
5254 app to terminate upon a Ctrl-C in the console like other
5257 :note: You should override OnInit to do applicaition
5258 initialization to ensure that the system, toolkit and
5259 wxWidgets are fully initialized.
5261 wx
.PyApp
.__init
__(self
)
5263 if wx
.Platform
== "__WXMAC__":
5266 if not MacOS
.WMAvailable():
5268 This program needs access to the screen. Please run with 'pythonw',
5269 not 'python', and only when you are logged in on the main display of
5277 # This has to be done before OnInit
5278 self
.SetUseBestVisual(useBestVisual
)
5280 # Set the default handler for SIGINT. This fixes a problem
5281 # where if Ctrl-C is pressed in the console that started this
5282 # app then it will not appear to do anything, (not even send
5283 # KeyboardInterrupt???) but will later segfault on exit. By
5284 # setting the default handler then the app will exit, as
5285 # expected (depending on platform.)
5289 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5293 # Save and redirect the stdio to a window?
5294 self
.stdioWin
= None
5295 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5297 self
.RedirectStdio(filename
)
5299 # This finishes the initialization of wxWindows and then calls
5300 # the OnInit that should be present in the derived class
5301 self
._BootstrapApp
()
5306 self
.RestoreStdio() # Just in case the MainLoop was overridden
5311 def SetTopWindow(self
, frame
):
5312 """Set the \"main\" top level window"""
5314 self
.stdioWin
.SetParent(frame
)
5315 wx
.PyApp
.SetTopWindow(self
, frame
)
5319 """Execute the main GUI event loop"""
5320 wx
.PyApp
.MainLoop(self
)
5324 def RedirectStdio(self
, filename
=None):
5325 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5327 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5329 self
.stdioWin
= self
.outputWindowClass()
5330 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5333 def RestoreStdio(self
):
5334 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5337 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
5339 Set the title, position and/or size of the output window if
5340 the stdio has been redirected. This should be called before
5341 any output would cause the output window to be created.
5344 if title
is not None:
5345 self
.stdioWin
.title
= title
5347 self
.stdioWin
.pos
= pos
5348 if size
is not None:
5349 self
.stdioWin
.size
= size
5354 # change from wx.PyApp_XX to wx.App_XX
5355 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
5356 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
5357 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
5358 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
5359 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
5360 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
5361 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
5362 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
5363 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
5364 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
5365 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
5367 #----------------------------------------------------------------------------
5369 class PySimpleApp(wx
.App
):
5371 A simple application class. You can just create one of these and
5372 then then make your top level windows later, and not have to worry
5373 about OnInit. For example::
5375 app = wx.PySimpleApp()
5376 frame = wx.Frame(None, title='Hello World')
5383 def __init__(self
, redirect
=False, filename
=None,
5384 useBestVisual
=False, clearSigInt
=True):
5386 :see: `wx.App.__init__`
5388 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
5395 # Is anybody using this one?
5396 class PyWidgetTester(wx
.App
):
5397 def __init__(self
, size
= (250, 100)):
5399 wx
.App
.__init
__(self
, 0)
5402 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5403 self
.SetTopWindow(self
.frame
)
5406 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
5407 w
= widgetClass(self
.frame
, *args
, **kwargs
)
5408 self
.frame
.Show(True)
5410 #----------------------------------------------------------------------------
5411 # DO NOT hold any other references to this object. This is how we
5412 # know when to cleanup system resources that wxWidgets is holding. When
5413 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5414 # goes to zero and it calls the wx.App_CleanUp function.
5416 class __wxPyCleanup
:
5418 self
.cleanup
= _core_
.App_CleanUp
5422 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5424 ## # another possible solution, but it gets called too early...
5426 ## atexit.register(_core_.wxApp_CleanUp)
5429 #----------------------------------------------------------------------------
5431 #---------------------------------------------------------------------------
5433 class EventLoop(object):
5435 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5436 def __init__(self
, *args
, **kwargs
):
5437 """__init__(self) -> EventLoop"""
5438 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
5439 self
.this
= newobj
.this
5442 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
5445 if self
.thisown
: destroy(self
)
5448 def Run(*args
, **kwargs
):
5449 """Run(self) -> int"""
5450 return _core_
.EventLoop_Run(*args
, **kwargs
)
5452 def Exit(*args
, **kwargs
):
5453 """Exit(self, int rc=0)"""
5454 return _core_
.EventLoop_Exit(*args
, **kwargs
)
5456 def Pending(*args
, **kwargs
):
5457 """Pending(self) -> bool"""
5458 return _core_
.EventLoop_Pending(*args
, **kwargs
)
5460 def Dispatch(*args
, **kwargs
):
5461 """Dispatch(self) -> bool"""
5462 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
5464 def IsRunning(*args
, **kwargs
):
5465 """IsRunning(self) -> bool"""
5466 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
5468 def GetActive(*args
, **kwargs
):
5469 """GetActive() -> EventLoop"""
5470 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5472 GetActive
= staticmethod(GetActive
)
5473 def SetActive(*args
, **kwargs
):
5474 """SetActive(EventLoop loop)"""
5475 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5477 SetActive
= staticmethod(SetActive
)
5479 class EventLoopPtr(EventLoop
):
5480 def __init__(self
, this
):
5482 if not hasattr(self
,"thisown"): self
.thisown
= 0
5483 self
.__class
__ = EventLoop
5484 _core_
.EventLoop_swigregister(EventLoopPtr
)
5486 def EventLoop_GetActive(*args
, **kwargs
):
5487 """EventLoop_GetActive() -> EventLoop"""
5488 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5490 def EventLoop_SetActive(*args
, **kwargs
):
5491 """EventLoop_SetActive(EventLoop loop)"""
5492 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5494 #---------------------------------------------------------------------------
5496 class AcceleratorEntry(object):
5498 A class used to define items in an `wx.AcceleratorTable`. wxPython
5499 programs can choose to use wx.AcceleratorEntry objects, but using a
5500 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5501 as well. See `__init__` for of the tuple values.
5503 :see: `wx.AcceleratorTable`
5506 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5507 def __init__(self
, *args
, **kwargs
):
5509 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5511 Construct a wx.AcceleratorEntry.
5513 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
5514 self
.this
= newobj
.this
5517 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
5520 if self
.thisown
: destroy(self
)
5523 def Set(*args
, **kwargs
):
5525 Set(self, int flags, int keyCode, int cmd)
5527 (Re)set the attributes of a wx.AcceleratorEntry.
5530 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
5532 def GetFlags(*args
, **kwargs
):
5534 GetFlags(self) -> int
5536 Get the AcceleratorEntry's flags.
5538 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5540 def GetKeyCode(*args
, **kwargs
):
5542 GetKeyCode(self) -> int
5544 Get the AcceleratorEntry's keycode.
5546 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5548 def GetCommand(*args
, **kwargs
):
5550 GetCommand(self) -> int
5552 Get the AcceleratorEntry's command ID.
5554 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5557 class AcceleratorEntryPtr(AcceleratorEntry
):
5558 def __init__(self
, this
):
5560 if not hasattr(self
,"thisown"): self
.thisown
= 0
5561 self
.__class
__ = AcceleratorEntry
5562 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5564 class AcceleratorTable(Object
):
5566 An accelerator table allows the application to specify a table of
5567 keyboard shortcuts for menus or other commands. On Windows, menu or
5568 button commands are supported; on GTK, only menu commands are
5572 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5573 def __init__(self
, *args
, **kwargs
):
5575 __init__(entries) -> AcceleratorTable
5577 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5578 items or or of 3-tuples (flags, keyCode, cmdID)
5580 :see: `wx.AcceleratorEntry`
5582 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
5583 self
.this
= newobj
.this
5586 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
5589 if self
.thisown
: destroy(self
)
5592 def Ok(*args
, **kwargs
):
5593 """Ok(self) -> bool"""
5594 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
5597 class AcceleratorTablePtr(AcceleratorTable
):
5598 def __init__(self
, this
):
5600 if not hasattr(self
,"thisown"): self
.thisown
= 0
5601 self
.__class
__ = AcceleratorTable
5602 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5605 def GetAccelFromString(*args
, **kwargs
):
5606 """GetAccelFromString(String label) -> AcceleratorEntry"""
5607 return _core_
.GetAccelFromString(*args
, **kwargs
)
5608 #---------------------------------------------------------------------------
5610 class VisualAttributes(object):
5611 """struct containing all the visual attributes of a control"""
5613 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5614 def __init__(self
, *args
, **kwargs
):
5616 __init__(self) -> VisualAttributes
5618 struct containing all the visual attributes of a control
5620 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
5621 self
.this
= newobj
.this
5624 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
5627 if self
.thisown
: destroy(self
)
5630 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
5631 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
5632 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
5634 class VisualAttributesPtr(VisualAttributes
):
5635 def __init__(self
, this
):
5637 if not hasattr(self
,"thisown"): self
.thisown
= 0
5638 self
.__class
__ = VisualAttributes
5639 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
5640 NullAcceleratorTable
= cvar
.NullAcceleratorTable
5641 PanelNameStr
= cvar
.PanelNameStr
5643 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
5644 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
5645 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
5646 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
5647 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
5648 class Window(EvtHandler
):
5650 wx.Window is the base class for all windows and represents any visible
5651 object on the screen. All controls, top level windows and so on are
5652 wx.Windows. Sizers and device contexts are not however, as they don't
5653 appear on screen themselves.
5657 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5658 def __init__(self
, *args
, **kwargs
):
5660 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5661 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5663 Construct and show a generic Window.
5665 newobj
= _core_
.new_Window(*args
, **kwargs
)
5666 self
.this
= newobj
.this
5669 self
._setOORInfo
(self
)
5671 def Create(*args
, **kwargs
):
5673 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5674 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5676 Create the GUI part of the Window for 2-phase creation mode.
5678 return _core_
.Window_Create(*args
, **kwargs
)
5680 def Close(*args
, **kwargs
):
5682 Close(self, bool force=False) -> bool
5684 This function simply generates a EVT_CLOSE event whose handler usually
5685 tries to close the window. It doesn't close the window itself,
5686 however. If force is False (the default) then the window's close
5687 handler will be allowed to veto the destruction of the window.
5689 return _core_
.Window_Close(*args
, **kwargs
)
5691 def Destroy(*args
, **kwargs
):
5693 Destroy(self) -> bool
5695 Destroys the window safely. Frames and dialogs are not destroyed
5696 immediately when this function is called -- they are added to a list
5697 of windows to be deleted on idle time, when all the window's events
5698 have been processed. This prevents problems with events being sent to
5699 non-existent windows.
5701 Returns True if the window has either been successfully deleted, or it
5702 has been added to the list of windows pending real deletion.
5704 return _core_
.Window_Destroy(*args
, **kwargs
)
5706 def DestroyChildren(*args
, **kwargs
):
5708 DestroyChildren(self) -> bool
5710 Destroys all children of a window. Called automatically by the
5713 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
5715 def IsBeingDeleted(*args
, **kwargs
):
5717 IsBeingDeleted(self) -> bool
5719 Is the window in the process of being deleted?
5721 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
5723 def SetTitle(*args
, **kwargs
):
5725 SetTitle(self, String title)
5727 Sets the window's title. Applicable only to frames and dialogs.
5729 return _core_
.Window_SetTitle(*args
, **kwargs
)
5731 def GetTitle(*args
, **kwargs
):
5733 GetTitle(self) -> String
5735 Gets the window's title. Applicable only to frames and dialogs.
5737 return _core_
.Window_GetTitle(*args
, **kwargs
)
5739 def SetLabel(*args
, **kwargs
):
5741 SetLabel(self, String label)
5743 Set the text which the window shows in its label if applicable.
5745 return _core_
.Window_SetLabel(*args
, **kwargs
)
5747 def GetLabel(*args
, **kwargs
):
5749 GetLabel(self) -> String
5751 Generic way of getting a label from any window, for identification
5752 purposes. The interpretation of this function differs from class to
5753 class. For frames and dialogs, the value returned is the title. For
5754 buttons or static text controls, it is the button text. This function
5755 can be useful for meta-programs such as testing tools or special-needs
5756 access programs)which need to identify windows by name.
5758 return _core_
.Window_GetLabel(*args
, **kwargs
)
5760 def SetName(*args
, **kwargs
):
5762 SetName(self, String name)
5764 Sets the window's name. The window name is used for ressource setting
5765 in X, it is not the same as the window title/label
5767 return _core_
.Window_SetName(*args
, **kwargs
)
5769 def GetName(*args
, **kwargs
):
5771 GetName(self) -> String
5773 Returns the windows name. This name is not guaranteed to be unique;
5774 it is up to the programmer to supply an appropriate name in the window
5775 constructor or via wx.Window.SetName.
5777 return _core_
.Window_GetName(*args
, **kwargs
)
5779 def SetWindowVariant(*args
, **kwargs
):
5781 SetWindowVariant(self, int variant)
5783 Sets the variant of the window/font size to use for this window, if
5784 the platform supports variants, for example, wxMac.
5786 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
5788 def GetWindowVariant(*args
, **kwargs
):
5789 """GetWindowVariant(self) -> int"""
5790 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
5792 def SetId(*args
, **kwargs
):
5794 SetId(self, int winid)
5796 Sets the identifier of the window. Each window has an integer
5797 identifier. If the application has not provided one, an identifier
5798 will be generated. Normally, the identifier should be provided on
5799 creation and should not be modified subsequently.
5801 return _core_
.Window_SetId(*args
, **kwargs
)
5803 def GetId(*args
, **kwargs
):
5807 Returns the identifier of the window. Each window has an integer
5808 identifier. If the application has not provided one (or the default Id
5809 -1 is used) then an unique identifier with a negative value will be
5812 return _core_
.Window_GetId(*args
, **kwargs
)
5814 def NewControlId(*args
, **kwargs
):
5816 NewControlId() -> int
5818 Generate a control id for the controls which were not given one.
5820 return _core_
.Window_NewControlId(*args
, **kwargs
)
5822 NewControlId
= staticmethod(NewControlId
)
5823 def NextControlId(*args
, **kwargs
):
5825 NextControlId(int winid) -> int
5827 Get the id of the control following the one with the given
5830 return _core_
.Window_NextControlId(*args
, **kwargs
)
5832 NextControlId
= staticmethod(NextControlId
)
5833 def PrevControlId(*args
, **kwargs
):
5835 PrevControlId(int winid) -> int
5837 Get the id of the control preceding the one with the given
5840 return _core_
.Window_PrevControlId(*args
, **kwargs
)
5842 PrevControlId
= staticmethod(PrevControlId
)
5843 def SetSize(*args
, **kwargs
):
5845 SetSize(self, Size size)
5847 Sets the size of the window in pixels.
5849 return _core_
.Window_SetSize(*args
, **kwargs
)
5851 def SetDimensions(*args
, **kwargs
):
5853 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
5855 Sets the position and size of the window in pixels. The sizeFlags
5856 parameter indicates the interpretation of the other params if they are
5857 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
5858 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
5859 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
5860 dimensions of -1 and less to be interpreted as real dimensions, not
5863 return _core_
.Window_SetDimensions(*args
, **kwargs
)
5865 def SetRect(*args
, **kwargs
):
5867 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
5869 Sets the position and size of the window in pixels using a wx.Rect.
5871 return _core_
.Window_SetRect(*args
, **kwargs
)
5873 def SetSizeWH(*args
, **kwargs
):
5875 SetSizeWH(self, int width, int height)
5877 Sets the size of the window in pixels.
5879 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
5881 def Move(*args
, **kwargs
):
5883 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
5885 Moves the window to the given position.
5887 return _core_
.Window_Move(*args
, **kwargs
)
5890 def MoveXY(*args
, **kwargs
):
5892 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
5894 Moves the window to the given position.
5896 return _core_
.Window_MoveXY(*args
, **kwargs
)
5898 def SetBestFittingSize(*args
, **kwargs
):
5900 SetBestFittingSize(self, Size size=DefaultSize)
5902 A 'Smart' SetSize that will fill in default size components with the
5903 window's *best size* values. Also set's the minsize for use with sizers.
5905 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
5907 def Raise(*args
, **kwargs
):
5911 Raises the window to the top of the window hierarchy if it is a
5912 managed window (dialog or frame).
5914 return _core_
.Window_Raise(*args
, **kwargs
)
5916 def Lower(*args
, **kwargs
):
5920 Lowers the window to the bottom of the window hierarchy if it is a
5921 managed window (dialog or frame).
5923 return _core_
.Window_Lower(*args
, **kwargs
)
5925 def SetClientSize(*args
, **kwargs
):
5927 SetClientSize(self, Size size)
5929 This sets the size of the window client area in pixels. Using this
5930 function to size a window tends to be more device-independent than
5931 wx.Window.SetSize, since the application need not worry about what
5932 dimensions the border or title bar have when trying to fit the window
5933 around panel items, for example.
5935 return _core_
.Window_SetClientSize(*args
, **kwargs
)
5937 def SetClientSizeWH(*args
, **kwargs
):
5939 SetClientSizeWH(self, int width, int height)
5941 This sets the size of the window client area in pixels. Using this
5942 function to size a window tends to be more device-independent than
5943 wx.Window.SetSize, since the application need not worry about what
5944 dimensions the border or title bar have when trying to fit the window
5945 around panel items, for example.
5947 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
5949 def SetClientRect(*args
, **kwargs
):
5951 SetClientRect(self, Rect rect)
5953 This sets the size of the window client area in pixels. Using this
5954 function to size a window tends to be more device-independent than
5955 wx.Window.SetSize, since the application need not worry about what
5956 dimensions the border or title bar have when trying to fit the window
5957 around panel items, for example.
5959 return _core_
.Window_SetClientRect(*args
, **kwargs
)
5961 def GetPosition(*args
, **kwargs
):
5963 GetPosition(self) -> Point
5965 Get the window's position.
5967 return _core_
.Window_GetPosition(*args
, **kwargs
)
5969 def GetPositionTuple(*args
, **kwargs
):
5971 GetPositionTuple() -> (x,y)
5973 Get the window's position.
5975 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
5977 def GetSize(*args
, **kwargs
):
5979 GetSize(self) -> Size
5981 Get the window size.
5983 return _core_
.Window_GetSize(*args
, **kwargs
)
5985 def GetSizeTuple(*args
, **kwargs
):
5987 GetSizeTuple() -> (width, height)
5989 Get the window size.
5991 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
5993 def GetRect(*args
, **kwargs
):
5995 GetRect(self) -> Rect
5997 Returns the size and position of the window as a wx.Rect object.
5999 return _core_
.Window_GetRect(*args
, **kwargs
)
6001 def GetClientSize(*args
, **kwargs
):
6003 GetClientSize(self) -> Size
6005 This gets the size of the window's 'client area' in pixels. The client
6006 area is the area which may be drawn on by the programmer, excluding
6007 title bar, border, scrollbars, etc.
6009 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6011 def GetClientSizeTuple(*args
, **kwargs
):
6013 GetClientSizeTuple() -> (width, height)
6015 This gets the size of the window's 'client area' in pixels. The client
6016 area is the area which may be drawn on by the programmer, excluding
6017 title bar, border, scrollbars, etc.
6019 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6021 def GetClientAreaOrigin(*args
, **kwargs
):
6023 GetClientAreaOrigin(self) -> Point
6025 Get the origin of the client area of the window relative to the
6026 window's top left corner (the client area may be shifted because of
6027 the borders, scrollbars, other decorations...)
6029 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6031 def GetClientRect(*args
, **kwargs
):
6033 GetClientRect(self) -> Rect
6035 Get the client area position and size as a `wx.Rect` object.
6037 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6039 def GetBestSize(*args
, **kwargs
):
6041 GetBestSize(self) -> Size
6043 This function returns the best acceptable minimal size for the
6044 window, if applicable. For example, for a static text control, it will
6045 be the minimal size such that the control label is not truncated. For
6046 windows containing subwindows (suzh aswx.Panel), the size returned by
6047 this function will be the same as the size the window would have had
6050 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6052 def GetBestSizeTuple(*args
, **kwargs
):
6054 GetBestSizeTuple() -> (width, height)
6056 This function returns the best acceptable minimal size for the
6057 window, if applicable. For example, for a static text control, it will
6058 be the minimal size such that the control label is not truncated. For
6059 windows containing subwindows (suzh aswx.Panel), the size returned by
6060 this function will be the same as the size the window would have had
6063 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6065 def InvalidateBestSize(*args
, **kwargs
):
6067 InvalidateBestSize(self)
6069 Reset the cached best size value so it will be recalculated the next
6072 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6074 def GetBestFittingSize(*args
, **kwargs
):
6076 GetBestFittingSize(self) -> Size
6078 This function will merge the window's best size into the window's
6079 minimum size, giving priority to the min size components, and returns
6083 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6085 def GetAdjustedBestSize(*args
, **kwargs
):
6087 GetAdjustedBestSize(self) -> Size
6089 This method is similar to GetBestSize, except in one
6090 thing. GetBestSize should return the minimum untruncated size of the
6091 window, while this method will return the largest of BestSize and any
6092 user specified minimum size. ie. it is the minimum size the window
6093 should currently be drawn at, not the minimal size it can possibly
6096 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6098 def Center(*args
, **kwargs
):
6100 Center(self, int direction=BOTH)
6102 Centers the window. The parameter specifies the direction for
6103 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6104 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6105 on the entire screen and not on its parent window. If it is a
6106 top-level window and has no parent then it will always be centered
6107 relative to the screen.
6109 return _core_
.Window_Center(*args
, **kwargs
)
6112 def CenterOnScreen(*args
, **kwargs
):
6114 CenterOnScreen(self, int dir=BOTH)
6116 Center on screen (only works for top level windows)
6118 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6120 CentreOnScreen
= CenterOnScreen
6121 def CenterOnParent(*args
, **kwargs
):
6123 CenterOnParent(self, int dir=BOTH)
6125 Center with respect to the the parent window
6127 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6129 CentreOnParent
= CenterOnParent
6130 def Fit(*args
, **kwargs
):
6134 Sizes the window so that it fits around its subwindows. This function
6135 won't do anything if there are no subwindows and will only really work
6136 correctly if sizers are used for the subwindows layout. Also, if the
6137 window has exactly one subwindow it is better (faster and the result
6138 is more precise as Fit adds some margin to account for fuzziness of
6139 its calculations) to call window.SetClientSize(child.GetSize())
6140 instead of calling Fit.
6142 return _core_
.Window_Fit(*args
, **kwargs
)
6144 def FitInside(*args
, **kwargs
):
6148 Similar to Fit, but sizes the interior (virtual) size of a
6149 window. Mainly useful with scrolled windows to reset scrollbars after
6150 sizing changes that do not trigger a size event, and/or scrolled
6151 windows without an interior sizer. This function similarly won't do
6152 anything if there are no subwindows.
6154 return _core_
.Window_FitInside(*args
, **kwargs
)
6156 def SetSizeHints(*args
, **kwargs
):
6158 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6161 Allows specification of minimum and maximum window sizes, and window
6162 size increments. If a pair of values is not set (or set to -1), the
6163 default values will be used. If this function is called, the user
6164 will not be able to size the window outside the given bounds (if it is
6165 a top-level window.) Sizers will also inspect the minimum window size
6166 and will use that value if set when calculating layout.
6168 The resizing increments are only significant under Motif or Xt.
6170 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
6172 def SetSizeHintsSz(*args
, **kwargs
):
6174 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6176 Allows specification of minimum and maximum window sizes, and window
6177 size increments. If a pair of values is not set (or set to -1), the
6178 default values will be used. If this function is called, the user
6179 will not be able to size the window outside the given bounds (if it is
6180 a top-level window.) Sizers will also inspect the minimum window size
6181 and will use that value if set when calculating layout.
6183 The resizing increments are only significant under Motif or Xt.
6185 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
6187 def SetVirtualSizeHints(*args
, **kwargs
):
6189 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6191 Allows specification of minimum and maximum virtual window sizes. If a
6192 pair of values is not set (or set to -1), the default values will be
6193 used. If this function is called, the user will not be able to size
6194 the virtual area of the window outside the given bounds.
6196 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
6198 def SetVirtualSizeHintsSz(*args
, **kwargs
):
6200 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6202 Allows specification of minimum and maximum virtual window sizes. If a
6203 pair of values is not set (or set to -1), the default values will be
6204 used. If this function is called, the user will not be able to size
6205 the virtual area of the window outside the given bounds.
6207 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
6209 def GetMaxSize(*args
, **kwargs
):
6210 """GetMaxSize(self) -> Size"""
6211 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
6213 def GetMinSize(*args
, **kwargs
):
6214 """GetMinSize(self) -> Size"""
6215 return _core_
.Window_GetMinSize(*args
, **kwargs
)
6217 def SetMinSize(*args
, **kwargs
):
6219 SetMinSize(self, Size minSize)
6221 A more convenient method than `SetSizeHints` for setting just the
6224 return _core_
.Window_SetMinSize(*args
, **kwargs
)
6226 def SetMaxSize(*args
, **kwargs
):
6228 SetMaxSize(self, Size maxSize)
6230 A more convenient method than `SetSizeHints` for setting just the
6233 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
6235 def GetMinWidth(*args
, **kwargs
):
6236 """GetMinWidth(self) -> int"""
6237 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
6239 def GetMinHeight(*args
, **kwargs
):
6240 """GetMinHeight(self) -> int"""
6241 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
6243 def GetMaxWidth(*args
, **kwargs
):
6244 """GetMaxWidth(self) -> int"""
6245 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
6247 def GetMaxHeight(*args
, **kwargs
):
6248 """GetMaxHeight(self) -> int"""
6249 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
6251 def SetVirtualSize(*args
, **kwargs
):
6253 SetVirtualSize(self, Size size)
6255 Set the the virtual size of a window in pixels. For most windows this
6256 is just the client area of the window, but for some like scrolled
6257 windows it is more or less independent of the screen window size.
6259 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
6261 def SetVirtualSizeWH(*args
, **kwargs
):
6263 SetVirtualSizeWH(self, int w, int h)
6265 Set the the virtual size of a window in pixels. For most windows this
6266 is just the client area of the window, but for some like scrolled
6267 windows it is more or less independent of the screen window size.
6269 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
6271 def GetVirtualSize(*args
, **kwargs
):
6273 GetVirtualSize(self) -> Size
6275 Get the the virtual size of the window in pixels. For most windows
6276 this is just the client area of the window, but for some like scrolled
6277 windows it is more or less independent of the screen window size.
6279 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
6281 def GetVirtualSizeTuple(*args
, **kwargs
):
6283 GetVirtualSizeTuple() -> (width, height)
6285 Get the the virtual size of the window in pixels. For most windows
6286 this is just the client area of the window, but for some like scrolled
6287 windows it is more or less independent of the screen window size.
6289 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
6291 def GetBestVirtualSize(*args
, **kwargs
):
6293 GetBestVirtualSize(self) -> Size
6295 Return the largest of ClientSize and BestSize (as determined by a
6296 sizer, interior children, or other means)
6298 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
6300 def Show(*args
, **kwargs
):
6302 Show(self, bool show=True) -> bool
6304 Shows or hides the window. You may need to call Raise for a top level
6305 window if you want to bring it to top, although this is not needed if
6306 Show is called immediately after the frame creation. Returns True if
6307 the window has been shown or hidden or False if nothing was done
6308 because it already was in the requested state.
6310 return _core_
.Window_Show(*args
, **kwargs
)
6312 def Hide(*args
, **kwargs
):
6316 Equivalent to calling Show(False).
6318 return _core_
.Window_Hide(*args
, **kwargs
)
6320 def Enable(*args
, **kwargs
):
6322 Enable(self, bool enable=True) -> bool
6324 Enable or disable the window for user input. Note that when a parent
6325 window is disabled, all of its children are disabled as well and they
6326 are reenabled again when the parent is. Returns true if the window
6327 has been enabled or disabled, false if nothing was done, i.e. if the
6328 window had already been in the specified state.
6330 return _core_
.Window_Enable(*args
, **kwargs
)
6332 def Disable(*args
, **kwargs
):
6334 Disable(self) -> bool
6336 Disables the window, same as Enable(false).
6338 return _core_
.Window_Disable(*args
, **kwargs
)
6340 def IsShown(*args
, **kwargs
):
6342 IsShown(self) -> bool
6344 Returns true if the window is shown, false if it has been hidden.
6346 return _core_
.Window_IsShown(*args
, **kwargs
)
6348 def IsEnabled(*args
, **kwargs
):
6350 IsEnabled(self) -> bool
6352 Returns true if the window is enabled for input, false otherwise.
6354 return _core_
.Window_IsEnabled(*args
, **kwargs
)
6356 def SetWindowStyleFlag(*args
, **kwargs
):
6358 SetWindowStyleFlag(self, long style)
6360 Sets the style of the window. Please note that some styles cannot be
6361 changed after the window creation and that Refresh() might need to be
6362 called after changing the others for the change to take place
6365 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
6367 def GetWindowStyleFlag(*args
, **kwargs
):
6369 GetWindowStyleFlag(self) -> long
6371 Gets the window style that was passed to the constructor or Create
6374 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
6376 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
6377 def HasFlag(*args
, **kwargs
):
6379 HasFlag(self, int flag) -> bool
6381 Test if the given style is set for this window.
6383 return _core_
.Window_HasFlag(*args
, **kwargs
)
6385 def IsRetained(*args
, **kwargs
):
6387 IsRetained(self) -> bool
6389 Returns true if the window is retained, false otherwise. Retained
6390 windows are only available on X platforms.
6392 return _core_
.Window_IsRetained(*args
, **kwargs
)
6394 def SetExtraStyle(*args
, **kwargs
):
6396 SetExtraStyle(self, long exStyle)
6398 Sets the extra style bits for the window. Extra styles are the less
6399 often used style bits which can't be set with the constructor or with
6400 SetWindowStyleFlag()
6402 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
6404 def GetExtraStyle(*args
, **kwargs
):
6406 GetExtraStyle(self) -> long
6408 Returns the extra style bits for the window.
6410 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
6412 def MakeModal(*args
, **kwargs
):
6414 MakeModal(self, bool modal=True)
6416 Disables all other windows in the application so that the user can
6417 only interact with this window. Passing False will reverse this
6420 return _core_
.Window_MakeModal(*args
, **kwargs
)
6422 def SetThemeEnabled(*args
, **kwargs
):
6424 SetThemeEnabled(self, bool enableTheme)
6426 This function tells a window if it should use the system's "theme"
6427 code to draw the windows' background instead if its own background
6428 drawing code. This will only have an effect on platforms that support
6429 the notion of themes in user defined windows. One such platform is
6430 GTK+ where windows can have (very colourful) backgrounds defined by a
6431 user's selected theme.
6433 Dialogs, notebook pages and the status bar have this flag set to true
6434 by default so that the default look and feel is simulated best.
6436 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
6438 def GetThemeEnabled(*args
, **kwargs
):
6440 GetThemeEnabled(self) -> bool
6442 Return the themeEnabled flag.
6444 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
6446 def SetFocus(*args
, **kwargs
):
6450 Set's the focus to this window, allowing it to receive keyboard input.
6452 return _core_
.Window_SetFocus(*args
, **kwargs
)
6454 def SetFocusFromKbd(*args
, **kwargs
):
6456 SetFocusFromKbd(self)
6458 Set focus to this window as the result of a keyboard action. Normally
6459 only called internally.
6461 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
6463 def FindFocus(*args
, **kwargs
):
6465 FindFocus() -> Window
6467 Returns the window or control that currently has the keyboard focus,
6470 return _core_
.Window_FindFocus(*args
, **kwargs
)
6472 FindFocus
= staticmethod(FindFocus
)
6473 def AcceptsFocus(*args
, **kwargs
):
6475 AcceptsFocus(self) -> bool
6477 Can this window have focus?
6479 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
6481 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6483 AcceptsFocusFromKeyboard(self) -> bool
6485 Can this window be given focus by keyboard navigation? if not, the
6486 only way to give it focus (provided it accepts it at all) is to click
6489 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6491 def GetDefaultItem(*args
, **kwargs
):
6493 GetDefaultItem(self) -> Window
6495 Get the default child of this parent, i.e. the one which is activated
6496 by pressing <Enter> such as the OK button on a wx.Dialog.
6498 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
6500 def SetDefaultItem(*args
, **kwargs
):
6502 SetDefaultItem(self, Window child) -> Window
6504 Set this child as default, return the old default.
6506 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
6508 def SetTmpDefaultItem(*args
, **kwargs
):
6510 SetTmpDefaultItem(self, Window win)
6512 Set this child as temporary default
6514 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6516 def Navigate(*args
, **kwargs
):
6518 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6520 Does keyboard navigation from this window to another, by sending a
6521 `wx.NavigationKeyEvent`.
6523 return _core_
.Window_Navigate(*args
, **kwargs
)
6525 def MoveAfterInTabOrder(*args
, **kwargs
):
6527 MoveAfterInTabOrder(self, Window win)
6529 Moves this window in the tab navigation order after the specified
6530 sibling window. This means that when the user presses the TAB key on
6531 that other window, the focus switches to this window.
6533 The default tab order is the same as creation order. This function
6534 and `MoveBeforeInTabOrder` allow to change it after creating all the
6538 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
6540 def MoveBeforeInTabOrder(*args
, **kwargs
):
6542 MoveBeforeInTabOrder(self, Window win)
6544 Same as `MoveAfterInTabOrder` except that it inserts this window just
6545 before win instead of putting it right after it.
6547 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
6549 def GetChildren(*args
, **kwargs
):
6551 GetChildren(self) -> PyObject
6553 Returns a list of the window's children. NOTE: Currently this is a
6554 copy of the child window list maintained by the window, so the return
6555 value of this function is only valid as long as the window's children
6558 return _core_
.Window_GetChildren(*args
, **kwargs
)
6560 def GetParent(*args
, **kwargs
):
6562 GetParent(self) -> Window
6564 Returns the parent window of this window, or None if there isn't one.
6566 return _core_
.Window_GetParent(*args
, **kwargs
)
6568 def GetGrandParent(*args
, **kwargs
):
6570 GetGrandParent(self) -> Window
6572 Returns the parent of the parent of this window, or None if there
6575 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
6577 def IsTopLevel(*args
, **kwargs
):
6579 IsTopLevel(self) -> bool
6581 Returns true if the given window is a top-level one. Currently all
6582 frames and dialogs are always considered to be top-level windows (even
6583 if they have a parent window).
6585 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
6587 def Reparent(*args
, **kwargs
):
6589 Reparent(self, Window newParent) -> bool
6591 Reparents the window, i.e the window will be removed from its current
6592 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6593 re-inserted into another. Available on Windows and GTK. Returns True
6594 if the parent was changed, False otherwise (error or newParent ==
6597 return _core_
.Window_Reparent(*args
, **kwargs
)
6599 def AddChild(*args
, **kwargs
):
6601 AddChild(self, Window child)
6603 Adds a child window. This is called automatically by window creation
6604 functions so should not be required by the application programmer.
6606 return _core_
.Window_AddChild(*args
, **kwargs
)
6608 def RemoveChild(*args
, **kwargs
):
6610 RemoveChild(self, Window child)
6612 Removes a child window. This is called automatically by window
6613 deletion functions so should not be required by the application
6616 return _core_
.Window_RemoveChild(*args
, **kwargs
)
6618 def FindWindowById(*args
, **kwargs
):
6620 FindWindowById(self, long winid) -> Window
6622 Find a chld of this window by window ID
6624 return _core_
.Window_FindWindowById(*args
, **kwargs
)
6626 def FindWindowByName(*args
, **kwargs
):
6628 FindWindowByName(self, String name) -> Window
6630 Find a child of this window by name
6632 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
6634 def GetEventHandler(*args
, **kwargs
):
6636 GetEventHandler(self) -> EvtHandler
6638 Returns the event handler for this window. By default, the window is
6639 its own event handler.
6641 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
6643 def SetEventHandler(*args
, **kwargs
):
6645 SetEventHandler(self, EvtHandler handler)
6647 Sets the event handler for this window. An event handler is an object
6648 that is capable of processing the events sent to a window. By default,
6649 the window is its own event handler, but an application may wish to
6650 substitute another, for example to allow central implementation of
6651 event-handling for a variety of different window classes.
6653 It is usually better to use `wx.Window.PushEventHandler` since this sets
6654 up a chain of event handlers, where an event not handled by one event
6655 handler is handed to the next one in the chain.
6657 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
6659 def PushEventHandler(*args
, **kwargs
):
6661 PushEventHandler(self, EvtHandler handler)
6663 Pushes this event handler onto the event handler stack for the window.
6664 An event handler is an object that is capable of processing the events
6665 sent to a window. By default, the window is its own event handler, but
6666 an application may wish to substitute another, for example to allow
6667 central implementation of event-handling for a variety of different
6670 wx.Window.PushEventHandler allows an application to set up a chain of
6671 event handlers, where an event not handled by one event handler is
6672 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6673 remove the event handler.
6675 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
6677 def PopEventHandler(*args
, **kwargs
):
6679 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6681 Removes and returns the top-most event handler on the event handler
6682 stack. If deleteHandler is True then the wx.EvtHandler object will be
6683 destroyed after it is popped.
6685 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
6687 def RemoveEventHandler(*args
, **kwargs
):
6689 RemoveEventHandler(self, EvtHandler handler) -> bool
6691 Find the given handler in the event handler chain and remove (but not
6692 delete) it from the event handler chain, return True if it was found
6693 and False otherwise (this also results in an assert failure so this
6694 function should only be called when the handler is supposed to be
6697 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
6699 def SetValidator(*args
, **kwargs
):
6701 SetValidator(self, Validator validator)
6703 Deletes the current validator (if any) and sets the window validator,
6704 having called wx.Validator.Clone to create a new validator of this
6707 return _core_
.Window_SetValidator(*args
, **kwargs
)
6709 def GetValidator(*args
, **kwargs
):
6711 GetValidator(self) -> Validator
6713 Returns a pointer to the current validator for the window, or None if
6716 return _core_
.Window_GetValidator(*args
, **kwargs
)
6718 def Validate(*args
, **kwargs
):
6720 Validate(self) -> bool
6722 Validates the current values of the child controls using their
6723 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6724 style flag set, the method will also call Validate() of all child
6725 windows. Returns false if any of the validations failed.
6727 return _core_
.Window_Validate(*args
, **kwargs
)
6729 def TransferDataToWindow(*args
, **kwargs
):
6731 TransferDataToWindow(self) -> bool
6733 Transfers values to child controls from data areas specified by their
6734 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6735 style flag set, the method will also call TransferDataToWindow() of
6738 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
6740 def TransferDataFromWindow(*args
, **kwargs
):
6742 TransferDataFromWindow(self) -> bool
6744 Transfers values from child controls to data areas specified by their
6745 validators. Returns false if a transfer failed. If the window has
6746 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6747 also call TransferDataFromWindow() of all child windows.
6749 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
6751 def InitDialog(*args
, **kwargs
):
6755 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6756 to the dialog via validators.
6758 return _core_
.Window_InitDialog(*args
, **kwargs
)
6760 def SetAcceleratorTable(*args
, **kwargs
):
6762 SetAcceleratorTable(self, AcceleratorTable accel)
6764 Sets the accelerator table for this window.
6766 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
6768 def GetAcceleratorTable(*args
, **kwargs
):
6770 GetAcceleratorTable(self) -> AcceleratorTable
6772 Gets the accelerator table for this window.
6774 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
6776 def RegisterHotKey(*args
, **kwargs
):
6778 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6780 Registers a system wide hotkey. Every time the user presses the hotkey
6781 registered here, this window will receive a hotkey event. It will
6782 receive the event even if the application is in the background and
6783 does not have the input focus because the user is working with some
6784 other application. To bind an event handler function to this hotkey
6785 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6786 hotkey was registered successfully.
6788 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
6790 def UnregisterHotKey(*args
, **kwargs
):
6792 UnregisterHotKey(self, int hotkeyId) -> bool
6794 Unregisters a system wide hotkey.
6796 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
6798 def ConvertDialogPointToPixels(*args
, **kwargs
):
6800 ConvertDialogPointToPixels(self, Point pt) -> Point
6802 Converts a point or size from dialog units to pixels. Dialog units
6803 are used for maintaining a dialog's proportions even if the font
6804 changes. For the x dimension, the dialog units are multiplied by the
6805 average character width and then divided by 4. For the y dimension,
6806 the dialog units are multiplied by the average character height and
6809 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
6811 def ConvertDialogSizeToPixels(*args
, **kwargs
):
6813 ConvertDialogSizeToPixels(self, Size sz) -> Size
6815 Converts a point or size from dialog units to pixels. Dialog units
6816 are used for maintaining a dialog's proportions even if the font
6817 changes. For the x dimension, the dialog units are multiplied by the
6818 average character width and then divided by 4. For the y dimension,
6819 the dialog units are multiplied by the average character height and
6822 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
6824 def DLG_PNT(*args
, **kwargs
):
6826 DLG_PNT(self, Point pt) -> Point
6828 Converts a point or size from dialog units to pixels. Dialog units
6829 are used for maintaining a dialog's proportions even if the font
6830 changes. For the x dimension, the dialog units are multiplied by the
6831 average character width and then divided by 4. For the y dimension,
6832 the dialog units are multiplied by the average character height and
6835 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
6837 def DLG_SZE(*args
, **kwargs
):
6839 DLG_SZE(self, Size sz) -> Size
6841 Converts a point or size from dialog units to pixels. Dialog units
6842 are used for maintaining a dialog's proportions even if the font
6843 changes. For the x dimension, the dialog units are multiplied by the
6844 average character width and then divided by 4. For the y dimension,
6845 the dialog units are multiplied by the average character height and
6848 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
6850 def ConvertPixelPointToDialog(*args
, **kwargs
):
6851 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
6852 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
6854 def ConvertPixelSizeToDialog(*args
, **kwargs
):
6855 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
6856 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
6858 def WarpPointer(*args
, **kwargs
):
6860 WarpPointer(self, int x, int y)
6862 Moves the pointer to the given position on the window.
6864 NOTE: This function is not supported under Mac because Apple Human
6865 Interface Guidelines forbid moving the mouse cursor programmatically.
6867 return _core_
.Window_WarpPointer(*args
, **kwargs
)
6869 def CaptureMouse(*args
, **kwargs
):
6873 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
6874 release the capture.
6876 Note that wxWindows maintains the stack of windows having captured the
6877 mouse and when the mouse is released the capture returns to the window
6878 which had had captured it previously and it is only really released if
6879 there were no previous window. In particular, this means that you must
6880 release the mouse as many times as you capture it.
6882 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
6884 def ReleaseMouse(*args
, **kwargs
):
6888 Releases mouse input captured with wx.Window.CaptureMouse.
6890 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
6892 def GetCapture(*args
, **kwargs
):
6894 GetCapture() -> Window
6896 Returns the window which currently captures the mouse or None
6898 return _core_
.Window_GetCapture(*args
, **kwargs
)
6900 GetCapture
= staticmethod(GetCapture
)
6901 def HasCapture(*args
, **kwargs
):
6903 HasCapture(self) -> bool
6905 Returns true if this window has the current mouse capture.
6907 return _core_
.Window_HasCapture(*args
, **kwargs
)
6909 def Refresh(*args
, **kwargs
):
6911 Refresh(self, bool eraseBackground=True, Rect rect=None)
6913 Mark the specified rectangle (or the whole window) as "dirty" so it
6914 will be repainted. Causes an EVT_PAINT event to be generated and sent
6917 return _core_
.Window_Refresh(*args
, **kwargs
)
6919 def RefreshRect(*args
, **kwargs
):
6921 RefreshRect(self, Rect rect)
6923 Redraws the contents of the given rectangle: the area inside it will
6924 be repainted. This is the same as Refresh but has a nicer syntax.
6926 return _core_
.Window_RefreshRect(*args
, **kwargs
)
6928 def Update(*args
, **kwargs
):
6932 Calling this method immediately repaints the invalidated area of the
6933 window instead of waiting for the EVT_PAINT event to happen, (normally
6934 this would usually only happen when the flow of control returns to the
6935 event loop.) Notice that this function doesn't refresh the window and
6936 does nothing if the window has been already repainted. Use Refresh
6937 first if you want to immediately redraw the window (or some portion of
6938 it) unconditionally.
6940 return _core_
.Window_Update(*args
, **kwargs
)
6942 def ClearBackground(*args
, **kwargs
):
6944 ClearBackground(self)
6946 Clears the window by filling it with the current background
6947 colour. Does not cause an erase background event to be generated.
6949 return _core_
.Window_ClearBackground(*args
, **kwargs
)
6951 def Freeze(*args
, **kwargs
):
6955 Freezes the window or, in other words, prevents any updates from
6956 taking place on screen, the window is not redrawn at all. Thaw must be
6957 called to reenable window redrawing. Calls to Freeze/Thaw may be
6958 nested, with the actual Thaw being delayed until all the nesting has
6961 This method is useful for visual appearance optimization (for example,
6962 it is a good idea to use it before inserting large amount of text into
6963 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
6964 for all controls so it is mostly just a hint to wxWindows and not a
6965 mandatory directive.
6967 return _core_
.Window_Freeze(*args
, **kwargs
)
6969 def Thaw(*args
, **kwargs
):
6973 Reenables window updating after a previous call to Freeze. Calls to
6974 Freeze/Thaw may be nested, so Thaw must be called the same number of
6975 times that Freeze was before the window will be updated.
6977 return _core_
.Window_Thaw(*args
, **kwargs
)
6979 def PrepareDC(*args
, **kwargs
):
6981 PrepareDC(self, DC dc)
6983 Call this function to prepare the device context for drawing a
6984 scrolled image. It sets the device origin according to the current
6987 return _core_
.Window_PrepareDC(*args
, **kwargs
)
6989 def GetUpdateRegion(*args
, **kwargs
):
6991 GetUpdateRegion(self) -> Region
6993 Returns the region specifying which parts of the window have been
6994 damaged. Should only be called within an EVT_PAINT handler.
6996 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
6998 def GetUpdateClientRect(*args
, **kwargs
):
7000 GetUpdateClientRect(self) -> Rect
7002 Get the update rectangle region bounding box in client coords.
7004 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7006 def IsExposed(*args
, **kwargs
):
7008 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7010 Returns true if the given point or rectangle area has been exposed
7011 since the last repaint. Call this in an paint event handler to
7012 optimize redrawing by only redrawing those areas, which have been
7015 return _core_
.Window_IsExposed(*args
, **kwargs
)
7017 def IsExposedPoint(*args
, **kwargs
):
7019 IsExposedPoint(self, Point pt) -> bool
7021 Returns true if the given point or rectangle area has been exposed
7022 since the last repaint. Call this in an paint event handler to
7023 optimize redrawing by only redrawing those areas, which have been
7026 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7028 def IsExposedRect(*args
, **kwargs
):
7030 IsExposedRect(self, Rect rect) -> bool
7032 Returns true if the given point or rectangle area has been exposed
7033 since the last repaint. Call this in an paint event handler to
7034 optimize redrawing by only redrawing those areas, which have been
7037 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7039 def GetDefaultAttributes(*args
, **kwargs
):
7041 GetDefaultAttributes(self) -> VisualAttributes
7043 Get the default attributes for an instance of this class. This is
7044 useful if you want to use the same font or colour in your own control
7045 as in a standard control -- which is a much better idea than hard
7046 coding specific colours or fonts which might look completely out of
7047 place on the user's system, especially if it uses themes.
7049 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7051 def GetClassDefaultAttributes(*args
, **kwargs
):
7053 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7055 Get the default attributes for this class. This is useful if you want
7056 to use the same font or colour in your own control as in a standard
7057 control -- which is a much better idea than hard coding specific
7058 colours or fonts which might look completely out of place on the
7059 user's system, especially if it uses themes.
7061 The variant parameter is only relevant under Mac currently and is
7062 ignore under other platforms. Under Mac, it will change the size of
7063 the returned font. See `wx.Window.SetWindowVariant` for more about
7066 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7068 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7069 def SetBackgroundColour(*args
, **kwargs
):
7071 SetBackgroundColour(self, Colour colour) -> bool
7073 Sets the background colour of the window. Returns True if the colour
7074 was changed. The background colour is usually painted by the default
7075 EVT_ERASE_BACKGROUND event handler function under Windows and
7076 automatically under GTK. Using `wx.NullColour` will reset the window
7077 to the default background colour.
7079 Note that setting the background colour may not cause an immediate
7080 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7081 calling this function.
7083 Using this function will disable attempts to use themes for this
7084 window, if the system supports them. Use with care since usually the
7085 themes represent the appearance chosen by the user to be used for all
7086 applications on the system.
7088 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7090 def SetOwnBackgroundColour(*args
, **kwargs
):
7091 """SetOwnBackgroundColour(self, Colour colour)"""
7092 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7094 def SetForegroundColour(*args
, **kwargs
):
7096 SetForegroundColour(self, Colour colour) -> bool
7098 Sets the foreground colour of the window. Returns True is the colour
7099 was changed. The interpretation of foreground colour is dependent on
7100 the window class; it may be the text colour or other colour, or it may
7103 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7105 def SetOwnForegroundColour(*args
, **kwargs
):
7106 """SetOwnForegroundColour(self, Colour colour)"""
7107 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7109 def GetBackgroundColour(*args
, **kwargs
):
7111 GetBackgroundColour(self) -> Colour
7113 Returns the background colour of the window.
7115 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7117 def GetForegroundColour(*args
, **kwargs
):
7119 GetForegroundColour(self) -> Colour
7121 Returns the foreground colour of the window. The interpretation of
7122 foreground colour is dependent on the window class; it may be the text
7123 colour or other colour, or it may not be used at all.
7125 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7127 def SetBackgroundStyle(*args
, **kwargs
):
7129 SetBackgroundStyle(self, int style) -> bool
7131 Returns the background style of the window. The background style
7132 indicates how the background of the window is drawn.
7134 ====================== ========================================
7135 wx.BG_STYLE_SYSTEM The background colour or pattern should
7136 be determined by the system
7137 wx.BG_STYLE_COLOUR The background should be a solid colour
7138 wx.BG_STYLE_CUSTOM The background will be implemented by the
7140 ====================== ========================================
7142 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7143 a custom background, such as a tiled bitmap. Currently the style has
7144 no effect on other platforms.
7146 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7148 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
7150 def GetBackgroundStyle(*args
, **kwargs
):
7152 GetBackgroundStyle(self) -> int
7154 Returns the background style of the window.
7156 :see: `SetBackgroundStyle`
7158 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
7160 def SetCursor(*args
, **kwargs
):
7162 SetCursor(self, Cursor cursor) -> bool
7164 Sets the window's cursor. Notice that the window cursor also sets it
7165 for the children of the window implicitly.
7167 The cursor may be wx.NullCursor in which case the window cursor will
7168 be reset back to default.
7170 return _core_
.Window_SetCursor(*args
, **kwargs
)
7172 def GetCursor(*args
, **kwargs
):
7174 GetCursor(self) -> Cursor
7176 Return the cursor associated with this window.
7178 return _core_
.Window_GetCursor(*args
, **kwargs
)
7180 def SetFont(*args
, **kwargs
):
7182 SetFont(self, Font font) -> bool
7184 Sets the font for this window.
7186 return _core_
.Window_SetFont(*args
, **kwargs
)
7188 def SetOwnFont(*args
, **kwargs
):
7189 """SetOwnFont(self, Font font)"""
7190 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
7192 def GetFont(*args
, **kwargs
):
7194 GetFont(self) -> Font
7196 Returns the default font used for this window.
7198 return _core_
.Window_GetFont(*args
, **kwargs
)
7200 def SetCaret(*args
, **kwargs
):
7202 SetCaret(self, Caret caret)
7204 Sets the caret associated with the window.
7206 return _core_
.Window_SetCaret(*args
, **kwargs
)
7208 def GetCaret(*args
, **kwargs
):
7210 GetCaret(self) -> Caret
7212 Returns the caret associated with the window.
7214 return _core_
.Window_GetCaret(*args
, **kwargs
)
7216 def GetCharHeight(*args
, **kwargs
):
7218 GetCharHeight(self) -> int
7220 Get the (average) character size for the current font.
7222 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
7224 def GetCharWidth(*args
, **kwargs
):
7226 GetCharWidth(self) -> int
7228 Get the (average) character size for the current font.
7230 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
7232 def GetTextExtent(*args
, **kwargs
):
7234 GetTextExtent(String string) -> (width, height)
7236 Get the width and height of the text using the current font.
7238 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
7240 def GetFullTextExtent(*args
, **kwargs
):
7242 GetFullTextExtent(String string, Font font=None) ->
7243 (width, height, descent, externalLeading)
7245 Get the width, height, decent and leading of the text using the
7246 current or specified font.
7248 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
7250 def ClientToScreenXY(*args
, **kwargs
):
7252 ClientToScreenXY(int x, int y) -> (x,y)
7254 Converts to screen coordinates from coordinates relative to this window.
7256 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
7258 def ScreenToClientXY(*args
, **kwargs
):
7260 ScreenToClientXY(int x, int y) -> (x,y)
7262 Converts from screen to client window coordinates.
7264 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
7266 def ClientToScreen(*args
, **kwargs
):
7268 ClientToScreen(self, Point pt) -> Point
7270 Converts to screen coordinates from coordinates relative to this window.
7272 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
7274 def ScreenToClient(*args
, **kwargs
):
7276 ScreenToClient(self, Point pt) -> Point
7278 Converts from screen to client window coordinates.
7280 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
7282 def HitTestXY(*args
, **kwargs
):
7284 HitTestXY(self, int x, int y) -> int
7286 Test where the given (in client coords) point lies
7288 return _core_
.Window_HitTestXY(*args
, **kwargs
)
7290 def HitTest(*args
, **kwargs
):
7292 HitTest(self, Point pt) -> int
7294 Test where the given (in client coords) point lies
7296 return _core_
.Window_HitTest(*args
, **kwargs
)
7298 def GetBorder(*args
):
7300 GetBorder(self, long flags) -> int
7301 GetBorder(self) -> int
7303 Get border for the flags of this window
7305 return _core_
.Window_GetBorder(*args
)
7307 def UpdateWindowUI(*args
, **kwargs
):
7309 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7311 This function sends EVT_UPDATE_UI events to the window. The particular
7312 implementation depends on the window; for example a wx.ToolBar will
7313 send an update UI event for each toolbar button, and a wx.Frame will
7314 send an update UI event for each menubar menu item. You can call this
7315 function from your application to ensure that your UI is up-to-date at
7316 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7317 concerned). This may be necessary if you have called
7318 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7319 limit the overhead that wxWindows incurs by sending update UI events
7322 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
7324 def PopupMenuXY(*args
, **kwargs
):
7326 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7328 Pops up the given menu at the specified coordinates, relative to this window,
7329 and returns control when the user has dismissed the menu. If a menu item is
7330 selected, the corresponding menu event is generated and will be processed as
7331 usual. If the default position is given then the current position of the
7332 mouse cursor will be used.
7334 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
7336 def PopupMenu(*args
, **kwargs
):
7338 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7340 Pops up the given menu at the specified coordinates, relative to this window,
7341 and returns control when the user has dismissed the menu. If a menu item is
7342 selected, the corresponding menu event is generated and will be processed as
7343 usual. If the default position is given then the current position of the
7344 mouse cursor will be used.
7346 return _core_
.Window_PopupMenu(*args
, **kwargs
)
7348 def GetHandle(*args
, **kwargs
):
7350 GetHandle(self) -> long
7352 Returns the platform-specific handle (as a long integer) of the
7353 physical window. Currently on wxMac it returns the handle of the
7354 toplevel parent of the window.
7356 return _core_
.Window_GetHandle(*args
, **kwargs
)
7358 def AssociateHandle(*args
, **kwargs
):
7360 AssociateHandle(self, long handle)
7362 Associate the window with a new native handle
7364 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
7366 def DissociateHandle(*args
, **kwargs
):
7368 DissociateHandle(self)
7370 Dissociate the current native handle from the window
7372 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
7374 def OnPaint(*args
, **kwargs
):
7375 """OnPaint(self, PaintEvent event)"""
7376 return _core_
.Window_OnPaint(*args
, **kwargs
)
7378 def HasScrollbar(*args
, **kwargs
):
7380 HasScrollbar(self, int orient) -> bool
7382 Does the window have the scrollbar for this orientation?
7384 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
7386 def SetScrollbar(*args
, **kwargs
):
7388 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7391 Sets the scrollbar properties of a built-in scrollbar.
7393 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
7395 def SetScrollPos(*args
, **kwargs
):
7397 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7399 Sets the position of one of the built-in scrollbars.
7401 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
7403 def GetScrollPos(*args
, **kwargs
):
7405 GetScrollPos(self, int orientation) -> int
7407 Returns the built-in scrollbar position.
7409 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
7411 def GetScrollThumb(*args
, **kwargs
):
7413 GetScrollThumb(self, int orientation) -> int
7415 Returns the built-in scrollbar thumb size.
7417 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
7419 def GetScrollRange(*args
, **kwargs
):
7421 GetScrollRange(self, int orientation) -> int
7423 Returns the built-in scrollbar range.
7425 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
7427 def ScrollWindow(*args
, **kwargs
):
7429 ScrollWindow(self, int dx, int dy, Rect rect=None)
7431 Physically scrolls the pixels in the window and move child windows
7432 accordingly. Use this function to optimise your scrolling
7433 implementations, to minimise the area that must be redrawn. Note that
7434 it is rarely required to call this function from a user program.
7436 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
7438 def ScrollLines(*args
, **kwargs
):
7440 ScrollLines(self, int lines) -> bool
7442 If the platform and window class supports it, scrolls the window by
7443 the given number of lines down, if lines is positive, or up if lines
7444 is negative. Returns True if the window was scrolled, False if it was
7445 already on top/bottom and nothing was done.
7447 return _core_
.Window_ScrollLines(*args
, **kwargs
)
7449 def ScrollPages(*args
, **kwargs
):
7451 ScrollPages(self, int pages) -> bool
7453 If the platform and window class supports it, scrolls the window by
7454 the given number of pages down, if pages is positive, or up if pages
7455 is negative. Returns True if the window was scrolled, False if it was
7456 already on top/bottom and nothing was done.
7458 return _core_
.Window_ScrollPages(*args
, **kwargs
)
7460 def LineUp(*args
, **kwargs
):
7462 LineUp(self) -> bool
7464 This is just a wrapper for ScrollLines(-1).
7466 return _core_
.Window_LineUp(*args
, **kwargs
)
7468 def LineDown(*args
, **kwargs
):
7470 LineDown(self) -> bool
7472 This is just a wrapper for ScrollLines(1).
7474 return _core_
.Window_LineDown(*args
, **kwargs
)
7476 def PageUp(*args
, **kwargs
):
7478 PageUp(self) -> bool
7480 This is just a wrapper for ScrollPages(-1).
7482 return _core_
.Window_PageUp(*args
, **kwargs
)
7484 def PageDown(*args
, **kwargs
):
7486 PageDown(self) -> bool
7488 This is just a wrapper for ScrollPages(1).
7490 return _core_
.Window_PageDown(*args
, **kwargs
)
7492 def SetHelpText(*args
, **kwargs
):
7494 SetHelpText(self, String text)
7496 Sets the help text to be used as context-sensitive help for this
7497 window. Note that the text is actually stored by the current
7498 wxHelpProvider implementation, and not in the window object itself.
7500 return _core_
.Window_SetHelpText(*args
, **kwargs
)
7502 def SetHelpTextForId(*args
, **kwargs
):
7504 SetHelpTextForId(self, String text)
7506 Associate this help text with all windows with the same id as this
7509 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
7511 def GetHelpText(*args
, **kwargs
):
7513 GetHelpText(self) -> String
7515 Gets the help text to be used as context-sensitive help for this
7516 window. Note that the text is actually stored by the current
7517 wxHelpProvider implementation, and not in the window object itself.
7519 return _core_
.Window_GetHelpText(*args
, **kwargs
)
7521 def SetToolTipString(*args
, **kwargs
):
7523 SetToolTipString(self, String tip)
7525 Attach a tooltip to the window.
7527 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
7529 def SetToolTip(*args
, **kwargs
):
7531 SetToolTip(self, ToolTip tip)
7533 Attach a tooltip to the window.
7535 return _core_
.Window_SetToolTip(*args
, **kwargs
)
7537 def GetToolTip(*args
, **kwargs
):
7539 GetToolTip(self) -> ToolTip
7541 get the associated tooltip or None if none
7543 return _core_
.Window_GetToolTip(*args
, **kwargs
)
7545 def SetDropTarget(*args
, **kwargs
):
7547 SetDropTarget(self, DropTarget dropTarget)
7549 Associates a drop target with this window. If the window already has
7550 a drop target, it is deleted.
7552 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
7554 def GetDropTarget(*args
, **kwargs
):
7556 GetDropTarget(self) -> DropTarget
7558 Returns the associated drop target, which may be None.
7560 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
7562 def DragAcceptFiles(*args
, **kwargs
):
7564 DragAcceptFiles(self, bool accept)
7566 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7567 Only available on Windows.
7569 return _core_
.Window_DragAcceptFiles(*args
, **kwargs
)
7571 def SetConstraints(*args
, **kwargs
):
7573 SetConstraints(self, LayoutConstraints constraints)
7575 Sets the window to have the given layout constraints. If an existing
7576 layout constraints object is already owned by the window, it will be
7577 deleted. Pass None to disassociate and delete the window's current
7580 You must call SetAutoLayout to tell a window to use the constraints
7581 automatically in its default EVT_SIZE handler; otherwise, you must
7582 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7583 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7586 return _core_
.Window_SetConstraints(*args
, **kwargs
)
7588 def GetConstraints(*args
, **kwargs
):
7590 GetConstraints(self) -> LayoutConstraints
7592 Returns a pointer to the window's layout constraints, or None if there
7595 return _core_
.Window_GetConstraints(*args
, **kwargs
)
7597 def SetAutoLayout(*args
, **kwargs
):
7599 SetAutoLayout(self, bool autoLayout)
7601 Determines whether the Layout function will be called automatically
7602 when the window is resized. It is called implicitly by SetSizer but
7603 if you use SetConstraints you should call it manually or otherwise the
7604 window layout won't be correctly updated when its size changes.
7606 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
7608 def GetAutoLayout(*args
, **kwargs
):
7610 GetAutoLayout(self) -> bool
7612 Returns the current autoLayout setting
7614 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
7616 def Layout(*args
, **kwargs
):
7618 Layout(self) -> bool
7620 Invokes the constraint-based layout algorithm or the sizer-based
7621 algorithm for this window. See SetAutoLayout: when auto layout is on,
7622 this function gets called automatically by the default EVT_SIZE
7623 handler when the window is resized.
7625 return _core_
.Window_Layout(*args
, **kwargs
)
7627 def SetSizer(*args
, **kwargs
):
7629 SetSizer(self, Sizer sizer, bool deleteOld=True)
7631 Sets the window to have the given layout sizer. The window will then
7632 own the object, and will take care of its deletion. If an existing
7633 layout sizer object is already owned by the window, it will be deleted
7634 if the deleteOld parameter is true. Note that this function will also
7635 call SetAutoLayout implicitly with a True parameter if the sizer is
7636 non-None, and False otherwise.
7638 return _core_
.Window_SetSizer(*args
, **kwargs
)
7640 def SetSizerAndFit(*args
, **kwargs
):
7642 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7644 The same as SetSizer, except it also sets the size hints for the
7645 window based on the sizer's minimum size.
7647 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
7649 def GetSizer(*args
, **kwargs
):
7651 GetSizer(self) -> Sizer
7653 Return the sizer associated with the window by a previous call to
7654 SetSizer or None if there isn't one.
7656 return _core_
.Window_GetSizer(*args
, **kwargs
)
7658 def SetContainingSizer(*args
, **kwargs
):
7660 SetContainingSizer(self, Sizer sizer)
7662 This normally does not need to be called by application code. It is
7663 called internally when a window is added to a sizer, and is used so
7664 the window can remove itself from the sizer when it is destroyed.
7666 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
7668 def GetContainingSizer(*args
, **kwargs
):
7670 GetContainingSizer(self) -> Sizer
7672 Return the sizer that this window is a member of, if any, otherwise None.
7674 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
7676 def InheritAttributes(*args
, **kwargs
):
7678 InheritAttributes(self)
7680 This function is (or should be, in case of custom controls) called
7681 during window creation to intelligently set up the window visual
7682 attributes, that is the font and the foreground and background
7685 By 'intelligently' the following is meant: by default, all windows use
7686 their own default attributes. However if some of the parent's
7687 attributes are explicitly changed (that is, using SetFont and not
7688 SetOwnFont) and if the corresponding attribute hadn't been
7689 explicitly set for this window itself, then this window takes the same
7690 value as used by the parent. In addition, if the window overrides
7691 ShouldInheritColours to return false, the colours will not be changed
7692 no matter what and only the font might.
7694 This rather complicated logic is necessary in order to accommodate the
7695 different usage scenarios. The most common one is when all default
7696 attributes are used and in this case, nothing should be inherited as
7697 in modern GUIs different controls use different fonts (and colours)
7698 than their siblings so they can't inherit the same value from the
7699 parent. However it was also deemed desirable to allow to simply change
7700 the attributes of all children at once by just changing the font or
7701 colour of their common parent, hence in this case we do inherit the
7705 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
7707 def ShouldInheritColours(*args
, **kwargs
):
7709 ShouldInheritColours(self) -> bool
7711 Return true from here to allow the colours of this window to be
7712 changed by InheritAttributes, returning false forbids inheriting them
7713 from the parent window.
7715 The base class version returns false, but this method is overridden in
7716 wxControl where it returns true.
7718 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
7720 def PostCreate(self
, pre
):
7722 Phase 3 of the 2-phase create <wink!>
7723 Call this method after precreating the window with the 2-phase create method.
7725 self
.this
= pre
.this
7726 self
.thisown
= pre
.thisown
7728 if hasattr(self
, '_setOORInfo'):
7729 self
._setOORInfo
(self
)
7730 if hasattr(self
, '_setCallbackInfo'):
7731 self
._setCallbackInfo
(self
, self
.__class
__)
7734 class WindowPtr(Window
):
7735 def __init__(self
, this
):
7737 if not hasattr(self
,"thisown"): self
.thisown
= 0
7738 self
.__class
__ = Window
7739 _core_
.Window_swigregister(WindowPtr
)
7741 def PreWindow(*args
, **kwargs
):
7743 PreWindow() -> Window
7745 Precreate a Window for 2-phase creation.
7747 val
= _core_
.new_PreWindow(*args
, **kwargs
)
7751 def Window_NewControlId(*args
, **kwargs
):
7753 Window_NewControlId() -> int
7755 Generate a control id for the controls which were not given one.
7757 return _core_
.Window_NewControlId(*args
, **kwargs
)
7759 def Window_NextControlId(*args
, **kwargs
):
7761 Window_NextControlId(int winid) -> int
7763 Get the id of the control following the one with the given
7766 return _core_
.Window_NextControlId(*args
, **kwargs
)
7768 def Window_PrevControlId(*args
, **kwargs
):
7770 Window_PrevControlId(int winid) -> int
7772 Get the id of the control preceding the one with the given
7775 return _core_
.Window_PrevControlId(*args
, **kwargs
)
7777 def Window_FindFocus(*args
, **kwargs
):
7779 Window_FindFocus() -> Window
7781 Returns the window or control that currently has the keyboard focus,
7784 return _core_
.Window_FindFocus(*args
, **kwargs
)
7786 def Window_GetCapture(*args
, **kwargs
):
7788 Window_GetCapture() -> Window
7790 Returns the window which currently captures the mouse or None
7792 return _core_
.Window_GetCapture(*args
, **kwargs
)
7794 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
7796 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7798 Get the default attributes for this class. This is useful if you want
7799 to use the same font or colour in your own control as in a standard
7800 control -- which is a much better idea than hard coding specific
7801 colours or fonts which might look completely out of place on the
7802 user's system, especially if it uses themes.
7804 The variant parameter is only relevant under Mac currently and is
7805 ignore under other platforms. Under Mac, it will change the size of
7806 the returned font. See `wx.Window.SetWindowVariant` for more about
7809 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7811 def DLG_PNT(win
, point_or_x
, y
=None):
7813 Convenience function for converting a Point or (x,y) in
7814 dialog units to pixel units.
7817 return win
.ConvertDialogPointToPixels(point_or_x
)
7819 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
7821 def DLG_SZE(win
, size_width
, height
=None):
7823 Convenience function for converting a Size or (w,h) in
7824 dialog units to pixel units.
7827 return win
.ConvertDialogSizeToPixels(size_width
)
7829 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
7832 def FindWindowById(*args
, **kwargs
):
7834 FindWindowById(long id, Window parent=None) -> Window
7836 Find the first window in the application with the given id. If parent
7837 is None, the search will start from all top-level frames and dialog
7838 boxes; if non-None, the search will be limited to the given window
7839 hierarchy. The search is recursive in both cases.
7841 return _core_
.FindWindowById(*args
, **kwargs
)
7843 def FindWindowByName(*args
, **kwargs
):
7845 FindWindowByName(String name, Window parent=None) -> Window
7847 Find a window by its name (as given in a window constructor or Create
7848 function call). If parent is None, the search will start from all
7849 top-level frames and dialog boxes; if non-None, the search will be
7850 limited to the given window hierarchy. The search is recursive in both
7853 If no window with such name is found, wx.FindWindowByLabel is called.
7855 return _core_
.FindWindowByName(*args
, **kwargs
)
7857 def FindWindowByLabel(*args
, **kwargs
):
7859 FindWindowByLabel(String label, Window parent=None) -> Window
7861 Find a window by its label. Depending on the type of window, the label
7862 may be a window title or panel item label. If parent is None, the
7863 search will start from all top-level frames and dialog boxes; if
7864 non-None, the search will be limited to the given window
7865 hierarchy. The search is recursive in both cases.
7867 return _core_
.FindWindowByLabel(*args
, **kwargs
)
7869 def Window_FromHWND(*args
, **kwargs
):
7870 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
7871 return _core_
.Window_FromHWND(*args
, **kwargs
)
7872 #---------------------------------------------------------------------------
7874 class Validator(EvtHandler
):
7876 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7877 def __init__(self
, *args
, **kwargs
):
7878 """__init__(self) -> Validator"""
7879 newobj
= _core_
.new_Validator(*args
, **kwargs
)
7880 self
.this
= newobj
.this
7883 self
._setOORInfo
(self
)
7885 def Clone(*args
, **kwargs
):
7886 """Clone(self) -> Validator"""
7887 return _core_
.Validator_Clone(*args
, **kwargs
)
7889 def Validate(*args
, **kwargs
):
7890 """Validate(self, Window parent) -> bool"""
7891 return _core_
.Validator_Validate(*args
, **kwargs
)
7893 def TransferToWindow(*args
, **kwargs
):
7894 """TransferToWindow(self) -> bool"""
7895 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
7897 def TransferFromWindow(*args
, **kwargs
):
7898 """TransferFromWindow(self) -> bool"""
7899 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
7901 def GetWindow(*args
, **kwargs
):
7902 """GetWindow(self) -> Window"""
7903 return _core_
.Validator_GetWindow(*args
, **kwargs
)
7905 def SetWindow(*args
, **kwargs
):
7906 """SetWindow(self, Window window)"""
7907 return _core_
.Validator_SetWindow(*args
, **kwargs
)
7909 def IsSilent(*args
, **kwargs
):
7910 """IsSilent() -> bool"""
7911 return _core_
.Validator_IsSilent(*args
, **kwargs
)
7913 IsSilent
= staticmethod(IsSilent
)
7914 def SetBellOnError(*args
, **kwargs
):
7915 """SetBellOnError(int doIt=True)"""
7916 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
7918 SetBellOnError
= staticmethod(SetBellOnError
)
7920 class ValidatorPtr(Validator
):
7921 def __init__(self
, this
):
7923 if not hasattr(self
,"thisown"): self
.thisown
= 0
7924 self
.__class
__ = Validator
7925 _core_
.Validator_swigregister(ValidatorPtr
)
7927 def Validator_IsSilent(*args
, **kwargs
):
7928 """Validator_IsSilent() -> bool"""
7929 return _core_
.Validator_IsSilent(*args
, **kwargs
)
7931 def Validator_SetBellOnError(*args
, **kwargs
):
7932 """Validator_SetBellOnError(int doIt=True)"""
7933 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
7935 class PyValidator(Validator
):
7937 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7938 def __init__(self
, *args
, **kwargs
):
7939 """__init__(self) -> PyValidator"""
7940 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
7941 self
.this
= newobj
.this
7945 self
._setCallbackInfo
(self
, PyValidator
, 1)
7946 self
._setOORInfo
(self
)
7948 def _setCallbackInfo(*args
, **kwargs
):
7949 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
7950 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
7953 class PyValidatorPtr(PyValidator
):
7954 def __init__(self
, this
):
7956 if not hasattr(self
,"thisown"): self
.thisown
= 0
7957 self
.__class
__ = PyValidator
7958 _core_
.PyValidator_swigregister(PyValidatorPtr
)
7960 #---------------------------------------------------------------------------
7962 class Menu(EvtHandler
):
7964 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7965 def __init__(self
, *args
, **kwargs
):
7966 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
7967 newobj
= _core_
.new_Menu(*args
, **kwargs
)
7968 self
.this
= newobj
.this
7971 self
._setOORInfo
(self
)
7973 def Append(*args
, **kwargs
):
7974 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7975 return _core_
.Menu_Append(*args
, **kwargs
)
7977 def AppendSeparator(*args
, **kwargs
):
7978 """AppendSeparator(self) -> MenuItem"""
7979 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
7981 def AppendCheckItem(*args
, **kwargs
):
7982 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7983 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
7985 def AppendRadioItem(*args
, **kwargs
):
7986 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7987 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
7989 def AppendMenu(*args
, **kwargs
):
7990 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7991 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
7993 def AppendItem(*args
, **kwargs
):
7994 """AppendItem(self, MenuItem item) -> MenuItem"""
7995 return _core_
.Menu_AppendItem(*args
, **kwargs
)
7997 def Break(*args
, **kwargs
):
7999 return _core_
.Menu_Break(*args
, **kwargs
)
8001 def InsertItem(*args
, **kwargs
):
8002 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8003 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8005 def Insert(*args
, **kwargs
):
8007 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8008 int kind=ITEM_NORMAL) -> MenuItem
8010 return _core_
.Menu_Insert(*args
, **kwargs
)
8012 def InsertSeparator(*args
, **kwargs
):
8013 """InsertSeparator(self, size_t pos) -> MenuItem"""
8014 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8016 def InsertCheckItem(*args
, **kwargs
):
8017 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8018 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8020 def InsertRadioItem(*args
, **kwargs
):
8021 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8022 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8024 def InsertMenu(*args
, **kwargs
):
8025 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8026 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8028 def PrependItem(*args
, **kwargs
):
8029 """PrependItem(self, MenuItem item) -> MenuItem"""
8030 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8032 def Prepend(*args
, **kwargs
):
8033 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8034 return _core_
.Menu_Prepend(*args
, **kwargs
)
8036 def PrependSeparator(*args
, **kwargs
):
8037 """PrependSeparator(self) -> MenuItem"""
8038 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8040 def PrependCheckItem(*args
, **kwargs
):
8041 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8042 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8044 def PrependRadioItem(*args
, **kwargs
):
8045 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8046 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8048 def PrependMenu(*args
, **kwargs
):
8049 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8050 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8052 def Remove(*args
, **kwargs
):
8053 """Remove(self, int id) -> MenuItem"""
8054 return _core_
.Menu_Remove(*args
, **kwargs
)
8056 def RemoveItem(*args
, **kwargs
):
8057 """RemoveItem(self, MenuItem item) -> MenuItem"""
8058 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8060 def Delete(*args
, **kwargs
):
8061 """Delete(self, int id) -> bool"""
8062 return _core_
.Menu_Delete(*args
, **kwargs
)
8064 def DeleteItem(*args
, **kwargs
):
8065 """DeleteItem(self, MenuItem item) -> bool"""
8066 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8068 def Destroy(*args
, **kwargs
):
8072 Deletes the C++ object this Python object is a proxy for.
8074 return _core_
.Menu_Destroy(*args
, **kwargs
)
8076 def DestroyId(*args
, **kwargs
):
8078 DestroyId(self, int id) -> bool
8080 Deletes the C++ object this Python object is a proxy for.
8082 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8084 def DestroyItem(*args
, **kwargs
):
8086 DestroyItem(self, MenuItem item) -> bool
8088 Deletes the C++ object this Python object is a proxy for.
8090 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8092 def GetMenuItemCount(*args
, **kwargs
):
8093 """GetMenuItemCount(self) -> size_t"""
8094 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8096 def GetMenuItems(*args
, **kwargs
):
8097 """GetMenuItems(self) -> PyObject"""
8098 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8100 def FindItem(*args
, **kwargs
):
8101 """FindItem(self, String item) -> int"""
8102 return _core_
.Menu_FindItem(*args
, **kwargs
)
8104 def FindItemById(*args
, **kwargs
):
8105 """FindItemById(self, int id) -> MenuItem"""
8106 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8108 def FindItemByPosition(*args
, **kwargs
):
8109 """FindItemByPosition(self, size_t position) -> MenuItem"""
8110 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
8112 def Enable(*args
, **kwargs
):
8113 """Enable(self, int id, bool enable)"""
8114 return _core_
.Menu_Enable(*args
, **kwargs
)
8116 def IsEnabled(*args
, **kwargs
):
8117 """IsEnabled(self, int id) -> bool"""
8118 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
8120 def Check(*args
, **kwargs
):
8121 """Check(self, int id, bool check)"""
8122 return _core_
.Menu_Check(*args
, **kwargs
)
8124 def IsChecked(*args
, **kwargs
):
8125 """IsChecked(self, int id) -> bool"""
8126 return _core_
.Menu_IsChecked(*args
, **kwargs
)
8128 def SetLabel(*args
, **kwargs
):
8129 """SetLabel(self, int id, String label)"""
8130 return _core_
.Menu_SetLabel(*args
, **kwargs
)
8132 def GetLabel(*args
, **kwargs
):
8133 """GetLabel(self, int id) -> String"""
8134 return _core_
.Menu_GetLabel(*args
, **kwargs
)
8136 def SetHelpString(*args
, **kwargs
):
8137 """SetHelpString(self, int id, String helpString)"""
8138 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
8140 def GetHelpString(*args
, **kwargs
):
8141 """GetHelpString(self, int id) -> String"""
8142 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
8144 def SetTitle(*args
, **kwargs
):
8145 """SetTitle(self, String title)"""
8146 return _core_
.Menu_SetTitle(*args
, **kwargs
)
8148 def GetTitle(*args
, **kwargs
):
8149 """GetTitle(self) -> String"""
8150 return _core_
.Menu_GetTitle(*args
, **kwargs
)
8152 def SetEventHandler(*args
, **kwargs
):
8153 """SetEventHandler(self, EvtHandler handler)"""
8154 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
8156 def GetEventHandler(*args
, **kwargs
):
8157 """GetEventHandler(self) -> EvtHandler"""
8158 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
8160 def SetInvokingWindow(*args
, **kwargs
):
8161 """SetInvokingWindow(self, Window win)"""
8162 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
8164 def GetInvokingWindow(*args
, **kwargs
):
8165 """GetInvokingWindow(self) -> Window"""
8166 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
8168 def GetStyle(*args
, **kwargs
):
8169 """GetStyle(self) -> long"""
8170 return _core_
.Menu_GetStyle(*args
, **kwargs
)
8172 def UpdateUI(*args
, **kwargs
):
8173 """UpdateUI(self, EvtHandler source=None)"""
8174 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
8176 def GetMenuBar(*args
, **kwargs
):
8177 """GetMenuBar(self) -> MenuBar"""
8178 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
8180 def Attach(*args
, **kwargs
):
8181 """Attach(self, wxMenuBarBase menubar)"""
8182 return _core_
.Menu_Attach(*args
, **kwargs
)
8184 def Detach(*args
, **kwargs
):
8186 return _core_
.Menu_Detach(*args
, **kwargs
)
8188 def IsAttached(*args
, **kwargs
):
8189 """IsAttached(self) -> bool"""
8190 return _core_
.Menu_IsAttached(*args
, **kwargs
)
8192 def SetParent(*args
, **kwargs
):
8193 """SetParent(self, Menu parent)"""
8194 return _core_
.Menu_SetParent(*args
, **kwargs
)
8196 def GetParent(*args
, **kwargs
):
8197 """GetParent(self) -> Menu"""
8198 return _core_
.Menu_GetParent(*args
, **kwargs
)
8201 class MenuPtr(Menu
):
8202 def __init__(self
, this
):
8204 if not hasattr(self
,"thisown"): self
.thisown
= 0
8205 self
.__class
__ = Menu
8206 _core_
.Menu_swigregister(MenuPtr
)
8207 DefaultValidator
= cvar
.DefaultValidator
8209 #---------------------------------------------------------------------------
8211 class MenuBar(Window
):
8213 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8214 def __init__(self
, *args
, **kwargs
):
8215 """__init__(self, long style=0) -> MenuBar"""
8216 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
8217 self
.this
= newobj
.this
8220 self
._setOORInfo
(self
)
8222 def Append(*args
, **kwargs
):
8223 """Append(self, Menu menu, String title) -> bool"""
8224 return _core_
.MenuBar_Append(*args
, **kwargs
)
8226 def Insert(*args
, **kwargs
):
8227 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8228 return _core_
.MenuBar_Insert(*args
, **kwargs
)
8230 def GetMenuCount(*args
, **kwargs
):
8231 """GetMenuCount(self) -> size_t"""
8232 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
8234 def GetMenu(*args
, **kwargs
):
8235 """GetMenu(self, size_t pos) -> Menu"""
8236 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
8238 def Replace(*args
, **kwargs
):
8239 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8240 return _core_
.MenuBar_Replace(*args
, **kwargs
)
8242 def Remove(*args
, **kwargs
):
8243 """Remove(self, size_t pos) -> Menu"""
8244 return _core_
.MenuBar_Remove(*args
, **kwargs
)
8246 def EnableTop(*args
, **kwargs
):
8247 """EnableTop(self, size_t pos, bool enable)"""
8248 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
8250 def IsEnabledTop(*args
, **kwargs
):
8251 """IsEnabledTop(self, size_t pos) -> bool"""
8252 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
8254 def SetLabelTop(*args
, **kwargs
):
8255 """SetLabelTop(self, size_t pos, String label)"""
8256 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
8258 def GetLabelTop(*args
, **kwargs
):
8259 """GetLabelTop(self, size_t pos) -> String"""
8260 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
8262 def FindMenuItem(*args
, **kwargs
):
8263 """FindMenuItem(self, String menu, String item) -> int"""
8264 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
8266 def FindItemById(*args
, **kwargs
):
8267 """FindItemById(self, int id) -> MenuItem"""
8268 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
8270 def FindMenu(*args
, **kwargs
):
8271 """FindMenu(self, String title) -> int"""
8272 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
8274 def Enable(*args
, **kwargs
):
8275 """Enable(self, int id, bool enable)"""
8276 return _core_
.MenuBar_Enable(*args
, **kwargs
)
8278 def Check(*args
, **kwargs
):
8279 """Check(self, int id, bool check)"""
8280 return _core_
.MenuBar_Check(*args
, **kwargs
)
8282 def IsChecked(*args
, **kwargs
):
8283 """IsChecked(self, int id) -> bool"""
8284 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
8286 def IsEnabled(*args
, **kwargs
):
8287 """IsEnabled(self, int id) -> bool"""
8288 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
8290 def SetLabel(*args
, **kwargs
):
8291 """SetLabel(self, int id, String label)"""
8292 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
8294 def GetLabel(*args
, **kwargs
):
8295 """GetLabel(self, int id) -> String"""
8296 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
8298 def SetHelpString(*args
, **kwargs
):
8299 """SetHelpString(self, int id, String helpString)"""
8300 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
8302 def GetHelpString(*args
, **kwargs
):
8303 """GetHelpString(self, int id) -> String"""
8304 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
8306 def GetFrame(*args
, **kwargs
):
8307 """GetFrame(self) -> wxFrame"""
8308 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
8310 def IsAttached(*args
, **kwargs
):
8311 """IsAttached(self) -> bool"""
8312 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
8314 def Attach(*args
, **kwargs
):
8315 """Attach(self, wxFrame frame)"""
8316 return _core_
.MenuBar_Attach(*args
, **kwargs
)
8318 def Detach(*args
, **kwargs
):
8320 return _core_
.MenuBar_Detach(*args
, **kwargs
)
8323 class MenuBarPtr(MenuBar
):
8324 def __init__(self
, this
):
8326 if not hasattr(self
,"thisown"): self
.thisown
= 0
8327 self
.__class
__ = MenuBar
8328 _core_
.MenuBar_swigregister(MenuBarPtr
)
8330 #---------------------------------------------------------------------------
8332 class MenuItem(Object
):
8334 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8335 def __init__(self
, *args
, **kwargs
):
8337 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8338 String help=EmptyString, int kind=ITEM_NORMAL,
8339 Menu subMenu=None) -> MenuItem
8341 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
8342 self
.this
= newobj
.this
8345 def GetMenu(*args
, **kwargs
):
8346 """GetMenu(self) -> Menu"""
8347 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
8349 def SetMenu(*args
, **kwargs
):
8350 """SetMenu(self, Menu menu)"""
8351 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
8353 def SetId(*args
, **kwargs
):
8354 """SetId(self, int id)"""
8355 return _core_
.MenuItem_SetId(*args
, **kwargs
)
8357 def GetId(*args
, **kwargs
):
8358 """GetId(self) -> int"""
8359 return _core_
.MenuItem_GetId(*args
, **kwargs
)
8361 def IsSeparator(*args
, **kwargs
):
8362 """IsSeparator(self) -> bool"""
8363 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
8365 def SetText(*args
, **kwargs
):
8366 """SetText(self, String str)"""
8367 return _core_
.MenuItem_SetText(*args
, **kwargs
)
8369 def GetLabel(*args
, **kwargs
):
8370 """GetLabel(self) -> String"""
8371 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
8373 def GetText(*args
, **kwargs
):
8374 """GetText(self) -> String"""
8375 return _core_
.MenuItem_GetText(*args
, **kwargs
)
8377 def GetLabelFromText(*args
, **kwargs
):
8378 """GetLabelFromText(String text) -> String"""
8379 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8381 GetLabelFromText
= staticmethod(GetLabelFromText
)
8382 def GetKind(*args
, **kwargs
):
8383 """GetKind(self) -> int"""
8384 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
8386 def SetKind(*args
, **kwargs
):
8387 """SetKind(self, int kind)"""
8388 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
8390 def SetCheckable(*args
, **kwargs
):
8391 """SetCheckable(self, bool checkable)"""
8392 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
8394 def IsCheckable(*args
, **kwargs
):
8395 """IsCheckable(self) -> bool"""
8396 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
8398 def IsSubMenu(*args
, **kwargs
):
8399 """IsSubMenu(self) -> bool"""
8400 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
8402 def SetSubMenu(*args
, **kwargs
):
8403 """SetSubMenu(self, Menu menu)"""
8404 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
8406 def GetSubMenu(*args
, **kwargs
):
8407 """GetSubMenu(self) -> Menu"""
8408 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
8410 def Enable(*args
, **kwargs
):
8411 """Enable(self, bool enable=True)"""
8412 return _core_
.MenuItem_Enable(*args
, **kwargs
)
8414 def IsEnabled(*args
, **kwargs
):
8415 """IsEnabled(self) -> bool"""
8416 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
8418 def Check(*args
, **kwargs
):
8419 """Check(self, bool check=True)"""
8420 return _core_
.MenuItem_Check(*args
, **kwargs
)
8422 def IsChecked(*args
, **kwargs
):
8423 """IsChecked(self) -> bool"""
8424 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
8426 def Toggle(*args
, **kwargs
):
8428 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
8430 def SetHelp(*args
, **kwargs
):
8431 """SetHelp(self, String str)"""
8432 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
8434 def GetHelp(*args
, **kwargs
):
8435 """GetHelp(self) -> String"""
8436 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
8438 def GetAccel(*args
, **kwargs
):
8439 """GetAccel(self) -> AcceleratorEntry"""
8440 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
8442 def SetAccel(*args
, **kwargs
):
8443 """SetAccel(self, AcceleratorEntry accel)"""
8444 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
8446 def SetFont(*args
, **kwargs
):
8447 """SetFont(self, Font font)"""
8448 return _core_
.MenuItem_SetFont(*args
, **kwargs
)
8450 def GetFont(*args
, **kwargs
):
8451 """GetFont(self) -> Font"""
8452 return _core_
.MenuItem_GetFont(*args
, **kwargs
)
8454 def SetTextColour(*args
, **kwargs
):
8455 """SetTextColour(self, Colour colText)"""
8456 return _core_
.MenuItem_SetTextColour(*args
, **kwargs
)
8458 def GetTextColour(*args
, **kwargs
):
8459 """GetTextColour(self) -> Colour"""
8460 return _core_
.MenuItem_GetTextColour(*args
, **kwargs
)
8462 def SetBackgroundColour(*args
, **kwargs
):
8463 """SetBackgroundColour(self, Colour colBack)"""
8464 return _core_
.MenuItem_SetBackgroundColour(*args
, **kwargs
)
8466 def GetBackgroundColour(*args
, **kwargs
):
8467 """GetBackgroundColour(self) -> Colour"""
8468 return _core_
.MenuItem_GetBackgroundColour(*args
, **kwargs
)
8470 def SetBitmaps(*args
, **kwargs
):
8471 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8472 return _core_
.MenuItem_SetBitmaps(*args
, **kwargs
)
8474 def SetDisabledBitmap(*args
, **kwargs
):
8475 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8476 return _core_
.MenuItem_SetDisabledBitmap(*args
, **kwargs
)
8478 def GetDisabledBitmap(*args
, **kwargs
):
8479 """GetDisabledBitmap(self) -> Bitmap"""
8480 return _core_
.MenuItem_GetDisabledBitmap(*args
, **kwargs
)
8482 def SetMarginWidth(*args
, **kwargs
):
8483 """SetMarginWidth(self, int nWidth)"""
8484 return _core_
.MenuItem_SetMarginWidth(*args
, **kwargs
)
8486 def GetMarginWidth(*args
, **kwargs
):
8487 """GetMarginWidth(self) -> int"""
8488 return _core_
.MenuItem_GetMarginWidth(*args
, **kwargs
)
8490 def GetDefaultMarginWidth(*args
, **kwargs
):
8491 """GetDefaultMarginWidth() -> int"""
8492 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8494 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
8495 def IsOwnerDrawn(*args
, **kwargs
):
8496 """IsOwnerDrawn(self) -> bool"""
8497 return _core_
.MenuItem_IsOwnerDrawn(*args
, **kwargs
)
8499 def SetOwnerDrawn(*args
, **kwargs
):
8500 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8501 return _core_
.MenuItem_SetOwnerDrawn(*args
, **kwargs
)
8503 def ResetOwnerDrawn(*args
, **kwargs
):
8504 """ResetOwnerDrawn(self)"""
8505 return _core_
.MenuItem_ResetOwnerDrawn(*args
, **kwargs
)
8507 def SetBitmap(*args
, **kwargs
):
8508 """SetBitmap(self, Bitmap bitmap)"""
8509 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
8511 def GetBitmap(*args
, **kwargs
):
8512 """GetBitmap(self) -> Bitmap"""
8513 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
8516 class MenuItemPtr(MenuItem
):
8517 def __init__(self
, this
):
8519 if not hasattr(self
,"thisown"): self
.thisown
= 0
8520 self
.__class
__ = MenuItem
8521 _core_
.MenuItem_swigregister(MenuItemPtr
)
8523 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8524 """MenuItem_GetLabelFromText(String text) -> String"""
8525 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8527 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8528 """MenuItem_GetDefaultMarginWidth() -> int"""
8529 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8531 #---------------------------------------------------------------------------
8533 class Control(Window
):
8535 This is the base class for a control or 'widget'.
8537 A control is generally a small window which processes user input
8538 and/or displays one or more item of data.
8541 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8542 def __init__(self
, *args
, **kwargs
):
8544 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8545 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8546 String name=ControlNameStr) -> Control
8548 Create a Control. Normally you should only call this from a subclass'
8549 __init__ as a plain old wx.Control is not very useful.
8551 newobj
= _core_
.new_Control(*args
, **kwargs
)
8552 self
.this
= newobj
.this
8555 self
._setOORInfo
(self
)
8557 def Create(*args
, **kwargs
):
8559 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8560 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8561 String name=ControlNameStr) -> bool
8563 Do the 2nd phase and create the GUI control.
8565 return _core_
.Control_Create(*args
, **kwargs
)
8567 def Command(*args
, **kwargs
):
8569 Command(self, CommandEvent event)
8571 Simulates the effect of the user issuing a command to the item.
8573 :see: `wx.CommandEvent`
8576 return _core_
.Control_Command(*args
, **kwargs
)
8578 def GetLabel(*args
, **kwargs
):
8580 GetLabel(self) -> String
8582 Return a control's text.
8584 return _core_
.Control_GetLabel(*args
, **kwargs
)
8586 def SetLabel(*args
, **kwargs
):
8588 SetLabel(self, String label)
8590 Sets the item's text.
8592 return _core_
.Control_SetLabel(*args
, **kwargs
)
8594 def GetClassDefaultAttributes(*args
, **kwargs
):
8596 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8598 Get the default attributes for this class. This is useful if you want
8599 to use the same font or colour in your own control as in a standard
8600 control -- which is a much better idea than hard coding specific
8601 colours or fonts which might look completely out of place on the
8602 user's system, especially if it uses themes.
8604 The variant parameter is only relevant under Mac currently and is
8605 ignore under other platforms. Under Mac, it will change the size of
8606 the returned font. See `wx.Window.SetWindowVariant` for more about
8609 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8611 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
8613 class ControlPtr(Control
):
8614 def __init__(self
, this
):
8616 if not hasattr(self
,"thisown"): self
.thisown
= 0
8617 self
.__class
__ = Control
8618 _core_
.Control_swigregister(ControlPtr
)
8619 ControlNameStr
= cvar
.ControlNameStr
8621 def PreControl(*args
, **kwargs
):
8623 PreControl() -> Control
8625 Precreate a Control control for 2-phase creation
8627 val
= _core_
.new_PreControl(*args
, **kwargs
)
8631 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
8633 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8635 Get the default attributes for this class. This is useful if you want
8636 to use the same font or colour in your own control as in a standard
8637 control -- which is a much better idea than hard coding specific
8638 colours or fonts which might look completely out of place on the
8639 user's system, especially if it uses themes.
8641 The variant parameter is only relevant under Mac currently and is
8642 ignore under other platforms. Under Mac, it will change the size of
8643 the returned font. See `wx.Window.SetWindowVariant` for more about
8646 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8648 #---------------------------------------------------------------------------
8650 class ItemContainer(object):
8652 wx.ItemContainer defines an interface which is implemented by all
8653 controls which have string subitems, each of which may be selected,
8654 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8655 `wx.ComboBox` which implements an extended interface deriving from
8658 It defines the methods for accessing the control's items and although
8659 each of the derived classes implements them differently, they still
8660 all conform to the same interface.
8662 The items in a wx.ItemContainer have (non empty) string labels and,
8663 optionally, client data associated with them.
8666 def __init__(self
): raise RuntimeError, "No constructor defined"
8668 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8669 def Append(*args
, **kwargs
):
8671 Append(self, String item, PyObject clientData=None) -> int
8673 Adds the item to the control, associating the given data with the item
8674 if not None. The return value is the index of the newly added item
8675 which may be different from the last one if the control is sorted (e.g.
8676 has wx.LB_SORT or wx.CB_SORT style).
8678 return _core_
.ItemContainer_Append(*args
, **kwargs
)
8680 def AppendItems(*args
, **kwargs
):
8682 AppendItems(self, List strings)
8684 Apend several items at once to the control. Notice that calling this
8685 method may be much faster than appending the items one by one if you
8686 need to add a lot of items.
8688 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
8690 def Insert(*args
, **kwargs
):
8692 Insert(self, String item, int pos, PyObject clientData=None) -> int
8694 Insert an item into the control before the item at the ``pos`` index,
8695 optionally associating some data object with the item.
8697 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
8699 def Clear(*args
, **kwargs
):
8703 Removes all items from the control.
8705 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
8707 def Delete(*args
, **kwargs
):
8711 Deletes the item at the zero-based index 'n' from the control. Note
8712 that it is an error (signalled by a `wx.PyAssertionError` exception if
8713 enabled) to remove an item with the index negative or greater or equal
8714 than the number of items in the control.
8716 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
8718 def GetCount(*args
, **kwargs
):
8720 GetCount(self) -> int
8722 Returns the number of items in the control.
8724 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
8726 def IsEmpty(*args
, **kwargs
):
8728 IsEmpty(self) -> bool
8730 Returns True if the control is empty or False if it has some items.
8732 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
8734 def GetString(*args
, **kwargs
):
8736 GetString(self, int n) -> String
8738 Returns the label of the item with the given index.
8740 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
8742 def GetStrings(*args
, **kwargs
):
8743 """GetStrings(self) -> wxArrayString"""
8744 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
8746 def SetString(*args
, **kwargs
):
8748 SetString(self, int n, String s)
8750 Sets the label for the given item.
8752 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
8754 def FindString(*args
, **kwargs
):
8756 FindString(self, String s) -> int
8758 Finds an item whose label matches the given string. Returns the
8759 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8762 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
8764 def Select(*args
, **kwargs
):
8768 Sets the item at index 'n' to be the selected item.
8770 return _core_
.ItemContainer_Select(*args
, **kwargs
)
8772 SetSelection
= Select
8773 def GetSelection(*args
, **kwargs
):
8775 GetSelection(self) -> int
8777 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8780 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
8782 def GetStringSelection(*args
, **kwargs
):
8784 GetStringSelection(self) -> String
8786 Returns the label of the selected item or an empty string if no item
8789 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
8791 def GetClientData(*args
, **kwargs
):
8793 GetClientData(self, int n) -> PyObject
8795 Returns the client data associated with the given item, (if any.)
8797 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
8799 def SetClientData(*args
, **kwargs
):
8801 SetClientData(self, int n, PyObject clientData)
8803 Associate the given client data with the item at position n.
8805 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
8808 class ItemContainerPtr(ItemContainer
):
8809 def __init__(self
, this
):
8811 if not hasattr(self
,"thisown"): self
.thisown
= 0
8812 self
.__class
__ = ItemContainer
8813 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
8815 #---------------------------------------------------------------------------
8817 class ControlWithItems(Control
,ItemContainer
):
8819 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8820 wx.Control class, and is used for the base class of various controls
8823 def __init__(self
): raise RuntimeError, "No constructor defined"
8825 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8827 class ControlWithItemsPtr(ControlWithItems
):
8828 def __init__(self
, this
):
8830 if not hasattr(self
,"thisown"): self
.thisown
= 0
8831 self
.__class
__ = ControlWithItems
8832 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
8834 #---------------------------------------------------------------------------
8836 class SizerItem(Object
):
8838 The wx.SizerItem class is used to track the position, size and other
8839 attributes of each item managed by a `wx.Sizer`. In normal usage user
8840 code should never need to deal directly with a wx.SizerItem, but
8841 custom classes derived from `wx.PySizer` will probably need to use the
8842 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8844 :see: `wx.Sizer`, `wx.GBSizerItem`
8847 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8848 def __init__(self
, *args
, **kwargs
):
8850 __init__(self) -> SizerItem
8852 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8853 size will need to be set before this item can be used in a Sizer.
8855 You will probably never need to create a wx.SizerItem directly as they
8856 are created automatically when the sizer's Add, Insert or Prepend
8859 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8861 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
8862 self
.this
= newobj
.this
8865 def DeleteWindows(*args
, **kwargs
):
8869 Destroy the window or the windows in a subsizer, depending on the type
8872 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
8874 def DetachSizer(*args
, **kwargs
):
8878 Enable deleting the SizerItem without destroying the contained sizer.
8880 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
8882 def GetSize(*args
, **kwargs
):
8884 GetSize(self) -> Size
8886 Get the current size of the item, as set in the last Layout.
8888 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
8890 def CalcMin(*args
, **kwargs
):
8892 CalcMin(self) -> Size
8894 Calculates the minimum desired size for the item, including any space
8897 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
8899 def SetDimension(*args
, **kwargs
):
8901 SetDimension(self, Point pos, Size size)
8903 Set the position and size of the space allocated for this item by the
8904 sizer, and adjust the position and size of the item (window or
8905 subsizer) to be within that space taking alignment and borders into
8908 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
8910 def GetMinSize(*args
, **kwargs
):
8912 GetMinSize(self) -> Size
8914 Get the minimum size needed for the item.
8916 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
8918 def GetMinSizeWithBorder(*args
, **kwargs
):
8920 GetMinSizeWithBorder(self) -> Size
8922 Get the minimum size needed for the item with space for the borders
8925 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
8927 def SetInitSize(*args
, **kwargs
):
8928 """SetInitSize(self, int x, int y)"""
8929 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
8931 def SetRatioWH(*args
, **kwargs
):
8933 SetRatioWH(self, int width, int height)
8935 Set the ratio item attribute.
8937 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
8939 def SetRatioSize(*args
, **kwargs
):
8941 SetRatioSize(self, Size size)
8943 Set the ratio item attribute.
8945 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
8947 def SetRatio(*args
, **kwargs
):
8949 SetRatio(self, float ratio)
8951 Set the ratio item attribute.
8953 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
8955 def GetRatio(*args
, **kwargs
):
8957 GetRatio(self) -> float
8959 Set the ratio item attribute.
8961 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
8963 def IsWindow(*args
, **kwargs
):
8965 IsWindow(self) -> bool
8967 Is this sizer item a window?
8969 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
8971 def IsSizer(*args
, **kwargs
):
8973 IsSizer(self) -> bool
8975 Is this sizer item a subsizer?
8977 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
8979 def IsSpacer(*args
, **kwargs
):
8981 IsSpacer(self) -> bool
8983 Is this sizer item a spacer?
8985 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
8987 def SetProportion(*args
, **kwargs
):
8989 SetProportion(self, int proportion)
8991 Set the proportion value for this item.
8993 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
8995 def GetProportion(*args
, **kwargs
):
8997 GetProportion(self) -> int
8999 Get the proportion value for this item.
9001 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
9003 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
9004 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
9005 def SetFlag(*args
, **kwargs
):
9007 SetFlag(self, int flag)
9009 Set the flag value for this item.
9011 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
9013 def GetFlag(*args
, **kwargs
):
9015 GetFlag(self) -> int
9017 Get the flag value for this item.
9019 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
9021 def SetBorder(*args
, **kwargs
):
9023 SetBorder(self, int border)
9025 Set the border value for this item.
9027 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
9029 def GetBorder(*args
, **kwargs
):
9031 GetBorder(self) -> int
9033 Get the border value for this item.
9035 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
9037 def GetWindow(*args
, **kwargs
):
9039 GetWindow(self) -> Window
9041 Get the window (if any) that is managed by this sizer item.
9043 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
9045 def SetWindow(*args
, **kwargs
):
9047 SetWindow(self, Window window)
9049 Set the window to be managed by this sizer item.
9051 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9053 def GetSizer(*args
, **kwargs
):
9055 GetSizer(self) -> Sizer
9057 Get the subsizer (if any) that is managed by this sizer item.
9059 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9061 def SetSizer(*args
, **kwargs
):
9063 SetSizer(self, Sizer sizer)
9065 Set the subsizer to be managed by this sizer item.
9067 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9069 def GetSpacer(*args
, **kwargs
):
9071 GetSpacer(self) -> Size
9073 Get the size of the spacer managed by this sizer item.
9075 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9077 def SetSpacer(*args
, **kwargs
):
9079 SetSpacer(self, Size size)
9081 Set the size of the spacer to be managed by this sizer item.
9083 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9085 def Show(*args
, **kwargs
):
9087 Show(self, bool show)
9089 Set the show item attribute, which sizers use to determine if the item
9090 is to be made part of the layout or not. If the item is tracking a
9091 window then it is shown or hidden as needed.
9093 return _core_
.SizerItem_Show(*args
, **kwargs
)
9095 def IsShown(*args
, **kwargs
):
9097 IsShown(self) -> bool
9099 Is the item to be shown in the layout?
9101 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
9103 def GetPosition(*args
, **kwargs
):
9105 GetPosition(self) -> Point
9107 Returns the current position of the item, as set in the last Layout.
9109 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
9111 def GetUserData(*args
, **kwargs
):
9113 GetUserData(self) -> PyObject
9115 Returns the userData associated with this sizer item, or None if there
9118 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
9121 class SizerItemPtr(SizerItem
):
9122 def __init__(self
, this
):
9124 if not hasattr(self
,"thisown"): self
.thisown
= 0
9125 self
.__class
__ = SizerItem
9126 _core_
.SizerItem_swigregister(SizerItemPtr
)
9128 def SizerItemWindow(*args
, **kwargs
):
9130 SizerItemWindow(Window window, int proportion, int flag, int border,
9131 PyObject userData=None) -> SizerItem
9133 Constructs a `wx.SizerItem` for tracking a window.
9135 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
9139 def SizerItemSpacer(*args
, **kwargs
):
9141 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9142 PyObject userData=None) -> SizerItem
9144 Constructs a `wx.SizerItem` for tracking a spacer.
9146 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
9150 def SizerItemSizer(*args
, **kwargs
):
9152 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9153 PyObject userData=None) -> SizerItem
9155 Constructs a `wx.SizerItem` for tracking a subsizer
9157 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
9161 class Sizer(Object
):
9163 wx.Sizer is the abstract base class used for laying out subwindows in
9164 a window. You cannot use wx.Sizer directly; instead, you will have to
9165 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9166 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9167 and `wx.GridBagSizer`.
9169 The concept implemented by sizers in wxWidgets is closely related to
9170 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9171 toolkit or the Qt toolkit. It is based upon the idea of the individual
9172 subwindows reporting their minimal required size and their ability to
9173 get stretched if the size of the parent window has changed. This will
9174 most often mean that the programmer does not set the original size of
9175 a dialog in the beginning, rather the dialog will assigned a sizer and
9176 this sizer will be queried about the recommended size. The sizer in
9177 turn will query its children, which can be normal windows or contorls,
9178 empty space or other sizers, so that a hierarchy of sizers can be
9179 constructed. Note that wxSizer does not derive from wxWindow and thus
9180 do not interfere with tab ordering and requires very little resources
9181 compared to a real window on screen.
9183 What makes sizers so well fitted for use in wxWidgets is the fact that
9184 every control reports its own minimal size and the algorithm can
9185 handle differences in font sizes or different window (dialog item)
9186 sizes on different platforms without problems. If for example the
9187 standard font as well as the overall design of Mac widgets requires
9188 more space than on Windows, then the initial size of a dialog using a
9189 sizer will automatically be bigger on Mac than on Windows.
9191 def __init__(self
): raise RuntimeError, "No constructor defined"
9193 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9194 def _setOORInfo(*args
, **kwargs
):
9195 """_setOORInfo(self, PyObject _self)"""
9196 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
9198 def Add(*args
, **kwargs
):
9200 Add(self, item, int proportion=0, int flag=0, int border=0,
9201 PyObject userData=None)
9203 Appends a child item to the sizer.
9205 return _core_
.Sizer_Add(*args
, **kwargs
)
9207 def Insert(*args
, **kwargs
):
9209 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9210 PyObject userData=None)
9212 Inserts a new item into the list of items managed by this sizer before
9213 the item at index *before*. See `Add` for a description of the parameters.
9215 return _core_
.Sizer_Insert(*args
, **kwargs
)
9217 def Prepend(*args
, **kwargs
):
9219 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9220 PyObject userData=None)
9222 Adds a new item to the begining of the list of sizer items managed by
9223 this sizer. See `Add` for a description of the parameters.
9225 return _core_
.Sizer_Prepend(*args
, **kwargs
)
9227 def Remove(*args
, **kwargs
):
9229 Remove(self, item) -> bool
9231 Removes an item from the sizer and destroys it. This method does not
9232 cause any layout or resizing to take place, call `Layout` to update
9233 the layout on screen after removing a child from the sizer. The
9234 *item* parameter can be either a window, a sizer, or the zero-based
9235 index of an item to remove. Returns True if the child item was found
9238 return _core_
.Sizer_Remove(*args
, **kwargs
)
9240 def Detach(*args
, **kwargs
):
9242 Detach(self, item) -> bool
9244 Detaches an item from the sizer without destroying it. This method
9245 does not cause any layout or resizing to take place, call `Layout` to
9246 do so. The *item* parameter can be either a window, a sizer, or the
9247 zero-based index of the item to be detached. Returns True if the child item
9248 was found and detached.
9250 return _core_
.Sizer_Detach(*args
, **kwargs
)
9252 def _SetItemMinSize(*args
, **kwargs
):
9253 """_SetItemMinSize(self, PyObject item, Size size)"""
9254 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
9256 def SetItemMinSize(self
, item
, *args
):
9258 SetItemMinSize(self, item, Size size)
9260 Sets the minimum size that will be allocated for an item in the sizer.
9261 The *item* parameter can be either a window, a sizer, or the
9262 zero-based index of the item. If a window or sizer is given then it
9263 will be searched for recursivly in subsizers if neccessary.
9266 # for backward compatibility accept separate width,height args too
9267 return self
._SetItemMinSize
(item
, args
)
9269 return self
._SetItemMinSize
(item
, args
[0])
9271 def AddItem(*args
, **kwargs
):
9273 AddItem(self, SizerItem item)
9275 Adds a `wx.SizerItem` to the sizer.
9277 return _core_
.Sizer_AddItem(*args
, **kwargs
)
9279 def InsertItem(*args
, **kwargs
):
9281 InsertItem(self, int index, SizerItem item)
9283 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9285 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
9287 def PrependItem(*args
, **kwargs
):
9289 PrependItem(self, SizerItem item)
9291 Prepends a `wx.SizerItem` to the sizer.
9293 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
9295 def AddMany(self
, items
):
9297 AddMany is a convenience method for adding several items
9298 to a sizer at one time. Simply pass it a list of tuples,
9299 where each tuple consists of the parameters that you
9300 would normally pass to the `Add` method.
9303 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
9307 # for backwards compatibility only, please do not use in new code
9308 AddWindow
= wx
._deprecated
(Add
, "AddWindow is deprecated, use `Add` instead.")
9309 AddSizer
= wx
._deprecated
(Add
, "AddSizer is deprecated, use `Add` instead.")
9310 AddSpacer
= wx
._deprecated
(Add
, "AddSpacer is deprecated, use `Add` instead.")
9311 PrependWindow
= wx
._deprecated
(Prepend
, "PrependWindow is deprecated, use `Prepend` instead.")
9312 PrependSizer
= wx
._deprecated
(Prepend
, "PrependSizer is deprecated, use `Prepend` instead.")
9313 PrependSpacer
= wx
._deprecated
(Prepend
, "PrependSpacer is deprecated, use `Prepend` instead.")
9314 InsertWindow
= wx
._deprecated
(Insert
, "InsertWindow is deprecated, use `Insert` instead.")
9315 InsertSizer
= wx
._deprecated
(Insert
, "InsertSizer is deprecated, use `Insert` instead.")
9316 InsertSpacer
= wx
._deprecated
(Insert
, "InsertSpacer is deprecated, use `Insert` instead.")
9317 RemoveWindow
= wx
._deprecated
(Remove
, "RemoveWindow is deprecated, use `Remove` instead.")
9318 RemoveSizer
= wx
._deprecated
(Remove
, "RemoveSizer is deprecated, use `Remove` instead.")
9319 RemovePos
= wx
._deprecated
(Remove
, "RemovePos is deprecated, use `Remove` instead.")
9322 def SetDimension(*args
, **kwargs
):
9324 SetDimension(self, int x, int y, int width, int height)
9326 Call this to force the sizer to take the given dimension and thus
9327 force the items owned by the sizer to resize themselves according to
9328 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9331 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
9333 def SetMinSize(*args
, **kwargs
):
9335 SetMinSize(self, Size size)
9337 Call this to give the sizer a minimal size. Normally, the sizer will
9338 calculate its minimal size based purely on how much space its children
9339 need. After calling this method `GetMinSize` will return either the
9340 minimal size as requested by its children or the minimal size set
9341 here, depending on which is bigger.
9343 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
9345 def GetSize(*args
, **kwargs
):
9347 GetSize(self) -> Size
9349 Returns the current size of the space managed by the sizer.
9351 return _core_
.Sizer_GetSize(*args
, **kwargs
)
9353 def GetPosition(*args
, **kwargs
):
9355 GetPosition(self) -> Point
9357 Returns the current position of the sizer's managed space.
9359 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
9361 def GetMinSize(*args
, **kwargs
):
9363 GetMinSize(self) -> Size
9365 Returns the minimal size of the sizer. This is either the combined
9366 minimal size of all the children and their borders or the minimal size
9367 set by SetMinSize, depending on which is bigger.
9369 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
9371 def GetSizeTuple(self
):
9372 return self
.GetSize().Get()
9373 def GetPositionTuple(self
):
9374 return self
.GetPosition().Get()
9375 def GetMinSizeTuple(self
):
9376 return self
.GetMinSize().Get()
9378 def RecalcSizes(*args
, **kwargs
):
9382 Using the sizes calculated by `CalcMin` reposition and resize all the
9383 items managed by this sizer. You should not need to call this directly as
9384 it is called by `Layout`.
9386 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
9388 def CalcMin(*args
, **kwargs
):
9390 CalcMin(self) -> Size
9392 This method is where the sizer will do the actual calculation of its
9393 children's minimal sizes. You should not need to call this directly as
9394 it is called by `Layout`.
9396 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
9398 def Layout(*args
, **kwargs
):
9402 This method will force the recalculation and layout of the items
9403 controlled by the sizer using the current space allocated to the
9404 sizer. Normally this is called automatically from the owning window's
9405 EVT_SIZE handler, but it is also useful to call it from user code when
9406 one of the items in a sizer change size, or items are added or
9409 return _core_
.Sizer_Layout(*args
, **kwargs
)
9411 def Fit(*args
, **kwargs
):
9413 Fit(self, Window window) -> Size
9415 Tell the sizer to resize the *window* to match the sizer's minimal
9416 size. This is commonly done in the constructor of the window itself in
9417 order to set its initial size to match the needs of the children as
9418 determined by the sizer. Returns the new size.
9420 For a top level window this is the total window size, not the client size.
9422 return _core_
.Sizer_Fit(*args
, **kwargs
)
9424 def FitInside(*args
, **kwargs
):
9426 FitInside(self, Window window)
9428 Tell the sizer to resize the *virtual size* of the *window* to match the
9429 sizer's minimal size. This will not alter the on screen size of the
9430 window, but may cause the addition/removal/alteration of scrollbars
9431 required to view the virtual area in windows which manage it.
9433 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9436 return _core_
.Sizer_FitInside(*args
, **kwargs
)
9438 def SetSizeHints(*args
, **kwargs
):
9440 SetSizeHints(self, Window window)
9442 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9443 match the sizer's minimal size. This is commonly done in the
9444 constructor of the window itself if the window is resizable (as are
9445 many dialogs under Unix and frames on probably all platforms) in order
9446 to prevent the window from being sized smaller than the minimal size
9447 required by the sizer.
9449 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
9451 def SetVirtualSizeHints(*args
, **kwargs
):
9453 SetVirtualSizeHints(self, Window window)
9455 Tell the sizer to set the minimal size of the window virtual area to
9456 match the sizer's minimal size. For windows with managed scrollbars
9457 this will set them appropriately.
9459 :see: `wx.ScrolledWindow.SetScrollbars`
9462 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
9464 def Clear(*args
, **kwargs
):
9466 Clear(self, bool deleteWindows=False)
9468 Clear all items from the sizer, optionally destroying the window items
9471 return _core_
.Sizer_Clear(*args
, **kwargs
)
9473 def DeleteWindows(*args
, **kwargs
):
9477 Destroy all windows managed by the sizer.
9479 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
9481 def GetChildren(*args
, **kwargs
):
9483 GetChildren(sefl) -> list
9485 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9487 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
9489 def Show(*args
, **kwargs
):
9491 Show(self, item, bool show=True, bool recursive=false) -> bool
9493 Shows or hides an item managed by the sizer. To make a sizer item
9494 disappear or reappear, use Show followed by `Layout`. The *item*
9495 parameter can be either a window, a sizer, or the zero-based index of
9496 the item. Use the recursive parameter to show or hide an item in a
9497 subsizer. Returns True if the item was found.
9499 return _core_
.Sizer_Show(*args
, **kwargs
)
9501 def IsShown(*args
, **kwargs
):
9505 Determines if the item is currently shown. sizer. To make a sizer
9506 item disappear or reappear, use Show followed by `Layout`. The *item*
9507 parameter can be either a window, a sizer, or the zero-based index of
9510 return _core_
.Sizer_IsShown(*args
, **kwargs
)
9512 def Hide(self
, item
, recursive
=False):
9514 A convenience method for Show(item, False, recursive).
9516 return self
.Show(item
, false
, recursive
)
9518 def ShowItems(*args
, **kwargs
):
9520 ShowItems(self, bool show)
9522 Recursively call `wx.SizerItem.Show` on all sizer items.
9524 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
9527 class SizerPtr(Sizer
):
9528 def __init__(self
, this
):
9530 if not hasattr(self
,"thisown"): self
.thisown
= 0
9531 self
.__class
__ = Sizer
9532 _core_
.Sizer_swigregister(SizerPtr
)
9534 class PySizer(Sizer
):
9536 wx.PySizer is a special version of `wx.Sizer` that has been
9537 instrumented to allow the C++ virtual methods to be overloaded in
9538 Python derived classes. You would derive from this class if you are
9539 wanting to implement a custom sizer in Python code. Simply implement
9540 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9543 class MySizer(wx.PySizer):
9545 wx.PySizer.__init__(self)
9548 for item in self.GetChildren():
9549 # calculate the total minimum width and height needed
9550 # by all items in the sizer according to this sizer's
9553 return wx.Size(width, height)
9555 def RecalcSizes(self):
9556 # find the space allotted to this sizer
9557 pos = self.GetPosition()
9558 size = self.GetSize()
9559 for item in self.GetChildren():
9560 # Recalculate (if necessary) the position and size of
9561 # each item and then call item.SetDimension to do the
9562 # actual positioning and sizing of the items within the
9563 # space alloted to this sizer.
9565 item.SetDimension(itemPos, itemSize)
9568 When `Layout` is called it first calls `CalcMin` followed by
9569 `RecalcSizes` so you can optimize a bit by saving the results of
9570 `CalcMin` and resuing them in `RecalcSizes`.
9572 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9577 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9578 def __init__(self
, *args
, **kwargs
):
9580 __init__(self) -> PySizer
9582 Creates a wx.PySizer. Must be called from the __init__ in the derived
9585 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
9586 self
.this
= newobj
.this
9589 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
9591 def _setCallbackInfo(*args
, **kwargs
):
9592 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9593 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
9596 class PySizerPtr(PySizer
):
9597 def __init__(self
, this
):
9599 if not hasattr(self
,"thisown"): self
.thisown
= 0
9600 self
.__class
__ = PySizer
9601 _core_
.PySizer_swigregister(PySizerPtr
)
9603 #---------------------------------------------------------------------------
9605 class BoxSizer(Sizer
):
9607 The basic idea behind a box sizer is that windows will most often be
9608 laid out in rather simple basic geometry, typically in a row or a
9609 column or nested hierarchies of either. A wx.BoxSizer will lay out
9610 its items in a simple row or column, depending on the orientation
9611 parameter passed to the constructor.
9614 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9615 def __init__(self
, *args
, **kwargs
):
9617 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9619 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9620 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9623 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
9624 self
.this
= newobj
.this
9627 self
._setOORInfo
(self
)
9629 def GetOrientation(*args
, **kwargs
):
9631 GetOrientation(self) -> int
9633 Returns the current orientation of the sizer.
9635 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
9637 def SetOrientation(*args
, **kwargs
):
9639 SetOrientation(self, int orient)
9641 Resets the orientation of the sizer.
9643 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
9646 class BoxSizerPtr(BoxSizer
):
9647 def __init__(self
, this
):
9649 if not hasattr(self
,"thisown"): self
.thisown
= 0
9650 self
.__class
__ = BoxSizer
9651 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
9653 #---------------------------------------------------------------------------
9655 class StaticBoxSizer(BoxSizer
):
9657 wx.StaticBoxSizer derives from and functions identically to the
9658 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9659 manages. Note that this static box must be created separately and
9660 passed to the sizer constructor.
9663 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9664 def __init__(self
, *args
, **kwargs
):
9666 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9668 Constructor. It takes an associated static box and the orientation
9669 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9672 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
9673 self
.this
= newobj
.this
9676 self
._setOORInfo
(self
)
9678 def GetStaticBox(*args
, **kwargs
):
9680 GetStaticBox(self) -> StaticBox
9682 Returns the static box associated with this sizer.
9684 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
9687 class StaticBoxSizerPtr(StaticBoxSizer
):
9688 def __init__(self
, this
):
9690 if not hasattr(self
,"thisown"): self
.thisown
= 0
9691 self
.__class
__ = StaticBoxSizer
9692 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
9694 #---------------------------------------------------------------------------
9696 class GridSizer(Sizer
):
9698 A grid sizer is a sizer which lays out its children in a
9699 two-dimensional table with all cells having the same size. In other
9700 words, the width of each cell within the grid is the width of the
9701 widest item added to the sizer and the height of each grid cell is the
9702 height of the tallest item. An optional vertical and/or horizontal
9703 gap between items can also be specified (in pixels.)
9705 Items are placed in the cells of the grid in the order they are added,
9706 in row-major order. In other words, the first row is filled first,
9707 then the second, and so on until all items have been added. (If
9708 neccessary, additional rows will be added as items are added.) If you
9709 need to have greater control over the cells that items are placed in
9710 then use the `wx.GridBagSizer`.
9714 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9715 def __init__(self
, *args
, **kwargs
):
9717 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9719 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9720 of columns and rows in the sizer - if either of the parameters is
9721 zero, it will be calculated to from the total number of children in
9722 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9723 define extra space between all children.
9725 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
9726 self
.this
= newobj
.this
9729 self
._setOORInfo
(self
)
9731 def SetCols(*args
, **kwargs
):
9733 SetCols(self, int cols)
9735 Sets the number of columns in the sizer.
9737 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
9739 def SetRows(*args
, **kwargs
):
9741 SetRows(self, int rows)
9743 Sets the number of rows in the sizer.
9745 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
9747 def SetVGap(*args
, **kwargs
):
9749 SetVGap(self, int gap)
9751 Sets the vertical gap (in pixels) between the cells in the sizer.
9753 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
9755 def SetHGap(*args
, **kwargs
):
9757 SetHGap(self, int gap)
9759 Sets the horizontal gap (in pixels) between cells in the sizer
9761 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
9763 def GetCols(*args
, **kwargs
):
9765 GetCols(self) -> int
9767 Returns the number of columns in the sizer.
9769 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
9771 def GetRows(*args
, **kwargs
):
9773 GetRows(self) -> int
9775 Returns the number of rows in the sizer.
9777 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
9779 def GetVGap(*args
, **kwargs
):
9781 GetVGap(self) -> int
9783 Returns the vertical gap (in pixels) between the cells in the sizer.
9785 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
9787 def GetHGap(*args
, **kwargs
):
9789 GetHGap(self) -> int
9791 Returns the horizontal gap (in pixels) between cells in the sizer.
9793 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
9796 class GridSizerPtr(GridSizer
):
9797 def __init__(self
, this
):
9799 if not hasattr(self
,"thisown"): self
.thisown
= 0
9800 self
.__class
__ = GridSizer
9801 _core_
.GridSizer_swigregister(GridSizerPtr
)
9803 #---------------------------------------------------------------------------
9805 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
9806 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
9807 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
9808 class FlexGridSizer(GridSizer
):
9810 A flex grid sizer is a sizer which lays out its children in a
9811 two-dimensional table with all table cells in one row having the same
9812 height and all cells in one column having the same width, but all
9813 rows or all columns are not necessarily the same height or width as in
9816 wx.FlexGridSizer can also size items equally in one direction but
9817 unequally ("flexibly") in the other. If the sizer is only flexible
9818 in one direction (this can be changed using `SetFlexibleDirection`), it
9819 needs to be decided how the sizer should grow in the other ("non
9820 flexible") direction in order to fill the available space. The
9821 `SetNonFlexibleGrowMode` method serves this purpose.
9826 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9827 def __init__(self
, *args
, **kwargs
):
9829 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9831 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9832 number of columns and rows in the sizer - if either of the parameters
9833 is zero, it will be calculated to from the total number of children in
9834 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9835 define extra space between all children.
9837 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
9838 self
.this
= newobj
.this
9841 self
._setOORInfo
(self
)
9843 def AddGrowableRow(*args
, **kwargs
):
9845 AddGrowableRow(self, size_t idx, int proportion=0)
9847 Specifies that row *idx* (starting from zero) should be grown if there
9848 is extra space available to the sizer.
9850 The *proportion* parameter has the same meaning as the stretch factor
9851 for the box sizers except that if all proportions are 0, then all
9852 columns are resized equally (instead of not being resized at all).
9854 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
9856 def RemoveGrowableRow(*args
, **kwargs
):
9858 RemoveGrowableRow(self, size_t idx)
9860 Specifies that row *idx* is no longer growable.
9862 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
9864 def AddGrowableCol(*args
, **kwargs
):
9866 AddGrowableCol(self, size_t idx, int proportion=0)
9868 Specifies that column *idx* (starting from zero) should be grown if
9869 there is extra space available to the sizer.
9871 The *proportion* parameter has the same meaning as the stretch factor
9872 for the box sizers except that if all proportions are 0, then all
9873 columns are resized equally (instead of not being resized at all).
9875 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
9877 def RemoveGrowableCol(*args
, **kwargs
):
9879 RemoveGrowableCol(self, size_t idx)
9881 Specifies that column *idx* is no longer growable.
9883 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
9885 def SetFlexibleDirection(*args
, **kwargs
):
9887 SetFlexibleDirection(self, int direction)
9889 Specifies whether the sizer should flexibly resize its columns, rows,
9890 or both. Argument *direction* can be one of the following values. Any
9891 other value is ignored.
9893 ============== =======================================
9894 wx.VERTICAL Rows are flexibly sized.
9895 wx.HORIZONTAL Columns are flexibly sized.
9896 wx.BOTH Both rows and columns are flexibly sized
9897 (this is the default value).
9898 ============== =======================================
9900 Note that this method does not trigger relayout.
9903 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
9905 def GetFlexibleDirection(*args
, **kwargs
):
9907 GetFlexibleDirection(self) -> int
9909 Returns a value that specifies whether the sizer
9910 flexibly resizes its columns, rows, or both (default).
9912 :see: `SetFlexibleDirection`
9914 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
9916 def SetNonFlexibleGrowMode(*args
, **kwargs
):
9918 SetNonFlexibleGrowMode(self, int mode)
9920 Specifies how the sizer should grow in the non-flexible direction if
9921 there is one (so `SetFlexibleDirection` must have been called
9922 previously). Argument *mode* can be one of the following values:
9924 ========================== =================================================
9925 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
9926 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
9927 `AddGrowableCol` and `AddGrowableRow`. In this
9928 case equal sizing applies to minimum sizes of
9929 columns or rows (this is the default value).
9930 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
9931 the non flexible direction, whether they are
9932 growable or not in the flexbile direction.
9933 ========================== =================================================
9935 Note that this method does not trigger relayout.
9939 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
9941 def GetNonFlexibleGrowMode(*args
, **kwargs
):
9943 GetNonFlexibleGrowMode(self) -> int
9945 Returns the value that specifies how the sizer grows in the
9946 non-flexible direction if there is one.
9948 :see: `SetNonFlexibleGrowMode`
9950 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
9952 def GetRowHeights(*args
, **kwargs
):
9954 GetRowHeights(self) -> list
9956 Returns a list of integers representing the heights of each of the
9959 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
9961 def GetColWidths(*args
, **kwargs
):
9963 GetColWidths(self) -> list
9965 Returns a list of integers representing the widths of each of the
9966 columns in the sizer.
9968 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
9971 class FlexGridSizerPtr(FlexGridSizer
):
9972 def __init__(self
, this
):
9974 if not hasattr(self
,"thisown"): self
.thisown
= 0
9975 self
.__class
__ = FlexGridSizer
9976 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
9978 #---------------------------------------------------------------------------
9980 class GBPosition(object):
9982 This class represents the position of an item in a virtual grid of
9983 rows and columns managed by a `wx.GridBagSizer`. wxPython has
9984 typemaps that will automatically convert from a 2-element sequence of
9985 integers to a wx.GBPosition, so you can use the more pythonic
9986 representation of the position nearly transparently in Python code.
9989 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9990 def __init__(self
, *args
, **kwargs
):
9992 __init__(self, int row=0, int col=0) -> GBPosition
9994 This class represents the position of an item in a virtual grid of
9995 rows and columns managed by a `wx.GridBagSizer`. wxPython has
9996 typemaps that will automatically convert from a 2-element sequence of
9997 integers to a wx.GBPosition, so you can use the more pythonic
9998 representation of the position nearly transparently in Python code.
10000 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
10001 self
.this
= newobj
.this
10004 def GetRow(*args
, **kwargs
):
10005 """GetRow(self) -> int"""
10006 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
10008 def GetCol(*args
, **kwargs
):
10009 """GetCol(self) -> int"""
10010 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
10012 def SetRow(*args
, **kwargs
):
10013 """SetRow(self, int row)"""
10014 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
10016 def SetCol(*args
, **kwargs
):
10017 """SetCol(self, int col)"""
10018 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
10020 def __eq__(*args
, **kwargs
):
10021 """__eq__(self, GBPosition other) -> bool"""
10022 return _core_
.GBPosition___eq__(*args
, **kwargs
)
10024 def __ne__(*args
, **kwargs
):
10025 """__ne__(self, GBPosition other) -> bool"""
10026 return _core_
.GBPosition___ne__(*args
, **kwargs
)
10028 def Set(*args
, **kwargs
):
10029 """Set(self, int row=0, int col=0)"""
10030 return _core_
.GBPosition_Set(*args
, **kwargs
)
10032 def Get(*args
, **kwargs
):
10033 """Get(self) -> PyObject"""
10034 return _core_
.GBPosition_Get(*args
, **kwargs
)
10036 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10037 def __str__(self
): return str(self
.Get())
10038 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
10039 def __len__(self
): return len(self
.Get())
10040 def __getitem__(self
, index
): return self
.Get()[index
]
10041 def __setitem__(self
, index
, val
):
10042 if index
== 0: self
.SetRow(val
)
10043 elif index
== 1: self
.SetCol(val
)
10044 else: raise IndexError
10045 def __nonzero__(self
): return self
.Get() != (0,0)
10046 __safe_for_unpickling__
= True
10047 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
10049 row
= property(GetRow
, SetRow
)
10050 col
= property(GetCol
, SetCol
)
10053 class GBPositionPtr(GBPosition
):
10054 def __init__(self
, this
):
10056 if not hasattr(self
,"thisown"): self
.thisown
= 0
10057 self
.__class
__ = GBPosition
10058 _core_
.GBPosition_swigregister(GBPositionPtr
)
10060 class GBSpan(object):
10062 This class is used to hold the row and column spanning attributes of
10063 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10064 automatically convert from a 2-element sequence of integers to a
10065 wx.GBSpan, so you can use the more pythonic representation of the span
10066 nearly transparently in Python code.
10069 def __repr__(self
):
10070 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10071 def __init__(self
, *args
, **kwargs
):
10073 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10075 Construct a new wxGBSpan, optionally setting the rowspan and
10076 colspan. The default is (1,1). (Meaning that the item occupies one
10077 cell in each direction.
10079 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
10080 self
.this
= newobj
.this
10083 def GetRowspan(*args
, **kwargs
):
10084 """GetRowspan(self) -> int"""
10085 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
10087 def GetColspan(*args
, **kwargs
):
10088 """GetColspan(self) -> int"""
10089 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
10091 def SetRowspan(*args
, **kwargs
):
10092 """SetRowspan(self, int rowspan)"""
10093 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
10095 def SetColspan(*args
, **kwargs
):
10096 """SetColspan(self, int colspan)"""
10097 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
10099 def __eq__(*args
, **kwargs
):
10100 """__eq__(self, GBSpan other) -> bool"""
10101 return _core_
.GBSpan___eq__(*args
, **kwargs
)
10103 def __ne__(*args
, **kwargs
):
10104 """__ne__(self, GBSpan other) -> bool"""
10105 return _core_
.GBSpan___ne__(*args
, **kwargs
)
10107 def Set(*args
, **kwargs
):
10108 """Set(self, int rowspan=1, int colspan=1)"""
10109 return _core_
.GBSpan_Set(*args
, **kwargs
)
10111 def Get(*args
, **kwargs
):
10112 """Get(self) -> PyObject"""
10113 return _core_
.GBSpan_Get(*args
, **kwargs
)
10115 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10116 def __str__(self
): return str(self
.Get())
10117 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
10118 def __len__(self
): return len(self
.Get())
10119 def __getitem__(self
, index
): return self
.Get()[index
]
10120 def __setitem__(self
, index
, val
):
10121 if index
== 0: self
.SetRowspan(val
)
10122 elif index
== 1: self
.SetColspan(val
)
10123 else: raise IndexError
10124 def __nonzero__(self
): return self
.Get() != (0,0)
10125 __safe_for_unpickling__
= True
10126 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
10128 rowspan
= property(GetRowspan
, SetRowspan
)
10129 colspan
= property(GetColspan
, SetColspan
)
10132 class GBSpanPtr(GBSpan
):
10133 def __init__(self
, this
):
10135 if not hasattr(self
,"thisown"): self
.thisown
= 0
10136 self
.__class
__ = GBSpan
10137 _core_
.GBSpan_swigregister(GBSpanPtr
)
10139 class GBSizerItem(SizerItem
):
10141 The wx.GBSizerItem class is used to track the additional data about
10142 items in a `wx.GridBagSizer` such as the item's position in the grid
10143 and how many rows or columns it spans.
10146 def __repr__(self
):
10147 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10148 def __init__(self
, *args
, **kwargs
):
10150 __init__(self) -> GBSizerItem
10152 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10153 size will need to be set, as well as a position and span before this
10154 item can be used in a Sizer.
10156 You will probably never need to create a wx.GBSizerItem directly as they
10157 are created automatically when the sizer's Add method is called.
10159 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
10160 self
.this
= newobj
.this
10163 def GetPos(*args
, **kwargs
):
10165 GetPos(self) -> GBPosition
10167 Get the grid position of the item
10169 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
10171 def GetPosTuple(self
): return self
.GetPos().Get()
10172 def GetSpan(*args
, **kwargs
):
10174 GetSpan(self) -> GBSpan
10176 Get the row and column spanning of the item
10178 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
10180 def GetSpanTuple(self
): return self
.GetSpan().Get()
10181 def SetPos(*args
, **kwargs
):
10183 SetPos(self, GBPosition pos) -> bool
10185 If the item is already a member of a sizer then first ensure that
10186 there is no other item that would intersect with this one at the new
10187 position, then set the new position. Returns True if the change is
10188 successful and after the next Layout() the item will be moved.
10190 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
10192 def SetSpan(*args
, **kwargs
):
10194 SetSpan(self, GBSpan span) -> bool
10196 If the item is already a member of a sizer then first ensure that
10197 there is no other item that would intersect with this one with its new
10198 spanning size, then set the new spanning. Returns True if the change
10199 is successful and after the next Layout() the item will be resized.
10202 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
10204 def Intersects(*args
, **kwargs
):
10206 Intersects(self, GBSizerItem other) -> bool
10208 Returns True if this item and the other item instersect.
10210 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
10212 def IntersectsPos(*args
, **kwargs
):
10214 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10216 Returns True if the given pos/span would intersect with this item.
10218 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
10220 def GetEndPos(*args
, **kwargs
):
10222 GetEndPos(self) -> GBPosition
10224 Get the row and column of the endpoint of this item.
10226 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
10228 def GetGBSizer(*args
, **kwargs
):
10230 GetGBSizer(self) -> GridBagSizer
10232 Get the sizer this item is a member of.
10234 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
10236 def SetGBSizer(*args
, **kwargs
):
10238 SetGBSizer(self, GridBagSizer sizer)
10240 Set the sizer this item is a member of.
10242 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
10245 class GBSizerItemPtr(GBSizerItem
):
10246 def __init__(self
, this
):
10248 if not hasattr(self
,"thisown"): self
.thisown
= 0
10249 self
.__class
__ = GBSizerItem
10250 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
10251 DefaultSpan
= cvar
.DefaultSpan
10253 def GBSizerItemWindow(*args
, **kwargs
):
10255 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10256 int border, PyObject userData=None) -> GBSizerItem
10258 Construct a `wx.GBSizerItem` for a window.
10260 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
10264 def GBSizerItemSizer(*args
, **kwargs
):
10266 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10267 int border, PyObject userData=None) -> GBSizerItem
10269 Construct a `wx.GBSizerItem` for a sizer
10271 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
10275 def GBSizerItemSpacer(*args
, **kwargs
):
10277 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10278 int flag, int border, PyObject userData=None) -> GBSizerItem
10280 Construct a `wx.GBSizerItem` for a spacer.
10282 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
10286 class GridBagSizer(FlexGridSizer
):
10288 A `wx.Sizer` that can lay out items in a virtual grid like a
10289 `wx.FlexGridSizer` but in this case explicit positioning of the items
10290 is allowed using `wx.GBPosition`, and items can optionally span more
10291 than one row and/or column using `wx.GBSpan`. The total size of the
10292 virtual grid is determined by the largest row and column that items are
10293 positioned at, adjusted for spanning.
10296 def __repr__(self
):
10297 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10298 def __init__(self
, *args
, **kwargs
):
10300 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10302 Constructor, with optional parameters to specify the gap between the
10305 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
10306 self
.this
= newobj
.this
10309 def Add(*args
, **kwargs
):
10311 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10312 int border=0, userData=None)
10314 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10315 more than one row or column as specified with *span*. The remaining
10316 args behave similarly to `wx.Sizer.Add`.
10318 Returns True if the item was successfully placed at the given cell
10319 position, False if something was already there.
10322 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
10324 def AddItem(*args
, **kwargs
):
10326 Add(self, GBSizerItem item) -> bool
10328 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10329 the item was successfully placed at its given cell position, False if
10330 something was already there.
10332 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
10334 def GetCellSize(*args
, **kwargs
):
10336 GetCellSize(self, int row, int col) -> Size
10338 Get the size of the specified cell, including hgap and
10339 vgap. Only valid after a Layout.
10341 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
10343 def GetEmptyCellSize(*args
, **kwargs
):
10345 GetEmptyCellSize(self) -> Size
10347 Get the size used for cells in the grid with no item.
10349 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
10351 def SetEmptyCellSize(*args
, **kwargs
):
10353 SetEmptyCellSize(self, Size sz)
10355 Set the size used for cells in the grid with no item.
10357 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
10359 def GetItemPosition(*args
):
10361 GetItemPosition(self, item) -> GBPosition
10363 Get the grid position of the specified *item* where *item* is either a
10364 window or subsizer that is a member of this sizer, or a zero-based
10367 return _core_
.GridBagSizer_GetItemPosition(*args
)
10369 def SetItemPosition(*args
):
10371 SetItemPosition(self, item, GBPosition pos) -> bool
10373 Set the grid position of the specified *item* where *item* is either a
10374 window or subsizer that is a member of this sizer, or a zero-based
10375 index of an item. Returns True on success. If the move is not
10376 allowed (because an item is already there) then False is returned.
10379 return _core_
.GridBagSizer_SetItemPosition(*args
)
10381 def GetItemSpan(*args
):
10383 GetItemSpan(self, item) -> GBSpan
10385 Get the row/col spanning of the specified *item* where *item* is
10386 either a window or subsizer that is a member of this sizer, or a
10387 zero-based index of an item.
10389 return _core_
.GridBagSizer_GetItemSpan(*args
)
10391 def SetItemSpan(*args
):
10393 SetItemSpan(self, item, GBSpan span) -> bool
10395 Set the row/col spanning of the specified *item* where *item* is
10396 either a window or subsizer that is a member of this sizer, or a
10397 zero-based index of an item. Returns True on success. If the move is
10398 not allowed (because an item is already there) then False is returned.
10400 return _core_
.GridBagSizer_SetItemSpan(*args
)
10402 def FindItem(*args
):
10404 FindItem(self, item) -> GBSizerItem
10406 Find the sizer item for the given window or subsizer, returns None if
10407 not found. (non-recursive)
10409 return _core_
.GridBagSizer_FindItem(*args
)
10411 def FindItemAtPosition(*args
, **kwargs
):
10413 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10415 Return the sizer item for the given grid cell, or None if there is no
10416 item at that position. (non-recursive)
10418 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
10420 def FindItemAtPoint(*args
, **kwargs
):
10422 FindItemAtPoint(self, Point pt) -> GBSizerItem
10424 Return the sizer item located at the point given in *pt*, or None if
10425 there is no item at that point. The (x,y) coordinates in pt correspond
10426 to the client coordinates of the window using the sizer for
10427 layout. (non-recursive)
10429 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
10431 def CheckForIntersection(*args
, **kwargs
):
10433 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10435 Look at all items and see if any intersect (or would overlap) the
10436 given *item*. Returns True if so, False if there would be no overlap.
10437 If an *excludeItem* is given then it will not be checked for
10438 intersection, for example it may be the item we are checking the
10442 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
10444 def CheckForIntersectionPos(*args
, **kwargs
):
10446 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10448 Look at all items and see if any intersect (or would overlap) the
10449 given position and span. Returns True if so, False if there would be
10450 no overlap. If an *excludeItem* is given then it will not be checked
10451 for intersection, for example it may be the item we are checking the
10454 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
10457 class GridBagSizerPtr(GridBagSizer
):
10458 def __init__(self
, this
):
10460 if not hasattr(self
,"thisown"): self
.thisown
= 0
10461 self
.__class
__ = GridBagSizer
10462 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
10464 #---------------------------------------------------------------------------
10468 Right
= _core_
.Right
10469 Bottom
= _core_
.Bottom
10470 Width
= _core_
.Width
10471 Height
= _core_
.Height
10472 Centre
= _core_
.Centre
10473 Center
= _core_
.Center
10474 CentreX
= _core_
.CentreX
10475 CentreY
= _core_
.CentreY
10476 Unconstrained
= _core_
.Unconstrained
10478 PercentOf
= _core_
.PercentOf
10479 Above
= _core_
.Above
10480 Below
= _core_
.Below
10481 LeftOf
= _core_
.LeftOf
10482 RightOf
= _core_
.RightOf
10483 SameAs
= _core_
.SameAs
10484 Absolute
= _core_
.Absolute
10485 class IndividualLayoutConstraint(Object
):
10487 Objects of this class are stored in the `wx.LayoutConstraints` class as
10488 one of eight possible constraints that a window can be involved in.
10489 You will never need to create an instance of
10490 wx.IndividualLayoutConstraint, rather you should create a
10491 `wx.LayoutConstraints` instance and use the individual contstraints
10494 def __init__(self
): raise RuntimeError, "No constructor defined"
10495 def __repr__(self
):
10496 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10497 def Set(*args
, **kwargs
):
10499 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10501 Sets the properties of the constraint. Normally called by one of the
10502 convenience functions such as Above, RightOf, SameAs.
10504 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
10506 def LeftOf(*args
, **kwargs
):
10508 LeftOf(self, Window sibling, int marg=0)
10510 Constrains this edge to be to the left of the given window, with an
10511 optional margin. Implicitly, this is relative to the left edge of the
10514 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
10516 def RightOf(*args
, **kwargs
):
10518 RightOf(self, Window sibling, int marg=0)
10520 Constrains this edge to be to the right of the given window, with an
10521 optional margin. Implicitly, this is relative to the right edge of the
10524 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
10526 def Above(*args
, **kwargs
):
10528 Above(self, Window sibling, int marg=0)
10530 Constrains this edge to be above the given window, with an optional
10531 margin. Implicitly, this is relative to the top edge of the other
10534 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
10536 def Below(*args
, **kwargs
):
10538 Below(self, Window sibling, int marg=0)
10540 Constrains this edge to be below the given window, with an optional
10541 margin. Implicitly, this is relative to the bottom edge of the other
10544 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
10546 def SameAs(*args
, **kwargs
):
10548 SameAs(self, Window otherW, int edge, int marg=0)
10550 Constrains this edge or dimension to be to the same as the edge of the
10551 given window, with an optional margin.
10553 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
10555 def PercentOf(*args
, **kwargs
):
10557 PercentOf(self, Window otherW, int wh, int per)
10559 Constrains this edge or dimension to be to a percentage of the given
10560 window, with an optional margin.
10562 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
10564 def Absolute(*args
, **kwargs
):
10566 Absolute(self, int val)
10568 Constrains this edge or dimension to be the given absolute value.
10570 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
10572 def Unconstrained(*args
, **kwargs
):
10574 Unconstrained(self)
10576 Sets this edge or dimension to be unconstrained, that is, dependent on
10577 other edges and dimensions from which this value can be deduced.
10579 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
10581 def AsIs(*args
, **kwargs
):
10585 Sets this edge or constraint to be whatever the window's value is at
10586 the moment. If either of the width and height constraints are *as is*,
10587 the window will not be resized, but moved instead. This is important
10588 when considering panel items which are intended to have a default
10589 size, such as a button, which may take its size from the size of the
10592 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
10594 def GetOtherWindow(*args
, **kwargs
):
10595 """GetOtherWindow(self) -> Window"""
10596 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
10598 def GetMyEdge(*args
, **kwargs
):
10599 """GetMyEdge(self) -> int"""
10600 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
10602 def SetEdge(*args
, **kwargs
):
10603 """SetEdge(self, int which)"""
10604 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
10606 def SetValue(*args
, **kwargs
):
10607 """SetValue(self, int v)"""
10608 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
10610 def GetMargin(*args
, **kwargs
):
10611 """GetMargin(self) -> int"""
10612 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
10614 def SetMargin(*args
, **kwargs
):
10615 """SetMargin(self, int m)"""
10616 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
10618 def GetValue(*args
, **kwargs
):
10619 """GetValue(self) -> int"""
10620 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
10622 def GetPercent(*args
, **kwargs
):
10623 """GetPercent(self) -> int"""
10624 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
10626 def GetOtherEdge(*args
, **kwargs
):
10627 """GetOtherEdge(self) -> int"""
10628 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
10630 def GetDone(*args
, **kwargs
):
10631 """GetDone(self) -> bool"""
10632 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
10634 def SetDone(*args
, **kwargs
):
10635 """SetDone(self, bool d)"""
10636 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
10638 def GetRelationship(*args
, **kwargs
):
10639 """GetRelationship(self) -> int"""
10640 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
10642 def SetRelationship(*args
, **kwargs
):
10643 """SetRelationship(self, int r)"""
10644 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
10646 def ResetIfWin(*args
, **kwargs
):
10648 ResetIfWin(self, Window otherW) -> bool
10650 Reset constraint if it mentions otherWin
10652 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
10654 def SatisfyConstraint(*args
, **kwargs
):
10656 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10658 Try to satisfy constraint
10660 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
10662 def GetEdge(*args
, **kwargs
):
10664 GetEdge(self, int which, Window thisWin, Window other) -> int
10666 Get the value of this edge or dimension, or if this
10667 is not determinable, -1.
10669 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
10672 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
10673 def __init__(self
, this
):
10675 if not hasattr(self
,"thisown"): self
.thisown
= 0
10676 self
.__class
__ = IndividualLayoutConstraint
10677 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
10679 class LayoutConstraints(Object
):
10681 **Note:** constraints are now deprecated and you should use sizers
10684 Objects of this class can be associated with a window to define its
10685 layout constraints, with respect to siblings or its parent.
10687 The class consists of the following eight constraints of class
10688 wx.IndividualLayoutConstraint, some or all of which should be accessed
10689 directly to set the appropriate constraints.
10691 * left: represents the left hand edge of the window
10692 * right: represents the right hand edge of the window
10693 * top: represents the top edge of the window
10694 * bottom: represents the bottom edge of the window
10695 * width: represents the width of the window
10696 * height: represents the height of the window
10697 * centreX: represents the horizontal centre point of the window
10698 * centreY: represents the vertical centre point of the window
10700 Most constraints are initially set to have the relationship
10701 wxUnconstrained, which means that their values should be calculated by
10702 looking at known constraints. The exceptions are width and height,
10703 which are set to wxAsIs to ensure that if the user does not specify a
10704 constraint, the existing width and height will be used, to be
10705 compatible with panel items which often have take a default size. If
10706 the constraint is ``wx.AsIs``, the dimension will not be changed.
10708 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
10711 def __repr__(self
):
10712 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10713 left
= property(_core_
.LayoutConstraints_left_get
)
10714 top
= property(_core_
.LayoutConstraints_top_get
)
10715 right
= property(_core_
.LayoutConstraints_right_get
)
10716 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
10717 width
= property(_core_
.LayoutConstraints_width_get
)
10718 height
= property(_core_
.LayoutConstraints_height_get
)
10719 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
10720 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
10721 def __init__(self
, *args
, **kwargs
):
10722 """__init__(self) -> LayoutConstraints"""
10723 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
10724 self
.this
= newobj
.this
10727 def SatisfyConstraints(*args
, **kwargs
):
10728 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
10729 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
10731 def AreSatisfied(*args
, **kwargs
):
10732 """AreSatisfied(self) -> bool"""
10733 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
10736 class LayoutConstraintsPtr(LayoutConstraints
):
10737 def __init__(self
, this
):
10739 if not hasattr(self
,"thisown"): self
.thisown
= 0
10740 self
.__class
__ = LayoutConstraints
10741 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
10743 #----------------------------------------------------------------------------
10745 # Use Python's bool constants if available, make some if not
10749 __builtins__
.True = 1==1
10750 __builtins__
.False = 1==0
10751 def bool(value
): return not not value
10752 __builtins__
.bool = bool
10756 # workarounds for bad wxRTTI names
10757 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
10758 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
10759 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
10762 #----------------------------------------------------------------------------
10763 # Load version numbers from __version__... Ensure that major and minor
10764 # versions are the same for both wxPython and wxWidgets.
10766 from __version__
import *
10767 __version__
= VERSION_STRING
10769 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
10770 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
10771 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
10773 warnings
.warn("wxPython/wxWidgets release number mismatch")
10775 #----------------------------------------------------------------------------
10777 class PyDeadObjectError(AttributeError):
10780 class _wxPyDeadObject(object):
10782 Instances of wx objects that are OOR capable will have their __class__
10783 changed to this class when the C++ object is deleted. This should help
10784 prevent crashes due to referencing a bogus C++ pointer.
10786 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
10787 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
10789 def __repr__(self
):
10790 if not hasattr(self
, "_name"):
10791 self
._name
= "[unknown]"
10792 return self
.reprStr
% self
._name
10794 def __getattr__(self
, *args
):
10795 if not hasattr(self
, "_name"):
10796 self
._name
= "[unknown]"
10797 raise PyDeadObjectError(self
.attrStr
% self
._name
)
10799 def __nonzero__(self
):
10804 class PyUnbornObjectError(AttributeError):
10807 class _wxPyUnbornObject(object):
10809 Some stock objects are created when the wx._core module is
10810 imported, but their C++ instance is not created until the wx.App
10811 object is created and initialized. These object instances will
10812 temporarily have their __class__ changed to this class so an
10813 exception will be raised if they are used before the C++ instance
10817 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
10818 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
10820 def __repr__(self
):
10821 #if not hasattr(self, "_name"):
10822 # self._name = "[unknown]"
10823 return self
.reprStr
#% self._name
10825 def __getattr__(self
, *args
):
10826 #if not hasattr(self, "_name"):
10827 # self._name = "[unknown]"
10828 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
10830 def __nonzero__(self
):
10834 #----------------------------------------------------------------------------
10835 _wxPyCallAfterId
= None
10837 def CallAfter(callable, *args
, **kw
):
10839 Call the specified function after the current and pending event
10840 handlers have been completed. This is also good for making GUI
10841 method calls from non-GUI threads. Any extra positional or
10842 keyword args are passed on to the callable when it is called.
10844 :see: `wx.FutureCall`
10847 assert app
is not None, 'No wx.App created yet'
10849 global _wxPyCallAfterId
10850 if _wxPyCallAfterId
is None:
10851 _wxPyCallAfterId
= wx
.NewEventType()
10852 app
.Connect(-1, -1, _wxPyCallAfterId
,
10853 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
10855 evt
.SetEventType(_wxPyCallAfterId
)
10856 evt
.callable = callable
10859 wx
.PostEvent(app
, evt
)
10862 #----------------------------------------------------------------------------
10867 A convenience class for wx.Timer, that calls the given callable
10868 object once after the given amount of milliseconds, passing any
10869 positional or keyword args. The return value of the callable is
10870 availbale after it has been run with the `GetResult` method.
10872 If you don't need to get the return value or restart the timer
10873 then there is no need to hold a reference to this object. It will
10874 hold a reference to itself while the timer is running (the timer
10875 has a reference to self.Notify) but the cycle will be broken when
10876 the timer completes, automatically cleaning up the wx.FutureCall
10879 :see: `wx.CallAfter`
10881 def __init__(self
, millis
, callable, *args
, **kwargs
):
10882 self
.millis
= millis
10883 self
.callable = callable
10884 self
.SetArgs(*args
, **kwargs
)
10886 self
.running
= False
10887 self
.hasRun
= False
10896 def Start(self
, millis
=None, *args
, **kwargs
):
10898 (Re)start the timer
10900 self
.hasRun
= False
10901 if millis
is not None:
10902 self
.millis
= millis
10904 self
.SetArgs(*args
, **kwargs
)
10906 self
.timer
= wx
.PyTimer(self
.Notify
)
10907 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
10908 self
.running
= True
10914 Stop and destroy the timer.
10916 if self
.timer
is not None:
10921 def GetInterval(self
):
10922 if self
.timer
is not None:
10923 return self
.timer
.GetInterval()
10928 def IsRunning(self
):
10929 return self
.timer
is not None and self
.timer
.IsRunning()
10932 def SetArgs(self
, *args
, **kwargs
):
10934 (Re)set the args passed to the callable object. This is
10935 useful in conjunction with Restart if you want to schedule a
10936 new call to the same callable object but with different
10940 self
.kwargs
= kwargs
10946 def GetResult(self
):
10951 The timer has expired so call the callable.
10953 if self
.callable and getattr(self
.callable, 'im_self', True):
10955 self
.running
= False
10956 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
10958 if not self
.running
:
10959 # if it wasn't restarted, then cleanup
10960 wx
.CallAfter(self
.Stop
)
10964 #----------------------------------------------------------------------------
10965 # Control which items in this module should be documented by epydoc.
10966 # We allow only classes and functions, which will help reduce the size
10967 # of the docs by filtering out the zillions of constants, EVT objects,
10968 # and etc that don't make much sense by themselves, but are instead
10969 # documented (or will be) as part of the classes/functions/methods
10970 # where they should be used.
10974 A filter for epydoc that only allows non-Ptr classes and
10975 fucntions, in order to reduce the clutter in the API docs.
10977 def __init__(self
, globals):
10978 self
._globals
= globals
10980 def __call__(self
, name
):
10982 obj
= self
._globals
.get(name
, None)
10983 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
10985 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
10989 #----------------------------------------------------------------------------
10990 #----------------------------------------------------------------------------
10992 # Import other modules in this package that should show up in the
10993 # "core" wx namespace
10995 from _windows
import *
10996 from _controls
import *
10997 from _misc
import *
11000 # Fixup the stock objects since they can't be used yet. (They will be
11001 # restored in wx.PyApp.OnInit.)
11002 _core_
._wxPyFixStockObjects
()
11004 #----------------------------------------------------------------------------
11005 #----------------------------------------------------------------------------