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 GetTopLeft(*args
, **kwargs
):
1139 """GetTopLeft(self) -> Point"""
1140 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1142 def SetTopLeft(*args
, **kwargs
):
1143 """SetTopLeft(self, Point p)"""
1144 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1146 def GetBottomRight(*args
, **kwargs
):
1147 """GetBottomRight(self) -> Point"""
1148 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1150 def SetBottomRight(*args
, **kwargs
):
1151 """SetBottomRight(self, Point p)"""
1152 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1154 def GetLeft(*args
, **kwargs
):
1155 """GetLeft(self) -> int"""
1156 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1158 def GetTop(*args
, **kwargs
):
1159 """GetTop(self) -> int"""
1160 return _core_
.Rect_GetTop(*args
, **kwargs
)
1162 def GetBottom(*args
, **kwargs
):
1163 """GetBottom(self) -> int"""
1164 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1166 def GetRight(*args
, **kwargs
):
1167 """GetRight(self) -> int"""
1168 return _core_
.Rect_GetRight(*args
, **kwargs
)
1170 def SetLeft(*args
, **kwargs
):
1171 """SetLeft(self, int left)"""
1172 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1174 def SetRight(*args
, **kwargs
):
1175 """SetRight(self, int right)"""
1176 return _core_
.Rect_SetRight(*args
, **kwargs
)
1178 def SetTop(*args
, **kwargs
):
1179 """SetTop(self, int top)"""
1180 return _core_
.Rect_SetTop(*args
, **kwargs
)
1182 def SetBottom(*args
, **kwargs
):
1183 """SetBottom(self, int bottom)"""
1184 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1186 position
= property(GetPosition
, SetPosition
)
1187 size
= property(GetSize
, SetSize
)
1188 left
= property(GetLeft
, SetLeft
)
1189 right
= property(GetRight
, SetRight
)
1190 top
= property(GetTop
, SetTop
)
1191 bottom
= property(GetBottom
, SetBottom
)
1193 def Inflate(*args
, **kwargs
):
1195 Inflate(self, int dx, int dy) -> Rect
1197 Increase the rectangle size by dx in x direction and dy in y
1198 direction. Both (or one of) parameters may be negative to decrease the
1201 return _core_
.Rect_Inflate(*args
, **kwargs
)
1203 def Deflate(*args
, **kwargs
):
1205 Deflate(self, int dx, int dy) -> Rect
1207 Decrease the rectangle size by dx in x direction and dy in y
1208 direction. Both (or one of) parameters may be negative to increase the
1209 rectngle size. This method is the opposite of Inflate.
1211 return _core_
.Rect_Deflate(*args
, **kwargs
)
1213 def OffsetXY(*args
, **kwargs
):
1215 OffsetXY(self, int dx, int dy)
1217 Moves the rectangle by the specified offset. If dx is positive, the
1218 rectangle is moved to the right, if dy is positive, it is moved to the
1219 bottom, otherwise it is moved to the left or top respectively.
1221 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1223 def Offset(*args
, **kwargs
):
1225 Offset(self, Point pt)
1227 Same as OffsetXY but uses dx,dy from Point
1229 return _core_
.Rect_Offset(*args
, **kwargs
)
1231 def Intersect(*args
, **kwargs
):
1233 Intersect(self, Rect rect) -> Rect
1235 Returns the intersectsion of this rectangle and rect.
1237 return _core_
.Rect_Intersect(*args
, **kwargs
)
1239 def Union(*args
, **kwargs
):
1241 Union(self, Rect rect) -> Rect
1243 Returns the union of this rectangle and rect.
1245 return _core_
.Rect_Union(*args
, **kwargs
)
1247 def __add__(*args
, **kwargs
):
1249 __add__(self, Rect rect) -> Rect
1251 Add the properties of rect to this rectangle and return the result.
1253 return _core_
.Rect___add__(*args
, **kwargs
)
1255 def __iadd__(*args
, **kwargs
):
1257 __iadd__(self, Rect rect) -> Rect
1259 Add the properties of rect to this rectangle, updating this rectangle.
1261 return _core_
.Rect___iadd__(*args
, **kwargs
)
1263 def __eq__(*args
, **kwargs
):
1265 __eq__(self, Rect rect) -> bool
1269 return _core_
.Rect___eq__(*args
, **kwargs
)
1271 def __ne__(*args
, **kwargs
):
1273 __ne__(self, Rect rect) -> bool
1275 Test for inequality.
1277 return _core_
.Rect___ne__(*args
, **kwargs
)
1279 def InsideXY(*args
, **kwargs
):
1281 InsideXY(self, int x, int y) -> bool
1283 Return True if the point is (not strcitly) inside the rect.
1285 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1287 def Inside(*args
, **kwargs
):
1289 Inside(self, Point pt) -> bool
1291 Return True if the point is (not strcitly) inside the rect.
1293 return _core_
.Rect_Inside(*args
, **kwargs
)
1295 def Intersects(*args
, **kwargs
):
1297 Intersects(self, Rect rect) -> bool
1299 Returns True if the rectangles have a non empty intersection.
1301 return _core_
.Rect_Intersects(*args
, **kwargs
)
1303 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1304 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1305 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1306 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1307 def Set(*args
, **kwargs
):
1309 Set(self, int x=0, int y=0, int width=0, int height=0)
1311 Set all rectangle properties.
1313 return _core_
.Rect_Set(*args
, **kwargs
)
1315 def Get(*args
, **kwargs
):
1317 Get() -> (x,y,width,height)
1319 Return the rectangle properties as a tuple.
1321 return _core_
.Rect_Get(*args
, **kwargs
)
1323 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1324 def __str__(self
): return str(self
.Get())
1325 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1326 def __len__(self
): return len(self
.Get())
1327 def __getitem__(self
, index
): return self
.Get()[index
]
1328 def __setitem__(self
, index
, val
):
1329 if index
== 0: self
.x
= val
1330 elif index
== 1: self
.y
= val
1331 elif index
== 2: self
.width
= val
1332 elif index
== 3: self
.height
= val
1333 else: raise IndexError
1334 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1335 __safe_for_unpickling__
= True
1336 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1339 class RectPtr(Rect
):
1340 def __init__(self
, this
):
1342 if not hasattr(self
,"thisown"): self
.thisown
= 0
1343 self
.__class
__ = Rect
1344 _core_
.Rect_swigregister(RectPtr
)
1346 def RectPP(*args
, **kwargs
):
1348 RectPP(Point topLeft, Point bottomRight) -> Rect
1350 Create a new Rect object from Points representing two corners.
1352 val
= _core_
.new_RectPP(*args
, **kwargs
)
1356 def RectPS(*args
, **kwargs
):
1358 RectPS(Point pos, Size size) -> Rect
1360 Create a new Rect from a position and size.
1362 val
= _core_
.new_RectPS(*args
, **kwargs
)
1366 def RectS(*args
, **kwargs
):
1368 RectS(Size size) -> Rect
1370 Create a new Rect from a size only.
1372 val
= _core_
.new_RectS(*args
, **kwargs
)
1377 def IntersectRect(*args
, **kwargs
):
1379 IntersectRect(Rect r1, Rect r2) -> Rect
1381 Calculate and return the intersection of r1 and r2.
1383 return _core_
.IntersectRect(*args
, **kwargs
)
1384 #---------------------------------------------------------------------------
1386 class Point2D(object):
1388 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1389 with floating point values.
1392 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1393 def __init__(self
, *args
, **kwargs
):
1395 __init__(self, double x=0.0, double y=0.0) -> Point2D
1397 Create a w.Point2D object.
1399 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1400 self
.this
= newobj
.this
1403 def GetFloor(*args
, **kwargs
):
1409 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1411 def GetRounded(*args
, **kwargs
):
1413 GetRounded() -> (x,y)
1417 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1419 def GetVectorLength(*args
, **kwargs
):
1420 """GetVectorLength(self) -> double"""
1421 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1423 def GetVectorAngle(*args
, **kwargs
):
1424 """GetVectorAngle(self) -> double"""
1425 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1427 def SetVectorLength(*args
, **kwargs
):
1428 """SetVectorLength(self, double length)"""
1429 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1431 def SetVectorAngle(*args
, **kwargs
):
1432 """SetVectorAngle(self, double degrees)"""
1433 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1435 def SetPolarCoordinates(self
, angle
, length
):
1436 self
.SetVectorLength(length
)
1437 self
.SetVectorAngle(angle
)
1438 def Normalize(self
):
1439 self
.SetVectorLength(1.0)
1441 def GetDistance(*args
, **kwargs
):
1442 """GetDistance(self, Point2D pt) -> double"""
1443 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1445 def GetDistanceSquare(*args
, **kwargs
):
1446 """GetDistanceSquare(self, Point2D pt) -> double"""
1447 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1449 def GetDotProduct(*args
, **kwargs
):
1450 """GetDotProduct(self, Point2D vec) -> double"""
1451 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1453 def GetCrossProduct(*args
, **kwargs
):
1454 """GetCrossProduct(self, Point2D vec) -> double"""
1455 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1457 def __neg__(*args
, **kwargs
):
1459 __neg__(self) -> Point2D
1461 the reflection of this point
1463 return _core_
.Point2D___neg__(*args
, **kwargs
)
1465 def __iadd__(*args
, **kwargs
):
1466 """__iadd__(self, Point2D pt) -> Point2D"""
1467 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1469 def __isub__(*args
, **kwargs
):
1470 """__isub__(self, Point2D pt) -> Point2D"""
1471 return _core_
.Point2D___isub__(*args
, **kwargs
)
1473 def __imul__(*args
, **kwargs
):
1474 """__imul__(self, Point2D pt) -> Point2D"""
1475 return _core_
.Point2D___imul__(*args
, **kwargs
)
1477 def __idiv__(*args
, **kwargs
):
1478 """__idiv__(self, Point2D pt) -> Point2D"""
1479 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1481 def __eq__(*args
, **kwargs
):
1483 __eq__(self, Point2D pt) -> bool
1487 return _core_
.Point2D___eq__(*args
, **kwargs
)
1489 def __ne__(*args
, **kwargs
):
1491 __ne__(self, Point2D pt) -> bool
1495 return _core_
.Point2D___ne__(*args
, **kwargs
)
1497 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1498 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1499 def Set(*args
, **kwargs
):
1500 """Set(self, double x=0, double y=0)"""
1501 return _core_
.Point2D_Set(*args
, **kwargs
)
1503 def Get(*args
, **kwargs
):
1507 Return x and y properties as a tuple.
1509 return _core_
.Point2D_Get(*args
, **kwargs
)
1511 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1512 def __str__(self
): return str(self
.Get())
1513 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1514 def __len__(self
): return len(self
.Get())
1515 def __getitem__(self
, index
): return self
.Get()[index
]
1516 def __setitem__(self
, index
, val
):
1517 if index
== 0: self
.x
= val
1518 elif index
== 1: self
.y
= val
1519 else: raise IndexError
1520 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1521 __safe_for_unpickling__
= True
1522 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1525 class Point2DPtr(Point2D
):
1526 def __init__(self
, this
):
1528 if not hasattr(self
,"thisown"): self
.thisown
= 0
1529 self
.__class
__ = Point2D
1530 _core_
.Point2D_swigregister(Point2DPtr
)
1532 def Point2DCopy(*args
, **kwargs
):
1534 Point2DCopy(Point2D pt) -> Point2D
1536 Create a w.Point2D object.
1538 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1542 def Point2DFromPoint(*args
, **kwargs
):
1544 Point2DFromPoint(Point pt) -> Point2D
1546 Create a w.Point2D object.
1548 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1552 #---------------------------------------------------------------------------
1554 FromStart
= _core_
.FromStart
1555 FromCurrent
= _core_
.FromCurrent
1556 FromEnd
= _core_
.FromEnd
1557 class InputStream(object):
1558 """Proxy of C++ InputStream class"""
1560 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1561 def __init__(self
, *args
, **kwargs
):
1562 """__init__(self, PyObject p) -> InputStream"""
1563 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1564 self
.this
= newobj
.this
1567 def __del__(self
, destroy
=_core_
.delete_InputStream
):
1570 if self
.thisown
: destroy(self
)
1573 def close(*args
, **kwargs
):
1575 return _core_
.InputStream_close(*args
, **kwargs
)
1577 def flush(*args
, **kwargs
):
1579 return _core_
.InputStream_flush(*args
, **kwargs
)
1581 def eof(*args
, **kwargs
):
1582 """eof(self) -> bool"""
1583 return _core_
.InputStream_eof(*args
, **kwargs
)
1585 def read(*args
, **kwargs
):
1586 """read(self, int size=-1) -> PyObject"""
1587 return _core_
.InputStream_read(*args
, **kwargs
)
1589 def readline(*args
, **kwargs
):
1590 """readline(self, int size=-1) -> PyObject"""
1591 return _core_
.InputStream_readline(*args
, **kwargs
)
1593 def readlines(*args
, **kwargs
):
1594 """readlines(self, int sizehint=-1) -> PyObject"""
1595 return _core_
.InputStream_readlines(*args
, **kwargs
)
1597 def seek(*args
, **kwargs
):
1598 """seek(self, int offset, int whence=0)"""
1599 return _core_
.InputStream_seek(*args
, **kwargs
)
1601 def tell(*args
, **kwargs
):
1602 """tell(self) -> int"""
1603 return _core_
.InputStream_tell(*args
, **kwargs
)
1605 def Peek(*args
, **kwargs
):
1606 """Peek(self) -> char"""
1607 return _core_
.InputStream_Peek(*args
, **kwargs
)
1609 def GetC(*args
, **kwargs
):
1610 """GetC(self) -> char"""
1611 return _core_
.InputStream_GetC(*args
, **kwargs
)
1613 def LastRead(*args
, **kwargs
):
1614 """LastRead(self) -> size_t"""
1615 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1617 def CanRead(*args
, **kwargs
):
1618 """CanRead(self) -> bool"""
1619 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1621 def Eof(*args
, **kwargs
):
1622 """Eof(self) -> bool"""
1623 return _core_
.InputStream_Eof(*args
, **kwargs
)
1625 def Ungetch(*args
, **kwargs
):
1626 """Ungetch(self, char c) -> bool"""
1627 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1629 def SeekI(*args
, **kwargs
):
1630 """SeekI(self, long pos, int mode=FromStart) -> long"""
1631 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1633 def TellI(*args
, **kwargs
):
1634 """TellI(self) -> long"""
1635 return _core_
.InputStream_TellI(*args
, **kwargs
)
1638 class InputStreamPtr(InputStream
):
1639 def __init__(self
, this
):
1641 if not hasattr(self
,"thisown"): self
.thisown
= 0
1642 self
.__class
__ = InputStream
1643 _core_
.InputStream_swigregister(InputStreamPtr
)
1644 DefaultPosition
= cvar
.DefaultPosition
1645 DefaultSize
= cvar
.DefaultSize
1647 class OutputStream(object):
1648 """Proxy of C++ OutputStream class"""
1649 def __init__(self
): raise RuntimeError, "No constructor defined"
1651 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1652 def write(*args
, **kwargs
):
1653 """write(self, PyObject obj)"""
1654 return _core_
.OutputStream_write(*args
, **kwargs
)
1657 class OutputStreamPtr(OutputStream
):
1658 def __init__(self
, this
):
1660 if not hasattr(self
,"thisown"): self
.thisown
= 0
1661 self
.__class
__ = OutputStream
1662 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1664 #---------------------------------------------------------------------------
1666 class FSFile(Object
):
1667 """Proxy of C++ FSFile class"""
1669 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1670 def __init__(self
, *args
, **kwargs
):
1672 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1673 DateTime modif) -> FSFile
1675 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1676 self
.this
= newobj
.this
1679 self
.thisown
= 0 # It will normally be deleted by the user of the wxFileSystem
1681 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1684 if self
.thisown
: destroy(self
)
1687 def GetStream(*args
, **kwargs
):
1688 """GetStream(self) -> InputStream"""
1689 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1691 def GetMimeType(*args
, **kwargs
):
1692 """GetMimeType(self) -> String"""
1693 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1695 def GetLocation(*args
, **kwargs
):
1696 """GetLocation(self) -> String"""
1697 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1699 def GetAnchor(*args
, **kwargs
):
1700 """GetAnchor(self) -> String"""
1701 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1703 def GetModificationTime(*args
, **kwargs
):
1704 """GetModificationTime(self) -> DateTime"""
1705 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1708 class FSFilePtr(FSFile
):
1709 def __init__(self
, this
):
1711 if not hasattr(self
,"thisown"): self
.thisown
= 0
1712 self
.__class
__ = FSFile
1713 _core_
.FSFile_swigregister(FSFilePtr
)
1715 class CPPFileSystemHandler(object):
1716 """Proxy of C++ CPPFileSystemHandler class"""
1717 def __init__(self
): raise RuntimeError, "No constructor defined"
1719 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1721 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1722 def __init__(self
, this
):
1724 if not hasattr(self
,"thisown"): self
.thisown
= 0
1725 self
.__class
__ = CPPFileSystemHandler
1726 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1728 class FileSystemHandler(CPPFileSystemHandler
):
1729 """Proxy of C++ FileSystemHandler class"""
1731 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1732 def __init__(self
, *args
, **kwargs
):
1733 """__init__(self) -> FileSystemHandler"""
1734 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1735 self
.this
= newobj
.this
1738 self
._setCallbackInfo
(self
, FileSystemHandler
)
1740 def _setCallbackInfo(*args
, **kwargs
):
1741 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1742 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1744 def CanOpen(*args
, **kwargs
):
1745 """CanOpen(self, String location) -> bool"""
1746 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1748 def OpenFile(*args
, **kwargs
):
1749 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1750 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1752 def FindFirst(*args
, **kwargs
):
1753 """FindFirst(self, String spec, int flags=0) -> String"""
1754 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1756 def FindNext(*args
, **kwargs
):
1757 """FindNext(self) -> String"""
1758 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1760 def GetProtocol(*args
, **kwargs
):
1761 """GetProtocol(self, String location) -> String"""
1762 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1764 def GetLeftLocation(*args
, **kwargs
):
1765 """GetLeftLocation(self, String location) -> String"""
1766 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1768 def GetAnchor(*args
, **kwargs
):
1769 """GetAnchor(self, String location) -> String"""
1770 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1772 def GetRightLocation(*args
, **kwargs
):
1773 """GetRightLocation(self, String location) -> String"""
1774 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1776 def GetMimeTypeFromExt(*args
, **kwargs
):
1777 """GetMimeTypeFromExt(self, String location) -> String"""
1778 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1781 class FileSystemHandlerPtr(FileSystemHandler
):
1782 def __init__(self
, this
):
1784 if not hasattr(self
,"thisown"): self
.thisown
= 0
1785 self
.__class
__ = FileSystemHandler
1786 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1788 class FileSystem(Object
):
1789 """Proxy of C++ FileSystem class"""
1791 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1792 def __init__(self
, *args
, **kwargs
):
1793 """__init__(self) -> FileSystem"""
1794 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1795 self
.this
= newobj
.this
1798 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1801 if self
.thisown
: destroy(self
)
1804 def ChangePathTo(*args
, **kwargs
):
1805 """ChangePathTo(self, String location, bool is_dir=False)"""
1806 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1808 def GetPath(*args
, **kwargs
):
1809 """GetPath(self) -> String"""
1810 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1812 def OpenFile(*args
, **kwargs
):
1813 """OpenFile(self, String location) -> FSFile"""
1814 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1816 def FindFirst(*args
, **kwargs
):
1817 """FindFirst(self, String spec, int flags=0) -> String"""
1818 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1820 def FindNext(*args
, **kwargs
):
1821 """FindNext(self) -> String"""
1822 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1824 def AddHandler(*args
, **kwargs
):
1825 """AddHandler(CPPFileSystemHandler handler)"""
1826 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1828 AddHandler
= staticmethod(AddHandler
)
1829 def CleanUpHandlers(*args
, **kwargs
):
1830 """CleanUpHandlers()"""
1831 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1833 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1834 def FileNameToURL(*args
, **kwargs
):
1835 """FileNameToURL(String filename) -> String"""
1836 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1838 FileNameToURL
= staticmethod(FileNameToURL
)
1839 def URLToFileName(*args
, **kwargs
):
1840 """URLToFileName(String url) -> String"""
1841 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1843 URLToFileName
= staticmethod(URLToFileName
)
1845 class FileSystemPtr(FileSystem
):
1846 def __init__(self
, this
):
1848 if not hasattr(self
,"thisown"): self
.thisown
= 0
1849 self
.__class
__ = FileSystem
1850 _core_
.FileSystem_swigregister(FileSystemPtr
)
1852 def FileSystem_AddHandler(*args
, **kwargs
):
1853 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1854 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1856 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1857 """FileSystem_CleanUpHandlers()"""
1858 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1860 def FileSystem_FileNameToURL(*args
, **kwargs
):
1861 """FileSystem_FileNameToURL(String filename) -> String"""
1862 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1864 def FileSystem_URLToFileName(*args
, **kwargs
):
1865 """FileSystem_URLToFileName(String url) -> String"""
1866 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1868 class InternetFSHandler(CPPFileSystemHandler
):
1869 """Proxy of C++ InternetFSHandler class"""
1871 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1872 def __init__(self
, *args
, **kwargs
):
1873 """__init__(self) -> InternetFSHandler"""
1874 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1875 self
.this
= newobj
.this
1878 def CanOpen(*args
, **kwargs
):
1879 """CanOpen(self, String location) -> bool"""
1880 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1882 def OpenFile(*args
, **kwargs
):
1883 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1884 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1887 class InternetFSHandlerPtr(InternetFSHandler
):
1888 def __init__(self
, this
):
1890 if not hasattr(self
,"thisown"): self
.thisown
= 0
1891 self
.__class
__ = InternetFSHandler
1892 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1894 class ZipFSHandler(CPPFileSystemHandler
):
1895 """Proxy of C++ ZipFSHandler class"""
1897 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1898 def __init__(self
, *args
, **kwargs
):
1899 """__init__(self) -> ZipFSHandler"""
1900 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1901 self
.this
= newobj
.this
1904 def CanOpen(*args
, **kwargs
):
1905 """CanOpen(self, String location) -> bool"""
1906 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1908 def OpenFile(*args
, **kwargs
):
1909 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1910 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1912 def FindFirst(*args
, **kwargs
):
1913 """FindFirst(self, String spec, int flags=0) -> String"""
1914 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1916 def FindNext(*args
, **kwargs
):
1917 """FindNext(self) -> String"""
1918 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1921 class ZipFSHandlerPtr(ZipFSHandler
):
1922 def __init__(self
, this
):
1924 if not hasattr(self
,"thisown"): self
.thisown
= 0
1925 self
.__class
__ = ZipFSHandler
1926 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1929 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1930 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1931 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1933 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1934 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1935 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1937 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1938 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1939 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1940 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1942 Add 'file' to the memory filesystem. The dataItem parameter can
1943 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1944 arbitrary data. If a bitmap or image is used then the imgType
1945 parameter should specify what kind of image file it should be
1946 written as, wx.BITMAP_TYPE_PNG, etc.
1948 if isinstance(dataItem
, wx
.Image
):
1949 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1950 elif isinstance(dataItem
, wx
.Bitmap
):
1951 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1952 elif type(dataItem
) == str:
1953 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1955 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1957 class MemoryFSHandler(CPPFileSystemHandler
):
1958 """Proxy of C++ MemoryFSHandler class"""
1960 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1961 def __init__(self
, *args
, **kwargs
):
1962 """__init__(self) -> MemoryFSHandler"""
1963 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
1964 self
.this
= newobj
.this
1967 def RemoveFile(*args
, **kwargs
):
1968 """RemoveFile(String filename)"""
1969 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1971 RemoveFile
= staticmethod(RemoveFile
)
1972 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1973 def CanOpen(*args
, **kwargs
):
1974 """CanOpen(self, String location) -> bool"""
1975 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1977 def OpenFile(*args
, **kwargs
):
1978 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1979 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
1981 def FindFirst(*args
, **kwargs
):
1982 """FindFirst(self, String spec, int flags=0) -> String"""
1983 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
1985 def FindNext(*args
, **kwargs
):
1986 """FindNext(self) -> String"""
1987 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
1990 class MemoryFSHandlerPtr(MemoryFSHandler
):
1991 def __init__(self
, this
):
1993 if not hasattr(self
,"thisown"): self
.thisown
= 0
1994 self
.__class
__ = MemoryFSHandler
1995 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
1997 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
1998 """MemoryFSHandler_RemoveFile(String filename)"""
1999 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
2001 #---------------------------------------------------------------------------
2003 class ImageHandler(Object
):
2004 """Proxy of C++ ImageHandler class"""
2005 def __init__(self
): raise RuntimeError, "No constructor defined"
2007 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2008 def GetName(*args
, **kwargs
):
2009 """GetName(self) -> String"""
2010 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
2012 def GetExtension(*args
, **kwargs
):
2013 """GetExtension(self) -> String"""
2014 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
2016 def GetType(*args
, **kwargs
):
2017 """GetType(self) -> long"""
2018 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
2020 def GetMimeType(*args
, **kwargs
):
2021 """GetMimeType(self) -> String"""
2022 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
2024 def CanRead(*args
, **kwargs
):
2025 """CanRead(self, String name) -> bool"""
2026 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
2028 def SetName(*args
, **kwargs
):
2029 """SetName(self, String name)"""
2030 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
2032 def SetExtension(*args
, **kwargs
):
2033 """SetExtension(self, String extension)"""
2034 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
2036 def SetType(*args
, **kwargs
):
2037 """SetType(self, long type)"""
2038 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
2040 def SetMimeType(*args
, **kwargs
):
2041 """SetMimeType(self, String mimetype)"""
2042 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
2045 class ImageHandlerPtr(ImageHandler
):
2046 def __init__(self
, this
):
2048 if not hasattr(self
,"thisown"): self
.thisown
= 0
2049 self
.__class
__ = ImageHandler
2050 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
2052 class ImageHistogram(object):
2053 """Proxy of C++ ImageHistogram class"""
2055 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2056 def __init__(self
, *args
, **kwargs
):
2057 """__init__(self) -> ImageHistogram"""
2058 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
2059 self
.this
= newobj
.this
2062 def MakeKey(*args
, **kwargs
):
2064 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2066 Get the key in the histogram for the given RGB values
2068 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2070 MakeKey
= staticmethod(MakeKey
)
2071 def FindFirstUnusedColour(*args
, **kwargs
):
2073 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2075 Find first colour that is not used in the image and has higher RGB
2076 values than startR, startG, startB. Returns a tuple consisting of a
2077 success flag and rgb values.
2079 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2082 class ImageHistogramPtr(ImageHistogram
):
2083 def __init__(self
, this
):
2085 if not hasattr(self
,"thisown"): self
.thisown
= 0
2086 self
.__class
__ = ImageHistogram
2087 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2089 def ImageHistogram_MakeKey(*args
, **kwargs
):
2091 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2093 Get the key in the histogram for the given RGB values
2095 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2097 class Image(Object
):
2098 """Proxy of C++ Image class"""
2100 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2101 def __init__(self
, *args
, **kwargs
):
2102 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2103 newobj
= _core_
.new_Image(*args
, **kwargs
)
2104 self
.this
= newobj
.this
2107 def __del__(self
, destroy
=_core_
.delete_Image
):
2110 if self
.thisown
: destroy(self
)
2113 def Create(*args
, **kwargs
):
2114 """Create(self, int width, int height)"""
2115 return _core_
.Image_Create(*args
, **kwargs
)
2117 def Destroy(*args
, **kwargs
):
2121 Deletes the C++ object this Python object is a proxy for.
2123 return _core_
.Image_Destroy(*args
, **kwargs
)
2125 def Scale(*args
, **kwargs
):
2126 """Scale(self, int width, int height) -> Image"""
2127 return _core_
.Image_Scale(*args
, **kwargs
)
2129 def ShrinkBy(*args
, **kwargs
):
2130 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2131 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2133 def Rescale(*args
, **kwargs
):
2134 """Rescale(self, int width, int height) -> Image"""
2135 return _core_
.Image_Rescale(*args
, **kwargs
)
2137 def SetRGB(*args
, **kwargs
):
2138 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2139 return _core_
.Image_SetRGB(*args
, **kwargs
)
2141 def GetRed(*args
, **kwargs
):
2142 """GetRed(self, int x, int y) -> unsigned char"""
2143 return _core_
.Image_GetRed(*args
, **kwargs
)
2145 def GetGreen(*args
, **kwargs
):
2146 """GetGreen(self, int x, int y) -> unsigned char"""
2147 return _core_
.Image_GetGreen(*args
, **kwargs
)
2149 def GetBlue(*args
, **kwargs
):
2150 """GetBlue(self, int x, int y) -> unsigned char"""
2151 return _core_
.Image_GetBlue(*args
, **kwargs
)
2153 def SetAlpha(*args
, **kwargs
):
2154 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2155 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2157 def GetAlpha(*args
, **kwargs
):
2158 """GetAlpha(self, int x, int y) -> unsigned char"""
2159 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2161 def HasAlpha(*args
, **kwargs
):
2162 """HasAlpha(self) -> bool"""
2163 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2165 def FindFirstUnusedColour(*args
, **kwargs
):
2167 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2169 Find first colour that is not used in the image and has higher RGB
2170 values than startR, startG, startB. Returns a tuple consisting of a
2171 success flag and rgb values.
2173 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2175 def ConvertAlphaToMask(*args
, **kwargs
):
2177 ConvertAlphaToMask(self, byte threshold=128) -> bool
2179 If the image has alpha channel, this method converts it to mask. All pixels
2180 with alpha value less than ``threshold`` are replaced with mask colour and the
2181 alpha channel is removed. Mask colour is chosen automatically using
2182 `FindFirstUnusedColour`.
2184 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2187 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2189 def ConvertColourToAlpha(*args
, **kwargs
):
2191 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2193 This method converts an image where the original alpha information is
2194 only available as a shades of a colour (actually shades of grey)
2195 typically when you draw anti-aliased text into a bitmap. The DC
2196 drawing routines draw grey values on the black background although
2197 they actually mean to draw white with differnt alpha values. This
2198 method reverses it, assuming a black (!) background and white text.
2199 The method will then fill up the whole image with the colour given.
2201 return _core_
.Image_ConvertColourToAlpha(*args
, **kwargs
)
2203 def SetMaskFromImage(*args
, **kwargs
):
2204 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2205 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2207 def CanRead(*args
, **kwargs
):
2208 """CanRead(String name) -> bool"""
2209 return _core_
.Image_CanRead(*args
, **kwargs
)
2211 CanRead
= staticmethod(CanRead
)
2212 def GetImageCount(*args
, **kwargs
):
2213 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2214 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2216 GetImageCount
= staticmethod(GetImageCount
)
2217 def LoadFile(*args
, **kwargs
):
2218 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2219 return _core_
.Image_LoadFile(*args
, **kwargs
)
2221 def LoadMimeFile(*args
, **kwargs
):
2222 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2223 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2225 def SaveFile(*args
, **kwargs
):
2226 """SaveFile(self, String name, int type) -> bool"""
2227 return _core_
.Image_SaveFile(*args
, **kwargs
)
2229 def SaveMimeFile(*args
, **kwargs
):
2230 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2231 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2233 def CanReadStream(*args
, **kwargs
):
2234 """CanReadStream(InputStream stream) -> bool"""
2235 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2237 CanReadStream
= staticmethod(CanReadStream
)
2238 def LoadStream(*args
, **kwargs
):
2239 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2240 return _core_
.Image_LoadStream(*args
, **kwargs
)
2242 def LoadMimeStream(*args
, **kwargs
):
2243 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2244 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2246 def Ok(*args
, **kwargs
):
2247 """Ok(self) -> bool"""
2248 return _core_
.Image_Ok(*args
, **kwargs
)
2250 def GetWidth(*args
, **kwargs
):
2251 """GetWidth(self) -> int"""
2252 return _core_
.Image_GetWidth(*args
, **kwargs
)
2254 def GetHeight(*args
, **kwargs
):
2255 """GetHeight(self) -> int"""
2256 return _core_
.Image_GetHeight(*args
, **kwargs
)
2258 def GetSize(*args
, **kwargs
):
2259 """GetSize(self) -> Size"""
2260 return _core_
.Image_GetSize(*args
, **kwargs
)
2262 def GetSubImage(*args
, **kwargs
):
2263 """GetSubImage(self, Rect rect) -> Image"""
2264 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2266 def Copy(*args
, **kwargs
):
2267 """Copy(self) -> Image"""
2268 return _core_
.Image_Copy(*args
, **kwargs
)
2270 def Paste(*args
, **kwargs
):
2271 """Paste(self, Image image, int x, int y)"""
2272 return _core_
.Image_Paste(*args
, **kwargs
)
2274 def GetData(*args
, **kwargs
):
2275 """GetData(self) -> PyObject"""
2276 return _core_
.Image_GetData(*args
, **kwargs
)
2278 def SetData(*args
, **kwargs
):
2279 """SetData(self, PyObject data)"""
2280 return _core_
.Image_SetData(*args
, **kwargs
)
2282 def GetDataBuffer(*args
, **kwargs
):
2283 """GetDataBuffer(self) -> PyObject"""
2284 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2286 def SetDataBuffer(*args
, **kwargs
):
2287 """SetDataBuffer(self, PyObject data)"""
2288 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2290 def GetAlphaData(*args
, **kwargs
):
2291 """GetAlphaData(self) -> PyObject"""
2292 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2294 def SetAlphaData(*args
, **kwargs
):
2295 """SetAlphaData(self, PyObject data)"""
2296 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2298 def GetAlphaBuffer(*args
, **kwargs
):
2299 """GetAlphaBuffer(self) -> PyObject"""
2300 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2302 def SetAlphaBuffer(*args
, **kwargs
):
2303 """SetAlphaBuffer(self, PyObject data)"""
2304 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2306 def SetMaskColour(*args
, **kwargs
):
2307 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2308 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2310 def GetMaskRed(*args
, **kwargs
):
2311 """GetMaskRed(self) -> unsigned char"""
2312 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2314 def GetMaskGreen(*args
, **kwargs
):
2315 """GetMaskGreen(self) -> unsigned char"""
2316 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2318 def GetMaskBlue(*args
, **kwargs
):
2319 """GetMaskBlue(self) -> unsigned char"""
2320 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2322 def SetMask(*args
, **kwargs
):
2323 """SetMask(self, bool mask=True)"""
2324 return _core_
.Image_SetMask(*args
, **kwargs
)
2326 def HasMask(*args
, **kwargs
):
2327 """HasMask(self) -> bool"""
2328 return _core_
.Image_HasMask(*args
, **kwargs
)
2330 def Rotate(*args
, **kwargs
):
2332 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2333 Point offset_after_rotation=None) -> Image
2335 return _core_
.Image_Rotate(*args
, **kwargs
)
2337 def Rotate90(*args
, **kwargs
):
2338 """Rotate90(self, bool clockwise=True) -> Image"""
2339 return _core_
.Image_Rotate90(*args
, **kwargs
)
2341 def Mirror(*args
, **kwargs
):
2342 """Mirror(self, bool horizontally=True) -> Image"""
2343 return _core_
.Image_Mirror(*args
, **kwargs
)
2345 def Replace(*args
, **kwargs
):
2347 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2348 unsigned char r2, unsigned char g2, unsigned char b2)
2350 return _core_
.Image_Replace(*args
, **kwargs
)
2352 def ConvertToMono(*args
, **kwargs
):
2353 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2354 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2356 def SetOption(*args
, **kwargs
):
2357 """SetOption(self, String name, String value)"""
2358 return _core_
.Image_SetOption(*args
, **kwargs
)
2360 def SetOptionInt(*args
, **kwargs
):
2361 """SetOptionInt(self, String name, int value)"""
2362 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2364 def GetOption(*args
, **kwargs
):
2365 """GetOption(self, String name) -> String"""
2366 return _core_
.Image_GetOption(*args
, **kwargs
)
2368 def GetOptionInt(*args
, **kwargs
):
2369 """GetOptionInt(self, String name) -> int"""
2370 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2372 def HasOption(*args
, **kwargs
):
2373 """HasOption(self, String name) -> bool"""
2374 return _core_
.Image_HasOption(*args
, **kwargs
)
2376 def CountColours(*args
, **kwargs
):
2377 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2378 return _core_
.Image_CountColours(*args
, **kwargs
)
2380 def ComputeHistogram(*args
, **kwargs
):
2381 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2382 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2384 def AddHandler(*args
, **kwargs
):
2385 """AddHandler(ImageHandler handler)"""
2386 return _core_
.Image_AddHandler(*args
, **kwargs
)
2388 AddHandler
= staticmethod(AddHandler
)
2389 def InsertHandler(*args
, **kwargs
):
2390 """InsertHandler(ImageHandler handler)"""
2391 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2393 InsertHandler
= staticmethod(InsertHandler
)
2394 def RemoveHandler(*args
, **kwargs
):
2395 """RemoveHandler(String name) -> bool"""
2396 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2398 RemoveHandler
= staticmethod(RemoveHandler
)
2399 def GetImageExtWildcard(*args
, **kwargs
):
2400 """GetImageExtWildcard() -> String"""
2401 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2403 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2404 def ConvertToBitmap(*args
, **kwargs
):
2405 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2406 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2408 def ConvertToMonoBitmap(*args
, **kwargs
):
2409 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2410 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2412 def __nonzero__(self
): return self
.Ok()
2414 class ImagePtr(Image
):
2415 def __init__(self
, this
):
2417 if not hasattr(self
,"thisown"): self
.thisown
= 0
2418 self
.__class
__ = Image
2419 _core_
.Image_swigregister(ImagePtr
)
2421 def ImageFromMime(*args
, **kwargs
):
2422 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2423 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2427 def ImageFromStream(*args
, **kwargs
):
2428 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2429 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2433 def ImageFromStreamMime(*args
, **kwargs
):
2434 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2435 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2439 def EmptyImage(*args
, **kwargs
):
2440 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2441 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2445 def ImageFromBitmap(*args
, **kwargs
):
2446 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2447 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2451 def ImageFromData(*args
, **kwargs
):
2452 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2453 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2457 def ImageFromDataWithAlpha(*args
, **kwargs
):
2458 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2459 val
= _core_
.new_ImageFromDataWithAlpha(*args
, **kwargs
)
2463 def Image_CanRead(*args
, **kwargs
):
2464 """Image_CanRead(String name) -> bool"""
2465 return _core_
.Image_CanRead(*args
, **kwargs
)
2467 def Image_GetImageCount(*args
, **kwargs
):
2468 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2469 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2471 def Image_CanReadStream(*args
, **kwargs
):
2472 """Image_CanReadStream(InputStream stream) -> bool"""
2473 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2475 def Image_AddHandler(*args
, **kwargs
):
2476 """Image_AddHandler(ImageHandler handler)"""
2477 return _core_
.Image_AddHandler(*args
, **kwargs
)
2479 def Image_InsertHandler(*args
, **kwargs
):
2480 """Image_InsertHandler(ImageHandler handler)"""
2481 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2483 def Image_RemoveHandler(*args
, **kwargs
):
2484 """Image_RemoveHandler(String name) -> bool"""
2485 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2487 def Image_GetImageExtWildcard(*args
, **kwargs
):
2488 """Image_GetImageExtWildcard() -> String"""
2489 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2491 def InitAllImageHandlers():
2493 The former functionality of InitAllImageHanders is now done internal to
2494 the _core_ extension module and so this function has become a simple NOP.
2498 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2499 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2500 BMP_24BPP
= _core_
.BMP_24BPP
2501 BMP_8BPP
= _core_
.BMP_8BPP
2502 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2503 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2504 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2505 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2506 BMP_4BPP
= _core_
.BMP_4BPP
2507 BMP_1BPP
= _core_
.BMP_1BPP
2508 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2509 class BMPHandler(ImageHandler
):
2510 """Proxy of C++ BMPHandler class"""
2512 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2513 def __init__(self
, *args
, **kwargs
):
2514 """__init__(self) -> BMPHandler"""
2515 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2516 self
.this
= newobj
.this
2520 class BMPHandlerPtr(BMPHandler
):
2521 def __init__(self
, this
):
2523 if not hasattr(self
,"thisown"): self
.thisown
= 0
2524 self
.__class
__ = BMPHandler
2525 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2526 NullImage
= cvar
.NullImage
2527 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2528 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2529 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2530 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2531 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2533 class ICOHandler(BMPHandler
):
2534 """Proxy of C++ ICOHandler class"""
2536 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2537 def __init__(self
, *args
, **kwargs
):
2538 """__init__(self) -> ICOHandler"""
2539 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2540 self
.this
= newobj
.this
2544 class ICOHandlerPtr(ICOHandler
):
2545 def __init__(self
, this
):
2547 if not hasattr(self
,"thisown"): self
.thisown
= 0
2548 self
.__class
__ = ICOHandler
2549 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2551 class CURHandler(ICOHandler
):
2552 """Proxy of C++ CURHandler class"""
2554 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2555 def __init__(self
, *args
, **kwargs
):
2556 """__init__(self) -> CURHandler"""
2557 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2558 self
.this
= newobj
.this
2562 class CURHandlerPtr(CURHandler
):
2563 def __init__(self
, this
):
2565 if not hasattr(self
,"thisown"): self
.thisown
= 0
2566 self
.__class
__ = CURHandler
2567 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2569 class ANIHandler(CURHandler
):
2570 """Proxy of C++ ANIHandler class"""
2572 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2573 def __init__(self
, *args
, **kwargs
):
2574 """__init__(self) -> ANIHandler"""
2575 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2576 self
.this
= newobj
.this
2580 class ANIHandlerPtr(ANIHandler
):
2581 def __init__(self
, this
):
2583 if not hasattr(self
,"thisown"): self
.thisown
= 0
2584 self
.__class
__ = ANIHandler
2585 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2587 class PNGHandler(ImageHandler
):
2588 """Proxy of C++ PNGHandler class"""
2590 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2591 def __init__(self
, *args
, **kwargs
):
2592 """__init__(self) -> PNGHandler"""
2593 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2594 self
.this
= newobj
.this
2598 class PNGHandlerPtr(PNGHandler
):
2599 def __init__(self
, this
):
2601 if not hasattr(self
,"thisown"): self
.thisown
= 0
2602 self
.__class
__ = PNGHandler
2603 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2605 class GIFHandler(ImageHandler
):
2606 """Proxy of C++ GIFHandler class"""
2608 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2609 def __init__(self
, *args
, **kwargs
):
2610 """__init__(self) -> GIFHandler"""
2611 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2612 self
.this
= newobj
.this
2616 class GIFHandlerPtr(GIFHandler
):
2617 def __init__(self
, this
):
2619 if not hasattr(self
,"thisown"): self
.thisown
= 0
2620 self
.__class
__ = GIFHandler
2621 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2623 class PCXHandler(ImageHandler
):
2624 """Proxy of C++ PCXHandler class"""
2626 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2627 def __init__(self
, *args
, **kwargs
):
2628 """__init__(self) -> PCXHandler"""
2629 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2630 self
.this
= newobj
.this
2634 class PCXHandlerPtr(PCXHandler
):
2635 def __init__(self
, this
):
2637 if not hasattr(self
,"thisown"): self
.thisown
= 0
2638 self
.__class
__ = PCXHandler
2639 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2641 class JPEGHandler(ImageHandler
):
2642 """Proxy of C++ JPEGHandler class"""
2644 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2645 def __init__(self
, *args
, **kwargs
):
2646 """__init__(self) -> JPEGHandler"""
2647 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2648 self
.this
= newobj
.this
2652 class JPEGHandlerPtr(JPEGHandler
):
2653 def __init__(self
, this
):
2655 if not hasattr(self
,"thisown"): self
.thisown
= 0
2656 self
.__class
__ = JPEGHandler
2657 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2659 class PNMHandler(ImageHandler
):
2660 """Proxy of C++ PNMHandler class"""
2662 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2663 def __init__(self
, *args
, **kwargs
):
2664 """__init__(self) -> PNMHandler"""
2665 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2666 self
.this
= newobj
.this
2670 class PNMHandlerPtr(PNMHandler
):
2671 def __init__(self
, this
):
2673 if not hasattr(self
,"thisown"): self
.thisown
= 0
2674 self
.__class
__ = PNMHandler
2675 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2677 class XPMHandler(ImageHandler
):
2678 """Proxy of C++ XPMHandler class"""
2680 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2681 def __init__(self
, *args
, **kwargs
):
2682 """__init__(self) -> XPMHandler"""
2683 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2684 self
.this
= newobj
.this
2688 class XPMHandlerPtr(XPMHandler
):
2689 def __init__(self
, this
):
2691 if not hasattr(self
,"thisown"): self
.thisown
= 0
2692 self
.__class
__ = XPMHandler
2693 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2695 class TIFFHandler(ImageHandler
):
2696 """Proxy of C++ TIFFHandler class"""
2698 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2699 def __init__(self
, *args
, **kwargs
):
2700 """__init__(self) -> TIFFHandler"""
2701 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2702 self
.this
= newobj
.this
2706 class TIFFHandlerPtr(TIFFHandler
):
2707 def __init__(self
, this
):
2709 if not hasattr(self
,"thisown"): self
.thisown
= 0
2710 self
.__class
__ = TIFFHandler
2711 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2713 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2714 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2715 class Quantize(object):
2716 """Performs quantization, or colour reduction, on a wxImage."""
2717 def __init__(self
): raise RuntimeError, "No constructor defined"
2719 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2720 def Quantize(*args
, **kwargs
):
2722 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2724 Reduce the colours in the source image and put the result into the
2725 destination image, setting the palette in the destination if
2726 needed. Both images may be the same, to overwrite the source image.
2728 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2730 Quantize
= staticmethod(Quantize
)
2732 class QuantizePtr(Quantize
):
2733 def __init__(self
, this
):
2735 if not hasattr(self
,"thisown"): self
.thisown
= 0
2736 self
.__class
__ = Quantize
2737 _core_
.Quantize_swigregister(QuantizePtr
)
2739 def Quantize_Quantize(*args
, **kwargs
):
2741 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2743 Reduce the colours in the source image and put the result into the
2744 destination image, setting the palette in the destination if
2745 needed. Both images may be the same, to overwrite the source image.
2747 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2749 #---------------------------------------------------------------------------
2751 class EvtHandler(Object
):
2752 """Proxy of C++ EvtHandler class"""
2754 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2755 def __init__(self
, *args
, **kwargs
):
2756 """__init__(self) -> EvtHandler"""
2757 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2758 self
.this
= newobj
.this
2761 def GetNextHandler(*args
, **kwargs
):
2762 """GetNextHandler(self) -> EvtHandler"""
2763 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2765 def GetPreviousHandler(*args
, **kwargs
):
2766 """GetPreviousHandler(self) -> EvtHandler"""
2767 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2769 def SetNextHandler(*args
, **kwargs
):
2770 """SetNextHandler(self, EvtHandler handler)"""
2771 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2773 def SetPreviousHandler(*args
, **kwargs
):
2774 """SetPreviousHandler(self, EvtHandler handler)"""
2775 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2777 def GetEvtHandlerEnabled(*args
, **kwargs
):
2778 """GetEvtHandlerEnabled(self) -> bool"""
2779 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2781 def SetEvtHandlerEnabled(*args
, **kwargs
):
2782 """SetEvtHandlerEnabled(self, bool enabled)"""
2783 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2785 def ProcessEvent(*args
, **kwargs
):
2786 """ProcessEvent(self, Event event) -> bool"""
2787 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2789 def AddPendingEvent(*args
, **kwargs
):
2790 """AddPendingEvent(self, Event event)"""
2791 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2793 def ProcessPendingEvents(*args
, **kwargs
):
2794 """ProcessPendingEvents(self)"""
2795 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2797 def Connect(*args
, **kwargs
):
2798 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2799 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
2801 def Disconnect(*args
, **kwargs
):
2802 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2803 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
2805 def _setOORInfo(*args
, **kwargs
):
2806 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2807 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
2809 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2811 Bind an event to an event handler.
2813 :param event: One of the EVT_* objects that specifies the
2814 type of event to bind,
2816 :param handler: A callable object to be invoked when the
2817 event is delivered to self. Pass None to
2818 disconnect an event handler.
2820 :param source: Sometimes the event originates from a
2821 different window than self, but you still
2822 want to catch it in self. (For example, a
2823 button event delivered to a frame.) By
2824 passing the source of the event, the event
2825 handling system is able to differentiate
2826 between the same event type from different
2829 :param id: Used to spcify the event source by ID instead
2832 :param id2: Used when it is desirable to bind a handler
2833 to a range of IDs, such as with EVT_MENU_RANGE.
2835 if source
is not None:
2837 event
.Bind(self
, id, id2
, handler
)
2839 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2841 Disconencts the event handler binding for event from self.
2842 Returns True if successful.
2844 if source
is not None:
2846 return event
.Unbind(self
, id, id2
)
2849 class EvtHandlerPtr(EvtHandler
):
2850 def __init__(self
, this
):
2852 if not hasattr(self
,"thisown"): self
.thisown
= 0
2853 self
.__class
__ = EvtHandler
2854 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
2856 #---------------------------------------------------------------------------
2858 class PyEventBinder(object):
2860 Instances of this class are used to bind specific events to event
2863 def __init__(self
, evtType
, expectedIDs
=0):
2864 if expectedIDs
not in [0, 1, 2]:
2865 raise ValueError, "Invalid number of expectedIDs"
2866 self
.expectedIDs
= expectedIDs
2868 if type(evtType
) == list or type(evtType
) == tuple:
2869 self
.evtType
= evtType
2871 self
.evtType
= [evtType
]
2874 def Bind(self
, target
, id1
, id2
, function
):
2875 """Bind this set of event types to target."""
2876 for et
in self
.evtType
:
2877 target
.Connect(id1
, id2
, et
, function
)
2880 def Unbind(self
, target
, id1
, id2
):
2881 """Remove an event binding."""
2883 for et
in self
.evtType
:
2884 success
+= target
.Disconnect(id1
, id2
, et
)
2888 def __call__(self
, *args
):
2890 For backwards compatibility with the old EVT_* functions.
2891 Should be called with either (window, func), (window, ID,
2892 func) or (window, ID1, ID2, func) parameters depending on the
2895 assert len(args
) == 2 + self
.expectedIDs
2899 if self
.expectedIDs
== 0:
2901 elif self
.expectedIDs
== 1:
2904 elif self
.expectedIDs
== 2:
2909 raise ValueError, "Unexpected number of IDs"
2911 self
.Bind(target
, id1
, id2
, func
)
2914 # These two are square pegs that don't fit the PyEventBinder hole...
2915 def EVT_COMMAND(win
, id, cmd
, func
):
2916 win
.Connect(id, -1, cmd
, func
)
2917 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2918 win
.Connect(id1
, id2
, cmd
, func
)
2921 #---------------------------------------------------------------------------
2923 #---------------------------------------------------------------------------
2925 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
2926 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
2928 def NewEventType(*args
, **kwargs
):
2929 """NewEventType() -> wxEventType"""
2930 return _core_
.NewEventType(*args
, **kwargs
)
2931 wxEVT_NULL
= _core_
.wxEVT_NULL
2932 wxEVT_FIRST
= _core_
.wxEVT_FIRST
2933 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
2934 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
2935 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
2936 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
2937 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
2938 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2939 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2940 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
2941 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
2942 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
2943 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
2944 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2945 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
2946 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
2947 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
2948 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
2949 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
2950 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
2951 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
2952 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
2953 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
2954 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
2955 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
2956 wxEVT_MOTION
= _core_
.wxEVT_MOTION
2957 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
2958 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
2959 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
2960 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
2961 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
2962 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
2963 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
2964 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
2965 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
2966 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
2967 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
2968 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
2969 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
2970 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
2971 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
2972 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
2973 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
2974 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
2975 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
2976 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
2977 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
2978 wxEVT_CHAR
= _core_
.wxEVT_CHAR
2979 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
2980 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
2981 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
2982 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
2983 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
2984 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
2985 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
2986 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
2987 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
2988 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
2989 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
2990 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
2991 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
2992 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
2993 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
2994 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
2995 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
2996 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
2997 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
2998 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
2999 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
3000 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
3001 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
3002 wxEVT_SIZE
= _core_
.wxEVT_SIZE
3003 wxEVT_MOVE
= _core_
.wxEVT_MOVE
3004 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
3005 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
3006 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
3007 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
3008 wxEVT_POWER
= _core_
.wxEVT_POWER
3009 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
3010 wxEVT_CREATE
= _core_
.wxEVT_CREATE
3011 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
3012 wxEVT_SHOW
= _core_
.wxEVT_SHOW
3013 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
3014 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
3015 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
3016 wxEVT_PAINT
= _core_
.wxEVT_PAINT
3017 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
3018 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
3019 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
3020 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
3021 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
3022 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
3023 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
3024 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
3025 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
3026 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
3027 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
3028 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
3029 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
3030 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
3031 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
3032 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
3033 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
3034 wxEVT_IDLE
= _core_
.wxEVT_IDLE
3035 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
3036 wxEVT_SIZING
= _core_
.wxEVT_SIZING
3037 wxEVT_MOVING
= _core_
.wxEVT_MOVING
3038 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
3039 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
3040 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
3041 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
3042 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
3043 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
3044 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
3046 # Create some event binders
3047 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
3048 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
3049 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
3050 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
3051 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
3052 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3053 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3054 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
3055 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
3056 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
3057 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
3058 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
3059 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
3060 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
3061 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
3062 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
3063 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
3064 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
3065 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
3066 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
3067 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
3068 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
3069 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
3070 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
3071 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3072 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3073 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
3074 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
3075 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
3076 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
3077 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
3078 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
3079 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
3080 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
3081 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
3082 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
3083 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
3084 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
3085 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
3086 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
3088 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
3089 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
3090 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
3091 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
3092 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
3093 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
3094 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
3095 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
3096 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
3097 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
3098 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
3099 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
3100 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
3102 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3110 wxEVT_MIDDLE_DCLICK
,
3118 # Scrolling from wxWindow (sent to wxScrolledWindow)
3119 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3120 wxEVT_SCROLLWIN_BOTTOM
,
3121 wxEVT_SCROLLWIN_LINEUP
,
3122 wxEVT_SCROLLWIN_LINEDOWN
,
3123 wxEVT_SCROLLWIN_PAGEUP
,
3124 wxEVT_SCROLLWIN_PAGEDOWN
,
3125 wxEVT_SCROLLWIN_THUMBTRACK
,
3126 wxEVT_SCROLLWIN_THUMBRELEASE
,
3129 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3130 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3131 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3132 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3133 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3134 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3135 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3136 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3138 # Scrolling from wxSlider and wxScrollBar
3139 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3140 wxEVT_SCROLL_BOTTOM
,
3141 wxEVT_SCROLL_LINEUP
,
3142 wxEVT_SCROLL_LINEDOWN
,
3143 wxEVT_SCROLL_PAGEUP
,
3144 wxEVT_SCROLL_PAGEDOWN
,
3145 wxEVT_SCROLL_THUMBTRACK
,
3146 wxEVT_SCROLL_THUMBRELEASE
,
3147 wxEVT_SCROLL_ENDSCROLL
,
3150 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3151 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3152 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3153 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3154 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3155 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3156 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3157 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3158 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3160 # Scrolling from wxSlider and wxScrollBar, with an id
3161 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3162 wxEVT_SCROLL_BOTTOM
,
3163 wxEVT_SCROLL_LINEUP
,
3164 wxEVT_SCROLL_LINEDOWN
,
3165 wxEVT_SCROLL_PAGEUP
,
3166 wxEVT_SCROLL_PAGEDOWN
,
3167 wxEVT_SCROLL_THUMBTRACK
,
3168 wxEVT_SCROLL_THUMBRELEASE
,
3169 wxEVT_SCROLL_ENDSCROLL
,
3172 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3173 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3174 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3175 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3176 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3177 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3178 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3179 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3180 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3182 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3183 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3184 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3185 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3186 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3187 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3188 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3189 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3190 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3191 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3193 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3194 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3195 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3196 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3197 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3198 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3199 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3200 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3201 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3204 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3205 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3206 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3207 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3208 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3209 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3210 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3212 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3214 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3215 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3217 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3221 #---------------------------------------------------------------------------
3223 class Event(Object
):
3224 """Proxy of C++ Event class"""
3225 def __init__(self
): raise RuntimeError, "No constructor defined"
3227 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3228 def __del__(self
, destroy
=_core_
.delete_Event
):
3231 if self
.thisown
: destroy(self
)
3234 def SetEventType(*args
, **kwargs
):
3235 """SetEventType(self, wxEventType typ)"""
3236 return _core_
.Event_SetEventType(*args
, **kwargs
)
3238 def GetEventType(*args
, **kwargs
):
3239 """GetEventType(self) -> wxEventType"""
3240 return _core_
.Event_GetEventType(*args
, **kwargs
)
3242 def GetEventObject(*args
, **kwargs
):
3243 """GetEventObject(self) -> Object"""
3244 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3246 def SetEventObject(*args
, **kwargs
):
3247 """SetEventObject(self, Object obj)"""
3248 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3250 def GetTimestamp(*args
, **kwargs
):
3251 """GetTimestamp(self) -> long"""
3252 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3254 def SetTimestamp(*args
, **kwargs
):
3255 """SetTimestamp(self, long ts=0)"""
3256 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3258 def GetId(*args
, **kwargs
):
3259 """GetId(self) -> int"""
3260 return _core_
.Event_GetId(*args
, **kwargs
)
3262 def SetId(*args
, **kwargs
):
3263 """SetId(self, int Id)"""
3264 return _core_
.Event_SetId(*args
, **kwargs
)
3266 def IsCommandEvent(*args
, **kwargs
):
3267 """IsCommandEvent(self) -> bool"""
3268 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3270 def Skip(*args
, **kwargs
):
3272 Skip(self, bool skip=True)
3274 Called by an event handler, it controls whether additional event
3275 handlers bound to this event will be called after the current event
3276 handler returns. Skip(false) (the default setting) will prevent
3277 additional event handlers from being called and control will be
3278 returned to the sender of the event immediately after the current
3279 handler has finished. Skip(True) will cause the event processing
3280 system to continue searching for a handler function for this event.
3283 return _core_
.Event_Skip(*args
, **kwargs
)
3285 def GetSkipped(*args
, **kwargs
):
3286 """GetSkipped(self) -> bool"""
3287 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3289 def ShouldPropagate(*args
, **kwargs
):
3290 """ShouldPropagate(self) -> bool"""
3291 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3293 def StopPropagation(*args
, **kwargs
):
3294 """StopPropagation(self) -> int"""
3295 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3297 def ResumePropagation(*args
, **kwargs
):
3298 """ResumePropagation(self, int propagationLevel)"""
3299 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3301 def Clone(*args
, **kwargs
):
3302 """Clone(self) -> Event"""
3303 return _core_
.Event_Clone(*args
, **kwargs
)
3306 class EventPtr(Event
):
3307 def __init__(self
, this
):
3309 if not hasattr(self
,"thisown"): self
.thisown
= 0
3310 self
.__class
__ = Event
3311 _core_
.Event_swigregister(EventPtr
)
3313 #---------------------------------------------------------------------------
3315 class PropagationDisabler(object):
3316 """Proxy of C++ PropagationDisabler class"""
3318 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3319 def __init__(self
, *args
, **kwargs
):
3320 """__init__(self, Event event) -> PropagationDisabler"""
3321 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3322 self
.this
= newobj
.this
3325 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3328 if self
.thisown
: destroy(self
)
3332 class PropagationDisablerPtr(PropagationDisabler
):
3333 def __init__(self
, this
):
3335 if not hasattr(self
,"thisown"): self
.thisown
= 0
3336 self
.__class
__ = PropagationDisabler
3337 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3339 class PropagateOnce(object):
3340 """Proxy of C++ PropagateOnce class"""
3342 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3343 def __init__(self
, *args
, **kwargs
):
3344 """__init__(self, Event event) -> PropagateOnce"""
3345 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3346 self
.this
= newobj
.this
3349 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3352 if self
.thisown
: destroy(self
)
3356 class PropagateOncePtr(PropagateOnce
):
3357 def __init__(self
, this
):
3359 if not hasattr(self
,"thisown"): self
.thisown
= 0
3360 self
.__class
__ = PropagateOnce
3361 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3363 #---------------------------------------------------------------------------
3365 class CommandEvent(Event
):
3366 """Proxy of C++ CommandEvent class"""
3368 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3369 def __init__(self
, *args
, **kwargs
):
3370 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3371 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3372 self
.this
= newobj
.this
3375 def GetSelection(*args
, **kwargs
):
3376 """GetSelection(self) -> int"""
3377 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3379 def SetString(*args
, **kwargs
):
3380 """SetString(self, String s)"""
3381 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3383 def GetString(*args
, **kwargs
):
3384 """GetString(self) -> String"""
3385 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3387 def IsChecked(*args
, **kwargs
):
3388 """IsChecked(self) -> bool"""
3389 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3392 def IsSelection(*args
, **kwargs
):
3393 """IsSelection(self) -> bool"""
3394 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3396 def SetExtraLong(*args
, **kwargs
):
3397 """SetExtraLong(self, long extraLong)"""
3398 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3400 def GetExtraLong(*args
, **kwargs
):
3401 """GetExtraLong(self) -> long"""
3402 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3404 def SetInt(*args
, **kwargs
):
3405 """SetInt(self, int i)"""
3406 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3408 def GetInt(*args
, **kwargs
):
3409 """GetInt(self) -> long"""
3410 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3412 def Clone(*args
, **kwargs
):
3413 """Clone(self) -> Event"""
3414 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3417 class CommandEventPtr(CommandEvent
):
3418 def __init__(self
, this
):
3420 if not hasattr(self
,"thisown"): self
.thisown
= 0
3421 self
.__class
__ = CommandEvent
3422 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3424 #---------------------------------------------------------------------------
3426 class NotifyEvent(CommandEvent
):
3427 """Proxy of C++ NotifyEvent class"""
3429 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3430 def __init__(self
, *args
, **kwargs
):
3431 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3432 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3433 self
.this
= newobj
.this
3436 def Veto(*args
, **kwargs
):
3438 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3440 def Allow(*args
, **kwargs
):
3442 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3444 def IsAllowed(*args
, **kwargs
):
3445 """IsAllowed(self) -> bool"""
3446 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3449 class NotifyEventPtr(NotifyEvent
):
3450 def __init__(self
, this
):
3452 if not hasattr(self
,"thisown"): self
.thisown
= 0
3453 self
.__class
__ = NotifyEvent
3454 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3456 #---------------------------------------------------------------------------
3458 class ScrollEvent(CommandEvent
):
3459 """Proxy of C++ ScrollEvent class"""
3461 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3462 def __init__(self
, *args
, **kwargs
):
3464 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3465 int orient=0) -> ScrollEvent
3467 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3468 self
.this
= newobj
.this
3471 def GetOrientation(*args
, **kwargs
):
3472 """GetOrientation(self) -> int"""
3473 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3475 def GetPosition(*args
, **kwargs
):
3476 """GetPosition(self) -> int"""
3477 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3479 def SetOrientation(*args
, **kwargs
):
3480 """SetOrientation(self, int orient)"""
3481 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3483 def SetPosition(*args
, **kwargs
):
3484 """SetPosition(self, int pos)"""
3485 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3488 class ScrollEventPtr(ScrollEvent
):
3489 def __init__(self
, this
):
3491 if not hasattr(self
,"thisown"): self
.thisown
= 0
3492 self
.__class
__ = ScrollEvent
3493 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3495 #---------------------------------------------------------------------------
3497 class ScrollWinEvent(Event
):
3498 """Proxy of C++ ScrollWinEvent class"""
3500 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3501 def __init__(self
, *args
, **kwargs
):
3502 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3503 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3504 self
.this
= newobj
.this
3507 def GetOrientation(*args
, **kwargs
):
3508 """GetOrientation(self) -> int"""
3509 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3511 def GetPosition(*args
, **kwargs
):
3512 """GetPosition(self) -> int"""
3513 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3515 def SetOrientation(*args
, **kwargs
):
3516 """SetOrientation(self, int orient)"""
3517 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3519 def SetPosition(*args
, **kwargs
):
3520 """SetPosition(self, int pos)"""
3521 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3524 class ScrollWinEventPtr(ScrollWinEvent
):
3525 def __init__(self
, this
):
3527 if not hasattr(self
,"thisown"): self
.thisown
= 0
3528 self
.__class
__ = ScrollWinEvent
3529 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3531 #---------------------------------------------------------------------------
3533 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3534 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3535 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3536 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3537 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3538 class MouseEvent(Event
):
3539 """Proxy of C++ MouseEvent class"""
3541 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3542 def __init__(self
, *args
, **kwargs
):
3543 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3544 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3545 self
.this
= newobj
.this
3548 def IsButton(*args
, **kwargs
):
3549 """IsButton(self) -> bool"""
3550 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
3552 def ButtonDown(*args
, **kwargs
):
3553 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3554 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
3556 def ButtonDClick(*args
, **kwargs
):
3557 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3558 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3560 def ButtonUp(*args
, **kwargs
):
3561 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3562 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
3564 def Button(*args
, **kwargs
):
3565 """Button(self, int but) -> bool"""
3566 return _core_
.MouseEvent_Button(*args
, **kwargs
)
3568 def ButtonIsDown(*args
, **kwargs
):
3569 """ButtonIsDown(self, int but) -> bool"""
3570 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3572 def GetButton(*args
, **kwargs
):
3573 """GetButton(self) -> int"""
3574 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
3576 def ControlDown(*args
, **kwargs
):
3577 """ControlDown(self) -> bool"""
3578 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
3580 def MetaDown(*args
, **kwargs
):
3581 """MetaDown(self) -> bool"""
3582 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
3584 def AltDown(*args
, **kwargs
):
3585 """AltDown(self) -> bool"""
3586 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
3588 def ShiftDown(*args
, **kwargs
):
3589 """ShiftDown(self) -> bool"""
3590 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
3592 def CmdDown(*args
, **kwargs
):
3594 CmdDown(self) -> bool
3596 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3597 platforms but the special "Apple" (a.k.a as "Command") key on
3598 Macs: it makes often sense to use it instead of, say, `ControlDown`
3599 because Cmd key is used for the same thing under Mac as Ctrl
3600 elsewhere. The Ctrl still exists, it's just not used for this
3601 purpose. So for non-Mac platforms this is the same as `ControlDown`
3602 and Macs this is the same as `MetaDown`.
3604 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
3606 def LeftDown(*args
, **kwargs
):
3607 """LeftDown(self) -> bool"""
3608 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
3610 def MiddleDown(*args
, **kwargs
):
3611 """MiddleDown(self) -> bool"""
3612 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
3614 def RightDown(*args
, **kwargs
):
3615 """RightDown(self) -> bool"""
3616 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
3618 def LeftUp(*args
, **kwargs
):
3619 """LeftUp(self) -> bool"""
3620 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
3622 def MiddleUp(*args
, **kwargs
):
3623 """MiddleUp(self) -> bool"""
3624 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
3626 def RightUp(*args
, **kwargs
):
3627 """RightUp(self) -> bool"""
3628 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
3630 def LeftDClick(*args
, **kwargs
):
3631 """LeftDClick(self) -> bool"""
3632 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
3634 def MiddleDClick(*args
, **kwargs
):
3635 """MiddleDClick(self) -> bool"""
3636 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3638 def RightDClick(*args
, **kwargs
):
3639 """RightDClick(self) -> bool"""
3640 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
3642 def LeftIsDown(*args
, **kwargs
):
3643 """LeftIsDown(self) -> bool"""
3644 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3646 def MiddleIsDown(*args
, **kwargs
):
3647 """MiddleIsDown(self) -> bool"""
3648 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3650 def RightIsDown(*args
, **kwargs
):
3651 """RightIsDown(self) -> bool"""
3652 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
3654 def Dragging(*args
, **kwargs
):
3655 """Dragging(self) -> bool"""
3656 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
3658 def Moving(*args
, **kwargs
):
3659 """Moving(self) -> bool"""
3660 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
3662 def Entering(*args
, **kwargs
):
3663 """Entering(self) -> bool"""
3664 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
3666 def Leaving(*args
, **kwargs
):
3667 """Leaving(self) -> bool"""
3668 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
3670 def GetPosition(*args
, **kwargs
):
3672 GetPosition(self) -> Point
3674 Returns the position of the mouse in window coordinates when the event
3677 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
3679 def GetPositionTuple(*args
, **kwargs
):
3681 GetPositionTuple() -> (x,y)
3683 Returns the position of the mouse in window coordinates when the event
3686 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3688 def GetLogicalPosition(*args
, **kwargs
):
3689 """GetLogicalPosition(self, DC dc) -> Point"""
3690 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3692 def GetX(*args
, **kwargs
):
3693 """GetX(self) -> int"""
3694 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
3696 def GetY(*args
, **kwargs
):
3697 """GetY(self) -> int"""
3698 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
3700 def GetWheelRotation(*args
, **kwargs
):
3701 """GetWheelRotation(self) -> int"""
3702 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3704 def GetWheelDelta(*args
, **kwargs
):
3705 """GetWheelDelta(self) -> int"""
3706 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3708 def GetLinesPerAction(*args
, **kwargs
):
3709 """GetLinesPerAction(self) -> int"""
3710 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3712 def IsPageScroll(*args
, **kwargs
):
3713 """IsPageScroll(self) -> bool"""
3714 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3716 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
3717 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
3718 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
3719 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
3720 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
3721 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
3722 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
3723 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
3724 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
3725 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
3726 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
3727 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
3729 class MouseEventPtr(MouseEvent
):
3730 def __init__(self
, this
):
3732 if not hasattr(self
,"thisown"): self
.thisown
= 0
3733 self
.__class
__ = MouseEvent
3734 _core_
.MouseEvent_swigregister(MouseEventPtr
)
3736 #---------------------------------------------------------------------------
3738 class SetCursorEvent(Event
):
3739 """Proxy of C++ SetCursorEvent class"""
3741 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3742 def __init__(self
, *args
, **kwargs
):
3743 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3744 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
3745 self
.this
= newobj
.this
3748 def GetX(*args
, **kwargs
):
3749 """GetX(self) -> int"""
3750 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
3752 def GetY(*args
, **kwargs
):
3753 """GetY(self) -> int"""
3754 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
3756 def SetCursor(*args
, **kwargs
):
3757 """SetCursor(self, Cursor cursor)"""
3758 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3760 def GetCursor(*args
, **kwargs
):
3761 """GetCursor(self) -> Cursor"""
3762 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3764 def HasCursor(*args
, **kwargs
):
3765 """HasCursor(self) -> bool"""
3766 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3769 class SetCursorEventPtr(SetCursorEvent
):
3770 def __init__(self
, this
):
3772 if not hasattr(self
,"thisown"): self
.thisown
= 0
3773 self
.__class
__ = SetCursorEvent
3774 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3776 #---------------------------------------------------------------------------
3778 class KeyEvent(Event
):
3779 """Proxy of C++ KeyEvent class"""
3781 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3782 def __init__(self
, *args
, **kwargs
):
3783 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3784 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
3785 self
.this
= newobj
.this
3788 def ControlDown(*args
, **kwargs
):
3789 """ControlDown(self) -> bool"""
3790 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
3792 def MetaDown(*args
, **kwargs
):
3793 """MetaDown(self) -> bool"""
3794 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
3796 def AltDown(*args
, **kwargs
):
3797 """AltDown(self) -> bool"""
3798 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
3800 def ShiftDown(*args
, **kwargs
):
3801 """ShiftDown(self) -> bool"""
3802 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
3804 def CmdDown(*args
, **kwargs
):
3806 CmdDown(self) -> bool
3808 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3809 platforms but the special "Apple" (a.k.a as "Command") key on
3810 Macs: it makes often sense to use it instead of, say, `ControlDown`
3811 because Cmd key is used for the same thing under Mac as Ctrl
3812 elsewhere. The Ctrl still exists, it's just not used for this
3813 purpose. So for non-Mac platforms this is the same as `ControlDown`
3814 and Macs this is the same as `MetaDown`.
3816 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
3818 def HasModifiers(*args
, **kwargs
):
3819 """HasModifiers(self) -> bool"""
3820 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
3822 def GetKeyCode(*args
, **kwargs
):
3823 """GetKeyCode(self) -> int"""
3824 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3826 KeyCode
= GetKeyCode
3827 def GetUnicodeKey(*args
, **kwargs
):
3828 """GetUnicodeKey(self) -> int"""
3829 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
3831 GetUniChar
= GetUnicodeKey
3832 def GetRawKeyCode(*args
, **kwargs
):
3833 """GetRawKeyCode(self) -> unsigned int"""
3834 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3836 def GetRawKeyFlags(*args
, **kwargs
):
3837 """GetRawKeyFlags(self) -> unsigned int"""
3838 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3840 def GetPosition(*args
, **kwargs
):
3842 GetPosition(self) -> Point
3844 Find the position of the event.
3846 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
3848 def GetPositionTuple(*args
, **kwargs
):
3850 GetPositionTuple() -> (x,y)
3852 Find the position of the event.
3854 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3856 def GetX(*args
, **kwargs
):
3857 """GetX(self) -> int"""
3858 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
3860 def GetY(*args
, **kwargs
):
3861 """GetY(self) -> int"""
3862 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
3864 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
3865 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
3866 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
3867 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
3868 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
3869 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
3870 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
3871 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
3872 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
3873 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
3875 class KeyEventPtr(KeyEvent
):
3876 def __init__(self
, this
):
3878 if not hasattr(self
,"thisown"): self
.thisown
= 0
3879 self
.__class
__ = KeyEvent
3880 _core_
.KeyEvent_swigregister(KeyEventPtr
)
3882 #---------------------------------------------------------------------------
3884 class SizeEvent(Event
):
3885 """Proxy of C++ SizeEvent class"""
3887 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3888 def __init__(self
, *args
, **kwargs
):
3889 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3890 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
3891 self
.this
= newobj
.this
3894 def GetSize(*args
, **kwargs
):
3895 """GetSize(self) -> Size"""
3896 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
3898 def GetRect(*args
, **kwargs
):
3899 """GetRect(self) -> Rect"""
3900 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
3902 def SetRect(*args
, **kwargs
):
3903 """SetRect(self, Rect rect)"""
3904 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
3906 def SetSize(*args
, **kwargs
):
3907 """SetSize(self, Size size)"""
3908 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
3910 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
3911 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
3913 class SizeEventPtr(SizeEvent
):
3914 def __init__(self
, this
):
3916 if not hasattr(self
,"thisown"): self
.thisown
= 0
3917 self
.__class
__ = SizeEvent
3918 _core_
.SizeEvent_swigregister(SizeEventPtr
)
3920 #---------------------------------------------------------------------------
3922 class MoveEvent(Event
):
3923 """Proxy of C++ MoveEvent class"""
3925 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3926 def __init__(self
, *args
, **kwargs
):
3927 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3928 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
3929 self
.this
= newobj
.this
3932 def GetPosition(*args
, **kwargs
):
3933 """GetPosition(self) -> Point"""
3934 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
3936 def GetRect(*args
, **kwargs
):
3937 """GetRect(self) -> Rect"""
3938 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
3940 def SetRect(*args
, **kwargs
):
3941 """SetRect(self, Rect rect)"""
3942 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
3944 def SetPosition(*args
, **kwargs
):
3945 """SetPosition(self, Point pos)"""
3946 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
3948 m_pos
= property(GetPosition
, SetPosition
)
3949 m_rect
= property(GetRect
, SetRect
)
3952 class MoveEventPtr(MoveEvent
):
3953 def __init__(self
, this
):
3955 if not hasattr(self
,"thisown"): self
.thisown
= 0
3956 self
.__class
__ = MoveEvent
3957 _core_
.MoveEvent_swigregister(MoveEventPtr
)
3959 #---------------------------------------------------------------------------
3961 class PaintEvent(Event
):
3962 """Proxy of C++ PaintEvent class"""
3964 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3965 def __init__(self
, *args
, **kwargs
):
3966 """__init__(self, int Id=0) -> PaintEvent"""
3967 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
3968 self
.this
= newobj
.this
3972 class PaintEventPtr(PaintEvent
):
3973 def __init__(self
, this
):
3975 if not hasattr(self
,"thisown"): self
.thisown
= 0
3976 self
.__class
__ = PaintEvent
3977 _core_
.PaintEvent_swigregister(PaintEventPtr
)
3979 class NcPaintEvent(Event
):
3980 """Proxy of C++ NcPaintEvent class"""
3982 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3983 def __init__(self
, *args
, **kwargs
):
3984 """__init__(self, int winid=0) -> NcPaintEvent"""
3985 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
3986 self
.this
= newobj
.this
3990 class NcPaintEventPtr(NcPaintEvent
):
3991 def __init__(self
, this
):
3993 if not hasattr(self
,"thisown"): self
.thisown
= 0
3994 self
.__class
__ = NcPaintEvent
3995 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
3997 #---------------------------------------------------------------------------
3999 class EraseEvent(Event
):
4000 """Proxy of C++ EraseEvent class"""
4002 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4003 def __init__(self
, *args
, **kwargs
):
4004 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4005 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
4006 self
.this
= newobj
.this
4009 def GetDC(*args
, **kwargs
):
4010 """GetDC(self) -> DC"""
4011 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
4014 class EraseEventPtr(EraseEvent
):
4015 def __init__(self
, this
):
4017 if not hasattr(self
,"thisown"): self
.thisown
= 0
4018 self
.__class
__ = EraseEvent
4019 _core_
.EraseEvent_swigregister(EraseEventPtr
)
4021 #---------------------------------------------------------------------------
4023 class FocusEvent(Event
):
4024 """Proxy of C++ FocusEvent class"""
4026 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4027 def __init__(self
, *args
, **kwargs
):
4028 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4029 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
4030 self
.this
= newobj
.this
4033 def GetWindow(*args
, **kwargs
):
4034 """GetWindow(self) -> Window"""
4035 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
4037 def SetWindow(*args
, **kwargs
):
4038 """SetWindow(self, Window win)"""
4039 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
4042 class FocusEventPtr(FocusEvent
):
4043 def __init__(self
, this
):
4045 if not hasattr(self
,"thisown"): self
.thisown
= 0
4046 self
.__class
__ = FocusEvent
4047 _core_
.FocusEvent_swigregister(FocusEventPtr
)
4049 #---------------------------------------------------------------------------
4051 class ChildFocusEvent(CommandEvent
):
4052 """Proxy of C++ ChildFocusEvent class"""
4054 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4055 def __init__(self
, *args
, **kwargs
):
4056 """__init__(self, Window win=None) -> ChildFocusEvent"""
4057 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
4058 self
.this
= newobj
.this
4061 def GetWindow(*args
, **kwargs
):
4062 """GetWindow(self) -> Window"""
4063 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
4066 class ChildFocusEventPtr(ChildFocusEvent
):
4067 def __init__(self
, this
):
4069 if not hasattr(self
,"thisown"): self
.thisown
= 0
4070 self
.__class
__ = ChildFocusEvent
4071 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
4073 #---------------------------------------------------------------------------
4075 class ActivateEvent(Event
):
4076 """Proxy of C++ ActivateEvent class"""
4078 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4079 def __init__(self
, *args
, **kwargs
):
4080 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4081 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
4082 self
.this
= newobj
.this
4085 def GetActive(*args
, **kwargs
):
4086 """GetActive(self) -> bool"""
4087 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
4090 class ActivateEventPtr(ActivateEvent
):
4091 def __init__(self
, this
):
4093 if not hasattr(self
,"thisown"): self
.thisown
= 0
4094 self
.__class
__ = ActivateEvent
4095 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
4097 #---------------------------------------------------------------------------
4099 class InitDialogEvent(Event
):
4100 """Proxy of C++ InitDialogEvent class"""
4102 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4103 def __init__(self
, *args
, **kwargs
):
4104 """__init__(self, int Id=0) -> InitDialogEvent"""
4105 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
4106 self
.this
= newobj
.this
4110 class InitDialogEventPtr(InitDialogEvent
):
4111 def __init__(self
, this
):
4113 if not hasattr(self
,"thisown"): self
.thisown
= 0
4114 self
.__class
__ = InitDialogEvent
4115 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
4117 #---------------------------------------------------------------------------
4119 class MenuEvent(Event
):
4120 """Proxy of C++ MenuEvent class"""
4122 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4123 def __init__(self
, *args
, **kwargs
):
4124 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4125 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
4126 self
.this
= newobj
.this
4129 def GetMenuId(*args
, **kwargs
):
4130 """GetMenuId(self) -> int"""
4131 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
4133 def IsPopup(*args
, **kwargs
):
4134 """IsPopup(self) -> bool"""
4135 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4137 def GetMenu(*args
, **kwargs
):
4138 """GetMenu(self) -> Menu"""
4139 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4142 class MenuEventPtr(MenuEvent
):
4143 def __init__(self
, this
):
4145 if not hasattr(self
,"thisown"): self
.thisown
= 0
4146 self
.__class
__ = MenuEvent
4147 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4149 #---------------------------------------------------------------------------
4151 class CloseEvent(Event
):
4152 """Proxy of C++ CloseEvent class"""
4154 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4155 def __init__(self
, *args
, **kwargs
):
4156 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4157 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4158 self
.this
= newobj
.this
4161 def SetLoggingOff(*args
, **kwargs
):
4162 """SetLoggingOff(self, bool logOff)"""
4163 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4165 def GetLoggingOff(*args
, **kwargs
):
4166 """GetLoggingOff(self) -> bool"""
4167 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4169 def Veto(*args
, **kwargs
):
4170 """Veto(self, bool veto=True)"""
4171 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4173 def SetCanVeto(*args
, **kwargs
):
4174 """SetCanVeto(self, bool canVeto)"""
4175 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4177 def CanVeto(*args
, **kwargs
):
4178 """CanVeto(self) -> bool"""
4179 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4181 def GetVeto(*args
, **kwargs
):
4182 """GetVeto(self) -> bool"""
4183 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4186 class CloseEventPtr(CloseEvent
):
4187 def __init__(self
, this
):
4189 if not hasattr(self
,"thisown"): self
.thisown
= 0
4190 self
.__class
__ = CloseEvent
4191 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4193 #---------------------------------------------------------------------------
4195 class ShowEvent(Event
):
4196 """Proxy of C++ ShowEvent class"""
4198 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4199 def __init__(self
, *args
, **kwargs
):
4200 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4201 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4202 self
.this
= newobj
.this
4205 def SetShow(*args
, **kwargs
):
4206 """SetShow(self, bool show)"""
4207 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4209 def GetShow(*args
, **kwargs
):
4210 """GetShow(self) -> bool"""
4211 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4214 class ShowEventPtr(ShowEvent
):
4215 def __init__(self
, this
):
4217 if not hasattr(self
,"thisown"): self
.thisown
= 0
4218 self
.__class
__ = ShowEvent
4219 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4221 #---------------------------------------------------------------------------
4223 class IconizeEvent(Event
):
4224 """Proxy of C++ IconizeEvent class"""
4226 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4227 def __init__(self
, *args
, **kwargs
):
4228 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4229 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4230 self
.this
= newobj
.this
4233 def Iconized(*args
, **kwargs
):
4234 """Iconized(self) -> bool"""
4235 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4238 class IconizeEventPtr(IconizeEvent
):
4239 def __init__(self
, this
):
4241 if not hasattr(self
,"thisown"): self
.thisown
= 0
4242 self
.__class
__ = IconizeEvent
4243 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4245 #---------------------------------------------------------------------------
4247 class MaximizeEvent(Event
):
4248 """Proxy of C++ MaximizeEvent class"""
4250 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4251 def __init__(self
, *args
, **kwargs
):
4252 """__init__(self, int id=0) -> MaximizeEvent"""
4253 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4254 self
.this
= newobj
.this
4258 class MaximizeEventPtr(MaximizeEvent
):
4259 def __init__(self
, this
):
4261 if not hasattr(self
,"thisown"): self
.thisown
= 0
4262 self
.__class
__ = MaximizeEvent
4263 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4265 #---------------------------------------------------------------------------
4267 class DropFilesEvent(Event
):
4268 """Proxy of C++ DropFilesEvent class"""
4269 def __init__(self
): raise RuntimeError, "No constructor defined"
4271 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4272 def GetPosition(*args
, **kwargs
):
4273 """GetPosition(self) -> Point"""
4274 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4276 def GetNumberOfFiles(*args
, **kwargs
):
4277 """GetNumberOfFiles(self) -> int"""
4278 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4280 def GetFiles(*args
, **kwargs
):
4281 """GetFiles(self) -> PyObject"""
4282 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4285 class DropFilesEventPtr(DropFilesEvent
):
4286 def __init__(self
, this
):
4288 if not hasattr(self
,"thisown"): self
.thisown
= 0
4289 self
.__class
__ = DropFilesEvent
4290 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4292 #---------------------------------------------------------------------------
4294 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4295 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4296 class UpdateUIEvent(CommandEvent
):
4297 """Proxy of C++ UpdateUIEvent class"""
4299 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4300 def __init__(self
, *args
, **kwargs
):
4301 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4302 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4303 self
.this
= newobj
.this
4306 def GetChecked(*args
, **kwargs
):
4307 """GetChecked(self) -> bool"""
4308 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4310 def GetEnabled(*args
, **kwargs
):
4311 """GetEnabled(self) -> bool"""
4312 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4314 def GetText(*args
, **kwargs
):
4315 """GetText(self) -> String"""
4316 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4318 def GetSetText(*args
, **kwargs
):
4319 """GetSetText(self) -> bool"""
4320 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4322 def GetSetChecked(*args
, **kwargs
):
4323 """GetSetChecked(self) -> bool"""
4324 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4326 def GetSetEnabled(*args
, **kwargs
):
4327 """GetSetEnabled(self) -> bool"""
4328 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4330 def Check(*args
, **kwargs
):
4331 """Check(self, bool check)"""
4332 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4334 def Enable(*args
, **kwargs
):
4335 """Enable(self, bool enable)"""
4336 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4338 def SetText(*args
, **kwargs
):
4339 """SetText(self, String text)"""
4340 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4342 def SetUpdateInterval(*args
, **kwargs
):
4343 """SetUpdateInterval(long updateInterval)"""
4344 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4346 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4347 def GetUpdateInterval(*args
, **kwargs
):
4348 """GetUpdateInterval() -> long"""
4349 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4351 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4352 def CanUpdate(*args
, **kwargs
):
4353 """CanUpdate(Window win) -> bool"""
4354 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4356 CanUpdate
= staticmethod(CanUpdate
)
4357 def ResetUpdateTime(*args
, **kwargs
):
4358 """ResetUpdateTime()"""
4359 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4361 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4362 def SetMode(*args
, **kwargs
):
4363 """SetMode(int mode)"""
4364 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4366 SetMode
= staticmethod(SetMode
)
4367 def GetMode(*args
, **kwargs
):
4368 """GetMode() -> int"""
4369 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4371 GetMode
= staticmethod(GetMode
)
4373 class UpdateUIEventPtr(UpdateUIEvent
):
4374 def __init__(self
, this
):
4376 if not hasattr(self
,"thisown"): self
.thisown
= 0
4377 self
.__class
__ = UpdateUIEvent
4378 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4380 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4381 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4382 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4384 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4385 """UpdateUIEvent_GetUpdateInterval() -> long"""
4386 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4388 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4389 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4390 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4392 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4393 """UpdateUIEvent_ResetUpdateTime()"""
4394 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4396 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4397 """UpdateUIEvent_SetMode(int mode)"""
4398 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4400 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4401 """UpdateUIEvent_GetMode() -> int"""
4402 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4404 #---------------------------------------------------------------------------
4406 class SysColourChangedEvent(Event
):
4407 """Proxy of C++ SysColourChangedEvent class"""
4409 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4410 def __init__(self
, *args
, **kwargs
):
4411 """__init__(self) -> SysColourChangedEvent"""
4412 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
4413 self
.this
= newobj
.this
4417 class SysColourChangedEventPtr(SysColourChangedEvent
):
4418 def __init__(self
, this
):
4420 if not hasattr(self
,"thisown"): self
.thisown
= 0
4421 self
.__class
__ = SysColourChangedEvent
4422 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4424 #---------------------------------------------------------------------------
4426 class MouseCaptureChangedEvent(Event
):
4427 """Proxy of C++ MouseCaptureChangedEvent class"""
4429 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4430 def __init__(self
, *args
, **kwargs
):
4431 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4432 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4433 self
.this
= newobj
.this
4436 def GetCapturedWindow(*args
, **kwargs
):
4437 """GetCapturedWindow(self) -> Window"""
4438 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4441 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4442 def __init__(self
, this
):
4444 if not hasattr(self
,"thisown"): self
.thisown
= 0
4445 self
.__class
__ = MouseCaptureChangedEvent
4446 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4448 #---------------------------------------------------------------------------
4450 class DisplayChangedEvent(Event
):
4451 """Proxy of C++ DisplayChangedEvent class"""
4453 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4454 def __init__(self
, *args
, **kwargs
):
4455 """__init__(self) -> DisplayChangedEvent"""
4456 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
4457 self
.this
= newobj
.this
4461 class DisplayChangedEventPtr(DisplayChangedEvent
):
4462 def __init__(self
, this
):
4464 if not hasattr(self
,"thisown"): self
.thisown
= 0
4465 self
.__class
__ = DisplayChangedEvent
4466 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4468 #---------------------------------------------------------------------------
4470 class PaletteChangedEvent(Event
):
4471 """Proxy of C++ PaletteChangedEvent class"""
4473 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4474 def __init__(self
, *args
, **kwargs
):
4475 """__init__(self, int id=0) -> PaletteChangedEvent"""
4476 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
4477 self
.this
= newobj
.this
4480 def SetChangedWindow(*args
, **kwargs
):
4481 """SetChangedWindow(self, Window win)"""
4482 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4484 def GetChangedWindow(*args
, **kwargs
):
4485 """GetChangedWindow(self) -> Window"""
4486 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4489 class PaletteChangedEventPtr(PaletteChangedEvent
):
4490 def __init__(self
, this
):
4492 if not hasattr(self
,"thisown"): self
.thisown
= 0
4493 self
.__class
__ = PaletteChangedEvent
4494 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4496 #---------------------------------------------------------------------------
4498 class QueryNewPaletteEvent(Event
):
4499 """Proxy of C++ QueryNewPaletteEvent class"""
4501 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4502 def __init__(self
, *args
, **kwargs
):
4503 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4504 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4505 self
.this
= newobj
.this
4508 def SetPaletteRealized(*args
, **kwargs
):
4509 """SetPaletteRealized(self, bool realized)"""
4510 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4512 def GetPaletteRealized(*args
, **kwargs
):
4513 """GetPaletteRealized(self) -> bool"""
4514 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4517 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4518 def __init__(self
, this
):
4520 if not hasattr(self
,"thisown"): self
.thisown
= 0
4521 self
.__class
__ = QueryNewPaletteEvent
4522 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4524 #---------------------------------------------------------------------------
4526 class NavigationKeyEvent(Event
):
4527 """Proxy of C++ NavigationKeyEvent class"""
4529 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4530 def __init__(self
, *args
, **kwargs
):
4531 """__init__(self) -> NavigationKeyEvent"""
4532 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
4533 self
.this
= newobj
.this
4536 def GetDirection(*args
, **kwargs
):
4537 """GetDirection(self) -> bool"""
4538 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4540 def SetDirection(*args
, **kwargs
):
4541 """SetDirection(self, bool forward)"""
4542 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4544 def IsWindowChange(*args
, **kwargs
):
4545 """IsWindowChange(self) -> bool"""
4546 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4548 def SetWindowChange(*args
, **kwargs
):
4549 """SetWindowChange(self, bool ischange)"""
4550 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4552 def SetFlags(*args
, **kwargs
):
4553 """SetFlags(self, long flags)"""
4554 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
4556 def GetCurrentFocus(*args
, **kwargs
):
4557 """GetCurrentFocus(self) -> Window"""
4558 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4560 def SetCurrentFocus(*args
, **kwargs
):
4561 """SetCurrentFocus(self, Window win)"""
4562 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4564 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
4565 IsForward
= _core_
.NavigationKeyEvent_IsForward
4566 WinChange
= _core_
.NavigationKeyEvent_WinChange
4568 class NavigationKeyEventPtr(NavigationKeyEvent
):
4569 def __init__(self
, this
):
4571 if not hasattr(self
,"thisown"): self
.thisown
= 0
4572 self
.__class
__ = NavigationKeyEvent
4573 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4575 #---------------------------------------------------------------------------
4577 class WindowCreateEvent(CommandEvent
):
4578 """Proxy of C++ WindowCreateEvent class"""
4580 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4581 def __init__(self
, *args
, **kwargs
):
4582 """__init__(self, Window win=None) -> WindowCreateEvent"""
4583 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
4584 self
.this
= newobj
.this
4587 def GetWindow(*args
, **kwargs
):
4588 """GetWindow(self) -> Window"""
4589 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4592 class WindowCreateEventPtr(WindowCreateEvent
):
4593 def __init__(self
, this
):
4595 if not hasattr(self
,"thisown"): self
.thisown
= 0
4596 self
.__class
__ = WindowCreateEvent
4597 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4599 class WindowDestroyEvent(CommandEvent
):
4600 """Proxy of C++ WindowDestroyEvent class"""
4602 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4603 def __init__(self
, *args
, **kwargs
):
4604 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4605 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
4606 self
.this
= newobj
.this
4609 def GetWindow(*args
, **kwargs
):
4610 """GetWindow(self) -> Window"""
4611 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4614 class WindowDestroyEventPtr(WindowDestroyEvent
):
4615 def __init__(self
, this
):
4617 if not hasattr(self
,"thisown"): self
.thisown
= 0
4618 self
.__class
__ = WindowDestroyEvent
4619 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4621 #---------------------------------------------------------------------------
4623 class ContextMenuEvent(CommandEvent
):
4624 """Proxy of C++ ContextMenuEvent class"""
4626 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4627 def __init__(self
, *args
, **kwargs
):
4628 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4629 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
4630 self
.this
= newobj
.this
4633 def GetPosition(*args
, **kwargs
):
4634 """GetPosition(self) -> Point"""
4635 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4637 def SetPosition(*args
, **kwargs
):
4638 """SetPosition(self, Point pos)"""
4639 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4642 class ContextMenuEventPtr(ContextMenuEvent
):
4643 def __init__(self
, this
):
4645 if not hasattr(self
,"thisown"): self
.thisown
= 0
4646 self
.__class
__ = ContextMenuEvent
4647 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4649 #---------------------------------------------------------------------------
4651 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
4652 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
4653 class IdleEvent(Event
):
4654 """Proxy of C++ IdleEvent class"""
4656 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4657 def __init__(self
, *args
, **kwargs
):
4658 """__init__(self) -> IdleEvent"""
4659 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
4660 self
.this
= newobj
.this
4663 def RequestMore(*args
, **kwargs
):
4664 """RequestMore(self, bool needMore=True)"""
4665 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
4667 def MoreRequested(*args
, **kwargs
):
4668 """MoreRequested(self) -> bool"""
4669 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
4671 def SetMode(*args
, **kwargs
):
4672 """SetMode(int mode)"""
4673 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4675 SetMode
= staticmethod(SetMode
)
4676 def GetMode(*args
, **kwargs
):
4677 """GetMode() -> int"""
4678 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4680 GetMode
= staticmethod(GetMode
)
4681 def CanSend(*args
, **kwargs
):
4682 """CanSend(Window win) -> bool"""
4683 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4685 CanSend
= staticmethod(CanSend
)
4687 class IdleEventPtr(IdleEvent
):
4688 def __init__(self
, this
):
4690 if not hasattr(self
,"thisown"): self
.thisown
= 0
4691 self
.__class
__ = IdleEvent
4692 _core_
.IdleEvent_swigregister(IdleEventPtr
)
4694 def IdleEvent_SetMode(*args
, **kwargs
):
4695 """IdleEvent_SetMode(int mode)"""
4696 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4698 def IdleEvent_GetMode(*args
, **kwargs
):
4699 """IdleEvent_GetMode() -> int"""
4700 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4702 def IdleEvent_CanSend(*args
, **kwargs
):
4703 """IdleEvent_CanSend(Window win) -> bool"""
4704 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4706 #---------------------------------------------------------------------------
4708 class PyEvent(Event
):
4709 """Proxy of C++ PyEvent class"""
4711 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4712 def __init__(self
, *args
, **kwargs
):
4713 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4714 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
4715 self
.this
= newobj
.this
4720 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
4723 if self
.thisown
: destroy(self
)
4726 def SetSelf(*args
, **kwargs
):
4727 """SetSelf(self, PyObject self)"""
4728 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
4730 def GetSelf(*args
, **kwargs
):
4731 """GetSelf(self) -> PyObject"""
4732 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
4735 class PyEventPtr(PyEvent
):
4736 def __init__(self
, this
):
4738 if not hasattr(self
,"thisown"): self
.thisown
= 0
4739 self
.__class
__ = PyEvent
4740 _core_
.PyEvent_swigregister(PyEventPtr
)
4742 class PyCommandEvent(CommandEvent
):
4743 """Proxy of C++ PyCommandEvent class"""
4745 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4746 def __init__(self
, *args
, **kwargs
):
4747 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4748 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
4749 self
.this
= newobj
.this
4754 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
4757 if self
.thisown
: destroy(self
)
4760 def SetSelf(*args
, **kwargs
):
4761 """SetSelf(self, PyObject self)"""
4762 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4764 def GetSelf(*args
, **kwargs
):
4765 """GetSelf(self) -> PyObject"""
4766 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4769 class PyCommandEventPtr(PyCommandEvent
):
4770 def __init__(self
, this
):
4772 if not hasattr(self
,"thisown"): self
.thisown
= 0
4773 self
.__class
__ = PyCommandEvent
4774 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4776 #---------------------------------------------------------------------------
4778 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
4779 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
4780 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
4781 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
4782 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
4783 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
4784 class PyApp(EvtHandler
):
4786 The ``wx.PyApp`` class is an *implementation detail*, please use the
4787 `wx.App` class (or some other derived class) instead.
4790 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4791 def __init__(self
, *args
, **kwargs
):
4793 __init__(self) -> PyApp
4795 Create a new application object, starting the bootstrap process.
4797 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
4798 self
.this
= newobj
.this
4801 self
._setCallbackInfo
(self
, PyApp
)
4802 self
._setOORInfo
(self
)
4804 def __del__(self
, destroy
=_core_
.delete_PyApp
):
4807 if self
.thisown
: destroy(self
)
4810 def _setCallbackInfo(*args
, **kwargs
):
4811 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4812 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
4814 def GetAppName(*args
, **kwargs
):
4816 GetAppName(self) -> String
4818 Get the application name.
4820 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
4822 def SetAppName(*args
, **kwargs
):
4824 SetAppName(self, String name)
4826 Set the application name. This value may be used automatically by
4827 `wx.Config` and such.
4829 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
4831 def GetClassName(*args
, **kwargs
):
4833 GetClassName(self) -> String
4835 Get the application's class name.
4837 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
4839 def SetClassName(*args
, **kwargs
):
4841 SetClassName(self, String name)
4843 Set the application's class name. This value may be used for
4844 X-resources if applicable for the platform
4846 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
4848 def GetVendorName(*args
, **kwargs
):
4850 GetVendorName(self) -> String
4852 Get the application's vendor name.
4854 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
4856 def SetVendorName(*args
, **kwargs
):
4858 SetVendorName(self, String name)
4860 Set the application's vendor name. This value may be used
4861 automatically by `wx.Config` and such.
4863 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
4865 def GetTraits(*args
, **kwargs
):
4867 GetTraits(self) -> wxAppTraits
4869 Return (and create if necessary) the app traits object to which we
4870 delegate for everything which either should be configurable by the
4871 user (then he can change the default behaviour simply by overriding
4872 CreateTraits() and returning his own traits object) or which is
4873 GUI/console dependent as then wx.AppTraits allows us to abstract the
4874 differences behind the common facade.
4876 :todo: Add support for overriding CreateAppTraits in wxPython.
4878 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
4880 def ProcessPendingEvents(*args
, **kwargs
):
4882 ProcessPendingEvents(self)
4884 Process all events in the Pending Events list -- it is necessary to
4885 call this function to process posted events. This normally happens
4886 during each event loop iteration.
4888 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4890 def Yield(*args
, **kwargs
):
4892 Yield(self, bool onlyIfNeeded=False) -> bool
4894 Process all currently pending events right now, instead of waiting
4895 until return to the event loop. It is an error to call ``Yield``
4896 recursively unless the value of ``onlyIfNeeded`` is True.
4898 :warning: This function is dangerous as it can lead to unexpected
4899 reentrancies (i.e. when called from an event handler it may
4900 result in calling the same event handler again), use with
4901 extreme care or, better, don't use at all!
4903 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4906 return _core_
.PyApp_Yield(*args
, **kwargs
)
4908 def WakeUpIdle(*args
, **kwargs
):
4912 Make sure that idle events are sent again.
4913 :see: `wx.WakeUpIdle`
4915 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
4917 def IsMainLoopRunning(*args
, **kwargs
):
4919 IsMainLoopRunning() -> bool
4921 Returns True if we're running the main loop, i.e. if the events can
4922 currently be dispatched.
4924 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
4926 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
4927 def MainLoop(*args
, **kwargs
):
4929 MainLoop(self) -> int
4931 Execute the main GUI loop, the function doesn't normally return until
4932 all top level windows have been closed and destroyed.
4934 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
4936 def Exit(*args
, **kwargs
):
4940 Exit the main loop thus terminating the application.
4943 return _core_
.PyApp_Exit(*args
, **kwargs
)
4945 def ExitMainLoop(*args
, **kwargs
):
4949 Exit the main GUI loop during the next iteration of the main
4950 loop, (i.e. it does not stop the program immediately!)
4952 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
4954 def Pending(*args
, **kwargs
):
4956 Pending(self) -> bool
4958 Returns True if there are unprocessed events in the event queue.
4960 return _core_
.PyApp_Pending(*args
, **kwargs
)
4962 def Dispatch(*args
, **kwargs
):
4964 Dispatch(self) -> bool
4966 Process the first event in the event queue (blocks until an event
4967 appears if there are none currently)
4969 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
4971 def ProcessIdle(*args
, **kwargs
):
4973 ProcessIdle(self) -> bool
4975 Called from the MainLoop when the application becomes idle (there are
4976 no pending events) and sends a `wx.IdleEvent` to all interested
4977 parties. Returns True if more idle events are needed, False if not.
4979 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
4981 def SendIdleEvents(*args
, **kwargs
):
4983 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4985 Send idle event to window and all subwindows. Returns True if more
4986 idle time is requested.
4988 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
4990 def IsActive(*args
, **kwargs
):
4992 IsActive(self) -> bool
4994 Return True if our app has focus.
4996 return _core_
.PyApp_IsActive(*args
, **kwargs
)
4998 def SetTopWindow(*args
, **kwargs
):
5000 SetTopWindow(self, Window win)
5002 Set the *main* top level window
5004 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
5006 def GetTopWindow(*args
, **kwargs
):
5008 GetTopWindow(self) -> Window
5010 Return the *main* top level window (if it hadn't been set previously
5011 with SetTopWindow(), will return just some top level window and, if
5012 there not any, will return None)
5014 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
5016 def SetExitOnFrameDelete(*args
, **kwargs
):
5018 SetExitOnFrameDelete(self, bool flag)
5020 Control the exit behaviour: by default, the program will exit the main
5021 loop (and so, usually, terminate) when the last top-level program
5022 window is deleted. Beware that if you disable this behaviour (with
5023 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5024 explicitly from somewhere.
5026 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
5028 def GetExitOnFrameDelete(*args
, **kwargs
):
5030 GetExitOnFrameDelete(self) -> bool
5032 Get the current exit behaviour setting.
5034 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
5036 def SetUseBestVisual(*args
, **kwargs
):
5038 SetUseBestVisual(self, bool flag)
5040 Set whether the app should try to use the best available visual on
5041 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5043 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
5045 def GetUseBestVisual(*args
, **kwargs
):
5047 GetUseBestVisual(self) -> bool
5049 Get current UseBestVisual setting.
5051 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
5053 def SetPrintMode(*args
, **kwargs
):
5054 """SetPrintMode(self, int mode)"""
5055 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
5057 def GetPrintMode(*args
, **kwargs
):
5058 """GetPrintMode(self) -> int"""
5059 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
5061 def SetAssertMode(*args
, **kwargs
):
5063 SetAssertMode(self, int mode)
5065 Set the OnAssert behaviour for debug and hybrid builds.
5067 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
5069 def GetAssertMode(*args
, **kwargs
):
5071 GetAssertMode(self) -> int
5073 Get the current OnAssert behaviour setting.
5075 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
5077 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5078 """GetMacSupportPCMenuShortcuts() -> bool"""
5079 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5081 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
5082 def GetMacAboutMenuItemId(*args
, **kwargs
):
5083 """GetMacAboutMenuItemId() -> long"""
5084 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5086 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
5087 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
5088 """GetMacPreferencesMenuItemId() -> long"""
5089 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5091 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
5092 def GetMacExitMenuItemId(*args
, **kwargs
):
5093 """GetMacExitMenuItemId() -> long"""
5094 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5096 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
5097 def GetMacHelpMenuTitleName(*args
, **kwargs
):
5098 """GetMacHelpMenuTitleName() -> String"""
5099 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5101 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
5102 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5103 """SetMacSupportPCMenuShortcuts(bool val)"""
5104 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5106 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
5107 def SetMacAboutMenuItemId(*args
, **kwargs
):
5108 """SetMacAboutMenuItemId(long val)"""
5109 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5111 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
5112 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
5113 """SetMacPreferencesMenuItemId(long val)"""
5114 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5116 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
5117 def SetMacExitMenuItemId(*args
, **kwargs
):
5118 """SetMacExitMenuItemId(long val)"""
5119 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5121 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
5122 def SetMacHelpMenuTitleName(*args
, **kwargs
):
5123 """SetMacHelpMenuTitleName(String val)"""
5124 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5126 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
5127 def _BootstrapApp(*args
, **kwargs
):
5131 For internal use only
5133 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
5135 def GetComCtl32Version(*args
, **kwargs
):
5137 GetComCtl32Version() -> int
5139 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5140 it wasn't found at all. Raises an exception on non-Windows platforms.
5142 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5144 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
5146 class PyAppPtr(PyApp
):
5147 def __init__(self
, this
):
5149 if not hasattr(self
,"thisown"): self
.thisown
= 0
5150 self
.__class
__ = PyApp
5151 _core_
.PyApp_swigregister(PyAppPtr
)
5153 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5155 PyApp_IsMainLoopRunning() -> bool
5157 Returns True if we're running the main loop, i.e. if the events can
5158 currently be dispatched.
5160 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5162 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5163 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5164 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5166 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5167 """PyApp_GetMacAboutMenuItemId() -> long"""
5168 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5170 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5171 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5172 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5174 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5175 """PyApp_GetMacExitMenuItemId() -> long"""
5176 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5178 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5179 """PyApp_GetMacHelpMenuTitleName() -> String"""
5180 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5182 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5183 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5184 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5186 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5187 """PyApp_SetMacAboutMenuItemId(long val)"""
5188 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5190 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5191 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5192 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5194 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5195 """PyApp_SetMacExitMenuItemId(long val)"""
5196 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5198 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5199 """PyApp_SetMacHelpMenuTitleName(String val)"""
5200 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5202 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5204 PyApp_GetComCtl32Version() -> int
5206 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5207 it wasn't found at all. Raises an exception on non-Windows platforms.
5209 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5211 #---------------------------------------------------------------------------
5214 def Exit(*args
, **kwargs
):
5218 Force an exit of the application. Convenience for wx.GetApp().Exit()
5220 return _core_
.Exit(*args
, **kwargs
)
5222 def Yield(*args
, **kwargs
):
5226 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5228 return _core_
.Yield(*args
, **kwargs
)
5230 def YieldIfNeeded(*args
, **kwargs
):
5232 YieldIfNeeded() -> bool
5234 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5236 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5238 def SafeYield(*args
, **kwargs
):
5240 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5242 This function is similar to `wx.Yield`, except that it disables the
5243 user input to all program windows before calling `wx.Yield` and
5244 re-enables it again afterwards. If ``win`` is not None, this window
5245 will remain enabled, allowing the implementation of some limited user
5248 :Returns: the result of the call to `wx.Yield`.
5250 return _core_
.SafeYield(*args
, **kwargs
)
5252 def WakeUpIdle(*args
, **kwargs
):
5256 Cause the message queue to become empty again, so idle events will be
5259 return _core_
.WakeUpIdle(*args
, **kwargs
)
5261 def PostEvent(*args
, **kwargs
):
5263 PostEvent(EvtHandler dest, Event event)
5265 Send an event to a window or other wx.EvtHandler to be processed
5268 return _core_
.PostEvent(*args
, **kwargs
)
5270 def App_CleanUp(*args
, **kwargs
):
5274 For internal use only, it is used to cleanup after wxWidgets when
5277 return _core_
.App_CleanUp(*args
, **kwargs
)
5279 def GetApp(*args
, **kwargs
):
5283 Return a reference to the current wx.App object.
5285 return _core_
.GetApp(*args
, **kwargs
)
5287 def SetDefaultPyEncoding(*args
, **kwargs
):
5289 SetDefaultPyEncoding(string encoding)
5291 Sets the encoding that wxPython will use when it needs to convert a
5292 Python string or unicode object to or from a wxString.
5294 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5295 but please be aware that the default encoding within the same locale
5296 may be slightly different on different platforms. For example, please
5297 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5298 between the common latin/roman encodings.
5300 return _core_
.SetDefaultPyEncoding(*args
, **kwargs
)
5302 def GetDefaultPyEncoding(*args
, **kwargs
):
5304 GetDefaultPyEncoding() -> string
5306 Gets the current encoding that wxPython will use when it needs to
5307 convert a Python string or unicode object to or from a wxString.
5309 return _core_
.GetDefaultPyEncoding(*args
, **kwargs
)
5310 #----------------------------------------------------------------------
5312 class PyOnDemandOutputWindow
:
5314 A class that can be used for redirecting Python's stdout and
5315 stderr streams. It will do nothing until something is wrriten to
5316 the stream at which point it will create a Frame with a text area
5317 and write the text there.
5319 def __init__(self
, title
= "wxPython: stdout/stderr"):
5322 self
.pos
= wx
.DefaultPosition
5323 self
.size
= (450, 300)
5326 def SetParent(self
, parent
):
5327 """Set the window to be used as the popup Frame's parent."""
5328 self
.parent
= parent
5331 def CreateOutputWindow(self
, st
):
5332 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
5333 style
=wx
.DEFAULT_FRAME_STYLE
)
5334 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
5335 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
5336 self
.text
.AppendText(st
)
5337 self
.frame
.Show(True)
5338 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
5341 def OnCloseWindow(self
, event
):
5342 if self
.frame
is not None:
5343 self
.frame
.Destroy()
5348 # These methods provide the file-like output behaviour.
5349 def write(self
, text
):
5351 Create the output window if needed and write the string to it.
5352 If not called in the context of the gui thread then uses
5353 CallAfter to do the work there.
5355 if self
.frame
is None:
5356 if not wx
.Thread_IsMain():
5357 wx
.CallAfter(self
.CreateOutputWindow
, text
)
5359 self
.CreateOutputWindow(text
)
5361 if not wx
.Thread_IsMain():
5362 wx
.CallAfter(self
.text
.AppendText
, text
)
5364 self
.text
.AppendText(text
)
5368 if self
.frame
is not None:
5369 wx
.CallAfter(self
.frame
.Close
)
5377 #----------------------------------------------------------------------
5379 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5381 class App(wx
.PyApp
):
5383 The ``wx.App`` class represents the application and is used to:
5385 * bootstrap the wxPython system and initialize the underlying
5387 * set and get application-wide properties
5388 * implement the windowing system main message or event loop,
5389 and to dispatch events to window instances
5392 Every application must have a ``wx.App`` instance, and all
5393 creation of UI objects should be delayed until after the
5394 ``wx.App`` object has been created in order to ensure that the gui
5395 platform and wxWidgets have been fully initialized.
5397 Normally you would derive from this class and implement an
5398 ``OnInit`` method that creates a frame and then calls
5399 ``self.SetTopWindow(frame)``.
5401 :see: `wx.PySimpleApp` for a simpler app class that can be used
5405 outputWindowClass
= PyOnDemandOutputWindow
5407 def __init__(self
, redirect
=_defRedirect
, filename
=None,
5408 useBestVisual
=False, clearSigInt
=True):
5410 Construct a ``wx.App`` object.
5412 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5413 redirected? Defaults to True on Windows and Mac, False
5414 otherwise. If `filename` is None then output will be
5415 redirected to a window that pops up as needed. (You can
5416 control what kind of window is created for the output by
5417 resetting the class variable ``outputWindowClass`` to a
5418 class of your choosing.)
5420 :param filename: The name of a file to redirect output to, if
5423 :param useBestVisual: Should the app try to use the best
5424 available visual provided by the system (only relevant on
5425 systems that have more than one visual.) This parameter
5426 must be used instead of calling `SetUseBestVisual` later
5427 on because it must be set before the underlying GUI
5428 toolkit is initialized.
5430 :param clearSigInt: Should SIGINT be cleared? This allows the
5431 app to terminate upon a Ctrl-C in the console like other
5434 :note: You should override OnInit to do applicaition
5435 initialization to ensure that the system, toolkit and
5436 wxWidgets are fully initialized.
5438 wx
.PyApp
.__init
__(self
)
5440 if wx
.Platform
== "__WXMAC__":
5443 if not MacOS
.WMAvailable():
5445 This program needs access to the screen. Please run with 'pythonw',
5446 not 'python', and only when you are logged in on the main display of
5454 # This has to be done before OnInit
5455 self
.SetUseBestVisual(useBestVisual
)
5457 # Set the default handler for SIGINT. This fixes a problem
5458 # where if Ctrl-C is pressed in the console that started this
5459 # app then it will not appear to do anything, (not even send
5460 # KeyboardInterrupt???) but will later segfault on exit. By
5461 # setting the default handler then the app will exit, as
5462 # expected (depending on platform.)
5466 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5470 # Save and redirect the stdio to a window?
5471 self
.stdioWin
= None
5472 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5474 self
.RedirectStdio(filename
)
5476 # Use Python's install prefix as the default
5477 wx
.StandardPaths
.Get().SetInstallPrefix(_sys
.prefix
)
5479 # This finishes the initialization of wxWindows and then calls
5480 # the OnInit that should be present in the derived class
5481 self
._BootstrapApp
()
5486 self
.RestoreStdio() # Just in case the MainLoop was overridden
5491 def SetTopWindow(self
, frame
):
5492 """Set the \"main\" top level window"""
5494 self
.stdioWin
.SetParent(frame
)
5495 wx
.PyApp
.SetTopWindow(self
, frame
)
5499 """Execute the main GUI event loop"""
5500 wx
.PyApp
.MainLoop(self
)
5504 def RedirectStdio(self
, filename
=None):
5505 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5507 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5509 self
.stdioWin
= self
.outputWindowClass()
5510 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5513 def RestoreStdio(self
):
5514 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5517 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
5519 Set the title, position and/or size of the output window if
5520 the stdio has been redirected. This should be called before
5521 any output would cause the output window to be created.
5524 if title
is not None:
5525 self
.stdioWin
.title
= title
5527 self
.stdioWin
.pos
= pos
5528 if size
is not None:
5529 self
.stdioWin
.size
= size
5534 # change from wx.PyApp_XX to wx.App_XX
5535 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
5536 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
5537 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
5538 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
5539 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
5540 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
5541 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
5542 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
5543 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
5544 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
5545 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
5547 #----------------------------------------------------------------------------
5549 class PySimpleApp(wx
.App
):
5551 A simple application class. You can just create one of these and
5552 then then make your top level windows later, and not have to worry
5553 about OnInit. For example::
5555 app = wx.PySimpleApp()
5556 frame = wx.Frame(None, title='Hello World')
5563 def __init__(self
, redirect
=False, filename
=None,
5564 useBestVisual
=False, clearSigInt
=True):
5566 :see: `wx.App.__init__`
5568 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
5575 # Is anybody using this one?
5576 class PyWidgetTester(wx
.App
):
5577 def __init__(self
, size
= (250, 100)):
5579 wx
.App
.__init
__(self
, 0)
5582 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5583 self
.SetTopWindow(self
.frame
)
5586 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
5587 w
= widgetClass(self
.frame
, *args
, **kwargs
)
5588 self
.frame
.Show(True)
5590 #----------------------------------------------------------------------------
5591 # DO NOT hold any other references to this object. This is how we
5592 # know when to cleanup system resources that wxWidgets is holding. When
5593 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5594 # goes to zero and it calls the wx.App_CleanUp function.
5596 class __wxPyCleanup
:
5598 self
.cleanup
= _core_
.App_CleanUp
5602 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5604 ## # another possible solution, but it gets called too early...
5606 ## atexit.register(_core_.wxApp_CleanUp)
5609 #----------------------------------------------------------------------------
5611 #---------------------------------------------------------------------------
5613 class EventLoop(object):
5614 """Proxy of C++ EventLoop class"""
5616 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5617 def __init__(self
, *args
, **kwargs
):
5618 """__init__(self) -> EventLoop"""
5619 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
5620 self
.this
= newobj
.this
5623 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
5626 if self
.thisown
: destroy(self
)
5629 def Run(*args
, **kwargs
):
5630 """Run(self) -> int"""
5631 return _core_
.EventLoop_Run(*args
, **kwargs
)
5633 def Exit(*args
, **kwargs
):
5634 """Exit(self, int rc=0)"""
5635 return _core_
.EventLoop_Exit(*args
, **kwargs
)
5637 def Pending(*args
, **kwargs
):
5638 """Pending(self) -> bool"""
5639 return _core_
.EventLoop_Pending(*args
, **kwargs
)
5641 def Dispatch(*args
, **kwargs
):
5642 """Dispatch(self) -> bool"""
5643 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
5645 def IsRunning(*args
, **kwargs
):
5646 """IsRunning(self) -> bool"""
5647 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
5649 def GetActive(*args
, **kwargs
):
5650 """GetActive() -> EventLoop"""
5651 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5653 GetActive
= staticmethod(GetActive
)
5654 def SetActive(*args
, **kwargs
):
5655 """SetActive(EventLoop loop)"""
5656 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5658 SetActive
= staticmethod(SetActive
)
5660 class EventLoopPtr(EventLoop
):
5661 def __init__(self
, this
):
5663 if not hasattr(self
,"thisown"): self
.thisown
= 0
5664 self
.__class
__ = EventLoop
5665 _core_
.EventLoop_swigregister(EventLoopPtr
)
5667 def EventLoop_GetActive(*args
, **kwargs
):
5668 """EventLoop_GetActive() -> EventLoop"""
5669 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5671 def EventLoop_SetActive(*args
, **kwargs
):
5672 """EventLoop_SetActive(EventLoop loop)"""
5673 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5675 #---------------------------------------------------------------------------
5677 class AcceleratorEntry(object):
5679 A class used to define items in an `wx.AcceleratorTable`. wxPython
5680 programs can choose to use wx.AcceleratorEntry objects, but using a
5681 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5682 as well. See `__init__` for of the tuple values.
5684 :see: `wx.AcceleratorTable`
5687 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5688 def __init__(self
, *args
, **kwargs
):
5690 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5692 Construct a wx.AcceleratorEntry.
5694 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
5695 self
.this
= newobj
.this
5698 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
5701 if self
.thisown
: destroy(self
)
5704 def Set(*args
, **kwargs
):
5706 Set(self, int flags, int keyCode, int cmd)
5708 (Re)set the attributes of a wx.AcceleratorEntry.
5711 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
5713 def GetFlags(*args
, **kwargs
):
5715 GetFlags(self) -> int
5717 Get the AcceleratorEntry's flags.
5719 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5721 def GetKeyCode(*args
, **kwargs
):
5723 GetKeyCode(self) -> int
5725 Get the AcceleratorEntry's keycode.
5727 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5729 def GetCommand(*args
, **kwargs
):
5731 GetCommand(self) -> int
5733 Get the AcceleratorEntry's command ID.
5735 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5738 class AcceleratorEntryPtr(AcceleratorEntry
):
5739 def __init__(self
, this
):
5741 if not hasattr(self
,"thisown"): self
.thisown
= 0
5742 self
.__class
__ = AcceleratorEntry
5743 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5745 class AcceleratorTable(Object
):
5747 An accelerator table allows the application to specify a table of
5748 keyboard shortcuts for menus or other commands. On Windows, menu or
5749 button commands are supported; on GTK, only menu commands are
5753 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5754 def __init__(self
, *args
, **kwargs
):
5756 __init__(entries) -> AcceleratorTable
5758 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5759 items or or of 3-tuples (flags, keyCode, cmdID)
5761 :see: `wx.AcceleratorEntry`
5763 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
5764 self
.this
= newobj
.this
5767 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
5770 if self
.thisown
: destroy(self
)
5773 def Ok(*args
, **kwargs
):
5774 """Ok(self) -> bool"""
5775 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
5778 class AcceleratorTablePtr(AcceleratorTable
):
5779 def __init__(self
, this
):
5781 if not hasattr(self
,"thisown"): self
.thisown
= 0
5782 self
.__class
__ = AcceleratorTable
5783 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5786 def GetAccelFromString(*args
, **kwargs
):
5787 """GetAccelFromString(String label) -> AcceleratorEntry"""
5788 return _core_
.GetAccelFromString(*args
, **kwargs
)
5789 #---------------------------------------------------------------------------
5791 class VisualAttributes(object):
5792 """struct containing all the visual attributes of a control"""
5794 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5795 def __init__(self
, *args
, **kwargs
):
5797 __init__(self) -> VisualAttributes
5799 struct containing all the visual attributes of a control
5801 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
5802 self
.this
= newobj
.this
5805 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
5808 if self
.thisown
: destroy(self
)
5811 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
5812 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
5813 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
5815 class VisualAttributesPtr(VisualAttributes
):
5816 def __init__(self
, this
):
5818 if not hasattr(self
,"thisown"): self
.thisown
= 0
5819 self
.__class
__ = VisualAttributes
5820 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
5821 NullAcceleratorTable
= cvar
.NullAcceleratorTable
5822 PanelNameStr
= cvar
.PanelNameStr
5824 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
5825 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
5826 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
5827 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
5828 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
5829 class Window(EvtHandler
):
5831 wx.Window is the base class for all windows and represents any visible
5832 object on the screen. All controls, top level windows and so on are
5833 wx.Windows. Sizers and device contexts are not however, as they don't
5834 appear on screen themselves.
5838 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5839 def __init__(self
, *args
, **kwargs
):
5841 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5842 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5844 Construct and show a generic Window.
5846 newobj
= _core_
.new_Window(*args
, **kwargs
)
5847 self
.this
= newobj
.this
5850 self
._setOORInfo
(self
)
5852 def Create(*args
, **kwargs
):
5854 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5855 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5857 Create the GUI part of the Window for 2-phase creation mode.
5859 return _core_
.Window_Create(*args
, **kwargs
)
5861 def Close(*args
, **kwargs
):
5863 Close(self, bool force=False) -> bool
5865 This function simply generates a EVT_CLOSE event whose handler usually
5866 tries to close the window. It doesn't close the window itself,
5867 however. If force is False (the default) then the window's close
5868 handler will be allowed to veto the destruction of the window.
5870 return _core_
.Window_Close(*args
, **kwargs
)
5872 def Destroy(*args
, **kwargs
):
5874 Destroy(self) -> bool
5876 Destroys the window safely. Frames and dialogs are not destroyed
5877 immediately when this function is called -- they are added to a list
5878 of windows to be deleted on idle time, when all the window's events
5879 have been processed. This prevents problems with events being sent to
5880 non-existent windows.
5882 Returns True if the window has either been successfully deleted, or it
5883 has been added to the list of windows pending real deletion.
5885 return _core_
.Window_Destroy(*args
, **kwargs
)
5887 def DestroyChildren(*args
, **kwargs
):
5889 DestroyChildren(self) -> bool
5891 Destroys all children of a window. Called automatically by the
5894 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
5896 def IsBeingDeleted(*args
, **kwargs
):
5898 IsBeingDeleted(self) -> bool
5900 Is the window in the process of being deleted?
5902 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
5904 def SetTitle(*args
, **kwargs
):
5906 SetTitle(self, String title)
5908 Sets the window's title. Applicable only to frames and dialogs.
5910 return _core_
.Window_SetTitle(*args
, **kwargs
)
5912 def GetTitle(*args
, **kwargs
):
5914 GetTitle(self) -> String
5916 Gets the window's title. Applicable only to frames and dialogs.
5918 return _core_
.Window_GetTitle(*args
, **kwargs
)
5920 def SetLabel(*args
, **kwargs
):
5922 SetLabel(self, String label)
5924 Set the text which the window shows in its label if applicable.
5926 return _core_
.Window_SetLabel(*args
, **kwargs
)
5928 def GetLabel(*args
, **kwargs
):
5930 GetLabel(self) -> String
5932 Generic way of getting a label from any window, for identification
5933 purposes. The interpretation of this function differs from class to
5934 class. For frames and dialogs, the value returned is the title. For
5935 buttons or static text controls, it is the button text. This function
5936 can be useful for meta-programs such as testing tools or special-needs
5937 access programs)which need to identify windows by name.
5939 return _core_
.Window_GetLabel(*args
, **kwargs
)
5941 def SetName(*args
, **kwargs
):
5943 SetName(self, String name)
5945 Sets the window's name. The window name is used for ressource setting
5946 in X, it is not the same as the window title/label
5948 return _core_
.Window_SetName(*args
, **kwargs
)
5950 def GetName(*args
, **kwargs
):
5952 GetName(self) -> String
5954 Returns the windows name. This name is not guaranteed to be unique;
5955 it is up to the programmer to supply an appropriate name in the window
5956 constructor or via wx.Window.SetName.
5958 return _core_
.Window_GetName(*args
, **kwargs
)
5960 def SetWindowVariant(*args
, **kwargs
):
5962 SetWindowVariant(self, int variant)
5964 Sets the variant of the window/font size to use for this window, if
5965 the platform supports variants, for example, wxMac.
5967 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
5969 def GetWindowVariant(*args
, **kwargs
):
5970 """GetWindowVariant(self) -> int"""
5971 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
5973 def SetId(*args
, **kwargs
):
5975 SetId(self, int winid)
5977 Sets the identifier of the window. Each window has an integer
5978 identifier. If the application has not provided one, an identifier
5979 will be generated. Normally, the identifier should be provided on
5980 creation and should not be modified subsequently.
5982 return _core_
.Window_SetId(*args
, **kwargs
)
5984 def GetId(*args
, **kwargs
):
5988 Returns the identifier of the window. Each window has an integer
5989 identifier. If the application has not provided one (or the default Id
5990 -1 is used) then an unique identifier with a negative value will be
5993 return _core_
.Window_GetId(*args
, **kwargs
)
5995 def NewControlId(*args
, **kwargs
):
5997 NewControlId() -> int
5999 Generate a control id for the controls which were not given one.
6001 return _core_
.Window_NewControlId(*args
, **kwargs
)
6003 NewControlId
= staticmethod(NewControlId
)
6004 def NextControlId(*args
, **kwargs
):
6006 NextControlId(int winid) -> int
6008 Get the id of the control following the one with the given
6011 return _core_
.Window_NextControlId(*args
, **kwargs
)
6013 NextControlId
= staticmethod(NextControlId
)
6014 def PrevControlId(*args
, **kwargs
):
6016 PrevControlId(int winid) -> int
6018 Get the id of the control preceding the one with the given
6021 return _core_
.Window_PrevControlId(*args
, **kwargs
)
6023 PrevControlId
= staticmethod(PrevControlId
)
6024 def SetSize(*args
, **kwargs
):
6026 SetSize(self, Size size)
6028 Sets the size of the window in pixels.
6030 return _core_
.Window_SetSize(*args
, **kwargs
)
6032 def SetDimensions(*args
, **kwargs
):
6034 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6036 Sets the position and size of the window in pixels. The sizeFlags
6037 parameter indicates the interpretation of the other params if they are
6040 ======================== ======================================
6041 wx.SIZE_AUTO A -1 indicates that a class-specific
6042 default should be used.
6043 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6044 -1 values are supplied.
6045 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6046 interpreted as real dimensions, not
6048 ======================== ======================================
6051 return _core_
.Window_SetDimensions(*args
, **kwargs
)
6053 def SetRect(*args
, **kwargs
):
6055 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6057 Sets the position and size of the window in pixels using a wx.Rect.
6059 return _core_
.Window_SetRect(*args
, **kwargs
)
6061 def SetSizeWH(*args
, **kwargs
):
6063 SetSizeWH(self, int width, int height)
6065 Sets the size of the window in pixels.
6067 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
6069 def Move(*args
, **kwargs
):
6071 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6073 Moves the window to the given position.
6075 return _core_
.Window_Move(*args
, **kwargs
)
6078 def MoveXY(*args
, **kwargs
):
6080 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6082 Moves the window to the given position.
6084 return _core_
.Window_MoveXY(*args
, **kwargs
)
6086 def SetBestFittingSize(*args
, **kwargs
):
6088 SetBestFittingSize(self, Size size=DefaultSize)
6090 A 'Smart' SetSize that will fill in default size components with the
6091 window's *best size* values. Also set's the minsize for use with sizers.
6093 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
6095 def Raise(*args
, **kwargs
):
6099 Raises the window to the top of the window hierarchy if it is a
6100 managed window (dialog or frame).
6102 return _core_
.Window_Raise(*args
, **kwargs
)
6104 def Lower(*args
, **kwargs
):
6108 Lowers the window to the bottom of the window hierarchy if it is a
6109 managed window (dialog or frame).
6111 return _core_
.Window_Lower(*args
, **kwargs
)
6113 def SetClientSize(*args
, **kwargs
):
6115 SetClientSize(self, Size size)
6117 This sets the size of the window client area in pixels. Using this
6118 function to size a window tends to be more device-independent than
6119 wx.Window.SetSize, since the application need not worry about what
6120 dimensions the border or title bar have when trying to fit the window
6121 around panel items, for example.
6123 return _core_
.Window_SetClientSize(*args
, **kwargs
)
6125 def SetClientSizeWH(*args
, **kwargs
):
6127 SetClientSizeWH(self, int width, int height)
6129 This sets the size of the window client area in pixels. Using this
6130 function to size a window tends to be more device-independent than
6131 wx.Window.SetSize, since the application need not worry about what
6132 dimensions the border or title bar have when trying to fit the window
6133 around panel items, for example.
6135 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
6137 def SetClientRect(*args
, **kwargs
):
6139 SetClientRect(self, Rect rect)
6141 This sets the size of the window client area in pixels. Using this
6142 function to size a window tends to be more device-independent than
6143 wx.Window.SetSize, since the application need not worry about what
6144 dimensions the border or title bar have when trying to fit the window
6145 around panel items, for example.
6147 return _core_
.Window_SetClientRect(*args
, **kwargs
)
6149 def GetPosition(*args
, **kwargs
):
6151 GetPosition(self) -> Point
6153 Get the window's position.
6155 return _core_
.Window_GetPosition(*args
, **kwargs
)
6157 def GetPositionTuple(*args
, **kwargs
):
6159 GetPositionTuple() -> (x,y)
6161 Get the window's position.
6163 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
6165 def GetSize(*args
, **kwargs
):
6167 GetSize(self) -> Size
6169 Get the window size.
6171 return _core_
.Window_GetSize(*args
, **kwargs
)
6173 def GetSizeTuple(*args
, **kwargs
):
6175 GetSizeTuple() -> (width, height)
6177 Get the window size.
6179 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
6181 def GetRect(*args
, **kwargs
):
6183 GetRect(self) -> Rect
6185 Returns the size and position of the window as a wx.Rect object.
6187 return _core_
.Window_GetRect(*args
, **kwargs
)
6189 def GetClientSize(*args
, **kwargs
):
6191 GetClientSize(self) -> Size
6193 This gets the size of the window's 'client area' in pixels. The client
6194 area is the area which may be drawn on by the programmer, excluding
6195 title bar, border, scrollbars, etc.
6197 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6199 def GetClientSizeTuple(*args
, **kwargs
):
6201 GetClientSizeTuple() -> (width, height)
6203 This gets the size of the window's 'client area' in pixels. The client
6204 area is the area which may be drawn on by the programmer, excluding
6205 title bar, border, scrollbars, etc.
6207 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6209 def GetClientAreaOrigin(*args
, **kwargs
):
6211 GetClientAreaOrigin(self) -> Point
6213 Get the origin of the client area of the window relative to the
6214 window's top left corner (the client area may be shifted because of
6215 the borders, scrollbars, other decorations...)
6217 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6219 def GetClientRect(*args
, **kwargs
):
6221 GetClientRect(self) -> Rect
6223 Get the client area position and size as a `wx.Rect` object.
6225 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6227 def GetBestSize(*args
, **kwargs
):
6229 GetBestSize(self) -> Size
6231 This function returns the best acceptable minimal size for the
6232 window, if applicable. For example, for a static text control, it will
6233 be the minimal size such that the control label is not truncated. For
6234 windows containing subwindows (suzh aswx.Panel), the size returned by
6235 this function will be the same as the size the window would have had
6238 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6240 def GetBestSizeTuple(*args
, **kwargs
):
6242 GetBestSizeTuple() -> (width, height)
6244 This function returns the best acceptable minimal size for the
6245 window, if applicable. For example, for a static text control, it will
6246 be the minimal size such that the control label is not truncated. For
6247 windows containing subwindows (suzh aswx.Panel), the size returned by
6248 this function will be the same as the size the window would have had
6251 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6253 def InvalidateBestSize(*args
, **kwargs
):
6255 InvalidateBestSize(self)
6257 Reset the cached best size value so it will be recalculated the next
6260 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6262 def GetBestFittingSize(*args
, **kwargs
):
6264 GetBestFittingSize(self) -> Size
6266 This function will merge the window's best size into the window's
6267 minimum size, giving priority to the min size components, and returns
6271 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6273 def GetAdjustedBestSize(*args
, **kwargs
):
6275 GetAdjustedBestSize(self) -> Size
6277 This method is similar to GetBestSize, except in one
6278 thing. GetBestSize should return the minimum untruncated size of the
6279 window, while this method will return the largest of BestSize and any
6280 user specified minimum size. ie. it is the minimum size the window
6281 should currently be drawn at, not the minimal size it can possibly
6284 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6286 def Center(*args
, **kwargs
):
6288 Center(self, int direction=BOTH)
6290 Centers the window. The parameter specifies the direction for
6291 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6292 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6293 on the entire screen and not on its parent window. If it is a
6294 top-level window and has no parent then it will always be centered
6295 relative to the screen.
6297 return _core_
.Window_Center(*args
, **kwargs
)
6300 def CenterOnScreen(*args
, **kwargs
):
6302 CenterOnScreen(self, int dir=BOTH)
6304 Center on screen (only works for top level windows)
6306 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6308 CentreOnScreen
= CenterOnScreen
6309 def CenterOnParent(*args
, **kwargs
):
6311 CenterOnParent(self, int dir=BOTH)
6313 Center with respect to the the parent window
6315 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6317 CentreOnParent
= CenterOnParent
6318 def Fit(*args
, **kwargs
):
6322 Sizes the window so that it fits around its subwindows. This function
6323 won't do anything if there are no subwindows and will only really work
6324 correctly if sizers are used for the subwindows layout. Also, if the
6325 window has exactly one subwindow it is better (faster and the result
6326 is more precise as Fit adds some margin to account for fuzziness of
6327 its calculations) to call window.SetClientSize(child.GetSize())
6328 instead of calling Fit.
6330 return _core_
.Window_Fit(*args
, **kwargs
)
6332 def FitInside(*args
, **kwargs
):
6336 Similar to Fit, but sizes the interior (virtual) size of a
6337 window. Mainly useful with scrolled windows to reset scrollbars after
6338 sizing changes that do not trigger a size event, and/or scrolled
6339 windows without an interior sizer. This function similarly won't do
6340 anything if there are no subwindows.
6342 return _core_
.Window_FitInside(*args
, **kwargs
)
6344 def SetSizeHints(*args
, **kwargs
):
6346 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6349 Allows specification of minimum and maximum window sizes, and window
6350 size increments. If a pair of values is not set (or set to -1), the
6351 default values will be used. If this function is called, the user
6352 will not be able to size the window outside the given bounds (if it is
6353 a top-level window.) Sizers will also inspect the minimum window size
6354 and will use that value if set when calculating layout.
6356 The resizing increments are only significant under Motif or Xt.
6358 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
6360 def SetSizeHintsSz(*args
, **kwargs
):
6362 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6364 Allows specification of minimum and maximum window sizes, and window
6365 size increments. If a pair of values is not set (or set to -1), the
6366 default values will be used. If this function is called, the user
6367 will not be able to size the window outside the given bounds (if it is
6368 a top-level window.) Sizers will also inspect the minimum window size
6369 and will use that value if set when calculating layout.
6371 The resizing increments are only significant under Motif or Xt.
6373 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
6375 def SetVirtualSizeHints(*args
, **kwargs
):
6377 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6379 Allows specification of minimum and maximum virtual window sizes. If a
6380 pair of values is not set (or set to -1), the default values will be
6381 used. If this function is called, the user will not be able to size
6382 the virtual area of the window outside the given bounds.
6384 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
6386 def SetVirtualSizeHintsSz(*args
, **kwargs
):
6388 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6390 Allows specification of minimum and maximum virtual window sizes. If a
6391 pair of values is not set (or set to -1), the default values will be
6392 used. If this function is called, the user will not be able to size
6393 the virtual area of the window outside the given bounds.
6395 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
6397 def GetMaxSize(*args
, **kwargs
):
6398 """GetMaxSize(self) -> Size"""
6399 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
6401 def GetMinSize(*args
, **kwargs
):
6402 """GetMinSize(self) -> Size"""
6403 return _core_
.Window_GetMinSize(*args
, **kwargs
)
6405 def SetMinSize(*args
, **kwargs
):
6407 SetMinSize(self, Size minSize)
6409 A more convenient method than `SetSizeHints` for setting just the
6412 return _core_
.Window_SetMinSize(*args
, **kwargs
)
6414 def SetMaxSize(*args
, **kwargs
):
6416 SetMaxSize(self, Size maxSize)
6418 A more convenient method than `SetSizeHints` for setting just the
6421 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
6423 def GetMinWidth(*args
, **kwargs
):
6424 """GetMinWidth(self) -> int"""
6425 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
6427 def GetMinHeight(*args
, **kwargs
):
6428 """GetMinHeight(self) -> int"""
6429 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
6431 def GetMaxWidth(*args
, **kwargs
):
6432 """GetMaxWidth(self) -> int"""
6433 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
6435 def GetMaxHeight(*args
, **kwargs
):
6436 """GetMaxHeight(self) -> int"""
6437 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
6439 def SetVirtualSize(*args
, **kwargs
):
6441 SetVirtualSize(self, Size size)
6443 Set the the virtual size of a window in pixels. For most windows this
6444 is just the client area of the window, but for some like scrolled
6445 windows it is more or less independent of the screen window size.
6447 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
6449 def SetVirtualSizeWH(*args
, **kwargs
):
6451 SetVirtualSizeWH(self, int w, int h)
6453 Set the the virtual size of a window in pixels. For most windows this
6454 is just the client area of the window, but for some like scrolled
6455 windows it is more or less independent of the screen window size.
6457 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
6459 def GetVirtualSize(*args
, **kwargs
):
6461 GetVirtualSize(self) -> Size
6463 Get the the virtual size of the window in pixels. For most windows
6464 this is just the client area of the window, but for some like scrolled
6465 windows it is more or less independent of the screen window size.
6467 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
6469 def GetVirtualSizeTuple(*args
, **kwargs
):
6471 GetVirtualSizeTuple() -> (width, height)
6473 Get the the virtual size of the window in pixels. For most windows
6474 this is just the client area of the window, but for some like scrolled
6475 windows it is more or less independent of the screen window size.
6477 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
6479 def GetBestVirtualSize(*args
, **kwargs
):
6481 GetBestVirtualSize(self) -> Size
6483 Return the largest of ClientSize and BestSize (as determined by a
6484 sizer, interior children, or other means)
6486 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
6488 def Show(*args
, **kwargs
):
6490 Show(self, bool show=True) -> bool
6492 Shows or hides the window. You may need to call Raise for a top level
6493 window if you want to bring it to top, although this is not needed if
6494 Show is called immediately after the frame creation. Returns True if
6495 the window has been shown or hidden or False if nothing was done
6496 because it already was in the requested state.
6498 return _core_
.Window_Show(*args
, **kwargs
)
6500 def Hide(*args
, **kwargs
):
6504 Equivalent to calling Show(False).
6506 return _core_
.Window_Hide(*args
, **kwargs
)
6508 def Enable(*args
, **kwargs
):
6510 Enable(self, bool enable=True) -> bool
6512 Enable or disable the window for user input. Note that when a parent
6513 window is disabled, all of its children are disabled as well and they
6514 are reenabled again when the parent is. Returns true if the window
6515 has been enabled or disabled, false if nothing was done, i.e. if the
6516 window had already been in the specified state.
6518 return _core_
.Window_Enable(*args
, **kwargs
)
6520 def Disable(*args
, **kwargs
):
6522 Disable(self) -> bool
6524 Disables the window, same as Enable(false).
6526 return _core_
.Window_Disable(*args
, **kwargs
)
6528 def IsShown(*args
, **kwargs
):
6530 IsShown(self) -> bool
6532 Returns true if the window is shown, false if it has been hidden.
6534 return _core_
.Window_IsShown(*args
, **kwargs
)
6536 def IsEnabled(*args
, **kwargs
):
6538 IsEnabled(self) -> bool
6540 Returns true if the window is enabled for input, false otherwise.
6542 return _core_
.Window_IsEnabled(*args
, **kwargs
)
6544 def SetWindowStyleFlag(*args
, **kwargs
):
6546 SetWindowStyleFlag(self, long style)
6548 Sets the style of the window. Please note that some styles cannot be
6549 changed after the window creation and that Refresh() might need to be
6550 called after changing the others for the change to take place
6553 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
6555 def GetWindowStyleFlag(*args
, **kwargs
):
6557 GetWindowStyleFlag(self) -> long
6559 Gets the window style that was passed to the constructor or Create
6562 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
6564 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
6565 def HasFlag(*args
, **kwargs
):
6567 HasFlag(self, int flag) -> bool
6569 Test if the given style is set for this window.
6571 return _core_
.Window_HasFlag(*args
, **kwargs
)
6573 def IsRetained(*args
, **kwargs
):
6575 IsRetained(self) -> bool
6577 Returns true if the window is retained, false otherwise. Retained
6578 windows are only available on X platforms.
6580 return _core_
.Window_IsRetained(*args
, **kwargs
)
6582 def SetExtraStyle(*args
, **kwargs
):
6584 SetExtraStyle(self, long exStyle)
6586 Sets the extra style bits for the window. Extra styles are the less
6587 often used style bits which can't be set with the constructor or with
6588 SetWindowStyleFlag()
6590 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
6592 def GetExtraStyle(*args
, **kwargs
):
6594 GetExtraStyle(self) -> long
6596 Returns the extra style bits for the window.
6598 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
6600 def MakeModal(*args
, **kwargs
):
6602 MakeModal(self, bool modal=True)
6604 Disables all other windows in the application so that the user can
6605 only interact with this window. Passing False will reverse this
6608 return _core_
.Window_MakeModal(*args
, **kwargs
)
6610 def SetThemeEnabled(*args
, **kwargs
):
6612 SetThemeEnabled(self, bool enableTheme)
6614 This function tells a window if it should use the system's "theme"
6615 code to draw the windows' background instead if its own background
6616 drawing code. This will only have an effect on platforms that support
6617 the notion of themes in user defined windows. One such platform is
6618 GTK+ where windows can have (very colourful) backgrounds defined by a
6619 user's selected theme.
6621 Dialogs, notebook pages and the status bar have this flag set to true
6622 by default so that the default look and feel is simulated best.
6624 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
6626 def GetThemeEnabled(*args
, **kwargs
):
6628 GetThemeEnabled(self) -> bool
6630 Return the themeEnabled flag.
6632 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
6634 def SetFocus(*args
, **kwargs
):
6638 Set's the focus to this window, allowing it to receive keyboard input.
6640 return _core_
.Window_SetFocus(*args
, **kwargs
)
6642 def SetFocusFromKbd(*args
, **kwargs
):
6644 SetFocusFromKbd(self)
6646 Set focus to this window as the result of a keyboard action. Normally
6647 only called internally.
6649 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
6651 def FindFocus(*args
, **kwargs
):
6653 FindFocus() -> Window
6655 Returns the window or control that currently has the keyboard focus,
6658 return _core_
.Window_FindFocus(*args
, **kwargs
)
6660 FindFocus
= staticmethod(FindFocus
)
6661 def AcceptsFocus(*args
, **kwargs
):
6663 AcceptsFocus(self) -> bool
6665 Can this window have focus?
6667 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
6669 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6671 AcceptsFocusFromKeyboard(self) -> bool
6673 Can this window be given focus by keyboard navigation? if not, the
6674 only way to give it focus (provided it accepts it at all) is to click
6677 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6679 def GetDefaultItem(*args
, **kwargs
):
6681 GetDefaultItem(self) -> Window
6683 Get the default child of this parent, i.e. the one which is activated
6684 by pressing <Enter> such as the OK button on a wx.Dialog.
6686 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
6688 def SetDefaultItem(*args
, **kwargs
):
6690 SetDefaultItem(self, Window child) -> Window
6692 Set this child as default, return the old default.
6694 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
6696 def SetTmpDefaultItem(*args
, **kwargs
):
6698 SetTmpDefaultItem(self, Window win)
6700 Set this child as temporary default
6702 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6704 def Navigate(*args
, **kwargs
):
6706 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6708 Does keyboard navigation from this window to another, by sending a
6709 `wx.NavigationKeyEvent`.
6711 return _core_
.Window_Navigate(*args
, **kwargs
)
6713 def MoveAfterInTabOrder(*args
, **kwargs
):
6715 MoveAfterInTabOrder(self, Window win)
6717 Moves this window in the tab navigation order after the specified
6718 sibling window. This means that when the user presses the TAB key on
6719 that other window, the focus switches to this window.
6721 The default tab order is the same as creation order. This function
6722 and `MoveBeforeInTabOrder` allow to change it after creating all the
6726 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
6728 def MoveBeforeInTabOrder(*args
, **kwargs
):
6730 MoveBeforeInTabOrder(self, Window win)
6732 Same as `MoveAfterInTabOrder` except that it inserts this window just
6733 before win instead of putting it right after it.
6735 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
6737 def GetChildren(*args
, **kwargs
):
6739 GetChildren(self) -> PyObject
6741 Returns a list of the window's children. NOTE: Currently this is a
6742 copy of the child window list maintained by the window, so the return
6743 value of this function is only valid as long as the window's children
6746 return _core_
.Window_GetChildren(*args
, **kwargs
)
6748 def GetParent(*args
, **kwargs
):
6750 GetParent(self) -> Window
6752 Returns the parent window of this window, or None if there isn't one.
6754 return _core_
.Window_GetParent(*args
, **kwargs
)
6756 def GetGrandParent(*args
, **kwargs
):
6758 GetGrandParent(self) -> Window
6760 Returns the parent of the parent of this window, or None if there
6763 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
6765 def IsTopLevel(*args
, **kwargs
):
6767 IsTopLevel(self) -> bool
6769 Returns true if the given window is a top-level one. Currently all
6770 frames and dialogs are always considered to be top-level windows (even
6771 if they have a parent window).
6773 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
6775 def Reparent(*args
, **kwargs
):
6777 Reparent(self, Window newParent) -> bool
6779 Reparents the window, i.e the window will be removed from its current
6780 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6781 re-inserted into another. Available on Windows and GTK. Returns True
6782 if the parent was changed, False otherwise (error or newParent ==
6785 return _core_
.Window_Reparent(*args
, **kwargs
)
6787 def AddChild(*args
, **kwargs
):
6789 AddChild(self, Window child)
6791 Adds a child window. This is called automatically by window creation
6792 functions so should not be required by the application programmer.
6794 return _core_
.Window_AddChild(*args
, **kwargs
)
6796 def RemoveChild(*args
, **kwargs
):
6798 RemoveChild(self, Window child)
6800 Removes a child window. This is called automatically by window
6801 deletion functions so should not be required by the application
6804 return _core_
.Window_RemoveChild(*args
, **kwargs
)
6806 def FindWindowById(*args
, **kwargs
):
6808 FindWindowById(self, long winid) -> Window
6810 Find a chld of this window by window ID
6812 return _core_
.Window_FindWindowById(*args
, **kwargs
)
6814 def FindWindowByName(*args
, **kwargs
):
6816 FindWindowByName(self, String name) -> Window
6818 Find a child of this window by name
6820 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
6822 def GetEventHandler(*args
, **kwargs
):
6824 GetEventHandler(self) -> EvtHandler
6826 Returns the event handler for this window. By default, the window is
6827 its own event handler.
6829 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
6831 def SetEventHandler(*args
, **kwargs
):
6833 SetEventHandler(self, EvtHandler handler)
6835 Sets the event handler for this window. An event handler is an object
6836 that is capable of processing the events sent to a window. By default,
6837 the window is its own event handler, but an application may wish to
6838 substitute another, for example to allow central implementation of
6839 event-handling for a variety of different window classes.
6841 It is usually better to use `wx.Window.PushEventHandler` since this sets
6842 up a chain of event handlers, where an event not handled by one event
6843 handler is handed to the next one in the chain.
6845 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
6847 def PushEventHandler(*args
, **kwargs
):
6849 PushEventHandler(self, EvtHandler handler)
6851 Pushes this event handler onto the event handler stack for the window.
6852 An event handler is an object that is capable of processing the events
6853 sent to a window. By default, the window is its own event handler, but
6854 an application may wish to substitute another, for example to allow
6855 central implementation of event-handling for a variety of different
6858 wx.Window.PushEventHandler allows an application to set up a chain of
6859 event handlers, where an event not handled by one event handler is
6860 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6861 remove the event handler.
6863 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
6865 def PopEventHandler(*args
, **kwargs
):
6867 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6869 Removes and returns the top-most event handler on the event handler
6870 stack. If deleteHandler is True then the wx.EvtHandler object will be
6871 destroyed after it is popped.
6873 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
6875 def RemoveEventHandler(*args
, **kwargs
):
6877 RemoveEventHandler(self, EvtHandler handler) -> bool
6879 Find the given handler in the event handler chain and remove (but not
6880 delete) it from the event handler chain, return True if it was found
6881 and False otherwise (this also results in an assert failure so this
6882 function should only be called when the handler is supposed to be
6885 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
6887 def SetValidator(*args
, **kwargs
):
6889 SetValidator(self, Validator validator)
6891 Deletes the current validator (if any) and sets the window validator,
6892 having called wx.Validator.Clone to create a new validator of this
6895 return _core_
.Window_SetValidator(*args
, **kwargs
)
6897 def GetValidator(*args
, **kwargs
):
6899 GetValidator(self) -> Validator
6901 Returns a pointer to the current validator for the window, or None if
6904 return _core_
.Window_GetValidator(*args
, **kwargs
)
6906 def Validate(*args
, **kwargs
):
6908 Validate(self) -> bool
6910 Validates the current values of the child controls using their
6911 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6912 style flag set, the method will also call Validate() of all child
6913 windows. Returns false if any of the validations failed.
6915 return _core_
.Window_Validate(*args
, **kwargs
)
6917 def TransferDataToWindow(*args
, **kwargs
):
6919 TransferDataToWindow(self) -> bool
6921 Transfers values to child controls from data areas specified by their
6922 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6923 style flag set, the method will also call TransferDataToWindow() of
6926 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
6928 def TransferDataFromWindow(*args
, **kwargs
):
6930 TransferDataFromWindow(self) -> bool
6932 Transfers values from child controls to data areas specified by their
6933 validators. Returns false if a transfer failed. If the window has
6934 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6935 also call TransferDataFromWindow() of all child windows.
6937 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
6939 def InitDialog(*args
, **kwargs
):
6943 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6944 to the dialog via validators.
6946 return _core_
.Window_InitDialog(*args
, **kwargs
)
6948 def SetAcceleratorTable(*args
, **kwargs
):
6950 SetAcceleratorTable(self, AcceleratorTable accel)
6952 Sets the accelerator table for this window.
6954 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
6956 def GetAcceleratorTable(*args
, **kwargs
):
6958 GetAcceleratorTable(self) -> AcceleratorTable
6960 Gets the accelerator table for this window.
6962 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
6964 def RegisterHotKey(*args
, **kwargs
):
6966 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6968 Registers a system wide hotkey. Every time the user presses the hotkey
6969 registered here, this window will receive a hotkey event. It will
6970 receive the event even if the application is in the background and
6971 does not have the input focus because the user is working with some
6972 other application. To bind an event handler function to this hotkey
6973 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6974 hotkey was registered successfully.
6976 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
6978 def UnregisterHotKey(*args
, **kwargs
):
6980 UnregisterHotKey(self, int hotkeyId) -> bool
6982 Unregisters a system wide hotkey.
6984 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
6986 def ConvertDialogPointToPixels(*args
, **kwargs
):
6988 ConvertDialogPointToPixels(self, Point pt) -> Point
6990 Converts a point or size from dialog units to pixels. Dialog units
6991 are used for maintaining a dialog's proportions even if the font
6992 changes. For the x dimension, the dialog units are multiplied by the
6993 average character width and then divided by 4. For the y dimension,
6994 the dialog units are multiplied by the average character height and
6997 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
6999 def ConvertDialogSizeToPixels(*args
, **kwargs
):
7001 ConvertDialogSizeToPixels(self, Size sz) -> Size
7003 Converts a point or size from dialog units to pixels. Dialog units
7004 are used for maintaining a dialog's proportions even if the font
7005 changes. For the x dimension, the dialog units are multiplied by the
7006 average character width and then divided by 4. For the y dimension,
7007 the dialog units are multiplied by the average character height and
7010 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
7012 def DLG_PNT(*args
, **kwargs
):
7014 DLG_PNT(self, Point pt) -> Point
7016 Converts a point or size from dialog units to pixels. Dialog units
7017 are used for maintaining a dialog's proportions even if the font
7018 changes. For the x dimension, the dialog units are multiplied by the
7019 average character width and then divided by 4. For the y dimension,
7020 the dialog units are multiplied by the average character height and
7023 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
7025 def DLG_SZE(*args
, **kwargs
):
7027 DLG_SZE(self, Size sz) -> Size
7029 Converts a point or size from dialog units to pixels. Dialog units
7030 are used for maintaining a dialog's proportions even if the font
7031 changes. For the x dimension, the dialog units are multiplied by the
7032 average character width and then divided by 4. For the y dimension,
7033 the dialog units are multiplied by the average character height and
7036 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
7038 def ConvertPixelPointToDialog(*args
, **kwargs
):
7039 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7040 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
7042 def ConvertPixelSizeToDialog(*args
, **kwargs
):
7043 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7044 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
7046 def WarpPointer(*args
, **kwargs
):
7048 WarpPointer(self, int x, int y)
7050 Moves the pointer to the given position on the window.
7052 NOTE: This function is not supported under Mac because Apple Human
7053 Interface Guidelines forbid moving the mouse cursor programmatically.
7055 return _core_
.Window_WarpPointer(*args
, **kwargs
)
7057 def CaptureMouse(*args
, **kwargs
):
7061 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7062 release the capture.
7064 Note that wxWindows maintains the stack of windows having captured the
7065 mouse and when the mouse is released the capture returns to the window
7066 which had had captured it previously and it is only really released if
7067 there were no previous window. In particular, this means that you must
7068 release the mouse as many times as you capture it.
7070 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
7072 def ReleaseMouse(*args
, **kwargs
):
7076 Releases mouse input captured with wx.Window.CaptureMouse.
7078 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
7080 def GetCapture(*args
, **kwargs
):
7082 GetCapture() -> Window
7084 Returns the window which currently captures the mouse or None
7086 return _core_
.Window_GetCapture(*args
, **kwargs
)
7088 GetCapture
= staticmethod(GetCapture
)
7089 def HasCapture(*args
, **kwargs
):
7091 HasCapture(self) -> bool
7093 Returns true if this window has the current mouse capture.
7095 return _core_
.Window_HasCapture(*args
, **kwargs
)
7097 def Refresh(*args
, **kwargs
):
7099 Refresh(self, bool eraseBackground=True, Rect rect=None)
7101 Mark the specified rectangle (or the whole window) as "dirty" so it
7102 will be repainted. Causes an EVT_PAINT event to be generated and sent
7105 return _core_
.Window_Refresh(*args
, **kwargs
)
7107 def RefreshRect(*args
, **kwargs
):
7109 RefreshRect(self, Rect rect, bool eraseBackground=True)
7111 Redraws the contents of the given rectangle: the area inside it will
7112 be repainted. This is the same as Refresh but has a nicer syntax.
7114 return _core_
.Window_RefreshRect(*args
, **kwargs
)
7116 def Update(*args
, **kwargs
):
7120 Calling this method immediately repaints the invalidated area of the
7121 window instead of waiting for the EVT_PAINT event to happen, (normally
7122 this would usually only happen when the flow of control returns to the
7123 event loop.) Notice that this function doesn't refresh the window and
7124 does nothing if the window has been already repainted. Use Refresh
7125 first if you want to immediately redraw the window (or some portion of
7126 it) unconditionally.
7128 return _core_
.Window_Update(*args
, **kwargs
)
7130 def ClearBackground(*args
, **kwargs
):
7132 ClearBackground(self)
7134 Clears the window by filling it with the current background
7135 colour. Does not cause an erase background event to be generated.
7137 return _core_
.Window_ClearBackground(*args
, **kwargs
)
7139 def Freeze(*args
, **kwargs
):
7143 Freezes the window or, in other words, prevents any updates from
7144 taking place on screen, the window is not redrawn at all. Thaw must be
7145 called to reenable window redrawing. Calls to Freeze/Thaw may be
7146 nested, with the actual Thaw being delayed until all the nesting has
7149 This method is useful for visual appearance optimization (for example,
7150 it is a good idea to use it before inserting large amount of text into
7151 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7152 for all controls so it is mostly just a hint to wxWindows and not a
7153 mandatory directive.
7155 return _core_
.Window_Freeze(*args
, **kwargs
)
7157 def Thaw(*args
, **kwargs
):
7161 Reenables window updating after a previous call to Freeze. Calls to
7162 Freeze/Thaw may be nested, so Thaw must be called the same number of
7163 times that Freeze was before the window will be updated.
7165 return _core_
.Window_Thaw(*args
, **kwargs
)
7167 def PrepareDC(*args
, **kwargs
):
7169 PrepareDC(self, DC dc)
7171 Call this function to prepare the device context for drawing a
7172 scrolled image. It sets the device origin according to the current
7175 return _core_
.Window_PrepareDC(*args
, **kwargs
)
7177 def GetUpdateRegion(*args
, **kwargs
):
7179 GetUpdateRegion(self) -> Region
7181 Returns the region specifying which parts of the window have been
7182 damaged. Should only be called within an EVT_PAINT handler.
7184 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
7186 def GetUpdateClientRect(*args
, **kwargs
):
7188 GetUpdateClientRect(self) -> Rect
7190 Get the update rectangle region bounding box in client coords.
7192 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7194 def IsExposed(*args
, **kwargs
):
7196 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7198 Returns true if the given point or rectangle area has been exposed
7199 since the last repaint. Call this in an paint event handler to
7200 optimize redrawing by only redrawing those areas, which have been
7203 return _core_
.Window_IsExposed(*args
, **kwargs
)
7205 def IsExposedPoint(*args
, **kwargs
):
7207 IsExposedPoint(self, Point pt) -> bool
7209 Returns true if the given point or rectangle area has been exposed
7210 since the last repaint. Call this in an paint event handler to
7211 optimize redrawing by only redrawing those areas, which have been
7214 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7216 def IsExposedRect(*args
, **kwargs
):
7218 IsExposedRect(self, Rect rect) -> bool
7220 Returns true if the given point or rectangle area has been exposed
7221 since the last repaint. Call this in an paint event handler to
7222 optimize redrawing by only redrawing those areas, which have been
7225 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7227 def GetDefaultAttributes(*args
, **kwargs
):
7229 GetDefaultAttributes(self) -> VisualAttributes
7231 Get the default attributes for an instance of this class. This is
7232 useful if you want to use the same font or colour in your own control
7233 as in a standard control -- which is a much better idea than hard
7234 coding specific colours or fonts which might look completely out of
7235 place on the user's system, especially if it uses themes.
7237 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7239 def GetClassDefaultAttributes(*args
, **kwargs
):
7241 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7243 Get the default attributes for this class. This is useful if you want
7244 to use the same font or colour in your own control as in a standard
7245 control -- which is a much better idea than hard coding specific
7246 colours or fonts which might look completely out of place on the
7247 user's system, especially if it uses themes.
7249 The variant parameter is only relevant under Mac currently and is
7250 ignore under other platforms. Under Mac, it will change the size of
7251 the returned font. See `wx.Window.SetWindowVariant` for more about
7254 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7256 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7257 def SetBackgroundColour(*args
, **kwargs
):
7259 SetBackgroundColour(self, Colour colour) -> bool
7261 Sets the background colour of the window. Returns True if the colour
7262 was changed. The background colour is usually painted by the default
7263 EVT_ERASE_BACKGROUND event handler function under Windows and
7264 automatically under GTK. Using `wx.NullColour` will reset the window
7265 to the default background colour.
7267 Note that setting the background colour may not cause an immediate
7268 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7269 calling this function.
7271 Using this function will disable attempts to use themes for this
7272 window, if the system supports them. Use with care since usually the
7273 themes represent the appearance chosen by the user to be used for all
7274 applications on the system.
7276 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7278 def SetOwnBackgroundColour(*args
, **kwargs
):
7279 """SetOwnBackgroundColour(self, Colour colour)"""
7280 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7282 def SetForegroundColour(*args
, **kwargs
):
7284 SetForegroundColour(self, Colour colour) -> bool
7286 Sets the foreground colour of the window. Returns True is the colour
7287 was changed. The interpretation of foreground colour is dependent on
7288 the window class; it may be the text colour or other colour, or it may
7291 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7293 def SetOwnForegroundColour(*args
, **kwargs
):
7294 """SetOwnForegroundColour(self, Colour colour)"""
7295 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7297 def GetBackgroundColour(*args
, **kwargs
):
7299 GetBackgroundColour(self) -> Colour
7301 Returns the background colour of the window.
7303 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7305 def GetForegroundColour(*args
, **kwargs
):
7307 GetForegroundColour(self) -> Colour
7309 Returns the foreground colour of the window. The interpretation of
7310 foreground colour is dependent on the window class; it may be the text
7311 colour or other colour, or it may not be used at all.
7313 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7315 def SetBackgroundStyle(*args
, **kwargs
):
7317 SetBackgroundStyle(self, int style) -> bool
7319 Returns the background style of the window. The background style
7320 indicates how the background of the window is drawn.
7322 ====================== ========================================
7323 wx.BG_STYLE_SYSTEM The background colour or pattern should
7324 be determined by the system
7325 wx.BG_STYLE_COLOUR The background should be a solid colour
7326 wx.BG_STYLE_CUSTOM The background will be implemented by the
7328 ====================== ========================================
7330 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7331 a custom background, such as a tiled bitmap. Currently the style has
7332 no effect on other platforms.
7334 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7336 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
7338 def GetBackgroundStyle(*args
, **kwargs
):
7340 GetBackgroundStyle(self) -> int
7342 Returns the background style of the window.
7344 :see: `SetBackgroundStyle`
7346 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
7348 def HasTransparentBackground(*args
, **kwargs
):
7350 HasTransparentBackground(self) -> bool
7352 Returns True if this window's background is transparent (as, for
7353 example, for `wx.StaticText`) and should show the parent window's
7356 This method is mostly used internally by the library itself and you
7357 normally shouldn't have to call it. You may, however, have to override
7358 it in your custom control classes to ensure that background is painted
7361 return _core_
.Window_HasTransparentBackground(*args
, **kwargs
)
7363 def SetCursor(*args
, **kwargs
):
7365 SetCursor(self, Cursor cursor) -> bool
7367 Sets the window's cursor. Notice that the window cursor also sets it
7368 for the children of the window implicitly.
7370 The cursor may be wx.NullCursor in which case the window cursor will
7371 be reset back to default.
7373 return _core_
.Window_SetCursor(*args
, **kwargs
)
7375 def GetCursor(*args
, **kwargs
):
7377 GetCursor(self) -> Cursor
7379 Return the cursor associated with this window.
7381 return _core_
.Window_GetCursor(*args
, **kwargs
)
7383 def SetFont(*args
, **kwargs
):
7385 SetFont(self, Font font) -> bool
7387 Sets the font for this window.
7389 return _core_
.Window_SetFont(*args
, **kwargs
)
7391 def SetOwnFont(*args
, **kwargs
):
7392 """SetOwnFont(self, Font font)"""
7393 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
7395 def GetFont(*args
, **kwargs
):
7397 GetFont(self) -> Font
7399 Returns the default font used for this window.
7401 return _core_
.Window_GetFont(*args
, **kwargs
)
7403 def SetCaret(*args
, **kwargs
):
7405 SetCaret(self, Caret caret)
7407 Sets the caret associated with the window.
7409 return _core_
.Window_SetCaret(*args
, **kwargs
)
7411 def GetCaret(*args
, **kwargs
):
7413 GetCaret(self) -> Caret
7415 Returns the caret associated with the window.
7417 return _core_
.Window_GetCaret(*args
, **kwargs
)
7419 def GetCharHeight(*args
, **kwargs
):
7421 GetCharHeight(self) -> int
7423 Get the (average) character size for the current font.
7425 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
7427 def GetCharWidth(*args
, **kwargs
):
7429 GetCharWidth(self) -> int
7431 Get the (average) character size for the current font.
7433 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
7435 def GetTextExtent(*args
, **kwargs
):
7437 GetTextExtent(String string) -> (width, height)
7439 Get the width and height of the text using the current font.
7441 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
7443 def GetFullTextExtent(*args
, **kwargs
):
7445 GetFullTextExtent(String string, Font font=None) ->
7446 (width, height, descent, externalLeading)
7448 Get the width, height, decent and leading of the text using the
7449 current or specified font.
7451 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
7453 def ClientToScreenXY(*args
, **kwargs
):
7455 ClientToScreenXY(int x, int y) -> (x,y)
7457 Converts to screen coordinates from coordinates relative to this window.
7459 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
7461 def ScreenToClientXY(*args
, **kwargs
):
7463 ScreenToClientXY(int x, int y) -> (x,y)
7465 Converts from screen to client window coordinates.
7467 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
7469 def ClientToScreen(*args
, **kwargs
):
7471 ClientToScreen(self, Point pt) -> Point
7473 Converts to screen coordinates from coordinates relative to this window.
7475 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
7477 def ScreenToClient(*args
, **kwargs
):
7479 ScreenToClient(self, Point pt) -> Point
7481 Converts from screen to client window coordinates.
7483 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
7485 def HitTestXY(*args
, **kwargs
):
7487 HitTestXY(self, int x, int y) -> int
7489 Test where the given (in client coords) point lies
7491 return _core_
.Window_HitTestXY(*args
, **kwargs
)
7493 def HitTest(*args
, **kwargs
):
7495 HitTest(self, Point pt) -> int
7497 Test where the given (in client coords) point lies
7499 return _core_
.Window_HitTest(*args
, **kwargs
)
7501 def GetBorder(*args
):
7503 GetBorder(self, long flags) -> int
7504 GetBorder(self) -> int
7506 Get border for the flags of this window
7508 return _core_
.Window_GetBorder(*args
)
7510 def UpdateWindowUI(*args
, **kwargs
):
7512 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7514 This function sends EVT_UPDATE_UI events to the window. The particular
7515 implementation depends on the window; for example a wx.ToolBar will
7516 send an update UI event for each toolbar button, and a wx.Frame will
7517 send an update UI event for each menubar menu item. You can call this
7518 function from your application to ensure that your UI is up-to-date at
7519 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7520 concerned). This may be necessary if you have called
7521 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7522 limit the overhead that wxWindows incurs by sending update UI events
7525 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
7527 def PopupMenuXY(*args
, **kwargs
):
7529 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7531 Pops up the given menu at the specified coordinates, relative to this window,
7532 and returns control when the user has dismissed the menu. If a menu item is
7533 selected, the corresponding menu event is generated and will be processed as
7534 usual. If the default position is given then the current position of the
7535 mouse cursor will be used.
7537 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
7539 def PopupMenu(*args
, **kwargs
):
7541 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7543 Pops up the given menu at the specified coordinates, relative to this window,
7544 and returns control when the user has dismissed the menu. If a menu item is
7545 selected, the corresponding menu event is generated and will be processed as
7546 usual. If the default position is given then the current position of the
7547 mouse cursor will be used.
7549 return _core_
.Window_PopupMenu(*args
, **kwargs
)
7551 def GetHandle(*args
, **kwargs
):
7553 GetHandle(self) -> long
7555 Returns the platform-specific handle (as a long integer) of the
7556 physical window. Currently on wxMac it returns the handle of the
7557 toplevel parent of the window.
7559 return _core_
.Window_GetHandle(*args
, **kwargs
)
7561 def AssociateHandle(*args
, **kwargs
):
7563 AssociateHandle(self, long handle)
7565 Associate the window with a new native handle
7567 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
7569 def DissociateHandle(*args
, **kwargs
):
7571 DissociateHandle(self)
7573 Dissociate the current native handle from the window
7575 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
7577 def OnPaint(*args
, **kwargs
):
7578 """OnPaint(self, PaintEvent event)"""
7579 return _core_
.Window_OnPaint(*args
, **kwargs
)
7581 def HasScrollbar(*args
, **kwargs
):
7583 HasScrollbar(self, int orient) -> bool
7585 Does the window have the scrollbar for this orientation?
7587 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
7589 def SetScrollbar(*args
, **kwargs
):
7591 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7594 Sets the scrollbar properties of a built-in scrollbar.
7596 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
7598 def SetScrollPos(*args
, **kwargs
):
7600 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7602 Sets the position of one of the built-in scrollbars.
7604 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
7606 def GetScrollPos(*args
, **kwargs
):
7608 GetScrollPos(self, int orientation) -> int
7610 Returns the built-in scrollbar position.
7612 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
7614 def GetScrollThumb(*args
, **kwargs
):
7616 GetScrollThumb(self, int orientation) -> int
7618 Returns the built-in scrollbar thumb size.
7620 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
7622 def GetScrollRange(*args
, **kwargs
):
7624 GetScrollRange(self, int orientation) -> int
7626 Returns the built-in scrollbar range.
7628 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
7630 def ScrollWindow(*args
, **kwargs
):
7632 ScrollWindow(self, int dx, int dy, Rect rect=None)
7634 Physically scrolls the pixels in the window and move child windows
7635 accordingly. Use this function to optimise your scrolling
7636 implementations, to minimise the area that must be redrawn. Note that
7637 it is rarely required to call this function from a user program.
7639 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
7641 def ScrollLines(*args
, **kwargs
):
7643 ScrollLines(self, int lines) -> bool
7645 If the platform and window class supports it, scrolls the window by
7646 the given number of lines down, if lines is positive, or up if lines
7647 is negative. Returns True if the window was scrolled, False if it was
7648 already on top/bottom and nothing was done.
7650 return _core_
.Window_ScrollLines(*args
, **kwargs
)
7652 def ScrollPages(*args
, **kwargs
):
7654 ScrollPages(self, int pages) -> bool
7656 If the platform and window class supports it, scrolls the window by
7657 the given number of pages down, if pages is positive, or up if pages
7658 is negative. Returns True if the window was scrolled, False if it was
7659 already on top/bottom and nothing was done.
7661 return _core_
.Window_ScrollPages(*args
, **kwargs
)
7663 def LineUp(*args
, **kwargs
):
7665 LineUp(self) -> bool
7667 This is just a wrapper for ScrollLines(-1).
7669 return _core_
.Window_LineUp(*args
, **kwargs
)
7671 def LineDown(*args
, **kwargs
):
7673 LineDown(self) -> bool
7675 This is just a wrapper for ScrollLines(1).
7677 return _core_
.Window_LineDown(*args
, **kwargs
)
7679 def PageUp(*args
, **kwargs
):
7681 PageUp(self) -> bool
7683 This is just a wrapper for ScrollPages(-1).
7685 return _core_
.Window_PageUp(*args
, **kwargs
)
7687 def PageDown(*args
, **kwargs
):
7689 PageDown(self) -> bool
7691 This is just a wrapper for ScrollPages(1).
7693 return _core_
.Window_PageDown(*args
, **kwargs
)
7695 def SetHelpText(*args
, **kwargs
):
7697 SetHelpText(self, String text)
7699 Sets the help text to be used as context-sensitive help for this
7700 window. Note that the text is actually stored by the current
7701 wxHelpProvider implementation, and not in the window object itself.
7703 return _core_
.Window_SetHelpText(*args
, **kwargs
)
7705 def SetHelpTextForId(*args
, **kwargs
):
7707 SetHelpTextForId(self, String text)
7709 Associate this help text with all windows with the same id as this
7712 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
7714 def GetHelpText(*args
, **kwargs
):
7716 GetHelpText(self) -> String
7718 Gets the help text to be used as context-sensitive help for this
7719 window. Note that the text is actually stored by the current
7720 wxHelpProvider implementation, and not in the window object itself.
7722 return _core_
.Window_GetHelpText(*args
, **kwargs
)
7724 def SetToolTipString(*args
, **kwargs
):
7726 SetToolTipString(self, String tip)
7728 Attach a tooltip to the window.
7730 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
7732 def SetToolTip(*args
, **kwargs
):
7734 SetToolTip(self, ToolTip tip)
7736 Attach a tooltip to the window.
7738 return _core_
.Window_SetToolTip(*args
, **kwargs
)
7740 def GetToolTip(*args
, **kwargs
):
7742 GetToolTip(self) -> ToolTip
7744 get the associated tooltip or None if none
7746 return _core_
.Window_GetToolTip(*args
, **kwargs
)
7748 def SetDropTarget(*args
, **kwargs
):
7750 SetDropTarget(self, DropTarget dropTarget)
7752 Associates a drop target with this window. If the window already has
7753 a drop target, it is deleted.
7755 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
7757 def GetDropTarget(*args
, **kwargs
):
7759 GetDropTarget(self) -> DropTarget
7761 Returns the associated drop target, which may be None.
7763 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
7765 def DragAcceptFiles(*args
, **kwargs
):
7767 DragAcceptFiles(self, bool accept)
7769 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7770 Only available on Windows.
7772 return _core_
.Window_DragAcceptFiles(*args
, **kwargs
)
7774 def SetConstraints(*args
, **kwargs
):
7776 SetConstraints(self, LayoutConstraints constraints)
7778 Sets the window to have the given layout constraints. If an existing
7779 layout constraints object is already owned by the window, it will be
7780 deleted. Pass None to disassociate and delete the window's current
7783 You must call SetAutoLayout to tell a window to use the constraints
7784 automatically in its default EVT_SIZE handler; otherwise, you must
7785 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7786 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7789 return _core_
.Window_SetConstraints(*args
, **kwargs
)
7791 def GetConstraints(*args
, **kwargs
):
7793 GetConstraints(self) -> LayoutConstraints
7795 Returns a pointer to the window's layout constraints, or None if there
7798 return _core_
.Window_GetConstraints(*args
, **kwargs
)
7800 def SetAutoLayout(*args
, **kwargs
):
7802 SetAutoLayout(self, bool autoLayout)
7804 Determines whether the Layout function will be called automatically
7805 when the window is resized. It is called implicitly by SetSizer but
7806 if you use SetConstraints you should call it manually or otherwise the
7807 window layout won't be correctly updated when its size changes.
7809 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
7811 def GetAutoLayout(*args
, **kwargs
):
7813 GetAutoLayout(self) -> bool
7815 Returns the current autoLayout setting
7817 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
7819 def Layout(*args
, **kwargs
):
7821 Layout(self) -> bool
7823 Invokes the constraint-based layout algorithm or the sizer-based
7824 algorithm for this window. See SetAutoLayout: when auto layout is on,
7825 this function gets called automatically by the default EVT_SIZE
7826 handler when the window is resized.
7828 return _core_
.Window_Layout(*args
, **kwargs
)
7830 def SetSizer(*args
, **kwargs
):
7832 SetSizer(self, Sizer sizer, bool deleteOld=True)
7834 Sets the window to have the given layout sizer. The window will then
7835 own the object, and will take care of its deletion. If an existing
7836 layout sizer object is already owned by the window, it will be deleted
7837 if the deleteOld parameter is true. Note that this function will also
7838 call SetAutoLayout implicitly with a True parameter if the sizer is
7839 non-None, and False otherwise.
7841 return _core_
.Window_SetSizer(*args
, **kwargs
)
7843 def SetSizerAndFit(*args
, **kwargs
):
7845 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7847 The same as SetSizer, except it also sets the size hints for the
7848 window based on the sizer's minimum size.
7850 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
7852 def GetSizer(*args
, **kwargs
):
7854 GetSizer(self) -> Sizer
7856 Return the sizer associated with the window by a previous call to
7857 SetSizer or None if there isn't one.
7859 return _core_
.Window_GetSizer(*args
, **kwargs
)
7861 def SetContainingSizer(*args
, **kwargs
):
7863 SetContainingSizer(self, Sizer sizer)
7865 This normally does not need to be called by application code. It is
7866 called internally when a window is added to a sizer, and is used so
7867 the window can remove itself from the sizer when it is destroyed.
7869 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
7871 def GetContainingSizer(*args
, **kwargs
):
7873 GetContainingSizer(self) -> Sizer
7875 Return the sizer that this window is a member of, if any, otherwise None.
7877 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
7879 def InheritAttributes(*args
, **kwargs
):
7881 InheritAttributes(self)
7883 This function is (or should be, in case of custom controls) called
7884 during window creation to intelligently set up the window visual
7885 attributes, that is the font and the foreground and background
7888 By 'intelligently' the following is meant: by default, all windows use
7889 their own default attributes. However if some of the parent's
7890 attributes are explicitly changed (that is, using SetFont and not
7891 SetOwnFont) and if the corresponding attribute hadn't been
7892 explicitly set for this window itself, then this window takes the same
7893 value as used by the parent. In addition, if the window overrides
7894 ShouldInheritColours to return false, the colours will not be changed
7895 no matter what and only the font might.
7897 This rather complicated logic is necessary in order to accommodate the
7898 different usage scenarios. The most common one is when all default
7899 attributes are used and in this case, nothing should be inherited as
7900 in modern GUIs different controls use different fonts (and colours)
7901 than their siblings so they can't inherit the same value from the
7902 parent. However it was also deemed desirable to allow to simply change
7903 the attributes of all children at once by just changing the font or
7904 colour of their common parent, hence in this case we do inherit the
7908 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
7910 def ShouldInheritColours(*args
, **kwargs
):
7912 ShouldInheritColours(self) -> bool
7914 Return true from here to allow the colours of this window to be
7915 changed by InheritAttributes, returning false forbids inheriting them
7916 from the parent window.
7918 The base class version returns false, but this method is overridden in
7919 wxControl where it returns true.
7921 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
7923 def PostCreate(self
, pre
):
7925 Phase 3 of the 2-phase create <wink!>
7926 Call this method after precreating the window with the 2-phase create method.
7928 self
.this
= pre
.this
7929 self
.thisown
= pre
.thisown
7931 if hasattr(self
, '_setOORInfo'):
7932 self
._setOORInfo
(self
)
7933 if hasattr(self
, '_setCallbackInfo'):
7934 self
._setCallbackInfo
(self
, self
.__class
__)
7937 class WindowPtr(Window
):
7938 def __init__(self
, this
):
7940 if not hasattr(self
,"thisown"): self
.thisown
= 0
7941 self
.__class
__ = Window
7942 _core_
.Window_swigregister(WindowPtr
)
7944 def PreWindow(*args
, **kwargs
):
7946 PreWindow() -> Window
7948 Precreate a Window for 2-phase creation.
7950 val
= _core_
.new_PreWindow(*args
, **kwargs
)
7954 def Window_NewControlId(*args
, **kwargs
):
7956 Window_NewControlId() -> int
7958 Generate a control id for the controls which were not given one.
7960 return _core_
.Window_NewControlId(*args
, **kwargs
)
7962 def Window_NextControlId(*args
, **kwargs
):
7964 Window_NextControlId(int winid) -> int
7966 Get the id of the control following the one with the given
7969 return _core_
.Window_NextControlId(*args
, **kwargs
)
7971 def Window_PrevControlId(*args
, **kwargs
):
7973 Window_PrevControlId(int winid) -> int
7975 Get the id of the control preceding the one with the given
7978 return _core_
.Window_PrevControlId(*args
, **kwargs
)
7980 def Window_FindFocus(*args
, **kwargs
):
7982 Window_FindFocus() -> Window
7984 Returns the window or control that currently has the keyboard focus,
7987 return _core_
.Window_FindFocus(*args
, **kwargs
)
7989 def Window_GetCapture(*args
, **kwargs
):
7991 Window_GetCapture() -> Window
7993 Returns the window which currently captures the mouse or None
7995 return _core_
.Window_GetCapture(*args
, **kwargs
)
7997 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
7999 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8001 Get the default attributes for this class. This is useful if you want
8002 to use the same font or colour in your own control as in a standard
8003 control -- which is a much better idea than hard coding specific
8004 colours or fonts which might look completely out of place on the
8005 user's system, especially if it uses themes.
8007 The variant parameter is only relevant under Mac currently and is
8008 ignore under other platforms. Under Mac, it will change the size of
8009 the returned font. See `wx.Window.SetWindowVariant` for more about
8012 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
8014 def DLG_PNT(win
, point_or_x
, y
=None):
8016 Convenience function for converting a Point or (x,y) in
8017 dialog units to pixel units.
8020 return win
.ConvertDialogPointToPixels(point_or_x
)
8022 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
8024 def DLG_SZE(win
, size_width
, height
=None):
8026 Convenience function for converting a Size or (w,h) in
8027 dialog units to pixel units.
8030 return win
.ConvertDialogSizeToPixels(size_width
)
8032 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
8035 def FindWindowById(*args
, **kwargs
):
8037 FindWindowById(long id, Window parent=None) -> Window
8039 Find the first window in the application with the given id. If parent
8040 is None, the search will start from all top-level frames and dialog
8041 boxes; if non-None, the search will be limited to the given window
8042 hierarchy. The search is recursive in both cases.
8044 return _core_
.FindWindowById(*args
, **kwargs
)
8046 def FindWindowByName(*args
, **kwargs
):
8048 FindWindowByName(String name, Window parent=None) -> Window
8050 Find a window by its name (as given in a window constructor or Create
8051 function call). If parent is None, the search will start from all
8052 top-level frames and dialog boxes; if non-None, the search will be
8053 limited to the given window hierarchy. The search is recursive in both
8056 If no window with such name is found, wx.FindWindowByLabel is called.
8058 return _core_
.FindWindowByName(*args
, **kwargs
)
8060 def FindWindowByLabel(*args
, **kwargs
):
8062 FindWindowByLabel(String label, Window parent=None) -> Window
8064 Find a window by its label. Depending on the type of window, the label
8065 may be a window title or panel item label. If parent is None, the
8066 search will start from all top-level frames and dialog boxes; if
8067 non-None, the search will be limited to the given window
8068 hierarchy. The search is recursive in both cases.
8070 return _core_
.FindWindowByLabel(*args
, **kwargs
)
8072 def Window_FromHWND(*args
, **kwargs
):
8073 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8074 return _core_
.Window_FromHWND(*args
, **kwargs
)
8075 #---------------------------------------------------------------------------
8077 class Validator(EvtHandler
):
8078 """Proxy of C++ Validator class"""
8080 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8081 def __init__(self
, *args
, **kwargs
):
8082 """__init__(self) -> Validator"""
8083 newobj
= _core_
.new_Validator(*args
, **kwargs
)
8084 self
.this
= newobj
.this
8087 self
._setOORInfo
(self
)
8089 def Clone(*args
, **kwargs
):
8090 """Clone(self) -> Validator"""
8091 return _core_
.Validator_Clone(*args
, **kwargs
)
8093 def Validate(*args
, **kwargs
):
8094 """Validate(self, Window parent) -> bool"""
8095 return _core_
.Validator_Validate(*args
, **kwargs
)
8097 def TransferToWindow(*args
, **kwargs
):
8098 """TransferToWindow(self) -> bool"""
8099 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
8101 def TransferFromWindow(*args
, **kwargs
):
8102 """TransferFromWindow(self) -> bool"""
8103 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
8105 def GetWindow(*args
, **kwargs
):
8106 """GetWindow(self) -> Window"""
8107 return _core_
.Validator_GetWindow(*args
, **kwargs
)
8109 def SetWindow(*args
, **kwargs
):
8110 """SetWindow(self, Window window)"""
8111 return _core_
.Validator_SetWindow(*args
, **kwargs
)
8113 def IsSilent(*args
, **kwargs
):
8114 """IsSilent() -> bool"""
8115 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8117 IsSilent
= staticmethod(IsSilent
)
8118 def SetBellOnError(*args
, **kwargs
):
8119 """SetBellOnError(int doIt=True)"""
8120 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8122 SetBellOnError
= staticmethod(SetBellOnError
)
8124 class ValidatorPtr(Validator
):
8125 def __init__(self
, this
):
8127 if not hasattr(self
,"thisown"): self
.thisown
= 0
8128 self
.__class
__ = Validator
8129 _core_
.Validator_swigregister(ValidatorPtr
)
8131 def Validator_IsSilent(*args
, **kwargs
):
8132 """Validator_IsSilent() -> bool"""
8133 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8135 def Validator_SetBellOnError(*args
, **kwargs
):
8136 """Validator_SetBellOnError(int doIt=True)"""
8137 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8139 class PyValidator(Validator
):
8140 """Proxy of C++ PyValidator class"""
8142 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8143 def __init__(self
, *args
, **kwargs
):
8144 """__init__(self) -> PyValidator"""
8145 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
8146 self
.this
= newobj
.this
8150 self
._setCallbackInfo
(self
, PyValidator
, 1)
8151 self
._setOORInfo
(self
)
8153 def _setCallbackInfo(*args
, **kwargs
):
8154 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8155 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
8158 class PyValidatorPtr(PyValidator
):
8159 def __init__(self
, this
):
8161 if not hasattr(self
,"thisown"): self
.thisown
= 0
8162 self
.__class
__ = PyValidator
8163 _core_
.PyValidator_swigregister(PyValidatorPtr
)
8165 #---------------------------------------------------------------------------
8167 class Menu(EvtHandler
):
8168 """Proxy of C++ Menu class"""
8170 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8171 def __init__(self
, *args
, **kwargs
):
8172 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8173 newobj
= _core_
.new_Menu(*args
, **kwargs
)
8174 self
.this
= newobj
.this
8177 self
._setOORInfo
(self
)
8179 def Append(*args
, **kwargs
):
8180 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8181 return _core_
.Menu_Append(*args
, **kwargs
)
8183 def AppendSeparator(*args
, **kwargs
):
8184 """AppendSeparator(self) -> MenuItem"""
8185 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
8187 def AppendCheckItem(*args
, **kwargs
):
8188 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8189 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
8191 def AppendRadioItem(*args
, **kwargs
):
8192 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8193 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
8195 def AppendMenu(*args
, **kwargs
):
8196 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8197 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
8199 def AppendItem(*args
, **kwargs
):
8200 """AppendItem(self, MenuItem item) -> MenuItem"""
8201 return _core_
.Menu_AppendItem(*args
, **kwargs
)
8203 def Break(*args
, **kwargs
):
8205 return _core_
.Menu_Break(*args
, **kwargs
)
8207 def InsertItem(*args
, **kwargs
):
8208 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8209 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8211 def Insert(*args
, **kwargs
):
8213 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8214 int kind=ITEM_NORMAL) -> MenuItem
8216 return _core_
.Menu_Insert(*args
, **kwargs
)
8218 def InsertSeparator(*args
, **kwargs
):
8219 """InsertSeparator(self, size_t pos) -> MenuItem"""
8220 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8222 def InsertCheckItem(*args
, **kwargs
):
8223 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8224 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8226 def InsertRadioItem(*args
, **kwargs
):
8227 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8228 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8230 def InsertMenu(*args
, **kwargs
):
8231 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8232 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8234 def PrependItem(*args
, **kwargs
):
8235 """PrependItem(self, MenuItem item) -> MenuItem"""
8236 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8238 def Prepend(*args
, **kwargs
):
8239 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8240 return _core_
.Menu_Prepend(*args
, **kwargs
)
8242 def PrependSeparator(*args
, **kwargs
):
8243 """PrependSeparator(self) -> MenuItem"""
8244 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8246 def PrependCheckItem(*args
, **kwargs
):
8247 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8248 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8250 def PrependRadioItem(*args
, **kwargs
):
8251 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8252 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8254 def PrependMenu(*args
, **kwargs
):
8255 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8256 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8258 def Remove(*args
, **kwargs
):
8259 """Remove(self, int id) -> MenuItem"""
8260 return _core_
.Menu_Remove(*args
, **kwargs
)
8262 def RemoveItem(*args
, **kwargs
):
8263 """RemoveItem(self, MenuItem item) -> MenuItem"""
8264 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8266 def Delete(*args
, **kwargs
):
8267 """Delete(self, int id) -> bool"""
8268 return _core_
.Menu_Delete(*args
, **kwargs
)
8270 def DeleteItem(*args
, **kwargs
):
8271 """DeleteItem(self, MenuItem item) -> bool"""
8272 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8274 def Destroy(*args
, **kwargs
):
8278 Deletes the C++ object this Python object is a proxy for.
8280 return _core_
.Menu_Destroy(*args
, **kwargs
)
8282 def DestroyId(*args
, **kwargs
):
8284 DestroyId(self, int id) -> bool
8286 Deletes the C++ object this Python object is a proxy for.
8288 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8290 def DestroyItem(*args
, **kwargs
):
8292 DestroyItem(self, MenuItem item) -> bool
8294 Deletes the C++ object this Python object is a proxy for.
8296 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8298 def GetMenuItemCount(*args
, **kwargs
):
8299 """GetMenuItemCount(self) -> size_t"""
8300 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8302 def GetMenuItems(*args
, **kwargs
):
8303 """GetMenuItems(self) -> PyObject"""
8304 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8306 def FindItem(*args
, **kwargs
):
8307 """FindItem(self, String item) -> int"""
8308 return _core_
.Menu_FindItem(*args
, **kwargs
)
8310 def FindItemById(*args
, **kwargs
):
8311 """FindItemById(self, int id) -> MenuItem"""
8312 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8314 def FindItemByPosition(*args
, **kwargs
):
8315 """FindItemByPosition(self, size_t position) -> MenuItem"""
8316 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
8318 def Enable(*args
, **kwargs
):
8319 """Enable(self, int id, bool enable)"""
8320 return _core_
.Menu_Enable(*args
, **kwargs
)
8322 def IsEnabled(*args
, **kwargs
):
8323 """IsEnabled(self, int id) -> bool"""
8324 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
8326 def Check(*args
, **kwargs
):
8327 """Check(self, int id, bool check)"""
8328 return _core_
.Menu_Check(*args
, **kwargs
)
8330 def IsChecked(*args
, **kwargs
):
8331 """IsChecked(self, int id) -> bool"""
8332 return _core_
.Menu_IsChecked(*args
, **kwargs
)
8334 def SetLabel(*args
, **kwargs
):
8335 """SetLabel(self, int id, String label)"""
8336 return _core_
.Menu_SetLabel(*args
, **kwargs
)
8338 def GetLabel(*args
, **kwargs
):
8339 """GetLabel(self, int id) -> String"""
8340 return _core_
.Menu_GetLabel(*args
, **kwargs
)
8342 def SetHelpString(*args
, **kwargs
):
8343 """SetHelpString(self, int id, String helpString)"""
8344 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
8346 def GetHelpString(*args
, **kwargs
):
8347 """GetHelpString(self, int id) -> String"""
8348 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
8350 def SetTitle(*args
, **kwargs
):
8351 """SetTitle(self, String title)"""
8352 return _core_
.Menu_SetTitle(*args
, **kwargs
)
8354 def GetTitle(*args
, **kwargs
):
8355 """GetTitle(self) -> String"""
8356 return _core_
.Menu_GetTitle(*args
, **kwargs
)
8358 def SetEventHandler(*args
, **kwargs
):
8359 """SetEventHandler(self, EvtHandler handler)"""
8360 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
8362 def GetEventHandler(*args
, **kwargs
):
8363 """GetEventHandler(self) -> EvtHandler"""
8364 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
8366 def SetInvokingWindow(*args
, **kwargs
):
8367 """SetInvokingWindow(self, Window win)"""
8368 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
8370 def GetInvokingWindow(*args
, **kwargs
):
8371 """GetInvokingWindow(self) -> Window"""
8372 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
8374 def GetStyle(*args
, **kwargs
):
8375 """GetStyle(self) -> long"""
8376 return _core_
.Menu_GetStyle(*args
, **kwargs
)
8378 def UpdateUI(*args
, **kwargs
):
8379 """UpdateUI(self, EvtHandler source=None)"""
8380 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
8382 def GetMenuBar(*args
, **kwargs
):
8383 """GetMenuBar(self) -> MenuBar"""
8384 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
8386 def Attach(*args
, **kwargs
):
8387 """Attach(self, wxMenuBarBase menubar)"""
8388 return _core_
.Menu_Attach(*args
, **kwargs
)
8390 def Detach(*args
, **kwargs
):
8392 return _core_
.Menu_Detach(*args
, **kwargs
)
8394 def IsAttached(*args
, **kwargs
):
8395 """IsAttached(self) -> bool"""
8396 return _core_
.Menu_IsAttached(*args
, **kwargs
)
8398 def SetParent(*args
, **kwargs
):
8399 """SetParent(self, Menu parent)"""
8400 return _core_
.Menu_SetParent(*args
, **kwargs
)
8402 def GetParent(*args
, **kwargs
):
8403 """GetParent(self) -> Menu"""
8404 return _core_
.Menu_GetParent(*args
, **kwargs
)
8407 class MenuPtr(Menu
):
8408 def __init__(self
, this
):
8410 if not hasattr(self
,"thisown"): self
.thisown
= 0
8411 self
.__class
__ = Menu
8412 _core_
.Menu_swigregister(MenuPtr
)
8413 DefaultValidator
= cvar
.DefaultValidator
8415 #---------------------------------------------------------------------------
8417 class MenuBar(Window
):
8418 """Proxy of C++ MenuBar class"""
8420 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8421 def __init__(self
, *args
, **kwargs
):
8422 """__init__(self, long style=0) -> MenuBar"""
8423 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
8424 self
.this
= newobj
.this
8427 self
._setOORInfo
(self
)
8429 def Append(*args
, **kwargs
):
8430 """Append(self, Menu menu, String title) -> bool"""
8431 return _core_
.MenuBar_Append(*args
, **kwargs
)
8433 def Insert(*args
, **kwargs
):
8434 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8435 return _core_
.MenuBar_Insert(*args
, **kwargs
)
8437 def GetMenuCount(*args
, **kwargs
):
8438 """GetMenuCount(self) -> size_t"""
8439 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
8441 def GetMenu(*args
, **kwargs
):
8442 """GetMenu(self, size_t pos) -> Menu"""
8443 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
8445 def Replace(*args
, **kwargs
):
8446 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8447 return _core_
.MenuBar_Replace(*args
, **kwargs
)
8449 def Remove(*args
, **kwargs
):
8450 """Remove(self, size_t pos) -> Menu"""
8451 return _core_
.MenuBar_Remove(*args
, **kwargs
)
8453 def EnableTop(*args
, **kwargs
):
8454 """EnableTop(self, size_t pos, bool enable)"""
8455 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
8457 def IsEnabledTop(*args
, **kwargs
):
8458 """IsEnabledTop(self, size_t pos) -> bool"""
8459 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
8461 def SetLabelTop(*args
, **kwargs
):
8462 """SetLabelTop(self, size_t pos, String label)"""
8463 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
8465 def GetLabelTop(*args
, **kwargs
):
8466 """GetLabelTop(self, size_t pos) -> String"""
8467 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
8469 def FindMenuItem(*args
, **kwargs
):
8470 """FindMenuItem(self, String menu, String item) -> int"""
8471 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
8473 def FindItemById(*args
, **kwargs
):
8474 """FindItemById(self, int id) -> MenuItem"""
8475 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
8477 def FindMenu(*args
, **kwargs
):
8478 """FindMenu(self, String title) -> int"""
8479 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
8481 def Enable(*args
, **kwargs
):
8482 """Enable(self, int id, bool enable)"""
8483 return _core_
.MenuBar_Enable(*args
, **kwargs
)
8485 def Check(*args
, **kwargs
):
8486 """Check(self, int id, bool check)"""
8487 return _core_
.MenuBar_Check(*args
, **kwargs
)
8489 def IsChecked(*args
, **kwargs
):
8490 """IsChecked(self, int id) -> bool"""
8491 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
8493 def IsEnabled(*args
, **kwargs
):
8494 """IsEnabled(self, int id) -> bool"""
8495 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
8497 def SetLabel(*args
, **kwargs
):
8498 """SetLabel(self, int id, String label)"""
8499 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
8501 def GetLabel(*args
, **kwargs
):
8502 """GetLabel(self, int id) -> String"""
8503 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
8505 def SetHelpString(*args
, **kwargs
):
8506 """SetHelpString(self, int id, String helpString)"""
8507 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
8509 def GetHelpString(*args
, **kwargs
):
8510 """GetHelpString(self, int id) -> String"""
8511 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
8513 def GetFrame(*args
, **kwargs
):
8514 """GetFrame(self) -> wxFrame"""
8515 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
8517 def IsAttached(*args
, **kwargs
):
8518 """IsAttached(self) -> bool"""
8519 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
8521 def Attach(*args
, **kwargs
):
8522 """Attach(self, wxFrame frame)"""
8523 return _core_
.MenuBar_Attach(*args
, **kwargs
)
8525 def Detach(*args
, **kwargs
):
8527 return _core_
.MenuBar_Detach(*args
, **kwargs
)
8530 class MenuBarPtr(MenuBar
):
8531 def __init__(self
, this
):
8533 if not hasattr(self
,"thisown"): self
.thisown
= 0
8534 self
.__class
__ = MenuBar
8535 _core_
.MenuBar_swigregister(MenuBarPtr
)
8537 #---------------------------------------------------------------------------
8539 class MenuItem(Object
):
8540 """Proxy of C++ MenuItem class"""
8542 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8543 def __init__(self
, *args
, **kwargs
):
8545 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8546 String help=EmptyString, int kind=ITEM_NORMAL,
8547 Menu subMenu=None) -> MenuItem
8549 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
8550 self
.this
= newobj
.this
8553 def GetMenu(*args
, **kwargs
):
8554 """GetMenu(self) -> Menu"""
8555 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
8557 def SetMenu(*args
, **kwargs
):
8558 """SetMenu(self, Menu menu)"""
8559 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
8561 def SetId(*args
, **kwargs
):
8562 """SetId(self, int id)"""
8563 return _core_
.MenuItem_SetId(*args
, **kwargs
)
8565 def GetId(*args
, **kwargs
):
8566 """GetId(self) -> int"""
8567 return _core_
.MenuItem_GetId(*args
, **kwargs
)
8569 def IsSeparator(*args
, **kwargs
):
8570 """IsSeparator(self) -> bool"""
8571 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
8573 def SetText(*args
, **kwargs
):
8574 """SetText(self, String str)"""
8575 return _core_
.MenuItem_SetText(*args
, **kwargs
)
8577 def GetLabel(*args
, **kwargs
):
8578 """GetLabel(self) -> String"""
8579 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
8581 def GetText(*args
, **kwargs
):
8582 """GetText(self) -> String"""
8583 return _core_
.MenuItem_GetText(*args
, **kwargs
)
8585 def GetLabelFromText(*args
, **kwargs
):
8586 """GetLabelFromText(String text) -> String"""
8587 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8589 GetLabelFromText
= staticmethod(GetLabelFromText
)
8590 def GetKind(*args
, **kwargs
):
8591 """GetKind(self) -> int"""
8592 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
8594 def SetKind(*args
, **kwargs
):
8595 """SetKind(self, int kind)"""
8596 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
8598 def SetCheckable(*args
, **kwargs
):
8599 """SetCheckable(self, bool checkable)"""
8600 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
8602 def IsCheckable(*args
, **kwargs
):
8603 """IsCheckable(self) -> bool"""
8604 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
8606 def IsSubMenu(*args
, **kwargs
):
8607 """IsSubMenu(self) -> bool"""
8608 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
8610 def SetSubMenu(*args
, **kwargs
):
8611 """SetSubMenu(self, Menu menu)"""
8612 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
8614 def GetSubMenu(*args
, **kwargs
):
8615 """GetSubMenu(self) -> Menu"""
8616 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
8618 def Enable(*args
, **kwargs
):
8619 """Enable(self, bool enable=True)"""
8620 return _core_
.MenuItem_Enable(*args
, **kwargs
)
8622 def IsEnabled(*args
, **kwargs
):
8623 """IsEnabled(self) -> bool"""
8624 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
8626 def Check(*args
, **kwargs
):
8627 """Check(self, bool check=True)"""
8628 return _core_
.MenuItem_Check(*args
, **kwargs
)
8630 def IsChecked(*args
, **kwargs
):
8631 """IsChecked(self) -> bool"""
8632 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
8634 def Toggle(*args
, **kwargs
):
8636 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
8638 def SetHelp(*args
, **kwargs
):
8639 """SetHelp(self, String str)"""
8640 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
8642 def GetHelp(*args
, **kwargs
):
8643 """GetHelp(self) -> String"""
8644 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
8646 def GetAccel(*args
, **kwargs
):
8647 """GetAccel(self) -> AcceleratorEntry"""
8648 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
8650 def SetAccel(*args
, **kwargs
):
8651 """SetAccel(self, AcceleratorEntry accel)"""
8652 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
8654 def SetFont(*args
, **kwargs
):
8655 """SetFont(self, Font font)"""
8656 return _core_
.MenuItem_SetFont(*args
, **kwargs
)
8658 def GetFont(*args
, **kwargs
):
8659 """GetFont(self) -> Font"""
8660 return _core_
.MenuItem_GetFont(*args
, **kwargs
)
8662 def SetTextColour(*args
, **kwargs
):
8663 """SetTextColour(self, Colour colText)"""
8664 return _core_
.MenuItem_SetTextColour(*args
, **kwargs
)
8666 def GetTextColour(*args
, **kwargs
):
8667 """GetTextColour(self) -> Colour"""
8668 return _core_
.MenuItem_GetTextColour(*args
, **kwargs
)
8670 def SetBackgroundColour(*args
, **kwargs
):
8671 """SetBackgroundColour(self, Colour colBack)"""
8672 return _core_
.MenuItem_SetBackgroundColour(*args
, **kwargs
)
8674 def GetBackgroundColour(*args
, **kwargs
):
8675 """GetBackgroundColour(self) -> Colour"""
8676 return _core_
.MenuItem_GetBackgroundColour(*args
, **kwargs
)
8678 def SetBitmaps(*args
, **kwargs
):
8679 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8680 return _core_
.MenuItem_SetBitmaps(*args
, **kwargs
)
8682 def SetDisabledBitmap(*args
, **kwargs
):
8683 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8684 return _core_
.MenuItem_SetDisabledBitmap(*args
, **kwargs
)
8686 def GetDisabledBitmap(*args
, **kwargs
):
8687 """GetDisabledBitmap(self) -> Bitmap"""
8688 return _core_
.MenuItem_GetDisabledBitmap(*args
, **kwargs
)
8690 def SetMarginWidth(*args
, **kwargs
):
8691 """SetMarginWidth(self, int nWidth)"""
8692 return _core_
.MenuItem_SetMarginWidth(*args
, **kwargs
)
8694 def GetMarginWidth(*args
, **kwargs
):
8695 """GetMarginWidth(self) -> int"""
8696 return _core_
.MenuItem_GetMarginWidth(*args
, **kwargs
)
8698 def GetDefaultMarginWidth(*args
, **kwargs
):
8699 """GetDefaultMarginWidth() -> int"""
8700 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8702 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
8703 def IsOwnerDrawn(*args
, **kwargs
):
8704 """IsOwnerDrawn(self) -> bool"""
8705 return _core_
.MenuItem_IsOwnerDrawn(*args
, **kwargs
)
8707 def SetOwnerDrawn(*args
, **kwargs
):
8708 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8709 return _core_
.MenuItem_SetOwnerDrawn(*args
, **kwargs
)
8711 def ResetOwnerDrawn(*args
, **kwargs
):
8712 """ResetOwnerDrawn(self)"""
8713 return _core_
.MenuItem_ResetOwnerDrawn(*args
, **kwargs
)
8715 def SetBitmap(*args
, **kwargs
):
8716 """SetBitmap(self, Bitmap bitmap)"""
8717 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
8719 def GetBitmap(*args
, **kwargs
):
8720 """GetBitmap(self) -> Bitmap"""
8721 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
8724 class MenuItemPtr(MenuItem
):
8725 def __init__(self
, this
):
8727 if not hasattr(self
,"thisown"): self
.thisown
= 0
8728 self
.__class
__ = MenuItem
8729 _core_
.MenuItem_swigregister(MenuItemPtr
)
8731 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8732 """MenuItem_GetLabelFromText(String text) -> String"""
8733 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8735 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8736 """MenuItem_GetDefaultMarginWidth() -> int"""
8737 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8739 #---------------------------------------------------------------------------
8741 class Control(Window
):
8743 This is the base class for a control or 'widget'.
8745 A control is generally a small window which processes user input
8746 and/or displays one or more item of data.
8749 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8750 def __init__(self
, *args
, **kwargs
):
8752 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8753 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8754 String name=ControlNameStr) -> Control
8756 Create a Control. Normally you should only call this from a subclass'
8757 __init__ as a plain old wx.Control is not very useful.
8759 newobj
= _core_
.new_Control(*args
, **kwargs
)
8760 self
.this
= newobj
.this
8763 self
._setOORInfo
(self
)
8765 def Create(*args
, **kwargs
):
8767 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8768 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8769 String name=ControlNameStr) -> bool
8771 Do the 2nd phase and create the GUI control.
8773 return _core_
.Control_Create(*args
, **kwargs
)
8775 def Command(*args
, **kwargs
):
8777 Command(self, CommandEvent event)
8779 Simulates the effect of the user issuing a command to the item.
8781 :see: `wx.CommandEvent`
8784 return _core_
.Control_Command(*args
, **kwargs
)
8786 def GetLabel(*args
, **kwargs
):
8788 GetLabel(self) -> String
8790 Return a control's text.
8792 return _core_
.Control_GetLabel(*args
, **kwargs
)
8794 def SetLabel(*args
, **kwargs
):
8796 SetLabel(self, String label)
8798 Sets the item's text.
8800 return _core_
.Control_SetLabel(*args
, **kwargs
)
8802 def GetClassDefaultAttributes(*args
, **kwargs
):
8804 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8806 Get the default attributes for this class. This is useful if you want
8807 to use the same font or colour in your own control as in a standard
8808 control -- which is a much better idea than hard coding specific
8809 colours or fonts which might look completely out of place on the
8810 user's system, especially if it uses themes.
8812 The variant parameter is only relevant under Mac currently and is
8813 ignore under other platforms. Under Mac, it will change the size of
8814 the returned font. See `wx.Window.SetWindowVariant` for more about
8817 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8819 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
8821 class ControlPtr(Control
):
8822 def __init__(self
, this
):
8824 if not hasattr(self
,"thisown"): self
.thisown
= 0
8825 self
.__class
__ = Control
8826 _core_
.Control_swigregister(ControlPtr
)
8827 ControlNameStr
= cvar
.ControlNameStr
8829 def PreControl(*args
, **kwargs
):
8831 PreControl() -> Control
8833 Precreate a Control control for 2-phase creation
8835 val
= _core_
.new_PreControl(*args
, **kwargs
)
8839 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
8841 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8843 Get the default attributes for this class. This is useful if you want
8844 to use the same font or colour in your own control as in a standard
8845 control -- which is a much better idea than hard coding specific
8846 colours or fonts which might look completely out of place on the
8847 user's system, especially if it uses themes.
8849 The variant parameter is only relevant under Mac currently and is
8850 ignore under other platforms. Under Mac, it will change the size of
8851 the returned font. See `wx.Window.SetWindowVariant` for more about
8854 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8856 #---------------------------------------------------------------------------
8858 class ItemContainer(object):
8860 wx.ItemContainer defines an interface which is implemented by all
8861 controls which have string subitems, each of which may be selected,
8862 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8863 `wx.ComboBox` which implements an extended interface deriving from
8866 It defines the methods for accessing the control's items and although
8867 each of the derived classes implements them differently, they still
8868 all conform to the same interface.
8870 The items in a wx.ItemContainer have (non empty) string labels and,
8871 optionally, client data associated with them.
8874 def __init__(self
): raise RuntimeError, "No constructor defined"
8876 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8877 def Append(*args
, **kwargs
):
8879 Append(self, String item, PyObject clientData=None) -> int
8881 Adds the item to the control, associating the given data with the item
8882 if not None. The return value is the index of the newly added item
8883 which may be different from the last one if the control is sorted (e.g.
8884 has wx.LB_SORT or wx.CB_SORT style).
8886 return _core_
.ItemContainer_Append(*args
, **kwargs
)
8888 def AppendItems(*args
, **kwargs
):
8890 AppendItems(self, List strings)
8892 Apend several items at once to the control. Notice that calling this
8893 method may be much faster than appending the items one by one if you
8894 need to add a lot of items.
8896 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
8898 def Insert(*args
, **kwargs
):
8900 Insert(self, String item, int pos, PyObject clientData=None) -> int
8902 Insert an item into the control before the item at the ``pos`` index,
8903 optionally associating some data object with the item.
8905 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
8907 def Clear(*args
, **kwargs
):
8911 Removes all items from the control.
8913 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
8915 def Delete(*args
, **kwargs
):
8919 Deletes the item at the zero-based index 'n' from the control. Note
8920 that it is an error (signalled by a `wx.PyAssertionError` exception if
8921 enabled) to remove an item with the index negative or greater or equal
8922 than the number of items in the control.
8924 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
8926 def GetCount(*args
, **kwargs
):
8928 GetCount(self) -> int
8930 Returns the number of items in the control.
8932 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
8934 def IsEmpty(*args
, **kwargs
):
8936 IsEmpty(self) -> bool
8938 Returns True if the control is empty or False if it has some items.
8940 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
8942 def GetString(*args
, **kwargs
):
8944 GetString(self, int n) -> String
8946 Returns the label of the item with the given index.
8948 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
8950 def GetStrings(*args
, **kwargs
):
8951 """GetStrings(self) -> wxArrayString"""
8952 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
8954 def SetString(*args
, **kwargs
):
8956 SetString(self, int n, String s)
8958 Sets the label for the given item.
8960 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
8962 def FindString(*args
, **kwargs
):
8964 FindString(self, String s) -> int
8966 Finds an item whose label matches the given string. Returns the
8967 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8970 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
8972 def Select(*args
, **kwargs
):
8976 Sets the item at index 'n' to be the selected item.
8978 return _core_
.ItemContainer_Select(*args
, **kwargs
)
8980 SetSelection
= Select
8981 def GetSelection(*args
, **kwargs
):
8983 GetSelection(self) -> int
8985 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8988 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
8990 def GetStringSelection(*args
, **kwargs
):
8992 GetStringSelection(self) -> String
8994 Returns the label of the selected item or an empty string if no item
8997 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
8999 def GetClientData(*args
, **kwargs
):
9001 GetClientData(self, int n) -> PyObject
9003 Returns the client data associated with the given item, (if any.)
9005 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
9007 def SetClientData(*args
, **kwargs
):
9009 SetClientData(self, int n, PyObject clientData)
9011 Associate the given client data with the item at position n.
9013 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
9016 class ItemContainerPtr(ItemContainer
):
9017 def __init__(self
, this
):
9019 if not hasattr(self
,"thisown"): self
.thisown
= 0
9020 self
.__class
__ = ItemContainer
9021 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
9023 #---------------------------------------------------------------------------
9025 class ControlWithItems(Control
,ItemContainer
):
9027 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9028 wx.Control class, and is used for the base class of various controls
9031 def __init__(self
): raise RuntimeError, "No constructor defined"
9033 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9035 class ControlWithItemsPtr(ControlWithItems
):
9036 def __init__(self
, this
):
9038 if not hasattr(self
,"thisown"): self
.thisown
= 0
9039 self
.__class
__ = ControlWithItems
9040 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
9042 #---------------------------------------------------------------------------
9044 class SizerItem(Object
):
9046 The wx.SizerItem class is used to track the position, size and other
9047 attributes of each item managed by a `wx.Sizer`. In normal usage user
9048 code should never need to deal directly with a wx.SizerItem, but
9049 custom classes derived from `wx.PySizer` will probably need to use the
9050 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9052 :see: `wx.Sizer`, `wx.GBSizerItem`
9055 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9056 def __init__(self
, *args
, **kwargs
):
9058 __init__(self) -> SizerItem
9060 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9061 size will need to be set before this item can be used in a Sizer.
9063 You will probably never need to create a wx.SizerItem directly as they
9064 are created automatically when the sizer's Add, Insert or Prepend
9067 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9069 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
9070 self
.this
= newobj
.this
9073 def DeleteWindows(*args
, **kwargs
):
9077 Destroy the window or the windows in a subsizer, depending on the type
9080 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
9082 def DetachSizer(*args
, **kwargs
):
9086 Enable deleting the SizerItem without destroying the contained sizer.
9088 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
9090 def GetSize(*args
, **kwargs
):
9092 GetSize(self) -> Size
9094 Get the current size of the item, as set in the last Layout.
9096 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
9098 def CalcMin(*args
, **kwargs
):
9100 CalcMin(self) -> Size
9102 Calculates the minimum desired size for the item, including any space
9105 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
9107 def SetDimension(*args
, **kwargs
):
9109 SetDimension(self, Point pos, Size size)
9111 Set the position and size of the space allocated for this item by the
9112 sizer, and adjust the position and size of the item (window or
9113 subsizer) to be within that space taking alignment and borders into
9116 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
9118 def GetMinSize(*args
, **kwargs
):
9120 GetMinSize(self) -> Size
9122 Get the minimum size needed for the item.
9124 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
9126 def GetMinSizeWithBorder(*args
, **kwargs
):
9128 GetMinSizeWithBorder(self) -> Size
9130 Get the minimum size needed for the item with space for the borders
9133 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
9135 def SetInitSize(*args
, **kwargs
):
9136 """SetInitSize(self, int x, int y)"""
9137 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
9139 def SetRatioWH(*args
, **kwargs
):
9141 SetRatioWH(self, int width, int height)
9143 Set the ratio item attribute.
9145 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
9147 def SetRatioSize(*args
, **kwargs
):
9149 SetRatioSize(self, Size size)
9151 Set the ratio item attribute.
9153 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
9155 def SetRatio(*args
, **kwargs
):
9157 SetRatio(self, float ratio)
9159 Set the ratio item attribute.
9161 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
9163 def GetRatio(*args
, **kwargs
):
9165 GetRatio(self) -> float
9167 Set the ratio item attribute.
9169 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
9171 def GetRect(*args
, **kwargs
):
9173 GetRect(self) -> Rect
9175 Returns the rectangle that the sizer item should occupy
9177 return _core_
.SizerItem_GetRect(*args
, **kwargs
)
9179 def IsWindow(*args
, **kwargs
):
9181 IsWindow(self) -> bool
9183 Is this sizer item a window?
9185 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
9187 def IsSizer(*args
, **kwargs
):
9189 IsSizer(self) -> bool
9191 Is this sizer item a subsizer?
9193 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
9195 def IsSpacer(*args
, **kwargs
):
9197 IsSpacer(self) -> bool
9199 Is this sizer item a spacer?
9201 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
9203 def SetProportion(*args
, **kwargs
):
9205 SetProportion(self, int proportion)
9207 Set the proportion value for this item.
9209 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
9211 def GetProportion(*args
, **kwargs
):
9213 GetProportion(self) -> int
9215 Get the proportion value for this item.
9217 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
9219 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
9220 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
9221 def SetFlag(*args
, **kwargs
):
9223 SetFlag(self, int flag)
9225 Set the flag value for this item.
9227 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
9229 def GetFlag(*args
, **kwargs
):
9231 GetFlag(self) -> int
9233 Get the flag value for this item.
9235 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
9237 def SetBorder(*args
, **kwargs
):
9239 SetBorder(self, int border)
9241 Set the border value for this item.
9243 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
9245 def GetBorder(*args
, **kwargs
):
9247 GetBorder(self) -> int
9249 Get the border value for this item.
9251 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
9253 def GetWindow(*args
, **kwargs
):
9255 GetWindow(self) -> Window
9257 Get the window (if any) that is managed by this sizer item.
9259 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
9261 def SetWindow(*args
, **kwargs
):
9263 SetWindow(self, Window window)
9265 Set the window to be managed by this sizer item.
9267 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9269 def GetSizer(*args
, **kwargs
):
9271 GetSizer(self) -> Sizer
9273 Get the subsizer (if any) that is managed by this sizer item.
9275 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9277 def SetSizer(*args
, **kwargs
):
9279 SetSizer(self, Sizer sizer)
9281 Set the subsizer to be managed by this sizer item.
9283 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9285 def GetSpacer(*args
, **kwargs
):
9287 GetSpacer(self) -> Size
9289 Get the size of the spacer managed by this sizer item.
9291 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9293 def SetSpacer(*args
, **kwargs
):
9295 SetSpacer(self, Size size)
9297 Set the size of the spacer to be managed by this sizer item.
9299 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9301 def Show(*args
, **kwargs
):
9303 Show(self, bool show)
9305 Set the show item attribute, which sizers use to determine if the item
9306 is to be made part of the layout or not. If the item is tracking a
9307 window then it is shown or hidden as needed.
9309 return _core_
.SizerItem_Show(*args
, **kwargs
)
9311 def IsShown(*args
, **kwargs
):
9313 IsShown(self) -> bool
9315 Is the item to be shown in the layout?
9317 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
9319 def GetPosition(*args
, **kwargs
):
9321 GetPosition(self) -> Point
9323 Returns the current position of the item, as set in the last Layout.
9325 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
9327 def GetUserData(*args
, **kwargs
):
9329 GetUserData(self) -> PyObject
9331 Returns the userData associated with this sizer item, or None if there
9334 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
9337 class SizerItemPtr(SizerItem
):
9338 def __init__(self
, this
):
9340 if not hasattr(self
,"thisown"): self
.thisown
= 0
9341 self
.__class
__ = SizerItem
9342 _core_
.SizerItem_swigregister(SizerItemPtr
)
9344 def SizerItemWindow(*args
, **kwargs
):
9346 SizerItemWindow(Window window, int proportion, int flag, int border,
9347 PyObject userData=None) -> SizerItem
9349 Constructs a `wx.SizerItem` for tracking a window.
9351 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
9355 def SizerItemSpacer(*args
, **kwargs
):
9357 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9358 PyObject userData=None) -> SizerItem
9360 Constructs a `wx.SizerItem` for tracking a spacer.
9362 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
9366 def SizerItemSizer(*args
, **kwargs
):
9368 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9369 PyObject userData=None) -> SizerItem
9371 Constructs a `wx.SizerItem` for tracking a subsizer
9373 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
9377 class Sizer(Object
):
9379 wx.Sizer is the abstract base class used for laying out subwindows in
9380 a window. You cannot use wx.Sizer directly; instead, you will have to
9381 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9382 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9383 and `wx.GridBagSizer`.
9385 The concept implemented by sizers in wxWidgets is closely related to
9386 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9387 toolkit or the Qt toolkit. It is based upon the idea of the individual
9388 subwindows reporting their minimal required size and their ability to
9389 get stretched if the size of the parent window has changed. This will
9390 most often mean that the programmer does not set the original size of
9391 a dialog in the beginning, rather the dialog will assigned a sizer and
9392 this sizer will be queried about the recommended size. The sizer in
9393 turn will query its children, which can be normal windows or contorls,
9394 empty space or other sizers, so that a hierarchy of sizers can be
9395 constructed. Note that wxSizer does not derive from wxWindow and thus
9396 do not interfere with tab ordering and requires very little resources
9397 compared to a real window on screen.
9399 What makes sizers so well fitted for use in wxWidgets is the fact that
9400 every control reports its own minimal size and the algorithm can
9401 handle differences in font sizes or different window (dialog item)
9402 sizes on different platforms without problems. If for example the
9403 standard font as well as the overall design of Mac widgets requires
9404 more space than on Windows, then the initial size of a dialog using a
9405 sizer will automatically be bigger on Mac than on Windows.
9407 def __init__(self
): raise RuntimeError, "No constructor defined"
9409 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9410 def _setOORInfo(*args
, **kwargs
):
9411 """_setOORInfo(self, PyObject _self)"""
9412 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
9414 def Add(*args
, **kwargs
):
9416 Add(self, item, int proportion=0, int flag=0, int border=0,
9417 PyObject userData=None) -> wx.SizerItem
9419 Appends a child item to the sizer.
9421 return _core_
.Sizer_Add(*args
, **kwargs
)
9423 def Insert(*args
, **kwargs
):
9425 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9426 PyObject userData=None) -> wx.SizerItem
9428 Inserts a new item into the list of items managed by this sizer before
9429 the item at index *before*. See `Add` for a description of the parameters.
9431 return _core_
.Sizer_Insert(*args
, **kwargs
)
9433 def Prepend(*args
, **kwargs
):
9435 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9436 PyObject userData=None) -> wx.SizerItem
9438 Adds a new item to the begining of the list of sizer items managed by
9439 this sizer. See `Add` for a description of the parameters.
9441 return _core_
.Sizer_Prepend(*args
, **kwargs
)
9443 def Remove(*args
, **kwargs
):
9445 Remove(self, item) -> bool
9447 Removes an item from the sizer and destroys it. This method does not
9448 cause any layout or resizing to take place, call `Layout` to update
9449 the layout on screen after removing a child from the sizer. The
9450 *item* parameter can be either a window, a sizer, or the zero-based
9451 index of an item to remove. Returns True if the child item was found
9454 return _core_
.Sizer_Remove(*args
, **kwargs
)
9456 def Detach(*args
, **kwargs
):
9458 Detach(self, item) -> bool
9460 Detaches an item from the sizer without destroying it. This method
9461 does not cause any layout or resizing to take place, call `Layout` to
9462 do so. The *item* parameter can be either a window, a sizer, or the
9463 zero-based index of the item to be detached. Returns True if the child item
9464 was found and detached.
9466 return _core_
.Sizer_Detach(*args
, **kwargs
)
9468 def GetItem(*args
, **kwargs
):
9470 GetItem(self, item) -> wx.SizerItem
9472 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9473 parameter can be either a window, a sizer, or the zero-based index of
9474 the item to be detached.
9476 return _core_
.Sizer_GetItem(*args
, **kwargs
)
9478 def _SetItemMinSize(*args
, **kwargs
):
9479 """_SetItemMinSize(self, PyObject item, Size size)"""
9480 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
9482 def SetItemMinSize(self
, item
, *args
):
9484 SetItemMinSize(self, item, Size size)
9486 Sets the minimum size that will be allocated for an item in the sizer.
9487 The *item* parameter can be either a window, a sizer, or the
9488 zero-based index of the item. If a window or sizer is given then it
9489 will be searched for recursivly in subsizers if neccessary.
9492 # for backward compatibility accept separate width,height args too
9493 return self
._SetItemMinSize
(item
, args
)
9495 return self
._SetItemMinSize
(item
, args
[0])
9497 def AddItem(*args
, **kwargs
):
9499 AddItem(self, SizerItem item)
9501 Adds a `wx.SizerItem` to the sizer.
9503 return _core_
.Sizer_AddItem(*args
, **kwargs
)
9505 def InsertItem(*args
, **kwargs
):
9507 InsertItem(self, int index, SizerItem item)
9509 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9511 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
9513 def PrependItem(*args
, **kwargs
):
9515 PrependItem(self, SizerItem item)
9517 Prepends a `wx.SizerItem` to the sizer.
9519 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
9521 def AddMany(self
, items
):
9523 AddMany is a convenience method for adding several items
9524 to a sizer at one time. Simply pass it a list of tuples,
9525 where each tuple consists of the parameters that you
9526 would normally pass to the `Add` method.
9529 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
9533 # for backwards compatibility only, please do not use in new code
9534 AddWindow
= wx
._deprecated
(Add
, "AddWindow is deprecated, use `Add` instead.")
9535 AddSizer
= wx
._deprecated
(Add
, "AddSizer is deprecated, use `Add` instead.")
9536 AddSpacer
= wx
._deprecated
(Add
, "AddSpacer is deprecated, use `Add` instead.")
9537 PrependWindow
= wx
._deprecated
(Prepend
, "PrependWindow is deprecated, use `Prepend` instead.")
9538 PrependSizer
= wx
._deprecated
(Prepend
, "PrependSizer is deprecated, use `Prepend` instead.")
9539 PrependSpacer
= wx
._deprecated
(Prepend
, "PrependSpacer is deprecated, use `Prepend` instead.")
9540 InsertWindow
= wx
._deprecated
(Insert
, "InsertWindow is deprecated, use `Insert` instead.")
9541 InsertSizer
= wx
._deprecated
(Insert
, "InsertSizer is deprecated, use `Insert` instead.")
9542 InsertSpacer
= wx
._deprecated
(Insert
, "InsertSpacer is deprecated, use `Insert` instead.")
9543 RemoveWindow
= wx
._deprecated
(Remove
, "RemoveWindow is deprecated, use `Remove` instead.")
9544 RemoveSizer
= wx
._deprecated
(Remove
, "RemoveSizer is deprecated, use `Remove` instead.")
9545 RemovePos
= wx
._deprecated
(Remove
, "RemovePos is deprecated, use `Remove` instead.")
9548 def SetDimension(*args
, **kwargs
):
9550 SetDimension(self, int x, int y, int width, int height)
9552 Call this to force the sizer to take the given dimension and thus
9553 force the items owned by the sizer to resize themselves according to
9554 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9557 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
9559 def SetMinSize(*args
, **kwargs
):
9561 SetMinSize(self, Size size)
9563 Call this to give the sizer a minimal size. Normally, the sizer will
9564 calculate its minimal size based purely on how much space its children
9565 need. After calling this method `GetMinSize` will return either the
9566 minimal size as requested by its children or the minimal size set
9567 here, depending on which is bigger.
9569 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
9571 def GetSize(*args
, **kwargs
):
9573 GetSize(self) -> Size
9575 Returns the current size of the space managed by the sizer.
9577 return _core_
.Sizer_GetSize(*args
, **kwargs
)
9579 def GetPosition(*args
, **kwargs
):
9581 GetPosition(self) -> Point
9583 Returns the current position of the sizer's managed space.
9585 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
9587 def GetMinSize(*args
, **kwargs
):
9589 GetMinSize(self) -> Size
9591 Returns the minimal size of the sizer. This is either the combined
9592 minimal size of all the children and their borders or the minimal size
9593 set by SetMinSize, depending on which is bigger.
9595 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
9597 def GetSizeTuple(self
):
9598 return self
.GetSize().Get()
9599 def GetPositionTuple(self
):
9600 return self
.GetPosition().Get()
9601 def GetMinSizeTuple(self
):
9602 return self
.GetMinSize().Get()
9604 def RecalcSizes(*args
, **kwargs
):
9608 Using the sizes calculated by `CalcMin` reposition and resize all the
9609 items managed by this sizer. You should not need to call this directly as
9610 it is called by `Layout`.
9612 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
9614 def CalcMin(*args
, **kwargs
):
9616 CalcMin(self) -> Size
9618 This method is where the sizer will do the actual calculation of its
9619 children's minimal sizes. You should not need to call this directly as
9620 it is called by `Layout`.
9622 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
9624 def Layout(*args
, **kwargs
):
9628 This method will force the recalculation and layout of the items
9629 controlled by the sizer using the current space allocated to the
9630 sizer. Normally this is called automatically from the owning window's
9631 EVT_SIZE handler, but it is also useful to call it from user code when
9632 one of the items in a sizer change size, or items are added or
9635 return _core_
.Sizer_Layout(*args
, **kwargs
)
9637 def Fit(*args
, **kwargs
):
9639 Fit(self, Window window) -> Size
9641 Tell the sizer to resize the *window* to match the sizer's minimal
9642 size. This is commonly done in the constructor of the window itself in
9643 order to set its initial size to match the needs of the children as
9644 determined by the sizer. Returns the new size.
9646 For a top level window this is the total window size, not the client size.
9648 return _core_
.Sizer_Fit(*args
, **kwargs
)
9650 def FitInside(*args
, **kwargs
):
9652 FitInside(self, Window window)
9654 Tell the sizer to resize the *virtual size* of the *window* to match the
9655 sizer's minimal size. This will not alter the on screen size of the
9656 window, but may cause the addition/removal/alteration of scrollbars
9657 required to view the virtual area in windows which manage it.
9659 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9662 return _core_
.Sizer_FitInside(*args
, **kwargs
)
9664 def SetSizeHints(*args
, **kwargs
):
9666 SetSizeHints(self, Window window)
9668 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9669 match the sizer's minimal size. This is commonly done in the
9670 constructor of the window itself if the window is resizable (as are
9671 many dialogs under Unix and frames on probably all platforms) in order
9672 to prevent the window from being sized smaller than the minimal size
9673 required by the sizer.
9675 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
9677 def SetVirtualSizeHints(*args
, **kwargs
):
9679 SetVirtualSizeHints(self, Window window)
9681 Tell the sizer to set the minimal size of the window virtual area to
9682 match the sizer's minimal size. For windows with managed scrollbars
9683 this will set them appropriately.
9685 :see: `wx.ScrolledWindow.SetScrollbars`
9688 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
9690 def Clear(*args
, **kwargs
):
9692 Clear(self, bool deleteWindows=False)
9694 Clear all items from the sizer, optionally destroying the window items
9697 return _core_
.Sizer_Clear(*args
, **kwargs
)
9699 def DeleteWindows(*args
, **kwargs
):
9703 Destroy all windows managed by the sizer.
9705 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
9707 def GetChildren(*args
, **kwargs
):
9709 GetChildren(self) -> list
9711 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9713 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
9715 def Show(*args
, **kwargs
):
9717 Show(self, item, bool show=True, bool recursive=false) -> bool
9719 Shows or hides an item managed by the sizer. To make a sizer item
9720 disappear or reappear, use Show followed by `Layout`. The *item*
9721 parameter can be either a window, a sizer, or the zero-based index of
9722 the item. Use the recursive parameter to show or hide an item in a
9723 subsizer. Returns True if the item was found.
9725 return _core_
.Sizer_Show(*args
, **kwargs
)
9727 def IsShown(*args
, **kwargs
):
9731 Determines if the item is currently shown. sizer. To make a sizer
9732 item disappear or reappear, use Show followed by `Layout`. The *item*
9733 parameter can be either a window, a sizer, or the zero-based index of
9736 return _core_
.Sizer_IsShown(*args
, **kwargs
)
9738 def Hide(self
, item
, recursive
=False):
9740 A convenience method for Show(item, False, recursive).
9742 return self
.Show(item
, False, recursive
)
9744 def ShowItems(*args
, **kwargs
):
9746 ShowItems(self, bool show)
9748 Recursively call `wx.SizerItem.Show` on all sizer items.
9750 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
9753 class SizerPtr(Sizer
):
9754 def __init__(self
, this
):
9756 if not hasattr(self
,"thisown"): self
.thisown
= 0
9757 self
.__class
__ = Sizer
9758 _core_
.Sizer_swigregister(SizerPtr
)
9760 class PySizer(Sizer
):
9762 wx.PySizer is a special version of `wx.Sizer` that has been
9763 instrumented to allow the C++ virtual methods to be overloaded in
9764 Python derived classes. You would derive from this class if you are
9765 wanting to implement a custom sizer in Python code. Simply implement
9766 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9769 class MySizer(wx.PySizer):
9771 wx.PySizer.__init__(self)
9774 for item in self.GetChildren():
9775 # calculate the total minimum width and height needed
9776 # by all items in the sizer according to this sizer's
9779 return wx.Size(width, height)
9781 def RecalcSizes(self):
9782 # find the space allotted to this sizer
9783 pos = self.GetPosition()
9784 size = self.GetSize()
9785 for item in self.GetChildren():
9786 # Recalculate (if necessary) the position and size of
9787 # each item and then call item.SetDimension to do the
9788 # actual positioning and sizing of the items within the
9789 # space alloted to this sizer.
9791 item.SetDimension(itemPos, itemSize)
9794 When `Layout` is called it first calls `CalcMin` followed by
9795 `RecalcSizes` so you can optimize a bit by saving the results of
9796 `CalcMin` and reusing them in `RecalcSizes`.
9798 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9803 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9804 def __init__(self
, *args
, **kwargs
):
9806 __init__(self) -> PySizer
9808 Creates a wx.PySizer. Must be called from the __init__ in the derived
9811 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
9812 self
.this
= newobj
.this
9815 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
9817 def _setCallbackInfo(*args
, **kwargs
):
9818 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9819 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
9822 class PySizerPtr(PySizer
):
9823 def __init__(self
, this
):
9825 if not hasattr(self
,"thisown"): self
.thisown
= 0
9826 self
.__class
__ = PySizer
9827 _core_
.PySizer_swigregister(PySizerPtr
)
9829 #---------------------------------------------------------------------------
9831 class BoxSizer(Sizer
):
9833 The basic idea behind a box sizer is that windows will most often be
9834 laid out in rather simple basic geometry, typically in a row or a
9835 column or nested hierarchies of either. A wx.BoxSizer will lay out
9836 its items in a simple row or column, depending on the orientation
9837 parameter passed to the constructor.
9840 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9841 def __init__(self
, *args
, **kwargs
):
9843 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9845 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9846 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9849 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
9850 self
.this
= newobj
.this
9853 self
._setOORInfo
(self
)
9855 def GetOrientation(*args
, **kwargs
):
9857 GetOrientation(self) -> int
9859 Returns the current orientation of the sizer.
9861 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
9863 def SetOrientation(*args
, **kwargs
):
9865 SetOrientation(self, int orient)
9867 Resets the orientation of the sizer.
9869 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
9872 class BoxSizerPtr(BoxSizer
):
9873 def __init__(self
, this
):
9875 if not hasattr(self
,"thisown"): self
.thisown
= 0
9876 self
.__class
__ = BoxSizer
9877 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
9879 #---------------------------------------------------------------------------
9881 class StaticBoxSizer(BoxSizer
):
9883 wx.StaticBoxSizer derives from and functions identically to the
9884 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9885 manages. Note that this static box must be created separately and
9886 passed to the sizer constructor.
9889 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9890 def __init__(self
, *args
, **kwargs
):
9892 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9894 Constructor. It takes an associated static box and the orientation
9895 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9898 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
9899 self
.this
= newobj
.this
9902 self
._setOORInfo
(self
)
9904 def GetStaticBox(*args
, **kwargs
):
9906 GetStaticBox(self) -> StaticBox
9908 Returns the static box associated with this sizer.
9910 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
9913 class StaticBoxSizerPtr(StaticBoxSizer
):
9914 def __init__(self
, this
):
9916 if not hasattr(self
,"thisown"): self
.thisown
= 0
9917 self
.__class
__ = StaticBoxSizer
9918 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
9920 #---------------------------------------------------------------------------
9922 class GridSizer(Sizer
):
9924 A grid sizer is a sizer which lays out its children in a
9925 two-dimensional table with all cells having the same size. In other
9926 words, the width of each cell within the grid is the width of the
9927 widest item added to the sizer and the height of each grid cell is the
9928 height of the tallest item. An optional vertical and/or horizontal
9929 gap between items can also be specified (in pixels.)
9931 Items are placed in the cells of the grid in the order they are added,
9932 in row-major order. In other words, the first row is filled first,
9933 then the second, and so on until all items have been added. (If
9934 neccessary, additional rows will be added as items are added.) If you
9935 need to have greater control over the cells that items are placed in
9936 then use the `wx.GridBagSizer`.
9940 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9941 def __init__(self
, *args
, **kwargs
):
9943 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9945 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9946 of columns and rows in the sizer - if either of the parameters is
9947 zero, it will be calculated to from the total number of children in
9948 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9949 define extra space between all children.
9951 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
9952 self
.this
= newobj
.this
9955 self
._setOORInfo
(self
)
9957 def SetCols(*args
, **kwargs
):
9959 SetCols(self, int cols)
9961 Sets the number of columns in the sizer.
9963 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
9965 def SetRows(*args
, **kwargs
):
9967 SetRows(self, int rows)
9969 Sets the number of rows in the sizer.
9971 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
9973 def SetVGap(*args
, **kwargs
):
9975 SetVGap(self, int gap)
9977 Sets the vertical gap (in pixels) between the cells in the sizer.
9979 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
9981 def SetHGap(*args
, **kwargs
):
9983 SetHGap(self, int gap)
9985 Sets the horizontal gap (in pixels) between cells in the sizer
9987 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
9989 def GetCols(*args
, **kwargs
):
9991 GetCols(self) -> int
9993 Returns the number of columns in the sizer.
9995 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
9997 def GetRows(*args
, **kwargs
):
9999 GetRows(self) -> int
10001 Returns the number of rows in the sizer.
10003 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
10005 def GetVGap(*args
, **kwargs
):
10007 GetVGap(self) -> int
10009 Returns the vertical gap (in pixels) between the cells in the sizer.
10011 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
10013 def GetHGap(*args
, **kwargs
):
10015 GetHGap(self) -> int
10017 Returns the horizontal gap (in pixels) between cells in the sizer.
10019 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
10022 class GridSizerPtr(GridSizer
):
10023 def __init__(self
, this
):
10025 if not hasattr(self
,"thisown"): self
.thisown
= 0
10026 self
.__class
__ = GridSizer
10027 _core_
.GridSizer_swigregister(GridSizerPtr
)
10029 #---------------------------------------------------------------------------
10031 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
10032 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
10033 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
10034 class FlexGridSizer(GridSizer
):
10036 A flex grid sizer is a sizer which lays out its children in a
10037 two-dimensional table with all table cells in one row having the same
10038 height and all cells in one column having the same width, but all
10039 rows or all columns are not necessarily the same height or width as in
10040 the `wx.GridSizer`.
10042 wx.FlexGridSizer can also size items equally in one direction but
10043 unequally ("flexibly") in the other. If the sizer is only flexible
10044 in one direction (this can be changed using `SetFlexibleDirection`), it
10045 needs to be decided how the sizer should grow in the other ("non
10046 flexible") direction in order to fill the available space. The
10047 `SetNonFlexibleGrowMode` method serves this purpose.
10051 def __repr__(self
):
10052 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10053 def __init__(self
, *args
, **kwargs
):
10055 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10057 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10058 number of columns and rows in the sizer - if either of the parameters
10059 is zero, it will be calculated to from the total number of children in
10060 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10061 define extra space between all children.
10063 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
10064 self
.this
= newobj
.this
10067 self
._setOORInfo
(self
)
10069 def AddGrowableRow(*args
, **kwargs
):
10071 AddGrowableRow(self, size_t idx, int proportion=0)
10073 Specifies that row *idx* (starting from zero) should be grown if there
10074 is extra space available to the sizer.
10076 The *proportion* parameter has the same meaning as the stretch factor
10077 for the box sizers except that if all proportions are 0, then all
10078 columns are resized equally (instead of not being resized at all).
10080 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
10082 def RemoveGrowableRow(*args
, **kwargs
):
10084 RemoveGrowableRow(self, size_t idx)
10086 Specifies that row *idx* is no longer growable.
10088 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
10090 def AddGrowableCol(*args
, **kwargs
):
10092 AddGrowableCol(self, size_t idx, int proportion=0)
10094 Specifies that column *idx* (starting from zero) should be grown if
10095 there is extra space available to the sizer.
10097 The *proportion* parameter has the same meaning as the stretch factor
10098 for the box sizers except that if all proportions are 0, then all
10099 columns are resized equally (instead of not being resized at all).
10101 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
10103 def RemoveGrowableCol(*args
, **kwargs
):
10105 RemoveGrowableCol(self, size_t idx)
10107 Specifies that column *idx* is no longer growable.
10109 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
10111 def SetFlexibleDirection(*args
, **kwargs
):
10113 SetFlexibleDirection(self, int direction)
10115 Specifies whether the sizer should flexibly resize its columns, rows,
10116 or both. Argument *direction* can be one of the following values. Any
10117 other value is ignored.
10119 ============== =======================================
10120 wx.VERTICAL Rows are flexibly sized.
10121 wx.HORIZONTAL Columns are flexibly sized.
10122 wx.BOTH Both rows and columns are flexibly sized
10123 (this is the default value).
10124 ============== =======================================
10126 Note that this method does not trigger relayout.
10129 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
10131 def GetFlexibleDirection(*args
, **kwargs
):
10133 GetFlexibleDirection(self) -> int
10135 Returns a value that specifies whether the sizer
10136 flexibly resizes its columns, rows, or both (default).
10138 :see: `SetFlexibleDirection`
10140 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
10142 def SetNonFlexibleGrowMode(*args
, **kwargs
):
10144 SetNonFlexibleGrowMode(self, int mode)
10146 Specifies how the sizer should grow in the non-flexible direction if
10147 there is one (so `SetFlexibleDirection` must have been called
10148 previously). Argument *mode* can be one of the following values:
10150 ========================== =================================================
10151 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10152 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10153 `AddGrowableCol` and `AddGrowableRow`. In this
10154 case equal sizing applies to minimum sizes of
10155 columns or rows (this is the default value).
10156 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10157 the non flexible direction, whether they are
10158 growable or not in the flexbile direction.
10159 ========================== =================================================
10161 Note that this method does not trigger relayout.
10165 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
10167 def GetNonFlexibleGrowMode(*args
, **kwargs
):
10169 GetNonFlexibleGrowMode(self) -> int
10171 Returns the value that specifies how the sizer grows in the
10172 non-flexible direction if there is one.
10174 :see: `SetNonFlexibleGrowMode`
10176 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
10178 def GetRowHeights(*args
, **kwargs
):
10180 GetRowHeights(self) -> list
10182 Returns a list of integers representing the heights of each of the
10185 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
10187 def GetColWidths(*args
, **kwargs
):
10189 GetColWidths(self) -> list
10191 Returns a list of integers representing the widths of each of the
10192 columns in the sizer.
10194 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
10197 class FlexGridSizerPtr(FlexGridSizer
):
10198 def __init__(self
, this
):
10200 if not hasattr(self
,"thisown"): self
.thisown
= 0
10201 self
.__class
__ = FlexGridSizer
10202 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
10204 class StdDialogButtonSizer(BoxSizer
):
10206 A special sizer that knows how to order and position standard buttons
10207 in order to conform to the current platform's standards. You simply
10208 need to add each `wx.Button` to the sizer, and be sure to create the
10209 buttons using the standard ID's. Then call `Finalize` and the sizer
10210 will take care of the rest.
10213 def __repr__(self
):
10214 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10215 def __init__(self
, *args
, **kwargs
):
10216 """__init__(self) -> StdDialogButtonSizer"""
10217 newobj
= _core_
.new_StdDialogButtonSizer(*args
, **kwargs
)
10218 self
.this
= newobj
.this
10221 def AddButton(*args
, **kwargs
):
10223 AddButton(self, wxButton button)
10225 Use this to add the buttons to this sizer. Do not use the `Add`
10226 method in the base class.
10228 return _core_
.StdDialogButtonSizer_AddButton(*args
, **kwargs
)
10230 def Finalise(*args
, **kwargs
):
10234 This funciton needs to be called after all the buttons have been added
10235 to the sizer. It will reorder them and position them in a platform
10238 return _core_
.StdDialogButtonSizer_Finalise(*args
, **kwargs
)
10240 def SetAffirmativeButton(*args
, **kwargs
):
10241 """SetAffirmativeButton(self, wxButton button)"""
10242 return _core_
.StdDialogButtonSizer_SetAffirmativeButton(*args
, **kwargs
)
10244 def SetNegativeButton(*args
, **kwargs
):
10245 """SetNegativeButton(self, wxButton button)"""
10246 return _core_
.StdDialogButtonSizer_SetNegativeButton(*args
, **kwargs
)
10248 def SetCancelButton(*args
, **kwargs
):
10249 """SetCancelButton(self, wxButton button)"""
10250 return _core_
.StdDialogButtonSizer_SetCancelButton(*args
, **kwargs
)
10252 def GetAffirmativeButton(*args
, **kwargs
):
10253 """GetAffirmativeButton(self) -> wxButton"""
10254 return _core_
.StdDialogButtonSizer_GetAffirmativeButton(*args
, **kwargs
)
10256 def GetApplyButton(*args
, **kwargs
):
10257 """GetApplyButton(self) -> wxButton"""
10258 return _core_
.StdDialogButtonSizer_GetApplyButton(*args
, **kwargs
)
10260 def GetNegativeButton(*args
, **kwargs
):
10261 """GetNegativeButton(self) -> wxButton"""
10262 return _core_
.StdDialogButtonSizer_GetNegativeButton(*args
, **kwargs
)
10264 def GetCancelButton(*args
, **kwargs
):
10265 """GetCancelButton(self) -> wxButton"""
10266 return _core_
.StdDialogButtonSizer_GetCancelButton(*args
, **kwargs
)
10268 def GetHelpButton(*args
, **kwargs
):
10269 """GetHelpButton(self) -> wxButton"""
10270 return _core_
.StdDialogButtonSizer_GetHelpButton(*args
, **kwargs
)
10273 class StdDialogButtonSizerPtr(StdDialogButtonSizer
):
10274 def __init__(self
, this
):
10276 if not hasattr(self
,"thisown"): self
.thisown
= 0
10277 self
.__class
__ = StdDialogButtonSizer
10278 _core_
.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr
)
10280 #---------------------------------------------------------------------------
10282 class GBPosition(object):
10284 This class represents the position of an item in a virtual grid of
10285 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10286 typemaps that will automatically convert from a 2-element sequence of
10287 integers to a wx.GBPosition, so you can use the more pythonic
10288 representation of the position nearly transparently in Python code.
10290 def __repr__(self
):
10291 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10292 def __init__(self
, *args
, **kwargs
):
10294 __init__(self, int row=0, int col=0) -> GBPosition
10296 This class represents the position of an item in a virtual grid of
10297 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10298 typemaps that will automatically convert from a 2-element sequence of
10299 integers to a wx.GBPosition, so you can use the more pythonic
10300 representation of the position nearly transparently in Python code.
10302 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
10303 self
.this
= newobj
.this
10306 def GetRow(*args
, **kwargs
):
10307 """GetRow(self) -> int"""
10308 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
10310 def GetCol(*args
, **kwargs
):
10311 """GetCol(self) -> int"""
10312 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
10314 def SetRow(*args
, **kwargs
):
10315 """SetRow(self, int row)"""
10316 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
10318 def SetCol(*args
, **kwargs
):
10319 """SetCol(self, int col)"""
10320 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
10322 def __eq__(*args
, **kwargs
):
10323 """__eq__(self, GBPosition other) -> bool"""
10324 return _core_
.GBPosition___eq__(*args
, **kwargs
)
10326 def __ne__(*args
, **kwargs
):
10327 """__ne__(self, GBPosition other) -> bool"""
10328 return _core_
.GBPosition___ne__(*args
, **kwargs
)
10330 def Set(*args
, **kwargs
):
10331 """Set(self, int row=0, int col=0)"""
10332 return _core_
.GBPosition_Set(*args
, **kwargs
)
10334 def Get(*args
, **kwargs
):
10335 """Get(self) -> PyObject"""
10336 return _core_
.GBPosition_Get(*args
, **kwargs
)
10338 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10339 def __str__(self
): return str(self
.Get())
10340 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
10341 def __len__(self
): return len(self
.Get())
10342 def __getitem__(self
, index
): return self
.Get()[index
]
10343 def __setitem__(self
, index
, val
):
10344 if index
== 0: self
.SetRow(val
)
10345 elif index
== 1: self
.SetCol(val
)
10346 else: raise IndexError
10347 def __nonzero__(self
): return self
.Get() != (0,0)
10348 __safe_for_unpickling__
= True
10349 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
10351 row
= property(GetRow
, SetRow
)
10352 col
= property(GetCol
, SetCol
)
10355 class GBPositionPtr(GBPosition
):
10356 def __init__(self
, this
):
10358 if not hasattr(self
,"thisown"): self
.thisown
= 0
10359 self
.__class
__ = GBPosition
10360 _core_
.GBPosition_swigregister(GBPositionPtr
)
10362 class GBSpan(object):
10364 This class is used to hold the row and column spanning attributes of
10365 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10366 automatically convert from a 2-element sequence of integers to a
10367 wx.GBSpan, so you can use the more pythonic representation of the span
10368 nearly transparently in Python code.
10371 def __repr__(self
):
10372 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10373 def __init__(self
, *args
, **kwargs
):
10375 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10377 Construct a new wxGBSpan, optionally setting the rowspan and
10378 colspan. The default is (1,1). (Meaning that the item occupies one
10379 cell in each direction.
10381 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
10382 self
.this
= newobj
.this
10385 def GetRowspan(*args
, **kwargs
):
10386 """GetRowspan(self) -> int"""
10387 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
10389 def GetColspan(*args
, **kwargs
):
10390 """GetColspan(self) -> int"""
10391 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
10393 def SetRowspan(*args
, **kwargs
):
10394 """SetRowspan(self, int rowspan)"""
10395 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
10397 def SetColspan(*args
, **kwargs
):
10398 """SetColspan(self, int colspan)"""
10399 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
10401 def __eq__(*args
, **kwargs
):
10402 """__eq__(self, GBSpan other) -> bool"""
10403 return _core_
.GBSpan___eq__(*args
, **kwargs
)
10405 def __ne__(*args
, **kwargs
):
10406 """__ne__(self, GBSpan other) -> bool"""
10407 return _core_
.GBSpan___ne__(*args
, **kwargs
)
10409 def Set(*args
, **kwargs
):
10410 """Set(self, int rowspan=1, int colspan=1)"""
10411 return _core_
.GBSpan_Set(*args
, **kwargs
)
10413 def Get(*args
, **kwargs
):
10414 """Get(self) -> PyObject"""
10415 return _core_
.GBSpan_Get(*args
, **kwargs
)
10417 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10418 def __str__(self
): return str(self
.Get())
10419 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
10420 def __len__(self
): return len(self
.Get())
10421 def __getitem__(self
, index
): return self
.Get()[index
]
10422 def __setitem__(self
, index
, val
):
10423 if index
== 0: self
.SetRowspan(val
)
10424 elif index
== 1: self
.SetColspan(val
)
10425 else: raise IndexError
10426 def __nonzero__(self
): return self
.Get() != (0,0)
10427 __safe_for_unpickling__
= True
10428 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
10430 rowspan
= property(GetRowspan
, SetRowspan
)
10431 colspan
= property(GetColspan
, SetColspan
)
10434 class GBSpanPtr(GBSpan
):
10435 def __init__(self
, this
):
10437 if not hasattr(self
,"thisown"): self
.thisown
= 0
10438 self
.__class
__ = GBSpan
10439 _core_
.GBSpan_swigregister(GBSpanPtr
)
10441 class GBSizerItem(SizerItem
):
10443 The wx.GBSizerItem class is used to track the additional data about
10444 items in a `wx.GridBagSizer` such as the item's position in the grid
10445 and how many rows or columns it spans.
10448 def __repr__(self
):
10449 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10450 def __init__(self
, *args
, **kwargs
):
10452 __init__(self) -> GBSizerItem
10454 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10455 size will need to be set, as well as a position and span before this
10456 item can be used in a Sizer.
10458 You will probably never need to create a wx.GBSizerItem directly as they
10459 are created automatically when the sizer's Add method is called.
10461 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
10462 self
.this
= newobj
.this
10465 def GetPos(*args
, **kwargs
):
10467 GetPos(self) -> GBPosition
10469 Get the grid position of the item
10471 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
10473 def GetPosTuple(self
): return self
.GetPos().Get()
10474 def GetSpan(*args
, **kwargs
):
10476 GetSpan(self) -> GBSpan
10478 Get the row and column spanning of the item
10480 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
10482 def GetSpanTuple(self
): return self
.GetSpan().Get()
10483 def SetPos(*args
, **kwargs
):
10485 SetPos(self, GBPosition pos) -> bool
10487 If the item is already a member of a sizer then first ensure that
10488 there is no other item that would intersect with this one at the new
10489 position, then set the new position. Returns True if the change is
10490 successful and after the next Layout() the item will be moved.
10492 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
10494 def SetSpan(*args
, **kwargs
):
10496 SetSpan(self, GBSpan span) -> bool
10498 If the item is already a member of a sizer then first ensure that
10499 there is no other item that would intersect with this one with its new
10500 spanning size, then set the new spanning. Returns True if the change
10501 is successful and after the next Layout() the item will be resized.
10504 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
10506 def Intersects(*args
, **kwargs
):
10508 Intersects(self, GBSizerItem other) -> bool
10510 Returns True if this item and the other item instersect.
10512 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
10514 def IntersectsPos(*args
, **kwargs
):
10516 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10518 Returns True if the given pos/span would intersect with this item.
10520 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
10522 def GetEndPos(*args
, **kwargs
):
10524 GetEndPos(self) -> GBPosition
10526 Get the row and column of the endpoint of this item.
10528 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
10530 def GetGBSizer(*args
, **kwargs
):
10532 GetGBSizer(self) -> GridBagSizer
10534 Get the sizer this item is a member of.
10536 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
10538 def SetGBSizer(*args
, **kwargs
):
10540 SetGBSizer(self, GridBagSizer sizer)
10542 Set the sizer this item is a member of.
10544 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
10547 class GBSizerItemPtr(GBSizerItem
):
10548 def __init__(self
, this
):
10550 if not hasattr(self
,"thisown"): self
.thisown
= 0
10551 self
.__class
__ = GBSizerItem
10552 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
10553 DefaultSpan
= cvar
.DefaultSpan
10555 def GBSizerItemWindow(*args
, **kwargs
):
10557 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10558 int border, PyObject userData=None) -> GBSizerItem
10560 Construct a `wx.GBSizerItem` for a window.
10562 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
10566 def GBSizerItemSizer(*args
, **kwargs
):
10568 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10569 int border, PyObject userData=None) -> GBSizerItem
10571 Construct a `wx.GBSizerItem` for a sizer
10573 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
10577 def GBSizerItemSpacer(*args
, **kwargs
):
10579 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10580 int flag, int border, PyObject userData=None) -> GBSizerItem
10582 Construct a `wx.GBSizerItem` for a spacer.
10584 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
10588 class GridBagSizer(FlexGridSizer
):
10590 A `wx.Sizer` that can lay out items in a virtual grid like a
10591 `wx.FlexGridSizer` but in this case explicit positioning of the items
10592 is allowed using `wx.GBPosition`, and items can optionally span more
10593 than one row and/or column using `wx.GBSpan`. The total size of the
10594 virtual grid is determined by the largest row and column that items are
10595 positioned at, adjusted for spanning.
10598 def __repr__(self
):
10599 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10600 def __init__(self
, *args
, **kwargs
):
10602 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10604 Constructor, with optional parameters to specify the gap between the
10607 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
10608 self
.this
= newobj
.this
10611 self
._setOORInfo
(self
)
10613 def Add(*args
, **kwargs
):
10615 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10616 int border=0, userData=None) -> wx.GBSizerItem
10618 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10619 more than one row or column as specified with *span*. The remaining
10620 args behave similarly to `wx.Sizer.Add`.
10622 Returns True if the item was successfully placed at the given cell
10623 position, False if something was already there.
10626 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
10628 def AddItem(*args
, **kwargs
):
10630 Add(self, GBSizerItem item) -> wx.GBSizerItem
10632 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10633 the item was successfully placed at its given cell position, False if
10634 something was already there.
10636 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
10638 def GetCellSize(*args
, **kwargs
):
10640 GetCellSize(self, int row, int col) -> Size
10642 Get the size of the specified cell, including hgap and
10643 vgap. Only valid after a Layout.
10645 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
10647 def GetEmptyCellSize(*args
, **kwargs
):
10649 GetEmptyCellSize(self) -> Size
10651 Get the size used for cells in the grid with no item.
10653 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
10655 def SetEmptyCellSize(*args
, **kwargs
):
10657 SetEmptyCellSize(self, Size sz)
10659 Set the size used for cells in the grid with no item.
10661 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
10663 def GetItemPosition(*args
):
10665 GetItemPosition(self, item) -> GBPosition
10667 Get the grid position of the specified *item* where *item* is either a
10668 window or subsizer that is a member of this sizer, or a zero-based
10671 return _core_
.GridBagSizer_GetItemPosition(*args
)
10673 def SetItemPosition(*args
):
10675 SetItemPosition(self, item, GBPosition pos) -> bool
10677 Set the grid position of the specified *item* where *item* is either a
10678 window or subsizer that is a member of this sizer, or a zero-based
10679 index of an item. Returns True on success. If the move is not
10680 allowed (because an item is already there) then False is returned.
10683 return _core_
.GridBagSizer_SetItemPosition(*args
)
10685 def GetItemSpan(*args
):
10687 GetItemSpan(self, item) -> GBSpan
10689 Get the row/col spanning of the specified *item* where *item* is
10690 either a window or subsizer that is a member of this sizer, or a
10691 zero-based index of an item.
10693 return _core_
.GridBagSizer_GetItemSpan(*args
)
10695 def SetItemSpan(*args
):
10697 SetItemSpan(self, item, GBSpan span) -> bool
10699 Set the row/col spanning of the specified *item* where *item* is
10700 either a window or subsizer that is a member of this sizer, or a
10701 zero-based index of an item. Returns True on success. If the move is
10702 not allowed (because an item is already there) then False is returned.
10704 return _core_
.GridBagSizer_SetItemSpan(*args
)
10706 def FindItem(*args
):
10708 FindItem(self, item) -> GBSizerItem
10710 Find the sizer item for the given window or subsizer, returns None if
10711 not found. (non-recursive)
10713 return _core_
.GridBagSizer_FindItem(*args
)
10715 def FindItemAtPosition(*args
, **kwargs
):
10717 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10719 Return the sizer item for the given grid cell, or None if there is no
10720 item at that position. (non-recursive)
10722 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
10724 def FindItemAtPoint(*args
, **kwargs
):
10726 FindItemAtPoint(self, Point pt) -> GBSizerItem
10728 Return the sizer item located at the point given in *pt*, or None if
10729 there is no item at that point. The (x,y) coordinates in pt correspond
10730 to the client coordinates of the window using the sizer for
10731 layout. (non-recursive)
10733 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
10735 def CheckForIntersection(*args
, **kwargs
):
10737 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10739 Look at all items and see if any intersect (or would overlap) the
10740 given *item*. Returns True if so, False if there would be no overlap.
10741 If an *excludeItem* is given then it will not be checked for
10742 intersection, for example it may be the item we are checking the
10746 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
10748 def CheckForIntersectionPos(*args
, **kwargs
):
10750 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10752 Look at all items and see if any intersect (or would overlap) the
10753 given position and span. Returns True if so, False if there would be
10754 no overlap. If an *excludeItem* is given then it will not be checked
10755 for intersection, for example it may be the item we are checking the
10758 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
10761 class GridBagSizerPtr(GridBagSizer
):
10762 def __init__(self
, this
):
10764 if not hasattr(self
,"thisown"): self
.thisown
= 0
10765 self
.__class
__ = GridBagSizer
10766 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
10768 #---------------------------------------------------------------------------
10772 Right
= _core_
.Right
10773 Bottom
= _core_
.Bottom
10774 Width
= _core_
.Width
10775 Height
= _core_
.Height
10776 Centre
= _core_
.Centre
10777 Center
= _core_
.Center
10778 CentreX
= _core_
.CentreX
10779 CentreY
= _core_
.CentreY
10780 Unconstrained
= _core_
.Unconstrained
10782 PercentOf
= _core_
.PercentOf
10783 Above
= _core_
.Above
10784 Below
= _core_
.Below
10785 LeftOf
= _core_
.LeftOf
10786 RightOf
= _core_
.RightOf
10787 SameAs
= _core_
.SameAs
10788 Absolute
= _core_
.Absolute
10789 class IndividualLayoutConstraint(Object
):
10791 Objects of this class are stored in the `wx.LayoutConstraints` class as
10792 one of eight possible constraints that a window can be involved in.
10793 You will never need to create an instance of
10794 wx.IndividualLayoutConstraint, rather you should create a
10795 `wx.LayoutConstraints` instance and use the individual contstraints
10798 def __init__(self
): raise RuntimeError, "No constructor defined"
10799 def __repr__(self
):
10800 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10801 def Set(*args
, **kwargs
):
10803 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10805 Sets the properties of the constraint. Normally called by one of the
10806 convenience functions such as Above, RightOf, SameAs.
10808 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
10810 def LeftOf(*args
, **kwargs
):
10812 LeftOf(self, Window sibling, int marg=0)
10814 Constrains this edge to be to the left of the given window, with an
10815 optional margin. Implicitly, this is relative to the left edge of the
10818 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
10820 def RightOf(*args
, **kwargs
):
10822 RightOf(self, Window sibling, int marg=0)
10824 Constrains this edge to be to the right of the given window, with an
10825 optional margin. Implicitly, this is relative to the right edge of the
10828 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
10830 def Above(*args
, **kwargs
):
10832 Above(self, Window sibling, int marg=0)
10834 Constrains this edge to be above the given window, with an optional
10835 margin. Implicitly, this is relative to the top edge of the other
10838 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
10840 def Below(*args
, **kwargs
):
10842 Below(self, Window sibling, int marg=0)
10844 Constrains this edge to be below the given window, with an optional
10845 margin. Implicitly, this is relative to the bottom edge of the other
10848 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
10850 def SameAs(*args
, **kwargs
):
10852 SameAs(self, Window otherW, int edge, int marg=0)
10854 Constrains this edge or dimension to be to the same as the edge of the
10855 given window, with an optional margin.
10857 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
10859 def PercentOf(*args
, **kwargs
):
10861 PercentOf(self, Window otherW, int wh, int per)
10863 Constrains this edge or dimension to be to a percentage of the given
10864 window, with an optional margin.
10866 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
10868 def Absolute(*args
, **kwargs
):
10870 Absolute(self, int val)
10872 Constrains this edge or dimension to be the given absolute value.
10874 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
10876 def Unconstrained(*args
, **kwargs
):
10878 Unconstrained(self)
10880 Sets this edge or dimension to be unconstrained, that is, dependent on
10881 other edges and dimensions from which this value can be deduced.
10883 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
10885 def AsIs(*args
, **kwargs
):
10889 Sets this edge or constraint to be whatever the window's value is at
10890 the moment. If either of the width and height constraints are *as is*,
10891 the window will not be resized, but moved instead. This is important
10892 when considering panel items which are intended to have a default
10893 size, such as a button, which may take its size from the size of the
10896 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
10898 def GetOtherWindow(*args
, **kwargs
):
10899 """GetOtherWindow(self) -> Window"""
10900 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
10902 def GetMyEdge(*args
, **kwargs
):
10903 """GetMyEdge(self) -> int"""
10904 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
10906 def SetEdge(*args
, **kwargs
):
10907 """SetEdge(self, int which)"""
10908 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
10910 def SetValue(*args
, **kwargs
):
10911 """SetValue(self, int v)"""
10912 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
10914 def GetMargin(*args
, **kwargs
):
10915 """GetMargin(self) -> int"""
10916 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
10918 def SetMargin(*args
, **kwargs
):
10919 """SetMargin(self, int m)"""
10920 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
10922 def GetValue(*args
, **kwargs
):
10923 """GetValue(self) -> int"""
10924 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
10926 def GetPercent(*args
, **kwargs
):
10927 """GetPercent(self) -> int"""
10928 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
10930 def GetOtherEdge(*args
, **kwargs
):
10931 """GetOtherEdge(self) -> int"""
10932 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
10934 def GetDone(*args
, **kwargs
):
10935 """GetDone(self) -> bool"""
10936 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
10938 def SetDone(*args
, **kwargs
):
10939 """SetDone(self, bool d)"""
10940 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
10942 def GetRelationship(*args
, **kwargs
):
10943 """GetRelationship(self) -> int"""
10944 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
10946 def SetRelationship(*args
, **kwargs
):
10947 """SetRelationship(self, int r)"""
10948 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
10950 def ResetIfWin(*args
, **kwargs
):
10952 ResetIfWin(self, Window otherW) -> bool
10954 Reset constraint if it mentions otherWin
10956 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
10958 def SatisfyConstraint(*args
, **kwargs
):
10960 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10962 Try to satisfy constraint
10964 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
10966 def GetEdge(*args
, **kwargs
):
10968 GetEdge(self, int which, Window thisWin, Window other) -> int
10970 Get the value of this edge or dimension, or if this
10971 is not determinable, -1.
10973 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
10976 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
10977 def __init__(self
, this
):
10979 if not hasattr(self
,"thisown"): self
.thisown
= 0
10980 self
.__class
__ = IndividualLayoutConstraint
10981 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
10983 class LayoutConstraints(Object
):
10985 **Note:** constraints are now deprecated and you should use sizers
10988 Objects of this class can be associated with a window to define its
10989 layout constraints, with respect to siblings or its parent.
10991 The class consists of the following eight constraints of class
10992 wx.IndividualLayoutConstraint, some or all of which should be accessed
10993 directly to set the appropriate constraints.
10995 * left: represents the left hand edge of the window
10996 * right: represents the right hand edge of the window
10997 * top: represents the top edge of the window
10998 * bottom: represents the bottom edge of the window
10999 * width: represents the width of the window
11000 * height: represents the height of the window
11001 * centreX: represents the horizontal centre point of the window
11002 * centreY: represents the vertical centre point of the window
11004 Most constraints are initially set to have the relationship
11005 wxUnconstrained, which means that their values should be calculated by
11006 looking at known constraints. The exceptions are width and height,
11007 which are set to wxAsIs to ensure that if the user does not specify a
11008 constraint, the existing width and height will be used, to be
11009 compatible with panel items which often have take a default size. If
11010 the constraint is ``wx.AsIs``, the dimension will not be changed.
11012 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11015 def __repr__(self
):
11016 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
11017 left
= property(_core_
.LayoutConstraints_left_get
)
11018 top
= property(_core_
.LayoutConstraints_top_get
)
11019 right
= property(_core_
.LayoutConstraints_right_get
)
11020 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
11021 width
= property(_core_
.LayoutConstraints_width_get
)
11022 height
= property(_core_
.LayoutConstraints_height_get
)
11023 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
11024 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
11025 def __init__(self
, *args
, **kwargs
):
11026 """__init__(self) -> LayoutConstraints"""
11027 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
11028 self
.this
= newobj
.this
11031 def SatisfyConstraints(*args
, **kwargs
):
11032 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11033 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
11035 def AreSatisfied(*args
, **kwargs
):
11036 """AreSatisfied(self) -> bool"""
11037 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
11040 class LayoutConstraintsPtr(LayoutConstraints
):
11041 def __init__(self
, this
):
11043 if not hasattr(self
,"thisown"): self
.thisown
= 0
11044 self
.__class
__ = LayoutConstraints
11045 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
11047 #----------------------------------------------------------------------------
11049 # Use Python's bool constants if available, make some if not
11053 __builtins__
.True = 1==1
11054 __builtins__
.False = 1==0
11055 def bool(value
): return not not value
11056 __builtins__
.bool = bool
11060 # workarounds for bad wxRTTI names
11061 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
11062 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
11063 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
11066 #----------------------------------------------------------------------------
11067 # Load version numbers from __version__... Ensure that major and minor
11068 # versions are the same for both wxPython and wxWidgets.
11070 from __version__
import *
11071 __version__
= VERSION_STRING
11073 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
11074 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
11075 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
11077 warnings
.warn("wxPython/wxWidgets release number mismatch")
11079 #----------------------------------------------------------------------------
11081 # Set the default string<-->unicode conversion encoding from the
11082 # locale. This encoding is used when string or unicode objects need
11083 # to be converted in order to pass them to wxWidgets. Please be aware
11084 # that the default encoding within the same locale may be slightly
11085 # different on different platforms. For example, please see
11086 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11087 # between the common latin/roman encodings.
11089 default
= locale
.getdefaultlocale()[1]
11091 wx
.SetDefaultPyEncoding(default
)
11095 #----------------------------------------------------------------------------
11097 class PyDeadObjectError(AttributeError):
11100 class _wxPyDeadObject(object):
11102 Instances of wx objects that are OOR capable will have their __class__
11103 changed to this class when the C++ object is deleted. This should help
11104 prevent crashes due to referencing a bogus C++ pointer.
11106 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11107 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11109 def __repr__(self
):
11110 if not hasattr(self
, "_name"):
11111 self
._name
= "[unknown]"
11112 return self
.reprStr
% self
._name
11114 def __getattr__(self
, *args
):
11115 if not hasattr(self
, "_name"):
11116 self
._name
= "[unknown]"
11117 raise PyDeadObjectError(self
.attrStr
% self
._name
)
11119 def __nonzero__(self
):
11124 class PyUnbornObjectError(AttributeError):
11127 class _wxPyUnbornObject(object):
11129 Some stock objects are created when the wx._core module is
11130 imported, but their C++ instance is not created until the wx.App
11131 object is created and initialized. These object instances will
11132 temporarily have their __class__ changed to this class so an
11133 exception will be raised if they are used before the C++ instance
11137 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11138 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
11140 def __repr__(self
):
11141 #if not hasattr(self, "_name"):
11142 # self._name = "[unknown]"
11143 return self
.reprStr
#% self._name
11145 def __getattr__(self
, *args
):
11146 #if not hasattr(self, "_name"):
11147 # self._name = "[unknown]"
11148 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
11150 def __nonzero__(self
):
11154 #----------------------------------------------------------------------------
11156 def CallAfter(callable, *args
, **kw
):
11158 Call the specified function after the current and pending event
11159 handlers have been completed. This is also good for making GUI
11160 method calls from non-GUI threads. Any extra positional or
11161 keyword args are passed on to the callable when it is called.
11163 :see: `wx.FutureCall`
11166 assert app
is not None, 'No wx.App created yet'
11168 if not hasattr(app
, "_CallAfterId"):
11169 app
._CallAfterId
= wx
.NewEventType()
11170 app
.Connect(-1, -1, app
._CallAfterId
,
11171 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
11173 evt
.SetEventType(app
._CallAfterId
)
11174 evt
.callable = callable
11177 wx
.PostEvent(app
, evt
)
11179 #----------------------------------------------------------------------------
11184 A convenience class for `wx.Timer`, that calls the given callable
11185 object once after the given amount of milliseconds, passing any
11186 positional or keyword args. The return value of the callable is
11187 availbale after it has been run with the `GetResult` method.
11189 If you don't need to get the return value or restart the timer
11190 then there is no need to hold a reference to this object. It will
11191 hold a reference to itself while the timer is running (the timer
11192 has a reference to self.Notify) but the cycle will be broken when
11193 the timer completes, automatically cleaning up the wx.FutureCall
11196 :see: `wx.CallAfter`
11198 def __init__(self
, millis
, callable, *args
, **kwargs
):
11199 self
.millis
= millis
11200 self
.callable = callable
11201 self
.SetArgs(*args
, **kwargs
)
11203 self
.running
= False
11204 self
.hasRun
= False
11213 def Start(self
, millis
=None, *args
, **kwargs
):
11215 (Re)start the timer
11217 self
.hasRun
= False
11218 if millis
is not None:
11219 self
.millis
= millis
11221 self
.SetArgs(*args
, **kwargs
)
11223 self
.timer
= wx
.PyTimer(self
.Notify
)
11224 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
11225 self
.running
= True
11231 Stop and destroy the timer.
11233 if self
.timer
is not None:
11238 def GetInterval(self
):
11239 if self
.timer
is not None:
11240 return self
.timer
.GetInterval()
11245 def IsRunning(self
):
11246 return self
.timer
is not None and self
.timer
.IsRunning()
11249 def SetArgs(self
, *args
, **kwargs
):
11251 (Re)set the args passed to the callable object. This is
11252 useful in conjunction with Restart if you want to schedule a
11253 new call to the same callable object but with different
11257 self
.kwargs
= kwargs
11263 def GetResult(self
):
11268 The timer has expired so call the callable.
11270 if self
.callable and getattr(self
.callable, 'im_self', True):
11272 self
.running
= False
11273 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
11275 if not self
.running
:
11276 # if it wasn't restarted, then cleanup
11277 wx
.CallAfter(self
.Stop
)
11281 #----------------------------------------------------------------------------
11282 # Control which items in this module should be documented by epydoc.
11283 # We allow only classes and functions, which will help reduce the size
11284 # of the docs by filtering out the zillions of constants, EVT objects,
11285 # and etc that don't make much sense by themselves, but are instead
11286 # documented (or will be) as part of the classes/functions/methods
11287 # where they should be used.
11291 A filter for epydoc that only allows non-Ptr classes and
11292 fucntions, in order to reduce the clutter in the API docs.
11294 def __init__(self
, globals):
11295 self
._globals
= globals
11297 def __call__(self
, name
):
11299 obj
= self
._globals
.get(name
, None)
11300 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
11302 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
11306 #----------------------------------------------------------------------------
11307 #----------------------------------------------------------------------------
11309 # Import other modules in this package that should show up in the
11310 # "core" wx namespace
11312 from _windows
import *
11313 from _controls
import *
11314 from _misc
import *
11317 # Fixup the stock objects since they can't be used yet. (They will be
11318 # restored in wx.PyApp.OnInit.)
11319 _core_
._wxPyFixStockObjects
()
11321 #----------------------------------------------------------------------------
11322 #----------------------------------------------------------------------------