1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
6 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
8 if isinstance(value
, class_type
):
9 self
.__dict
__[name
] = value
.this
10 if hasattr(value
,"thisown"): self
.__dict
__["thisown"] = value
.thisown
13 method
= class_type
.__swig
_setmethods
__.get(name
,None)
14 if method
: return method(self
,value
)
15 if (not static
) or hasattr(self
,name
) or (name
== "thisown"):
16 self
.__dict
__[name
] = value
18 raise AttributeError("You cannot add attributes to %s" % self
)
20 def _swig_setattr(self
,class_type
,name
,value
):
21 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
23 def _swig_getattr(self
,class_type
,name
):
24 method
= class_type
.__swig
_getmethods
__.get(name
,None)
25 if method
: return method(self
)
26 raise AttributeError,name
30 _object
= types
.ObjectType
32 except AttributeError:
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self
,name
,value
):
40 if hasattr(self
,name
) or (name
in ("this", "thisown")):
43 raise AttributeError("You cannot add attributes to %s" % self
)
47 #// Give a reference to the dictionary of this module to the C++ extension
49 _core_
._wxPySetDictionary
(vars())
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
54 wx
= _sys
.modules
[__name__
]
57 #----------------------------------------------------------------------------
59 def _deprecated(callable, msg
=None):
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
65 msg
= "%s is deprecated" % callable
66 def deprecatedWrapper(*args
, **kwargs
):
68 warnings
.warn(msg
, DeprecationWarning, stacklevel
=2)
69 return callable(*args
, **kwargs
)
70 deprecatedWrapper
.__doc
__ = msg
71 return deprecatedWrapper
74 #----------------------------------------------------------------------------
76 NOT_FOUND
= _core_
.NOT_FOUND
77 VSCROLL
= _core_
.VSCROLL
78 HSCROLL
= _core_
.HSCROLL
79 CAPTION
= _core_
.CAPTION
80 DOUBLE_BORDER
= _core_
.DOUBLE_BORDER
81 SUNKEN_BORDER
= _core_
.SUNKEN_BORDER
82 RAISED_BORDER
= _core_
.RAISED_BORDER
83 BORDER
= _core_
.BORDER
84 SIMPLE_BORDER
= _core_
.SIMPLE_BORDER
85 STATIC_BORDER
= _core_
.STATIC_BORDER
86 TRANSPARENT_WINDOW
= _core_
.TRANSPARENT_WINDOW
87 NO_BORDER
= _core_
.NO_BORDER
88 TAB_TRAVERSAL
= _core_
.TAB_TRAVERSAL
89 WANTS_CHARS
= _core_
.WANTS_CHARS
90 POPUP_WINDOW
= _core_
.POPUP_WINDOW
91 CENTER_FRAME
= _core_
.CENTER_FRAME
92 CENTRE_ON_SCREEN
= _core_
.CENTRE_ON_SCREEN
93 CENTER_ON_SCREEN
= _core_
.CENTER_ON_SCREEN
94 CLIP_CHILDREN
= _core_
.CLIP_CHILDREN
95 CLIP_SIBLINGS
= _core_
.CLIP_SIBLINGS
96 ALWAYS_SHOW_SB
= _core_
.ALWAYS_SHOW_SB
97 RETAINED
= _core_
.RETAINED
98 BACKINGSTORE
= _core_
.BACKINGSTORE
99 COLOURED
= _core_
.COLOURED
100 FIXED_LENGTH
= _core_
.FIXED_LENGTH
101 LB_NEEDED_SB
= _core_
.LB_NEEDED_SB
102 LB_ALWAYS_SB
= _core_
.LB_ALWAYS_SB
103 LB_SORT
= _core_
.LB_SORT
104 LB_SINGLE
= _core_
.LB_SINGLE
105 LB_MULTIPLE
= _core_
.LB_MULTIPLE
106 LB_EXTENDED
= _core_
.LB_EXTENDED
107 LB_OWNERDRAW
= _core_
.LB_OWNERDRAW
108 LB_HSCROLL
= _core_
.LB_HSCROLL
109 PROCESS_ENTER
= _core_
.PROCESS_ENTER
110 PASSWORD
= _core_
.PASSWORD
111 CB_SIMPLE
= _core_
.CB_SIMPLE
112 CB_DROPDOWN
= _core_
.CB_DROPDOWN
113 CB_SORT
= _core_
.CB_SORT
114 CB_READONLY
= _core_
.CB_READONLY
115 RA_HORIZONTAL
= _core_
.RA_HORIZONTAL
116 RA_VERTICAL
= _core_
.RA_VERTICAL
117 RA_SPECIFY_ROWS
= _core_
.RA_SPECIFY_ROWS
118 RA_SPECIFY_COLS
= _core_
.RA_SPECIFY_COLS
119 RA_USE_CHECKBOX
= _core_
.RA_USE_CHECKBOX
120 RB_GROUP
= _core_
.RB_GROUP
121 RB_SINGLE
= _core_
.RB_SINGLE
122 SB_HORIZONTAL
= _core_
.SB_HORIZONTAL
123 SB_VERTICAL
= _core_
.SB_VERTICAL
124 RB_USE_CHECKBOX
= _core_
.RB_USE_CHECKBOX
125 ST_SIZEGRIP
= _core_
.ST_SIZEGRIP
126 ST_NO_AUTORESIZE
= _core_
.ST_NO_AUTORESIZE
127 FLOOD_SURFACE
= _core_
.FLOOD_SURFACE
128 FLOOD_BORDER
= _core_
.FLOOD_BORDER
129 ODDEVEN_RULE
= _core_
.ODDEVEN_RULE
130 WINDING_RULE
= _core_
.WINDING_RULE
131 TOOL_TOP
= _core_
.TOOL_TOP
132 TOOL_BOTTOM
= _core_
.TOOL_BOTTOM
133 TOOL_LEFT
= _core_
.TOOL_LEFT
134 TOOL_RIGHT
= _core_
.TOOL_RIGHT
136 YES_NO
= _core_
.YES_NO
137 CANCEL
= _core_
.CANCEL
140 NO_DEFAULT
= _core_
.NO_DEFAULT
141 YES_DEFAULT
= _core_
.YES_DEFAULT
142 ICON_EXCLAMATION
= _core_
.ICON_EXCLAMATION
143 ICON_HAND
= _core_
.ICON_HAND
144 ICON_QUESTION
= _core_
.ICON_QUESTION
145 ICON_INFORMATION
= _core_
.ICON_INFORMATION
146 ICON_STOP
= _core_
.ICON_STOP
147 ICON_ASTERISK
= _core_
.ICON_ASTERISK
148 ICON_MASK
= _core_
.ICON_MASK
149 ICON_WARNING
= _core_
.ICON_WARNING
150 ICON_ERROR
= _core_
.ICON_ERROR
151 FORWARD
= _core_
.FORWARD
152 BACKWARD
= _core_
.BACKWARD
157 SIZE_AUTO_WIDTH
= _core_
.SIZE_AUTO_WIDTH
158 SIZE_AUTO_HEIGHT
= _core_
.SIZE_AUTO_HEIGHT
159 SIZE_AUTO
= _core_
.SIZE_AUTO
160 SIZE_USE_EXISTING
= _core_
.SIZE_USE_EXISTING
161 SIZE_ALLOW_MINUS_ONE
= _core_
.SIZE_ALLOW_MINUS_ONE
162 PORTRAIT
= _core_
.PORTRAIT
163 LANDSCAPE
= _core_
.LANDSCAPE
164 PRINT_QUALITY_HIGH
= _core_
.PRINT_QUALITY_HIGH
165 PRINT_QUALITY_MEDIUM
= _core_
.PRINT_QUALITY_MEDIUM
166 PRINT_QUALITY_LOW
= _core_
.PRINT_QUALITY_LOW
167 PRINT_QUALITY_DRAFT
= _core_
.PRINT_QUALITY_DRAFT
168 ID_ANY
= _core_
.ID_ANY
169 ID_SEPARATOR
= _core_
.ID_SEPARATOR
170 ID_LOWEST
= _core_
.ID_LOWEST
171 ID_OPEN
= _core_
.ID_OPEN
172 ID_CLOSE
= _core_
.ID_CLOSE
173 ID_NEW
= _core_
.ID_NEW
174 ID_SAVE
= _core_
.ID_SAVE
175 ID_SAVEAS
= _core_
.ID_SAVEAS
176 ID_REVERT
= _core_
.ID_REVERT
177 ID_EXIT
= _core_
.ID_EXIT
178 ID_UNDO
= _core_
.ID_UNDO
179 ID_REDO
= _core_
.ID_REDO
180 ID_HELP
= _core_
.ID_HELP
181 ID_PRINT
= _core_
.ID_PRINT
182 ID_PRINT_SETUP
= _core_
.ID_PRINT_SETUP
183 ID_PREVIEW
= _core_
.ID_PREVIEW
184 ID_ABOUT
= _core_
.ID_ABOUT
185 ID_HELP_CONTENTS
= _core_
.ID_HELP_CONTENTS
186 ID_HELP_COMMANDS
= _core_
.ID_HELP_COMMANDS
187 ID_HELP_PROCEDURES
= _core_
.ID_HELP_PROCEDURES
188 ID_HELP_CONTEXT
= _core_
.ID_HELP_CONTEXT
189 ID_CLOSE_ALL
= _core_
.ID_CLOSE_ALL
190 ID_PREFERENCES
= _core_
.ID_PREFERENCES
191 ID_CUT
= _core_
.ID_CUT
192 ID_COPY
= _core_
.ID_COPY
193 ID_PASTE
= _core_
.ID_PASTE
194 ID_CLEAR
= _core_
.ID_CLEAR
195 ID_FIND
= _core_
.ID_FIND
196 ID_DUPLICATE
= _core_
.ID_DUPLICATE
197 ID_SELECTALL
= _core_
.ID_SELECTALL
198 ID_DELETE
= _core_
.ID_DELETE
199 ID_REPLACE
= _core_
.ID_REPLACE
200 ID_REPLACE_ALL
= _core_
.ID_REPLACE_ALL
201 ID_PROPERTIES
= _core_
.ID_PROPERTIES
202 ID_VIEW_DETAILS
= _core_
.ID_VIEW_DETAILS
203 ID_VIEW_LARGEICONS
= _core_
.ID_VIEW_LARGEICONS
204 ID_VIEW_SMALLICONS
= _core_
.ID_VIEW_SMALLICONS
205 ID_VIEW_LIST
= _core_
.ID_VIEW_LIST
206 ID_VIEW_SORTDATE
= _core_
.ID_VIEW_SORTDATE
207 ID_VIEW_SORTNAME
= _core_
.ID_VIEW_SORTNAME
208 ID_VIEW_SORTSIZE
= _core_
.ID_VIEW_SORTSIZE
209 ID_VIEW_SORTTYPE
= _core_
.ID_VIEW_SORTTYPE
210 ID_FILE1
= _core_
.ID_FILE1
211 ID_FILE2
= _core_
.ID_FILE2
212 ID_FILE3
= _core_
.ID_FILE3
213 ID_FILE4
= _core_
.ID_FILE4
214 ID_FILE5
= _core_
.ID_FILE5
215 ID_FILE6
= _core_
.ID_FILE6
216 ID_FILE7
= _core_
.ID_FILE7
217 ID_FILE8
= _core_
.ID_FILE8
218 ID_FILE9
= _core_
.ID_FILE9
220 ID_CANCEL
= _core_
.ID_CANCEL
221 ID_APPLY
= _core_
.ID_APPLY
222 ID_YES
= _core_
.ID_YES
224 ID_STATIC
= _core_
.ID_STATIC
225 ID_FORWARD
= _core_
.ID_FORWARD
226 ID_BACKWARD
= _core_
.ID_BACKWARD
227 ID_DEFAULT
= _core_
.ID_DEFAULT
228 ID_MORE
= _core_
.ID_MORE
229 ID_SETUP
= _core_
.ID_SETUP
230 ID_RESET
= _core_
.ID_RESET
231 ID_CONTEXT_HELP
= _core_
.ID_CONTEXT_HELP
232 ID_YESTOALL
= _core_
.ID_YESTOALL
233 ID_NOTOALL
= _core_
.ID_NOTOALL
234 ID_ABORT
= _core_
.ID_ABORT
235 ID_RETRY
= _core_
.ID_RETRY
236 ID_IGNORE
= _core_
.ID_IGNORE
237 ID_ADD
= _core_
.ID_ADD
238 ID_REMOVE
= _core_
.ID_REMOVE
240 ID_DOWN
= _core_
.ID_DOWN
241 ID_HOME
= _core_
.ID_HOME
242 ID_REFRESH
= _core_
.ID_REFRESH
243 ID_STOP
= _core_
.ID_STOP
244 ID_INDEX
= _core_
.ID_INDEX
245 ID_BOLD
= _core_
.ID_BOLD
246 ID_ITALIC
= _core_
.ID_ITALIC
247 ID_JUSTIFY_CENTER
= _core_
.ID_JUSTIFY_CENTER
248 ID_JUSTIFY_FILL
= _core_
.ID_JUSTIFY_FILL
249 ID_JUSTIFY_RIGHT
= _core_
.ID_JUSTIFY_RIGHT
250 ID_JUSTIFY_LEFT
= _core_
.ID_JUSTIFY_LEFT
251 ID_UNDERLINE
= _core_
.ID_UNDERLINE
252 ID_INDENT
= _core_
.ID_INDENT
253 ID_UNINDENT
= _core_
.ID_UNINDENT
254 ID_ZOOM_100
= _core_
.ID_ZOOM_100
255 ID_ZOOM_FIT
= _core_
.ID_ZOOM_FIT
256 ID_ZOOM_IN
= _core_
.ID_ZOOM_IN
257 ID_ZOOM_OUT
= _core_
.ID_ZOOM_OUT
258 ID_UNDELETE
= _core_
.ID_UNDELETE
259 ID_REVERT_TO_SAVED
= _core_
.ID_REVERT_TO_SAVED
260 ID_HIGHEST
= _core_
.ID_HIGHEST
263 HIDE_READONLY
= _core_
.HIDE_READONLY
264 OVERWRITE_PROMPT
= _core_
.OVERWRITE_PROMPT
265 FILE_MUST_EXIST
= _core_
.FILE_MUST_EXIST
266 MULTIPLE
= _core_
.MULTIPLE
267 CHANGE_DIR
= _core_
.CHANGE_DIR
268 ACCEL_ALT
= _core_
.ACCEL_ALT
269 ACCEL_CTRL
= _core_
.ACCEL_CTRL
270 ACCEL_SHIFT
= _core_
.ACCEL_SHIFT
271 ACCEL_NORMAL
= _core_
.ACCEL_NORMAL
272 PD_AUTO_HIDE
= _core_
.PD_AUTO_HIDE
273 PD_APP_MODAL
= _core_
.PD_APP_MODAL
274 PD_CAN_ABORT
= _core_
.PD_CAN_ABORT
275 PD_ELAPSED_TIME
= _core_
.PD_ELAPSED_TIME
276 PD_ESTIMATED_TIME
= _core_
.PD_ESTIMATED_TIME
277 PD_REMAINING_TIME
= _core_
.PD_REMAINING_TIME
278 PD_SMOOTH
= _core_
.PD_SMOOTH
279 PD_CAN_SKIP
= _core_
.PD_CAN_SKIP
280 DD_NEW_DIR_BUTTON
= _core_
.DD_NEW_DIR_BUTTON
281 DD_DEFAULT_STYLE
= _core_
.DD_DEFAULT_STYLE
282 MENU_TEAROFF
= _core_
.MENU_TEAROFF
283 MB_DOCKABLE
= _core_
.MB_DOCKABLE
284 NO_FULL_REPAINT_ON_RESIZE
= _core_
.NO_FULL_REPAINT_ON_RESIZE
285 FULL_REPAINT_ON_RESIZE
= _core_
.FULL_REPAINT_ON_RESIZE
286 LI_HORIZONTAL
= _core_
.LI_HORIZONTAL
287 LI_VERTICAL
= _core_
.LI_VERTICAL
288 WS_EX_VALIDATE_RECURSIVELY
= _core_
.WS_EX_VALIDATE_RECURSIVELY
289 WS_EX_BLOCK_EVENTS
= _core_
.WS_EX_BLOCK_EVENTS
290 WS_EX_TRANSIENT
= _core_
.WS_EX_TRANSIENT
291 WS_EX_THEMED_BACKGROUND
= _core_
.WS_EX_THEMED_BACKGROUND
292 WS_EX_PROCESS_IDLE
= _core_
.WS_EX_PROCESS_IDLE
293 WS_EX_PROCESS_UI_UPDATES
= _core_
.WS_EX_PROCESS_UI_UPDATES
294 MM_TEXT
= _core_
.MM_TEXT
295 MM_LOMETRIC
= _core_
.MM_LOMETRIC
296 MM_HIMETRIC
= _core_
.MM_HIMETRIC
297 MM_LOENGLISH
= _core_
.MM_LOENGLISH
298 MM_HIENGLISH
= _core_
.MM_HIENGLISH
299 MM_TWIPS
= _core_
.MM_TWIPS
300 MM_ISOTROPIC
= _core_
.MM_ISOTROPIC
301 MM_ANISOTROPIC
= _core_
.MM_ANISOTROPIC
302 MM_POINTS
= _core_
.MM_POINTS
303 MM_METRIC
= _core_
.MM_METRIC
304 CENTRE
= _core_
.CENTRE
305 CENTER
= _core_
.CENTER
306 HORIZONTAL
= _core_
.HORIZONTAL
307 VERTICAL
= _core_
.VERTICAL
314 BOTTOM
= _core_
.BOTTOM
320 ALIGN_NOT
= _core_
.ALIGN_NOT
321 ALIGN_CENTER_HORIZONTAL
= _core_
.ALIGN_CENTER_HORIZONTAL
322 ALIGN_CENTRE_HORIZONTAL
= _core_
.ALIGN_CENTRE_HORIZONTAL
323 ALIGN_LEFT
= _core_
.ALIGN_LEFT
324 ALIGN_TOP
= _core_
.ALIGN_TOP
325 ALIGN_RIGHT
= _core_
.ALIGN_RIGHT
326 ALIGN_BOTTOM
= _core_
.ALIGN_BOTTOM
327 ALIGN_CENTER_VERTICAL
= _core_
.ALIGN_CENTER_VERTICAL
328 ALIGN_CENTRE_VERTICAL
= _core_
.ALIGN_CENTRE_VERTICAL
329 ALIGN_CENTER
= _core_
.ALIGN_CENTER
330 ALIGN_CENTRE
= _core_
.ALIGN_CENTRE
331 ALIGN_MASK
= _core_
.ALIGN_MASK
332 STRETCH_NOT
= _core_
.STRETCH_NOT
333 SHRINK
= _core_
.SHRINK
335 EXPAND
= _core_
.EXPAND
336 SHAPED
= _core_
.SHAPED
337 FIXED_MINSIZE
= _core_
.FIXED_MINSIZE
339 ADJUST_MINSIZE
= _core_
.ADJUST_MINSIZE
340 BORDER_DEFAULT
= _core_
.BORDER_DEFAULT
341 BORDER_NONE
= _core_
.BORDER_NONE
342 BORDER_STATIC
= _core_
.BORDER_STATIC
343 BORDER_SIMPLE
= _core_
.BORDER_SIMPLE
344 BORDER_RAISED
= _core_
.BORDER_RAISED
345 BORDER_SUNKEN
= _core_
.BORDER_SUNKEN
346 BORDER_DOUBLE
= _core_
.BORDER_DOUBLE
347 BORDER_MASK
= _core_
.BORDER_MASK
348 BG_STYLE_SYSTEM
= _core_
.BG_STYLE_SYSTEM
349 BG_STYLE_COLOUR
= _core_
.BG_STYLE_COLOUR
350 BG_STYLE_CUSTOM
= _core_
.BG_STYLE_CUSTOM
351 DEFAULT
= _core_
.DEFAULT
352 DECORATIVE
= _core_
.DECORATIVE
354 SCRIPT
= _core_
.SCRIPT
356 MODERN
= _core_
.MODERN
357 TELETYPE
= _core_
.TELETYPE
358 VARIABLE
= _core_
.VARIABLE
360 NORMAL
= _core_
.NORMAL
363 ITALIC
= _core_
.ITALIC
367 LONG_DASH
= _core_
.LONG_DASH
368 SHORT_DASH
= _core_
.SHORT_DASH
369 DOT_DASH
= _core_
.DOT_DASH
370 USER_DASH
= _core_
.USER_DASH
371 TRANSPARENT
= _core_
.TRANSPARENT
372 STIPPLE
= _core_
.STIPPLE
373 BDIAGONAL_HATCH
= _core_
.BDIAGONAL_HATCH
374 CROSSDIAG_HATCH
= _core_
.CROSSDIAG_HATCH
375 FDIAGONAL_HATCH
= _core_
.FDIAGONAL_HATCH
376 CROSS_HATCH
= _core_
.CROSS_HATCH
377 HORIZONTAL_HATCH
= _core_
.HORIZONTAL_HATCH
378 VERTICAL_HATCH
= _core_
.VERTICAL_HATCH
379 JOIN_BEVEL
= _core_
.JOIN_BEVEL
380 JOIN_MITER
= _core_
.JOIN_MITER
381 JOIN_ROUND
= _core_
.JOIN_ROUND
382 CAP_ROUND
= _core_
.CAP_ROUND
383 CAP_PROJECTING
= _core_
.CAP_PROJECTING
384 CAP_BUTT
= _core_
.CAP_BUTT
387 INVERT
= _core_
.INVERT
388 OR_REVERSE
= _core_
.OR_REVERSE
389 AND_REVERSE
= _core_
.AND_REVERSE
392 AND_INVERT
= _core_
.AND_INVERT
396 SRC_INVERT
= _core_
.SRC_INVERT
397 OR_INVERT
= _core_
.OR_INVERT
401 WXK_BACK
= _core_
.WXK_BACK
402 WXK_TAB
= _core_
.WXK_TAB
403 WXK_RETURN
= _core_
.WXK_RETURN
404 WXK_ESCAPE
= _core_
.WXK_ESCAPE
405 WXK_SPACE
= _core_
.WXK_SPACE
406 WXK_DELETE
= _core_
.WXK_DELETE
407 WXK_START
= _core_
.WXK_START
408 WXK_LBUTTON
= _core_
.WXK_LBUTTON
409 WXK_RBUTTON
= _core_
.WXK_RBUTTON
410 WXK_CANCEL
= _core_
.WXK_CANCEL
411 WXK_MBUTTON
= _core_
.WXK_MBUTTON
412 WXK_CLEAR
= _core_
.WXK_CLEAR
413 WXK_SHIFT
= _core_
.WXK_SHIFT
414 WXK_ALT
= _core_
.WXK_ALT
415 WXK_CONTROL
= _core_
.WXK_CONTROL
416 WXK_MENU
= _core_
.WXK_MENU
417 WXK_PAUSE
= _core_
.WXK_PAUSE
418 WXK_CAPITAL
= _core_
.WXK_CAPITAL
419 WXK_PRIOR
= _core_
.WXK_PRIOR
420 WXK_NEXT
= _core_
.WXK_NEXT
421 WXK_END
= _core_
.WXK_END
422 WXK_HOME
= _core_
.WXK_HOME
423 WXK_LEFT
= _core_
.WXK_LEFT
424 WXK_UP
= _core_
.WXK_UP
425 WXK_RIGHT
= _core_
.WXK_RIGHT
426 WXK_DOWN
= _core_
.WXK_DOWN
427 WXK_SELECT
= _core_
.WXK_SELECT
428 WXK_PRINT
= _core_
.WXK_PRINT
429 WXK_EXECUTE
= _core_
.WXK_EXECUTE
430 WXK_SNAPSHOT
= _core_
.WXK_SNAPSHOT
431 WXK_INSERT
= _core_
.WXK_INSERT
432 WXK_HELP
= _core_
.WXK_HELP
433 WXK_NUMPAD0
= _core_
.WXK_NUMPAD0
434 WXK_NUMPAD1
= _core_
.WXK_NUMPAD1
435 WXK_NUMPAD2
= _core_
.WXK_NUMPAD2
436 WXK_NUMPAD3
= _core_
.WXK_NUMPAD3
437 WXK_NUMPAD4
= _core_
.WXK_NUMPAD4
438 WXK_NUMPAD5
= _core_
.WXK_NUMPAD5
439 WXK_NUMPAD6
= _core_
.WXK_NUMPAD6
440 WXK_NUMPAD7
= _core_
.WXK_NUMPAD7
441 WXK_NUMPAD8
= _core_
.WXK_NUMPAD8
442 WXK_NUMPAD9
= _core_
.WXK_NUMPAD9
443 WXK_MULTIPLY
= _core_
.WXK_MULTIPLY
444 WXK_ADD
= _core_
.WXK_ADD
445 WXK_SEPARATOR
= _core_
.WXK_SEPARATOR
446 WXK_SUBTRACT
= _core_
.WXK_SUBTRACT
447 WXK_DECIMAL
= _core_
.WXK_DECIMAL
448 WXK_DIVIDE
= _core_
.WXK_DIVIDE
449 WXK_F1
= _core_
.WXK_F1
450 WXK_F2
= _core_
.WXK_F2
451 WXK_F3
= _core_
.WXK_F3
452 WXK_F4
= _core_
.WXK_F4
453 WXK_F5
= _core_
.WXK_F5
454 WXK_F6
= _core_
.WXK_F6
455 WXK_F7
= _core_
.WXK_F7
456 WXK_F8
= _core_
.WXK_F8
457 WXK_F9
= _core_
.WXK_F9
458 WXK_F10
= _core_
.WXK_F10
459 WXK_F11
= _core_
.WXK_F11
460 WXK_F12
= _core_
.WXK_F12
461 WXK_F13
= _core_
.WXK_F13
462 WXK_F14
= _core_
.WXK_F14
463 WXK_F15
= _core_
.WXK_F15
464 WXK_F16
= _core_
.WXK_F16
465 WXK_F17
= _core_
.WXK_F17
466 WXK_F18
= _core_
.WXK_F18
467 WXK_F19
= _core_
.WXK_F19
468 WXK_F20
= _core_
.WXK_F20
469 WXK_F21
= _core_
.WXK_F21
470 WXK_F22
= _core_
.WXK_F22
471 WXK_F23
= _core_
.WXK_F23
472 WXK_F24
= _core_
.WXK_F24
473 WXK_NUMLOCK
= _core_
.WXK_NUMLOCK
474 WXK_SCROLL
= _core_
.WXK_SCROLL
475 WXK_PAGEUP
= _core_
.WXK_PAGEUP
476 WXK_PAGEDOWN
= _core_
.WXK_PAGEDOWN
477 WXK_NUMPAD_SPACE
= _core_
.WXK_NUMPAD_SPACE
478 WXK_NUMPAD_TAB
= _core_
.WXK_NUMPAD_TAB
479 WXK_NUMPAD_ENTER
= _core_
.WXK_NUMPAD_ENTER
480 WXK_NUMPAD_F1
= _core_
.WXK_NUMPAD_F1
481 WXK_NUMPAD_F2
= _core_
.WXK_NUMPAD_F2
482 WXK_NUMPAD_F3
= _core_
.WXK_NUMPAD_F3
483 WXK_NUMPAD_F4
= _core_
.WXK_NUMPAD_F4
484 WXK_NUMPAD_HOME
= _core_
.WXK_NUMPAD_HOME
485 WXK_NUMPAD_LEFT
= _core_
.WXK_NUMPAD_LEFT
486 WXK_NUMPAD_UP
= _core_
.WXK_NUMPAD_UP
487 WXK_NUMPAD_RIGHT
= _core_
.WXK_NUMPAD_RIGHT
488 WXK_NUMPAD_DOWN
= _core_
.WXK_NUMPAD_DOWN
489 WXK_NUMPAD_PRIOR
= _core_
.WXK_NUMPAD_PRIOR
490 WXK_NUMPAD_PAGEUP
= _core_
.WXK_NUMPAD_PAGEUP
491 WXK_NUMPAD_NEXT
= _core_
.WXK_NUMPAD_NEXT
492 WXK_NUMPAD_PAGEDOWN
= _core_
.WXK_NUMPAD_PAGEDOWN
493 WXK_NUMPAD_END
= _core_
.WXK_NUMPAD_END
494 WXK_NUMPAD_BEGIN
= _core_
.WXK_NUMPAD_BEGIN
495 WXK_NUMPAD_INSERT
= _core_
.WXK_NUMPAD_INSERT
496 WXK_NUMPAD_DELETE
= _core_
.WXK_NUMPAD_DELETE
497 WXK_NUMPAD_EQUAL
= _core_
.WXK_NUMPAD_EQUAL
498 WXK_NUMPAD_MULTIPLY
= _core_
.WXK_NUMPAD_MULTIPLY
499 WXK_NUMPAD_ADD
= _core_
.WXK_NUMPAD_ADD
500 WXK_NUMPAD_SEPARATOR
= _core_
.WXK_NUMPAD_SEPARATOR
501 WXK_NUMPAD_SUBTRACT
= _core_
.WXK_NUMPAD_SUBTRACT
502 WXK_NUMPAD_DECIMAL
= _core_
.WXK_NUMPAD_DECIMAL
503 WXK_NUMPAD_DIVIDE
= _core_
.WXK_NUMPAD_DIVIDE
504 WXK_WINDOWS_LEFT
= _core_
.WXK_WINDOWS_LEFT
505 WXK_WINDOWS_RIGHT
= _core_
.WXK_WINDOWS_RIGHT
506 WXK_WINDOWS_MENU
= _core_
.WXK_WINDOWS_MENU
507 PAPER_NONE
= _core_
.PAPER_NONE
508 PAPER_LETTER
= _core_
.PAPER_LETTER
509 PAPER_LEGAL
= _core_
.PAPER_LEGAL
510 PAPER_A4
= _core_
.PAPER_A4
511 PAPER_CSHEET
= _core_
.PAPER_CSHEET
512 PAPER_DSHEET
= _core_
.PAPER_DSHEET
513 PAPER_ESHEET
= _core_
.PAPER_ESHEET
514 PAPER_LETTERSMALL
= _core_
.PAPER_LETTERSMALL
515 PAPER_TABLOID
= _core_
.PAPER_TABLOID
516 PAPER_LEDGER
= _core_
.PAPER_LEDGER
517 PAPER_STATEMENT
= _core_
.PAPER_STATEMENT
518 PAPER_EXECUTIVE
= _core_
.PAPER_EXECUTIVE
519 PAPER_A3
= _core_
.PAPER_A3
520 PAPER_A4SMALL
= _core_
.PAPER_A4SMALL
521 PAPER_A5
= _core_
.PAPER_A5
522 PAPER_B4
= _core_
.PAPER_B4
523 PAPER_B5
= _core_
.PAPER_B5
524 PAPER_FOLIO
= _core_
.PAPER_FOLIO
525 PAPER_QUARTO
= _core_
.PAPER_QUARTO
526 PAPER_10X14
= _core_
.PAPER_10X14
527 PAPER_11X17
= _core_
.PAPER_11X17
528 PAPER_NOTE
= _core_
.PAPER_NOTE
529 PAPER_ENV_9
= _core_
.PAPER_ENV_9
530 PAPER_ENV_10
= _core_
.PAPER_ENV_10
531 PAPER_ENV_11
= _core_
.PAPER_ENV_11
532 PAPER_ENV_12
= _core_
.PAPER_ENV_12
533 PAPER_ENV_14
= _core_
.PAPER_ENV_14
534 PAPER_ENV_DL
= _core_
.PAPER_ENV_DL
535 PAPER_ENV_C5
= _core_
.PAPER_ENV_C5
536 PAPER_ENV_C3
= _core_
.PAPER_ENV_C3
537 PAPER_ENV_C4
= _core_
.PAPER_ENV_C4
538 PAPER_ENV_C6
= _core_
.PAPER_ENV_C6
539 PAPER_ENV_C65
= _core_
.PAPER_ENV_C65
540 PAPER_ENV_B4
= _core_
.PAPER_ENV_B4
541 PAPER_ENV_B5
= _core_
.PAPER_ENV_B5
542 PAPER_ENV_B6
= _core_
.PAPER_ENV_B6
543 PAPER_ENV_ITALY
= _core_
.PAPER_ENV_ITALY
544 PAPER_ENV_MONARCH
= _core_
.PAPER_ENV_MONARCH
545 PAPER_ENV_PERSONAL
= _core_
.PAPER_ENV_PERSONAL
546 PAPER_FANFOLD_US
= _core_
.PAPER_FANFOLD_US
547 PAPER_FANFOLD_STD_GERMAN
= _core_
.PAPER_FANFOLD_STD_GERMAN
548 PAPER_FANFOLD_LGL_GERMAN
= _core_
.PAPER_FANFOLD_LGL_GERMAN
549 PAPER_ISO_B4
= _core_
.PAPER_ISO_B4
550 PAPER_JAPANESE_POSTCARD
= _core_
.PAPER_JAPANESE_POSTCARD
551 PAPER_9X11
= _core_
.PAPER_9X11
552 PAPER_10X11
= _core_
.PAPER_10X11
553 PAPER_15X11
= _core_
.PAPER_15X11
554 PAPER_ENV_INVITE
= _core_
.PAPER_ENV_INVITE
555 PAPER_LETTER_EXTRA
= _core_
.PAPER_LETTER_EXTRA
556 PAPER_LEGAL_EXTRA
= _core_
.PAPER_LEGAL_EXTRA
557 PAPER_TABLOID_EXTRA
= _core_
.PAPER_TABLOID_EXTRA
558 PAPER_A4_EXTRA
= _core_
.PAPER_A4_EXTRA
559 PAPER_LETTER_TRANSVERSE
= _core_
.PAPER_LETTER_TRANSVERSE
560 PAPER_A4_TRANSVERSE
= _core_
.PAPER_A4_TRANSVERSE
561 PAPER_LETTER_EXTRA_TRANSVERSE
= _core_
.PAPER_LETTER_EXTRA_TRANSVERSE
562 PAPER_A_PLUS
= _core_
.PAPER_A_PLUS
563 PAPER_B_PLUS
= _core_
.PAPER_B_PLUS
564 PAPER_LETTER_PLUS
= _core_
.PAPER_LETTER_PLUS
565 PAPER_A4_PLUS
= _core_
.PAPER_A4_PLUS
566 PAPER_A5_TRANSVERSE
= _core_
.PAPER_A5_TRANSVERSE
567 PAPER_B5_TRANSVERSE
= _core_
.PAPER_B5_TRANSVERSE
568 PAPER_A3_EXTRA
= _core_
.PAPER_A3_EXTRA
569 PAPER_A5_EXTRA
= _core_
.PAPER_A5_EXTRA
570 PAPER_B5_EXTRA
= _core_
.PAPER_B5_EXTRA
571 PAPER_A2
= _core_
.PAPER_A2
572 PAPER_A3_TRANSVERSE
= _core_
.PAPER_A3_TRANSVERSE
573 PAPER_A3_EXTRA_TRANSVERSE
= _core_
.PAPER_A3_EXTRA_TRANSVERSE
574 DUPLEX_SIMPLEX
= _core_
.DUPLEX_SIMPLEX
575 DUPLEX_HORIZONTAL
= _core_
.DUPLEX_HORIZONTAL
576 DUPLEX_VERTICAL
= _core_
.DUPLEX_VERTICAL
577 ITEM_SEPARATOR
= _core_
.ITEM_SEPARATOR
578 ITEM_NORMAL
= _core_
.ITEM_NORMAL
579 ITEM_CHECK
= _core_
.ITEM_CHECK
580 ITEM_RADIO
= _core_
.ITEM_RADIO
581 ITEM_MAX
= _core_
.ITEM_MAX
582 HT_NOWHERE
= _core_
.HT_NOWHERE
583 HT_SCROLLBAR_FIRST
= _core_
.HT_SCROLLBAR_FIRST
584 HT_SCROLLBAR_ARROW_LINE_1
= _core_
.HT_SCROLLBAR_ARROW_LINE_1
585 HT_SCROLLBAR_ARROW_LINE_2
= _core_
.HT_SCROLLBAR_ARROW_LINE_2
586 HT_SCROLLBAR_ARROW_PAGE_1
= _core_
.HT_SCROLLBAR_ARROW_PAGE_1
587 HT_SCROLLBAR_ARROW_PAGE_2
= _core_
.HT_SCROLLBAR_ARROW_PAGE_2
588 HT_SCROLLBAR_THUMB
= _core_
.HT_SCROLLBAR_THUMB
589 HT_SCROLLBAR_BAR_1
= _core_
.HT_SCROLLBAR_BAR_1
590 HT_SCROLLBAR_BAR_2
= _core_
.HT_SCROLLBAR_BAR_2
591 HT_SCROLLBAR_LAST
= _core_
.HT_SCROLLBAR_LAST
592 HT_WINDOW_OUTSIDE
= _core_
.HT_WINDOW_OUTSIDE
593 HT_WINDOW_INSIDE
= _core_
.HT_WINDOW_INSIDE
594 HT_WINDOW_VERT_SCROLLBAR
= _core_
.HT_WINDOW_VERT_SCROLLBAR
595 HT_WINDOW_HORZ_SCROLLBAR
= _core_
.HT_WINDOW_HORZ_SCROLLBAR
596 HT_WINDOW_CORNER
= _core_
.HT_WINDOW_CORNER
597 HT_MAX
= _core_
.HT_MAX
598 MOD_NONE
= _core_
.MOD_NONE
599 MOD_ALT
= _core_
.MOD_ALT
600 MOD_CONTROL
= _core_
.MOD_CONTROL
601 MOD_SHIFT
= _core_
.MOD_SHIFT
602 MOD_WIN
= _core_
.MOD_WIN
603 UPDATE_UI_NONE
= _core_
.UPDATE_UI_NONE
604 UPDATE_UI_RECURSE
= _core_
.UPDATE_UI_RECURSE
605 UPDATE_UI_FROMIDLE
= _core_
.UPDATE_UI_FROMIDLE
606 #---------------------------------------------------------------------------
608 class Object(object):
610 The base class for most wx objects, although in wxPython not
611 much functionality is needed nor exposed.
613 def __init__(self
): raise RuntimeError, "No constructor defined"
615 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
616 def GetClassName(*args
, **kwargs
):
618 GetClassName(self) -> String
620 Returns the class name of the C++ class using wxRTTI.
622 return _core_
.Object_GetClassName(*args
, **kwargs
)
624 def Destroy(*args
, **kwargs
):
628 Deletes the C++ object this Python object is a proxy for.
630 return _core_
.Object_Destroy(*args
, **kwargs
)
633 class ObjectPtr(Object
):
634 def __init__(self
, this
):
636 if not hasattr(self
,"thisown"): self
.thisown
= 0
637 self
.__class
__ = Object
638 _core_
.Object_swigregister(ObjectPtr
)
639 _wxPySetDictionary
= _core_
._wxPySetDictionary
641 _wxPyFixStockObjects
= _core_
._wxPyFixStockObjects
644 EmptyString
= cvar
.EmptyString
646 #---------------------------------------------------------------------------
648 BITMAP_TYPE_INVALID
= _core_
.BITMAP_TYPE_INVALID
649 BITMAP_TYPE_BMP
= _core_
.BITMAP_TYPE_BMP
650 BITMAP_TYPE_ICO
= _core_
.BITMAP_TYPE_ICO
651 BITMAP_TYPE_CUR
= _core_
.BITMAP_TYPE_CUR
652 BITMAP_TYPE_XBM
= _core_
.BITMAP_TYPE_XBM
653 BITMAP_TYPE_XBM_DATA
= _core_
.BITMAP_TYPE_XBM_DATA
654 BITMAP_TYPE_XPM
= _core_
.BITMAP_TYPE_XPM
655 BITMAP_TYPE_XPM_DATA
= _core_
.BITMAP_TYPE_XPM_DATA
656 BITMAP_TYPE_TIF
= _core_
.BITMAP_TYPE_TIF
657 BITMAP_TYPE_GIF
= _core_
.BITMAP_TYPE_GIF
658 BITMAP_TYPE_PNG
= _core_
.BITMAP_TYPE_PNG
659 BITMAP_TYPE_JPEG
= _core_
.BITMAP_TYPE_JPEG
660 BITMAP_TYPE_PNM
= _core_
.BITMAP_TYPE_PNM
661 BITMAP_TYPE_PCX
= _core_
.BITMAP_TYPE_PCX
662 BITMAP_TYPE_PICT
= _core_
.BITMAP_TYPE_PICT
663 BITMAP_TYPE_ICON
= _core_
.BITMAP_TYPE_ICON
664 BITMAP_TYPE_ANI
= _core_
.BITMAP_TYPE_ANI
665 BITMAP_TYPE_IFF
= _core_
.BITMAP_TYPE_IFF
666 BITMAP_TYPE_MACCURSOR
= _core_
.BITMAP_TYPE_MACCURSOR
667 BITMAP_TYPE_ANY
= _core_
.BITMAP_TYPE_ANY
668 CURSOR_NONE
= _core_
.CURSOR_NONE
669 CURSOR_ARROW
= _core_
.CURSOR_ARROW
670 CURSOR_RIGHT_ARROW
= _core_
.CURSOR_RIGHT_ARROW
671 CURSOR_BULLSEYE
= _core_
.CURSOR_BULLSEYE
672 CURSOR_CHAR
= _core_
.CURSOR_CHAR
673 CURSOR_CROSS
= _core_
.CURSOR_CROSS
674 CURSOR_HAND
= _core_
.CURSOR_HAND
675 CURSOR_IBEAM
= _core_
.CURSOR_IBEAM
676 CURSOR_LEFT_BUTTON
= _core_
.CURSOR_LEFT_BUTTON
677 CURSOR_MAGNIFIER
= _core_
.CURSOR_MAGNIFIER
678 CURSOR_MIDDLE_BUTTON
= _core_
.CURSOR_MIDDLE_BUTTON
679 CURSOR_NO_ENTRY
= _core_
.CURSOR_NO_ENTRY
680 CURSOR_PAINT_BRUSH
= _core_
.CURSOR_PAINT_BRUSH
681 CURSOR_PENCIL
= _core_
.CURSOR_PENCIL
682 CURSOR_POINT_LEFT
= _core_
.CURSOR_POINT_LEFT
683 CURSOR_POINT_RIGHT
= _core_
.CURSOR_POINT_RIGHT
684 CURSOR_QUESTION_ARROW
= _core_
.CURSOR_QUESTION_ARROW
685 CURSOR_RIGHT_BUTTON
= _core_
.CURSOR_RIGHT_BUTTON
686 CURSOR_SIZENESW
= _core_
.CURSOR_SIZENESW
687 CURSOR_SIZENS
= _core_
.CURSOR_SIZENS
688 CURSOR_SIZENWSE
= _core_
.CURSOR_SIZENWSE
689 CURSOR_SIZEWE
= _core_
.CURSOR_SIZEWE
690 CURSOR_SIZING
= _core_
.CURSOR_SIZING
691 CURSOR_SPRAYCAN
= _core_
.CURSOR_SPRAYCAN
692 CURSOR_WAIT
= _core_
.CURSOR_WAIT
693 CURSOR_WATCH
= _core_
.CURSOR_WATCH
694 CURSOR_BLANK
= _core_
.CURSOR_BLANK
695 CURSOR_DEFAULT
= _core_
.CURSOR_DEFAULT
696 CURSOR_COPY_ARROW
= _core_
.CURSOR_COPY_ARROW
697 CURSOR_ARROWWAIT
= _core_
.CURSOR_ARROWWAIT
698 CURSOR_MAX
= _core_
.CURSOR_MAX
699 #---------------------------------------------------------------------------
703 wx.Size is a useful data structure used to represent the size of
704 something. It simply contians integer width and height
705 proprtites. In most places in wxPython where a wx.Size is
706 expected a (width, height) tuple can be used instead.
709 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
710 width
= property(_core_
.Size_width_get
, _core_
.Size_width_set
)
711 height
= property(_core_
.Size_height_get
, _core_
.Size_height_set
)
712 x
= width
; y
= height
713 def __init__(self
, *args
, **kwargs
):
715 __init__(self, int w=0, int h=0) -> Size
717 Creates a size object.
719 newobj
= _core_
.new_Size(*args
, **kwargs
)
720 self
.this
= newobj
.this
723 def __del__(self
, destroy
=_core_
.delete_Size
):
726 if self
.thisown
: destroy(self
)
729 def __eq__(*args
, **kwargs
):
731 __eq__(self, Size sz) -> bool
733 Test for equality of wx.Size objects.
735 return _core_
.Size___eq__(*args
, **kwargs
)
737 def __ne__(*args
, **kwargs
):
739 __ne__(self, Size sz) -> bool
743 return _core_
.Size___ne__(*args
, **kwargs
)
745 def __add__(*args
, **kwargs
):
747 __add__(self, Size sz) -> Size
749 Add sz's proprties to this and return the result.
751 return _core_
.Size___add__(*args
, **kwargs
)
753 def __sub__(*args
, **kwargs
):
755 __sub__(self, Size sz) -> Size
757 Subtract sz's properties from this and return the result.
759 return _core_
.Size___sub__(*args
, **kwargs
)
761 def IncTo(*args
, **kwargs
):
765 Increments this object so that both of its dimensions are not less
766 than the corresponding dimensions of the size.
768 return _core_
.Size_IncTo(*args
, **kwargs
)
770 def DecTo(*args
, **kwargs
):
774 Decrements this object so that both of its dimensions are not greater
775 than the corresponding dimensions of the size.
777 return _core_
.Size_DecTo(*args
, **kwargs
)
779 def Set(*args
, **kwargs
):
781 Set(self, int w, int h)
783 Set both width and height.
785 return _core_
.Size_Set(*args
, **kwargs
)
787 def SetWidth(*args
, **kwargs
):
788 """SetWidth(self, int w)"""
789 return _core_
.Size_SetWidth(*args
, **kwargs
)
791 def SetHeight(*args
, **kwargs
):
792 """SetHeight(self, int h)"""
793 return _core_
.Size_SetHeight(*args
, **kwargs
)
795 def GetWidth(*args
, **kwargs
):
796 """GetWidth(self) -> int"""
797 return _core_
.Size_GetWidth(*args
, **kwargs
)
799 def GetHeight(*args
, **kwargs
):
800 """GetHeight(self) -> int"""
801 return _core_
.Size_GetHeight(*args
, **kwargs
)
803 def IsFullySpecified(*args
, **kwargs
):
805 IsFullySpecified(self) -> bool
807 Returns True if both components of the size are non-default values.
809 return _core_
.Size_IsFullySpecified(*args
, **kwargs
)
811 def SetDefaults(*args
, **kwargs
):
813 SetDefaults(self, Size size)
815 Combine this size with the other one replacing the default components
816 of this object (i.e. equal to -1) with those of the other.
818 return _core_
.Size_SetDefaults(*args
, **kwargs
)
820 def Get(*args
, **kwargs
):
822 Get() -> (width,height)
824 Returns the width and height properties as a tuple.
826 return _core_
.Size_Get(*args
, **kwargs
)
828 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
829 def __str__(self
): return str(self
.Get())
830 def __repr__(self
): return 'wx.Size'+str(self
.Get())
831 def __len__(self
): return len(self
.Get())
832 def __getitem__(self
, index
): return self
.Get()[index
]
833 def __setitem__(self
, index
, val
):
834 if index
== 0: self
.width
= val
835 elif index
== 1: self
.height
= val
836 else: raise IndexError
837 def __nonzero__(self
): return self
.Get() != (0,0)
838 __safe_for_unpickling__
= True
839 def __reduce__(self
): return (wx
.Size
, self
.Get())
843 def __init__(self
, this
):
845 if not hasattr(self
,"thisown"): self
.thisown
= 0
846 self
.__class
__ = Size
847 _core_
.Size_swigregister(SizePtr
)
849 #---------------------------------------------------------------------------
851 class RealPoint(object):
853 A data structure for representing a point or position with floating
854 point x and y properties. In wxPython most places that expect a
855 wx.RealPoint can also accept a (x,y) tuple.
858 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
859 x
= property(_core_
.RealPoint_x_get
, _core_
.RealPoint_x_set
)
860 y
= property(_core_
.RealPoint_y_get
, _core_
.RealPoint_y_set
)
861 def __init__(self
, *args
, **kwargs
):
863 __init__(self, double x=0.0, double y=0.0) -> RealPoint
865 Create a wx.RealPoint object
867 newobj
= _core_
.new_RealPoint(*args
, **kwargs
)
868 self
.this
= newobj
.this
871 def __del__(self
, destroy
=_core_
.delete_RealPoint
):
874 if self
.thisown
: destroy(self
)
877 def __eq__(*args
, **kwargs
):
879 __eq__(self, RealPoint pt) -> bool
881 Test for equality of wx.RealPoint objects.
883 return _core_
.RealPoint___eq__(*args
, **kwargs
)
885 def __ne__(*args
, **kwargs
):
887 __ne__(self, RealPoint pt) -> bool
889 Test for inequality of wx.RealPoint objects.
891 return _core_
.RealPoint___ne__(*args
, **kwargs
)
893 def __add__(*args
, **kwargs
):
895 __add__(self, RealPoint pt) -> RealPoint
897 Add pt's proprties to this and return the result.
899 return _core_
.RealPoint___add__(*args
, **kwargs
)
901 def __sub__(*args
, **kwargs
):
903 __sub__(self, RealPoint pt) -> RealPoint
905 Subtract pt's proprties from this and return the result
907 return _core_
.RealPoint___sub__(*args
, **kwargs
)
909 def Set(*args
, **kwargs
):
911 Set(self, double x, double y)
913 Set both the x and y properties
915 return _core_
.RealPoint_Set(*args
, **kwargs
)
917 def Get(*args
, **kwargs
):
921 Return the x and y properties as a tuple.
923 return _core_
.RealPoint_Get(*args
, **kwargs
)
925 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
926 def __str__(self
): return str(self
.Get())
927 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
928 def __len__(self
): return len(self
.Get())
929 def __getitem__(self
, index
): return self
.Get()[index
]
930 def __setitem__(self
, index
, val
):
931 if index
== 0: self
.x
= val
932 elif index
== 1: self
.y
= val
933 else: raise IndexError
934 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
935 __safe_for_unpickling__
= True
936 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
939 class RealPointPtr(RealPoint
):
940 def __init__(self
, this
):
942 if not hasattr(self
,"thisown"): self
.thisown
= 0
943 self
.__class
__ = RealPoint
944 _core_
.RealPoint_swigregister(RealPointPtr
)
946 #---------------------------------------------------------------------------
950 A data structure for representing a point or position with integer x
951 and y properties. Most places in wxPython that expect a wx.Point can
952 also accept a (x,y) tuple.
955 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
956 x
= property(_core_
.Point_x_get
, _core_
.Point_x_set
)
957 y
= property(_core_
.Point_y_get
, _core_
.Point_y_set
)
958 def __init__(self
, *args
, **kwargs
):
960 __init__(self, int x=0, int y=0) -> Point
962 Create a wx.Point object
964 newobj
= _core_
.new_Point(*args
, **kwargs
)
965 self
.this
= newobj
.this
968 def __del__(self
, destroy
=_core_
.delete_Point
):
971 if self
.thisown
: destroy(self
)
974 def __eq__(*args
, **kwargs
):
976 __eq__(self, Point pt) -> bool
978 Test for equality of wx.Point objects.
980 return _core_
.Point___eq__(*args
, **kwargs
)
982 def __ne__(*args
, **kwargs
):
984 __ne__(self, Point pt) -> bool
986 Test for inequality of wx.Point objects.
988 return _core_
.Point___ne__(*args
, **kwargs
)
990 def __add__(*args
, **kwargs
):
992 __add__(self, Point pt) -> Point
994 Add pt's proprties to this and return the result.
996 return _core_
.Point___add__(*args
, **kwargs
)
998 def __sub__(*args
, **kwargs
):
1000 __sub__(self, Point pt) -> Point
1002 Subtract pt's proprties from this and return the result
1004 return _core_
.Point___sub__(*args
, **kwargs
)
1006 def __iadd__(*args
, **kwargs
):
1008 __iadd__(self, Point pt) -> Point
1010 Add pt to this object.
1012 return _core_
.Point___iadd__(*args
, **kwargs
)
1014 def __isub__(*args
, **kwargs
):
1016 __isub__(self, Point pt) -> Point
1018 Subtract pt from this object.
1020 return _core_
.Point___isub__(*args
, **kwargs
)
1022 def Set(*args
, **kwargs
):
1024 Set(self, long x, long y)
1026 Set both the x and y properties
1028 return _core_
.Point_Set(*args
, **kwargs
)
1030 def Get(*args
, **kwargs
):
1034 Return the x and y properties as a tuple.
1036 return _core_
.Point_Get(*args
, **kwargs
)
1038 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1039 def __str__(self
): return str(self
.Get())
1040 def __repr__(self
): return 'wx.Point'+str(self
.Get())
1041 def __len__(self
): return len(self
.Get())
1042 def __getitem__(self
, index
): return self
.Get()[index
]
1043 def __setitem__(self
, index
, val
):
1044 if index
== 0: self
.x
= val
1045 elif index
== 1: self
.y
= val
1046 else: raise IndexError
1047 def __nonzero__(self
): return self
.Get() != (0,0)
1048 __safe_for_unpickling__
= True
1049 def __reduce__(self
): return (wx
.Point
, self
.Get())
1052 class PointPtr(Point
):
1053 def __init__(self
, this
):
1055 if not hasattr(self
,"thisown"): self
.thisown
= 0
1056 self
.__class
__ = Point
1057 _core_
.Point_swigregister(PointPtr
)
1059 #---------------------------------------------------------------------------
1063 A class for representing and manipulating rectangles. It has x, y,
1064 width and height properties. In wxPython most palces that expect a
1065 wx.Rect can also accept a (x,y,width,height) tuple.
1068 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1069 def __init__(self
, *args
, **kwargs
):
1071 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1073 Create a new Rect object.
1075 newobj
= _core_
.new_Rect(*args
, **kwargs
)
1076 self
.this
= newobj
.this
1079 def __del__(self
, destroy
=_core_
.delete_Rect
):
1082 if self
.thisown
: destroy(self
)
1085 def GetX(*args
, **kwargs
):
1086 """GetX(self) -> int"""
1087 return _core_
.Rect_GetX(*args
, **kwargs
)
1089 def SetX(*args
, **kwargs
):
1090 """SetX(self, int x)"""
1091 return _core_
.Rect_SetX(*args
, **kwargs
)
1093 def GetY(*args
, **kwargs
):
1094 """GetY(self) -> int"""
1095 return _core_
.Rect_GetY(*args
, **kwargs
)
1097 def SetY(*args
, **kwargs
):
1098 """SetY(self, int y)"""
1099 return _core_
.Rect_SetY(*args
, **kwargs
)
1101 def GetWidth(*args
, **kwargs
):
1102 """GetWidth(self) -> int"""
1103 return _core_
.Rect_GetWidth(*args
, **kwargs
)
1105 def SetWidth(*args
, **kwargs
):
1106 """SetWidth(self, int w)"""
1107 return _core_
.Rect_SetWidth(*args
, **kwargs
)
1109 def GetHeight(*args
, **kwargs
):
1110 """GetHeight(self) -> int"""
1111 return _core_
.Rect_GetHeight(*args
, **kwargs
)
1113 def SetHeight(*args
, **kwargs
):
1114 """SetHeight(self, int h)"""
1115 return _core_
.Rect_SetHeight(*args
, **kwargs
)
1117 def GetPosition(*args
, **kwargs
):
1118 """GetPosition(self) -> Point"""
1119 return _core_
.Rect_GetPosition(*args
, **kwargs
)
1121 def SetPosition(*args
, **kwargs
):
1122 """SetPosition(self, Point p)"""
1123 return _core_
.Rect_SetPosition(*args
, **kwargs
)
1125 def GetSize(*args
, **kwargs
):
1126 """GetSize(self) -> Size"""
1127 return _core_
.Rect_GetSize(*args
, **kwargs
)
1129 def SetSize(*args
, **kwargs
):
1130 """SetSize(self, Size s)"""
1131 return _core_
.Rect_SetSize(*args
, **kwargs
)
1133 def IsEmpty(*args
, **kwargs
):
1134 """IsEmpty(self) -> bool"""
1135 return _core_
.Rect_IsEmpty(*args
, **kwargs
)
1137 def GetTopLeft(*args
, **kwargs
):
1138 """GetTopLeft(self) -> Point"""
1139 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1141 def SetTopLeft(*args
, **kwargs
):
1142 """SetTopLeft(self, Point p)"""
1143 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1145 def GetBottomRight(*args
, **kwargs
):
1146 """GetBottomRight(self) -> Point"""
1147 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1149 def SetBottomRight(*args
, **kwargs
):
1150 """SetBottomRight(self, Point p)"""
1151 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1153 def GetLeft(*args
, **kwargs
):
1154 """GetLeft(self) -> int"""
1155 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1157 def GetTop(*args
, **kwargs
):
1158 """GetTop(self) -> int"""
1159 return _core_
.Rect_GetTop(*args
, **kwargs
)
1161 def GetBottom(*args
, **kwargs
):
1162 """GetBottom(self) -> int"""
1163 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1165 def GetRight(*args
, **kwargs
):
1166 """GetRight(self) -> int"""
1167 return _core_
.Rect_GetRight(*args
, **kwargs
)
1169 def SetLeft(*args
, **kwargs
):
1170 """SetLeft(self, int left)"""
1171 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1173 def SetRight(*args
, **kwargs
):
1174 """SetRight(self, int right)"""
1175 return _core_
.Rect_SetRight(*args
, **kwargs
)
1177 def SetTop(*args
, **kwargs
):
1178 """SetTop(self, int top)"""
1179 return _core_
.Rect_SetTop(*args
, **kwargs
)
1181 def SetBottom(*args
, **kwargs
):
1182 """SetBottom(self, int bottom)"""
1183 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1185 position
= property(GetPosition
, SetPosition
)
1186 size
= property(GetSize
, SetSize
)
1187 left
= property(GetLeft
, SetLeft
)
1188 right
= property(GetRight
, SetRight
)
1189 top
= property(GetTop
, SetTop
)
1190 bottom
= property(GetBottom
, SetBottom
)
1192 def Inflate(*args
, **kwargs
):
1194 Inflate(self, int dx, int dy) -> Rect
1196 Increases the size of the rectangle.
1198 The left border is moved farther left and the right border is moved
1199 farther right by ``dx``. The upper border is moved farther up and the
1200 bottom border is moved farther down by ``dy``. (Note the the width and
1201 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1202 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1203 opposite happens: the rectangle size decreases in the respective
1206 The change is made to the rectangle inplace, if instead you need a
1207 copy that is inflated, preserving the original then make the copy
1210 copy = wx.Rect(*original)
1215 return _core_
.Rect_Inflate(*args
, **kwargs
)
1217 def Deflate(*args
, **kwargs
):
1219 Deflate(self, int dx, int dy) -> Rect
1221 Decrease the rectangle size. This method is the opposite of `Inflate`
1222 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1223 `Inflate` for a full description.
1225 return _core_
.Rect_Deflate(*args
, **kwargs
)
1227 def OffsetXY(*args
, **kwargs
):
1229 OffsetXY(self, int dx, int dy)
1231 Moves the rectangle by the specified offset. If dx is positive, the
1232 rectangle is moved to the right, if dy is positive, it is moved to the
1233 bottom, otherwise it is moved to the left or top respectively.
1235 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1237 def Offset(*args
, **kwargs
):
1239 Offset(self, Point pt)
1241 Same as OffsetXY but uses dx,dy from Point
1243 return _core_
.Rect_Offset(*args
, **kwargs
)
1245 def Intersect(*args
, **kwargs
):
1247 Intersect(self, Rect rect) -> Rect
1249 Returns the intersectsion of this rectangle and rect.
1251 return _core_
.Rect_Intersect(*args
, **kwargs
)
1253 def Union(*args
, **kwargs
):
1255 Union(self, Rect rect) -> Rect
1257 Returns the union of this rectangle and rect.
1259 return _core_
.Rect_Union(*args
, **kwargs
)
1261 def __add__(*args
, **kwargs
):
1263 __add__(self, Rect rect) -> Rect
1265 Add the properties of rect to this rectangle and return the result.
1267 return _core_
.Rect___add__(*args
, **kwargs
)
1269 def __iadd__(*args
, **kwargs
):
1271 __iadd__(self, Rect rect) -> Rect
1273 Add the properties of rect to this rectangle, updating this rectangle.
1275 return _core_
.Rect___iadd__(*args
, **kwargs
)
1277 def __eq__(*args
, **kwargs
):
1279 __eq__(self, Rect rect) -> bool
1283 return _core_
.Rect___eq__(*args
, **kwargs
)
1285 def __ne__(*args
, **kwargs
):
1287 __ne__(self, Rect rect) -> bool
1289 Test for inequality.
1291 return _core_
.Rect___ne__(*args
, **kwargs
)
1293 def InsideXY(*args
, **kwargs
):
1295 InsideXY(self, int x, int y) -> bool
1297 Return True if the point is (not strcitly) inside the rect.
1299 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1301 def Inside(*args
, **kwargs
):
1303 Inside(self, Point pt) -> bool
1305 Return True if the point is (not strcitly) inside the rect.
1307 return _core_
.Rect_Inside(*args
, **kwargs
)
1309 def Intersects(*args
, **kwargs
):
1311 Intersects(self, Rect rect) -> bool
1313 Returns True if the rectangles have a non empty intersection.
1315 return _core_
.Rect_Intersects(*args
, **kwargs
)
1317 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1318 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1319 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1320 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1321 def Set(*args
, **kwargs
):
1323 Set(self, int x=0, int y=0, int width=0, int height=0)
1325 Set all rectangle properties.
1327 return _core_
.Rect_Set(*args
, **kwargs
)
1329 def Get(*args
, **kwargs
):
1331 Get() -> (x,y,width,height)
1333 Return the rectangle properties as a tuple.
1335 return _core_
.Rect_Get(*args
, **kwargs
)
1337 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1338 def __str__(self
): return str(self
.Get())
1339 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1340 def __len__(self
): return len(self
.Get())
1341 def __getitem__(self
, index
): return self
.Get()[index
]
1342 def __setitem__(self
, index
, val
):
1343 if index
== 0: self
.x
= val
1344 elif index
== 1: self
.y
= val
1345 elif index
== 2: self
.width
= val
1346 elif index
== 3: self
.height
= val
1347 else: raise IndexError
1348 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1349 __safe_for_unpickling__
= True
1350 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1353 class RectPtr(Rect
):
1354 def __init__(self
, this
):
1356 if not hasattr(self
,"thisown"): self
.thisown
= 0
1357 self
.__class
__ = Rect
1358 _core_
.Rect_swigregister(RectPtr
)
1360 def RectPP(*args
, **kwargs
):
1362 RectPP(Point topLeft, Point bottomRight) -> Rect
1364 Create a new Rect object from Points representing two corners.
1366 val
= _core_
.new_RectPP(*args
, **kwargs
)
1370 def RectPS(*args
, **kwargs
):
1372 RectPS(Point pos, Size size) -> Rect
1374 Create a new Rect from a position and size.
1376 val
= _core_
.new_RectPS(*args
, **kwargs
)
1380 def RectS(*args
, **kwargs
):
1382 RectS(Size size) -> Rect
1384 Create a new Rect from a size only.
1386 val
= _core_
.new_RectS(*args
, **kwargs
)
1391 def IntersectRect(*args
, **kwargs
):
1393 IntersectRect(Rect r1, Rect r2) -> Rect
1395 Calculate and return the intersection of r1 and r2.
1397 return _core_
.IntersectRect(*args
, **kwargs
)
1398 #---------------------------------------------------------------------------
1400 class Point2D(object):
1402 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1403 with floating point values.
1406 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1407 def __init__(self
, *args
, **kwargs
):
1409 __init__(self, double x=0.0, double y=0.0) -> Point2D
1411 Create a w.Point2D object.
1413 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1414 self
.this
= newobj
.this
1417 def GetFloor(*args
, **kwargs
):
1423 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1425 def GetRounded(*args
, **kwargs
):
1427 GetRounded() -> (x,y)
1431 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1433 def GetVectorLength(*args
, **kwargs
):
1434 """GetVectorLength(self) -> double"""
1435 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1437 def GetVectorAngle(*args
, **kwargs
):
1438 """GetVectorAngle(self) -> double"""
1439 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1441 def SetVectorLength(*args
, **kwargs
):
1442 """SetVectorLength(self, double length)"""
1443 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1445 def SetVectorAngle(*args
, **kwargs
):
1446 """SetVectorAngle(self, double degrees)"""
1447 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1449 def SetPolarCoordinates(self
, angle
, length
):
1450 self
.SetVectorLength(length
)
1451 self
.SetVectorAngle(angle
)
1452 def Normalize(self
):
1453 self
.SetVectorLength(1.0)
1455 def GetDistance(*args
, **kwargs
):
1456 """GetDistance(self, Point2D pt) -> double"""
1457 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1459 def GetDistanceSquare(*args
, **kwargs
):
1460 """GetDistanceSquare(self, Point2D pt) -> double"""
1461 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1463 def GetDotProduct(*args
, **kwargs
):
1464 """GetDotProduct(self, Point2D vec) -> double"""
1465 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1467 def GetCrossProduct(*args
, **kwargs
):
1468 """GetCrossProduct(self, Point2D vec) -> double"""
1469 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1471 def __neg__(*args
, **kwargs
):
1473 __neg__(self) -> Point2D
1475 the reflection of this point
1477 return _core_
.Point2D___neg__(*args
, **kwargs
)
1479 def __iadd__(*args
, **kwargs
):
1480 """__iadd__(self, Point2D pt) -> Point2D"""
1481 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1483 def __isub__(*args
, **kwargs
):
1484 """__isub__(self, Point2D pt) -> Point2D"""
1485 return _core_
.Point2D___isub__(*args
, **kwargs
)
1487 def __imul__(*args
, **kwargs
):
1488 """__imul__(self, Point2D pt) -> Point2D"""
1489 return _core_
.Point2D___imul__(*args
, **kwargs
)
1491 def __idiv__(*args
, **kwargs
):
1492 """__idiv__(self, Point2D pt) -> Point2D"""
1493 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1495 def __eq__(*args
, **kwargs
):
1497 __eq__(self, Point2D pt) -> bool
1501 return _core_
.Point2D___eq__(*args
, **kwargs
)
1503 def __ne__(*args
, **kwargs
):
1505 __ne__(self, Point2D pt) -> bool
1509 return _core_
.Point2D___ne__(*args
, **kwargs
)
1511 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1512 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1513 def Set(*args
, **kwargs
):
1514 """Set(self, double x=0, double y=0)"""
1515 return _core_
.Point2D_Set(*args
, **kwargs
)
1517 def Get(*args
, **kwargs
):
1521 Return x and y properties as a tuple.
1523 return _core_
.Point2D_Get(*args
, **kwargs
)
1525 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1526 def __str__(self
): return str(self
.Get())
1527 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1528 def __len__(self
): return len(self
.Get())
1529 def __getitem__(self
, index
): return self
.Get()[index
]
1530 def __setitem__(self
, index
, val
):
1531 if index
== 0: self
.x
= val
1532 elif index
== 1: self
.y
= val
1533 else: raise IndexError
1534 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1535 __safe_for_unpickling__
= True
1536 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1539 class Point2DPtr(Point2D
):
1540 def __init__(self
, this
):
1542 if not hasattr(self
,"thisown"): self
.thisown
= 0
1543 self
.__class
__ = Point2D
1544 _core_
.Point2D_swigregister(Point2DPtr
)
1546 def Point2DCopy(*args
, **kwargs
):
1548 Point2DCopy(Point2D pt) -> Point2D
1550 Create a w.Point2D object.
1552 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1556 def Point2DFromPoint(*args
, **kwargs
):
1558 Point2DFromPoint(Point pt) -> Point2D
1560 Create a w.Point2D object.
1562 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1566 #---------------------------------------------------------------------------
1568 FromStart
= _core_
.FromStart
1569 FromCurrent
= _core_
.FromCurrent
1570 FromEnd
= _core_
.FromEnd
1571 class InputStream(object):
1572 """Proxy of C++ InputStream class"""
1574 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1575 def __init__(self
, *args
, **kwargs
):
1576 """__init__(self, PyObject p) -> InputStream"""
1577 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1578 self
.this
= newobj
.this
1581 def __del__(self
, destroy
=_core_
.delete_InputStream
):
1584 if self
.thisown
: destroy(self
)
1587 def close(*args
, **kwargs
):
1589 return _core_
.InputStream_close(*args
, **kwargs
)
1591 def flush(*args
, **kwargs
):
1593 return _core_
.InputStream_flush(*args
, **kwargs
)
1595 def eof(*args
, **kwargs
):
1596 """eof(self) -> bool"""
1597 return _core_
.InputStream_eof(*args
, **kwargs
)
1599 def read(*args
, **kwargs
):
1600 """read(self, int size=-1) -> PyObject"""
1601 return _core_
.InputStream_read(*args
, **kwargs
)
1603 def readline(*args
, **kwargs
):
1604 """readline(self, int size=-1) -> PyObject"""
1605 return _core_
.InputStream_readline(*args
, **kwargs
)
1607 def readlines(*args
, **kwargs
):
1608 """readlines(self, int sizehint=-1) -> PyObject"""
1609 return _core_
.InputStream_readlines(*args
, **kwargs
)
1611 def seek(*args
, **kwargs
):
1612 """seek(self, int offset, int whence=0)"""
1613 return _core_
.InputStream_seek(*args
, **kwargs
)
1615 def tell(*args
, **kwargs
):
1616 """tell(self) -> int"""
1617 return _core_
.InputStream_tell(*args
, **kwargs
)
1619 def Peek(*args
, **kwargs
):
1620 """Peek(self) -> char"""
1621 return _core_
.InputStream_Peek(*args
, **kwargs
)
1623 def GetC(*args
, **kwargs
):
1624 """GetC(self) -> char"""
1625 return _core_
.InputStream_GetC(*args
, **kwargs
)
1627 def LastRead(*args
, **kwargs
):
1628 """LastRead(self) -> size_t"""
1629 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1631 def CanRead(*args
, **kwargs
):
1632 """CanRead(self) -> bool"""
1633 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1635 def Eof(*args
, **kwargs
):
1636 """Eof(self) -> bool"""
1637 return _core_
.InputStream_Eof(*args
, **kwargs
)
1639 def Ungetch(*args
, **kwargs
):
1640 """Ungetch(self, char c) -> bool"""
1641 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1643 def SeekI(*args
, **kwargs
):
1644 """SeekI(self, long pos, int mode=FromStart) -> long"""
1645 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1647 def TellI(*args
, **kwargs
):
1648 """TellI(self) -> long"""
1649 return _core_
.InputStream_TellI(*args
, **kwargs
)
1652 class InputStreamPtr(InputStream
):
1653 def __init__(self
, this
):
1655 if not hasattr(self
,"thisown"): self
.thisown
= 0
1656 self
.__class
__ = InputStream
1657 _core_
.InputStream_swigregister(InputStreamPtr
)
1658 DefaultPosition
= cvar
.DefaultPosition
1659 DefaultSize
= cvar
.DefaultSize
1661 class OutputStream(object):
1662 """Proxy of C++ OutputStream class"""
1663 def __init__(self
): raise RuntimeError, "No constructor defined"
1665 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1666 def write(*args
, **kwargs
):
1667 """write(self, PyObject obj)"""
1668 return _core_
.OutputStream_write(*args
, **kwargs
)
1671 class OutputStreamPtr(OutputStream
):
1672 def __init__(self
, this
):
1674 if not hasattr(self
,"thisown"): self
.thisown
= 0
1675 self
.__class
__ = OutputStream
1676 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1678 #---------------------------------------------------------------------------
1680 class FSFile(Object
):
1681 """Proxy of C++ FSFile class"""
1683 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1684 def __init__(self
, *args
, **kwargs
):
1686 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1687 DateTime modif) -> FSFile
1689 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1690 self
.this
= newobj
.this
1693 self
.thisown
= 0 # It will normally be deleted by the user of the wx.FileSystem
1695 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1698 if self
.thisown
: destroy(self
)
1701 def GetStream(*args
, **kwargs
):
1702 """GetStream(self) -> InputStream"""
1703 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1705 def GetMimeType(*args
, **kwargs
):
1706 """GetMimeType(self) -> String"""
1707 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1709 def GetLocation(*args
, **kwargs
):
1710 """GetLocation(self) -> String"""
1711 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1713 def GetAnchor(*args
, **kwargs
):
1714 """GetAnchor(self) -> String"""
1715 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1717 def GetModificationTime(*args
, **kwargs
):
1718 """GetModificationTime(self) -> DateTime"""
1719 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1722 class FSFilePtr(FSFile
):
1723 def __init__(self
, this
):
1725 if not hasattr(self
,"thisown"): self
.thisown
= 0
1726 self
.__class
__ = FSFile
1727 _core_
.FSFile_swigregister(FSFilePtr
)
1729 class CPPFileSystemHandler(object):
1730 """Proxy of C++ CPPFileSystemHandler class"""
1731 def __init__(self
): raise RuntimeError, "No constructor defined"
1733 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1735 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1736 def __init__(self
, this
):
1738 if not hasattr(self
,"thisown"): self
.thisown
= 0
1739 self
.__class
__ = CPPFileSystemHandler
1740 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1742 class FileSystemHandler(CPPFileSystemHandler
):
1743 """Proxy of C++ FileSystemHandler class"""
1745 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1746 def __init__(self
, *args
, **kwargs
):
1747 """__init__(self) -> FileSystemHandler"""
1748 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1749 self
.this
= newobj
.this
1752 self
._setCallbackInfo
(self
, FileSystemHandler
)
1754 def _setCallbackInfo(*args
, **kwargs
):
1755 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1756 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1758 def CanOpen(*args
, **kwargs
):
1759 """CanOpen(self, String location) -> bool"""
1760 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1762 def OpenFile(*args
, **kwargs
):
1763 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1764 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1766 def FindFirst(*args
, **kwargs
):
1767 """FindFirst(self, String spec, int flags=0) -> String"""
1768 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1770 def FindNext(*args
, **kwargs
):
1771 """FindNext(self) -> String"""
1772 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1774 def GetProtocol(*args
, **kwargs
):
1775 """GetProtocol(self, String location) -> String"""
1776 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1778 def GetLeftLocation(*args
, **kwargs
):
1779 """GetLeftLocation(self, String location) -> String"""
1780 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1782 def GetAnchor(*args
, **kwargs
):
1783 """GetAnchor(self, String location) -> String"""
1784 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1786 def GetRightLocation(*args
, **kwargs
):
1787 """GetRightLocation(self, String location) -> String"""
1788 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1790 def GetMimeTypeFromExt(*args
, **kwargs
):
1791 """GetMimeTypeFromExt(self, String location) -> String"""
1792 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1795 class FileSystemHandlerPtr(FileSystemHandler
):
1796 def __init__(self
, this
):
1798 if not hasattr(self
,"thisown"): self
.thisown
= 0
1799 self
.__class
__ = FileSystemHandler
1800 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1802 class FileSystem(Object
):
1803 """Proxy of C++ FileSystem class"""
1805 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1806 def __init__(self
, *args
, **kwargs
):
1807 """__init__(self) -> FileSystem"""
1808 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1809 self
.this
= newobj
.this
1812 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1815 if self
.thisown
: destroy(self
)
1818 def ChangePathTo(*args
, **kwargs
):
1819 """ChangePathTo(self, String location, bool is_dir=False)"""
1820 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1822 def GetPath(*args
, **kwargs
):
1823 """GetPath(self) -> String"""
1824 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1826 def OpenFile(*args
, **kwargs
):
1827 """OpenFile(self, String location) -> FSFile"""
1828 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1830 def FindFirst(*args
, **kwargs
):
1831 """FindFirst(self, String spec, int flags=0) -> String"""
1832 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1834 def FindNext(*args
, **kwargs
):
1835 """FindNext(self) -> String"""
1836 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1838 def AddHandler(*args
, **kwargs
):
1839 """AddHandler(CPPFileSystemHandler handler)"""
1840 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1842 AddHandler
= staticmethod(AddHandler
)
1843 def CleanUpHandlers(*args
, **kwargs
):
1844 """CleanUpHandlers()"""
1845 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1847 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1848 def FileNameToURL(*args
, **kwargs
):
1849 """FileNameToURL(String filename) -> String"""
1850 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1852 FileNameToURL
= staticmethod(FileNameToURL
)
1853 def URLToFileName(*args
, **kwargs
):
1854 """URLToFileName(String url) -> String"""
1855 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1857 URLToFileName
= staticmethod(URLToFileName
)
1859 class FileSystemPtr(FileSystem
):
1860 def __init__(self
, this
):
1862 if not hasattr(self
,"thisown"): self
.thisown
= 0
1863 self
.__class
__ = FileSystem
1864 _core_
.FileSystem_swigregister(FileSystemPtr
)
1866 def FileSystem_AddHandler(*args
, **kwargs
):
1867 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1868 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1870 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1871 """FileSystem_CleanUpHandlers()"""
1872 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1874 def FileSystem_FileNameToURL(*args
, **kwargs
):
1875 """FileSystem_FileNameToURL(String filename) -> String"""
1876 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1878 def FileSystem_URLToFileName(*args
, **kwargs
):
1879 """FileSystem_URLToFileName(String url) -> String"""
1880 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1882 class InternetFSHandler(CPPFileSystemHandler
):
1883 """Proxy of C++ InternetFSHandler class"""
1885 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1886 def __init__(self
, *args
, **kwargs
):
1887 """__init__(self) -> InternetFSHandler"""
1888 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1889 self
.this
= newobj
.this
1892 def CanOpen(*args
, **kwargs
):
1893 """CanOpen(self, String location) -> bool"""
1894 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1896 def OpenFile(*args
, **kwargs
):
1897 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1898 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1901 class InternetFSHandlerPtr(InternetFSHandler
):
1902 def __init__(self
, this
):
1904 if not hasattr(self
,"thisown"): self
.thisown
= 0
1905 self
.__class
__ = InternetFSHandler
1906 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1908 class ZipFSHandler(CPPFileSystemHandler
):
1909 """Proxy of C++ ZipFSHandler class"""
1911 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1912 def __init__(self
, *args
, **kwargs
):
1913 """__init__(self) -> ZipFSHandler"""
1914 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1915 self
.this
= newobj
.this
1918 def CanOpen(*args
, **kwargs
):
1919 """CanOpen(self, String location) -> bool"""
1920 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1922 def OpenFile(*args
, **kwargs
):
1923 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1924 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1926 def FindFirst(*args
, **kwargs
):
1927 """FindFirst(self, String spec, int flags=0) -> String"""
1928 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1930 def FindNext(*args
, **kwargs
):
1931 """FindNext(self) -> String"""
1932 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1935 class ZipFSHandlerPtr(ZipFSHandler
):
1936 def __init__(self
, this
):
1938 if not hasattr(self
,"thisown"): self
.thisown
= 0
1939 self
.__class
__ = ZipFSHandler
1940 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1943 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1944 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1945 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1947 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1948 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1949 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1951 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1952 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1953 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1954 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1956 Add 'file' to the memory filesystem. The dataItem parameter can
1957 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1958 arbitrary data. If a bitmap or image is used then the imgType
1959 parameter should specify what kind of image file it should be
1960 written as, wx.BITMAP_TYPE_PNG, etc.
1962 if isinstance(dataItem
, wx
.Image
):
1963 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1964 elif isinstance(dataItem
, wx
.Bitmap
):
1965 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1966 elif type(dataItem
) == str:
1967 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1969 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1971 class MemoryFSHandler(CPPFileSystemHandler
):
1972 """Proxy of C++ MemoryFSHandler class"""
1974 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1975 def __init__(self
, *args
, **kwargs
):
1976 """__init__(self) -> MemoryFSHandler"""
1977 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
1978 self
.this
= newobj
.this
1981 def RemoveFile(*args
, **kwargs
):
1982 """RemoveFile(String filename)"""
1983 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1985 RemoveFile
= staticmethod(RemoveFile
)
1986 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1987 def CanOpen(*args
, **kwargs
):
1988 """CanOpen(self, String location) -> bool"""
1989 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1991 def OpenFile(*args
, **kwargs
):
1992 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1993 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
1995 def FindFirst(*args
, **kwargs
):
1996 """FindFirst(self, String spec, int flags=0) -> String"""
1997 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
1999 def FindNext(*args
, **kwargs
):
2000 """FindNext(self) -> String"""
2001 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
2004 class MemoryFSHandlerPtr(MemoryFSHandler
):
2005 def __init__(self
, this
):
2007 if not hasattr(self
,"thisown"): self
.thisown
= 0
2008 self
.__class
__ = MemoryFSHandler
2009 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
2011 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
2012 """MemoryFSHandler_RemoveFile(String filename)"""
2013 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
2015 #---------------------------------------------------------------------------
2017 class ImageHandler(Object
):
2018 """Proxy of C++ ImageHandler class"""
2019 def __init__(self
): raise RuntimeError, "No constructor defined"
2021 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2022 def GetName(*args
, **kwargs
):
2023 """GetName(self) -> String"""
2024 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
2026 def GetExtension(*args
, **kwargs
):
2027 """GetExtension(self) -> String"""
2028 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
2030 def GetType(*args
, **kwargs
):
2031 """GetType(self) -> long"""
2032 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
2034 def GetMimeType(*args
, **kwargs
):
2035 """GetMimeType(self) -> String"""
2036 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
2038 def CanRead(*args
, **kwargs
):
2039 """CanRead(self, String name) -> bool"""
2040 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
2042 def SetName(*args
, **kwargs
):
2043 """SetName(self, String name)"""
2044 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
2046 def SetExtension(*args
, **kwargs
):
2047 """SetExtension(self, String extension)"""
2048 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
2050 def SetType(*args
, **kwargs
):
2051 """SetType(self, long type)"""
2052 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
2054 def SetMimeType(*args
, **kwargs
):
2055 """SetMimeType(self, String mimetype)"""
2056 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
2059 class ImageHandlerPtr(ImageHandler
):
2060 def __init__(self
, this
):
2062 if not hasattr(self
,"thisown"): self
.thisown
= 0
2063 self
.__class
__ = ImageHandler
2064 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
2066 class ImageHistogram(object):
2067 """Proxy of C++ ImageHistogram class"""
2069 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2070 def __init__(self
, *args
, **kwargs
):
2071 """__init__(self) -> ImageHistogram"""
2072 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
2073 self
.this
= newobj
.this
2076 def MakeKey(*args
, **kwargs
):
2078 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2080 Get the key in the histogram for the given RGB values
2082 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2084 MakeKey
= staticmethod(MakeKey
)
2085 def FindFirstUnusedColour(*args
, **kwargs
):
2087 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2089 Find first colour that is not used in the image and has higher RGB
2090 values than startR, startG, startB. Returns a tuple consisting of a
2091 success flag and rgb values.
2093 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2096 class ImageHistogramPtr(ImageHistogram
):
2097 def __init__(self
, this
):
2099 if not hasattr(self
,"thisown"): self
.thisown
= 0
2100 self
.__class
__ = ImageHistogram
2101 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2103 def ImageHistogram_MakeKey(*args
, **kwargs
):
2105 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2107 Get the key in the histogram for the given RGB values
2109 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2111 class Image(Object
):
2112 """Proxy of C++ Image class"""
2114 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2115 def __init__(self
, *args
, **kwargs
):
2116 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2117 newobj
= _core_
.new_Image(*args
, **kwargs
)
2118 self
.this
= newobj
.this
2121 def __del__(self
, destroy
=_core_
.delete_Image
):
2124 if self
.thisown
: destroy(self
)
2127 def Create(*args
, **kwargs
):
2128 """Create(self, int width, int height)"""
2129 return _core_
.Image_Create(*args
, **kwargs
)
2131 def Destroy(*args
, **kwargs
):
2135 Deletes the C++ object this Python object is a proxy for.
2137 return _core_
.Image_Destroy(*args
, **kwargs
)
2139 def Scale(*args
, **kwargs
):
2140 """Scale(self, int width, int height) -> Image"""
2141 return _core_
.Image_Scale(*args
, **kwargs
)
2143 def ShrinkBy(*args
, **kwargs
):
2144 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2145 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2147 def Rescale(*args
, **kwargs
):
2148 """Rescale(self, int width, int height) -> Image"""
2149 return _core_
.Image_Rescale(*args
, **kwargs
)
2151 def Resize(*args
, **kwargs
):
2152 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2153 return _core_
.Image_Resize(*args
, **kwargs
)
2155 def SetRGB(*args
, **kwargs
):
2156 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2157 return _core_
.Image_SetRGB(*args
, **kwargs
)
2159 def SetRGBRect(*args
, **kwargs
):
2160 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2161 return _core_
.Image_SetRGBRect(*args
, **kwargs
)
2163 def GetRed(*args
, **kwargs
):
2164 """GetRed(self, int x, int y) -> unsigned char"""
2165 return _core_
.Image_GetRed(*args
, **kwargs
)
2167 def GetGreen(*args
, **kwargs
):
2168 """GetGreen(self, int x, int y) -> unsigned char"""
2169 return _core_
.Image_GetGreen(*args
, **kwargs
)
2171 def GetBlue(*args
, **kwargs
):
2172 """GetBlue(self, int x, int y) -> unsigned char"""
2173 return _core_
.Image_GetBlue(*args
, **kwargs
)
2175 def SetAlpha(*args
, **kwargs
):
2176 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2177 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2179 def GetAlpha(*args
, **kwargs
):
2180 """GetAlpha(self, int x, int y) -> unsigned char"""
2181 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2183 def HasAlpha(*args
, **kwargs
):
2184 """HasAlpha(self) -> bool"""
2185 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2187 def InitAlpha(*args
, **kwargs
):
2191 Initializes the image alpha channel data. It is an error to call it if
2192 the image already has alpha data. If it doesn't, alpha data will be by
2193 default initialized to all pixels being fully opaque. But if the image
2194 has a a mask colour, all mask pixels will be completely transparent.
2196 return _core_
.Image_InitAlpha(*args
, **kwargs
)
2198 def FindFirstUnusedColour(*args
, **kwargs
):
2200 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2202 Find first colour that is not used in the image and has higher RGB
2203 values than startR, startG, startB. Returns a tuple consisting of a
2204 success flag and rgb values.
2206 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2208 def ConvertAlphaToMask(*args
, **kwargs
):
2210 ConvertAlphaToMask(self, byte threshold=128) -> bool
2212 If the image has alpha channel, this method converts it to mask. All pixels
2213 with alpha value less than ``threshold`` are replaced with mask colour and the
2214 alpha channel is removed. Mask colour is chosen automatically using
2215 `FindFirstUnusedColour`.
2217 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2220 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2222 def ConvertColourToAlpha(*args
, **kwargs
):
2224 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2226 This method converts an image where the original alpha information is
2227 only available as a shades of a colour (actually shades of grey)
2228 typically when you draw anti-aliased text into a bitmap. The DC
2229 drawing routines draw grey values on the black background although
2230 they actually mean to draw white with differnt alpha values. This
2231 method reverses it, assuming a black (!) background and white text.
2232 The method will then fill up the whole image with the colour given.
2234 return _core_
.Image_ConvertColourToAlpha(*args
, **kwargs
)
2236 def SetMaskFromImage(*args
, **kwargs
):
2237 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2238 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2240 def CanRead(*args
, **kwargs
):
2241 """CanRead(String name) -> bool"""
2242 return _core_
.Image_CanRead(*args
, **kwargs
)
2244 CanRead
= staticmethod(CanRead
)
2245 def GetImageCount(*args
, **kwargs
):
2246 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2247 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2249 GetImageCount
= staticmethod(GetImageCount
)
2250 def LoadFile(*args
, **kwargs
):
2251 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2252 return _core_
.Image_LoadFile(*args
, **kwargs
)
2254 def LoadMimeFile(*args
, **kwargs
):
2255 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2256 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2258 def SaveFile(*args
, **kwargs
):
2259 """SaveFile(self, String name, int type) -> bool"""
2260 return _core_
.Image_SaveFile(*args
, **kwargs
)
2262 def SaveMimeFile(*args
, **kwargs
):
2263 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2264 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2266 def CanReadStream(*args
, **kwargs
):
2267 """CanReadStream(InputStream stream) -> bool"""
2268 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2270 CanReadStream
= staticmethod(CanReadStream
)
2271 def LoadStream(*args
, **kwargs
):
2272 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2273 return _core_
.Image_LoadStream(*args
, **kwargs
)
2275 def LoadMimeStream(*args
, **kwargs
):
2276 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2277 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2279 def Ok(*args
, **kwargs
):
2280 """Ok(self) -> bool"""
2281 return _core_
.Image_Ok(*args
, **kwargs
)
2283 def GetWidth(*args
, **kwargs
):
2284 """GetWidth(self) -> int"""
2285 return _core_
.Image_GetWidth(*args
, **kwargs
)
2287 def GetHeight(*args
, **kwargs
):
2288 """GetHeight(self) -> int"""
2289 return _core_
.Image_GetHeight(*args
, **kwargs
)
2291 def GetSize(*args
, **kwargs
):
2292 """GetSize(self) -> Size"""
2293 return _core_
.Image_GetSize(*args
, **kwargs
)
2295 def GetSubImage(*args
, **kwargs
):
2296 """GetSubImage(self, Rect rect) -> Image"""
2297 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2299 def Size(*args
, **kwargs
):
2300 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2301 return _core_
.Image_Size(*args
, **kwargs
)
2303 def Copy(*args
, **kwargs
):
2304 """Copy(self) -> Image"""
2305 return _core_
.Image_Copy(*args
, **kwargs
)
2307 def Paste(*args
, **kwargs
):
2308 """Paste(self, Image image, int x, int y)"""
2309 return _core_
.Image_Paste(*args
, **kwargs
)
2311 def GetData(*args
, **kwargs
):
2312 """GetData(self) -> PyObject"""
2313 return _core_
.Image_GetData(*args
, **kwargs
)
2315 def SetData(*args
, **kwargs
):
2316 """SetData(self, PyObject data)"""
2317 return _core_
.Image_SetData(*args
, **kwargs
)
2319 def GetDataBuffer(*args
, **kwargs
):
2320 """GetDataBuffer(self) -> PyObject"""
2321 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2323 def SetDataBuffer(*args
, **kwargs
):
2324 """SetDataBuffer(self, PyObject data)"""
2325 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2327 def GetAlphaData(*args
, **kwargs
):
2328 """GetAlphaData(self) -> PyObject"""
2329 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2331 def SetAlphaData(*args
, **kwargs
):
2332 """SetAlphaData(self, PyObject data)"""
2333 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2335 def GetAlphaBuffer(*args
, **kwargs
):
2336 """GetAlphaBuffer(self) -> PyObject"""
2337 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2339 def SetAlphaBuffer(*args
, **kwargs
):
2340 """SetAlphaBuffer(self, PyObject data)"""
2341 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2343 def SetMaskColour(*args
, **kwargs
):
2344 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2345 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2347 def GetOrFindMaskColour(*args
, **kwargs
):
2349 GetOrFindMaskColour() -> (r,g,b)
2351 Get the current mask colour or find a suitable colour.
2353 return _core_
.Image_GetOrFindMaskColour(*args
, **kwargs
)
2355 def GetMaskRed(*args
, **kwargs
):
2356 """GetMaskRed(self) -> unsigned char"""
2357 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2359 def GetMaskGreen(*args
, **kwargs
):
2360 """GetMaskGreen(self) -> unsigned char"""
2361 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2363 def GetMaskBlue(*args
, **kwargs
):
2364 """GetMaskBlue(self) -> unsigned char"""
2365 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2367 def SetMask(*args
, **kwargs
):
2368 """SetMask(self, bool mask=True)"""
2369 return _core_
.Image_SetMask(*args
, **kwargs
)
2371 def HasMask(*args
, **kwargs
):
2372 """HasMask(self) -> bool"""
2373 return _core_
.Image_HasMask(*args
, **kwargs
)
2375 def Rotate(*args
, **kwargs
):
2377 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2378 Point offset_after_rotation=None) -> Image
2380 return _core_
.Image_Rotate(*args
, **kwargs
)
2382 def Rotate90(*args
, **kwargs
):
2383 """Rotate90(self, bool clockwise=True) -> Image"""
2384 return _core_
.Image_Rotate90(*args
, **kwargs
)
2386 def Mirror(*args
, **kwargs
):
2387 """Mirror(self, bool horizontally=True) -> Image"""
2388 return _core_
.Image_Mirror(*args
, **kwargs
)
2390 def Replace(*args
, **kwargs
):
2392 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2393 unsigned char r2, unsigned char g2, unsigned char b2)
2395 return _core_
.Image_Replace(*args
, **kwargs
)
2397 def ConvertToMono(*args
, **kwargs
):
2398 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2399 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2401 def SetOption(*args
, **kwargs
):
2402 """SetOption(self, String name, String value)"""
2403 return _core_
.Image_SetOption(*args
, **kwargs
)
2405 def SetOptionInt(*args
, **kwargs
):
2406 """SetOptionInt(self, String name, int value)"""
2407 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2409 def GetOption(*args
, **kwargs
):
2410 """GetOption(self, String name) -> String"""
2411 return _core_
.Image_GetOption(*args
, **kwargs
)
2413 def GetOptionInt(*args
, **kwargs
):
2414 """GetOptionInt(self, String name) -> int"""
2415 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2417 def HasOption(*args
, **kwargs
):
2418 """HasOption(self, String name) -> bool"""
2419 return _core_
.Image_HasOption(*args
, **kwargs
)
2421 def CountColours(*args
, **kwargs
):
2422 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2423 return _core_
.Image_CountColours(*args
, **kwargs
)
2425 def ComputeHistogram(*args
, **kwargs
):
2426 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2427 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2429 def AddHandler(*args
, **kwargs
):
2430 """AddHandler(ImageHandler handler)"""
2431 return _core_
.Image_AddHandler(*args
, **kwargs
)
2433 AddHandler
= staticmethod(AddHandler
)
2434 def InsertHandler(*args
, **kwargs
):
2435 """InsertHandler(ImageHandler handler)"""
2436 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2438 InsertHandler
= staticmethod(InsertHandler
)
2439 def RemoveHandler(*args
, **kwargs
):
2440 """RemoveHandler(String name) -> bool"""
2441 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2443 RemoveHandler
= staticmethod(RemoveHandler
)
2444 def GetImageExtWildcard(*args
, **kwargs
):
2445 """GetImageExtWildcard() -> String"""
2446 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2448 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2449 def ConvertToBitmap(*args
, **kwargs
):
2450 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2451 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2453 def ConvertToMonoBitmap(*args
, **kwargs
):
2454 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2455 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2457 def __nonzero__(self
): return self
.Ok()
2459 class ImagePtr(Image
):
2460 def __init__(self
, this
):
2462 if not hasattr(self
,"thisown"): self
.thisown
= 0
2463 self
.__class
__ = Image
2464 _core_
.Image_swigregister(ImagePtr
)
2466 def ImageFromMime(*args
, **kwargs
):
2467 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2468 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2472 def ImageFromStream(*args
, **kwargs
):
2473 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2474 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2478 def ImageFromStreamMime(*args
, **kwargs
):
2479 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2480 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2484 def EmptyImage(*args
, **kwargs
):
2485 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2486 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2490 def ImageFromBitmap(*args
, **kwargs
):
2491 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2492 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2496 def ImageFromData(*args
, **kwargs
):
2497 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2498 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2502 def ImageFromDataWithAlpha(*args
, **kwargs
):
2503 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2504 val
= _core_
.new_ImageFromDataWithAlpha(*args
, **kwargs
)
2508 def Image_CanRead(*args
, **kwargs
):
2509 """Image_CanRead(String name) -> bool"""
2510 return _core_
.Image_CanRead(*args
, **kwargs
)
2512 def Image_GetImageCount(*args
, **kwargs
):
2513 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2514 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2516 def Image_CanReadStream(*args
, **kwargs
):
2517 """Image_CanReadStream(InputStream stream) -> bool"""
2518 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2520 def Image_AddHandler(*args
, **kwargs
):
2521 """Image_AddHandler(ImageHandler handler)"""
2522 return _core_
.Image_AddHandler(*args
, **kwargs
)
2524 def Image_InsertHandler(*args
, **kwargs
):
2525 """Image_InsertHandler(ImageHandler handler)"""
2526 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2528 def Image_RemoveHandler(*args
, **kwargs
):
2529 """Image_RemoveHandler(String name) -> bool"""
2530 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2532 def Image_GetImageExtWildcard(*args
, **kwargs
):
2533 """Image_GetImageExtWildcard() -> String"""
2534 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2536 def InitAllImageHandlers():
2538 The former functionality of InitAllImageHanders is now done internal to
2539 the _core_ extension module and so this function has become a simple NOP.
2543 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2544 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2545 PNG_TYPE_COLOUR
= _core_
.PNG_TYPE_COLOUR
2546 PNG_TYPE_GREY
= _core_
.PNG_TYPE_GREY
2547 PNG_TYPE_GREY_RED
= _core_
.PNG_TYPE_GREY_RED
2548 BMP_24BPP
= _core_
.BMP_24BPP
2549 BMP_8BPP
= _core_
.BMP_8BPP
2550 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2551 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2552 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2553 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2554 BMP_4BPP
= _core_
.BMP_4BPP
2555 BMP_1BPP
= _core_
.BMP_1BPP
2556 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2557 class BMPHandler(ImageHandler
):
2558 """Proxy of C++ BMPHandler class"""
2560 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2561 def __init__(self
, *args
, **kwargs
):
2562 """__init__(self) -> BMPHandler"""
2563 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2564 self
.this
= newobj
.this
2568 class BMPHandlerPtr(BMPHandler
):
2569 def __init__(self
, this
):
2571 if not hasattr(self
,"thisown"): self
.thisown
= 0
2572 self
.__class
__ = BMPHandler
2573 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2574 NullImage
= cvar
.NullImage
2575 IMAGE_OPTION_FILENAME
= cvar
.IMAGE_OPTION_FILENAME
2576 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2577 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2578 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2579 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2580 IMAGE_OPTION_RESOLUTIONX
= cvar
.IMAGE_OPTION_RESOLUTIONX
2581 IMAGE_OPTION_RESOLUTIONY
= cvar
.IMAGE_OPTION_RESOLUTIONY
2582 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2583 IMAGE_OPTION_QUALITY
= cvar
.IMAGE_OPTION_QUALITY
2584 IMAGE_OPTION_BITSPERSAMPLE
= cvar
.IMAGE_OPTION_BITSPERSAMPLE
2585 IMAGE_OPTION_SAMPLESPERPIXEL
= cvar
.IMAGE_OPTION_SAMPLESPERPIXEL
2586 IMAGE_OPTION_COMPRESSION
= cvar
.IMAGE_OPTION_COMPRESSION
2587 IMAGE_OPTION_IMAGEDESCRIPTOR
= cvar
.IMAGE_OPTION_IMAGEDESCRIPTOR
2588 IMAGE_OPTION_PNG_FORMAT
= cvar
.IMAGE_OPTION_PNG_FORMAT
2589 IMAGE_OPTION_PNG_BITDEPTH
= cvar
.IMAGE_OPTION_PNG_BITDEPTH
2591 class ICOHandler(BMPHandler
):
2592 """Proxy of C++ ICOHandler class"""
2594 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2595 def __init__(self
, *args
, **kwargs
):
2596 """__init__(self) -> ICOHandler"""
2597 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2598 self
.this
= newobj
.this
2602 class ICOHandlerPtr(ICOHandler
):
2603 def __init__(self
, this
):
2605 if not hasattr(self
,"thisown"): self
.thisown
= 0
2606 self
.__class
__ = ICOHandler
2607 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2609 class CURHandler(ICOHandler
):
2610 """Proxy of C++ CURHandler class"""
2612 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2613 def __init__(self
, *args
, **kwargs
):
2614 """__init__(self) -> CURHandler"""
2615 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2616 self
.this
= newobj
.this
2620 class CURHandlerPtr(CURHandler
):
2621 def __init__(self
, this
):
2623 if not hasattr(self
,"thisown"): self
.thisown
= 0
2624 self
.__class
__ = CURHandler
2625 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2627 class ANIHandler(CURHandler
):
2628 """Proxy of C++ ANIHandler class"""
2630 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2631 def __init__(self
, *args
, **kwargs
):
2632 """__init__(self) -> ANIHandler"""
2633 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2634 self
.this
= newobj
.this
2638 class ANIHandlerPtr(ANIHandler
):
2639 def __init__(self
, this
):
2641 if not hasattr(self
,"thisown"): self
.thisown
= 0
2642 self
.__class
__ = ANIHandler
2643 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2645 class PNGHandler(ImageHandler
):
2646 """Proxy of C++ PNGHandler class"""
2648 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2649 def __init__(self
, *args
, **kwargs
):
2650 """__init__(self) -> PNGHandler"""
2651 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2652 self
.this
= newobj
.this
2656 class PNGHandlerPtr(PNGHandler
):
2657 def __init__(self
, this
):
2659 if not hasattr(self
,"thisown"): self
.thisown
= 0
2660 self
.__class
__ = PNGHandler
2661 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2663 class GIFHandler(ImageHandler
):
2664 """Proxy of C++ GIFHandler class"""
2666 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2667 def __init__(self
, *args
, **kwargs
):
2668 """__init__(self) -> GIFHandler"""
2669 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2670 self
.this
= newobj
.this
2674 class GIFHandlerPtr(GIFHandler
):
2675 def __init__(self
, this
):
2677 if not hasattr(self
,"thisown"): self
.thisown
= 0
2678 self
.__class
__ = GIFHandler
2679 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2681 class PCXHandler(ImageHandler
):
2682 """Proxy of C++ PCXHandler class"""
2684 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2685 def __init__(self
, *args
, **kwargs
):
2686 """__init__(self) -> PCXHandler"""
2687 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2688 self
.this
= newobj
.this
2692 class PCXHandlerPtr(PCXHandler
):
2693 def __init__(self
, this
):
2695 if not hasattr(self
,"thisown"): self
.thisown
= 0
2696 self
.__class
__ = PCXHandler
2697 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2699 class JPEGHandler(ImageHandler
):
2700 """Proxy of C++ JPEGHandler class"""
2702 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2703 def __init__(self
, *args
, **kwargs
):
2704 """__init__(self) -> JPEGHandler"""
2705 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2706 self
.this
= newobj
.this
2710 class JPEGHandlerPtr(JPEGHandler
):
2711 def __init__(self
, this
):
2713 if not hasattr(self
,"thisown"): self
.thisown
= 0
2714 self
.__class
__ = JPEGHandler
2715 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2717 class PNMHandler(ImageHandler
):
2718 """Proxy of C++ PNMHandler class"""
2720 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2721 def __init__(self
, *args
, **kwargs
):
2722 """__init__(self) -> PNMHandler"""
2723 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2724 self
.this
= newobj
.this
2728 class PNMHandlerPtr(PNMHandler
):
2729 def __init__(self
, this
):
2731 if not hasattr(self
,"thisown"): self
.thisown
= 0
2732 self
.__class
__ = PNMHandler
2733 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2735 class XPMHandler(ImageHandler
):
2736 """Proxy of C++ XPMHandler class"""
2738 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2739 def __init__(self
, *args
, **kwargs
):
2740 """__init__(self) -> XPMHandler"""
2741 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2742 self
.this
= newobj
.this
2746 class XPMHandlerPtr(XPMHandler
):
2747 def __init__(self
, this
):
2749 if not hasattr(self
,"thisown"): self
.thisown
= 0
2750 self
.__class
__ = XPMHandler
2751 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2753 class TIFFHandler(ImageHandler
):
2754 """Proxy of C++ TIFFHandler class"""
2756 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2757 def __init__(self
, *args
, **kwargs
):
2758 """__init__(self) -> TIFFHandler"""
2759 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2760 self
.this
= newobj
.this
2764 class TIFFHandlerPtr(TIFFHandler
):
2765 def __init__(self
, this
):
2767 if not hasattr(self
,"thisown"): self
.thisown
= 0
2768 self
.__class
__ = TIFFHandler
2769 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2771 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2772 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2773 class Quantize(object):
2774 """Performs quantization, or colour reduction, on a wxImage."""
2775 def __init__(self
): raise RuntimeError, "No constructor defined"
2777 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2778 def Quantize(*args
, **kwargs
):
2780 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2782 Reduce the colours in the source image and put the result into the
2783 destination image, setting the palette in the destination if
2784 needed. Both images may be the same, to overwrite the source image.
2786 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2788 Quantize
= staticmethod(Quantize
)
2790 class QuantizePtr(Quantize
):
2791 def __init__(self
, this
):
2793 if not hasattr(self
,"thisown"): self
.thisown
= 0
2794 self
.__class
__ = Quantize
2795 _core_
.Quantize_swigregister(QuantizePtr
)
2797 def Quantize_Quantize(*args
, **kwargs
):
2799 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2801 Reduce the colours in the source image and put the result into the
2802 destination image, setting the palette in the destination if
2803 needed. Both images may be the same, to overwrite the source image.
2805 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2807 #---------------------------------------------------------------------------
2809 class EvtHandler(Object
):
2810 """Proxy of C++ EvtHandler class"""
2812 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2813 def __init__(self
, *args
, **kwargs
):
2814 """__init__(self) -> EvtHandler"""
2815 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2816 self
.this
= newobj
.this
2819 def GetNextHandler(*args
, **kwargs
):
2820 """GetNextHandler(self) -> EvtHandler"""
2821 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2823 def GetPreviousHandler(*args
, **kwargs
):
2824 """GetPreviousHandler(self) -> EvtHandler"""
2825 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2827 def SetNextHandler(*args
, **kwargs
):
2828 """SetNextHandler(self, EvtHandler handler)"""
2829 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2831 def SetPreviousHandler(*args
, **kwargs
):
2832 """SetPreviousHandler(self, EvtHandler handler)"""
2833 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2835 def GetEvtHandlerEnabled(*args
, **kwargs
):
2836 """GetEvtHandlerEnabled(self) -> bool"""
2837 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2839 def SetEvtHandlerEnabled(*args
, **kwargs
):
2840 """SetEvtHandlerEnabled(self, bool enabled)"""
2841 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2843 def ProcessEvent(*args
, **kwargs
):
2844 """ProcessEvent(self, Event event) -> bool"""
2845 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2847 def AddPendingEvent(*args
, **kwargs
):
2848 """AddPendingEvent(self, Event event)"""
2849 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2851 def ProcessPendingEvents(*args
, **kwargs
):
2852 """ProcessPendingEvents(self)"""
2853 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2855 def Connect(*args
, **kwargs
):
2856 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2857 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
2859 def Disconnect(*args
, **kwargs
):
2860 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2861 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
2863 def _setOORInfo(*args
, **kwargs
):
2864 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2865 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
2867 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2869 Bind an event to an event handler.
2871 :param event: One of the EVT_* objects that specifies the
2872 type of event to bind,
2874 :param handler: A callable object to be invoked when the
2875 event is delivered to self. Pass None to
2876 disconnect an event handler.
2878 :param source: Sometimes the event originates from a
2879 different window than self, but you still
2880 want to catch it in self. (For example, a
2881 button event delivered to a frame.) By
2882 passing the source of the event, the event
2883 handling system is able to differentiate
2884 between the same event type from different
2887 :param id: Used to spcify the event source by ID instead
2890 :param id2: Used when it is desirable to bind a handler
2891 to a range of IDs, such as with EVT_MENU_RANGE.
2893 if source
is not None:
2895 event
.Bind(self
, id, id2
, handler
)
2897 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2899 Disconencts the event handler binding for event from self.
2900 Returns True if successful.
2902 if source
is not None:
2904 return event
.Unbind(self
, id, id2
)
2907 class EvtHandlerPtr(EvtHandler
):
2908 def __init__(self
, this
):
2910 if not hasattr(self
,"thisown"): self
.thisown
= 0
2911 self
.__class
__ = EvtHandler
2912 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
2914 #---------------------------------------------------------------------------
2916 class PyEventBinder(object):
2918 Instances of this class are used to bind specific events to event
2921 def __init__(self
, evtType
, expectedIDs
=0):
2922 if expectedIDs
not in [0, 1, 2]:
2923 raise ValueError, "Invalid number of expectedIDs"
2924 self
.expectedIDs
= expectedIDs
2926 if type(evtType
) == list or type(evtType
) == tuple:
2927 self
.evtType
= evtType
2929 self
.evtType
= [evtType
]
2932 def Bind(self
, target
, id1
, id2
, function
):
2933 """Bind this set of event types to target."""
2934 for et
in self
.evtType
:
2935 target
.Connect(id1
, id2
, et
, function
)
2938 def Unbind(self
, target
, id1
, id2
):
2939 """Remove an event binding."""
2941 for et
in self
.evtType
:
2942 success
+= target
.Disconnect(id1
, id2
, et
)
2946 def __call__(self
, *args
):
2948 For backwards compatibility with the old EVT_* functions.
2949 Should be called with either (window, func), (window, ID,
2950 func) or (window, ID1, ID2, func) parameters depending on the
2953 assert len(args
) == 2 + self
.expectedIDs
2957 if self
.expectedIDs
== 0:
2959 elif self
.expectedIDs
== 1:
2962 elif self
.expectedIDs
== 2:
2967 raise ValueError, "Unexpected number of IDs"
2969 self
.Bind(target
, id1
, id2
, func
)
2972 # These two are square pegs that don't fit the PyEventBinder hole...
2973 def EVT_COMMAND(win
, id, cmd
, func
):
2974 win
.Connect(id, -1, cmd
, func
)
2975 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2976 win
.Connect(id1
, id2
, cmd
, func
)
2979 #---------------------------------------------------------------------------
2981 #---------------------------------------------------------------------------
2983 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
2984 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
2986 def NewEventType(*args
, **kwargs
):
2987 """NewEventType() -> wxEventType"""
2988 return _core_
.NewEventType(*args
, **kwargs
)
2989 wxEVT_NULL
= _core_
.wxEVT_NULL
2990 wxEVT_FIRST
= _core_
.wxEVT_FIRST
2991 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
2992 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
2993 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
2994 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
2995 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
2996 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2997 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2998 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
2999 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
3000 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
3001 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
3002 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3003 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
3004 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
3005 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
3006 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
3007 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
3008 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
3009 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
3010 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
3011 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
3012 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
3013 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
3014 wxEVT_MOTION
= _core_
.wxEVT_MOTION
3015 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
3016 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
3017 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
3018 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
3019 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
3020 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
3021 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
3022 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
3023 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
3024 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
3025 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
3026 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
3027 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
3028 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
3029 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
3030 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
3031 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
3032 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
3033 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
3034 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
3035 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
3036 wxEVT_CHAR
= _core_
.wxEVT_CHAR
3037 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
3038 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
3039 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
3040 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
3041 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
3042 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
3043 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
3044 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
3045 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
3046 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
3047 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
3048 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
3049 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
3050 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
3051 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
3052 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
3053 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
3054 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
3055 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
3056 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
3057 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
3058 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
3059 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
3060 wxEVT_SIZE
= _core_
.wxEVT_SIZE
3061 wxEVT_MOVE
= _core_
.wxEVT_MOVE
3062 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
3063 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
3064 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
3065 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
3066 wxEVT_POWER
= _core_
.wxEVT_POWER
3067 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
3068 wxEVT_CREATE
= _core_
.wxEVT_CREATE
3069 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
3070 wxEVT_SHOW
= _core_
.wxEVT_SHOW
3071 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
3072 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
3073 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
3074 wxEVT_PAINT
= _core_
.wxEVT_PAINT
3075 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
3076 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
3077 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
3078 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
3079 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
3080 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
3081 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
3082 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
3083 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
3084 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
3085 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
3086 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
3087 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
3088 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
3089 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
3090 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
3091 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
3092 wxEVT_IDLE
= _core_
.wxEVT_IDLE
3093 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
3094 wxEVT_SIZING
= _core_
.wxEVT_SIZING
3095 wxEVT_MOVING
= _core_
.wxEVT_MOVING
3096 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
3097 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
3098 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
3099 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
3100 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
3101 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
3102 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
3104 # Create some event binders
3105 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
3106 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
3107 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
3108 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
3109 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
3110 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3111 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3112 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
3113 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
3114 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
3115 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
3116 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
3117 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
3118 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
3119 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
3120 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
3121 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
3122 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
3123 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
3124 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
3125 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
3126 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
3127 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
3128 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
3129 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3130 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3131 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
3132 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
3133 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
3134 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
3135 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
3136 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
3137 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
3138 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
3139 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
3140 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
3141 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
3142 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
3143 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
3144 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
3146 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
3147 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
3148 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
3149 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
3150 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
3151 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
3152 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
3153 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
3154 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
3155 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
3156 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
3157 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
3158 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
3160 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3168 wxEVT_MIDDLE_DCLICK
,
3176 # Scrolling from wxWindow (sent to wxScrolledWindow)
3177 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3178 wxEVT_SCROLLWIN_BOTTOM
,
3179 wxEVT_SCROLLWIN_LINEUP
,
3180 wxEVT_SCROLLWIN_LINEDOWN
,
3181 wxEVT_SCROLLWIN_PAGEUP
,
3182 wxEVT_SCROLLWIN_PAGEDOWN
,
3183 wxEVT_SCROLLWIN_THUMBTRACK
,
3184 wxEVT_SCROLLWIN_THUMBRELEASE
,
3187 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3188 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3189 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3190 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3191 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3192 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3193 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3194 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3196 # Scrolling from wxSlider and wxScrollBar
3197 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3198 wxEVT_SCROLL_BOTTOM
,
3199 wxEVT_SCROLL_LINEUP
,
3200 wxEVT_SCROLL_LINEDOWN
,
3201 wxEVT_SCROLL_PAGEUP
,
3202 wxEVT_SCROLL_PAGEDOWN
,
3203 wxEVT_SCROLL_THUMBTRACK
,
3204 wxEVT_SCROLL_THUMBRELEASE
,
3205 wxEVT_SCROLL_ENDSCROLL
,
3208 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3209 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3210 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3211 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3212 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3213 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3214 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3215 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3216 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3218 # Scrolling from wxSlider and wxScrollBar, with an id
3219 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3220 wxEVT_SCROLL_BOTTOM
,
3221 wxEVT_SCROLL_LINEUP
,
3222 wxEVT_SCROLL_LINEDOWN
,
3223 wxEVT_SCROLL_PAGEUP
,
3224 wxEVT_SCROLL_PAGEDOWN
,
3225 wxEVT_SCROLL_THUMBTRACK
,
3226 wxEVT_SCROLL_THUMBRELEASE
,
3227 wxEVT_SCROLL_ENDSCROLL
,
3230 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3231 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3232 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3233 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3234 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3235 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3236 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3237 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3238 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3240 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3241 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3242 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3243 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3244 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3245 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3246 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3247 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3248 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3249 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3251 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3252 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3253 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3254 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3255 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3256 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3257 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3258 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3259 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3262 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3263 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3264 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3265 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3266 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3267 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3268 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3270 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3272 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3273 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3275 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3279 #---------------------------------------------------------------------------
3281 class Event(Object
):
3282 """Proxy of C++ Event class"""
3283 def __init__(self
): raise RuntimeError, "No constructor defined"
3285 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3286 def __del__(self
, destroy
=_core_
.delete_Event
):
3289 if self
.thisown
: destroy(self
)
3292 def SetEventType(*args
, **kwargs
):
3293 """SetEventType(self, wxEventType typ)"""
3294 return _core_
.Event_SetEventType(*args
, **kwargs
)
3296 def GetEventType(*args
, **kwargs
):
3297 """GetEventType(self) -> wxEventType"""
3298 return _core_
.Event_GetEventType(*args
, **kwargs
)
3300 def GetEventObject(*args
, **kwargs
):
3301 """GetEventObject(self) -> Object"""
3302 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3304 def SetEventObject(*args
, **kwargs
):
3305 """SetEventObject(self, Object obj)"""
3306 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3308 def GetTimestamp(*args
, **kwargs
):
3309 """GetTimestamp(self) -> long"""
3310 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3312 def SetTimestamp(*args
, **kwargs
):
3313 """SetTimestamp(self, long ts=0)"""
3314 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3316 def GetId(*args
, **kwargs
):
3317 """GetId(self) -> int"""
3318 return _core_
.Event_GetId(*args
, **kwargs
)
3320 def SetId(*args
, **kwargs
):
3321 """SetId(self, int Id)"""
3322 return _core_
.Event_SetId(*args
, **kwargs
)
3324 def IsCommandEvent(*args
, **kwargs
):
3325 """IsCommandEvent(self) -> bool"""
3326 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3328 def Skip(*args
, **kwargs
):
3330 Skip(self, bool skip=True)
3332 Called by an event handler, it controls whether additional event
3333 handlers bound to this event will be called after the current event
3334 handler returns. Skip(false) (the default setting) will prevent
3335 additional event handlers from being called and control will be
3336 returned to the sender of the event immediately after the current
3337 handler has finished. Skip(True) will cause the event processing
3338 system to continue searching for a handler function for this event.
3341 return _core_
.Event_Skip(*args
, **kwargs
)
3343 def GetSkipped(*args
, **kwargs
):
3344 """GetSkipped(self) -> bool"""
3345 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3347 def ShouldPropagate(*args
, **kwargs
):
3348 """ShouldPropagate(self) -> bool"""
3349 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3351 def StopPropagation(*args
, **kwargs
):
3352 """StopPropagation(self) -> int"""
3353 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3355 def ResumePropagation(*args
, **kwargs
):
3356 """ResumePropagation(self, int propagationLevel)"""
3357 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3359 def Clone(*args
, **kwargs
):
3360 """Clone(self) -> Event"""
3361 return _core_
.Event_Clone(*args
, **kwargs
)
3364 class EventPtr(Event
):
3365 def __init__(self
, this
):
3367 if not hasattr(self
,"thisown"): self
.thisown
= 0
3368 self
.__class
__ = Event
3369 _core_
.Event_swigregister(EventPtr
)
3371 #---------------------------------------------------------------------------
3373 class PropagationDisabler(object):
3374 """Proxy of C++ PropagationDisabler class"""
3376 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3377 def __init__(self
, *args
, **kwargs
):
3378 """__init__(self, Event event) -> PropagationDisabler"""
3379 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3380 self
.this
= newobj
.this
3383 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3386 if self
.thisown
: destroy(self
)
3390 class PropagationDisablerPtr(PropagationDisabler
):
3391 def __init__(self
, this
):
3393 if not hasattr(self
,"thisown"): self
.thisown
= 0
3394 self
.__class
__ = PropagationDisabler
3395 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3397 class PropagateOnce(object):
3398 """Proxy of C++ PropagateOnce class"""
3400 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3401 def __init__(self
, *args
, **kwargs
):
3402 """__init__(self, Event event) -> PropagateOnce"""
3403 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3404 self
.this
= newobj
.this
3407 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3410 if self
.thisown
: destroy(self
)
3414 class PropagateOncePtr(PropagateOnce
):
3415 def __init__(self
, this
):
3417 if not hasattr(self
,"thisown"): self
.thisown
= 0
3418 self
.__class
__ = PropagateOnce
3419 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3421 #---------------------------------------------------------------------------
3423 class CommandEvent(Event
):
3424 """Proxy of C++ CommandEvent class"""
3426 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3427 def __init__(self
, *args
, **kwargs
):
3428 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3429 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3430 self
.this
= newobj
.this
3433 def GetSelection(*args
, **kwargs
):
3434 """GetSelection(self) -> int"""
3435 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3437 def SetString(*args
, **kwargs
):
3438 """SetString(self, String s)"""
3439 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3441 def GetString(*args
, **kwargs
):
3442 """GetString(self) -> String"""
3443 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3445 def IsChecked(*args
, **kwargs
):
3446 """IsChecked(self) -> bool"""
3447 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3450 def IsSelection(*args
, **kwargs
):
3451 """IsSelection(self) -> bool"""
3452 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3454 def SetExtraLong(*args
, **kwargs
):
3455 """SetExtraLong(self, long extraLong)"""
3456 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3458 def GetExtraLong(*args
, **kwargs
):
3459 """GetExtraLong(self) -> long"""
3460 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3462 def SetInt(*args
, **kwargs
):
3463 """SetInt(self, int i)"""
3464 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3466 def GetInt(*args
, **kwargs
):
3467 """GetInt(self) -> long"""
3468 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3470 def Clone(*args
, **kwargs
):
3471 """Clone(self) -> Event"""
3472 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3475 class CommandEventPtr(CommandEvent
):
3476 def __init__(self
, this
):
3478 if not hasattr(self
,"thisown"): self
.thisown
= 0
3479 self
.__class
__ = CommandEvent
3480 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3482 #---------------------------------------------------------------------------
3484 class NotifyEvent(CommandEvent
):
3485 """Proxy of C++ NotifyEvent class"""
3487 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3488 def __init__(self
, *args
, **kwargs
):
3489 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3490 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3491 self
.this
= newobj
.this
3494 def Veto(*args
, **kwargs
):
3496 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3498 def Allow(*args
, **kwargs
):
3500 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3502 def IsAllowed(*args
, **kwargs
):
3503 """IsAllowed(self) -> bool"""
3504 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3507 class NotifyEventPtr(NotifyEvent
):
3508 def __init__(self
, this
):
3510 if not hasattr(self
,"thisown"): self
.thisown
= 0
3511 self
.__class
__ = NotifyEvent
3512 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3514 #---------------------------------------------------------------------------
3516 class ScrollEvent(CommandEvent
):
3517 """Proxy of C++ ScrollEvent class"""
3519 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3520 def __init__(self
, *args
, **kwargs
):
3522 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3523 int orient=0) -> ScrollEvent
3525 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3526 self
.this
= newobj
.this
3529 def GetOrientation(*args
, **kwargs
):
3530 """GetOrientation(self) -> int"""
3531 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3533 def GetPosition(*args
, **kwargs
):
3534 """GetPosition(self) -> int"""
3535 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3537 def SetOrientation(*args
, **kwargs
):
3538 """SetOrientation(self, int orient)"""
3539 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3541 def SetPosition(*args
, **kwargs
):
3542 """SetPosition(self, int pos)"""
3543 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3546 class ScrollEventPtr(ScrollEvent
):
3547 def __init__(self
, this
):
3549 if not hasattr(self
,"thisown"): self
.thisown
= 0
3550 self
.__class
__ = ScrollEvent
3551 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3553 #---------------------------------------------------------------------------
3555 class ScrollWinEvent(Event
):
3556 """Proxy of C++ ScrollWinEvent class"""
3558 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3559 def __init__(self
, *args
, **kwargs
):
3560 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3561 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3562 self
.this
= newobj
.this
3565 def GetOrientation(*args
, **kwargs
):
3566 """GetOrientation(self) -> int"""
3567 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3569 def GetPosition(*args
, **kwargs
):
3570 """GetPosition(self) -> int"""
3571 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3573 def SetOrientation(*args
, **kwargs
):
3574 """SetOrientation(self, int orient)"""
3575 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3577 def SetPosition(*args
, **kwargs
):
3578 """SetPosition(self, int pos)"""
3579 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3582 class ScrollWinEventPtr(ScrollWinEvent
):
3583 def __init__(self
, this
):
3585 if not hasattr(self
,"thisown"): self
.thisown
= 0
3586 self
.__class
__ = ScrollWinEvent
3587 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3589 #---------------------------------------------------------------------------
3591 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3592 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3593 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3594 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3595 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3596 class MouseEvent(Event
):
3597 """Proxy of C++ MouseEvent class"""
3599 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3600 def __init__(self
, *args
, **kwargs
):
3601 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3602 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3603 self
.this
= newobj
.this
3606 def IsButton(*args
, **kwargs
):
3607 """IsButton(self) -> bool"""
3608 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
3610 def ButtonDown(*args
, **kwargs
):
3611 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3612 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
3614 def ButtonDClick(*args
, **kwargs
):
3615 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3616 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3618 def ButtonUp(*args
, **kwargs
):
3619 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3620 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
3622 def Button(*args
, **kwargs
):
3623 """Button(self, int but) -> bool"""
3624 return _core_
.MouseEvent_Button(*args
, **kwargs
)
3626 def ButtonIsDown(*args
, **kwargs
):
3627 """ButtonIsDown(self, int but) -> bool"""
3628 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3630 def GetButton(*args
, **kwargs
):
3631 """GetButton(self) -> int"""
3632 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
3634 def ControlDown(*args
, **kwargs
):
3635 """ControlDown(self) -> bool"""
3636 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
3638 def MetaDown(*args
, **kwargs
):
3639 """MetaDown(self) -> bool"""
3640 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
3642 def AltDown(*args
, **kwargs
):
3643 """AltDown(self) -> bool"""
3644 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
3646 def ShiftDown(*args
, **kwargs
):
3647 """ShiftDown(self) -> bool"""
3648 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
3650 def CmdDown(*args
, **kwargs
):
3652 CmdDown(self) -> bool
3654 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3655 platforms but the special "Apple" (a.k.a as "Command") key on
3656 Macs: it makes often sense to use it instead of, say, `ControlDown`
3657 because Cmd key is used for the same thing under Mac as Ctrl
3658 elsewhere. The Ctrl still exists, it's just not used for this
3659 purpose. So for non-Mac platforms this is the same as `ControlDown`
3660 and Macs this is the same as `MetaDown`.
3662 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
3664 def LeftDown(*args
, **kwargs
):
3665 """LeftDown(self) -> bool"""
3666 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
3668 def MiddleDown(*args
, **kwargs
):
3669 """MiddleDown(self) -> bool"""
3670 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
3672 def RightDown(*args
, **kwargs
):
3673 """RightDown(self) -> bool"""
3674 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
3676 def LeftUp(*args
, **kwargs
):
3677 """LeftUp(self) -> bool"""
3678 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
3680 def MiddleUp(*args
, **kwargs
):
3681 """MiddleUp(self) -> bool"""
3682 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
3684 def RightUp(*args
, **kwargs
):
3685 """RightUp(self) -> bool"""
3686 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
3688 def LeftDClick(*args
, **kwargs
):
3689 """LeftDClick(self) -> bool"""
3690 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
3692 def MiddleDClick(*args
, **kwargs
):
3693 """MiddleDClick(self) -> bool"""
3694 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3696 def RightDClick(*args
, **kwargs
):
3697 """RightDClick(self) -> bool"""
3698 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
3700 def LeftIsDown(*args
, **kwargs
):
3701 """LeftIsDown(self) -> bool"""
3702 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3704 def MiddleIsDown(*args
, **kwargs
):
3705 """MiddleIsDown(self) -> bool"""
3706 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3708 def RightIsDown(*args
, **kwargs
):
3709 """RightIsDown(self) -> bool"""
3710 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
3712 def Dragging(*args
, **kwargs
):
3713 """Dragging(self) -> bool"""
3714 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
3716 def Moving(*args
, **kwargs
):
3717 """Moving(self) -> bool"""
3718 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
3720 def Entering(*args
, **kwargs
):
3721 """Entering(self) -> bool"""
3722 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
3724 def Leaving(*args
, **kwargs
):
3725 """Leaving(self) -> bool"""
3726 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
3728 def GetPosition(*args
, **kwargs
):
3730 GetPosition(self) -> Point
3732 Returns the position of the mouse in window coordinates when the event
3735 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
3737 def GetPositionTuple(*args
, **kwargs
):
3739 GetPositionTuple() -> (x,y)
3741 Returns the position of the mouse in window coordinates when the event
3744 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3746 def GetLogicalPosition(*args
, **kwargs
):
3747 """GetLogicalPosition(self, DC dc) -> Point"""
3748 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3750 def GetX(*args
, **kwargs
):
3751 """GetX(self) -> int"""
3752 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
3754 def GetY(*args
, **kwargs
):
3755 """GetY(self) -> int"""
3756 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
3758 def GetWheelRotation(*args
, **kwargs
):
3759 """GetWheelRotation(self) -> int"""
3760 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3762 def GetWheelDelta(*args
, **kwargs
):
3763 """GetWheelDelta(self) -> int"""
3764 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3766 def GetLinesPerAction(*args
, **kwargs
):
3767 """GetLinesPerAction(self) -> int"""
3768 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3770 def IsPageScroll(*args
, **kwargs
):
3771 """IsPageScroll(self) -> bool"""
3772 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3774 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
3775 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
3776 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
3777 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
3778 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
3779 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
3780 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
3781 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
3782 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
3783 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
3784 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
3785 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
3787 class MouseEventPtr(MouseEvent
):
3788 def __init__(self
, this
):
3790 if not hasattr(self
,"thisown"): self
.thisown
= 0
3791 self
.__class
__ = MouseEvent
3792 _core_
.MouseEvent_swigregister(MouseEventPtr
)
3794 #---------------------------------------------------------------------------
3796 class SetCursorEvent(Event
):
3797 """Proxy of C++ SetCursorEvent class"""
3799 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3800 def __init__(self
, *args
, **kwargs
):
3801 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3802 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
3803 self
.this
= newobj
.this
3806 def GetX(*args
, **kwargs
):
3807 """GetX(self) -> int"""
3808 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
3810 def GetY(*args
, **kwargs
):
3811 """GetY(self) -> int"""
3812 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
3814 def SetCursor(*args
, **kwargs
):
3815 """SetCursor(self, Cursor cursor)"""
3816 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3818 def GetCursor(*args
, **kwargs
):
3819 """GetCursor(self) -> Cursor"""
3820 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3822 def HasCursor(*args
, **kwargs
):
3823 """HasCursor(self) -> bool"""
3824 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3827 class SetCursorEventPtr(SetCursorEvent
):
3828 def __init__(self
, this
):
3830 if not hasattr(self
,"thisown"): self
.thisown
= 0
3831 self
.__class
__ = SetCursorEvent
3832 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3834 #---------------------------------------------------------------------------
3836 class KeyEvent(Event
):
3837 """Proxy of C++ KeyEvent class"""
3839 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3840 def __init__(self
, *args
, **kwargs
):
3841 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3842 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
3843 self
.this
= newobj
.this
3846 def ControlDown(*args
, **kwargs
):
3847 """ControlDown(self) -> bool"""
3848 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
3850 def MetaDown(*args
, **kwargs
):
3851 """MetaDown(self) -> bool"""
3852 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
3854 def AltDown(*args
, **kwargs
):
3855 """AltDown(self) -> bool"""
3856 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
3858 def ShiftDown(*args
, **kwargs
):
3859 """ShiftDown(self) -> bool"""
3860 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
3862 def CmdDown(*args
, **kwargs
):
3864 CmdDown(self) -> bool
3866 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3867 platforms but the special "Apple" (a.k.a as "Command") key on
3868 Macs: it makes often sense to use it instead of, say, `ControlDown`
3869 because Cmd key is used for the same thing under Mac as Ctrl
3870 elsewhere. The Ctrl still exists, it's just not used for this
3871 purpose. So for non-Mac platforms this is the same as `ControlDown`
3872 and Macs this is the same as `MetaDown`.
3874 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
3876 def HasModifiers(*args
, **kwargs
):
3877 """HasModifiers(self) -> bool"""
3878 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
3880 def GetKeyCode(*args
, **kwargs
):
3881 """GetKeyCode(self) -> int"""
3882 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3884 KeyCode
= GetKeyCode
3885 def GetUnicodeKey(*args
, **kwargs
):
3886 """GetUnicodeKey(self) -> int"""
3887 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
3889 GetUniChar
= GetUnicodeKey
3890 def GetRawKeyCode(*args
, **kwargs
):
3891 """GetRawKeyCode(self) -> unsigned int"""
3892 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3894 def GetRawKeyFlags(*args
, **kwargs
):
3895 """GetRawKeyFlags(self) -> unsigned int"""
3896 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3898 def GetPosition(*args
, **kwargs
):
3900 GetPosition(self) -> Point
3902 Find the position of the event.
3904 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
3906 def GetPositionTuple(*args
, **kwargs
):
3908 GetPositionTuple() -> (x,y)
3910 Find the position of the event.
3912 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3914 def GetX(*args
, **kwargs
):
3915 """GetX(self) -> int"""
3916 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
3918 def GetY(*args
, **kwargs
):
3919 """GetY(self) -> int"""
3920 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
3922 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
3923 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
3924 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
3925 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
3926 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
3927 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
3928 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
3929 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
3930 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
3931 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
3933 class KeyEventPtr(KeyEvent
):
3934 def __init__(self
, this
):
3936 if not hasattr(self
,"thisown"): self
.thisown
= 0
3937 self
.__class
__ = KeyEvent
3938 _core_
.KeyEvent_swigregister(KeyEventPtr
)
3940 #---------------------------------------------------------------------------
3942 class SizeEvent(Event
):
3943 """Proxy of C++ SizeEvent class"""
3945 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3946 def __init__(self
, *args
, **kwargs
):
3947 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3948 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
3949 self
.this
= newobj
.this
3952 def GetSize(*args
, **kwargs
):
3953 """GetSize(self) -> Size"""
3954 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
3956 def GetRect(*args
, **kwargs
):
3957 """GetRect(self) -> Rect"""
3958 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
3960 def SetRect(*args
, **kwargs
):
3961 """SetRect(self, Rect rect)"""
3962 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
3964 def SetSize(*args
, **kwargs
):
3965 """SetSize(self, Size size)"""
3966 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
3968 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
3969 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
3971 class SizeEventPtr(SizeEvent
):
3972 def __init__(self
, this
):
3974 if not hasattr(self
,"thisown"): self
.thisown
= 0
3975 self
.__class
__ = SizeEvent
3976 _core_
.SizeEvent_swigregister(SizeEventPtr
)
3978 #---------------------------------------------------------------------------
3980 class MoveEvent(Event
):
3981 """Proxy of C++ MoveEvent class"""
3983 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3984 def __init__(self
, *args
, **kwargs
):
3985 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3986 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
3987 self
.this
= newobj
.this
3990 def GetPosition(*args
, **kwargs
):
3991 """GetPosition(self) -> Point"""
3992 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
3994 def GetRect(*args
, **kwargs
):
3995 """GetRect(self) -> Rect"""
3996 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
3998 def SetRect(*args
, **kwargs
):
3999 """SetRect(self, Rect rect)"""
4000 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
4002 def SetPosition(*args
, **kwargs
):
4003 """SetPosition(self, Point pos)"""
4004 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
4006 m_pos
= property(GetPosition
, SetPosition
)
4007 m_rect
= property(GetRect
, SetRect
)
4010 class MoveEventPtr(MoveEvent
):
4011 def __init__(self
, this
):
4013 if not hasattr(self
,"thisown"): self
.thisown
= 0
4014 self
.__class
__ = MoveEvent
4015 _core_
.MoveEvent_swigregister(MoveEventPtr
)
4017 #---------------------------------------------------------------------------
4019 class PaintEvent(Event
):
4020 """Proxy of C++ PaintEvent class"""
4022 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4023 def __init__(self
, *args
, **kwargs
):
4024 """__init__(self, int Id=0) -> PaintEvent"""
4025 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
4026 self
.this
= newobj
.this
4030 class PaintEventPtr(PaintEvent
):
4031 def __init__(self
, this
):
4033 if not hasattr(self
,"thisown"): self
.thisown
= 0
4034 self
.__class
__ = PaintEvent
4035 _core_
.PaintEvent_swigregister(PaintEventPtr
)
4037 class NcPaintEvent(Event
):
4038 """Proxy of C++ NcPaintEvent class"""
4040 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4041 def __init__(self
, *args
, **kwargs
):
4042 """__init__(self, int winid=0) -> NcPaintEvent"""
4043 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
4044 self
.this
= newobj
.this
4048 class NcPaintEventPtr(NcPaintEvent
):
4049 def __init__(self
, this
):
4051 if not hasattr(self
,"thisown"): self
.thisown
= 0
4052 self
.__class
__ = NcPaintEvent
4053 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
4055 #---------------------------------------------------------------------------
4057 class EraseEvent(Event
):
4058 """Proxy of C++ EraseEvent class"""
4060 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4061 def __init__(self
, *args
, **kwargs
):
4062 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4063 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
4064 self
.this
= newobj
.this
4067 def GetDC(*args
, **kwargs
):
4068 """GetDC(self) -> DC"""
4069 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
4072 class EraseEventPtr(EraseEvent
):
4073 def __init__(self
, this
):
4075 if not hasattr(self
,"thisown"): self
.thisown
= 0
4076 self
.__class
__ = EraseEvent
4077 _core_
.EraseEvent_swigregister(EraseEventPtr
)
4079 #---------------------------------------------------------------------------
4081 class FocusEvent(Event
):
4082 """Proxy of C++ FocusEvent class"""
4084 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4085 def __init__(self
, *args
, **kwargs
):
4086 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4087 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
4088 self
.this
= newobj
.this
4091 def GetWindow(*args
, **kwargs
):
4092 """GetWindow(self) -> Window"""
4093 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
4095 def SetWindow(*args
, **kwargs
):
4096 """SetWindow(self, Window win)"""
4097 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
4100 class FocusEventPtr(FocusEvent
):
4101 def __init__(self
, this
):
4103 if not hasattr(self
,"thisown"): self
.thisown
= 0
4104 self
.__class
__ = FocusEvent
4105 _core_
.FocusEvent_swigregister(FocusEventPtr
)
4107 #---------------------------------------------------------------------------
4109 class ChildFocusEvent(CommandEvent
):
4110 """Proxy of C++ ChildFocusEvent class"""
4112 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4113 def __init__(self
, *args
, **kwargs
):
4114 """__init__(self, Window win=None) -> ChildFocusEvent"""
4115 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
4116 self
.this
= newobj
.this
4119 def GetWindow(*args
, **kwargs
):
4120 """GetWindow(self) -> Window"""
4121 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
4124 class ChildFocusEventPtr(ChildFocusEvent
):
4125 def __init__(self
, this
):
4127 if not hasattr(self
,"thisown"): self
.thisown
= 0
4128 self
.__class
__ = ChildFocusEvent
4129 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
4131 #---------------------------------------------------------------------------
4133 class ActivateEvent(Event
):
4134 """Proxy of C++ ActivateEvent class"""
4136 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4137 def __init__(self
, *args
, **kwargs
):
4138 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4139 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
4140 self
.this
= newobj
.this
4143 def GetActive(*args
, **kwargs
):
4144 """GetActive(self) -> bool"""
4145 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
4148 class ActivateEventPtr(ActivateEvent
):
4149 def __init__(self
, this
):
4151 if not hasattr(self
,"thisown"): self
.thisown
= 0
4152 self
.__class
__ = ActivateEvent
4153 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
4155 #---------------------------------------------------------------------------
4157 class InitDialogEvent(Event
):
4158 """Proxy of C++ InitDialogEvent class"""
4160 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4161 def __init__(self
, *args
, **kwargs
):
4162 """__init__(self, int Id=0) -> InitDialogEvent"""
4163 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
4164 self
.this
= newobj
.this
4168 class InitDialogEventPtr(InitDialogEvent
):
4169 def __init__(self
, this
):
4171 if not hasattr(self
,"thisown"): self
.thisown
= 0
4172 self
.__class
__ = InitDialogEvent
4173 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
4175 #---------------------------------------------------------------------------
4177 class MenuEvent(Event
):
4178 """Proxy of C++ MenuEvent class"""
4180 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4181 def __init__(self
, *args
, **kwargs
):
4182 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4183 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
4184 self
.this
= newobj
.this
4187 def GetMenuId(*args
, **kwargs
):
4188 """GetMenuId(self) -> int"""
4189 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
4191 def IsPopup(*args
, **kwargs
):
4192 """IsPopup(self) -> bool"""
4193 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4195 def GetMenu(*args
, **kwargs
):
4196 """GetMenu(self) -> Menu"""
4197 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4200 class MenuEventPtr(MenuEvent
):
4201 def __init__(self
, this
):
4203 if not hasattr(self
,"thisown"): self
.thisown
= 0
4204 self
.__class
__ = MenuEvent
4205 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4207 #---------------------------------------------------------------------------
4209 class CloseEvent(Event
):
4210 """Proxy of C++ CloseEvent class"""
4212 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4213 def __init__(self
, *args
, **kwargs
):
4214 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4215 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4216 self
.this
= newobj
.this
4219 def SetLoggingOff(*args
, **kwargs
):
4220 """SetLoggingOff(self, bool logOff)"""
4221 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4223 def GetLoggingOff(*args
, **kwargs
):
4224 """GetLoggingOff(self) -> bool"""
4225 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4227 def Veto(*args
, **kwargs
):
4228 """Veto(self, bool veto=True)"""
4229 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4231 def SetCanVeto(*args
, **kwargs
):
4232 """SetCanVeto(self, bool canVeto)"""
4233 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4235 def CanVeto(*args
, **kwargs
):
4236 """CanVeto(self) -> bool"""
4237 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4239 def GetVeto(*args
, **kwargs
):
4240 """GetVeto(self) -> bool"""
4241 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4244 class CloseEventPtr(CloseEvent
):
4245 def __init__(self
, this
):
4247 if not hasattr(self
,"thisown"): self
.thisown
= 0
4248 self
.__class
__ = CloseEvent
4249 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4251 #---------------------------------------------------------------------------
4253 class ShowEvent(Event
):
4254 """Proxy of C++ ShowEvent class"""
4256 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4257 def __init__(self
, *args
, **kwargs
):
4258 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4259 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4260 self
.this
= newobj
.this
4263 def SetShow(*args
, **kwargs
):
4264 """SetShow(self, bool show)"""
4265 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4267 def GetShow(*args
, **kwargs
):
4268 """GetShow(self) -> bool"""
4269 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4272 class ShowEventPtr(ShowEvent
):
4273 def __init__(self
, this
):
4275 if not hasattr(self
,"thisown"): self
.thisown
= 0
4276 self
.__class
__ = ShowEvent
4277 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4279 #---------------------------------------------------------------------------
4281 class IconizeEvent(Event
):
4282 """Proxy of C++ IconizeEvent class"""
4284 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4285 def __init__(self
, *args
, **kwargs
):
4286 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4287 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4288 self
.this
= newobj
.this
4291 def Iconized(*args
, **kwargs
):
4292 """Iconized(self) -> bool"""
4293 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4296 class IconizeEventPtr(IconizeEvent
):
4297 def __init__(self
, this
):
4299 if not hasattr(self
,"thisown"): self
.thisown
= 0
4300 self
.__class
__ = IconizeEvent
4301 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4303 #---------------------------------------------------------------------------
4305 class MaximizeEvent(Event
):
4306 """Proxy of C++ MaximizeEvent class"""
4308 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4309 def __init__(self
, *args
, **kwargs
):
4310 """__init__(self, int id=0) -> MaximizeEvent"""
4311 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4312 self
.this
= newobj
.this
4316 class MaximizeEventPtr(MaximizeEvent
):
4317 def __init__(self
, this
):
4319 if not hasattr(self
,"thisown"): self
.thisown
= 0
4320 self
.__class
__ = MaximizeEvent
4321 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4323 #---------------------------------------------------------------------------
4325 class DropFilesEvent(Event
):
4326 """Proxy of C++ DropFilesEvent class"""
4327 def __init__(self
): raise RuntimeError, "No constructor defined"
4329 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4330 def GetPosition(*args
, **kwargs
):
4331 """GetPosition(self) -> Point"""
4332 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4334 def GetNumberOfFiles(*args
, **kwargs
):
4335 """GetNumberOfFiles(self) -> int"""
4336 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4338 def GetFiles(*args
, **kwargs
):
4339 """GetFiles(self) -> PyObject"""
4340 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4343 class DropFilesEventPtr(DropFilesEvent
):
4344 def __init__(self
, this
):
4346 if not hasattr(self
,"thisown"): self
.thisown
= 0
4347 self
.__class
__ = DropFilesEvent
4348 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4350 #---------------------------------------------------------------------------
4352 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4353 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4354 class UpdateUIEvent(CommandEvent
):
4355 """Proxy of C++ UpdateUIEvent class"""
4357 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4358 def __init__(self
, *args
, **kwargs
):
4359 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4360 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4361 self
.this
= newobj
.this
4364 def GetChecked(*args
, **kwargs
):
4365 """GetChecked(self) -> bool"""
4366 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4368 def GetEnabled(*args
, **kwargs
):
4369 """GetEnabled(self) -> bool"""
4370 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4372 def GetText(*args
, **kwargs
):
4373 """GetText(self) -> String"""
4374 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4376 def GetSetText(*args
, **kwargs
):
4377 """GetSetText(self) -> bool"""
4378 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4380 def GetSetChecked(*args
, **kwargs
):
4381 """GetSetChecked(self) -> bool"""
4382 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4384 def GetSetEnabled(*args
, **kwargs
):
4385 """GetSetEnabled(self) -> bool"""
4386 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4388 def Check(*args
, **kwargs
):
4389 """Check(self, bool check)"""
4390 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4392 def Enable(*args
, **kwargs
):
4393 """Enable(self, bool enable)"""
4394 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4396 def SetText(*args
, **kwargs
):
4397 """SetText(self, String text)"""
4398 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4400 def SetUpdateInterval(*args
, **kwargs
):
4401 """SetUpdateInterval(long updateInterval)"""
4402 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4404 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4405 def GetUpdateInterval(*args
, **kwargs
):
4406 """GetUpdateInterval() -> long"""
4407 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4409 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4410 def CanUpdate(*args
, **kwargs
):
4411 """CanUpdate(Window win) -> bool"""
4412 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4414 CanUpdate
= staticmethod(CanUpdate
)
4415 def ResetUpdateTime(*args
, **kwargs
):
4416 """ResetUpdateTime()"""
4417 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4419 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4420 def SetMode(*args
, **kwargs
):
4421 """SetMode(int mode)"""
4422 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4424 SetMode
= staticmethod(SetMode
)
4425 def GetMode(*args
, **kwargs
):
4426 """GetMode() -> int"""
4427 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4429 GetMode
= staticmethod(GetMode
)
4431 class UpdateUIEventPtr(UpdateUIEvent
):
4432 def __init__(self
, this
):
4434 if not hasattr(self
,"thisown"): self
.thisown
= 0
4435 self
.__class
__ = UpdateUIEvent
4436 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4438 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4439 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4440 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4442 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4443 """UpdateUIEvent_GetUpdateInterval() -> long"""
4444 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4446 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4447 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4448 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4450 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4451 """UpdateUIEvent_ResetUpdateTime()"""
4452 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4454 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4455 """UpdateUIEvent_SetMode(int mode)"""
4456 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4458 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4459 """UpdateUIEvent_GetMode() -> int"""
4460 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4462 #---------------------------------------------------------------------------
4464 class SysColourChangedEvent(Event
):
4465 """Proxy of C++ SysColourChangedEvent class"""
4467 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4468 def __init__(self
, *args
, **kwargs
):
4469 """__init__(self) -> SysColourChangedEvent"""
4470 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
4471 self
.this
= newobj
.this
4475 class SysColourChangedEventPtr(SysColourChangedEvent
):
4476 def __init__(self
, this
):
4478 if not hasattr(self
,"thisown"): self
.thisown
= 0
4479 self
.__class
__ = SysColourChangedEvent
4480 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4482 #---------------------------------------------------------------------------
4484 class MouseCaptureChangedEvent(Event
):
4485 """Proxy of C++ MouseCaptureChangedEvent class"""
4487 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4488 def __init__(self
, *args
, **kwargs
):
4489 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4490 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4491 self
.this
= newobj
.this
4494 def GetCapturedWindow(*args
, **kwargs
):
4495 """GetCapturedWindow(self) -> Window"""
4496 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4499 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4500 def __init__(self
, this
):
4502 if not hasattr(self
,"thisown"): self
.thisown
= 0
4503 self
.__class
__ = MouseCaptureChangedEvent
4504 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4506 #---------------------------------------------------------------------------
4508 class DisplayChangedEvent(Event
):
4509 """Proxy of C++ DisplayChangedEvent class"""
4511 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4512 def __init__(self
, *args
, **kwargs
):
4513 """__init__(self) -> DisplayChangedEvent"""
4514 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
4515 self
.this
= newobj
.this
4519 class DisplayChangedEventPtr(DisplayChangedEvent
):
4520 def __init__(self
, this
):
4522 if not hasattr(self
,"thisown"): self
.thisown
= 0
4523 self
.__class
__ = DisplayChangedEvent
4524 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4526 #---------------------------------------------------------------------------
4528 class PaletteChangedEvent(Event
):
4529 """Proxy of C++ PaletteChangedEvent class"""
4531 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4532 def __init__(self
, *args
, **kwargs
):
4533 """__init__(self, int id=0) -> PaletteChangedEvent"""
4534 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
4535 self
.this
= newobj
.this
4538 def SetChangedWindow(*args
, **kwargs
):
4539 """SetChangedWindow(self, Window win)"""
4540 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4542 def GetChangedWindow(*args
, **kwargs
):
4543 """GetChangedWindow(self) -> Window"""
4544 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4547 class PaletteChangedEventPtr(PaletteChangedEvent
):
4548 def __init__(self
, this
):
4550 if not hasattr(self
,"thisown"): self
.thisown
= 0
4551 self
.__class
__ = PaletteChangedEvent
4552 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4554 #---------------------------------------------------------------------------
4556 class QueryNewPaletteEvent(Event
):
4557 """Proxy of C++ QueryNewPaletteEvent class"""
4559 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4560 def __init__(self
, *args
, **kwargs
):
4561 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4562 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4563 self
.this
= newobj
.this
4566 def SetPaletteRealized(*args
, **kwargs
):
4567 """SetPaletteRealized(self, bool realized)"""
4568 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4570 def GetPaletteRealized(*args
, **kwargs
):
4571 """GetPaletteRealized(self) -> bool"""
4572 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4575 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4576 def __init__(self
, this
):
4578 if not hasattr(self
,"thisown"): self
.thisown
= 0
4579 self
.__class
__ = QueryNewPaletteEvent
4580 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4582 #---------------------------------------------------------------------------
4584 class NavigationKeyEvent(Event
):
4585 """Proxy of C++ NavigationKeyEvent class"""
4587 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4588 def __init__(self
, *args
, **kwargs
):
4589 """__init__(self) -> NavigationKeyEvent"""
4590 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
4591 self
.this
= newobj
.this
4594 def GetDirection(*args
, **kwargs
):
4595 """GetDirection(self) -> bool"""
4596 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4598 def SetDirection(*args
, **kwargs
):
4599 """SetDirection(self, bool forward)"""
4600 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4602 def IsWindowChange(*args
, **kwargs
):
4603 """IsWindowChange(self) -> bool"""
4604 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4606 def SetWindowChange(*args
, **kwargs
):
4607 """SetWindowChange(self, bool ischange)"""
4608 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4610 def IsFromTab(*args
, **kwargs
):
4611 """IsFromTab(self) -> bool"""
4612 return _core_
.NavigationKeyEvent_IsFromTab(*args
, **kwargs
)
4614 def SetFromTab(*args
, **kwargs
):
4615 """SetFromTab(self, bool bIs)"""
4616 return _core_
.NavigationKeyEvent_SetFromTab(*args
, **kwargs
)
4618 def SetFlags(*args
, **kwargs
):
4619 """SetFlags(self, long flags)"""
4620 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
4622 def GetCurrentFocus(*args
, **kwargs
):
4623 """GetCurrentFocus(self) -> Window"""
4624 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4626 def SetCurrentFocus(*args
, **kwargs
):
4627 """SetCurrentFocus(self, Window win)"""
4628 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4630 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
4631 IsForward
= _core_
.NavigationKeyEvent_IsForward
4632 WinChange
= _core_
.NavigationKeyEvent_WinChange
4633 FromTab
= _core_
.NavigationKeyEvent_FromTab
4635 class NavigationKeyEventPtr(NavigationKeyEvent
):
4636 def __init__(self
, this
):
4638 if not hasattr(self
,"thisown"): self
.thisown
= 0
4639 self
.__class
__ = NavigationKeyEvent
4640 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4642 #---------------------------------------------------------------------------
4644 class WindowCreateEvent(CommandEvent
):
4645 """Proxy of C++ WindowCreateEvent class"""
4647 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4648 def __init__(self
, *args
, **kwargs
):
4649 """__init__(self, Window win=None) -> WindowCreateEvent"""
4650 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
4651 self
.this
= newobj
.this
4654 def GetWindow(*args
, **kwargs
):
4655 """GetWindow(self) -> Window"""
4656 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4659 class WindowCreateEventPtr(WindowCreateEvent
):
4660 def __init__(self
, this
):
4662 if not hasattr(self
,"thisown"): self
.thisown
= 0
4663 self
.__class
__ = WindowCreateEvent
4664 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4666 class WindowDestroyEvent(CommandEvent
):
4667 """Proxy of C++ WindowDestroyEvent class"""
4669 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4670 def __init__(self
, *args
, **kwargs
):
4671 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4672 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
4673 self
.this
= newobj
.this
4676 def GetWindow(*args
, **kwargs
):
4677 """GetWindow(self) -> Window"""
4678 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4681 class WindowDestroyEventPtr(WindowDestroyEvent
):
4682 def __init__(self
, this
):
4684 if not hasattr(self
,"thisown"): self
.thisown
= 0
4685 self
.__class
__ = WindowDestroyEvent
4686 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4688 #---------------------------------------------------------------------------
4690 class ContextMenuEvent(CommandEvent
):
4691 """Proxy of C++ ContextMenuEvent class"""
4693 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4694 def __init__(self
, *args
, **kwargs
):
4695 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4696 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
4697 self
.this
= newobj
.this
4700 def GetPosition(*args
, **kwargs
):
4701 """GetPosition(self) -> Point"""
4702 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4704 def SetPosition(*args
, **kwargs
):
4705 """SetPosition(self, Point pos)"""
4706 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4709 class ContextMenuEventPtr(ContextMenuEvent
):
4710 def __init__(self
, this
):
4712 if not hasattr(self
,"thisown"): self
.thisown
= 0
4713 self
.__class
__ = ContextMenuEvent
4714 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4716 #---------------------------------------------------------------------------
4718 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
4719 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
4720 class IdleEvent(Event
):
4721 """Proxy of C++ IdleEvent class"""
4723 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4724 def __init__(self
, *args
, **kwargs
):
4725 """__init__(self) -> IdleEvent"""
4726 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
4727 self
.this
= newobj
.this
4730 def RequestMore(*args
, **kwargs
):
4731 """RequestMore(self, bool needMore=True)"""
4732 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
4734 def MoreRequested(*args
, **kwargs
):
4735 """MoreRequested(self) -> bool"""
4736 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
4738 def SetMode(*args
, **kwargs
):
4739 """SetMode(int mode)"""
4740 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4742 SetMode
= staticmethod(SetMode
)
4743 def GetMode(*args
, **kwargs
):
4744 """GetMode() -> int"""
4745 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4747 GetMode
= staticmethod(GetMode
)
4748 def CanSend(*args
, **kwargs
):
4749 """CanSend(Window win) -> bool"""
4750 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4752 CanSend
= staticmethod(CanSend
)
4754 class IdleEventPtr(IdleEvent
):
4755 def __init__(self
, this
):
4757 if not hasattr(self
,"thisown"): self
.thisown
= 0
4758 self
.__class
__ = IdleEvent
4759 _core_
.IdleEvent_swigregister(IdleEventPtr
)
4761 def IdleEvent_SetMode(*args
, **kwargs
):
4762 """IdleEvent_SetMode(int mode)"""
4763 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4765 def IdleEvent_GetMode(*args
, **kwargs
):
4766 """IdleEvent_GetMode() -> int"""
4767 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4769 def IdleEvent_CanSend(*args
, **kwargs
):
4770 """IdleEvent_CanSend(Window win) -> bool"""
4771 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4773 #---------------------------------------------------------------------------
4775 class PyEvent(Event
):
4776 """Proxy of C++ PyEvent class"""
4778 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4779 def __init__(self
, *args
, **kwargs
):
4780 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4781 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
4782 self
.this
= newobj
.this
4787 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
4790 if self
.thisown
: destroy(self
)
4793 def SetSelf(*args
, **kwargs
):
4794 """SetSelf(self, PyObject self)"""
4795 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
4797 def GetSelf(*args
, **kwargs
):
4798 """GetSelf(self) -> PyObject"""
4799 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
4802 class PyEventPtr(PyEvent
):
4803 def __init__(self
, this
):
4805 if not hasattr(self
,"thisown"): self
.thisown
= 0
4806 self
.__class
__ = PyEvent
4807 _core_
.PyEvent_swigregister(PyEventPtr
)
4809 class PyCommandEvent(CommandEvent
):
4810 """Proxy of C++ PyCommandEvent class"""
4812 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4813 def __init__(self
, *args
, **kwargs
):
4814 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4815 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
4816 self
.this
= newobj
.this
4821 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
4824 if self
.thisown
: destroy(self
)
4827 def SetSelf(*args
, **kwargs
):
4828 """SetSelf(self, PyObject self)"""
4829 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4831 def GetSelf(*args
, **kwargs
):
4832 """GetSelf(self) -> PyObject"""
4833 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4836 class PyCommandEventPtr(PyCommandEvent
):
4837 def __init__(self
, this
):
4839 if not hasattr(self
,"thisown"): self
.thisown
= 0
4840 self
.__class
__ = PyCommandEvent
4841 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4843 class DateEvent(CommandEvent
):
4844 """Proxy of C++ DateEvent class"""
4846 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4847 def __init__(self
, *args
, **kwargs
):
4848 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4849 newobj
= _core_
.new_DateEvent(*args
, **kwargs
)
4850 self
.this
= newobj
.this
4853 def GetDate(*args
, **kwargs
):
4854 """GetDate(self) -> DateTime"""
4855 return _core_
.DateEvent_GetDate(*args
, **kwargs
)
4857 def SetDate(*args
, **kwargs
):
4858 """SetDate(self, DateTime date)"""
4859 return _core_
.DateEvent_SetDate(*args
, **kwargs
)
4862 class DateEventPtr(DateEvent
):
4863 def __init__(self
, this
):
4865 if not hasattr(self
,"thisown"): self
.thisown
= 0
4866 self
.__class
__ = DateEvent
4867 _core_
.DateEvent_swigregister(DateEventPtr
)
4869 wxEVT_DATE_CHANGED
= _core_
.wxEVT_DATE_CHANGED
4870 EVT_DATE_CHANGED
= wx
.PyEventBinder( wxEVT_DATE_CHANGED
, 1 )
4872 #---------------------------------------------------------------------------
4874 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
4875 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
4876 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
4877 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
4878 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
4879 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
4880 class PyApp(EvtHandler
):
4882 The ``wx.PyApp`` class is an *implementation detail*, please use the
4883 `wx.App` class (or some other derived class) instead.
4886 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4887 def __init__(self
, *args
, **kwargs
):
4889 __init__(self) -> PyApp
4891 Create a new application object, starting the bootstrap process.
4893 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
4894 self
.this
= newobj
.this
4897 self
._setCallbackInfo
(self
, PyApp
)
4898 self
._setOORInfo
(self
)
4900 def __del__(self
, destroy
=_core_
.delete_PyApp
):
4903 if self
.thisown
: destroy(self
)
4906 def _setCallbackInfo(*args
, **kwargs
):
4907 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4908 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
4910 def GetAppName(*args
, **kwargs
):
4912 GetAppName(self) -> String
4914 Get the application name.
4916 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
4918 def SetAppName(*args
, **kwargs
):
4920 SetAppName(self, String name)
4922 Set the application name. This value may be used automatically by
4923 `wx.Config` and such.
4925 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
4927 def GetClassName(*args
, **kwargs
):
4929 GetClassName(self) -> String
4931 Get the application's class name.
4933 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
4935 def SetClassName(*args
, **kwargs
):
4937 SetClassName(self, String name)
4939 Set the application's class name. This value may be used for
4940 X-resources if applicable for the platform
4942 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
4944 def GetVendorName(*args
, **kwargs
):
4946 GetVendorName(self) -> String
4948 Get the application's vendor name.
4950 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
4952 def SetVendorName(*args
, **kwargs
):
4954 SetVendorName(self, String name)
4956 Set the application's vendor name. This value may be used
4957 automatically by `wx.Config` and such.
4959 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
4961 def GetTraits(*args
, **kwargs
):
4963 GetTraits(self) -> wxAppTraits
4965 Return (and create if necessary) the app traits object to which we
4966 delegate for everything which either should be configurable by the
4967 user (then he can change the default behaviour simply by overriding
4968 CreateTraits() and returning his own traits object) or which is
4969 GUI/console dependent as then wx.AppTraits allows us to abstract the
4970 differences behind the common facade.
4972 :todo: Add support for overriding CreateAppTraits in wxPython.
4974 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
4976 def ProcessPendingEvents(*args
, **kwargs
):
4978 ProcessPendingEvents(self)
4980 Process all events in the Pending Events list -- it is necessary to
4981 call this function to process posted events. This normally happens
4982 during each event loop iteration.
4984 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4986 def Yield(*args
, **kwargs
):
4988 Yield(self, bool onlyIfNeeded=False) -> bool
4990 Process all currently pending events right now, instead of waiting
4991 until return to the event loop. It is an error to call ``Yield``
4992 recursively unless the value of ``onlyIfNeeded`` is True.
4994 :warning: This function is dangerous as it can lead to unexpected
4995 reentrancies (i.e. when called from an event handler it may
4996 result in calling the same event handler again), use with
4997 extreme care or, better, don't use at all!
4999 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
5002 return _core_
.PyApp_Yield(*args
, **kwargs
)
5004 def WakeUpIdle(*args
, **kwargs
):
5008 Make sure that idle events are sent again.
5009 :see: `wx.WakeUpIdle`
5011 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
5013 def IsMainLoopRunning(*args
, **kwargs
):
5015 IsMainLoopRunning() -> bool
5017 Returns True if we're running the main loop, i.e. if the events can
5018 currently be dispatched.
5020 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5022 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
5023 def MainLoop(*args
, **kwargs
):
5025 MainLoop(self) -> int
5027 Execute the main GUI loop, the function doesn't normally return until
5028 all top level windows have been closed and destroyed.
5030 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
5032 def Exit(*args
, **kwargs
):
5036 Exit the main loop thus terminating the application.
5039 return _core_
.PyApp_Exit(*args
, **kwargs
)
5041 def ExitMainLoop(*args
, **kwargs
):
5045 Exit the main GUI loop during the next iteration of the main
5046 loop, (i.e. it does not stop the program immediately!)
5048 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
5050 def Pending(*args
, **kwargs
):
5052 Pending(self) -> bool
5054 Returns True if there are unprocessed events in the event queue.
5056 return _core_
.PyApp_Pending(*args
, **kwargs
)
5058 def Dispatch(*args
, **kwargs
):
5060 Dispatch(self) -> bool
5062 Process the first event in the event queue (blocks until an event
5063 appears if there are none currently)
5065 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
5067 def ProcessIdle(*args
, **kwargs
):
5069 ProcessIdle(self) -> bool
5071 Called from the MainLoop when the application becomes idle (there are
5072 no pending events) and sends a `wx.IdleEvent` to all interested
5073 parties. Returns True if more idle events are needed, False if not.
5075 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
5077 def SendIdleEvents(*args
, **kwargs
):
5079 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5081 Send idle event to window and all subwindows. Returns True if more
5082 idle time is requested.
5084 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
5086 def IsActive(*args
, **kwargs
):
5088 IsActive(self) -> bool
5090 Return True if our app has focus.
5092 return _core_
.PyApp_IsActive(*args
, **kwargs
)
5094 def SetTopWindow(*args
, **kwargs
):
5096 SetTopWindow(self, Window win)
5098 Set the *main* top level window
5100 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
5102 def GetTopWindow(*args
, **kwargs
):
5104 GetTopWindow(self) -> Window
5106 Return the *main* top level window (if it hadn't been set previously
5107 with SetTopWindow(), will return just some top level window and, if
5108 there not any, will return None)
5110 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
5112 def SetExitOnFrameDelete(*args
, **kwargs
):
5114 SetExitOnFrameDelete(self, bool flag)
5116 Control the exit behaviour: by default, the program will exit the main
5117 loop (and so, usually, terminate) when the last top-level program
5118 window is deleted. Beware that if you disable this behaviour (with
5119 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5120 explicitly from somewhere.
5122 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
5124 def GetExitOnFrameDelete(*args
, **kwargs
):
5126 GetExitOnFrameDelete(self) -> bool
5128 Get the current exit behaviour setting.
5130 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
5132 def SetUseBestVisual(*args
, **kwargs
):
5134 SetUseBestVisual(self, bool flag)
5136 Set whether the app should try to use the best available visual on
5137 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5139 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
5141 def GetUseBestVisual(*args
, **kwargs
):
5143 GetUseBestVisual(self) -> bool
5145 Get current UseBestVisual setting.
5147 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
5149 def SetPrintMode(*args
, **kwargs
):
5150 """SetPrintMode(self, int mode)"""
5151 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
5153 def GetPrintMode(*args
, **kwargs
):
5154 """GetPrintMode(self) -> int"""
5155 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
5157 def SetAssertMode(*args
, **kwargs
):
5159 SetAssertMode(self, int mode)
5161 Set the OnAssert behaviour for debug and hybrid builds.
5163 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
5165 def GetAssertMode(*args
, **kwargs
):
5167 GetAssertMode(self) -> int
5169 Get the current OnAssert behaviour setting.
5171 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
5173 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5174 """GetMacSupportPCMenuShortcuts() -> bool"""
5175 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5177 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
5178 def GetMacAboutMenuItemId(*args
, **kwargs
):
5179 """GetMacAboutMenuItemId() -> long"""
5180 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5182 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
5183 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
5184 """GetMacPreferencesMenuItemId() -> long"""
5185 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5187 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
5188 def GetMacExitMenuItemId(*args
, **kwargs
):
5189 """GetMacExitMenuItemId() -> long"""
5190 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5192 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
5193 def GetMacHelpMenuTitleName(*args
, **kwargs
):
5194 """GetMacHelpMenuTitleName() -> String"""
5195 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5197 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
5198 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5199 """SetMacSupportPCMenuShortcuts(bool val)"""
5200 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5202 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
5203 def SetMacAboutMenuItemId(*args
, **kwargs
):
5204 """SetMacAboutMenuItemId(long val)"""
5205 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5207 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
5208 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
5209 """SetMacPreferencesMenuItemId(long val)"""
5210 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5212 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
5213 def SetMacExitMenuItemId(*args
, **kwargs
):
5214 """SetMacExitMenuItemId(long val)"""
5215 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5217 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
5218 def SetMacHelpMenuTitleName(*args
, **kwargs
):
5219 """SetMacHelpMenuTitleName(String val)"""
5220 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5222 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
5223 def _BootstrapApp(*args
, **kwargs
):
5227 For internal use only
5229 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
5231 def GetComCtl32Version(*args
, **kwargs
):
5233 GetComCtl32Version() -> int
5235 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5236 it wasn't found at all. Raises an exception on non-Windows platforms.
5238 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5240 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
5242 class PyAppPtr(PyApp
):
5243 def __init__(self
, this
):
5245 if not hasattr(self
,"thisown"): self
.thisown
= 0
5246 self
.__class
__ = PyApp
5247 _core_
.PyApp_swigregister(PyAppPtr
)
5249 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5251 PyApp_IsMainLoopRunning() -> bool
5253 Returns True if we're running the main loop, i.e. if the events can
5254 currently be dispatched.
5256 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5258 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5259 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5260 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5262 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5263 """PyApp_GetMacAboutMenuItemId() -> long"""
5264 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5266 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5267 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5268 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5270 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5271 """PyApp_GetMacExitMenuItemId() -> long"""
5272 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5274 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5275 """PyApp_GetMacHelpMenuTitleName() -> String"""
5276 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5278 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5279 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5280 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5282 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5283 """PyApp_SetMacAboutMenuItemId(long val)"""
5284 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5286 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5287 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5288 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5290 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5291 """PyApp_SetMacExitMenuItemId(long val)"""
5292 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5294 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5295 """PyApp_SetMacHelpMenuTitleName(String val)"""
5296 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5298 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5300 PyApp_GetComCtl32Version() -> int
5302 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5303 it wasn't found at all. Raises an exception on non-Windows platforms.
5305 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5307 #---------------------------------------------------------------------------
5310 def Exit(*args
, **kwargs
):
5314 Force an exit of the application. Convenience for wx.GetApp().Exit()
5316 return _core_
.Exit(*args
, **kwargs
)
5318 def Yield(*args
, **kwargs
):
5322 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5324 return _core_
.Yield(*args
, **kwargs
)
5326 def YieldIfNeeded(*args
, **kwargs
):
5328 YieldIfNeeded() -> bool
5330 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5332 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5334 def SafeYield(*args
, **kwargs
):
5336 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5338 This function is similar to `wx.Yield`, except that it disables the
5339 user input to all program windows before calling `wx.Yield` and
5340 re-enables it again afterwards. If ``win`` is not None, this window
5341 will remain enabled, allowing the implementation of some limited user
5344 :Returns: the result of the call to `wx.Yield`.
5346 return _core_
.SafeYield(*args
, **kwargs
)
5348 def WakeUpIdle(*args
, **kwargs
):
5352 Cause the message queue to become empty again, so idle events will be
5355 return _core_
.WakeUpIdle(*args
, **kwargs
)
5357 def PostEvent(*args
, **kwargs
):
5359 PostEvent(EvtHandler dest, Event event)
5361 Send an event to a window or other wx.EvtHandler to be processed
5364 return _core_
.PostEvent(*args
, **kwargs
)
5366 def App_CleanUp(*args
, **kwargs
):
5370 For internal use only, it is used to cleanup after wxWidgets when
5373 return _core_
.App_CleanUp(*args
, **kwargs
)
5375 def GetApp(*args
, **kwargs
):
5379 Return a reference to the current wx.App object.
5381 return _core_
.GetApp(*args
, **kwargs
)
5383 def SetDefaultPyEncoding(*args
, **kwargs
):
5385 SetDefaultPyEncoding(string encoding)
5387 Sets the encoding that wxPython will use when it needs to convert a
5388 Python string or unicode object to or from a wxString.
5390 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5391 but please be aware that the default encoding within the same locale
5392 may be slightly different on different platforms. For example, please
5393 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5394 between the common latin/roman encodings.
5396 return _core_
.SetDefaultPyEncoding(*args
, **kwargs
)
5398 def GetDefaultPyEncoding(*args
, **kwargs
):
5400 GetDefaultPyEncoding() -> string
5402 Gets the current encoding that wxPython will use when it needs to
5403 convert a Python string or unicode object to or from a wxString.
5405 return _core_
.GetDefaultPyEncoding(*args
, **kwargs
)
5406 #----------------------------------------------------------------------
5408 class PyOnDemandOutputWindow
:
5410 A class that can be used for redirecting Python's stdout and
5411 stderr streams. It will do nothing until something is wrriten to
5412 the stream at which point it will create a Frame with a text area
5413 and write the text there.
5415 def __init__(self
, title
= "wxPython: stdout/stderr"):
5418 self
.pos
= wx
.DefaultPosition
5419 self
.size
= (450, 300)
5422 def SetParent(self
, parent
):
5423 """Set the window to be used as the popup Frame's parent."""
5424 self
.parent
= parent
5427 def CreateOutputWindow(self
, st
):
5428 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
5429 style
=wx
.DEFAULT_FRAME_STYLE
)
5430 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
5431 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
5432 self
.text
.AppendText(st
)
5433 self
.frame
.Show(True)
5434 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
5437 def OnCloseWindow(self
, event
):
5438 if self
.frame
is not None:
5439 self
.frame
.Destroy()
5444 # These methods provide the file-like output behaviour.
5445 def write(self
, text
):
5447 Create the output window if needed and write the string to it.
5448 If not called in the context of the gui thread then uses
5449 CallAfter to do the work there.
5451 if self
.frame
is None:
5452 if not wx
.Thread_IsMain():
5453 wx
.CallAfter(self
.CreateOutputWindow
, text
)
5455 self
.CreateOutputWindow(text
)
5457 if not wx
.Thread_IsMain():
5458 wx
.CallAfter(self
.text
.AppendText
, text
)
5460 self
.text
.AppendText(text
)
5464 if self
.frame
is not None:
5465 wx
.CallAfter(self
.frame
.Close
)
5473 #----------------------------------------------------------------------
5475 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5477 class App(wx
.PyApp
):
5479 The ``wx.App`` class represents the application and is used to:
5481 * bootstrap the wxPython system and initialize the underlying
5483 * set and get application-wide properties
5484 * implement the windowing system main message or event loop,
5485 and to dispatch events to window instances
5488 Every application must have a ``wx.App`` instance, and all
5489 creation of UI objects should be delayed until after the
5490 ``wx.App`` object has been created in order to ensure that the gui
5491 platform and wxWidgets have been fully initialized.
5493 Normally you would derive from this class and implement an
5494 ``OnInit`` method that creates a frame and then calls
5495 ``self.SetTopWindow(frame)``.
5497 :see: `wx.PySimpleApp` for a simpler app class that can be used
5501 outputWindowClass
= PyOnDemandOutputWindow
5503 def __init__(self
, redirect
=_defRedirect
, filename
=None,
5504 useBestVisual
=False, clearSigInt
=True):
5506 Construct a ``wx.App`` object.
5508 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5509 redirected? Defaults to True on Windows and Mac, False
5510 otherwise. If `filename` is None then output will be
5511 redirected to a window that pops up as needed. (You can
5512 control what kind of window is created for the output by
5513 resetting the class variable ``outputWindowClass`` to a
5514 class of your choosing.)
5516 :param filename: The name of a file to redirect output to, if
5519 :param useBestVisual: Should the app try to use the best
5520 available visual provided by the system (only relevant on
5521 systems that have more than one visual.) This parameter
5522 must be used instead of calling `SetUseBestVisual` later
5523 on because it must be set before the underlying GUI
5524 toolkit is initialized.
5526 :param clearSigInt: Should SIGINT be cleared? This allows the
5527 app to terminate upon a Ctrl-C in the console like other
5530 :note: You should override OnInit to do applicaition
5531 initialization to ensure that the system, toolkit and
5532 wxWidgets are fully initialized.
5534 wx
.PyApp
.__init
__(self
)
5536 if wx
.Platform
== "__WXMAC__":
5539 if not MacOS
.WMAvailable():
5541 This program needs access to the screen. Please run with 'pythonw',
5542 not 'python', and only when you are logged in on the main display of
5550 # This has to be done before OnInit
5551 self
.SetUseBestVisual(useBestVisual
)
5553 # Set the default handler for SIGINT. This fixes a problem
5554 # where if Ctrl-C is pressed in the console that started this
5555 # app then it will not appear to do anything, (not even send
5556 # KeyboardInterrupt???) but will later segfault on exit. By
5557 # setting the default handler then the app will exit, as
5558 # expected (depending on platform.)
5562 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5566 # Save and redirect the stdio to a window?
5567 self
.stdioWin
= None
5568 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5570 self
.RedirectStdio(filename
)
5572 # Use Python's install prefix as the default
5573 wx
.StandardPaths
.Get().SetInstallPrefix(_sys
.prefix
)
5575 # This finishes the initialization of wxWindows and then calls
5576 # the OnInit that should be present in the derived class
5577 self
._BootstrapApp
()
5582 self
.RestoreStdio() # Just in case the MainLoop was overridden
5587 def SetTopWindow(self
, frame
):
5588 """Set the \"main\" top level window"""
5590 self
.stdioWin
.SetParent(frame
)
5591 wx
.PyApp
.SetTopWindow(self
, frame
)
5595 """Execute the main GUI event loop"""
5596 wx
.PyApp
.MainLoop(self
)
5600 def RedirectStdio(self
, filename
=None):
5601 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5603 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5605 self
.stdioWin
= self
.outputWindowClass()
5606 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5609 def RestoreStdio(self
):
5610 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5613 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
5615 Set the title, position and/or size of the output window if
5616 the stdio has been redirected. This should be called before
5617 any output would cause the output window to be created.
5620 if title
is not None:
5621 self
.stdioWin
.title
= title
5623 self
.stdioWin
.pos
= pos
5624 if size
is not None:
5625 self
.stdioWin
.size
= size
5630 # change from wx.PyApp_XX to wx.App_XX
5631 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
5632 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
5633 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
5634 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
5635 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
5636 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
5637 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
5638 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
5639 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
5640 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
5641 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
5643 #----------------------------------------------------------------------------
5645 class PySimpleApp(wx
.App
):
5647 A simple application class. You can just create one of these and
5648 then then make your top level windows later, and not have to worry
5649 about OnInit. For example::
5651 app = wx.PySimpleApp()
5652 frame = wx.Frame(None, title='Hello World')
5659 def __init__(self
, redirect
=False, filename
=None,
5660 useBestVisual
=False, clearSigInt
=True):
5662 :see: `wx.App.__init__`
5664 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
5671 # Is anybody using this one?
5672 class PyWidgetTester(wx
.App
):
5673 def __init__(self
, size
= (250, 100)):
5675 wx
.App
.__init
__(self
, 0)
5678 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5679 self
.SetTopWindow(self
.frame
)
5682 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
5683 w
= widgetClass(self
.frame
, *args
, **kwargs
)
5684 self
.frame
.Show(True)
5686 #----------------------------------------------------------------------------
5687 # DO NOT hold any other references to this object. This is how we
5688 # know when to cleanup system resources that wxWidgets is holding. When
5689 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5690 # goes to zero and it calls the wx.App_CleanUp function.
5692 class __wxPyCleanup
:
5694 self
.cleanup
= _core_
.App_CleanUp
5698 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5700 ## # another possible solution, but it gets called too early...
5702 ## atexit.register(_core_.wxApp_CleanUp)
5705 #----------------------------------------------------------------------------
5707 #---------------------------------------------------------------------------
5709 class EventLoop(object):
5710 """Proxy of C++ EventLoop class"""
5712 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5713 def __init__(self
, *args
, **kwargs
):
5714 """__init__(self) -> EventLoop"""
5715 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
5716 self
.this
= newobj
.this
5719 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
5722 if self
.thisown
: destroy(self
)
5725 def Run(*args
, **kwargs
):
5726 """Run(self) -> int"""
5727 return _core_
.EventLoop_Run(*args
, **kwargs
)
5729 def Exit(*args
, **kwargs
):
5730 """Exit(self, int rc=0)"""
5731 return _core_
.EventLoop_Exit(*args
, **kwargs
)
5733 def Pending(*args
, **kwargs
):
5734 """Pending(self) -> bool"""
5735 return _core_
.EventLoop_Pending(*args
, **kwargs
)
5737 def Dispatch(*args
, **kwargs
):
5738 """Dispatch(self) -> bool"""
5739 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
5741 def IsRunning(*args
, **kwargs
):
5742 """IsRunning(self) -> bool"""
5743 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
5745 def GetActive(*args
, **kwargs
):
5746 """GetActive() -> EventLoop"""
5747 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5749 GetActive
= staticmethod(GetActive
)
5750 def SetActive(*args
, **kwargs
):
5751 """SetActive(EventLoop loop)"""
5752 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5754 SetActive
= staticmethod(SetActive
)
5756 class EventLoopPtr(EventLoop
):
5757 def __init__(self
, this
):
5759 if not hasattr(self
,"thisown"): self
.thisown
= 0
5760 self
.__class
__ = EventLoop
5761 _core_
.EventLoop_swigregister(EventLoopPtr
)
5763 def EventLoop_GetActive(*args
, **kwargs
):
5764 """EventLoop_GetActive() -> EventLoop"""
5765 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5767 def EventLoop_SetActive(*args
, **kwargs
):
5768 """EventLoop_SetActive(EventLoop loop)"""
5769 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5771 #---------------------------------------------------------------------------
5773 class AcceleratorEntry(object):
5775 A class used to define items in an `wx.AcceleratorTable`. wxPython
5776 programs can choose to use wx.AcceleratorEntry objects, but using a
5777 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5778 as well. See `__init__` for of the tuple values.
5780 :see: `wx.AcceleratorTable`
5783 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5784 def __init__(self
, *args
, **kwargs
):
5786 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5788 Construct a wx.AcceleratorEntry.
5790 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
5791 self
.this
= newobj
.this
5794 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
5797 if self
.thisown
: destroy(self
)
5800 def Set(*args
, **kwargs
):
5802 Set(self, int flags, int keyCode, int cmd)
5804 (Re)set the attributes of a wx.AcceleratorEntry.
5807 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
5809 def GetFlags(*args
, **kwargs
):
5811 GetFlags(self) -> int
5813 Get the AcceleratorEntry's flags.
5815 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5817 def GetKeyCode(*args
, **kwargs
):
5819 GetKeyCode(self) -> int
5821 Get the AcceleratorEntry's keycode.
5823 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5825 def GetCommand(*args
, **kwargs
):
5827 GetCommand(self) -> int
5829 Get the AcceleratorEntry's command ID.
5831 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5834 class AcceleratorEntryPtr(AcceleratorEntry
):
5835 def __init__(self
, this
):
5837 if not hasattr(self
,"thisown"): self
.thisown
= 0
5838 self
.__class
__ = AcceleratorEntry
5839 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5841 class AcceleratorTable(Object
):
5843 An accelerator table allows the application to specify a table of
5844 keyboard shortcuts for menus or other commands. On Windows, menu or
5845 button commands are supported; on GTK, only menu commands are
5849 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5850 def __init__(self
, *args
, **kwargs
):
5852 __init__(entries) -> AcceleratorTable
5854 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5855 items or or of 3-tuples (flags, keyCode, cmdID)
5857 :see: `wx.AcceleratorEntry`
5859 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
5860 self
.this
= newobj
.this
5863 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
5866 if self
.thisown
: destroy(self
)
5869 def Ok(*args
, **kwargs
):
5870 """Ok(self) -> bool"""
5871 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
5874 class AcceleratorTablePtr(AcceleratorTable
):
5875 def __init__(self
, this
):
5877 if not hasattr(self
,"thisown"): self
.thisown
= 0
5878 self
.__class
__ = AcceleratorTable
5879 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5882 def GetAccelFromString(*args
, **kwargs
):
5883 """GetAccelFromString(String label) -> AcceleratorEntry"""
5884 return _core_
.GetAccelFromString(*args
, **kwargs
)
5885 #---------------------------------------------------------------------------
5887 class VisualAttributes(object):
5888 """struct containing all the visual attributes of a control"""
5890 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5891 def __init__(self
, *args
, **kwargs
):
5893 __init__(self) -> VisualAttributes
5895 struct containing all the visual attributes of a control
5897 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
5898 self
.this
= newobj
.this
5901 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
5904 if self
.thisown
: destroy(self
)
5907 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
5908 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
5909 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
5911 class VisualAttributesPtr(VisualAttributes
):
5912 def __init__(self
, this
):
5914 if not hasattr(self
,"thisown"): self
.thisown
= 0
5915 self
.__class
__ = VisualAttributes
5916 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
5917 NullAcceleratorTable
= cvar
.NullAcceleratorTable
5918 PanelNameStr
= cvar
.PanelNameStr
5920 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
5921 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
5922 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
5923 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
5924 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
5925 class Window(EvtHandler
):
5927 wx.Window is the base class for all windows and represents any visible
5928 object on the screen. All controls, top level windows and so on are
5929 wx.Windows. Sizers and device contexts are not however, as they don't
5930 appear on screen themselves.
5934 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5935 def __init__(self
, *args
, **kwargs
):
5937 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5938 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5940 Construct and show a generic Window.
5942 newobj
= _core_
.new_Window(*args
, **kwargs
)
5943 self
.this
= newobj
.this
5946 self
._setOORInfo
(self
)
5948 def Create(*args
, **kwargs
):
5950 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5951 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5953 Create the GUI part of the Window for 2-phase creation mode.
5955 return _core_
.Window_Create(*args
, **kwargs
)
5957 def Close(*args
, **kwargs
):
5959 Close(self, bool force=False) -> bool
5961 This function simply generates a EVT_CLOSE event whose handler usually
5962 tries to close the window. It doesn't close the window itself,
5963 however. If force is False (the default) then the window's close
5964 handler will be allowed to veto the destruction of the window.
5966 return _core_
.Window_Close(*args
, **kwargs
)
5968 def Destroy(*args
, **kwargs
):
5970 Destroy(self) -> bool
5972 Destroys the window safely. Frames and dialogs are not destroyed
5973 immediately when this function is called -- they are added to a list
5974 of windows to be deleted on idle time, when all the window's events
5975 have been processed. This prevents problems with events being sent to
5976 non-existent windows.
5978 Returns True if the window has either been successfully deleted, or it
5979 has been added to the list of windows pending real deletion.
5981 return _core_
.Window_Destroy(*args
, **kwargs
)
5983 def DestroyChildren(*args
, **kwargs
):
5985 DestroyChildren(self) -> bool
5987 Destroys all children of a window. Called automatically by the
5990 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
5992 def IsBeingDeleted(*args
, **kwargs
):
5994 IsBeingDeleted(self) -> bool
5996 Is the window in the process of being deleted?
5998 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
6000 def SetTitle(*args
, **kwargs
):
6002 SetTitle(self, String title)
6004 Sets the window's title. Applicable only to frames and dialogs.
6006 return _core_
.Window_SetTitle(*args
, **kwargs
)
6008 def GetTitle(*args
, **kwargs
):
6010 GetTitle(self) -> String
6012 Gets the window's title. Applicable only to frames and dialogs.
6014 return _core_
.Window_GetTitle(*args
, **kwargs
)
6016 def SetLabel(*args
, **kwargs
):
6018 SetLabel(self, String label)
6020 Set the text which the window shows in its label if applicable.
6022 return _core_
.Window_SetLabel(*args
, **kwargs
)
6024 def GetLabel(*args
, **kwargs
):
6026 GetLabel(self) -> String
6028 Generic way of getting a label from any window, for identification
6029 purposes. The interpretation of this function differs from class to
6030 class. For frames and dialogs, the value returned is the title. For
6031 buttons or static text controls, it is the button text. This function
6032 can be useful for meta-programs such as testing tools or special-needs
6033 access programs)which need to identify windows by name.
6035 return _core_
.Window_GetLabel(*args
, **kwargs
)
6037 def SetName(*args
, **kwargs
):
6039 SetName(self, String name)
6041 Sets the window's name. The window name is used for ressource setting
6042 in X, it is not the same as the window title/label
6044 return _core_
.Window_SetName(*args
, **kwargs
)
6046 def GetName(*args
, **kwargs
):
6048 GetName(self) -> String
6050 Returns the windows name. This name is not guaranteed to be unique;
6051 it is up to the programmer to supply an appropriate name in the window
6052 constructor or via wx.Window.SetName.
6054 return _core_
.Window_GetName(*args
, **kwargs
)
6056 def SetWindowVariant(*args
, **kwargs
):
6058 SetWindowVariant(self, int variant)
6060 Sets the variant of the window/font size to use for this window, if
6061 the platform supports variants, for example, wxMac.
6063 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
6065 def GetWindowVariant(*args
, **kwargs
):
6066 """GetWindowVariant(self) -> int"""
6067 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
6069 def SetId(*args
, **kwargs
):
6071 SetId(self, int winid)
6073 Sets the identifier of the window. Each window has an integer
6074 identifier. If the application has not provided one, an identifier
6075 will be generated. Normally, the identifier should be provided on
6076 creation and should not be modified subsequently.
6078 return _core_
.Window_SetId(*args
, **kwargs
)
6080 def GetId(*args
, **kwargs
):
6084 Returns the identifier of the window. Each window has an integer
6085 identifier. If the application has not provided one (or the default Id
6086 -1 is used) then an unique identifier with a negative value will be
6089 return _core_
.Window_GetId(*args
, **kwargs
)
6091 def NewControlId(*args
, **kwargs
):
6093 NewControlId() -> int
6095 Generate a control id for the controls which were not given one.
6097 return _core_
.Window_NewControlId(*args
, **kwargs
)
6099 NewControlId
= staticmethod(NewControlId
)
6100 def NextControlId(*args
, **kwargs
):
6102 NextControlId(int winid) -> int
6104 Get the id of the control following the one with the given
6107 return _core_
.Window_NextControlId(*args
, **kwargs
)
6109 NextControlId
= staticmethod(NextControlId
)
6110 def PrevControlId(*args
, **kwargs
):
6112 PrevControlId(int winid) -> int
6114 Get the id of the control preceding the one with the given
6117 return _core_
.Window_PrevControlId(*args
, **kwargs
)
6119 PrevControlId
= staticmethod(PrevControlId
)
6120 def SetSize(*args
, **kwargs
):
6122 SetSize(self, Size size)
6124 Sets the size of the window in pixels.
6126 return _core_
.Window_SetSize(*args
, **kwargs
)
6128 def SetDimensions(*args
, **kwargs
):
6130 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6132 Sets the position and size of the window in pixels. The sizeFlags
6133 parameter indicates the interpretation of the other params if they are
6136 ======================== ======================================
6137 wx.SIZE_AUTO A -1 indicates that a class-specific
6138 default should be used.
6139 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6140 -1 values are supplied.
6141 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6142 interpreted as real dimensions, not
6144 ======================== ======================================
6147 return _core_
.Window_SetDimensions(*args
, **kwargs
)
6149 def SetRect(*args
, **kwargs
):
6151 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6153 Sets the position and size of the window in pixels using a wx.Rect.
6155 return _core_
.Window_SetRect(*args
, **kwargs
)
6157 def SetSizeWH(*args
, **kwargs
):
6159 SetSizeWH(self, int width, int height)
6161 Sets the size of the window in pixels.
6163 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
6165 def Move(*args
, **kwargs
):
6167 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6169 Moves the window to the given position.
6171 return _core_
.Window_Move(*args
, **kwargs
)
6174 def MoveXY(*args
, **kwargs
):
6176 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6178 Moves the window to the given position.
6180 return _core_
.Window_MoveXY(*args
, **kwargs
)
6182 def SetBestFittingSize(*args
, **kwargs
):
6184 SetBestFittingSize(self, Size size=DefaultSize)
6186 A 'Smart' SetSize that will fill in default size components with the
6187 window's *best size* values. Also set's the minsize for use with sizers.
6189 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
6191 def Raise(*args
, **kwargs
):
6195 Raises the window to the top of the window hierarchy if it is a
6196 managed window (dialog or frame).
6198 return _core_
.Window_Raise(*args
, **kwargs
)
6200 def Lower(*args
, **kwargs
):
6204 Lowers the window to the bottom of the window hierarchy if it is a
6205 managed window (dialog or frame).
6207 return _core_
.Window_Lower(*args
, **kwargs
)
6209 def SetClientSize(*args
, **kwargs
):
6211 SetClientSize(self, Size size)
6213 This sets the size of the window client area in pixels. Using this
6214 function to size a window tends to be more device-independent than
6215 wx.Window.SetSize, since the application need not worry about what
6216 dimensions the border or title bar have when trying to fit the window
6217 around panel items, for example.
6219 return _core_
.Window_SetClientSize(*args
, **kwargs
)
6221 def SetClientSizeWH(*args
, **kwargs
):
6223 SetClientSizeWH(self, int width, int height)
6225 This sets the size of the window client area in pixels. Using this
6226 function to size a window tends to be more device-independent than
6227 wx.Window.SetSize, since the application need not worry about what
6228 dimensions the border or title bar have when trying to fit the window
6229 around panel items, for example.
6231 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
6233 def SetClientRect(*args
, **kwargs
):
6235 SetClientRect(self, Rect rect)
6237 This sets the size of the window client area in pixels. Using this
6238 function to size a window tends to be more device-independent than
6239 wx.Window.SetSize, since the application need not worry about what
6240 dimensions the border or title bar have when trying to fit the window
6241 around panel items, for example.
6243 return _core_
.Window_SetClientRect(*args
, **kwargs
)
6245 def GetPosition(*args
, **kwargs
):
6247 GetPosition(self) -> Point
6249 Get the window's position.
6251 return _core_
.Window_GetPosition(*args
, **kwargs
)
6253 def GetPositionTuple(*args
, **kwargs
):
6255 GetPositionTuple() -> (x,y)
6257 Get the window's position.
6259 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
6261 def GetSize(*args
, **kwargs
):
6263 GetSize(self) -> Size
6265 Get the window size.
6267 return _core_
.Window_GetSize(*args
, **kwargs
)
6269 def GetSizeTuple(*args
, **kwargs
):
6271 GetSizeTuple() -> (width, height)
6273 Get the window size.
6275 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
6277 def GetRect(*args
, **kwargs
):
6279 GetRect(self) -> Rect
6281 Returns the size and position of the window as a wx.Rect object.
6283 return _core_
.Window_GetRect(*args
, **kwargs
)
6285 def GetClientSize(*args
, **kwargs
):
6287 GetClientSize(self) -> Size
6289 This gets the size of the window's 'client area' in pixels. The client
6290 area is the area which may be drawn on by the programmer, excluding
6291 title bar, border, scrollbars, etc.
6293 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6295 def GetClientSizeTuple(*args
, **kwargs
):
6297 GetClientSizeTuple() -> (width, height)
6299 This gets the size of the window's 'client area' in pixels. The client
6300 area is the area which may be drawn on by the programmer, excluding
6301 title bar, border, scrollbars, etc.
6303 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6305 def GetClientAreaOrigin(*args
, **kwargs
):
6307 GetClientAreaOrigin(self) -> Point
6309 Get the origin of the client area of the window relative to the
6310 window's top left corner (the client area may be shifted because of
6311 the borders, scrollbars, other decorations...)
6313 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6315 def GetClientRect(*args
, **kwargs
):
6317 GetClientRect(self) -> Rect
6319 Get the client area position and size as a `wx.Rect` object.
6321 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6323 def GetBestSize(*args
, **kwargs
):
6325 GetBestSize(self) -> Size
6327 This function returns the best acceptable minimal size for the
6328 window, if applicable. For example, for a static text control, it will
6329 be the minimal size such that the control label is not truncated. For
6330 windows containing subwindows (suzh aswx.Panel), the size returned by
6331 this function will be the same as the size the window would have had
6334 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6336 def GetBestSizeTuple(*args
, **kwargs
):
6338 GetBestSizeTuple() -> (width, height)
6340 This function returns the best acceptable minimal size for the
6341 window, if applicable. For example, for a static text control, it will
6342 be the minimal size such that the control label is not truncated. For
6343 windows containing subwindows (suzh aswx.Panel), the size returned by
6344 this function will be the same as the size the window would have had
6347 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6349 def InvalidateBestSize(*args
, **kwargs
):
6351 InvalidateBestSize(self)
6353 Reset the cached best size value so it will be recalculated the next
6356 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6358 def GetBestFittingSize(*args
, **kwargs
):
6360 GetBestFittingSize(self) -> Size
6362 This function will merge the window's best size into the window's
6363 minimum size, giving priority to the min size components, and returns
6367 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6369 def GetAdjustedBestSize(*args
, **kwargs
):
6371 GetAdjustedBestSize(self) -> Size
6373 This method is similar to GetBestSize, except in one
6374 thing. GetBestSize should return the minimum untruncated size of the
6375 window, while this method will return the largest of BestSize and any
6376 user specified minimum size. ie. it is the minimum size the window
6377 should currently be drawn at, not the minimal size it can possibly
6380 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6382 def Center(*args
, **kwargs
):
6384 Center(self, int direction=BOTH)
6386 Centers the window. The parameter specifies the direction for
6387 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6388 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6389 on the entire screen and not on its parent window. If it is a
6390 top-level window and has no parent then it will always be centered
6391 relative to the screen.
6393 return _core_
.Window_Center(*args
, **kwargs
)
6396 def CenterOnScreen(*args
, **kwargs
):
6398 CenterOnScreen(self, int dir=BOTH)
6400 Center on screen (only works for top level windows)
6402 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6404 CentreOnScreen
= CenterOnScreen
6405 def CenterOnParent(*args
, **kwargs
):
6407 CenterOnParent(self, int dir=BOTH)
6409 Center with respect to the the parent window
6411 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6413 CentreOnParent
= CenterOnParent
6414 def Fit(*args
, **kwargs
):
6418 Sizes the window so that it fits around its subwindows. This function
6419 won't do anything if there are no subwindows and will only really work
6420 correctly if sizers are used for the subwindows layout. Also, if the
6421 window has exactly one subwindow it is better (faster and the result
6422 is more precise as Fit adds some margin to account for fuzziness of
6423 its calculations) to call window.SetClientSize(child.GetSize())
6424 instead of calling Fit.
6426 return _core_
.Window_Fit(*args
, **kwargs
)
6428 def FitInside(*args
, **kwargs
):
6432 Similar to Fit, but sizes the interior (virtual) size of a
6433 window. Mainly useful with scrolled windows to reset scrollbars after
6434 sizing changes that do not trigger a size event, and/or scrolled
6435 windows without an interior sizer. This function similarly won't do
6436 anything if there are no subwindows.
6438 return _core_
.Window_FitInside(*args
, **kwargs
)
6440 def SetSizeHints(*args
, **kwargs
):
6442 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6445 Allows specification of minimum and maximum window sizes, and window
6446 size increments. If a pair of values is not set (or set to -1), the
6447 default values will be used. If this function is called, the user
6448 will not be able to size the window outside the given bounds (if it is
6449 a top-level window.) Sizers will also inspect the minimum window size
6450 and will use that value if set when calculating layout.
6452 The resizing increments are only significant under Motif or Xt.
6454 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
6456 def SetSizeHintsSz(*args
, **kwargs
):
6458 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6460 Allows specification of minimum and maximum window sizes, and window
6461 size increments. If a pair of values is not set (or set to -1), the
6462 default values will be used. If this function is called, the user
6463 will not be able to size the window outside the given bounds (if it is
6464 a top-level window.) Sizers will also inspect the minimum window size
6465 and will use that value if set when calculating layout.
6467 The resizing increments are only significant under Motif or Xt.
6469 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
6471 def SetVirtualSizeHints(*args
, **kwargs
):
6473 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6475 Allows specification of minimum and maximum virtual window sizes. If a
6476 pair of values is not set (or set to -1), the default values will be
6477 used. If this function is called, the user will not be able to size
6478 the virtual area of the window outside the given bounds.
6480 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
6482 def SetVirtualSizeHintsSz(*args
, **kwargs
):
6484 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6486 Allows specification of minimum and maximum virtual window sizes. If a
6487 pair of values is not set (or set to -1), the default values will be
6488 used. If this function is called, the user will not be able to size
6489 the virtual area of the window outside the given bounds.
6491 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
6493 def GetMaxSize(*args
, **kwargs
):
6494 """GetMaxSize(self) -> Size"""
6495 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
6497 def GetMinSize(*args
, **kwargs
):
6498 """GetMinSize(self) -> Size"""
6499 return _core_
.Window_GetMinSize(*args
, **kwargs
)
6501 def SetMinSize(*args
, **kwargs
):
6503 SetMinSize(self, Size minSize)
6505 A more convenient method than `SetSizeHints` for setting just the
6508 return _core_
.Window_SetMinSize(*args
, **kwargs
)
6510 def SetMaxSize(*args
, **kwargs
):
6512 SetMaxSize(self, Size maxSize)
6514 A more convenient method than `SetSizeHints` for setting just the
6517 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
6519 def GetMinWidth(*args
, **kwargs
):
6520 """GetMinWidth(self) -> int"""
6521 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
6523 def GetMinHeight(*args
, **kwargs
):
6524 """GetMinHeight(self) -> int"""
6525 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
6527 def GetMaxWidth(*args
, **kwargs
):
6528 """GetMaxWidth(self) -> int"""
6529 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
6531 def GetMaxHeight(*args
, **kwargs
):
6532 """GetMaxHeight(self) -> int"""
6533 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
6535 def SetVirtualSize(*args
, **kwargs
):
6537 SetVirtualSize(self, Size size)
6539 Set the the virtual size of a window in pixels. For most windows this
6540 is just the client area of the window, but for some like scrolled
6541 windows it is more or less independent of the screen window size.
6543 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
6545 def SetVirtualSizeWH(*args
, **kwargs
):
6547 SetVirtualSizeWH(self, int w, int h)
6549 Set the the virtual size of a window in pixels. For most windows this
6550 is just the client area of the window, but for some like scrolled
6551 windows it is more or less independent of the screen window size.
6553 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
6555 def GetVirtualSize(*args
, **kwargs
):
6557 GetVirtualSize(self) -> Size
6559 Get the the virtual size of the window in pixels. For most windows
6560 this is just the client area of the window, but for some like scrolled
6561 windows it is more or less independent of the screen window size.
6563 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
6565 def GetVirtualSizeTuple(*args
, **kwargs
):
6567 GetVirtualSizeTuple() -> (width, height)
6569 Get the the virtual size of the window in pixels. For most windows
6570 this is just the client area of the window, but for some like scrolled
6571 windows it is more or less independent of the screen window size.
6573 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
6575 def GetBestVirtualSize(*args
, **kwargs
):
6577 GetBestVirtualSize(self) -> Size
6579 Return the largest of ClientSize and BestSize (as determined by a
6580 sizer, interior children, or other means)
6582 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
6584 def Show(*args
, **kwargs
):
6586 Show(self, bool show=True) -> bool
6588 Shows or hides the window. You may need to call Raise for a top level
6589 window if you want to bring it to top, although this is not needed if
6590 Show is called immediately after the frame creation. Returns True if
6591 the window has been shown or hidden or False if nothing was done
6592 because it already was in the requested state.
6594 return _core_
.Window_Show(*args
, **kwargs
)
6596 def Hide(*args
, **kwargs
):
6600 Equivalent to calling Show(False).
6602 return _core_
.Window_Hide(*args
, **kwargs
)
6604 def Enable(*args
, **kwargs
):
6606 Enable(self, bool enable=True) -> bool
6608 Enable or disable the window for user input. Note that when a parent
6609 window is disabled, all of its children are disabled as well and they
6610 are reenabled again when the parent is. Returns true if the window
6611 has been enabled or disabled, false if nothing was done, i.e. if the
6612 window had already been in the specified state.
6614 return _core_
.Window_Enable(*args
, **kwargs
)
6616 def Disable(*args
, **kwargs
):
6618 Disable(self) -> bool
6620 Disables the window, same as Enable(false).
6622 return _core_
.Window_Disable(*args
, **kwargs
)
6624 def IsShown(*args
, **kwargs
):
6626 IsShown(self) -> bool
6628 Returns true if the window is shown, false if it has been hidden.
6630 return _core_
.Window_IsShown(*args
, **kwargs
)
6632 def IsEnabled(*args
, **kwargs
):
6634 IsEnabled(self) -> bool
6636 Returns true if the window is enabled for input, false otherwise.
6638 return _core_
.Window_IsEnabled(*args
, **kwargs
)
6640 def SetWindowStyleFlag(*args
, **kwargs
):
6642 SetWindowStyleFlag(self, long style)
6644 Sets the style of the window. Please note that some styles cannot be
6645 changed after the window creation and that Refresh() might need to be
6646 called after changing the others for the change to take place
6649 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
6651 def GetWindowStyleFlag(*args
, **kwargs
):
6653 GetWindowStyleFlag(self) -> long
6655 Gets the window style that was passed to the constructor or Create
6658 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
6660 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
6661 def HasFlag(*args
, **kwargs
):
6663 HasFlag(self, int flag) -> bool
6665 Test if the given style is set for this window.
6667 return _core_
.Window_HasFlag(*args
, **kwargs
)
6669 def IsRetained(*args
, **kwargs
):
6671 IsRetained(self) -> bool
6673 Returns true if the window is retained, false otherwise. Retained
6674 windows are only available on X platforms.
6676 return _core_
.Window_IsRetained(*args
, **kwargs
)
6678 def SetExtraStyle(*args
, **kwargs
):
6680 SetExtraStyle(self, long exStyle)
6682 Sets the extra style bits for the window. Extra styles are the less
6683 often used style bits which can't be set with the constructor or with
6684 SetWindowStyleFlag()
6686 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
6688 def GetExtraStyle(*args
, **kwargs
):
6690 GetExtraStyle(self) -> long
6692 Returns the extra style bits for the window.
6694 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
6696 def MakeModal(*args
, **kwargs
):
6698 MakeModal(self, bool modal=True)
6700 Disables all other windows in the application so that the user can
6701 only interact with this window. Passing False will reverse this
6704 return _core_
.Window_MakeModal(*args
, **kwargs
)
6706 def SetThemeEnabled(*args
, **kwargs
):
6708 SetThemeEnabled(self, bool enableTheme)
6710 This function tells a window if it should use the system's "theme"
6711 code to draw the windows' background instead if its own background
6712 drawing code. This will only have an effect on platforms that support
6713 the notion of themes in user defined windows. One such platform is
6714 GTK+ where windows can have (very colourful) backgrounds defined by a
6715 user's selected theme.
6717 Dialogs, notebook pages and the status bar have this flag set to true
6718 by default so that the default look and feel is simulated best.
6720 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
6722 def GetThemeEnabled(*args
, **kwargs
):
6724 GetThemeEnabled(self) -> bool
6726 Return the themeEnabled flag.
6728 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
6730 def SetFocus(*args
, **kwargs
):
6734 Set's the focus to this window, allowing it to receive keyboard input.
6736 return _core_
.Window_SetFocus(*args
, **kwargs
)
6738 def SetFocusFromKbd(*args
, **kwargs
):
6740 SetFocusFromKbd(self)
6742 Set focus to this window as the result of a keyboard action. Normally
6743 only called internally.
6745 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
6747 def FindFocus(*args
, **kwargs
):
6749 FindFocus() -> Window
6751 Returns the window or control that currently has the keyboard focus,
6754 return _core_
.Window_FindFocus(*args
, **kwargs
)
6756 FindFocus
= staticmethod(FindFocus
)
6757 def AcceptsFocus(*args
, **kwargs
):
6759 AcceptsFocus(self) -> bool
6761 Can this window have focus?
6763 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
6765 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6767 AcceptsFocusFromKeyboard(self) -> bool
6769 Can this window be given focus by keyboard navigation? if not, the
6770 only way to give it focus (provided it accepts it at all) is to click
6773 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6775 def GetDefaultItem(*args
, **kwargs
):
6777 GetDefaultItem(self) -> Window
6779 Get the default child of this parent, i.e. the one which is activated
6780 by pressing <Enter> such as the OK button on a wx.Dialog.
6782 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
6784 def SetDefaultItem(*args
, **kwargs
):
6786 SetDefaultItem(self, Window child) -> Window
6788 Set this child as default, return the old default.
6790 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
6792 def SetTmpDefaultItem(*args
, **kwargs
):
6794 SetTmpDefaultItem(self, Window win)
6796 Set this child as temporary default
6798 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6800 def Navigate(*args
, **kwargs
):
6802 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6804 Does keyboard navigation from this window to another, by sending a
6805 `wx.NavigationKeyEvent`.
6807 return _core_
.Window_Navigate(*args
, **kwargs
)
6809 def MoveAfterInTabOrder(*args
, **kwargs
):
6811 MoveAfterInTabOrder(self, Window win)
6813 Moves this window in the tab navigation order after the specified
6814 sibling window. This means that when the user presses the TAB key on
6815 that other window, the focus switches to this window.
6817 The default tab order is the same as creation order. This function
6818 and `MoveBeforeInTabOrder` allow to change it after creating all the
6822 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
6824 def MoveBeforeInTabOrder(*args
, **kwargs
):
6826 MoveBeforeInTabOrder(self, Window win)
6828 Same as `MoveAfterInTabOrder` except that it inserts this window just
6829 before win instead of putting it right after it.
6831 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
6833 def GetChildren(*args
, **kwargs
):
6835 GetChildren(self) -> PyObject
6837 Returns a list of the window's children. NOTE: Currently this is a
6838 copy of the child window list maintained by the window, so the return
6839 value of this function is only valid as long as the window's children
6842 return _core_
.Window_GetChildren(*args
, **kwargs
)
6844 def GetParent(*args
, **kwargs
):
6846 GetParent(self) -> Window
6848 Returns the parent window of this window, or None if there isn't one.
6850 return _core_
.Window_GetParent(*args
, **kwargs
)
6852 def GetGrandParent(*args
, **kwargs
):
6854 GetGrandParent(self) -> Window
6856 Returns the parent of the parent of this window, or None if there
6859 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
6861 def IsTopLevel(*args
, **kwargs
):
6863 IsTopLevel(self) -> bool
6865 Returns true if the given window is a top-level one. Currently all
6866 frames and dialogs are always considered to be top-level windows (even
6867 if they have a parent window).
6869 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
6871 def Reparent(*args
, **kwargs
):
6873 Reparent(self, Window newParent) -> bool
6875 Reparents the window, i.e the window will be removed from its current
6876 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6877 re-inserted into another. Available on Windows and GTK. Returns True
6878 if the parent was changed, False otherwise (error or newParent ==
6881 return _core_
.Window_Reparent(*args
, **kwargs
)
6883 def AddChild(*args
, **kwargs
):
6885 AddChild(self, Window child)
6887 Adds a child window. This is called automatically by window creation
6888 functions so should not be required by the application programmer.
6890 return _core_
.Window_AddChild(*args
, **kwargs
)
6892 def RemoveChild(*args
, **kwargs
):
6894 RemoveChild(self, Window child)
6896 Removes a child window. This is called automatically by window
6897 deletion functions so should not be required by the application
6900 return _core_
.Window_RemoveChild(*args
, **kwargs
)
6902 def FindWindowById(*args
, **kwargs
):
6904 FindWindowById(self, long winid) -> Window
6906 Find a chld of this window by window ID
6908 return _core_
.Window_FindWindowById(*args
, **kwargs
)
6910 def FindWindowByName(*args
, **kwargs
):
6912 FindWindowByName(self, String name) -> Window
6914 Find a child of this window by name
6916 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
6918 def GetEventHandler(*args
, **kwargs
):
6920 GetEventHandler(self) -> EvtHandler
6922 Returns the event handler for this window. By default, the window is
6923 its own event handler.
6925 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
6927 def SetEventHandler(*args
, **kwargs
):
6929 SetEventHandler(self, EvtHandler handler)
6931 Sets the event handler for this window. An event handler is an object
6932 that is capable of processing the events sent to a window. By default,
6933 the window is its own event handler, but an application may wish to
6934 substitute another, for example to allow central implementation of
6935 event-handling for a variety of different window classes.
6937 It is usually better to use `wx.Window.PushEventHandler` since this sets
6938 up a chain of event handlers, where an event not handled by one event
6939 handler is handed to the next one in the chain.
6941 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
6943 def PushEventHandler(*args
, **kwargs
):
6945 PushEventHandler(self, EvtHandler handler)
6947 Pushes this event handler onto the event handler stack for the window.
6948 An event handler is an object that is capable of processing the events
6949 sent to a window. By default, the window is its own event handler, but
6950 an application may wish to substitute another, for example to allow
6951 central implementation of event-handling for a variety of different
6954 wx.Window.PushEventHandler allows an application to set up a chain of
6955 event handlers, where an event not handled by one event handler is
6956 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6957 remove the event handler.
6959 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
6961 def PopEventHandler(*args
, **kwargs
):
6963 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6965 Removes and returns the top-most event handler on the event handler
6966 stack. If deleteHandler is True then the wx.EvtHandler object will be
6967 destroyed after it is popped.
6969 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
6971 def RemoveEventHandler(*args
, **kwargs
):
6973 RemoveEventHandler(self, EvtHandler handler) -> bool
6975 Find the given handler in the event handler chain and remove (but not
6976 delete) it from the event handler chain, return True if it was found
6977 and False otherwise (this also results in an assert failure so this
6978 function should only be called when the handler is supposed to be
6981 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
6983 def SetValidator(*args
, **kwargs
):
6985 SetValidator(self, Validator validator)
6987 Deletes the current validator (if any) and sets the window validator,
6988 having called wx.Validator.Clone to create a new validator of this
6991 return _core_
.Window_SetValidator(*args
, **kwargs
)
6993 def GetValidator(*args
, **kwargs
):
6995 GetValidator(self) -> Validator
6997 Returns a pointer to the current validator for the window, or None if
7000 return _core_
.Window_GetValidator(*args
, **kwargs
)
7002 def Validate(*args
, **kwargs
):
7004 Validate(self) -> bool
7006 Validates the current values of the child controls using their
7007 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7008 style flag set, the method will also call Validate() of all child
7009 windows. Returns false if any of the validations failed.
7011 return _core_
.Window_Validate(*args
, **kwargs
)
7013 def TransferDataToWindow(*args
, **kwargs
):
7015 TransferDataToWindow(self) -> bool
7017 Transfers values to child controls from data areas specified by their
7018 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7019 style flag set, the method will also call TransferDataToWindow() of
7022 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
7024 def TransferDataFromWindow(*args
, **kwargs
):
7026 TransferDataFromWindow(self) -> bool
7028 Transfers values from child controls to data areas specified by their
7029 validators. Returns false if a transfer failed. If the window has
7030 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7031 also call TransferDataFromWindow() of all child windows.
7033 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
7035 def InitDialog(*args
, **kwargs
):
7039 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7040 to the dialog via validators.
7042 return _core_
.Window_InitDialog(*args
, **kwargs
)
7044 def SetAcceleratorTable(*args
, **kwargs
):
7046 SetAcceleratorTable(self, AcceleratorTable accel)
7048 Sets the accelerator table for this window.
7050 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
7052 def GetAcceleratorTable(*args
, **kwargs
):
7054 GetAcceleratorTable(self) -> AcceleratorTable
7056 Gets the accelerator table for this window.
7058 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
7060 def RegisterHotKey(*args
, **kwargs
):
7062 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7064 Registers a system wide hotkey. Every time the user presses the hotkey
7065 registered here, this window will receive a hotkey event. It will
7066 receive the event even if the application is in the background and
7067 does not have the input focus because the user is working with some
7068 other application. To bind an event handler function to this hotkey
7069 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7070 hotkey was registered successfully.
7072 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
7074 def UnregisterHotKey(*args
, **kwargs
):
7076 UnregisterHotKey(self, int hotkeyId) -> bool
7078 Unregisters a system wide hotkey.
7080 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
7082 def ConvertDialogPointToPixels(*args
, **kwargs
):
7084 ConvertDialogPointToPixels(self, Point pt) -> Point
7086 Converts a point or size from dialog units to pixels. Dialog units
7087 are used for maintaining a dialog's proportions even if the font
7088 changes. For the x dimension, the dialog units are multiplied by the
7089 average character width and then divided by 4. For the y dimension,
7090 the dialog units are multiplied by the average character height and
7093 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
7095 def ConvertDialogSizeToPixels(*args
, **kwargs
):
7097 ConvertDialogSizeToPixels(self, Size sz) -> Size
7099 Converts a point or size from dialog units to pixels. Dialog units
7100 are used for maintaining a dialog's proportions even if the font
7101 changes. For the x dimension, the dialog units are multiplied by the
7102 average character width and then divided by 4. For the y dimension,
7103 the dialog units are multiplied by the average character height and
7106 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
7108 def DLG_PNT(*args
, **kwargs
):
7110 DLG_PNT(self, Point pt) -> Point
7112 Converts a point or size from dialog units to pixels. Dialog units
7113 are used for maintaining a dialog's proportions even if the font
7114 changes. For the x dimension, the dialog units are multiplied by the
7115 average character width and then divided by 4. For the y dimension,
7116 the dialog units are multiplied by the average character height and
7119 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
7121 def DLG_SZE(*args
, **kwargs
):
7123 DLG_SZE(self, Size sz) -> Size
7125 Converts a point or size from dialog units to pixels. Dialog units
7126 are used for maintaining a dialog's proportions even if the font
7127 changes. For the x dimension, the dialog units are multiplied by the
7128 average character width and then divided by 4. For the y dimension,
7129 the dialog units are multiplied by the average character height and
7132 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
7134 def ConvertPixelPointToDialog(*args
, **kwargs
):
7135 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7136 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
7138 def ConvertPixelSizeToDialog(*args
, **kwargs
):
7139 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7140 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
7142 def WarpPointer(*args
, **kwargs
):
7144 WarpPointer(self, int x, int y)
7146 Moves the pointer to the given position on the window.
7148 NOTE: This function is not supported under Mac because Apple Human
7149 Interface Guidelines forbid moving the mouse cursor programmatically.
7151 return _core_
.Window_WarpPointer(*args
, **kwargs
)
7153 def CaptureMouse(*args
, **kwargs
):
7157 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7158 release the capture.
7160 Note that wxWindows maintains the stack of windows having captured the
7161 mouse and when the mouse is released the capture returns to the window
7162 which had had captured it previously and it is only really released if
7163 there were no previous window. In particular, this means that you must
7164 release the mouse as many times as you capture it.
7166 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
7168 def ReleaseMouse(*args
, **kwargs
):
7172 Releases mouse input captured with wx.Window.CaptureMouse.
7174 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
7176 def GetCapture(*args
, **kwargs
):
7178 GetCapture() -> Window
7180 Returns the window which currently captures the mouse or None
7182 return _core_
.Window_GetCapture(*args
, **kwargs
)
7184 GetCapture
= staticmethod(GetCapture
)
7185 def HasCapture(*args
, **kwargs
):
7187 HasCapture(self) -> bool
7189 Returns true if this window has the current mouse capture.
7191 return _core_
.Window_HasCapture(*args
, **kwargs
)
7193 def Refresh(*args
, **kwargs
):
7195 Refresh(self, bool eraseBackground=True, Rect rect=None)
7197 Mark the specified rectangle (or the whole window) as "dirty" so it
7198 will be repainted. Causes an EVT_PAINT event to be generated and sent
7201 return _core_
.Window_Refresh(*args
, **kwargs
)
7203 def RefreshRect(*args
, **kwargs
):
7205 RefreshRect(self, Rect rect, bool eraseBackground=True)
7207 Redraws the contents of the given rectangle: the area inside it will
7208 be repainted. This is the same as Refresh but has a nicer syntax.
7210 return _core_
.Window_RefreshRect(*args
, **kwargs
)
7212 def Update(*args
, **kwargs
):
7216 Calling this method immediately repaints the invalidated area of the
7217 window instead of waiting for the EVT_PAINT event to happen, (normally
7218 this would usually only happen when the flow of control returns to the
7219 event loop.) Notice that this function doesn't refresh the window and
7220 does nothing if the window has been already repainted. Use Refresh
7221 first if you want to immediately redraw the window (or some portion of
7222 it) unconditionally.
7224 return _core_
.Window_Update(*args
, **kwargs
)
7226 def ClearBackground(*args
, **kwargs
):
7228 ClearBackground(self)
7230 Clears the window by filling it with the current background
7231 colour. Does not cause an erase background event to be generated.
7233 return _core_
.Window_ClearBackground(*args
, **kwargs
)
7235 def Freeze(*args
, **kwargs
):
7239 Freezes the window or, in other words, prevents any updates from
7240 taking place on screen, the window is not redrawn at all. Thaw must be
7241 called to reenable window redrawing. Calls to Freeze/Thaw may be
7242 nested, with the actual Thaw being delayed until all the nesting has
7245 This method is useful for visual appearance optimization (for example,
7246 it is a good idea to use it before inserting large amount of text into
7247 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7248 for all controls so it is mostly just a hint to wxWindows and not a
7249 mandatory directive.
7251 return _core_
.Window_Freeze(*args
, **kwargs
)
7253 def Thaw(*args
, **kwargs
):
7257 Reenables window updating after a previous call to Freeze. Calls to
7258 Freeze/Thaw may be nested, so Thaw must be called the same number of
7259 times that Freeze was before the window will be updated.
7261 return _core_
.Window_Thaw(*args
, **kwargs
)
7263 def PrepareDC(*args
, **kwargs
):
7265 PrepareDC(self, DC dc)
7267 Call this function to prepare the device context for drawing a
7268 scrolled image. It sets the device origin according to the current
7271 return _core_
.Window_PrepareDC(*args
, **kwargs
)
7273 def GetUpdateRegion(*args
, **kwargs
):
7275 GetUpdateRegion(self) -> Region
7277 Returns the region specifying which parts of the window have been
7278 damaged. Should only be called within an EVT_PAINT handler.
7280 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
7282 def GetUpdateClientRect(*args
, **kwargs
):
7284 GetUpdateClientRect(self) -> Rect
7286 Get the update rectangle region bounding box in client coords.
7288 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7290 def IsExposed(*args
, **kwargs
):
7292 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7294 Returns true if the given point or rectangle area has been exposed
7295 since the last repaint. Call this in an paint event handler to
7296 optimize redrawing by only redrawing those areas, which have been
7299 return _core_
.Window_IsExposed(*args
, **kwargs
)
7301 def IsExposedPoint(*args
, **kwargs
):
7303 IsExposedPoint(self, Point pt) -> bool
7305 Returns true if the given point or rectangle area has been exposed
7306 since the last repaint. Call this in an paint event handler to
7307 optimize redrawing by only redrawing those areas, which have been
7310 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7312 def IsExposedRect(*args
, **kwargs
):
7314 IsExposedRect(self, Rect rect) -> bool
7316 Returns true if the given point or rectangle area has been exposed
7317 since the last repaint. Call this in an paint event handler to
7318 optimize redrawing by only redrawing those areas, which have been
7321 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7323 def GetDefaultAttributes(*args
, **kwargs
):
7325 GetDefaultAttributes(self) -> VisualAttributes
7327 Get the default attributes for an instance of this class. This is
7328 useful if you want to use the same font or colour in your own control
7329 as in a standard control -- which is a much better idea than hard
7330 coding specific colours or fonts which might look completely out of
7331 place on the user's system, especially if it uses themes.
7333 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7335 def GetClassDefaultAttributes(*args
, **kwargs
):
7337 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7339 Get the default attributes for this class. This is useful if you want
7340 to use the same font or colour in your own control as in a standard
7341 control -- which is a much better idea than hard coding specific
7342 colours or fonts which might look completely out of place on the
7343 user's system, especially if it uses themes.
7345 The variant parameter is only relevant under Mac currently and is
7346 ignore under other platforms. Under Mac, it will change the size of
7347 the returned font. See `wx.Window.SetWindowVariant` for more about
7350 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7352 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7353 def SetBackgroundColour(*args
, **kwargs
):
7355 SetBackgroundColour(self, Colour colour) -> bool
7357 Sets the background colour of the window. Returns True if the colour
7358 was changed. The background colour is usually painted by the default
7359 EVT_ERASE_BACKGROUND event handler function under Windows and
7360 automatically under GTK. Using `wx.NullColour` will reset the window
7361 to the default background colour.
7363 Note that setting the background colour may not cause an immediate
7364 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7365 calling this function.
7367 Using this function will disable attempts to use themes for this
7368 window, if the system supports them. Use with care since usually the
7369 themes represent the appearance chosen by the user to be used for all
7370 applications on the system.
7372 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7374 def SetOwnBackgroundColour(*args
, **kwargs
):
7375 """SetOwnBackgroundColour(self, Colour colour)"""
7376 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7378 def SetForegroundColour(*args
, **kwargs
):
7380 SetForegroundColour(self, Colour colour) -> bool
7382 Sets the foreground colour of the window. Returns True is the colour
7383 was changed. The interpretation of foreground colour is dependent on
7384 the window class; it may be the text colour or other colour, or it may
7387 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7389 def SetOwnForegroundColour(*args
, **kwargs
):
7390 """SetOwnForegroundColour(self, Colour colour)"""
7391 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7393 def GetBackgroundColour(*args
, **kwargs
):
7395 GetBackgroundColour(self) -> Colour
7397 Returns the background colour of the window.
7399 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7401 def GetForegroundColour(*args
, **kwargs
):
7403 GetForegroundColour(self) -> Colour
7405 Returns the foreground colour of the window. The interpretation of
7406 foreground colour is dependent on the window class; it may be the text
7407 colour or other colour, or it may not be used at all.
7409 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7411 def InheritsBackgroundColour(*args
, **kwargs
):
7412 """InheritsBackgroundColour(self) -> bool"""
7413 return _core_
.Window_InheritsBackgroundColour(*args
, **kwargs
)
7415 def UseBgCol(*args
, **kwargs
):
7416 """UseBgCol(self) -> bool"""
7417 return _core_
.Window_UseBgCol(*args
, **kwargs
)
7419 def SetBackgroundStyle(*args
, **kwargs
):
7421 SetBackgroundStyle(self, int style) -> bool
7423 Returns the background style of the window. The background style
7424 indicates how the background of the window is drawn.
7426 ====================== ========================================
7427 wx.BG_STYLE_SYSTEM The background colour or pattern should
7428 be determined by the system
7429 wx.BG_STYLE_COLOUR The background should be a solid colour
7430 wx.BG_STYLE_CUSTOM The background will be implemented by the
7432 ====================== ========================================
7434 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7435 a custom background, such as a tiled bitmap. Currently the style has
7436 no effect on other platforms.
7438 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7440 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
7442 def GetBackgroundStyle(*args
, **kwargs
):
7444 GetBackgroundStyle(self) -> int
7446 Returns the background style of the window.
7448 :see: `SetBackgroundStyle`
7450 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
7452 def HasTransparentBackground(*args
, **kwargs
):
7454 HasTransparentBackground(self) -> bool
7456 Returns True if this window's background is transparent (as, for
7457 example, for `wx.StaticText`) and should show the parent window's
7460 This method is mostly used internally by the library itself and you
7461 normally shouldn't have to call it. You may, however, have to override
7462 it in your custom control classes to ensure that background is painted
7465 return _core_
.Window_HasTransparentBackground(*args
, **kwargs
)
7467 def SetCursor(*args
, **kwargs
):
7469 SetCursor(self, Cursor cursor) -> bool
7471 Sets the window's cursor. Notice that the window cursor also sets it
7472 for the children of the window implicitly.
7474 The cursor may be wx.NullCursor in which case the window cursor will
7475 be reset back to default.
7477 return _core_
.Window_SetCursor(*args
, **kwargs
)
7479 def GetCursor(*args
, **kwargs
):
7481 GetCursor(self) -> Cursor
7483 Return the cursor associated with this window.
7485 return _core_
.Window_GetCursor(*args
, **kwargs
)
7487 def SetFont(*args
, **kwargs
):
7489 SetFont(self, Font font) -> bool
7491 Sets the font for this window.
7493 return _core_
.Window_SetFont(*args
, **kwargs
)
7495 def SetOwnFont(*args
, **kwargs
):
7496 """SetOwnFont(self, Font font)"""
7497 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
7499 def GetFont(*args
, **kwargs
):
7501 GetFont(self) -> Font
7503 Returns the default font used for this window.
7505 return _core_
.Window_GetFont(*args
, **kwargs
)
7507 def SetCaret(*args
, **kwargs
):
7509 SetCaret(self, Caret caret)
7511 Sets the caret associated with the window.
7513 return _core_
.Window_SetCaret(*args
, **kwargs
)
7515 def GetCaret(*args
, **kwargs
):
7517 GetCaret(self) -> Caret
7519 Returns the caret associated with the window.
7521 return _core_
.Window_GetCaret(*args
, **kwargs
)
7523 def GetCharHeight(*args
, **kwargs
):
7525 GetCharHeight(self) -> int
7527 Get the (average) character size for the current font.
7529 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
7531 def GetCharWidth(*args
, **kwargs
):
7533 GetCharWidth(self) -> int
7535 Get the (average) character size for the current font.
7537 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
7539 def GetTextExtent(*args
, **kwargs
):
7541 GetTextExtent(String string) -> (width, height)
7543 Get the width and height of the text using the current font.
7545 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
7547 def GetFullTextExtent(*args
, **kwargs
):
7549 GetFullTextExtent(String string, Font font=None) ->
7550 (width, height, descent, externalLeading)
7552 Get the width, height, decent and leading of the text using the
7553 current or specified font.
7555 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
7557 def ClientToScreenXY(*args
, **kwargs
):
7559 ClientToScreenXY(int x, int y) -> (x,y)
7561 Converts to screen coordinates from coordinates relative to this window.
7563 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
7565 def ScreenToClientXY(*args
, **kwargs
):
7567 ScreenToClientXY(int x, int y) -> (x,y)
7569 Converts from screen to client window coordinates.
7571 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
7573 def ClientToScreen(*args
, **kwargs
):
7575 ClientToScreen(self, Point pt) -> Point
7577 Converts to screen coordinates from coordinates relative to this window.
7579 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
7581 def ScreenToClient(*args
, **kwargs
):
7583 ScreenToClient(self, Point pt) -> Point
7585 Converts from screen to client window coordinates.
7587 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
7589 def HitTestXY(*args
, **kwargs
):
7591 HitTestXY(self, int x, int y) -> int
7593 Test where the given (in client coords) point lies
7595 return _core_
.Window_HitTestXY(*args
, **kwargs
)
7597 def HitTest(*args
, **kwargs
):
7599 HitTest(self, Point pt) -> int
7601 Test where the given (in client coords) point lies
7603 return _core_
.Window_HitTest(*args
, **kwargs
)
7605 def GetBorder(*args
):
7607 GetBorder(self, long flags) -> int
7608 GetBorder(self) -> int
7610 Get border for the flags of this window
7612 return _core_
.Window_GetBorder(*args
)
7614 def UpdateWindowUI(*args
, **kwargs
):
7616 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7618 This function sends EVT_UPDATE_UI events to the window. The particular
7619 implementation depends on the window; for example a wx.ToolBar will
7620 send an update UI event for each toolbar button, and a wx.Frame will
7621 send an update UI event for each menubar menu item. You can call this
7622 function from your application to ensure that your UI is up-to-date at
7623 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7624 concerned). This may be necessary if you have called
7625 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7626 limit the overhead that wxWindows incurs by sending update UI events
7629 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
7631 def PopupMenuXY(*args
, **kwargs
):
7633 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7635 Pops up the given menu at the specified coordinates, relative to this window,
7636 and returns control when the user has dismissed the menu. If a menu item is
7637 selected, the corresponding menu event is generated and will be processed as
7638 usual. If the default position is given then the current position of the
7639 mouse cursor will be used.
7641 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
7643 def PopupMenu(*args
, **kwargs
):
7645 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7647 Pops up the given menu at the specified coordinates, relative to this window,
7648 and returns control when the user has dismissed the menu. If a menu item is
7649 selected, the corresponding menu event is generated and will be processed as
7650 usual. If the default position is given then the current position of the
7651 mouse cursor will be used.
7653 return _core_
.Window_PopupMenu(*args
, **kwargs
)
7655 def GetHandle(*args
, **kwargs
):
7657 GetHandle(self) -> long
7659 Returns the platform-specific handle (as a long integer) of the
7660 physical window. Currently on wxMac it returns the handle of the
7661 toplevel parent of the window.
7663 return _core_
.Window_GetHandle(*args
, **kwargs
)
7665 def AssociateHandle(*args
, **kwargs
):
7667 AssociateHandle(self, long handle)
7669 Associate the window with a new native handle
7671 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
7673 def DissociateHandle(*args
, **kwargs
):
7675 DissociateHandle(self)
7677 Dissociate the current native handle from the window
7679 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
7681 def HasScrollbar(*args
, **kwargs
):
7683 HasScrollbar(self, int orient) -> bool
7685 Does the window have the scrollbar for this orientation?
7687 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
7689 def SetScrollbar(*args
, **kwargs
):
7691 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7694 Sets the scrollbar properties of a built-in scrollbar.
7696 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
7698 def SetScrollPos(*args
, **kwargs
):
7700 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7702 Sets the position of one of the built-in scrollbars.
7704 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
7706 def GetScrollPos(*args
, **kwargs
):
7708 GetScrollPos(self, int orientation) -> int
7710 Returns the built-in scrollbar position.
7712 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
7714 def GetScrollThumb(*args
, **kwargs
):
7716 GetScrollThumb(self, int orientation) -> int
7718 Returns the built-in scrollbar thumb size.
7720 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
7722 def GetScrollRange(*args
, **kwargs
):
7724 GetScrollRange(self, int orientation) -> int
7726 Returns the built-in scrollbar range.
7728 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
7730 def ScrollWindow(*args
, **kwargs
):
7732 ScrollWindow(self, int dx, int dy, Rect rect=None)
7734 Physically scrolls the pixels in the window and move child windows
7735 accordingly. Use this function to optimise your scrolling
7736 implementations, to minimise the area that must be redrawn. Note that
7737 it is rarely required to call this function from a user program.
7739 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
7741 def ScrollLines(*args
, **kwargs
):
7743 ScrollLines(self, int lines) -> bool
7745 If the platform and window class supports it, scrolls the window by
7746 the given number of lines down, if lines is positive, or up if lines
7747 is negative. Returns True if the window was scrolled, False if it was
7748 already on top/bottom and nothing was done.
7750 return _core_
.Window_ScrollLines(*args
, **kwargs
)
7752 def ScrollPages(*args
, **kwargs
):
7754 ScrollPages(self, int pages) -> bool
7756 If the platform and window class supports it, scrolls the window by
7757 the given number of pages down, if pages is positive, or up if pages
7758 is negative. Returns True if the window was scrolled, False if it was
7759 already on top/bottom and nothing was done.
7761 return _core_
.Window_ScrollPages(*args
, **kwargs
)
7763 def LineUp(*args
, **kwargs
):
7765 LineUp(self) -> bool
7767 This is just a wrapper for ScrollLines(-1).
7769 return _core_
.Window_LineUp(*args
, **kwargs
)
7771 def LineDown(*args
, **kwargs
):
7773 LineDown(self) -> bool
7775 This is just a wrapper for ScrollLines(1).
7777 return _core_
.Window_LineDown(*args
, **kwargs
)
7779 def PageUp(*args
, **kwargs
):
7781 PageUp(self) -> bool
7783 This is just a wrapper for ScrollPages(-1).
7785 return _core_
.Window_PageUp(*args
, **kwargs
)
7787 def PageDown(*args
, **kwargs
):
7789 PageDown(self) -> bool
7791 This is just a wrapper for ScrollPages(1).
7793 return _core_
.Window_PageDown(*args
, **kwargs
)
7795 def SetHelpText(*args
, **kwargs
):
7797 SetHelpText(self, String text)
7799 Sets the help text to be used as context-sensitive help for this
7800 window. Note that the text is actually stored by the current
7801 wxHelpProvider implementation, and not in the window object itself.
7803 return _core_
.Window_SetHelpText(*args
, **kwargs
)
7805 def SetHelpTextForId(*args
, **kwargs
):
7807 SetHelpTextForId(self, String text)
7809 Associate this help text with all windows with the same id as this
7812 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
7814 def GetHelpText(*args
, **kwargs
):
7816 GetHelpText(self) -> String
7818 Gets the help text to be used as context-sensitive help for this
7819 window. Note that the text is actually stored by the current
7820 wxHelpProvider implementation, and not in the window object itself.
7822 return _core_
.Window_GetHelpText(*args
, **kwargs
)
7824 def SetToolTipString(*args
, **kwargs
):
7826 SetToolTipString(self, String tip)
7828 Attach a tooltip to the window.
7830 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
7832 def SetToolTip(*args
, **kwargs
):
7834 SetToolTip(self, ToolTip tip)
7836 Attach a tooltip to the window.
7838 return _core_
.Window_SetToolTip(*args
, **kwargs
)
7840 def GetToolTip(*args
, **kwargs
):
7842 GetToolTip(self) -> ToolTip
7844 get the associated tooltip or None if none
7846 return _core_
.Window_GetToolTip(*args
, **kwargs
)
7848 def SetDropTarget(*args
, **kwargs
):
7850 SetDropTarget(self, DropTarget dropTarget)
7852 Associates a drop target with this window. If the window already has
7853 a drop target, it is deleted.
7855 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
7857 def GetDropTarget(*args
, **kwargs
):
7859 GetDropTarget(self) -> DropTarget
7861 Returns the associated drop target, which may be None.
7863 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
7865 def SetConstraints(*args
, **kwargs
):
7867 SetConstraints(self, LayoutConstraints constraints)
7869 Sets the window to have the given layout constraints. If an existing
7870 layout constraints object is already owned by the window, it will be
7871 deleted. Pass None to disassociate and delete the window's current
7874 You must call SetAutoLayout to tell a window to use the constraints
7875 automatically in its default EVT_SIZE handler; otherwise, you must
7876 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7877 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7880 return _core_
.Window_SetConstraints(*args
, **kwargs
)
7882 def GetConstraints(*args
, **kwargs
):
7884 GetConstraints(self) -> LayoutConstraints
7886 Returns a pointer to the window's layout constraints, or None if there
7889 return _core_
.Window_GetConstraints(*args
, **kwargs
)
7891 def SetAutoLayout(*args
, **kwargs
):
7893 SetAutoLayout(self, bool autoLayout)
7895 Determines whether the Layout function will be called automatically
7896 when the window is resized. It is called implicitly by SetSizer but
7897 if you use SetConstraints you should call it manually or otherwise the
7898 window layout won't be correctly updated when its size changes.
7900 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
7902 def GetAutoLayout(*args
, **kwargs
):
7904 GetAutoLayout(self) -> bool
7906 Returns the current autoLayout setting
7908 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
7910 def Layout(*args
, **kwargs
):
7912 Layout(self) -> bool
7914 Invokes the constraint-based layout algorithm or the sizer-based
7915 algorithm for this window. See SetAutoLayout: when auto layout is on,
7916 this function gets called automatically by the default EVT_SIZE
7917 handler when the window is resized.
7919 return _core_
.Window_Layout(*args
, **kwargs
)
7921 def SetSizer(*args
, **kwargs
):
7923 SetSizer(self, Sizer sizer, bool deleteOld=True)
7925 Sets the window to have the given layout sizer. The window will then
7926 own the object, and will take care of its deletion. If an existing
7927 layout sizer object is already owned by the window, it will be deleted
7928 if the deleteOld parameter is true. Note that this function will also
7929 call SetAutoLayout implicitly with a True parameter if the sizer is
7930 non-None, and False otherwise.
7932 return _core_
.Window_SetSizer(*args
, **kwargs
)
7934 def SetSizerAndFit(*args
, **kwargs
):
7936 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7938 The same as SetSizer, except it also sets the size hints for the
7939 window based on the sizer's minimum size.
7941 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
7943 def GetSizer(*args
, **kwargs
):
7945 GetSizer(self) -> Sizer
7947 Return the sizer associated with the window by a previous call to
7948 SetSizer or None if there isn't one.
7950 return _core_
.Window_GetSizer(*args
, **kwargs
)
7952 def SetContainingSizer(*args
, **kwargs
):
7954 SetContainingSizer(self, Sizer sizer)
7956 This normally does not need to be called by application code. It is
7957 called internally when a window is added to a sizer, and is used so
7958 the window can remove itself from the sizer when it is destroyed.
7960 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
7962 def GetContainingSizer(*args
, **kwargs
):
7964 GetContainingSizer(self) -> Sizer
7966 Return the sizer that this window is a member of, if any, otherwise None.
7968 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
7970 def InheritAttributes(*args
, **kwargs
):
7972 InheritAttributes(self)
7974 This function is (or should be, in case of custom controls) called
7975 during window creation to intelligently set up the window visual
7976 attributes, that is the font and the foreground and background
7979 By 'intelligently' the following is meant: by default, all windows use
7980 their own default attributes. However if some of the parent's
7981 attributes are explicitly changed (that is, using SetFont and not
7982 SetOwnFont) and if the corresponding attribute hadn't been
7983 explicitly set for this window itself, then this window takes the same
7984 value as used by the parent. In addition, if the window overrides
7985 ShouldInheritColours to return false, the colours will not be changed
7986 no matter what and only the font might.
7988 This rather complicated logic is necessary in order to accommodate the
7989 different usage scenarios. The most common one is when all default
7990 attributes are used and in this case, nothing should be inherited as
7991 in modern GUIs different controls use different fonts (and colours)
7992 than their siblings so they can't inherit the same value from the
7993 parent. However it was also deemed desirable to allow to simply change
7994 the attributes of all children at once by just changing the font or
7995 colour of their common parent, hence in this case we do inherit the
7999 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
8001 def ShouldInheritColours(*args
, **kwargs
):
8003 ShouldInheritColours(self) -> bool
8005 Return true from here to allow the colours of this window to be
8006 changed by InheritAttributes, returning false forbids inheriting them
8007 from the parent window.
8009 The base class version returns false, but this method is overridden in
8010 wxControl where it returns true.
8012 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
8014 def PostCreate(self
, pre
):
8016 Phase 3 of the 2-phase create <wink!>
8017 Call this method after precreating the window with the 2-phase create method.
8019 self
.this
= pre
.this
8020 self
.thisown
= pre
.thisown
8022 if hasattr(self
, '_setOORInfo'):
8023 self
._setOORInfo
(self
)
8024 if hasattr(self
, '_setCallbackInfo'):
8025 self
._setCallbackInfo
(self
, self
.__class
__)
8028 class WindowPtr(Window
):
8029 def __init__(self
, this
):
8031 if not hasattr(self
,"thisown"): self
.thisown
= 0
8032 self
.__class
__ = Window
8033 _core_
.Window_swigregister(WindowPtr
)
8035 def PreWindow(*args
, **kwargs
):
8037 PreWindow() -> Window
8039 Precreate a Window for 2-phase creation.
8041 val
= _core_
.new_PreWindow(*args
, **kwargs
)
8045 def Window_NewControlId(*args
, **kwargs
):
8047 Window_NewControlId() -> int
8049 Generate a control id for the controls which were not given one.
8051 return _core_
.Window_NewControlId(*args
, **kwargs
)
8053 def Window_NextControlId(*args
, **kwargs
):
8055 Window_NextControlId(int winid) -> int
8057 Get the id of the control following the one with the given
8060 return _core_
.Window_NextControlId(*args
, **kwargs
)
8062 def Window_PrevControlId(*args
, **kwargs
):
8064 Window_PrevControlId(int winid) -> int
8066 Get the id of the control preceding the one with the given
8069 return _core_
.Window_PrevControlId(*args
, **kwargs
)
8071 def Window_FindFocus(*args
, **kwargs
):
8073 Window_FindFocus() -> Window
8075 Returns the window or control that currently has the keyboard focus,
8078 return _core_
.Window_FindFocus(*args
, **kwargs
)
8080 def Window_GetCapture(*args
, **kwargs
):
8082 Window_GetCapture() -> Window
8084 Returns the window which currently captures the mouse or None
8086 return _core_
.Window_GetCapture(*args
, **kwargs
)
8088 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
8090 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8092 Get the default attributes for this class. This is useful if you want
8093 to use the same font or colour in your own control as in a standard
8094 control -- which is a much better idea than hard coding specific
8095 colours or fonts which might look completely out of place on the
8096 user's system, especially if it uses themes.
8098 The variant parameter is only relevant under Mac currently and is
8099 ignore under other platforms. Under Mac, it will change the size of
8100 the returned font. See `wx.Window.SetWindowVariant` for more about
8103 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
8105 def DLG_PNT(win
, point_or_x
, y
=None):
8107 Convenience function for converting a Point or (x,y) in
8108 dialog units to pixel units.
8111 return win
.ConvertDialogPointToPixels(point_or_x
)
8113 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
8115 def DLG_SZE(win
, size_width
, height
=None):
8117 Convenience function for converting a Size or (w,h) in
8118 dialog units to pixel units.
8121 return win
.ConvertDialogSizeToPixels(size_width
)
8123 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
8126 def FindWindowById(*args
, **kwargs
):
8128 FindWindowById(long id, Window parent=None) -> Window
8130 Find the first window in the application with the given id. If parent
8131 is None, the search will start from all top-level frames and dialog
8132 boxes; if non-None, the search will be limited to the given window
8133 hierarchy. The search is recursive in both cases.
8135 return _core_
.FindWindowById(*args
, **kwargs
)
8137 def FindWindowByName(*args
, **kwargs
):
8139 FindWindowByName(String name, Window parent=None) -> Window
8141 Find a window by its name (as given in a window constructor or Create
8142 function call). If parent is None, the search will start from all
8143 top-level frames and dialog boxes; if non-None, the search will be
8144 limited to the given window hierarchy. The search is recursive in both
8147 If no window with such name is found, wx.FindWindowByLabel is called.
8149 return _core_
.FindWindowByName(*args
, **kwargs
)
8151 def FindWindowByLabel(*args
, **kwargs
):
8153 FindWindowByLabel(String label, Window parent=None) -> Window
8155 Find a window by its label. Depending on the type of window, the label
8156 may be a window title or panel item label. If parent is None, the
8157 search will start from all top-level frames and dialog boxes; if
8158 non-None, the search will be limited to the given window
8159 hierarchy. The search is recursive in both cases.
8161 return _core_
.FindWindowByLabel(*args
, **kwargs
)
8163 def Window_FromHWND(*args
, **kwargs
):
8164 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8165 return _core_
.Window_FromHWND(*args
, **kwargs
)
8166 #---------------------------------------------------------------------------
8168 class Validator(EvtHandler
):
8169 """Proxy of C++ Validator class"""
8171 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8172 def __init__(self
, *args
, **kwargs
):
8173 """__init__(self) -> Validator"""
8174 newobj
= _core_
.new_Validator(*args
, **kwargs
)
8175 self
.this
= newobj
.this
8178 self
._setOORInfo
(self
)
8180 def Clone(*args
, **kwargs
):
8181 """Clone(self) -> Validator"""
8182 return _core_
.Validator_Clone(*args
, **kwargs
)
8184 def Validate(*args
, **kwargs
):
8185 """Validate(self, Window parent) -> bool"""
8186 return _core_
.Validator_Validate(*args
, **kwargs
)
8188 def TransferToWindow(*args
, **kwargs
):
8189 """TransferToWindow(self) -> bool"""
8190 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
8192 def TransferFromWindow(*args
, **kwargs
):
8193 """TransferFromWindow(self) -> bool"""
8194 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
8196 def GetWindow(*args
, **kwargs
):
8197 """GetWindow(self) -> Window"""
8198 return _core_
.Validator_GetWindow(*args
, **kwargs
)
8200 def SetWindow(*args
, **kwargs
):
8201 """SetWindow(self, Window window)"""
8202 return _core_
.Validator_SetWindow(*args
, **kwargs
)
8204 def IsSilent(*args
, **kwargs
):
8205 """IsSilent() -> bool"""
8206 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8208 IsSilent
= staticmethod(IsSilent
)
8209 def SetBellOnError(*args
, **kwargs
):
8210 """SetBellOnError(int doIt=True)"""
8211 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8213 SetBellOnError
= staticmethod(SetBellOnError
)
8215 class ValidatorPtr(Validator
):
8216 def __init__(self
, this
):
8218 if not hasattr(self
,"thisown"): self
.thisown
= 0
8219 self
.__class
__ = Validator
8220 _core_
.Validator_swigregister(ValidatorPtr
)
8222 def Validator_IsSilent(*args
, **kwargs
):
8223 """Validator_IsSilent() -> bool"""
8224 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8226 def Validator_SetBellOnError(*args
, **kwargs
):
8227 """Validator_SetBellOnError(int doIt=True)"""
8228 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8230 class PyValidator(Validator
):
8231 """Proxy of C++ PyValidator class"""
8233 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8234 def __init__(self
, *args
, **kwargs
):
8235 """__init__(self) -> PyValidator"""
8236 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
8237 self
.this
= newobj
.this
8241 self
._setCallbackInfo
(self
, PyValidator
, 1)
8242 self
._setOORInfo
(self
)
8244 def _setCallbackInfo(*args
, **kwargs
):
8245 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8246 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
8249 class PyValidatorPtr(PyValidator
):
8250 def __init__(self
, this
):
8252 if not hasattr(self
,"thisown"): self
.thisown
= 0
8253 self
.__class
__ = PyValidator
8254 _core_
.PyValidator_swigregister(PyValidatorPtr
)
8256 #---------------------------------------------------------------------------
8258 class Menu(EvtHandler
):
8259 """Proxy of C++ Menu class"""
8261 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8262 def __init__(self
, *args
, **kwargs
):
8263 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8264 newobj
= _core_
.new_Menu(*args
, **kwargs
)
8265 self
.this
= newobj
.this
8268 self
._setOORInfo
(self
)
8270 def Append(*args
, **kwargs
):
8271 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8272 return _core_
.Menu_Append(*args
, **kwargs
)
8274 def AppendSeparator(*args
, **kwargs
):
8275 """AppendSeparator(self) -> MenuItem"""
8276 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
8278 def AppendCheckItem(*args
, **kwargs
):
8279 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8280 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
8282 def AppendRadioItem(*args
, **kwargs
):
8283 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8284 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
8286 def AppendMenu(*args
, **kwargs
):
8287 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8288 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
8290 def AppendItem(*args
, **kwargs
):
8291 """AppendItem(self, MenuItem item) -> MenuItem"""
8292 return _core_
.Menu_AppendItem(*args
, **kwargs
)
8294 def Break(*args
, **kwargs
):
8296 return _core_
.Menu_Break(*args
, **kwargs
)
8298 def InsertItem(*args
, **kwargs
):
8299 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8300 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8302 def Insert(*args
, **kwargs
):
8304 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8305 int kind=ITEM_NORMAL) -> MenuItem
8307 return _core_
.Menu_Insert(*args
, **kwargs
)
8309 def InsertSeparator(*args
, **kwargs
):
8310 """InsertSeparator(self, size_t pos) -> MenuItem"""
8311 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8313 def InsertCheckItem(*args
, **kwargs
):
8314 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8315 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8317 def InsertRadioItem(*args
, **kwargs
):
8318 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8319 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8321 def InsertMenu(*args
, **kwargs
):
8322 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8323 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8325 def PrependItem(*args
, **kwargs
):
8326 """PrependItem(self, MenuItem item) -> MenuItem"""
8327 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8329 def Prepend(*args
, **kwargs
):
8330 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8331 return _core_
.Menu_Prepend(*args
, **kwargs
)
8333 def PrependSeparator(*args
, **kwargs
):
8334 """PrependSeparator(self) -> MenuItem"""
8335 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8337 def PrependCheckItem(*args
, **kwargs
):
8338 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8339 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8341 def PrependRadioItem(*args
, **kwargs
):
8342 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8343 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8345 def PrependMenu(*args
, **kwargs
):
8346 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8347 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8349 def Remove(*args
, **kwargs
):
8350 """Remove(self, int id) -> MenuItem"""
8351 return _core_
.Menu_Remove(*args
, **kwargs
)
8353 def RemoveItem(*args
, **kwargs
):
8354 """RemoveItem(self, MenuItem item) -> MenuItem"""
8355 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8357 def Delete(*args
, **kwargs
):
8358 """Delete(self, int id) -> bool"""
8359 return _core_
.Menu_Delete(*args
, **kwargs
)
8361 def DeleteItem(*args
, **kwargs
):
8362 """DeleteItem(self, MenuItem item) -> bool"""
8363 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8365 def Destroy(*args
, **kwargs
):
8369 Deletes the C++ object this Python object is a proxy for.
8371 return _core_
.Menu_Destroy(*args
, **kwargs
)
8373 def DestroyId(*args
, **kwargs
):
8375 DestroyId(self, int id) -> bool
8377 Deletes the C++ object this Python object is a proxy for.
8379 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8381 def DestroyItem(*args
, **kwargs
):
8383 DestroyItem(self, MenuItem item) -> bool
8385 Deletes the C++ object this Python object is a proxy for.
8387 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8389 def GetMenuItemCount(*args
, **kwargs
):
8390 """GetMenuItemCount(self) -> size_t"""
8391 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8393 def GetMenuItems(*args
, **kwargs
):
8394 """GetMenuItems(self) -> PyObject"""
8395 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8397 def FindItem(*args
, **kwargs
):
8398 """FindItem(self, String item) -> int"""
8399 return _core_
.Menu_FindItem(*args
, **kwargs
)
8401 def FindItemById(*args
, **kwargs
):
8402 """FindItemById(self, int id) -> MenuItem"""
8403 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8405 def FindItemByPosition(*args
, **kwargs
):
8406 """FindItemByPosition(self, size_t position) -> MenuItem"""
8407 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
8409 def Enable(*args
, **kwargs
):
8410 """Enable(self, int id, bool enable)"""
8411 return _core_
.Menu_Enable(*args
, **kwargs
)
8413 def IsEnabled(*args
, **kwargs
):
8414 """IsEnabled(self, int id) -> bool"""
8415 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
8417 def Check(*args
, **kwargs
):
8418 """Check(self, int id, bool check)"""
8419 return _core_
.Menu_Check(*args
, **kwargs
)
8421 def IsChecked(*args
, **kwargs
):
8422 """IsChecked(self, int id) -> bool"""
8423 return _core_
.Menu_IsChecked(*args
, **kwargs
)
8425 def SetLabel(*args
, **kwargs
):
8426 """SetLabel(self, int id, String label)"""
8427 return _core_
.Menu_SetLabel(*args
, **kwargs
)
8429 def GetLabel(*args
, **kwargs
):
8430 """GetLabel(self, int id) -> String"""
8431 return _core_
.Menu_GetLabel(*args
, **kwargs
)
8433 def SetHelpString(*args
, **kwargs
):
8434 """SetHelpString(self, int id, String helpString)"""
8435 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
8437 def GetHelpString(*args
, **kwargs
):
8438 """GetHelpString(self, int id) -> String"""
8439 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
8441 def SetTitle(*args
, **kwargs
):
8442 """SetTitle(self, String title)"""
8443 return _core_
.Menu_SetTitle(*args
, **kwargs
)
8445 def GetTitle(*args
, **kwargs
):
8446 """GetTitle(self) -> String"""
8447 return _core_
.Menu_GetTitle(*args
, **kwargs
)
8449 def SetEventHandler(*args
, **kwargs
):
8450 """SetEventHandler(self, EvtHandler handler)"""
8451 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
8453 def GetEventHandler(*args
, **kwargs
):
8454 """GetEventHandler(self) -> EvtHandler"""
8455 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
8457 def SetInvokingWindow(*args
, **kwargs
):
8458 """SetInvokingWindow(self, Window win)"""
8459 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
8461 def GetInvokingWindow(*args
, **kwargs
):
8462 """GetInvokingWindow(self) -> Window"""
8463 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
8465 def GetStyle(*args
, **kwargs
):
8466 """GetStyle(self) -> long"""
8467 return _core_
.Menu_GetStyle(*args
, **kwargs
)
8469 def UpdateUI(*args
, **kwargs
):
8470 """UpdateUI(self, EvtHandler source=None)"""
8471 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
8473 def GetMenuBar(*args
, **kwargs
):
8474 """GetMenuBar(self) -> MenuBar"""
8475 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
8477 def Attach(*args
, **kwargs
):
8478 """Attach(self, wxMenuBarBase menubar)"""
8479 return _core_
.Menu_Attach(*args
, **kwargs
)
8481 def Detach(*args
, **kwargs
):
8483 return _core_
.Menu_Detach(*args
, **kwargs
)
8485 def IsAttached(*args
, **kwargs
):
8486 """IsAttached(self) -> bool"""
8487 return _core_
.Menu_IsAttached(*args
, **kwargs
)
8489 def SetParent(*args
, **kwargs
):
8490 """SetParent(self, Menu parent)"""
8491 return _core_
.Menu_SetParent(*args
, **kwargs
)
8493 def GetParent(*args
, **kwargs
):
8494 """GetParent(self) -> Menu"""
8495 return _core_
.Menu_GetParent(*args
, **kwargs
)
8498 class MenuPtr(Menu
):
8499 def __init__(self
, this
):
8501 if not hasattr(self
,"thisown"): self
.thisown
= 0
8502 self
.__class
__ = Menu
8503 _core_
.Menu_swigregister(MenuPtr
)
8504 DefaultValidator
= cvar
.DefaultValidator
8506 #---------------------------------------------------------------------------
8508 class MenuBar(Window
):
8509 """Proxy of C++ MenuBar class"""
8511 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8512 def __init__(self
, *args
, **kwargs
):
8513 """__init__(self, long style=0) -> MenuBar"""
8514 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
8515 self
.this
= newobj
.this
8518 self
._setOORInfo
(self
)
8520 def Append(*args
, **kwargs
):
8521 """Append(self, Menu menu, String title) -> bool"""
8522 return _core_
.MenuBar_Append(*args
, **kwargs
)
8524 def Insert(*args
, **kwargs
):
8525 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8526 return _core_
.MenuBar_Insert(*args
, **kwargs
)
8528 def GetMenuCount(*args
, **kwargs
):
8529 """GetMenuCount(self) -> size_t"""
8530 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
8532 def GetMenu(*args
, **kwargs
):
8533 """GetMenu(self, size_t pos) -> Menu"""
8534 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
8536 def Replace(*args
, **kwargs
):
8537 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8538 return _core_
.MenuBar_Replace(*args
, **kwargs
)
8540 def Remove(*args
, **kwargs
):
8541 """Remove(self, size_t pos) -> Menu"""
8542 return _core_
.MenuBar_Remove(*args
, **kwargs
)
8544 def EnableTop(*args
, **kwargs
):
8545 """EnableTop(self, size_t pos, bool enable)"""
8546 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
8548 def IsEnabledTop(*args
, **kwargs
):
8549 """IsEnabledTop(self, size_t pos) -> bool"""
8550 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
8552 def SetLabelTop(*args
, **kwargs
):
8553 """SetLabelTop(self, size_t pos, String label)"""
8554 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
8556 def GetLabelTop(*args
, **kwargs
):
8557 """GetLabelTop(self, size_t pos) -> String"""
8558 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
8560 def FindMenuItem(*args
, **kwargs
):
8561 """FindMenuItem(self, String menu, String item) -> int"""
8562 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
8564 def FindItemById(*args
, **kwargs
):
8565 """FindItemById(self, int id) -> MenuItem"""
8566 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
8568 def FindMenu(*args
, **kwargs
):
8569 """FindMenu(self, String title) -> int"""
8570 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
8572 def Enable(*args
, **kwargs
):
8573 """Enable(self, int id, bool enable)"""
8574 return _core_
.MenuBar_Enable(*args
, **kwargs
)
8576 def Check(*args
, **kwargs
):
8577 """Check(self, int id, bool check)"""
8578 return _core_
.MenuBar_Check(*args
, **kwargs
)
8580 def IsChecked(*args
, **kwargs
):
8581 """IsChecked(self, int id) -> bool"""
8582 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
8584 def IsEnabled(*args
, **kwargs
):
8585 """IsEnabled(self, int id) -> bool"""
8586 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
8588 def SetLabel(*args
, **kwargs
):
8589 """SetLabel(self, int id, String label)"""
8590 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
8592 def GetLabel(*args
, **kwargs
):
8593 """GetLabel(self, int id) -> String"""
8594 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
8596 def SetHelpString(*args
, **kwargs
):
8597 """SetHelpString(self, int id, String helpString)"""
8598 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
8600 def GetHelpString(*args
, **kwargs
):
8601 """GetHelpString(self, int id) -> String"""
8602 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
8604 def GetFrame(*args
, **kwargs
):
8605 """GetFrame(self) -> wxFrame"""
8606 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
8608 def IsAttached(*args
, **kwargs
):
8609 """IsAttached(self) -> bool"""
8610 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
8612 def Attach(*args
, **kwargs
):
8613 """Attach(self, wxFrame frame)"""
8614 return _core_
.MenuBar_Attach(*args
, **kwargs
)
8616 def Detach(*args
, **kwargs
):
8618 return _core_
.MenuBar_Detach(*args
, **kwargs
)
8621 class MenuBarPtr(MenuBar
):
8622 def __init__(self
, this
):
8624 if not hasattr(self
,"thisown"): self
.thisown
= 0
8625 self
.__class
__ = MenuBar
8626 _core_
.MenuBar_swigregister(MenuBarPtr
)
8628 #---------------------------------------------------------------------------
8630 class MenuItem(Object
):
8631 """Proxy of C++ MenuItem class"""
8633 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8634 def __init__(self
, *args
, **kwargs
):
8636 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8637 String help=EmptyString, int kind=ITEM_NORMAL,
8638 Menu subMenu=None) -> MenuItem
8640 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
8641 self
.this
= newobj
.this
8644 def GetMenu(*args
, **kwargs
):
8645 """GetMenu(self) -> Menu"""
8646 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
8648 def SetMenu(*args
, **kwargs
):
8649 """SetMenu(self, Menu menu)"""
8650 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
8652 def SetId(*args
, **kwargs
):
8653 """SetId(self, int id)"""
8654 return _core_
.MenuItem_SetId(*args
, **kwargs
)
8656 def GetId(*args
, **kwargs
):
8657 """GetId(self) -> int"""
8658 return _core_
.MenuItem_GetId(*args
, **kwargs
)
8660 def IsSeparator(*args
, **kwargs
):
8661 """IsSeparator(self) -> bool"""
8662 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
8664 def SetText(*args
, **kwargs
):
8665 """SetText(self, String str)"""
8666 return _core_
.MenuItem_SetText(*args
, **kwargs
)
8668 def GetLabel(*args
, **kwargs
):
8669 """GetLabel(self) -> String"""
8670 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
8672 def GetText(*args
, **kwargs
):
8673 """GetText(self) -> String"""
8674 return _core_
.MenuItem_GetText(*args
, **kwargs
)
8676 def GetLabelFromText(*args
, **kwargs
):
8677 """GetLabelFromText(String text) -> String"""
8678 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8680 GetLabelFromText
= staticmethod(GetLabelFromText
)
8681 def GetKind(*args
, **kwargs
):
8682 """GetKind(self) -> int"""
8683 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
8685 def SetKind(*args
, **kwargs
):
8686 """SetKind(self, int kind)"""
8687 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
8689 def SetCheckable(*args
, **kwargs
):
8690 """SetCheckable(self, bool checkable)"""
8691 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
8693 def IsCheckable(*args
, **kwargs
):
8694 """IsCheckable(self) -> bool"""
8695 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
8697 def IsSubMenu(*args
, **kwargs
):
8698 """IsSubMenu(self) -> bool"""
8699 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
8701 def SetSubMenu(*args
, **kwargs
):
8702 """SetSubMenu(self, Menu menu)"""
8703 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
8705 def GetSubMenu(*args
, **kwargs
):
8706 """GetSubMenu(self) -> Menu"""
8707 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
8709 def Enable(*args
, **kwargs
):
8710 """Enable(self, bool enable=True)"""
8711 return _core_
.MenuItem_Enable(*args
, **kwargs
)
8713 def IsEnabled(*args
, **kwargs
):
8714 """IsEnabled(self) -> bool"""
8715 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
8717 def Check(*args
, **kwargs
):
8718 """Check(self, bool check=True)"""
8719 return _core_
.MenuItem_Check(*args
, **kwargs
)
8721 def IsChecked(*args
, **kwargs
):
8722 """IsChecked(self) -> bool"""
8723 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
8725 def Toggle(*args
, **kwargs
):
8727 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
8729 def SetHelp(*args
, **kwargs
):
8730 """SetHelp(self, String str)"""
8731 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
8733 def GetHelp(*args
, **kwargs
):
8734 """GetHelp(self) -> String"""
8735 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
8737 def GetAccel(*args
, **kwargs
):
8738 """GetAccel(self) -> AcceleratorEntry"""
8739 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
8741 def SetAccel(*args
, **kwargs
):
8742 """SetAccel(self, AcceleratorEntry accel)"""
8743 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
8745 def SetFont(*args
, **kwargs
):
8746 """SetFont(self, Font font)"""
8747 return _core_
.MenuItem_SetFont(*args
, **kwargs
)
8749 def GetFont(*args
, **kwargs
):
8750 """GetFont(self) -> Font"""
8751 return _core_
.MenuItem_GetFont(*args
, **kwargs
)
8753 def SetTextColour(*args
, **kwargs
):
8754 """SetTextColour(self, Colour colText)"""
8755 return _core_
.MenuItem_SetTextColour(*args
, **kwargs
)
8757 def GetTextColour(*args
, **kwargs
):
8758 """GetTextColour(self) -> Colour"""
8759 return _core_
.MenuItem_GetTextColour(*args
, **kwargs
)
8761 def SetBackgroundColour(*args
, **kwargs
):
8762 """SetBackgroundColour(self, Colour colBack)"""
8763 return _core_
.MenuItem_SetBackgroundColour(*args
, **kwargs
)
8765 def GetBackgroundColour(*args
, **kwargs
):
8766 """GetBackgroundColour(self) -> Colour"""
8767 return _core_
.MenuItem_GetBackgroundColour(*args
, **kwargs
)
8769 def SetBitmaps(*args
, **kwargs
):
8770 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8771 return _core_
.MenuItem_SetBitmaps(*args
, **kwargs
)
8773 def SetDisabledBitmap(*args
, **kwargs
):
8774 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8775 return _core_
.MenuItem_SetDisabledBitmap(*args
, **kwargs
)
8777 def GetDisabledBitmap(*args
, **kwargs
):
8778 """GetDisabledBitmap(self) -> Bitmap"""
8779 return _core_
.MenuItem_GetDisabledBitmap(*args
, **kwargs
)
8781 def SetMarginWidth(*args
, **kwargs
):
8782 """SetMarginWidth(self, int nWidth)"""
8783 return _core_
.MenuItem_SetMarginWidth(*args
, **kwargs
)
8785 def GetMarginWidth(*args
, **kwargs
):
8786 """GetMarginWidth(self) -> int"""
8787 return _core_
.MenuItem_GetMarginWidth(*args
, **kwargs
)
8789 def GetDefaultMarginWidth(*args
, **kwargs
):
8790 """GetDefaultMarginWidth() -> int"""
8791 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8793 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
8794 def IsOwnerDrawn(*args
, **kwargs
):
8795 """IsOwnerDrawn(self) -> bool"""
8796 return _core_
.MenuItem_IsOwnerDrawn(*args
, **kwargs
)
8798 def SetOwnerDrawn(*args
, **kwargs
):
8799 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8800 return _core_
.MenuItem_SetOwnerDrawn(*args
, **kwargs
)
8802 def ResetOwnerDrawn(*args
, **kwargs
):
8803 """ResetOwnerDrawn(self)"""
8804 return _core_
.MenuItem_ResetOwnerDrawn(*args
, **kwargs
)
8806 def SetBitmap(*args
, **kwargs
):
8807 """SetBitmap(self, Bitmap bitmap)"""
8808 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
8810 def GetBitmap(*args
, **kwargs
):
8811 """GetBitmap(self) -> Bitmap"""
8812 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
8815 class MenuItemPtr(MenuItem
):
8816 def __init__(self
, this
):
8818 if not hasattr(self
,"thisown"): self
.thisown
= 0
8819 self
.__class
__ = MenuItem
8820 _core_
.MenuItem_swigregister(MenuItemPtr
)
8822 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8823 """MenuItem_GetLabelFromText(String text) -> String"""
8824 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8826 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8827 """MenuItem_GetDefaultMarginWidth() -> int"""
8828 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8830 #---------------------------------------------------------------------------
8832 class Control(Window
):
8834 This is the base class for a control or 'widget'.
8836 A control is generally a small window which processes user input
8837 and/or displays one or more item of data.
8840 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8841 def __init__(self
, *args
, **kwargs
):
8843 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8844 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8845 String name=ControlNameStr) -> Control
8847 Create a Control. Normally you should only call this from a subclass'
8848 __init__ as a plain old wx.Control is not very useful.
8850 newobj
= _core_
.new_Control(*args
, **kwargs
)
8851 self
.this
= newobj
.this
8854 self
._setOORInfo
(self
)
8856 def Create(*args
, **kwargs
):
8858 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8859 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8860 String name=ControlNameStr) -> bool
8862 Do the 2nd phase and create the GUI control.
8864 return _core_
.Control_Create(*args
, **kwargs
)
8866 def Command(*args
, **kwargs
):
8868 Command(self, CommandEvent event)
8870 Simulates the effect of the user issuing a command to the item.
8872 :see: `wx.CommandEvent`
8875 return _core_
.Control_Command(*args
, **kwargs
)
8877 def GetLabel(*args
, **kwargs
):
8879 GetLabel(self) -> String
8881 Return a control's text.
8883 return _core_
.Control_GetLabel(*args
, **kwargs
)
8885 def SetLabel(*args
, **kwargs
):
8887 SetLabel(self, String label)
8889 Sets the item's text.
8891 return _core_
.Control_SetLabel(*args
, **kwargs
)
8893 def GetClassDefaultAttributes(*args
, **kwargs
):
8895 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8897 Get the default attributes for this class. This is useful if you want
8898 to use the same font or colour in your own control as in a standard
8899 control -- which is a much better idea than hard coding specific
8900 colours or fonts which might look completely out of place on the
8901 user's system, especially if it uses themes.
8903 The variant parameter is only relevant under Mac currently and is
8904 ignore under other platforms. Under Mac, it will change the size of
8905 the returned font. See `wx.Window.SetWindowVariant` for more about
8908 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8910 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
8912 class ControlPtr(Control
):
8913 def __init__(self
, this
):
8915 if not hasattr(self
,"thisown"): self
.thisown
= 0
8916 self
.__class
__ = Control
8917 _core_
.Control_swigregister(ControlPtr
)
8918 ControlNameStr
= cvar
.ControlNameStr
8920 def PreControl(*args
, **kwargs
):
8922 PreControl() -> Control
8924 Precreate a Control control for 2-phase creation
8926 val
= _core_
.new_PreControl(*args
, **kwargs
)
8930 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
8932 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8934 Get the default attributes for this class. This is useful if you want
8935 to use the same font or colour in your own control as in a standard
8936 control -- which is a much better idea than hard coding specific
8937 colours or fonts which might look completely out of place on the
8938 user's system, especially if it uses themes.
8940 The variant parameter is only relevant under Mac currently and is
8941 ignore under other platforms. Under Mac, it will change the size of
8942 the returned font. See `wx.Window.SetWindowVariant` for more about
8945 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8947 #---------------------------------------------------------------------------
8949 class ItemContainer(object):
8951 The wx.ItemContainer class defines an interface which is implemented
8952 by all controls which have string subitems, each of which may be
8953 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
8954 as `wx.ComboBox` which implements an extended interface deriving from
8957 It defines the methods for accessing the control's items and although
8958 each of the derived classes implements them differently, they still
8959 all conform to the same interface.
8961 The items in a wx.ItemContainer have (non empty) string labels and,
8962 optionally, client data associated with them.
8965 def __init__(self
): raise RuntimeError, "No constructor defined"
8967 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8968 def Append(*args
, **kwargs
):
8970 Append(self, String item, PyObject clientData=None) -> int
8972 Adds the item to the control, associating the given data with the item
8973 if not None. The return value is the index of the newly added item
8974 which may be different from the last one if the control is sorted (e.g.
8975 has wx.LB_SORT or wx.CB_SORT style).
8977 return _core_
.ItemContainer_Append(*args
, **kwargs
)
8979 def AppendItems(*args
, **kwargs
):
8981 AppendItems(self, List strings)
8983 Apend several items at once to the control. Notice that calling this
8984 method may be much faster than appending the items one by one if you
8985 need to add a lot of items.
8987 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
8989 def Insert(*args
, **kwargs
):
8991 Insert(self, String item, int pos, PyObject clientData=None) -> int
8993 Insert an item into the control before the item at the ``pos`` index,
8994 optionally associating some data object with the item.
8996 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
8998 def Clear(*args
, **kwargs
):
9002 Removes all items from the control.
9004 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
9006 def Delete(*args
, **kwargs
):
9010 Deletes the item at the zero-based index 'n' from the control. Note
9011 that it is an error (signalled by a `wx.PyAssertionError` exception if
9012 enabled) to remove an item with the index negative or greater or equal
9013 than the number of items in the control.
9015 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
9017 def GetClientData(*args
, **kwargs
):
9019 GetClientData(self, int n) -> PyObject
9021 Returns the client data associated with the given item, (if any.)
9023 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
9025 def SetClientData(*args
, **kwargs
):
9027 SetClientData(self, int n, PyObject clientData)
9029 Associate the given client data with the item at position n.
9031 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
9033 def GetCount(*args
, **kwargs
):
9035 GetCount(self) -> int
9037 Returns the number of items in the control.
9039 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
9041 def IsEmpty(*args
, **kwargs
):
9043 IsEmpty(self) -> bool
9045 Returns True if the control is empty or False if it has some items.
9047 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
9049 def GetString(*args
, **kwargs
):
9051 GetString(self, int n) -> String
9053 Returns the label of the item with the given index.
9055 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
9057 def GetStrings(*args
, **kwargs
):
9058 """GetStrings(self) -> wxArrayString"""
9059 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
9061 def SetString(*args
, **kwargs
):
9063 SetString(self, int n, String s)
9065 Sets the label for the given item.
9067 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
9069 def FindString(*args
, **kwargs
):
9071 FindString(self, String s) -> int
9073 Finds an item whose label matches the given string. Returns the
9074 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9077 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
9079 def SetSelection(*args
, **kwargs
):
9081 SetSelection(self, int n)
9083 Sets the item at index 'n' to be the selected item.
9085 return _core_
.ItemContainer_SetSelection(*args
, **kwargs
)
9087 def GetSelection(*args
, **kwargs
):
9089 GetSelection(self) -> int
9091 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9094 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
9096 def SetStringSelection(*args
, **kwargs
):
9097 """SetStringSelection(self, String s) -> bool"""
9098 return _core_
.ItemContainer_SetStringSelection(*args
, **kwargs
)
9100 def GetStringSelection(*args
, **kwargs
):
9102 GetStringSelection(self) -> String
9104 Returns the label of the selected item or an empty string if no item
9107 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
9109 def Select(*args
, **kwargs
):
9113 This is the same as `SetSelection` and exists only because it is
9114 slightly more natural for controls which support multiple selection.
9116 return _core_
.ItemContainer_Select(*args
, **kwargs
)
9119 class ItemContainerPtr(ItemContainer
):
9120 def __init__(self
, this
):
9122 if not hasattr(self
,"thisown"): self
.thisown
= 0
9123 self
.__class
__ = ItemContainer
9124 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
9126 #---------------------------------------------------------------------------
9128 class ControlWithItems(Control
,ItemContainer
):
9130 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9131 wx.Control class, and is used for the base class of various controls
9134 def __init__(self
): raise RuntimeError, "No constructor defined"
9136 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9138 class ControlWithItemsPtr(ControlWithItems
):
9139 def __init__(self
, this
):
9141 if not hasattr(self
,"thisown"): self
.thisown
= 0
9142 self
.__class
__ = ControlWithItems
9143 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
9145 #---------------------------------------------------------------------------
9147 class SizerItem(Object
):
9149 The wx.SizerItem class is used to track the position, size and other
9150 attributes of each item managed by a `wx.Sizer`. In normal usage user
9151 code should never need to deal directly with a wx.SizerItem, but
9152 custom classes derived from `wx.PySizer` will probably need to use the
9153 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9155 :see: `wx.Sizer`, `wx.GBSizerItem`
9158 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9159 def __init__(self
, *args
, **kwargs
):
9161 __init__(self) -> SizerItem
9163 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9164 size will need to be set before this item can be used in a Sizer.
9166 You will probably never need to create a wx.SizerItem directly as they
9167 are created automatically when the sizer's Add, Insert or Prepend
9170 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9172 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
9173 self
.this
= newobj
.this
9176 def DeleteWindows(*args
, **kwargs
):
9180 Destroy the window or the windows in a subsizer, depending on the type
9183 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
9185 def DetachSizer(*args
, **kwargs
):
9189 Enable deleting the SizerItem without destroying the contained sizer.
9191 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
9193 def GetSize(*args
, **kwargs
):
9195 GetSize(self) -> Size
9197 Get the current size of the item, as set in the last Layout.
9199 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
9201 def CalcMin(*args
, **kwargs
):
9203 CalcMin(self) -> Size
9205 Calculates the minimum desired size for the item, including any space
9208 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
9210 def SetDimension(*args
, **kwargs
):
9212 SetDimension(self, Point pos, Size size)
9214 Set the position and size of the space allocated for this item by the
9215 sizer, and adjust the position and size of the item (window or
9216 subsizer) to be within that space taking alignment and borders into
9219 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
9221 def GetMinSize(*args
, **kwargs
):
9223 GetMinSize(self) -> Size
9225 Get the minimum size needed for the item.
9227 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
9229 def GetMinSizeWithBorder(*args
, **kwargs
):
9231 GetMinSizeWithBorder(self) -> Size
9233 Get the minimum size needed for the item with space for the borders
9236 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
9238 def SetInitSize(*args
, **kwargs
):
9239 """SetInitSize(self, int x, int y)"""
9240 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
9242 def SetRatioWH(*args
, **kwargs
):
9244 SetRatioWH(self, int width, int height)
9246 Set the ratio item attribute.
9248 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
9250 def SetRatioSize(*args
, **kwargs
):
9252 SetRatioSize(self, Size size)
9254 Set the ratio item attribute.
9256 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
9258 def SetRatio(*args
, **kwargs
):
9260 SetRatio(self, float ratio)
9262 Set the ratio item attribute.
9264 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
9266 def GetRatio(*args
, **kwargs
):
9268 GetRatio(self) -> float
9270 Set the ratio item attribute.
9272 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
9274 def GetRect(*args
, **kwargs
):
9276 GetRect(self) -> Rect
9278 Returns the rectangle that the sizer item should occupy
9280 return _core_
.SizerItem_GetRect(*args
, **kwargs
)
9282 def IsWindow(*args
, **kwargs
):
9284 IsWindow(self) -> bool
9286 Is this sizer item a window?
9288 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
9290 def IsSizer(*args
, **kwargs
):
9292 IsSizer(self) -> bool
9294 Is this sizer item a subsizer?
9296 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
9298 def IsSpacer(*args
, **kwargs
):
9300 IsSpacer(self) -> bool
9302 Is this sizer item a spacer?
9304 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
9306 def SetProportion(*args
, **kwargs
):
9308 SetProportion(self, int proportion)
9310 Set the proportion value for this item.
9312 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
9314 def GetProportion(*args
, **kwargs
):
9316 GetProportion(self) -> int
9318 Get the proportion value for this item.
9320 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
9322 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
9323 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
9324 def SetFlag(*args
, **kwargs
):
9326 SetFlag(self, int flag)
9328 Set the flag value for this item.
9330 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
9332 def GetFlag(*args
, **kwargs
):
9334 GetFlag(self) -> int
9336 Get the flag value for this item.
9338 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
9340 def SetBorder(*args
, **kwargs
):
9342 SetBorder(self, int border)
9344 Set the border value for this item.
9346 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
9348 def GetBorder(*args
, **kwargs
):
9350 GetBorder(self) -> int
9352 Get the border value for this item.
9354 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
9356 def GetWindow(*args
, **kwargs
):
9358 GetWindow(self) -> Window
9360 Get the window (if any) that is managed by this sizer item.
9362 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
9364 def SetWindow(*args
, **kwargs
):
9366 SetWindow(self, Window window)
9368 Set the window to be managed by this sizer item.
9370 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9372 def GetSizer(*args
, **kwargs
):
9374 GetSizer(self) -> Sizer
9376 Get the subsizer (if any) that is managed by this sizer item.
9378 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9380 def SetSizer(*args
, **kwargs
):
9382 SetSizer(self, Sizer sizer)
9384 Set the subsizer to be managed by this sizer item.
9386 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9388 def GetSpacer(*args
, **kwargs
):
9390 GetSpacer(self) -> Size
9392 Get the size of the spacer managed by this sizer item.
9394 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9396 def SetSpacer(*args
, **kwargs
):
9398 SetSpacer(self, Size size)
9400 Set the size of the spacer to be managed by this sizer item.
9402 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9404 def Show(*args
, **kwargs
):
9406 Show(self, bool show)
9408 Set the show item attribute, which sizers use to determine if the item
9409 is to be made part of the layout or not. If the item is tracking a
9410 window then it is shown or hidden as needed.
9412 return _core_
.SizerItem_Show(*args
, **kwargs
)
9414 def IsShown(*args
, **kwargs
):
9416 IsShown(self) -> bool
9418 Is the item to be shown in the layout?
9420 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
9422 def GetPosition(*args
, **kwargs
):
9424 GetPosition(self) -> Point
9426 Returns the current position of the item, as set in the last Layout.
9428 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
9430 def GetUserData(*args
, **kwargs
):
9432 GetUserData(self) -> PyObject
9434 Returns the userData associated with this sizer item, or None if there
9437 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
9440 class SizerItemPtr(SizerItem
):
9441 def __init__(self
, this
):
9443 if not hasattr(self
,"thisown"): self
.thisown
= 0
9444 self
.__class
__ = SizerItem
9445 _core_
.SizerItem_swigregister(SizerItemPtr
)
9447 def SizerItemWindow(*args
, **kwargs
):
9449 SizerItemWindow(Window window, int proportion, int flag, int border,
9450 PyObject userData=None) -> SizerItem
9452 Constructs a `wx.SizerItem` for tracking a window.
9454 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
9458 def SizerItemSpacer(*args
, **kwargs
):
9460 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9461 PyObject userData=None) -> SizerItem
9463 Constructs a `wx.SizerItem` for tracking a spacer.
9465 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
9469 def SizerItemSizer(*args
, **kwargs
):
9471 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9472 PyObject userData=None) -> SizerItem
9474 Constructs a `wx.SizerItem` for tracking a subsizer
9476 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
9480 class Sizer(Object
):
9482 wx.Sizer is the abstract base class used for laying out subwindows in
9483 a window. You cannot use wx.Sizer directly; instead, you will have to
9484 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9485 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9486 and `wx.GridBagSizer`.
9488 The concept implemented by sizers in wxWidgets is closely related to
9489 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9490 toolkit or the Qt toolkit. It is based upon the idea of the individual
9491 subwindows reporting their minimal required size and their ability to
9492 get stretched if the size of the parent window has changed. This will
9493 most often mean that the programmer does not set the original size of
9494 a dialog in the beginning, rather the dialog will assigned a sizer and
9495 this sizer will be queried about the recommended size. The sizer in
9496 turn will query its children, which can be normal windows or contorls,
9497 empty space or other sizers, so that a hierarchy of sizers can be
9498 constructed. Note that wxSizer does not derive from wxWindow and thus
9499 do not interfere with tab ordering and requires very little resources
9500 compared to a real window on screen.
9502 What makes sizers so well fitted for use in wxWidgets is the fact that
9503 every control reports its own minimal size and the algorithm can
9504 handle differences in font sizes or different window (dialog item)
9505 sizes on different platforms without problems. If for example the
9506 standard font as well as the overall design of Mac widgets requires
9507 more space than on Windows, then the initial size of a dialog using a
9508 sizer will automatically be bigger on Mac than on Windows.
9510 def __init__(self
): raise RuntimeError, "No constructor defined"
9512 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9513 def _setOORInfo(*args
, **kwargs
):
9514 """_setOORInfo(self, PyObject _self)"""
9515 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
9517 def Add(*args
, **kwargs
):
9519 Add(self, item, int proportion=0, int flag=0, int border=0,
9520 PyObject userData=None) -> wx.SizerItem
9522 Appends a child item to the sizer.
9524 return _core_
.Sizer_Add(*args
, **kwargs
)
9526 def Insert(*args
, **kwargs
):
9528 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9529 PyObject userData=None) -> wx.SizerItem
9531 Inserts a new item into the list of items managed by this sizer before
9532 the item at index *before*. See `Add` for a description of the parameters.
9534 return _core_
.Sizer_Insert(*args
, **kwargs
)
9536 def Prepend(*args
, **kwargs
):
9538 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9539 PyObject userData=None) -> wx.SizerItem
9541 Adds a new item to the begining of the list of sizer items managed by
9542 this sizer. See `Add` for a description of the parameters.
9544 return _core_
.Sizer_Prepend(*args
, **kwargs
)
9546 def Remove(*args
, **kwargs
):
9548 Remove(self, item) -> bool
9550 Removes an item from the sizer and destroys it. This method does not
9551 cause any layout or resizing to take place, call `Layout` to update
9552 the layout on screen after removing a child from the sizer. The
9553 *item* parameter can be either a window, a sizer, or the zero-based
9554 index of an item to remove. Returns True if the child item was found
9557 return _core_
.Sizer_Remove(*args
, **kwargs
)
9559 def Detach(*args
, **kwargs
):
9561 Detach(self, item) -> bool
9563 Detaches an item from the sizer without destroying it. This method
9564 does not cause any layout or resizing to take place, call `Layout` to
9565 do so. The *item* parameter can be either a window, a sizer, or the
9566 zero-based index of the item to be detached. Returns True if the child item
9567 was found and detached.
9569 return _core_
.Sizer_Detach(*args
, **kwargs
)
9571 def GetItem(*args
, **kwargs
):
9573 GetItem(self, item) -> wx.SizerItem
9575 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9576 parameter can be either a window, a sizer, or the zero-based index of
9577 the item to be detached.
9579 return _core_
.Sizer_GetItem(*args
, **kwargs
)
9581 def _SetItemMinSize(*args
, **kwargs
):
9582 """_SetItemMinSize(self, PyObject item, Size size)"""
9583 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
9585 def SetItemMinSize(self
, item
, *args
):
9587 SetItemMinSize(self, item, Size size)
9589 Sets the minimum size that will be allocated for an item in the sizer.
9590 The *item* parameter can be either a window, a sizer, or the
9591 zero-based index of the item. If a window or sizer is given then it
9592 will be searched for recursivly in subsizers if neccessary.
9595 # for backward compatibility accept separate width,height args too
9596 return self
._SetItemMinSize
(item
, args
)
9598 return self
._SetItemMinSize
(item
, args
[0])
9600 def AddItem(*args
, **kwargs
):
9602 AddItem(self, SizerItem item)
9604 Adds a `wx.SizerItem` to the sizer.
9606 return _core_
.Sizer_AddItem(*args
, **kwargs
)
9608 def InsertItem(*args
, **kwargs
):
9610 InsertItem(self, int index, SizerItem item)
9612 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9614 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
9616 def PrependItem(*args
, **kwargs
):
9618 PrependItem(self, SizerItem item)
9620 Prepends a `wx.SizerItem` to the sizer.
9622 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
9624 def AddMany(self
, items
):
9626 AddMany is a convenience method for adding several items
9627 to a sizer at one time. Simply pass it a list of tuples,
9628 where each tuple consists of the parameters that you
9629 would normally pass to the `Add` method.
9632 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
9636 # for backwards compatibility only, please do not use in new code
9637 def AddWindow(self
, *args
, **kw
):
9638 """Compatibility alias for `Add`."""
9639 return self
.Add(*args
, **kw
)
9640 def AddSizer(self
, *args
, **kw
):
9641 """Compatibility alias for `Add`."""
9642 return self
.Add(*args
, **kw
)
9643 def AddSpacer(self
, *args
, **kw
):
9644 """Compatibility alias for `Add`."""
9645 return self
.Add(*args
, **kw
)
9647 def PrependWindow(self
, *args
, **kw
):
9648 """Compatibility alias for `Prepend`."""
9649 return self
.Prepend(*args
, **kw
)
9650 def PrependSizer(self
, *args
, **kw
):
9651 """Compatibility alias for `Prepend`."""
9652 return self
.Prepend(*args
, **kw
)
9653 def PrependSpacer(self
, *args
, **kw
):
9654 """Compatibility alias for `Prepend`."""
9655 return self
.Prepend(*args
, **kw
)
9657 def InsertWindow(self
, *args
, **kw
):
9658 """Compatibility alias for `Insert`."""
9659 return self
.Insert(*args
, **kw
)
9660 def InsertSizer(self
, *args
, **kw
):
9661 """Compatibility alias for `Insert`."""
9662 return self
.Insert(*args
, **kw
)
9663 def InsertSpacer(self
, *args
, **kw
):
9664 """Compatibility alias for `Insert`."""
9665 return self
.Insert(*args
, **kw
)
9667 def RemoveWindow(self
, *args
, **kw
):
9668 """Compatibility alias for `Remove`."""
9669 return self
.Remove(*args
, **kw
)
9670 def RemoveSizer(self
, *args
, **kw
):
9671 """Compatibility alias for `Remove`."""
9672 return self
.Remove(*args
, **kw
)
9673 def RemovePos(self
, *args
, **kw
):
9674 """Compatibility alias for `Remove`."""
9675 return self
.Remove(*args
, **kw
)
9678 def SetDimension(*args
, **kwargs
):
9680 SetDimension(self, int x, int y, int width, int height)
9682 Call this to force the sizer to take the given dimension and thus
9683 force the items owned by the sizer to resize themselves according to
9684 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9687 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
9689 def SetMinSize(*args
, **kwargs
):
9691 SetMinSize(self, Size size)
9693 Call this to give the sizer a minimal size. Normally, the sizer will
9694 calculate its minimal size based purely on how much space its children
9695 need. After calling this method `GetMinSize` will return either the
9696 minimal size as requested by its children or the minimal size set
9697 here, depending on which is bigger.
9699 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
9701 def GetSize(*args
, **kwargs
):
9703 GetSize(self) -> Size
9705 Returns the current size of the space managed by the sizer.
9707 return _core_
.Sizer_GetSize(*args
, **kwargs
)
9709 def GetPosition(*args
, **kwargs
):
9711 GetPosition(self) -> Point
9713 Returns the current position of the sizer's managed space.
9715 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
9717 def GetMinSize(*args
, **kwargs
):
9719 GetMinSize(self) -> Size
9721 Returns the minimal size of the sizer. This is either the combined
9722 minimal size of all the children and their borders or the minimal size
9723 set by SetMinSize, depending on which is bigger.
9725 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
9727 def GetSizeTuple(self
):
9728 return self
.GetSize().Get()
9729 def GetPositionTuple(self
):
9730 return self
.GetPosition().Get()
9731 def GetMinSizeTuple(self
):
9732 return self
.GetMinSize().Get()
9734 def RecalcSizes(*args
, **kwargs
):
9738 Using the sizes calculated by `CalcMin` reposition and resize all the
9739 items managed by this sizer. You should not need to call this directly as
9740 it is called by `Layout`.
9742 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
9744 def CalcMin(*args
, **kwargs
):
9746 CalcMin(self) -> Size
9748 This method is where the sizer will do the actual calculation of its
9749 children's minimal sizes. You should not need to call this directly as
9750 it is called by `Layout`.
9752 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
9754 def Layout(*args
, **kwargs
):
9758 This method will force the recalculation and layout of the items
9759 controlled by the sizer using the current space allocated to the
9760 sizer. Normally this is called automatically from the owning window's
9761 EVT_SIZE handler, but it is also useful to call it from user code when
9762 one of the items in a sizer change size, or items are added or
9765 return _core_
.Sizer_Layout(*args
, **kwargs
)
9767 def Fit(*args
, **kwargs
):
9769 Fit(self, Window window) -> Size
9771 Tell the sizer to resize the *window* to match the sizer's minimal
9772 size. This is commonly done in the constructor of the window itself in
9773 order to set its initial size to match the needs of the children as
9774 determined by the sizer. Returns the new size.
9776 For a top level window this is the total window size, not the client size.
9778 return _core_
.Sizer_Fit(*args
, **kwargs
)
9780 def FitInside(*args
, **kwargs
):
9782 FitInside(self, Window window)
9784 Tell the sizer to resize the *virtual size* of the *window* to match the
9785 sizer's minimal size. This will not alter the on screen size of the
9786 window, but may cause the addition/removal/alteration of scrollbars
9787 required to view the virtual area in windows which manage it.
9789 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9792 return _core_
.Sizer_FitInside(*args
, **kwargs
)
9794 def SetSizeHints(*args
, **kwargs
):
9796 SetSizeHints(self, Window window)
9798 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9799 match the sizer's minimal size. This is commonly done in the
9800 constructor of the window itself if the window is resizable (as are
9801 many dialogs under Unix and frames on probably all platforms) in order
9802 to prevent the window from being sized smaller than the minimal size
9803 required by the sizer.
9805 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
9807 def SetVirtualSizeHints(*args
, **kwargs
):
9809 SetVirtualSizeHints(self, Window window)
9811 Tell the sizer to set the minimal size of the window virtual area to
9812 match the sizer's minimal size. For windows with managed scrollbars
9813 this will set them appropriately.
9815 :see: `wx.ScrolledWindow.SetScrollbars`
9818 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
9820 def Clear(*args
, **kwargs
):
9822 Clear(self, bool deleteWindows=False)
9824 Clear all items from the sizer, optionally destroying the window items
9827 return _core_
.Sizer_Clear(*args
, **kwargs
)
9829 def DeleteWindows(*args
, **kwargs
):
9833 Destroy all windows managed by the sizer.
9835 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
9837 def GetChildren(*args
, **kwargs
):
9839 GetChildren(self) -> list
9841 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9843 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
9845 def Show(*args
, **kwargs
):
9847 Show(self, item, bool show=True, bool recursive=false) -> bool
9849 Shows or hides an item managed by the sizer. To make a sizer item
9850 disappear or reappear, use Show followed by `Layout`. The *item*
9851 parameter can be either a window, a sizer, or the zero-based index of
9852 the item. Use the recursive parameter to show or hide an item in a
9853 subsizer. Returns True if the item was found.
9855 return _core_
.Sizer_Show(*args
, **kwargs
)
9857 def IsShown(*args
, **kwargs
):
9861 Determines if the item is currently shown. sizer. To make a sizer
9862 item disappear or reappear, use Show followed by `Layout`. The *item*
9863 parameter can be either a window, a sizer, or the zero-based index of
9866 return _core_
.Sizer_IsShown(*args
, **kwargs
)
9868 def Hide(self
, item
, recursive
=False):
9870 A convenience method for Show(item, False, recursive).
9872 return self
.Show(item
, False, recursive
)
9874 def ShowItems(*args
, **kwargs
):
9876 ShowItems(self, bool show)
9878 Recursively call `wx.SizerItem.Show` on all sizer items.
9880 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
9883 class SizerPtr(Sizer
):
9884 def __init__(self
, this
):
9886 if not hasattr(self
,"thisown"): self
.thisown
= 0
9887 self
.__class
__ = Sizer
9888 _core_
.Sizer_swigregister(SizerPtr
)
9890 class PySizer(Sizer
):
9892 wx.PySizer is a special version of `wx.Sizer` that has been
9893 instrumented to allow the C++ virtual methods to be overloaded in
9894 Python derived classes. You would derive from this class if you are
9895 wanting to implement a custom sizer in Python code. Simply implement
9896 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9899 class MySizer(wx.PySizer):
9901 wx.PySizer.__init__(self)
9904 for item in self.GetChildren():
9905 # calculate the total minimum width and height needed
9906 # by all items in the sizer according to this sizer's
9909 return wx.Size(width, height)
9911 def RecalcSizes(self):
9912 # find the space allotted to this sizer
9913 pos = self.GetPosition()
9914 size = self.GetSize()
9915 for item in self.GetChildren():
9916 # Recalculate (if necessary) the position and size of
9917 # each item and then call item.SetDimension to do the
9918 # actual positioning and sizing of the items within the
9919 # space alloted to this sizer.
9921 item.SetDimension(itemPos, itemSize)
9924 When `Layout` is called it first calls `CalcMin` followed by
9925 `RecalcSizes` so you can optimize a bit by saving the results of
9926 `CalcMin` and reusing them in `RecalcSizes`.
9928 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9933 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9934 def __init__(self
, *args
, **kwargs
):
9936 __init__(self) -> PySizer
9938 Creates a wx.PySizer. Must be called from the __init__ in the derived
9941 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
9942 self
.this
= newobj
.this
9945 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
9947 def _setCallbackInfo(*args
, **kwargs
):
9948 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9949 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
9952 class PySizerPtr(PySizer
):
9953 def __init__(self
, this
):
9955 if not hasattr(self
,"thisown"): self
.thisown
= 0
9956 self
.__class
__ = PySizer
9957 _core_
.PySizer_swigregister(PySizerPtr
)
9959 #---------------------------------------------------------------------------
9961 class BoxSizer(Sizer
):
9963 The basic idea behind a box sizer is that windows will most often be
9964 laid out in rather simple basic geometry, typically in a row or a
9965 column or nested hierarchies of either. A wx.BoxSizer will lay out
9966 its items in a simple row or column, depending on the orientation
9967 parameter passed to the constructor.
9970 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9971 def __init__(self
, *args
, **kwargs
):
9973 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9975 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9976 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9979 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
9980 self
.this
= newobj
.this
9983 self
._setOORInfo
(self
)
9985 def GetOrientation(*args
, **kwargs
):
9987 GetOrientation(self) -> int
9989 Returns the current orientation of the sizer.
9991 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
9993 def SetOrientation(*args
, **kwargs
):
9995 SetOrientation(self, int orient)
9997 Resets the orientation of the sizer.
9999 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
10002 class BoxSizerPtr(BoxSizer
):
10003 def __init__(self
, this
):
10005 if not hasattr(self
,"thisown"): self
.thisown
= 0
10006 self
.__class
__ = BoxSizer
10007 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
10009 #---------------------------------------------------------------------------
10011 class StaticBoxSizer(BoxSizer
):
10013 wx.StaticBoxSizer derives from and functions identically to the
10014 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10015 manages. Note that this static box must be created separately and
10016 passed to the sizer constructor.
10018 def __repr__(self
):
10019 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10020 def __init__(self
, *args
, **kwargs
):
10022 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10024 Constructor. It takes an associated static box and the orientation
10025 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10028 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
10029 self
.this
= newobj
.this
10032 self
._setOORInfo
(self
)
10034 def GetStaticBox(*args
, **kwargs
):
10036 GetStaticBox(self) -> StaticBox
10038 Returns the static box associated with this sizer.
10040 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
10043 class StaticBoxSizerPtr(StaticBoxSizer
):
10044 def __init__(self
, this
):
10046 if not hasattr(self
,"thisown"): self
.thisown
= 0
10047 self
.__class
__ = StaticBoxSizer
10048 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
10050 #---------------------------------------------------------------------------
10052 class GridSizer(Sizer
):
10054 A grid sizer is a sizer which lays out its children in a
10055 two-dimensional table with all cells having the same size. In other
10056 words, the width of each cell within the grid is the width of the
10057 widest item added to the sizer and the height of each grid cell is the
10058 height of the tallest item. An optional vertical and/or horizontal
10059 gap between items can also be specified (in pixels.)
10061 Items are placed in the cells of the grid in the order they are added,
10062 in row-major order. In other words, the first row is filled first,
10063 then the second, and so on until all items have been added. (If
10064 neccessary, additional rows will be added as items are added.) If you
10065 need to have greater control over the cells that items are placed in
10066 then use the `wx.GridBagSizer`.
10069 def __repr__(self
):
10070 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10071 def __init__(self
, *args
, **kwargs
):
10073 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10075 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10076 of columns and rows in the sizer - if either of the parameters is
10077 zero, it will be calculated to from the total number of children in
10078 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10079 define extra space between all children.
10081 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
10082 self
.this
= newobj
.this
10085 self
._setOORInfo
(self
)
10087 def SetCols(*args
, **kwargs
):
10089 SetCols(self, int cols)
10091 Sets the number of columns in the sizer.
10093 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
10095 def SetRows(*args
, **kwargs
):
10097 SetRows(self, int rows)
10099 Sets the number of rows in the sizer.
10101 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
10103 def SetVGap(*args
, **kwargs
):
10105 SetVGap(self, int gap)
10107 Sets the vertical gap (in pixels) between the cells in the sizer.
10109 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
10111 def SetHGap(*args
, **kwargs
):
10113 SetHGap(self, int gap)
10115 Sets the horizontal gap (in pixels) between cells in the sizer
10117 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
10119 def GetCols(*args
, **kwargs
):
10121 GetCols(self) -> int
10123 Returns the number of columns in the sizer.
10125 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
10127 def GetRows(*args
, **kwargs
):
10129 GetRows(self) -> int
10131 Returns the number of rows in the sizer.
10133 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
10135 def GetVGap(*args
, **kwargs
):
10137 GetVGap(self) -> int
10139 Returns the vertical gap (in pixels) between the cells in the sizer.
10141 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
10143 def GetHGap(*args
, **kwargs
):
10145 GetHGap(self) -> int
10147 Returns the horizontal gap (in pixels) between cells in the sizer.
10149 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
10152 class GridSizerPtr(GridSizer
):
10153 def __init__(self
, this
):
10155 if not hasattr(self
,"thisown"): self
.thisown
= 0
10156 self
.__class
__ = GridSizer
10157 _core_
.GridSizer_swigregister(GridSizerPtr
)
10159 #---------------------------------------------------------------------------
10161 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
10162 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
10163 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
10164 class FlexGridSizer(GridSizer
):
10166 A flex grid sizer is a sizer which lays out its children in a
10167 two-dimensional table with all table cells in one row having the same
10168 height and all cells in one column having the same width, but all
10169 rows or all columns are not necessarily the same height or width as in
10170 the `wx.GridSizer`.
10172 wx.FlexGridSizer can also size items equally in one direction but
10173 unequally ("flexibly") in the other. If the sizer is only flexible
10174 in one direction (this can be changed using `SetFlexibleDirection`), it
10175 needs to be decided how the sizer should grow in the other ("non
10176 flexible") direction in order to fill the available space. The
10177 `SetNonFlexibleGrowMode` method serves this purpose.
10181 def __repr__(self
):
10182 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10183 def __init__(self
, *args
, **kwargs
):
10185 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10187 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10188 number of columns and rows in the sizer - if either of the parameters
10189 is zero, it will be calculated to from the total number of children in
10190 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10191 define extra space between all children.
10193 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
10194 self
.this
= newobj
.this
10197 self
._setOORInfo
(self
)
10199 def AddGrowableRow(*args
, **kwargs
):
10201 AddGrowableRow(self, size_t idx, int proportion=0)
10203 Specifies that row *idx* (starting from zero) should be grown if there
10204 is extra space available to the sizer.
10206 The *proportion* parameter has the same meaning as the stretch factor
10207 for the box sizers except that if all proportions are 0, then all
10208 columns are resized equally (instead of not being resized at all).
10210 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
10212 def RemoveGrowableRow(*args
, **kwargs
):
10214 RemoveGrowableRow(self, size_t idx)
10216 Specifies that row *idx* is no longer growable.
10218 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
10220 def AddGrowableCol(*args
, **kwargs
):
10222 AddGrowableCol(self, size_t idx, int proportion=0)
10224 Specifies that column *idx* (starting from zero) should be grown if
10225 there is extra space available to the sizer.
10227 The *proportion* parameter has the same meaning as the stretch factor
10228 for the box sizers except that if all proportions are 0, then all
10229 columns are resized equally (instead of not being resized at all).
10231 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
10233 def RemoveGrowableCol(*args
, **kwargs
):
10235 RemoveGrowableCol(self, size_t idx)
10237 Specifies that column *idx* is no longer growable.
10239 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
10241 def SetFlexibleDirection(*args
, **kwargs
):
10243 SetFlexibleDirection(self, int direction)
10245 Specifies whether the sizer should flexibly resize its columns, rows,
10246 or both. Argument *direction* can be one of the following values. Any
10247 other value is ignored.
10249 ============== =======================================
10250 wx.VERTICAL Rows are flexibly sized.
10251 wx.HORIZONTAL Columns are flexibly sized.
10252 wx.BOTH Both rows and columns are flexibly sized
10253 (this is the default value).
10254 ============== =======================================
10256 Note that this method does not trigger relayout.
10259 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
10261 def GetFlexibleDirection(*args
, **kwargs
):
10263 GetFlexibleDirection(self) -> int
10265 Returns a value that specifies whether the sizer
10266 flexibly resizes its columns, rows, or both (default).
10268 :see: `SetFlexibleDirection`
10270 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
10272 def SetNonFlexibleGrowMode(*args
, **kwargs
):
10274 SetNonFlexibleGrowMode(self, int mode)
10276 Specifies how the sizer should grow in the non-flexible direction if
10277 there is one (so `SetFlexibleDirection` must have been called
10278 previously). Argument *mode* can be one of the following values:
10280 ========================== =================================================
10281 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10282 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10283 `AddGrowableCol` and `AddGrowableRow`. In this
10284 case equal sizing applies to minimum sizes of
10285 columns or rows (this is the default value).
10286 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10287 the non flexible direction, whether they are
10288 growable or not in the flexbile direction.
10289 ========================== =================================================
10291 Note that this method does not trigger relayout.
10295 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
10297 def GetNonFlexibleGrowMode(*args
, **kwargs
):
10299 GetNonFlexibleGrowMode(self) -> int
10301 Returns the value that specifies how the sizer grows in the
10302 non-flexible direction if there is one.
10304 :see: `SetNonFlexibleGrowMode`
10306 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
10308 def GetRowHeights(*args
, **kwargs
):
10310 GetRowHeights(self) -> list
10312 Returns a list of integers representing the heights of each of the
10315 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
10317 def GetColWidths(*args
, **kwargs
):
10319 GetColWidths(self) -> list
10321 Returns a list of integers representing the widths of each of the
10322 columns in the sizer.
10324 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
10327 class FlexGridSizerPtr(FlexGridSizer
):
10328 def __init__(self
, this
):
10330 if not hasattr(self
,"thisown"): self
.thisown
= 0
10331 self
.__class
__ = FlexGridSizer
10332 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
10334 class StdDialogButtonSizer(BoxSizer
):
10336 A special sizer that knows how to order and position standard buttons
10337 in order to conform to the current platform's standards. You simply
10338 need to add each `wx.Button` to the sizer, and be sure to create the
10339 buttons using the standard ID's. Then call `Realize` and the sizer
10340 will take care of the rest.
10343 def __repr__(self
):
10344 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10345 def __init__(self
, *args
, **kwargs
):
10346 """__init__(self) -> StdDialogButtonSizer"""
10347 newobj
= _core_
.new_StdDialogButtonSizer(*args
, **kwargs
)
10348 self
.this
= newobj
.this
10351 def AddButton(*args
, **kwargs
):
10353 AddButton(self, wxButton button)
10355 Use this to add the buttons to this sizer. Do not use the `Add`
10356 method in the base class.
10358 return _core_
.StdDialogButtonSizer_AddButton(*args
, **kwargs
)
10360 def Realize(*args
, **kwargs
):
10364 This funciton needs to be called after all the buttons have been added
10365 to the sizer. It will reorder them and position them in a platform
10368 return _core_
.StdDialogButtonSizer_Realize(*args
, **kwargs
)
10370 def SetAffirmativeButton(*args
, **kwargs
):
10371 """SetAffirmativeButton(self, wxButton button)"""
10372 return _core_
.StdDialogButtonSizer_SetAffirmativeButton(*args
, **kwargs
)
10374 def SetNegativeButton(*args
, **kwargs
):
10375 """SetNegativeButton(self, wxButton button)"""
10376 return _core_
.StdDialogButtonSizer_SetNegativeButton(*args
, **kwargs
)
10378 def SetCancelButton(*args
, **kwargs
):
10379 """SetCancelButton(self, wxButton button)"""
10380 return _core_
.StdDialogButtonSizer_SetCancelButton(*args
, **kwargs
)
10382 def GetAffirmativeButton(*args
, **kwargs
):
10383 """GetAffirmativeButton(self) -> wxButton"""
10384 return _core_
.StdDialogButtonSizer_GetAffirmativeButton(*args
, **kwargs
)
10386 def GetApplyButton(*args
, **kwargs
):
10387 """GetApplyButton(self) -> wxButton"""
10388 return _core_
.StdDialogButtonSizer_GetApplyButton(*args
, **kwargs
)
10390 def GetNegativeButton(*args
, **kwargs
):
10391 """GetNegativeButton(self) -> wxButton"""
10392 return _core_
.StdDialogButtonSizer_GetNegativeButton(*args
, **kwargs
)
10394 def GetCancelButton(*args
, **kwargs
):
10395 """GetCancelButton(self) -> wxButton"""
10396 return _core_
.StdDialogButtonSizer_GetCancelButton(*args
, **kwargs
)
10398 def GetHelpButton(*args
, **kwargs
):
10399 """GetHelpButton(self) -> wxButton"""
10400 return _core_
.StdDialogButtonSizer_GetHelpButton(*args
, **kwargs
)
10403 class StdDialogButtonSizerPtr(StdDialogButtonSizer
):
10404 def __init__(self
, this
):
10406 if not hasattr(self
,"thisown"): self
.thisown
= 0
10407 self
.__class
__ = StdDialogButtonSizer
10408 _core_
.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr
)
10410 #---------------------------------------------------------------------------
10412 class GBPosition(object):
10414 This class represents the position of an item in a virtual grid of
10415 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10416 typemaps that will automatically convert from a 2-element sequence of
10417 integers to a wx.GBPosition, so you can use the more pythonic
10418 representation of the position nearly transparently in Python code.
10420 def __repr__(self
):
10421 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10422 def __init__(self
, *args
, **kwargs
):
10424 __init__(self, int row=0, int col=0) -> GBPosition
10426 This class represents the position of an item in a virtual grid of
10427 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10428 typemaps that will automatically convert from a 2-element sequence of
10429 integers to a wx.GBPosition, so you can use the more pythonic
10430 representation of the position nearly transparently in Python code.
10432 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
10433 self
.this
= newobj
.this
10436 def GetRow(*args
, **kwargs
):
10437 """GetRow(self) -> int"""
10438 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
10440 def GetCol(*args
, **kwargs
):
10441 """GetCol(self) -> int"""
10442 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
10444 def SetRow(*args
, **kwargs
):
10445 """SetRow(self, int row)"""
10446 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
10448 def SetCol(*args
, **kwargs
):
10449 """SetCol(self, int col)"""
10450 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
10452 def __eq__(*args
, **kwargs
):
10453 """__eq__(self, GBPosition other) -> bool"""
10454 return _core_
.GBPosition___eq__(*args
, **kwargs
)
10456 def __ne__(*args
, **kwargs
):
10457 """__ne__(self, GBPosition other) -> bool"""
10458 return _core_
.GBPosition___ne__(*args
, **kwargs
)
10460 def Set(*args
, **kwargs
):
10461 """Set(self, int row=0, int col=0)"""
10462 return _core_
.GBPosition_Set(*args
, **kwargs
)
10464 def Get(*args
, **kwargs
):
10465 """Get(self) -> PyObject"""
10466 return _core_
.GBPosition_Get(*args
, **kwargs
)
10468 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10469 def __str__(self
): return str(self
.Get())
10470 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
10471 def __len__(self
): return len(self
.Get())
10472 def __getitem__(self
, index
): return self
.Get()[index
]
10473 def __setitem__(self
, index
, val
):
10474 if index
== 0: self
.SetRow(val
)
10475 elif index
== 1: self
.SetCol(val
)
10476 else: raise IndexError
10477 def __nonzero__(self
): return self
.Get() != (0,0)
10478 __safe_for_unpickling__
= True
10479 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
10481 row
= property(GetRow
, SetRow
)
10482 col
= property(GetCol
, SetCol
)
10485 class GBPositionPtr(GBPosition
):
10486 def __init__(self
, this
):
10488 if not hasattr(self
,"thisown"): self
.thisown
= 0
10489 self
.__class
__ = GBPosition
10490 _core_
.GBPosition_swigregister(GBPositionPtr
)
10492 class GBSpan(object):
10494 This class is used to hold the row and column spanning attributes of
10495 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10496 automatically convert from a 2-element sequence of integers to a
10497 wx.GBSpan, so you can use the more pythonic representation of the span
10498 nearly transparently in Python code.
10501 def __repr__(self
):
10502 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10503 def __init__(self
, *args
, **kwargs
):
10505 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10507 Construct a new wxGBSpan, optionally setting the rowspan and
10508 colspan. The default is (1,1). (Meaning that the item occupies one
10509 cell in each direction.
10511 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
10512 self
.this
= newobj
.this
10515 def GetRowspan(*args
, **kwargs
):
10516 """GetRowspan(self) -> int"""
10517 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
10519 def GetColspan(*args
, **kwargs
):
10520 """GetColspan(self) -> int"""
10521 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
10523 def SetRowspan(*args
, **kwargs
):
10524 """SetRowspan(self, int rowspan)"""
10525 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
10527 def SetColspan(*args
, **kwargs
):
10528 """SetColspan(self, int colspan)"""
10529 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
10531 def __eq__(*args
, **kwargs
):
10532 """__eq__(self, GBSpan other) -> bool"""
10533 return _core_
.GBSpan___eq__(*args
, **kwargs
)
10535 def __ne__(*args
, **kwargs
):
10536 """__ne__(self, GBSpan other) -> bool"""
10537 return _core_
.GBSpan___ne__(*args
, **kwargs
)
10539 def Set(*args
, **kwargs
):
10540 """Set(self, int rowspan=1, int colspan=1)"""
10541 return _core_
.GBSpan_Set(*args
, **kwargs
)
10543 def Get(*args
, **kwargs
):
10544 """Get(self) -> PyObject"""
10545 return _core_
.GBSpan_Get(*args
, **kwargs
)
10547 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10548 def __str__(self
): return str(self
.Get())
10549 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
10550 def __len__(self
): return len(self
.Get())
10551 def __getitem__(self
, index
): return self
.Get()[index
]
10552 def __setitem__(self
, index
, val
):
10553 if index
== 0: self
.SetRowspan(val
)
10554 elif index
== 1: self
.SetColspan(val
)
10555 else: raise IndexError
10556 def __nonzero__(self
): return self
.Get() != (0,0)
10557 __safe_for_unpickling__
= True
10558 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
10560 rowspan
= property(GetRowspan
, SetRowspan
)
10561 colspan
= property(GetColspan
, SetColspan
)
10564 class GBSpanPtr(GBSpan
):
10565 def __init__(self
, this
):
10567 if not hasattr(self
,"thisown"): self
.thisown
= 0
10568 self
.__class
__ = GBSpan
10569 _core_
.GBSpan_swigregister(GBSpanPtr
)
10571 class GBSizerItem(SizerItem
):
10573 The wx.GBSizerItem class is used to track the additional data about
10574 items in a `wx.GridBagSizer` such as the item's position in the grid
10575 and how many rows or columns it spans.
10578 def __repr__(self
):
10579 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10580 def __init__(self
, *args
, **kwargs
):
10582 __init__(self) -> GBSizerItem
10584 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10585 size will need to be set, as well as a position and span before this
10586 item can be used in a Sizer.
10588 You will probably never need to create a wx.GBSizerItem directly as they
10589 are created automatically when the sizer's Add method is called.
10591 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
10592 self
.this
= newobj
.this
10595 def GetPos(*args
, **kwargs
):
10597 GetPos(self) -> GBPosition
10599 Get the grid position of the item
10601 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
10603 def GetPosTuple(self
): return self
.GetPos().Get()
10604 def GetSpan(*args
, **kwargs
):
10606 GetSpan(self) -> GBSpan
10608 Get the row and column spanning of the item
10610 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
10612 def GetSpanTuple(self
): return self
.GetSpan().Get()
10613 def SetPos(*args
, **kwargs
):
10615 SetPos(self, GBPosition pos) -> bool
10617 If the item is already a member of a sizer then first ensure that
10618 there is no other item that would intersect with this one at the new
10619 position, then set the new position. Returns True if the change is
10620 successful and after the next Layout() the item will be moved.
10622 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
10624 def SetSpan(*args
, **kwargs
):
10626 SetSpan(self, GBSpan span) -> bool
10628 If the item is already a member of a sizer then first ensure that
10629 there is no other item that would intersect with this one with its new
10630 spanning size, then set the new spanning. Returns True if the change
10631 is successful and after the next Layout() the item will be resized.
10634 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
10636 def Intersects(*args
, **kwargs
):
10638 Intersects(self, GBSizerItem other) -> bool
10640 Returns True if this item and the other item instersect.
10642 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
10644 def IntersectsPos(*args
, **kwargs
):
10646 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10648 Returns True if the given pos/span would intersect with this item.
10650 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
10652 def GetEndPos(*args
, **kwargs
):
10654 GetEndPos(self) -> GBPosition
10656 Get the row and column of the endpoint of this item.
10658 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
10660 def GetGBSizer(*args
, **kwargs
):
10662 GetGBSizer(self) -> GridBagSizer
10664 Get the sizer this item is a member of.
10666 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
10668 def SetGBSizer(*args
, **kwargs
):
10670 SetGBSizer(self, GridBagSizer sizer)
10672 Set the sizer this item is a member of.
10674 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
10677 class GBSizerItemPtr(GBSizerItem
):
10678 def __init__(self
, this
):
10680 if not hasattr(self
,"thisown"): self
.thisown
= 0
10681 self
.__class
__ = GBSizerItem
10682 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
10683 DefaultSpan
= cvar
.DefaultSpan
10685 def GBSizerItemWindow(*args
, **kwargs
):
10687 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10688 int border, PyObject userData=None) -> GBSizerItem
10690 Construct a `wx.GBSizerItem` for a window.
10692 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
10696 def GBSizerItemSizer(*args
, **kwargs
):
10698 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10699 int border, PyObject userData=None) -> GBSizerItem
10701 Construct a `wx.GBSizerItem` for a sizer
10703 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
10707 def GBSizerItemSpacer(*args
, **kwargs
):
10709 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10710 int flag, int border, PyObject userData=None) -> GBSizerItem
10712 Construct a `wx.GBSizerItem` for a spacer.
10714 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
10718 class GridBagSizer(FlexGridSizer
):
10720 A `wx.Sizer` that can lay out items in a virtual grid like a
10721 `wx.FlexGridSizer` but in this case explicit positioning of the items
10722 is allowed using `wx.GBPosition`, and items can optionally span more
10723 than one row and/or column using `wx.GBSpan`. The total size of the
10724 virtual grid is determined by the largest row and column that items are
10725 positioned at, adjusted for spanning.
10728 def __repr__(self
):
10729 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10730 def __init__(self
, *args
, **kwargs
):
10732 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10734 Constructor, with optional parameters to specify the gap between the
10737 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
10738 self
.this
= newobj
.this
10741 self
._setOORInfo
(self
)
10743 def Add(*args
, **kwargs
):
10745 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10746 int border=0, userData=None) -> wx.GBSizerItem
10748 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10749 more than one row or column as specified with *span*. The remaining
10750 args behave similarly to `wx.Sizer.Add`.
10752 Returns True if the item was successfully placed at the given cell
10753 position, False if something was already there.
10756 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
10758 def AddItem(*args
, **kwargs
):
10760 Add(self, GBSizerItem item) -> wx.GBSizerItem
10762 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10763 the item was successfully placed at its given cell position, False if
10764 something was already there.
10766 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
10768 def GetCellSize(*args
, **kwargs
):
10770 GetCellSize(self, int row, int col) -> Size
10772 Get the size of the specified cell, including hgap and
10773 vgap. Only valid after a Layout.
10775 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
10777 def GetEmptyCellSize(*args
, **kwargs
):
10779 GetEmptyCellSize(self) -> Size
10781 Get the size used for cells in the grid with no item.
10783 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
10785 def SetEmptyCellSize(*args
, **kwargs
):
10787 SetEmptyCellSize(self, Size sz)
10789 Set the size used for cells in the grid with no item.
10791 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
10793 def GetItemPosition(*args
):
10795 GetItemPosition(self, item) -> GBPosition
10797 Get the grid position of the specified *item* where *item* is either a
10798 window or subsizer that is a member of this sizer, or a zero-based
10801 return _core_
.GridBagSizer_GetItemPosition(*args
)
10803 def SetItemPosition(*args
):
10805 SetItemPosition(self, item, GBPosition pos) -> bool
10807 Set the grid position of the specified *item* where *item* is either a
10808 window or subsizer that is a member of this sizer, or a zero-based
10809 index of an item. Returns True on success. If the move is not
10810 allowed (because an item is already there) then False is returned.
10813 return _core_
.GridBagSizer_SetItemPosition(*args
)
10815 def GetItemSpan(*args
):
10817 GetItemSpan(self, item) -> GBSpan
10819 Get the row/col spanning of the specified *item* where *item* is
10820 either a window or subsizer that is a member of this sizer, or a
10821 zero-based index of an item.
10823 return _core_
.GridBagSizer_GetItemSpan(*args
)
10825 def SetItemSpan(*args
):
10827 SetItemSpan(self, item, GBSpan span) -> bool
10829 Set the row/col spanning of the specified *item* where *item* is
10830 either a window or subsizer that is a member of this sizer, or a
10831 zero-based index of an item. Returns True on success. If the move is
10832 not allowed (because an item is already there) then False is returned.
10834 return _core_
.GridBagSizer_SetItemSpan(*args
)
10836 def FindItem(*args
):
10838 FindItem(self, item) -> GBSizerItem
10840 Find the sizer item for the given window or subsizer, returns None if
10841 not found. (non-recursive)
10843 return _core_
.GridBagSizer_FindItem(*args
)
10845 def FindItemAtPosition(*args
, **kwargs
):
10847 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10849 Return the sizer item for the given grid cell, or None if there is no
10850 item at that position. (non-recursive)
10852 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
10854 def FindItemAtPoint(*args
, **kwargs
):
10856 FindItemAtPoint(self, Point pt) -> GBSizerItem
10858 Return the sizer item located at the point given in *pt*, or None if
10859 there is no item at that point. The (x,y) coordinates in pt correspond
10860 to the client coordinates of the window using the sizer for
10861 layout. (non-recursive)
10863 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
10865 def CheckForIntersection(*args
, **kwargs
):
10867 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10869 Look at all items and see if any intersect (or would overlap) the
10870 given *item*. Returns True if so, False if there would be no overlap.
10871 If an *excludeItem* is given then it will not be checked for
10872 intersection, for example it may be the item we are checking the
10876 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
10878 def CheckForIntersectionPos(*args
, **kwargs
):
10880 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10882 Look at all items and see if any intersect (or would overlap) the
10883 given position and span. Returns True if so, False if there would be
10884 no overlap. If an *excludeItem* is given then it will not be checked
10885 for intersection, for example it may be the item we are checking the
10888 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
10891 class GridBagSizerPtr(GridBagSizer
):
10892 def __init__(self
, this
):
10894 if not hasattr(self
,"thisown"): self
.thisown
= 0
10895 self
.__class
__ = GridBagSizer
10896 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
10898 #---------------------------------------------------------------------------
10902 Right
= _core_
.Right
10903 Bottom
= _core_
.Bottom
10904 Width
= _core_
.Width
10905 Height
= _core_
.Height
10906 Centre
= _core_
.Centre
10907 Center
= _core_
.Center
10908 CentreX
= _core_
.CentreX
10909 CentreY
= _core_
.CentreY
10910 Unconstrained
= _core_
.Unconstrained
10912 PercentOf
= _core_
.PercentOf
10913 Above
= _core_
.Above
10914 Below
= _core_
.Below
10915 LeftOf
= _core_
.LeftOf
10916 RightOf
= _core_
.RightOf
10917 SameAs
= _core_
.SameAs
10918 Absolute
= _core_
.Absolute
10919 class IndividualLayoutConstraint(Object
):
10921 Objects of this class are stored in the `wx.LayoutConstraints` class as
10922 one of eight possible constraints that a window can be involved in.
10923 You will never need to create an instance of
10924 wx.IndividualLayoutConstraint, rather you should create a
10925 `wx.LayoutConstraints` instance and use the individual contstraints
10928 def __init__(self
): raise RuntimeError, "No constructor defined"
10929 def __repr__(self
):
10930 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10931 def Set(*args
, **kwargs
):
10933 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10935 Sets the properties of the constraint. Normally called by one of the
10936 convenience functions such as Above, RightOf, SameAs.
10938 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
10940 def LeftOf(*args
, **kwargs
):
10942 LeftOf(self, Window sibling, int marg=0)
10944 Constrains this edge to be to the left of the given window, with an
10945 optional margin. Implicitly, this is relative to the left edge of the
10948 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
10950 def RightOf(*args
, **kwargs
):
10952 RightOf(self, Window sibling, int marg=0)
10954 Constrains this edge to be to the right of the given window, with an
10955 optional margin. Implicitly, this is relative to the right edge of the
10958 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
10960 def Above(*args
, **kwargs
):
10962 Above(self, Window sibling, int marg=0)
10964 Constrains this edge to be above the given window, with an optional
10965 margin. Implicitly, this is relative to the top edge of the other
10968 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
10970 def Below(*args
, **kwargs
):
10972 Below(self, Window sibling, int marg=0)
10974 Constrains this edge to be below the given window, with an optional
10975 margin. Implicitly, this is relative to the bottom edge of the other
10978 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
10980 def SameAs(*args
, **kwargs
):
10982 SameAs(self, Window otherW, int edge, int marg=0)
10984 Constrains this edge or dimension to be to the same as the edge of the
10985 given window, with an optional margin.
10987 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
10989 def PercentOf(*args
, **kwargs
):
10991 PercentOf(self, Window otherW, int wh, int per)
10993 Constrains this edge or dimension to be to a percentage of the given
10994 window, with an optional margin.
10996 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
10998 def Absolute(*args
, **kwargs
):
11000 Absolute(self, int val)
11002 Constrains this edge or dimension to be the given absolute value.
11004 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
11006 def Unconstrained(*args
, **kwargs
):
11008 Unconstrained(self)
11010 Sets this edge or dimension to be unconstrained, that is, dependent on
11011 other edges and dimensions from which this value can be deduced.
11013 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
11015 def AsIs(*args
, **kwargs
):
11019 Sets this edge or constraint to be whatever the window's value is at
11020 the moment. If either of the width and height constraints are *as is*,
11021 the window will not be resized, but moved instead. This is important
11022 when considering panel items which are intended to have a default
11023 size, such as a button, which may take its size from the size of the
11026 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
11028 def GetOtherWindow(*args
, **kwargs
):
11029 """GetOtherWindow(self) -> Window"""
11030 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
11032 def GetMyEdge(*args
, **kwargs
):
11033 """GetMyEdge(self) -> int"""
11034 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
11036 def SetEdge(*args
, **kwargs
):
11037 """SetEdge(self, int which)"""
11038 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
11040 def SetValue(*args
, **kwargs
):
11041 """SetValue(self, int v)"""
11042 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
11044 def GetMargin(*args
, **kwargs
):
11045 """GetMargin(self) -> int"""
11046 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
11048 def SetMargin(*args
, **kwargs
):
11049 """SetMargin(self, int m)"""
11050 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
11052 def GetValue(*args
, **kwargs
):
11053 """GetValue(self) -> int"""
11054 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
11056 def GetPercent(*args
, **kwargs
):
11057 """GetPercent(self) -> int"""
11058 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
11060 def GetOtherEdge(*args
, **kwargs
):
11061 """GetOtherEdge(self) -> int"""
11062 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
11064 def GetDone(*args
, **kwargs
):
11065 """GetDone(self) -> bool"""
11066 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
11068 def SetDone(*args
, **kwargs
):
11069 """SetDone(self, bool d)"""
11070 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
11072 def GetRelationship(*args
, **kwargs
):
11073 """GetRelationship(self) -> int"""
11074 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
11076 def SetRelationship(*args
, **kwargs
):
11077 """SetRelationship(self, int r)"""
11078 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
11080 def ResetIfWin(*args
, **kwargs
):
11082 ResetIfWin(self, Window otherW) -> bool
11084 Reset constraint if it mentions otherWin
11086 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
11088 def SatisfyConstraint(*args
, **kwargs
):
11090 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11092 Try to satisfy constraint
11094 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
11096 def GetEdge(*args
, **kwargs
):
11098 GetEdge(self, int which, Window thisWin, Window other) -> int
11100 Get the value of this edge or dimension, or if this
11101 is not determinable, -1.
11103 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
11106 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
11107 def __init__(self
, this
):
11109 if not hasattr(self
,"thisown"): self
.thisown
= 0
11110 self
.__class
__ = IndividualLayoutConstraint
11111 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
11113 class LayoutConstraints(Object
):
11115 **Note:** constraints are now deprecated and you should use sizers
11118 Objects of this class can be associated with a window to define its
11119 layout constraints, with respect to siblings or its parent.
11121 The class consists of the following eight constraints of class
11122 wx.IndividualLayoutConstraint, some or all of which should be accessed
11123 directly to set the appropriate constraints.
11125 * left: represents the left hand edge of the window
11126 * right: represents the right hand edge of the window
11127 * top: represents the top edge of the window
11128 * bottom: represents the bottom edge of the window
11129 * width: represents the width of the window
11130 * height: represents the height of the window
11131 * centreX: represents the horizontal centre point of the window
11132 * centreY: represents the vertical centre point of the window
11134 Most constraints are initially set to have the relationship
11135 wxUnconstrained, which means that their values should be calculated by
11136 looking at known constraints. The exceptions are width and height,
11137 which are set to wxAsIs to ensure that if the user does not specify a
11138 constraint, the existing width and height will be used, to be
11139 compatible with panel items which often have take a default size. If
11140 the constraint is ``wx.AsIs``, the dimension will not be changed.
11142 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11145 def __repr__(self
):
11146 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11147 left
= property(_core_
.LayoutConstraints_left_get
)
11148 top
= property(_core_
.LayoutConstraints_top_get
)
11149 right
= property(_core_
.LayoutConstraints_right_get
)
11150 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
11151 width
= property(_core_
.LayoutConstraints_width_get
)
11152 height
= property(_core_
.LayoutConstraints_height_get
)
11153 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
11154 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
11155 def __init__(self
, *args
, **kwargs
):
11156 """__init__(self) -> LayoutConstraints"""
11157 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
11158 self
.this
= newobj
.this
11161 def SatisfyConstraints(*args
, **kwargs
):
11162 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11163 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
11165 def AreSatisfied(*args
, **kwargs
):
11166 """AreSatisfied(self) -> bool"""
11167 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
11170 class LayoutConstraintsPtr(LayoutConstraints
):
11171 def __init__(self
, this
):
11173 if not hasattr(self
,"thisown"): self
.thisown
= 0
11174 self
.__class
__ = LayoutConstraints
11175 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
11177 #----------------------------------------------------------------------------
11179 # Use Python's bool constants if available, make some if not
11183 __builtins__
.True = 1==1
11184 __builtins__
.False = 1==0
11185 def bool(value
): return not not value
11186 __builtins__
.bool = bool
11190 # workarounds for bad wxRTTI names
11191 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
11192 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
11193 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
11196 #----------------------------------------------------------------------------
11197 # Load version numbers from __version__... Ensure that major and minor
11198 # versions are the same for both wxPython and wxWidgets.
11200 from __version__
import *
11201 __version__
= VERSION_STRING
11203 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
11204 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
11205 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
11207 warnings
.warn("wxPython/wxWidgets release number mismatch")
11209 #----------------------------------------------------------------------------
11211 # Set the default string<-->unicode conversion encoding from the
11212 # locale. This encoding is used when string or unicode objects need
11213 # to be converted in order to pass them to wxWidgets. Please be aware
11214 # that the default encoding within the same locale may be slightly
11215 # different on different platforms. For example, please see
11216 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11217 # between the common latin/roman encodings.
11220 default
= locale
.getdefaultlocale()[1]
11222 default
= "iso8859-1"
11224 wx
.SetDefaultPyEncoding(default
)
11228 #----------------------------------------------------------------------------
11230 class PyDeadObjectError(AttributeError):
11233 class _wxPyDeadObject(object):
11235 Instances of wx objects that are OOR capable will have their __class__
11236 changed to this class when the C++ object is deleted. This should help
11237 prevent crashes due to referencing a bogus C++ pointer.
11239 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11240 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11242 def __repr__(self
):
11243 if not hasattr(self
, "_name"):
11244 self
._name
= "[unknown]"
11245 return self
.reprStr
% self
._name
11247 def __getattr__(self
, *args
):
11248 if not hasattr(self
, "_name"):
11249 self
._name
= "[unknown]"
11250 raise PyDeadObjectError(self
.attrStr
% self
._name
)
11252 def __nonzero__(self
):
11257 class PyUnbornObjectError(AttributeError):
11260 class _wxPyUnbornObject(object):
11262 Some stock objects are created when the wx._core module is
11263 imported, but their C++ instance is not created until the wx.App
11264 object is created and initialized. These object instances will
11265 temporarily have their __class__ changed to this class so an
11266 exception will be raised if they are used before the C++ instance
11270 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11271 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
11273 def __repr__(self
):
11274 #if not hasattr(self, "_name"):
11275 # self._name = "[unknown]"
11276 return self
.reprStr
#% self._name
11278 def __getattr__(self
, *args
):
11279 #if not hasattr(self, "_name"):
11280 # self._name = "[unknown]"
11281 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
11283 def __nonzero__(self
):
11287 #----------------------------------------------------------------------------
11289 def CallAfter(callable, *args
, **kw
):
11291 Call the specified function after the current and pending event
11292 handlers have been completed. This is also good for making GUI
11293 method calls from non-GUI threads. Any extra positional or
11294 keyword args are passed on to the callable when it is called.
11296 :see: `wx.FutureCall`
11299 assert app
is not None, 'No wx.App created yet'
11301 if not hasattr(app
, "_CallAfterId"):
11302 app
._CallAfterId
= wx
.NewEventType()
11303 app
.Connect(-1, -1, app
._CallAfterId
,
11304 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
11306 evt
.SetEventType(app
._CallAfterId
)
11307 evt
.callable = callable
11310 wx
.PostEvent(app
, evt
)
11312 #----------------------------------------------------------------------------
11317 A convenience class for `wx.Timer`, that calls the given callable
11318 object once after the given amount of milliseconds, passing any
11319 positional or keyword args. The return value of the callable is
11320 availbale after it has been run with the `GetResult` method.
11322 If you don't need to get the return value or restart the timer
11323 then there is no need to hold a reference to this object. It will
11324 hold a reference to itself while the timer is running (the timer
11325 has a reference to self.Notify) but the cycle will be broken when
11326 the timer completes, automatically cleaning up the wx.FutureCall
11329 :see: `wx.CallAfter`
11331 def __init__(self
, millis
, callable, *args
, **kwargs
):
11332 self
.millis
= millis
11333 self
.callable = callable
11334 self
.SetArgs(*args
, **kwargs
)
11336 self
.running
= False
11337 self
.hasRun
= False
11346 def Start(self
, millis
=None, *args
, **kwargs
):
11348 (Re)start the timer
11350 self
.hasRun
= False
11351 if millis
is not None:
11352 self
.millis
= millis
11354 self
.SetArgs(*args
, **kwargs
)
11356 self
.timer
= wx
.PyTimer(self
.Notify
)
11357 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
11358 self
.running
= True
11364 Stop and destroy the timer.
11366 if self
.timer
is not None:
11371 def GetInterval(self
):
11372 if self
.timer
is not None:
11373 return self
.timer
.GetInterval()
11378 def IsRunning(self
):
11379 return self
.timer
is not None and self
.timer
.IsRunning()
11382 def SetArgs(self
, *args
, **kwargs
):
11384 (Re)set the args passed to the callable object. This is
11385 useful in conjunction with Restart if you want to schedule a
11386 new call to the same callable object but with different
11390 self
.kwargs
= kwargs
11396 def GetResult(self
):
11401 The timer has expired so call the callable.
11403 if self
.callable and getattr(self
.callable, 'im_self', True):
11405 self
.running
= False
11406 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
11408 if not self
.running
:
11409 # if it wasn't restarted, then cleanup
11410 wx
.CallAfter(self
.Stop
)
11414 #----------------------------------------------------------------------------
11415 # Control which items in this module should be documented by epydoc.
11416 # We allow only classes and functions, which will help reduce the size
11417 # of the docs by filtering out the zillions of constants, EVT objects,
11418 # and etc that don't make much sense by themselves, but are instead
11419 # documented (or will be) as part of the classes/functions/methods
11420 # where they should be used.
11424 A filter for epydoc that only allows non-Ptr classes and
11425 fucntions, in order to reduce the clutter in the API docs.
11427 def __init__(self
, globals):
11428 self
._globals
= globals
11430 def __call__(self
, name
):
11432 obj
= self
._globals
.get(name
, None)
11433 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
11435 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
11439 #----------------------------------------------------------------------------
11440 #----------------------------------------------------------------------------
11442 # Import other modules in this package that should show up in the
11443 # "core" wx namespace
11445 from _windows
import *
11446 from _controls
import *
11447 from _misc
import *
11450 # Fixup the stock objects since they can't be used yet. (They will be
11451 # restored in wx.PyApp.OnInit.)
11452 _core_
._wxPyFixStockObjects
()
11454 #----------------------------------------------------------------------------
11455 #----------------------------------------------------------------------------