1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
6 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
8 if isinstance(value
, class_type
):
9 self
.__dict
__[name
] = value
.this
10 if hasattr(value
,"thisown"): self
.__dict
__["thisown"] = value
.thisown
13 method
= class_type
.__swig
_setmethods
__.get(name
,None)
14 if method
: return method(self
,value
)
15 if (not static
) or hasattr(self
,name
) or (name
== "thisown"):
16 self
.__dict
__[name
] = value
18 raise AttributeError("You cannot add attributes to %s" % self
)
20 def _swig_setattr(self
,class_type
,name
,value
):
21 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
23 def _swig_getattr(self
,class_type
,name
):
24 method
= class_type
.__swig
_getmethods
__.get(name
,None)
25 if method
: return method(self
)
26 raise AttributeError,name
30 _object
= types
.ObjectType
32 except AttributeError:
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self
,name
,value
):
40 if hasattr(self
,name
) or (name
in ("this", "thisown")):
43 raise AttributeError("You cannot add attributes to %s" % self
)
47 #// Give a reference to the dictionary of this module to the C++ extension
49 _core_
._wxPySetDictionary
(vars())
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
54 wx
= _sys
.modules
[__name__
]
57 #----------------------------------------------------------------------------
59 def _deprecated(callable, msg
=None):
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
65 msg
= "%s is deprecated" % callable
66 def deprecatedWrapper(*args
, **kwargs
):
68 warnings
.warn(msg
, DeprecationWarning, stacklevel
=2)
69 return callable(*args
, **kwargs
)
70 deprecatedWrapper
.__doc
__ = msg
71 return deprecatedWrapper
74 #----------------------------------------------------------------------------
76 NOT_FOUND
= _core_
.NOT_FOUND
77 VSCROLL
= _core_
.VSCROLL
78 HSCROLL
= _core_
.HSCROLL
79 CAPTION
= _core_
.CAPTION
80 DOUBLE_BORDER
= _core_
.DOUBLE_BORDER
81 SUNKEN_BORDER
= _core_
.SUNKEN_BORDER
82 RAISED_BORDER
= _core_
.RAISED_BORDER
83 BORDER
= _core_
.BORDER
84 SIMPLE_BORDER
= _core_
.SIMPLE_BORDER
85 STATIC_BORDER
= _core_
.STATIC_BORDER
86 TRANSPARENT_WINDOW
= _core_
.TRANSPARENT_WINDOW
87 NO_BORDER
= _core_
.NO_BORDER
88 TAB_TRAVERSAL
= _core_
.TAB_TRAVERSAL
89 WANTS_CHARS
= _core_
.WANTS_CHARS
90 POPUP_WINDOW
= _core_
.POPUP_WINDOW
91 CENTER_FRAME
= _core_
.CENTER_FRAME
92 CENTRE_ON_SCREEN
= _core_
.CENTRE_ON_SCREEN
93 CENTER_ON_SCREEN
= _core_
.CENTER_ON_SCREEN
94 ED_CLIENT_MARGIN
= _core_
.ED_CLIENT_MARGIN
95 ED_BUTTONS_BOTTOM
= _core_
.ED_BUTTONS_BOTTOM
96 ED_BUTTONS_RIGHT
= _core_
.ED_BUTTONS_RIGHT
97 ED_STATIC_LINE
= _core_
.ED_STATIC_LINE
98 EXT_DIALOG_STYLE
= _core_
.EXT_DIALOG_STYLE
99 CLIP_CHILDREN
= _core_
.CLIP_CHILDREN
100 CLIP_SIBLINGS
= _core_
.CLIP_SIBLINGS
101 ALWAYS_SHOW_SB
= _core_
.ALWAYS_SHOW_SB
102 RETAINED
= _core_
.RETAINED
103 BACKINGSTORE
= _core_
.BACKINGSTORE
104 COLOURED
= _core_
.COLOURED
105 FIXED_LENGTH
= _core_
.FIXED_LENGTH
106 LB_NEEDED_SB
= _core_
.LB_NEEDED_SB
107 LB_ALWAYS_SB
= _core_
.LB_ALWAYS_SB
108 LB_SORT
= _core_
.LB_SORT
109 LB_SINGLE
= _core_
.LB_SINGLE
110 LB_MULTIPLE
= _core_
.LB_MULTIPLE
111 LB_EXTENDED
= _core_
.LB_EXTENDED
112 LB_OWNERDRAW
= _core_
.LB_OWNERDRAW
113 LB_HSCROLL
= _core_
.LB_HSCROLL
114 PROCESS_ENTER
= _core_
.PROCESS_ENTER
115 PASSWORD
= _core_
.PASSWORD
116 CB_SIMPLE
= _core_
.CB_SIMPLE
117 CB_DROPDOWN
= _core_
.CB_DROPDOWN
118 CB_SORT
= _core_
.CB_SORT
119 CB_READONLY
= _core_
.CB_READONLY
120 RA_HORIZONTAL
= _core_
.RA_HORIZONTAL
121 RA_VERTICAL
= _core_
.RA_VERTICAL
122 RA_SPECIFY_ROWS
= _core_
.RA_SPECIFY_ROWS
123 RA_SPECIFY_COLS
= _core_
.RA_SPECIFY_COLS
124 RB_GROUP
= _core_
.RB_GROUP
125 RB_SINGLE
= _core_
.RB_SINGLE
126 SL_HORIZONTAL
= _core_
.SL_HORIZONTAL
127 SL_VERTICAL
= _core_
.SL_VERTICAL
128 SL_AUTOTICKS
= _core_
.SL_AUTOTICKS
129 SL_LABELS
= _core_
.SL_LABELS
130 SL_LEFT
= _core_
.SL_LEFT
131 SL_TOP
= _core_
.SL_TOP
132 SL_RIGHT
= _core_
.SL_RIGHT
133 SL_BOTTOM
= _core_
.SL_BOTTOM
134 SL_BOTH
= _core_
.SL_BOTH
135 SL_SELRANGE
= _core_
.SL_SELRANGE
136 SB_HORIZONTAL
= _core_
.SB_HORIZONTAL
137 SB_VERTICAL
= _core_
.SB_VERTICAL
138 ST_SIZEGRIP
= _core_
.ST_SIZEGRIP
139 ST_NO_AUTORESIZE
= _core_
.ST_NO_AUTORESIZE
140 FLOOD_SURFACE
= _core_
.FLOOD_SURFACE
141 FLOOD_BORDER
= _core_
.FLOOD_BORDER
142 ODDEVEN_RULE
= _core_
.ODDEVEN_RULE
143 WINDING_RULE
= _core_
.WINDING_RULE
144 TOOL_TOP
= _core_
.TOOL_TOP
145 TOOL_BOTTOM
= _core_
.TOOL_BOTTOM
146 TOOL_LEFT
= _core_
.TOOL_LEFT
147 TOOL_RIGHT
= _core_
.TOOL_RIGHT
149 YES_NO
= _core_
.YES_NO
150 CANCEL
= _core_
.CANCEL
153 NO_DEFAULT
= _core_
.NO_DEFAULT
154 YES_DEFAULT
= _core_
.YES_DEFAULT
155 ICON_EXCLAMATION
= _core_
.ICON_EXCLAMATION
156 ICON_HAND
= _core_
.ICON_HAND
157 ICON_QUESTION
= _core_
.ICON_QUESTION
158 ICON_INFORMATION
= _core_
.ICON_INFORMATION
159 ICON_STOP
= _core_
.ICON_STOP
160 ICON_ASTERISK
= _core_
.ICON_ASTERISK
161 ICON_MASK
= _core_
.ICON_MASK
162 ICON_WARNING
= _core_
.ICON_WARNING
163 ICON_ERROR
= _core_
.ICON_ERROR
164 FORWARD
= _core_
.FORWARD
165 BACKWARD
= _core_
.BACKWARD
170 SIZE_AUTO_WIDTH
= _core_
.SIZE_AUTO_WIDTH
171 SIZE_AUTO_HEIGHT
= _core_
.SIZE_AUTO_HEIGHT
172 SIZE_AUTO
= _core_
.SIZE_AUTO
173 SIZE_USE_EXISTING
= _core_
.SIZE_USE_EXISTING
174 SIZE_ALLOW_MINUS_ONE
= _core_
.SIZE_ALLOW_MINUS_ONE
175 PORTRAIT
= _core_
.PORTRAIT
176 LANDSCAPE
= _core_
.LANDSCAPE
177 PRINT_QUALITY_HIGH
= _core_
.PRINT_QUALITY_HIGH
178 PRINT_QUALITY_MEDIUM
= _core_
.PRINT_QUALITY_MEDIUM
179 PRINT_QUALITY_LOW
= _core_
.PRINT_QUALITY_LOW
180 PRINT_QUALITY_DRAFT
= _core_
.PRINT_QUALITY_DRAFT
181 ID_ANY
= _core_
.ID_ANY
182 ID_SEPARATOR
= _core_
.ID_SEPARATOR
183 ID_LOWEST
= _core_
.ID_LOWEST
184 ID_OPEN
= _core_
.ID_OPEN
185 ID_CLOSE
= _core_
.ID_CLOSE
186 ID_NEW
= _core_
.ID_NEW
187 ID_SAVE
= _core_
.ID_SAVE
188 ID_SAVEAS
= _core_
.ID_SAVEAS
189 ID_REVERT
= _core_
.ID_REVERT
190 ID_EXIT
= _core_
.ID_EXIT
191 ID_UNDO
= _core_
.ID_UNDO
192 ID_REDO
= _core_
.ID_REDO
193 ID_HELP
= _core_
.ID_HELP
194 ID_PRINT
= _core_
.ID_PRINT
195 ID_PRINT_SETUP
= _core_
.ID_PRINT_SETUP
196 ID_PREVIEW
= _core_
.ID_PREVIEW
197 ID_ABOUT
= _core_
.ID_ABOUT
198 ID_HELP_CONTENTS
= _core_
.ID_HELP_CONTENTS
199 ID_HELP_COMMANDS
= _core_
.ID_HELP_COMMANDS
200 ID_HELP_PROCEDURES
= _core_
.ID_HELP_PROCEDURES
201 ID_HELP_CONTEXT
= _core_
.ID_HELP_CONTEXT
202 ID_CLOSE_ALL
= _core_
.ID_CLOSE_ALL
203 ID_PREFERENCES
= _core_
.ID_PREFERENCES
204 ID_CUT
= _core_
.ID_CUT
205 ID_COPY
= _core_
.ID_COPY
206 ID_PASTE
= _core_
.ID_PASTE
207 ID_CLEAR
= _core_
.ID_CLEAR
208 ID_FIND
= _core_
.ID_FIND
209 ID_DUPLICATE
= _core_
.ID_DUPLICATE
210 ID_SELECTALL
= _core_
.ID_SELECTALL
211 ID_DELETE
= _core_
.ID_DELETE
212 ID_REPLACE
= _core_
.ID_REPLACE
213 ID_REPLACE_ALL
= _core_
.ID_REPLACE_ALL
214 ID_PROPERTIES
= _core_
.ID_PROPERTIES
215 ID_VIEW_DETAILS
= _core_
.ID_VIEW_DETAILS
216 ID_VIEW_LARGEICONS
= _core_
.ID_VIEW_LARGEICONS
217 ID_VIEW_SMALLICONS
= _core_
.ID_VIEW_SMALLICONS
218 ID_VIEW_LIST
= _core_
.ID_VIEW_LIST
219 ID_VIEW_SORTDATE
= _core_
.ID_VIEW_SORTDATE
220 ID_VIEW_SORTNAME
= _core_
.ID_VIEW_SORTNAME
221 ID_VIEW_SORTSIZE
= _core_
.ID_VIEW_SORTSIZE
222 ID_VIEW_SORTTYPE
= _core_
.ID_VIEW_SORTTYPE
223 ID_FILE1
= _core_
.ID_FILE1
224 ID_FILE2
= _core_
.ID_FILE2
225 ID_FILE3
= _core_
.ID_FILE3
226 ID_FILE4
= _core_
.ID_FILE4
227 ID_FILE5
= _core_
.ID_FILE5
228 ID_FILE6
= _core_
.ID_FILE6
229 ID_FILE7
= _core_
.ID_FILE7
230 ID_FILE8
= _core_
.ID_FILE8
231 ID_FILE9
= _core_
.ID_FILE9
233 ID_CANCEL
= _core_
.ID_CANCEL
234 ID_APPLY
= _core_
.ID_APPLY
235 ID_YES
= _core_
.ID_YES
237 ID_STATIC
= _core_
.ID_STATIC
238 ID_FORWARD
= _core_
.ID_FORWARD
239 ID_BACKWARD
= _core_
.ID_BACKWARD
240 ID_DEFAULT
= _core_
.ID_DEFAULT
241 ID_MORE
= _core_
.ID_MORE
242 ID_SETUP
= _core_
.ID_SETUP
243 ID_RESET
= _core_
.ID_RESET
244 ID_CONTEXT_HELP
= _core_
.ID_CONTEXT_HELP
245 ID_YESTOALL
= _core_
.ID_YESTOALL
246 ID_NOTOALL
= _core_
.ID_NOTOALL
247 ID_ABORT
= _core_
.ID_ABORT
248 ID_RETRY
= _core_
.ID_RETRY
249 ID_IGNORE
= _core_
.ID_IGNORE
250 ID_ADD
= _core_
.ID_ADD
251 ID_REMOVE
= _core_
.ID_REMOVE
253 ID_DOWN
= _core_
.ID_DOWN
254 ID_HOME
= _core_
.ID_HOME
255 ID_REFRESH
= _core_
.ID_REFRESH
256 ID_STOP
= _core_
.ID_STOP
257 ID_INDEX
= _core_
.ID_INDEX
258 ID_BOLD
= _core_
.ID_BOLD
259 ID_ITALIC
= _core_
.ID_ITALIC
260 ID_JUSTIFY_CENTER
= _core_
.ID_JUSTIFY_CENTER
261 ID_JUSTIFY_FILL
= _core_
.ID_JUSTIFY_FILL
262 ID_JUSTIFY_RIGHT
= _core_
.ID_JUSTIFY_RIGHT
263 ID_JUSTIFY_LEFT
= _core_
.ID_JUSTIFY_LEFT
264 ID_UNDERLINE
= _core_
.ID_UNDERLINE
265 ID_INDENT
= _core_
.ID_INDENT
266 ID_UNINDENT
= _core_
.ID_UNINDENT
267 ID_ZOOM_100
= _core_
.ID_ZOOM_100
268 ID_ZOOM_FIT
= _core_
.ID_ZOOM_FIT
269 ID_ZOOM_IN
= _core_
.ID_ZOOM_IN
270 ID_ZOOM_OUT
= _core_
.ID_ZOOM_OUT
271 ID_UNDELETE
= _core_
.ID_UNDELETE
272 ID_REVERT_TO_SAVED
= _core_
.ID_REVERT_TO_SAVED
273 ID_HIGHEST
= _core_
.ID_HIGHEST
276 HIDE_READONLY
= _core_
.HIDE_READONLY
277 OVERWRITE_PROMPT
= _core_
.OVERWRITE_PROMPT
278 FILE_MUST_EXIST
= _core_
.FILE_MUST_EXIST
279 MULTIPLE
= _core_
.MULTIPLE
280 CHANGE_DIR
= _core_
.CHANGE_DIR
281 ACCEL_ALT
= _core_
.ACCEL_ALT
282 ACCEL_CTRL
= _core_
.ACCEL_CTRL
283 ACCEL_SHIFT
= _core_
.ACCEL_SHIFT
284 ACCEL_NORMAL
= _core_
.ACCEL_NORMAL
285 PD_AUTO_HIDE
= _core_
.PD_AUTO_HIDE
286 PD_APP_MODAL
= _core_
.PD_APP_MODAL
287 PD_CAN_ABORT
= _core_
.PD_CAN_ABORT
288 PD_ELAPSED_TIME
= _core_
.PD_ELAPSED_TIME
289 PD_ESTIMATED_TIME
= _core_
.PD_ESTIMATED_TIME
290 PD_REMAINING_TIME
= _core_
.PD_REMAINING_TIME
291 PD_SMOOTH
= _core_
.PD_SMOOTH
292 PD_CAN_SKIP
= _core_
.PD_CAN_SKIP
293 DD_NEW_DIR_BUTTON
= _core_
.DD_NEW_DIR_BUTTON
294 DD_DEFAULT_STYLE
= _core_
.DD_DEFAULT_STYLE
295 MENU_TEAROFF
= _core_
.MENU_TEAROFF
296 MB_DOCKABLE
= _core_
.MB_DOCKABLE
297 NO_FULL_REPAINT_ON_RESIZE
= _core_
.NO_FULL_REPAINT_ON_RESIZE
298 FULL_REPAINT_ON_RESIZE
= _core_
.FULL_REPAINT_ON_RESIZE
299 LI_HORIZONTAL
= _core_
.LI_HORIZONTAL
300 LI_VERTICAL
= _core_
.LI_VERTICAL
301 WS_EX_VALIDATE_RECURSIVELY
= _core_
.WS_EX_VALIDATE_RECURSIVELY
302 WS_EX_BLOCK_EVENTS
= _core_
.WS_EX_BLOCK_EVENTS
303 WS_EX_TRANSIENT
= _core_
.WS_EX_TRANSIENT
304 WS_EX_THEMED_BACKGROUND
= _core_
.WS_EX_THEMED_BACKGROUND
305 WS_EX_PROCESS_IDLE
= _core_
.WS_EX_PROCESS_IDLE
306 WS_EX_PROCESS_UI_UPDATES
= _core_
.WS_EX_PROCESS_UI_UPDATES
307 MM_TEXT
= _core_
.MM_TEXT
308 MM_LOMETRIC
= _core_
.MM_LOMETRIC
309 MM_HIMETRIC
= _core_
.MM_HIMETRIC
310 MM_LOENGLISH
= _core_
.MM_LOENGLISH
311 MM_HIENGLISH
= _core_
.MM_HIENGLISH
312 MM_TWIPS
= _core_
.MM_TWIPS
313 MM_ISOTROPIC
= _core_
.MM_ISOTROPIC
314 MM_ANISOTROPIC
= _core_
.MM_ANISOTROPIC
315 MM_POINTS
= _core_
.MM_POINTS
316 MM_METRIC
= _core_
.MM_METRIC
317 CENTRE
= _core_
.CENTRE
318 CENTER
= _core_
.CENTER
319 HORIZONTAL
= _core_
.HORIZONTAL
320 VERTICAL
= _core_
.VERTICAL
327 BOTTOM
= _core_
.BOTTOM
333 ALIGN_NOT
= _core_
.ALIGN_NOT
334 ALIGN_CENTER_HORIZONTAL
= _core_
.ALIGN_CENTER_HORIZONTAL
335 ALIGN_CENTRE_HORIZONTAL
= _core_
.ALIGN_CENTRE_HORIZONTAL
336 ALIGN_LEFT
= _core_
.ALIGN_LEFT
337 ALIGN_TOP
= _core_
.ALIGN_TOP
338 ALIGN_RIGHT
= _core_
.ALIGN_RIGHT
339 ALIGN_BOTTOM
= _core_
.ALIGN_BOTTOM
340 ALIGN_CENTER_VERTICAL
= _core_
.ALIGN_CENTER_VERTICAL
341 ALIGN_CENTRE_VERTICAL
= _core_
.ALIGN_CENTRE_VERTICAL
342 ALIGN_CENTER
= _core_
.ALIGN_CENTER
343 ALIGN_CENTRE
= _core_
.ALIGN_CENTRE
344 ALIGN_MASK
= _core_
.ALIGN_MASK
345 STRETCH_NOT
= _core_
.STRETCH_NOT
346 SHRINK
= _core_
.SHRINK
348 EXPAND
= _core_
.EXPAND
349 SHAPED
= _core_
.SHAPED
350 FIXED_MINSIZE
= _core_
.FIXED_MINSIZE
352 ADJUST_MINSIZE
= _core_
.ADJUST_MINSIZE
353 BORDER_DEFAULT
= _core_
.BORDER_DEFAULT
354 BORDER_NONE
= _core_
.BORDER_NONE
355 BORDER_STATIC
= _core_
.BORDER_STATIC
356 BORDER_SIMPLE
= _core_
.BORDER_SIMPLE
357 BORDER_RAISED
= _core_
.BORDER_RAISED
358 BORDER_SUNKEN
= _core_
.BORDER_SUNKEN
359 BORDER_DOUBLE
= _core_
.BORDER_DOUBLE
360 BORDER_MASK
= _core_
.BORDER_MASK
361 BG_STYLE_SYSTEM
= _core_
.BG_STYLE_SYSTEM
362 BG_STYLE_COLOUR
= _core_
.BG_STYLE_COLOUR
363 BG_STYLE_CUSTOM
= _core_
.BG_STYLE_CUSTOM
364 DEFAULT
= _core_
.DEFAULT
365 DECORATIVE
= _core_
.DECORATIVE
367 SCRIPT
= _core_
.SCRIPT
369 MODERN
= _core_
.MODERN
370 TELETYPE
= _core_
.TELETYPE
371 VARIABLE
= _core_
.VARIABLE
373 NORMAL
= _core_
.NORMAL
376 ITALIC
= _core_
.ITALIC
380 LONG_DASH
= _core_
.LONG_DASH
381 SHORT_DASH
= _core_
.SHORT_DASH
382 DOT_DASH
= _core_
.DOT_DASH
383 USER_DASH
= _core_
.USER_DASH
384 TRANSPARENT
= _core_
.TRANSPARENT
385 STIPPLE
= _core_
.STIPPLE
386 BDIAGONAL_HATCH
= _core_
.BDIAGONAL_HATCH
387 CROSSDIAG_HATCH
= _core_
.CROSSDIAG_HATCH
388 FDIAGONAL_HATCH
= _core_
.FDIAGONAL_HATCH
389 CROSS_HATCH
= _core_
.CROSS_HATCH
390 HORIZONTAL_HATCH
= _core_
.HORIZONTAL_HATCH
391 VERTICAL_HATCH
= _core_
.VERTICAL_HATCH
392 JOIN_BEVEL
= _core_
.JOIN_BEVEL
393 JOIN_MITER
= _core_
.JOIN_MITER
394 JOIN_ROUND
= _core_
.JOIN_ROUND
395 CAP_ROUND
= _core_
.CAP_ROUND
396 CAP_PROJECTING
= _core_
.CAP_PROJECTING
397 CAP_BUTT
= _core_
.CAP_BUTT
400 INVERT
= _core_
.INVERT
401 OR_REVERSE
= _core_
.OR_REVERSE
402 AND_REVERSE
= _core_
.AND_REVERSE
405 AND_INVERT
= _core_
.AND_INVERT
409 SRC_INVERT
= _core_
.SRC_INVERT
410 OR_INVERT
= _core_
.OR_INVERT
414 WXK_BACK
= _core_
.WXK_BACK
415 WXK_TAB
= _core_
.WXK_TAB
416 WXK_RETURN
= _core_
.WXK_RETURN
417 WXK_ESCAPE
= _core_
.WXK_ESCAPE
418 WXK_SPACE
= _core_
.WXK_SPACE
419 WXK_DELETE
= _core_
.WXK_DELETE
420 WXK_START
= _core_
.WXK_START
421 WXK_LBUTTON
= _core_
.WXK_LBUTTON
422 WXK_RBUTTON
= _core_
.WXK_RBUTTON
423 WXK_CANCEL
= _core_
.WXK_CANCEL
424 WXK_MBUTTON
= _core_
.WXK_MBUTTON
425 WXK_CLEAR
= _core_
.WXK_CLEAR
426 WXK_SHIFT
= _core_
.WXK_SHIFT
427 WXK_ALT
= _core_
.WXK_ALT
428 WXK_CONTROL
= _core_
.WXK_CONTROL
429 WXK_MENU
= _core_
.WXK_MENU
430 WXK_PAUSE
= _core_
.WXK_PAUSE
431 WXK_CAPITAL
= _core_
.WXK_CAPITAL
432 WXK_PRIOR
= _core_
.WXK_PRIOR
433 WXK_NEXT
= _core_
.WXK_NEXT
434 WXK_END
= _core_
.WXK_END
435 WXK_HOME
= _core_
.WXK_HOME
436 WXK_LEFT
= _core_
.WXK_LEFT
437 WXK_UP
= _core_
.WXK_UP
438 WXK_RIGHT
= _core_
.WXK_RIGHT
439 WXK_DOWN
= _core_
.WXK_DOWN
440 WXK_SELECT
= _core_
.WXK_SELECT
441 WXK_PRINT
= _core_
.WXK_PRINT
442 WXK_EXECUTE
= _core_
.WXK_EXECUTE
443 WXK_SNAPSHOT
= _core_
.WXK_SNAPSHOT
444 WXK_INSERT
= _core_
.WXK_INSERT
445 WXK_HELP
= _core_
.WXK_HELP
446 WXK_NUMPAD0
= _core_
.WXK_NUMPAD0
447 WXK_NUMPAD1
= _core_
.WXK_NUMPAD1
448 WXK_NUMPAD2
= _core_
.WXK_NUMPAD2
449 WXK_NUMPAD3
= _core_
.WXK_NUMPAD3
450 WXK_NUMPAD4
= _core_
.WXK_NUMPAD4
451 WXK_NUMPAD5
= _core_
.WXK_NUMPAD5
452 WXK_NUMPAD6
= _core_
.WXK_NUMPAD6
453 WXK_NUMPAD7
= _core_
.WXK_NUMPAD7
454 WXK_NUMPAD8
= _core_
.WXK_NUMPAD8
455 WXK_NUMPAD9
= _core_
.WXK_NUMPAD9
456 WXK_MULTIPLY
= _core_
.WXK_MULTIPLY
457 WXK_ADD
= _core_
.WXK_ADD
458 WXK_SEPARATOR
= _core_
.WXK_SEPARATOR
459 WXK_SUBTRACT
= _core_
.WXK_SUBTRACT
460 WXK_DECIMAL
= _core_
.WXK_DECIMAL
461 WXK_DIVIDE
= _core_
.WXK_DIVIDE
462 WXK_F1
= _core_
.WXK_F1
463 WXK_F2
= _core_
.WXK_F2
464 WXK_F3
= _core_
.WXK_F3
465 WXK_F4
= _core_
.WXK_F4
466 WXK_F5
= _core_
.WXK_F5
467 WXK_F6
= _core_
.WXK_F6
468 WXK_F7
= _core_
.WXK_F7
469 WXK_F8
= _core_
.WXK_F8
470 WXK_F9
= _core_
.WXK_F9
471 WXK_F10
= _core_
.WXK_F10
472 WXK_F11
= _core_
.WXK_F11
473 WXK_F12
= _core_
.WXK_F12
474 WXK_F13
= _core_
.WXK_F13
475 WXK_F14
= _core_
.WXK_F14
476 WXK_F15
= _core_
.WXK_F15
477 WXK_F16
= _core_
.WXK_F16
478 WXK_F17
= _core_
.WXK_F17
479 WXK_F18
= _core_
.WXK_F18
480 WXK_F19
= _core_
.WXK_F19
481 WXK_F20
= _core_
.WXK_F20
482 WXK_F21
= _core_
.WXK_F21
483 WXK_F22
= _core_
.WXK_F22
484 WXK_F23
= _core_
.WXK_F23
485 WXK_F24
= _core_
.WXK_F24
486 WXK_NUMLOCK
= _core_
.WXK_NUMLOCK
487 WXK_SCROLL
= _core_
.WXK_SCROLL
488 WXK_PAGEUP
= _core_
.WXK_PAGEUP
489 WXK_PAGEDOWN
= _core_
.WXK_PAGEDOWN
490 WXK_NUMPAD_SPACE
= _core_
.WXK_NUMPAD_SPACE
491 WXK_NUMPAD_TAB
= _core_
.WXK_NUMPAD_TAB
492 WXK_NUMPAD_ENTER
= _core_
.WXK_NUMPAD_ENTER
493 WXK_NUMPAD_F1
= _core_
.WXK_NUMPAD_F1
494 WXK_NUMPAD_F2
= _core_
.WXK_NUMPAD_F2
495 WXK_NUMPAD_F3
= _core_
.WXK_NUMPAD_F3
496 WXK_NUMPAD_F4
= _core_
.WXK_NUMPAD_F4
497 WXK_NUMPAD_HOME
= _core_
.WXK_NUMPAD_HOME
498 WXK_NUMPAD_LEFT
= _core_
.WXK_NUMPAD_LEFT
499 WXK_NUMPAD_UP
= _core_
.WXK_NUMPAD_UP
500 WXK_NUMPAD_RIGHT
= _core_
.WXK_NUMPAD_RIGHT
501 WXK_NUMPAD_DOWN
= _core_
.WXK_NUMPAD_DOWN
502 WXK_NUMPAD_PRIOR
= _core_
.WXK_NUMPAD_PRIOR
503 WXK_NUMPAD_PAGEUP
= _core_
.WXK_NUMPAD_PAGEUP
504 WXK_NUMPAD_NEXT
= _core_
.WXK_NUMPAD_NEXT
505 WXK_NUMPAD_PAGEDOWN
= _core_
.WXK_NUMPAD_PAGEDOWN
506 WXK_NUMPAD_END
= _core_
.WXK_NUMPAD_END
507 WXK_NUMPAD_BEGIN
= _core_
.WXK_NUMPAD_BEGIN
508 WXK_NUMPAD_INSERT
= _core_
.WXK_NUMPAD_INSERT
509 WXK_NUMPAD_DELETE
= _core_
.WXK_NUMPAD_DELETE
510 WXK_NUMPAD_EQUAL
= _core_
.WXK_NUMPAD_EQUAL
511 WXK_NUMPAD_MULTIPLY
= _core_
.WXK_NUMPAD_MULTIPLY
512 WXK_NUMPAD_ADD
= _core_
.WXK_NUMPAD_ADD
513 WXK_NUMPAD_SEPARATOR
= _core_
.WXK_NUMPAD_SEPARATOR
514 WXK_NUMPAD_SUBTRACT
= _core_
.WXK_NUMPAD_SUBTRACT
515 WXK_NUMPAD_DECIMAL
= _core_
.WXK_NUMPAD_DECIMAL
516 WXK_NUMPAD_DIVIDE
= _core_
.WXK_NUMPAD_DIVIDE
517 WXK_WINDOWS_LEFT
= _core_
.WXK_WINDOWS_LEFT
518 WXK_WINDOWS_RIGHT
= _core_
.WXK_WINDOWS_RIGHT
519 WXK_WINDOWS_MENU
= _core_
.WXK_WINDOWS_MENU
520 PAPER_NONE
= _core_
.PAPER_NONE
521 PAPER_LETTER
= _core_
.PAPER_LETTER
522 PAPER_LEGAL
= _core_
.PAPER_LEGAL
523 PAPER_A4
= _core_
.PAPER_A4
524 PAPER_CSHEET
= _core_
.PAPER_CSHEET
525 PAPER_DSHEET
= _core_
.PAPER_DSHEET
526 PAPER_ESHEET
= _core_
.PAPER_ESHEET
527 PAPER_LETTERSMALL
= _core_
.PAPER_LETTERSMALL
528 PAPER_TABLOID
= _core_
.PAPER_TABLOID
529 PAPER_LEDGER
= _core_
.PAPER_LEDGER
530 PAPER_STATEMENT
= _core_
.PAPER_STATEMENT
531 PAPER_EXECUTIVE
= _core_
.PAPER_EXECUTIVE
532 PAPER_A3
= _core_
.PAPER_A3
533 PAPER_A4SMALL
= _core_
.PAPER_A4SMALL
534 PAPER_A5
= _core_
.PAPER_A5
535 PAPER_B4
= _core_
.PAPER_B4
536 PAPER_B5
= _core_
.PAPER_B5
537 PAPER_FOLIO
= _core_
.PAPER_FOLIO
538 PAPER_QUARTO
= _core_
.PAPER_QUARTO
539 PAPER_10X14
= _core_
.PAPER_10X14
540 PAPER_11X17
= _core_
.PAPER_11X17
541 PAPER_NOTE
= _core_
.PAPER_NOTE
542 PAPER_ENV_9
= _core_
.PAPER_ENV_9
543 PAPER_ENV_10
= _core_
.PAPER_ENV_10
544 PAPER_ENV_11
= _core_
.PAPER_ENV_11
545 PAPER_ENV_12
= _core_
.PAPER_ENV_12
546 PAPER_ENV_14
= _core_
.PAPER_ENV_14
547 PAPER_ENV_DL
= _core_
.PAPER_ENV_DL
548 PAPER_ENV_C5
= _core_
.PAPER_ENV_C5
549 PAPER_ENV_C3
= _core_
.PAPER_ENV_C3
550 PAPER_ENV_C4
= _core_
.PAPER_ENV_C4
551 PAPER_ENV_C6
= _core_
.PAPER_ENV_C6
552 PAPER_ENV_C65
= _core_
.PAPER_ENV_C65
553 PAPER_ENV_B4
= _core_
.PAPER_ENV_B4
554 PAPER_ENV_B5
= _core_
.PAPER_ENV_B5
555 PAPER_ENV_B6
= _core_
.PAPER_ENV_B6
556 PAPER_ENV_ITALY
= _core_
.PAPER_ENV_ITALY
557 PAPER_ENV_MONARCH
= _core_
.PAPER_ENV_MONARCH
558 PAPER_ENV_PERSONAL
= _core_
.PAPER_ENV_PERSONAL
559 PAPER_FANFOLD_US
= _core_
.PAPER_FANFOLD_US
560 PAPER_FANFOLD_STD_GERMAN
= _core_
.PAPER_FANFOLD_STD_GERMAN
561 PAPER_FANFOLD_LGL_GERMAN
= _core_
.PAPER_FANFOLD_LGL_GERMAN
562 PAPER_ISO_B4
= _core_
.PAPER_ISO_B4
563 PAPER_JAPANESE_POSTCARD
= _core_
.PAPER_JAPANESE_POSTCARD
564 PAPER_9X11
= _core_
.PAPER_9X11
565 PAPER_10X11
= _core_
.PAPER_10X11
566 PAPER_15X11
= _core_
.PAPER_15X11
567 PAPER_ENV_INVITE
= _core_
.PAPER_ENV_INVITE
568 PAPER_LETTER_EXTRA
= _core_
.PAPER_LETTER_EXTRA
569 PAPER_LEGAL_EXTRA
= _core_
.PAPER_LEGAL_EXTRA
570 PAPER_TABLOID_EXTRA
= _core_
.PAPER_TABLOID_EXTRA
571 PAPER_A4_EXTRA
= _core_
.PAPER_A4_EXTRA
572 PAPER_LETTER_TRANSVERSE
= _core_
.PAPER_LETTER_TRANSVERSE
573 PAPER_A4_TRANSVERSE
= _core_
.PAPER_A4_TRANSVERSE
574 PAPER_LETTER_EXTRA_TRANSVERSE
= _core_
.PAPER_LETTER_EXTRA_TRANSVERSE
575 PAPER_A_PLUS
= _core_
.PAPER_A_PLUS
576 PAPER_B_PLUS
= _core_
.PAPER_B_PLUS
577 PAPER_LETTER_PLUS
= _core_
.PAPER_LETTER_PLUS
578 PAPER_A4_PLUS
= _core_
.PAPER_A4_PLUS
579 PAPER_A5_TRANSVERSE
= _core_
.PAPER_A5_TRANSVERSE
580 PAPER_B5_TRANSVERSE
= _core_
.PAPER_B5_TRANSVERSE
581 PAPER_A3_EXTRA
= _core_
.PAPER_A3_EXTRA
582 PAPER_A5_EXTRA
= _core_
.PAPER_A5_EXTRA
583 PAPER_B5_EXTRA
= _core_
.PAPER_B5_EXTRA
584 PAPER_A2
= _core_
.PAPER_A2
585 PAPER_A3_TRANSVERSE
= _core_
.PAPER_A3_TRANSVERSE
586 PAPER_A3_EXTRA_TRANSVERSE
= _core_
.PAPER_A3_EXTRA_TRANSVERSE
587 DUPLEX_SIMPLEX
= _core_
.DUPLEX_SIMPLEX
588 DUPLEX_HORIZONTAL
= _core_
.DUPLEX_HORIZONTAL
589 DUPLEX_VERTICAL
= _core_
.DUPLEX_VERTICAL
590 ITEM_SEPARATOR
= _core_
.ITEM_SEPARATOR
591 ITEM_NORMAL
= _core_
.ITEM_NORMAL
592 ITEM_CHECK
= _core_
.ITEM_CHECK
593 ITEM_RADIO
= _core_
.ITEM_RADIO
594 ITEM_MAX
= _core_
.ITEM_MAX
595 HT_NOWHERE
= _core_
.HT_NOWHERE
596 HT_SCROLLBAR_FIRST
= _core_
.HT_SCROLLBAR_FIRST
597 HT_SCROLLBAR_ARROW_LINE_1
= _core_
.HT_SCROLLBAR_ARROW_LINE_1
598 HT_SCROLLBAR_ARROW_LINE_2
= _core_
.HT_SCROLLBAR_ARROW_LINE_2
599 HT_SCROLLBAR_ARROW_PAGE_1
= _core_
.HT_SCROLLBAR_ARROW_PAGE_1
600 HT_SCROLLBAR_ARROW_PAGE_2
= _core_
.HT_SCROLLBAR_ARROW_PAGE_2
601 HT_SCROLLBAR_THUMB
= _core_
.HT_SCROLLBAR_THUMB
602 HT_SCROLLBAR_BAR_1
= _core_
.HT_SCROLLBAR_BAR_1
603 HT_SCROLLBAR_BAR_2
= _core_
.HT_SCROLLBAR_BAR_2
604 HT_SCROLLBAR_LAST
= _core_
.HT_SCROLLBAR_LAST
605 HT_WINDOW_OUTSIDE
= _core_
.HT_WINDOW_OUTSIDE
606 HT_WINDOW_INSIDE
= _core_
.HT_WINDOW_INSIDE
607 HT_WINDOW_VERT_SCROLLBAR
= _core_
.HT_WINDOW_VERT_SCROLLBAR
608 HT_WINDOW_HORZ_SCROLLBAR
= _core_
.HT_WINDOW_HORZ_SCROLLBAR
609 HT_WINDOW_CORNER
= _core_
.HT_WINDOW_CORNER
610 HT_MAX
= _core_
.HT_MAX
611 MOD_NONE
= _core_
.MOD_NONE
612 MOD_ALT
= _core_
.MOD_ALT
613 MOD_CONTROL
= _core_
.MOD_CONTROL
614 MOD_SHIFT
= _core_
.MOD_SHIFT
615 MOD_WIN
= _core_
.MOD_WIN
616 UPDATE_UI_NONE
= _core_
.UPDATE_UI_NONE
617 UPDATE_UI_RECURSE
= _core_
.UPDATE_UI_RECURSE
618 UPDATE_UI_FROMIDLE
= _core_
.UPDATE_UI_FROMIDLE
619 #---------------------------------------------------------------------------
621 class Object(object):
623 The base class for most wx objects, although in wxPython not
624 much functionality is needed nor exposed.
626 def __init__(self
): raise RuntimeError, "No constructor defined"
628 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
629 def GetClassName(*args
, **kwargs
):
631 GetClassName(self) -> String
633 Returns the class name of the C++ class using wxRTTI.
635 return _core_
.Object_GetClassName(*args
, **kwargs
)
637 def Destroy(*args
, **kwargs
):
641 Deletes the C++ object this Python object is a proxy for.
643 return _core_
.Object_Destroy(*args
, **kwargs
)
646 class ObjectPtr(Object
):
647 def __init__(self
, this
):
649 if not hasattr(self
,"thisown"): self
.thisown
= 0
650 self
.__class
__ = Object
651 _core_
.Object_swigregister(ObjectPtr
)
652 _wxPySetDictionary
= _core_
._wxPySetDictionary
654 _wxPyFixStockObjects
= _core_
._wxPyFixStockObjects
657 EmptyString
= cvar
.EmptyString
659 #---------------------------------------------------------------------------
661 BITMAP_TYPE_INVALID
= _core_
.BITMAP_TYPE_INVALID
662 BITMAP_TYPE_BMP
= _core_
.BITMAP_TYPE_BMP
663 BITMAP_TYPE_ICO
= _core_
.BITMAP_TYPE_ICO
664 BITMAP_TYPE_CUR
= _core_
.BITMAP_TYPE_CUR
665 BITMAP_TYPE_XBM
= _core_
.BITMAP_TYPE_XBM
666 BITMAP_TYPE_XBM_DATA
= _core_
.BITMAP_TYPE_XBM_DATA
667 BITMAP_TYPE_XPM
= _core_
.BITMAP_TYPE_XPM
668 BITMAP_TYPE_XPM_DATA
= _core_
.BITMAP_TYPE_XPM_DATA
669 BITMAP_TYPE_TIF
= _core_
.BITMAP_TYPE_TIF
670 BITMAP_TYPE_GIF
= _core_
.BITMAP_TYPE_GIF
671 BITMAP_TYPE_PNG
= _core_
.BITMAP_TYPE_PNG
672 BITMAP_TYPE_JPEG
= _core_
.BITMAP_TYPE_JPEG
673 BITMAP_TYPE_PNM
= _core_
.BITMAP_TYPE_PNM
674 BITMAP_TYPE_PCX
= _core_
.BITMAP_TYPE_PCX
675 BITMAP_TYPE_PICT
= _core_
.BITMAP_TYPE_PICT
676 BITMAP_TYPE_ICON
= _core_
.BITMAP_TYPE_ICON
677 BITMAP_TYPE_ANI
= _core_
.BITMAP_TYPE_ANI
678 BITMAP_TYPE_IFF
= _core_
.BITMAP_TYPE_IFF
679 BITMAP_TYPE_MACCURSOR
= _core_
.BITMAP_TYPE_MACCURSOR
680 BITMAP_TYPE_ANY
= _core_
.BITMAP_TYPE_ANY
681 CURSOR_NONE
= _core_
.CURSOR_NONE
682 CURSOR_ARROW
= _core_
.CURSOR_ARROW
683 CURSOR_RIGHT_ARROW
= _core_
.CURSOR_RIGHT_ARROW
684 CURSOR_BULLSEYE
= _core_
.CURSOR_BULLSEYE
685 CURSOR_CHAR
= _core_
.CURSOR_CHAR
686 CURSOR_CROSS
= _core_
.CURSOR_CROSS
687 CURSOR_HAND
= _core_
.CURSOR_HAND
688 CURSOR_IBEAM
= _core_
.CURSOR_IBEAM
689 CURSOR_LEFT_BUTTON
= _core_
.CURSOR_LEFT_BUTTON
690 CURSOR_MAGNIFIER
= _core_
.CURSOR_MAGNIFIER
691 CURSOR_MIDDLE_BUTTON
= _core_
.CURSOR_MIDDLE_BUTTON
692 CURSOR_NO_ENTRY
= _core_
.CURSOR_NO_ENTRY
693 CURSOR_PAINT_BRUSH
= _core_
.CURSOR_PAINT_BRUSH
694 CURSOR_PENCIL
= _core_
.CURSOR_PENCIL
695 CURSOR_POINT_LEFT
= _core_
.CURSOR_POINT_LEFT
696 CURSOR_POINT_RIGHT
= _core_
.CURSOR_POINT_RIGHT
697 CURSOR_QUESTION_ARROW
= _core_
.CURSOR_QUESTION_ARROW
698 CURSOR_RIGHT_BUTTON
= _core_
.CURSOR_RIGHT_BUTTON
699 CURSOR_SIZENESW
= _core_
.CURSOR_SIZENESW
700 CURSOR_SIZENS
= _core_
.CURSOR_SIZENS
701 CURSOR_SIZENWSE
= _core_
.CURSOR_SIZENWSE
702 CURSOR_SIZEWE
= _core_
.CURSOR_SIZEWE
703 CURSOR_SIZING
= _core_
.CURSOR_SIZING
704 CURSOR_SPRAYCAN
= _core_
.CURSOR_SPRAYCAN
705 CURSOR_WAIT
= _core_
.CURSOR_WAIT
706 CURSOR_WATCH
= _core_
.CURSOR_WATCH
707 CURSOR_BLANK
= _core_
.CURSOR_BLANK
708 CURSOR_DEFAULT
= _core_
.CURSOR_DEFAULT
709 CURSOR_COPY_ARROW
= _core_
.CURSOR_COPY_ARROW
710 CURSOR_ARROWWAIT
= _core_
.CURSOR_ARROWWAIT
711 CURSOR_MAX
= _core_
.CURSOR_MAX
712 #---------------------------------------------------------------------------
716 wx.Size is a useful data structure used to represent the size of
717 something. It simply contians integer width and height
718 proprtites. In most places in wxPython where a wx.Size is
719 expected a (width, height) tuple can be used instead.
722 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
723 width
= property(_core_
.Size_width_get
, _core_
.Size_width_set
)
724 height
= property(_core_
.Size_height_get
, _core_
.Size_height_set
)
725 x
= width
; y
= height
726 def __init__(self
, *args
, **kwargs
):
728 __init__(self, int w=0, int h=0) -> Size
730 Creates a size object.
732 newobj
= _core_
.new_Size(*args
, **kwargs
)
733 self
.this
= newobj
.this
736 def __del__(self
, destroy
=_core_
.delete_Size
):
739 if self
.thisown
: destroy(self
)
742 def __eq__(*args
, **kwargs
):
744 __eq__(self, Size sz) -> bool
746 Test for equality of wx.Size objects.
748 return _core_
.Size___eq__(*args
, **kwargs
)
750 def __ne__(*args
, **kwargs
):
752 __ne__(self, Size sz) -> bool
756 return _core_
.Size___ne__(*args
, **kwargs
)
758 def __add__(*args
, **kwargs
):
760 __add__(self, Size sz) -> Size
762 Add sz's proprties to this and return the result.
764 return _core_
.Size___add__(*args
, **kwargs
)
766 def __sub__(*args
, **kwargs
):
768 __sub__(self, Size sz) -> Size
770 Subtract sz's properties from this and return the result.
772 return _core_
.Size___sub__(*args
, **kwargs
)
774 def IncTo(*args
, **kwargs
):
778 Increments this object so that both of its dimensions are not less
779 than the corresponding dimensions of the size.
781 return _core_
.Size_IncTo(*args
, **kwargs
)
783 def DecTo(*args
, **kwargs
):
787 Decrements this object so that both of its dimensions are not greater
788 than the corresponding dimensions of the size.
790 return _core_
.Size_DecTo(*args
, **kwargs
)
792 def Set(*args
, **kwargs
):
794 Set(self, int w, int h)
796 Set both width and height.
798 return _core_
.Size_Set(*args
, **kwargs
)
800 def SetWidth(*args
, **kwargs
):
801 """SetWidth(self, int w)"""
802 return _core_
.Size_SetWidth(*args
, **kwargs
)
804 def SetHeight(*args
, **kwargs
):
805 """SetHeight(self, int h)"""
806 return _core_
.Size_SetHeight(*args
, **kwargs
)
808 def GetWidth(*args
, **kwargs
):
809 """GetWidth(self) -> int"""
810 return _core_
.Size_GetWidth(*args
, **kwargs
)
812 def GetHeight(*args
, **kwargs
):
813 """GetHeight(self) -> int"""
814 return _core_
.Size_GetHeight(*args
, **kwargs
)
816 def IsFullySpecified(*args
, **kwargs
):
818 IsFullySpecified(self) -> bool
820 Returns True if both components of the size are non-default values.
822 return _core_
.Size_IsFullySpecified(*args
, **kwargs
)
824 def SetDefaults(*args
, **kwargs
):
826 SetDefaults(self, Size size)
828 Combine this size with the other one replacing the default components
829 of this object (i.e. equal to -1) with those of the other.
831 return _core_
.Size_SetDefaults(*args
, **kwargs
)
833 def Get(*args
, **kwargs
):
835 Get() -> (width,height)
837 Returns the width and height properties as a tuple.
839 return _core_
.Size_Get(*args
, **kwargs
)
841 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
842 def __str__(self
): return str(self
.Get())
843 def __repr__(self
): return 'wx.Size'+str(self
.Get())
844 def __len__(self
): return len(self
.Get())
845 def __getitem__(self
, index
): return self
.Get()[index
]
846 def __setitem__(self
, index
, val
):
847 if index
== 0: self
.width
= val
848 elif index
== 1: self
.height
= val
849 else: raise IndexError
850 def __nonzero__(self
): return self
.Get() != (0,0)
851 __safe_for_unpickling__
= True
852 def __reduce__(self
): return (wx
.Size
, self
.Get())
856 def __init__(self
, this
):
858 if not hasattr(self
,"thisown"): self
.thisown
= 0
859 self
.__class
__ = Size
860 _core_
.Size_swigregister(SizePtr
)
862 #---------------------------------------------------------------------------
864 class RealPoint(object):
866 A data structure for representing a point or position with floating
867 point x and y properties. In wxPython most places that expect a
868 wx.RealPoint can also accept a (x,y) tuple.
871 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
872 x
= property(_core_
.RealPoint_x_get
, _core_
.RealPoint_x_set
)
873 y
= property(_core_
.RealPoint_y_get
, _core_
.RealPoint_y_set
)
874 def __init__(self
, *args
, **kwargs
):
876 __init__(self, double x=0.0, double y=0.0) -> RealPoint
878 Create a wx.RealPoint object
880 newobj
= _core_
.new_RealPoint(*args
, **kwargs
)
881 self
.this
= newobj
.this
884 def __del__(self
, destroy
=_core_
.delete_RealPoint
):
887 if self
.thisown
: destroy(self
)
890 def __eq__(*args
, **kwargs
):
892 __eq__(self, RealPoint pt) -> bool
894 Test for equality of wx.RealPoint objects.
896 return _core_
.RealPoint___eq__(*args
, **kwargs
)
898 def __ne__(*args
, **kwargs
):
900 __ne__(self, RealPoint pt) -> bool
902 Test for inequality of wx.RealPoint objects.
904 return _core_
.RealPoint___ne__(*args
, **kwargs
)
906 def __add__(*args
, **kwargs
):
908 __add__(self, RealPoint pt) -> RealPoint
910 Add pt's proprties to this and return the result.
912 return _core_
.RealPoint___add__(*args
, **kwargs
)
914 def __sub__(*args
, **kwargs
):
916 __sub__(self, RealPoint pt) -> RealPoint
918 Subtract pt's proprties from this and return the result
920 return _core_
.RealPoint___sub__(*args
, **kwargs
)
922 def Set(*args
, **kwargs
):
924 Set(self, double x, double y)
926 Set both the x and y properties
928 return _core_
.RealPoint_Set(*args
, **kwargs
)
930 def Get(*args
, **kwargs
):
934 Return the x and y properties as a tuple.
936 return _core_
.RealPoint_Get(*args
, **kwargs
)
938 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
939 def __str__(self
): return str(self
.Get())
940 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
941 def __len__(self
): return len(self
.Get())
942 def __getitem__(self
, index
): return self
.Get()[index
]
943 def __setitem__(self
, index
, val
):
944 if index
== 0: self
.x
= val
945 elif index
== 1: self
.y
= val
946 else: raise IndexError
947 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
948 __safe_for_unpickling__
= True
949 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
952 class RealPointPtr(RealPoint
):
953 def __init__(self
, this
):
955 if not hasattr(self
,"thisown"): self
.thisown
= 0
956 self
.__class
__ = RealPoint
957 _core_
.RealPoint_swigregister(RealPointPtr
)
959 #---------------------------------------------------------------------------
963 A data structure for representing a point or position with integer x
964 and y properties. Most places in wxPython that expect a wx.Point can
965 also accept a (x,y) tuple.
968 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
969 x
= property(_core_
.Point_x_get
, _core_
.Point_x_set
)
970 y
= property(_core_
.Point_y_get
, _core_
.Point_y_set
)
971 def __init__(self
, *args
, **kwargs
):
973 __init__(self, int x=0, int y=0) -> Point
975 Create a wx.Point object
977 newobj
= _core_
.new_Point(*args
, **kwargs
)
978 self
.this
= newobj
.this
981 def __del__(self
, destroy
=_core_
.delete_Point
):
984 if self
.thisown
: destroy(self
)
987 def __eq__(*args
, **kwargs
):
989 __eq__(self, Point pt) -> bool
991 Test for equality of wx.Point objects.
993 return _core_
.Point___eq__(*args
, **kwargs
)
995 def __ne__(*args
, **kwargs
):
997 __ne__(self, Point pt) -> bool
999 Test for inequality of wx.Point objects.
1001 return _core_
.Point___ne__(*args
, **kwargs
)
1003 def __add__(*args
, **kwargs
):
1005 __add__(self, Point pt) -> Point
1007 Add pt's proprties to this and return the result.
1009 return _core_
.Point___add__(*args
, **kwargs
)
1011 def __sub__(*args
, **kwargs
):
1013 __sub__(self, Point pt) -> Point
1015 Subtract pt's proprties from this and return the result
1017 return _core_
.Point___sub__(*args
, **kwargs
)
1019 def __iadd__(*args
, **kwargs
):
1021 __iadd__(self, Point pt) -> Point
1023 Add pt to this object.
1025 return _core_
.Point___iadd__(*args
, **kwargs
)
1027 def __isub__(*args
, **kwargs
):
1029 __isub__(self, Point pt) -> Point
1031 Subtract pt from this object.
1033 return _core_
.Point___isub__(*args
, **kwargs
)
1035 def Set(*args
, **kwargs
):
1037 Set(self, long x, long y)
1039 Set both the x and y properties
1041 return _core_
.Point_Set(*args
, **kwargs
)
1043 def Get(*args
, **kwargs
):
1047 Return the x and y properties as a tuple.
1049 return _core_
.Point_Get(*args
, **kwargs
)
1051 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1052 def __str__(self
): return str(self
.Get())
1053 def __repr__(self
): return 'wx.Point'+str(self
.Get())
1054 def __len__(self
): return len(self
.Get())
1055 def __getitem__(self
, index
): return self
.Get()[index
]
1056 def __setitem__(self
, index
, val
):
1057 if index
== 0: self
.x
= val
1058 elif index
== 1: self
.y
= val
1059 else: raise IndexError
1060 def __nonzero__(self
): return self
.Get() != (0,0)
1061 __safe_for_unpickling__
= True
1062 def __reduce__(self
): return (wx
.Point
, self
.Get())
1065 class PointPtr(Point
):
1066 def __init__(self
, this
):
1068 if not hasattr(self
,"thisown"): self
.thisown
= 0
1069 self
.__class
__ = Point
1070 _core_
.Point_swigregister(PointPtr
)
1072 #---------------------------------------------------------------------------
1076 A class for representing and manipulating rectangles. It has x, y,
1077 width and height properties. In wxPython most palces that expect a
1078 wx.Rect can also accept a (x,y,width,height) tuple.
1081 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1082 def __init__(self
, *args
, **kwargs
):
1084 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1086 Create a new Rect object.
1088 newobj
= _core_
.new_Rect(*args
, **kwargs
)
1089 self
.this
= newobj
.this
1092 def __del__(self
, destroy
=_core_
.delete_Rect
):
1095 if self
.thisown
: destroy(self
)
1098 def GetX(*args
, **kwargs
):
1099 """GetX(self) -> int"""
1100 return _core_
.Rect_GetX(*args
, **kwargs
)
1102 def SetX(*args
, **kwargs
):
1103 """SetX(self, int x)"""
1104 return _core_
.Rect_SetX(*args
, **kwargs
)
1106 def GetY(*args
, **kwargs
):
1107 """GetY(self) -> int"""
1108 return _core_
.Rect_GetY(*args
, **kwargs
)
1110 def SetY(*args
, **kwargs
):
1111 """SetY(self, int y)"""
1112 return _core_
.Rect_SetY(*args
, **kwargs
)
1114 def GetWidth(*args
, **kwargs
):
1115 """GetWidth(self) -> int"""
1116 return _core_
.Rect_GetWidth(*args
, **kwargs
)
1118 def SetWidth(*args
, **kwargs
):
1119 """SetWidth(self, int w)"""
1120 return _core_
.Rect_SetWidth(*args
, **kwargs
)
1122 def GetHeight(*args
, **kwargs
):
1123 """GetHeight(self) -> int"""
1124 return _core_
.Rect_GetHeight(*args
, **kwargs
)
1126 def SetHeight(*args
, **kwargs
):
1127 """SetHeight(self, int h)"""
1128 return _core_
.Rect_SetHeight(*args
, **kwargs
)
1130 def GetPosition(*args
, **kwargs
):
1131 """GetPosition(self) -> Point"""
1132 return _core_
.Rect_GetPosition(*args
, **kwargs
)
1134 def SetPosition(*args
, **kwargs
):
1135 """SetPosition(self, Point p)"""
1136 return _core_
.Rect_SetPosition(*args
, **kwargs
)
1138 def GetSize(*args
, **kwargs
):
1139 """GetSize(self) -> Size"""
1140 return _core_
.Rect_GetSize(*args
, **kwargs
)
1142 def SetSize(*args
, **kwargs
):
1143 """SetSize(self, Size s)"""
1144 return _core_
.Rect_SetSize(*args
, **kwargs
)
1146 def GetTopLeft(*args
, **kwargs
):
1147 """GetTopLeft(self) -> Point"""
1148 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1150 def SetTopLeft(*args
, **kwargs
):
1151 """SetTopLeft(self, Point p)"""
1152 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1154 def GetBottomRight(*args
, **kwargs
):
1155 """GetBottomRight(self) -> Point"""
1156 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1158 def SetBottomRight(*args
, **kwargs
):
1159 """SetBottomRight(self, Point p)"""
1160 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1162 def GetLeft(*args
, **kwargs
):
1163 """GetLeft(self) -> int"""
1164 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1166 def GetTop(*args
, **kwargs
):
1167 """GetTop(self) -> int"""
1168 return _core_
.Rect_GetTop(*args
, **kwargs
)
1170 def GetBottom(*args
, **kwargs
):
1171 """GetBottom(self) -> int"""
1172 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1174 def GetRight(*args
, **kwargs
):
1175 """GetRight(self) -> int"""
1176 return _core_
.Rect_GetRight(*args
, **kwargs
)
1178 def SetLeft(*args
, **kwargs
):
1179 """SetLeft(self, int left)"""
1180 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1182 def SetRight(*args
, **kwargs
):
1183 """SetRight(self, int right)"""
1184 return _core_
.Rect_SetRight(*args
, **kwargs
)
1186 def SetTop(*args
, **kwargs
):
1187 """SetTop(self, int top)"""
1188 return _core_
.Rect_SetTop(*args
, **kwargs
)
1190 def SetBottom(*args
, **kwargs
):
1191 """SetBottom(self, int bottom)"""
1192 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1194 position
= property(GetPosition
, SetPosition
)
1195 size
= property(GetSize
, SetSize
)
1196 left
= property(GetLeft
, SetLeft
)
1197 right
= property(GetRight
, SetRight
)
1198 top
= property(GetTop
, SetTop
)
1199 bottom
= property(GetBottom
, SetBottom
)
1201 def Inflate(*args
, **kwargs
):
1203 Inflate(self, int dx, int dy) -> Rect
1205 Increase the rectangle size by dx in x direction and dy in y
1206 direction. Both (or one of) parameters may be negative to decrease the
1209 return _core_
.Rect_Inflate(*args
, **kwargs
)
1211 def Deflate(*args
, **kwargs
):
1213 Deflate(self, int dx, int dy) -> Rect
1215 Decrease the rectangle size by dx in x direction and dy in y
1216 direction. Both (or one of) parameters may be negative to increase the
1217 rectngle size. This method is the opposite of Inflate.
1219 return _core_
.Rect_Deflate(*args
, **kwargs
)
1221 def OffsetXY(*args
, **kwargs
):
1223 OffsetXY(self, int dx, int dy)
1225 Moves the rectangle by the specified offset. If dx is positive, the
1226 rectangle is moved to the right, if dy is positive, it is moved to the
1227 bottom, otherwise it is moved to the left or top respectively.
1229 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1231 def Offset(*args
, **kwargs
):
1233 Offset(self, Point pt)
1235 Same as OffsetXY but uses dx,dy from Point
1237 return _core_
.Rect_Offset(*args
, **kwargs
)
1239 def Intersect(*args
, **kwargs
):
1241 Intersect(self, Rect rect) -> Rect
1243 Returns the intersectsion of this rectangle and rect.
1245 return _core_
.Rect_Intersect(*args
, **kwargs
)
1247 def Union(*args
, **kwargs
):
1249 Union(self, Rect rect) -> Rect
1251 Returns the union of this rectangle and rect.
1253 return _core_
.Rect_Union(*args
, **kwargs
)
1255 def __add__(*args
, **kwargs
):
1257 __add__(self, Rect rect) -> Rect
1259 Add the properties of rect to this rectangle and return the result.
1261 return _core_
.Rect___add__(*args
, **kwargs
)
1263 def __iadd__(*args
, **kwargs
):
1265 __iadd__(self, Rect rect) -> Rect
1267 Add the properties of rect to this rectangle, updating this rectangle.
1269 return _core_
.Rect___iadd__(*args
, **kwargs
)
1271 def __eq__(*args
, **kwargs
):
1273 __eq__(self, Rect rect) -> bool
1277 return _core_
.Rect___eq__(*args
, **kwargs
)
1279 def __ne__(*args
, **kwargs
):
1281 __ne__(self, Rect rect) -> bool
1283 Test for inequality.
1285 return _core_
.Rect___ne__(*args
, **kwargs
)
1287 def InsideXY(*args
, **kwargs
):
1289 InsideXY(self, int x, int y) -> bool
1291 Return True if the point is (not strcitly) inside the rect.
1293 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1295 def Inside(*args
, **kwargs
):
1297 Inside(self, Point pt) -> bool
1299 Return True if the point is (not strcitly) inside the rect.
1301 return _core_
.Rect_Inside(*args
, **kwargs
)
1303 def Intersects(*args
, **kwargs
):
1305 Intersects(self, Rect rect) -> bool
1307 Returns True if the rectangles have a non empty intersection.
1309 return _core_
.Rect_Intersects(*args
, **kwargs
)
1311 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1312 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1313 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1314 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1315 def Set(*args
, **kwargs
):
1317 Set(self, int x=0, int y=0, int width=0, int height=0)
1319 Set all rectangle properties.
1321 return _core_
.Rect_Set(*args
, **kwargs
)
1323 def Get(*args
, **kwargs
):
1325 Get() -> (x,y,width,height)
1327 Return the rectangle properties as a tuple.
1329 return _core_
.Rect_Get(*args
, **kwargs
)
1331 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1332 def __str__(self
): return str(self
.Get())
1333 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1334 def __len__(self
): return len(self
.Get())
1335 def __getitem__(self
, index
): return self
.Get()[index
]
1336 def __setitem__(self
, index
, val
):
1337 if index
== 0: self
.x
= val
1338 elif index
== 1: self
.y
= val
1339 elif index
== 2: self
.width
= val
1340 elif index
== 3: self
.height
= val
1341 else: raise IndexError
1342 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1343 __safe_for_unpickling__
= True
1344 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1347 class RectPtr(Rect
):
1348 def __init__(self
, this
):
1350 if not hasattr(self
,"thisown"): self
.thisown
= 0
1351 self
.__class
__ = Rect
1352 _core_
.Rect_swigregister(RectPtr
)
1354 def RectPP(*args
, **kwargs
):
1356 RectPP(Point topLeft, Point bottomRight) -> Rect
1358 Create a new Rect object from Points representing two corners.
1360 val
= _core_
.new_RectPP(*args
, **kwargs
)
1364 def RectPS(*args
, **kwargs
):
1366 RectPS(Point pos, Size size) -> Rect
1368 Create a new Rect from a position and size.
1370 val
= _core_
.new_RectPS(*args
, **kwargs
)
1374 def RectS(*args
, **kwargs
):
1376 RectS(Size size) -> Rect
1378 Create a new Rect from a size only.
1380 val
= _core_
.new_RectS(*args
, **kwargs
)
1385 def IntersectRect(*args
, **kwargs
):
1387 IntersectRect(Rect r1, Rect r2) -> Rect
1389 Calculate and return the intersection of r1 and r2.
1391 return _core_
.IntersectRect(*args
, **kwargs
)
1392 #---------------------------------------------------------------------------
1394 class Point2D(object):
1396 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1397 with floating point values.
1400 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1401 def __init__(self
, *args
, **kwargs
):
1403 __init__(self, double x=0.0, double y=0.0) -> Point2D
1405 Create a w.Point2D object.
1407 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1408 self
.this
= newobj
.this
1411 def GetFloor(*args
, **kwargs
):
1417 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1419 def GetRounded(*args
, **kwargs
):
1421 GetRounded() -> (x,y)
1425 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1427 def GetVectorLength(*args
, **kwargs
):
1428 """GetVectorLength(self) -> double"""
1429 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1431 def GetVectorAngle(*args
, **kwargs
):
1432 """GetVectorAngle(self) -> double"""
1433 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1435 def SetVectorLength(*args
, **kwargs
):
1436 """SetVectorLength(self, double length)"""
1437 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1439 def SetVectorAngle(*args
, **kwargs
):
1440 """SetVectorAngle(self, double degrees)"""
1441 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1443 def SetPolarCoordinates(self
, angle
, length
):
1444 self
.SetVectorLength(length
)
1445 self
.SetVectorAngle(angle
)
1446 def Normalize(self
):
1447 self
.SetVectorLength(1.0)
1449 def GetDistance(*args
, **kwargs
):
1450 """GetDistance(self, Point2D pt) -> double"""
1451 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1453 def GetDistanceSquare(*args
, **kwargs
):
1454 """GetDistanceSquare(self, Point2D pt) -> double"""
1455 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1457 def GetDotProduct(*args
, **kwargs
):
1458 """GetDotProduct(self, Point2D vec) -> double"""
1459 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1461 def GetCrossProduct(*args
, **kwargs
):
1462 """GetCrossProduct(self, Point2D vec) -> double"""
1463 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1465 def __neg__(*args
, **kwargs
):
1467 __neg__(self) -> Point2D
1469 the reflection of this point
1471 return _core_
.Point2D___neg__(*args
, **kwargs
)
1473 def __iadd__(*args
, **kwargs
):
1474 """__iadd__(self, Point2D pt) -> Point2D"""
1475 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1477 def __isub__(*args
, **kwargs
):
1478 """__isub__(self, Point2D pt) -> Point2D"""
1479 return _core_
.Point2D___isub__(*args
, **kwargs
)
1481 def __imul__(*args
, **kwargs
):
1482 """__imul__(self, Point2D pt) -> Point2D"""
1483 return _core_
.Point2D___imul__(*args
, **kwargs
)
1485 def __idiv__(*args
, **kwargs
):
1486 """__idiv__(self, Point2D pt) -> Point2D"""
1487 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1489 def __eq__(*args
, **kwargs
):
1491 __eq__(self, Point2D pt) -> bool
1495 return _core_
.Point2D___eq__(*args
, **kwargs
)
1497 def __ne__(*args
, **kwargs
):
1499 __ne__(self, Point2D pt) -> bool
1503 return _core_
.Point2D___ne__(*args
, **kwargs
)
1505 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1506 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1507 def Set(*args
, **kwargs
):
1508 """Set(self, double x=0, double y=0)"""
1509 return _core_
.Point2D_Set(*args
, **kwargs
)
1511 def Get(*args
, **kwargs
):
1515 Return x and y properties as a tuple.
1517 return _core_
.Point2D_Get(*args
, **kwargs
)
1519 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1520 def __str__(self
): return str(self
.Get())
1521 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1522 def __len__(self
): return len(self
.Get())
1523 def __getitem__(self
, index
): return self
.Get()[index
]
1524 def __setitem__(self
, index
, val
):
1525 if index
== 0: self
.x
= val
1526 elif index
== 1: self
.y
= val
1527 else: raise IndexError
1528 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1529 __safe_for_unpickling__
= True
1530 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1533 class Point2DPtr(Point2D
):
1534 def __init__(self
, this
):
1536 if not hasattr(self
,"thisown"): self
.thisown
= 0
1537 self
.__class
__ = Point2D
1538 _core_
.Point2D_swigregister(Point2DPtr
)
1540 def Point2DCopy(*args
, **kwargs
):
1542 Point2DCopy(Point2D pt) -> Point2D
1544 Create a w.Point2D object.
1546 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1550 def Point2DFromPoint(*args
, **kwargs
):
1552 Point2DFromPoint(Point pt) -> Point2D
1554 Create a w.Point2D object.
1556 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1560 #---------------------------------------------------------------------------
1562 FromStart
= _core_
.FromStart
1563 FromCurrent
= _core_
.FromCurrent
1564 FromEnd
= _core_
.FromEnd
1565 class InputStream(object):
1566 """Proxy of C++ InputStream class"""
1568 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1569 def __init__(self
, *args
, **kwargs
):
1570 """__init__(self, PyObject p) -> InputStream"""
1571 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1572 self
.this
= newobj
.this
1575 def __del__(self
, destroy
=_core_
.delete_InputStream
):
1578 if self
.thisown
: destroy(self
)
1581 def close(*args
, **kwargs
):
1583 return _core_
.InputStream_close(*args
, **kwargs
)
1585 def flush(*args
, **kwargs
):
1587 return _core_
.InputStream_flush(*args
, **kwargs
)
1589 def eof(*args
, **kwargs
):
1590 """eof(self) -> bool"""
1591 return _core_
.InputStream_eof(*args
, **kwargs
)
1593 def read(*args
, **kwargs
):
1594 """read(self, int size=-1) -> PyObject"""
1595 return _core_
.InputStream_read(*args
, **kwargs
)
1597 def readline(*args
, **kwargs
):
1598 """readline(self, int size=-1) -> PyObject"""
1599 return _core_
.InputStream_readline(*args
, **kwargs
)
1601 def readlines(*args
, **kwargs
):
1602 """readlines(self, int sizehint=-1) -> PyObject"""
1603 return _core_
.InputStream_readlines(*args
, **kwargs
)
1605 def seek(*args
, **kwargs
):
1606 """seek(self, int offset, int whence=0)"""
1607 return _core_
.InputStream_seek(*args
, **kwargs
)
1609 def tell(*args
, **kwargs
):
1610 """tell(self) -> int"""
1611 return _core_
.InputStream_tell(*args
, **kwargs
)
1613 def Peek(*args
, **kwargs
):
1614 """Peek(self) -> char"""
1615 return _core_
.InputStream_Peek(*args
, **kwargs
)
1617 def GetC(*args
, **kwargs
):
1618 """GetC(self) -> char"""
1619 return _core_
.InputStream_GetC(*args
, **kwargs
)
1621 def LastRead(*args
, **kwargs
):
1622 """LastRead(self) -> size_t"""
1623 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1625 def CanRead(*args
, **kwargs
):
1626 """CanRead(self) -> bool"""
1627 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1629 def Eof(*args
, **kwargs
):
1630 """Eof(self) -> bool"""
1631 return _core_
.InputStream_Eof(*args
, **kwargs
)
1633 def Ungetch(*args
, **kwargs
):
1634 """Ungetch(self, char c) -> bool"""
1635 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1637 def SeekI(*args
, **kwargs
):
1638 """SeekI(self, long pos, int mode=FromStart) -> long"""
1639 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1641 def TellI(*args
, **kwargs
):
1642 """TellI(self) -> long"""
1643 return _core_
.InputStream_TellI(*args
, **kwargs
)
1646 class InputStreamPtr(InputStream
):
1647 def __init__(self
, this
):
1649 if not hasattr(self
,"thisown"): self
.thisown
= 0
1650 self
.__class
__ = InputStream
1651 _core_
.InputStream_swigregister(InputStreamPtr
)
1652 DefaultPosition
= cvar
.DefaultPosition
1653 DefaultSize
= cvar
.DefaultSize
1655 class OutputStream(object):
1656 """Proxy of C++ OutputStream class"""
1657 def __init__(self
): raise RuntimeError, "No constructor defined"
1659 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1660 def write(*args
, **kwargs
):
1661 """write(self, PyObject obj)"""
1662 return _core_
.OutputStream_write(*args
, **kwargs
)
1665 class OutputStreamPtr(OutputStream
):
1666 def __init__(self
, this
):
1668 if not hasattr(self
,"thisown"): self
.thisown
= 0
1669 self
.__class
__ = OutputStream
1670 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1672 #---------------------------------------------------------------------------
1674 class FSFile(Object
):
1675 """Proxy of C++ FSFile class"""
1677 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1678 def __init__(self
, *args
, **kwargs
):
1680 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1681 DateTime modif) -> FSFile
1683 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1684 self
.this
= newobj
.this
1687 self
.thisown
= 0 # It will normally be deleted by the user of the wxFileSystem
1689 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1692 if self
.thisown
: destroy(self
)
1695 def GetStream(*args
, **kwargs
):
1696 """GetStream(self) -> InputStream"""
1697 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1699 def GetMimeType(*args
, **kwargs
):
1700 """GetMimeType(self) -> String"""
1701 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1703 def GetLocation(*args
, **kwargs
):
1704 """GetLocation(self) -> String"""
1705 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1707 def GetAnchor(*args
, **kwargs
):
1708 """GetAnchor(self) -> String"""
1709 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1711 def GetModificationTime(*args
, **kwargs
):
1712 """GetModificationTime(self) -> DateTime"""
1713 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1716 class FSFilePtr(FSFile
):
1717 def __init__(self
, this
):
1719 if not hasattr(self
,"thisown"): self
.thisown
= 0
1720 self
.__class
__ = FSFile
1721 _core_
.FSFile_swigregister(FSFilePtr
)
1723 class CPPFileSystemHandler(object):
1724 """Proxy of C++ CPPFileSystemHandler class"""
1725 def __init__(self
): raise RuntimeError, "No constructor defined"
1727 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1729 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1730 def __init__(self
, this
):
1732 if not hasattr(self
,"thisown"): self
.thisown
= 0
1733 self
.__class
__ = CPPFileSystemHandler
1734 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1736 class FileSystemHandler(CPPFileSystemHandler
):
1737 """Proxy of C++ FileSystemHandler class"""
1739 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1740 def __init__(self
, *args
, **kwargs
):
1741 """__init__(self) -> FileSystemHandler"""
1742 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1743 self
.this
= newobj
.this
1746 self
._setCallbackInfo
(self
, FileSystemHandler
)
1748 def _setCallbackInfo(*args
, **kwargs
):
1749 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1750 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1752 def CanOpen(*args
, **kwargs
):
1753 """CanOpen(self, String location) -> bool"""
1754 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1756 def OpenFile(*args
, **kwargs
):
1757 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1758 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1760 def FindFirst(*args
, **kwargs
):
1761 """FindFirst(self, String spec, int flags=0) -> String"""
1762 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1764 def FindNext(*args
, **kwargs
):
1765 """FindNext(self) -> String"""
1766 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1768 def GetProtocol(*args
, **kwargs
):
1769 """GetProtocol(self, String location) -> String"""
1770 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1772 def GetLeftLocation(*args
, **kwargs
):
1773 """GetLeftLocation(self, String location) -> String"""
1774 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1776 def GetAnchor(*args
, **kwargs
):
1777 """GetAnchor(self, String location) -> String"""
1778 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1780 def GetRightLocation(*args
, **kwargs
):
1781 """GetRightLocation(self, String location) -> String"""
1782 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1784 def GetMimeTypeFromExt(*args
, **kwargs
):
1785 """GetMimeTypeFromExt(self, String location) -> String"""
1786 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1789 class FileSystemHandlerPtr(FileSystemHandler
):
1790 def __init__(self
, this
):
1792 if not hasattr(self
,"thisown"): self
.thisown
= 0
1793 self
.__class
__ = FileSystemHandler
1794 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1796 class FileSystem(Object
):
1797 """Proxy of C++ FileSystem class"""
1799 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1800 def __init__(self
, *args
, **kwargs
):
1801 """__init__(self) -> FileSystem"""
1802 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1803 self
.this
= newobj
.this
1806 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1809 if self
.thisown
: destroy(self
)
1812 def ChangePathTo(*args
, **kwargs
):
1813 """ChangePathTo(self, String location, bool is_dir=False)"""
1814 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1816 def GetPath(*args
, **kwargs
):
1817 """GetPath(self) -> String"""
1818 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1820 def OpenFile(*args
, **kwargs
):
1821 """OpenFile(self, String location) -> FSFile"""
1822 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1824 def FindFirst(*args
, **kwargs
):
1825 """FindFirst(self, String spec, int flags=0) -> String"""
1826 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1828 def FindNext(*args
, **kwargs
):
1829 """FindNext(self) -> String"""
1830 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1832 def AddHandler(*args
, **kwargs
):
1833 """AddHandler(CPPFileSystemHandler handler)"""
1834 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1836 AddHandler
= staticmethod(AddHandler
)
1837 def CleanUpHandlers(*args
, **kwargs
):
1838 """CleanUpHandlers()"""
1839 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1841 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1842 def FileNameToURL(*args
, **kwargs
):
1843 """FileNameToURL(String filename) -> String"""
1844 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1846 FileNameToURL
= staticmethod(FileNameToURL
)
1847 def URLToFileName(*args
, **kwargs
):
1848 """URLToFileName(String url) -> String"""
1849 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1851 URLToFileName
= staticmethod(URLToFileName
)
1853 class FileSystemPtr(FileSystem
):
1854 def __init__(self
, this
):
1856 if not hasattr(self
,"thisown"): self
.thisown
= 0
1857 self
.__class
__ = FileSystem
1858 _core_
.FileSystem_swigregister(FileSystemPtr
)
1860 def FileSystem_AddHandler(*args
, **kwargs
):
1861 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1862 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1864 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1865 """FileSystem_CleanUpHandlers()"""
1866 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1868 def FileSystem_FileNameToURL(*args
, **kwargs
):
1869 """FileSystem_FileNameToURL(String filename) -> String"""
1870 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1872 def FileSystem_URLToFileName(*args
, **kwargs
):
1873 """FileSystem_URLToFileName(String url) -> String"""
1874 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1876 class InternetFSHandler(CPPFileSystemHandler
):
1877 """Proxy of C++ InternetFSHandler class"""
1879 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1880 def __init__(self
, *args
, **kwargs
):
1881 """__init__(self) -> InternetFSHandler"""
1882 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1883 self
.this
= newobj
.this
1886 def CanOpen(*args
, **kwargs
):
1887 """CanOpen(self, String location) -> bool"""
1888 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1890 def OpenFile(*args
, **kwargs
):
1891 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1892 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1895 class InternetFSHandlerPtr(InternetFSHandler
):
1896 def __init__(self
, this
):
1898 if not hasattr(self
,"thisown"): self
.thisown
= 0
1899 self
.__class
__ = InternetFSHandler
1900 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1902 class ZipFSHandler(CPPFileSystemHandler
):
1903 """Proxy of C++ ZipFSHandler class"""
1905 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1906 def __init__(self
, *args
, **kwargs
):
1907 """__init__(self) -> ZipFSHandler"""
1908 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1909 self
.this
= newobj
.this
1912 def CanOpen(*args
, **kwargs
):
1913 """CanOpen(self, String location) -> bool"""
1914 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1916 def OpenFile(*args
, **kwargs
):
1917 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1918 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1920 def FindFirst(*args
, **kwargs
):
1921 """FindFirst(self, String spec, int flags=0) -> String"""
1922 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1924 def FindNext(*args
, **kwargs
):
1925 """FindNext(self) -> String"""
1926 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1929 class ZipFSHandlerPtr(ZipFSHandler
):
1930 def __init__(self
, this
):
1932 if not hasattr(self
,"thisown"): self
.thisown
= 0
1933 self
.__class
__ = ZipFSHandler
1934 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1937 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1938 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1939 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1941 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1942 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1943 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1945 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1946 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1947 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1948 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1950 Add 'file' to the memory filesystem. The dataItem parameter can
1951 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1952 arbitrary data. If a bitmap or image is used then the imgType
1953 parameter should specify what kind of image file it should be
1954 written as, wx.BITMAP_TYPE_PNG, etc.
1956 if isinstance(dataItem
, wx
.Image
):
1957 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1958 elif isinstance(dataItem
, wx
.Bitmap
):
1959 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1960 elif type(dataItem
) == str:
1961 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1963 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1965 class MemoryFSHandler(CPPFileSystemHandler
):
1966 """Proxy of C++ MemoryFSHandler class"""
1968 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1969 def __init__(self
, *args
, **kwargs
):
1970 """__init__(self) -> MemoryFSHandler"""
1971 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
1972 self
.this
= newobj
.this
1975 def RemoveFile(*args
, **kwargs
):
1976 """RemoveFile(String filename)"""
1977 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1979 RemoveFile
= staticmethod(RemoveFile
)
1980 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1981 def CanOpen(*args
, **kwargs
):
1982 """CanOpen(self, String location) -> bool"""
1983 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1985 def OpenFile(*args
, **kwargs
):
1986 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1987 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
1989 def FindFirst(*args
, **kwargs
):
1990 """FindFirst(self, String spec, int flags=0) -> String"""
1991 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
1993 def FindNext(*args
, **kwargs
):
1994 """FindNext(self) -> String"""
1995 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
1998 class MemoryFSHandlerPtr(MemoryFSHandler
):
1999 def __init__(self
, this
):
2001 if not hasattr(self
,"thisown"): self
.thisown
= 0
2002 self
.__class
__ = MemoryFSHandler
2003 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
2005 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
2006 """MemoryFSHandler_RemoveFile(String filename)"""
2007 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
2009 #---------------------------------------------------------------------------
2011 class ImageHandler(Object
):
2012 """Proxy of C++ ImageHandler class"""
2013 def __init__(self
): raise RuntimeError, "No constructor defined"
2015 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2016 def GetName(*args
, **kwargs
):
2017 """GetName(self) -> String"""
2018 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
2020 def GetExtension(*args
, **kwargs
):
2021 """GetExtension(self) -> String"""
2022 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
2024 def GetType(*args
, **kwargs
):
2025 """GetType(self) -> long"""
2026 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
2028 def GetMimeType(*args
, **kwargs
):
2029 """GetMimeType(self) -> String"""
2030 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
2032 def CanRead(*args
, **kwargs
):
2033 """CanRead(self, String name) -> bool"""
2034 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
2036 def SetName(*args
, **kwargs
):
2037 """SetName(self, String name)"""
2038 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
2040 def SetExtension(*args
, **kwargs
):
2041 """SetExtension(self, String extension)"""
2042 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
2044 def SetType(*args
, **kwargs
):
2045 """SetType(self, long type)"""
2046 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
2048 def SetMimeType(*args
, **kwargs
):
2049 """SetMimeType(self, String mimetype)"""
2050 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
2053 class ImageHandlerPtr(ImageHandler
):
2054 def __init__(self
, this
):
2056 if not hasattr(self
,"thisown"): self
.thisown
= 0
2057 self
.__class
__ = ImageHandler
2058 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
2060 class ImageHistogram(object):
2061 """Proxy of C++ ImageHistogram class"""
2063 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2064 def __init__(self
, *args
, **kwargs
):
2065 """__init__(self) -> ImageHistogram"""
2066 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
2067 self
.this
= newobj
.this
2070 def MakeKey(*args
, **kwargs
):
2072 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2074 Get the key in the histogram for the given RGB values
2076 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2078 MakeKey
= staticmethod(MakeKey
)
2079 def FindFirstUnusedColour(*args
, **kwargs
):
2081 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2083 Find first colour that is not used in the image and has higher RGB
2084 values than startR, startG, startB. Returns a tuple consisting of a
2085 success flag and rgb values.
2087 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2090 class ImageHistogramPtr(ImageHistogram
):
2091 def __init__(self
, this
):
2093 if not hasattr(self
,"thisown"): self
.thisown
= 0
2094 self
.__class
__ = ImageHistogram
2095 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2097 def ImageHistogram_MakeKey(*args
, **kwargs
):
2099 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2101 Get the key in the histogram for the given RGB values
2103 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2105 class Image(Object
):
2106 """Proxy of C++ Image class"""
2108 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2109 def __init__(self
, *args
, **kwargs
):
2110 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2111 newobj
= _core_
.new_Image(*args
, **kwargs
)
2112 self
.this
= newobj
.this
2115 def __del__(self
, destroy
=_core_
.delete_Image
):
2118 if self
.thisown
: destroy(self
)
2121 def Create(*args
, **kwargs
):
2122 """Create(self, int width, int height)"""
2123 return _core_
.Image_Create(*args
, **kwargs
)
2125 def Destroy(*args
, **kwargs
):
2129 Deletes the C++ object this Python object is a proxy for.
2131 return _core_
.Image_Destroy(*args
, **kwargs
)
2133 def Scale(*args
, **kwargs
):
2134 """Scale(self, int width, int height) -> Image"""
2135 return _core_
.Image_Scale(*args
, **kwargs
)
2137 def ShrinkBy(*args
, **kwargs
):
2138 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2139 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2141 def Rescale(*args
, **kwargs
):
2142 """Rescale(self, int width, int height) -> Image"""
2143 return _core_
.Image_Rescale(*args
, **kwargs
)
2145 def SetRGB(*args
, **kwargs
):
2146 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2147 return _core_
.Image_SetRGB(*args
, **kwargs
)
2149 def GetRed(*args
, **kwargs
):
2150 """GetRed(self, int x, int y) -> unsigned char"""
2151 return _core_
.Image_GetRed(*args
, **kwargs
)
2153 def GetGreen(*args
, **kwargs
):
2154 """GetGreen(self, int x, int y) -> unsigned char"""
2155 return _core_
.Image_GetGreen(*args
, **kwargs
)
2157 def GetBlue(*args
, **kwargs
):
2158 """GetBlue(self, int x, int y) -> unsigned char"""
2159 return _core_
.Image_GetBlue(*args
, **kwargs
)
2161 def SetAlpha(*args
, **kwargs
):
2162 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2163 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2165 def GetAlpha(*args
, **kwargs
):
2166 """GetAlpha(self, int x, int y) -> unsigned char"""
2167 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2169 def HasAlpha(*args
, **kwargs
):
2170 """HasAlpha(self) -> bool"""
2171 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2173 def FindFirstUnusedColour(*args
, **kwargs
):
2175 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2177 Find first colour that is not used in the image and has higher RGB
2178 values than startR, startG, startB. Returns a tuple consisting of a
2179 success flag and rgb values.
2181 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2183 def ConvertAlphaToMask(*args
, **kwargs
):
2185 ConvertAlphaToMask(self, byte threshold=128) -> bool
2187 If the image has alpha channel, this method converts it to mask. All pixels
2188 with alpha value less than ``threshold`` are replaced with mask colour and the
2189 alpha channel is removed. Mask colour is chosen automatically using
2190 `FindFirstUnusedColour`.
2192 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2195 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2197 def ConvertColourToAlpha(*args
, **kwargs
):
2199 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2201 This method converts an image where the original alpha information is
2202 only available as a shades of a colour (actually shades of grey)
2203 typically when you draw anti-aliased text into a bitmap. The DC
2204 drawing routines draw grey values on the black background although
2205 they actually mean to draw white with differnt alpha values. This
2206 method reverses it, assuming a black (!) background and white text.
2207 The method will then fill up the whole image with the colour given.
2209 return _core_
.Image_ConvertColourToAlpha(*args
, **kwargs
)
2211 def SetMaskFromImage(*args
, **kwargs
):
2212 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2213 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2215 def CanRead(*args
, **kwargs
):
2216 """CanRead(String name) -> bool"""
2217 return _core_
.Image_CanRead(*args
, **kwargs
)
2219 CanRead
= staticmethod(CanRead
)
2220 def GetImageCount(*args
, **kwargs
):
2221 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2222 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2224 GetImageCount
= staticmethod(GetImageCount
)
2225 def LoadFile(*args
, **kwargs
):
2226 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2227 return _core_
.Image_LoadFile(*args
, **kwargs
)
2229 def LoadMimeFile(*args
, **kwargs
):
2230 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2231 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2233 def SaveFile(*args
, **kwargs
):
2234 """SaveFile(self, String name, int type) -> bool"""
2235 return _core_
.Image_SaveFile(*args
, **kwargs
)
2237 def SaveMimeFile(*args
, **kwargs
):
2238 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2239 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2241 def CanReadStream(*args
, **kwargs
):
2242 """CanReadStream(InputStream stream) -> bool"""
2243 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2245 CanReadStream
= staticmethod(CanReadStream
)
2246 def LoadStream(*args
, **kwargs
):
2247 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2248 return _core_
.Image_LoadStream(*args
, **kwargs
)
2250 def LoadMimeStream(*args
, **kwargs
):
2251 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2252 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2254 def Ok(*args
, **kwargs
):
2255 """Ok(self) -> bool"""
2256 return _core_
.Image_Ok(*args
, **kwargs
)
2258 def GetWidth(*args
, **kwargs
):
2259 """GetWidth(self) -> int"""
2260 return _core_
.Image_GetWidth(*args
, **kwargs
)
2262 def GetHeight(*args
, **kwargs
):
2263 """GetHeight(self) -> int"""
2264 return _core_
.Image_GetHeight(*args
, **kwargs
)
2266 def GetSize(*args
, **kwargs
):
2267 """GetSize(self) -> Size"""
2268 return _core_
.Image_GetSize(*args
, **kwargs
)
2270 def GetSubImage(*args
, **kwargs
):
2271 """GetSubImage(self, Rect rect) -> Image"""
2272 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2274 def Copy(*args
, **kwargs
):
2275 """Copy(self) -> Image"""
2276 return _core_
.Image_Copy(*args
, **kwargs
)
2278 def Paste(*args
, **kwargs
):
2279 """Paste(self, Image image, int x, int y)"""
2280 return _core_
.Image_Paste(*args
, **kwargs
)
2282 def GetData(*args
, **kwargs
):
2283 """GetData(self) -> PyObject"""
2284 return _core_
.Image_GetData(*args
, **kwargs
)
2286 def SetData(*args
, **kwargs
):
2287 """SetData(self, PyObject data)"""
2288 return _core_
.Image_SetData(*args
, **kwargs
)
2290 def GetDataBuffer(*args
, **kwargs
):
2291 """GetDataBuffer(self) -> PyObject"""
2292 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2294 def SetDataBuffer(*args
, **kwargs
):
2295 """SetDataBuffer(self, PyObject data)"""
2296 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2298 def GetAlphaData(*args
, **kwargs
):
2299 """GetAlphaData(self) -> PyObject"""
2300 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2302 def SetAlphaData(*args
, **kwargs
):
2303 """SetAlphaData(self, PyObject data)"""
2304 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2306 def GetAlphaBuffer(*args
, **kwargs
):
2307 """GetAlphaBuffer(self) -> PyObject"""
2308 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2310 def SetAlphaBuffer(*args
, **kwargs
):
2311 """SetAlphaBuffer(self, PyObject data)"""
2312 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2314 def SetMaskColour(*args
, **kwargs
):
2315 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2316 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2318 def GetMaskRed(*args
, **kwargs
):
2319 """GetMaskRed(self) -> unsigned char"""
2320 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2322 def GetMaskGreen(*args
, **kwargs
):
2323 """GetMaskGreen(self) -> unsigned char"""
2324 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2326 def GetMaskBlue(*args
, **kwargs
):
2327 """GetMaskBlue(self) -> unsigned char"""
2328 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2330 def SetMask(*args
, **kwargs
):
2331 """SetMask(self, bool mask=True)"""
2332 return _core_
.Image_SetMask(*args
, **kwargs
)
2334 def HasMask(*args
, **kwargs
):
2335 """HasMask(self) -> bool"""
2336 return _core_
.Image_HasMask(*args
, **kwargs
)
2338 def Rotate(*args
, **kwargs
):
2340 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2341 Point offset_after_rotation=None) -> Image
2343 return _core_
.Image_Rotate(*args
, **kwargs
)
2345 def Rotate90(*args
, **kwargs
):
2346 """Rotate90(self, bool clockwise=True) -> Image"""
2347 return _core_
.Image_Rotate90(*args
, **kwargs
)
2349 def Mirror(*args
, **kwargs
):
2350 """Mirror(self, bool horizontally=True) -> Image"""
2351 return _core_
.Image_Mirror(*args
, **kwargs
)
2353 def Replace(*args
, **kwargs
):
2355 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2356 unsigned char r2, unsigned char g2, unsigned char b2)
2358 return _core_
.Image_Replace(*args
, **kwargs
)
2360 def ConvertToMono(*args
, **kwargs
):
2361 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2362 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2364 def SetOption(*args
, **kwargs
):
2365 """SetOption(self, String name, String value)"""
2366 return _core_
.Image_SetOption(*args
, **kwargs
)
2368 def SetOptionInt(*args
, **kwargs
):
2369 """SetOptionInt(self, String name, int value)"""
2370 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2372 def GetOption(*args
, **kwargs
):
2373 """GetOption(self, String name) -> String"""
2374 return _core_
.Image_GetOption(*args
, **kwargs
)
2376 def GetOptionInt(*args
, **kwargs
):
2377 """GetOptionInt(self, String name) -> int"""
2378 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2380 def HasOption(*args
, **kwargs
):
2381 """HasOption(self, String name) -> bool"""
2382 return _core_
.Image_HasOption(*args
, **kwargs
)
2384 def CountColours(*args
, **kwargs
):
2385 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2386 return _core_
.Image_CountColours(*args
, **kwargs
)
2388 def ComputeHistogram(*args
, **kwargs
):
2389 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2390 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2392 def AddHandler(*args
, **kwargs
):
2393 """AddHandler(ImageHandler handler)"""
2394 return _core_
.Image_AddHandler(*args
, **kwargs
)
2396 AddHandler
= staticmethod(AddHandler
)
2397 def InsertHandler(*args
, **kwargs
):
2398 """InsertHandler(ImageHandler handler)"""
2399 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2401 InsertHandler
= staticmethod(InsertHandler
)
2402 def RemoveHandler(*args
, **kwargs
):
2403 """RemoveHandler(String name) -> bool"""
2404 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2406 RemoveHandler
= staticmethod(RemoveHandler
)
2407 def GetImageExtWildcard(*args
, **kwargs
):
2408 """GetImageExtWildcard() -> String"""
2409 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2411 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2412 def ConvertToBitmap(*args
, **kwargs
):
2413 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2414 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2416 def ConvertToMonoBitmap(*args
, **kwargs
):
2417 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2418 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2420 def __nonzero__(self
): return self
.Ok()
2422 class ImagePtr(Image
):
2423 def __init__(self
, this
):
2425 if not hasattr(self
,"thisown"): self
.thisown
= 0
2426 self
.__class
__ = Image
2427 _core_
.Image_swigregister(ImagePtr
)
2429 def ImageFromMime(*args
, **kwargs
):
2430 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2431 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2435 def ImageFromStream(*args
, **kwargs
):
2436 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2437 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2441 def ImageFromStreamMime(*args
, **kwargs
):
2442 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2443 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2447 def EmptyImage(*args
, **kwargs
):
2448 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2449 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2453 def ImageFromBitmap(*args
, **kwargs
):
2454 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2455 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2459 def ImageFromData(*args
, **kwargs
):
2460 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2461 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2465 def ImageFromDataWithAlpha(*args
, **kwargs
):
2466 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2467 val
= _core_
.new_ImageFromDataWithAlpha(*args
, **kwargs
)
2471 def Image_CanRead(*args
, **kwargs
):
2472 """Image_CanRead(String name) -> bool"""
2473 return _core_
.Image_CanRead(*args
, **kwargs
)
2475 def Image_GetImageCount(*args
, **kwargs
):
2476 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2477 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2479 def Image_CanReadStream(*args
, **kwargs
):
2480 """Image_CanReadStream(InputStream stream) -> bool"""
2481 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2483 def Image_AddHandler(*args
, **kwargs
):
2484 """Image_AddHandler(ImageHandler handler)"""
2485 return _core_
.Image_AddHandler(*args
, **kwargs
)
2487 def Image_InsertHandler(*args
, **kwargs
):
2488 """Image_InsertHandler(ImageHandler handler)"""
2489 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2491 def Image_RemoveHandler(*args
, **kwargs
):
2492 """Image_RemoveHandler(String name) -> bool"""
2493 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2495 def Image_GetImageExtWildcard(*args
, **kwargs
):
2496 """Image_GetImageExtWildcard() -> String"""
2497 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2499 def InitAllImageHandlers():
2501 The former functionality of InitAllImageHanders is now done internal to
2502 the _core_ extension module and so this function has become a simple NOP.
2506 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2507 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2508 BMP_24BPP
= _core_
.BMP_24BPP
2509 BMP_8BPP
= _core_
.BMP_8BPP
2510 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2511 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2512 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2513 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2514 BMP_4BPP
= _core_
.BMP_4BPP
2515 BMP_1BPP
= _core_
.BMP_1BPP
2516 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2517 class BMPHandler(ImageHandler
):
2518 """Proxy of C++ BMPHandler class"""
2520 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2521 def __init__(self
, *args
, **kwargs
):
2522 """__init__(self) -> BMPHandler"""
2523 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2524 self
.this
= newobj
.this
2528 class BMPHandlerPtr(BMPHandler
):
2529 def __init__(self
, this
):
2531 if not hasattr(self
,"thisown"): self
.thisown
= 0
2532 self
.__class
__ = BMPHandler
2533 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2534 NullImage
= cvar
.NullImage
2535 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2536 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2537 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2538 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2539 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2541 class ICOHandler(BMPHandler
):
2542 """Proxy of C++ ICOHandler class"""
2544 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2545 def __init__(self
, *args
, **kwargs
):
2546 """__init__(self) -> ICOHandler"""
2547 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2548 self
.this
= newobj
.this
2552 class ICOHandlerPtr(ICOHandler
):
2553 def __init__(self
, this
):
2555 if not hasattr(self
,"thisown"): self
.thisown
= 0
2556 self
.__class
__ = ICOHandler
2557 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2559 class CURHandler(ICOHandler
):
2560 """Proxy of C++ CURHandler class"""
2562 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2563 def __init__(self
, *args
, **kwargs
):
2564 """__init__(self) -> CURHandler"""
2565 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2566 self
.this
= newobj
.this
2570 class CURHandlerPtr(CURHandler
):
2571 def __init__(self
, this
):
2573 if not hasattr(self
,"thisown"): self
.thisown
= 0
2574 self
.__class
__ = CURHandler
2575 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2577 class ANIHandler(CURHandler
):
2578 """Proxy of C++ ANIHandler class"""
2580 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2581 def __init__(self
, *args
, **kwargs
):
2582 """__init__(self) -> ANIHandler"""
2583 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2584 self
.this
= newobj
.this
2588 class ANIHandlerPtr(ANIHandler
):
2589 def __init__(self
, this
):
2591 if not hasattr(self
,"thisown"): self
.thisown
= 0
2592 self
.__class
__ = ANIHandler
2593 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2595 class PNGHandler(ImageHandler
):
2596 """Proxy of C++ PNGHandler class"""
2598 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2599 def __init__(self
, *args
, **kwargs
):
2600 """__init__(self) -> PNGHandler"""
2601 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2602 self
.this
= newobj
.this
2606 class PNGHandlerPtr(PNGHandler
):
2607 def __init__(self
, this
):
2609 if not hasattr(self
,"thisown"): self
.thisown
= 0
2610 self
.__class
__ = PNGHandler
2611 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2613 class GIFHandler(ImageHandler
):
2614 """Proxy of C++ GIFHandler class"""
2616 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2617 def __init__(self
, *args
, **kwargs
):
2618 """__init__(self) -> GIFHandler"""
2619 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2620 self
.this
= newobj
.this
2624 class GIFHandlerPtr(GIFHandler
):
2625 def __init__(self
, this
):
2627 if not hasattr(self
,"thisown"): self
.thisown
= 0
2628 self
.__class
__ = GIFHandler
2629 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2631 class PCXHandler(ImageHandler
):
2632 """Proxy of C++ PCXHandler class"""
2634 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2635 def __init__(self
, *args
, **kwargs
):
2636 """__init__(self) -> PCXHandler"""
2637 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2638 self
.this
= newobj
.this
2642 class PCXHandlerPtr(PCXHandler
):
2643 def __init__(self
, this
):
2645 if not hasattr(self
,"thisown"): self
.thisown
= 0
2646 self
.__class
__ = PCXHandler
2647 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2649 class JPEGHandler(ImageHandler
):
2650 """Proxy of C++ JPEGHandler class"""
2652 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2653 def __init__(self
, *args
, **kwargs
):
2654 """__init__(self) -> JPEGHandler"""
2655 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2656 self
.this
= newobj
.this
2660 class JPEGHandlerPtr(JPEGHandler
):
2661 def __init__(self
, this
):
2663 if not hasattr(self
,"thisown"): self
.thisown
= 0
2664 self
.__class
__ = JPEGHandler
2665 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2667 class PNMHandler(ImageHandler
):
2668 """Proxy of C++ PNMHandler class"""
2670 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2671 def __init__(self
, *args
, **kwargs
):
2672 """__init__(self) -> PNMHandler"""
2673 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2674 self
.this
= newobj
.this
2678 class PNMHandlerPtr(PNMHandler
):
2679 def __init__(self
, this
):
2681 if not hasattr(self
,"thisown"): self
.thisown
= 0
2682 self
.__class
__ = PNMHandler
2683 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2685 class XPMHandler(ImageHandler
):
2686 """Proxy of C++ XPMHandler class"""
2688 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2689 def __init__(self
, *args
, **kwargs
):
2690 """__init__(self) -> XPMHandler"""
2691 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2692 self
.this
= newobj
.this
2696 class XPMHandlerPtr(XPMHandler
):
2697 def __init__(self
, this
):
2699 if not hasattr(self
,"thisown"): self
.thisown
= 0
2700 self
.__class
__ = XPMHandler
2701 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2703 class TIFFHandler(ImageHandler
):
2704 """Proxy of C++ TIFFHandler class"""
2706 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2707 def __init__(self
, *args
, **kwargs
):
2708 """__init__(self) -> TIFFHandler"""
2709 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2710 self
.this
= newobj
.this
2714 class TIFFHandlerPtr(TIFFHandler
):
2715 def __init__(self
, this
):
2717 if not hasattr(self
,"thisown"): self
.thisown
= 0
2718 self
.__class
__ = TIFFHandler
2719 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2721 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2722 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2723 class Quantize(object):
2724 """Performs quantization, or colour reduction, on a wxImage."""
2725 def __init__(self
): raise RuntimeError, "No constructor defined"
2727 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2728 def Quantize(*args
, **kwargs
):
2730 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2732 Reduce the colours in the source image and put the result into the
2733 destination image, setting the palette in the destination if
2734 needed. Both images may be the same, to overwrite the source image.
2736 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2738 Quantize
= staticmethod(Quantize
)
2740 class QuantizePtr(Quantize
):
2741 def __init__(self
, this
):
2743 if not hasattr(self
,"thisown"): self
.thisown
= 0
2744 self
.__class
__ = Quantize
2745 _core_
.Quantize_swigregister(QuantizePtr
)
2747 def Quantize_Quantize(*args
, **kwargs
):
2749 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2751 Reduce the colours in the source image and put the result into the
2752 destination image, setting the palette in the destination if
2753 needed. Both images may be the same, to overwrite the source image.
2755 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2757 #---------------------------------------------------------------------------
2759 class EvtHandler(Object
):
2760 """Proxy of C++ EvtHandler class"""
2762 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2763 def __init__(self
, *args
, **kwargs
):
2764 """__init__(self) -> EvtHandler"""
2765 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2766 self
.this
= newobj
.this
2769 def GetNextHandler(*args
, **kwargs
):
2770 """GetNextHandler(self) -> EvtHandler"""
2771 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2773 def GetPreviousHandler(*args
, **kwargs
):
2774 """GetPreviousHandler(self) -> EvtHandler"""
2775 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2777 def SetNextHandler(*args
, **kwargs
):
2778 """SetNextHandler(self, EvtHandler handler)"""
2779 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2781 def SetPreviousHandler(*args
, **kwargs
):
2782 """SetPreviousHandler(self, EvtHandler handler)"""
2783 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2785 def GetEvtHandlerEnabled(*args
, **kwargs
):
2786 """GetEvtHandlerEnabled(self) -> bool"""
2787 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2789 def SetEvtHandlerEnabled(*args
, **kwargs
):
2790 """SetEvtHandlerEnabled(self, bool enabled)"""
2791 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2793 def ProcessEvent(*args
, **kwargs
):
2794 """ProcessEvent(self, Event event) -> bool"""
2795 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2797 def AddPendingEvent(*args
, **kwargs
):
2798 """AddPendingEvent(self, Event event)"""
2799 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2801 def ProcessPendingEvents(*args
, **kwargs
):
2802 """ProcessPendingEvents(self)"""
2803 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2805 def Connect(*args
, **kwargs
):
2806 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2807 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
2809 def Disconnect(*args
, **kwargs
):
2810 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2811 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
2813 def _setOORInfo(*args
, **kwargs
):
2814 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2815 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
2817 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2819 Bind an event to an event handler.
2821 :param event: One of the EVT_* objects that specifies the
2822 type of event to bind,
2824 :param handler: A callable object to be invoked when the
2825 event is delivered to self. Pass None to
2826 disconnect an event handler.
2828 :param source: Sometimes the event originates from a
2829 different window than self, but you still
2830 want to catch it in self. (For example, a
2831 button event delivered to a frame.) By
2832 passing the source of the event, the event
2833 handling system is able to differentiate
2834 between the same event type from different
2837 :param id: Used to spcify the event source by ID instead
2840 :param id2: Used when it is desirable to bind a handler
2841 to a range of IDs, such as with EVT_MENU_RANGE.
2843 if source
is not None:
2845 event
.Bind(self
, id, id2
, handler
)
2847 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2849 Disconencts the event handler binding for event from self.
2850 Returns True if successful.
2852 if source
is not None:
2854 return event
.Unbind(self
, id, id2
)
2857 class EvtHandlerPtr(EvtHandler
):
2858 def __init__(self
, this
):
2860 if not hasattr(self
,"thisown"): self
.thisown
= 0
2861 self
.__class
__ = EvtHandler
2862 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
2864 #---------------------------------------------------------------------------
2866 class PyEventBinder(object):
2868 Instances of this class are used to bind specific events to event
2871 def __init__(self
, evtType
, expectedIDs
=0):
2872 if expectedIDs
not in [0, 1, 2]:
2873 raise ValueError, "Invalid number of expectedIDs"
2874 self
.expectedIDs
= expectedIDs
2876 if type(evtType
) == list or type(evtType
) == tuple:
2877 self
.evtType
= evtType
2879 self
.evtType
= [evtType
]
2882 def Bind(self
, target
, id1
, id2
, function
):
2883 """Bind this set of event types to target."""
2884 for et
in self
.evtType
:
2885 target
.Connect(id1
, id2
, et
, function
)
2888 def Unbind(self
, target
, id1
, id2
):
2889 """Remove an event binding."""
2891 for et
in self
.evtType
:
2892 success
+= target
.Disconnect(id1
, id2
, et
)
2896 def __call__(self
, *args
):
2898 For backwards compatibility with the old EVT_* functions.
2899 Should be called with either (window, func), (window, ID,
2900 func) or (window, ID1, ID2, func) parameters depending on the
2903 assert len(args
) == 2 + self
.expectedIDs
2907 if self
.expectedIDs
== 0:
2909 elif self
.expectedIDs
== 1:
2912 elif self
.expectedIDs
== 2:
2917 raise ValueError, "Unexpected number of IDs"
2919 self
.Bind(target
, id1
, id2
, func
)
2922 # These two are square pegs that don't fit the PyEventBinder hole...
2923 def EVT_COMMAND(win
, id, cmd
, func
):
2924 win
.Connect(id, -1, cmd
, func
)
2925 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2926 win
.Connect(id1
, id2
, cmd
, func
)
2929 #---------------------------------------------------------------------------
2931 #---------------------------------------------------------------------------
2933 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
2934 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
2936 def NewEventType(*args
, **kwargs
):
2937 """NewEventType() -> wxEventType"""
2938 return _core_
.NewEventType(*args
, **kwargs
)
2939 wxEVT_NULL
= _core_
.wxEVT_NULL
2940 wxEVT_FIRST
= _core_
.wxEVT_FIRST
2941 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
2942 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
2943 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
2944 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
2945 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
2946 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2947 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2948 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
2949 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
2950 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
2951 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
2952 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2953 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
2954 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
2955 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
2956 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
2957 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
2958 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
2959 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
2960 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
2961 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
2962 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
2963 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
2964 wxEVT_MOTION
= _core_
.wxEVT_MOTION
2965 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
2966 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
2967 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
2968 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
2969 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
2970 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
2971 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
2972 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
2973 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
2974 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
2975 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
2976 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
2977 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
2978 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
2979 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
2980 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
2981 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
2982 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
2983 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
2984 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
2985 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
2986 wxEVT_CHAR
= _core_
.wxEVT_CHAR
2987 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
2988 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
2989 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
2990 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
2991 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
2992 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
2993 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
2994 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
2995 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
2996 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
2997 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
2998 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
2999 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
3000 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
3001 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
3002 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
3003 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
3004 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
3005 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
3006 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
3007 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
3008 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
3009 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
3010 wxEVT_SIZE
= _core_
.wxEVT_SIZE
3011 wxEVT_MOVE
= _core_
.wxEVT_MOVE
3012 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
3013 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
3014 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
3015 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
3016 wxEVT_POWER
= _core_
.wxEVT_POWER
3017 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
3018 wxEVT_CREATE
= _core_
.wxEVT_CREATE
3019 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
3020 wxEVT_SHOW
= _core_
.wxEVT_SHOW
3021 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
3022 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
3023 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
3024 wxEVT_PAINT
= _core_
.wxEVT_PAINT
3025 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
3026 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
3027 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
3028 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
3029 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
3030 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
3031 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
3032 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
3033 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
3034 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
3035 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
3036 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
3037 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
3038 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
3039 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
3040 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
3041 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
3042 wxEVT_IDLE
= _core_
.wxEVT_IDLE
3043 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
3044 wxEVT_SIZING
= _core_
.wxEVT_SIZING
3045 wxEVT_MOVING
= _core_
.wxEVT_MOVING
3046 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
3047 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
3048 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
3049 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
3050 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
3051 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
3052 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
3054 # Create some event binders
3055 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
3056 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
3057 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
3058 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
3059 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
3060 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3061 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3062 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
3063 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
3064 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
3065 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
3066 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
3067 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
3068 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
3069 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
3070 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
3071 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
3072 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
3073 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
3074 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
3075 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
3076 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
3077 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
3078 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
3079 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3080 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3081 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
3082 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
3083 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
3084 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
3085 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
3086 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
3087 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
3088 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
3089 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
3090 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
3091 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
3092 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
3093 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
3094 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
3096 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
3097 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
3098 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
3099 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
3100 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
3101 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
3102 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
3103 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
3104 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
3105 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
3106 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
3107 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
3108 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
3110 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3118 wxEVT_MIDDLE_DCLICK
,
3126 # Scrolling from wxWindow (sent to wxScrolledWindow)
3127 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3128 wxEVT_SCROLLWIN_BOTTOM
,
3129 wxEVT_SCROLLWIN_LINEUP
,
3130 wxEVT_SCROLLWIN_LINEDOWN
,
3131 wxEVT_SCROLLWIN_PAGEUP
,
3132 wxEVT_SCROLLWIN_PAGEDOWN
,
3133 wxEVT_SCROLLWIN_THUMBTRACK
,
3134 wxEVT_SCROLLWIN_THUMBRELEASE
,
3137 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3138 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3139 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3140 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3141 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3142 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3143 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3144 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3146 # Scrolling from wxSlider and wxScrollBar
3147 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3148 wxEVT_SCROLL_BOTTOM
,
3149 wxEVT_SCROLL_LINEUP
,
3150 wxEVT_SCROLL_LINEDOWN
,
3151 wxEVT_SCROLL_PAGEUP
,
3152 wxEVT_SCROLL_PAGEDOWN
,
3153 wxEVT_SCROLL_THUMBTRACK
,
3154 wxEVT_SCROLL_THUMBRELEASE
,
3155 wxEVT_SCROLL_ENDSCROLL
,
3158 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3159 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3160 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3161 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3162 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3163 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3164 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3165 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3166 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3168 # Scrolling from wxSlider and wxScrollBar, with an id
3169 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3170 wxEVT_SCROLL_BOTTOM
,
3171 wxEVT_SCROLL_LINEUP
,
3172 wxEVT_SCROLL_LINEDOWN
,
3173 wxEVT_SCROLL_PAGEUP
,
3174 wxEVT_SCROLL_PAGEDOWN
,
3175 wxEVT_SCROLL_THUMBTRACK
,
3176 wxEVT_SCROLL_THUMBRELEASE
,
3177 wxEVT_SCROLL_ENDSCROLL
,
3180 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3181 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3182 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3183 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3184 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3185 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3186 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3187 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3188 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3190 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3191 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3192 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3193 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3194 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3195 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3196 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3197 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3198 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3199 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3201 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3202 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3203 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3204 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3205 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3206 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3207 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3208 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3209 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3212 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3213 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3214 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3215 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3216 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3217 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3218 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3220 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3222 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3223 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3225 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3229 #---------------------------------------------------------------------------
3231 class Event(Object
):
3232 """Proxy of C++ Event class"""
3233 def __init__(self
): raise RuntimeError, "No constructor defined"
3235 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3236 def __del__(self
, destroy
=_core_
.delete_Event
):
3239 if self
.thisown
: destroy(self
)
3242 def SetEventType(*args
, **kwargs
):
3243 """SetEventType(self, wxEventType typ)"""
3244 return _core_
.Event_SetEventType(*args
, **kwargs
)
3246 def GetEventType(*args
, **kwargs
):
3247 """GetEventType(self) -> wxEventType"""
3248 return _core_
.Event_GetEventType(*args
, **kwargs
)
3250 def GetEventObject(*args
, **kwargs
):
3251 """GetEventObject(self) -> Object"""
3252 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3254 def SetEventObject(*args
, **kwargs
):
3255 """SetEventObject(self, Object obj)"""
3256 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3258 def GetTimestamp(*args
, **kwargs
):
3259 """GetTimestamp(self) -> long"""
3260 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3262 def SetTimestamp(*args
, **kwargs
):
3263 """SetTimestamp(self, long ts=0)"""
3264 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3266 def GetId(*args
, **kwargs
):
3267 """GetId(self) -> int"""
3268 return _core_
.Event_GetId(*args
, **kwargs
)
3270 def SetId(*args
, **kwargs
):
3271 """SetId(self, int Id)"""
3272 return _core_
.Event_SetId(*args
, **kwargs
)
3274 def IsCommandEvent(*args
, **kwargs
):
3275 """IsCommandEvent(self) -> bool"""
3276 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3278 def Skip(*args
, **kwargs
):
3280 Skip(self, bool skip=True)
3282 Called by an event handler, it controls whether additional event
3283 handlers bound to this event will be called after the current event
3284 handler returns. Skip(false) (the default setting) will prevent
3285 additional event handlers from being called and control will be
3286 returned to the sender of the event immediately after the current
3287 handler has finished. Skip(True) will cause the event processing
3288 system to continue searching for a handler function for this event.
3291 return _core_
.Event_Skip(*args
, **kwargs
)
3293 def GetSkipped(*args
, **kwargs
):
3294 """GetSkipped(self) -> bool"""
3295 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3297 def ShouldPropagate(*args
, **kwargs
):
3298 """ShouldPropagate(self) -> bool"""
3299 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3301 def StopPropagation(*args
, **kwargs
):
3302 """StopPropagation(self) -> int"""
3303 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3305 def ResumePropagation(*args
, **kwargs
):
3306 """ResumePropagation(self, int propagationLevel)"""
3307 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3309 def Clone(*args
, **kwargs
):
3310 """Clone(self) -> Event"""
3311 return _core_
.Event_Clone(*args
, **kwargs
)
3314 class EventPtr(Event
):
3315 def __init__(self
, this
):
3317 if not hasattr(self
,"thisown"): self
.thisown
= 0
3318 self
.__class
__ = Event
3319 _core_
.Event_swigregister(EventPtr
)
3321 #---------------------------------------------------------------------------
3323 class PropagationDisabler(object):
3324 """Proxy of C++ PropagationDisabler class"""
3326 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3327 def __init__(self
, *args
, **kwargs
):
3328 """__init__(self, Event event) -> PropagationDisabler"""
3329 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3330 self
.this
= newobj
.this
3333 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3336 if self
.thisown
: destroy(self
)
3340 class PropagationDisablerPtr(PropagationDisabler
):
3341 def __init__(self
, this
):
3343 if not hasattr(self
,"thisown"): self
.thisown
= 0
3344 self
.__class
__ = PropagationDisabler
3345 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3347 class PropagateOnce(object):
3348 """Proxy of C++ PropagateOnce class"""
3350 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3351 def __init__(self
, *args
, **kwargs
):
3352 """__init__(self, Event event) -> PropagateOnce"""
3353 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3354 self
.this
= newobj
.this
3357 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3360 if self
.thisown
: destroy(self
)
3364 class PropagateOncePtr(PropagateOnce
):
3365 def __init__(self
, this
):
3367 if not hasattr(self
,"thisown"): self
.thisown
= 0
3368 self
.__class
__ = PropagateOnce
3369 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3371 #---------------------------------------------------------------------------
3373 class CommandEvent(Event
):
3374 """Proxy of C++ CommandEvent class"""
3376 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3377 def __init__(self
, *args
, **kwargs
):
3378 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3379 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3380 self
.this
= newobj
.this
3383 def GetSelection(*args
, **kwargs
):
3384 """GetSelection(self) -> int"""
3385 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3387 def SetString(*args
, **kwargs
):
3388 """SetString(self, String s)"""
3389 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3391 def GetString(*args
, **kwargs
):
3392 """GetString(self) -> String"""
3393 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3395 def IsChecked(*args
, **kwargs
):
3396 """IsChecked(self) -> bool"""
3397 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3400 def IsSelection(*args
, **kwargs
):
3401 """IsSelection(self) -> bool"""
3402 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3404 def SetExtraLong(*args
, **kwargs
):
3405 """SetExtraLong(self, long extraLong)"""
3406 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3408 def GetExtraLong(*args
, **kwargs
):
3409 """GetExtraLong(self) -> long"""
3410 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3412 def SetInt(*args
, **kwargs
):
3413 """SetInt(self, int i)"""
3414 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3416 def GetInt(*args
, **kwargs
):
3417 """GetInt(self) -> long"""
3418 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3420 def Clone(*args
, **kwargs
):
3421 """Clone(self) -> Event"""
3422 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3425 class CommandEventPtr(CommandEvent
):
3426 def __init__(self
, this
):
3428 if not hasattr(self
,"thisown"): self
.thisown
= 0
3429 self
.__class
__ = CommandEvent
3430 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3432 #---------------------------------------------------------------------------
3434 class NotifyEvent(CommandEvent
):
3435 """Proxy of C++ NotifyEvent class"""
3437 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3438 def __init__(self
, *args
, **kwargs
):
3439 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3440 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3441 self
.this
= newobj
.this
3444 def Veto(*args
, **kwargs
):
3446 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3448 def Allow(*args
, **kwargs
):
3450 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3452 def IsAllowed(*args
, **kwargs
):
3453 """IsAllowed(self) -> bool"""
3454 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3457 class NotifyEventPtr(NotifyEvent
):
3458 def __init__(self
, this
):
3460 if not hasattr(self
,"thisown"): self
.thisown
= 0
3461 self
.__class
__ = NotifyEvent
3462 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3464 #---------------------------------------------------------------------------
3466 class ScrollEvent(CommandEvent
):
3467 """Proxy of C++ ScrollEvent class"""
3469 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3470 def __init__(self
, *args
, **kwargs
):
3472 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3473 int orient=0) -> ScrollEvent
3475 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3476 self
.this
= newobj
.this
3479 def GetOrientation(*args
, **kwargs
):
3480 """GetOrientation(self) -> int"""
3481 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3483 def GetPosition(*args
, **kwargs
):
3484 """GetPosition(self) -> int"""
3485 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3487 def SetOrientation(*args
, **kwargs
):
3488 """SetOrientation(self, int orient)"""
3489 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3491 def SetPosition(*args
, **kwargs
):
3492 """SetPosition(self, int pos)"""
3493 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3496 class ScrollEventPtr(ScrollEvent
):
3497 def __init__(self
, this
):
3499 if not hasattr(self
,"thisown"): self
.thisown
= 0
3500 self
.__class
__ = ScrollEvent
3501 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3503 #---------------------------------------------------------------------------
3505 class ScrollWinEvent(Event
):
3506 """Proxy of C++ ScrollWinEvent class"""
3508 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3509 def __init__(self
, *args
, **kwargs
):
3510 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3511 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3512 self
.this
= newobj
.this
3515 def GetOrientation(*args
, **kwargs
):
3516 """GetOrientation(self) -> int"""
3517 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3519 def GetPosition(*args
, **kwargs
):
3520 """GetPosition(self) -> int"""
3521 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3523 def SetOrientation(*args
, **kwargs
):
3524 """SetOrientation(self, int orient)"""
3525 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3527 def SetPosition(*args
, **kwargs
):
3528 """SetPosition(self, int pos)"""
3529 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3532 class ScrollWinEventPtr(ScrollWinEvent
):
3533 def __init__(self
, this
):
3535 if not hasattr(self
,"thisown"): self
.thisown
= 0
3536 self
.__class
__ = ScrollWinEvent
3537 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3539 #---------------------------------------------------------------------------
3541 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3542 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3543 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3544 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3545 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3546 class MouseEvent(Event
):
3547 """Proxy of C++ MouseEvent class"""
3549 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3550 def __init__(self
, *args
, **kwargs
):
3551 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3552 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3553 self
.this
= newobj
.this
3556 def IsButton(*args
, **kwargs
):
3557 """IsButton(self) -> bool"""
3558 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
3560 def ButtonDown(*args
, **kwargs
):
3561 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3562 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
3564 def ButtonDClick(*args
, **kwargs
):
3565 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3566 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3568 def ButtonUp(*args
, **kwargs
):
3569 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3570 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
3572 def Button(*args
, **kwargs
):
3573 """Button(self, int but) -> bool"""
3574 return _core_
.MouseEvent_Button(*args
, **kwargs
)
3576 def ButtonIsDown(*args
, **kwargs
):
3577 """ButtonIsDown(self, int but) -> bool"""
3578 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3580 def GetButton(*args
, **kwargs
):
3581 """GetButton(self) -> int"""
3582 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
3584 def ControlDown(*args
, **kwargs
):
3585 """ControlDown(self) -> bool"""
3586 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
3588 def MetaDown(*args
, **kwargs
):
3589 """MetaDown(self) -> bool"""
3590 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
3592 def AltDown(*args
, **kwargs
):
3593 """AltDown(self) -> bool"""
3594 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
3596 def ShiftDown(*args
, **kwargs
):
3597 """ShiftDown(self) -> bool"""
3598 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
3600 def CmdDown(*args
, **kwargs
):
3602 CmdDown(self) -> bool
3604 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3605 platforms but the special "Apple" (a.k.a as "Command") key on
3606 Macs: it makes often sense to use it instead of, say, `ControlDown`
3607 because Cmd key is used for the same thing under Mac as Ctrl
3608 elsewhere. The Ctrl still exists, it's just not used for this
3609 purpose. So for non-Mac platforms this is the same as `ControlDown`
3610 and Macs this is the same as `MetaDown`.
3612 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
3614 def LeftDown(*args
, **kwargs
):
3615 """LeftDown(self) -> bool"""
3616 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
3618 def MiddleDown(*args
, **kwargs
):
3619 """MiddleDown(self) -> bool"""
3620 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
3622 def RightDown(*args
, **kwargs
):
3623 """RightDown(self) -> bool"""
3624 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
3626 def LeftUp(*args
, **kwargs
):
3627 """LeftUp(self) -> bool"""
3628 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
3630 def MiddleUp(*args
, **kwargs
):
3631 """MiddleUp(self) -> bool"""
3632 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
3634 def RightUp(*args
, **kwargs
):
3635 """RightUp(self) -> bool"""
3636 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
3638 def LeftDClick(*args
, **kwargs
):
3639 """LeftDClick(self) -> bool"""
3640 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
3642 def MiddleDClick(*args
, **kwargs
):
3643 """MiddleDClick(self) -> bool"""
3644 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3646 def RightDClick(*args
, **kwargs
):
3647 """RightDClick(self) -> bool"""
3648 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
3650 def LeftIsDown(*args
, **kwargs
):
3651 """LeftIsDown(self) -> bool"""
3652 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3654 def MiddleIsDown(*args
, **kwargs
):
3655 """MiddleIsDown(self) -> bool"""
3656 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3658 def RightIsDown(*args
, **kwargs
):
3659 """RightIsDown(self) -> bool"""
3660 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
3662 def Dragging(*args
, **kwargs
):
3663 """Dragging(self) -> bool"""
3664 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
3666 def Moving(*args
, **kwargs
):
3667 """Moving(self) -> bool"""
3668 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
3670 def Entering(*args
, **kwargs
):
3671 """Entering(self) -> bool"""
3672 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
3674 def Leaving(*args
, **kwargs
):
3675 """Leaving(self) -> bool"""
3676 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
3678 def GetPosition(*args
, **kwargs
):
3680 GetPosition(self) -> Point
3682 Returns the position of the mouse in window coordinates when the event
3685 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
3687 def GetPositionTuple(*args
, **kwargs
):
3689 GetPositionTuple() -> (x,y)
3691 Returns the position of the mouse in window coordinates when the event
3694 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3696 def GetLogicalPosition(*args
, **kwargs
):
3697 """GetLogicalPosition(self, DC dc) -> Point"""
3698 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3700 def GetX(*args
, **kwargs
):
3701 """GetX(self) -> int"""
3702 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
3704 def GetY(*args
, **kwargs
):
3705 """GetY(self) -> int"""
3706 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
3708 def GetWheelRotation(*args
, **kwargs
):
3709 """GetWheelRotation(self) -> int"""
3710 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3712 def GetWheelDelta(*args
, **kwargs
):
3713 """GetWheelDelta(self) -> int"""
3714 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3716 def GetLinesPerAction(*args
, **kwargs
):
3717 """GetLinesPerAction(self) -> int"""
3718 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3720 def IsPageScroll(*args
, **kwargs
):
3721 """IsPageScroll(self) -> bool"""
3722 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3724 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
3725 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
3726 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
3727 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
3728 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
3729 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
3730 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
3731 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
3732 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
3733 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
3734 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
3735 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
3737 class MouseEventPtr(MouseEvent
):
3738 def __init__(self
, this
):
3740 if not hasattr(self
,"thisown"): self
.thisown
= 0
3741 self
.__class
__ = MouseEvent
3742 _core_
.MouseEvent_swigregister(MouseEventPtr
)
3744 #---------------------------------------------------------------------------
3746 class SetCursorEvent(Event
):
3747 """Proxy of C++ SetCursorEvent class"""
3749 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3750 def __init__(self
, *args
, **kwargs
):
3751 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3752 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
3753 self
.this
= newobj
.this
3756 def GetX(*args
, **kwargs
):
3757 """GetX(self) -> int"""
3758 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
3760 def GetY(*args
, **kwargs
):
3761 """GetY(self) -> int"""
3762 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
3764 def SetCursor(*args
, **kwargs
):
3765 """SetCursor(self, Cursor cursor)"""
3766 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3768 def GetCursor(*args
, **kwargs
):
3769 """GetCursor(self) -> Cursor"""
3770 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3772 def HasCursor(*args
, **kwargs
):
3773 """HasCursor(self) -> bool"""
3774 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3777 class SetCursorEventPtr(SetCursorEvent
):
3778 def __init__(self
, this
):
3780 if not hasattr(self
,"thisown"): self
.thisown
= 0
3781 self
.__class
__ = SetCursorEvent
3782 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3784 #---------------------------------------------------------------------------
3786 class KeyEvent(Event
):
3787 """Proxy of C++ KeyEvent class"""
3789 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3790 def __init__(self
, *args
, **kwargs
):
3791 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3792 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
3793 self
.this
= newobj
.this
3796 def ControlDown(*args
, **kwargs
):
3797 """ControlDown(self) -> bool"""
3798 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
3800 def MetaDown(*args
, **kwargs
):
3801 """MetaDown(self) -> bool"""
3802 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
3804 def AltDown(*args
, **kwargs
):
3805 """AltDown(self) -> bool"""
3806 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
3808 def ShiftDown(*args
, **kwargs
):
3809 """ShiftDown(self) -> bool"""
3810 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
3812 def CmdDown(*args
, **kwargs
):
3814 CmdDown(self) -> bool
3816 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3817 platforms but the special "Apple" (a.k.a as "Command") key on
3818 Macs: it makes often sense to use it instead of, say, `ControlDown`
3819 because Cmd key is used for the same thing under Mac as Ctrl
3820 elsewhere. The Ctrl still exists, it's just not used for this
3821 purpose. So for non-Mac platforms this is the same as `ControlDown`
3822 and Macs this is the same as `MetaDown`.
3824 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
3826 def HasModifiers(*args
, **kwargs
):
3827 """HasModifiers(self) -> bool"""
3828 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
3830 def GetKeyCode(*args
, **kwargs
):
3831 """GetKeyCode(self) -> int"""
3832 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3834 KeyCode
= GetKeyCode
3835 def GetUnicodeKey(*args
, **kwargs
):
3836 """GetUnicodeKey(self) -> int"""
3837 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
3839 GetUniChar
= GetUnicodeKey
3840 def GetRawKeyCode(*args
, **kwargs
):
3841 """GetRawKeyCode(self) -> unsigned int"""
3842 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3844 def GetRawKeyFlags(*args
, **kwargs
):
3845 """GetRawKeyFlags(self) -> unsigned int"""
3846 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3848 def GetPosition(*args
, **kwargs
):
3850 GetPosition(self) -> Point
3852 Find the position of the event.
3854 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
3856 def GetPositionTuple(*args
, **kwargs
):
3858 GetPositionTuple() -> (x,y)
3860 Find the position of the event.
3862 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3864 def GetX(*args
, **kwargs
):
3865 """GetX(self) -> int"""
3866 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
3868 def GetY(*args
, **kwargs
):
3869 """GetY(self) -> int"""
3870 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
3872 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
3873 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
3874 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
3875 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
3876 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
3877 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
3878 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
3879 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
3880 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
3881 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
3883 class KeyEventPtr(KeyEvent
):
3884 def __init__(self
, this
):
3886 if not hasattr(self
,"thisown"): self
.thisown
= 0
3887 self
.__class
__ = KeyEvent
3888 _core_
.KeyEvent_swigregister(KeyEventPtr
)
3890 #---------------------------------------------------------------------------
3892 class SizeEvent(Event
):
3893 """Proxy of C++ SizeEvent class"""
3895 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3896 def __init__(self
, *args
, **kwargs
):
3897 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3898 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
3899 self
.this
= newobj
.this
3902 def GetSize(*args
, **kwargs
):
3903 """GetSize(self) -> Size"""
3904 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
3906 def GetRect(*args
, **kwargs
):
3907 """GetRect(self) -> Rect"""
3908 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
3910 def SetRect(*args
, **kwargs
):
3911 """SetRect(self, Rect rect)"""
3912 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
3914 def SetSize(*args
, **kwargs
):
3915 """SetSize(self, Size size)"""
3916 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
3918 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
3919 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
3921 class SizeEventPtr(SizeEvent
):
3922 def __init__(self
, this
):
3924 if not hasattr(self
,"thisown"): self
.thisown
= 0
3925 self
.__class
__ = SizeEvent
3926 _core_
.SizeEvent_swigregister(SizeEventPtr
)
3928 #---------------------------------------------------------------------------
3930 class MoveEvent(Event
):
3931 """Proxy of C++ MoveEvent class"""
3933 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3934 def __init__(self
, *args
, **kwargs
):
3935 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3936 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
3937 self
.this
= newobj
.this
3940 def GetPosition(*args
, **kwargs
):
3941 """GetPosition(self) -> Point"""
3942 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
3944 def GetRect(*args
, **kwargs
):
3945 """GetRect(self) -> Rect"""
3946 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
3948 def SetRect(*args
, **kwargs
):
3949 """SetRect(self, Rect rect)"""
3950 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
3952 def SetPosition(*args
, **kwargs
):
3953 """SetPosition(self, Point pos)"""
3954 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
3956 m_pos
= property(_core_
.MoveEvent_m_pos_get
, _core_
.MoveEvent_m_pos_set
)
3957 m_rect
= property(_core_
.MoveEvent_m_rect_get
, _core_
.MoveEvent_m_rect_set
)
3959 class MoveEventPtr(MoveEvent
):
3960 def __init__(self
, this
):
3962 if not hasattr(self
,"thisown"): self
.thisown
= 0
3963 self
.__class
__ = MoveEvent
3964 _core_
.MoveEvent_swigregister(MoveEventPtr
)
3966 #---------------------------------------------------------------------------
3968 class PaintEvent(Event
):
3969 """Proxy of C++ PaintEvent class"""
3971 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3972 def __init__(self
, *args
, **kwargs
):
3973 """__init__(self, int Id=0) -> PaintEvent"""
3974 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
3975 self
.this
= newobj
.this
3979 class PaintEventPtr(PaintEvent
):
3980 def __init__(self
, this
):
3982 if not hasattr(self
,"thisown"): self
.thisown
= 0
3983 self
.__class
__ = PaintEvent
3984 _core_
.PaintEvent_swigregister(PaintEventPtr
)
3986 class NcPaintEvent(Event
):
3987 """Proxy of C++ NcPaintEvent class"""
3989 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3990 def __init__(self
, *args
, **kwargs
):
3991 """__init__(self, int winid=0) -> NcPaintEvent"""
3992 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
3993 self
.this
= newobj
.this
3997 class NcPaintEventPtr(NcPaintEvent
):
3998 def __init__(self
, this
):
4000 if not hasattr(self
,"thisown"): self
.thisown
= 0
4001 self
.__class
__ = NcPaintEvent
4002 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
4004 #---------------------------------------------------------------------------
4006 class EraseEvent(Event
):
4007 """Proxy of C++ EraseEvent class"""
4009 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4010 def __init__(self
, *args
, **kwargs
):
4011 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4012 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
4013 self
.this
= newobj
.this
4016 def GetDC(*args
, **kwargs
):
4017 """GetDC(self) -> DC"""
4018 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
4021 class EraseEventPtr(EraseEvent
):
4022 def __init__(self
, this
):
4024 if not hasattr(self
,"thisown"): self
.thisown
= 0
4025 self
.__class
__ = EraseEvent
4026 _core_
.EraseEvent_swigregister(EraseEventPtr
)
4028 #---------------------------------------------------------------------------
4030 class FocusEvent(Event
):
4031 """Proxy of C++ FocusEvent class"""
4033 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4034 def __init__(self
, *args
, **kwargs
):
4035 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4036 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
4037 self
.this
= newobj
.this
4040 def GetWindow(*args
, **kwargs
):
4041 """GetWindow(self) -> Window"""
4042 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
4044 def SetWindow(*args
, **kwargs
):
4045 """SetWindow(self, Window win)"""
4046 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
4049 class FocusEventPtr(FocusEvent
):
4050 def __init__(self
, this
):
4052 if not hasattr(self
,"thisown"): self
.thisown
= 0
4053 self
.__class
__ = FocusEvent
4054 _core_
.FocusEvent_swigregister(FocusEventPtr
)
4056 #---------------------------------------------------------------------------
4058 class ChildFocusEvent(CommandEvent
):
4059 """Proxy of C++ ChildFocusEvent class"""
4061 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4062 def __init__(self
, *args
, **kwargs
):
4063 """__init__(self, Window win=None) -> ChildFocusEvent"""
4064 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
4065 self
.this
= newobj
.this
4068 def GetWindow(*args
, **kwargs
):
4069 """GetWindow(self) -> Window"""
4070 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
4073 class ChildFocusEventPtr(ChildFocusEvent
):
4074 def __init__(self
, this
):
4076 if not hasattr(self
,"thisown"): self
.thisown
= 0
4077 self
.__class
__ = ChildFocusEvent
4078 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
4080 #---------------------------------------------------------------------------
4082 class ActivateEvent(Event
):
4083 """Proxy of C++ ActivateEvent class"""
4085 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4086 def __init__(self
, *args
, **kwargs
):
4087 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4088 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
4089 self
.this
= newobj
.this
4092 def GetActive(*args
, **kwargs
):
4093 """GetActive(self) -> bool"""
4094 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
4097 class ActivateEventPtr(ActivateEvent
):
4098 def __init__(self
, this
):
4100 if not hasattr(self
,"thisown"): self
.thisown
= 0
4101 self
.__class
__ = ActivateEvent
4102 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
4104 #---------------------------------------------------------------------------
4106 class InitDialogEvent(Event
):
4107 """Proxy of C++ InitDialogEvent class"""
4109 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4110 def __init__(self
, *args
, **kwargs
):
4111 """__init__(self, int Id=0) -> InitDialogEvent"""
4112 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
4113 self
.this
= newobj
.this
4117 class InitDialogEventPtr(InitDialogEvent
):
4118 def __init__(self
, this
):
4120 if not hasattr(self
,"thisown"): self
.thisown
= 0
4121 self
.__class
__ = InitDialogEvent
4122 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
4124 #---------------------------------------------------------------------------
4126 class MenuEvent(Event
):
4127 """Proxy of C++ MenuEvent class"""
4129 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4130 def __init__(self
, *args
, **kwargs
):
4131 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4132 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
4133 self
.this
= newobj
.this
4136 def GetMenuId(*args
, **kwargs
):
4137 """GetMenuId(self) -> int"""
4138 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
4140 def IsPopup(*args
, **kwargs
):
4141 """IsPopup(self) -> bool"""
4142 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4144 def GetMenu(*args
, **kwargs
):
4145 """GetMenu(self) -> Menu"""
4146 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4149 class MenuEventPtr(MenuEvent
):
4150 def __init__(self
, this
):
4152 if not hasattr(self
,"thisown"): self
.thisown
= 0
4153 self
.__class
__ = MenuEvent
4154 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4156 #---------------------------------------------------------------------------
4158 class CloseEvent(Event
):
4159 """Proxy of C++ CloseEvent class"""
4161 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4162 def __init__(self
, *args
, **kwargs
):
4163 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4164 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4165 self
.this
= newobj
.this
4168 def SetLoggingOff(*args
, **kwargs
):
4169 """SetLoggingOff(self, bool logOff)"""
4170 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4172 def GetLoggingOff(*args
, **kwargs
):
4173 """GetLoggingOff(self) -> bool"""
4174 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4176 def Veto(*args
, **kwargs
):
4177 """Veto(self, bool veto=True)"""
4178 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4180 def SetCanVeto(*args
, **kwargs
):
4181 """SetCanVeto(self, bool canVeto)"""
4182 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4184 def CanVeto(*args
, **kwargs
):
4185 """CanVeto(self) -> bool"""
4186 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4188 def GetVeto(*args
, **kwargs
):
4189 """GetVeto(self) -> bool"""
4190 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4193 class CloseEventPtr(CloseEvent
):
4194 def __init__(self
, this
):
4196 if not hasattr(self
,"thisown"): self
.thisown
= 0
4197 self
.__class
__ = CloseEvent
4198 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4200 #---------------------------------------------------------------------------
4202 class ShowEvent(Event
):
4203 """Proxy of C++ ShowEvent class"""
4205 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4206 def __init__(self
, *args
, **kwargs
):
4207 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4208 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4209 self
.this
= newobj
.this
4212 def SetShow(*args
, **kwargs
):
4213 """SetShow(self, bool show)"""
4214 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4216 def GetShow(*args
, **kwargs
):
4217 """GetShow(self) -> bool"""
4218 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4221 class ShowEventPtr(ShowEvent
):
4222 def __init__(self
, this
):
4224 if not hasattr(self
,"thisown"): self
.thisown
= 0
4225 self
.__class
__ = ShowEvent
4226 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4228 #---------------------------------------------------------------------------
4230 class IconizeEvent(Event
):
4231 """Proxy of C++ IconizeEvent class"""
4233 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4234 def __init__(self
, *args
, **kwargs
):
4235 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4236 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4237 self
.this
= newobj
.this
4240 def Iconized(*args
, **kwargs
):
4241 """Iconized(self) -> bool"""
4242 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4245 class IconizeEventPtr(IconizeEvent
):
4246 def __init__(self
, this
):
4248 if not hasattr(self
,"thisown"): self
.thisown
= 0
4249 self
.__class
__ = IconizeEvent
4250 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4252 #---------------------------------------------------------------------------
4254 class MaximizeEvent(Event
):
4255 """Proxy of C++ MaximizeEvent class"""
4257 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4258 def __init__(self
, *args
, **kwargs
):
4259 """__init__(self, int id=0) -> MaximizeEvent"""
4260 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4261 self
.this
= newobj
.this
4265 class MaximizeEventPtr(MaximizeEvent
):
4266 def __init__(self
, this
):
4268 if not hasattr(self
,"thisown"): self
.thisown
= 0
4269 self
.__class
__ = MaximizeEvent
4270 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4272 #---------------------------------------------------------------------------
4274 class DropFilesEvent(Event
):
4275 """Proxy of C++ DropFilesEvent class"""
4276 def __init__(self
): raise RuntimeError, "No constructor defined"
4278 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4279 def GetPosition(*args
, **kwargs
):
4280 """GetPosition(self) -> Point"""
4281 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4283 def GetNumberOfFiles(*args
, **kwargs
):
4284 """GetNumberOfFiles(self) -> int"""
4285 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4287 def GetFiles(*args
, **kwargs
):
4288 """GetFiles(self) -> PyObject"""
4289 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4292 class DropFilesEventPtr(DropFilesEvent
):
4293 def __init__(self
, this
):
4295 if not hasattr(self
,"thisown"): self
.thisown
= 0
4296 self
.__class
__ = DropFilesEvent
4297 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4299 #---------------------------------------------------------------------------
4301 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4302 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4303 class UpdateUIEvent(CommandEvent
):
4304 """Proxy of C++ UpdateUIEvent class"""
4306 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4307 def __init__(self
, *args
, **kwargs
):
4308 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4309 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4310 self
.this
= newobj
.this
4313 def GetChecked(*args
, **kwargs
):
4314 """GetChecked(self) -> bool"""
4315 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4317 def GetEnabled(*args
, **kwargs
):
4318 """GetEnabled(self) -> bool"""
4319 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4321 def GetText(*args
, **kwargs
):
4322 """GetText(self) -> String"""
4323 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4325 def GetSetText(*args
, **kwargs
):
4326 """GetSetText(self) -> bool"""
4327 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4329 def GetSetChecked(*args
, **kwargs
):
4330 """GetSetChecked(self) -> bool"""
4331 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4333 def GetSetEnabled(*args
, **kwargs
):
4334 """GetSetEnabled(self) -> bool"""
4335 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4337 def Check(*args
, **kwargs
):
4338 """Check(self, bool check)"""
4339 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4341 def Enable(*args
, **kwargs
):
4342 """Enable(self, bool enable)"""
4343 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4345 def SetText(*args
, **kwargs
):
4346 """SetText(self, String text)"""
4347 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4349 def SetUpdateInterval(*args
, **kwargs
):
4350 """SetUpdateInterval(long updateInterval)"""
4351 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4353 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4354 def GetUpdateInterval(*args
, **kwargs
):
4355 """GetUpdateInterval() -> long"""
4356 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4358 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4359 def CanUpdate(*args
, **kwargs
):
4360 """CanUpdate(Window win) -> bool"""
4361 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4363 CanUpdate
= staticmethod(CanUpdate
)
4364 def ResetUpdateTime(*args
, **kwargs
):
4365 """ResetUpdateTime()"""
4366 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4368 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4369 def SetMode(*args
, **kwargs
):
4370 """SetMode(int mode)"""
4371 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4373 SetMode
= staticmethod(SetMode
)
4374 def GetMode(*args
, **kwargs
):
4375 """GetMode() -> int"""
4376 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4378 GetMode
= staticmethod(GetMode
)
4380 class UpdateUIEventPtr(UpdateUIEvent
):
4381 def __init__(self
, this
):
4383 if not hasattr(self
,"thisown"): self
.thisown
= 0
4384 self
.__class
__ = UpdateUIEvent
4385 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4387 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4388 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4389 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4391 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4392 """UpdateUIEvent_GetUpdateInterval() -> long"""
4393 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4395 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4396 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4397 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4399 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4400 """UpdateUIEvent_ResetUpdateTime()"""
4401 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4403 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4404 """UpdateUIEvent_SetMode(int mode)"""
4405 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4407 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4408 """UpdateUIEvent_GetMode() -> int"""
4409 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4411 #---------------------------------------------------------------------------
4413 class SysColourChangedEvent(Event
):
4414 """Proxy of C++ SysColourChangedEvent class"""
4416 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4417 def __init__(self
, *args
, **kwargs
):
4418 """__init__(self) -> SysColourChangedEvent"""
4419 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
4420 self
.this
= newobj
.this
4424 class SysColourChangedEventPtr(SysColourChangedEvent
):
4425 def __init__(self
, this
):
4427 if not hasattr(self
,"thisown"): self
.thisown
= 0
4428 self
.__class
__ = SysColourChangedEvent
4429 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4431 #---------------------------------------------------------------------------
4433 class MouseCaptureChangedEvent(Event
):
4434 """Proxy of C++ MouseCaptureChangedEvent class"""
4436 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4437 def __init__(self
, *args
, **kwargs
):
4438 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4439 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4440 self
.this
= newobj
.this
4443 def GetCapturedWindow(*args
, **kwargs
):
4444 """GetCapturedWindow(self) -> Window"""
4445 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4448 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4449 def __init__(self
, this
):
4451 if not hasattr(self
,"thisown"): self
.thisown
= 0
4452 self
.__class
__ = MouseCaptureChangedEvent
4453 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4455 #---------------------------------------------------------------------------
4457 class DisplayChangedEvent(Event
):
4458 """Proxy of C++ DisplayChangedEvent class"""
4460 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4461 def __init__(self
, *args
, **kwargs
):
4462 """__init__(self) -> DisplayChangedEvent"""
4463 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
4464 self
.this
= newobj
.this
4468 class DisplayChangedEventPtr(DisplayChangedEvent
):
4469 def __init__(self
, this
):
4471 if not hasattr(self
,"thisown"): self
.thisown
= 0
4472 self
.__class
__ = DisplayChangedEvent
4473 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4475 #---------------------------------------------------------------------------
4477 class PaletteChangedEvent(Event
):
4478 """Proxy of C++ PaletteChangedEvent class"""
4480 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4481 def __init__(self
, *args
, **kwargs
):
4482 """__init__(self, int id=0) -> PaletteChangedEvent"""
4483 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
4484 self
.this
= newobj
.this
4487 def SetChangedWindow(*args
, **kwargs
):
4488 """SetChangedWindow(self, Window win)"""
4489 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4491 def GetChangedWindow(*args
, **kwargs
):
4492 """GetChangedWindow(self) -> Window"""
4493 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4496 class PaletteChangedEventPtr(PaletteChangedEvent
):
4497 def __init__(self
, this
):
4499 if not hasattr(self
,"thisown"): self
.thisown
= 0
4500 self
.__class
__ = PaletteChangedEvent
4501 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4503 #---------------------------------------------------------------------------
4505 class QueryNewPaletteEvent(Event
):
4506 """Proxy of C++ QueryNewPaletteEvent class"""
4508 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4509 def __init__(self
, *args
, **kwargs
):
4510 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4511 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4512 self
.this
= newobj
.this
4515 def SetPaletteRealized(*args
, **kwargs
):
4516 """SetPaletteRealized(self, bool realized)"""
4517 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4519 def GetPaletteRealized(*args
, **kwargs
):
4520 """GetPaletteRealized(self) -> bool"""
4521 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4524 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4525 def __init__(self
, this
):
4527 if not hasattr(self
,"thisown"): self
.thisown
= 0
4528 self
.__class
__ = QueryNewPaletteEvent
4529 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4531 #---------------------------------------------------------------------------
4533 class NavigationKeyEvent(Event
):
4534 """Proxy of C++ NavigationKeyEvent class"""
4536 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4537 def __init__(self
, *args
, **kwargs
):
4538 """__init__(self) -> NavigationKeyEvent"""
4539 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
4540 self
.this
= newobj
.this
4543 def GetDirection(*args
, **kwargs
):
4544 """GetDirection(self) -> bool"""
4545 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4547 def SetDirection(*args
, **kwargs
):
4548 """SetDirection(self, bool forward)"""
4549 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4551 def IsWindowChange(*args
, **kwargs
):
4552 """IsWindowChange(self) -> bool"""
4553 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4555 def SetWindowChange(*args
, **kwargs
):
4556 """SetWindowChange(self, bool ischange)"""
4557 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4559 def SetFlags(*args
, **kwargs
):
4560 """SetFlags(self, long flags)"""
4561 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
4563 def GetCurrentFocus(*args
, **kwargs
):
4564 """GetCurrentFocus(self) -> Window"""
4565 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4567 def SetCurrentFocus(*args
, **kwargs
):
4568 """SetCurrentFocus(self, Window win)"""
4569 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4571 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
4572 IsForward
= _core_
.NavigationKeyEvent_IsForward
4573 WinChange
= _core_
.NavigationKeyEvent_WinChange
4575 class NavigationKeyEventPtr(NavigationKeyEvent
):
4576 def __init__(self
, this
):
4578 if not hasattr(self
,"thisown"): self
.thisown
= 0
4579 self
.__class
__ = NavigationKeyEvent
4580 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4582 #---------------------------------------------------------------------------
4584 class WindowCreateEvent(CommandEvent
):
4585 """Proxy of C++ WindowCreateEvent class"""
4587 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4588 def __init__(self
, *args
, **kwargs
):
4589 """__init__(self, Window win=None) -> WindowCreateEvent"""
4590 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
4591 self
.this
= newobj
.this
4594 def GetWindow(*args
, **kwargs
):
4595 """GetWindow(self) -> Window"""
4596 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4599 class WindowCreateEventPtr(WindowCreateEvent
):
4600 def __init__(self
, this
):
4602 if not hasattr(self
,"thisown"): self
.thisown
= 0
4603 self
.__class
__ = WindowCreateEvent
4604 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4606 class WindowDestroyEvent(CommandEvent
):
4607 """Proxy of C++ WindowDestroyEvent class"""
4609 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4610 def __init__(self
, *args
, **kwargs
):
4611 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4612 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
4613 self
.this
= newobj
.this
4616 def GetWindow(*args
, **kwargs
):
4617 """GetWindow(self) -> Window"""
4618 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4621 class WindowDestroyEventPtr(WindowDestroyEvent
):
4622 def __init__(self
, this
):
4624 if not hasattr(self
,"thisown"): self
.thisown
= 0
4625 self
.__class
__ = WindowDestroyEvent
4626 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4628 #---------------------------------------------------------------------------
4630 class ContextMenuEvent(CommandEvent
):
4631 """Proxy of C++ ContextMenuEvent class"""
4633 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4634 def __init__(self
, *args
, **kwargs
):
4635 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4636 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
4637 self
.this
= newobj
.this
4640 def GetPosition(*args
, **kwargs
):
4641 """GetPosition(self) -> Point"""
4642 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4644 def SetPosition(*args
, **kwargs
):
4645 """SetPosition(self, Point pos)"""
4646 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4649 class ContextMenuEventPtr(ContextMenuEvent
):
4650 def __init__(self
, this
):
4652 if not hasattr(self
,"thisown"): self
.thisown
= 0
4653 self
.__class
__ = ContextMenuEvent
4654 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4656 #---------------------------------------------------------------------------
4658 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
4659 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
4660 class IdleEvent(Event
):
4661 """Proxy of C++ IdleEvent class"""
4663 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4664 def __init__(self
, *args
, **kwargs
):
4665 """__init__(self) -> IdleEvent"""
4666 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
4667 self
.this
= newobj
.this
4670 def RequestMore(*args
, **kwargs
):
4671 """RequestMore(self, bool needMore=True)"""
4672 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
4674 def MoreRequested(*args
, **kwargs
):
4675 """MoreRequested(self) -> bool"""
4676 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
4678 def SetMode(*args
, **kwargs
):
4679 """SetMode(int mode)"""
4680 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4682 SetMode
= staticmethod(SetMode
)
4683 def GetMode(*args
, **kwargs
):
4684 """GetMode() -> int"""
4685 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4687 GetMode
= staticmethod(GetMode
)
4688 def CanSend(*args
, **kwargs
):
4689 """CanSend(Window win) -> bool"""
4690 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4692 CanSend
= staticmethod(CanSend
)
4694 class IdleEventPtr(IdleEvent
):
4695 def __init__(self
, this
):
4697 if not hasattr(self
,"thisown"): self
.thisown
= 0
4698 self
.__class
__ = IdleEvent
4699 _core_
.IdleEvent_swigregister(IdleEventPtr
)
4701 def IdleEvent_SetMode(*args
, **kwargs
):
4702 """IdleEvent_SetMode(int mode)"""
4703 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4705 def IdleEvent_GetMode(*args
, **kwargs
):
4706 """IdleEvent_GetMode() -> int"""
4707 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4709 def IdleEvent_CanSend(*args
, **kwargs
):
4710 """IdleEvent_CanSend(Window win) -> bool"""
4711 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4713 #---------------------------------------------------------------------------
4715 class PyEvent(Event
):
4716 """Proxy of C++ PyEvent class"""
4718 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4719 def __init__(self
, *args
, **kwargs
):
4720 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4721 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
4722 self
.this
= newobj
.this
4727 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
4730 if self
.thisown
: destroy(self
)
4733 def SetSelf(*args
, **kwargs
):
4734 """SetSelf(self, PyObject self)"""
4735 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
4737 def GetSelf(*args
, **kwargs
):
4738 """GetSelf(self) -> PyObject"""
4739 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
4742 class PyEventPtr(PyEvent
):
4743 def __init__(self
, this
):
4745 if not hasattr(self
,"thisown"): self
.thisown
= 0
4746 self
.__class
__ = PyEvent
4747 _core_
.PyEvent_swigregister(PyEventPtr
)
4749 class PyCommandEvent(CommandEvent
):
4750 """Proxy of C++ PyCommandEvent class"""
4752 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4753 def __init__(self
, *args
, **kwargs
):
4754 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4755 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
4756 self
.this
= newobj
.this
4761 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
4764 if self
.thisown
: destroy(self
)
4767 def SetSelf(*args
, **kwargs
):
4768 """SetSelf(self, PyObject self)"""
4769 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4771 def GetSelf(*args
, **kwargs
):
4772 """GetSelf(self) -> PyObject"""
4773 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4776 class PyCommandEventPtr(PyCommandEvent
):
4777 def __init__(self
, this
):
4779 if not hasattr(self
,"thisown"): self
.thisown
= 0
4780 self
.__class
__ = PyCommandEvent
4781 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4783 #---------------------------------------------------------------------------
4785 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
4786 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
4787 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
4788 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
4789 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
4790 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
4791 class PyApp(EvtHandler
):
4793 The ``wx.PyApp`` class is an *implementation detail*, please use the
4794 `wx.App` class (or some other derived class) instead.
4797 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4798 def __init__(self
, *args
, **kwargs
):
4800 __init__(self) -> PyApp
4802 Create a new application object, starting the bootstrap process.
4804 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
4805 self
.this
= newobj
.this
4808 self
._setCallbackInfo
(self
, PyApp
)
4809 self
._setOORInfo
(self
)
4811 def __del__(self
, destroy
=_core_
.delete_PyApp
):
4814 if self
.thisown
: destroy(self
)
4817 def _setCallbackInfo(*args
, **kwargs
):
4818 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4819 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
4821 def GetAppName(*args
, **kwargs
):
4823 GetAppName(self) -> String
4825 Get the application name.
4827 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
4829 def SetAppName(*args
, **kwargs
):
4831 SetAppName(self, String name)
4833 Set the application name. This value may be used automatically by
4834 `wx.Config` and such.
4836 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
4838 def GetClassName(*args
, **kwargs
):
4840 GetClassName(self) -> String
4842 Get the application's class name.
4844 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
4846 def SetClassName(*args
, **kwargs
):
4848 SetClassName(self, String name)
4850 Set the application's class name. This value may be used for
4851 X-resources if applicable for the platform
4853 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
4855 def GetVendorName(*args
, **kwargs
):
4857 GetVendorName(self) -> String
4859 Get the application's vendor name.
4861 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
4863 def SetVendorName(*args
, **kwargs
):
4865 SetVendorName(self, String name)
4867 Set the application's vendor name. This value may be used
4868 automatically by `wx.Config` and such.
4870 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
4872 def GetTraits(*args
, **kwargs
):
4874 GetTraits(self) -> wxAppTraits
4876 Return (and create if necessary) the app traits object to which we
4877 delegate for everything which either should be configurable by the
4878 user (then he can change the default behaviour simply by overriding
4879 CreateTraits() and returning his own traits object) or which is
4880 GUI/console dependent as then wx.AppTraits allows us to abstract the
4881 differences behind the common facade.
4883 :todo: Add support for overriding CreateAppTraits in wxPython.
4885 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
4887 def ProcessPendingEvents(*args
, **kwargs
):
4889 ProcessPendingEvents(self)
4891 Process all events in the Pending Events list -- it is necessary to
4892 call this function to process posted events. This normally happens
4893 during each event loop iteration.
4895 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4897 def Yield(*args
, **kwargs
):
4899 Yield(self, bool onlyIfNeeded=False) -> bool
4901 Process all currently pending events right now, instead of waiting
4902 until return to the event loop. It is an error to call ``Yield``
4903 recursively unless the value of ``onlyIfNeeded`` is True.
4905 :warning: This function is dangerous as it can lead to unexpected
4906 reentrancies (i.e. when called from an event handler it may
4907 result in calling the same event handler again), use with
4908 extreme care or, better, don't use at all!
4910 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4913 return _core_
.PyApp_Yield(*args
, **kwargs
)
4915 def WakeUpIdle(*args
, **kwargs
):
4919 Make sure that idle events are sent again.
4920 :see: `wx.WakeUpIdle`
4922 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
4924 def IsMainLoopRunning(*args
, **kwargs
):
4926 IsMainLoopRunning() -> bool
4928 Returns True if we're running the main loop, i.e. if the events can
4929 currently be dispatched.
4931 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
4933 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
4934 def MainLoop(*args
, **kwargs
):
4936 MainLoop(self) -> int
4938 Execute the main GUI loop, the function doesn't normally return until
4939 all top level windows have been closed and destroyed.
4941 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
4943 def Exit(*args
, **kwargs
):
4947 Exit the main loop thus terminating the application.
4950 return _core_
.PyApp_Exit(*args
, **kwargs
)
4952 def ExitMainLoop(*args
, **kwargs
):
4956 Exit the main GUI loop during the next iteration of the main
4957 loop, (i.e. it does not stop the program immediately!)
4959 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
4961 def Pending(*args
, **kwargs
):
4963 Pending(self) -> bool
4965 Returns True if there are unprocessed events in the event queue.
4967 return _core_
.PyApp_Pending(*args
, **kwargs
)
4969 def Dispatch(*args
, **kwargs
):
4971 Dispatch(self) -> bool
4973 Process the first event in the event queue (blocks until an event
4974 appears if there are none currently)
4976 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
4978 def ProcessIdle(*args
, **kwargs
):
4980 ProcessIdle(self) -> bool
4982 Called from the MainLoop when the application becomes idle (there are
4983 no pending events) and sends a `wx.IdleEvent` to all interested
4984 parties. Returns True if more idle events are needed, False if not.
4986 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
4988 def SendIdleEvents(*args
, **kwargs
):
4990 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4992 Send idle event to window and all subwindows. Returns True if more
4993 idle time is requested.
4995 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
4997 def IsActive(*args
, **kwargs
):
4999 IsActive(self) -> bool
5001 Return True if our app has focus.
5003 return _core_
.PyApp_IsActive(*args
, **kwargs
)
5005 def SetTopWindow(*args
, **kwargs
):
5007 SetTopWindow(self, Window win)
5009 Set the *main* top level window
5011 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
5013 def GetTopWindow(*args
, **kwargs
):
5015 GetTopWindow(self) -> Window
5017 Return the *main* top level window (if it hadn't been set previously
5018 with SetTopWindow(), will return just some top level window and, if
5019 there not any, will return None)
5021 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
5023 def SetExitOnFrameDelete(*args
, **kwargs
):
5025 SetExitOnFrameDelete(self, bool flag)
5027 Control the exit behaviour: by default, the program will exit the main
5028 loop (and so, usually, terminate) when the last top-level program
5029 window is deleted. Beware that if you disable this behaviour (with
5030 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5031 explicitly from somewhere.
5033 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
5035 def GetExitOnFrameDelete(*args
, **kwargs
):
5037 GetExitOnFrameDelete(self) -> bool
5039 Get the current exit behaviour setting.
5041 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
5043 def SetUseBestVisual(*args
, **kwargs
):
5045 SetUseBestVisual(self, bool flag)
5047 Set whether the app should try to use the best available visual on
5048 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5050 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
5052 def GetUseBestVisual(*args
, **kwargs
):
5054 GetUseBestVisual(self) -> bool
5056 Get current UseBestVisual setting.
5058 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
5060 def SetPrintMode(*args
, **kwargs
):
5061 """SetPrintMode(self, int mode)"""
5062 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
5064 def GetPrintMode(*args
, **kwargs
):
5065 """GetPrintMode(self) -> int"""
5066 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
5068 def SetAssertMode(*args
, **kwargs
):
5070 SetAssertMode(self, int mode)
5072 Set the OnAssert behaviour for debug and hybrid builds.
5074 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
5076 def GetAssertMode(*args
, **kwargs
):
5078 GetAssertMode(self) -> int
5080 Get the current OnAssert behaviour setting.
5082 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
5084 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5085 """GetMacSupportPCMenuShortcuts() -> bool"""
5086 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5088 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
5089 def GetMacAboutMenuItemId(*args
, **kwargs
):
5090 """GetMacAboutMenuItemId() -> long"""
5091 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5093 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
5094 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
5095 """GetMacPreferencesMenuItemId() -> long"""
5096 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5098 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
5099 def GetMacExitMenuItemId(*args
, **kwargs
):
5100 """GetMacExitMenuItemId() -> long"""
5101 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5103 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
5104 def GetMacHelpMenuTitleName(*args
, **kwargs
):
5105 """GetMacHelpMenuTitleName() -> String"""
5106 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5108 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
5109 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5110 """SetMacSupportPCMenuShortcuts(bool val)"""
5111 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5113 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
5114 def SetMacAboutMenuItemId(*args
, **kwargs
):
5115 """SetMacAboutMenuItemId(long val)"""
5116 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5118 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
5119 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
5120 """SetMacPreferencesMenuItemId(long val)"""
5121 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5123 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
5124 def SetMacExitMenuItemId(*args
, **kwargs
):
5125 """SetMacExitMenuItemId(long val)"""
5126 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5128 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
5129 def SetMacHelpMenuTitleName(*args
, **kwargs
):
5130 """SetMacHelpMenuTitleName(String val)"""
5131 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5133 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
5134 def _BootstrapApp(*args
, **kwargs
):
5138 For internal use only
5140 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
5142 def GetComCtl32Version(*args
, **kwargs
):
5144 GetComCtl32Version() -> int
5146 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5147 it wasn't found at all. Raises an exception on non-Windows platforms.
5149 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5151 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
5153 class PyAppPtr(PyApp
):
5154 def __init__(self
, this
):
5156 if not hasattr(self
,"thisown"): self
.thisown
= 0
5157 self
.__class
__ = PyApp
5158 _core_
.PyApp_swigregister(PyAppPtr
)
5160 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5162 PyApp_IsMainLoopRunning() -> bool
5164 Returns True if we're running the main loop, i.e. if the events can
5165 currently be dispatched.
5167 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5169 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5170 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5171 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5173 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5174 """PyApp_GetMacAboutMenuItemId() -> long"""
5175 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5177 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5178 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5179 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5181 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5182 """PyApp_GetMacExitMenuItemId() -> long"""
5183 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5185 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5186 """PyApp_GetMacHelpMenuTitleName() -> String"""
5187 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5189 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5190 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5191 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5193 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5194 """PyApp_SetMacAboutMenuItemId(long val)"""
5195 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5197 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5198 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5199 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5201 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5202 """PyApp_SetMacExitMenuItemId(long val)"""
5203 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5205 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5206 """PyApp_SetMacHelpMenuTitleName(String val)"""
5207 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5209 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5211 PyApp_GetComCtl32Version() -> int
5213 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5214 it wasn't found at all. Raises an exception on non-Windows platforms.
5216 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5218 #---------------------------------------------------------------------------
5221 def Exit(*args
, **kwargs
):
5225 Force an exit of the application. Convenience for wx.GetApp().Exit()
5227 return _core_
.Exit(*args
, **kwargs
)
5229 def Yield(*args
, **kwargs
):
5233 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5235 return _core_
.Yield(*args
, **kwargs
)
5237 def YieldIfNeeded(*args
, **kwargs
):
5239 YieldIfNeeded() -> bool
5241 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5243 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5245 def SafeYield(*args
, **kwargs
):
5247 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5249 This function is similar to `wx.Yield`, except that it disables the
5250 user input to all program windows before calling `wx.Yield` and
5251 re-enables it again afterwards. If ``win`` is not None, this window
5252 will remain enabled, allowing the implementation of some limited user
5255 :Returns: the result of the call to `wx.Yield`.
5257 return _core_
.SafeYield(*args
, **kwargs
)
5259 def WakeUpIdle(*args
, **kwargs
):
5263 Cause the message queue to become empty again, so idle events will be
5266 return _core_
.WakeUpIdle(*args
, **kwargs
)
5268 def PostEvent(*args
, **kwargs
):
5270 PostEvent(EvtHandler dest, Event event)
5272 Send an event to a window or other wx.EvtHandler to be processed
5275 return _core_
.PostEvent(*args
, **kwargs
)
5277 def App_CleanUp(*args
, **kwargs
):
5281 For internal use only, it is used to cleanup after wxWidgets when
5284 return _core_
.App_CleanUp(*args
, **kwargs
)
5286 def GetApp(*args
, **kwargs
):
5290 Return a reference to the current wx.App object.
5292 return _core_
.GetApp(*args
, **kwargs
)
5294 def SetDefaultPyEncoding(*args
, **kwargs
):
5296 SetDefaultPyEncoding(string encoding)
5298 Sets the encoding that wxPython will use when it needs to convert a
5299 Python string or unicode object to or from a wxString.
5301 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5302 but please be aware that the default encoding within the same locale
5303 may be slightly different on different platforms. For example, please
5304 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5305 between the common latin/roman encodings.
5307 return _core_
.SetDefaultPyEncoding(*args
, **kwargs
)
5309 def GetDefaultPyEncoding(*args
, **kwargs
):
5311 GetDefaultPyEncoding() -> string
5313 Gets the current encoding that wxPython will use when it needs to
5314 convert a Python string or unicode object to or from a wxString.
5316 return _core_
.GetDefaultPyEncoding(*args
, **kwargs
)
5317 #----------------------------------------------------------------------
5319 class PyOnDemandOutputWindow
:
5321 A class that can be used for redirecting Python's stdout and
5322 stderr streams. It will do nothing until something is wrriten to
5323 the stream at which point it will create a Frame with a text area
5324 and write the text there.
5326 def __init__(self
, title
= "wxPython: stdout/stderr"):
5329 self
.pos
= wx
.DefaultPosition
5330 self
.size
= (450, 300)
5333 def SetParent(self
, parent
):
5334 """Set the window to be used as the popup Frame's parent."""
5335 self
.parent
= parent
5338 def CreateOutputWindow(self
, st
):
5339 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
5340 style
=wx
.DEFAULT_FRAME_STYLE
)
5341 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
5342 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
5343 self
.text
.AppendText(st
)
5344 self
.frame
.Show(True)
5345 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
5348 def OnCloseWindow(self
, event
):
5349 if self
.frame
is not None:
5350 self
.frame
.Destroy()
5355 # These methods provide the file-like output behaviour.
5356 def write(self
, text
):
5358 Create the output window if needed and write the string to it.
5359 If not called in the context of the gui thread then uses
5360 CallAfter to do the work there.
5362 if self
.frame
is None:
5363 if not wx
.Thread_IsMain():
5364 wx
.CallAfter(self
.CreateOutputWindow
, text
)
5366 self
.CreateOutputWindow(text
)
5368 if not wx
.Thread_IsMain():
5369 wx
.CallAfter(self
.text
.AppendText
, text
)
5371 self
.text
.AppendText(text
)
5375 if self
.frame
is not None:
5376 wx
.CallAfter(self
.frame
.Close
)
5384 #----------------------------------------------------------------------
5386 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5388 class App(wx
.PyApp
):
5390 The ``wx.App`` class represents the application and is used to:
5392 * bootstrap the wxPython system and initialize the underlying
5394 * set and get application-wide properties
5395 * implement the windowing system main message or event loop,
5396 and to dispatch events to window instances
5399 Every application must have a ``wx.App`` instance, and all
5400 creation of UI objects should be delayed until after the
5401 ``wx.App`` object has been created in order to ensure that the gui
5402 platform and wxWidgets have been fully initialized.
5404 Normally you would derive from this class and implement an
5405 ``OnInit`` method that creates a frame and then calls
5406 ``self.SetTopWindow(frame)``.
5408 :see: `wx.PySimpleApp` for a simpler app class that can be used
5412 outputWindowClass
= PyOnDemandOutputWindow
5414 def __init__(self
, redirect
=_defRedirect
, filename
=None,
5415 useBestVisual
=False, clearSigInt
=True):
5417 Construct a ``wx.App`` object.
5419 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5420 redirected? Defaults to True on Windows and Mac, False
5421 otherwise. If `filename` is None then output will be
5422 redirected to a window that pops up as needed. (You can
5423 control what kind of window is created for the output by
5424 resetting the class variable ``outputWindowClass`` to a
5425 class of your choosing.)
5427 :param filename: The name of a file to redirect output to, if
5430 :param useBestVisual: Should the app try to use the best
5431 available visual provided by the system (only relevant on
5432 systems that have more than one visual.) This parameter
5433 must be used instead of calling `SetUseBestVisual` later
5434 on because it must be set before the underlying GUI
5435 toolkit is initialized.
5437 :param clearSigInt: Should SIGINT be cleared? This allows the
5438 app to terminate upon a Ctrl-C in the console like other
5441 :note: You should override OnInit to do applicaition
5442 initialization to ensure that the system, toolkit and
5443 wxWidgets are fully initialized.
5445 wx
.PyApp
.__init
__(self
)
5447 if wx
.Platform
== "__WXMAC__":
5450 if not MacOS
.WMAvailable():
5452 This program needs access to the screen. Please run with 'pythonw',
5453 not 'python', and only when you are logged in on the main display of
5461 # This has to be done before OnInit
5462 self
.SetUseBestVisual(useBestVisual
)
5464 # Set the default handler for SIGINT. This fixes a problem
5465 # where if Ctrl-C is pressed in the console that started this
5466 # app then it will not appear to do anything, (not even send
5467 # KeyboardInterrupt???) but will later segfault on exit. By
5468 # setting the default handler then the app will exit, as
5469 # expected (depending on platform.)
5473 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5477 # Save and redirect the stdio to a window?
5478 self
.stdioWin
= None
5479 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5481 self
.RedirectStdio(filename
)
5483 # Use Python's install prefix as the default
5484 wx
.StandardPaths
.Get().SetInstallPrefix(_sys
.prefix
)
5486 # This finishes the initialization of wxWindows and then calls
5487 # the OnInit that should be present in the derived class
5488 self
._BootstrapApp
()
5493 self
.RestoreStdio() # Just in case the MainLoop was overridden
5498 def SetTopWindow(self
, frame
):
5499 """Set the \"main\" top level window"""
5501 self
.stdioWin
.SetParent(frame
)
5502 wx
.PyApp
.SetTopWindow(self
, frame
)
5506 """Execute the main GUI event loop"""
5507 wx
.PyApp
.MainLoop(self
)
5511 def RedirectStdio(self
, filename
=None):
5512 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5514 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5516 self
.stdioWin
= self
.outputWindowClass()
5517 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5520 def RestoreStdio(self
):
5521 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5524 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
5526 Set the title, position and/or size of the output window if
5527 the stdio has been redirected. This should be called before
5528 any output would cause the output window to be created.
5531 if title
is not None:
5532 self
.stdioWin
.title
= title
5534 self
.stdioWin
.pos
= pos
5535 if size
is not None:
5536 self
.stdioWin
.size
= size
5541 # change from wx.PyApp_XX to wx.App_XX
5542 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
5543 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
5544 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
5545 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
5546 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
5547 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
5548 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
5549 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
5550 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
5551 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
5552 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
5554 #----------------------------------------------------------------------------
5556 class PySimpleApp(wx
.App
):
5558 A simple application class. You can just create one of these and
5559 then then make your top level windows later, and not have to worry
5560 about OnInit. For example::
5562 app = wx.PySimpleApp()
5563 frame = wx.Frame(None, title='Hello World')
5570 def __init__(self
, redirect
=False, filename
=None,
5571 useBestVisual
=False, clearSigInt
=True):
5573 :see: `wx.App.__init__`
5575 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
5582 # Is anybody using this one?
5583 class PyWidgetTester(wx
.App
):
5584 def __init__(self
, size
= (250, 100)):
5586 wx
.App
.__init
__(self
, 0)
5589 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5590 self
.SetTopWindow(self
.frame
)
5593 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
5594 w
= widgetClass(self
.frame
, *args
, **kwargs
)
5595 self
.frame
.Show(True)
5597 #----------------------------------------------------------------------------
5598 # DO NOT hold any other references to this object. This is how we
5599 # know when to cleanup system resources that wxWidgets is holding. When
5600 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5601 # goes to zero and it calls the wx.App_CleanUp function.
5603 class __wxPyCleanup
:
5605 self
.cleanup
= _core_
.App_CleanUp
5609 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5611 ## # another possible solution, but it gets called too early...
5613 ## atexit.register(_core_.wxApp_CleanUp)
5616 #----------------------------------------------------------------------------
5618 #---------------------------------------------------------------------------
5620 class EventLoop(object):
5621 """Proxy of C++ EventLoop class"""
5623 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5624 def __init__(self
, *args
, **kwargs
):
5625 """__init__(self) -> EventLoop"""
5626 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
5627 self
.this
= newobj
.this
5630 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
5633 if self
.thisown
: destroy(self
)
5636 def Run(*args
, **kwargs
):
5637 """Run(self) -> int"""
5638 return _core_
.EventLoop_Run(*args
, **kwargs
)
5640 def Exit(*args
, **kwargs
):
5641 """Exit(self, int rc=0)"""
5642 return _core_
.EventLoop_Exit(*args
, **kwargs
)
5644 def Pending(*args
, **kwargs
):
5645 """Pending(self) -> bool"""
5646 return _core_
.EventLoop_Pending(*args
, **kwargs
)
5648 def Dispatch(*args
, **kwargs
):
5649 """Dispatch(self) -> bool"""
5650 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
5652 def IsRunning(*args
, **kwargs
):
5653 """IsRunning(self) -> bool"""
5654 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
5656 def GetActive(*args
, **kwargs
):
5657 """GetActive() -> EventLoop"""
5658 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5660 GetActive
= staticmethod(GetActive
)
5661 def SetActive(*args
, **kwargs
):
5662 """SetActive(EventLoop loop)"""
5663 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5665 SetActive
= staticmethod(SetActive
)
5667 class EventLoopPtr(EventLoop
):
5668 def __init__(self
, this
):
5670 if not hasattr(self
,"thisown"): self
.thisown
= 0
5671 self
.__class
__ = EventLoop
5672 _core_
.EventLoop_swigregister(EventLoopPtr
)
5674 def EventLoop_GetActive(*args
, **kwargs
):
5675 """EventLoop_GetActive() -> EventLoop"""
5676 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5678 def EventLoop_SetActive(*args
, **kwargs
):
5679 """EventLoop_SetActive(EventLoop loop)"""
5680 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5682 #---------------------------------------------------------------------------
5684 class AcceleratorEntry(object):
5686 A class used to define items in an `wx.AcceleratorTable`. wxPython
5687 programs can choose to use wx.AcceleratorEntry objects, but using a
5688 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5689 as well. See `__init__` for of the tuple values.
5691 :see: `wx.AcceleratorTable`
5694 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5695 def __init__(self
, *args
, **kwargs
):
5697 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5699 Construct a wx.AcceleratorEntry.
5701 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
5702 self
.this
= newobj
.this
5705 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
5708 if self
.thisown
: destroy(self
)
5711 def Set(*args
, **kwargs
):
5713 Set(self, int flags, int keyCode, int cmd)
5715 (Re)set the attributes of a wx.AcceleratorEntry.
5718 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
5720 def GetFlags(*args
, **kwargs
):
5722 GetFlags(self) -> int
5724 Get the AcceleratorEntry's flags.
5726 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5728 def GetKeyCode(*args
, **kwargs
):
5730 GetKeyCode(self) -> int
5732 Get the AcceleratorEntry's keycode.
5734 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5736 def GetCommand(*args
, **kwargs
):
5738 GetCommand(self) -> int
5740 Get the AcceleratorEntry's command ID.
5742 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5745 class AcceleratorEntryPtr(AcceleratorEntry
):
5746 def __init__(self
, this
):
5748 if not hasattr(self
,"thisown"): self
.thisown
= 0
5749 self
.__class
__ = AcceleratorEntry
5750 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5752 class AcceleratorTable(Object
):
5754 An accelerator table allows the application to specify a table of
5755 keyboard shortcuts for menus or other commands. On Windows, menu or
5756 button commands are supported; on GTK, only menu commands are
5760 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5761 def __init__(self
, *args
, **kwargs
):
5763 __init__(entries) -> AcceleratorTable
5765 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5766 items or or of 3-tuples (flags, keyCode, cmdID)
5768 :see: `wx.AcceleratorEntry`
5770 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
5771 self
.this
= newobj
.this
5774 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
5777 if self
.thisown
: destroy(self
)
5780 def Ok(*args
, **kwargs
):
5781 """Ok(self) -> bool"""
5782 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
5785 class AcceleratorTablePtr(AcceleratorTable
):
5786 def __init__(self
, this
):
5788 if not hasattr(self
,"thisown"): self
.thisown
= 0
5789 self
.__class
__ = AcceleratorTable
5790 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5793 def GetAccelFromString(*args
, **kwargs
):
5794 """GetAccelFromString(String label) -> AcceleratorEntry"""
5795 return _core_
.GetAccelFromString(*args
, **kwargs
)
5796 #---------------------------------------------------------------------------
5798 class VisualAttributes(object):
5799 """struct containing all the visual attributes of a control"""
5801 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5802 def __init__(self
, *args
, **kwargs
):
5804 __init__(self) -> VisualAttributes
5806 struct containing all the visual attributes of a control
5808 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
5809 self
.this
= newobj
.this
5812 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
5815 if self
.thisown
: destroy(self
)
5818 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
5819 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
5820 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
5822 class VisualAttributesPtr(VisualAttributes
):
5823 def __init__(self
, this
):
5825 if not hasattr(self
,"thisown"): self
.thisown
= 0
5826 self
.__class
__ = VisualAttributes
5827 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
5828 NullAcceleratorTable
= cvar
.NullAcceleratorTable
5829 PanelNameStr
= cvar
.PanelNameStr
5831 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
5832 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
5833 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
5834 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
5835 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
5836 class Window(EvtHandler
):
5838 wx.Window is the base class for all windows and represents any visible
5839 object on the screen. All controls, top level windows and so on are
5840 wx.Windows. Sizers and device contexts are not however, as they don't
5841 appear on screen themselves.
5845 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5846 def __init__(self
, *args
, **kwargs
):
5848 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5849 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5851 Construct and show a generic Window.
5853 newobj
= _core_
.new_Window(*args
, **kwargs
)
5854 self
.this
= newobj
.this
5857 self
._setOORInfo
(self
)
5859 def Create(*args
, **kwargs
):
5861 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5862 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5864 Create the GUI part of the Window for 2-phase creation mode.
5866 return _core_
.Window_Create(*args
, **kwargs
)
5868 def Close(*args
, **kwargs
):
5870 Close(self, bool force=False) -> bool
5872 This function simply generates a EVT_CLOSE event whose handler usually
5873 tries to close the window. It doesn't close the window itself,
5874 however. If force is False (the default) then the window's close
5875 handler will be allowed to veto the destruction of the window.
5877 return _core_
.Window_Close(*args
, **kwargs
)
5879 def Destroy(*args
, **kwargs
):
5881 Destroy(self) -> bool
5883 Destroys the window safely. Frames and dialogs are not destroyed
5884 immediately when this function is called -- they are added to a list
5885 of windows to be deleted on idle time, when all the window's events
5886 have been processed. This prevents problems with events being sent to
5887 non-existent windows.
5889 Returns True if the window has either been successfully deleted, or it
5890 has been added to the list of windows pending real deletion.
5892 return _core_
.Window_Destroy(*args
, **kwargs
)
5894 def DestroyChildren(*args
, **kwargs
):
5896 DestroyChildren(self) -> bool
5898 Destroys all children of a window. Called automatically by the
5901 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
5903 def IsBeingDeleted(*args
, **kwargs
):
5905 IsBeingDeleted(self) -> bool
5907 Is the window in the process of being deleted?
5909 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
5911 def SetTitle(*args
, **kwargs
):
5913 SetTitle(self, String title)
5915 Sets the window's title. Applicable only to frames and dialogs.
5917 return _core_
.Window_SetTitle(*args
, **kwargs
)
5919 def GetTitle(*args
, **kwargs
):
5921 GetTitle(self) -> String
5923 Gets the window's title. Applicable only to frames and dialogs.
5925 return _core_
.Window_GetTitle(*args
, **kwargs
)
5927 def SetLabel(*args
, **kwargs
):
5929 SetLabel(self, String label)
5931 Set the text which the window shows in its label if applicable.
5933 return _core_
.Window_SetLabel(*args
, **kwargs
)
5935 def GetLabel(*args
, **kwargs
):
5937 GetLabel(self) -> String
5939 Generic way of getting a label from any window, for identification
5940 purposes. The interpretation of this function differs from class to
5941 class. For frames and dialogs, the value returned is the title. For
5942 buttons or static text controls, it is the button text. This function
5943 can be useful for meta-programs such as testing tools or special-needs
5944 access programs)which need to identify windows by name.
5946 return _core_
.Window_GetLabel(*args
, **kwargs
)
5948 def SetName(*args
, **kwargs
):
5950 SetName(self, String name)
5952 Sets the window's name. The window name is used for ressource setting
5953 in X, it is not the same as the window title/label
5955 return _core_
.Window_SetName(*args
, **kwargs
)
5957 def GetName(*args
, **kwargs
):
5959 GetName(self) -> String
5961 Returns the windows name. This name is not guaranteed to be unique;
5962 it is up to the programmer to supply an appropriate name in the window
5963 constructor or via wx.Window.SetName.
5965 return _core_
.Window_GetName(*args
, **kwargs
)
5967 def SetWindowVariant(*args
, **kwargs
):
5969 SetWindowVariant(self, int variant)
5971 Sets the variant of the window/font size to use for this window, if
5972 the platform supports variants, for example, wxMac.
5974 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
5976 def GetWindowVariant(*args
, **kwargs
):
5977 """GetWindowVariant(self) -> int"""
5978 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
5980 def SetId(*args
, **kwargs
):
5982 SetId(self, int winid)
5984 Sets the identifier of the window. Each window has an integer
5985 identifier. If the application has not provided one, an identifier
5986 will be generated. Normally, the identifier should be provided on
5987 creation and should not be modified subsequently.
5989 return _core_
.Window_SetId(*args
, **kwargs
)
5991 def GetId(*args
, **kwargs
):
5995 Returns the identifier of the window. Each window has an integer
5996 identifier. If the application has not provided one (or the default Id
5997 -1 is used) then an unique identifier with a negative value will be
6000 return _core_
.Window_GetId(*args
, **kwargs
)
6002 def NewControlId(*args
, **kwargs
):
6004 NewControlId() -> int
6006 Generate a control id for the controls which were not given one.
6008 return _core_
.Window_NewControlId(*args
, **kwargs
)
6010 NewControlId
= staticmethod(NewControlId
)
6011 def NextControlId(*args
, **kwargs
):
6013 NextControlId(int winid) -> int
6015 Get the id of the control following the one with the given
6018 return _core_
.Window_NextControlId(*args
, **kwargs
)
6020 NextControlId
= staticmethod(NextControlId
)
6021 def PrevControlId(*args
, **kwargs
):
6023 PrevControlId(int winid) -> int
6025 Get the id of the control preceding the one with the given
6028 return _core_
.Window_PrevControlId(*args
, **kwargs
)
6030 PrevControlId
= staticmethod(PrevControlId
)
6031 def SetSize(*args
, **kwargs
):
6033 SetSize(self, Size size)
6035 Sets the size of the window in pixels.
6037 return _core_
.Window_SetSize(*args
, **kwargs
)
6039 def SetDimensions(*args
, **kwargs
):
6041 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6043 Sets the position and size of the window in pixels. The sizeFlags
6044 parameter indicates the interpretation of the other params if they are
6047 ======================== ======================================
6048 wx.SIZE_AUTO A -1 indicates that a class-specific
6049 default should be used.
6050 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6051 -1 values are supplied.
6052 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6053 interpreted as real dimensions, not
6055 ======================== ======================================
6058 return _core_
.Window_SetDimensions(*args
, **kwargs
)
6060 def SetRect(*args
, **kwargs
):
6062 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6064 Sets the position and size of the window in pixels using a wx.Rect.
6066 return _core_
.Window_SetRect(*args
, **kwargs
)
6068 def SetSizeWH(*args
, **kwargs
):
6070 SetSizeWH(self, int width, int height)
6072 Sets the size of the window in pixels.
6074 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
6076 def Move(*args
, **kwargs
):
6078 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6080 Moves the window to the given position.
6082 return _core_
.Window_Move(*args
, **kwargs
)
6085 def MoveXY(*args
, **kwargs
):
6087 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6089 Moves the window to the given position.
6091 return _core_
.Window_MoveXY(*args
, **kwargs
)
6093 def SetBestFittingSize(*args
, **kwargs
):
6095 SetBestFittingSize(self, Size size=DefaultSize)
6097 A 'Smart' SetSize that will fill in default size components with the
6098 window's *best size* values. Also set's the minsize for use with sizers.
6100 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
6102 def Raise(*args
, **kwargs
):
6106 Raises the window to the top of the window hierarchy if it is a
6107 managed window (dialog or frame).
6109 return _core_
.Window_Raise(*args
, **kwargs
)
6111 def Lower(*args
, **kwargs
):
6115 Lowers the window to the bottom of the window hierarchy if it is a
6116 managed window (dialog or frame).
6118 return _core_
.Window_Lower(*args
, **kwargs
)
6120 def SetClientSize(*args
, **kwargs
):
6122 SetClientSize(self, Size size)
6124 This sets the size of the window client area in pixels. Using this
6125 function to size a window tends to be more device-independent than
6126 wx.Window.SetSize, since the application need not worry about what
6127 dimensions the border or title bar have when trying to fit the window
6128 around panel items, for example.
6130 return _core_
.Window_SetClientSize(*args
, **kwargs
)
6132 def SetClientSizeWH(*args
, **kwargs
):
6134 SetClientSizeWH(self, int width, int height)
6136 This sets the size of the window client area in pixels. Using this
6137 function to size a window tends to be more device-independent than
6138 wx.Window.SetSize, since the application need not worry about what
6139 dimensions the border or title bar have when trying to fit the window
6140 around panel items, for example.
6142 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
6144 def SetClientRect(*args
, **kwargs
):
6146 SetClientRect(self, Rect rect)
6148 This sets the size of the window client area in pixels. Using this
6149 function to size a window tends to be more device-independent than
6150 wx.Window.SetSize, since the application need not worry about what
6151 dimensions the border or title bar have when trying to fit the window
6152 around panel items, for example.
6154 return _core_
.Window_SetClientRect(*args
, **kwargs
)
6156 def GetPosition(*args
, **kwargs
):
6158 GetPosition(self) -> Point
6160 Get the window's position.
6162 return _core_
.Window_GetPosition(*args
, **kwargs
)
6164 def GetPositionTuple(*args
, **kwargs
):
6166 GetPositionTuple() -> (x,y)
6168 Get the window's position.
6170 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
6172 def GetSize(*args
, **kwargs
):
6174 GetSize(self) -> Size
6176 Get the window size.
6178 return _core_
.Window_GetSize(*args
, **kwargs
)
6180 def GetSizeTuple(*args
, **kwargs
):
6182 GetSizeTuple() -> (width, height)
6184 Get the window size.
6186 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
6188 def GetRect(*args
, **kwargs
):
6190 GetRect(self) -> Rect
6192 Returns the size and position of the window as a wx.Rect object.
6194 return _core_
.Window_GetRect(*args
, **kwargs
)
6196 def GetClientSize(*args
, **kwargs
):
6198 GetClientSize(self) -> Size
6200 This gets the size of the window's 'client area' in pixels. The client
6201 area is the area which may be drawn on by the programmer, excluding
6202 title bar, border, scrollbars, etc.
6204 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6206 def GetClientSizeTuple(*args
, **kwargs
):
6208 GetClientSizeTuple() -> (width, height)
6210 This gets the size of the window's 'client area' in pixels. The client
6211 area is the area which may be drawn on by the programmer, excluding
6212 title bar, border, scrollbars, etc.
6214 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6216 def GetClientAreaOrigin(*args
, **kwargs
):
6218 GetClientAreaOrigin(self) -> Point
6220 Get the origin of the client area of the window relative to the
6221 window's top left corner (the client area may be shifted because of
6222 the borders, scrollbars, other decorations...)
6224 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6226 def GetClientRect(*args
, **kwargs
):
6228 GetClientRect(self) -> Rect
6230 Get the client area position and size as a `wx.Rect` object.
6232 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6234 def GetBestSize(*args
, **kwargs
):
6236 GetBestSize(self) -> Size
6238 This function returns the best acceptable minimal size for the
6239 window, if applicable. For example, for a static text control, it will
6240 be the minimal size such that the control label is not truncated. For
6241 windows containing subwindows (suzh aswx.Panel), the size returned by
6242 this function will be the same as the size the window would have had
6245 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6247 def GetBestSizeTuple(*args
, **kwargs
):
6249 GetBestSizeTuple() -> (width, height)
6251 This function returns the best acceptable minimal size for the
6252 window, if applicable. For example, for a static text control, it will
6253 be the minimal size such that the control label is not truncated. For
6254 windows containing subwindows (suzh aswx.Panel), the size returned by
6255 this function will be the same as the size the window would have had
6258 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6260 def InvalidateBestSize(*args
, **kwargs
):
6262 InvalidateBestSize(self)
6264 Reset the cached best size value so it will be recalculated the next
6267 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6269 def GetBestFittingSize(*args
, **kwargs
):
6271 GetBestFittingSize(self) -> Size
6273 This function will merge the window's best size into the window's
6274 minimum size, giving priority to the min size components, and returns
6278 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6280 def GetAdjustedBestSize(*args
, **kwargs
):
6282 GetAdjustedBestSize(self) -> Size
6284 This method is similar to GetBestSize, except in one
6285 thing. GetBestSize should return the minimum untruncated size of the
6286 window, while this method will return the largest of BestSize and any
6287 user specified minimum size. ie. it is the minimum size the window
6288 should currently be drawn at, not the minimal size it can possibly
6291 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6293 def Center(*args
, **kwargs
):
6295 Center(self, int direction=BOTH)
6297 Centers the window. The parameter specifies the direction for
6298 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6299 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6300 on the entire screen and not on its parent window. If it is a
6301 top-level window and has no parent then it will always be centered
6302 relative to the screen.
6304 return _core_
.Window_Center(*args
, **kwargs
)
6307 def CenterOnScreen(*args
, **kwargs
):
6309 CenterOnScreen(self, int dir=BOTH)
6311 Center on screen (only works for top level windows)
6313 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6315 CentreOnScreen
= CenterOnScreen
6316 def CenterOnParent(*args
, **kwargs
):
6318 CenterOnParent(self, int dir=BOTH)
6320 Center with respect to the the parent window
6322 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6324 CentreOnParent
= CenterOnParent
6325 def Fit(*args
, **kwargs
):
6329 Sizes the window so that it fits around its subwindows. This function
6330 won't do anything if there are no subwindows and will only really work
6331 correctly if sizers are used for the subwindows layout. Also, if the
6332 window has exactly one subwindow it is better (faster and the result
6333 is more precise as Fit adds some margin to account for fuzziness of
6334 its calculations) to call window.SetClientSize(child.GetSize())
6335 instead of calling Fit.
6337 return _core_
.Window_Fit(*args
, **kwargs
)
6339 def FitInside(*args
, **kwargs
):
6343 Similar to Fit, but sizes the interior (virtual) size of a
6344 window. Mainly useful with scrolled windows to reset scrollbars after
6345 sizing changes that do not trigger a size event, and/or scrolled
6346 windows without an interior sizer. This function similarly won't do
6347 anything if there are no subwindows.
6349 return _core_
.Window_FitInside(*args
, **kwargs
)
6351 def SetSizeHints(*args
, **kwargs
):
6353 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6356 Allows specification of minimum and maximum window sizes, and window
6357 size increments. If a pair of values is not set (or set to -1), the
6358 default values will be used. If this function is called, the user
6359 will not be able to size the window outside the given bounds (if it is
6360 a top-level window.) Sizers will also inspect the minimum window size
6361 and will use that value if set when calculating layout.
6363 The resizing increments are only significant under Motif or Xt.
6365 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
6367 def SetSizeHintsSz(*args
, **kwargs
):
6369 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6371 Allows specification of minimum and maximum window sizes, and window
6372 size increments. If a pair of values is not set (or set to -1), the
6373 default values will be used. If this function is called, the user
6374 will not be able to size the window outside the given bounds (if it is
6375 a top-level window.) Sizers will also inspect the minimum window size
6376 and will use that value if set when calculating layout.
6378 The resizing increments are only significant under Motif or Xt.
6380 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
6382 def SetVirtualSizeHints(*args
, **kwargs
):
6384 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6386 Allows specification of minimum and maximum virtual window sizes. If a
6387 pair of values is not set (or set to -1), the default values will be
6388 used. If this function is called, the user will not be able to size
6389 the virtual area of the window outside the given bounds.
6391 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
6393 def SetVirtualSizeHintsSz(*args
, **kwargs
):
6395 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6397 Allows specification of minimum and maximum virtual window sizes. If a
6398 pair of values is not set (or set to -1), the default values will be
6399 used. If this function is called, the user will not be able to size
6400 the virtual area of the window outside the given bounds.
6402 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
6404 def GetMaxSize(*args
, **kwargs
):
6405 """GetMaxSize(self) -> Size"""
6406 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
6408 def GetMinSize(*args
, **kwargs
):
6409 """GetMinSize(self) -> Size"""
6410 return _core_
.Window_GetMinSize(*args
, **kwargs
)
6412 def SetMinSize(*args
, **kwargs
):
6414 SetMinSize(self, Size minSize)
6416 A more convenient method than `SetSizeHints` for setting just the
6419 return _core_
.Window_SetMinSize(*args
, **kwargs
)
6421 def SetMaxSize(*args
, **kwargs
):
6423 SetMaxSize(self, Size maxSize)
6425 A more convenient method than `SetSizeHints` for setting just the
6428 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
6430 def GetMinWidth(*args
, **kwargs
):
6431 """GetMinWidth(self) -> int"""
6432 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
6434 def GetMinHeight(*args
, **kwargs
):
6435 """GetMinHeight(self) -> int"""
6436 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
6438 def GetMaxWidth(*args
, **kwargs
):
6439 """GetMaxWidth(self) -> int"""
6440 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
6442 def GetMaxHeight(*args
, **kwargs
):
6443 """GetMaxHeight(self) -> int"""
6444 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
6446 def SetVirtualSize(*args
, **kwargs
):
6448 SetVirtualSize(self, Size size)
6450 Set the the virtual size of a window in pixels. For most windows this
6451 is just the client area of the window, but for some like scrolled
6452 windows it is more or less independent of the screen window size.
6454 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
6456 def SetVirtualSizeWH(*args
, **kwargs
):
6458 SetVirtualSizeWH(self, int w, int h)
6460 Set the the virtual size of a window in pixels. For most windows this
6461 is just the client area of the window, but for some like scrolled
6462 windows it is more or less independent of the screen window size.
6464 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
6466 def GetVirtualSize(*args
, **kwargs
):
6468 GetVirtualSize(self) -> Size
6470 Get the the virtual size of the window in pixels. For most windows
6471 this is just the client area of the window, but for some like scrolled
6472 windows it is more or less independent of the screen window size.
6474 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
6476 def GetVirtualSizeTuple(*args
, **kwargs
):
6478 GetVirtualSizeTuple() -> (width, height)
6480 Get the the virtual size of the window in pixels. For most windows
6481 this is just the client area of the window, but for some like scrolled
6482 windows it is more or less independent of the screen window size.
6484 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
6486 def GetBestVirtualSize(*args
, **kwargs
):
6488 GetBestVirtualSize(self) -> Size
6490 Return the largest of ClientSize and BestSize (as determined by a
6491 sizer, interior children, or other means)
6493 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
6495 def Show(*args
, **kwargs
):
6497 Show(self, bool show=True) -> bool
6499 Shows or hides the window. You may need to call Raise for a top level
6500 window if you want to bring it to top, although this is not needed if
6501 Show is called immediately after the frame creation. Returns True if
6502 the window has been shown or hidden or False if nothing was done
6503 because it already was in the requested state.
6505 return _core_
.Window_Show(*args
, **kwargs
)
6507 def Hide(*args
, **kwargs
):
6511 Equivalent to calling Show(False).
6513 return _core_
.Window_Hide(*args
, **kwargs
)
6515 def Enable(*args
, **kwargs
):
6517 Enable(self, bool enable=True) -> bool
6519 Enable or disable the window for user input. Note that when a parent
6520 window is disabled, all of its children are disabled as well and they
6521 are reenabled again when the parent is. Returns true if the window
6522 has been enabled or disabled, false if nothing was done, i.e. if the
6523 window had already been in the specified state.
6525 return _core_
.Window_Enable(*args
, **kwargs
)
6527 def Disable(*args
, **kwargs
):
6529 Disable(self) -> bool
6531 Disables the window, same as Enable(false).
6533 return _core_
.Window_Disable(*args
, **kwargs
)
6535 def IsShown(*args
, **kwargs
):
6537 IsShown(self) -> bool
6539 Returns true if the window is shown, false if it has been hidden.
6541 return _core_
.Window_IsShown(*args
, **kwargs
)
6543 def IsEnabled(*args
, **kwargs
):
6545 IsEnabled(self) -> bool
6547 Returns true if the window is enabled for input, false otherwise.
6549 return _core_
.Window_IsEnabled(*args
, **kwargs
)
6551 def SetWindowStyleFlag(*args
, **kwargs
):
6553 SetWindowStyleFlag(self, long style)
6555 Sets the style of the window. Please note that some styles cannot be
6556 changed after the window creation and that Refresh() might need to be
6557 called after changing the others for the change to take place
6560 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
6562 def GetWindowStyleFlag(*args
, **kwargs
):
6564 GetWindowStyleFlag(self) -> long
6566 Gets the window style that was passed to the constructor or Create
6569 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
6571 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
6572 def HasFlag(*args
, **kwargs
):
6574 HasFlag(self, int flag) -> bool
6576 Test if the given style is set for this window.
6578 return _core_
.Window_HasFlag(*args
, **kwargs
)
6580 def IsRetained(*args
, **kwargs
):
6582 IsRetained(self) -> bool
6584 Returns true if the window is retained, false otherwise. Retained
6585 windows are only available on X platforms.
6587 return _core_
.Window_IsRetained(*args
, **kwargs
)
6589 def SetExtraStyle(*args
, **kwargs
):
6591 SetExtraStyle(self, long exStyle)
6593 Sets the extra style bits for the window. Extra styles are the less
6594 often used style bits which can't be set with the constructor or with
6595 SetWindowStyleFlag()
6597 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
6599 def GetExtraStyle(*args
, **kwargs
):
6601 GetExtraStyle(self) -> long
6603 Returns the extra style bits for the window.
6605 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
6607 def MakeModal(*args
, **kwargs
):
6609 MakeModal(self, bool modal=True)
6611 Disables all other windows in the application so that the user can
6612 only interact with this window. Passing False will reverse this
6615 return _core_
.Window_MakeModal(*args
, **kwargs
)
6617 def SetThemeEnabled(*args
, **kwargs
):
6619 SetThemeEnabled(self, bool enableTheme)
6621 This function tells a window if it should use the system's "theme"
6622 code to draw the windows' background instead if its own background
6623 drawing code. This will only have an effect on platforms that support
6624 the notion of themes in user defined windows. One such platform is
6625 GTK+ where windows can have (very colourful) backgrounds defined by a
6626 user's selected theme.
6628 Dialogs, notebook pages and the status bar have this flag set to true
6629 by default so that the default look and feel is simulated best.
6631 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
6633 def GetThemeEnabled(*args
, **kwargs
):
6635 GetThemeEnabled(self) -> bool
6637 Return the themeEnabled flag.
6639 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
6641 def SetFocus(*args
, **kwargs
):
6645 Set's the focus to this window, allowing it to receive keyboard input.
6647 return _core_
.Window_SetFocus(*args
, **kwargs
)
6649 def SetFocusFromKbd(*args
, **kwargs
):
6651 SetFocusFromKbd(self)
6653 Set focus to this window as the result of a keyboard action. Normally
6654 only called internally.
6656 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
6658 def FindFocus(*args
, **kwargs
):
6660 FindFocus() -> Window
6662 Returns the window or control that currently has the keyboard focus,
6665 return _core_
.Window_FindFocus(*args
, **kwargs
)
6667 FindFocus
= staticmethod(FindFocus
)
6668 def AcceptsFocus(*args
, **kwargs
):
6670 AcceptsFocus(self) -> bool
6672 Can this window have focus?
6674 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
6676 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6678 AcceptsFocusFromKeyboard(self) -> bool
6680 Can this window be given focus by keyboard navigation? if not, the
6681 only way to give it focus (provided it accepts it at all) is to click
6684 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6686 def GetDefaultItem(*args
, **kwargs
):
6688 GetDefaultItem(self) -> Window
6690 Get the default child of this parent, i.e. the one which is activated
6691 by pressing <Enter> such as the OK button on a wx.Dialog.
6693 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
6695 def SetDefaultItem(*args
, **kwargs
):
6697 SetDefaultItem(self, Window child) -> Window
6699 Set this child as default, return the old default.
6701 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
6703 def SetTmpDefaultItem(*args
, **kwargs
):
6705 SetTmpDefaultItem(self, Window win)
6707 Set this child as temporary default
6709 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6711 def Navigate(*args
, **kwargs
):
6713 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6715 Does keyboard navigation from this window to another, by sending a
6716 `wx.NavigationKeyEvent`.
6718 return _core_
.Window_Navigate(*args
, **kwargs
)
6720 def MoveAfterInTabOrder(*args
, **kwargs
):
6722 MoveAfterInTabOrder(self, Window win)
6724 Moves this window in the tab navigation order after the specified
6725 sibling window. This means that when the user presses the TAB key on
6726 that other window, the focus switches to this window.
6728 The default tab order is the same as creation order. This function
6729 and `MoveBeforeInTabOrder` allow to change it after creating all the
6733 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
6735 def MoveBeforeInTabOrder(*args
, **kwargs
):
6737 MoveBeforeInTabOrder(self, Window win)
6739 Same as `MoveAfterInTabOrder` except that it inserts this window just
6740 before win instead of putting it right after it.
6742 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
6744 def GetChildren(*args
, **kwargs
):
6746 GetChildren(self) -> PyObject
6748 Returns a list of the window's children. NOTE: Currently this is a
6749 copy of the child window list maintained by the window, so the return
6750 value of this function is only valid as long as the window's children
6753 return _core_
.Window_GetChildren(*args
, **kwargs
)
6755 def GetParent(*args
, **kwargs
):
6757 GetParent(self) -> Window
6759 Returns the parent window of this window, or None if there isn't one.
6761 return _core_
.Window_GetParent(*args
, **kwargs
)
6763 def GetGrandParent(*args
, **kwargs
):
6765 GetGrandParent(self) -> Window
6767 Returns the parent of the parent of this window, or None if there
6770 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
6772 def IsTopLevel(*args
, **kwargs
):
6774 IsTopLevel(self) -> bool
6776 Returns true if the given window is a top-level one. Currently all
6777 frames and dialogs are always considered to be top-level windows (even
6778 if they have a parent window).
6780 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
6782 def Reparent(*args
, **kwargs
):
6784 Reparent(self, Window newParent) -> bool
6786 Reparents the window, i.e the window will be removed from its current
6787 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6788 re-inserted into another. Available on Windows and GTK. Returns True
6789 if the parent was changed, False otherwise (error or newParent ==
6792 return _core_
.Window_Reparent(*args
, **kwargs
)
6794 def AddChild(*args
, **kwargs
):
6796 AddChild(self, Window child)
6798 Adds a child window. This is called automatically by window creation
6799 functions so should not be required by the application programmer.
6801 return _core_
.Window_AddChild(*args
, **kwargs
)
6803 def RemoveChild(*args
, **kwargs
):
6805 RemoveChild(self, Window child)
6807 Removes a child window. This is called automatically by window
6808 deletion functions so should not be required by the application
6811 return _core_
.Window_RemoveChild(*args
, **kwargs
)
6813 def FindWindowById(*args
, **kwargs
):
6815 FindWindowById(self, long winid) -> Window
6817 Find a chld of this window by window ID
6819 return _core_
.Window_FindWindowById(*args
, **kwargs
)
6821 def FindWindowByName(*args
, **kwargs
):
6823 FindWindowByName(self, String name) -> Window
6825 Find a child of this window by name
6827 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
6829 def GetEventHandler(*args
, **kwargs
):
6831 GetEventHandler(self) -> EvtHandler
6833 Returns the event handler for this window. By default, the window is
6834 its own event handler.
6836 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
6838 def SetEventHandler(*args
, **kwargs
):
6840 SetEventHandler(self, EvtHandler handler)
6842 Sets the event handler for this window. An event handler is an object
6843 that is capable of processing the events sent to a window. By default,
6844 the window is its own event handler, but an application may wish to
6845 substitute another, for example to allow central implementation of
6846 event-handling for a variety of different window classes.
6848 It is usually better to use `wx.Window.PushEventHandler` since this sets
6849 up a chain of event handlers, where an event not handled by one event
6850 handler is handed to the next one in the chain.
6852 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
6854 def PushEventHandler(*args
, **kwargs
):
6856 PushEventHandler(self, EvtHandler handler)
6858 Pushes this event handler onto the event handler stack for the window.
6859 An event handler is an object that is capable of processing the events
6860 sent to a window. By default, the window is its own event handler, but
6861 an application may wish to substitute another, for example to allow
6862 central implementation of event-handling for a variety of different
6865 wx.Window.PushEventHandler allows an application to set up a chain of
6866 event handlers, where an event not handled by one event handler is
6867 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6868 remove the event handler.
6870 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
6872 def PopEventHandler(*args
, **kwargs
):
6874 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6876 Removes and returns the top-most event handler on the event handler
6877 stack. If deleteHandler is True then the wx.EvtHandler object will be
6878 destroyed after it is popped.
6880 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
6882 def RemoveEventHandler(*args
, **kwargs
):
6884 RemoveEventHandler(self, EvtHandler handler) -> bool
6886 Find the given handler in the event handler chain and remove (but not
6887 delete) it from the event handler chain, return True if it was found
6888 and False otherwise (this also results in an assert failure so this
6889 function should only be called when the handler is supposed to be
6892 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
6894 def SetValidator(*args
, **kwargs
):
6896 SetValidator(self, Validator validator)
6898 Deletes the current validator (if any) and sets the window validator,
6899 having called wx.Validator.Clone to create a new validator of this
6902 return _core_
.Window_SetValidator(*args
, **kwargs
)
6904 def GetValidator(*args
, **kwargs
):
6906 GetValidator(self) -> Validator
6908 Returns a pointer to the current validator for the window, or None if
6911 return _core_
.Window_GetValidator(*args
, **kwargs
)
6913 def Validate(*args
, **kwargs
):
6915 Validate(self) -> bool
6917 Validates the current values of the child controls using their
6918 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6919 style flag set, the method will also call Validate() of all child
6920 windows. Returns false if any of the validations failed.
6922 return _core_
.Window_Validate(*args
, **kwargs
)
6924 def TransferDataToWindow(*args
, **kwargs
):
6926 TransferDataToWindow(self) -> bool
6928 Transfers values to child controls from data areas specified by their
6929 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6930 style flag set, the method will also call TransferDataToWindow() of
6933 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
6935 def TransferDataFromWindow(*args
, **kwargs
):
6937 TransferDataFromWindow(self) -> bool
6939 Transfers values from child controls to data areas specified by their
6940 validators. Returns false if a transfer failed. If the window has
6941 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6942 also call TransferDataFromWindow() of all child windows.
6944 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
6946 def InitDialog(*args
, **kwargs
):
6950 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6951 to the dialog via validators.
6953 return _core_
.Window_InitDialog(*args
, **kwargs
)
6955 def SetAcceleratorTable(*args
, **kwargs
):
6957 SetAcceleratorTable(self, AcceleratorTable accel)
6959 Sets the accelerator table for this window.
6961 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
6963 def GetAcceleratorTable(*args
, **kwargs
):
6965 GetAcceleratorTable(self) -> AcceleratorTable
6967 Gets the accelerator table for this window.
6969 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
6971 def RegisterHotKey(*args
, **kwargs
):
6973 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6975 Registers a system wide hotkey. Every time the user presses the hotkey
6976 registered here, this window will receive a hotkey event. It will
6977 receive the event even if the application is in the background and
6978 does not have the input focus because the user is working with some
6979 other application. To bind an event handler function to this hotkey
6980 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6981 hotkey was registered successfully.
6983 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
6985 def UnregisterHotKey(*args
, **kwargs
):
6987 UnregisterHotKey(self, int hotkeyId) -> bool
6989 Unregisters a system wide hotkey.
6991 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
6993 def ConvertDialogPointToPixels(*args
, **kwargs
):
6995 ConvertDialogPointToPixels(self, Point pt) -> Point
6997 Converts a point or size from dialog units to pixels. Dialog units
6998 are used for maintaining a dialog's proportions even if the font
6999 changes. For the x dimension, the dialog units are multiplied by the
7000 average character width and then divided by 4. For the y dimension,
7001 the dialog units are multiplied by the average character height and
7004 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
7006 def ConvertDialogSizeToPixels(*args
, **kwargs
):
7008 ConvertDialogSizeToPixels(self, Size sz) -> Size
7010 Converts a point or size from dialog units to pixels. Dialog units
7011 are used for maintaining a dialog's proportions even if the font
7012 changes. For the x dimension, the dialog units are multiplied by the
7013 average character width and then divided by 4. For the y dimension,
7014 the dialog units are multiplied by the average character height and
7017 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
7019 def DLG_PNT(*args
, **kwargs
):
7021 DLG_PNT(self, Point pt) -> Point
7023 Converts a point or size from dialog units to pixels. Dialog units
7024 are used for maintaining a dialog's proportions even if the font
7025 changes. For the x dimension, the dialog units are multiplied by the
7026 average character width and then divided by 4. For the y dimension,
7027 the dialog units are multiplied by the average character height and
7030 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
7032 def DLG_SZE(*args
, **kwargs
):
7034 DLG_SZE(self, Size sz) -> Size
7036 Converts a point or size from dialog units to pixels. Dialog units
7037 are used for maintaining a dialog's proportions even if the font
7038 changes. For the x dimension, the dialog units are multiplied by the
7039 average character width and then divided by 4. For the y dimension,
7040 the dialog units are multiplied by the average character height and
7043 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
7045 def ConvertPixelPointToDialog(*args
, **kwargs
):
7046 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7047 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
7049 def ConvertPixelSizeToDialog(*args
, **kwargs
):
7050 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7051 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
7053 def WarpPointer(*args
, **kwargs
):
7055 WarpPointer(self, int x, int y)
7057 Moves the pointer to the given position on the window.
7059 NOTE: This function is not supported under Mac because Apple Human
7060 Interface Guidelines forbid moving the mouse cursor programmatically.
7062 return _core_
.Window_WarpPointer(*args
, **kwargs
)
7064 def CaptureMouse(*args
, **kwargs
):
7068 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7069 release the capture.
7071 Note that wxWindows maintains the stack of windows having captured the
7072 mouse and when the mouse is released the capture returns to the window
7073 which had had captured it previously and it is only really released if
7074 there were no previous window. In particular, this means that you must
7075 release the mouse as many times as you capture it.
7077 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
7079 def ReleaseMouse(*args
, **kwargs
):
7083 Releases mouse input captured with wx.Window.CaptureMouse.
7085 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
7087 def GetCapture(*args
, **kwargs
):
7089 GetCapture() -> Window
7091 Returns the window which currently captures the mouse or None
7093 return _core_
.Window_GetCapture(*args
, **kwargs
)
7095 GetCapture
= staticmethod(GetCapture
)
7096 def HasCapture(*args
, **kwargs
):
7098 HasCapture(self) -> bool
7100 Returns true if this window has the current mouse capture.
7102 return _core_
.Window_HasCapture(*args
, **kwargs
)
7104 def Refresh(*args
, **kwargs
):
7106 Refresh(self, bool eraseBackground=True, Rect rect=None)
7108 Mark the specified rectangle (or the whole window) as "dirty" so it
7109 will be repainted. Causes an EVT_PAINT event to be generated and sent
7112 return _core_
.Window_Refresh(*args
, **kwargs
)
7114 def RefreshRect(*args
, **kwargs
):
7116 RefreshRect(self, Rect rect)
7118 Redraws the contents of the given rectangle: the area inside it will
7119 be repainted. This is the same as Refresh but has a nicer syntax.
7121 return _core_
.Window_RefreshRect(*args
, **kwargs
)
7123 def Update(*args
, **kwargs
):
7127 Calling this method immediately repaints the invalidated area of the
7128 window instead of waiting for the EVT_PAINT event to happen, (normally
7129 this would usually only happen when the flow of control returns to the
7130 event loop.) Notice that this function doesn't refresh the window and
7131 does nothing if the window has been already repainted. Use Refresh
7132 first if you want to immediately redraw the window (or some portion of
7133 it) unconditionally.
7135 return _core_
.Window_Update(*args
, **kwargs
)
7137 def ClearBackground(*args
, **kwargs
):
7139 ClearBackground(self)
7141 Clears the window by filling it with the current background
7142 colour. Does not cause an erase background event to be generated.
7144 return _core_
.Window_ClearBackground(*args
, **kwargs
)
7146 def Freeze(*args
, **kwargs
):
7150 Freezes the window or, in other words, prevents any updates from
7151 taking place on screen, the window is not redrawn at all. Thaw must be
7152 called to reenable window redrawing. Calls to Freeze/Thaw may be
7153 nested, with the actual Thaw being delayed until all the nesting has
7156 This method is useful for visual appearance optimization (for example,
7157 it is a good idea to use it before inserting large amount of text into
7158 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7159 for all controls so it is mostly just a hint to wxWindows and not a
7160 mandatory directive.
7162 return _core_
.Window_Freeze(*args
, **kwargs
)
7164 def Thaw(*args
, **kwargs
):
7168 Reenables window updating after a previous call to Freeze. Calls to
7169 Freeze/Thaw may be nested, so Thaw must be called the same number of
7170 times that Freeze was before the window will be updated.
7172 return _core_
.Window_Thaw(*args
, **kwargs
)
7174 def PrepareDC(*args
, **kwargs
):
7176 PrepareDC(self, DC dc)
7178 Call this function to prepare the device context for drawing a
7179 scrolled image. It sets the device origin according to the current
7182 return _core_
.Window_PrepareDC(*args
, **kwargs
)
7184 def GetUpdateRegion(*args
, **kwargs
):
7186 GetUpdateRegion(self) -> Region
7188 Returns the region specifying which parts of the window have been
7189 damaged. Should only be called within an EVT_PAINT handler.
7191 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
7193 def GetUpdateClientRect(*args
, **kwargs
):
7195 GetUpdateClientRect(self) -> Rect
7197 Get the update rectangle region bounding box in client coords.
7199 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7201 def IsExposed(*args
, **kwargs
):
7203 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7205 Returns true if the given point or rectangle area has been exposed
7206 since the last repaint. Call this in an paint event handler to
7207 optimize redrawing by only redrawing those areas, which have been
7210 return _core_
.Window_IsExposed(*args
, **kwargs
)
7212 def IsExposedPoint(*args
, **kwargs
):
7214 IsExposedPoint(self, Point pt) -> bool
7216 Returns true if the given point or rectangle area has been exposed
7217 since the last repaint. Call this in an paint event handler to
7218 optimize redrawing by only redrawing those areas, which have been
7221 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7223 def IsExposedRect(*args
, **kwargs
):
7225 IsExposedRect(self, Rect rect) -> bool
7227 Returns true if the given point or rectangle area has been exposed
7228 since the last repaint. Call this in an paint event handler to
7229 optimize redrawing by only redrawing those areas, which have been
7232 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7234 def GetDefaultAttributes(*args
, **kwargs
):
7236 GetDefaultAttributes(self) -> VisualAttributes
7238 Get the default attributes for an instance of this class. This is
7239 useful if you want to use the same font or colour in your own control
7240 as in a standard control -- which is a much better idea than hard
7241 coding specific colours or fonts which might look completely out of
7242 place on the user's system, especially if it uses themes.
7244 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7246 def GetClassDefaultAttributes(*args
, **kwargs
):
7248 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7250 Get the default attributes for this class. This is useful if you want
7251 to use the same font or colour in your own control as in a standard
7252 control -- which is a much better idea than hard coding specific
7253 colours or fonts which might look completely out of place on the
7254 user's system, especially if it uses themes.
7256 The variant parameter is only relevant under Mac currently and is
7257 ignore under other platforms. Under Mac, it will change the size of
7258 the returned font. See `wx.Window.SetWindowVariant` for more about
7261 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7263 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7264 def SetBackgroundColour(*args
, **kwargs
):
7266 SetBackgroundColour(self, Colour colour) -> bool
7268 Sets the background colour of the window. Returns True if the colour
7269 was changed. The background colour is usually painted by the default
7270 EVT_ERASE_BACKGROUND event handler function under Windows and
7271 automatically under GTK. Using `wx.NullColour` will reset the window
7272 to the default background colour.
7274 Note that setting the background colour may not cause an immediate
7275 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7276 calling this function.
7278 Using this function will disable attempts to use themes for this
7279 window, if the system supports them. Use with care since usually the
7280 themes represent the appearance chosen by the user to be used for all
7281 applications on the system.
7283 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7285 def SetOwnBackgroundColour(*args
, **kwargs
):
7286 """SetOwnBackgroundColour(self, Colour colour)"""
7287 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7289 def SetForegroundColour(*args
, **kwargs
):
7291 SetForegroundColour(self, Colour colour) -> bool
7293 Sets the foreground colour of the window. Returns True is the colour
7294 was changed. The interpretation of foreground colour is dependent on
7295 the window class; it may be the text colour or other colour, or it may
7298 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7300 def SetOwnForegroundColour(*args
, **kwargs
):
7301 """SetOwnForegroundColour(self, Colour colour)"""
7302 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7304 def GetBackgroundColour(*args
, **kwargs
):
7306 GetBackgroundColour(self) -> Colour
7308 Returns the background colour of the window.
7310 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7312 def GetForegroundColour(*args
, **kwargs
):
7314 GetForegroundColour(self) -> Colour
7316 Returns the foreground colour of the window. The interpretation of
7317 foreground colour is dependent on the window class; it may be the text
7318 colour or other colour, or it may not be used at all.
7320 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7322 def SetBackgroundStyle(*args
, **kwargs
):
7324 SetBackgroundStyle(self, int style) -> bool
7326 Returns the background style of the window. The background style
7327 indicates how the background of the window is drawn.
7329 ====================== ========================================
7330 wx.BG_STYLE_SYSTEM The background colour or pattern should
7331 be determined by the system
7332 wx.BG_STYLE_COLOUR The background should be a solid colour
7333 wx.BG_STYLE_CUSTOM The background will be implemented by the
7335 ====================== ========================================
7337 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7338 a custom background, such as a tiled bitmap. Currently the style has
7339 no effect on other platforms.
7341 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7343 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
7345 def GetBackgroundStyle(*args
, **kwargs
):
7347 GetBackgroundStyle(self) -> int
7349 Returns the background style of the window.
7351 :see: `SetBackgroundStyle`
7353 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
7355 def HasTransparentBackground(*args
, **kwargs
):
7357 HasTransparentBackground(self) -> bool
7359 Returns True if this window's background is transparent (as, for
7360 example, for `wx.StaticText`) and should show the parent window's
7363 This method is mostly used internally by the library itself and you
7364 normally shouldn't have to call it. You may, however, have to override
7365 it in your custom control classes to ensure that background is painted
7368 return _core_
.Window_HasTransparentBackground(*args
, **kwargs
)
7370 def SetCursor(*args
, **kwargs
):
7372 SetCursor(self, Cursor cursor) -> bool
7374 Sets the window's cursor. Notice that the window cursor also sets it
7375 for the children of the window implicitly.
7377 The cursor may be wx.NullCursor in which case the window cursor will
7378 be reset back to default.
7380 return _core_
.Window_SetCursor(*args
, **kwargs
)
7382 def GetCursor(*args
, **kwargs
):
7384 GetCursor(self) -> Cursor
7386 Return the cursor associated with this window.
7388 return _core_
.Window_GetCursor(*args
, **kwargs
)
7390 def SetFont(*args
, **kwargs
):
7392 SetFont(self, Font font) -> bool
7394 Sets the font for this window.
7396 return _core_
.Window_SetFont(*args
, **kwargs
)
7398 def SetOwnFont(*args
, **kwargs
):
7399 """SetOwnFont(self, Font font)"""
7400 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
7402 def GetFont(*args
, **kwargs
):
7404 GetFont(self) -> Font
7406 Returns the default font used for this window.
7408 return _core_
.Window_GetFont(*args
, **kwargs
)
7410 def SetCaret(*args
, **kwargs
):
7412 SetCaret(self, Caret caret)
7414 Sets the caret associated with the window.
7416 return _core_
.Window_SetCaret(*args
, **kwargs
)
7418 def GetCaret(*args
, **kwargs
):
7420 GetCaret(self) -> Caret
7422 Returns the caret associated with the window.
7424 return _core_
.Window_GetCaret(*args
, **kwargs
)
7426 def GetCharHeight(*args
, **kwargs
):
7428 GetCharHeight(self) -> int
7430 Get the (average) character size for the current font.
7432 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
7434 def GetCharWidth(*args
, **kwargs
):
7436 GetCharWidth(self) -> int
7438 Get the (average) character size for the current font.
7440 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
7442 def GetTextExtent(*args
, **kwargs
):
7444 GetTextExtent(String string) -> (width, height)
7446 Get the width and height of the text using the current font.
7448 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
7450 def GetFullTextExtent(*args
, **kwargs
):
7452 GetFullTextExtent(String string, Font font=None) ->
7453 (width, height, descent, externalLeading)
7455 Get the width, height, decent and leading of the text using the
7456 current or specified font.
7458 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
7460 def ClientToScreenXY(*args
, **kwargs
):
7462 ClientToScreenXY(int x, int y) -> (x,y)
7464 Converts to screen coordinates from coordinates relative to this window.
7466 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
7468 def ScreenToClientXY(*args
, **kwargs
):
7470 ScreenToClientXY(int x, int y) -> (x,y)
7472 Converts from screen to client window coordinates.
7474 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
7476 def ClientToScreen(*args
, **kwargs
):
7478 ClientToScreen(self, Point pt) -> Point
7480 Converts to screen coordinates from coordinates relative to this window.
7482 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
7484 def ScreenToClient(*args
, **kwargs
):
7486 ScreenToClient(self, Point pt) -> Point
7488 Converts from screen to client window coordinates.
7490 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
7492 def HitTestXY(*args
, **kwargs
):
7494 HitTestXY(self, int x, int y) -> int
7496 Test where the given (in client coords) point lies
7498 return _core_
.Window_HitTestXY(*args
, **kwargs
)
7500 def HitTest(*args
, **kwargs
):
7502 HitTest(self, Point pt) -> int
7504 Test where the given (in client coords) point lies
7506 return _core_
.Window_HitTest(*args
, **kwargs
)
7508 def GetBorder(*args
):
7510 GetBorder(self, long flags) -> int
7511 GetBorder(self) -> int
7513 Get border for the flags of this window
7515 return _core_
.Window_GetBorder(*args
)
7517 def UpdateWindowUI(*args
, **kwargs
):
7519 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7521 This function sends EVT_UPDATE_UI events to the window. The particular
7522 implementation depends on the window; for example a wx.ToolBar will
7523 send an update UI event for each toolbar button, and a wx.Frame will
7524 send an update UI event for each menubar menu item. You can call this
7525 function from your application to ensure that your UI is up-to-date at
7526 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7527 concerned). This may be necessary if you have called
7528 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7529 limit the overhead that wxWindows incurs by sending update UI events
7532 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
7534 def PopupMenuXY(*args
, **kwargs
):
7536 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7538 Pops up the given menu at the specified coordinates, relative to this window,
7539 and returns control when the user has dismissed the menu. If a menu item is
7540 selected, the corresponding menu event is generated and will be processed as
7541 usual. If the default position is given then the current position of the
7542 mouse cursor will be used.
7544 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
7546 def PopupMenu(*args
, **kwargs
):
7548 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7550 Pops up the given menu at the specified coordinates, relative to this window,
7551 and returns control when the user has dismissed the menu. If a menu item is
7552 selected, the corresponding menu event is generated and will be processed as
7553 usual. If the default position is given then the current position of the
7554 mouse cursor will be used.
7556 return _core_
.Window_PopupMenu(*args
, **kwargs
)
7558 def GetHandle(*args
, **kwargs
):
7560 GetHandle(self) -> long
7562 Returns the platform-specific handle (as a long integer) of the
7563 physical window. Currently on wxMac it returns the handle of the
7564 toplevel parent of the window.
7566 return _core_
.Window_GetHandle(*args
, **kwargs
)
7568 def AssociateHandle(*args
, **kwargs
):
7570 AssociateHandle(self, long handle)
7572 Associate the window with a new native handle
7574 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
7576 def DissociateHandle(*args
, **kwargs
):
7578 DissociateHandle(self)
7580 Dissociate the current native handle from the window
7582 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
7584 def OnPaint(*args
, **kwargs
):
7585 """OnPaint(self, PaintEvent event)"""
7586 return _core_
.Window_OnPaint(*args
, **kwargs
)
7588 def HasScrollbar(*args
, **kwargs
):
7590 HasScrollbar(self, int orient) -> bool
7592 Does the window have the scrollbar for this orientation?
7594 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
7596 def SetScrollbar(*args
, **kwargs
):
7598 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7601 Sets the scrollbar properties of a built-in scrollbar.
7603 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
7605 def SetScrollPos(*args
, **kwargs
):
7607 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7609 Sets the position of one of the built-in scrollbars.
7611 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
7613 def GetScrollPos(*args
, **kwargs
):
7615 GetScrollPos(self, int orientation) -> int
7617 Returns the built-in scrollbar position.
7619 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
7621 def GetScrollThumb(*args
, **kwargs
):
7623 GetScrollThumb(self, int orientation) -> int
7625 Returns the built-in scrollbar thumb size.
7627 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
7629 def GetScrollRange(*args
, **kwargs
):
7631 GetScrollRange(self, int orientation) -> int
7633 Returns the built-in scrollbar range.
7635 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
7637 def ScrollWindow(*args
, **kwargs
):
7639 ScrollWindow(self, int dx, int dy, Rect rect=None)
7641 Physically scrolls the pixels in the window and move child windows
7642 accordingly. Use this function to optimise your scrolling
7643 implementations, to minimise the area that must be redrawn. Note that
7644 it is rarely required to call this function from a user program.
7646 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
7648 def ScrollLines(*args
, **kwargs
):
7650 ScrollLines(self, int lines) -> bool
7652 If the platform and window class supports it, scrolls the window by
7653 the given number of lines down, if lines is positive, or up if lines
7654 is negative. Returns True if the window was scrolled, False if it was
7655 already on top/bottom and nothing was done.
7657 return _core_
.Window_ScrollLines(*args
, **kwargs
)
7659 def ScrollPages(*args
, **kwargs
):
7661 ScrollPages(self, int pages) -> bool
7663 If the platform and window class supports it, scrolls the window by
7664 the given number of pages down, if pages is positive, or up if pages
7665 is negative. Returns True if the window was scrolled, False if it was
7666 already on top/bottom and nothing was done.
7668 return _core_
.Window_ScrollPages(*args
, **kwargs
)
7670 def LineUp(*args
, **kwargs
):
7672 LineUp(self) -> bool
7674 This is just a wrapper for ScrollLines(-1).
7676 return _core_
.Window_LineUp(*args
, **kwargs
)
7678 def LineDown(*args
, **kwargs
):
7680 LineDown(self) -> bool
7682 This is just a wrapper for ScrollLines(1).
7684 return _core_
.Window_LineDown(*args
, **kwargs
)
7686 def PageUp(*args
, **kwargs
):
7688 PageUp(self) -> bool
7690 This is just a wrapper for ScrollPages(-1).
7692 return _core_
.Window_PageUp(*args
, **kwargs
)
7694 def PageDown(*args
, **kwargs
):
7696 PageDown(self) -> bool
7698 This is just a wrapper for ScrollPages(1).
7700 return _core_
.Window_PageDown(*args
, **kwargs
)
7702 def SetHelpText(*args
, **kwargs
):
7704 SetHelpText(self, String text)
7706 Sets the help text to be used as context-sensitive help for this
7707 window. Note that the text is actually stored by the current
7708 wxHelpProvider implementation, and not in the window object itself.
7710 return _core_
.Window_SetHelpText(*args
, **kwargs
)
7712 def SetHelpTextForId(*args
, **kwargs
):
7714 SetHelpTextForId(self, String text)
7716 Associate this help text with all windows with the same id as this
7719 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
7721 def GetHelpText(*args
, **kwargs
):
7723 GetHelpText(self) -> String
7725 Gets the help text to be used as context-sensitive help for this
7726 window. Note that the text is actually stored by the current
7727 wxHelpProvider implementation, and not in the window object itself.
7729 return _core_
.Window_GetHelpText(*args
, **kwargs
)
7731 def SetToolTipString(*args
, **kwargs
):
7733 SetToolTipString(self, String tip)
7735 Attach a tooltip to the window.
7737 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
7739 def SetToolTip(*args
, **kwargs
):
7741 SetToolTip(self, ToolTip tip)
7743 Attach a tooltip to the window.
7745 return _core_
.Window_SetToolTip(*args
, **kwargs
)
7747 def GetToolTip(*args
, **kwargs
):
7749 GetToolTip(self) -> ToolTip
7751 get the associated tooltip or None if none
7753 return _core_
.Window_GetToolTip(*args
, **kwargs
)
7755 def SetDropTarget(*args
, **kwargs
):
7757 SetDropTarget(self, DropTarget dropTarget)
7759 Associates a drop target with this window. If the window already has
7760 a drop target, it is deleted.
7762 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
7764 def GetDropTarget(*args
, **kwargs
):
7766 GetDropTarget(self) -> DropTarget
7768 Returns the associated drop target, which may be None.
7770 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
7772 def DragAcceptFiles(*args
, **kwargs
):
7774 DragAcceptFiles(self, bool accept)
7776 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7777 Only available on Windows.
7779 return _core_
.Window_DragAcceptFiles(*args
, **kwargs
)
7781 def SetConstraints(*args
, **kwargs
):
7783 SetConstraints(self, LayoutConstraints constraints)
7785 Sets the window to have the given layout constraints. If an existing
7786 layout constraints object is already owned by the window, it will be
7787 deleted. Pass None to disassociate and delete the window's current
7790 You must call SetAutoLayout to tell a window to use the constraints
7791 automatically in its default EVT_SIZE handler; otherwise, you must
7792 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7793 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7796 return _core_
.Window_SetConstraints(*args
, **kwargs
)
7798 def GetConstraints(*args
, **kwargs
):
7800 GetConstraints(self) -> LayoutConstraints
7802 Returns a pointer to the window's layout constraints, or None if there
7805 return _core_
.Window_GetConstraints(*args
, **kwargs
)
7807 def SetAutoLayout(*args
, **kwargs
):
7809 SetAutoLayout(self, bool autoLayout)
7811 Determines whether the Layout function will be called automatically
7812 when the window is resized. It is called implicitly by SetSizer but
7813 if you use SetConstraints you should call it manually or otherwise the
7814 window layout won't be correctly updated when its size changes.
7816 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
7818 def GetAutoLayout(*args
, **kwargs
):
7820 GetAutoLayout(self) -> bool
7822 Returns the current autoLayout setting
7824 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
7826 def Layout(*args
, **kwargs
):
7828 Layout(self) -> bool
7830 Invokes the constraint-based layout algorithm or the sizer-based
7831 algorithm for this window. See SetAutoLayout: when auto layout is on,
7832 this function gets called automatically by the default EVT_SIZE
7833 handler when the window is resized.
7835 return _core_
.Window_Layout(*args
, **kwargs
)
7837 def SetSizer(*args
, **kwargs
):
7839 SetSizer(self, Sizer sizer, bool deleteOld=True)
7841 Sets the window to have the given layout sizer. The window will then
7842 own the object, and will take care of its deletion. If an existing
7843 layout sizer object is already owned by the window, it will be deleted
7844 if the deleteOld parameter is true. Note that this function will also
7845 call SetAutoLayout implicitly with a True parameter if the sizer is
7846 non-None, and False otherwise.
7848 return _core_
.Window_SetSizer(*args
, **kwargs
)
7850 def SetSizerAndFit(*args
, **kwargs
):
7852 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7854 The same as SetSizer, except it also sets the size hints for the
7855 window based on the sizer's minimum size.
7857 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
7859 def GetSizer(*args
, **kwargs
):
7861 GetSizer(self) -> Sizer
7863 Return the sizer associated with the window by a previous call to
7864 SetSizer or None if there isn't one.
7866 return _core_
.Window_GetSizer(*args
, **kwargs
)
7868 def SetContainingSizer(*args
, **kwargs
):
7870 SetContainingSizer(self, Sizer sizer)
7872 This normally does not need to be called by application code. It is
7873 called internally when a window is added to a sizer, and is used so
7874 the window can remove itself from the sizer when it is destroyed.
7876 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
7878 def GetContainingSizer(*args
, **kwargs
):
7880 GetContainingSizer(self) -> Sizer
7882 Return the sizer that this window is a member of, if any, otherwise None.
7884 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
7886 def InheritAttributes(*args
, **kwargs
):
7888 InheritAttributes(self)
7890 This function is (or should be, in case of custom controls) called
7891 during window creation to intelligently set up the window visual
7892 attributes, that is the font and the foreground and background
7895 By 'intelligently' the following is meant: by default, all windows use
7896 their own default attributes. However if some of the parent's
7897 attributes are explicitly changed (that is, using SetFont and not
7898 SetOwnFont) and if the corresponding attribute hadn't been
7899 explicitly set for this window itself, then this window takes the same
7900 value as used by the parent. In addition, if the window overrides
7901 ShouldInheritColours to return false, the colours will not be changed
7902 no matter what and only the font might.
7904 This rather complicated logic is necessary in order to accommodate the
7905 different usage scenarios. The most common one is when all default
7906 attributes are used and in this case, nothing should be inherited as
7907 in modern GUIs different controls use different fonts (and colours)
7908 than their siblings so they can't inherit the same value from the
7909 parent. However it was also deemed desirable to allow to simply change
7910 the attributes of all children at once by just changing the font or
7911 colour of their common parent, hence in this case we do inherit the
7915 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
7917 def ShouldInheritColours(*args
, **kwargs
):
7919 ShouldInheritColours(self) -> bool
7921 Return true from here to allow the colours of this window to be
7922 changed by InheritAttributes, returning false forbids inheriting them
7923 from the parent window.
7925 The base class version returns false, but this method is overridden in
7926 wxControl where it returns true.
7928 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
7930 def PostCreate(self
, pre
):
7932 Phase 3 of the 2-phase create <wink!>
7933 Call this method after precreating the window with the 2-phase create method.
7935 self
.this
= pre
.this
7936 self
.thisown
= pre
.thisown
7938 if hasattr(self
, '_setOORInfo'):
7939 self
._setOORInfo
(self
)
7940 if hasattr(self
, '_setCallbackInfo'):
7941 self
._setCallbackInfo
(self
, self
.__class
__)
7944 class WindowPtr(Window
):
7945 def __init__(self
, this
):
7947 if not hasattr(self
,"thisown"): self
.thisown
= 0
7948 self
.__class
__ = Window
7949 _core_
.Window_swigregister(WindowPtr
)
7951 def PreWindow(*args
, **kwargs
):
7953 PreWindow() -> Window
7955 Precreate a Window for 2-phase creation.
7957 val
= _core_
.new_PreWindow(*args
, **kwargs
)
7961 def Window_NewControlId(*args
, **kwargs
):
7963 Window_NewControlId() -> int
7965 Generate a control id for the controls which were not given one.
7967 return _core_
.Window_NewControlId(*args
, **kwargs
)
7969 def Window_NextControlId(*args
, **kwargs
):
7971 Window_NextControlId(int winid) -> int
7973 Get the id of the control following the one with the given
7976 return _core_
.Window_NextControlId(*args
, **kwargs
)
7978 def Window_PrevControlId(*args
, **kwargs
):
7980 Window_PrevControlId(int winid) -> int
7982 Get the id of the control preceding the one with the given
7985 return _core_
.Window_PrevControlId(*args
, **kwargs
)
7987 def Window_FindFocus(*args
, **kwargs
):
7989 Window_FindFocus() -> Window
7991 Returns the window or control that currently has the keyboard focus,
7994 return _core_
.Window_FindFocus(*args
, **kwargs
)
7996 def Window_GetCapture(*args
, **kwargs
):
7998 Window_GetCapture() -> Window
8000 Returns the window which currently captures the mouse or None
8002 return _core_
.Window_GetCapture(*args
, **kwargs
)
8004 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
8006 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8008 Get the default attributes for this class. This is useful if you want
8009 to use the same font or colour in your own control as in a standard
8010 control -- which is a much better idea than hard coding specific
8011 colours or fonts which might look completely out of place on the
8012 user's system, especially if it uses themes.
8014 The variant parameter is only relevant under Mac currently and is
8015 ignore under other platforms. Under Mac, it will change the size of
8016 the returned font. See `wx.Window.SetWindowVariant` for more about
8019 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
8021 def DLG_PNT(win
, point_or_x
, y
=None):
8023 Convenience function for converting a Point or (x,y) in
8024 dialog units to pixel units.
8027 return win
.ConvertDialogPointToPixels(point_or_x
)
8029 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
8031 def DLG_SZE(win
, size_width
, height
=None):
8033 Convenience function for converting a Size or (w,h) in
8034 dialog units to pixel units.
8037 return win
.ConvertDialogSizeToPixels(size_width
)
8039 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
8042 def FindWindowById(*args
, **kwargs
):
8044 FindWindowById(long id, Window parent=None) -> Window
8046 Find the first window in the application with the given id. If parent
8047 is None, the search will start from all top-level frames and dialog
8048 boxes; if non-None, the search will be limited to the given window
8049 hierarchy. The search is recursive in both cases.
8051 return _core_
.FindWindowById(*args
, **kwargs
)
8053 def FindWindowByName(*args
, **kwargs
):
8055 FindWindowByName(String name, Window parent=None) -> Window
8057 Find a window by its name (as given in a window constructor or Create
8058 function call). If parent is None, the search will start from all
8059 top-level frames and dialog boxes; if non-None, the search will be
8060 limited to the given window hierarchy. The search is recursive in both
8063 If no window with such name is found, wx.FindWindowByLabel is called.
8065 return _core_
.FindWindowByName(*args
, **kwargs
)
8067 def FindWindowByLabel(*args
, **kwargs
):
8069 FindWindowByLabel(String label, Window parent=None) -> Window
8071 Find a window by its label. Depending on the type of window, the label
8072 may be a window title or panel item label. If parent is None, the
8073 search will start from all top-level frames and dialog boxes; if
8074 non-None, the search will be limited to the given window
8075 hierarchy. The search is recursive in both cases.
8077 return _core_
.FindWindowByLabel(*args
, **kwargs
)
8079 def Window_FromHWND(*args
, **kwargs
):
8080 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8081 return _core_
.Window_FromHWND(*args
, **kwargs
)
8082 #---------------------------------------------------------------------------
8084 class Validator(EvtHandler
):
8085 """Proxy of C++ Validator class"""
8087 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8088 def __init__(self
, *args
, **kwargs
):
8089 """__init__(self) -> Validator"""
8090 newobj
= _core_
.new_Validator(*args
, **kwargs
)
8091 self
.this
= newobj
.this
8094 self
._setOORInfo
(self
)
8096 def Clone(*args
, **kwargs
):
8097 """Clone(self) -> Validator"""
8098 return _core_
.Validator_Clone(*args
, **kwargs
)
8100 def Validate(*args
, **kwargs
):
8101 """Validate(self, Window parent) -> bool"""
8102 return _core_
.Validator_Validate(*args
, **kwargs
)
8104 def TransferToWindow(*args
, **kwargs
):
8105 """TransferToWindow(self) -> bool"""
8106 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
8108 def TransferFromWindow(*args
, **kwargs
):
8109 """TransferFromWindow(self) -> bool"""
8110 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
8112 def GetWindow(*args
, **kwargs
):
8113 """GetWindow(self) -> Window"""
8114 return _core_
.Validator_GetWindow(*args
, **kwargs
)
8116 def SetWindow(*args
, **kwargs
):
8117 """SetWindow(self, Window window)"""
8118 return _core_
.Validator_SetWindow(*args
, **kwargs
)
8120 def IsSilent(*args
, **kwargs
):
8121 """IsSilent() -> bool"""
8122 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8124 IsSilent
= staticmethod(IsSilent
)
8125 def SetBellOnError(*args
, **kwargs
):
8126 """SetBellOnError(int doIt=True)"""
8127 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8129 SetBellOnError
= staticmethod(SetBellOnError
)
8131 class ValidatorPtr(Validator
):
8132 def __init__(self
, this
):
8134 if not hasattr(self
,"thisown"): self
.thisown
= 0
8135 self
.__class
__ = Validator
8136 _core_
.Validator_swigregister(ValidatorPtr
)
8138 def Validator_IsSilent(*args
, **kwargs
):
8139 """Validator_IsSilent() -> bool"""
8140 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8142 def Validator_SetBellOnError(*args
, **kwargs
):
8143 """Validator_SetBellOnError(int doIt=True)"""
8144 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8146 class PyValidator(Validator
):
8147 """Proxy of C++ PyValidator class"""
8149 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8150 def __init__(self
, *args
, **kwargs
):
8151 """__init__(self) -> PyValidator"""
8152 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
8153 self
.this
= newobj
.this
8157 self
._setCallbackInfo
(self
, PyValidator
, 1)
8158 self
._setOORInfo
(self
)
8160 def _setCallbackInfo(*args
, **kwargs
):
8161 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8162 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
8165 class PyValidatorPtr(PyValidator
):
8166 def __init__(self
, this
):
8168 if not hasattr(self
,"thisown"): self
.thisown
= 0
8169 self
.__class
__ = PyValidator
8170 _core_
.PyValidator_swigregister(PyValidatorPtr
)
8172 #---------------------------------------------------------------------------
8174 class Menu(EvtHandler
):
8175 """Proxy of C++ Menu class"""
8177 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8178 def __init__(self
, *args
, **kwargs
):
8179 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8180 newobj
= _core_
.new_Menu(*args
, **kwargs
)
8181 self
.this
= newobj
.this
8184 self
._setOORInfo
(self
)
8186 def Append(*args
, **kwargs
):
8187 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8188 return _core_
.Menu_Append(*args
, **kwargs
)
8190 def AppendSeparator(*args
, **kwargs
):
8191 """AppendSeparator(self) -> MenuItem"""
8192 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
8194 def AppendCheckItem(*args
, **kwargs
):
8195 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8196 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
8198 def AppendRadioItem(*args
, **kwargs
):
8199 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8200 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
8202 def AppendMenu(*args
, **kwargs
):
8203 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8204 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
8206 def AppendItem(*args
, **kwargs
):
8207 """AppendItem(self, MenuItem item) -> MenuItem"""
8208 return _core_
.Menu_AppendItem(*args
, **kwargs
)
8210 def Break(*args
, **kwargs
):
8212 return _core_
.Menu_Break(*args
, **kwargs
)
8214 def InsertItem(*args
, **kwargs
):
8215 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8216 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8218 def Insert(*args
, **kwargs
):
8220 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8221 int kind=ITEM_NORMAL) -> MenuItem
8223 return _core_
.Menu_Insert(*args
, **kwargs
)
8225 def InsertSeparator(*args
, **kwargs
):
8226 """InsertSeparator(self, size_t pos) -> MenuItem"""
8227 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8229 def InsertCheckItem(*args
, **kwargs
):
8230 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8231 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8233 def InsertRadioItem(*args
, **kwargs
):
8234 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8235 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8237 def InsertMenu(*args
, **kwargs
):
8238 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8239 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8241 def PrependItem(*args
, **kwargs
):
8242 """PrependItem(self, MenuItem item) -> MenuItem"""
8243 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8245 def Prepend(*args
, **kwargs
):
8246 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8247 return _core_
.Menu_Prepend(*args
, **kwargs
)
8249 def PrependSeparator(*args
, **kwargs
):
8250 """PrependSeparator(self) -> MenuItem"""
8251 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8253 def PrependCheckItem(*args
, **kwargs
):
8254 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8255 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8257 def PrependRadioItem(*args
, **kwargs
):
8258 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8259 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8261 def PrependMenu(*args
, **kwargs
):
8262 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8263 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8265 def Remove(*args
, **kwargs
):
8266 """Remove(self, int id) -> MenuItem"""
8267 return _core_
.Menu_Remove(*args
, **kwargs
)
8269 def RemoveItem(*args
, **kwargs
):
8270 """RemoveItem(self, MenuItem item) -> MenuItem"""
8271 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8273 def Delete(*args
, **kwargs
):
8274 """Delete(self, int id) -> bool"""
8275 return _core_
.Menu_Delete(*args
, **kwargs
)
8277 def DeleteItem(*args
, **kwargs
):
8278 """DeleteItem(self, MenuItem item) -> bool"""
8279 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8281 def Destroy(*args
, **kwargs
):
8285 Deletes the C++ object this Python object is a proxy for.
8287 return _core_
.Menu_Destroy(*args
, **kwargs
)
8289 def DestroyId(*args
, **kwargs
):
8291 DestroyId(self, int id) -> bool
8293 Deletes the C++ object this Python object is a proxy for.
8295 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8297 def DestroyItem(*args
, **kwargs
):
8299 DestroyItem(self, MenuItem item) -> bool
8301 Deletes the C++ object this Python object is a proxy for.
8303 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8305 def GetMenuItemCount(*args
, **kwargs
):
8306 """GetMenuItemCount(self) -> size_t"""
8307 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8309 def GetMenuItems(*args
, **kwargs
):
8310 """GetMenuItems(self) -> PyObject"""
8311 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8313 def FindItem(*args
, **kwargs
):
8314 """FindItem(self, String item) -> int"""
8315 return _core_
.Menu_FindItem(*args
, **kwargs
)
8317 def FindItemById(*args
, **kwargs
):
8318 """FindItemById(self, int id) -> MenuItem"""
8319 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8321 def FindItemByPosition(*args
, **kwargs
):
8322 """FindItemByPosition(self, size_t position) -> MenuItem"""
8323 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
8325 def Enable(*args
, **kwargs
):
8326 """Enable(self, int id, bool enable)"""
8327 return _core_
.Menu_Enable(*args
, **kwargs
)
8329 def IsEnabled(*args
, **kwargs
):
8330 """IsEnabled(self, int id) -> bool"""
8331 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
8333 def Check(*args
, **kwargs
):
8334 """Check(self, int id, bool check)"""
8335 return _core_
.Menu_Check(*args
, **kwargs
)
8337 def IsChecked(*args
, **kwargs
):
8338 """IsChecked(self, int id) -> bool"""
8339 return _core_
.Menu_IsChecked(*args
, **kwargs
)
8341 def SetLabel(*args
, **kwargs
):
8342 """SetLabel(self, int id, String label)"""
8343 return _core_
.Menu_SetLabel(*args
, **kwargs
)
8345 def GetLabel(*args
, **kwargs
):
8346 """GetLabel(self, int id) -> String"""
8347 return _core_
.Menu_GetLabel(*args
, **kwargs
)
8349 def SetHelpString(*args
, **kwargs
):
8350 """SetHelpString(self, int id, String helpString)"""
8351 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
8353 def GetHelpString(*args
, **kwargs
):
8354 """GetHelpString(self, int id) -> String"""
8355 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
8357 def SetTitle(*args
, **kwargs
):
8358 """SetTitle(self, String title)"""
8359 return _core_
.Menu_SetTitle(*args
, **kwargs
)
8361 def GetTitle(*args
, **kwargs
):
8362 """GetTitle(self) -> String"""
8363 return _core_
.Menu_GetTitle(*args
, **kwargs
)
8365 def SetEventHandler(*args
, **kwargs
):
8366 """SetEventHandler(self, EvtHandler handler)"""
8367 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
8369 def GetEventHandler(*args
, **kwargs
):
8370 """GetEventHandler(self) -> EvtHandler"""
8371 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
8373 def SetInvokingWindow(*args
, **kwargs
):
8374 """SetInvokingWindow(self, Window win)"""
8375 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
8377 def GetInvokingWindow(*args
, **kwargs
):
8378 """GetInvokingWindow(self) -> Window"""
8379 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
8381 def GetStyle(*args
, **kwargs
):
8382 """GetStyle(self) -> long"""
8383 return _core_
.Menu_GetStyle(*args
, **kwargs
)
8385 def UpdateUI(*args
, **kwargs
):
8386 """UpdateUI(self, EvtHandler source=None)"""
8387 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
8389 def GetMenuBar(*args
, **kwargs
):
8390 """GetMenuBar(self) -> MenuBar"""
8391 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
8393 def Attach(*args
, **kwargs
):
8394 """Attach(self, wxMenuBarBase menubar)"""
8395 return _core_
.Menu_Attach(*args
, **kwargs
)
8397 def Detach(*args
, **kwargs
):
8399 return _core_
.Menu_Detach(*args
, **kwargs
)
8401 def IsAttached(*args
, **kwargs
):
8402 """IsAttached(self) -> bool"""
8403 return _core_
.Menu_IsAttached(*args
, **kwargs
)
8405 def SetParent(*args
, **kwargs
):
8406 """SetParent(self, Menu parent)"""
8407 return _core_
.Menu_SetParent(*args
, **kwargs
)
8409 def GetParent(*args
, **kwargs
):
8410 """GetParent(self) -> Menu"""
8411 return _core_
.Menu_GetParent(*args
, **kwargs
)
8414 class MenuPtr(Menu
):
8415 def __init__(self
, this
):
8417 if not hasattr(self
,"thisown"): self
.thisown
= 0
8418 self
.__class
__ = Menu
8419 _core_
.Menu_swigregister(MenuPtr
)
8420 DefaultValidator
= cvar
.DefaultValidator
8422 #---------------------------------------------------------------------------
8424 class MenuBar(Window
):
8425 """Proxy of C++ MenuBar class"""
8427 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8428 def __init__(self
, *args
, **kwargs
):
8429 """__init__(self, long style=0) -> MenuBar"""
8430 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
8431 self
.this
= newobj
.this
8434 self
._setOORInfo
(self
)
8436 def Append(*args
, **kwargs
):
8437 """Append(self, Menu menu, String title) -> bool"""
8438 return _core_
.MenuBar_Append(*args
, **kwargs
)
8440 def Insert(*args
, **kwargs
):
8441 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8442 return _core_
.MenuBar_Insert(*args
, **kwargs
)
8444 def GetMenuCount(*args
, **kwargs
):
8445 """GetMenuCount(self) -> size_t"""
8446 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
8448 def GetMenu(*args
, **kwargs
):
8449 """GetMenu(self, size_t pos) -> Menu"""
8450 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
8452 def Replace(*args
, **kwargs
):
8453 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8454 return _core_
.MenuBar_Replace(*args
, **kwargs
)
8456 def Remove(*args
, **kwargs
):
8457 """Remove(self, size_t pos) -> Menu"""
8458 return _core_
.MenuBar_Remove(*args
, **kwargs
)
8460 def EnableTop(*args
, **kwargs
):
8461 """EnableTop(self, size_t pos, bool enable)"""
8462 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
8464 def IsEnabledTop(*args
, **kwargs
):
8465 """IsEnabledTop(self, size_t pos) -> bool"""
8466 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
8468 def SetLabelTop(*args
, **kwargs
):
8469 """SetLabelTop(self, size_t pos, String label)"""
8470 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
8472 def GetLabelTop(*args
, **kwargs
):
8473 """GetLabelTop(self, size_t pos) -> String"""
8474 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
8476 def FindMenuItem(*args
, **kwargs
):
8477 """FindMenuItem(self, String menu, String item) -> int"""
8478 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
8480 def FindItemById(*args
, **kwargs
):
8481 """FindItemById(self, int id) -> MenuItem"""
8482 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
8484 def FindMenu(*args
, **kwargs
):
8485 """FindMenu(self, String title) -> int"""
8486 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
8488 def Enable(*args
, **kwargs
):
8489 """Enable(self, int id, bool enable)"""
8490 return _core_
.MenuBar_Enable(*args
, **kwargs
)
8492 def Check(*args
, **kwargs
):
8493 """Check(self, int id, bool check)"""
8494 return _core_
.MenuBar_Check(*args
, **kwargs
)
8496 def IsChecked(*args
, **kwargs
):
8497 """IsChecked(self, int id) -> bool"""
8498 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
8500 def IsEnabled(*args
, **kwargs
):
8501 """IsEnabled(self, int id) -> bool"""
8502 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
8504 def SetLabel(*args
, **kwargs
):
8505 """SetLabel(self, int id, String label)"""
8506 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
8508 def GetLabel(*args
, **kwargs
):
8509 """GetLabel(self, int id) -> String"""
8510 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
8512 def SetHelpString(*args
, **kwargs
):
8513 """SetHelpString(self, int id, String helpString)"""
8514 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
8516 def GetHelpString(*args
, **kwargs
):
8517 """GetHelpString(self, int id) -> String"""
8518 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
8520 def GetFrame(*args
, **kwargs
):
8521 """GetFrame(self) -> wxFrame"""
8522 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
8524 def IsAttached(*args
, **kwargs
):
8525 """IsAttached(self) -> bool"""
8526 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
8528 def Attach(*args
, **kwargs
):
8529 """Attach(self, wxFrame frame)"""
8530 return _core_
.MenuBar_Attach(*args
, **kwargs
)
8532 def Detach(*args
, **kwargs
):
8534 return _core_
.MenuBar_Detach(*args
, **kwargs
)
8537 class MenuBarPtr(MenuBar
):
8538 def __init__(self
, this
):
8540 if not hasattr(self
,"thisown"): self
.thisown
= 0
8541 self
.__class
__ = MenuBar
8542 _core_
.MenuBar_swigregister(MenuBarPtr
)
8544 #---------------------------------------------------------------------------
8546 class MenuItem(Object
):
8547 """Proxy of C++ MenuItem class"""
8549 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8550 def __init__(self
, *args
, **kwargs
):
8552 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8553 String help=EmptyString, int kind=ITEM_NORMAL,
8554 Menu subMenu=None) -> MenuItem
8556 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
8557 self
.this
= newobj
.this
8560 def GetMenu(*args
, **kwargs
):
8561 """GetMenu(self) -> Menu"""
8562 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
8564 def SetMenu(*args
, **kwargs
):
8565 """SetMenu(self, Menu menu)"""
8566 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
8568 def SetId(*args
, **kwargs
):
8569 """SetId(self, int id)"""
8570 return _core_
.MenuItem_SetId(*args
, **kwargs
)
8572 def GetId(*args
, **kwargs
):
8573 """GetId(self) -> int"""
8574 return _core_
.MenuItem_GetId(*args
, **kwargs
)
8576 def IsSeparator(*args
, **kwargs
):
8577 """IsSeparator(self) -> bool"""
8578 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
8580 def SetText(*args
, **kwargs
):
8581 """SetText(self, String str)"""
8582 return _core_
.MenuItem_SetText(*args
, **kwargs
)
8584 def GetLabel(*args
, **kwargs
):
8585 """GetLabel(self) -> String"""
8586 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
8588 def GetText(*args
, **kwargs
):
8589 """GetText(self) -> String"""
8590 return _core_
.MenuItem_GetText(*args
, **kwargs
)
8592 def GetLabelFromText(*args
, **kwargs
):
8593 """GetLabelFromText(String text) -> String"""
8594 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8596 GetLabelFromText
= staticmethod(GetLabelFromText
)
8597 def GetKind(*args
, **kwargs
):
8598 """GetKind(self) -> int"""
8599 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
8601 def SetKind(*args
, **kwargs
):
8602 """SetKind(self, int kind)"""
8603 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
8605 def SetCheckable(*args
, **kwargs
):
8606 """SetCheckable(self, bool checkable)"""
8607 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
8609 def IsCheckable(*args
, **kwargs
):
8610 """IsCheckable(self) -> bool"""
8611 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
8613 def IsSubMenu(*args
, **kwargs
):
8614 """IsSubMenu(self) -> bool"""
8615 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
8617 def SetSubMenu(*args
, **kwargs
):
8618 """SetSubMenu(self, Menu menu)"""
8619 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
8621 def GetSubMenu(*args
, **kwargs
):
8622 """GetSubMenu(self) -> Menu"""
8623 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
8625 def Enable(*args
, **kwargs
):
8626 """Enable(self, bool enable=True)"""
8627 return _core_
.MenuItem_Enable(*args
, **kwargs
)
8629 def IsEnabled(*args
, **kwargs
):
8630 """IsEnabled(self) -> bool"""
8631 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
8633 def Check(*args
, **kwargs
):
8634 """Check(self, bool check=True)"""
8635 return _core_
.MenuItem_Check(*args
, **kwargs
)
8637 def IsChecked(*args
, **kwargs
):
8638 """IsChecked(self) -> bool"""
8639 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
8641 def Toggle(*args
, **kwargs
):
8643 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
8645 def SetHelp(*args
, **kwargs
):
8646 """SetHelp(self, String str)"""
8647 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
8649 def GetHelp(*args
, **kwargs
):
8650 """GetHelp(self) -> String"""
8651 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
8653 def GetAccel(*args
, **kwargs
):
8654 """GetAccel(self) -> AcceleratorEntry"""
8655 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
8657 def SetAccel(*args
, **kwargs
):
8658 """SetAccel(self, AcceleratorEntry accel)"""
8659 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
8661 def SetFont(*args
, **kwargs
):
8662 """SetFont(self, Font font)"""
8663 return _core_
.MenuItem_SetFont(*args
, **kwargs
)
8665 def GetFont(*args
, **kwargs
):
8666 """GetFont(self) -> Font"""
8667 return _core_
.MenuItem_GetFont(*args
, **kwargs
)
8669 def SetTextColour(*args
, **kwargs
):
8670 """SetTextColour(self, Colour colText)"""
8671 return _core_
.MenuItem_SetTextColour(*args
, **kwargs
)
8673 def GetTextColour(*args
, **kwargs
):
8674 """GetTextColour(self) -> Colour"""
8675 return _core_
.MenuItem_GetTextColour(*args
, **kwargs
)
8677 def SetBackgroundColour(*args
, **kwargs
):
8678 """SetBackgroundColour(self, Colour colBack)"""
8679 return _core_
.MenuItem_SetBackgroundColour(*args
, **kwargs
)
8681 def GetBackgroundColour(*args
, **kwargs
):
8682 """GetBackgroundColour(self) -> Colour"""
8683 return _core_
.MenuItem_GetBackgroundColour(*args
, **kwargs
)
8685 def SetBitmaps(*args
, **kwargs
):
8686 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8687 return _core_
.MenuItem_SetBitmaps(*args
, **kwargs
)
8689 def SetDisabledBitmap(*args
, **kwargs
):
8690 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8691 return _core_
.MenuItem_SetDisabledBitmap(*args
, **kwargs
)
8693 def GetDisabledBitmap(*args
, **kwargs
):
8694 """GetDisabledBitmap(self) -> Bitmap"""
8695 return _core_
.MenuItem_GetDisabledBitmap(*args
, **kwargs
)
8697 def SetMarginWidth(*args
, **kwargs
):
8698 """SetMarginWidth(self, int nWidth)"""
8699 return _core_
.MenuItem_SetMarginWidth(*args
, **kwargs
)
8701 def GetMarginWidth(*args
, **kwargs
):
8702 """GetMarginWidth(self) -> int"""
8703 return _core_
.MenuItem_GetMarginWidth(*args
, **kwargs
)
8705 def GetDefaultMarginWidth(*args
, **kwargs
):
8706 """GetDefaultMarginWidth() -> int"""
8707 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8709 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
8710 def IsOwnerDrawn(*args
, **kwargs
):
8711 """IsOwnerDrawn(self) -> bool"""
8712 return _core_
.MenuItem_IsOwnerDrawn(*args
, **kwargs
)
8714 def SetOwnerDrawn(*args
, **kwargs
):
8715 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8716 return _core_
.MenuItem_SetOwnerDrawn(*args
, **kwargs
)
8718 def ResetOwnerDrawn(*args
, **kwargs
):
8719 """ResetOwnerDrawn(self)"""
8720 return _core_
.MenuItem_ResetOwnerDrawn(*args
, **kwargs
)
8722 def SetBitmap(*args
, **kwargs
):
8723 """SetBitmap(self, Bitmap bitmap)"""
8724 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
8726 def GetBitmap(*args
, **kwargs
):
8727 """GetBitmap(self) -> Bitmap"""
8728 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
8731 class MenuItemPtr(MenuItem
):
8732 def __init__(self
, this
):
8734 if not hasattr(self
,"thisown"): self
.thisown
= 0
8735 self
.__class
__ = MenuItem
8736 _core_
.MenuItem_swigregister(MenuItemPtr
)
8738 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8739 """MenuItem_GetLabelFromText(String text) -> String"""
8740 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8742 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8743 """MenuItem_GetDefaultMarginWidth() -> int"""
8744 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8746 #---------------------------------------------------------------------------
8748 class Control(Window
):
8750 This is the base class for a control or 'widget'.
8752 A control is generally a small window which processes user input
8753 and/or displays one or more item of data.
8756 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8757 def __init__(self
, *args
, **kwargs
):
8759 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8760 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8761 String name=ControlNameStr) -> Control
8763 Create a Control. Normally you should only call this from a subclass'
8764 __init__ as a plain old wx.Control is not very useful.
8766 newobj
= _core_
.new_Control(*args
, **kwargs
)
8767 self
.this
= newobj
.this
8770 self
._setOORInfo
(self
)
8772 def Create(*args
, **kwargs
):
8774 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8775 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8776 String name=ControlNameStr) -> bool
8778 Do the 2nd phase and create the GUI control.
8780 return _core_
.Control_Create(*args
, **kwargs
)
8782 def Command(*args
, **kwargs
):
8784 Command(self, CommandEvent event)
8786 Simulates the effect of the user issuing a command to the item.
8788 :see: `wx.CommandEvent`
8791 return _core_
.Control_Command(*args
, **kwargs
)
8793 def GetLabel(*args
, **kwargs
):
8795 GetLabel(self) -> String
8797 Return a control's text.
8799 return _core_
.Control_GetLabel(*args
, **kwargs
)
8801 def SetLabel(*args
, **kwargs
):
8803 SetLabel(self, String label)
8805 Sets the item's text.
8807 return _core_
.Control_SetLabel(*args
, **kwargs
)
8809 def GetClassDefaultAttributes(*args
, **kwargs
):
8811 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8813 Get the default attributes for this class. This is useful if you want
8814 to use the same font or colour in your own control as in a standard
8815 control -- which is a much better idea than hard coding specific
8816 colours or fonts which might look completely out of place on the
8817 user's system, especially if it uses themes.
8819 The variant parameter is only relevant under Mac currently and is
8820 ignore under other platforms. Under Mac, it will change the size of
8821 the returned font. See `wx.Window.SetWindowVariant` for more about
8824 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8826 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
8828 class ControlPtr(Control
):
8829 def __init__(self
, this
):
8831 if not hasattr(self
,"thisown"): self
.thisown
= 0
8832 self
.__class
__ = Control
8833 _core_
.Control_swigregister(ControlPtr
)
8834 ControlNameStr
= cvar
.ControlNameStr
8836 def PreControl(*args
, **kwargs
):
8838 PreControl() -> Control
8840 Precreate a Control control for 2-phase creation
8842 val
= _core_
.new_PreControl(*args
, **kwargs
)
8846 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
8848 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8850 Get the default attributes for this class. This is useful if you want
8851 to use the same font or colour in your own control as in a standard
8852 control -- which is a much better idea than hard coding specific
8853 colours or fonts which might look completely out of place on the
8854 user's system, especially if it uses themes.
8856 The variant parameter is only relevant under Mac currently and is
8857 ignore under other platforms. Under Mac, it will change the size of
8858 the returned font. See `wx.Window.SetWindowVariant` for more about
8861 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8863 #---------------------------------------------------------------------------
8865 class ItemContainer(object):
8867 wx.ItemContainer defines an interface which is implemented by all
8868 controls which have string subitems, each of which may be selected,
8869 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8870 `wx.ComboBox` which implements an extended interface deriving from
8873 It defines the methods for accessing the control's items and although
8874 each of the derived classes implements them differently, they still
8875 all conform to the same interface.
8877 The items in a wx.ItemContainer have (non empty) string labels and,
8878 optionally, client data associated with them.
8881 def __init__(self
): raise RuntimeError, "No constructor defined"
8883 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8884 def Append(*args
, **kwargs
):
8886 Append(self, String item, PyObject clientData=None) -> int
8888 Adds the item to the control, associating the given data with the item
8889 if not None. The return value is the index of the newly added item
8890 which may be different from the last one if the control is sorted (e.g.
8891 has wx.LB_SORT or wx.CB_SORT style).
8893 return _core_
.ItemContainer_Append(*args
, **kwargs
)
8895 def AppendItems(*args
, **kwargs
):
8897 AppendItems(self, List strings)
8899 Apend several items at once to the control. Notice that calling this
8900 method may be much faster than appending the items one by one if you
8901 need to add a lot of items.
8903 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
8905 def Insert(*args
, **kwargs
):
8907 Insert(self, String item, int pos, PyObject clientData=None) -> int
8909 Insert an item into the control before the item at the ``pos`` index,
8910 optionally associating some data object with the item.
8912 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
8914 def Clear(*args
, **kwargs
):
8918 Removes all items from the control.
8920 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
8922 def Delete(*args
, **kwargs
):
8926 Deletes the item at the zero-based index 'n' from the control. Note
8927 that it is an error (signalled by a `wx.PyAssertionError` exception if
8928 enabled) to remove an item with the index negative or greater or equal
8929 than the number of items in the control.
8931 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
8933 def GetCount(*args
, **kwargs
):
8935 GetCount(self) -> int
8937 Returns the number of items in the control.
8939 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
8941 def IsEmpty(*args
, **kwargs
):
8943 IsEmpty(self) -> bool
8945 Returns True if the control is empty or False if it has some items.
8947 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
8949 def GetString(*args
, **kwargs
):
8951 GetString(self, int n) -> String
8953 Returns the label of the item with the given index.
8955 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
8957 def GetStrings(*args
, **kwargs
):
8958 """GetStrings(self) -> wxArrayString"""
8959 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
8961 def SetString(*args
, **kwargs
):
8963 SetString(self, int n, String s)
8965 Sets the label for the given item.
8967 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
8969 def FindString(*args
, **kwargs
):
8971 FindString(self, String s) -> int
8973 Finds an item whose label matches the given string. Returns the
8974 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8977 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
8979 def Select(*args
, **kwargs
):
8983 Sets the item at index 'n' to be the selected item.
8985 return _core_
.ItemContainer_Select(*args
, **kwargs
)
8987 SetSelection
= Select
8988 def GetSelection(*args
, **kwargs
):
8990 GetSelection(self) -> int
8992 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8995 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
8997 def GetStringSelection(*args
, **kwargs
):
8999 GetStringSelection(self) -> String
9001 Returns the label of the selected item or an empty string if no item
9004 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
9006 def GetClientData(*args
, **kwargs
):
9008 GetClientData(self, int n) -> PyObject
9010 Returns the client data associated with the given item, (if any.)
9012 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
9014 def SetClientData(*args
, **kwargs
):
9016 SetClientData(self, int n, PyObject clientData)
9018 Associate the given client data with the item at position n.
9020 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
9023 class ItemContainerPtr(ItemContainer
):
9024 def __init__(self
, this
):
9026 if not hasattr(self
,"thisown"): self
.thisown
= 0
9027 self
.__class
__ = ItemContainer
9028 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
9030 #---------------------------------------------------------------------------
9032 class ControlWithItems(Control
,ItemContainer
):
9034 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9035 wx.Control class, and is used for the base class of various controls
9038 def __init__(self
): raise RuntimeError, "No constructor defined"
9040 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9042 class ControlWithItemsPtr(ControlWithItems
):
9043 def __init__(self
, this
):
9045 if not hasattr(self
,"thisown"): self
.thisown
= 0
9046 self
.__class
__ = ControlWithItems
9047 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
9049 #---------------------------------------------------------------------------
9051 class SizerItem(Object
):
9053 The wx.SizerItem class is used to track the position, size and other
9054 attributes of each item managed by a `wx.Sizer`. In normal usage user
9055 code should never need to deal directly with a wx.SizerItem, but
9056 custom classes derived from `wx.PySizer` will probably need to use the
9057 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9059 :see: `wx.Sizer`, `wx.GBSizerItem`
9062 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9063 def __init__(self
, *args
, **kwargs
):
9065 __init__(self) -> SizerItem
9067 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9068 size will need to be set before this item can be used in a Sizer.
9070 You will probably never need to create a wx.SizerItem directly as they
9071 are created automatically when the sizer's Add, Insert or Prepend
9074 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9076 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
9077 self
.this
= newobj
.this
9080 def DeleteWindows(*args
, **kwargs
):
9084 Destroy the window or the windows in a subsizer, depending on the type
9087 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
9089 def DetachSizer(*args
, **kwargs
):
9093 Enable deleting the SizerItem without destroying the contained sizer.
9095 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
9097 def GetSize(*args
, **kwargs
):
9099 GetSize(self) -> Size
9101 Get the current size of the item, as set in the last Layout.
9103 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
9105 def CalcMin(*args
, **kwargs
):
9107 CalcMin(self) -> Size
9109 Calculates the minimum desired size for the item, including any space
9112 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
9114 def SetDimension(*args
, **kwargs
):
9116 SetDimension(self, Point pos, Size size)
9118 Set the position and size of the space allocated for this item by the
9119 sizer, and adjust the position and size of the item (window or
9120 subsizer) to be within that space taking alignment and borders into
9123 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
9125 def GetMinSize(*args
, **kwargs
):
9127 GetMinSize(self) -> Size
9129 Get the minimum size needed for the item.
9131 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
9133 def GetMinSizeWithBorder(*args
, **kwargs
):
9135 GetMinSizeWithBorder(self) -> Size
9137 Get the minimum size needed for the item with space for the borders
9140 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
9142 def SetInitSize(*args
, **kwargs
):
9143 """SetInitSize(self, int x, int y)"""
9144 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
9146 def SetRatioWH(*args
, **kwargs
):
9148 SetRatioWH(self, int width, int height)
9150 Set the ratio item attribute.
9152 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
9154 def SetRatioSize(*args
, **kwargs
):
9156 SetRatioSize(self, Size size)
9158 Set the ratio item attribute.
9160 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
9162 def SetRatio(*args
, **kwargs
):
9164 SetRatio(self, float ratio)
9166 Set the ratio item attribute.
9168 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
9170 def GetRatio(*args
, **kwargs
):
9172 GetRatio(self) -> float
9174 Set the ratio item attribute.
9176 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
9178 def GetRect(*args
, **kwargs
):
9180 GetRect(self) -> Rect
9182 Returns the rectangle that the sizer item should occupy
9184 return _core_
.SizerItem_GetRect(*args
, **kwargs
)
9186 def IsWindow(*args
, **kwargs
):
9188 IsWindow(self) -> bool
9190 Is this sizer item a window?
9192 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
9194 def IsSizer(*args
, **kwargs
):
9196 IsSizer(self) -> bool
9198 Is this sizer item a subsizer?
9200 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
9202 def IsSpacer(*args
, **kwargs
):
9204 IsSpacer(self) -> bool
9206 Is this sizer item a spacer?
9208 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
9210 def SetProportion(*args
, **kwargs
):
9212 SetProportion(self, int proportion)
9214 Set the proportion value for this item.
9216 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
9218 def GetProportion(*args
, **kwargs
):
9220 GetProportion(self) -> int
9222 Get the proportion value for this item.
9224 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
9226 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
9227 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
9228 def SetFlag(*args
, **kwargs
):
9230 SetFlag(self, int flag)
9232 Set the flag value for this item.
9234 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
9236 def GetFlag(*args
, **kwargs
):
9238 GetFlag(self) -> int
9240 Get the flag value for this item.
9242 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
9244 def SetBorder(*args
, **kwargs
):
9246 SetBorder(self, int border)
9248 Set the border value for this item.
9250 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
9252 def GetBorder(*args
, **kwargs
):
9254 GetBorder(self) -> int
9256 Get the border value for this item.
9258 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
9260 def GetWindow(*args
, **kwargs
):
9262 GetWindow(self) -> Window
9264 Get the window (if any) that is managed by this sizer item.
9266 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
9268 def SetWindow(*args
, **kwargs
):
9270 SetWindow(self, Window window)
9272 Set the window to be managed by this sizer item.
9274 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9276 def GetSizer(*args
, **kwargs
):
9278 GetSizer(self) -> Sizer
9280 Get the subsizer (if any) that is managed by this sizer item.
9282 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9284 def SetSizer(*args
, **kwargs
):
9286 SetSizer(self, Sizer sizer)
9288 Set the subsizer to be managed by this sizer item.
9290 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9292 def GetSpacer(*args
, **kwargs
):
9294 GetSpacer(self) -> Size
9296 Get the size of the spacer managed by this sizer item.
9298 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9300 def SetSpacer(*args
, **kwargs
):
9302 SetSpacer(self, Size size)
9304 Set the size of the spacer to be managed by this sizer item.
9306 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9308 def Show(*args
, **kwargs
):
9310 Show(self, bool show)
9312 Set the show item attribute, which sizers use to determine if the item
9313 is to be made part of the layout or not. If the item is tracking a
9314 window then it is shown or hidden as needed.
9316 return _core_
.SizerItem_Show(*args
, **kwargs
)
9318 def IsShown(*args
, **kwargs
):
9320 IsShown(self) -> bool
9322 Is the item to be shown in the layout?
9324 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
9326 def GetPosition(*args
, **kwargs
):
9328 GetPosition(self) -> Point
9330 Returns the current position of the item, as set in the last Layout.
9332 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
9334 def GetUserData(*args
, **kwargs
):
9336 GetUserData(self) -> PyObject
9338 Returns the userData associated with this sizer item, or None if there
9341 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
9344 class SizerItemPtr(SizerItem
):
9345 def __init__(self
, this
):
9347 if not hasattr(self
,"thisown"): self
.thisown
= 0
9348 self
.__class
__ = SizerItem
9349 _core_
.SizerItem_swigregister(SizerItemPtr
)
9351 def SizerItemWindow(*args
, **kwargs
):
9353 SizerItemWindow(Window window, int proportion, int flag, int border,
9354 PyObject userData=None) -> SizerItem
9356 Constructs a `wx.SizerItem` for tracking a window.
9358 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
9362 def SizerItemSpacer(*args
, **kwargs
):
9364 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9365 PyObject userData=None) -> SizerItem
9367 Constructs a `wx.SizerItem` for tracking a spacer.
9369 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
9373 def SizerItemSizer(*args
, **kwargs
):
9375 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9376 PyObject userData=None) -> SizerItem
9378 Constructs a `wx.SizerItem` for tracking a subsizer
9380 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
9384 class Sizer(Object
):
9386 wx.Sizer is the abstract base class used for laying out subwindows in
9387 a window. You cannot use wx.Sizer directly; instead, you will have to
9388 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9389 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9390 and `wx.GridBagSizer`.
9392 The concept implemented by sizers in wxWidgets is closely related to
9393 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9394 toolkit or the Qt toolkit. It is based upon the idea of the individual
9395 subwindows reporting their minimal required size and their ability to
9396 get stretched if the size of the parent window has changed. This will
9397 most often mean that the programmer does not set the original size of
9398 a dialog in the beginning, rather the dialog will assigned a sizer and
9399 this sizer will be queried about the recommended size. The sizer in
9400 turn will query its children, which can be normal windows or contorls,
9401 empty space or other sizers, so that a hierarchy of sizers can be
9402 constructed. Note that wxSizer does not derive from wxWindow and thus
9403 do not interfere with tab ordering and requires very little resources
9404 compared to a real window on screen.
9406 What makes sizers so well fitted for use in wxWidgets is the fact that
9407 every control reports its own minimal size and the algorithm can
9408 handle differences in font sizes or different window (dialog item)
9409 sizes on different platforms without problems. If for example the
9410 standard font as well as the overall design of Mac widgets requires
9411 more space than on Windows, then the initial size of a dialog using a
9412 sizer will automatically be bigger on Mac than on Windows.
9414 def __init__(self
): raise RuntimeError, "No constructor defined"
9416 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9417 def _setOORInfo(*args
, **kwargs
):
9418 """_setOORInfo(self, PyObject _self)"""
9419 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
9421 def Add(*args
, **kwargs
):
9423 Add(self, item, int proportion=0, int flag=0, int border=0,
9424 PyObject userData=None) -> wx.SizerItem
9426 Appends a child item to the sizer.
9428 return _core_
.Sizer_Add(*args
, **kwargs
)
9430 def Insert(*args
, **kwargs
):
9432 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9433 PyObject userData=None) -> wx.SizerItem
9435 Inserts a new item into the list of items managed by this sizer before
9436 the item at index *before*. See `Add` for a description of the parameters.
9438 return _core_
.Sizer_Insert(*args
, **kwargs
)
9440 def Prepend(*args
, **kwargs
):
9442 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9443 PyObject userData=None) -> wx.SizerItem
9445 Adds a new item to the begining of the list of sizer items managed by
9446 this sizer. See `Add` for a description of the parameters.
9448 return _core_
.Sizer_Prepend(*args
, **kwargs
)
9450 def Remove(*args
, **kwargs
):
9452 Remove(self, item) -> bool
9454 Removes an item from the sizer and destroys it. This method does not
9455 cause any layout or resizing to take place, call `Layout` to update
9456 the layout on screen after removing a child from the sizer. The
9457 *item* parameter can be either a window, a sizer, or the zero-based
9458 index of an item to remove. Returns True if the child item was found
9461 return _core_
.Sizer_Remove(*args
, **kwargs
)
9463 def Detach(*args
, **kwargs
):
9465 Detach(self, item) -> bool
9467 Detaches an item from the sizer without destroying it. This method
9468 does not cause any layout or resizing to take place, call `Layout` to
9469 do so. The *item* parameter can be either a window, a sizer, or the
9470 zero-based index of the item to be detached. Returns True if the child item
9471 was found and detached.
9473 return _core_
.Sizer_Detach(*args
, **kwargs
)
9475 def GetItem(*args
, **kwargs
):
9477 GetItem(self, item) -> wx.SizerItem
9479 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9480 parameter can be either a window, a sizer, or the zero-based index of
9481 the item to be detached.
9483 return _core_
.Sizer_GetItem(*args
, **kwargs
)
9485 def _SetItemMinSize(*args
, **kwargs
):
9486 """_SetItemMinSize(self, PyObject item, Size size)"""
9487 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
9489 def SetItemMinSize(self
, item
, *args
):
9491 SetItemMinSize(self, item, Size size)
9493 Sets the minimum size that will be allocated for an item in the sizer.
9494 The *item* parameter can be either a window, a sizer, or the
9495 zero-based index of the item. If a window or sizer is given then it
9496 will be searched for recursivly in subsizers if neccessary.
9499 # for backward compatibility accept separate width,height args too
9500 return self
._SetItemMinSize
(item
, args
)
9502 return self
._SetItemMinSize
(item
, args
[0])
9504 def AddItem(*args
, **kwargs
):
9506 AddItem(self, SizerItem item)
9508 Adds a `wx.SizerItem` to the sizer.
9510 return _core_
.Sizer_AddItem(*args
, **kwargs
)
9512 def InsertItem(*args
, **kwargs
):
9514 InsertItem(self, int index, SizerItem item)
9516 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9518 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
9520 def PrependItem(*args
, **kwargs
):
9522 PrependItem(self, SizerItem item)
9524 Prepends a `wx.SizerItem` to the sizer.
9526 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
9528 def AddMany(self
, items
):
9530 AddMany is a convenience method for adding several items
9531 to a sizer at one time. Simply pass it a list of tuples,
9532 where each tuple consists of the parameters that you
9533 would normally pass to the `Add` method.
9536 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
9540 # for backwards compatibility only, please do not use in new code
9541 AddWindow
= wx
._deprecated
(Add
, "AddWindow is deprecated, use `Add` instead.")
9542 AddSizer
= wx
._deprecated
(Add
, "AddSizer is deprecated, use `Add` instead.")
9543 AddSpacer
= wx
._deprecated
(Add
, "AddSpacer is deprecated, use `Add` instead.")
9544 PrependWindow
= wx
._deprecated
(Prepend
, "PrependWindow is deprecated, use `Prepend` instead.")
9545 PrependSizer
= wx
._deprecated
(Prepend
, "PrependSizer is deprecated, use `Prepend` instead.")
9546 PrependSpacer
= wx
._deprecated
(Prepend
, "PrependSpacer is deprecated, use `Prepend` instead.")
9547 InsertWindow
= wx
._deprecated
(Insert
, "InsertWindow is deprecated, use `Insert` instead.")
9548 InsertSizer
= wx
._deprecated
(Insert
, "InsertSizer is deprecated, use `Insert` instead.")
9549 InsertSpacer
= wx
._deprecated
(Insert
, "InsertSpacer is deprecated, use `Insert` instead.")
9550 RemoveWindow
= wx
._deprecated
(Remove
, "RemoveWindow is deprecated, use `Remove` instead.")
9551 RemoveSizer
= wx
._deprecated
(Remove
, "RemoveSizer is deprecated, use `Remove` instead.")
9552 RemovePos
= wx
._deprecated
(Remove
, "RemovePos is deprecated, use `Remove` instead.")
9555 def SetDimension(*args
, **kwargs
):
9557 SetDimension(self, int x, int y, int width, int height)
9559 Call this to force the sizer to take the given dimension and thus
9560 force the items owned by the sizer to resize themselves according to
9561 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9564 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
9566 def SetMinSize(*args
, **kwargs
):
9568 SetMinSize(self, Size size)
9570 Call this to give the sizer a minimal size. Normally, the sizer will
9571 calculate its minimal size based purely on how much space its children
9572 need. After calling this method `GetMinSize` will return either the
9573 minimal size as requested by its children or the minimal size set
9574 here, depending on which is bigger.
9576 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
9578 def GetSize(*args
, **kwargs
):
9580 GetSize(self) -> Size
9582 Returns the current size of the space managed by the sizer.
9584 return _core_
.Sizer_GetSize(*args
, **kwargs
)
9586 def GetPosition(*args
, **kwargs
):
9588 GetPosition(self) -> Point
9590 Returns the current position of the sizer's managed space.
9592 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
9594 def GetMinSize(*args
, **kwargs
):
9596 GetMinSize(self) -> Size
9598 Returns the minimal size of the sizer. This is either the combined
9599 minimal size of all the children and their borders or the minimal size
9600 set by SetMinSize, depending on which is bigger.
9602 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
9604 def GetSizeTuple(self
):
9605 return self
.GetSize().Get()
9606 def GetPositionTuple(self
):
9607 return self
.GetPosition().Get()
9608 def GetMinSizeTuple(self
):
9609 return self
.GetMinSize().Get()
9611 def RecalcSizes(*args
, **kwargs
):
9615 Using the sizes calculated by `CalcMin` reposition and resize all the
9616 items managed by this sizer. You should not need to call this directly as
9617 it is called by `Layout`.
9619 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
9621 def CalcMin(*args
, **kwargs
):
9623 CalcMin(self) -> Size
9625 This method is where the sizer will do the actual calculation of its
9626 children's minimal sizes. You should not need to call this directly as
9627 it is called by `Layout`.
9629 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
9631 def Layout(*args
, **kwargs
):
9635 This method will force the recalculation and layout of the items
9636 controlled by the sizer using the current space allocated to the
9637 sizer. Normally this is called automatically from the owning window's
9638 EVT_SIZE handler, but it is also useful to call it from user code when
9639 one of the items in a sizer change size, or items are added or
9642 return _core_
.Sizer_Layout(*args
, **kwargs
)
9644 def Fit(*args
, **kwargs
):
9646 Fit(self, Window window) -> Size
9648 Tell the sizer to resize the *window* to match the sizer's minimal
9649 size. This is commonly done in the constructor of the window itself in
9650 order to set its initial size to match the needs of the children as
9651 determined by the sizer. Returns the new size.
9653 For a top level window this is the total window size, not the client size.
9655 return _core_
.Sizer_Fit(*args
, **kwargs
)
9657 def FitInside(*args
, **kwargs
):
9659 FitInside(self, Window window)
9661 Tell the sizer to resize the *virtual size* of the *window* to match the
9662 sizer's minimal size. This will not alter the on screen size of the
9663 window, but may cause the addition/removal/alteration of scrollbars
9664 required to view the virtual area in windows which manage it.
9666 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9669 return _core_
.Sizer_FitInside(*args
, **kwargs
)
9671 def SetSizeHints(*args
, **kwargs
):
9673 SetSizeHints(self, Window window)
9675 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9676 match the sizer's minimal size. This is commonly done in the
9677 constructor of the window itself if the window is resizable (as are
9678 many dialogs under Unix and frames on probably all platforms) in order
9679 to prevent the window from being sized smaller than the minimal size
9680 required by the sizer.
9682 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
9684 def SetVirtualSizeHints(*args
, **kwargs
):
9686 SetVirtualSizeHints(self, Window window)
9688 Tell the sizer to set the minimal size of the window virtual area to
9689 match the sizer's minimal size. For windows with managed scrollbars
9690 this will set them appropriately.
9692 :see: `wx.ScrolledWindow.SetScrollbars`
9695 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
9697 def Clear(*args
, **kwargs
):
9699 Clear(self, bool deleteWindows=False)
9701 Clear all items from the sizer, optionally destroying the window items
9704 return _core_
.Sizer_Clear(*args
, **kwargs
)
9706 def DeleteWindows(*args
, **kwargs
):
9710 Destroy all windows managed by the sizer.
9712 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
9714 def GetChildren(*args
, **kwargs
):
9716 GetChildren(self) -> list
9718 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9720 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
9722 def Show(*args
, **kwargs
):
9724 Show(self, item, bool show=True, bool recursive=false) -> bool
9726 Shows or hides an item managed by the sizer. To make a sizer item
9727 disappear or reappear, use Show followed by `Layout`. The *item*
9728 parameter can be either a window, a sizer, or the zero-based index of
9729 the item. Use the recursive parameter to show or hide an item in a
9730 subsizer. Returns True if the item was found.
9732 return _core_
.Sizer_Show(*args
, **kwargs
)
9734 def IsShown(*args
, **kwargs
):
9738 Determines if the item is currently shown. sizer. To make a sizer
9739 item disappear or reappear, use Show followed by `Layout`. The *item*
9740 parameter can be either a window, a sizer, or the zero-based index of
9743 return _core_
.Sizer_IsShown(*args
, **kwargs
)
9745 def Hide(self
, item
, recursive
=False):
9747 A convenience method for Show(item, False, recursive).
9749 return self
.Show(item
, False, recursive
)
9751 def ShowItems(*args
, **kwargs
):
9753 ShowItems(self, bool show)
9755 Recursively call `wx.SizerItem.Show` on all sizer items.
9757 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
9760 class SizerPtr(Sizer
):
9761 def __init__(self
, this
):
9763 if not hasattr(self
,"thisown"): self
.thisown
= 0
9764 self
.__class
__ = Sizer
9765 _core_
.Sizer_swigregister(SizerPtr
)
9767 class PySizer(Sizer
):
9769 wx.PySizer is a special version of `wx.Sizer` that has been
9770 instrumented to allow the C++ virtual methods to be overloaded in
9771 Python derived classes. You would derive from this class if you are
9772 wanting to implement a custom sizer in Python code. Simply implement
9773 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9776 class MySizer(wx.PySizer):
9778 wx.PySizer.__init__(self)
9781 for item in self.GetChildren():
9782 # calculate the total minimum width and height needed
9783 # by all items in the sizer according to this sizer's
9786 return wx.Size(width, height)
9788 def RecalcSizes(self):
9789 # find the space allotted to this sizer
9790 pos = self.GetPosition()
9791 size = self.GetSize()
9792 for item in self.GetChildren():
9793 # Recalculate (if necessary) the position and size of
9794 # each item and then call item.SetDimension to do the
9795 # actual positioning and sizing of the items within the
9796 # space alloted to this sizer.
9798 item.SetDimension(itemPos, itemSize)
9801 When `Layout` is called it first calls `CalcMin` followed by
9802 `RecalcSizes` so you can optimize a bit by saving the results of
9803 `CalcMin` and reusing them in `RecalcSizes`.
9805 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9810 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9811 def __init__(self
, *args
, **kwargs
):
9813 __init__(self) -> PySizer
9815 Creates a wx.PySizer. Must be called from the __init__ in the derived
9818 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
9819 self
.this
= newobj
.this
9822 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
9824 def _setCallbackInfo(*args
, **kwargs
):
9825 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9826 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
9829 class PySizerPtr(PySizer
):
9830 def __init__(self
, this
):
9832 if not hasattr(self
,"thisown"): self
.thisown
= 0
9833 self
.__class
__ = PySizer
9834 _core_
.PySizer_swigregister(PySizerPtr
)
9836 #---------------------------------------------------------------------------
9838 class BoxSizer(Sizer
):
9840 The basic idea behind a box sizer is that windows will most often be
9841 laid out in rather simple basic geometry, typically in a row or a
9842 column or nested hierarchies of either. A wx.BoxSizer will lay out
9843 its items in a simple row or column, depending on the orientation
9844 parameter passed to the constructor.
9847 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9848 def __init__(self
, *args
, **kwargs
):
9850 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9852 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9853 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9856 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
9857 self
.this
= newobj
.this
9860 self
._setOORInfo
(self
)
9862 def GetOrientation(*args
, **kwargs
):
9864 GetOrientation(self) -> int
9866 Returns the current orientation of the sizer.
9868 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
9870 def SetOrientation(*args
, **kwargs
):
9872 SetOrientation(self, int orient)
9874 Resets the orientation of the sizer.
9876 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
9879 class BoxSizerPtr(BoxSizer
):
9880 def __init__(self
, this
):
9882 if not hasattr(self
,"thisown"): self
.thisown
= 0
9883 self
.__class
__ = BoxSizer
9884 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
9886 #---------------------------------------------------------------------------
9888 class StaticBoxSizer(BoxSizer
):
9890 wx.StaticBoxSizer derives from and functions identically to the
9891 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9892 manages. Note that this static box must be created separately and
9893 passed to the sizer constructor.
9896 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9897 def __init__(self
, *args
, **kwargs
):
9899 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9901 Constructor. It takes an associated static box and the orientation
9902 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9905 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
9906 self
.this
= newobj
.this
9909 self
._setOORInfo
(self
)
9911 def GetStaticBox(*args
, **kwargs
):
9913 GetStaticBox(self) -> StaticBox
9915 Returns the static box associated with this sizer.
9917 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
9920 class StaticBoxSizerPtr(StaticBoxSizer
):
9921 def __init__(self
, this
):
9923 if not hasattr(self
,"thisown"): self
.thisown
= 0
9924 self
.__class
__ = StaticBoxSizer
9925 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
9927 #---------------------------------------------------------------------------
9929 class GridSizer(Sizer
):
9931 A grid sizer is a sizer which lays out its children in a
9932 two-dimensional table with all cells having the same size. In other
9933 words, the width of each cell within the grid is the width of the
9934 widest item added to the sizer and the height of each grid cell is the
9935 height of the tallest item. An optional vertical and/or horizontal
9936 gap between items can also be specified (in pixels.)
9938 Items are placed in the cells of the grid in the order they are added,
9939 in row-major order. In other words, the first row is filled first,
9940 then the second, and so on until all items have been added. (If
9941 neccessary, additional rows will be added as items are added.) If you
9942 need to have greater control over the cells that items are placed in
9943 then use the `wx.GridBagSizer`.
9947 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9948 def __init__(self
, *args
, **kwargs
):
9950 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9952 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9953 of columns and rows in the sizer - if either of the parameters is
9954 zero, it will be calculated to from the total number of children in
9955 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9956 define extra space between all children.
9958 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
9959 self
.this
= newobj
.this
9962 self
._setOORInfo
(self
)
9964 def SetCols(*args
, **kwargs
):
9966 SetCols(self, int cols)
9968 Sets the number of columns in the sizer.
9970 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
9972 def SetRows(*args
, **kwargs
):
9974 SetRows(self, int rows)
9976 Sets the number of rows in the sizer.
9978 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
9980 def SetVGap(*args
, **kwargs
):
9982 SetVGap(self, int gap)
9984 Sets the vertical gap (in pixels) between the cells in the sizer.
9986 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
9988 def SetHGap(*args
, **kwargs
):
9990 SetHGap(self, int gap)
9992 Sets the horizontal gap (in pixels) between cells in the sizer
9994 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
9996 def GetCols(*args
, **kwargs
):
9998 GetCols(self) -> int
10000 Returns the number of columns in the sizer.
10002 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
10004 def GetRows(*args
, **kwargs
):
10006 GetRows(self) -> int
10008 Returns the number of rows in the sizer.
10010 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
10012 def GetVGap(*args
, **kwargs
):
10014 GetVGap(self) -> int
10016 Returns the vertical gap (in pixels) between the cells in the sizer.
10018 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
10020 def GetHGap(*args
, **kwargs
):
10022 GetHGap(self) -> int
10024 Returns the horizontal gap (in pixels) between cells in the sizer.
10026 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
10029 class GridSizerPtr(GridSizer
):
10030 def __init__(self
, this
):
10032 if not hasattr(self
,"thisown"): self
.thisown
= 0
10033 self
.__class
__ = GridSizer
10034 _core_
.GridSizer_swigregister(GridSizerPtr
)
10036 #---------------------------------------------------------------------------
10038 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
10039 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
10040 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
10041 class FlexGridSizer(GridSizer
):
10043 A flex grid sizer is a sizer which lays out its children in a
10044 two-dimensional table with all table cells in one row having the same
10045 height and all cells in one column having the same width, but all
10046 rows or all columns are not necessarily the same height or width as in
10047 the `wx.GridSizer`.
10049 wx.FlexGridSizer can also size items equally in one direction but
10050 unequally ("flexibly") in the other. If the sizer is only flexible
10051 in one direction (this can be changed using `SetFlexibleDirection`), it
10052 needs to be decided how the sizer should grow in the other ("non
10053 flexible") direction in order to fill the available space. The
10054 `SetNonFlexibleGrowMode` method serves this purpose.
10058 def __repr__(self
):
10059 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10060 def __init__(self
, *args
, **kwargs
):
10062 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10064 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10065 number of columns and rows in the sizer - if either of the parameters
10066 is zero, it will be calculated to from the total number of children in
10067 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10068 define extra space between all children.
10070 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
10071 self
.this
= newobj
.this
10074 self
._setOORInfo
(self
)
10076 def AddGrowableRow(*args
, **kwargs
):
10078 AddGrowableRow(self, size_t idx, int proportion=0)
10080 Specifies that row *idx* (starting from zero) should be grown if there
10081 is extra space available to the sizer.
10083 The *proportion* parameter has the same meaning as the stretch factor
10084 for the box sizers except that if all proportions are 0, then all
10085 columns are resized equally (instead of not being resized at all).
10087 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
10089 def RemoveGrowableRow(*args
, **kwargs
):
10091 RemoveGrowableRow(self, size_t idx)
10093 Specifies that row *idx* is no longer growable.
10095 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
10097 def AddGrowableCol(*args
, **kwargs
):
10099 AddGrowableCol(self, size_t idx, int proportion=0)
10101 Specifies that column *idx* (starting from zero) should be grown if
10102 there is extra space available to the sizer.
10104 The *proportion* parameter has the same meaning as the stretch factor
10105 for the box sizers except that if all proportions are 0, then all
10106 columns are resized equally (instead of not being resized at all).
10108 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
10110 def RemoveGrowableCol(*args
, **kwargs
):
10112 RemoveGrowableCol(self, size_t idx)
10114 Specifies that column *idx* is no longer growable.
10116 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
10118 def SetFlexibleDirection(*args
, **kwargs
):
10120 SetFlexibleDirection(self, int direction)
10122 Specifies whether the sizer should flexibly resize its columns, rows,
10123 or both. Argument *direction* can be one of the following values. Any
10124 other value is ignored.
10126 ============== =======================================
10127 wx.VERTICAL Rows are flexibly sized.
10128 wx.HORIZONTAL Columns are flexibly sized.
10129 wx.BOTH Both rows and columns are flexibly sized
10130 (this is the default value).
10131 ============== =======================================
10133 Note that this method does not trigger relayout.
10136 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
10138 def GetFlexibleDirection(*args
, **kwargs
):
10140 GetFlexibleDirection(self) -> int
10142 Returns a value that specifies whether the sizer
10143 flexibly resizes its columns, rows, or both (default).
10145 :see: `SetFlexibleDirection`
10147 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
10149 def SetNonFlexibleGrowMode(*args
, **kwargs
):
10151 SetNonFlexibleGrowMode(self, int mode)
10153 Specifies how the sizer should grow in the non-flexible direction if
10154 there is one (so `SetFlexibleDirection` must have been called
10155 previously). Argument *mode* can be one of the following values:
10157 ========================== =================================================
10158 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10159 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10160 `AddGrowableCol` and `AddGrowableRow`. In this
10161 case equal sizing applies to minimum sizes of
10162 columns or rows (this is the default value).
10163 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10164 the non flexible direction, whether they are
10165 growable or not in the flexbile direction.
10166 ========================== =================================================
10168 Note that this method does not trigger relayout.
10172 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
10174 def GetNonFlexibleGrowMode(*args
, **kwargs
):
10176 GetNonFlexibleGrowMode(self) -> int
10178 Returns the value that specifies how the sizer grows in the
10179 non-flexible direction if there is one.
10181 :see: `SetNonFlexibleGrowMode`
10183 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
10185 def GetRowHeights(*args
, **kwargs
):
10187 GetRowHeights(self) -> list
10189 Returns a list of integers representing the heights of each of the
10192 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
10194 def GetColWidths(*args
, **kwargs
):
10196 GetColWidths(self) -> list
10198 Returns a list of integers representing the widths of each of the
10199 columns in the sizer.
10201 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
10204 class FlexGridSizerPtr(FlexGridSizer
):
10205 def __init__(self
, this
):
10207 if not hasattr(self
,"thisown"): self
.thisown
= 0
10208 self
.__class
__ = FlexGridSizer
10209 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
10211 class StdDialogButtonSizer(BoxSizer
):
10213 A special sizer that knows how to order and position standard buttons
10214 in order to conform to the current platform's standards. You simply
10215 need to add each `wx.Button` to the sizer, and be sure to create the
10216 buttons using the standard ID's. Then call `Finalize` and the sizer
10217 will take care of the rest.
10220 def __repr__(self
):
10221 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10222 def __init__(self
, *args
, **kwargs
):
10223 """__init__(self) -> StdDialogButtonSizer"""
10224 newobj
= _core_
.new_StdDialogButtonSizer(*args
, **kwargs
)
10225 self
.this
= newobj
.this
10228 def AddButton(*args
, **kwargs
):
10230 AddButton(self, wxButton button)
10232 Use this to add the buttons to this sizer. Do not use the `Add`
10233 method in the base class.
10235 return _core_
.StdDialogButtonSizer_AddButton(*args
, **kwargs
)
10237 def Finalise(*args
, **kwargs
):
10241 This funciton needs to be called after all the buttons have been added
10242 to the sizer. It will reorder them and position them in a platform
10245 return _core_
.StdDialogButtonSizer_Finalise(*args
, **kwargs
)
10247 def SetAffirmativeButton(*args
, **kwargs
):
10248 """SetAffirmativeButton(self, wxButton button)"""
10249 return _core_
.StdDialogButtonSizer_SetAffirmativeButton(*args
, **kwargs
)
10251 def SetNegativeButton(*args
, **kwargs
):
10252 """SetNegativeButton(self, wxButton button)"""
10253 return _core_
.StdDialogButtonSizer_SetNegativeButton(*args
, **kwargs
)
10255 def SetCancelButton(*args
, **kwargs
):
10256 """SetCancelButton(self, wxButton button)"""
10257 return _core_
.StdDialogButtonSizer_SetCancelButton(*args
, **kwargs
)
10259 def GetAffirmativeButton(*args
, **kwargs
):
10260 """GetAffirmativeButton(self) -> wxButton"""
10261 return _core_
.StdDialogButtonSizer_GetAffirmativeButton(*args
, **kwargs
)
10263 def GetApplyButton(*args
, **kwargs
):
10264 """GetApplyButton(self) -> wxButton"""
10265 return _core_
.StdDialogButtonSizer_GetApplyButton(*args
, **kwargs
)
10267 def GetNegativeButton(*args
, **kwargs
):
10268 """GetNegativeButton(self) -> wxButton"""
10269 return _core_
.StdDialogButtonSizer_GetNegativeButton(*args
, **kwargs
)
10271 def GetCancelButton(*args
, **kwargs
):
10272 """GetCancelButton(self) -> wxButton"""
10273 return _core_
.StdDialogButtonSizer_GetCancelButton(*args
, **kwargs
)
10275 def GetHelpButton(*args
, **kwargs
):
10276 """GetHelpButton(self) -> wxButton"""
10277 return _core_
.StdDialogButtonSizer_GetHelpButton(*args
, **kwargs
)
10280 class StdDialogButtonSizerPtr(StdDialogButtonSizer
):
10281 def __init__(self
, this
):
10283 if not hasattr(self
,"thisown"): self
.thisown
= 0
10284 self
.__class
__ = StdDialogButtonSizer
10285 _core_
.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr
)
10287 #---------------------------------------------------------------------------
10289 class GBPosition(object):
10291 This class represents the position of an item in a virtual grid of
10292 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10293 typemaps that will automatically convert from a 2-element sequence of
10294 integers to a wx.GBPosition, so you can use the more pythonic
10295 representation of the position nearly transparently in Python code.
10297 def __repr__(self
):
10298 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10299 def __init__(self
, *args
, **kwargs
):
10301 __init__(self, int row=0, int col=0) -> GBPosition
10303 This class represents the position of an item in a virtual grid of
10304 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10305 typemaps that will automatically convert from a 2-element sequence of
10306 integers to a wx.GBPosition, so you can use the more pythonic
10307 representation of the position nearly transparently in Python code.
10309 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
10310 self
.this
= newobj
.this
10313 def GetRow(*args
, **kwargs
):
10314 """GetRow(self) -> int"""
10315 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
10317 def GetCol(*args
, **kwargs
):
10318 """GetCol(self) -> int"""
10319 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
10321 def SetRow(*args
, **kwargs
):
10322 """SetRow(self, int row)"""
10323 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
10325 def SetCol(*args
, **kwargs
):
10326 """SetCol(self, int col)"""
10327 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
10329 def __eq__(*args
, **kwargs
):
10330 """__eq__(self, GBPosition other) -> bool"""
10331 return _core_
.GBPosition___eq__(*args
, **kwargs
)
10333 def __ne__(*args
, **kwargs
):
10334 """__ne__(self, GBPosition other) -> bool"""
10335 return _core_
.GBPosition___ne__(*args
, **kwargs
)
10337 def Set(*args
, **kwargs
):
10338 """Set(self, int row=0, int col=0)"""
10339 return _core_
.GBPosition_Set(*args
, **kwargs
)
10341 def Get(*args
, **kwargs
):
10342 """Get(self) -> PyObject"""
10343 return _core_
.GBPosition_Get(*args
, **kwargs
)
10345 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10346 def __str__(self
): return str(self
.Get())
10347 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
10348 def __len__(self
): return len(self
.Get())
10349 def __getitem__(self
, index
): return self
.Get()[index
]
10350 def __setitem__(self
, index
, val
):
10351 if index
== 0: self
.SetRow(val
)
10352 elif index
== 1: self
.SetCol(val
)
10353 else: raise IndexError
10354 def __nonzero__(self
): return self
.Get() != (0,0)
10355 __safe_for_unpickling__
= True
10356 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
10358 row
= property(GetRow
, SetRow
)
10359 col
= property(GetCol
, SetCol
)
10362 class GBPositionPtr(GBPosition
):
10363 def __init__(self
, this
):
10365 if not hasattr(self
,"thisown"): self
.thisown
= 0
10366 self
.__class
__ = GBPosition
10367 _core_
.GBPosition_swigregister(GBPositionPtr
)
10369 class GBSpan(object):
10371 This class is used to hold the row and column spanning attributes of
10372 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10373 automatically convert from a 2-element sequence of integers to a
10374 wx.GBSpan, so you can use the more pythonic representation of the span
10375 nearly transparently in Python code.
10378 def __repr__(self
):
10379 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10380 def __init__(self
, *args
, **kwargs
):
10382 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10384 Construct a new wxGBSpan, optionally setting the rowspan and
10385 colspan. The default is (1,1). (Meaning that the item occupies one
10386 cell in each direction.
10388 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
10389 self
.this
= newobj
.this
10392 def GetRowspan(*args
, **kwargs
):
10393 """GetRowspan(self) -> int"""
10394 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
10396 def GetColspan(*args
, **kwargs
):
10397 """GetColspan(self) -> int"""
10398 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
10400 def SetRowspan(*args
, **kwargs
):
10401 """SetRowspan(self, int rowspan)"""
10402 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
10404 def SetColspan(*args
, **kwargs
):
10405 """SetColspan(self, int colspan)"""
10406 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
10408 def __eq__(*args
, **kwargs
):
10409 """__eq__(self, GBSpan other) -> bool"""
10410 return _core_
.GBSpan___eq__(*args
, **kwargs
)
10412 def __ne__(*args
, **kwargs
):
10413 """__ne__(self, GBSpan other) -> bool"""
10414 return _core_
.GBSpan___ne__(*args
, **kwargs
)
10416 def Set(*args
, **kwargs
):
10417 """Set(self, int rowspan=1, int colspan=1)"""
10418 return _core_
.GBSpan_Set(*args
, **kwargs
)
10420 def Get(*args
, **kwargs
):
10421 """Get(self) -> PyObject"""
10422 return _core_
.GBSpan_Get(*args
, **kwargs
)
10424 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10425 def __str__(self
): return str(self
.Get())
10426 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
10427 def __len__(self
): return len(self
.Get())
10428 def __getitem__(self
, index
): return self
.Get()[index
]
10429 def __setitem__(self
, index
, val
):
10430 if index
== 0: self
.SetRowspan(val
)
10431 elif index
== 1: self
.SetColspan(val
)
10432 else: raise IndexError
10433 def __nonzero__(self
): return self
.Get() != (0,0)
10434 __safe_for_unpickling__
= True
10435 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
10437 rowspan
= property(GetRowspan
, SetRowspan
)
10438 colspan
= property(GetColspan
, SetColspan
)
10441 class GBSpanPtr(GBSpan
):
10442 def __init__(self
, this
):
10444 if not hasattr(self
,"thisown"): self
.thisown
= 0
10445 self
.__class
__ = GBSpan
10446 _core_
.GBSpan_swigregister(GBSpanPtr
)
10448 class GBSizerItem(SizerItem
):
10450 The wx.GBSizerItem class is used to track the additional data about
10451 items in a `wx.GridBagSizer` such as the item's position in the grid
10452 and how many rows or columns it spans.
10455 def __repr__(self
):
10456 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10457 def __init__(self
, *args
, **kwargs
):
10459 __init__(self) -> GBSizerItem
10461 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10462 size will need to be set, as well as a position and span before this
10463 item can be used in a Sizer.
10465 You will probably never need to create a wx.GBSizerItem directly as they
10466 are created automatically when the sizer's Add method is called.
10468 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
10469 self
.this
= newobj
.this
10472 def GetPos(*args
, **kwargs
):
10474 GetPos(self) -> GBPosition
10476 Get the grid position of the item
10478 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
10480 def GetPosTuple(self
): return self
.GetPos().Get()
10481 def GetSpan(*args
, **kwargs
):
10483 GetSpan(self) -> GBSpan
10485 Get the row and column spanning of the item
10487 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
10489 def GetSpanTuple(self
): return self
.GetSpan().Get()
10490 def SetPos(*args
, **kwargs
):
10492 SetPos(self, GBPosition pos) -> bool
10494 If the item is already a member of a sizer then first ensure that
10495 there is no other item that would intersect with this one at the new
10496 position, then set the new position. Returns True if the change is
10497 successful and after the next Layout() the item will be moved.
10499 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
10501 def SetSpan(*args
, **kwargs
):
10503 SetSpan(self, GBSpan span) -> bool
10505 If the item is already a member of a sizer then first ensure that
10506 there is no other item that would intersect with this one with its new
10507 spanning size, then set the new spanning. Returns True if the change
10508 is successful and after the next Layout() the item will be resized.
10511 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
10513 def Intersects(*args
, **kwargs
):
10515 Intersects(self, GBSizerItem other) -> bool
10517 Returns True if this item and the other item instersect.
10519 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
10521 def IntersectsPos(*args
, **kwargs
):
10523 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10525 Returns True if the given pos/span would intersect with this item.
10527 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
10529 def GetEndPos(*args
, **kwargs
):
10531 GetEndPos(self) -> GBPosition
10533 Get the row and column of the endpoint of this item.
10535 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
10537 def GetGBSizer(*args
, **kwargs
):
10539 GetGBSizer(self) -> GridBagSizer
10541 Get the sizer this item is a member of.
10543 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
10545 def SetGBSizer(*args
, **kwargs
):
10547 SetGBSizer(self, GridBagSizer sizer)
10549 Set the sizer this item is a member of.
10551 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
10554 class GBSizerItemPtr(GBSizerItem
):
10555 def __init__(self
, this
):
10557 if not hasattr(self
,"thisown"): self
.thisown
= 0
10558 self
.__class
__ = GBSizerItem
10559 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
10560 DefaultSpan
= cvar
.DefaultSpan
10562 def GBSizerItemWindow(*args
, **kwargs
):
10564 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10565 int border, PyObject userData=None) -> GBSizerItem
10567 Construct a `wx.GBSizerItem` for a window.
10569 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
10573 def GBSizerItemSizer(*args
, **kwargs
):
10575 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10576 int border, PyObject userData=None) -> GBSizerItem
10578 Construct a `wx.GBSizerItem` for a sizer
10580 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
10584 def GBSizerItemSpacer(*args
, **kwargs
):
10586 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10587 int flag, int border, PyObject userData=None) -> GBSizerItem
10589 Construct a `wx.GBSizerItem` for a spacer.
10591 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
10595 class GridBagSizer(FlexGridSizer
):
10597 A `wx.Sizer` that can lay out items in a virtual grid like a
10598 `wx.FlexGridSizer` but in this case explicit positioning of the items
10599 is allowed using `wx.GBPosition`, and items can optionally span more
10600 than one row and/or column using `wx.GBSpan`. The total size of the
10601 virtual grid is determined by the largest row and column that items are
10602 positioned at, adjusted for spanning.
10605 def __repr__(self
):
10606 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10607 def __init__(self
, *args
, **kwargs
):
10609 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10611 Constructor, with optional parameters to specify the gap between the
10614 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
10615 self
.this
= newobj
.this
10618 self
._setOORInfo
(self
)
10620 def Add(*args
, **kwargs
):
10622 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10623 int border=0, userData=None) -> wx.GBSizerItem
10625 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10626 more than one row or column as specified with *span*. The remaining
10627 args behave similarly to `wx.Sizer.Add`.
10629 Returns True if the item was successfully placed at the given cell
10630 position, False if something was already there.
10633 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
10635 def AddItem(*args
, **kwargs
):
10637 Add(self, GBSizerItem item) -> wx.GBSizerItem
10639 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10640 the item was successfully placed at its given cell position, False if
10641 something was already there.
10643 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
10645 def GetCellSize(*args
, **kwargs
):
10647 GetCellSize(self, int row, int col) -> Size
10649 Get the size of the specified cell, including hgap and
10650 vgap. Only valid after a Layout.
10652 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
10654 def GetEmptyCellSize(*args
, **kwargs
):
10656 GetEmptyCellSize(self) -> Size
10658 Get the size used for cells in the grid with no item.
10660 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
10662 def SetEmptyCellSize(*args
, **kwargs
):
10664 SetEmptyCellSize(self, Size sz)
10666 Set the size used for cells in the grid with no item.
10668 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
10670 def GetItemPosition(*args
):
10672 GetItemPosition(self, item) -> GBPosition
10674 Get the grid position of the specified *item* where *item* is either a
10675 window or subsizer that is a member of this sizer, or a zero-based
10678 return _core_
.GridBagSizer_GetItemPosition(*args
)
10680 def SetItemPosition(*args
):
10682 SetItemPosition(self, item, GBPosition pos) -> bool
10684 Set the grid position of the specified *item* where *item* is either a
10685 window or subsizer that is a member of this sizer, or a zero-based
10686 index of an item. Returns True on success. If the move is not
10687 allowed (because an item is already there) then False is returned.
10690 return _core_
.GridBagSizer_SetItemPosition(*args
)
10692 def GetItemSpan(*args
):
10694 GetItemSpan(self, item) -> GBSpan
10696 Get the row/col spanning of the specified *item* where *item* is
10697 either a window or subsizer that is a member of this sizer, or a
10698 zero-based index of an item.
10700 return _core_
.GridBagSizer_GetItemSpan(*args
)
10702 def SetItemSpan(*args
):
10704 SetItemSpan(self, item, GBSpan span) -> bool
10706 Set the row/col spanning of the specified *item* where *item* is
10707 either a window or subsizer that is a member of this sizer, or a
10708 zero-based index of an item. Returns True on success. If the move is
10709 not allowed (because an item is already there) then False is returned.
10711 return _core_
.GridBagSizer_SetItemSpan(*args
)
10713 def FindItem(*args
):
10715 FindItem(self, item) -> GBSizerItem
10717 Find the sizer item for the given window or subsizer, returns None if
10718 not found. (non-recursive)
10720 return _core_
.GridBagSizer_FindItem(*args
)
10722 def FindItemAtPosition(*args
, **kwargs
):
10724 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10726 Return the sizer item for the given grid cell, or None if there is no
10727 item at that position. (non-recursive)
10729 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
10731 def FindItemAtPoint(*args
, **kwargs
):
10733 FindItemAtPoint(self, Point pt) -> GBSizerItem
10735 Return the sizer item located at the point given in *pt*, or None if
10736 there is no item at that point. The (x,y) coordinates in pt correspond
10737 to the client coordinates of the window using the sizer for
10738 layout. (non-recursive)
10740 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
10742 def CheckForIntersection(*args
, **kwargs
):
10744 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10746 Look at all items and see if any intersect (or would overlap) the
10747 given *item*. Returns True if so, False if there would be no overlap.
10748 If an *excludeItem* is given then it will not be checked for
10749 intersection, for example it may be the item we are checking the
10753 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
10755 def CheckForIntersectionPos(*args
, **kwargs
):
10757 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10759 Look at all items and see if any intersect (or would overlap) the
10760 given position and span. Returns True if so, False if there would be
10761 no overlap. If an *excludeItem* is given then it will not be checked
10762 for intersection, for example it may be the item we are checking the
10765 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
10768 class GridBagSizerPtr(GridBagSizer
):
10769 def __init__(self
, this
):
10771 if not hasattr(self
,"thisown"): self
.thisown
= 0
10772 self
.__class
__ = GridBagSizer
10773 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
10775 #---------------------------------------------------------------------------
10779 Right
= _core_
.Right
10780 Bottom
= _core_
.Bottom
10781 Width
= _core_
.Width
10782 Height
= _core_
.Height
10783 Centre
= _core_
.Centre
10784 Center
= _core_
.Center
10785 CentreX
= _core_
.CentreX
10786 CentreY
= _core_
.CentreY
10787 Unconstrained
= _core_
.Unconstrained
10789 PercentOf
= _core_
.PercentOf
10790 Above
= _core_
.Above
10791 Below
= _core_
.Below
10792 LeftOf
= _core_
.LeftOf
10793 RightOf
= _core_
.RightOf
10794 SameAs
= _core_
.SameAs
10795 Absolute
= _core_
.Absolute
10796 class IndividualLayoutConstraint(Object
):
10798 Objects of this class are stored in the `wx.LayoutConstraints` class as
10799 one of eight possible constraints that a window can be involved in.
10800 You will never need to create an instance of
10801 wx.IndividualLayoutConstraint, rather you should create a
10802 `wx.LayoutConstraints` instance and use the individual contstraints
10805 def __init__(self
): raise RuntimeError, "No constructor defined"
10806 def __repr__(self
):
10807 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10808 def Set(*args
, **kwargs
):
10810 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10812 Sets the properties of the constraint. Normally called by one of the
10813 convenience functions such as Above, RightOf, SameAs.
10815 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
10817 def LeftOf(*args
, **kwargs
):
10819 LeftOf(self, Window sibling, int marg=0)
10821 Constrains this edge to be to the left of the given window, with an
10822 optional margin. Implicitly, this is relative to the left edge of the
10825 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
10827 def RightOf(*args
, **kwargs
):
10829 RightOf(self, Window sibling, int marg=0)
10831 Constrains this edge to be to the right of the given window, with an
10832 optional margin. Implicitly, this is relative to the right edge of the
10835 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
10837 def Above(*args
, **kwargs
):
10839 Above(self, Window sibling, int marg=0)
10841 Constrains this edge to be above the given window, with an optional
10842 margin. Implicitly, this is relative to the top edge of the other
10845 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
10847 def Below(*args
, **kwargs
):
10849 Below(self, Window sibling, int marg=0)
10851 Constrains this edge to be below the given window, with an optional
10852 margin. Implicitly, this is relative to the bottom edge of the other
10855 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
10857 def SameAs(*args
, **kwargs
):
10859 SameAs(self, Window otherW, int edge, int marg=0)
10861 Constrains this edge or dimension to be to the same as the edge of the
10862 given window, with an optional margin.
10864 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
10866 def PercentOf(*args
, **kwargs
):
10868 PercentOf(self, Window otherW, int wh, int per)
10870 Constrains this edge or dimension to be to a percentage of the given
10871 window, with an optional margin.
10873 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
10875 def Absolute(*args
, **kwargs
):
10877 Absolute(self, int val)
10879 Constrains this edge or dimension to be the given absolute value.
10881 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
10883 def Unconstrained(*args
, **kwargs
):
10885 Unconstrained(self)
10887 Sets this edge or dimension to be unconstrained, that is, dependent on
10888 other edges and dimensions from which this value can be deduced.
10890 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
10892 def AsIs(*args
, **kwargs
):
10896 Sets this edge or constraint to be whatever the window's value is at
10897 the moment. If either of the width and height constraints are *as is*,
10898 the window will not be resized, but moved instead. This is important
10899 when considering panel items which are intended to have a default
10900 size, such as a button, which may take its size from the size of the
10903 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
10905 def GetOtherWindow(*args
, **kwargs
):
10906 """GetOtherWindow(self) -> Window"""
10907 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
10909 def GetMyEdge(*args
, **kwargs
):
10910 """GetMyEdge(self) -> int"""
10911 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
10913 def SetEdge(*args
, **kwargs
):
10914 """SetEdge(self, int which)"""
10915 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
10917 def SetValue(*args
, **kwargs
):
10918 """SetValue(self, int v)"""
10919 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
10921 def GetMargin(*args
, **kwargs
):
10922 """GetMargin(self) -> int"""
10923 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
10925 def SetMargin(*args
, **kwargs
):
10926 """SetMargin(self, int m)"""
10927 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
10929 def GetValue(*args
, **kwargs
):
10930 """GetValue(self) -> int"""
10931 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
10933 def GetPercent(*args
, **kwargs
):
10934 """GetPercent(self) -> int"""
10935 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
10937 def GetOtherEdge(*args
, **kwargs
):
10938 """GetOtherEdge(self) -> int"""
10939 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
10941 def GetDone(*args
, **kwargs
):
10942 """GetDone(self) -> bool"""
10943 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
10945 def SetDone(*args
, **kwargs
):
10946 """SetDone(self, bool d)"""
10947 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
10949 def GetRelationship(*args
, **kwargs
):
10950 """GetRelationship(self) -> int"""
10951 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
10953 def SetRelationship(*args
, **kwargs
):
10954 """SetRelationship(self, int r)"""
10955 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
10957 def ResetIfWin(*args
, **kwargs
):
10959 ResetIfWin(self, Window otherW) -> bool
10961 Reset constraint if it mentions otherWin
10963 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
10965 def SatisfyConstraint(*args
, **kwargs
):
10967 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10969 Try to satisfy constraint
10971 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
10973 def GetEdge(*args
, **kwargs
):
10975 GetEdge(self, int which, Window thisWin, Window other) -> int
10977 Get the value of this edge or dimension, or if this
10978 is not determinable, -1.
10980 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
10983 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
10984 def __init__(self
, this
):
10986 if not hasattr(self
,"thisown"): self
.thisown
= 0
10987 self
.__class
__ = IndividualLayoutConstraint
10988 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
10990 class LayoutConstraints(Object
):
10992 **Note:** constraints are now deprecated and you should use sizers
10995 Objects of this class can be associated with a window to define its
10996 layout constraints, with respect to siblings or its parent.
10998 The class consists of the following eight constraints of class
10999 wx.IndividualLayoutConstraint, some or all of which should be accessed
11000 directly to set the appropriate constraints.
11002 * left: represents the left hand edge of the window
11003 * right: represents the right hand edge of the window
11004 * top: represents the top edge of the window
11005 * bottom: represents the bottom edge of the window
11006 * width: represents the width of the window
11007 * height: represents the height of the window
11008 * centreX: represents the horizontal centre point of the window
11009 * centreY: represents the vertical centre point of the window
11011 Most constraints are initially set to have the relationship
11012 wxUnconstrained, which means that their values should be calculated by
11013 looking at known constraints. The exceptions are width and height,
11014 which are set to wxAsIs to ensure that if the user does not specify a
11015 constraint, the existing width and height will be used, to be
11016 compatible with panel items which often have take a default size. If
11017 the constraint is ``wx.AsIs``, the dimension will not be changed.
11019 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11022 def __repr__(self
):
11023 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11024 left
= property(_core_
.LayoutConstraints_left_get
)
11025 top
= property(_core_
.LayoutConstraints_top_get
)
11026 right
= property(_core_
.LayoutConstraints_right_get
)
11027 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
11028 width
= property(_core_
.LayoutConstraints_width_get
)
11029 height
= property(_core_
.LayoutConstraints_height_get
)
11030 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
11031 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
11032 def __init__(self
, *args
, **kwargs
):
11033 """__init__(self) -> LayoutConstraints"""
11034 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
11035 self
.this
= newobj
.this
11038 def SatisfyConstraints(*args
, **kwargs
):
11039 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11040 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
11042 def AreSatisfied(*args
, **kwargs
):
11043 """AreSatisfied(self) -> bool"""
11044 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
11047 class LayoutConstraintsPtr(LayoutConstraints
):
11048 def __init__(self
, this
):
11050 if not hasattr(self
,"thisown"): self
.thisown
= 0
11051 self
.__class
__ = LayoutConstraints
11052 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
11054 #----------------------------------------------------------------------------
11056 # Use Python's bool constants if available, make some if not
11060 __builtins__
.True = 1==1
11061 __builtins__
.False = 1==0
11062 def bool(value
): return not not value
11063 __builtins__
.bool = bool
11067 # workarounds for bad wxRTTI names
11068 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
11069 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
11070 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
11073 #----------------------------------------------------------------------------
11074 # Load version numbers from __version__... Ensure that major and minor
11075 # versions are the same for both wxPython and wxWidgets.
11077 from __version__
import *
11078 __version__
= VERSION_STRING
11080 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
11081 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
11082 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
11084 warnings
.warn("wxPython/wxWidgets release number mismatch")
11086 #----------------------------------------------------------------------------
11088 # Set the default string<-->unicode conversion encoding from the
11089 # locale. This encoding is used when string or unicode objects need
11090 # to be converted in order to pass them to wxWidgets. Please be aware
11091 # that the default encoding within the same locale may be slightly
11092 # different on different platforms. For example, please see
11093 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11094 # between the common latin/roman encodings.
11096 default
= locale
.getdefaultlocale()[1]
11098 wx
.SetDefaultPyEncoding(default
)
11102 #----------------------------------------------------------------------------
11104 class PyDeadObjectError(AttributeError):
11107 class _wxPyDeadObject(object):
11109 Instances of wx objects that are OOR capable will have their __class__
11110 changed to this class when the C++ object is deleted. This should help
11111 prevent crashes due to referencing a bogus C++ pointer.
11113 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11114 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11116 def __repr__(self
):
11117 if not hasattr(self
, "_name"):
11118 self
._name
= "[unknown]"
11119 return self
.reprStr
% self
._name
11121 def __getattr__(self
, *args
):
11122 if not hasattr(self
, "_name"):
11123 self
._name
= "[unknown]"
11124 raise PyDeadObjectError(self
.attrStr
% self
._name
)
11126 def __nonzero__(self
):
11131 class PyUnbornObjectError(AttributeError):
11134 class _wxPyUnbornObject(object):
11136 Some stock objects are created when the wx._core module is
11137 imported, but their C++ instance is not created until the wx.App
11138 object is created and initialized. These object instances will
11139 temporarily have their __class__ changed to this class so an
11140 exception will be raised if they are used before the C++ instance
11144 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11145 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
11147 def __repr__(self
):
11148 #if not hasattr(self, "_name"):
11149 # self._name = "[unknown]"
11150 return self
.reprStr
#% self._name
11152 def __getattr__(self
, *args
):
11153 #if not hasattr(self, "_name"):
11154 # self._name = "[unknown]"
11155 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
11157 def __nonzero__(self
):
11161 #----------------------------------------------------------------------------
11163 def CallAfter(callable, *args
, **kw
):
11165 Call the specified function after the current and pending event
11166 handlers have been completed. This is also good for making GUI
11167 method calls from non-GUI threads. Any extra positional or
11168 keyword args are passed on to the callable when it is called.
11170 :see: `wx.FutureCall`
11173 assert app
is not None, 'No wx.App created yet'
11175 if not hasattr(app
, "_CallAfterId"):
11176 app
._CallAfterId
= wx
.NewEventType()
11177 app
.Connect(-1, -1, app
._CallAfterId
,
11178 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
11180 evt
.SetEventType(app
._CallAfterId
)
11181 evt
.callable = callable
11184 wx
.PostEvent(app
, evt
)
11186 #----------------------------------------------------------------------------
11191 A convenience class for `wx.Timer`, that calls the given callable
11192 object once after the given amount of milliseconds, passing any
11193 positional or keyword args. The return value of the callable is
11194 availbale after it has been run with the `GetResult` method.
11196 If you don't need to get the return value or restart the timer
11197 then there is no need to hold a reference to this object. It will
11198 hold a reference to itself while the timer is running (the timer
11199 has a reference to self.Notify) but the cycle will be broken when
11200 the timer completes, automatically cleaning up the wx.FutureCall
11203 :see: `wx.CallAfter`
11205 def __init__(self
, millis
, callable, *args
, **kwargs
):
11206 self
.millis
= millis
11207 self
.callable = callable
11208 self
.SetArgs(*args
, **kwargs
)
11210 self
.running
= False
11211 self
.hasRun
= False
11220 def Start(self
, millis
=None, *args
, **kwargs
):
11222 (Re)start the timer
11224 self
.hasRun
= False
11225 if millis
is not None:
11226 self
.millis
= millis
11228 self
.SetArgs(*args
, **kwargs
)
11230 self
.timer
= wx
.PyTimer(self
.Notify
)
11231 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
11232 self
.running
= True
11238 Stop and destroy the timer.
11240 if self
.timer
is not None:
11245 def GetInterval(self
):
11246 if self
.timer
is not None:
11247 return self
.timer
.GetInterval()
11252 def IsRunning(self
):
11253 return self
.timer
is not None and self
.timer
.IsRunning()
11256 def SetArgs(self
, *args
, **kwargs
):
11258 (Re)set the args passed to the callable object. This is
11259 useful in conjunction with Restart if you want to schedule a
11260 new call to the same callable object but with different
11264 self
.kwargs
= kwargs
11270 def GetResult(self
):
11275 The timer has expired so call the callable.
11277 if self
.callable and getattr(self
.callable, 'im_self', True):
11279 self
.running
= False
11280 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
11282 if not self
.running
:
11283 # if it wasn't restarted, then cleanup
11284 wx
.CallAfter(self
.Stop
)
11288 #----------------------------------------------------------------------------
11289 # Control which items in this module should be documented by epydoc.
11290 # We allow only classes and functions, which will help reduce the size
11291 # of the docs by filtering out the zillions of constants, EVT objects,
11292 # and etc that don't make much sense by themselves, but are instead
11293 # documented (or will be) as part of the classes/functions/methods
11294 # where they should be used.
11298 A filter for epydoc that only allows non-Ptr classes and
11299 fucntions, in order to reduce the clutter in the API docs.
11301 def __init__(self
, globals):
11302 self
._globals
= globals
11304 def __call__(self
, name
):
11306 obj
= self
._globals
.get(name
, None)
11307 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
11309 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
11313 #----------------------------------------------------------------------------
11314 #----------------------------------------------------------------------------
11316 # Import other modules in this package that should show up in the
11317 # "core" wx namespace
11319 from _windows
import *
11320 from _controls
import *
11321 from _misc
import *
11324 # Fixup the stock objects since they can't be used yet. (They will be
11325 # restored in wx.PyApp.OnInit.)
11326 _core_
._wxPyFixStockObjects
()
11328 #----------------------------------------------------------------------------
11329 #----------------------------------------------------------------------------