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 DEFAULT_CONTROL_BORDER
= _core_
.DEFAULT_CONTROL_BORDER
89 DEFAULT_STATUSBAR_STYLE
= _core_
.DEFAULT_STATUSBAR_STYLE
90 TAB_TRAVERSAL
= _core_
.TAB_TRAVERSAL
91 WANTS_CHARS
= _core_
.WANTS_CHARS
92 POPUP_WINDOW
= _core_
.POPUP_WINDOW
93 CENTER_FRAME
= _core_
.CENTER_FRAME
94 CENTRE_ON_SCREEN
= _core_
.CENTRE_ON_SCREEN
95 CENTER_ON_SCREEN
= _core_
.CENTER_ON_SCREEN
96 CLIP_CHILDREN
= _core_
.CLIP_CHILDREN
97 CLIP_SIBLINGS
= _core_
.CLIP_SIBLINGS
98 ALWAYS_SHOW_SB
= _core_
.ALWAYS_SHOW_SB
99 RETAINED
= _core_
.RETAINED
100 BACKINGSTORE
= _core_
.BACKINGSTORE
101 COLOURED
= _core_
.COLOURED
102 FIXED_LENGTH
= _core_
.FIXED_LENGTH
103 LB_NEEDED_SB
= _core_
.LB_NEEDED_SB
104 LB_ALWAYS_SB
= _core_
.LB_ALWAYS_SB
105 LB_SORT
= _core_
.LB_SORT
106 LB_SINGLE
= _core_
.LB_SINGLE
107 LB_MULTIPLE
= _core_
.LB_MULTIPLE
108 LB_EXTENDED
= _core_
.LB_EXTENDED
109 LB_OWNERDRAW
= _core_
.LB_OWNERDRAW
110 LB_HSCROLL
= _core_
.LB_HSCROLL
111 PROCESS_ENTER
= _core_
.PROCESS_ENTER
112 PASSWORD
= _core_
.PASSWORD
113 CB_SIMPLE
= _core_
.CB_SIMPLE
114 CB_DROPDOWN
= _core_
.CB_DROPDOWN
115 CB_SORT
= _core_
.CB_SORT
116 CB_READONLY
= _core_
.CB_READONLY
117 RA_HORIZONTAL
= _core_
.RA_HORIZONTAL
118 RA_VERTICAL
= _core_
.RA_VERTICAL
119 RA_SPECIFY_ROWS
= _core_
.RA_SPECIFY_ROWS
120 RA_SPECIFY_COLS
= _core_
.RA_SPECIFY_COLS
121 RA_USE_CHECKBOX
= _core_
.RA_USE_CHECKBOX
122 RB_GROUP
= _core_
.RB_GROUP
123 RB_SINGLE
= _core_
.RB_SINGLE
124 SB_HORIZONTAL
= _core_
.SB_HORIZONTAL
125 SB_VERTICAL
= _core_
.SB_VERTICAL
126 RB_USE_CHECKBOX
= _core_
.RB_USE_CHECKBOX
127 ST_SIZEGRIP
= _core_
.ST_SIZEGRIP
128 ST_NO_AUTORESIZE
= _core_
.ST_NO_AUTORESIZE
129 FLOOD_SURFACE
= _core_
.FLOOD_SURFACE
130 FLOOD_BORDER
= _core_
.FLOOD_BORDER
131 ODDEVEN_RULE
= _core_
.ODDEVEN_RULE
132 WINDING_RULE
= _core_
.WINDING_RULE
133 TOOL_TOP
= _core_
.TOOL_TOP
134 TOOL_BOTTOM
= _core_
.TOOL_BOTTOM
135 TOOL_LEFT
= _core_
.TOOL_LEFT
136 TOOL_RIGHT
= _core_
.TOOL_RIGHT
138 YES_NO
= _core_
.YES_NO
139 CANCEL
= _core_
.CANCEL
142 NO_DEFAULT
= _core_
.NO_DEFAULT
143 YES_DEFAULT
= _core_
.YES_DEFAULT
144 ICON_EXCLAMATION
= _core_
.ICON_EXCLAMATION
145 ICON_HAND
= _core_
.ICON_HAND
146 ICON_QUESTION
= _core_
.ICON_QUESTION
147 ICON_INFORMATION
= _core_
.ICON_INFORMATION
148 ICON_STOP
= _core_
.ICON_STOP
149 ICON_ASTERISK
= _core_
.ICON_ASTERISK
150 ICON_MASK
= _core_
.ICON_MASK
151 ICON_WARNING
= _core_
.ICON_WARNING
152 ICON_ERROR
= _core_
.ICON_ERROR
153 FORWARD
= _core_
.FORWARD
154 BACKWARD
= _core_
.BACKWARD
159 SIZE_AUTO_WIDTH
= _core_
.SIZE_AUTO_WIDTH
160 SIZE_AUTO_HEIGHT
= _core_
.SIZE_AUTO_HEIGHT
161 SIZE_AUTO
= _core_
.SIZE_AUTO
162 SIZE_USE_EXISTING
= _core_
.SIZE_USE_EXISTING
163 SIZE_ALLOW_MINUS_ONE
= _core_
.SIZE_ALLOW_MINUS_ONE
164 PORTRAIT
= _core_
.PORTRAIT
165 LANDSCAPE
= _core_
.LANDSCAPE
166 PRINT_QUALITY_HIGH
= _core_
.PRINT_QUALITY_HIGH
167 PRINT_QUALITY_MEDIUM
= _core_
.PRINT_QUALITY_MEDIUM
168 PRINT_QUALITY_LOW
= _core_
.PRINT_QUALITY_LOW
169 PRINT_QUALITY_DRAFT
= _core_
.PRINT_QUALITY_DRAFT
170 ID_ANY
= _core_
.ID_ANY
171 ID_SEPARATOR
= _core_
.ID_SEPARATOR
172 ID_LOWEST
= _core_
.ID_LOWEST
173 ID_OPEN
= _core_
.ID_OPEN
174 ID_CLOSE
= _core_
.ID_CLOSE
175 ID_NEW
= _core_
.ID_NEW
176 ID_SAVE
= _core_
.ID_SAVE
177 ID_SAVEAS
= _core_
.ID_SAVEAS
178 ID_REVERT
= _core_
.ID_REVERT
179 ID_EXIT
= _core_
.ID_EXIT
180 ID_UNDO
= _core_
.ID_UNDO
181 ID_REDO
= _core_
.ID_REDO
182 ID_HELP
= _core_
.ID_HELP
183 ID_PRINT
= _core_
.ID_PRINT
184 ID_PRINT_SETUP
= _core_
.ID_PRINT_SETUP
185 ID_PREVIEW
= _core_
.ID_PREVIEW
186 ID_ABOUT
= _core_
.ID_ABOUT
187 ID_HELP_CONTENTS
= _core_
.ID_HELP_CONTENTS
188 ID_HELP_COMMANDS
= _core_
.ID_HELP_COMMANDS
189 ID_HELP_PROCEDURES
= _core_
.ID_HELP_PROCEDURES
190 ID_HELP_CONTEXT
= _core_
.ID_HELP_CONTEXT
191 ID_CLOSE_ALL
= _core_
.ID_CLOSE_ALL
192 ID_PREFERENCES
= _core_
.ID_PREFERENCES
193 ID_CUT
= _core_
.ID_CUT
194 ID_COPY
= _core_
.ID_COPY
195 ID_PASTE
= _core_
.ID_PASTE
196 ID_CLEAR
= _core_
.ID_CLEAR
197 ID_FIND
= _core_
.ID_FIND
198 ID_DUPLICATE
= _core_
.ID_DUPLICATE
199 ID_SELECTALL
= _core_
.ID_SELECTALL
200 ID_DELETE
= _core_
.ID_DELETE
201 ID_REPLACE
= _core_
.ID_REPLACE
202 ID_REPLACE_ALL
= _core_
.ID_REPLACE_ALL
203 ID_PROPERTIES
= _core_
.ID_PROPERTIES
204 ID_VIEW_DETAILS
= _core_
.ID_VIEW_DETAILS
205 ID_VIEW_LARGEICONS
= _core_
.ID_VIEW_LARGEICONS
206 ID_VIEW_SMALLICONS
= _core_
.ID_VIEW_SMALLICONS
207 ID_VIEW_LIST
= _core_
.ID_VIEW_LIST
208 ID_VIEW_SORTDATE
= _core_
.ID_VIEW_SORTDATE
209 ID_VIEW_SORTNAME
= _core_
.ID_VIEW_SORTNAME
210 ID_VIEW_SORTSIZE
= _core_
.ID_VIEW_SORTSIZE
211 ID_VIEW_SORTTYPE
= _core_
.ID_VIEW_SORTTYPE
212 ID_FILE1
= _core_
.ID_FILE1
213 ID_FILE2
= _core_
.ID_FILE2
214 ID_FILE3
= _core_
.ID_FILE3
215 ID_FILE4
= _core_
.ID_FILE4
216 ID_FILE5
= _core_
.ID_FILE5
217 ID_FILE6
= _core_
.ID_FILE6
218 ID_FILE7
= _core_
.ID_FILE7
219 ID_FILE8
= _core_
.ID_FILE8
220 ID_FILE9
= _core_
.ID_FILE9
222 ID_CANCEL
= _core_
.ID_CANCEL
223 ID_APPLY
= _core_
.ID_APPLY
224 ID_YES
= _core_
.ID_YES
226 ID_STATIC
= _core_
.ID_STATIC
227 ID_FORWARD
= _core_
.ID_FORWARD
228 ID_BACKWARD
= _core_
.ID_BACKWARD
229 ID_DEFAULT
= _core_
.ID_DEFAULT
230 ID_MORE
= _core_
.ID_MORE
231 ID_SETUP
= _core_
.ID_SETUP
232 ID_RESET
= _core_
.ID_RESET
233 ID_CONTEXT_HELP
= _core_
.ID_CONTEXT_HELP
234 ID_YESTOALL
= _core_
.ID_YESTOALL
235 ID_NOTOALL
= _core_
.ID_NOTOALL
236 ID_ABORT
= _core_
.ID_ABORT
237 ID_RETRY
= _core_
.ID_RETRY
238 ID_IGNORE
= _core_
.ID_IGNORE
239 ID_ADD
= _core_
.ID_ADD
240 ID_REMOVE
= _core_
.ID_REMOVE
242 ID_DOWN
= _core_
.ID_DOWN
243 ID_HOME
= _core_
.ID_HOME
244 ID_REFRESH
= _core_
.ID_REFRESH
245 ID_STOP
= _core_
.ID_STOP
246 ID_INDEX
= _core_
.ID_INDEX
247 ID_BOLD
= _core_
.ID_BOLD
248 ID_ITALIC
= _core_
.ID_ITALIC
249 ID_JUSTIFY_CENTER
= _core_
.ID_JUSTIFY_CENTER
250 ID_JUSTIFY_FILL
= _core_
.ID_JUSTIFY_FILL
251 ID_JUSTIFY_RIGHT
= _core_
.ID_JUSTIFY_RIGHT
252 ID_JUSTIFY_LEFT
= _core_
.ID_JUSTIFY_LEFT
253 ID_UNDERLINE
= _core_
.ID_UNDERLINE
254 ID_INDENT
= _core_
.ID_INDENT
255 ID_UNINDENT
= _core_
.ID_UNINDENT
256 ID_ZOOM_100
= _core_
.ID_ZOOM_100
257 ID_ZOOM_FIT
= _core_
.ID_ZOOM_FIT
258 ID_ZOOM_IN
= _core_
.ID_ZOOM_IN
259 ID_ZOOM_OUT
= _core_
.ID_ZOOM_OUT
260 ID_UNDELETE
= _core_
.ID_UNDELETE
261 ID_REVERT_TO_SAVED
= _core_
.ID_REVERT_TO_SAVED
262 ID_HIGHEST
= _core_
.ID_HIGHEST
265 HIDE_READONLY
= _core_
.HIDE_READONLY
266 OVERWRITE_PROMPT
= _core_
.OVERWRITE_PROMPT
267 FILE_MUST_EXIST
= _core_
.FILE_MUST_EXIST
268 MULTIPLE
= _core_
.MULTIPLE
269 CHANGE_DIR
= _core_
.CHANGE_DIR
270 ACCEL_ALT
= _core_
.ACCEL_ALT
271 ACCEL_CTRL
= _core_
.ACCEL_CTRL
272 ACCEL_SHIFT
= _core_
.ACCEL_SHIFT
273 ACCEL_NORMAL
= _core_
.ACCEL_NORMAL
274 PD_AUTO_HIDE
= _core_
.PD_AUTO_HIDE
275 PD_APP_MODAL
= _core_
.PD_APP_MODAL
276 PD_CAN_ABORT
= _core_
.PD_CAN_ABORT
277 PD_ELAPSED_TIME
= _core_
.PD_ELAPSED_TIME
278 PD_ESTIMATED_TIME
= _core_
.PD_ESTIMATED_TIME
279 PD_REMAINING_TIME
= _core_
.PD_REMAINING_TIME
280 PD_SMOOTH
= _core_
.PD_SMOOTH
281 PD_CAN_SKIP
= _core_
.PD_CAN_SKIP
282 DD_NEW_DIR_BUTTON
= _core_
.DD_NEW_DIR_BUTTON
283 DD_DEFAULT_STYLE
= _core_
.DD_DEFAULT_STYLE
284 MENU_TEAROFF
= _core_
.MENU_TEAROFF
285 MB_DOCKABLE
= _core_
.MB_DOCKABLE
286 NO_FULL_REPAINT_ON_RESIZE
= _core_
.NO_FULL_REPAINT_ON_RESIZE
287 FULL_REPAINT_ON_RESIZE
= _core_
.FULL_REPAINT_ON_RESIZE
288 LI_HORIZONTAL
= _core_
.LI_HORIZONTAL
289 LI_VERTICAL
= _core_
.LI_VERTICAL
290 WS_EX_VALIDATE_RECURSIVELY
= _core_
.WS_EX_VALIDATE_RECURSIVELY
291 WS_EX_BLOCK_EVENTS
= _core_
.WS_EX_BLOCK_EVENTS
292 WS_EX_TRANSIENT
= _core_
.WS_EX_TRANSIENT
293 WS_EX_THEMED_BACKGROUND
= _core_
.WS_EX_THEMED_BACKGROUND
294 WS_EX_PROCESS_IDLE
= _core_
.WS_EX_PROCESS_IDLE
295 WS_EX_PROCESS_UI_UPDATES
= _core_
.WS_EX_PROCESS_UI_UPDATES
296 MM_TEXT
= _core_
.MM_TEXT
297 MM_LOMETRIC
= _core_
.MM_LOMETRIC
298 MM_HIMETRIC
= _core_
.MM_HIMETRIC
299 MM_LOENGLISH
= _core_
.MM_LOENGLISH
300 MM_HIENGLISH
= _core_
.MM_HIENGLISH
301 MM_TWIPS
= _core_
.MM_TWIPS
302 MM_ISOTROPIC
= _core_
.MM_ISOTROPIC
303 MM_ANISOTROPIC
= _core_
.MM_ANISOTROPIC
304 MM_POINTS
= _core_
.MM_POINTS
305 MM_METRIC
= _core_
.MM_METRIC
306 CENTRE
= _core_
.CENTRE
307 CENTER
= _core_
.CENTER
308 HORIZONTAL
= _core_
.HORIZONTAL
309 VERTICAL
= _core_
.VERTICAL
316 BOTTOM
= _core_
.BOTTOM
322 ALIGN_NOT
= _core_
.ALIGN_NOT
323 ALIGN_CENTER_HORIZONTAL
= _core_
.ALIGN_CENTER_HORIZONTAL
324 ALIGN_CENTRE_HORIZONTAL
= _core_
.ALIGN_CENTRE_HORIZONTAL
325 ALIGN_LEFT
= _core_
.ALIGN_LEFT
326 ALIGN_TOP
= _core_
.ALIGN_TOP
327 ALIGN_RIGHT
= _core_
.ALIGN_RIGHT
328 ALIGN_BOTTOM
= _core_
.ALIGN_BOTTOM
329 ALIGN_CENTER_VERTICAL
= _core_
.ALIGN_CENTER_VERTICAL
330 ALIGN_CENTRE_VERTICAL
= _core_
.ALIGN_CENTRE_VERTICAL
331 ALIGN_CENTER
= _core_
.ALIGN_CENTER
332 ALIGN_CENTRE
= _core_
.ALIGN_CENTRE
333 ALIGN_MASK
= _core_
.ALIGN_MASK
334 STRETCH_NOT
= _core_
.STRETCH_NOT
335 SHRINK
= _core_
.SHRINK
337 EXPAND
= _core_
.EXPAND
338 SHAPED
= _core_
.SHAPED
339 FIXED_MINSIZE
= _core_
.FIXED_MINSIZE
341 ADJUST_MINSIZE
= _core_
.ADJUST_MINSIZE
342 BORDER_DEFAULT
= _core_
.BORDER_DEFAULT
343 BORDER_NONE
= _core_
.BORDER_NONE
344 BORDER_STATIC
= _core_
.BORDER_STATIC
345 BORDER_SIMPLE
= _core_
.BORDER_SIMPLE
346 BORDER_RAISED
= _core_
.BORDER_RAISED
347 BORDER_SUNKEN
= _core_
.BORDER_SUNKEN
348 BORDER_DOUBLE
= _core_
.BORDER_DOUBLE
349 BORDER_MASK
= _core_
.BORDER_MASK
350 BG_STYLE_SYSTEM
= _core_
.BG_STYLE_SYSTEM
351 BG_STYLE_COLOUR
= _core_
.BG_STYLE_COLOUR
352 BG_STYLE_CUSTOM
= _core_
.BG_STYLE_CUSTOM
353 DEFAULT
= _core_
.DEFAULT
354 DECORATIVE
= _core_
.DECORATIVE
356 SCRIPT
= _core_
.SCRIPT
358 MODERN
= _core_
.MODERN
359 TELETYPE
= _core_
.TELETYPE
360 VARIABLE
= _core_
.VARIABLE
362 NORMAL
= _core_
.NORMAL
365 ITALIC
= _core_
.ITALIC
369 LONG_DASH
= _core_
.LONG_DASH
370 SHORT_DASH
= _core_
.SHORT_DASH
371 DOT_DASH
= _core_
.DOT_DASH
372 USER_DASH
= _core_
.USER_DASH
373 TRANSPARENT
= _core_
.TRANSPARENT
374 STIPPLE
= _core_
.STIPPLE
375 STIPPLE_MASK
= _core_
.STIPPLE_MASK
376 STIPPLE_MASK_OPAQUE
= _core_
.STIPPLE_MASK_OPAQUE
377 BDIAGONAL_HATCH
= _core_
.BDIAGONAL_HATCH
378 CROSSDIAG_HATCH
= _core_
.CROSSDIAG_HATCH
379 FDIAGONAL_HATCH
= _core_
.FDIAGONAL_HATCH
380 CROSS_HATCH
= _core_
.CROSS_HATCH
381 HORIZONTAL_HATCH
= _core_
.HORIZONTAL_HATCH
382 VERTICAL_HATCH
= _core_
.VERTICAL_HATCH
383 JOIN_BEVEL
= _core_
.JOIN_BEVEL
384 JOIN_MITER
= _core_
.JOIN_MITER
385 JOIN_ROUND
= _core_
.JOIN_ROUND
386 CAP_ROUND
= _core_
.CAP_ROUND
387 CAP_PROJECTING
= _core_
.CAP_PROJECTING
388 CAP_BUTT
= _core_
.CAP_BUTT
391 INVERT
= _core_
.INVERT
392 OR_REVERSE
= _core_
.OR_REVERSE
393 AND_REVERSE
= _core_
.AND_REVERSE
396 AND_INVERT
= _core_
.AND_INVERT
400 SRC_INVERT
= _core_
.SRC_INVERT
401 OR_INVERT
= _core_
.OR_INVERT
405 WXK_BACK
= _core_
.WXK_BACK
406 WXK_TAB
= _core_
.WXK_TAB
407 WXK_RETURN
= _core_
.WXK_RETURN
408 WXK_ESCAPE
= _core_
.WXK_ESCAPE
409 WXK_SPACE
= _core_
.WXK_SPACE
410 WXK_DELETE
= _core_
.WXK_DELETE
411 WXK_START
= _core_
.WXK_START
412 WXK_LBUTTON
= _core_
.WXK_LBUTTON
413 WXK_RBUTTON
= _core_
.WXK_RBUTTON
414 WXK_CANCEL
= _core_
.WXK_CANCEL
415 WXK_MBUTTON
= _core_
.WXK_MBUTTON
416 WXK_CLEAR
= _core_
.WXK_CLEAR
417 WXK_SHIFT
= _core_
.WXK_SHIFT
418 WXK_ALT
= _core_
.WXK_ALT
419 WXK_CONTROL
= _core_
.WXK_CONTROL
420 WXK_MENU
= _core_
.WXK_MENU
421 WXK_PAUSE
= _core_
.WXK_PAUSE
422 WXK_CAPITAL
= _core_
.WXK_CAPITAL
423 WXK_PRIOR
= _core_
.WXK_PRIOR
424 WXK_NEXT
= _core_
.WXK_NEXT
425 WXK_END
= _core_
.WXK_END
426 WXK_HOME
= _core_
.WXK_HOME
427 WXK_LEFT
= _core_
.WXK_LEFT
428 WXK_UP
= _core_
.WXK_UP
429 WXK_RIGHT
= _core_
.WXK_RIGHT
430 WXK_DOWN
= _core_
.WXK_DOWN
431 WXK_SELECT
= _core_
.WXK_SELECT
432 WXK_PRINT
= _core_
.WXK_PRINT
433 WXK_EXECUTE
= _core_
.WXK_EXECUTE
434 WXK_SNAPSHOT
= _core_
.WXK_SNAPSHOT
435 WXK_INSERT
= _core_
.WXK_INSERT
436 WXK_HELP
= _core_
.WXK_HELP
437 WXK_NUMPAD0
= _core_
.WXK_NUMPAD0
438 WXK_NUMPAD1
= _core_
.WXK_NUMPAD1
439 WXK_NUMPAD2
= _core_
.WXK_NUMPAD2
440 WXK_NUMPAD3
= _core_
.WXK_NUMPAD3
441 WXK_NUMPAD4
= _core_
.WXK_NUMPAD4
442 WXK_NUMPAD5
= _core_
.WXK_NUMPAD5
443 WXK_NUMPAD6
= _core_
.WXK_NUMPAD6
444 WXK_NUMPAD7
= _core_
.WXK_NUMPAD7
445 WXK_NUMPAD8
= _core_
.WXK_NUMPAD8
446 WXK_NUMPAD9
= _core_
.WXK_NUMPAD9
447 WXK_MULTIPLY
= _core_
.WXK_MULTIPLY
448 WXK_ADD
= _core_
.WXK_ADD
449 WXK_SEPARATOR
= _core_
.WXK_SEPARATOR
450 WXK_SUBTRACT
= _core_
.WXK_SUBTRACT
451 WXK_DECIMAL
= _core_
.WXK_DECIMAL
452 WXK_DIVIDE
= _core_
.WXK_DIVIDE
453 WXK_F1
= _core_
.WXK_F1
454 WXK_F2
= _core_
.WXK_F2
455 WXK_F3
= _core_
.WXK_F3
456 WXK_F4
= _core_
.WXK_F4
457 WXK_F5
= _core_
.WXK_F5
458 WXK_F6
= _core_
.WXK_F6
459 WXK_F7
= _core_
.WXK_F7
460 WXK_F8
= _core_
.WXK_F8
461 WXK_F9
= _core_
.WXK_F9
462 WXK_F10
= _core_
.WXK_F10
463 WXK_F11
= _core_
.WXK_F11
464 WXK_F12
= _core_
.WXK_F12
465 WXK_F13
= _core_
.WXK_F13
466 WXK_F14
= _core_
.WXK_F14
467 WXK_F15
= _core_
.WXK_F15
468 WXK_F16
= _core_
.WXK_F16
469 WXK_F17
= _core_
.WXK_F17
470 WXK_F18
= _core_
.WXK_F18
471 WXK_F19
= _core_
.WXK_F19
472 WXK_F20
= _core_
.WXK_F20
473 WXK_F21
= _core_
.WXK_F21
474 WXK_F22
= _core_
.WXK_F22
475 WXK_F23
= _core_
.WXK_F23
476 WXK_F24
= _core_
.WXK_F24
477 WXK_NUMLOCK
= _core_
.WXK_NUMLOCK
478 WXK_SCROLL
= _core_
.WXK_SCROLL
479 WXK_PAGEUP
= _core_
.WXK_PAGEUP
480 WXK_PAGEDOWN
= _core_
.WXK_PAGEDOWN
481 WXK_NUMPAD_SPACE
= _core_
.WXK_NUMPAD_SPACE
482 WXK_NUMPAD_TAB
= _core_
.WXK_NUMPAD_TAB
483 WXK_NUMPAD_ENTER
= _core_
.WXK_NUMPAD_ENTER
484 WXK_NUMPAD_F1
= _core_
.WXK_NUMPAD_F1
485 WXK_NUMPAD_F2
= _core_
.WXK_NUMPAD_F2
486 WXK_NUMPAD_F3
= _core_
.WXK_NUMPAD_F3
487 WXK_NUMPAD_F4
= _core_
.WXK_NUMPAD_F4
488 WXK_NUMPAD_HOME
= _core_
.WXK_NUMPAD_HOME
489 WXK_NUMPAD_LEFT
= _core_
.WXK_NUMPAD_LEFT
490 WXK_NUMPAD_UP
= _core_
.WXK_NUMPAD_UP
491 WXK_NUMPAD_RIGHT
= _core_
.WXK_NUMPAD_RIGHT
492 WXK_NUMPAD_DOWN
= _core_
.WXK_NUMPAD_DOWN
493 WXK_NUMPAD_PRIOR
= _core_
.WXK_NUMPAD_PRIOR
494 WXK_NUMPAD_PAGEUP
= _core_
.WXK_NUMPAD_PAGEUP
495 WXK_NUMPAD_NEXT
= _core_
.WXK_NUMPAD_NEXT
496 WXK_NUMPAD_PAGEDOWN
= _core_
.WXK_NUMPAD_PAGEDOWN
497 WXK_NUMPAD_END
= _core_
.WXK_NUMPAD_END
498 WXK_NUMPAD_BEGIN
= _core_
.WXK_NUMPAD_BEGIN
499 WXK_NUMPAD_INSERT
= _core_
.WXK_NUMPAD_INSERT
500 WXK_NUMPAD_DELETE
= _core_
.WXK_NUMPAD_DELETE
501 WXK_NUMPAD_EQUAL
= _core_
.WXK_NUMPAD_EQUAL
502 WXK_NUMPAD_MULTIPLY
= _core_
.WXK_NUMPAD_MULTIPLY
503 WXK_NUMPAD_ADD
= _core_
.WXK_NUMPAD_ADD
504 WXK_NUMPAD_SEPARATOR
= _core_
.WXK_NUMPAD_SEPARATOR
505 WXK_NUMPAD_SUBTRACT
= _core_
.WXK_NUMPAD_SUBTRACT
506 WXK_NUMPAD_DECIMAL
= _core_
.WXK_NUMPAD_DECIMAL
507 WXK_NUMPAD_DIVIDE
= _core_
.WXK_NUMPAD_DIVIDE
508 WXK_WINDOWS_LEFT
= _core_
.WXK_WINDOWS_LEFT
509 WXK_WINDOWS_RIGHT
= _core_
.WXK_WINDOWS_RIGHT
510 WXK_WINDOWS_MENU
= _core_
.WXK_WINDOWS_MENU
511 WXK_COMMAND
= _core_
.WXK_COMMAND
512 WXK_SPECIAL1
= _core_
.WXK_SPECIAL1
513 WXK_SPECIAL2
= _core_
.WXK_SPECIAL2
514 WXK_SPECIAL3
= _core_
.WXK_SPECIAL3
515 WXK_SPECIAL4
= _core_
.WXK_SPECIAL4
516 WXK_SPECIAL5
= _core_
.WXK_SPECIAL5
517 WXK_SPECIAL6
= _core_
.WXK_SPECIAL6
518 WXK_SPECIAL7
= _core_
.WXK_SPECIAL7
519 WXK_SPECIAL8
= _core_
.WXK_SPECIAL8
520 WXK_SPECIAL9
= _core_
.WXK_SPECIAL9
521 WXK_SPECIAL10
= _core_
.WXK_SPECIAL10
522 WXK_SPECIAL11
= _core_
.WXK_SPECIAL11
523 WXK_SPECIAL12
= _core_
.WXK_SPECIAL12
524 WXK_SPECIAL13
= _core_
.WXK_SPECIAL13
525 WXK_SPECIAL14
= _core_
.WXK_SPECIAL14
526 WXK_SPECIAL15
= _core_
.WXK_SPECIAL15
527 WXK_SPECIAL16
= _core_
.WXK_SPECIAL16
528 WXK_SPECIAL17
= _core_
.WXK_SPECIAL17
529 WXK_SPECIAL18
= _core_
.WXK_SPECIAL18
530 WXK_SPECIAL19
= _core_
.WXK_SPECIAL19
531 WXK_SPECIAL20
= _core_
.WXK_SPECIAL20
532 PAPER_NONE
= _core_
.PAPER_NONE
533 PAPER_LETTER
= _core_
.PAPER_LETTER
534 PAPER_LEGAL
= _core_
.PAPER_LEGAL
535 PAPER_A4
= _core_
.PAPER_A4
536 PAPER_CSHEET
= _core_
.PAPER_CSHEET
537 PAPER_DSHEET
= _core_
.PAPER_DSHEET
538 PAPER_ESHEET
= _core_
.PAPER_ESHEET
539 PAPER_LETTERSMALL
= _core_
.PAPER_LETTERSMALL
540 PAPER_TABLOID
= _core_
.PAPER_TABLOID
541 PAPER_LEDGER
= _core_
.PAPER_LEDGER
542 PAPER_STATEMENT
= _core_
.PAPER_STATEMENT
543 PAPER_EXECUTIVE
= _core_
.PAPER_EXECUTIVE
544 PAPER_A3
= _core_
.PAPER_A3
545 PAPER_A4SMALL
= _core_
.PAPER_A4SMALL
546 PAPER_A5
= _core_
.PAPER_A5
547 PAPER_B4
= _core_
.PAPER_B4
548 PAPER_B5
= _core_
.PAPER_B5
549 PAPER_FOLIO
= _core_
.PAPER_FOLIO
550 PAPER_QUARTO
= _core_
.PAPER_QUARTO
551 PAPER_10X14
= _core_
.PAPER_10X14
552 PAPER_11X17
= _core_
.PAPER_11X17
553 PAPER_NOTE
= _core_
.PAPER_NOTE
554 PAPER_ENV_9
= _core_
.PAPER_ENV_9
555 PAPER_ENV_10
= _core_
.PAPER_ENV_10
556 PAPER_ENV_11
= _core_
.PAPER_ENV_11
557 PAPER_ENV_12
= _core_
.PAPER_ENV_12
558 PAPER_ENV_14
= _core_
.PAPER_ENV_14
559 PAPER_ENV_DL
= _core_
.PAPER_ENV_DL
560 PAPER_ENV_C5
= _core_
.PAPER_ENV_C5
561 PAPER_ENV_C3
= _core_
.PAPER_ENV_C3
562 PAPER_ENV_C4
= _core_
.PAPER_ENV_C4
563 PAPER_ENV_C6
= _core_
.PAPER_ENV_C6
564 PAPER_ENV_C65
= _core_
.PAPER_ENV_C65
565 PAPER_ENV_B4
= _core_
.PAPER_ENV_B4
566 PAPER_ENV_B5
= _core_
.PAPER_ENV_B5
567 PAPER_ENV_B6
= _core_
.PAPER_ENV_B6
568 PAPER_ENV_ITALY
= _core_
.PAPER_ENV_ITALY
569 PAPER_ENV_MONARCH
= _core_
.PAPER_ENV_MONARCH
570 PAPER_ENV_PERSONAL
= _core_
.PAPER_ENV_PERSONAL
571 PAPER_FANFOLD_US
= _core_
.PAPER_FANFOLD_US
572 PAPER_FANFOLD_STD_GERMAN
= _core_
.PAPER_FANFOLD_STD_GERMAN
573 PAPER_FANFOLD_LGL_GERMAN
= _core_
.PAPER_FANFOLD_LGL_GERMAN
574 PAPER_ISO_B4
= _core_
.PAPER_ISO_B4
575 PAPER_JAPANESE_POSTCARD
= _core_
.PAPER_JAPANESE_POSTCARD
576 PAPER_9X11
= _core_
.PAPER_9X11
577 PAPER_10X11
= _core_
.PAPER_10X11
578 PAPER_15X11
= _core_
.PAPER_15X11
579 PAPER_ENV_INVITE
= _core_
.PAPER_ENV_INVITE
580 PAPER_LETTER_EXTRA
= _core_
.PAPER_LETTER_EXTRA
581 PAPER_LEGAL_EXTRA
= _core_
.PAPER_LEGAL_EXTRA
582 PAPER_TABLOID_EXTRA
= _core_
.PAPER_TABLOID_EXTRA
583 PAPER_A4_EXTRA
= _core_
.PAPER_A4_EXTRA
584 PAPER_LETTER_TRANSVERSE
= _core_
.PAPER_LETTER_TRANSVERSE
585 PAPER_A4_TRANSVERSE
= _core_
.PAPER_A4_TRANSVERSE
586 PAPER_LETTER_EXTRA_TRANSVERSE
= _core_
.PAPER_LETTER_EXTRA_TRANSVERSE
587 PAPER_A_PLUS
= _core_
.PAPER_A_PLUS
588 PAPER_B_PLUS
= _core_
.PAPER_B_PLUS
589 PAPER_LETTER_PLUS
= _core_
.PAPER_LETTER_PLUS
590 PAPER_A4_PLUS
= _core_
.PAPER_A4_PLUS
591 PAPER_A5_TRANSVERSE
= _core_
.PAPER_A5_TRANSVERSE
592 PAPER_B5_TRANSVERSE
= _core_
.PAPER_B5_TRANSVERSE
593 PAPER_A3_EXTRA
= _core_
.PAPER_A3_EXTRA
594 PAPER_A5_EXTRA
= _core_
.PAPER_A5_EXTRA
595 PAPER_B5_EXTRA
= _core_
.PAPER_B5_EXTRA
596 PAPER_A2
= _core_
.PAPER_A2
597 PAPER_A3_TRANSVERSE
= _core_
.PAPER_A3_TRANSVERSE
598 PAPER_A3_EXTRA_TRANSVERSE
= _core_
.PAPER_A3_EXTRA_TRANSVERSE
599 DUPLEX_SIMPLEX
= _core_
.DUPLEX_SIMPLEX
600 DUPLEX_HORIZONTAL
= _core_
.DUPLEX_HORIZONTAL
601 DUPLEX_VERTICAL
= _core_
.DUPLEX_VERTICAL
602 ITEM_SEPARATOR
= _core_
.ITEM_SEPARATOR
603 ITEM_NORMAL
= _core_
.ITEM_NORMAL
604 ITEM_CHECK
= _core_
.ITEM_CHECK
605 ITEM_RADIO
= _core_
.ITEM_RADIO
606 ITEM_MAX
= _core_
.ITEM_MAX
607 HT_NOWHERE
= _core_
.HT_NOWHERE
608 HT_SCROLLBAR_FIRST
= _core_
.HT_SCROLLBAR_FIRST
609 HT_SCROLLBAR_ARROW_LINE_1
= _core_
.HT_SCROLLBAR_ARROW_LINE_1
610 HT_SCROLLBAR_ARROW_LINE_2
= _core_
.HT_SCROLLBAR_ARROW_LINE_2
611 HT_SCROLLBAR_ARROW_PAGE_1
= _core_
.HT_SCROLLBAR_ARROW_PAGE_1
612 HT_SCROLLBAR_ARROW_PAGE_2
= _core_
.HT_SCROLLBAR_ARROW_PAGE_2
613 HT_SCROLLBAR_THUMB
= _core_
.HT_SCROLLBAR_THUMB
614 HT_SCROLLBAR_BAR_1
= _core_
.HT_SCROLLBAR_BAR_1
615 HT_SCROLLBAR_BAR_2
= _core_
.HT_SCROLLBAR_BAR_2
616 HT_SCROLLBAR_LAST
= _core_
.HT_SCROLLBAR_LAST
617 HT_WINDOW_OUTSIDE
= _core_
.HT_WINDOW_OUTSIDE
618 HT_WINDOW_INSIDE
= _core_
.HT_WINDOW_INSIDE
619 HT_WINDOW_VERT_SCROLLBAR
= _core_
.HT_WINDOW_VERT_SCROLLBAR
620 HT_WINDOW_HORZ_SCROLLBAR
= _core_
.HT_WINDOW_HORZ_SCROLLBAR
621 HT_WINDOW_CORNER
= _core_
.HT_WINDOW_CORNER
622 HT_MAX
= _core_
.HT_MAX
623 MOD_NONE
= _core_
.MOD_NONE
624 MOD_ALT
= _core_
.MOD_ALT
625 MOD_CONTROL
= _core_
.MOD_CONTROL
626 MOD_SHIFT
= _core_
.MOD_SHIFT
627 MOD_WIN
= _core_
.MOD_WIN
628 UPDATE_UI_NONE
= _core_
.UPDATE_UI_NONE
629 UPDATE_UI_RECURSE
= _core_
.UPDATE_UI_RECURSE
630 UPDATE_UI_FROMIDLE
= _core_
.UPDATE_UI_FROMIDLE
631 #---------------------------------------------------------------------------
633 class Object(object):
635 The base class for most wx objects, although in wxPython not
636 much functionality is needed nor exposed.
638 def __init__(self
): raise RuntimeError, "No constructor defined"
640 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
641 def GetClassName(*args
, **kwargs
):
643 GetClassName(self) -> String
645 Returns the class name of the C++ class using wxRTTI.
647 return _core_
.Object_GetClassName(*args
, **kwargs
)
649 def Destroy(*args
, **kwargs
):
653 Deletes the C++ object this Python object is a proxy for.
655 return _core_
.Object_Destroy(*args
, **kwargs
)
658 class ObjectPtr(Object
):
659 def __init__(self
, this
):
661 if not hasattr(self
,"thisown"): self
.thisown
= 0
662 self
.__class
__ = Object
663 _core_
.Object_swigregister(ObjectPtr
)
664 _wxPySetDictionary
= _core_
._wxPySetDictionary
666 _wxPyFixStockObjects
= _core_
._wxPyFixStockObjects
669 EmptyString
= cvar
.EmptyString
671 #---------------------------------------------------------------------------
673 BITMAP_TYPE_INVALID
= _core_
.BITMAP_TYPE_INVALID
674 BITMAP_TYPE_BMP
= _core_
.BITMAP_TYPE_BMP
675 BITMAP_TYPE_ICO
= _core_
.BITMAP_TYPE_ICO
676 BITMAP_TYPE_CUR
= _core_
.BITMAP_TYPE_CUR
677 BITMAP_TYPE_XBM
= _core_
.BITMAP_TYPE_XBM
678 BITMAP_TYPE_XBM_DATA
= _core_
.BITMAP_TYPE_XBM_DATA
679 BITMAP_TYPE_XPM
= _core_
.BITMAP_TYPE_XPM
680 BITMAP_TYPE_XPM_DATA
= _core_
.BITMAP_TYPE_XPM_DATA
681 BITMAP_TYPE_TIF
= _core_
.BITMAP_TYPE_TIF
682 BITMAP_TYPE_GIF
= _core_
.BITMAP_TYPE_GIF
683 BITMAP_TYPE_PNG
= _core_
.BITMAP_TYPE_PNG
684 BITMAP_TYPE_JPEG
= _core_
.BITMAP_TYPE_JPEG
685 BITMAP_TYPE_PNM
= _core_
.BITMAP_TYPE_PNM
686 BITMAP_TYPE_PCX
= _core_
.BITMAP_TYPE_PCX
687 BITMAP_TYPE_PICT
= _core_
.BITMAP_TYPE_PICT
688 BITMAP_TYPE_ICON
= _core_
.BITMAP_TYPE_ICON
689 BITMAP_TYPE_ANI
= _core_
.BITMAP_TYPE_ANI
690 BITMAP_TYPE_IFF
= _core_
.BITMAP_TYPE_IFF
691 BITMAP_TYPE_MACCURSOR
= _core_
.BITMAP_TYPE_MACCURSOR
692 BITMAP_TYPE_ANY
= _core_
.BITMAP_TYPE_ANY
693 CURSOR_NONE
= _core_
.CURSOR_NONE
694 CURSOR_ARROW
= _core_
.CURSOR_ARROW
695 CURSOR_RIGHT_ARROW
= _core_
.CURSOR_RIGHT_ARROW
696 CURSOR_BULLSEYE
= _core_
.CURSOR_BULLSEYE
697 CURSOR_CHAR
= _core_
.CURSOR_CHAR
698 CURSOR_CROSS
= _core_
.CURSOR_CROSS
699 CURSOR_HAND
= _core_
.CURSOR_HAND
700 CURSOR_IBEAM
= _core_
.CURSOR_IBEAM
701 CURSOR_LEFT_BUTTON
= _core_
.CURSOR_LEFT_BUTTON
702 CURSOR_MAGNIFIER
= _core_
.CURSOR_MAGNIFIER
703 CURSOR_MIDDLE_BUTTON
= _core_
.CURSOR_MIDDLE_BUTTON
704 CURSOR_NO_ENTRY
= _core_
.CURSOR_NO_ENTRY
705 CURSOR_PAINT_BRUSH
= _core_
.CURSOR_PAINT_BRUSH
706 CURSOR_PENCIL
= _core_
.CURSOR_PENCIL
707 CURSOR_POINT_LEFT
= _core_
.CURSOR_POINT_LEFT
708 CURSOR_POINT_RIGHT
= _core_
.CURSOR_POINT_RIGHT
709 CURSOR_QUESTION_ARROW
= _core_
.CURSOR_QUESTION_ARROW
710 CURSOR_RIGHT_BUTTON
= _core_
.CURSOR_RIGHT_BUTTON
711 CURSOR_SIZENESW
= _core_
.CURSOR_SIZENESW
712 CURSOR_SIZENS
= _core_
.CURSOR_SIZENS
713 CURSOR_SIZENWSE
= _core_
.CURSOR_SIZENWSE
714 CURSOR_SIZEWE
= _core_
.CURSOR_SIZEWE
715 CURSOR_SIZING
= _core_
.CURSOR_SIZING
716 CURSOR_SPRAYCAN
= _core_
.CURSOR_SPRAYCAN
717 CURSOR_WAIT
= _core_
.CURSOR_WAIT
718 CURSOR_WATCH
= _core_
.CURSOR_WATCH
719 CURSOR_BLANK
= _core_
.CURSOR_BLANK
720 CURSOR_DEFAULT
= _core_
.CURSOR_DEFAULT
721 CURSOR_COPY_ARROW
= _core_
.CURSOR_COPY_ARROW
722 CURSOR_ARROWWAIT
= _core_
.CURSOR_ARROWWAIT
723 CURSOR_MAX
= _core_
.CURSOR_MAX
724 #---------------------------------------------------------------------------
728 wx.Size is a useful data structure used to represent the size of
729 something. It simply contians integer width and height
730 proprtites. In most places in wxPython where a wx.Size is
731 expected a (width, height) tuple can be used instead.
734 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
735 width
= property(_core_
.Size_width_get
, _core_
.Size_width_set
)
736 height
= property(_core_
.Size_height_get
, _core_
.Size_height_set
)
737 x
= width
; y
= height
738 def __init__(self
, *args
, **kwargs
):
740 __init__(self, int w=0, int h=0) -> Size
742 Creates a size object.
744 newobj
= _core_
.new_Size(*args
, **kwargs
)
745 self
.this
= newobj
.this
748 def __del__(self
, destroy
=_core_
.delete_Size
):
751 if self
.thisown
: destroy(self
)
754 def __eq__(*args
, **kwargs
):
756 __eq__(self, Size sz) -> bool
758 Test for equality of wx.Size objects.
760 return _core_
.Size___eq__(*args
, **kwargs
)
762 def __ne__(*args
, **kwargs
):
764 __ne__(self, Size sz) -> bool
768 return _core_
.Size___ne__(*args
, **kwargs
)
770 def __add__(*args
, **kwargs
):
772 __add__(self, Size sz) -> Size
774 Add sz's proprties to this and return the result.
776 return _core_
.Size___add__(*args
, **kwargs
)
778 def __sub__(*args
, **kwargs
):
780 __sub__(self, Size sz) -> Size
782 Subtract sz's properties from this and return the result.
784 return _core_
.Size___sub__(*args
, **kwargs
)
786 def IncTo(*args
, **kwargs
):
790 Increments this object so that both of its dimensions are not less
791 than the corresponding dimensions of the size.
793 return _core_
.Size_IncTo(*args
, **kwargs
)
795 def DecTo(*args
, **kwargs
):
799 Decrements this object so that both of its dimensions are not greater
800 than the corresponding dimensions of the size.
802 return _core_
.Size_DecTo(*args
, **kwargs
)
804 def Set(*args
, **kwargs
):
806 Set(self, int w, int h)
808 Set both width and height.
810 return _core_
.Size_Set(*args
, **kwargs
)
812 def SetWidth(*args
, **kwargs
):
813 """SetWidth(self, int w)"""
814 return _core_
.Size_SetWidth(*args
, **kwargs
)
816 def SetHeight(*args
, **kwargs
):
817 """SetHeight(self, int h)"""
818 return _core_
.Size_SetHeight(*args
, **kwargs
)
820 def GetWidth(*args
, **kwargs
):
821 """GetWidth(self) -> int"""
822 return _core_
.Size_GetWidth(*args
, **kwargs
)
824 def GetHeight(*args
, **kwargs
):
825 """GetHeight(self) -> int"""
826 return _core_
.Size_GetHeight(*args
, **kwargs
)
828 def IsFullySpecified(*args
, **kwargs
):
830 IsFullySpecified(self) -> bool
832 Returns True if both components of the size are non-default values.
834 return _core_
.Size_IsFullySpecified(*args
, **kwargs
)
836 def SetDefaults(*args
, **kwargs
):
838 SetDefaults(self, Size size)
840 Combine this size with the other one replacing the default components
841 of this object (i.e. equal to -1) with those of the other.
843 return _core_
.Size_SetDefaults(*args
, **kwargs
)
845 def Get(*args
, **kwargs
):
847 Get() -> (width,height)
849 Returns the width and height properties as a tuple.
851 return _core_
.Size_Get(*args
, **kwargs
)
853 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
854 def __str__(self
): return str(self
.Get())
855 def __repr__(self
): return 'wx.Size'+str(self
.Get())
856 def __len__(self
): return len(self
.Get())
857 def __getitem__(self
, index
): return self
.Get()[index
]
858 def __setitem__(self
, index
, val
):
859 if index
== 0: self
.width
= val
860 elif index
== 1: self
.height
= val
861 else: raise IndexError
862 def __nonzero__(self
): return self
.Get() != (0,0)
863 __safe_for_unpickling__
= True
864 def __reduce__(self
): return (wx
.Size
, self
.Get())
868 def __init__(self
, this
):
870 if not hasattr(self
,"thisown"): self
.thisown
= 0
871 self
.__class
__ = Size
872 _core_
.Size_swigregister(SizePtr
)
874 #---------------------------------------------------------------------------
876 class RealPoint(object):
878 A data structure for representing a point or position with floating
879 point x and y properties. In wxPython most places that expect a
880 wx.RealPoint can also accept a (x,y) tuple.
883 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
884 x
= property(_core_
.RealPoint_x_get
, _core_
.RealPoint_x_set
)
885 y
= property(_core_
.RealPoint_y_get
, _core_
.RealPoint_y_set
)
886 def __init__(self
, *args
, **kwargs
):
888 __init__(self, double x=0.0, double y=0.0) -> RealPoint
890 Create a wx.RealPoint object
892 newobj
= _core_
.new_RealPoint(*args
, **kwargs
)
893 self
.this
= newobj
.this
896 def __del__(self
, destroy
=_core_
.delete_RealPoint
):
899 if self
.thisown
: destroy(self
)
902 def __eq__(*args
, **kwargs
):
904 __eq__(self, RealPoint pt) -> bool
906 Test for equality of wx.RealPoint objects.
908 return _core_
.RealPoint___eq__(*args
, **kwargs
)
910 def __ne__(*args
, **kwargs
):
912 __ne__(self, RealPoint pt) -> bool
914 Test for inequality of wx.RealPoint objects.
916 return _core_
.RealPoint___ne__(*args
, **kwargs
)
918 def __add__(*args
, **kwargs
):
920 __add__(self, RealPoint pt) -> RealPoint
922 Add pt's proprties to this and return the result.
924 return _core_
.RealPoint___add__(*args
, **kwargs
)
926 def __sub__(*args
, **kwargs
):
928 __sub__(self, RealPoint pt) -> RealPoint
930 Subtract pt's proprties from this and return the result
932 return _core_
.RealPoint___sub__(*args
, **kwargs
)
934 def Set(*args
, **kwargs
):
936 Set(self, double x, double y)
938 Set both the x and y properties
940 return _core_
.RealPoint_Set(*args
, **kwargs
)
942 def Get(*args
, **kwargs
):
946 Return the x and y properties as a tuple.
948 return _core_
.RealPoint_Get(*args
, **kwargs
)
950 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
951 def __str__(self
): return str(self
.Get())
952 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
953 def __len__(self
): return len(self
.Get())
954 def __getitem__(self
, index
): return self
.Get()[index
]
955 def __setitem__(self
, index
, val
):
956 if index
== 0: self
.x
= val
957 elif index
== 1: self
.y
= val
958 else: raise IndexError
959 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
960 __safe_for_unpickling__
= True
961 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
964 class RealPointPtr(RealPoint
):
965 def __init__(self
, this
):
967 if not hasattr(self
,"thisown"): self
.thisown
= 0
968 self
.__class
__ = RealPoint
969 _core_
.RealPoint_swigregister(RealPointPtr
)
971 #---------------------------------------------------------------------------
975 A data structure for representing a point or position with integer x
976 and y properties. Most places in wxPython that expect a wx.Point can
977 also accept a (x,y) tuple.
980 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
981 x
= property(_core_
.Point_x_get
, _core_
.Point_x_set
)
982 y
= property(_core_
.Point_y_get
, _core_
.Point_y_set
)
983 def __init__(self
, *args
, **kwargs
):
985 __init__(self, int x=0, int y=0) -> Point
987 Create a wx.Point object
989 newobj
= _core_
.new_Point(*args
, **kwargs
)
990 self
.this
= newobj
.this
993 def __del__(self
, destroy
=_core_
.delete_Point
):
996 if self
.thisown
: destroy(self
)
999 def __eq__(*args
, **kwargs
):
1001 __eq__(self, Point pt) -> bool
1003 Test for equality of wx.Point objects.
1005 return _core_
.Point___eq__(*args
, **kwargs
)
1007 def __ne__(*args
, **kwargs
):
1009 __ne__(self, Point pt) -> bool
1011 Test for inequality of wx.Point objects.
1013 return _core_
.Point___ne__(*args
, **kwargs
)
1015 def __add__(*args
, **kwargs
):
1017 __add__(self, Point pt) -> Point
1019 Add pt's proprties to this and return the result.
1021 return _core_
.Point___add__(*args
, **kwargs
)
1023 def __sub__(*args
, **kwargs
):
1025 __sub__(self, Point pt) -> Point
1027 Subtract pt's proprties from this and return the result
1029 return _core_
.Point___sub__(*args
, **kwargs
)
1031 def __iadd__(*args
, **kwargs
):
1033 __iadd__(self, Point pt) -> Point
1035 Add pt to this object.
1037 return _core_
.Point___iadd__(*args
, **kwargs
)
1039 def __isub__(*args
, **kwargs
):
1041 __isub__(self, Point pt) -> Point
1043 Subtract pt from this object.
1045 return _core_
.Point___isub__(*args
, **kwargs
)
1047 def Set(*args
, **kwargs
):
1049 Set(self, long x, long y)
1051 Set both the x and y properties
1053 return _core_
.Point_Set(*args
, **kwargs
)
1055 def Get(*args
, **kwargs
):
1059 Return the x and y properties as a tuple.
1061 return _core_
.Point_Get(*args
, **kwargs
)
1063 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1064 def __str__(self
): return str(self
.Get())
1065 def __repr__(self
): return 'wx.Point'+str(self
.Get())
1066 def __len__(self
): return len(self
.Get())
1067 def __getitem__(self
, index
): return self
.Get()[index
]
1068 def __setitem__(self
, index
, val
):
1069 if index
== 0: self
.x
= val
1070 elif index
== 1: self
.y
= val
1071 else: raise IndexError
1072 def __nonzero__(self
): return self
.Get() != (0,0)
1073 __safe_for_unpickling__
= True
1074 def __reduce__(self
): return (wx
.Point
, self
.Get())
1077 class PointPtr(Point
):
1078 def __init__(self
, this
):
1080 if not hasattr(self
,"thisown"): self
.thisown
= 0
1081 self
.__class
__ = Point
1082 _core_
.Point_swigregister(PointPtr
)
1084 #---------------------------------------------------------------------------
1088 A class for representing and manipulating rectangles. It has x, y,
1089 width and height properties. In wxPython most palces that expect a
1090 wx.Rect can also accept a (x,y,width,height) tuple.
1093 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1094 def __init__(self
, *args
, **kwargs
):
1096 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1098 Create a new Rect object.
1100 newobj
= _core_
.new_Rect(*args
, **kwargs
)
1101 self
.this
= newobj
.this
1104 def __del__(self
, destroy
=_core_
.delete_Rect
):
1107 if self
.thisown
: destroy(self
)
1110 def GetX(*args
, **kwargs
):
1111 """GetX(self) -> int"""
1112 return _core_
.Rect_GetX(*args
, **kwargs
)
1114 def SetX(*args
, **kwargs
):
1115 """SetX(self, int x)"""
1116 return _core_
.Rect_SetX(*args
, **kwargs
)
1118 def GetY(*args
, **kwargs
):
1119 """GetY(self) -> int"""
1120 return _core_
.Rect_GetY(*args
, **kwargs
)
1122 def SetY(*args
, **kwargs
):
1123 """SetY(self, int y)"""
1124 return _core_
.Rect_SetY(*args
, **kwargs
)
1126 def GetWidth(*args
, **kwargs
):
1127 """GetWidth(self) -> int"""
1128 return _core_
.Rect_GetWidth(*args
, **kwargs
)
1130 def SetWidth(*args
, **kwargs
):
1131 """SetWidth(self, int w)"""
1132 return _core_
.Rect_SetWidth(*args
, **kwargs
)
1134 def GetHeight(*args
, **kwargs
):
1135 """GetHeight(self) -> int"""
1136 return _core_
.Rect_GetHeight(*args
, **kwargs
)
1138 def SetHeight(*args
, **kwargs
):
1139 """SetHeight(self, int h)"""
1140 return _core_
.Rect_SetHeight(*args
, **kwargs
)
1142 def GetPosition(*args
, **kwargs
):
1143 """GetPosition(self) -> Point"""
1144 return _core_
.Rect_GetPosition(*args
, **kwargs
)
1146 def SetPosition(*args
, **kwargs
):
1147 """SetPosition(self, Point p)"""
1148 return _core_
.Rect_SetPosition(*args
, **kwargs
)
1150 def GetSize(*args
, **kwargs
):
1151 """GetSize(self) -> Size"""
1152 return _core_
.Rect_GetSize(*args
, **kwargs
)
1154 def SetSize(*args
, **kwargs
):
1155 """SetSize(self, Size s)"""
1156 return _core_
.Rect_SetSize(*args
, **kwargs
)
1158 def IsEmpty(*args
, **kwargs
):
1159 """IsEmpty(self) -> bool"""
1160 return _core_
.Rect_IsEmpty(*args
, **kwargs
)
1162 def GetTopLeft(*args
, **kwargs
):
1163 """GetTopLeft(self) -> Point"""
1164 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1166 def SetTopLeft(*args
, **kwargs
):
1167 """SetTopLeft(self, Point p)"""
1168 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1170 def GetBottomRight(*args
, **kwargs
):
1171 """GetBottomRight(self) -> Point"""
1172 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1174 def SetBottomRight(*args
, **kwargs
):
1175 """SetBottomRight(self, Point p)"""
1176 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1178 def GetLeft(*args
, **kwargs
):
1179 """GetLeft(self) -> int"""
1180 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1182 def GetTop(*args
, **kwargs
):
1183 """GetTop(self) -> int"""
1184 return _core_
.Rect_GetTop(*args
, **kwargs
)
1186 def GetBottom(*args
, **kwargs
):
1187 """GetBottom(self) -> int"""
1188 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1190 def GetRight(*args
, **kwargs
):
1191 """GetRight(self) -> int"""
1192 return _core_
.Rect_GetRight(*args
, **kwargs
)
1194 def SetLeft(*args
, **kwargs
):
1195 """SetLeft(self, int left)"""
1196 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1198 def SetRight(*args
, **kwargs
):
1199 """SetRight(self, int right)"""
1200 return _core_
.Rect_SetRight(*args
, **kwargs
)
1202 def SetTop(*args
, **kwargs
):
1203 """SetTop(self, int top)"""
1204 return _core_
.Rect_SetTop(*args
, **kwargs
)
1206 def SetBottom(*args
, **kwargs
):
1207 """SetBottom(self, int bottom)"""
1208 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1210 position
= property(GetPosition
, SetPosition
)
1211 size
= property(GetSize
, SetSize
)
1212 left
= property(GetLeft
, SetLeft
)
1213 right
= property(GetRight
, SetRight
)
1214 top
= property(GetTop
, SetTop
)
1215 bottom
= property(GetBottom
, SetBottom
)
1217 def Inflate(*args
, **kwargs
):
1219 Inflate(self, int dx, int dy) -> Rect
1221 Increases the size of the rectangle.
1223 The left border is moved farther left and the right border is moved
1224 farther right by ``dx``. The upper border is moved farther up and the
1225 bottom border is moved farther down by ``dy``. (Note the the width and
1226 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1227 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1228 opposite happens: the rectangle size decreases in the respective
1231 The change is made to the rectangle inplace, if instead you need a
1232 copy that is inflated, preserving the original then make the copy
1235 copy = wx.Rect(*original)
1240 return _core_
.Rect_Inflate(*args
, **kwargs
)
1242 def Deflate(*args
, **kwargs
):
1244 Deflate(self, int dx, int dy) -> Rect
1246 Decrease the rectangle size. This method is the opposite of `Inflate`
1247 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1248 `Inflate` for a full description.
1250 return _core_
.Rect_Deflate(*args
, **kwargs
)
1252 def OffsetXY(*args
, **kwargs
):
1254 OffsetXY(self, int dx, int dy)
1256 Moves the rectangle by the specified offset. If dx is positive, the
1257 rectangle is moved to the right, if dy is positive, it is moved to the
1258 bottom, otherwise it is moved to the left or top respectively.
1260 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1262 def Offset(*args
, **kwargs
):
1264 Offset(self, Point pt)
1266 Same as OffsetXY but uses dx,dy from Point
1268 return _core_
.Rect_Offset(*args
, **kwargs
)
1270 def Intersect(*args
, **kwargs
):
1272 Intersect(self, Rect rect) -> Rect
1274 Returns the intersectsion of this rectangle and rect.
1276 return _core_
.Rect_Intersect(*args
, **kwargs
)
1278 def Union(*args
, **kwargs
):
1280 Union(self, Rect rect) -> Rect
1282 Returns the union of this rectangle and rect.
1284 return _core_
.Rect_Union(*args
, **kwargs
)
1286 def __add__(*args
, **kwargs
):
1288 __add__(self, Rect rect) -> Rect
1290 Add the properties of rect to this rectangle and return the result.
1292 return _core_
.Rect___add__(*args
, **kwargs
)
1294 def __iadd__(*args
, **kwargs
):
1296 __iadd__(self, Rect rect) -> Rect
1298 Add the properties of rect to this rectangle, updating this rectangle.
1300 return _core_
.Rect___iadd__(*args
, **kwargs
)
1302 def __eq__(*args
, **kwargs
):
1304 __eq__(self, Rect rect) -> bool
1308 return _core_
.Rect___eq__(*args
, **kwargs
)
1310 def __ne__(*args
, **kwargs
):
1312 __ne__(self, Rect rect) -> bool
1314 Test for inequality.
1316 return _core_
.Rect___ne__(*args
, **kwargs
)
1318 def InsideXY(*args
, **kwargs
):
1320 InsideXY(self, int x, int y) -> bool
1322 Return True if the point is (not strcitly) inside the rect.
1324 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1326 def Inside(*args
, **kwargs
):
1328 Inside(self, Point pt) -> bool
1330 Return True if the point is (not strcitly) inside the rect.
1332 return _core_
.Rect_Inside(*args
, **kwargs
)
1334 def Intersects(*args
, **kwargs
):
1336 Intersects(self, Rect rect) -> bool
1338 Returns True if the rectangles have a non empty intersection.
1340 return _core_
.Rect_Intersects(*args
, **kwargs
)
1342 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1343 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1344 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1345 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1346 def Set(*args
, **kwargs
):
1348 Set(self, int x=0, int y=0, int width=0, int height=0)
1350 Set all rectangle properties.
1352 return _core_
.Rect_Set(*args
, **kwargs
)
1354 def Get(*args
, **kwargs
):
1356 Get() -> (x,y,width,height)
1358 Return the rectangle properties as a tuple.
1360 return _core_
.Rect_Get(*args
, **kwargs
)
1362 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1363 def __str__(self
): return str(self
.Get())
1364 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1365 def __len__(self
): return len(self
.Get())
1366 def __getitem__(self
, index
): return self
.Get()[index
]
1367 def __setitem__(self
, index
, val
):
1368 if index
== 0: self
.x
= val
1369 elif index
== 1: self
.y
= val
1370 elif index
== 2: self
.width
= val
1371 elif index
== 3: self
.height
= val
1372 else: raise IndexError
1373 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1374 __safe_for_unpickling__
= True
1375 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1378 class RectPtr(Rect
):
1379 def __init__(self
, this
):
1381 if not hasattr(self
,"thisown"): self
.thisown
= 0
1382 self
.__class
__ = Rect
1383 _core_
.Rect_swigregister(RectPtr
)
1385 def RectPP(*args
, **kwargs
):
1387 RectPP(Point topLeft, Point bottomRight) -> Rect
1389 Create a new Rect object from Points representing two corners.
1391 val
= _core_
.new_RectPP(*args
, **kwargs
)
1395 def RectPS(*args
, **kwargs
):
1397 RectPS(Point pos, Size size) -> Rect
1399 Create a new Rect from a position and size.
1401 val
= _core_
.new_RectPS(*args
, **kwargs
)
1405 def RectS(*args
, **kwargs
):
1407 RectS(Size size) -> Rect
1409 Create a new Rect from a size only.
1411 val
= _core_
.new_RectS(*args
, **kwargs
)
1416 def IntersectRect(*args
, **kwargs
):
1418 IntersectRect(Rect r1, Rect r2) -> Rect
1420 Calculate and return the intersection of r1 and r2.
1422 return _core_
.IntersectRect(*args
, **kwargs
)
1423 #---------------------------------------------------------------------------
1425 class Point2D(object):
1427 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1428 with floating point values.
1431 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1432 def __init__(self
, *args
, **kwargs
):
1434 __init__(self, double x=0.0, double y=0.0) -> Point2D
1436 Create a w.Point2D object.
1438 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1439 self
.this
= newobj
.this
1442 def GetFloor(*args
, **kwargs
):
1448 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1450 def GetRounded(*args
, **kwargs
):
1452 GetRounded() -> (x,y)
1456 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1458 def GetVectorLength(*args
, **kwargs
):
1459 """GetVectorLength(self) -> double"""
1460 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1462 def GetVectorAngle(*args
, **kwargs
):
1463 """GetVectorAngle(self) -> double"""
1464 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1466 def SetVectorLength(*args
, **kwargs
):
1467 """SetVectorLength(self, double length)"""
1468 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1470 def SetVectorAngle(*args
, **kwargs
):
1471 """SetVectorAngle(self, double degrees)"""
1472 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1474 def SetPolarCoordinates(self
, angle
, length
):
1475 self
.SetVectorLength(length
)
1476 self
.SetVectorAngle(angle
)
1477 def Normalize(self
):
1478 self
.SetVectorLength(1.0)
1480 def GetDistance(*args
, **kwargs
):
1481 """GetDistance(self, Point2D pt) -> double"""
1482 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1484 def GetDistanceSquare(*args
, **kwargs
):
1485 """GetDistanceSquare(self, Point2D pt) -> double"""
1486 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1488 def GetDotProduct(*args
, **kwargs
):
1489 """GetDotProduct(self, Point2D vec) -> double"""
1490 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1492 def GetCrossProduct(*args
, **kwargs
):
1493 """GetCrossProduct(self, Point2D vec) -> double"""
1494 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1496 def __neg__(*args
, **kwargs
):
1498 __neg__(self) -> Point2D
1500 the reflection of this point
1502 return _core_
.Point2D___neg__(*args
, **kwargs
)
1504 def __iadd__(*args
, **kwargs
):
1505 """__iadd__(self, Point2D pt) -> Point2D"""
1506 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1508 def __isub__(*args
, **kwargs
):
1509 """__isub__(self, Point2D pt) -> Point2D"""
1510 return _core_
.Point2D___isub__(*args
, **kwargs
)
1512 def __imul__(*args
, **kwargs
):
1513 """__imul__(self, Point2D pt) -> Point2D"""
1514 return _core_
.Point2D___imul__(*args
, **kwargs
)
1516 def __idiv__(*args
, **kwargs
):
1517 """__idiv__(self, Point2D pt) -> Point2D"""
1518 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1520 def __eq__(*args
, **kwargs
):
1522 __eq__(self, Point2D pt) -> bool
1526 return _core_
.Point2D___eq__(*args
, **kwargs
)
1528 def __ne__(*args
, **kwargs
):
1530 __ne__(self, Point2D pt) -> bool
1534 return _core_
.Point2D___ne__(*args
, **kwargs
)
1536 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1537 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1538 def Set(*args
, **kwargs
):
1539 """Set(self, double x=0, double y=0)"""
1540 return _core_
.Point2D_Set(*args
, **kwargs
)
1542 def Get(*args
, **kwargs
):
1546 Return x and y properties as a tuple.
1548 return _core_
.Point2D_Get(*args
, **kwargs
)
1550 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1551 def __str__(self
): return str(self
.Get())
1552 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1553 def __len__(self
): return len(self
.Get())
1554 def __getitem__(self
, index
): return self
.Get()[index
]
1555 def __setitem__(self
, index
, val
):
1556 if index
== 0: self
.x
= val
1557 elif index
== 1: self
.y
= val
1558 else: raise IndexError
1559 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1560 __safe_for_unpickling__
= True
1561 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1564 class Point2DPtr(Point2D
):
1565 def __init__(self
, this
):
1567 if not hasattr(self
,"thisown"): self
.thisown
= 0
1568 self
.__class
__ = Point2D
1569 _core_
.Point2D_swigregister(Point2DPtr
)
1571 def Point2DCopy(*args
, **kwargs
):
1573 Point2DCopy(Point2D pt) -> Point2D
1575 Create a w.Point2D object.
1577 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1581 def Point2DFromPoint(*args
, **kwargs
):
1583 Point2DFromPoint(Point pt) -> Point2D
1585 Create a w.Point2D object.
1587 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1591 #---------------------------------------------------------------------------
1593 FromStart
= _core_
.FromStart
1594 FromCurrent
= _core_
.FromCurrent
1595 FromEnd
= _core_
.FromEnd
1596 class InputStream(object):
1597 """Proxy of C++ InputStream class"""
1599 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1600 def __init__(self
, *args
, **kwargs
):
1601 """__init__(self, PyObject p) -> InputStream"""
1602 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1603 self
.this
= newobj
.this
1606 def __del__(self
, destroy
=_core_
.delete_InputStream
):
1609 if self
.thisown
: destroy(self
)
1612 def close(*args
, **kwargs
):
1614 return _core_
.InputStream_close(*args
, **kwargs
)
1616 def flush(*args
, **kwargs
):
1618 return _core_
.InputStream_flush(*args
, **kwargs
)
1620 def eof(*args
, **kwargs
):
1621 """eof(self) -> bool"""
1622 return _core_
.InputStream_eof(*args
, **kwargs
)
1624 def read(*args
, **kwargs
):
1625 """read(self, int size=-1) -> PyObject"""
1626 return _core_
.InputStream_read(*args
, **kwargs
)
1628 def readline(*args
, **kwargs
):
1629 """readline(self, int size=-1) -> PyObject"""
1630 return _core_
.InputStream_readline(*args
, **kwargs
)
1632 def readlines(*args
, **kwargs
):
1633 """readlines(self, int sizehint=-1) -> PyObject"""
1634 return _core_
.InputStream_readlines(*args
, **kwargs
)
1636 def seek(*args
, **kwargs
):
1637 """seek(self, int offset, int whence=0)"""
1638 return _core_
.InputStream_seek(*args
, **kwargs
)
1640 def tell(*args
, **kwargs
):
1641 """tell(self) -> int"""
1642 return _core_
.InputStream_tell(*args
, **kwargs
)
1644 def Peek(*args
, **kwargs
):
1645 """Peek(self) -> char"""
1646 return _core_
.InputStream_Peek(*args
, **kwargs
)
1648 def GetC(*args
, **kwargs
):
1649 """GetC(self) -> char"""
1650 return _core_
.InputStream_GetC(*args
, **kwargs
)
1652 def LastRead(*args
, **kwargs
):
1653 """LastRead(self) -> size_t"""
1654 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1656 def CanRead(*args
, **kwargs
):
1657 """CanRead(self) -> bool"""
1658 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1660 def Eof(*args
, **kwargs
):
1661 """Eof(self) -> bool"""
1662 return _core_
.InputStream_Eof(*args
, **kwargs
)
1664 def Ungetch(*args
, **kwargs
):
1665 """Ungetch(self, char c) -> bool"""
1666 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1668 def SeekI(*args
, **kwargs
):
1669 """SeekI(self, long pos, int mode=FromStart) -> long"""
1670 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1672 def TellI(*args
, **kwargs
):
1673 """TellI(self) -> long"""
1674 return _core_
.InputStream_TellI(*args
, **kwargs
)
1677 class InputStreamPtr(InputStream
):
1678 def __init__(self
, this
):
1680 if not hasattr(self
,"thisown"): self
.thisown
= 0
1681 self
.__class
__ = InputStream
1682 _core_
.InputStream_swigregister(InputStreamPtr
)
1683 DefaultPosition
= cvar
.DefaultPosition
1684 DefaultSize
= cvar
.DefaultSize
1686 class OutputStream(object):
1687 """Proxy of C++ OutputStream class"""
1688 def __init__(self
): raise RuntimeError, "No constructor defined"
1690 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1691 def write(*args
, **kwargs
):
1692 """write(self, PyObject obj)"""
1693 return _core_
.OutputStream_write(*args
, **kwargs
)
1696 class OutputStreamPtr(OutputStream
):
1697 def __init__(self
, this
):
1699 if not hasattr(self
,"thisown"): self
.thisown
= 0
1700 self
.__class
__ = OutputStream
1701 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1703 #---------------------------------------------------------------------------
1705 class FSFile(Object
):
1706 """Proxy of C++ FSFile class"""
1708 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1709 def __init__(self
, *args
, **kwargs
):
1711 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1712 DateTime modif) -> FSFile
1714 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1715 self
.this
= newobj
.this
1718 self
.thisown
= 0 # It will normally be deleted by the user of the wx.FileSystem
1720 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1723 if self
.thisown
: destroy(self
)
1726 def GetStream(*args
, **kwargs
):
1727 """GetStream(self) -> InputStream"""
1728 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1730 def GetMimeType(*args
, **kwargs
):
1731 """GetMimeType(self) -> String"""
1732 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1734 def GetLocation(*args
, **kwargs
):
1735 """GetLocation(self) -> String"""
1736 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1738 def GetAnchor(*args
, **kwargs
):
1739 """GetAnchor(self) -> String"""
1740 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1742 def GetModificationTime(*args
, **kwargs
):
1743 """GetModificationTime(self) -> DateTime"""
1744 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1747 class FSFilePtr(FSFile
):
1748 def __init__(self
, this
):
1750 if not hasattr(self
,"thisown"): self
.thisown
= 0
1751 self
.__class
__ = FSFile
1752 _core_
.FSFile_swigregister(FSFilePtr
)
1754 class CPPFileSystemHandler(object):
1755 """Proxy of C++ CPPFileSystemHandler class"""
1756 def __init__(self
): raise RuntimeError, "No constructor defined"
1758 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1760 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1761 def __init__(self
, this
):
1763 if not hasattr(self
,"thisown"): self
.thisown
= 0
1764 self
.__class
__ = CPPFileSystemHandler
1765 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1767 class FileSystemHandler(CPPFileSystemHandler
):
1768 """Proxy of C++ FileSystemHandler class"""
1770 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1771 def __init__(self
, *args
, **kwargs
):
1772 """__init__(self) -> FileSystemHandler"""
1773 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1774 self
.this
= newobj
.this
1777 self
._setCallbackInfo
(self
, FileSystemHandler
)
1779 def _setCallbackInfo(*args
, **kwargs
):
1780 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1781 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1783 def CanOpen(*args
, **kwargs
):
1784 """CanOpen(self, String location) -> bool"""
1785 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1787 def OpenFile(*args
, **kwargs
):
1788 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1789 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1791 def FindFirst(*args
, **kwargs
):
1792 """FindFirst(self, String spec, int flags=0) -> String"""
1793 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1795 def FindNext(*args
, **kwargs
):
1796 """FindNext(self) -> String"""
1797 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1799 def GetProtocol(*args
, **kwargs
):
1800 """GetProtocol(self, String location) -> String"""
1801 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1803 def GetLeftLocation(*args
, **kwargs
):
1804 """GetLeftLocation(self, String location) -> String"""
1805 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1807 def GetAnchor(*args
, **kwargs
):
1808 """GetAnchor(self, String location) -> String"""
1809 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1811 def GetRightLocation(*args
, **kwargs
):
1812 """GetRightLocation(self, String location) -> String"""
1813 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1815 def GetMimeTypeFromExt(*args
, **kwargs
):
1816 """GetMimeTypeFromExt(self, String location) -> String"""
1817 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1820 class FileSystemHandlerPtr(FileSystemHandler
):
1821 def __init__(self
, this
):
1823 if not hasattr(self
,"thisown"): self
.thisown
= 0
1824 self
.__class
__ = FileSystemHandler
1825 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1827 class FileSystem(Object
):
1828 """Proxy of C++ FileSystem class"""
1830 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1831 def __init__(self
, *args
, **kwargs
):
1832 """__init__(self) -> FileSystem"""
1833 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1834 self
.this
= newobj
.this
1837 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1840 if self
.thisown
: destroy(self
)
1843 def ChangePathTo(*args
, **kwargs
):
1844 """ChangePathTo(self, String location, bool is_dir=False)"""
1845 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1847 def GetPath(*args
, **kwargs
):
1848 """GetPath(self) -> String"""
1849 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1851 def OpenFile(*args
, **kwargs
):
1852 """OpenFile(self, String location) -> FSFile"""
1853 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1855 def FindFirst(*args
, **kwargs
):
1856 """FindFirst(self, String spec, int flags=0) -> String"""
1857 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1859 def FindNext(*args
, **kwargs
):
1860 """FindNext(self) -> String"""
1861 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1863 def AddHandler(*args
, **kwargs
):
1864 """AddHandler(CPPFileSystemHandler handler)"""
1865 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1867 AddHandler
= staticmethod(AddHandler
)
1868 def CleanUpHandlers(*args
, **kwargs
):
1869 """CleanUpHandlers()"""
1870 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1872 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1873 def FileNameToURL(*args
, **kwargs
):
1874 """FileNameToURL(String filename) -> String"""
1875 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1877 FileNameToURL
= staticmethod(FileNameToURL
)
1878 def URLToFileName(*args
, **kwargs
):
1879 """URLToFileName(String url) -> String"""
1880 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1882 URLToFileName
= staticmethod(URLToFileName
)
1884 class FileSystemPtr(FileSystem
):
1885 def __init__(self
, this
):
1887 if not hasattr(self
,"thisown"): self
.thisown
= 0
1888 self
.__class
__ = FileSystem
1889 _core_
.FileSystem_swigregister(FileSystemPtr
)
1891 def FileSystem_AddHandler(*args
, **kwargs
):
1892 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1893 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1895 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1896 """FileSystem_CleanUpHandlers()"""
1897 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1899 def FileSystem_FileNameToURL(*args
, **kwargs
):
1900 """FileSystem_FileNameToURL(String filename) -> String"""
1901 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1903 def FileSystem_URLToFileName(*args
, **kwargs
):
1904 """FileSystem_URLToFileName(String url) -> String"""
1905 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1907 class InternetFSHandler(CPPFileSystemHandler
):
1908 """Proxy of C++ InternetFSHandler class"""
1910 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1911 def __init__(self
, *args
, **kwargs
):
1912 """__init__(self) -> InternetFSHandler"""
1913 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1914 self
.this
= newobj
.this
1917 def CanOpen(*args
, **kwargs
):
1918 """CanOpen(self, String location) -> bool"""
1919 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1921 def OpenFile(*args
, **kwargs
):
1922 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1923 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1926 class InternetFSHandlerPtr(InternetFSHandler
):
1927 def __init__(self
, this
):
1929 if not hasattr(self
,"thisown"): self
.thisown
= 0
1930 self
.__class
__ = InternetFSHandler
1931 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1933 class ZipFSHandler(CPPFileSystemHandler
):
1934 """Proxy of C++ ZipFSHandler class"""
1936 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1937 def __init__(self
, *args
, **kwargs
):
1938 """__init__(self) -> ZipFSHandler"""
1939 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1940 self
.this
= newobj
.this
1943 def CanOpen(*args
, **kwargs
):
1944 """CanOpen(self, String location) -> bool"""
1945 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1947 def OpenFile(*args
, **kwargs
):
1948 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1949 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1951 def FindFirst(*args
, **kwargs
):
1952 """FindFirst(self, String spec, int flags=0) -> String"""
1953 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1955 def FindNext(*args
, **kwargs
):
1956 """FindNext(self) -> String"""
1957 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1960 class ZipFSHandlerPtr(ZipFSHandler
):
1961 def __init__(self
, this
):
1963 if not hasattr(self
,"thisown"): self
.thisown
= 0
1964 self
.__class
__ = ZipFSHandler
1965 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1968 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1969 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1970 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1972 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1973 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1974 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1976 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1977 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1978 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1979 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1981 Add 'file' to the memory filesystem. The dataItem parameter can
1982 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1983 arbitrary data. If a bitmap or image is used then the imgType
1984 parameter should specify what kind of image file it should be
1985 written as, wx.BITMAP_TYPE_PNG, etc.
1987 if isinstance(dataItem
, wx
.Image
):
1988 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1989 elif isinstance(dataItem
, wx
.Bitmap
):
1990 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1991 elif type(dataItem
) == str:
1992 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1994 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1996 class MemoryFSHandler(CPPFileSystemHandler
):
1997 """Proxy of C++ MemoryFSHandler class"""
1999 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2000 def __init__(self
, *args
, **kwargs
):
2001 """__init__(self) -> MemoryFSHandler"""
2002 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
2003 self
.this
= newobj
.this
2006 def RemoveFile(*args
, **kwargs
):
2007 """RemoveFile(String filename)"""
2008 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
2010 RemoveFile
= staticmethod(RemoveFile
)
2011 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
2012 def CanOpen(*args
, **kwargs
):
2013 """CanOpen(self, String location) -> bool"""
2014 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
2016 def OpenFile(*args
, **kwargs
):
2017 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
2018 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
2020 def FindFirst(*args
, **kwargs
):
2021 """FindFirst(self, String spec, int flags=0) -> String"""
2022 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
2024 def FindNext(*args
, **kwargs
):
2025 """FindNext(self) -> String"""
2026 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
2029 class MemoryFSHandlerPtr(MemoryFSHandler
):
2030 def __init__(self
, this
):
2032 if not hasattr(self
,"thisown"): self
.thisown
= 0
2033 self
.__class
__ = MemoryFSHandler
2034 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
2036 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
2037 """MemoryFSHandler_RemoveFile(String filename)"""
2038 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
2040 IMAGE_ALPHA_TRANSPARENT
= _core_
.IMAGE_ALPHA_TRANSPARENT
2041 IMAGE_ALPHA_THRESHOLD
= _core_
.IMAGE_ALPHA_THRESHOLD
2042 IMAGE_ALPHA_OPAQUE
= _core_
.IMAGE_ALPHA_OPAQUE
2043 #---------------------------------------------------------------------------
2045 class ImageHandler(Object
):
2047 This is the base class for implementing image file loading/saving, and
2048 image creation from data. It is used within `wx.Image` and is not
2049 normally seen by the application.
2051 def __init__(self
): raise RuntimeError, "No constructor defined"
2053 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2054 def GetName(*args
, **kwargs
):
2055 """GetName(self) -> String"""
2056 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
2058 def GetExtension(*args
, **kwargs
):
2059 """GetExtension(self) -> String"""
2060 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
2062 def GetType(*args
, **kwargs
):
2063 """GetType(self) -> long"""
2064 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
2066 def GetMimeType(*args
, **kwargs
):
2067 """GetMimeType(self) -> String"""
2068 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
2070 def CanRead(*args
, **kwargs
):
2071 """CanRead(self, String name) -> bool"""
2072 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
2074 def SetName(*args
, **kwargs
):
2075 """SetName(self, String name)"""
2076 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
2078 def SetExtension(*args
, **kwargs
):
2079 """SetExtension(self, String extension)"""
2080 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
2082 def SetType(*args
, **kwargs
):
2083 """SetType(self, long type)"""
2084 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
2086 def SetMimeType(*args
, **kwargs
):
2087 """SetMimeType(self, String mimetype)"""
2088 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
2091 class ImageHandlerPtr(ImageHandler
):
2092 def __init__(self
, this
):
2094 if not hasattr(self
,"thisown"): self
.thisown
= 0
2095 self
.__class
__ = ImageHandler
2096 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
2098 class ImageHistogram(object):
2099 """Proxy of C++ ImageHistogram class"""
2101 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2102 def __init__(self
, *args
, **kwargs
):
2103 """__init__(self) -> ImageHistogram"""
2104 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
2105 self
.this
= newobj
.this
2108 def MakeKey(*args
, **kwargs
):
2110 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2112 Get the key in the histogram for the given RGB values
2114 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2116 MakeKey
= staticmethod(MakeKey
)
2117 def FindFirstUnusedColour(*args
, **kwargs
):
2119 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2121 Find first colour that is not used in the image and has higher RGB
2122 values than startR, startG, startB. Returns a tuple consisting of a
2123 success flag and rgb values.
2125 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2127 def GetCount(*args
, **kwargs
):
2129 GetCount(self, unsigned long key) -> unsigned long
2131 Returns the pixel count for the given key. Use `MakeKey` to create a
2132 key value from a RGB tripple.
2134 return _core_
.ImageHistogram_GetCount(*args
, **kwargs
)
2136 def GetCountRGB(*args
, **kwargs
):
2138 GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2140 Returns the pixel count for the given RGB values.
2142 return _core_
.ImageHistogram_GetCountRGB(*args
, **kwargs
)
2144 def GetCountColour(*args
, **kwargs
):
2146 GetCountColour(self, Colour colour) -> unsigned long
2148 Returns the pixel count for the given `wx.Colour` value.
2150 return _core_
.ImageHistogram_GetCountColour(*args
, **kwargs
)
2153 class ImageHistogramPtr(ImageHistogram
):
2154 def __init__(self
, this
):
2156 if not hasattr(self
,"thisown"): self
.thisown
= 0
2157 self
.__class
__ = ImageHistogram
2158 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2160 def ImageHistogram_MakeKey(*args
, **kwargs
):
2162 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2164 Get the key in the histogram for the given RGB values
2166 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2168 class Image(Object
):
2169 """Proxy of C++ Image class"""
2171 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2172 def __init__(self
, *args
, **kwargs
):
2173 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2174 newobj
= _core_
.new_Image(*args
, **kwargs
)
2175 self
.this
= newobj
.this
2178 def __del__(self
, destroy
=_core_
.delete_Image
):
2181 if self
.thisown
: destroy(self
)
2184 def Create(*args
, **kwargs
):
2185 """Create(self, int width, int height)"""
2186 return _core_
.Image_Create(*args
, **kwargs
)
2188 def Destroy(*args
, **kwargs
):
2192 Deletes the C++ object this Python object is a proxy for.
2194 return _core_
.Image_Destroy(*args
, **kwargs
)
2196 def Scale(*args
, **kwargs
):
2197 """Scale(self, int width, int height) -> Image"""
2198 return _core_
.Image_Scale(*args
, **kwargs
)
2200 def ShrinkBy(*args
, **kwargs
):
2201 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2202 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2204 def Rescale(*args
, **kwargs
):
2205 """Rescale(self, int width, int height) -> Image"""
2206 return _core_
.Image_Rescale(*args
, **kwargs
)
2208 def Resize(*args
, **kwargs
):
2209 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2210 return _core_
.Image_Resize(*args
, **kwargs
)
2212 def SetRGB(*args
, **kwargs
):
2213 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2214 return _core_
.Image_SetRGB(*args
, **kwargs
)
2216 def SetRGBRect(*args
, **kwargs
):
2217 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2218 return _core_
.Image_SetRGBRect(*args
, **kwargs
)
2220 def GetRed(*args
, **kwargs
):
2221 """GetRed(self, int x, int y) -> unsigned char"""
2222 return _core_
.Image_GetRed(*args
, **kwargs
)
2224 def GetGreen(*args
, **kwargs
):
2225 """GetGreen(self, int x, int y) -> unsigned char"""
2226 return _core_
.Image_GetGreen(*args
, **kwargs
)
2228 def GetBlue(*args
, **kwargs
):
2229 """GetBlue(self, int x, int y) -> unsigned char"""
2230 return _core_
.Image_GetBlue(*args
, **kwargs
)
2232 def SetAlpha(*args
, **kwargs
):
2233 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2234 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2236 def GetAlpha(*args
, **kwargs
):
2237 """GetAlpha(self, int x, int y) -> unsigned char"""
2238 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2240 def HasAlpha(*args
, **kwargs
):
2241 """HasAlpha(self) -> bool"""
2242 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2244 def InitAlpha(*args
, **kwargs
):
2248 Initializes the image alpha channel data. It is an error to call it if
2249 the image already has alpha data. If it doesn't, alpha data will be by
2250 default initialized to all pixels being fully opaque. But if the image
2251 has a a mask colour, all mask pixels will be completely transparent.
2253 return _core_
.Image_InitAlpha(*args
, **kwargs
)
2255 def IsTransparent(*args
, **kwargs
):
2257 IsTransparent(self, int x, int y, unsigned char threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2259 Returns True if this pixel is masked or has an alpha value less than
2260 the spcified threshold.
2262 return _core_
.Image_IsTransparent(*args
, **kwargs
)
2264 def FindFirstUnusedColour(*args
, **kwargs
):
2266 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2268 Find first colour that is not used in the image and has higher RGB
2269 values than startR, startG, startB. Returns a tuple consisting of a
2270 success flag and rgb values.
2272 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2274 def ConvertAlphaToMask(*args
, **kwargs
):
2276 ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2278 If the image has alpha channel, this method converts it to mask. All pixels
2279 with alpha value less than ``threshold`` are replaced with mask colour and the
2280 alpha channel is removed. Mask colour is chosen automatically using
2281 `FindFirstUnusedColour`.
2283 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2286 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2288 def ConvertColourToAlpha(*args
, **kwargs
):
2290 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2292 This method converts an image where the original alpha information is
2293 only available as a shades of a colour (actually shades of grey)
2294 typically when you draw anti-aliased text into a bitmap. The DC
2295 drawing routines draw grey values on the black background although
2296 they actually mean to draw white with differnt alpha values. This
2297 method reverses it, assuming a black (!) background and white text.
2298 The method will then fill up the whole image with the colour given.
2300 return _core_
.Image_ConvertColourToAlpha(*args
, **kwargs
)
2302 def SetMaskFromImage(*args
, **kwargs
):
2303 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2304 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2306 def CanRead(*args
, **kwargs
):
2307 """CanRead(String name) -> bool"""
2308 return _core_
.Image_CanRead(*args
, **kwargs
)
2310 CanRead
= staticmethod(CanRead
)
2311 def GetImageCount(*args
, **kwargs
):
2312 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2313 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2315 GetImageCount
= staticmethod(GetImageCount
)
2316 def LoadFile(*args
, **kwargs
):
2317 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2318 return _core_
.Image_LoadFile(*args
, **kwargs
)
2320 def LoadMimeFile(*args
, **kwargs
):
2321 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2322 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2324 def SaveFile(*args
, **kwargs
):
2325 """SaveFile(self, String name, int type) -> bool"""
2326 return _core_
.Image_SaveFile(*args
, **kwargs
)
2328 def SaveMimeFile(*args
, **kwargs
):
2329 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2330 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2332 def CanReadStream(*args
, **kwargs
):
2333 """CanReadStream(InputStream stream) -> bool"""
2334 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2336 CanReadStream
= staticmethod(CanReadStream
)
2337 def LoadStream(*args
, **kwargs
):
2338 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2339 return _core_
.Image_LoadStream(*args
, **kwargs
)
2341 def LoadMimeStream(*args
, **kwargs
):
2342 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2343 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2345 def Ok(*args
, **kwargs
):
2346 """Ok(self) -> bool"""
2347 return _core_
.Image_Ok(*args
, **kwargs
)
2349 def GetWidth(*args
, **kwargs
):
2350 """GetWidth(self) -> int"""
2351 return _core_
.Image_GetWidth(*args
, **kwargs
)
2353 def GetHeight(*args
, **kwargs
):
2354 """GetHeight(self) -> int"""
2355 return _core_
.Image_GetHeight(*args
, **kwargs
)
2357 def GetSize(*args
, **kwargs
):
2358 """GetSize(self) -> Size"""
2359 return _core_
.Image_GetSize(*args
, **kwargs
)
2361 def GetSubImage(*args
, **kwargs
):
2362 """GetSubImage(self, Rect rect) -> Image"""
2363 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2365 def Size(*args
, **kwargs
):
2366 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2367 return _core_
.Image_Size(*args
, **kwargs
)
2369 def Copy(*args
, **kwargs
):
2370 """Copy(self) -> Image"""
2371 return _core_
.Image_Copy(*args
, **kwargs
)
2373 def Paste(*args
, **kwargs
):
2374 """Paste(self, Image image, int x, int y)"""
2375 return _core_
.Image_Paste(*args
, **kwargs
)
2377 def GetData(*args
, **kwargs
):
2379 GetData(self) -> PyObject
2381 Returns a string containing a copy of the RGB bytes of the image.
2383 return _core_
.Image_GetData(*args
, **kwargs
)
2385 def SetData(*args
, **kwargs
):
2387 SetData(self, buffer data)
2389 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2390 either a string or a buffer object holding the data and the length of
2391 the data must be width*height*3.
2393 return _core_
.Image_SetData(*args
, **kwargs
)
2395 def GetDataBuffer(*args
, **kwargs
):
2397 GetDataBuffer(self) -> PyObject
2399 Returns a writable Python buffer object that is pointing at the RGB
2400 image data buffer inside the wx.Image.
2402 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2404 def SetDataBuffer(*args
, **kwargs
):
2406 SetDataBuffer(self, buffer data)
2408 Sets the internal image data pointer to point at a Python buffer
2409 object. This can save a copy of the data but you must ensure that the
2410 buffer object lives longer than the wx.Image does.
2412 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2414 def GetAlphaData(*args
, **kwargs
):
2416 GetAlphaData(self) -> PyObject
2418 Returns a string containing a copy of the alpha bytes of the image.
2420 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2422 def SetAlphaData(*args
, **kwargs
):
2424 SetAlphaData(self, buffer alpha)
2426 Resets the Image's alpha data from a buffer of bytes. Accepts either
2427 a string or a buffer object holding the data and the length of the
2428 data must be width*height.
2430 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2432 def GetAlphaBuffer(*args
, **kwargs
):
2433 """GetAlphaBuffer(self) -> PyObject"""
2434 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2436 def SetAlphaBuffer(*args
, **kwargs
):
2437 """SetAlphaBuffer(self, buffer alpha)"""
2438 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2440 def SetMaskColour(*args
, **kwargs
):
2441 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2442 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2444 def GetOrFindMaskColour(*args
, **kwargs
):
2446 GetOrFindMaskColour() -> (r,g,b)
2448 Get the current mask colour or find a suitable colour.
2450 return _core_
.Image_GetOrFindMaskColour(*args
, **kwargs
)
2452 def GetMaskRed(*args
, **kwargs
):
2453 """GetMaskRed(self) -> unsigned char"""
2454 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2456 def GetMaskGreen(*args
, **kwargs
):
2457 """GetMaskGreen(self) -> unsigned char"""
2458 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2460 def GetMaskBlue(*args
, **kwargs
):
2461 """GetMaskBlue(self) -> unsigned char"""
2462 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2464 def SetMask(*args
, **kwargs
):
2465 """SetMask(self, bool mask=True)"""
2466 return _core_
.Image_SetMask(*args
, **kwargs
)
2468 def HasMask(*args
, **kwargs
):
2469 """HasMask(self) -> bool"""
2470 return _core_
.Image_HasMask(*args
, **kwargs
)
2472 def Rotate(*args
, **kwargs
):
2474 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2475 Point offset_after_rotation=None) -> Image
2477 return _core_
.Image_Rotate(*args
, **kwargs
)
2479 def Rotate90(*args
, **kwargs
):
2480 """Rotate90(self, bool clockwise=True) -> Image"""
2481 return _core_
.Image_Rotate90(*args
, **kwargs
)
2483 def Mirror(*args
, **kwargs
):
2484 """Mirror(self, bool horizontally=True) -> Image"""
2485 return _core_
.Image_Mirror(*args
, **kwargs
)
2487 def Replace(*args
, **kwargs
):
2489 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2490 unsigned char r2, unsigned char g2, unsigned char b2)
2492 return _core_
.Image_Replace(*args
, **kwargs
)
2494 def ConvertToMono(*args
, **kwargs
):
2495 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2496 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2498 def SetOption(*args
, **kwargs
):
2499 """SetOption(self, String name, String value)"""
2500 return _core_
.Image_SetOption(*args
, **kwargs
)
2502 def SetOptionInt(*args
, **kwargs
):
2503 """SetOptionInt(self, String name, int value)"""
2504 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2506 def GetOption(*args
, **kwargs
):
2507 """GetOption(self, String name) -> String"""
2508 return _core_
.Image_GetOption(*args
, **kwargs
)
2510 def GetOptionInt(*args
, **kwargs
):
2511 """GetOptionInt(self, String name) -> int"""
2512 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2514 def HasOption(*args
, **kwargs
):
2515 """HasOption(self, String name) -> bool"""
2516 return _core_
.Image_HasOption(*args
, **kwargs
)
2518 def CountColours(*args
, **kwargs
):
2519 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2520 return _core_
.Image_CountColours(*args
, **kwargs
)
2522 def ComputeHistogram(*args
, **kwargs
):
2523 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2524 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2526 def AddHandler(*args
, **kwargs
):
2527 """AddHandler(ImageHandler handler)"""
2528 return _core_
.Image_AddHandler(*args
, **kwargs
)
2530 AddHandler
= staticmethod(AddHandler
)
2531 def InsertHandler(*args
, **kwargs
):
2532 """InsertHandler(ImageHandler handler)"""
2533 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2535 InsertHandler
= staticmethod(InsertHandler
)
2536 def RemoveHandler(*args
, **kwargs
):
2537 """RemoveHandler(String name) -> bool"""
2538 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2540 RemoveHandler
= staticmethod(RemoveHandler
)
2541 def GetImageExtWildcard(*args
, **kwargs
):
2542 """GetImageExtWildcard() -> String"""
2543 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2545 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2546 def ConvertToBitmap(*args
, **kwargs
):
2547 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2548 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2550 def ConvertToMonoBitmap(*args
, **kwargs
):
2551 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2552 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2554 def __nonzero__(self
): return self
.Ok()
2556 class ImagePtr(Image
):
2557 def __init__(self
, this
):
2559 if not hasattr(self
,"thisown"): self
.thisown
= 0
2560 self
.__class
__ = Image
2561 _core_
.Image_swigregister(ImagePtr
)
2563 def ImageFromMime(*args
, **kwargs
):
2564 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2565 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2569 def ImageFromStream(*args
, **kwargs
):
2570 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2571 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2575 def ImageFromStreamMime(*args
, **kwargs
):
2576 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2577 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2581 def EmptyImage(*args
, **kwargs
):
2583 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2585 Construct an empty image of a given size, optionally setting all
2588 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2592 def ImageFromBitmap(*args
, **kwargs
):
2594 ImageFromBitmap(Bitmap bitmap) -> Image
2596 Construct an Image from a `wx.Bitmap`.
2598 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2602 def ImageFromData(*args
, **kwargs
):
2604 ImageFromData(int width, int height, buffer data) -> Image
2606 Construct an Image from a buffer of RGB bytes. Accepts either a
2607 string or a buffer object holding the data and the length of the data
2608 must be width*height*3.
2610 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2614 def ImageFromDataWithAlpha(*args
, **kwargs
):
2616 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
2618 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2619 Accepts either a string or a buffer object holding the data and the
2620 length of the data must be width*height*3.
2622 val
= _core_
.new_ImageFromDataWithAlpha(*args
, **kwargs
)
2626 def Image_CanRead(*args
, **kwargs
):
2627 """Image_CanRead(String name) -> bool"""
2628 return _core_
.Image_CanRead(*args
, **kwargs
)
2630 def Image_GetImageCount(*args
, **kwargs
):
2631 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2632 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2634 def Image_CanReadStream(*args
, **kwargs
):
2635 """Image_CanReadStream(InputStream stream) -> bool"""
2636 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2638 def Image_AddHandler(*args
, **kwargs
):
2639 """Image_AddHandler(ImageHandler handler)"""
2640 return _core_
.Image_AddHandler(*args
, **kwargs
)
2642 def Image_InsertHandler(*args
, **kwargs
):
2643 """Image_InsertHandler(ImageHandler handler)"""
2644 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2646 def Image_RemoveHandler(*args
, **kwargs
):
2647 """Image_RemoveHandler(String name) -> bool"""
2648 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2650 def Image_GetImageExtWildcard(*args
, **kwargs
):
2651 """Image_GetImageExtWildcard() -> String"""
2652 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2654 def InitAllImageHandlers():
2656 The former functionality of InitAllImageHanders is now done internal to
2657 the _core_ extension module and so this function has become a simple NOP.
2661 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2662 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2663 PNG_TYPE_COLOUR
= _core_
.PNG_TYPE_COLOUR
2664 PNG_TYPE_GREY
= _core_
.PNG_TYPE_GREY
2665 PNG_TYPE_GREY_RED
= _core_
.PNG_TYPE_GREY_RED
2666 BMP_24BPP
= _core_
.BMP_24BPP
2667 BMP_8BPP
= _core_
.BMP_8BPP
2668 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2669 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2670 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2671 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2672 BMP_4BPP
= _core_
.BMP_4BPP
2673 BMP_1BPP
= _core_
.BMP_1BPP
2674 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2675 class BMPHandler(ImageHandler
):
2676 """A `wx.ImageHandler` for \*.bmp bitmap files."""
2678 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2679 def __init__(self
, *args
, **kwargs
):
2681 __init__(self) -> BMPHandler
2683 A `wx.ImageHandler` for \*.bmp bitmap files.
2685 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2686 self
.this
= newobj
.this
2690 class BMPHandlerPtr(BMPHandler
):
2691 def __init__(self
, this
):
2693 if not hasattr(self
,"thisown"): self
.thisown
= 0
2694 self
.__class
__ = BMPHandler
2695 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2696 NullImage
= cvar
.NullImage
2697 IMAGE_OPTION_FILENAME
= cvar
.IMAGE_OPTION_FILENAME
2698 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2699 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2700 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2701 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2702 IMAGE_OPTION_RESOLUTIONX
= cvar
.IMAGE_OPTION_RESOLUTIONX
2703 IMAGE_OPTION_RESOLUTIONY
= cvar
.IMAGE_OPTION_RESOLUTIONY
2704 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2705 IMAGE_OPTION_QUALITY
= cvar
.IMAGE_OPTION_QUALITY
2706 IMAGE_OPTION_BITSPERSAMPLE
= cvar
.IMAGE_OPTION_BITSPERSAMPLE
2707 IMAGE_OPTION_SAMPLESPERPIXEL
= cvar
.IMAGE_OPTION_SAMPLESPERPIXEL
2708 IMAGE_OPTION_COMPRESSION
= cvar
.IMAGE_OPTION_COMPRESSION
2709 IMAGE_OPTION_IMAGEDESCRIPTOR
= cvar
.IMAGE_OPTION_IMAGEDESCRIPTOR
2710 IMAGE_OPTION_PNG_FORMAT
= cvar
.IMAGE_OPTION_PNG_FORMAT
2711 IMAGE_OPTION_PNG_BITDEPTH
= cvar
.IMAGE_OPTION_PNG_BITDEPTH
2713 class ICOHandler(BMPHandler
):
2714 """A `wx.ImageHandler` for \*.ico icon files."""
2716 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2717 def __init__(self
, *args
, **kwargs
):
2719 __init__(self) -> ICOHandler
2721 A `wx.ImageHandler` for \*.ico icon files.
2723 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2724 self
.this
= newobj
.this
2728 class ICOHandlerPtr(ICOHandler
):
2729 def __init__(self
, this
):
2731 if not hasattr(self
,"thisown"): self
.thisown
= 0
2732 self
.__class
__ = ICOHandler
2733 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2735 class CURHandler(ICOHandler
):
2736 """A `wx.ImageHandler` for \*.cur cursor files."""
2738 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2739 def __init__(self
, *args
, **kwargs
):
2741 __init__(self) -> CURHandler
2743 A `wx.ImageHandler` for \*.cur cursor files.
2745 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2746 self
.this
= newobj
.this
2750 class CURHandlerPtr(CURHandler
):
2751 def __init__(self
, this
):
2753 if not hasattr(self
,"thisown"): self
.thisown
= 0
2754 self
.__class
__ = CURHandler
2755 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2757 class ANIHandler(CURHandler
):
2758 """A `wx.ImageHandler` for \*.ani animated cursor files."""
2760 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2761 def __init__(self
, *args
, **kwargs
):
2763 __init__(self) -> ANIHandler
2765 A `wx.ImageHandler` for \*.ani animated cursor files.
2767 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2768 self
.this
= newobj
.this
2772 class ANIHandlerPtr(ANIHandler
):
2773 def __init__(self
, this
):
2775 if not hasattr(self
,"thisown"): self
.thisown
= 0
2776 self
.__class
__ = ANIHandler
2777 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2779 class PNGHandler(ImageHandler
):
2780 """A `wx.ImageHandler` for PNG image files."""
2782 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2783 def __init__(self
, *args
, **kwargs
):
2785 __init__(self) -> PNGHandler
2787 A `wx.ImageHandler` for PNG image files.
2789 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2790 self
.this
= newobj
.this
2794 class PNGHandlerPtr(PNGHandler
):
2795 def __init__(self
, this
):
2797 if not hasattr(self
,"thisown"): self
.thisown
= 0
2798 self
.__class
__ = PNGHandler
2799 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2801 class GIFHandler(ImageHandler
):
2802 """A `wx.ImageHandler` for GIF image files."""
2804 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2805 def __init__(self
, *args
, **kwargs
):
2807 __init__(self) -> GIFHandler
2809 A `wx.ImageHandler` for GIF image files.
2811 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2812 self
.this
= newobj
.this
2816 class GIFHandlerPtr(GIFHandler
):
2817 def __init__(self
, this
):
2819 if not hasattr(self
,"thisown"): self
.thisown
= 0
2820 self
.__class
__ = GIFHandler
2821 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2823 class PCXHandler(ImageHandler
):
2824 """A `wx.ImageHandler` for PCX imager files."""
2826 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2827 def __init__(self
, *args
, **kwargs
):
2829 __init__(self) -> PCXHandler
2831 A `wx.ImageHandler` for PCX imager files.
2833 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2834 self
.this
= newobj
.this
2838 class PCXHandlerPtr(PCXHandler
):
2839 def __init__(self
, this
):
2841 if not hasattr(self
,"thisown"): self
.thisown
= 0
2842 self
.__class
__ = PCXHandler
2843 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2845 class JPEGHandler(ImageHandler
):
2846 """A `wx.ImageHandler` for JPEG/JPG image files."""
2848 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2849 def __init__(self
, *args
, **kwargs
):
2851 __init__(self) -> JPEGHandler
2853 A `wx.ImageHandler` for JPEG/JPG image files.
2855 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2856 self
.this
= newobj
.this
2860 class JPEGHandlerPtr(JPEGHandler
):
2861 def __init__(self
, this
):
2863 if not hasattr(self
,"thisown"): self
.thisown
= 0
2864 self
.__class
__ = JPEGHandler
2865 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2867 class PNMHandler(ImageHandler
):
2868 """A `wx.ImageHandler` for PNM image files."""
2870 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2871 def __init__(self
, *args
, **kwargs
):
2873 __init__(self) -> PNMHandler
2875 A `wx.ImageHandler` for PNM image files.
2877 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2878 self
.this
= newobj
.this
2882 class PNMHandlerPtr(PNMHandler
):
2883 def __init__(self
, this
):
2885 if not hasattr(self
,"thisown"): self
.thisown
= 0
2886 self
.__class
__ = PNMHandler
2887 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2889 class XPMHandler(ImageHandler
):
2890 """A `wx.ImageHandler` for XPM image."""
2892 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2893 def __init__(self
, *args
, **kwargs
):
2895 __init__(self) -> XPMHandler
2897 A `wx.ImageHandler` for XPM image.
2899 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2900 self
.this
= newobj
.this
2904 class XPMHandlerPtr(XPMHandler
):
2905 def __init__(self
, this
):
2907 if not hasattr(self
,"thisown"): self
.thisown
= 0
2908 self
.__class
__ = XPMHandler
2909 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2911 class TIFFHandler(ImageHandler
):
2912 """A `wx.ImageHandler` for TIFF image files."""
2914 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2915 def __init__(self
, *args
, **kwargs
):
2917 __init__(self) -> TIFFHandler
2919 A `wx.ImageHandler` for TIFF image files.
2921 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2922 self
.this
= newobj
.this
2926 class TIFFHandlerPtr(TIFFHandler
):
2927 def __init__(self
, this
):
2929 if not hasattr(self
,"thisown"): self
.thisown
= 0
2930 self
.__class
__ = TIFFHandler
2931 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2933 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2934 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2935 class Quantize(object):
2936 """Performs quantization, or colour reduction, on a wxImage."""
2937 def __init__(self
): raise RuntimeError, "No constructor defined"
2939 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2940 def Quantize(*args
, **kwargs
):
2942 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2944 Reduce the colours in the source image and put the result into the
2945 destination image, setting the palette in the destination if
2946 needed. Both images may be the same, to overwrite the source image.
2948 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2950 Quantize
= staticmethod(Quantize
)
2952 class QuantizePtr(Quantize
):
2953 def __init__(self
, this
):
2955 if not hasattr(self
,"thisown"): self
.thisown
= 0
2956 self
.__class
__ = Quantize
2957 _core_
.Quantize_swigregister(QuantizePtr
)
2959 def Quantize_Quantize(*args
, **kwargs
):
2961 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2963 Reduce the colours in the source image and put the result into the
2964 destination image, setting the palette in the destination if
2965 needed. Both images may be the same, to overwrite the source image.
2967 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2969 #---------------------------------------------------------------------------
2971 class EvtHandler(Object
):
2972 """Proxy of C++ EvtHandler class"""
2974 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2975 def __init__(self
, *args
, **kwargs
):
2976 """__init__(self) -> EvtHandler"""
2977 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2978 self
.this
= newobj
.this
2981 def GetNextHandler(*args
, **kwargs
):
2982 """GetNextHandler(self) -> EvtHandler"""
2983 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2985 def GetPreviousHandler(*args
, **kwargs
):
2986 """GetPreviousHandler(self) -> EvtHandler"""
2987 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2989 def SetNextHandler(*args
, **kwargs
):
2990 """SetNextHandler(self, EvtHandler handler)"""
2991 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2993 def SetPreviousHandler(*args
, **kwargs
):
2994 """SetPreviousHandler(self, EvtHandler handler)"""
2995 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2997 def GetEvtHandlerEnabled(*args
, **kwargs
):
2998 """GetEvtHandlerEnabled(self) -> bool"""
2999 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
3001 def SetEvtHandlerEnabled(*args
, **kwargs
):
3002 """SetEvtHandlerEnabled(self, bool enabled)"""
3003 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
3005 def ProcessEvent(*args
, **kwargs
):
3006 """ProcessEvent(self, Event event) -> bool"""
3007 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
3009 def AddPendingEvent(*args
, **kwargs
):
3010 """AddPendingEvent(self, Event event)"""
3011 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
3013 def ProcessPendingEvents(*args
, **kwargs
):
3014 """ProcessPendingEvents(self)"""
3015 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
3017 def Connect(*args
, **kwargs
):
3018 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
3019 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
3021 def Disconnect(*args
, **kwargs
):
3022 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
3023 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
3025 def _setOORInfo(*args
, **kwargs
):
3026 """_setOORInfo(self, PyObject _self, bool incref=True)"""
3027 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
3029 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
3031 Bind an event to an event handler.
3033 :param event: One of the EVT_* objects that specifies the
3034 type of event to bind,
3036 :param handler: A callable object to be invoked when the
3037 event is delivered to self. Pass None to
3038 disconnect an event handler.
3040 :param source: Sometimes the event originates from a
3041 different window than self, but you still
3042 want to catch it in self. (For example, a
3043 button event delivered to a frame.) By
3044 passing the source of the event, the event
3045 handling system is able to differentiate
3046 between the same event type from different
3049 :param id: Used to spcify the event source by ID instead
3052 :param id2: Used when it is desirable to bind a handler
3053 to a range of IDs, such as with EVT_MENU_RANGE.
3055 if source
is not None:
3057 event
.Bind(self
, id, id2
, handler
)
3059 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
3061 Disconencts the event handler binding for event from self.
3062 Returns True if successful.
3064 if source
is not None:
3066 return event
.Unbind(self
, id, id2
)
3069 class EvtHandlerPtr(EvtHandler
):
3070 def __init__(self
, this
):
3072 if not hasattr(self
,"thisown"): self
.thisown
= 0
3073 self
.__class
__ = EvtHandler
3074 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
3076 #---------------------------------------------------------------------------
3078 class PyEventBinder(object):
3080 Instances of this class are used to bind specific events to event
3083 def __init__(self
, evtType
, expectedIDs
=0):
3084 if expectedIDs
not in [0, 1, 2]:
3085 raise ValueError, "Invalid number of expectedIDs"
3086 self
.expectedIDs
= expectedIDs
3088 if type(evtType
) == list or type(evtType
) == tuple:
3089 self
.evtType
= evtType
3091 self
.evtType
= [evtType
]
3094 def Bind(self
, target
, id1
, id2
, function
):
3095 """Bind this set of event types to target."""
3096 for et
in self
.evtType
:
3097 target
.Connect(id1
, id2
, et
, function
)
3100 def Unbind(self
, target
, id1
, id2
):
3101 """Remove an event binding."""
3103 for et
in self
.evtType
:
3104 success
+= target
.Disconnect(id1
, id2
, et
)
3108 def __call__(self
, *args
):
3110 For backwards compatibility with the old EVT_* functions.
3111 Should be called with either (window, func), (window, ID,
3112 func) or (window, ID1, ID2, func) parameters depending on the
3115 assert len(args
) == 2 + self
.expectedIDs
3119 if self
.expectedIDs
== 0:
3121 elif self
.expectedIDs
== 1:
3124 elif self
.expectedIDs
== 2:
3129 raise ValueError, "Unexpected number of IDs"
3131 self
.Bind(target
, id1
, id2
, func
)
3134 # These two are square pegs that don't fit the PyEventBinder hole...
3135 def EVT_COMMAND(win
, id, cmd
, func
):
3136 win
.Connect(id, -1, cmd
, func
)
3137 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
3138 win
.Connect(id1
, id2
, cmd
, func
)
3141 #---------------------------------------------------------------------------
3143 #---------------------------------------------------------------------------
3145 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
3146 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
3148 def NewEventType(*args
, **kwargs
):
3149 """NewEventType() -> wxEventType"""
3150 return _core_
.NewEventType(*args
, **kwargs
)
3151 wxEVT_NULL
= _core_
.wxEVT_NULL
3152 wxEVT_FIRST
= _core_
.wxEVT_FIRST
3153 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
3154 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
3155 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
3156 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
3157 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
3158 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3159 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3160 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
3161 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
3162 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
3163 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
3164 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3165 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
3166 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
3167 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
3168 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
3169 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
3170 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
3171 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
3172 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
3173 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
3174 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
3175 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
3176 wxEVT_MOTION
= _core_
.wxEVT_MOTION
3177 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
3178 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
3179 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
3180 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
3181 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
3182 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
3183 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
3184 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
3185 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
3186 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
3187 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
3188 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
3189 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
3190 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
3191 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
3192 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
3193 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
3194 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
3195 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
3196 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
3197 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
3198 wxEVT_CHAR
= _core_
.wxEVT_CHAR
3199 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
3200 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
3201 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
3202 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
3203 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
3204 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
3205 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
3206 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
3207 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
3208 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
3209 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
3210 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
3211 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
3212 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
3213 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
3214 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
3215 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
3216 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
3217 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
3218 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
3219 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
3220 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
3221 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
3222 wxEVT_SIZE
= _core_
.wxEVT_SIZE
3223 wxEVT_MOVE
= _core_
.wxEVT_MOVE
3224 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
3225 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
3226 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
3227 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
3228 wxEVT_POWER
= _core_
.wxEVT_POWER
3229 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
3230 wxEVT_CREATE
= _core_
.wxEVT_CREATE
3231 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
3232 wxEVT_SHOW
= _core_
.wxEVT_SHOW
3233 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
3234 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
3235 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
3236 wxEVT_PAINT
= _core_
.wxEVT_PAINT
3237 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
3238 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
3239 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
3240 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
3241 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
3242 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
3243 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
3244 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
3245 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
3246 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
3247 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
3248 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
3249 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
3250 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
3251 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
3252 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
3253 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
3254 wxEVT_IDLE
= _core_
.wxEVT_IDLE
3255 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
3256 wxEVT_SIZING
= _core_
.wxEVT_SIZING
3257 wxEVT_MOVING
= _core_
.wxEVT_MOVING
3258 wxEVT_HIBERNATE
= _core_
.wxEVT_HIBERNATE
3259 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
3260 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
3261 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
3262 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
3263 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
3264 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
3265 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
3267 # Create some event binders
3268 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
3269 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
3270 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
3271 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
3272 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
3273 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3274 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3275 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
3276 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
3277 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
3278 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
3279 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
3280 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
3281 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
3282 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
3283 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
3284 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
3285 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
3286 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
3287 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
3288 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
3289 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
3290 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
3291 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
3292 EVT_HIBERNATE
= wx
.PyEventBinder( wxEVT_HIBERNATE
)
3293 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3294 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3295 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
3296 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
3297 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
3298 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
3299 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
3300 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
3301 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
3302 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
3303 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
3304 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
3305 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
3306 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
3307 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
3308 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
3310 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
3311 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
3312 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
3313 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
3314 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
3315 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
3316 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
3317 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
3318 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
3319 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
3320 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
3321 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
3322 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
3324 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3332 wxEVT_MIDDLE_DCLICK
,
3340 # Scrolling from wxWindow (sent to wxScrolledWindow)
3341 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3342 wxEVT_SCROLLWIN_BOTTOM
,
3343 wxEVT_SCROLLWIN_LINEUP
,
3344 wxEVT_SCROLLWIN_LINEDOWN
,
3345 wxEVT_SCROLLWIN_PAGEUP
,
3346 wxEVT_SCROLLWIN_PAGEDOWN
,
3347 wxEVT_SCROLLWIN_THUMBTRACK
,
3348 wxEVT_SCROLLWIN_THUMBRELEASE
,
3351 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3352 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3353 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3354 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3355 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3356 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3357 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3358 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3360 # Scrolling from wx.Slider and wx.ScrollBar
3361 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3362 wxEVT_SCROLL_BOTTOM
,
3363 wxEVT_SCROLL_LINEUP
,
3364 wxEVT_SCROLL_LINEDOWN
,
3365 wxEVT_SCROLL_PAGEUP
,
3366 wxEVT_SCROLL_PAGEDOWN
,
3367 wxEVT_SCROLL_THUMBTRACK
,
3368 wxEVT_SCROLL_THUMBRELEASE
,
3369 wxEVT_SCROLL_ENDSCROLL
,
3372 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3373 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3374 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3375 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3376 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3377 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3378 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3379 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3380 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3382 # Scrolling from wx.Slider and wx.ScrollBar, with an id
3383 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3384 wxEVT_SCROLL_BOTTOM
,
3385 wxEVT_SCROLL_LINEUP
,
3386 wxEVT_SCROLL_LINEDOWN
,
3387 wxEVT_SCROLL_PAGEUP
,
3388 wxEVT_SCROLL_PAGEDOWN
,
3389 wxEVT_SCROLL_THUMBTRACK
,
3390 wxEVT_SCROLL_THUMBRELEASE
,
3391 wxEVT_SCROLL_ENDSCROLL
,
3394 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3395 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3396 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3397 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3398 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3399 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3400 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3401 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3402 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3404 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3405 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3406 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3407 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3408 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3409 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3410 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3411 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3412 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3413 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3415 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3416 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3417 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3418 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3419 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3420 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3421 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3422 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3423 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3426 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3427 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3428 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3429 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3430 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3431 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3432 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3434 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3436 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3437 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3439 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3443 #---------------------------------------------------------------------------
3445 class Event(Object
):
3447 An event is a structure holding information about an event passed to a
3448 callback or member function. wx.Event is an abstract base class for
3451 def __init__(self
): raise RuntimeError, "No constructor defined"
3453 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3454 def __del__(self
, destroy
=_core_
.delete_Event
):
3457 if self
.thisown
: destroy(self
)
3460 def SetEventType(*args
, **kwargs
):
3462 SetEventType(self, wxEventType typ)
3464 Sets the specific type of the event.
3466 return _core_
.Event_SetEventType(*args
, **kwargs
)
3468 def GetEventType(*args
, **kwargs
):
3470 GetEventType(self) -> wxEventType
3472 Returns the identifier of the given event type, such as
3473 ``wxEVT_COMMAND_BUTTON_CLICKED``.
3475 return _core_
.Event_GetEventType(*args
, **kwargs
)
3477 def GetEventObject(*args
, **kwargs
):
3479 GetEventObject(self) -> Object
3481 Returns the object (usually a window) associated with the event, if
3484 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3486 def SetEventObject(*args
, **kwargs
):
3488 SetEventObject(self, Object obj)
3490 Sets the originating object, or in other words, obj is normally the
3491 object that is sending the event.
3493 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3495 def GetTimestamp(*args
, **kwargs
):
3496 """GetTimestamp(self) -> long"""
3497 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3499 def SetTimestamp(*args
, **kwargs
):
3500 """SetTimestamp(self, long ts=0)"""
3501 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3503 def GetId(*args
, **kwargs
):
3507 Returns the identifier associated with this event, such as a button
3510 return _core_
.Event_GetId(*args
, **kwargs
)
3512 def SetId(*args
, **kwargs
):
3516 Set's the ID for the event. This is usually the ID of the window that
3517 is sending the event, but it can also be a command id from a menu
3520 return _core_
.Event_SetId(*args
, **kwargs
)
3522 def IsCommandEvent(*args
, **kwargs
):
3524 IsCommandEvent(self) -> bool
3526 Returns true if the event is or is derived from `wx.CommandEvent` else
3527 it returns false. Note: Exists only for optimization purposes.
3529 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3531 def Skip(*args
, **kwargs
):
3533 Skip(self, bool skip=True)
3535 Called by an event handler, it controls whether additional event
3536 handlers bound to this event will be called after the current event
3537 handler returns. Skip(false) (the default setting) will prevent
3538 additional event handlers from being called and control will be
3539 returned to the sender of the event immediately after the current
3540 handler has finished. Skip(True) will cause the event processing
3541 system to continue searching for a handler function for this event.
3544 return _core_
.Event_Skip(*args
, **kwargs
)
3546 def GetSkipped(*args
, **kwargs
):
3548 GetSkipped(self) -> bool
3550 Returns true if the event handler should be skipped, false otherwise.
3553 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3555 def ShouldPropagate(*args
, **kwargs
):
3557 ShouldPropagate(self) -> bool
3559 Test if this event should be propagated to the parent window or not,
3560 i.e. if the propagation level is currently greater than 0.
3562 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3564 def StopPropagation(*args
, **kwargs
):
3566 StopPropagation(self) -> int
3568 Stop the event from propagating to its parent window. Returns the old
3569 propagation level value which may be later passed to
3570 `ResumePropagation` to allow propagating the event again.
3572 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3574 def ResumePropagation(*args
, **kwargs
):
3576 ResumePropagation(self, int propagationLevel)
3578 Resume the event propagation by restoring the propagation level. (For
3579 example, you can use the value returned by an earlier call to
3583 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3585 def Clone(*args
, **kwargs
):
3586 """Clone(self) -> Event"""
3587 return _core_
.Event_Clone(*args
, **kwargs
)
3590 class EventPtr(Event
):
3591 def __init__(self
, this
):
3593 if not hasattr(self
,"thisown"): self
.thisown
= 0
3594 self
.__class
__ = Event
3595 _core_
.Event_swigregister(EventPtr
)
3597 #---------------------------------------------------------------------------
3599 class PropagationDisabler(object):
3601 Helper class to temporarily change an event not to propagate. Simply
3602 create an instance of this class and then whe it is destroyed the
3603 propogation of the event will be restored.
3606 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3607 def __init__(self
, *args
, **kwargs
):
3609 __init__(self, Event event) -> PropagationDisabler
3611 Helper class to temporarily change an event not to propagate. Simply
3612 create an instance of this class and then whe it is destroyed the
3613 propogation of the event will be restored.
3615 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3616 self
.this
= newobj
.this
3619 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3622 if self
.thisown
: destroy(self
)
3626 class PropagationDisablerPtr(PropagationDisabler
):
3627 def __init__(self
, this
):
3629 if not hasattr(self
,"thisown"): self
.thisown
= 0
3630 self
.__class
__ = PropagationDisabler
3631 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3633 class PropagateOnce(object):
3635 A helper class that will temporarily lower propagation level of an
3636 event. Simply create an instance of this class and then whe it is
3637 destroyed the propogation of the event will be restored.
3640 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3641 def __init__(self
, *args
, **kwargs
):
3643 __init__(self, Event event) -> PropagateOnce
3645 A helper class that will temporarily lower propagation level of an
3646 event. Simply create an instance of this class and then whe it is
3647 destroyed the propogation of the event will be restored.
3649 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3650 self
.this
= newobj
.this
3653 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3656 if self
.thisown
: destroy(self
)
3660 class PropagateOncePtr(PropagateOnce
):
3661 def __init__(self
, this
):
3663 if not hasattr(self
,"thisown"): self
.thisown
= 0
3664 self
.__class
__ = PropagateOnce
3665 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3667 #---------------------------------------------------------------------------
3669 class CommandEvent(Event
):
3671 This event class contains information about command events, which
3672 originate from a variety of simple controls, as well as menus and
3676 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3677 def __init__(self
, *args
, **kwargs
):
3679 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent
3681 This event class contains information about command events, which
3682 originate from a variety of simple controls, as well as menus and
3685 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3686 self
.this
= newobj
.this
3689 def GetSelection(*args
, **kwargs
):
3691 GetSelection(self) -> int
3693 Returns item index for a listbox or choice selection event (not valid
3696 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3698 def SetString(*args
, **kwargs
):
3699 """SetString(self, String s)"""
3700 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3702 def GetString(*args
, **kwargs
):
3704 GetString(self) -> String
3706 Returns item string for a listbox or choice selection event (not valid
3709 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3711 def IsChecked(*args
, **kwargs
):
3713 IsChecked(self) -> bool
3715 This method can be used with checkbox and menu events: for the
3716 checkboxes, the method returns true for a selection event and false
3717 for a deselection one. For the menu events, this method indicates if
3718 the menu item just has become checked or unchecked (and thus only
3719 makes sense for checkable menu items).
3721 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3724 def IsSelection(*args
, **kwargs
):
3726 IsSelection(self) -> bool
3728 For a listbox or similar event, returns true if it is a selection,
3729 false if it is a deselection.
3731 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3733 def SetExtraLong(*args
, **kwargs
):
3734 """SetExtraLong(self, long extraLong)"""
3735 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3737 def GetExtraLong(*args
, **kwargs
):
3739 GetExtraLong(self) -> long
3741 Returns extra information dependant on the event objects type. If the event
3742 comes from a listbox selection, it is a boolean determining whether the event
3743 was a selection (true) or a deselection (false). A listbox deselection only
3744 occurs for multiple-selection boxes, and in this case the index and string
3745 values are indeterminate and the listbox must be examined by the application.
3747 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3749 def SetInt(*args
, **kwargs
):
3750 """SetInt(self, int i)"""
3751 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3753 def GetInt(*args
, **kwargs
):
3755 GetInt(self) -> long
3757 Returns the integer identifier corresponding to a listbox, choice or radiobox
3758 selection (only if the event was a selection, not a deselection), or a boolean
3759 value representing the value of a checkbox.
3761 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3763 def Clone(*args
, **kwargs
):
3764 """Clone(self) -> Event"""
3765 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3768 class CommandEventPtr(CommandEvent
):
3769 def __init__(self
, this
):
3771 if not hasattr(self
,"thisown"): self
.thisown
= 0
3772 self
.__class
__ = CommandEvent
3773 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3775 #---------------------------------------------------------------------------
3777 class NotifyEvent(CommandEvent
):
3779 An instance of this class (or one of its derived classes) is sent from
3780 a control when the control's state is being changed and the control
3781 allows that change to be prevented from happening. The event handler
3782 can call `Veto` or `Allow` to tell the control what to do.
3785 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3786 def __init__(self
, *args
, **kwargs
):
3788 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent
3790 An instance of this class (or one of its derived classes) is sent from
3791 a control when the control's state is being changed and the control
3792 allows that change to be prevented from happening. The event handler
3793 can call `Veto` or `Allow` to tell the control what to do.
3795 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3796 self
.this
= newobj
.this
3799 def Veto(*args
, **kwargs
):
3803 Prevents the change announced by this event from happening.
3805 It is in general a good idea to notify the user about the reasons for
3806 vetoing the change because otherwise the applications behaviour (which
3807 just refuses to do what the user wants) might be quite surprising.
3809 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3811 def Allow(*args
, **kwargs
):
3815 This is the opposite of `Veto`: it explicitly allows the event to be
3816 processed. For most events it is not necessary to call this method as
3817 the events are allowed anyhow but some are forbidden by default (this
3818 will be mentioned in the corresponding event description).
3820 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3822 def IsAllowed(*args
, **kwargs
):
3824 IsAllowed(self) -> bool
3826 Returns true if the change is allowed (`Veto` hasn't been called) or
3827 false otherwise (if it was).
3829 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3832 class NotifyEventPtr(NotifyEvent
):
3833 def __init__(self
, this
):
3835 if not hasattr(self
,"thisown"): self
.thisown
= 0
3836 self
.__class
__ = NotifyEvent
3837 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3839 #---------------------------------------------------------------------------
3841 class ScrollEvent(CommandEvent
):
3843 A scroll event holds information about events sent from stand-alone
3844 scrollbars and sliders. Note that scrolled windows do not send
3845 instnaces of this event class, but send the `wx.ScrollWinEvent`
3849 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3850 def __init__(self
, *args
, **kwargs
):
3852 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3853 int orient=0) -> ScrollEvent
3855 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3856 self
.this
= newobj
.this
3859 def GetOrientation(*args
, **kwargs
):
3861 GetOrientation(self) -> int
3863 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
3866 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3868 def GetPosition(*args
, **kwargs
):
3870 GetPosition(self) -> int
3872 Returns the position of the scrollbar.
3874 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3876 def SetOrientation(*args
, **kwargs
):
3877 """SetOrientation(self, int orient)"""
3878 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3880 def SetPosition(*args
, **kwargs
):
3881 """SetPosition(self, int pos)"""
3882 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3885 class ScrollEventPtr(ScrollEvent
):
3886 def __init__(self
, this
):
3888 if not hasattr(self
,"thisown"): self
.thisown
= 0
3889 self
.__class
__ = ScrollEvent
3890 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3892 #---------------------------------------------------------------------------
3894 class ScrollWinEvent(Event
):
3896 A wx.ScrollWinEvent holds information about scrolling and is sent from
3900 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3901 def __init__(self
, *args
, **kwargs
):
3903 __init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent
3905 A wx.ScrollWinEvent holds information about scrolling and is sent from
3908 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3909 self
.this
= newobj
.this
3912 def GetOrientation(*args
, **kwargs
):
3914 GetOrientation(self) -> int
3916 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
3919 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3921 def GetPosition(*args
, **kwargs
):
3923 GetPosition(self) -> int
3925 Returns the position of the scrollbar for the thumb track and release
3926 events. Note that this field can't be used for the other events, you
3927 need to query the window itself for the current position in that case.
3929 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3931 def SetOrientation(*args
, **kwargs
):
3932 """SetOrientation(self, int orient)"""
3933 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3935 def SetPosition(*args
, **kwargs
):
3936 """SetPosition(self, int pos)"""
3937 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3940 class ScrollWinEventPtr(ScrollWinEvent
):
3941 def __init__(self
, this
):
3943 if not hasattr(self
,"thisown"): self
.thisown
= 0
3944 self
.__class
__ = ScrollWinEvent
3945 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3947 #---------------------------------------------------------------------------
3949 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3950 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3951 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3952 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3953 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3954 class MouseEvent(Event
):
3956 This event class contains information about the events generated by
3957 the mouse: they include mouse buttons press and release events and
3960 All mouse events involving the buttons use ``wx.MOUSE_BTN_LEFT`` for
3961 the left mouse button, ``wx.MOUSE_BTN_MIDDLE`` for the middle one and
3962 ``wx.MOUSE_BTN_RIGHT`` for the right one. Note that not all mice have
3963 a middle button so a portable application should avoid relying on the
3966 Note the difference between methods like `LeftDown` and `LeftIsDown`:
3967 the former returns true when the event corresponds to the left mouse
3968 button click while the latter returns true if the left mouse button is
3969 currently being pressed. For example, when the user is dragging the
3970 mouse you can use `LeftIsDown` to test whether the left mouse button
3971 is (still) depressed. Also, by convention, if `LeftDown` returns true,
3972 `LeftIsDown` will also return true in wxWidgets whatever the
3973 underlying GUI behaviour is (which is platform-dependent). The same
3974 applies, of course, to other mouse buttons as well.
3977 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3978 def __init__(self
, *args
, **kwargs
):
3980 __init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent
3982 Constructs a wx.MouseEvent. Valid event types are:
3984 * wxEVT_ENTER_WINDOW
3985 * wxEVT_LEAVE_WINDOW
3991 * wxEVT_MIDDLE_DCLICK
3994 * wxEVT_RIGHT_DCLICK
3998 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3999 self
.this
= newobj
.this
4002 def IsButton(*args
, **kwargs
):
4004 IsButton(self) -> bool
4006 Returns true if the event was a mouse button event (not necessarily a
4007 button down event - that may be tested using `ButtonDown`).
4009 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
4011 def ButtonDown(*args
, **kwargs
):
4013 ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool
4015 If the argument is omitted, this returns true if the event was any mouse
4016 button down event. Otherwise the argument specifies which button-down
4017 event shold be checked for (see `Button` for the possible values).
4019 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
4021 def ButtonDClick(*args
, **kwargs
):
4023 ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool
4025 If the argument is omitted, this returns true if the event was any
4026 mouse double click event. Otherwise the argument specifies which
4027 double click event to check for (see `Button` for the possible
4030 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
4032 def ButtonUp(*args
, **kwargs
):
4034 ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool
4036 If the argument is omitted, this returns true if the event was any
4037 mouse button up event. Otherwise the argument specifies which
4038 button up event to check for (see `Button` for the possible values).
4040 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
4042 def Button(*args
, **kwargs
):
4044 Button(self, int button) -> bool
4046 Returns true if the identified mouse button is changing state. Valid
4047 values of button are:
4049 ==================== =====================================
4050 wx.MOUSE_BTN_LEFT check if left button was pressed
4051 wx.MOUSE_BTN_MIDDLE check if middle button was pressed
4052 wx.MOUSE_BTN_RIGHT check if right button was pressed
4053 wx.MOUSE_BTN_ANY check if any button was pressed
4054 ==================== =====================================
4057 return _core_
.MouseEvent_Button(*args
, **kwargs
)
4059 def ButtonIsDown(*args
, **kwargs
):
4060 """ButtonIsDown(self, int but) -> bool"""
4061 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
4063 def GetButton(*args
, **kwargs
):
4065 GetButton(self) -> int
4067 Returns the mouse button which generated this event or
4068 wx.MOUSE_BTN_NONE if no button is involved (for mouse move, enter or
4069 leave event, for example). Otherwise wx.MOUSE_BTN_LEFT is returned for
4070 the left button down, up and double click events, wx.MOUSE_BTN_MIDDLE
4071 and wx.MOUSE_BTN_RIGHT for the same events for the middle and the
4072 right buttons respectively.
4074 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
4076 def ControlDown(*args
, **kwargs
):
4078 ControlDown(self) -> bool
4080 Returns true if the control key was down at the time of the event.
4082 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
4084 def MetaDown(*args
, **kwargs
):
4086 MetaDown(self) -> bool
4088 Returns true if the Meta key was down at the time of the event.
4090 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
4092 def AltDown(*args
, **kwargs
):
4094 AltDown(self) -> bool
4096 Returns true if the Alt key was down at the time of the event.
4098 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
4100 def ShiftDown(*args
, **kwargs
):
4102 ShiftDown(self) -> bool
4104 Returns true if the Shift key was down at the time of the event.
4106 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
4108 def CmdDown(*args
, **kwargs
):
4110 CmdDown(self) -> bool
4112 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4113 platforms but the special "Apple" (a.k.a as "Command") key on
4114 Macs: it often makes sense to use it instead of, say, `ControlDown`
4115 because Cmd key is used for the same thing under Mac as Ctrl
4116 elsewhere. The Ctrl key still exists, it's just not used for this
4117 purpose. So for non-Mac platforms this is the same as `ControlDown`
4118 and Macs this is the same as `MetaDown`.
4120 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
4122 def LeftDown(*args
, **kwargs
):
4124 LeftDown(self) -> bool
4126 Returns true if the left mouse button state changed to down.
4128 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
4130 def MiddleDown(*args
, **kwargs
):
4132 MiddleDown(self) -> bool
4134 Returns true if the middle mouse button state changed to down.
4136 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
4138 def RightDown(*args
, **kwargs
):
4140 RightDown(self) -> bool
4142 Returns true if the right mouse button state changed to down.
4144 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
4146 def LeftUp(*args
, **kwargs
):
4148 LeftUp(self) -> bool
4150 Returns true if the left mouse button state changed to up.
4152 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
4154 def MiddleUp(*args
, **kwargs
):
4156 MiddleUp(self) -> bool
4158 Returns true if the middle mouse button state changed to up.
4160 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
4162 def RightUp(*args
, **kwargs
):
4164 RightUp(self) -> bool
4166 Returns true if the right mouse button state changed to up.
4168 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
4170 def LeftDClick(*args
, **kwargs
):
4172 LeftDClick(self) -> bool
4174 Returns true if the event was a left button double click.
4176 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
4178 def MiddleDClick(*args
, **kwargs
):
4180 MiddleDClick(self) -> bool
4182 Returns true if the event was a middle button double click.
4184 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
4186 def RightDClick(*args
, **kwargs
):
4188 RightDClick(self) -> bool
4190 Returns true if the event was a right button double click.
4192 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
4194 def LeftIsDown(*args
, **kwargs
):
4196 LeftIsDown(self) -> bool
4198 Returns true if the left mouse button is currently down, independent
4199 of the current event type.
4201 Please notice that it is not the same as LeftDown which returns true
4202 if the left mouse button was just pressed. Rather, it describes the
4203 state of the mouse button before the event happened.
4205 This event is usually used in the mouse event handlers which process
4206 "move mouse" messages to determine whether the user is (still)
4209 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
4211 def MiddleIsDown(*args
, **kwargs
):
4213 MiddleIsDown(self) -> bool
4215 Returns true if the middle mouse button is currently down, independent
4216 of the current event type.
4218 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
4220 def RightIsDown(*args
, **kwargs
):
4222 RightIsDown(self) -> bool
4224 Returns true if the right mouse button is currently down, independent
4225 of the current event type.
4227 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
4229 def Dragging(*args
, **kwargs
):
4231 Dragging(self) -> bool
4233 Returns true if this was a dragging event (motion while a button is
4236 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
4238 def Moving(*args
, **kwargs
):
4240 Moving(self) -> bool
4242 Returns true if this was a motion event and no mouse buttons were
4243 pressed. If any mouse button is held pressed, then this method returns
4244 false and Dragging returns true.
4246 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
4248 def Entering(*args
, **kwargs
):
4250 Entering(self) -> bool
4252 Returns true if the mouse was entering the window.
4254 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
4256 def Leaving(*args
, **kwargs
):
4258 Leaving(self) -> bool
4260 Returns true if the mouse was leaving the window.
4262 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
4264 def GetPosition(*args
, **kwargs
):
4266 GetPosition(self) -> Point
4268 Returns the pixel position of the mouse in window coordinates when the
4271 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
4273 def GetPositionTuple(*args
, **kwargs
):
4275 GetPositionTuple() -> (x,y)
4277 Returns the pixel position of the mouse in window coordinates when the
4280 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
4282 def GetLogicalPosition(*args
, **kwargs
):
4284 GetLogicalPosition(self, DC dc) -> Point
4286 Returns the logical mouse position in pixels (i.e. translated
4287 according to the translation set for the DC, which usually indicates
4288 that the window has been scrolled).
4290 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
4292 def GetX(*args
, **kwargs
):
4296 Returns X coordinate of the physical mouse event position.
4298 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
4300 def GetY(*args
, **kwargs
):
4304 Returns Y coordinate of the physical mouse event position.
4306 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
4308 def GetWheelRotation(*args
, **kwargs
):
4310 GetWheelRotation(self) -> int
4312 Get wheel rotation, positive or negative indicates direction of
4313 rotation. Current devices all send an event when rotation is equal to
4314 +/-WheelDelta, but this allows for finer resolution devices to be
4315 created in the future. Because of this you shouldn't assume that one
4316 event is equal to 1 line or whatever, but you should be able to either
4317 do partial line scrolling or wait until +/-WheelDelta rotation values
4318 have been accumulated before scrolling.
4320 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
4322 def GetWheelDelta(*args
, **kwargs
):
4324 GetWheelDelta(self) -> int
4326 Get wheel delta, normally 120. This is the threshold for action to be
4327 taken, and one such action (for example, scrolling one increment)
4328 should occur for each delta.
4330 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
4332 def GetLinesPerAction(*args
, **kwargs
):
4334 GetLinesPerAction(self) -> int
4336 Returns the configured number of lines (or whatever) to be scrolled
4337 per wheel action. Defaults to three.
4339 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
4341 def IsPageScroll(*args
, **kwargs
):
4343 IsPageScroll(self) -> bool
4345 Returns true if the system has been setup to do page scrolling with
4346 the mouse wheel instead of line scrolling.
4348 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
4350 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
4351 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
4352 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
4353 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
4354 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
4355 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
4356 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
4357 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
4358 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
4359 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
4360 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
4361 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
4363 class MouseEventPtr(MouseEvent
):
4364 def __init__(self
, this
):
4366 if not hasattr(self
,"thisown"): self
.thisown
= 0
4367 self
.__class
__ = MouseEvent
4368 _core_
.MouseEvent_swigregister(MouseEventPtr
)
4370 #---------------------------------------------------------------------------
4372 class SetCursorEvent(Event
):
4373 """Proxy of C++ SetCursorEvent class"""
4375 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4376 def __init__(self
, *args
, **kwargs
):
4377 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
4378 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
4379 self
.this
= newobj
.this
4382 def GetX(*args
, **kwargs
):
4383 """GetX(self) -> int"""
4384 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
4386 def GetY(*args
, **kwargs
):
4387 """GetY(self) -> int"""
4388 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
4390 def SetCursor(*args
, **kwargs
):
4391 """SetCursor(self, Cursor cursor)"""
4392 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
4394 def GetCursor(*args
, **kwargs
):
4395 """GetCursor(self) -> Cursor"""
4396 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
4398 def HasCursor(*args
, **kwargs
):
4399 """HasCursor(self) -> bool"""
4400 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
4403 class SetCursorEventPtr(SetCursorEvent
):
4404 def __init__(self
, this
):
4406 if not hasattr(self
,"thisown"): self
.thisown
= 0
4407 self
.__class
__ = SetCursorEvent
4408 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
4410 #---------------------------------------------------------------------------
4412 class KeyEvent(Event
):
4413 """Proxy of C++ KeyEvent class"""
4415 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4416 def __init__(self
, *args
, **kwargs
):
4417 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
4418 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
4419 self
.this
= newobj
.this
4422 def ControlDown(*args
, **kwargs
):
4423 """ControlDown(self) -> bool"""
4424 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
4426 def MetaDown(*args
, **kwargs
):
4427 """MetaDown(self) -> bool"""
4428 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
4430 def AltDown(*args
, **kwargs
):
4431 """AltDown(self) -> bool"""
4432 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
4434 def ShiftDown(*args
, **kwargs
):
4435 """ShiftDown(self) -> bool"""
4436 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
4438 def CmdDown(*args
, **kwargs
):
4440 CmdDown(self) -> bool
4442 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4443 platforms but the special "Apple" (a.k.a as "Command") key on
4444 Macs: it makes often sense to use it instead of, say, `ControlDown`
4445 because Cmd key is used for the same thing under Mac as Ctrl
4446 elsewhere. The Ctrl still exists, it's just not used for this
4447 purpose. So for non-Mac platforms this is the same as `ControlDown`
4448 and Macs this is the same as `MetaDown`.
4450 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
4452 def HasModifiers(*args
, **kwargs
):
4453 """HasModifiers(self) -> bool"""
4454 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
4456 def GetKeyCode(*args
, **kwargs
):
4457 """GetKeyCode(self) -> int"""
4458 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
4460 KeyCode
= GetKeyCode
4461 def GetUnicodeKey(*args
, **kwargs
):
4462 """GetUnicodeKey(self) -> int"""
4463 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
4465 GetUniChar
= GetUnicodeKey
4466 def GetRawKeyCode(*args
, **kwargs
):
4467 """GetRawKeyCode(self) -> unsigned int"""
4468 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
4470 def GetRawKeyFlags(*args
, **kwargs
):
4471 """GetRawKeyFlags(self) -> unsigned int"""
4472 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
4474 def GetPosition(*args
, **kwargs
):
4476 GetPosition(self) -> Point
4478 Find the position of the event.
4480 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
4482 def GetPositionTuple(*args
, **kwargs
):
4484 GetPositionTuple() -> (x,y)
4486 Find the position of the event.
4488 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
4490 def GetX(*args
, **kwargs
):
4491 """GetX(self) -> int"""
4492 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
4494 def GetY(*args
, **kwargs
):
4495 """GetY(self) -> int"""
4496 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
4498 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
4499 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
4500 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
4501 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
4502 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
4503 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
4504 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
4505 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
4506 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
4507 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
4509 class KeyEventPtr(KeyEvent
):
4510 def __init__(self
, this
):
4512 if not hasattr(self
,"thisown"): self
.thisown
= 0
4513 self
.__class
__ = KeyEvent
4514 _core_
.KeyEvent_swigregister(KeyEventPtr
)
4516 #---------------------------------------------------------------------------
4518 class SizeEvent(Event
):
4519 """Proxy of C++ SizeEvent class"""
4521 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4522 def __init__(self
, *args
, **kwargs
):
4523 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
4524 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
4525 self
.this
= newobj
.this
4528 def GetSize(*args
, **kwargs
):
4529 """GetSize(self) -> Size"""
4530 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
4532 def GetRect(*args
, **kwargs
):
4533 """GetRect(self) -> Rect"""
4534 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
4536 def SetRect(*args
, **kwargs
):
4537 """SetRect(self, Rect rect)"""
4538 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
4540 def SetSize(*args
, **kwargs
):
4541 """SetSize(self, Size size)"""
4542 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
4544 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
4545 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
4547 class SizeEventPtr(SizeEvent
):
4548 def __init__(self
, this
):
4550 if not hasattr(self
,"thisown"): self
.thisown
= 0
4551 self
.__class
__ = SizeEvent
4552 _core_
.SizeEvent_swigregister(SizeEventPtr
)
4554 #---------------------------------------------------------------------------
4556 class MoveEvent(Event
):
4557 """Proxy of C++ MoveEvent class"""
4559 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4560 def __init__(self
, *args
, **kwargs
):
4561 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
4562 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
4563 self
.this
= newobj
.this
4566 def GetPosition(*args
, **kwargs
):
4567 """GetPosition(self) -> Point"""
4568 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
4570 def GetRect(*args
, **kwargs
):
4571 """GetRect(self) -> Rect"""
4572 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
4574 def SetRect(*args
, **kwargs
):
4575 """SetRect(self, Rect rect)"""
4576 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
4578 def SetPosition(*args
, **kwargs
):
4579 """SetPosition(self, Point pos)"""
4580 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
4582 m_pos
= property(GetPosition
, SetPosition
)
4583 m_rect
= property(GetRect
, SetRect
)
4586 class MoveEventPtr(MoveEvent
):
4587 def __init__(self
, this
):
4589 if not hasattr(self
,"thisown"): self
.thisown
= 0
4590 self
.__class
__ = MoveEvent
4591 _core_
.MoveEvent_swigregister(MoveEventPtr
)
4593 #---------------------------------------------------------------------------
4595 class PaintEvent(Event
):
4596 """Proxy of C++ PaintEvent class"""
4598 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4599 def __init__(self
, *args
, **kwargs
):
4600 """__init__(self, int Id=0) -> PaintEvent"""
4601 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
4602 self
.this
= newobj
.this
4606 class PaintEventPtr(PaintEvent
):
4607 def __init__(self
, this
):
4609 if not hasattr(self
,"thisown"): self
.thisown
= 0
4610 self
.__class
__ = PaintEvent
4611 _core_
.PaintEvent_swigregister(PaintEventPtr
)
4613 class NcPaintEvent(Event
):
4614 """Proxy of C++ NcPaintEvent class"""
4616 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4617 def __init__(self
, *args
, **kwargs
):
4618 """__init__(self, int winid=0) -> NcPaintEvent"""
4619 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
4620 self
.this
= newobj
.this
4624 class NcPaintEventPtr(NcPaintEvent
):
4625 def __init__(self
, this
):
4627 if not hasattr(self
,"thisown"): self
.thisown
= 0
4628 self
.__class
__ = NcPaintEvent
4629 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
4631 #---------------------------------------------------------------------------
4633 class EraseEvent(Event
):
4634 """Proxy of C++ EraseEvent class"""
4636 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4637 def __init__(self
, *args
, **kwargs
):
4638 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4639 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
4640 self
.this
= newobj
.this
4643 def GetDC(*args
, **kwargs
):
4644 """GetDC(self) -> DC"""
4645 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
4648 class EraseEventPtr(EraseEvent
):
4649 def __init__(self
, this
):
4651 if not hasattr(self
,"thisown"): self
.thisown
= 0
4652 self
.__class
__ = EraseEvent
4653 _core_
.EraseEvent_swigregister(EraseEventPtr
)
4655 #---------------------------------------------------------------------------
4657 class FocusEvent(Event
):
4658 """Proxy of C++ FocusEvent class"""
4660 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4661 def __init__(self
, *args
, **kwargs
):
4662 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4663 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
4664 self
.this
= newobj
.this
4667 def GetWindow(*args
, **kwargs
):
4668 """GetWindow(self) -> Window"""
4669 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
4671 def SetWindow(*args
, **kwargs
):
4672 """SetWindow(self, Window win)"""
4673 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
4676 class FocusEventPtr(FocusEvent
):
4677 def __init__(self
, this
):
4679 if not hasattr(self
,"thisown"): self
.thisown
= 0
4680 self
.__class
__ = FocusEvent
4681 _core_
.FocusEvent_swigregister(FocusEventPtr
)
4683 #---------------------------------------------------------------------------
4685 class ChildFocusEvent(CommandEvent
):
4686 """Proxy of C++ ChildFocusEvent class"""
4688 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4689 def __init__(self
, *args
, **kwargs
):
4690 """__init__(self, Window win=None) -> ChildFocusEvent"""
4691 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
4692 self
.this
= newobj
.this
4695 def GetWindow(*args
, **kwargs
):
4696 """GetWindow(self) -> Window"""
4697 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
4700 class ChildFocusEventPtr(ChildFocusEvent
):
4701 def __init__(self
, this
):
4703 if not hasattr(self
,"thisown"): self
.thisown
= 0
4704 self
.__class
__ = ChildFocusEvent
4705 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
4707 #---------------------------------------------------------------------------
4709 class ActivateEvent(Event
):
4710 """Proxy of C++ ActivateEvent class"""
4712 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4713 def __init__(self
, *args
, **kwargs
):
4714 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4715 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
4716 self
.this
= newobj
.this
4719 def GetActive(*args
, **kwargs
):
4720 """GetActive(self) -> bool"""
4721 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
4724 class ActivateEventPtr(ActivateEvent
):
4725 def __init__(self
, this
):
4727 if not hasattr(self
,"thisown"): self
.thisown
= 0
4728 self
.__class
__ = ActivateEvent
4729 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
4731 #---------------------------------------------------------------------------
4733 class InitDialogEvent(Event
):
4734 """Proxy of C++ InitDialogEvent class"""
4736 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4737 def __init__(self
, *args
, **kwargs
):
4738 """__init__(self, int Id=0) -> InitDialogEvent"""
4739 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
4740 self
.this
= newobj
.this
4744 class InitDialogEventPtr(InitDialogEvent
):
4745 def __init__(self
, this
):
4747 if not hasattr(self
,"thisown"): self
.thisown
= 0
4748 self
.__class
__ = InitDialogEvent
4749 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
4751 #---------------------------------------------------------------------------
4753 class MenuEvent(Event
):
4754 """Proxy of C++ MenuEvent class"""
4756 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4757 def __init__(self
, *args
, **kwargs
):
4758 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4759 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
4760 self
.this
= newobj
.this
4763 def GetMenuId(*args
, **kwargs
):
4764 """GetMenuId(self) -> int"""
4765 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
4767 def IsPopup(*args
, **kwargs
):
4768 """IsPopup(self) -> bool"""
4769 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4771 def GetMenu(*args
, **kwargs
):
4772 """GetMenu(self) -> Menu"""
4773 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4776 class MenuEventPtr(MenuEvent
):
4777 def __init__(self
, this
):
4779 if not hasattr(self
,"thisown"): self
.thisown
= 0
4780 self
.__class
__ = MenuEvent
4781 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4783 #---------------------------------------------------------------------------
4785 class CloseEvent(Event
):
4786 """Proxy of C++ CloseEvent class"""
4788 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4789 def __init__(self
, *args
, **kwargs
):
4790 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4791 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4792 self
.this
= newobj
.this
4795 def SetLoggingOff(*args
, **kwargs
):
4796 """SetLoggingOff(self, bool logOff)"""
4797 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4799 def GetLoggingOff(*args
, **kwargs
):
4800 """GetLoggingOff(self) -> bool"""
4801 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4803 def Veto(*args
, **kwargs
):
4804 """Veto(self, bool veto=True)"""
4805 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4807 def SetCanVeto(*args
, **kwargs
):
4808 """SetCanVeto(self, bool canVeto)"""
4809 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4811 def CanVeto(*args
, **kwargs
):
4812 """CanVeto(self) -> bool"""
4813 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4815 def GetVeto(*args
, **kwargs
):
4816 """GetVeto(self) -> bool"""
4817 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4820 class CloseEventPtr(CloseEvent
):
4821 def __init__(self
, this
):
4823 if not hasattr(self
,"thisown"): self
.thisown
= 0
4824 self
.__class
__ = CloseEvent
4825 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4827 #---------------------------------------------------------------------------
4829 class ShowEvent(Event
):
4830 """Proxy of C++ ShowEvent class"""
4832 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4833 def __init__(self
, *args
, **kwargs
):
4834 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4835 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4836 self
.this
= newobj
.this
4839 def SetShow(*args
, **kwargs
):
4840 """SetShow(self, bool show)"""
4841 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4843 def GetShow(*args
, **kwargs
):
4844 """GetShow(self) -> bool"""
4845 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4848 class ShowEventPtr(ShowEvent
):
4849 def __init__(self
, this
):
4851 if not hasattr(self
,"thisown"): self
.thisown
= 0
4852 self
.__class
__ = ShowEvent
4853 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4855 #---------------------------------------------------------------------------
4857 class IconizeEvent(Event
):
4858 """Proxy of C++ IconizeEvent class"""
4860 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4861 def __init__(self
, *args
, **kwargs
):
4862 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4863 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4864 self
.this
= newobj
.this
4867 def Iconized(*args
, **kwargs
):
4868 """Iconized(self) -> bool"""
4869 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4872 class IconizeEventPtr(IconizeEvent
):
4873 def __init__(self
, this
):
4875 if not hasattr(self
,"thisown"): self
.thisown
= 0
4876 self
.__class
__ = IconizeEvent
4877 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4879 #---------------------------------------------------------------------------
4881 class MaximizeEvent(Event
):
4882 """Proxy of C++ MaximizeEvent class"""
4884 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4885 def __init__(self
, *args
, **kwargs
):
4886 """__init__(self, int id=0) -> MaximizeEvent"""
4887 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4888 self
.this
= newobj
.this
4892 class MaximizeEventPtr(MaximizeEvent
):
4893 def __init__(self
, this
):
4895 if not hasattr(self
,"thisown"): self
.thisown
= 0
4896 self
.__class
__ = MaximizeEvent
4897 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4899 #---------------------------------------------------------------------------
4901 class DropFilesEvent(Event
):
4902 """Proxy of C++ DropFilesEvent class"""
4903 def __init__(self
): raise RuntimeError, "No constructor defined"
4905 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4906 def GetPosition(*args
, **kwargs
):
4907 """GetPosition(self) -> Point"""
4908 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4910 def GetNumberOfFiles(*args
, **kwargs
):
4911 """GetNumberOfFiles(self) -> int"""
4912 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4914 def GetFiles(*args
, **kwargs
):
4915 """GetFiles(self) -> PyObject"""
4916 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4919 class DropFilesEventPtr(DropFilesEvent
):
4920 def __init__(self
, this
):
4922 if not hasattr(self
,"thisown"): self
.thisown
= 0
4923 self
.__class
__ = DropFilesEvent
4924 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4926 #---------------------------------------------------------------------------
4928 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4929 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4930 class UpdateUIEvent(CommandEvent
):
4931 """Proxy of C++ UpdateUIEvent class"""
4933 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4934 def __init__(self
, *args
, **kwargs
):
4935 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4936 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4937 self
.this
= newobj
.this
4940 def GetChecked(*args
, **kwargs
):
4941 """GetChecked(self) -> bool"""
4942 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4944 def GetEnabled(*args
, **kwargs
):
4945 """GetEnabled(self) -> bool"""
4946 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4948 def GetText(*args
, **kwargs
):
4949 """GetText(self) -> String"""
4950 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4952 def GetSetText(*args
, **kwargs
):
4953 """GetSetText(self) -> bool"""
4954 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4956 def GetSetChecked(*args
, **kwargs
):
4957 """GetSetChecked(self) -> bool"""
4958 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4960 def GetSetEnabled(*args
, **kwargs
):
4961 """GetSetEnabled(self) -> bool"""
4962 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4964 def Check(*args
, **kwargs
):
4965 """Check(self, bool check)"""
4966 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4968 def Enable(*args
, **kwargs
):
4969 """Enable(self, bool enable)"""
4970 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4972 def SetText(*args
, **kwargs
):
4973 """SetText(self, String text)"""
4974 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4976 def SetUpdateInterval(*args
, **kwargs
):
4977 """SetUpdateInterval(long updateInterval)"""
4978 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4980 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4981 def GetUpdateInterval(*args
, **kwargs
):
4982 """GetUpdateInterval() -> long"""
4983 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4985 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4986 def CanUpdate(*args
, **kwargs
):
4987 """CanUpdate(Window win) -> bool"""
4988 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4990 CanUpdate
= staticmethod(CanUpdate
)
4991 def ResetUpdateTime(*args
, **kwargs
):
4992 """ResetUpdateTime()"""
4993 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4995 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4996 def SetMode(*args
, **kwargs
):
4997 """SetMode(int mode)"""
4998 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
5000 SetMode
= staticmethod(SetMode
)
5001 def GetMode(*args
, **kwargs
):
5002 """GetMode() -> int"""
5003 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
5005 GetMode
= staticmethod(GetMode
)
5007 class UpdateUIEventPtr(UpdateUIEvent
):
5008 def __init__(self
, this
):
5010 if not hasattr(self
,"thisown"): self
.thisown
= 0
5011 self
.__class
__ = UpdateUIEvent
5012 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
5014 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
5015 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
5016 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
5018 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
5019 """UpdateUIEvent_GetUpdateInterval() -> long"""
5020 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
5022 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
5023 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
5024 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
5026 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
5027 """UpdateUIEvent_ResetUpdateTime()"""
5028 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
5030 def UpdateUIEvent_SetMode(*args
, **kwargs
):
5031 """UpdateUIEvent_SetMode(int mode)"""
5032 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
5034 def UpdateUIEvent_GetMode(*args
, **kwargs
):
5035 """UpdateUIEvent_GetMode() -> int"""
5036 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
5038 #---------------------------------------------------------------------------
5040 class SysColourChangedEvent(Event
):
5041 """Proxy of C++ SysColourChangedEvent class"""
5043 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5044 def __init__(self
, *args
, **kwargs
):
5045 """__init__(self) -> SysColourChangedEvent"""
5046 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
5047 self
.this
= newobj
.this
5051 class SysColourChangedEventPtr(SysColourChangedEvent
):
5052 def __init__(self
, this
):
5054 if not hasattr(self
,"thisown"): self
.thisown
= 0
5055 self
.__class
__ = SysColourChangedEvent
5056 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
5058 #---------------------------------------------------------------------------
5060 class MouseCaptureChangedEvent(Event
):
5061 """Proxy of C++ MouseCaptureChangedEvent class"""
5063 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5064 def __init__(self
, *args
, **kwargs
):
5065 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
5066 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
5067 self
.this
= newobj
.this
5070 def GetCapturedWindow(*args
, **kwargs
):
5071 """GetCapturedWindow(self) -> Window"""
5072 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
5075 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
5076 def __init__(self
, this
):
5078 if not hasattr(self
,"thisown"): self
.thisown
= 0
5079 self
.__class
__ = MouseCaptureChangedEvent
5080 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
5082 #---------------------------------------------------------------------------
5084 class DisplayChangedEvent(Event
):
5085 """Proxy of C++ DisplayChangedEvent class"""
5087 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5088 def __init__(self
, *args
, **kwargs
):
5089 """__init__(self) -> DisplayChangedEvent"""
5090 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
5091 self
.this
= newobj
.this
5095 class DisplayChangedEventPtr(DisplayChangedEvent
):
5096 def __init__(self
, this
):
5098 if not hasattr(self
,"thisown"): self
.thisown
= 0
5099 self
.__class
__ = DisplayChangedEvent
5100 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
5102 #---------------------------------------------------------------------------
5104 class PaletteChangedEvent(Event
):
5105 """Proxy of C++ PaletteChangedEvent class"""
5107 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5108 def __init__(self
, *args
, **kwargs
):
5109 """__init__(self, int id=0) -> PaletteChangedEvent"""
5110 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
5111 self
.this
= newobj
.this
5114 def SetChangedWindow(*args
, **kwargs
):
5115 """SetChangedWindow(self, Window win)"""
5116 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
5118 def GetChangedWindow(*args
, **kwargs
):
5119 """GetChangedWindow(self) -> Window"""
5120 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
5123 class PaletteChangedEventPtr(PaletteChangedEvent
):
5124 def __init__(self
, this
):
5126 if not hasattr(self
,"thisown"): self
.thisown
= 0
5127 self
.__class
__ = PaletteChangedEvent
5128 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
5130 #---------------------------------------------------------------------------
5132 class QueryNewPaletteEvent(Event
):
5133 """Proxy of C++ QueryNewPaletteEvent class"""
5135 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5136 def __init__(self
, *args
, **kwargs
):
5137 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
5138 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
5139 self
.this
= newobj
.this
5142 def SetPaletteRealized(*args
, **kwargs
):
5143 """SetPaletteRealized(self, bool realized)"""
5144 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
5146 def GetPaletteRealized(*args
, **kwargs
):
5147 """GetPaletteRealized(self) -> bool"""
5148 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
5151 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
5152 def __init__(self
, this
):
5154 if not hasattr(self
,"thisown"): self
.thisown
= 0
5155 self
.__class
__ = QueryNewPaletteEvent
5156 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
5158 #---------------------------------------------------------------------------
5160 class NavigationKeyEvent(Event
):
5161 """Proxy of C++ NavigationKeyEvent class"""
5163 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5164 def __init__(self
, *args
, **kwargs
):
5165 """__init__(self) -> NavigationKeyEvent"""
5166 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
5167 self
.this
= newobj
.this
5170 def GetDirection(*args
, **kwargs
):
5171 """GetDirection(self) -> bool"""
5172 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
5174 def SetDirection(*args
, **kwargs
):
5175 """SetDirection(self, bool forward)"""
5176 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
5178 def IsWindowChange(*args
, **kwargs
):
5179 """IsWindowChange(self) -> bool"""
5180 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
5182 def SetWindowChange(*args
, **kwargs
):
5183 """SetWindowChange(self, bool ischange)"""
5184 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
5186 def IsFromTab(*args
, **kwargs
):
5187 """IsFromTab(self) -> bool"""
5188 return _core_
.NavigationKeyEvent_IsFromTab(*args
, **kwargs
)
5190 def SetFromTab(*args
, **kwargs
):
5191 """SetFromTab(self, bool bIs)"""
5192 return _core_
.NavigationKeyEvent_SetFromTab(*args
, **kwargs
)
5194 def SetFlags(*args
, **kwargs
):
5195 """SetFlags(self, long flags)"""
5196 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
5198 def GetCurrentFocus(*args
, **kwargs
):
5199 """GetCurrentFocus(self) -> Window"""
5200 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
5202 def SetCurrentFocus(*args
, **kwargs
):
5203 """SetCurrentFocus(self, Window win)"""
5204 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
5206 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
5207 IsForward
= _core_
.NavigationKeyEvent_IsForward
5208 WinChange
= _core_
.NavigationKeyEvent_WinChange
5209 FromTab
= _core_
.NavigationKeyEvent_FromTab
5211 class NavigationKeyEventPtr(NavigationKeyEvent
):
5212 def __init__(self
, this
):
5214 if not hasattr(self
,"thisown"): self
.thisown
= 0
5215 self
.__class
__ = NavigationKeyEvent
5216 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
5218 #---------------------------------------------------------------------------
5220 class WindowCreateEvent(CommandEvent
):
5221 """Proxy of C++ WindowCreateEvent class"""
5223 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5224 def __init__(self
, *args
, **kwargs
):
5225 """__init__(self, Window win=None) -> WindowCreateEvent"""
5226 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
5227 self
.this
= newobj
.this
5230 def GetWindow(*args
, **kwargs
):
5231 """GetWindow(self) -> Window"""
5232 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
5235 class WindowCreateEventPtr(WindowCreateEvent
):
5236 def __init__(self
, this
):
5238 if not hasattr(self
,"thisown"): self
.thisown
= 0
5239 self
.__class
__ = WindowCreateEvent
5240 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
5242 class WindowDestroyEvent(CommandEvent
):
5243 """Proxy of C++ WindowDestroyEvent class"""
5245 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5246 def __init__(self
, *args
, **kwargs
):
5247 """__init__(self, Window win=None) -> WindowDestroyEvent"""
5248 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
5249 self
.this
= newobj
.this
5252 def GetWindow(*args
, **kwargs
):
5253 """GetWindow(self) -> Window"""
5254 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
5257 class WindowDestroyEventPtr(WindowDestroyEvent
):
5258 def __init__(self
, this
):
5260 if not hasattr(self
,"thisown"): self
.thisown
= 0
5261 self
.__class
__ = WindowDestroyEvent
5262 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
5264 #---------------------------------------------------------------------------
5266 class ContextMenuEvent(CommandEvent
):
5267 """Proxy of C++ ContextMenuEvent class"""
5269 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5270 def __init__(self
, *args
, **kwargs
):
5271 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
5272 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
5273 self
.this
= newobj
.this
5276 def GetPosition(*args
, **kwargs
):
5277 """GetPosition(self) -> Point"""
5278 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
5280 def SetPosition(*args
, **kwargs
):
5281 """SetPosition(self, Point pos)"""
5282 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
5285 class ContextMenuEventPtr(ContextMenuEvent
):
5286 def __init__(self
, this
):
5288 if not hasattr(self
,"thisown"): self
.thisown
= 0
5289 self
.__class
__ = ContextMenuEvent
5290 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
5292 #---------------------------------------------------------------------------
5294 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
5295 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
5296 class IdleEvent(Event
):
5297 """Proxy of C++ IdleEvent class"""
5299 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5300 def __init__(self
, *args
, **kwargs
):
5301 """__init__(self) -> IdleEvent"""
5302 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
5303 self
.this
= newobj
.this
5306 def RequestMore(*args
, **kwargs
):
5307 """RequestMore(self, bool needMore=True)"""
5308 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
5310 def MoreRequested(*args
, **kwargs
):
5311 """MoreRequested(self) -> bool"""
5312 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
5314 def SetMode(*args
, **kwargs
):
5315 """SetMode(int mode)"""
5316 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
5318 SetMode
= staticmethod(SetMode
)
5319 def GetMode(*args
, **kwargs
):
5320 """GetMode() -> int"""
5321 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
5323 GetMode
= staticmethod(GetMode
)
5324 def CanSend(*args
, **kwargs
):
5325 """CanSend(Window win) -> bool"""
5326 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
5328 CanSend
= staticmethod(CanSend
)
5330 class IdleEventPtr(IdleEvent
):
5331 def __init__(self
, this
):
5333 if not hasattr(self
,"thisown"): self
.thisown
= 0
5334 self
.__class
__ = IdleEvent
5335 _core_
.IdleEvent_swigregister(IdleEventPtr
)
5337 def IdleEvent_SetMode(*args
, **kwargs
):
5338 """IdleEvent_SetMode(int mode)"""
5339 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
5341 def IdleEvent_GetMode(*args
, **kwargs
):
5342 """IdleEvent_GetMode() -> int"""
5343 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
5345 def IdleEvent_CanSend(*args
, **kwargs
):
5346 """IdleEvent_CanSend(Window win) -> bool"""
5347 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
5349 #---------------------------------------------------------------------------
5351 class PyEvent(Event
):
5352 """Proxy of C++ PyEvent class"""
5354 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5355 def __init__(self
, *args
, **kwargs
):
5356 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
5357 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
5358 self
.this
= newobj
.this
5363 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
5366 if self
.thisown
: destroy(self
)
5369 def SetSelf(*args
, **kwargs
):
5370 """SetSelf(self, PyObject self)"""
5371 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
5373 def GetSelf(*args
, **kwargs
):
5374 """GetSelf(self) -> PyObject"""
5375 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
5378 class PyEventPtr(PyEvent
):
5379 def __init__(self
, this
):
5381 if not hasattr(self
,"thisown"): self
.thisown
= 0
5382 self
.__class
__ = PyEvent
5383 _core_
.PyEvent_swigregister(PyEventPtr
)
5385 class PyCommandEvent(CommandEvent
):
5386 """Proxy of C++ PyCommandEvent class"""
5388 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5389 def __init__(self
, *args
, **kwargs
):
5390 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
5391 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
5392 self
.this
= newobj
.this
5397 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
5400 if self
.thisown
: destroy(self
)
5403 def SetSelf(*args
, **kwargs
):
5404 """SetSelf(self, PyObject self)"""
5405 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
5407 def GetSelf(*args
, **kwargs
):
5408 """GetSelf(self) -> PyObject"""
5409 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
5412 class PyCommandEventPtr(PyCommandEvent
):
5413 def __init__(self
, this
):
5415 if not hasattr(self
,"thisown"): self
.thisown
= 0
5416 self
.__class
__ = PyCommandEvent
5417 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
5419 class DateEvent(CommandEvent
):
5420 """Proxy of C++ DateEvent class"""
5422 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5423 def __init__(self
, *args
, **kwargs
):
5424 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
5425 newobj
= _core_
.new_DateEvent(*args
, **kwargs
)
5426 self
.this
= newobj
.this
5429 def GetDate(*args
, **kwargs
):
5430 """GetDate(self) -> DateTime"""
5431 return _core_
.DateEvent_GetDate(*args
, **kwargs
)
5433 def SetDate(*args
, **kwargs
):
5434 """SetDate(self, DateTime date)"""
5435 return _core_
.DateEvent_SetDate(*args
, **kwargs
)
5438 class DateEventPtr(DateEvent
):
5439 def __init__(self
, this
):
5441 if not hasattr(self
,"thisown"): self
.thisown
= 0
5442 self
.__class
__ = DateEvent
5443 _core_
.DateEvent_swigregister(DateEventPtr
)
5445 wxEVT_DATE_CHANGED
= _core_
.wxEVT_DATE_CHANGED
5446 EVT_DATE_CHANGED
= wx
.PyEventBinder( wxEVT_DATE_CHANGED
, 1 )
5448 #---------------------------------------------------------------------------
5450 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
5451 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
5452 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
5453 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
5454 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
5455 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
5456 class PyApp(EvtHandler
):
5458 The ``wx.PyApp`` class is an *implementation detail*, please use the
5459 `wx.App` class (or some other derived class) instead.
5462 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5463 def __init__(self
, *args
, **kwargs
):
5465 __init__(self) -> PyApp
5467 Create a new application object, starting the bootstrap process.
5469 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
5470 self
.this
= newobj
.this
5473 self
._setCallbackInfo
(self
, PyApp
, False)
5474 self
._setOORInfo
(self
, False)
5476 def __del__(self
, destroy
=_core_
.delete_PyApp
):
5479 if self
.thisown
: destroy(self
)
5482 def _setCallbackInfo(*args
, **kwargs
):
5483 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
5484 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
5486 def GetAppName(*args
, **kwargs
):
5488 GetAppName(self) -> String
5490 Get the application name.
5492 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
5494 def SetAppName(*args
, **kwargs
):
5496 SetAppName(self, String name)
5498 Set the application name. This value may be used automatically by
5499 `wx.Config` and such.
5501 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
5503 def GetClassName(*args
, **kwargs
):
5505 GetClassName(self) -> String
5507 Get the application's class name.
5509 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
5511 def SetClassName(*args
, **kwargs
):
5513 SetClassName(self, String name)
5515 Set the application's class name. This value may be used for
5516 X-resources if applicable for the platform
5518 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
5520 def GetVendorName(*args
, **kwargs
):
5522 GetVendorName(self) -> String
5524 Get the application's vendor name.
5526 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
5528 def SetVendorName(*args
, **kwargs
):
5530 SetVendorName(self, String name)
5532 Set the application's vendor name. This value may be used
5533 automatically by `wx.Config` and such.
5535 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
5537 def GetTraits(*args
, **kwargs
):
5539 GetTraits(self) -> wxAppTraits
5541 Return (and create if necessary) the app traits object to which we
5542 delegate for everything which either should be configurable by the
5543 user (then he can change the default behaviour simply by overriding
5544 CreateTraits() and returning his own traits object) or which is
5545 GUI/console dependent as then wx.AppTraits allows us to abstract the
5546 differences behind the common facade.
5548 :todo: Add support for overriding CreateAppTraits in wxPython.
5550 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
5552 def ProcessPendingEvents(*args
, **kwargs
):
5554 ProcessPendingEvents(self)
5556 Process all events in the Pending Events list -- it is necessary to
5557 call this function to process posted events. This normally happens
5558 during each event loop iteration.
5560 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
5562 def Yield(*args
, **kwargs
):
5564 Yield(self, bool onlyIfNeeded=False) -> bool
5566 Process all currently pending events right now, instead of waiting
5567 until return to the event loop. It is an error to call ``Yield``
5568 recursively unless the value of ``onlyIfNeeded`` is True.
5570 :warning: This function is dangerous as it can lead to unexpected
5571 reentrancies (i.e. when called from an event handler it may
5572 result in calling the same event handler again), use with
5573 extreme care or, better, don't use at all!
5575 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
5578 return _core_
.PyApp_Yield(*args
, **kwargs
)
5580 def WakeUpIdle(*args
, **kwargs
):
5584 Make sure that idle events are sent again.
5585 :see: `wx.WakeUpIdle`
5587 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
5589 def IsMainLoopRunning(*args
, **kwargs
):
5591 IsMainLoopRunning() -> bool
5593 Returns True if we're running the main loop, i.e. if the events can
5594 currently be dispatched.
5596 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5598 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
5599 def MainLoop(*args
, **kwargs
):
5601 MainLoop(self) -> int
5603 Execute the main GUI loop, the function doesn't normally return until
5604 all top level windows have been closed and destroyed.
5606 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
5608 def Exit(*args
, **kwargs
):
5612 Exit the main loop thus terminating the application.
5615 return _core_
.PyApp_Exit(*args
, **kwargs
)
5617 def ExitMainLoop(*args
, **kwargs
):
5621 Exit the main GUI loop during the next iteration of the main
5622 loop, (i.e. it does not stop the program immediately!)
5624 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
5626 def Pending(*args
, **kwargs
):
5628 Pending(self) -> bool
5630 Returns True if there are unprocessed events in the event queue.
5632 return _core_
.PyApp_Pending(*args
, **kwargs
)
5634 def Dispatch(*args
, **kwargs
):
5636 Dispatch(self) -> bool
5638 Process the first event in the event queue (blocks until an event
5639 appears if there are none currently)
5641 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
5643 def ProcessIdle(*args
, **kwargs
):
5645 ProcessIdle(self) -> bool
5647 Called from the MainLoop when the application becomes idle (there are
5648 no pending events) and sends a `wx.IdleEvent` to all interested
5649 parties. Returns True if more idle events are needed, False if not.
5651 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
5653 def SendIdleEvents(*args
, **kwargs
):
5655 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5657 Send idle event to window and all subwindows. Returns True if more
5658 idle time is requested.
5660 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
5662 def IsActive(*args
, **kwargs
):
5664 IsActive(self) -> bool
5666 Return True if our app has focus.
5668 return _core_
.PyApp_IsActive(*args
, **kwargs
)
5670 def SetTopWindow(*args
, **kwargs
):
5672 SetTopWindow(self, Window win)
5674 Set the *main* top level window
5676 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
5678 def GetTopWindow(*args
, **kwargs
):
5680 GetTopWindow(self) -> Window
5682 Return the *main* top level window (if it hadn't been set previously
5683 with SetTopWindow(), will return just some top level window and, if
5684 there not any, will return None)
5686 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
5688 def SetExitOnFrameDelete(*args
, **kwargs
):
5690 SetExitOnFrameDelete(self, bool flag)
5692 Control the exit behaviour: by default, the program will exit the main
5693 loop (and so, usually, terminate) when the last top-level program
5694 window is deleted. Beware that if you disable this behaviour (with
5695 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5696 explicitly from somewhere.
5698 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
5700 def GetExitOnFrameDelete(*args
, **kwargs
):
5702 GetExitOnFrameDelete(self) -> bool
5704 Get the current exit behaviour setting.
5706 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
5708 def SetUseBestVisual(*args
, **kwargs
):
5710 SetUseBestVisual(self, bool flag)
5712 Set whether the app should try to use the best available visual on
5713 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5715 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
5717 def GetUseBestVisual(*args
, **kwargs
):
5719 GetUseBestVisual(self) -> bool
5721 Get current UseBestVisual setting.
5723 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
5725 def SetPrintMode(*args
, **kwargs
):
5726 """SetPrintMode(self, int mode)"""
5727 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
5729 def GetPrintMode(*args
, **kwargs
):
5730 """GetPrintMode(self) -> int"""
5731 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
5733 def SetAssertMode(*args
, **kwargs
):
5735 SetAssertMode(self, int mode)
5737 Set the OnAssert behaviour for debug and hybrid builds.
5739 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
5741 def GetAssertMode(*args
, **kwargs
):
5743 GetAssertMode(self) -> int
5745 Get the current OnAssert behaviour setting.
5747 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
5749 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5750 """GetMacSupportPCMenuShortcuts() -> bool"""
5751 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5753 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
5754 def GetMacAboutMenuItemId(*args
, **kwargs
):
5755 """GetMacAboutMenuItemId() -> long"""
5756 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5758 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
5759 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
5760 """GetMacPreferencesMenuItemId() -> long"""
5761 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5763 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
5764 def GetMacExitMenuItemId(*args
, **kwargs
):
5765 """GetMacExitMenuItemId() -> long"""
5766 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5768 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
5769 def GetMacHelpMenuTitleName(*args
, **kwargs
):
5770 """GetMacHelpMenuTitleName() -> String"""
5771 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5773 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
5774 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5775 """SetMacSupportPCMenuShortcuts(bool val)"""
5776 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5778 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
5779 def SetMacAboutMenuItemId(*args
, **kwargs
):
5780 """SetMacAboutMenuItemId(long val)"""
5781 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5783 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
5784 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
5785 """SetMacPreferencesMenuItemId(long val)"""
5786 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5788 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
5789 def SetMacExitMenuItemId(*args
, **kwargs
):
5790 """SetMacExitMenuItemId(long val)"""
5791 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5793 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
5794 def SetMacHelpMenuTitleName(*args
, **kwargs
):
5795 """SetMacHelpMenuTitleName(String val)"""
5796 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5798 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
5799 def _BootstrapApp(*args
, **kwargs
):
5803 For internal use only
5805 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
5807 def GetComCtl32Version(*args
, **kwargs
):
5809 GetComCtl32Version() -> int
5811 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5812 it wasn't found at all. Raises an exception on non-Windows platforms.
5814 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5816 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
5818 class PyAppPtr(PyApp
):
5819 def __init__(self
, this
):
5821 if not hasattr(self
,"thisown"): self
.thisown
= 0
5822 self
.__class
__ = PyApp
5823 _core_
.PyApp_swigregister(PyAppPtr
)
5825 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5827 PyApp_IsMainLoopRunning() -> bool
5829 Returns True if we're running the main loop, i.e. if the events can
5830 currently be dispatched.
5832 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5834 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5835 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5836 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5838 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5839 """PyApp_GetMacAboutMenuItemId() -> long"""
5840 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5842 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5843 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5844 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5846 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5847 """PyApp_GetMacExitMenuItemId() -> long"""
5848 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5850 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5851 """PyApp_GetMacHelpMenuTitleName() -> String"""
5852 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5854 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5855 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5856 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5858 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5859 """PyApp_SetMacAboutMenuItemId(long val)"""
5860 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5862 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5863 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5864 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5866 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5867 """PyApp_SetMacExitMenuItemId(long val)"""
5868 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5870 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5871 """PyApp_SetMacHelpMenuTitleName(String val)"""
5872 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5874 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5876 PyApp_GetComCtl32Version() -> int
5878 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5879 it wasn't found at all. Raises an exception on non-Windows platforms.
5881 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5883 #---------------------------------------------------------------------------
5886 def Exit(*args
, **kwargs
):
5890 Force an exit of the application. Convenience for wx.GetApp().Exit()
5892 return _core_
.Exit(*args
, **kwargs
)
5894 def Yield(*args
, **kwargs
):
5898 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5900 return _core_
.Yield(*args
, **kwargs
)
5902 def YieldIfNeeded(*args
, **kwargs
):
5904 YieldIfNeeded() -> bool
5906 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5908 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5910 def SafeYield(*args
, **kwargs
):
5912 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5914 This function is similar to `wx.Yield`, except that it disables the
5915 user input to all program windows before calling `wx.Yield` and
5916 re-enables it again afterwards. If ``win`` is not None, this window
5917 will remain enabled, allowing the implementation of some limited user
5920 :Returns: the result of the call to `wx.Yield`.
5922 return _core_
.SafeYield(*args
, **kwargs
)
5924 def WakeUpIdle(*args
, **kwargs
):
5928 Cause the message queue to become empty again, so idle events will be
5931 return _core_
.WakeUpIdle(*args
, **kwargs
)
5933 def PostEvent(*args
, **kwargs
):
5935 PostEvent(EvtHandler dest, Event event)
5937 Send an event to a window or other wx.EvtHandler to be processed
5940 return _core_
.PostEvent(*args
, **kwargs
)
5942 def App_CleanUp(*args
, **kwargs
):
5946 For internal use only, it is used to cleanup after wxWidgets when
5949 return _core_
.App_CleanUp(*args
, **kwargs
)
5951 def GetApp(*args
, **kwargs
):
5955 Return a reference to the current wx.App object.
5957 return _core_
.GetApp(*args
, **kwargs
)
5959 def SetDefaultPyEncoding(*args
, **kwargs
):
5961 SetDefaultPyEncoding(string encoding)
5963 Sets the encoding that wxPython will use when it needs to convert a
5964 Python string or unicode object to or from a wxString.
5966 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5967 but please be aware that the default encoding within the same locale
5968 may be slightly different on different platforms. For example, please
5969 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5970 between the common latin/roman encodings.
5972 return _core_
.SetDefaultPyEncoding(*args
, **kwargs
)
5974 def GetDefaultPyEncoding(*args
, **kwargs
):
5976 GetDefaultPyEncoding() -> string
5978 Gets the current encoding that wxPython will use when it needs to
5979 convert a Python string or unicode object to or from a wxString.
5981 return _core_
.GetDefaultPyEncoding(*args
, **kwargs
)
5982 #----------------------------------------------------------------------
5984 class PyOnDemandOutputWindow
:
5986 A class that can be used for redirecting Python's stdout and
5987 stderr streams. It will do nothing until something is wrriten to
5988 the stream at which point it will create a Frame with a text area
5989 and write the text there.
5991 def __init__(self
, title
= "wxPython: stdout/stderr"):
5994 self
.pos
= wx
.DefaultPosition
5995 self
.size
= (450, 300)
5998 def SetParent(self
, parent
):
5999 """Set the window to be used as the popup Frame's parent."""
6000 self
.parent
= parent
6003 def CreateOutputWindow(self
, st
):
6004 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
6005 style
=wx
.DEFAULT_FRAME_STYLE
)
6006 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
6007 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
6008 self
.text
.AppendText(st
)
6009 self
.frame
.Show(True)
6010 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
6013 def OnCloseWindow(self
, event
):
6014 if self
.frame
is not None:
6015 self
.frame
.Destroy()
6020 # These methods provide the file-like output behaviour.
6021 def write(self
, text
):
6023 Create the output window if needed and write the string to it.
6024 If not called in the context of the gui thread then uses
6025 CallAfter to do the work there.
6027 if self
.frame
is None:
6028 if not wx
.Thread_IsMain():
6029 wx
.CallAfter(self
.CreateOutputWindow
, text
)
6031 self
.CreateOutputWindow(text
)
6033 if not wx
.Thread_IsMain():
6034 wx
.CallAfter(self
.text
.AppendText
, text
)
6036 self
.text
.AppendText(text
)
6040 if self
.frame
is not None:
6041 wx
.CallAfter(self
.frame
.Close
)
6049 #----------------------------------------------------------------------
6051 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
6053 class App(wx
.PyApp
):
6055 The ``wx.App`` class represents the application and is used to:
6057 * bootstrap the wxPython system and initialize the underlying
6059 * set and get application-wide properties
6060 * implement the windowing system main message or event loop,
6061 and to dispatch events to window instances
6064 Every application must have a ``wx.App`` instance, and all
6065 creation of UI objects should be delayed until after the
6066 ``wx.App`` object has been created in order to ensure that the gui
6067 platform and wxWidgets have been fully initialized.
6069 Normally you would derive from this class and implement an
6070 ``OnInit`` method that creates a frame and then calls
6071 ``self.SetTopWindow(frame)``.
6073 :see: `wx.PySimpleApp` for a simpler app class that can be used
6077 outputWindowClass
= PyOnDemandOutputWindow
6079 def __init__(self
, redirect
=_defRedirect
, filename
=None,
6080 useBestVisual
=False, clearSigInt
=True):
6082 Construct a ``wx.App`` object.
6084 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
6085 redirected? Defaults to True on Windows and Mac, False
6086 otherwise. If `filename` is None then output will be
6087 redirected to a window that pops up as needed. (You can
6088 control what kind of window is created for the output by
6089 resetting the class variable ``outputWindowClass`` to a
6090 class of your choosing.)
6092 :param filename: The name of a file to redirect output to, if
6095 :param useBestVisual: Should the app try to use the best
6096 available visual provided by the system (only relevant on
6097 systems that have more than one visual.) This parameter
6098 must be used instead of calling `SetUseBestVisual` later
6099 on because it must be set before the underlying GUI
6100 toolkit is initialized.
6102 :param clearSigInt: Should SIGINT be cleared? This allows the
6103 app to terminate upon a Ctrl-C in the console like other
6106 :note: You should override OnInit to do applicaition
6107 initialization to ensure that the system, toolkit and
6108 wxWidgets are fully initialized.
6110 wx
.PyApp
.__init
__(self
)
6112 if wx
.Platform
== "__WXMAC__":
6115 if not MacOS
.WMAvailable():
6117 This program needs access to the screen. Please run with 'pythonw',
6118 not 'python', and only when you are logged in on the main display of
6126 # This has to be done before OnInit
6127 self
.SetUseBestVisual(useBestVisual
)
6129 # Set the default handler for SIGINT. This fixes a problem
6130 # where if Ctrl-C is pressed in the console that started this
6131 # app then it will not appear to do anything, (not even send
6132 # KeyboardInterrupt???) but will later segfault on exit. By
6133 # setting the default handler then the app will exit, as
6134 # expected (depending on platform.)
6138 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
6142 # Save and redirect the stdio to a window?
6143 self
.stdioWin
= None
6144 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
6146 self
.RedirectStdio(filename
)
6148 # Use Python's install prefix as the default
6149 wx
.StandardPaths
.Get().SetInstallPrefix(_sys
.prefix
)
6151 # This finishes the initialization of wxWindows and then calls
6152 # the OnInit that should be present in the derived class
6153 self
._BootstrapApp
()
6156 def __del__(self
, destroy
=wx
.PyApp
.__del
__):
6157 self
.RestoreStdio() # Just in case the MainLoop was overridden
6161 wx
.PyApp
.Destroy(self
)
6164 def SetTopWindow(self
, frame
):
6165 """Set the \"main\" top level window"""
6167 self
.stdioWin
.SetParent(frame
)
6168 wx
.PyApp
.SetTopWindow(self
, frame
)
6172 """Execute the main GUI event loop"""
6173 wx
.PyApp
.MainLoop(self
)
6177 def RedirectStdio(self
, filename
=None):
6178 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
6180 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
6182 self
.stdioWin
= self
.outputWindowClass()
6183 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
6186 def RestoreStdio(self
):
6188 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
6193 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
6195 Set the title, position and/or size of the output window if
6196 the stdio has been redirected. This should be called before
6197 any output would cause the output window to be created.
6200 if title
is not None:
6201 self
.stdioWin
.title
= title
6203 self
.stdioWin
.pos
= pos
6204 if size
is not None:
6205 self
.stdioWin
.size
= size
6210 # change from wx.PyApp_XX to wx.App_XX
6211 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
6212 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
6213 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
6214 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
6215 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
6216 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
6217 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
6218 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
6219 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
6220 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
6221 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
6223 #----------------------------------------------------------------------------
6225 class PySimpleApp(wx
.App
):
6227 A simple application class. You can just create one of these and
6228 then then make your top level windows later, and not have to worry
6229 about OnInit. For example::
6231 app = wx.PySimpleApp()
6232 frame = wx.Frame(None, title='Hello World')
6239 def __init__(self
, redirect
=False, filename
=None,
6240 useBestVisual
=False, clearSigInt
=True):
6242 :see: `wx.App.__init__`
6244 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
6251 # Is anybody using this one?
6252 class PyWidgetTester(wx
.App
):
6253 def __init__(self
, size
= (250, 100)):
6255 wx
.App
.__init
__(self
, 0)
6258 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
6259 self
.SetTopWindow(self
.frame
)
6262 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
6263 w
= widgetClass(self
.frame
, *args
, **kwargs
)
6264 self
.frame
.Show(True)
6266 #----------------------------------------------------------------------------
6267 # DO NOT hold any other references to this object. This is how we
6268 # know when to cleanup system resources that wxWidgets is holding. When
6269 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
6270 # goes to zero and it calls the wx.App_CleanUp function.
6272 class __wxPyCleanup
:
6274 self
.cleanup
= _core_
.App_CleanUp
6278 _sys
.__wxPythonCleanup
= __wxPyCleanup()
6280 ## # another possible solution, but it gets called too early...
6282 ## atexit.register(_core_.wxApp_CleanUp)
6285 #----------------------------------------------------------------------------
6287 #---------------------------------------------------------------------------
6289 class EventLoop(object):
6290 """Proxy of C++ EventLoop class"""
6292 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
6293 def __init__(self
, *args
, **kwargs
):
6294 """__init__(self) -> EventLoop"""
6295 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
6296 self
.this
= newobj
.this
6299 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
6302 if self
.thisown
: destroy(self
)
6305 def Run(*args
, **kwargs
):
6306 """Run(self) -> int"""
6307 return _core_
.EventLoop_Run(*args
, **kwargs
)
6309 def Exit(*args
, **kwargs
):
6310 """Exit(self, int rc=0)"""
6311 return _core_
.EventLoop_Exit(*args
, **kwargs
)
6313 def Pending(*args
, **kwargs
):
6314 """Pending(self) -> bool"""
6315 return _core_
.EventLoop_Pending(*args
, **kwargs
)
6317 def Dispatch(*args
, **kwargs
):
6318 """Dispatch(self) -> bool"""
6319 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
6321 def IsRunning(*args
, **kwargs
):
6322 """IsRunning(self) -> bool"""
6323 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
6325 def GetActive(*args
, **kwargs
):
6326 """GetActive() -> EventLoop"""
6327 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
6329 GetActive
= staticmethod(GetActive
)
6330 def SetActive(*args
, **kwargs
):
6331 """SetActive(EventLoop loop)"""
6332 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
6334 SetActive
= staticmethod(SetActive
)
6336 class EventLoopPtr(EventLoop
):
6337 def __init__(self
, this
):
6339 if not hasattr(self
,"thisown"): self
.thisown
= 0
6340 self
.__class
__ = EventLoop
6341 _core_
.EventLoop_swigregister(EventLoopPtr
)
6343 def EventLoop_GetActive(*args
, **kwargs
):
6344 """EventLoop_GetActive() -> EventLoop"""
6345 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
6347 def EventLoop_SetActive(*args
, **kwargs
):
6348 """EventLoop_SetActive(EventLoop loop)"""
6349 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
6351 #---------------------------------------------------------------------------
6353 class AcceleratorEntry(object):
6355 A class used to define items in an `wx.AcceleratorTable`. wxPython
6356 programs can choose to use wx.AcceleratorEntry objects, but using a
6357 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
6358 as well. See `__init__` for of the tuple values.
6360 :see: `wx.AcceleratorTable`
6363 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
6364 def __init__(self
, *args
, **kwargs
):
6366 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
6368 Construct a wx.AcceleratorEntry.
6370 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
6371 self
.this
= newobj
.this
6374 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
6377 if self
.thisown
: destroy(self
)
6380 def Set(*args
, **kwargs
):
6382 Set(self, int flags, int keyCode, int cmd)
6384 (Re)set the attributes of a wx.AcceleratorEntry.
6387 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
6389 def GetFlags(*args
, **kwargs
):
6391 GetFlags(self) -> int
6393 Get the AcceleratorEntry's flags.
6395 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
6397 def GetKeyCode(*args
, **kwargs
):
6399 GetKeyCode(self) -> int
6401 Get the AcceleratorEntry's keycode.
6403 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
6405 def GetCommand(*args
, **kwargs
):
6407 GetCommand(self) -> int
6409 Get the AcceleratorEntry's command ID.
6411 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
6414 class AcceleratorEntryPtr(AcceleratorEntry
):
6415 def __init__(self
, this
):
6417 if not hasattr(self
,"thisown"): self
.thisown
= 0
6418 self
.__class
__ = AcceleratorEntry
6419 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
6421 class AcceleratorTable(Object
):
6423 An accelerator table allows the application to specify a table of
6424 keyboard shortcuts for menus or other commands. On Windows, menu or
6425 button commands are supported; on GTK, only menu commands are
6429 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
6430 def __init__(self
, *args
, **kwargs
):
6432 __init__(entries) -> AcceleratorTable
6434 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
6435 items or or of 3-tuples (flags, keyCode, cmdID)
6437 :see: `wx.AcceleratorEntry`
6439 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
6440 self
.this
= newobj
.this
6443 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
6446 if self
.thisown
: destroy(self
)
6449 def Ok(*args
, **kwargs
):
6450 """Ok(self) -> bool"""
6451 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
6454 class AcceleratorTablePtr(AcceleratorTable
):
6455 def __init__(self
, this
):
6457 if not hasattr(self
,"thisown"): self
.thisown
= 0
6458 self
.__class
__ = AcceleratorTable
6459 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
6462 def GetAccelFromString(*args
, **kwargs
):
6463 """GetAccelFromString(String label) -> AcceleratorEntry"""
6464 return _core_
.GetAccelFromString(*args
, **kwargs
)
6465 #---------------------------------------------------------------------------
6467 class VisualAttributes(object):
6468 """struct containing all the visual attributes of a control"""
6470 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
6471 def __init__(self
, *args
, **kwargs
):
6473 __init__(self) -> VisualAttributes
6475 struct containing all the visual attributes of a control
6477 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
6478 self
.this
= newobj
.this
6481 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
6484 if self
.thisown
: destroy(self
)
6487 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
6488 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
6489 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
6491 class VisualAttributesPtr(VisualAttributes
):
6492 def __init__(self
, this
):
6494 if not hasattr(self
,"thisown"): self
.thisown
= 0
6495 self
.__class
__ = VisualAttributes
6496 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
6497 NullAcceleratorTable
= cvar
.NullAcceleratorTable
6498 PanelNameStr
= cvar
.PanelNameStr
6500 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
6501 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
6502 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
6503 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
6504 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
6505 class Window(EvtHandler
):
6507 wx.Window is the base class for all windows and represents any visible
6508 object on the screen. All controls, top level windows and so on are
6509 wx.Windows. Sizers and device contexts are not however, as they don't
6510 appear on screen themselves.
6514 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
6515 def __init__(self
, *args
, **kwargs
):
6517 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
6518 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
6520 Construct and show a generic Window.
6522 newobj
= _core_
.new_Window(*args
, **kwargs
)
6523 self
.this
= newobj
.this
6526 self
._setOORInfo
(self
)
6528 def Create(*args
, **kwargs
):
6530 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
6531 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
6533 Create the GUI part of the Window for 2-phase creation mode.
6535 return _core_
.Window_Create(*args
, **kwargs
)
6537 def Close(*args
, **kwargs
):
6539 Close(self, bool force=False) -> bool
6541 This function simply generates a EVT_CLOSE event whose handler usually
6542 tries to close the window. It doesn't close the window itself,
6543 however. If force is False (the default) then the window's close
6544 handler will be allowed to veto the destruction of the window.
6546 return _core_
.Window_Close(*args
, **kwargs
)
6548 def Destroy(*args
, **kwargs
):
6550 Destroy(self) -> bool
6552 Destroys the window safely. Frames and dialogs are not destroyed
6553 immediately when this function is called -- they are added to a list
6554 of windows to be deleted on idle time, when all the window's events
6555 have been processed. This prevents problems with events being sent to
6556 non-existent windows.
6558 Returns True if the window has either been successfully deleted, or it
6559 has been added to the list of windows pending real deletion.
6561 return _core_
.Window_Destroy(*args
, **kwargs
)
6563 def DestroyChildren(*args
, **kwargs
):
6565 DestroyChildren(self) -> bool
6567 Destroys all children of a window. Called automatically by the
6570 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
6572 def IsBeingDeleted(*args
, **kwargs
):
6574 IsBeingDeleted(self) -> bool
6576 Is the window in the process of being deleted?
6578 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
6580 def SetTitle(*args
, **kwargs
):
6582 SetTitle(self, String title)
6584 Sets the window's title. Applicable only to frames and dialogs.
6586 return _core_
.Window_SetTitle(*args
, **kwargs
)
6588 def GetTitle(*args
, **kwargs
):
6590 GetTitle(self) -> String
6592 Gets the window's title. Applicable only to frames and dialogs.
6594 return _core_
.Window_GetTitle(*args
, **kwargs
)
6596 def SetLabel(*args
, **kwargs
):
6598 SetLabel(self, String label)
6600 Set the text which the window shows in its label if applicable.
6602 return _core_
.Window_SetLabel(*args
, **kwargs
)
6604 def GetLabel(*args
, **kwargs
):
6606 GetLabel(self) -> String
6608 Generic way of getting a label from any window, for identification
6609 purposes. The interpretation of this function differs from class to
6610 class. For frames and dialogs, the value returned is the title. For
6611 buttons or static text controls, it is the button text. This function
6612 can be useful for meta-programs such as testing tools or special-needs
6613 access programs)which need to identify windows by name.
6615 return _core_
.Window_GetLabel(*args
, **kwargs
)
6617 def SetName(*args
, **kwargs
):
6619 SetName(self, String name)
6621 Sets the window's name. The window name is used for ressource setting
6622 in X, it is not the same as the window title/label
6624 return _core_
.Window_SetName(*args
, **kwargs
)
6626 def GetName(*args
, **kwargs
):
6628 GetName(self) -> String
6630 Returns the windows name. This name is not guaranteed to be unique;
6631 it is up to the programmer to supply an appropriate name in the window
6632 constructor or via wx.Window.SetName.
6634 return _core_
.Window_GetName(*args
, **kwargs
)
6636 def SetWindowVariant(*args
, **kwargs
):
6638 SetWindowVariant(self, int variant)
6640 Sets the variant of the window/font size to use for this window, if
6641 the platform supports variants, for example, wxMac.
6643 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
6645 def GetWindowVariant(*args
, **kwargs
):
6646 """GetWindowVariant(self) -> int"""
6647 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
6649 def SetId(*args
, **kwargs
):
6651 SetId(self, int winid)
6653 Sets the identifier of the window. Each window has an integer
6654 identifier. If the application has not provided one, an identifier
6655 will be generated. Normally, the identifier should be provided on
6656 creation and should not be modified subsequently.
6658 return _core_
.Window_SetId(*args
, **kwargs
)
6660 def GetId(*args
, **kwargs
):
6664 Returns the identifier of the window. Each window has an integer
6665 identifier. If the application has not provided one (or the default Id
6666 -1 is used) then an unique identifier with a negative value will be
6669 return _core_
.Window_GetId(*args
, **kwargs
)
6671 def NewControlId(*args
, **kwargs
):
6673 NewControlId() -> int
6675 Generate a control id for the controls which were not given one.
6677 return _core_
.Window_NewControlId(*args
, **kwargs
)
6679 NewControlId
= staticmethod(NewControlId
)
6680 def NextControlId(*args
, **kwargs
):
6682 NextControlId(int winid) -> int
6684 Get the id of the control following the one with the given
6687 return _core_
.Window_NextControlId(*args
, **kwargs
)
6689 NextControlId
= staticmethod(NextControlId
)
6690 def PrevControlId(*args
, **kwargs
):
6692 PrevControlId(int winid) -> int
6694 Get the id of the control preceding the one with the given
6697 return _core_
.Window_PrevControlId(*args
, **kwargs
)
6699 PrevControlId
= staticmethod(PrevControlId
)
6700 def SetSize(*args
, **kwargs
):
6702 SetSize(self, Size size)
6704 Sets the size of the window in pixels.
6706 return _core_
.Window_SetSize(*args
, **kwargs
)
6708 def SetDimensions(*args
, **kwargs
):
6710 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6712 Sets the position and size of the window in pixels. The sizeFlags
6713 parameter indicates the interpretation of the other params if they are
6716 ======================== ======================================
6717 wx.SIZE_AUTO A -1 indicates that a class-specific
6718 default should be used.
6719 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6720 -1 values are supplied.
6721 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6722 interpreted as real dimensions, not
6724 ======================== ======================================
6727 return _core_
.Window_SetDimensions(*args
, **kwargs
)
6729 def SetRect(*args
, **kwargs
):
6731 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6733 Sets the position and size of the window in pixels using a wx.Rect.
6735 return _core_
.Window_SetRect(*args
, **kwargs
)
6737 def SetSizeWH(*args
, **kwargs
):
6739 SetSizeWH(self, int width, int height)
6741 Sets the size of the window in pixels.
6743 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
6745 def Move(*args
, **kwargs
):
6747 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6749 Moves the window to the given position.
6751 return _core_
.Window_Move(*args
, **kwargs
)
6754 def MoveXY(*args
, **kwargs
):
6756 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6758 Moves the window to the given position.
6760 return _core_
.Window_MoveXY(*args
, **kwargs
)
6762 def SetBestFittingSize(*args
, **kwargs
):
6764 SetBestFittingSize(self, Size size=DefaultSize)
6766 A 'Smart' SetSize that will fill in default size components with the
6767 window's *best size* values. Also set's the minsize for use with sizers.
6769 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
6771 def Raise(*args
, **kwargs
):
6775 Raises the window to the top of the window hierarchy if it is a
6776 managed window (dialog or frame).
6778 return _core_
.Window_Raise(*args
, **kwargs
)
6780 def Lower(*args
, **kwargs
):
6784 Lowers the window to the bottom of the window hierarchy if it is a
6785 managed window (dialog or frame).
6787 return _core_
.Window_Lower(*args
, **kwargs
)
6789 def SetClientSize(*args
, **kwargs
):
6791 SetClientSize(self, Size size)
6793 This sets the size of the window client area in pixels. Using this
6794 function to size a window tends to be more device-independent than
6795 wx.Window.SetSize, since the application need not worry about what
6796 dimensions the border or title bar have when trying to fit the window
6797 around panel items, for example.
6799 return _core_
.Window_SetClientSize(*args
, **kwargs
)
6801 def SetClientSizeWH(*args
, **kwargs
):
6803 SetClientSizeWH(self, int width, int height)
6805 This sets the size of the window client area in pixels. Using this
6806 function to size a window tends to be more device-independent than
6807 wx.Window.SetSize, since the application need not worry about what
6808 dimensions the border or title bar have when trying to fit the window
6809 around panel items, for example.
6811 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
6813 def SetClientRect(*args
, **kwargs
):
6815 SetClientRect(self, Rect rect)
6817 This sets the size of the window client area in pixels. Using this
6818 function to size a window tends to be more device-independent than
6819 wx.Window.SetSize, since the application need not worry about what
6820 dimensions the border or title bar have when trying to fit the window
6821 around panel items, for example.
6823 return _core_
.Window_SetClientRect(*args
, **kwargs
)
6825 def GetPosition(*args
, **kwargs
):
6827 GetPosition(self) -> Point
6829 Get the window's position.
6831 return _core_
.Window_GetPosition(*args
, **kwargs
)
6833 def GetPositionTuple(*args
, **kwargs
):
6835 GetPositionTuple() -> (x,y)
6837 Get the window's position.
6839 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
6841 def GetSize(*args
, **kwargs
):
6843 GetSize(self) -> Size
6845 Get the window size.
6847 return _core_
.Window_GetSize(*args
, **kwargs
)
6849 def GetSizeTuple(*args
, **kwargs
):
6851 GetSizeTuple() -> (width, height)
6853 Get the window size.
6855 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
6857 def GetRect(*args
, **kwargs
):
6859 GetRect(self) -> Rect
6861 Returns the size and position of the window as a wx.Rect object.
6863 return _core_
.Window_GetRect(*args
, **kwargs
)
6865 def GetClientSize(*args
, **kwargs
):
6867 GetClientSize(self) -> Size
6869 This gets the size of the window's 'client area' in pixels. The client
6870 area is the area which may be drawn on by the programmer, excluding
6871 title bar, border, scrollbars, etc.
6873 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6875 def GetClientSizeTuple(*args
, **kwargs
):
6877 GetClientSizeTuple() -> (width, height)
6879 This gets the size of the window's 'client area' in pixels. The client
6880 area is the area which may be drawn on by the programmer, excluding
6881 title bar, border, scrollbars, etc.
6883 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6885 def GetClientAreaOrigin(*args
, **kwargs
):
6887 GetClientAreaOrigin(self) -> Point
6889 Get the origin of the client area of the window relative to the
6890 window's top left corner (the client area may be shifted because of
6891 the borders, scrollbars, other decorations...)
6893 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6895 def GetClientRect(*args
, **kwargs
):
6897 GetClientRect(self) -> Rect
6899 Get the client area position and size as a `wx.Rect` object.
6901 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6903 def GetBestSize(*args
, **kwargs
):
6905 GetBestSize(self) -> Size
6907 This function returns the best acceptable minimal size for the
6908 window, if applicable. For example, for a static text control, it will
6909 be the minimal size such that the control label is not truncated. For
6910 windows containing subwindows (suzh aswx.Panel), the size returned by
6911 this function will be the same as the size the window would have had
6914 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6916 def GetBestSizeTuple(*args
, **kwargs
):
6918 GetBestSizeTuple() -> (width, height)
6920 This function returns the best acceptable minimal size for the
6921 window, if applicable. For example, for a static text control, it will
6922 be the minimal size such that the control label is not truncated. For
6923 windows containing subwindows (suzh aswx.Panel), the size returned by
6924 this function will be the same as the size the window would have had
6927 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6929 def InvalidateBestSize(*args
, **kwargs
):
6931 InvalidateBestSize(self)
6933 Reset the cached best size value so it will be recalculated the next
6936 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6938 def GetBestFittingSize(*args
, **kwargs
):
6940 GetBestFittingSize(self) -> Size
6942 This function will merge the window's best size into the window's
6943 minimum size, giving priority to the min size components, and returns
6947 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6949 def GetAdjustedBestSize(*args
, **kwargs
):
6951 GetAdjustedBestSize(self) -> Size
6953 This method is similar to GetBestSize, except in one
6954 thing. GetBestSize should return the minimum untruncated size of the
6955 window, while this method will return the largest of BestSize and any
6956 user specified minimum size. ie. it is the minimum size the window
6957 should currently be drawn at, not the minimal size it can possibly
6960 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6962 def Center(*args
, **kwargs
):
6964 Center(self, int direction=BOTH)
6966 Centers the window. The parameter specifies the direction for
6967 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6968 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6969 on the entire screen and not on its parent window. If it is a
6970 top-level window and has no parent then it will always be centered
6971 relative to the screen.
6973 return _core_
.Window_Center(*args
, **kwargs
)
6976 def CenterOnScreen(*args
, **kwargs
):
6978 CenterOnScreen(self, int dir=BOTH)
6980 Center on screen (only works for top level windows)
6982 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6984 CentreOnScreen
= CenterOnScreen
6985 def CenterOnParent(*args
, **kwargs
):
6987 CenterOnParent(self, int dir=BOTH)
6989 Center with respect to the the parent window
6991 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6993 CentreOnParent
= CenterOnParent
6994 def Fit(*args
, **kwargs
):
6998 Sizes the window so that it fits around its subwindows. This function
6999 won't do anything if there are no subwindows and will only really work
7000 correctly if sizers are used for the subwindows layout. Also, if the
7001 window has exactly one subwindow it is better (faster and the result
7002 is more precise as Fit adds some margin to account for fuzziness of
7003 its calculations) to call window.SetClientSize(child.GetSize())
7004 instead of calling Fit.
7006 return _core_
.Window_Fit(*args
, **kwargs
)
7008 def FitInside(*args
, **kwargs
):
7012 Similar to Fit, but sizes the interior (virtual) size of a
7013 window. Mainly useful with scrolled windows to reset scrollbars after
7014 sizing changes that do not trigger a size event, and/or scrolled
7015 windows without an interior sizer. This function similarly won't do
7016 anything if there are no subwindows.
7018 return _core_
.Window_FitInside(*args
, **kwargs
)
7020 def SetSizeHints(*args
, **kwargs
):
7022 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
7025 Allows specification of minimum and maximum window sizes, and window
7026 size increments. If a pair of values is not set (or set to -1), the
7027 default values will be used. If this function is called, the user
7028 will not be able to size the window outside the given bounds (if it is
7029 a top-level window.) Sizers will also inspect the minimum window size
7030 and will use that value if set when calculating layout.
7032 The resizing increments are only significant under Motif or Xt.
7034 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
7036 def SetSizeHintsSz(*args
, **kwargs
):
7038 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
7040 Allows specification of minimum and maximum window sizes, and window
7041 size increments. If a pair of values is not set (or set to -1), the
7042 default values will be used. If this function is called, the user
7043 will not be able to size the window outside the given bounds (if it is
7044 a top-level window.) Sizers will also inspect the minimum window size
7045 and will use that value if set when calculating layout.
7047 The resizing increments are only significant under Motif or Xt.
7049 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
7051 def SetVirtualSizeHints(*args
, **kwargs
):
7053 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
7055 Allows specification of minimum and maximum virtual window sizes. If a
7056 pair of values is not set (or set to -1), the default values will be
7057 used. If this function is called, the user will not be able to size
7058 the virtual area of the window outside the given bounds.
7060 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
7062 def SetVirtualSizeHintsSz(*args
, **kwargs
):
7064 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
7066 Allows specification of minimum and maximum virtual window sizes. If a
7067 pair of values is not set (or set to -1), the default values will be
7068 used. If this function is called, the user will not be able to size
7069 the virtual area of the window outside the given bounds.
7071 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
7073 def GetMaxSize(*args
, **kwargs
):
7074 """GetMaxSize(self) -> Size"""
7075 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
7077 def GetMinSize(*args
, **kwargs
):
7078 """GetMinSize(self) -> Size"""
7079 return _core_
.Window_GetMinSize(*args
, **kwargs
)
7081 def SetMinSize(*args
, **kwargs
):
7083 SetMinSize(self, Size minSize)
7085 A more convenient method than `SetSizeHints` for setting just the
7088 return _core_
.Window_SetMinSize(*args
, **kwargs
)
7090 def SetMaxSize(*args
, **kwargs
):
7092 SetMaxSize(self, Size maxSize)
7094 A more convenient method than `SetSizeHints` for setting just the
7097 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
7099 def GetMinWidth(*args
, **kwargs
):
7100 """GetMinWidth(self) -> int"""
7101 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
7103 def GetMinHeight(*args
, **kwargs
):
7104 """GetMinHeight(self) -> int"""
7105 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
7107 def GetMaxWidth(*args
, **kwargs
):
7108 """GetMaxWidth(self) -> int"""
7109 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
7111 def GetMaxHeight(*args
, **kwargs
):
7112 """GetMaxHeight(self) -> int"""
7113 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
7115 def SetVirtualSize(*args
, **kwargs
):
7117 SetVirtualSize(self, Size size)
7119 Set the the virtual size of a window in pixels. For most windows this
7120 is just the client area of the window, but for some like scrolled
7121 windows it is more or less independent of the screen window size.
7123 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
7125 def SetVirtualSizeWH(*args
, **kwargs
):
7127 SetVirtualSizeWH(self, int w, int h)
7129 Set the the virtual size of a window in pixels. For most windows this
7130 is just the client area of the window, but for some like scrolled
7131 windows it is more or less independent of the screen window size.
7133 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
7135 def GetVirtualSize(*args
, **kwargs
):
7137 GetVirtualSize(self) -> Size
7139 Get the the virtual size of the window in pixels. For most windows
7140 this is just the client area of the window, but for some like scrolled
7141 windows it is more or less independent of the screen window size.
7143 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
7145 def GetVirtualSizeTuple(*args
, **kwargs
):
7147 GetVirtualSizeTuple() -> (width, height)
7149 Get the the virtual size of the window in pixels. For most windows
7150 this is just the client area of the window, but for some like scrolled
7151 windows it is more or less independent of the screen window size.
7153 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
7155 def GetBestVirtualSize(*args
, **kwargs
):
7157 GetBestVirtualSize(self) -> Size
7159 Return the largest of ClientSize and BestSize (as determined by a
7160 sizer, interior children, or other means)
7162 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
7164 def Show(*args
, **kwargs
):
7166 Show(self, bool show=True) -> bool
7168 Shows or hides the window. You may need to call Raise for a top level
7169 window if you want to bring it to top, although this is not needed if
7170 Show is called immediately after the frame creation. Returns True if
7171 the window has been shown or hidden or False if nothing was done
7172 because it already was in the requested state.
7174 return _core_
.Window_Show(*args
, **kwargs
)
7176 def Hide(*args
, **kwargs
):
7180 Equivalent to calling Show(False).
7182 return _core_
.Window_Hide(*args
, **kwargs
)
7184 def Enable(*args
, **kwargs
):
7186 Enable(self, bool enable=True) -> bool
7188 Enable or disable the window for user input. Note that when a parent
7189 window is disabled, all of its children are disabled as well and they
7190 are reenabled again when the parent is. Returns true if the window
7191 has been enabled or disabled, false if nothing was done, i.e. if the
7192 window had already been in the specified state.
7194 return _core_
.Window_Enable(*args
, **kwargs
)
7196 def Disable(*args
, **kwargs
):
7198 Disable(self) -> bool
7200 Disables the window, same as Enable(false).
7202 return _core_
.Window_Disable(*args
, **kwargs
)
7204 def IsShown(*args
, **kwargs
):
7206 IsShown(self) -> bool
7208 Returns true if the window is shown, false if it has been hidden.
7210 return _core_
.Window_IsShown(*args
, **kwargs
)
7212 def IsEnabled(*args
, **kwargs
):
7214 IsEnabled(self) -> bool
7216 Returns true if the window is enabled for input, false otherwise.
7218 return _core_
.Window_IsEnabled(*args
, **kwargs
)
7220 def SetWindowStyleFlag(*args
, **kwargs
):
7222 SetWindowStyleFlag(self, long style)
7224 Sets the style of the window. Please note that some styles cannot be
7225 changed after the window creation and that Refresh() might need to be
7226 called after changing the others for the change to take place
7229 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
7231 def GetWindowStyleFlag(*args
, **kwargs
):
7233 GetWindowStyleFlag(self) -> long
7235 Gets the window style that was passed to the constructor or Create
7238 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
7240 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
7241 def HasFlag(*args
, **kwargs
):
7243 HasFlag(self, int flag) -> bool
7245 Test if the given style is set for this window.
7247 return _core_
.Window_HasFlag(*args
, **kwargs
)
7249 def IsRetained(*args
, **kwargs
):
7251 IsRetained(self) -> bool
7253 Returns true if the window is retained, false otherwise. Retained
7254 windows are only available on X platforms.
7256 return _core_
.Window_IsRetained(*args
, **kwargs
)
7258 def SetExtraStyle(*args
, **kwargs
):
7260 SetExtraStyle(self, long exStyle)
7262 Sets the extra style bits for the window. Extra styles are the less
7263 often used style bits which can't be set with the constructor or with
7264 SetWindowStyleFlag()
7266 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
7268 def GetExtraStyle(*args
, **kwargs
):
7270 GetExtraStyle(self) -> long
7272 Returns the extra style bits for the window.
7274 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
7276 def MakeModal(*args
, **kwargs
):
7278 MakeModal(self, bool modal=True)
7280 Disables all other windows in the application so that the user can
7281 only interact with this window. Passing False will reverse this
7284 return _core_
.Window_MakeModal(*args
, **kwargs
)
7286 def SetThemeEnabled(*args
, **kwargs
):
7288 SetThemeEnabled(self, bool enableTheme)
7290 This function tells a window if it should use the system's "theme"
7291 code to draw the windows' background instead if its own background
7292 drawing code. This will only have an effect on platforms that support
7293 the notion of themes in user defined windows. One such platform is
7294 GTK+ where windows can have (very colourful) backgrounds defined by a
7295 user's selected theme.
7297 Dialogs, notebook pages and the status bar have this flag set to true
7298 by default so that the default look and feel is simulated best.
7300 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
7302 def GetThemeEnabled(*args
, **kwargs
):
7304 GetThemeEnabled(self) -> bool
7306 Return the themeEnabled flag.
7308 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
7310 def SetFocus(*args
, **kwargs
):
7314 Set's the focus to this window, allowing it to receive keyboard input.
7316 return _core_
.Window_SetFocus(*args
, **kwargs
)
7318 def SetFocusFromKbd(*args
, **kwargs
):
7320 SetFocusFromKbd(self)
7322 Set focus to this window as the result of a keyboard action. Normally
7323 only called internally.
7325 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
7327 def FindFocus(*args
, **kwargs
):
7329 FindFocus() -> Window
7331 Returns the window or control that currently has the keyboard focus,
7334 return _core_
.Window_FindFocus(*args
, **kwargs
)
7336 FindFocus
= staticmethod(FindFocus
)
7337 def AcceptsFocus(*args
, **kwargs
):
7339 AcceptsFocus(self) -> bool
7341 Can this window have focus?
7343 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
7345 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
7347 AcceptsFocusFromKeyboard(self) -> bool
7349 Can this window be given focus by keyboard navigation? if not, the
7350 only way to give it focus (provided it accepts it at all) is to click
7353 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
7355 def GetDefaultItem(*args
, **kwargs
):
7357 GetDefaultItem(self) -> Window
7359 Get the default child of this parent, i.e. the one which is activated
7360 by pressing <Enter> such as the OK button on a wx.Dialog.
7362 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
7364 def SetDefaultItem(*args
, **kwargs
):
7366 SetDefaultItem(self, Window child) -> Window
7368 Set this child as default, return the old default.
7370 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
7372 def SetTmpDefaultItem(*args
, **kwargs
):
7374 SetTmpDefaultItem(self, Window win)
7376 Set this child as temporary default
7378 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
7380 def Navigate(*args
, **kwargs
):
7382 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
7384 Does keyboard navigation from this window to another, by sending a
7385 `wx.NavigationKeyEvent`.
7387 return _core_
.Window_Navigate(*args
, **kwargs
)
7389 def MoveAfterInTabOrder(*args
, **kwargs
):
7391 MoveAfterInTabOrder(self, Window win)
7393 Moves this window in the tab navigation order after the specified
7394 sibling window. This means that when the user presses the TAB key on
7395 that other window, the focus switches to this window.
7397 The default tab order is the same as creation order. This function
7398 and `MoveBeforeInTabOrder` allow to change it after creating all the
7402 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
7404 def MoveBeforeInTabOrder(*args
, **kwargs
):
7406 MoveBeforeInTabOrder(self, Window win)
7408 Same as `MoveAfterInTabOrder` except that it inserts this window just
7409 before win instead of putting it right after it.
7411 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
7413 def GetChildren(*args
, **kwargs
):
7415 GetChildren(self) -> PyObject
7417 Returns a list of the window's children. NOTE: Currently this is a
7418 copy of the child window list maintained by the window, so the return
7419 value of this function is only valid as long as the window's children
7422 return _core_
.Window_GetChildren(*args
, **kwargs
)
7424 def GetParent(*args
, **kwargs
):
7426 GetParent(self) -> Window
7428 Returns the parent window of this window, or None if there isn't one.
7430 return _core_
.Window_GetParent(*args
, **kwargs
)
7432 def GetGrandParent(*args
, **kwargs
):
7434 GetGrandParent(self) -> Window
7436 Returns the parent of the parent of this window, or None if there
7439 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
7441 def IsTopLevel(*args
, **kwargs
):
7443 IsTopLevel(self) -> bool
7445 Returns true if the given window is a top-level one. Currently all
7446 frames and dialogs are always considered to be top-level windows (even
7447 if they have a parent window).
7449 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
7451 def Reparent(*args
, **kwargs
):
7453 Reparent(self, Window newParent) -> bool
7455 Reparents the window, i.e the window will be removed from its current
7456 parent window (e.g. a non-standard toolbar in a wxFrame) and then
7457 re-inserted into another. Available on Windows and GTK. Returns True
7458 if the parent was changed, False otherwise (error or newParent ==
7461 return _core_
.Window_Reparent(*args
, **kwargs
)
7463 def AddChild(*args
, **kwargs
):
7465 AddChild(self, Window child)
7467 Adds a child window. This is called automatically by window creation
7468 functions so should not be required by the application programmer.
7470 return _core_
.Window_AddChild(*args
, **kwargs
)
7472 def RemoveChild(*args
, **kwargs
):
7474 RemoveChild(self, Window child)
7476 Removes a child window. This is called automatically by window
7477 deletion functions so should not be required by the application
7480 return _core_
.Window_RemoveChild(*args
, **kwargs
)
7482 def FindWindowById(*args
, **kwargs
):
7484 FindWindowById(self, long winid) -> Window
7486 Find a chld of this window by window ID
7488 return _core_
.Window_FindWindowById(*args
, **kwargs
)
7490 def FindWindowByName(*args
, **kwargs
):
7492 FindWindowByName(self, String name) -> Window
7494 Find a child of this window by name
7496 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
7498 def GetEventHandler(*args
, **kwargs
):
7500 GetEventHandler(self) -> EvtHandler
7502 Returns the event handler for this window. By default, the window is
7503 its own event handler.
7505 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
7507 def SetEventHandler(*args
, **kwargs
):
7509 SetEventHandler(self, EvtHandler handler)
7511 Sets the event handler for this window. An event handler is an object
7512 that is capable of processing the events sent to a window. By default,
7513 the window is its own event handler, but an application may wish to
7514 substitute another, for example to allow central implementation of
7515 event-handling for a variety of different window classes.
7517 It is usually better to use `wx.Window.PushEventHandler` since this sets
7518 up a chain of event handlers, where an event not handled by one event
7519 handler is handed to the next one in the chain.
7521 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
7523 def PushEventHandler(*args
, **kwargs
):
7525 PushEventHandler(self, EvtHandler handler)
7527 Pushes this event handler onto the event handler stack for the window.
7528 An event handler is an object that is capable of processing the events
7529 sent to a window. By default, the window is its own event handler, but
7530 an application may wish to substitute another, for example to allow
7531 central implementation of event-handling for a variety of different
7534 wx.Window.PushEventHandler allows an application to set up a chain of
7535 event handlers, where an event not handled by one event handler is
7536 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
7537 remove the event handler.
7539 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
7541 def PopEventHandler(*args
, **kwargs
):
7543 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
7545 Removes and returns the top-most event handler on the event handler
7546 stack. If deleteHandler is True then the wx.EvtHandler object will be
7547 destroyed after it is popped.
7549 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
7551 def RemoveEventHandler(*args
, **kwargs
):
7553 RemoveEventHandler(self, EvtHandler handler) -> bool
7555 Find the given handler in the event handler chain and remove (but not
7556 delete) it from the event handler chain, return True if it was found
7557 and False otherwise (this also results in an assert failure so this
7558 function should only be called when the handler is supposed to be
7561 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
7563 def SetValidator(*args
, **kwargs
):
7565 SetValidator(self, Validator validator)
7567 Deletes the current validator (if any) and sets the window validator,
7568 having called wx.Validator.Clone to create a new validator of this
7571 return _core_
.Window_SetValidator(*args
, **kwargs
)
7573 def GetValidator(*args
, **kwargs
):
7575 GetValidator(self) -> Validator
7577 Returns a pointer to the current validator for the window, or None if
7580 return _core_
.Window_GetValidator(*args
, **kwargs
)
7582 def Validate(*args
, **kwargs
):
7584 Validate(self) -> bool
7586 Validates the current values of the child controls using their
7587 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7588 style flag set, the method will also call Validate() of all child
7589 windows. Returns false if any of the validations failed.
7591 return _core_
.Window_Validate(*args
, **kwargs
)
7593 def TransferDataToWindow(*args
, **kwargs
):
7595 TransferDataToWindow(self) -> bool
7597 Transfers values to child controls from data areas specified by their
7598 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7599 style flag set, the method will also call TransferDataToWindow() of
7602 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
7604 def TransferDataFromWindow(*args
, **kwargs
):
7606 TransferDataFromWindow(self) -> bool
7608 Transfers values from child controls to data areas specified by their
7609 validators. Returns false if a transfer failed. If the window has
7610 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7611 also call TransferDataFromWindow() of all child windows.
7613 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
7615 def InitDialog(*args
, **kwargs
):
7619 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7620 to the dialog via validators.
7622 return _core_
.Window_InitDialog(*args
, **kwargs
)
7624 def SetAcceleratorTable(*args
, **kwargs
):
7626 SetAcceleratorTable(self, AcceleratorTable accel)
7628 Sets the accelerator table for this window.
7630 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
7632 def GetAcceleratorTable(*args
, **kwargs
):
7634 GetAcceleratorTable(self) -> AcceleratorTable
7636 Gets the accelerator table for this window.
7638 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
7640 def RegisterHotKey(*args
, **kwargs
):
7642 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7644 Registers a system wide hotkey. Every time the user presses the hotkey
7645 registered here, this window will receive a hotkey event. It will
7646 receive the event even if the application is in the background and
7647 does not have the input focus because the user is working with some
7648 other application. To bind an event handler function to this hotkey
7649 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7650 hotkey was registered successfully.
7652 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
7654 def UnregisterHotKey(*args
, **kwargs
):
7656 UnregisterHotKey(self, int hotkeyId) -> bool
7658 Unregisters a system wide hotkey.
7660 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
7662 def ConvertDialogPointToPixels(*args
, **kwargs
):
7664 ConvertDialogPointToPixels(self, Point pt) -> Point
7666 Converts a point or size from dialog units to pixels. Dialog units
7667 are used for maintaining a dialog's proportions even if the font
7668 changes. For the x dimension, the dialog units are multiplied by the
7669 average character width and then divided by 4. For the y dimension,
7670 the dialog units are multiplied by the average character height and
7673 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
7675 def ConvertDialogSizeToPixels(*args
, **kwargs
):
7677 ConvertDialogSizeToPixels(self, Size sz) -> Size
7679 Converts a point or size from dialog units to pixels. Dialog units
7680 are used for maintaining a dialog's proportions even if the font
7681 changes. For the x dimension, the dialog units are multiplied by the
7682 average character width and then divided by 4. For the y dimension,
7683 the dialog units are multiplied by the average character height and
7686 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
7688 def DLG_PNT(*args
, **kwargs
):
7690 DLG_PNT(self, Point pt) -> Point
7692 Converts a point or size from dialog units to pixels. Dialog units
7693 are used for maintaining a dialog's proportions even if the font
7694 changes. For the x dimension, the dialog units are multiplied by the
7695 average character width and then divided by 4. For the y dimension,
7696 the dialog units are multiplied by the average character height and
7699 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
7701 def DLG_SZE(*args
, **kwargs
):
7703 DLG_SZE(self, Size sz) -> Size
7705 Converts a point or size from dialog units to pixels. Dialog units
7706 are used for maintaining a dialog's proportions even if the font
7707 changes. For the x dimension, the dialog units are multiplied by the
7708 average character width and then divided by 4. For the y dimension,
7709 the dialog units are multiplied by the average character height and
7712 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
7714 def ConvertPixelPointToDialog(*args
, **kwargs
):
7715 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7716 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
7718 def ConvertPixelSizeToDialog(*args
, **kwargs
):
7719 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7720 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
7722 def WarpPointer(*args
, **kwargs
):
7724 WarpPointer(self, int x, int y)
7726 Moves the pointer to the given position on the window.
7728 NOTE: This function is not supported under Mac because Apple Human
7729 Interface Guidelines forbid moving the mouse cursor programmatically.
7731 return _core_
.Window_WarpPointer(*args
, **kwargs
)
7733 def CaptureMouse(*args
, **kwargs
):
7737 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7738 release the capture.
7740 Note that wxWindows maintains the stack of windows having captured the
7741 mouse and when the mouse is released the capture returns to the window
7742 which had had captured it previously and it is only really released if
7743 there were no previous window. In particular, this means that you must
7744 release the mouse as many times as you capture it.
7746 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
7748 def ReleaseMouse(*args
, **kwargs
):
7752 Releases mouse input captured with wx.Window.CaptureMouse.
7754 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
7756 def GetCapture(*args
, **kwargs
):
7758 GetCapture() -> Window
7760 Returns the window which currently captures the mouse or None
7762 return _core_
.Window_GetCapture(*args
, **kwargs
)
7764 GetCapture
= staticmethod(GetCapture
)
7765 def HasCapture(*args
, **kwargs
):
7767 HasCapture(self) -> bool
7769 Returns true if this window has the current mouse capture.
7771 return _core_
.Window_HasCapture(*args
, **kwargs
)
7773 def Refresh(*args
, **kwargs
):
7775 Refresh(self, bool eraseBackground=True, Rect rect=None)
7777 Mark the specified rectangle (or the whole window) as "dirty" so it
7778 will be repainted. Causes an EVT_PAINT event to be generated and sent
7781 return _core_
.Window_Refresh(*args
, **kwargs
)
7783 def RefreshRect(*args
, **kwargs
):
7785 RefreshRect(self, Rect rect, bool eraseBackground=True)
7787 Redraws the contents of the given rectangle: the area inside it will
7788 be repainted. This is the same as Refresh but has a nicer syntax.
7790 return _core_
.Window_RefreshRect(*args
, **kwargs
)
7792 def Update(*args
, **kwargs
):
7796 Calling this method immediately repaints the invalidated area of the
7797 window instead of waiting for the EVT_PAINT event to happen, (normally
7798 this would usually only happen when the flow of control returns to the
7799 event loop.) Notice that this function doesn't refresh the window and
7800 does nothing if the window has been already repainted. Use Refresh
7801 first if you want to immediately redraw the window (or some portion of
7802 it) unconditionally.
7804 return _core_
.Window_Update(*args
, **kwargs
)
7806 def ClearBackground(*args
, **kwargs
):
7808 ClearBackground(self)
7810 Clears the window by filling it with the current background
7811 colour. Does not cause an erase background event to be generated.
7813 return _core_
.Window_ClearBackground(*args
, **kwargs
)
7815 def Freeze(*args
, **kwargs
):
7819 Freezes the window or, in other words, prevents any updates from
7820 taking place on screen, the window is not redrawn at all. Thaw must be
7821 called to reenable window redrawing. Calls to Freeze/Thaw may be
7822 nested, with the actual Thaw being delayed until all the nesting has
7825 This method is useful for visual appearance optimization (for example,
7826 it is a good idea to use it before inserting large amount of text into
7827 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7828 for all controls so it is mostly just a hint to wxWindows and not a
7829 mandatory directive.
7831 return _core_
.Window_Freeze(*args
, **kwargs
)
7833 def Thaw(*args
, **kwargs
):
7837 Reenables window updating after a previous call to Freeze. Calls to
7838 Freeze/Thaw may be nested, so Thaw must be called the same number of
7839 times that Freeze was before the window will be updated.
7841 return _core_
.Window_Thaw(*args
, **kwargs
)
7843 def PrepareDC(*args
, **kwargs
):
7845 PrepareDC(self, DC dc)
7847 Call this function to prepare the device context for drawing a
7848 scrolled image. It sets the device origin according to the current
7851 return _core_
.Window_PrepareDC(*args
, **kwargs
)
7853 def GetUpdateRegion(*args
, **kwargs
):
7855 GetUpdateRegion(self) -> Region
7857 Returns the region specifying which parts of the window have been
7858 damaged. Should only be called within an EVT_PAINT handler.
7860 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
7862 def GetUpdateClientRect(*args
, **kwargs
):
7864 GetUpdateClientRect(self) -> Rect
7866 Get the update rectangle region bounding box in client coords.
7868 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7870 def IsExposed(*args
, **kwargs
):
7872 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7874 Returns true if the given point or rectangle area has been exposed
7875 since the last repaint. Call this in an paint event handler to
7876 optimize redrawing by only redrawing those areas, which have been
7879 return _core_
.Window_IsExposed(*args
, **kwargs
)
7881 def IsExposedPoint(*args
, **kwargs
):
7883 IsExposedPoint(self, Point pt) -> bool
7885 Returns true if the given point or rectangle area has been exposed
7886 since the last repaint. Call this in an paint event handler to
7887 optimize redrawing by only redrawing those areas, which have been
7890 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7892 def IsExposedRect(*args
, **kwargs
):
7894 IsExposedRect(self, Rect rect) -> bool
7896 Returns true if the given point or rectangle area has been exposed
7897 since the last repaint. Call this in an paint event handler to
7898 optimize redrawing by only redrawing those areas, which have been
7901 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7903 def GetDefaultAttributes(*args
, **kwargs
):
7905 GetDefaultAttributes(self) -> VisualAttributes
7907 Get the default attributes for an instance of this class. This is
7908 useful if you want to use the same font or colour in your own control
7909 as in a standard control -- which is a much better idea than hard
7910 coding specific colours or fonts which might look completely out of
7911 place on the user's system, especially if it uses themes.
7913 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7915 def GetClassDefaultAttributes(*args
, **kwargs
):
7917 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7919 Get the default attributes for this class. This is useful if you want
7920 to use the same font or colour in your own control as in a standard
7921 control -- which is a much better idea than hard coding specific
7922 colours or fonts which might look completely out of place on the
7923 user's system, especially if it uses themes.
7925 The variant parameter is only relevant under Mac currently and is
7926 ignore under other platforms. Under Mac, it will change the size of
7927 the returned font. See `wx.Window.SetWindowVariant` for more about
7930 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7932 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7933 def SetBackgroundColour(*args
, **kwargs
):
7935 SetBackgroundColour(self, Colour colour) -> bool
7937 Sets the background colour of the window. Returns True if the colour
7938 was changed. The background colour is usually painted by the default
7939 EVT_ERASE_BACKGROUND event handler function under Windows and
7940 automatically under GTK. Using `wx.NullColour` will reset the window
7941 to the default background colour.
7943 Note that setting the background colour may not cause an immediate
7944 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7945 calling this function.
7947 Using this function will disable attempts to use themes for this
7948 window, if the system supports them. Use with care since usually the
7949 themes represent the appearance chosen by the user to be used for all
7950 applications on the system.
7952 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7954 def SetOwnBackgroundColour(*args
, **kwargs
):
7955 """SetOwnBackgroundColour(self, Colour colour)"""
7956 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7958 def SetForegroundColour(*args
, **kwargs
):
7960 SetForegroundColour(self, Colour colour) -> bool
7962 Sets the foreground colour of the window. Returns True is the colour
7963 was changed. The interpretation of foreground colour is dependent on
7964 the window class; it may be the text colour or other colour, or it may
7967 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7969 def SetOwnForegroundColour(*args
, **kwargs
):
7970 """SetOwnForegroundColour(self, Colour colour)"""
7971 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7973 def GetBackgroundColour(*args
, **kwargs
):
7975 GetBackgroundColour(self) -> Colour
7977 Returns the background colour of the window.
7979 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7981 def GetForegroundColour(*args
, **kwargs
):
7983 GetForegroundColour(self) -> Colour
7985 Returns the foreground colour of the window. The interpretation of
7986 foreground colour is dependent on the window class; it may be the text
7987 colour or other colour, or it may not be used at all.
7989 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7991 def InheritsBackgroundColour(*args
, **kwargs
):
7992 """InheritsBackgroundColour(self) -> bool"""
7993 return _core_
.Window_InheritsBackgroundColour(*args
, **kwargs
)
7995 def UseBgCol(*args
, **kwargs
):
7996 """UseBgCol(self) -> bool"""
7997 return _core_
.Window_UseBgCol(*args
, **kwargs
)
7999 def SetBackgroundStyle(*args
, **kwargs
):
8001 SetBackgroundStyle(self, int style) -> bool
8003 Returns the background style of the window. The background style
8004 indicates how the background of the window is drawn.
8006 ====================== ========================================
8007 wx.BG_STYLE_SYSTEM The background colour or pattern should
8008 be determined by the system
8009 wx.BG_STYLE_COLOUR The background should be a solid colour
8010 wx.BG_STYLE_CUSTOM The background will be implemented by the
8012 ====================== ========================================
8014 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
8015 a custom background, such as a tiled bitmap. Currently the style has
8016 no effect on other platforms.
8018 :see: `GetBackgroundStyle`, `SetBackgroundColour`
8020 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
8022 def GetBackgroundStyle(*args
, **kwargs
):
8024 GetBackgroundStyle(self) -> int
8026 Returns the background style of the window.
8028 :see: `SetBackgroundStyle`
8030 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
8032 def HasTransparentBackground(*args
, **kwargs
):
8034 HasTransparentBackground(self) -> bool
8036 Returns True if this window's background is transparent (as, for
8037 example, for `wx.StaticText`) and should show the parent window's
8040 This method is mostly used internally by the library itself and you
8041 normally shouldn't have to call it. You may, however, have to override
8042 it in your custom control classes to ensure that background is painted
8045 return _core_
.Window_HasTransparentBackground(*args
, **kwargs
)
8047 def SetCursor(*args
, **kwargs
):
8049 SetCursor(self, Cursor cursor) -> bool
8051 Sets the window's cursor. Notice that the window cursor also sets it
8052 for the children of the window implicitly.
8054 The cursor may be wx.NullCursor in which case the window cursor will
8055 be reset back to default.
8057 return _core_
.Window_SetCursor(*args
, **kwargs
)
8059 def GetCursor(*args
, **kwargs
):
8061 GetCursor(self) -> Cursor
8063 Return the cursor associated with this window.
8065 return _core_
.Window_GetCursor(*args
, **kwargs
)
8067 def SetFont(*args
, **kwargs
):
8069 SetFont(self, Font font) -> bool
8071 Sets the font for this window.
8073 return _core_
.Window_SetFont(*args
, **kwargs
)
8075 def SetOwnFont(*args
, **kwargs
):
8076 """SetOwnFont(self, Font font)"""
8077 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
8079 def GetFont(*args
, **kwargs
):
8081 GetFont(self) -> Font
8083 Returns the default font used for this window.
8085 return _core_
.Window_GetFont(*args
, **kwargs
)
8087 def SetCaret(*args
, **kwargs
):
8089 SetCaret(self, Caret caret)
8091 Sets the caret associated with the window.
8093 return _core_
.Window_SetCaret(*args
, **kwargs
)
8095 def GetCaret(*args
, **kwargs
):
8097 GetCaret(self) -> Caret
8099 Returns the caret associated with the window.
8101 return _core_
.Window_GetCaret(*args
, **kwargs
)
8103 def GetCharHeight(*args
, **kwargs
):
8105 GetCharHeight(self) -> int
8107 Get the (average) character size for the current font.
8109 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
8111 def GetCharWidth(*args
, **kwargs
):
8113 GetCharWidth(self) -> int
8115 Get the (average) character size for the current font.
8117 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
8119 def GetTextExtent(*args
, **kwargs
):
8121 GetTextExtent(String string) -> (width, height)
8123 Get the width and height of the text using the current font.
8125 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
8127 def GetFullTextExtent(*args
, **kwargs
):
8129 GetFullTextExtent(String string, Font font=None) ->
8130 (width, height, descent, externalLeading)
8132 Get the width, height, decent and leading of the text using the
8133 current or specified font.
8135 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
8137 def ClientToScreenXY(*args
, **kwargs
):
8139 ClientToScreenXY(int x, int y) -> (x,y)
8141 Converts to screen coordinates from coordinates relative to this window.
8143 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
8145 def ScreenToClientXY(*args
, **kwargs
):
8147 ScreenToClientXY(int x, int y) -> (x,y)
8149 Converts from screen to client window coordinates.
8151 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
8153 def ClientToScreen(*args
, **kwargs
):
8155 ClientToScreen(self, Point pt) -> Point
8157 Converts to screen coordinates from coordinates relative to this window.
8159 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
8161 def ScreenToClient(*args
, **kwargs
):
8163 ScreenToClient(self, Point pt) -> Point
8165 Converts from screen to client window coordinates.
8167 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
8169 def HitTestXY(*args
, **kwargs
):
8171 HitTestXY(self, int x, int y) -> int
8173 Test where the given (in client coords) point lies
8175 return _core_
.Window_HitTestXY(*args
, **kwargs
)
8177 def HitTest(*args
, **kwargs
):
8179 HitTest(self, Point pt) -> int
8181 Test where the given (in client coords) point lies
8183 return _core_
.Window_HitTest(*args
, **kwargs
)
8185 def GetBorder(*args
):
8187 GetBorder(self, long flags) -> int
8188 GetBorder(self) -> int
8190 Get border for the flags of this window
8192 return _core_
.Window_GetBorder(*args
)
8194 def UpdateWindowUI(*args
, **kwargs
):
8196 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
8198 This function sends EVT_UPDATE_UI events to the window. The particular
8199 implementation depends on the window; for example a wx.ToolBar will
8200 send an update UI event for each toolbar button, and a wx.Frame will
8201 send an update UI event for each menubar menu item. You can call this
8202 function from your application to ensure that your UI is up-to-date at
8203 a particular point in time (as far as your EVT_UPDATE_UI handlers are
8204 concerned). This may be necessary if you have called
8205 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
8206 limit the overhead that wxWindows incurs by sending update UI events
8209 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
8211 def PopupMenuXY(*args
, **kwargs
):
8213 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
8215 Pops up the given menu at the specified coordinates, relative to this window,
8216 and returns control when the user has dismissed the menu. If a menu item is
8217 selected, the corresponding menu event is generated and will be processed as
8218 usual. If the default position is given then the current position of the
8219 mouse cursor will be used.
8221 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
8223 def PopupMenu(*args
, **kwargs
):
8225 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
8227 Pops up the given menu at the specified coordinates, relative to this window,
8228 and returns control when the user has dismissed the menu. If a menu item is
8229 selected, the corresponding menu event is generated and will be processed as
8230 usual. If the default position is given then the current position of the
8231 mouse cursor will be used.
8233 return _core_
.Window_PopupMenu(*args
, **kwargs
)
8235 def GetHandle(*args
, **kwargs
):
8237 GetHandle(self) -> long
8239 Returns the platform-specific handle (as a long integer) of the
8240 physical window. Currently on wxMac it returns the handle of the
8241 toplevel parent of the window.
8243 return _core_
.Window_GetHandle(*args
, **kwargs
)
8245 def AssociateHandle(*args
, **kwargs
):
8247 AssociateHandle(self, long handle)
8249 Associate the window with a new native handle
8251 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
8253 def DissociateHandle(*args
, **kwargs
):
8255 DissociateHandle(self)
8257 Dissociate the current native handle from the window
8259 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
8261 def HasScrollbar(*args
, **kwargs
):
8263 HasScrollbar(self, int orient) -> bool
8265 Does the window have the scrollbar for this orientation?
8267 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
8269 def SetScrollbar(*args
, **kwargs
):
8271 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
8274 Sets the scrollbar properties of a built-in scrollbar.
8276 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
8278 def SetScrollPos(*args
, **kwargs
):
8280 SetScrollPos(self, int orientation, int pos, bool refresh=True)
8282 Sets the position of one of the built-in scrollbars.
8284 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
8286 def GetScrollPos(*args
, **kwargs
):
8288 GetScrollPos(self, int orientation) -> int
8290 Returns the built-in scrollbar position.
8292 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
8294 def GetScrollThumb(*args
, **kwargs
):
8296 GetScrollThumb(self, int orientation) -> int
8298 Returns the built-in scrollbar thumb size.
8300 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
8302 def GetScrollRange(*args
, **kwargs
):
8304 GetScrollRange(self, int orientation) -> int
8306 Returns the built-in scrollbar range.
8308 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
8310 def ScrollWindow(*args
, **kwargs
):
8312 ScrollWindow(self, int dx, int dy, Rect rect=None)
8314 Physically scrolls the pixels in the window and move child windows
8315 accordingly. Use this function to optimise your scrolling
8316 implementations, to minimise the area that must be redrawn. Note that
8317 it is rarely required to call this function from a user program.
8319 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
8321 def ScrollLines(*args
, **kwargs
):
8323 ScrollLines(self, int lines) -> bool
8325 If the platform and window class supports it, scrolls the window by
8326 the given number of lines down, if lines is positive, or up if lines
8327 is negative. Returns True if the window was scrolled, False if it was
8328 already on top/bottom and nothing was done.
8330 return _core_
.Window_ScrollLines(*args
, **kwargs
)
8332 def ScrollPages(*args
, **kwargs
):
8334 ScrollPages(self, int pages) -> bool
8336 If the platform and window class supports it, scrolls the window by
8337 the given number of pages down, if pages is positive, or up if pages
8338 is negative. Returns True if the window was scrolled, False if it was
8339 already on top/bottom and nothing was done.
8341 return _core_
.Window_ScrollPages(*args
, **kwargs
)
8343 def LineUp(*args
, **kwargs
):
8345 LineUp(self) -> bool
8347 This is just a wrapper for ScrollLines(-1).
8349 return _core_
.Window_LineUp(*args
, **kwargs
)
8351 def LineDown(*args
, **kwargs
):
8353 LineDown(self) -> bool
8355 This is just a wrapper for ScrollLines(1).
8357 return _core_
.Window_LineDown(*args
, **kwargs
)
8359 def PageUp(*args
, **kwargs
):
8361 PageUp(self) -> bool
8363 This is just a wrapper for ScrollPages(-1).
8365 return _core_
.Window_PageUp(*args
, **kwargs
)
8367 def PageDown(*args
, **kwargs
):
8369 PageDown(self) -> bool
8371 This is just a wrapper for ScrollPages(1).
8373 return _core_
.Window_PageDown(*args
, **kwargs
)
8375 def SetHelpText(*args
, **kwargs
):
8377 SetHelpText(self, String text)
8379 Sets the help text to be used as context-sensitive help for this
8380 window. Note that the text is actually stored by the current
8381 wxHelpProvider implementation, and not in the window object itself.
8383 return _core_
.Window_SetHelpText(*args
, **kwargs
)
8385 def SetHelpTextForId(*args
, **kwargs
):
8387 SetHelpTextForId(self, String text)
8389 Associate this help text with all windows with the same id as this
8392 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
8394 def GetHelpText(*args
, **kwargs
):
8396 GetHelpText(self) -> String
8398 Gets the help text to be used as context-sensitive help for this
8399 window. Note that the text is actually stored by the current
8400 wxHelpProvider implementation, and not in the window object itself.
8402 return _core_
.Window_GetHelpText(*args
, **kwargs
)
8404 def SetToolTipString(*args
, **kwargs
):
8406 SetToolTipString(self, String tip)
8408 Attach a tooltip to the window.
8410 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
8412 def SetToolTip(*args
, **kwargs
):
8414 SetToolTip(self, ToolTip tip)
8416 Attach a tooltip to the window.
8418 return _core_
.Window_SetToolTip(*args
, **kwargs
)
8420 def GetToolTip(*args
, **kwargs
):
8422 GetToolTip(self) -> ToolTip
8424 get the associated tooltip or None if none
8426 return _core_
.Window_GetToolTip(*args
, **kwargs
)
8428 def SetDropTarget(*args
, **kwargs
):
8430 SetDropTarget(self, DropTarget dropTarget)
8432 Associates a drop target with this window. If the window already has
8433 a drop target, it is deleted.
8435 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
8437 def GetDropTarget(*args
, **kwargs
):
8439 GetDropTarget(self) -> DropTarget
8441 Returns the associated drop target, which may be None.
8443 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
8445 def SetConstraints(*args
, **kwargs
):
8447 SetConstraints(self, LayoutConstraints constraints)
8449 Sets the window to have the given layout constraints. If an existing
8450 layout constraints object is already owned by the window, it will be
8451 deleted. Pass None to disassociate and delete the window's current
8454 You must call SetAutoLayout to tell a window to use the constraints
8455 automatically in its default EVT_SIZE handler; otherwise, you must
8456 handle EVT_SIZE yourself and call Layout() explicitly. When setting
8457 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
8460 return _core_
.Window_SetConstraints(*args
, **kwargs
)
8462 def GetConstraints(*args
, **kwargs
):
8464 GetConstraints(self) -> LayoutConstraints
8466 Returns a pointer to the window's layout constraints, or None if there
8469 return _core_
.Window_GetConstraints(*args
, **kwargs
)
8471 def SetAutoLayout(*args
, **kwargs
):
8473 SetAutoLayout(self, bool autoLayout)
8475 Determines whether the Layout function will be called automatically
8476 when the window is resized. It is called implicitly by SetSizer but
8477 if you use SetConstraints you should call it manually or otherwise the
8478 window layout won't be correctly updated when its size changes.
8480 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
8482 def GetAutoLayout(*args
, **kwargs
):
8484 GetAutoLayout(self) -> bool
8486 Returns the current autoLayout setting
8488 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
8490 def Layout(*args
, **kwargs
):
8492 Layout(self) -> bool
8494 Invokes the constraint-based layout algorithm or the sizer-based
8495 algorithm for this window. See SetAutoLayout: when auto layout is on,
8496 this function gets called automatically by the default EVT_SIZE
8497 handler when the window is resized.
8499 return _core_
.Window_Layout(*args
, **kwargs
)
8501 def SetSizer(*args
, **kwargs
):
8503 SetSizer(self, Sizer sizer, bool deleteOld=True)
8505 Sets the window to have the given layout sizer. The window will then
8506 own the object, and will take care of its deletion. If an existing
8507 layout sizer object is already owned by the window, it will be deleted
8508 if the deleteOld parameter is true. Note that this function will also
8509 call SetAutoLayout implicitly with a True parameter if the sizer is
8510 non-None, and False otherwise.
8512 return _core_
.Window_SetSizer(*args
, **kwargs
)
8514 def SetSizerAndFit(*args
, **kwargs
):
8516 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
8518 The same as SetSizer, except it also sets the size hints for the
8519 window based on the sizer's minimum size.
8521 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
8523 def GetSizer(*args
, **kwargs
):
8525 GetSizer(self) -> Sizer
8527 Return the sizer associated with the window by a previous call to
8528 SetSizer or None if there isn't one.
8530 return _core_
.Window_GetSizer(*args
, **kwargs
)
8532 def SetContainingSizer(*args
, **kwargs
):
8534 SetContainingSizer(self, Sizer sizer)
8536 This normally does not need to be called by application code. It is
8537 called internally when a window is added to a sizer, and is used so
8538 the window can remove itself from the sizer when it is destroyed.
8540 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
8542 def GetContainingSizer(*args
, **kwargs
):
8544 GetContainingSizer(self) -> Sizer
8546 Return the sizer that this window is a member of, if any, otherwise None.
8548 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
8550 def InheritAttributes(*args
, **kwargs
):
8552 InheritAttributes(self)
8554 This function is (or should be, in case of custom controls) called
8555 during window creation to intelligently set up the window visual
8556 attributes, that is the font and the foreground and background
8559 By 'intelligently' the following is meant: by default, all windows use
8560 their own default attributes. However if some of the parent's
8561 attributes are explicitly changed (that is, using SetFont and not
8562 SetOwnFont) and if the corresponding attribute hadn't been
8563 explicitly set for this window itself, then this window takes the same
8564 value as used by the parent. In addition, if the window overrides
8565 ShouldInheritColours to return false, the colours will not be changed
8566 no matter what and only the font might.
8568 This rather complicated logic is necessary in order to accommodate the
8569 different usage scenarios. The most common one is when all default
8570 attributes are used and in this case, nothing should be inherited as
8571 in modern GUIs different controls use different fonts (and colours)
8572 than their siblings so they can't inherit the same value from the
8573 parent. However it was also deemed desirable to allow to simply change
8574 the attributes of all children at once by just changing the font or
8575 colour of their common parent, hence in this case we do inherit the
8579 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
8581 def ShouldInheritColours(*args
, **kwargs
):
8583 ShouldInheritColours(self) -> bool
8585 Return true from here to allow the colours of this window to be
8586 changed by InheritAttributes, returning false forbids inheriting them
8587 from the parent window.
8589 The base class version returns false, but this method is overridden in
8590 wxControl where it returns true.
8592 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
8594 def PostCreate(self
, pre
):
8596 Phase 3 of the 2-phase create <wink!>
8597 Call this method after precreating the window with the 2-phase create method.
8599 self
.this
= pre
.this
8600 self
.thisown
= pre
.thisown
8602 if hasattr(self
, '_setOORInfo'):
8603 self
._setOORInfo
(self
)
8604 if hasattr(self
, '_setCallbackInfo'):
8605 self
._setCallbackInfo
(self
, self
.__class
__)
8608 class WindowPtr(Window
):
8609 def __init__(self
, this
):
8611 if not hasattr(self
,"thisown"): self
.thisown
= 0
8612 self
.__class
__ = Window
8613 _core_
.Window_swigregister(WindowPtr
)
8615 def PreWindow(*args
, **kwargs
):
8617 PreWindow() -> Window
8619 Precreate a Window for 2-phase creation.
8621 val
= _core_
.new_PreWindow(*args
, **kwargs
)
8625 def Window_NewControlId(*args
, **kwargs
):
8627 Window_NewControlId() -> int
8629 Generate a control id for the controls which were not given one.
8631 return _core_
.Window_NewControlId(*args
, **kwargs
)
8633 def Window_NextControlId(*args
, **kwargs
):
8635 Window_NextControlId(int winid) -> int
8637 Get the id of the control following the one with the given
8640 return _core_
.Window_NextControlId(*args
, **kwargs
)
8642 def Window_PrevControlId(*args
, **kwargs
):
8644 Window_PrevControlId(int winid) -> int
8646 Get the id of the control preceding the one with the given
8649 return _core_
.Window_PrevControlId(*args
, **kwargs
)
8651 def Window_FindFocus(*args
, **kwargs
):
8653 Window_FindFocus() -> Window
8655 Returns the window or control that currently has the keyboard focus,
8658 return _core_
.Window_FindFocus(*args
, **kwargs
)
8660 def Window_GetCapture(*args
, **kwargs
):
8662 Window_GetCapture() -> Window
8664 Returns the window which currently captures the mouse or None
8666 return _core_
.Window_GetCapture(*args
, **kwargs
)
8668 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
8670 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8672 Get the default attributes for this class. This is useful if you want
8673 to use the same font or colour in your own control as in a standard
8674 control -- which is a much better idea than hard coding specific
8675 colours or fonts which might look completely out of place on the
8676 user's system, especially if it uses themes.
8678 The variant parameter is only relevant under Mac currently and is
8679 ignore under other platforms. Under Mac, it will change the size of
8680 the returned font. See `wx.Window.SetWindowVariant` for more about
8683 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
8685 def DLG_PNT(win
, point_or_x
, y
=None):
8687 Convenience function for converting a Point or (x,y) in
8688 dialog units to pixel units.
8691 return win
.ConvertDialogPointToPixels(point_or_x
)
8693 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
8695 def DLG_SZE(win
, size_width
, height
=None):
8697 Convenience function for converting a Size or (w,h) in
8698 dialog units to pixel units.
8701 return win
.ConvertDialogSizeToPixels(size_width
)
8703 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
8706 def FindWindowById(*args
, **kwargs
):
8708 FindWindowById(long id, Window parent=None) -> Window
8710 Find the first window in the application with the given id. If parent
8711 is None, the search will start from all top-level frames and dialog
8712 boxes; if non-None, the search will be limited to the given window
8713 hierarchy. The search is recursive in both cases.
8715 return _core_
.FindWindowById(*args
, **kwargs
)
8717 def FindWindowByName(*args
, **kwargs
):
8719 FindWindowByName(String name, Window parent=None) -> Window
8721 Find a window by its name (as given in a window constructor or Create
8722 function call). If parent is None, the search will start from all
8723 top-level frames and dialog boxes; if non-None, the search will be
8724 limited to the given window hierarchy. The search is recursive in both
8727 If no window with such name is found, wx.FindWindowByLabel is called.
8729 return _core_
.FindWindowByName(*args
, **kwargs
)
8731 def FindWindowByLabel(*args
, **kwargs
):
8733 FindWindowByLabel(String label, Window parent=None) -> Window
8735 Find a window by its label. Depending on the type of window, the label
8736 may be a window title or panel item label. If parent is None, the
8737 search will start from all top-level frames and dialog boxes; if
8738 non-None, the search will be limited to the given window
8739 hierarchy. The search is recursive in both cases.
8741 return _core_
.FindWindowByLabel(*args
, **kwargs
)
8743 def Window_FromHWND(*args
, **kwargs
):
8744 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8745 return _core_
.Window_FromHWND(*args
, **kwargs
)
8747 def GetTopLevelWindows(*args
, **kwargs
):
8749 GetTopLevelWindows() -> PyObject
8751 Returns a list of the the application's top-level windows, (frames,
8752 dialogs, etc.) NOTE: Currently this is a copy of the list maintained
8753 by wxWidgets, and so it is only valid as long as no top-level windows
8754 are closed or new top-level windows are created.
8757 return _core_
.GetTopLevelWindows(*args
, **kwargs
)
8758 #---------------------------------------------------------------------------
8760 class Validator(EvtHandler
):
8761 """Proxy of C++ Validator class"""
8763 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8764 def __init__(self
, *args
, **kwargs
):
8765 """__init__(self) -> Validator"""
8766 newobj
= _core_
.new_Validator(*args
, **kwargs
)
8767 self
.this
= newobj
.this
8770 self
._setOORInfo
(self
)
8772 def Clone(*args
, **kwargs
):
8773 """Clone(self) -> Validator"""
8774 return _core_
.Validator_Clone(*args
, **kwargs
)
8776 def Validate(*args
, **kwargs
):
8777 """Validate(self, Window parent) -> bool"""
8778 return _core_
.Validator_Validate(*args
, **kwargs
)
8780 def TransferToWindow(*args
, **kwargs
):
8781 """TransferToWindow(self) -> bool"""
8782 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
8784 def TransferFromWindow(*args
, **kwargs
):
8785 """TransferFromWindow(self) -> bool"""
8786 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
8788 def GetWindow(*args
, **kwargs
):
8789 """GetWindow(self) -> Window"""
8790 return _core_
.Validator_GetWindow(*args
, **kwargs
)
8792 def SetWindow(*args
, **kwargs
):
8793 """SetWindow(self, Window window)"""
8794 return _core_
.Validator_SetWindow(*args
, **kwargs
)
8796 def IsSilent(*args
, **kwargs
):
8797 """IsSilent() -> bool"""
8798 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8800 IsSilent
= staticmethod(IsSilent
)
8801 def SetBellOnError(*args
, **kwargs
):
8802 """SetBellOnError(int doIt=True)"""
8803 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8805 SetBellOnError
= staticmethod(SetBellOnError
)
8807 class ValidatorPtr(Validator
):
8808 def __init__(self
, this
):
8810 if not hasattr(self
,"thisown"): self
.thisown
= 0
8811 self
.__class
__ = Validator
8812 _core_
.Validator_swigregister(ValidatorPtr
)
8814 def Validator_IsSilent(*args
, **kwargs
):
8815 """Validator_IsSilent() -> bool"""
8816 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8818 def Validator_SetBellOnError(*args
, **kwargs
):
8819 """Validator_SetBellOnError(int doIt=True)"""
8820 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8822 class PyValidator(Validator
):
8823 """Proxy of C++ PyValidator class"""
8825 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8826 def __init__(self
, *args
, **kwargs
):
8827 """__init__(self) -> PyValidator"""
8828 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
8829 self
.this
= newobj
.this
8833 self
._setCallbackInfo
(self
, PyValidator
, 1)
8834 self
._setOORInfo
(self
)
8836 def _setCallbackInfo(*args
, **kwargs
):
8837 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8838 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
8841 class PyValidatorPtr(PyValidator
):
8842 def __init__(self
, this
):
8844 if not hasattr(self
,"thisown"): self
.thisown
= 0
8845 self
.__class
__ = PyValidator
8846 _core_
.PyValidator_swigregister(PyValidatorPtr
)
8848 #---------------------------------------------------------------------------
8850 class Menu(EvtHandler
):
8851 """Proxy of C++ Menu class"""
8853 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8854 def __init__(self
, *args
, **kwargs
):
8855 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8856 newobj
= _core_
.new_Menu(*args
, **kwargs
)
8857 self
.this
= newobj
.this
8860 self
._setOORInfo
(self
)
8862 def Append(*args
, **kwargs
):
8863 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8864 return _core_
.Menu_Append(*args
, **kwargs
)
8866 def AppendSeparator(*args
, **kwargs
):
8867 """AppendSeparator(self) -> MenuItem"""
8868 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
8870 def AppendCheckItem(*args
, **kwargs
):
8871 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8872 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
8874 def AppendRadioItem(*args
, **kwargs
):
8875 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8876 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
8878 def AppendMenu(*args
, **kwargs
):
8879 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8880 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
8882 def AppendItem(*args
, **kwargs
):
8883 """AppendItem(self, MenuItem item) -> MenuItem"""
8884 return _core_
.Menu_AppendItem(*args
, **kwargs
)
8886 def Break(*args
, **kwargs
):
8888 return _core_
.Menu_Break(*args
, **kwargs
)
8890 def InsertItem(*args
, **kwargs
):
8891 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8892 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8894 def Insert(*args
, **kwargs
):
8896 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8897 int kind=ITEM_NORMAL) -> MenuItem
8899 return _core_
.Menu_Insert(*args
, **kwargs
)
8901 def InsertSeparator(*args
, **kwargs
):
8902 """InsertSeparator(self, size_t pos) -> MenuItem"""
8903 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8905 def InsertCheckItem(*args
, **kwargs
):
8906 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8907 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8909 def InsertRadioItem(*args
, **kwargs
):
8910 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8911 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8913 def InsertMenu(*args
, **kwargs
):
8914 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8915 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8917 def PrependItem(*args
, **kwargs
):
8918 """PrependItem(self, MenuItem item) -> MenuItem"""
8919 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8921 def Prepend(*args
, **kwargs
):
8922 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8923 return _core_
.Menu_Prepend(*args
, **kwargs
)
8925 def PrependSeparator(*args
, **kwargs
):
8926 """PrependSeparator(self) -> MenuItem"""
8927 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8929 def PrependCheckItem(*args
, **kwargs
):
8930 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8931 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8933 def PrependRadioItem(*args
, **kwargs
):
8934 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8935 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8937 def PrependMenu(*args
, **kwargs
):
8938 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8939 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8941 def Remove(*args
, **kwargs
):
8942 """Remove(self, int id) -> MenuItem"""
8943 return _core_
.Menu_Remove(*args
, **kwargs
)
8945 def RemoveItem(*args
, **kwargs
):
8946 """RemoveItem(self, MenuItem item) -> MenuItem"""
8947 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8949 def Delete(*args
, **kwargs
):
8950 """Delete(self, int id) -> bool"""
8951 return _core_
.Menu_Delete(*args
, **kwargs
)
8953 def DeleteItem(*args
, **kwargs
):
8954 """DeleteItem(self, MenuItem item) -> bool"""
8955 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8957 def Destroy(*args
, **kwargs
):
8961 Deletes the C++ object this Python object is a proxy for.
8963 return _core_
.Menu_Destroy(*args
, **kwargs
)
8965 def DestroyId(*args
, **kwargs
):
8967 DestroyId(self, int id) -> bool
8969 Deletes the C++ object this Python object is a proxy for.
8971 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8973 def DestroyItem(*args
, **kwargs
):
8975 DestroyItem(self, MenuItem item) -> bool
8977 Deletes the C++ object this Python object is a proxy for.
8979 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8981 def GetMenuItemCount(*args
, **kwargs
):
8982 """GetMenuItemCount(self) -> size_t"""
8983 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8985 def GetMenuItems(*args
, **kwargs
):
8986 """GetMenuItems(self) -> PyObject"""
8987 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8989 def FindItem(*args
, **kwargs
):
8990 """FindItem(self, String item) -> int"""
8991 return _core_
.Menu_FindItem(*args
, **kwargs
)
8993 def FindItemById(*args
, **kwargs
):
8994 """FindItemById(self, int id) -> MenuItem"""
8995 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8997 def FindItemByPosition(*args
, **kwargs
):
8998 """FindItemByPosition(self, size_t position) -> MenuItem"""
8999 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
9001 def Enable(*args
, **kwargs
):
9002 """Enable(self, int id, bool enable)"""
9003 return _core_
.Menu_Enable(*args
, **kwargs
)
9005 def IsEnabled(*args
, **kwargs
):
9006 """IsEnabled(self, int id) -> bool"""
9007 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
9009 def Check(*args
, **kwargs
):
9010 """Check(self, int id, bool check)"""
9011 return _core_
.Menu_Check(*args
, **kwargs
)
9013 def IsChecked(*args
, **kwargs
):
9014 """IsChecked(self, int id) -> bool"""
9015 return _core_
.Menu_IsChecked(*args
, **kwargs
)
9017 def SetLabel(*args
, **kwargs
):
9018 """SetLabel(self, int id, String label)"""
9019 return _core_
.Menu_SetLabel(*args
, **kwargs
)
9021 def GetLabel(*args
, **kwargs
):
9022 """GetLabel(self, int id) -> String"""
9023 return _core_
.Menu_GetLabel(*args
, **kwargs
)
9025 def SetHelpString(*args
, **kwargs
):
9026 """SetHelpString(self, int id, String helpString)"""
9027 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
9029 def GetHelpString(*args
, **kwargs
):
9030 """GetHelpString(self, int id) -> String"""
9031 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
9033 def SetTitle(*args
, **kwargs
):
9034 """SetTitle(self, String title)"""
9035 return _core_
.Menu_SetTitle(*args
, **kwargs
)
9037 def GetTitle(*args
, **kwargs
):
9038 """GetTitle(self) -> String"""
9039 return _core_
.Menu_GetTitle(*args
, **kwargs
)
9041 def SetEventHandler(*args
, **kwargs
):
9042 """SetEventHandler(self, EvtHandler handler)"""
9043 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
9045 def GetEventHandler(*args
, **kwargs
):
9046 """GetEventHandler(self) -> EvtHandler"""
9047 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
9049 def SetInvokingWindow(*args
, **kwargs
):
9050 """SetInvokingWindow(self, Window win)"""
9051 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
9053 def GetInvokingWindow(*args
, **kwargs
):
9054 """GetInvokingWindow(self) -> Window"""
9055 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
9057 def GetStyle(*args
, **kwargs
):
9058 """GetStyle(self) -> long"""
9059 return _core_
.Menu_GetStyle(*args
, **kwargs
)
9061 def UpdateUI(*args
, **kwargs
):
9062 """UpdateUI(self, EvtHandler source=None)"""
9063 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
9065 def GetMenuBar(*args
, **kwargs
):
9066 """GetMenuBar(self) -> MenuBar"""
9067 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
9069 def Attach(*args
, **kwargs
):
9070 """Attach(self, wxMenuBarBase menubar)"""
9071 return _core_
.Menu_Attach(*args
, **kwargs
)
9073 def Detach(*args
, **kwargs
):
9075 return _core_
.Menu_Detach(*args
, **kwargs
)
9077 def IsAttached(*args
, **kwargs
):
9078 """IsAttached(self) -> bool"""
9079 return _core_
.Menu_IsAttached(*args
, **kwargs
)
9081 def SetParent(*args
, **kwargs
):
9082 """SetParent(self, Menu parent)"""
9083 return _core_
.Menu_SetParent(*args
, **kwargs
)
9085 def GetParent(*args
, **kwargs
):
9086 """GetParent(self) -> Menu"""
9087 return _core_
.Menu_GetParent(*args
, **kwargs
)
9090 class MenuPtr(Menu
):
9091 def __init__(self
, this
):
9093 if not hasattr(self
,"thisown"): self
.thisown
= 0
9094 self
.__class
__ = Menu
9095 _core_
.Menu_swigregister(MenuPtr
)
9096 DefaultValidator
= cvar
.DefaultValidator
9098 #---------------------------------------------------------------------------
9100 class MenuBar(Window
):
9101 """Proxy of C++ MenuBar class"""
9103 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9104 def __init__(self
, *args
, **kwargs
):
9105 """__init__(self, long style=0) -> MenuBar"""
9106 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
9107 self
.this
= newobj
.this
9110 self
._setOORInfo
(self
)
9112 def Append(*args
, **kwargs
):
9113 """Append(self, Menu menu, String title) -> bool"""
9114 return _core_
.MenuBar_Append(*args
, **kwargs
)
9116 def Insert(*args
, **kwargs
):
9117 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
9118 return _core_
.MenuBar_Insert(*args
, **kwargs
)
9120 def GetMenuCount(*args
, **kwargs
):
9121 """GetMenuCount(self) -> size_t"""
9122 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
9124 def GetMenu(*args
, **kwargs
):
9125 """GetMenu(self, size_t pos) -> Menu"""
9126 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
9128 def Replace(*args
, **kwargs
):
9129 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
9130 return _core_
.MenuBar_Replace(*args
, **kwargs
)
9132 def Remove(*args
, **kwargs
):
9133 """Remove(self, size_t pos) -> Menu"""
9134 return _core_
.MenuBar_Remove(*args
, **kwargs
)
9136 def EnableTop(*args
, **kwargs
):
9137 """EnableTop(self, size_t pos, bool enable)"""
9138 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
9140 def IsEnabledTop(*args
, **kwargs
):
9141 """IsEnabledTop(self, size_t pos) -> bool"""
9142 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
9144 def SetLabelTop(*args
, **kwargs
):
9145 """SetLabelTop(self, size_t pos, String label)"""
9146 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
9148 def GetLabelTop(*args
, **kwargs
):
9149 """GetLabelTop(self, size_t pos) -> String"""
9150 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
9152 def FindMenuItem(*args
, **kwargs
):
9153 """FindMenuItem(self, String menu, String item) -> int"""
9154 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
9156 def FindItemById(*args
, **kwargs
):
9157 """FindItemById(self, int id) -> MenuItem"""
9158 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
9160 def FindMenu(*args
, **kwargs
):
9161 """FindMenu(self, String title) -> int"""
9162 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
9164 def Enable(*args
, **kwargs
):
9165 """Enable(self, int id, bool enable)"""
9166 return _core_
.MenuBar_Enable(*args
, **kwargs
)
9168 def Check(*args
, **kwargs
):
9169 """Check(self, int id, bool check)"""
9170 return _core_
.MenuBar_Check(*args
, **kwargs
)
9172 def IsChecked(*args
, **kwargs
):
9173 """IsChecked(self, int id) -> bool"""
9174 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
9176 def IsEnabled(*args
, **kwargs
):
9177 """IsEnabled(self, int id) -> bool"""
9178 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
9180 def SetLabel(*args
, **kwargs
):
9181 """SetLabel(self, int id, String label)"""
9182 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
9184 def GetLabel(*args
, **kwargs
):
9185 """GetLabel(self, int id) -> String"""
9186 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
9188 def SetHelpString(*args
, **kwargs
):
9189 """SetHelpString(self, int id, String helpString)"""
9190 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
9192 def GetHelpString(*args
, **kwargs
):
9193 """GetHelpString(self, int id) -> String"""
9194 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
9196 def GetFrame(*args
, **kwargs
):
9197 """GetFrame(self) -> wxFrame"""
9198 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
9200 def IsAttached(*args
, **kwargs
):
9201 """IsAttached(self) -> bool"""
9202 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
9204 def Attach(*args
, **kwargs
):
9205 """Attach(self, wxFrame frame)"""
9206 return _core_
.MenuBar_Attach(*args
, **kwargs
)
9208 def Detach(*args
, **kwargs
):
9210 return _core_
.MenuBar_Detach(*args
, **kwargs
)
9213 class MenuBarPtr(MenuBar
):
9214 def __init__(self
, this
):
9216 if not hasattr(self
,"thisown"): self
.thisown
= 0
9217 self
.__class
__ = MenuBar
9218 _core_
.MenuBar_swigregister(MenuBarPtr
)
9220 #---------------------------------------------------------------------------
9222 class MenuItem(Object
):
9223 """Proxy of C++ MenuItem class"""
9225 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9226 def __init__(self
, *args
, **kwargs
):
9228 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
9229 String help=EmptyString, int kind=ITEM_NORMAL,
9230 Menu subMenu=None) -> MenuItem
9232 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
9233 self
.this
= newobj
.this
9236 def GetMenu(*args
, **kwargs
):
9237 """GetMenu(self) -> Menu"""
9238 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
9240 def SetMenu(*args
, **kwargs
):
9241 """SetMenu(self, Menu menu)"""
9242 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
9244 def SetId(*args
, **kwargs
):
9245 """SetId(self, int id)"""
9246 return _core_
.MenuItem_SetId(*args
, **kwargs
)
9248 def GetId(*args
, **kwargs
):
9249 """GetId(self) -> int"""
9250 return _core_
.MenuItem_GetId(*args
, **kwargs
)
9252 def IsSeparator(*args
, **kwargs
):
9253 """IsSeparator(self) -> bool"""
9254 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
9256 def SetText(*args
, **kwargs
):
9257 """SetText(self, String str)"""
9258 return _core_
.MenuItem_SetText(*args
, **kwargs
)
9260 def GetLabel(*args
, **kwargs
):
9261 """GetLabel(self) -> String"""
9262 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
9264 def GetText(*args
, **kwargs
):
9265 """GetText(self) -> String"""
9266 return _core_
.MenuItem_GetText(*args
, **kwargs
)
9268 def GetLabelFromText(*args
, **kwargs
):
9269 """GetLabelFromText(String text) -> String"""
9270 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
9272 GetLabelFromText
= staticmethod(GetLabelFromText
)
9273 def GetKind(*args
, **kwargs
):
9274 """GetKind(self) -> int"""
9275 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
9277 def SetKind(*args
, **kwargs
):
9278 """SetKind(self, int kind)"""
9279 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
9281 def SetCheckable(*args
, **kwargs
):
9282 """SetCheckable(self, bool checkable)"""
9283 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
9285 def IsCheckable(*args
, **kwargs
):
9286 """IsCheckable(self) -> bool"""
9287 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
9289 def IsSubMenu(*args
, **kwargs
):
9290 """IsSubMenu(self) -> bool"""
9291 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
9293 def SetSubMenu(*args
, **kwargs
):
9294 """SetSubMenu(self, Menu menu)"""
9295 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
9297 def GetSubMenu(*args
, **kwargs
):
9298 """GetSubMenu(self) -> Menu"""
9299 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
9301 def Enable(*args
, **kwargs
):
9302 """Enable(self, bool enable=True)"""
9303 return _core_
.MenuItem_Enable(*args
, **kwargs
)
9305 def IsEnabled(*args
, **kwargs
):
9306 """IsEnabled(self) -> bool"""
9307 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
9309 def Check(*args
, **kwargs
):
9310 """Check(self, bool check=True)"""
9311 return _core_
.MenuItem_Check(*args
, **kwargs
)
9313 def IsChecked(*args
, **kwargs
):
9314 """IsChecked(self) -> bool"""
9315 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
9317 def Toggle(*args
, **kwargs
):
9319 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
9321 def SetHelp(*args
, **kwargs
):
9322 """SetHelp(self, String str)"""
9323 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
9325 def GetHelp(*args
, **kwargs
):
9326 """GetHelp(self) -> String"""
9327 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
9329 def GetAccel(*args
, **kwargs
):
9330 """GetAccel(self) -> AcceleratorEntry"""
9331 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
9333 def SetAccel(*args
, **kwargs
):
9334 """SetAccel(self, AcceleratorEntry accel)"""
9335 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
9337 def SetFont(*args
, **kwargs
):
9338 """SetFont(self, Font font)"""
9339 return _core_
.MenuItem_SetFont(*args
, **kwargs
)
9341 def GetFont(*args
, **kwargs
):
9342 """GetFont(self) -> Font"""
9343 return _core_
.MenuItem_GetFont(*args
, **kwargs
)
9345 def SetTextColour(*args
, **kwargs
):
9346 """SetTextColour(self, Colour colText)"""
9347 return _core_
.MenuItem_SetTextColour(*args
, **kwargs
)
9349 def GetTextColour(*args
, **kwargs
):
9350 """GetTextColour(self) -> Colour"""
9351 return _core_
.MenuItem_GetTextColour(*args
, **kwargs
)
9353 def SetBackgroundColour(*args
, **kwargs
):
9354 """SetBackgroundColour(self, Colour colBack)"""
9355 return _core_
.MenuItem_SetBackgroundColour(*args
, **kwargs
)
9357 def GetBackgroundColour(*args
, **kwargs
):
9358 """GetBackgroundColour(self) -> Colour"""
9359 return _core_
.MenuItem_GetBackgroundColour(*args
, **kwargs
)
9361 def SetBitmaps(*args
, **kwargs
):
9362 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
9363 return _core_
.MenuItem_SetBitmaps(*args
, **kwargs
)
9365 def SetDisabledBitmap(*args
, **kwargs
):
9366 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
9367 return _core_
.MenuItem_SetDisabledBitmap(*args
, **kwargs
)
9369 def GetDisabledBitmap(*args
, **kwargs
):
9370 """GetDisabledBitmap(self) -> Bitmap"""
9371 return _core_
.MenuItem_GetDisabledBitmap(*args
, **kwargs
)
9373 def SetMarginWidth(*args
, **kwargs
):
9374 """SetMarginWidth(self, int nWidth)"""
9375 return _core_
.MenuItem_SetMarginWidth(*args
, **kwargs
)
9377 def GetMarginWidth(*args
, **kwargs
):
9378 """GetMarginWidth(self) -> int"""
9379 return _core_
.MenuItem_GetMarginWidth(*args
, **kwargs
)
9381 def GetDefaultMarginWidth(*args
, **kwargs
):
9382 """GetDefaultMarginWidth() -> int"""
9383 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
9385 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
9386 def IsOwnerDrawn(*args
, **kwargs
):
9387 """IsOwnerDrawn(self) -> bool"""
9388 return _core_
.MenuItem_IsOwnerDrawn(*args
, **kwargs
)
9390 def SetOwnerDrawn(*args
, **kwargs
):
9391 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
9392 return _core_
.MenuItem_SetOwnerDrawn(*args
, **kwargs
)
9394 def ResetOwnerDrawn(*args
, **kwargs
):
9395 """ResetOwnerDrawn(self)"""
9396 return _core_
.MenuItem_ResetOwnerDrawn(*args
, **kwargs
)
9398 def SetBitmap(*args
, **kwargs
):
9399 """SetBitmap(self, Bitmap bitmap)"""
9400 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
9402 def GetBitmap(*args
, **kwargs
):
9403 """GetBitmap(self) -> Bitmap"""
9404 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
9407 class MenuItemPtr(MenuItem
):
9408 def __init__(self
, this
):
9410 if not hasattr(self
,"thisown"): self
.thisown
= 0
9411 self
.__class
__ = MenuItem
9412 _core_
.MenuItem_swigregister(MenuItemPtr
)
9414 def MenuItem_GetLabelFromText(*args
, **kwargs
):
9415 """MenuItem_GetLabelFromText(String text) -> String"""
9416 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
9418 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
9419 """MenuItem_GetDefaultMarginWidth() -> int"""
9420 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
9422 #---------------------------------------------------------------------------
9424 class Control(Window
):
9426 This is the base class for a control or 'widget'.
9428 A control is generally a small window which processes user input
9429 and/or displays one or more item of data.
9432 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9433 def __init__(self
, *args
, **kwargs
):
9435 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
9436 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
9437 String name=ControlNameStr) -> Control
9439 Create a Control. Normally you should only call this from a subclass'
9440 __init__ as a plain old wx.Control is not very useful.
9442 newobj
= _core_
.new_Control(*args
, **kwargs
)
9443 self
.this
= newobj
.this
9446 self
._setOORInfo
(self
)
9448 def Create(*args
, **kwargs
):
9450 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
9451 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
9452 String name=ControlNameStr) -> bool
9454 Do the 2nd phase and create the GUI control.
9456 return _core_
.Control_Create(*args
, **kwargs
)
9458 def Command(*args
, **kwargs
):
9460 Command(self, CommandEvent event)
9462 Simulates the effect of the user issuing a command to the item.
9464 :see: `wx.CommandEvent`
9467 return _core_
.Control_Command(*args
, **kwargs
)
9469 def GetLabel(*args
, **kwargs
):
9471 GetLabel(self) -> String
9473 Return a control's text.
9475 return _core_
.Control_GetLabel(*args
, **kwargs
)
9477 def SetLabel(*args
, **kwargs
):
9479 SetLabel(self, String label)
9481 Sets the item's text.
9483 return _core_
.Control_SetLabel(*args
, **kwargs
)
9485 def GetClassDefaultAttributes(*args
, **kwargs
):
9487 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9489 Get the default attributes for this class. This is useful if you want
9490 to use the same font or colour in your own control as in a standard
9491 control -- which is a much better idea than hard coding specific
9492 colours or fonts which might look completely out of place on the
9493 user's system, especially if it uses themes.
9495 The variant parameter is only relevant under Mac currently and is
9496 ignore under other platforms. Under Mac, it will change the size of
9497 the returned font. See `wx.Window.SetWindowVariant` for more about
9500 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
9502 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
9504 class ControlPtr(Control
):
9505 def __init__(self
, this
):
9507 if not hasattr(self
,"thisown"): self
.thisown
= 0
9508 self
.__class
__ = Control
9509 _core_
.Control_swigregister(ControlPtr
)
9510 ControlNameStr
= cvar
.ControlNameStr
9512 def PreControl(*args
, **kwargs
):
9514 PreControl() -> Control
9516 Precreate a Control control for 2-phase creation
9518 val
= _core_
.new_PreControl(*args
, **kwargs
)
9522 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
9524 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9526 Get the default attributes for this class. This is useful if you want
9527 to use the same font or colour in your own control as in a standard
9528 control -- which is a much better idea than hard coding specific
9529 colours or fonts which might look completely out of place on the
9530 user's system, especially if it uses themes.
9532 The variant parameter is only relevant under Mac currently and is
9533 ignore under other platforms. Under Mac, it will change the size of
9534 the returned font. See `wx.Window.SetWindowVariant` for more about
9537 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
9539 #---------------------------------------------------------------------------
9541 class ItemContainer(object):
9543 The wx.ItemContainer class defines an interface which is implemented
9544 by all controls which have string subitems, each of which may be
9545 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
9546 as `wx.ComboBox` which implements an extended interface deriving from
9549 It defines the methods for accessing the control's items and although
9550 each of the derived classes implements them differently, they still
9551 all conform to the same interface.
9553 The items in a wx.ItemContainer have (non empty) string labels and,
9554 optionally, client data associated with them.
9557 def __init__(self
): raise RuntimeError, "No constructor defined"
9559 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9560 def Append(*args
, **kwargs
):
9562 Append(self, String item, PyObject clientData=None) -> int
9564 Adds the item to the control, associating the given data with the item
9565 if not None. The return value is the index of the newly added item
9566 which may be different from the last one if the control is sorted (e.g.
9567 has wx.LB_SORT or wx.CB_SORT style).
9569 return _core_
.ItemContainer_Append(*args
, **kwargs
)
9571 def AppendItems(*args
, **kwargs
):
9573 AppendItems(self, List strings)
9575 Apend several items at once to the control. Notice that calling this
9576 method may be much faster than appending the items one by one if you
9577 need to add a lot of items.
9579 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
9581 def Insert(*args
, **kwargs
):
9583 Insert(self, String item, int pos, PyObject clientData=None) -> int
9585 Insert an item into the control before the item at the ``pos`` index,
9586 optionally associating some data object with the item.
9588 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
9590 def Clear(*args
, **kwargs
):
9594 Removes all items from the control.
9596 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
9598 def Delete(*args
, **kwargs
):
9602 Deletes the item at the zero-based index 'n' from the control. Note
9603 that it is an error (signalled by a `wx.PyAssertionError` exception if
9604 enabled) to remove an item with the index negative or greater or equal
9605 than the number of items in the control.
9607 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
9609 def GetClientData(*args
, **kwargs
):
9611 GetClientData(self, int n) -> PyObject
9613 Returns the client data associated with the given item, (if any.)
9615 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
9617 def SetClientData(*args
, **kwargs
):
9619 SetClientData(self, int n, PyObject clientData)
9621 Associate the given client data with the item at position n.
9623 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
9625 def GetCount(*args
, **kwargs
):
9627 GetCount(self) -> int
9629 Returns the number of items in the control.
9631 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
9633 def IsEmpty(*args
, **kwargs
):
9635 IsEmpty(self) -> bool
9637 Returns True if the control is empty or False if it has some items.
9639 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
9641 def GetString(*args
, **kwargs
):
9643 GetString(self, int n) -> String
9645 Returns the label of the item with the given index.
9647 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
9649 def GetStrings(*args
, **kwargs
):
9650 """GetStrings(self) -> wxArrayString"""
9651 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
9653 def SetString(*args
, **kwargs
):
9655 SetString(self, int n, String s)
9657 Sets the label for the given item.
9659 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
9661 def FindString(*args
, **kwargs
):
9663 FindString(self, String s) -> int
9665 Finds an item whose label matches the given string. Returns the
9666 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9669 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
9671 def SetSelection(*args
, **kwargs
):
9673 SetSelection(self, int n)
9675 Sets the item at index 'n' to be the selected item.
9677 return _core_
.ItemContainer_SetSelection(*args
, **kwargs
)
9679 def GetSelection(*args
, **kwargs
):
9681 GetSelection(self) -> int
9683 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9686 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
9688 def SetStringSelection(*args
, **kwargs
):
9689 """SetStringSelection(self, String s) -> bool"""
9690 return _core_
.ItemContainer_SetStringSelection(*args
, **kwargs
)
9692 def GetStringSelection(*args
, **kwargs
):
9694 GetStringSelection(self) -> String
9696 Returns the label of the selected item or an empty string if no item
9699 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
9701 def Select(*args
, **kwargs
):
9705 This is the same as `SetSelection` and exists only because it is
9706 slightly more natural for controls which support multiple selection.
9708 return _core_
.ItemContainer_Select(*args
, **kwargs
)
9711 class ItemContainerPtr(ItemContainer
):
9712 def __init__(self
, this
):
9714 if not hasattr(self
,"thisown"): self
.thisown
= 0
9715 self
.__class
__ = ItemContainer
9716 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
9718 #---------------------------------------------------------------------------
9720 class ControlWithItems(Control
,ItemContainer
):
9722 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9723 wx.Control class, and is used for the base class of various controls
9726 def __init__(self
): raise RuntimeError, "No constructor defined"
9728 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9730 class ControlWithItemsPtr(ControlWithItems
):
9731 def __init__(self
, this
):
9733 if not hasattr(self
,"thisown"): self
.thisown
= 0
9734 self
.__class
__ = ControlWithItems
9735 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
9737 #---------------------------------------------------------------------------
9739 class SizerItem(Object
):
9741 The wx.SizerItem class is used to track the position, size and other
9742 attributes of each item managed by a `wx.Sizer`. In normal usage user
9743 code should never need to deal directly with a wx.SizerItem, but
9744 custom classes derived from `wx.PySizer` will probably need to use the
9745 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9747 :see: `wx.Sizer`, `wx.GBSizerItem`
9750 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9751 def __init__(self
, *args
, **kwargs
):
9753 __init__(self) -> SizerItem
9755 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9756 size will need to be set before this item can be used in a Sizer.
9758 You will probably never need to create a wx.SizerItem directly as they
9759 are created automatically when the sizer's Add, Insert or Prepend
9762 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9764 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
9765 self
.this
= newobj
.this
9768 def DeleteWindows(*args
, **kwargs
):
9772 Destroy the window or the windows in a subsizer, depending on the type
9775 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
9777 def DetachSizer(*args
, **kwargs
):
9781 Enable deleting the SizerItem without destroying the contained sizer.
9783 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
9785 def GetSize(*args
, **kwargs
):
9787 GetSize(self) -> Size
9789 Get the current size of the item, as set in the last Layout.
9791 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
9793 def CalcMin(*args
, **kwargs
):
9795 CalcMin(self) -> Size
9797 Calculates the minimum desired size for the item, including any space
9800 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
9802 def SetDimension(*args
, **kwargs
):
9804 SetDimension(self, Point pos, Size size)
9806 Set the position and size of the space allocated for this item by the
9807 sizer, and adjust the position and size of the item (window or
9808 subsizer) to be within that space taking alignment and borders into
9811 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
9813 def GetMinSize(*args
, **kwargs
):
9815 GetMinSize(self) -> Size
9817 Get the minimum size needed for the item.
9819 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
9821 def GetMinSizeWithBorder(*args
, **kwargs
):
9823 GetMinSizeWithBorder(self) -> Size
9825 Get the minimum size needed for the item with space for the borders
9828 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
9830 def SetInitSize(*args
, **kwargs
):
9831 """SetInitSize(self, int x, int y)"""
9832 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
9834 def SetRatioWH(*args
, **kwargs
):
9836 SetRatioWH(self, int width, int height)
9838 Set the ratio item attribute.
9840 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
9842 def SetRatioSize(*args
, **kwargs
):
9844 SetRatioSize(self, Size size)
9846 Set the ratio item attribute.
9848 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
9850 def SetRatio(*args
, **kwargs
):
9852 SetRatio(self, float ratio)
9854 Set the ratio item attribute.
9856 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
9858 def GetRatio(*args
, **kwargs
):
9860 GetRatio(self) -> float
9862 Set the ratio item attribute.
9864 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
9866 def GetRect(*args
, **kwargs
):
9868 GetRect(self) -> Rect
9870 Returns the rectangle that the sizer item should occupy
9872 return _core_
.SizerItem_GetRect(*args
, **kwargs
)
9874 def IsWindow(*args
, **kwargs
):
9876 IsWindow(self) -> bool
9878 Is this sizer item a window?
9880 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
9882 def IsSizer(*args
, **kwargs
):
9884 IsSizer(self) -> bool
9886 Is this sizer item a subsizer?
9888 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
9890 def IsSpacer(*args
, **kwargs
):
9892 IsSpacer(self) -> bool
9894 Is this sizer item a spacer?
9896 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
9898 def SetProportion(*args
, **kwargs
):
9900 SetProportion(self, int proportion)
9902 Set the proportion value for this item.
9904 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
9906 def GetProportion(*args
, **kwargs
):
9908 GetProportion(self) -> int
9910 Get the proportion value for this item.
9912 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
9914 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
9915 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
9916 def SetFlag(*args
, **kwargs
):
9918 SetFlag(self, int flag)
9920 Set the flag value for this item.
9922 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
9924 def GetFlag(*args
, **kwargs
):
9926 GetFlag(self) -> int
9928 Get the flag value for this item.
9930 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
9932 def SetBorder(*args
, **kwargs
):
9934 SetBorder(self, int border)
9936 Set the border value for this item.
9938 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
9940 def GetBorder(*args
, **kwargs
):
9942 GetBorder(self) -> int
9944 Get the border value for this item.
9946 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
9948 def GetWindow(*args
, **kwargs
):
9950 GetWindow(self) -> Window
9952 Get the window (if any) that is managed by this sizer item.
9954 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
9956 def SetWindow(*args
, **kwargs
):
9958 SetWindow(self, Window window)
9960 Set the window to be managed by this sizer item.
9962 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9964 def GetSizer(*args
, **kwargs
):
9966 GetSizer(self) -> Sizer
9968 Get the subsizer (if any) that is managed by this sizer item.
9970 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9972 def SetSizer(*args
, **kwargs
):
9974 SetSizer(self, Sizer sizer)
9976 Set the subsizer to be managed by this sizer item.
9978 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9980 def GetSpacer(*args
, **kwargs
):
9982 GetSpacer(self) -> Size
9984 Get the size of the spacer managed by this sizer item.
9986 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9988 def SetSpacer(*args
, **kwargs
):
9990 SetSpacer(self, Size size)
9992 Set the size of the spacer to be managed by this sizer item.
9994 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9996 def Show(*args
, **kwargs
):
9998 Show(self, bool show)
10000 Set the show item attribute, which sizers use to determine if the item
10001 is to be made part of the layout or not. If the item is tracking a
10002 window then it is shown or hidden as needed.
10004 return _core_
.SizerItem_Show(*args
, **kwargs
)
10006 def IsShown(*args
, **kwargs
):
10008 IsShown(self) -> bool
10010 Is the item to be shown in the layout?
10012 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
10014 def GetPosition(*args
, **kwargs
):
10016 GetPosition(self) -> Point
10018 Returns the current position of the item, as set in the last Layout.
10020 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
10022 def GetUserData(*args
, **kwargs
):
10024 GetUserData(self) -> PyObject
10026 Returns the userData associated with this sizer item, or None if there
10029 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
10032 class SizerItemPtr(SizerItem
):
10033 def __init__(self
, this
):
10035 if not hasattr(self
,"thisown"): self
.thisown
= 0
10036 self
.__class
__ = SizerItem
10037 _core_
.SizerItem_swigregister(SizerItemPtr
)
10039 def SizerItemWindow(*args
, **kwargs
):
10041 SizerItemWindow(Window window, int proportion, int flag, int border,
10042 PyObject userData=None) -> SizerItem
10044 Constructs a `wx.SizerItem` for tracking a window.
10046 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
10050 def SizerItemSpacer(*args
, **kwargs
):
10052 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
10053 PyObject userData=None) -> SizerItem
10055 Constructs a `wx.SizerItem` for tracking a spacer.
10057 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
10061 def SizerItemSizer(*args
, **kwargs
):
10063 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
10064 PyObject userData=None) -> SizerItem
10066 Constructs a `wx.SizerItem` for tracking a subsizer
10068 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
10072 class Sizer(Object
):
10074 wx.Sizer is the abstract base class used for laying out subwindows in
10075 a window. You cannot use wx.Sizer directly; instead, you will have to
10076 use one of the sizer classes derived from it such as `wx.BoxSizer`,
10077 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
10078 and `wx.GridBagSizer`.
10080 The concept implemented by sizers in wxWidgets is closely related to
10081 layout tools in other GUI toolkits, such as Java's AWT, the GTK
10082 toolkit or the Qt toolkit. It is based upon the idea of the individual
10083 subwindows reporting their minimal required size and their ability to
10084 get stretched if the size of the parent window has changed. This will
10085 most often mean that the programmer does not set the original size of
10086 a dialog in the beginning, rather the dialog will assigned a sizer and
10087 this sizer will be queried about the recommended size. The sizer in
10088 turn will query its children, which can be normal windows or contorls,
10089 empty space or other sizers, so that a hierarchy of sizers can be
10090 constructed. Note that wxSizer does not derive from wxWindow and thus
10091 do not interfere with tab ordering and requires very little resources
10092 compared to a real window on screen.
10094 What makes sizers so well fitted for use in wxWidgets is the fact that
10095 every control reports its own minimal size and the algorithm can
10096 handle differences in font sizes or different window (dialog item)
10097 sizes on different platforms without problems. If for example the
10098 standard font as well as the overall design of Mac widgets requires
10099 more space than on Windows, then the initial size of a dialog using a
10100 sizer will automatically be bigger on Mac than on Windows.
10102 def __init__(self
): raise RuntimeError, "No constructor defined"
10103 def __repr__(self
):
10104 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10105 def _setOORInfo(*args
, **kwargs
):
10106 """_setOORInfo(self, PyObject _self)"""
10107 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
10109 def Add(*args
, **kwargs
):
10111 Add(self, item, int proportion=0, int flag=0, int border=0,
10112 PyObject userData=None) -> wx.SizerItem
10114 Appends a child item to the sizer.
10116 return _core_
.Sizer_Add(*args
, **kwargs
)
10118 def Insert(*args
, **kwargs
):
10120 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
10121 PyObject userData=None) -> wx.SizerItem
10123 Inserts a new item into the list of items managed by this sizer before
10124 the item at index *before*. See `Add` for a description of the parameters.
10126 return _core_
.Sizer_Insert(*args
, **kwargs
)
10128 def Prepend(*args
, **kwargs
):
10130 Prepend(self, item, int proportion=0, int flag=0, int border=0,
10131 PyObject userData=None) -> wx.SizerItem
10133 Adds a new item to the begining of the list of sizer items managed by
10134 this sizer. See `Add` for a description of the parameters.
10136 return _core_
.Sizer_Prepend(*args
, **kwargs
)
10138 def Remove(*args
, **kwargs
):
10140 Remove(self, item) -> bool
10142 Removes an item from the sizer and destroys it. This method does not
10143 cause any layout or resizing to take place, call `Layout` to update
10144 the layout on screen after removing a child from the sizer. The
10145 *item* parameter can be either a window, a sizer, or the zero-based
10146 index of an item to remove. Returns True if the child item was found
10149 return _core_
.Sizer_Remove(*args
, **kwargs
)
10151 def Detach(*args
, **kwargs
):
10153 Detach(self, item) -> bool
10155 Detaches an item from the sizer without destroying it. This method
10156 does not cause any layout or resizing to take place, call `Layout` to
10157 do so. The *item* parameter can be either a window, a sizer, or the
10158 zero-based index of the item to be detached. Returns True if the child item
10159 was found and detached.
10161 return _core_
.Sizer_Detach(*args
, **kwargs
)
10163 def GetItem(*args
, **kwargs
):
10165 GetItem(self, item) -> wx.SizerItem
10167 Returns the `wx.SizerItem` which holds the *item* given. The *item*
10168 parameter can be either a window, a sizer, or the zero-based index of
10169 the item to be detached.
10171 return _core_
.Sizer_GetItem(*args
, **kwargs
)
10173 def _SetItemMinSize(*args
, **kwargs
):
10174 """_SetItemMinSize(self, PyObject item, Size size)"""
10175 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
10177 def SetItemMinSize(self
, item
, *args
):
10179 SetItemMinSize(self, item, Size size)
10181 Sets the minimum size that will be allocated for an item in the sizer.
10182 The *item* parameter can be either a window, a sizer, or the
10183 zero-based index of the item. If a window or sizer is given then it
10184 will be searched for recursivly in subsizers if neccessary.
10187 # for backward compatibility accept separate width,height args too
10188 return self
._SetItemMinSize
(item
, args
)
10190 return self
._SetItemMinSize
(item
, args
[0])
10192 def AddItem(*args
, **kwargs
):
10194 AddItem(self, SizerItem item)
10196 Adds a `wx.SizerItem` to the sizer.
10198 return _core_
.Sizer_AddItem(*args
, **kwargs
)
10200 def InsertItem(*args
, **kwargs
):
10202 InsertItem(self, int index, SizerItem item)
10204 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
10206 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
10208 def PrependItem(*args
, **kwargs
):
10210 PrependItem(self, SizerItem item)
10212 Prepends a `wx.SizerItem` to the sizer.
10214 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
10216 def AddMany(self
, items
):
10218 AddMany is a convenience method for adding several items
10219 to a sizer at one time. Simply pass it a list of tuples,
10220 where each tuple consists of the parameters that you
10221 would normally pass to the `Add` method.
10224 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
10228 # for backwards compatibility only, please do not use in new code
10229 def AddWindow(self
, *args
, **kw
):
10230 """Compatibility alias for `Add`."""
10231 return self
.Add(*args
, **kw
)
10232 def AddSizer(self
, *args
, **kw
):
10233 """Compatibility alias for `Add`."""
10234 return self
.Add(*args
, **kw
)
10235 def AddSpacer(self
, *args
, **kw
):
10236 """Compatibility alias for `Add`."""
10237 return self
.Add(*args
, **kw
)
10239 def PrependWindow(self
, *args
, **kw
):
10240 """Compatibility alias for `Prepend`."""
10241 return self
.Prepend(*args
, **kw
)
10242 def PrependSizer(self
, *args
, **kw
):
10243 """Compatibility alias for `Prepend`."""
10244 return self
.Prepend(*args
, **kw
)
10245 def PrependSpacer(self
, *args
, **kw
):
10246 """Compatibility alias for `Prepend`."""
10247 return self
.Prepend(*args
, **kw
)
10249 def InsertWindow(self
, *args
, **kw
):
10250 """Compatibility alias for `Insert`."""
10251 return self
.Insert(*args
, **kw
)
10252 def InsertSizer(self
, *args
, **kw
):
10253 """Compatibility alias for `Insert`."""
10254 return self
.Insert(*args
, **kw
)
10255 def InsertSpacer(self
, *args
, **kw
):
10256 """Compatibility alias for `Insert`."""
10257 return self
.Insert(*args
, **kw
)
10259 def RemoveWindow(self
, *args
, **kw
):
10260 """Compatibility alias for `Remove`."""
10261 return self
.Remove(*args
, **kw
)
10262 def RemoveSizer(self
, *args
, **kw
):
10263 """Compatibility alias for `Remove`."""
10264 return self
.Remove(*args
, **kw
)
10265 def RemovePos(self
, *args
, **kw
):
10266 """Compatibility alias for `Remove`."""
10267 return self
.Remove(*args
, **kw
)
10270 def SetDimension(*args
, **kwargs
):
10272 SetDimension(self, int x, int y, int width, int height)
10274 Call this to force the sizer to take the given dimension and thus
10275 force the items owned by the sizer to resize themselves according to
10276 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
10279 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
10281 def SetMinSize(*args
, **kwargs
):
10283 SetMinSize(self, Size size)
10285 Call this to give the sizer a minimal size. Normally, the sizer will
10286 calculate its minimal size based purely on how much space its children
10287 need. After calling this method `GetMinSize` will return either the
10288 minimal size as requested by its children or the minimal size set
10289 here, depending on which is bigger.
10291 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
10293 def GetSize(*args
, **kwargs
):
10295 GetSize(self) -> Size
10297 Returns the current size of the space managed by the sizer.
10299 return _core_
.Sizer_GetSize(*args
, **kwargs
)
10301 def GetPosition(*args
, **kwargs
):
10303 GetPosition(self) -> Point
10305 Returns the current position of the sizer's managed space.
10307 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
10309 def GetMinSize(*args
, **kwargs
):
10311 GetMinSize(self) -> Size
10313 Returns the minimal size of the sizer. This is either the combined
10314 minimal size of all the children and their borders or the minimal size
10315 set by SetMinSize, depending on which is bigger.
10317 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
10319 def GetSizeTuple(self
):
10320 return self
.GetSize().Get()
10321 def GetPositionTuple(self
):
10322 return self
.GetPosition().Get()
10323 def GetMinSizeTuple(self
):
10324 return self
.GetMinSize().Get()
10326 def RecalcSizes(*args
, **kwargs
):
10330 Using the sizes calculated by `CalcMin` reposition and resize all the
10331 items managed by this sizer. You should not need to call this directly as
10332 it is called by `Layout`.
10334 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
10336 def CalcMin(*args
, **kwargs
):
10338 CalcMin(self) -> Size
10340 This method is where the sizer will do the actual calculation of its
10341 children's minimal sizes. You should not need to call this directly as
10342 it is called by `Layout`.
10344 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
10346 def Layout(*args
, **kwargs
):
10350 This method will force the recalculation and layout of the items
10351 controlled by the sizer using the current space allocated to the
10352 sizer. Normally this is called automatically from the owning window's
10353 EVT_SIZE handler, but it is also useful to call it from user code when
10354 one of the items in a sizer change size, or items are added or
10357 return _core_
.Sizer_Layout(*args
, **kwargs
)
10359 def Fit(*args
, **kwargs
):
10361 Fit(self, Window window) -> Size
10363 Tell the sizer to resize the *window* to match the sizer's minimal
10364 size. This is commonly done in the constructor of the window itself in
10365 order to set its initial size to match the needs of the children as
10366 determined by the sizer. Returns the new size.
10368 For a top level window this is the total window size, not the client size.
10370 return _core_
.Sizer_Fit(*args
, **kwargs
)
10372 def FitInside(*args
, **kwargs
):
10374 FitInside(self, Window window)
10376 Tell the sizer to resize the *virtual size* of the *window* to match the
10377 sizer's minimal size. This will not alter the on screen size of the
10378 window, but may cause the addition/removal/alteration of scrollbars
10379 required to view the virtual area in windows which manage it.
10381 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
10384 return _core_
.Sizer_FitInside(*args
, **kwargs
)
10386 def SetSizeHints(*args
, **kwargs
):
10388 SetSizeHints(self, Window window)
10390 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
10391 match the sizer's minimal size. This is commonly done in the
10392 constructor of the window itself if the window is resizable (as are
10393 many dialogs under Unix and frames on probably all platforms) in order
10394 to prevent the window from being sized smaller than the minimal size
10395 required by the sizer.
10397 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
10399 def SetVirtualSizeHints(*args
, **kwargs
):
10401 SetVirtualSizeHints(self, Window window)
10403 Tell the sizer to set the minimal size of the window virtual area to
10404 match the sizer's minimal size. For windows with managed scrollbars
10405 this will set them appropriately.
10407 :see: `wx.ScrolledWindow.SetScrollbars`
10410 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
10412 def Clear(*args
, **kwargs
):
10414 Clear(self, bool deleteWindows=False)
10416 Clear all items from the sizer, optionally destroying the window items
10419 return _core_
.Sizer_Clear(*args
, **kwargs
)
10421 def DeleteWindows(*args
, **kwargs
):
10423 DeleteWindows(self)
10425 Destroy all windows managed by the sizer.
10427 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
10429 def GetChildren(*args
, **kwargs
):
10431 GetChildren(self) -> list
10433 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
10435 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
10437 def Show(*args
, **kwargs
):
10439 Show(self, item, bool show=True, bool recursive=false) -> bool
10441 Shows or hides an item managed by the sizer. To make a sizer item
10442 disappear or reappear, use Show followed by `Layout`. The *item*
10443 parameter can be either a window, a sizer, or the zero-based index of
10444 the item. Use the recursive parameter to show or hide an item in a
10445 subsizer. Returns True if the item was found.
10447 return _core_
.Sizer_Show(*args
, **kwargs
)
10449 def IsShown(*args
, **kwargs
):
10451 IsShown(self, item)
10453 Determines if the item is currently shown. sizer. To make a sizer
10454 item disappear or reappear, use Show followed by `Layout`. The *item*
10455 parameter can be either a window, a sizer, or the zero-based index of
10458 return _core_
.Sizer_IsShown(*args
, **kwargs
)
10460 def Hide(self
, item
, recursive
=False):
10462 A convenience method for `Show` (item, False, recursive).
10464 return self
.Show(item
, False, recursive
)
10466 def ShowItems(*args
, **kwargs
):
10468 ShowItems(self, bool show)
10470 Recursively call `wx.SizerItem.Show` on all sizer items.
10472 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
10475 class SizerPtr(Sizer
):
10476 def __init__(self
, this
):
10478 if not hasattr(self
,"thisown"): self
.thisown
= 0
10479 self
.__class
__ = Sizer
10480 _core_
.Sizer_swigregister(SizerPtr
)
10482 class PySizer(Sizer
):
10484 wx.PySizer is a special version of `wx.Sizer` that has been
10485 instrumented to allow the C++ virtual methods to be overloaded in
10486 Python derived classes. You would derive from this class if you are
10487 wanting to implement a custom sizer in Python code. Simply implement
10488 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
10491 class MySizer(wx.PySizer):
10492 def __init__(self):
10493 wx.PySizer.__init__(self)
10496 for item in self.GetChildren():
10497 # calculate the total minimum width and height needed
10498 # by all items in the sizer according to this sizer's
10499 # layout algorithm.
10501 return wx.Size(width, height)
10503 def RecalcSizes(self):
10504 # find the space allotted to this sizer
10505 pos = self.GetPosition()
10506 size = self.GetSize()
10507 for item in self.GetChildren():
10508 # Recalculate (if necessary) the position and size of
10509 # each item and then call item.SetDimension to do the
10510 # actual positioning and sizing of the items within the
10511 # space alloted to this sizer.
10513 item.SetDimension(itemPos, itemSize)
10516 When `Layout` is called it first calls `CalcMin` followed by
10517 `RecalcSizes` so you can optimize a bit by saving the results of
10518 `CalcMin` and reusing them in `RecalcSizes`.
10520 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
10524 def __repr__(self
):
10525 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10526 def __init__(self
, *args
, **kwargs
):
10528 __init__(self) -> PySizer
10530 Creates a wx.PySizer. Must be called from the __init__ in the derived
10533 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
10534 self
.this
= newobj
.this
10537 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
10539 def _setCallbackInfo(*args
, **kwargs
):
10540 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
10541 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
10544 class PySizerPtr(PySizer
):
10545 def __init__(self
, this
):
10547 if not hasattr(self
,"thisown"): self
.thisown
= 0
10548 self
.__class
__ = PySizer
10549 _core_
.PySizer_swigregister(PySizerPtr
)
10551 #---------------------------------------------------------------------------
10553 class BoxSizer(Sizer
):
10555 The basic idea behind a box sizer is that windows will most often be
10556 laid out in rather simple basic geometry, typically in a row or a
10557 column or nested hierarchies of either. A wx.BoxSizer will lay out
10558 its items in a simple row or column, depending on the orientation
10559 parameter passed to the constructor.
10561 def __repr__(self
):
10562 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10563 def __init__(self
, *args
, **kwargs
):
10565 __init__(self, int orient=HORIZONTAL) -> BoxSizer
10567 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
10568 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
10571 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
10572 self
.this
= newobj
.this
10575 self
._setOORInfo
(self
)
10577 def GetOrientation(*args
, **kwargs
):
10579 GetOrientation(self) -> int
10581 Returns the current orientation of the sizer.
10583 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
10585 def SetOrientation(*args
, **kwargs
):
10587 SetOrientation(self, int orient)
10589 Resets the orientation of the sizer.
10591 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
10594 class BoxSizerPtr(BoxSizer
):
10595 def __init__(self
, this
):
10597 if not hasattr(self
,"thisown"): self
.thisown
= 0
10598 self
.__class
__ = BoxSizer
10599 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
10601 #---------------------------------------------------------------------------
10603 class StaticBoxSizer(BoxSizer
):
10605 wx.StaticBoxSizer derives from and functions identically to the
10606 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10607 manages. Note that this static box must be created separately and
10608 passed to the sizer constructor.
10610 def __repr__(self
):
10611 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10612 def __init__(self
, *args
, **kwargs
):
10614 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10616 Constructor. It takes an associated static box and the orientation
10617 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10620 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
10621 self
.this
= newobj
.this
10624 self
._setOORInfo
(self
)
10626 def GetStaticBox(*args
, **kwargs
):
10628 GetStaticBox(self) -> StaticBox
10630 Returns the static box associated with this sizer.
10632 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
10635 class StaticBoxSizerPtr(StaticBoxSizer
):
10636 def __init__(self
, this
):
10638 if not hasattr(self
,"thisown"): self
.thisown
= 0
10639 self
.__class
__ = StaticBoxSizer
10640 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
10642 #---------------------------------------------------------------------------
10644 class GridSizer(Sizer
):
10646 A grid sizer is a sizer which lays out its children in a
10647 two-dimensional table with all cells having the same size. In other
10648 words, the width of each cell within the grid is the width of the
10649 widest item added to the sizer and the height of each grid cell is the
10650 height of the tallest item. An optional vertical and/or horizontal
10651 gap between items can also be specified (in pixels.)
10653 Items are placed in the cells of the grid in the order they are added,
10654 in row-major order. In other words, the first row is filled first,
10655 then the second, and so on until all items have been added. (If
10656 neccessary, additional rows will be added as items are added.) If you
10657 need to have greater control over the cells that items are placed in
10658 then use the `wx.GridBagSizer`.
10661 def __repr__(self
):
10662 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10663 def __init__(self
, *args
, **kwargs
):
10665 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10667 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10668 of columns and rows in the sizer - if either of the parameters is
10669 zero, it will be calculated to from the total number of children in
10670 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10671 define extra space between all children.
10673 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
10674 self
.this
= newobj
.this
10677 self
._setOORInfo
(self
)
10679 def SetCols(*args
, **kwargs
):
10681 SetCols(self, int cols)
10683 Sets the number of columns in the sizer.
10685 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
10687 def SetRows(*args
, **kwargs
):
10689 SetRows(self, int rows)
10691 Sets the number of rows in the sizer.
10693 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
10695 def SetVGap(*args
, **kwargs
):
10697 SetVGap(self, int gap)
10699 Sets the vertical gap (in pixels) between the cells in the sizer.
10701 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
10703 def SetHGap(*args
, **kwargs
):
10705 SetHGap(self, int gap)
10707 Sets the horizontal gap (in pixels) between cells in the sizer
10709 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
10711 def GetCols(*args
, **kwargs
):
10713 GetCols(self) -> int
10715 Returns the number of columns in the sizer.
10717 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
10719 def GetRows(*args
, **kwargs
):
10721 GetRows(self) -> int
10723 Returns the number of rows in the sizer.
10725 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
10727 def GetVGap(*args
, **kwargs
):
10729 GetVGap(self) -> int
10731 Returns the vertical gap (in pixels) between the cells in the sizer.
10733 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
10735 def GetHGap(*args
, **kwargs
):
10737 GetHGap(self) -> int
10739 Returns the horizontal gap (in pixels) between cells in the sizer.
10741 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
10744 class GridSizerPtr(GridSizer
):
10745 def __init__(self
, this
):
10747 if not hasattr(self
,"thisown"): self
.thisown
= 0
10748 self
.__class
__ = GridSizer
10749 _core_
.GridSizer_swigregister(GridSizerPtr
)
10751 #---------------------------------------------------------------------------
10753 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
10754 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
10755 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
10756 class FlexGridSizer(GridSizer
):
10758 A flex grid sizer is a sizer which lays out its children in a
10759 two-dimensional table with all table cells in one row having the same
10760 height and all cells in one column having the same width, but all
10761 rows or all columns are not necessarily the same height or width as in
10762 the `wx.GridSizer`.
10764 wx.FlexGridSizer can also size items equally in one direction but
10765 unequally ("flexibly") in the other. If the sizer is only flexible
10766 in one direction (this can be changed using `SetFlexibleDirection`), it
10767 needs to be decided how the sizer should grow in the other ("non
10768 flexible") direction in order to fill the available space. The
10769 `SetNonFlexibleGrowMode` method serves this purpose.
10773 def __repr__(self
):
10774 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10775 def __init__(self
, *args
, **kwargs
):
10777 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10779 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10780 number of columns and rows in the sizer - if either of the parameters
10781 is zero, it will be calculated to from the total number of children in
10782 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10783 define extra space between all children.
10785 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
10786 self
.this
= newobj
.this
10789 self
._setOORInfo
(self
)
10791 def AddGrowableRow(*args
, **kwargs
):
10793 AddGrowableRow(self, size_t idx, int proportion=0)
10795 Specifies that row *idx* (starting from zero) should be grown if there
10796 is extra space available to the sizer.
10798 The *proportion* parameter has the same meaning as the stretch factor
10799 for the box sizers except that if all proportions are 0, then all
10800 columns are resized equally (instead of not being resized at all).
10802 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
10804 def RemoveGrowableRow(*args
, **kwargs
):
10806 RemoveGrowableRow(self, size_t idx)
10808 Specifies that row *idx* is no longer growable.
10810 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
10812 def AddGrowableCol(*args
, **kwargs
):
10814 AddGrowableCol(self, size_t idx, int proportion=0)
10816 Specifies that column *idx* (starting from zero) should be grown if
10817 there is extra space available to the sizer.
10819 The *proportion* parameter has the same meaning as the stretch factor
10820 for the box sizers except that if all proportions are 0, then all
10821 columns are resized equally (instead of not being resized at all).
10823 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
10825 def RemoveGrowableCol(*args
, **kwargs
):
10827 RemoveGrowableCol(self, size_t idx)
10829 Specifies that column *idx* is no longer growable.
10831 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
10833 def SetFlexibleDirection(*args
, **kwargs
):
10835 SetFlexibleDirection(self, int direction)
10837 Specifies whether the sizer should flexibly resize its columns, rows,
10838 or both. Argument *direction* can be one of the following values. Any
10839 other value is ignored.
10841 ============== =======================================
10842 wx.VERTICAL Rows are flexibly sized.
10843 wx.HORIZONTAL Columns are flexibly sized.
10844 wx.BOTH Both rows and columns are flexibly sized
10845 (this is the default value).
10846 ============== =======================================
10848 Note that this method does not trigger relayout.
10851 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
10853 def GetFlexibleDirection(*args
, **kwargs
):
10855 GetFlexibleDirection(self) -> int
10857 Returns a value that specifies whether the sizer
10858 flexibly resizes its columns, rows, or both (default).
10860 :see: `SetFlexibleDirection`
10862 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
10864 def SetNonFlexibleGrowMode(*args
, **kwargs
):
10866 SetNonFlexibleGrowMode(self, int mode)
10868 Specifies how the sizer should grow in the non-flexible direction if
10869 there is one (so `SetFlexibleDirection` must have been called
10870 previously). Argument *mode* can be one of the following values:
10872 ========================== =================================================
10873 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10874 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10875 `AddGrowableCol` and `AddGrowableRow`. In this
10876 case equal sizing applies to minimum sizes of
10877 columns or rows (this is the default value).
10878 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10879 the non flexible direction, whether they are
10880 growable or not in the flexbile direction.
10881 ========================== =================================================
10883 Note that this method does not trigger relayout.
10887 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
10889 def GetNonFlexibleGrowMode(*args
, **kwargs
):
10891 GetNonFlexibleGrowMode(self) -> int
10893 Returns the value that specifies how the sizer grows in the
10894 non-flexible direction if there is one.
10896 :see: `SetNonFlexibleGrowMode`
10898 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
10900 def GetRowHeights(*args
, **kwargs
):
10902 GetRowHeights(self) -> list
10904 Returns a list of integers representing the heights of each of the
10907 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
10909 def GetColWidths(*args
, **kwargs
):
10911 GetColWidths(self) -> list
10913 Returns a list of integers representing the widths of each of the
10914 columns in the sizer.
10916 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
10919 class FlexGridSizerPtr(FlexGridSizer
):
10920 def __init__(self
, this
):
10922 if not hasattr(self
,"thisown"): self
.thisown
= 0
10923 self
.__class
__ = FlexGridSizer
10924 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
10926 class StdDialogButtonSizer(BoxSizer
):
10928 A special sizer that knows how to order and position standard buttons
10929 in order to conform to the current platform's standards. You simply
10930 need to add each `wx.Button` to the sizer, and be sure to create the
10931 buttons using the standard ID's. Then call `Realize` and the sizer
10932 will take care of the rest.
10935 def __repr__(self
):
10936 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10937 def __init__(self
, *args
, **kwargs
):
10938 """__init__(self) -> StdDialogButtonSizer"""
10939 newobj
= _core_
.new_StdDialogButtonSizer(*args
, **kwargs
)
10940 self
.this
= newobj
.this
10943 def AddButton(*args
, **kwargs
):
10945 AddButton(self, wxButton button)
10947 Use this to add the buttons to this sizer. Do not use the `Add`
10948 method in the base class.
10950 return _core_
.StdDialogButtonSizer_AddButton(*args
, **kwargs
)
10952 def Realize(*args
, **kwargs
):
10956 This funciton needs to be called after all the buttons have been added
10957 to the sizer. It will reorder them and position them in a platform
10960 return _core_
.StdDialogButtonSizer_Realize(*args
, **kwargs
)
10962 def SetAffirmativeButton(*args
, **kwargs
):
10963 """SetAffirmativeButton(self, wxButton button)"""
10964 return _core_
.StdDialogButtonSizer_SetAffirmativeButton(*args
, **kwargs
)
10966 def SetNegativeButton(*args
, **kwargs
):
10967 """SetNegativeButton(self, wxButton button)"""
10968 return _core_
.StdDialogButtonSizer_SetNegativeButton(*args
, **kwargs
)
10970 def SetCancelButton(*args
, **kwargs
):
10971 """SetCancelButton(self, wxButton button)"""
10972 return _core_
.StdDialogButtonSizer_SetCancelButton(*args
, **kwargs
)
10974 def GetAffirmativeButton(*args
, **kwargs
):
10975 """GetAffirmativeButton(self) -> wxButton"""
10976 return _core_
.StdDialogButtonSizer_GetAffirmativeButton(*args
, **kwargs
)
10978 def GetApplyButton(*args
, **kwargs
):
10979 """GetApplyButton(self) -> wxButton"""
10980 return _core_
.StdDialogButtonSizer_GetApplyButton(*args
, **kwargs
)
10982 def GetNegativeButton(*args
, **kwargs
):
10983 """GetNegativeButton(self) -> wxButton"""
10984 return _core_
.StdDialogButtonSizer_GetNegativeButton(*args
, **kwargs
)
10986 def GetCancelButton(*args
, **kwargs
):
10987 """GetCancelButton(self) -> wxButton"""
10988 return _core_
.StdDialogButtonSizer_GetCancelButton(*args
, **kwargs
)
10990 def GetHelpButton(*args
, **kwargs
):
10991 """GetHelpButton(self) -> wxButton"""
10992 return _core_
.StdDialogButtonSizer_GetHelpButton(*args
, **kwargs
)
10995 class StdDialogButtonSizerPtr(StdDialogButtonSizer
):
10996 def __init__(self
, this
):
10998 if not hasattr(self
,"thisown"): self
.thisown
= 0
10999 self
.__class
__ = StdDialogButtonSizer
11000 _core_
.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr
)
11002 #---------------------------------------------------------------------------
11004 class GBPosition(object):
11006 This class represents the position of an item in a virtual grid of
11007 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11008 typemaps that will automatically convert from a 2-element sequence of
11009 integers to a wx.GBPosition, so you can use the more pythonic
11010 representation of the position nearly transparently in Python code.
11012 def __repr__(self
):
11013 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11014 def __init__(self
, *args
, **kwargs
):
11016 __init__(self, int row=0, int col=0) -> GBPosition
11018 This class represents the position of an item in a virtual grid of
11019 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11020 typemaps that will automatically convert from a 2-element sequence of
11021 integers to a wx.GBPosition, so you can use the more pythonic
11022 representation of the position nearly transparently in Python code.
11024 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
11025 self
.this
= newobj
.this
11028 def GetRow(*args
, **kwargs
):
11029 """GetRow(self) -> int"""
11030 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
11032 def GetCol(*args
, **kwargs
):
11033 """GetCol(self) -> int"""
11034 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
11036 def SetRow(*args
, **kwargs
):
11037 """SetRow(self, int row)"""
11038 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
11040 def SetCol(*args
, **kwargs
):
11041 """SetCol(self, int col)"""
11042 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
11044 def __eq__(*args
, **kwargs
):
11045 """__eq__(self, GBPosition other) -> bool"""
11046 return _core_
.GBPosition___eq__(*args
, **kwargs
)
11048 def __ne__(*args
, **kwargs
):
11049 """__ne__(self, GBPosition other) -> bool"""
11050 return _core_
.GBPosition___ne__(*args
, **kwargs
)
11052 def Set(*args
, **kwargs
):
11053 """Set(self, int row=0, int col=0)"""
11054 return _core_
.GBPosition_Set(*args
, **kwargs
)
11056 def Get(*args
, **kwargs
):
11057 """Get(self) -> PyObject"""
11058 return _core_
.GBPosition_Get(*args
, **kwargs
)
11060 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
11061 def __str__(self
): return str(self
.Get())
11062 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
11063 def __len__(self
): return len(self
.Get())
11064 def __getitem__(self
, index
): return self
.Get()[index
]
11065 def __setitem__(self
, index
, val
):
11066 if index
== 0: self
.SetRow(val
)
11067 elif index
== 1: self
.SetCol(val
)
11068 else: raise IndexError
11069 def __nonzero__(self
): return self
.Get() != (0,0)
11070 __safe_for_unpickling__
= True
11071 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
11073 row
= property(GetRow
, SetRow
)
11074 col
= property(GetCol
, SetCol
)
11077 class GBPositionPtr(GBPosition
):
11078 def __init__(self
, this
):
11080 if not hasattr(self
,"thisown"): self
.thisown
= 0
11081 self
.__class
__ = GBPosition
11082 _core_
.GBPosition_swigregister(GBPositionPtr
)
11084 class GBSpan(object):
11086 This class is used to hold the row and column spanning attributes of
11087 items in a `wx.GridBagSizer`. wxPython has typemaps that will
11088 automatically convert from a 2-element sequence of integers to a
11089 wx.GBSpan, so you can use the more pythonic representation of the span
11090 nearly transparently in Python code.
11093 def __repr__(self
):
11094 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11095 def __init__(self
, *args
, **kwargs
):
11097 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
11099 Construct a new wxGBSpan, optionally setting the rowspan and
11100 colspan. The default is (1,1). (Meaning that the item occupies one
11101 cell in each direction.
11103 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
11104 self
.this
= newobj
.this
11107 def GetRowspan(*args
, **kwargs
):
11108 """GetRowspan(self) -> int"""
11109 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
11111 def GetColspan(*args
, **kwargs
):
11112 """GetColspan(self) -> int"""
11113 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
11115 def SetRowspan(*args
, **kwargs
):
11116 """SetRowspan(self, int rowspan)"""
11117 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
11119 def SetColspan(*args
, **kwargs
):
11120 """SetColspan(self, int colspan)"""
11121 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
11123 def __eq__(*args
, **kwargs
):
11124 """__eq__(self, GBSpan other) -> bool"""
11125 return _core_
.GBSpan___eq__(*args
, **kwargs
)
11127 def __ne__(*args
, **kwargs
):
11128 """__ne__(self, GBSpan other) -> bool"""
11129 return _core_
.GBSpan___ne__(*args
, **kwargs
)
11131 def Set(*args
, **kwargs
):
11132 """Set(self, int rowspan=1, int colspan=1)"""
11133 return _core_
.GBSpan_Set(*args
, **kwargs
)
11135 def Get(*args
, **kwargs
):
11136 """Get(self) -> PyObject"""
11137 return _core_
.GBSpan_Get(*args
, **kwargs
)
11139 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
11140 def __str__(self
): return str(self
.Get())
11141 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
11142 def __len__(self
): return len(self
.Get())
11143 def __getitem__(self
, index
): return self
.Get()[index
]
11144 def __setitem__(self
, index
, val
):
11145 if index
== 0: self
.SetRowspan(val
)
11146 elif index
== 1: self
.SetColspan(val
)
11147 else: raise IndexError
11148 def __nonzero__(self
): return self
.Get() != (0,0)
11149 __safe_for_unpickling__
= True
11150 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
11152 rowspan
= property(GetRowspan
, SetRowspan
)
11153 colspan
= property(GetColspan
, SetColspan
)
11156 class GBSpanPtr(GBSpan
):
11157 def __init__(self
, this
):
11159 if not hasattr(self
,"thisown"): self
.thisown
= 0
11160 self
.__class
__ = GBSpan
11161 _core_
.GBSpan_swigregister(GBSpanPtr
)
11163 class GBSizerItem(SizerItem
):
11165 The wx.GBSizerItem class is used to track the additional data about
11166 items in a `wx.GridBagSizer` such as the item's position in the grid
11167 and how many rows or columns it spans.
11170 def __repr__(self
):
11171 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11172 def __init__(self
, *args
, **kwargs
):
11174 __init__(self) -> GBSizerItem
11176 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
11177 size will need to be set, as well as a position and span before this
11178 item can be used in a Sizer.
11180 You will probably never need to create a wx.GBSizerItem directly as they
11181 are created automatically when the sizer's Add method is called.
11183 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
11184 self
.this
= newobj
.this
11187 def GetPos(*args
, **kwargs
):
11189 GetPos(self) -> GBPosition
11191 Get the grid position of the item
11193 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
11195 def GetPosTuple(self
): return self
.GetPos().Get()
11196 def GetSpan(*args
, **kwargs
):
11198 GetSpan(self) -> GBSpan
11200 Get the row and column spanning of the item
11202 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
11204 def GetSpanTuple(self
): return self
.GetSpan().Get()
11205 def SetPos(*args
, **kwargs
):
11207 SetPos(self, GBPosition pos) -> bool
11209 If the item is already a member of a sizer then first ensure that
11210 there is no other item that would intersect with this one at the new
11211 position, then set the new position. Returns True if the change is
11212 successful and after the next Layout() the item will be moved.
11214 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
11216 def SetSpan(*args
, **kwargs
):
11218 SetSpan(self, GBSpan span) -> bool
11220 If the item is already a member of a sizer then first ensure that
11221 there is no other item that would intersect with this one with its new
11222 spanning size, then set the new spanning. Returns True if the change
11223 is successful and after the next Layout() the item will be resized.
11226 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
11228 def Intersects(*args
, **kwargs
):
11230 Intersects(self, GBSizerItem other) -> bool
11232 Returns True if this item and the other item instersect.
11234 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
11236 def IntersectsPos(*args
, **kwargs
):
11238 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
11240 Returns True if the given pos/span would intersect with this item.
11242 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
11244 def GetEndPos(*args
, **kwargs
):
11246 GetEndPos(self) -> GBPosition
11248 Get the row and column of the endpoint of this item.
11250 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
11252 def GetGBSizer(*args
, **kwargs
):
11254 GetGBSizer(self) -> GridBagSizer
11256 Get the sizer this item is a member of.
11258 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
11260 def SetGBSizer(*args
, **kwargs
):
11262 SetGBSizer(self, GridBagSizer sizer)
11264 Set the sizer this item is a member of.
11266 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
11269 class GBSizerItemPtr(GBSizerItem
):
11270 def __init__(self
, this
):
11272 if not hasattr(self
,"thisown"): self
.thisown
= 0
11273 self
.__class
__ = GBSizerItem
11274 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
11275 DefaultSpan
= cvar
.DefaultSpan
11277 def GBSizerItemWindow(*args
, **kwargs
):
11279 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
11280 int border, PyObject userData=None) -> GBSizerItem
11282 Construct a `wx.GBSizerItem` for a window.
11284 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
11288 def GBSizerItemSizer(*args
, **kwargs
):
11290 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
11291 int border, PyObject userData=None) -> GBSizerItem
11293 Construct a `wx.GBSizerItem` for a sizer
11295 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
11299 def GBSizerItemSpacer(*args
, **kwargs
):
11301 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
11302 int flag, int border, PyObject userData=None) -> GBSizerItem
11304 Construct a `wx.GBSizerItem` for a spacer.
11306 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
11310 class GridBagSizer(FlexGridSizer
):
11312 A `wx.Sizer` that can lay out items in a virtual grid like a
11313 `wx.FlexGridSizer` but in this case explicit positioning of the items
11314 is allowed using `wx.GBPosition`, and items can optionally span more
11315 than one row and/or column using `wx.GBSpan`. The total size of the
11316 virtual grid is determined by the largest row and column that items are
11317 positioned at, adjusted for spanning.
11320 def __repr__(self
):
11321 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11322 def __init__(self
, *args
, **kwargs
):
11324 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
11326 Constructor, with optional parameters to specify the gap between the
11329 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
11330 self
.this
= newobj
.this
11333 self
._setOORInfo
(self
)
11335 def Add(*args
, **kwargs
):
11337 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
11338 int border=0, userData=None) -> wx.GBSizerItem
11340 Adds an item to the sizer at the grid cell *pos*, optionally spanning
11341 more than one row or column as specified with *span*. The remaining
11342 args behave similarly to `wx.Sizer.Add`.
11344 Returns True if the item was successfully placed at the given cell
11345 position, False if something was already there.
11348 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
11350 def AddItem(*args
, **kwargs
):
11352 Add(self, GBSizerItem item) -> wx.GBSizerItem
11354 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
11355 the item was successfully placed at its given cell position, False if
11356 something was already there.
11358 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
11360 def GetCellSize(*args
, **kwargs
):
11362 GetCellSize(self, int row, int col) -> Size
11364 Get the size of the specified cell, including hgap and
11365 vgap. Only valid after a Layout.
11367 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
11369 def GetEmptyCellSize(*args
, **kwargs
):
11371 GetEmptyCellSize(self) -> Size
11373 Get the size used for cells in the grid with no item.
11375 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
11377 def SetEmptyCellSize(*args
, **kwargs
):
11379 SetEmptyCellSize(self, Size sz)
11381 Set the size used for cells in the grid with no item.
11383 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
11385 def GetItemPosition(*args
):
11387 GetItemPosition(self, item) -> GBPosition
11389 Get the grid position of the specified *item* where *item* is either a
11390 window or subsizer that is a member of this sizer, or a zero-based
11393 return _core_
.GridBagSizer_GetItemPosition(*args
)
11395 def SetItemPosition(*args
):
11397 SetItemPosition(self, item, GBPosition pos) -> bool
11399 Set the grid position of the specified *item* where *item* is either a
11400 window or subsizer that is a member of this sizer, or a zero-based
11401 index of an item. Returns True on success. If the move is not
11402 allowed (because an item is already there) then False is returned.
11405 return _core_
.GridBagSizer_SetItemPosition(*args
)
11407 def GetItemSpan(*args
):
11409 GetItemSpan(self, item) -> GBSpan
11411 Get the row/col spanning of the specified *item* where *item* is
11412 either a window or subsizer that is a member of this sizer, or a
11413 zero-based index of an item.
11415 return _core_
.GridBagSizer_GetItemSpan(*args
)
11417 def SetItemSpan(*args
):
11419 SetItemSpan(self, item, GBSpan span) -> bool
11421 Set the row/col spanning of the specified *item* where *item* is
11422 either a window or subsizer that is a member of this sizer, or a
11423 zero-based index of an item. Returns True on success. If the move is
11424 not allowed (because an item is already there) then False is returned.
11426 return _core_
.GridBagSizer_SetItemSpan(*args
)
11428 def FindItem(*args
):
11430 FindItem(self, item) -> GBSizerItem
11432 Find the sizer item for the given window or subsizer, returns None if
11433 not found. (non-recursive)
11435 return _core_
.GridBagSizer_FindItem(*args
)
11437 def FindItemAtPosition(*args
, **kwargs
):
11439 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
11441 Return the sizer item for the given grid cell, or None if there is no
11442 item at that position. (non-recursive)
11444 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
11446 def FindItemAtPoint(*args
, **kwargs
):
11448 FindItemAtPoint(self, Point pt) -> GBSizerItem
11450 Return the sizer item located at the point given in *pt*, or None if
11451 there is no item at that point. The (x,y) coordinates in pt correspond
11452 to the client coordinates of the window using the sizer for
11453 layout. (non-recursive)
11455 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
11457 def CheckForIntersection(*args
, **kwargs
):
11459 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
11461 Look at all items and see if any intersect (or would overlap) the
11462 given *item*. Returns True if so, False if there would be no overlap.
11463 If an *excludeItem* is given then it will not be checked for
11464 intersection, for example it may be the item we are checking the
11468 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
11470 def CheckForIntersectionPos(*args
, **kwargs
):
11472 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
11474 Look at all items and see if any intersect (or would overlap) the
11475 given position and span. Returns True if so, False if there would be
11476 no overlap. If an *excludeItem* is given then it will not be checked
11477 for intersection, for example it may be the item we are checking the
11480 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
11483 class GridBagSizerPtr(GridBagSizer
):
11484 def __init__(self
, this
):
11486 if not hasattr(self
,"thisown"): self
.thisown
= 0
11487 self
.__class
__ = GridBagSizer
11488 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
11490 #---------------------------------------------------------------------------
11494 Right
= _core_
.Right
11495 Bottom
= _core_
.Bottom
11496 Width
= _core_
.Width
11497 Height
= _core_
.Height
11498 Centre
= _core_
.Centre
11499 Center
= _core_
.Center
11500 CentreX
= _core_
.CentreX
11501 CentreY
= _core_
.CentreY
11502 Unconstrained
= _core_
.Unconstrained
11504 PercentOf
= _core_
.PercentOf
11505 Above
= _core_
.Above
11506 Below
= _core_
.Below
11507 LeftOf
= _core_
.LeftOf
11508 RightOf
= _core_
.RightOf
11509 SameAs
= _core_
.SameAs
11510 Absolute
= _core_
.Absolute
11511 class IndividualLayoutConstraint(Object
):
11513 Objects of this class are stored in the `wx.LayoutConstraints` class as
11514 one of eight possible constraints that a window can be involved in.
11515 You will never need to create an instance of
11516 wx.IndividualLayoutConstraint, rather you should create a
11517 `wx.LayoutConstraints` instance and use the individual contstraints
11520 def __init__(self
): raise RuntimeError, "No constructor defined"
11521 def __repr__(self
):
11522 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11523 def Set(*args
, **kwargs
):
11525 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
11527 Sets the properties of the constraint. Normally called by one of the
11528 convenience functions such as Above, RightOf, SameAs.
11530 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
11532 def LeftOf(*args
, **kwargs
):
11534 LeftOf(self, Window sibling, int marg=0)
11536 Constrains this edge to be to the left of the given window, with an
11537 optional margin. Implicitly, this is relative to the left edge of the
11540 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
11542 def RightOf(*args
, **kwargs
):
11544 RightOf(self, Window sibling, int marg=0)
11546 Constrains this edge to be to the right of the given window, with an
11547 optional margin. Implicitly, this is relative to the right edge of the
11550 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
11552 def Above(*args
, **kwargs
):
11554 Above(self, Window sibling, int marg=0)
11556 Constrains this edge to be above the given window, with an optional
11557 margin. Implicitly, this is relative to the top edge of the other
11560 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
11562 def Below(*args
, **kwargs
):
11564 Below(self, Window sibling, int marg=0)
11566 Constrains this edge to be below the given window, with an optional
11567 margin. Implicitly, this is relative to the bottom edge of the other
11570 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
11572 def SameAs(*args
, **kwargs
):
11574 SameAs(self, Window otherW, int edge, int marg=0)
11576 Constrains this edge or dimension to be to the same as the edge of the
11577 given window, with an optional margin.
11579 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
11581 def PercentOf(*args
, **kwargs
):
11583 PercentOf(self, Window otherW, int wh, int per)
11585 Constrains this edge or dimension to be to a percentage of the given
11586 window, with an optional margin.
11588 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
11590 def Absolute(*args
, **kwargs
):
11592 Absolute(self, int val)
11594 Constrains this edge or dimension to be the given absolute value.
11596 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
11598 def Unconstrained(*args
, **kwargs
):
11600 Unconstrained(self)
11602 Sets this edge or dimension to be unconstrained, that is, dependent on
11603 other edges and dimensions from which this value can be deduced.
11605 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
11607 def AsIs(*args
, **kwargs
):
11611 Sets this edge or constraint to be whatever the window's value is at
11612 the moment. If either of the width and height constraints are *as is*,
11613 the window will not be resized, but moved instead. This is important
11614 when considering panel items which are intended to have a default
11615 size, such as a button, which may take its size from the size of the
11618 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
11620 def GetOtherWindow(*args
, **kwargs
):
11621 """GetOtherWindow(self) -> Window"""
11622 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
11624 def GetMyEdge(*args
, **kwargs
):
11625 """GetMyEdge(self) -> int"""
11626 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
11628 def SetEdge(*args
, **kwargs
):
11629 """SetEdge(self, int which)"""
11630 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
11632 def SetValue(*args
, **kwargs
):
11633 """SetValue(self, int v)"""
11634 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
11636 def GetMargin(*args
, **kwargs
):
11637 """GetMargin(self) -> int"""
11638 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
11640 def SetMargin(*args
, **kwargs
):
11641 """SetMargin(self, int m)"""
11642 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
11644 def GetValue(*args
, **kwargs
):
11645 """GetValue(self) -> int"""
11646 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
11648 def GetPercent(*args
, **kwargs
):
11649 """GetPercent(self) -> int"""
11650 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
11652 def GetOtherEdge(*args
, **kwargs
):
11653 """GetOtherEdge(self) -> int"""
11654 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
11656 def GetDone(*args
, **kwargs
):
11657 """GetDone(self) -> bool"""
11658 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
11660 def SetDone(*args
, **kwargs
):
11661 """SetDone(self, bool d)"""
11662 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
11664 def GetRelationship(*args
, **kwargs
):
11665 """GetRelationship(self) -> int"""
11666 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
11668 def SetRelationship(*args
, **kwargs
):
11669 """SetRelationship(self, int r)"""
11670 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
11672 def ResetIfWin(*args
, **kwargs
):
11674 ResetIfWin(self, Window otherW) -> bool
11676 Reset constraint if it mentions otherWin
11678 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
11680 def SatisfyConstraint(*args
, **kwargs
):
11682 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11684 Try to satisfy constraint
11686 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
11688 def GetEdge(*args
, **kwargs
):
11690 GetEdge(self, int which, Window thisWin, Window other) -> int
11692 Get the value of this edge or dimension, or if this
11693 is not determinable, -1.
11695 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
11698 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
11699 def __init__(self
, this
):
11701 if not hasattr(self
,"thisown"): self
.thisown
= 0
11702 self
.__class
__ = IndividualLayoutConstraint
11703 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
11705 class LayoutConstraints(Object
):
11707 **Note:** constraints are now deprecated and you should use sizers
11710 Objects of this class can be associated with a window to define its
11711 layout constraints, with respect to siblings or its parent.
11713 The class consists of the following eight constraints of class
11714 wx.IndividualLayoutConstraint, some or all of which should be accessed
11715 directly to set the appropriate constraints.
11717 * left: represents the left hand edge of the window
11718 * right: represents the right hand edge of the window
11719 * top: represents the top edge of the window
11720 * bottom: represents the bottom edge of the window
11721 * width: represents the width of the window
11722 * height: represents the height of the window
11723 * centreX: represents the horizontal centre point of the window
11724 * centreY: represents the vertical centre point of the window
11726 Most constraints are initially set to have the relationship
11727 wxUnconstrained, which means that their values should be calculated by
11728 looking at known constraints. The exceptions are width and height,
11729 which are set to wxAsIs to ensure that if the user does not specify a
11730 constraint, the existing width and height will be used, to be
11731 compatible with panel items which often have take a default size. If
11732 the constraint is ``wx.AsIs``, the dimension will not be changed.
11734 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11737 def __repr__(self
):
11738 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11739 left
= property(_core_
.LayoutConstraints_left_get
)
11740 top
= property(_core_
.LayoutConstraints_top_get
)
11741 right
= property(_core_
.LayoutConstraints_right_get
)
11742 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
11743 width
= property(_core_
.LayoutConstraints_width_get
)
11744 height
= property(_core_
.LayoutConstraints_height_get
)
11745 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
11746 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
11747 def __init__(self
, *args
, **kwargs
):
11748 """__init__(self) -> LayoutConstraints"""
11749 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
11750 self
.this
= newobj
.this
11753 def SatisfyConstraints(*args
, **kwargs
):
11754 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11755 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
11757 def AreSatisfied(*args
, **kwargs
):
11758 """AreSatisfied(self) -> bool"""
11759 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
11762 class LayoutConstraintsPtr(LayoutConstraints
):
11763 def __init__(self
, this
):
11765 if not hasattr(self
,"thisown"): self
.thisown
= 0
11766 self
.__class
__ = LayoutConstraints
11767 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
11769 #----------------------------------------------------------------------------
11771 # Use Python's bool constants if available, make some if not
11775 __builtins__
.True = 1==1
11776 __builtins__
.False = 1==0
11777 def bool(value
): return not not value
11778 __builtins__
.bool = bool
11782 # workarounds for bad wxRTTI names
11783 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
11784 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
11785 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
11788 #----------------------------------------------------------------------------
11789 # Load version numbers from __version__... Ensure that major and minor
11790 # versions are the same for both wxPython and wxWidgets.
11792 from __version__
import *
11793 __version__
= VERSION_STRING
11795 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
11796 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
11797 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
11799 warnings
.warn("wxPython/wxWidgets release number mismatch")
11801 #----------------------------------------------------------------------------
11803 # Set wxPython's default string<-->unicode conversion encoding from
11804 # the locale, but only if Python's default hasn't been changed. (We
11805 # assume that if the user has customized it already then that is the
11806 # encoding we need to use as well.)
11808 # The encoding selected here is used when string or unicode objects
11809 # need to be converted in order to pass them to wxWidgets. Please be
11810 # aware that the default encoding within the same locale may be
11811 # slightly different on different platforms. For example, please see
11812 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11813 # between the common latin/roman encodings.
11815 default
= _sys
.getdefaultencoding()
11816 if default
== 'ascii':
11820 default
= locale
.getdefaultlocale()[1]
11821 codecs
.lookup(default
)
11822 except (ValueError, LookupError, TypeError):
11823 default
= _sys
.getdefaultencoding()
11827 wx
.SetDefaultPyEncoding(default
)
11830 #----------------------------------------------------------------------------
11832 class PyDeadObjectError(AttributeError):
11835 class _wxPyDeadObject(object):
11837 Instances of wx objects that are OOR capable will have their __class__
11838 changed to this class when the C++ object is deleted. This should help
11839 prevent crashes due to referencing a bogus C++ pointer.
11841 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11842 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11844 def __repr__(self
):
11845 if not hasattr(self
, "_name"):
11846 self
._name
= "[unknown]"
11847 return self
.reprStr
% self
._name
11849 def __getattr__(self
, *args
):
11850 if not hasattr(self
, "_name"):
11851 self
._name
= "[unknown]"
11852 raise PyDeadObjectError(self
.attrStr
% self
._name
)
11854 def __nonzero__(self
):
11859 class PyUnbornObjectError(AttributeError):
11862 class _wxPyUnbornObject(object):
11864 Some stock objects are created when the wx._core module is
11865 imported, but their C++ instance is not created until the wx.App
11866 object is created and initialized. These object instances will
11867 temporarily have their __class__ changed to this class so an
11868 exception will be raised if they are used before the C++ instance
11872 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11873 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
11875 def __repr__(self
):
11876 #if not hasattr(self, "_name"):
11877 # self._name = "[unknown]"
11878 return self
.reprStr
#% self._name
11880 def __getattr__(self
, *args
):
11881 #if not hasattr(self, "_name"):
11882 # self._name = "[unknown]"
11883 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
11885 def __nonzero__(self
):
11889 #----------------------------------------------------------------------------
11891 def CallAfter(callable, *args
, **kw
):
11893 Call the specified function after the current and pending event
11894 handlers have been completed. This is also good for making GUI
11895 method calls from non-GUI threads. Any extra positional or
11896 keyword args are passed on to the callable when it is called.
11898 :see: `wx.FutureCall`
11901 assert app
is not None, 'No wx.App created yet'
11903 if not hasattr(app
, "_CallAfterId"):
11904 app
._CallAfterId
= wx
.NewEventType()
11905 app
.Connect(-1, -1, app
._CallAfterId
,
11906 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
11908 evt
.SetEventType(app
._CallAfterId
)
11909 evt
.callable = callable
11912 wx
.PostEvent(app
, evt
)
11914 #----------------------------------------------------------------------------
11919 A convenience class for `wx.Timer`, that calls the given callable
11920 object once after the given amount of milliseconds, passing any
11921 positional or keyword args. The return value of the callable is
11922 availbale after it has been run with the `GetResult` method.
11924 If you don't need to get the return value or restart the timer
11925 then there is no need to hold a reference to this object. It will
11926 hold a reference to itself while the timer is running (the timer
11927 has a reference to self.Notify) but the cycle will be broken when
11928 the timer completes, automatically cleaning up the wx.FutureCall
11931 :see: `wx.CallAfter`
11933 def __init__(self
, millis
, callable, *args
, **kwargs
):
11934 self
.millis
= millis
11935 self
.callable = callable
11936 self
.SetArgs(*args
, **kwargs
)
11938 self
.running
= False
11939 self
.hasRun
= False
11948 def Start(self
, millis
=None, *args
, **kwargs
):
11950 (Re)start the timer
11952 self
.hasRun
= False
11953 if millis
is not None:
11954 self
.millis
= millis
11956 self
.SetArgs(*args
, **kwargs
)
11958 self
.timer
= wx
.PyTimer(self
.Notify
)
11959 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
11960 self
.running
= True
11966 Stop and destroy the timer.
11968 if self
.timer
is not None:
11973 def GetInterval(self
):
11974 if self
.timer
is not None:
11975 return self
.timer
.GetInterval()
11980 def IsRunning(self
):
11981 return self
.timer
is not None and self
.timer
.IsRunning()
11984 def SetArgs(self
, *args
, **kwargs
):
11986 (Re)set the args passed to the callable object. This is
11987 useful in conjunction with Restart if you want to schedule a
11988 new call to the same callable object but with different
11992 self
.kwargs
= kwargs
11998 def GetResult(self
):
12003 The timer has expired so call the callable.
12005 if self
.callable and getattr(self
.callable, 'im_self', True):
12007 self
.running
= False
12008 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
12010 if not self
.running
:
12011 # if it wasn't restarted, then cleanup
12012 wx
.CallAfter(self
.Stop
)
12016 #----------------------------------------------------------------------------
12017 # Control which items in this module should be documented by epydoc.
12018 # We allow only classes and functions, which will help reduce the size
12019 # of the docs by filtering out the zillions of constants, EVT objects,
12020 # and etc that don't make much sense by themselves, but are instead
12021 # documented (or will be) as part of the classes/functions/methods
12022 # where they should be used.
12026 A filter for epydoc that only allows non-Ptr classes and
12027 fucntions, in order to reduce the clutter in the API docs.
12029 def __init__(self
, globals):
12030 self
._globals
= globals
12032 def __call__(self
, name
):
12034 obj
= self
._globals
.get(name
, None)
12035 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
12037 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
12041 #----------------------------------------------------------------------------
12042 #----------------------------------------------------------------------------
12044 # Import other modules in this package that should show up in the
12045 # "core" wx namespace
12047 from _windows
import *
12048 from _controls
import *
12049 from _misc
import *
12052 # Fixup the stock objects since they can't be used yet. (They will be
12053 # restored in wx.PyApp.OnInit.)
12054 _core_
._wxPyFixStockObjects
()
12056 #----------------------------------------------------------------------------
12057 #----------------------------------------------------------------------------