1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
6 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
8 if isinstance(value
, class_type
):
9 self
.__dict
__[name
] = value
.this
10 if hasattr(value
,"thisown"): self
.__dict
__["thisown"] = value
.thisown
13 method
= class_type
.__swig
_setmethods
__.get(name
,None)
14 if method
: return method(self
,value
)
15 if (not static
) or hasattr(self
,name
) or (name
== "thisown"):
16 self
.__dict
__[name
] = value
18 raise AttributeError("You cannot add attributes to %s" % self
)
20 def _swig_setattr(self
,class_type
,name
,value
):
21 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
23 def _swig_getattr(self
,class_type
,name
):
24 method
= class_type
.__swig
_getmethods
__.get(name
,None)
25 if method
: return method(self
)
26 raise AttributeError,name
30 _object
= types
.ObjectType
32 except AttributeError:
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self
,name
,value
):
40 if hasattr(self
,name
) or (name
in ("this", "thisown")):
43 raise AttributeError("You cannot add attributes to %s" % self
)
47 #// Give a reference to the dictionary of this module to the C++ extension
49 _core_
._wxPySetDictionary
(vars())
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
54 wx
= _sys
.modules
[__name__
]
57 #----------------------------------------------------------------------------
59 def _deprecated(callable, msg
=None):
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
65 msg
= "%s is deprecated" % callable
66 def deprecatedWrapper(*args
, **kwargs
):
68 warnings
.warn(msg
, DeprecationWarning, stacklevel
=2)
69 return callable(*args
, **kwargs
)
70 deprecatedWrapper
.__doc
__ = msg
71 return deprecatedWrapper
74 #----------------------------------------------------------------------------
76 NOT_FOUND
= _core_
.NOT_FOUND
77 VSCROLL
= _core_
.VSCROLL
78 HSCROLL
= _core_
.HSCROLL
79 CAPTION
= _core_
.CAPTION
80 DOUBLE_BORDER
= _core_
.DOUBLE_BORDER
81 SUNKEN_BORDER
= _core_
.SUNKEN_BORDER
82 RAISED_BORDER
= _core_
.RAISED_BORDER
83 BORDER
= _core_
.BORDER
84 SIMPLE_BORDER
= _core_
.SIMPLE_BORDER
85 STATIC_BORDER
= _core_
.STATIC_BORDER
86 TRANSPARENT_WINDOW
= _core_
.TRANSPARENT_WINDOW
87 NO_BORDER
= _core_
.NO_BORDER
88 TAB_TRAVERSAL
= _core_
.TAB_TRAVERSAL
89 WANTS_CHARS
= _core_
.WANTS_CHARS
90 POPUP_WINDOW
= _core_
.POPUP_WINDOW
91 CENTER_FRAME
= _core_
.CENTER_FRAME
92 CENTRE_ON_SCREEN
= _core_
.CENTRE_ON_SCREEN
93 CENTER_ON_SCREEN
= _core_
.CENTER_ON_SCREEN
94 CLIP_CHILDREN
= _core_
.CLIP_CHILDREN
95 CLIP_SIBLINGS
= _core_
.CLIP_SIBLINGS
96 ALWAYS_SHOW_SB
= _core_
.ALWAYS_SHOW_SB
97 RETAINED
= _core_
.RETAINED
98 BACKINGSTORE
= _core_
.BACKINGSTORE
99 COLOURED
= _core_
.COLOURED
100 FIXED_LENGTH
= _core_
.FIXED_LENGTH
101 LB_NEEDED_SB
= _core_
.LB_NEEDED_SB
102 LB_ALWAYS_SB
= _core_
.LB_ALWAYS_SB
103 LB_SORT
= _core_
.LB_SORT
104 LB_SINGLE
= _core_
.LB_SINGLE
105 LB_MULTIPLE
= _core_
.LB_MULTIPLE
106 LB_EXTENDED
= _core_
.LB_EXTENDED
107 LB_OWNERDRAW
= _core_
.LB_OWNERDRAW
108 LB_HSCROLL
= _core_
.LB_HSCROLL
109 PROCESS_ENTER
= _core_
.PROCESS_ENTER
110 PASSWORD
= _core_
.PASSWORD
111 CB_SIMPLE
= _core_
.CB_SIMPLE
112 CB_DROPDOWN
= _core_
.CB_DROPDOWN
113 CB_SORT
= _core_
.CB_SORT
114 CB_READONLY
= _core_
.CB_READONLY
115 RA_HORIZONTAL
= _core_
.RA_HORIZONTAL
116 RA_VERTICAL
= _core_
.RA_VERTICAL
117 RA_SPECIFY_ROWS
= _core_
.RA_SPECIFY_ROWS
118 RA_SPECIFY_COLS
= _core_
.RA_SPECIFY_COLS
119 RA_USE_CHECKBOX
= _core_
.RA_USE_CHECKBOX
120 RB_GROUP
= _core_
.RB_GROUP
121 RB_SINGLE
= _core_
.RB_SINGLE
122 SB_HORIZONTAL
= _core_
.SB_HORIZONTAL
123 SB_VERTICAL
= _core_
.SB_VERTICAL
124 RB_USE_CHECKBOX
= _core_
.RB_USE_CHECKBOX
125 ST_SIZEGRIP
= _core_
.ST_SIZEGRIP
126 ST_NO_AUTORESIZE
= _core_
.ST_NO_AUTORESIZE
127 FLOOD_SURFACE
= _core_
.FLOOD_SURFACE
128 FLOOD_BORDER
= _core_
.FLOOD_BORDER
129 ODDEVEN_RULE
= _core_
.ODDEVEN_RULE
130 WINDING_RULE
= _core_
.WINDING_RULE
131 TOOL_TOP
= _core_
.TOOL_TOP
132 TOOL_BOTTOM
= _core_
.TOOL_BOTTOM
133 TOOL_LEFT
= _core_
.TOOL_LEFT
134 TOOL_RIGHT
= _core_
.TOOL_RIGHT
136 YES_NO
= _core_
.YES_NO
137 CANCEL
= _core_
.CANCEL
140 NO_DEFAULT
= _core_
.NO_DEFAULT
141 YES_DEFAULT
= _core_
.YES_DEFAULT
142 ICON_EXCLAMATION
= _core_
.ICON_EXCLAMATION
143 ICON_HAND
= _core_
.ICON_HAND
144 ICON_QUESTION
= _core_
.ICON_QUESTION
145 ICON_INFORMATION
= _core_
.ICON_INFORMATION
146 ICON_STOP
= _core_
.ICON_STOP
147 ICON_ASTERISK
= _core_
.ICON_ASTERISK
148 ICON_MASK
= _core_
.ICON_MASK
149 ICON_WARNING
= _core_
.ICON_WARNING
150 ICON_ERROR
= _core_
.ICON_ERROR
151 FORWARD
= _core_
.FORWARD
152 BACKWARD
= _core_
.BACKWARD
157 SIZE_AUTO_WIDTH
= _core_
.SIZE_AUTO_WIDTH
158 SIZE_AUTO_HEIGHT
= _core_
.SIZE_AUTO_HEIGHT
159 SIZE_AUTO
= _core_
.SIZE_AUTO
160 SIZE_USE_EXISTING
= _core_
.SIZE_USE_EXISTING
161 SIZE_ALLOW_MINUS_ONE
= _core_
.SIZE_ALLOW_MINUS_ONE
162 PORTRAIT
= _core_
.PORTRAIT
163 LANDSCAPE
= _core_
.LANDSCAPE
164 PRINT_QUALITY_HIGH
= _core_
.PRINT_QUALITY_HIGH
165 PRINT_QUALITY_MEDIUM
= _core_
.PRINT_QUALITY_MEDIUM
166 PRINT_QUALITY_LOW
= _core_
.PRINT_QUALITY_LOW
167 PRINT_QUALITY_DRAFT
= _core_
.PRINT_QUALITY_DRAFT
168 ID_ANY
= _core_
.ID_ANY
169 ID_SEPARATOR
= _core_
.ID_SEPARATOR
170 ID_LOWEST
= _core_
.ID_LOWEST
171 ID_OPEN
= _core_
.ID_OPEN
172 ID_CLOSE
= _core_
.ID_CLOSE
173 ID_NEW
= _core_
.ID_NEW
174 ID_SAVE
= _core_
.ID_SAVE
175 ID_SAVEAS
= _core_
.ID_SAVEAS
176 ID_REVERT
= _core_
.ID_REVERT
177 ID_EXIT
= _core_
.ID_EXIT
178 ID_UNDO
= _core_
.ID_UNDO
179 ID_REDO
= _core_
.ID_REDO
180 ID_HELP
= _core_
.ID_HELP
181 ID_PRINT
= _core_
.ID_PRINT
182 ID_PRINT_SETUP
= _core_
.ID_PRINT_SETUP
183 ID_PREVIEW
= _core_
.ID_PREVIEW
184 ID_ABOUT
= _core_
.ID_ABOUT
185 ID_HELP_CONTENTS
= _core_
.ID_HELP_CONTENTS
186 ID_HELP_COMMANDS
= _core_
.ID_HELP_COMMANDS
187 ID_HELP_PROCEDURES
= _core_
.ID_HELP_PROCEDURES
188 ID_HELP_CONTEXT
= _core_
.ID_HELP_CONTEXT
189 ID_CLOSE_ALL
= _core_
.ID_CLOSE_ALL
190 ID_PREFERENCES
= _core_
.ID_PREFERENCES
191 ID_CUT
= _core_
.ID_CUT
192 ID_COPY
= _core_
.ID_COPY
193 ID_PASTE
= _core_
.ID_PASTE
194 ID_CLEAR
= _core_
.ID_CLEAR
195 ID_FIND
= _core_
.ID_FIND
196 ID_DUPLICATE
= _core_
.ID_DUPLICATE
197 ID_SELECTALL
= _core_
.ID_SELECTALL
198 ID_DELETE
= _core_
.ID_DELETE
199 ID_REPLACE
= _core_
.ID_REPLACE
200 ID_REPLACE_ALL
= _core_
.ID_REPLACE_ALL
201 ID_PROPERTIES
= _core_
.ID_PROPERTIES
202 ID_VIEW_DETAILS
= _core_
.ID_VIEW_DETAILS
203 ID_VIEW_LARGEICONS
= _core_
.ID_VIEW_LARGEICONS
204 ID_VIEW_SMALLICONS
= _core_
.ID_VIEW_SMALLICONS
205 ID_VIEW_LIST
= _core_
.ID_VIEW_LIST
206 ID_VIEW_SORTDATE
= _core_
.ID_VIEW_SORTDATE
207 ID_VIEW_SORTNAME
= _core_
.ID_VIEW_SORTNAME
208 ID_VIEW_SORTSIZE
= _core_
.ID_VIEW_SORTSIZE
209 ID_VIEW_SORTTYPE
= _core_
.ID_VIEW_SORTTYPE
210 ID_FILE1
= _core_
.ID_FILE1
211 ID_FILE2
= _core_
.ID_FILE2
212 ID_FILE3
= _core_
.ID_FILE3
213 ID_FILE4
= _core_
.ID_FILE4
214 ID_FILE5
= _core_
.ID_FILE5
215 ID_FILE6
= _core_
.ID_FILE6
216 ID_FILE7
= _core_
.ID_FILE7
217 ID_FILE8
= _core_
.ID_FILE8
218 ID_FILE9
= _core_
.ID_FILE9
220 ID_CANCEL
= _core_
.ID_CANCEL
221 ID_APPLY
= _core_
.ID_APPLY
222 ID_YES
= _core_
.ID_YES
224 ID_STATIC
= _core_
.ID_STATIC
225 ID_FORWARD
= _core_
.ID_FORWARD
226 ID_BACKWARD
= _core_
.ID_BACKWARD
227 ID_DEFAULT
= _core_
.ID_DEFAULT
228 ID_MORE
= _core_
.ID_MORE
229 ID_SETUP
= _core_
.ID_SETUP
230 ID_RESET
= _core_
.ID_RESET
231 ID_CONTEXT_HELP
= _core_
.ID_CONTEXT_HELP
232 ID_YESTOALL
= _core_
.ID_YESTOALL
233 ID_NOTOALL
= _core_
.ID_NOTOALL
234 ID_ABORT
= _core_
.ID_ABORT
235 ID_RETRY
= _core_
.ID_RETRY
236 ID_IGNORE
= _core_
.ID_IGNORE
237 ID_ADD
= _core_
.ID_ADD
238 ID_REMOVE
= _core_
.ID_REMOVE
240 ID_DOWN
= _core_
.ID_DOWN
241 ID_HOME
= _core_
.ID_HOME
242 ID_REFRESH
= _core_
.ID_REFRESH
243 ID_STOP
= _core_
.ID_STOP
244 ID_INDEX
= _core_
.ID_INDEX
245 ID_BOLD
= _core_
.ID_BOLD
246 ID_ITALIC
= _core_
.ID_ITALIC
247 ID_JUSTIFY_CENTER
= _core_
.ID_JUSTIFY_CENTER
248 ID_JUSTIFY_FILL
= _core_
.ID_JUSTIFY_FILL
249 ID_JUSTIFY_RIGHT
= _core_
.ID_JUSTIFY_RIGHT
250 ID_JUSTIFY_LEFT
= _core_
.ID_JUSTIFY_LEFT
251 ID_UNDERLINE
= _core_
.ID_UNDERLINE
252 ID_INDENT
= _core_
.ID_INDENT
253 ID_UNINDENT
= _core_
.ID_UNINDENT
254 ID_ZOOM_100
= _core_
.ID_ZOOM_100
255 ID_ZOOM_FIT
= _core_
.ID_ZOOM_FIT
256 ID_ZOOM_IN
= _core_
.ID_ZOOM_IN
257 ID_ZOOM_OUT
= _core_
.ID_ZOOM_OUT
258 ID_UNDELETE
= _core_
.ID_UNDELETE
259 ID_REVERT_TO_SAVED
= _core_
.ID_REVERT_TO_SAVED
260 ID_HIGHEST
= _core_
.ID_HIGHEST
263 HIDE_READONLY
= _core_
.HIDE_READONLY
264 OVERWRITE_PROMPT
= _core_
.OVERWRITE_PROMPT
265 FILE_MUST_EXIST
= _core_
.FILE_MUST_EXIST
266 MULTIPLE
= _core_
.MULTIPLE
267 CHANGE_DIR
= _core_
.CHANGE_DIR
268 ACCEL_ALT
= _core_
.ACCEL_ALT
269 ACCEL_CTRL
= _core_
.ACCEL_CTRL
270 ACCEL_SHIFT
= _core_
.ACCEL_SHIFT
271 ACCEL_NORMAL
= _core_
.ACCEL_NORMAL
272 PD_AUTO_HIDE
= _core_
.PD_AUTO_HIDE
273 PD_APP_MODAL
= _core_
.PD_APP_MODAL
274 PD_CAN_ABORT
= _core_
.PD_CAN_ABORT
275 PD_ELAPSED_TIME
= _core_
.PD_ELAPSED_TIME
276 PD_ESTIMATED_TIME
= _core_
.PD_ESTIMATED_TIME
277 PD_REMAINING_TIME
= _core_
.PD_REMAINING_TIME
278 PD_SMOOTH
= _core_
.PD_SMOOTH
279 PD_CAN_SKIP
= _core_
.PD_CAN_SKIP
280 DD_NEW_DIR_BUTTON
= _core_
.DD_NEW_DIR_BUTTON
281 DD_DEFAULT_STYLE
= _core_
.DD_DEFAULT_STYLE
282 MENU_TEAROFF
= _core_
.MENU_TEAROFF
283 MB_DOCKABLE
= _core_
.MB_DOCKABLE
284 NO_FULL_REPAINT_ON_RESIZE
= _core_
.NO_FULL_REPAINT_ON_RESIZE
285 FULL_REPAINT_ON_RESIZE
= _core_
.FULL_REPAINT_ON_RESIZE
286 LI_HORIZONTAL
= _core_
.LI_HORIZONTAL
287 LI_VERTICAL
= _core_
.LI_VERTICAL
288 WS_EX_VALIDATE_RECURSIVELY
= _core_
.WS_EX_VALIDATE_RECURSIVELY
289 WS_EX_BLOCK_EVENTS
= _core_
.WS_EX_BLOCK_EVENTS
290 WS_EX_TRANSIENT
= _core_
.WS_EX_TRANSIENT
291 WS_EX_THEMED_BACKGROUND
= _core_
.WS_EX_THEMED_BACKGROUND
292 WS_EX_PROCESS_IDLE
= _core_
.WS_EX_PROCESS_IDLE
293 WS_EX_PROCESS_UI_UPDATES
= _core_
.WS_EX_PROCESS_UI_UPDATES
294 MM_TEXT
= _core_
.MM_TEXT
295 MM_LOMETRIC
= _core_
.MM_LOMETRIC
296 MM_HIMETRIC
= _core_
.MM_HIMETRIC
297 MM_LOENGLISH
= _core_
.MM_LOENGLISH
298 MM_HIENGLISH
= _core_
.MM_HIENGLISH
299 MM_TWIPS
= _core_
.MM_TWIPS
300 MM_ISOTROPIC
= _core_
.MM_ISOTROPIC
301 MM_ANISOTROPIC
= _core_
.MM_ANISOTROPIC
302 MM_POINTS
= _core_
.MM_POINTS
303 MM_METRIC
= _core_
.MM_METRIC
304 CENTRE
= _core_
.CENTRE
305 CENTER
= _core_
.CENTER
306 HORIZONTAL
= _core_
.HORIZONTAL
307 VERTICAL
= _core_
.VERTICAL
314 BOTTOM
= _core_
.BOTTOM
320 ALIGN_NOT
= _core_
.ALIGN_NOT
321 ALIGN_CENTER_HORIZONTAL
= _core_
.ALIGN_CENTER_HORIZONTAL
322 ALIGN_CENTRE_HORIZONTAL
= _core_
.ALIGN_CENTRE_HORIZONTAL
323 ALIGN_LEFT
= _core_
.ALIGN_LEFT
324 ALIGN_TOP
= _core_
.ALIGN_TOP
325 ALIGN_RIGHT
= _core_
.ALIGN_RIGHT
326 ALIGN_BOTTOM
= _core_
.ALIGN_BOTTOM
327 ALIGN_CENTER_VERTICAL
= _core_
.ALIGN_CENTER_VERTICAL
328 ALIGN_CENTRE_VERTICAL
= _core_
.ALIGN_CENTRE_VERTICAL
329 ALIGN_CENTER
= _core_
.ALIGN_CENTER
330 ALIGN_CENTRE
= _core_
.ALIGN_CENTRE
331 ALIGN_MASK
= _core_
.ALIGN_MASK
332 STRETCH_NOT
= _core_
.STRETCH_NOT
333 SHRINK
= _core_
.SHRINK
335 EXPAND
= _core_
.EXPAND
336 SHAPED
= _core_
.SHAPED
337 FIXED_MINSIZE
= _core_
.FIXED_MINSIZE
339 ADJUST_MINSIZE
= _core_
.ADJUST_MINSIZE
340 BORDER_DEFAULT
= _core_
.BORDER_DEFAULT
341 BORDER_NONE
= _core_
.BORDER_NONE
342 BORDER_STATIC
= _core_
.BORDER_STATIC
343 BORDER_SIMPLE
= _core_
.BORDER_SIMPLE
344 BORDER_RAISED
= _core_
.BORDER_RAISED
345 BORDER_SUNKEN
= _core_
.BORDER_SUNKEN
346 BORDER_DOUBLE
= _core_
.BORDER_DOUBLE
347 BORDER_MASK
= _core_
.BORDER_MASK
348 BG_STYLE_SYSTEM
= _core_
.BG_STYLE_SYSTEM
349 BG_STYLE_COLOUR
= _core_
.BG_STYLE_COLOUR
350 BG_STYLE_CUSTOM
= _core_
.BG_STYLE_CUSTOM
351 DEFAULT
= _core_
.DEFAULT
352 DECORATIVE
= _core_
.DECORATIVE
354 SCRIPT
= _core_
.SCRIPT
356 MODERN
= _core_
.MODERN
357 TELETYPE
= _core_
.TELETYPE
358 VARIABLE
= _core_
.VARIABLE
360 NORMAL
= _core_
.NORMAL
363 ITALIC
= _core_
.ITALIC
367 LONG_DASH
= _core_
.LONG_DASH
368 SHORT_DASH
= _core_
.SHORT_DASH
369 DOT_DASH
= _core_
.DOT_DASH
370 USER_DASH
= _core_
.USER_DASH
371 TRANSPARENT
= _core_
.TRANSPARENT
372 STIPPLE
= _core_
.STIPPLE
373 BDIAGONAL_HATCH
= _core_
.BDIAGONAL_HATCH
374 CROSSDIAG_HATCH
= _core_
.CROSSDIAG_HATCH
375 FDIAGONAL_HATCH
= _core_
.FDIAGONAL_HATCH
376 CROSS_HATCH
= _core_
.CROSS_HATCH
377 HORIZONTAL_HATCH
= _core_
.HORIZONTAL_HATCH
378 VERTICAL_HATCH
= _core_
.VERTICAL_HATCH
379 JOIN_BEVEL
= _core_
.JOIN_BEVEL
380 JOIN_MITER
= _core_
.JOIN_MITER
381 JOIN_ROUND
= _core_
.JOIN_ROUND
382 CAP_ROUND
= _core_
.CAP_ROUND
383 CAP_PROJECTING
= _core_
.CAP_PROJECTING
384 CAP_BUTT
= _core_
.CAP_BUTT
387 INVERT
= _core_
.INVERT
388 OR_REVERSE
= _core_
.OR_REVERSE
389 AND_REVERSE
= _core_
.AND_REVERSE
392 AND_INVERT
= _core_
.AND_INVERT
396 SRC_INVERT
= _core_
.SRC_INVERT
397 OR_INVERT
= _core_
.OR_INVERT
401 WXK_BACK
= _core_
.WXK_BACK
402 WXK_TAB
= _core_
.WXK_TAB
403 WXK_RETURN
= _core_
.WXK_RETURN
404 WXK_ESCAPE
= _core_
.WXK_ESCAPE
405 WXK_SPACE
= _core_
.WXK_SPACE
406 WXK_DELETE
= _core_
.WXK_DELETE
407 WXK_START
= _core_
.WXK_START
408 WXK_LBUTTON
= _core_
.WXK_LBUTTON
409 WXK_RBUTTON
= _core_
.WXK_RBUTTON
410 WXK_CANCEL
= _core_
.WXK_CANCEL
411 WXK_MBUTTON
= _core_
.WXK_MBUTTON
412 WXK_CLEAR
= _core_
.WXK_CLEAR
413 WXK_SHIFT
= _core_
.WXK_SHIFT
414 WXK_ALT
= _core_
.WXK_ALT
415 WXK_CONTROL
= _core_
.WXK_CONTROL
416 WXK_MENU
= _core_
.WXK_MENU
417 WXK_PAUSE
= _core_
.WXK_PAUSE
418 WXK_CAPITAL
= _core_
.WXK_CAPITAL
419 WXK_PRIOR
= _core_
.WXK_PRIOR
420 WXK_NEXT
= _core_
.WXK_NEXT
421 WXK_END
= _core_
.WXK_END
422 WXK_HOME
= _core_
.WXK_HOME
423 WXK_LEFT
= _core_
.WXK_LEFT
424 WXK_UP
= _core_
.WXK_UP
425 WXK_RIGHT
= _core_
.WXK_RIGHT
426 WXK_DOWN
= _core_
.WXK_DOWN
427 WXK_SELECT
= _core_
.WXK_SELECT
428 WXK_PRINT
= _core_
.WXK_PRINT
429 WXK_EXECUTE
= _core_
.WXK_EXECUTE
430 WXK_SNAPSHOT
= _core_
.WXK_SNAPSHOT
431 WXK_INSERT
= _core_
.WXK_INSERT
432 WXK_HELP
= _core_
.WXK_HELP
433 WXK_NUMPAD0
= _core_
.WXK_NUMPAD0
434 WXK_NUMPAD1
= _core_
.WXK_NUMPAD1
435 WXK_NUMPAD2
= _core_
.WXK_NUMPAD2
436 WXK_NUMPAD3
= _core_
.WXK_NUMPAD3
437 WXK_NUMPAD4
= _core_
.WXK_NUMPAD4
438 WXK_NUMPAD5
= _core_
.WXK_NUMPAD5
439 WXK_NUMPAD6
= _core_
.WXK_NUMPAD6
440 WXK_NUMPAD7
= _core_
.WXK_NUMPAD7
441 WXK_NUMPAD8
= _core_
.WXK_NUMPAD8
442 WXK_NUMPAD9
= _core_
.WXK_NUMPAD9
443 WXK_MULTIPLY
= _core_
.WXK_MULTIPLY
444 WXK_ADD
= _core_
.WXK_ADD
445 WXK_SEPARATOR
= _core_
.WXK_SEPARATOR
446 WXK_SUBTRACT
= _core_
.WXK_SUBTRACT
447 WXK_DECIMAL
= _core_
.WXK_DECIMAL
448 WXK_DIVIDE
= _core_
.WXK_DIVIDE
449 WXK_F1
= _core_
.WXK_F1
450 WXK_F2
= _core_
.WXK_F2
451 WXK_F3
= _core_
.WXK_F3
452 WXK_F4
= _core_
.WXK_F4
453 WXK_F5
= _core_
.WXK_F5
454 WXK_F6
= _core_
.WXK_F6
455 WXK_F7
= _core_
.WXK_F7
456 WXK_F8
= _core_
.WXK_F8
457 WXK_F9
= _core_
.WXK_F9
458 WXK_F10
= _core_
.WXK_F10
459 WXK_F11
= _core_
.WXK_F11
460 WXK_F12
= _core_
.WXK_F12
461 WXK_F13
= _core_
.WXK_F13
462 WXK_F14
= _core_
.WXK_F14
463 WXK_F15
= _core_
.WXK_F15
464 WXK_F16
= _core_
.WXK_F16
465 WXK_F17
= _core_
.WXK_F17
466 WXK_F18
= _core_
.WXK_F18
467 WXK_F19
= _core_
.WXK_F19
468 WXK_F20
= _core_
.WXK_F20
469 WXK_F21
= _core_
.WXK_F21
470 WXK_F22
= _core_
.WXK_F22
471 WXK_F23
= _core_
.WXK_F23
472 WXK_F24
= _core_
.WXK_F24
473 WXK_NUMLOCK
= _core_
.WXK_NUMLOCK
474 WXK_SCROLL
= _core_
.WXK_SCROLL
475 WXK_PAGEUP
= _core_
.WXK_PAGEUP
476 WXK_PAGEDOWN
= _core_
.WXK_PAGEDOWN
477 WXK_NUMPAD_SPACE
= _core_
.WXK_NUMPAD_SPACE
478 WXK_NUMPAD_TAB
= _core_
.WXK_NUMPAD_TAB
479 WXK_NUMPAD_ENTER
= _core_
.WXK_NUMPAD_ENTER
480 WXK_NUMPAD_F1
= _core_
.WXK_NUMPAD_F1
481 WXK_NUMPAD_F2
= _core_
.WXK_NUMPAD_F2
482 WXK_NUMPAD_F3
= _core_
.WXK_NUMPAD_F3
483 WXK_NUMPAD_F4
= _core_
.WXK_NUMPAD_F4
484 WXK_NUMPAD_HOME
= _core_
.WXK_NUMPAD_HOME
485 WXK_NUMPAD_LEFT
= _core_
.WXK_NUMPAD_LEFT
486 WXK_NUMPAD_UP
= _core_
.WXK_NUMPAD_UP
487 WXK_NUMPAD_RIGHT
= _core_
.WXK_NUMPAD_RIGHT
488 WXK_NUMPAD_DOWN
= _core_
.WXK_NUMPAD_DOWN
489 WXK_NUMPAD_PRIOR
= _core_
.WXK_NUMPAD_PRIOR
490 WXK_NUMPAD_PAGEUP
= _core_
.WXK_NUMPAD_PAGEUP
491 WXK_NUMPAD_NEXT
= _core_
.WXK_NUMPAD_NEXT
492 WXK_NUMPAD_PAGEDOWN
= _core_
.WXK_NUMPAD_PAGEDOWN
493 WXK_NUMPAD_END
= _core_
.WXK_NUMPAD_END
494 WXK_NUMPAD_BEGIN
= _core_
.WXK_NUMPAD_BEGIN
495 WXK_NUMPAD_INSERT
= _core_
.WXK_NUMPAD_INSERT
496 WXK_NUMPAD_DELETE
= _core_
.WXK_NUMPAD_DELETE
497 WXK_NUMPAD_EQUAL
= _core_
.WXK_NUMPAD_EQUAL
498 WXK_NUMPAD_MULTIPLY
= _core_
.WXK_NUMPAD_MULTIPLY
499 WXK_NUMPAD_ADD
= _core_
.WXK_NUMPAD_ADD
500 WXK_NUMPAD_SEPARATOR
= _core_
.WXK_NUMPAD_SEPARATOR
501 WXK_NUMPAD_SUBTRACT
= _core_
.WXK_NUMPAD_SUBTRACT
502 WXK_NUMPAD_DECIMAL
= _core_
.WXK_NUMPAD_DECIMAL
503 WXK_NUMPAD_DIVIDE
= _core_
.WXK_NUMPAD_DIVIDE
504 WXK_WINDOWS_LEFT
= _core_
.WXK_WINDOWS_LEFT
505 WXK_WINDOWS_RIGHT
= _core_
.WXK_WINDOWS_RIGHT
506 WXK_WINDOWS_MENU
= _core_
.WXK_WINDOWS_MENU
507 WXK_COMMAND
= _core_
.WXK_COMMAND
508 WXK_SPECIAL1
= _core_
.WXK_SPECIAL1
509 WXK_SPECIAL2
= _core_
.WXK_SPECIAL2
510 WXK_SPECIAL3
= _core_
.WXK_SPECIAL3
511 WXK_SPECIAL4
= _core_
.WXK_SPECIAL4
512 WXK_SPECIAL5
= _core_
.WXK_SPECIAL5
513 WXK_SPECIAL6
= _core_
.WXK_SPECIAL6
514 WXK_SPECIAL7
= _core_
.WXK_SPECIAL7
515 WXK_SPECIAL8
= _core_
.WXK_SPECIAL8
516 WXK_SPECIAL9
= _core_
.WXK_SPECIAL9
517 WXK_SPECIAL10
= _core_
.WXK_SPECIAL10
518 WXK_SPECIAL11
= _core_
.WXK_SPECIAL11
519 WXK_SPECIAL12
= _core_
.WXK_SPECIAL12
520 WXK_SPECIAL13
= _core_
.WXK_SPECIAL13
521 WXK_SPECIAL14
= _core_
.WXK_SPECIAL14
522 WXK_SPECIAL15
= _core_
.WXK_SPECIAL15
523 WXK_SPECIAL16
= _core_
.WXK_SPECIAL16
524 WXK_SPECIAL17
= _core_
.WXK_SPECIAL17
525 WXK_SPECIAL18
= _core_
.WXK_SPECIAL18
526 WXK_SPECIAL19
= _core_
.WXK_SPECIAL19
527 WXK_SPECIAL20
= _core_
.WXK_SPECIAL20
528 PAPER_NONE
= _core_
.PAPER_NONE
529 PAPER_LETTER
= _core_
.PAPER_LETTER
530 PAPER_LEGAL
= _core_
.PAPER_LEGAL
531 PAPER_A4
= _core_
.PAPER_A4
532 PAPER_CSHEET
= _core_
.PAPER_CSHEET
533 PAPER_DSHEET
= _core_
.PAPER_DSHEET
534 PAPER_ESHEET
= _core_
.PAPER_ESHEET
535 PAPER_LETTERSMALL
= _core_
.PAPER_LETTERSMALL
536 PAPER_TABLOID
= _core_
.PAPER_TABLOID
537 PAPER_LEDGER
= _core_
.PAPER_LEDGER
538 PAPER_STATEMENT
= _core_
.PAPER_STATEMENT
539 PAPER_EXECUTIVE
= _core_
.PAPER_EXECUTIVE
540 PAPER_A3
= _core_
.PAPER_A3
541 PAPER_A4SMALL
= _core_
.PAPER_A4SMALL
542 PAPER_A5
= _core_
.PAPER_A5
543 PAPER_B4
= _core_
.PAPER_B4
544 PAPER_B5
= _core_
.PAPER_B5
545 PAPER_FOLIO
= _core_
.PAPER_FOLIO
546 PAPER_QUARTO
= _core_
.PAPER_QUARTO
547 PAPER_10X14
= _core_
.PAPER_10X14
548 PAPER_11X17
= _core_
.PAPER_11X17
549 PAPER_NOTE
= _core_
.PAPER_NOTE
550 PAPER_ENV_9
= _core_
.PAPER_ENV_9
551 PAPER_ENV_10
= _core_
.PAPER_ENV_10
552 PAPER_ENV_11
= _core_
.PAPER_ENV_11
553 PAPER_ENV_12
= _core_
.PAPER_ENV_12
554 PAPER_ENV_14
= _core_
.PAPER_ENV_14
555 PAPER_ENV_DL
= _core_
.PAPER_ENV_DL
556 PAPER_ENV_C5
= _core_
.PAPER_ENV_C5
557 PAPER_ENV_C3
= _core_
.PAPER_ENV_C3
558 PAPER_ENV_C4
= _core_
.PAPER_ENV_C4
559 PAPER_ENV_C6
= _core_
.PAPER_ENV_C6
560 PAPER_ENV_C65
= _core_
.PAPER_ENV_C65
561 PAPER_ENV_B4
= _core_
.PAPER_ENV_B4
562 PAPER_ENV_B5
= _core_
.PAPER_ENV_B5
563 PAPER_ENV_B6
= _core_
.PAPER_ENV_B6
564 PAPER_ENV_ITALY
= _core_
.PAPER_ENV_ITALY
565 PAPER_ENV_MONARCH
= _core_
.PAPER_ENV_MONARCH
566 PAPER_ENV_PERSONAL
= _core_
.PAPER_ENV_PERSONAL
567 PAPER_FANFOLD_US
= _core_
.PAPER_FANFOLD_US
568 PAPER_FANFOLD_STD_GERMAN
= _core_
.PAPER_FANFOLD_STD_GERMAN
569 PAPER_FANFOLD_LGL_GERMAN
= _core_
.PAPER_FANFOLD_LGL_GERMAN
570 PAPER_ISO_B4
= _core_
.PAPER_ISO_B4
571 PAPER_JAPANESE_POSTCARD
= _core_
.PAPER_JAPANESE_POSTCARD
572 PAPER_9X11
= _core_
.PAPER_9X11
573 PAPER_10X11
= _core_
.PAPER_10X11
574 PAPER_15X11
= _core_
.PAPER_15X11
575 PAPER_ENV_INVITE
= _core_
.PAPER_ENV_INVITE
576 PAPER_LETTER_EXTRA
= _core_
.PAPER_LETTER_EXTRA
577 PAPER_LEGAL_EXTRA
= _core_
.PAPER_LEGAL_EXTRA
578 PAPER_TABLOID_EXTRA
= _core_
.PAPER_TABLOID_EXTRA
579 PAPER_A4_EXTRA
= _core_
.PAPER_A4_EXTRA
580 PAPER_LETTER_TRANSVERSE
= _core_
.PAPER_LETTER_TRANSVERSE
581 PAPER_A4_TRANSVERSE
= _core_
.PAPER_A4_TRANSVERSE
582 PAPER_LETTER_EXTRA_TRANSVERSE
= _core_
.PAPER_LETTER_EXTRA_TRANSVERSE
583 PAPER_A_PLUS
= _core_
.PAPER_A_PLUS
584 PAPER_B_PLUS
= _core_
.PAPER_B_PLUS
585 PAPER_LETTER_PLUS
= _core_
.PAPER_LETTER_PLUS
586 PAPER_A4_PLUS
= _core_
.PAPER_A4_PLUS
587 PAPER_A5_TRANSVERSE
= _core_
.PAPER_A5_TRANSVERSE
588 PAPER_B5_TRANSVERSE
= _core_
.PAPER_B5_TRANSVERSE
589 PAPER_A3_EXTRA
= _core_
.PAPER_A3_EXTRA
590 PAPER_A5_EXTRA
= _core_
.PAPER_A5_EXTRA
591 PAPER_B5_EXTRA
= _core_
.PAPER_B5_EXTRA
592 PAPER_A2
= _core_
.PAPER_A2
593 PAPER_A3_TRANSVERSE
= _core_
.PAPER_A3_TRANSVERSE
594 PAPER_A3_EXTRA_TRANSVERSE
= _core_
.PAPER_A3_EXTRA_TRANSVERSE
595 DUPLEX_SIMPLEX
= _core_
.DUPLEX_SIMPLEX
596 DUPLEX_HORIZONTAL
= _core_
.DUPLEX_HORIZONTAL
597 DUPLEX_VERTICAL
= _core_
.DUPLEX_VERTICAL
598 ITEM_SEPARATOR
= _core_
.ITEM_SEPARATOR
599 ITEM_NORMAL
= _core_
.ITEM_NORMAL
600 ITEM_CHECK
= _core_
.ITEM_CHECK
601 ITEM_RADIO
= _core_
.ITEM_RADIO
602 ITEM_MAX
= _core_
.ITEM_MAX
603 HT_NOWHERE
= _core_
.HT_NOWHERE
604 HT_SCROLLBAR_FIRST
= _core_
.HT_SCROLLBAR_FIRST
605 HT_SCROLLBAR_ARROW_LINE_1
= _core_
.HT_SCROLLBAR_ARROW_LINE_1
606 HT_SCROLLBAR_ARROW_LINE_2
= _core_
.HT_SCROLLBAR_ARROW_LINE_2
607 HT_SCROLLBAR_ARROW_PAGE_1
= _core_
.HT_SCROLLBAR_ARROW_PAGE_1
608 HT_SCROLLBAR_ARROW_PAGE_2
= _core_
.HT_SCROLLBAR_ARROW_PAGE_2
609 HT_SCROLLBAR_THUMB
= _core_
.HT_SCROLLBAR_THUMB
610 HT_SCROLLBAR_BAR_1
= _core_
.HT_SCROLLBAR_BAR_1
611 HT_SCROLLBAR_BAR_2
= _core_
.HT_SCROLLBAR_BAR_2
612 HT_SCROLLBAR_LAST
= _core_
.HT_SCROLLBAR_LAST
613 HT_WINDOW_OUTSIDE
= _core_
.HT_WINDOW_OUTSIDE
614 HT_WINDOW_INSIDE
= _core_
.HT_WINDOW_INSIDE
615 HT_WINDOW_VERT_SCROLLBAR
= _core_
.HT_WINDOW_VERT_SCROLLBAR
616 HT_WINDOW_HORZ_SCROLLBAR
= _core_
.HT_WINDOW_HORZ_SCROLLBAR
617 HT_WINDOW_CORNER
= _core_
.HT_WINDOW_CORNER
618 HT_MAX
= _core_
.HT_MAX
619 MOD_NONE
= _core_
.MOD_NONE
620 MOD_ALT
= _core_
.MOD_ALT
621 MOD_CONTROL
= _core_
.MOD_CONTROL
622 MOD_SHIFT
= _core_
.MOD_SHIFT
623 MOD_WIN
= _core_
.MOD_WIN
624 UPDATE_UI_NONE
= _core_
.UPDATE_UI_NONE
625 UPDATE_UI_RECURSE
= _core_
.UPDATE_UI_RECURSE
626 UPDATE_UI_FROMIDLE
= _core_
.UPDATE_UI_FROMIDLE
627 #---------------------------------------------------------------------------
629 class Object(object):
631 The base class for most wx objects, although in wxPython not
632 much functionality is needed nor exposed.
634 def __init__(self
): raise RuntimeError, "No constructor defined"
636 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
637 def GetClassName(*args
, **kwargs
):
639 GetClassName(self) -> String
641 Returns the class name of the C++ class using wxRTTI.
643 return _core_
.Object_GetClassName(*args
, **kwargs
)
645 def Destroy(*args
, **kwargs
):
649 Deletes the C++ object this Python object is a proxy for.
651 return _core_
.Object_Destroy(*args
, **kwargs
)
654 class ObjectPtr(Object
):
655 def __init__(self
, this
):
657 if not hasattr(self
,"thisown"): self
.thisown
= 0
658 self
.__class
__ = Object
659 _core_
.Object_swigregister(ObjectPtr
)
660 _wxPySetDictionary
= _core_
._wxPySetDictionary
662 _wxPyFixStockObjects
= _core_
._wxPyFixStockObjects
665 EmptyString
= cvar
.EmptyString
667 #---------------------------------------------------------------------------
669 BITMAP_TYPE_INVALID
= _core_
.BITMAP_TYPE_INVALID
670 BITMAP_TYPE_BMP
= _core_
.BITMAP_TYPE_BMP
671 BITMAP_TYPE_ICO
= _core_
.BITMAP_TYPE_ICO
672 BITMAP_TYPE_CUR
= _core_
.BITMAP_TYPE_CUR
673 BITMAP_TYPE_XBM
= _core_
.BITMAP_TYPE_XBM
674 BITMAP_TYPE_XBM_DATA
= _core_
.BITMAP_TYPE_XBM_DATA
675 BITMAP_TYPE_XPM
= _core_
.BITMAP_TYPE_XPM
676 BITMAP_TYPE_XPM_DATA
= _core_
.BITMAP_TYPE_XPM_DATA
677 BITMAP_TYPE_TIF
= _core_
.BITMAP_TYPE_TIF
678 BITMAP_TYPE_GIF
= _core_
.BITMAP_TYPE_GIF
679 BITMAP_TYPE_PNG
= _core_
.BITMAP_TYPE_PNG
680 BITMAP_TYPE_JPEG
= _core_
.BITMAP_TYPE_JPEG
681 BITMAP_TYPE_PNM
= _core_
.BITMAP_TYPE_PNM
682 BITMAP_TYPE_PCX
= _core_
.BITMAP_TYPE_PCX
683 BITMAP_TYPE_PICT
= _core_
.BITMAP_TYPE_PICT
684 BITMAP_TYPE_ICON
= _core_
.BITMAP_TYPE_ICON
685 BITMAP_TYPE_ANI
= _core_
.BITMAP_TYPE_ANI
686 BITMAP_TYPE_IFF
= _core_
.BITMAP_TYPE_IFF
687 BITMAP_TYPE_MACCURSOR
= _core_
.BITMAP_TYPE_MACCURSOR
688 BITMAP_TYPE_ANY
= _core_
.BITMAP_TYPE_ANY
689 CURSOR_NONE
= _core_
.CURSOR_NONE
690 CURSOR_ARROW
= _core_
.CURSOR_ARROW
691 CURSOR_RIGHT_ARROW
= _core_
.CURSOR_RIGHT_ARROW
692 CURSOR_BULLSEYE
= _core_
.CURSOR_BULLSEYE
693 CURSOR_CHAR
= _core_
.CURSOR_CHAR
694 CURSOR_CROSS
= _core_
.CURSOR_CROSS
695 CURSOR_HAND
= _core_
.CURSOR_HAND
696 CURSOR_IBEAM
= _core_
.CURSOR_IBEAM
697 CURSOR_LEFT_BUTTON
= _core_
.CURSOR_LEFT_BUTTON
698 CURSOR_MAGNIFIER
= _core_
.CURSOR_MAGNIFIER
699 CURSOR_MIDDLE_BUTTON
= _core_
.CURSOR_MIDDLE_BUTTON
700 CURSOR_NO_ENTRY
= _core_
.CURSOR_NO_ENTRY
701 CURSOR_PAINT_BRUSH
= _core_
.CURSOR_PAINT_BRUSH
702 CURSOR_PENCIL
= _core_
.CURSOR_PENCIL
703 CURSOR_POINT_LEFT
= _core_
.CURSOR_POINT_LEFT
704 CURSOR_POINT_RIGHT
= _core_
.CURSOR_POINT_RIGHT
705 CURSOR_QUESTION_ARROW
= _core_
.CURSOR_QUESTION_ARROW
706 CURSOR_RIGHT_BUTTON
= _core_
.CURSOR_RIGHT_BUTTON
707 CURSOR_SIZENESW
= _core_
.CURSOR_SIZENESW
708 CURSOR_SIZENS
= _core_
.CURSOR_SIZENS
709 CURSOR_SIZENWSE
= _core_
.CURSOR_SIZENWSE
710 CURSOR_SIZEWE
= _core_
.CURSOR_SIZEWE
711 CURSOR_SIZING
= _core_
.CURSOR_SIZING
712 CURSOR_SPRAYCAN
= _core_
.CURSOR_SPRAYCAN
713 CURSOR_WAIT
= _core_
.CURSOR_WAIT
714 CURSOR_WATCH
= _core_
.CURSOR_WATCH
715 CURSOR_BLANK
= _core_
.CURSOR_BLANK
716 CURSOR_DEFAULT
= _core_
.CURSOR_DEFAULT
717 CURSOR_COPY_ARROW
= _core_
.CURSOR_COPY_ARROW
718 CURSOR_ARROWWAIT
= _core_
.CURSOR_ARROWWAIT
719 CURSOR_MAX
= _core_
.CURSOR_MAX
720 #---------------------------------------------------------------------------
724 wx.Size is a useful data structure used to represent the size of
725 something. It simply contians integer width and height
726 proprtites. In most places in wxPython where a wx.Size is
727 expected a (width, height) tuple can be used instead.
730 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
731 width
= property(_core_
.Size_width_get
, _core_
.Size_width_set
)
732 height
= property(_core_
.Size_height_get
, _core_
.Size_height_set
)
733 x
= width
; y
= height
734 def __init__(self
, *args
, **kwargs
):
736 __init__(self, int w=0, int h=0) -> Size
738 Creates a size object.
740 newobj
= _core_
.new_Size(*args
, **kwargs
)
741 self
.this
= newobj
.this
744 def __del__(self
, destroy
=_core_
.delete_Size
):
747 if self
.thisown
: destroy(self
)
750 def __eq__(*args
, **kwargs
):
752 __eq__(self, Size sz) -> bool
754 Test for equality of wx.Size objects.
756 return _core_
.Size___eq__(*args
, **kwargs
)
758 def __ne__(*args
, **kwargs
):
760 __ne__(self, Size sz) -> bool
764 return _core_
.Size___ne__(*args
, **kwargs
)
766 def __add__(*args
, **kwargs
):
768 __add__(self, Size sz) -> Size
770 Add sz's proprties to this and return the result.
772 return _core_
.Size___add__(*args
, **kwargs
)
774 def __sub__(*args
, **kwargs
):
776 __sub__(self, Size sz) -> Size
778 Subtract sz's properties from this and return the result.
780 return _core_
.Size___sub__(*args
, **kwargs
)
782 def IncTo(*args
, **kwargs
):
786 Increments this object so that both of its dimensions are not less
787 than the corresponding dimensions of the size.
789 return _core_
.Size_IncTo(*args
, **kwargs
)
791 def DecTo(*args
, **kwargs
):
795 Decrements this object so that both of its dimensions are not greater
796 than the corresponding dimensions of the size.
798 return _core_
.Size_DecTo(*args
, **kwargs
)
800 def Set(*args
, **kwargs
):
802 Set(self, int w, int h)
804 Set both width and height.
806 return _core_
.Size_Set(*args
, **kwargs
)
808 def SetWidth(*args
, **kwargs
):
809 """SetWidth(self, int w)"""
810 return _core_
.Size_SetWidth(*args
, **kwargs
)
812 def SetHeight(*args
, **kwargs
):
813 """SetHeight(self, int h)"""
814 return _core_
.Size_SetHeight(*args
, **kwargs
)
816 def GetWidth(*args
, **kwargs
):
817 """GetWidth(self) -> int"""
818 return _core_
.Size_GetWidth(*args
, **kwargs
)
820 def GetHeight(*args
, **kwargs
):
821 """GetHeight(self) -> int"""
822 return _core_
.Size_GetHeight(*args
, **kwargs
)
824 def IsFullySpecified(*args
, **kwargs
):
826 IsFullySpecified(self) -> bool
828 Returns True if both components of the size are non-default values.
830 return _core_
.Size_IsFullySpecified(*args
, **kwargs
)
832 def SetDefaults(*args
, **kwargs
):
834 SetDefaults(self, Size size)
836 Combine this size with the other one replacing the default components
837 of this object (i.e. equal to -1) with those of the other.
839 return _core_
.Size_SetDefaults(*args
, **kwargs
)
841 def Get(*args
, **kwargs
):
843 Get() -> (width,height)
845 Returns the width and height properties as a tuple.
847 return _core_
.Size_Get(*args
, **kwargs
)
849 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
850 def __str__(self
): return str(self
.Get())
851 def __repr__(self
): return 'wx.Size'+str(self
.Get())
852 def __len__(self
): return len(self
.Get())
853 def __getitem__(self
, index
): return self
.Get()[index
]
854 def __setitem__(self
, index
, val
):
855 if index
== 0: self
.width
= val
856 elif index
== 1: self
.height
= val
857 else: raise IndexError
858 def __nonzero__(self
): return self
.Get() != (0,0)
859 __safe_for_unpickling__
= True
860 def __reduce__(self
): return (wx
.Size
, self
.Get())
864 def __init__(self
, this
):
866 if not hasattr(self
,"thisown"): self
.thisown
= 0
867 self
.__class
__ = Size
868 _core_
.Size_swigregister(SizePtr
)
870 #---------------------------------------------------------------------------
872 class RealPoint(object):
874 A data structure for representing a point or position with floating
875 point x and y properties. In wxPython most places that expect a
876 wx.RealPoint can also accept a (x,y) tuple.
879 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
880 x
= property(_core_
.RealPoint_x_get
, _core_
.RealPoint_x_set
)
881 y
= property(_core_
.RealPoint_y_get
, _core_
.RealPoint_y_set
)
882 def __init__(self
, *args
, **kwargs
):
884 __init__(self, double x=0.0, double y=0.0) -> RealPoint
886 Create a wx.RealPoint object
888 newobj
= _core_
.new_RealPoint(*args
, **kwargs
)
889 self
.this
= newobj
.this
892 def __del__(self
, destroy
=_core_
.delete_RealPoint
):
895 if self
.thisown
: destroy(self
)
898 def __eq__(*args
, **kwargs
):
900 __eq__(self, RealPoint pt) -> bool
902 Test for equality of wx.RealPoint objects.
904 return _core_
.RealPoint___eq__(*args
, **kwargs
)
906 def __ne__(*args
, **kwargs
):
908 __ne__(self, RealPoint pt) -> bool
910 Test for inequality of wx.RealPoint objects.
912 return _core_
.RealPoint___ne__(*args
, **kwargs
)
914 def __add__(*args
, **kwargs
):
916 __add__(self, RealPoint pt) -> RealPoint
918 Add pt's proprties to this and return the result.
920 return _core_
.RealPoint___add__(*args
, **kwargs
)
922 def __sub__(*args
, **kwargs
):
924 __sub__(self, RealPoint pt) -> RealPoint
926 Subtract pt's proprties from this and return the result
928 return _core_
.RealPoint___sub__(*args
, **kwargs
)
930 def Set(*args
, **kwargs
):
932 Set(self, double x, double y)
934 Set both the x and y properties
936 return _core_
.RealPoint_Set(*args
, **kwargs
)
938 def Get(*args
, **kwargs
):
942 Return the x and y properties as a tuple.
944 return _core_
.RealPoint_Get(*args
, **kwargs
)
946 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
947 def __str__(self
): return str(self
.Get())
948 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
949 def __len__(self
): return len(self
.Get())
950 def __getitem__(self
, index
): return self
.Get()[index
]
951 def __setitem__(self
, index
, val
):
952 if index
== 0: self
.x
= val
953 elif index
== 1: self
.y
= val
954 else: raise IndexError
955 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
956 __safe_for_unpickling__
= True
957 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
960 class RealPointPtr(RealPoint
):
961 def __init__(self
, this
):
963 if not hasattr(self
,"thisown"): self
.thisown
= 0
964 self
.__class
__ = RealPoint
965 _core_
.RealPoint_swigregister(RealPointPtr
)
967 #---------------------------------------------------------------------------
971 A data structure for representing a point or position with integer x
972 and y properties. Most places in wxPython that expect a wx.Point can
973 also accept a (x,y) tuple.
976 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
977 x
= property(_core_
.Point_x_get
, _core_
.Point_x_set
)
978 y
= property(_core_
.Point_y_get
, _core_
.Point_y_set
)
979 def __init__(self
, *args
, **kwargs
):
981 __init__(self, int x=0, int y=0) -> Point
983 Create a wx.Point object
985 newobj
= _core_
.new_Point(*args
, **kwargs
)
986 self
.this
= newobj
.this
989 def __del__(self
, destroy
=_core_
.delete_Point
):
992 if self
.thisown
: destroy(self
)
995 def __eq__(*args
, **kwargs
):
997 __eq__(self, Point pt) -> bool
999 Test for equality of wx.Point objects.
1001 return _core_
.Point___eq__(*args
, **kwargs
)
1003 def __ne__(*args
, **kwargs
):
1005 __ne__(self, Point pt) -> bool
1007 Test for inequality of wx.Point objects.
1009 return _core_
.Point___ne__(*args
, **kwargs
)
1011 def __add__(*args
, **kwargs
):
1013 __add__(self, Point pt) -> Point
1015 Add pt's proprties to this and return the result.
1017 return _core_
.Point___add__(*args
, **kwargs
)
1019 def __sub__(*args
, **kwargs
):
1021 __sub__(self, Point pt) -> Point
1023 Subtract pt's proprties from this and return the result
1025 return _core_
.Point___sub__(*args
, **kwargs
)
1027 def __iadd__(*args
, **kwargs
):
1029 __iadd__(self, Point pt) -> Point
1031 Add pt to this object.
1033 return _core_
.Point___iadd__(*args
, **kwargs
)
1035 def __isub__(*args
, **kwargs
):
1037 __isub__(self, Point pt) -> Point
1039 Subtract pt from this object.
1041 return _core_
.Point___isub__(*args
, **kwargs
)
1043 def Set(*args
, **kwargs
):
1045 Set(self, long x, long y)
1047 Set both the x and y properties
1049 return _core_
.Point_Set(*args
, **kwargs
)
1051 def Get(*args
, **kwargs
):
1055 Return the x and y properties as a tuple.
1057 return _core_
.Point_Get(*args
, **kwargs
)
1059 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1060 def __str__(self
): return str(self
.Get())
1061 def __repr__(self
): return 'wx.Point'+str(self
.Get())
1062 def __len__(self
): return len(self
.Get())
1063 def __getitem__(self
, index
): return self
.Get()[index
]
1064 def __setitem__(self
, index
, val
):
1065 if index
== 0: self
.x
= val
1066 elif index
== 1: self
.y
= val
1067 else: raise IndexError
1068 def __nonzero__(self
): return self
.Get() != (0,0)
1069 __safe_for_unpickling__
= True
1070 def __reduce__(self
): return (wx
.Point
, self
.Get())
1073 class PointPtr(Point
):
1074 def __init__(self
, this
):
1076 if not hasattr(self
,"thisown"): self
.thisown
= 0
1077 self
.__class
__ = Point
1078 _core_
.Point_swigregister(PointPtr
)
1080 #---------------------------------------------------------------------------
1084 A class for representing and manipulating rectangles. It has x, y,
1085 width and height properties. In wxPython most palces that expect a
1086 wx.Rect can also accept a (x,y,width,height) tuple.
1089 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1090 def __init__(self
, *args
, **kwargs
):
1092 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1094 Create a new Rect object.
1096 newobj
= _core_
.new_Rect(*args
, **kwargs
)
1097 self
.this
= newobj
.this
1100 def __del__(self
, destroy
=_core_
.delete_Rect
):
1103 if self
.thisown
: destroy(self
)
1106 def GetX(*args
, **kwargs
):
1107 """GetX(self) -> int"""
1108 return _core_
.Rect_GetX(*args
, **kwargs
)
1110 def SetX(*args
, **kwargs
):
1111 """SetX(self, int x)"""
1112 return _core_
.Rect_SetX(*args
, **kwargs
)
1114 def GetY(*args
, **kwargs
):
1115 """GetY(self) -> int"""
1116 return _core_
.Rect_GetY(*args
, **kwargs
)
1118 def SetY(*args
, **kwargs
):
1119 """SetY(self, int y)"""
1120 return _core_
.Rect_SetY(*args
, **kwargs
)
1122 def GetWidth(*args
, **kwargs
):
1123 """GetWidth(self) -> int"""
1124 return _core_
.Rect_GetWidth(*args
, **kwargs
)
1126 def SetWidth(*args
, **kwargs
):
1127 """SetWidth(self, int w)"""
1128 return _core_
.Rect_SetWidth(*args
, **kwargs
)
1130 def GetHeight(*args
, **kwargs
):
1131 """GetHeight(self) -> int"""
1132 return _core_
.Rect_GetHeight(*args
, **kwargs
)
1134 def SetHeight(*args
, **kwargs
):
1135 """SetHeight(self, int h)"""
1136 return _core_
.Rect_SetHeight(*args
, **kwargs
)
1138 def GetPosition(*args
, **kwargs
):
1139 """GetPosition(self) -> Point"""
1140 return _core_
.Rect_GetPosition(*args
, **kwargs
)
1142 def SetPosition(*args
, **kwargs
):
1143 """SetPosition(self, Point p)"""
1144 return _core_
.Rect_SetPosition(*args
, **kwargs
)
1146 def GetSize(*args
, **kwargs
):
1147 """GetSize(self) -> Size"""
1148 return _core_
.Rect_GetSize(*args
, **kwargs
)
1150 def SetSize(*args
, **kwargs
):
1151 """SetSize(self, Size s)"""
1152 return _core_
.Rect_SetSize(*args
, **kwargs
)
1154 def IsEmpty(*args
, **kwargs
):
1155 """IsEmpty(self) -> bool"""
1156 return _core_
.Rect_IsEmpty(*args
, **kwargs
)
1158 def GetTopLeft(*args
, **kwargs
):
1159 """GetTopLeft(self) -> Point"""
1160 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1162 def SetTopLeft(*args
, **kwargs
):
1163 """SetTopLeft(self, Point p)"""
1164 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1166 def GetBottomRight(*args
, **kwargs
):
1167 """GetBottomRight(self) -> Point"""
1168 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1170 def SetBottomRight(*args
, **kwargs
):
1171 """SetBottomRight(self, Point p)"""
1172 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1174 def GetLeft(*args
, **kwargs
):
1175 """GetLeft(self) -> int"""
1176 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1178 def GetTop(*args
, **kwargs
):
1179 """GetTop(self) -> int"""
1180 return _core_
.Rect_GetTop(*args
, **kwargs
)
1182 def GetBottom(*args
, **kwargs
):
1183 """GetBottom(self) -> int"""
1184 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1186 def GetRight(*args
, **kwargs
):
1187 """GetRight(self) -> int"""
1188 return _core_
.Rect_GetRight(*args
, **kwargs
)
1190 def SetLeft(*args
, **kwargs
):
1191 """SetLeft(self, int left)"""
1192 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1194 def SetRight(*args
, **kwargs
):
1195 """SetRight(self, int right)"""
1196 return _core_
.Rect_SetRight(*args
, **kwargs
)
1198 def SetTop(*args
, **kwargs
):
1199 """SetTop(self, int top)"""
1200 return _core_
.Rect_SetTop(*args
, **kwargs
)
1202 def SetBottom(*args
, **kwargs
):
1203 """SetBottom(self, int bottom)"""
1204 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1206 position
= property(GetPosition
, SetPosition
)
1207 size
= property(GetSize
, SetSize
)
1208 left
= property(GetLeft
, SetLeft
)
1209 right
= property(GetRight
, SetRight
)
1210 top
= property(GetTop
, SetTop
)
1211 bottom
= property(GetBottom
, SetBottom
)
1213 def Inflate(*args
, **kwargs
):
1215 Inflate(self, int dx, int dy) -> Rect
1217 Increases the size of the rectangle.
1219 The left border is moved farther left and the right border is moved
1220 farther right by ``dx``. The upper border is moved farther up and the
1221 bottom border is moved farther down by ``dy``. (Note the the width and
1222 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1223 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1224 opposite happens: the rectangle size decreases in the respective
1227 The change is made to the rectangle inplace, if instead you need a
1228 copy that is inflated, preserving the original then make the copy
1231 copy = wx.Rect(*original)
1236 return _core_
.Rect_Inflate(*args
, **kwargs
)
1238 def Deflate(*args
, **kwargs
):
1240 Deflate(self, int dx, int dy) -> Rect
1242 Decrease the rectangle size. This method is the opposite of `Inflate`
1243 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1244 `Inflate` for a full description.
1246 return _core_
.Rect_Deflate(*args
, **kwargs
)
1248 def OffsetXY(*args
, **kwargs
):
1250 OffsetXY(self, int dx, int dy)
1252 Moves the rectangle by the specified offset. If dx is positive, the
1253 rectangle is moved to the right, if dy is positive, it is moved to the
1254 bottom, otherwise it is moved to the left or top respectively.
1256 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1258 def Offset(*args
, **kwargs
):
1260 Offset(self, Point pt)
1262 Same as OffsetXY but uses dx,dy from Point
1264 return _core_
.Rect_Offset(*args
, **kwargs
)
1266 def Intersect(*args
, **kwargs
):
1268 Intersect(self, Rect rect) -> Rect
1270 Returns the intersectsion of this rectangle and rect.
1272 return _core_
.Rect_Intersect(*args
, **kwargs
)
1274 def Union(*args
, **kwargs
):
1276 Union(self, Rect rect) -> Rect
1278 Returns the union of this rectangle and rect.
1280 return _core_
.Rect_Union(*args
, **kwargs
)
1282 def __add__(*args
, **kwargs
):
1284 __add__(self, Rect rect) -> Rect
1286 Add the properties of rect to this rectangle and return the result.
1288 return _core_
.Rect___add__(*args
, **kwargs
)
1290 def __iadd__(*args
, **kwargs
):
1292 __iadd__(self, Rect rect) -> Rect
1294 Add the properties of rect to this rectangle, updating this rectangle.
1296 return _core_
.Rect___iadd__(*args
, **kwargs
)
1298 def __eq__(*args
, **kwargs
):
1300 __eq__(self, Rect rect) -> bool
1304 return _core_
.Rect___eq__(*args
, **kwargs
)
1306 def __ne__(*args
, **kwargs
):
1308 __ne__(self, Rect rect) -> bool
1310 Test for inequality.
1312 return _core_
.Rect___ne__(*args
, **kwargs
)
1314 def InsideXY(*args
, **kwargs
):
1316 InsideXY(self, int x, int y) -> bool
1318 Return True if the point is (not strcitly) inside the rect.
1320 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1322 def Inside(*args
, **kwargs
):
1324 Inside(self, Point pt) -> bool
1326 Return True if the point is (not strcitly) inside the rect.
1328 return _core_
.Rect_Inside(*args
, **kwargs
)
1330 def Intersects(*args
, **kwargs
):
1332 Intersects(self, Rect rect) -> bool
1334 Returns True if the rectangles have a non empty intersection.
1336 return _core_
.Rect_Intersects(*args
, **kwargs
)
1338 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1339 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1340 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1341 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1342 def Set(*args
, **kwargs
):
1344 Set(self, int x=0, int y=0, int width=0, int height=0)
1346 Set all rectangle properties.
1348 return _core_
.Rect_Set(*args
, **kwargs
)
1350 def Get(*args
, **kwargs
):
1352 Get() -> (x,y,width,height)
1354 Return the rectangle properties as a tuple.
1356 return _core_
.Rect_Get(*args
, **kwargs
)
1358 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1359 def __str__(self
): return str(self
.Get())
1360 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1361 def __len__(self
): return len(self
.Get())
1362 def __getitem__(self
, index
): return self
.Get()[index
]
1363 def __setitem__(self
, index
, val
):
1364 if index
== 0: self
.x
= val
1365 elif index
== 1: self
.y
= val
1366 elif index
== 2: self
.width
= val
1367 elif index
== 3: self
.height
= val
1368 else: raise IndexError
1369 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1370 __safe_for_unpickling__
= True
1371 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1374 class RectPtr(Rect
):
1375 def __init__(self
, this
):
1377 if not hasattr(self
,"thisown"): self
.thisown
= 0
1378 self
.__class
__ = Rect
1379 _core_
.Rect_swigregister(RectPtr
)
1381 def RectPP(*args
, **kwargs
):
1383 RectPP(Point topLeft, Point bottomRight) -> Rect
1385 Create a new Rect object from Points representing two corners.
1387 val
= _core_
.new_RectPP(*args
, **kwargs
)
1391 def RectPS(*args
, **kwargs
):
1393 RectPS(Point pos, Size size) -> Rect
1395 Create a new Rect from a position and size.
1397 val
= _core_
.new_RectPS(*args
, **kwargs
)
1401 def RectS(*args
, **kwargs
):
1403 RectS(Size size) -> Rect
1405 Create a new Rect from a size only.
1407 val
= _core_
.new_RectS(*args
, **kwargs
)
1412 def IntersectRect(*args
, **kwargs
):
1414 IntersectRect(Rect r1, Rect r2) -> Rect
1416 Calculate and return the intersection of r1 and r2.
1418 return _core_
.IntersectRect(*args
, **kwargs
)
1419 #---------------------------------------------------------------------------
1421 class Point2D(object):
1423 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1424 with floating point values.
1427 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1428 def __init__(self
, *args
, **kwargs
):
1430 __init__(self, double x=0.0, double y=0.0) -> Point2D
1432 Create a w.Point2D object.
1434 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1435 self
.this
= newobj
.this
1438 def GetFloor(*args
, **kwargs
):
1444 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1446 def GetRounded(*args
, **kwargs
):
1448 GetRounded() -> (x,y)
1452 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1454 def GetVectorLength(*args
, **kwargs
):
1455 """GetVectorLength(self) -> double"""
1456 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1458 def GetVectorAngle(*args
, **kwargs
):
1459 """GetVectorAngle(self) -> double"""
1460 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1462 def SetVectorLength(*args
, **kwargs
):
1463 """SetVectorLength(self, double length)"""
1464 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1466 def SetVectorAngle(*args
, **kwargs
):
1467 """SetVectorAngle(self, double degrees)"""
1468 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1470 def SetPolarCoordinates(self
, angle
, length
):
1471 self
.SetVectorLength(length
)
1472 self
.SetVectorAngle(angle
)
1473 def Normalize(self
):
1474 self
.SetVectorLength(1.0)
1476 def GetDistance(*args
, **kwargs
):
1477 """GetDistance(self, Point2D pt) -> double"""
1478 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1480 def GetDistanceSquare(*args
, **kwargs
):
1481 """GetDistanceSquare(self, Point2D pt) -> double"""
1482 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1484 def GetDotProduct(*args
, **kwargs
):
1485 """GetDotProduct(self, Point2D vec) -> double"""
1486 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1488 def GetCrossProduct(*args
, **kwargs
):
1489 """GetCrossProduct(self, Point2D vec) -> double"""
1490 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1492 def __neg__(*args
, **kwargs
):
1494 __neg__(self) -> Point2D
1496 the reflection of this point
1498 return _core_
.Point2D___neg__(*args
, **kwargs
)
1500 def __iadd__(*args
, **kwargs
):
1501 """__iadd__(self, Point2D pt) -> Point2D"""
1502 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1504 def __isub__(*args
, **kwargs
):
1505 """__isub__(self, Point2D pt) -> Point2D"""
1506 return _core_
.Point2D___isub__(*args
, **kwargs
)
1508 def __imul__(*args
, **kwargs
):
1509 """__imul__(self, Point2D pt) -> Point2D"""
1510 return _core_
.Point2D___imul__(*args
, **kwargs
)
1512 def __idiv__(*args
, **kwargs
):
1513 """__idiv__(self, Point2D pt) -> Point2D"""
1514 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1516 def __eq__(*args
, **kwargs
):
1518 __eq__(self, Point2D pt) -> bool
1522 return _core_
.Point2D___eq__(*args
, **kwargs
)
1524 def __ne__(*args
, **kwargs
):
1526 __ne__(self, Point2D pt) -> bool
1530 return _core_
.Point2D___ne__(*args
, **kwargs
)
1532 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1533 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1534 def Set(*args
, **kwargs
):
1535 """Set(self, double x=0, double y=0)"""
1536 return _core_
.Point2D_Set(*args
, **kwargs
)
1538 def Get(*args
, **kwargs
):
1542 Return x and y properties as a tuple.
1544 return _core_
.Point2D_Get(*args
, **kwargs
)
1546 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1547 def __str__(self
): return str(self
.Get())
1548 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1549 def __len__(self
): return len(self
.Get())
1550 def __getitem__(self
, index
): return self
.Get()[index
]
1551 def __setitem__(self
, index
, val
):
1552 if index
== 0: self
.x
= val
1553 elif index
== 1: self
.y
= val
1554 else: raise IndexError
1555 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1556 __safe_for_unpickling__
= True
1557 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1560 class Point2DPtr(Point2D
):
1561 def __init__(self
, this
):
1563 if not hasattr(self
,"thisown"): self
.thisown
= 0
1564 self
.__class
__ = Point2D
1565 _core_
.Point2D_swigregister(Point2DPtr
)
1567 def Point2DCopy(*args
, **kwargs
):
1569 Point2DCopy(Point2D pt) -> Point2D
1571 Create a w.Point2D object.
1573 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1577 def Point2DFromPoint(*args
, **kwargs
):
1579 Point2DFromPoint(Point pt) -> Point2D
1581 Create a w.Point2D object.
1583 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1587 #---------------------------------------------------------------------------
1589 FromStart
= _core_
.FromStart
1590 FromCurrent
= _core_
.FromCurrent
1591 FromEnd
= _core_
.FromEnd
1592 class InputStream(object):
1593 """Proxy of C++ InputStream class"""
1595 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1596 def __init__(self
, *args
, **kwargs
):
1597 """__init__(self, PyObject p) -> InputStream"""
1598 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1599 self
.this
= newobj
.this
1602 def __del__(self
, destroy
=_core_
.delete_InputStream
):
1605 if self
.thisown
: destroy(self
)
1608 def close(*args
, **kwargs
):
1610 return _core_
.InputStream_close(*args
, **kwargs
)
1612 def flush(*args
, **kwargs
):
1614 return _core_
.InputStream_flush(*args
, **kwargs
)
1616 def eof(*args
, **kwargs
):
1617 """eof(self) -> bool"""
1618 return _core_
.InputStream_eof(*args
, **kwargs
)
1620 def read(*args
, **kwargs
):
1621 """read(self, int size=-1) -> PyObject"""
1622 return _core_
.InputStream_read(*args
, **kwargs
)
1624 def readline(*args
, **kwargs
):
1625 """readline(self, int size=-1) -> PyObject"""
1626 return _core_
.InputStream_readline(*args
, **kwargs
)
1628 def readlines(*args
, **kwargs
):
1629 """readlines(self, int sizehint=-1) -> PyObject"""
1630 return _core_
.InputStream_readlines(*args
, **kwargs
)
1632 def seek(*args
, **kwargs
):
1633 """seek(self, int offset, int whence=0)"""
1634 return _core_
.InputStream_seek(*args
, **kwargs
)
1636 def tell(*args
, **kwargs
):
1637 """tell(self) -> int"""
1638 return _core_
.InputStream_tell(*args
, **kwargs
)
1640 def Peek(*args
, **kwargs
):
1641 """Peek(self) -> char"""
1642 return _core_
.InputStream_Peek(*args
, **kwargs
)
1644 def GetC(*args
, **kwargs
):
1645 """GetC(self) -> char"""
1646 return _core_
.InputStream_GetC(*args
, **kwargs
)
1648 def LastRead(*args
, **kwargs
):
1649 """LastRead(self) -> size_t"""
1650 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1652 def CanRead(*args
, **kwargs
):
1653 """CanRead(self) -> bool"""
1654 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1656 def Eof(*args
, **kwargs
):
1657 """Eof(self) -> bool"""
1658 return _core_
.InputStream_Eof(*args
, **kwargs
)
1660 def Ungetch(*args
, **kwargs
):
1661 """Ungetch(self, char c) -> bool"""
1662 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1664 def SeekI(*args
, **kwargs
):
1665 """SeekI(self, long pos, int mode=FromStart) -> long"""
1666 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1668 def TellI(*args
, **kwargs
):
1669 """TellI(self) -> long"""
1670 return _core_
.InputStream_TellI(*args
, **kwargs
)
1673 class InputStreamPtr(InputStream
):
1674 def __init__(self
, this
):
1676 if not hasattr(self
,"thisown"): self
.thisown
= 0
1677 self
.__class
__ = InputStream
1678 _core_
.InputStream_swigregister(InputStreamPtr
)
1679 DefaultPosition
= cvar
.DefaultPosition
1680 DefaultSize
= cvar
.DefaultSize
1682 class OutputStream(object):
1683 """Proxy of C++ OutputStream class"""
1684 def __init__(self
): raise RuntimeError, "No constructor defined"
1686 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1687 def write(*args
, **kwargs
):
1688 """write(self, PyObject obj)"""
1689 return _core_
.OutputStream_write(*args
, **kwargs
)
1692 class OutputStreamPtr(OutputStream
):
1693 def __init__(self
, this
):
1695 if not hasattr(self
,"thisown"): self
.thisown
= 0
1696 self
.__class
__ = OutputStream
1697 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1699 #---------------------------------------------------------------------------
1701 class FSFile(Object
):
1702 """Proxy of C++ FSFile class"""
1704 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1705 def __init__(self
, *args
, **kwargs
):
1707 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1708 DateTime modif) -> FSFile
1710 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1711 self
.this
= newobj
.this
1714 self
.thisown
= 0 # It will normally be deleted by the user of the wx.FileSystem
1716 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1719 if self
.thisown
: destroy(self
)
1722 def GetStream(*args
, **kwargs
):
1723 """GetStream(self) -> InputStream"""
1724 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1726 def GetMimeType(*args
, **kwargs
):
1727 """GetMimeType(self) -> String"""
1728 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1730 def GetLocation(*args
, **kwargs
):
1731 """GetLocation(self) -> String"""
1732 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1734 def GetAnchor(*args
, **kwargs
):
1735 """GetAnchor(self) -> String"""
1736 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1738 def GetModificationTime(*args
, **kwargs
):
1739 """GetModificationTime(self) -> DateTime"""
1740 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1743 class FSFilePtr(FSFile
):
1744 def __init__(self
, this
):
1746 if not hasattr(self
,"thisown"): self
.thisown
= 0
1747 self
.__class
__ = FSFile
1748 _core_
.FSFile_swigregister(FSFilePtr
)
1750 class CPPFileSystemHandler(object):
1751 """Proxy of C++ CPPFileSystemHandler class"""
1752 def __init__(self
): raise RuntimeError, "No constructor defined"
1754 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1756 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1757 def __init__(self
, this
):
1759 if not hasattr(self
,"thisown"): self
.thisown
= 0
1760 self
.__class
__ = CPPFileSystemHandler
1761 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1763 class FileSystemHandler(CPPFileSystemHandler
):
1764 """Proxy of C++ FileSystemHandler class"""
1766 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1767 def __init__(self
, *args
, **kwargs
):
1768 """__init__(self) -> FileSystemHandler"""
1769 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1770 self
.this
= newobj
.this
1773 self
._setCallbackInfo
(self
, FileSystemHandler
)
1775 def _setCallbackInfo(*args
, **kwargs
):
1776 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1777 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1779 def CanOpen(*args
, **kwargs
):
1780 """CanOpen(self, String location) -> bool"""
1781 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1783 def OpenFile(*args
, **kwargs
):
1784 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1785 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1787 def FindFirst(*args
, **kwargs
):
1788 """FindFirst(self, String spec, int flags=0) -> String"""
1789 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1791 def FindNext(*args
, **kwargs
):
1792 """FindNext(self) -> String"""
1793 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1795 def GetProtocol(*args
, **kwargs
):
1796 """GetProtocol(self, String location) -> String"""
1797 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1799 def GetLeftLocation(*args
, **kwargs
):
1800 """GetLeftLocation(self, String location) -> String"""
1801 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1803 def GetAnchor(*args
, **kwargs
):
1804 """GetAnchor(self, String location) -> String"""
1805 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1807 def GetRightLocation(*args
, **kwargs
):
1808 """GetRightLocation(self, String location) -> String"""
1809 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1811 def GetMimeTypeFromExt(*args
, **kwargs
):
1812 """GetMimeTypeFromExt(self, String location) -> String"""
1813 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1816 class FileSystemHandlerPtr(FileSystemHandler
):
1817 def __init__(self
, this
):
1819 if not hasattr(self
,"thisown"): self
.thisown
= 0
1820 self
.__class
__ = FileSystemHandler
1821 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1823 class FileSystem(Object
):
1824 """Proxy of C++ FileSystem class"""
1826 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1827 def __init__(self
, *args
, **kwargs
):
1828 """__init__(self) -> FileSystem"""
1829 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1830 self
.this
= newobj
.this
1833 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1836 if self
.thisown
: destroy(self
)
1839 def ChangePathTo(*args
, **kwargs
):
1840 """ChangePathTo(self, String location, bool is_dir=False)"""
1841 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1843 def GetPath(*args
, **kwargs
):
1844 """GetPath(self) -> String"""
1845 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1847 def OpenFile(*args
, **kwargs
):
1848 """OpenFile(self, String location) -> FSFile"""
1849 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1851 def FindFirst(*args
, **kwargs
):
1852 """FindFirst(self, String spec, int flags=0) -> String"""
1853 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1855 def FindNext(*args
, **kwargs
):
1856 """FindNext(self) -> String"""
1857 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1859 def AddHandler(*args
, **kwargs
):
1860 """AddHandler(CPPFileSystemHandler handler)"""
1861 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1863 AddHandler
= staticmethod(AddHandler
)
1864 def CleanUpHandlers(*args
, **kwargs
):
1865 """CleanUpHandlers()"""
1866 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1868 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1869 def FileNameToURL(*args
, **kwargs
):
1870 """FileNameToURL(String filename) -> String"""
1871 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1873 FileNameToURL
= staticmethod(FileNameToURL
)
1874 def URLToFileName(*args
, **kwargs
):
1875 """URLToFileName(String url) -> String"""
1876 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1878 URLToFileName
= staticmethod(URLToFileName
)
1880 class FileSystemPtr(FileSystem
):
1881 def __init__(self
, this
):
1883 if not hasattr(self
,"thisown"): self
.thisown
= 0
1884 self
.__class
__ = FileSystem
1885 _core_
.FileSystem_swigregister(FileSystemPtr
)
1887 def FileSystem_AddHandler(*args
, **kwargs
):
1888 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1889 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1891 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1892 """FileSystem_CleanUpHandlers()"""
1893 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1895 def FileSystem_FileNameToURL(*args
, **kwargs
):
1896 """FileSystem_FileNameToURL(String filename) -> String"""
1897 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1899 def FileSystem_URLToFileName(*args
, **kwargs
):
1900 """FileSystem_URLToFileName(String url) -> String"""
1901 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1903 class InternetFSHandler(CPPFileSystemHandler
):
1904 """Proxy of C++ InternetFSHandler class"""
1906 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1907 def __init__(self
, *args
, **kwargs
):
1908 """__init__(self) -> InternetFSHandler"""
1909 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1910 self
.this
= newobj
.this
1913 def CanOpen(*args
, **kwargs
):
1914 """CanOpen(self, String location) -> bool"""
1915 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1917 def OpenFile(*args
, **kwargs
):
1918 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1919 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1922 class InternetFSHandlerPtr(InternetFSHandler
):
1923 def __init__(self
, this
):
1925 if not hasattr(self
,"thisown"): self
.thisown
= 0
1926 self
.__class
__ = InternetFSHandler
1927 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1929 class ZipFSHandler(CPPFileSystemHandler
):
1930 """Proxy of C++ ZipFSHandler class"""
1932 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1933 def __init__(self
, *args
, **kwargs
):
1934 """__init__(self) -> ZipFSHandler"""
1935 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1936 self
.this
= newobj
.this
1939 def CanOpen(*args
, **kwargs
):
1940 """CanOpen(self, String location) -> bool"""
1941 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1943 def OpenFile(*args
, **kwargs
):
1944 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1945 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1947 def FindFirst(*args
, **kwargs
):
1948 """FindFirst(self, String spec, int flags=0) -> String"""
1949 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1951 def FindNext(*args
, **kwargs
):
1952 """FindNext(self) -> String"""
1953 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1956 class ZipFSHandlerPtr(ZipFSHandler
):
1957 def __init__(self
, this
):
1959 if not hasattr(self
,"thisown"): self
.thisown
= 0
1960 self
.__class
__ = ZipFSHandler
1961 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1964 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1965 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1966 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1968 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1969 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1970 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1972 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1973 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1974 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1975 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1977 Add 'file' to the memory filesystem. The dataItem parameter can
1978 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1979 arbitrary data. If a bitmap or image is used then the imgType
1980 parameter should specify what kind of image file it should be
1981 written as, wx.BITMAP_TYPE_PNG, etc.
1983 if isinstance(dataItem
, wx
.Image
):
1984 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1985 elif isinstance(dataItem
, wx
.Bitmap
):
1986 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1987 elif type(dataItem
) == str:
1988 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1990 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1992 class MemoryFSHandler(CPPFileSystemHandler
):
1993 """Proxy of C++ MemoryFSHandler class"""
1995 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1996 def __init__(self
, *args
, **kwargs
):
1997 """__init__(self) -> MemoryFSHandler"""
1998 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
1999 self
.this
= newobj
.this
2002 def RemoveFile(*args
, **kwargs
):
2003 """RemoveFile(String filename)"""
2004 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
2006 RemoveFile
= staticmethod(RemoveFile
)
2007 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
2008 def CanOpen(*args
, **kwargs
):
2009 """CanOpen(self, String location) -> bool"""
2010 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
2012 def OpenFile(*args
, **kwargs
):
2013 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
2014 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
2016 def FindFirst(*args
, **kwargs
):
2017 """FindFirst(self, String spec, int flags=0) -> String"""
2018 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
2020 def FindNext(*args
, **kwargs
):
2021 """FindNext(self) -> String"""
2022 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
2025 class MemoryFSHandlerPtr(MemoryFSHandler
):
2026 def __init__(self
, this
):
2028 if not hasattr(self
,"thisown"): self
.thisown
= 0
2029 self
.__class
__ = MemoryFSHandler
2030 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
2032 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
2033 """MemoryFSHandler_RemoveFile(String filename)"""
2034 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
2036 #---------------------------------------------------------------------------
2038 class ImageHandler(Object
):
2039 """Proxy of C++ ImageHandler class"""
2040 def __init__(self
): raise RuntimeError, "No constructor defined"
2042 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2043 def GetName(*args
, **kwargs
):
2044 """GetName(self) -> String"""
2045 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
2047 def GetExtension(*args
, **kwargs
):
2048 """GetExtension(self) -> String"""
2049 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
2051 def GetType(*args
, **kwargs
):
2052 """GetType(self) -> long"""
2053 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
2055 def GetMimeType(*args
, **kwargs
):
2056 """GetMimeType(self) -> String"""
2057 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
2059 def CanRead(*args
, **kwargs
):
2060 """CanRead(self, String name) -> bool"""
2061 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
2063 def SetName(*args
, **kwargs
):
2064 """SetName(self, String name)"""
2065 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
2067 def SetExtension(*args
, **kwargs
):
2068 """SetExtension(self, String extension)"""
2069 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
2071 def SetType(*args
, **kwargs
):
2072 """SetType(self, long type)"""
2073 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
2075 def SetMimeType(*args
, **kwargs
):
2076 """SetMimeType(self, String mimetype)"""
2077 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
2080 class ImageHandlerPtr(ImageHandler
):
2081 def __init__(self
, this
):
2083 if not hasattr(self
,"thisown"): self
.thisown
= 0
2084 self
.__class
__ = ImageHandler
2085 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
2087 class ImageHistogram(object):
2088 """Proxy of C++ ImageHistogram class"""
2090 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2091 def __init__(self
, *args
, **kwargs
):
2092 """__init__(self) -> ImageHistogram"""
2093 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
2094 self
.this
= newobj
.this
2097 def MakeKey(*args
, **kwargs
):
2099 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 MakeKey
= staticmethod(MakeKey
)
2106 def FindFirstUnusedColour(*args
, **kwargs
):
2108 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2110 Find first colour that is not used in the image and has higher RGB
2111 values than startR, startG, startB. Returns a tuple consisting of a
2112 success flag and rgb values.
2114 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2116 def GetCount(*args
, **kwargs
):
2118 GetCount(self, unsigned long key) -> unsigned long
2120 Returns the pixel count for the given key. Use `MakeKey` to create a
2121 key value from a RGB tripple.
2123 return _core_
.ImageHistogram_GetCount(*args
, **kwargs
)
2125 def GetCountRGB(*args
, **kwargs
):
2127 GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2129 Returns the pixel count for the given RGB values.
2131 return _core_
.ImageHistogram_GetCountRGB(*args
, **kwargs
)
2133 def GetCountColour(*args
, **kwargs
):
2135 GetCountColour(self, Colour colour) -> unsigned long
2137 Returns the pixel count for the given `wx.Colour` value.
2139 return _core_
.ImageHistogram_GetCountColour(*args
, **kwargs
)
2142 class ImageHistogramPtr(ImageHistogram
):
2143 def __init__(self
, this
):
2145 if not hasattr(self
,"thisown"): self
.thisown
= 0
2146 self
.__class
__ = ImageHistogram
2147 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2149 def ImageHistogram_MakeKey(*args
, **kwargs
):
2151 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2153 Get the key in the histogram for the given RGB values
2155 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2157 class Image(Object
):
2158 """Proxy of C++ Image class"""
2160 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2161 def __init__(self
, *args
, **kwargs
):
2162 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2163 newobj
= _core_
.new_Image(*args
, **kwargs
)
2164 self
.this
= newobj
.this
2167 def __del__(self
, destroy
=_core_
.delete_Image
):
2170 if self
.thisown
: destroy(self
)
2173 def Create(*args
, **kwargs
):
2174 """Create(self, int width, int height)"""
2175 return _core_
.Image_Create(*args
, **kwargs
)
2177 def Destroy(*args
, **kwargs
):
2181 Deletes the C++ object this Python object is a proxy for.
2183 return _core_
.Image_Destroy(*args
, **kwargs
)
2185 def Scale(*args
, **kwargs
):
2186 """Scale(self, int width, int height) -> Image"""
2187 return _core_
.Image_Scale(*args
, **kwargs
)
2189 def ShrinkBy(*args
, **kwargs
):
2190 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2191 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2193 def Rescale(*args
, **kwargs
):
2194 """Rescale(self, int width, int height) -> Image"""
2195 return _core_
.Image_Rescale(*args
, **kwargs
)
2197 def Resize(*args
, **kwargs
):
2198 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2199 return _core_
.Image_Resize(*args
, **kwargs
)
2201 def SetRGB(*args
, **kwargs
):
2202 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2203 return _core_
.Image_SetRGB(*args
, **kwargs
)
2205 def SetRGBRect(*args
, **kwargs
):
2206 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2207 return _core_
.Image_SetRGBRect(*args
, **kwargs
)
2209 def GetRed(*args
, **kwargs
):
2210 """GetRed(self, int x, int y) -> unsigned char"""
2211 return _core_
.Image_GetRed(*args
, **kwargs
)
2213 def GetGreen(*args
, **kwargs
):
2214 """GetGreen(self, int x, int y) -> unsigned char"""
2215 return _core_
.Image_GetGreen(*args
, **kwargs
)
2217 def GetBlue(*args
, **kwargs
):
2218 """GetBlue(self, int x, int y) -> unsigned char"""
2219 return _core_
.Image_GetBlue(*args
, **kwargs
)
2221 def SetAlpha(*args
, **kwargs
):
2222 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2223 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2225 def GetAlpha(*args
, **kwargs
):
2226 """GetAlpha(self, int x, int y) -> unsigned char"""
2227 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2229 def HasAlpha(*args
, **kwargs
):
2230 """HasAlpha(self) -> bool"""
2231 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2233 def InitAlpha(*args
, **kwargs
):
2237 Initializes the image alpha channel data. It is an error to call it if
2238 the image already has alpha data. If it doesn't, alpha data will be by
2239 default initialized to all pixels being fully opaque. But if the image
2240 has a a mask colour, all mask pixels will be completely transparent.
2242 return _core_
.Image_InitAlpha(*args
, **kwargs
)
2244 def FindFirstUnusedColour(*args
, **kwargs
):
2246 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2248 Find first colour that is not used in the image and has higher RGB
2249 values than startR, startG, startB. Returns a tuple consisting of a
2250 success flag and rgb values.
2252 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2254 def ConvertAlphaToMask(*args
, **kwargs
):
2256 ConvertAlphaToMask(self, byte threshold=128) -> bool
2258 If the image has alpha channel, this method converts it to mask. All pixels
2259 with alpha value less than ``threshold`` are replaced with mask colour and the
2260 alpha channel is removed. Mask colour is chosen automatically using
2261 `FindFirstUnusedColour`.
2263 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2266 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2268 def ConvertColourToAlpha(*args
, **kwargs
):
2270 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2272 This method converts an image where the original alpha information is
2273 only available as a shades of a colour (actually shades of grey)
2274 typically when you draw anti-aliased text into a bitmap. The DC
2275 drawing routines draw grey values on the black background although
2276 they actually mean to draw white with differnt alpha values. This
2277 method reverses it, assuming a black (!) background and white text.
2278 The method will then fill up the whole image with the colour given.
2280 return _core_
.Image_ConvertColourToAlpha(*args
, **kwargs
)
2282 def SetMaskFromImage(*args
, **kwargs
):
2283 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2284 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2286 def CanRead(*args
, **kwargs
):
2287 """CanRead(String name) -> bool"""
2288 return _core_
.Image_CanRead(*args
, **kwargs
)
2290 CanRead
= staticmethod(CanRead
)
2291 def GetImageCount(*args
, **kwargs
):
2292 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2293 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2295 GetImageCount
= staticmethod(GetImageCount
)
2296 def LoadFile(*args
, **kwargs
):
2297 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2298 return _core_
.Image_LoadFile(*args
, **kwargs
)
2300 def LoadMimeFile(*args
, **kwargs
):
2301 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2302 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2304 def SaveFile(*args
, **kwargs
):
2305 """SaveFile(self, String name, int type) -> bool"""
2306 return _core_
.Image_SaveFile(*args
, **kwargs
)
2308 def SaveMimeFile(*args
, **kwargs
):
2309 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2310 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2312 def CanReadStream(*args
, **kwargs
):
2313 """CanReadStream(InputStream stream) -> bool"""
2314 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2316 CanReadStream
= staticmethod(CanReadStream
)
2317 def LoadStream(*args
, **kwargs
):
2318 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2319 return _core_
.Image_LoadStream(*args
, **kwargs
)
2321 def LoadMimeStream(*args
, **kwargs
):
2322 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2323 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2325 def Ok(*args
, **kwargs
):
2326 """Ok(self) -> bool"""
2327 return _core_
.Image_Ok(*args
, **kwargs
)
2329 def GetWidth(*args
, **kwargs
):
2330 """GetWidth(self) -> int"""
2331 return _core_
.Image_GetWidth(*args
, **kwargs
)
2333 def GetHeight(*args
, **kwargs
):
2334 """GetHeight(self) -> int"""
2335 return _core_
.Image_GetHeight(*args
, **kwargs
)
2337 def GetSize(*args
, **kwargs
):
2338 """GetSize(self) -> Size"""
2339 return _core_
.Image_GetSize(*args
, **kwargs
)
2341 def GetSubImage(*args
, **kwargs
):
2342 """GetSubImage(self, Rect rect) -> Image"""
2343 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2345 def Size(*args
, **kwargs
):
2346 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2347 return _core_
.Image_Size(*args
, **kwargs
)
2349 def Copy(*args
, **kwargs
):
2350 """Copy(self) -> Image"""
2351 return _core_
.Image_Copy(*args
, **kwargs
)
2353 def Paste(*args
, **kwargs
):
2354 """Paste(self, Image image, int x, int y)"""
2355 return _core_
.Image_Paste(*args
, **kwargs
)
2357 def GetData(*args
, **kwargs
):
2359 GetData(self) -> PyObject
2361 Returns a string containing a copy of the RGB bytes of the image.
2363 return _core_
.Image_GetData(*args
, **kwargs
)
2365 def SetData(*args
, **kwargs
):
2367 SetData(self, buffer data)
2369 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2370 either a string or a buffer object holding the data and the length of
2371 the data must be width*height*3.
2373 return _core_
.Image_SetData(*args
, **kwargs
)
2375 def GetDataBuffer(*args
, **kwargs
):
2377 GetDataBuffer(self) -> PyObject
2379 Returns a writable Python buffer object that is pointing at the RGB
2380 image data buffer inside the wx.Image.
2382 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2384 def SetDataBuffer(*args
, **kwargs
):
2386 SetDataBuffer(self, buffer data)
2388 Sets the internal image data pointer to point at a Python buffer
2389 object. This can save a copy of the data but you must ensure that the
2390 buffer object lives longer than the wx.Image does.
2392 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2394 def GetAlphaData(*args
, **kwargs
):
2396 GetAlphaData(self) -> PyObject
2398 Returns a string containing a copy of the alpha bytes of the image.
2400 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2402 def SetAlphaData(*args
, **kwargs
):
2404 SetAlphaData(self, buffer alpha)
2406 Resets the Image's alpha data from a buffer of bytes. Accepts either
2407 a string or a buffer object holding the data and the length of the
2408 data must be width*height.
2410 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2412 def GetAlphaBuffer(*args
, **kwargs
):
2413 """GetAlphaBuffer(self) -> PyObject"""
2414 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2416 def SetAlphaBuffer(*args
, **kwargs
):
2417 """SetAlphaBuffer(self, buffer alpha)"""
2418 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2420 def SetMaskColour(*args
, **kwargs
):
2421 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2422 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2424 def GetOrFindMaskColour(*args
, **kwargs
):
2426 GetOrFindMaskColour() -> (r,g,b)
2428 Get the current mask colour or find a suitable colour.
2430 return _core_
.Image_GetOrFindMaskColour(*args
, **kwargs
)
2432 def GetMaskRed(*args
, **kwargs
):
2433 """GetMaskRed(self) -> unsigned char"""
2434 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2436 def GetMaskGreen(*args
, **kwargs
):
2437 """GetMaskGreen(self) -> unsigned char"""
2438 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2440 def GetMaskBlue(*args
, **kwargs
):
2441 """GetMaskBlue(self) -> unsigned char"""
2442 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2444 def SetMask(*args
, **kwargs
):
2445 """SetMask(self, bool mask=True)"""
2446 return _core_
.Image_SetMask(*args
, **kwargs
)
2448 def HasMask(*args
, **kwargs
):
2449 """HasMask(self) -> bool"""
2450 return _core_
.Image_HasMask(*args
, **kwargs
)
2452 def Rotate(*args
, **kwargs
):
2454 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2455 Point offset_after_rotation=None) -> Image
2457 return _core_
.Image_Rotate(*args
, **kwargs
)
2459 def Rotate90(*args
, **kwargs
):
2460 """Rotate90(self, bool clockwise=True) -> Image"""
2461 return _core_
.Image_Rotate90(*args
, **kwargs
)
2463 def Mirror(*args
, **kwargs
):
2464 """Mirror(self, bool horizontally=True) -> Image"""
2465 return _core_
.Image_Mirror(*args
, **kwargs
)
2467 def Replace(*args
, **kwargs
):
2469 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2470 unsigned char r2, unsigned char g2, unsigned char b2)
2472 return _core_
.Image_Replace(*args
, **kwargs
)
2474 def ConvertToMono(*args
, **kwargs
):
2475 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2476 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2478 def SetOption(*args
, **kwargs
):
2479 """SetOption(self, String name, String value)"""
2480 return _core_
.Image_SetOption(*args
, **kwargs
)
2482 def SetOptionInt(*args
, **kwargs
):
2483 """SetOptionInt(self, String name, int value)"""
2484 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2486 def GetOption(*args
, **kwargs
):
2487 """GetOption(self, String name) -> String"""
2488 return _core_
.Image_GetOption(*args
, **kwargs
)
2490 def GetOptionInt(*args
, **kwargs
):
2491 """GetOptionInt(self, String name) -> int"""
2492 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2494 def HasOption(*args
, **kwargs
):
2495 """HasOption(self, String name) -> bool"""
2496 return _core_
.Image_HasOption(*args
, **kwargs
)
2498 def CountColours(*args
, **kwargs
):
2499 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2500 return _core_
.Image_CountColours(*args
, **kwargs
)
2502 def ComputeHistogram(*args
, **kwargs
):
2503 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2504 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2506 def AddHandler(*args
, **kwargs
):
2507 """AddHandler(ImageHandler handler)"""
2508 return _core_
.Image_AddHandler(*args
, **kwargs
)
2510 AddHandler
= staticmethod(AddHandler
)
2511 def InsertHandler(*args
, **kwargs
):
2512 """InsertHandler(ImageHandler handler)"""
2513 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2515 InsertHandler
= staticmethod(InsertHandler
)
2516 def RemoveHandler(*args
, **kwargs
):
2517 """RemoveHandler(String name) -> bool"""
2518 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2520 RemoveHandler
= staticmethod(RemoveHandler
)
2521 def GetImageExtWildcard(*args
, **kwargs
):
2522 """GetImageExtWildcard() -> String"""
2523 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2525 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2526 def ConvertToBitmap(*args
, **kwargs
):
2527 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2528 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2530 def ConvertToMonoBitmap(*args
, **kwargs
):
2531 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2532 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2534 def __nonzero__(self
): return self
.Ok()
2536 class ImagePtr(Image
):
2537 def __init__(self
, this
):
2539 if not hasattr(self
,"thisown"): self
.thisown
= 0
2540 self
.__class
__ = Image
2541 _core_
.Image_swigregister(ImagePtr
)
2543 def ImageFromMime(*args
, **kwargs
):
2544 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2545 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2549 def ImageFromStream(*args
, **kwargs
):
2550 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2551 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2555 def ImageFromStreamMime(*args
, **kwargs
):
2556 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2557 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2561 def EmptyImage(*args
, **kwargs
):
2563 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2565 Construct an empty image of a given size, optionally setting all
2568 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2572 def ImageFromBitmap(*args
, **kwargs
):
2574 ImageFromBitmap(Bitmap bitmap) -> Image
2576 Construct an Image from a `wx.Bitmap`.
2578 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2582 def ImageFromData(*args
, **kwargs
):
2584 ImageFromData(int width, int height, buffer data) -> Image
2586 Construct an Image from a buffer of RGB bytes. Accepts either a
2587 string or a buffer object holding the data and the length of the data
2588 must be width*height*3.
2590 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2594 def ImageFromDataWithAlpha(*args
, **kwargs
):
2596 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
2598 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2599 Accepts either a string or a buffer object holding the data and the
2600 length of the data must be width*height*3.
2602 val
= _core_
.new_ImageFromDataWithAlpha(*args
, **kwargs
)
2606 def Image_CanRead(*args
, **kwargs
):
2607 """Image_CanRead(String name) -> bool"""
2608 return _core_
.Image_CanRead(*args
, **kwargs
)
2610 def Image_GetImageCount(*args
, **kwargs
):
2611 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2612 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2614 def Image_CanReadStream(*args
, **kwargs
):
2615 """Image_CanReadStream(InputStream stream) -> bool"""
2616 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2618 def Image_AddHandler(*args
, **kwargs
):
2619 """Image_AddHandler(ImageHandler handler)"""
2620 return _core_
.Image_AddHandler(*args
, **kwargs
)
2622 def Image_InsertHandler(*args
, **kwargs
):
2623 """Image_InsertHandler(ImageHandler handler)"""
2624 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2626 def Image_RemoveHandler(*args
, **kwargs
):
2627 """Image_RemoveHandler(String name) -> bool"""
2628 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2630 def Image_GetImageExtWildcard(*args
, **kwargs
):
2631 """Image_GetImageExtWildcard() -> String"""
2632 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2634 def InitAllImageHandlers():
2636 The former functionality of InitAllImageHanders is now done internal to
2637 the _core_ extension module and so this function has become a simple NOP.
2641 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2642 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2643 PNG_TYPE_COLOUR
= _core_
.PNG_TYPE_COLOUR
2644 PNG_TYPE_GREY
= _core_
.PNG_TYPE_GREY
2645 PNG_TYPE_GREY_RED
= _core_
.PNG_TYPE_GREY_RED
2646 BMP_24BPP
= _core_
.BMP_24BPP
2647 BMP_8BPP
= _core_
.BMP_8BPP
2648 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2649 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2650 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2651 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2652 BMP_4BPP
= _core_
.BMP_4BPP
2653 BMP_1BPP
= _core_
.BMP_1BPP
2654 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2655 class BMPHandler(ImageHandler
):
2656 """Proxy of C++ BMPHandler class"""
2658 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2659 def __init__(self
, *args
, **kwargs
):
2660 """__init__(self) -> BMPHandler"""
2661 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2662 self
.this
= newobj
.this
2666 class BMPHandlerPtr(BMPHandler
):
2667 def __init__(self
, this
):
2669 if not hasattr(self
,"thisown"): self
.thisown
= 0
2670 self
.__class
__ = BMPHandler
2671 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2672 NullImage
= cvar
.NullImage
2673 IMAGE_OPTION_FILENAME
= cvar
.IMAGE_OPTION_FILENAME
2674 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2675 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2676 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2677 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2678 IMAGE_OPTION_RESOLUTIONX
= cvar
.IMAGE_OPTION_RESOLUTIONX
2679 IMAGE_OPTION_RESOLUTIONY
= cvar
.IMAGE_OPTION_RESOLUTIONY
2680 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2681 IMAGE_OPTION_QUALITY
= cvar
.IMAGE_OPTION_QUALITY
2682 IMAGE_OPTION_BITSPERSAMPLE
= cvar
.IMAGE_OPTION_BITSPERSAMPLE
2683 IMAGE_OPTION_SAMPLESPERPIXEL
= cvar
.IMAGE_OPTION_SAMPLESPERPIXEL
2684 IMAGE_OPTION_COMPRESSION
= cvar
.IMAGE_OPTION_COMPRESSION
2685 IMAGE_OPTION_IMAGEDESCRIPTOR
= cvar
.IMAGE_OPTION_IMAGEDESCRIPTOR
2686 IMAGE_OPTION_PNG_FORMAT
= cvar
.IMAGE_OPTION_PNG_FORMAT
2687 IMAGE_OPTION_PNG_BITDEPTH
= cvar
.IMAGE_OPTION_PNG_BITDEPTH
2689 class ICOHandler(BMPHandler
):
2690 """Proxy of C++ ICOHandler class"""
2692 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2693 def __init__(self
, *args
, **kwargs
):
2694 """__init__(self) -> ICOHandler"""
2695 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2696 self
.this
= newobj
.this
2700 class ICOHandlerPtr(ICOHandler
):
2701 def __init__(self
, this
):
2703 if not hasattr(self
,"thisown"): self
.thisown
= 0
2704 self
.__class
__ = ICOHandler
2705 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2707 class CURHandler(ICOHandler
):
2708 """Proxy of C++ CURHandler class"""
2710 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2711 def __init__(self
, *args
, **kwargs
):
2712 """__init__(self) -> CURHandler"""
2713 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2714 self
.this
= newobj
.this
2718 class CURHandlerPtr(CURHandler
):
2719 def __init__(self
, this
):
2721 if not hasattr(self
,"thisown"): self
.thisown
= 0
2722 self
.__class
__ = CURHandler
2723 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2725 class ANIHandler(CURHandler
):
2726 """Proxy of C++ ANIHandler class"""
2728 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2729 def __init__(self
, *args
, **kwargs
):
2730 """__init__(self) -> ANIHandler"""
2731 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2732 self
.this
= newobj
.this
2736 class ANIHandlerPtr(ANIHandler
):
2737 def __init__(self
, this
):
2739 if not hasattr(self
,"thisown"): self
.thisown
= 0
2740 self
.__class
__ = ANIHandler
2741 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2743 class PNGHandler(ImageHandler
):
2744 """Proxy of C++ PNGHandler class"""
2746 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2747 def __init__(self
, *args
, **kwargs
):
2748 """__init__(self) -> PNGHandler"""
2749 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2750 self
.this
= newobj
.this
2754 class PNGHandlerPtr(PNGHandler
):
2755 def __init__(self
, this
):
2757 if not hasattr(self
,"thisown"): self
.thisown
= 0
2758 self
.__class
__ = PNGHandler
2759 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2761 class GIFHandler(ImageHandler
):
2762 """Proxy of C++ GIFHandler class"""
2764 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2765 def __init__(self
, *args
, **kwargs
):
2766 """__init__(self) -> GIFHandler"""
2767 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2768 self
.this
= newobj
.this
2772 class GIFHandlerPtr(GIFHandler
):
2773 def __init__(self
, this
):
2775 if not hasattr(self
,"thisown"): self
.thisown
= 0
2776 self
.__class
__ = GIFHandler
2777 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2779 class PCXHandler(ImageHandler
):
2780 """Proxy of C++ PCXHandler class"""
2782 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2783 def __init__(self
, *args
, **kwargs
):
2784 """__init__(self) -> PCXHandler"""
2785 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2786 self
.this
= newobj
.this
2790 class PCXHandlerPtr(PCXHandler
):
2791 def __init__(self
, this
):
2793 if not hasattr(self
,"thisown"): self
.thisown
= 0
2794 self
.__class
__ = PCXHandler
2795 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2797 class JPEGHandler(ImageHandler
):
2798 """Proxy of C++ JPEGHandler class"""
2800 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2801 def __init__(self
, *args
, **kwargs
):
2802 """__init__(self) -> JPEGHandler"""
2803 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2804 self
.this
= newobj
.this
2808 class JPEGHandlerPtr(JPEGHandler
):
2809 def __init__(self
, this
):
2811 if not hasattr(self
,"thisown"): self
.thisown
= 0
2812 self
.__class
__ = JPEGHandler
2813 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2815 class PNMHandler(ImageHandler
):
2816 """Proxy of C++ PNMHandler class"""
2818 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2819 def __init__(self
, *args
, **kwargs
):
2820 """__init__(self) -> PNMHandler"""
2821 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2822 self
.this
= newobj
.this
2826 class PNMHandlerPtr(PNMHandler
):
2827 def __init__(self
, this
):
2829 if not hasattr(self
,"thisown"): self
.thisown
= 0
2830 self
.__class
__ = PNMHandler
2831 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2833 class XPMHandler(ImageHandler
):
2834 """Proxy of C++ XPMHandler class"""
2836 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2837 def __init__(self
, *args
, **kwargs
):
2838 """__init__(self) -> XPMHandler"""
2839 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2840 self
.this
= newobj
.this
2844 class XPMHandlerPtr(XPMHandler
):
2845 def __init__(self
, this
):
2847 if not hasattr(self
,"thisown"): self
.thisown
= 0
2848 self
.__class
__ = XPMHandler
2849 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2851 class TIFFHandler(ImageHandler
):
2852 """Proxy of C++ TIFFHandler class"""
2854 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2855 def __init__(self
, *args
, **kwargs
):
2856 """__init__(self) -> TIFFHandler"""
2857 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2858 self
.this
= newobj
.this
2862 class TIFFHandlerPtr(TIFFHandler
):
2863 def __init__(self
, this
):
2865 if not hasattr(self
,"thisown"): self
.thisown
= 0
2866 self
.__class
__ = TIFFHandler
2867 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2869 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2870 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2871 class Quantize(object):
2872 """Performs quantization, or colour reduction, on a wxImage."""
2873 def __init__(self
): raise RuntimeError, "No constructor defined"
2875 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2876 def Quantize(*args
, **kwargs
):
2878 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2880 Reduce the colours in the source image and put the result into the
2881 destination image, setting the palette in the destination if
2882 needed. Both images may be the same, to overwrite the source image.
2884 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2886 Quantize
= staticmethod(Quantize
)
2888 class QuantizePtr(Quantize
):
2889 def __init__(self
, this
):
2891 if not hasattr(self
,"thisown"): self
.thisown
= 0
2892 self
.__class
__ = Quantize
2893 _core_
.Quantize_swigregister(QuantizePtr
)
2895 def Quantize_Quantize(*args
, **kwargs
):
2897 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2899 Reduce the colours in the source image and put the result into the
2900 destination image, setting the palette in the destination if
2901 needed. Both images may be the same, to overwrite the source image.
2903 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2905 #---------------------------------------------------------------------------
2907 class EvtHandler(Object
):
2908 """Proxy of C++ EvtHandler class"""
2910 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2911 def __init__(self
, *args
, **kwargs
):
2912 """__init__(self) -> EvtHandler"""
2913 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2914 self
.this
= newobj
.this
2917 def GetNextHandler(*args
, **kwargs
):
2918 """GetNextHandler(self) -> EvtHandler"""
2919 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2921 def GetPreviousHandler(*args
, **kwargs
):
2922 """GetPreviousHandler(self) -> EvtHandler"""
2923 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2925 def SetNextHandler(*args
, **kwargs
):
2926 """SetNextHandler(self, EvtHandler handler)"""
2927 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2929 def SetPreviousHandler(*args
, **kwargs
):
2930 """SetPreviousHandler(self, EvtHandler handler)"""
2931 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2933 def GetEvtHandlerEnabled(*args
, **kwargs
):
2934 """GetEvtHandlerEnabled(self) -> bool"""
2935 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2937 def SetEvtHandlerEnabled(*args
, **kwargs
):
2938 """SetEvtHandlerEnabled(self, bool enabled)"""
2939 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2941 def ProcessEvent(*args
, **kwargs
):
2942 """ProcessEvent(self, Event event) -> bool"""
2943 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2945 def AddPendingEvent(*args
, **kwargs
):
2946 """AddPendingEvent(self, Event event)"""
2947 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2949 def ProcessPendingEvents(*args
, **kwargs
):
2950 """ProcessPendingEvents(self)"""
2951 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2953 def Connect(*args
, **kwargs
):
2954 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2955 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
2957 def Disconnect(*args
, **kwargs
):
2958 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2959 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
2961 def _setOORInfo(*args
, **kwargs
):
2962 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2963 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
2965 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2967 Bind an event to an event handler.
2969 :param event: One of the EVT_* objects that specifies the
2970 type of event to bind,
2972 :param handler: A callable object to be invoked when the
2973 event is delivered to self. Pass None to
2974 disconnect an event handler.
2976 :param source: Sometimes the event originates from a
2977 different window than self, but you still
2978 want to catch it in self. (For example, a
2979 button event delivered to a frame.) By
2980 passing the source of the event, the event
2981 handling system is able to differentiate
2982 between the same event type from different
2985 :param id: Used to spcify the event source by ID instead
2988 :param id2: Used when it is desirable to bind a handler
2989 to a range of IDs, such as with EVT_MENU_RANGE.
2991 if source
is not None:
2993 event
.Bind(self
, id, id2
, handler
)
2995 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2997 Disconencts the event handler binding for event from self.
2998 Returns True if successful.
3000 if source
is not None:
3002 return event
.Unbind(self
, id, id2
)
3005 class EvtHandlerPtr(EvtHandler
):
3006 def __init__(self
, this
):
3008 if not hasattr(self
,"thisown"): self
.thisown
= 0
3009 self
.__class
__ = EvtHandler
3010 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
3012 #---------------------------------------------------------------------------
3014 class PyEventBinder(object):
3016 Instances of this class are used to bind specific events to event
3019 def __init__(self
, evtType
, expectedIDs
=0):
3020 if expectedIDs
not in [0, 1, 2]:
3021 raise ValueError, "Invalid number of expectedIDs"
3022 self
.expectedIDs
= expectedIDs
3024 if type(evtType
) == list or type(evtType
) == tuple:
3025 self
.evtType
= evtType
3027 self
.evtType
= [evtType
]
3030 def Bind(self
, target
, id1
, id2
, function
):
3031 """Bind this set of event types to target."""
3032 for et
in self
.evtType
:
3033 target
.Connect(id1
, id2
, et
, function
)
3036 def Unbind(self
, target
, id1
, id2
):
3037 """Remove an event binding."""
3039 for et
in self
.evtType
:
3040 success
+= target
.Disconnect(id1
, id2
, et
)
3044 def __call__(self
, *args
):
3046 For backwards compatibility with the old EVT_* functions.
3047 Should be called with either (window, func), (window, ID,
3048 func) or (window, ID1, ID2, func) parameters depending on the
3051 assert len(args
) == 2 + self
.expectedIDs
3055 if self
.expectedIDs
== 0:
3057 elif self
.expectedIDs
== 1:
3060 elif self
.expectedIDs
== 2:
3065 raise ValueError, "Unexpected number of IDs"
3067 self
.Bind(target
, id1
, id2
, func
)
3070 # These two are square pegs that don't fit the PyEventBinder hole...
3071 def EVT_COMMAND(win
, id, cmd
, func
):
3072 win
.Connect(id, -1, cmd
, func
)
3073 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
3074 win
.Connect(id1
, id2
, cmd
, func
)
3077 #---------------------------------------------------------------------------
3079 #---------------------------------------------------------------------------
3081 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
3082 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
3084 def NewEventType(*args
, **kwargs
):
3085 """NewEventType() -> wxEventType"""
3086 return _core_
.NewEventType(*args
, **kwargs
)
3087 wxEVT_NULL
= _core_
.wxEVT_NULL
3088 wxEVT_FIRST
= _core_
.wxEVT_FIRST
3089 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
3090 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
3091 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
3092 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
3093 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
3094 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3095 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3096 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
3097 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
3098 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
3099 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
3100 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3101 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
3102 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
3103 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
3104 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
3105 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
3106 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
3107 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
3108 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
3109 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
3110 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
3111 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
3112 wxEVT_MOTION
= _core_
.wxEVT_MOTION
3113 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
3114 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
3115 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
3116 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
3117 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
3118 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
3119 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
3120 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
3121 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
3122 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
3123 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
3124 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
3125 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
3126 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
3127 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
3128 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
3129 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
3130 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
3131 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
3132 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
3133 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
3134 wxEVT_CHAR
= _core_
.wxEVT_CHAR
3135 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
3136 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
3137 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
3138 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
3139 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
3140 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
3141 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
3142 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
3143 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
3144 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
3145 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
3146 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
3147 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
3148 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
3149 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
3150 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
3151 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
3152 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
3153 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
3154 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
3155 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
3156 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
3157 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
3158 wxEVT_SIZE
= _core_
.wxEVT_SIZE
3159 wxEVT_MOVE
= _core_
.wxEVT_MOVE
3160 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
3161 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
3162 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
3163 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
3164 wxEVT_POWER
= _core_
.wxEVT_POWER
3165 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
3166 wxEVT_CREATE
= _core_
.wxEVT_CREATE
3167 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
3168 wxEVT_SHOW
= _core_
.wxEVT_SHOW
3169 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
3170 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
3171 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
3172 wxEVT_PAINT
= _core_
.wxEVT_PAINT
3173 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
3174 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
3175 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
3176 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
3177 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
3178 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
3179 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
3180 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
3181 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
3182 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
3183 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
3184 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
3185 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
3186 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
3187 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
3188 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
3189 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
3190 wxEVT_IDLE
= _core_
.wxEVT_IDLE
3191 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
3192 wxEVT_SIZING
= _core_
.wxEVT_SIZING
3193 wxEVT_MOVING
= _core_
.wxEVT_MOVING
3194 wxEVT_HIBERNATE
= _core_
.wxEVT_HIBERNATE
3195 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
3196 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
3197 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
3198 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
3199 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
3200 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
3201 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
3203 # Create some event binders
3204 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
3205 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
3206 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
3207 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
3208 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
3209 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3210 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3211 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
3212 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
3213 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
3214 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
3215 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
3216 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
3217 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
3218 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
3219 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
3220 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
3221 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
3222 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
3223 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
3224 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
3225 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
3226 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
3227 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
3228 EVT_HIBERNATE
= wx
.PyEventBinder( wxEVT_HIBERNATE
)
3229 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3230 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3231 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
3232 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
3233 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
3234 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
3235 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
3236 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
3237 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
3238 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
3239 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
3240 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
3241 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
3242 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
3243 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
3244 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
3246 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
3247 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
3248 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
3249 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
3250 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
3251 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
3252 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
3253 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
3254 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
3255 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
3256 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
3257 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
3258 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
3260 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3268 wxEVT_MIDDLE_DCLICK
,
3276 # Scrolling from wxWindow (sent to wxScrolledWindow)
3277 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3278 wxEVT_SCROLLWIN_BOTTOM
,
3279 wxEVT_SCROLLWIN_LINEUP
,
3280 wxEVT_SCROLLWIN_LINEDOWN
,
3281 wxEVT_SCROLLWIN_PAGEUP
,
3282 wxEVT_SCROLLWIN_PAGEDOWN
,
3283 wxEVT_SCROLLWIN_THUMBTRACK
,
3284 wxEVT_SCROLLWIN_THUMBRELEASE
,
3287 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3288 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3289 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3290 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3291 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3292 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3293 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3294 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3296 # Scrolling from wxSlider and wxScrollBar
3297 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3298 wxEVT_SCROLL_BOTTOM
,
3299 wxEVT_SCROLL_LINEUP
,
3300 wxEVT_SCROLL_LINEDOWN
,
3301 wxEVT_SCROLL_PAGEUP
,
3302 wxEVT_SCROLL_PAGEDOWN
,
3303 wxEVT_SCROLL_THUMBTRACK
,
3304 wxEVT_SCROLL_THUMBRELEASE
,
3305 wxEVT_SCROLL_ENDSCROLL
,
3308 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3309 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3310 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3311 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3312 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3313 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3314 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3315 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3316 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3318 # Scrolling from wxSlider and wxScrollBar, with an id
3319 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3320 wxEVT_SCROLL_BOTTOM
,
3321 wxEVT_SCROLL_LINEUP
,
3322 wxEVT_SCROLL_LINEDOWN
,
3323 wxEVT_SCROLL_PAGEUP
,
3324 wxEVT_SCROLL_PAGEDOWN
,
3325 wxEVT_SCROLL_THUMBTRACK
,
3326 wxEVT_SCROLL_THUMBRELEASE
,
3327 wxEVT_SCROLL_ENDSCROLL
,
3330 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3331 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3332 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3333 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3334 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3335 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3336 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3337 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3338 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3340 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3341 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3342 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3343 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3344 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3345 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3346 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3347 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3348 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3349 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3351 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3352 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3353 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3354 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3355 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3356 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3357 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3358 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3359 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3362 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3363 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3364 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3365 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3366 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3367 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3368 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3370 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3372 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3373 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3375 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3379 #---------------------------------------------------------------------------
3381 class Event(Object
):
3382 """Proxy of C++ Event class"""
3383 def __init__(self
): raise RuntimeError, "No constructor defined"
3385 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3386 def __del__(self
, destroy
=_core_
.delete_Event
):
3389 if self
.thisown
: destroy(self
)
3392 def SetEventType(*args
, **kwargs
):
3393 """SetEventType(self, wxEventType typ)"""
3394 return _core_
.Event_SetEventType(*args
, **kwargs
)
3396 def GetEventType(*args
, **kwargs
):
3397 """GetEventType(self) -> wxEventType"""
3398 return _core_
.Event_GetEventType(*args
, **kwargs
)
3400 def GetEventObject(*args
, **kwargs
):
3401 """GetEventObject(self) -> Object"""
3402 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3404 def SetEventObject(*args
, **kwargs
):
3405 """SetEventObject(self, Object obj)"""
3406 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3408 def GetTimestamp(*args
, **kwargs
):
3409 """GetTimestamp(self) -> long"""
3410 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3412 def SetTimestamp(*args
, **kwargs
):
3413 """SetTimestamp(self, long ts=0)"""
3414 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3416 def GetId(*args
, **kwargs
):
3417 """GetId(self) -> int"""
3418 return _core_
.Event_GetId(*args
, **kwargs
)
3420 def SetId(*args
, **kwargs
):
3421 """SetId(self, int Id)"""
3422 return _core_
.Event_SetId(*args
, **kwargs
)
3424 def IsCommandEvent(*args
, **kwargs
):
3425 """IsCommandEvent(self) -> bool"""
3426 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3428 def Skip(*args
, **kwargs
):
3430 Skip(self, bool skip=True)
3432 Called by an event handler, it controls whether additional event
3433 handlers bound to this event will be called after the current event
3434 handler returns. Skip(false) (the default setting) will prevent
3435 additional event handlers from being called and control will be
3436 returned to the sender of the event immediately after the current
3437 handler has finished. Skip(True) will cause the event processing
3438 system to continue searching for a handler function for this event.
3441 return _core_
.Event_Skip(*args
, **kwargs
)
3443 def GetSkipped(*args
, **kwargs
):
3444 """GetSkipped(self) -> bool"""
3445 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3447 def ShouldPropagate(*args
, **kwargs
):
3448 """ShouldPropagate(self) -> bool"""
3449 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3451 def StopPropagation(*args
, **kwargs
):
3452 """StopPropagation(self) -> int"""
3453 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3455 def ResumePropagation(*args
, **kwargs
):
3456 """ResumePropagation(self, int propagationLevel)"""
3457 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3459 def Clone(*args
, **kwargs
):
3460 """Clone(self) -> Event"""
3461 return _core_
.Event_Clone(*args
, **kwargs
)
3464 class EventPtr(Event
):
3465 def __init__(self
, this
):
3467 if not hasattr(self
,"thisown"): self
.thisown
= 0
3468 self
.__class
__ = Event
3469 _core_
.Event_swigregister(EventPtr
)
3471 #---------------------------------------------------------------------------
3473 class PropagationDisabler(object):
3474 """Proxy of C++ PropagationDisabler class"""
3476 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3477 def __init__(self
, *args
, **kwargs
):
3478 """__init__(self, Event event) -> PropagationDisabler"""
3479 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3480 self
.this
= newobj
.this
3483 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3486 if self
.thisown
: destroy(self
)
3490 class PropagationDisablerPtr(PropagationDisabler
):
3491 def __init__(self
, this
):
3493 if not hasattr(self
,"thisown"): self
.thisown
= 0
3494 self
.__class
__ = PropagationDisabler
3495 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3497 class PropagateOnce(object):
3498 """Proxy of C++ PropagateOnce class"""
3500 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3501 def __init__(self
, *args
, **kwargs
):
3502 """__init__(self, Event event) -> PropagateOnce"""
3503 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3504 self
.this
= newobj
.this
3507 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3510 if self
.thisown
: destroy(self
)
3514 class PropagateOncePtr(PropagateOnce
):
3515 def __init__(self
, this
):
3517 if not hasattr(self
,"thisown"): self
.thisown
= 0
3518 self
.__class
__ = PropagateOnce
3519 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3521 #---------------------------------------------------------------------------
3523 class CommandEvent(Event
):
3524 """Proxy of C++ CommandEvent class"""
3526 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3527 def __init__(self
, *args
, **kwargs
):
3528 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3529 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3530 self
.this
= newobj
.this
3533 def GetSelection(*args
, **kwargs
):
3534 """GetSelection(self) -> int"""
3535 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3537 def SetString(*args
, **kwargs
):
3538 """SetString(self, String s)"""
3539 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3541 def GetString(*args
, **kwargs
):
3542 """GetString(self) -> String"""
3543 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3545 def IsChecked(*args
, **kwargs
):
3546 """IsChecked(self) -> bool"""
3547 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3550 def IsSelection(*args
, **kwargs
):
3551 """IsSelection(self) -> bool"""
3552 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3554 def SetExtraLong(*args
, **kwargs
):
3555 """SetExtraLong(self, long extraLong)"""
3556 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3558 def GetExtraLong(*args
, **kwargs
):
3559 """GetExtraLong(self) -> long"""
3560 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3562 def SetInt(*args
, **kwargs
):
3563 """SetInt(self, int i)"""
3564 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3566 def GetInt(*args
, **kwargs
):
3567 """GetInt(self) -> long"""
3568 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3570 def Clone(*args
, **kwargs
):
3571 """Clone(self) -> Event"""
3572 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3575 class CommandEventPtr(CommandEvent
):
3576 def __init__(self
, this
):
3578 if not hasattr(self
,"thisown"): self
.thisown
= 0
3579 self
.__class
__ = CommandEvent
3580 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3582 #---------------------------------------------------------------------------
3584 class NotifyEvent(CommandEvent
):
3585 """Proxy of C++ NotifyEvent class"""
3587 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3588 def __init__(self
, *args
, **kwargs
):
3589 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3590 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3591 self
.this
= newobj
.this
3594 def Veto(*args
, **kwargs
):
3596 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3598 def Allow(*args
, **kwargs
):
3600 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3602 def IsAllowed(*args
, **kwargs
):
3603 """IsAllowed(self) -> bool"""
3604 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3607 class NotifyEventPtr(NotifyEvent
):
3608 def __init__(self
, this
):
3610 if not hasattr(self
,"thisown"): self
.thisown
= 0
3611 self
.__class
__ = NotifyEvent
3612 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3614 #---------------------------------------------------------------------------
3616 class ScrollEvent(CommandEvent
):
3617 """Proxy of C++ ScrollEvent class"""
3619 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3620 def __init__(self
, *args
, **kwargs
):
3622 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3623 int orient=0) -> ScrollEvent
3625 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3626 self
.this
= newobj
.this
3629 def GetOrientation(*args
, **kwargs
):
3630 """GetOrientation(self) -> int"""
3631 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3633 def GetPosition(*args
, **kwargs
):
3634 """GetPosition(self) -> int"""
3635 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3637 def SetOrientation(*args
, **kwargs
):
3638 """SetOrientation(self, int orient)"""
3639 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3641 def SetPosition(*args
, **kwargs
):
3642 """SetPosition(self, int pos)"""
3643 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3646 class ScrollEventPtr(ScrollEvent
):
3647 def __init__(self
, this
):
3649 if not hasattr(self
,"thisown"): self
.thisown
= 0
3650 self
.__class
__ = ScrollEvent
3651 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3653 #---------------------------------------------------------------------------
3655 class ScrollWinEvent(Event
):
3656 """Proxy of C++ ScrollWinEvent class"""
3658 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3659 def __init__(self
, *args
, **kwargs
):
3660 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3661 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3662 self
.this
= newobj
.this
3665 def GetOrientation(*args
, **kwargs
):
3666 """GetOrientation(self) -> int"""
3667 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3669 def GetPosition(*args
, **kwargs
):
3670 """GetPosition(self) -> int"""
3671 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3673 def SetOrientation(*args
, **kwargs
):
3674 """SetOrientation(self, int orient)"""
3675 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3677 def SetPosition(*args
, **kwargs
):
3678 """SetPosition(self, int pos)"""
3679 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3682 class ScrollWinEventPtr(ScrollWinEvent
):
3683 def __init__(self
, this
):
3685 if not hasattr(self
,"thisown"): self
.thisown
= 0
3686 self
.__class
__ = ScrollWinEvent
3687 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3689 #---------------------------------------------------------------------------
3691 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3692 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3693 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3694 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3695 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3696 class MouseEvent(Event
):
3697 """Proxy of C++ MouseEvent class"""
3699 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3700 def __init__(self
, *args
, **kwargs
):
3701 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3702 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3703 self
.this
= newobj
.this
3706 def IsButton(*args
, **kwargs
):
3707 """IsButton(self) -> bool"""
3708 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
3710 def ButtonDown(*args
, **kwargs
):
3711 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3712 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
3714 def ButtonDClick(*args
, **kwargs
):
3715 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3716 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3718 def ButtonUp(*args
, **kwargs
):
3719 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3720 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
3722 def Button(*args
, **kwargs
):
3723 """Button(self, int but) -> bool"""
3724 return _core_
.MouseEvent_Button(*args
, **kwargs
)
3726 def ButtonIsDown(*args
, **kwargs
):
3727 """ButtonIsDown(self, int but) -> bool"""
3728 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3730 def GetButton(*args
, **kwargs
):
3731 """GetButton(self) -> int"""
3732 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
3734 def ControlDown(*args
, **kwargs
):
3735 """ControlDown(self) -> bool"""
3736 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
3738 def MetaDown(*args
, **kwargs
):
3739 """MetaDown(self) -> bool"""
3740 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
3742 def AltDown(*args
, **kwargs
):
3743 """AltDown(self) -> bool"""
3744 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
3746 def ShiftDown(*args
, **kwargs
):
3747 """ShiftDown(self) -> bool"""
3748 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
3750 def CmdDown(*args
, **kwargs
):
3752 CmdDown(self) -> bool
3754 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3755 platforms but the special "Apple" (a.k.a as "Command") key on
3756 Macs: it makes often sense to use it instead of, say, `ControlDown`
3757 because Cmd key is used for the same thing under Mac as Ctrl
3758 elsewhere. The Ctrl still exists, it's just not used for this
3759 purpose. So for non-Mac platforms this is the same as `ControlDown`
3760 and Macs this is the same as `MetaDown`.
3762 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
3764 def LeftDown(*args
, **kwargs
):
3765 """LeftDown(self) -> bool"""
3766 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
3768 def MiddleDown(*args
, **kwargs
):
3769 """MiddleDown(self) -> bool"""
3770 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
3772 def RightDown(*args
, **kwargs
):
3773 """RightDown(self) -> bool"""
3774 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
3776 def LeftUp(*args
, **kwargs
):
3777 """LeftUp(self) -> bool"""
3778 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
3780 def MiddleUp(*args
, **kwargs
):
3781 """MiddleUp(self) -> bool"""
3782 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
3784 def RightUp(*args
, **kwargs
):
3785 """RightUp(self) -> bool"""
3786 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
3788 def LeftDClick(*args
, **kwargs
):
3789 """LeftDClick(self) -> bool"""
3790 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
3792 def MiddleDClick(*args
, **kwargs
):
3793 """MiddleDClick(self) -> bool"""
3794 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3796 def RightDClick(*args
, **kwargs
):
3797 """RightDClick(self) -> bool"""
3798 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
3800 def LeftIsDown(*args
, **kwargs
):
3801 """LeftIsDown(self) -> bool"""
3802 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3804 def MiddleIsDown(*args
, **kwargs
):
3805 """MiddleIsDown(self) -> bool"""
3806 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3808 def RightIsDown(*args
, **kwargs
):
3809 """RightIsDown(self) -> bool"""
3810 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
3812 def Dragging(*args
, **kwargs
):
3813 """Dragging(self) -> bool"""
3814 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
3816 def Moving(*args
, **kwargs
):
3817 """Moving(self) -> bool"""
3818 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
3820 def Entering(*args
, **kwargs
):
3821 """Entering(self) -> bool"""
3822 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
3824 def Leaving(*args
, **kwargs
):
3825 """Leaving(self) -> bool"""
3826 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
3828 def GetPosition(*args
, **kwargs
):
3830 GetPosition(self) -> Point
3832 Returns the position of the mouse in window coordinates when the event
3835 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
3837 def GetPositionTuple(*args
, **kwargs
):
3839 GetPositionTuple() -> (x,y)
3841 Returns the position of the mouse in window coordinates when the event
3844 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3846 def GetLogicalPosition(*args
, **kwargs
):
3847 """GetLogicalPosition(self, DC dc) -> Point"""
3848 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3850 def GetX(*args
, **kwargs
):
3851 """GetX(self) -> int"""
3852 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
3854 def GetY(*args
, **kwargs
):
3855 """GetY(self) -> int"""
3856 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
3858 def GetWheelRotation(*args
, **kwargs
):
3859 """GetWheelRotation(self) -> int"""
3860 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3862 def GetWheelDelta(*args
, **kwargs
):
3863 """GetWheelDelta(self) -> int"""
3864 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3866 def GetLinesPerAction(*args
, **kwargs
):
3867 """GetLinesPerAction(self) -> int"""
3868 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3870 def IsPageScroll(*args
, **kwargs
):
3871 """IsPageScroll(self) -> bool"""
3872 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3874 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
3875 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
3876 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
3877 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
3878 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
3879 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
3880 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
3881 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
3882 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
3883 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
3884 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
3885 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
3887 class MouseEventPtr(MouseEvent
):
3888 def __init__(self
, this
):
3890 if not hasattr(self
,"thisown"): self
.thisown
= 0
3891 self
.__class
__ = MouseEvent
3892 _core_
.MouseEvent_swigregister(MouseEventPtr
)
3894 #---------------------------------------------------------------------------
3896 class SetCursorEvent(Event
):
3897 """Proxy of C++ SetCursorEvent class"""
3899 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3900 def __init__(self
, *args
, **kwargs
):
3901 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3902 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
3903 self
.this
= newobj
.this
3906 def GetX(*args
, **kwargs
):
3907 """GetX(self) -> int"""
3908 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
3910 def GetY(*args
, **kwargs
):
3911 """GetY(self) -> int"""
3912 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
3914 def SetCursor(*args
, **kwargs
):
3915 """SetCursor(self, Cursor cursor)"""
3916 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3918 def GetCursor(*args
, **kwargs
):
3919 """GetCursor(self) -> Cursor"""
3920 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3922 def HasCursor(*args
, **kwargs
):
3923 """HasCursor(self) -> bool"""
3924 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3927 class SetCursorEventPtr(SetCursorEvent
):
3928 def __init__(self
, this
):
3930 if not hasattr(self
,"thisown"): self
.thisown
= 0
3931 self
.__class
__ = SetCursorEvent
3932 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3934 #---------------------------------------------------------------------------
3936 class KeyEvent(Event
):
3937 """Proxy of C++ KeyEvent class"""
3939 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3940 def __init__(self
, *args
, **kwargs
):
3941 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3942 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
3943 self
.this
= newobj
.this
3946 def ControlDown(*args
, **kwargs
):
3947 """ControlDown(self) -> bool"""
3948 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
3950 def MetaDown(*args
, **kwargs
):
3951 """MetaDown(self) -> bool"""
3952 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
3954 def AltDown(*args
, **kwargs
):
3955 """AltDown(self) -> bool"""
3956 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
3958 def ShiftDown(*args
, **kwargs
):
3959 """ShiftDown(self) -> bool"""
3960 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
3962 def CmdDown(*args
, **kwargs
):
3964 CmdDown(self) -> bool
3966 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3967 platforms but the special "Apple" (a.k.a as "Command") key on
3968 Macs: it makes often sense to use it instead of, say, `ControlDown`
3969 because Cmd key is used for the same thing under Mac as Ctrl
3970 elsewhere. The Ctrl still exists, it's just not used for this
3971 purpose. So for non-Mac platforms this is the same as `ControlDown`
3972 and Macs this is the same as `MetaDown`.
3974 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
3976 def HasModifiers(*args
, **kwargs
):
3977 """HasModifiers(self) -> bool"""
3978 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
3980 def GetKeyCode(*args
, **kwargs
):
3981 """GetKeyCode(self) -> int"""
3982 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3984 KeyCode
= GetKeyCode
3985 def GetUnicodeKey(*args
, **kwargs
):
3986 """GetUnicodeKey(self) -> int"""
3987 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
3989 GetUniChar
= GetUnicodeKey
3990 def GetRawKeyCode(*args
, **kwargs
):
3991 """GetRawKeyCode(self) -> unsigned int"""
3992 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3994 def GetRawKeyFlags(*args
, **kwargs
):
3995 """GetRawKeyFlags(self) -> unsigned int"""
3996 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3998 def GetPosition(*args
, **kwargs
):
4000 GetPosition(self) -> Point
4002 Find the position of the event.
4004 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
4006 def GetPositionTuple(*args
, **kwargs
):
4008 GetPositionTuple() -> (x,y)
4010 Find the position of the event.
4012 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
4014 def GetX(*args
, **kwargs
):
4015 """GetX(self) -> int"""
4016 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
4018 def GetY(*args
, **kwargs
):
4019 """GetY(self) -> int"""
4020 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
4022 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
4023 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
4024 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
4025 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
4026 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
4027 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
4028 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
4029 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
4030 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
4031 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
4033 class KeyEventPtr(KeyEvent
):
4034 def __init__(self
, this
):
4036 if not hasattr(self
,"thisown"): self
.thisown
= 0
4037 self
.__class
__ = KeyEvent
4038 _core_
.KeyEvent_swigregister(KeyEventPtr
)
4040 #---------------------------------------------------------------------------
4042 class SizeEvent(Event
):
4043 """Proxy of C++ SizeEvent class"""
4045 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4046 def __init__(self
, *args
, **kwargs
):
4047 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
4048 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
4049 self
.this
= newobj
.this
4052 def GetSize(*args
, **kwargs
):
4053 """GetSize(self) -> Size"""
4054 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
4056 def GetRect(*args
, **kwargs
):
4057 """GetRect(self) -> Rect"""
4058 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
4060 def SetRect(*args
, **kwargs
):
4061 """SetRect(self, Rect rect)"""
4062 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
4064 def SetSize(*args
, **kwargs
):
4065 """SetSize(self, Size size)"""
4066 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
4068 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
4069 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
4071 class SizeEventPtr(SizeEvent
):
4072 def __init__(self
, this
):
4074 if not hasattr(self
,"thisown"): self
.thisown
= 0
4075 self
.__class
__ = SizeEvent
4076 _core_
.SizeEvent_swigregister(SizeEventPtr
)
4078 #---------------------------------------------------------------------------
4080 class MoveEvent(Event
):
4081 """Proxy of C++ MoveEvent class"""
4083 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4084 def __init__(self
, *args
, **kwargs
):
4085 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
4086 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
4087 self
.this
= newobj
.this
4090 def GetPosition(*args
, **kwargs
):
4091 """GetPosition(self) -> Point"""
4092 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
4094 def GetRect(*args
, **kwargs
):
4095 """GetRect(self) -> Rect"""
4096 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
4098 def SetRect(*args
, **kwargs
):
4099 """SetRect(self, Rect rect)"""
4100 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
4102 def SetPosition(*args
, **kwargs
):
4103 """SetPosition(self, Point pos)"""
4104 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
4106 m_pos
= property(GetPosition
, SetPosition
)
4107 m_rect
= property(GetRect
, SetRect
)
4110 class MoveEventPtr(MoveEvent
):
4111 def __init__(self
, this
):
4113 if not hasattr(self
,"thisown"): self
.thisown
= 0
4114 self
.__class
__ = MoveEvent
4115 _core_
.MoveEvent_swigregister(MoveEventPtr
)
4117 #---------------------------------------------------------------------------
4119 class PaintEvent(Event
):
4120 """Proxy of C++ PaintEvent class"""
4122 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4123 def __init__(self
, *args
, **kwargs
):
4124 """__init__(self, int Id=0) -> PaintEvent"""
4125 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
4126 self
.this
= newobj
.this
4130 class PaintEventPtr(PaintEvent
):
4131 def __init__(self
, this
):
4133 if not hasattr(self
,"thisown"): self
.thisown
= 0
4134 self
.__class
__ = PaintEvent
4135 _core_
.PaintEvent_swigregister(PaintEventPtr
)
4137 class NcPaintEvent(Event
):
4138 """Proxy of C++ NcPaintEvent class"""
4140 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4141 def __init__(self
, *args
, **kwargs
):
4142 """__init__(self, int winid=0) -> NcPaintEvent"""
4143 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
4144 self
.this
= newobj
.this
4148 class NcPaintEventPtr(NcPaintEvent
):
4149 def __init__(self
, this
):
4151 if not hasattr(self
,"thisown"): self
.thisown
= 0
4152 self
.__class
__ = NcPaintEvent
4153 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
4155 #---------------------------------------------------------------------------
4157 class EraseEvent(Event
):
4158 """Proxy of C++ EraseEvent class"""
4160 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4161 def __init__(self
, *args
, **kwargs
):
4162 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4163 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
4164 self
.this
= newobj
.this
4167 def GetDC(*args
, **kwargs
):
4168 """GetDC(self) -> DC"""
4169 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
4172 class EraseEventPtr(EraseEvent
):
4173 def __init__(self
, this
):
4175 if not hasattr(self
,"thisown"): self
.thisown
= 0
4176 self
.__class
__ = EraseEvent
4177 _core_
.EraseEvent_swigregister(EraseEventPtr
)
4179 #---------------------------------------------------------------------------
4181 class FocusEvent(Event
):
4182 """Proxy of C++ FocusEvent class"""
4184 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4185 def __init__(self
, *args
, **kwargs
):
4186 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4187 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
4188 self
.this
= newobj
.this
4191 def GetWindow(*args
, **kwargs
):
4192 """GetWindow(self) -> Window"""
4193 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
4195 def SetWindow(*args
, **kwargs
):
4196 """SetWindow(self, Window win)"""
4197 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
4200 class FocusEventPtr(FocusEvent
):
4201 def __init__(self
, this
):
4203 if not hasattr(self
,"thisown"): self
.thisown
= 0
4204 self
.__class
__ = FocusEvent
4205 _core_
.FocusEvent_swigregister(FocusEventPtr
)
4207 #---------------------------------------------------------------------------
4209 class ChildFocusEvent(CommandEvent
):
4210 """Proxy of C++ ChildFocusEvent class"""
4212 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4213 def __init__(self
, *args
, **kwargs
):
4214 """__init__(self, Window win=None) -> ChildFocusEvent"""
4215 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
4216 self
.this
= newobj
.this
4219 def GetWindow(*args
, **kwargs
):
4220 """GetWindow(self) -> Window"""
4221 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
4224 class ChildFocusEventPtr(ChildFocusEvent
):
4225 def __init__(self
, this
):
4227 if not hasattr(self
,"thisown"): self
.thisown
= 0
4228 self
.__class
__ = ChildFocusEvent
4229 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
4231 #---------------------------------------------------------------------------
4233 class ActivateEvent(Event
):
4234 """Proxy of C++ ActivateEvent class"""
4236 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4237 def __init__(self
, *args
, **kwargs
):
4238 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4239 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
4240 self
.this
= newobj
.this
4243 def GetActive(*args
, **kwargs
):
4244 """GetActive(self) -> bool"""
4245 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
4248 class ActivateEventPtr(ActivateEvent
):
4249 def __init__(self
, this
):
4251 if not hasattr(self
,"thisown"): self
.thisown
= 0
4252 self
.__class
__ = ActivateEvent
4253 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
4255 #---------------------------------------------------------------------------
4257 class InitDialogEvent(Event
):
4258 """Proxy of C++ InitDialogEvent class"""
4260 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4261 def __init__(self
, *args
, **kwargs
):
4262 """__init__(self, int Id=0) -> InitDialogEvent"""
4263 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
4264 self
.this
= newobj
.this
4268 class InitDialogEventPtr(InitDialogEvent
):
4269 def __init__(self
, this
):
4271 if not hasattr(self
,"thisown"): self
.thisown
= 0
4272 self
.__class
__ = InitDialogEvent
4273 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
4275 #---------------------------------------------------------------------------
4277 class MenuEvent(Event
):
4278 """Proxy of C++ MenuEvent class"""
4280 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4281 def __init__(self
, *args
, **kwargs
):
4282 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4283 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
4284 self
.this
= newobj
.this
4287 def GetMenuId(*args
, **kwargs
):
4288 """GetMenuId(self) -> int"""
4289 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
4291 def IsPopup(*args
, **kwargs
):
4292 """IsPopup(self) -> bool"""
4293 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4295 def GetMenu(*args
, **kwargs
):
4296 """GetMenu(self) -> Menu"""
4297 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4300 class MenuEventPtr(MenuEvent
):
4301 def __init__(self
, this
):
4303 if not hasattr(self
,"thisown"): self
.thisown
= 0
4304 self
.__class
__ = MenuEvent
4305 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4307 #---------------------------------------------------------------------------
4309 class CloseEvent(Event
):
4310 """Proxy of C++ CloseEvent class"""
4312 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4313 def __init__(self
, *args
, **kwargs
):
4314 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4315 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4316 self
.this
= newobj
.this
4319 def SetLoggingOff(*args
, **kwargs
):
4320 """SetLoggingOff(self, bool logOff)"""
4321 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4323 def GetLoggingOff(*args
, **kwargs
):
4324 """GetLoggingOff(self) -> bool"""
4325 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4327 def Veto(*args
, **kwargs
):
4328 """Veto(self, bool veto=True)"""
4329 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4331 def SetCanVeto(*args
, **kwargs
):
4332 """SetCanVeto(self, bool canVeto)"""
4333 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4335 def CanVeto(*args
, **kwargs
):
4336 """CanVeto(self) -> bool"""
4337 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4339 def GetVeto(*args
, **kwargs
):
4340 """GetVeto(self) -> bool"""
4341 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4344 class CloseEventPtr(CloseEvent
):
4345 def __init__(self
, this
):
4347 if not hasattr(self
,"thisown"): self
.thisown
= 0
4348 self
.__class
__ = CloseEvent
4349 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4351 #---------------------------------------------------------------------------
4353 class ShowEvent(Event
):
4354 """Proxy of C++ ShowEvent class"""
4356 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4357 def __init__(self
, *args
, **kwargs
):
4358 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4359 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4360 self
.this
= newobj
.this
4363 def SetShow(*args
, **kwargs
):
4364 """SetShow(self, bool show)"""
4365 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4367 def GetShow(*args
, **kwargs
):
4368 """GetShow(self) -> bool"""
4369 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4372 class ShowEventPtr(ShowEvent
):
4373 def __init__(self
, this
):
4375 if not hasattr(self
,"thisown"): self
.thisown
= 0
4376 self
.__class
__ = ShowEvent
4377 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4379 #---------------------------------------------------------------------------
4381 class IconizeEvent(Event
):
4382 """Proxy of C++ IconizeEvent class"""
4384 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4385 def __init__(self
, *args
, **kwargs
):
4386 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4387 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4388 self
.this
= newobj
.this
4391 def Iconized(*args
, **kwargs
):
4392 """Iconized(self) -> bool"""
4393 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4396 class IconizeEventPtr(IconizeEvent
):
4397 def __init__(self
, this
):
4399 if not hasattr(self
,"thisown"): self
.thisown
= 0
4400 self
.__class
__ = IconizeEvent
4401 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4403 #---------------------------------------------------------------------------
4405 class MaximizeEvent(Event
):
4406 """Proxy of C++ MaximizeEvent class"""
4408 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4409 def __init__(self
, *args
, **kwargs
):
4410 """__init__(self, int id=0) -> MaximizeEvent"""
4411 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4412 self
.this
= newobj
.this
4416 class MaximizeEventPtr(MaximizeEvent
):
4417 def __init__(self
, this
):
4419 if not hasattr(self
,"thisown"): self
.thisown
= 0
4420 self
.__class
__ = MaximizeEvent
4421 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4423 #---------------------------------------------------------------------------
4425 class DropFilesEvent(Event
):
4426 """Proxy of C++ DropFilesEvent class"""
4427 def __init__(self
): raise RuntimeError, "No constructor defined"
4429 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4430 def GetPosition(*args
, **kwargs
):
4431 """GetPosition(self) -> Point"""
4432 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4434 def GetNumberOfFiles(*args
, **kwargs
):
4435 """GetNumberOfFiles(self) -> int"""
4436 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4438 def GetFiles(*args
, **kwargs
):
4439 """GetFiles(self) -> PyObject"""
4440 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4443 class DropFilesEventPtr(DropFilesEvent
):
4444 def __init__(self
, this
):
4446 if not hasattr(self
,"thisown"): self
.thisown
= 0
4447 self
.__class
__ = DropFilesEvent
4448 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4450 #---------------------------------------------------------------------------
4452 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4453 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4454 class UpdateUIEvent(CommandEvent
):
4455 """Proxy of C++ UpdateUIEvent class"""
4457 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4458 def __init__(self
, *args
, **kwargs
):
4459 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4460 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4461 self
.this
= newobj
.this
4464 def GetChecked(*args
, **kwargs
):
4465 """GetChecked(self) -> bool"""
4466 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4468 def GetEnabled(*args
, **kwargs
):
4469 """GetEnabled(self) -> bool"""
4470 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4472 def GetText(*args
, **kwargs
):
4473 """GetText(self) -> String"""
4474 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4476 def GetSetText(*args
, **kwargs
):
4477 """GetSetText(self) -> bool"""
4478 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4480 def GetSetChecked(*args
, **kwargs
):
4481 """GetSetChecked(self) -> bool"""
4482 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4484 def GetSetEnabled(*args
, **kwargs
):
4485 """GetSetEnabled(self) -> bool"""
4486 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4488 def Check(*args
, **kwargs
):
4489 """Check(self, bool check)"""
4490 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4492 def Enable(*args
, **kwargs
):
4493 """Enable(self, bool enable)"""
4494 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4496 def SetText(*args
, **kwargs
):
4497 """SetText(self, String text)"""
4498 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4500 def SetUpdateInterval(*args
, **kwargs
):
4501 """SetUpdateInterval(long updateInterval)"""
4502 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4504 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4505 def GetUpdateInterval(*args
, **kwargs
):
4506 """GetUpdateInterval() -> long"""
4507 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4509 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4510 def CanUpdate(*args
, **kwargs
):
4511 """CanUpdate(Window win) -> bool"""
4512 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4514 CanUpdate
= staticmethod(CanUpdate
)
4515 def ResetUpdateTime(*args
, **kwargs
):
4516 """ResetUpdateTime()"""
4517 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4519 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4520 def SetMode(*args
, **kwargs
):
4521 """SetMode(int mode)"""
4522 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4524 SetMode
= staticmethod(SetMode
)
4525 def GetMode(*args
, **kwargs
):
4526 """GetMode() -> int"""
4527 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4529 GetMode
= staticmethod(GetMode
)
4531 class UpdateUIEventPtr(UpdateUIEvent
):
4532 def __init__(self
, this
):
4534 if not hasattr(self
,"thisown"): self
.thisown
= 0
4535 self
.__class
__ = UpdateUIEvent
4536 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4538 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4539 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4540 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4542 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4543 """UpdateUIEvent_GetUpdateInterval() -> long"""
4544 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4546 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4547 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4548 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4550 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4551 """UpdateUIEvent_ResetUpdateTime()"""
4552 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4554 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4555 """UpdateUIEvent_SetMode(int mode)"""
4556 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4558 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4559 """UpdateUIEvent_GetMode() -> int"""
4560 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4562 #---------------------------------------------------------------------------
4564 class SysColourChangedEvent(Event
):
4565 """Proxy of C++ SysColourChangedEvent class"""
4567 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4568 def __init__(self
, *args
, **kwargs
):
4569 """__init__(self) -> SysColourChangedEvent"""
4570 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
4571 self
.this
= newobj
.this
4575 class SysColourChangedEventPtr(SysColourChangedEvent
):
4576 def __init__(self
, this
):
4578 if not hasattr(self
,"thisown"): self
.thisown
= 0
4579 self
.__class
__ = SysColourChangedEvent
4580 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4582 #---------------------------------------------------------------------------
4584 class MouseCaptureChangedEvent(Event
):
4585 """Proxy of C++ MouseCaptureChangedEvent class"""
4587 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4588 def __init__(self
, *args
, **kwargs
):
4589 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4590 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4591 self
.this
= newobj
.this
4594 def GetCapturedWindow(*args
, **kwargs
):
4595 """GetCapturedWindow(self) -> Window"""
4596 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4599 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4600 def __init__(self
, this
):
4602 if not hasattr(self
,"thisown"): self
.thisown
= 0
4603 self
.__class
__ = MouseCaptureChangedEvent
4604 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4606 #---------------------------------------------------------------------------
4608 class DisplayChangedEvent(Event
):
4609 """Proxy of C++ DisplayChangedEvent class"""
4611 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4612 def __init__(self
, *args
, **kwargs
):
4613 """__init__(self) -> DisplayChangedEvent"""
4614 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
4615 self
.this
= newobj
.this
4619 class DisplayChangedEventPtr(DisplayChangedEvent
):
4620 def __init__(self
, this
):
4622 if not hasattr(self
,"thisown"): self
.thisown
= 0
4623 self
.__class
__ = DisplayChangedEvent
4624 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4626 #---------------------------------------------------------------------------
4628 class PaletteChangedEvent(Event
):
4629 """Proxy of C++ PaletteChangedEvent class"""
4631 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4632 def __init__(self
, *args
, **kwargs
):
4633 """__init__(self, int id=0) -> PaletteChangedEvent"""
4634 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
4635 self
.this
= newobj
.this
4638 def SetChangedWindow(*args
, **kwargs
):
4639 """SetChangedWindow(self, Window win)"""
4640 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4642 def GetChangedWindow(*args
, **kwargs
):
4643 """GetChangedWindow(self) -> Window"""
4644 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4647 class PaletteChangedEventPtr(PaletteChangedEvent
):
4648 def __init__(self
, this
):
4650 if not hasattr(self
,"thisown"): self
.thisown
= 0
4651 self
.__class
__ = PaletteChangedEvent
4652 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4654 #---------------------------------------------------------------------------
4656 class QueryNewPaletteEvent(Event
):
4657 """Proxy of C++ QueryNewPaletteEvent class"""
4659 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4660 def __init__(self
, *args
, **kwargs
):
4661 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4662 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4663 self
.this
= newobj
.this
4666 def SetPaletteRealized(*args
, **kwargs
):
4667 """SetPaletteRealized(self, bool realized)"""
4668 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4670 def GetPaletteRealized(*args
, **kwargs
):
4671 """GetPaletteRealized(self) -> bool"""
4672 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4675 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4676 def __init__(self
, this
):
4678 if not hasattr(self
,"thisown"): self
.thisown
= 0
4679 self
.__class
__ = QueryNewPaletteEvent
4680 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4682 #---------------------------------------------------------------------------
4684 class NavigationKeyEvent(Event
):
4685 """Proxy of C++ NavigationKeyEvent class"""
4687 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4688 def __init__(self
, *args
, **kwargs
):
4689 """__init__(self) -> NavigationKeyEvent"""
4690 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
4691 self
.this
= newobj
.this
4694 def GetDirection(*args
, **kwargs
):
4695 """GetDirection(self) -> bool"""
4696 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4698 def SetDirection(*args
, **kwargs
):
4699 """SetDirection(self, bool forward)"""
4700 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4702 def IsWindowChange(*args
, **kwargs
):
4703 """IsWindowChange(self) -> bool"""
4704 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4706 def SetWindowChange(*args
, **kwargs
):
4707 """SetWindowChange(self, bool ischange)"""
4708 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4710 def IsFromTab(*args
, **kwargs
):
4711 """IsFromTab(self) -> bool"""
4712 return _core_
.NavigationKeyEvent_IsFromTab(*args
, **kwargs
)
4714 def SetFromTab(*args
, **kwargs
):
4715 """SetFromTab(self, bool bIs)"""
4716 return _core_
.NavigationKeyEvent_SetFromTab(*args
, **kwargs
)
4718 def SetFlags(*args
, **kwargs
):
4719 """SetFlags(self, long flags)"""
4720 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
4722 def GetCurrentFocus(*args
, **kwargs
):
4723 """GetCurrentFocus(self) -> Window"""
4724 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4726 def SetCurrentFocus(*args
, **kwargs
):
4727 """SetCurrentFocus(self, Window win)"""
4728 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4730 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
4731 IsForward
= _core_
.NavigationKeyEvent_IsForward
4732 WinChange
= _core_
.NavigationKeyEvent_WinChange
4733 FromTab
= _core_
.NavigationKeyEvent_FromTab
4735 class NavigationKeyEventPtr(NavigationKeyEvent
):
4736 def __init__(self
, this
):
4738 if not hasattr(self
,"thisown"): self
.thisown
= 0
4739 self
.__class
__ = NavigationKeyEvent
4740 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4742 #---------------------------------------------------------------------------
4744 class WindowCreateEvent(CommandEvent
):
4745 """Proxy of C++ WindowCreateEvent class"""
4747 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4748 def __init__(self
, *args
, **kwargs
):
4749 """__init__(self, Window win=None) -> WindowCreateEvent"""
4750 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
4751 self
.this
= newobj
.this
4754 def GetWindow(*args
, **kwargs
):
4755 """GetWindow(self) -> Window"""
4756 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4759 class WindowCreateEventPtr(WindowCreateEvent
):
4760 def __init__(self
, this
):
4762 if not hasattr(self
,"thisown"): self
.thisown
= 0
4763 self
.__class
__ = WindowCreateEvent
4764 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4766 class WindowDestroyEvent(CommandEvent
):
4767 """Proxy of C++ WindowDestroyEvent class"""
4769 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4770 def __init__(self
, *args
, **kwargs
):
4771 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4772 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
4773 self
.this
= newobj
.this
4776 def GetWindow(*args
, **kwargs
):
4777 """GetWindow(self) -> Window"""
4778 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4781 class WindowDestroyEventPtr(WindowDestroyEvent
):
4782 def __init__(self
, this
):
4784 if not hasattr(self
,"thisown"): self
.thisown
= 0
4785 self
.__class
__ = WindowDestroyEvent
4786 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4788 #---------------------------------------------------------------------------
4790 class ContextMenuEvent(CommandEvent
):
4791 """Proxy of C++ ContextMenuEvent class"""
4793 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4794 def __init__(self
, *args
, **kwargs
):
4795 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4796 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
4797 self
.this
= newobj
.this
4800 def GetPosition(*args
, **kwargs
):
4801 """GetPosition(self) -> Point"""
4802 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4804 def SetPosition(*args
, **kwargs
):
4805 """SetPosition(self, Point pos)"""
4806 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4809 class ContextMenuEventPtr(ContextMenuEvent
):
4810 def __init__(self
, this
):
4812 if not hasattr(self
,"thisown"): self
.thisown
= 0
4813 self
.__class
__ = ContextMenuEvent
4814 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4816 #---------------------------------------------------------------------------
4818 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
4819 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
4820 class IdleEvent(Event
):
4821 """Proxy of C++ IdleEvent class"""
4823 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4824 def __init__(self
, *args
, **kwargs
):
4825 """__init__(self) -> IdleEvent"""
4826 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
4827 self
.this
= newobj
.this
4830 def RequestMore(*args
, **kwargs
):
4831 """RequestMore(self, bool needMore=True)"""
4832 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
4834 def MoreRequested(*args
, **kwargs
):
4835 """MoreRequested(self) -> bool"""
4836 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
4838 def SetMode(*args
, **kwargs
):
4839 """SetMode(int mode)"""
4840 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4842 SetMode
= staticmethod(SetMode
)
4843 def GetMode(*args
, **kwargs
):
4844 """GetMode() -> int"""
4845 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4847 GetMode
= staticmethod(GetMode
)
4848 def CanSend(*args
, **kwargs
):
4849 """CanSend(Window win) -> bool"""
4850 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4852 CanSend
= staticmethod(CanSend
)
4854 class IdleEventPtr(IdleEvent
):
4855 def __init__(self
, this
):
4857 if not hasattr(self
,"thisown"): self
.thisown
= 0
4858 self
.__class
__ = IdleEvent
4859 _core_
.IdleEvent_swigregister(IdleEventPtr
)
4861 def IdleEvent_SetMode(*args
, **kwargs
):
4862 """IdleEvent_SetMode(int mode)"""
4863 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4865 def IdleEvent_GetMode(*args
, **kwargs
):
4866 """IdleEvent_GetMode() -> int"""
4867 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4869 def IdleEvent_CanSend(*args
, **kwargs
):
4870 """IdleEvent_CanSend(Window win) -> bool"""
4871 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4873 #---------------------------------------------------------------------------
4875 class PyEvent(Event
):
4876 """Proxy of C++ PyEvent class"""
4878 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4879 def __init__(self
, *args
, **kwargs
):
4880 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4881 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
4882 self
.this
= newobj
.this
4887 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
4890 if self
.thisown
: destroy(self
)
4893 def SetSelf(*args
, **kwargs
):
4894 """SetSelf(self, PyObject self)"""
4895 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
4897 def GetSelf(*args
, **kwargs
):
4898 """GetSelf(self) -> PyObject"""
4899 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
4902 class PyEventPtr(PyEvent
):
4903 def __init__(self
, this
):
4905 if not hasattr(self
,"thisown"): self
.thisown
= 0
4906 self
.__class
__ = PyEvent
4907 _core_
.PyEvent_swigregister(PyEventPtr
)
4909 class PyCommandEvent(CommandEvent
):
4910 """Proxy of C++ PyCommandEvent class"""
4912 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4913 def __init__(self
, *args
, **kwargs
):
4914 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4915 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
4916 self
.this
= newobj
.this
4921 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
4924 if self
.thisown
: destroy(self
)
4927 def SetSelf(*args
, **kwargs
):
4928 """SetSelf(self, PyObject self)"""
4929 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4931 def GetSelf(*args
, **kwargs
):
4932 """GetSelf(self) -> PyObject"""
4933 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4936 class PyCommandEventPtr(PyCommandEvent
):
4937 def __init__(self
, this
):
4939 if not hasattr(self
,"thisown"): self
.thisown
= 0
4940 self
.__class
__ = PyCommandEvent
4941 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4943 class DateEvent(CommandEvent
):
4944 """Proxy of C++ DateEvent class"""
4946 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4947 def __init__(self
, *args
, **kwargs
):
4948 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4949 newobj
= _core_
.new_DateEvent(*args
, **kwargs
)
4950 self
.this
= newobj
.this
4953 def GetDate(*args
, **kwargs
):
4954 """GetDate(self) -> DateTime"""
4955 return _core_
.DateEvent_GetDate(*args
, **kwargs
)
4957 def SetDate(*args
, **kwargs
):
4958 """SetDate(self, DateTime date)"""
4959 return _core_
.DateEvent_SetDate(*args
, **kwargs
)
4962 class DateEventPtr(DateEvent
):
4963 def __init__(self
, this
):
4965 if not hasattr(self
,"thisown"): self
.thisown
= 0
4966 self
.__class
__ = DateEvent
4967 _core_
.DateEvent_swigregister(DateEventPtr
)
4969 wxEVT_DATE_CHANGED
= _core_
.wxEVT_DATE_CHANGED
4970 EVT_DATE_CHANGED
= wx
.PyEventBinder( wxEVT_DATE_CHANGED
, 1 )
4972 #---------------------------------------------------------------------------
4974 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
4975 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
4976 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
4977 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
4978 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
4979 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
4980 class PyApp(EvtHandler
):
4982 The ``wx.PyApp`` class is an *implementation detail*, please use the
4983 `wx.App` class (or some other derived class) instead.
4986 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4987 def __init__(self
, *args
, **kwargs
):
4989 __init__(self) -> PyApp
4991 Create a new application object, starting the bootstrap process.
4993 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
4994 self
.this
= newobj
.this
4997 self
._setCallbackInfo
(self
, PyApp
)
4998 self
._setOORInfo
(self
)
5000 def __del__(self
, destroy
=_core_
.delete_PyApp
):
5003 if self
.thisown
: destroy(self
)
5006 def _setCallbackInfo(*args
, **kwargs
):
5007 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
5008 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
5010 def GetAppName(*args
, **kwargs
):
5012 GetAppName(self) -> String
5014 Get the application name.
5016 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
5018 def SetAppName(*args
, **kwargs
):
5020 SetAppName(self, String name)
5022 Set the application name. This value may be used automatically by
5023 `wx.Config` and such.
5025 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
5027 def GetClassName(*args
, **kwargs
):
5029 GetClassName(self) -> String
5031 Get the application's class name.
5033 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
5035 def SetClassName(*args
, **kwargs
):
5037 SetClassName(self, String name)
5039 Set the application's class name. This value may be used for
5040 X-resources if applicable for the platform
5042 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
5044 def GetVendorName(*args
, **kwargs
):
5046 GetVendorName(self) -> String
5048 Get the application's vendor name.
5050 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
5052 def SetVendorName(*args
, **kwargs
):
5054 SetVendorName(self, String name)
5056 Set the application's vendor name. This value may be used
5057 automatically by `wx.Config` and such.
5059 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
5061 def GetTraits(*args
, **kwargs
):
5063 GetTraits(self) -> wxAppTraits
5065 Return (and create if necessary) the app traits object to which we
5066 delegate for everything which either should be configurable by the
5067 user (then he can change the default behaviour simply by overriding
5068 CreateTraits() and returning his own traits object) or which is
5069 GUI/console dependent as then wx.AppTraits allows us to abstract the
5070 differences behind the common facade.
5072 :todo: Add support for overriding CreateAppTraits in wxPython.
5074 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
5076 def ProcessPendingEvents(*args
, **kwargs
):
5078 ProcessPendingEvents(self)
5080 Process all events in the Pending Events list -- it is necessary to
5081 call this function to process posted events. This normally happens
5082 during each event loop iteration.
5084 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
5086 def Yield(*args
, **kwargs
):
5088 Yield(self, bool onlyIfNeeded=False) -> bool
5090 Process all currently pending events right now, instead of waiting
5091 until return to the event loop. It is an error to call ``Yield``
5092 recursively unless the value of ``onlyIfNeeded`` is True.
5094 :warning: This function is dangerous as it can lead to unexpected
5095 reentrancies (i.e. when called from an event handler it may
5096 result in calling the same event handler again), use with
5097 extreme care or, better, don't use at all!
5099 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
5102 return _core_
.PyApp_Yield(*args
, **kwargs
)
5104 def WakeUpIdle(*args
, **kwargs
):
5108 Make sure that idle events are sent again.
5109 :see: `wx.WakeUpIdle`
5111 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
5113 def IsMainLoopRunning(*args
, **kwargs
):
5115 IsMainLoopRunning() -> bool
5117 Returns True if we're running the main loop, i.e. if the events can
5118 currently be dispatched.
5120 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5122 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
5123 def MainLoop(*args
, **kwargs
):
5125 MainLoop(self) -> int
5127 Execute the main GUI loop, the function doesn't normally return until
5128 all top level windows have been closed and destroyed.
5130 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
5132 def Exit(*args
, **kwargs
):
5136 Exit the main loop thus terminating the application.
5139 return _core_
.PyApp_Exit(*args
, **kwargs
)
5141 def ExitMainLoop(*args
, **kwargs
):
5145 Exit the main GUI loop during the next iteration of the main
5146 loop, (i.e. it does not stop the program immediately!)
5148 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
5150 def Pending(*args
, **kwargs
):
5152 Pending(self) -> bool
5154 Returns True if there are unprocessed events in the event queue.
5156 return _core_
.PyApp_Pending(*args
, **kwargs
)
5158 def Dispatch(*args
, **kwargs
):
5160 Dispatch(self) -> bool
5162 Process the first event in the event queue (blocks until an event
5163 appears if there are none currently)
5165 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
5167 def ProcessIdle(*args
, **kwargs
):
5169 ProcessIdle(self) -> bool
5171 Called from the MainLoop when the application becomes idle (there are
5172 no pending events) and sends a `wx.IdleEvent` to all interested
5173 parties. Returns True if more idle events are needed, False if not.
5175 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
5177 def SendIdleEvents(*args
, **kwargs
):
5179 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5181 Send idle event to window and all subwindows. Returns True if more
5182 idle time is requested.
5184 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
5186 def IsActive(*args
, **kwargs
):
5188 IsActive(self) -> bool
5190 Return True if our app has focus.
5192 return _core_
.PyApp_IsActive(*args
, **kwargs
)
5194 def SetTopWindow(*args
, **kwargs
):
5196 SetTopWindow(self, Window win)
5198 Set the *main* top level window
5200 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
5202 def GetTopWindow(*args
, **kwargs
):
5204 GetTopWindow(self) -> Window
5206 Return the *main* top level window (if it hadn't been set previously
5207 with SetTopWindow(), will return just some top level window and, if
5208 there not any, will return None)
5210 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
5212 def SetExitOnFrameDelete(*args
, **kwargs
):
5214 SetExitOnFrameDelete(self, bool flag)
5216 Control the exit behaviour: by default, the program will exit the main
5217 loop (and so, usually, terminate) when the last top-level program
5218 window is deleted. Beware that if you disable this behaviour (with
5219 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5220 explicitly from somewhere.
5222 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
5224 def GetExitOnFrameDelete(*args
, **kwargs
):
5226 GetExitOnFrameDelete(self) -> bool
5228 Get the current exit behaviour setting.
5230 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
5232 def SetUseBestVisual(*args
, **kwargs
):
5234 SetUseBestVisual(self, bool flag)
5236 Set whether the app should try to use the best available visual on
5237 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5239 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
5241 def GetUseBestVisual(*args
, **kwargs
):
5243 GetUseBestVisual(self) -> bool
5245 Get current UseBestVisual setting.
5247 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
5249 def SetPrintMode(*args
, **kwargs
):
5250 """SetPrintMode(self, int mode)"""
5251 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
5253 def GetPrintMode(*args
, **kwargs
):
5254 """GetPrintMode(self) -> int"""
5255 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
5257 def SetAssertMode(*args
, **kwargs
):
5259 SetAssertMode(self, int mode)
5261 Set the OnAssert behaviour for debug and hybrid builds.
5263 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
5265 def GetAssertMode(*args
, **kwargs
):
5267 GetAssertMode(self) -> int
5269 Get the current OnAssert behaviour setting.
5271 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
5273 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5274 """GetMacSupportPCMenuShortcuts() -> bool"""
5275 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5277 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
5278 def GetMacAboutMenuItemId(*args
, **kwargs
):
5279 """GetMacAboutMenuItemId() -> long"""
5280 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5282 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
5283 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
5284 """GetMacPreferencesMenuItemId() -> long"""
5285 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5287 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
5288 def GetMacExitMenuItemId(*args
, **kwargs
):
5289 """GetMacExitMenuItemId() -> long"""
5290 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5292 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
5293 def GetMacHelpMenuTitleName(*args
, **kwargs
):
5294 """GetMacHelpMenuTitleName() -> String"""
5295 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5297 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
5298 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5299 """SetMacSupportPCMenuShortcuts(bool val)"""
5300 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5302 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
5303 def SetMacAboutMenuItemId(*args
, **kwargs
):
5304 """SetMacAboutMenuItemId(long val)"""
5305 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5307 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
5308 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
5309 """SetMacPreferencesMenuItemId(long val)"""
5310 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5312 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
5313 def SetMacExitMenuItemId(*args
, **kwargs
):
5314 """SetMacExitMenuItemId(long val)"""
5315 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5317 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
5318 def SetMacHelpMenuTitleName(*args
, **kwargs
):
5319 """SetMacHelpMenuTitleName(String val)"""
5320 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5322 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
5323 def _BootstrapApp(*args
, **kwargs
):
5327 For internal use only
5329 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
5331 def GetComCtl32Version(*args
, **kwargs
):
5333 GetComCtl32Version() -> int
5335 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5336 it wasn't found at all. Raises an exception on non-Windows platforms.
5338 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5340 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
5342 class PyAppPtr(PyApp
):
5343 def __init__(self
, this
):
5345 if not hasattr(self
,"thisown"): self
.thisown
= 0
5346 self
.__class
__ = PyApp
5347 _core_
.PyApp_swigregister(PyAppPtr
)
5349 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5351 PyApp_IsMainLoopRunning() -> bool
5353 Returns True if we're running the main loop, i.e. if the events can
5354 currently be dispatched.
5356 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5358 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5359 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5360 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5362 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5363 """PyApp_GetMacAboutMenuItemId() -> long"""
5364 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5366 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5367 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5368 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5370 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5371 """PyApp_GetMacExitMenuItemId() -> long"""
5372 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5374 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5375 """PyApp_GetMacHelpMenuTitleName() -> String"""
5376 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5378 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5379 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5380 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5382 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5383 """PyApp_SetMacAboutMenuItemId(long val)"""
5384 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5386 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5387 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5388 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5390 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5391 """PyApp_SetMacExitMenuItemId(long val)"""
5392 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5394 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5395 """PyApp_SetMacHelpMenuTitleName(String val)"""
5396 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5398 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5400 PyApp_GetComCtl32Version() -> int
5402 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5403 it wasn't found at all. Raises an exception on non-Windows platforms.
5405 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5407 #---------------------------------------------------------------------------
5410 def Exit(*args
, **kwargs
):
5414 Force an exit of the application. Convenience for wx.GetApp().Exit()
5416 return _core_
.Exit(*args
, **kwargs
)
5418 def Yield(*args
, **kwargs
):
5422 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5424 return _core_
.Yield(*args
, **kwargs
)
5426 def YieldIfNeeded(*args
, **kwargs
):
5428 YieldIfNeeded() -> bool
5430 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5432 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5434 def SafeYield(*args
, **kwargs
):
5436 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5438 This function is similar to `wx.Yield`, except that it disables the
5439 user input to all program windows before calling `wx.Yield` and
5440 re-enables it again afterwards. If ``win`` is not None, this window
5441 will remain enabled, allowing the implementation of some limited user
5444 :Returns: the result of the call to `wx.Yield`.
5446 return _core_
.SafeYield(*args
, **kwargs
)
5448 def WakeUpIdle(*args
, **kwargs
):
5452 Cause the message queue to become empty again, so idle events will be
5455 return _core_
.WakeUpIdle(*args
, **kwargs
)
5457 def PostEvent(*args
, **kwargs
):
5459 PostEvent(EvtHandler dest, Event event)
5461 Send an event to a window or other wx.EvtHandler to be processed
5464 return _core_
.PostEvent(*args
, **kwargs
)
5466 def App_CleanUp(*args
, **kwargs
):
5470 For internal use only, it is used to cleanup after wxWidgets when
5473 return _core_
.App_CleanUp(*args
, **kwargs
)
5475 def GetApp(*args
, **kwargs
):
5479 Return a reference to the current wx.App object.
5481 return _core_
.GetApp(*args
, **kwargs
)
5483 def SetDefaultPyEncoding(*args
, **kwargs
):
5485 SetDefaultPyEncoding(string encoding)
5487 Sets the encoding that wxPython will use when it needs to convert a
5488 Python string or unicode object to or from a wxString.
5490 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5491 but please be aware that the default encoding within the same locale
5492 may be slightly different on different platforms. For example, please
5493 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5494 between the common latin/roman encodings.
5496 return _core_
.SetDefaultPyEncoding(*args
, **kwargs
)
5498 def GetDefaultPyEncoding(*args
, **kwargs
):
5500 GetDefaultPyEncoding() -> string
5502 Gets the current encoding that wxPython will use when it needs to
5503 convert a Python string or unicode object to or from a wxString.
5505 return _core_
.GetDefaultPyEncoding(*args
, **kwargs
)
5506 #----------------------------------------------------------------------
5508 class PyOnDemandOutputWindow
:
5510 A class that can be used for redirecting Python's stdout and
5511 stderr streams. It will do nothing until something is wrriten to
5512 the stream at which point it will create a Frame with a text area
5513 and write the text there.
5515 def __init__(self
, title
= "wxPython: stdout/stderr"):
5518 self
.pos
= wx
.DefaultPosition
5519 self
.size
= (450, 300)
5522 def SetParent(self
, parent
):
5523 """Set the window to be used as the popup Frame's parent."""
5524 self
.parent
= parent
5527 def CreateOutputWindow(self
, st
):
5528 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
5529 style
=wx
.DEFAULT_FRAME_STYLE
)
5530 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
5531 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
5532 self
.text
.AppendText(st
)
5533 self
.frame
.Show(True)
5534 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
5537 def OnCloseWindow(self
, event
):
5538 if self
.frame
is not None:
5539 self
.frame
.Destroy()
5544 # These methods provide the file-like output behaviour.
5545 def write(self
, text
):
5547 Create the output window if needed and write the string to it.
5548 If not called in the context of the gui thread then uses
5549 CallAfter to do the work there.
5551 if self
.frame
is None:
5552 if not wx
.Thread_IsMain():
5553 wx
.CallAfter(self
.CreateOutputWindow
, text
)
5555 self
.CreateOutputWindow(text
)
5557 if not wx
.Thread_IsMain():
5558 wx
.CallAfter(self
.text
.AppendText
, text
)
5560 self
.text
.AppendText(text
)
5564 if self
.frame
is not None:
5565 wx
.CallAfter(self
.frame
.Close
)
5573 #----------------------------------------------------------------------
5575 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5577 class App(wx
.PyApp
):
5579 The ``wx.App`` class represents the application and is used to:
5581 * bootstrap the wxPython system and initialize the underlying
5583 * set and get application-wide properties
5584 * implement the windowing system main message or event loop,
5585 and to dispatch events to window instances
5588 Every application must have a ``wx.App`` instance, and all
5589 creation of UI objects should be delayed until after the
5590 ``wx.App`` object has been created in order to ensure that the gui
5591 platform and wxWidgets have been fully initialized.
5593 Normally you would derive from this class and implement an
5594 ``OnInit`` method that creates a frame and then calls
5595 ``self.SetTopWindow(frame)``.
5597 :see: `wx.PySimpleApp` for a simpler app class that can be used
5601 outputWindowClass
= PyOnDemandOutputWindow
5603 def __init__(self
, redirect
=_defRedirect
, filename
=None,
5604 useBestVisual
=False, clearSigInt
=True):
5606 Construct a ``wx.App`` object.
5608 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5609 redirected? Defaults to True on Windows and Mac, False
5610 otherwise. If `filename` is None then output will be
5611 redirected to a window that pops up as needed. (You can
5612 control what kind of window is created for the output by
5613 resetting the class variable ``outputWindowClass`` to a
5614 class of your choosing.)
5616 :param filename: The name of a file to redirect output to, if
5619 :param useBestVisual: Should the app try to use the best
5620 available visual provided by the system (only relevant on
5621 systems that have more than one visual.) This parameter
5622 must be used instead of calling `SetUseBestVisual` later
5623 on because it must be set before the underlying GUI
5624 toolkit is initialized.
5626 :param clearSigInt: Should SIGINT be cleared? This allows the
5627 app to terminate upon a Ctrl-C in the console like other
5630 :note: You should override OnInit to do applicaition
5631 initialization to ensure that the system, toolkit and
5632 wxWidgets are fully initialized.
5634 wx
.PyApp
.__init
__(self
)
5636 if wx
.Platform
== "__WXMAC__":
5639 if not MacOS
.WMAvailable():
5641 This program needs access to the screen. Please run with 'pythonw',
5642 not 'python', and only when you are logged in on the main display of
5650 # This has to be done before OnInit
5651 self
.SetUseBestVisual(useBestVisual
)
5653 # Set the default handler for SIGINT. This fixes a problem
5654 # where if Ctrl-C is pressed in the console that started this
5655 # app then it will not appear to do anything, (not even send
5656 # KeyboardInterrupt???) but will later segfault on exit. By
5657 # setting the default handler then the app will exit, as
5658 # expected (depending on platform.)
5662 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5666 # Save and redirect the stdio to a window?
5667 self
.stdioWin
= None
5668 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5670 self
.RedirectStdio(filename
)
5672 # Use Python's install prefix as the default
5673 wx
.StandardPaths
.Get().SetInstallPrefix(_sys
.prefix
)
5675 # This finishes the initialization of wxWindows and then calls
5676 # the OnInit that should be present in the derived class
5677 self
._BootstrapApp
()
5682 self
.RestoreStdio() # Just in case the MainLoop was overridden
5687 def SetTopWindow(self
, frame
):
5688 """Set the \"main\" top level window"""
5690 self
.stdioWin
.SetParent(frame
)
5691 wx
.PyApp
.SetTopWindow(self
, frame
)
5695 """Execute the main GUI event loop"""
5696 wx
.PyApp
.MainLoop(self
)
5700 def RedirectStdio(self
, filename
=None):
5701 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5703 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5705 self
.stdioWin
= self
.outputWindowClass()
5706 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5709 def RestoreStdio(self
):
5710 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5713 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
5715 Set the title, position and/or size of the output window if
5716 the stdio has been redirected. This should be called before
5717 any output would cause the output window to be created.
5720 if title
is not None:
5721 self
.stdioWin
.title
= title
5723 self
.stdioWin
.pos
= pos
5724 if size
is not None:
5725 self
.stdioWin
.size
= size
5730 # change from wx.PyApp_XX to wx.App_XX
5731 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
5732 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
5733 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
5734 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
5735 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
5736 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
5737 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
5738 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
5739 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
5740 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
5741 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
5743 #----------------------------------------------------------------------------
5745 class PySimpleApp(wx
.App
):
5747 A simple application class. You can just create one of these and
5748 then then make your top level windows later, and not have to worry
5749 about OnInit. For example::
5751 app = wx.PySimpleApp()
5752 frame = wx.Frame(None, title='Hello World')
5759 def __init__(self
, redirect
=False, filename
=None,
5760 useBestVisual
=False, clearSigInt
=True):
5762 :see: `wx.App.__init__`
5764 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
5771 # Is anybody using this one?
5772 class PyWidgetTester(wx
.App
):
5773 def __init__(self
, size
= (250, 100)):
5775 wx
.App
.__init
__(self
, 0)
5778 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5779 self
.SetTopWindow(self
.frame
)
5782 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
5783 w
= widgetClass(self
.frame
, *args
, **kwargs
)
5784 self
.frame
.Show(True)
5786 #----------------------------------------------------------------------------
5787 # DO NOT hold any other references to this object. This is how we
5788 # know when to cleanup system resources that wxWidgets is holding. When
5789 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5790 # goes to zero and it calls the wx.App_CleanUp function.
5792 class __wxPyCleanup
:
5794 self
.cleanup
= _core_
.App_CleanUp
5798 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5800 ## # another possible solution, but it gets called too early...
5802 ## atexit.register(_core_.wxApp_CleanUp)
5805 #----------------------------------------------------------------------------
5807 #---------------------------------------------------------------------------
5809 class EventLoop(object):
5810 """Proxy of C++ EventLoop class"""
5812 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5813 def __init__(self
, *args
, **kwargs
):
5814 """__init__(self) -> EventLoop"""
5815 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
5816 self
.this
= newobj
.this
5819 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
5822 if self
.thisown
: destroy(self
)
5825 def Run(*args
, **kwargs
):
5826 """Run(self) -> int"""
5827 return _core_
.EventLoop_Run(*args
, **kwargs
)
5829 def Exit(*args
, **kwargs
):
5830 """Exit(self, int rc=0)"""
5831 return _core_
.EventLoop_Exit(*args
, **kwargs
)
5833 def Pending(*args
, **kwargs
):
5834 """Pending(self) -> bool"""
5835 return _core_
.EventLoop_Pending(*args
, **kwargs
)
5837 def Dispatch(*args
, **kwargs
):
5838 """Dispatch(self) -> bool"""
5839 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
5841 def IsRunning(*args
, **kwargs
):
5842 """IsRunning(self) -> bool"""
5843 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
5845 def GetActive(*args
, **kwargs
):
5846 """GetActive() -> EventLoop"""
5847 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5849 GetActive
= staticmethod(GetActive
)
5850 def SetActive(*args
, **kwargs
):
5851 """SetActive(EventLoop loop)"""
5852 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5854 SetActive
= staticmethod(SetActive
)
5856 class EventLoopPtr(EventLoop
):
5857 def __init__(self
, this
):
5859 if not hasattr(self
,"thisown"): self
.thisown
= 0
5860 self
.__class
__ = EventLoop
5861 _core_
.EventLoop_swigregister(EventLoopPtr
)
5863 def EventLoop_GetActive(*args
, **kwargs
):
5864 """EventLoop_GetActive() -> EventLoop"""
5865 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5867 def EventLoop_SetActive(*args
, **kwargs
):
5868 """EventLoop_SetActive(EventLoop loop)"""
5869 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5871 #---------------------------------------------------------------------------
5873 class AcceleratorEntry(object):
5875 A class used to define items in an `wx.AcceleratorTable`. wxPython
5876 programs can choose to use wx.AcceleratorEntry objects, but using a
5877 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5878 as well. See `__init__` for of the tuple values.
5880 :see: `wx.AcceleratorTable`
5883 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5884 def __init__(self
, *args
, **kwargs
):
5886 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5888 Construct a wx.AcceleratorEntry.
5890 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
5891 self
.this
= newobj
.this
5894 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
5897 if self
.thisown
: destroy(self
)
5900 def Set(*args
, **kwargs
):
5902 Set(self, int flags, int keyCode, int cmd)
5904 (Re)set the attributes of a wx.AcceleratorEntry.
5907 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
5909 def GetFlags(*args
, **kwargs
):
5911 GetFlags(self) -> int
5913 Get the AcceleratorEntry's flags.
5915 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5917 def GetKeyCode(*args
, **kwargs
):
5919 GetKeyCode(self) -> int
5921 Get the AcceleratorEntry's keycode.
5923 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5925 def GetCommand(*args
, **kwargs
):
5927 GetCommand(self) -> int
5929 Get the AcceleratorEntry's command ID.
5931 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5934 class AcceleratorEntryPtr(AcceleratorEntry
):
5935 def __init__(self
, this
):
5937 if not hasattr(self
,"thisown"): self
.thisown
= 0
5938 self
.__class
__ = AcceleratorEntry
5939 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5941 class AcceleratorTable(Object
):
5943 An accelerator table allows the application to specify a table of
5944 keyboard shortcuts for menus or other commands. On Windows, menu or
5945 button commands are supported; on GTK, only menu commands are
5949 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5950 def __init__(self
, *args
, **kwargs
):
5952 __init__(entries) -> AcceleratorTable
5954 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5955 items or or of 3-tuples (flags, keyCode, cmdID)
5957 :see: `wx.AcceleratorEntry`
5959 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
5960 self
.this
= newobj
.this
5963 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
5966 if self
.thisown
: destroy(self
)
5969 def Ok(*args
, **kwargs
):
5970 """Ok(self) -> bool"""
5971 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
5974 class AcceleratorTablePtr(AcceleratorTable
):
5975 def __init__(self
, this
):
5977 if not hasattr(self
,"thisown"): self
.thisown
= 0
5978 self
.__class
__ = AcceleratorTable
5979 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5982 def GetAccelFromString(*args
, **kwargs
):
5983 """GetAccelFromString(String label) -> AcceleratorEntry"""
5984 return _core_
.GetAccelFromString(*args
, **kwargs
)
5985 #---------------------------------------------------------------------------
5987 class VisualAttributes(object):
5988 """struct containing all the visual attributes of a control"""
5990 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5991 def __init__(self
, *args
, **kwargs
):
5993 __init__(self) -> VisualAttributes
5995 struct containing all the visual attributes of a control
5997 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
5998 self
.this
= newobj
.this
6001 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
6004 if self
.thisown
: destroy(self
)
6007 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
6008 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
6009 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
6011 class VisualAttributesPtr(VisualAttributes
):
6012 def __init__(self
, this
):
6014 if not hasattr(self
,"thisown"): self
.thisown
= 0
6015 self
.__class
__ = VisualAttributes
6016 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
6017 NullAcceleratorTable
= cvar
.NullAcceleratorTable
6018 PanelNameStr
= cvar
.PanelNameStr
6020 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
6021 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
6022 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
6023 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
6024 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
6025 class Window(EvtHandler
):
6027 wx.Window is the base class for all windows and represents any visible
6028 object on the screen. All controls, top level windows and so on are
6029 wx.Windows. Sizers and device contexts are not however, as they don't
6030 appear on screen themselves.
6034 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
6035 def __init__(self
, *args
, **kwargs
):
6037 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
6038 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
6040 Construct and show a generic Window.
6042 newobj
= _core_
.new_Window(*args
, **kwargs
)
6043 self
.this
= newobj
.this
6046 self
._setOORInfo
(self
)
6048 def Create(*args
, **kwargs
):
6050 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
6051 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
6053 Create the GUI part of the Window for 2-phase creation mode.
6055 return _core_
.Window_Create(*args
, **kwargs
)
6057 def Close(*args
, **kwargs
):
6059 Close(self, bool force=False) -> bool
6061 This function simply generates a EVT_CLOSE event whose handler usually
6062 tries to close the window. It doesn't close the window itself,
6063 however. If force is False (the default) then the window's close
6064 handler will be allowed to veto the destruction of the window.
6066 return _core_
.Window_Close(*args
, **kwargs
)
6068 def Destroy(*args
, **kwargs
):
6070 Destroy(self) -> bool
6072 Destroys the window safely. Frames and dialogs are not destroyed
6073 immediately when this function is called -- they are added to a list
6074 of windows to be deleted on idle time, when all the window's events
6075 have been processed. This prevents problems with events being sent to
6076 non-existent windows.
6078 Returns True if the window has either been successfully deleted, or it
6079 has been added to the list of windows pending real deletion.
6081 return _core_
.Window_Destroy(*args
, **kwargs
)
6083 def DestroyChildren(*args
, **kwargs
):
6085 DestroyChildren(self) -> bool
6087 Destroys all children of a window. Called automatically by the
6090 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
6092 def IsBeingDeleted(*args
, **kwargs
):
6094 IsBeingDeleted(self) -> bool
6096 Is the window in the process of being deleted?
6098 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
6100 def SetTitle(*args
, **kwargs
):
6102 SetTitle(self, String title)
6104 Sets the window's title. Applicable only to frames and dialogs.
6106 return _core_
.Window_SetTitle(*args
, **kwargs
)
6108 def GetTitle(*args
, **kwargs
):
6110 GetTitle(self) -> String
6112 Gets the window's title. Applicable only to frames and dialogs.
6114 return _core_
.Window_GetTitle(*args
, **kwargs
)
6116 def SetLabel(*args
, **kwargs
):
6118 SetLabel(self, String label)
6120 Set the text which the window shows in its label if applicable.
6122 return _core_
.Window_SetLabel(*args
, **kwargs
)
6124 def GetLabel(*args
, **kwargs
):
6126 GetLabel(self) -> String
6128 Generic way of getting a label from any window, for identification
6129 purposes. The interpretation of this function differs from class to
6130 class. For frames and dialogs, the value returned is the title. For
6131 buttons or static text controls, it is the button text. This function
6132 can be useful for meta-programs such as testing tools or special-needs
6133 access programs)which need to identify windows by name.
6135 return _core_
.Window_GetLabel(*args
, **kwargs
)
6137 def SetName(*args
, **kwargs
):
6139 SetName(self, String name)
6141 Sets the window's name. The window name is used for ressource setting
6142 in X, it is not the same as the window title/label
6144 return _core_
.Window_SetName(*args
, **kwargs
)
6146 def GetName(*args
, **kwargs
):
6148 GetName(self) -> String
6150 Returns the windows name. This name is not guaranteed to be unique;
6151 it is up to the programmer to supply an appropriate name in the window
6152 constructor or via wx.Window.SetName.
6154 return _core_
.Window_GetName(*args
, **kwargs
)
6156 def SetWindowVariant(*args
, **kwargs
):
6158 SetWindowVariant(self, int variant)
6160 Sets the variant of the window/font size to use for this window, if
6161 the platform supports variants, for example, wxMac.
6163 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
6165 def GetWindowVariant(*args
, **kwargs
):
6166 """GetWindowVariant(self) -> int"""
6167 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
6169 def SetId(*args
, **kwargs
):
6171 SetId(self, int winid)
6173 Sets the identifier of the window. Each window has an integer
6174 identifier. If the application has not provided one, an identifier
6175 will be generated. Normally, the identifier should be provided on
6176 creation and should not be modified subsequently.
6178 return _core_
.Window_SetId(*args
, **kwargs
)
6180 def GetId(*args
, **kwargs
):
6184 Returns the identifier of the window. Each window has an integer
6185 identifier. If the application has not provided one (or the default Id
6186 -1 is used) then an unique identifier with a negative value will be
6189 return _core_
.Window_GetId(*args
, **kwargs
)
6191 def NewControlId(*args
, **kwargs
):
6193 NewControlId() -> int
6195 Generate a control id for the controls which were not given one.
6197 return _core_
.Window_NewControlId(*args
, **kwargs
)
6199 NewControlId
= staticmethod(NewControlId
)
6200 def NextControlId(*args
, **kwargs
):
6202 NextControlId(int winid) -> int
6204 Get the id of the control following the one with the given
6207 return _core_
.Window_NextControlId(*args
, **kwargs
)
6209 NextControlId
= staticmethod(NextControlId
)
6210 def PrevControlId(*args
, **kwargs
):
6212 PrevControlId(int winid) -> int
6214 Get the id of the control preceding the one with the given
6217 return _core_
.Window_PrevControlId(*args
, **kwargs
)
6219 PrevControlId
= staticmethod(PrevControlId
)
6220 def SetSize(*args
, **kwargs
):
6222 SetSize(self, Size size)
6224 Sets the size of the window in pixels.
6226 return _core_
.Window_SetSize(*args
, **kwargs
)
6228 def SetDimensions(*args
, **kwargs
):
6230 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6232 Sets the position and size of the window in pixels. The sizeFlags
6233 parameter indicates the interpretation of the other params if they are
6236 ======================== ======================================
6237 wx.SIZE_AUTO A -1 indicates that a class-specific
6238 default should be used.
6239 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6240 -1 values are supplied.
6241 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6242 interpreted as real dimensions, not
6244 ======================== ======================================
6247 return _core_
.Window_SetDimensions(*args
, **kwargs
)
6249 def SetRect(*args
, **kwargs
):
6251 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6253 Sets the position and size of the window in pixels using a wx.Rect.
6255 return _core_
.Window_SetRect(*args
, **kwargs
)
6257 def SetSizeWH(*args
, **kwargs
):
6259 SetSizeWH(self, int width, int height)
6261 Sets the size of the window in pixels.
6263 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
6265 def Move(*args
, **kwargs
):
6267 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6269 Moves the window to the given position.
6271 return _core_
.Window_Move(*args
, **kwargs
)
6274 def MoveXY(*args
, **kwargs
):
6276 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6278 Moves the window to the given position.
6280 return _core_
.Window_MoveXY(*args
, **kwargs
)
6282 def SetBestFittingSize(*args
, **kwargs
):
6284 SetBestFittingSize(self, Size size=DefaultSize)
6286 A 'Smart' SetSize that will fill in default size components with the
6287 window's *best size* values. Also set's the minsize for use with sizers.
6289 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
6291 def Raise(*args
, **kwargs
):
6295 Raises the window to the top of the window hierarchy if it is a
6296 managed window (dialog or frame).
6298 return _core_
.Window_Raise(*args
, **kwargs
)
6300 def Lower(*args
, **kwargs
):
6304 Lowers the window to the bottom of the window hierarchy if it is a
6305 managed window (dialog or frame).
6307 return _core_
.Window_Lower(*args
, **kwargs
)
6309 def SetClientSize(*args
, **kwargs
):
6311 SetClientSize(self, Size size)
6313 This sets the size of the window client area in pixels. Using this
6314 function to size a window tends to be more device-independent than
6315 wx.Window.SetSize, since the application need not worry about what
6316 dimensions the border or title bar have when trying to fit the window
6317 around panel items, for example.
6319 return _core_
.Window_SetClientSize(*args
, **kwargs
)
6321 def SetClientSizeWH(*args
, **kwargs
):
6323 SetClientSizeWH(self, int width, int height)
6325 This sets the size of the window client area in pixels. Using this
6326 function to size a window tends to be more device-independent than
6327 wx.Window.SetSize, since the application need not worry about what
6328 dimensions the border or title bar have when trying to fit the window
6329 around panel items, for example.
6331 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
6333 def SetClientRect(*args
, **kwargs
):
6335 SetClientRect(self, Rect rect)
6337 This sets the size of the window client area in pixels. Using this
6338 function to size a window tends to be more device-independent than
6339 wx.Window.SetSize, since the application need not worry about what
6340 dimensions the border or title bar have when trying to fit the window
6341 around panel items, for example.
6343 return _core_
.Window_SetClientRect(*args
, **kwargs
)
6345 def GetPosition(*args
, **kwargs
):
6347 GetPosition(self) -> Point
6349 Get the window's position.
6351 return _core_
.Window_GetPosition(*args
, **kwargs
)
6353 def GetPositionTuple(*args
, **kwargs
):
6355 GetPositionTuple() -> (x,y)
6357 Get the window's position.
6359 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
6361 def GetSize(*args
, **kwargs
):
6363 GetSize(self) -> Size
6365 Get the window size.
6367 return _core_
.Window_GetSize(*args
, **kwargs
)
6369 def GetSizeTuple(*args
, **kwargs
):
6371 GetSizeTuple() -> (width, height)
6373 Get the window size.
6375 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
6377 def GetRect(*args
, **kwargs
):
6379 GetRect(self) -> Rect
6381 Returns the size and position of the window as a wx.Rect object.
6383 return _core_
.Window_GetRect(*args
, **kwargs
)
6385 def GetClientSize(*args
, **kwargs
):
6387 GetClientSize(self) -> Size
6389 This gets the size of the window's 'client area' in pixels. The client
6390 area is the area which may be drawn on by the programmer, excluding
6391 title bar, border, scrollbars, etc.
6393 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6395 def GetClientSizeTuple(*args
, **kwargs
):
6397 GetClientSizeTuple() -> (width, height)
6399 This gets the size of the window's 'client area' in pixels. The client
6400 area is the area which may be drawn on by the programmer, excluding
6401 title bar, border, scrollbars, etc.
6403 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6405 def GetClientAreaOrigin(*args
, **kwargs
):
6407 GetClientAreaOrigin(self) -> Point
6409 Get the origin of the client area of the window relative to the
6410 window's top left corner (the client area may be shifted because of
6411 the borders, scrollbars, other decorations...)
6413 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6415 def GetClientRect(*args
, **kwargs
):
6417 GetClientRect(self) -> Rect
6419 Get the client area position and size as a `wx.Rect` object.
6421 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6423 def GetBestSize(*args
, **kwargs
):
6425 GetBestSize(self) -> Size
6427 This function returns the best acceptable minimal size for the
6428 window, if applicable. For example, for a static text control, it will
6429 be the minimal size such that the control label is not truncated. For
6430 windows containing subwindows (suzh aswx.Panel), the size returned by
6431 this function will be the same as the size the window would have had
6434 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6436 def GetBestSizeTuple(*args
, **kwargs
):
6438 GetBestSizeTuple() -> (width, height)
6440 This function returns the best acceptable minimal size for the
6441 window, if applicable. For example, for a static text control, it will
6442 be the minimal size such that the control label is not truncated. For
6443 windows containing subwindows (suzh aswx.Panel), the size returned by
6444 this function will be the same as the size the window would have had
6447 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6449 def InvalidateBestSize(*args
, **kwargs
):
6451 InvalidateBestSize(self)
6453 Reset the cached best size value so it will be recalculated the next
6456 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6458 def GetBestFittingSize(*args
, **kwargs
):
6460 GetBestFittingSize(self) -> Size
6462 This function will merge the window's best size into the window's
6463 minimum size, giving priority to the min size components, and returns
6467 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6469 def GetAdjustedBestSize(*args
, **kwargs
):
6471 GetAdjustedBestSize(self) -> Size
6473 This method is similar to GetBestSize, except in one
6474 thing. GetBestSize should return the minimum untruncated size of the
6475 window, while this method will return the largest of BestSize and any
6476 user specified minimum size. ie. it is the minimum size the window
6477 should currently be drawn at, not the minimal size it can possibly
6480 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6482 def Center(*args
, **kwargs
):
6484 Center(self, int direction=BOTH)
6486 Centers the window. The parameter specifies the direction for
6487 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6488 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6489 on the entire screen and not on its parent window. If it is a
6490 top-level window and has no parent then it will always be centered
6491 relative to the screen.
6493 return _core_
.Window_Center(*args
, **kwargs
)
6496 def CenterOnScreen(*args
, **kwargs
):
6498 CenterOnScreen(self, int dir=BOTH)
6500 Center on screen (only works for top level windows)
6502 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6504 CentreOnScreen
= CenterOnScreen
6505 def CenterOnParent(*args
, **kwargs
):
6507 CenterOnParent(self, int dir=BOTH)
6509 Center with respect to the the parent window
6511 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6513 CentreOnParent
= CenterOnParent
6514 def Fit(*args
, **kwargs
):
6518 Sizes the window so that it fits around its subwindows. This function
6519 won't do anything if there are no subwindows and will only really work
6520 correctly if sizers are used for the subwindows layout. Also, if the
6521 window has exactly one subwindow it is better (faster and the result
6522 is more precise as Fit adds some margin to account for fuzziness of
6523 its calculations) to call window.SetClientSize(child.GetSize())
6524 instead of calling Fit.
6526 return _core_
.Window_Fit(*args
, **kwargs
)
6528 def FitInside(*args
, **kwargs
):
6532 Similar to Fit, but sizes the interior (virtual) size of a
6533 window. Mainly useful with scrolled windows to reset scrollbars after
6534 sizing changes that do not trigger a size event, and/or scrolled
6535 windows without an interior sizer. This function similarly won't do
6536 anything if there are no subwindows.
6538 return _core_
.Window_FitInside(*args
, **kwargs
)
6540 def SetSizeHints(*args
, **kwargs
):
6542 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6545 Allows specification of minimum and maximum window sizes, and window
6546 size increments. If a pair of values is not set (or set to -1), the
6547 default values will be used. If this function is called, the user
6548 will not be able to size the window outside the given bounds (if it is
6549 a top-level window.) Sizers will also inspect the minimum window size
6550 and will use that value if set when calculating layout.
6552 The resizing increments are only significant under Motif or Xt.
6554 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
6556 def SetSizeHintsSz(*args
, **kwargs
):
6558 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6560 Allows specification of minimum and maximum window sizes, and window
6561 size increments. If a pair of values is not set (or set to -1), the
6562 default values will be used. If this function is called, the user
6563 will not be able to size the window outside the given bounds (if it is
6564 a top-level window.) Sizers will also inspect the minimum window size
6565 and will use that value if set when calculating layout.
6567 The resizing increments are only significant under Motif or Xt.
6569 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
6571 def SetVirtualSizeHints(*args
, **kwargs
):
6573 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6575 Allows specification of minimum and maximum virtual window sizes. If a
6576 pair of values is not set (or set to -1), the default values will be
6577 used. If this function is called, the user will not be able to size
6578 the virtual area of the window outside the given bounds.
6580 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
6582 def SetVirtualSizeHintsSz(*args
, **kwargs
):
6584 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6586 Allows specification of minimum and maximum virtual window sizes. If a
6587 pair of values is not set (or set to -1), the default values will be
6588 used. If this function is called, the user will not be able to size
6589 the virtual area of the window outside the given bounds.
6591 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
6593 def GetMaxSize(*args
, **kwargs
):
6594 """GetMaxSize(self) -> Size"""
6595 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
6597 def GetMinSize(*args
, **kwargs
):
6598 """GetMinSize(self) -> Size"""
6599 return _core_
.Window_GetMinSize(*args
, **kwargs
)
6601 def SetMinSize(*args
, **kwargs
):
6603 SetMinSize(self, Size minSize)
6605 A more convenient method than `SetSizeHints` for setting just the
6608 return _core_
.Window_SetMinSize(*args
, **kwargs
)
6610 def SetMaxSize(*args
, **kwargs
):
6612 SetMaxSize(self, Size maxSize)
6614 A more convenient method than `SetSizeHints` for setting just the
6617 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
6619 def GetMinWidth(*args
, **kwargs
):
6620 """GetMinWidth(self) -> int"""
6621 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
6623 def GetMinHeight(*args
, **kwargs
):
6624 """GetMinHeight(self) -> int"""
6625 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
6627 def GetMaxWidth(*args
, **kwargs
):
6628 """GetMaxWidth(self) -> int"""
6629 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
6631 def GetMaxHeight(*args
, **kwargs
):
6632 """GetMaxHeight(self) -> int"""
6633 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
6635 def SetVirtualSize(*args
, **kwargs
):
6637 SetVirtualSize(self, Size size)
6639 Set the the virtual size of a window in pixels. For most windows this
6640 is just the client area of the window, but for some like scrolled
6641 windows it is more or less independent of the screen window size.
6643 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
6645 def SetVirtualSizeWH(*args
, **kwargs
):
6647 SetVirtualSizeWH(self, int w, int h)
6649 Set the the virtual size of a window in pixels. For most windows this
6650 is just the client area of the window, but for some like scrolled
6651 windows it is more or less independent of the screen window size.
6653 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
6655 def GetVirtualSize(*args
, **kwargs
):
6657 GetVirtualSize(self) -> Size
6659 Get the the virtual size of the window in pixels. For most windows
6660 this is just the client area of the window, but for some like scrolled
6661 windows it is more or less independent of the screen window size.
6663 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
6665 def GetVirtualSizeTuple(*args
, **kwargs
):
6667 GetVirtualSizeTuple() -> (width, height)
6669 Get the the virtual size of the window in pixels. For most windows
6670 this is just the client area of the window, but for some like scrolled
6671 windows it is more or less independent of the screen window size.
6673 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
6675 def GetBestVirtualSize(*args
, **kwargs
):
6677 GetBestVirtualSize(self) -> Size
6679 Return the largest of ClientSize and BestSize (as determined by a
6680 sizer, interior children, or other means)
6682 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
6684 def Show(*args
, **kwargs
):
6686 Show(self, bool show=True) -> bool
6688 Shows or hides the window. You may need to call Raise for a top level
6689 window if you want to bring it to top, although this is not needed if
6690 Show is called immediately after the frame creation. Returns True if
6691 the window has been shown or hidden or False if nothing was done
6692 because it already was in the requested state.
6694 return _core_
.Window_Show(*args
, **kwargs
)
6696 def Hide(*args
, **kwargs
):
6700 Equivalent to calling Show(False).
6702 return _core_
.Window_Hide(*args
, **kwargs
)
6704 def Enable(*args
, **kwargs
):
6706 Enable(self, bool enable=True) -> bool
6708 Enable or disable the window for user input. Note that when a parent
6709 window is disabled, all of its children are disabled as well and they
6710 are reenabled again when the parent is. Returns true if the window
6711 has been enabled or disabled, false if nothing was done, i.e. if the
6712 window had already been in the specified state.
6714 return _core_
.Window_Enable(*args
, **kwargs
)
6716 def Disable(*args
, **kwargs
):
6718 Disable(self) -> bool
6720 Disables the window, same as Enable(false).
6722 return _core_
.Window_Disable(*args
, **kwargs
)
6724 def IsShown(*args
, **kwargs
):
6726 IsShown(self) -> bool
6728 Returns true if the window is shown, false if it has been hidden.
6730 return _core_
.Window_IsShown(*args
, **kwargs
)
6732 def IsEnabled(*args
, **kwargs
):
6734 IsEnabled(self) -> bool
6736 Returns true if the window is enabled for input, false otherwise.
6738 return _core_
.Window_IsEnabled(*args
, **kwargs
)
6740 def SetWindowStyleFlag(*args
, **kwargs
):
6742 SetWindowStyleFlag(self, long style)
6744 Sets the style of the window. Please note that some styles cannot be
6745 changed after the window creation and that Refresh() might need to be
6746 called after changing the others for the change to take place
6749 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
6751 def GetWindowStyleFlag(*args
, **kwargs
):
6753 GetWindowStyleFlag(self) -> long
6755 Gets the window style that was passed to the constructor or Create
6758 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
6760 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
6761 def HasFlag(*args
, **kwargs
):
6763 HasFlag(self, int flag) -> bool
6765 Test if the given style is set for this window.
6767 return _core_
.Window_HasFlag(*args
, **kwargs
)
6769 def IsRetained(*args
, **kwargs
):
6771 IsRetained(self) -> bool
6773 Returns true if the window is retained, false otherwise. Retained
6774 windows are only available on X platforms.
6776 return _core_
.Window_IsRetained(*args
, **kwargs
)
6778 def SetExtraStyle(*args
, **kwargs
):
6780 SetExtraStyle(self, long exStyle)
6782 Sets the extra style bits for the window. Extra styles are the less
6783 often used style bits which can't be set with the constructor or with
6784 SetWindowStyleFlag()
6786 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
6788 def GetExtraStyle(*args
, **kwargs
):
6790 GetExtraStyle(self) -> long
6792 Returns the extra style bits for the window.
6794 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
6796 def MakeModal(*args
, **kwargs
):
6798 MakeModal(self, bool modal=True)
6800 Disables all other windows in the application so that the user can
6801 only interact with this window. Passing False will reverse this
6804 return _core_
.Window_MakeModal(*args
, **kwargs
)
6806 def SetThemeEnabled(*args
, **kwargs
):
6808 SetThemeEnabled(self, bool enableTheme)
6810 This function tells a window if it should use the system's "theme"
6811 code to draw the windows' background instead if its own background
6812 drawing code. This will only have an effect on platforms that support
6813 the notion of themes in user defined windows. One such platform is
6814 GTK+ where windows can have (very colourful) backgrounds defined by a
6815 user's selected theme.
6817 Dialogs, notebook pages and the status bar have this flag set to true
6818 by default so that the default look and feel is simulated best.
6820 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
6822 def GetThemeEnabled(*args
, **kwargs
):
6824 GetThemeEnabled(self) -> bool
6826 Return the themeEnabled flag.
6828 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
6830 def SetFocus(*args
, **kwargs
):
6834 Set's the focus to this window, allowing it to receive keyboard input.
6836 return _core_
.Window_SetFocus(*args
, **kwargs
)
6838 def SetFocusFromKbd(*args
, **kwargs
):
6840 SetFocusFromKbd(self)
6842 Set focus to this window as the result of a keyboard action. Normally
6843 only called internally.
6845 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
6847 def FindFocus(*args
, **kwargs
):
6849 FindFocus() -> Window
6851 Returns the window or control that currently has the keyboard focus,
6854 return _core_
.Window_FindFocus(*args
, **kwargs
)
6856 FindFocus
= staticmethod(FindFocus
)
6857 def AcceptsFocus(*args
, **kwargs
):
6859 AcceptsFocus(self) -> bool
6861 Can this window have focus?
6863 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
6865 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6867 AcceptsFocusFromKeyboard(self) -> bool
6869 Can this window be given focus by keyboard navigation? if not, the
6870 only way to give it focus (provided it accepts it at all) is to click
6873 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6875 def GetDefaultItem(*args
, **kwargs
):
6877 GetDefaultItem(self) -> Window
6879 Get the default child of this parent, i.e. the one which is activated
6880 by pressing <Enter> such as the OK button on a wx.Dialog.
6882 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
6884 def SetDefaultItem(*args
, **kwargs
):
6886 SetDefaultItem(self, Window child) -> Window
6888 Set this child as default, return the old default.
6890 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
6892 def SetTmpDefaultItem(*args
, **kwargs
):
6894 SetTmpDefaultItem(self, Window win)
6896 Set this child as temporary default
6898 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6900 def Navigate(*args
, **kwargs
):
6902 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6904 Does keyboard navigation from this window to another, by sending a
6905 `wx.NavigationKeyEvent`.
6907 return _core_
.Window_Navigate(*args
, **kwargs
)
6909 def MoveAfterInTabOrder(*args
, **kwargs
):
6911 MoveAfterInTabOrder(self, Window win)
6913 Moves this window in the tab navigation order after the specified
6914 sibling window. This means that when the user presses the TAB key on
6915 that other window, the focus switches to this window.
6917 The default tab order is the same as creation order. This function
6918 and `MoveBeforeInTabOrder` allow to change it after creating all the
6922 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
6924 def MoveBeforeInTabOrder(*args
, **kwargs
):
6926 MoveBeforeInTabOrder(self, Window win)
6928 Same as `MoveAfterInTabOrder` except that it inserts this window just
6929 before win instead of putting it right after it.
6931 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
6933 def GetChildren(*args
, **kwargs
):
6935 GetChildren(self) -> PyObject
6937 Returns a list of the window's children. NOTE: Currently this is a
6938 copy of the child window list maintained by the window, so the return
6939 value of this function is only valid as long as the window's children
6942 return _core_
.Window_GetChildren(*args
, **kwargs
)
6944 def GetParent(*args
, **kwargs
):
6946 GetParent(self) -> Window
6948 Returns the parent window of this window, or None if there isn't one.
6950 return _core_
.Window_GetParent(*args
, **kwargs
)
6952 def GetGrandParent(*args
, **kwargs
):
6954 GetGrandParent(self) -> Window
6956 Returns the parent of the parent of this window, or None if there
6959 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
6961 def IsTopLevel(*args
, **kwargs
):
6963 IsTopLevel(self) -> bool
6965 Returns true if the given window is a top-level one. Currently all
6966 frames and dialogs are always considered to be top-level windows (even
6967 if they have a parent window).
6969 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
6971 def Reparent(*args
, **kwargs
):
6973 Reparent(self, Window newParent) -> bool
6975 Reparents the window, i.e the window will be removed from its current
6976 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6977 re-inserted into another. Available on Windows and GTK. Returns True
6978 if the parent was changed, False otherwise (error or newParent ==
6981 return _core_
.Window_Reparent(*args
, **kwargs
)
6983 def AddChild(*args
, **kwargs
):
6985 AddChild(self, Window child)
6987 Adds a child window. This is called automatically by window creation
6988 functions so should not be required by the application programmer.
6990 return _core_
.Window_AddChild(*args
, **kwargs
)
6992 def RemoveChild(*args
, **kwargs
):
6994 RemoveChild(self, Window child)
6996 Removes a child window. This is called automatically by window
6997 deletion functions so should not be required by the application
7000 return _core_
.Window_RemoveChild(*args
, **kwargs
)
7002 def FindWindowById(*args
, **kwargs
):
7004 FindWindowById(self, long winid) -> Window
7006 Find a chld of this window by window ID
7008 return _core_
.Window_FindWindowById(*args
, **kwargs
)
7010 def FindWindowByName(*args
, **kwargs
):
7012 FindWindowByName(self, String name) -> Window
7014 Find a child of this window by name
7016 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
7018 def GetEventHandler(*args
, **kwargs
):
7020 GetEventHandler(self) -> EvtHandler
7022 Returns the event handler for this window. By default, the window is
7023 its own event handler.
7025 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
7027 def SetEventHandler(*args
, **kwargs
):
7029 SetEventHandler(self, EvtHandler handler)
7031 Sets the event handler for this window. An event handler is an object
7032 that is capable of processing the events sent to a window. By default,
7033 the window is its own event handler, but an application may wish to
7034 substitute another, for example to allow central implementation of
7035 event-handling for a variety of different window classes.
7037 It is usually better to use `wx.Window.PushEventHandler` since this sets
7038 up a chain of event handlers, where an event not handled by one event
7039 handler is handed to the next one in the chain.
7041 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
7043 def PushEventHandler(*args
, **kwargs
):
7045 PushEventHandler(self, EvtHandler handler)
7047 Pushes this event handler onto the event handler stack for the window.
7048 An event handler is an object that is capable of processing the events
7049 sent to a window. By default, the window is its own event handler, but
7050 an application may wish to substitute another, for example to allow
7051 central implementation of event-handling for a variety of different
7054 wx.Window.PushEventHandler allows an application to set up a chain of
7055 event handlers, where an event not handled by one event handler is
7056 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
7057 remove the event handler.
7059 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
7061 def PopEventHandler(*args
, **kwargs
):
7063 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
7065 Removes and returns the top-most event handler on the event handler
7066 stack. If deleteHandler is True then the wx.EvtHandler object will be
7067 destroyed after it is popped.
7069 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
7071 def RemoveEventHandler(*args
, **kwargs
):
7073 RemoveEventHandler(self, EvtHandler handler) -> bool
7075 Find the given handler in the event handler chain and remove (but not
7076 delete) it from the event handler chain, return True if it was found
7077 and False otherwise (this also results in an assert failure so this
7078 function should only be called when the handler is supposed to be
7081 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
7083 def SetValidator(*args
, **kwargs
):
7085 SetValidator(self, Validator validator)
7087 Deletes the current validator (if any) and sets the window validator,
7088 having called wx.Validator.Clone to create a new validator of this
7091 return _core_
.Window_SetValidator(*args
, **kwargs
)
7093 def GetValidator(*args
, **kwargs
):
7095 GetValidator(self) -> Validator
7097 Returns a pointer to the current validator for the window, or None if
7100 return _core_
.Window_GetValidator(*args
, **kwargs
)
7102 def Validate(*args
, **kwargs
):
7104 Validate(self) -> bool
7106 Validates the current values of the child controls using their
7107 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7108 style flag set, the method will also call Validate() of all child
7109 windows. Returns false if any of the validations failed.
7111 return _core_
.Window_Validate(*args
, **kwargs
)
7113 def TransferDataToWindow(*args
, **kwargs
):
7115 TransferDataToWindow(self) -> bool
7117 Transfers values to child controls from data areas specified by their
7118 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7119 style flag set, the method will also call TransferDataToWindow() of
7122 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
7124 def TransferDataFromWindow(*args
, **kwargs
):
7126 TransferDataFromWindow(self) -> bool
7128 Transfers values from child controls to data areas specified by their
7129 validators. Returns false if a transfer failed. If the window has
7130 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7131 also call TransferDataFromWindow() of all child windows.
7133 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
7135 def InitDialog(*args
, **kwargs
):
7139 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7140 to the dialog via validators.
7142 return _core_
.Window_InitDialog(*args
, **kwargs
)
7144 def SetAcceleratorTable(*args
, **kwargs
):
7146 SetAcceleratorTable(self, AcceleratorTable accel)
7148 Sets the accelerator table for this window.
7150 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
7152 def GetAcceleratorTable(*args
, **kwargs
):
7154 GetAcceleratorTable(self) -> AcceleratorTable
7156 Gets the accelerator table for this window.
7158 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
7160 def RegisterHotKey(*args
, **kwargs
):
7162 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7164 Registers a system wide hotkey. Every time the user presses the hotkey
7165 registered here, this window will receive a hotkey event. It will
7166 receive the event even if the application is in the background and
7167 does not have the input focus because the user is working with some
7168 other application. To bind an event handler function to this hotkey
7169 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7170 hotkey was registered successfully.
7172 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
7174 def UnregisterHotKey(*args
, **kwargs
):
7176 UnregisterHotKey(self, int hotkeyId) -> bool
7178 Unregisters a system wide hotkey.
7180 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
7182 def ConvertDialogPointToPixels(*args
, **kwargs
):
7184 ConvertDialogPointToPixels(self, Point pt) -> Point
7186 Converts a point or size from dialog units to pixels. Dialog units
7187 are used for maintaining a dialog's proportions even if the font
7188 changes. For the x dimension, the dialog units are multiplied by the
7189 average character width and then divided by 4. For the y dimension,
7190 the dialog units are multiplied by the average character height and
7193 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
7195 def ConvertDialogSizeToPixels(*args
, **kwargs
):
7197 ConvertDialogSizeToPixels(self, Size sz) -> Size
7199 Converts a point or size from dialog units to pixels. Dialog units
7200 are used for maintaining a dialog's proportions even if the font
7201 changes. For the x dimension, the dialog units are multiplied by the
7202 average character width and then divided by 4. For the y dimension,
7203 the dialog units are multiplied by the average character height and
7206 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
7208 def DLG_PNT(*args
, **kwargs
):
7210 DLG_PNT(self, Point pt) -> Point
7212 Converts a point or size from dialog units to pixels. Dialog units
7213 are used for maintaining a dialog's proportions even if the font
7214 changes. For the x dimension, the dialog units are multiplied by the
7215 average character width and then divided by 4. For the y dimension,
7216 the dialog units are multiplied by the average character height and
7219 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
7221 def DLG_SZE(*args
, **kwargs
):
7223 DLG_SZE(self, Size sz) -> Size
7225 Converts a point or size from dialog units to pixels. Dialog units
7226 are used for maintaining a dialog's proportions even if the font
7227 changes. For the x dimension, the dialog units are multiplied by the
7228 average character width and then divided by 4. For the y dimension,
7229 the dialog units are multiplied by the average character height and
7232 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
7234 def ConvertPixelPointToDialog(*args
, **kwargs
):
7235 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7236 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
7238 def ConvertPixelSizeToDialog(*args
, **kwargs
):
7239 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7240 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
7242 def WarpPointer(*args
, **kwargs
):
7244 WarpPointer(self, int x, int y)
7246 Moves the pointer to the given position on the window.
7248 NOTE: This function is not supported under Mac because Apple Human
7249 Interface Guidelines forbid moving the mouse cursor programmatically.
7251 return _core_
.Window_WarpPointer(*args
, **kwargs
)
7253 def CaptureMouse(*args
, **kwargs
):
7257 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7258 release the capture.
7260 Note that wxWindows maintains the stack of windows having captured the
7261 mouse and when the mouse is released the capture returns to the window
7262 which had had captured it previously and it is only really released if
7263 there were no previous window. In particular, this means that you must
7264 release the mouse as many times as you capture it.
7266 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
7268 def ReleaseMouse(*args
, **kwargs
):
7272 Releases mouse input captured with wx.Window.CaptureMouse.
7274 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
7276 def GetCapture(*args
, **kwargs
):
7278 GetCapture() -> Window
7280 Returns the window which currently captures the mouse or None
7282 return _core_
.Window_GetCapture(*args
, **kwargs
)
7284 GetCapture
= staticmethod(GetCapture
)
7285 def HasCapture(*args
, **kwargs
):
7287 HasCapture(self) -> bool
7289 Returns true if this window has the current mouse capture.
7291 return _core_
.Window_HasCapture(*args
, **kwargs
)
7293 def Refresh(*args
, **kwargs
):
7295 Refresh(self, bool eraseBackground=True, Rect rect=None)
7297 Mark the specified rectangle (or the whole window) as "dirty" so it
7298 will be repainted. Causes an EVT_PAINT event to be generated and sent
7301 return _core_
.Window_Refresh(*args
, **kwargs
)
7303 def RefreshRect(*args
, **kwargs
):
7305 RefreshRect(self, Rect rect, bool eraseBackground=True)
7307 Redraws the contents of the given rectangle: the area inside it will
7308 be repainted. This is the same as Refresh but has a nicer syntax.
7310 return _core_
.Window_RefreshRect(*args
, **kwargs
)
7312 def Update(*args
, **kwargs
):
7316 Calling this method immediately repaints the invalidated area of the
7317 window instead of waiting for the EVT_PAINT event to happen, (normally
7318 this would usually only happen when the flow of control returns to the
7319 event loop.) Notice that this function doesn't refresh the window and
7320 does nothing if the window has been already repainted. Use Refresh
7321 first if you want to immediately redraw the window (or some portion of
7322 it) unconditionally.
7324 return _core_
.Window_Update(*args
, **kwargs
)
7326 def ClearBackground(*args
, **kwargs
):
7328 ClearBackground(self)
7330 Clears the window by filling it with the current background
7331 colour. Does not cause an erase background event to be generated.
7333 return _core_
.Window_ClearBackground(*args
, **kwargs
)
7335 def Freeze(*args
, **kwargs
):
7339 Freezes the window or, in other words, prevents any updates from
7340 taking place on screen, the window is not redrawn at all. Thaw must be
7341 called to reenable window redrawing. Calls to Freeze/Thaw may be
7342 nested, with the actual Thaw being delayed until all the nesting has
7345 This method is useful for visual appearance optimization (for example,
7346 it is a good idea to use it before inserting large amount of text into
7347 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7348 for all controls so it is mostly just a hint to wxWindows and not a
7349 mandatory directive.
7351 return _core_
.Window_Freeze(*args
, **kwargs
)
7353 def Thaw(*args
, **kwargs
):
7357 Reenables window updating after a previous call to Freeze. Calls to
7358 Freeze/Thaw may be nested, so Thaw must be called the same number of
7359 times that Freeze was before the window will be updated.
7361 return _core_
.Window_Thaw(*args
, **kwargs
)
7363 def PrepareDC(*args
, **kwargs
):
7365 PrepareDC(self, DC dc)
7367 Call this function to prepare the device context for drawing a
7368 scrolled image. It sets the device origin according to the current
7371 return _core_
.Window_PrepareDC(*args
, **kwargs
)
7373 def GetUpdateRegion(*args
, **kwargs
):
7375 GetUpdateRegion(self) -> Region
7377 Returns the region specifying which parts of the window have been
7378 damaged. Should only be called within an EVT_PAINT handler.
7380 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
7382 def GetUpdateClientRect(*args
, **kwargs
):
7384 GetUpdateClientRect(self) -> Rect
7386 Get the update rectangle region bounding box in client coords.
7388 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7390 def IsExposed(*args
, **kwargs
):
7392 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7394 Returns true if the given point or rectangle area has been exposed
7395 since the last repaint. Call this in an paint event handler to
7396 optimize redrawing by only redrawing those areas, which have been
7399 return _core_
.Window_IsExposed(*args
, **kwargs
)
7401 def IsExposedPoint(*args
, **kwargs
):
7403 IsExposedPoint(self, Point pt) -> bool
7405 Returns true if the given point or rectangle area has been exposed
7406 since the last repaint. Call this in an paint event handler to
7407 optimize redrawing by only redrawing those areas, which have been
7410 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7412 def IsExposedRect(*args
, **kwargs
):
7414 IsExposedRect(self, Rect rect) -> bool
7416 Returns true if the given point or rectangle area has been exposed
7417 since the last repaint. Call this in an paint event handler to
7418 optimize redrawing by only redrawing those areas, which have been
7421 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7423 def GetDefaultAttributes(*args
, **kwargs
):
7425 GetDefaultAttributes(self) -> VisualAttributes
7427 Get the default attributes for an instance of this class. This is
7428 useful if you want to use the same font or colour in your own control
7429 as in a standard control -- which is a much better idea than hard
7430 coding specific colours or fonts which might look completely out of
7431 place on the user's system, especially if it uses themes.
7433 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7435 def GetClassDefaultAttributes(*args
, **kwargs
):
7437 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7439 Get the default attributes for this class. This is useful if you want
7440 to use the same font or colour in your own control as in a standard
7441 control -- which is a much better idea than hard coding specific
7442 colours or fonts which might look completely out of place on the
7443 user's system, especially if it uses themes.
7445 The variant parameter is only relevant under Mac currently and is
7446 ignore under other platforms. Under Mac, it will change the size of
7447 the returned font. See `wx.Window.SetWindowVariant` for more about
7450 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7452 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7453 def SetBackgroundColour(*args
, **kwargs
):
7455 SetBackgroundColour(self, Colour colour) -> bool
7457 Sets the background colour of the window. Returns True if the colour
7458 was changed. The background colour is usually painted by the default
7459 EVT_ERASE_BACKGROUND event handler function under Windows and
7460 automatically under GTK. Using `wx.NullColour` will reset the window
7461 to the default background colour.
7463 Note that setting the background colour may not cause an immediate
7464 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7465 calling this function.
7467 Using this function will disable attempts to use themes for this
7468 window, if the system supports them. Use with care since usually the
7469 themes represent the appearance chosen by the user to be used for all
7470 applications on the system.
7472 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7474 def SetOwnBackgroundColour(*args
, **kwargs
):
7475 """SetOwnBackgroundColour(self, Colour colour)"""
7476 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7478 def SetForegroundColour(*args
, **kwargs
):
7480 SetForegroundColour(self, Colour colour) -> bool
7482 Sets the foreground colour of the window. Returns True is the colour
7483 was changed. The interpretation of foreground colour is dependent on
7484 the window class; it may be the text colour or other colour, or it may
7487 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7489 def SetOwnForegroundColour(*args
, **kwargs
):
7490 """SetOwnForegroundColour(self, Colour colour)"""
7491 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7493 def GetBackgroundColour(*args
, **kwargs
):
7495 GetBackgroundColour(self) -> Colour
7497 Returns the background colour of the window.
7499 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7501 def GetForegroundColour(*args
, **kwargs
):
7503 GetForegroundColour(self) -> Colour
7505 Returns the foreground colour of the window. The interpretation of
7506 foreground colour is dependent on the window class; it may be the text
7507 colour or other colour, or it may not be used at all.
7509 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7511 def InheritsBackgroundColour(*args
, **kwargs
):
7512 """InheritsBackgroundColour(self) -> bool"""
7513 return _core_
.Window_InheritsBackgroundColour(*args
, **kwargs
)
7515 def UseBgCol(*args
, **kwargs
):
7516 """UseBgCol(self) -> bool"""
7517 return _core_
.Window_UseBgCol(*args
, **kwargs
)
7519 def SetBackgroundStyle(*args
, **kwargs
):
7521 SetBackgroundStyle(self, int style) -> bool
7523 Returns the background style of the window. The background style
7524 indicates how the background of the window is drawn.
7526 ====================== ========================================
7527 wx.BG_STYLE_SYSTEM The background colour or pattern should
7528 be determined by the system
7529 wx.BG_STYLE_COLOUR The background should be a solid colour
7530 wx.BG_STYLE_CUSTOM The background will be implemented by the
7532 ====================== ========================================
7534 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7535 a custom background, such as a tiled bitmap. Currently the style has
7536 no effect on other platforms.
7538 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7540 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
7542 def GetBackgroundStyle(*args
, **kwargs
):
7544 GetBackgroundStyle(self) -> int
7546 Returns the background style of the window.
7548 :see: `SetBackgroundStyle`
7550 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
7552 def HasTransparentBackground(*args
, **kwargs
):
7554 HasTransparentBackground(self) -> bool
7556 Returns True if this window's background is transparent (as, for
7557 example, for `wx.StaticText`) and should show the parent window's
7560 This method is mostly used internally by the library itself and you
7561 normally shouldn't have to call it. You may, however, have to override
7562 it in your custom control classes to ensure that background is painted
7565 return _core_
.Window_HasTransparentBackground(*args
, **kwargs
)
7567 def SetCursor(*args
, **kwargs
):
7569 SetCursor(self, Cursor cursor) -> bool
7571 Sets the window's cursor. Notice that the window cursor also sets it
7572 for the children of the window implicitly.
7574 The cursor may be wx.NullCursor in which case the window cursor will
7575 be reset back to default.
7577 return _core_
.Window_SetCursor(*args
, **kwargs
)
7579 def GetCursor(*args
, **kwargs
):
7581 GetCursor(self) -> Cursor
7583 Return the cursor associated with this window.
7585 return _core_
.Window_GetCursor(*args
, **kwargs
)
7587 def SetFont(*args
, **kwargs
):
7589 SetFont(self, Font font) -> bool
7591 Sets the font for this window.
7593 return _core_
.Window_SetFont(*args
, **kwargs
)
7595 def SetOwnFont(*args
, **kwargs
):
7596 """SetOwnFont(self, Font font)"""
7597 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
7599 def GetFont(*args
, **kwargs
):
7601 GetFont(self) -> Font
7603 Returns the default font used for this window.
7605 return _core_
.Window_GetFont(*args
, **kwargs
)
7607 def SetCaret(*args
, **kwargs
):
7609 SetCaret(self, Caret caret)
7611 Sets the caret associated with the window.
7613 return _core_
.Window_SetCaret(*args
, **kwargs
)
7615 def GetCaret(*args
, **kwargs
):
7617 GetCaret(self) -> Caret
7619 Returns the caret associated with the window.
7621 return _core_
.Window_GetCaret(*args
, **kwargs
)
7623 def GetCharHeight(*args
, **kwargs
):
7625 GetCharHeight(self) -> int
7627 Get the (average) character size for the current font.
7629 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
7631 def GetCharWidth(*args
, **kwargs
):
7633 GetCharWidth(self) -> int
7635 Get the (average) character size for the current font.
7637 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
7639 def GetTextExtent(*args
, **kwargs
):
7641 GetTextExtent(String string) -> (width, height)
7643 Get the width and height of the text using the current font.
7645 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
7647 def GetFullTextExtent(*args
, **kwargs
):
7649 GetFullTextExtent(String string, Font font=None) ->
7650 (width, height, descent, externalLeading)
7652 Get the width, height, decent and leading of the text using the
7653 current or specified font.
7655 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
7657 def ClientToScreenXY(*args
, **kwargs
):
7659 ClientToScreenXY(int x, int y) -> (x,y)
7661 Converts to screen coordinates from coordinates relative to this window.
7663 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
7665 def ScreenToClientXY(*args
, **kwargs
):
7667 ScreenToClientXY(int x, int y) -> (x,y)
7669 Converts from screen to client window coordinates.
7671 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
7673 def ClientToScreen(*args
, **kwargs
):
7675 ClientToScreen(self, Point pt) -> Point
7677 Converts to screen coordinates from coordinates relative to this window.
7679 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
7681 def ScreenToClient(*args
, **kwargs
):
7683 ScreenToClient(self, Point pt) -> Point
7685 Converts from screen to client window coordinates.
7687 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
7689 def HitTestXY(*args
, **kwargs
):
7691 HitTestXY(self, int x, int y) -> int
7693 Test where the given (in client coords) point lies
7695 return _core_
.Window_HitTestXY(*args
, **kwargs
)
7697 def HitTest(*args
, **kwargs
):
7699 HitTest(self, Point pt) -> int
7701 Test where the given (in client coords) point lies
7703 return _core_
.Window_HitTest(*args
, **kwargs
)
7705 def GetBorder(*args
):
7707 GetBorder(self, long flags) -> int
7708 GetBorder(self) -> int
7710 Get border for the flags of this window
7712 return _core_
.Window_GetBorder(*args
)
7714 def UpdateWindowUI(*args
, **kwargs
):
7716 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7718 This function sends EVT_UPDATE_UI events to the window. The particular
7719 implementation depends on the window; for example a wx.ToolBar will
7720 send an update UI event for each toolbar button, and a wx.Frame will
7721 send an update UI event for each menubar menu item. You can call this
7722 function from your application to ensure that your UI is up-to-date at
7723 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7724 concerned). This may be necessary if you have called
7725 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7726 limit the overhead that wxWindows incurs by sending update UI events
7729 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
7731 def PopupMenuXY(*args
, **kwargs
):
7733 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7735 Pops up the given menu at the specified coordinates, relative to this window,
7736 and returns control when the user has dismissed the menu. If a menu item is
7737 selected, the corresponding menu event is generated and will be processed as
7738 usual. If the default position is given then the current position of the
7739 mouse cursor will be used.
7741 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
7743 def PopupMenu(*args
, **kwargs
):
7745 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7747 Pops up the given menu at the specified coordinates, relative to this window,
7748 and returns control when the user has dismissed the menu. If a menu item is
7749 selected, the corresponding menu event is generated and will be processed as
7750 usual. If the default position is given then the current position of the
7751 mouse cursor will be used.
7753 return _core_
.Window_PopupMenu(*args
, **kwargs
)
7755 def GetHandle(*args
, **kwargs
):
7757 GetHandle(self) -> long
7759 Returns the platform-specific handle (as a long integer) of the
7760 physical window. Currently on wxMac it returns the handle of the
7761 toplevel parent of the window.
7763 return _core_
.Window_GetHandle(*args
, **kwargs
)
7765 def AssociateHandle(*args
, **kwargs
):
7767 AssociateHandle(self, long handle)
7769 Associate the window with a new native handle
7771 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
7773 def DissociateHandle(*args
, **kwargs
):
7775 DissociateHandle(self)
7777 Dissociate the current native handle from the window
7779 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
7781 def HasScrollbar(*args
, **kwargs
):
7783 HasScrollbar(self, int orient) -> bool
7785 Does the window have the scrollbar for this orientation?
7787 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
7789 def SetScrollbar(*args
, **kwargs
):
7791 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7794 Sets the scrollbar properties of a built-in scrollbar.
7796 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
7798 def SetScrollPos(*args
, **kwargs
):
7800 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7802 Sets the position of one of the built-in scrollbars.
7804 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
7806 def GetScrollPos(*args
, **kwargs
):
7808 GetScrollPos(self, int orientation) -> int
7810 Returns the built-in scrollbar position.
7812 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
7814 def GetScrollThumb(*args
, **kwargs
):
7816 GetScrollThumb(self, int orientation) -> int
7818 Returns the built-in scrollbar thumb size.
7820 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
7822 def GetScrollRange(*args
, **kwargs
):
7824 GetScrollRange(self, int orientation) -> int
7826 Returns the built-in scrollbar range.
7828 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
7830 def ScrollWindow(*args
, **kwargs
):
7832 ScrollWindow(self, int dx, int dy, Rect rect=None)
7834 Physically scrolls the pixels in the window and move child windows
7835 accordingly. Use this function to optimise your scrolling
7836 implementations, to minimise the area that must be redrawn. Note that
7837 it is rarely required to call this function from a user program.
7839 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
7841 def ScrollLines(*args
, **kwargs
):
7843 ScrollLines(self, int lines) -> bool
7845 If the platform and window class supports it, scrolls the window by
7846 the given number of lines down, if lines is positive, or up if lines
7847 is negative. Returns True if the window was scrolled, False if it was
7848 already on top/bottom and nothing was done.
7850 return _core_
.Window_ScrollLines(*args
, **kwargs
)
7852 def ScrollPages(*args
, **kwargs
):
7854 ScrollPages(self, int pages) -> bool
7856 If the platform and window class supports it, scrolls the window by
7857 the given number of pages down, if pages is positive, or up if pages
7858 is negative. Returns True if the window was scrolled, False if it was
7859 already on top/bottom and nothing was done.
7861 return _core_
.Window_ScrollPages(*args
, **kwargs
)
7863 def LineUp(*args
, **kwargs
):
7865 LineUp(self) -> bool
7867 This is just a wrapper for ScrollLines(-1).
7869 return _core_
.Window_LineUp(*args
, **kwargs
)
7871 def LineDown(*args
, **kwargs
):
7873 LineDown(self) -> bool
7875 This is just a wrapper for ScrollLines(1).
7877 return _core_
.Window_LineDown(*args
, **kwargs
)
7879 def PageUp(*args
, **kwargs
):
7881 PageUp(self) -> bool
7883 This is just a wrapper for ScrollPages(-1).
7885 return _core_
.Window_PageUp(*args
, **kwargs
)
7887 def PageDown(*args
, **kwargs
):
7889 PageDown(self) -> bool
7891 This is just a wrapper for ScrollPages(1).
7893 return _core_
.Window_PageDown(*args
, **kwargs
)
7895 def SetHelpText(*args
, **kwargs
):
7897 SetHelpText(self, String text)
7899 Sets the help text to be used as context-sensitive help for this
7900 window. Note that the text is actually stored by the current
7901 wxHelpProvider implementation, and not in the window object itself.
7903 return _core_
.Window_SetHelpText(*args
, **kwargs
)
7905 def SetHelpTextForId(*args
, **kwargs
):
7907 SetHelpTextForId(self, String text)
7909 Associate this help text with all windows with the same id as this
7912 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
7914 def GetHelpText(*args
, **kwargs
):
7916 GetHelpText(self) -> String
7918 Gets the help text to be used as context-sensitive help for this
7919 window. Note that the text is actually stored by the current
7920 wxHelpProvider implementation, and not in the window object itself.
7922 return _core_
.Window_GetHelpText(*args
, **kwargs
)
7924 def SetToolTipString(*args
, **kwargs
):
7926 SetToolTipString(self, String tip)
7928 Attach a tooltip to the window.
7930 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
7932 def SetToolTip(*args
, **kwargs
):
7934 SetToolTip(self, ToolTip tip)
7936 Attach a tooltip to the window.
7938 return _core_
.Window_SetToolTip(*args
, **kwargs
)
7940 def GetToolTip(*args
, **kwargs
):
7942 GetToolTip(self) -> ToolTip
7944 get the associated tooltip or None if none
7946 return _core_
.Window_GetToolTip(*args
, **kwargs
)
7948 def SetDropTarget(*args
, **kwargs
):
7950 SetDropTarget(self, DropTarget dropTarget)
7952 Associates a drop target with this window. If the window already has
7953 a drop target, it is deleted.
7955 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
7957 def GetDropTarget(*args
, **kwargs
):
7959 GetDropTarget(self) -> DropTarget
7961 Returns the associated drop target, which may be None.
7963 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
7965 def SetConstraints(*args
, **kwargs
):
7967 SetConstraints(self, LayoutConstraints constraints)
7969 Sets the window to have the given layout constraints. If an existing
7970 layout constraints object is already owned by the window, it will be
7971 deleted. Pass None to disassociate and delete the window's current
7974 You must call SetAutoLayout to tell a window to use the constraints
7975 automatically in its default EVT_SIZE handler; otherwise, you must
7976 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7977 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7980 return _core_
.Window_SetConstraints(*args
, **kwargs
)
7982 def GetConstraints(*args
, **kwargs
):
7984 GetConstraints(self) -> LayoutConstraints
7986 Returns a pointer to the window's layout constraints, or None if there
7989 return _core_
.Window_GetConstraints(*args
, **kwargs
)
7991 def SetAutoLayout(*args
, **kwargs
):
7993 SetAutoLayout(self, bool autoLayout)
7995 Determines whether the Layout function will be called automatically
7996 when the window is resized. It is called implicitly by SetSizer but
7997 if you use SetConstraints you should call it manually or otherwise the
7998 window layout won't be correctly updated when its size changes.
8000 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
8002 def GetAutoLayout(*args
, **kwargs
):
8004 GetAutoLayout(self) -> bool
8006 Returns the current autoLayout setting
8008 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
8010 def Layout(*args
, **kwargs
):
8012 Layout(self) -> bool
8014 Invokes the constraint-based layout algorithm or the sizer-based
8015 algorithm for this window. See SetAutoLayout: when auto layout is on,
8016 this function gets called automatically by the default EVT_SIZE
8017 handler when the window is resized.
8019 return _core_
.Window_Layout(*args
, **kwargs
)
8021 def SetSizer(*args
, **kwargs
):
8023 SetSizer(self, Sizer sizer, bool deleteOld=True)
8025 Sets the window to have the given layout sizer. The window will then
8026 own the object, and will take care of its deletion. If an existing
8027 layout sizer object is already owned by the window, it will be deleted
8028 if the deleteOld parameter is true. Note that this function will also
8029 call SetAutoLayout implicitly with a True parameter if the sizer is
8030 non-None, and False otherwise.
8032 return _core_
.Window_SetSizer(*args
, **kwargs
)
8034 def SetSizerAndFit(*args
, **kwargs
):
8036 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
8038 The same as SetSizer, except it also sets the size hints for the
8039 window based on the sizer's minimum size.
8041 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
8043 def GetSizer(*args
, **kwargs
):
8045 GetSizer(self) -> Sizer
8047 Return the sizer associated with the window by a previous call to
8048 SetSizer or None if there isn't one.
8050 return _core_
.Window_GetSizer(*args
, **kwargs
)
8052 def SetContainingSizer(*args
, **kwargs
):
8054 SetContainingSizer(self, Sizer sizer)
8056 This normally does not need to be called by application code. It is
8057 called internally when a window is added to a sizer, and is used so
8058 the window can remove itself from the sizer when it is destroyed.
8060 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
8062 def GetContainingSizer(*args
, **kwargs
):
8064 GetContainingSizer(self) -> Sizer
8066 Return the sizer that this window is a member of, if any, otherwise None.
8068 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
8070 def InheritAttributes(*args
, **kwargs
):
8072 InheritAttributes(self)
8074 This function is (or should be, in case of custom controls) called
8075 during window creation to intelligently set up the window visual
8076 attributes, that is the font and the foreground and background
8079 By 'intelligently' the following is meant: by default, all windows use
8080 their own default attributes. However if some of the parent's
8081 attributes are explicitly changed (that is, using SetFont and not
8082 SetOwnFont) and if the corresponding attribute hadn't been
8083 explicitly set for this window itself, then this window takes the same
8084 value as used by the parent. In addition, if the window overrides
8085 ShouldInheritColours to return false, the colours will not be changed
8086 no matter what and only the font might.
8088 This rather complicated logic is necessary in order to accommodate the
8089 different usage scenarios. The most common one is when all default
8090 attributes are used and in this case, nothing should be inherited as
8091 in modern GUIs different controls use different fonts (and colours)
8092 than their siblings so they can't inherit the same value from the
8093 parent. However it was also deemed desirable to allow to simply change
8094 the attributes of all children at once by just changing the font or
8095 colour of their common parent, hence in this case we do inherit the
8099 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
8101 def ShouldInheritColours(*args
, **kwargs
):
8103 ShouldInheritColours(self) -> bool
8105 Return true from here to allow the colours of this window to be
8106 changed by InheritAttributes, returning false forbids inheriting them
8107 from the parent window.
8109 The base class version returns false, but this method is overridden in
8110 wxControl where it returns true.
8112 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
8114 def PostCreate(self
, pre
):
8116 Phase 3 of the 2-phase create <wink!>
8117 Call this method after precreating the window with the 2-phase create method.
8119 self
.this
= pre
.this
8120 self
.thisown
= pre
.thisown
8122 if hasattr(self
, '_setOORInfo'):
8123 self
._setOORInfo
(self
)
8124 if hasattr(self
, '_setCallbackInfo'):
8125 self
._setCallbackInfo
(self
, self
.__class
__)
8128 class WindowPtr(Window
):
8129 def __init__(self
, this
):
8131 if not hasattr(self
,"thisown"): self
.thisown
= 0
8132 self
.__class
__ = Window
8133 _core_
.Window_swigregister(WindowPtr
)
8135 def PreWindow(*args
, **kwargs
):
8137 PreWindow() -> Window
8139 Precreate a Window for 2-phase creation.
8141 val
= _core_
.new_PreWindow(*args
, **kwargs
)
8145 def Window_NewControlId(*args
, **kwargs
):
8147 Window_NewControlId() -> int
8149 Generate a control id for the controls which were not given one.
8151 return _core_
.Window_NewControlId(*args
, **kwargs
)
8153 def Window_NextControlId(*args
, **kwargs
):
8155 Window_NextControlId(int winid) -> int
8157 Get the id of the control following the one with the given
8160 return _core_
.Window_NextControlId(*args
, **kwargs
)
8162 def Window_PrevControlId(*args
, **kwargs
):
8164 Window_PrevControlId(int winid) -> int
8166 Get the id of the control preceding the one with the given
8169 return _core_
.Window_PrevControlId(*args
, **kwargs
)
8171 def Window_FindFocus(*args
, **kwargs
):
8173 Window_FindFocus() -> Window
8175 Returns the window or control that currently has the keyboard focus,
8178 return _core_
.Window_FindFocus(*args
, **kwargs
)
8180 def Window_GetCapture(*args
, **kwargs
):
8182 Window_GetCapture() -> Window
8184 Returns the window which currently captures the mouse or None
8186 return _core_
.Window_GetCapture(*args
, **kwargs
)
8188 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
8190 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8192 Get the default attributes for this class. This is useful if you want
8193 to use the same font or colour in your own control as in a standard
8194 control -- which is a much better idea than hard coding specific
8195 colours or fonts which might look completely out of place on the
8196 user's system, especially if it uses themes.
8198 The variant parameter is only relevant under Mac currently and is
8199 ignore under other platforms. Under Mac, it will change the size of
8200 the returned font. See `wx.Window.SetWindowVariant` for more about
8203 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
8205 def DLG_PNT(win
, point_or_x
, y
=None):
8207 Convenience function for converting a Point or (x,y) in
8208 dialog units to pixel units.
8211 return win
.ConvertDialogPointToPixels(point_or_x
)
8213 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
8215 def DLG_SZE(win
, size_width
, height
=None):
8217 Convenience function for converting a Size or (w,h) in
8218 dialog units to pixel units.
8221 return win
.ConvertDialogSizeToPixels(size_width
)
8223 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
8226 def FindWindowById(*args
, **kwargs
):
8228 FindWindowById(long id, Window parent=None) -> Window
8230 Find the first window in the application with the given id. If parent
8231 is None, the search will start from all top-level frames and dialog
8232 boxes; if non-None, the search will be limited to the given window
8233 hierarchy. The search is recursive in both cases.
8235 return _core_
.FindWindowById(*args
, **kwargs
)
8237 def FindWindowByName(*args
, **kwargs
):
8239 FindWindowByName(String name, Window parent=None) -> Window
8241 Find a window by its name (as given in a window constructor or Create
8242 function call). If parent is None, the search will start from all
8243 top-level frames and dialog boxes; if non-None, the search will be
8244 limited to the given window hierarchy. The search is recursive in both
8247 If no window with such name is found, wx.FindWindowByLabel is called.
8249 return _core_
.FindWindowByName(*args
, **kwargs
)
8251 def FindWindowByLabel(*args
, **kwargs
):
8253 FindWindowByLabel(String label, Window parent=None) -> Window
8255 Find a window by its label. Depending on the type of window, the label
8256 may be a window title or panel item label. If parent is None, the
8257 search will start from all top-level frames and dialog boxes; if
8258 non-None, the search will be limited to the given window
8259 hierarchy. The search is recursive in both cases.
8261 return _core_
.FindWindowByLabel(*args
, **kwargs
)
8263 def Window_FromHWND(*args
, **kwargs
):
8264 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8265 return _core_
.Window_FromHWND(*args
, **kwargs
)
8266 #---------------------------------------------------------------------------
8268 class Validator(EvtHandler
):
8269 """Proxy of C++ Validator class"""
8271 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8272 def __init__(self
, *args
, **kwargs
):
8273 """__init__(self) -> Validator"""
8274 newobj
= _core_
.new_Validator(*args
, **kwargs
)
8275 self
.this
= newobj
.this
8278 self
._setOORInfo
(self
)
8280 def Clone(*args
, **kwargs
):
8281 """Clone(self) -> Validator"""
8282 return _core_
.Validator_Clone(*args
, **kwargs
)
8284 def Validate(*args
, **kwargs
):
8285 """Validate(self, Window parent) -> bool"""
8286 return _core_
.Validator_Validate(*args
, **kwargs
)
8288 def TransferToWindow(*args
, **kwargs
):
8289 """TransferToWindow(self) -> bool"""
8290 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
8292 def TransferFromWindow(*args
, **kwargs
):
8293 """TransferFromWindow(self) -> bool"""
8294 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
8296 def GetWindow(*args
, **kwargs
):
8297 """GetWindow(self) -> Window"""
8298 return _core_
.Validator_GetWindow(*args
, **kwargs
)
8300 def SetWindow(*args
, **kwargs
):
8301 """SetWindow(self, Window window)"""
8302 return _core_
.Validator_SetWindow(*args
, **kwargs
)
8304 def IsSilent(*args
, **kwargs
):
8305 """IsSilent() -> bool"""
8306 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8308 IsSilent
= staticmethod(IsSilent
)
8309 def SetBellOnError(*args
, **kwargs
):
8310 """SetBellOnError(int doIt=True)"""
8311 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8313 SetBellOnError
= staticmethod(SetBellOnError
)
8315 class ValidatorPtr(Validator
):
8316 def __init__(self
, this
):
8318 if not hasattr(self
,"thisown"): self
.thisown
= 0
8319 self
.__class
__ = Validator
8320 _core_
.Validator_swigregister(ValidatorPtr
)
8322 def Validator_IsSilent(*args
, **kwargs
):
8323 """Validator_IsSilent() -> bool"""
8324 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8326 def Validator_SetBellOnError(*args
, **kwargs
):
8327 """Validator_SetBellOnError(int doIt=True)"""
8328 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8330 class PyValidator(Validator
):
8331 """Proxy of C++ PyValidator class"""
8333 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8334 def __init__(self
, *args
, **kwargs
):
8335 """__init__(self) -> PyValidator"""
8336 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
8337 self
.this
= newobj
.this
8341 self
._setCallbackInfo
(self
, PyValidator
, 1)
8342 self
._setOORInfo
(self
)
8344 def _setCallbackInfo(*args
, **kwargs
):
8345 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8346 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
8349 class PyValidatorPtr(PyValidator
):
8350 def __init__(self
, this
):
8352 if not hasattr(self
,"thisown"): self
.thisown
= 0
8353 self
.__class
__ = PyValidator
8354 _core_
.PyValidator_swigregister(PyValidatorPtr
)
8356 #---------------------------------------------------------------------------
8358 class Menu(EvtHandler
):
8359 """Proxy of C++ Menu class"""
8361 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8362 def __init__(self
, *args
, **kwargs
):
8363 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8364 newobj
= _core_
.new_Menu(*args
, **kwargs
)
8365 self
.this
= newobj
.this
8368 self
._setOORInfo
(self
)
8370 def Append(*args
, **kwargs
):
8371 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8372 return _core_
.Menu_Append(*args
, **kwargs
)
8374 def AppendSeparator(*args
, **kwargs
):
8375 """AppendSeparator(self) -> MenuItem"""
8376 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
8378 def AppendCheckItem(*args
, **kwargs
):
8379 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8380 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
8382 def AppendRadioItem(*args
, **kwargs
):
8383 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8384 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
8386 def AppendMenu(*args
, **kwargs
):
8387 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8388 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
8390 def AppendItem(*args
, **kwargs
):
8391 """AppendItem(self, MenuItem item) -> MenuItem"""
8392 return _core_
.Menu_AppendItem(*args
, **kwargs
)
8394 def Break(*args
, **kwargs
):
8396 return _core_
.Menu_Break(*args
, **kwargs
)
8398 def InsertItem(*args
, **kwargs
):
8399 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8400 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8402 def Insert(*args
, **kwargs
):
8404 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8405 int kind=ITEM_NORMAL) -> MenuItem
8407 return _core_
.Menu_Insert(*args
, **kwargs
)
8409 def InsertSeparator(*args
, **kwargs
):
8410 """InsertSeparator(self, size_t pos) -> MenuItem"""
8411 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8413 def InsertCheckItem(*args
, **kwargs
):
8414 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8415 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8417 def InsertRadioItem(*args
, **kwargs
):
8418 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8419 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8421 def InsertMenu(*args
, **kwargs
):
8422 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8423 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8425 def PrependItem(*args
, **kwargs
):
8426 """PrependItem(self, MenuItem item) -> MenuItem"""
8427 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8429 def Prepend(*args
, **kwargs
):
8430 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8431 return _core_
.Menu_Prepend(*args
, **kwargs
)
8433 def PrependSeparator(*args
, **kwargs
):
8434 """PrependSeparator(self) -> MenuItem"""
8435 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8437 def PrependCheckItem(*args
, **kwargs
):
8438 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8439 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8441 def PrependRadioItem(*args
, **kwargs
):
8442 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8443 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8445 def PrependMenu(*args
, **kwargs
):
8446 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8447 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8449 def Remove(*args
, **kwargs
):
8450 """Remove(self, int id) -> MenuItem"""
8451 return _core_
.Menu_Remove(*args
, **kwargs
)
8453 def RemoveItem(*args
, **kwargs
):
8454 """RemoveItem(self, MenuItem item) -> MenuItem"""
8455 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8457 def Delete(*args
, **kwargs
):
8458 """Delete(self, int id) -> bool"""
8459 return _core_
.Menu_Delete(*args
, **kwargs
)
8461 def DeleteItem(*args
, **kwargs
):
8462 """DeleteItem(self, MenuItem item) -> bool"""
8463 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8465 def Destroy(*args
, **kwargs
):
8469 Deletes the C++ object this Python object is a proxy for.
8471 return _core_
.Menu_Destroy(*args
, **kwargs
)
8473 def DestroyId(*args
, **kwargs
):
8475 DestroyId(self, int id) -> bool
8477 Deletes the C++ object this Python object is a proxy for.
8479 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8481 def DestroyItem(*args
, **kwargs
):
8483 DestroyItem(self, MenuItem item) -> bool
8485 Deletes the C++ object this Python object is a proxy for.
8487 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8489 def GetMenuItemCount(*args
, **kwargs
):
8490 """GetMenuItemCount(self) -> size_t"""
8491 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8493 def GetMenuItems(*args
, **kwargs
):
8494 """GetMenuItems(self) -> PyObject"""
8495 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8497 def FindItem(*args
, **kwargs
):
8498 """FindItem(self, String item) -> int"""
8499 return _core_
.Menu_FindItem(*args
, **kwargs
)
8501 def FindItemById(*args
, **kwargs
):
8502 """FindItemById(self, int id) -> MenuItem"""
8503 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8505 def FindItemByPosition(*args
, **kwargs
):
8506 """FindItemByPosition(self, size_t position) -> MenuItem"""
8507 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
8509 def Enable(*args
, **kwargs
):
8510 """Enable(self, int id, bool enable)"""
8511 return _core_
.Menu_Enable(*args
, **kwargs
)
8513 def IsEnabled(*args
, **kwargs
):
8514 """IsEnabled(self, int id) -> bool"""
8515 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
8517 def Check(*args
, **kwargs
):
8518 """Check(self, int id, bool check)"""
8519 return _core_
.Menu_Check(*args
, **kwargs
)
8521 def IsChecked(*args
, **kwargs
):
8522 """IsChecked(self, int id) -> bool"""
8523 return _core_
.Menu_IsChecked(*args
, **kwargs
)
8525 def SetLabel(*args
, **kwargs
):
8526 """SetLabel(self, int id, String label)"""
8527 return _core_
.Menu_SetLabel(*args
, **kwargs
)
8529 def GetLabel(*args
, **kwargs
):
8530 """GetLabel(self, int id) -> String"""
8531 return _core_
.Menu_GetLabel(*args
, **kwargs
)
8533 def SetHelpString(*args
, **kwargs
):
8534 """SetHelpString(self, int id, String helpString)"""
8535 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
8537 def GetHelpString(*args
, **kwargs
):
8538 """GetHelpString(self, int id) -> String"""
8539 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
8541 def SetTitle(*args
, **kwargs
):
8542 """SetTitle(self, String title)"""
8543 return _core_
.Menu_SetTitle(*args
, **kwargs
)
8545 def GetTitle(*args
, **kwargs
):
8546 """GetTitle(self) -> String"""
8547 return _core_
.Menu_GetTitle(*args
, **kwargs
)
8549 def SetEventHandler(*args
, **kwargs
):
8550 """SetEventHandler(self, EvtHandler handler)"""
8551 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
8553 def GetEventHandler(*args
, **kwargs
):
8554 """GetEventHandler(self) -> EvtHandler"""
8555 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
8557 def SetInvokingWindow(*args
, **kwargs
):
8558 """SetInvokingWindow(self, Window win)"""
8559 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
8561 def GetInvokingWindow(*args
, **kwargs
):
8562 """GetInvokingWindow(self) -> Window"""
8563 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
8565 def GetStyle(*args
, **kwargs
):
8566 """GetStyle(self) -> long"""
8567 return _core_
.Menu_GetStyle(*args
, **kwargs
)
8569 def UpdateUI(*args
, **kwargs
):
8570 """UpdateUI(self, EvtHandler source=None)"""
8571 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
8573 def GetMenuBar(*args
, **kwargs
):
8574 """GetMenuBar(self) -> MenuBar"""
8575 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
8577 def Attach(*args
, **kwargs
):
8578 """Attach(self, wxMenuBarBase menubar)"""
8579 return _core_
.Menu_Attach(*args
, **kwargs
)
8581 def Detach(*args
, **kwargs
):
8583 return _core_
.Menu_Detach(*args
, **kwargs
)
8585 def IsAttached(*args
, **kwargs
):
8586 """IsAttached(self) -> bool"""
8587 return _core_
.Menu_IsAttached(*args
, **kwargs
)
8589 def SetParent(*args
, **kwargs
):
8590 """SetParent(self, Menu parent)"""
8591 return _core_
.Menu_SetParent(*args
, **kwargs
)
8593 def GetParent(*args
, **kwargs
):
8594 """GetParent(self) -> Menu"""
8595 return _core_
.Menu_GetParent(*args
, **kwargs
)
8598 class MenuPtr(Menu
):
8599 def __init__(self
, this
):
8601 if not hasattr(self
,"thisown"): self
.thisown
= 0
8602 self
.__class
__ = Menu
8603 _core_
.Menu_swigregister(MenuPtr
)
8604 DefaultValidator
= cvar
.DefaultValidator
8606 #---------------------------------------------------------------------------
8608 class MenuBar(Window
):
8609 """Proxy of C++ MenuBar class"""
8611 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8612 def __init__(self
, *args
, **kwargs
):
8613 """__init__(self, long style=0) -> MenuBar"""
8614 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
8615 self
.this
= newobj
.this
8618 self
._setOORInfo
(self
)
8620 def Append(*args
, **kwargs
):
8621 """Append(self, Menu menu, String title) -> bool"""
8622 return _core_
.MenuBar_Append(*args
, **kwargs
)
8624 def Insert(*args
, **kwargs
):
8625 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8626 return _core_
.MenuBar_Insert(*args
, **kwargs
)
8628 def GetMenuCount(*args
, **kwargs
):
8629 """GetMenuCount(self) -> size_t"""
8630 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
8632 def GetMenu(*args
, **kwargs
):
8633 """GetMenu(self, size_t pos) -> Menu"""
8634 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
8636 def Replace(*args
, **kwargs
):
8637 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8638 return _core_
.MenuBar_Replace(*args
, **kwargs
)
8640 def Remove(*args
, **kwargs
):
8641 """Remove(self, size_t pos) -> Menu"""
8642 return _core_
.MenuBar_Remove(*args
, **kwargs
)
8644 def EnableTop(*args
, **kwargs
):
8645 """EnableTop(self, size_t pos, bool enable)"""
8646 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
8648 def IsEnabledTop(*args
, **kwargs
):
8649 """IsEnabledTop(self, size_t pos) -> bool"""
8650 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
8652 def SetLabelTop(*args
, **kwargs
):
8653 """SetLabelTop(self, size_t pos, String label)"""
8654 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
8656 def GetLabelTop(*args
, **kwargs
):
8657 """GetLabelTop(self, size_t pos) -> String"""
8658 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
8660 def FindMenuItem(*args
, **kwargs
):
8661 """FindMenuItem(self, String menu, String item) -> int"""
8662 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
8664 def FindItemById(*args
, **kwargs
):
8665 """FindItemById(self, int id) -> MenuItem"""
8666 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
8668 def FindMenu(*args
, **kwargs
):
8669 """FindMenu(self, String title) -> int"""
8670 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
8672 def Enable(*args
, **kwargs
):
8673 """Enable(self, int id, bool enable)"""
8674 return _core_
.MenuBar_Enable(*args
, **kwargs
)
8676 def Check(*args
, **kwargs
):
8677 """Check(self, int id, bool check)"""
8678 return _core_
.MenuBar_Check(*args
, **kwargs
)
8680 def IsChecked(*args
, **kwargs
):
8681 """IsChecked(self, int id) -> bool"""
8682 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
8684 def IsEnabled(*args
, **kwargs
):
8685 """IsEnabled(self, int id) -> bool"""
8686 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
8688 def SetLabel(*args
, **kwargs
):
8689 """SetLabel(self, int id, String label)"""
8690 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
8692 def GetLabel(*args
, **kwargs
):
8693 """GetLabel(self, int id) -> String"""
8694 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
8696 def SetHelpString(*args
, **kwargs
):
8697 """SetHelpString(self, int id, String helpString)"""
8698 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
8700 def GetHelpString(*args
, **kwargs
):
8701 """GetHelpString(self, int id) -> String"""
8702 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
8704 def GetFrame(*args
, **kwargs
):
8705 """GetFrame(self) -> wxFrame"""
8706 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
8708 def IsAttached(*args
, **kwargs
):
8709 """IsAttached(self) -> bool"""
8710 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
8712 def Attach(*args
, **kwargs
):
8713 """Attach(self, wxFrame frame)"""
8714 return _core_
.MenuBar_Attach(*args
, **kwargs
)
8716 def Detach(*args
, **kwargs
):
8718 return _core_
.MenuBar_Detach(*args
, **kwargs
)
8721 class MenuBarPtr(MenuBar
):
8722 def __init__(self
, this
):
8724 if not hasattr(self
,"thisown"): self
.thisown
= 0
8725 self
.__class
__ = MenuBar
8726 _core_
.MenuBar_swigregister(MenuBarPtr
)
8728 #---------------------------------------------------------------------------
8730 class MenuItem(Object
):
8731 """Proxy of C++ MenuItem class"""
8733 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8734 def __init__(self
, *args
, **kwargs
):
8736 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8737 String help=EmptyString, int kind=ITEM_NORMAL,
8738 Menu subMenu=None) -> MenuItem
8740 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
8741 self
.this
= newobj
.this
8744 def GetMenu(*args
, **kwargs
):
8745 """GetMenu(self) -> Menu"""
8746 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
8748 def SetMenu(*args
, **kwargs
):
8749 """SetMenu(self, Menu menu)"""
8750 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
8752 def SetId(*args
, **kwargs
):
8753 """SetId(self, int id)"""
8754 return _core_
.MenuItem_SetId(*args
, **kwargs
)
8756 def GetId(*args
, **kwargs
):
8757 """GetId(self) -> int"""
8758 return _core_
.MenuItem_GetId(*args
, **kwargs
)
8760 def IsSeparator(*args
, **kwargs
):
8761 """IsSeparator(self) -> bool"""
8762 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
8764 def SetText(*args
, **kwargs
):
8765 """SetText(self, String str)"""
8766 return _core_
.MenuItem_SetText(*args
, **kwargs
)
8768 def GetLabel(*args
, **kwargs
):
8769 """GetLabel(self) -> String"""
8770 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
8772 def GetText(*args
, **kwargs
):
8773 """GetText(self) -> String"""
8774 return _core_
.MenuItem_GetText(*args
, **kwargs
)
8776 def GetLabelFromText(*args
, **kwargs
):
8777 """GetLabelFromText(String text) -> String"""
8778 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8780 GetLabelFromText
= staticmethod(GetLabelFromText
)
8781 def GetKind(*args
, **kwargs
):
8782 """GetKind(self) -> int"""
8783 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
8785 def SetKind(*args
, **kwargs
):
8786 """SetKind(self, int kind)"""
8787 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
8789 def SetCheckable(*args
, **kwargs
):
8790 """SetCheckable(self, bool checkable)"""
8791 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
8793 def IsCheckable(*args
, **kwargs
):
8794 """IsCheckable(self) -> bool"""
8795 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
8797 def IsSubMenu(*args
, **kwargs
):
8798 """IsSubMenu(self) -> bool"""
8799 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
8801 def SetSubMenu(*args
, **kwargs
):
8802 """SetSubMenu(self, Menu menu)"""
8803 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
8805 def GetSubMenu(*args
, **kwargs
):
8806 """GetSubMenu(self) -> Menu"""
8807 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
8809 def Enable(*args
, **kwargs
):
8810 """Enable(self, bool enable=True)"""
8811 return _core_
.MenuItem_Enable(*args
, **kwargs
)
8813 def IsEnabled(*args
, **kwargs
):
8814 """IsEnabled(self) -> bool"""
8815 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
8817 def Check(*args
, **kwargs
):
8818 """Check(self, bool check=True)"""
8819 return _core_
.MenuItem_Check(*args
, **kwargs
)
8821 def IsChecked(*args
, **kwargs
):
8822 """IsChecked(self) -> bool"""
8823 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
8825 def Toggle(*args
, **kwargs
):
8827 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
8829 def SetHelp(*args
, **kwargs
):
8830 """SetHelp(self, String str)"""
8831 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
8833 def GetHelp(*args
, **kwargs
):
8834 """GetHelp(self) -> String"""
8835 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
8837 def GetAccel(*args
, **kwargs
):
8838 """GetAccel(self) -> AcceleratorEntry"""
8839 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
8841 def SetAccel(*args
, **kwargs
):
8842 """SetAccel(self, AcceleratorEntry accel)"""
8843 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
8845 def SetFont(*args
, **kwargs
):
8846 """SetFont(self, Font font)"""
8847 return _core_
.MenuItem_SetFont(*args
, **kwargs
)
8849 def GetFont(*args
, **kwargs
):
8850 """GetFont(self) -> Font"""
8851 return _core_
.MenuItem_GetFont(*args
, **kwargs
)
8853 def SetTextColour(*args
, **kwargs
):
8854 """SetTextColour(self, Colour colText)"""
8855 return _core_
.MenuItem_SetTextColour(*args
, **kwargs
)
8857 def GetTextColour(*args
, **kwargs
):
8858 """GetTextColour(self) -> Colour"""
8859 return _core_
.MenuItem_GetTextColour(*args
, **kwargs
)
8861 def SetBackgroundColour(*args
, **kwargs
):
8862 """SetBackgroundColour(self, Colour colBack)"""
8863 return _core_
.MenuItem_SetBackgroundColour(*args
, **kwargs
)
8865 def GetBackgroundColour(*args
, **kwargs
):
8866 """GetBackgroundColour(self) -> Colour"""
8867 return _core_
.MenuItem_GetBackgroundColour(*args
, **kwargs
)
8869 def SetBitmaps(*args
, **kwargs
):
8870 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8871 return _core_
.MenuItem_SetBitmaps(*args
, **kwargs
)
8873 def SetDisabledBitmap(*args
, **kwargs
):
8874 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8875 return _core_
.MenuItem_SetDisabledBitmap(*args
, **kwargs
)
8877 def GetDisabledBitmap(*args
, **kwargs
):
8878 """GetDisabledBitmap(self) -> Bitmap"""
8879 return _core_
.MenuItem_GetDisabledBitmap(*args
, **kwargs
)
8881 def SetMarginWidth(*args
, **kwargs
):
8882 """SetMarginWidth(self, int nWidth)"""
8883 return _core_
.MenuItem_SetMarginWidth(*args
, **kwargs
)
8885 def GetMarginWidth(*args
, **kwargs
):
8886 """GetMarginWidth(self) -> int"""
8887 return _core_
.MenuItem_GetMarginWidth(*args
, **kwargs
)
8889 def GetDefaultMarginWidth(*args
, **kwargs
):
8890 """GetDefaultMarginWidth() -> int"""
8891 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8893 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
8894 def IsOwnerDrawn(*args
, **kwargs
):
8895 """IsOwnerDrawn(self) -> bool"""
8896 return _core_
.MenuItem_IsOwnerDrawn(*args
, **kwargs
)
8898 def SetOwnerDrawn(*args
, **kwargs
):
8899 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8900 return _core_
.MenuItem_SetOwnerDrawn(*args
, **kwargs
)
8902 def ResetOwnerDrawn(*args
, **kwargs
):
8903 """ResetOwnerDrawn(self)"""
8904 return _core_
.MenuItem_ResetOwnerDrawn(*args
, **kwargs
)
8906 def SetBitmap(*args
, **kwargs
):
8907 """SetBitmap(self, Bitmap bitmap)"""
8908 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
8910 def GetBitmap(*args
, **kwargs
):
8911 """GetBitmap(self) -> Bitmap"""
8912 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
8915 class MenuItemPtr(MenuItem
):
8916 def __init__(self
, this
):
8918 if not hasattr(self
,"thisown"): self
.thisown
= 0
8919 self
.__class
__ = MenuItem
8920 _core_
.MenuItem_swigregister(MenuItemPtr
)
8922 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8923 """MenuItem_GetLabelFromText(String text) -> String"""
8924 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8926 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8927 """MenuItem_GetDefaultMarginWidth() -> int"""
8928 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8930 #---------------------------------------------------------------------------
8932 class Control(Window
):
8934 This is the base class for a control or 'widget'.
8936 A control is generally a small window which processes user input
8937 and/or displays one or more item of data.
8940 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8941 def __init__(self
, *args
, **kwargs
):
8943 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8944 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8945 String name=ControlNameStr) -> Control
8947 Create a Control. Normally you should only call this from a subclass'
8948 __init__ as a plain old wx.Control is not very useful.
8950 newobj
= _core_
.new_Control(*args
, **kwargs
)
8951 self
.this
= newobj
.this
8954 self
._setOORInfo
(self
)
8956 def Create(*args
, **kwargs
):
8958 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8959 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8960 String name=ControlNameStr) -> bool
8962 Do the 2nd phase and create the GUI control.
8964 return _core_
.Control_Create(*args
, **kwargs
)
8966 def Command(*args
, **kwargs
):
8968 Command(self, CommandEvent event)
8970 Simulates the effect of the user issuing a command to the item.
8972 :see: `wx.CommandEvent`
8975 return _core_
.Control_Command(*args
, **kwargs
)
8977 def GetLabel(*args
, **kwargs
):
8979 GetLabel(self) -> String
8981 Return a control's text.
8983 return _core_
.Control_GetLabel(*args
, **kwargs
)
8985 def SetLabel(*args
, **kwargs
):
8987 SetLabel(self, String label)
8989 Sets the item's text.
8991 return _core_
.Control_SetLabel(*args
, **kwargs
)
8993 def GetClassDefaultAttributes(*args
, **kwargs
):
8995 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8997 Get the default attributes for this class. This is useful if you want
8998 to use the same font or colour in your own control as in a standard
8999 control -- which is a much better idea than hard coding specific
9000 colours or fonts which might look completely out of place on the
9001 user's system, especially if it uses themes.
9003 The variant parameter is only relevant under Mac currently and is
9004 ignore under other platforms. Under Mac, it will change the size of
9005 the returned font. See `wx.Window.SetWindowVariant` for more about
9008 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
9010 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
9012 class ControlPtr(Control
):
9013 def __init__(self
, this
):
9015 if not hasattr(self
,"thisown"): self
.thisown
= 0
9016 self
.__class
__ = Control
9017 _core_
.Control_swigregister(ControlPtr
)
9018 ControlNameStr
= cvar
.ControlNameStr
9020 def PreControl(*args
, **kwargs
):
9022 PreControl() -> Control
9024 Precreate a Control control for 2-phase creation
9026 val
= _core_
.new_PreControl(*args
, **kwargs
)
9030 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
9032 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9034 Get the default attributes for this class. This is useful if you want
9035 to use the same font or colour in your own control as in a standard
9036 control -- which is a much better idea than hard coding specific
9037 colours or fonts which might look completely out of place on the
9038 user's system, especially if it uses themes.
9040 The variant parameter is only relevant under Mac currently and is
9041 ignore under other platforms. Under Mac, it will change the size of
9042 the returned font. See `wx.Window.SetWindowVariant` for more about
9045 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
9047 #---------------------------------------------------------------------------
9049 class ItemContainer(object):
9051 The wx.ItemContainer class defines an interface which is implemented
9052 by all controls which have string subitems, each of which may be
9053 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
9054 as `wx.ComboBox` which implements an extended interface deriving from
9057 It defines the methods for accessing the control's items and although
9058 each of the derived classes implements them differently, they still
9059 all conform to the same interface.
9061 The items in a wx.ItemContainer have (non empty) string labels and,
9062 optionally, client data associated with them.
9065 def __init__(self
): raise RuntimeError, "No constructor defined"
9067 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9068 def Append(*args
, **kwargs
):
9070 Append(self, String item, PyObject clientData=None) -> int
9072 Adds the item to the control, associating the given data with the item
9073 if not None. The return value is the index of the newly added item
9074 which may be different from the last one if the control is sorted (e.g.
9075 has wx.LB_SORT or wx.CB_SORT style).
9077 return _core_
.ItemContainer_Append(*args
, **kwargs
)
9079 def AppendItems(*args
, **kwargs
):
9081 AppendItems(self, List strings)
9083 Apend several items at once to the control. Notice that calling this
9084 method may be much faster than appending the items one by one if you
9085 need to add a lot of items.
9087 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
9089 def Insert(*args
, **kwargs
):
9091 Insert(self, String item, int pos, PyObject clientData=None) -> int
9093 Insert an item into the control before the item at the ``pos`` index,
9094 optionally associating some data object with the item.
9096 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
9098 def Clear(*args
, **kwargs
):
9102 Removes all items from the control.
9104 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
9106 def Delete(*args
, **kwargs
):
9110 Deletes the item at the zero-based index 'n' from the control. Note
9111 that it is an error (signalled by a `wx.PyAssertionError` exception if
9112 enabled) to remove an item with the index negative or greater or equal
9113 than the number of items in the control.
9115 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
9117 def GetClientData(*args
, **kwargs
):
9119 GetClientData(self, int n) -> PyObject
9121 Returns the client data associated with the given item, (if any.)
9123 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
9125 def SetClientData(*args
, **kwargs
):
9127 SetClientData(self, int n, PyObject clientData)
9129 Associate the given client data with the item at position n.
9131 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
9133 def GetCount(*args
, **kwargs
):
9135 GetCount(self) -> int
9137 Returns the number of items in the control.
9139 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
9141 def IsEmpty(*args
, **kwargs
):
9143 IsEmpty(self) -> bool
9145 Returns True if the control is empty or False if it has some items.
9147 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
9149 def GetString(*args
, **kwargs
):
9151 GetString(self, int n) -> String
9153 Returns the label of the item with the given index.
9155 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
9157 def GetStrings(*args
, **kwargs
):
9158 """GetStrings(self) -> wxArrayString"""
9159 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
9161 def SetString(*args
, **kwargs
):
9163 SetString(self, int n, String s)
9165 Sets the label for the given item.
9167 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
9169 def FindString(*args
, **kwargs
):
9171 FindString(self, String s) -> int
9173 Finds an item whose label matches the given string. Returns the
9174 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9177 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
9179 def SetSelection(*args
, **kwargs
):
9181 SetSelection(self, int n)
9183 Sets the item at index 'n' to be the selected item.
9185 return _core_
.ItemContainer_SetSelection(*args
, **kwargs
)
9187 def GetSelection(*args
, **kwargs
):
9189 GetSelection(self) -> int
9191 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9194 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
9196 def SetStringSelection(*args
, **kwargs
):
9197 """SetStringSelection(self, String s) -> bool"""
9198 return _core_
.ItemContainer_SetStringSelection(*args
, **kwargs
)
9200 def GetStringSelection(*args
, **kwargs
):
9202 GetStringSelection(self) -> String
9204 Returns the label of the selected item or an empty string if no item
9207 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
9209 def Select(*args
, **kwargs
):
9213 This is the same as `SetSelection` and exists only because it is
9214 slightly more natural for controls which support multiple selection.
9216 return _core_
.ItemContainer_Select(*args
, **kwargs
)
9219 class ItemContainerPtr(ItemContainer
):
9220 def __init__(self
, this
):
9222 if not hasattr(self
,"thisown"): self
.thisown
= 0
9223 self
.__class
__ = ItemContainer
9224 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
9226 #---------------------------------------------------------------------------
9228 class ControlWithItems(Control
,ItemContainer
):
9230 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9231 wx.Control class, and is used for the base class of various controls
9234 def __init__(self
): raise RuntimeError, "No constructor defined"
9236 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9238 class ControlWithItemsPtr(ControlWithItems
):
9239 def __init__(self
, this
):
9241 if not hasattr(self
,"thisown"): self
.thisown
= 0
9242 self
.__class
__ = ControlWithItems
9243 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
9245 #---------------------------------------------------------------------------
9247 class SizerItem(Object
):
9249 The wx.SizerItem class is used to track the position, size and other
9250 attributes of each item managed by a `wx.Sizer`. In normal usage user
9251 code should never need to deal directly with a wx.SizerItem, but
9252 custom classes derived from `wx.PySizer` will probably need to use the
9253 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9255 :see: `wx.Sizer`, `wx.GBSizerItem`
9258 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9259 def __init__(self
, *args
, **kwargs
):
9261 __init__(self) -> SizerItem
9263 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9264 size will need to be set before this item can be used in a Sizer.
9266 You will probably never need to create a wx.SizerItem directly as they
9267 are created automatically when the sizer's Add, Insert or Prepend
9270 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9272 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
9273 self
.this
= newobj
.this
9276 def DeleteWindows(*args
, **kwargs
):
9280 Destroy the window or the windows in a subsizer, depending on the type
9283 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
9285 def DetachSizer(*args
, **kwargs
):
9289 Enable deleting the SizerItem without destroying the contained sizer.
9291 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
9293 def GetSize(*args
, **kwargs
):
9295 GetSize(self) -> Size
9297 Get the current size of the item, as set in the last Layout.
9299 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
9301 def CalcMin(*args
, **kwargs
):
9303 CalcMin(self) -> Size
9305 Calculates the minimum desired size for the item, including any space
9308 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
9310 def SetDimension(*args
, **kwargs
):
9312 SetDimension(self, Point pos, Size size)
9314 Set the position and size of the space allocated for this item by the
9315 sizer, and adjust the position and size of the item (window or
9316 subsizer) to be within that space taking alignment and borders into
9319 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
9321 def GetMinSize(*args
, **kwargs
):
9323 GetMinSize(self) -> Size
9325 Get the minimum size needed for the item.
9327 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
9329 def GetMinSizeWithBorder(*args
, **kwargs
):
9331 GetMinSizeWithBorder(self) -> Size
9333 Get the minimum size needed for the item with space for the borders
9336 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
9338 def SetInitSize(*args
, **kwargs
):
9339 """SetInitSize(self, int x, int y)"""
9340 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
9342 def SetRatioWH(*args
, **kwargs
):
9344 SetRatioWH(self, int width, int height)
9346 Set the ratio item attribute.
9348 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
9350 def SetRatioSize(*args
, **kwargs
):
9352 SetRatioSize(self, Size size)
9354 Set the ratio item attribute.
9356 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
9358 def SetRatio(*args
, **kwargs
):
9360 SetRatio(self, float ratio)
9362 Set the ratio item attribute.
9364 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
9366 def GetRatio(*args
, **kwargs
):
9368 GetRatio(self) -> float
9370 Set the ratio item attribute.
9372 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
9374 def GetRect(*args
, **kwargs
):
9376 GetRect(self) -> Rect
9378 Returns the rectangle that the sizer item should occupy
9380 return _core_
.SizerItem_GetRect(*args
, **kwargs
)
9382 def IsWindow(*args
, **kwargs
):
9384 IsWindow(self) -> bool
9386 Is this sizer item a window?
9388 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
9390 def IsSizer(*args
, **kwargs
):
9392 IsSizer(self) -> bool
9394 Is this sizer item a subsizer?
9396 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
9398 def IsSpacer(*args
, **kwargs
):
9400 IsSpacer(self) -> bool
9402 Is this sizer item a spacer?
9404 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
9406 def SetProportion(*args
, **kwargs
):
9408 SetProportion(self, int proportion)
9410 Set the proportion value for this item.
9412 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
9414 def GetProportion(*args
, **kwargs
):
9416 GetProportion(self) -> int
9418 Get the proportion value for this item.
9420 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
9422 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
9423 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
9424 def SetFlag(*args
, **kwargs
):
9426 SetFlag(self, int flag)
9428 Set the flag value for this item.
9430 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
9432 def GetFlag(*args
, **kwargs
):
9434 GetFlag(self) -> int
9436 Get the flag value for this item.
9438 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
9440 def SetBorder(*args
, **kwargs
):
9442 SetBorder(self, int border)
9444 Set the border value for this item.
9446 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
9448 def GetBorder(*args
, **kwargs
):
9450 GetBorder(self) -> int
9452 Get the border value for this item.
9454 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
9456 def GetWindow(*args
, **kwargs
):
9458 GetWindow(self) -> Window
9460 Get the window (if any) that is managed by this sizer item.
9462 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
9464 def SetWindow(*args
, **kwargs
):
9466 SetWindow(self, Window window)
9468 Set the window to be managed by this sizer item.
9470 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9472 def GetSizer(*args
, **kwargs
):
9474 GetSizer(self) -> Sizer
9476 Get the subsizer (if any) that is managed by this sizer item.
9478 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9480 def SetSizer(*args
, **kwargs
):
9482 SetSizer(self, Sizer sizer)
9484 Set the subsizer to be managed by this sizer item.
9486 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9488 def GetSpacer(*args
, **kwargs
):
9490 GetSpacer(self) -> Size
9492 Get the size of the spacer managed by this sizer item.
9494 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9496 def SetSpacer(*args
, **kwargs
):
9498 SetSpacer(self, Size size)
9500 Set the size of the spacer to be managed by this sizer item.
9502 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9504 def Show(*args
, **kwargs
):
9506 Show(self, bool show)
9508 Set the show item attribute, which sizers use to determine if the item
9509 is to be made part of the layout or not. If the item is tracking a
9510 window then it is shown or hidden as needed.
9512 return _core_
.SizerItem_Show(*args
, **kwargs
)
9514 def IsShown(*args
, **kwargs
):
9516 IsShown(self) -> bool
9518 Is the item to be shown in the layout?
9520 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
9522 def GetPosition(*args
, **kwargs
):
9524 GetPosition(self) -> Point
9526 Returns the current position of the item, as set in the last Layout.
9528 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
9530 def GetUserData(*args
, **kwargs
):
9532 GetUserData(self) -> PyObject
9534 Returns the userData associated with this sizer item, or None if there
9537 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
9540 class SizerItemPtr(SizerItem
):
9541 def __init__(self
, this
):
9543 if not hasattr(self
,"thisown"): self
.thisown
= 0
9544 self
.__class
__ = SizerItem
9545 _core_
.SizerItem_swigregister(SizerItemPtr
)
9547 def SizerItemWindow(*args
, **kwargs
):
9549 SizerItemWindow(Window window, int proportion, int flag, int border,
9550 PyObject userData=None) -> SizerItem
9552 Constructs a `wx.SizerItem` for tracking a window.
9554 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
9558 def SizerItemSpacer(*args
, **kwargs
):
9560 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9561 PyObject userData=None) -> SizerItem
9563 Constructs a `wx.SizerItem` for tracking a spacer.
9565 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
9569 def SizerItemSizer(*args
, **kwargs
):
9571 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9572 PyObject userData=None) -> SizerItem
9574 Constructs a `wx.SizerItem` for tracking a subsizer
9576 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
9580 class Sizer(Object
):
9582 wx.Sizer is the abstract base class used for laying out subwindows in
9583 a window. You cannot use wx.Sizer directly; instead, you will have to
9584 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9585 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9586 and `wx.GridBagSizer`.
9588 The concept implemented by sizers in wxWidgets is closely related to
9589 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9590 toolkit or the Qt toolkit. It is based upon the idea of the individual
9591 subwindows reporting their minimal required size and their ability to
9592 get stretched if the size of the parent window has changed. This will
9593 most often mean that the programmer does not set the original size of
9594 a dialog in the beginning, rather the dialog will assigned a sizer and
9595 this sizer will be queried about the recommended size. The sizer in
9596 turn will query its children, which can be normal windows or contorls,
9597 empty space or other sizers, so that a hierarchy of sizers can be
9598 constructed. Note that wxSizer does not derive from wxWindow and thus
9599 do not interfere with tab ordering and requires very little resources
9600 compared to a real window on screen.
9602 What makes sizers so well fitted for use in wxWidgets is the fact that
9603 every control reports its own minimal size and the algorithm can
9604 handle differences in font sizes or different window (dialog item)
9605 sizes on different platforms without problems. If for example the
9606 standard font as well as the overall design of Mac widgets requires
9607 more space than on Windows, then the initial size of a dialog using a
9608 sizer will automatically be bigger on Mac than on Windows.
9610 def __init__(self
): raise RuntimeError, "No constructor defined"
9612 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9613 def _setOORInfo(*args
, **kwargs
):
9614 """_setOORInfo(self, PyObject _self)"""
9615 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
9617 def Add(*args
, **kwargs
):
9619 Add(self, item, int proportion=0, int flag=0, int border=0,
9620 PyObject userData=None) -> wx.SizerItem
9622 Appends a child item to the sizer.
9624 return _core_
.Sizer_Add(*args
, **kwargs
)
9626 def Insert(*args
, **kwargs
):
9628 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9629 PyObject userData=None) -> wx.SizerItem
9631 Inserts a new item into the list of items managed by this sizer before
9632 the item at index *before*. See `Add` for a description of the parameters.
9634 return _core_
.Sizer_Insert(*args
, **kwargs
)
9636 def Prepend(*args
, **kwargs
):
9638 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9639 PyObject userData=None) -> wx.SizerItem
9641 Adds a new item to the begining of the list of sizer items managed by
9642 this sizer. See `Add` for a description of the parameters.
9644 return _core_
.Sizer_Prepend(*args
, **kwargs
)
9646 def Remove(*args
, **kwargs
):
9648 Remove(self, item) -> bool
9650 Removes an item from the sizer and destroys it. This method does not
9651 cause any layout or resizing to take place, call `Layout` to update
9652 the layout on screen after removing a child from the sizer. The
9653 *item* parameter can be either a window, a sizer, or the zero-based
9654 index of an item to remove. Returns True if the child item was found
9657 return _core_
.Sizer_Remove(*args
, **kwargs
)
9659 def Detach(*args
, **kwargs
):
9661 Detach(self, item) -> bool
9663 Detaches an item from the sizer without destroying it. This method
9664 does not cause any layout or resizing to take place, call `Layout` to
9665 do so. The *item* parameter can be either a window, a sizer, or the
9666 zero-based index of the item to be detached. Returns True if the child item
9667 was found and detached.
9669 return _core_
.Sizer_Detach(*args
, **kwargs
)
9671 def GetItem(*args
, **kwargs
):
9673 GetItem(self, item) -> wx.SizerItem
9675 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9676 parameter can be either a window, a sizer, or the zero-based index of
9677 the item to be detached.
9679 return _core_
.Sizer_GetItem(*args
, **kwargs
)
9681 def _SetItemMinSize(*args
, **kwargs
):
9682 """_SetItemMinSize(self, PyObject item, Size size)"""
9683 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
9685 def SetItemMinSize(self
, item
, *args
):
9687 SetItemMinSize(self, item, Size size)
9689 Sets the minimum size that will be allocated for an item in the sizer.
9690 The *item* parameter can be either a window, a sizer, or the
9691 zero-based index of the item. If a window or sizer is given then it
9692 will be searched for recursivly in subsizers if neccessary.
9695 # for backward compatibility accept separate width,height args too
9696 return self
._SetItemMinSize
(item
, args
)
9698 return self
._SetItemMinSize
(item
, args
[0])
9700 def AddItem(*args
, **kwargs
):
9702 AddItem(self, SizerItem item)
9704 Adds a `wx.SizerItem` to the sizer.
9706 return _core_
.Sizer_AddItem(*args
, **kwargs
)
9708 def InsertItem(*args
, **kwargs
):
9710 InsertItem(self, int index, SizerItem item)
9712 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9714 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
9716 def PrependItem(*args
, **kwargs
):
9718 PrependItem(self, SizerItem item)
9720 Prepends a `wx.SizerItem` to the sizer.
9722 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
9724 def AddMany(self
, items
):
9726 AddMany is a convenience method for adding several items
9727 to a sizer at one time. Simply pass it a list of tuples,
9728 where each tuple consists of the parameters that you
9729 would normally pass to the `Add` method.
9732 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
9736 # for backwards compatibility only, please do not use in new code
9737 def AddWindow(self
, *args
, **kw
):
9738 """Compatibility alias for `Add`."""
9739 return self
.Add(*args
, **kw
)
9740 def AddSizer(self
, *args
, **kw
):
9741 """Compatibility alias for `Add`."""
9742 return self
.Add(*args
, **kw
)
9743 def AddSpacer(self
, *args
, **kw
):
9744 """Compatibility alias for `Add`."""
9745 return self
.Add(*args
, **kw
)
9747 def PrependWindow(self
, *args
, **kw
):
9748 """Compatibility alias for `Prepend`."""
9749 return self
.Prepend(*args
, **kw
)
9750 def PrependSizer(self
, *args
, **kw
):
9751 """Compatibility alias for `Prepend`."""
9752 return self
.Prepend(*args
, **kw
)
9753 def PrependSpacer(self
, *args
, **kw
):
9754 """Compatibility alias for `Prepend`."""
9755 return self
.Prepend(*args
, **kw
)
9757 def InsertWindow(self
, *args
, **kw
):
9758 """Compatibility alias for `Insert`."""
9759 return self
.Insert(*args
, **kw
)
9760 def InsertSizer(self
, *args
, **kw
):
9761 """Compatibility alias for `Insert`."""
9762 return self
.Insert(*args
, **kw
)
9763 def InsertSpacer(self
, *args
, **kw
):
9764 """Compatibility alias for `Insert`."""
9765 return self
.Insert(*args
, **kw
)
9767 def RemoveWindow(self
, *args
, **kw
):
9768 """Compatibility alias for `Remove`."""
9769 return self
.Remove(*args
, **kw
)
9770 def RemoveSizer(self
, *args
, **kw
):
9771 """Compatibility alias for `Remove`."""
9772 return self
.Remove(*args
, **kw
)
9773 def RemovePos(self
, *args
, **kw
):
9774 """Compatibility alias for `Remove`."""
9775 return self
.Remove(*args
, **kw
)
9778 def SetDimension(*args
, **kwargs
):
9780 SetDimension(self, int x, int y, int width, int height)
9782 Call this to force the sizer to take the given dimension and thus
9783 force the items owned by the sizer to resize themselves according to
9784 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9787 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
9789 def SetMinSize(*args
, **kwargs
):
9791 SetMinSize(self, Size size)
9793 Call this to give the sizer a minimal size. Normally, the sizer will
9794 calculate its minimal size based purely on how much space its children
9795 need. After calling this method `GetMinSize` will return either the
9796 minimal size as requested by its children or the minimal size set
9797 here, depending on which is bigger.
9799 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
9801 def GetSize(*args
, **kwargs
):
9803 GetSize(self) -> Size
9805 Returns the current size of the space managed by the sizer.
9807 return _core_
.Sizer_GetSize(*args
, **kwargs
)
9809 def GetPosition(*args
, **kwargs
):
9811 GetPosition(self) -> Point
9813 Returns the current position of the sizer's managed space.
9815 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
9817 def GetMinSize(*args
, **kwargs
):
9819 GetMinSize(self) -> Size
9821 Returns the minimal size of the sizer. This is either the combined
9822 minimal size of all the children and their borders or the minimal size
9823 set by SetMinSize, depending on which is bigger.
9825 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
9827 def GetSizeTuple(self
):
9828 return self
.GetSize().Get()
9829 def GetPositionTuple(self
):
9830 return self
.GetPosition().Get()
9831 def GetMinSizeTuple(self
):
9832 return self
.GetMinSize().Get()
9834 def RecalcSizes(*args
, **kwargs
):
9838 Using the sizes calculated by `CalcMin` reposition and resize all the
9839 items managed by this sizer. You should not need to call this directly as
9840 it is called by `Layout`.
9842 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
9844 def CalcMin(*args
, **kwargs
):
9846 CalcMin(self) -> Size
9848 This method is where the sizer will do the actual calculation of its
9849 children's minimal sizes. You should not need to call this directly as
9850 it is called by `Layout`.
9852 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
9854 def Layout(*args
, **kwargs
):
9858 This method will force the recalculation and layout of the items
9859 controlled by the sizer using the current space allocated to the
9860 sizer. Normally this is called automatically from the owning window's
9861 EVT_SIZE handler, but it is also useful to call it from user code when
9862 one of the items in a sizer change size, or items are added or
9865 return _core_
.Sizer_Layout(*args
, **kwargs
)
9867 def Fit(*args
, **kwargs
):
9869 Fit(self, Window window) -> Size
9871 Tell the sizer to resize the *window* to match the sizer's minimal
9872 size. This is commonly done in the constructor of the window itself in
9873 order to set its initial size to match the needs of the children as
9874 determined by the sizer. Returns the new size.
9876 For a top level window this is the total window size, not the client size.
9878 return _core_
.Sizer_Fit(*args
, **kwargs
)
9880 def FitInside(*args
, **kwargs
):
9882 FitInside(self, Window window)
9884 Tell the sizer to resize the *virtual size* of the *window* to match the
9885 sizer's minimal size. This will not alter the on screen size of the
9886 window, but may cause the addition/removal/alteration of scrollbars
9887 required to view the virtual area in windows which manage it.
9889 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9892 return _core_
.Sizer_FitInside(*args
, **kwargs
)
9894 def SetSizeHints(*args
, **kwargs
):
9896 SetSizeHints(self, Window window)
9898 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9899 match the sizer's minimal size. This is commonly done in the
9900 constructor of the window itself if the window is resizable (as are
9901 many dialogs under Unix and frames on probably all platforms) in order
9902 to prevent the window from being sized smaller than the minimal size
9903 required by the sizer.
9905 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
9907 def SetVirtualSizeHints(*args
, **kwargs
):
9909 SetVirtualSizeHints(self, Window window)
9911 Tell the sizer to set the minimal size of the window virtual area to
9912 match the sizer's minimal size. For windows with managed scrollbars
9913 this will set them appropriately.
9915 :see: `wx.ScrolledWindow.SetScrollbars`
9918 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
9920 def Clear(*args
, **kwargs
):
9922 Clear(self, bool deleteWindows=False)
9924 Clear all items from the sizer, optionally destroying the window items
9927 return _core_
.Sizer_Clear(*args
, **kwargs
)
9929 def DeleteWindows(*args
, **kwargs
):
9933 Destroy all windows managed by the sizer.
9935 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
9937 def GetChildren(*args
, **kwargs
):
9939 GetChildren(self) -> list
9941 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9943 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
9945 def Show(*args
, **kwargs
):
9947 Show(self, item, bool show=True, bool recursive=false) -> bool
9949 Shows or hides an item managed by the sizer. To make a sizer item
9950 disappear or reappear, use Show followed by `Layout`. The *item*
9951 parameter can be either a window, a sizer, or the zero-based index of
9952 the item. Use the recursive parameter to show or hide an item in a
9953 subsizer. Returns True if the item was found.
9955 return _core_
.Sizer_Show(*args
, **kwargs
)
9957 def IsShown(*args
, **kwargs
):
9961 Determines if the item is currently shown. sizer. To make a sizer
9962 item disappear or reappear, use Show followed by `Layout`. The *item*
9963 parameter can be either a window, a sizer, or the zero-based index of
9966 return _core_
.Sizer_IsShown(*args
, **kwargs
)
9968 def Hide(self
, item
, recursive
=False):
9970 A convenience method for `Show`(item, False, recursive).
9972 return self
.Show(item
, False, recursive
)
9974 def ShowItems(*args
, **kwargs
):
9976 ShowItems(self, bool show)
9978 Recursively call `wx.SizerItem.Show` on all sizer items.
9980 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
9983 class SizerPtr(Sizer
):
9984 def __init__(self
, this
):
9986 if not hasattr(self
,"thisown"): self
.thisown
= 0
9987 self
.__class
__ = Sizer
9988 _core_
.Sizer_swigregister(SizerPtr
)
9990 class PySizer(Sizer
):
9992 wx.PySizer is a special version of `wx.Sizer` that has been
9993 instrumented to allow the C++ virtual methods to be overloaded in
9994 Python derived classes. You would derive from this class if you are
9995 wanting to implement a custom sizer in Python code. Simply implement
9996 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9999 class MySizer(wx.PySizer):
10000 def __init__(self):
10001 wx.PySizer.__init__(self)
10004 for item in self.GetChildren():
10005 # calculate the total minimum width and height needed
10006 # by all items in the sizer according to this sizer's
10007 # layout algorithm.
10009 return wx.Size(width, height)
10011 def RecalcSizes(self):
10012 # find the space allotted to this sizer
10013 pos = self.GetPosition()
10014 size = self.GetSize()
10015 for item in self.GetChildren():
10016 # Recalculate (if necessary) the position and size of
10017 # each item and then call item.SetDimension to do the
10018 # actual positioning and sizing of the items within the
10019 # space alloted to this sizer.
10021 item.SetDimension(itemPos, itemSize)
10024 When `Layout` is called it first calls `CalcMin` followed by
10025 `RecalcSizes` so you can optimize a bit by saving the results of
10026 `CalcMin` and reusing them in `RecalcSizes`.
10028 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
10032 def __repr__(self
):
10033 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10034 def __init__(self
, *args
, **kwargs
):
10036 __init__(self) -> PySizer
10038 Creates a wx.PySizer. Must be called from the __init__ in the derived
10041 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
10042 self
.this
= newobj
.this
10045 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
10047 def _setCallbackInfo(*args
, **kwargs
):
10048 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
10049 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
10052 class PySizerPtr(PySizer
):
10053 def __init__(self
, this
):
10055 if not hasattr(self
,"thisown"): self
.thisown
= 0
10056 self
.__class
__ = PySizer
10057 _core_
.PySizer_swigregister(PySizerPtr
)
10059 #---------------------------------------------------------------------------
10061 class BoxSizer(Sizer
):
10063 The basic idea behind a box sizer is that windows will most often be
10064 laid out in rather simple basic geometry, typically in a row or a
10065 column or nested hierarchies of either. A wx.BoxSizer will lay out
10066 its items in a simple row or column, depending on the orientation
10067 parameter passed to the constructor.
10069 def __repr__(self
):
10070 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10071 def __init__(self
, *args
, **kwargs
):
10073 __init__(self, int orient=HORIZONTAL) -> BoxSizer
10075 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
10076 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
10079 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
10080 self
.this
= newobj
.this
10083 self
._setOORInfo
(self
)
10085 def GetOrientation(*args
, **kwargs
):
10087 GetOrientation(self) -> int
10089 Returns the current orientation of the sizer.
10091 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
10093 def SetOrientation(*args
, **kwargs
):
10095 SetOrientation(self, int orient)
10097 Resets the orientation of the sizer.
10099 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
10102 class BoxSizerPtr(BoxSizer
):
10103 def __init__(self
, this
):
10105 if not hasattr(self
,"thisown"): self
.thisown
= 0
10106 self
.__class
__ = BoxSizer
10107 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
10109 #---------------------------------------------------------------------------
10111 class StaticBoxSizer(BoxSizer
):
10113 wx.StaticBoxSizer derives from and functions identically to the
10114 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10115 manages. Note that this static box must be created separately and
10116 passed to the sizer constructor.
10118 def __repr__(self
):
10119 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10120 def __init__(self
, *args
, **kwargs
):
10122 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10124 Constructor. It takes an associated static box and the orientation
10125 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10128 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
10129 self
.this
= newobj
.this
10132 self
._setOORInfo
(self
)
10134 def GetStaticBox(*args
, **kwargs
):
10136 GetStaticBox(self) -> StaticBox
10138 Returns the static box associated with this sizer.
10140 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
10143 class StaticBoxSizerPtr(StaticBoxSizer
):
10144 def __init__(self
, this
):
10146 if not hasattr(self
,"thisown"): self
.thisown
= 0
10147 self
.__class
__ = StaticBoxSizer
10148 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
10150 #---------------------------------------------------------------------------
10152 class GridSizer(Sizer
):
10154 A grid sizer is a sizer which lays out its children in a
10155 two-dimensional table with all cells having the same size. In other
10156 words, the width of each cell within the grid is the width of the
10157 widest item added to the sizer and the height of each grid cell is the
10158 height of the tallest item. An optional vertical and/or horizontal
10159 gap between items can also be specified (in pixels.)
10161 Items are placed in the cells of the grid in the order they are added,
10162 in row-major order. In other words, the first row is filled first,
10163 then the second, and so on until all items have been added. (If
10164 neccessary, additional rows will be added as items are added.) If you
10165 need to have greater control over the cells that items are placed in
10166 then use the `wx.GridBagSizer`.
10169 def __repr__(self
):
10170 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10171 def __init__(self
, *args
, **kwargs
):
10173 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10175 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10176 of columns and rows in the sizer - if either of the parameters is
10177 zero, it will be calculated to from the total number of children in
10178 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10179 define extra space between all children.
10181 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
10182 self
.this
= newobj
.this
10185 self
._setOORInfo
(self
)
10187 def SetCols(*args
, **kwargs
):
10189 SetCols(self, int cols)
10191 Sets the number of columns in the sizer.
10193 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
10195 def SetRows(*args
, **kwargs
):
10197 SetRows(self, int rows)
10199 Sets the number of rows in the sizer.
10201 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
10203 def SetVGap(*args
, **kwargs
):
10205 SetVGap(self, int gap)
10207 Sets the vertical gap (in pixels) between the cells in the sizer.
10209 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
10211 def SetHGap(*args
, **kwargs
):
10213 SetHGap(self, int gap)
10215 Sets the horizontal gap (in pixels) between cells in the sizer
10217 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
10219 def GetCols(*args
, **kwargs
):
10221 GetCols(self) -> int
10223 Returns the number of columns in the sizer.
10225 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
10227 def GetRows(*args
, **kwargs
):
10229 GetRows(self) -> int
10231 Returns the number of rows in the sizer.
10233 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
10235 def GetVGap(*args
, **kwargs
):
10237 GetVGap(self) -> int
10239 Returns the vertical gap (in pixels) between the cells in the sizer.
10241 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
10243 def GetHGap(*args
, **kwargs
):
10245 GetHGap(self) -> int
10247 Returns the horizontal gap (in pixels) between cells in the sizer.
10249 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
10252 class GridSizerPtr(GridSizer
):
10253 def __init__(self
, this
):
10255 if not hasattr(self
,"thisown"): self
.thisown
= 0
10256 self
.__class
__ = GridSizer
10257 _core_
.GridSizer_swigregister(GridSizerPtr
)
10259 #---------------------------------------------------------------------------
10261 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
10262 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
10263 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
10264 class FlexGridSizer(GridSizer
):
10266 A flex grid sizer is a sizer which lays out its children in a
10267 two-dimensional table with all table cells in one row having the same
10268 height and all cells in one column having the same width, but all
10269 rows or all columns are not necessarily the same height or width as in
10270 the `wx.GridSizer`.
10272 wx.FlexGridSizer can also size items equally in one direction but
10273 unequally ("flexibly") in the other. If the sizer is only flexible
10274 in one direction (this can be changed using `SetFlexibleDirection`), it
10275 needs to be decided how the sizer should grow in the other ("non
10276 flexible") direction in order to fill the available space. The
10277 `SetNonFlexibleGrowMode` method serves this purpose.
10281 def __repr__(self
):
10282 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10283 def __init__(self
, *args
, **kwargs
):
10285 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10287 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10288 number of columns and rows in the sizer - if either of the parameters
10289 is zero, it will be calculated to from the total number of children in
10290 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10291 define extra space between all children.
10293 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
10294 self
.this
= newobj
.this
10297 self
._setOORInfo
(self
)
10299 def AddGrowableRow(*args
, **kwargs
):
10301 AddGrowableRow(self, size_t idx, int proportion=0)
10303 Specifies that row *idx* (starting from zero) should be grown if there
10304 is extra space available to the sizer.
10306 The *proportion* parameter has the same meaning as the stretch factor
10307 for the box sizers except that if all proportions are 0, then all
10308 columns are resized equally (instead of not being resized at all).
10310 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
10312 def RemoveGrowableRow(*args
, **kwargs
):
10314 RemoveGrowableRow(self, size_t idx)
10316 Specifies that row *idx* is no longer growable.
10318 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
10320 def AddGrowableCol(*args
, **kwargs
):
10322 AddGrowableCol(self, size_t idx, int proportion=0)
10324 Specifies that column *idx* (starting from zero) should be grown if
10325 there is extra space available to the sizer.
10327 The *proportion* parameter has the same meaning as the stretch factor
10328 for the box sizers except that if all proportions are 0, then all
10329 columns are resized equally (instead of not being resized at all).
10331 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
10333 def RemoveGrowableCol(*args
, **kwargs
):
10335 RemoveGrowableCol(self, size_t idx)
10337 Specifies that column *idx* is no longer growable.
10339 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
10341 def SetFlexibleDirection(*args
, **kwargs
):
10343 SetFlexibleDirection(self, int direction)
10345 Specifies whether the sizer should flexibly resize its columns, rows,
10346 or both. Argument *direction* can be one of the following values. Any
10347 other value is ignored.
10349 ============== =======================================
10350 wx.VERTICAL Rows are flexibly sized.
10351 wx.HORIZONTAL Columns are flexibly sized.
10352 wx.BOTH Both rows and columns are flexibly sized
10353 (this is the default value).
10354 ============== =======================================
10356 Note that this method does not trigger relayout.
10359 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
10361 def GetFlexibleDirection(*args
, **kwargs
):
10363 GetFlexibleDirection(self) -> int
10365 Returns a value that specifies whether the sizer
10366 flexibly resizes its columns, rows, or both (default).
10368 :see: `SetFlexibleDirection`
10370 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
10372 def SetNonFlexibleGrowMode(*args
, **kwargs
):
10374 SetNonFlexibleGrowMode(self, int mode)
10376 Specifies how the sizer should grow in the non-flexible direction if
10377 there is one (so `SetFlexibleDirection` must have been called
10378 previously). Argument *mode* can be one of the following values:
10380 ========================== =================================================
10381 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10382 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10383 `AddGrowableCol` and `AddGrowableRow`. In this
10384 case equal sizing applies to minimum sizes of
10385 columns or rows (this is the default value).
10386 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10387 the non flexible direction, whether they are
10388 growable or not in the flexbile direction.
10389 ========================== =================================================
10391 Note that this method does not trigger relayout.
10395 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
10397 def GetNonFlexibleGrowMode(*args
, **kwargs
):
10399 GetNonFlexibleGrowMode(self) -> int
10401 Returns the value that specifies how the sizer grows in the
10402 non-flexible direction if there is one.
10404 :see: `SetNonFlexibleGrowMode`
10406 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
10408 def GetRowHeights(*args
, **kwargs
):
10410 GetRowHeights(self) -> list
10412 Returns a list of integers representing the heights of each of the
10415 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
10417 def GetColWidths(*args
, **kwargs
):
10419 GetColWidths(self) -> list
10421 Returns a list of integers representing the widths of each of the
10422 columns in the sizer.
10424 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
10427 class FlexGridSizerPtr(FlexGridSizer
):
10428 def __init__(self
, this
):
10430 if not hasattr(self
,"thisown"): self
.thisown
= 0
10431 self
.__class
__ = FlexGridSizer
10432 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
10434 class StdDialogButtonSizer(BoxSizer
):
10436 A special sizer that knows how to order and position standard buttons
10437 in order to conform to the current platform's standards. You simply
10438 need to add each `wx.Button` to the sizer, and be sure to create the
10439 buttons using the standard ID's. Then call `Realize` and the sizer
10440 will take care of the rest.
10443 def __repr__(self
):
10444 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10445 def __init__(self
, *args
, **kwargs
):
10446 """__init__(self) -> StdDialogButtonSizer"""
10447 newobj
= _core_
.new_StdDialogButtonSizer(*args
, **kwargs
)
10448 self
.this
= newobj
.this
10451 def AddButton(*args
, **kwargs
):
10453 AddButton(self, wxButton button)
10455 Use this to add the buttons to this sizer. Do not use the `Add`
10456 method in the base class.
10458 return _core_
.StdDialogButtonSizer_AddButton(*args
, **kwargs
)
10460 def Realize(*args
, **kwargs
):
10464 This funciton needs to be called after all the buttons have been added
10465 to the sizer. It will reorder them and position them in a platform
10468 return _core_
.StdDialogButtonSizer_Realize(*args
, **kwargs
)
10470 def SetAffirmativeButton(*args
, **kwargs
):
10471 """SetAffirmativeButton(self, wxButton button)"""
10472 return _core_
.StdDialogButtonSizer_SetAffirmativeButton(*args
, **kwargs
)
10474 def SetNegativeButton(*args
, **kwargs
):
10475 """SetNegativeButton(self, wxButton button)"""
10476 return _core_
.StdDialogButtonSizer_SetNegativeButton(*args
, **kwargs
)
10478 def SetCancelButton(*args
, **kwargs
):
10479 """SetCancelButton(self, wxButton button)"""
10480 return _core_
.StdDialogButtonSizer_SetCancelButton(*args
, **kwargs
)
10482 def GetAffirmativeButton(*args
, **kwargs
):
10483 """GetAffirmativeButton(self) -> wxButton"""
10484 return _core_
.StdDialogButtonSizer_GetAffirmativeButton(*args
, **kwargs
)
10486 def GetApplyButton(*args
, **kwargs
):
10487 """GetApplyButton(self) -> wxButton"""
10488 return _core_
.StdDialogButtonSizer_GetApplyButton(*args
, **kwargs
)
10490 def GetNegativeButton(*args
, **kwargs
):
10491 """GetNegativeButton(self) -> wxButton"""
10492 return _core_
.StdDialogButtonSizer_GetNegativeButton(*args
, **kwargs
)
10494 def GetCancelButton(*args
, **kwargs
):
10495 """GetCancelButton(self) -> wxButton"""
10496 return _core_
.StdDialogButtonSizer_GetCancelButton(*args
, **kwargs
)
10498 def GetHelpButton(*args
, **kwargs
):
10499 """GetHelpButton(self) -> wxButton"""
10500 return _core_
.StdDialogButtonSizer_GetHelpButton(*args
, **kwargs
)
10503 class StdDialogButtonSizerPtr(StdDialogButtonSizer
):
10504 def __init__(self
, this
):
10506 if not hasattr(self
,"thisown"): self
.thisown
= 0
10507 self
.__class
__ = StdDialogButtonSizer
10508 _core_
.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr
)
10510 #---------------------------------------------------------------------------
10512 class GBPosition(object):
10514 This class represents the position of an item in a virtual grid of
10515 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10516 typemaps that will automatically convert from a 2-element sequence of
10517 integers to a wx.GBPosition, so you can use the more pythonic
10518 representation of the position nearly transparently in Python code.
10520 def __repr__(self
):
10521 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10522 def __init__(self
, *args
, **kwargs
):
10524 __init__(self, int row=0, int col=0) -> GBPosition
10526 This class represents the position of an item in a virtual grid of
10527 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10528 typemaps that will automatically convert from a 2-element sequence of
10529 integers to a wx.GBPosition, so you can use the more pythonic
10530 representation of the position nearly transparently in Python code.
10532 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
10533 self
.this
= newobj
.this
10536 def GetRow(*args
, **kwargs
):
10537 """GetRow(self) -> int"""
10538 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
10540 def GetCol(*args
, **kwargs
):
10541 """GetCol(self) -> int"""
10542 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
10544 def SetRow(*args
, **kwargs
):
10545 """SetRow(self, int row)"""
10546 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
10548 def SetCol(*args
, **kwargs
):
10549 """SetCol(self, int col)"""
10550 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
10552 def __eq__(*args
, **kwargs
):
10553 """__eq__(self, GBPosition other) -> bool"""
10554 return _core_
.GBPosition___eq__(*args
, **kwargs
)
10556 def __ne__(*args
, **kwargs
):
10557 """__ne__(self, GBPosition other) -> bool"""
10558 return _core_
.GBPosition___ne__(*args
, **kwargs
)
10560 def Set(*args
, **kwargs
):
10561 """Set(self, int row=0, int col=0)"""
10562 return _core_
.GBPosition_Set(*args
, **kwargs
)
10564 def Get(*args
, **kwargs
):
10565 """Get(self) -> PyObject"""
10566 return _core_
.GBPosition_Get(*args
, **kwargs
)
10568 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10569 def __str__(self
): return str(self
.Get())
10570 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
10571 def __len__(self
): return len(self
.Get())
10572 def __getitem__(self
, index
): return self
.Get()[index
]
10573 def __setitem__(self
, index
, val
):
10574 if index
== 0: self
.SetRow(val
)
10575 elif index
== 1: self
.SetCol(val
)
10576 else: raise IndexError
10577 def __nonzero__(self
): return self
.Get() != (0,0)
10578 __safe_for_unpickling__
= True
10579 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
10581 row
= property(GetRow
, SetRow
)
10582 col
= property(GetCol
, SetCol
)
10585 class GBPositionPtr(GBPosition
):
10586 def __init__(self
, this
):
10588 if not hasattr(self
,"thisown"): self
.thisown
= 0
10589 self
.__class
__ = GBPosition
10590 _core_
.GBPosition_swigregister(GBPositionPtr
)
10592 class GBSpan(object):
10594 This class is used to hold the row and column spanning attributes of
10595 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10596 automatically convert from a 2-element sequence of integers to a
10597 wx.GBSpan, so you can use the more pythonic representation of the span
10598 nearly transparently in Python code.
10601 def __repr__(self
):
10602 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10603 def __init__(self
, *args
, **kwargs
):
10605 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10607 Construct a new wxGBSpan, optionally setting the rowspan and
10608 colspan. The default is (1,1). (Meaning that the item occupies one
10609 cell in each direction.
10611 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
10612 self
.this
= newobj
.this
10615 def GetRowspan(*args
, **kwargs
):
10616 """GetRowspan(self) -> int"""
10617 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
10619 def GetColspan(*args
, **kwargs
):
10620 """GetColspan(self) -> int"""
10621 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
10623 def SetRowspan(*args
, **kwargs
):
10624 """SetRowspan(self, int rowspan)"""
10625 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
10627 def SetColspan(*args
, **kwargs
):
10628 """SetColspan(self, int colspan)"""
10629 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
10631 def __eq__(*args
, **kwargs
):
10632 """__eq__(self, GBSpan other) -> bool"""
10633 return _core_
.GBSpan___eq__(*args
, **kwargs
)
10635 def __ne__(*args
, **kwargs
):
10636 """__ne__(self, GBSpan other) -> bool"""
10637 return _core_
.GBSpan___ne__(*args
, **kwargs
)
10639 def Set(*args
, **kwargs
):
10640 """Set(self, int rowspan=1, int colspan=1)"""
10641 return _core_
.GBSpan_Set(*args
, **kwargs
)
10643 def Get(*args
, **kwargs
):
10644 """Get(self) -> PyObject"""
10645 return _core_
.GBSpan_Get(*args
, **kwargs
)
10647 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10648 def __str__(self
): return str(self
.Get())
10649 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
10650 def __len__(self
): return len(self
.Get())
10651 def __getitem__(self
, index
): return self
.Get()[index
]
10652 def __setitem__(self
, index
, val
):
10653 if index
== 0: self
.SetRowspan(val
)
10654 elif index
== 1: self
.SetColspan(val
)
10655 else: raise IndexError
10656 def __nonzero__(self
): return self
.Get() != (0,0)
10657 __safe_for_unpickling__
= True
10658 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
10660 rowspan
= property(GetRowspan
, SetRowspan
)
10661 colspan
= property(GetColspan
, SetColspan
)
10664 class GBSpanPtr(GBSpan
):
10665 def __init__(self
, this
):
10667 if not hasattr(self
,"thisown"): self
.thisown
= 0
10668 self
.__class
__ = GBSpan
10669 _core_
.GBSpan_swigregister(GBSpanPtr
)
10671 class GBSizerItem(SizerItem
):
10673 The wx.GBSizerItem class is used to track the additional data about
10674 items in a `wx.GridBagSizer` such as the item's position in the grid
10675 and how many rows or columns it spans.
10678 def __repr__(self
):
10679 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10680 def __init__(self
, *args
, **kwargs
):
10682 __init__(self) -> GBSizerItem
10684 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10685 size will need to be set, as well as a position and span before this
10686 item can be used in a Sizer.
10688 You will probably never need to create a wx.GBSizerItem directly as they
10689 are created automatically when the sizer's Add method is called.
10691 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
10692 self
.this
= newobj
.this
10695 def GetPos(*args
, **kwargs
):
10697 GetPos(self) -> GBPosition
10699 Get the grid position of the item
10701 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
10703 def GetPosTuple(self
): return self
.GetPos().Get()
10704 def GetSpan(*args
, **kwargs
):
10706 GetSpan(self) -> GBSpan
10708 Get the row and column spanning of the item
10710 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
10712 def GetSpanTuple(self
): return self
.GetSpan().Get()
10713 def SetPos(*args
, **kwargs
):
10715 SetPos(self, GBPosition pos) -> bool
10717 If the item is already a member of a sizer then first ensure that
10718 there is no other item that would intersect with this one at the new
10719 position, then set the new position. Returns True if the change is
10720 successful and after the next Layout() the item will be moved.
10722 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
10724 def SetSpan(*args
, **kwargs
):
10726 SetSpan(self, GBSpan span) -> bool
10728 If the item is already a member of a sizer then first ensure that
10729 there is no other item that would intersect with this one with its new
10730 spanning size, then set the new spanning. Returns True if the change
10731 is successful and after the next Layout() the item will be resized.
10734 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
10736 def Intersects(*args
, **kwargs
):
10738 Intersects(self, GBSizerItem other) -> bool
10740 Returns True if this item and the other item instersect.
10742 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
10744 def IntersectsPos(*args
, **kwargs
):
10746 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10748 Returns True if the given pos/span would intersect with this item.
10750 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
10752 def GetEndPos(*args
, **kwargs
):
10754 GetEndPos(self) -> GBPosition
10756 Get the row and column of the endpoint of this item.
10758 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
10760 def GetGBSizer(*args
, **kwargs
):
10762 GetGBSizer(self) -> GridBagSizer
10764 Get the sizer this item is a member of.
10766 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
10768 def SetGBSizer(*args
, **kwargs
):
10770 SetGBSizer(self, GridBagSizer sizer)
10772 Set the sizer this item is a member of.
10774 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
10777 class GBSizerItemPtr(GBSizerItem
):
10778 def __init__(self
, this
):
10780 if not hasattr(self
,"thisown"): self
.thisown
= 0
10781 self
.__class
__ = GBSizerItem
10782 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
10783 DefaultSpan
= cvar
.DefaultSpan
10785 def GBSizerItemWindow(*args
, **kwargs
):
10787 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10788 int border, PyObject userData=None) -> GBSizerItem
10790 Construct a `wx.GBSizerItem` for a window.
10792 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
10796 def GBSizerItemSizer(*args
, **kwargs
):
10798 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10799 int border, PyObject userData=None) -> GBSizerItem
10801 Construct a `wx.GBSizerItem` for a sizer
10803 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
10807 def GBSizerItemSpacer(*args
, **kwargs
):
10809 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10810 int flag, int border, PyObject userData=None) -> GBSizerItem
10812 Construct a `wx.GBSizerItem` for a spacer.
10814 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
10818 class GridBagSizer(FlexGridSizer
):
10820 A `wx.Sizer` that can lay out items in a virtual grid like a
10821 `wx.FlexGridSizer` but in this case explicit positioning of the items
10822 is allowed using `wx.GBPosition`, and items can optionally span more
10823 than one row and/or column using `wx.GBSpan`. The total size of the
10824 virtual grid is determined by the largest row and column that items are
10825 positioned at, adjusted for spanning.
10828 def __repr__(self
):
10829 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10830 def __init__(self
, *args
, **kwargs
):
10832 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10834 Constructor, with optional parameters to specify the gap between the
10837 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
10838 self
.this
= newobj
.this
10841 self
._setOORInfo
(self
)
10843 def Add(*args
, **kwargs
):
10845 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10846 int border=0, userData=None) -> wx.GBSizerItem
10848 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10849 more than one row or column as specified with *span*. The remaining
10850 args behave similarly to `wx.Sizer.Add`.
10852 Returns True if the item was successfully placed at the given cell
10853 position, False if something was already there.
10856 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
10858 def AddItem(*args
, **kwargs
):
10860 Add(self, GBSizerItem item) -> wx.GBSizerItem
10862 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10863 the item was successfully placed at its given cell position, False if
10864 something was already there.
10866 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
10868 def GetCellSize(*args
, **kwargs
):
10870 GetCellSize(self, int row, int col) -> Size
10872 Get the size of the specified cell, including hgap and
10873 vgap. Only valid after a Layout.
10875 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
10877 def GetEmptyCellSize(*args
, **kwargs
):
10879 GetEmptyCellSize(self) -> Size
10881 Get the size used for cells in the grid with no item.
10883 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
10885 def SetEmptyCellSize(*args
, **kwargs
):
10887 SetEmptyCellSize(self, Size sz)
10889 Set the size used for cells in the grid with no item.
10891 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
10893 def GetItemPosition(*args
):
10895 GetItemPosition(self, item) -> GBPosition
10897 Get the grid position of the specified *item* where *item* is either a
10898 window or subsizer that is a member of this sizer, or a zero-based
10901 return _core_
.GridBagSizer_GetItemPosition(*args
)
10903 def SetItemPosition(*args
):
10905 SetItemPosition(self, item, GBPosition pos) -> bool
10907 Set the grid position of the specified *item* where *item* is either a
10908 window or subsizer that is a member of this sizer, or a zero-based
10909 index of an item. Returns True on success. If the move is not
10910 allowed (because an item is already there) then False is returned.
10913 return _core_
.GridBagSizer_SetItemPosition(*args
)
10915 def GetItemSpan(*args
):
10917 GetItemSpan(self, item) -> GBSpan
10919 Get the row/col spanning of the specified *item* where *item* is
10920 either a window or subsizer that is a member of this sizer, or a
10921 zero-based index of an item.
10923 return _core_
.GridBagSizer_GetItemSpan(*args
)
10925 def SetItemSpan(*args
):
10927 SetItemSpan(self, item, GBSpan span) -> bool
10929 Set the row/col spanning of the specified *item* where *item* is
10930 either a window or subsizer that is a member of this sizer, or a
10931 zero-based index of an item. Returns True on success. If the move is
10932 not allowed (because an item is already there) then False is returned.
10934 return _core_
.GridBagSizer_SetItemSpan(*args
)
10936 def FindItem(*args
):
10938 FindItem(self, item) -> GBSizerItem
10940 Find the sizer item for the given window or subsizer, returns None if
10941 not found. (non-recursive)
10943 return _core_
.GridBagSizer_FindItem(*args
)
10945 def FindItemAtPosition(*args
, **kwargs
):
10947 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10949 Return the sizer item for the given grid cell, or None if there is no
10950 item at that position. (non-recursive)
10952 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
10954 def FindItemAtPoint(*args
, **kwargs
):
10956 FindItemAtPoint(self, Point pt) -> GBSizerItem
10958 Return the sizer item located at the point given in *pt*, or None if
10959 there is no item at that point. The (x,y) coordinates in pt correspond
10960 to the client coordinates of the window using the sizer for
10961 layout. (non-recursive)
10963 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
10965 def CheckForIntersection(*args
, **kwargs
):
10967 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10969 Look at all items and see if any intersect (or would overlap) the
10970 given *item*. Returns True if so, False if there would be no overlap.
10971 If an *excludeItem* is given then it will not be checked for
10972 intersection, for example it may be the item we are checking the
10976 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
10978 def CheckForIntersectionPos(*args
, **kwargs
):
10980 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10982 Look at all items and see if any intersect (or would overlap) the
10983 given position and span. Returns True if so, False if there would be
10984 no overlap. If an *excludeItem* is given then it will not be checked
10985 for intersection, for example it may be the item we are checking the
10988 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
10991 class GridBagSizerPtr(GridBagSizer
):
10992 def __init__(self
, this
):
10994 if not hasattr(self
,"thisown"): self
.thisown
= 0
10995 self
.__class
__ = GridBagSizer
10996 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
10998 #---------------------------------------------------------------------------
11002 Right
= _core_
.Right
11003 Bottom
= _core_
.Bottom
11004 Width
= _core_
.Width
11005 Height
= _core_
.Height
11006 Centre
= _core_
.Centre
11007 Center
= _core_
.Center
11008 CentreX
= _core_
.CentreX
11009 CentreY
= _core_
.CentreY
11010 Unconstrained
= _core_
.Unconstrained
11012 PercentOf
= _core_
.PercentOf
11013 Above
= _core_
.Above
11014 Below
= _core_
.Below
11015 LeftOf
= _core_
.LeftOf
11016 RightOf
= _core_
.RightOf
11017 SameAs
= _core_
.SameAs
11018 Absolute
= _core_
.Absolute
11019 class IndividualLayoutConstraint(Object
):
11021 Objects of this class are stored in the `wx.LayoutConstraints` class as
11022 one of eight possible constraints that a window can be involved in.
11023 You will never need to create an instance of
11024 wx.IndividualLayoutConstraint, rather you should create a
11025 `wx.LayoutConstraints` instance and use the individual contstraints
11028 def __init__(self
): raise RuntimeError, "No constructor defined"
11029 def __repr__(self
):
11030 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11031 def Set(*args
, **kwargs
):
11033 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
11035 Sets the properties of the constraint. Normally called by one of the
11036 convenience functions such as Above, RightOf, SameAs.
11038 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
11040 def LeftOf(*args
, **kwargs
):
11042 LeftOf(self, Window sibling, int marg=0)
11044 Constrains this edge to be to the left of the given window, with an
11045 optional margin. Implicitly, this is relative to the left edge of the
11048 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
11050 def RightOf(*args
, **kwargs
):
11052 RightOf(self, Window sibling, int marg=0)
11054 Constrains this edge to be to the right of the given window, with an
11055 optional margin. Implicitly, this is relative to the right edge of the
11058 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
11060 def Above(*args
, **kwargs
):
11062 Above(self, Window sibling, int marg=0)
11064 Constrains this edge to be above the given window, with an optional
11065 margin. Implicitly, this is relative to the top edge of the other
11068 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
11070 def Below(*args
, **kwargs
):
11072 Below(self, Window sibling, int marg=0)
11074 Constrains this edge to be below the given window, with an optional
11075 margin. Implicitly, this is relative to the bottom edge of the other
11078 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
11080 def SameAs(*args
, **kwargs
):
11082 SameAs(self, Window otherW, int edge, int marg=0)
11084 Constrains this edge or dimension to be to the same as the edge of the
11085 given window, with an optional margin.
11087 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
11089 def PercentOf(*args
, **kwargs
):
11091 PercentOf(self, Window otherW, int wh, int per)
11093 Constrains this edge or dimension to be to a percentage of the given
11094 window, with an optional margin.
11096 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
11098 def Absolute(*args
, **kwargs
):
11100 Absolute(self, int val)
11102 Constrains this edge or dimension to be the given absolute value.
11104 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
11106 def Unconstrained(*args
, **kwargs
):
11108 Unconstrained(self)
11110 Sets this edge or dimension to be unconstrained, that is, dependent on
11111 other edges and dimensions from which this value can be deduced.
11113 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
11115 def AsIs(*args
, **kwargs
):
11119 Sets this edge or constraint to be whatever the window's value is at
11120 the moment. If either of the width and height constraints are *as is*,
11121 the window will not be resized, but moved instead. This is important
11122 when considering panel items which are intended to have a default
11123 size, such as a button, which may take its size from the size of the
11126 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
11128 def GetOtherWindow(*args
, **kwargs
):
11129 """GetOtherWindow(self) -> Window"""
11130 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
11132 def GetMyEdge(*args
, **kwargs
):
11133 """GetMyEdge(self) -> int"""
11134 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
11136 def SetEdge(*args
, **kwargs
):
11137 """SetEdge(self, int which)"""
11138 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
11140 def SetValue(*args
, **kwargs
):
11141 """SetValue(self, int v)"""
11142 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
11144 def GetMargin(*args
, **kwargs
):
11145 """GetMargin(self) -> int"""
11146 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
11148 def SetMargin(*args
, **kwargs
):
11149 """SetMargin(self, int m)"""
11150 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
11152 def GetValue(*args
, **kwargs
):
11153 """GetValue(self) -> int"""
11154 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
11156 def GetPercent(*args
, **kwargs
):
11157 """GetPercent(self) -> int"""
11158 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
11160 def GetOtherEdge(*args
, **kwargs
):
11161 """GetOtherEdge(self) -> int"""
11162 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
11164 def GetDone(*args
, **kwargs
):
11165 """GetDone(self) -> bool"""
11166 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
11168 def SetDone(*args
, **kwargs
):
11169 """SetDone(self, bool d)"""
11170 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
11172 def GetRelationship(*args
, **kwargs
):
11173 """GetRelationship(self) -> int"""
11174 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
11176 def SetRelationship(*args
, **kwargs
):
11177 """SetRelationship(self, int r)"""
11178 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
11180 def ResetIfWin(*args
, **kwargs
):
11182 ResetIfWin(self, Window otherW) -> bool
11184 Reset constraint if it mentions otherWin
11186 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
11188 def SatisfyConstraint(*args
, **kwargs
):
11190 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11192 Try to satisfy constraint
11194 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
11196 def GetEdge(*args
, **kwargs
):
11198 GetEdge(self, int which, Window thisWin, Window other) -> int
11200 Get the value of this edge or dimension, or if this
11201 is not determinable, -1.
11203 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
11206 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
11207 def __init__(self
, this
):
11209 if not hasattr(self
,"thisown"): self
.thisown
= 0
11210 self
.__class
__ = IndividualLayoutConstraint
11211 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
11213 class LayoutConstraints(Object
):
11215 **Note:** constraints are now deprecated and you should use sizers
11218 Objects of this class can be associated with a window to define its
11219 layout constraints, with respect to siblings or its parent.
11221 The class consists of the following eight constraints of class
11222 wx.IndividualLayoutConstraint, some or all of which should be accessed
11223 directly to set the appropriate constraints.
11225 * left: represents the left hand edge of the window
11226 * right: represents the right hand edge of the window
11227 * top: represents the top edge of the window
11228 * bottom: represents the bottom edge of the window
11229 * width: represents the width of the window
11230 * height: represents the height of the window
11231 * centreX: represents the horizontal centre point of the window
11232 * centreY: represents the vertical centre point of the window
11234 Most constraints are initially set to have the relationship
11235 wxUnconstrained, which means that their values should be calculated by
11236 looking at known constraints. The exceptions are width and height,
11237 which are set to wxAsIs to ensure that if the user does not specify a
11238 constraint, the existing width and height will be used, to be
11239 compatible with panel items which often have take a default size. If
11240 the constraint is ``wx.AsIs``, the dimension will not be changed.
11242 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11245 def __repr__(self
):
11246 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11247 left
= property(_core_
.LayoutConstraints_left_get
)
11248 top
= property(_core_
.LayoutConstraints_top_get
)
11249 right
= property(_core_
.LayoutConstraints_right_get
)
11250 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
11251 width
= property(_core_
.LayoutConstraints_width_get
)
11252 height
= property(_core_
.LayoutConstraints_height_get
)
11253 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
11254 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
11255 def __init__(self
, *args
, **kwargs
):
11256 """__init__(self) -> LayoutConstraints"""
11257 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
11258 self
.this
= newobj
.this
11261 def SatisfyConstraints(*args
, **kwargs
):
11262 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11263 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
11265 def AreSatisfied(*args
, **kwargs
):
11266 """AreSatisfied(self) -> bool"""
11267 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
11270 class LayoutConstraintsPtr(LayoutConstraints
):
11271 def __init__(self
, this
):
11273 if not hasattr(self
,"thisown"): self
.thisown
= 0
11274 self
.__class
__ = LayoutConstraints
11275 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
11277 #----------------------------------------------------------------------------
11279 # Use Python's bool constants if available, make some if not
11283 __builtins__
.True = 1==1
11284 __builtins__
.False = 1==0
11285 def bool(value
): return not not value
11286 __builtins__
.bool = bool
11290 # workarounds for bad wxRTTI names
11291 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
11292 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
11293 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
11296 #----------------------------------------------------------------------------
11297 # Load version numbers from __version__... Ensure that major and minor
11298 # versions are the same for both wxPython and wxWidgets.
11300 from __version__
import *
11301 __version__
= VERSION_STRING
11303 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
11304 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
11305 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
11307 warnings
.warn("wxPython/wxWidgets release number mismatch")
11309 #----------------------------------------------------------------------------
11311 # Set the default string<-->unicode conversion encoding from the
11312 # locale. This encoding is used when string or unicode objects need
11313 # to be converted in order to pass them to wxWidgets. Please be aware
11314 # that the default encoding within the same locale may be slightly
11315 # different on different platforms. For example, please see
11316 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11317 # between the common latin/roman encodings.
11319 default
= _sys
.getdefaultencoding()
11320 if default
== 'ascii':
11324 default
= locale
.getdefaultlocale()[1]
11325 codecs
.lookup(default
)
11326 except (ValueError, LookupError):
11327 default
= _sys
.getdefaultencoding()
11331 wx
.SetDefaultPyEncoding(default
)
11334 #----------------------------------------------------------------------------
11336 class PyDeadObjectError(AttributeError):
11339 class _wxPyDeadObject(object):
11341 Instances of wx objects that are OOR capable will have their __class__
11342 changed to this class when the C++ object is deleted. This should help
11343 prevent crashes due to referencing a bogus C++ pointer.
11345 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11346 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11348 def __repr__(self
):
11349 if not hasattr(self
, "_name"):
11350 self
._name
= "[unknown]"
11351 return self
.reprStr
% self
._name
11353 def __getattr__(self
, *args
):
11354 if not hasattr(self
, "_name"):
11355 self
._name
= "[unknown]"
11356 raise PyDeadObjectError(self
.attrStr
% self
._name
)
11358 def __nonzero__(self
):
11363 class PyUnbornObjectError(AttributeError):
11366 class _wxPyUnbornObject(object):
11368 Some stock objects are created when the wx._core module is
11369 imported, but their C++ instance is not created until the wx.App
11370 object is created and initialized. These object instances will
11371 temporarily have their __class__ changed to this class so an
11372 exception will be raised if they are used before the C++ instance
11376 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11377 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
11379 def __repr__(self
):
11380 #if not hasattr(self, "_name"):
11381 # self._name = "[unknown]"
11382 return self
.reprStr
#% self._name
11384 def __getattr__(self
, *args
):
11385 #if not hasattr(self, "_name"):
11386 # self._name = "[unknown]"
11387 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
11389 def __nonzero__(self
):
11393 #----------------------------------------------------------------------------
11395 def CallAfter(callable, *args
, **kw
):
11397 Call the specified function after the current and pending event
11398 handlers have been completed. This is also good for making GUI
11399 method calls from non-GUI threads. Any extra positional or
11400 keyword args are passed on to the callable when it is called.
11402 :see: `wx.FutureCall`
11405 assert app
is not None, 'No wx.App created yet'
11407 if not hasattr(app
, "_CallAfterId"):
11408 app
._CallAfterId
= wx
.NewEventType()
11409 app
.Connect(-1, -1, app
._CallAfterId
,
11410 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
11412 evt
.SetEventType(app
._CallAfterId
)
11413 evt
.callable = callable
11416 wx
.PostEvent(app
, evt
)
11418 #----------------------------------------------------------------------------
11423 A convenience class for `wx.Timer`, that calls the given callable
11424 object once after the given amount of milliseconds, passing any
11425 positional or keyword args. The return value of the callable is
11426 availbale after it has been run with the `GetResult` method.
11428 If you don't need to get the return value or restart the timer
11429 then there is no need to hold a reference to this object. It will
11430 hold a reference to itself while the timer is running (the timer
11431 has a reference to self.Notify) but the cycle will be broken when
11432 the timer completes, automatically cleaning up the wx.FutureCall
11435 :see: `wx.CallAfter`
11437 def __init__(self
, millis
, callable, *args
, **kwargs
):
11438 self
.millis
= millis
11439 self
.callable = callable
11440 self
.SetArgs(*args
, **kwargs
)
11442 self
.running
= False
11443 self
.hasRun
= False
11452 def Start(self
, millis
=None, *args
, **kwargs
):
11454 (Re)start the timer
11456 self
.hasRun
= False
11457 if millis
is not None:
11458 self
.millis
= millis
11460 self
.SetArgs(*args
, **kwargs
)
11462 self
.timer
= wx
.PyTimer(self
.Notify
)
11463 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
11464 self
.running
= True
11470 Stop and destroy the timer.
11472 if self
.timer
is not None:
11477 def GetInterval(self
):
11478 if self
.timer
is not None:
11479 return self
.timer
.GetInterval()
11484 def IsRunning(self
):
11485 return self
.timer
is not None and self
.timer
.IsRunning()
11488 def SetArgs(self
, *args
, **kwargs
):
11490 (Re)set the args passed to the callable object. This is
11491 useful in conjunction with Restart if you want to schedule a
11492 new call to the same callable object but with different
11496 self
.kwargs
= kwargs
11502 def GetResult(self
):
11507 The timer has expired so call the callable.
11509 if self
.callable and getattr(self
.callable, 'im_self', True):
11511 self
.running
= False
11512 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
11514 if not self
.running
:
11515 # if it wasn't restarted, then cleanup
11516 wx
.CallAfter(self
.Stop
)
11520 #----------------------------------------------------------------------------
11521 # Control which items in this module should be documented by epydoc.
11522 # We allow only classes and functions, which will help reduce the size
11523 # of the docs by filtering out the zillions of constants, EVT objects,
11524 # and etc that don't make much sense by themselves, but are instead
11525 # documented (or will be) as part of the classes/functions/methods
11526 # where they should be used.
11530 A filter for epydoc that only allows non-Ptr classes and
11531 fucntions, in order to reduce the clutter in the API docs.
11533 def __init__(self
, globals):
11534 self
._globals
= globals
11536 def __call__(self
, name
):
11538 obj
= self
._globals
.get(name
, None)
11539 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
11541 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
11545 #----------------------------------------------------------------------------
11546 #----------------------------------------------------------------------------
11548 # Import other modules in this package that should show up in the
11549 # "core" wx namespace
11551 from _windows
import *
11552 from _controls
import *
11553 from _misc
import *
11556 # Fixup the stock objects since they can't be used yet. (They will be
11557 # restored in wx.PyApp.OnInit.)
11558 _core_
._wxPyFixStockObjects
()
11560 #----------------------------------------------------------------------------
11561 #----------------------------------------------------------------------------