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 RA_USE_CHECKBOX
= _core_
.RA_USE_CHECKBOX
125 RB_GROUP
= _core_
.RB_GROUP
126 RB_SINGLE
= _core_
.RB_SINGLE
127 SB_HORIZONTAL
= _core_
.SB_HORIZONTAL
128 SB_VERTICAL
= _core_
.SB_VERTICAL
129 RB_USE_CHECKBOX
= _core_
.RB_USE_CHECKBOX
130 ST_SIZEGRIP
= _core_
.ST_SIZEGRIP
131 ST_NO_AUTORESIZE
= _core_
.ST_NO_AUTORESIZE
132 FLOOD_SURFACE
= _core_
.FLOOD_SURFACE
133 FLOOD_BORDER
= _core_
.FLOOD_BORDER
134 ODDEVEN_RULE
= _core_
.ODDEVEN_RULE
135 WINDING_RULE
= _core_
.WINDING_RULE
136 TOOL_TOP
= _core_
.TOOL_TOP
137 TOOL_BOTTOM
= _core_
.TOOL_BOTTOM
138 TOOL_LEFT
= _core_
.TOOL_LEFT
139 TOOL_RIGHT
= _core_
.TOOL_RIGHT
141 YES_NO
= _core_
.YES_NO
142 CANCEL
= _core_
.CANCEL
145 NO_DEFAULT
= _core_
.NO_DEFAULT
146 YES_DEFAULT
= _core_
.YES_DEFAULT
147 ICON_EXCLAMATION
= _core_
.ICON_EXCLAMATION
148 ICON_HAND
= _core_
.ICON_HAND
149 ICON_QUESTION
= _core_
.ICON_QUESTION
150 ICON_INFORMATION
= _core_
.ICON_INFORMATION
151 ICON_STOP
= _core_
.ICON_STOP
152 ICON_ASTERISK
= _core_
.ICON_ASTERISK
153 ICON_MASK
= _core_
.ICON_MASK
154 ICON_WARNING
= _core_
.ICON_WARNING
155 ICON_ERROR
= _core_
.ICON_ERROR
156 FORWARD
= _core_
.FORWARD
157 BACKWARD
= _core_
.BACKWARD
162 SIZE_AUTO_WIDTH
= _core_
.SIZE_AUTO_WIDTH
163 SIZE_AUTO_HEIGHT
= _core_
.SIZE_AUTO_HEIGHT
164 SIZE_AUTO
= _core_
.SIZE_AUTO
165 SIZE_USE_EXISTING
= _core_
.SIZE_USE_EXISTING
166 SIZE_ALLOW_MINUS_ONE
= _core_
.SIZE_ALLOW_MINUS_ONE
167 PORTRAIT
= _core_
.PORTRAIT
168 LANDSCAPE
= _core_
.LANDSCAPE
169 PRINT_QUALITY_HIGH
= _core_
.PRINT_QUALITY_HIGH
170 PRINT_QUALITY_MEDIUM
= _core_
.PRINT_QUALITY_MEDIUM
171 PRINT_QUALITY_LOW
= _core_
.PRINT_QUALITY_LOW
172 PRINT_QUALITY_DRAFT
= _core_
.PRINT_QUALITY_DRAFT
173 ID_ANY
= _core_
.ID_ANY
174 ID_SEPARATOR
= _core_
.ID_SEPARATOR
175 ID_LOWEST
= _core_
.ID_LOWEST
176 ID_OPEN
= _core_
.ID_OPEN
177 ID_CLOSE
= _core_
.ID_CLOSE
178 ID_NEW
= _core_
.ID_NEW
179 ID_SAVE
= _core_
.ID_SAVE
180 ID_SAVEAS
= _core_
.ID_SAVEAS
181 ID_REVERT
= _core_
.ID_REVERT
182 ID_EXIT
= _core_
.ID_EXIT
183 ID_UNDO
= _core_
.ID_UNDO
184 ID_REDO
= _core_
.ID_REDO
185 ID_HELP
= _core_
.ID_HELP
186 ID_PRINT
= _core_
.ID_PRINT
187 ID_PRINT_SETUP
= _core_
.ID_PRINT_SETUP
188 ID_PREVIEW
= _core_
.ID_PREVIEW
189 ID_ABOUT
= _core_
.ID_ABOUT
190 ID_HELP_CONTENTS
= _core_
.ID_HELP_CONTENTS
191 ID_HELP_COMMANDS
= _core_
.ID_HELP_COMMANDS
192 ID_HELP_PROCEDURES
= _core_
.ID_HELP_PROCEDURES
193 ID_HELP_CONTEXT
= _core_
.ID_HELP_CONTEXT
194 ID_CLOSE_ALL
= _core_
.ID_CLOSE_ALL
195 ID_PREFERENCES
= _core_
.ID_PREFERENCES
196 ID_CUT
= _core_
.ID_CUT
197 ID_COPY
= _core_
.ID_COPY
198 ID_PASTE
= _core_
.ID_PASTE
199 ID_CLEAR
= _core_
.ID_CLEAR
200 ID_FIND
= _core_
.ID_FIND
201 ID_DUPLICATE
= _core_
.ID_DUPLICATE
202 ID_SELECTALL
= _core_
.ID_SELECTALL
203 ID_DELETE
= _core_
.ID_DELETE
204 ID_REPLACE
= _core_
.ID_REPLACE
205 ID_REPLACE_ALL
= _core_
.ID_REPLACE_ALL
206 ID_PROPERTIES
= _core_
.ID_PROPERTIES
207 ID_VIEW_DETAILS
= _core_
.ID_VIEW_DETAILS
208 ID_VIEW_LARGEICONS
= _core_
.ID_VIEW_LARGEICONS
209 ID_VIEW_SMALLICONS
= _core_
.ID_VIEW_SMALLICONS
210 ID_VIEW_LIST
= _core_
.ID_VIEW_LIST
211 ID_VIEW_SORTDATE
= _core_
.ID_VIEW_SORTDATE
212 ID_VIEW_SORTNAME
= _core_
.ID_VIEW_SORTNAME
213 ID_VIEW_SORTSIZE
= _core_
.ID_VIEW_SORTSIZE
214 ID_VIEW_SORTTYPE
= _core_
.ID_VIEW_SORTTYPE
215 ID_FILE1
= _core_
.ID_FILE1
216 ID_FILE2
= _core_
.ID_FILE2
217 ID_FILE3
= _core_
.ID_FILE3
218 ID_FILE4
= _core_
.ID_FILE4
219 ID_FILE5
= _core_
.ID_FILE5
220 ID_FILE6
= _core_
.ID_FILE6
221 ID_FILE7
= _core_
.ID_FILE7
222 ID_FILE8
= _core_
.ID_FILE8
223 ID_FILE9
= _core_
.ID_FILE9
225 ID_CANCEL
= _core_
.ID_CANCEL
226 ID_APPLY
= _core_
.ID_APPLY
227 ID_YES
= _core_
.ID_YES
229 ID_STATIC
= _core_
.ID_STATIC
230 ID_FORWARD
= _core_
.ID_FORWARD
231 ID_BACKWARD
= _core_
.ID_BACKWARD
232 ID_DEFAULT
= _core_
.ID_DEFAULT
233 ID_MORE
= _core_
.ID_MORE
234 ID_SETUP
= _core_
.ID_SETUP
235 ID_RESET
= _core_
.ID_RESET
236 ID_CONTEXT_HELP
= _core_
.ID_CONTEXT_HELP
237 ID_YESTOALL
= _core_
.ID_YESTOALL
238 ID_NOTOALL
= _core_
.ID_NOTOALL
239 ID_ABORT
= _core_
.ID_ABORT
240 ID_RETRY
= _core_
.ID_RETRY
241 ID_IGNORE
= _core_
.ID_IGNORE
242 ID_ADD
= _core_
.ID_ADD
243 ID_REMOVE
= _core_
.ID_REMOVE
245 ID_DOWN
= _core_
.ID_DOWN
246 ID_HOME
= _core_
.ID_HOME
247 ID_REFRESH
= _core_
.ID_REFRESH
248 ID_STOP
= _core_
.ID_STOP
249 ID_INDEX
= _core_
.ID_INDEX
250 ID_BOLD
= _core_
.ID_BOLD
251 ID_ITALIC
= _core_
.ID_ITALIC
252 ID_JUSTIFY_CENTER
= _core_
.ID_JUSTIFY_CENTER
253 ID_JUSTIFY_FILL
= _core_
.ID_JUSTIFY_FILL
254 ID_JUSTIFY_RIGHT
= _core_
.ID_JUSTIFY_RIGHT
255 ID_JUSTIFY_LEFT
= _core_
.ID_JUSTIFY_LEFT
256 ID_UNDERLINE
= _core_
.ID_UNDERLINE
257 ID_INDENT
= _core_
.ID_INDENT
258 ID_UNINDENT
= _core_
.ID_UNINDENT
259 ID_ZOOM_100
= _core_
.ID_ZOOM_100
260 ID_ZOOM_FIT
= _core_
.ID_ZOOM_FIT
261 ID_ZOOM_IN
= _core_
.ID_ZOOM_IN
262 ID_ZOOM_OUT
= _core_
.ID_ZOOM_OUT
263 ID_UNDELETE
= _core_
.ID_UNDELETE
264 ID_REVERT_TO_SAVED
= _core_
.ID_REVERT_TO_SAVED
265 ID_HIGHEST
= _core_
.ID_HIGHEST
268 HIDE_READONLY
= _core_
.HIDE_READONLY
269 OVERWRITE_PROMPT
= _core_
.OVERWRITE_PROMPT
270 FILE_MUST_EXIST
= _core_
.FILE_MUST_EXIST
271 MULTIPLE
= _core_
.MULTIPLE
272 CHANGE_DIR
= _core_
.CHANGE_DIR
273 ACCEL_ALT
= _core_
.ACCEL_ALT
274 ACCEL_CTRL
= _core_
.ACCEL_CTRL
275 ACCEL_SHIFT
= _core_
.ACCEL_SHIFT
276 ACCEL_NORMAL
= _core_
.ACCEL_NORMAL
277 PD_AUTO_HIDE
= _core_
.PD_AUTO_HIDE
278 PD_APP_MODAL
= _core_
.PD_APP_MODAL
279 PD_CAN_ABORT
= _core_
.PD_CAN_ABORT
280 PD_ELAPSED_TIME
= _core_
.PD_ELAPSED_TIME
281 PD_ESTIMATED_TIME
= _core_
.PD_ESTIMATED_TIME
282 PD_REMAINING_TIME
= _core_
.PD_REMAINING_TIME
283 PD_SMOOTH
= _core_
.PD_SMOOTH
284 PD_CAN_SKIP
= _core_
.PD_CAN_SKIP
285 DD_NEW_DIR_BUTTON
= _core_
.DD_NEW_DIR_BUTTON
286 DD_DEFAULT_STYLE
= _core_
.DD_DEFAULT_STYLE
287 MENU_TEAROFF
= _core_
.MENU_TEAROFF
288 MB_DOCKABLE
= _core_
.MB_DOCKABLE
289 NO_FULL_REPAINT_ON_RESIZE
= _core_
.NO_FULL_REPAINT_ON_RESIZE
290 FULL_REPAINT_ON_RESIZE
= _core_
.FULL_REPAINT_ON_RESIZE
291 LI_HORIZONTAL
= _core_
.LI_HORIZONTAL
292 LI_VERTICAL
= _core_
.LI_VERTICAL
293 WS_EX_VALIDATE_RECURSIVELY
= _core_
.WS_EX_VALIDATE_RECURSIVELY
294 WS_EX_BLOCK_EVENTS
= _core_
.WS_EX_BLOCK_EVENTS
295 WS_EX_TRANSIENT
= _core_
.WS_EX_TRANSIENT
296 WS_EX_THEMED_BACKGROUND
= _core_
.WS_EX_THEMED_BACKGROUND
297 WS_EX_PROCESS_IDLE
= _core_
.WS_EX_PROCESS_IDLE
298 WS_EX_PROCESS_UI_UPDATES
= _core_
.WS_EX_PROCESS_UI_UPDATES
299 MM_TEXT
= _core_
.MM_TEXT
300 MM_LOMETRIC
= _core_
.MM_LOMETRIC
301 MM_HIMETRIC
= _core_
.MM_HIMETRIC
302 MM_LOENGLISH
= _core_
.MM_LOENGLISH
303 MM_HIENGLISH
= _core_
.MM_HIENGLISH
304 MM_TWIPS
= _core_
.MM_TWIPS
305 MM_ISOTROPIC
= _core_
.MM_ISOTROPIC
306 MM_ANISOTROPIC
= _core_
.MM_ANISOTROPIC
307 MM_POINTS
= _core_
.MM_POINTS
308 MM_METRIC
= _core_
.MM_METRIC
309 CENTRE
= _core_
.CENTRE
310 CENTER
= _core_
.CENTER
311 HORIZONTAL
= _core_
.HORIZONTAL
312 VERTICAL
= _core_
.VERTICAL
319 BOTTOM
= _core_
.BOTTOM
325 ALIGN_NOT
= _core_
.ALIGN_NOT
326 ALIGN_CENTER_HORIZONTAL
= _core_
.ALIGN_CENTER_HORIZONTAL
327 ALIGN_CENTRE_HORIZONTAL
= _core_
.ALIGN_CENTRE_HORIZONTAL
328 ALIGN_LEFT
= _core_
.ALIGN_LEFT
329 ALIGN_TOP
= _core_
.ALIGN_TOP
330 ALIGN_RIGHT
= _core_
.ALIGN_RIGHT
331 ALIGN_BOTTOM
= _core_
.ALIGN_BOTTOM
332 ALIGN_CENTER_VERTICAL
= _core_
.ALIGN_CENTER_VERTICAL
333 ALIGN_CENTRE_VERTICAL
= _core_
.ALIGN_CENTRE_VERTICAL
334 ALIGN_CENTER
= _core_
.ALIGN_CENTER
335 ALIGN_CENTRE
= _core_
.ALIGN_CENTRE
336 ALIGN_MASK
= _core_
.ALIGN_MASK
337 STRETCH_NOT
= _core_
.STRETCH_NOT
338 SHRINK
= _core_
.SHRINK
340 EXPAND
= _core_
.EXPAND
341 SHAPED
= _core_
.SHAPED
342 FIXED_MINSIZE
= _core_
.FIXED_MINSIZE
344 ADJUST_MINSIZE
= _core_
.ADJUST_MINSIZE
345 BORDER_DEFAULT
= _core_
.BORDER_DEFAULT
346 BORDER_NONE
= _core_
.BORDER_NONE
347 BORDER_STATIC
= _core_
.BORDER_STATIC
348 BORDER_SIMPLE
= _core_
.BORDER_SIMPLE
349 BORDER_RAISED
= _core_
.BORDER_RAISED
350 BORDER_SUNKEN
= _core_
.BORDER_SUNKEN
351 BORDER_DOUBLE
= _core_
.BORDER_DOUBLE
352 BORDER_MASK
= _core_
.BORDER_MASK
353 BG_STYLE_SYSTEM
= _core_
.BG_STYLE_SYSTEM
354 BG_STYLE_COLOUR
= _core_
.BG_STYLE_COLOUR
355 BG_STYLE_CUSTOM
= _core_
.BG_STYLE_CUSTOM
356 DEFAULT
= _core_
.DEFAULT
357 DECORATIVE
= _core_
.DECORATIVE
359 SCRIPT
= _core_
.SCRIPT
361 MODERN
= _core_
.MODERN
362 TELETYPE
= _core_
.TELETYPE
363 VARIABLE
= _core_
.VARIABLE
365 NORMAL
= _core_
.NORMAL
368 ITALIC
= _core_
.ITALIC
372 LONG_DASH
= _core_
.LONG_DASH
373 SHORT_DASH
= _core_
.SHORT_DASH
374 DOT_DASH
= _core_
.DOT_DASH
375 USER_DASH
= _core_
.USER_DASH
376 TRANSPARENT
= _core_
.TRANSPARENT
377 STIPPLE
= _core_
.STIPPLE
378 BDIAGONAL_HATCH
= _core_
.BDIAGONAL_HATCH
379 CROSSDIAG_HATCH
= _core_
.CROSSDIAG_HATCH
380 FDIAGONAL_HATCH
= _core_
.FDIAGONAL_HATCH
381 CROSS_HATCH
= _core_
.CROSS_HATCH
382 HORIZONTAL_HATCH
= _core_
.HORIZONTAL_HATCH
383 VERTICAL_HATCH
= _core_
.VERTICAL_HATCH
384 JOIN_BEVEL
= _core_
.JOIN_BEVEL
385 JOIN_MITER
= _core_
.JOIN_MITER
386 JOIN_ROUND
= _core_
.JOIN_ROUND
387 CAP_ROUND
= _core_
.CAP_ROUND
388 CAP_PROJECTING
= _core_
.CAP_PROJECTING
389 CAP_BUTT
= _core_
.CAP_BUTT
392 INVERT
= _core_
.INVERT
393 OR_REVERSE
= _core_
.OR_REVERSE
394 AND_REVERSE
= _core_
.AND_REVERSE
397 AND_INVERT
= _core_
.AND_INVERT
401 SRC_INVERT
= _core_
.SRC_INVERT
402 OR_INVERT
= _core_
.OR_INVERT
406 WXK_BACK
= _core_
.WXK_BACK
407 WXK_TAB
= _core_
.WXK_TAB
408 WXK_RETURN
= _core_
.WXK_RETURN
409 WXK_ESCAPE
= _core_
.WXK_ESCAPE
410 WXK_SPACE
= _core_
.WXK_SPACE
411 WXK_DELETE
= _core_
.WXK_DELETE
412 WXK_START
= _core_
.WXK_START
413 WXK_LBUTTON
= _core_
.WXK_LBUTTON
414 WXK_RBUTTON
= _core_
.WXK_RBUTTON
415 WXK_CANCEL
= _core_
.WXK_CANCEL
416 WXK_MBUTTON
= _core_
.WXK_MBUTTON
417 WXK_CLEAR
= _core_
.WXK_CLEAR
418 WXK_SHIFT
= _core_
.WXK_SHIFT
419 WXK_ALT
= _core_
.WXK_ALT
420 WXK_CONTROL
= _core_
.WXK_CONTROL
421 WXK_MENU
= _core_
.WXK_MENU
422 WXK_PAUSE
= _core_
.WXK_PAUSE
423 WXK_CAPITAL
= _core_
.WXK_CAPITAL
424 WXK_PRIOR
= _core_
.WXK_PRIOR
425 WXK_NEXT
= _core_
.WXK_NEXT
426 WXK_END
= _core_
.WXK_END
427 WXK_HOME
= _core_
.WXK_HOME
428 WXK_LEFT
= _core_
.WXK_LEFT
429 WXK_UP
= _core_
.WXK_UP
430 WXK_RIGHT
= _core_
.WXK_RIGHT
431 WXK_DOWN
= _core_
.WXK_DOWN
432 WXK_SELECT
= _core_
.WXK_SELECT
433 WXK_PRINT
= _core_
.WXK_PRINT
434 WXK_EXECUTE
= _core_
.WXK_EXECUTE
435 WXK_SNAPSHOT
= _core_
.WXK_SNAPSHOT
436 WXK_INSERT
= _core_
.WXK_INSERT
437 WXK_HELP
= _core_
.WXK_HELP
438 WXK_NUMPAD0
= _core_
.WXK_NUMPAD0
439 WXK_NUMPAD1
= _core_
.WXK_NUMPAD1
440 WXK_NUMPAD2
= _core_
.WXK_NUMPAD2
441 WXK_NUMPAD3
= _core_
.WXK_NUMPAD3
442 WXK_NUMPAD4
= _core_
.WXK_NUMPAD4
443 WXK_NUMPAD5
= _core_
.WXK_NUMPAD5
444 WXK_NUMPAD6
= _core_
.WXK_NUMPAD6
445 WXK_NUMPAD7
= _core_
.WXK_NUMPAD7
446 WXK_NUMPAD8
= _core_
.WXK_NUMPAD8
447 WXK_NUMPAD9
= _core_
.WXK_NUMPAD9
448 WXK_MULTIPLY
= _core_
.WXK_MULTIPLY
449 WXK_ADD
= _core_
.WXK_ADD
450 WXK_SEPARATOR
= _core_
.WXK_SEPARATOR
451 WXK_SUBTRACT
= _core_
.WXK_SUBTRACT
452 WXK_DECIMAL
= _core_
.WXK_DECIMAL
453 WXK_DIVIDE
= _core_
.WXK_DIVIDE
454 WXK_F1
= _core_
.WXK_F1
455 WXK_F2
= _core_
.WXK_F2
456 WXK_F3
= _core_
.WXK_F3
457 WXK_F4
= _core_
.WXK_F4
458 WXK_F5
= _core_
.WXK_F5
459 WXK_F6
= _core_
.WXK_F6
460 WXK_F7
= _core_
.WXK_F7
461 WXK_F8
= _core_
.WXK_F8
462 WXK_F9
= _core_
.WXK_F9
463 WXK_F10
= _core_
.WXK_F10
464 WXK_F11
= _core_
.WXK_F11
465 WXK_F12
= _core_
.WXK_F12
466 WXK_F13
= _core_
.WXK_F13
467 WXK_F14
= _core_
.WXK_F14
468 WXK_F15
= _core_
.WXK_F15
469 WXK_F16
= _core_
.WXK_F16
470 WXK_F17
= _core_
.WXK_F17
471 WXK_F18
= _core_
.WXK_F18
472 WXK_F19
= _core_
.WXK_F19
473 WXK_F20
= _core_
.WXK_F20
474 WXK_F21
= _core_
.WXK_F21
475 WXK_F22
= _core_
.WXK_F22
476 WXK_F23
= _core_
.WXK_F23
477 WXK_F24
= _core_
.WXK_F24
478 WXK_NUMLOCK
= _core_
.WXK_NUMLOCK
479 WXK_SCROLL
= _core_
.WXK_SCROLL
480 WXK_PAGEUP
= _core_
.WXK_PAGEUP
481 WXK_PAGEDOWN
= _core_
.WXK_PAGEDOWN
482 WXK_NUMPAD_SPACE
= _core_
.WXK_NUMPAD_SPACE
483 WXK_NUMPAD_TAB
= _core_
.WXK_NUMPAD_TAB
484 WXK_NUMPAD_ENTER
= _core_
.WXK_NUMPAD_ENTER
485 WXK_NUMPAD_F1
= _core_
.WXK_NUMPAD_F1
486 WXK_NUMPAD_F2
= _core_
.WXK_NUMPAD_F2
487 WXK_NUMPAD_F3
= _core_
.WXK_NUMPAD_F3
488 WXK_NUMPAD_F4
= _core_
.WXK_NUMPAD_F4
489 WXK_NUMPAD_HOME
= _core_
.WXK_NUMPAD_HOME
490 WXK_NUMPAD_LEFT
= _core_
.WXK_NUMPAD_LEFT
491 WXK_NUMPAD_UP
= _core_
.WXK_NUMPAD_UP
492 WXK_NUMPAD_RIGHT
= _core_
.WXK_NUMPAD_RIGHT
493 WXK_NUMPAD_DOWN
= _core_
.WXK_NUMPAD_DOWN
494 WXK_NUMPAD_PRIOR
= _core_
.WXK_NUMPAD_PRIOR
495 WXK_NUMPAD_PAGEUP
= _core_
.WXK_NUMPAD_PAGEUP
496 WXK_NUMPAD_NEXT
= _core_
.WXK_NUMPAD_NEXT
497 WXK_NUMPAD_PAGEDOWN
= _core_
.WXK_NUMPAD_PAGEDOWN
498 WXK_NUMPAD_END
= _core_
.WXK_NUMPAD_END
499 WXK_NUMPAD_BEGIN
= _core_
.WXK_NUMPAD_BEGIN
500 WXK_NUMPAD_INSERT
= _core_
.WXK_NUMPAD_INSERT
501 WXK_NUMPAD_DELETE
= _core_
.WXK_NUMPAD_DELETE
502 WXK_NUMPAD_EQUAL
= _core_
.WXK_NUMPAD_EQUAL
503 WXK_NUMPAD_MULTIPLY
= _core_
.WXK_NUMPAD_MULTIPLY
504 WXK_NUMPAD_ADD
= _core_
.WXK_NUMPAD_ADD
505 WXK_NUMPAD_SEPARATOR
= _core_
.WXK_NUMPAD_SEPARATOR
506 WXK_NUMPAD_SUBTRACT
= _core_
.WXK_NUMPAD_SUBTRACT
507 WXK_NUMPAD_DECIMAL
= _core_
.WXK_NUMPAD_DECIMAL
508 WXK_NUMPAD_DIVIDE
= _core_
.WXK_NUMPAD_DIVIDE
509 WXK_WINDOWS_LEFT
= _core_
.WXK_WINDOWS_LEFT
510 WXK_WINDOWS_RIGHT
= _core_
.WXK_WINDOWS_RIGHT
511 WXK_WINDOWS_MENU
= _core_
.WXK_WINDOWS_MENU
512 PAPER_NONE
= _core_
.PAPER_NONE
513 PAPER_LETTER
= _core_
.PAPER_LETTER
514 PAPER_LEGAL
= _core_
.PAPER_LEGAL
515 PAPER_A4
= _core_
.PAPER_A4
516 PAPER_CSHEET
= _core_
.PAPER_CSHEET
517 PAPER_DSHEET
= _core_
.PAPER_DSHEET
518 PAPER_ESHEET
= _core_
.PAPER_ESHEET
519 PAPER_LETTERSMALL
= _core_
.PAPER_LETTERSMALL
520 PAPER_TABLOID
= _core_
.PAPER_TABLOID
521 PAPER_LEDGER
= _core_
.PAPER_LEDGER
522 PAPER_STATEMENT
= _core_
.PAPER_STATEMENT
523 PAPER_EXECUTIVE
= _core_
.PAPER_EXECUTIVE
524 PAPER_A3
= _core_
.PAPER_A3
525 PAPER_A4SMALL
= _core_
.PAPER_A4SMALL
526 PAPER_A5
= _core_
.PAPER_A5
527 PAPER_B4
= _core_
.PAPER_B4
528 PAPER_B5
= _core_
.PAPER_B5
529 PAPER_FOLIO
= _core_
.PAPER_FOLIO
530 PAPER_QUARTO
= _core_
.PAPER_QUARTO
531 PAPER_10X14
= _core_
.PAPER_10X14
532 PAPER_11X17
= _core_
.PAPER_11X17
533 PAPER_NOTE
= _core_
.PAPER_NOTE
534 PAPER_ENV_9
= _core_
.PAPER_ENV_9
535 PAPER_ENV_10
= _core_
.PAPER_ENV_10
536 PAPER_ENV_11
= _core_
.PAPER_ENV_11
537 PAPER_ENV_12
= _core_
.PAPER_ENV_12
538 PAPER_ENV_14
= _core_
.PAPER_ENV_14
539 PAPER_ENV_DL
= _core_
.PAPER_ENV_DL
540 PAPER_ENV_C5
= _core_
.PAPER_ENV_C5
541 PAPER_ENV_C3
= _core_
.PAPER_ENV_C3
542 PAPER_ENV_C4
= _core_
.PAPER_ENV_C4
543 PAPER_ENV_C6
= _core_
.PAPER_ENV_C6
544 PAPER_ENV_C65
= _core_
.PAPER_ENV_C65
545 PAPER_ENV_B4
= _core_
.PAPER_ENV_B4
546 PAPER_ENV_B5
= _core_
.PAPER_ENV_B5
547 PAPER_ENV_B6
= _core_
.PAPER_ENV_B6
548 PAPER_ENV_ITALY
= _core_
.PAPER_ENV_ITALY
549 PAPER_ENV_MONARCH
= _core_
.PAPER_ENV_MONARCH
550 PAPER_ENV_PERSONAL
= _core_
.PAPER_ENV_PERSONAL
551 PAPER_FANFOLD_US
= _core_
.PAPER_FANFOLD_US
552 PAPER_FANFOLD_STD_GERMAN
= _core_
.PAPER_FANFOLD_STD_GERMAN
553 PAPER_FANFOLD_LGL_GERMAN
= _core_
.PAPER_FANFOLD_LGL_GERMAN
554 PAPER_ISO_B4
= _core_
.PAPER_ISO_B4
555 PAPER_JAPANESE_POSTCARD
= _core_
.PAPER_JAPANESE_POSTCARD
556 PAPER_9X11
= _core_
.PAPER_9X11
557 PAPER_10X11
= _core_
.PAPER_10X11
558 PAPER_15X11
= _core_
.PAPER_15X11
559 PAPER_ENV_INVITE
= _core_
.PAPER_ENV_INVITE
560 PAPER_LETTER_EXTRA
= _core_
.PAPER_LETTER_EXTRA
561 PAPER_LEGAL_EXTRA
= _core_
.PAPER_LEGAL_EXTRA
562 PAPER_TABLOID_EXTRA
= _core_
.PAPER_TABLOID_EXTRA
563 PAPER_A4_EXTRA
= _core_
.PAPER_A4_EXTRA
564 PAPER_LETTER_TRANSVERSE
= _core_
.PAPER_LETTER_TRANSVERSE
565 PAPER_A4_TRANSVERSE
= _core_
.PAPER_A4_TRANSVERSE
566 PAPER_LETTER_EXTRA_TRANSVERSE
= _core_
.PAPER_LETTER_EXTRA_TRANSVERSE
567 PAPER_A_PLUS
= _core_
.PAPER_A_PLUS
568 PAPER_B_PLUS
= _core_
.PAPER_B_PLUS
569 PAPER_LETTER_PLUS
= _core_
.PAPER_LETTER_PLUS
570 PAPER_A4_PLUS
= _core_
.PAPER_A4_PLUS
571 PAPER_A5_TRANSVERSE
= _core_
.PAPER_A5_TRANSVERSE
572 PAPER_B5_TRANSVERSE
= _core_
.PAPER_B5_TRANSVERSE
573 PAPER_A3_EXTRA
= _core_
.PAPER_A3_EXTRA
574 PAPER_A5_EXTRA
= _core_
.PAPER_A5_EXTRA
575 PAPER_B5_EXTRA
= _core_
.PAPER_B5_EXTRA
576 PAPER_A2
= _core_
.PAPER_A2
577 PAPER_A3_TRANSVERSE
= _core_
.PAPER_A3_TRANSVERSE
578 PAPER_A3_EXTRA_TRANSVERSE
= _core_
.PAPER_A3_EXTRA_TRANSVERSE
579 DUPLEX_SIMPLEX
= _core_
.DUPLEX_SIMPLEX
580 DUPLEX_HORIZONTAL
= _core_
.DUPLEX_HORIZONTAL
581 DUPLEX_VERTICAL
= _core_
.DUPLEX_VERTICAL
582 ITEM_SEPARATOR
= _core_
.ITEM_SEPARATOR
583 ITEM_NORMAL
= _core_
.ITEM_NORMAL
584 ITEM_CHECK
= _core_
.ITEM_CHECK
585 ITEM_RADIO
= _core_
.ITEM_RADIO
586 ITEM_MAX
= _core_
.ITEM_MAX
587 HT_NOWHERE
= _core_
.HT_NOWHERE
588 HT_SCROLLBAR_FIRST
= _core_
.HT_SCROLLBAR_FIRST
589 HT_SCROLLBAR_ARROW_LINE_1
= _core_
.HT_SCROLLBAR_ARROW_LINE_1
590 HT_SCROLLBAR_ARROW_LINE_2
= _core_
.HT_SCROLLBAR_ARROW_LINE_2
591 HT_SCROLLBAR_ARROW_PAGE_1
= _core_
.HT_SCROLLBAR_ARROW_PAGE_1
592 HT_SCROLLBAR_ARROW_PAGE_2
= _core_
.HT_SCROLLBAR_ARROW_PAGE_2
593 HT_SCROLLBAR_THUMB
= _core_
.HT_SCROLLBAR_THUMB
594 HT_SCROLLBAR_BAR_1
= _core_
.HT_SCROLLBAR_BAR_1
595 HT_SCROLLBAR_BAR_2
= _core_
.HT_SCROLLBAR_BAR_2
596 HT_SCROLLBAR_LAST
= _core_
.HT_SCROLLBAR_LAST
597 HT_WINDOW_OUTSIDE
= _core_
.HT_WINDOW_OUTSIDE
598 HT_WINDOW_INSIDE
= _core_
.HT_WINDOW_INSIDE
599 HT_WINDOW_VERT_SCROLLBAR
= _core_
.HT_WINDOW_VERT_SCROLLBAR
600 HT_WINDOW_HORZ_SCROLLBAR
= _core_
.HT_WINDOW_HORZ_SCROLLBAR
601 HT_WINDOW_CORNER
= _core_
.HT_WINDOW_CORNER
602 HT_MAX
= _core_
.HT_MAX
603 MOD_NONE
= _core_
.MOD_NONE
604 MOD_ALT
= _core_
.MOD_ALT
605 MOD_CONTROL
= _core_
.MOD_CONTROL
606 MOD_SHIFT
= _core_
.MOD_SHIFT
607 MOD_WIN
= _core_
.MOD_WIN
608 UPDATE_UI_NONE
= _core_
.UPDATE_UI_NONE
609 UPDATE_UI_RECURSE
= _core_
.UPDATE_UI_RECURSE
610 UPDATE_UI_FROMIDLE
= _core_
.UPDATE_UI_FROMIDLE
611 #---------------------------------------------------------------------------
613 class Object(object):
615 The base class for most wx objects, although in wxPython not
616 much functionality is needed nor exposed.
618 def __init__(self
): raise RuntimeError, "No constructor defined"
620 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
621 def GetClassName(*args
, **kwargs
):
623 GetClassName(self) -> String
625 Returns the class name of the C++ class using wxRTTI.
627 return _core_
.Object_GetClassName(*args
, **kwargs
)
629 def Destroy(*args
, **kwargs
):
633 Deletes the C++ object this Python object is a proxy for.
635 return _core_
.Object_Destroy(*args
, **kwargs
)
638 class ObjectPtr(Object
):
639 def __init__(self
, this
):
641 if not hasattr(self
,"thisown"): self
.thisown
= 0
642 self
.__class
__ = Object
643 _core_
.Object_swigregister(ObjectPtr
)
644 _wxPySetDictionary
= _core_
._wxPySetDictionary
646 _wxPyFixStockObjects
= _core_
._wxPyFixStockObjects
649 EmptyString
= cvar
.EmptyString
651 #---------------------------------------------------------------------------
653 BITMAP_TYPE_INVALID
= _core_
.BITMAP_TYPE_INVALID
654 BITMAP_TYPE_BMP
= _core_
.BITMAP_TYPE_BMP
655 BITMAP_TYPE_ICO
= _core_
.BITMAP_TYPE_ICO
656 BITMAP_TYPE_CUR
= _core_
.BITMAP_TYPE_CUR
657 BITMAP_TYPE_XBM
= _core_
.BITMAP_TYPE_XBM
658 BITMAP_TYPE_XBM_DATA
= _core_
.BITMAP_TYPE_XBM_DATA
659 BITMAP_TYPE_XPM
= _core_
.BITMAP_TYPE_XPM
660 BITMAP_TYPE_XPM_DATA
= _core_
.BITMAP_TYPE_XPM_DATA
661 BITMAP_TYPE_TIF
= _core_
.BITMAP_TYPE_TIF
662 BITMAP_TYPE_GIF
= _core_
.BITMAP_TYPE_GIF
663 BITMAP_TYPE_PNG
= _core_
.BITMAP_TYPE_PNG
664 BITMAP_TYPE_JPEG
= _core_
.BITMAP_TYPE_JPEG
665 BITMAP_TYPE_PNM
= _core_
.BITMAP_TYPE_PNM
666 BITMAP_TYPE_PCX
= _core_
.BITMAP_TYPE_PCX
667 BITMAP_TYPE_PICT
= _core_
.BITMAP_TYPE_PICT
668 BITMAP_TYPE_ICON
= _core_
.BITMAP_TYPE_ICON
669 BITMAP_TYPE_ANI
= _core_
.BITMAP_TYPE_ANI
670 BITMAP_TYPE_IFF
= _core_
.BITMAP_TYPE_IFF
671 BITMAP_TYPE_MACCURSOR
= _core_
.BITMAP_TYPE_MACCURSOR
672 BITMAP_TYPE_ANY
= _core_
.BITMAP_TYPE_ANY
673 CURSOR_NONE
= _core_
.CURSOR_NONE
674 CURSOR_ARROW
= _core_
.CURSOR_ARROW
675 CURSOR_RIGHT_ARROW
= _core_
.CURSOR_RIGHT_ARROW
676 CURSOR_BULLSEYE
= _core_
.CURSOR_BULLSEYE
677 CURSOR_CHAR
= _core_
.CURSOR_CHAR
678 CURSOR_CROSS
= _core_
.CURSOR_CROSS
679 CURSOR_HAND
= _core_
.CURSOR_HAND
680 CURSOR_IBEAM
= _core_
.CURSOR_IBEAM
681 CURSOR_LEFT_BUTTON
= _core_
.CURSOR_LEFT_BUTTON
682 CURSOR_MAGNIFIER
= _core_
.CURSOR_MAGNIFIER
683 CURSOR_MIDDLE_BUTTON
= _core_
.CURSOR_MIDDLE_BUTTON
684 CURSOR_NO_ENTRY
= _core_
.CURSOR_NO_ENTRY
685 CURSOR_PAINT_BRUSH
= _core_
.CURSOR_PAINT_BRUSH
686 CURSOR_PENCIL
= _core_
.CURSOR_PENCIL
687 CURSOR_POINT_LEFT
= _core_
.CURSOR_POINT_LEFT
688 CURSOR_POINT_RIGHT
= _core_
.CURSOR_POINT_RIGHT
689 CURSOR_QUESTION_ARROW
= _core_
.CURSOR_QUESTION_ARROW
690 CURSOR_RIGHT_BUTTON
= _core_
.CURSOR_RIGHT_BUTTON
691 CURSOR_SIZENESW
= _core_
.CURSOR_SIZENESW
692 CURSOR_SIZENS
= _core_
.CURSOR_SIZENS
693 CURSOR_SIZENWSE
= _core_
.CURSOR_SIZENWSE
694 CURSOR_SIZEWE
= _core_
.CURSOR_SIZEWE
695 CURSOR_SIZING
= _core_
.CURSOR_SIZING
696 CURSOR_SPRAYCAN
= _core_
.CURSOR_SPRAYCAN
697 CURSOR_WAIT
= _core_
.CURSOR_WAIT
698 CURSOR_WATCH
= _core_
.CURSOR_WATCH
699 CURSOR_BLANK
= _core_
.CURSOR_BLANK
700 CURSOR_DEFAULT
= _core_
.CURSOR_DEFAULT
701 CURSOR_COPY_ARROW
= _core_
.CURSOR_COPY_ARROW
702 CURSOR_ARROWWAIT
= _core_
.CURSOR_ARROWWAIT
703 CURSOR_MAX
= _core_
.CURSOR_MAX
704 #---------------------------------------------------------------------------
708 wx.Size is a useful data structure used to represent the size of
709 something. It simply contians integer width and height
710 proprtites. In most places in wxPython where a wx.Size is
711 expected a (width, height) tuple can be used instead.
714 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
715 width
= property(_core_
.Size_width_get
, _core_
.Size_width_set
)
716 height
= property(_core_
.Size_height_get
, _core_
.Size_height_set
)
717 x
= width
; y
= height
718 def __init__(self
, *args
, **kwargs
):
720 __init__(self, int w=0, int h=0) -> Size
722 Creates a size object.
724 newobj
= _core_
.new_Size(*args
, **kwargs
)
725 self
.this
= newobj
.this
728 def __del__(self
, destroy
=_core_
.delete_Size
):
731 if self
.thisown
: destroy(self
)
734 def __eq__(*args
, **kwargs
):
736 __eq__(self, Size sz) -> bool
738 Test for equality of wx.Size objects.
740 return _core_
.Size___eq__(*args
, **kwargs
)
742 def __ne__(*args
, **kwargs
):
744 __ne__(self, Size sz) -> bool
748 return _core_
.Size___ne__(*args
, **kwargs
)
750 def __add__(*args
, **kwargs
):
752 __add__(self, Size sz) -> Size
754 Add sz's proprties to this and return the result.
756 return _core_
.Size___add__(*args
, **kwargs
)
758 def __sub__(*args
, **kwargs
):
760 __sub__(self, Size sz) -> Size
762 Subtract sz's properties from this and return the result.
764 return _core_
.Size___sub__(*args
, **kwargs
)
766 def IncTo(*args
, **kwargs
):
770 Increments this object so that both of its dimensions are not less
771 than the corresponding dimensions of the size.
773 return _core_
.Size_IncTo(*args
, **kwargs
)
775 def DecTo(*args
, **kwargs
):
779 Decrements this object so that both of its dimensions are not greater
780 than the corresponding dimensions of the size.
782 return _core_
.Size_DecTo(*args
, **kwargs
)
784 def Set(*args
, **kwargs
):
786 Set(self, int w, int h)
788 Set both width and height.
790 return _core_
.Size_Set(*args
, **kwargs
)
792 def SetWidth(*args
, **kwargs
):
793 """SetWidth(self, int w)"""
794 return _core_
.Size_SetWidth(*args
, **kwargs
)
796 def SetHeight(*args
, **kwargs
):
797 """SetHeight(self, int h)"""
798 return _core_
.Size_SetHeight(*args
, **kwargs
)
800 def GetWidth(*args
, **kwargs
):
801 """GetWidth(self) -> int"""
802 return _core_
.Size_GetWidth(*args
, **kwargs
)
804 def GetHeight(*args
, **kwargs
):
805 """GetHeight(self) -> int"""
806 return _core_
.Size_GetHeight(*args
, **kwargs
)
808 def IsFullySpecified(*args
, **kwargs
):
810 IsFullySpecified(self) -> bool
812 Returns True if both components of the size are non-default values.
814 return _core_
.Size_IsFullySpecified(*args
, **kwargs
)
816 def SetDefaults(*args
, **kwargs
):
818 SetDefaults(self, Size size)
820 Combine this size with the other one replacing the default components
821 of this object (i.e. equal to -1) with those of the other.
823 return _core_
.Size_SetDefaults(*args
, **kwargs
)
825 def Get(*args
, **kwargs
):
827 Get() -> (width,height)
829 Returns the width and height properties as a tuple.
831 return _core_
.Size_Get(*args
, **kwargs
)
833 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
834 def __str__(self
): return str(self
.Get())
835 def __repr__(self
): return 'wx.Size'+str(self
.Get())
836 def __len__(self
): return len(self
.Get())
837 def __getitem__(self
, index
): return self
.Get()[index
]
838 def __setitem__(self
, index
, val
):
839 if index
== 0: self
.width
= val
840 elif index
== 1: self
.height
= val
841 else: raise IndexError
842 def __nonzero__(self
): return self
.Get() != (0,0)
843 __safe_for_unpickling__
= True
844 def __reduce__(self
): return (wx
.Size
, self
.Get())
848 def __init__(self
, this
):
850 if not hasattr(self
,"thisown"): self
.thisown
= 0
851 self
.__class
__ = Size
852 _core_
.Size_swigregister(SizePtr
)
854 #---------------------------------------------------------------------------
856 class RealPoint(object):
858 A data structure for representing a point or position with floating
859 point x and y properties. In wxPython most places that expect a
860 wx.RealPoint can also accept a (x,y) tuple.
863 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
864 x
= property(_core_
.RealPoint_x_get
, _core_
.RealPoint_x_set
)
865 y
= property(_core_
.RealPoint_y_get
, _core_
.RealPoint_y_set
)
866 def __init__(self
, *args
, **kwargs
):
868 __init__(self, double x=0.0, double y=0.0) -> RealPoint
870 Create a wx.RealPoint object
872 newobj
= _core_
.new_RealPoint(*args
, **kwargs
)
873 self
.this
= newobj
.this
876 def __del__(self
, destroy
=_core_
.delete_RealPoint
):
879 if self
.thisown
: destroy(self
)
882 def __eq__(*args
, **kwargs
):
884 __eq__(self, RealPoint pt) -> bool
886 Test for equality of wx.RealPoint objects.
888 return _core_
.RealPoint___eq__(*args
, **kwargs
)
890 def __ne__(*args
, **kwargs
):
892 __ne__(self, RealPoint pt) -> bool
894 Test for inequality of wx.RealPoint objects.
896 return _core_
.RealPoint___ne__(*args
, **kwargs
)
898 def __add__(*args
, **kwargs
):
900 __add__(self, RealPoint pt) -> RealPoint
902 Add pt's proprties to this and return the result.
904 return _core_
.RealPoint___add__(*args
, **kwargs
)
906 def __sub__(*args
, **kwargs
):
908 __sub__(self, RealPoint pt) -> RealPoint
910 Subtract pt's proprties from this and return the result
912 return _core_
.RealPoint___sub__(*args
, **kwargs
)
914 def Set(*args
, **kwargs
):
916 Set(self, double x, double y)
918 Set both the x and y properties
920 return _core_
.RealPoint_Set(*args
, **kwargs
)
922 def Get(*args
, **kwargs
):
926 Return the x and y properties as a tuple.
928 return _core_
.RealPoint_Get(*args
, **kwargs
)
930 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
931 def __str__(self
): return str(self
.Get())
932 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
933 def __len__(self
): return len(self
.Get())
934 def __getitem__(self
, index
): return self
.Get()[index
]
935 def __setitem__(self
, index
, val
):
936 if index
== 0: self
.x
= val
937 elif index
== 1: self
.y
= val
938 else: raise IndexError
939 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
940 __safe_for_unpickling__
= True
941 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
944 class RealPointPtr(RealPoint
):
945 def __init__(self
, this
):
947 if not hasattr(self
,"thisown"): self
.thisown
= 0
948 self
.__class
__ = RealPoint
949 _core_
.RealPoint_swigregister(RealPointPtr
)
951 #---------------------------------------------------------------------------
955 A data structure for representing a point or position with integer x
956 and y properties. Most places in wxPython that expect a wx.Point can
957 also accept a (x,y) tuple.
960 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
961 x
= property(_core_
.Point_x_get
, _core_
.Point_x_set
)
962 y
= property(_core_
.Point_y_get
, _core_
.Point_y_set
)
963 def __init__(self
, *args
, **kwargs
):
965 __init__(self, int x=0, int y=0) -> Point
967 Create a wx.Point object
969 newobj
= _core_
.new_Point(*args
, **kwargs
)
970 self
.this
= newobj
.this
973 def __del__(self
, destroy
=_core_
.delete_Point
):
976 if self
.thisown
: destroy(self
)
979 def __eq__(*args
, **kwargs
):
981 __eq__(self, Point pt) -> bool
983 Test for equality of wx.Point objects.
985 return _core_
.Point___eq__(*args
, **kwargs
)
987 def __ne__(*args
, **kwargs
):
989 __ne__(self, Point pt) -> bool
991 Test for inequality of wx.Point objects.
993 return _core_
.Point___ne__(*args
, **kwargs
)
995 def __add__(*args
, **kwargs
):
997 __add__(self, Point pt) -> Point
999 Add pt's proprties to this and return the result.
1001 return _core_
.Point___add__(*args
, **kwargs
)
1003 def __sub__(*args
, **kwargs
):
1005 __sub__(self, Point pt) -> Point
1007 Subtract pt's proprties from this and return the result
1009 return _core_
.Point___sub__(*args
, **kwargs
)
1011 def __iadd__(*args
, **kwargs
):
1013 __iadd__(self, Point pt) -> Point
1015 Add pt to this object.
1017 return _core_
.Point___iadd__(*args
, **kwargs
)
1019 def __isub__(*args
, **kwargs
):
1021 __isub__(self, Point pt) -> Point
1023 Subtract pt from this object.
1025 return _core_
.Point___isub__(*args
, **kwargs
)
1027 def Set(*args
, **kwargs
):
1029 Set(self, long x, long y)
1031 Set both the x and y properties
1033 return _core_
.Point_Set(*args
, **kwargs
)
1035 def Get(*args
, **kwargs
):
1039 Return the x and y properties as a tuple.
1041 return _core_
.Point_Get(*args
, **kwargs
)
1043 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1044 def __str__(self
): return str(self
.Get())
1045 def __repr__(self
): return 'wx.Point'+str(self
.Get())
1046 def __len__(self
): return len(self
.Get())
1047 def __getitem__(self
, index
): return self
.Get()[index
]
1048 def __setitem__(self
, index
, val
):
1049 if index
== 0: self
.x
= val
1050 elif index
== 1: self
.y
= val
1051 else: raise IndexError
1052 def __nonzero__(self
): return self
.Get() != (0,0)
1053 __safe_for_unpickling__
= True
1054 def __reduce__(self
): return (wx
.Point
, self
.Get())
1057 class PointPtr(Point
):
1058 def __init__(self
, this
):
1060 if not hasattr(self
,"thisown"): self
.thisown
= 0
1061 self
.__class
__ = Point
1062 _core_
.Point_swigregister(PointPtr
)
1064 #---------------------------------------------------------------------------
1068 A class for representing and manipulating rectangles. It has x, y,
1069 width and height properties. In wxPython most palces that expect a
1070 wx.Rect can also accept a (x,y,width,height) tuple.
1073 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1074 def __init__(self
, *args
, **kwargs
):
1076 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1078 Create a new Rect object.
1080 newobj
= _core_
.new_Rect(*args
, **kwargs
)
1081 self
.this
= newobj
.this
1084 def __del__(self
, destroy
=_core_
.delete_Rect
):
1087 if self
.thisown
: destroy(self
)
1090 def GetX(*args
, **kwargs
):
1091 """GetX(self) -> int"""
1092 return _core_
.Rect_GetX(*args
, **kwargs
)
1094 def SetX(*args
, **kwargs
):
1095 """SetX(self, int x)"""
1096 return _core_
.Rect_SetX(*args
, **kwargs
)
1098 def GetY(*args
, **kwargs
):
1099 """GetY(self) -> int"""
1100 return _core_
.Rect_GetY(*args
, **kwargs
)
1102 def SetY(*args
, **kwargs
):
1103 """SetY(self, int y)"""
1104 return _core_
.Rect_SetY(*args
, **kwargs
)
1106 def GetWidth(*args
, **kwargs
):
1107 """GetWidth(self) -> int"""
1108 return _core_
.Rect_GetWidth(*args
, **kwargs
)
1110 def SetWidth(*args
, **kwargs
):
1111 """SetWidth(self, int w)"""
1112 return _core_
.Rect_SetWidth(*args
, **kwargs
)
1114 def GetHeight(*args
, **kwargs
):
1115 """GetHeight(self) -> int"""
1116 return _core_
.Rect_GetHeight(*args
, **kwargs
)
1118 def SetHeight(*args
, **kwargs
):
1119 """SetHeight(self, int h)"""
1120 return _core_
.Rect_SetHeight(*args
, **kwargs
)
1122 def GetPosition(*args
, **kwargs
):
1123 """GetPosition(self) -> Point"""
1124 return _core_
.Rect_GetPosition(*args
, **kwargs
)
1126 def SetPosition(*args
, **kwargs
):
1127 """SetPosition(self, Point p)"""
1128 return _core_
.Rect_SetPosition(*args
, **kwargs
)
1130 def GetSize(*args
, **kwargs
):
1131 """GetSize(self) -> Size"""
1132 return _core_
.Rect_GetSize(*args
, **kwargs
)
1134 def SetSize(*args
, **kwargs
):
1135 """SetSize(self, Size s)"""
1136 return _core_
.Rect_SetSize(*args
, **kwargs
)
1138 def IsEmpty(*args
, **kwargs
):
1139 """IsEmpty(self) -> bool"""
1140 return _core_
.Rect_IsEmpty(*args
, **kwargs
)
1142 def GetTopLeft(*args
, **kwargs
):
1143 """GetTopLeft(self) -> Point"""
1144 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1146 def SetTopLeft(*args
, **kwargs
):
1147 """SetTopLeft(self, Point p)"""
1148 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1150 def GetBottomRight(*args
, **kwargs
):
1151 """GetBottomRight(self) -> Point"""
1152 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1154 def SetBottomRight(*args
, **kwargs
):
1155 """SetBottomRight(self, Point p)"""
1156 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1158 def GetLeft(*args
, **kwargs
):
1159 """GetLeft(self) -> int"""
1160 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1162 def GetTop(*args
, **kwargs
):
1163 """GetTop(self) -> int"""
1164 return _core_
.Rect_GetTop(*args
, **kwargs
)
1166 def GetBottom(*args
, **kwargs
):
1167 """GetBottom(self) -> int"""
1168 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1170 def GetRight(*args
, **kwargs
):
1171 """GetRight(self) -> int"""
1172 return _core_
.Rect_GetRight(*args
, **kwargs
)
1174 def SetLeft(*args
, **kwargs
):
1175 """SetLeft(self, int left)"""
1176 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1178 def SetRight(*args
, **kwargs
):
1179 """SetRight(self, int right)"""
1180 return _core_
.Rect_SetRight(*args
, **kwargs
)
1182 def SetTop(*args
, **kwargs
):
1183 """SetTop(self, int top)"""
1184 return _core_
.Rect_SetTop(*args
, **kwargs
)
1186 def SetBottom(*args
, **kwargs
):
1187 """SetBottom(self, int bottom)"""
1188 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1190 position
= property(GetPosition
, SetPosition
)
1191 size
= property(GetSize
, SetSize
)
1192 left
= property(GetLeft
, SetLeft
)
1193 right
= property(GetRight
, SetRight
)
1194 top
= property(GetTop
, SetTop
)
1195 bottom
= property(GetBottom
, SetBottom
)
1197 def Inflate(*args
, **kwargs
):
1199 Inflate(self, int dx, int dy) -> Rect
1201 Increases the size of the rectangle.
1203 The left border is moved farther left and the right border is moved
1204 farther right by ``dx``. The upper border is moved farther up and the
1205 bottom border is moved farther down by ``dy``. (Note the the width and
1206 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1207 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1208 opposite happens: the rectangle size decreases in the respective
1211 The change is made to the rectangle inplace, if instead you need a
1212 copy that is inflated, preserving the original then make the copy
1215 copy = wx.Rect(*original)
1220 return _core_
.Rect_Inflate(*args
, **kwargs
)
1222 def Deflate(*args
, **kwargs
):
1224 Deflate(self, int dx, int dy) -> Rect
1226 Decrease the rectangle size. This method is the opposite of `Inflate`
1227 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1228 `Inflate` for a full description.
1230 return _core_
.Rect_Deflate(*args
, **kwargs
)
1232 def OffsetXY(*args
, **kwargs
):
1234 OffsetXY(self, int dx, int dy)
1236 Moves the rectangle by the specified offset. If dx is positive, the
1237 rectangle is moved to the right, if dy is positive, it is moved to the
1238 bottom, otherwise it is moved to the left or top respectively.
1240 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1242 def Offset(*args
, **kwargs
):
1244 Offset(self, Point pt)
1246 Same as OffsetXY but uses dx,dy from Point
1248 return _core_
.Rect_Offset(*args
, **kwargs
)
1250 def Intersect(*args
, **kwargs
):
1252 Intersect(self, Rect rect) -> Rect
1254 Returns the intersectsion of this rectangle and rect.
1256 return _core_
.Rect_Intersect(*args
, **kwargs
)
1258 def Union(*args
, **kwargs
):
1260 Union(self, Rect rect) -> Rect
1262 Returns the union of this rectangle and rect.
1264 return _core_
.Rect_Union(*args
, **kwargs
)
1266 def __add__(*args
, **kwargs
):
1268 __add__(self, Rect rect) -> Rect
1270 Add the properties of rect to this rectangle and return the result.
1272 return _core_
.Rect___add__(*args
, **kwargs
)
1274 def __iadd__(*args
, **kwargs
):
1276 __iadd__(self, Rect rect) -> Rect
1278 Add the properties of rect to this rectangle, updating this rectangle.
1280 return _core_
.Rect___iadd__(*args
, **kwargs
)
1282 def __eq__(*args
, **kwargs
):
1284 __eq__(self, Rect rect) -> bool
1288 return _core_
.Rect___eq__(*args
, **kwargs
)
1290 def __ne__(*args
, **kwargs
):
1292 __ne__(self, Rect rect) -> bool
1294 Test for inequality.
1296 return _core_
.Rect___ne__(*args
, **kwargs
)
1298 def InsideXY(*args
, **kwargs
):
1300 InsideXY(self, int x, int y) -> bool
1302 Return True if the point is (not strcitly) inside the rect.
1304 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1306 def Inside(*args
, **kwargs
):
1308 Inside(self, Point pt) -> bool
1310 Return True if the point is (not strcitly) inside the rect.
1312 return _core_
.Rect_Inside(*args
, **kwargs
)
1314 def Intersects(*args
, **kwargs
):
1316 Intersects(self, Rect rect) -> bool
1318 Returns True if the rectangles have a non empty intersection.
1320 return _core_
.Rect_Intersects(*args
, **kwargs
)
1322 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1323 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1324 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1325 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1326 def Set(*args
, **kwargs
):
1328 Set(self, int x=0, int y=0, int width=0, int height=0)
1330 Set all rectangle properties.
1332 return _core_
.Rect_Set(*args
, **kwargs
)
1334 def Get(*args
, **kwargs
):
1336 Get() -> (x,y,width,height)
1338 Return the rectangle properties as a tuple.
1340 return _core_
.Rect_Get(*args
, **kwargs
)
1342 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1343 def __str__(self
): return str(self
.Get())
1344 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1345 def __len__(self
): return len(self
.Get())
1346 def __getitem__(self
, index
): return self
.Get()[index
]
1347 def __setitem__(self
, index
, val
):
1348 if index
== 0: self
.x
= val
1349 elif index
== 1: self
.y
= val
1350 elif index
== 2: self
.width
= val
1351 elif index
== 3: self
.height
= val
1352 else: raise IndexError
1353 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1354 __safe_for_unpickling__
= True
1355 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1358 class RectPtr(Rect
):
1359 def __init__(self
, this
):
1361 if not hasattr(self
,"thisown"): self
.thisown
= 0
1362 self
.__class
__ = Rect
1363 _core_
.Rect_swigregister(RectPtr
)
1365 def RectPP(*args
, **kwargs
):
1367 RectPP(Point topLeft, Point bottomRight) -> Rect
1369 Create a new Rect object from Points representing two corners.
1371 val
= _core_
.new_RectPP(*args
, **kwargs
)
1375 def RectPS(*args
, **kwargs
):
1377 RectPS(Point pos, Size size) -> Rect
1379 Create a new Rect from a position and size.
1381 val
= _core_
.new_RectPS(*args
, **kwargs
)
1385 def RectS(*args
, **kwargs
):
1387 RectS(Size size) -> Rect
1389 Create a new Rect from a size only.
1391 val
= _core_
.new_RectS(*args
, **kwargs
)
1396 def IntersectRect(*args
, **kwargs
):
1398 IntersectRect(Rect r1, Rect r2) -> Rect
1400 Calculate and return the intersection of r1 and r2.
1402 return _core_
.IntersectRect(*args
, **kwargs
)
1403 #---------------------------------------------------------------------------
1405 class Point2D(object):
1407 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1408 with floating point values.
1411 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1412 def __init__(self
, *args
, **kwargs
):
1414 __init__(self, double x=0.0, double y=0.0) -> Point2D
1416 Create a w.Point2D object.
1418 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1419 self
.this
= newobj
.this
1422 def GetFloor(*args
, **kwargs
):
1428 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1430 def GetRounded(*args
, **kwargs
):
1432 GetRounded() -> (x,y)
1436 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1438 def GetVectorLength(*args
, **kwargs
):
1439 """GetVectorLength(self) -> double"""
1440 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1442 def GetVectorAngle(*args
, **kwargs
):
1443 """GetVectorAngle(self) -> double"""
1444 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1446 def SetVectorLength(*args
, **kwargs
):
1447 """SetVectorLength(self, double length)"""
1448 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1450 def SetVectorAngle(*args
, **kwargs
):
1451 """SetVectorAngle(self, double degrees)"""
1452 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1454 def SetPolarCoordinates(self
, angle
, length
):
1455 self
.SetVectorLength(length
)
1456 self
.SetVectorAngle(angle
)
1457 def Normalize(self
):
1458 self
.SetVectorLength(1.0)
1460 def GetDistance(*args
, **kwargs
):
1461 """GetDistance(self, Point2D pt) -> double"""
1462 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1464 def GetDistanceSquare(*args
, **kwargs
):
1465 """GetDistanceSquare(self, Point2D pt) -> double"""
1466 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1468 def GetDotProduct(*args
, **kwargs
):
1469 """GetDotProduct(self, Point2D vec) -> double"""
1470 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1472 def GetCrossProduct(*args
, **kwargs
):
1473 """GetCrossProduct(self, Point2D vec) -> double"""
1474 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1476 def __neg__(*args
, **kwargs
):
1478 __neg__(self) -> Point2D
1480 the reflection of this point
1482 return _core_
.Point2D___neg__(*args
, **kwargs
)
1484 def __iadd__(*args
, **kwargs
):
1485 """__iadd__(self, Point2D pt) -> Point2D"""
1486 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1488 def __isub__(*args
, **kwargs
):
1489 """__isub__(self, Point2D pt) -> Point2D"""
1490 return _core_
.Point2D___isub__(*args
, **kwargs
)
1492 def __imul__(*args
, **kwargs
):
1493 """__imul__(self, Point2D pt) -> Point2D"""
1494 return _core_
.Point2D___imul__(*args
, **kwargs
)
1496 def __idiv__(*args
, **kwargs
):
1497 """__idiv__(self, Point2D pt) -> Point2D"""
1498 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1500 def __eq__(*args
, **kwargs
):
1502 __eq__(self, Point2D pt) -> bool
1506 return _core_
.Point2D___eq__(*args
, **kwargs
)
1508 def __ne__(*args
, **kwargs
):
1510 __ne__(self, Point2D pt) -> bool
1514 return _core_
.Point2D___ne__(*args
, **kwargs
)
1516 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1517 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1518 def Set(*args
, **kwargs
):
1519 """Set(self, double x=0, double y=0)"""
1520 return _core_
.Point2D_Set(*args
, **kwargs
)
1522 def Get(*args
, **kwargs
):
1526 Return x and y properties as a tuple.
1528 return _core_
.Point2D_Get(*args
, **kwargs
)
1530 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1531 def __str__(self
): return str(self
.Get())
1532 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1533 def __len__(self
): return len(self
.Get())
1534 def __getitem__(self
, index
): return self
.Get()[index
]
1535 def __setitem__(self
, index
, val
):
1536 if index
== 0: self
.x
= val
1537 elif index
== 1: self
.y
= val
1538 else: raise IndexError
1539 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1540 __safe_for_unpickling__
= True
1541 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1544 class Point2DPtr(Point2D
):
1545 def __init__(self
, this
):
1547 if not hasattr(self
,"thisown"): self
.thisown
= 0
1548 self
.__class
__ = Point2D
1549 _core_
.Point2D_swigregister(Point2DPtr
)
1551 def Point2DCopy(*args
, **kwargs
):
1553 Point2DCopy(Point2D pt) -> Point2D
1555 Create a w.Point2D object.
1557 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1561 def Point2DFromPoint(*args
, **kwargs
):
1563 Point2DFromPoint(Point pt) -> Point2D
1565 Create a w.Point2D object.
1567 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1571 #---------------------------------------------------------------------------
1573 FromStart
= _core_
.FromStart
1574 FromCurrent
= _core_
.FromCurrent
1575 FromEnd
= _core_
.FromEnd
1576 class InputStream(object):
1577 """Proxy of C++ InputStream class"""
1579 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1580 def __init__(self
, *args
, **kwargs
):
1581 """__init__(self, PyObject p) -> InputStream"""
1582 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1583 self
.this
= newobj
.this
1586 def __del__(self
, destroy
=_core_
.delete_InputStream
):
1589 if self
.thisown
: destroy(self
)
1592 def close(*args
, **kwargs
):
1594 return _core_
.InputStream_close(*args
, **kwargs
)
1596 def flush(*args
, **kwargs
):
1598 return _core_
.InputStream_flush(*args
, **kwargs
)
1600 def eof(*args
, **kwargs
):
1601 """eof(self) -> bool"""
1602 return _core_
.InputStream_eof(*args
, **kwargs
)
1604 def read(*args
, **kwargs
):
1605 """read(self, int size=-1) -> PyObject"""
1606 return _core_
.InputStream_read(*args
, **kwargs
)
1608 def readline(*args
, **kwargs
):
1609 """readline(self, int size=-1) -> PyObject"""
1610 return _core_
.InputStream_readline(*args
, **kwargs
)
1612 def readlines(*args
, **kwargs
):
1613 """readlines(self, int sizehint=-1) -> PyObject"""
1614 return _core_
.InputStream_readlines(*args
, **kwargs
)
1616 def seek(*args
, **kwargs
):
1617 """seek(self, int offset, int whence=0)"""
1618 return _core_
.InputStream_seek(*args
, **kwargs
)
1620 def tell(*args
, **kwargs
):
1621 """tell(self) -> int"""
1622 return _core_
.InputStream_tell(*args
, **kwargs
)
1624 def Peek(*args
, **kwargs
):
1625 """Peek(self) -> char"""
1626 return _core_
.InputStream_Peek(*args
, **kwargs
)
1628 def GetC(*args
, **kwargs
):
1629 """GetC(self) -> char"""
1630 return _core_
.InputStream_GetC(*args
, **kwargs
)
1632 def LastRead(*args
, **kwargs
):
1633 """LastRead(self) -> size_t"""
1634 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1636 def CanRead(*args
, **kwargs
):
1637 """CanRead(self) -> bool"""
1638 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1640 def Eof(*args
, **kwargs
):
1641 """Eof(self) -> bool"""
1642 return _core_
.InputStream_Eof(*args
, **kwargs
)
1644 def Ungetch(*args
, **kwargs
):
1645 """Ungetch(self, char c) -> bool"""
1646 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1648 def SeekI(*args
, **kwargs
):
1649 """SeekI(self, long pos, int mode=FromStart) -> long"""
1650 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1652 def TellI(*args
, **kwargs
):
1653 """TellI(self) -> long"""
1654 return _core_
.InputStream_TellI(*args
, **kwargs
)
1657 class InputStreamPtr(InputStream
):
1658 def __init__(self
, this
):
1660 if not hasattr(self
,"thisown"): self
.thisown
= 0
1661 self
.__class
__ = InputStream
1662 _core_
.InputStream_swigregister(InputStreamPtr
)
1663 DefaultPosition
= cvar
.DefaultPosition
1664 DefaultSize
= cvar
.DefaultSize
1666 class OutputStream(object):
1667 """Proxy of C++ OutputStream class"""
1668 def __init__(self
): raise RuntimeError, "No constructor defined"
1670 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1671 def write(*args
, **kwargs
):
1672 """write(self, PyObject obj)"""
1673 return _core_
.OutputStream_write(*args
, **kwargs
)
1676 class OutputStreamPtr(OutputStream
):
1677 def __init__(self
, this
):
1679 if not hasattr(self
,"thisown"): self
.thisown
= 0
1680 self
.__class
__ = OutputStream
1681 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1683 #---------------------------------------------------------------------------
1685 class FSFile(Object
):
1686 """Proxy of C++ FSFile class"""
1688 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1689 def __init__(self
, *args
, **kwargs
):
1691 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1692 DateTime modif) -> FSFile
1694 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1695 self
.this
= newobj
.this
1698 self
.thisown
= 0 # It will normally be deleted by the user of the wx.FileSystem
1700 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1703 if self
.thisown
: destroy(self
)
1706 def GetStream(*args
, **kwargs
):
1707 """GetStream(self) -> InputStream"""
1708 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1710 def GetMimeType(*args
, **kwargs
):
1711 """GetMimeType(self) -> String"""
1712 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1714 def GetLocation(*args
, **kwargs
):
1715 """GetLocation(self) -> String"""
1716 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1718 def GetAnchor(*args
, **kwargs
):
1719 """GetAnchor(self) -> String"""
1720 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1722 def GetModificationTime(*args
, **kwargs
):
1723 """GetModificationTime(self) -> DateTime"""
1724 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1727 class FSFilePtr(FSFile
):
1728 def __init__(self
, this
):
1730 if not hasattr(self
,"thisown"): self
.thisown
= 0
1731 self
.__class
__ = FSFile
1732 _core_
.FSFile_swigregister(FSFilePtr
)
1734 class CPPFileSystemHandler(object):
1735 """Proxy of C++ CPPFileSystemHandler class"""
1736 def __init__(self
): raise RuntimeError, "No constructor defined"
1738 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1740 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1741 def __init__(self
, this
):
1743 if not hasattr(self
,"thisown"): self
.thisown
= 0
1744 self
.__class
__ = CPPFileSystemHandler
1745 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1747 class FileSystemHandler(CPPFileSystemHandler
):
1748 """Proxy of C++ FileSystemHandler class"""
1750 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1751 def __init__(self
, *args
, **kwargs
):
1752 """__init__(self) -> FileSystemHandler"""
1753 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1754 self
.this
= newobj
.this
1757 self
._setCallbackInfo
(self
, FileSystemHandler
)
1759 def _setCallbackInfo(*args
, **kwargs
):
1760 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1761 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1763 def CanOpen(*args
, **kwargs
):
1764 """CanOpen(self, String location) -> bool"""
1765 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1767 def OpenFile(*args
, **kwargs
):
1768 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1769 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1771 def FindFirst(*args
, **kwargs
):
1772 """FindFirst(self, String spec, int flags=0) -> String"""
1773 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1775 def FindNext(*args
, **kwargs
):
1776 """FindNext(self) -> String"""
1777 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1779 def GetProtocol(*args
, **kwargs
):
1780 """GetProtocol(self, String location) -> String"""
1781 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1783 def GetLeftLocation(*args
, **kwargs
):
1784 """GetLeftLocation(self, String location) -> String"""
1785 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1787 def GetAnchor(*args
, **kwargs
):
1788 """GetAnchor(self, String location) -> String"""
1789 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1791 def GetRightLocation(*args
, **kwargs
):
1792 """GetRightLocation(self, String location) -> String"""
1793 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1795 def GetMimeTypeFromExt(*args
, **kwargs
):
1796 """GetMimeTypeFromExt(self, String location) -> String"""
1797 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1800 class FileSystemHandlerPtr(FileSystemHandler
):
1801 def __init__(self
, this
):
1803 if not hasattr(self
,"thisown"): self
.thisown
= 0
1804 self
.__class
__ = FileSystemHandler
1805 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1807 class FileSystem(Object
):
1808 """Proxy of C++ FileSystem class"""
1810 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1811 def __init__(self
, *args
, **kwargs
):
1812 """__init__(self) -> FileSystem"""
1813 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1814 self
.this
= newobj
.this
1817 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1820 if self
.thisown
: destroy(self
)
1823 def ChangePathTo(*args
, **kwargs
):
1824 """ChangePathTo(self, String location, bool is_dir=False)"""
1825 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1827 def GetPath(*args
, **kwargs
):
1828 """GetPath(self) -> String"""
1829 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1831 def OpenFile(*args
, **kwargs
):
1832 """OpenFile(self, String location) -> FSFile"""
1833 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1835 def FindFirst(*args
, **kwargs
):
1836 """FindFirst(self, String spec, int flags=0) -> String"""
1837 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1839 def FindNext(*args
, **kwargs
):
1840 """FindNext(self) -> String"""
1841 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1843 def AddHandler(*args
, **kwargs
):
1844 """AddHandler(CPPFileSystemHandler handler)"""
1845 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1847 AddHandler
= staticmethod(AddHandler
)
1848 def CleanUpHandlers(*args
, **kwargs
):
1849 """CleanUpHandlers()"""
1850 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1852 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1853 def FileNameToURL(*args
, **kwargs
):
1854 """FileNameToURL(String filename) -> String"""
1855 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1857 FileNameToURL
= staticmethod(FileNameToURL
)
1858 def URLToFileName(*args
, **kwargs
):
1859 """URLToFileName(String url) -> String"""
1860 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1862 URLToFileName
= staticmethod(URLToFileName
)
1864 class FileSystemPtr(FileSystem
):
1865 def __init__(self
, this
):
1867 if not hasattr(self
,"thisown"): self
.thisown
= 0
1868 self
.__class
__ = FileSystem
1869 _core_
.FileSystem_swigregister(FileSystemPtr
)
1871 def FileSystem_AddHandler(*args
, **kwargs
):
1872 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1873 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1875 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1876 """FileSystem_CleanUpHandlers()"""
1877 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1879 def FileSystem_FileNameToURL(*args
, **kwargs
):
1880 """FileSystem_FileNameToURL(String filename) -> String"""
1881 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1883 def FileSystem_URLToFileName(*args
, **kwargs
):
1884 """FileSystem_URLToFileName(String url) -> String"""
1885 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1887 class InternetFSHandler(CPPFileSystemHandler
):
1888 """Proxy of C++ InternetFSHandler class"""
1890 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1891 def __init__(self
, *args
, **kwargs
):
1892 """__init__(self) -> InternetFSHandler"""
1893 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1894 self
.this
= newobj
.this
1897 def CanOpen(*args
, **kwargs
):
1898 """CanOpen(self, String location) -> bool"""
1899 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1901 def OpenFile(*args
, **kwargs
):
1902 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1903 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1906 class InternetFSHandlerPtr(InternetFSHandler
):
1907 def __init__(self
, this
):
1909 if not hasattr(self
,"thisown"): self
.thisown
= 0
1910 self
.__class
__ = InternetFSHandler
1911 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1913 class ZipFSHandler(CPPFileSystemHandler
):
1914 """Proxy of C++ ZipFSHandler class"""
1916 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1917 def __init__(self
, *args
, **kwargs
):
1918 """__init__(self) -> ZipFSHandler"""
1919 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1920 self
.this
= newobj
.this
1923 def CanOpen(*args
, **kwargs
):
1924 """CanOpen(self, String location) -> bool"""
1925 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1927 def OpenFile(*args
, **kwargs
):
1928 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1929 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1931 def FindFirst(*args
, **kwargs
):
1932 """FindFirst(self, String spec, int flags=0) -> String"""
1933 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1935 def FindNext(*args
, **kwargs
):
1936 """FindNext(self) -> String"""
1937 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1940 class ZipFSHandlerPtr(ZipFSHandler
):
1941 def __init__(self
, this
):
1943 if not hasattr(self
,"thisown"): self
.thisown
= 0
1944 self
.__class
__ = ZipFSHandler
1945 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1948 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1949 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1950 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1952 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1953 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1954 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1956 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1957 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1958 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1959 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1961 Add 'file' to the memory filesystem. The dataItem parameter can
1962 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1963 arbitrary data. If a bitmap or image is used then the imgType
1964 parameter should specify what kind of image file it should be
1965 written as, wx.BITMAP_TYPE_PNG, etc.
1967 if isinstance(dataItem
, wx
.Image
):
1968 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1969 elif isinstance(dataItem
, wx
.Bitmap
):
1970 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1971 elif type(dataItem
) == str:
1972 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1974 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1976 class MemoryFSHandler(CPPFileSystemHandler
):
1977 """Proxy of C++ MemoryFSHandler class"""
1979 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1980 def __init__(self
, *args
, **kwargs
):
1981 """__init__(self) -> MemoryFSHandler"""
1982 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
1983 self
.this
= newobj
.this
1986 def RemoveFile(*args
, **kwargs
):
1987 """RemoveFile(String filename)"""
1988 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1990 RemoveFile
= staticmethod(RemoveFile
)
1991 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1992 def CanOpen(*args
, **kwargs
):
1993 """CanOpen(self, String location) -> bool"""
1994 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1996 def OpenFile(*args
, **kwargs
):
1997 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1998 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
2000 def FindFirst(*args
, **kwargs
):
2001 """FindFirst(self, String spec, int flags=0) -> String"""
2002 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
2004 def FindNext(*args
, **kwargs
):
2005 """FindNext(self) -> String"""
2006 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
2009 class MemoryFSHandlerPtr(MemoryFSHandler
):
2010 def __init__(self
, this
):
2012 if not hasattr(self
,"thisown"): self
.thisown
= 0
2013 self
.__class
__ = MemoryFSHandler
2014 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
2016 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
2017 """MemoryFSHandler_RemoveFile(String filename)"""
2018 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
2020 #---------------------------------------------------------------------------
2022 class ImageHandler(Object
):
2023 """Proxy of C++ ImageHandler class"""
2024 def __init__(self
): raise RuntimeError, "No constructor defined"
2026 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2027 def GetName(*args
, **kwargs
):
2028 """GetName(self) -> String"""
2029 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
2031 def GetExtension(*args
, **kwargs
):
2032 """GetExtension(self) -> String"""
2033 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
2035 def GetType(*args
, **kwargs
):
2036 """GetType(self) -> long"""
2037 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
2039 def GetMimeType(*args
, **kwargs
):
2040 """GetMimeType(self) -> String"""
2041 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
2043 def CanRead(*args
, **kwargs
):
2044 """CanRead(self, String name) -> bool"""
2045 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
2047 def SetName(*args
, **kwargs
):
2048 """SetName(self, String name)"""
2049 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
2051 def SetExtension(*args
, **kwargs
):
2052 """SetExtension(self, String extension)"""
2053 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
2055 def SetType(*args
, **kwargs
):
2056 """SetType(self, long type)"""
2057 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
2059 def SetMimeType(*args
, **kwargs
):
2060 """SetMimeType(self, String mimetype)"""
2061 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
2064 class ImageHandlerPtr(ImageHandler
):
2065 def __init__(self
, this
):
2067 if not hasattr(self
,"thisown"): self
.thisown
= 0
2068 self
.__class
__ = ImageHandler
2069 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
2071 class ImageHistogram(object):
2072 """Proxy of C++ ImageHistogram class"""
2074 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2075 def __init__(self
, *args
, **kwargs
):
2076 """__init__(self) -> ImageHistogram"""
2077 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
2078 self
.this
= newobj
.this
2081 def MakeKey(*args
, **kwargs
):
2083 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2085 Get the key in the histogram for the given RGB values
2087 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2089 MakeKey
= staticmethod(MakeKey
)
2090 def FindFirstUnusedColour(*args
, **kwargs
):
2092 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2094 Find first colour that is not used in the image and has higher RGB
2095 values than startR, startG, startB. Returns a tuple consisting of a
2096 success flag and rgb values.
2098 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2101 class ImageHistogramPtr(ImageHistogram
):
2102 def __init__(self
, this
):
2104 if not hasattr(self
,"thisown"): self
.thisown
= 0
2105 self
.__class
__ = ImageHistogram
2106 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2108 def ImageHistogram_MakeKey(*args
, **kwargs
):
2110 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2112 Get the key in the histogram for the given RGB values
2114 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2116 class Image(Object
):
2117 """Proxy of C++ Image class"""
2119 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2120 def __init__(self
, *args
, **kwargs
):
2121 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2122 newobj
= _core_
.new_Image(*args
, **kwargs
)
2123 self
.this
= newobj
.this
2126 def __del__(self
, destroy
=_core_
.delete_Image
):
2129 if self
.thisown
: destroy(self
)
2132 def Create(*args
, **kwargs
):
2133 """Create(self, int width, int height)"""
2134 return _core_
.Image_Create(*args
, **kwargs
)
2136 def Destroy(*args
, **kwargs
):
2140 Deletes the C++ object this Python object is a proxy for.
2142 return _core_
.Image_Destroy(*args
, **kwargs
)
2144 def Scale(*args
, **kwargs
):
2145 """Scale(self, int width, int height) -> Image"""
2146 return _core_
.Image_Scale(*args
, **kwargs
)
2148 def ShrinkBy(*args
, **kwargs
):
2149 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2150 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2152 def Rescale(*args
, **kwargs
):
2153 """Rescale(self, int width, int height) -> Image"""
2154 return _core_
.Image_Rescale(*args
, **kwargs
)
2156 def Resize(*args
, **kwargs
):
2157 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2158 return _core_
.Image_Resize(*args
, **kwargs
)
2160 def SetRGB(*args
, **kwargs
):
2161 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2162 return _core_
.Image_SetRGB(*args
, **kwargs
)
2164 def SetRGBRect(*args
, **kwargs
):
2165 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2166 return _core_
.Image_SetRGBRect(*args
, **kwargs
)
2168 def GetRed(*args
, **kwargs
):
2169 """GetRed(self, int x, int y) -> unsigned char"""
2170 return _core_
.Image_GetRed(*args
, **kwargs
)
2172 def GetGreen(*args
, **kwargs
):
2173 """GetGreen(self, int x, int y) -> unsigned char"""
2174 return _core_
.Image_GetGreen(*args
, **kwargs
)
2176 def GetBlue(*args
, **kwargs
):
2177 """GetBlue(self, int x, int y) -> unsigned char"""
2178 return _core_
.Image_GetBlue(*args
, **kwargs
)
2180 def SetAlpha(*args
, **kwargs
):
2181 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2182 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2184 def GetAlpha(*args
, **kwargs
):
2185 """GetAlpha(self, int x, int y) -> unsigned char"""
2186 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2188 def HasAlpha(*args
, **kwargs
):
2189 """HasAlpha(self) -> bool"""
2190 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2192 def InitAlpha(*args
, **kwargs
):
2196 Initializes the image alpha channel data. It is an error to call it if
2197 the image already has alpha data. If it doesn't, alpha data will be by
2198 default initialized to all pixels being fully opaque. But if the image
2199 has a a mask colour, all mask pixels will be completely transparent.
2201 return _core_
.Image_InitAlpha(*args
, **kwargs
)
2203 def FindFirstUnusedColour(*args
, **kwargs
):
2205 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2207 Find first colour that is not used in the image and has higher RGB
2208 values than startR, startG, startB. Returns a tuple consisting of a
2209 success flag and rgb values.
2211 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2213 def ConvertAlphaToMask(*args
, **kwargs
):
2215 ConvertAlphaToMask(self, byte threshold=128) -> bool
2217 If the image has alpha channel, this method converts it to mask. All pixels
2218 with alpha value less than ``threshold`` are replaced with mask colour and the
2219 alpha channel is removed. Mask colour is chosen automatically using
2220 `FindFirstUnusedColour`.
2222 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2225 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2227 def ConvertColourToAlpha(*args
, **kwargs
):
2229 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2231 This method converts an image where the original alpha information is
2232 only available as a shades of a colour (actually shades of grey)
2233 typically when you draw anti-aliased text into a bitmap. The DC
2234 drawing routines draw grey values on the black background although
2235 they actually mean to draw white with differnt alpha values. This
2236 method reverses it, assuming a black (!) background and white text.
2237 The method will then fill up the whole image with the colour given.
2239 return _core_
.Image_ConvertColourToAlpha(*args
, **kwargs
)
2241 def SetMaskFromImage(*args
, **kwargs
):
2242 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2243 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2245 def CanRead(*args
, **kwargs
):
2246 """CanRead(String name) -> bool"""
2247 return _core_
.Image_CanRead(*args
, **kwargs
)
2249 CanRead
= staticmethod(CanRead
)
2250 def GetImageCount(*args
, **kwargs
):
2251 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2252 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2254 GetImageCount
= staticmethod(GetImageCount
)
2255 def LoadFile(*args
, **kwargs
):
2256 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2257 return _core_
.Image_LoadFile(*args
, **kwargs
)
2259 def LoadMimeFile(*args
, **kwargs
):
2260 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2261 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2263 def SaveFile(*args
, **kwargs
):
2264 """SaveFile(self, String name, int type) -> bool"""
2265 return _core_
.Image_SaveFile(*args
, **kwargs
)
2267 def SaveMimeFile(*args
, **kwargs
):
2268 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2269 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2271 def CanReadStream(*args
, **kwargs
):
2272 """CanReadStream(InputStream stream) -> bool"""
2273 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2275 CanReadStream
= staticmethod(CanReadStream
)
2276 def LoadStream(*args
, **kwargs
):
2277 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2278 return _core_
.Image_LoadStream(*args
, **kwargs
)
2280 def LoadMimeStream(*args
, **kwargs
):
2281 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2282 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2284 def Ok(*args
, **kwargs
):
2285 """Ok(self) -> bool"""
2286 return _core_
.Image_Ok(*args
, **kwargs
)
2288 def GetWidth(*args
, **kwargs
):
2289 """GetWidth(self) -> int"""
2290 return _core_
.Image_GetWidth(*args
, **kwargs
)
2292 def GetHeight(*args
, **kwargs
):
2293 """GetHeight(self) -> int"""
2294 return _core_
.Image_GetHeight(*args
, **kwargs
)
2296 def GetSize(*args
, **kwargs
):
2297 """GetSize(self) -> Size"""
2298 return _core_
.Image_GetSize(*args
, **kwargs
)
2300 def GetSubImage(*args
, **kwargs
):
2301 """GetSubImage(self, Rect rect) -> Image"""
2302 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2304 def Size(*args
, **kwargs
):
2305 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2306 return _core_
.Image_Size(*args
, **kwargs
)
2308 def Copy(*args
, **kwargs
):
2309 """Copy(self) -> Image"""
2310 return _core_
.Image_Copy(*args
, **kwargs
)
2312 def Paste(*args
, **kwargs
):
2313 """Paste(self, Image image, int x, int y)"""
2314 return _core_
.Image_Paste(*args
, **kwargs
)
2316 def GetData(*args
, **kwargs
):
2317 """GetData(self) -> PyObject"""
2318 return _core_
.Image_GetData(*args
, **kwargs
)
2320 def SetData(*args
, **kwargs
):
2321 """SetData(self, PyObject data)"""
2322 return _core_
.Image_SetData(*args
, **kwargs
)
2324 def GetDataBuffer(*args
, **kwargs
):
2325 """GetDataBuffer(self) -> PyObject"""
2326 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2328 def SetDataBuffer(*args
, **kwargs
):
2329 """SetDataBuffer(self, PyObject data)"""
2330 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2332 def GetAlphaData(*args
, **kwargs
):
2333 """GetAlphaData(self) -> PyObject"""
2334 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2336 def SetAlphaData(*args
, **kwargs
):
2337 """SetAlphaData(self, PyObject data)"""
2338 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2340 def GetAlphaBuffer(*args
, **kwargs
):
2341 """GetAlphaBuffer(self) -> PyObject"""
2342 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2344 def SetAlphaBuffer(*args
, **kwargs
):
2345 """SetAlphaBuffer(self, PyObject data)"""
2346 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2348 def SetMaskColour(*args
, **kwargs
):
2349 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2350 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2352 def GetOrFindMaskColour(*args
, **kwargs
):
2354 GetOrFindMaskColour() -> (r,g,b)
2356 Get the current mask colour or find a suitable colour.
2358 return _core_
.Image_GetOrFindMaskColour(*args
, **kwargs
)
2360 def GetMaskRed(*args
, **kwargs
):
2361 """GetMaskRed(self) -> unsigned char"""
2362 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2364 def GetMaskGreen(*args
, **kwargs
):
2365 """GetMaskGreen(self) -> unsigned char"""
2366 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2368 def GetMaskBlue(*args
, **kwargs
):
2369 """GetMaskBlue(self) -> unsigned char"""
2370 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2372 def SetMask(*args
, **kwargs
):
2373 """SetMask(self, bool mask=True)"""
2374 return _core_
.Image_SetMask(*args
, **kwargs
)
2376 def HasMask(*args
, **kwargs
):
2377 """HasMask(self) -> bool"""
2378 return _core_
.Image_HasMask(*args
, **kwargs
)
2380 def Rotate(*args
, **kwargs
):
2382 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2383 Point offset_after_rotation=None) -> Image
2385 return _core_
.Image_Rotate(*args
, **kwargs
)
2387 def Rotate90(*args
, **kwargs
):
2388 """Rotate90(self, bool clockwise=True) -> Image"""
2389 return _core_
.Image_Rotate90(*args
, **kwargs
)
2391 def Mirror(*args
, **kwargs
):
2392 """Mirror(self, bool horizontally=True) -> Image"""
2393 return _core_
.Image_Mirror(*args
, **kwargs
)
2395 def Replace(*args
, **kwargs
):
2397 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2398 unsigned char r2, unsigned char g2, unsigned char b2)
2400 return _core_
.Image_Replace(*args
, **kwargs
)
2402 def ConvertToMono(*args
, **kwargs
):
2403 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2404 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2406 def SetOption(*args
, **kwargs
):
2407 """SetOption(self, String name, String value)"""
2408 return _core_
.Image_SetOption(*args
, **kwargs
)
2410 def SetOptionInt(*args
, **kwargs
):
2411 """SetOptionInt(self, String name, int value)"""
2412 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2414 def GetOption(*args
, **kwargs
):
2415 """GetOption(self, String name) -> String"""
2416 return _core_
.Image_GetOption(*args
, **kwargs
)
2418 def GetOptionInt(*args
, **kwargs
):
2419 """GetOptionInt(self, String name) -> int"""
2420 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2422 def HasOption(*args
, **kwargs
):
2423 """HasOption(self, String name) -> bool"""
2424 return _core_
.Image_HasOption(*args
, **kwargs
)
2426 def CountColours(*args
, **kwargs
):
2427 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2428 return _core_
.Image_CountColours(*args
, **kwargs
)
2430 def ComputeHistogram(*args
, **kwargs
):
2431 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2432 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2434 def AddHandler(*args
, **kwargs
):
2435 """AddHandler(ImageHandler handler)"""
2436 return _core_
.Image_AddHandler(*args
, **kwargs
)
2438 AddHandler
= staticmethod(AddHandler
)
2439 def InsertHandler(*args
, **kwargs
):
2440 """InsertHandler(ImageHandler handler)"""
2441 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2443 InsertHandler
= staticmethod(InsertHandler
)
2444 def RemoveHandler(*args
, **kwargs
):
2445 """RemoveHandler(String name) -> bool"""
2446 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2448 RemoveHandler
= staticmethod(RemoveHandler
)
2449 def GetImageExtWildcard(*args
, **kwargs
):
2450 """GetImageExtWildcard() -> String"""
2451 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2453 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2454 def ConvertToBitmap(*args
, **kwargs
):
2455 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2456 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2458 def ConvertToMonoBitmap(*args
, **kwargs
):
2459 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2460 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2462 def __nonzero__(self
): return self
.Ok()
2464 class ImagePtr(Image
):
2465 def __init__(self
, this
):
2467 if not hasattr(self
,"thisown"): self
.thisown
= 0
2468 self
.__class
__ = Image
2469 _core_
.Image_swigregister(ImagePtr
)
2471 def ImageFromMime(*args
, **kwargs
):
2472 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2473 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2477 def ImageFromStream(*args
, **kwargs
):
2478 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2479 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2483 def ImageFromStreamMime(*args
, **kwargs
):
2484 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2485 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2489 def EmptyImage(*args
, **kwargs
):
2490 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2491 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2495 def ImageFromBitmap(*args
, **kwargs
):
2496 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2497 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2501 def ImageFromData(*args
, **kwargs
):
2502 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2503 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2507 def ImageFromDataWithAlpha(*args
, **kwargs
):
2508 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2509 val
= _core_
.new_ImageFromDataWithAlpha(*args
, **kwargs
)
2513 def Image_CanRead(*args
, **kwargs
):
2514 """Image_CanRead(String name) -> bool"""
2515 return _core_
.Image_CanRead(*args
, **kwargs
)
2517 def Image_GetImageCount(*args
, **kwargs
):
2518 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2519 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2521 def Image_CanReadStream(*args
, **kwargs
):
2522 """Image_CanReadStream(InputStream stream) -> bool"""
2523 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2525 def Image_AddHandler(*args
, **kwargs
):
2526 """Image_AddHandler(ImageHandler handler)"""
2527 return _core_
.Image_AddHandler(*args
, **kwargs
)
2529 def Image_InsertHandler(*args
, **kwargs
):
2530 """Image_InsertHandler(ImageHandler handler)"""
2531 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2533 def Image_RemoveHandler(*args
, **kwargs
):
2534 """Image_RemoveHandler(String name) -> bool"""
2535 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2537 def Image_GetImageExtWildcard(*args
, **kwargs
):
2538 """Image_GetImageExtWildcard() -> String"""
2539 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2541 def InitAllImageHandlers():
2543 The former functionality of InitAllImageHanders is now done internal to
2544 the _core_ extension module and so this function has become a simple NOP.
2548 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2549 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2550 PNG_TYPE_COLOUR
= _core_
.PNG_TYPE_COLOUR
2551 PNG_TYPE_GREY
= _core_
.PNG_TYPE_GREY
2552 PNG_TYPE_GREY_RED
= _core_
.PNG_TYPE_GREY_RED
2553 BMP_24BPP
= _core_
.BMP_24BPP
2554 BMP_8BPP
= _core_
.BMP_8BPP
2555 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2556 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2557 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2558 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2559 BMP_4BPP
= _core_
.BMP_4BPP
2560 BMP_1BPP
= _core_
.BMP_1BPP
2561 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2562 class BMPHandler(ImageHandler
):
2563 """Proxy of C++ BMPHandler class"""
2565 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2566 def __init__(self
, *args
, **kwargs
):
2567 """__init__(self) -> BMPHandler"""
2568 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2569 self
.this
= newobj
.this
2573 class BMPHandlerPtr(BMPHandler
):
2574 def __init__(self
, this
):
2576 if not hasattr(self
,"thisown"): self
.thisown
= 0
2577 self
.__class
__ = BMPHandler
2578 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2579 NullImage
= cvar
.NullImage
2580 IMAGE_OPTION_FILENAME
= cvar
.IMAGE_OPTION_FILENAME
2581 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2582 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2583 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2584 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2585 IMAGE_OPTION_RESOLUTIONX
= cvar
.IMAGE_OPTION_RESOLUTIONX
2586 IMAGE_OPTION_RESOLUTIONY
= cvar
.IMAGE_OPTION_RESOLUTIONY
2587 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2588 IMAGE_OPTION_QUALITY
= cvar
.IMAGE_OPTION_QUALITY
2589 IMAGE_OPTION_BITSPERSAMPLE
= cvar
.IMAGE_OPTION_BITSPERSAMPLE
2590 IMAGE_OPTION_SAMPLESPERPIXEL
= cvar
.IMAGE_OPTION_SAMPLESPERPIXEL
2591 IMAGE_OPTION_COMPRESSION
= cvar
.IMAGE_OPTION_COMPRESSION
2592 IMAGE_OPTION_IMAGEDESCRIPTOR
= cvar
.IMAGE_OPTION_IMAGEDESCRIPTOR
2593 IMAGE_OPTION_PNG_FORMAT
= cvar
.IMAGE_OPTION_PNG_FORMAT
2594 IMAGE_OPTION_PNG_BITDEPTH
= cvar
.IMAGE_OPTION_PNG_BITDEPTH
2596 class ICOHandler(BMPHandler
):
2597 """Proxy of C++ ICOHandler class"""
2599 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2600 def __init__(self
, *args
, **kwargs
):
2601 """__init__(self) -> ICOHandler"""
2602 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2603 self
.this
= newobj
.this
2607 class ICOHandlerPtr(ICOHandler
):
2608 def __init__(self
, this
):
2610 if not hasattr(self
,"thisown"): self
.thisown
= 0
2611 self
.__class
__ = ICOHandler
2612 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2614 class CURHandler(ICOHandler
):
2615 """Proxy of C++ CURHandler class"""
2617 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2618 def __init__(self
, *args
, **kwargs
):
2619 """__init__(self) -> CURHandler"""
2620 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2621 self
.this
= newobj
.this
2625 class CURHandlerPtr(CURHandler
):
2626 def __init__(self
, this
):
2628 if not hasattr(self
,"thisown"): self
.thisown
= 0
2629 self
.__class
__ = CURHandler
2630 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2632 class ANIHandler(CURHandler
):
2633 """Proxy of C++ ANIHandler class"""
2635 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2636 def __init__(self
, *args
, **kwargs
):
2637 """__init__(self) -> ANIHandler"""
2638 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2639 self
.this
= newobj
.this
2643 class ANIHandlerPtr(ANIHandler
):
2644 def __init__(self
, this
):
2646 if not hasattr(self
,"thisown"): self
.thisown
= 0
2647 self
.__class
__ = ANIHandler
2648 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2650 class PNGHandler(ImageHandler
):
2651 """Proxy of C++ PNGHandler class"""
2653 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2654 def __init__(self
, *args
, **kwargs
):
2655 """__init__(self) -> PNGHandler"""
2656 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2657 self
.this
= newobj
.this
2661 class PNGHandlerPtr(PNGHandler
):
2662 def __init__(self
, this
):
2664 if not hasattr(self
,"thisown"): self
.thisown
= 0
2665 self
.__class
__ = PNGHandler
2666 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2668 class GIFHandler(ImageHandler
):
2669 """Proxy of C++ GIFHandler class"""
2671 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2672 def __init__(self
, *args
, **kwargs
):
2673 """__init__(self) -> GIFHandler"""
2674 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2675 self
.this
= newobj
.this
2679 class GIFHandlerPtr(GIFHandler
):
2680 def __init__(self
, this
):
2682 if not hasattr(self
,"thisown"): self
.thisown
= 0
2683 self
.__class
__ = GIFHandler
2684 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2686 class PCXHandler(ImageHandler
):
2687 """Proxy of C++ PCXHandler class"""
2689 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2690 def __init__(self
, *args
, **kwargs
):
2691 """__init__(self) -> PCXHandler"""
2692 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2693 self
.this
= newobj
.this
2697 class PCXHandlerPtr(PCXHandler
):
2698 def __init__(self
, this
):
2700 if not hasattr(self
,"thisown"): self
.thisown
= 0
2701 self
.__class
__ = PCXHandler
2702 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2704 class JPEGHandler(ImageHandler
):
2705 """Proxy of C++ JPEGHandler class"""
2707 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2708 def __init__(self
, *args
, **kwargs
):
2709 """__init__(self) -> JPEGHandler"""
2710 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2711 self
.this
= newobj
.this
2715 class JPEGHandlerPtr(JPEGHandler
):
2716 def __init__(self
, this
):
2718 if not hasattr(self
,"thisown"): self
.thisown
= 0
2719 self
.__class
__ = JPEGHandler
2720 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2722 class PNMHandler(ImageHandler
):
2723 """Proxy of C++ PNMHandler class"""
2725 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2726 def __init__(self
, *args
, **kwargs
):
2727 """__init__(self) -> PNMHandler"""
2728 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2729 self
.this
= newobj
.this
2733 class PNMHandlerPtr(PNMHandler
):
2734 def __init__(self
, this
):
2736 if not hasattr(self
,"thisown"): self
.thisown
= 0
2737 self
.__class
__ = PNMHandler
2738 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2740 class XPMHandler(ImageHandler
):
2741 """Proxy of C++ XPMHandler class"""
2743 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2744 def __init__(self
, *args
, **kwargs
):
2745 """__init__(self) -> XPMHandler"""
2746 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2747 self
.this
= newobj
.this
2751 class XPMHandlerPtr(XPMHandler
):
2752 def __init__(self
, this
):
2754 if not hasattr(self
,"thisown"): self
.thisown
= 0
2755 self
.__class
__ = XPMHandler
2756 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2758 class TIFFHandler(ImageHandler
):
2759 """Proxy of C++ TIFFHandler class"""
2761 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2762 def __init__(self
, *args
, **kwargs
):
2763 """__init__(self) -> TIFFHandler"""
2764 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2765 self
.this
= newobj
.this
2769 class TIFFHandlerPtr(TIFFHandler
):
2770 def __init__(self
, this
):
2772 if not hasattr(self
,"thisown"): self
.thisown
= 0
2773 self
.__class
__ = TIFFHandler
2774 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2776 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2777 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2778 class Quantize(object):
2779 """Performs quantization, or colour reduction, on a wxImage."""
2780 def __init__(self
): raise RuntimeError, "No constructor defined"
2782 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2783 def Quantize(*args
, **kwargs
):
2785 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2787 Reduce the colours in the source image and put the result into the
2788 destination image, setting the palette in the destination if
2789 needed. Both images may be the same, to overwrite the source image.
2791 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2793 Quantize
= staticmethod(Quantize
)
2795 class QuantizePtr(Quantize
):
2796 def __init__(self
, this
):
2798 if not hasattr(self
,"thisown"): self
.thisown
= 0
2799 self
.__class
__ = Quantize
2800 _core_
.Quantize_swigregister(QuantizePtr
)
2802 def Quantize_Quantize(*args
, **kwargs
):
2804 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2806 Reduce the colours in the source image and put the result into the
2807 destination image, setting the palette in the destination if
2808 needed. Both images may be the same, to overwrite the source image.
2810 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2812 #---------------------------------------------------------------------------
2814 class EvtHandler(Object
):
2815 """Proxy of C++ EvtHandler class"""
2817 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2818 def __init__(self
, *args
, **kwargs
):
2819 """__init__(self) -> EvtHandler"""
2820 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2821 self
.this
= newobj
.this
2824 def GetNextHandler(*args
, **kwargs
):
2825 """GetNextHandler(self) -> EvtHandler"""
2826 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2828 def GetPreviousHandler(*args
, **kwargs
):
2829 """GetPreviousHandler(self) -> EvtHandler"""
2830 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2832 def SetNextHandler(*args
, **kwargs
):
2833 """SetNextHandler(self, EvtHandler handler)"""
2834 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2836 def SetPreviousHandler(*args
, **kwargs
):
2837 """SetPreviousHandler(self, EvtHandler handler)"""
2838 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2840 def GetEvtHandlerEnabled(*args
, **kwargs
):
2841 """GetEvtHandlerEnabled(self) -> bool"""
2842 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2844 def SetEvtHandlerEnabled(*args
, **kwargs
):
2845 """SetEvtHandlerEnabled(self, bool enabled)"""
2846 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2848 def ProcessEvent(*args
, **kwargs
):
2849 """ProcessEvent(self, Event event) -> bool"""
2850 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2852 def AddPendingEvent(*args
, **kwargs
):
2853 """AddPendingEvent(self, Event event)"""
2854 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2856 def ProcessPendingEvents(*args
, **kwargs
):
2857 """ProcessPendingEvents(self)"""
2858 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2860 def Connect(*args
, **kwargs
):
2861 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2862 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
2864 def Disconnect(*args
, **kwargs
):
2865 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2866 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
2868 def _setOORInfo(*args
, **kwargs
):
2869 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2870 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
2872 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2874 Bind an event to an event handler.
2876 :param event: One of the EVT_* objects that specifies the
2877 type of event to bind,
2879 :param handler: A callable object to be invoked when the
2880 event is delivered to self. Pass None to
2881 disconnect an event handler.
2883 :param source: Sometimes the event originates from a
2884 different window than self, but you still
2885 want to catch it in self. (For example, a
2886 button event delivered to a frame.) By
2887 passing the source of the event, the event
2888 handling system is able to differentiate
2889 between the same event type from different
2892 :param id: Used to spcify the event source by ID instead
2895 :param id2: Used when it is desirable to bind a handler
2896 to a range of IDs, such as with EVT_MENU_RANGE.
2898 if source
is not None:
2900 event
.Bind(self
, id, id2
, handler
)
2902 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2904 Disconencts the event handler binding for event from self.
2905 Returns True if successful.
2907 if source
is not None:
2909 return event
.Unbind(self
, id, id2
)
2912 class EvtHandlerPtr(EvtHandler
):
2913 def __init__(self
, this
):
2915 if not hasattr(self
,"thisown"): self
.thisown
= 0
2916 self
.__class
__ = EvtHandler
2917 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
2919 #---------------------------------------------------------------------------
2921 class PyEventBinder(object):
2923 Instances of this class are used to bind specific events to event
2926 def __init__(self
, evtType
, expectedIDs
=0):
2927 if expectedIDs
not in [0, 1, 2]:
2928 raise ValueError, "Invalid number of expectedIDs"
2929 self
.expectedIDs
= expectedIDs
2931 if type(evtType
) == list or type(evtType
) == tuple:
2932 self
.evtType
= evtType
2934 self
.evtType
= [evtType
]
2937 def Bind(self
, target
, id1
, id2
, function
):
2938 """Bind this set of event types to target."""
2939 for et
in self
.evtType
:
2940 target
.Connect(id1
, id2
, et
, function
)
2943 def Unbind(self
, target
, id1
, id2
):
2944 """Remove an event binding."""
2946 for et
in self
.evtType
:
2947 success
+= target
.Disconnect(id1
, id2
, et
)
2951 def __call__(self
, *args
):
2953 For backwards compatibility with the old EVT_* functions.
2954 Should be called with either (window, func), (window, ID,
2955 func) or (window, ID1, ID2, func) parameters depending on the
2958 assert len(args
) == 2 + self
.expectedIDs
2962 if self
.expectedIDs
== 0:
2964 elif self
.expectedIDs
== 1:
2967 elif self
.expectedIDs
== 2:
2972 raise ValueError, "Unexpected number of IDs"
2974 self
.Bind(target
, id1
, id2
, func
)
2977 # These two are square pegs that don't fit the PyEventBinder hole...
2978 def EVT_COMMAND(win
, id, cmd
, func
):
2979 win
.Connect(id, -1, cmd
, func
)
2980 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2981 win
.Connect(id1
, id2
, cmd
, func
)
2984 #---------------------------------------------------------------------------
2986 #---------------------------------------------------------------------------
2988 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
2989 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
2991 def NewEventType(*args
, **kwargs
):
2992 """NewEventType() -> wxEventType"""
2993 return _core_
.NewEventType(*args
, **kwargs
)
2994 wxEVT_NULL
= _core_
.wxEVT_NULL
2995 wxEVT_FIRST
= _core_
.wxEVT_FIRST
2996 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
2997 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
2998 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
2999 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
3000 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
3001 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3002 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3003 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
3004 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
3005 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
3006 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
3007 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3008 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
3009 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
3010 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
3011 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
3012 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
3013 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
3014 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
3015 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
3016 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
3017 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
3018 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
3019 wxEVT_MOTION
= _core_
.wxEVT_MOTION
3020 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
3021 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
3022 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
3023 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
3024 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
3025 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
3026 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
3027 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
3028 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
3029 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
3030 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
3031 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
3032 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
3033 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
3034 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
3035 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
3036 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
3037 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
3038 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
3039 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
3040 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
3041 wxEVT_CHAR
= _core_
.wxEVT_CHAR
3042 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
3043 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
3044 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
3045 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
3046 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
3047 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
3048 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
3049 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
3050 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
3051 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
3052 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
3053 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
3054 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
3055 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
3056 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
3057 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
3058 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
3059 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
3060 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
3061 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
3062 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
3063 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
3064 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
3065 wxEVT_SIZE
= _core_
.wxEVT_SIZE
3066 wxEVT_MOVE
= _core_
.wxEVT_MOVE
3067 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
3068 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
3069 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
3070 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
3071 wxEVT_POWER
= _core_
.wxEVT_POWER
3072 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
3073 wxEVT_CREATE
= _core_
.wxEVT_CREATE
3074 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
3075 wxEVT_SHOW
= _core_
.wxEVT_SHOW
3076 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
3077 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
3078 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
3079 wxEVT_PAINT
= _core_
.wxEVT_PAINT
3080 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
3081 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
3082 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
3083 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
3084 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
3085 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
3086 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
3087 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
3088 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
3089 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
3090 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
3091 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
3092 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
3093 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
3094 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
3095 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
3096 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
3097 wxEVT_IDLE
= _core_
.wxEVT_IDLE
3098 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
3099 wxEVT_SIZING
= _core_
.wxEVT_SIZING
3100 wxEVT_MOVING
= _core_
.wxEVT_MOVING
3101 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
3102 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
3103 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
3104 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
3105 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
3106 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
3107 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
3109 # Create some event binders
3110 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
3111 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
3112 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
3113 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
3114 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
3115 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3116 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3117 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
3118 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
3119 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
3120 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
3121 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
3122 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
3123 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
3124 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
3125 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
3126 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
3127 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
3128 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
3129 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
3130 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
3131 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
3132 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
3133 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
3134 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3135 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3136 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
3137 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
3138 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
3139 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
3140 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
3141 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
3142 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
3143 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
3144 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
3145 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
3146 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
3147 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
3148 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
3149 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
3151 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
3152 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
3153 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
3154 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
3155 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
3156 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
3157 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
3158 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
3159 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
3160 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
3161 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
3162 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
3163 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
3165 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3173 wxEVT_MIDDLE_DCLICK
,
3181 # Scrolling from wxWindow (sent to wxScrolledWindow)
3182 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3183 wxEVT_SCROLLWIN_BOTTOM
,
3184 wxEVT_SCROLLWIN_LINEUP
,
3185 wxEVT_SCROLLWIN_LINEDOWN
,
3186 wxEVT_SCROLLWIN_PAGEUP
,
3187 wxEVT_SCROLLWIN_PAGEDOWN
,
3188 wxEVT_SCROLLWIN_THUMBTRACK
,
3189 wxEVT_SCROLLWIN_THUMBRELEASE
,
3192 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3193 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3194 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3195 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3196 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3197 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3198 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3199 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3201 # Scrolling from wxSlider and wxScrollBar
3202 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3203 wxEVT_SCROLL_BOTTOM
,
3204 wxEVT_SCROLL_LINEUP
,
3205 wxEVT_SCROLL_LINEDOWN
,
3206 wxEVT_SCROLL_PAGEUP
,
3207 wxEVT_SCROLL_PAGEDOWN
,
3208 wxEVT_SCROLL_THUMBTRACK
,
3209 wxEVT_SCROLL_THUMBRELEASE
,
3210 wxEVT_SCROLL_ENDSCROLL
,
3213 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3214 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3215 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3216 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3217 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3218 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3219 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3220 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3221 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3223 # Scrolling from wxSlider and wxScrollBar, with an id
3224 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3225 wxEVT_SCROLL_BOTTOM
,
3226 wxEVT_SCROLL_LINEUP
,
3227 wxEVT_SCROLL_LINEDOWN
,
3228 wxEVT_SCROLL_PAGEUP
,
3229 wxEVT_SCROLL_PAGEDOWN
,
3230 wxEVT_SCROLL_THUMBTRACK
,
3231 wxEVT_SCROLL_THUMBRELEASE
,
3232 wxEVT_SCROLL_ENDSCROLL
,
3235 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3236 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3237 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3238 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3239 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3240 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3241 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3242 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3243 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3245 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3246 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3247 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3248 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3249 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3250 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3251 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3252 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3253 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3254 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3256 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3257 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3258 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3259 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3260 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3261 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3262 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3263 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3264 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3267 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3268 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3269 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3270 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3271 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3272 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3273 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3275 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3277 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3278 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3280 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3284 #---------------------------------------------------------------------------
3286 class Event(Object
):
3287 """Proxy of C++ Event class"""
3288 def __init__(self
): raise RuntimeError, "No constructor defined"
3290 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3291 def __del__(self
, destroy
=_core_
.delete_Event
):
3294 if self
.thisown
: destroy(self
)
3297 def SetEventType(*args
, **kwargs
):
3298 """SetEventType(self, wxEventType typ)"""
3299 return _core_
.Event_SetEventType(*args
, **kwargs
)
3301 def GetEventType(*args
, **kwargs
):
3302 """GetEventType(self) -> wxEventType"""
3303 return _core_
.Event_GetEventType(*args
, **kwargs
)
3305 def GetEventObject(*args
, **kwargs
):
3306 """GetEventObject(self) -> Object"""
3307 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3309 def SetEventObject(*args
, **kwargs
):
3310 """SetEventObject(self, Object obj)"""
3311 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3313 def GetTimestamp(*args
, **kwargs
):
3314 """GetTimestamp(self) -> long"""
3315 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3317 def SetTimestamp(*args
, **kwargs
):
3318 """SetTimestamp(self, long ts=0)"""
3319 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3321 def GetId(*args
, **kwargs
):
3322 """GetId(self) -> int"""
3323 return _core_
.Event_GetId(*args
, **kwargs
)
3325 def SetId(*args
, **kwargs
):
3326 """SetId(self, int Id)"""
3327 return _core_
.Event_SetId(*args
, **kwargs
)
3329 def IsCommandEvent(*args
, **kwargs
):
3330 """IsCommandEvent(self) -> bool"""
3331 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3333 def Skip(*args
, **kwargs
):
3335 Skip(self, bool skip=True)
3337 Called by an event handler, it controls whether additional event
3338 handlers bound to this event will be called after the current event
3339 handler returns. Skip(false) (the default setting) will prevent
3340 additional event handlers from being called and control will be
3341 returned to the sender of the event immediately after the current
3342 handler has finished. Skip(True) will cause the event processing
3343 system to continue searching for a handler function for this event.
3346 return _core_
.Event_Skip(*args
, **kwargs
)
3348 def GetSkipped(*args
, **kwargs
):
3349 """GetSkipped(self) -> bool"""
3350 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3352 def ShouldPropagate(*args
, **kwargs
):
3353 """ShouldPropagate(self) -> bool"""
3354 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3356 def StopPropagation(*args
, **kwargs
):
3357 """StopPropagation(self) -> int"""
3358 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3360 def ResumePropagation(*args
, **kwargs
):
3361 """ResumePropagation(self, int propagationLevel)"""
3362 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3364 def Clone(*args
, **kwargs
):
3365 """Clone(self) -> Event"""
3366 return _core_
.Event_Clone(*args
, **kwargs
)
3369 class EventPtr(Event
):
3370 def __init__(self
, this
):
3372 if not hasattr(self
,"thisown"): self
.thisown
= 0
3373 self
.__class
__ = Event
3374 _core_
.Event_swigregister(EventPtr
)
3376 #---------------------------------------------------------------------------
3378 class PropagationDisabler(object):
3379 """Proxy of C++ PropagationDisabler class"""
3381 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3382 def __init__(self
, *args
, **kwargs
):
3383 """__init__(self, Event event) -> PropagationDisabler"""
3384 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3385 self
.this
= newobj
.this
3388 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3391 if self
.thisown
: destroy(self
)
3395 class PropagationDisablerPtr(PropagationDisabler
):
3396 def __init__(self
, this
):
3398 if not hasattr(self
,"thisown"): self
.thisown
= 0
3399 self
.__class
__ = PropagationDisabler
3400 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3402 class PropagateOnce(object):
3403 """Proxy of C++ PropagateOnce class"""
3405 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3406 def __init__(self
, *args
, **kwargs
):
3407 """__init__(self, Event event) -> PropagateOnce"""
3408 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3409 self
.this
= newobj
.this
3412 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3415 if self
.thisown
: destroy(self
)
3419 class PropagateOncePtr(PropagateOnce
):
3420 def __init__(self
, this
):
3422 if not hasattr(self
,"thisown"): self
.thisown
= 0
3423 self
.__class
__ = PropagateOnce
3424 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3426 #---------------------------------------------------------------------------
3428 class CommandEvent(Event
):
3429 """Proxy of C++ CommandEvent class"""
3431 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3432 def __init__(self
, *args
, **kwargs
):
3433 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3434 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3435 self
.this
= newobj
.this
3438 def GetSelection(*args
, **kwargs
):
3439 """GetSelection(self) -> int"""
3440 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3442 def SetString(*args
, **kwargs
):
3443 """SetString(self, String s)"""
3444 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3446 def GetString(*args
, **kwargs
):
3447 """GetString(self) -> String"""
3448 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3450 def IsChecked(*args
, **kwargs
):
3451 """IsChecked(self) -> bool"""
3452 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3455 def IsSelection(*args
, **kwargs
):
3456 """IsSelection(self) -> bool"""
3457 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3459 def SetExtraLong(*args
, **kwargs
):
3460 """SetExtraLong(self, long extraLong)"""
3461 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3463 def GetExtraLong(*args
, **kwargs
):
3464 """GetExtraLong(self) -> long"""
3465 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3467 def SetInt(*args
, **kwargs
):
3468 """SetInt(self, int i)"""
3469 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3471 def GetInt(*args
, **kwargs
):
3472 """GetInt(self) -> long"""
3473 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3475 def Clone(*args
, **kwargs
):
3476 """Clone(self) -> Event"""
3477 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3480 class CommandEventPtr(CommandEvent
):
3481 def __init__(self
, this
):
3483 if not hasattr(self
,"thisown"): self
.thisown
= 0
3484 self
.__class
__ = CommandEvent
3485 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3487 #---------------------------------------------------------------------------
3489 class NotifyEvent(CommandEvent
):
3490 """Proxy of C++ NotifyEvent class"""
3492 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3493 def __init__(self
, *args
, **kwargs
):
3494 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3495 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3496 self
.this
= newobj
.this
3499 def Veto(*args
, **kwargs
):
3501 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3503 def Allow(*args
, **kwargs
):
3505 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3507 def IsAllowed(*args
, **kwargs
):
3508 """IsAllowed(self) -> bool"""
3509 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3512 class NotifyEventPtr(NotifyEvent
):
3513 def __init__(self
, this
):
3515 if not hasattr(self
,"thisown"): self
.thisown
= 0
3516 self
.__class
__ = NotifyEvent
3517 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3519 #---------------------------------------------------------------------------
3521 class ScrollEvent(CommandEvent
):
3522 """Proxy of C++ ScrollEvent class"""
3524 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3525 def __init__(self
, *args
, **kwargs
):
3527 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3528 int orient=0) -> ScrollEvent
3530 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3531 self
.this
= newobj
.this
3534 def GetOrientation(*args
, **kwargs
):
3535 """GetOrientation(self) -> int"""
3536 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3538 def GetPosition(*args
, **kwargs
):
3539 """GetPosition(self) -> int"""
3540 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3542 def SetOrientation(*args
, **kwargs
):
3543 """SetOrientation(self, int orient)"""
3544 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3546 def SetPosition(*args
, **kwargs
):
3547 """SetPosition(self, int pos)"""
3548 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3551 class ScrollEventPtr(ScrollEvent
):
3552 def __init__(self
, this
):
3554 if not hasattr(self
,"thisown"): self
.thisown
= 0
3555 self
.__class
__ = ScrollEvent
3556 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3558 #---------------------------------------------------------------------------
3560 class ScrollWinEvent(Event
):
3561 """Proxy of C++ ScrollWinEvent class"""
3563 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3564 def __init__(self
, *args
, **kwargs
):
3565 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3566 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3567 self
.this
= newobj
.this
3570 def GetOrientation(*args
, **kwargs
):
3571 """GetOrientation(self) -> int"""
3572 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3574 def GetPosition(*args
, **kwargs
):
3575 """GetPosition(self) -> int"""
3576 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3578 def SetOrientation(*args
, **kwargs
):
3579 """SetOrientation(self, int orient)"""
3580 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3582 def SetPosition(*args
, **kwargs
):
3583 """SetPosition(self, int pos)"""
3584 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3587 class ScrollWinEventPtr(ScrollWinEvent
):
3588 def __init__(self
, this
):
3590 if not hasattr(self
,"thisown"): self
.thisown
= 0
3591 self
.__class
__ = ScrollWinEvent
3592 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3594 #---------------------------------------------------------------------------
3596 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3597 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3598 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3599 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3600 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3601 class MouseEvent(Event
):
3602 """Proxy of C++ MouseEvent class"""
3604 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3605 def __init__(self
, *args
, **kwargs
):
3606 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3607 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3608 self
.this
= newobj
.this
3611 def IsButton(*args
, **kwargs
):
3612 """IsButton(self) -> bool"""
3613 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
3615 def ButtonDown(*args
, **kwargs
):
3616 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3617 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
3619 def ButtonDClick(*args
, **kwargs
):
3620 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3621 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3623 def ButtonUp(*args
, **kwargs
):
3624 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3625 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
3627 def Button(*args
, **kwargs
):
3628 """Button(self, int but) -> bool"""
3629 return _core_
.MouseEvent_Button(*args
, **kwargs
)
3631 def ButtonIsDown(*args
, **kwargs
):
3632 """ButtonIsDown(self, int but) -> bool"""
3633 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3635 def GetButton(*args
, **kwargs
):
3636 """GetButton(self) -> int"""
3637 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
3639 def ControlDown(*args
, **kwargs
):
3640 """ControlDown(self) -> bool"""
3641 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
3643 def MetaDown(*args
, **kwargs
):
3644 """MetaDown(self) -> bool"""
3645 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
3647 def AltDown(*args
, **kwargs
):
3648 """AltDown(self) -> bool"""
3649 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
3651 def ShiftDown(*args
, **kwargs
):
3652 """ShiftDown(self) -> bool"""
3653 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
3655 def CmdDown(*args
, **kwargs
):
3657 CmdDown(self) -> bool
3659 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3660 platforms but the special "Apple" (a.k.a as "Command") key on
3661 Macs: it makes often sense to use it instead of, say, `ControlDown`
3662 because Cmd key is used for the same thing under Mac as Ctrl
3663 elsewhere. The Ctrl still exists, it's just not used for this
3664 purpose. So for non-Mac platforms this is the same as `ControlDown`
3665 and Macs this is the same as `MetaDown`.
3667 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
3669 def LeftDown(*args
, **kwargs
):
3670 """LeftDown(self) -> bool"""
3671 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
3673 def MiddleDown(*args
, **kwargs
):
3674 """MiddleDown(self) -> bool"""
3675 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
3677 def RightDown(*args
, **kwargs
):
3678 """RightDown(self) -> bool"""
3679 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
3681 def LeftUp(*args
, **kwargs
):
3682 """LeftUp(self) -> bool"""
3683 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
3685 def MiddleUp(*args
, **kwargs
):
3686 """MiddleUp(self) -> bool"""
3687 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
3689 def RightUp(*args
, **kwargs
):
3690 """RightUp(self) -> bool"""
3691 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
3693 def LeftDClick(*args
, **kwargs
):
3694 """LeftDClick(self) -> bool"""
3695 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
3697 def MiddleDClick(*args
, **kwargs
):
3698 """MiddleDClick(self) -> bool"""
3699 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3701 def RightDClick(*args
, **kwargs
):
3702 """RightDClick(self) -> bool"""
3703 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
3705 def LeftIsDown(*args
, **kwargs
):
3706 """LeftIsDown(self) -> bool"""
3707 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3709 def MiddleIsDown(*args
, **kwargs
):
3710 """MiddleIsDown(self) -> bool"""
3711 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3713 def RightIsDown(*args
, **kwargs
):
3714 """RightIsDown(self) -> bool"""
3715 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
3717 def Dragging(*args
, **kwargs
):
3718 """Dragging(self) -> bool"""
3719 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
3721 def Moving(*args
, **kwargs
):
3722 """Moving(self) -> bool"""
3723 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
3725 def Entering(*args
, **kwargs
):
3726 """Entering(self) -> bool"""
3727 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
3729 def Leaving(*args
, **kwargs
):
3730 """Leaving(self) -> bool"""
3731 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
3733 def GetPosition(*args
, **kwargs
):
3735 GetPosition(self) -> Point
3737 Returns the position of the mouse in window coordinates when the event
3740 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
3742 def GetPositionTuple(*args
, **kwargs
):
3744 GetPositionTuple() -> (x,y)
3746 Returns the position of the mouse in window coordinates when the event
3749 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3751 def GetLogicalPosition(*args
, **kwargs
):
3752 """GetLogicalPosition(self, DC dc) -> Point"""
3753 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3755 def GetX(*args
, **kwargs
):
3756 """GetX(self) -> int"""
3757 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
3759 def GetY(*args
, **kwargs
):
3760 """GetY(self) -> int"""
3761 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
3763 def GetWheelRotation(*args
, **kwargs
):
3764 """GetWheelRotation(self) -> int"""
3765 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3767 def GetWheelDelta(*args
, **kwargs
):
3768 """GetWheelDelta(self) -> int"""
3769 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3771 def GetLinesPerAction(*args
, **kwargs
):
3772 """GetLinesPerAction(self) -> int"""
3773 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3775 def IsPageScroll(*args
, **kwargs
):
3776 """IsPageScroll(self) -> bool"""
3777 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3779 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
3780 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
3781 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
3782 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
3783 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
3784 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
3785 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
3786 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
3787 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
3788 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
3789 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
3790 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
3792 class MouseEventPtr(MouseEvent
):
3793 def __init__(self
, this
):
3795 if not hasattr(self
,"thisown"): self
.thisown
= 0
3796 self
.__class
__ = MouseEvent
3797 _core_
.MouseEvent_swigregister(MouseEventPtr
)
3799 #---------------------------------------------------------------------------
3801 class SetCursorEvent(Event
):
3802 """Proxy of C++ SetCursorEvent class"""
3804 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3805 def __init__(self
, *args
, **kwargs
):
3806 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3807 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
3808 self
.this
= newobj
.this
3811 def GetX(*args
, **kwargs
):
3812 """GetX(self) -> int"""
3813 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
3815 def GetY(*args
, **kwargs
):
3816 """GetY(self) -> int"""
3817 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
3819 def SetCursor(*args
, **kwargs
):
3820 """SetCursor(self, Cursor cursor)"""
3821 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3823 def GetCursor(*args
, **kwargs
):
3824 """GetCursor(self) -> Cursor"""
3825 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3827 def HasCursor(*args
, **kwargs
):
3828 """HasCursor(self) -> bool"""
3829 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3832 class SetCursorEventPtr(SetCursorEvent
):
3833 def __init__(self
, this
):
3835 if not hasattr(self
,"thisown"): self
.thisown
= 0
3836 self
.__class
__ = SetCursorEvent
3837 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3839 #---------------------------------------------------------------------------
3841 class KeyEvent(Event
):
3842 """Proxy of C++ KeyEvent class"""
3844 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3845 def __init__(self
, *args
, **kwargs
):
3846 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3847 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
3848 self
.this
= newobj
.this
3851 def ControlDown(*args
, **kwargs
):
3852 """ControlDown(self) -> bool"""
3853 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
3855 def MetaDown(*args
, **kwargs
):
3856 """MetaDown(self) -> bool"""
3857 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
3859 def AltDown(*args
, **kwargs
):
3860 """AltDown(self) -> bool"""
3861 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
3863 def ShiftDown(*args
, **kwargs
):
3864 """ShiftDown(self) -> bool"""
3865 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
3867 def CmdDown(*args
, **kwargs
):
3869 CmdDown(self) -> bool
3871 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3872 platforms but the special "Apple" (a.k.a as "Command") key on
3873 Macs: it makes often sense to use it instead of, say, `ControlDown`
3874 because Cmd key is used for the same thing under Mac as Ctrl
3875 elsewhere. The Ctrl still exists, it's just not used for this
3876 purpose. So for non-Mac platforms this is the same as `ControlDown`
3877 and Macs this is the same as `MetaDown`.
3879 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
3881 def HasModifiers(*args
, **kwargs
):
3882 """HasModifiers(self) -> bool"""
3883 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
3885 def GetKeyCode(*args
, **kwargs
):
3886 """GetKeyCode(self) -> int"""
3887 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3889 KeyCode
= GetKeyCode
3890 def GetUnicodeKey(*args
, **kwargs
):
3891 """GetUnicodeKey(self) -> int"""
3892 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
3894 GetUniChar
= GetUnicodeKey
3895 def GetRawKeyCode(*args
, **kwargs
):
3896 """GetRawKeyCode(self) -> unsigned int"""
3897 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3899 def GetRawKeyFlags(*args
, **kwargs
):
3900 """GetRawKeyFlags(self) -> unsigned int"""
3901 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3903 def GetPosition(*args
, **kwargs
):
3905 GetPosition(self) -> Point
3907 Find the position of the event.
3909 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
3911 def GetPositionTuple(*args
, **kwargs
):
3913 GetPositionTuple() -> (x,y)
3915 Find the position of the event.
3917 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3919 def GetX(*args
, **kwargs
):
3920 """GetX(self) -> int"""
3921 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
3923 def GetY(*args
, **kwargs
):
3924 """GetY(self) -> int"""
3925 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
3927 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
3928 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
3929 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
3930 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
3931 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
3932 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
3933 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
3934 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
3935 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
3936 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
3938 class KeyEventPtr(KeyEvent
):
3939 def __init__(self
, this
):
3941 if not hasattr(self
,"thisown"): self
.thisown
= 0
3942 self
.__class
__ = KeyEvent
3943 _core_
.KeyEvent_swigregister(KeyEventPtr
)
3945 #---------------------------------------------------------------------------
3947 class SizeEvent(Event
):
3948 """Proxy of C++ SizeEvent class"""
3950 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3951 def __init__(self
, *args
, **kwargs
):
3952 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3953 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
3954 self
.this
= newobj
.this
3957 def GetSize(*args
, **kwargs
):
3958 """GetSize(self) -> Size"""
3959 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
3961 def GetRect(*args
, **kwargs
):
3962 """GetRect(self) -> Rect"""
3963 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
3965 def SetRect(*args
, **kwargs
):
3966 """SetRect(self, Rect rect)"""
3967 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
3969 def SetSize(*args
, **kwargs
):
3970 """SetSize(self, Size size)"""
3971 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
3973 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
3974 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
3976 class SizeEventPtr(SizeEvent
):
3977 def __init__(self
, this
):
3979 if not hasattr(self
,"thisown"): self
.thisown
= 0
3980 self
.__class
__ = SizeEvent
3981 _core_
.SizeEvent_swigregister(SizeEventPtr
)
3983 #---------------------------------------------------------------------------
3985 class MoveEvent(Event
):
3986 """Proxy of C++ MoveEvent class"""
3988 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3989 def __init__(self
, *args
, **kwargs
):
3990 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3991 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
3992 self
.this
= newobj
.this
3995 def GetPosition(*args
, **kwargs
):
3996 """GetPosition(self) -> Point"""
3997 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
3999 def GetRect(*args
, **kwargs
):
4000 """GetRect(self) -> Rect"""
4001 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
4003 def SetRect(*args
, **kwargs
):
4004 """SetRect(self, Rect rect)"""
4005 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
4007 def SetPosition(*args
, **kwargs
):
4008 """SetPosition(self, Point pos)"""
4009 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
4011 m_pos
= property(GetPosition
, SetPosition
)
4012 m_rect
= property(GetRect
, SetRect
)
4015 class MoveEventPtr(MoveEvent
):
4016 def __init__(self
, this
):
4018 if not hasattr(self
,"thisown"): self
.thisown
= 0
4019 self
.__class
__ = MoveEvent
4020 _core_
.MoveEvent_swigregister(MoveEventPtr
)
4022 #---------------------------------------------------------------------------
4024 class PaintEvent(Event
):
4025 """Proxy of C++ PaintEvent class"""
4027 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4028 def __init__(self
, *args
, **kwargs
):
4029 """__init__(self, int Id=0) -> PaintEvent"""
4030 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
4031 self
.this
= newobj
.this
4035 class PaintEventPtr(PaintEvent
):
4036 def __init__(self
, this
):
4038 if not hasattr(self
,"thisown"): self
.thisown
= 0
4039 self
.__class
__ = PaintEvent
4040 _core_
.PaintEvent_swigregister(PaintEventPtr
)
4042 class NcPaintEvent(Event
):
4043 """Proxy of C++ NcPaintEvent class"""
4045 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4046 def __init__(self
, *args
, **kwargs
):
4047 """__init__(self, int winid=0) -> NcPaintEvent"""
4048 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
4049 self
.this
= newobj
.this
4053 class NcPaintEventPtr(NcPaintEvent
):
4054 def __init__(self
, this
):
4056 if not hasattr(self
,"thisown"): self
.thisown
= 0
4057 self
.__class
__ = NcPaintEvent
4058 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
4060 #---------------------------------------------------------------------------
4062 class EraseEvent(Event
):
4063 """Proxy of C++ EraseEvent class"""
4065 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4066 def __init__(self
, *args
, **kwargs
):
4067 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4068 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
4069 self
.this
= newobj
.this
4072 def GetDC(*args
, **kwargs
):
4073 """GetDC(self) -> DC"""
4074 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
4077 class EraseEventPtr(EraseEvent
):
4078 def __init__(self
, this
):
4080 if not hasattr(self
,"thisown"): self
.thisown
= 0
4081 self
.__class
__ = EraseEvent
4082 _core_
.EraseEvent_swigregister(EraseEventPtr
)
4084 #---------------------------------------------------------------------------
4086 class FocusEvent(Event
):
4087 """Proxy of C++ FocusEvent class"""
4089 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4090 def __init__(self
, *args
, **kwargs
):
4091 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4092 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
4093 self
.this
= newobj
.this
4096 def GetWindow(*args
, **kwargs
):
4097 """GetWindow(self) -> Window"""
4098 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
4100 def SetWindow(*args
, **kwargs
):
4101 """SetWindow(self, Window win)"""
4102 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
4105 class FocusEventPtr(FocusEvent
):
4106 def __init__(self
, this
):
4108 if not hasattr(self
,"thisown"): self
.thisown
= 0
4109 self
.__class
__ = FocusEvent
4110 _core_
.FocusEvent_swigregister(FocusEventPtr
)
4112 #---------------------------------------------------------------------------
4114 class ChildFocusEvent(CommandEvent
):
4115 """Proxy of C++ ChildFocusEvent class"""
4117 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4118 def __init__(self
, *args
, **kwargs
):
4119 """__init__(self, Window win=None) -> ChildFocusEvent"""
4120 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
4121 self
.this
= newobj
.this
4124 def GetWindow(*args
, **kwargs
):
4125 """GetWindow(self) -> Window"""
4126 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
4129 class ChildFocusEventPtr(ChildFocusEvent
):
4130 def __init__(self
, this
):
4132 if not hasattr(self
,"thisown"): self
.thisown
= 0
4133 self
.__class
__ = ChildFocusEvent
4134 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
4136 #---------------------------------------------------------------------------
4138 class ActivateEvent(Event
):
4139 """Proxy of C++ ActivateEvent class"""
4141 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4142 def __init__(self
, *args
, **kwargs
):
4143 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4144 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
4145 self
.this
= newobj
.this
4148 def GetActive(*args
, **kwargs
):
4149 """GetActive(self) -> bool"""
4150 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
4153 class ActivateEventPtr(ActivateEvent
):
4154 def __init__(self
, this
):
4156 if not hasattr(self
,"thisown"): self
.thisown
= 0
4157 self
.__class
__ = ActivateEvent
4158 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
4160 #---------------------------------------------------------------------------
4162 class InitDialogEvent(Event
):
4163 """Proxy of C++ InitDialogEvent class"""
4165 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4166 def __init__(self
, *args
, **kwargs
):
4167 """__init__(self, int Id=0) -> InitDialogEvent"""
4168 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
4169 self
.this
= newobj
.this
4173 class InitDialogEventPtr(InitDialogEvent
):
4174 def __init__(self
, this
):
4176 if not hasattr(self
,"thisown"): self
.thisown
= 0
4177 self
.__class
__ = InitDialogEvent
4178 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
4180 #---------------------------------------------------------------------------
4182 class MenuEvent(Event
):
4183 """Proxy of C++ MenuEvent class"""
4185 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4186 def __init__(self
, *args
, **kwargs
):
4187 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4188 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
4189 self
.this
= newobj
.this
4192 def GetMenuId(*args
, **kwargs
):
4193 """GetMenuId(self) -> int"""
4194 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
4196 def IsPopup(*args
, **kwargs
):
4197 """IsPopup(self) -> bool"""
4198 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4200 def GetMenu(*args
, **kwargs
):
4201 """GetMenu(self) -> Menu"""
4202 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4205 class MenuEventPtr(MenuEvent
):
4206 def __init__(self
, this
):
4208 if not hasattr(self
,"thisown"): self
.thisown
= 0
4209 self
.__class
__ = MenuEvent
4210 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4212 #---------------------------------------------------------------------------
4214 class CloseEvent(Event
):
4215 """Proxy of C++ CloseEvent class"""
4217 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4218 def __init__(self
, *args
, **kwargs
):
4219 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4220 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4221 self
.this
= newobj
.this
4224 def SetLoggingOff(*args
, **kwargs
):
4225 """SetLoggingOff(self, bool logOff)"""
4226 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4228 def GetLoggingOff(*args
, **kwargs
):
4229 """GetLoggingOff(self) -> bool"""
4230 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4232 def Veto(*args
, **kwargs
):
4233 """Veto(self, bool veto=True)"""
4234 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4236 def SetCanVeto(*args
, **kwargs
):
4237 """SetCanVeto(self, bool canVeto)"""
4238 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4240 def CanVeto(*args
, **kwargs
):
4241 """CanVeto(self) -> bool"""
4242 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4244 def GetVeto(*args
, **kwargs
):
4245 """GetVeto(self) -> bool"""
4246 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4249 class CloseEventPtr(CloseEvent
):
4250 def __init__(self
, this
):
4252 if not hasattr(self
,"thisown"): self
.thisown
= 0
4253 self
.__class
__ = CloseEvent
4254 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4256 #---------------------------------------------------------------------------
4258 class ShowEvent(Event
):
4259 """Proxy of C++ ShowEvent class"""
4261 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4262 def __init__(self
, *args
, **kwargs
):
4263 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4264 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4265 self
.this
= newobj
.this
4268 def SetShow(*args
, **kwargs
):
4269 """SetShow(self, bool show)"""
4270 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4272 def GetShow(*args
, **kwargs
):
4273 """GetShow(self) -> bool"""
4274 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4277 class ShowEventPtr(ShowEvent
):
4278 def __init__(self
, this
):
4280 if not hasattr(self
,"thisown"): self
.thisown
= 0
4281 self
.__class
__ = ShowEvent
4282 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4284 #---------------------------------------------------------------------------
4286 class IconizeEvent(Event
):
4287 """Proxy of C++ IconizeEvent class"""
4289 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4290 def __init__(self
, *args
, **kwargs
):
4291 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4292 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4293 self
.this
= newobj
.this
4296 def Iconized(*args
, **kwargs
):
4297 """Iconized(self) -> bool"""
4298 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4301 class IconizeEventPtr(IconizeEvent
):
4302 def __init__(self
, this
):
4304 if not hasattr(self
,"thisown"): self
.thisown
= 0
4305 self
.__class
__ = IconizeEvent
4306 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4308 #---------------------------------------------------------------------------
4310 class MaximizeEvent(Event
):
4311 """Proxy of C++ MaximizeEvent class"""
4313 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4314 def __init__(self
, *args
, **kwargs
):
4315 """__init__(self, int id=0) -> MaximizeEvent"""
4316 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4317 self
.this
= newobj
.this
4321 class MaximizeEventPtr(MaximizeEvent
):
4322 def __init__(self
, this
):
4324 if not hasattr(self
,"thisown"): self
.thisown
= 0
4325 self
.__class
__ = MaximizeEvent
4326 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4328 #---------------------------------------------------------------------------
4330 class DropFilesEvent(Event
):
4331 """Proxy of C++ DropFilesEvent class"""
4332 def __init__(self
): raise RuntimeError, "No constructor defined"
4334 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4335 def GetPosition(*args
, **kwargs
):
4336 """GetPosition(self) -> Point"""
4337 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4339 def GetNumberOfFiles(*args
, **kwargs
):
4340 """GetNumberOfFiles(self) -> int"""
4341 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4343 def GetFiles(*args
, **kwargs
):
4344 """GetFiles(self) -> PyObject"""
4345 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4348 class DropFilesEventPtr(DropFilesEvent
):
4349 def __init__(self
, this
):
4351 if not hasattr(self
,"thisown"): self
.thisown
= 0
4352 self
.__class
__ = DropFilesEvent
4353 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4355 #---------------------------------------------------------------------------
4357 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4358 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4359 class UpdateUIEvent(CommandEvent
):
4360 """Proxy of C++ UpdateUIEvent class"""
4362 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4363 def __init__(self
, *args
, **kwargs
):
4364 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4365 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4366 self
.this
= newobj
.this
4369 def GetChecked(*args
, **kwargs
):
4370 """GetChecked(self) -> bool"""
4371 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4373 def GetEnabled(*args
, **kwargs
):
4374 """GetEnabled(self) -> bool"""
4375 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4377 def GetText(*args
, **kwargs
):
4378 """GetText(self) -> String"""
4379 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4381 def GetSetText(*args
, **kwargs
):
4382 """GetSetText(self) -> bool"""
4383 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4385 def GetSetChecked(*args
, **kwargs
):
4386 """GetSetChecked(self) -> bool"""
4387 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4389 def GetSetEnabled(*args
, **kwargs
):
4390 """GetSetEnabled(self) -> bool"""
4391 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4393 def Check(*args
, **kwargs
):
4394 """Check(self, bool check)"""
4395 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4397 def Enable(*args
, **kwargs
):
4398 """Enable(self, bool enable)"""
4399 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4401 def SetText(*args
, **kwargs
):
4402 """SetText(self, String text)"""
4403 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4405 def SetUpdateInterval(*args
, **kwargs
):
4406 """SetUpdateInterval(long updateInterval)"""
4407 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4409 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4410 def GetUpdateInterval(*args
, **kwargs
):
4411 """GetUpdateInterval() -> long"""
4412 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4414 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4415 def CanUpdate(*args
, **kwargs
):
4416 """CanUpdate(Window win) -> bool"""
4417 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4419 CanUpdate
= staticmethod(CanUpdate
)
4420 def ResetUpdateTime(*args
, **kwargs
):
4421 """ResetUpdateTime()"""
4422 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4424 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4425 def SetMode(*args
, **kwargs
):
4426 """SetMode(int mode)"""
4427 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4429 SetMode
= staticmethod(SetMode
)
4430 def GetMode(*args
, **kwargs
):
4431 """GetMode() -> int"""
4432 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4434 GetMode
= staticmethod(GetMode
)
4436 class UpdateUIEventPtr(UpdateUIEvent
):
4437 def __init__(self
, this
):
4439 if not hasattr(self
,"thisown"): self
.thisown
= 0
4440 self
.__class
__ = UpdateUIEvent
4441 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4443 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4444 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4445 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4447 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4448 """UpdateUIEvent_GetUpdateInterval() -> long"""
4449 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4451 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4452 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4453 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4455 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4456 """UpdateUIEvent_ResetUpdateTime()"""
4457 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4459 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4460 """UpdateUIEvent_SetMode(int mode)"""
4461 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4463 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4464 """UpdateUIEvent_GetMode() -> int"""
4465 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4467 #---------------------------------------------------------------------------
4469 class SysColourChangedEvent(Event
):
4470 """Proxy of C++ SysColourChangedEvent class"""
4472 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4473 def __init__(self
, *args
, **kwargs
):
4474 """__init__(self) -> SysColourChangedEvent"""
4475 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
4476 self
.this
= newobj
.this
4480 class SysColourChangedEventPtr(SysColourChangedEvent
):
4481 def __init__(self
, this
):
4483 if not hasattr(self
,"thisown"): self
.thisown
= 0
4484 self
.__class
__ = SysColourChangedEvent
4485 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4487 #---------------------------------------------------------------------------
4489 class MouseCaptureChangedEvent(Event
):
4490 """Proxy of C++ MouseCaptureChangedEvent class"""
4492 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4493 def __init__(self
, *args
, **kwargs
):
4494 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4495 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4496 self
.this
= newobj
.this
4499 def GetCapturedWindow(*args
, **kwargs
):
4500 """GetCapturedWindow(self) -> Window"""
4501 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4504 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4505 def __init__(self
, this
):
4507 if not hasattr(self
,"thisown"): self
.thisown
= 0
4508 self
.__class
__ = MouseCaptureChangedEvent
4509 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4511 #---------------------------------------------------------------------------
4513 class DisplayChangedEvent(Event
):
4514 """Proxy of C++ DisplayChangedEvent class"""
4516 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4517 def __init__(self
, *args
, **kwargs
):
4518 """__init__(self) -> DisplayChangedEvent"""
4519 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
4520 self
.this
= newobj
.this
4524 class DisplayChangedEventPtr(DisplayChangedEvent
):
4525 def __init__(self
, this
):
4527 if not hasattr(self
,"thisown"): self
.thisown
= 0
4528 self
.__class
__ = DisplayChangedEvent
4529 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4531 #---------------------------------------------------------------------------
4533 class PaletteChangedEvent(Event
):
4534 """Proxy of C++ PaletteChangedEvent class"""
4536 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4537 def __init__(self
, *args
, **kwargs
):
4538 """__init__(self, int id=0) -> PaletteChangedEvent"""
4539 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
4540 self
.this
= newobj
.this
4543 def SetChangedWindow(*args
, **kwargs
):
4544 """SetChangedWindow(self, Window win)"""
4545 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4547 def GetChangedWindow(*args
, **kwargs
):
4548 """GetChangedWindow(self) -> Window"""
4549 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4552 class PaletteChangedEventPtr(PaletteChangedEvent
):
4553 def __init__(self
, this
):
4555 if not hasattr(self
,"thisown"): self
.thisown
= 0
4556 self
.__class
__ = PaletteChangedEvent
4557 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4559 #---------------------------------------------------------------------------
4561 class QueryNewPaletteEvent(Event
):
4562 """Proxy of C++ QueryNewPaletteEvent class"""
4564 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4565 def __init__(self
, *args
, **kwargs
):
4566 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4567 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4568 self
.this
= newobj
.this
4571 def SetPaletteRealized(*args
, **kwargs
):
4572 """SetPaletteRealized(self, bool realized)"""
4573 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4575 def GetPaletteRealized(*args
, **kwargs
):
4576 """GetPaletteRealized(self) -> bool"""
4577 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4580 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4581 def __init__(self
, this
):
4583 if not hasattr(self
,"thisown"): self
.thisown
= 0
4584 self
.__class
__ = QueryNewPaletteEvent
4585 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4587 #---------------------------------------------------------------------------
4589 class NavigationKeyEvent(Event
):
4590 """Proxy of C++ NavigationKeyEvent class"""
4592 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4593 def __init__(self
, *args
, **kwargs
):
4594 """__init__(self) -> NavigationKeyEvent"""
4595 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
4596 self
.this
= newobj
.this
4599 def GetDirection(*args
, **kwargs
):
4600 """GetDirection(self) -> bool"""
4601 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4603 def SetDirection(*args
, **kwargs
):
4604 """SetDirection(self, bool forward)"""
4605 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4607 def IsWindowChange(*args
, **kwargs
):
4608 """IsWindowChange(self) -> bool"""
4609 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4611 def SetWindowChange(*args
, **kwargs
):
4612 """SetWindowChange(self, bool ischange)"""
4613 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4615 def IsFromTab(*args
, **kwargs
):
4616 """IsFromTab(self) -> bool"""
4617 return _core_
.NavigationKeyEvent_IsFromTab(*args
, **kwargs
)
4619 def SetFromTab(*args
, **kwargs
):
4620 """SetFromTab(self, bool bIs)"""
4621 return _core_
.NavigationKeyEvent_SetFromTab(*args
, **kwargs
)
4623 def SetFlags(*args
, **kwargs
):
4624 """SetFlags(self, long flags)"""
4625 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
4627 def GetCurrentFocus(*args
, **kwargs
):
4628 """GetCurrentFocus(self) -> Window"""
4629 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4631 def SetCurrentFocus(*args
, **kwargs
):
4632 """SetCurrentFocus(self, Window win)"""
4633 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4635 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
4636 IsForward
= _core_
.NavigationKeyEvent_IsForward
4637 WinChange
= _core_
.NavigationKeyEvent_WinChange
4638 FromTab
= _core_
.NavigationKeyEvent_FromTab
4640 class NavigationKeyEventPtr(NavigationKeyEvent
):
4641 def __init__(self
, this
):
4643 if not hasattr(self
,"thisown"): self
.thisown
= 0
4644 self
.__class
__ = NavigationKeyEvent
4645 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4647 #---------------------------------------------------------------------------
4649 class WindowCreateEvent(CommandEvent
):
4650 """Proxy of C++ WindowCreateEvent class"""
4652 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4653 def __init__(self
, *args
, **kwargs
):
4654 """__init__(self, Window win=None) -> WindowCreateEvent"""
4655 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
4656 self
.this
= newobj
.this
4659 def GetWindow(*args
, **kwargs
):
4660 """GetWindow(self) -> Window"""
4661 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4664 class WindowCreateEventPtr(WindowCreateEvent
):
4665 def __init__(self
, this
):
4667 if not hasattr(self
,"thisown"): self
.thisown
= 0
4668 self
.__class
__ = WindowCreateEvent
4669 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4671 class WindowDestroyEvent(CommandEvent
):
4672 """Proxy of C++ WindowDestroyEvent class"""
4674 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4675 def __init__(self
, *args
, **kwargs
):
4676 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4677 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
4678 self
.this
= newobj
.this
4681 def GetWindow(*args
, **kwargs
):
4682 """GetWindow(self) -> Window"""
4683 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4686 class WindowDestroyEventPtr(WindowDestroyEvent
):
4687 def __init__(self
, this
):
4689 if not hasattr(self
,"thisown"): self
.thisown
= 0
4690 self
.__class
__ = WindowDestroyEvent
4691 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4693 #---------------------------------------------------------------------------
4695 class ContextMenuEvent(CommandEvent
):
4696 """Proxy of C++ ContextMenuEvent class"""
4698 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4699 def __init__(self
, *args
, **kwargs
):
4700 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4701 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
4702 self
.this
= newobj
.this
4705 def GetPosition(*args
, **kwargs
):
4706 """GetPosition(self) -> Point"""
4707 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4709 def SetPosition(*args
, **kwargs
):
4710 """SetPosition(self, Point pos)"""
4711 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4714 class ContextMenuEventPtr(ContextMenuEvent
):
4715 def __init__(self
, this
):
4717 if not hasattr(self
,"thisown"): self
.thisown
= 0
4718 self
.__class
__ = ContextMenuEvent
4719 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4721 #---------------------------------------------------------------------------
4723 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
4724 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
4725 class IdleEvent(Event
):
4726 """Proxy of C++ IdleEvent class"""
4728 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4729 def __init__(self
, *args
, **kwargs
):
4730 """__init__(self) -> IdleEvent"""
4731 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
4732 self
.this
= newobj
.this
4735 def RequestMore(*args
, **kwargs
):
4736 """RequestMore(self, bool needMore=True)"""
4737 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
4739 def MoreRequested(*args
, **kwargs
):
4740 """MoreRequested(self) -> bool"""
4741 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
4743 def SetMode(*args
, **kwargs
):
4744 """SetMode(int mode)"""
4745 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4747 SetMode
= staticmethod(SetMode
)
4748 def GetMode(*args
, **kwargs
):
4749 """GetMode() -> int"""
4750 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4752 GetMode
= staticmethod(GetMode
)
4753 def CanSend(*args
, **kwargs
):
4754 """CanSend(Window win) -> bool"""
4755 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4757 CanSend
= staticmethod(CanSend
)
4759 class IdleEventPtr(IdleEvent
):
4760 def __init__(self
, this
):
4762 if not hasattr(self
,"thisown"): self
.thisown
= 0
4763 self
.__class
__ = IdleEvent
4764 _core_
.IdleEvent_swigregister(IdleEventPtr
)
4766 def IdleEvent_SetMode(*args
, **kwargs
):
4767 """IdleEvent_SetMode(int mode)"""
4768 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4770 def IdleEvent_GetMode(*args
, **kwargs
):
4771 """IdleEvent_GetMode() -> int"""
4772 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4774 def IdleEvent_CanSend(*args
, **kwargs
):
4775 """IdleEvent_CanSend(Window win) -> bool"""
4776 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4778 #---------------------------------------------------------------------------
4780 class PyEvent(Event
):
4781 """Proxy of C++ PyEvent class"""
4783 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4784 def __init__(self
, *args
, **kwargs
):
4785 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4786 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
4787 self
.this
= newobj
.this
4792 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
4795 if self
.thisown
: destroy(self
)
4798 def SetSelf(*args
, **kwargs
):
4799 """SetSelf(self, PyObject self)"""
4800 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
4802 def GetSelf(*args
, **kwargs
):
4803 """GetSelf(self) -> PyObject"""
4804 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
4807 class PyEventPtr(PyEvent
):
4808 def __init__(self
, this
):
4810 if not hasattr(self
,"thisown"): self
.thisown
= 0
4811 self
.__class
__ = PyEvent
4812 _core_
.PyEvent_swigregister(PyEventPtr
)
4814 class PyCommandEvent(CommandEvent
):
4815 """Proxy of C++ PyCommandEvent class"""
4817 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4818 def __init__(self
, *args
, **kwargs
):
4819 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4820 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
4821 self
.this
= newobj
.this
4826 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
4829 if self
.thisown
: destroy(self
)
4832 def SetSelf(*args
, **kwargs
):
4833 """SetSelf(self, PyObject self)"""
4834 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4836 def GetSelf(*args
, **kwargs
):
4837 """GetSelf(self) -> PyObject"""
4838 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4841 class PyCommandEventPtr(PyCommandEvent
):
4842 def __init__(self
, this
):
4844 if not hasattr(self
,"thisown"): self
.thisown
= 0
4845 self
.__class
__ = PyCommandEvent
4846 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4848 class DateEvent(CommandEvent
):
4849 """Proxy of C++ DateEvent class"""
4851 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4852 def __init__(self
, *args
, **kwargs
):
4853 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4854 newobj
= _core_
.new_DateEvent(*args
, **kwargs
)
4855 self
.this
= newobj
.this
4858 def GetDate(*args
, **kwargs
):
4859 """GetDate(self) -> DateTime"""
4860 return _core_
.DateEvent_GetDate(*args
, **kwargs
)
4862 def SetDate(*args
, **kwargs
):
4863 """SetDate(self, DateTime date)"""
4864 return _core_
.DateEvent_SetDate(*args
, **kwargs
)
4867 class DateEventPtr(DateEvent
):
4868 def __init__(self
, this
):
4870 if not hasattr(self
,"thisown"): self
.thisown
= 0
4871 self
.__class
__ = DateEvent
4872 _core_
.DateEvent_swigregister(DateEventPtr
)
4874 wxEVT_DATE_CHANGED
= _core_
.wxEVT_DATE_CHANGED
4875 EVT_DATE_CHANGED
= wx
.PyEventBinder( wxEVT_DATE_CHANGED
, 1 )
4877 #---------------------------------------------------------------------------
4879 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
4880 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
4881 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
4882 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
4883 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
4884 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
4885 class PyApp(EvtHandler
):
4887 The ``wx.PyApp`` class is an *implementation detail*, please use the
4888 `wx.App` class (or some other derived class) instead.
4891 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4892 def __init__(self
, *args
, **kwargs
):
4894 __init__(self) -> PyApp
4896 Create a new application object, starting the bootstrap process.
4898 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
4899 self
.this
= newobj
.this
4902 self
._setCallbackInfo
(self
, PyApp
)
4903 self
._setOORInfo
(self
)
4905 def __del__(self
, destroy
=_core_
.delete_PyApp
):
4908 if self
.thisown
: destroy(self
)
4911 def _setCallbackInfo(*args
, **kwargs
):
4912 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4913 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
4915 def GetAppName(*args
, **kwargs
):
4917 GetAppName(self) -> String
4919 Get the application name.
4921 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
4923 def SetAppName(*args
, **kwargs
):
4925 SetAppName(self, String name)
4927 Set the application name. This value may be used automatically by
4928 `wx.Config` and such.
4930 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
4932 def GetClassName(*args
, **kwargs
):
4934 GetClassName(self) -> String
4936 Get the application's class name.
4938 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
4940 def SetClassName(*args
, **kwargs
):
4942 SetClassName(self, String name)
4944 Set the application's class name. This value may be used for
4945 X-resources if applicable for the platform
4947 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
4949 def GetVendorName(*args
, **kwargs
):
4951 GetVendorName(self) -> String
4953 Get the application's vendor name.
4955 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
4957 def SetVendorName(*args
, **kwargs
):
4959 SetVendorName(self, String name)
4961 Set the application's vendor name. This value may be used
4962 automatically by `wx.Config` and such.
4964 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
4966 def GetTraits(*args
, **kwargs
):
4968 GetTraits(self) -> wxAppTraits
4970 Return (and create if necessary) the app traits object to which we
4971 delegate for everything which either should be configurable by the
4972 user (then he can change the default behaviour simply by overriding
4973 CreateTraits() and returning his own traits object) or which is
4974 GUI/console dependent as then wx.AppTraits allows us to abstract the
4975 differences behind the common facade.
4977 :todo: Add support for overriding CreateAppTraits in wxPython.
4979 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
4981 def ProcessPendingEvents(*args
, **kwargs
):
4983 ProcessPendingEvents(self)
4985 Process all events in the Pending Events list -- it is necessary to
4986 call this function to process posted events. This normally happens
4987 during each event loop iteration.
4989 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4991 def Yield(*args
, **kwargs
):
4993 Yield(self, bool onlyIfNeeded=False) -> bool
4995 Process all currently pending events right now, instead of waiting
4996 until return to the event loop. It is an error to call ``Yield``
4997 recursively unless the value of ``onlyIfNeeded`` is True.
4999 :warning: This function is dangerous as it can lead to unexpected
5000 reentrancies (i.e. when called from an event handler it may
5001 result in calling the same event handler again), use with
5002 extreme care or, better, don't use at all!
5004 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
5007 return _core_
.PyApp_Yield(*args
, **kwargs
)
5009 def WakeUpIdle(*args
, **kwargs
):
5013 Make sure that idle events are sent again.
5014 :see: `wx.WakeUpIdle`
5016 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
5018 def IsMainLoopRunning(*args
, **kwargs
):
5020 IsMainLoopRunning() -> bool
5022 Returns True if we're running the main loop, i.e. if the events can
5023 currently be dispatched.
5025 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5027 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
5028 def MainLoop(*args
, **kwargs
):
5030 MainLoop(self) -> int
5032 Execute the main GUI loop, the function doesn't normally return until
5033 all top level windows have been closed and destroyed.
5035 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
5037 def Exit(*args
, **kwargs
):
5041 Exit the main loop thus terminating the application.
5044 return _core_
.PyApp_Exit(*args
, **kwargs
)
5046 def ExitMainLoop(*args
, **kwargs
):
5050 Exit the main GUI loop during the next iteration of the main
5051 loop, (i.e. it does not stop the program immediately!)
5053 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
5055 def Pending(*args
, **kwargs
):
5057 Pending(self) -> bool
5059 Returns True if there are unprocessed events in the event queue.
5061 return _core_
.PyApp_Pending(*args
, **kwargs
)
5063 def Dispatch(*args
, **kwargs
):
5065 Dispatch(self) -> bool
5067 Process the first event in the event queue (blocks until an event
5068 appears if there are none currently)
5070 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
5072 def ProcessIdle(*args
, **kwargs
):
5074 ProcessIdle(self) -> bool
5076 Called from the MainLoop when the application becomes idle (there are
5077 no pending events) and sends a `wx.IdleEvent` to all interested
5078 parties. Returns True if more idle events are needed, False if not.
5080 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
5082 def SendIdleEvents(*args
, **kwargs
):
5084 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5086 Send idle event to window and all subwindows. Returns True if more
5087 idle time is requested.
5089 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
5091 def IsActive(*args
, **kwargs
):
5093 IsActive(self) -> bool
5095 Return True if our app has focus.
5097 return _core_
.PyApp_IsActive(*args
, **kwargs
)
5099 def SetTopWindow(*args
, **kwargs
):
5101 SetTopWindow(self, Window win)
5103 Set the *main* top level window
5105 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
5107 def GetTopWindow(*args
, **kwargs
):
5109 GetTopWindow(self) -> Window
5111 Return the *main* top level window (if it hadn't been set previously
5112 with SetTopWindow(), will return just some top level window and, if
5113 there not any, will return None)
5115 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
5117 def SetExitOnFrameDelete(*args
, **kwargs
):
5119 SetExitOnFrameDelete(self, bool flag)
5121 Control the exit behaviour: by default, the program will exit the main
5122 loop (and so, usually, terminate) when the last top-level program
5123 window is deleted. Beware that if you disable this behaviour (with
5124 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5125 explicitly from somewhere.
5127 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
5129 def GetExitOnFrameDelete(*args
, **kwargs
):
5131 GetExitOnFrameDelete(self) -> bool
5133 Get the current exit behaviour setting.
5135 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
5137 def SetUseBestVisual(*args
, **kwargs
):
5139 SetUseBestVisual(self, bool flag)
5141 Set whether the app should try to use the best available visual on
5142 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5144 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
5146 def GetUseBestVisual(*args
, **kwargs
):
5148 GetUseBestVisual(self) -> bool
5150 Get current UseBestVisual setting.
5152 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
5154 def SetPrintMode(*args
, **kwargs
):
5155 """SetPrintMode(self, int mode)"""
5156 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
5158 def GetPrintMode(*args
, **kwargs
):
5159 """GetPrintMode(self) -> int"""
5160 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
5162 def SetAssertMode(*args
, **kwargs
):
5164 SetAssertMode(self, int mode)
5166 Set the OnAssert behaviour for debug and hybrid builds.
5168 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
5170 def GetAssertMode(*args
, **kwargs
):
5172 GetAssertMode(self) -> int
5174 Get the current OnAssert behaviour setting.
5176 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
5178 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5179 """GetMacSupportPCMenuShortcuts() -> bool"""
5180 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5182 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
5183 def GetMacAboutMenuItemId(*args
, **kwargs
):
5184 """GetMacAboutMenuItemId() -> long"""
5185 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5187 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
5188 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
5189 """GetMacPreferencesMenuItemId() -> long"""
5190 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5192 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
5193 def GetMacExitMenuItemId(*args
, **kwargs
):
5194 """GetMacExitMenuItemId() -> long"""
5195 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5197 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
5198 def GetMacHelpMenuTitleName(*args
, **kwargs
):
5199 """GetMacHelpMenuTitleName() -> String"""
5200 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5202 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
5203 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5204 """SetMacSupportPCMenuShortcuts(bool val)"""
5205 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5207 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
5208 def SetMacAboutMenuItemId(*args
, **kwargs
):
5209 """SetMacAboutMenuItemId(long val)"""
5210 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5212 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
5213 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
5214 """SetMacPreferencesMenuItemId(long val)"""
5215 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5217 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
5218 def SetMacExitMenuItemId(*args
, **kwargs
):
5219 """SetMacExitMenuItemId(long val)"""
5220 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5222 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
5223 def SetMacHelpMenuTitleName(*args
, **kwargs
):
5224 """SetMacHelpMenuTitleName(String val)"""
5225 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5227 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
5228 def _BootstrapApp(*args
, **kwargs
):
5232 For internal use only
5234 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
5236 def GetComCtl32Version(*args
, **kwargs
):
5238 GetComCtl32Version() -> int
5240 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5241 it wasn't found at all. Raises an exception on non-Windows platforms.
5243 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5245 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
5247 class PyAppPtr(PyApp
):
5248 def __init__(self
, this
):
5250 if not hasattr(self
,"thisown"): self
.thisown
= 0
5251 self
.__class
__ = PyApp
5252 _core_
.PyApp_swigregister(PyAppPtr
)
5254 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5256 PyApp_IsMainLoopRunning() -> bool
5258 Returns True if we're running the main loop, i.e. if the events can
5259 currently be dispatched.
5261 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5263 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5264 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5265 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5267 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5268 """PyApp_GetMacAboutMenuItemId() -> long"""
5269 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5271 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5272 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5273 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5275 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5276 """PyApp_GetMacExitMenuItemId() -> long"""
5277 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5279 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5280 """PyApp_GetMacHelpMenuTitleName() -> String"""
5281 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5283 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5284 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5285 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5287 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5288 """PyApp_SetMacAboutMenuItemId(long val)"""
5289 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5291 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5292 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5293 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5295 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5296 """PyApp_SetMacExitMenuItemId(long val)"""
5297 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5299 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5300 """PyApp_SetMacHelpMenuTitleName(String val)"""
5301 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5303 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5305 PyApp_GetComCtl32Version() -> int
5307 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5308 it wasn't found at all. Raises an exception on non-Windows platforms.
5310 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5312 #---------------------------------------------------------------------------
5315 def Exit(*args
, **kwargs
):
5319 Force an exit of the application. Convenience for wx.GetApp().Exit()
5321 return _core_
.Exit(*args
, **kwargs
)
5323 def Yield(*args
, **kwargs
):
5327 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5329 return _core_
.Yield(*args
, **kwargs
)
5331 def YieldIfNeeded(*args
, **kwargs
):
5333 YieldIfNeeded() -> bool
5335 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5337 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5339 def SafeYield(*args
, **kwargs
):
5341 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5343 This function is similar to `wx.Yield`, except that it disables the
5344 user input to all program windows before calling `wx.Yield` and
5345 re-enables it again afterwards. If ``win`` is not None, this window
5346 will remain enabled, allowing the implementation of some limited user
5349 :Returns: the result of the call to `wx.Yield`.
5351 return _core_
.SafeYield(*args
, **kwargs
)
5353 def WakeUpIdle(*args
, **kwargs
):
5357 Cause the message queue to become empty again, so idle events will be
5360 return _core_
.WakeUpIdle(*args
, **kwargs
)
5362 def PostEvent(*args
, **kwargs
):
5364 PostEvent(EvtHandler dest, Event event)
5366 Send an event to a window or other wx.EvtHandler to be processed
5369 return _core_
.PostEvent(*args
, **kwargs
)
5371 def App_CleanUp(*args
, **kwargs
):
5375 For internal use only, it is used to cleanup after wxWidgets when
5378 return _core_
.App_CleanUp(*args
, **kwargs
)
5380 def GetApp(*args
, **kwargs
):
5384 Return a reference to the current wx.App object.
5386 return _core_
.GetApp(*args
, **kwargs
)
5388 def SetDefaultPyEncoding(*args
, **kwargs
):
5390 SetDefaultPyEncoding(string encoding)
5392 Sets the encoding that wxPython will use when it needs to convert a
5393 Python string or unicode object to or from a wxString.
5395 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5396 but please be aware that the default encoding within the same locale
5397 may be slightly different on different platforms. For example, please
5398 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5399 between the common latin/roman encodings.
5401 return _core_
.SetDefaultPyEncoding(*args
, **kwargs
)
5403 def GetDefaultPyEncoding(*args
, **kwargs
):
5405 GetDefaultPyEncoding() -> string
5407 Gets the current encoding that wxPython will use when it needs to
5408 convert a Python string or unicode object to or from a wxString.
5410 return _core_
.GetDefaultPyEncoding(*args
, **kwargs
)
5411 #----------------------------------------------------------------------
5413 class PyOnDemandOutputWindow
:
5415 A class that can be used for redirecting Python's stdout and
5416 stderr streams. It will do nothing until something is wrriten to
5417 the stream at which point it will create a Frame with a text area
5418 and write the text there.
5420 def __init__(self
, title
= "wxPython: stdout/stderr"):
5423 self
.pos
= wx
.DefaultPosition
5424 self
.size
= (450, 300)
5427 def SetParent(self
, parent
):
5428 """Set the window to be used as the popup Frame's parent."""
5429 self
.parent
= parent
5432 def CreateOutputWindow(self
, st
):
5433 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
5434 style
=wx
.DEFAULT_FRAME_STYLE
)
5435 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
5436 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
5437 self
.text
.AppendText(st
)
5438 self
.frame
.Show(True)
5439 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
5442 def OnCloseWindow(self
, event
):
5443 if self
.frame
is not None:
5444 self
.frame
.Destroy()
5449 # These methods provide the file-like output behaviour.
5450 def write(self
, text
):
5452 Create the output window if needed and write the string to it.
5453 If not called in the context of the gui thread then uses
5454 CallAfter to do the work there.
5456 if self
.frame
is None:
5457 if not wx
.Thread_IsMain():
5458 wx
.CallAfter(self
.CreateOutputWindow
, text
)
5460 self
.CreateOutputWindow(text
)
5462 if not wx
.Thread_IsMain():
5463 wx
.CallAfter(self
.text
.AppendText
, text
)
5465 self
.text
.AppendText(text
)
5469 if self
.frame
is not None:
5470 wx
.CallAfter(self
.frame
.Close
)
5478 #----------------------------------------------------------------------
5480 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5482 class App(wx
.PyApp
):
5484 The ``wx.App`` class represents the application and is used to:
5486 * bootstrap the wxPython system and initialize the underlying
5488 * set and get application-wide properties
5489 * implement the windowing system main message or event loop,
5490 and to dispatch events to window instances
5493 Every application must have a ``wx.App`` instance, and all
5494 creation of UI objects should be delayed until after the
5495 ``wx.App`` object has been created in order to ensure that the gui
5496 platform and wxWidgets have been fully initialized.
5498 Normally you would derive from this class and implement an
5499 ``OnInit`` method that creates a frame and then calls
5500 ``self.SetTopWindow(frame)``.
5502 :see: `wx.PySimpleApp` for a simpler app class that can be used
5506 outputWindowClass
= PyOnDemandOutputWindow
5508 def __init__(self
, redirect
=_defRedirect
, filename
=None,
5509 useBestVisual
=False, clearSigInt
=True):
5511 Construct a ``wx.App`` object.
5513 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5514 redirected? Defaults to True on Windows and Mac, False
5515 otherwise. If `filename` is None then output will be
5516 redirected to a window that pops up as needed. (You can
5517 control what kind of window is created for the output by
5518 resetting the class variable ``outputWindowClass`` to a
5519 class of your choosing.)
5521 :param filename: The name of a file to redirect output to, if
5524 :param useBestVisual: Should the app try to use the best
5525 available visual provided by the system (only relevant on
5526 systems that have more than one visual.) This parameter
5527 must be used instead of calling `SetUseBestVisual` later
5528 on because it must be set before the underlying GUI
5529 toolkit is initialized.
5531 :param clearSigInt: Should SIGINT be cleared? This allows the
5532 app to terminate upon a Ctrl-C in the console like other
5535 :note: You should override OnInit to do applicaition
5536 initialization to ensure that the system, toolkit and
5537 wxWidgets are fully initialized.
5539 wx
.PyApp
.__init
__(self
)
5541 if wx
.Platform
== "__WXMAC__":
5544 if not MacOS
.WMAvailable():
5546 This program needs access to the screen. Please run with 'pythonw',
5547 not 'python', and only when you are logged in on the main display of
5555 # This has to be done before OnInit
5556 self
.SetUseBestVisual(useBestVisual
)
5558 # Set the default handler for SIGINT. This fixes a problem
5559 # where if Ctrl-C is pressed in the console that started this
5560 # app then it will not appear to do anything, (not even send
5561 # KeyboardInterrupt???) but will later segfault on exit. By
5562 # setting the default handler then the app will exit, as
5563 # expected (depending on platform.)
5567 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5571 # Save and redirect the stdio to a window?
5572 self
.stdioWin
= None
5573 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5575 self
.RedirectStdio(filename
)
5577 # Use Python's install prefix as the default
5578 wx
.StandardPaths
.Get().SetInstallPrefix(_sys
.prefix
)
5580 # This finishes the initialization of wxWindows and then calls
5581 # the OnInit that should be present in the derived class
5582 self
._BootstrapApp
()
5587 self
.RestoreStdio() # Just in case the MainLoop was overridden
5592 def SetTopWindow(self
, frame
):
5593 """Set the \"main\" top level window"""
5595 self
.stdioWin
.SetParent(frame
)
5596 wx
.PyApp
.SetTopWindow(self
, frame
)
5600 """Execute the main GUI event loop"""
5601 wx
.PyApp
.MainLoop(self
)
5605 def RedirectStdio(self
, filename
=None):
5606 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5608 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5610 self
.stdioWin
= self
.outputWindowClass()
5611 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5614 def RestoreStdio(self
):
5615 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5618 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
5620 Set the title, position and/or size of the output window if
5621 the stdio has been redirected. This should be called before
5622 any output would cause the output window to be created.
5625 if title
is not None:
5626 self
.stdioWin
.title
= title
5628 self
.stdioWin
.pos
= pos
5629 if size
is not None:
5630 self
.stdioWin
.size
= size
5635 # change from wx.PyApp_XX to wx.App_XX
5636 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
5637 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
5638 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
5639 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
5640 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
5641 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
5642 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
5643 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
5644 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
5645 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
5646 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
5648 #----------------------------------------------------------------------------
5650 class PySimpleApp(wx
.App
):
5652 A simple application class. You can just create one of these and
5653 then then make your top level windows later, and not have to worry
5654 about OnInit. For example::
5656 app = wx.PySimpleApp()
5657 frame = wx.Frame(None, title='Hello World')
5664 def __init__(self
, redirect
=False, filename
=None,
5665 useBestVisual
=False, clearSigInt
=True):
5667 :see: `wx.App.__init__`
5669 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
5676 # Is anybody using this one?
5677 class PyWidgetTester(wx
.App
):
5678 def __init__(self
, size
= (250, 100)):
5680 wx
.App
.__init
__(self
, 0)
5683 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5684 self
.SetTopWindow(self
.frame
)
5687 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
5688 w
= widgetClass(self
.frame
, *args
, **kwargs
)
5689 self
.frame
.Show(True)
5691 #----------------------------------------------------------------------------
5692 # DO NOT hold any other references to this object. This is how we
5693 # know when to cleanup system resources that wxWidgets is holding. When
5694 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5695 # goes to zero and it calls the wx.App_CleanUp function.
5697 class __wxPyCleanup
:
5699 self
.cleanup
= _core_
.App_CleanUp
5703 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5705 ## # another possible solution, but it gets called too early...
5707 ## atexit.register(_core_.wxApp_CleanUp)
5710 #----------------------------------------------------------------------------
5712 #---------------------------------------------------------------------------
5714 class EventLoop(object):
5715 """Proxy of C++ EventLoop class"""
5717 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5718 def __init__(self
, *args
, **kwargs
):
5719 """__init__(self) -> EventLoop"""
5720 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
5721 self
.this
= newobj
.this
5724 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
5727 if self
.thisown
: destroy(self
)
5730 def Run(*args
, **kwargs
):
5731 """Run(self) -> int"""
5732 return _core_
.EventLoop_Run(*args
, **kwargs
)
5734 def Exit(*args
, **kwargs
):
5735 """Exit(self, int rc=0)"""
5736 return _core_
.EventLoop_Exit(*args
, **kwargs
)
5738 def Pending(*args
, **kwargs
):
5739 """Pending(self) -> bool"""
5740 return _core_
.EventLoop_Pending(*args
, **kwargs
)
5742 def Dispatch(*args
, **kwargs
):
5743 """Dispatch(self) -> bool"""
5744 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
5746 def IsRunning(*args
, **kwargs
):
5747 """IsRunning(self) -> bool"""
5748 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
5750 def GetActive(*args
, **kwargs
):
5751 """GetActive() -> EventLoop"""
5752 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5754 GetActive
= staticmethod(GetActive
)
5755 def SetActive(*args
, **kwargs
):
5756 """SetActive(EventLoop loop)"""
5757 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5759 SetActive
= staticmethod(SetActive
)
5761 class EventLoopPtr(EventLoop
):
5762 def __init__(self
, this
):
5764 if not hasattr(self
,"thisown"): self
.thisown
= 0
5765 self
.__class
__ = EventLoop
5766 _core_
.EventLoop_swigregister(EventLoopPtr
)
5768 def EventLoop_GetActive(*args
, **kwargs
):
5769 """EventLoop_GetActive() -> EventLoop"""
5770 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5772 def EventLoop_SetActive(*args
, **kwargs
):
5773 """EventLoop_SetActive(EventLoop loop)"""
5774 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5776 #---------------------------------------------------------------------------
5778 class AcceleratorEntry(object):
5780 A class used to define items in an `wx.AcceleratorTable`. wxPython
5781 programs can choose to use wx.AcceleratorEntry objects, but using a
5782 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5783 as well. See `__init__` for of the tuple values.
5785 :see: `wx.AcceleratorTable`
5788 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5789 def __init__(self
, *args
, **kwargs
):
5791 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5793 Construct a wx.AcceleratorEntry.
5795 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
5796 self
.this
= newobj
.this
5799 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
5802 if self
.thisown
: destroy(self
)
5805 def Set(*args
, **kwargs
):
5807 Set(self, int flags, int keyCode, int cmd)
5809 (Re)set the attributes of a wx.AcceleratorEntry.
5812 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
5814 def GetFlags(*args
, **kwargs
):
5816 GetFlags(self) -> int
5818 Get the AcceleratorEntry's flags.
5820 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5822 def GetKeyCode(*args
, **kwargs
):
5824 GetKeyCode(self) -> int
5826 Get the AcceleratorEntry's keycode.
5828 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5830 def GetCommand(*args
, **kwargs
):
5832 GetCommand(self) -> int
5834 Get the AcceleratorEntry's command ID.
5836 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5839 class AcceleratorEntryPtr(AcceleratorEntry
):
5840 def __init__(self
, this
):
5842 if not hasattr(self
,"thisown"): self
.thisown
= 0
5843 self
.__class
__ = AcceleratorEntry
5844 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5846 class AcceleratorTable(Object
):
5848 An accelerator table allows the application to specify a table of
5849 keyboard shortcuts for menus or other commands. On Windows, menu or
5850 button commands are supported; on GTK, only menu commands are
5854 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5855 def __init__(self
, *args
, **kwargs
):
5857 __init__(entries) -> AcceleratorTable
5859 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5860 items or or of 3-tuples (flags, keyCode, cmdID)
5862 :see: `wx.AcceleratorEntry`
5864 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
5865 self
.this
= newobj
.this
5868 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
5871 if self
.thisown
: destroy(self
)
5874 def Ok(*args
, **kwargs
):
5875 """Ok(self) -> bool"""
5876 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
5879 class AcceleratorTablePtr(AcceleratorTable
):
5880 def __init__(self
, this
):
5882 if not hasattr(self
,"thisown"): self
.thisown
= 0
5883 self
.__class
__ = AcceleratorTable
5884 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5887 def GetAccelFromString(*args
, **kwargs
):
5888 """GetAccelFromString(String label) -> AcceleratorEntry"""
5889 return _core_
.GetAccelFromString(*args
, **kwargs
)
5890 #---------------------------------------------------------------------------
5892 class VisualAttributes(object):
5893 """struct containing all the visual attributes of a control"""
5895 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5896 def __init__(self
, *args
, **kwargs
):
5898 __init__(self) -> VisualAttributes
5900 struct containing all the visual attributes of a control
5902 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
5903 self
.this
= newobj
.this
5906 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
5909 if self
.thisown
: destroy(self
)
5912 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
5913 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
5914 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
5916 class VisualAttributesPtr(VisualAttributes
):
5917 def __init__(self
, this
):
5919 if not hasattr(self
,"thisown"): self
.thisown
= 0
5920 self
.__class
__ = VisualAttributes
5921 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
5922 NullAcceleratorTable
= cvar
.NullAcceleratorTable
5923 PanelNameStr
= cvar
.PanelNameStr
5925 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
5926 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
5927 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
5928 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
5929 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
5930 class Window(EvtHandler
):
5932 wx.Window is the base class for all windows and represents any visible
5933 object on the screen. All controls, top level windows and so on are
5934 wx.Windows. Sizers and device contexts are not however, as they don't
5935 appear on screen themselves.
5939 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5940 def __init__(self
, *args
, **kwargs
):
5942 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5943 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5945 Construct and show a generic Window.
5947 newobj
= _core_
.new_Window(*args
, **kwargs
)
5948 self
.this
= newobj
.this
5951 self
._setOORInfo
(self
)
5953 def Create(*args
, **kwargs
):
5955 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5956 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5958 Create the GUI part of the Window for 2-phase creation mode.
5960 return _core_
.Window_Create(*args
, **kwargs
)
5962 def Close(*args
, **kwargs
):
5964 Close(self, bool force=False) -> bool
5966 This function simply generates a EVT_CLOSE event whose handler usually
5967 tries to close the window. It doesn't close the window itself,
5968 however. If force is False (the default) then the window's close
5969 handler will be allowed to veto the destruction of the window.
5971 return _core_
.Window_Close(*args
, **kwargs
)
5973 def Destroy(*args
, **kwargs
):
5975 Destroy(self) -> bool
5977 Destroys the window safely. Frames and dialogs are not destroyed
5978 immediately when this function is called -- they are added to a list
5979 of windows to be deleted on idle time, when all the window's events
5980 have been processed. This prevents problems with events being sent to
5981 non-existent windows.
5983 Returns True if the window has either been successfully deleted, or it
5984 has been added to the list of windows pending real deletion.
5986 return _core_
.Window_Destroy(*args
, **kwargs
)
5988 def DestroyChildren(*args
, **kwargs
):
5990 DestroyChildren(self) -> bool
5992 Destroys all children of a window. Called automatically by the
5995 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
5997 def IsBeingDeleted(*args
, **kwargs
):
5999 IsBeingDeleted(self) -> bool
6001 Is the window in the process of being deleted?
6003 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
6005 def SetTitle(*args
, **kwargs
):
6007 SetTitle(self, String title)
6009 Sets the window's title. Applicable only to frames and dialogs.
6011 return _core_
.Window_SetTitle(*args
, **kwargs
)
6013 def GetTitle(*args
, **kwargs
):
6015 GetTitle(self) -> String
6017 Gets the window's title. Applicable only to frames and dialogs.
6019 return _core_
.Window_GetTitle(*args
, **kwargs
)
6021 def SetLabel(*args
, **kwargs
):
6023 SetLabel(self, String label)
6025 Set the text which the window shows in its label if applicable.
6027 return _core_
.Window_SetLabel(*args
, **kwargs
)
6029 def GetLabel(*args
, **kwargs
):
6031 GetLabel(self) -> String
6033 Generic way of getting a label from any window, for identification
6034 purposes. The interpretation of this function differs from class to
6035 class. For frames and dialogs, the value returned is the title. For
6036 buttons or static text controls, it is the button text. This function
6037 can be useful for meta-programs such as testing tools or special-needs
6038 access programs)which need to identify windows by name.
6040 return _core_
.Window_GetLabel(*args
, **kwargs
)
6042 def SetName(*args
, **kwargs
):
6044 SetName(self, String name)
6046 Sets the window's name. The window name is used for ressource setting
6047 in X, it is not the same as the window title/label
6049 return _core_
.Window_SetName(*args
, **kwargs
)
6051 def GetName(*args
, **kwargs
):
6053 GetName(self) -> String
6055 Returns the windows name. This name is not guaranteed to be unique;
6056 it is up to the programmer to supply an appropriate name in the window
6057 constructor or via wx.Window.SetName.
6059 return _core_
.Window_GetName(*args
, **kwargs
)
6061 def SetWindowVariant(*args
, **kwargs
):
6063 SetWindowVariant(self, int variant)
6065 Sets the variant of the window/font size to use for this window, if
6066 the platform supports variants, for example, wxMac.
6068 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
6070 def GetWindowVariant(*args
, **kwargs
):
6071 """GetWindowVariant(self) -> int"""
6072 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
6074 def SetId(*args
, **kwargs
):
6076 SetId(self, int winid)
6078 Sets the identifier of the window. Each window has an integer
6079 identifier. If the application has not provided one, an identifier
6080 will be generated. Normally, the identifier should be provided on
6081 creation and should not be modified subsequently.
6083 return _core_
.Window_SetId(*args
, **kwargs
)
6085 def GetId(*args
, **kwargs
):
6089 Returns the identifier of the window. Each window has an integer
6090 identifier. If the application has not provided one (or the default Id
6091 -1 is used) then an unique identifier with a negative value will be
6094 return _core_
.Window_GetId(*args
, **kwargs
)
6096 def NewControlId(*args
, **kwargs
):
6098 NewControlId() -> int
6100 Generate a control id for the controls which were not given one.
6102 return _core_
.Window_NewControlId(*args
, **kwargs
)
6104 NewControlId
= staticmethod(NewControlId
)
6105 def NextControlId(*args
, **kwargs
):
6107 NextControlId(int winid) -> int
6109 Get the id of the control following the one with the given
6112 return _core_
.Window_NextControlId(*args
, **kwargs
)
6114 NextControlId
= staticmethod(NextControlId
)
6115 def PrevControlId(*args
, **kwargs
):
6117 PrevControlId(int winid) -> int
6119 Get the id of the control preceding the one with the given
6122 return _core_
.Window_PrevControlId(*args
, **kwargs
)
6124 PrevControlId
= staticmethod(PrevControlId
)
6125 def SetSize(*args
, **kwargs
):
6127 SetSize(self, Size size)
6129 Sets the size of the window in pixels.
6131 return _core_
.Window_SetSize(*args
, **kwargs
)
6133 def SetDimensions(*args
, **kwargs
):
6135 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6137 Sets the position and size of the window in pixels. The sizeFlags
6138 parameter indicates the interpretation of the other params if they are
6141 ======================== ======================================
6142 wx.SIZE_AUTO A -1 indicates that a class-specific
6143 default should be used.
6144 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6145 -1 values are supplied.
6146 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6147 interpreted as real dimensions, not
6149 ======================== ======================================
6152 return _core_
.Window_SetDimensions(*args
, **kwargs
)
6154 def SetRect(*args
, **kwargs
):
6156 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6158 Sets the position and size of the window in pixels using a wx.Rect.
6160 return _core_
.Window_SetRect(*args
, **kwargs
)
6162 def SetSizeWH(*args
, **kwargs
):
6164 SetSizeWH(self, int width, int height)
6166 Sets the size of the window in pixels.
6168 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
6170 def Move(*args
, **kwargs
):
6172 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6174 Moves the window to the given position.
6176 return _core_
.Window_Move(*args
, **kwargs
)
6179 def MoveXY(*args
, **kwargs
):
6181 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6183 Moves the window to the given position.
6185 return _core_
.Window_MoveXY(*args
, **kwargs
)
6187 def SetBestFittingSize(*args
, **kwargs
):
6189 SetBestFittingSize(self, Size size=DefaultSize)
6191 A 'Smart' SetSize that will fill in default size components with the
6192 window's *best size* values. Also set's the minsize for use with sizers.
6194 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
6196 def Raise(*args
, **kwargs
):
6200 Raises the window to the top of the window hierarchy if it is a
6201 managed window (dialog or frame).
6203 return _core_
.Window_Raise(*args
, **kwargs
)
6205 def Lower(*args
, **kwargs
):
6209 Lowers the window to the bottom of the window hierarchy if it is a
6210 managed window (dialog or frame).
6212 return _core_
.Window_Lower(*args
, **kwargs
)
6214 def SetClientSize(*args
, **kwargs
):
6216 SetClientSize(self, Size size)
6218 This sets the size of the window client area in pixels. Using this
6219 function to size a window tends to be more device-independent than
6220 wx.Window.SetSize, since the application need not worry about what
6221 dimensions the border or title bar have when trying to fit the window
6222 around panel items, for example.
6224 return _core_
.Window_SetClientSize(*args
, **kwargs
)
6226 def SetClientSizeWH(*args
, **kwargs
):
6228 SetClientSizeWH(self, int width, int height)
6230 This sets the size of the window client area in pixels. Using this
6231 function to size a window tends to be more device-independent than
6232 wx.Window.SetSize, since the application need not worry about what
6233 dimensions the border or title bar have when trying to fit the window
6234 around panel items, for example.
6236 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
6238 def SetClientRect(*args
, **kwargs
):
6240 SetClientRect(self, Rect rect)
6242 This sets the size of the window client area in pixels. Using this
6243 function to size a window tends to be more device-independent than
6244 wx.Window.SetSize, since the application need not worry about what
6245 dimensions the border or title bar have when trying to fit the window
6246 around panel items, for example.
6248 return _core_
.Window_SetClientRect(*args
, **kwargs
)
6250 def GetPosition(*args
, **kwargs
):
6252 GetPosition(self) -> Point
6254 Get the window's position.
6256 return _core_
.Window_GetPosition(*args
, **kwargs
)
6258 def GetPositionTuple(*args
, **kwargs
):
6260 GetPositionTuple() -> (x,y)
6262 Get the window's position.
6264 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
6266 def GetSize(*args
, **kwargs
):
6268 GetSize(self) -> Size
6270 Get the window size.
6272 return _core_
.Window_GetSize(*args
, **kwargs
)
6274 def GetSizeTuple(*args
, **kwargs
):
6276 GetSizeTuple() -> (width, height)
6278 Get the window size.
6280 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
6282 def GetRect(*args
, **kwargs
):
6284 GetRect(self) -> Rect
6286 Returns the size and position of the window as a wx.Rect object.
6288 return _core_
.Window_GetRect(*args
, **kwargs
)
6290 def GetClientSize(*args
, **kwargs
):
6292 GetClientSize(self) -> Size
6294 This gets the size of the window's 'client area' in pixels. The client
6295 area is the area which may be drawn on by the programmer, excluding
6296 title bar, border, scrollbars, etc.
6298 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6300 def GetClientSizeTuple(*args
, **kwargs
):
6302 GetClientSizeTuple() -> (width, height)
6304 This gets the size of the window's 'client area' in pixels. The client
6305 area is the area which may be drawn on by the programmer, excluding
6306 title bar, border, scrollbars, etc.
6308 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6310 def GetClientAreaOrigin(*args
, **kwargs
):
6312 GetClientAreaOrigin(self) -> Point
6314 Get the origin of the client area of the window relative to the
6315 window's top left corner (the client area may be shifted because of
6316 the borders, scrollbars, other decorations...)
6318 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6320 def GetClientRect(*args
, **kwargs
):
6322 GetClientRect(self) -> Rect
6324 Get the client area position and size as a `wx.Rect` object.
6326 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6328 def GetBestSize(*args
, **kwargs
):
6330 GetBestSize(self) -> Size
6332 This function returns the best acceptable minimal size for the
6333 window, if applicable. For example, for a static text control, it will
6334 be the minimal size such that the control label is not truncated. For
6335 windows containing subwindows (suzh aswx.Panel), the size returned by
6336 this function will be the same as the size the window would have had
6339 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6341 def GetBestSizeTuple(*args
, **kwargs
):
6343 GetBestSizeTuple() -> (width, height)
6345 This function returns the best acceptable minimal size for the
6346 window, if applicable. For example, for a static text control, it will
6347 be the minimal size such that the control label is not truncated. For
6348 windows containing subwindows (suzh aswx.Panel), the size returned by
6349 this function will be the same as the size the window would have had
6352 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6354 def InvalidateBestSize(*args
, **kwargs
):
6356 InvalidateBestSize(self)
6358 Reset the cached best size value so it will be recalculated the next
6361 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6363 def GetBestFittingSize(*args
, **kwargs
):
6365 GetBestFittingSize(self) -> Size
6367 This function will merge the window's best size into the window's
6368 minimum size, giving priority to the min size components, and returns
6372 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6374 def GetAdjustedBestSize(*args
, **kwargs
):
6376 GetAdjustedBestSize(self) -> Size
6378 This method is similar to GetBestSize, except in one
6379 thing. GetBestSize should return the minimum untruncated size of the
6380 window, while this method will return the largest of BestSize and any
6381 user specified minimum size. ie. it is the minimum size the window
6382 should currently be drawn at, not the minimal size it can possibly
6385 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6387 def Center(*args
, **kwargs
):
6389 Center(self, int direction=BOTH)
6391 Centers the window. The parameter specifies the direction for
6392 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6393 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6394 on the entire screen and not on its parent window. If it is a
6395 top-level window and has no parent then it will always be centered
6396 relative to the screen.
6398 return _core_
.Window_Center(*args
, **kwargs
)
6401 def CenterOnScreen(*args
, **kwargs
):
6403 CenterOnScreen(self, int dir=BOTH)
6405 Center on screen (only works for top level windows)
6407 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6409 CentreOnScreen
= CenterOnScreen
6410 def CenterOnParent(*args
, **kwargs
):
6412 CenterOnParent(self, int dir=BOTH)
6414 Center with respect to the the parent window
6416 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6418 CentreOnParent
= CenterOnParent
6419 def Fit(*args
, **kwargs
):
6423 Sizes the window so that it fits around its subwindows. This function
6424 won't do anything if there are no subwindows and will only really work
6425 correctly if sizers are used for the subwindows layout. Also, if the
6426 window has exactly one subwindow it is better (faster and the result
6427 is more precise as Fit adds some margin to account for fuzziness of
6428 its calculations) to call window.SetClientSize(child.GetSize())
6429 instead of calling Fit.
6431 return _core_
.Window_Fit(*args
, **kwargs
)
6433 def FitInside(*args
, **kwargs
):
6437 Similar to Fit, but sizes the interior (virtual) size of a
6438 window. Mainly useful with scrolled windows to reset scrollbars after
6439 sizing changes that do not trigger a size event, and/or scrolled
6440 windows without an interior sizer. This function similarly won't do
6441 anything if there are no subwindows.
6443 return _core_
.Window_FitInside(*args
, **kwargs
)
6445 def SetSizeHints(*args
, **kwargs
):
6447 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6450 Allows specification of minimum and maximum window sizes, and window
6451 size increments. If a pair of values is not set (or set to -1), the
6452 default values will be used. If this function is called, the user
6453 will not be able to size the window outside the given bounds (if it is
6454 a top-level window.) Sizers will also inspect the minimum window size
6455 and will use that value if set when calculating layout.
6457 The resizing increments are only significant under Motif or Xt.
6459 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
6461 def SetSizeHintsSz(*args
, **kwargs
):
6463 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6465 Allows specification of minimum and maximum window sizes, and window
6466 size increments. If a pair of values is not set (or set to -1), the
6467 default values will be used. If this function is called, the user
6468 will not be able to size the window outside the given bounds (if it is
6469 a top-level window.) Sizers will also inspect the minimum window size
6470 and will use that value if set when calculating layout.
6472 The resizing increments are only significant under Motif or Xt.
6474 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
6476 def SetVirtualSizeHints(*args
, **kwargs
):
6478 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6480 Allows specification of minimum and maximum virtual window sizes. If a
6481 pair of values is not set (or set to -1), the default values will be
6482 used. If this function is called, the user will not be able to size
6483 the virtual area of the window outside the given bounds.
6485 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
6487 def SetVirtualSizeHintsSz(*args
, **kwargs
):
6489 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6491 Allows specification of minimum and maximum virtual window sizes. If a
6492 pair of values is not set (or set to -1), the default values will be
6493 used. If this function is called, the user will not be able to size
6494 the virtual area of the window outside the given bounds.
6496 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
6498 def GetMaxSize(*args
, **kwargs
):
6499 """GetMaxSize(self) -> Size"""
6500 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
6502 def GetMinSize(*args
, **kwargs
):
6503 """GetMinSize(self) -> Size"""
6504 return _core_
.Window_GetMinSize(*args
, **kwargs
)
6506 def SetMinSize(*args
, **kwargs
):
6508 SetMinSize(self, Size minSize)
6510 A more convenient method than `SetSizeHints` for setting just the
6513 return _core_
.Window_SetMinSize(*args
, **kwargs
)
6515 def SetMaxSize(*args
, **kwargs
):
6517 SetMaxSize(self, Size maxSize)
6519 A more convenient method than `SetSizeHints` for setting just the
6522 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
6524 def GetMinWidth(*args
, **kwargs
):
6525 """GetMinWidth(self) -> int"""
6526 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
6528 def GetMinHeight(*args
, **kwargs
):
6529 """GetMinHeight(self) -> int"""
6530 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
6532 def GetMaxWidth(*args
, **kwargs
):
6533 """GetMaxWidth(self) -> int"""
6534 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
6536 def GetMaxHeight(*args
, **kwargs
):
6537 """GetMaxHeight(self) -> int"""
6538 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
6540 def SetVirtualSize(*args
, **kwargs
):
6542 SetVirtualSize(self, Size size)
6544 Set the the virtual size of a window in pixels. For most windows this
6545 is just the client area of the window, but for some like scrolled
6546 windows it is more or less independent of the screen window size.
6548 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
6550 def SetVirtualSizeWH(*args
, **kwargs
):
6552 SetVirtualSizeWH(self, int w, int h)
6554 Set the the virtual size of a window in pixels. For most windows this
6555 is just the client area of the window, but for some like scrolled
6556 windows it is more or less independent of the screen window size.
6558 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
6560 def GetVirtualSize(*args
, **kwargs
):
6562 GetVirtualSize(self) -> Size
6564 Get the the virtual size of the window in pixels. For most windows
6565 this is just the client area of the window, but for some like scrolled
6566 windows it is more or less independent of the screen window size.
6568 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
6570 def GetVirtualSizeTuple(*args
, **kwargs
):
6572 GetVirtualSizeTuple() -> (width, height)
6574 Get the the virtual size of the window in pixels. For most windows
6575 this is just the client area of the window, but for some like scrolled
6576 windows it is more or less independent of the screen window size.
6578 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
6580 def GetBestVirtualSize(*args
, **kwargs
):
6582 GetBestVirtualSize(self) -> Size
6584 Return the largest of ClientSize and BestSize (as determined by a
6585 sizer, interior children, or other means)
6587 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
6589 def Show(*args
, **kwargs
):
6591 Show(self, bool show=True) -> bool
6593 Shows or hides the window. You may need to call Raise for a top level
6594 window if you want to bring it to top, although this is not needed if
6595 Show is called immediately after the frame creation. Returns True if
6596 the window has been shown or hidden or False if nothing was done
6597 because it already was in the requested state.
6599 return _core_
.Window_Show(*args
, **kwargs
)
6601 def Hide(*args
, **kwargs
):
6605 Equivalent to calling Show(False).
6607 return _core_
.Window_Hide(*args
, **kwargs
)
6609 def Enable(*args
, **kwargs
):
6611 Enable(self, bool enable=True) -> bool
6613 Enable or disable the window for user input. Note that when a parent
6614 window is disabled, all of its children are disabled as well and they
6615 are reenabled again when the parent is. Returns true if the window
6616 has been enabled or disabled, false if nothing was done, i.e. if the
6617 window had already been in the specified state.
6619 return _core_
.Window_Enable(*args
, **kwargs
)
6621 def Disable(*args
, **kwargs
):
6623 Disable(self) -> bool
6625 Disables the window, same as Enable(false).
6627 return _core_
.Window_Disable(*args
, **kwargs
)
6629 def IsShown(*args
, **kwargs
):
6631 IsShown(self) -> bool
6633 Returns true if the window is shown, false if it has been hidden.
6635 return _core_
.Window_IsShown(*args
, **kwargs
)
6637 def IsEnabled(*args
, **kwargs
):
6639 IsEnabled(self) -> bool
6641 Returns true if the window is enabled for input, false otherwise.
6643 return _core_
.Window_IsEnabled(*args
, **kwargs
)
6645 def SetWindowStyleFlag(*args
, **kwargs
):
6647 SetWindowStyleFlag(self, long style)
6649 Sets the style of the window. Please note that some styles cannot be
6650 changed after the window creation and that Refresh() might need to be
6651 called after changing the others for the change to take place
6654 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
6656 def GetWindowStyleFlag(*args
, **kwargs
):
6658 GetWindowStyleFlag(self) -> long
6660 Gets the window style that was passed to the constructor or Create
6663 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
6665 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
6666 def HasFlag(*args
, **kwargs
):
6668 HasFlag(self, int flag) -> bool
6670 Test if the given style is set for this window.
6672 return _core_
.Window_HasFlag(*args
, **kwargs
)
6674 def IsRetained(*args
, **kwargs
):
6676 IsRetained(self) -> bool
6678 Returns true if the window is retained, false otherwise. Retained
6679 windows are only available on X platforms.
6681 return _core_
.Window_IsRetained(*args
, **kwargs
)
6683 def SetExtraStyle(*args
, **kwargs
):
6685 SetExtraStyle(self, long exStyle)
6687 Sets the extra style bits for the window. Extra styles are the less
6688 often used style bits which can't be set with the constructor or with
6689 SetWindowStyleFlag()
6691 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
6693 def GetExtraStyle(*args
, **kwargs
):
6695 GetExtraStyle(self) -> long
6697 Returns the extra style bits for the window.
6699 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
6701 def MakeModal(*args
, **kwargs
):
6703 MakeModal(self, bool modal=True)
6705 Disables all other windows in the application so that the user can
6706 only interact with this window. Passing False will reverse this
6709 return _core_
.Window_MakeModal(*args
, **kwargs
)
6711 def SetThemeEnabled(*args
, **kwargs
):
6713 SetThemeEnabled(self, bool enableTheme)
6715 This function tells a window if it should use the system's "theme"
6716 code to draw the windows' background instead if its own background
6717 drawing code. This will only have an effect on platforms that support
6718 the notion of themes in user defined windows. One such platform is
6719 GTK+ where windows can have (very colourful) backgrounds defined by a
6720 user's selected theme.
6722 Dialogs, notebook pages and the status bar have this flag set to true
6723 by default so that the default look and feel is simulated best.
6725 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
6727 def GetThemeEnabled(*args
, **kwargs
):
6729 GetThemeEnabled(self) -> bool
6731 Return the themeEnabled flag.
6733 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
6735 def SetFocus(*args
, **kwargs
):
6739 Set's the focus to this window, allowing it to receive keyboard input.
6741 return _core_
.Window_SetFocus(*args
, **kwargs
)
6743 def SetFocusFromKbd(*args
, **kwargs
):
6745 SetFocusFromKbd(self)
6747 Set focus to this window as the result of a keyboard action. Normally
6748 only called internally.
6750 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
6752 def FindFocus(*args
, **kwargs
):
6754 FindFocus() -> Window
6756 Returns the window or control that currently has the keyboard focus,
6759 return _core_
.Window_FindFocus(*args
, **kwargs
)
6761 FindFocus
= staticmethod(FindFocus
)
6762 def AcceptsFocus(*args
, **kwargs
):
6764 AcceptsFocus(self) -> bool
6766 Can this window have focus?
6768 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
6770 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6772 AcceptsFocusFromKeyboard(self) -> bool
6774 Can this window be given focus by keyboard navigation? if not, the
6775 only way to give it focus (provided it accepts it at all) is to click
6778 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6780 def GetDefaultItem(*args
, **kwargs
):
6782 GetDefaultItem(self) -> Window
6784 Get the default child of this parent, i.e. the one which is activated
6785 by pressing <Enter> such as the OK button on a wx.Dialog.
6787 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
6789 def SetDefaultItem(*args
, **kwargs
):
6791 SetDefaultItem(self, Window child) -> Window
6793 Set this child as default, return the old default.
6795 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
6797 def SetTmpDefaultItem(*args
, **kwargs
):
6799 SetTmpDefaultItem(self, Window win)
6801 Set this child as temporary default
6803 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6805 def Navigate(*args
, **kwargs
):
6807 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6809 Does keyboard navigation from this window to another, by sending a
6810 `wx.NavigationKeyEvent`.
6812 return _core_
.Window_Navigate(*args
, **kwargs
)
6814 def MoveAfterInTabOrder(*args
, **kwargs
):
6816 MoveAfterInTabOrder(self, Window win)
6818 Moves this window in the tab navigation order after the specified
6819 sibling window. This means that when the user presses the TAB key on
6820 that other window, the focus switches to this window.
6822 The default tab order is the same as creation order. This function
6823 and `MoveBeforeInTabOrder` allow to change it after creating all the
6827 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
6829 def MoveBeforeInTabOrder(*args
, **kwargs
):
6831 MoveBeforeInTabOrder(self, Window win)
6833 Same as `MoveAfterInTabOrder` except that it inserts this window just
6834 before win instead of putting it right after it.
6836 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
6838 def GetChildren(*args
, **kwargs
):
6840 GetChildren(self) -> PyObject
6842 Returns a list of the window's children. NOTE: Currently this is a
6843 copy of the child window list maintained by the window, so the return
6844 value of this function is only valid as long as the window's children
6847 return _core_
.Window_GetChildren(*args
, **kwargs
)
6849 def GetParent(*args
, **kwargs
):
6851 GetParent(self) -> Window
6853 Returns the parent window of this window, or None if there isn't one.
6855 return _core_
.Window_GetParent(*args
, **kwargs
)
6857 def GetGrandParent(*args
, **kwargs
):
6859 GetGrandParent(self) -> Window
6861 Returns the parent of the parent of this window, or None if there
6864 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
6866 def IsTopLevel(*args
, **kwargs
):
6868 IsTopLevel(self) -> bool
6870 Returns true if the given window is a top-level one. Currently all
6871 frames and dialogs are always considered to be top-level windows (even
6872 if they have a parent window).
6874 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
6876 def Reparent(*args
, **kwargs
):
6878 Reparent(self, Window newParent) -> bool
6880 Reparents the window, i.e the window will be removed from its current
6881 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6882 re-inserted into another. Available on Windows and GTK. Returns True
6883 if the parent was changed, False otherwise (error or newParent ==
6886 return _core_
.Window_Reparent(*args
, **kwargs
)
6888 def AddChild(*args
, **kwargs
):
6890 AddChild(self, Window child)
6892 Adds a child window. This is called automatically by window creation
6893 functions so should not be required by the application programmer.
6895 return _core_
.Window_AddChild(*args
, **kwargs
)
6897 def RemoveChild(*args
, **kwargs
):
6899 RemoveChild(self, Window child)
6901 Removes a child window. This is called automatically by window
6902 deletion functions so should not be required by the application
6905 return _core_
.Window_RemoveChild(*args
, **kwargs
)
6907 def FindWindowById(*args
, **kwargs
):
6909 FindWindowById(self, long winid) -> Window
6911 Find a chld of this window by window ID
6913 return _core_
.Window_FindWindowById(*args
, **kwargs
)
6915 def FindWindowByName(*args
, **kwargs
):
6917 FindWindowByName(self, String name) -> Window
6919 Find a child of this window by name
6921 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
6923 def GetEventHandler(*args
, **kwargs
):
6925 GetEventHandler(self) -> EvtHandler
6927 Returns the event handler for this window. By default, the window is
6928 its own event handler.
6930 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
6932 def SetEventHandler(*args
, **kwargs
):
6934 SetEventHandler(self, EvtHandler handler)
6936 Sets the event handler for this window. An event handler is an object
6937 that is capable of processing the events sent to a window. By default,
6938 the window is its own event handler, but an application may wish to
6939 substitute another, for example to allow central implementation of
6940 event-handling for a variety of different window classes.
6942 It is usually better to use `wx.Window.PushEventHandler` since this sets
6943 up a chain of event handlers, where an event not handled by one event
6944 handler is handed to the next one in the chain.
6946 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
6948 def PushEventHandler(*args
, **kwargs
):
6950 PushEventHandler(self, EvtHandler handler)
6952 Pushes this event handler onto the event handler stack for the window.
6953 An event handler is an object that is capable of processing the events
6954 sent to a window. By default, the window is its own event handler, but
6955 an application may wish to substitute another, for example to allow
6956 central implementation of event-handling for a variety of different
6959 wx.Window.PushEventHandler allows an application to set up a chain of
6960 event handlers, where an event not handled by one event handler is
6961 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6962 remove the event handler.
6964 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
6966 def PopEventHandler(*args
, **kwargs
):
6968 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6970 Removes and returns the top-most event handler on the event handler
6971 stack. If deleteHandler is True then the wx.EvtHandler object will be
6972 destroyed after it is popped.
6974 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
6976 def RemoveEventHandler(*args
, **kwargs
):
6978 RemoveEventHandler(self, EvtHandler handler) -> bool
6980 Find the given handler in the event handler chain and remove (but not
6981 delete) it from the event handler chain, return True if it was found
6982 and False otherwise (this also results in an assert failure so this
6983 function should only be called when the handler is supposed to be
6986 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
6988 def SetValidator(*args
, **kwargs
):
6990 SetValidator(self, Validator validator)
6992 Deletes the current validator (if any) and sets the window validator,
6993 having called wx.Validator.Clone to create a new validator of this
6996 return _core_
.Window_SetValidator(*args
, **kwargs
)
6998 def GetValidator(*args
, **kwargs
):
7000 GetValidator(self) -> Validator
7002 Returns a pointer to the current validator for the window, or None if
7005 return _core_
.Window_GetValidator(*args
, **kwargs
)
7007 def Validate(*args
, **kwargs
):
7009 Validate(self) -> bool
7011 Validates the current values of the child controls using their
7012 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7013 style flag set, the method will also call Validate() of all child
7014 windows. Returns false if any of the validations failed.
7016 return _core_
.Window_Validate(*args
, **kwargs
)
7018 def TransferDataToWindow(*args
, **kwargs
):
7020 TransferDataToWindow(self) -> bool
7022 Transfers values to child controls from data areas specified by their
7023 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7024 style flag set, the method will also call TransferDataToWindow() of
7027 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
7029 def TransferDataFromWindow(*args
, **kwargs
):
7031 TransferDataFromWindow(self) -> bool
7033 Transfers values from child controls to data areas specified by their
7034 validators. Returns false if a transfer failed. If the window has
7035 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7036 also call TransferDataFromWindow() of all child windows.
7038 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
7040 def InitDialog(*args
, **kwargs
):
7044 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7045 to the dialog via validators.
7047 return _core_
.Window_InitDialog(*args
, **kwargs
)
7049 def SetAcceleratorTable(*args
, **kwargs
):
7051 SetAcceleratorTable(self, AcceleratorTable accel)
7053 Sets the accelerator table for this window.
7055 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
7057 def GetAcceleratorTable(*args
, **kwargs
):
7059 GetAcceleratorTable(self) -> AcceleratorTable
7061 Gets the accelerator table for this window.
7063 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
7065 def RegisterHotKey(*args
, **kwargs
):
7067 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7069 Registers a system wide hotkey. Every time the user presses the hotkey
7070 registered here, this window will receive a hotkey event. It will
7071 receive the event even if the application is in the background and
7072 does not have the input focus because the user is working with some
7073 other application. To bind an event handler function to this hotkey
7074 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7075 hotkey was registered successfully.
7077 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
7079 def UnregisterHotKey(*args
, **kwargs
):
7081 UnregisterHotKey(self, int hotkeyId) -> bool
7083 Unregisters a system wide hotkey.
7085 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
7087 def ConvertDialogPointToPixels(*args
, **kwargs
):
7089 ConvertDialogPointToPixels(self, Point pt) -> Point
7091 Converts a point or size from dialog units to pixels. Dialog units
7092 are used for maintaining a dialog's proportions even if the font
7093 changes. For the x dimension, the dialog units are multiplied by the
7094 average character width and then divided by 4. For the y dimension,
7095 the dialog units are multiplied by the average character height and
7098 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
7100 def ConvertDialogSizeToPixels(*args
, **kwargs
):
7102 ConvertDialogSizeToPixels(self, Size sz) -> Size
7104 Converts a point or size from dialog units to pixels. Dialog units
7105 are used for maintaining a dialog's proportions even if the font
7106 changes. For the x dimension, the dialog units are multiplied by the
7107 average character width and then divided by 4. For the y dimension,
7108 the dialog units are multiplied by the average character height and
7111 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
7113 def DLG_PNT(*args
, **kwargs
):
7115 DLG_PNT(self, Point pt) -> Point
7117 Converts a point or size from dialog units to pixels. Dialog units
7118 are used for maintaining a dialog's proportions even if the font
7119 changes. For the x dimension, the dialog units are multiplied by the
7120 average character width and then divided by 4. For the y dimension,
7121 the dialog units are multiplied by the average character height and
7124 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
7126 def DLG_SZE(*args
, **kwargs
):
7128 DLG_SZE(self, Size sz) -> Size
7130 Converts a point or size from dialog units to pixels. Dialog units
7131 are used for maintaining a dialog's proportions even if the font
7132 changes. For the x dimension, the dialog units are multiplied by the
7133 average character width and then divided by 4. For the y dimension,
7134 the dialog units are multiplied by the average character height and
7137 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
7139 def ConvertPixelPointToDialog(*args
, **kwargs
):
7140 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7141 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
7143 def ConvertPixelSizeToDialog(*args
, **kwargs
):
7144 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7145 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
7147 def WarpPointer(*args
, **kwargs
):
7149 WarpPointer(self, int x, int y)
7151 Moves the pointer to the given position on the window.
7153 NOTE: This function is not supported under Mac because Apple Human
7154 Interface Guidelines forbid moving the mouse cursor programmatically.
7156 return _core_
.Window_WarpPointer(*args
, **kwargs
)
7158 def CaptureMouse(*args
, **kwargs
):
7162 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7163 release the capture.
7165 Note that wxWindows maintains the stack of windows having captured the
7166 mouse and when the mouse is released the capture returns to the window
7167 which had had captured it previously and it is only really released if
7168 there were no previous window. In particular, this means that you must
7169 release the mouse as many times as you capture it.
7171 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
7173 def ReleaseMouse(*args
, **kwargs
):
7177 Releases mouse input captured with wx.Window.CaptureMouse.
7179 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
7181 def GetCapture(*args
, **kwargs
):
7183 GetCapture() -> Window
7185 Returns the window which currently captures the mouse or None
7187 return _core_
.Window_GetCapture(*args
, **kwargs
)
7189 GetCapture
= staticmethod(GetCapture
)
7190 def HasCapture(*args
, **kwargs
):
7192 HasCapture(self) -> bool
7194 Returns true if this window has the current mouse capture.
7196 return _core_
.Window_HasCapture(*args
, **kwargs
)
7198 def Refresh(*args
, **kwargs
):
7200 Refresh(self, bool eraseBackground=True, Rect rect=None)
7202 Mark the specified rectangle (or the whole window) as "dirty" so it
7203 will be repainted. Causes an EVT_PAINT event to be generated and sent
7206 return _core_
.Window_Refresh(*args
, **kwargs
)
7208 def RefreshRect(*args
, **kwargs
):
7210 RefreshRect(self, Rect rect, bool eraseBackground=True)
7212 Redraws the contents of the given rectangle: the area inside it will
7213 be repainted. This is the same as Refresh but has a nicer syntax.
7215 return _core_
.Window_RefreshRect(*args
, **kwargs
)
7217 def Update(*args
, **kwargs
):
7221 Calling this method immediately repaints the invalidated area of the
7222 window instead of waiting for the EVT_PAINT event to happen, (normally
7223 this would usually only happen when the flow of control returns to the
7224 event loop.) Notice that this function doesn't refresh the window and
7225 does nothing if the window has been already repainted. Use Refresh
7226 first if you want to immediately redraw the window (or some portion of
7227 it) unconditionally.
7229 return _core_
.Window_Update(*args
, **kwargs
)
7231 def ClearBackground(*args
, **kwargs
):
7233 ClearBackground(self)
7235 Clears the window by filling it with the current background
7236 colour. Does not cause an erase background event to be generated.
7238 return _core_
.Window_ClearBackground(*args
, **kwargs
)
7240 def Freeze(*args
, **kwargs
):
7244 Freezes the window or, in other words, prevents any updates from
7245 taking place on screen, the window is not redrawn at all. Thaw must be
7246 called to reenable window redrawing. Calls to Freeze/Thaw may be
7247 nested, with the actual Thaw being delayed until all the nesting has
7250 This method is useful for visual appearance optimization (for example,
7251 it is a good idea to use it before inserting large amount of text into
7252 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7253 for all controls so it is mostly just a hint to wxWindows and not a
7254 mandatory directive.
7256 return _core_
.Window_Freeze(*args
, **kwargs
)
7258 def Thaw(*args
, **kwargs
):
7262 Reenables window updating after a previous call to Freeze. Calls to
7263 Freeze/Thaw may be nested, so Thaw must be called the same number of
7264 times that Freeze was before the window will be updated.
7266 return _core_
.Window_Thaw(*args
, **kwargs
)
7268 def PrepareDC(*args
, **kwargs
):
7270 PrepareDC(self, DC dc)
7272 Call this function to prepare the device context for drawing a
7273 scrolled image. It sets the device origin according to the current
7276 return _core_
.Window_PrepareDC(*args
, **kwargs
)
7278 def GetUpdateRegion(*args
, **kwargs
):
7280 GetUpdateRegion(self) -> Region
7282 Returns the region specifying which parts of the window have been
7283 damaged. Should only be called within an EVT_PAINT handler.
7285 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
7287 def GetUpdateClientRect(*args
, **kwargs
):
7289 GetUpdateClientRect(self) -> Rect
7291 Get the update rectangle region bounding box in client coords.
7293 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7295 def IsExposed(*args
, **kwargs
):
7297 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7299 Returns true if the given point or rectangle area has been exposed
7300 since the last repaint. Call this in an paint event handler to
7301 optimize redrawing by only redrawing those areas, which have been
7304 return _core_
.Window_IsExposed(*args
, **kwargs
)
7306 def IsExposedPoint(*args
, **kwargs
):
7308 IsExposedPoint(self, Point pt) -> bool
7310 Returns true if the given point or rectangle area has been exposed
7311 since the last repaint. Call this in an paint event handler to
7312 optimize redrawing by only redrawing those areas, which have been
7315 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7317 def IsExposedRect(*args
, **kwargs
):
7319 IsExposedRect(self, Rect rect) -> bool
7321 Returns true if the given point or rectangle area has been exposed
7322 since the last repaint. Call this in an paint event handler to
7323 optimize redrawing by only redrawing those areas, which have been
7326 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7328 def GetDefaultAttributes(*args
, **kwargs
):
7330 GetDefaultAttributes(self) -> VisualAttributes
7332 Get the default attributes for an instance of this class. This is
7333 useful if you want to use the same font or colour in your own control
7334 as in a standard control -- which is a much better idea than hard
7335 coding specific colours or fonts which might look completely out of
7336 place on the user's system, especially if it uses themes.
7338 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7340 def GetClassDefaultAttributes(*args
, **kwargs
):
7342 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7344 Get the default attributes for this class. This is useful if you want
7345 to use the same font or colour in your own control as in a standard
7346 control -- which is a much better idea than hard coding specific
7347 colours or fonts which might look completely out of place on the
7348 user's system, especially if it uses themes.
7350 The variant parameter is only relevant under Mac currently and is
7351 ignore under other platforms. Under Mac, it will change the size of
7352 the returned font. See `wx.Window.SetWindowVariant` for more about
7355 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7357 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7358 def SetBackgroundColour(*args
, **kwargs
):
7360 SetBackgroundColour(self, Colour colour) -> bool
7362 Sets the background colour of the window. Returns True if the colour
7363 was changed. The background colour is usually painted by the default
7364 EVT_ERASE_BACKGROUND event handler function under Windows and
7365 automatically under GTK. Using `wx.NullColour` will reset the window
7366 to the default background colour.
7368 Note that setting the background colour may not cause an immediate
7369 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7370 calling this function.
7372 Using this function will disable attempts to use themes for this
7373 window, if the system supports them. Use with care since usually the
7374 themes represent the appearance chosen by the user to be used for all
7375 applications on the system.
7377 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7379 def SetOwnBackgroundColour(*args
, **kwargs
):
7380 """SetOwnBackgroundColour(self, Colour colour)"""
7381 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7383 def SetForegroundColour(*args
, **kwargs
):
7385 SetForegroundColour(self, Colour colour) -> bool
7387 Sets the foreground colour of the window. Returns True is the colour
7388 was changed. The interpretation of foreground colour is dependent on
7389 the window class; it may be the text colour or other colour, or it may
7392 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7394 def SetOwnForegroundColour(*args
, **kwargs
):
7395 """SetOwnForegroundColour(self, Colour colour)"""
7396 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7398 def GetBackgroundColour(*args
, **kwargs
):
7400 GetBackgroundColour(self) -> Colour
7402 Returns the background colour of the window.
7404 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7406 def GetForegroundColour(*args
, **kwargs
):
7408 GetForegroundColour(self) -> Colour
7410 Returns the foreground colour of the window. The interpretation of
7411 foreground colour is dependent on the window class; it may be the text
7412 colour or other colour, or it may not be used at all.
7414 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7416 def InheritsBackgroundColour(*args
, **kwargs
):
7417 """InheritsBackgroundColour(self) -> bool"""
7418 return _core_
.Window_InheritsBackgroundColour(*args
, **kwargs
)
7420 def UseBgCol(*args
, **kwargs
):
7421 """UseBgCol(self) -> bool"""
7422 return _core_
.Window_UseBgCol(*args
, **kwargs
)
7424 def SetBackgroundStyle(*args
, **kwargs
):
7426 SetBackgroundStyle(self, int style) -> bool
7428 Returns the background style of the window. The background style
7429 indicates how the background of the window is drawn.
7431 ====================== ========================================
7432 wx.BG_STYLE_SYSTEM The background colour or pattern should
7433 be determined by the system
7434 wx.BG_STYLE_COLOUR The background should be a solid colour
7435 wx.BG_STYLE_CUSTOM The background will be implemented by the
7437 ====================== ========================================
7439 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7440 a custom background, such as a tiled bitmap. Currently the style has
7441 no effect on other platforms.
7443 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7445 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
7447 def GetBackgroundStyle(*args
, **kwargs
):
7449 GetBackgroundStyle(self) -> int
7451 Returns the background style of the window.
7453 :see: `SetBackgroundStyle`
7455 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
7457 def HasTransparentBackground(*args
, **kwargs
):
7459 HasTransparentBackground(self) -> bool
7461 Returns True if this window's background is transparent (as, for
7462 example, for `wx.StaticText`) and should show the parent window's
7465 This method is mostly used internally by the library itself and you
7466 normally shouldn't have to call it. You may, however, have to override
7467 it in your custom control classes to ensure that background is painted
7470 return _core_
.Window_HasTransparentBackground(*args
, **kwargs
)
7472 def SetCursor(*args
, **kwargs
):
7474 SetCursor(self, Cursor cursor) -> bool
7476 Sets the window's cursor. Notice that the window cursor also sets it
7477 for the children of the window implicitly.
7479 The cursor may be wx.NullCursor in which case the window cursor will
7480 be reset back to default.
7482 return _core_
.Window_SetCursor(*args
, **kwargs
)
7484 def GetCursor(*args
, **kwargs
):
7486 GetCursor(self) -> Cursor
7488 Return the cursor associated with this window.
7490 return _core_
.Window_GetCursor(*args
, **kwargs
)
7492 def SetFont(*args
, **kwargs
):
7494 SetFont(self, Font font) -> bool
7496 Sets the font for this window.
7498 return _core_
.Window_SetFont(*args
, **kwargs
)
7500 def SetOwnFont(*args
, **kwargs
):
7501 """SetOwnFont(self, Font font)"""
7502 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
7504 def GetFont(*args
, **kwargs
):
7506 GetFont(self) -> Font
7508 Returns the default font used for this window.
7510 return _core_
.Window_GetFont(*args
, **kwargs
)
7512 def SetCaret(*args
, **kwargs
):
7514 SetCaret(self, Caret caret)
7516 Sets the caret associated with the window.
7518 return _core_
.Window_SetCaret(*args
, **kwargs
)
7520 def GetCaret(*args
, **kwargs
):
7522 GetCaret(self) -> Caret
7524 Returns the caret associated with the window.
7526 return _core_
.Window_GetCaret(*args
, **kwargs
)
7528 def GetCharHeight(*args
, **kwargs
):
7530 GetCharHeight(self) -> int
7532 Get the (average) character size for the current font.
7534 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
7536 def GetCharWidth(*args
, **kwargs
):
7538 GetCharWidth(self) -> int
7540 Get the (average) character size for the current font.
7542 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
7544 def GetTextExtent(*args
, **kwargs
):
7546 GetTextExtent(String string) -> (width, height)
7548 Get the width and height of the text using the current font.
7550 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
7552 def GetFullTextExtent(*args
, **kwargs
):
7554 GetFullTextExtent(String string, Font font=None) ->
7555 (width, height, descent, externalLeading)
7557 Get the width, height, decent and leading of the text using the
7558 current or specified font.
7560 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
7562 def ClientToScreenXY(*args
, **kwargs
):
7564 ClientToScreenXY(int x, int y) -> (x,y)
7566 Converts to screen coordinates from coordinates relative to this window.
7568 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
7570 def ScreenToClientXY(*args
, **kwargs
):
7572 ScreenToClientXY(int x, int y) -> (x,y)
7574 Converts from screen to client window coordinates.
7576 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
7578 def ClientToScreen(*args
, **kwargs
):
7580 ClientToScreen(self, Point pt) -> Point
7582 Converts to screen coordinates from coordinates relative to this window.
7584 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
7586 def ScreenToClient(*args
, **kwargs
):
7588 ScreenToClient(self, Point pt) -> Point
7590 Converts from screen to client window coordinates.
7592 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
7594 def HitTestXY(*args
, **kwargs
):
7596 HitTestXY(self, int x, int y) -> int
7598 Test where the given (in client coords) point lies
7600 return _core_
.Window_HitTestXY(*args
, **kwargs
)
7602 def HitTest(*args
, **kwargs
):
7604 HitTest(self, Point pt) -> int
7606 Test where the given (in client coords) point lies
7608 return _core_
.Window_HitTest(*args
, **kwargs
)
7610 def GetBorder(*args
):
7612 GetBorder(self, long flags) -> int
7613 GetBorder(self) -> int
7615 Get border for the flags of this window
7617 return _core_
.Window_GetBorder(*args
)
7619 def UpdateWindowUI(*args
, **kwargs
):
7621 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7623 This function sends EVT_UPDATE_UI events to the window. The particular
7624 implementation depends on the window; for example a wx.ToolBar will
7625 send an update UI event for each toolbar button, and a wx.Frame will
7626 send an update UI event for each menubar menu item. You can call this
7627 function from your application to ensure that your UI is up-to-date at
7628 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7629 concerned). This may be necessary if you have called
7630 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7631 limit the overhead that wxWindows incurs by sending update UI events
7634 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
7636 def PopupMenuXY(*args
, **kwargs
):
7638 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7640 Pops up the given menu at the specified coordinates, relative to this window,
7641 and returns control when the user has dismissed the menu. If a menu item is
7642 selected, the corresponding menu event is generated and will be processed as
7643 usual. If the default position is given then the current position of the
7644 mouse cursor will be used.
7646 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
7648 def PopupMenu(*args
, **kwargs
):
7650 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7652 Pops up the given menu at the specified coordinates, relative to this window,
7653 and returns control when the user has dismissed the menu. If a menu item is
7654 selected, the corresponding menu event is generated and will be processed as
7655 usual. If the default position is given then the current position of the
7656 mouse cursor will be used.
7658 return _core_
.Window_PopupMenu(*args
, **kwargs
)
7660 def GetHandle(*args
, **kwargs
):
7662 GetHandle(self) -> long
7664 Returns the platform-specific handle (as a long integer) of the
7665 physical window. Currently on wxMac it returns the handle of the
7666 toplevel parent of the window.
7668 return _core_
.Window_GetHandle(*args
, **kwargs
)
7670 def AssociateHandle(*args
, **kwargs
):
7672 AssociateHandle(self, long handle)
7674 Associate the window with a new native handle
7676 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
7678 def DissociateHandle(*args
, **kwargs
):
7680 DissociateHandle(self)
7682 Dissociate the current native handle from the window
7684 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
7686 def HasScrollbar(*args
, **kwargs
):
7688 HasScrollbar(self, int orient) -> bool
7690 Does the window have the scrollbar for this orientation?
7692 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
7694 def SetScrollbar(*args
, **kwargs
):
7696 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7699 Sets the scrollbar properties of a built-in scrollbar.
7701 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
7703 def SetScrollPos(*args
, **kwargs
):
7705 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7707 Sets the position of one of the built-in scrollbars.
7709 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
7711 def GetScrollPos(*args
, **kwargs
):
7713 GetScrollPos(self, int orientation) -> int
7715 Returns the built-in scrollbar position.
7717 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
7719 def GetScrollThumb(*args
, **kwargs
):
7721 GetScrollThumb(self, int orientation) -> int
7723 Returns the built-in scrollbar thumb size.
7725 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
7727 def GetScrollRange(*args
, **kwargs
):
7729 GetScrollRange(self, int orientation) -> int
7731 Returns the built-in scrollbar range.
7733 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
7735 def ScrollWindow(*args
, **kwargs
):
7737 ScrollWindow(self, int dx, int dy, Rect rect=None)
7739 Physically scrolls the pixels in the window and move child windows
7740 accordingly. Use this function to optimise your scrolling
7741 implementations, to minimise the area that must be redrawn. Note that
7742 it is rarely required to call this function from a user program.
7744 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
7746 def ScrollLines(*args
, **kwargs
):
7748 ScrollLines(self, int lines) -> bool
7750 If the platform and window class supports it, scrolls the window by
7751 the given number of lines down, if lines is positive, or up if lines
7752 is negative. Returns True if the window was scrolled, False if it was
7753 already on top/bottom and nothing was done.
7755 return _core_
.Window_ScrollLines(*args
, **kwargs
)
7757 def ScrollPages(*args
, **kwargs
):
7759 ScrollPages(self, int pages) -> bool
7761 If the platform and window class supports it, scrolls the window by
7762 the given number of pages down, if pages is positive, or up if pages
7763 is negative. Returns True if the window was scrolled, False if it was
7764 already on top/bottom and nothing was done.
7766 return _core_
.Window_ScrollPages(*args
, **kwargs
)
7768 def LineUp(*args
, **kwargs
):
7770 LineUp(self) -> bool
7772 This is just a wrapper for ScrollLines(-1).
7774 return _core_
.Window_LineUp(*args
, **kwargs
)
7776 def LineDown(*args
, **kwargs
):
7778 LineDown(self) -> bool
7780 This is just a wrapper for ScrollLines(1).
7782 return _core_
.Window_LineDown(*args
, **kwargs
)
7784 def PageUp(*args
, **kwargs
):
7786 PageUp(self) -> bool
7788 This is just a wrapper for ScrollPages(-1).
7790 return _core_
.Window_PageUp(*args
, **kwargs
)
7792 def PageDown(*args
, **kwargs
):
7794 PageDown(self) -> bool
7796 This is just a wrapper for ScrollPages(1).
7798 return _core_
.Window_PageDown(*args
, **kwargs
)
7800 def SetHelpText(*args
, **kwargs
):
7802 SetHelpText(self, String text)
7804 Sets the help text to be used as context-sensitive help for this
7805 window. Note that the text is actually stored by the current
7806 wxHelpProvider implementation, and not in the window object itself.
7808 return _core_
.Window_SetHelpText(*args
, **kwargs
)
7810 def SetHelpTextForId(*args
, **kwargs
):
7812 SetHelpTextForId(self, String text)
7814 Associate this help text with all windows with the same id as this
7817 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
7819 def GetHelpText(*args
, **kwargs
):
7821 GetHelpText(self) -> String
7823 Gets the help text to be used as context-sensitive help for this
7824 window. Note that the text is actually stored by the current
7825 wxHelpProvider implementation, and not in the window object itself.
7827 return _core_
.Window_GetHelpText(*args
, **kwargs
)
7829 def SetToolTipString(*args
, **kwargs
):
7831 SetToolTipString(self, String tip)
7833 Attach a tooltip to the window.
7835 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
7837 def SetToolTip(*args
, **kwargs
):
7839 SetToolTip(self, ToolTip tip)
7841 Attach a tooltip to the window.
7843 return _core_
.Window_SetToolTip(*args
, **kwargs
)
7845 def GetToolTip(*args
, **kwargs
):
7847 GetToolTip(self) -> ToolTip
7849 get the associated tooltip or None if none
7851 return _core_
.Window_GetToolTip(*args
, **kwargs
)
7853 def SetDropTarget(*args
, **kwargs
):
7855 SetDropTarget(self, DropTarget dropTarget)
7857 Associates a drop target with this window. If the window already has
7858 a drop target, it is deleted.
7860 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
7862 def GetDropTarget(*args
, **kwargs
):
7864 GetDropTarget(self) -> DropTarget
7866 Returns the associated drop target, which may be None.
7868 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
7870 def SetConstraints(*args
, **kwargs
):
7872 SetConstraints(self, LayoutConstraints constraints)
7874 Sets the window to have the given layout constraints. If an existing
7875 layout constraints object is already owned by the window, it will be
7876 deleted. Pass None to disassociate and delete the window's current
7879 You must call SetAutoLayout to tell a window to use the constraints
7880 automatically in its default EVT_SIZE handler; otherwise, you must
7881 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7882 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7885 return _core_
.Window_SetConstraints(*args
, **kwargs
)
7887 def GetConstraints(*args
, **kwargs
):
7889 GetConstraints(self) -> LayoutConstraints
7891 Returns a pointer to the window's layout constraints, or None if there
7894 return _core_
.Window_GetConstraints(*args
, **kwargs
)
7896 def SetAutoLayout(*args
, **kwargs
):
7898 SetAutoLayout(self, bool autoLayout)
7900 Determines whether the Layout function will be called automatically
7901 when the window is resized. It is called implicitly by SetSizer but
7902 if you use SetConstraints you should call it manually or otherwise the
7903 window layout won't be correctly updated when its size changes.
7905 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
7907 def GetAutoLayout(*args
, **kwargs
):
7909 GetAutoLayout(self) -> bool
7911 Returns the current autoLayout setting
7913 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
7915 def Layout(*args
, **kwargs
):
7917 Layout(self) -> bool
7919 Invokes the constraint-based layout algorithm or the sizer-based
7920 algorithm for this window. See SetAutoLayout: when auto layout is on,
7921 this function gets called automatically by the default EVT_SIZE
7922 handler when the window is resized.
7924 return _core_
.Window_Layout(*args
, **kwargs
)
7926 def SetSizer(*args
, **kwargs
):
7928 SetSizer(self, Sizer sizer, bool deleteOld=True)
7930 Sets the window to have the given layout sizer. The window will then
7931 own the object, and will take care of its deletion. If an existing
7932 layout sizer object is already owned by the window, it will be deleted
7933 if the deleteOld parameter is true. Note that this function will also
7934 call SetAutoLayout implicitly with a True parameter if the sizer is
7935 non-None, and False otherwise.
7937 return _core_
.Window_SetSizer(*args
, **kwargs
)
7939 def SetSizerAndFit(*args
, **kwargs
):
7941 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7943 The same as SetSizer, except it also sets the size hints for the
7944 window based on the sizer's minimum size.
7946 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
7948 def GetSizer(*args
, **kwargs
):
7950 GetSizer(self) -> Sizer
7952 Return the sizer associated with the window by a previous call to
7953 SetSizer or None if there isn't one.
7955 return _core_
.Window_GetSizer(*args
, **kwargs
)
7957 def SetContainingSizer(*args
, **kwargs
):
7959 SetContainingSizer(self, Sizer sizer)
7961 This normally does not need to be called by application code. It is
7962 called internally when a window is added to a sizer, and is used so
7963 the window can remove itself from the sizer when it is destroyed.
7965 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
7967 def GetContainingSizer(*args
, **kwargs
):
7969 GetContainingSizer(self) -> Sizer
7971 Return the sizer that this window is a member of, if any, otherwise None.
7973 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
7975 def InheritAttributes(*args
, **kwargs
):
7977 InheritAttributes(self)
7979 This function is (or should be, in case of custom controls) called
7980 during window creation to intelligently set up the window visual
7981 attributes, that is the font and the foreground and background
7984 By 'intelligently' the following is meant: by default, all windows use
7985 their own default attributes. However if some of the parent's
7986 attributes are explicitly changed (that is, using SetFont and not
7987 SetOwnFont) and if the corresponding attribute hadn't been
7988 explicitly set for this window itself, then this window takes the same
7989 value as used by the parent. In addition, if the window overrides
7990 ShouldInheritColours to return false, the colours will not be changed
7991 no matter what and only the font might.
7993 This rather complicated logic is necessary in order to accommodate the
7994 different usage scenarios. The most common one is when all default
7995 attributes are used and in this case, nothing should be inherited as
7996 in modern GUIs different controls use different fonts (and colours)
7997 than their siblings so they can't inherit the same value from the
7998 parent. However it was also deemed desirable to allow to simply change
7999 the attributes of all children at once by just changing the font or
8000 colour of their common parent, hence in this case we do inherit the
8004 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
8006 def ShouldInheritColours(*args
, **kwargs
):
8008 ShouldInheritColours(self) -> bool
8010 Return true from here to allow the colours of this window to be
8011 changed by InheritAttributes, returning false forbids inheriting them
8012 from the parent window.
8014 The base class version returns false, but this method is overridden in
8015 wxControl where it returns true.
8017 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
8019 def PostCreate(self
, pre
):
8021 Phase 3 of the 2-phase create <wink!>
8022 Call this method after precreating the window with the 2-phase create method.
8024 self
.this
= pre
.this
8025 self
.thisown
= pre
.thisown
8027 if hasattr(self
, '_setOORInfo'):
8028 self
._setOORInfo
(self
)
8029 if hasattr(self
, '_setCallbackInfo'):
8030 self
._setCallbackInfo
(self
, self
.__class
__)
8033 class WindowPtr(Window
):
8034 def __init__(self
, this
):
8036 if not hasattr(self
,"thisown"): self
.thisown
= 0
8037 self
.__class
__ = Window
8038 _core_
.Window_swigregister(WindowPtr
)
8040 def PreWindow(*args
, **kwargs
):
8042 PreWindow() -> Window
8044 Precreate a Window for 2-phase creation.
8046 val
= _core_
.new_PreWindow(*args
, **kwargs
)
8050 def Window_NewControlId(*args
, **kwargs
):
8052 Window_NewControlId() -> int
8054 Generate a control id for the controls which were not given one.
8056 return _core_
.Window_NewControlId(*args
, **kwargs
)
8058 def Window_NextControlId(*args
, **kwargs
):
8060 Window_NextControlId(int winid) -> int
8062 Get the id of the control following the one with the given
8065 return _core_
.Window_NextControlId(*args
, **kwargs
)
8067 def Window_PrevControlId(*args
, **kwargs
):
8069 Window_PrevControlId(int winid) -> int
8071 Get the id of the control preceding the one with the given
8074 return _core_
.Window_PrevControlId(*args
, **kwargs
)
8076 def Window_FindFocus(*args
, **kwargs
):
8078 Window_FindFocus() -> Window
8080 Returns the window or control that currently has the keyboard focus,
8083 return _core_
.Window_FindFocus(*args
, **kwargs
)
8085 def Window_GetCapture(*args
, **kwargs
):
8087 Window_GetCapture() -> Window
8089 Returns the window which currently captures the mouse or None
8091 return _core_
.Window_GetCapture(*args
, **kwargs
)
8093 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
8095 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8097 Get the default attributes for this class. This is useful if you want
8098 to use the same font or colour in your own control as in a standard
8099 control -- which is a much better idea than hard coding specific
8100 colours or fonts which might look completely out of place on the
8101 user's system, especially if it uses themes.
8103 The variant parameter is only relevant under Mac currently and is
8104 ignore under other platforms. Under Mac, it will change the size of
8105 the returned font. See `wx.Window.SetWindowVariant` for more about
8108 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
8110 def DLG_PNT(win
, point_or_x
, y
=None):
8112 Convenience function for converting a Point or (x,y) in
8113 dialog units to pixel units.
8116 return win
.ConvertDialogPointToPixels(point_or_x
)
8118 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
8120 def DLG_SZE(win
, size_width
, height
=None):
8122 Convenience function for converting a Size or (w,h) in
8123 dialog units to pixel units.
8126 return win
.ConvertDialogSizeToPixels(size_width
)
8128 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
8131 def FindWindowById(*args
, **kwargs
):
8133 FindWindowById(long id, Window parent=None) -> Window
8135 Find the first window in the application with the given id. If parent
8136 is None, the search will start from all top-level frames and dialog
8137 boxes; if non-None, the search will be limited to the given window
8138 hierarchy. The search is recursive in both cases.
8140 return _core_
.FindWindowById(*args
, **kwargs
)
8142 def FindWindowByName(*args
, **kwargs
):
8144 FindWindowByName(String name, Window parent=None) -> Window
8146 Find a window by its name (as given in a window constructor or Create
8147 function call). If parent is None, the search will start from all
8148 top-level frames and dialog boxes; if non-None, the search will be
8149 limited to the given window hierarchy. The search is recursive in both
8152 If no window with such name is found, wx.FindWindowByLabel is called.
8154 return _core_
.FindWindowByName(*args
, **kwargs
)
8156 def FindWindowByLabel(*args
, **kwargs
):
8158 FindWindowByLabel(String label, Window parent=None) -> Window
8160 Find a window by its label. Depending on the type of window, the label
8161 may be a window title or panel item label. If parent is None, the
8162 search will start from all top-level frames and dialog boxes; if
8163 non-None, the search will be limited to the given window
8164 hierarchy. The search is recursive in both cases.
8166 return _core_
.FindWindowByLabel(*args
, **kwargs
)
8168 def Window_FromHWND(*args
, **kwargs
):
8169 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8170 return _core_
.Window_FromHWND(*args
, **kwargs
)
8171 #---------------------------------------------------------------------------
8173 class Validator(EvtHandler
):
8174 """Proxy of C++ Validator class"""
8176 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8177 def __init__(self
, *args
, **kwargs
):
8178 """__init__(self) -> Validator"""
8179 newobj
= _core_
.new_Validator(*args
, **kwargs
)
8180 self
.this
= newobj
.this
8183 self
._setOORInfo
(self
)
8185 def Clone(*args
, **kwargs
):
8186 """Clone(self) -> Validator"""
8187 return _core_
.Validator_Clone(*args
, **kwargs
)
8189 def Validate(*args
, **kwargs
):
8190 """Validate(self, Window parent) -> bool"""
8191 return _core_
.Validator_Validate(*args
, **kwargs
)
8193 def TransferToWindow(*args
, **kwargs
):
8194 """TransferToWindow(self) -> bool"""
8195 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
8197 def TransferFromWindow(*args
, **kwargs
):
8198 """TransferFromWindow(self) -> bool"""
8199 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
8201 def GetWindow(*args
, **kwargs
):
8202 """GetWindow(self) -> Window"""
8203 return _core_
.Validator_GetWindow(*args
, **kwargs
)
8205 def SetWindow(*args
, **kwargs
):
8206 """SetWindow(self, Window window)"""
8207 return _core_
.Validator_SetWindow(*args
, **kwargs
)
8209 def IsSilent(*args
, **kwargs
):
8210 """IsSilent() -> bool"""
8211 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8213 IsSilent
= staticmethod(IsSilent
)
8214 def SetBellOnError(*args
, **kwargs
):
8215 """SetBellOnError(int doIt=True)"""
8216 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8218 SetBellOnError
= staticmethod(SetBellOnError
)
8220 class ValidatorPtr(Validator
):
8221 def __init__(self
, this
):
8223 if not hasattr(self
,"thisown"): self
.thisown
= 0
8224 self
.__class
__ = Validator
8225 _core_
.Validator_swigregister(ValidatorPtr
)
8227 def Validator_IsSilent(*args
, **kwargs
):
8228 """Validator_IsSilent() -> bool"""
8229 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8231 def Validator_SetBellOnError(*args
, **kwargs
):
8232 """Validator_SetBellOnError(int doIt=True)"""
8233 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8235 class PyValidator(Validator
):
8236 """Proxy of C++ PyValidator class"""
8238 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8239 def __init__(self
, *args
, **kwargs
):
8240 """__init__(self) -> PyValidator"""
8241 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
8242 self
.this
= newobj
.this
8246 self
._setCallbackInfo
(self
, PyValidator
, 1)
8247 self
._setOORInfo
(self
)
8249 def _setCallbackInfo(*args
, **kwargs
):
8250 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8251 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
8254 class PyValidatorPtr(PyValidator
):
8255 def __init__(self
, this
):
8257 if not hasattr(self
,"thisown"): self
.thisown
= 0
8258 self
.__class
__ = PyValidator
8259 _core_
.PyValidator_swigregister(PyValidatorPtr
)
8261 #---------------------------------------------------------------------------
8263 class Menu(EvtHandler
):
8264 """Proxy of C++ Menu class"""
8266 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8267 def __init__(self
, *args
, **kwargs
):
8268 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8269 newobj
= _core_
.new_Menu(*args
, **kwargs
)
8270 self
.this
= newobj
.this
8273 self
._setOORInfo
(self
)
8275 def Append(*args
, **kwargs
):
8276 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8277 return _core_
.Menu_Append(*args
, **kwargs
)
8279 def AppendSeparator(*args
, **kwargs
):
8280 """AppendSeparator(self) -> MenuItem"""
8281 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
8283 def AppendCheckItem(*args
, **kwargs
):
8284 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8285 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
8287 def AppendRadioItem(*args
, **kwargs
):
8288 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8289 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
8291 def AppendMenu(*args
, **kwargs
):
8292 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8293 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
8295 def AppendItem(*args
, **kwargs
):
8296 """AppendItem(self, MenuItem item) -> MenuItem"""
8297 return _core_
.Menu_AppendItem(*args
, **kwargs
)
8299 def Break(*args
, **kwargs
):
8301 return _core_
.Menu_Break(*args
, **kwargs
)
8303 def InsertItem(*args
, **kwargs
):
8304 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8305 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8307 def Insert(*args
, **kwargs
):
8309 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8310 int kind=ITEM_NORMAL) -> MenuItem
8312 return _core_
.Menu_Insert(*args
, **kwargs
)
8314 def InsertSeparator(*args
, **kwargs
):
8315 """InsertSeparator(self, size_t pos) -> MenuItem"""
8316 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8318 def InsertCheckItem(*args
, **kwargs
):
8319 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8320 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8322 def InsertRadioItem(*args
, **kwargs
):
8323 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8324 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8326 def InsertMenu(*args
, **kwargs
):
8327 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8328 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8330 def PrependItem(*args
, **kwargs
):
8331 """PrependItem(self, MenuItem item) -> MenuItem"""
8332 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8334 def Prepend(*args
, **kwargs
):
8335 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8336 return _core_
.Menu_Prepend(*args
, **kwargs
)
8338 def PrependSeparator(*args
, **kwargs
):
8339 """PrependSeparator(self) -> MenuItem"""
8340 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8342 def PrependCheckItem(*args
, **kwargs
):
8343 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8344 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8346 def PrependRadioItem(*args
, **kwargs
):
8347 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8348 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8350 def PrependMenu(*args
, **kwargs
):
8351 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8352 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8354 def Remove(*args
, **kwargs
):
8355 """Remove(self, int id) -> MenuItem"""
8356 return _core_
.Menu_Remove(*args
, **kwargs
)
8358 def RemoveItem(*args
, **kwargs
):
8359 """RemoveItem(self, MenuItem item) -> MenuItem"""
8360 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8362 def Delete(*args
, **kwargs
):
8363 """Delete(self, int id) -> bool"""
8364 return _core_
.Menu_Delete(*args
, **kwargs
)
8366 def DeleteItem(*args
, **kwargs
):
8367 """DeleteItem(self, MenuItem item) -> bool"""
8368 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8370 def Destroy(*args
, **kwargs
):
8374 Deletes the C++ object this Python object is a proxy for.
8376 return _core_
.Menu_Destroy(*args
, **kwargs
)
8378 def DestroyId(*args
, **kwargs
):
8380 DestroyId(self, int id) -> bool
8382 Deletes the C++ object this Python object is a proxy for.
8384 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8386 def DestroyItem(*args
, **kwargs
):
8388 DestroyItem(self, MenuItem item) -> bool
8390 Deletes the C++ object this Python object is a proxy for.
8392 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8394 def GetMenuItemCount(*args
, **kwargs
):
8395 """GetMenuItemCount(self) -> size_t"""
8396 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8398 def GetMenuItems(*args
, **kwargs
):
8399 """GetMenuItems(self) -> PyObject"""
8400 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8402 def FindItem(*args
, **kwargs
):
8403 """FindItem(self, String item) -> int"""
8404 return _core_
.Menu_FindItem(*args
, **kwargs
)
8406 def FindItemById(*args
, **kwargs
):
8407 """FindItemById(self, int id) -> MenuItem"""
8408 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8410 def FindItemByPosition(*args
, **kwargs
):
8411 """FindItemByPosition(self, size_t position) -> MenuItem"""
8412 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
8414 def Enable(*args
, **kwargs
):
8415 """Enable(self, int id, bool enable)"""
8416 return _core_
.Menu_Enable(*args
, **kwargs
)
8418 def IsEnabled(*args
, **kwargs
):
8419 """IsEnabled(self, int id) -> bool"""
8420 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
8422 def Check(*args
, **kwargs
):
8423 """Check(self, int id, bool check)"""
8424 return _core_
.Menu_Check(*args
, **kwargs
)
8426 def IsChecked(*args
, **kwargs
):
8427 """IsChecked(self, int id) -> bool"""
8428 return _core_
.Menu_IsChecked(*args
, **kwargs
)
8430 def SetLabel(*args
, **kwargs
):
8431 """SetLabel(self, int id, String label)"""
8432 return _core_
.Menu_SetLabel(*args
, **kwargs
)
8434 def GetLabel(*args
, **kwargs
):
8435 """GetLabel(self, int id) -> String"""
8436 return _core_
.Menu_GetLabel(*args
, **kwargs
)
8438 def SetHelpString(*args
, **kwargs
):
8439 """SetHelpString(self, int id, String helpString)"""
8440 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
8442 def GetHelpString(*args
, **kwargs
):
8443 """GetHelpString(self, int id) -> String"""
8444 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
8446 def SetTitle(*args
, **kwargs
):
8447 """SetTitle(self, String title)"""
8448 return _core_
.Menu_SetTitle(*args
, **kwargs
)
8450 def GetTitle(*args
, **kwargs
):
8451 """GetTitle(self) -> String"""
8452 return _core_
.Menu_GetTitle(*args
, **kwargs
)
8454 def SetEventHandler(*args
, **kwargs
):
8455 """SetEventHandler(self, EvtHandler handler)"""
8456 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
8458 def GetEventHandler(*args
, **kwargs
):
8459 """GetEventHandler(self) -> EvtHandler"""
8460 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
8462 def SetInvokingWindow(*args
, **kwargs
):
8463 """SetInvokingWindow(self, Window win)"""
8464 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
8466 def GetInvokingWindow(*args
, **kwargs
):
8467 """GetInvokingWindow(self) -> Window"""
8468 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
8470 def GetStyle(*args
, **kwargs
):
8471 """GetStyle(self) -> long"""
8472 return _core_
.Menu_GetStyle(*args
, **kwargs
)
8474 def UpdateUI(*args
, **kwargs
):
8475 """UpdateUI(self, EvtHandler source=None)"""
8476 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
8478 def GetMenuBar(*args
, **kwargs
):
8479 """GetMenuBar(self) -> MenuBar"""
8480 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
8482 def Attach(*args
, **kwargs
):
8483 """Attach(self, wxMenuBarBase menubar)"""
8484 return _core_
.Menu_Attach(*args
, **kwargs
)
8486 def Detach(*args
, **kwargs
):
8488 return _core_
.Menu_Detach(*args
, **kwargs
)
8490 def IsAttached(*args
, **kwargs
):
8491 """IsAttached(self) -> bool"""
8492 return _core_
.Menu_IsAttached(*args
, **kwargs
)
8494 def SetParent(*args
, **kwargs
):
8495 """SetParent(self, Menu parent)"""
8496 return _core_
.Menu_SetParent(*args
, **kwargs
)
8498 def GetParent(*args
, **kwargs
):
8499 """GetParent(self) -> Menu"""
8500 return _core_
.Menu_GetParent(*args
, **kwargs
)
8503 class MenuPtr(Menu
):
8504 def __init__(self
, this
):
8506 if not hasattr(self
,"thisown"): self
.thisown
= 0
8507 self
.__class
__ = Menu
8508 _core_
.Menu_swigregister(MenuPtr
)
8509 DefaultValidator
= cvar
.DefaultValidator
8511 #---------------------------------------------------------------------------
8513 class MenuBar(Window
):
8514 """Proxy of C++ MenuBar class"""
8516 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8517 def __init__(self
, *args
, **kwargs
):
8518 """__init__(self, long style=0) -> MenuBar"""
8519 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
8520 self
.this
= newobj
.this
8523 self
._setOORInfo
(self
)
8525 def Append(*args
, **kwargs
):
8526 """Append(self, Menu menu, String title) -> bool"""
8527 return _core_
.MenuBar_Append(*args
, **kwargs
)
8529 def Insert(*args
, **kwargs
):
8530 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8531 return _core_
.MenuBar_Insert(*args
, **kwargs
)
8533 def GetMenuCount(*args
, **kwargs
):
8534 """GetMenuCount(self) -> size_t"""
8535 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
8537 def GetMenu(*args
, **kwargs
):
8538 """GetMenu(self, size_t pos) -> Menu"""
8539 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
8541 def Replace(*args
, **kwargs
):
8542 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8543 return _core_
.MenuBar_Replace(*args
, **kwargs
)
8545 def Remove(*args
, **kwargs
):
8546 """Remove(self, size_t pos) -> Menu"""
8547 return _core_
.MenuBar_Remove(*args
, **kwargs
)
8549 def EnableTop(*args
, **kwargs
):
8550 """EnableTop(self, size_t pos, bool enable)"""
8551 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
8553 def IsEnabledTop(*args
, **kwargs
):
8554 """IsEnabledTop(self, size_t pos) -> bool"""
8555 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
8557 def SetLabelTop(*args
, **kwargs
):
8558 """SetLabelTop(self, size_t pos, String label)"""
8559 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
8561 def GetLabelTop(*args
, **kwargs
):
8562 """GetLabelTop(self, size_t pos) -> String"""
8563 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
8565 def FindMenuItem(*args
, **kwargs
):
8566 """FindMenuItem(self, String menu, String item) -> int"""
8567 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
8569 def FindItemById(*args
, **kwargs
):
8570 """FindItemById(self, int id) -> MenuItem"""
8571 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
8573 def FindMenu(*args
, **kwargs
):
8574 """FindMenu(self, String title) -> int"""
8575 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
8577 def Enable(*args
, **kwargs
):
8578 """Enable(self, int id, bool enable)"""
8579 return _core_
.MenuBar_Enable(*args
, **kwargs
)
8581 def Check(*args
, **kwargs
):
8582 """Check(self, int id, bool check)"""
8583 return _core_
.MenuBar_Check(*args
, **kwargs
)
8585 def IsChecked(*args
, **kwargs
):
8586 """IsChecked(self, int id) -> bool"""
8587 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
8589 def IsEnabled(*args
, **kwargs
):
8590 """IsEnabled(self, int id) -> bool"""
8591 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
8593 def SetLabel(*args
, **kwargs
):
8594 """SetLabel(self, int id, String label)"""
8595 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
8597 def GetLabel(*args
, **kwargs
):
8598 """GetLabel(self, int id) -> String"""
8599 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
8601 def SetHelpString(*args
, **kwargs
):
8602 """SetHelpString(self, int id, String helpString)"""
8603 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
8605 def GetHelpString(*args
, **kwargs
):
8606 """GetHelpString(self, int id) -> String"""
8607 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
8609 def GetFrame(*args
, **kwargs
):
8610 """GetFrame(self) -> wxFrame"""
8611 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
8613 def IsAttached(*args
, **kwargs
):
8614 """IsAttached(self) -> bool"""
8615 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
8617 def Attach(*args
, **kwargs
):
8618 """Attach(self, wxFrame frame)"""
8619 return _core_
.MenuBar_Attach(*args
, **kwargs
)
8621 def Detach(*args
, **kwargs
):
8623 return _core_
.MenuBar_Detach(*args
, **kwargs
)
8626 class MenuBarPtr(MenuBar
):
8627 def __init__(self
, this
):
8629 if not hasattr(self
,"thisown"): self
.thisown
= 0
8630 self
.__class
__ = MenuBar
8631 _core_
.MenuBar_swigregister(MenuBarPtr
)
8633 #---------------------------------------------------------------------------
8635 class MenuItem(Object
):
8636 """Proxy of C++ MenuItem class"""
8638 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8639 def __init__(self
, *args
, **kwargs
):
8641 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8642 String help=EmptyString, int kind=ITEM_NORMAL,
8643 Menu subMenu=None) -> MenuItem
8645 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
8646 self
.this
= newobj
.this
8649 def GetMenu(*args
, **kwargs
):
8650 """GetMenu(self) -> Menu"""
8651 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
8653 def SetMenu(*args
, **kwargs
):
8654 """SetMenu(self, Menu menu)"""
8655 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
8657 def SetId(*args
, **kwargs
):
8658 """SetId(self, int id)"""
8659 return _core_
.MenuItem_SetId(*args
, **kwargs
)
8661 def GetId(*args
, **kwargs
):
8662 """GetId(self) -> int"""
8663 return _core_
.MenuItem_GetId(*args
, **kwargs
)
8665 def IsSeparator(*args
, **kwargs
):
8666 """IsSeparator(self) -> bool"""
8667 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
8669 def SetText(*args
, **kwargs
):
8670 """SetText(self, String str)"""
8671 return _core_
.MenuItem_SetText(*args
, **kwargs
)
8673 def GetLabel(*args
, **kwargs
):
8674 """GetLabel(self) -> String"""
8675 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
8677 def GetText(*args
, **kwargs
):
8678 """GetText(self) -> String"""
8679 return _core_
.MenuItem_GetText(*args
, **kwargs
)
8681 def GetLabelFromText(*args
, **kwargs
):
8682 """GetLabelFromText(String text) -> String"""
8683 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8685 GetLabelFromText
= staticmethod(GetLabelFromText
)
8686 def GetKind(*args
, **kwargs
):
8687 """GetKind(self) -> int"""
8688 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
8690 def SetKind(*args
, **kwargs
):
8691 """SetKind(self, int kind)"""
8692 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
8694 def SetCheckable(*args
, **kwargs
):
8695 """SetCheckable(self, bool checkable)"""
8696 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
8698 def IsCheckable(*args
, **kwargs
):
8699 """IsCheckable(self) -> bool"""
8700 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
8702 def IsSubMenu(*args
, **kwargs
):
8703 """IsSubMenu(self) -> bool"""
8704 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
8706 def SetSubMenu(*args
, **kwargs
):
8707 """SetSubMenu(self, Menu menu)"""
8708 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
8710 def GetSubMenu(*args
, **kwargs
):
8711 """GetSubMenu(self) -> Menu"""
8712 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
8714 def Enable(*args
, **kwargs
):
8715 """Enable(self, bool enable=True)"""
8716 return _core_
.MenuItem_Enable(*args
, **kwargs
)
8718 def IsEnabled(*args
, **kwargs
):
8719 """IsEnabled(self) -> bool"""
8720 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
8722 def Check(*args
, **kwargs
):
8723 """Check(self, bool check=True)"""
8724 return _core_
.MenuItem_Check(*args
, **kwargs
)
8726 def IsChecked(*args
, **kwargs
):
8727 """IsChecked(self) -> bool"""
8728 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
8730 def Toggle(*args
, **kwargs
):
8732 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
8734 def SetHelp(*args
, **kwargs
):
8735 """SetHelp(self, String str)"""
8736 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
8738 def GetHelp(*args
, **kwargs
):
8739 """GetHelp(self) -> String"""
8740 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
8742 def GetAccel(*args
, **kwargs
):
8743 """GetAccel(self) -> AcceleratorEntry"""
8744 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
8746 def SetAccel(*args
, **kwargs
):
8747 """SetAccel(self, AcceleratorEntry accel)"""
8748 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
8750 def SetFont(*args
, **kwargs
):
8751 """SetFont(self, Font font)"""
8752 return _core_
.MenuItem_SetFont(*args
, **kwargs
)
8754 def GetFont(*args
, **kwargs
):
8755 """GetFont(self) -> Font"""
8756 return _core_
.MenuItem_GetFont(*args
, **kwargs
)
8758 def SetTextColour(*args
, **kwargs
):
8759 """SetTextColour(self, Colour colText)"""
8760 return _core_
.MenuItem_SetTextColour(*args
, **kwargs
)
8762 def GetTextColour(*args
, **kwargs
):
8763 """GetTextColour(self) -> Colour"""
8764 return _core_
.MenuItem_GetTextColour(*args
, **kwargs
)
8766 def SetBackgroundColour(*args
, **kwargs
):
8767 """SetBackgroundColour(self, Colour colBack)"""
8768 return _core_
.MenuItem_SetBackgroundColour(*args
, **kwargs
)
8770 def GetBackgroundColour(*args
, **kwargs
):
8771 """GetBackgroundColour(self) -> Colour"""
8772 return _core_
.MenuItem_GetBackgroundColour(*args
, **kwargs
)
8774 def SetBitmaps(*args
, **kwargs
):
8775 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8776 return _core_
.MenuItem_SetBitmaps(*args
, **kwargs
)
8778 def SetDisabledBitmap(*args
, **kwargs
):
8779 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8780 return _core_
.MenuItem_SetDisabledBitmap(*args
, **kwargs
)
8782 def GetDisabledBitmap(*args
, **kwargs
):
8783 """GetDisabledBitmap(self) -> Bitmap"""
8784 return _core_
.MenuItem_GetDisabledBitmap(*args
, **kwargs
)
8786 def SetMarginWidth(*args
, **kwargs
):
8787 """SetMarginWidth(self, int nWidth)"""
8788 return _core_
.MenuItem_SetMarginWidth(*args
, **kwargs
)
8790 def GetMarginWidth(*args
, **kwargs
):
8791 """GetMarginWidth(self) -> int"""
8792 return _core_
.MenuItem_GetMarginWidth(*args
, **kwargs
)
8794 def GetDefaultMarginWidth(*args
, **kwargs
):
8795 """GetDefaultMarginWidth() -> int"""
8796 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8798 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
8799 def IsOwnerDrawn(*args
, **kwargs
):
8800 """IsOwnerDrawn(self) -> bool"""
8801 return _core_
.MenuItem_IsOwnerDrawn(*args
, **kwargs
)
8803 def SetOwnerDrawn(*args
, **kwargs
):
8804 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8805 return _core_
.MenuItem_SetOwnerDrawn(*args
, **kwargs
)
8807 def ResetOwnerDrawn(*args
, **kwargs
):
8808 """ResetOwnerDrawn(self)"""
8809 return _core_
.MenuItem_ResetOwnerDrawn(*args
, **kwargs
)
8811 def SetBitmap(*args
, **kwargs
):
8812 """SetBitmap(self, Bitmap bitmap)"""
8813 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
8815 def GetBitmap(*args
, **kwargs
):
8816 """GetBitmap(self) -> Bitmap"""
8817 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
8820 class MenuItemPtr(MenuItem
):
8821 def __init__(self
, this
):
8823 if not hasattr(self
,"thisown"): self
.thisown
= 0
8824 self
.__class
__ = MenuItem
8825 _core_
.MenuItem_swigregister(MenuItemPtr
)
8827 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8828 """MenuItem_GetLabelFromText(String text) -> String"""
8829 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8831 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8832 """MenuItem_GetDefaultMarginWidth() -> int"""
8833 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8835 #---------------------------------------------------------------------------
8837 class Control(Window
):
8839 This is the base class for a control or 'widget'.
8841 A control is generally a small window which processes user input
8842 and/or displays one or more item of data.
8845 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8846 def __init__(self
, *args
, **kwargs
):
8848 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8849 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8850 String name=ControlNameStr) -> Control
8852 Create a Control. Normally you should only call this from a subclass'
8853 __init__ as a plain old wx.Control is not very useful.
8855 newobj
= _core_
.new_Control(*args
, **kwargs
)
8856 self
.this
= newobj
.this
8859 self
._setOORInfo
(self
)
8861 def Create(*args
, **kwargs
):
8863 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8864 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8865 String name=ControlNameStr) -> bool
8867 Do the 2nd phase and create the GUI control.
8869 return _core_
.Control_Create(*args
, **kwargs
)
8871 def Command(*args
, **kwargs
):
8873 Command(self, CommandEvent event)
8875 Simulates the effect of the user issuing a command to the item.
8877 :see: `wx.CommandEvent`
8880 return _core_
.Control_Command(*args
, **kwargs
)
8882 def GetLabel(*args
, **kwargs
):
8884 GetLabel(self) -> String
8886 Return a control's text.
8888 return _core_
.Control_GetLabel(*args
, **kwargs
)
8890 def SetLabel(*args
, **kwargs
):
8892 SetLabel(self, String label)
8894 Sets the item's text.
8896 return _core_
.Control_SetLabel(*args
, **kwargs
)
8898 def GetClassDefaultAttributes(*args
, **kwargs
):
8900 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8902 Get the default attributes for this class. This is useful if you want
8903 to use the same font or colour in your own control as in a standard
8904 control -- which is a much better idea than hard coding specific
8905 colours or fonts which might look completely out of place on the
8906 user's system, especially if it uses themes.
8908 The variant parameter is only relevant under Mac currently and is
8909 ignore under other platforms. Under Mac, it will change the size of
8910 the returned font. See `wx.Window.SetWindowVariant` for more about
8913 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8915 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
8917 class ControlPtr(Control
):
8918 def __init__(self
, this
):
8920 if not hasattr(self
,"thisown"): self
.thisown
= 0
8921 self
.__class
__ = Control
8922 _core_
.Control_swigregister(ControlPtr
)
8923 ControlNameStr
= cvar
.ControlNameStr
8925 def PreControl(*args
, **kwargs
):
8927 PreControl() -> Control
8929 Precreate a Control control for 2-phase creation
8931 val
= _core_
.new_PreControl(*args
, **kwargs
)
8935 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
8937 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8939 Get the default attributes for this class. This is useful if you want
8940 to use the same font or colour in your own control as in a standard
8941 control -- which is a much better idea than hard coding specific
8942 colours or fonts which might look completely out of place on the
8943 user's system, especially if it uses themes.
8945 The variant parameter is only relevant under Mac currently and is
8946 ignore under other platforms. Under Mac, it will change the size of
8947 the returned font. See `wx.Window.SetWindowVariant` for more about
8950 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8952 #---------------------------------------------------------------------------
8954 class ItemContainer(object):
8956 The wx.ItemContainer class defines an interface which is implemented
8957 by all controls which have string subitems, each of which may be
8958 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
8959 as `wx.ComboBox` which implements an extended interface deriving from
8962 It defines the methods for accessing the control's items and although
8963 each of the derived classes implements them differently, they still
8964 all conform to the same interface.
8966 The items in a wx.ItemContainer have (non empty) string labels and,
8967 optionally, client data associated with them.
8970 def __init__(self
): raise RuntimeError, "No constructor defined"
8972 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8973 def Append(*args
, **kwargs
):
8975 Append(self, String item, PyObject clientData=None) -> int
8977 Adds the item to the control, associating the given data with the item
8978 if not None. The return value is the index of the newly added item
8979 which may be different from the last one if the control is sorted (e.g.
8980 has wx.LB_SORT or wx.CB_SORT style).
8982 return _core_
.ItemContainer_Append(*args
, **kwargs
)
8984 def AppendItems(*args
, **kwargs
):
8986 AppendItems(self, List strings)
8988 Apend several items at once to the control. Notice that calling this
8989 method may be much faster than appending the items one by one if you
8990 need to add a lot of items.
8992 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
8994 def Insert(*args
, **kwargs
):
8996 Insert(self, String item, int pos, PyObject clientData=None) -> int
8998 Insert an item into the control before the item at the ``pos`` index,
8999 optionally associating some data object with the item.
9001 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
9003 def Clear(*args
, **kwargs
):
9007 Removes all items from the control.
9009 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
9011 def Delete(*args
, **kwargs
):
9015 Deletes the item at the zero-based index 'n' from the control. Note
9016 that it is an error (signalled by a `wx.PyAssertionError` exception if
9017 enabled) to remove an item with the index negative or greater or equal
9018 than the number of items in the control.
9020 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
9022 def GetClientData(*args
, **kwargs
):
9024 GetClientData(self, int n) -> PyObject
9026 Returns the client data associated with the given item, (if any.)
9028 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
9030 def SetClientData(*args
, **kwargs
):
9032 SetClientData(self, int n, PyObject clientData)
9034 Associate the given client data with the item at position n.
9036 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
9038 def GetCount(*args
, **kwargs
):
9040 GetCount(self) -> int
9042 Returns the number of items in the control.
9044 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
9046 def IsEmpty(*args
, **kwargs
):
9048 IsEmpty(self) -> bool
9050 Returns True if the control is empty or False if it has some items.
9052 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
9054 def GetString(*args
, **kwargs
):
9056 GetString(self, int n) -> String
9058 Returns the label of the item with the given index.
9060 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
9062 def GetStrings(*args
, **kwargs
):
9063 """GetStrings(self) -> wxArrayString"""
9064 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
9066 def SetString(*args
, **kwargs
):
9068 SetString(self, int n, String s)
9070 Sets the label for the given item.
9072 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
9074 def FindString(*args
, **kwargs
):
9076 FindString(self, String s) -> int
9078 Finds an item whose label matches the given string. Returns the
9079 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9082 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
9084 def SetSelection(*args
, **kwargs
):
9086 SetSelection(self, int n)
9088 Sets the item at index 'n' to be the selected item.
9090 return _core_
.ItemContainer_SetSelection(*args
, **kwargs
)
9092 def GetSelection(*args
, **kwargs
):
9094 GetSelection(self) -> int
9096 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9099 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
9101 def SetStringSelection(*args
, **kwargs
):
9102 """SetStringSelection(self, String s) -> bool"""
9103 return _core_
.ItemContainer_SetStringSelection(*args
, **kwargs
)
9105 def GetStringSelection(*args
, **kwargs
):
9107 GetStringSelection(self) -> String
9109 Returns the label of the selected item or an empty string if no item
9112 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
9114 def Select(*args
, **kwargs
):
9118 This is the same as `SetSelection` and exists only because it is
9119 slightly more natural for controls which support multiple selection.
9121 return _core_
.ItemContainer_Select(*args
, **kwargs
)
9124 class ItemContainerPtr(ItemContainer
):
9125 def __init__(self
, this
):
9127 if not hasattr(self
,"thisown"): self
.thisown
= 0
9128 self
.__class
__ = ItemContainer
9129 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
9131 #---------------------------------------------------------------------------
9133 class ControlWithItems(Control
,ItemContainer
):
9135 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9136 wx.Control class, and is used for the base class of various controls
9139 def __init__(self
): raise RuntimeError, "No constructor defined"
9141 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9143 class ControlWithItemsPtr(ControlWithItems
):
9144 def __init__(self
, this
):
9146 if not hasattr(self
,"thisown"): self
.thisown
= 0
9147 self
.__class
__ = ControlWithItems
9148 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
9150 #---------------------------------------------------------------------------
9152 class SizerItem(Object
):
9154 The wx.SizerItem class is used to track the position, size and other
9155 attributes of each item managed by a `wx.Sizer`. In normal usage user
9156 code should never need to deal directly with a wx.SizerItem, but
9157 custom classes derived from `wx.PySizer` will probably need to use the
9158 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9160 :see: `wx.Sizer`, `wx.GBSizerItem`
9163 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9164 def __init__(self
, *args
, **kwargs
):
9166 __init__(self) -> SizerItem
9168 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9169 size will need to be set before this item can be used in a Sizer.
9171 You will probably never need to create a wx.SizerItem directly as they
9172 are created automatically when the sizer's Add, Insert or Prepend
9175 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9177 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
9178 self
.this
= newobj
.this
9181 def DeleteWindows(*args
, **kwargs
):
9185 Destroy the window or the windows in a subsizer, depending on the type
9188 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
9190 def DetachSizer(*args
, **kwargs
):
9194 Enable deleting the SizerItem without destroying the contained sizer.
9196 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
9198 def GetSize(*args
, **kwargs
):
9200 GetSize(self) -> Size
9202 Get the current size of the item, as set in the last Layout.
9204 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
9206 def CalcMin(*args
, **kwargs
):
9208 CalcMin(self) -> Size
9210 Calculates the minimum desired size for the item, including any space
9213 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
9215 def SetDimension(*args
, **kwargs
):
9217 SetDimension(self, Point pos, Size size)
9219 Set the position and size of the space allocated for this item by the
9220 sizer, and adjust the position and size of the item (window or
9221 subsizer) to be within that space taking alignment and borders into
9224 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
9226 def GetMinSize(*args
, **kwargs
):
9228 GetMinSize(self) -> Size
9230 Get the minimum size needed for the item.
9232 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
9234 def GetMinSizeWithBorder(*args
, **kwargs
):
9236 GetMinSizeWithBorder(self) -> Size
9238 Get the minimum size needed for the item with space for the borders
9241 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
9243 def SetInitSize(*args
, **kwargs
):
9244 """SetInitSize(self, int x, int y)"""
9245 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
9247 def SetRatioWH(*args
, **kwargs
):
9249 SetRatioWH(self, int width, int height)
9251 Set the ratio item attribute.
9253 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
9255 def SetRatioSize(*args
, **kwargs
):
9257 SetRatioSize(self, Size size)
9259 Set the ratio item attribute.
9261 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
9263 def SetRatio(*args
, **kwargs
):
9265 SetRatio(self, float ratio)
9267 Set the ratio item attribute.
9269 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
9271 def GetRatio(*args
, **kwargs
):
9273 GetRatio(self) -> float
9275 Set the ratio item attribute.
9277 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
9279 def GetRect(*args
, **kwargs
):
9281 GetRect(self) -> Rect
9283 Returns the rectangle that the sizer item should occupy
9285 return _core_
.SizerItem_GetRect(*args
, **kwargs
)
9287 def IsWindow(*args
, **kwargs
):
9289 IsWindow(self) -> bool
9291 Is this sizer item a window?
9293 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
9295 def IsSizer(*args
, **kwargs
):
9297 IsSizer(self) -> bool
9299 Is this sizer item a subsizer?
9301 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
9303 def IsSpacer(*args
, **kwargs
):
9305 IsSpacer(self) -> bool
9307 Is this sizer item a spacer?
9309 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
9311 def SetProportion(*args
, **kwargs
):
9313 SetProportion(self, int proportion)
9315 Set the proportion value for this item.
9317 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
9319 def GetProportion(*args
, **kwargs
):
9321 GetProportion(self) -> int
9323 Get the proportion value for this item.
9325 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
9327 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
9328 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
9329 def SetFlag(*args
, **kwargs
):
9331 SetFlag(self, int flag)
9333 Set the flag value for this item.
9335 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
9337 def GetFlag(*args
, **kwargs
):
9339 GetFlag(self) -> int
9341 Get the flag value for this item.
9343 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
9345 def SetBorder(*args
, **kwargs
):
9347 SetBorder(self, int border)
9349 Set the border value for this item.
9351 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
9353 def GetBorder(*args
, **kwargs
):
9355 GetBorder(self) -> int
9357 Get the border value for this item.
9359 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
9361 def GetWindow(*args
, **kwargs
):
9363 GetWindow(self) -> Window
9365 Get the window (if any) that is managed by this sizer item.
9367 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
9369 def SetWindow(*args
, **kwargs
):
9371 SetWindow(self, Window window)
9373 Set the window to be managed by this sizer item.
9375 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9377 def GetSizer(*args
, **kwargs
):
9379 GetSizer(self) -> Sizer
9381 Get the subsizer (if any) that is managed by this sizer item.
9383 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9385 def SetSizer(*args
, **kwargs
):
9387 SetSizer(self, Sizer sizer)
9389 Set the subsizer to be managed by this sizer item.
9391 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9393 def GetSpacer(*args
, **kwargs
):
9395 GetSpacer(self) -> Size
9397 Get the size of the spacer managed by this sizer item.
9399 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9401 def SetSpacer(*args
, **kwargs
):
9403 SetSpacer(self, Size size)
9405 Set the size of the spacer to be managed by this sizer item.
9407 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9409 def Show(*args
, **kwargs
):
9411 Show(self, bool show)
9413 Set the show item attribute, which sizers use to determine if the item
9414 is to be made part of the layout or not. If the item is tracking a
9415 window then it is shown or hidden as needed.
9417 return _core_
.SizerItem_Show(*args
, **kwargs
)
9419 def IsShown(*args
, **kwargs
):
9421 IsShown(self) -> bool
9423 Is the item to be shown in the layout?
9425 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
9427 def GetPosition(*args
, **kwargs
):
9429 GetPosition(self) -> Point
9431 Returns the current position of the item, as set in the last Layout.
9433 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
9435 def GetUserData(*args
, **kwargs
):
9437 GetUserData(self) -> PyObject
9439 Returns the userData associated with this sizer item, or None if there
9442 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
9445 class SizerItemPtr(SizerItem
):
9446 def __init__(self
, this
):
9448 if not hasattr(self
,"thisown"): self
.thisown
= 0
9449 self
.__class
__ = SizerItem
9450 _core_
.SizerItem_swigregister(SizerItemPtr
)
9452 def SizerItemWindow(*args
, **kwargs
):
9454 SizerItemWindow(Window window, int proportion, int flag, int border,
9455 PyObject userData=None) -> SizerItem
9457 Constructs a `wx.SizerItem` for tracking a window.
9459 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
9463 def SizerItemSpacer(*args
, **kwargs
):
9465 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9466 PyObject userData=None) -> SizerItem
9468 Constructs a `wx.SizerItem` for tracking a spacer.
9470 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
9474 def SizerItemSizer(*args
, **kwargs
):
9476 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9477 PyObject userData=None) -> SizerItem
9479 Constructs a `wx.SizerItem` for tracking a subsizer
9481 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
9485 class Sizer(Object
):
9487 wx.Sizer is the abstract base class used for laying out subwindows in
9488 a window. You cannot use wx.Sizer directly; instead, you will have to
9489 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9490 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9491 and `wx.GridBagSizer`.
9493 The concept implemented by sizers in wxWidgets is closely related to
9494 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9495 toolkit or the Qt toolkit. It is based upon the idea of the individual
9496 subwindows reporting their minimal required size and their ability to
9497 get stretched if the size of the parent window has changed. This will
9498 most often mean that the programmer does not set the original size of
9499 a dialog in the beginning, rather the dialog will assigned a sizer and
9500 this sizer will be queried about the recommended size. The sizer in
9501 turn will query its children, which can be normal windows or contorls,
9502 empty space or other sizers, so that a hierarchy of sizers can be
9503 constructed. Note that wxSizer does not derive from wxWindow and thus
9504 do not interfere with tab ordering and requires very little resources
9505 compared to a real window on screen.
9507 What makes sizers so well fitted for use in wxWidgets is the fact that
9508 every control reports its own minimal size and the algorithm can
9509 handle differences in font sizes or different window (dialog item)
9510 sizes on different platforms without problems. If for example the
9511 standard font as well as the overall design of Mac widgets requires
9512 more space than on Windows, then the initial size of a dialog using a
9513 sizer will automatically be bigger on Mac than on Windows.
9515 def __init__(self
): raise RuntimeError, "No constructor defined"
9517 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9518 def _setOORInfo(*args
, **kwargs
):
9519 """_setOORInfo(self, PyObject _self)"""
9520 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
9522 def Add(*args
, **kwargs
):
9524 Add(self, item, int proportion=0, int flag=0, int border=0,
9525 PyObject userData=None) -> wx.SizerItem
9527 Appends a child item to the sizer.
9529 return _core_
.Sizer_Add(*args
, **kwargs
)
9531 def Insert(*args
, **kwargs
):
9533 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9534 PyObject userData=None) -> wx.SizerItem
9536 Inserts a new item into the list of items managed by this sizer before
9537 the item at index *before*. See `Add` for a description of the parameters.
9539 return _core_
.Sizer_Insert(*args
, **kwargs
)
9541 def Prepend(*args
, **kwargs
):
9543 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9544 PyObject userData=None) -> wx.SizerItem
9546 Adds a new item to the begining of the list of sizer items managed by
9547 this sizer. See `Add` for a description of the parameters.
9549 return _core_
.Sizer_Prepend(*args
, **kwargs
)
9551 def Remove(*args
, **kwargs
):
9553 Remove(self, item) -> bool
9555 Removes an item from the sizer and destroys it. This method does not
9556 cause any layout or resizing to take place, call `Layout` to update
9557 the layout on screen after removing a child from the sizer. The
9558 *item* parameter can be either a window, a sizer, or the zero-based
9559 index of an item to remove. Returns True if the child item was found
9562 return _core_
.Sizer_Remove(*args
, **kwargs
)
9564 def Detach(*args
, **kwargs
):
9566 Detach(self, item) -> bool
9568 Detaches an item from the sizer without destroying it. This method
9569 does not cause any layout or resizing to take place, call `Layout` to
9570 do so. The *item* parameter can be either a window, a sizer, or the
9571 zero-based index of the item to be detached. Returns True if the child item
9572 was found and detached.
9574 return _core_
.Sizer_Detach(*args
, **kwargs
)
9576 def GetItem(*args
, **kwargs
):
9578 GetItem(self, item) -> wx.SizerItem
9580 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9581 parameter can be either a window, a sizer, or the zero-based index of
9582 the item to be detached.
9584 return _core_
.Sizer_GetItem(*args
, **kwargs
)
9586 def _SetItemMinSize(*args
, **kwargs
):
9587 """_SetItemMinSize(self, PyObject item, Size size)"""
9588 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
9590 def SetItemMinSize(self
, item
, *args
):
9592 SetItemMinSize(self, item, Size size)
9594 Sets the minimum size that will be allocated for an item in the sizer.
9595 The *item* parameter can be either a window, a sizer, or the
9596 zero-based index of the item. If a window or sizer is given then it
9597 will be searched for recursivly in subsizers if neccessary.
9600 # for backward compatibility accept separate width,height args too
9601 return self
._SetItemMinSize
(item
, args
)
9603 return self
._SetItemMinSize
(item
, args
[0])
9605 def AddItem(*args
, **kwargs
):
9607 AddItem(self, SizerItem item)
9609 Adds a `wx.SizerItem` to the sizer.
9611 return _core_
.Sizer_AddItem(*args
, **kwargs
)
9613 def InsertItem(*args
, **kwargs
):
9615 InsertItem(self, int index, SizerItem item)
9617 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9619 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
9621 def PrependItem(*args
, **kwargs
):
9623 PrependItem(self, SizerItem item)
9625 Prepends a `wx.SizerItem` to the sizer.
9627 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
9629 def AddMany(self
, items
):
9631 AddMany is a convenience method for adding several items
9632 to a sizer at one time. Simply pass it a list of tuples,
9633 where each tuple consists of the parameters that you
9634 would normally pass to the `Add` method.
9637 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
9641 # for backwards compatibility only, please do not use in new code
9642 def AddWindow(self
, *args
, **kw
):
9643 """Compatibility alias for `Add`."""
9644 return self
.Add(*args
, **kw
)
9645 def AddSizer(self
, *args
, **kw
):
9646 """Compatibility alias for `Add`."""
9647 return self
.Add(*args
, **kw
)
9648 def AddSpacer(self
, *args
, **kw
):
9649 """Compatibility alias for `Add`."""
9650 return self
.Add(*args
, **kw
)
9652 def PrependWindow(self
, *args
, **kw
):
9653 """Compatibility alias for `Prepend`."""
9654 return self
.Prepend(*args
, **kw
)
9655 def PrependSizer(self
, *args
, **kw
):
9656 """Compatibility alias for `Prepend`."""
9657 return self
.Prepend(*args
, **kw
)
9658 def PrependSpacer(self
, *args
, **kw
):
9659 """Compatibility alias for `Prepend`."""
9660 return self
.Prepend(*args
, **kw
)
9662 def InsertWindow(self
, *args
, **kw
):
9663 """Compatibility alias for `Insert`."""
9664 return self
.Insert(*args
, **kw
)
9665 def InsertSizer(self
, *args
, **kw
):
9666 """Compatibility alias for `Insert`."""
9667 return self
.Insert(*args
, **kw
)
9668 def InsertSpacer(self
, *args
, **kw
):
9669 """Compatibility alias for `Insert`."""
9670 return self
.Insert(*args
, **kw
)
9672 def RemoveWindow(self
, *args
, **kw
):
9673 """Compatibility alias for `Remove`."""
9674 return self
.Remove(*args
, **kw
)
9675 def RemoveSizer(self
, *args
, **kw
):
9676 """Compatibility alias for `Remove`."""
9677 return self
.Remove(*args
, **kw
)
9678 def RemovePos(self
, *args
, **kw
):
9679 """Compatibility alias for `Remove`."""
9680 return self
.Remove(*args
, **kw
)
9683 def SetDimension(*args
, **kwargs
):
9685 SetDimension(self, int x, int y, int width, int height)
9687 Call this to force the sizer to take the given dimension and thus
9688 force the items owned by the sizer to resize themselves according to
9689 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9692 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
9694 def SetMinSize(*args
, **kwargs
):
9696 SetMinSize(self, Size size)
9698 Call this to give the sizer a minimal size. Normally, the sizer will
9699 calculate its minimal size based purely on how much space its children
9700 need. After calling this method `GetMinSize` will return either the
9701 minimal size as requested by its children or the minimal size set
9702 here, depending on which is bigger.
9704 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
9706 def GetSize(*args
, **kwargs
):
9708 GetSize(self) -> Size
9710 Returns the current size of the space managed by the sizer.
9712 return _core_
.Sizer_GetSize(*args
, **kwargs
)
9714 def GetPosition(*args
, **kwargs
):
9716 GetPosition(self) -> Point
9718 Returns the current position of the sizer's managed space.
9720 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
9722 def GetMinSize(*args
, **kwargs
):
9724 GetMinSize(self) -> Size
9726 Returns the minimal size of the sizer. This is either the combined
9727 minimal size of all the children and their borders or the minimal size
9728 set by SetMinSize, depending on which is bigger.
9730 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
9732 def GetSizeTuple(self
):
9733 return self
.GetSize().Get()
9734 def GetPositionTuple(self
):
9735 return self
.GetPosition().Get()
9736 def GetMinSizeTuple(self
):
9737 return self
.GetMinSize().Get()
9739 def RecalcSizes(*args
, **kwargs
):
9743 Using the sizes calculated by `CalcMin` reposition and resize all the
9744 items managed by this sizer. You should not need to call this directly as
9745 it is called by `Layout`.
9747 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
9749 def CalcMin(*args
, **kwargs
):
9751 CalcMin(self) -> Size
9753 This method is where the sizer will do the actual calculation of its
9754 children's minimal sizes. You should not need to call this directly as
9755 it is called by `Layout`.
9757 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
9759 def Layout(*args
, **kwargs
):
9763 This method will force the recalculation and layout of the items
9764 controlled by the sizer using the current space allocated to the
9765 sizer. Normally this is called automatically from the owning window's
9766 EVT_SIZE handler, but it is also useful to call it from user code when
9767 one of the items in a sizer change size, or items are added or
9770 return _core_
.Sizer_Layout(*args
, **kwargs
)
9772 def Fit(*args
, **kwargs
):
9774 Fit(self, Window window) -> Size
9776 Tell the sizer to resize the *window* to match the sizer's minimal
9777 size. This is commonly done in the constructor of the window itself in
9778 order to set its initial size to match the needs of the children as
9779 determined by the sizer. Returns the new size.
9781 For a top level window this is the total window size, not the client size.
9783 return _core_
.Sizer_Fit(*args
, **kwargs
)
9785 def FitInside(*args
, **kwargs
):
9787 FitInside(self, Window window)
9789 Tell the sizer to resize the *virtual size* of the *window* to match the
9790 sizer's minimal size. This will not alter the on screen size of the
9791 window, but may cause the addition/removal/alteration of scrollbars
9792 required to view the virtual area in windows which manage it.
9794 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9797 return _core_
.Sizer_FitInside(*args
, **kwargs
)
9799 def SetSizeHints(*args
, **kwargs
):
9801 SetSizeHints(self, Window window)
9803 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9804 match the sizer's minimal size. This is commonly done in the
9805 constructor of the window itself if the window is resizable (as are
9806 many dialogs under Unix and frames on probably all platforms) in order
9807 to prevent the window from being sized smaller than the minimal size
9808 required by the sizer.
9810 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
9812 def SetVirtualSizeHints(*args
, **kwargs
):
9814 SetVirtualSizeHints(self, Window window)
9816 Tell the sizer to set the minimal size of the window virtual area to
9817 match the sizer's minimal size. For windows with managed scrollbars
9818 this will set them appropriately.
9820 :see: `wx.ScrolledWindow.SetScrollbars`
9823 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
9825 def Clear(*args
, **kwargs
):
9827 Clear(self, bool deleteWindows=False)
9829 Clear all items from the sizer, optionally destroying the window items
9832 return _core_
.Sizer_Clear(*args
, **kwargs
)
9834 def DeleteWindows(*args
, **kwargs
):
9838 Destroy all windows managed by the sizer.
9840 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
9842 def GetChildren(*args
, **kwargs
):
9844 GetChildren(self) -> list
9846 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9848 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
9850 def Show(*args
, **kwargs
):
9852 Show(self, item, bool show=True, bool recursive=false) -> bool
9854 Shows or hides an item managed by the sizer. To make a sizer item
9855 disappear or reappear, use Show followed by `Layout`. The *item*
9856 parameter can be either a window, a sizer, or the zero-based index of
9857 the item. Use the recursive parameter to show or hide an item in a
9858 subsizer. Returns True if the item was found.
9860 return _core_
.Sizer_Show(*args
, **kwargs
)
9862 def IsShown(*args
, **kwargs
):
9866 Determines if the item is currently shown. sizer. To make a sizer
9867 item disappear or reappear, use Show followed by `Layout`. The *item*
9868 parameter can be either a window, a sizer, or the zero-based index of
9871 return _core_
.Sizer_IsShown(*args
, **kwargs
)
9873 def Hide(self
, item
, recursive
=False):
9875 A convenience method for Show(item, False, recursive).
9877 return self
.Show(item
, False, recursive
)
9879 def ShowItems(*args
, **kwargs
):
9881 ShowItems(self, bool show)
9883 Recursively call `wx.SizerItem.Show` on all sizer items.
9885 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
9888 class SizerPtr(Sizer
):
9889 def __init__(self
, this
):
9891 if not hasattr(self
,"thisown"): self
.thisown
= 0
9892 self
.__class
__ = Sizer
9893 _core_
.Sizer_swigregister(SizerPtr
)
9895 class PySizer(Sizer
):
9897 wx.PySizer is a special version of `wx.Sizer` that has been
9898 instrumented to allow the C++ virtual methods to be overloaded in
9899 Python derived classes. You would derive from this class if you are
9900 wanting to implement a custom sizer in Python code. Simply implement
9901 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9904 class MySizer(wx.PySizer):
9906 wx.PySizer.__init__(self)
9909 for item in self.GetChildren():
9910 # calculate the total minimum width and height needed
9911 # by all items in the sizer according to this sizer's
9914 return wx.Size(width, height)
9916 def RecalcSizes(self):
9917 # find the space allotted to this sizer
9918 pos = self.GetPosition()
9919 size = self.GetSize()
9920 for item in self.GetChildren():
9921 # Recalculate (if necessary) the position and size of
9922 # each item and then call item.SetDimension to do the
9923 # actual positioning and sizing of the items within the
9924 # space alloted to this sizer.
9926 item.SetDimension(itemPos, itemSize)
9929 When `Layout` is called it first calls `CalcMin` followed by
9930 `RecalcSizes` so you can optimize a bit by saving the results of
9931 `CalcMin` and reusing them in `RecalcSizes`.
9933 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9938 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9939 def __init__(self
, *args
, **kwargs
):
9941 __init__(self) -> PySizer
9943 Creates a wx.PySizer. Must be called from the __init__ in the derived
9946 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
9947 self
.this
= newobj
.this
9950 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
9952 def _setCallbackInfo(*args
, **kwargs
):
9953 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9954 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
9957 class PySizerPtr(PySizer
):
9958 def __init__(self
, this
):
9960 if not hasattr(self
,"thisown"): self
.thisown
= 0
9961 self
.__class
__ = PySizer
9962 _core_
.PySizer_swigregister(PySizerPtr
)
9964 #---------------------------------------------------------------------------
9966 class BoxSizer(Sizer
):
9968 The basic idea behind a box sizer is that windows will most often be
9969 laid out in rather simple basic geometry, typically in a row or a
9970 column or nested hierarchies of either. A wx.BoxSizer will lay out
9971 its items in a simple row or column, depending on the orientation
9972 parameter passed to the constructor.
9975 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9976 def __init__(self
, *args
, **kwargs
):
9978 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9980 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9981 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9984 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
9985 self
.this
= newobj
.this
9988 self
._setOORInfo
(self
)
9990 def GetOrientation(*args
, **kwargs
):
9992 GetOrientation(self) -> int
9994 Returns the current orientation of the sizer.
9996 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
9998 def SetOrientation(*args
, **kwargs
):
10000 SetOrientation(self, int orient)
10002 Resets the orientation of the sizer.
10004 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
10007 class BoxSizerPtr(BoxSizer
):
10008 def __init__(self
, this
):
10010 if not hasattr(self
,"thisown"): self
.thisown
= 0
10011 self
.__class
__ = BoxSizer
10012 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
10014 #---------------------------------------------------------------------------
10016 class StaticBoxSizer(BoxSizer
):
10018 wx.StaticBoxSizer derives from and functions identically to the
10019 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10020 manages. Note that this static box must be created separately and
10021 passed to the sizer constructor.
10023 def __repr__(self
):
10024 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10025 def __init__(self
, *args
, **kwargs
):
10027 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10029 Constructor. It takes an associated static box and the orientation
10030 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10033 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
10034 self
.this
= newobj
.this
10037 self
._setOORInfo
(self
)
10039 def GetStaticBox(*args
, **kwargs
):
10041 GetStaticBox(self) -> StaticBox
10043 Returns the static box associated with this sizer.
10045 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
10048 class StaticBoxSizerPtr(StaticBoxSizer
):
10049 def __init__(self
, this
):
10051 if not hasattr(self
,"thisown"): self
.thisown
= 0
10052 self
.__class
__ = StaticBoxSizer
10053 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
10055 #---------------------------------------------------------------------------
10057 class GridSizer(Sizer
):
10059 A grid sizer is a sizer which lays out its children in a
10060 two-dimensional table with all cells having the same size. In other
10061 words, the width of each cell within the grid is the width of the
10062 widest item added to the sizer and the height of each grid cell is the
10063 height of the tallest item. An optional vertical and/or horizontal
10064 gap between items can also be specified (in pixels.)
10066 Items are placed in the cells of the grid in the order they are added,
10067 in row-major order. In other words, the first row is filled first,
10068 then the second, and so on until all items have been added. (If
10069 neccessary, additional rows will be added as items are added.) If you
10070 need to have greater control over the cells that items are placed in
10071 then use the `wx.GridBagSizer`.
10074 def __repr__(self
):
10075 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10076 def __init__(self
, *args
, **kwargs
):
10078 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10080 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10081 of columns and rows in the sizer - if either of the parameters is
10082 zero, it will be calculated to from the total number of children in
10083 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10084 define extra space between all children.
10086 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
10087 self
.this
= newobj
.this
10090 self
._setOORInfo
(self
)
10092 def SetCols(*args
, **kwargs
):
10094 SetCols(self, int cols)
10096 Sets the number of columns in the sizer.
10098 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
10100 def SetRows(*args
, **kwargs
):
10102 SetRows(self, int rows)
10104 Sets the number of rows in the sizer.
10106 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
10108 def SetVGap(*args
, **kwargs
):
10110 SetVGap(self, int gap)
10112 Sets the vertical gap (in pixels) between the cells in the sizer.
10114 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
10116 def SetHGap(*args
, **kwargs
):
10118 SetHGap(self, int gap)
10120 Sets the horizontal gap (in pixels) between cells in the sizer
10122 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
10124 def GetCols(*args
, **kwargs
):
10126 GetCols(self) -> int
10128 Returns the number of columns in the sizer.
10130 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
10132 def GetRows(*args
, **kwargs
):
10134 GetRows(self) -> int
10136 Returns the number of rows in the sizer.
10138 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
10140 def GetVGap(*args
, **kwargs
):
10142 GetVGap(self) -> int
10144 Returns the vertical gap (in pixels) between the cells in the sizer.
10146 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
10148 def GetHGap(*args
, **kwargs
):
10150 GetHGap(self) -> int
10152 Returns the horizontal gap (in pixels) between cells in the sizer.
10154 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
10157 class GridSizerPtr(GridSizer
):
10158 def __init__(self
, this
):
10160 if not hasattr(self
,"thisown"): self
.thisown
= 0
10161 self
.__class
__ = GridSizer
10162 _core_
.GridSizer_swigregister(GridSizerPtr
)
10164 #---------------------------------------------------------------------------
10166 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
10167 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
10168 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
10169 class FlexGridSizer(GridSizer
):
10171 A flex grid sizer is a sizer which lays out its children in a
10172 two-dimensional table with all table cells in one row having the same
10173 height and all cells in one column having the same width, but all
10174 rows or all columns are not necessarily the same height or width as in
10175 the `wx.GridSizer`.
10177 wx.FlexGridSizer can also size items equally in one direction but
10178 unequally ("flexibly") in the other. If the sizer is only flexible
10179 in one direction (this can be changed using `SetFlexibleDirection`), it
10180 needs to be decided how the sizer should grow in the other ("non
10181 flexible") direction in order to fill the available space. The
10182 `SetNonFlexibleGrowMode` method serves this purpose.
10186 def __repr__(self
):
10187 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10188 def __init__(self
, *args
, **kwargs
):
10190 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10192 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10193 number of columns and rows in the sizer - if either of the parameters
10194 is zero, it will be calculated to from the total number of children in
10195 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10196 define extra space between all children.
10198 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
10199 self
.this
= newobj
.this
10202 self
._setOORInfo
(self
)
10204 def AddGrowableRow(*args
, **kwargs
):
10206 AddGrowableRow(self, size_t idx, int proportion=0)
10208 Specifies that row *idx* (starting from zero) should be grown if there
10209 is extra space available to the sizer.
10211 The *proportion* parameter has the same meaning as the stretch factor
10212 for the box sizers except that if all proportions are 0, then all
10213 columns are resized equally (instead of not being resized at all).
10215 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
10217 def RemoveGrowableRow(*args
, **kwargs
):
10219 RemoveGrowableRow(self, size_t idx)
10221 Specifies that row *idx* is no longer growable.
10223 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
10225 def AddGrowableCol(*args
, **kwargs
):
10227 AddGrowableCol(self, size_t idx, int proportion=0)
10229 Specifies that column *idx* (starting from zero) should be grown if
10230 there is extra space available to the sizer.
10232 The *proportion* parameter has the same meaning as the stretch factor
10233 for the box sizers except that if all proportions are 0, then all
10234 columns are resized equally (instead of not being resized at all).
10236 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
10238 def RemoveGrowableCol(*args
, **kwargs
):
10240 RemoveGrowableCol(self, size_t idx)
10242 Specifies that column *idx* is no longer growable.
10244 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
10246 def SetFlexibleDirection(*args
, **kwargs
):
10248 SetFlexibleDirection(self, int direction)
10250 Specifies whether the sizer should flexibly resize its columns, rows,
10251 or both. Argument *direction* can be one of the following values. Any
10252 other value is ignored.
10254 ============== =======================================
10255 wx.VERTICAL Rows are flexibly sized.
10256 wx.HORIZONTAL Columns are flexibly sized.
10257 wx.BOTH Both rows and columns are flexibly sized
10258 (this is the default value).
10259 ============== =======================================
10261 Note that this method does not trigger relayout.
10264 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
10266 def GetFlexibleDirection(*args
, **kwargs
):
10268 GetFlexibleDirection(self) -> int
10270 Returns a value that specifies whether the sizer
10271 flexibly resizes its columns, rows, or both (default).
10273 :see: `SetFlexibleDirection`
10275 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
10277 def SetNonFlexibleGrowMode(*args
, **kwargs
):
10279 SetNonFlexibleGrowMode(self, int mode)
10281 Specifies how the sizer should grow in the non-flexible direction if
10282 there is one (so `SetFlexibleDirection` must have been called
10283 previously). Argument *mode* can be one of the following values:
10285 ========================== =================================================
10286 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10287 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10288 `AddGrowableCol` and `AddGrowableRow`. In this
10289 case equal sizing applies to minimum sizes of
10290 columns or rows (this is the default value).
10291 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10292 the non flexible direction, whether they are
10293 growable or not in the flexbile direction.
10294 ========================== =================================================
10296 Note that this method does not trigger relayout.
10300 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
10302 def GetNonFlexibleGrowMode(*args
, **kwargs
):
10304 GetNonFlexibleGrowMode(self) -> int
10306 Returns the value that specifies how the sizer grows in the
10307 non-flexible direction if there is one.
10309 :see: `SetNonFlexibleGrowMode`
10311 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
10313 def GetRowHeights(*args
, **kwargs
):
10315 GetRowHeights(self) -> list
10317 Returns a list of integers representing the heights of each of the
10320 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
10322 def GetColWidths(*args
, **kwargs
):
10324 GetColWidths(self) -> list
10326 Returns a list of integers representing the widths of each of the
10327 columns in the sizer.
10329 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
10332 class FlexGridSizerPtr(FlexGridSizer
):
10333 def __init__(self
, this
):
10335 if not hasattr(self
,"thisown"): self
.thisown
= 0
10336 self
.__class
__ = FlexGridSizer
10337 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
10339 class StdDialogButtonSizer(BoxSizer
):
10341 A special sizer that knows how to order and position standard buttons
10342 in order to conform to the current platform's standards. You simply
10343 need to add each `wx.Button` to the sizer, and be sure to create the
10344 buttons using the standard ID's. Then call `Realize` and the sizer
10345 will take care of the rest.
10348 def __repr__(self
):
10349 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10350 def __init__(self
, *args
, **kwargs
):
10351 """__init__(self) -> StdDialogButtonSizer"""
10352 newobj
= _core_
.new_StdDialogButtonSizer(*args
, **kwargs
)
10353 self
.this
= newobj
.this
10356 def AddButton(*args
, **kwargs
):
10358 AddButton(self, wxButton button)
10360 Use this to add the buttons to this sizer. Do not use the `Add`
10361 method in the base class.
10363 return _core_
.StdDialogButtonSizer_AddButton(*args
, **kwargs
)
10365 def Realize(*args
, **kwargs
):
10369 This funciton needs to be called after all the buttons have been added
10370 to the sizer. It will reorder them and position them in a platform
10373 return _core_
.StdDialogButtonSizer_Realize(*args
, **kwargs
)
10375 def SetAffirmativeButton(*args
, **kwargs
):
10376 """SetAffirmativeButton(self, wxButton button)"""
10377 return _core_
.StdDialogButtonSizer_SetAffirmativeButton(*args
, **kwargs
)
10379 def SetNegativeButton(*args
, **kwargs
):
10380 """SetNegativeButton(self, wxButton button)"""
10381 return _core_
.StdDialogButtonSizer_SetNegativeButton(*args
, **kwargs
)
10383 def SetCancelButton(*args
, **kwargs
):
10384 """SetCancelButton(self, wxButton button)"""
10385 return _core_
.StdDialogButtonSizer_SetCancelButton(*args
, **kwargs
)
10387 def GetAffirmativeButton(*args
, **kwargs
):
10388 """GetAffirmativeButton(self) -> wxButton"""
10389 return _core_
.StdDialogButtonSizer_GetAffirmativeButton(*args
, **kwargs
)
10391 def GetApplyButton(*args
, **kwargs
):
10392 """GetApplyButton(self) -> wxButton"""
10393 return _core_
.StdDialogButtonSizer_GetApplyButton(*args
, **kwargs
)
10395 def GetNegativeButton(*args
, **kwargs
):
10396 """GetNegativeButton(self) -> wxButton"""
10397 return _core_
.StdDialogButtonSizer_GetNegativeButton(*args
, **kwargs
)
10399 def GetCancelButton(*args
, **kwargs
):
10400 """GetCancelButton(self) -> wxButton"""
10401 return _core_
.StdDialogButtonSizer_GetCancelButton(*args
, **kwargs
)
10403 def GetHelpButton(*args
, **kwargs
):
10404 """GetHelpButton(self) -> wxButton"""
10405 return _core_
.StdDialogButtonSizer_GetHelpButton(*args
, **kwargs
)
10408 class StdDialogButtonSizerPtr(StdDialogButtonSizer
):
10409 def __init__(self
, this
):
10411 if not hasattr(self
,"thisown"): self
.thisown
= 0
10412 self
.__class
__ = StdDialogButtonSizer
10413 _core_
.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr
)
10415 #---------------------------------------------------------------------------
10417 class GBPosition(object):
10419 This class represents the position of an item in a virtual grid of
10420 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10421 typemaps that will automatically convert from a 2-element sequence of
10422 integers to a wx.GBPosition, so you can use the more pythonic
10423 representation of the position nearly transparently in Python code.
10425 def __repr__(self
):
10426 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10427 def __init__(self
, *args
, **kwargs
):
10429 __init__(self, int row=0, int col=0) -> GBPosition
10431 This class represents the position of an item in a virtual grid of
10432 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10433 typemaps that will automatically convert from a 2-element sequence of
10434 integers to a wx.GBPosition, so you can use the more pythonic
10435 representation of the position nearly transparently in Python code.
10437 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
10438 self
.this
= newobj
.this
10441 def GetRow(*args
, **kwargs
):
10442 """GetRow(self) -> int"""
10443 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
10445 def GetCol(*args
, **kwargs
):
10446 """GetCol(self) -> int"""
10447 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
10449 def SetRow(*args
, **kwargs
):
10450 """SetRow(self, int row)"""
10451 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
10453 def SetCol(*args
, **kwargs
):
10454 """SetCol(self, int col)"""
10455 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
10457 def __eq__(*args
, **kwargs
):
10458 """__eq__(self, GBPosition other) -> bool"""
10459 return _core_
.GBPosition___eq__(*args
, **kwargs
)
10461 def __ne__(*args
, **kwargs
):
10462 """__ne__(self, GBPosition other) -> bool"""
10463 return _core_
.GBPosition___ne__(*args
, **kwargs
)
10465 def Set(*args
, **kwargs
):
10466 """Set(self, int row=0, int col=0)"""
10467 return _core_
.GBPosition_Set(*args
, **kwargs
)
10469 def Get(*args
, **kwargs
):
10470 """Get(self) -> PyObject"""
10471 return _core_
.GBPosition_Get(*args
, **kwargs
)
10473 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10474 def __str__(self
): return str(self
.Get())
10475 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
10476 def __len__(self
): return len(self
.Get())
10477 def __getitem__(self
, index
): return self
.Get()[index
]
10478 def __setitem__(self
, index
, val
):
10479 if index
== 0: self
.SetRow(val
)
10480 elif index
== 1: self
.SetCol(val
)
10481 else: raise IndexError
10482 def __nonzero__(self
): return self
.Get() != (0,0)
10483 __safe_for_unpickling__
= True
10484 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
10486 row
= property(GetRow
, SetRow
)
10487 col
= property(GetCol
, SetCol
)
10490 class GBPositionPtr(GBPosition
):
10491 def __init__(self
, this
):
10493 if not hasattr(self
,"thisown"): self
.thisown
= 0
10494 self
.__class
__ = GBPosition
10495 _core_
.GBPosition_swigregister(GBPositionPtr
)
10497 class GBSpan(object):
10499 This class is used to hold the row and column spanning attributes of
10500 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10501 automatically convert from a 2-element sequence of integers to a
10502 wx.GBSpan, so you can use the more pythonic representation of the span
10503 nearly transparently in Python code.
10506 def __repr__(self
):
10507 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10508 def __init__(self
, *args
, **kwargs
):
10510 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10512 Construct a new wxGBSpan, optionally setting the rowspan and
10513 colspan. The default is (1,1). (Meaning that the item occupies one
10514 cell in each direction.
10516 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
10517 self
.this
= newobj
.this
10520 def GetRowspan(*args
, **kwargs
):
10521 """GetRowspan(self) -> int"""
10522 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
10524 def GetColspan(*args
, **kwargs
):
10525 """GetColspan(self) -> int"""
10526 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
10528 def SetRowspan(*args
, **kwargs
):
10529 """SetRowspan(self, int rowspan)"""
10530 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
10532 def SetColspan(*args
, **kwargs
):
10533 """SetColspan(self, int colspan)"""
10534 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
10536 def __eq__(*args
, **kwargs
):
10537 """__eq__(self, GBSpan other) -> bool"""
10538 return _core_
.GBSpan___eq__(*args
, **kwargs
)
10540 def __ne__(*args
, **kwargs
):
10541 """__ne__(self, GBSpan other) -> bool"""
10542 return _core_
.GBSpan___ne__(*args
, **kwargs
)
10544 def Set(*args
, **kwargs
):
10545 """Set(self, int rowspan=1, int colspan=1)"""
10546 return _core_
.GBSpan_Set(*args
, **kwargs
)
10548 def Get(*args
, **kwargs
):
10549 """Get(self) -> PyObject"""
10550 return _core_
.GBSpan_Get(*args
, **kwargs
)
10552 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10553 def __str__(self
): return str(self
.Get())
10554 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
10555 def __len__(self
): return len(self
.Get())
10556 def __getitem__(self
, index
): return self
.Get()[index
]
10557 def __setitem__(self
, index
, val
):
10558 if index
== 0: self
.SetRowspan(val
)
10559 elif index
== 1: self
.SetColspan(val
)
10560 else: raise IndexError
10561 def __nonzero__(self
): return self
.Get() != (0,0)
10562 __safe_for_unpickling__
= True
10563 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
10565 rowspan
= property(GetRowspan
, SetRowspan
)
10566 colspan
= property(GetColspan
, SetColspan
)
10569 class GBSpanPtr(GBSpan
):
10570 def __init__(self
, this
):
10572 if not hasattr(self
,"thisown"): self
.thisown
= 0
10573 self
.__class
__ = GBSpan
10574 _core_
.GBSpan_swigregister(GBSpanPtr
)
10576 class GBSizerItem(SizerItem
):
10578 The wx.GBSizerItem class is used to track the additional data about
10579 items in a `wx.GridBagSizer` such as the item's position in the grid
10580 and how many rows or columns it spans.
10583 def __repr__(self
):
10584 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10585 def __init__(self
, *args
, **kwargs
):
10587 __init__(self) -> GBSizerItem
10589 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10590 size will need to be set, as well as a position and span before this
10591 item can be used in a Sizer.
10593 You will probably never need to create a wx.GBSizerItem directly as they
10594 are created automatically when the sizer's Add method is called.
10596 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
10597 self
.this
= newobj
.this
10600 def GetPos(*args
, **kwargs
):
10602 GetPos(self) -> GBPosition
10604 Get the grid position of the item
10606 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
10608 def GetPosTuple(self
): return self
.GetPos().Get()
10609 def GetSpan(*args
, **kwargs
):
10611 GetSpan(self) -> GBSpan
10613 Get the row and column spanning of the item
10615 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
10617 def GetSpanTuple(self
): return self
.GetSpan().Get()
10618 def SetPos(*args
, **kwargs
):
10620 SetPos(self, GBPosition pos) -> bool
10622 If the item is already a member of a sizer then first ensure that
10623 there is no other item that would intersect with this one at the new
10624 position, then set the new position. Returns True if the change is
10625 successful and after the next Layout() the item will be moved.
10627 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
10629 def SetSpan(*args
, **kwargs
):
10631 SetSpan(self, GBSpan span) -> bool
10633 If the item is already a member of a sizer then first ensure that
10634 there is no other item that would intersect with this one with its new
10635 spanning size, then set the new spanning. Returns True if the change
10636 is successful and after the next Layout() the item will be resized.
10639 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
10641 def Intersects(*args
, **kwargs
):
10643 Intersects(self, GBSizerItem other) -> bool
10645 Returns True if this item and the other item instersect.
10647 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
10649 def IntersectsPos(*args
, **kwargs
):
10651 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10653 Returns True if the given pos/span would intersect with this item.
10655 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
10657 def GetEndPos(*args
, **kwargs
):
10659 GetEndPos(self) -> GBPosition
10661 Get the row and column of the endpoint of this item.
10663 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
10665 def GetGBSizer(*args
, **kwargs
):
10667 GetGBSizer(self) -> GridBagSizer
10669 Get the sizer this item is a member of.
10671 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
10673 def SetGBSizer(*args
, **kwargs
):
10675 SetGBSizer(self, GridBagSizer sizer)
10677 Set the sizer this item is a member of.
10679 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
10682 class GBSizerItemPtr(GBSizerItem
):
10683 def __init__(self
, this
):
10685 if not hasattr(self
,"thisown"): self
.thisown
= 0
10686 self
.__class
__ = GBSizerItem
10687 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
10688 DefaultSpan
= cvar
.DefaultSpan
10690 def GBSizerItemWindow(*args
, **kwargs
):
10692 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10693 int border, PyObject userData=None) -> GBSizerItem
10695 Construct a `wx.GBSizerItem` for a window.
10697 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
10701 def GBSizerItemSizer(*args
, **kwargs
):
10703 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10704 int border, PyObject userData=None) -> GBSizerItem
10706 Construct a `wx.GBSizerItem` for a sizer
10708 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
10712 def GBSizerItemSpacer(*args
, **kwargs
):
10714 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10715 int flag, int border, PyObject userData=None) -> GBSizerItem
10717 Construct a `wx.GBSizerItem` for a spacer.
10719 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
10723 class GridBagSizer(FlexGridSizer
):
10725 A `wx.Sizer` that can lay out items in a virtual grid like a
10726 `wx.FlexGridSizer` but in this case explicit positioning of the items
10727 is allowed using `wx.GBPosition`, and items can optionally span more
10728 than one row and/or column using `wx.GBSpan`. The total size of the
10729 virtual grid is determined by the largest row and column that items are
10730 positioned at, adjusted for spanning.
10733 def __repr__(self
):
10734 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10735 def __init__(self
, *args
, **kwargs
):
10737 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10739 Constructor, with optional parameters to specify the gap between the
10742 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
10743 self
.this
= newobj
.this
10746 self
._setOORInfo
(self
)
10748 def Add(*args
, **kwargs
):
10750 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10751 int border=0, userData=None) -> wx.GBSizerItem
10753 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10754 more than one row or column as specified with *span*. The remaining
10755 args behave similarly to `wx.Sizer.Add`.
10757 Returns True if the item was successfully placed at the given cell
10758 position, False if something was already there.
10761 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
10763 def AddItem(*args
, **kwargs
):
10765 Add(self, GBSizerItem item) -> wx.GBSizerItem
10767 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10768 the item was successfully placed at its given cell position, False if
10769 something was already there.
10771 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
10773 def GetCellSize(*args
, **kwargs
):
10775 GetCellSize(self, int row, int col) -> Size
10777 Get the size of the specified cell, including hgap and
10778 vgap. Only valid after a Layout.
10780 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
10782 def GetEmptyCellSize(*args
, **kwargs
):
10784 GetEmptyCellSize(self) -> Size
10786 Get the size used for cells in the grid with no item.
10788 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
10790 def SetEmptyCellSize(*args
, **kwargs
):
10792 SetEmptyCellSize(self, Size sz)
10794 Set the size used for cells in the grid with no item.
10796 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
10798 def GetItemPosition(*args
):
10800 GetItemPosition(self, item) -> GBPosition
10802 Get the grid position of the specified *item* where *item* is either a
10803 window or subsizer that is a member of this sizer, or a zero-based
10806 return _core_
.GridBagSizer_GetItemPosition(*args
)
10808 def SetItemPosition(*args
):
10810 SetItemPosition(self, item, GBPosition pos) -> bool
10812 Set the grid position of the specified *item* where *item* is either a
10813 window or subsizer that is a member of this sizer, or a zero-based
10814 index of an item. Returns True on success. If the move is not
10815 allowed (because an item is already there) then False is returned.
10818 return _core_
.GridBagSizer_SetItemPosition(*args
)
10820 def GetItemSpan(*args
):
10822 GetItemSpan(self, item) -> GBSpan
10824 Get the row/col spanning of the specified *item* where *item* is
10825 either a window or subsizer that is a member of this sizer, or a
10826 zero-based index of an item.
10828 return _core_
.GridBagSizer_GetItemSpan(*args
)
10830 def SetItemSpan(*args
):
10832 SetItemSpan(self, item, GBSpan span) -> bool
10834 Set the row/col spanning of the specified *item* where *item* is
10835 either a window or subsizer that is a member of this sizer, or a
10836 zero-based index of an item. Returns True on success. If the move is
10837 not allowed (because an item is already there) then False is returned.
10839 return _core_
.GridBagSizer_SetItemSpan(*args
)
10841 def FindItem(*args
):
10843 FindItem(self, item) -> GBSizerItem
10845 Find the sizer item for the given window or subsizer, returns None if
10846 not found. (non-recursive)
10848 return _core_
.GridBagSizer_FindItem(*args
)
10850 def FindItemAtPosition(*args
, **kwargs
):
10852 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10854 Return the sizer item for the given grid cell, or None if there is no
10855 item at that position. (non-recursive)
10857 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
10859 def FindItemAtPoint(*args
, **kwargs
):
10861 FindItemAtPoint(self, Point pt) -> GBSizerItem
10863 Return the sizer item located at the point given in *pt*, or None if
10864 there is no item at that point. The (x,y) coordinates in pt correspond
10865 to the client coordinates of the window using the sizer for
10866 layout. (non-recursive)
10868 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
10870 def CheckForIntersection(*args
, **kwargs
):
10872 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10874 Look at all items and see if any intersect (or would overlap) the
10875 given *item*. Returns True if so, False if there would be no overlap.
10876 If an *excludeItem* is given then it will not be checked for
10877 intersection, for example it may be the item we are checking the
10881 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
10883 def CheckForIntersectionPos(*args
, **kwargs
):
10885 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10887 Look at all items and see if any intersect (or would overlap) the
10888 given position and span. Returns True if so, False if there would be
10889 no overlap. If an *excludeItem* is given then it will not be checked
10890 for intersection, for example it may be the item we are checking the
10893 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
10896 class GridBagSizerPtr(GridBagSizer
):
10897 def __init__(self
, this
):
10899 if not hasattr(self
,"thisown"): self
.thisown
= 0
10900 self
.__class
__ = GridBagSizer
10901 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
10903 #---------------------------------------------------------------------------
10907 Right
= _core_
.Right
10908 Bottom
= _core_
.Bottom
10909 Width
= _core_
.Width
10910 Height
= _core_
.Height
10911 Centre
= _core_
.Centre
10912 Center
= _core_
.Center
10913 CentreX
= _core_
.CentreX
10914 CentreY
= _core_
.CentreY
10915 Unconstrained
= _core_
.Unconstrained
10917 PercentOf
= _core_
.PercentOf
10918 Above
= _core_
.Above
10919 Below
= _core_
.Below
10920 LeftOf
= _core_
.LeftOf
10921 RightOf
= _core_
.RightOf
10922 SameAs
= _core_
.SameAs
10923 Absolute
= _core_
.Absolute
10924 class IndividualLayoutConstraint(Object
):
10926 Objects of this class are stored in the `wx.LayoutConstraints` class as
10927 one of eight possible constraints that a window can be involved in.
10928 You will never need to create an instance of
10929 wx.IndividualLayoutConstraint, rather you should create a
10930 `wx.LayoutConstraints` instance and use the individual contstraints
10933 def __init__(self
): raise RuntimeError, "No constructor defined"
10934 def __repr__(self
):
10935 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10936 def Set(*args
, **kwargs
):
10938 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10940 Sets the properties of the constraint. Normally called by one of the
10941 convenience functions such as Above, RightOf, SameAs.
10943 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
10945 def LeftOf(*args
, **kwargs
):
10947 LeftOf(self, Window sibling, int marg=0)
10949 Constrains this edge to be to the left of the given window, with an
10950 optional margin. Implicitly, this is relative to the left edge of the
10953 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
10955 def RightOf(*args
, **kwargs
):
10957 RightOf(self, Window sibling, int marg=0)
10959 Constrains this edge to be to the right of the given window, with an
10960 optional margin. Implicitly, this is relative to the right edge of the
10963 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
10965 def Above(*args
, **kwargs
):
10967 Above(self, Window sibling, int marg=0)
10969 Constrains this edge to be above the given window, with an optional
10970 margin. Implicitly, this is relative to the top edge of the other
10973 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
10975 def Below(*args
, **kwargs
):
10977 Below(self, Window sibling, int marg=0)
10979 Constrains this edge to be below the given window, with an optional
10980 margin. Implicitly, this is relative to the bottom edge of the other
10983 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
10985 def SameAs(*args
, **kwargs
):
10987 SameAs(self, Window otherW, int edge, int marg=0)
10989 Constrains this edge or dimension to be to the same as the edge of the
10990 given window, with an optional margin.
10992 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
10994 def PercentOf(*args
, **kwargs
):
10996 PercentOf(self, Window otherW, int wh, int per)
10998 Constrains this edge or dimension to be to a percentage of the given
10999 window, with an optional margin.
11001 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
11003 def Absolute(*args
, **kwargs
):
11005 Absolute(self, int val)
11007 Constrains this edge or dimension to be the given absolute value.
11009 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
11011 def Unconstrained(*args
, **kwargs
):
11013 Unconstrained(self)
11015 Sets this edge or dimension to be unconstrained, that is, dependent on
11016 other edges and dimensions from which this value can be deduced.
11018 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
11020 def AsIs(*args
, **kwargs
):
11024 Sets this edge or constraint to be whatever the window's value is at
11025 the moment. If either of the width and height constraints are *as is*,
11026 the window will not be resized, but moved instead. This is important
11027 when considering panel items which are intended to have a default
11028 size, such as a button, which may take its size from the size of the
11031 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
11033 def GetOtherWindow(*args
, **kwargs
):
11034 """GetOtherWindow(self) -> Window"""
11035 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
11037 def GetMyEdge(*args
, **kwargs
):
11038 """GetMyEdge(self) -> int"""
11039 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
11041 def SetEdge(*args
, **kwargs
):
11042 """SetEdge(self, int which)"""
11043 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
11045 def SetValue(*args
, **kwargs
):
11046 """SetValue(self, int v)"""
11047 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
11049 def GetMargin(*args
, **kwargs
):
11050 """GetMargin(self) -> int"""
11051 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
11053 def SetMargin(*args
, **kwargs
):
11054 """SetMargin(self, int m)"""
11055 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
11057 def GetValue(*args
, **kwargs
):
11058 """GetValue(self) -> int"""
11059 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
11061 def GetPercent(*args
, **kwargs
):
11062 """GetPercent(self) -> int"""
11063 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
11065 def GetOtherEdge(*args
, **kwargs
):
11066 """GetOtherEdge(self) -> int"""
11067 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
11069 def GetDone(*args
, **kwargs
):
11070 """GetDone(self) -> bool"""
11071 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
11073 def SetDone(*args
, **kwargs
):
11074 """SetDone(self, bool d)"""
11075 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
11077 def GetRelationship(*args
, **kwargs
):
11078 """GetRelationship(self) -> int"""
11079 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
11081 def SetRelationship(*args
, **kwargs
):
11082 """SetRelationship(self, int r)"""
11083 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
11085 def ResetIfWin(*args
, **kwargs
):
11087 ResetIfWin(self, Window otherW) -> bool
11089 Reset constraint if it mentions otherWin
11091 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
11093 def SatisfyConstraint(*args
, **kwargs
):
11095 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11097 Try to satisfy constraint
11099 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
11101 def GetEdge(*args
, **kwargs
):
11103 GetEdge(self, int which, Window thisWin, Window other) -> int
11105 Get the value of this edge or dimension, or if this
11106 is not determinable, -1.
11108 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
11111 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
11112 def __init__(self
, this
):
11114 if not hasattr(self
,"thisown"): self
.thisown
= 0
11115 self
.__class
__ = IndividualLayoutConstraint
11116 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
11118 class LayoutConstraints(Object
):
11120 **Note:** constraints are now deprecated and you should use sizers
11123 Objects of this class can be associated with a window to define its
11124 layout constraints, with respect to siblings or its parent.
11126 The class consists of the following eight constraints of class
11127 wx.IndividualLayoutConstraint, some or all of which should be accessed
11128 directly to set the appropriate constraints.
11130 * left: represents the left hand edge of the window
11131 * right: represents the right hand edge of the window
11132 * top: represents the top edge of the window
11133 * bottom: represents the bottom edge of the window
11134 * width: represents the width of the window
11135 * height: represents the height of the window
11136 * centreX: represents the horizontal centre point of the window
11137 * centreY: represents the vertical centre point of the window
11139 Most constraints are initially set to have the relationship
11140 wxUnconstrained, which means that their values should be calculated by
11141 looking at known constraints. The exceptions are width and height,
11142 which are set to wxAsIs to ensure that if the user does not specify a
11143 constraint, the existing width and height will be used, to be
11144 compatible with panel items which often have take a default size. If
11145 the constraint is ``wx.AsIs``, the dimension will not be changed.
11147 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11150 def __repr__(self
):
11151 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11152 left
= property(_core_
.LayoutConstraints_left_get
)
11153 top
= property(_core_
.LayoutConstraints_top_get
)
11154 right
= property(_core_
.LayoutConstraints_right_get
)
11155 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
11156 width
= property(_core_
.LayoutConstraints_width_get
)
11157 height
= property(_core_
.LayoutConstraints_height_get
)
11158 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
11159 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
11160 def __init__(self
, *args
, **kwargs
):
11161 """__init__(self) -> LayoutConstraints"""
11162 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
11163 self
.this
= newobj
.this
11166 def SatisfyConstraints(*args
, **kwargs
):
11167 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11168 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
11170 def AreSatisfied(*args
, **kwargs
):
11171 """AreSatisfied(self) -> bool"""
11172 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
11175 class LayoutConstraintsPtr(LayoutConstraints
):
11176 def __init__(self
, this
):
11178 if not hasattr(self
,"thisown"): self
.thisown
= 0
11179 self
.__class
__ = LayoutConstraints
11180 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
11182 #----------------------------------------------------------------------------
11184 # Use Python's bool constants if available, make some if not
11188 __builtins__
.True = 1==1
11189 __builtins__
.False = 1==0
11190 def bool(value
): return not not value
11191 __builtins__
.bool = bool
11195 # workarounds for bad wxRTTI names
11196 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
11197 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
11198 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
11201 #----------------------------------------------------------------------------
11202 # Load version numbers from __version__... Ensure that major and minor
11203 # versions are the same for both wxPython and wxWidgets.
11205 from __version__
import *
11206 __version__
= VERSION_STRING
11208 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
11209 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
11210 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
11212 warnings
.warn("wxPython/wxWidgets release number mismatch")
11214 #----------------------------------------------------------------------------
11216 # Set the default string<-->unicode conversion encoding from the
11217 # locale. This encoding is used when string or unicode objects need
11218 # to be converted in order to pass them to wxWidgets. Please be aware
11219 # that the default encoding within the same locale may be slightly
11220 # different on different platforms. For example, please see
11221 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11222 # between the common latin/roman encodings.
11224 default
= locale
.getdefaultlocale()[1]
11226 wx
.SetDefaultPyEncoding(default
)
11230 #----------------------------------------------------------------------------
11232 class PyDeadObjectError(AttributeError):
11235 class _wxPyDeadObject(object):
11237 Instances of wx objects that are OOR capable will have their __class__
11238 changed to this class when the C++ object is deleted. This should help
11239 prevent crashes due to referencing a bogus C++ pointer.
11241 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11242 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11244 def __repr__(self
):
11245 if not hasattr(self
, "_name"):
11246 self
._name
= "[unknown]"
11247 return self
.reprStr
% self
._name
11249 def __getattr__(self
, *args
):
11250 if not hasattr(self
, "_name"):
11251 self
._name
= "[unknown]"
11252 raise PyDeadObjectError(self
.attrStr
% self
._name
)
11254 def __nonzero__(self
):
11259 class PyUnbornObjectError(AttributeError):
11262 class _wxPyUnbornObject(object):
11264 Some stock objects are created when the wx._core module is
11265 imported, but their C++ instance is not created until the wx.App
11266 object is created and initialized. These object instances will
11267 temporarily have their __class__ changed to this class so an
11268 exception will be raised if they are used before the C++ instance
11272 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11273 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
11275 def __repr__(self
):
11276 #if not hasattr(self, "_name"):
11277 # self._name = "[unknown]"
11278 return self
.reprStr
#% self._name
11280 def __getattr__(self
, *args
):
11281 #if not hasattr(self, "_name"):
11282 # self._name = "[unknown]"
11283 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
11285 def __nonzero__(self
):
11289 #----------------------------------------------------------------------------
11291 def CallAfter(callable, *args
, **kw
):
11293 Call the specified function after the current and pending event
11294 handlers have been completed. This is also good for making GUI
11295 method calls from non-GUI threads. Any extra positional or
11296 keyword args are passed on to the callable when it is called.
11298 :see: `wx.FutureCall`
11301 assert app
is not None, 'No wx.App created yet'
11303 if not hasattr(app
, "_CallAfterId"):
11304 app
._CallAfterId
= wx
.NewEventType()
11305 app
.Connect(-1, -1, app
._CallAfterId
,
11306 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
11308 evt
.SetEventType(app
._CallAfterId
)
11309 evt
.callable = callable
11312 wx
.PostEvent(app
, evt
)
11314 #----------------------------------------------------------------------------
11319 A convenience class for `wx.Timer`, that calls the given callable
11320 object once after the given amount of milliseconds, passing any
11321 positional or keyword args. The return value of the callable is
11322 availbale after it has been run with the `GetResult` method.
11324 If you don't need to get the return value or restart the timer
11325 then there is no need to hold a reference to this object. It will
11326 hold a reference to itself while the timer is running (the timer
11327 has a reference to self.Notify) but the cycle will be broken when
11328 the timer completes, automatically cleaning up the wx.FutureCall
11331 :see: `wx.CallAfter`
11333 def __init__(self
, millis
, callable, *args
, **kwargs
):
11334 self
.millis
= millis
11335 self
.callable = callable
11336 self
.SetArgs(*args
, **kwargs
)
11338 self
.running
= False
11339 self
.hasRun
= False
11348 def Start(self
, millis
=None, *args
, **kwargs
):
11350 (Re)start the timer
11352 self
.hasRun
= False
11353 if millis
is not None:
11354 self
.millis
= millis
11356 self
.SetArgs(*args
, **kwargs
)
11358 self
.timer
= wx
.PyTimer(self
.Notify
)
11359 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
11360 self
.running
= True
11366 Stop and destroy the timer.
11368 if self
.timer
is not None:
11373 def GetInterval(self
):
11374 if self
.timer
is not None:
11375 return self
.timer
.GetInterval()
11380 def IsRunning(self
):
11381 return self
.timer
is not None and self
.timer
.IsRunning()
11384 def SetArgs(self
, *args
, **kwargs
):
11386 (Re)set the args passed to the callable object. This is
11387 useful in conjunction with Restart if you want to schedule a
11388 new call to the same callable object but with different
11392 self
.kwargs
= kwargs
11398 def GetResult(self
):
11403 The timer has expired so call the callable.
11405 if self
.callable and getattr(self
.callable, 'im_self', True):
11407 self
.running
= False
11408 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
11410 if not self
.running
:
11411 # if it wasn't restarted, then cleanup
11412 wx
.CallAfter(self
.Stop
)
11416 #----------------------------------------------------------------------------
11417 # Control which items in this module should be documented by epydoc.
11418 # We allow only classes and functions, which will help reduce the size
11419 # of the docs by filtering out the zillions of constants, EVT objects,
11420 # and etc that don't make much sense by themselves, but are instead
11421 # documented (or will be) as part of the classes/functions/methods
11422 # where they should be used.
11426 A filter for epydoc that only allows non-Ptr classes and
11427 fucntions, in order to reduce the clutter in the API docs.
11429 def __init__(self
, globals):
11430 self
._globals
= globals
11432 def __call__(self
, name
):
11434 obj
= self
._globals
.get(name
, None)
11435 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
11437 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
11441 #----------------------------------------------------------------------------
11442 #----------------------------------------------------------------------------
11444 # Import other modules in this package that should show up in the
11445 # "core" wx namespace
11447 from _windows
import *
11448 from _controls
import *
11449 from _misc
import *
11452 # Fixup the stock objects since they can't be used yet. (They will be
11453 # restored in wx.PyApp.OnInit.)
11454 _core_
._wxPyFixStockObjects
()
11456 #----------------------------------------------------------------------------
11457 #----------------------------------------------------------------------------