1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
6 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
8 if isinstance(value
, class_type
):
9 self
.__dict
__[name
] = value
.this
10 if hasattr(value
,"thisown"): self
.__dict
__["thisown"] = value
.thisown
13 method
= class_type
.__swig
_setmethods
__.get(name
,None)
14 if method
: return method(self
,value
)
15 if (not static
) or hasattr(self
,name
) or (name
== "thisown"):
16 self
.__dict
__[name
] = value
18 raise AttributeError("You cannot add attributes to %s" % self
)
20 def _swig_setattr(self
,class_type
,name
,value
):
21 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
23 def _swig_getattr(self
,class_type
,name
):
24 method
= class_type
.__swig
_getmethods
__.get(name
,None)
25 if method
: return method(self
)
26 raise AttributeError,name
30 _object
= types
.ObjectType
32 except AttributeError:
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self
,name
,value
):
40 if hasattr(self
,name
) or (name
in ("this", "thisown")):
43 raise AttributeError("You cannot add attributes to %s" % self
)
47 #// Give a reference to the dictionary of this module to the C++ extension
49 _core_
._wxPySetDictionary
(vars())
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
54 wx
= _sys
.modules
[__name__
]
57 #----------------------------------------------------------------------------
59 def _deprecated(callable, msg
=None):
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
65 msg
= "%s is deprecated" % callable
66 def deprecatedWrapper(*args
, **kwargs
):
68 warnings
.warn(msg
, DeprecationWarning, stacklevel
=2)
69 return callable(*args
, **kwargs
)
70 deprecatedWrapper
.__doc
__ = msg
71 return deprecatedWrapper
74 #----------------------------------------------------------------------------
76 NOT_FOUND
= _core_
.NOT_FOUND
77 VSCROLL
= _core_
.VSCROLL
78 HSCROLL
= _core_
.HSCROLL
79 CAPTION
= _core_
.CAPTION
80 DOUBLE_BORDER
= _core_
.DOUBLE_BORDER
81 SUNKEN_BORDER
= _core_
.SUNKEN_BORDER
82 RAISED_BORDER
= _core_
.RAISED_BORDER
83 BORDER
= _core_
.BORDER
84 SIMPLE_BORDER
= _core_
.SIMPLE_BORDER
85 STATIC_BORDER
= _core_
.STATIC_BORDER
86 TRANSPARENT_WINDOW
= _core_
.TRANSPARENT_WINDOW
87 NO_BORDER
= _core_
.NO_BORDER
88 TAB_TRAVERSAL
= _core_
.TAB_TRAVERSAL
89 WANTS_CHARS
= _core_
.WANTS_CHARS
90 POPUP_WINDOW
= _core_
.POPUP_WINDOW
91 CENTER_FRAME
= _core_
.CENTER_FRAME
92 CENTRE_ON_SCREEN
= _core_
.CENTRE_ON_SCREEN
93 CENTER_ON_SCREEN
= _core_
.CENTER_ON_SCREEN
94 ED_CLIENT_MARGIN
= _core_
.ED_CLIENT_MARGIN
95 ED_BUTTONS_BOTTOM
= _core_
.ED_BUTTONS_BOTTOM
96 ED_BUTTONS_RIGHT
= _core_
.ED_BUTTONS_RIGHT
97 ED_STATIC_LINE
= _core_
.ED_STATIC_LINE
98 EXT_DIALOG_STYLE
= _core_
.EXT_DIALOG_STYLE
99 CLIP_CHILDREN
= _core_
.CLIP_CHILDREN
100 CLIP_SIBLINGS
= _core_
.CLIP_SIBLINGS
101 ALWAYS_SHOW_SB
= _core_
.ALWAYS_SHOW_SB
102 RETAINED
= _core_
.RETAINED
103 BACKINGSTORE
= _core_
.BACKINGSTORE
104 COLOURED
= _core_
.COLOURED
105 FIXED_LENGTH
= _core_
.FIXED_LENGTH
106 LB_NEEDED_SB
= _core_
.LB_NEEDED_SB
107 LB_ALWAYS_SB
= _core_
.LB_ALWAYS_SB
108 LB_SORT
= _core_
.LB_SORT
109 LB_SINGLE
= _core_
.LB_SINGLE
110 LB_MULTIPLE
= _core_
.LB_MULTIPLE
111 LB_EXTENDED
= _core_
.LB_EXTENDED
112 LB_OWNERDRAW
= _core_
.LB_OWNERDRAW
113 LB_HSCROLL
= _core_
.LB_HSCROLL
114 PROCESS_ENTER
= _core_
.PROCESS_ENTER
115 PASSWORD
= _core_
.PASSWORD
116 CB_SIMPLE
= _core_
.CB_SIMPLE
117 CB_DROPDOWN
= _core_
.CB_DROPDOWN
118 CB_SORT
= _core_
.CB_SORT
119 CB_READONLY
= _core_
.CB_READONLY
120 RA_HORIZONTAL
= _core_
.RA_HORIZONTAL
121 RA_VERTICAL
= _core_
.RA_VERTICAL
122 RA_SPECIFY_ROWS
= _core_
.RA_SPECIFY_ROWS
123 RA_SPECIFY_COLS
= _core_
.RA_SPECIFY_COLS
124 RB_GROUP
= _core_
.RB_GROUP
125 RB_SINGLE
= _core_
.RB_SINGLE
126 SB_HORIZONTAL
= _core_
.SB_HORIZONTAL
127 SB_VERTICAL
= _core_
.SB_VERTICAL
128 ST_SIZEGRIP
= _core_
.ST_SIZEGRIP
129 ST_NO_AUTORESIZE
= _core_
.ST_NO_AUTORESIZE
130 FLOOD_SURFACE
= _core_
.FLOOD_SURFACE
131 FLOOD_BORDER
= _core_
.FLOOD_BORDER
132 ODDEVEN_RULE
= _core_
.ODDEVEN_RULE
133 WINDING_RULE
= _core_
.WINDING_RULE
134 TOOL_TOP
= _core_
.TOOL_TOP
135 TOOL_BOTTOM
= _core_
.TOOL_BOTTOM
136 TOOL_LEFT
= _core_
.TOOL_LEFT
137 TOOL_RIGHT
= _core_
.TOOL_RIGHT
139 YES_NO
= _core_
.YES_NO
140 CANCEL
= _core_
.CANCEL
143 NO_DEFAULT
= _core_
.NO_DEFAULT
144 YES_DEFAULT
= _core_
.YES_DEFAULT
145 ICON_EXCLAMATION
= _core_
.ICON_EXCLAMATION
146 ICON_HAND
= _core_
.ICON_HAND
147 ICON_QUESTION
= _core_
.ICON_QUESTION
148 ICON_INFORMATION
= _core_
.ICON_INFORMATION
149 ICON_STOP
= _core_
.ICON_STOP
150 ICON_ASTERISK
= _core_
.ICON_ASTERISK
151 ICON_MASK
= _core_
.ICON_MASK
152 ICON_WARNING
= _core_
.ICON_WARNING
153 ICON_ERROR
= _core_
.ICON_ERROR
154 FORWARD
= _core_
.FORWARD
155 BACKWARD
= _core_
.BACKWARD
160 SIZE_AUTO_WIDTH
= _core_
.SIZE_AUTO_WIDTH
161 SIZE_AUTO_HEIGHT
= _core_
.SIZE_AUTO_HEIGHT
162 SIZE_AUTO
= _core_
.SIZE_AUTO
163 SIZE_USE_EXISTING
= _core_
.SIZE_USE_EXISTING
164 SIZE_ALLOW_MINUS_ONE
= _core_
.SIZE_ALLOW_MINUS_ONE
165 PORTRAIT
= _core_
.PORTRAIT
166 LANDSCAPE
= _core_
.LANDSCAPE
167 PRINT_QUALITY_HIGH
= _core_
.PRINT_QUALITY_HIGH
168 PRINT_QUALITY_MEDIUM
= _core_
.PRINT_QUALITY_MEDIUM
169 PRINT_QUALITY_LOW
= _core_
.PRINT_QUALITY_LOW
170 PRINT_QUALITY_DRAFT
= _core_
.PRINT_QUALITY_DRAFT
171 ID_ANY
= _core_
.ID_ANY
172 ID_SEPARATOR
= _core_
.ID_SEPARATOR
173 ID_LOWEST
= _core_
.ID_LOWEST
174 ID_OPEN
= _core_
.ID_OPEN
175 ID_CLOSE
= _core_
.ID_CLOSE
176 ID_NEW
= _core_
.ID_NEW
177 ID_SAVE
= _core_
.ID_SAVE
178 ID_SAVEAS
= _core_
.ID_SAVEAS
179 ID_REVERT
= _core_
.ID_REVERT
180 ID_EXIT
= _core_
.ID_EXIT
181 ID_UNDO
= _core_
.ID_UNDO
182 ID_REDO
= _core_
.ID_REDO
183 ID_HELP
= _core_
.ID_HELP
184 ID_PRINT
= _core_
.ID_PRINT
185 ID_PRINT_SETUP
= _core_
.ID_PRINT_SETUP
186 ID_PREVIEW
= _core_
.ID_PREVIEW
187 ID_ABOUT
= _core_
.ID_ABOUT
188 ID_HELP_CONTENTS
= _core_
.ID_HELP_CONTENTS
189 ID_HELP_COMMANDS
= _core_
.ID_HELP_COMMANDS
190 ID_HELP_PROCEDURES
= _core_
.ID_HELP_PROCEDURES
191 ID_HELP_CONTEXT
= _core_
.ID_HELP_CONTEXT
192 ID_CLOSE_ALL
= _core_
.ID_CLOSE_ALL
193 ID_PREFERENCES
= _core_
.ID_PREFERENCES
194 ID_CUT
= _core_
.ID_CUT
195 ID_COPY
= _core_
.ID_COPY
196 ID_PASTE
= _core_
.ID_PASTE
197 ID_CLEAR
= _core_
.ID_CLEAR
198 ID_FIND
= _core_
.ID_FIND
199 ID_DUPLICATE
= _core_
.ID_DUPLICATE
200 ID_SELECTALL
= _core_
.ID_SELECTALL
201 ID_DELETE
= _core_
.ID_DELETE
202 ID_REPLACE
= _core_
.ID_REPLACE
203 ID_REPLACE_ALL
= _core_
.ID_REPLACE_ALL
204 ID_PROPERTIES
= _core_
.ID_PROPERTIES
205 ID_VIEW_DETAILS
= _core_
.ID_VIEW_DETAILS
206 ID_VIEW_LARGEICONS
= _core_
.ID_VIEW_LARGEICONS
207 ID_VIEW_SMALLICONS
= _core_
.ID_VIEW_SMALLICONS
208 ID_VIEW_LIST
= _core_
.ID_VIEW_LIST
209 ID_VIEW_SORTDATE
= _core_
.ID_VIEW_SORTDATE
210 ID_VIEW_SORTNAME
= _core_
.ID_VIEW_SORTNAME
211 ID_VIEW_SORTSIZE
= _core_
.ID_VIEW_SORTSIZE
212 ID_VIEW_SORTTYPE
= _core_
.ID_VIEW_SORTTYPE
213 ID_FILE1
= _core_
.ID_FILE1
214 ID_FILE2
= _core_
.ID_FILE2
215 ID_FILE3
= _core_
.ID_FILE3
216 ID_FILE4
= _core_
.ID_FILE4
217 ID_FILE5
= _core_
.ID_FILE5
218 ID_FILE6
= _core_
.ID_FILE6
219 ID_FILE7
= _core_
.ID_FILE7
220 ID_FILE8
= _core_
.ID_FILE8
221 ID_FILE9
= _core_
.ID_FILE9
223 ID_CANCEL
= _core_
.ID_CANCEL
224 ID_APPLY
= _core_
.ID_APPLY
225 ID_YES
= _core_
.ID_YES
227 ID_STATIC
= _core_
.ID_STATIC
228 ID_FORWARD
= _core_
.ID_FORWARD
229 ID_BACKWARD
= _core_
.ID_BACKWARD
230 ID_DEFAULT
= _core_
.ID_DEFAULT
231 ID_MORE
= _core_
.ID_MORE
232 ID_SETUP
= _core_
.ID_SETUP
233 ID_RESET
= _core_
.ID_RESET
234 ID_CONTEXT_HELP
= _core_
.ID_CONTEXT_HELP
235 ID_YESTOALL
= _core_
.ID_YESTOALL
236 ID_NOTOALL
= _core_
.ID_NOTOALL
237 ID_ABORT
= _core_
.ID_ABORT
238 ID_RETRY
= _core_
.ID_RETRY
239 ID_IGNORE
= _core_
.ID_IGNORE
240 ID_ADD
= _core_
.ID_ADD
241 ID_REMOVE
= _core_
.ID_REMOVE
243 ID_DOWN
= _core_
.ID_DOWN
244 ID_HOME
= _core_
.ID_HOME
245 ID_REFRESH
= _core_
.ID_REFRESH
246 ID_STOP
= _core_
.ID_STOP
247 ID_INDEX
= _core_
.ID_INDEX
248 ID_BOLD
= _core_
.ID_BOLD
249 ID_ITALIC
= _core_
.ID_ITALIC
250 ID_JUSTIFY_CENTER
= _core_
.ID_JUSTIFY_CENTER
251 ID_JUSTIFY_FILL
= _core_
.ID_JUSTIFY_FILL
252 ID_JUSTIFY_RIGHT
= _core_
.ID_JUSTIFY_RIGHT
253 ID_JUSTIFY_LEFT
= _core_
.ID_JUSTIFY_LEFT
254 ID_UNDERLINE
= _core_
.ID_UNDERLINE
255 ID_INDENT
= _core_
.ID_INDENT
256 ID_UNINDENT
= _core_
.ID_UNINDENT
257 ID_ZOOM_100
= _core_
.ID_ZOOM_100
258 ID_ZOOM_FIT
= _core_
.ID_ZOOM_FIT
259 ID_ZOOM_IN
= _core_
.ID_ZOOM_IN
260 ID_ZOOM_OUT
= _core_
.ID_ZOOM_OUT
261 ID_UNDELETE
= _core_
.ID_UNDELETE
262 ID_REVERT_TO_SAVED
= _core_
.ID_REVERT_TO_SAVED
263 ID_HIGHEST
= _core_
.ID_HIGHEST
266 HIDE_READONLY
= _core_
.HIDE_READONLY
267 OVERWRITE_PROMPT
= _core_
.OVERWRITE_PROMPT
268 FILE_MUST_EXIST
= _core_
.FILE_MUST_EXIST
269 MULTIPLE
= _core_
.MULTIPLE
270 CHANGE_DIR
= _core_
.CHANGE_DIR
271 ACCEL_ALT
= _core_
.ACCEL_ALT
272 ACCEL_CTRL
= _core_
.ACCEL_CTRL
273 ACCEL_SHIFT
= _core_
.ACCEL_SHIFT
274 ACCEL_NORMAL
= _core_
.ACCEL_NORMAL
275 PD_AUTO_HIDE
= _core_
.PD_AUTO_HIDE
276 PD_APP_MODAL
= _core_
.PD_APP_MODAL
277 PD_CAN_ABORT
= _core_
.PD_CAN_ABORT
278 PD_ELAPSED_TIME
= _core_
.PD_ELAPSED_TIME
279 PD_ESTIMATED_TIME
= _core_
.PD_ESTIMATED_TIME
280 PD_REMAINING_TIME
= _core_
.PD_REMAINING_TIME
281 PD_SMOOTH
= _core_
.PD_SMOOTH
282 PD_CAN_SKIP
= _core_
.PD_CAN_SKIP
283 DD_NEW_DIR_BUTTON
= _core_
.DD_NEW_DIR_BUTTON
284 DD_DEFAULT_STYLE
= _core_
.DD_DEFAULT_STYLE
285 MENU_TEAROFF
= _core_
.MENU_TEAROFF
286 MB_DOCKABLE
= _core_
.MB_DOCKABLE
287 NO_FULL_REPAINT_ON_RESIZE
= _core_
.NO_FULL_REPAINT_ON_RESIZE
288 FULL_REPAINT_ON_RESIZE
= _core_
.FULL_REPAINT_ON_RESIZE
289 LI_HORIZONTAL
= _core_
.LI_HORIZONTAL
290 LI_VERTICAL
= _core_
.LI_VERTICAL
291 WS_EX_VALIDATE_RECURSIVELY
= _core_
.WS_EX_VALIDATE_RECURSIVELY
292 WS_EX_BLOCK_EVENTS
= _core_
.WS_EX_BLOCK_EVENTS
293 WS_EX_TRANSIENT
= _core_
.WS_EX_TRANSIENT
294 WS_EX_THEMED_BACKGROUND
= _core_
.WS_EX_THEMED_BACKGROUND
295 WS_EX_PROCESS_IDLE
= _core_
.WS_EX_PROCESS_IDLE
296 WS_EX_PROCESS_UI_UPDATES
= _core_
.WS_EX_PROCESS_UI_UPDATES
297 MM_TEXT
= _core_
.MM_TEXT
298 MM_LOMETRIC
= _core_
.MM_LOMETRIC
299 MM_HIMETRIC
= _core_
.MM_HIMETRIC
300 MM_LOENGLISH
= _core_
.MM_LOENGLISH
301 MM_HIENGLISH
= _core_
.MM_HIENGLISH
302 MM_TWIPS
= _core_
.MM_TWIPS
303 MM_ISOTROPIC
= _core_
.MM_ISOTROPIC
304 MM_ANISOTROPIC
= _core_
.MM_ANISOTROPIC
305 MM_POINTS
= _core_
.MM_POINTS
306 MM_METRIC
= _core_
.MM_METRIC
307 CENTRE
= _core_
.CENTRE
308 CENTER
= _core_
.CENTER
309 HORIZONTAL
= _core_
.HORIZONTAL
310 VERTICAL
= _core_
.VERTICAL
317 BOTTOM
= _core_
.BOTTOM
323 ALIGN_NOT
= _core_
.ALIGN_NOT
324 ALIGN_CENTER_HORIZONTAL
= _core_
.ALIGN_CENTER_HORIZONTAL
325 ALIGN_CENTRE_HORIZONTAL
= _core_
.ALIGN_CENTRE_HORIZONTAL
326 ALIGN_LEFT
= _core_
.ALIGN_LEFT
327 ALIGN_TOP
= _core_
.ALIGN_TOP
328 ALIGN_RIGHT
= _core_
.ALIGN_RIGHT
329 ALIGN_BOTTOM
= _core_
.ALIGN_BOTTOM
330 ALIGN_CENTER_VERTICAL
= _core_
.ALIGN_CENTER_VERTICAL
331 ALIGN_CENTRE_VERTICAL
= _core_
.ALIGN_CENTRE_VERTICAL
332 ALIGN_CENTER
= _core_
.ALIGN_CENTER
333 ALIGN_CENTRE
= _core_
.ALIGN_CENTRE
334 ALIGN_MASK
= _core_
.ALIGN_MASK
335 STRETCH_NOT
= _core_
.STRETCH_NOT
336 SHRINK
= _core_
.SHRINK
338 EXPAND
= _core_
.EXPAND
339 SHAPED
= _core_
.SHAPED
340 FIXED_MINSIZE
= _core_
.FIXED_MINSIZE
342 ADJUST_MINSIZE
= _core_
.ADJUST_MINSIZE
343 BORDER_DEFAULT
= _core_
.BORDER_DEFAULT
344 BORDER_NONE
= _core_
.BORDER_NONE
345 BORDER_STATIC
= _core_
.BORDER_STATIC
346 BORDER_SIMPLE
= _core_
.BORDER_SIMPLE
347 BORDER_RAISED
= _core_
.BORDER_RAISED
348 BORDER_SUNKEN
= _core_
.BORDER_SUNKEN
349 BORDER_DOUBLE
= _core_
.BORDER_DOUBLE
350 BORDER_MASK
= _core_
.BORDER_MASK
351 BG_STYLE_SYSTEM
= _core_
.BG_STYLE_SYSTEM
352 BG_STYLE_COLOUR
= _core_
.BG_STYLE_COLOUR
353 BG_STYLE_CUSTOM
= _core_
.BG_STYLE_CUSTOM
354 DEFAULT
= _core_
.DEFAULT
355 DECORATIVE
= _core_
.DECORATIVE
357 SCRIPT
= _core_
.SCRIPT
359 MODERN
= _core_
.MODERN
360 TELETYPE
= _core_
.TELETYPE
361 VARIABLE
= _core_
.VARIABLE
363 NORMAL
= _core_
.NORMAL
366 ITALIC
= _core_
.ITALIC
370 LONG_DASH
= _core_
.LONG_DASH
371 SHORT_DASH
= _core_
.SHORT_DASH
372 DOT_DASH
= _core_
.DOT_DASH
373 USER_DASH
= _core_
.USER_DASH
374 TRANSPARENT
= _core_
.TRANSPARENT
375 STIPPLE
= _core_
.STIPPLE
376 BDIAGONAL_HATCH
= _core_
.BDIAGONAL_HATCH
377 CROSSDIAG_HATCH
= _core_
.CROSSDIAG_HATCH
378 FDIAGONAL_HATCH
= _core_
.FDIAGONAL_HATCH
379 CROSS_HATCH
= _core_
.CROSS_HATCH
380 HORIZONTAL_HATCH
= _core_
.HORIZONTAL_HATCH
381 VERTICAL_HATCH
= _core_
.VERTICAL_HATCH
382 JOIN_BEVEL
= _core_
.JOIN_BEVEL
383 JOIN_MITER
= _core_
.JOIN_MITER
384 JOIN_ROUND
= _core_
.JOIN_ROUND
385 CAP_ROUND
= _core_
.CAP_ROUND
386 CAP_PROJECTING
= _core_
.CAP_PROJECTING
387 CAP_BUTT
= _core_
.CAP_BUTT
390 INVERT
= _core_
.INVERT
391 OR_REVERSE
= _core_
.OR_REVERSE
392 AND_REVERSE
= _core_
.AND_REVERSE
395 AND_INVERT
= _core_
.AND_INVERT
399 SRC_INVERT
= _core_
.SRC_INVERT
400 OR_INVERT
= _core_
.OR_INVERT
404 WXK_BACK
= _core_
.WXK_BACK
405 WXK_TAB
= _core_
.WXK_TAB
406 WXK_RETURN
= _core_
.WXK_RETURN
407 WXK_ESCAPE
= _core_
.WXK_ESCAPE
408 WXK_SPACE
= _core_
.WXK_SPACE
409 WXK_DELETE
= _core_
.WXK_DELETE
410 WXK_START
= _core_
.WXK_START
411 WXK_LBUTTON
= _core_
.WXK_LBUTTON
412 WXK_RBUTTON
= _core_
.WXK_RBUTTON
413 WXK_CANCEL
= _core_
.WXK_CANCEL
414 WXK_MBUTTON
= _core_
.WXK_MBUTTON
415 WXK_CLEAR
= _core_
.WXK_CLEAR
416 WXK_SHIFT
= _core_
.WXK_SHIFT
417 WXK_ALT
= _core_
.WXK_ALT
418 WXK_CONTROL
= _core_
.WXK_CONTROL
419 WXK_MENU
= _core_
.WXK_MENU
420 WXK_PAUSE
= _core_
.WXK_PAUSE
421 WXK_CAPITAL
= _core_
.WXK_CAPITAL
422 WXK_PRIOR
= _core_
.WXK_PRIOR
423 WXK_NEXT
= _core_
.WXK_NEXT
424 WXK_END
= _core_
.WXK_END
425 WXK_HOME
= _core_
.WXK_HOME
426 WXK_LEFT
= _core_
.WXK_LEFT
427 WXK_UP
= _core_
.WXK_UP
428 WXK_RIGHT
= _core_
.WXK_RIGHT
429 WXK_DOWN
= _core_
.WXK_DOWN
430 WXK_SELECT
= _core_
.WXK_SELECT
431 WXK_PRINT
= _core_
.WXK_PRINT
432 WXK_EXECUTE
= _core_
.WXK_EXECUTE
433 WXK_SNAPSHOT
= _core_
.WXK_SNAPSHOT
434 WXK_INSERT
= _core_
.WXK_INSERT
435 WXK_HELP
= _core_
.WXK_HELP
436 WXK_NUMPAD0
= _core_
.WXK_NUMPAD0
437 WXK_NUMPAD1
= _core_
.WXK_NUMPAD1
438 WXK_NUMPAD2
= _core_
.WXK_NUMPAD2
439 WXK_NUMPAD3
= _core_
.WXK_NUMPAD3
440 WXK_NUMPAD4
= _core_
.WXK_NUMPAD4
441 WXK_NUMPAD5
= _core_
.WXK_NUMPAD5
442 WXK_NUMPAD6
= _core_
.WXK_NUMPAD6
443 WXK_NUMPAD7
= _core_
.WXK_NUMPAD7
444 WXK_NUMPAD8
= _core_
.WXK_NUMPAD8
445 WXK_NUMPAD9
= _core_
.WXK_NUMPAD9
446 WXK_MULTIPLY
= _core_
.WXK_MULTIPLY
447 WXK_ADD
= _core_
.WXK_ADD
448 WXK_SEPARATOR
= _core_
.WXK_SEPARATOR
449 WXK_SUBTRACT
= _core_
.WXK_SUBTRACT
450 WXK_DECIMAL
= _core_
.WXK_DECIMAL
451 WXK_DIVIDE
= _core_
.WXK_DIVIDE
452 WXK_F1
= _core_
.WXK_F1
453 WXK_F2
= _core_
.WXK_F2
454 WXK_F3
= _core_
.WXK_F3
455 WXK_F4
= _core_
.WXK_F4
456 WXK_F5
= _core_
.WXK_F5
457 WXK_F6
= _core_
.WXK_F6
458 WXK_F7
= _core_
.WXK_F7
459 WXK_F8
= _core_
.WXK_F8
460 WXK_F9
= _core_
.WXK_F9
461 WXK_F10
= _core_
.WXK_F10
462 WXK_F11
= _core_
.WXK_F11
463 WXK_F12
= _core_
.WXK_F12
464 WXK_F13
= _core_
.WXK_F13
465 WXK_F14
= _core_
.WXK_F14
466 WXK_F15
= _core_
.WXK_F15
467 WXK_F16
= _core_
.WXK_F16
468 WXK_F17
= _core_
.WXK_F17
469 WXK_F18
= _core_
.WXK_F18
470 WXK_F19
= _core_
.WXK_F19
471 WXK_F20
= _core_
.WXK_F20
472 WXK_F21
= _core_
.WXK_F21
473 WXK_F22
= _core_
.WXK_F22
474 WXK_F23
= _core_
.WXK_F23
475 WXK_F24
= _core_
.WXK_F24
476 WXK_NUMLOCK
= _core_
.WXK_NUMLOCK
477 WXK_SCROLL
= _core_
.WXK_SCROLL
478 WXK_PAGEUP
= _core_
.WXK_PAGEUP
479 WXK_PAGEDOWN
= _core_
.WXK_PAGEDOWN
480 WXK_NUMPAD_SPACE
= _core_
.WXK_NUMPAD_SPACE
481 WXK_NUMPAD_TAB
= _core_
.WXK_NUMPAD_TAB
482 WXK_NUMPAD_ENTER
= _core_
.WXK_NUMPAD_ENTER
483 WXK_NUMPAD_F1
= _core_
.WXK_NUMPAD_F1
484 WXK_NUMPAD_F2
= _core_
.WXK_NUMPAD_F2
485 WXK_NUMPAD_F3
= _core_
.WXK_NUMPAD_F3
486 WXK_NUMPAD_F4
= _core_
.WXK_NUMPAD_F4
487 WXK_NUMPAD_HOME
= _core_
.WXK_NUMPAD_HOME
488 WXK_NUMPAD_LEFT
= _core_
.WXK_NUMPAD_LEFT
489 WXK_NUMPAD_UP
= _core_
.WXK_NUMPAD_UP
490 WXK_NUMPAD_RIGHT
= _core_
.WXK_NUMPAD_RIGHT
491 WXK_NUMPAD_DOWN
= _core_
.WXK_NUMPAD_DOWN
492 WXK_NUMPAD_PRIOR
= _core_
.WXK_NUMPAD_PRIOR
493 WXK_NUMPAD_PAGEUP
= _core_
.WXK_NUMPAD_PAGEUP
494 WXK_NUMPAD_NEXT
= _core_
.WXK_NUMPAD_NEXT
495 WXK_NUMPAD_PAGEDOWN
= _core_
.WXK_NUMPAD_PAGEDOWN
496 WXK_NUMPAD_END
= _core_
.WXK_NUMPAD_END
497 WXK_NUMPAD_BEGIN
= _core_
.WXK_NUMPAD_BEGIN
498 WXK_NUMPAD_INSERT
= _core_
.WXK_NUMPAD_INSERT
499 WXK_NUMPAD_DELETE
= _core_
.WXK_NUMPAD_DELETE
500 WXK_NUMPAD_EQUAL
= _core_
.WXK_NUMPAD_EQUAL
501 WXK_NUMPAD_MULTIPLY
= _core_
.WXK_NUMPAD_MULTIPLY
502 WXK_NUMPAD_ADD
= _core_
.WXK_NUMPAD_ADD
503 WXK_NUMPAD_SEPARATOR
= _core_
.WXK_NUMPAD_SEPARATOR
504 WXK_NUMPAD_SUBTRACT
= _core_
.WXK_NUMPAD_SUBTRACT
505 WXK_NUMPAD_DECIMAL
= _core_
.WXK_NUMPAD_DECIMAL
506 WXK_NUMPAD_DIVIDE
= _core_
.WXK_NUMPAD_DIVIDE
507 WXK_WINDOWS_LEFT
= _core_
.WXK_WINDOWS_LEFT
508 WXK_WINDOWS_RIGHT
= _core_
.WXK_WINDOWS_RIGHT
509 WXK_WINDOWS_MENU
= _core_
.WXK_WINDOWS_MENU
510 PAPER_NONE
= _core_
.PAPER_NONE
511 PAPER_LETTER
= _core_
.PAPER_LETTER
512 PAPER_LEGAL
= _core_
.PAPER_LEGAL
513 PAPER_A4
= _core_
.PAPER_A4
514 PAPER_CSHEET
= _core_
.PAPER_CSHEET
515 PAPER_DSHEET
= _core_
.PAPER_DSHEET
516 PAPER_ESHEET
= _core_
.PAPER_ESHEET
517 PAPER_LETTERSMALL
= _core_
.PAPER_LETTERSMALL
518 PAPER_TABLOID
= _core_
.PAPER_TABLOID
519 PAPER_LEDGER
= _core_
.PAPER_LEDGER
520 PAPER_STATEMENT
= _core_
.PAPER_STATEMENT
521 PAPER_EXECUTIVE
= _core_
.PAPER_EXECUTIVE
522 PAPER_A3
= _core_
.PAPER_A3
523 PAPER_A4SMALL
= _core_
.PAPER_A4SMALL
524 PAPER_A5
= _core_
.PAPER_A5
525 PAPER_B4
= _core_
.PAPER_B4
526 PAPER_B5
= _core_
.PAPER_B5
527 PAPER_FOLIO
= _core_
.PAPER_FOLIO
528 PAPER_QUARTO
= _core_
.PAPER_QUARTO
529 PAPER_10X14
= _core_
.PAPER_10X14
530 PAPER_11X17
= _core_
.PAPER_11X17
531 PAPER_NOTE
= _core_
.PAPER_NOTE
532 PAPER_ENV_9
= _core_
.PAPER_ENV_9
533 PAPER_ENV_10
= _core_
.PAPER_ENV_10
534 PAPER_ENV_11
= _core_
.PAPER_ENV_11
535 PAPER_ENV_12
= _core_
.PAPER_ENV_12
536 PAPER_ENV_14
= _core_
.PAPER_ENV_14
537 PAPER_ENV_DL
= _core_
.PAPER_ENV_DL
538 PAPER_ENV_C5
= _core_
.PAPER_ENV_C5
539 PAPER_ENV_C3
= _core_
.PAPER_ENV_C3
540 PAPER_ENV_C4
= _core_
.PAPER_ENV_C4
541 PAPER_ENV_C6
= _core_
.PAPER_ENV_C6
542 PAPER_ENV_C65
= _core_
.PAPER_ENV_C65
543 PAPER_ENV_B4
= _core_
.PAPER_ENV_B4
544 PAPER_ENV_B5
= _core_
.PAPER_ENV_B5
545 PAPER_ENV_B6
= _core_
.PAPER_ENV_B6
546 PAPER_ENV_ITALY
= _core_
.PAPER_ENV_ITALY
547 PAPER_ENV_MONARCH
= _core_
.PAPER_ENV_MONARCH
548 PAPER_ENV_PERSONAL
= _core_
.PAPER_ENV_PERSONAL
549 PAPER_FANFOLD_US
= _core_
.PAPER_FANFOLD_US
550 PAPER_FANFOLD_STD_GERMAN
= _core_
.PAPER_FANFOLD_STD_GERMAN
551 PAPER_FANFOLD_LGL_GERMAN
= _core_
.PAPER_FANFOLD_LGL_GERMAN
552 PAPER_ISO_B4
= _core_
.PAPER_ISO_B4
553 PAPER_JAPANESE_POSTCARD
= _core_
.PAPER_JAPANESE_POSTCARD
554 PAPER_9X11
= _core_
.PAPER_9X11
555 PAPER_10X11
= _core_
.PAPER_10X11
556 PAPER_15X11
= _core_
.PAPER_15X11
557 PAPER_ENV_INVITE
= _core_
.PAPER_ENV_INVITE
558 PAPER_LETTER_EXTRA
= _core_
.PAPER_LETTER_EXTRA
559 PAPER_LEGAL_EXTRA
= _core_
.PAPER_LEGAL_EXTRA
560 PAPER_TABLOID_EXTRA
= _core_
.PAPER_TABLOID_EXTRA
561 PAPER_A4_EXTRA
= _core_
.PAPER_A4_EXTRA
562 PAPER_LETTER_TRANSVERSE
= _core_
.PAPER_LETTER_TRANSVERSE
563 PAPER_A4_TRANSVERSE
= _core_
.PAPER_A4_TRANSVERSE
564 PAPER_LETTER_EXTRA_TRANSVERSE
= _core_
.PAPER_LETTER_EXTRA_TRANSVERSE
565 PAPER_A_PLUS
= _core_
.PAPER_A_PLUS
566 PAPER_B_PLUS
= _core_
.PAPER_B_PLUS
567 PAPER_LETTER_PLUS
= _core_
.PAPER_LETTER_PLUS
568 PAPER_A4_PLUS
= _core_
.PAPER_A4_PLUS
569 PAPER_A5_TRANSVERSE
= _core_
.PAPER_A5_TRANSVERSE
570 PAPER_B5_TRANSVERSE
= _core_
.PAPER_B5_TRANSVERSE
571 PAPER_A3_EXTRA
= _core_
.PAPER_A3_EXTRA
572 PAPER_A5_EXTRA
= _core_
.PAPER_A5_EXTRA
573 PAPER_B5_EXTRA
= _core_
.PAPER_B5_EXTRA
574 PAPER_A2
= _core_
.PAPER_A2
575 PAPER_A3_TRANSVERSE
= _core_
.PAPER_A3_TRANSVERSE
576 PAPER_A3_EXTRA_TRANSVERSE
= _core_
.PAPER_A3_EXTRA_TRANSVERSE
577 DUPLEX_SIMPLEX
= _core_
.DUPLEX_SIMPLEX
578 DUPLEX_HORIZONTAL
= _core_
.DUPLEX_HORIZONTAL
579 DUPLEX_VERTICAL
= _core_
.DUPLEX_VERTICAL
580 ITEM_SEPARATOR
= _core_
.ITEM_SEPARATOR
581 ITEM_NORMAL
= _core_
.ITEM_NORMAL
582 ITEM_CHECK
= _core_
.ITEM_CHECK
583 ITEM_RADIO
= _core_
.ITEM_RADIO
584 ITEM_MAX
= _core_
.ITEM_MAX
585 HT_NOWHERE
= _core_
.HT_NOWHERE
586 HT_SCROLLBAR_FIRST
= _core_
.HT_SCROLLBAR_FIRST
587 HT_SCROLLBAR_ARROW_LINE_1
= _core_
.HT_SCROLLBAR_ARROW_LINE_1
588 HT_SCROLLBAR_ARROW_LINE_2
= _core_
.HT_SCROLLBAR_ARROW_LINE_2
589 HT_SCROLLBAR_ARROW_PAGE_1
= _core_
.HT_SCROLLBAR_ARROW_PAGE_1
590 HT_SCROLLBAR_ARROW_PAGE_2
= _core_
.HT_SCROLLBAR_ARROW_PAGE_2
591 HT_SCROLLBAR_THUMB
= _core_
.HT_SCROLLBAR_THUMB
592 HT_SCROLLBAR_BAR_1
= _core_
.HT_SCROLLBAR_BAR_1
593 HT_SCROLLBAR_BAR_2
= _core_
.HT_SCROLLBAR_BAR_2
594 HT_SCROLLBAR_LAST
= _core_
.HT_SCROLLBAR_LAST
595 HT_WINDOW_OUTSIDE
= _core_
.HT_WINDOW_OUTSIDE
596 HT_WINDOW_INSIDE
= _core_
.HT_WINDOW_INSIDE
597 HT_WINDOW_VERT_SCROLLBAR
= _core_
.HT_WINDOW_VERT_SCROLLBAR
598 HT_WINDOW_HORZ_SCROLLBAR
= _core_
.HT_WINDOW_HORZ_SCROLLBAR
599 HT_WINDOW_CORNER
= _core_
.HT_WINDOW_CORNER
600 HT_MAX
= _core_
.HT_MAX
601 MOD_NONE
= _core_
.MOD_NONE
602 MOD_ALT
= _core_
.MOD_ALT
603 MOD_CONTROL
= _core_
.MOD_CONTROL
604 MOD_SHIFT
= _core_
.MOD_SHIFT
605 MOD_WIN
= _core_
.MOD_WIN
606 UPDATE_UI_NONE
= _core_
.UPDATE_UI_NONE
607 UPDATE_UI_RECURSE
= _core_
.UPDATE_UI_RECURSE
608 UPDATE_UI_FROMIDLE
= _core_
.UPDATE_UI_FROMIDLE
609 #---------------------------------------------------------------------------
611 class Object(object):
613 The base class for most wx objects, although in wxPython not
614 much functionality is needed nor exposed.
616 def __init__(self
): raise RuntimeError, "No constructor defined"
618 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
619 def GetClassName(*args
, **kwargs
):
621 GetClassName(self) -> String
623 Returns the class name of the C++ class using wxRTTI.
625 return _core_
.Object_GetClassName(*args
, **kwargs
)
627 def Destroy(*args
, **kwargs
):
631 Deletes the C++ object this Python object is a proxy for.
633 return _core_
.Object_Destroy(*args
, **kwargs
)
636 class ObjectPtr(Object
):
637 def __init__(self
, this
):
639 if not hasattr(self
,"thisown"): self
.thisown
= 0
640 self
.__class
__ = Object
641 _core_
.Object_swigregister(ObjectPtr
)
642 _wxPySetDictionary
= _core_
._wxPySetDictionary
644 _wxPyFixStockObjects
= _core_
._wxPyFixStockObjects
647 EmptyString
= cvar
.EmptyString
649 #---------------------------------------------------------------------------
651 BITMAP_TYPE_INVALID
= _core_
.BITMAP_TYPE_INVALID
652 BITMAP_TYPE_BMP
= _core_
.BITMAP_TYPE_BMP
653 BITMAP_TYPE_ICO
= _core_
.BITMAP_TYPE_ICO
654 BITMAP_TYPE_CUR
= _core_
.BITMAP_TYPE_CUR
655 BITMAP_TYPE_XBM
= _core_
.BITMAP_TYPE_XBM
656 BITMAP_TYPE_XBM_DATA
= _core_
.BITMAP_TYPE_XBM_DATA
657 BITMAP_TYPE_XPM
= _core_
.BITMAP_TYPE_XPM
658 BITMAP_TYPE_XPM_DATA
= _core_
.BITMAP_TYPE_XPM_DATA
659 BITMAP_TYPE_TIF
= _core_
.BITMAP_TYPE_TIF
660 BITMAP_TYPE_GIF
= _core_
.BITMAP_TYPE_GIF
661 BITMAP_TYPE_PNG
= _core_
.BITMAP_TYPE_PNG
662 BITMAP_TYPE_JPEG
= _core_
.BITMAP_TYPE_JPEG
663 BITMAP_TYPE_PNM
= _core_
.BITMAP_TYPE_PNM
664 BITMAP_TYPE_PCX
= _core_
.BITMAP_TYPE_PCX
665 BITMAP_TYPE_PICT
= _core_
.BITMAP_TYPE_PICT
666 BITMAP_TYPE_ICON
= _core_
.BITMAP_TYPE_ICON
667 BITMAP_TYPE_ANI
= _core_
.BITMAP_TYPE_ANI
668 BITMAP_TYPE_IFF
= _core_
.BITMAP_TYPE_IFF
669 BITMAP_TYPE_MACCURSOR
= _core_
.BITMAP_TYPE_MACCURSOR
670 BITMAP_TYPE_ANY
= _core_
.BITMAP_TYPE_ANY
671 CURSOR_NONE
= _core_
.CURSOR_NONE
672 CURSOR_ARROW
= _core_
.CURSOR_ARROW
673 CURSOR_RIGHT_ARROW
= _core_
.CURSOR_RIGHT_ARROW
674 CURSOR_BULLSEYE
= _core_
.CURSOR_BULLSEYE
675 CURSOR_CHAR
= _core_
.CURSOR_CHAR
676 CURSOR_CROSS
= _core_
.CURSOR_CROSS
677 CURSOR_HAND
= _core_
.CURSOR_HAND
678 CURSOR_IBEAM
= _core_
.CURSOR_IBEAM
679 CURSOR_LEFT_BUTTON
= _core_
.CURSOR_LEFT_BUTTON
680 CURSOR_MAGNIFIER
= _core_
.CURSOR_MAGNIFIER
681 CURSOR_MIDDLE_BUTTON
= _core_
.CURSOR_MIDDLE_BUTTON
682 CURSOR_NO_ENTRY
= _core_
.CURSOR_NO_ENTRY
683 CURSOR_PAINT_BRUSH
= _core_
.CURSOR_PAINT_BRUSH
684 CURSOR_PENCIL
= _core_
.CURSOR_PENCIL
685 CURSOR_POINT_LEFT
= _core_
.CURSOR_POINT_LEFT
686 CURSOR_POINT_RIGHT
= _core_
.CURSOR_POINT_RIGHT
687 CURSOR_QUESTION_ARROW
= _core_
.CURSOR_QUESTION_ARROW
688 CURSOR_RIGHT_BUTTON
= _core_
.CURSOR_RIGHT_BUTTON
689 CURSOR_SIZENESW
= _core_
.CURSOR_SIZENESW
690 CURSOR_SIZENS
= _core_
.CURSOR_SIZENS
691 CURSOR_SIZENWSE
= _core_
.CURSOR_SIZENWSE
692 CURSOR_SIZEWE
= _core_
.CURSOR_SIZEWE
693 CURSOR_SIZING
= _core_
.CURSOR_SIZING
694 CURSOR_SPRAYCAN
= _core_
.CURSOR_SPRAYCAN
695 CURSOR_WAIT
= _core_
.CURSOR_WAIT
696 CURSOR_WATCH
= _core_
.CURSOR_WATCH
697 CURSOR_BLANK
= _core_
.CURSOR_BLANK
698 CURSOR_DEFAULT
= _core_
.CURSOR_DEFAULT
699 CURSOR_COPY_ARROW
= _core_
.CURSOR_COPY_ARROW
700 CURSOR_ARROWWAIT
= _core_
.CURSOR_ARROWWAIT
701 CURSOR_MAX
= _core_
.CURSOR_MAX
702 #---------------------------------------------------------------------------
706 wx.Size is a useful data structure used to represent the size of
707 something. It simply contians integer width and height
708 proprtites. In most places in wxPython where a wx.Size is
709 expected a (width, height) tuple can be used instead.
712 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
713 width
= property(_core_
.Size_width_get
, _core_
.Size_width_set
)
714 height
= property(_core_
.Size_height_get
, _core_
.Size_height_set
)
715 x
= width
; y
= height
716 def __init__(self
, *args
, **kwargs
):
718 __init__(self, int w=0, int h=0) -> Size
720 Creates a size object.
722 newobj
= _core_
.new_Size(*args
, **kwargs
)
723 self
.this
= newobj
.this
726 def __del__(self
, destroy
=_core_
.delete_Size
):
729 if self
.thisown
: destroy(self
)
732 def __eq__(*args
, **kwargs
):
734 __eq__(self, Size sz) -> bool
736 Test for equality of wx.Size objects.
738 return _core_
.Size___eq__(*args
, **kwargs
)
740 def __ne__(*args
, **kwargs
):
742 __ne__(self, Size sz) -> bool
746 return _core_
.Size___ne__(*args
, **kwargs
)
748 def __add__(*args
, **kwargs
):
750 __add__(self, Size sz) -> Size
752 Add sz's proprties to this and return the result.
754 return _core_
.Size___add__(*args
, **kwargs
)
756 def __sub__(*args
, **kwargs
):
758 __sub__(self, Size sz) -> Size
760 Subtract sz's properties from this and return the result.
762 return _core_
.Size___sub__(*args
, **kwargs
)
764 def IncTo(*args
, **kwargs
):
768 Increments this object so that both of its dimensions are not less
769 than the corresponding dimensions of the size.
771 return _core_
.Size_IncTo(*args
, **kwargs
)
773 def DecTo(*args
, **kwargs
):
777 Decrements this object so that both of its dimensions are not greater
778 than the corresponding dimensions of the size.
780 return _core_
.Size_DecTo(*args
, **kwargs
)
782 def Set(*args
, **kwargs
):
784 Set(self, int w, int h)
786 Set both width and height.
788 return _core_
.Size_Set(*args
, **kwargs
)
790 def SetWidth(*args
, **kwargs
):
791 """SetWidth(self, int w)"""
792 return _core_
.Size_SetWidth(*args
, **kwargs
)
794 def SetHeight(*args
, **kwargs
):
795 """SetHeight(self, int h)"""
796 return _core_
.Size_SetHeight(*args
, **kwargs
)
798 def GetWidth(*args
, **kwargs
):
799 """GetWidth(self) -> int"""
800 return _core_
.Size_GetWidth(*args
, **kwargs
)
802 def GetHeight(*args
, **kwargs
):
803 """GetHeight(self) -> int"""
804 return _core_
.Size_GetHeight(*args
, **kwargs
)
806 def IsFullySpecified(*args
, **kwargs
):
808 IsFullySpecified(self) -> bool
810 Returns True if both components of the size are non-default values.
812 return _core_
.Size_IsFullySpecified(*args
, **kwargs
)
814 def SetDefaults(*args
, **kwargs
):
816 SetDefaults(self, Size size)
818 Combine this size with the other one replacing the default components
819 of this object (i.e. equal to -1) with those of the other.
821 return _core_
.Size_SetDefaults(*args
, **kwargs
)
823 def Get(*args
, **kwargs
):
825 Get() -> (width,height)
827 Returns the width and height properties as a tuple.
829 return _core_
.Size_Get(*args
, **kwargs
)
831 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
832 def __str__(self
): return str(self
.Get())
833 def __repr__(self
): return 'wx.Size'+str(self
.Get())
834 def __len__(self
): return len(self
.Get())
835 def __getitem__(self
, index
): return self
.Get()[index
]
836 def __setitem__(self
, index
, val
):
837 if index
== 0: self
.width
= val
838 elif index
== 1: self
.height
= val
839 else: raise IndexError
840 def __nonzero__(self
): return self
.Get() != (0,0)
841 __safe_for_unpickling__
= True
842 def __reduce__(self
): return (wx
.Size
, self
.Get())
846 def __init__(self
, this
):
848 if not hasattr(self
,"thisown"): self
.thisown
= 0
849 self
.__class
__ = Size
850 _core_
.Size_swigregister(SizePtr
)
852 #---------------------------------------------------------------------------
854 class RealPoint(object):
856 A data structure for representing a point or position with floating
857 point x and y properties. In wxPython most places that expect a
858 wx.RealPoint can also accept a (x,y) tuple.
861 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
862 x
= property(_core_
.RealPoint_x_get
, _core_
.RealPoint_x_set
)
863 y
= property(_core_
.RealPoint_y_get
, _core_
.RealPoint_y_set
)
864 def __init__(self
, *args
, **kwargs
):
866 __init__(self, double x=0.0, double y=0.0) -> RealPoint
868 Create a wx.RealPoint object
870 newobj
= _core_
.new_RealPoint(*args
, **kwargs
)
871 self
.this
= newobj
.this
874 def __del__(self
, destroy
=_core_
.delete_RealPoint
):
877 if self
.thisown
: destroy(self
)
880 def __eq__(*args
, **kwargs
):
882 __eq__(self, RealPoint pt) -> bool
884 Test for equality of wx.RealPoint objects.
886 return _core_
.RealPoint___eq__(*args
, **kwargs
)
888 def __ne__(*args
, **kwargs
):
890 __ne__(self, RealPoint pt) -> bool
892 Test for inequality of wx.RealPoint objects.
894 return _core_
.RealPoint___ne__(*args
, **kwargs
)
896 def __add__(*args
, **kwargs
):
898 __add__(self, RealPoint pt) -> RealPoint
900 Add pt's proprties to this and return the result.
902 return _core_
.RealPoint___add__(*args
, **kwargs
)
904 def __sub__(*args
, **kwargs
):
906 __sub__(self, RealPoint pt) -> RealPoint
908 Subtract pt's proprties from this and return the result
910 return _core_
.RealPoint___sub__(*args
, **kwargs
)
912 def Set(*args
, **kwargs
):
914 Set(self, double x, double y)
916 Set both the x and y properties
918 return _core_
.RealPoint_Set(*args
, **kwargs
)
920 def Get(*args
, **kwargs
):
924 Return the x and y properties as a tuple.
926 return _core_
.RealPoint_Get(*args
, **kwargs
)
928 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
929 def __str__(self
): return str(self
.Get())
930 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
931 def __len__(self
): return len(self
.Get())
932 def __getitem__(self
, index
): return self
.Get()[index
]
933 def __setitem__(self
, index
, val
):
934 if index
== 0: self
.x
= val
935 elif index
== 1: self
.y
= val
936 else: raise IndexError
937 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
938 __safe_for_unpickling__
= True
939 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
942 class RealPointPtr(RealPoint
):
943 def __init__(self
, this
):
945 if not hasattr(self
,"thisown"): self
.thisown
= 0
946 self
.__class
__ = RealPoint
947 _core_
.RealPoint_swigregister(RealPointPtr
)
949 #---------------------------------------------------------------------------
953 A data structure for representing a point or position with integer x
954 and y properties. Most places in wxPython that expect a wx.Point can
955 also accept a (x,y) tuple.
958 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
959 x
= property(_core_
.Point_x_get
, _core_
.Point_x_set
)
960 y
= property(_core_
.Point_y_get
, _core_
.Point_y_set
)
961 def __init__(self
, *args
, **kwargs
):
963 __init__(self, int x=0, int y=0) -> Point
965 Create a wx.Point object
967 newobj
= _core_
.new_Point(*args
, **kwargs
)
968 self
.this
= newobj
.this
971 def __del__(self
, destroy
=_core_
.delete_Point
):
974 if self
.thisown
: destroy(self
)
977 def __eq__(*args
, **kwargs
):
979 __eq__(self, Point pt) -> bool
981 Test for equality of wx.Point objects.
983 return _core_
.Point___eq__(*args
, **kwargs
)
985 def __ne__(*args
, **kwargs
):
987 __ne__(self, Point pt) -> bool
989 Test for inequality of wx.Point objects.
991 return _core_
.Point___ne__(*args
, **kwargs
)
993 def __add__(*args
, **kwargs
):
995 __add__(self, Point pt) -> Point
997 Add pt's proprties to this and return the result.
999 return _core_
.Point___add__(*args
, **kwargs
)
1001 def __sub__(*args
, **kwargs
):
1003 __sub__(self, Point pt) -> Point
1005 Subtract pt's proprties from this and return the result
1007 return _core_
.Point___sub__(*args
, **kwargs
)
1009 def __iadd__(*args
, **kwargs
):
1011 __iadd__(self, Point pt) -> Point
1013 Add pt to this object.
1015 return _core_
.Point___iadd__(*args
, **kwargs
)
1017 def __isub__(*args
, **kwargs
):
1019 __isub__(self, Point pt) -> Point
1021 Subtract pt from this object.
1023 return _core_
.Point___isub__(*args
, **kwargs
)
1025 def Set(*args
, **kwargs
):
1027 Set(self, long x, long y)
1029 Set both the x and y properties
1031 return _core_
.Point_Set(*args
, **kwargs
)
1033 def Get(*args
, **kwargs
):
1037 Return the x and y properties as a tuple.
1039 return _core_
.Point_Get(*args
, **kwargs
)
1041 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1042 def __str__(self
): return str(self
.Get())
1043 def __repr__(self
): return 'wx.Point'+str(self
.Get())
1044 def __len__(self
): return len(self
.Get())
1045 def __getitem__(self
, index
): return self
.Get()[index
]
1046 def __setitem__(self
, index
, val
):
1047 if index
== 0: self
.x
= val
1048 elif index
== 1: self
.y
= val
1049 else: raise IndexError
1050 def __nonzero__(self
): return self
.Get() != (0,0)
1051 __safe_for_unpickling__
= True
1052 def __reduce__(self
): return (wx
.Point
, self
.Get())
1055 class PointPtr(Point
):
1056 def __init__(self
, this
):
1058 if not hasattr(self
,"thisown"): self
.thisown
= 0
1059 self
.__class
__ = Point
1060 _core_
.Point_swigregister(PointPtr
)
1062 #---------------------------------------------------------------------------
1066 A class for representing and manipulating rectangles. It has x, y,
1067 width and height properties. In wxPython most palces that expect a
1068 wx.Rect can also accept a (x,y,width,height) tuple.
1071 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1072 def __init__(self
, *args
, **kwargs
):
1074 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1076 Create a new Rect object.
1078 newobj
= _core_
.new_Rect(*args
, **kwargs
)
1079 self
.this
= newobj
.this
1082 def __del__(self
, destroy
=_core_
.delete_Rect
):
1085 if self
.thisown
: destroy(self
)
1088 def GetX(*args
, **kwargs
):
1089 """GetX(self) -> int"""
1090 return _core_
.Rect_GetX(*args
, **kwargs
)
1092 def SetX(*args
, **kwargs
):
1093 """SetX(self, int x)"""
1094 return _core_
.Rect_SetX(*args
, **kwargs
)
1096 def GetY(*args
, **kwargs
):
1097 """GetY(self) -> int"""
1098 return _core_
.Rect_GetY(*args
, **kwargs
)
1100 def SetY(*args
, **kwargs
):
1101 """SetY(self, int y)"""
1102 return _core_
.Rect_SetY(*args
, **kwargs
)
1104 def GetWidth(*args
, **kwargs
):
1105 """GetWidth(self) -> int"""
1106 return _core_
.Rect_GetWidth(*args
, **kwargs
)
1108 def SetWidth(*args
, **kwargs
):
1109 """SetWidth(self, int w)"""
1110 return _core_
.Rect_SetWidth(*args
, **kwargs
)
1112 def GetHeight(*args
, **kwargs
):
1113 """GetHeight(self) -> int"""
1114 return _core_
.Rect_GetHeight(*args
, **kwargs
)
1116 def SetHeight(*args
, **kwargs
):
1117 """SetHeight(self, int h)"""
1118 return _core_
.Rect_SetHeight(*args
, **kwargs
)
1120 def GetPosition(*args
, **kwargs
):
1121 """GetPosition(self) -> Point"""
1122 return _core_
.Rect_GetPosition(*args
, **kwargs
)
1124 def SetPosition(*args
, **kwargs
):
1125 """SetPosition(self, Point p)"""
1126 return _core_
.Rect_SetPosition(*args
, **kwargs
)
1128 def GetSize(*args
, **kwargs
):
1129 """GetSize(self) -> Size"""
1130 return _core_
.Rect_GetSize(*args
, **kwargs
)
1132 def SetSize(*args
, **kwargs
):
1133 """SetSize(self, Size s)"""
1134 return _core_
.Rect_SetSize(*args
, **kwargs
)
1136 def GetTopLeft(*args
, **kwargs
):
1137 """GetTopLeft(self) -> Point"""
1138 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1140 def SetTopLeft(*args
, **kwargs
):
1141 """SetTopLeft(self, Point p)"""
1142 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1144 def GetBottomRight(*args
, **kwargs
):
1145 """GetBottomRight(self) -> Point"""
1146 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1148 def SetBottomRight(*args
, **kwargs
):
1149 """SetBottomRight(self, Point p)"""
1150 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1152 def GetLeft(*args
, **kwargs
):
1153 """GetLeft(self) -> int"""
1154 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1156 def GetTop(*args
, **kwargs
):
1157 """GetTop(self) -> int"""
1158 return _core_
.Rect_GetTop(*args
, **kwargs
)
1160 def GetBottom(*args
, **kwargs
):
1161 """GetBottom(self) -> int"""
1162 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1164 def GetRight(*args
, **kwargs
):
1165 """GetRight(self) -> int"""
1166 return _core_
.Rect_GetRight(*args
, **kwargs
)
1168 def SetLeft(*args
, **kwargs
):
1169 """SetLeft(self, int left)"""
1170 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1172 def SetRight(*args
, **kwargs
):
1173 """SetRight(self, int right)"""
1174 return _core_
.Rect_SetRight(*args
, **kwargs
)
1176 def SetTop(*args
, **kwargs
):
1177 """SetTop(self, int top)"""
1178 return _core_
.Rect_SetTop(*args
, **kwargs
)
1180 def SetBottom(*args
, **kwargs
):
1181 """SetBottom(self, int bottom)"""
1182 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1184 position
= property(GetPosition
, SetPosition
)
1185 size
= property(GetSize
, SetSize
)
1186 left
= property(GetLeft
, SetLeft
)
1187 right
= property(GetRight
, SetRight
)
1188 top
= property(GetTop
, SetTop
)
1189 bottom
= property(GetBottom
, SetBottom
)
1191 def Inflate(*args
, **kwargs
):
1193 Inflate(self, int dx, int dy) -> Rect
1195 Increase the rectangle size by dx in x direction and dy in y
1196 direction. Both (or one of) parameters may be negative to decrease the
1199 return _core_
.Rect_Inflate(*args
, **kwargs
)
1201 def Deflate(*args
, **kwargs
):
1203 Deflate(self, int dx, int dy) -> Rect
1205 Decrease the rectangle size by dx in x direction and dy in y
1206 direction. Both (or one of) parameters may be negative to increase the
1207 rectngle size. This method is the opposite of Inflate.
1209 return _core_
.Rect_Deflate(*args
, **kwargs
)
1211 def OffsetXY(*args
, **kwargs
):
1213 OffsetXY(self, int dx, int dy)
1215 Moves the rectangle by the specified offset. If dx is positive, the
1216 rectangle is moved to the right, if dy is positive, it is moved to the
1217 bottom, otherwise it is moved to the left or top respectively.
1219 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1221 def Offset(*args
, **kwargs
):
1223 Offset(self, Point pt)
1225 Same as OffsetXY but uses dx,dy from Point
1227 return _core_
.Rect_Offset(*args
, **kwargs
)
1229 def Intersect(*args
, **kwargs
):
1231 Intersect(self, Rect rect) -> Rect
1233 Returns the intersectsion of this rectangle and rect.
1235 return _core_
.Rect_Intersect(*args
, **kwargs
)
1237 def Union(*args
, **kwargs
):
1239 Union(self, Rect rect) -> Rect
1241 Returns the union of this rectangle and rect.
1243 return _core_
.Rect_Union(*args
, **kwargs
)
1245 def __add__(*args
, **kwargs
):
1247 __add__(self, Rect rect) -> Rect
1249 Add the properties of rect to this rectangle and return the result.
1251 return _core_
.Rect___add__(*args
, **kwargs
)
1253 def __iadd__(*args
, **kwargs
):
1255 __iadd__(self, Rect rect) -> Rect
1257 Add the properties of rect to this rectangle, updating this rectangle.
1259 return _core_
.Rect___iadd__(*args
, **kwargs
)
1261 def __eq__(*args
, **kwargs
):
1263 __eq__(self, Rect rect) -> bool
1267 return _core_
.Rect___eq__(*args
, **kwargs
)
1269 def __ne__(*args
, **kwargs
):
1271 __ne__(self, Rect rect) -> bool
1273 Test for inequality.
1275 return _core_
.Rect___ne__(*args
, **kwargs
)
1277 def InsideXY(*args
, **kwargs
):
1279 InsideXY(self, int x, int y) -> bool
1281 Return True if the point is (not strcitly) inside the rect.
1283 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1285 def Inside(*args
, **kwargs
):
1287 Inside(self, Point pt) -> bool
1289 Return True if the point is (not strcitly) inside the rect.
1291 return _core_
.Rect_Inside(*args
, **kwargs
)
1293 def Intersects(*args
, **kwargs
):
1295 Intersects(self, Rect rect) -> bool
1297 Returns True if the rectangles have a non empty intersection.
1299 return _core_
.Rect_Intersects(*args
, **kwargs
)
1301 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1302 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1303 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1304 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1305 def Set(*args
, **kwargs
):
1307 Set(self, int x=0, int y=0, int width=0, int height=0)
1309 Set all rectangle properties.
1311 return _core_
.Rect_Set(*args
, **kwargs
)
1313 def Get(*args
, **kwargs
):
1315 Get() -> (x,y,width,height)
1317 Return the rectangle properties as a tuple.
1319 return _core_
.Rect_Get(*args
, **kwargs
)
1321 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1322 def __str__(self
): return str(self
.Get())
1323 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1324 def __len__(self
): return len(self
.Get())
1325 def __getitem__(self
, index
): return self
.Get()[index
]
1326 def __setitem__(self
, index
, val
):
1327 if index
== 0: self
.x
= val
1328 elif index
== 1: self
.y
= val
1329 elif index
== 2: self
.width
= val
1330 elif index
== 3: self
.height
= val
1331 else: raise IndexError
1332 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1333 __safe_for_unpickling__
= True
1334 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1337 class RectPtr(Rect
):
1338 def __init__(self
, this
):
1340 if not hasattr(self
,"thisown"): self
.thisown
= 0
1341 self
.__class
__ = Rect
1342 _core_
.Rect_swigregister(RectPtr
)
1344 def RectPP(*args
, **kwargs
):
1346 RectPP(Point topLeft, Point bottomRight) -> Rect
1348 Create a new Rect object from Points representing two corners.
1350 val
= _core_
.new_RectPP(*args
, **kwargs
)
1354 def RectPS(*args
, **kwargs
):
1356 RectPS(Point pos, Size size) -> Rect
1358 Create a new Rect from a position and size.
1360 val
= _core_
.new_RectPS(*args
, **kwargs
)
1364 def RectS(*args
, **kwargs
):
1366 RectS(Size size) -> Rect
1368 Create a new Rect from a size only.
1370 val
= _core_
.new_RectS(*args
, **kwargs
)
1375 def IntersectRect(*args
, **kwargs
):
1377 IntersectRect(Rect r1, Rect r2) -> Rect
1379 Calculate and return the intersection of r1 and r2.
1381 return _core_
.IntersectRect(*args
, **kwargs
)
1382 #---------------------------------------------------------------------------
1384 class Point2D(object):
1386 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1387 with floating point values.
1390 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1391 def __init__(self
, *args
, **kwargs
):
1393 __init__(self, double x=0.0, double y=0.0) -> Point2D
1395 Create a w.Point2D object.
1397 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1398 self
.this
= newobj
.this
1401 def GetFloor(*args
, **kwargs
):
1407 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1409 def GetRounded(*args
, **kwargs
):
1411 GetRounded() -> (x,y)
1415 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1417 def GetVectorLength(*args
, **kwargs
):
1418 """GetVectorLength(self) -> double"""
1419 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1421 def GetVectorAngle(*args
, **kwargs
):
1422 """GetVectorAngle(self) -> double"""
1423 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1425 def SetVectorLength(*args
, **kwargs
):
1426 """SetVectorLength(self, double length)"""
1427 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1429 def SetVectorAngle(*args
, **kwargs
):
1430 """SetVectorAngle(self, double degrees)"""
1431 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1433 def SetPolarCoordinates(self
, angle
, length
):
1434 self
.SetVectorLength(length
)
1435 self
.SetVectorAngle(angle
)
1436 def Normalize(self
):
1437 self
.SetVectorLength(1.0)
1439 def GetDistance(*args
, **kwargs
):
1440 """GetDistance(self, Point2D pt) -> double"""
1441 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1443 def GetDistanceSquare(*args
, **kwargs
):
1444 """GetDistanceSquare(self, Point2D pt) -> double"""
1445 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1447 def GetDotProduct(*args
, **kwargs
):
1448 """GetDotProduct(self, Point2D vec) -> double"""
1449 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1451 def GetCrossProduct(*args
, **kwargs
):
1452 """GetCrossProduct(self, Point2D vec) -> double"""
1453 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1455 def __neg__(*args
, **kwargs
):
1457 __neg__(self) -> Point2D
1459 the reflection of this point
1461 return _core_
.Point2D___neg__(*args
, **kwargs
)
1463 def __iadd__(*args
, **kwargs
):
1464 """__iadd__(self, Point2D pt) -> Point2D"""
1465 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1467 def __isub__(*args
, **kwargs
):
1468 """__isub__(self, Point2D pt) -> Point2D"""
1469 return _core_
.Point2D___isub__(*args
, **kwargs
)
1471 def __imul__(*args
, **kwargs
):
1472 """__imul__(self, Point2D pt) -> Point2D"""
1473 return _core_
.Point2D___imul__(*args
, **kwargs
)
1475 def __idiv__(*args
, **kwargs
):
1476 """__idiv__(self, Point2D pt) -> Point2D"""
1477 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1479 def __eq__(*args
, **kwargs
):
1481 __eq__(self, Point2D pt) -> bool
1485 return _core_
.Point2D___eq__(*args
, **kwargs
)
1487 def __ne__(*args
, **kwargs
):
1489 __ne__(self, Point2D pt) -> bool
1493 return _core_
.Point2D___ne__(*args
, **kwargs
)
1495 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1496 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1497 def Set(*args
, **kwargs
):
1498 """Set(self, double x=0, double y=0)"""
1499 return _core_
.Point2D_Set(*args
, **kwargs
)
1501 def Get(*args
, **kwargs
):
1505 Return x and y properties as a tuple.
1507 return _core_
.Point2D_Get(*args
, **kwargs
)
1509 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1510 def __str__(self
): return str(self
.Get())
1511 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1512 def __len__(self
): return len(self
.Get())
1513 def __getitem__(self
, index
): return self
.Get()[index
]
1514 def __setitem__(self
, index
, val
):
1515 if index
== 0: self
.x
= val
1516 elif index
== 1: self
.y
= val
1517 else: raise IndexError
1518 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1519 __safe_for_unpickling__
= True
1520 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1523 class Point2DPtr(Point2D
):
1524 def __init__(self
, this
):
1526 if not hasattr(self
,"thisown"): self
.thisown
= 0
1527 self
.__class
__ = Point2D
1528 _core_
.Point2D_swigregister(Point2DPtr
)
1530 def Point2DCopy(*args
, **kwargs
):
1532 Point2DCopy(Point2D pt) -> Point2D
1534 Create a w.Point2D object.
1536 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1540 def Point2DFromPoint(*args
, **kwargs
):
1542 Point2DFromPoint(Point pt) -> Point2D
1544 Create a w.Point2D object.
1546 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1550 #---------------------------------------------------------------------------
1552 FromStart
= _core_
.FromStart
1553 FromCurrent
= _core_
.FromCurrent
1554 FromEnd
= _core_
.FromEnd
1555 class InputStream(object):
1556 """Proxy of C++ InputStream class"""
1558 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1559 def __init__(self
, *args
, **kwargs
):
1560 """__init__(self, PyObject p) -> InputStream"""
1561 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1562 self
.this
= newobj
.this
1565 def __del__(self
, destroy
=_core_
.delete_InputStream
):
1568 if self
.thisown
: destroy(self
)
1571 def close(*args
, **kwargs
):
1573 return _core_
.InputStream_close(*args
, **kwargs
)
1575 def flush(*args
, **kwargs
):
1577 return _core_
.InputStream_flush(*args
, **kwargs
)
1579 def eof(*args
, **kwargs
):
1580 """eof(self) -> bool"""
1581 return _core_
.InputStream_eof(*args
, **kwargs
)
1583 def read(*args
, **kwargs
):
1584 """read(self, int size=-1) -> PyObject"""
1585 return _core_
.InputStream_read(*args
, **kwargs
)
1587 def readline(*args
, **kwargs
):
1588 """readline(self, int size=-1) -> PyObject"""
1589 return _core_
.InputStream_readline(*args
, **kwargs
)
1591 def readlines(*args
, **kwargs
):
1592 """readlines(self, int sizehint=-1) -> PyObject"""
1593 return _core_
.InputStream_readlines(*args
, **kwargs
)
1595 def seek(*args
, **kwargs
):
1596 """seek(self, int offset, int whence=0)"""
1597 return _core_
.InputStream_seek(*args
, **kwargs
)
1599 def tell(*args
, **kwargs
):
1600 """tell(self) -> int"""
1601 return _core_
.InputStream_tell(*args
, **kwargs
)
1603 def Peek(*args
, **kwargs
):
1604 """Peek(self) -> char"""
1605 return _core_
.InputStream_Peek(*args
, **kwargs
)
1607 def GetC(*args
, **kwargs
):
1608 """GetC(self) -> char"""
1609 return _core_
.InputStream_GetC(*args
, **kwargs
)
1611 def LastRead(*args
, **kwargs
):
1612 """LastRead(self) -> size_t"""
1613 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1615 def CanRead(*args
, **kwargs
):
1616 """CanRead(self) -> bool"""
1617 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1619 def Eof(*args
, **kwargs
):
1620 """Eof(self) -> bool"""
1621 return _core_
.InputStream_Eof(*args
, **kwargs
)
1623 def Ungetch(*args
, **kwargs
):
1624 """Ungetch(self, char c) -> bool"""
1625 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1627 def SeekI(*args
, **kwargs
):
1628 """SeekI(self, long pos, int mode=FromStart) -> long"""
1629 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1631 def TellI(*args
, **kwargs
):
1632 """TellI(self) -> long"""
1633 return _core_
.InputStream_TellI(*args
, **kwargs
)
1636 class InputStreamPtr(InputStream
):
1637 def __init__(self
, this
):
1639 if not hasattr(self
,"thisown"): self
.thisown
= 0
1640 self
.__class
__ = InputStream
1641 _core_
.InputStream_swigregister(InputStreamPtr
)
1642 DefaultPosition
= cvar
.DefaultPosition
1643 DefaultSize
= cvar
.DefaultSize
1645 class OutputStream(object):
1646 """Proxy of C++ OutputStream class"""
1647 def __init__(self
): raise RuntimeError, "No constructor defined"
1649 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1650 def write(*args
, **kwargs
):
1651 """write(self, PyObject obj)"""
1652 return _core_
.OutputStream_write(*args
, **kwargs
)
1655 class OutputStreamPtr(OutputStream
):
1656 def __init__(self
, this
):
1658 if not hasattr(self
,"thisown"): self
.thisown
= 0
1659 self
.__class
__ = OutputStream
1660 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1662 #---------------------------------------------------------------------------
1664 class FSFile(Object
):
1665 """Proxy of C++ FSFile class"""
1667 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1668 def __init__(self
, *args
, **kwargs
):
1670 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1671 DateTime modif) -> FSFile
1673 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1674 self
.this
= newobj
.this
1677 self
.thisown
= 0 # It will normally be deleted by the user of the wxFileSystem
1679 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1682 if self
.thisown
: destroy(self
)
1685 def GetStream(*args
, **kwargs
):
1686 """GetStream(self) -> InputStream"""
1687 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1689 def GetMimeType(*args
, **kwargs
):
1690 """GetMimeType(self) -> String"""
1691 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1693 def GetLocation(*args
, **kwargs
):
1694 """GetLocation(self) -> String"""
1695 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1697 def GetAnchor(*args
, **kwargs
):
1698 """GetAnchor(self) -> String"""
1699 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1701 def GetModificationTime(*args
, **kwargs
):
1702 """GetModificationTime(self) -> DateTime"""
1703 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1706 class FSFilePtr(FSFile
):
1707 def __init__(self
, this
):
1709 if not hasattr(self
,"thisown"): self
.thisown
= 0
1710 self
.__class
__ = FSFile
1711 _core_
.FSFile_swigregister(FSFilePtr
)
1713 class CPPFileSystemHandler(object):
1714 """Proxy of C++ CPPFileSystemHandler class"""
1715 def __init__(self
): raise RuntimeError, "No constructor defined"
1717 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1719 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1720 def __init__(self
, this
):
1722 if not hasattr(self
,"thisown"): self
.thisown
= 0
1723 self
.__class
__ = CPPFileSystemHandler
1724 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1726 class FileSystemHandler(CPPFileSystemHandler
):
1727 """Proxy of C++ FileSystemHandler class"""
1729 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1730 def __init__(self
, *args
, **kwargs
):
1731 """__init__(self) -> FileSystemHandler"""
1732 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1733 self
.this
= newobj
.this
1736 self
._setCallbackInfo
(self
, FileSystemHandler
)
1738 def _setCallbackInfo(*args
, **kwargs
):
1739 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1740 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1742 def CanOpen(*args
, **kwargs
):
1743 """CanOpen(self, String location) -> bool"""
1744 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1746 def OpenFile(*args
, **kwargs
):
1747 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1748 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1750 def FindFirst(*args
, **kwargs
):
1751 """FindFirst(self, String spec, int flags=0) -> String"""
1752 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1754 def FindNext(*args
, **kwargs
):
1755 """FindNext(self) -> String"""
1756 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1758 def GetProtocol(*args
, **kwargs
):
1759 """GetProtocol(self, String location) -> String"""
1760 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1762 def GetLeftLocation(*args
, **kwargs
):
1763 """GetLeftLocation(self, String location) -> String"""
1764 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1766 def GetAnchor(*args
, **kwargs
):
1767 """GetAnchor(self, String location) -> String"""
1768 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1770 def GetRightLocation(*args
, **kwargs
):
1771 """GetRightLocation(self, String location) -> String"""
1772 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1774 def GetMimeTypeFromExt(*args
, **kwargs
):
1775 """GetMimeTypeFromExt(self, String location) -> String"""
1776 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1779 class FileSystemHandlerPtr(FileSystemHandler
):
1780 def __init__(self
, this
):
1782 if not hasattr(self
,"thisown"): self
.thisown
= 0
1783 self
.__class
__ = FileSystemHandler
1784 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1786 class FileSystem(Object
):
1787 """Proxy of C++ FileSystem class"""
1789 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1790 def __init__(self
, *args
, **kwargs
):
1791 """__init__(self) -> FileSystem"""
1792 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1793 self
.this
= newobj
.this
1796 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1799 if self
.thisown
: destroy(self
)
1802 def ChangePathTo(*args
, **kwargs
):
1803 """ChangePathTo(self, String location, bool is_dir=False)"""
1804 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1806 def GetPath(*args
, **kwargs
):
1807 """GetPath(self) -> String"""
1808 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1810 def OpenFile(*args
, **kwargs
):
1811 """OpenFile(self, String location) -> FSFile"""
1812 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1814 def FindFirst(*args
, **kwargs
):
1815 """FindFirst(self, String spec, int flags=0) -> String"""
1816 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1818 def FindNext(*args
, **kwargs
):
1819 """FindNext(self) -> String"""
1820 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1822 def AddHandler(*args
, **kwargs
):
1823 """AddHandler(CPPFileSystemHandler handler)"""
1824 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1826 AddHandler
= staticmethod(AddHandler
)
1827 def CleanUpHandlers(*args
, **kwargs
):
1828 """CleanUpHandlers()"""
1829 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1831 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1832 def FileNameToURL(*args
, **kwargs
):
1833 """FileNameToURL(String filename) -> String"""
1834 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1836 FileNameToURL
= staticmethod(FileNameToURL
)
1837 def URLToFileName(*args
, **kwargs
):
1838 """URLToFileName(String url) -> String"""
1839 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1841 URLToFileName
= staticmethod(URLToFileName
)
1843 class FileSystemPtr(FileSystem
):
1844 def __init__(self
, this
):
1846 if not hasattr(self
,"thisown"): self
.thisown
= 0
1847 self
.__class
__ = FileSystem
1848 _core_
.FileSystem_swigregister(FileSystemPtr
)
1850 def FileSystem_AddHandler(*args
, **kwargs
):
1851 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1852 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1854 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1855 """FileSystem_CleanUpHandlers()"""
1856 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1858 def FileSystem_FileNameToURL(*args
, **kwargs
):
1859 """FileSystem_FileNameToURL(String filename) -> String"""
1860 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1862 def FileSystem_URLToFileName(*args
, **kwargs
):
1863 """FileSystem_URLToFileName(String url) -> String"""
1864 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1866 class InternetFSHandler(CPPFileSystemHandler
):
1867 """Proxy of C++ InternetFSHandler class"""
1869 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1870 def __init__(self
, *args
, **kwargs
):
1871 """__init__(self) -> InternetFSHandler"""
1872 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1873 self
.this
= newobj
.this
1876 def CanOpen(*args
, **kwargs
):
1877 """CanOpen(self, String location) -> bool"""
1878 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1880 def OpenFile(*args
, **kwargs
):
1881 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1882 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1885 class InternetFSHandlerPtr(InternetFSHandler
):
1886 def __init__(self
, this
):
1888 if not hasattr(self
,"thisown"): self
.thisown
= 0
1889 self
.__class
__ = InternetFSHandler
1890 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1892 class ZipFSHandler(CPPFileSystemHandler
):
1893 """Proxy of C++ ZipFSHandler class"""
1895 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1896 def __init__(self
, *args
, **kwargs
):
1897 """__init__(self) -> ZipFSHandler"""
1898 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1899 self
.this
= newobj
.this
1902 def CanOpen(*args
, **kwargs
):
1903 """CanOpen(self, String location) -> bool"""
1904 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1906 def OpenFile(*args
, **kwargs
):
1907 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1908 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1910 def FindFirst(*args
, **kwargs
):
1911 """FindFirst(self, String spec, int flags=0) -> String"""
1912 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1914 def FindNext(*args
, **kwargs
):
1915 """FindNext(self) -> String"""
1916 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1919 class ZipFSHandlerPtr(ZipFSHandler
):
1920 def __init__(self
, this
):
1922 if not hasattr(self
,"thisown"): self
.thisown
= 0
1923 self
.__class
__ = ZipFSHandler
1924 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1927 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1928 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1929 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1931 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1932 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1933 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1935 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1936 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1937 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1938 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1940 Add 'file' to the memory filesystem. The dataItem parameter can
1941 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1942 arbitrary data. If a bitmap or image is used then the imgType
1943 parameter should specify what kind of image file it should be
1944 written as, wx.BITMAP_TYPE_PNG, etc.
1946 if isinstance(dataItem
, wx
.Image
):
1947 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1948 elif isinstance(dataItem
, wx
.Bitmap
):
1949 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1950 elif type(dataItem
) == str:
1951 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1953 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1955 class MemoryFSHandler(CPPFileSystemHandler
):
1956 """Proxy of C++ MemoryFSHandler class"""
1958 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1959 def __init__(self
, *args
, **kwargs
):
1960 """__init__(self) -> MemoryFSHandler"""
1961 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
1962 self
.this
= newobj
.this
1965 def RemoveFile(*args
, **kwargs
):
1966 """RemoveFile(String filename)"""
1967 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1969 RemoveFile
= staticmethod(RemoveFile
)
1970 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1971 def CanOpen(*args
, **kwargs
):
1972 """CanOpen(self, String location) -> bool"""
1973 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1975 def OpenFile(*args
, **kwargs
):
1976 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1977 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
1979 def FindFirst(*args
, **kwargs
):
1980 """FindFirst(self, String spec, int flags=0) -> String"""
1981 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
1983 def FindNext(*args
, **kwargs
):
1984 """FindNext(self) -> String"""
1985 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
1988 class MemoryFSHandlerPtr(MemoryFSHandler
):
1989 def __init__(self
, this
):
1991 if not hasattr(self
,"thisown"): self
.thisown
= 0
1992 self
.__class
__ = MemoryFSHandler
1993 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
1995 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
1996 """MemoryFSHandler_RemoveFile(String filename)"""
1997 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1999 #---------------------------------------------------------------------------
2001 class ImageHandler(Object
):
2002 """Proxy of C++ ImageHandler class"""
2003 def __init__(self
): raise RuntimeError, "No constructor defined"
2005 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2006 def GetName(*args
, **kwargs
):
2007 """GetName(self) -> String"""
2008 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
2010 def GetExtension(*args
, **kwargs
):
2011 """GetExtension(self) -> String"""
2012 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
2014 def GetType(*args
, **kwargs
):
2015 """GetType(self) -> long"""
2016 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
2018 def GetMimeType(*args
, **kwargs
):
2019 """GetMimeType(self) -> String"""
2020 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
2022 def CanRead(*args
, **kwargs
):
2023 """CanRead(self, String name) -> bool"""
2024 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
2026 def SetName(*args
, **kwargs
):
2027 """SetName(self, String name)"""
2028 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
2030 def SetExtension(*args
, **kwargs
):
2031 """SetExtension(self, String extension)"""
2032 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
2034 def SetType(*args
, **kwargs
):
2035 """SetType(self, long type)"""
2036 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
2038 def SetMimeType(*args
, **kwargs
):
2039 """SetMimeType(self, String mimetype)"""
2040 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
2043 class ImageHandlerPtr(ImageHandler
):
2044 def __init__(self
, this
):
2046 if not hasattr(self
,"thisown"): self
.thisown
= 0
2047 self
.__class
__ = ImageHandler
2048 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
2050 class ImageHistogram(object):
2051 """Proxy of C++ ImageHistogram class"""
2053 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2054 def __init__(self
, *args
, **kwargs
):
2055 """__init__(self) -> ImageHistogram"""
2056 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
2057 self
.this
= newobj
.this
2060 def MakeKey(*args
, **kwargs
):
2062 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2064 Get the key in the histogram for the given RGB values
2066 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2068 MakeKey
= staticmethod(MakeKey
)
2069 def FindFirstUnusedColour(*args
, **kwargs
):
2071 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2073 Find first colour that is not used in the image and has higher RGB
2074 values than startR, startG, startB. Returns a tuple consisting of a
2075 success flag and rgb values.
2077 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2080 class ImageHistogramPtr(ImageHistogram
):
2081 def __init__(self
, this
):
2083 if not hasattr(self
,"thisown"): self
.thisown
= 0
2084 self
.__class
__ = ImageHistogram
2085 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2087 def ImageHistogram_MakeKey(*args
, **kwargs
):
2089 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2091 Get the key in the histogram for the given RGB values
2093 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2095 class Image(Object
):
2096 """Proxy of C++ Image class"""
2098 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2099 def __init__(self
, *args
, **kwargs
):
2100 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2101 newobj
= _core_
.new_Image(*args
, **kwargs
)
2102 self
.this
= newobj
.this
2105 def __del__(self
, destroy
=_core_
.delete_Image
):
2108 if self
.thisown
: destroy(self
)
2111 def Create(*args
, **kwargs
):
2112 """Create(self, int width, int height)"""
2113 return _core_
.Image_Create(*args
, **kwargs
)
2115 def Destroy(*args
, **kwargs
):
2119 Deletes the C++ object this Python object is a proxy for.
2121 return _core_
.Image_Destroy(*args
, **kwargs
)
2123 def Scale(*args
, **kwargs
):
2124 """Scale(self, int width, int height) -> Image"""
2125 return _core_
.Image_Scale(*args
, **kwargs
)
2127 def ShrinkBy(*args
, **kwargs
):
2128 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2129 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2131 def Rescale(*args
, **kwargs
):
2132 """Rescale(self, int width, int height) -> Image"""
2133 return _core_
.Image_Rescale(*args
, **kwargs
)
2135 def SetRGB(*args
, **kwargs
):
2136 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2137 return _core_
.Image_SetRGB(*args
, **kwargs
)
2139 def GetRed(*args
, **kwargs
):
2140 """GetRed(self, int x, int y) -> unsigned char"""
2141 return _core_
.Image_GetRed(*args
, **kwargs
)
2143 def GetGreen(*args
, **kwargs
):
2144 """GetGreen(self, int x, int y) -> unsigned char"""
2145 return _core_
.Image_GetGreen(*args
, **kwargs
)
2147 def GetBlue(*args
, **kwargs
):
2148 """GetBlue(self, int x, int y) -> unsigned char"""
2149 return _core_
.Image_GetBlue(*args
, **kwargs
)
2151 def SetAlpha(*args
, **kwargs
):
2152 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2153 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2155 def GetAlpha(*args
, **kwargs
):
2156 """GetAlpha(self, int x, int y) -> unsigned char"""
2157 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2159 def HasAlpha(*args
, **kwargs
):
2160 """HasAlpha(self) -> bool"""
2161 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2163 def FindFirstUnusedColour(*args
, **kwargs
):
2165 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2167 Find first colour that is not used in the image and has higher RGB
2168 values than startR, startG, startB. Returns a tuple consisting of a
2169 success flag and rgb values.
2171 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2173 def ConvertAlphaToMask(*args
, **kwargs
):
2175 ConvertAlphaToMask(self, byte threshold=128) -> bool
2177 If the image has alpha channel, this method converts it to mask. All pixels
2178 with alpha value less than ``threshold`` are replaced with mask colour and the
2179 alpha channel is removed. Mask colour is chosen automatically using
2180 `FindFirstUnusedColour`.
2182 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2185 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2187 def ConvertColourToAlpha(*args
, **kwargs
):
2189 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2191 This method converts an image where the original alpha information is
2192 only available as a shades of a colour (actually shades of grey)
2193 typically when you draw anti-aliased text into a bitmap. The DC
2194 drawing routines draw grey values on the black background although
2195 they actually mean to draw white with differnt alpha values. This
2196 method reverses it, assuming a black (!) background and white text.
2197 The method will then fill up the whole image with the colour given.
2199 return _core_
.Image_ConvertColourToAlpha(*args
, **kwargs
)
2201 def SetMaskFromImage(*args
, **kwargs
):
2202 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2203 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2205 def CanRead(*args
, **kwargs
):
2206 """CanRead(String name) -> bool"""
2207 return _core_
.Image_CanRead(*args
, **kwargs
)
2209 CanRead
= staticmethod(CanRead
)
2210 def GetImageCount(*args
, **kwargs
):
2211 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2212 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2214 GetImageCount
= staticmethod(GetImageCount
)
2215 def LoadFile(*args
, **kwargs
):
2216 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2217 return _core_
.Image_LoadFile(*args
, **kwargs
)
2219 def LoadMimeFile(*args
, **kwargs
):
2220 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2221 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2223 def SaveFile(*args
, **kwargs
):
2224 """SaveFile(self, String name, int type) -> bool"""
2225 return _core_
.Image_SaveFile(*args
, **kwargs
)
2227 def SaveMimeFile(*args
, **kwargs
):
2228 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2229 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2231 def CanReadStream(*args
, **kwargs
):
2232 """CanReadStream(InputStream stream) -> bool"""
2233 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2235 CanReadStream
= staticmethod(CanReadStream
)
2236 def LoadStream(*args
, **kwargs
):
2237 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2238 return _core_
.Image_LoadStream(*args
, **kwargs
)
2240 def LoadMimeStream(*args
, **kwargs
):
2241 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2242 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2244 def Ok(*args
, **kwargs
):
2245 """Ok(self) -> bool"""
2246 return _core_
.Image_Ok(*args
, **kwargs
)
2248 def GetWidth(*args
, **kwargs
):
2249 """GetWidth(self) -> int"""
2250 return _core_
.Image_GetWidth(*args
, **kwargs
)
2252 def GetHeight(*args
, **kwargs
):
2253 """GetHeight(self) -> int"""
2254 return _core_
.Image_GetHeight(*args
, **kwargs
)
2256 def GetSize(*args
, **kwargs
):
2257 """GetSize(self) -> Size"""
2258 return _core_
.Image_GetSize(*args
, **kwargs
)
2260 def GetSubImage(*args
, **kwargs
):
2261 """GetSubImage(self, Rect rect) -> Image"""
2262 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2264 def Copy(*args
, **kwargs
):
2265 """Copy(self) -> Image"""
2266 return _core_
.Image_Copy(*args
, **kwargs
)
2268 def Paste(*args
, **kwargs
):
2269 """Paste(self, Image image, int x, int y)"""
2270 return _core_
.Image_Paste(*args
, **kwargs
)
2272 def GetData(*args
, **kwargs
):
2273 """GetData(self) -> PyObject"""
2274 return _core_
.Image_GetData(*args
, **kwargs
)
2276 def SetData(*args
, **kwargs
):
2277 """SetData(self, PyObject data)"""
2278 return _core_
.Image_SetData(*args
, **kwargs
)
2280 def GetDataBuffer(*args
, **kwargs
):
2281 """GetDataBuffer(self) -> PyObject"""
2282 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2284 def SetDataBuffer(*args
, **kwargs
):
2285 """SetDataBuffer(self, PyObject data)"""
2286 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2288 def GetAlphaData(*args
, **kwargs
):
2289 """GetAlphaData(self) -> PyObject"""
2290 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2292 def SetAlphaData(*args
, **kwargs
):
2293 """SetAlphaData(self, PyObject data)"""
2294 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2296 def GetAlphaBuffer(*args
, **kwargs
):
2297 """GetAlphaBuffer(self) -> PyObject"""
2298 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2300 def SetAlphaBuffer(*args
, **kwargs
):
2301 """SetAlphaBuffer(self, PyObject data)"""
2302 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2304 def SetMaskColour(*args
, **kwargs
):
2305 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2306 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2308 def GetMaskRed(*args
, **kwargs
):
2309 """GetMaskRed(self) -> unsigned char"""
2310 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2312 def GetMaskGreen(*args
, **kwargs
):
2313 """GetMaskGreen(self) -> unsigned char"""
2314 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2316 def GetMaskBlue(*args
, **kwargs
):
2317 """GetMaskBlue(self) -> unsigned char"""
2318 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2320 def SetMask(*args
, **kwargs
):
2321 """SetMask(self, bool mask=True)"""
2322 return _core_
.Image_SetMask(*args
, **kwargs
)
2324 def HasMask(*args
, **kwargs
):
2325 """HasMask(self) -> bool"""
2326 return _core_
.Image_HasMask(*args
, **kwargs
)
2328 def Rotate(*args
, **kwargs
):
2330 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2331 Point offset_after_rotation=None) -> Image
2333 return _core_
.Image_Rotate(*args
, **kwargs
)
2335 def Rotate90(*args
, **kwargs
):
2336 """Rotate90(self, bool clockwise=True) -> Image"""
2337 return _core_
.Image_Rotate90(*args
, **kwargs
)
2339 def Mirror(*args
, **kwargs
):
2340 """Mirror(self, bool horizontally=True) -> Image"""
2341 return _core_
.Image_Mirror(*args
, **kwargs
)
2343 def Replace(*args
, **kwargs
):
2345 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2346 unsigned char r2, unsigned char g2, unsigned char b2)
2348 return _core_
.Image_Replace(*args
, **kwargs
)
2350 def ConvertToMono(*args
, **kwargs
):
2351 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2352 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2354 def SetOption(*args
, **kwargs
):
2355 """SetOption(self, String name, String value)"""
2356 return _core_
.Image_SetOption(*args
, **kwargs
)
2358 def SetOptionInt(*args
, **kwargs
):
2359 """SetOptionInt(self, String name, int value)"""
2360 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2362 def GetOption(*args
, **kwargs
):
2363 """GetOption(self, String name) -> String"""
2364 return _core_
.Image_GetOption(*args
, **kwargs
)
2366 def GetOptionInt(*args
, **kwargs
):
2367 """GetOptionInt(self, String name) -> int"""
2368 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2370 def HasOption(*args
, **kwargs
):
2371 """HasOption(self, String name) -> bool"""
2372 return _core_
.Image_HasOption(*args
, **kwargs
)
2374 def CountColours(*args
, **kwargs
):
2375 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2376 return _core_
.Image_CountColours(*args
, **kwargs
)
2378 def ComputeHistogram(*args
, **kwargs
):
2379 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2380 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2382 def AddHandler(*args
, **kwargs
):
2383 """AddHandler(ImageHandler handler)"""
2384 return _core_
.Image_AddHandler(*args
, **kwargs
)
2386 AddHandler
= staticmethod(AddHandler
)
2387 def InsertHandler(*args
, **kwargs
):
2388 """InsertHandler(ImageHandler handler)"""
2389 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2391 InsertHandler
= staticmethod(InsertHandler
)
2392 def RemoveHandler(*args
, **kwargs
):
2393 """RemoveHandler(String name) -> bool"""
2394 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2396 RemoveHandler
= staticmethod(RemoveHandler
)
2397 def GetImageExtWildcard(*args
, **kwargs
):
2398 """GetImageExtWildcard() -> String"""
2399 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2401 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2402 def ConvertToBitmap(*args
, **kwargs
):
2403 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2404 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2406 def ConvertToMonoBitmap(*args
, **kwargs
):
2407 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2408 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2410 def __nonzero__(self
): return self
.Ok()
2412 class ImagePtr(Image
):
2413 def __init__(self
, this
):
2415 if not hasattr(self
,"thisown"): self
.thisown
= 0
2416 self
.__class
__ = Image
2417 _core_
.Image_swigregister(ImagePtr
)
2419 def ImageFromMime(*args
, **kwargs
):
2420 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2421 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2425 def ImageFromStream(*args
, **kwargs
):
2426 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2427 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2431 def ImageFromStreamMime(*args
, **kwargs
):
2432 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2433 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2437 def EmptyImage(*args
, **kwargs
):
2438 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2439 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2443 def ImageFromBitmap(*args
, **kwargs
):
2444 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2445 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2449 def ImageFromData(*args
, **kwargs
):
2450 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2451 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2455 def ImageFromDataWithAlpha(*args
, **kwargs
):
2456 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2457 val
= _core_
.new_ImageFromDataWithAlpha(*args
, **kwargs
)
2461 def Image_CanRead(*args
, **kwargs
):
2462 """Image_CanRead(String name) -> bool"""
2463 return _core_
.Image_CanRead(*args
, **kwargs
)
2465 def Image_GetImageCount(*args
, **kwargs
):
2466 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2467 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2469 def Image_CanReadStream(*args
, **kwargs
):
2470 """Image_CanReadStream(InputStream stream) -> bool"""
2471 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2473 def Image_AddHandler(*args
, **kwargs
):
2474 """Image_AddHandler(ImageHandler handler)"""
2475 return _core_
.Image_AddHandler(*args
, **kwargs
)
2477 def Image_InsertHandler(*args
, **kwargs
):
2478 """Image_InsertHandler(ImageHandler handler)"""
2479 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2481 def Image_RemoveHandler(*args
, **kwargs
):
2482 """Image_RemoveHandler(String name) -> bool"""
2483 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2485 def Image_GetImageExtWildcard(*args
, **kwargs
):
2486 """Image_GetImageExtWildcard() -> String"""
2487 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2489 def InitAllImageHandlers():
2491 The former functionality of InitAllImageHanders is now done internal to
2492 the _core_ extension module and so this function has become a simple NOP.
2496 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2497 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2498 BMP_24BPP
= _core_
.BMP_24BPP
2499 BMP_8BPP
= _core_
.BMP_8BPP
2500 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2501 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2502 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2503 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2504 BMP_4BPP
= _core_
.BMP_4BPP
2505 BMP_1BPP
= _core_
.BMP_1BPP
2506 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2507 class BMPHandler(ImageHandler
):
2508 """Proxy of C++ BMPHandler class"""
2510 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2511 def __init__(self
, *args
, **kwargs
):
2512 """__init__(self) -> BMPHandler"""
2513 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2514 self
.this
= newobj
.this
2518 class BMPHandlerPtr(BMPHandler
):
2519 def __init__(self
, this
):
2521 if not hasattr(self
,"thisown"): self
.thisown
= 0
2522 self
.__class
__ = BMPHandler
2523 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2524 NullImage
= cvar
.NullImage
2525 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2526 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2527 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2528 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2529 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2531 class ICOHandler(BMPHandler
):
2532 """Proxy of C++ ICOHandler class"""
2534 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2535 def __init__(self
, *args
, **kwargs
):
2536 """__init__(self) -> ICOHandler"""
2537 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2538 self
.this
= newobj
.this
2542 class ICOHandlerPtr(ICOHandler
):
2543 def __init__(self
, this
):
2545 if not hasattr(self
,"thisown"): self
.thisown
= 0
2546 self
.__class
__ = ICOHandler
2547 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2549 class CURHandler(ICOHandler
):
2550 """Proxy of C++ CURHandler class"""
2552 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2553 def __init__(self
, *args
, **kwargs
):
2554 """__init__(self) -> CURHandler"""
2555 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2556 self
.this
= newobj
.this
2560 class CURHandlerPtr(CURHandler
):
2561 def __init__(self
, this
):
2563 if not hasattr(self
,"thisown"): self
.thisown
= 0
2564 self
.__class
__ = CURHandler
2565 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2567 class ANIHandler(CURHandler
):
2568 """Proxy of C++ ANIHandler class"""
2570 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2571 def __init__(self
, *args
, **kwargs
):
2572 """__init__(self) -> ANIHandler"""
2573 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2574 self
.this
= newobj
.this
2578 class ANIHandlerPtr(ANIHandler
):
2579 def __init__(self
, this
):
2581 if not hasattr(self
,"thisown"): self
.thisown
= 0
2582 self
.__class
__ = ANIHandler
2583 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2585 class PNGHandler(ImageHandler
):
2586 """Proxy of C++ PNGHandler class"""
2588 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2589 def __init__(self
, *args
, **kwargs
):
2590 """__init__(self) -> PNGHandler"""
2591 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2592 self
.this
= newobj
.this
2596 class PNGHandlerPtr(PNGHandler
):
2597 def __init__(self
, this
):
2599 if not hasattr(self
,"thisown"): self
.thisown
= 0
2600 self
.__class
__ = PNGHandler
2601 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2603 class GIFHandler(ImageHandler
):
2604 """Proxy of C++ GIFHandler class"""
2606 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2607 def __init__(self
, *args
, **kwargs
):
2608 """__init__(self) -> GIFHandler"""
2609 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2610 self
.this
= newobj
.this
2614 class GIFHandlerPtr(GIFHandler
):
2615 def __init__(self
, this
):
2617 if not hasattr(self
,"thisown"): self
.thisown
= 0
2618 self
.__class
__ = GIFHandler
2619 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2621 class PCXHandler(ImageHandler
):
2622 """Proxy of C++ PCXHandler class"""
2624 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2625 def __init__(self
, *args
, **kwargs
):
2626 """__init__(self) -> PCXHandler"""
2627 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2628 self
.this
= newobj
.this
2632 class PCXHandlerPtr(PCXHandler
):
2633 def __init__(self
, this
):
2635 if not hasattr(self
,"thisown"): self
.thisown
= 0
2636 self
.__class
__ = PCXHandler
2637 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2639 class JPEGHandler(ImageHandler
):
2640 """Proxy of C++ JPEGHandler class"""
2642 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2643 def __init__(self
, *args
, **kwargs
):
2644 """__init__(self) -> JPEGHandler"""
2645 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2646 self
.this
= newobj
.this
2650 class JPEGHandlerPtr(JPEGHandler
):
2651 def __init__(self
, this
):
2653 if not hasattr(self
,"thisown"): self
.thisown
= 0
2654 self
.__class
__ = JPEGHandler
2655 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2657 class PNMHandler(ImageHandler
):
2658 """Proxy of C++ PNMHandler class"""
2660 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2661 def __init__(self
, *args
, **kwargs
):
2662 """__init__(self) -> PNMHandler"""
2663 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2664 self
.this
= newobj
.this
2668 class PNMHandlerPtr(PNMHandler
):
2669 def __init__(self
, this
):
2671 if not hasattr(self
,"thisown"): self
.thisown
= 0
2672 self
.__class
__ = PNMHandler
2673 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2675 class XPMHandler(ImageHandler
):
2676 """Proxy of C++ XPMHandler class"""
2678 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2679 def __init__(self
, *args
, **kwargs
):
2680 """__init__(self) -> XPMHandler"""
2681 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2682 self
.this
= newobj
.this
2686 class XPMHandlerPtr(XPMHandler
):
2687 def __init__(self
, this
):
2689 if not hasattr(self
,"thisown"): self
.thisown
= 0
2690 self
.__class
__ = XPMHandler
2691 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2693 class TIFFHandler(ImageHandler
):
2694 """Proxy of C++ TIFFHandler class"""
2696 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2697 def __init__(self
, *args
, **kwargs
):
2698 """__init__(self) -> TIFFHandler"""
2699 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2700 self
.this
= newobj
.this
2704 class TIFFHandlerPtr(TIFFHandler
):
2705 def __init__(self
, this
):
2707 if not hasattr(self
,"thisown"): self
.thisown
= 0
2708 self
.__class
__ = TIFFHandler
2709 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2711 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2712 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2713 class Quantize(object):
2714 """Performs quantization, or colour reduction, on a wxImage."""
2715 def __init__(self
): raise RuntimeError, "No constructor defined"
2717 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2718 def Quantize(*args
, **kwargs
):
2720 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2722 Reduce the colours in the source image and put the result into the
2723 destination image, setting the palette in the destination if
2724 needed. Both images may be the same, to overwrite the source image.
2726 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2728 Quantize
= staticmethod(Quantize
)
2730 class QuantizePtr(Quantize
):
2731 def __init__(self
, this
):
2733 if not hasattr(self
,"thisown"): self
.thisown
= 0
2734 self
.__class
__ = Quantize
2735 _core_
.Quantize_swigregister(QuantizePtr
)
2737 def Quantize_Quantize(*args
, **kwargs
):
2739 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2741 Reduce the colours in the source image and put the result into the
2742 destination image, setting the palette in the destination if
2743 needed. Both images may be the same, to overwrite the source image.
2745 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2747 #---------------------------------------------------------------------------
2749 class EvtHandler(Object
):
2750 """Proxy of C++ EvtHandler class"""
2752 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2753 def __init__(self
, *args
, **kwargs
):
2754 """__init__(self) -> EvtHandler"""
2755 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2756 self
.this
= newobj
.this
2759 def GetNextHandler(*args
, **kwargs
):
2760 """GetNextHandler(self) -> EvtHandler"""
2761 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2763 def GetPreviousHandler(*args
, **kwargs
):
2764 """GetPreviousHandler(self) -> EvtHandler"""
2765 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2767 def SetNextHandler(*args
, **kwargs
):
2768 """SetNextHandler(self, EvtHandler handler)"""
2769 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2771 def SetPreviousHandler(*args
, **kwargs
):
2772 """SetPreviousHandler(self, EvtHandler handler)"""
2773 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2775 def GetEvtHandlerEnabled(*args
, **kwargs
):
2776 """GetEvtHandlerEnabled(self) -> bool"""
2777 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2779 def SetEvtHandlerEnabled(*args
, **kwargs
):
2780 """SetEvtHandlerEnabled(self, bool enabled)"""
2781 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2783 def ProcessEvent(*args
, **kwargs
):
2784 """ProcessEvent(self, Event event) -> bool"""
2785 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2787 def AddPendingEvent(*args
, **kwargs
):
2788 """AddPendingEvent(self, Event event)"""
2789 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2791 def ProcessPendingEvents(*args
, **kwargs
):
2792 """ProcessPendingEvents(self)"""
2793 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2795 def Connect(*args
, **kwargs
):
2796 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2797 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
2799 def Disconnect(*args
, **kwargs
):
2800 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2801 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
2803 def _setOORInfo(*args
, **kwargs
):
2804 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2805 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
2807 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2809 Bind an event to an event handler.
2811 :param event: One of the EVT_* objects that specifies the
2812 type of event to bind,
2814 :param handler: A callable object to be invoked when the
2815 event is delivered to self. Pass None to
2816 disconnect an event handler.
2818 :param source: Sometimes the event originates from a
2819 different window than self, but you still
2820 want to catch it in self. (For example, a
2821 button event delivered to a frame.) By
2822 passing the source of the event, the event
2823 handling system is able to differentiate
2824 between the same event type from different
2827 :param id: Used to spcify the event source by ID instead
2830 :param id2: Used when it is desirable to bind a handler
2831 to a range of IDs, such as with EVT_MENU_RANGE.
2833 if source
is not None:
2835 event
.Bind(self
, id, id2
, handler
)
2837 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2839 Disconencts the event handler binding for event from self.
2840 Returns True if successful.
2842 if source
is not None:
2844 return event
.Unbind(self
, id, id2
)
2847 class EvtHandlerPtr(EvtHandler
):
2848 def __init__(self
, this
):
2850 if not hasattr(self
,"thisown"): self
.thisown
= 0
2851 self
.__class
__ = EvtHandler
2852 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
2854 #---------------------------------------------------------------------------
2856 class PyEventBinder(object):
2858 Instances of this class are used to bind specific events to event
2861 def __init__(self
, evtType
, expectedIDs
=0):
2862 if expectedIDs
not in [0, 1, 2]:
2863 raise ValueError, "Invalid number of expectedIDs"
2864 self
.expectedIDs
= expectedIDs
2866 if type(evtType
) == list or type(evtType
) == tuple:
2867 self
.evtType
= evtType
2869 self
.evtType
= [evtType
]
2872 def Bind(self
, target
, id1
, id2
, function
):
2873 """Bind this set of event types to target."""
2874 for et
in self
.evtType
:
2875 target
.Connect(id1
, id2
, et
, function
)
2878 def Unbind(self
, target
, id1
, id2
):
2879 """Remove an event binding."""
2881 for et
in self
.evtType
:
2882 success
+= target
.Disconnect(id1
, id2
, et
)
2886 def __call__(self
, *args
):
2888 For backwards compatibility with the old EVT_* functions.
2889 Should be called with either (window, func), (window, ID,
2890 func) or (window, ID1, ID2, func) parameters depending on the
2893 assert len(args
) == 2 + self
.expectedIDs
2897 if self
.expectedIDs
== 0:
2899 elif self
.expectedIDs
== 1:
2902 elif self
.expectedIDs
== 2:
2907 raise ValueError, "Unexpected number of IDs"
2909 self
.Bind(target
, id1
, id2
, func
)
2912 # These two are square pegs that don't fit the PyEventBinder hole...
2913 def EVT_COMMAND(win
, id, cmd
, func
):
2914 win
.Connect(id, -1, cmd
, func
)
2915 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2916 win
.Connect(id1
, id2
, cmd
, func
)
2919 #---------------------------------------------------------------------------
2921 #---------------------------------------------------------------------------
2923 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
2924 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
2926 def NewEventType(*args
, **kwargs
):
2927 """NewEventType() -> wxEventType"""
2928 return _core_
.NewEventType(*args
, **kwargs
)
2929 wxEVT_NULL
= _core_
.wxEVT_NULL
2930 wxEVT_FIRST
= _core_
.wxEVT_FIRST
2931 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
2932 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
2933 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
2934 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
2935 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
2936 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2937 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2938 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
2939 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
2940 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
2941 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
2942 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2943 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
2944 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
2945 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
2946 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
2947 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
2948 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
2949 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
2950 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
2951 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
2952 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
2953 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
2954 wxEVT_MOTION
= _core_
.wxEVT_MOTION
2955 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
2956 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
2957 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
2958 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
2959 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
2960 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
2961 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
2962 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
2963 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
2964 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
2965 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
2966 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
2967 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
2968 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
2969 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
2970 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
2971 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
2972 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
2973 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
2974 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
2975 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
2976 wxEVT_CHAR
= _core_
.wxEVT_CHAR
2977 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
2978 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
2979 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
2980 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
2981 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
2982 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
2983 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
2984 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
2985 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
2986 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
2987 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
2988 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
2989 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
2990 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
2991 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
2992 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
2993 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
2994 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
2995 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
2996 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
2997 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
2998 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
2999 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
3000 wxEVT_SIZE
= _core_
.wxEVT_SIZE
3001 wxEVT_MOVE
= _core_
.wxEVT_MOVE
3002 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
3003 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
3004 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
3005 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
3006 wxEVT_POWER
= _core_
.wxEVT_POWER
3007 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
3008 wxEVT_CREATE
= _core_
.wxEVT_CREATE
3009 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
3010 wxEVT_SHOW
= _core_
.wxEVT_SHOW
3011 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
3012 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
3013 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
3014 wxEVT_PAINT
= _core_
.wxEVT_PAINT
3015 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
3016 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
3017 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
3018 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
3019 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
3020 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
3021 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
3022 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
3023 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
3024 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
3025 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
3026 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
3027 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
3028 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
3029 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
3030 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
3031 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
3032 wxEVT_IDLE
= _core_
.wxEVT_IDLE
3033 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
3034 wxEVT_SIZING
= _core_
.wxEVT_SIZING
3035 wxEVT_MOVING
= _core_
.wxEVT_MOVING
3036 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
3037 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
3038 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
3039 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
3040 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
3041 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
3042 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
3044 # Create some event binders
3045 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
3046 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
3047 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
3048 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
3049 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
3050 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3051 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3052 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
3053 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
3054 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
3055 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
3056 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
3057 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
3058 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
3059 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
3060 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
3061 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
3062 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
3063 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
3064 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
3065 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
3066 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
3067 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
3068 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
3069 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3070 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3071 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
3072 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
3073 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
3074 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
3075 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
3076 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
3077 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
3078 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
3079 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
3080 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
3081 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
3082 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
3083 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
3084 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
3086 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
3087 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
3088 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
3089 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
3090 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
3091 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
3092 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
3093 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
3094 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
3095 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
3096 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
3097 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
3098 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
3100 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3108 wxEVT_MIDDLE_DCLICK
,
3116 # Scrolling from wxWindow (sent to wxScrolledWindow)
3117 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3118 wxEVT_SCROLLWIN_BOTTOM
,
3119 wxEVT_SCROLLWIN_LINEUP
,
3120 wxEVT_SCROLLWIN_LINEDOWN
,
3121 wxEVT_SCROLLWIN_PAGEUP
,
3122 wxEVT_SCROLLWIN_PAGEDOWN
,
3123 wxEVT_SCROLLWIN_THUMBTRACK
,
3124 wxEVT_SCROLLWIN_THUMBRELEASE
,
3127 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3128 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3129 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3130 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3131 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3132 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3133 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3134 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3136 # Scrolling from wxSlider and wxScrollBar
3137 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3138 wxEVT_SCROLL_BOTTOM
,
3139 wxEVT_SCROLL_LINEUP
,
3140 wxEVT_SCROLL_LINEDOWN
,
3141 wxEVT_SCROLL_PAGEUP
,
3142 wxEVT_SCROLL_PAGEDOWN
,
3143 wxEVT_SCROLL_THUMBTRACK
,
3144 wxEVT_SCROLL_THUMBRELEASE
,
3145 wxEVT_SCROLL_ENDSCROLL
,
3148 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3149 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3150 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3151 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3152 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3153 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3154 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3155 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3156 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3158 # Scrolling from wxSlider and wxScrollBar, with an id
3159 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3160 wxEVT_SCROLL_BOTTOM
,
3161 wxEVT_SCROLL_LINEUP
,
3162 wxEVT_SCROLL_LINEDOWN
,
3163 wxEVT_SCROLL_PAGEUP
,
3164 wxEVT_SCROLL_PAGEDOWN
,
3165 wxEVT_SCROLL_THUMBTRACK
,
3166 wxEVT_SCROLL_THUMBRELEASE
,
3167 wxEVT_SCROLL_ENDSCROLL
,
3170 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3171 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3172 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3173 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3174 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3175 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3176 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3177 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3178 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3180 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3181 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3182 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3183 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3184 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3185 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3186 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3187 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3188 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3189 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3191 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3192 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3193 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3194 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3195 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3196 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3197 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3198 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3199 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3202 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3203 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3204 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3205 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3206 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3207 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3208 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3210 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3212 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3213 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3215 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3219 #---------------------------------------------------------------------------
3221 class Event(Object
):
3222 """Proxy of C++ Event class"""
3223 def __init__(self
): raise RuntimeError, "No constructor defined"
3225 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3226 def __del__(self
, destroy
=_core_
.delete_Event
):
3229 if self
.thisown
: destroy(self
)
3232 def SetEventType(*args
, **kwargs
):
3233 """SetEventType(self, wxEventType typ)"""
3234 return _core_
.Event_SetEventType(*args
, **kwargs
)
3236 def GetEventType(*args
, **kwargs
):
3237 """GetEventType(self) -> wxEventType"""
3238 return _core_
.Event_GetEventType(*args
, **kwargs
)
3240 def GetEventObject(*args
, **kwargs
):
3241 """GetEventObject(self) -> Object"""
3242 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3244 def SetEventObject(*args
, **kwargs
):
3245 """SetEventObject(self, Object obj)"""
3246 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3248 def GetTimestamp(*args
, **kwargs
):
3249 """GetTimestamp(self) -> long"""
3250 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3252 def SetTimestamp(*args
, **kwargs
):
3253 """SetTimestamp(self, long ts=0)"""
3254 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3256 def GetId(*args
, **kwargs
):
3257 """GetId(self) -> int"""
3258 return _core_
.Event_GetId(*args
, **kwargs
)
3260 def SetId(*args
, **kwargs
):
3261 """SetId(self, int Id)"""
3262 return _core_
.Event_SetId(*args
, **kwargs
)
3264 def IsCommandEvent(*args
, **kwargs
):
3265 """IsCommandEvent(self) -> bool"""
3266 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3268 def Skip(*args
, **kwargs
):
3270 Skip(self, bool skip=True)
3272 Called by an event handler, it controls whether additional event
3273 handlers bound to this event will be called after the current event
3274 handler returns. Skip(false) (the default setting) will prevent
3275 additional event handlers from being called and control will be
3276 returned to the sender of the event immediately after the current
3277 handler has finished. Skip(True) will cause the event processing
3278 system to continue searching for a handler function for this event.
3281 return _core_
.Event_Skip(*args
, **kwargs
)
3283 def GetSkipped(*args
, **kwargs
):
3284 """GetSkipped(self) -> bool"""
3285 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3287 def ShouldPropagate(*args
, **kwargs
):
3288 """ShouldPropagate(self) -> bool"""
3289 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3291 def StopPropagation(*args
, **kwargs
):
3292 """StopPropagation(self) -> int"""
3293 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3295 def ResumePropagation(*args
, **kwargs
):
3296 """ResumePropagation(self, int propagationLevel)"""
3297 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3299 def Clone(*args
, **kwargs
):
3300 """Clone(self) -> Event"""
3301 return _core_
.Event_Clone(*args
, **kwargs
)
3304 class EventPtr(Event
):
3305 def __init__(self
, this
):
3307 if not hasattr(self
,"thisown"): self
.thisown
= 0
3308 self
.__class
__ = Event
3309 _core_
.Event_swigregister(EventPtr
)
3311 #---------------------------------------------------------------------------
3313 class PropagationDisabler(object):
3314 """Proxy of C++ PropagationDisabler class"""
3316 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3317 def __init__(self
, *args
, **kwargs
):
3318 """__init__(self, Event event) -> PropagationDisabler"""
3319 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3320 self
.this
= newobj
.this
3323 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3326 if self
.thisown
: destroy(self
)
3330 class PropagationDisablerPtr(PropagationDisabler
):
3331 def __init__(self
, this
):
3333 if not hasattr(self
,"thisown"): self
.thisown
= 0
3334 self
.__class
__ = PropagationDisabler
3335 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3337 class PropagateOnce(object):
3338 """Proxy of C++ PropagateOnce class"""
3340 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3341 def __init__(self
, *args
, **kwargs
):
3342 """__init__(self, Event event) -> PropagateOnce"""
3343 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3344 self
.this
= newobj
.this
3347 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3350 if self
.thisown
: destroy(self
)
3354 class PropagateOncePtr(PropagateOnce
):
3355 def __init__(self
, this
):
3357 if not hasattr(self
,"thisown"): self
.thisown
= 0
3358 self
.__class
__ = PropagateOnce
3359 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3361 #---------------------------------------------------------------------------
3363 class CommandEvent(Event
):
3364 """Proxy of C++ CommandEvent class"""
3366 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3367 def __init__(self
, *args
, **kwargs
):
3368 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3369 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3370 self
.this
= newobj
.this
3373 def GetSelection(*args
, **kwargs
):
3374 """GetSelection(self) -> int"""
3375 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3377 def SetString(*args
, **kwargs
):
3378 """SetString(self, String s)"""
3379 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3381 def GetString(*args
, **kwargs
):
3382 """GetString(self) -> String"""
3383 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3385 def IsChecked(*args
, **kwargs
):
3386 """IsChecked(self) -> bool"""
3387 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3390 def IsSelection(*args
, **kwargs
):
3391 """IsSelection(self) -> bool"""
3392 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3394 def SetExtraLong(*args
, **kwargs
):
3395 """SetExtraLong(self, long extraLong)"""
3396 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3398 def GetExtraLong(*args
, **kwargs
):
3399 """GetExtraLong(self) -> long"""
3400 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3402 def SetInt(*args
, **kwargs
):
3403 """SetInt(self, int i)"""
3404 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3406 def GetInt(*args
, **kwargs
):
3407 """GetInt(self) -> long"""
3408 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3410 def Clone(*args
, **kwargs
):
3411 """Clone(self) -> Event"""
3412 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3415 class CommandEventPtr(CommandEvent
):
3416 def __init__(self
, this
):
3418 if not hasattr(self
,"thisown"): self
.thisown
= 0
3419 self
.__class
__ = CommandEvent
3420 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3422 #---------------------------------------------------------------------------
3424 class NotifyEvent(CommandEvent
):
3425 """Proxy of C++ NotifyEvent class"""
3427 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3428 def __init__(self
, *args
, **kwargs
):
3429 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3430 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3431 self
.this
= newobj
.this
3434 def Veto(*args
, **kwargs
):
3436 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3438 def Allow(*args
, **kwargs
):
3440 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3442 def IsAllowed(*args
, **kwargs
):
3443 """IsAllowed(self) -> bool"""
3444 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3447 class NotifyEventPtr(NotifyEvent
):
3448 def __init__(self
, this
):
3450 if not hasattr(self
,"thisown"): self
.thisown
= 0
3451 self
.__class
__ = NotifyEvent
3452 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3454 #---------------------------------------------------------------------------
3456 class ScrollEvent(CommandEvent
):
3457 """Proxy of C++ ScrollEvent class"""
3459 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3460 def __init__(self
, *args
, **kwargs
):
3462 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3463 int orient=0) -> ScrollEvent
3465 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3466 self
.this
= newobj
.this
3469 def GetOrientation(*args
, **kwargs
):
3470 """GetOrientation(self) -> int"""
3471 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3473 def GetPosition(*args
, **kwargs
):
3474 """GetPosition(self) -> int"""
3475 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3477 def SetOrientation(*args
, **kwargs
):
3478 """SetOrientation(self, int orient)"""
3479 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3481 def SetPosition(*args
, **kwargs
):
3482 """SetPosition(self, int pos)"""
3483 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3486 class ScrollEventPtr(ScrollEvent
):
3487 def __init__(self
, this
):
3489 if not hasattr(self
,"thisown"): self
.thisown
= 0
3490 self
.__class
__ = ScrollEvent
3491 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3493 #---------------------------------------------------------------------------
3495 class ScrollWinEvent(Event
):
3496 """Proxy of C++ ScrollWinEvent class"""
3498 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3499 def __init__(self
, *args
, **kwargs
):
3500 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3501 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3502 self
.this
= newobj
.this
3505 def GetOrientation(*args
, **kwargs
):
3506 """GetOrientation(self) -> int"""
3507 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3509 def GetPosition(*args
, **kwargs
):
3510 """GetPosition(self) -> int"""
3511 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3513 def SetOrientation(*args
, **kwargs
):
3514 """SetOrientation(self, int orient)"""
3515 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3517 def SetPosition(*args
, **kwargs
):
3518 """SetPosition(self, int pos)"""
3519 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3522 class ScrollWinEventPtr(ScrollWinEvent
):
3523 def __init__(self
, this
):
3525 if not hasattr(self
,"thisown"): self
.thisown
= 0
3526 self
.__class
__ = ScrollWinEvent
3527 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3529 #---------------------------------------------------------------------------
3531 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3532 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3533 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3534 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3535 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3536 class MouseEvent(Event
):
3537 """Proxy of C++ MouseEvent class"""
3539 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3540 def __init__(self
, *args
, **kwargs
):
3541 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3542 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3543 self
.this
= newobj
.this
3546 def IsButton(*args
, **kwargs
):
3547 """IsButton(self) -> bool"""
3548 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
3550 def ButtonDown(*args
, **kwargs
):
3551 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3552 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
3554 def ButtonDClick(*args
, **kwargs
):
3555 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3556 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3558 def ButtonUp(*args
, **kwargs
):
3559 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3560 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
3562 def Button(*args
, **kwargs
):
3563 """Button(self, int but) -> bool"""
3564 return _core_
.MouseEvent_Button(*args
, **kwargs
)
3566 def ButtonIsDown(*args
, **kwargs
):
3567 """ButtonIsDown(self, int but) -> bool"""
3568 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3570 def GetButton(*args
, **kwargs
):
3571 """GetButton(self) -> int"""
3572 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
3574 def ControlDown(*args
, **kwargs
):
3575 """ControlDown(self) -> bool"""
3576 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
3578 def MetaDown(*args
, **kwargs
):
3579 """MetaDown(self) -> bool"""
3580 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
3582 def AltDown(*args
, **kwargs
):
3583 """AltDown(self) -> bool"""
3584 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
3586 def ShiftDown(*args
, **kwargs
):
3587 """ShiftDown(self) -> bool"""
3588 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
3590 def CmdDown(*args
, **kwargs
):
3592 CmdDown(self) -> bool
3594 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3595 platforms but the special "Apple" (a.k.a as "Command") key on
3596 Macs: it makes often sense to use it instead of, say, `ControlDown`
3597 because Cmd key is used for the same thing under Mac as Ctrl
3598 elsewhere. The Ctrl still exists, it's just not used for this
3599 purpose. So for non-Mac platforms this is the same as `ControlDown`
3600 and Macs this is the same as `MetaDown`.
3602 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
3604 def LeftDown(*args
, **kwargs
):
3605 """LeftDown(self) -> bool"""
3606 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
3608 def MiddleDown(*args
, **kwargs
):
3609 """MiddleDown(self) -> bool"""
3610 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
3612 def RightDown(*args
, **kwargs
):
3613 """RightDown(self) -> bool"""
3614 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
3616 def LeftUp(*args
, **kwargs
):
3617 """LeftUp(self) -> bool"""
3618 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
3620 def MiddleUp(*args
, **kwargs
):
3621 """MiddleUp(self) -> bool"""
3622 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
3624 def RightUp(*args
, **kwargs
):
3625 """RightUp(self) -> bool"""
3626 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
3628 def LeftDClick(*args
, **kwargs
):
3629 """LeftDClick(self) -> bool"""
3630 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
3632 def MiddleDClick(*args
, **kwargs
):
3633 """MiddleDClick(self) -> bool"""
3634 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3636 def RightDClick(*args
, **kwargs
):
3637 """RightDClick(self) -> bool"""
3638 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
3640 def LeftIsDown(*args
, **kwargs
):
3641 """LeftIsDown(self) -> bool"""
3642 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3644 def MiddleIsDown(*args
, **kwargs
):
3645 """MiddleIsDown(self) -> bool"""
3646 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3648 def RightIsDown(*args
, **kwargs
):
3649 """RightIsDown(self) -> bool"""
3650 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
3652 def Dragging(*args
, **kwargs
):
3653 """Dragging(self) -> bool"""
3654 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
3656 def Moving(*args
, **kwargs
):
3657 """Moving(self) -> bool"""
3658 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
3660 def Entering(*args
, **kwargs
):
3661 """Entering(self) -> bool"""
3662 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
3664 def Leaving(*args
, **kwargs
):
3665 """Leaving(self) -> bool"""
3666 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
3668 def GetPosition(*args
, **kwargs
):
3670 GetPosition(self) -> Point
3672 Returns the position of the mouse in window coordinates when the event
3675 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
3677 def GetPositionTuple(*args
, **kwargs
):
3679 GetPositionTuple() -> (x,y)
3681 Returns the position of the mouse in window coordinates when the event
3684 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3686 def GetLogicalPosition(*args
, **kwargs
):
3687 """GetLogicalPosition(self, DC dc) -> Point"""
3688 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3690 def GetX(*args
, **kwargs
):
3691 """GetX(self) -> int"""
3692 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
3694 def GetY(*args
, **kwargs
):
3695 """GetY(self) -> int"""
3696 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
3698 def GetWheelRotation(*args
, **kwargs
):
3699 """GetWheelRotation(self) -> int"""
3700 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3702 def GetWheelDelta(*args
, **kwargs
):
3703 """GetWheelDelta(self) -> int"""
3704 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3706 def GetLinesPerAction(*args
, **kwargs
):
3707 """GetLinesPerAction(self) -> int"""
3708 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3710 def IsPageScroll(*args
, **kwargs
):
3711 """IsPageScroll(self) -> bool"""
3712 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3714 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
3715 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
3716 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
3717 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
3718 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
3719 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
3720 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
3721 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
3722 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
3723 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
3724 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
3725 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
3727 class MouseEventPtr(MouseEvent
):
3728 def __init__(self
, this
):
3730 if not hasattr(self
,"thisown"): self
.thisown
= 0
3731 self
.__class
__ = MouseEvent
3732 _core_
.MouseEvent_swigregister(MouseEventPtr
)
3734 #---------------------------------------------------------------------------
3736 class SetCursorEvent(Event
):
3737 """Proxy of C++ SetCursorEvent class"""
3739 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3740 def __init__(self
, *args
, **kwargs
):
3741 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3742 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
3743 self
.this
= newobj
.this
3746 def GetX(*args
, **kwargs
):
3747 """GetX(self) -> int"""
3748 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
3750 def GetY(*args
, **kwargs
):
3751 """GetY(self) -> int"""
3752 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
3754 def SetCursor(*args
, **kwargs
):
3755 """SetCursor(self, Cursor cursor)"""
3756 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3758 def GetCursor(*args
, **kwargs
):
3759 """GetCursor(self) -> Cursor"""
3760 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3762 def HasCursor(*args
, **kwargs
):
3763 """HasCursor(self) -> bool"""
3764 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3767 class SetCursorEventPtr(SetCursorEvent
):
3768 def __init__(self
, this
):
3770 if not hasattr(self
,"thisown"): self
.thisown
= 0
3771 self
.__class
__ = SetCursorEvent
3772 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3774 #---------------------------------------------------------------------------
3776 class KeyEvent(Event
):
3777 """Proxy of C++ KeyEvent class"""
3779 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3780 def __init__(self
, *args
, **kwargs
):
3781 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3782 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
3783 self
.this
= newobj
.this
3786 def ControlDown(*args
, **kwargs
):
3787 """ControlDown(self) -> bool"""
3788 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
3790 def MetaDown(*args
, **kwargs
):
3791 """MetaDown(self) -> bool"""
3792 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
3794 def AltDown(*args
, **kwargs
):
3795 """AltDown(self) -> bool"""
3796 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
3798 def ShiftDown(*args
, **kwargs
):
3799 """ShiftDown(self) -> bool"""
3800 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
3802 def CmdDown(*args
, **kwargs
):
3804 CmdDown(self) -> bool
3806 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3807 platforms but the special "Apple" (a.k.a as "Command") key on
3808 Macs: it makes often sense to use it instead of, say, `ControlDown`
3809 because Cmd key is used for the same thing under Mac as Ctrl
3810 elsewhere. The Ctrl still exists, it's just not used for this
3811 purpose. So for non-Mac platforms this is the same as `ControlDown`
3812 and Macs this is the same as `MetaDown`.
3814 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
3816 def HasModifiers(*args
, **kwargs
):
3817 """HasModifiers(self) -> bool"""
3818 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
3820 def GetKeyCode(*args
, **kwargs
):
3821 """GetKeyCode(self) -> int"""
3822 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3824 KeyCode
= GetKeyCode
3825 def GetUnicodeKey(*args
, **kwargs
):
3826 """GetUnicodeKey(self) -> int"""
3827 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
3829 GetUniChar
= GetUnicodeKey
3830 def GetRawKeyCode(*args
, **kwargs
):
3831 """GetRawKeyCode(self) -> unsigned int"""
3832 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3834 def GetRawKeyFlags(*args
, **kwargs
):
3835 """GetRawKeyFlags(self) -> unsigned int"""
3836 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3838 def GetPosition(*args
, **kwargs
):
3840 GetPosition(self) -> Point
3842 Find the position of the event.
3844 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
3846 def GetPositionTuple(*args
, **kwargs
):
3848 GetPositionTuple() -> (x,y)
3850 Find the position of the event.
3852 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3854 def GetX(*args
, **kwargs
):
3855 """GetX(self) -> int"""
3856 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
3858 def GetY(*args
, **kwargs
):
3859 """GetY(self) -> int"""
3860 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
3862 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
3863 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
3864 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
3865 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
3866 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
3867 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
3868 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
3869 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
3870 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
3871 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
3873 class KeyEventPtr(KeyEvent
):
3874 def __init__(self
, this
):
3876 if not hasattr(self
,"thisown"): self
.thisown
= 0
3877 self
.__class
__ = KeyEvent
3878 _core_
.KeyEvent_swigregister(KeyEventPtr
)
3880 #---------------------------------------------------------------------------
3882 class SizeEvent(Event
):
3883 """Proxy of C++ SizeEvent class"""
3885 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3886 def __init__(self
, *args
, **kwargs
):
3887 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3888 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
3889 self
.this
= newobj
.this
3892 def GetSize(*args
, **kwargs
):
3893 """GetSize(self) -> Size"""
3894 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
3896 def GetRect(*args
, **kwargs
):
3897 """GetRect(self) -> Rect"""
3898 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
3900 def SetRect(*args
, **kwargs
):
3901 """SetRect(self, Rect rect)"""
3902 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
3904 def SetSize(*args
, **kwargs
):
3905 """SetSize(self, Size size)"""
3906 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
3908 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
3909 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
3911 class SizeEventPtr(SizeEvent
):
3912 def __init__(self
, this
):
3914 if not hasattr(self
,"thisown"): self
.thisown
= 0
3915 self
.__class
__ = SizeEvent
3916 _core_
.SizeEvent_swigregister(SizeEventPtr
)
3918 #---------------------------------------------------------------------------
3920 class MoveEvent(Event
):
3921 """Proxy of C++ MoveEvent class"""
3923 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3924 def __init__(self
, *args
, **kwargs
):
3925 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3926 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
3927 self
.this
= newobj
.this
3930 def GetPosition(*args
, **kwargs
):
3931 """GetPosition(self) -> Point"""
3932 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
3934 def GetRect(*args
, **kwargs
):
3935 """GetRect(self) -> Rect"""
3936 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
3938 def SetRect(*args
, **kwargs
):
3939 """SetRect(self, Rect rect)"""
3940 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
3942 def SetPosition(*args
, **kwargs
):
3943 """SetPosition(self, Point pos)"""
3944 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
3946 m_pos
= property(GetPosition
, SetPosition
)
3947 m_rect
= property(GetRect
, SetRect
)
3950 class MoveEventPtr(MoveEvent
):
3951 def __init__(self
, this
):
3953 if not hasattr(self
,"thisown"): self
.thisown
= 0
3954 self
.__class
__ = MoveEvent
3955 _core_
.MoveEvent_swigregister(MoveEventPtr
)
3957 #---------------------------------------------------------------------------
3959 class PaintEvent(Event
):
3960 """Proxy of C++ PaintEvent class"""
3962 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3963 def __init__(self
, *args
, **kwargs
):
3964 """__init__(self, int Id=0) -> PaintEvent"""
3965 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
3966 self
.this
= newobj
.this
3970 class PaintEventPtr(PaintEvent
):
3971 def __init__(self
, this
):
3973 if not hasattr(self
,"thisown"): self
.thisown
= 0
3974 self
.__class
__ = PaintEvent
3975 _core_
.PaintEvent_swigregister(PaintEventPtr
)
3977 class NcPaintEvent(Event
):
3978 """Proxy of C++ NcPaintEvent class"""
3980 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3981 def __init__(self
, *args
, **kwargs
):
3982 """__init__(self, int winid=0) -> NcPaintEvent"""
3983 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
3984 self
.this
= newobj
.this
3988 class NcPaintEventPtr(NcPaintEvent
):
3989 def __init__(self
, this
):
3991 if not hasattr(self
,"thisown"): self
.thisown
= 0
3992 self
.__class
__ = NcPaintEvent
3993 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
3995 #---------------------------------------------------------------------------
3997 class EraseEvent(Event
):
3998 """Proxy of C++ EraseEvent class"""
4000 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4001 def __init__(self
, *args
, **kwargs
):
4002 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4003 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
4004 self
.this
= newobj
.this
4007 def GetDC(*args
, **kwargs
):
4008 """GetDC(self) -> DC"""
4009 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
4012 class EraseEventPtr(EraseEvent
):
4013 def __init__(self
, this
):
4015 if not hasattr(self
,"thisown"): self
.thisown
= 0
4016 self
.__class
__ = EraseEvent
4017 _core_
.EraseEvent_swigregister(EraseEventPtr
)
4019 #---------------------------------------------------------------------------
4021 class FocusEvent(Event
):
4022 """Proxy of C++ FocusEvent class"""
4024 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4025 def __init__(self
, *args
, **kwargs
):
4026 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4027 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
4028 self
.this
= newobj
.this
4031 def GetWindow(*args
, **kwargs
):
4032 """GetWindow(self) -> Window"""
4033 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
4035 def SetWindow(*args
, **kwargs
):
4036 """SetWindow(self, Window win)"""
4037 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
4040 class FocusEventPtr(FocusEvent
):
4041 def __init__(self
, this
):
4043 if not hasattr(self
,"thisown"): self
.thisown
= 0
4044 self
.__class
__ = FocusEvent
4045 _core_
.FocusEvent_swigregister(FocusEventPtr
)
4047 #---------------------------------------------------------------------------
4049 class ChildFocusEvent(CommandEvent
):
4050 """Proxy of C++ ChildFocusEvent class"""
4052 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4053 def __init__(self
, *args
, **kwargs
):
4054 """__init__(self, Window win=None) -> ChildFocusEvent"""
4055 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
4056 self
.this
= newobj
.this
4059 def GetWindow(*args
, **kwargs
):
4060 """GetWindow(self) -> Window"""
4061 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
4064 class ChildFocusEventPtr(ChildFocusEvent
):
4065 def __init__(self
, this
):
4067 if not hasattr(self
,"thisown"): self
.thisown
= 0
4068 self
.__class
__ = ChildFocusEvent
4069 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
4071 #---------------------------------------------------------------------------
4073 class ActivateEvent(Event
):
4074 """Proxy of C++ ActivateEvent class"""
4076 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4077 def __init__(self
, *args
, **kwargs
):
4078 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4079 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
4080 self
.this
= newobj
.this
4083 def GetActive(*args
, **kwargs
):
4084 """GetActive(self) -> bool"""
4085 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
4088 class ActivateEventPtr(ActivateEvent
):
4089 def __init__(self
, this
):
4091 if not hasattr(self
,"thisown"): self
.thisown
= 0
4092 self
.__class
__ = ActivateEvent
4093 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
4095 #---------------------------------------------------------------------------
4097 class InitDialogEvent(Event
):
4098 """Proxy of C++ InitDialogEvent class"""
4100 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4101 def __init__(self
, *args
, **kwargs
):
4102 """__init__(self, int Id=0) -> InitDialogEvent"""
4103 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
4104 self
.this
= newobj
.this
4108 class InitDialogEventPtr(InitDialogEvent
):
4109 def __init__(self
, this
):
4111 if not hasattr(self
,"thisown"): self
.thisown
= 0
4112 self
.__class
__ = InitDialogEvent
4113 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
4115 #---------------------------------------------------------------------------
4117 class MenuEvent(Event
):
4118 """Proxy of C++ MenuEvent class"""
4120 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4121 def __init__(self
, *args
, **kwargs
):
4122 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4123 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
4124 self
.this
= newobj
.this
4127 def GetMenuId(*args
, **kwargs
):
4128 """GetMenuId(self) -> int"""
4129 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
4131 def IsPopup(*args
, **kwargs
):
4132 """IsPopup(self) -> bool"""
4133 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4135 def GetMenu(*args
, **kwargs
):
4136 """GetMenu(self) -> Menu"""
4137 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4140 class MenuEventPtr(MenuEvent
):
4141 def __init__(self
, this
):
4143 if not hasattr(self
,"thisown"): self
.thisown
= 0
4144 self
.__class
__ = MenuEvent
4145 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4147 #---------------------------------------------------------------------------
4149 class CloseEvent(Event
):
4150 """Proxy of C++ CloseEvent class"""
4152 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4153 def __init__(self
, *args
, **kwargs
):
4154 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4155 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4156 self
.this
= newobj
.this
4159 def SetLoggingOff(*args
, **kwargs
):
4160 """SetLoggingOff(self, bool logOff)"""
4161 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4163 def GetLoggingOff(*args
, **kwargs
):
4164 """GetLoggingOff(self) -> bool"""
4165 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4167 def Veto(*args
, **kwargs
):
4168 """Veto(self, bool veto=True)"""
4169 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4171 def SetCanVeto(*args
, **kwargs
):
4172 """SetCanVeto(self, bool canVeto)"""
4173 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4175 def CanVeto(*args
, **kwargs
):
4176 """CanVeto(self) -> bool"""
4177 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4179 def GetVeto(*args
, **kwargs
):
4180 """GetVeto(self) -> bool"""
4181 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4184 class CloseEventPtr(CloseEvent
):
4185 def __init__(self
, this
):
4187 if not hasattr(self
,"thisown"): self
.thisown
= 0
4188 self
.__class
__ = CloseEvent
4189 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4191 #---------------------------------------------------------------------------
4193 class ShowEvent(Event
):
4194 """Proxy of C++ ShowEvent class"""
4196 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4197 def __init__(self
, *args
, **kwargs
):
4198 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4199 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4200 self
.this
= newobj
.this
4203 def SetShow(*args
, **kwargs
):
4204 """SetShow(self, bool show)"""
4205 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4207 def GetShow(*args
, **kwargs
):
4208 """GetShow(self) -> bool"""
4209 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4212 class ShowEventPtr(ShowEvent
):
4213 def __init__(self
, this
):
4215 if not hasattr(self
,"thisown"): self
.thisown
= 0
4216 self
.__class
__ = ShowEvent
4217 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4219 #---------------------------------------------------------------------------
4221 class IconizeEvent(Event
):
4222 """Proxy of C++ IconizeEvent class"""
4224 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4225 def __init__(self
, *args
, **kwargs
):
4226 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4227 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4228 self
.this
= newobj
.this
4231 def Iconized(*args
, **kwargs
):
4232 """Iconized(self) -> bool"""
4233 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4236 class IconizeEventPtr(IconizeEvent
):
4237 def __init__(self
, this
):
4239 if not hasattr(self
,"thisown"): self
.thisown
= 0
4240 self
.__class
__ = IconizeEvent
4241 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4243 #---------------------------------------------------------------------------
4245 class MaximizeEvent(Event
):
4246 """Proxy of C++ MaximizeEvent class"""
4248 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4249 def __init__(self
, *args
, **kwargs
):
4250 """__init__(self, int id=0) -> MaximizeEvent"""
4251 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4252 self
.this
= newobj
.this
4256 class MaximizeEventPtr(MaximizeEvent
):
4257 def __init__(self
, this
):
4259 if not hasattr(self
,"thisown"): self
.thisown
= 0
4260 self
.__class
__ = MaximizeEvent
4261 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4263 #---------------------------------------------------------------------------
4265 class DropFilesEvent(Event
):
4266 """Proxy of C++ DropFilesEvent class"""
4267 def __init__(self
): raise RuntimeError, "No constructor defined"
4269 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4270 def GetPosition(*args
, **kwargs
):
4271 """GetPosition(self) -> Point"""
4272 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4274 def GetNumberOfFiles(*args
, **kwargs
):
4275 """GetNumberOfFiles(self) -> int"""
4276 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4278 def GetFiles(*args
, **kwargs
):
4279 """GetFiles(self) -> PyObject"""
4280 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4283 class DropFilesEventPtr(DropFilesEvent
):
4284 def __init__(self
, this
):
4286 if not hasattr(self
,"thisown"): self
.thisown
= 0
4287 self
.__class
__ = DropFilesEvent
4288 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4290 #---------------------------------------------------------------------------
4292 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4293 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4294 class UpdateUIEvent(CommandEvent
):
4295 """Proxy of C++ UpdateUIEvent class"""
4297 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4298 def __init__(self
, *args
, **kwargs
):
4299 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4300 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4301 self
.this
= newobj
.this
4304 def GetChecked(*args
, **kwargs
):
4305 """GetChecked(self) -> bool"""
4306 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4308 def GetEnabled(*args
, **kwargs
):
4309 """GetEnabled(self) -> bool"""
4310 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4312 def GetText(*args
, **kwargs
):
4313 """GetText(self) -> String"""
4314 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4316 def GetSetText(*args
, **kwargs
):
4317 """GetSetText(self) -> bool"""
4318 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4320 def GetSetChecked(*args
, **kwargs
):
4321 """GetSetChecked(self) -> bool"""
4322 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4324 def GetSetEnabled(*args
, **kwargs
):
4325 """GetSetEnabled(self) -> bool"""
4326 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4328 def Check(*args
, **kwargs
):
4329 """Check(self, bool check)"""
4330 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4332 def Enable(*args
, **kwargs
):
4333 """Enable(self, bool enable)"""
4334 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4336 def SetText(*args
, **kwargs
):
4337 """SetText(self, String text)"""
4338 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4340 def SetUpdateInterval(*args
, **kwargs
):
4341 """SetUpdateInterval(long updateInterval)"""
4342 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4344 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4345 def GetUpdateInterval(*args
, **kwargs
):
4346 """GetUpdateInterval() -> long"""
4347 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4349 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4350 def CanUpdate(*args
, **kwargs
):
4351 """CanUpdate(Window win) -> bool"""
4352 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4354 CanUpdate
= staticmethod(CanUpdate
)
4355 def ResetUpdateTime(*args
, **kwargs
):
4356 """ResetUpdateTime()"""
4357 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4359 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4360 def SetMode(*args
, **kwargs
):
4361 """SetMode(int mode)"""
4362 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4364 SetMode
= staticmethod(SetMode
)
4365 def GetMode(*args
, **kwargs
):
4366 """GetMode() -> int"""
4367 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4369 GetMode
= staticmethod(GetMode
)
4371 class UpdateUIEventPtr(UpdateUIEvent
):
4372 def __init__(self
, this
):
4374 if not hasattr(self
,"thisown"): self
.thisown
= 0
4375 self
.__class
__ = UpdateUIEvent
4376 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4378 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4379 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4380 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4382 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4383 """UpdateUIEvent_GetUpdateInterval() -> long"""
4384 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4386 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4387 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4388 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4390 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4391 """UpdateUIEvent_ResetUpdateTime()"""
4392 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4394 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4395 """UpdateUIEvent_SetMode(int mode)"""
4396 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4398 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4399 """UpdateUIEvent_GetMode() -> int"""
4400 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4402 #---------------------------------------------------------------------------
4404 class SysColourChangedEvent(Event
):
4405 """Proxy of C++ SysColourChangedEvent class"""
4407 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4408 def __init__(self
, *args
, **kwargs
):
4409 """__init__(self) -> SysColourChangedEvent"""
4410 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
4411 self
.this
= newobj
.this
4415 class SysColourChangedEventPtr(SysColourChangedEvent
):
4416 def __init__(self
, this
):
4418 if not hasattr(self
,"thisown"): self
.thisown
= 0
4419 self
.__class
__ = SysColourChangedEvent
4420 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4422 #---------------------------------------------------------------------------
4424 class MouseCaptureChangedEvent(Event
):
4425 """Proxy of C++ MouseCaptureChangedEvent class"""
4427 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4428 def __init__(self
, *args
, **kwargs
):
4429 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4430 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4431 self
.this
= newobj
.this
4434 def GetCapturedWindow(*args
, **kwargs
):
4435 """GetCapturedWindow(self) -> Window"""
4436 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4439 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4440 def __init__(self
, this
):
4442 if not hasattr(self
,"thisown"): self
.thisown
= 0
4443 self
.__class
__ = MouseCaptureChangedEvent
4444 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4446 #---------------------------------------------------------------------------
4448 class DisplayChangedEvent(Event
):
4449 """Proxy of C++ DisplayChangedEvent class"""
4451 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4452 def __init__(self
, *args
, **kwargs
):
4453 """__init__(self) -> DisplayChangedEvent"""
4454 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
4455 self
.this
= newobj
.this
4459 class DisplayChangedEventPtr(DisplayChangedEvent
):
4460 def __init__(self
, this
):
4462 if not hasattr(self
,"thisown"): self
.thisown
= 0
4463 self
.__class
__ = DisplayChangedEvent
4464 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4466 #---------------------------------------------------------------------------
4468 class PaletteChangedEvent(Event
):
4469 """Proxy of C++ PaletteChangedEvent class"""
4471 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4472 def __init__(self
, *args
, **kwargs
):
4473 """__init__(self, int id=0) -> PaletteChangedEvent"""
4474 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
4475 self
.this
= newobj
.this
4478 def SetChangedWindow(*args
, **kwargs
):
4479 """SetChangedWindow(self, Window win)"""
4480 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4482 def GetChangedWindow(*args
, **kwargs
):
4483 """GetChangedWindow(self) -> Window"""
4484 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4487 class PaletteChangedEventPtr(PaletteChangedEvent
):
4488 def __init__(self
, this
):
4490 if not hasattr(self
,"thisown"): self
.thisown
= 0
4491 self
.__class
__ = PaletteChangedEvent
4492 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4494 #---------------------------------------------------------------------------
4496 class QueryNewPaletteEvent(Event
):
4497 """Proxy of C++ QueryNewPaletteEvent class"""
4499 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4500 def __init__(self
, *args
, **kwargs
):
4501 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4502 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4503 self
.this
= newobj
.this
4506 def SetPaletteRealized(*args
, **kwargs
):
4507 """SetPaletteRealized(self, bool realized)"""
4508 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4510 def GetPaletteRealized(*args
, **kwargs
):
4511 """GetPaletteRealized(self) -> bool"""
4512 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4515 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4516 def __init__(self
, this
):
4518 if not hasattr(self
,"thisown"): self
.thisown
= 0
4519 self
.__class
__ = QueryNewPaletteEvent
4520 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4522 #---------------------------------------------------------------------------
4524 class NavigationKeyEvent(Event
):
4525 """Proxy of C++ NavigationKeyEvent class"""
4527 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4528 def __init__(self
, *args
, **kwargs
):
4529 """__init__(self) -> NavigationKeyEvent"""
4530 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
4531 self
.this
= newobj
.this
4534 def GetDirection(*args
, **kwargs
):
4535 """GetDirection(self) -> bool"""
4536 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4538 def SetDirection(*args
, **kwargs
):
4539 """SetDirection(self, bool forward)"""
4540 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4542 def IsWindowChange(*args
, **kwargs
):
4543 """IsWindowChange(self) -> bool"""
4544 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4546 def SetWindowChange(*args
, **kwargs
):
4547 """SetWindowChange(self, bool ischange)"""
4548 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4550 def SetFlags(*args
, **kwargs
):
4551 """SetFlags(self, long flags)"""
4552 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
4554 def GetCurrentFocus(*args
, **kwargs
):
4555 """GetCurrentFocus(self) -> Window"""
4556 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4558 def SetCurrentFocus(*args
, **kwargs
):
4559 """SetCurrentFocus(self, Window win)"""
4560 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4562 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
4563 IsForward
= _core_
.NavigationKeyEvent_IsForward
4564 WinChange
= _core_
.NavigationKeyEvent_WinChange
4566 class NavigationKeyEventPtr(NavigationKeyEvent
):
4567 def __init__(self
, this
):
4569 if not hasattr(self
,"thisown"): self
.thisown
= 0
4570 self
.__class
__ = NavigationKeyEvent
4571 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4573 #---------------------------------------------------------------------------
4575 class WindowCreateEvent(CommandEvent
):
4576 """Proxy of C++ WindowCreateEvent class"""
4578 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4579 def __init__(self
, *args
, **kwargs
):
4580 """__init__(self, Window win=None) -> WindowCreateEvent"""
4581 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
4582 self
.this
= newobj
.this
4585 def GetWindow(*args
, **kwargs
):
4586 """GetWindow(self) -> Window"""
4587 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4590 class WindowCreateEventPtr(WindowCreateEvent
):
4591 def __init__(self
, this
):
4593 if not hasattr(self
,"thisown"): self
.thisown
= 0
4594 self
.__class
__ = WindowCreateEvent
4595 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4597 class WindowDestroyEvent(CommandEvent
):
4598 """Proxy of C++ WindowDestroyEvent class"""
4600 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4601 def __init__(self
, *args
, **kwargs
):
4602 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4603 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
4604 self
.this
= newobj
.this
4607 def GetWindow(*args
, **kwargs
):
4608 """GetWindow(self) -> Window"""
4609 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4612 class WindowDestroyEventPtr(WindowDestroyEvent
):
4613 def __init__(self
, this
):
4615 if not hasattr(self
,"thisown"): self
.thisown
= 0
4616 self
.__class
__ = WindowDestroyEvent
4617 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4619 #---------------------------------------------------------------------------
4621 class ContextMenuEvent(CommandEvent
):
4622 """Proxy of C++ ContextMenuEvent class"""
4624 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4625 def __init__(self
, *args
, **kwargs
):
4626 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4627 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
4628 self
.this
= newobj
.this
4631 def GetPosition(*args
, **kwargs
):
4632 """GetPosition(self) -> Point"""
4633 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4635 def SetPosition(*args
, **kwargs
):
4636 """SetPosition(self, Point pos)"""
4637 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4640 class ContextMenuEventPtr(ContextMenuEvent
):
4641 def __init__(self
, this
):
4643 if not hasattr(self
,"thisown"): self
.thisown
= 0
4644 self
.__class
__ = ContextMenuEvent
4645 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4647 #---------------------------------------------------------------------------
4649 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
4650 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
4651 class IdleEvent(Event
):
4652 """Proxy of C++ IdleEvent class"""
4654 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4655 def __init__(self
, *args
, **kwargs
):
4656 """__init__(self) -> IdleEvent"""
4657 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
4658 self
.this
= newobj
.this
4661 def RequestMore(*args
, **kwargs
):
4662 """RequestMore(self, bool needMore=True)"""
4663 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
4665 def MoreRequested(*args
, **kwargs
):
4666 """MoreRequested(self) -> bool"""
4667 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
4669 def SetMode(*args
, **kwargs
):
4670 """SetMode(int mode)"""
4671 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4673 SetMode
= staticmethod(SetMode
)
4674 def GetMode(*args
, **kwargs
):
4675 """GetMode() -> int"""
4676 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4678 GetMode
= staticmethod(GetMode
)
4679 def CanSend(*args
, **kwargs
):
4680 """CanSend(Window win) -> bool"""
4681 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4683 CanSend
= staticmethod(CanSend
)
4685 class IdleEventPtr(IdleEvent
):
4686 def __init__(self
, this
):
4688 if not hasattr(self
,"thisown"): self
.thisown
= 0
4689 self
.__class
__ = IdleEvent
4690 _core_
.IdleEvent_swigregister(IdleEventPtr
)
4692 def IdleEvent_SetMode(*args
, **kwargs
):
4693 """IdleEvent_SetMode(int mode)"""
4694 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4696 def IdleEvent_GetMode(*args
, **kwargs
):
4697 """IdleEvent_GetMode() -> int"""
4698 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4700 def IdleEvent_CanSend(*args
, **kwargs
):
4701 """IdleEvent_CanSend(Window win) -> bool"""
4702 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4704 #---------------------------------------------------------------------------
4706 class PyEvent(Event
):
4707 """Proxy of C++ PyEvent class"""
4709 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4710 def __init__(self
, *args
, **kwargs
):
4711 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4712 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
4713 self
.this
= newobj
.this
4718 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
4721 if self
.thisown
: destroy(self
)
4724 def SetSelf(*args
, **kwargs
):
4725 """SetSelf(self, PyObject self)"""
4726 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
4728 def GetSelf(*args
, **kwargs
):
4729 """GetSelf(self) -> PyObject"""
4730 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
4733 class PyEventPtr(PyEvent
):
4734 def __init__(self
, this
):
4736 if not hasattr(self
,"thisown"): self
.thisown
= 0
4737 self
.__class
__ = PyEvent
4738 _core_
.PyEvent_swigregister(PyEventPtr
)
4740 class PyCommandEvent(CommandEvent
):
4741 """Proxy of C++ PyCommandEvent class"""
4743 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4744 def __init__(self
, *args
, **kwargs
):
4745 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4746 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
4747 self
.this
= newobj
.this
4752 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
4755 if self
.thisown
: destroy(self
)
4758 def SetSelf(*args
, **kwargs
):
4759 """SetSelf(self, PyObject self)"""
4760 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4762 def GetSelf(*args
, **kwargs
):
4763 """GetSelf(self) -> PyObject"""
4764 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4767 class PyCommandEventPtr(PyCommandEvent
):
4768 def __init__(self
, this
):
4770 if not hasattr(self
,"thisown"): self
.thisown
= 0
4771 self
.__class
__ = PyCommandEvent
4772 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4774 #---------------------------------------------------------------------------
4776 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
4777 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
4778 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
4779 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
4780 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
4781 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
4782 class PyApp(EvtHandler
):
4784 The ``wx.PyApp`` class is an *implementation detail*, please use the
4785 `wx.App` class (or some other derived class) instead.
4788 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4789 def __init__(self
, *args
, **kwargs
):
4791 __init__(self) -> PyApp
4793 Create a new application object, starting the bootstrap process.
4795 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
4796 self
.this
= newobj
.this
4799 self
._setCallbackInfo
(self
, PyApp
)
4800 self
._setOORInfo
(self
)
4802 def __del__(self
, destroy
=_core_
.delete_PyApp
):
4805 if self
.thisown
: destroy(self
)
4808 def _setCallbackInfo(*args
, **kwargs
):
4809 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4810 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
4812 def GetAppName(*args
, **kwargs
):
4814 GetAppName(self) -> String
4816 Get the application name.
4818 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
4820 def SetAppName(*args
, **kwargs
):
4822 SetAppName(self, String name)
4824 Set the application name. This value may be used automatically by
4825 `wx.Config` and such.
4827 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
4829 def GetClassName(*args
, **kwargs
):
4831 GetClassName(self) -> String
4833 Get the application's class name.
4835 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
4837 def SetClassName(*args
, **kwargs
):
4839 SetClassName(self, String name)
4841 Set the application's class name. This value may be used for
4842 X-resources if applicable for the platform
4844 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
4846 def GetVendorName(*args
, **kwargs
):
4848 GetVendorName(self) -> String
4850 Get the application's vendor name.
4852 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
4854 def SetVendorName(*args
, **kwargs
):
4856 SetVendorName(self, String name)
4858 Set the application's vendor name. This value may be used
4859 automatically by `wx.Config` and such.
4861 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
4863 def GetTraits(*args
, **kwargs
):
4865 GetTraits(self) -> wxAppTraits
4867 Return (and create if necessary) the app traits object to which we
4868 delegate for everything which either should be configurable by the
4869 user (then he can change the default behaviour simply by overriding
4870 CreateTraits() and returning his own traits object) or which is
4871 GUI/console dependent as then wx.AppTraits allows us to abstract the
4872 differences behind the common facade.
4874 :todo: Add support for overriding CreateAppTraits in wxPython.
4876 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
4878 def ProcessPendingEvents(*args
, **kwargs
):
4880 ProcessPendingEvents(self)
4882 Process all events in the Pending Events list -- it is necessary to
4883 call this function to process posted events. This normally happens
4884 during each event loop iteration.
4886 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4888 def Yield(*args
, **kwargs
):
4890 Yield(self, bool onlyIfNeeded=False) -> bool
4892 Process all currently pending events right now, instead of waiting
4893 until return to the event loop. It is an error to call ``Yield``
4894 recursively unless the value of ``onlyIfNeeded`` is True.
4896 :warning: This function is dangerous as it can lead to unexpected
4897 reentrancies (i.e. when called from an event handler it may
4898 result in calling the same event handler again), use with
4899 extreme care or, better, don't use at all!
4901 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4904 return _core_
.PyApp_Yield(*args
, **kwargs
)
4906 def WakeUpIdle(*args
, **kwargs
):
4910 Make sure that idle events are sent again.
4911 :see: `wx.WakeUpIdle`
4913 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
4915 def IsMainLoopRunning(*args
, **kwargs
):
4917 IsMainLoopRunning() -> bool
4919 Returns True if we're running the main loop, i.e. if the events can
4920 currently be dispatched.
4922 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
4924 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
4925 def MainLoop(*args
, **kwargs
):
4927 MainLoop(self) -> int
4929 Execute the main GUI loop, the function doesn't normally return until
4930 all top level windows have been closed and destroyed.
4932 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
4934 def Exit(*args
, **kwargs
):
4938 Exit the main loop thus terminating the application.
4941 return _core_
.PyApp_Exit(*args
, **kwargs
)
4943 def ExitMainLoop(*args
, **kwargs
):
4947 Exit the main GUI loop during the next iteration of the main
4948 loop, (i.e. it does not stop the program immediately!)
4950 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
4952 def Pending(*args
, **kwargs
):
4954 Pending(self) -> bool
4956 Returns True if there are unprocessed events in the event queue.
4958 return _core_
.PyApp_Pending(*args
, **kwargs
)
4960 def Dispatch(*args
, **kwargs
):
4962 Dispatch(self) -> bool
4964 Process the first event in the event queue (blocks until an event
4965 appears if there are none currently)
4967 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
4969 def ProcessIdle(*args
, **kwargs
):
4971 ProcessIdle(self) -> bool
4973 Called from the MainLoop when the application becomes idle (there are
4974 no pending events) and sends a `wx.IdleEvent` to all interested
4975 parties. Returns True if more idle events are needed, False if not.
4977 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
4979 def SendIdleEvents(*args
, **kwargs
):
4981 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4983 Send idle event to window and all subwindows. Returns True if more
4984 idle time is requested.
4986 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
4988 def IsActive(*args
, **kwargs
):
4990 IsActive(self) -> bool
4992 Return True if our app has focus.
4994 return _core_
.PyApp_IsActive(*args
, **kwargs
)
4996 def SetTopWindow(*args
, **kwargs
):
4998 SetTopWindow(self, Window win)
5000 Set the *main* top level window
5002 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
5004 def GetTopWindow(*args
, **kwargs
):
5006 GetTopWindow(self) -> Window
5008 Return the *main* top level window (if it hadn't been set previously
5009 with SetTopWindow(), will return just some top level window and, if
5010 there not any, will return None)
5012 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
5014 def SetExitOnFrameDelete(*args
, **kwargs
):
5016 SetExitOnFrameDelete(self, bool flag)
5018 Control the exit behaviour: by default, the program will exit the main
5019 loop (and so, usually, terminate) when the last top-level program
5020 window is deleted. Beware that if you disable this behaviour (with
5021 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5022 explicitly from somewhere.
5024 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
5026 def GetExitOnFrameDelete(*args
, **kwargs
):
5028 GetExitOnFrameDelete(self) -> bool
5030 Get the current exit behaviour setting.
5032 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
5034 def SetUseBestVisual(*args
, **kwargs
):
5036 SetUseBestVisual(self, bool flag)
5038 Set whether the app should try to use the best available visual on
5039 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5041 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
5043 def GetUseBestVisual(*args
, **kwargs
):
5045 GetUseBestVisual(self) -> bool
5047 Get current UseBestVisual setting.
5049 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
5051 def SetPrintMode(*args
, **kwargs
):
5052 """SetPrintMode(self, int mode)"""
5053 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
5055 def GetPrintMode(*args
, **kwargs
):
5056 """GetPrintMode(self) -> int"""
5057 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
5059 def SetAssertMode(*args
, **kwargs
):
5061 SetAssertMode(self, int mode)
5063 Set the OnAssert behaviour for debug and hybrid builds.
5065 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
5067 def GetAssertMode(*args
, **kwargs
):
5069 GetAssertMode(self) -> int
5071 Get the current OnAssert behaviour setting.
5073 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
5075 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5076 """GetMacSupportPCMenuShortcuts() -> bool"""
5077 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5079 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
5080 def GetMacAboutMenuItemId(*args
, **kwargs
):
5081 """GetMacAboutMenuItemId() -> long"""
5082 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5084 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
5085 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
5086 """GetMacPreferencesMenuItemId() -> long"""
5087 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5089 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
5090 def GetMacExitMenuItemId(*args
, **kwargs
):
5091 """GetMacExitMenuItemId() -> long"""
5092 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5094 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
5095 def GetMacHelpMenuTitleName(*args
, **kwargs
):
5096 """GetMacHelpMenuTitleName() -> String"""
5097 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5099 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
5100 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5101 """SetMacSupportPCMenuShortcuts(bool val)"""
5102 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5104 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
5105 def SetMacAboutMenuItemId(*args
, **kwargs
):
5106 """SetMacAboutMenuItemId(long val)"""
5107 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5109 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
5110 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
5111 """SetMacPreferencesMenuItemId(long val)"""
5112 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5114 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
5115 def SetMacExitMenuItemId(*args
, **kwargs
):
5116 """SetMacExitMenuItemId(long val)"""
5117 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5119 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
5120 def SetMacHelpMenuTitleName(*args
, **kwargs
):
5121 """SetMacHelpMenuTitleName(String val)"""
5122 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5124 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
5125 def _BootstrapApp(*args
, **kwargs
):
5129 For internal use only
5131 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
5133 def GetComCtl32Version(*args
, **kwargs
):
5135 GetComCtl32Version() -> int
5137 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5138 it wasn't found at all. Raises an exception on non-Windows platforms.
5140 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5142 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
5144 class PyAppPtr(PyApp
):
5145 def __init__(self
, this
):
5147 if not hasattr(self
,"thisown"): self
.thisown
= 0
5148 self
.__class
__ = PyApp
5149 _core_
.PyApp_swigregister(PyAppPtr
)
5151 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5153 PyApp_IsMainLoopRunning() -> bool
5155 Returns True if we're running the main loop, i.e. if the events can
5156 currently be dispatched.
5158 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5160 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5161 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5162 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5164 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5165 """PyApp_GetMacAboutMenuItemId() -> long"""
5166 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5168 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5169 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5170 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5172 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5173 """PyApp_GetMacExitMenuItemId() -> long"""
5174 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5176 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5177 """PyApp_GetMacHelpMenuTitleName() -> String"""
5178 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5180 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5181 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5182 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5184 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5185 """PyApp_SetMacAboutMenuItemId(long val)"""
5186 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5188 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5189 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5190 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5192 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5193 """PyApp_SetMacExitMenuItemId(long val)"""
5194 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5196 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5197 """PyApp_SetMacHelpMenuTitleName(String val)"""
5198 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5200 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5202 PyApp_GetComCtl32Version() -> int
5204 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5205 it wasn't found at all. Raises an exception on non-Windows platforms.
5207 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5209 #---------------------------------------------------------------------------
5212 def Exit(*args
, **kwargs
):
5216 Force an exit of the application. Convenience for wx.GetApp().Exit()
5218 return _core_
.Exit(*args
, **kwargs
)
5220 def Yield(*args
, **kwargs
):
5224 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5226 return _core_
.Yield(*args
, **kwargs
)
5228 def YieldIfNeeded(*args
, **kwargs
):
5230 YieldIfNeeded() -> bool
5232 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5234 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5236 def SafeYield(*args
, **kwargs
):
5238 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5240 This function is similar to `wx.Yield`, except that it disables the
5241 user input to all program windows before calling `wx.Yield` and
5242 re-enables it again afterwards. If ``win`` is not None, this window
5243 will remain enabled, allowing the implementation of some limited user
5246 :Returns: the result of the call to `wx.Yield`.
5248 return _core_
.SafeYield(*args
, **kwargs
)
5250 def WakeUpIdle(*args
, **kwargs
):
5254 Cause the message queue to become empty again, so idle events will be
5257 return _core_
.WakeUpIdle(*args
, **kwargs
)
5259 def PostEvent(*args
, **kwargs
):
5261 PostEvent(EvtHandler dest, Event event)
5263 Send an event to a window or other wx.EvtHandler to be processed
5266 return _core_
.PostEvent(*args
, **kwargs
)
5268 def App_CleanUp(*args
, **kwargs
):
5272 For internal use only, it is used to cleanup after wxWidgets when
5275 return _core_
.App_CleanUp(*args
, **kwargs
)
5277 def GetApp(*args
, **kwargs
):
5281 Return a reference to the current wx.App object.
5283 return _core_
.GetApp(*args
, **kwargs
)
5285 def SetDefaultPyEncoding(*args
, **kwargs
):
5287 SetDefaultPyEncoding(string encoding)
5289 Sets the encoding that wxPython will use when it needs to convert a
5290 Python string or unicode object to or from a wxString.
5292 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5293 but please be aware that the default encoding within the same locale
5294 may be slightly different on different platforms. For example, please
5295 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5296 between the common latin/roman encodings.
5298 return _core_
.SetDefaultPyEncoding(*args
, **kwargs
)
5300 def GetDefaultPyEncoding(*args
, **kwargs
):
5302 GetDefaultPyEncoding() -> string
5304 Gets the current encoding that wxPython will use when it needs to
5305 convert a Python string or unicode object to or from a wxString.
5307 return _core_
.GetDefaultPyEncoding(*args
, **kwargs
)
5308 #----------------------------------------------------------------------
5310 class PyOnDemandOutputWindow
:
5312 A class that can be used for redirecting Python's stdout and
5313 stderr streams. It will do nothing until something is wrriten to
5314 the stream at which point it will create a Frame with a text area
5315 and write the text there.
5317 def __init__(self
, title
= "wxPython: stdout/stderr"):
5320 self
.pos
= wx
.DefaultPosition
5321 self
.size
= (450, 300)
5324 def SetParent(self
, parent
):
5325 """Set the window to be used as the popup Frame's parent."""
5326 self
.parent
= parent
5329 def CreateOutputWindow(self
, st
):
5330 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
5331 style
=wx
.DEFAULT_FRAME_STYLE
)
5332 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
5333 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
5334 self
.text
.AppendText(st
)
5335 self
.frame
.Show(True)
5336 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
5339 def OnCloseWindow(self
, event
):
5340 if self
.frame
is not None:
5341 self
.frame
.Destroy()
5346 # These methods provide the file-like output behaviour.
5347 def write(self
, text
):
5349 Create the output window if needed and write the string to it.
5350 If not called in the context of the gui thread then uses
5351 CallAfter to do the work there.
5353 if self
.frame
is None:
5354 if not wx
.Thread_IsMain():
5355 wx
.CallAfter(self
.CreateOutputWindow
, text
)
5357 self
.CreateOutputWindow(text
)
5359 if not wx
.Thread_IsMain():
5360 wx
.CallAfter(self
.text
.AppendText
, text
)
5362 self
.text
.AppendText(text
)
5366 if self
.frame
is not None:
5367 wx
.CallAfter(self
.frame
.Close
)
5375 #----------------------------------------------------------------------
5377 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5379 class App(wx
.PyApp
):
5381 The ``wx.App`` class represents the application and is used to:
5383 * bootstrap the wxPython system and initialize the underlying
5385 * set and get application-wide properties
5386 * implement the windowing system main message or event loop,
5387 and to dispatch events to window instances
5390 Every application must have a ``wx.App`` instance, and all
5391 creation of UI objects should be delayed until after the
5392 ``wx.App`` object has been created in order to ensure that the gui
5393 platform and wxWidgets have been fully initialized.
5395 Normally you would derive from this class and implement an
5396 ``OnInit`` method that creates a frame and then calls
5397 ``self.SetTopWindow(frame)``.
5399 :see: `wx.PySimpleApp` for a simpler app class that can be used
5403 outputWindowClass
= PyOnDemandOutputWindow
5405 def __init__(self
, redirect
=_defRedirect
, filename
=None,
5406 useBestVisual
=False, clearSigInt
=True):
5408 Construct a ``wx.App`` object.
5410 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5411 redirected? Defaults to True on Windows and Mac, False
5412 otherwise. If `filename` is None then output will be
5413 redirected to a window that pops up as needed. (You can
5414 control what kind of window is created for the output by
5415 resetting the class variable ``outputWindowClass`` to a
5416 class of your choosing.)
5418 :param filename: The name of a file to redirect output to, if
5421 :param useBestVisual: Should the app try to use the best
5422 available visual provided by the system (only relevant on
5423 systems that have more than one visual.) This parameter
5424 must be used instead of calling `SetUseBestVisual` later
5425 on because it must be set before the underlying GUI
5426 toolkit is initialized.
5428 :param clearSigInt: Should SIGINT be cleared? This allows the
5429 app to terminate upon a Ctrl-C in the console like other
5432 :note: You should override OnInit to do applicaition
5433 initialization to ensure that the system, toolkit and
5434 wxWidgets are fully initialized.
5436 wx
.PyApp
.__init
__(self
)
5438 if wx
.Platform
== "__WXMAC__":
5441 if not MacOS
.WMAvailable():
5443 This program needs access to the screen. Please run with 'pythonw',
5444 not 'python', and only when you are logged in on the main display of
5452 # This has to be done before OnInit
5453 self
.SetUseBestVisual(useBestVisual
)
5455 # Set the default handler for SIGINT. This fixes a problem
5456 # where if Ctrl-C is pressed in the console that started this
5457 # app then it will not appear to do anything, (not even send
5458 # KeyboardInterrupt???) but will later segfault on exit. By
5459 # setting the default handler then the app will exit, as
5460 # expected (depending on platform.)
5464 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5468 # Save and redirect the stdio to a window?
5469 self
.stdioWin
= None
5470 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5472 self
.RedirectStdio(filename
)
5474 # Use Python's install prefix as the default
5475 wx
.StandardPaths
.Get().SetInstallPrefix(_sys
.prefix
)
5477 # This finishes the initialization of wxWindows and then calls
5478 # the OnInit that should be present in the derived class
5479 self
._BootstrapApp
()
5484 self
.RestoreStdio() # Just in case the MainLoop was overridden
5489 def SetTopWindow(self
, frame
):
5490 """Set the \"main\" top level window"""
5492 self
.stdioWin
.SetParent(frame
)
5493 wx
.PyApp
.SetTopWindow(self
, frame
)
5497 """Execute the main GUI event loop"""
5498 wx
.PyApp
.MainLoop(self
)
5502 def RedirectStdio(self
, filename
=None):
5503 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5505 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5507 self
.stdioWin
= self
.outputWindowClass()
5508 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5511 def RestoreStdio(self
):
5512 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5515 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
5517 Set the title, position and/or size of the output window if
5518 the stdio has been redirected. This should be called before
5519 any output would cause the output window to be created.
5522 if title
is not None:
5523 self
.stdioWin
.title
= title
5525 self
.stdioWin
.pos
= pos
5526 if size
is not None:
5527 self
.stdioWin
.size
= size
5532 # change from wx.PyApp_XX to wx.App_XX
5533 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
5534 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
5535 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
5536 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
5537 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
5538 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
5539 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
5540 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
5541 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
5542 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
5543 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
5545 #----------------------------------------------------------------------------
5547 class PySimpleApp(wx
.App
):
5549 A simple application class. You can just create one of these and
5550 then then make your top level windows later, and not have to worry
5551 about OnInit. For example::
5553 app = wx.PySimpleApp()
5554 frame = wx.Frame(None, title='Hello World')
5561 def __init__(self
, redirect
=False, filename
=None,
5562 useBestVisual
=False, clearSigInt
=True):
5564 :see: `wx.App.__init__`
5566 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
5573 # Is anybody using this one?
5574 class PyWidgetTester(wx
.App
):
5575 def __init__(self
, size
= (250, 100)):
5577 wx
.App
.__init
__(self
, 0)
5580 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5581 self
.SetTopWindow(self
.frame
)
5584 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
5585 w
= widgetClass(self
.frame
, *args
, **kwargs
)
5586 self
.frame
.Show(True)
5588 #----------------------------------------------------------------------------
5589 # DO NOT hold any other references to this object. This is how we
5590 # know when to cleanup system resources that wxWidgets is holding. When
5591 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5592 # goes to zero and it calls the wx.App_CleanUp function.
5594 class __wxPyCleanup
:
5596 self
.cleanup
= _core_
.App_CleanUp
5600 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5602 ## # another possible solution, but it gets called too early...
5604 ## atexit.register(_core_.wxApp_CleanUp)
5607 #----------------------------------------------------------------------------
5609 #---------------------------------------------------------------------------
5611 class EventLoop(object):
5612 """Proxy of C++ EventLoop class"""
5614 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5615 def __init__(self
, *args
, **kwargs
):
5616 """__init__(self) -> EventLoop"""
5617 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
5618 self
.this
= newobj
.this
5621 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
5624 if self
.thisown
: destroy(self
)
5627 def Run(*args
, **kwargs
):
5628 """Run(self) -> int"""
5629 return _core_
.EventLoop_Run(*args
, **kwargs
)
5631 def Exit(*args
, **kwargs
):
5632 """Exit(self, int rc=0)"""
5633 return _core_
.EventLoop_Exit(*args
, **kwargs
)
5635 def Pending(*args
, **kwargs
):
5636 """Pending(self) -> bool"""
5637 return _core_
.EventLoop_Pending(*args
, **kwargs
)
5639 def Dispatch(*args
, **kwargs
):
5640 """Dispatch(self) -> bool"""
5641 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
5643 def IsRunning(*args
, **kwargs
):
5644 """IsRunning(self) -> bool"""
5645 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
5647 def GetActive(*args
, **kwargs
):
5648 """GetActive() -> EventLoop"""
5649 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5651 GetActive
= staticmethod(GetActive
)
5652 def SetActive(*args
, **kwargs
):
5653 """SetActive(EventLoop loop)"""
5654 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5656 SetActive
= staticmethod(SetActive
)
5658 class EventLoopPtr(EventLoop
):
5659 def __init__(self
, this
):
5661 if not hasattr(self
,"thisown"): self
.thisown
= 0
5662 self
.__class
__ = EventLoop
5663 _core_
.EventLoop_swigregister(EventLoopPtr
)
5665 def EventLoop_GetActive(*args
, **kwargs
):
5666 """EventLoop_GetActive() -> EventLoop"""
5667 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5669 def EventLoop_SetActive(*args
, **kwargs
):
5670 """EventLoop_SetActive(EventLoop loop)"""
5671 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5673 #---------------------------------------------------------------------------
5675 class AcceleratorEntry(object):
5677 A class used to define items in an `wx.AcceleratorTable`. wxPython
5678 programs can choose to use wx.AcceleratorEntry objects, but using a
5679 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5680 as well. See `__init__` for of the tuple values.
5682 :see: `wx.AcceleratorTable`
5685 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5686 def __init__(self
, *args
, **kwargs
):
5688 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5690 Construct a wx.AcceleratorEntry.
5692 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
5693 self
.this
= newobj
.this
5696 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
5699 if self
.thisown
: destroy(self
)
5702 def Set(*args
, **kwargs
):
5704 Set(self, int flags, int keyCode, int cmd)
5706 (Re)set the attributes of a wx.AcceleratorEntry.
5709 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
5711 def GetFlags(*args
, **kwargs
):
5713 GetFlags(self) -> int
5715 Get the AcceleratorEntry's flags.
5717 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5719 def GetKeyCode(*args
, **kwargs
):
5721 GetKeyCode(self) -> int
5723 Get the AcceleratorEntry's keycode.
5725 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5727 def GetCommand(*args
, **kwargs
):
5729 GetCommand(self) -> int
5731 Get the AcceleratorEntry's command ID.
5733 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5736 class AcceleratorEntryPtr(AcceleratorEntry
):
5737 def __init__(self
, this
):
5739 if not hasattr(self
,"thisown"): self
.thisown
= 0
5740 self
.__class
__ = AcceleratorEntry
5741 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5743 class AcceleratorTable(Object
):
5745 An accelerator table allows the application to specify a table of
5746 keyboard shortcuts for menus or other commands. On Windows, menu or
5747 button commands are supported; on GTK, only menu commands are
5751 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5752 def __init__(self
, *args
, **kwargs
):
5754 __init__(entries) -> AcceleratorTable
5756 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5757 items or or of 3-tuples (flags, keyCode, cmdID)
5759 :see: `wx.AcceleratorEntry`
5761 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
5762 self
.this
= newobj
.this
5765 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
5768 if self
.thisown
: destroy(self
)
5771 def Ok(*args
, **kwargs
):
5772 """Ok(self) -> bool"""
5773 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
5776 class AcceleratorTablePtr(AcceleratorTable
):
5777 def __init__(self
, this
):
5779 if not hasattr(self
,"thisown"): self
.thisown
= 0
5780 self
.__class
__ = AcceleratorTable
5781 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5784 def GetAccelFromString(*args
, **kwargs
):
5785 """GetAccelFromString(String label) -> AcceleratorEntry"""
5786 return _core_
.GetAccelFromString(*args
, **kwargs
)
5787 #---------------------------------------------------------------------------
5789 class VisualAttributes(object):
5790 """struct containing all the visual attributes of a control"""
5792 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5793 def __init__(self
, *args
, **kwargs
):
5795 __init__(self) -> VisualAttributes
5797 struct containing all the visual attributes of a control
5799 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
5800 self
.this
= newobj
.this
5803 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
5806 if self
.thisown
: destroy(self
)
5809 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
5810 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
5811 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
5813 class VisualAttributesPtr(VisualAttributes
):
5814 def __init__(self
, this
):
5816 if not hasattr(self
,"thisown"): self
.thisown
= 0
5817 self
.__class
__ = VisualAttributes
5818 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
5819 NullAcceleratorTable
= cvar
.NullAcceleratorTable
5820 PanelNameStr
= cvar
.PanelNameStr
5822 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
5823 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
5824 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
5825 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
5826 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
5827 class Window(EvtHandler
):
5829 wx.Window is the base class for all windows and represents any visible
5830 object on the screen. All controls, top level windows and so on are
5831 wx.Windows. Sizers and device contexts are not however, as they don't
5832 appear on screen themselves.
5836 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5837 def __init__(self
, *args
, **kwargs
):
5839 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5840 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5842 Construct and show a generic Window.
5844 newobj
= _core_
.new_Window(*args
, **kwargs
)
5845 self
.this
= newobj
.this
5848 self
._setOORInfo
(self
)
5850 def Create(*args
, **kwargs
):
5852 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5853 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5855 Create the GUI part of the Window for 2-phase creation mode.
5857 return _core_
.Window_Create(*args
, **kwargs
)
5859 def Close(*args
, **kwargs
):
5861 Close(self, bool force=False) -> bool
5863 This function simply generates a EVT_CLOSE event whose handler usually
5864 tries to close the window. It doesn't close the window itself,
5865 however. If force is False (the default) then the window's close
5866 handler will be allowed to veto the destruction of the window.
5868 return _core_
.Window_Close(*args
, **kwargs
)
5870 def Destroy(*args
, **kwargs
):
5872 Destroy(self) -> bool
5874 Destroys the window safely. Frames and dialogs are not destroyed
5875 immediately when this function is called -- they are added to a list
5876 of windows to be deleted on idle time, when all the window's events
5877 have been processed. This prevents problems with events being sent to
5878 non-existent windows.
5880 Returns True if the window has either been successfully deleted, or it
5881 has been added to the list of windows pending real deletion.
5883 return _core_
.Window_Destroy(*args
, **kwargs
)
5885 def DestroyChildren(*args
, **kwargs
):
5887 DestroyChildren(self) -> bool
5889 Destroys all children of a window. Called automatically by the
5892 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
5894 def IsBeingDeleted(*args
, **kwargs
):
5896 IsBeingDeleted(self) -> bool
5898 Is the window in the process of being deleted?
5900 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
5902 def SetTitle(*args
, **kwargs
):
5904 SetTitle(self, String title)
5906 Sets the window's title. Applicable only to frames and dialogs.
5908 return _core_
.Window_SetTitle(*args
, **kwargs
)
5910 def GetTitle(*args
, **kwargs
):
5912 GetTitle(self) -> String
5914 Gets the window's title. Applicable only to frames and dialogs.
5916 return _core_
.Window_GetTitle(*args
, **kwargs
)
5918 def SetLabel(*args
, **kwargs
):
5920 SetLabel(self, String label)
5922 Set the text which the window shows in its label if applicable.
5924 return _core_
.Window_SetLabel(*args
, **kwargs
)
5926 def GetLabel(*args
, **kwargs
):
5928 GetLabel(self) -> String
5930 Generic way of getting a label from any window, for identification
5931 purposes. The interpretation of this function differs from class to
5932 class. For frames and dialogs, the value returned is the title. For
5933 buttons or static text controls, it is the button text. This function
5934 can be useful for meta-programs such as testing tools or special-needs
5935 access programs)which need to identify windows by name.
5937 return _core_
.Window_GetLabel(*args
, **kwargs
)
5939 def SetName(*args
, **kwargs
):
5941 SetName(self, String name)
5943 Sets the window's name. The window name is used for ressource setting
5944 in X, it is not the same as the window title/label
5946 return _core_
.Window_SetName(*args
, **kwargs
)
5948 def GetName(*args
, **kwargs
):
5950 GetName(self) -> String
5952 Returns the windows name. This name is not guaranteed to be unique;
5953 it is up to the programmer to supply an appropriate name in the window
5954 constructor or via wx.Window.SetName.
5956 return _core_
.Window_GetName(*args
, **kwargs
)
5958 def SetWindowVariant(*args
, **kwargs
):
5960 SetWindowVariant(self, int variant)
5962 Sets the variant of the window/font size to use for this window, if
5963 the platform supports variants, for example, wxMac.
5965 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
5967 def GetWindowVariant(*args
, **kwargs
):
5968 """GetWindowVariant(self) -> int"""
5969 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
5971 def SetId(*args
, **kwargs
):
5973 SetId(self, int winid)
5975 Sets the identifier of the window. Each window has an integer
5976 identifier. If the application has not provided one, an identifier
5977 will be generated. Normally, the identifier should be provided on
5978 creation and should not be modified subsequently.
5980 return _core_
.Window_SetId(*args
, **kwargs
)
5982 def GetId(*args
, **kwargs
):
5986 Returns the identifier of the window. Each window has an integer
5987 identifier. If the application has not provided one (or the default Id
5988 -1 is used) then an unique identifier with a negative value will be
5991 return _core_
.Window_GetId(*args
, **kwargs
)
5993 def NewControlId(*args
, **kwargs
):
5995 NewControlId() -> int
5997 Generate a control id for the controls which were not given one.
5999 return _core_
.Window_NewControlId(*args
, **kwargs
)
6001 NewControlId
= staticmethod(NewControlId
)
6002 def NextControlId(*args
, **kwargs
):
6004 NextControlId(int winid) -> int
6006 Get the id of the control following the one with the given
6009 return _core_
.Window_NextControlId(*args
, **kwargs
)
6011 NextControlId
= staticmethod(NextControlId
)
6012 def PrevControlId(*args
, **kwargs
):
6014 PrevControlId(int winid) -> int
6016 Get the id of the control preceding the one with the given
6019 return _core_
.Window_PrevControlId(*args
, **kwargs
)
6021 PrevControlId
= staticmethod(PrevControlId
)
6022 def SetSize(*args
, **kwargs
):
6024 SetSize(self, Size size)
6026 Sets the size of the window in pixels.
6028 return _core_
.Window_SetSize(*args
, **kwargs
)
6030 def SetDimensions(*args
, **kwargs
):
6032 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6034 Sets the position and size of the window in pixels. The sizeFlags
6035 parameter indicates the interpretation of the other params if they are
6038 ======================== ======================================
6039 wx.SIZE_AUTO A -1 indicates that a class-specific
6040 default should be used.
6041 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6042 -1 values are supplied.
6043 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6044 interpreted as real dimensions, not
6046 ======================== ======================================
6049 return _core_
.Window_SetDimensions(*args
, **kwargs
)
6051 def SetRect(*args
, **kwargs
):
6053 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6055 Sets the position and size of the window in pixels using a wx.Rect.
6057 return _core_
.Window_SetRect(*args
, **kwargs
)
6059 def SetSizeWH(*args
, **kwargs
):
6061 SetSizeWH(self, int width, int height)
6063 Sets the size of the window in pixels.
6065 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
6067 def Move(*args
, **kwargs
):
6069 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6071 Moves the window to the given position.
6073 return _core_
.Window_Move(*args
, **kwargs
)
6076 def MoveXY(*args
, **kwargs
):
6078 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6080 Moves the window to the given position.
6082 return _core_
.Window_MoveXY(*args
, **kwargs
)
6084 def SetBestFittingSize(*args
, **kwargs
):
6086 SetBestFittingSize(self, Size size=DefaultSize)
6088 A 'Smart' SetSize that will fill in default size components with the
6089 window's *best size* values. Also set's the minsize for use with sizers.
6091 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
6093 def Raise(*args
, **kwargs
):
6097 Raises the window to the top of the window hierarchy if it is a
6098 managed window (dialog or frame).
6100 return _core_
.Window_Raise(*args
, **kwargs
)
6102 def Lower(*args
, **kwargs
):
6106 Lowers the window to the bottom of the window hierarchy if it is a
6107 managed window (dialog or frame).
6109 return _core_
.Window_Lower(*args
, **kwargs
)
6111 def SetClientSize(*args
, **kwargs
):
6113 SetClientSize(self, Size size)
6115 This sets the size of the window client area in pixels. Using this
6116 function to size a window tends to be more device-independent than
6117 wx.Window.SetSize, since the application need not worry about what
6118 dimensions the border or title bar have when trying to fit the window
6119 around panel items, for example.
6121 return _core_
.Window_SetClientSize(*args
, **kwargs
)
6123 def SetClientSizeWH(*args
, **kwargs
):
6125 SetClientSizeWH(self, int width, int height)
6127 This sets the size of the window client area in pixels. Using this
6128 function to size a window tends to be more device-independent than
6129 wx.Window.SetSize, since the application need not worry about what
6130 dimensions the border or title bar have when trying to fit the window
6131 around panel items, for example.
6133 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
6135 def SetClientRect(*args
, **kwargs
):
6137 SetClientRect(self, Rect rect)
6139 This sets the size of the window client area in pixels. Using this
6140 function to size a window tends to be more device-independent than
6141 wx.Window.SetSize, since the application need not worry about what
6142 dimensions the border or title bar have when trying to fit the window
6143 around panel items, for example.
6145 return _core_
.Window_SetClientRect(*args
, **kwargs
)
6147 def GetPosition(*args
, **kwargs
):
6149 GetPosition(self) -> Point
6151 Get the window's position.
6153 return _core_
.Window_GetPosition(*args
, **kwargs
)
6155 def GetPositionTuple(*args
, **kwargs
):
6157 GetPositionTuple() -> (x,y)
6159 Get the window's position.
6161 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
6163 def GetSize(*args
, **kwargs
):
6165 GetSize(self) -> Size
6167 Get the window size.
6169 return _core_
.Window_GetSize(*args
, **kwargs
)
6171 def GetSizeTuple(*args
, **kwargs
):
6173 GetSizeTuple() -> (width, height)
6175 Get the window size.
6177 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
6179 def GetRect(*args
, **kwargs
):
6181 GetRect(self) -> Rect
6183 Returns the size and position of the window as a wx.Rect object.
6185 return _core_
.Window_GetRect(*args
, **kwargs
)
6187 def GetClientSize(*args
, **kwargs
):
6189 GetClientSize(self) -> Size
6191 This gets the size of the window's 'client area' in pixels. The client
6192 area is the area which may be drawn on by the programmer, excluding
6193 title bar, border, scrollbars, etc.
6195 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6197 def GetClientSizeTuple(*args
, **kwargs
):
6199 GetClientSizeTuple() -> (width, height)
6201 This gets the size of the window's 'client area' in pixels. The client
6202 area is the area which may be drawn on by the programmer, excluding
6203 title bar, border, scrollbars, etc.
6205 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6207 def GetClientAreaOrigin(*args
, **kwargs
):
6209 GetClientAreaOrigin(self) -> Point
6211 Get the origin of the client area of the window relative to the
6212 window's top left corner (the client area may be shifted because of
6213 the borders, scrollbars, other decorations...)
6215 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6217 def GetClientRect(*args
, **kwargs
):
6219 GetClientRect(self) -> Rect
6221 Get the client area position and size as a `wx.Rect` object.
6223 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6225 def GetBestSize(*args
, **kwargs
):
6227 GetBestSize(self) -> Size
6229 This function returns the best acceptable minimal size for the
6230 window, if applicable. For example, for a static text control, it will
6231 be the minimal size such that the control label is not truncated. For
6232 windows containing subwindows (suzh aswx.Panel), the size returned by
6233 this function will be the same as the size the window would have had
6236 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6238 def GetBestSizeTuple(*args
, **kwargs
):
6240 GetBestSizeTuple() -> (width, height)
6242 This function returns the best acceptable minimal size for the
6243 window, if applicable. For example, for a static text control, it will
6244 be the minimal size such that the control label is not truncated. For
6245 windows containing subwindows (suzh aswx.Panel), the size returned by
6246 this function will be the same as the size the window would have had
6249 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6251 def InvalidateBestSize(*args
, **kwargs
):
6253 InvalidateBestSize(self)
6255 Reset the cached best size value so it will be recalculated the next
6258 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6260 def GetBestFittingSize(*args
, **kwargs
):
6262 GetBestFittingSize(self) -> Size
6264 This function will merge the window's best size into the window's
6265 minimum size, giving priority to the min size components, and returns
6269 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6271 def GetAdjustedBestSize(*args
, **kwargs
):
6273 GetAdjustedBestSize(self) -> Size
6275 This method is similar to GetBestSize, except in one
6276 thing. GetBestSize should return the minimum untruncated size of the
6277 window, while this method will return the largest of BestSize and any
6278 user specified minimum size. ie. it is the minimum size the window
6279 should currently be drawn at, not the minimal size it can possibly
6282 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6284 def Center(*args
, **kwargs
):
6286 Center(self, int direction=BOTH)
6288 Centers the window. The parameter specifies the direction for
6289 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6290 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6291 on the entire screen and not on its parent window. If it is a
6292 top-level window and has no parent then it will always be centered
6293 relative to the screen.
6295 return _core_
.Window_Center(*args
, **kwargs
)
6298 def CenterOnScreen(*args
, **kwargs
):
6300 CenterOnScreen(self, int dir=BOTH)
6302 Center on screen (only works for top level windows)
6304 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6306 CentreOnScreen
= CenterOnScreen
6307 def CenterOnParent(*args
, **kwargs
):
6309 CenterOnParent(self, int dir=BOTH)
6311 Center with respect to the the parent window
6313 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6315 CentreOnParent
= CenterOnParent
6316 def Fit(*args
, **kwargs
):
6320 Sizes the window so that it fits around its subwindows. This function
6321 won't do anything if there are no subwindows and will only really work
6322 correctly if sizers are used for the subwindows layout. Also, if the
6323 window has exactly one subwindow it is better (faster and the result
6324 is more precise as Fit adds some margin to account for fuzziness of
6325 its calculations) to call window.SetClientSize(child.GetSize())
6326 instead of calling Fit.
6328 return _core_
.Window_Fit(*args
, **kwargs
)
6330 def FitInside(*args
, **kwargs
):
6334 Similar to Fit, but sizes the interior (virtual) size of a
6335 window. Mainly useful with scrolled windows to reset scrollbars after
6336 sizing changes that do not trigger a size event, and/or scrolled
6337 windows without an interior sizer. This function similarly won't do
6338 anything if there are no subwindows.
6340 return _core_
.Window_FitInside(*args
, **kwargs
)
6342 def SetSizeHints(*args
, **kwargs
):
6344 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6347 Allows specification of minimum and maximum window sizes, and window
6348 size increments. If a pair of values is not set (or set to -1), the
6349 default values will be used. If this function is called, the user
6350 will not be able to size the window outside the given bounds (if it is
6351 a top-level window.) Sizers will also inspect the minimum window size
6352 and will use that value if set when calculating layout.
6354 The resizing increments are only significant under Motif or Xt.
6356 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
6358 def SetSizeHintsSz(*args
, **kwargs
):
6360 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6362 Allows specification of minimum and maximum window sizes, and window
6363 size increments. If a pair of values is not set (or set to -1), the
6364 default values will be used. If this function is called, the user
6365 will not be able to size the window outside the given bounds (if it is
6366 a top-level window.) Sizers will also inspect the minimum window size
6367 and will use that value if set when calculating layout.
6369 The resizing increments are only significant under Motif or Xt.
6371 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
6373 def SetVirtualSizeHints(*args
, **kwargs
):
6375 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6377 Allows specification of minimum and maximum virtual window sizes. If a
6378 pair of values is not set (or set to -1), the default values will be
6379 used. If this function is called, the user will not be able to size
6380 the virtual area of the window outside the given bounds.
6382 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
6384 def SetVirtualSizeHintsSz(*args
, **kwargs
):
6386 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6388 Allows specification of minimum and maximum virtual window sizes. If a
6389 pair of values is not set (or set to -1), the default values will be
6390 used. If this function is called, the user will not be able to size
6391 the virtual area of the window outside the given bounds.
6393 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
6395 def GetMaxSize(*args
, **kwargs
):
6396 """GetMaxSize(self) -> Size"""
6397 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
6399 def GetMinSize(*args
, **kwargs
):
6400 """GetMinSize(self) -> Size"""
6401 return _core_
.Window_GetMinSize(*args
, **kwargs
)
6403 def SetMinSize(*args
, **kwargs
):
6405 SetMinSize(self, Size minSize)
6407 A more convenient method than `SetSizeHints` for setting just the
6410 return _core_
.Window_SetMinSize(*args
, **kwargs
)
6412 def SetMaxSize(*args
, **kwargs
):
6414 SetMaxSize(self, Size maxSize)
6416 A more convenient method than `SetSizeHints` for setting just the
6419 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
6421 def GetMinWidth(*args
, **kwargs
):
6422 """GetMinWidth(self) -> int"""
6423 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
6425 def GetMinHeight(*args
, **kwargs
):
6426 """GetMinHeight(self) -> int"""
6427 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
6429 def GetMaxWidth(*args
, **kwargs
):
6430 """GetMaxWidth(self) -> int"""
6431 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
6433 def GetMaxHeight(*args
, **kwargs
):
6434 """GetMaxHeight(self) -> int"""
6435 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
6437 def SetVirtualSize(*args
, **kwargs
):
6439 SetVirtualSize(self, Size size)
6441 Set the the virtual size of a window in pixels. For most windows this
6442 is just the client area of the window, but for some like scrolled
6443 windows it is more or less independent of the screen window size.
6445 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
6447 def SetVirtualSizeWH(*args
, **kwargs
):
6449 SetVirtualSizeWH(self, int w, int h)
6451 Set the the virtual size of a window in pixels. For most windows this
6452 is just the client area of the window, but for some like scrolled
6453 windows it is more or less independent of the screen window size.
6455 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
6457 def GetVirtualSize(*args
, **kwargs
):
6459 GetVirtualSize(self) -> Size
6461 Get the the virtual size of the window in pixels. For most windows
6462 this is just the client area of the window, but for some like scrolled
6463 windows it is more or less independent of the screen window size.
6465 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
6467 def GetVirtualSizeTuple(*args
, **kwargs
):
6469 GetVirtualSizeTuple() -> (width, height)
6471 Get the the virtual size of the window in pixels. For most windows
6472 this is just the client area of the window, but for some like scrolled
6473 windows it is more or less independent of the screen window size.
6475 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
6477 def GetBestVirtualSize(*args
, **kwargs
):
6479 GetBestVirtualSize(self) -> Size
6481 Return the largest of ClientSize and BestSize (as determined by a
6482 sizer, interior children, or other means)
6484 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
6486 def Show(*args
, **kwargs
):
6488 Show(self, bool show=True) -> bool
6490 Shows or hides the window. You may need to call Raise for a top level
6491 window if you want to bring it to top, although this is not needed if
6492 Show is called immediately after the frame creation. Returns True if
6493 the window has been shown or hidden or False if nothing was done
6494 because it already was in the requested state.
6496 return _core_
.Window_Show(*args
, **kwargs
)
6498 def Hide(*args
, **kwargs
):
6502 Equivalent to calling Show(False).
6504 return _core_
.Window_Hide(*args
, **kwargs
)
6506 def Enable(*args
, **kwargs
):
6508 Enable(self, bool enable=True) -> bool
6510 Enable or disable the window for user input. Note that when a parent
6511 window is disabled, all of its children are disabled as well and they
6512 are reenabled again when the parent is. Returns true if the window
6513 has been enabled or disabled, false if nothing was done, i.e. if the
6514 window had already been in the specified state.
6516 return _core_
.Window_Enable(*args
, **kwargs
)
6518 def Disable(*args
, **kwargs
):
6520 Disable(self) -> bool
6522 Disables the window, same as Enable(false).
6524 return _core_
.Window_Disable(*args
, **kwargs
)
6526 def IsShown(*args
, **kwargs
):
6528 IsShown(self) -> bool
6530 Returns true if the window is shown, false if it has been hidden.
6532 return _core_
.Window_IsShown(*args
, **kwargs
)
6534 def IsEnabled(*args
, **kwargs
):
6536 IsEnabled(self) -> bool
6538 Returns true if the window is enabled for input, false otherwise.
6540 return _core_
.Window_IsEnabled(*args
, **kwargs
)
6542 def SetWindowStyleFlag(*args
, **kwargs
):
6544 SetWindowStyleFlag(self, long style)
6546 Sets the style of the window. Please note that some styles cannot be
6547 changed after the window creation and that Refresh() might need to be
6548 called after changing the others for the change to take place
6551 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
6553 def GetWindowStyleFlag(*args
, **kwargs
):
6555 GetWindowStyleFlag(self) -> long
6557 Gets the window style that was passed to the constructor or Create
6560 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
6562 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
6563 def HasFlag(*args
, **kwargs
):
6565 HasFlag(self, int flag) -> bool
6567 Test if the given style is set for this window.
6569 return _core_
.Window_HasFlag(*args
, **kwargs
)
6571 def IsRetained(*args
, **kwargs
):
6573 IsRetained(self) -> bool
6575 Returns true if the window is retained, false otherwise. Retained
6576 windows are only available on X platforms.
6578 return _core_
.Window_IsRetained(*args
, **kwargs
)
6580 def SetExtraStyle(*args
, **kwargs
):
6582 SetExtraStyle(self, long exStyle)
6584 Sets the extra style bits for the window. Extra styles are the less
6585 often used style bits which can't be set with the constructor or with
6586 SetWindowStyleFlag()
6588 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
6590 def GetExtraStyle(*args
, **kwargs
):
6592 GetExtraStyle(self) -> long
6594 Returns the extra style bits for the window.
6596 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
6598 def MakeModal(*args
, **kwargs
):
6600 MakeModal(self, bool modal=True)
6602 Disables all other windows in the application so that the user can
6603 only interact with this window. Passing False will reverse this
6606 return _core_
.Window_MakeModal(*args
, **kwargs
)
6608 def SetThemeEnabled(*args
, **kwargs
):
6610 SetThemeEnabled(self, bool enableTheme)
6612 This function tells a window if it should use the system's "theme"
6613 code to draw the windows' background instead if its own background
6614 drawing code. This will only have an effect on platforms that support
6615 the notion of themes in user defined windows. One such platform is
6616 GTK+ where windows can have (very colourful) backgrounds defined by a
6617 user's selected theme.
6619 Dialogs, notebook pages and the status bar have this flag set to true
6620 by default so that the default look and feel is simulated best.
6622 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
6624 def GetThemeEnabled(*args
, **kwargs
):
6626 GetThemeEnabled(self) -> bool
6628 Return the themeEnabled flag.
6630 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
6632 def SetFocus(*args
, **kwargs
):
6636 Set's the focus to this window, allowing it to receive keyboard input.
6638 return _core_
.Window_SetFocus(*args
, **kwargs
)
6640 def SetFocusFromKbd(*args
, **kwargs
):
6642 SetFocusFromKbd(self)
6644 Set focus to this window as the result of a keyboard action. Normally
6645 only called internally.
6647 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
6649 def FindFocus(*args
, **kwargs
):
6651 FindFocus() -> Window
6653 Returns the window or control that currently has the keyboard focus,
6656 return _core_
.Window_FindFocus(*args
, **kwargs
)
6658 FindFocus
= staticmethod(FindFocus
)
6659 def AcceptsFocus(*args
, **kwargs
):
6661 AcceptsFocus(self) -> bool
6663 Can this window have focus?
6665 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
6667 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6669 AcceptsFocusFromKeyboard(self) -> bool
6671 Can this window be given focus by keyboard navigation? if not, the
6672 only way to give it focus (provided it accepts it at all) is to click
6675 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6677 def GetDefaultItem(*args
, **kwargs
):
6679 GetDefaultItem(self) -> Window
6681 Get the default child of this parent, i.e. the one which is activated
6682 by pressing <Enter> such as the OK button on a wx.Dialog.
6684 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
6686 def SetDefaultItem(*args
, **kwargs
):
6688 SetDefaultItem(self, Window child) -> Window
6690 Set this child as default, return the old default.
6692 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
6694 def SetTmpDefaultItem(*args
, **kwargs
):
6696 SetTmpDefaultItem(self, Window win)
6698 Set this child as temporary default
6700 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6702 def Navigate(*args
, **kwargs
):
6704 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6706 Does keyboard navigation from this window to another, by sending a
6707 `wx.NavigationKeyEvent`.
6709 return _core_
.Window_Navigate(*args
, **kwargs
)
6711 def MoveAfterInTabOrder(*args
, **kwargs
):
6713 MoveAfterInTabOrder(self, Window win)
6715 Moves this window in the tab navigation order after the specified
6716 sibling window. This means that when the user presses the TAB key on
6717 that other window, the focus switches to this window.
6719 The default tab order is the same as creation order. This function
6720 and `MoveBeforeInTabOrder` allow to change it after creating all the
6724 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
6726 def MoveBeforeInTabOrder(*args
, **kwargs
):
6728 MoveBeforeInTabOrder(self, Window win)
6730 Same as `MoveAfterInTabOrder` except that it inserts this window just
6731 before win instead of putting it right after it.
6733 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
6735 def GetChildren(*args
, **kwargs
):
6737 GetChildren(self) -> PyObject
6739 Returns a list of the window's children. NOTE: Currently this is a
6740 copy of the child window list maintained by the window, so the return
6741 value of this function is only valid as long as the window's children
6744 return _core_
.Window_GetChildren(*args
, **kwargs
)
6746 def GetParent(*args
, **kwargs
):
6748 GetParent(self) -> Window
6750 Returns the parent window of this window, or None if there isn't one.
6752 return _core_
.Window_GetParent(*args
, **kwargs
)
6754 def GetGrandParent(*args
, **kwargs
):
6756 GetGrandParent(self) -> Window
6758 Returns the parent of the parent of this window, or None if there
6761 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
6763 def IsTopLevel(*args
, **kwargs
):
6765 IsTopLevel(self) -> bool
6767 Returns true if the given window is a top-level one. Currently all
6768 frames and dialogs are always considered to be top-level windows (even
6769 if they have a parent window).
6771 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
6773 def Reparent(*args
, **kwargs
):
6775 Reparent(self, Window newParent) -> bool
6777 Reparents the window, i.e the window will be removed from its current
6778 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6779 re-inserted into another. Available on Windows and GTK. Returns True
6780 if the parent was changed, False otherwise (error or newParent ==
6783 return _core_
.Window_Reparent(*args
, **kwargs
)
6785 def AddChild(*args
, **kwargs
):
6787 AddChild(self, Window child)
6789 Adds a child window. This is called automatically by window creation
6790 functions so should not be required by the application programmer.
6792 return _core_
.Window_AddChild(*args
, **kwargs
)
6794 def RemoveChild(*args
, **kwargs
):
6796 RemoveChild(self, Window child)
6798 Removes a child window. This is called automatically by window
6799 deletion functions so should not be required by the application
6802 return _core_
.Window_RemoveChild(*args
, **kwargs
)
6804 def FindWindowById(*args
, **kwargs
):
6806 FindWindowById(self, long winid) -> Window
6808 Find a chld of this window by window ID
6810 return _core_
.Window_FindWindowById(*args
, **kwargs
)
6812 def FindWindowByName(*args
, **kwargs
):
6814 FindWindowByName(self, String name) -> Window
6816 Find a child of this window by name
6818 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
6820 def GetEventHandler(*args
, **kwargs
):
6822 GetEventHandler(self) -> EvtHandler
6824 Returns the event handler for this window. By default, the window is
6825 its own event handler.
6827 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
6829 def SetEventHandler(*args
, **kwargs
):
6831 SetEventHandler(self, EvtHandler handler)
6833 Sets the event handler for this window. An event handler is an object
6834 that is capable of processing the events sent to a window. By default,
6835 the window is its own event handler, but an application may wish to
6836 substitute another, for example to allow central implementation of
6837 event-handling for a variety of different window classes.
6839 It is usually better to use `wx.Window.PushEventHandler` since this sets
6840 up a chain of event handlers, where an event not handled by one event
6841 handler is handed to the next one in the chain.
6843 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
6845 def PushEventHandler(*args
, **kwargs
):
6847 PushEventHandler(self, EvtHandler handler)
6849 Pushes this event handler onto the event handler stack for the window.
6850 An event handler is an object that is capable of processing the events
6851 sent to a window. By default, the window is its own event handler, but
6852 an application may wish to substitute another, for example to allow
6853 central implementation of event-handling for a variety of different
6856 wx.Window.PushEventHandler allows an application to set up a chain of
6857 event handlers, where an event not handled by one event handler is
6858 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6859 remove the event handler.
6861 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
6863 def PopEventHandler(*args
, **kwargs
):
6865 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6867 Removes and returns the top-most event handler on the event handler
6868 stack. If deleteHandler is True then the wx.EvtHandler object will be
6869 destroyed after it is popped.
6871 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
6873 def RemoveEventHandler(*args
, **kwargs
):
6875 RemoveEventHandler(self, EvtHandler handler) -> bool
6877 Find the given handler in the event handler chain and remove (but not
6878 delete) it from the event handler chain, return True if it was found
6879 and False otherwise (this also results in an assert failure so this
6880 function should only be called when the handler is supposed to be
6883 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
6885 def SetValidator(*args
, **kwargs
):
6887 SetValidator(self, Validator validator)
6889 Deletes the current validator (if any) and sets the window validator,
6890 having called wx.Validator.Clone to create a new validator of this
6893 return _core_
.Window_SetValidator(*args
, **kwargs
)
6895 def GetValidator(*args
, **kwargs
):
6897 GetValidator(self) -> Validator
6899 Returns a pointer to the current validator for the window, or None if
6902 return _core_
.Window_GetValidator(*args
, **kwargs
)
6904 def Validate(*args
, **kwargs
):
6906 Validate(self) -> bool
6908 Validates the current values of the child controls using their
6909 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6910 style flag set, the method will also call Validate() of all child
6911 windows. Returns false if any of the validations failed.
6913 return _core_
.Window_Validate(*args
, **kwargs
)
6915 def TransferDataToWindow(*args
, **kwargs
):
6917 TransferDataToWindow(self) -> bool
6919 Transfers values to child controls from data areas specified by their
6920 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6921 style flag set, the method will also call TransferDataToWindow() of
6924 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
6926 def TransferDataFromWindow(*args
, **kwargs
):
6928 TransferDataFromWindow(self) -> bool
6930 Transfers values from child controls to data areas specified by their
6931 validators. Returns false if a transfer failed. If the window has
6932 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6933 also call TransferDataFromWindow() of all child windows.
6935 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
6937 def InitDialog(*args
, **kwargs
):
6941 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6942 to the dialog via validators.
6944 return _core_
.Window_InitDialog(*args
, **kwargs
)
6946 def SetAcceleratorTable(*args
, **kwargs
):
6948 SetAcceleratorTable(self, AcceleratorTable accel)
6950 Sets the accelerator table for this window.
6952 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
6954 def GetAcceleratorTable(*args
, **kwargs
):
6956 GetAcceleratorTable(self) -> AcceleratorTable
6958 Gets the accelerator table for this window.
6960 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
6962 def RegisterHotKey(*args
, **kwargs
):
6964 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6966 Registers a system wide hotkey. Every time the user presses the hotkey
6967 registered here, this window will receive a hotkey event. It will
6968 receive the event even if the application is in the background and
6969 does not have the input focus because the user is working with some
6970 other application. To bind an event handler function to this hotkey
6971 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6972 hotkey was registered successfully.
6974 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
6976 def UnregisterHotKey(*args
, **kwargs
):
6978 UnregisterHotKey(self, int hotkeyId) -> bool
6980 Unregisters a system wide hotkey.
6982 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
6984 def ConvertDialogPointToPixels(*args
, **kwargs
):
6986 ConvertDialogPointToPixels(self, Point pt) -> Point
6988 Converts a point or size from dialog units to pixels. Dialog units
6989 are used for maintaining a dialog's proportions even if the font
6990 changes. For the x dimension, the dialog units are multiplied by the
6991 average character width and then divided by 4. For the y dimension,
6992 the dialog units are multiplied by the average character height and
6995 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
6997 def ConvertDialogSizeToPixels(*args
, **kwargs
):
6999 ConvertDialogSizeToPixels(self, Size sz) -> Size
7001 Converts a point or size from dialog units to pixels. Dialog units
7002 are used for maintaining a dialog's proportions even if the font
7003 changes. For the x dimension, the dialog units are multiplied by the
7004 average character width and then divided by 4. For the y dimension,
7005 the dialog units are multiplied by the average character height and
7008 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
7010 def DLG_PNT(*args
, **kwargs
):
7012 DLG_PNT(self, Point pt) -> Point
7014 Converts a point or size from dialog units to pixels. Dialog units
7015 are used for maintaining a dialog's proportions even if the font
7016 changes. For the x dimension, the dialog units are multiplied by the
7017 average character width and then divided by 4. For the y dimension,
7018 the dialog units are multiplied by the average character height and
7021 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
7023 def DLG_SZE(*args
, **kwargs
):
7025 DLG_SZE(self, Size sz) -> Size
7027 Converts a point or size from dialog units to pixels. Dialog units
7028 are used for maintaining a dialog's proportions even if the font
7029 changes. For the x dimension, the dialog units are multiplied by the
7030 average character width and then divided by 4. For the y dimension,
7031 the dialog units are multiplied by the average character height and
7034 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
7036 def ConvertPixelPointToDialog(*args
, **kwargs
):
7037 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7038 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
7040 def ConvertPixelSizeToDialog(*args
, **kwargs
):
7041 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7042 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
7044 def WarpPointer(*args
, **kwargs
):
7046 WarpPointer(self, int x, int y)
7048 Moves the pointer to the given position on the window.
7050 NOTE: This function is not supported under Mac because Apple Human
7051 Interface Guidelines forbid moving the mouse cursor programmatically.
7053 return _core_
.Window_WarpPointer(*args
, **kwargs
)
7055 def CaptureMouse(*args
, **kwargs
):
7059 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7060 release the capture.
7062 Note that wxWindows maintains the stack of windows having captured the
7063 mouse and when the mouse is released the capture returns to the window
7064 which had had captured it previously and it is only really released if
7065 there were no previous window. In particular, this means that you must
7066 release the mouse as many times as you capture it.
7068 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
7070 def ReleaseMouse(*args
, **kwargs
):
7074 Releases mouse input captured with wx.Window.CaptureMouse.
7076 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
7078 def GetCapture(*args
, **kwargs
):
7080 GetCapture() -> Window
7082 Returns the window which currently captures the mouse or None
7084 return _core_
.Window_GetCapture(*args
, **kwargs
)
7086 GetCapture
= staticmethod(GetCapture
)
7087 def HasCapture(*args
, **kwargs
):
7089 HasCapture(self) -> bool
7091 Returns true if this window has the current mouse capture.
7093 return _core_
.Window_HasCapture(*args
, **kwargs
)
7095 def Refresh(*args
, **kwargs
):
7097 Refresh(self, bool eraseBackground=True, Rect rect=None)
7099 Mark the specified rectangle (or the whole window) as "dirty" so it
7100 will be repainted. Causes an EVT_PAINT event to be generated and sent
7103 return _core_
.Window_Refresh(*args
, **kwargs
)
7105 def RefreshRect(*args
, **kwargs
):
7107 RefreshRect(self, Rect rect)
7109 Redraws the contents of the given rectangle: the area inside it will
7110 be repainted. This is the same as Refresh but has a nicer syntax.
7112 return _core_
.Window_RefreshRect(*args
, **kwargs
)
7114 def Update(*args
, **kwargs
):
7118 Calling this method immediately repaints the invalidated area of the
7119 window instead of waiting for the EVT_PAINT event to happen, (normally
7120 this would usually only happen when the flow of control returns to the
7121 event loop.) Notice that this function doesn't refresh the window and
7122 does nothing if the window has been already repainted. Use Refresh
7123 first if you want to immediately redraw the window (or some portion of
7124 it) unconditionally.
7126 return _core_
.Window_Update(*args
, **kwargs
)
7128 def ClearBackground(*args
, **kwargs
):
7130 ClearBackground(self)
7132 Clears the window by filling it with the current background
7133 colour. Does not cause an erase background event to be generated.
7135 return _core_
.Window_ClearBackground(*args
, **kwargs
)
7137 def Freeze(*args
, **kwargs
):
7141 Freezes the window or, in other words, prevents any updates from
7142 taking place on screen, the window is not redrawn at all. Thaw must be
7143 called to reenable window redrawing. Calls to Freeze/Thaw may be
7144 nested, with the actual Thaw being delayed until all the nesting has
7147 This method is useful for visual appearance optimization (for example,
7148 it is a good idea to use it before inserting large amount of text into
7149 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7150 for all controls so it is mostly just a hint to wxWindows and not a
7151 mandatory directive.
7153 return _core_
.Window_Freeze(*args
, **kwargs
)
7155 def Thaw(*args
, **kwargs
):
7159 Reenables window updating after a previous call to Freeze. Calls to
7160 Freeze/Thaw may be nested, so Thaw must be called the same number of
7161 times that Freeze was before the window will be updated.
7163 return _core_
.Window_Thaw(*args
, **kwargs
)
7165 def PrepareDC(*args
, **kwargs
):
7167 PrepareDC(self, DC dc)
7169 Call this function to prepare the device context for drawing a
7170 scrolled image. It sets the device origin according to the current
7173 return _core_
.Window_PrepareDC(*args
, **kwargs
)
7175 def GetUpdateRegion(*args
, **kwargs
):
7177 GetUpdateRegion(self) -> Region
7179 Returns the region specifying which parts of the window have been
7180 damaged. Should only be called within an EVT_PAINT handler.
7182 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
7184 def GetUpdateClientRect(*args
, **kwargs
):
7186 GetUpdateClientRect(self) -> Rect
7188 Get the update rectangle region bounding box in client coords.
7190 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7192 def IsExposed(*args
, **kwargs
):
7194 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7196 Returns true if the given point or rectangle area has been exposed
7197 since the last repaint. Call this in an paint event handler to
7198 optimize redrawing by only redrawing those areas, which have been
7201 return _core_
.Window_IsExposed(*args
, **kwargs
)
7203 def IsExposedPoint(*args
, **kwargs
):
7205 IsExposedPoint(self, Point pt) -> bool
7207 Returns true if the given point or rectangle area has been exposed
7208 since the last repaint. Call this in an paint event handler to
7209 optimize redrawing by only redrawing those areas, which have been
7212 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7214 def IsExposedRect(*args
, **kwargs
):
7216 IsExposedRect(self, Rect rect) -> bool
7218 Returns true if the given point or rectangle area has been exposed
7219 since the last repaint. Call this in an paint event handler to
7220 optimize redrawing by only redrawing those areas, which have been
7223 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7225 def GetDefaultAttributes(*args
, **kwargs
):
7227 GetDefaultAttributes(self) -> VisualAttributes
7229 Get the default attributes for an instance of this class. This is
7230 useful if you want to use the same font or colour in your own control
7231 as in a standard control -- which is a much better idea than hard
7232 coding specific colours or fonts which might look completely out of
7233 place on the user's system, especially if it uses themes.
7235 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7237 def GetClassDefaultAttributes(*args
, **kwargs
):
7239 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7241 Get the default attributes for this class. This is useful if you want
7242 to use the same font or colour in your own control as in a standard
7243 control -- which is a much better idea than hard coding specific
7244 colours or fonts which might look completely out of place on the
7245 user's system, especially if it uses themes.
7247 The variant parameter is only relevant under Mac currently and is
7248 ignore under other platforms. Under Mac, it will change the size of
7249 the returned font. See `wx.Window.SetWindowVariant` for more about
7252 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7254 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7255 def SetBackgroundColour(*args
, **kwargs
):
7257 SetBackgroundColour(self, Colour colour) -> bool
7259 Sets the background colour of the window. Returns True if the colour
7260 was changed. The background colour is usually painted by the default
7261 EVT_ERASE_BACKGROUND event handler function under Windows and
7262 automatically under GTK. Using `wx.NullColour` will reset the window
7263 to the default background colour.
7265 Note that setting the background colour may not cause an immediate
7266 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7267 calling this function.
7269 Using this function will disable attempts to use themes for this
7270 window, if the system supports them. Use with care since usually the
7271 themes represent the appearance chosen by the user to be used for all
7272 applications on the system.
7274 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7276 def SetOwnBackgroundColour(*args
, **kwargs
):
7277 """SetOwnBackgroundColour(self, Colour colour)"""
7278 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7280 def SetForegroundColour(*args
, **kwargs
):
7282 SetForegroundColour(self, Colour colour) -> bool
7284 Sets the foreground colour of the window. Returns True is the colour
7285 was changed. The interpretation of foreground colour is dependent on
7286 the window class; it may be the text colour or other colour, or it may
7289 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7291 def SetOwnForegroundColour(*args
, **kwargs
):
7292 """SetOwnForegroundColour(self, Colour colour)"""
7293 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7295 def GetBackgroundColour(*args
, **kwargs
):
7297 GetBackgroundColour(self) -> Colour
7299 Returns the background colour of the window.
7301 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7303 def GetForegroundColour(*args
, **kwargs
):
7305 GetForegroundColour(self) -> Colour
7307 Returns the foreground colour of the window. The interpretation of
7308 foreground colour is dependent on the window class; it may be the text
7309 colour or other colour, or it may not be used at all.
7311 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7313 def SetBackgroundStyle(*args
, **kwargs
):
7315 SetBackgroundStyle(self, int style) -> bool
7317 Returns the background style of the window. The background style
7318 indicates how the background of the window is drawn.
7320 ====================== ========================================
7321 wx.BG_STYLE_SYSTEM The background colour or pattern should
7322 be determined by the system
7323 wx.BG_STYLE_COLOUR The background should be a solid colour
7324 wx.BG_STYLE_CUSTOM The background will be implemented by the
7326 ====================== ========================================
7328 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7329 a custom background, such as a tiled bitmap. Currently the style has
7330 no effect on other platforms.
7332 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7334 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
7336 def GetBackgroundStyle(*args
, **kwargs
):
7338 GetBackgroundStyle(self) -> int
7340 Returns the background style of the window.
7342 :see: `SetBackgroundStyle`
7344 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
7346 def HasTransparentBackground(*args
, **kwargs
):
7348 HasTransparentBackground(self) -> bool
7350 Returns True if this window's background is transparent (as, for
7351 example, for `wx.StaticText`) and should show the parent window's
7354 This method is mostly used internally by the library itself and you
7355 normally shouldn't have to call it. You may, however, have to override
7356 it in your custom control classes to ensure that background is painted
7359 return _core_
.Window_HasTransparentBackground(*args
, **kwargs
)
7361 def SetCursor(*args
, **kwargs
):
7363 SetCursor(self, Cursor cursor) -> bool
7365 Sets the window's cursor. Notice that the window cursor also sets it
7366 for the children of the window implicitly.
7368 The cursor may be wx.NullCursor in which case the window cursor will
7369 be reset back to default.
7371 return _core_
.Window_SetCursor(*args
, **kwargs
)
7373 def GetCursor(*args
, **kwargs
):
7375 GetCursor(self) -> Cursor
7377 Return the cursor associated with this window.
7379 return _core_
.Window_GetCursor(*args
, **kwargs
)
7381 def SetFont(*args
, **kwargs
):
7383 SetFont(self, Font font) -> bool
7385 Sets the font for this window.
7387 return _core_
.Window_SetFont(*args
, **kwargs
)
7389 def SetOwnFont(*args
, **kwargs
):
7390 """SetOwnFont(self, Font font)"""
7391 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
7393 def GetFont(*args
, **kwargs
):
7395 GetFont(self) -> Font
7397 Returns the default font used for this window.
7399 return _core_
.Window_GetFont(*args
, **kwargs
)
7401 def SetCaret(*args
, **kwargs
):
7403 SetCaret(self, Caret caret)
7405 Sets the caret associated with the window.
7407 return _core_
.Window_SetCaret(*args
, **kwargs
)
7409 def GetCaret(*args
, **kwargs
):
7411 GetCaret(self) -> Caret
7413 Returns the caret associated with the window.
7415 return _core_
.Window_GetCaret(*args
, **kwargs
)
7417 def GetCharHeight(*args
, **kwargs
):
7419 GetCharHeight(self) -> int
7421 Get the (average) character size for the current font.
7423 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
7425 def GetCharWidth(*args
, **kwargs
):
7427 GetCharWidth(self) -> int
7429 Get the (average) character size for the current font.
7431 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
7433 def GetTextExtent(*args
, **kwargs
):
7435 GetTextExtent(String string) -> (width, height)
7437 Get the width and height of the text using the current font.
7439 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
7441 def GetFullTextExtent(*args
, **kwargs
):
7443 GetFullTextExtent(String string, Font font=None) ->
7444 (width, height, descent, externalLeading)
7446 Get the width, height, decent and leading of the text using the
7447 current or specified font.
7449 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
7451 def ClientToScreenXY(*args
, **kwargs
):
7453 ClientToScreenXY(int x, int y) -> (x,y)
7455 Converts to screen coordinates from coordinates relative to this window.
7457 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
7459 def ScreenToClientXY(*args
, **kwargs
):
7461 ScreenToClientXY(int x, int y) -> (x,y)
7463 Converts from screen to client window coordinates.
7465 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
7467 def ClientToScreen(*args
, **kwargs
):
7469 ClientToScreen(self, Point pt) -> Point
7471 Converts to screen coordinates from coordinates relative to this window.
7473 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
7475 def ScreenToClient(*args
, **kwargs
):
7477 ScreenToClient(self, Point pt) -> Point
7479 Converts from screen to client window coordinates.
7481 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
7483 def HitTestXY(*args
, **kwargs
):
7485 HitTestXY(self, int x, int y) -> int
7487 Test where the given (in client coords) point lies
7489 return _core_
.Window_HitTestXY(*args
, **kwargs
)
7491 def HitTest(*args
, **kwargs
):
7493 HitTest(self, Point pt) -> int
7495 Test where the given (in client coords) point lies
7497 return _core_
.Window_HitTest(*args
, **kwargs
)
7499 def GetBorder(*args
):
7501 GetBorder(self, long flags) -> int
7502 GetBorder(self) -> int
7504 Get border for the flags of this window
7506 return _core_
.Window_GetBorder(*args
)
7508 def UpdateWindowUI(*args
, **kwargs
):
7510 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7512 This function sends EVT_UPDATE_UI events to the window. The particular
7513 implementation depends on the window; for example a wx.ToolBar will
7514 send an update UI event for each toolbar button, and a wx.Frame will
7515 send an update UI event for each menubar menu item. You can call this
7516 function from your application to ensure that your UI is up-to-date at
7517 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7518 concerned). This may be necessary if you have called
7519 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7520 limit the overhead that wxWindows incurs by sending update UI events
7523 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
7525 def PopupMenuXY(*args
, **kwargs
):
7527 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7529 Pops up the given menu at the specified coordinates, relative to this window,
7530 and returns control when the user has dismissed the menu. If a menu item is
7531 selected, the corresponding menu event is generated and will be processed as
7532 usual. If the default position is given then the current position of the
7533 mouse cursor will be used.
7535 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
7537 def PopupMenu(*args
, **kwargs
):
7539 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7541 Pops up the given menu at the specified coordinates, relative to this window,
7542 and returns control when the user has dismissed the menu. If a menu item is
7543 selected, the corresponding menu event is generated and will be processed as
7544 usual. If the default position is given then the current position of the
7545 mouse cursor will be used.
7547 return _core_
.Window_PopupMenu(*args
, **kwargs
)
7549 def GetHandle(*args
, **kwargs
):
7551 GetHandle(self) -> long
7553 Returns the platform-specific handle (as a long integer) of the
7554 physical window. Currently on wxMac it returns the handle of the
7555 toplevel parent of the window.
7557 return _core_
.Window_GetHandle(*args
, **kwargs
)
7559 def AssociateHandle(*args
, **kwargs
):
7561 AssociateHandle(self, long handle)
7563 Associate the window with a new native handle
7565 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
7567 def DissociateHandle(*args
, **kwargs
):
7569 DissociateHandle(self)
7571 Dissociate the current native handle from the window
7573 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
7575 def HasScrollbar(*args
, **kwargs
):
7577 HasScrollbar(self, int orient) -> bool
7579 Does the window have the scrollbar for this orientation?
7581 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
7583 def SetScrollbar(*args
, **kwargs
):
7585 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7588 Sets the scrollbar properties of a built-in scrollbar.
7590 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
7592 def SetScrollPos(*args
, **kwargs
):
7594 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7596 Sets the position of one of the built-in scrollbars.
7598 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
7600 def GetScrollPos(*args
, **kwargs
):
7602 GetScrollPos(self, int orientation) -> int
7604 Returns the built-in scrollbar position.
7606 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
7608 def GetScrollThumb(*args
, **kwargs
):
7610 GetScrollThumb(self, int orientation) -> int
7612 Returns the built-in scrollbar thumb size.
7614 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
7616 def GetScrollRange(*args
, **kwargs
):
7618 GetScrollRange(self, int orientation) -> int
7620 Returns the built-in scrollbar range.
7622 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
7624 def ScrollWindow(*args
, **kwargs
):
7626 ScrollWindow(self, int dx, int dy, Rect rect=None)
7628 Physically scrolls the pixels in the window and move child windows
7629 accordingly. Use this function to optimise your scrolling
7630 implementations, to minimise the area that must be redrawn. Note that
7631 it is rarely required to call this function from a user program.
7633 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
7635 def ScrollLines(*args
, **kwargs
):
7637 ScrollLines(self, int lines) -> bool
7639 If the platform and window class supports it, scrolls the window by
7640 the given number of lines down, if lines is positive, or up if lines
7641 is negative. Returns True if the window was scrolled, False if it was
7642 already on top/bottom and nothing was done.
7644 return _core_
.Window_ScrollLines(*args
, **kwargs
)
7646 def ScrollPages(*args
, **kwargs
):
7648 ScrollPages(self, int pages) -> bool
7650 If the platform and window class supports it, scrolls the window by
7651 the given number of pages down, if pages is positive, or up if pages
7652 is negative. Returns True if the window was scrolled, False if it was
7653 already on top/bottom and nothing was done.
7655 return _core_
.Window_ScrollPages(*args
, **kwargs
)
7657 def LineUp(*args
, **kwargs
):
7659 LineUp(self) -> bool
7661 This is just a wrapper for ScrollLines(-1).
7663 return _core_
.Window_LineUp(*args
, **kwargs
)
7665 def LineDown(*args
, **kwargs
):
7667 LineDown(self) -> bool
7669 This is just a wrapper for ScrollLines(1).
7671 return _core_
.Window_LineDown(*args
, **kwargs
)
7673 def PageUp(*args
, **kwargs
):
7675 PageUp(self) -> bool
7677 This is just a wrapper for ScrollPages(-1).
7679 return _core_
.Window_PageUp(*args
, **kwargs
)
7681 def PageDown(*args
, **kwargs
):
7683 PageDown(self) -> bool
7685 This is just a wrapper for ScrollPages(1).
7687 return _core_
.Window_PageDown(*args
, **kwargs
)
7689 def SetHelpText(*args
, **kwargs
):
7691 SetHelpText(self, String text)
7693 Sets the help text to be used as context-sensitive help for this
7694 window. Note that the text is actually stored by the current
7695 wxHelpProvider implementation, and not in the window object itself.
7697 return _core_
.Window_SetHelpText(*args
, **kwargs
)
7699 def SetHelpTextForId(*args
, **kwargs
):
7701 SetHelpTextForId(self, String text)
7703 Associate this help text with all windows with the same id as this
7706 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
7708 def GetHelpText(*args
, **kwargs
):
7710 GetHelpText(self) -> String
7712 Gets the help text to be used as context-sensitive help for this
7713 window. Note that the text is actually stored by the current
7714 wxHelpProvider implementation, and not in the window object itself.
7716 return _core_
.Window_GetHelpText(*args
, **kwargs
)
7718 def SetToolTipString(*args
, **kwargs
):
7720 SetToolTipString(self, String tip)
7722 Attach a tooltip to the window.
7724 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
7726 def SetToolTip(*args
, **kwargs
):
7728 SetToolTip(self, ToolTip tip)
7730 Attach a tooltip to the window.
7732 return _core_
.Window_SetToolTip(*args
, **kwargs
)
7734 def GetToolTip(*args
, **kwargs
):
7736 GetToolTip(self) -> ToolTip
7738 get the associated tooltip or None if none
7740 return _core_
.Window_GetToolTip(*args
, **kwargs
)
7742 def SetDropTarget(*args
, **kwargs
):
7744 SetDropTarget(self, DropTarget dropTarget)
7746 Associates a drop target with this window. If the window already has
7747 a drop target, it is deleted.
7749 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
7751 def GetDropTarget(*args
, **kwargs
):
7753 GetDropTarget(self) -> DropTarget
7755 Returns the associated drop target, which may be None.
7757 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
7759 def SetConstraints(*args
, **kwargs
):
7761 SetConstraints(self, LayoutConstraints constraints)
7763 Sets the window to have the given layout constraints. If an existing
7764 layout constraints object is already owned by the window, it will be
7765 deleted. Pass None to disassociate and delete the window's current
7768 You must call SetAutoLayout to tell a window to use the constraints
7769 automatically in its default EVT_SIZE handler; otherwise, you must
7770 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7771 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7774 return _core_
.Window_SetConstraints(*args
, **kwargs
)
7776 def GetConstraints(*args
, **kwargs
):
7778 GetConstraints(self) -> LayoutConstraints
7780 Returns a pointer to the window's layout constraints, or None if there
7783 return _core_
.Window_GetConstraints(*args
, **kwargs
)
7785 def SetAutoLayout(*args
, **kwargs
):
7787 SetAutoLayout(self, bool autoLayout)
7789 Determines whether the Layout function will be called automatically
7790 when the window is resized. It is called implicitly by SetSizer but
7791 if you use SetConstraints you should call it manually or otherwise the
7792 window layout won't be correctly updated when its size changes.
7794 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
7796 def GetAutoLayout(*args
, **kwargs
):
7798 GetAutoLayout(self) -> bool
7800 Returns the current autoLayout setting
7802 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
7804 def Layout(*args
, **kwargs
):
7806 Layout(self) -> bool
7808 Invokes the constraint-based layout algorithm or the sizer-based
7809 algorithm for this window. See SetAutoLayout: when auto layout is on,
7810 this function gets called automatically by the default EVT_SIZE
7811 handler when the window is resized.
7813 return _core_
.Window_Layout(*args
, **kwargs
)
7815 def SetSizer(*args
, **kwargs
):
7817 SetSizer(self, Sizer sizer, bool deleteOld=True)
7819 Sets the window to have the given layout sizer. The window will then
7820 own the object, and will take care of its deletion. If an existing
7821 layout sizer object is already owned by the window, it will be deleted
7822 if the deleteOld parameter is true. Note that this function will also
7823 call SetAutoLayout implicitly with a True parameter if the sizer is
7824 non-None, and False otherwise.
7826 return _core_
.Window_SetSizer(*args
, **kwargs
)
7828 def SetSizerAndFit(*args
, **kwargs
):
7830 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7832 The same as SetSizer, except it also sets the size hints for the
7833 window based on the sizer's minimum size.
7835 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
7837 def GetSizer(*args
, **kwargs
):
7839 GetSizer(self) -> Sizer
7841 Return the sizer associated with the window by a previous call to
7842 SetSizer or None if there isn't one.
7844 return _core_
.Window_GetSizer(*args
, **kwargs
)
7846 def SetContainingSizer(*args
, **kwargs
):
7848 SetContainingSizer(self, Sizer sizer)
7850 This normally does not need to be called by application code. It is
7851 called internally when a window is added to a sizer, and is used so
7852 the window can remove itself from the sizer when it is destroyed.
7854 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
7856 def GetContainingSizer(*args
, **kwargs
):
7858 GetContainingSizer(self) -> Sizer
7860 Return the sizer that this window is a member of, if any, otherwise None.
7862 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
7864 def InheritAttributes(*args
, **kwargs
):
7866 InheritAttributes(self)
7868 This function is (or should be, in case of custom controls) called
7869 during window creation to intelligently set up the window visual
7870 attributes, that is the font and the foreground and background
7873 By 'intelligently' the following is meant: by default, all windows use
7874 their own default attributes. However if some of the parent's
7875 attributes are explicitly changed (that is, using SetFont and not
7876 SetOwnFont) and if the corresponding attribute hadn't been
7877 explicitly set for this window itself, then this window takes the same
7878 value as used by the parent. In addition, if the window overrides
7879 ShouldInheritColours to return false, the colours will not be changed
7880 no matter what and only the font might.
7882 This rather complicated logic is necessary in order to accommodate the
7883 different usage scenarios. The most common one is when all default
7884 attributes are used and in this case, nothing should be inherited as
7885 in modern GUIs different controls use different fonts (and colours)
7886 than their siblings so they can't inherit the same value from the
7887 parent. However it was also deemed desirable to allow to simply change
7888 the attributes of all children at once by just changing the font or
7889 colour of their common parent, hence in this case we do inherit the
7893 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
7895 def ShouldInheritColours(*args
, **kwargs
):
7897 ShouldInheritColours(self) -> bool
7899 Return true from here to allow the colours of this window to be
7900 changed by InheritAttributes, returning false forbids inheriting them
7901 from the parent window.
7903 The base class version returns false, but this method is overridden in
7904 wxControl where it returns true.
7906 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
7908 def PostCreate(self
, pre
):
7910 Phase 3 of the 2-phase create <wink!>
7911 Call this method after precreating the window with the 2-phase create method.
7913 self
.this
= pre
.this
7914 self
.thisown
= pre
.thisown
7916 if hasattr(self
, '_setOORInfo'):
7917 self
._setOORInfo
(self
)
7918 if hasattr(self
, '_setCallbackInfo'):
7919 self
._setCallbackInfo
(self
, self
.__class
__)
7922 class WindowPtr(Window
):
7923 def __init__(self
, this
):
7925 if not hasattr(self
,"thisown"): self
.thisown
= 0
7926 self
.__class
__ = Window
7927 _core_
.Window_swigregister(WindowPtr
)
7929 def PreWindow(*args
, **kwargs
):
7931 PreWindow() -> Window
7933 Precreate a Window for 2-phase creation.
7935 val
= _core_
.new_PreWindow(*args
, **kwargs
)
7939 def Window_NewControlId(*args
, **kwargs
):
7941 Window_NewControlId() -> int
7943 Generate a control id for the controls which were not given one.
7945 return _core_
.Window_NewControlId(*args
, **kwargs
)
7947 def Window_NextControlId(*args
, **kwargs
):
7949 Window_NextControlId(int winid) -> int
7951 Get the id of the control following the one with the given
7954 return _core_
.Window_NextControlId(*args
, **kwargs
)
7956 def Window_PrevControlId(*args
, **kwargs
):
7958 Window_PrevControlId(int winid) -> int
7960 Get the id of the control preceding the one with the given
7963 return _core_
.Window_PrevControlId(*args
, **kwargs
)
7965 def Window_FindFocus(*args
, **kwargs
):
7967 Window_FindFocus() -> Window
7969 Returns the window or control that currently has the keyboard focus,
7972 return _core_
.Window_FindFocus(*args
, **kwargs
)
7974 def Window_GetCapture(*args
, **kwargs
):
7976 Window_GetCapture() -> Window
7978 Returns the window which currently captures the mouse or None
7980 return _core_
.Window_GetCapture(*args
, **kwargs
)
7982 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
7984 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7986 Get the default attributes for this class. This is useful if you want
7987 to use the same font or colour in your own control as in a standard
7988 control -- which is a much better idea than hard coding specific
7989 colours or fonts which might look completely out of place on the
7990 user's system, especially if it uses themes.
7992 The variant parameter is only relevant under Mac currently and is
7993 ignore under other platforms. Under Mac, it will change the size of
7994 the returned font. See `wx.Window.SetWindowVariant` for more about
7997 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7999 def DLG_PNT(win
, point_or_x
, y
=None):
8001 Convenience function for converting a Point or (x,y) in
8002 dialog units to pixel units.
8005 return win
.ConvertDialogPointToPixels(point_or_x
)
8007 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
8009 def DLG_SZE(win
, size_width
, height
=None):
8011 Convenience function for converting a Size or (w,h) in
8012 dialog units to pixel units.
8015 return win
.ConvertDialogSizeToPixels(size_width
)
8017 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
8020 def FindWindowById(*args
, **kwargs
):
8022 FindWindowById(long id, Window parent=None) -> Window
8024 Find the first window in the application with the given id. If parent
8025 is None, the search will start from all top-level frames and dialog
8026 boxes; if non-None, the search will be limited to the given window
8027 hierarchy. The search is recursive in both cases.
8029 return _core_
.FindWindowById(*args
, **kwargs
)
8031 def FindWindowByName(*args
, **kwargs
):
8033 FindWindowByName(String name, Window parent=None) -> Window
8035 Find a window by its name (as given in a window constructor or Create
8036 function call). If parent is None, the search will start from all
8037 top-level frames and dialog boxes; if non-None, the search will be
8038 limited to the given window hierarchy. The search is recursive in both
8041 If no window with such name is found, wx.FindWindowByLabel is called.
8043 return _core_
.FindWindowByName(*args
, **kwargs
)
8045 def FindWindowByLabel(*args
, **kwargs
):
8047 FindWindowByLabel(String label, Window parent=None) -> Window
8049 Find a window by its label. Depending on the type of window, the label
8050 may be a window title or panel item label. If parent is None, the
8051 search will start from all top-level frames and dialog boxes; if
8052 non-None, the search will be limited to the given window
8053 hierarchy. The search is recursive in both cases.
8055 return _core_
.FindWindowByLabel(*args
, **kwargs
)
8057 def Window_FromHWND(*args
, **kwargs
):
8058 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8059 return _core_
.Window_FromHWND(*args
, **kwargs
)
8060 #---------------------------------------------------------------------------
8062 class Validator(EvtHandler
):
8063 """Proxy of C++ Validator class"""
8065 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8066 def __init__(self
, *args
, **kwargs
):
8067 """__init__(self) -> Validator"""
8068 newobj
= _core_
.new_Validator(*args
, **kwargs
)
8069 self
.this
= newobj
.this
8072 self
._setOORInfo
(self
)
8074 def Clone(*args
, **kwargs
):
8075 """Clone(self) -> Validator"""
8076 return _core_
.Validator_Clone(*args
, **kwargs
)
8078 def Validate(*args
, **kwargs
):
8079 """Validate(self, Window parent) -> bool"""
8080 return _core_
.Validator_Validate(*args
, **kwargs
)
8082 def TransferToWindow(*args
, **kwargs
):
8083 """TransferToWindow(self) -> bool"""
8084 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
8086 def TransferFromWindow(*args
, **kwargs
):
8087 """TransferFromWindow(self) -> bool"""
8088 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
8090 def GetWindow(*args
, **kwargs
):
8091 """GetWindow(self) -> Window"""
8092 return _core_
.Validator_GetWindow(*args
, **kwargs
)
8094 def SetWindow(*args
, **kwargs
):
8095 """SetWindow(self, Window window)"""
8096 return _core_
.Validator_SetWindow(*args
, **kwargs
)
8098 def IsSilent(*args
, **kwargs
):
8099 """IsSilent() -> bool"""
8100 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8102 IsSilent
= staticmethod(IsSilent
)
8103 def SetBellOnError(*args
, **kwargs
):
8104 """SetBellOnError(int doIt=True)"""
8105 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8107 SetBellOnError
= staticmethod(SetBellOnError
)
8109 class ValidatorPtr(Validator
):
8110 def __init__(self
, this
):
8112 if not hasattr(self
,"thisown"): self
.thisown
= 0
8113 self
.__class
__ = Validator
8114 _core_
.Validator_swigregister(ValidatorPtr
)
8116 def Validator_IsSilent(*args
, **kwargs
):
8117 """Validator_IsSilent() -> bool"""
8118 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8120 def Validator_SetBellOnError(*args
, **kwargs
):
8121 """Validator_SetBellOnError(int doIt=True)"""
8122 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8124 class PyValidator(Validator
):
8125 """Proxy of C++ PyValidator class"""
8127 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8128 def __init__(self
, *args
, **kwargs
):
8129 """__init__(self) -> PyValidator"""
8130 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
8131 self
.this
= newobj
.this
8135 self
._setCallbackInfo
(self
, PyValidator
, 1)
8136 self
._setOORInfo
(self
)
8138 def _setCallbackInfo(*args
, **kwargs
):
8139 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8140 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
8143 class PyValidatorPtr(PyValidator
):
8144 def __init__(self
, this
):
8146 if not hasattr(self
,"thisown"): self
.thisown
= 0
8147 self
.__class
__ = PyValidator
8148 _core_
.PyValidator_swigregister(PyValidatorPtr
)
8150 #---------------------------------------------------------------------------
8152 class Menu(EvtHandler
):
8153 """Proxy of C++ Menu class"""
8155 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8156 def __init__(self
, *args
, **kwargs
):
8157 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8158 newobj
= _core_
.new_Menu(*args
, **kwargs
)
8159 self
.this
= newobj
.this
8162 self
._setOORInfo
(self
)
8164 def Append(*args
, **kwargs
):
8165 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8166 return _core_
.Menu_Append(*args
, **kwargs
)
8168 def AppendSeparator(*args
, **kwargs
):
8169 """AppendSeparator(self) -> MenuItem"""
8170 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
8172 def AppendCheckItem(*args
, **kwargs
):
8173 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8174 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
8176 def AppendRadioItem(*args
, **kwargs
):
8177 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8178 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
8180 def AppendMenu(*args
, **kwargs
):
8181 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8182 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
8184 def AppendItem(*args
, **kwargs
):
8185 """AppendItem(self, MenuItem item) -> MenuItem"""
8186 return _core_
.Menu_AppendItem(*args
, **kwargs
)
8188 def Break(*args
, **kwargs
):
8190 return _core_
.Menu_Break(*args
, **kwargs
)
8192 def InsertItem(*args
, **kwargs
):
8193 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8194 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8196 def Insert(*args
, **kwargs
):
8198 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8199 int kind=ITEM_NORMAL) -> MenuItem
8201 return _core_
.Menu_Insert(*args
, **kwargs
)
8203 def InsertSeparator(*args
, **kwargs
):
8204 """InsertSeparator(self, size_t pos) -> MenuItem"""
8205 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8207 def InsertCheckItem(*args
, **kwargs
):
8208 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8209 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8211 def InsertRadioItem(*args
, **kwargs
):
8212 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8213 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8215 def InsertMenu(*args
, **kwargs
):
8216 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8217 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8219 def PrependItem(*args
, **kwargs
):
8220 """PrependItem(self, MenuItem item) -> MenuItem"""
8221 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8223 def Prepend(*args
, **kwargs
):
8224 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8225 return _core_
.Menu_Prepend(*args
, **kwargs
)
8227 def PrependSeparator(*args
, **kwargs
):
8228 """PrependSeparator(self) -> MenuItem"""
8229 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8231 def PrependCheckItem(*args
, **kwargs
):
8232 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8233 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8235 def PrependRadioItem(*args
, **kwargs
):
8236 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8237 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8239 def PrependMenu(*args
, **kwargs
):
8240 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8241 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8243 def Remove(*args
, **kwargs
):
8244 """Remove(self, int id) -> MenuItem"""
8245 return _core_
.Menu_Remove(*args
, **kwargs
)
8247 def RemoveItem(*args
, **kwargs
):
8248 """RemoveItem(self, MenuItem item) -> MenuItem"""
8249 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8251 def Delete(*args
, **kwargs
):
8252 """Delete(self, int id) -> bool"""
8253 return _core_
.Menu_Delete(*args
, **kwargs
)
8255 def DeleteItem(*args
, **kwargs
):
8256 """DeleteItem(self, MenuItem item) -> bool"""
8257 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8259 def Destroy(*args
, **kwargs
):
8263 Deletes the C++ object this Python object is a proxy for.
8265 return _core_
.Menu_Destroy(*args
, **kwargs
)
8267 def DestroyId(*args
, **kwargs
):
8269 DestroyId(self, int id) -> bool
8271 Deletes the C++ object this Python object is a proxy for.
8273 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8275 def DestroyItem(*args
, **kwargs
):
8277 DestroyItem(self, MenuItem item) -> bool
8279 Deletes the C++ object this Python object is a proxy for.
8281 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8283 def GetMenuItemCount(*args
, **kwargs
):
8284 """GetMenuItemCount(self) -> size_t"""
8285 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8287 def GetMenuItems(*args
, **kwargs
):
8288 """GetMenuItems(self) -> PyObject"""
8289 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8291 def FindItem(*args
, **kwargs
):
8292 """FindItem(self, String item) -> int"""
8293 return _core_
.Menu_FindItem(*args
, **kwargs
)
8295 def FindItemById(*args
, **kwargs
):
8296 """FindItemById(self, int id) -> MenuItem"""
8297 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8299 def FindItemByPosition(*args
, **kwargs
):
8300 """FindItemByPosition(self, size_t position) -> MenuItem"""
8301 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
8303 def Enable(*args
, **kwargs
):
8304 """Enable(self, int id, bool enable)"""
8305 return _core_
.Menu_Enable(*args
, **kwargs
)
8307 def IsEnabled(*args
, **kwargs
):
8308 """IsEnabled(self, int id) -> bool"""
8309 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
8311 def Check(*args
, **kwargs
):
8312 """Check(self, int id, bool check)"""
8313 return _core_
.Menu_Check(*args
, **kwargs
)
8315 def IsChecked(*args
, **kwargs
):
8316 """IsChecked(self, int id) -> bool"""
8317 return _core_
.Menu_IsChecked(*args
, **kwargs
)
8319 def SetLabel(*args
, **kwargs
):
8320 """SetLabel(self, int id, String label)"""
8321 return _core_
.Menu_SetLabel(*args
, **kwargs
)
8323 def GetLabel(*args
, **kwargs
):
8324 """GetLabel(self, int id) -> String"""
8325 return _core_
.Menu_GetLabel(*args
, **kwargs
)
8327 def SetHelpString(*args
, **kwargs
):
8328 """SetHelpString(self, int id, String helpString)"""
8329 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
8331 def GetHelpString(*args
, **kwargs
):
8332 """GetHelpString(self, int id) -> String"""
8333 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
8335 def SetTitle(*args
, **kwargs
):
8336 """SetTitle(self, String title)"""
8337 return _core_
.Menu_SetTitle(*args
, **kwargs
)
8339 def GetTitle(*args
, **kwargs
):
8340 """GetTitle(self) -> String"""
8341 return _core_
.Menu_GetTitle(*args
, **kwargs
)
8343 def SetEventHandler(*args
, **kwargs
):
8344 """SetEventHandler(self, EvtHandler handler)"""
8345 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
8347 def GetEventHandler(*args
, **kwargs
):
8348 """GetEventHandler(self) -> EvtHandler"""
8349 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
8351 def SetInvokingWindow(*args
, **kwargs
):
8352 """SetInvokingWindow(self, Window win)"""
8353 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
8355 def GetInvokingWindow(*args
, **kwargs
):
8356 """GetInvokingWindow(self) -> Window"""
8357 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
8359 def GetStyle(*args
, **kwargs
):
8360 """GetStyle(self) -> long"""
8361 return _core_
.Menu_GetStyle(*args
, **kwargs
)
8363 def UpdateUI(*args
, **kwargs
):
8364 """UpdateUI(self, EvtHandler source=None)"""
8365 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
8367 def GetMenuBar(*args
, **kwargs
):
8368 """GetMenuBar(self) -> MenuBar"""
8369 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
8371 def Attach(*args
, **kwargs
):
8372 """Attach(self, wxMenuBarBase menubar)"""
8373 return _core_
.Menu_Attach(*args
, **kwargs
)
8375 def Detach(*args
, **kwargs
):
8377 return _core_
.Menu_Detach(*args
, **kwargs
)
8379 def IsAttached(*args
, **kwargs
):
8380 """IsAttached(self) -> bool"""
8381 return _core_
.Menu_IsAttached(*args
, **kwargs
)
8383 def SetParent(*args
, **kwargs
):
8384 """SetParent(self, Menu parent)"""
8385 return _core_
.Menu_SetParent(*args
, **kwargs
)
8387 def GetParent(*args
, **kwargs
):
8388 """GetParent(self) -> Menu"""
8389 return _core_
.Menu_GetParent(*args
, **kwargs
)
8392 class MenuPtr(Menu
):
8393 def __init__(self
, this
):
8395 if not hasattr(self
,"thisown"): self
.thisown
= 0
8396 self
.__class
__ = Menu
8397 _core_
.Menu_swigregister(MenuPtr
)
8398 DefaultValidator
= cvar
.DefaultValidator
8400 #---------------------------------------------------------------------------
8402 class MenuBar(Window
):
8403 """Proxy of C++ MenuBar class"""
8405 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8406 def __init__(self
, *args
, **kwargs
):
8407 """__init__(self, long style=0) -> MenuBar"""
8408 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
8409 self
.this
= newobj
.this
8412 self
._setOORInfo
(self
)
8414 def Append(*args
, **kwargs
):
8415 """Append(self, Menu menu, String title) -> bool"""
8416 return _core_
.MenuBar_Append(*args
, **kwargs
)
8418 def Insert(*args
, **kwargs
):
8419 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8420 return _core_
.MenuBar_Insert(*args
, **kwargs
)
8422 def GetMenuCount(*args
, **kwargs
):
8423 """GetMenuCount(self) -> size_t"""
8424 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
8426 def GetMenu(*args
, **kwargs
):
8427 """GetMenu(self, size_t pos) -> Menu"""
8428 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
8430 def Replace(*args
, **kwargs
):
8431 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8432 return _core_
.MenuBar_Replace(*args
, **kwargs
)
8434 def Remove(*args
, **kwargs
):
8435 """Remove(self, size_t pos) -> Menu"""
8436 return _core_
.MenuBar_Remove(*args
, **kwargs
)
8438 def EnableTop(*args
, **kwargs
):
8439 """EnableTop(self, size_t pos, bool enable)"""
8440 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
8442 def IsEnabledTop(*args
, **kwargs
):
8443 """IsEnabledTop(self, size_t pos) -> bool"""
8444 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
8446 def SetLabelTop(*args
, **kwargs
):
8447 """SetLabelTop(self, size_t pos, String label)"""
8448 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
8450 def GetLabelTop(*args
, **kwargs
):
8451 """GetLabelTop(self, size_t pos) -> String"""
8452 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
8454 def FindMenuItem(*args
, **kwargs
):
8455 """FindMenuItem(self, String menu, String item) -> int"""
8456 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
8458 def FindItemById(*args
, **kwargs
):
8459 """FindItemById(self, int id) -> MenuItem"""
8460 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
8462 def FindMenu(*args
, **kwargs
):
8463 """FindMenu(self, String title) -> int"""
8464 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
8466 def Enable(*args
, **kwargs
):
8467 """Enable(self, int id, bool enable)"""
8468 return _core_
.MenuBar_Enable(*args
, **kwargs
)
8470 def Check(*args
, **kwargs
):
8471 """Check(self, int id, bool check)"""
8472 return _core_
.MenuBar_Check(*args
, **kwargs
)
8474 def IsChecked(*args
, **kwargs
):
8475 """IsChecked(self, int id) -> bool"""
8476 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
8478 def IsEnabled(*args
, **kwargs
):
8479 """IsEnabled(self, int id) -> bool"""
8480 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
8482 def SetLabel(*args
, **kwargs
):
8483 """SetLabel(self, int id, String label)"""
8484 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
8486 def GetLabel(*args
, **kwargs
):
8487 """GetLabel(self, int id) -> String"""
8488 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
8490 def SetHelpString(*args
, **kwargs
):
8491 """SetHelpString(self, int id, String helpString)"""
8492 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
8494 def GetHelpString(*args
, **kwargs
):
8495 """GetHelpString(self, int id) -> String"""
8496 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
8498 def GetFrame(*args
, **kwargs
):
8499 """GetFrame(self) -> wxFrame"""
8500 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
8502 def IsAttached(*args
, **kwargs
):
8503 """IsAttached(self) -> bool"""
8504 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
8506 def Attach(*args
, **kwargs
):
8507 """Attach(self, wxFrame frame)"""
8508 return _core_
.MenuBar_Attach(*args
, **kwargs
)
8510 def Detach(*args
, **kwargs
):
8512 return _core_
.MenuBar_Detach(*args
, **kwargs
)
8515 class MenuBarPtr(MenuBar
):
8516 def __init__(self
, this
):
8518 if not hasattr(self
,"thisown"): self
.thisown
= 0
8519 self
.__class
__ = MenuBar
8520 _core_
.MenuBar_swigregister(MenuBarPtr
)
8522 #---------------------------------------------------------------------------
8524 class MenuItem(Object
):
8525 """Proxy of C++ MenuItem class"""
8527 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8528 def __init__(self
, *args
, **kwargs
):
8530 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8531 String help=EmptyString, int kind=ITEM_NORMAL,
8532 Menu subMenu=None) -> MenuItem
8534 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
8535 self
.this
= newobj
.this
8538 def GetMenu(*args
, **kwargs
):
8539 """GetMenu(self) -> Menu"""
8540 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
8542 def SetMenu(*args
, **kwargs
):
8543 """SetMenu(self, Menu menu)"""
8544 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
8546 def SetId(*args
, **kwargs
):
8547 """SetId(self, int id)"""
8548 return _core_
.MenuItem_SetId(*args
, **kwargs
)
8550 def GetId(*args
, **kwargs
):
8551 """GetId(self) -> int"""
8552 return _core_
.MenuItem_GetId(*args
, **kwargs
)
8554 def IsSeparator(*args
, **kwargs
):
8555 """IsSeparator(self) -> bool"""
8556 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
8558 def SetText(*args
, **kwargs
):
8559 """SetText(self, String str)"""
8560 return _core_
.MenuItem_SetText(*args
, **kwargs
)
8562 def GetLabel(*args
, **kwargs
):
8563 """GetLabel(self) -> String"""
8564 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
8566 def GetText(*args
, **kwargs
):
8567 """GetText(self) -> String"""
8568 return _core_
.MenuItem_GetText(*args
, **kwargs
)
8570 def GetLabelFromText(*args
, **kwargs
):
8571 """GetLabelFromText(String text) -> String"""
8572 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8574 GetLabelFromText
= staticmethod(GetLabelFromText
)
8575 def GetKind(*args
, **kwargs
):
8576 """GetKind(self) -> int"""
8577 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
8579 def SetKind(*args
, **kwargs
):
8580 """SetKind(self, int kind)"""
8581 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
8583 def SetCheckable(*args
, **kwargs
):
8584 """SetCheckable(self, bool checkable)"""
8585 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
8587 def IsCheckable(*args
, **kwargs
):
8588 """IsCheckable(self) -> bool"""
8589 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
8591 def IsSubMenu(*args
, **kwargs
):
8592 """IsSubMenu(self) -> bool"""
8593 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
8595 def SetSubMenu(*args
, **kwargs
):
8596 """SetSubMenu(self, Menu menu)"""
8597 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
8599 def GetSubMenu(*args
, **kwargs
):
8600 """GetSubMenu(self) -> Menu"""
8601 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
8603 def Enable(*args
, **kwargs
):
8604 """Enable(self, bool enable=True)"""
8605 return _core_
.MenuItem_Enable(*args
, **kwargs
)
8607 def IsEnabled(*args
, **kwargs
):
8608 """IsEnabled(self) -> bool"""
8609 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
8611 def Check(*args
, **kwargs
):
8612 """Check(self, bool check=True)"""
8613 return _core_
.MenuItem_Check(*args
, **kwargs
)
8615 def IsChecked(*args
, **kwargs
):
8616 """IsChecked(self) -> bool"""
8617 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
8619 def Toggle(*args
, **kwargs
):
8621 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
8623 def SetHelp(*args
, **kwargs
):
8624 """SetHelp(self, String str)"""
8625 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
8627 def GetHelp(*args
, **kwargs
):
8628 """GetHelp(self) -> String"""
8629 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
8631 def GetAccel(*args
, **kwargs
):
8632 """GetAccel(self) -> AcceleratorEntry"""
8633 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
8635 def SetAccel(*args
, **kwargs
):
8636 """SetAccel(self, AcceleratorEntry accel)"""
8637 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
8639 def GetDefaultMarginWidth(*args
, **kwargs
):
8640 """GetDefaultMarginWidth() -> int"""
8641 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8643 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
8644 def SetBitmap(*args
, **kwargs
):
8645 """SetBitmap(self, Bitmap bitmap)"""
8646 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
8648 def GetBitmap(*args
, **kwargs
):
8649 """GetBitmap(self) -> Bitmap"""
8650 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
8653 class MenuItemPtr(MenuItem
):
8654 def __init__(self
, this
):
8656 if not hasattr(self
,"thisown"): self
.thisown
= 0
8657 self
.__class
__ = MenuItem
8658 _core_
.MenuItem_swigregister(MenuItemPtr
)
8660 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8661 """MenuItem_GetLabelFromText(String text) -> String"""
8662 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8664 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8665 """MenuItem_GetDefaultMarginWidth() -> int"""
8666 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8668 #---------------------------------------------------------------------------
8670 class Control(Window
):
8672 This is the base class for a control or 'widget'.
8674 A control is generally a small window which processes user input
8675 and/or displays one or more item of data.
8678 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8679 def __init__(self
, *args
, **kwargs
):
8681 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8682 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8683 String name=ControlNameStr) -> Control
8685 Create a Control. Normally you should only call this from a subclass'
8686 __init__ as a plain old wx.Control is not very useful.
8688 newobj
= _core_
.new_Control(*args
, **kwargs
)
8689 self
.this
= newobj
.this
8692 self
._setOORInfo
(self
)
8694 def Create(*args
, **kwargs
):
8696 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8697 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8698 String name=ControlNameStr) -> bool
8700 Do the 2nd phase and create the GUI control.
8702 return _core_
.Control_Create(*args
, **kwargs
)
8704 def Command(*args
, **kwargs
):
8706 Command(self, CommandEvent event)
8708 Simulates the effect of the user issuing a command to the item.
8710 :see: `wx.CommandEvent`
8713 return _core_
.Control_Command(*args
, **kwargs
)
8715 def GetLabel(*args
, **kwargs
):
8717 GetLabel(self) -> String
8719 Return a control's text.
8721 return _core_
.Control_GetLabel(*args
, **kwargs
)
8723 def SetLabel(*args
, **kwargs
):
8725 SetLabel(self, String label)
8727 Sets the item's text.
8729 return _core_
.Control_SetLabel(*args
, **kwargs
)
8731 def GetClassDefaultAttributes(*args
, **kwargs
):
8733 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8735 Get the default attributes for this class. This is useful if you want
8736 to use the same font or colour in your own control as in a standard
8737 control -- which is a much better idea than hard coding specific
8738 colours or fonts which might look completely out of place on the
8739 user's system, especially if it uses themes.
8741 The variant parameter is only relevant under Mac currently and is
8742 ignore under other platforms. Under Mac, it will change the size of
8743 the returned font. See `wx.Window.SetWindowVariant` for more about
8746 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8748 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
8750 class ControlPtr(Control
):
8751 def __init__(self
, this
):
8753 if not hasattr(self
,"thisown"): self
.thisown
= 0
8754 self
.__class
__ = Control
8755 _core_
.Control_swigregister(ControlPtr
)
8756 ControlNameStr
= cvar
.ControlNameStr
8758 def PreControl(*args
, **kwargs
):
8760 PreControl() -> Control
8762 Precreate a Control control for 2-phase creation
8764 val
= _core_
.new_PreControl(*args
, **kwargs
)
8768 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
8770 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8772 Get the default attributes for this class. This is useful if you want
8773 to use the same font or colour in your own control as in a standard
8774 control -- which is a much better idea than hard coding specific
8775 colours or fonts which might look completely out of place on the
8776 user's system, especially if it uses themes.
8778 The variant parameter is only relevant under Mac currently and is
8779 ignore under other platforms. Under Mac, it will change the size of
8780 the returned font. See `wx.Window.SetWindowVariant` for more about
8783 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8785 #---------------------------------------------------------------------------
8787 class ItemContainer(object):
8789 wx.ItemContainer defines an interface which is implemented by all
8790 controls which have string subitems, each of which may be selected,
8791 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8792 `wx.ComboBox` which implements an extended interface deriving from
8795 It defines the methods for accessing the control's items and although
8796 each of the derived classes implements them differently, they still
8797 all conform to the same interface.
8799 The items in a wx.ItemContainer have (non empty) string labels and,
8800 optionally, client data associated with them.
8803 def __init__(self
): raise RuntimeError, "No constructor defined"
8805 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8806 def Append(*args
, **kwargs
):
8808 Append(self, String item, PyObject clientData=None) -> int
8810 Adds the item to the control, associating the given data with the item
8811 if not None. The return value is the index of the newly added item
8812 which may be different from the last one if the control is sorted (e.g.
8813 has wx.LB_SORT or wx.CB_SORT style).
8815 return _core_
.ItemContainer_Append(*args
, **kwargs
)
8817 def AppendItems(*args
, **kwargs
):
8819 AppendItems(self, List strings)
8821 Apend several items at once to the control. Notice that calling this
8822 method may be much faster than appending the items one by one if you
8823 need to add a lot of items.
8825 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
8827 def Insert(*args
, **kwargs
):
8829 Insert(self, String item, int pos, PyObject clientData=None) -> int
8831 Insert an item into the control before the item at the ``pos`` index,
8832 optionally associating some data object with the item.
8834 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
8836 def Clear(*args
, **kwargs
):
8840 Removes all items from the control.
8842 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
8844 def Delete(*args
, **kwargs
):
8848 Deletes the item at the zero-based index 'n' from the control. Note
8849 that it is an error (signalled by a `wx.PyAssertionError` exception if
8850 enabled) to remove an item with the index negative or greater or equal
8851 than the number of items in the control.
8853 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
8855 def GetCount(*args
, **kwargs
):
8857 GetCount(self) -> int
8859 Returns the number of items in the control.
8861 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
8863 def IsEmpty(*args
, **kwargs
):
8865 IsEmpty(self) -> bool
8867 Returns True if the control is empty or False if it has some items.
8869 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
8871 def GetString(*args
, **kwargs
):
8873 GetString(self, int n) -> String
8875 Returns the label of the item with the given index.
8877 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
8879 def GetStrings(*args
, **kwargs
):
8880 """GetStrings(self) -> wxArrayString"""
8881 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
8883 def SetString(*args
, **kwargs
):
8885 SetString(self, int n, String s)
8887 Sets the label for the given item.
8889 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
8891 def FindString(*args
, **kwargs
):
8893 FindString(self, String s) -> int
8895 Finds an item whose label matches the given string. Returns the
8896 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8899 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
8901 def Select(*args
, **kwargs
):
8905 Sets the item at index 'n' to be the selected item.
8907 return _core_
.ItemContainer_Select(*args
, **kwargs
)
8909 SetSelection
= Select
8910 def GetSelection(*args
, **kwargs
):
8912 GetSelection(self) -> int
8914 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8917 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
8919 def GetStringSelection(*args
, **kwargs
):
8921 GetStringSelection(self) -> String
8923 Returns the label of the selected item or an empty string if no item
8926 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
8928 def GetClientData(*args
, **kwargs
):
8930 GetClientData(self, int n) -> PyObject
8932 Returns the client data associated with the given item, (if any.)
8934 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
8936 def SetClientData(*args
, **kwargs
):
8938 SetClientData(self, int n, PyObject clientData)
8940 Associate the given client data with the item at position n.
8942 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
8945 class ItemContainerPtr(ItemContainer
):
8946 def __init__(self
, this
):
8948 if not hasattr(self
,"thisown"): self
.thisown
= 0
8949 self
.__class
__ = ItemContainer
8950 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
8952 #---------------------------------------------------------------------------
8954 class ControlWithItems(Control
,ItemContainer
):
8956 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8957 wx.Control class, and is used for the base class of various controls
8960 def __init__(self
): raise RuntimeError, "No constructor defined"
8962 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8964 class ControlWithItemsPtr(ControlWithItems
):
8965 def __init__(self
, this
):
8967 if not hasattr(self
,"thisown"): self
.thisown
= 0
8968 self
.__class
__ = ControlWithItems
8969 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
8971 #---------------------------------------------------------------------------
8973 class SizerItem(Object
):
8975 The wx.SizerItem class is used to track the position, size and other
8976 attributes of each item managed by a `wx.Sizer`. In normal usage user
8977 code should never need to deal directly with a wx.SizerItem, but
8978 custom classes derived from `wx.PySizer` will probably need to use the
8979 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8981 :see: `wx.Sizer`, `wx.GBSizerItem`
8984 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8985 def __init__(self
, *args
, **kwargs
):
8987 __init__(self) -> SizerItem
8989 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8990 size will need to be set before this item can be used in a Sizer.
8992 You will probably never need to create a wx.SizerItem directly as they
8993 are created automatically when the sizer's Add, Insert or Prepend
8996 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8998 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
8999 self
.this
= newobj
.this
9002 def DeleteWindows(*args
, **kwargs
):
9006 Destroy the window or the windows in a subsizer, depending on the type
9009 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
9011 def DetachSizer(*args
, **kwargs
):
9015 Enable deleting the SizerItem without destroying the contained sizer.
9017 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
9019 def GetSize(*args
, **kwargs
):
9021 GetSize(self) -> Size
9023 Get the current size of the item, as set in the last Layout.
9025 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
9027 def CalcMin(*args
, **kwargs
):
9029 CalcMin(self) -> Size
9031 Calculates the minimum desired size for the item, including any space
9034 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
9036 def SetDimension(*args
, **kwargs
):
9038 SetDimension(self, Point pos, Size size)
9040 Set the position and size of the space allocated for this item by the
9041 sizer, and adjust the position and size of the item (window or
9042 subsizer) to be within that space taking alignment and borders into
9045 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
9047 def GetMinSize(*args
, **kwargs
):
9049 GetMinSize(self) -> Size
9051 Get the minimum size needed for the item.
9053 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
9055 def GetMinSizeWithBorder(*args
, **kwargs
):
9057 GetMinSizeWithBorder(self) -> Size
9059 Get the minimum size needed for the item with space for the borders
9062 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
9064 def SetInitSize(*args
, **kwargs
):
9065 """SetInitSize(self, int x, int y)"""
9066 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
9068 def SetRatioWH(*args
, **kwargs
):
9070 SetRatioWH(self, int width, int height)
9072 Set the ratio item attribute.
9074 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
9076 def SetRatioSize(*args
, **kwargs
):
9078 SetRatioSize(self, Size size)
9080 Set the ratio item attribute.
9082 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
9084 def SetRatio(*args
, **kwargs
):
9086 SetRatio(self, float ratio)
9088 Set the ratio item attribute.
9090 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
9092 def GetRatio(*args
, **kwargs
):
9094 GetRatio(self) -> float
9096 Set the ratio item attribute.
9098 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
9100 def GetRect(*args
, **kwargs
):
9102 GetRect(self) -> Rect
9104 Returns the rectangle that the sizer item should occupy
9106 return _core_
.SizerItem_GetRect(*args
, **kwargs
)
9108 def IsWindow(*args
, **kwargs
):
9110 IsWindow(self) -> bool
9112 Is this sizer item a window?
9114 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
9116 def IsSizer(*args
, **kwargs
):
9118 IsSizer(self) -> bool
9120 Is this sizer item a subsizer?
9122 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
9124 def IsSpacer(*args
, **kwargs
):
9126 IsSpacer(self) -> bool
9128 Is this sizer item a spacer?
9130 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
9132 def SetProportion(*args
, **kwargs
):
9134 SetProportion(self, int proportion)
9136 Set the proportion value for this item.
9138 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
9140 def GetProportion(*args
, **kwargs
):
9142 GetProportion(self) -> int
9144 Get the proportion value for this item.
9146 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
9148 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
9149 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
9150 def SetFlag(*args
, **kwargs
):
9152 SetFlag(self, int flag)
9154 Set the flag value for this item.
9156 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
9158 def GetFlag(*args
, **kwargs
):
9160 GetFlag(self) -> int
9162 Get the flag value for this item.
9164 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
9166 def SetBorder(*args
, **kwargs
):
9168 SetBorder(self, int border)
9170 Set the border value for this item.
9172 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
9174 def GetBorder(*args
, **kwargs
):
9176 GetBorder(self) -> int
9178 Get the border value for this item.
9180 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
9182 def GetWindow(*args
, **kwargs
):
9184 GetWindow(self) -> Window
9186 Get the window (if any) that is managed by this sizer item.
9188 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
9190 def SetWindow(*args
, **kwargs
):
9192 SetWindow(self, Window window)
9194 Set the window to be managed by this sizer item.
9196 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9198 def GetSizer(*args
, **kwargs
):
9200 GetSizer(self) -> Sizer
9202 Get the subsizer (if any) that is managed by this sizer item.
9204 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9206 def SetSizer(*args
, **kwargs
):
9208 SetSizer(self, Sizer sizer)
9210 Set the subsizer to be managed by this sizer item.
9212 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9214 def GetSpacer(*args
, **kwargs
):
9216 GetSpacer(self) -> Size
9218 Get the size of the spacer managed by this sizer item.
9220 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9222 def SetSpacer(*args
, **kwargs
):
9224 SetSpacer(self, Size size)
9226 Set the size of the spacer to be managed by this sizer item.
9228 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9230 def Show(*args
, **kwargs
):
9232 Show(self, bool show)
9234 Set the show item attribute, which sizers use to determine if the item
9235 is to be made part of the layout or not. If the item is tracking a
9236 window then it is shown or hidden as needed.
9238 return _core_
.SizerItem_Show(*args
, **kwargs
)
9240 def IsShown(*args
, **kwargs
):
9242 IsShown(self) -> bool
9244 Is the item to be shown in the layout?
9246 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
9248 def GetPosition(*args
, **kwargs
):
9250 GetPosition(self) -> Point
9252 Returns the current position of the item, as set in the last Layout.
9254 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
9256 def GetUserData(*args
, **kwargs
):
9258 GetUserData(self) -> PyObject
9260 Returns the userData associated with this sizer item, or None if there
9263 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
9266 class SizerItemPtr(SizerItem
):
9267 def __init__(self
, this
):
9269 if not hasattr(self
,"thisown"): self
.thisown
= 0
9270 self
.__class
__ = SizerItem
9271 _core_
.SizerItem_swigregister(SizerItemPtr
)
9273 def SizerItemWindow(*args
, **kwargs
):
9275 SizerItemWindow(Window window, int proportion, int flag, int border,
9276 PyObject userData=None) -> SizerItem
9278 Constructs a `wx.SizerItem` for tracking a window.
9280 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
9284 def SizerItemSpacer(*args
, **kwargs
):
9286 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9287 PyObject userData=None) -> SizerItem
9289 Constructs a `wx.SizerItem` for tracking a spacer.
9291 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
9295 def SizerItemSizer(*args
, **kwargs
):
9297 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9298 PyObject userData=None) -> SizerItem
9300 Constructs a `wx.SizerItem` for tracking a subsizer
9302 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
9306 class Sizer(Object
):
9308 wx.Sizer is the abstract base class used for laying out subwindows in
9309 a window. You cannot use wx.Sizer directly; instead, you will have to
9310 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9311 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9312 and `wx.GridBagSizer`.
9314 The concept implemented by sizers in wxWidgets is closely related to
9315 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9316 toolkit or the Qt toolkit. It is based upon the idea of the individual
9317 subwindows reporting their minimal required size and their ability to
9318 get stretched if the size of the parent window has changed. This will
9319 most often mean that the programmer does not set the original size of
9320 a dialog in the beginning, rather the dialog will assigned a sizer and
9321 this sizer will be queried about the recommended size. The sizer in
9322 turn will query its children, which can be normal windows or contorls,
9323 empty space or other sizers, so that a hierarchy of sizers can be
9324 constructed. Note that wxSizer does not derive from wxWindow and thus
9325 do not interfere with tab ordering and requires very little resources
9326 compared to a real window on screen.
9328 What makes sizers so well fitted for use in wxWidgets is the fact that
9329 every control reports its own minimal size and the algorithm can
9330 handle differences in font sizes or different window (dialog item)
9331 sizes on different platforms without problems. If for example the
9332 standard font as well as the overall design of Mac widgets requires
9333 more space than on Windows, then the initial size of a dialog using a
9334 sizer will automatically be bigger on Mac than on Windows.
9336 def __init__(self
): raise RuntimeError, "No constructor defined"
9338 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9339 def _setOORInfo(*args
, **kwargs
):
9340 """_setOORInfo(self, PyObject _self)"""
9341 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
9343 def Add(*args
, **kwargs
):
9345 Add(self, item, int proportion=0, int flag=0, int border=0,
9346 PyObject userData=None) -> wx.SizerItem
9348 Appends a child item to the sizer.
9350 return _core_
.Sizer_Add(*args
, **kwargs
)
9352 def Insert(*args
, **kwargs
):
9354 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9355 PyObject userData=None) -> wx.SizerItem
9357 Inserts a new item into the list of items managed by this sizer before
9358 the item at index *before*. See `Add` for a description of the parameters.
9360 return _core_
.Sizer_Insert(*args
, **kwargs
)
9362 def Prepend(*args
, **kwargs
):
9364 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9365 PyObject userData=None) -> wx.SizerItem
9367 Adds a new item to the begining of the list of sizer items managed by
9368 this sizer. See `Add` for a description of the parameters.
9370 return _core_
.Sizer_Prepend(*args
, **kwargs
)
9372 def Remove(*args
, **kwargs
):
9374 Remove(self, item) -> bool
9376 Removes an item from the sizer and destroys it. This method does not
9377 cause any layout or resizing to take place, call `Layout` to update
9378 the layout on screen after removing a child from the sizer. The
9379 *item* parameter can be either a window, a sizer, or the zero-based
9380 index of an item to remove. Returns True if the child item was found
9383 return _core_
.Sizer_Remove(*args
, **kwargs
)
9385 def Detach(*args
, **kwargs
):
9387 Detach(self, item) -> bool
9389 Detaches an item from the sizer without destroying it. This method
9390 does not cause any layout or resizing to take place, call `Layout` to
9391 do so. The *item* parameter can be either a window, a sizer, or the
9392 zero-based index of the item to be detached. Returns True if the child item
9393 was found and detached.
9395 return _core_
.Sizer_Detach(*args
, **kwargs
)
9397 def GetItem(*args
, **kwargs
):
9399 GetItem(self, item) -> wx.SizerItem
9401 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9402 parameter can be either a window, a sizer, or the zero-based index of
9403 the item to be detached.
9405 return _core_
.Sizer_GetItem(*args
, **kwargs
)
9407 def _SetItemMinSize(*args
, **kwargs
):
9408 """_SetItemMinSize(self, PyObject item, Size size)"""
9409 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
9411 def SetItemMinSize(self
, item
, *args
):
9413 SetItemMinSize(self, item, Size size)
9415 Sets the minimum size that will be allocated for an item in the sizer.
9416 The *item* parameter can be either a window, a sizer, or the
9417 zero-based index of the item. If a window or sizer is given then it
9418 will be searched for recursivly in subsizers if neccessary.
9421 # for backward compatibility accept separate width,height args too
9422 return self
._SetItemMinSize
(item
, args
)
9424 return self
._SetItemMinSize
(item
, args
[0])
9426 def AddItem(*args
, **kwargs
):
9428 AddItem(self, SizerItem item)
9430 Adds a `wx.SizerItem` to the sizer.
9432 return _core_
.Sizer_AddItem(*args
, **kwargs
)
9434 def InsertItem(*args
, **kwargs
):
9436 InsertItem(self, int index, SizerItem item)
9438 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9440 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
9442 def PrependItem(*args
, **kwargs
):
9444 PrependItem(self, SizerItem item)
9446 Prepends a `wx.SizerItem` to the sizer.
9448 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
9450 def AddMany(self
, items
):
9452 AddMany is a convenience method for adding several items
9453 to a sizer at one time. Simply pass it a list of tuples,
9454 where each tuple consists of the parameters that you
9455 would normally pass to the `Add` method.
9458 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
9462 # for backwards compatibility only, please do not use in new code
9463 AddWindow
= wx
._deprecated
(Add
, "AddWindow is deprecated, use `Add` instead.")
9464 AddSizer
= wx
._deprecated
(Add
, "AddSizer is deprecated, use `Add` instead.")
9465 AddSpacer
= wx
._deprecated
(Add
, "AddSpacer is deprecated, use `Add` instead.")
9466 PrependWindow
= wx
._deprecated
(Prepend
, "PrependWindow is deprecated, use `Prepend` instead.")
9467 PrependSizer
= wx
._deprecated
(Prepend
, "PrependSizer is deprecated, use `Prepend` instead.")
9468 PrependSpacer
= wx
._deprecated
(Prepend
, "PrependSpacer is deprecated, use `Prepend` instead.")
9469 InsertWindow
= wx
._deprecated
(Insert
, "InsertWindow is deprecated, use `Insert` instead.")
9470 InsertSizer
= wx
._deprecated
(Insert
, "InsertSizer is deprecated, use `Insert` instead.")
9471 InsertSpacer
= wx
._deprecated
(Insert
, "InsertSpacer is deprecated, use `Insert` instead.")
9472 RemoveWindow
= wx
._deprecated
(Remove
, "RemoveWindow is deprecated, use `Remove` instead.")
9473 RemoveSizer
= wx
._deprecated
(Remove
, "RemoveSizer is deprecated, use `Remove` instead.")
9474 RemovePos
= wx
._deprecated
(Remove
, "RemovePos is deprecated, use `Remove` instead.")
9477 def SetDimension(*args
, **kwargs
):
9479 SetDimension(self, int x, int y, int width, int height)
9481 Call this to force the sizer to take the given dimension and thus
9482 force the items owned by the sizer to resize themselves according to
9483 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9486 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
9488 def SetMinSize(*args
, **kwargs
):
9490 SetMinSize(self, Size size)
9492 Call this to give the sizer a minimal size. Normally, the sizer will
9493 calculate its minimal size based purely on how much space its children
9494 need. After calling this method `GetMinSize` will return either the
9495 minimal size as requested by its children or the minimal size set
9496 here, depending on which is bigger.
9498 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
9500 def GetSize(*args
, **kwargs
):
9502 GetSize(self) -> Size
9504 Returns the current size of the space managed by the sizer.
9506 return _core_
.Sizer_GetSize(*args
, **kwargs
)
9508 def GetPosition(*args
, **kwargs
):
9510 GetPosition(self) -> Point
9512 Returns the current position of the sizer's managed space.
9514 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
9516 def GetMinSize(*args
, **kwargs
):
9518 GetMinSize(self) -> Size
9520 Returns the minimal size of the sizer. This is either the combined
9521 minimal size of all the children and their borders or the minimal size
9522 set by SetMinSize, depending on which is bigger.
9524 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
9526 def GetSizeTuple(self
):
9527 return self
.GetSize().Get()
9528 def GetPositionTuple(self
):
9529 return self
.GetPosition().Get()
9530 def GetMinSizeTuple(self
):
9531 return self
.GetMinSize().Get()
9533 def RecalcSizes(*args
, **kwargs
):
9537 Using the sizes calculated by `CalcMin` reposition and resize all the
9538 items managed by this sizer. You should not need to call this directly as
9539 it is called by `Layout`.
9541 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
9543 def CalcMin(*args
, **kwargs
):
9545 CalcMin(self) -> Size
9547 This method is where the sizer will do the actual calculation of its
9548 children's minimal sizes. You should not need to call this directly as
9549 it is called by `Layout`.
9551 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
9553 def Layout(*args
, **kwargs
):
9557 This method will force the recalculation and layout of the items
9558 controlled by the sizer using the current space allocated to the
9559 sizer. Normally this is called automatically from the owning window's
9560 EVT_SIZE handler, but it is also useful to call it from user code when
9561 one of the items in a sizer change size, or items are added or
9564 return _core_
.Sizer_Layout(*args
, **kwargs
)
9566 def Fit(*args
, **kwargs
):
9568 Fit(self, Window window) -> Size
9570 Tell the sizer to resize the *window* to match the sizer's minimal
9571 size. This is commonly done in the constructor of the window itself in
9572 order to set its initial size to match the needs of the children as
9573 determined by the sizer. Returns the new size.
9575 For a top level window this is the total window size, not the client size.
9577 return _core_
.Sizer_Fit(*args
, **kwargs
)
9579 def FitInside(*args
, **kwargs
):
9581 FitInside(self, Window window)
9583 Tell the sizer to resize the *virtual size* of the *window* to match the
9584 sizer's minimal size. This will not alter the on screen size of the
9585 window, but may cause the addition/removal/alteration of scrollbars
9586 required to view the virtual area in windows which manage it.
9588 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9591 return _core_
.Sizer_FitInside(*args
, **kwargs
)
9593 def SetSizeHints(*args
, **kwargs
):
9595 SetSizeHints(self, Window window)
9597 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9598 match the sizer's minimal size. This is commonly done in the
9599 constructor of the window itself if the window is resizable (as are
9600 many dialogs under Unix and frames on probably all platforms) in order
9601 to prevent the window from being sized smaller than the minimal size
9602 required by the sizer.
9604 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
9606 def SetVirtualSizeHints(*args
, **kwargs
):
9608 SetVirtualSizeHints(self, Window window)
9610 Tell the sizer to set the minimal size of the window virtual area to
9611 match the sizer's minimal size. For windows with managed scrollbars
9612 this will set them appropriately.
9614 :see: `wx.ScrolledWindow.SetScrollbars`
9617 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
9619 def Clear(*args
, **kwargs
):
9621 Clear(self, bool deleteWindows=False)
9623 Clear all items from the sizer, optionally destroying the window items
9626 return _core_
.Sizer_Clear(*args
, **kwargs
)
9628 def DeleteWindows(*args
, **kwargs
):
9632 Destroy all windows managed by the sizer.
9634 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
9636 def GetChildren(*args
, **kwargs
):
9638 GetChildren(self) -> list
9640 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9642 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
9644 def Show(*args
, **kwargs
):
9646 Show(self, item, bool show=True, bool recursive=false) -> bool
9648 Shows or hides an item managed by the sizer. To make a sizer item
9649 disappear or reappear, use Show followed by `Layout`. The *item*
9650 parameter can be either a window, a sizer, or the zero-based index of
9651 the item. Use the recursive parameter to show or hide an item in a
9652 subsizer. Returns True if the item was found.
9654 return _core_
.Sizer_Show(*args
, **kwargs
)
9656 def IsShown(*args
, **kwargs
):
9660 Determines if the item is currently shown. sizer. To make a sizer
9661 item disappear or reappear, use Show followed by `Layout`. The *item*
9662 parameter can be either a window, a sizer, or the zero-based index of
9665 return _core_
.Sizer_IsShown(*args
, **kwargs
)
9667 def Hide(self
, item
, recursive
=False):
9669 A convenience method for Show(item, False, recursive).
9671 return self
.Show(item
, False, recursive
)
9673 def ShowItems(*args
, **kwargs
):
9675 ShowItems(self, bool show)
9677 Recursively call `wx.SizerItem.Show` on all sizer items.
9679 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
9682 class SizerPtr(Sizer
):
9683 def __init__(self
, this
):
9685 if not hasattr(self
,"thisown"): self
.thisown
= 0
9686 self
.__class
__ = Sizer
9687 _core_
.Sizer_swigregister(SizerPtr
)
9689 class PySizer(Sizer
):
9691 wx.PySizer is a special version of `wx.Sizer` that has been
9692 instrumented to allow the C++ virtual methods to be overloaded in
9693 Python derived classes. You would derive from this class if you are
9694 wanting to implement a custom sizer in Python code. Simply implement
9695 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9698 class MySizer(wx.PySizer):
9700 wx.PySizer.__init__(self)
9703 for item in self.GetChildren():
9704 # calculate the total minimum width and height needed
9705 # by all items in the sizer according to this sizer's
9708 return wx.Size(width, height)
9710 def RecalcSizes(self):
9711 # find the space allotted to this sizer
9712 pos = self.GetPosition()
9713 size = self.GetSize()
9714 for item in self.GetChildren():
9715 # Recalculate (if necessary) the position and size of
9716 # each item and then call item.SetDimension to do the
9717 # actual positioning and sizing of the items within the
9718 # space alloted to this sizer.
9720 item.SetDimension(itemPos, itemSize)
9723 When `Layout` is called it first calls `CalcMin` followed by
9724 `RecalcSizes` so you can optimize a bit by saving the results of
9725 `CalcMin` and reusing them in `RecalcSizes`.
9727 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9732 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9733 def __init__(self
, *args
, **kwargs
):
9735 __init__(self) -> PySizer
9737 Creates a wx.PySizer. Must be called from the __init__ in the derived
9740 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
9741 self
.this
= newobj
.this
9744 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
9746 def _setCallbackInfo(*args
, **kwargs
):
9747 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9748 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
9751 class PySizerPtr(PySizer
):
9752 def __init__(self
, this
):
9754 if not hasattr(self
,"thisown"): self
.thisown
= 0
9755 self
.__class
__ = PySizer
9756 _core_
.PySizer_swigregister(PySizerPtr
)
9758 #---------------------------------------------------------------------------
9760 class BoxSizer(Sizer
):
9762 The basic idea behind a box sizer is that windows will most often be
9763 laid out in rather simple basic geometry, typically in a row or a
9764 column or nested hierarchies of either. A wx.BoxSizer will lay out
9765 its items in a simple row or column, depending on the orientation
9766 parameter passed to the constructor.
9769 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9770 def __init__(self
, *args
, **kwargs
):
9772 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9774 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9775 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9778 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
9779 self
.this
= newobj
.this
9782 self
._setOORInfo
(self
)
9784 def GetOrientation(*args
, **kwargs
):
9786 GetOrientation(self) -> int
9788 Returns the current orientation of the sizer.
9790 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
9792 def SetOrientation(*args
, **kwargs
):
9794 SetOrientation(self, int orient)
9796 Resets the orientation of the sizer.
9798 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
9801 class BoxSizerPtr(BoxSizer
):
9802 def __init__(self
, this
):
9804 if not hasattr(self
,"thisown"): self
.thisown
= 0
9805 self
.__class
__ = BoxSizer
9806 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
9808 #---------------------------------------------------------------------------
9810 class StaticBoxSizer(BoxSizer
):
9812 wx.StaticBoxSizer derives from and functions identically to the
9813 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9814 manages. Note that this static box must be created separately and
9815 passed to the sizer constructor.
9818 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9819 def __init__(self
, *args
, **kwargs
):
9821 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9823 Constructor. It takes an associated static box and the orientation
9824 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9827 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
9828 self
.this
= newobj
.this
9831 self
._setOORInfo
(self
)
9833 def GetStaticBox(*args
, **kwargs
):
9835 GetStaticBox(self) -> StaticBox
9837 Returns the static box associated with this sizer.
9839 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
9842 class StaticBoxSizerPtr(StaticBoxSizer
):
9843 def __init__(self
, this
):
9845 if not hasattr(self
,"thisown"): self
.thisown
= 0
9846 self
.__class
__ = StaticBoxSizer
9847 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
9849 #---------------------------------------------------------------------------
9851 class GridSizer(Sizer
):
9853 A grid sizer is a sizer which lays out its children in a
9854 two-dimensional table with all cells having the same size. In other
9855 words, the width of each cell within the grid is the width of the
9856 widest item added to the sizer and the height of each grid cell is the
9857 height of the tallest item. An optional vertical and/or horizontal
9858 gap between items can also be specified (in pixels.)
9860 Items are placed in the cells of the grid in the order they are added,
9861 in row-major order. In other words, the first row is filled first,
9862 then the second, and so on until all items have been added. (If
9863 neccessary, additional rows will be added as items are added.) If you
9864 need to have greater control over the cells that items are placed in
9865 then use the `wx.GridBagSizer`.
9869 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9870 def __init__(self
, *args
, **kwargs
):
9872 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9874 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9875 of columns and rows in the sizer - if either of the parameters is
9876 zero, it will be calculated to from the total number of children in
9877 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9878 define extra space between all children.
9880 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
9881 self
.this
= newobj
.this
9884 self
._setOORInfo
(self
)
9886 def SetCols(*args
, **kwargs
):
9888 SetCols(self, int cols)
9890 Sets the number of columns in the sizer.
9892 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
9894 def SetRows(*args
, **kwargs
):
9896 SetRows(self, int rows)
9898 Sets the number of rows in the sizer.
9900 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
9902 def SetVGap(*args
, **kwargs
):
9904 SetVGap(self, int gap)
9906 Sets the vertical gap (in pixels) between the cells in the sizer.
9908 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
9910 def SetHGap(*args
, **kwargs
):
9912 SetHGap(self, int gap)
9914 Sets the horizontal gap (in pixels) between cells in the sizer
9916 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
9918 def GetCols(*args
, **kwargs
):
9920 GetCols(self) -> int
9922 Returns the number of columns in the sizer.
9924 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
9926 def GetRows(*args
, **kwargs
):
9928 GetRows(self) -> int
9930 Returns the number of rows in the sizer.
9932 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
9934 def GetVGap(*args
, **kwargs
):
9936 GetVGap(self) -> int
9938 Returns the vertical gap (in pixels) between the cells in the sizer.
9940 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
9942 def GetHGap(*args
, **kwargs
):
9944 GetHGap(self) -> int
9946 Returns the horizontal gap (in pixels) between cells in the sizer.
9948 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
9951 class GridSizerPtr(GridSizer
):
9952 def __init__(self
, this
):
9954 if not hasattr(self
,"thisown"): self
.thisown
= 0
9955 self
.__class
__ = GridSizer
9956 _core_
.GridSizer_swigregister(GridSizerPtr
)
9958 #---------------------------------------------------------------------------
9960 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
9961 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
9962 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
9963 class FlexGridSizer(GridSizer
):
9965 A flex grid sizer is a sizer which lays out its children in a
9966 two-dimensional table with all table cells in one row having the same
9967 height and all cells in one column having the same width, but all
9968 rows or all columns are not necessarily the same height or width as in
9971 wx.FlexGridSizer can also size items equally in one direction but
9972 unequally ("flexibly") in the other. If the sizer is only flexible
9973 in one direction (this can be changed using `SetFlexibleDirection`), it
9974 needs to be decided how the sizer should grow in the other ("non
9975 flexible") direction in order to fill the available space. The
9976 `SetNonFlexibleGrowMode` method serves this purpose.
9981 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9982 def __init__(self
, *args
, **kwargs
):
9984 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9986 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9987 number of columns and rows in the sizer - if either of the parameters
9988 is zero, it will be calculated to from the total number of children in
9989 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9990 define extra space between all children.
9992 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
9993 self
.this
= newobj
.this
9996 self
._setOORInfo
(self
)
9998 def AddGrowableRow(*args
, **kwargs
):
10000 AddGrowableRow(self, size_t idx, int proportion=0)
10002 Specifies that row *idx* (starting from zero) should be grown if there
10003 is extra space available to the sizer.
10005 The *proportion* parameter has the same meaning as the stretch factor
10006 for the box sizers except that if all proportions are 0, then all
10007 columns are resized equally (instead of not being resized at all).
10009 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
10011 def RemoveGrowableRow(*args
, **kwargs
):
10013 RemoveGrowableRow(self, size_t idx)
10015 Specifies that row *idx* is no longer growable.
10017 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
10019 def AddGrowableCol(*args
, **kwargs
):
10021 AddGrowableCol(self, size_t idx, int proportion=0)
10023 Specifies that column *idx* (starting from zero) should be grown if
10024 there is extra space available to the sizer.
10026 The *proportion* parameter has the same meaning as the stretch factor
10027 for the box sizers except that if all proportions are 0, then all
10028 columns are resized equally (instead of not being resized at all).
10030 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
10032 def RemoveGrowableCol(*args
, **kwargs
):
10034 RemoveGrowableCol(self, size_t idx)
10036 Specifies that column *idx* is no longer growable.
10038 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
10040 def SetFlexibleDirection(*args
, **kwargs
):
10042 SetFlexibleDirection(self, int direction)
10044 Specifies whether the sizer should flexibly resize its columns, rows,
10045 or both. Argument *direction* can be one of the following values. Any
10046 other value is ignored.
10048 ============== =======================================
10049 wx.VERTICAL Rows are flexibly sized.
10050 wx.HORIZONTAL Columns are flexibly sized.
10051 wx.BOTH Both rows and columns are flexibly sized
10052 (this is the default value).
10053 ============== =======================================
10055 Note that this method does not trigger relayout.
10058 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
10060 def GetFlexibleDirection(*args
, **kwargs
):
10062 GetFlexibleDirection(self) -> int
10064 Returns a value that specifies whether the sizer
10065 flexibly resizes its columns, rows, or both (default).
10067 :see: `SetFlexibleDirection`
10069 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
10071 def SetNonFlexibleGrowMode(*args
, **kwargs
):
10073 SetNonFlexibleGrowMode(self, int mode)
10075 Specifies how the sizer should grow in the non-flexible direction if
10076 there is one (so `SetFlexibleDirection` must have been called
10077 previously). Argument *mode* can be one of the following values:
10079 ========================== =================================================
10080 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10081 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10082 `AddGrowableCol` and `AddGrowableRow`. In this
10083 case equal sizing applies to minimum sizes of
10084 columns or rows (this is the default value).
10085 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10086 the non flexible direction, whether they are
10087 growable or not in the flexbile direction.
10088 ========================== =================================================
10090 Note that this method does not trigger relayout.
10094 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
10096 def GetNonFlexibleGrowMode(*args
, **kwargs
):
10098 GetNonFlexibleGrowMode(self) -> int
10100 Returns the value that specifies how the sizer grows in the
10101 non-flexible direction if there is one.
10103 :see: `SetNonFlexibleGrowMode`
10105 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
10107 def GetRowHeights(*args
, **kwargs
):
10109 GetRowHeights(self) -> list
10111 Returns a list of integers representing the heights of each of the
10114 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
10116 def GetColWidths(*args
, **kwargs
):
10118 GetColWidths(self) -> list
10120 Returns a list of integers representing the widths of each of the
10121 columns in the sizer.
10123 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
10126 class FlexGridSizerPtr(FlexGridSizer
):
10127 def __init__(self
, this
):
10129 if not hasattr(self
,"thisown"): self
.thisown
= 0
10130 self
.__class
__ = FlexGridSizer
10131 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
10133 class StdDialogButtonSizer(BoxSizer
):
10135 A special sizer that knows how to order and position standard buttons
10136 in order to conform to the current platform's standards. You simply
10137 need to add each `wx.Button` to the sizer, and be sure to create the
10138 buttons using the standard ID's. Then call `Finalize` and the sizer
10139 will take care of the rest.
10142 def __repr__(self
):
10143 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10144 def __init__(self
, *args
, **kwargs
):
10145 """__init__(self) -> StdDialogButtonSizer"""
10146 newobj
= _core_
.new_StdDialogButtonSizer(*args
, **kwargs
)
10147 self
.this
= newobj
.this
10150 def AddButton(*args
, **kwargs
):
10152 AddButton(self, wxButton button)
10154 Use this to add the buttons to this sizer. Do not use the `Add`
10155 method in the base class.
10157 return _core_
.StdDialogButtonSizer_AddButton(*args
, **kwargs
)
10159 def Finalise(*args
, **kwargs
):
10163 This funciton needs to be called after all the buttons have been added
10164 to the sizer. It will reorder them and position them in a platform
10167 return _core_
.StdDialogButtonSizer_Finalise(*args
, **kwargs
)
10169 def SetAffirmativeButton(*args
, **kwargs
):
10170 """SetAffirmativeButton(self, wxButton button)"""
10171 return _core_
.StdDialogButtonSizer_SetAffirmativeButton(*args
, **kwargs
)
10173 def SetNegativeButton(*args
, **kwargs
):
10174 """SetNegativeButton(self, wxButton button)"""
10175 return _core_
.StdDialogButtonSizer_SetNegativeButton(*args
, **kwargs
)
10177 def SetCancelButton(*args
, **kwargs
):
10178 """SetCancelButton(self, wxButton button)"""
10179 return _core_
.StdDialogButtonSizer_SetCancelButton(*args
, **kwargs
)
10181 def GetAffirmativeButton(*args
, **kwargs
):
10182 """GetAffirmativeButton(self) -> wxButton"""
10183 return _core_
.StdDialogButtonSizer_GetAffirmativeButton(*args
, **kwargs
)
10185 def GetApplyButton(*args
, **kwargs
):
10186 """GetApplyButton(self) -> wxButton"""
10187 return _core_
.StdDialogButtonSizer_GetApplyButton(*args
, **kwargs
)
10189 def GetNegativeButton(*args
, **kwargs
):
10190 """GetNegativeButton(self) -> wxButton"""
10191 return _core_
.StdDialogButtonSizer_GetNegativeButton(*args
, **kwargs
)
10193 def GetCancelButton(*args
, **kwargs
):
10194 """GetCancelButton(self) -> wxButton"""
10195 return _core_
.StdDialogButtonSizer_GetCancelButton(*args
, **kwargs
)
10197 def GetHelpButton(*args
, **kwargs
):
10198 """GetHelpButton(self) -> wxButton"""
10199 return _core_
.StdDialogButtonSizer_GetHelpButton(*args
, **kwargs
)
10202 class StdDialogButtonSizerPtr(StdDialogButtonSizer
):
10203 def __init__(self
, this
):
10205 if not hasattr(self
,"thisown"): self
.thisown
= 0
10206 self
.__class
__ = StdDialogButtonSizer
10207 _core_
.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr
)
10209 #---------------------------------------------------------------------------
10211 class GBPosition(object):
10213 This class represents the position of an item in a virtual grid of
10214 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10215 typemaps that will automatically convert from a 2-element sequence of
10216 integers to a wx.GBPosition, so you can use the more pythonic
10217 representation of the position nearly transparently in Python code.
10219 def __repr__(self
):
10220 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10221 def __init__(self
, *args
, **kwargs
):
10223 __init__(self, int row=0, int col=0) -> GBPosition
10225 This class represents the position of an item in a virtual grid of
10226 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10227 typemaps that will automatically convert from a 2-element sequence of
10228 integers to a wx.GBPosition, so you can use the more pythonic
10229 representation of the position nearly transparently in Python code.
10231 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
10232 self
.this
= newobj
.this
10235 def GetRow(*args
, **kwargs
):
10236 """GetRow(self) -> int"""
10237 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
10239 def GetCol(*args
, **kwargs
):
10240 """GetCol(self) -> int"""
10241 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
10243 def SetRow(*args
, **kwargs
):
10244 """SetRow(self, int row)"""
10245 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
10247 def SetCol(*args
, **kwargs
):
10248 """SetCol(self, int col)"""
10249 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
10251 def __eq__(*args
, **kwargs
):
10252 """__eq__(self, GBPosition other) -> bool"""
10253 return _core_
.GBPosition___eq__(*args
, **kwargs
)
10255 def __ne__(*args
, **kwargs
):
10256 """__ne__(self, GBPosition other) -> bool"""
10257 return _core_
.GBPosition___ne__(*args
, **kwargs
)
10259 def Set(*args
, **kwargs
):
10260 """Set(self, int row=0, int col=0)"""
10261 return _core_
.GBPosition_Set(*args
, **kwargs
)
10263 def Get(*args
, **kwargs
):
10264 """Get(self) -> PyObject"""
10265 return _core_
.GBPosition_Get(*args
, **kwargs
)
10267 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10268 def __str__(self
): return str(self
.Get())
10269 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
10270 def __len__(self
): return len(self
.Get())
10271 def __getitem__(self
, index
): return self
.Get()[index
]
10272 def __setitem__(self
, index
, val
):
10273 if index
== 0: self
.SetRow(val
)
10274 elif index
== 1: self
.SetCol(val
)
10275 else: raise IndexError
10276 def __nonzero__(self
): return self
.Get() != (0,0)
10277 __safe_for_unpickling__
= True
10278 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
10280 row
= property(GetRow
, SetRow
)
10281 col
= property(GetCol
, SetCol
)
10284 class GBPositionPtr(GBPosition
):
10285 def __init__(self
, this
):
10287 if not hasattr(self
,"thisown"): self
.thisown
= 0
10288 self
.__class
__ = GBPosition
10289 _core_
.GBPosition_swigregister(GBPositionPtr
)
10291 class GBSpan(object):
10293 This class is used to hold the row and column spanning attributes of
10294 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10295 automatically convert from a 2-element sequence of integers to a
10296 wx.GBSpan, so you can use the more pythonic representation of the span
10297 nearly transparently in Python code.
10300 def __repr__(self
):
10301 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10302 def __init__(self
, *args
, **kwargs
):
10304 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10306 Construct a new wxGBSpan, optionally setting the rowspan and
10307 colspan. The default is (1,1). (Meaning that the item occupies one
10308 cell in each direction.
10310 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
10311 self
.this
= newobj
.this
10314 def GetRowspan(*args
, **kwargs
):
10315 """GetRowspan(self) -> int"""
10316 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
10318 def GetColspan(*args
, **kwargs
):
10319 """GetColspan(self) -> int"""
10320 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
10322 def SetRowspan(*args
, **kwargs
):
10323 """SetRowspan(self, int rowspan)"""
10324 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
10326 def SetColspan(*args
, **kwargs
):
10327 """SetColspan(self, int colspan)"""
10328 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
10330 def __eq__(*args
, **kwargs
):
10331 """__eq__(self, GBSpan other) -> bool"""
10332 return _core_
.GBSpan___eq__(*args
, **kwargs
)
10334 def __ne__(*args
, **kwargs
):
10335 """__ne__(self, GBSpan other) -> bool"""
10336 return _core_
.GBSpan___ne__(*args
, **kwargs
)
10338 def Set(*args
, **kwargs
):
10339 """Set(self, int rowspan=1, int colspan=1)"""
10340 return _core_
.GBSpan_Set(*args
, **kwargs
)
10342 def Get(*args
, **kwargs
):
10343 """Get(self) -> PyObject"""
10344 return _core_
.GBSpan_Get(*args
, **kwargs
)
10346 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10347 def __str__(self
): return str(self
.Get())
10348 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
10349 def __len__(self
): return len(self
.Get())
10350 def __getitem__(self
, index
): return self
.Get()[index
]
10351 def __setitem__(self
, index
, val
):
10352 if index
== 0: self
.SetRowspan(val
)
10353 elif index
== 1: self
.SetColspan(val
)
10354 else: raise IndexError
10355 def __nonzero__(self
): return self
.Get() != (0,0)
10356 __safe_for_unpickling__
= True
10357 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
10359 rowspan
= property(GetRowspan
, SetRowspan
)
10360 colspan
= property(GetColspan
, SetColspan
)
10363 class GBSpanPtr(GBSpan
):
10364 def __init__(self
, this
):
10366 if not hasattr(self
,"thisown"): self
.thisown
= 0
10367 self
.__class
__ = GBSpan
10368 _core_
.GBSpan_swigregister(GBSpanPtr
)
10370 class GBSizerItem(SizerItem
):
10372 The wx.GBSizerItem class is used to track the additional data about
10373 items in a `wx.GridBagSizer` such as the item's position in the grid
10374 and how many rows or columns it spans.
10377 def __repr__(self
):
10378 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10379 def __init__(self
, *args
, **kwargs
):
10381 __init__(self) -> GBSizerItem
10383 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10384 size will need to be set, as well as a position and span before this
10385 item can be used in a Sizer.
10387 You will probably never need to create a wx.GBSizerItem directly as they
10388 are created automatically when the sizer's Add method is called.
10390 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
10391 self
.this
= newobj
.this
10394 def GetPos(*args
, **kwargs
):
10396 GetPos(self) -> GBPosition
10398 Get the grid position of the item
10400 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
10402 def GetPosTuple(self
): return self
.GetPos().Get()
10403 def GetSpan(*args
, **kwargs
):
10405 GetSpan(self) -> GBSpan
10407 Get the row and column spanning of the item
10409 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
10411 def GetSpanTuple(self
): return self
.GetSpan().Get()
10412 def SetPos(*args
, **kwargs
):
10414 SetPos(self, GBPosition pos) -> bool
10416 If the item is already a member of a sizer then first ensure that
10417 there is no other item that would intersect with this one at the new
10418 position, then set the new position. Returns True if the change is
10419 successful and after the next Layout() the item will be moved.
10421 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
10423 def SetSpan(*args
, **kwargs
):
10425 SetSpan(self, GBSpan span) -> bool
10427 If the item is already a member of a sizer then first ensure that
10428 there is no other item that would intersect with this one with its new
10429 spanning size, then set the new spanning. Returns True if the change
10430 is successful and after the next Layout() the item will be resized.
10433 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
10435 def Intersects(*args
, **kwargs
):
10437 Intersects(self, GBSizerItem other) -> bool
10439 Returns True if this item and the other item instersect.
10441 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
10443 def IntersectsPos(*args
, **kwargs
):
10445 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10447 Returns True if the given pos/span would intersect with this item.
10449 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
10451 def GetEndPos(*args
, **kwargs
):
10453 GetEndPos(self) -> GBPosition
10455 Get the row and column of the endpoint of this item.
10457 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
10459 def GetGBSizer(*args
, **kwargs
):
10461 GetGBSizer(self) -> GridBagSizer
10463 Get the sizer this item is a member of.
10465 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
10467 def SetGBSizer(*args
, **kwargs
):
10469 SetGBSizer(self, GridBagSizer sizer)
10471 Set the sizer this item is a member of.
10473 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
10476 class GBSizerItemPtr(GBSizerItem
):
10477 def __init__(self
, this
):
10479 if not hasattr(self
,"thisown"): self
.thisown
= 0
10480 self
.__class
__ = GBSizerItem
10481 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
10482 DefaultSpan
= cvar
.DefaultSpan
10484 def GBSizerItemWindow(*args
, **kwargs
):
10486 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10487 int border, PyObject userData=None) -> GBSizerItem
10489 Construct a `wx.GBSizerItem` for a window.
10491 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
10495 def GBSizerItemSizer(*args
, **kwargs
):
10497 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10498 int border, PyObject userData=None) -> GBSizerItem
10500 Construct a `wx.GBSizerItem` for a sizer
10502 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
10506 def GBSizerItemSpacer(*args
, **kwargs
):
10508 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10509 int flag, int border, PyObject userData=None) -> GBSizerItem
10511 Construct a `wx.GBSizerItem` for a spacer.
10513 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
10517 class GridBagSizer(FlexGridSizer
):
10519 A `wx.Sizer` that can lay out items in a virtual grid like a
10520 `wx.FlexGridSizer` but in this case explicit positioning of the items
10521 is allowed using `wx.GBPosition`, and items can optionally span more
10522 than one row and/or column using `wx.GBSpan`. The total size of the
10523 virtual grid is determined by the largest row and column that items are
10524 positioned at, adjusted for spanning.
10527 def __repr__(self
):
10528 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10529 def __init__(self
, *args
, **kwargs
):
10531 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10533 Constructor, with optional parameters to specify the gap between the
10536 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
10537 self
.this
= newobj
.this
10540 self
._setOORInfo
(self
)
10542 def Add(*args
, **kwargs
):
10544 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10545 int border=0, userData=None) -> wx.GBSizerItem
10547 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10548 more than one row or column as specified with *span*. The remaining
10549 args behave similarly to `wx.Sizer.Add`.
10551 Returns True if the item was successfully placed at the given cell
10552 position, False if something was already there.
10555 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
10557 def AddItem(*args
, **kwargs
):
10559 Add(self, GBSizerItem item) -> wx.GBSizerItem
10561 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10562 the item was successfully placed at its given cell position, False if
10563 something was already there.
10565 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
10567 def GetCellSize(*args
, **kwargs
):
10569 GetCellSize(self, int row, int col) -> Size
10571 Get the size of the specified cell, including hgap and
10572 vgap. Only valid after a Layout.
10574 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
10576 def GetEmptyCellSize(*args
, **kwargs
):
10578 GetEmptyCellSize(self) -> Size
10580 Get the size used for cells in the grid with no item.
10582 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
10584 def SetEmptyCellSize(*args
, **kwargs
):
10586 SetEmptyCellSize(self, Size sz)
10588 Set the size used for cells in the grid with no item.
10590 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
10592 def GetItemPosition(*args
):
10594 GetItemPosition(self, item) -> GBPosition
10596 Get the grid position of the specified *item* where *item* is either a
10597 window or subsizer that is a member of this sizer, or a zero-based
10600 return _core_
.GridBagSizer_GetItemPosition(*args
)
10602 def SetItemPosition(*args
):
10604 SetItemPosition(self, item, GBPosition pos) -> bool
10606 Set the grid position of the specified *item* where *item* is either a
10607 window or subsizer that is a member of this sizer, or a zero-based
10608 index of an item. Returns True on success. If the move is not
10609 allowed (because an item is already there) then False is returned.
10612 return _core_
.GridBagSizer_SetItemPosition(*args
)
10614 def GetItemSpan(*args
):
10616 GetItemSpan(self, item) -> GBSpan
10618 Get the row/col spanning of the specified *item* where *item* is
10619 either a window or subsizer that is a member of this sizer, or a
10620 zero-based index of an item.
10622 return _core_
.GridBagSizer_GetItemSpan(*args
)
10624 def SetItemSpan(*args
):
10626 SetItemSpan(self, item, GBSpan span) -> bool
10628 Set the row/col spanning of the specified *item* where *item* is
10629 either a window or subsizer that is a member of this sizer, or a
10630 zero-based index of an item. Returns True on success. If the move is
10631 not allowed (because an item is already there) then False is returned.
10633 return _core_
.GridBagSizer_SetItemSpan(*args
)
10635 def FindItem(*args
):
10637 FindItem(self, item) -> GBSizerItem
10639 Find the sizer item for the given window or subsizer, returns None if
10640 not found. (non-recursive)
10642 return _core_
.GridBagSizer_FindItem(*args
)
10644 def FindItemAtPosition(*args
, **kwargs
):
10646 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10648 Return the sizer item for the given grid cell, or None if there is no
10649 item at that position. (non-recursive)
10651 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
10653 def FindItemAtPoint(*args
, **kwargs
):
10655 FindItemAtPoint(self, Point pt) -> GBSizerItem
10657 Return the sizer item located at the point given in *pt*, or None if
10658 there is no item at that point. The (x,y) coordinates in pt correspond
10659 to the client coordinates of the window using the sizer for
10660 layout. (non-recursive)
10662 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
10664 def CheckForIntersection(*args
, **kwargs
):
10666 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10668 Look at all items and see if any intersect (or would overlap) the
10669 given *item*. Returns True if so, False if there would be no overlap.
10670 If an *excludeItem* is given then it will not be checked for
10671 intersection, for example it may be the item we are checking the
10675 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
10677 def CheckForIntersectionPos(*args
, **kwargs
):
10679 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10681 Look at all items and see if any intersect (or would overlap) the
10682 given position and span. Returns True if so, False if there would be
10683 no overlap. If an *excludeItem* is given then it will not be checked
10684 for intersection, for example it may be the item we are checking the
10687 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
10690 class GridBagSizerPtr(GridBagSizer
):
10691 def __init__(self
, this
):
10693 if not hasattr(self
,"thisown"): self
.thisown
= 0
10694 self
.__class
__ = GridBagSizer
10695 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
10697 #---------------------------------------------------------------------------
10701 Right
= _core_
.Right
10702 Bottom
= _core_
.Bottom
10703 Width
= _core_
.Width
10704 Height
= _core_
.Height
10705 Centre
= _core_
.Centre
10706 Center
= _core_
.Center
10707 CentreX
= _core_
.CentreX
10708 CentreY
= _core_
.CentreY
10709 Unconstrained
= _core_
.Unconstrained
10711 PercentOf
= _core_
.PercentOf
10712 Above
= _core_
.Above
10713 Below
= _core_
.Below
10714 LeftOf
= _core_
.LeftOf
10715 RightOf
= _core_
.RightOf
10716 SameAs
= _core_
.SameAs
10717 Absolute
= _core_
.Absolute
10718 class IndividualLayoutConstraint(Object
):
10720 Objects of this class are stored in the `wx.LayoutConstraints` class as
10721 one of eight possible constraints that a window can be involved in.
10722 You will never need to create an instance of
10723 wx.IndividualLayoutConstraint, rather you should create a
10724 `wx.LayoutConstraints` instance and use the individual contstraints
10727 def __init__(self
): raise RuntimeError, "No constructor defined"
10728 def __repr__(self
):
10729 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10730 def Set(*args
, **kwargs
):
10732 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10734 Sets the properties of the constraint. Normally called by one of the
10735 convenience functions such as Above, RightOf, SameAs.
10737 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
10739 def LeftOf(*args
, **kwargs
):
10741 LeftOf(self, Window sibling, int marg=0)
10743 Constrains this edge to be to the left of the given window, with an
10744 optional margin. Implicitly, this is relative to the left edge of the
10747 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
10749 def RightOf(*args
, **kwargs
):
10751 RightOf(self, Window sibling, int marg=0)
10753 Constrains this edge to be to the right of the given window, with an
10754 optional margin. Implicitly, this is relative to the right edge of the
10757 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
10759 def Above(*args
, **kwargs
):
10761 Above(self, Window sibling, int marg=0)
10763 Constrains this edge to be above the given window, with an optional
10764 margin. Implicitly, this is relative to the top edge of the other
10767 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
10769 def Below(*args
, **kwargs
):
10771 Below(self, Window sibling, int marg=0)
10773 Constrains this edge to be below the given window, with an optional
10774 margin. Implicitly, this is relative to the bottom edge of the other
10777 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
10779 def SameAs(*args
, **kwargs
):
10781 SameAs(self, Window otherW, int edge, int marg=0)
10783 Constrains this edge or dimension to be to the same as the edge of the
10784 given window, with an optional margin.
10786 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
10788 def PercentOf(*args
, **kwargs
):
10790 PercentOf(self, Window otherW, int wh, int per)
10792 Constrains this edge or dimension to be to a percentage of the given
10793 window, with an optional margin.
10795 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
10797 def Absolute(*args
, **kwargs
):
10799 Absolute(self, int val)
10801 Constrains this edge or dimension to be the given absolute value.
10803 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
10805 def Unconstrained(*args
, **kwargs
):
10807 Unconstrained(self)
10809 Sets this edge or dimension to be unconstrained, that is, dependent on
10810 other edges and dimensions from which this value can be deduced.
10812 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
10814 def AsIs(*args
, **kwargs
):
10818 Sets this edge or constraint to be whatever the window's value is at
10819 the moment. If either of the width and height constraints are *as is*,
10820 the window will not be resized, but moved instead. This is important
10821 when considering panel items which are intended to have a default
10822 size, such as a button, which may take its size from the size of the
10825 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
10827 def GetOtherWindow(*args
, **kwargs
):
10828 """GetOtherWindow(self) -> Window"""
10829 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
10831 def GetMyEdge(*args
, **kwargs
):
10832 """GetMyEdge(self) -> int"""
10833 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
10835 def SetEdge(*args
, **kwargs
):
10836 """SetEdge(self, int which)"""
10837 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
10839 def SetValue(*args
, **kwargs
):
10840 """SetValue(self, int v)"""
10841 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
10843 def GetMargin(*args
, **kwargs
):
10844 """GetMargin(self) -> int"""
10845 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
10847 def SetMargin(*args
, **kwargs
):
10848 """SetMargin(self, int m)"""
10849 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
10851 def GetValue(*args
, **kwargs
):
10852 """GetValue(self) -> int"""
10853 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
10855 def GetPercent(*args
, **kwargs
):
10856 """GetPercent(self) -> int"""
10857 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
10859 def GetOtherEdge(*args
, **kwargs
):
10860 """GetOtherEdge(self) -> int"""
10861 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
10863 def GetDone(*args
, **kwargs
):
10864 """GetDone(self) -> bool"""
10865 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
10867 def SetDone(*args
, **kwargs
):
10868 """SetDone(self, bool d)"""
10869 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
10871 def GetRelationship(*args
, **kwargs
):
10872 """GetRelationship(self) -> int"""
10873 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
10875 def SetRelationship(*args
, **kwargs
):
10876 """SetRelationship(self, int r)"""
10877 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
10879 def ResetIfWin(*args
, **kwargs
):
10881 ResetIfWin(self, Window otherW) -> bool
10883 Reset constraint if it mentions otherWin
10885 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
10887 def SatisfyConstraint(*args
, **kwargs
):
10889 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10891 Try to satisfy constraint
10893 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
10895 def GetEdge(*args
, **kwargs
):
10897 GetEdge(self, int which, Window thisWin, Window other) -> int
10899 Get the value of this edge or dimension, or if this
10900 is not determinable, -1.
10902 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
10905 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
10906 def __init__(self
, this
):
10908 if not hasattr(self
,"thisown"): self
.thisown
= 0
10909 self
.__class
__ = IndividualLayoutConstraint
10910 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
10912 class LayoutConstraints(Object
):
10914 **Note:** constraints are now deprecated and you should use sizers
10917 Objects of this class can be associated with a window to define its
10918 layout constraints, with respect to siblings or its parent.
10920 The class consists of the following eight constraints of class
10921 wx.IndividualLayoutConstraint, some or all of which should be accessed
10922 directly to set the appropriate constraints.
10924 * left: represents the left hand edge of the window
10925 * right: represents the right hand edge of the window
10926 * top: represents the top edge of the window
10927 * bottom: represents the bottom edge of the window
10928 * width: represents the width of the window
10929 * height: represents the height of the window
10930 * centreX: represents the horizontal centre point of the window
10931 * centreY: represents the vertical centre point of the window
10933 Most constraints are initially set to have the relationship
10934 wxUnconstrained, which means that their values should be calculated by
10935 looking at known constraints. The exceptions are width and height,
10936 which are set to wxAsIs to ensure that if the user does not specify a
10937 constraint, the existing width and height will be used, to be
10938 compatible with panel items which often have take a default size. If
10939 the constraint is ``wx.AsIs``, the dimension will not be changed.
10941 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
10944 def __repr__(self
):
10945 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10946 left
= property(_core_
.LayoutConstraints_left_get
)
10947 top
= property(_core_
.LayoutConstraints_top_get
)
10948 right
= property(_core_
.LayoutConstraints_right_get
)
10949 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
10950 width
= property(_core_
.LayoutConstraints_width_get
)
10951 height
= property(_core_
.LayoutConstraints_height_get
)
10952 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
10953 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
10954 def __init__(self
, *args
, **kwargs
):
10955 """__init__(self) -> LayoutConstraints"""
10956 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
10957 self
.this
= newobj
.this
10960 def SatisfyConstraints(*args
, **kwargs
):
10961 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
10962 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
10964 def AreSatisfied(*args
, **kwargs
):
10965 """AreSatisfied(self) -> bool"""
10966 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
10969 class LayoutConstraintsPtr(LayoutConstraints
):
10970 def __init__(self
, this
):
10972 if not hasattr(self
,"thisown"): self
.thisown
= 0
10973 self
.__class
__ = LayoutConstraints
10974 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
10976 #----------------------------------------------------------------------------
10978 # Use Python's bool constants if available, make some if not
10982 __builtins__
.True = 1==1
10983 __builtins__
.False = 1==0
10984 def bool(value
): return not not value
10985 __builtins__
.bool = bool
10989 # workarounds for bad wxRTTI names
10990 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
10991 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
10992 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
10995 #----------------------------------------------------------------------------
10996 # Load version numbers from __version__... Ensure that major and minor
10997 # versions are the same for both wxPython and wxWidgets.
10999 from __version__
import *
11000 __version__
= VERSION_STRING
11002 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
11003 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
11004 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
11006 warnings
.warn("wxPython/wxWidgets release number mismatch")
11008 #----------------------------------------------------------------------------
11010 # Set the default string<-->unicode conversion encoding from the
11011 # locale. This encoding is used when string or unicode objects need
11012 # to be converted in order to pass them to wxWidgets. Please be aware
11013 # that the default encoding within the same locale may be slightly
11014 # different on different platforms. For example, please see
11015 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11016 # between the common latin/roman encodings.
11018 default
= locale
.getdefaultlocale()[1]
11020 wx
.SetDefaultPyEncoding(default
)
11024 #----------------------------------------------------------------------------
11026 class PyDeadObjectError(AttributeError):
11029 class _wxPyDeadObject(object):
11031 Instances of wx objects that are OOR capable will have their __class__
11032 changed to this class when the C++ object is deleted. This should help
11033 prevent crashes due to referencing a bogus C++ pointer.
11035 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11036 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11038 def __repr__(self
):
11039 if not hasattr(self
, "_name"):
11040 self
._name
= "[unknown]"
11041 return self
.reprStr
% self
._name
11043 def __getattr__(self
, *args
):
11044 if not hasattr(self
, "_name"):
11045 self
._name
= "[unknown]"
11046 raise PyDeadObjectError(self
.attrStr
% self
._name
)
11048 def __nonzero__(self
):
11053 class PyUnbornObjectError(AttributeError):
11056 class _wxPyUnbornObject(object):
11058 Some stock objects are created when the wx._core module is
11059 imported, but their C++ instance is not created until the wx.App
11060 object is created and initialized. These object instances will
11061 temporarily have their __class__ changed to this class so an
11062 exception will be raised if they are used before the C++ instance
11066 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11067 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
11069 def __repr__(self
):
11070 #if not hasattr(self, "_name"):
11071 # self._name = "[unknown]"
11072 return self
.reprStr
#% self._name
11074 def __getattr__(self
, *args
):
11075 #if not hasattr(self, "_name"):
11076 # self._name = "[unknown]"
11077 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
11079 def __nonzero__(self
):
11083 #----------------------------------------------------------------------------
11085 def CallAfter(callable, *args
, **kw
):
11087 Call the specified function after the current and pending event
11088 handlers have been completed. This is also good for making GUI
11089 method calls from non-GUI threads. Any extra positional or
11090 keyword args are passed on to the callable when it is called.
11092 :see: `wx.FutureCall`
11095 assert app
is not None, 'No wx.App created yet'
11097 if not hasattr(app
, "_CallAfterId"):
11098 app
._CallAfterId
= wx
.NewEventType()
11099 app
.Connect(-1, -1, app
._CallAfterId
,
11100 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
11102 evt
.SetEventType(app
._CallAfterId
)
11103 evt
.callable = callable
11106 wx
.PostEvent(app
, evt
)
11108 #----------------------------------------------------------------------------
11113 A convenience class for `wx.Timer`, that calls the given callable
11114 object once after the given amount of milliseconds, passing any
11115 positional or keyword args. The return value of the callable is
11116 availbale after it has been run with the `GetResult` method.
11118 If you don't need to get the return value or restart the timer
11119 then there is no need to hold a reference to this object. It will
11120 hold a reference to itself while the timer is running (the timer
11121 has a reference to self.Notify) but the cycle will be broken when
11122 the timer completes, automatically cleaning up the wx.FutureCall
11125 :see: `wx.CallAfter`
11127 def __init__(self
, millis
, callable, *args
, **kwargs
):
11128 self
.millis
= millis
11129 self
.callable = callable
11130 self
.SetArgs(*args
, **kwargs
)
11132 self
.running
= False
11133 self
.hasRun
= False
11142 def Start(self
, millis
=None, *args
, **kwargs
):
11144 (Re)start the timer
11146 self
.hasRun
= False
11147 if millis
is not None:
11148 self
.millis
= millis
11150 self
.SetArgs(*args
, **kwargs
)
11152 self
.timer
= wx
.PyTimer(self
.Notify
)
11153 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
11154 self
.running
= True
11160 Stop and destroy the timer.
11162 if self
.timer
is not None:
11167 def GetInterval(self
):
11168 if self
.timer
is not None:
11169 return self
.timer
.GetInterval()
11174 def IsRunning(self
):
11175 return self
.timer
is not None and self
.timer
.IsRunning()
11178 def SetArgs(self
, *args
, **kwargs
):
11180 (Re)set the args passed to the callable object. This is
11181 useful in conjunction with Restart if you want to schedule a
11182 new call to the same callable object but with different
11186 self
.kwargs
= kwargs
11192 def GetResult(self
):
11197 The timer has expired so call the callable.
11199 if self
.callable and getattr(self
.callable, 'im_self', True):
11201 self
.running
= False
11202 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
11204 if not self
.running
:
11205 # if it wasn't restarted, then cleanup
11206 wx
.CallAfter(self
.Stop
)
11210 #----------------------------------------------------------------------------
11211 # Control which items in this module should be documented by epydoc.
11212 # We allow only classes and functions, which will help reduce the size
11213 # of the docs by filtering out the zillions of constants, EVT objects,
11214 # and etc that don't make much sense by themselves, but are instead
11215 # documented (or will be) as part of the classes/functions/methods
11216 # where they should be used.
11220 A filter for epydoc that only allows non-Ptr classes and
11221 fucntions, in order to reduce the clutter in the API docs.
11223 def __init__(self
, globals):
11224 self
._globals
= globals
11226 def __call__(self
, name
):
11228 obj
= self
._globals
.get(name
, None)
11229 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
11231 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
11235 #----------------------------------------------------------------------------
11236 #----------------------------------------------------------------------------
11238 # Import other modules in this package that should show up in the
11239 # "core" wx namespace
11241 from _windows
import *
11242 from _controls
import *
11243 from _misc
import *
11246 # Fixup the stock objects since they can't be used yet. (They will be
11247 # restored in wx.PyApp.OnInit.)
11248 _core_
._wxPyFixStockObjects
()
11250 #----------------------------------------------------------------------------
11251 #----------------------------------------------------------------------------