1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
6 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
8 if isinstance(value
, class_type
):
9 self
.__dict
__[name
] = value
.this
10 if hasattr(value
,"thisown"): self
.__dict
__["thisown"] = value
.thisown
13 method
= class_type
.__swig
_setmethods
__.get(name
,None)
14 if method
: return method(self
,value
)
15 if (not static
) or hasattr(self
,name
) or (name
== "thisown"):
16 self
.__dict
__[name
] = value
18 raise AttributeError("You cannot add attributes to %s" % self
)
20 def _swig_setattr(self
,class_type
,name
,value
):
21 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
23 def _swig_getattr(self
,class_type
,name
):
24 method
= class_type
.__swig
_getmethods
__.get(name
,None)
25 if method
: return method(self
)
26 raise AttributeError,name
30 _object
= types
.ObjectType
32 except AttributeError:
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self
,name
,value
):
40 if hasattr(self
,name
) or (name
in ("this", "thisown")):
43 raise AttributeError("You cannot add attributes to %s" % self
)
47 #// Give a reference to the dictionary of this module to the C++ extension
49 _core_
._wxPySetDictionary
(vars())
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
54 wx
= _sys
.modules
[__name__
]
57 #----------------------------------------------------------------------------
59 def _deprecated(callable, msg
=None):
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
65 msg
= "%s is deprecated" % callable
66 def deprecatedWrapper(*args
, **kwargs
):
68 warnings
.warn(msg
, DeprecationWarning, stacklevel
=2)
69 return callable(*args
, **kwargs
)
70 deprecatedWrapper
.__doc
__ = msg
71 return deprecatedWrapper
74 #----------------------------------------------------------------------------
76 NOT_FOUND
= _core_
.NOT_FOUND
77 VSCROLL
= _core_
.VSCROLL
78 HSCROLL
= _core_
.HSCROLL
79 CAPTION
= _core_
.CAPTION
80 DOUBLE_BORDER
= _core_
.DOUBLE_BORDER
81 SUNKEN_BORDER
= _core_
.SUNKEN_BORDER
82 RAISED_BORDER
= _core_
.RAISED_BORDER
83 BORDER
= _core_
.BORDER
84 SIMPLE_BORDER
= _core_
.SIMPLE_BORDER
85 STATIC_BORDER
= _core_
.STATIC_BORDER
86 TRANSPARENT_WINDOW
= _core_
.TRANSPARENT_WINDOW
87 NO_BORDER
= _core_
.NO_BORDER
88 TAB_TRAVERSAL
= _core_
.TAB_TRAVERSAL
89 WANTS_CHARS
= _core_
.WANTS_CHARS
90 POPUP_WINDOW
= _core_
.POPUP_WINDOW
91 CENTER_FRAME
= _core_
.CENTER_FRAME
92 CENTRE_ON_SCREEN
= _core_
.CENTRE_ON_SCREEN
93 CENTER_ON_SCREEN
= _core_
.CENTER_ON_SCREEN
94 ED_CLIENT_MARGIN
= _core_
.ED_CLIENT_MARGIN
95 ED_BUTTONS_BOTTOM
= _core_
.ED_BUTTONS_BOTTOM
96 ED_BUTTONS_RIGHT
= _core_
.ED_BUTTONS_RIGHT
97 ED_STATIC_LINE
= _core_
.ED_STATIC_LINE
98 EXT_DIALOG_STYLE
= _core_
.EXT_DIALOG_STYLE
99 CLIP_CHILDREN
= _core_
.CLIP_CHILDREN
100 CLIP_SIBLINGS
= _core_
.CLIP_SIBLINGS
101 ALWAYS_SHOW_SB
= _core_
.ALWAYS_SHOW_SB
102 RETAINED
= _core_
.RETAINED
103 BACKINGSTORE
= _core_
.BACKINGSTORE
104 COLOURED
= _core_
.COLOURED
105 FIXED_LENGTH
= _core_
.FIXED_LENGTH
106 LB_NEEDED_SB
= _core_
.LB_NEEDED_SB
107 LB_ALWAYS_SB
= _core_
.LB_ALWAYS_SB
108 LB_SORT
= _core_
.LB_SORT
109 LB_SINGLE
= _core_
.LB_SINGLE
110 LB_MULTIPLE
= _core_
.LB_MULTIPLE
111 LB_EXTENDED
= _core_
.LB_EXTENDED
112 LB_OWNERDRAW
= _core_
.LB_OWNERDRAW
113 LB_HSCROLL
= _core_
.LB_HSCROLL
114 PROCESS_ENTER
= _core_
.PROCESS_ENTER
115 PASSWORD
= _core_
.PASSWORD
116 CB_SIMPLE
= _core_
.CB_SIMPLE
117 CB_DROPDOWN
= _core_
.CB_DROPDOWN
118 CB_SORT
= _core_
.CB_SORT
119 CB_READONLY
= _core_
.CB_READONLY
120 RA_HORIZONTAL
= _core_
.RA_HORIZONTAL
121 RA_VERTICAL
= _core_
.RA_VERTICAL
122 RA_SPECIFY_ROWS
= _core_
.RA_SPECIFY_ROWS
123 RA_SPECIFY_COLS
= _core_
.RA_SPECIFY_COLS
124 RB_GROUP
= _core_
.RB_GROUP
125 RB_SINGLE
= _core_
.RB_SINGLE
126 SL_HORIZONTAL
= _core_
.SL_HORIZONTAL
127 SL_VERTICAL
= _core_
.SL_VERTICAL
128 SL_AUTOTICKS
= _core_
.SL_AUTOTICKS
129 SL_LABELS
= _core_
.SL_LABELS
130 SL_LEFT
= _core_
.SL_LEFT
131 SL_TOP
= _core_
.SL_TOP
132 SL_RIGHT
= _core_
.SL_RIGHT
133 SL_BOTTOM
= _core_
.SL_BOTTOM
134 SL_BOTH
= _core_
.SL_BOTH
135 SL_SELRANGE
= _core_
.SL_SELRANGE
136 SB_HORIZONTAL
= _core_
.SB_HORIZONTAL
137 SB_VERTICAL
= _core_
.SB_VERTICAL
138 ST_SIZEGRIP
= _core_
.ST_SIZEGRIP
139 ST_NO_AUTORESIZE
= _core_
.ST_NO_AUTORESIZE
140 FLOOD_SURFACE
= _core_
.FLOOD_SURFACE
141 FLOOD_BORDER
= _core_
.FLOOD_BORDER
142 ODDEVEN_RULE
= _core_
.ODDEVEN_RULE
143 WINDING_RULE
= _core_
.WINDING_RULE
144 TOOL_TOP
= _core_
.TOOL_TOP
145 TOOL_BOTTOM
= _core_
.TOOL_BOTTOM
146 TOOL_LEFT
= _core_
.TOOL_LEFT
147 TOOL_RIGHT
= _core_
.TOOL_RIGHT
149 YES_NO
= _core_
.YES_NO
150 CANCEL
= _core_
.CANCEL
153 NO_DEFAULT
= _core_
.NO_DEFAULT
154 YES_DEFAULT
= _core_
.YES_DEFAULT
155 ICON_EXCLAMATION
= _core_
.ICON_EXCLAMATION
156 ICON_HAND
= _core_
.ICON_HAND
157 ICON_QUESTION
= _core_
.ICON_QUESTION
158 ICON_INFORMATION
= _core_
.ICON_INFORMATION
159 ICON_STOP
= _core_
.ICON_STOP
160 ICON_ASTERISK
= _core_
.ICON_ASTERISK
161 ICON_MASK
= _core_
.ICON_MASK
162 ICON_WARNING
= _core_
.ICON_WARNING
163 ICON_ERROR
= _core_
.ICON_ERROR
164 FORWARD
= _core_
.FORWARD
165 BACKWARD
= _core_
.BACKWARD
170 SIZE_AUTO_WIDTH
= _core_
.SIZE_AUTO_WIDTH
171 SIZE_AUTO_HEIGHT
= _core_
.SIZE_AUTO_HEIGHT
172 SIZE_AUTO
= _core_
.SIZE_AUTO
173 SIZE_USE_EXISTING
= _core_
.SIZE_USE_EXISTING
174 SIZE_ALLOW_MINUS_ONE
= _core_
.SIZE_ALLOW_MINUS_ONE
175 PORTRAIT
= _core_
.PORTRAIT
176 LANDSCAPE
= _core_
.LANDSCAPE
177 PRINT_QUALITY_HIGH
= _core_
.PRINT_QUALITY_HIGH
178 PRINT_QUALITY_MEDIUM
= _core_
.PRINT_QUALITY_MEDIUM
179 PRINT_QUALITY_LOW
= _core_
.PRINT_QUALITY_LOW
180 PRINT_QUALITY_DRAFT
= _core_
.PRINT_QUALITY_DRAFT
181 ID_ANY
= _core_
.ID_ANY
182 ID_SEPARATOR
= _core_
.ID_SEPARATOR
183 ID_LOWEST
= _core_
.ID_LOWEST
184 ID_OPEN
= _core_
.ID_OPEN
185 ID_CLOSE
= _core_
.ID_CLOSE
186 ID_NEW
= _core_
.ID_NEW
187 ID_SAVE
= _core_
.ID_SAVE
188 ID_SAVEAS
= _core_
.ID_SAVEAS
189 ID_REVERT
= _core_
.ID_REVERT
190 ID_EXIT
= _core_
.ID_EXIT
191 ID_UNDO
= _core_
.ID_UNDO
192 ID_REDO
= _core_
.ID_REDO
193 ID_HELP
= _core_
.ID_HELP
194 ID_PRINT
= _core_
.ID_PRINT
195 ID_PRINT_SETUP
= _core_
.ID_PRINT_SETUP
196 ID_PREVIEW
= _core_
.ID_PREVIEW
197 ID_ABOUT
= _core_
.ID_ABOUT
198 ID_HELP_CONTENTS
= _core_
.ID_HELP_CONTENTS
199 ID_HELP_COMMANDS
= _core_
.ID_HELP_COMMANDS
200 ID_HELP_PROCEDURES
= _core_
.ID_HELP_PROCEDURES
201 ID_HELP_CONTEXT
= _core_
.ID_HELP_CONTEXT
202 ID_CLOSE_ALL
= _core_
.ID_CLOSE_ALL
203 ID_PREFERENCES
= _core_
.ID_PREFERENCES
204 ID_CUT
= _core_
.ID_CUT
205 ID_COPY
= _core_
.ID_COPY
206 ID_PASTE
= _core_
.ID_PASTE
207 ID_CLEAR
= _core_
.ID_CLEAR
208 ID_FIND
= _core_
.ID_FIND
209 ID_DUPLICATE
= _core_
.ID_DUPLICATE
210 ID_SELECTALL
= _core_
.ID_SELECTALL
211 ID_DELETE
= _core_
.ID_DELETE
212 ID_REPLACE
= _core_
.ID_REPLACE
213 ID_REPLACE_ALL
= _core_
.ID_REPLACE_ALL
214 ID_PROPERTIES
= _core_
.ID_PROPERTIES
215 ID_VIEW_DETAILS
= _core_
.ID_VIEW_DETAILS
216 ID_VIEW_LARGEICONS
= _core_
.ID_VIEW_LARGEICONS
217 ID_VIEW_SMALLICONS
= _core_
.ID_VIEW_SMALLICONS
218 ID_VIEW_LIST
= _core_
.ID_VIEW_LIST
219 ID_VIEW_SORTDATE
= _core_
.ID_VIEW_SORTDATE
220 ID_VIEW_SORTNAME
= _core_
.ID_VIEW_SORTNAME
221 ID_VIEW_SORTSIZE
= _core_
.ID_VIEW_SORTSIZE
222 ID_VIEW_SORTTYPE
= _core_
.ID_VIEW_SORTTYPE
223 ID_FILE1
= _core_
.ID_FILE1
224 ID_FILE2
= _core_
.ID_FILE2
225 ID_FILE3
= _core_
.ID_FILE3
226 ID_FILE4
= _core_
.ID_FILE4
227 ID_FILE5
= _core_
.ID_FILE5
228 ID_FILE6
= _core_
.ID_FILE6
229 ID_FILE7
= _core_
.ID_FILE7
230 ID_FILE8
= _core_
.ID_FILE8
231 ID_FILE9
= _core_
.ID_FILE9
233 ID_CANCEL
= _core_
.ID_CANCEL
234 ID_APPLY
= _core_
.ID_APPLY
235 ID_YES
= _core_
.ID_YES
237 ID_STATIC
= _core_
.ID_STATIC
238 ID_FORWARD
= _core_
.ID_FORWARD
239 ID_BACKWARD
= _core_
.ID_BACKWARD
240 ID_DEFAULT
= _core_
.ID_DEFAULT
241 ID_MORE
= _core_
.ID_MORE
242 ID_SETUP
= _core_
.ID_SETUP
243 ID_RESET
= _core_
.ID_RESET
244 ID_CONTEXT_HELP
= _core_
.ID_CONTEXT_HELP
245 ID_YESTOALL
= _core_
.ID_YESTOALL
246 ID_NOTOALL
= _core_
.ID_NOTOALL
247 ID_ABORT
= _core_
.ID_ABORT
248 ID_RETRY
= _core_
.ID_RETRY
249 ID_IGNORE
= _core_
.ID_IGNORE
250 ID_ADD
= _core_
.ID_ADD
251 ID_REMOVE
= _core_
.ID_REMOVE
253 ID_DOWN
= _core_
.ID_DOWN
254 ID_HOME
= _core_
.ID_HOME
255 ID_REFRESH
= _core_
.ID_REFRESH
256 ID_STOP
= _core_
.ID_STOP
257 ID_INDEX
= _core_
.ID_INDEX
258 ID_BOLD
= _core_
.ID_BOLD
259 ID_ITALIC
= _core_
.ID_ITALIC
260 ID_JUSTIFY_CENTER
= _core_
.ID_JUSTIFY_CENTER
261 ID_JUSTIFY_FILL
= _core_
.ID_JUSTIFY_FILL
262 ID_JUSTIFY_RIGHT
= _core_
.ID_JUSTIFY_RIGHT
263 ID_JUSTIFY_LEFT
= _core_
.ID_JUSTIFY_LEFT
264 ID_UNDERLINE
= _core_
.ID_UNDERLINE
265 ID_INDENT
= _core_
.ID_INDENT
266 ID_UNINDENT
= _core_
.ID_UNINDENT
267 ID_ZOOM_100
= _core_
.ID_ZOOM_100
268 ID_ZOOM_FIT
= _core_
.ID_ZOOM_FIT
269 ID_ZOOM_IN
= _core_
.ID_ZOOM_IN
270 ID_ZOOM_OUT
= _core_
.ID_ZOOM_OUT
271 ID_UNDELETE
= _core_
.ID_UNDELETE
272 ID_REVERT_TO_SAVED
= _core_
.ID_REVERT_TO_SAVED
273 ID_HIGHEST
= _core_
.ID_HIGHEST
276 HIDE_READONLY
= _core_
.HIDE_READONLY
277 OVERWRITE_PROMPT
= _core_
.OVERWRITE_PROMPT
278 FILE_MUST_EXIST
= _core_
.FILE_MUST_EXIST
279 MULTIPLE
= _core_
.MULTIPLE
280 CHANGE_DIR
= _core_
.CHANGE_DIR
281 ACCEL_ALT
= _core_
.ACCEL_ALT
282 ACCEL_CTRL
= _core_
.ACCEL_CTRL
283 ACCEL_SHIFT
= _core_
.ACCEL_SHIFT
284 ACCEL_NORMAL
= _core_
.ACCEL_NORMAL
285 PD_AUTO_HIDE
= _core_
.PD_AUTO_HIDE
286 PD_APP_MODAL
= _core_
.PD_APP_MODAL
287 PD_CAN_ABORT
= _core_
.PD_CAN_ABORT
288 PD_ELAPSED_TIME
= _core_
.PD_ELAPSED_TIME
289 PD_ESTIMATED_TIME
= _core_
.PD_ESTIMATED_TIME
290 PD_REMAINING_TIME
= _core_
.PD_REMAINING_TIME
291 DD_NEW_DIR_BUTTON
= _core_
.DD_NEW_DIR_BUTTON
292 DD_DEFAULT_STYLE
= _core_
.DD_DEFAULT_STYLE
293 MENU_TEAROFF
= _core_
.MENU_TEAROFF
294 MB_DOCKABLE
= _core_
.MB_DOCKABLE
295 NO_FULL_REPAINT_ON_RESIZE
= _core_
.NO_FULL_REPAINT_ON_RESIZE
296 FULL_REPAINT_ON_RESIZE
= _core_
.FULL_REPAINT_ON_RESIZE
297 LI_HORIZONTAL
= _core_
.LI_HORIZONTAL
298 LI_VERTICAL
= _core_
.LI_VERTICAL
299 WS_EX_VALIDATE_RECURSIVELY
= _core_
.WS_EX_VALIDATE_RECURSIVELY
300 WS_EX_BLOCK_EVENTS
= _core_
.WS_EX_BLOCK_EVENTS
301 WS_EX_TRANSIENT
= _core_
.WS_EX_TRANSIENT
302 WS_EX_THEMED_BACKGROUND
= _core_
.WS_EX_THEMED_BACKGROUND
303 WS_EX_PROCESS_IDLE
= _core_
.WS_EX_PROCESS_IDLE
304 WS_EX_PROCESS_UI_UPDATES
= _core_
.WS_EX_PROCESS_UI_UPDATES
305 MM_TEXT
= _core_
.MM_TEXT
306 MM_LOMETRIC
= _core_
.MM_LOMETRIC
307 MM_HIMETRIC
= _core_
.MM_HIMETRIC
308 MM_LOENGLISH
= _core_
.MM_LOENGLISH
309 MM_HIENGLISH
= _core_
.MM_HIENGLISH
310 MM_TWIPS
= _core_
.MM_TWIPS
311 MM_ISOTROPIC
= _core_
.MM_ISOTROPIC
312 MM_ANISOTROPIC
= _core_
.MM_ANISOTROPIC
313 MM_POINTS
= _core_
.MM_POINTS
314 MM_METRIC
= _core_
.MM_METRIC
315 CENTRE
= _core_
.CENTRE
316 CENTER
= _core_
.CENTER
317 HORIZONTAL
= _core_
.HORIZONTAL
318 VERTICAL
= _core_
.VERTICAL
325 BOTTOM
= _core_
.BOTTOM
331 ALIGN_NOT
= _core_
.ALIGN_NOT
332 ALIGN_CENTER_HORIZONTAL
= _core_
.ALIGN_CENTER_HORIZONTAL
333 ALIGN_CENTRE_HORIZONTAL
= _core_
.ALIGN_CENTRE_HORIZONTAL
334 ALIGN_LEFT
= _core_
.ALIGN_LEFT
335 ALIGN_TOP
= _core_
.ALIGN_TOP
336 ALIGN_RIGHT
= _core_
.ALIGN_RIGHT
337 ALIGN_BOTTOM
= _core_
.ALIGN_BOTTOM
338 ALIGN_CENTER_VERTICAL
= _core_
.ALIGN_CENTER_VERTICAL
339 ALIGN_CENTRE_VERTICAL
= _core_
.ALIGN_CENTRE_VERTICAL
340 ALIGN_CENTER
= _core_
.ALIGN_CENTER
341 ALIGN_CENTRE
= _core_
.ALIGN_CENTRE
342 ALIGN_MASK
= _core_
.ALIGN_MASK
343 STRETCH_NOT
= _core_
.STRETCH_NOT
344 SHRINK
= _core_
.SHRINK
346 EXPAND
= _core_
.EXPAND
347 SHAPED
= _core_
.SHAPED
348 FIXED_MINSIZE
= _core_
.FIXED_MINSIZE
350 ADJUST_MINSIZE
= _core_
.ADJUST_MINSIZE
351 BORDER_DEFAULT
= _core_
.BORDER_DEFAULT
352 BORDER_NONE
= _core_
.BORDER_NONE
353 BORDER_STATIC
= _core_
.BORDER_STATIC
354 BORDER_SIMPLE
= _core_
.BORDER_SIMPLE
355 BORDER_RAISED
= _core_
.BORDER_RAISED
356 BORDER_SUNKEN
= _core_
.BORDER_SUNKEN
357 BORDER_DOUBLE
= _core_
.BORDER_DOUBLE
358 BORDER_MASK
= _core_
.BORDER_MASK
359 BG_STYLE_SYSTEM
= _core_
.BG_STYLE_SYSTEM
360 BG_STYLE_COLOUR
= _core_
.BG_STYLE_COLOUR
361 BG_STYLE_CUSTOM
= _core_
.BG_STYLE_CUSTOM
362 DEFAULT
= _core_
.DEFAULT
363 DECORATIVE
= _core_
.DECORATIVE
365 SCRIPT
= _core_
.SCRIPT
367 MODERN
= _core_
.MODERN
368 TELETYPE
= _core_
.TELETYPE
369 VARIABLE
= _core_
.VARIABLE
371 NORMAL
= _core_
.NORMAL
374 ITALIC
= _core_
.ITALIC
378 LONG_DASH
= _core_
.LONG_DASH
379 SHORT_DASH
= _core_
.SHORT_DASH
380 DOT_DASH
= _core_
.DOT_DASH
381 USER_DASH
= _core_
.USER_DASH
382 TRANSPARENT
= _core_
.TRANSPARENT
383 STIPPLE
= _core_
.STIPPLE
384 BDIAGONAL_HATCH
= _core_
.BDIAGONAL_HATCH
385 CROSSDIAG_HATCH
= _core_
.CROSSDIAG_HATCH
386 FDIAGONAL_HATCH
= _core_
.FDIAGONAL_HATCH
387 CROSS_HATCH
= _core_
.CROSS_HATCH
388 HORIZONTAL_HATCH
= _core_
.HORIZONTAL_HATCH
389 VERTICAL_HATCH
= _core_
.VERTICAL_HATCH
390 JOIN_BEVEL
= _core_
.JOIN_BEVEL
391 JOIN_MITER
= _core_
.JOIN_MITER
392 JOIN_ROUND
= _core_
.JOIN_ROUND
393 CAP_ROUND
= _core_
.CAP_ROUND
394 CAP_PROJECTING
= _core_
.CAP_PROJECTING
395 CAP_BUTT
= _core_
.CAP_BUTT
398 INVERT
= _core_
.INVERT
399 OR_REVERSE
= _core_
.OR_REVERSE
400 AND_REVERSE
= _core_
.AND_REVERSE
403 AND_INVERT
= _core_
.AND_INVERT
407 SRC_INVERT
= _core_
.SRC_INVERT
408 OR_INVERT
= _core_
.OR_INVERT
412 WXK_BACK
= _core_
.WXK_BACK
413 WXK_TAB
= _core_
.WXK_TAB
414 WXK_RETURN
= _core_
.WXK_RETURN
415 WXK_ESCAPE
= _core_
.WXK_ESCAPE
416 WXK_SPACE
= _core_
.WXK_SPACE
417 WXK_DELETE
= _core_
.WXK_DELETE
418 WXK_START
= _core_
.WXK_START
419 WXK_LBUTTON
= _core_
.WXK_LBUTTON
420 WXK_RBUTTON
= _core_
.WXK_RBUTTON
421 WXK_CANCEL
= _core_
.WXK_CANCEL
422 WXK_MBUTTON
= _core_
.WXK_MBUTTON
423 WXK_CLEAR
= _core_
.WXK_CLEAR
424 WXK_SHIFT
= _core_
.WXK_SHIFT
425 WXK_ALT
= _core_
.WXK_ALT
426 WXK_CONTROL
= _core_
.WXK_CONTROL
427 WXK_MENU
= _core_
.WXK_MENU
428 WXK_PAUSE
= _core_
.WXK_PAUSE
429 WXK_CAPITAL
= _core_
.WXK_CAPITAL
430 WXK_PRIOR
= _core_
.WXK_PRIOR
431 WXK_NEXT
= _core_
.WXK_NEXT
432 WXK_END
= _core_
.WXK_END
433 WXK_HOME
= _core_
.WXK_HOME
434 WXK_LEFT
= _core_
.WXK_LEFT
435 WXK_UP
= _core_
.WXK_UP
436 WXK_RIGHT
= _core_
.WXK_RIGHT
437 WXK_DOWN
= _core_
.WXK_DOWN
438 WXK_SELECT
= _core_
.WXK_SELECT
439 WXK_PRINT
= _core_
.WXK_PRINT
440 WXK_EXECUTE
= _core_
.WXK_EXECUTE
441 WXK_SNAPSHOT
= _core_
.WXK_SNAPSHOT
442 WXK_INSERT
= _core_
.WXK_INSERT
443 WXK_HELP
= _core_
.WXK_HELP
444 WXK_NUMPAD0
= _core_
.WXK_NUMPAD0
445 WXK_NUMPAD1
= _core_
.WXK_NUMPAD1
446 WXK_NUMPAD2
= _core_
.WXK_NUMPAD2
447 WXK_NUMPAD3
= _core_
.WXK_NUMPAD3
448 WXK_NUMPAD4
= _core_
.WXK_NUMPAD4
449 WXK_NUMPAD5
= _core_
.WXK_NUMPAD5
450 WXK_NUMPAD6
= _core_
.WXK_NUMPAD6
451 WXK_NUMPAD7
= _core_
.WXK_NUMPAD7
452 WXK_NUMPAD8
= _core_
.WXK_NUMPAD8
453 WXK_NUMPAD9
= _core_
.WXK_NUMPAD9
454 WXK_MULTIPLY
= _core_
.WXK_MULTIPLY
455 WXK_ADD
= _core_
.WXK_ADD
456 WXK_SEPARATOR
= _core_
.WXK_SEPARATOR
457 WXK_SUBTRACT
= _core_
.WXK_SUBTRACT
458 WXK_DECIMAL
= _core_
.WXK_DECIMAL
459 WXK_DIVIDE
= _core_
.WXK_DIVIDE
460 WXK_F1
= _core_
.WXK_F1
461 WXK_F2
= _core_
.WXK_F2
462 WXK_F3
= _core_
.WXK_F3
463 WXK_F4
= _core_
.WXK_F4
464 WXK_F5
= _core_
.WXK_F5
465 WXK_F6
= _core_
.WXK_F6
466 WXK_F7
= _core_
.WXK_F7
467 WXK_F8
= _core_
.WXK_F8
468 WXK_F9
= _core_
.WXK_F9
469 WXK_F10
= _core_
.WXK_F10
470 WXK_F11
= _core_
.WXK_F11
471 WXK_F12
= _core_
.WXK_F12
472 WXK_F13
= _core_
.WXK_F13
473 WXK_F14
= _core_
.WXK_F14
474 WXK_F15
= _core_
.WXK_F15
475 WXK_F16
= _core_
.WXK_F16
476 WXK_F17
= _core_
.WXK_F17
477 WXK_F18
= _core_
.WXK_F18
478 WXK_F19
= _core_
.WXK_F19
479 WXK_F20
= _core_
.WXK_F20
480 WXK_F21
= _core_
.WXK_F21
481 WXK_F22
= _core_
.WXK_F22
482 WXK_F23
= _core_
.WXK_F23
483 WXK_F24
= _core_
.WXK_F24
484 WXK_NUMLOCK
= _core_
.WXK_NUMLOCK
485 WXK_SCROLL
= _core_
.WXK_SCROLL
486 WXK_PAGEUP
= _core_
.WXK_PAGEUP
487 WXK_PAGEDOWN
= _core_
.WXK_PAGEDOWN
488 WXK_NUMPAD_SPACE
= _core_
.WXK_NUMPAD_SPACE
489 WXK_NUMPAD_TAB
= _core_
.WXK_NUMPAD_TAB
490 WXK_NUMPAD_ENTER
= _core_
.WXK_NUMPAD_ENTER
491 WXK_NUMPAD_F1
= _core_
.WXK_NUMPAD_F1
492 WXK_NUMPAD_F2
= _core_
.WXK_NUMPAD_F2
493 WXK_NUMPAD_F3
= _core_
.WXK_NUMPAD_F3
494 WXK_NUMPAD_F4
= _core_
.WXK_NUMPAD_F4
495 WXK_NUMPAD_HOME
= _core_
.WXK_NUMPAD_HOME
496 WXK_NUMPAD_LEFT
= _core_
.WXK_NUMPAD_LEFT
497 WXK_NUMPAD_UP
= _core_
.WXK_NUMPAD_UP
498 WXK_NUMPAD_RIGHT
= _core_
.WXK_NUMPAD_RIGHT
499 WXK_NUMPAD_DOWN
= _core_
.WXK_NUMPAD_DOWN
500 WXK_NUMPAD_PRIOR
= _core_
.WXK_NUMPAD_PRIOR
501 WXK_NUMPAD_PAGEUP
= _core_
.WXK_NUMPAD_PAGEUP
502 WXK_NUMPAD_NEXT
= _core_
.WXK_NUMPAD_NEXT
503 WXK_NUMPAD_PAGEDOWN
= _core_
.WXK_NUMPAD_PAGEDOWN
504 WXK_NUMPAD_END
= _core_
.WXK_NUMPAD_END
505 WXK_NUMPAD_BEGIN
= _core_
.WXK_NUMPAD_BEGIN
506 WXK_NUMPAD_INSERT
= _core_
.WXK_NUMPAD_INSERT
507 WXK_NUMPAD_DELETE
= _core_
.WXK_NUMPAD_DELETE
508 WXK_NUMPAD_EQUAL
= _core_
.WXK_NUMPAD_EQUAL
509 WXK_NUMPAD_MULTIPLY
= _core_
.WXK_NUMPAD_MULTIPLY
510 WXK_NUMPAD_ADD
= _core_
.WXK_NUMPAD_ADD
511 WXK_NUMPAD_SEPARATOR
= _core_
.WXK_NUMPAD_SEPARATOR
512 WXK_NUMPAD_SUBTRACT
= _core_
.WXK_NUMPAD_SUBTRACT
513 WXK_NUMPAD_DECIMAL
= _core_
.WXK_NUMPAD_DECIMAL
514 WXK_NUMPAD_DIVIDE
= _core_
.WXK_NUMPAD_DIVIDE
515 WXK_WINDOWS_LEFT
= _core_
.WXK_WINDOWS_LEFT
516 WXK_WINDOWS_RIGHT
= _core_
.WXK_WINDOWS_RIGHT
517 WXK_WINDOWS_MENU
= _core_
.WXK_WINDOWS_MENU
518 PAPER_NONE
= _core_
.PAPER_NONE
519 PAPER_LETTER
= _core_
.PAPER_LETTER
520 PAPER_LEGAL
= _core_
.PAPER_LEGAL
521 PAPER_A4
= _core_
.PAPER_A4
522 PAPER_CSHEET
= _core_
.PAPER_CSHEET
523 PAPER_DSHEET
= _core_
.PAPER_DSHEET
524 PAPER_ESHEET
= _core_
.PAPER_ESHEET
525 PAPER_LETTERSMALL
= _core_
.PAPER_LETTERSMALL
526 PAPER_TABLOID
= _core_
.PAPER_TABLOID
527 PAPER_LEDGER
= _core_
.PAPER_LEDGER
528 PAPER_STATEMENT
= _core_
.PAPER_STATEMENT
529 PAPER_EXECUTIVE
= _core_
.PAPER_EXECUTIVE
530 PAPER_A3
= _core_
.PAPER_A3
531 PAPER_A4SMALL
= _core_
.PAPER_A4SMALL
532 PAPER_A5
= _core_
.PAPER_A5
533 PAPER_B4
= _core_
.PAPER_B4
534 PAPER_B5
= _core_
.PAPER_B5
535 PAPER_FOLIO
= _core_
.PAPER_FOLIO
536 PAPER_QUARTO
= _core_
.PAPER_QUARTO
537 PAPER_10X14
= _core_
.PAPER_10X14
538 PAPER_11X17
= _core_
.PAPER_11X17
539 PAPER_NOTE
= _core_
.PAPER_NOTE
540 PAPER_ENV_9
= _core_
.PAPER_ENV_9
541 PAPER_ENV_10
= _core_
.PAPER_ENV_10
542 PAPER_ENV_11
= _core_
.PAPER_ENV_11
543 PAPER_ENV_12
= _core_
.PAPER_ENV_12
544 PAPER_ENV_14
= _core_
.PAPER_ENV_14
545 PAPER_ENV_DL
= _core_
.PAPER_ENV_DL
546 PAPER_ENV_C5
= _core_
.PAPER_ENV_C5
547 PAPER_ENV_C3
= _core_
.PAPER_ENV_C3
548 PAPER_ENV_C4
= _core_
.PAPER_ENV_C4
549 PAPER_ENV_C6
= _core_
.PAPER_ENV_C6
550 PAPER_ENV_C65
= _core_
.PAPER_ENV_C65
551 PAPER_ENV_B4
= _core_
.PAPER_ENV_B4
552 PAPER_ENV_B5
= _core_
.PAPER_ENV_B5
553 PAPER_ENV_B6
= _core_
.PAPER_ENV_B6
554 PAPER_ENV_ITALY
= _core_
.PAPER_ENV_ITALY
555 PAPER_ENV_MONARCH
= _core_
.PAPER_ENV_MONARCH
556 PAPER_ENV_PERSONAL
= _core_
.PAPER_ENV_PERSONAL
557 PAPER_FANFOLD_US
= _core_
.PAPER_FANFOLD_US
558 PAPER_FANFOLD_STD_GERMAN
= _core_
.PAPER_FANFOLD_STD_GERMAN
559 PAPER_FANFOLD_LGL_GERMAN
= _core_
.PAPER_FANFOLD_LGL_GERMAN
560 PAPER_ISO_B4
= _core_
.PAPER_ISO_B4
561 PAPER_JAPANESE_POSTCARD
= _core_
.PAPER_JAPANESE_POSTCARD
562 PAPER_9X11
= _core_
.PAPER_9X11
563 PAPER_10X11
= _core_
.PAPER_10X11
564 PAPER_15X11
= _core_
.PAPER_15X11
565 PAPER_ENV_INVITE
= _core_
.PAPER_ENV_INVITE
566 PAPER_LETTER_EXTRA
= _core_
.PAPER_LETTER_EXTRA
567 PAPER_LEGAL_EXTRA
= _core_
.PAPER_LEGAL_EXTRA
568 PAPER_TABLOID_EXTRA
= _core_
.PAPER_TABLOID_EXTRA
569 PAPER_A4_EXTRA
= _core_
.PAPER_A4_EXTRA
570 PAPER_LETTER_TRANSVERSE
= _core_
.PAPER_LETTER_TRANSVERSE
571 PAPER_A4_TRANSVERSE
= _core_
.PAPER_A4_TRANSVERSE
572 PAPER_LETTER_EXTRA_TRANSVERSE
= _core_
.PAPER_LETTER_EXTRA_TRANSVERSE
573 PAPER_A_PLUS
= _core_
.PAPER_A_PLUS
574 PAPER_B_PLUS
= _core_
.PAPER_B_PLUS
575 PAPER_LETTER_PLUS
= _core_
.PAPER_LETTER_PLUS
576 PAPER_A4_PLUS
= _core_
.PAPER_A4_PLUS
577 PAPER_A5_TRANSVERSE
= _core_
.PAPER_A5_TRANSVERSE
578 PAPER_B5_TRANSVERSE
= _core_
.PAPER_B5_TRANSVERSE
579 PAPER_A3_EXTRA
= _core_
.PAPER_A3_EXTRA
580 PAPER_A5_EXTRA
= _core_
.PAPER_A5_EXTRA
581 PAPER_B5_EXTRA
= _core_
.PAPER_B5_EXTRA
582 PAPER_A2
= _core_
.PAPER_A2
583 PAPER_A3_TRANSVERSE
= _core_
.PAPER_A3_TRANSVERSE
584 PAPER_A3_EXTRA_TRANSVERSE
= _core_
.PAPER_A3_EXTRA_TRANSVERSE
585 DUPLEX_SIMPLEX
= _core_
.DUPLEX_SIMPLEX
586 DUPLEX_HORIZONTAL
= _core_
.DUPLEX_HORIZONTAL
587 DUPLEX_VERTICAL
= _core_
.DUPLEX_VERTICAL
588 ITEM_SEPARATOR
= _core_
.ITEM_SEPARATOR
589 ITEM_NORMAL
= _core_
.ITEM_NORMAL
590 ITEM_CHECK
= _core_
.ITEM_CHECK
591 ITEM_RADIO
= _core_
.ITEM_RADIO
592 ITEM_MAX
= _core_
.ITEM_MAX
593 HT_NOWHERE
= _core_
.HT_NOWHERE
594 HT_SCROLLBAR_FIRST
= _core_
.HT_SCROLLBAR_FIRST
595 HT_SCROLLBAR_ARROW_LINE_1
= _core_
.HT_SCROLLBAR_ARROW_LINE_1
596 HT_SCROLLBAR_ARROW_LINE_2
= _core_
.HT_SCROLLBAR_ARROW_LINE_2
597 HT_SCROLLBAR_ARROW_PAGE_1
= _core_
.HT_SCROLLBAR_ARROW_PAGE_1
598 HT_SCROLLBAR_ARROW_PAGE_2
= _core_
.HT_SCROLLBAR_ARROW_PAGE_2
599 HT_SCROLLBAR_THUMB
= _core_
.HT_SCROLLBAR_THUMB
600 HT_SCROLLBAR_BAR_1
= _core_
.HT_SCROLLBAR_BAR_1
601 HT_SCROLLBAR_BAR_2
= _core_
.HT_SCROLLBAR_BAR_2
602 HT_SCROLLBAR_LAST
= _core_
.HT_SCROLLBAR_LAST
603 HT_WINDOW_OUTSIDE
= _core_
.HT_WINDOW_OUTSIDE
604 HT_WINDOW_INSIDE
= _core_
.HT_WINDOW_INSIDE
605 HT_WINDOW_VERT_SCROLLBAR
= _core_
.HT_WINDOW_VERT_SCROLLBAR
606 HT_WINDOW_HORZ_SCROLLBAR
= _core_
.HT_WINDOW_HORZ_SCROLLBAR
607 HT_WINDOW_CORNER
= _core_
.HT_WINDOW_CORNER
608 HT_MAX
= _core_
.HT_MAX
609 MOD_NONE
= _core_
.MOD_NONE
610 MOD_ALT
= _core_
.MOD_ALT
611 MOD_CONTROL
= _core_
.MOD_CONTROL
612 MOD_SHIFT
= _core_
.MOD_SHIFT
613 MOD_WIN
= _core_
.MOD_WIN
614 UPDATE_UI_NONE
= _core_
.UPDATE_UI_NONE
615 UPDATE_UI_RECURSE
= _core_
.UPDATE_UI_RECURSE
616 UPDATE_UI_FROMIDLE
= _core_
.UPDATE_UI_FROMIDLE
617 #---------------------------------------------------------------------------
619 class Object(object):
621 The base class for most wx objects, although in wxPython not
622 much functionality is needed nor exposed.
624 def __init__(self
): raise RuntimeError, "No constructor defined"
626 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
627 def GetClassName(*args
, **kwargs
):
629 GetClassName(self) -> String
631 Returns the class name of the C++ class using wxRTTI.
633 return _core_
.Object_GetClassName(*args
, **kwargs
)
635 def Destroy(*args
, **kwargs
):
639 Deletes the C++ object this Python object is a proxy for.
641 return _core_
.Object_Destroy(*args
, **kwargs
)
644 class ObjectPtr(Object
):
645 def __init__(self
, this
):
647 if not hasattr(self
,"thisown"): self
.thisown
= 0
648 self
.__class
__ = Object
649 _core_
.Object_swigregister(ObjectPtr
)
650 _wxPySetDictionary
= _core_
._wxPySetDictionary
652 _wxPyFixStockObjects
= _core_
._wxPyFixStockObjects
655 EmptyString
= cvar
.EmptyString
657 #---------------------------------------------------------------------------
659 BITMAP_TYPE_INVALID
= _core_
.BITMAP_TYPE_INVALID
660 BITMAP_TYPE_BMP
= _core_
.BITMAP_TYPE_BMP
661 BITMAP_TYPE_ICO
= _core_
.BITMAP_TYPE_ICO
662 BITMAP_TYPE_CUR
= _core_
.BITMAP_TYPE_CUR
663 BITMAP_TYPE_XBM
= _core_
.BITMAP_TYPE_XBM
664 BITMAP_TYPE_XBM_DATA
= _core_
.BITMAP_TYPE_XBM_DATA
665 BITMAP_TYPE_XPM
= _core_
.BITMAP_TYPE_XPM
666 BITMAP_TYPE_XPM_DATA
= _core_
.BITMAP_TYPE_XPM_DATA
667 BITMAP_TYPE_TIF
= _core_
.BITMAP_TYPE_TIF
668 BITMAP_TYPE_GIF
= _core_
.BITMAP_TYPE_GIF
669 BITMAP_TYPE_PNG
= _core_
.BITMAP_TYPE_PNG
670 BITMAP_TYPE_JPEG
= _core_
.BITMAP_TYPE_JPEG
671 BITMAP_TYPE_PNM
= _core_
.BITMAP_TYPE_PNM
672 BITMAP_TYPE_PCX
= _core_
.BITMAP_TYPE_PCX
673 BITMAP_TYPE_PICT
= _core_
.BITMAP_TYPE_PICT
674 BITMAP_TYPE_ICON
= _core_
.BITMAP_TYPE_ICON
675 BITMAP_TYPE_ANI
= _core_
.BITMAP_TYPE_ANI
676 BITMAP_TYPE_IFF
= _core_
.BITMAP_TYPE_IFF
677 BITMAP_TYPE_MACCURSOR
= _core_
.BITMAP_TYPE_MACCURSOR
678 BITMAP_TYPE_ANY
= _core_
.BITMAP_TYPE_ANY
679 CURSOR_NONE
= _core_
.CURSOR_NONE
680 CURSOR_ARROW
= _core_
.CURSOR_ARROW
681 CURSOR_RIGHT_ARROW
= _core_
.CURSOR_RIGHT_ARROW
682 CURSOR_BULLSEYE
= _core_
.CURSOR_BULLSEYE
683 CURSOR_CHAR
= _core_
.CURSOR_CHAR
684 CURSOR_CROSS
= _core_
.CURSOR_CROSS
685 CURSOR_HAND
= _core_
.CURSOR_HAND
686 CURSOR_IBEAM
= _core_
.CURSOR_IBEAM
687 CURSOR_LEFT_BUTTON
= _core_
.CURSOR_LEFT_BUTTON
688 CURSOR_MAGNIFIER
= _core_
.CURSOR_MAGNIFIER
689 CURSOR_MIDDLE_BUTTON
= _core_
.CURSOR_MIDDLE_BUTTON
690 CURSOR_NO_ENTRY
= _core_
.CURSOR_NO_ENTRY
691 CURSOR_PAINT_BRUSH
= _core_
.CURSOR_PAINT_BRUSH
692 CURSOR_PENCIL
= _core_
.CURSOR_PENCIL
693 CURSOR_POINT_LEFT
= _core_
.CURSOR_POINT_LEFT
694 CURSOR_POINT_RIGHT
= _core_
.CURSOR_POINT_RIGHT
695 CURSOR_QUESTION_ARROW
= _core_
.CURSOR_QUESTION_ARROW
696 CURSOR_RIGHT_BUTTON
= _core_
.CURSOR_RIGHT_BUTTON
697 CURSOR_SIZENESW
= _core_
.CURSOR_SIZENESW
698 CURSOR_SIZENS
= _core_
.CURSOR_SIZENS
699 CURSOR_SIZENWSE
= _core_
.CURSOR_SIZENWSE
700 CURSOR_SIZEWE
= _core_
.CURSOR_SIZEWE
701 CURSOR_SIZING
= _core_
.CURSOR_SIZING
702 CURSOR_SPRAYCAN
= _core_
.CURSOR_SPRAYCAN
703 CURSOR_WAIT
= _core_
.CURSOR_WAIT
704 CURSOR_WATCH
= _core_
.CURSOR_WATCH
705 CURSOR_BLANK
= _core_
.CURSOR_BLANK
706 CURSOR_DEFAULT
= _core_
.CURSOR_DEFAULT
707 CURSOR_COPY_ARROW
= _core_
.CURSOR_COPY_ARROW
708 CURSOR_ARROWWAIT
= _core_
.CURSOR_ARROWWAIT
709 CURSOR_MAX
= _core_
.CURSOR_MAX
710 #---------------------------------------------------------------------------
714 wx.Size is a useful data structure used to represent the size of
715 something. It simply contians integer width and height
716 proprtites. In most places in wxPython where a wx.Size is
717 expected a (width, height) tuple can be used instead.
720 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
721 width
= property(_core_
.Size_width_get
, _core_
.Size_width_set
)
722 height
= property(_core_
.Size_height_get
, _core_
.Size_height_set
)
723 x
= width
; y
= height
724 def __init__(self
, *args
, **kwargs
):
726 __init__(self, int w=0, int h=0) -> Size
728 Creates a size object.
730 newobj
= _core_
.new_Size(*args
, **kwargs
)
731 self
.this
= newobj
.this
734 def __del__(self
, destroy
=_core_
.delete_Size
):
737 if self
.thisown
: destroy(self
)
740 def __eq__(*args
, **kwargs
):
742 __eq__(self, Size sz) -> bool
744 Test for equality of wx.Size objects.
746 return _core_
.Size___eq__(*args
, **kwargs
)
748 def __ne__(*args
, **kwargs
):
750 __ne__(self, Size sz) -> bool
754 return _core_
.Size___ne__(*args
, **kwargs
)
756 def __add__(*args
, **kwargs
):
758 __add__(self, Size sz) -> Size
760 Add sz's proprties to this and return the result.
762 return _core_
.Size___add__(*args
, **kwargs
)
764 def __sub__(*args
, **kwargs
):
766 __sub__(self, Size sz) -> Size
768 Subtract sz's properties from this and return the result.
770 return _core_
.Size___sub__(*args
, **kwargs
)
772 def IncTo(*args
, **kwargs
):
776 Increments this object so that both of its dimensions are not less
777 than the corresponding dimensions of the size.
779 return _core_
.Size_IncTo(*args
, **kwargs
)
781 def DecTo(*args
, **kwargs
):
785 Decrements this object so that both of its dimensions are not greater
786 than the corresponding dimensions of the size.
788 return _core_
.Size_DecTo(*args
, **kwargs
)
790 def Set(*args
, **kwargs
):
792 Set(self, int w, int h)
794 Set both width and height.
796 return _core_
.Size_Set(*args
, **kwargs
)
798 def SetWidth(*args
, **kwargs
):
799 """SetWidth(self, int w)"""
800 return _core_
.Size_SetWidth(*args
, **kwargs
)
802 def SetHeight(*args
, **kwargs
):
803 """SetHeight(self, int h)"""
804 return _core_
.Size_SetHeight(*args
, **kwargs
)
806 def GetWidth(*args
, **kwargs
):
807 """GetWidth(self) -> int"""
808 return _core_
.Size_GetWidth(*args
, **kwargs
)
810 def GetHeight(*args
, **kwargs
):
811 """GetHeight(self) -> int"""
812 return _core_
.Size_GetHeight(*args
, **kwargs
)
814 def IsFullySpecified(*args
, **kwargs
):
816 IsFullySpecified(self) -> bool
818 Returns True if both components of the size are non-default values.
820 return _core_
.Size_IsFullySpecified(*args
, **kwargs
)
822 def SetDefaults(*args
, **kwargs
):
824 SetDefaults(self, Size size)
826 Combine this size with the other one replacing the default components
827 of this object (i.e. equal to -1) with those of the other.
829 return _core_
.Size_SetDefaults(*args
, **kwargs
)
831 def Get(*args
, **kwargs
):
833 Get() -> (width,height)
835 Returns the width and height properties as a tuple.
837 return _core_
.Size_Get(*args
, **kwargs
)
839 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
840 def __str__(self
): return str(self
.Get())
841 def __repr__(self
): return 'wx.Size'+str(self
.Get())
842 def __len__(self
): return len(self
.Get())
843 def __getitem__(self
, index
): return self
.Get()[index
]
844 def __setitem__(self
, index
, val
):
845 if index
== 0: self
.width
= val
846 elif index
== 1: self
.height
= val
847 else: raise IndexError
848 def __nonzero__(self
): return self
.Get() != (0,0)
849 __safe_for_unpickling__
= True
850 def __reduce__(self
): return (wx
.Size
, self
.Get())
854 def __init__(self
, this
):
856 if not hasattr(self
,"thisown"): self
.thisown
= 0
857 self
.__class
__ = Size
858 _core_
.Size_swigregister(SizePtr
)
860 #---------------------------------------------------------------------------
862 class RealPoint(object):
864 A data structure for representing a point or position with floating
865 point x and y properties. In wxPython most places that expect a
866 wx.RealPoint can also accept a (x,y) tuple.
869 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
870 x
= property(_core_
.RealPoint_x_get
, _core_
.RealPoint_x_set
)
871 y
= property(_core_
.RealPoint_y_get
, _core_
.RealPoint_y_set
)
872 def __init__(self
, *args
, **kwargs
):
874 __init__(self, double x=0.0, double y=0.0) -> RealPoint
876 Create a wx.RealPoint object
878 newobj
= _core_
.new_RealPoint(*args
, **kwargs
)
879 self
.this
= newobj
.this
882 def __del__(self
, destroy
=_core_
.delete_RealPoint
):
885 if self
.thisown
: destroy(self
)
888 def __eq__(*args
, **kwargs
):
890 __eq__(self, RealPoint pt) -> bool
892 Test for equality of wx.RealPoint objects.
894 return _core_
.RealPoint___eq__(*args
, **kwargs
)
896 def __ne__(*args
, **kwargs
):
898 __ne__(self, RealPoint pt) -> bool
900 Test for inequality of wx.RealPoint objects.
902 return _core_
.RealPoint___ne__(*args
, **kwargs
)
904 def __add__(*args
, **kwargs
):
906 __add__(self, RealPoint pt) -> RealPoint
908 Add pt's proprties to this and return the result.
910 return _core_
.RealPoint___add__(*args
, **kwargs
)
912 def __sub__(*args
, **kwargs
):
914 __sub__(self, RealPoint pt) -> RealPoint
916 Subtract pt's proprties from this and return the result
918 return _core_
.RealPoint___sub__(*args
, **kwargs
)
920 def Set(*args
, **kwargs
):
922 Set(self, double x, double y)
924 Set both the x and y properties
926 return _core_
.RealPoint_Set(*args
, **kwargs
)
928 def Get(*args
, **kwargs
):
932 Return the x and y properties as a tuple.
934 return _core_
.RealPoint_Get(*args
, **kwargs
)
936 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
937 def __str__(self
): return str(self
.Get())
938 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
939 def __len__(self
): return len(self
.Get())
940 def __getitem__(self
, index
): return self
.Get()[index
]
941 def __setitem__(self
, index
, val
):
942 if index
== 0: self
.x
= val
943 elif index
== 1: self
.y
= val
944 else: raise IndexError
945 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
946 __safe_for_unpickling__
= True
947 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
950 class RealPointPtr(RealPoint
):
951 def __init__(self
, this
):
953 if not hasattr(self
,"thisown"): self
.thisown
= 0
954 self
.__class
__ = RealPoint
955 _core_
.RealPoint_swigregister(RealPointPtr
)
957 #---------------------------------------------------------------------------
961 A data structure for representing a point or position with integer x
962 and y properties. Most places in wxPython that expect a wx.Point can
963 also accept a (x,y) tuple.
966 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
967 x
= property(_core_
.Point_x_get
, _core_
.Point_x_set
)
968 y
= property(_core_
.Point_y_get
, _core_
.Point_y_set
)
969 def __init__(self
, *args
, **kwargs
):
971 __init__(self, int x=0, int y=0) -> Point
973 Create a wx.Point object
975 newobj
= _core_
.new_Point(*args
, **kwargs
)
976 self
.this
= newobj
.this
979 def __del__(self
, destroy
=_core_
.delete_Point
):
982 if self
.thisown
: destroy(self
)
985 def __eq__(*args
, **kwargs
):
987 __eq__(self, Point pt) -> bool
989 Test for equality of wx.Point objects.
991 return _core_
.Point___eq__(*args
, **kwargs
)
993 def __ne__(*args
, **kwargs
):
995 __ne__(self, Point pt) -> bool
997 Test for inequality of wx.Point objects.
999 return _core_
.Point___ne__(*args
, **kwargs
)
1001 def __add__(*args
, **kwargs
):
1003 __add__(self, Point pt) -> Point
1005 Add pt's proprties to this and return the result.
1007 return _core_
.Point___add__(*args
, **kwargs
)
1009 def __sub__(*args
, **kwargs
):
1011 __sub__(self, Point pt) -> Point
1013 Subtract pt's proprties from this and return the result
1015 return _core_
.Point___sub__(*args
, **kwargs
)
1017 def __iadd__(*args
, **kwargs
):
1019 __iadd__(self, Point pt) -> Point
1021 Add pt to this object.
1023 return _core_
.Point___iadd__(*args
, **kwargs
)
1025 def __isub__(*args
, **kwargs
):
1027 __isub__(self, Point pt) -> Point
1029 Subtract pt from this object.
1031 return _core_
.Point___isub__(*args
, **kwargs
)
1033 def Set(*args
, **kwargs
):
1035 Set(self, long x, long y)
1037 Set both the x and y properties
1039 return _core_
.Point_Set(*args
, **kwargs
)
1041 def Get(*args
, **kwargs
):
1045 Return the x and y properties as a tuple.
1047 return _core_
.Point_Get(*args
, **kwargs
)
1049 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1050 def __str__(self
): return str(self
.Get())
1051 def __repr__(self
): return 'wx.Point'+str(self
.Get())
1052 def __len__(self
): return len(self
.Get())
1053 def __getitem__(self
, index
): return self
.Get()[index
]
1054 def __setitem__(self
, index
, val
):
1055 if index
== 0: self
.x
= val
1056 elif index
== 1: self
.y
= val
1057 else: raise IndexError
1058 def __nonzero__(self
): return self
.Get() != (0,0)
1059 __safe_for_unpickling__
= True
1060 def __reduce__(self
): return (wx
.Point
, self
.Get())
1063 class PointPtr(Point
):
1064 def __init__(self
, this
):
1066 if not hasattr(self
,"thisown"): self
.thisown
= 0
1067 self
.__class
__ = Point
1068 _core_
.Point_swigregister(PointPtr
)
1070 #---------------------------------------------------------------------------
1074 A class for representing and manipulating rectangles. It has x, y,
1075 width and height properties. In wxPython most palces that expect a
1076 wx.Rect can also accept a (x,y,width,height) tuple.
1079 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1080 def __init__(self
, *args
, **kwargs
):
1082 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1084 Create a new Rect object.
1086 newobj
= _core_
.new_Rect(*args
, **kwargs
)
1087 self
.this
= newobj
.this
1090 def __del__(self
, destroy
=_core_
.delete_Rect
):
1093 if self
.thisown
: destroy(self
)
1096 def GetX(*args
, **kwargs
):
1097 """GetX(self) -> int"""
1098 return _core_
.Rect_GetX(*args
, **kwargs
)
1100 def SetX(*args
, **kwargs
):
1101 """SetX(self, int x)"""
1102 return _core_
.Rect_SetX(*args
, **kwargs
)
1104 def GetY(*args
, **kwargs
):
1105 """GetY(self) -> int"""
1106 return _core_
.Rect_GetY(*args
, **kwargs
)
1108 def SetY(*args
, **kwargs
):
1109 """SetY(self, int y)"""
1110 return _core_
.Rect_SetY(*args
, **kwargs
)
1112 def GetWidth(*args
, **kwargs
):
1113 """GetWidth(self) -> int"""
1114 return _core_
.Rect_GetWidth(*args
, **kwargs
)
1116 def SetWidth(*args
, **kwargs
):
1117 """SetWidth(self, int w)"""
1118 return _core_
.Rect_SetWidth(*args
, **kwargs
)
1120 def GetHeight(*args
, **kwargs
):
1121 """GetHeight(self) -> int"""
1122 return _core_
.Rect_GetHeight(*args
, **kwargs
)
1124 def SetHeight(*args
, **kwargs
):
1125 """SetHeight(self, int h)"""
1126 return _core_
.Rect_SetHeight(*args
, **kwargs
)
1128 def GetPosition(*args
, **kwargs
):
1129 """GetPosition(self) -> Point"""
1130 return _core_
.Rect_GetPosition(*args
, **kwargs
)
1132 def SetPosition(*args
, **kwargs
):
1133 """SetPosition(self, Point p)"""
1134 return _core_
.Rect_SetPosition(*args
, **kwargs
)
1136 def GetSize(*args
, **kwargs
):
1137 """GetSize(self) -> Size"""
1138 return _core_
.Rect_GetSize(*args
, **kwargs
)
1140 def SetSize(*args
, **kwargs
):
1141 """SetSize(self, Size s)"""
1142 return _core_
.Rect_SetSize(*args
, **kwargs
)
1144 def GetTopLeft(*args
, **kwargs
):
1145 """GetTopLeft(self) -> Point"""
1146 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1148 def SetTopLeft(*args
, **kwargs
):
1149 """SetTopLeft(self, Point p)"""
1150 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1152 def GetBottomRight(*args
, **kwargs
):
1153 """GetBottomRight(self) -> Point"""
1154 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1156 def SetBottomRight(*args
, **kwargs
):
1157 """SetBottomRight(self, Point p)"""
1158 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1160 def GetLeft(*args
, **kwargs
):
1161 """GetLeft(self) -> int"""
1162 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1164 def GetTop(*args
, **kwargs
):
1165 """GetTop(self) -> int"""
1166 return _core_
.Rect_GetTop(*args
, **kwargs
)
1168 def GetBottom(*args
, **kwargs
):
1169 """GetBottom(self) -> int"""
1170 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1172 def GetRight(*args
, **kwargs
):
1173 """GetRight(self) -> int"""
1174 return _core_
.Rect_GetRight(*args
, **kwargs
)
1176 def SetLeft(*args
, **kwargs
):
1177 """SetLeft(self, int left)"""
1178 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1180 def SetRight(*args
, **kwargs
):
1181 """SetRight(self, int right)"""
1182 return _core_
.Rect_SetRight(*args
, **kwargs
)
1184 def SetTop(*args
, **kwargs
):
1185 """SetTop(self, int top)"""
1186 return _core_
.Rect_SetTop(*args
, **kwargs
)
1188 def SetBottom(*args
, **kwargs
):
1189 """SetBottom(self, int bottom)"""
1190 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1192 position
= property(GetPosition
, SetPosition
)
1193 size
= property(GetSize
, SetSize
)
1194 left
= property(GetLeft
, SetLeft
)
1195 right
= property(GetRight
, SetRight
)
1196 top
= property(GetTop
, SetTop
)
1197 bottom
= property(GetBottom
, SetBottom
)
1199 def Inflate(*args
, **kwargs
):
1201 Inflate(self, int dx, int dy) -> Rect
1203 Increase the rectangle size by dx in x direction and dy in y
1204 direction. Both (or one of) parameters may be negative to decrease the
1207 return _core_
.Rect_Inflate(*args
, **kwargs
)
1209 def Deflate(*args
, **kwargs
):
1211 Deflate(self, int dx, int dy) -> Rect
1213 Decrease the rectangle size by dx in x direction and dy in y
1214 direction. Both (or one of) parameters may be negative to increase the
1215 rectngle size. This method is the opposite of Inflate.
1217 return _core_
.Rect_Deflate(*args
, **kwargs
)
1219 def OffsetXY(*args
, **kwargs
):
1221 OffsetXY(self, int dx, int dy)
1223 Moves the rectangle by the specified offset. If dx is positive, the
1224 rectangle is moved to the right, if dy is positive, it is moved to the
1225 bottom, otherwise it is moved to the left or top respectively.
1227 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1229 def Offset(*args
, **kwargs
):
1231 Offset(self, Point pt)
1233 Same as OffsetXY but uses dx,dy from Point
1235 return _core_
.Rect_Offset(*args
, **kwargs
)
1237 def Intersect(*args
, **kwargs
):
1239 Intersect(self, Rect rect) -> Rect
1241 Returns the intersectsion of this rectangle and rect.
1243 return _core_
.Rect_Intersect(*args
, **kwargs
)
1245 def Union(*args
, **kwargs
):
1247 Union(self, Rect rect) -> Rect
1249 Returns the union of this rectangle and rect.
1251 return _core_
.Rect_Union(*args
, **kwargs
)
1253 def __add__(*args
, **kwargs
):
1255 __add__(self, Rect rect) -> Rect
1257 Add the properties of rect to this rectangle and return the result.
1259 return _core_
.Rect___add__(*args
, **kwargs
)
1261 def __iadd__(*args
, **kwargs
):
1263 __iadd__(self, Rect rect) -> Rect
1265 Add the properties of rect to this rectangle, updating this rectangle.
1267 return _core_
.Rect___iadd__(*args
, **kwargs
)
1269 def __eq__(*args
, **kwargs
):
1271 __eq__(self, Rect rect) -> bool
1275 return _core_
.Rect___eq__(*args
, **kwargs
)
1277 def __ne__(*args
, **kwargs
):
1279 __ne__(self, Rect rect) -> bool
1281 Test for inequality.
1283 return _core_
.Rect___ne__(*args
, **kwargs
)
1285 def InsideXY(*args
, **kwargs
):
1287 InsideXY(self, int x, int y) -> bool
1289 Return True if the point is (not strcitly) inside the rect.
1291 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1293 def Inside(*args
, **kwargs
):
1295 Inside(self, Point pt) -> bool
1297 Return True if the point is (not strcitly) inside the rect.
1299 return _core_
.Rect_Inside(*args
, **kwargs
)
1301 def Intersects(*args
, **kwargs
):
1303 Intersects(self, Rect rect) -> bool
1305 Returns True if the rectangles have a non empty intersection.
1307 return _core_
.Rect_Intersects(*args
, **kwargs
)
1309 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1310 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1311 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1312 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1313 def Set(*args
, **kwargs
):
1315 Set(self, int x=0, int y=0, int width=0, int height=0)
1317 Set all rectangle properties.
1319 return _core_
.Rect_Set(*args
, **kwargs
)
1321 def Get(*args
, **kwargs
):
1323 Get() -> (x,y,width,height)
1325 Return the rectangle properties as a tuple.
1327 return _core_
.Rect_Get(*args
, **kwargs
)
1329 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1330 def __str__(self
): return str(self
.Get())
1331 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1332 def __len__(self
): return len(self
.Get())
1333 def __getitem__(self
, index
): return self
.Get()[index
]
1334 def __setitem__(self
, index
, val
):
1335 if index
== 0: self
.x
= val
1336 elif index
== 1: self
.y
= val
1337 elif index
== 2: self
.width
= val
1338 elif index
== 3: self
.height
= val
1339 else: raise IndexError
1340 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1341 __safe_for_unpickling__
= True
1342 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1345 class RectPtr(Rect
):
1346 def __init__(self
, this
):
1348 if not hasattr(self
,"thisown"): self
.thisown
= 0
1349 self
.__class
__ = Rect
1350 _core_
.Rect_swigregister(RectPtr
)
1352 def RectPP(*args
, **kwargs
):
1354 RectPP(Point topLeft, Point bottomRight) -> Rect
1356 Create a new Rect object from Points representing two corners.
1358 val
= _core_
.new_RectPP(*args
, **kwargs
)
1362 def RectPS(*args
, **kwargs
):
1364 RectPS(Point pos, Size size) -> Rect
1366 Create a new Rect from a position and size.
1368 val
= _core_
.new_RectPS(*args
, **kwargs
)
1372 def RectS(*args
, **kwargs
):
1374 RectS(Size size) -> Rect
1376 Create a new Rect from a size only.
1378 val
= _core_
.new_RectS(*args
, **kwargs
)
1383 def IntersectRect(*args
, **kwargs
):
1385 IntersectRect(Rect r1, Rect r2) -> Rect
1387 Calculate and return the intersection of r1 and r2.
1389 return _core_
.IntersectRect(*args
, **kwargs
)
1390 #---------------------------------------------------------------------------
1392 class Point2D(object):
1394 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1395 with floating point values.
1398 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1399 def __init__(self
, *args
, **kwargs
):
1401 __init__(self, double x=0.0, double y=0.0) -> Point2D
1403 Create a w.Point2D object.
1405 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1406 self
.this
= newobj
.this
1409 def GetFloor(*args
, **kwargs
):
1415 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1417 def GetRounded(*args
, **kwargs
):
1419 GetRounded() -> (x,y)
1423 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1425 def GetVectorLength(*args
, **kwargs
):
1426 """GetVectorLength(self) -> double"""
1427 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1429 def GetVectorAngle(*args
, **kwargs
):
1430 """GetVectorAngle(self) -> double"""
1431 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1433 def SetVectorLength(*args
, **kwargs
):
1434 """SetVectorLength(self, double length)"""
1435 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1437 def SetVectorAngle(*args
, **kwargs
):
1438 """SetVectorAngle(self, double degrees)"""
1439 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1441 def SetPolarCoordinates(self
, angle
, length
):
1442 self
.SetVectorLength(length
)
1443 self
.SetVectorAngle(angle
)
1444 def Normalize(self
):
1445 self
.SetVectorLength(1.0)
1447 def GetDistance(*args
, **kwargs
):
1448 """GetDistance(self, Point2D pt) -> double"""
1449 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1451 def GetDistanceSquare(*args
, **kwargs
):
1452 """GetDistanceSquare(self, Point2D pt) -> double"""
1453 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1455 def GetDotProduct(*args
, **kwargs
):
1456 """GetDotProduct(self, Point2D vec) -> double"""
1457 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1459 def GetCrossProduct(*args
, **kwargs
):
1460 """GetCrossProduct(self, Point2D vec) -> double"""
1461 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1463 def __neg__(*args
, **kwargs
):
1465 __neg__(self) -> Point2D
1467 the reflection of this point
1469 return _core_
.Point2D___neg__(*args
, **kwargs
)
1471 def __iadd__(*args
, **kwargs
):
1472 """__iadd__(self, Point2D pt) -> Point2D"""
1473 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1475 def __isub__(*args
, **kwargs
):
1476 """__isub__(self, Point2D pt) -> Point2D"""
1477 return _core_
.Point2D___isub__(*args
, **kwargs
)
1479 def __imul__(*args
, **kwargs
):
1480 """__imul__(self, Point2D pt) -> Point2D"""
1481 return _core_
.Point2D___imul__(*args
, **kwargs
)
1483 def __idiv__(*args
, **kwargs
):
1484 """__idiv__(self, Point2D pt) -> Point2D"""
1485 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1487 def __eq__(*args
, **kwargs
):
1489 __eq__(self, Point2D pt) -> bool
1493 return _core_
.Point2D___eq__(*args
, **kwargs
)
1495 def __ne__(*args
, **kwargs
):
1497 __ne__(self, Point2D pt) -> bool
1501 return _core_
.Point2D___ne__(*args
, **kwargs
)
1503 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1504 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1505 def Set(*args
, **kwargs
):
1506 """Set(self, double x=0, double y=0)"""
1507 return _core_
.Point2D_Set(*args
, **kwargs
)
1509 def Get(*args
, **kwargs
):
1513 Return x and y properties as a tuple.
1515 return _core_
.Point2D_Get(*args
, **kwargs
)
1517 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1518 def __str__(self
): return str(self
.Get())
1519 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1520 def __len__(self
): return len(self
.Get())
1521 def __getitem__(self
, index
): return self
.Get()[index
]
1522 def __setitem__(self
, index
, val
):
1523 if index
== 0: self
.x
= val
1524 elif index
== 1: self
.y
= val
1525 else: raise IndexError
1526 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1527 __safe_for_unpickling__
= True
1528 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1531 class Point2DPtr(Point2D
):
1532 def __init__(self
, this
):
1534 if not hasattr(self
,"thisown"): self
.thisown
= 0
1535 self
.__class
__ = Point2D
1536 _core_
.Point2D_swigregister(Point2DPtr
)
1538 def Point2DCopy(*args
, **kwargs
):
1540 Point2DCopy(Point2D pt) -> Point2D
1542 Create a w.Point2D object.
1544 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1548 def Point2DFromPoint(*args
, **kwargs
):
1550 Point2DFromPoint(Point pt) -> Point2D
1552 Create a w.Point2D object.
1554 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1558 #---------------------------------------------------------------------------
1560 FromStart
= _core_
.FromStart
1561 FromCurrent
= _core_
.FromCurrent
1562 FromEnd
= _core_
.FromEnd
1563 class InputStream(object):
1564 """Proxy of C++ InputStream class"""
1566 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1567 def __init__(self
, *args
, **kwargs
):
1568 """__init__(self, PyObject p) -> InputStream"""
1569 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1570 self
.this
= newobj
.this
1573 def __del__(self
, destroy
=_core_
.delete_InputStream
):
1576 if self
.thisown
: destroy(self
)
1579 def close(*args
, **kwargs
):
1581 return _core_
.InputStream_close(*args
, **kwargs
)
1583 def flush(*args
, **kwargs
):
1585 return _core_
.InputStream_flush(*args
, **kwargs
)
1587 def eof(*args
, **kwargs
):
1588 """eof(self) -> bool"""
1589 return _core_
.InputStream_eof(*args
, **kwargs
)
1591 def read(*args
, **kwargs
):
1592 """read(self, int size=-1) -> PyObject"""
1593 return _core_
.InputStream_read(*args
, **kwargs
)
1595 def readline(*args
, **kwargs
):
1596 """readline(self, int size=-1) -> PyObject"""
1597 return _core_
.InputStream_readline(*args
, **kwargs
)
1599 def readlines(*args
, **kwargs
):
1600 """readlines(self, int sizehint=-1) -> PyObject"""
1601 return _core_
.InputStream_readlines(*args
, **kwargs
)
1603 def seek(*args
, **kwargs
):
1604 """seek(self, int offset, int whence=0)"""
1605 return _core_
.InputStream_seek(*args
, **kwargs
)
1607 def tell(*args
, **kwargs
):
1608 """tell(self) -> int"""
1609 return _core_
.InputStream_tell(*args
, **kwargs
)
1611 def Peek(*args
, **kwargs
):
1612 """Peek(self) -> char"""
1613 return _core_
.InputStream_Peek(*args
, **kwargs
)
1615 def GetC(*args
, **kwargs
):
1616 """GetC(self) -> char"""
1617 return _core_
.InputStream_GetC(*args
, **kwargs
)
1619 def LastRead(*args
, **kwargs
):
1620 """LastRead(self) -> size_t"""
1621 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1623 def CanRead(*args
, **kwargs
):
1624 """CanRead(self) -> bool"""
1625 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1627 def Eof(*args
, **kwargs
):
1628 """Eof(self) -> bool"""
1629 return _core_
.InputStream_Eof(*args
, **kwargs
)
1631 def Ungetch(*args
, **kwargs
):
1632 """Ungetch(self, char c) -> bool"""
1633 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1635 def SeekI(*args
, **kwargs
):
1636 """SeekI(self, long pos, int mode=FromStart) -> long"""
1637 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1639 def TellI(*args
, **kwargs
):
1640 """TellI(self) -> long"""
1641 return _core_
.InputStream_TellI(*args
, **kwargs
)
1644 class InputStreamPtr(InputStream
):
1645 def __init__(self
, this
):
1647 if not hasattr(self
,"thisown"): self
.thisown
= 0
1648 self
.__class
__ = InputStream
1649 _core_
.InputStream_swigregister(InputStreamPtr
)
1650 DefaultPosition
= cvar
.DefaultPosition
1651 DefaultSize
= cvar
.DefaultSize
1653 class OutputStream(object):
1654 """Proxy of C++ OutputStream class"""
1655 def __init__(self
): raise RuntimeError, "No constructor defined"
1657 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1658 def write(*args
, **kwargs
):
1659 """write(self, PyObject obj)"""
1660 return _core_
.OutputStream_write(*args
, **kwargs
)
1663 class OutputStreamPtr(OutputStream
):
1664 def __init__(self
, this
):
1666 if not hasattr(self
,"thisown"): self
.thisown
= 0
1667 self
.__class
__ = OutputStream
1668 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1670 #---------------------------------------------------------------------------
1672 class FSFile(Object
):
1673 """Proxy of C++ FSFile class"""
1675 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1676 def __init__(self
, *args
, **kwargs
):
1678 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1679 DateTime modif) -> FSFile
1681 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1682 self
.this
= newobj
.this
1685 self
.thisown
= 0 # It will normally be deleted by the user of the wxFileSystem
1687 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1690 if self
.thisown
: destroy(self
)
1693 def GetStream(*args
, **kwargs
):
1694 """GetStream(self) -> InputStream"""
1695 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1697 def GetMimeType(*args
, **kwargs
):
1698 """GetMimeType(self) -> String"""
1699 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1701 def GetLocation(*args
, **kwargs
):
1702 """GetLocation(self) -> String"""
1703 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1705 def GetAnchor(*args
, **kwargs
):
1706 """GetAnchor(self) -> String"""
1707 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1709 def GetModificationTime(*args
, **kwargs
):
1710 """GetModificationTime(self) -> DateTime"""
1711 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1714 class FSFilePtr(FSFile
):
1715 def __init__(self
, this
):
1717 if not hasattr(self
,"thisown"): self
.thisown
= 0
1718 self
.__class
__ = FSFile
1719 _core_
.FSFile_swigregister(FSFilePtr
)
1721 class CPPFileSystemHandler(object):
1722 """Proxy of C++ CPPFileSystemHandler class"""
1723 def __init__(self
): raise RuntimeError, "No constructor defined"
1725 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1727 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1728 def __init__(self
, this
):
1730 if not hasattr(self
,"thisown"): self
.thisown
= 0
1731 self
.__class
__ = CPPFileSystemHandler
1732 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1734 class FileSystemHandler(CPPFileSystemHandler
):
1735 """Proxy of C++ FileSystemHandler class"""
1737 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1738 def __init__(self
, *args
, **kwargs
):
1739 """__init__(self) -> FileSystemHandler"""
1740 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1741 self
.this
= newobj
.this
1744 self
._setCallbackInfo
(self
, FileSystemHandler
)
1746 def _setCallbackInfo(*args
, **kwargs
):
1747 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1748 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1750 def CanOpen(*args
, **kwargs
):
1751 """CanOpen(self, String location) -> bool"""
1752 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1754 def OpenFile(*args
, **kwargs
):
1755 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1756 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1758 def FindFirst(*args
, **kwargs
):
1759 """FindFirst(self, String spec, int flags=0) -> String"""
1760 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1762 def FindNext(*args
, **kwargs
):
1763 """FindNext(self) -> String"""
1764 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1766 def GetProtocol(*args
, **kwargs
):
1767 """GetProtocol(self, String location) -> String"""
1768 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1770 def GetLeftLocation(*args
, **kwargs
):
1771 """GetLeftLocation(self, String location) -> String"""
1772 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1774 def GetAnchor(*args
, **kwargs
):
1775 """GetAnchor(self, String location) -> String"""
1776 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1778 def GetRightLocation(*args
, **kwargs
):
1779 """GetRightLocation(self, String location) -> String"""
1780 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1782 def GetMimeTypeFromExt(*args
, **kwargs
):
1783 """GetMimeTypeFromExt(self, String location) -> String"""
1784 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1787 class FileSystemHandlerPtr(FileSystemHandler
):
1788 def __init__(self
, this
):
1790 if not hasattr(self
,"thisown"): self
.thisown
= 0
1791 self
.__class
__ = FileSystemHandler
1792 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1794 class FileSystem(Object
):
1795 """Proxy of C++ FileSystem class"""
1797 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1798 def __init__(self
, *args
, **kwargs
):
1799 """__init__(self) -> FileSystem"""
1800 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1801 self
.this
= newobj
.this
1804 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1807 if self
.thisown
: destroy(self
)
1810 def ChangePathTo(*args
, **kwargs
):
1811 """ChangePathTo(self, String location, bool is_dir=False)"""
1812 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1814 def GetPath(*args
, **kwargs
):
1815 """GetPath(self) -> String"""
1816 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1818 def OpenFile(*args
, **kwargs
):
1819 """OpenFile(self, String location) -> FSFile"""
1820 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1822 def FindFirst(*args
, **kwargs
):
1823 """FindFirst(self, String spec, int flags=0) -> String"""
1824 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1826 def FindNext(*args
, **kwargs
):
1827 """FindNext(self) -> String"""
1828 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1830 def AddHandler(*args
, **kwargs
):
1831 """AddHandler(CPPFileSystemHandler handler)"""
1832 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1834 AddHandler
= staticmethod(AddHandler
)
1835 def CleanUpHandlers(*args
, **kwargs
):
1836 """CleanUpHandlers()"""
1837 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1839 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1840 def FileNameToURL(*args
, **kwargs
):
1841 """FileNameToURL(String filename) -> String"""
1842 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1844 FileNameToURL
= staticmethod(FileNameToURL
)
1845 def URLToFileName(*args
, **kwargs
):
1846 """URLToFileName(String url) -> String"""
1847 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1849 URLToFileName
= staticmethod(URLToFileName
)
1851 class FileSystemPtr(FileSystem
):
1852 def __init__(self
, this
):
1854 if not hasattr(self
,"thisown"): self
.thisown
= 0
1855 self
.__class
__ = FileSystem
1856 _core_
.FileSystem_swigregister(FileSystemPtr
)
1858 def FileSystem_AddHandler(*args
, **kwargs
):
1859 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1860 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1862 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1863 """FileSystem_CleanUpHandlers()"""
1864 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1866 def FileSystem_FileNameToURL(*args
, **kwargs
):
1867 """FileSystem_FileNameToURL(String filename) -> String"""
1868 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1870 def FileSystem_URLToFileName(*args
, **kwargs
):
1871 """FileSystem_URLToFileName(String url) -> String"""
1872 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1874 class InternetFSHandler(CPPFileSystemHandler
):
1875 """Proxy of C++ InternetFSHandler class"""
1877 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1878 def __init__(self
, *args
, **kwargs
):
1879 """__init__(self) -> InternetFSHandler"""
1880 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1881 self
.this
= newobj
.this
1884 def CanOpen(*args
, **kwargs
):
1885 """CanOpen(self, String location) -> bool"""
1886 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1888 def OpenFile(*args
, **kwargs
):
1889 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1890 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1893 class InternetFSHandlerPtr(InternetFSHandler
):
1894 def __init__(self
, this
):
1896 if not hasattr(self
,"thisown"): self
.thisown
= 0
1897 self
.__class
__ = InternetFSHandler
1898 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1900 class ZipFSHandler(CPPFileSystemHandler
):
1901 """Proxy of C++ ZipFSHandler class"""
1903 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1904 def __init__(self
, *args
, **kwargs
):
1905 """__init__(self) -> ZipFSHandler"""
1906 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1907 self
.this
= newobj
.this
1910 def CanOpen(*args
, **kwargs
):
1911 """CanOpen(self, String location) -> bool"""
1912 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1914 def OpenFile(*args
, **kwargs
):
1915 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1916 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1918 def FindFirst(*args
, **kwargs
):
1919 """FindFirst(self, String spec, int flags=0) -> String"""
1920 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1922 def FindNext(*args
, **kwargs
):
1923 """FindNext(self) -> String"""
1924 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1927 class ZipFSHandlerPtr(ZipFSHandler
):
1928 def __init__(self
, this
):
1930 if not hasattr(self
,"thisown"): self
.thisown
= 0
1931 self
.__class
__ = ZipFSHandler
1932 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1935 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1936 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1937 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1939 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1940 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1941 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1943 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1944 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1945 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1946 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1948 Add 'file' to the memory filesystem. The dataItem parameter can
1949 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1950 arbitrary data. If a bitmap or image is used then the imgType
1951 parameter should specify what kind of image file it should be
1952 written as, wx.BITMAP_TYPE_PNG, etc.
1954 if isinstance(dataItem
, wx
.Image
):
1955 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1956 elif isinstance(dataItem
, wx
.Bitmap
):
1957 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1958 elif type(dataItem
) == str:
1959 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1961 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1963 class MemoryFSHandler(CPPFileSystemHandler
):
1964 """Proxy of C++ MemoryFSHandler class"""
1966 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1967 def __init__(self
, *args
, **kwargs
):
1968 """__init__(self) -> MemoryFSHandler"""
1969 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
1970 self
.this
= newobj
.this
1973 def RemoveFile(*args
, **kwargs
):
1974 """RemoveFile(String filename)"""
1975 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1977 RemoveFile
= staticmethod(RemoveFile
)
1978 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1979 def CanOpen(*args
, **kwargs
):
1980 """CanOpen(self, String location) -> bool"""
1981 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1983 def OpenFile(*args
, **kwargs
):
1984 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1985 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
1987 def FindFirst(*args
, **kwargs
):
1988 """FindFirst(self, String spec, int flags=0) -> String"""
1989 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
1991 def FindNext(*args
, **kwargs
):
1992 """FindNext(self) -> String"""
1993 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
1996 class MemoryFSHandlerPtr(MemoryFSHandler
):
1997 def __init__(self
, this
):
1999 if not hasattr(self
,"thisown"): self
.thisown
= 0
2000 self
.__class
__ = MemoryFSHandler
2001 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
2003 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
2004 """MemoryFSHandler_RemoveFile(String filename)"""
2005 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
2007 #---------------------------------------------------------------------------
2009 class ImageHandler(Object
):
2010 """Proxy of C++ ImageHandler class"""
2011 def __init__(self
): raise RuntimeError, "No constructor defined"
2013 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2014 def GetName(*args
, **kwargs
):
2015 """GetName(self) -> String"""
2016 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
2018 def GetExtension(*args
, **kwargs
):
2019 """GetExtension(self) -> String"""
2020 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
2022 def GetType(*args
, **kwargs
):
2023 """GetType(self) -> long"""
2024 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
2026 def GetMimeType(*args
, **kwargs
):
2027 """GetMimeType(self) -> String"""
2028 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
2030 def CanRead(*args
, **kwargs
):
2031 """CanRead(self, String name) -> bool"""
2032 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
2034 def SetName(*args
, **kwargs
):
2035 """SetName(self, String name)"""
2036 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
2038 def SetExtension(*args
, **kwargs
):
2039 """SetExtension(self, String extension)"""
2040 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
2042 def SetType(*args
, **kwargs
):
2043 """SetType(self, long type)"""
2044 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
2046 def SetMimeType(*args
, **kwargs
):
2047 """SetMimeType(self, String mimetype)"""
2048 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
2051 class ImageHandlerPtr(ImageHandler
):
2052 def __init__(self
, this
):
2054 if not hasattr(self
,"thisown"): self
.thisown
= 0
2055 self
.__class
__ = ImageHandler
2056 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
2058 class ImageHistogram(object):
2059 """Proxy of C++ ImageHistogram class"""
2061 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2062 def __init__(self
, *args
, **kwargs
):
2063 """__init__(self) -> ImageHistogram"""
2064 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
2065 self
.this
= newobj
.this
2068 def MakeKey(*args
, **kwargs
):
2070 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2072 Get the key in the histogram for the given RGB values
2074 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2076 MakeKey
= staticmethod(MakeKey
)
2077 def FindFirstUnusedColour(*args
, **kwargs
):
2079 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2081 Find first colour that is not used in the image and has higher RGB
2082 values than startR, startG, startB. Returns a tuple consisting of a
2083 success flag and rgb values.
2085 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2088 class ImageHistogramPtr(ImageHistogram
):
2089 def __init__(self
, this
):
2091 if not hasattr(self
,"thisown"): self
.thisown
= 0
2092 self
.__class
__ = ImageHistogram
2093 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2095 def ImageHistogram_MakeKey(*args
, **kwargs
):
2097 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2099 Get the key in the histogram for the given RGB values
2101 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2103 class Image(Object
):
2104 """Proxy of C++ Image class"""
2106 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2107 def __init__(self
, *args
, **kwargs
):
2108 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2109 newobj
= _core_
.new_Image(*args
, **kwargs
)
2110 self
.this
= newobj
.this
2113 def __del__(self
, destroy
=_core_
.delete_Image
):
2116 if self
.thisown
: destroy(self
)
2119 def Create(*args
, **kwargs
):
2120 """Create(self, int width, int height)"""
2121 return _core_
.Image_Create(*args
, **kwargs
)
2123 def Destroy(*args
, **kwargs
):
2127 Deletes the C++ object this Python object is a proxy for.
2129 return _core_
.Image_Destroy(*args
, **kwargs
)
2131 def Scale(*args
, **kwargs
):
2132 """Scale(self, int width, int height) -> Image"""
2133 return _core_
.Image_Scale(*args
, **kwargs
)
2135 def ShrinkBy(*args
, **kwargs
):
2136 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2137 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2139 def Rescale(*args
, **kwargs
):
2140 """Rescale(self, int width, int height) -> Image"""
2141 return _core_
.Image_Rescale(*args
, **kwargs
)
2143 def SetRGB(*args
, **kwargs
):
2144 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2145 return _core_
.Image_SetRGB(*args
, **kwargs
)
2147 def GetRed(*args
, **kwargs
):
2148 """GetRed(self, int x, int y) -> unsigned char"""
2149 return _core_
.Image_GetRed(*args
, **kwargs
)
2151 def GetGreen(*args
, **kwargs
):
2152 """GetGreen(self, int x, int y) -> unsigned char"""
2153 return _core_
.Image_GetGreen(*args
, **kwargs
)
2155 def GetBlue(*args
, **kwargs
):
2156 """GetBlue(self, int x, int y) -> unsigned char"""
2157 return _core_
.Image_GetBlue(*args
, **kwargs
)
2159 def SetAlpha(*args
, **kwargs
):
2160 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2161 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2163 def GetAlpha(*args
, **kwargs
):
2164 """GetAlpha(self, int x, int y) -> unsigned char"""
2165 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2167 def HasAlpha(*args
, **kwargs
):
2168 """HasAlpha(self) -> bool"""
2169 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2171 def FindFirstUnusedColour(*args
, **kwargs
):
2173 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2175 Find first colour that is not used in the image and has higher RGB
2176 values than startR, startG, startB. Returns a tuple consisting of a
2177 success flag and rgb values.
2179 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2181 def ConvertAlphaToMask(*args
, **kwargs
):
2183 ConvertAlphaToMask(self, byte threshold=128) -> bool
2185 If the image has alpha channel, this method converts it to mask. All pixels
2186 with alpha value less than ``threshold`` are replaced with mask colour and the
2187 alpha channel is removed. Mask colour is chosen automatically using
2188 `FindFirstUnusedColour`.
2190 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2193 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2195 def ConvertColourToAlpha(*args
, **kwargs
):
2197 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2199 This method converts an image where the original alpha information is
2200 only available as a shades of a colour (actually shades of grey)
2201 typically when you draw anti-aliased text into a bitmap. The DC
2202 drawing routines draw grey values on the black background although
2203 they actually mean to draw white with differnt alpha values. This
2204 method reverses it, assuming a black (!) background and white text.
2205 The method will then fill up the whole image with the colour given.
2207 return _core_
.Image_ConvertColourToAlpha(*args
, **kwargs
)
2209 def SetMaskFromImage(*args
, **kwargs
):
2210 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2211 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2213 def CanRead(*args
, **kwargs
):
2214 """CanRead(String name) -> bool"""
2215 return _core_
.Image_CanRead(*args
, **kwargs
)
2217 CanRead
= staticmethod(CanRead
)
2218 def GetImageCount(*args
, **kwargs
):
2219 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2220 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2222 GetImageCount
= staticmethod(GetImageCount
)
2223 def LoadFile(*args
, **kwargs
):
2224 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2225 return _core_
.Image_LoadFile(*args
, **kwargs
)
2227 def LoadMimeFile(*args
, **kwargs
):
2228 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2229 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2231 def SaveFile(*args
, **kwargs
):
2232 """SaveFile(self, String name, int type) -> bool"""
2233 return _core_
.Image_SaveFile(*args
, **kwargs
)
2235 def SaveMimeFile(*args
, **kwargs
):
2236 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2237 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2239 def CanReadStream(*args
, **kwargs
):
2240 """CanReadStream(InputStream stream) -> bool"""
2241 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2243 CanReadStream
= staticmethod(CanReadStream
)
2244 def LoadStream(*args
, **kwargs
):
2245 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2246 return _core_
.Image_LoadStream(*args
, **kwargs
)
2248 def LoadMimeStream(*args
, **kwargs
):
2249 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2250 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2252 def Ok(*args
, **kwargs
):
2253 """Ok(self) -> bool"""
2254 return _core_
.Image_Ok(*args
, **kwargs
)
2256 def GetWidth(*args
, **kwargs
):
2257 """GetWidth(self) -> int"""
2258 return _core_
.Image_GetWidth(*args
, **kwargs
)
2260 def GetHeight(*args
, **kwargs
):
2261 """GetHeight(self) -> int"""
2262 return _core_
.Image_GetHeight(*args
, **kwargs
)
2264 def GetSize(*args
, **kwargs
):
2265 """GetSize(self) -> Size"""
2266 return _core_
.Image_GetSize(*args
, **kwargs
)
2268 def GetSubImage(*args
, **kwargs
):
2269 """GetSubImage(self, Rect rect) -> Image"""
2270 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2272 def Copy(*args
, **kwargs
):
2273 """Copy(self) -> Image"""
2274 return _core_
.Image_Copy(*args
, **kwargs
)
2276 def Paste(*args
, **kwargs
):
2277 """Paste(self, Image image, int x, int y)"""
2278 return _core_
.Image_Paste(*args
, **kwargs
)
2280 def GetData(*args
, **kwargs
):
2281 """GetData(self) -> PyObject"""
2282 return _core_
.Image_GetData(*args
, **kwargs
)
2284 def SetData(*args
, **kwargs
):
2285 """SetData(self, PyObject data)"""
2286 return _core_
.Image_SetData(*args
, **kwargs
)
2288 def GetDataBuffer(*args
, **kwargs
):
2289 """GetDataBuffer(self) -> PyObject"""
2290 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2292 def SetDataBuffer(*args
, **kwargs
):
2293 """SetDataBuffer(self, PyObject data)"""
2294 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2296 def GetAlphaData(*args
, **kwargs
):
2297 """GetAlphaData(self) -> PyObject"""
2298 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2300 def SetAlphaData(*args
, **kwargs
):
2301 """SetAlphaData(self, PyObject data)"""
2302 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2304 def GetAlphaBuffer(*args
, **kwargs
):
2305 """GetAlphaBuffer(self) -> PyObject"""
2306 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2308 def SetAlphaBuffer(*args
, **kwargs
):
2309 """SetAlphaBuffer(self, PyObject data)"""
2310 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2312 def SetMaskColour(*args
, **kwargs
):
2313 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2314 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2316 def GetMaskRed(*args
, **kwargs
):
2317 """GetMaskRed(self) -> unsigned char"""
2318 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2320 def GetMaskGreen(*args
, **kwargs
):
2321 """GetMaskGreen(self) -> unsigned char"""
2322 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2324 def GetMaskBlue(*args
, **kwargs
):
2325 """GetMaskBlue(self) -> unsigned char"""
2326 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2328 def SetMask(*args
, **kwargs
):
2329 """SetMask(self, bool mask=True)"""
2330 return _core_
.Image_SetMask(*args
, **kwargs
)
2332 def HasMask(*args
, **kwargs
):
2333 """HasMask(self) -> bool"""
2334 return _core_
.Image_HasMask(*args
, **kwargs
)
2336 def Rotate(*args
, **kwargs
):
2338 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2339 Point offset_after_rotation=None) -> Image
2341 return _core_
.Image_Rotate(*args
, **kwargs
)
2343 def Rotate90(*args
, **kwargs
):
2344 """Rotate90(self, bool clockwise=True) -> Image"""
2345 return _core_
.Image_Rotate90(*args
, **kwargs
)
2347 def Mirror(*args
, **kwargs
):
2348 """Mirror(self, bool horizontally=True) -> Image"""
2349 return _core_
.Image_Mirror(*args
, **kwargs
)
2351 def Replace(*args
, **kwargs
):
2353 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2354 unsigned char r2, unsigned char g2, unsigned char b2)
2356 return _core_
.Image_Replace(*args
, **kwargs
)
2358 def ConvertToMono(*args
, **kwargs
):
2359 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2360 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2362 def SetOption(*args
, **kwargs
):
2363 """SetOption(self, String name, String value)"""
2364 return _core_
.Image_SetOption(*args
, **kwargs
)
2366 def SetOptionInt(*args
, **kwargs
):
2367 """SetOptionInt(self, String name, int value)"""
2368 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2370 def GetOption(*args
, **kwargs
):
2371 """GetOption(self, String name) -> String"""
2372 return _core_
.Image_GetOption(*args
, **kwargs
)
2374 def GetOptionInt(*args
, **kwargs
):
2375 """GetOptionInt(self, String name) -> int"""
2376 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2378 def HasOption(*args
, **kwargs
):
2379 """HasOption(self, String name) -> bool"""
2380 return _core_
.Image_HasOption(*args
, **kwargs
)
2382 def CountColours(*args
, **kwargs
):
2383 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2384 return _core_
.Image_CountColours(*args
, **kwargs
)
2386 def ComputeHistogram(*args
, **kwargs
):
2387 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2388 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2390 def AddHandler(*args
, **kwargs
):
2391 """AddHandler(ImageHandler handler)"""
2392 return _core_
.Image_AddHandler(*args
, **kwargs
)
2394 AddHandler
= staticmethod(AddHandler
)
2395 def InsertHandler(*args
, **kwargs
):
2396 """InsertHandler(ImageHandler handler)"""
2397 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2399 InsertHandler
= staticmethod(InsertHandler
)
2400 def RemoveHandler(*args
, **kwargs
):
2401 """RemoveHandler(String name) -> bool"""
2402 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2404 RemoveHandler
= staticmethod(RemoveHandler
)
2405 def GetImageExtWildcard(*args
, **kwargs
):
2406 """GetImageExtWildcard() -> String"""
2407 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2409 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2410 def ConvertToBitmap(*args
, **kwargs
):
2411 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2412 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2414 def ConvertToMonoBitmap(*args
, **kwargs
):
2415 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2416 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2418 def __nonzero__(self
): return self
.Ok()
2420 class ImagePtr(Image
):
2421 def __init__(self
, this
):
2423 if not hasattr(self
,"thisown"): self
.thisown
= 0
2424 self
.__class
__ = Image
2425 _core_
.Image_swigregister(ImagePtr
)
2427 def ImageFromMime(*args
, **kwargs
):
2428 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2429 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2433 def ImageFromStream(*args
, **kwargs
):
2434 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2435 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2439 def ImageFromStreamMime(*args
, **kwargs
):
2440 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2441 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2445 def EmptyImage(*args
, **kwargs
):
2446 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2447 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2451 def ImageFromBitmap(*args
, **kwargs
):
2452 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2453 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2457 def ImageFromData(*args
, **kwargs
):
2458 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2459 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2463 def ImageFromDataWithAlpha(*args
, **kwargs
):
2464 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2465 val
= _core_
.new_ImageFromDataWithAlpha(*args
, **kwargs
)
2469 def Image_CanRead(*args
, **kwargs
):
2470 """Image_CanRead(String name) -> bool"""
2471 return _core_
.Image_CanRead(*args
, **kwargs
)
2473 def Image_GetImageCount(*args
, **kwargs
):
2474 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2475 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2477 def Image_CanReadStream(*args
, **kwargs
):
2478 """Image_CanReadStream(InputStream stream) -> bool"""
2479 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2481 def Image_AddHandler(*args
, **kwargs
):
2482 """Image_AddHandler(ImageHandler handler)"""
2483 return _core_
.Image_AddHandler(*args
, **kwargs
)
2485 def Image_InsertHandler(*args
, **kwargs
):
2486 """Image_InsertHandler(ImageHandler handler)"""
2487 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2489 def Image_RemoveHandler(*args
, **kwargs
):
2490 """Image_RemoveHandler(String name) -> bool"""
2491 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2493 def Image_GetImageExtWildcard(*args
, **kwargs
):
2494 """Image_GetImageExtWildcard() -> String"""
2495 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2497 def InitAllImageHandlers():
2499 The former functionality of InitAllImageHanders is now done internal to
2500 the _core_ extension module and so this function has become a simple NOP.
2504 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2505 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2506 BMP_24BPP
= _core_
.BMP_24BPP
2507 BMP_8BPP
= _core_
.BMP_8BPP
2508 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2509 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2510 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2511 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2512 BMP_4BPP
= _core_
.BMP_4BPP
2513 BMP_1BPP
= _core_
.BMP_1BPP
2514 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2515 class BMPHandler(ImageHandler
):
2516 """Proxy of C++ BMPHandler class"""
2518 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2519 def __init__(self
, *args
, **kwargs
):
2520 """__init__(self) -> BMPHandler"""
2521 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2522 self
.this
= newobj
.this
2526 class BMPHandlerPtr(BMPHandler
):
2527 def __init__(self
, this
):
2529 if not hasattr(self
,"thisown"): self
.thisown
= 0
2530 self
.__class
__ = BMPHandler
2531 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2532 NullImage
= cvar
.NullImage
2533 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2534 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2535 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2536 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2537 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2539 class ICOHandler(BMPHandler
):
2540 """Proxy of C++ ICOHandler class"""
2542 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2543 def __init__(self
, *args
, **kwargs
):
2544 """__init__(self) -> ICOHandler"""
2545 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2546 self
.this
= newobj
.this
2550 class ICOHandlerPtr(ICOHandler
):
2551 def __init__(self
, this
):
2553 if not hasattr(self
,"thisown"): self
.thisown
= 0
2554 self
.__class
__ = ICOHandler
2555 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2557 class CURHandler(ICOHandler
):
2558 """Proxy of C++ CURHandler class"""
2560 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2561 def __init__(self
, *args
, **kwargs
):
2562 """__init__(self) -> CURHandler"""
2563 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2564 self
.this
= newobj
.this
2568 class CURHandlerPtr(CURHandler
):
2569 def __init__(self
, this
):
2571 if not hasattr(self
,"thisown"): self
.thisown
= 0
2572 self
.__class
__ = CURHandler
2573 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2575 class ANIHandler(CURHandler
):
2576 """Proxy of C++ ANIHandler class"""
2578 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2579 def __init__(self
, *args
, **kwargs
):
2580 """__init__(self) -> ANIHandler"""
2581 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2582 self
.this
= newobj
.this
2586 class ANIHandlerPtr(ANIHandler
):
2587 def __init__(self
, this
):
2589 if not hasattr(self
,"thisown"): self
.thisown
= 0
2590 self
.__class
__ = ANIHandler
2591 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2593 class PNGHandler(ImageHandler
):
2594 """Proxy of C++ PNGHandler class"""
2596 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2597 def __init__(self
, *args
, **kwargs
):
2598 """__init__(self) -> PNGHandler"""
2599 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2600 self
.this
= newobj
.this
2604 class PNGHandlerPtr(PNGHandler
):
2605 def __init__(self
, this
):
2607 if not hasattr(self
,"thisown"): self
.thisown
= 0
2608 self
.__class
__ = PNGHandler
2609 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2611 class GIFHandler(ImageHandler
):
2612 """Proxy of C++ GIFHandler class"""
2614 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2615 def __init__(self
, *args
, **kwargs
):
2616 """__init__(self) -> GIFHandler"""
2617 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2618 self
.this
= newobj
.this
2622 class GIFHandlerPtr(GIFHandler
):
2623 def __init__(self
, this
):
2625 if not hasattr(self
,"thisown"): self
.thisown
= 0
2626 self
.__class
__ = GIFHandler
2627 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2629 class PCXHandler(ImageHandler
):
2630 """Proxy of C++ PCXHandler class"""
2632 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2633 def __init__(self
, *args
, **kwargs
):
2634 """__init__(self) -> PCXHandler"""
2635 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2636 self
.this
= newobj
.this
2640 class PCXHandlerPtr(PCXHandler
):
2641 def __init__(self
, this
):
2643 if not hasattr(self
,"thisown"): self
.thisown
= 0
2644 self
.__class
__ = PCXHandler
2645 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2647 class JPEGHandler(ImageHandler
):
2648 """Proxy of C++ JPEGHandler class"""
2650 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2651 def __init__(self
, *args
, **kwargs
):
2652 """__init__(self) -> JPEGHandler"""
2653 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2654 self
.this
= newobj
.this
2658 class JPEGHandlerPtr(JPEGHandler
):
2659 def __init__(self
, this
):
2661 if not hasattr(self
,"thisown"): self
.thisown
= 0
2662 self
.__class
__ = JPEGHandler
2663 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2665 class PNMHandler(ImageHandler
):
2666 """Proxy of C++ PNMHandler class"""
2668 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2669 def __init__(self
, *args
, **kwargs
):
2670 """__init__(self) -> PNMHandler"""
2671 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2672 self
.this
= newobj
.this
2676 class PNMHandlerPtr(PNMHandler
):
2677 def __init__(self
, this
):
2679 if not hasattr(self
,"thisown"): self
.thisown
= 0
2680 self
.__class
__ = PNMHandler
2681 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2683 class XPMHandler(ImageHandler
):
2684 """Proxy of C++ XPMHandler class"""
2686 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2687 def __init__(self
, *args
, **kwargs
):
2688 """__init__(self) -> XPMHandler"""
2689 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2690 self
.this
= newobj
.this
2694 class XPMHandlerPtr(XPMHandler
):
2695 def __init__(self
, this
):
2697 if not hasattr(self
,"thisown"): self
.thisown
= 0
2698 self
.__class
__ = XPMHandler
2699 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2701 class TIFFHandler(ImageHandler
):
2702 """Proxy of C++ TIFFHandler class"""
2704 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2705 def __init__(self
, *args
, **kwargs
):
2706 """__init__(self) -> TIFFHandler"""
2707 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2708 self
.this
= newobj
.this
2712 class TIFFHandlerPtr(TIFFHandler
):
2713 def __init__(self
, this
):
2715 if not hasattr(self
,"thisown"): self
.thisown
= 0
2716 self
.__class
__ = TIFFHandler
2717 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2719 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2720 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2721 class Quantize(object):
2722 """Performs quantization, or colour reduction, on a wxImage."""
2723 def __init__(self
): raise RuntimeError, "No constructor defined"
2725 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2726 def Quantize(*args
, **kwargs
):
2728 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2730 Reduce the colours in the source image and put the result into the
2731 destination image, setting the palette in the destination if
2732 needed. Both images may be the same, to overwrite the source image.
2734 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2736 Quantize
= staticmethod(Quantize
)
2738 class QuantizePtr(Quantize
):
2739 def __init__(self
, this
):
2741 if not hasattr(self
,"thisown"): self
.thisown
= 0
2742 self
.__class
__ = Quantize
2743 _core_
.Quantize_swigregister(QuantizePtr
)
2745 def Quantize_Quantize(*args
, **kwargs
):
2747 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2749 Reduce the colours in the source image and put the result into the
2750 destination image, setting the palette in the destination if
2751 needed. Both images may be the same, to overwrite the source image.
2753 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2755 #---------------------------------------------------------------------------
2757 class EvtHandler(Object
):
2758 """Proxy of C++ EvtHandler class"""
2760 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2761 def __init__(self
, *args
, **kwargs
):
2762 """__init__(self) -> EvtHandler"""
2763 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2764 self
.this
= newobj
.this
2767 def GetNextHandler(*args
, **kwargs
):
2768 """GetNextHandler(self) -> EvtHandler"""
2769 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2771 def GetPreviousHandler(*args
, **kwargs
):
2772 """GetPreviousHandler(self) -> EvtHandler"""
2773 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2775 def SetNextHandler(*args
, **kwargs
):
2776 """SetNextHandler(self, EvtHandler handler)"""
2777 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2779 def SetPreviousHandler(*args
, **kwargs
):
2780 """SetPreviousHandler(self, EvtHandler handler)"""
2781 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2783 def GetEvtHandlerEnabled(*args
, **kwargs
):
2784 """GetEvtHandlerEnabled(self) -> bool"""
2785 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2787 def SetEvtHandlerEnabled(*args
, **kwargs
):
2788 """SetEvtHandlerEnabled(self, bool enabled)"""
2789 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2791 def ProcessEvent(*args
, **kwargs
):
2792 """ProcessEvent(self, Event event) -> bool"""
2793 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2795 def AddPendingEvent(*args
, **kwargs
):
2796 """AddPendingEvent(self, Event event)"""
2797 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2799 def ProcessPendingEvents(*args
, **kwargs
):
2800 """ProcessPendingEvents(self)"""
2801 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2803 def Connect(*args
, **kwargs
):
2804 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2805 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
2807 def Disconnect(*args
, **kwargs
):
2808 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2809 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
2811 def _setOORInfo(*args
, **kwargs
):
2812 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2813 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
2815 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2817 Bind an event to an event handler.
2819 :param event: One of the EVT_* objects that specifies the
2820 type of event to bind,
2822 :param handler: A callable object to be invoked when the
2823 event is delivered to self. Pass None to
2824 disconnect an event handler.
2826 :param source: Sometimes the event originates from a
2827 different window than self, but you still
2828 want to catch it in self. (For example, a
2829 button event delivered to a frame.) By
2830 passing the source of the event, the event
2831 handling system is able to differentiate
2832 between the same event type from different
2835 :param id: Used to spcify the event source by ID instead
2838 :param id2: Used when it is desirable to bind a handler
2839 to a range of IDs, such as with EVT_MENU_RANGE.
2841 if source
is not None:
2843 event
.Bind(self
, id, id2
, handler
)
2845 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2847 Disconencts the event handler binding for event from self.
2848 Returns True if successful.
2850 if source
is not None:
2852 return event
.Unbind(self
, id, id2
)
2855 class EvtHandlerPtr(EvtHandler
):
2856 def __init__(self
, this
):
2858 if not hasattr(self
,"thisown"): self
.thisown
= 0
2859 self
.__class
__ = EvtHandler
2860 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
2862 #---------------------------------------------------------------------------
2864 class PyEventBinder(object):
2866 Instances of this class are used to bind specific events to event
2869 def __init__(self
, evtType
, expectedIDs
=0):
2870 if expectedIDs
not in [0, 1, 2]:
2871 raise ValueError, "Invalid number of expectedIDs"
2872 self
.expectedIDs
= expectedIDs
2874 if type(evtType
) == list or type(evtType
) == tuple:
2875 self
.evtType
= evtType
2877 self
.evtType
= [evtType
]
2880 def Bind(self
, target
, id1
, id2
, function
):
2881 """Bind this set of event types to target."""
2882 for et
in self
.evtType
:
2883 target
.Connect(id1
, id2
, et
, function
)
2886 def Unbind(self
, target
, id1
, id2
):
2887 """Remove an event binding."""
2889 for et
in self
.evtType
:
2890 success
+= target
.Disconnect(id1
, id2
, et
)
2894 def __call__(self
, *args
):
2896 For backwards compatibility with the old EVT_* functions.
2897 Should be called with either (window, func), (window, ID,
2898 func) or (window, ID1, ID2, func) parameters depending on the
2901 assert len(args
) == 2 + self
.expectedIDs
2905 if self
.expectedIDs
== 0:
2907 elif self
.expectedIDs
== 1:
2910 elif self
.expectedIDs
== 2:
2915 raise ValueError, "Unexpected number of IDs"
2917 self
.Bind(target
, id1
, id2
, func
)
2920 # These two are square pegs that don't fit the PyEventBinder hole...
2921 def EVT_COMMAND(win
, id, cmd
, func
):
2922 win
.Connect(id, -1, cmd
, func
)
2923 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2924 win
.Connect(id1
, id2
, cmd
, func
)
2927 #---------------------------------------------------------------------------
2929 #---------------------------------------------------------------------------
2931 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
2932 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
2934 def NewEventType(*args
, **kwargs
):
2935 """NewEventType() -> wxEventType"""
2936 return _core_
.NewEventType(*args
, **kwargs
)
2937 wxEVT_NULL
= _core_
.wxEVT_NULL
2938 wxEVT_FIRST
= _core_
.wxEVT_FIRST
2939 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
2940 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
2941 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
2942 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
2943 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
2944 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2945 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2946 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
2947 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
2948 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
2949 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
2950 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2951 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
2952 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
2953 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
2954 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
2955 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
2956 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
2957 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
2958 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
2959 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
2960 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
2961 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
2962 wxEVT_MOTION
= _core_
.wxEVT_MOTION
2963 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
2964 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
2965 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
2966 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
2967 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
2968 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
2969 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
2970 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
2971 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
2972 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
2973 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
2974 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
2975 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
2976 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
2977 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
2978 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
2979 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
2980 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
2981 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
2982 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
2983 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
2984 wxEVT_CHAR
= _core_
.wxEVT_CHAR
2985 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
2986 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
2987 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
2988 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
2989 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
2990 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
2991 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
2992 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
2993 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
2994 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
2995 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
2996 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
2997 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
2998 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
2999 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
3000 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
3001 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
3002 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
3003 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
3004 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
3005 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
3006 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
3007 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
3008 wxEVT_SIZE
= _core_
.wxEVT_SIZE
3009 wxEVT_MOVE
= _core_
.wxEVT_MOVE
3010 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
3011 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
3012 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
3013 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
3014 wxEVT_POWER
= _core_
.wxEVT_POWER
3015 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
3016 wxEVT_CREATE
= _core_
.wxEVT_CREATE
3017 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
3018 wxEVT_SHOW
= _core_
.wxEVT_SHOW
3019 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
3020 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
3021 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
3022 wxEVT_PAINT
= _core_
.wxEVT_PAINT
3023 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
3024 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
3025 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
3026 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
3027 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
3028 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
3029 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
3030 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
3031 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
3032 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
3033 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
3034 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
3035 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
3036 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
3037 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
3038 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
3039 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
3040 wxEVT_IDLE
= _core_
.wxEVT_IDLE
3041 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
3042 wxEVT_SIZING
= _core_
.wxEVT_SIZING
3043 wxEVT_MOVING
= _core_
.wxEVT_MOVING
3044 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
3045 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
3046 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
3047 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
3048 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
3049 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
3050 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
3052 # Create some event binders
3053 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
3054 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
3055 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
3056 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
3057 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
3058 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3059 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3060 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
3061 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
3062 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
3063 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
3064 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
3065 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
3066 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
3067 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
3068 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
3069 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
3070 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
3071 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
3072 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
3073 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
3074 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
3075 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
3076 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
3077 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
3078 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
3079 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
3080 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
3081 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
3082 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
3083 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
3084 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
3085 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
3086 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
3087 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
3088 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
3089 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
3090 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
3091 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
3092 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
3094 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
3095 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
3096 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
3097 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
3098 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
3099 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
3100 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
3101 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
3102 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
3103 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
3104 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
3105 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
3106 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
3108 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3116 wxEVT_MIDDLE_DCLICK
,
3124 # Scrolling from wxWindow (sent to wxScrolledWindow)
3125 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3126 wxEVT_SCROLLWIN_BOTTOM
,
3127 wxEVT_SCROLLWIN_LINEUP
,
3128 wxEVT_SCROLLWIN_LINEDOWN
,
3129 wxEVT_SCROLLWIN_PAGEUP
,
3130 wxEVT_SCROLLWIN_PAGEDOWN
,
3131 wxEVT_SCROLLWIN_THUMBTRACK
,
3132 wxEVT_SCROLLWIN_THUMBRELEASE
,
3135 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3136 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3137 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3138 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3139 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3140 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3141 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3142 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3144 # Scrolling from wxSlider and wxScrollBar
3145 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3146 wxEVT_SCROLL_BOTTOM
,
3147 wxEVT_SCROLL_LINEUP
,
3148 wxEVT_SCROLL_LINEDOWN
,
3149 wxEVT_SCROLL_PAGEUP
,
3150 wxEVT_SCROLL_PAGEDOWN
,
3151 wxEVT_SCROLL_THUMBTRACK
,
3152 wxEVT_SCROLL_THUMBRELEASE
,
3153 wxEVT_SCROLL_ENDSCROLL
,
3156 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3157 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3158 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3159 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3160 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3161 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3162 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3163 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3164 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3166 # Scrolling from wxSlider and wxScrollBar, with an id
3167 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3168 wxEVT_SCROLL_BOTTOM
,
3169 wxEVT_SCROLL_LINEUP
,
3170 wxEVT_SCROLL_LINEDOWN
,
3171 wxEVT_SCROLL_PAGEUP
,
3172 wxEVT_SCROLL_PAGEDOWN
,
3173 wxEVT_SCROLL_THUMBTRACK
,
3174 wxEVT_SCROLL_THUMBRELEASE
,
3175 wxEVT_SCROLL_ENDSCROLL
,
3178 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3179 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3180 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3181 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3182 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3183 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3184 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3185 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3186 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3188 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3189 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3190 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3191 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3192 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3193 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3194 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3195 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3196 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3197 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3199 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3200 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3201 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3202 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3203 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3204 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3205 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3206 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3207 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3210 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3211 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3212 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3213 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3214 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3215 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3216 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3218 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3220 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3221 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3223 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3227 #---------------------------------------------------------------------------
3229 class Event(Object
):
3230 """Proxy of C++ Event class"""
3231 def __init__(self
): raise RuntimeError, "No constructor defined"
3233 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3234 def __del__(self
, destroy
=_core_
.delete_Event
):
3237 if self
.thisown
: destroy(self
)
3240 def SetEventType(*args
, **kwargs
):
3241 """SetEventType(self, wxEventType typ)"""
3242 return _core_
.Event_SetEventType(*args
, **kwargs
)
3244 def GetEventType(*args
, **kwargs
):
3245 """GetEventType(self) -> wxEventType"""
3246 return _core_
.Event_GetEventType(*args
, **kwargs
)
3248 def GetEventObject(*args
, **kwargs
):
3249 """GetEventObject(self) -> Object"""
3250 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3252 def SetEventObject(*args
, **kwargs
):
3253 """SetEventObject(self, Object obj)"""
3254 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3256 def GetTimestamp(*args
, **kwargs
):
3257 """GetTimestamp(self) -> long"""
3258 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3260 def SetTimestamp(*args
, **kwargs
):
3261 """SetTimestamp(self, long ts=0)"""
3262 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3264 def GetId(*args
, **kwargs
):
3265 """GetId(self) -> int"""
3266 return _core_
.Event_GetId(*args
, **kwargs
)
3268 def SetId(*args
, **kwargs
):
3269 """SetId(self, int Id)"""
3270 return _core_
.Event_SetId(*args
, **kwargs
)
3272 def IsCommandEvent(*args
, **kwargs
):
3273 """IsCommandEvent(self) -> bool"""
3274 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3276 def Skip(*args
, **kwargs
):
3277 """Skip(self, bool skip=True)"""
3278 return _core_
.Event_Skip(*args
, **kwargs
)
3280 def GetSkipped(*args
, **kwargs
):
3281 """GetSkipped(self) -> bool"""
3282 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3284 def ShouldPropagate(*args
, **kwargs
):
3285 """ShouldPropagate(self) -> bool"""
3286 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3288 def StopPropagation(*args
, **kwargs
):
3289 """StopPropagation(self) -> int"""
3290 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3292 def ResumePropagation(*args
, **kwargs
):
3293 """ResumePropagation(self, int propagationLevel)"""
3294 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3296 def Clone(*args
, **kwargs
):
3297 """Clone(self) -> Event"""
3298 return _core_
.Event_Clone(*args
, **kwargs
)
3301 class EventPtr(Event
):
3302 def __init__(self
, this
):
3304 if not hasattr(self
,"thisown"): self
.thisown
= 0
3305 self
.__class
__ = Event
3306 _core_
.Event_swigregister(EventPtr
)
3308 #---------------------------------------------------------------------------
3310 class PropagationDisabler(object):
3311 """Proxy of C++ PropagationDisabler class"""
3313 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3314 def __init__(self
, *args
, **kwargs
):
3315 """__init__(self, Event event) -> PropagationDisabler"""
3316 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3317 self
.this
= newobj
.this
3320 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3323 if self
.thisown
: destroy(self
)
3327 class PropagationDisablerPtr(PropagationDisabler
):
3328 def __init__(self
, this
):
3330 if not hasattr(self
,"thisown"): self
.thisown
= 0
3331 self
.__class
__ = PropagationDisabler
3332 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3334 class PropagateOnce(object):
3335 """Proxy of C++ PropagateOnce class"""
3337 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3338 def __init__(self
, *args
, **kwargs
):
3339 """__init__(self, Event event) -> PropagateOnce"""
3340 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3341 self
.this
= newobj
.this
3344 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3347 if self
.thisown
: destroy(self
)
3351 class PropagateOncePtr(PropagateOnce
):
3352 def __init__(self
, this
):
3354 if not hasattr(self
,"thisown"): self
.thisown
= 0
3355 self
.__class
__ = PropagateOnce
3356 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3358 #---------------------------------------------------------------------------
3360 class CommandEvent(Event
):
3361 """Proxy of C++ CommandEvent class"""
3363 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3364 def __init__(self
, *args
, **kwargs
):
3365 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3366 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3367 self
.this
= newobj
.this
3370 def GetSelection(*args
, **kwargs
):
3371 """GetSelection(self) -> int"""
3372 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3374 def SetString(*args
, **kwargs
):
3375 """SetString(self, String s)"""
3376 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3378 def GetString(*args
, **kwargs
):
3379 """GetString(self) -> String"""
3380 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3382 def IsChecked(*args
, **kwargs
):
3383 """IsChecked(self) -> bool"""
3384 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3387 def IsSelection(*args
, **kwargs
):
3388 """IsSelection(self) -> bool"""
3389 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3391 def SetExtraLong(*args
, **kwargs
):
3392 """SetExtraLong(self, long extraLong)"""
3393 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3395 def GetExtraLong(*args
, **kwargs
):
3396 """GetExtraLong(self) -> long"""
3397 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3399 def SetInt(*args
, **kwargs
):
3400 """SetInt(self, int i)"""
3401 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3403 def GetInt(*args
, **kwargs
):
3404 """GetInt(self) -> long"""
3405 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3407 def Clone(*args
, **kwargs
):
3408 """Clone(self) -> Event"""
3409 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3412 class CommandEventPtr(CommandEvent
):
3413 def __init__(self
, this
):
3415 if not hasattr(self
,"thisown"): self
.thisown
= 0
3416 self
.__class
__ = CommandEvent
3417 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3419 #---------------------------------------------------------------------------
3421 class NotifyEvent(CommandEvent
):
3422 """Proxy of C++ NotifyEvent class"""
3424 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3425 def __init__(self
, *args
, **kwargs
):
3426 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3427 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3428 self
.this
= newobj
.this
3431 def Veto(*args
, **kwargs
):
3433 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3435 def Allow(*args
, **kwargs
):
3437 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3439 def IsAllowed(*args
, **kwargs
):
3440 """IsAllowed(self) -> bool"""
3441 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3444 class NotifyEventPtr(NotifyEvent
):
3445 def __init__(self
, this
):
3447 if not hasattr(self
,"thisown"): self
.thisown
= 0
3448 self
.__class
__ = NotifyEvent
3449 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3451 #---------------------------------------------------------------------------
3453 class ScrollEvent(CommandEvent
):
3454 """Proxy of C++ ScrollEvent class"""
3456 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3457 def __init__(self
, *args
, **kwargs
):
3459 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3460 int orient=0) -> ScrollEvent
3462 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3463 self
.this
= newobj
.this
3466 def GetOrientation(*args
, **kwargs
):
3467 """GetOrientation(self) -> int"""
3468 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3470 def GetPosition(*args
, **kwargs
):
3471 """GetPosition(self) -> int"""
3472 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3474 def SetOrientation(*args
, **kwargs
):
3475 """SetOrientation(self, int orient)"""
3476 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3478 def SetPosition(*args
, **kwargs
):
3479 """SetPosition(self, int pos)"""
3480 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3483 class ScrollEventPtr(ScrollEvent
):
3484 def __init__(self
, this
):
3486 if not hasattr(self
,"thisown"): self
.thisown
= 0
3487 self
.__class
__ = ScrollEvent
3488 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3490 #---------------------------------------------------------------------------
3492 class ScrollWinEvent(Event
):
3493 """Proxy of C++ ScrollWinEvent class"""
3495 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3496 def __init__(self
, *args
, **kwargs
):
3497 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3498 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3499 self
.this
= newobj
.this
3502 def GetOrientation(*args
, **kwargs
):
3503 """GetOrientation(self) -> int"""
3504 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3506 def GetPosition(*args
, **kwargs
):
3507 """GetPosition(self) -> int"""
3508 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3510 def SetOrientation(*args
, **kwargs
):
3511 """SetOrientation(self, int orient)"""
3512 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3514 def SetPosition(*args
, **kwargs
):
3515 """SetPosition(self, int pos)"""
3516 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3519 class ScrollWinEventPtr(ScrollWinEvent
):
3520 def __init__(self
, this
):
3522 if not hasattr(self
,"thisown"): self
.thisown
= 0
3523 self
.__class
__ = ScrollWinEvent
3524 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3526 #---------------------------------------------------------------------------
3528 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3529 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3530 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3531 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3532 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3533 class MouseEvent(Event
):
3534 """Proxy of C++ MouseEvent class"""
3536 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3537 def __init__(self
, *args
, **kwargs
):
3538 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3539 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3540 self
.this
= newobj
.this
3543 def IsButton(*args
, **kwargs
):
3544 """IsButton(self) -> bool"""
3545 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
3547 def ButtonDown(*args
, **kwargs
):
3548 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3549 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
3551 def ButtonDClick(*args
, **kwargs
):
3552 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3553 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3555 def ButtonUp(*args
, **kwargs
):
3556 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3557 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
3559 def Button(*args
, **kwargs
):
3560 """Button(self, int but) -> bool"""
3561 return _core_
.MouseEvent_Button(*args
, **kwargs
)
3563 def ButtonIsDown(*args
, **kwargs
):
3564 """ButtonIsDown(self, int but) -> bool"""
3565 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3567 def GetButton(*args
, **kwargs
):
3568 """GetButton(self) -> int"""
3569 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
3571 def ControlDown(*args
, **kwargs
):
3572 """ControlDown(self) -> bool"""
3573 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
3575 def MetaDown(*args
, **kwargs
):
3576 """MetaDown(self) -> bool"""
3577 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
3579 def AltDown(*args
, **kwargs
):
3580 """AltDown(self) -> bool"""
3581 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
3583 def ShiftDown(*args
, **kwargs
):
3584 """ShiftDown(self) -> bool"""
3585 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
3587 def CmdDown(*args
, **kwargs
):
3589 CmdDown(self) -> bool
3591 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3592 platforms but the special "Apple" (a.k.a as "Command") key on
3593 Macs: it makes often sense to use it instead of, say, `ControlDown`
3594 because Cmd key is used for the same thing under Mac as Ctrl
3595 elsewhere. The Ctrl still exists, it's just not used for this
3596 purpose. So for non-Mac platforms this is the same as `ControlDown`
3597 and Macs this is the same as `MetaDown`.
3599 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
3601 def LeftDown(*args
, **kwargs
):
3602 """LeftDown(self) -> bool"""
3603 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
3605 def MiddleDown(*args
, **kwargs
):
3606 """MiddleDown(self) -> bool"""
3607 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
3609 def RightDown(*args
, **kwargs
):
3610 """RightDown(self) -> bool"""
3611 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
3613 def LeftUp(*args
, **kwargs
):
3614 """LeftUp(self) -> bool"""
3615 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
3617 def MiddleUp(*args
, **kwargs
):
3618 """MiddleUp(self) -> bool"""
3619 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
3621 def RightUp(*args
, **kwargs
):
3622 """RightUp(self) -> bool"""
3623 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
3625 def LeftDClick(*args
, **kwargs
):
3626 """LeftDClick(self) -> bool"""
3627 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
3629 def MiddleDClick(*args
, **kwargs
):
3630 """MiddleDClick(self) -> bool"""
3631 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3633 def RightDClick(*args
, **kwargs
):
3634 """RightDClick(self) -> bool"""
3635 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
3637 def LeftIsDown(*args
, **kwargs
):
3638 """LeftIsDown(self) -> bool"""
3639 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3641 def MiddleIsDown(*args
, **kwargs
):
3642 """MiddleIsDown(self) -> bool"""
3643 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3645 def RightIsDown(*args
, **kwargs
):
3646 """RightIsDown(self) -> bool"""
3647 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
3649 def Dragging(*args
, **kwargs
):
3650 """Dragging(self) -> bool"""
3651 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
3653 def Moving(*args
, **kwargs
):
3654 """Moving(self) -> bool"""
3655 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
3657 def Entering(*args
, **kwargs
):
3658 """Entering(self) -> bool"""
3659 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
3661 def Leaving(*args
, **kwargs
):
3662 """Leaving(self) -> bool"""
3663 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
3665 def GetPosition(*args
, **kwargs
):
3667 GetPosition(self) -> Point
3669 Returns the position of the mouse in window coordinates when the event
3672 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
3674 def GetPositionTuple(*args
, **kwargs
):
3676 GetPositionTuple() -> (x,y)
3678 Returns the position of the mouse in window coordinates when the event
3681 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3683 def GetLogicalPosition(*args
, **kwargs
):
3684 """GetLogicalPosition(self, DC dc) -> Point"""
3685 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3687 def GetX(*args
, **kwargs
):
3688 """GetX(self) -> int"""
3689 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
3691 def GetY(*args
, **kwargs
):
3692 """GetY(self) -> int"""
3693 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
3695 def GetWheelRotation(*args
, **kwargs
):
3696 """GetWheelRotation(self) -> int"""
3697 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3699 def GetWheelDelta(*args
, **kwargs
):
3700 """GetWheelDelta(self) -> int"""
3701 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3703 def GetLinesPerAction(*args
, **kwargs
):
3704 """GetLinesPerAction(self) -> int"""
3705 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3707 def IsPageScroll(*args
, **kwargs
):
3708 """IsPageScroll(self) -> bool"""
3709 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3711 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
3712 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
3713 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
3714 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
3715 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
3716 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
3717 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
3718 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
3719 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
3720 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
3721 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
3722 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
3724 class MouseEventPtr(MouseEvent
):
3725 def __init__(self
, this
):
3727 if not hasattr(self
,"thisown"): self
.thisown
= 0
3728 self
.__class
__ = MouseEvent
3729 _core_
.MouseEvent_swigregister(MouseEventPtr
)
3731 #---------------------------------------------------------------------------
3733 class SetCursorEvent(Event
):
3734 """Proxy of C++ SetCursorEvent class"""
3736 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3737 def __init__(self
, *args
, **kwargs
):
3738 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3739 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
3740 self
.this
= newobj
.this
3743 def GetX(*args
, **kwargs
):
3744 """GetX(self) -> int"""
3745 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
3747 def GetY(*args
, **kwargs
):
3748 """GetY(self) -> int"""
3749 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
3751 def SetCursor(*args
, **kwargs
):
3752 """SetCursor(self, Cursor cursor)"""
3753 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3755 def GetCursor(*args
, **kwargs
):
3756 """GetCursor(self) -> Cursor"""
3757 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3759 def HasCursor(*args
, **kwargs
):
3760 """HasCursor(self) -> bool"""
3761 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3764 class SetCursorEventPtr(SetCursorEvent
):
3765 def __init__(self
, this
):
3767 if not hasattr(self
,"thisown"): self
.thisown
= 0
3768 self
.__class
__ = SetCursorEvent
3769 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3771 #---------------------------------------------------------------------------
3773 class KeyEvent(Event
):
3774 """Proxy of C++ KeyEvent class"""
3776 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3777 def __init__(self
, *args
, **kwargs
):
3778 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3779 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
3780 self
.this
= newobj
.this
3783 def ControlDown(*args
, **kwargs
):
3784 """ControlDown(self) -> bool"""
3785 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
3787 def MetaDown(*args
, **kwargs
):
3788 """MetaDown(self) -> bool"""
3789 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
3791 def AltDown(*args
, **kwargs
):
3792 """AltDown(self) -> bool"""
3793 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
3795 def ShiftDown(*args
, **kwargs
):
3796 """ShiftDown(self) -> bool"""
3797 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
3799 def CmdDown(*args
, **kwargs
):
3801 CmdDown(self) -> bool
3803 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3804 platforms but the special "Apple" (a.k.a as "Command") key on
3805 Macs: it makes often sense to use it instead of, say, `ControlDown`
3806 because Cmd key is used for the same thing under Mac as Ctrl
3807 elsewhere. The Ctrl still exists, it's just not used for this
3808 purpose. So for non-Mac platforms this is the same as `ControlDown`
3809 and Macs this is the same as `MetaDown`.
3811 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
3813 def HasModifiers(*args
, **kwargs
):
3814 """HasModifiers(self) -> bool"""
3815 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
3817 def GetKeyCode(*args
, **kwargs
):
3818 """GetKeyCode(self) -> int"""
3819 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3821 KeyCode
= GetKeyCode
3822 def GetUnicodeKey(*args
, **kwargs
):
3823 """GetUnicodeKey(self) -> int"""
3824 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
3826 GetUniChar
= GetUnicodeKey
3827 def GetRawKeyCode(*args
, **kwargs
):
3828 """GetRawKeyCode(self) -> unsigned int"""
3829 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3831 def GetRawKeyFlags(*args
, **kwargs
):
3832 """GetRawKeyFlags(self) -> unsigned int"""
3833 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3835 def GetPosition(*args
, **kwargs
):
3837 GetPosition(self) -> Point
3839 Find the position of the event.
3841 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
3843 def GetPositionTuple(*args
, **kwargs
):
3845 GetPositionTuple() -> (x,y)
3847 Find the position of the event.
3849 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3851 def GetX(*args
, **kwargs
):
3852 """GetX(self) -> int"""
3853 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
3855 def GetY(*args
, **kwargs
):
3856 """GetY(self) -> int"""
3857 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
3859 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
3860 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
3861 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
3862 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
3863 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
3864 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
3865 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
3866 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
3867 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
3868 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
3870 class KeyEventPtr(KeyEvent
):
3871 def __init__(self
, this
):
3873 if not hasattr(self
,"thisown"): self
.thisown
= 0
3874 self
.__class
__ = KeyEvent
3875 _core_
.KeyEvent_swigregister(KeyEventPtr
)
3877 #---------------------------------------------------------------------------
3879 class SizeEvent(Event
):
3880 """Proxy of C++ SizeEvent class"""
3882 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3883 def __init__(self
, *args
, **kwargs
):
3884 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3885 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
3886 self
.this
= newobj
.this
3889 def GetSize(*args
, **kwargs
):
3890 """GetSize(self) -> Size"""
3891 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
3893 def GetRect(*args
, **kwargs
):
3894 """GetRect(self) -> Rect"""
3895 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
3897 def SetRect(*args
, **kwargs
):
3898 """SetRect(self, Rect rect)"""
3899 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
3901 def SetSize(*args
, **kwargs
):
3902 """SetSize(self, Size size)"""
3903 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
3905 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
3906 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
3908 class SizeEventPtr(SizeEvent
):
3909 def __init__(self
, this
):
3911 if not hasattr(self
,"thisown"): self
.thisown
= 0
3912 self
.__class
__ = SizeEvent
3913 _core_
.SizeEvent_swigregister(SizeEventPtr
)
3915 #---------------------------------------------------------------------------
3917 class MoveEvent(Event
):
3918 """Proxy of C++ MoveEvent class"""
3920 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3921 def __init__(self
, *args
, **kwargs
):
3922 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3923 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
3924 self
.this
= newobj
.this
3927 def GetPosition(*args
, **kwargs
):
3928 """GetPosition(self) -> Point"""
3929 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
3931 def GetRect(*args
, **kwargs
):
3932 """GetRect(self) -> Rect"""
3933 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
3935 def SetRect(*args
, **kwargs
):
3936 """SetRect(self, Rect rect)"""
3937 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
3939 def SetPosition(*args
, **kwargs
):
3940 """SetPosition(self, Point pos)"""
3941 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
3943 m_pos
= property(_core_
.MoveEvent_m_pos_get
, _core_
.MoveEvent_m_pos_set
)
3944 m_rect
= property(_core_
.MoveEvent_m_rect_get
, _core_
.MoveEvent_m_rect_set
)
3946 class MoveEventPtr(MoveEvent
):
3947 def __init__(self
, this
):
3949 if not hasattr(self
,"thisown"): self
.thisown
= 0
3950 self
.__class
__ = MoveEvent
3951 _core_
.MoveEvent_swigregister(MoveEventPtr
)
3953 #---------------------------------------------------------------------------
3955 class PaintEvent(Event
):
3956 """Proxy of C++ PaintEvent class"""
3958 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3959 def __init__(self
, *args
, **kwargs
):
3960 """__init__(self, int Id=0) -> PaintEvent"""
3961 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
3962 self
.this
= newobj
.this
3966 class PaintEventPtr(PaintEvent
):
3967 def __init__(self
, this
):
3969 if not hasattr(self
,"thisown"): self
.thisown
= 0
3970 self
.__class
__ = PaintEvent
3971 _core_
.PaintEvent_swigregister(PaintEventPtr
)
3973 class NcPaintEvent(Event
):
3974 """Proxy of C++ NcPaintEvent class"""
3976 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3977 def __init__(self
, *args
, **kwargs
):
3978 """__init__(self, int winid=0) -> NcPaintEvent"""
3979 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
3980 self
.this
= newobj
.this
3984 class NcPaintEventPtr(NcPaintEvent
):
3985 def __init__(self
, this
):
3987 if not hasattr(self
,"thisown"): self
.thisown
= 0
3988 self
.__class
__ = NcPaintEvent
3989 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
3991 #---------------------------------------------------------------------------
3993 class EraseEvent(Event
):
3994 """Proxy of C++ EraseEvent class"""
3996 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3997 def __init__(self
, *args
, **kwargs
):
3998 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3999 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
4000 self
.this
= newobj
.this
4003 def GetDC(*args
, **kwargs
):
4004 """GetDC(self) -> DC"""
4005 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
4008 class EraseEventPtr(EraseEvent
):
4009 def __init__(self
, this
):
4011 if not hasattr(self
,"thisown"): self
.thisown
= 0
4012 self
.__class
__ = EraseEvent
4013 _core_
.EraseEvent_swigregister(EraseEventPtr
)
4015 #---------------------------------------------------------------------------
4017 class FocusEvent(Event
):
4018 """Proxy of C++ FocusEvent class"""
4020 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4021 def __init__(self
, *args
, **kwargs
):
4022 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4023 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
4024 self
.this
= newobj
.this
4027 def GetWindow(*args
, **kwargs
):
4028 """GetWindow(self) -> Window"""
4029 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
4031 def SetWindow(*args
, **kwargs
):
4032 """SetWindow(self, Window win)"""
4033 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
4036 class FocusEventPtr(FocusEvent
):
4037 def __init__(self
, this
):
4039 if not hasattr(self
,"thisown"): self
.thisown
= 0
4040 self
.__class
__ = FocusEvent
4041 _core_
.FocusEvent_swigregister(FocusEventPtr
)
4043 #---------------------------------------------------------------------------
4045 class ChildFocusEvent(CommandEvent
):
4046 """Proxy of C++ ChildFocusEvent class"""
4048 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4049 def __init__(self
, *args
, **kwargs
):
4050 """__init__(self, Window win=None) -> ChildFocusEvent"""
4051 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
4052 self
.this
= newobj
.this
4055 def GetWindow(*args
, **kwargs
):
4056 """GetWindow(self) -> Window"""
4057 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
4060 class ChildFocusEventPtr(ChildFocusEvent
):
4061 def __init__(self
, this
):
4063 if not hasattr(self
,"thisown"): self
.thisown
= 0
4064 self
.__class
__ = ChildFocusEvent
4065 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
4067 #---------------------------------------------------------------------------
4069 class ActivateEvent(Event
):
4070 """Proxy of C++ ActivateEvent class"""
4072 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4073 def __init__(self
, *args
, **kwargs
):
4074 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4075 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
4076 self
.this
= newobj
.this
4079 def GetActive(*args
, **kwargs
):
4080 """GetActive(self) -> bool"""
4081 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
4084 class ActivateEventPtr(ActivateEvent
):
4085 def __init__(self
, this
):
4087 if not hasattr(self
,"thisown"): self
.thisown
= 0
4088 self
.__class
__ = ActivateEvent
4089 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
4091 #---------------------------------------------------------------------------
4093 class InitDialogEvent(Event
):
4094 """Proxy of C++ InitDialogEvent class"""
4096 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4097 def __init__(self
, *args
, **kwargs
):
4098 """__init__(self, int Id=0) -> InitDialogEvent"""
4099 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
4100 self
.this
= newobj
.this
4104 class InitDialogEventPtr(InitDialogEvent
):
4105 def __init__(self
, this
):
4107 if not hasattr(self
,"thisown"): self
.thisown
= 0
4108 self
.__class
__ = InitDialogEvent
4109 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
4111 #---------------------------------------------------------------------------
4113 class MenuEvent(Event
):
4114 """Proxy of C++ MenuEvent class"""
4116 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4117 def __init__(self
, *args
, **kwargs
):
4118 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4119 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
4120 self
.this
= newobj
.this
4123 def GetMenuId(*args
, **kwargs
):
4124 """GetMenuId(self) -> int"""
4125 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
4127 def IsPopup(*args
, **kwargs
):
4128 """IsPopup(self) -> bool"""
4129 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4131 def GetMenu(*args
, **kwargs
):
4132 """GetMenu(self) -> Menu"""
4133 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4136 class MenuEventPtr(MenuEvent
):
4137 def __init__(self
, this
):
4139 if not hasattr(self
,"thisown"): self
.thisown
= 0
4140 self
.__class
__ = MenuEvent
4141 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4143 #---------------------------------------------------------------------------
4145 class CloseEvent(Event
):
4146 """Proxy of C++ CloseEvent class"""
4148 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4149 def __init__(self
, *args
, **kwargs
):
4150 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4151 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4152 self
.this
= newobj
.this
4155 def SetLoggingOff(*args
, **kwargs
):
4156 """SetLoggingOff(self, bool logOff)"""
4157 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4159 def GetLoggingOff(*args
, **kwargs
):
4160 """GetLoggingOff(self) -> bool"""
4161 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4163 def Veto(*args
, **kwargs
):
4164 """Veto(self, bool veto=True)"""
4165 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4167 def SetCanVeto(*args
, **kwargs
):
4168 """SetCanVeto(self, bool canVeto)"""
4169 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4171 def CanVeto(*args
, **kwargs
):
4172 """CanVeto(self) -> bool"""
4173 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4175 def GetVeto(*args
, **kwargs
):
4176 """GetVeto(self) -> bool"""
4177 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4180 class CloseEventPtr(CloseEvent
):
4181 def __init__(self
, this
):
4183 if not hasattr(self
,"thisown"): self
.thisown
= 0
4184 self
.__class
__ = CloseEvent
4185 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4187 #---------------------------------------------------------------------------
4189 class ShowEvent(Event
):
4190 """Proxy of C++ ShowEvent class"""
4192 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4193 def __init__(self
, *args
, **kwargs
):
4194 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4195 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4196 self
.this
= newobj
.this
4199 def SetShow(*args
, **kwargs
):
4200 """SetShow(self, bool show)"""
4201 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4203 def GetShow(*args
, **kwargs
):
4204 """GetShow(self) -> bool"""
4205 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4208 class ShowEventPtr(ShowEvent
):
4209 def __init__(self
, this
):
4211 if not hasattr(self
,"thisown"): self
.thisown
= 0
4212 self
.__class
__ = ShowEvent
4213 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4215 #---------------------------------------------------------------------------
4217 class IconizeEvent(Event
):
4218 """Proxy of C++ IconizeEvent class"""
4220 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4221 def __init__(self
, *args
, **kwargs
):
4222 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4223 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4224 self
.this
= newobj
.this
4227 def Iconized(*args
, **kwargs
):
4228 """Iconized(self) -> bool"""
4229 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4232 class IconizeEventPtr(IconizeEvent
):
4233 def __init__(self
, this
):
4235 if not hasattr(self
,"thisown"): self
.thisown
= 0
4236 self
.__class
__ = IconizeEvent
4237 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4239 #---------------------------------------------------------------------------
4241 class MaximizeEvent(Event
):
4242 """Proxy of C++ MaximizeEvent class"""
4244 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4245 def __init__(self
, *args
, **kwargs
):
4246 """__init__(self, int id=0) -> MaximizeEvent"""
4247 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4248 self
.this
= newobj
.this
4252 class MaximizeEventPtr(MaximizeEvent
):
4253 def __init__(self
, this
):
4255 if not hasattr(self
,"thisown"): self
.thisown
= 0
4256 self
.__class
__ = MaximizeEvent
4257 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4259 #---------------------------------------------------------------------------
4261 class DropFilesEvent(Event
):
4262 """Proxy of C++ DropFilesEvent class"""
4263 def __init__(self
): raise RuntimeError, "No constructor defined"
4265 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4266 def GetPosition(*args
, **kwargs
):
4267 """GetPosition(self) -> Point"""
4268 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4270 def GetNumberOfFiles(*args
, **kwargs
):
4271 """GetNumberOfFiles(self) -> int"""
4272 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4274 def GetFiles(*args
, **kwargs
):
4275 """GetFiles(self) -> PyObject"""
4276 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4279 class DropFilesEventPtr(DropFilesEvent
):
4280 def __init__(self
, this
):
4282 if not hasattr(self
,"thisown"): self
.thisown
= 0
4283 self
.__class
__ = DropFilesEvent
4284 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4286 #---------------------------------------------------------------------------
4288 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4289 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4290 class UpdateUIEvent(CommandEvent
):
4291 """Proxy of C++ UpdateUIEvent class"""
4293 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4294 def __init__(self
, *args
, **kwargs
):
4295 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4296 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4297 self
.this
= newobj
.this
4300 def GetChecked(*args
, **kwargs
):
4301 """GetChecked(self) -> bool"""
4302 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4304 def GetEnabled(*args
, **kwargs
):
4305 """GetEnabled(self) -> bool"""
4306 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4308 def GetText(*args
, **kwargs
):
4309 """GetText(self) -> String"""
4310 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4312 def GetSetText(*args
, **kwargs
):
4313 """GetSetText(self) -> bool"""
4314 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4316 def GetSetChecked(*args
, **kwargs
):
4317 """GetSetChecked(self) -> bool"""
4318 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4320 def GetSetEnabled(*args
, **kwargs
):
4321 """GetSetEnabled(self) -> bool"""
4322 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4324 def Check(*args
, **kwargs
):
4325 """Check(self, bool check)"""
4326 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4328 def Enable(*args
, **kwargs
):
4329 """Enable(self, bool enable)"""
4330 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4332 def SetText(*args
, **kwargs
):
4333 """SetText(self, String text)"""
4334 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4336 def SetUpdateInterval(*args
, **kwargs
):
4337 """SetUpdateInterval(long updateInterval)"""
4338 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4340 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4341 def GetUpdateInterval(*args
, **kwargs
):
4342 """GetUpdateInterval() -> long"""
4343 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4345 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4346 def CanUpdate(*args
, **kwargs
):
4347 """CanUpdate(Window win) -> bool"""
4348 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4350 CanUpdate
= staticmethod(CanUpdate
)
4351 def ResetUpdateTime(*args
, **kwargs
):
4352 """ResetUpdateTime()"""
4353 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4355 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4356 def SetMode(*args
, **kwargs
):
4357 """SetMode(int mode)"""
4358 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4360 SetMode
= staticmethod(SetMode
)
4361 def GetMode(*args
, **kwargs
):
4362 """GetMode() -> int"""
4363 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4365 GetMode
= staticmethod(GetMode
)
4367 class UpdateUIEventPtr(UpdateUIEvent
):
4368 def __init__(self
, this
):
4370 if not hasattr(self
,"thisown"): self
.thisown
= 0
4371 self
.__class
__ = UpdateUIEvent
4372 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4374 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4375 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4376 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4378 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4379 """UpdateUIEvent_GetUpdateInterval() -> long"""
4380 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4382 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4383 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4384 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4386 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4387 """UpdateUIEvent_ResetUpdateTime()"""
4388 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4390 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4391 """UpdateUIEvent_SetMode(int mode)"""
4392 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4394 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4395 """UpdateUIEvent_GetMode() -> int"""
4396 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4398 #---------------------------------------------------------------------------
4400 class SysColourChangedEvent(Event
):
4401 """Proxy of C++ SysColourChangedEvent class"""
4403 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4404 def __init__(self
, *args
, **kwargs
):
4405 """__init__(self) -> SysColourChangedEvent"""
4406 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
4407 self
.this
= newobj
.this
4411 class SysColourChangedEventPtr(SysColourChangedEvent
):
4412 def __init__(self
, this
):
4414 if not hasattr(self
,"thisown"): self
.thisown
= 0
4415 self
.__class
__ = SysColourChangedEvent
4416 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4418 #---------------------------------------------------------------------------
4420 class MouseCaptureChangedEvent(Event
):
4421 """Proxy of C++ MouseCaptureChangedEvent class"""
4423 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4424 def __init__(self
, *args
, **kwargs
):
4425 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4426 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4427 self
.this
= newobj
.this
4430 def GetCapturedWindow(*args
, **kwargs
):
4431 """GetCapturedWindow(self) -> Window"""
4432 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4435 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4436 def __init__(self
, this
):
4438 if not hasattr(self
,"thisown"): self
.thisown
= 0
4439 self
.__class
__ = MouseCaptureChangedEvent
4440 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4442 #---------------------------------------------------------------------------
4444 class DisplayChangedEvent(Event
):
4445 """Proxy of C++ DisplayChangedEvent class"""
4447 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4448 def __init__(self
, *args
, **kwargs
):
4449 """__init__(self) -> DisplayChangedEvent"""
4450 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
4451 self
.this
= newobj
.this
4455 class DisplayChangedEventPtr(DisplayChangedEvent
):
4456 def __init__(self
, this
):
4458 if not hasattr(self
,"thisown"): self
.thisown
= 0
4459 self
.__class
__ = DisplayChangedEvent
4460 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4462 #---------------------------------------------------------------------------
4464 class PaletteChangedEvent(Event
):
4465 """Proxy of C++ PaletteChangedEvent class"""
4467 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4468 def __init__(self
, *args
, **kwargs
):
4469 """__init__(self, int id=0) -> PaletteChangedEvent"""
4470 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
4471 self
.this
= newobj
.this
4474 def SetChangedWindow(*args
, **kwargs
):
4475 """SetChangedWindow(self, Window win)"""
4476 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4478 def GetChangedWindow(*args
, **kwargs
):
4479 """GetChangedWindow(self) -> Window"""
4480 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4483 class PaletteChangedEventPtr(PaletteChangedEvent
):
4484 def __init__(self
, this
):
4486 if not hasattr(self
,"thisown"): self
.thisown
= 0
4487 self
.__class
__ = PaletteChangedEvent
4488 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4490 #---------------------------------------------------------------------------
4492 class QueryNewPaletteEvent(Event
):
4493 """Proxy of C++ QueryNewPaletteEvent class"""
4495 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4496 def __init__(self
, *args
, **kwargs
):
4497 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4498 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4499 self
.this
= newobj
.this
4502 def SetPaletteRealized(*args
, **kwargs
):
4503 """SetPaletteRealized(self, bool realized)"""
4504 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4506 def GetPaletteRealized(*args
, **kwargs
):
4507 """GetPaletteRealized(self) -> bool"""
4508 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4511 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4512 def __init__(self
, this
):
4514 if not hasattr(self
,"thisown"): self
.thisown
= 0
4515 self
.__class
__ = QueryNewPaletteEvent
4516 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4518 #---------------------------------------------------------------------------
4520 class NavigationKeyEvent(Event
):
4521 """Proxy of C++ NavigationKeyEvent class"""
4523 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4524 def __init__(self
, *args
, **kwargs
):
4525 """__init__(self) -> NavigationKeyEvent"""
4526 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
4527 self
.this
= newobj
.this
4530 def GetDirection(*args
, **kwargs
):
4531 """GetDirection(self) -> bool"""
4532 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4534 def SetDirection(*args
, **kwargs
):
4535 """SetDirection(self, bool forward)"""
4536 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4538 def IsWindowChange(*args
, **kwargs
):
4539 """IsWindowChange(self) -> bool"""
4540 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4542 def SetWindowChange(*args
, **kwargs
):
4543 """SetWindowChange(self, bool ischange)"""
4544 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4546 def SetFlags(*args
, **kwargs
):
4547 """SetFlags(self, long flags)"""
4548 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
4550 def GetCurrentFocus(*args
, **kwargs
):
4551 """GetCurrentFocus(self) -> Window"""
4552 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4554 def SetCurrentFocus(*args
, **kwargs
):
4555 """SetCurrentFocus(self, Window win)"""
4556 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4558 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
4559 IsForward
= _core_
.NavigationKeyEvent_IsForward
4560 WinChange
= _core_
.NavigationKeyEvent_WinChange
4562 class NavigationKeyEventPtr(NavigationKeyEvent
):
4563 def __init__(self
, this
):
4565 if not hasattr(self
,"thisown"): self
.thisown
= 0
4566 self
.__class
__ = NavigationKeyEvent
4567 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4569 #---------------------------------------------------------------------------
4571 class WindowCreateEvent(CommandEvent
):
4572 """Proxy of C++ WindowCreateEvent class"""
4574 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4575 def __init__(self
, *args
, **kwargs
):
4576 """__init__(self, Window win=None) -> WindowCreateEvent"""
4577 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
4578 self
.this
= newobj
.this
4581 def GetWindow(*args
, **kwargs
):
4582 """GetWindow(self) -> Window"""
4583 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4586 class WindowCreateEventPtr(WindowCreateEvent
):
4587 def __init__(self
, this
):
4589 if not hasattr(self
,"thisown"): self
.thisown
= 0
4590 self
.__class
__ = WindowCreateEvent
4591 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4593 class WindowDestroyEvent(CommandEvent
):
4594 """Proxy of C++ WindowDestroyEvent class"""
4596 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4597 def __init__(self
, *args
, **kwargs
):
4598 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4599 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
4600 self
.this
= newobj
.this
4603 def GetWindow(*args
, **kwargs
):
4604 """GetWindow(self) -> Window"""
4605 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4608 class WindowDestroyEventPtr(WindowDestroyEvent
):
4609 def __init__(self
, this
):
4611 if not hasattr(self
,"thisown"): self
.thisown
= 0
4612 self
.__class
__ = WindowDestroyEvent
4613 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4615 #---------------------------------------------------------------------------
4617 class ContextMenuEvent(CommandEvent
):
4618 """Proxy of C++ ContextMenuEvent class"""
4620 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4621 def __init__(self
, *args
, **kwargs
):
4622 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4623 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
4624 self
.this
= newobj
.this
4627 def GetPosition(*args
, **kwargs
):
4628 """GetPosition(self) -> Point"""
4629 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4631 def SetPosition(*args
, **kwargs
):
4632 """SetPosition(self, Point pos)"""
4633 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4636 class ContextMenuEventPtr(ContextMenuEvent
):
4637 def __init__(self
, this
):
4639 if not hasattr(self
,"thisown"): self
.thisown
= 0
4640 self
.__class
__ = ContextMenuEvent
4641 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4643 #---------------------------------------------------------------------------
4645 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
4646 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
4647 class IdleEvent(Event
):
4648 """Proxy of C++ IdleEvent class"""
4650 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4651 def __init__(self
, *args
, **kwargs
):
4652 """__init__(self) -> IdleEvent"""
4653 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
4654 self
.this
= newobj
.this
4657 def RequestMore(*args
, **kwargs
):
4658 """RequestMore(self, bool needMore=True)"""
4659 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
4661 def MoreRequested(*args
, **kwargs
):
4662 """MoreRequested(self) -> bool"""
4663 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
4665 def SetMode(*args
, **kwargs
):
4666 """SetMode(int mode)"""
4667 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4669 SetMode
= staticmethod(SetMode
)
4670 def GetMode(*args
, **kwargs
):
4671 """GetMode() -> int"""
4672 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4674 GetMode
= staticmethod(GetMode
)
4675 def CanSend(*args
, **kwargs
):
4676 """CanSend(Window win) -> bool"""
4677 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4679 CanSend
= staticmethod(CanSend
)
4681 class IdleEventPtr(IdleEvent
):
4682 def __init__(self
, this
):
4684 if not hasattr(self
,"thisown"): self
.thisown
= 0
4685 self
.__class
__ = IdleEvent
4686 _core_
.IdleEvent_swigregister(IdleEventPtr
)
4688 def IdleEvent_SetMode(*args
, **kwargs
):
4689 """IdleEvent_SetMode(int mode)"""
4690 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4692 def IdleEvent_GetMode(*args
, **kwargs
):
4693 """IdleEvent_GetMode() -> int"""
4694 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4696 def IdleEvent_CanSend(*args
, **kwargs
):
4697 """IdleEvent_CanSend(Window win) -> bool"""
4698 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4700 #---------------------------------------------------------------------------
4702 class PyEvent(Event
):
4703 """Proxy of C++ PyEvent class"""
4705 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4706 def __init__(self
, *args
, **kwargs
):
4707 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4708 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
4709 self
.this
= newobj
.this
4714 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
4717 if self
.thisown
: destroy(self
)
4720 def SetSelf(*args
, **kwargs
):
4721 """SetSelf(self, PyObject self)"""
4722 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
4724 def GetSelf(*args
, **kwargs
):
4725 """GetSelf(self) -> PyObject"""
4726 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
4729 class PyEventPtr(PyEvent
):
4730 def __init__(self
, this
):
4732 if not hasattr(self
,"thisown"): self
.thisown
= 0
4733 self
.__class
__ = PyEvent
4734 _core_
.PyEvent_swigregister(PyEventPtr
)
4736 class PyCommandEvent(CommandEvent
):
4737 """Proxy of C++ PyCommandEvent class"""
4739 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4740 def __init__(self
, *args
, **kwargs
):
4741 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4742 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
4743 self
.this
= newobj
.this
4748 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
4751 if self
.thisown
: destroy(self
)
4754 def SetSelf(*args
, **kwargs
):
4755 """SetSelf(self, PyObject self)"""
4756 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4758 def GetSelf(*args
, **kwargs
):
4759 """GetSelf(self) -> PyObject"""
4760 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4763 class PyCommandEventPtr(PyCommandEvent
):
4764 def __init__(self
, this
):
4766 if not hasattr(self
,"thisown"): self
.thisown
= 0
4767 self
.__class
__ = PyCommandEvent
4768 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4770 #---------------------------------------------------------------------------
4772 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
4773 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
4774 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
4775 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
4776 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
4777 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
4778 class PyApp(EvtHandler
):
4780 The ``wx.PyApp`` class is an *implementation detail*, please use the
4781 `wx.App` class (or some other derived class) instead.
4784 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4785 def __init__(self
, *args
, **kwargs
):
4787 __init__(self) -> PyApp
4789 Create a new application object, starting the bootstrap process.
4791 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
4792 self
.this
= newobj
.this
4795 self
._setCallbackInfo
(self
, PyApp
)
4796 self
._setOORInfo
(self
)
4798 def __del__(self
, destroy
=_core_
.delete_PyApp
):
4801 if self
.thisown
: destroy(self
)
4804 def _setCallbackInfo(*args
, **kwargs
):
4805 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4806 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
4808 def GetAppName(*args
, **kwargs
):
4810 GetAppName(self) -> String
4812 Get the application name.
4814 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
4816 def SetAppName(*args
, **kwargs
):
4818 SetAppName(self, String name)
4820 Set the application name. This value may be used automatically by
4821 `wx.Config` and such.
4823 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
4825 def GetClassName(*args
, **kwargs
):
4827 GetClassName(self) -> String
4829 Get the application's class name.
4831 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
4833 def SetClassName(*args
, **kwargs
):
4835 SetClassName(self, String name)
4837 Set the application's class name. This value may be used for
4838 X-resources if applicable for the platform
4840 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
4842 def GetVendorName(*args
, **kwargs
):
4844 GetVendorName(self) -> String
4846 Get the application's vendor name.
4848 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
4850 def SetVendorName(*args
, **kwargs
):
4852 SetVendorName(self, String name)
4854 Set the application's vendor name. This value may be used
4855 automatically by `wx.Config` and such.
4857 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
4859 def GetTraits(*args
, **kwargs
):
4861 GetTraits(self) -> wxAppTraits
4863 Return (and create if necessary) the app traits object to which we
4864 delegate for everything which either should be configurable by the
4865 user (then he can change the default behaviour simply by overriding
4866 CreateTraits() and returning his own traits object) or which is
4867 GUI/console dependent as then wx.AppTraits allows us to abstract the
4868 differences behind the common facade.
4870 :todo: Add support for overriding CreateAppTraits in wxPython.
4872 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
4874 def ProcessPendingEvents(*args
, **kwargs
):
4876 ProcessPendingEvents(self)
4878 Process all events in the Pending Events list -- it is necessary to
4879 call this function to process posted events. This normally happens
4880 during each event loop iteration.
4882 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4884 def Yield(*args
, **kwargs
):
4886 Yield(self, bool onlyIfNeeded=False) -> bool
4888 Process all currently pending events right now, instead of waiting
4889 until return to the event loop. It is an error to call ``Yield``
4890 recursively unless the value of ``onlyIfNeeded`` is True.
4892 :warning: This function is dangerous as it can lead to unexpected
4893 reentrancies (i.e. when called from an event handler it may
4894 result in calling the same event handler again), use with
4895 extreme care or, better, don't use at all!
4897 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4900 return _core_
.PyApp_Yield(*args
, **kwargs
)
4902 def WakeUpIdle(*args
, **kwargs
):
4906 Make sure that idle events are sent again.
4907 :see: `wx.WakeUpIdle`
4909 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
4911 def IsMainLoopRunning(*args
, **kwargs
):
4913 IsMainLoopRunning() -> bool
4915 Returns True if we're running the main loop, i.e. if the events can
4916 currently be dispatched.
4918 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
4920 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
4921 def MainLoop(*args
, **kwargs
):
4923 MainLoop(self) -> int
4925 Execute the main GUI loop, the function doesn't normally return until
4926 all top level windows have been closed and destroyed.
4928 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
4930 def Exit(*args
, **kwargs
):
4934 Exit the main loop thus terminating the application.
4937 return _core_
.PyApp_Exit(*args
, **kwargs
)
4939 def ExitMainLoop(*args
, **kwargs
):
4943 Exit the main GUI loop during the next iteration of the main
4944 loop, (i.e. it does not stop the program immediately!)
4946 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
4948 def Pending(*args
, **kwargs
):
4950 Pending(self) -> bool
4952 Returns True if there are unprocessed events in the event queue.
4954 return _core_
.PyApp_Pending(*args
, **kwargs
)
4956 def Dispatch(*args
, **kwargs
):
4958 Dispatch(self) -> bool
4960 Process the first event in the event queue (blocks until an event
4961 appears if there are none currently)
4963 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
4965 def ProcessIdle(*args
, **kwargs
):
4967 ProcessIdle(self) -> bool
4969 Called from the MainLoop when the application becomes idle (there are
4970 no pending events) and sends a `wx.IdleEvent` to all interested
4971 parties. Returns True if more idle events are needed, False if not.
4973 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
4975 def SendIdleEvents(*args
, **kwargs
):
4977 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4979 Send idle event to window and all subwindows. Returns True if more
4980 idle time is requested.
4982 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
4984 def IsActive(*args
, **kwargs
):
4986 IsActive(self) -> bool
4988 Return True if our app has focus.
4990 return _core_
.PyApp_IsActive(*args
, **kwargs
)
4992 def SetTopWindow(*args
, **kwargs
):
4994 SetTopWindow(self, Window win)
4996 Set the *main* top level window
4998 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
5000 def GetTopWindow(*args
, **kwargs
):
5002 GetTopWindow(self) -> Window
5004 Return the *main* top level window (if it hadn't been set previously
5005 with SetTopWindow(), will return just some top level window and, if
5006 there not any, will return None)
5008 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
5010 def SetExitOnFrameDelete(*args
, **kwargs
):
5012 SetExitOnFrameDelete(self, bool flag)
5014 Control the exit behaviour: by default, the program will exit the main
5015 loop (and so, usually, terminate) when the last top-level program
5016 window is deleted. Beware that if you disable this behaviour (with
5017 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5018 explicitly from somewhere.
5020 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
5022 def GetExitOnFrameDelete(*args
, **kwargs
):
5024 GetExitOnFrameDelete(self) -> bool
5026 Get the current exit behaviour setting.
5028 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
5030 def SetUseBestVisual(*args
, **kwargs
):
5032 SetUseBestVisual(self, bool flag)
5034 Set whether the app should try to use the best available visual on
5035 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5037 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
5039 def GetUseBestVisual(*args
, **kwargs
):
5041 GetUseBestVisual(self) -> bool
5043 Get current UseBestVisual setting.
5045 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
5047 def SetPrintMode(*args
, **kwargs
):
5048 """SetPrintMode(self, int mode)"""
5049 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
5051 def GetPrintMode(*args
, **kwargs
):
5052 """GetPrintMode(self) -> int"""
5053 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
5055 def SetAssertMode(*args
, **kwargs
):
5057 SetAssertMode(self, int mode)
5059 Set the OnAssert behaviour for debug and hybrid builds.
5061 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
5063 def GetAssertMode(*args
, **kwargs
):
5065 GetAssertMode(self) -> int
5067 Get the current OnAssert behaviour setting.
5069 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
5071 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5072 """GetMacSupportPCMenuShortcuts() -> bool"""
5073 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5075 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
5076 def GetMacAboutMenuItemId(*args
, **kwargs
):
5077 """GetMacAboutMenuItemId() -> long"""
5078 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5080 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
5081 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
5082 """GetMacPreferencesMenuItemId() -> long"""
5083 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5085 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
5086 def GetMacExitMenuItemId(*args
, **kwargs
):
5087 """GetMacExitMenuItemId() -> long"""
5088 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5090 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
5091 def GetMacHelpMenuTitleName(*args
, **kwargs
):
5092 """GetMacHelpMenuTitleName() -> String"""
5093 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5095 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
5096 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5097 """SetMacSupportPCMenuShortcuts(bool val)"""
5098 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5100 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
5101 def SetMacAboutMenuItemId(*args
, **kwargs
):
5102 """SetMacAboutMenuItemId(long val)"""
5103 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5105 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
5106 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
5107 """SetMacPreferencesMenuItemId(long val)"""
5108 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5110 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
5111 def SetMacExitMenuItemId(*args
, **kwargs
):
5112 """SetMacExitMenuItemId(long val)"""
5113 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5115 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
5116 def SetMacHelpMenuTitleName(*args
, **kwargs
):
5117 """SetMacHelpMenuTitleName(String val)"""
5118 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5120 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
5121 def _BootstrapApp(*args
, **kwargs
):
5125 For internal use only
5127 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
5129 def GetComCtl32Version(*args
, **kwargs
):
5131 GetComCtl32Version() -> int
5133 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5134 it wasn't found at all. Raises an exception on non-Windows platforms.
5136 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5138 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
5140 class PyAppPtr(PyApp
):
5141 def __init__(self
, this
):
5143 if not hasattr(self
,"thisown"): self
.thisown
= 0
5144 self
.__class
__ = PyApp
5145 _core_
.PyApp_swigregister(PyAppPtr
)
5147 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5149 PyApp_IsMainLoopRunning() -> bool
5151 Returns True if we're running the main loop, i.e. if the events can
5152 currently be dispatched.
5154 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5156 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5157 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5158 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5160 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5161 """PyApp_GetMacAboutMenuItemId() -> long"""
5162 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5164 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5165 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5166 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5168 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5169 """PyApp_GetMacExitMenuItemId() -> long"""
5170 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5172 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5173 """PyApp_GetMacHelpMenuTitleName() -> String"""
5174 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5176 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5177 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5178 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5180 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5181 """PyApp_SetMacAboutMenuItemId(long val)"""
5182 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5184 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5185 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5186 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5188 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5189 """PyApp_SetMacExitMenuItemId(long val)"""
5190 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5192 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5193 """PyApp_SetMacHelpMenuTitleName(String val)"""
5194 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5196 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5198 PyApp_GetComCtl32Version() -> int
5200 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5201 it wasn't found at all. Raises an exception on non-Windows platforms.
5203 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5205 #---------------------------------------------------------------------------
5208 def Exit(*args
, **kwargs
):
5212 Force an exit of the application. Convenience for wx.GetApp().Exit()
5214 return _core_
.Exit(*args
, **kwargs
)
5216 def Yield(*args
, **kwargs
):
5220 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5222 return _core_
.Yield(*args
, **kwargs
)
5224 def YieldIfNeeded(*args
, **kwargs
):
5226 YieldIfNeeded() -> bool
5228 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5230 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5232 def SafeYield(*args
, **kwargs
):
5234 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5236 This function is similar to `wx.Yield`, except that it disables the
5237 user input to all program windows before calling `wx.Yield` and
5238 re-enables it again afterwards. If ``win`` is not None, this window
5239 will remain enabled, allowing the implementation of some limited user
5242 :Returns: the result of the call to `wx.Yield`.
5244 return _core_
.SafeYield(*args
, **kwargs
)
5246 def WakeUpIdle(*args
, **kwargs
):
5250 Cause the message queue to become empty again, so idle events will be
5253 return _core_
.WakeUpIdle(*args
, **kwargs
)
5255 def PostEvent(*args
, **kwargs
):
5257 PostEvent(EvtHandler dest, Event event)
5259 Send an event to a window or other wx.EvtHandler to be processed
5262 return _core_
.PostEvent(*args
, **kwargs
)
5264 def App_CleanUp(*args
, **kwargs
):
5268 For internal use only, it is used to cleanup after wxWidgets when
5271 return _core_
.App_CleanUp(*args
, **kwargs
)
5273 def GetApp(*args
, **kwargs
):
5277 Return a reference to the current wx.App object.
5279 return _core_
.GetApp(*args
, **kwargs
)
5281 def SetDefaultPyEncoding(*args
, **kwargs
):
5283 SetDefaultPyEncoding(string encoding)
5285 Sets the encoding that wxPython will use when it needs to convert a
5286 Python string or unicode object to or from a wxString.
5288 return _core_
.SetDefaultPyEncoding(*args
, **kwargs
)
5290 def GetDefaultPyEncoding(*args
, **kwargs
):
5292 GetDefaultPyEncoding() -> string
5294 Gets the current encoding that wxPython will use when it needs to
5295 convert a Python string or unicode object to or from a wxString.
5297 return _core_
.GetDefaultPyEncoding(*args
, **kwargs
)
5298 #----------------------------------------------------------------------
5300 class PyOnDemandOutputWindow
:
5302 A class that can be used for redirecting Python's stdout and
5303 stderr streams. It will do nothing until something is wrriten to
5304 the stream at which point it will create a Frame with a text area
5305 and write the text there.
5307 def __init__(self
, title
= "wxPython: stdout/stderr"):
5310 self
.pos
= wx
.DefaultPosition
5311 self
.size
= (450, 300)
5314 def SetParent(self
, parent
):
5315 """Set the window to be used as the popup Frame's parent."""
5316 self
.parent
= parent
5319 def CreateOutputWindow(self
, st
):
5320 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
5321 style
=wx
.DEFAULT_FRAME_STYLE
)
5322 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
5323 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
5324 self
.text
.AppendText(st
)
5325 self
.frame
.Show(True)
5326 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
5329 def OnCloseWindow(self
, event
):
5330 if self
.frame
is not None:
5331 self
.frame
.Destroy()
5336 # These methods provide the file-like output behaviour.
5337 def write(self
, text
):
5339 Create the output window if needed and write the string to it.
5340 If not called in the context of the gui thread then uses
5341 CallAfter to do the work there.
5343 if self
.frame
is None:
5344 if not wx
.Thread_IsMain():
5345 wx
.CallAfter(self
.CreateOutputWindow
, text
)
5347 self
.CreateOutputWindow(text
)
5349 if not wx
.Thread_IsMain():
5350 wx
.CallAfter(self
.text
.AppendText
, text
)
5352 self
.text
.AppendText(text
)
5356 if self
.frame
is not None:
5357 wx
.CallAfter(self
.frame
.Close
)
5365 #----------------------------------------------------------------------
5367 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5369 class App(wx
.PyApp
):
5371 The ``wx.App`` class represents the application and is used to:
5373 * bootstrap the wxPython system and initialize the underlying
5375 * set and get application-wide properties
5376 * implement the windowing system main message or event loop,
5377 and to dispatch events to window instances
5380 Every application must have a ``wx.App`` instance, and all
5381 creation of UI objects should be delayed until after the
5382 ``wx.App`` object has been created in order to ensure that the gui
5383 platform and wxWidgets have been fully initialized.
5385 Normally you would derive from this class and implement an
5386 ``OnInit`` method that creates a frame and then calls
5387 ``self.SetTopWindow(frame)``.
5389 :see: `wx.PySimpleApp` for a simpler app class that can be used
5393 outputWindowClass
= PyOnDemandOutputWindow
5395 def __init__(self
, redirect
=_defRedirect
, filename
=None,
5396 useBestVisual
=False, clearSigInt
=True):
5398 Construct a ``wx.App`` object.
5400 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5401 redirected? Defaults to True on Windows and Mac, False
5402 otherwise. If `filename` is None then output will be
5403 redirected to a window that pops up as needed. (You can
5404 control what kind of window is created for the output by
5405 resetting the class variable ``outputWindowClass`` to a
5406 class of your choosing.)
5408 :param filename: The name of a file to redirect output to, if
5411 :param useBestVisual: Should the app try to use the best
5412 available visual provided by the system (only relevant on
5413 systems that have more than one visual.) This parameter
5414 must be used instead of calling `SetUseBestVisual` later
5415 on because it must be set before the underlying GUI
5416 toolkit is initialized.
5418 :param clearSigInt: Should SIGINT be cleared? This allows the
5419 app to terminate upon a Ctrl-C in the console like other
5422 :note: You should override OnInit to do applicaition
5423 initialization to ensure that the system, toolkit and
5424 wxWidgets are fully initialized.
5426 wx
.PyApp
.__init
__(self
)
5428 if wx
.Platform
== "__WXMAC__":
5431 if not MacOS
.WMAvailable():
5433 This program needs access to the screen. Please run with 'pythonw',
5434 not 'python', and only when you are logged in on the main display of
5442 # This has to be done before OnInit
5443 self
.SetUseBestVisual(useBestVisual
)
5445 # Set the default handler for SIGINT. This fixes a problem
5446 # where if Ctrl-C is pressed in the console that started this
5447 # app then it will not appear to do anything, (not even send
5448 # KeyboardInterrupt???) but will later segfault on exit. By
5449 # setting the default handler then the app will exit, as
5450 # expected (depending on platform.)
5454 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5458 # Save and redirect the stdio to a window?
5459 self
.stdioWin
= None
5460 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5462 self
.RedirectStdio(filename
)
5464 # Use Python's install prefix as the default
5465 wx
.StandardPaths
.Get().SetInstallPrefix(_sys
.prefix
)
5467 # This finishes the initialization of wxWindows and then calls
5468 # the OnInit that should be present in the derived class
5469 self
._BootstrapApp
()
5474 self
.RestoreStdio() # Just in case the MainLoop was overridden
5479 def SetTopWindow(self
, frame
):
5480 """Set the \"main\" top level window"""
5482 self
.stdioWin
.SetParent(frame
)
5483 wx
.PyApp
.SetTopWindow(self
, frame
)
5487 """Execute the main GUI event loop"""
5488 wx
.PyApp
.MainLoop(self
)
5492 def RedirectStdio(self
, filename
=None):
5493 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5495 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5497 self
.stdioWin
= self
.outputWindowClass()
5498 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5501 def RestoreStdio(self
):
5502 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5505 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
5507 Set the title, position and/or size of the output window if
5508 the stdio has been redirected. This should be called before
5509 any output would cause the output window to be created.
5512 if title
is not None:
5513 self
.stdioWin
.title
= title
5515 self
.stdioWin
.pos
= pos
5516 if size
is not None:
5517 self
.stdioWin
.size
= size
5522 # change from wx.PyApp_XX to wx.App_XX
5523 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
5524 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
5525 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
5526 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
5527 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
5528 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
5529 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
5530 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
5531 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
5532 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
5533 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
5535 #----------------------------------------------------------------------------
5537 class PySimpleApp(wx
.App
):
5539 A simple application class. You can just create one of these and
5540 then then make your top level windows later, and not have to worry
5541 about OnInit. For example::
5543 app = wx.PySimpleApp()
5544 frame = wx.Frame(None, title='Hello World')
5551 def __init__(self
, redirect
=False, filename
=None,
5552 useBestVisual
=False, clearSigInt
=True):
5554 :see: `wx.App.__init__`
5556 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
5563 # Is anybody using this one?
5564 class PyWidgetTester(wx
.App
):
5565 def __init__(self
, size
= (250, 100)):
5567 wx
.App
.__init
__(self
, 0)
5570 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5571 self
.SetTopWindow(self
.frame
)
5574 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
5575 w
= widgetClass(self
.frame
, *args
, **kwargs
)
5576 self
.frame
.Show(True)
5578 #----------------------------------------------------------------------------
5579 # DO NOT hold any other references to this object. This is how we
5580 # know when to cleanup system resources that wxWidgets is holding. When
5581 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5582 # goes to zero and it calls the wx.App_CleanUp function.
5584 class __wxPyCleanup
:
5586 self
.cleanup
= _core_
.App_CleanUp
5590 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5592 ## # another possible solution, but it gets called too early...
5594 ## atexit.register(_core_.wxApp_CleanUp)
5597 #----------------------------------------------------------------------------
5599 #---------------------------------------------------------------------------
5601 class EventLoop(object):
5602 """Proxy of C++ EventLoop class"""
5604 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5605 def __init__(self
, *args
, **kwargs
):
5606 """__init__(self) -> EventLoop"""
5607 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
5608 self
.this
= newobj
.this
5611 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
5614 if self
.thisown
: destroy(self
)
5617 def Run(*args
, **kwargs
):
5618 """Run(self) -> int"""
5619 return _core_
.EventLoop_Run(*args
, **kwargs
)
5621 def Exit(*args
, **kwargs
):
5622 """Exit(self, int rc=0)"""
5623 return _core_
.EventLoop_Exit(*args
, **kwargs
)
5625 def Pending(*args
, **kwargs
):
5626 """Pending(self) -> bool"""
5627 return _core_
.EventLoop_Pending(*args
, **kwargs
)
5629 def Dispatch(*args
, **kwargs
):
5630 """Dispatch(self) -> bool"""
5631 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
5633 def IsRunning(*args
, **kwargs
):
5634 """IsRunning(self) -> bool"""
5635 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
5637 def GetActive(*args
, **kwargs
):
5638 """GetActive() -> EventLoop"""
5639 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5641 GetActive
= staticmethod(GetActive
)
5642 def SetActive(*args
, **kwargs
):
5643 """SetActive(EventLoop loop)"""
5644 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5646 SetActive
= staticmethod(SetActive
)
5648 class EventLoopPtr(EventLoop
):
5649 def __init__(self
, this
):
5651 if not hasattr(self
,"thisown"): self
.thisown
= 0
5652 self
.__class
__ = EventLoop
5653 _core_
.EventLoop_swigregister(EventLoopPtr
)
5655 def EventLoop_GetActive(*args
, **kwargs
):
5656 """EventLoop_GetActive() -> EventLoop"""
5657 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5659 def EventLoop_SetActive(*args
, **kwargs
):
5660 """EventLoop_SetActive(EventLoop loop)"""
5661 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5663 #---------------------------------------------------------------------------
5665 class AcceleratorEntry(object):
5667 A class used to define items in an `wx.AcceleratorTable`. wxPython
5668 programs can choose to use wx.AcceleratorEntry objects, but using a
5669 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5670 as well. See `__init__` for of the tuple values.
5672 :see: `wx.AcceleratorTable`
5675 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5676 def __init__(self
, *args
, **kwargs
):
5678 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5680 Construct a wx.AcceleratorEntry.
5682 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
5683 self
.this
= newobj
.this
5686 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
5689 if self
.thisown
: destroy(self
)
5692 def Set(*args
, **kwargs
):
5694 Set(self, int flags, int keyCode, int cmd)
5696 (Re)set the attributes of a wx.AcceleratorEntry.
5699 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
5701 def GetFlags(*args
, **kwargs
):
5703 GetFlags(self) -> int
5705 Get the AcceleratorEntry's flags.
5707 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5709 def GetKeyCode(*args
, **kwargs
):
5711 GetKeyCode(self) -> int
5713 Get the AcceleratorEntry's keycode.
5715 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5717 def GetCommand(*args
, **kwargs
):
5719 GetCommand(self) -> int
5721 Get the AcceleratorEntry's command ID.
5723 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5726 class AcceleratorEntryPtr(AcceleratorEntry
):
5727 def __init__(self
, this
):
5729 if not hasattr(self
,"thisown"): self
.thisown
= 0
5730 self
.__class
__ = AcceleratorEntry
5731 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5733 class AcceleratorTable(Object
):
5735 An accelerator table allows the application to specify a table of
5736 keyboard shortcuts for menus or other commands. On Windows, menu or
5737 button commands are supported; on GTK, only menu commands are
5741 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5742 def __init__(self
, *args
, **kwargs
):
5744 __init__(entries) -> AcceleratorTable
5746 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5747 items or or of 3-tuples (flags, keyCode, cmdID)
5749 :see: `wx.AcceleratorEntry`
5751 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
5752 self
.this
= newobj
.this
5755 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
5758 if self
.thisown
: destroy(self
)
5761 def Ok(*args
, **kwargs
):
5762 """Ok(self) -> bool"""
5763 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
5766 class AcceleratorTablePtr(AcceleratorTable
):
5767 def __init__(self
, this
):
5769 if not hasattr(self
,"thisown"): self
.thisown
= 0
5770 self
.__class
__ = AcceleratorTable
5771 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5774 def GetAccelFromString(*args
, **kwargs
):
5775 """GetAccelFromString(String label) -> AcceleratorEntry"""
5776 return _core_
.GetAccelFromString(*args
, **kwargs
)
5777 #---------------------------------------------------------------------------
5779 class VisualAttributes(object):
5780 """struct containing all the visual attributes of a control"""
5782 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5783 def __init__(self
, *args
, **kwargs
):
5785 __init__(self) -> VisualAttributes
5787 struct containing all the visual attributes of a control
5789 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
5790 self
.this
= newobj
.this
5793 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
5796 if self
.thisown
: destroy(self
)
5799 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
5800 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
5801 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
5803 class VisualAttributesPtr(VisualAttributes
):
5804 def __init__(self
, this
):
5806 if not hasattr(self
,"thisown"): self
.thisown
= 0
5807 self
.__class
__ = VisualAttributes
5808 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
5809 NullAcceleratorTable
= cvar
.NullAcceleratorTable
5810 PanelNameStr
= cvar
.PanelNameStr
5812 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
5813 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
5814 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
5815 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
5816 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
5817 class Window(EvtHandler
):
5819 wx.Window is the base class for all windows and represents any visible
5820 object on the screen. All controls, top level windows and so on are
5821 wx.Windows. Sizers and device contexts are not however, as they don't
5822 appear on screen themselves.
5826 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5827 def __init__(self
, *args
, **kwargs
):
5829 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5830 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5832 Construct and show a generic Window.
5834 newobj
= _core_
.new_Window(*args
, **kwargs
)
5835 self
.this
= newobj
.this
5838 self
._setOORInfo
(self
)
5840 def Create(*args
, **kwargs
):
5842 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5843 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5845 Create the GUI part of the Window for 2-phase creation mode.
5847 return _core_
.Window_Create(*args
, **kwargs
)
5849 def Close(*args
, **kwargs
):
5851 Close(self, bool force=False) -> bool
5853 This function simply generates a EVT_CLOSE event whose handler usually
5854 tries to close the window. It doesn't close the window itself,
5855 however. If force is False (the default) then the window's close
5856 handler will be allowed to veto the destruction of the window.
5858 return _core_
.Window_Close(*args
, **kwargs
)
5860 def Destroy(*args
, **kwargs
):
5862 Destroy(self) -> bool
5864 Destroys the window safely. Frames and dialogs are not destroyed
5865 immediately when this function is called -- they are added to a list
5866 of windows to be deleted on idle time, when all the window's events
5867 have been processed. This prevents problems with events being sent to
5868 non-existent windows.
5870 Returns True if the window has either been successfully deleted, or it
5871 has been added to the list of windows pending real deletion.
5873 return _core_
.Window_Destroy(*args
, **kwargs
)
5875 def DestroyChildren(*args
, **kwargs
):
5877 DestroyChildren(self) -> bool
5879 Destroys all children of a window. Called automatically by the
5882 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
5884 def IsBeingDeleted(*args
, **kwargs
):
5886 IsBeingDeleted(self) -> bool
5888 Is the window in the process of being deleted?
5890 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
5892 def SetTitle(*args
, **kwargs
):
5894 SetTitle(self, String title)
5896 Sets the window's title. Applicable only to frames and dialogs.
5898 return _core_
.Window_SetTitle(*args
, **kwargs
)
5900 def GetTitle(*args
, **kwargs
):
5902 GetTitle(self) -> String
5904 Gets the window's title. Applicable only to frames and dialogs.
5906 return _core_
.Window_GetTitle(*args
, **kwargs
)
5908 def SetLabel(*args
, **kwargs
):
5910 SetLabel(self, String label)
5912 Set the text which the window shows in its label if applicable.
5914 return _core_
.Window_SetLabel(*args
, **kwargs
)
5916 def GetLabel(*args
, **kwargs
):
5918 GetLabel(self) -> String
5920 Generic way of getting a label from any window, for identification
5921 purposes. The interpretation of this function differs from class to
5922 class. For frames and dialogs, the value returned is the title. For
5923 buttons or static text controls, it is the button text. This function
5924 can be useful for meta-programs such as testing tools or special-needs
5925 access programs)which need to identify windows by name.
5927 return _core_
.Window_GetLabel(*args
, **kwargs
)
5929 def SetName(*args
, **kwargs
):
5931 SetName(self, String name)
5933 Sets the window's name. The window name is used for ressource setting
5934 in X, it is not the same as the window title/label
5936 return _core_
.Window_SetName(*args
, **kwargs
)
5938 def GetName(*args
, **kwargs
):
5940 GetName(self) -> String
5942 Returns the windows name. This name is not guaranteed to be unique;
5943 it is up to the programmer to supply an appropriate name in the window
5944 constructor or via wx.Window.SetName.
5946 return _core_
.Window_GetName(*args
, **kwargs
)
5948 def SetWindowVariant(*args
, **kwargs
):
5950 SetWindowVariant(self, int variant)
5952 Sets the variant of the window/font size to use for this window, if
5953 the platform supports variants, for example, wxMac.
5955 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
5957 def GetWindowVariant(*args
, **kwargs
):
5958 """GetWindowVariant(self) -> int"""
5959 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
5961 def SetId(*args
, **kwargs
):
5963 SetId(self, int winid)
5965 Sets the identifier of the window. Each window has an integer
5966 identifier. If the application has not provided one, an identifier
5967 will be generated. Normally, the identifier should be provided on
5968 creation and should not be modified subsequently.
5970 return _core_
.Window_SetId(*args
, **kwargs
)
5972 def GetId(*args
, **kwargs
):
5976 Returns the identifier of the window. Each window has an integer
5977 identifier. If the application has not provided one (or the default Id
5978 -1 is used) then an unique identifier with a negative value will be
5981 return _core_
.Window_GetId(*args
, **kwargs
)
5983 def NewControlId(*args
, **kwargs
):
5985 NewControlId() -> int
5987 Generate a control id for the controls which were not given one.
5989 return _core_
.Window_NewControlId(*args
, **kwargs
)
5991 NewControlId
= staticmethod(NewControlId
)
5992 def NextControlId(*args
, **kwargs
):
5994 NextControlId(int winid) -> int
5996 Get the id of the control following the one with the given
5999 return _core_
.Window_NextControlId(*args
, **kwargs
)
6001 NextControlId
= staticmethod(NextControlId
)
6002 def PrevControlId(*args
, **kwargs
):
6004 PrevControlId(int winid) -> int
6006 Get the id of the control preceding the one with the given
6009 return _core_
.Window_PrevControlId(*args
, **kwargs
)
6011 PrevControlId
= staticmethod(PrevControlId
)
6012 def SetSize(*args
, **kwargs
):
6014 SetSize(self, Size size)
6016 Sets the size of the window in pixels.
6018 return _core_
.Window_SetSize(*args
, **kwargs
)
6020 def SetDimensions(*args
, **kwargs
):
6022 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6024 Sets the position and size of the window in pixels. The sizeFlags
6025 parameter indicates the interpretation of the other params if they are
6026 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
6027 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
6028 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
6029 dimensions of -1 and less to be interpreted as real dimensions, not
6032 return _core_
.Window_SetDimensions(*args
, **kwargs
)
6034 def SetRect(*args
, **kwargs
):
6036 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6038 Sets the position and size of the window in pixels using a wx.Rect.
6040 return _core_
.Window_SetRect(*args
, **kwargs
)
6042 def SetSizeWH(*args
, **kwargs
):
6044 SetSizeWH(self, int width, int height)
6046 Sets the size of the window in pixels.
6048 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
6050 def Move(*args
, **kwargs
):
6052 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6054 Moves the window to the given position.
6056 return _core_
.Window_Move(*args
, **kwargs
)
6059 def MoveXY(*args
, **kwargs
):
6061 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6063 Moves the window to the given position.
6065 return _core_
.Window_MoveXY(*args
, **kwargs
)
6067 def SetBestFittingSize(*args
, **kwargs
):
6069 SetBestFittingSize(self, Size size=DefaultSize)
6071 A 'Smart' SetSize that will fill in default size components with the
6072 window's *best size* values. Also set's the minsize for use with sizers.
6074 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
6076 def Raise(*args
, **kwargs
):
6080 Raises the window to the top of the window hierarchy if it is a
6081 managed window (dialog or frame).
6083 return _core_
.Window_Raise(*args
, **kwargs
)
6085 def Lower(*args
, **kwargs
):
6089 Lowers the window to the bottom of the window hierarchy if it is a
6090 managed window (dialog or frame).
6092 return _core_
.Window_Lower(*args
, **kwargs
)
6094 def SetClientSize(*args
, **kwargs
):
6096 SetClientSize(self, Size size)
6098 This sets the size of the window client area in pixels. Using this
6099 function to size a window tends to be more device-independent than
6100 wx.Window.SetSize, since the application need not worry about what
6101 dimensions the border or title bar have when trying to fit the window
6102 around panel items, for example.
6104 return _core_
.Window_SetClientSize(*args
, **kwargs
)
6106 def SetClientSizeWH(*args
, **kwargs
):
6108 SetClientSizeWH(self, int width, int height)
6110 This sets the size of the window client area in pixels. Using this
6111 function to size a window tends to be more device-independent than
6112 wx.Window.SetSize, since the application need not worry about what
6113 dimensions the border or title bar have when trying to fit the window
6114 around panel items, for example.
6116 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
6118 def SetClientRect(*args
, **kwargs
):
6120 SetClientRect(self, Rect rect)
6122 This sets the size of the window client area in pixels. Using this
6123 function to size a window tends to be more device-independent than
6124 wx.Window.SetSize, since the application need not worry about what
6125 dimensions the border or title bar have when trying to fit the window
6126 around panel items, for example.
6128 return _core_
.Window_SetClientRect(*args
, **kwargs
)
6130 def GetPosition(*args
, **kwargs
):
6132 GetPosition(self) -> Point
6134 Get the window's position.
6136 return _core_
.Window_GetPosition(*args
, **kwargs
)
6138 def GetPositionTuple(*args
, **kwargs
):
6140 GetPositionTuple() -> (x,y)
6142 Get the window's position.
6144 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
6146 def GetSize(*args
, **kwargs
):
6148 GetSize(self) -> Size
6150 Get the window size.
6152 return _core_
.Window_GetSize(*args
, **kwargs
)
6154 def GetSizeTuple(*args
, **kwargs
):
6156 GetSizeTuple() -> (width, height)
6158 Get the window size.
6160 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
6162 def GetRect(*args
, **kwargs
):
6164 GetRect(self) -> Rect
6166 Returns the size and position of the window as a wx.Rect object.
6168 return _core_
.Window_GetRect(*args
, **kwargs
)
6170 def GetClientSize(*args
, **kwargs
):
6172 GetClientSize(self) -> Size
6174 This gets the size of the window's 'client area' in pixels. The client
6175 area is the area which may be drawn on by the programmer, excluding
6176 title bar, border, scrollbars, etc.
6178 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6180 def GetClientSizeTuple(*args
, **kwargs
):
6182 GetClientSizeTuple() -> (width, height)
6184 This gets the size of the window's 'client area' in pixels. The client
6185 area is the area which may be drawn on by the programmer, excluding
6186 title bar, border, scrollbars, etc.
6188 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6190 def GetClientAreaOrigin(*args
, **kwargs
):
6192 GetClientAreaOrigin(self) -> Point
6194 Get the origin of the client area of the window relative to the
6195 window's top left corner (the client area may be shifted because of
6196 the borders, scrollbars, other decorations...)
6198 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6200 def GetClientRect(*args
, **kwargs
):
6202 GetClientRect(self) -> Rect
6204 Get the client area position and size as a `wx.Rect` object.
6206 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6208 def GetBestSize(*args
, **kwargs
):
6210 GetBestSize(self) -> Size
6212 This function returns the best acceptable minimal size for the
6213 window, if applicable. For example, for a static text control, it will
6214 be the minimal size such that the control label is not truncated. For
6215 windows containing subwindows (suzh aswx.Panel), the size returned by
6216 this function will be the same as the size the window would have had
6219 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6221 def GetBestSizeTuple(*args
, **kwargs
):
6223 GetBestSizeTuple() -> (width, height)
6225 This function returns the best acceptable minimal size for the
6226 window, if applicable. For example, for a static text control, it will
6227 be the minimal size such that the control label is not truncated. For
6228 windows containing subwindows (suzh aswx.Panel), the size returned by
6229 this function will be the same as the size the window would have had
6232 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6234 def InvalidateBestSize(*args
, **kwargs
):
6236 InvalidateBestSize(self)
6238 Reset the cached best size value so it will be recalculated the next
6241 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6243 def GetBestFittingSize(*args
, **kwargs
):
6245 GetBestFittingSize(self) -> Size
6247 This function will merge the window's best size into the window's
6248 minimum size, giving priority to the min size components, and returns
6252 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6254 def GetAdjustedBestSize(*args
, **kwargs
):
6256 GetAdjustedBestSize(self) -> Size
6258 This method is similar to GetBestSize, except in one
6259 thing. GetBestSize should return the minimum untruncated size of the
6260 window, while this method will return the largest of BestSize and any
6261 user specified minimum size. ie. it is the minimum size the window
6262 should currently be drawn at, not the minimal size it can possibly
6265 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6267 def Center(*args
, **kwargs
):
6269 Center(self, int direction=BOTH)
6271 Centers the window. The parameter specifies the direction for
6272 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6273 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6274 on the entire screen and not on its parent window. If it is a
6275 top-level window and has no parent then it will always be centered
6276 relative to the screen.
6278 return _core_
.Window_Center(*args
, **kwargs
)
6281 def CenterOnScreen(*args
, **kwargs
):
6283 CenterOnScreen(self, int dir=BOTH)
6285 Center on screen (only works for top level windows)
6287 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6289 CentreOnScreen
= CenterOnScreen
6290 def CenterOnParent(*args
, **kwargs
):
6292 CenterOnParent(self, int dir=BOTH)
6294 Center with respect to the the parent window
6296 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6298 CentreOnParent
= CenterOnParent
6299 def Fit(*args
, **kwargs
):
6303 Sizes the window so that it fits around its subwindows. This function
6304 won't do anything if there are no subwindows and will only really work
6305 correctly if sizers are used for the subwindows layout. Also, if the
6306 window has exactly one subwindow it is better (faster and the result
6307 is more precise as Fit adds some margin to account for fuzziness of
6308 its calculations) to call window.SetClientSize(child.GetSize())
6309 instead of calling Fit.
6311 return _core_
.Window_Fit(*args
, **kwargs
)
6313 def FitInside(*args
, **kwargs
):
6317 Similar to Fit, but sizes the interior (virtual) size of a
6318 window. Mainly useful with scrolled windows to reset scrollbars after
6319 sizing changes that do not trigger a size event, and/or scrolled
6320 windows without an interior sizer. This function similarly won't do
6321 anything if there are no subwindows.
6323 return _core_
.Window_FitInside(*args
, **kwargs
)
6325 def SetSizeHints(*args
, **kwargs
):
6327 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6330 Allows specification of minimum and maximum window sizes, and window
6331 size increments. If a pair of values is not set (or set to -1), the
6332 default values will be used. If this function is called, the user
6333 will not be able to size the window outside the given bounds (if it is
6334 a top-level window.) Sizers will also inspect the minimum window size
6335 and will use that value if set when calculating layout.
6337 The resizing increments are only significant under Motif or Xt.
6339 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
6341 def SetSizeHintsSz(*args
, **kwargs
):
6343 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6345 Allows specification of minimum and maximum window sizes, and window
6346 size increments. If a pair of values is not set (or set to -1), the
6347 default values will be used. If this function is called, the user
6348 will not be able to size the window outside the given bounds (if it is
6349 a top-level window.) Sizers will also inspect the minimum window size
6350 and will use that value if set when calculating layout.
6352 The resizing increments are only significant under Motif or Xt.
6354 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
6356 def SetVirtualSizeHints(*args
, **kwargs
):
6358 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6360 Allows specification of minimum and maximum virtual window sizes. If a
6361 pair of values is not set (or set to -1), the default values will be
6362 used. If this function is called, the user will not be able to size
6363 the virtual area of the window outside the given bounds.
6365 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
6367 def SetVirtualSizeHintsSz(*args
, **kwargs
):
6369 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6371 Allows specification of minimum and maximum virtual window sizes. If a
6372 pair of values is not set (or set to -1), the default values will be
6373 used. If this function is called, the user will not be able to size
6374 the virtual area of the window outside the given bounds.
6376 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
6378 def GetMaxSize(*args
, **kwargs
):
6379 """GetMaxSize(self) -> Size"""
6380 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
6382 def GetMinSize(*args
, **kwargs
):
6383 """GetMinSize(self) -> Size"""
6384 return _core_
.Window_GetMinSize(*args
, **kwargs
)
6386 def SetMinSize(*args
, **kwargs
):
6388 SetMinSize(self, Size minSize)
6390 A more convenient method than `SetSizeHints` for setting just the
6393 return _core_
.Window_SetMinSize(*args
, **kwargs
)
6395 def SetMaxSize(*args
, **kwargs
):
6397 SetMaxSize(self, Size maxSize)
6399 A more convenient method than `SetSizeHints` for setting just the
6402 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
6404 def GetMinWidth(*args
, **kwargs
):
6405 """GetMinWidth(self) -> int"""
6406 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
6408 def GetMinHeight(*args
, **kwargs
):
6409 """GetMinHeight(self) -> int"""
6410 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
6412 def GetMaxWidth(*args
, **kwargs
):
6413 """GetMaxWidth(self) -> int"""
6414 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
6416 def GetMaxHeight(*args
, **kwargs
):
6417 """GetMaxHeight(self) -> int"""
6418 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
6420 def SetVirtualSize(*args
, **kwargs
):
6422 SetVirtualSize(self, Size size)
6424 Set the the virtual size of a window in pixels. For most windows this
6425 is just the client area of the window, but for some like scrolled
6426 windows it is more or less independent of the screen window size.
6428 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
6430 def SetVirtualSizeWH(*args
, **kwargs
):
6432 SetVirtualSizeWH(self, int w, int h)
6434 Set the the virtual size of a window in pixels. For most windows this
6435 is just the client area of the window, but for some like scrolled
6436 windows it is more or less independent of the screen window size.
6438 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
6440 def GetVirtualSize(*args
, **kwargs
):
6442 GetVirtualSize(self) -> Size
6444 Get the the virtual size of the window in pixels. For most windows
6445 this is just the client area of the window, but for some like scrolled
6446 windows it is more or less independent of the screen window size.
6448 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
6450 def GetVirtualSizeTuple(*args
, **kwargs
):
6452 GetVirtualSizeTuple() -> (width, height)
6454 Get the the virtual size of the window in pixels. For most windows
6455 this is just the client area of the window, but for some like scrolled
6456 windows it is more or less independent of the screen window size.
6458 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
6460 def GetBestVirtualSize(*args
, **kwargs
):
6462 GetBestVirtualSize(self) -> Size
6464 Return the largest of ClientSize and BestSize (as determined by a
6465 sizer, interior children, or other means)
6467 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
6469 def Show(*args
, **kwargs
):
6471 Show(self, bool show=True) -> bool
6473 Shows or hides the window. You may need to call Raise for a top level
6474 window if you want to bring it to top, although this is not needed if
6475 Show is called immediately after the frame creation. Returns True if
6476 the window has been shown or hidden or False if nothing was done
6477 because it already was in the requested state.
6479 return _core_
.Window_Show(*args
, **kwargs
)
6481 def Hide(*args
, **kwargs
):
6485 Equivalent to calling Show(False).
6487 return _core_
.Window_Hide(*args
, **kwargs
)
6489 def Enable(*args
, **kwargs
):
6491 Enable(self, bool enable=True) -> bool
6493 Enable or disable the window for user input. Note that when a parent
6494 window is disabled, all of its children are disabled as well and they
6495 are reenabled again when the parent is. Returns true if the window
6496 has been enabled or disabled, false if nothing was done, i.e. if the
6497 window had already been in the specified state.
6499 return _core_
.Window_Enable(*args
, **kwargs
)
6501 def Disable(*args
, **kwargs
):
6503 Disable(self) -> bool
6505 Disables the window, same as Enable(false).
6507 return _core_
.Window_Disable(*args
, **kwargs
)
6509 def IsShown(*args
, **kwargs
):
6511 IsShown(self) -> bool
6513 Returns true if the window is shown, false if it has been hidden.
6515 return _core_
.Window_IsShown(*args
, **kwargs
)
6517 def IsEnabled(*args
, **kwargs
):
6519 IsEnabled(self) -> bool
6521 Returns true if the window is enabled for input, false otherwise.
6523 return _core_
.Window_IsEnabled(*args
, **kwargs
)
6525 def SetWindowStyleFlag(*args
, **kwargs
):
6527 SetWindowStyleFlag(self, long style)
6529 Sets the style of the window. Please note that some styles cannot be
6530 changed after the window creation and that Refresh() might need to be
6531 called after changing the others for the change to take place
6534 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
6536 def GetWindowStyleFlag(*args
, **kwargs
):
6538 GetWindowStyleFlag(self) -> long
6540 Gets the window style that was passed to the constructor or Create
6543 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
6545 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
6546 def HasFlag(*args
, **kwargs
):
6548 HasFlag(self, int flag) -> bool
6550 Test if the given style is set for this window.
6552 return _core_
.Window_HasFlag(*args
, **kwargs
)
6554 def IsRetained(*args
, **kwargs
):
6556 IsRetained(self) -> bool
6558 Returns true if the window is retained, false otherwise. Retained
6559 windows are only available on X platforms.
6561 return _core_
.Window_IsRetained(*args
, **kwargs
)
6563 def SetExtraStyle(*args
, **kwargs
):
6565 SetExtraStyle(self, long exStyle)
6567 Sets the extra style bits for the window. Extra styles are the less
6568 often used style bits which can't be set with the constructor or with
6569 SetWindowStyleFlag()
6571 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
6573 def GetExtraStyle(*args
, **kwargs
):
6575 GetExtraStyle(self) -> long
6577 Returns the extra style bits for the window.
6579 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
6581 def MakeModal(*args
, **kwargs
):
6583 MakeModal(self, bool modal=True)
6585 Disables all other windows in the application so that the user can
6586 only interact with this window. Passing False will reverse this
6589 return _core_
.Window_MakeModal(*args
, **kwargs
)
6591 def SetThemeEnabled(*args
, **kwargs
):
6593 SetThemeEnabled(self, bool enableTheme)
6595 This function tells a window if it should use the system's "theme"
6596 code to draw the windows' background instead if its own background
6597 drawing code. This will only have an effect on platforms that support
6598 the notion of themes in user defined windows. One such platform is
6599 GTK+ where windows can have (very colourful) backgrounds defined by a
6600 user's selected theme.
6602 Dialogs, notebook pages and the status bar have this flag set to true
6603 by default so that the default look and feel is simulated best.
6605 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
6607 def GetThemeEnabled(*args
, **kwargs
):
6609 GetThemeEnabled(self) -> bool
6611 Return the themeEnabled flag.
6613 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
6615 def SetFocus(*args
, **kwargs
):
6619 Set's the focus to this window, allowing it to receive keyboard input.
6621 return _core_
.Window_SetFocus(*args
, **kwargs
)
6623 def SetFocusFromKbd(*args
, **kwargs
):
6625 SetFocusFromKbd(self)
6627 Set focus to this window as the result of a keyboard action. Normally
6628 only called internally.
6630 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
6632 def FindFocus(*args
, **kwargs
):
6634 FindFocus() -> Window
6636 Returns the window or control that currently has the keyboard focus,
6639 return _core_
.Window_FindFocus(*args
, **kwargs
)
6641 FindFocus
= staticmethod(FindFocus
)
6642 def AcceptsFocus(*args
, **kwargs
):
6644 AcceptsFocus(self) -> bool
6646 Can this window have focus?
6648 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
6650 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6652 AcceptsFocusFromKeyboard(self) -> bool
6654 Can this window be given focus by keyboard navigation? if not, the
6655 only way to give it focus (provided it accepts it at all) is to click
6658 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6660 def GetDefaultItem(*args
, **kwargs
):
6662 GetDefaultItem(self) -> Window
6664 Get the default child of this parent, i.e. the one which is activated
6665 by pressing <Enter> such as the OK button on a wx.Dialog.
6667 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
6669 def SetDefaultItem(*args
, **kwargs
):
6671 SetDefaultItem(self, Window child) -> Window
6673 Set this child as default, return the old default.
6675 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
6677 def SetTmpDefaultItem(*args
, **kwargs
):
6679 SetTmpDefaultItem(self, Window win)
6681 Set this child as temporary default
6683 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6685 def Navigate(*args
, **kwargs
):
6687 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6689 Does keyboard navigation from this window to another, by sending a
6690 `wx.NavigationKeyEvent`.
6692 return _core_
.Window_Navigate(*args
, **kwargs
)
6694 def MoveAfterInTabOrder(*args
, **kwargs
):
6696 MoveAfterInTabOrder(self, Window win)
6698 Moves this window in the tab navigation order after the specified
6699 sibling window. This means that when the user presses the TAB key on
6700 that other window, the focus switches to this window.
6702 The default tab order is the same as creation order. This function
6703 and `MoveBeforeInTabOrder` allow to change it after creating all the
6707 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
6709 def MoveBeforeInTabOrder(*args
, **kwargs
):
6711 MoveBeforeInTabOrder(self, Window win)
6713 Same as `MoveAfterInTabOrder` except that it inserts this window just
6714 before win instead of putting it right after it.
6716 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
6718 def GetChildren(*args
, **kwargs
):
6720 GetChildren(self) -> PyObject
6722 Returns a list of the window's children. NOTE: Currently this is a
6723 copy of the child window list maintained by the window, so the return
6724 value of this function is only valid as long as the window's children
6727 return _core_
.Window_GetChildren(*args
, **kwargs
)
6729 def GetParent(*args
, **kwargs
):
6731 GetParent(self) -> Window
6733 Returns the parent window of this window, or None if there isn't one.
6735 return _core_
.Window_GetParent(*args
, **kwargs
)
6737 def GetGrandParent(*args
, **kwargs
):
6739 GetGrandParent(self) -> Window
6741 Returns the parent of the parent of this window, or None if there
6744 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
6746 def IsTopLevel(*args
, **kwargs
):
6748 IsTopLevel(self) -> bool
6750 Returns true if the given window is a top-level one. Currently all
6751 frames and dialogs are always considered to be top-level windows (even
6752 if they have a parent window).
6754 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
6756 def Reparent(*args
, **kwargs
):
6758 Reparent(self, Window newParent) -> bool
6760 Reparents the window, i.e the window will be removed from its current
6761 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6762 re-inserted into another. Available on Windows and GTK. Returns True
6763 if the parent was changed, False otherwise (error or newParent ==
6766 return _core_
.Window_Reparent(*args
, **kwargs
)
6768 def AddChild(*args
, **kwargs
):
6770 AddChild(self, Window child)
6772 Adds a child window. This is called automatically by window creation
6773 functions so should not be required by the application programmer.
6775 return _core_
.Window_AddChild(*args
, **kwargs
)
6777 def RemoveChild(*args
, **kwargs
):
6779 RemoveChild(self, Window child)
6781 Removes a child window. This is called automatically by window
6782 deletion functions so should not be required by the application
6785 return _core_
.Window_RemoveChild(*args
, **kwargs
)
6787 def FindWindowById(*args
, **kwargs
):
6789 FindWindowById(self, long winid) -> Window
6791 Find a chld of this window by window ID
6793 return _core_
.Window_FindWindowById(*args
, **kwargs
)
6795 def FindWindowByName(*args
, **kwargs
):
6797 FindWindowByName(self, String name) -> Window
6799 Find a child of this window by name
6801 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
6803 def GetEventHandler(*args
, **kwargs
):
6805 GetEventHandler(self) -> EvtHandler
6807 Returns the event handler for this window. By default, the window is
6808 its own event handler.
6810 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
6812 def SetEventHandler(*args
, **kwargs
):
6814 SetEventHandler(self, EvtHandler handler)
6816 Sets the event handler for this window. An event handler is an object
6817 that is capable of processing the events sent to a window. By default,
6818 the window is its own event handler, but an application may wish to
6819 substitute another, for example to allow central implementation of
6820 event-handling for a variety of different window classes.
6822 It is usually better to use `wx.Window.PushEventHandler` since this sets
6823 up a chain of event handlers, where an event not handled by one event
6824 handler is handed to the next one in the chain.
6826 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
6828 def PushEventHandler(*args
, **kwargs
):
6830 PushEventHandler(self, EvtHandler handler)
6832 Pushes this event handler onto the event handler stack for the window.
6833 An event handler is an object that is capable of processing the events
6834 sent to a window. By default, the window is its own event handler, but
6835 an application may wish to substitute another, for example to allow
6836 central implementation of event-handling for a variety of different
6839 wx.Window.PushEventHandler allows an application to set up a chain of
6840 event handlers, where an event not handled by one event handler is
6841 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6842 remove the event handler.
6844 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
6846 def PopEventHandler(*args
, **kwargs
):
6848 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6850 Removes and returns the top-most event handler on the event handler
6851 stack. If deleteHandler is True then the wx.EvtHandler object will be
6852 destroyed after it is popped.
6854 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
6856 def RemoveEventHandler(*args
, **kwargs
):
6858 RemoveEventHandler(self, EvtHandler handler) -> bool
6860 Find the given handler in the event handler chain and remove (but not
6861 delete) it from the event handler chain, return True if it was found
6862 and False otherwise (this also results in an assert failure so this
6863 function should only be called when the handler is supposed to be
6866 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
6868 def SetValidator(*args
, **kwargs
):
6870 SetValidator(self, Validator validator)
6872 Deletes the current validator (if any) and sets the window validator,
6873 having called wx.Validator.Clone to create a new validator of this
6876 return _core_
.Window_SetValidator(*args
, **kwargs
)
6878 def GetValidator(*args
, **kwargs
):
6880 GetValidator(self) -> Validator
6882 Returns a pointer to the current validator for the window, or None if
6885 return _core_
.Window_GetValidator(*args
, **kwargs
)
6887 def Validate(*args
, **kwargs
):
6889 Validate(self) -> bool
6891 Validates the current values of the child controls using their
6892 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6893 style flag set, the method will also call Validate() of all child
6894 windows. Returns false if any of the validations failed.
6896 return _core_
.Window_Validate(*args
, **kwargs
)
6898 def TransferDataToWindow(*args
, **kwargs
):
6900 TransferDataToWindow(self) -> bool
6902 Transfers values to child controls from data areas specified by their
6903 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6904 style flag set, the method will also call TransferDataToWindow() of
6907 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
6909 def TransferDataFromWindow(*args
, **kwargs
):
6911 TransferDataFromWindow(self) -> bool
6913 Transfers values from child controls to data areas specified by their
6914 validators. Returns false if a transfer failed. If the window has
6915 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6916 also call TransferDataFromWindow() of all child windows.
6918 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
6920 def InitDialog(*args
, **kwargs
):
6924 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6925 to the dialog via validators.
6927 return _core_
.Window_InitDialog(*args
, **kwargs
)
6929 def SetAcceleratorTable(*args
, **kwargs
):
6931 SetAcceleratorTable(self, AcceleratorTable accel)
6933 Sets the accelerator table for this window.
6935 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
6937 def GetAcceleratorTable(*args
, **kwargs
):
6939 GetAcceleratorTable(self) -> AcceleratorTable
6941 Gets the accelerator table for this window.
6943 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
6945 def RegisterHotKey(*args
, **kwargs
):
6947 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6949 Registers a system wide hotkey. Every time the user presses the hotkey
6950 registered here, this window will receive a hotkey event. It will
6951 receive the event even if the application is in the background and
6952 does not have the input focus because the user is working with some
6953 other application. To bind an event handler function to this hotkey
6954 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6955 hotkey was registered successfully.
6957 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
6959 def UnregisterHotKey(*args
, **kwargs
):
6961 UnregisterHotKey(self, int hotkeyId) -> bool
6963 Unregisters a system wide hotkey.
6965 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
6967 def ConvertDialogPointToPixels(*args
, **kwargs
):
6969 ConvertDialogPointToPixels(self, Point pt) -> Point
6971 Converts a point or size from dialog units to pixels. Dialog units
6972 are used for maintaining a dialog's proportions even if the font
6973 changes. For the x dimension, the dialog units are multiplied by the
6974 average character width and then divided by 4. For the y dimension,
6975 the dialog units are multiplied by the average character height and
6978 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
6980 def ConvertDialogSizeToPixels(*args
, **kwargs
):
6982 ConvertDialogSizeToPixels(self, Size sz) -> Size
6984 Converts a point or size from dialog units to pixels. Dialog units
6985 are used for maintaining a dialog's proportions even if the font
6986 changes. For the x dimension, the dialog units are multiplied by the
6987 average character width and then divided by 4. For the y dimension,
6988 the dialog units are multiplied by the average character height and
6991 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
6993 def DLG_PNT(*args
, **kwargs
):
6995 DLG_PNT(self, Point pt) -> Point
6997 Converts a point or size from dialog units to pixels. Dialog units
6998 are used for maintaining a dialog's proportions even if the font
6999 changes. For the x dimension, the dialog units are multiplied by the
7000 average character width and then divided by 4. For the y dimension,
7001 the dialog units are multiplied by the average character height and
7004 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
7006 def DLG_SZE(*args
, **kwargs
):
7008 DLG_SZE(self, Size sz) -> Size
7010 Converts a point or size from dialog units to pixels. Dialog units
7011 are used for maintaining a dialog's proportions even if the font
7012 changes. For the x dimension, the dialog units are multiplied by the
7013 average character width and then divided by 4. For the y dimension,
7014 the dialog units are multiplied by the average character height and
7017 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
7019 def ConvertPixelPointToDialog(*args
, **kwargs
):
7020 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7021 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
7023 def ConvertPixelSizeToDialog(*args
, **kwargs
):
7024 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7025 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
7027 def WarpPointer(*args
, **kwargs
):
7029 WarpPointer(self, int x, int y)
7031 Moves the pointer to the given position on the window.
7033 NOTE: This function is not supported under Mac because Apple Human
7034 Interface Guidelines forbid moving the mouse cursor programmatically.
7036 return _core_
.Window_WarpPointer(*args
, **kwargs
)
7038 def CaptureMouse(*args
, **kwargs
):
7042 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7043 release the capture.
7045 Note that wxWindows maintains the stack of windows having captured the
7046 mouse and when the mouse is released the capture returns to the window
7047 which had had captured it previously and it is only really released if
7048 there were no previous window. In particular, this means that you must
7049 release the mouse as many times as you capture it.
7051 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
7053 def ReleaseMouse(*args
, **kwargs
):
7057 Releases mouse input captured with wx.Window.CaptureMouse.
7059 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
7061 def GetCapture(*args
, **kwargs
):
7063 GetCapture() -> Window
7065 Returns the window which currently captures the mouse or None
7067 return _core_
.Window_GetCapture(*args
, **kwargs
)
7069 GetCapture
= staticmethod(GetCapture
)
7070 def HasCapture(*args
, **kwargs
):
7072 HasCapture(self) -> bool
7074 Returns true if this window has the current mouse capture.
7076 return _core_
.Window_HasCapture(*args
, **kwargs
)
7078 def Refresh(*args
, **kwargs
):
7080 Refresh(self, bool eraseBackground=True, Rect rect=None)
7082 Mark the specified rectangle (or the whole window) as "dirty" so it
7083 will be repainted. Causes an EVT_PAINT event to be generated and sent
7086 return _core_
.Window_Refresh(*args
, **kwargs
)
7088 def RefreshRect(*args
, **kwargs
):
7090 RefreshRect(self, Rect rect)
7092 Redraws the contents of the given rectangle: the area inside it will
7093 be repainted. This is the same as Refresh but has a nicer syntax.
7095 return _core_
.Window_RefreshRect(*args
, **kwargs
)
7097 def Update(*args
, **kwargs
):
7101 Calling this method immediately repaints the invalidated area of the
7102 window instead of waiting for the EVT_PAINT event to happen, (normally
7103 this would usually only happen when the flow of control returns to the
7104 event loop.) Notice that this function doesn't refresh the window and
7105 does nothing if the window has been already repainted. Use Refresh
7106 first if you want to immediately redraw the window (or some portion of
7107 it) unconditionally.
7109 return _core_
.Window_Update(*args
, **kwargs
)
7111 def ClearBackground(*args
, **kwargs
):
7113 ClearBackground(self)
7115 Clears the window by filling it with the current background
7116 colour. Does not cause an erase background event to be generated.
7118 return _core_
.Window_ClearBackground(*args
, **kwargs
)
7120 def Freeze(*args
, **kwargs
):
7124 Freezes the window or, in other words, prevents any updates from
7125 taking place on screen, the window is not redrawn at all. Thaw must be
7126 called to reenable window redrawing. Calls to Freeze/Thaw may be
7127 nested, with the actual Thaw being delayed until all the nesting has
7130 This method is useful for visual appearance optimization (for example,
7131 it is a good idea to use it before inserting large amount of text into
7132 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7133 for all controls so it is mostly just a hint to wxWindows and not a
7134 mandatory directive.
7136 return _core_
.Window_Freeze(*args
, **kwargs
)
7138 def Thaw(*args
, **kwargs
):
7142 Reenables window updating after a previous call to Freeze. Calls to
7143 Freeze/Thaw may be nested, so Thaw must be called the same number of
7144 times that Freeze was before the window will be updated.
7146 return _core_
.Window_Thaw(*args
, **kwargs
)
7148 def PrepareDC(*args
, **kwargs
):
7150 PrepareDC(self, DC dc)
7152 Call this function to prepare the device context for drawing a
7153 scrolled image. It sets the device origin according to the current
7156 return _core_
.Window_PrepareDC(*args
, **kwargs
)
7158 def GetUpdateRegion(*args
, **kwargs
):
7160 GetUpdateRegion(self) -> Region
7162 Returns the region specifying which parts of the window have been
7163 damaged. Should only be called within an EVT_PAINT handler.
7165 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
7167 def GetUpdateClientRect(*args
, **kwargs
):
7169 GetUpdateClientRect(self) -> Rect
7171 Get the update rectangle region bounding box in client coords.
7173 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7175 def IsExposed(*args
, **kwargs
):
7177 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7179 Returns true if the given point or rectangle area has been exposed
7180 since the last repaint. Call this in an paint event handler to
7181 optimize redrawing by only redrawing those areas, which have been
7184 return _core_
.Window_IsExposed(*args
, **kwargs
)
7186 def IsExposedPoint(*args
, **kwargs
):
7188 IsExposedPoint(self, Point pt) -> bool
7190 Returns true if the given point or rectangle area has been exposed
7191 since the last repaint. Call this in an paint event handler to
7192 optimize redrawing by only redrawing those areas, which have been
7195 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7197 def IsExposedRect(*args
, **kwargs
):
7199 IsExposedRect(self, Rect rect) -> bool
7201 Returns true if the given point or rectangle area has been exposed
7202 since the last repaint. Call this in an paint event handler to
7203 optimize redrawing by only redrawing those areas, which have been
7206 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7208 def GetDefaultAttributes(*args
, **kwargs
):
7210 GetDefaultAttributes(self) -> VisualAttributes
7212 Get the default attributes for an instance of this class. This is
7213 useful if you want to use the same font or colour in your own control
7214 as in a standard control -- which is a much better idea than hard
7215 coding specific colours or fonts which might look completely out of
7216 place on the user's system, especially if it uses themes.
7218 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7220 def GetClassDefaultAttributes(*args
, **kwargs
):
7222 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7224 Get the default attributes for this class. This is useful if you want
7225 to use the same font or colour in your own control as in a standard
7226 control -- which is a much better idea than hard coding specific
7227 colours or fonts which might look completely out of place on the
7228 user's system, especially if it uses themes.
7230 The variant parameter is only relevant under Mac currently and is
7231 ignore under other platforms. Under Mac, it will change the size of
7232 the returned font. See `wx.Window.SetWindowVariant` for more about
7235 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7237 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7238 def SetBackgroundColour(*args
, **kwargs
):
7240 SetBackgroundColour(self, Colour colour) -> bool
7242 Sets the background colour of the window. Returns True if the colour
7243 was changed. The background colour is usually painted by the default
7244 EVT_ERASE_BACKGROUND event handler function under Windows and
7245 automatically under GTK. Using `wx.NullColour` will reset the window
7246 to the default background colour.
7248 Note that setting the background colour may not cause an immediate
7249 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7250 calling this function.
7252 Using this function will disable attempts to use themes for this
7253 window, if the system supports them. Use with care since usually the
7254 themes represent the appearance chosen by the user to be used for all
7255 applications on the system.
7257 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7259 def SetOwnBackgroundColour(*args
, **kwargs
):
7260 """SetOwnBackgroundColour(self, Colour colour)"""
7261 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7263 def SetForegroundColour(*args
, **kwargs
):
7265 SetForegroundColour(self, Colour colour) -> bool
7267 Sets the foreground colour of the window. Returns True is the colour
7268 was changed. The interpretation of foreground colour is dependent on
7269 the window class; it may be the text colour or other colour, or it may
7272 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7274 def SetOwnForegroundColour(*args
, **kwargs
):
7275 """SetOwnForegroundColour(self, Colour colour)"""
7276 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7278 def GetBackgroundColour(*args
, **kwargs
):
7280 GetBackgroundColour(self) -> Colour
7282 Returns the background colour of the window.
7284 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7286 def GetForegroundColour(*args
, **kwargs
):
7288 GetForegroundColour(self) -> Colour
7290 Returns the foreground colour of the window. The interpretation of
7291 foreground colour is dependent on the window class; it may be the text
7292 colour or other colour, or it may not be used at all.
7294 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7296 def SetBackgroundStyle(*args
, **kwargs
):
7298 SetBackgroundStyle(self, int style) -> bool
7300 Returns the background style of the window. The background style
7301 indicates how the background of the window is drawn.
7303 ====================== ========================================
7304 wx.BG_STYLE_SYSTEM The background colour or pattern should
7305 be determined by the system
7306 wx.BG_STYLE_COLOUR The background should be a solid colour
7307 wx.BG_STYLE_CUSTOM The background will be implemented by the
7309 ====================== ========================================
7311 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7312 a custom background, such as a tiled bitmap. Currently the style has
7313 no effect on other platforms.
7315 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7317 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
7319 def GetBackgroundStyle(*args
, **kwargs
):
7321 GetBackgroundStyle(self) -> int
7323 Returns the background style of the window.
7325 :see: `SetBackgroundStyle`
7327 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
7329 def SetCursor(*args
, **kwargs
):
7331 SetCursor(self, Cursor cursor) -> bool
7333 Sets the window's cursor. Notice that the window cursor also sets it
7334 for the children of the window implicitly.
7336 The cursor may be wx.NullCursor in which case the window cursor will
7337 be reset back to default.
7339 return _core_
.Window_SetCursor(*args
, **kwargs
)
7341 def GetCursor(*args
, **kwargs
):
7343 GetCursor(self) -> Cursor
7345 Return the cursor associated with this window.
7347 return _core_
.Window_GetCursor(*args
, **kwargs
)
7349 def SetFont(*args
, **kwargs
):
7351 SetFont(self, Font font) -> bool
7353 Sets the font for this window.
7355 return _core_
.Window_SetFont(*args
, **kwargs
)
7357 def SetOwnFont(*args
, **kwargs
):
7358 """SetOwnFont(self, Font font)"""
7359 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
7361 def GetFont(*args
, **kwargs
):
7363 GetFont(self) -> Font
7365 Returns the default font used for this window.
7367 return _core_
.Window_GetFont(*args
, **kwargs
)
7369 def SetCaret(*args
, **kwargs
):
7371 SetCaret(self, Caret caret)
7373 Sets the caret associated with the window.
7375 return _core_
.Window_SetCaret(*args
, **kwargs
)
7377 def GetCaret(*args
, **kwargs
):
7379 GetCaret(self) -> Caret
7381 Returns the caret associated with the window.
7383 return _core_
.Window_GetCaret(*args
, **kwargs
)
7385 def GetCharHeight(*args
, **kwargs
):
7387 GetCharHeight(self) -> int
7389 Get the (average) character size for the current font.
7391 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
7393 def GetCharWidth(*args
, **kwargs
):
7395 GetCharWidth(self) -> int
7397 Get the (average) character size for the current font.
7399 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
7401 def GetTextExtent(*args
, **kwargs
):
7403 GetTextExtent(String string) -> (width, height)
7405 Get the width and height of the text using the current font.
7407 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
7409 def GetFullTextExtent(*args
, **kwargs
):
7411 GetFullTextExtent(String string, Font font=None) ->
7412 (width, height, descent, externalLeading)
7414 Get the width, height, decent and leading of the text using the
7415 current or specified font.
7417 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
7419 def ClientToScreenXY(*args
, **kwargs
):
7421 ClientToScreenXY(int x, int y) -> (x,y)
7423 Converts to screen coordinates from coordinates relative to this window.
7425 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
7427 def ScreenToClientXY(*args
, **kwargs
):
7429 ScreenToClientXY(int x, int y) -> (x,y)
7431 Converts from screen to client window coordinates.
7433 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
7435 def ClientToScreen(*args
, **kwargs
):
7437 ClientToScreen(self, Point pt) -> Point
7439 Converts to screen coordinates from coordinates relative to this window.
7441 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
7443 def ScreenToClient(*args
, **kwargs
):
7445 ScreenToClient(self, Point pt) -> Point
7447 Converts from screen to client window coordinates.
7449 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
7451 def HitTestXY(*args
, **kwargs
):
7453 HitTestXY(self, int x, int y) -> int
7455 Test where the given (in client coords) point lies
7457 return _core_
.Window_HitTestXY(*args
, **kwargs
)
7459 def HitTest(*args
, **kwargs
):
7461 HitTest(self, Point pt) -> int
7463 Test where the given (in client coords) point lies
7465 return _core_
.Window_HitTest(*args
, **kwargs
)
7467 def GetBorder(*args
):
7469 GetBorder(self, long flags) -> int
7470 GetBorder(self) -> int
7472 Get border for the flags of this window
7474 return _core_
.Window_GetBorder(*args
)
7476 def UpdateWindowUI(*args
, **kwargs
):
7478 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7480 This function sends EVT_UPDATE_UI events to the window. The particular
7481 implementation depends on the window; for example a wx.ToolBar will
7482 send an update UI event for each toolbar button, and a wx.Frame will
7483 send an update UI event for each menubar menu item. You can call this
7484 function from your application to ensure that your UI is up-to-date at
7485 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7486 concerned). This may be necessary if you have called
7487 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7488 limit the overhead that wxWindows incurs by sending update UI events
7491 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
7493 def PopupMenuXY(*args
, **kwargs
):
7495 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7497 Pops up the given menu at the specified coordinates, relative to this window,
7498 and returns control when the user has dismissed the menu. If a menu item is
7499 selected, the corresponding menu event is generated and will be processed as
7500 usual. If the default position is given then the current position of the
7501 mouse cursor will be used.
7503 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
7505 def PopupMenu(*args
, **kwargs
):
7507 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7509 Pops up the given menu at the specified coordinates, relative to this window,
7510 and returns control when the user has dismissed the menu. If a menu item is
7511 selected, the corresponding menu event is generated and will be processed as
7512 usual. If the default position is given then the current position of the
7513 mouse cursor will be used.
7515 return _core_
.Window_PopupMenu(*args
, **kwargs
)
7517 def GetHandle(*args
, **kwargs
):
7519 GetHandle(self) -> long
7521 Returns the platform-specific handle (as a long integer) of the
7522 physical window. Currently on wxMac it returns the handle of the
7523 toplevel parent of the window.
7525 return _core_
.Window_GetHandle(*args
, **kwargs
)
7527 def AssociateHandle(*args
, **kwargs
):
7529 AssociateHandle(self, long handle)
7531 Associate the window with a new native handle
7533 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
7535 def DissociateHandle(*args
, **kwargs
):
7537 DissociateHandle(self)
7539 Dissociate the current native handle from the window
7541 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
7543 def HasScrollbar(*args
, **kwargs
):
7545 HasScrollbar(self, int orient) -> bool
7547 Does the window have the scrollbar for this orientation?
7549 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
7551 def SetScrollbar(*args
, **kwargs
):
7553 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7556 Sets the scrollbar properties of a built-in scrollbar.
7558 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
7560 def SetScrollPos(*args
, **kwargs
):
7562 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7564 Sets the position of one of the built-in scrollbars.
7566 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
7568 def GetScrollPos(*args
, **kwargs
):
7570 GetScrollPos(self, int orientation) -> int
7572 Returns the built-in scrollbar position.
7574 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
7576 def GetScrollThumb(*args
, **kwargs
):
7578 GetScrollThumb(self, int orientation) -> int
7580 Returns the built-in scrollbar thumb size.
7582 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
7584 def GetScrollRange(*args
, **kwargs
):
7586 GetScrollRange(self, int orientation) -> int
7588 Returns the built-in scrollbar range.
7590 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
7592 def ScrollWindow(*args
, **kwargs
):
7594 ScrollWindow(self, int dx, int dy, Rect rect=None)
7596 Physically scrolls the pixels in the window and move child windows
7597 accordingly. Use this function to optimise your scrolling
7598 implementations, to minimise the area that must be redrawn. Note that
7599 it is rarely required to call this function from a user program.
7601 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
7603 def ScrollLines(*args
, **kwargs
):
7605 ScrollLines(self, int lines) -> bool
7607 If the platform and window class supports it, scrolls the window by
7608 the given number of lines down, if lines is positive, or up if lines
7609 is negative. Returns True if the window was scrolled, False if it was
7610 already on top/bottom and nothing was done.
7612 return _core_
.Window_ScrollLines(*args
, **kwargs
)
7614 def ScrollPages(*args
, **kwargs
):
7616 ScrollPages(self, int pages) -> bool
7618 If the platform and window class supports it, scrolls the window by
7619 the given number of pages down, if pages is positive, or up if pages
7620 is negative. Returns True if the window was scrolled, False if it was
7621 already on top/bottom and nothing was done.
7623 return _core_
.Window_ScrollPages(*args
, **kwargs
)
7625 def LineUp(*args
, **kwargs
):
7627 LineUp(self) -> bool
7629 This is just a wrapper for ScrollLines(-1).
7631 return _core_
.Window_LineUp(*args
, **kwargs
)
7633 def LineDown(*args
, **kwargs
):
7635 LineDown(self) -> bool
7637 This is just a wrapper for ScrollLines(1).
7639 return _core_
.Window_LineDown(*args
, **kwargs
)
7641 def PageUp(*args
, **kwargs
):
7643 PageUp(self) -> bool
7645 This is just a wrapper for ScrollPages(-1).
7647 return _core_
.Window_PageUp(*args
, **kwargs
)
7649 def PageDown(*args
, **kwargs
):
7651 PageDown(self) -> bool
7653 This is just a wrapper for ScrollPages(1).
7655 return _core_
.Window_PageDown(*args
, **kwargs
)
7657 def SetHelpText(*args
, **kwargs
):
7659 SetHelpText(self, String text)
7661 Sets the help text to be used as context-sensitive help for this
7662 window. Note that the text is actually stored by the current
7663 wxHelpProvider implementation, and not in the window object itself.
7665 return _core_
.Window_SetHelpText(*args
, **kwargs
)
7667 def SetHelpTextForId(*args
, **kwargs
):
7669 SetHelpTextForId(self, String text)
7671 Associate this help text with all windows with the same id as this
7674 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
7676 def GetHelpText(*args
, **kwargs
):
7678 GetHelpText(self) -> String
7680 Gets the help text to be used as context-sensitive help for this
7681 window. Note that the text is actually stored by the current
7682 wxHelpProvider implementation, and not in the window object itself.
7684 return _core_
.Window_GetHelpText(*args
, **kwargs
)
7686 def SetToolTipString(*args
, **kwargs
):
7688 SetToolTipString(self, String tip)
7690 Attach a tooltip to the window.
7692 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
7694 def SetToolTip(*args
, **kwargs
):
7696 SetToolTip(self, ToolTip tip)
7698 Attach a tooltip to the window.
7700 return _core_
.Window_SetToolTip(*args
, **kwargs
)
7702 def GetToolTip(*args
, **kwargs
):
7704 GetToolTip(self) -> ToolTip
7706 get the associated tooltip or None if none
7708 return _core_
.Window_GetToolTip(*args
, **kwargs
)
7710 def SetDropTarget(*args
, **kwargs
):
7712 SetDropTarget(self, DropTarget dropTarget)
7714 Associates a drop target with this window. If the window already has
7715 a drop target, it is deleted.
7717 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
7719 def GetDropTarget(*args
, **kwargs
):
7721 GetDropTarget(self) -> DropTarget
7723 Returns the associated drop target, which may be None.
7725 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
7727 def SetConstraints(*args
, **kwargs
):
7729 SetConstraints(self, LayoutConstraints constraints)
7731 Sets the window to have the given layout constraints. If an existing
7732 layout constraints object is already owned by the window, it will be
7733 deleted. Pass None to disassociate and delete the window's current
7736 You must call SetAutoLayout to tell a window to use the constraints
7737 automatically in its default EVT_SIZE handler; otherwise, you must
7738 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7739 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7742 return _core_
.Window_SetConstraints(*args
, **kwargs
)
7744 def GetConstraints(*args
, **kwargs
):
7746 GetConstraints(self) -> LayoutConstraints
7748 Returns a pointer to the window's layout constraints, or None if there
7751 return _core_
.Window_GetConstraints(*args
, **kwargs
)
7753 def SetAutoLayout(*args
, **kwargs
):
7755 SetAutoLayout(self, bool autoLayout)
7757 Determines whether the Layout function will be called automatically
7758 when the window is resized. It is called implicitly by SetSizer but
7759 if you use SetConstraints you should call it manually or otherwise the
7760 window layout won't be correctly updated when its size changes.
7762 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
7764 def GetAutoLayout(*args
, **kwargs
):
7766 GetAutoLayout(self) -> bool
7768 Returns the current autoLayout setting
7770 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
7772 def Layout(*args
, **kwargs
):
7774 Layout(self) -> bool
7776 Invokes the constraint-based layout algorithm or the sizer-based
7777 algorithm for this window. See SetAutoLayout: when auto layout is on,
7778 this function gets called automatically by the default EVT_SIZE
7779 handler when the window is resized.
7781 return _core_
.Window_Layout(*args
, **kwargs
)
7783 def SetSizer(*args
, **kwargs
):
7785 SetSizer(self, Sizer sizer, bool deleteOld=True)
7787 Sets the window to have the given layout sizer. The window will then
7788 own the object, and will take care of its deletion. If an existing
7789 layout sizer object is already owned by the window, it will be deleted
7790 if the deleteOld parameter is true. Note that this function will also
7791 call SetAutoLayout implicitly with a True parameter if the sizer is
7792 non-None, and False otherwise.
7794 return _core_
.Window_SetSizer(*args
, **kwargs
)
7796 def SetSizerAndFit(*args
, **kwargs
):
7798 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7800 The same as SetSizer, except it also sets the size hints for the
7801 window based on the sizer's minimum size.
7803 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
7805 def GetSizer(*args
, **kwargs
):
7807 GetSizer(self) -> Sizer
7809 Return the sizer associated with the window by a previous call to
7810 SetSizer or None if there isn't one.
7812 return _core_
.Window_GetSizer(*args
, **kwargs
)
7814 def SetContainingSizer(*args
, **kwargs
):
7816 SetContainingSizer(self, Sizer sizer)
7818 This normally does not need to be called by application code. It is
7819 called internally when a window is added to a sizer, and is used so
7820 the window can remove itself from the sizer when it is destroyed.
7822 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
7824 def GetContainingSizer(*args
, **kwargs
):
7826 GetContainingSizer(self) -> Sizer
7828 Return the sizer that this window is a member of, if any, otherwise None.
7830 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
7832 def InheritAttributes(*args
, **kwargs
):
7834 InheritAttributes(self)
7836 This function is (or should be, in case of custom controls) called
7837 during window creation to intelligently set up the window visual
7838 attributes, that is the font and the foreground and background
7841 By 'intelligently' the following is meant: by default, all windows use
7842 their own default attributes. However if some of the parent's
7843 attributes are explicitly changed (that is, using SetFont and not
7844 SetOwnFont) and if the corresponding attribute hadn't been
7845 explicitly set for this window itself, then this window takes the same
7846 value as used by the parent. In addition, if the window overrides
7847 ShouldInheritColours to return false, the colours will not be changed
7848 no matter what and only the font might.
7850 This rather complicated logic is necessary in order to accommodate the
7851 different usage scenarios. The most common one is when all default
7852 attributes are used and in this case, nothing should be inherited as
7853 in modern GUIs different controls use different fonts (and colours)
7854 than their siblings so they can't inherit the same value from the
7855 parent. However it was also deemed desirable to allow to simply change
7856 the attributes of all children at once by just changing the font or
7857 colour of their common parent, hence in this case we do inherit the
7861 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
7863 def ShouldInheritColours(*args
, **kwargs
):
7865 ShouldInheritColours(self) -> bool
7867 Return true from here to allow the colours of this window to be
7868 changed by InheritAttributes, returning false forbids inheriting them
7869 from the parent window.
7871 The base class version returns false, but this method is overridden in
7872 wxControl where it returns true.
7874 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
7876 def PostCreate(self
, pre
):
7878 Phase 3 of the 2-phase create <wink!>
7879 Call this method after precreating the window with the 2-phase create method.
7881 self
.this
= pre
.this
7882 self
.thisown
= pre
.thisown
7884 if hasattr(self
, '_setOORInfo'):
7885 self
._setOORInfo
(self
)
7886 if hasattr(self
, '_setCallbackInfo'):
7887 self
._setCallbackInfo
(self
, self
.__class
__)
7890 class WindowPtr(Window
):
7891 def __init__(self
, this
):
7893 if not hasattr(self
,"thisown"): self
.thisown
= 0
7894 self
.__class
__ = Window
7895 _core_
.Window_swigregister(WindowPtr
)
7897 def PreWindow(*args
, **kwargs
):
7899 PreWindow() -> Window
7901 Precreate a Window for 2-phase creation.
7903 val
= _core_
.new_PreWindow(*args
, **kwargs
)
7907 def Window_NewControlId(*args
, **kwargs
):
7909 Window_NewControlId() -> int
7911 Generate a control id for the controls which were not given one.
7913 return _core_
.Window_NewControlId(*args
, **kwargs
)
7915 def Window_NextControlId(*args
, **kwargs
):
7917 Window_NextControlId(int winid) -> int
7919 Get the id of the control following the one with the given
7922 return _core_
.Window_NextControlId(*args
, **kwargs
)
7924 def Window_PrevControlId(*args
, **kwargs
):
7926 Window_PrevControlId(int winid) -> int
7928 Get the id of the control preceding the one with the given
7931 return _core_
.Window_PrevControlId(*args
, **kwargs
)
7933 def Window_FindFocus(*args
, **kwargs
):
7935 Window_FindFocus() -> Window
7937 Returns the window or control that currently has the keyboard focus,
7940 return _core_
.Window_FindFocus(*args
, **kwargs
)
7942 def Window_GetCapture(*args
, **kwargs
):
7944 Window_GetCapture() -> Window
7946 Returns the window which currently captures the mouse or None
7948 return _core_
.Window_GetCapture(*args
, **kwargs
)
7950 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
7952 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7954 Get the default attributes for this class. This is useful if you want
7955 to use the same font or colour in your own control as in a standard
7956 control -- which is a much better idea than hard coding specific
7957 colours or fonts which might look completely out of place on the
7958 user's system, especially if it uses themes.
7960 The variant parameter is only relevant under Mac currently and is
7961 ignore under other platforms. Under Mac, it will change the size of
7962 the returned font. See `wx.Window.SetWindowVariant` for more about
7965 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7967 def DLG_PNT(win
, point_or_x
, y
=None):
7969 Convenience function for converting a Point or (x,y) in
7970 dialog units to pixel units.
7973 return win
.ConvertDialogPointToPixels(point_or_x
)
7975 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
7977 def DLG_SZE(win
, size_width
, height
=None):
7979 Convenience function for converting a Size or (w,h) in
7980 dialog units to pixel units.
7983 return win
.ConvertDialogSizeToPixels(size_width
)
7985 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
7988 def FindWindowById(*args
, **kwargs
):
7990 FindWindowById(long id, Window parent=None) -> Window
7992 Find the first window in the application with the given id. If parent
7993 is None, the search will start from all top-level frames and dialog
7994 boxes; if non-None, the search will be limited to the given window
7995 hierarchy. The search is recursive in both cases.
7997 return _core_
.FindWindowById(*args
, **kwargs
)
7999 def FindWindowByName(*args
, **kwargs
):
8001 FindWindowByName(String name, Window parent=None) -> Window
8003 Find a window by its name (as given in a window constructor or Create
8004 function call). If parent is None, the search will start from all
8005 top-level frames and dialog boxes; if non-None, the search will be
8006 limited to the given window hierarchy. The search is recursive in both
8009 If no window with such name is found, wx.FindWindowByLabel is called.
8011 return _core_
.FindWindowByName(*args
, **kwargs
)
8013 def FindWindowByLabel(*args
, **kwargs
):
8015 FindWindowByLabel(String label, Window parent=None) -> Window
8017 Find a window by its label. Depending on the type of window, the label
8018 may be a window title or panel item label. If parent is None, the
8019 search will start from all top-level frames and dialog boxes; if
8020 non-None, the search will be limited to the given window
8021 hierarchy. The search is recursive in both cases.
8023 return _core_
.FindWindowByLabel(*args
, **kwargs
)
8025 def Window_FromHWND(*args
, **kwargs
):
8026 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8027 return _core_
.Window_FromHWND(*args
, **kwargs
)
8028 #---------------------------------------------------------------------------
8030 class Validator(EvtHandler
):
8031 """Proxy of C++ Validator class"""
8033 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8034 def __init__(self
, *args
, **kwargs
):
8035 """__init__(self) -> Validator"""
8036 newobj
= _core_
.new_Validator(*args
, **kwargs
)
8037 self
.this
= newobj
.this
8040 self
._setOORInfo
(self
)
8042 def Clone(*args
, **kwargs
):
8043 """Clone(self) -> Validator"""
8044 return _core_
.Validator_Clone(*args
, **kwargs
)
8046 def Validate(*args
, **kwargs
):
8047 """Validate(self, Window parent) -> bool"""
8048 return _core_
.Validator_Validate(*args
, **kwargs
)
8050 def TransferToWindow(*args
, **kwargs
):
8051 """TransferToWindow(self) -> bool"""
8052 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
8054 def TransferFromWindow(*args
, **kwargs
):
8055 """TransferFromWindow(self) -> bool"""
8056 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
8058 def GetWindow(*args
, **kwargs
):
8059 """GetWindow(self) -> Window"""
8060 return _core_
.Validator_GetWindow(*args
, **kwargs
)
8062 def SetWindow(*args
, **kwargs
):
8063 """SetWindow(self, Window window)"""
8064 return _core_
.Validator_SetWindow(*args
, **kwargs
)
8066 def IsSilent(*args
, **kwargs
):
8067 """IsSilent() -> bool"""
8068 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8070 IsSilent
= staticmethod(IsSilent
)
8071 def SetBellOnError(*args
, **kwargs
):
8072 """SetBellOnError(int doIt=True)"""
8073 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8075 SetBellOnError
= staticmethod(SetBellOnError
)
8077 class ValidatorPtr(Validator
):
8078 def __init__(self
, this
):
8080 if not hasattr(self
,"thisown"): self
.thisown
= 0
8081 self
.__class
__ = Validator
8082 _core_
.Validator_swigregister(ValidatorPtr
)
8084 def Validator_IsSilent(*args
, **kwargs
):
8085 """Validator_IsSilent() -> bool"""
8086 return _core_
.Validator_IsSilent(*args
, **kwargs
)
8088 def Validator_SetBellOnError(*args
, **kwargs
):
8089 """Validator_SetBellOnError(int doIt=True)"""
8090 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
8092 class PyValidator(Validator
):
8093 """Proxy of C++ PyValidator class"""
8095 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8096 def __init__(self
, *args
, **kwargs
):
8097 """__init__(self) -> PyValidator"""
8098 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
8099 self
.this
= newobj
.this
8103 self
._setCallbackInfo
(self
, PyValidator
, 1)
8104 self
._setOORInfo
(self
)
8106 def _setCallbackInfo(*args
, **kwargs
):
8107 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8108 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
8111 class PyValidatorPtr(PyValidator
):
8112 def __init__(self
, this
):
8114 if not hasattr(self
,"thisown"): self
.thisown
= 0
8115 self
.__class
__ = PyValidator
8116 _core_
.PyValidator_swigregister(PyValidatorPtr
)
8118 #---------------------------------------------------------------------------
8120 class Menu(EvtHandler
):
8121 """Proxy of C++ Menu class"""
8123 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8124 def __init__(self
, *args
, **kwargs
):
8125 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8126 newobj
= _core_
.new_Menu(*args
, **kwargs
)
8127 self
.this
= newobj
.this
8130 self
._setOORInfo
(self
)
8132 def Append(*args
, **kwargs
):
8133 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8134 return _core_
.Menu_Append(*args
, **kwargs
)
8136 def AppendSeparator(*args
, **kwargs
):
8137 """AppendSeparator(self) -> MenuItem"""
8138 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
8140 def AppendCheckItem(*args
, **kwargs
):
8141 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8142 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
8144 def AppendRadioItem(*args
, **kwargs
):
8145 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8146 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
8148 def AppendMenu(*args
, **kwargs
):
8149 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8150 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
8152 def AppendItem(*args
, **kwargs
):
8153 """AppendItem(self, MenuItem item) -> MenuItem"""
8154 return _core_
.Menu_AppendItem(*args
, **kwargs
)
8156 def Break(*args
, **kwargs
):
8158 return _core_
.Menu_Break(*args
, **kwargs
)
8160 def InsertItem(*args
, **kwargs
):
8161 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8162 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8164 def Insert(*args
, **kwargs
):
8166 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8167 int kind=ITEM_NORMAL) -> MenuItem
8169 return _core_
.Menu_Insert(*args
, **kwargs
)
8171 def InsertSeparator(*args
, **kwargs
):
8172 """InsertSeparator(self, size_t pos) -> MenuItem"""
8173 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8175 def InsertCheckItem(*args
, **kwargs
):
8176 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8177 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8179 def InsertRadioItem(*args
, **kwargs
):
8180 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8181 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8183 def InsertMenu(*args
, **kwargs
):
8184 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8185 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8187 def PrependItem(*args
, **kwargs
):
8188 """PrependItem(self, MenuItem item) -> MenuItem"""
8189 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8191 def Prepend(*args
, **kwargs
):
8192 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8193 return _core_
.Menu_Prepend(*args
, **kwargs
)
8195 def PrependSeparator(*args
, **kwargs
):
8196 """PrependSeparator(self) -> MenuItem"""
8197 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8199 def PrependCheckItem(*args
, **kwargs
):
8200 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8201 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8203 def PrependRadioItem(*args
, **kwargs
):
8204 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8205 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8207 def PrependMenu(*args
, **kwargs
):
8208 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8209 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8211 def Remove(*args
, **kwargs
):
8212 """Remove(self, int id) -> MenuItem"""
8213 return _core_
.Menu_Remove(*args
, **kwargs
)
8215 def RemoveItem(*args
, **kwargs
):
8216 """RemoveItem(self, MenuItem item) -> MenuItem"""
8217 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8219 def Delete(*args
, **kwargs
):
8220 """Delete(self, int id) -> bool"""
8221 return _core_
.Menu_Delete(*args
, **kwargs
)
8223 def DeleteItem(*args
, **kwargs
):
8224 """DeleteItem(self, MenuItem item) -> bool"""
8225 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8227 def Destroy(*args
, **kwargs
):
8231 Deletes the C++ object this Python object is a proxy for.
8233 return _core_
.Menu_Destroy(*args
, **kwargs
)
8235 def DestroyId(*args
, **kwargs
):
8237 DestroyId(self, int id) -> bool
8239 Deletes the C++ object this Python object is a proxy for.
8241 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8243 def DestroyItem(*args
, **kwargs
):
8245 DestroyItem(self, MenuItem item) -> bool
8247 Deletes the C++ object this Python object is a proxy for.
8249 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8251 def GetMenuItemCount(*args
, **kwargs
):
8252 """GetMenuItemCount(self) -> size_t"""
8253 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8255 def GetMenuItems(*args
, **kwargs
):
8256 """GetMenuItems(self) -> PyObject"""
8257 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8259 def FindItem(*args
, **kwargs
):
8260 """FindItem(self, String item) -> int"""
8261 return _core_
.Menu_FindItem(*args
, **kwargs
)
8263 def FindItemById(*args
, **kwargs
):
8264 """FindItemById(self, int id) -> MenuItem"""
8265 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8267 def FindItemByPosition(*args
, **kwargs
):
8268 """FindItemByPosition(self, size_t position) -> MenuItem"""
8269 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
8271 def Enable(*args
, **kwargs
):
8272 """Enable(self, int id, bool enable)"""
8273 return _core_
.Menu_Enable(*args
, **kwargs
)
8275 def IsEnabled(*args
, **kwargs
):
8276 """IsEnabled(self, int id) -> bool"""
8277 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
8279 def Check(*args
, **kwargs
):
8280 """Check(self, int id, bool check)"""
8281 return _core_
.Menu_Check(*args
, **kwargs
)
8283 def IsChecked(*args
, **kwargs
):
8284 """IsChecked(self, int id) -> bool"""
8285 return _core_
.Menu_IsChecked(*args
, **kwargs
)
8287 def SetLabel(*args
, **kwargs
):
8288 """SetLabel(self, int id, String label)"""
8289 return _core_
.Menu_SetLabel(*args
, **kwargs
)
8291 def GetLabel(*args
, **kwargs
):
8292 """GetLabel(self, int id) -> String"""
8293 return _core_
.Menu_GetLabel(*args
, **kwargs
)
8295 def SetHelpString(*args
, **kwargs
):
8296 """SetHelpString(self, int id, String helpString)"""
8297 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
8299 def GetHelpString(*args
, **kwargs
):
8300 """GetHelpString(self, int id) -> String"""
8301 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
8303 def SetTitle(*args
, **kwargs
):
8304 """SetTitle(self, String title)"""
8305 return _core_
.Menu_SetTitle(*args
, **kwargs
)
8307 def GetTitle(*args
, **kwargs
):
8308 """GetTitle(self) -> String"""
8309 return _core_
.Menu_GetTitle(*args
, **kwargs
)
8311 def SetEventHandler(*args
, **kwargs
):
8312 """SetEventHandler(self, EvtHandler handler)"""
8313 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
8315 def GetEventHandler(*args
, **kwargs
):
8316 """GetEventHandler(self) -> EvtHandler"""
8317 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
8319 def SetInvokingWindow(*args
, **kwargs
):
8320 """SetInvokingWindow(self, Window win)"""
8321 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
8323 def GetInvokingWindow(*args
, **kwargs
):
8324 """GetInvokingWindow(self) -> Window"""
8325 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
8327 def GetStyle(*args
, **kwargs
):
8328 """GetStyle(self) -> long"""
8329 return _core_
.Menu_GetStyle(*args
, **kwargs
)
8331 def UpdateUI(*args
, **kwargs
):
8332 """UpdateUI(self, EvtHandler source=None)"""
8333 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
8335 def GetMenuBar(*args
, **kwargs
):
8336 """GetMenuBar(self) -> MenuBar"""
8337 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
8339 def Attach(*args
, **kwargs
):
8340 """Attach(self, wxMenuBarBase menubar)"""
8341 return _core_
.Menu_Attach(*args
, **kwargs
)
8343 def Detach(*args
, **kwargs
):
8345 return _core_
.Menu_Detach(*args
, **kwargs
)
8347 def IsAttached(*args
, **kwargs
):
8348 """IsAttached(self) -> bool"""
8349 return _core_
.Menu_IsAttached(*args
, **kwargs
)
8351 def SetParent(*args
, **kwargs
):
8352 """SetParent(self, Menu parent)"""
8353 return _core_
.Menu_SetParent(*args
, **kwargs
)
8355 def GetParent(*args
, **kwargs
):
8356 """GetParent(self) -> Menu"""
8357 return _core_
.Menu_GetParent(*args
, **kwargs
)
8360 class MenuPtr(Menu
):
8361 def __init__(self
, this
):
8363 if not hasattr(self
,"thisown"): self
.thisown
= 0
8364 self
.__class
__ = Menu
8365 _core_
.Menu_swigregister(MenuPtr
)
8366 DefaultValidator
= cvar
.DefaultValidator
8368 #---------------------------------------------------------------------------
8370 class MenuBar(Window
):
8371 """Proxy of C++ MenuBar class"""
8373 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8374 def __init__(self
, *args
, **kwargs
):
8375 """__init__(self, long style=0) -> MenuBar"""
8376 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
8377 self
.this
= newobj
.this
8380 self
._setOORInfo
(self
)
8382 def Append(*args
, **kwargs
):
8383 """Append(self, Menu menu, String title) -> bool"""
8384 return _core_
.MenuBar_Append(*args
, **kwargs
)
8386 def Insert(*args
, **kwargs
):
8387 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8388 return _core_
.MenuBar_Insert(*args
, **kwargs
)
8390 def GetMenuCount(*args
, **kwargs
):
8391 """GetMenuCount(self) -> size_t"""
8392 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
8394 def GetMenu(*args
, **kwargs
):
8395 """GetMenu(self, size_t pos) -> Menu"""
8396 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
8398 def Replace(*args
, **kwargs
):
8399 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8400 return _core_
.MenuBar_Replace(*args
, **kwargs
)
8402 def Remove(*args
, **kwargs
):
8403 """Remove(self, size_t pos) -> Menu"""
8404 return _core_
.MenuBar_Remove(*args
, **kwargs
)
8406 def EnableTop(*args
, **kwargs
):
8407 """EnableTop(self, size_t pos, bool enable)"""
8408 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
8410 def IsEnabledTop(*args
, **kwargs
):
8411 """IsEnabledTop(self, size_t pos) -> bool"""
8412 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
8414 def SetLabelTop(*args
, **kwargs
):
8415 """SetLabelTop(self, size_t pos, String label)"""
8416 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
8418 def GetLabelTop(*args
, **kwargs
):
8419 """GetLabelTop(self, size_t pos) -> String"""
8420 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
8422 def FindMenuItem(*args
, **kwargs
):
8423 """FindMenuItem(self, String menu, String item) -> int"""
8424 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
8426 def FindItemById(*args
, **kwargs
):
8427 """FindItemById(self, int id) -> MenuItem"""
8428 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
8430 def FindMenu(*args
, **kwargs
):
8431 """FindMenu(self, String title) -> int"""
8432 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
8434 def Enable(*args
, **kwargs
):
8435 """Enable(self, int id, bool enable)"""
8436 return _core_
.MenuBar_Enable(*args
, **kwargs
)
8438 def Check(*args
, **kwargs
):
8439 """Check(self, int id, bool check)"""
8440 return _core_
.MenuBar_Check(*args
, **kwargs
)
8442 def IsChecked(*args
, **kwargs
):
8443 """IsChecked(self, int id) -> bool"""
8444 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
8446 def IsEnabled(*args
, **kwargs
):
8447 """IsEnabled(self, int id) -> bool"""
8448 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
8450 def SetLabel(*args
, **kwargs
):
8451 """SetLabel(self, int id, String label)"""
8452 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
8454 def GetLabel(*args
, **kwargs
):
8455 """GetLabel(self, int id) -> String"""
8456 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
8458 def SetHelpString(*args
, **kwargs
):
8459 """SetHelpString(self, int id, String helpString)"""
8460 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
8462 def GetHelpString(*args
, **kwargs
):
8463 """GetHelpString(self, int id) -> String"""
8464 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
8466 def GetFrame(*args
, **kwargs
):
8467 """GetFrame(self) -> wxFrame"""
8468 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
8470 def IsAttached(*args
, **kwargs
):
8471 """IsAttached(self) -> bool"""
8472 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
8474 def Attach(*args
, **kwargs
):
8475 """Attach(self, wxFrame frame)"""
8476 return _core_
.MenuBar_Attach(*args
, **kwargs
)
8478 def Detach(*args
, **kwargs
):
8480 return _core_
.MenuBar_Detach(*args
, **kwargs
)
8483 class MenuBarPtr(MenuBar
):
8484 def __init__(self
, this
):
8486 if not hasattr(self
,"thisown"): self
.thisown
= 0
8487 self
.__class
__ = MenuBar
8488 _core_
.MenuBar_swigregister(MenuBarPtr
)
8490 #---------------------------------------------------------------------------
8492 class MenuItem(Object
):
8493 """Proxy of C++ MenuItem class"""
8495 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8496 def __init__(self
, *args
, **kwargs
):
8498 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8499 String help=EmptyString, int kind=ITEM_NORMAL,
8500 Menu subMenu=None) -> MenuItem
8502 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
8503 self
.this
= newobj
.this
8506 def GetMenu(*args
, **kwargs
):
8507 """GetMenu(self) -> Menu"""
8508 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
8510 def SetMenu(*args
, **kwargs
):
8511 """SetMenu(self, Menu menu)"""
8512 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
8514 def SetId(*args
, **kwargs
):
8515 """SetId(self, int id)"""
8516 return _core_
.MenuItem_SetId(*args
, **kwargs
)
8518 def GetId(*args
, **kwargs
):
8519 """GetId(self) -> int"""
8520 return _core_
.MenuItem_GetId(*args
, **kwargs
)
8522 def IsSeparator(*args
, **kwargs
):
8523 """IsSeparator(self) -> bool"""
8524 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
8526 def SetText(*args
, **kwargs
):
8527 """SetText(self, String str)"""
8528 return _core_
.MenuItem_SetText(*args
, **kwargs
)
8530 def GetLabel(*args
, **kwargs
):
8531 """GetLabel(self) -> String"""
8532 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
8534 def GetText(*args
, **kwargs
):
8535 """GetText(self) -> String"""
8536 return _core_
.MenuItem_GetText(*args
, **kwargs
)
8538 def GetLabelFromText(*args
, **kwargs
):
8539 """GetLabelFromText(String text) -> String"""
8540 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8542 GetLabelFromText
= staticmethod(GetLabelFromText
)
8543 def GetKind(*args
, **kwargs
):
8544 """GetKind(self) -> int"""
8545 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
8547 def SetKind(*args
, **kwargs
):
8548 """SetKind(self, int kind)"""
8549 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
8551 def SetCheckable(*args
, **kwargs
):
8552 """SetCheckable(self, bool checkable)"""
8553 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
8555 def IsCheckable(*args
, **kwargs
):
8556 """IsCheckable(self) -> bool"""
8557 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
8559 def IsSubMenu(*args
, **kwargs
):
8560 """IsSubMenu(self) -> bool"""
8561 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
8563 def SetSubMenu(*args
, **kwargs
):
8564 """SetSubMenu(self, Menu menu)"""
8565 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
8567 def GetSubMenu(*args
, **kwargs
):
8568 """GetSubMenu(self) -> Menu"""
8569 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
8571 def Enable(*args
, **kwargs
):
8572 """Enable(self, bool enable=True)"""
8573 return _core_
.MenuItem_Enable(*args
, **kwargs
)
8575 def IsEnabled(*args
, **kwargs
):
8576 """IsEnabled(self) -> bool"""
8577 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
8579 def Check(*args
, **kwargs
):
8580 """Check(self, bool check=True)"""
8581 return _core_
.MenuItem_Check(*args
, **kwargs
)
8583 def IsChecked(*args
, **kwargs
):
8584 """IsChecked(self) -> bool"""
8585 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
8587 def Toggle(*args
, **kwargs
):
8589 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
8591 def SetHelp(*args
, **kwargs
):
8592 """SetHelp(self, String str)"""
8593 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
8595 def GetHelp(*args
, **kwargs
):
8596 """GetHelp(self) -> String"""
8597 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
8599 def GetAccel(*args
, **kwargs
):
8600 """GetAccel(self) -> AcceleratorEntry"""
8601 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
8603 def SetAccel(*args
, **kwargs
):
8604 """SetAccel(self, AcceleratorEntry accel)"""
8605 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
8607 def GetDefaultMarginWidth(*args
, **kwargs
):
8608 """GetDefaultMarginWidth() -> int"""
8609 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8611 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
8612 def SetBitmap(*args
, **kwargs
):
8613 """SetBitmap(self, Bitmap bitmap)"""
8614 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
8616 def GetBitmap(*args
, **kwargs
):
8617 """GetBitmap(self) -> Bitmap"""
8618 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
8621 class MenuItemPtr(MenuItem
):
8622 def __init__(self
, this
):
8624 if not hasattr(self
,"thisown"): self
.thisown
= 0
8625 self
.__class
__ = MenuItem
8626 _core_
.MenuItem_swigregister(MenuItemPtr
)
8628 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8629 """MenuItem_GetLabelFromText(String text) -> String"""
8630 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8632 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8633 """MenuItem_GetDefaultMarginWidth() -> int"""
8634 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8636 #---------------------------------------------------------------------------
8638 class Control(Window
):
8640 This is the base class for a control or 'widget'.
8642 A control is generally a small window which processes user input
8643 and/or displays one or more item of data.
8646 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8647 def __init__(self
, *args
, **kwargs
):
8649 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8650 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8651 String name=ControlNameStr) -> Control
8653 Create a Control. Normally you should only call this from a subclass'
8654 __init__ as a plain old wx.Control is not very useful.
8656 newobj
= _core_
.new_Control(*args
, **kwargs
)
8657 self
.this
= newobj
.this
8660 self
._setOORInfo
(self
)
8662 def Create(*args
, **kwargs
):
8664 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8665 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8666 String name=ControlNameStr) -> bool
8668 Do the 2nd phase and create the GUI control.
8670 return _core_
.Control_Create(*args
, **kwargs
)
8672 def Command(*args
, **kwargs
):
8674 Command(self, CommandEvent event)
8676 Simulates the effect of the user issuing a command to the item.
8678 :see: `wx.CommandEvent`
8681 return _core_
.Control_Command(*args
, **kwargs
)
8683 def GetLabel(*args
, **kwargs
):
8685 GetLabel(self) -> String
8687 Return a control's text.
8689 return _core_
.Control_GetLabel(*args
, **kwargs
)
8691 def SetLabel(*args
, **kwargs
):
8693 SetLabel(self, String label)
8695 Sets the item's text.
8697 return _core_
.Control_SetLabel(*args
, **kwargs
)
8699 def GetClassDefaultAttributes(*args
, **kwargs
):
8701 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8703 Get the default attributes for this class. This is useful if you want
8704 to use the same font or colour in your own control as in a standard
8705 control -- which is a much better idea than hard coding specific
8706 colours or fonts which might look completely out of place on the
8707 user's system, especially if it uses themes.
8709 The variant parameter is only relevant under Mac currently and is
8710 ignore under other platforms. Under Mac, it will change the size of
8711 the returned font. See `wx.Window.SetWindowVariant` for more about
8714 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8716 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
8718 class ControlPtr(Control
):
8719 def __init__(self
, this
):
8721 if not hasattr(self
,"thisown"): self
.thisown
= 0
8722 self
.__class
__ = Control
8723 _core_
.Control_swigregister(ControlPtr
)
8724 ControlNameStr
= cvar
.ControlNameStr
8726 def PreControl(*args
, **kwargs
):
8728 PreControl() -> Control
8730 Precreate a Control control for 2-phase creation
8732 val
= _core_
.new_PreControl(*args
, **kwargs
)
8736 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
8738 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8740 Get the default attributes for this class. This is useful if you want
8741 to use the same font or colour in your own control as in a standard
8742 control -- which is a much better idea than hard coding specific
8743 colours or fonts which might look completely out of place on the
8744 user's system, especially if it uses themes.
8746 The variant parameter is only relevant under Mac currently and is
8747 ignore under other platforms. Under Mac, it will change the size of
8748 the returned font. See `wx.Window.SetWindowVariant` for more about
8751 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8753 #---------------------------------------------------------------------------
8755 class ItemContainer(object):
8757 wx.ItemContainer defines an interface which is implemented by all
8758 controls which have string subitems, each of which may be selected,
8759 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8760 `wx.ComboBox` which implements an extended interface deriving from
8763 It defines the methods for accessing the control's items and although
8764 each of the derived classes implements them differently, they still
8765 all conform to the same interface.
8767 The items in a wx.ItemContainer have (non empty) string labels and,
8768 optionally, client data associated with them.
8771 def __init__(self
): raise RuntimeError, "No constructor defined"
8773 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8774 def Append(*args
, **kwargs
):
8776 Append(self, String item, PyObject clientData=None) -> int
8778 Adds the item to the control, associating the given data with the item
8779 if not None. The return value is the index of the newly added item
8780 which may be different from the last one if the control is sorted (e.g.
8781 has wx.LB_SORT or wx.CB_SORT style).
8783 return _core_
.ItemContainer_Append(*args
, **kwargs
)
8785 def AppendItems(*args
, **kwargs
):
8787 AppendItems(self, List strings)
8789 Apend several items at once to the control. Notice that calling this
8790 method may be much faster than appending the items one by one if you
8791 need to add a lot of items.
8793 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
8795 def Insert(*args
, **kwargs
):
8797 Insert(self, String item, int pos, PyObject clientData=None) -> int
8799 Insert an item into the control before the item at the ``pos`` index,
8800 optionally associating some data object with the item.
8802 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
8804 def Clear(*args
, **kwargs
):
8808 Removes all items from the control.
8810 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
8812 def Delete(*args
, **kwargs
):
8816 Deletes the item at the zero-based index 'n' from the control. Note
8817 that it is an error (signalled by a `wx.PyAssertionError` exception if
8818 enabled) to remove an item with the index negative or greater or equal
8819 than the number of items in the control.
8821 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
8823 def GetCount(*args
, **kwargs
):
8825 GetCount(self) -> int
8827 Returns the number of items in the control.
8829 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
8831 def IsEmpty(*args
, **kwargs
):
8833 IsEmpty(self) -> bool
8835 Returns True if the control is empty or False if it has some items.
8837 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
8839 def GetString(*args
, **kwargs
):
8841 GetString(self, int n) -> String
8843 Returns the label of the item with the given index.
8845 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
8847 def GetStrings(*args
, **kwargs
):
8848 """GetStrings(self) -> wxArrayString"""
8849 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
8851 def SetString(*args
, **kwargs
):
8853 SetString(self, int n, String s)
8855 Sets the label for the given item.
8857 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
8859 def FindString(*args
, **kwargs
):
8861 FindString(self, String s) -> int
8863 Finds an item whose label matches the given string. Returns the
8864 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8867 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
8869 def Select(*args
, **kwargs
):
8873 Sets the item at index 'n' to be the selected item.
8875 return _core_
.ItemContainer_Select(*args
, **kwargs
)
8877 SetSelection
= Select
8878 def GetSelection(*args
, **kwargs
):
8880 GetSelection(self) -> int
8882 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8885 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
8887 def GetStringSelection(*args
, **kwargs
):
8889 GetStringSelection(self) -> String
8891 Returns the label of the selected item or an empty string if no item
8894 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
8896 def GetClientData(*args
, **kwargs
):
8898 GetClientData(self, int n) -> PyObject
8900 Returns the client data associated with the given item, (if any.)
8902 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
8904 def SetClientData(*args
, **kwargs
):
8906 SetClientData(self, int n, PyObject clientData)
8908 Associate the given client data with the item at position n.
8910 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
8913 class ItemContainerPtr(ItemContainer
):
8914 def __init__(self
, this
):
8916 if not hasattr(self
,"thisown"): self
.thisown
= 0
8917 self
.__class
__ = ItemContainer
8918 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
8920 #---------------------------------------------------------------------------
8922 class ControlWithItems(Control
,ItemContainer
):
8924 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8925 wx.Control class, and is used for the base class of various controls
8928 def __init__(self
): raise RuntimeError, "No constructor defined"
8930 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8932 class ControlWithItemsPtr(ControlWithItems
):
8933 def __init__(self
, this
):
8935 if not hasattr(self
,"thisown"): self
.thisown
= 0
8936 self
.__class
__ = ControlWithItems
8937 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
8939 #---------------------------------------------------------------------------
8941 class SizerItem(Object
):
8943 The wx.SizerItem class is used to track the position, size and other
8944 attributes of each item managed by a `wx.Sizer`. In normal usage user
8945 code should never need to deal directly with a wx.SizerItem, but
8946 custom classes derived from `wx.PySizer` will probably need to use the
8947 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8949 :see: `wx.Sizer`, `wx.GBSizerItem`
8952 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8953 def __init__(self
, *args
, **kwargs
):
8955 __init__(self) -> SizerItem
8957 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8958 size will need to be set before this item can be used in a Sizer.
8960 You will probably never need to create a wx.SizerItem directly as they
8961 are created automatically when the sizer's Add, Insert or Prepend
8964 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8966 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
8967 self
.this
= newobj
.this
8970 def DeleteWindows(*args
, **kwargs
):
8974 Destroy the window or the windows in a subsizer, depending on the type
8977 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
8979 def DetachSizer(*args
, **kwargs
):
8983 Enable deleting the SizerItem without destroying the contained sizer.
8985 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
8987 def GetSize(*args
, **kwargs
):
8989 GetSize(self) -> Size
8991 Get the current size of the item, as set in the last Layout.
8993 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
8995 def CalcMin(*args
, **kwargs
):
8997 CalcMin(self) -> Size
8999 Calculates the minimum desired size for the item, including any space
9002 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
9004 def SetDimension(*args
, **kwargs
):
9006 SetDimension(self, Point pos, Size size)
9008 Set the position and size of the space allocated for this item by the
9009 sizer, and adjust the position and size of the item (window or
9010 subsizer) to be within that space taking alignment and borders into
9013 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
9015 def GetMinSize(*args
, **kwargs
):
9017 GetMinSize(self) -> Size
9019 Get the minimum size needed for the item.
9021 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
9023 def GetMinSizeWithBorder(*args
, **kwargs
):
9025 GetMinSizeWithBorder(self) -> Size
9027 Get the minimum size needed for the item with space for the borders
9030 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
9032 def SetInitSize(*args
, **kwargs
):
9033 """SetInitSize(self, int x, int y)"""
9034 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
9036 def SetRatioWH(*args
, **kwargs
):
9038 SetRatioWH(self, int width, int height)
9040 Set the ratio item attribute.
9042 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
9044 def SetRatioSize(*args
, **kwargs
):
9046 SetRatioSize(self, Size size)
9048 Set the ratio item attribute.
9050 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
9052 def SetRatio(*args
, **kwargs
):
9054 SetRatio(self, float ratio)
9056 Set the ratio item attribute.
9058 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
9060 def GetRatio(*args
, **kwargs
):
9062 GetRatio(self) -> float
9064 Set the ratio item attribute.
9066 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
9068 def GetRect(*args
, **kwargs
):
9070 GetRect(self) -> Rect
9072 Returns the rectangle that the sizer item should occupy
9074 return _core_
.SizerItem_GetRect(*args
, **kwargs
)
9076 def IsWindow(*args
, **kwargs
):
9078 IsWindow(self) -> bool
9080 Is this sizer item a window?
9082 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
9084 def IsSizer(*args
, **kwargs
):
9086 IsSizer(self) -> bool
9088 Is this sizer item a subsizer?
9090 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
9092 def IsSpacer(*args
, **kwargs
):
9094 IsSpacer(self) -> bool
9096 Is this sizer item a spacer?
9098 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
9100 def SetProportion(*args
, **kwargs
):
9102 SetProportion(self, int proportion)
9104 Set the proportion value for this item.
9106 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
9108 def GetProportion(*args
, **kwargs
):
9110 GetProportion(self) -> int
9112 Get the proportion value for this item.
9114 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
9116 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
9117 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
9118 def SetFlag(*args
, **kwargs
):
9120 SetFlag(self, int flag)
9122 Set the flag value for this item.
9124 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
9126 def GetFlag(*args
, **kwargs
):
9128 GetFlag(self) -> int
9130 Get the flag value for this item.
9132 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
9134 def SetBorder(*args
, **kwargs
):
9136 SetBorder(self, int border)
9138 Set the border value for this item.
9140 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
9142 def GetBorder(*args
, **kwargs
):
9144 GetBorder(self) -> int
9146 Get the border value for this item.
9148 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
9150 def GetWindow(*args
, **kwargs
):
9152 GetWindow(self) -> Window
9154 Get the window (if any) that is managed by this sizer item.
9156 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
9158 def SetWindow(*args
, **kwargs
):
9160 SetWindow(self, Window window)
9162 Set the window to be managed by this sizer item.
9164 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9166 def GetSizer(*args
, **kwargs
):
9168 GetSizer(self) -> Sizer
9170 Get the subsizer (if any) that is managed by this sizer item.
9172 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9174 def SetSizer(*args
, **kwargs
):
9176 SetSizer(self, Sizer sizer)
9178 Set the subsizer to be managed by this sizer item.
9180 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9182 def GetSpacer(*args
, **kwargs
):
9184 GetSpacer(self) -> Size
9186 Get the size of the spacer managed by this sizer item.
9188 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9190 def SetSpacer(*args
, **kwargs
):
9192 SetSpacer(self, Size size)
9194 Set the size of the spacer to be managed by this sizer item.
9196 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9198 def Show(*args
, **kwargs
):
9200 Show(self, bool show)
9202 Set the show item attribute, which sizers use to determine if the item
9203 is to be made part of the layout or not. If the item is tracking a
9204 window then it is shown or hidden as needed.
9206 return _core_
.SizerItem_Show(*args
, **kwargs
)
9208 def IsShown(*args
, **kwargs
):
9210 IsShown(self) -> bool
9212 Is the item to be shown in the layout?
9214 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
9216 def GetPosition(*args
, **kwargs
):
9218 GetPosition(self) -> Point
9220 Returns the current position of the item, as set in the last Layout.
9222 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
9224 def GetUserData(*args
, **kwargs
):
9226 GetUserData(self) -> PyObject
9228 Returns the userData associated with this sizer item, or None if there
9231 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
9234 class SizerItemPtr(SizerItem
):
9235 def __init__(self
, this
):
9237 if not hasattr(self
,"thisown"): self
.thisown
= 0
9238 self
.__class
__ = SizerItem
9239 _core_
.SizerItem_swigregister(SizerItemPtr
)
9241 def SizerItemWindow(*args
, **kwargs
):
9243 SizerItemWindow(Window window, int proportion, int flag, int border,
9244 PyObject userData=None) -> SizerItem
9246 Constructs a `wx.SizerItem` for tracking a window.
9248 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
9252 def SizerItemSpacer(*args
, **kwargs
):
9254 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9255 PyObject userData=None) -> SizerItem
9257 Constructs a `wx.SizerItem` for tracking a spacer.
9259 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
9263 def SizerItemSizer(*args
, **kwargs
):
9265 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9266 PyObject userData=None) -> SizerItem
9268 Constructs a `wx.SizerItem` for tracking a subsizer
9270 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
9274 class Sizer(Object
):
9276 wx.Sizer is the abstract base class used for laying out subwindows in
9277 a window. You cannot use wx.Sizer directly; instead, you will have to
9278 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9279 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9280 and `wx.GridBagSizer`.
9282 The concept implemented by sizers in wxWidgets is closely related to
9283 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9284 toolkit or the Qt toolkit. It is based upon the idea of the individual
9285 subwindows reporting their minimal required size and their ability to
9286 get stretched if the size of the parent window has changed. This will
9287 most often mean that the programmer does not set the original size of
9288 a dialog in the beginning, rather the dialog will assigned a sizer and
9289 this sizer will be queried about the recommended size. The sizer in
9290 turn will query its children, which can be normal windows or contorls,
9291 empty space or other sizers, so that a hierarchy of sizers can be
9292 constructed. Note that wxSizer does not derive from wxWindow and thus
9293 do not interfere with tab ordering and requires very little resources
9294 compared to a real window on screen.
9296 What makes sizers so well fitted for use in wxWidgets is the fact that
9297 every control reports its own minimal size and the algorithm can
9298 handle differences in font sizes or different window (dialog item)
9299 sizes on different platforms without problems. If for example the
9300 standard font as well as the overall design of Mac widgets requires
9301 more space than on Windows, then the initial size of a dialog using a
9302 sizer will automatically be bigger on Mac than on Windows.
9304 def __init__(self
): raise RuntimeError, "No constructor defined"
9306 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9307 def _setOORInfo(*args
, **kwargs
):
9308 """_setOORInfo(self, PyObject _self)"""
9309 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
9311 def Add(*args
, **kwargs
):
9313 Add(self, item, int proportion=0, int flag=0, int border=0,
9314 PyObject userData=None) -> wx.SizerItem
9316 Appends a child item to the sizer.
9318 return _core_
.Sizer_Add(*args
, **kwargs
)
9320 def Insert(*args
, **kwargs
):
9322 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9323 PyObject userData=None) -> wx.SizerItem
9325 Inserts a new item into the list of items managed by this sizer before
9326 the item at index *before*. See `Add` for a description of the parameters.
9328 return _core_
.Sizer_Insert(*args
, **kwargs
)
9330 def Prepend(*args
, **kwargs
):
9332 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9333 PyObject userData=None) -> wx.SizerItem
9335 Adds a new item to the begining of the list of sizer items managed by
9336 this sizer. See `Add` for a description of the parameters.
9338 return _core_
.Sizer_Prepend(*args
, **kwargs
)
9340 def Remove(*args
, **kwargs
):
9342 Remove(self, item) -> bool
9344 Removes an item from the sizer and destroys it. This method does not
9345 cause any layout or resizing to take place, call `Layout` to update
9346 the layout on screen after removing a child from the sizer. The
9347 *item* parameter can be either a window, a sizer, or the zero-based
9348 index of an item to remove. Returns True if the child item was found
9351 return _core_
.Sizer_Remove(*args
, **kwargs
)
9353 def Detach(*args
, **kwargs
):
9355 Detach(self, item) -> bool
9357 Detaches an item from the sizer without destroying it. This method
9358 does not cause any layout or resizing to take place, call `Layout` to
9359 do so. The *item* parameter can be either a window, a sizer, or the
9360 zero-based index of the item to be detached. Returns True if the child item
9361 was found and detached.
9363 return _core_
.Sizer_Detach(*args
, **kwargs
)
9365 def GetItem(*args
, **kwargs
):
9367 GetItem(self, item) -> wx.SizerItem
9369 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9370 parameter can be either a window, a sizer, or the zero-based index of
9371 the item to be detached.
9373 return _core_
.Sizer_GetItem(*args
, **kwargs
)
9375 def _SetItemMinSize(*args
, **kwargs
):
9376 """_SetItemMinSize(self, PyObject item, Size size)"""
9377 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
9379 def SetItemMinSize(self
, item
, *args
):
9381 SetItemMinSize(self, item, Size size)
9383 Sets the minimum size that will be allocated for an item in the sizer.
9384 The *item* parameter can be either a window, a sizer, or the
9385 zero-based index of the item. If a window or sizer is given then it
9386 will be searched for recursivly in subsizers if neccessary.
9389 # for backward compatibility accept separate width,height args too
9390 return self
._SetItemMinSize
(item
, args
)
9392 return self
._SetItemMinSize
(item
, args
[0])
9394 def AddItem(*args
, **kwargs
):
9396 AddItem(self, SizerItem item)
9398 Adds a `wx.SizerItem` to the sizer.
9400 return _core_
.Sizer_AddItem(*args
, **kwargs
)
9402 def InsertItem(*args
, **kwargs
):
9404 InsertItem(self, int index, SizerItem item)
9406 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9408 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
9410 def PrependItem(*args
, **kwargs
):
9412 PrependItem(self, SizerItem item)
9414 Prepends a `wx.SizerItem` to the sizer.
9416 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
9418 def AddMany(self
, items
):
9420 AddMany is a convenience method for adding several items
9421 to a sizer at one time. Simply pass it a list of tuples,
9422 where each tuple consists of the parameters that you
9423 would normally pass to the `Add` method.
9426 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
9430 # for backwards compatibility only, please do not use in new code
9431 AddWindow
= wx
._deprecated
(Add
, "AddWindow is deprecated, use `Add` instead.")
9432 AddSizer
= wx
._deprecated
(Add
, "AddSizer is deprecated, use `Add` instead.")
9433 AddSpacer
= wx
._deprecated
(Add
, "AddSpacer is deprecated, use `Add` instead.")
9434 PrependWindow
= wx
._deprecated
(Prepend
, "PrependWindow is deprecated, use `Prepend` instead.")
9435 PrependSizer
= wx
._deprecated
(Prepend
, "PrependSizer is deprecated, use `Prepend` instead.")
9436 PrependSpacer
= wx
._deprecated
(Prepend
, "PrependSpacer is deprecated, use `Prepend` instead.")
9437 InsertWindow
= wx
._deprecated
(Insert
, "InsertWindow is deprecated, use `Insert` instead.")
9438 InsertSizer
= wx
._deprecated
(Insert
, "InsertSizer is deprecated, use `Insert` instead.")
9439 InsertSpacer
= wx
._deprecated
(Insert
, "InsertSpacer is deprecated, use `Insert` instead.")
9440 RemoveWindow
= wx
._deprecated
(Remove
, "RemoveWindow is deprecated, use `Remove` instead.")
9441 RemoveSizer
= wx
._deprecated
(Remove
, "RemoveSizer is deprecated, use `Remove` instead.")
9442 RemovePos
= wx
._deprecated
(Remove
, "RemovePos is deprecated, use `Remove` instead.")
9445 def SetDimension(*args
, **kwargs
):
9447 SetDimension(self, int x, int y, int width, int height)
9449 Call this to force the sizer to take the given dimension and thus
9450 force the items owned by the sizer to resize themselves according to
9451 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9454 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
9456 def SetMinSize(*args
, **kwargs
):
9458 SetMinSize(self, Size size)
9460 Call this to give the sizer a minimal size. Normally, the sizer will
9461 calculate its minimal size based purely on how much space its children
9462 need. After calling this method `GetMinSize` will return either the
9463 minimal size as requested by its children or the minimal size set
9464 here, depending on which is bigger.
9466 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
9468 def GetSize(*args
, **kwargs
):
9470 GetSize(self) -> Size
9472 Returns the current size of the space managed by the sizer.
9474 return _core_
.Sizer_GetSize(*args
, **kwargs
)
9476 def GetPosition(*args
, **kwargs
):
9478 GetPosition(self) -> Point
9480 Returns the current position of the sizer's managed space.
9482 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
9484 def GetMinSize(*args
, **kwargs
):
9486 GetMinSize(self) -> Size
9488 Returns the minimal size of the sizer. This is either the combined
9489 minimal size of all the children and their borders or the minimal size
9490 set by SetMinSize, depending on which is bigger.
9492 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
9494 def GetSizeTuple(self
):
9495 return self
.GetSize().Get()
9496 def GetPositionTuple(self
):
9497 return self
.GetPosition().Get()
9498 def GetMinSizeTuple(self
):
9499 return self
.GetMinSize().Get()
9501 def RecalcSizes(*args
, **kwargs
):
9505 Using the sizes calculated by `CalcMin` reposition and resize all the
9506 items managed by this sizer. You should not need to call this directly as
9507 it is called by `Layout`.
9509 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
9511 def CalcMin(*args
, **kwargs
):
9513 CalcMin(self) -> Size
9515 This method is where the sizer will do the actual calculation of its
9516 children's minimal sizes. You should not need to call this directly as
9517 it is called by `Layout`.
9519 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
9521 def Layout(*args
, **kwargs
):
9525 This method will force the recalculation and layout of the items
9526 controlled by the sizer using the current space allocated to the
9527 sizer. Normally this is called automatically from the owning window's
9528 EVT_SIZE handler, but it is also useful to call it from user code when
9529 one of the items in a sizer change size, or items are added or
9532 return _core_
.Sizer_Layout(*args
, **kwargs
)
9534 def Fit(*args
, **kwargs
):
9536 Fit(self, Window window) -> Size
9538 Tell the sizer to resize the *window* to match the sizer's minimal
9539 size. This is commonly done in the constructor of the window itself in
9540 order to set its initial size to match the needs of the children as
9541 determined by the sizer. Returns the new size.
9543 For a top level window this is the total window size, not the client size.
9545 return _core_
.Sizer_Fit(*args
, **kwargs
)
9547 def FitInside(*args
, **kwargs
):
9549 FitInside(self, Window window)
9551 Tell the sizer to resize the *virtual size* of the *window* to match the
9552 sizer's minimal size. This will not alter the on screen size of the
9553 window, but may cause the addition/removal/alteration of scrollbars
9554 required to view the virtual area in windows which manage it.
9556 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9559 return _core_
.Sizer_FitInside(*args
, **kwargs
)
9561 def SetSizeHints(*args
, **kwargs
):
9563 SetSizeHints(self, Window window)
9565 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9566 match the sizer's minimal size. This is commonly done in the
9567 constructor of the window itself if the window is resizable (as are
9568 many dialogs under Unix and frames on probably all platforms) in order
9569 to prevent the window from being sized smaller than the minimal size
9570 required by the sizer.
9572 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
9574 def SetVirtualSizeHints(*args
, **kwargs
):
9576 SetVirtualSizeHints(self, Window window)
9578 Tell the sizer to set the minimal size of the window virtual area to
9579 match the sizer's minimal size. For windows with managed scrollbars
9580 this will set them appropriately.
9582 :see: `wx.ScrolledWindow.SetScrollbars`
9585 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
9587 def Clear(*args
, **kwargs
):
9589 Clear(self, bool deleteWindows=False)
9591 Clear all items from the sizer, optionally destroying the window items
9594 return _core_
.Sizer_Clear(*args
, **kwargs
)
9596 def DeleteWindows(*args
, **kwargs
):
9600 Destroy all windows managed by the sizer.
9602 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
9604 def GetChildren(*args
, **kwargs
):
9606 GetChildren(sefl) -> list
9608 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9610 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
9612 def Show(*args
, **kwargs
):
9614 Show(self, item, bool show=True, bool recursive=false) -> bool
9616 Shows or hides an item managed by the sizer. To make a sizer item
9617 disappear or reappear, use Show followed by `Layout`. The *item*
9618 parameter can be either a window, a sizer, or the zero-based index of
9619 the item. Use the recursive parameter to show or hide an item in a
9620 subsizer. Returns True if the item was found.
9622 return _core_
.Sizer_Show(*args
, **kwargs
)
9624 def IsShown(*args
, **kwargs
):
9628 Determines if the item is currently shown. sizer. To make a sizer
9629 item disappear or reappear, use Show followed by `Layout`. The *item*
9630 parameter can be either a window, a sizer, or the zero-based index of
9633 return _core_
.Sizer_IsShown(*args
, **kwargs
)
9635 def Hide(self
, item
, recursive
=False):
9637 A convenience method for Show(item, False, recursive).
9639 return self
.Show(item
, False, recursive
)
9641 def ShowItems(*args
, **kwargs
):
9643 ShowItems(self, bool show)
9645 Recursively call `wx.SizerItem.Show` on all sizer items.
9647 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
9650 class SizerPtr(Sizer
):
9651 def __init__(self
, this
):
9653 if not hasattr(self
,"thisown"): self
.thisown
= 0
9654 self
.__class
__ = Sizer
9655 _core_
.Sizer_swigregister(SizerPtr
)
9657 class PySizer(Sizer
):
9659 wx.PySizer is a special version of `wx.Sizer` that has been
9660 instrumented to allow the C++ virtual methods to be overloaded in
9661 Python derived classes. You would derive from this class if you are
9662 wanting to implement a custom sizer in Python code. Simply implement
9663 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9666 class MySizer(wx.PySizer):
9668 wx.PySizer.__init__(self)
9671 for item in self.GetChildren():
9672 # calculate the total minimum width and height needed
9673 # by all items in the sizer according to this sizer's
9676 return wx.Size(width, height)
9678 def RecalcSizes(self):
9679 # find the space allotted to this sizer
9680 pos = self.GetPosition()
9681 size = self.GetSize()
9682 for item in self.GetChildren():
9683 # Recalculate (if necessary) the position and size of
9684 # each item and then call item.SetDimension to do the
9685 # actual positioning and sizing of the items within the
9686 # space alloted to this sizer.
9688 item.SetDimension(itemPos, itemSize)
9691 When `Layout` is called it first calls `CalcMin` followed by
9692 `RecalcSizes` so you can optimize a bit by saving the results of
9693 `CalcMin` and resuing them in `RecalcSizes`.
9695 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9700 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9701 def __init__(self
, *args
, **kwargs
):
9703 __init__(self) -> PySizer
9705 Creates a wx.PySizer. Must be called from the __init__ in the derived
9708 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
9709 self
.this
= newobj
.this
9712 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
9714 def _setCallbackInfo(*args
, **kwargs
):
9715 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9716 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
9719 class PySizerPtr(PySizer
):
9720 def __init__(self
, this
):
9722 if not hasattr(self
,"thisown"): self
.thisown
= 0
9723 self
.__class
__ = PySizer
9724 _core_
.PySizer_swigregister(PySizerPtr
)
9726 #---------------------------------------------------------------------------
9728 class BoxSizer(Sizer
):
9730 The basic idea behind a box sizer is that windows will most often be
9731 laid out in rather simple basic geometry, typically in a row or a
9732 column or nested hierarchies of either. A wx.BoxSizer will lay out
9733 its items in a simple row or column, depending on the orientation
9734 parameter passed to the constructor.
9737 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9738 def __init__(self
, *args
, **kwargs
):
9740 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9742 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9743 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9746 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
9747 self
.this
= newobj
.this
9750 self
._setOORInfo
(self
)
9752 def GetOrientation(*args
, **kwargs
):
9754 GetOrientation(self) -> int
9756 Returns the current orientation of the sizer.
9758 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
9760 def SetOrientation(*args
, **kwargs
):
9762 SetOrientation(self, int orient)
9764 Resets the orientation of the sizer.
9766 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
9769 class BoxSizerPtr(BoxSizer
):
9770 def __init__(self
, this
):
9772 if not hasattr(self
,"thisown"): self
.thisown
= 0
9773 self
.__class
__ = BoxSizer
9774 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
9776 #---------------------------------------------------------------------------
9778 class StaticBoxSizer(BoxSizer
):
9780 wx.StaticBoxSizer derives from and functions identically to the
9781 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9782 manages. Note that this static box must be created separately and
9783 passed to the sizer constructor.
9786 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9787 def __init__(self
, *args
, **kwargs
):
9789 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9791 Constructor. It takes an associated static box and the orientation
9792 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9795 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
9796 self
.this
= newobj
.this
9799 self
._setOORInfo
(self
)
9801 def GetStaticBox(*args
, **kwargs
):
9803 GetStaticBox(self) -> StaticBox
9805 Returns the static box associated with this sizer.
9807 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
9810 class StaticBoxSizerPtr(StaticBoxSizer
):
9811 def __init__(self
, this
):
9813 if not hasattr(self
,"thisown"): self
.thisown
= 0
9814 self
.__class
__ = StaticBoxSizer
9815 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
9817 #---------------------------------------------------------------------------
9819 class GridSizer(Sizer
):
9821 A grid sizer is a sizer which lays out its children in a
9822 two-dimensional table with all cells having the same size. In other
9823 words, the width of each cell within the grid is the width of the
9824 widest item added to the sizer and the height of each grid cell is the
9825 height of the tallest item. An optional vertical and/or horizontal
9826 gap between items can also be specified (in pixels.)
9828 Items are placed in the cells of the grid in the order they are added,
9829 in row-major order. In other words, the first row is filled first,
9830 then the second, and so on until all items have been added. (If
9831 neccessary, additional rows will be added as items are added.) If you
9832 need to have greater control over the cells that items are placed in
9833 then use the `wx.GridBagSizer`.
9837 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9838 def __init__(self
, *args
, **kwargs
):
9840 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9842 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9843 of columns and rows in the sizer - if either of the parameters is
9844 zero, it will be calculated to from the total number of children in
9845 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9846 define extra space between all children.
9848 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
9849 self
.this
= newobj
.this
9852 self
._setOORInfo
(self
)
9854 def SetCols(*args
, **kwargs
):
9856 SetCols(self, int cols)
9858 Sets the number of columns in the sizer.
9860 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
9862 def SetRows(*args
, **kwargs
):
9864 SetRows(self, int rows)
9866 Sets the number of rows in the sizer.
9868 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
9870 def SetVGap(*args
, **kwargs
):
9872 SetVGap(self, int gap)
9874 Sets the vertical gap (in pixels) between the cells in the sizer.
9876 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
9878 def SetHGap(*args
, **kwargs
):
9880 SetHGap(self, int gap)
9882 Sets the horizontal gap (in pixels) between cells in the sizer
9884 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
9886 def GetCols(*args
, **kwargs
):
9888 GetCols(self) -> int
9890 Returns the number of columns in the sizer.
9892 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
9894 def GetRows(*args
, **kwargs
):
9896 GetRows(self) -> int
9898 Returns the number of rows in the sizer.
9900 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
9902 def GetVGap(*args
, **kwargs
):
9904 GetVGap(self) -> int
9906 Returns the vertical gap (in pixels) between the cells in the sizer.
9908 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
9910 def GetHGap(*args
, **kwargs
):
9912 GetHGap(self) -> int
9914 Returns the horizontal gap (in pixels) between cells in the sizer.
9916 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
9919 class GridSizerPtr(GridSizer
):
9920 def __init__(self
, this
):
9922 if not hasattr(self
,"thisown"): self
.thisown
= 0
9923 self
.__class
__ = GridSizer
9924 _core_
.GridSizer_swigregister(GridSizerPtr
)
9926 #---------------------------------------------------------------------------
9928 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
9929 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
9930 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
9931 class FlexGridSizer(GridSizer
):
9933 A flex grid sizer is a sizer which lays out its children in a
9934 two-dimensional table with all table cells in one row having the same
9935 height and all cells in one column having the same width, but all
9936 rows or all columns are not necessarily the same height or width as in
9939 wx.FlexGridSizer can also size items equally in one direction but
9940 unequally ("flexibly") in the other. If the sizer is only flexible
9941 in one direction (this can be changed using `SetFlexibleDirection`), it
9942 needs to be decided how the sizer should grow in the other ("non
9943 flexible") direction in order to fill the available space. The
9944 `SetNonFlexibleGrowMode` method serves this purpose.
9949 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9950 def __init__(self
, *args
, **kwargs
):
9952 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9954 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9955 number of columns and rows in the sizer - if either of the parameters
9956 is zero, it will be calculated to from the total number of children in
9957 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9958 define extra space between all children.
9960 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
9961 self
.this
= newobj
.this
9964 self
._setOORInfo
(self
)
9966 def AddGrowableRow(*args
, **kwargs
):
9968 AddGrowableRow(self, size_t idx, int proportion=0)
9970 Specifies that row *idx* (starting from zero) should be grown if there
9971 is extra space available to the sizer.
9973 The *proportion* parameter has the same meaning as the stretch factor
9974 for the box sizers except that if all proportions are 0, then all
9975 columns are resized equally (instead of not being resized at all).
9977 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
9979 def RemoveGrowableRow(*args
, **kwargs
):
9981 RemoveGrowableRow(self, size_t idx)
9983 Specifies that row *idx* is no longer growable.
9985 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
9987 def AddGrowableCol(*args
, **kwargs
):
9989 AddGrowableCol(self, size_t idx, int proportion=0)
9991 Specifies that column *idx* (starting from zero) should be grown if
9992 there is extra space available to the sizer.
9994 The *proportion* parameter has the same meaning as the stretch factor
9995 for the box sizers except that if all proportions are 0, then all
9996 columns are resized equally (instead of not being resized at all).
9998 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
10000 def RemoveGrowableCol(*args
, **kwargs
):
10002 RemoveGrowableCol(self, size_t idx)
10004 Specifies that column *idx* is no longer growable.
10006 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
10008 def SetFlexibleDirection(*args
, **kwargs
):
10010 SetFlexibleDirection(self, int direction)
10012 Specifies whether the sizer should flexibly resize its columns, rows,
10013 or both. Argument *direction* can be one of the following values. Any
10014 other value is ignored.
10016 ============== =======================================
10017 wx.VERTICAL Rows are flexibly sized.
10018 wx.HORIZONTAL Columns are flexibly sized.
10019 wx.BOTH Both rows and columns are flexibly sized
10020 (this is the default value).
10021 ============== =======================================
10023 Note that this method does not trigger relayout.
10026 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
10028 def GetFlexibleDirection(*args
, **kwargs
):
10030 GetFlexibleDirection(self) -> int
10032 Returns a value that specifies whether the sizer
10033 flexibly resizes its columns, rows, or both (default).
10035 :see: `SetFlexibleDirection`
10037 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
10039 def SetNonFlexibleGrowMode(*args
, **kwargs
):
10041 SetNonFlexibleGrowMode(self, int mode)
10043 Specifies how the sizer should grow in the non-flexible direction if
10044 there is one (so `SetFlexibleDirection` must have been called
10045 previously). Argument *mode* can be one of the following values:
10047 ========================== =================================================
10048 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10049 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10050 `AddGrowableCol` and `AddGrowableRow`. In this
10051 case equal sizing applies to minimum sizes of
10052 columns or rows (this is the default value).
10053 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10054 the non flexible direction, whether they are
10055 growable or not in the flexbile direction.
10056 ========================== =================================================
10058 Note that this method does not trigger relayout.
10062 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
10064 def GetNonFlexibleGrowMode(*args
, **kwargs
):
10066 GetNonFlexibleGrowMode(self) -> int
10068 Returns the value that specifies how the sizer grows in the
10069 non-flexible direction if there is one.
10071 :see: `SetNonFlexibleGrowMode`
10073 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
10075 def GetRowHeights(*args
, **kwargs
):
10077 GetRowHeights(self) -> list
10079 Returns a list of integers representing the heights of each of the
10082 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
10084 def GetColWidths(*args
, **kwargs
):
10086 GetColWidths(self) -> list
10088 Returns a list of integers representing the widths of each of the
10089 columns in the sizer.
10091 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
10094 class FlexGridSizerPtr(FlexGridSizer
):
10095 def __init__(self
, this
):
10097 if not hasattr(self
,"thisown"): self
.thisown
= 0
10098 self
.__class
__ = FlexGridSizer
10099 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
10101 #---------------------------------------------------------------------------
10103 class GBPosition(object):
10105 This class represents the position of an item in a virtual grid of
10106 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10107 typemaps that will automatically convert from a 2-element sequence of
10108 integers to a wx.GBPosition, so you can use the more pythonic
10109 representation of the position nearly transparently in Python code.
10111 def __repr__(self
):
10112 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10113 def __init__(self
, *args
, **kwargs
):
10115 __init__(self, int row=0, int col=0) -> GBPosition
10117 This class represents the position of an item in a virtual grid of
10118 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10119 typemaps that will automatically convert from a 2-element sequence of
10120 integers to a wx.GBPosition, so you can use the more pythonic
10121 representation of the position nearly transparently in Python code.
10123 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
10124 self
.this
= newobj
.this
10127 def GetRow(*args
, **kwargs
):
10128 """GetRow(self) -> int"""
10129 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
10131 def GetCol(*args
, **kwargs
):
10132 """GetCol(self) -> int"""
10133 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
10135 def SetRow(*args
, **kwargs
):
10136 """SetRow(self, int row)"""
10137 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
10139 def SetCol(*args
, **kwargs
):
10140 """SetCol(self, int col)"""
10141 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
10143 def __eq__(*args
, **kwargs
):
10144 """__eq__(self, GBPosition other) -> bool"""
10145 return _core_
.GBPosition___eq__(*args
, **kwargs
)
10147 def __ne__(*args
, **kwargs
):
10148 """__ne__(self, GBPosition other) -> bool"""
10149 return _core_
.GBPosition___ne__(*args
, **kwargs
)
10151 def Set(*args
, **kwargs
):
10152 """Set(self, int row=0, int col=0)"""
10153 return _core_
.GBPosition_Set(*args
, **kwargs
)
10155 def Get(*args
, **kwargs
):
10156 """Get(self) -> PyObject"""
10157 return _core_
.GBPosition_Get(*args
, **kwargs
)
10159 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10160 def __str__(self
): return str(self
.Get())
10161 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
10162 def __len__(self
): return len(self
.Get())
10163 def __getitem__(self
, index
): return self
.Get()[index
]
10164 def __setitem__(self
, index
, val
):
10165 if index
== 0: self
.SetRow(val
)
10166 elif index
== 1: self
.SetCol(val
)
10167 else: raise IndexError
10168 def __nonzero__(self
): return self
.Get() != (0,0)
10169 __safe_for_unpickling__
= True
10170 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
10172 row
= property(GetRow
, SetRow
)
10173 col
= property(GetCol
, SetCol
)
10176 class GBPositionPtr(GBPosition
):
10177 def __init__(self
, this
):
10179 if not hasattr(self
,"thisown"): self
.thisown
= 0
10180 self
.__class
__ = GBPosition
10181 _core_
.GBPosition_swigregister(GBPositionPtr
)
10183 class GBSpan(object):
10185 This class is used to hold the row and column spanning attributes of
10186 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10187 automatically convert from a 2-element sequence of integers to a
10188 wx.GBSpan, so you can use the more pythonic representation of the span
10189 nearly transparently in Python code.
10192 def __repr__(self
):
10193 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10194 def __init__(self
, *args
, **kwargs
):
10196 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10198 Construct a new wxGBSpan, optionally setting the rowspan and
10199 colspan. The default is (1,1). (Meaning that the item occupies one
10200 cell in each direction.
10202 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
10203 self
.this
= newobj
.this
10206 def GetRowspan(*args
, **kwargs
):
10207 """GetRowspan(self) -> int"""
10208 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
10210 def GetColspan(*args
, **kwargs
):
10211 """GetColspan(self) -> int"""
10212 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
10214 def SetRowspan(*args
, **kwargs
):
10215 """SetRowspan(self, int rowspan)"""
10216 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
10218 def SetColspan(*args
, **kwargs
):
10219 """SetColspan(self, int colspan)"""
10220 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
10222 def __eq__(*args
, **kwargs
):
10223 """__eq__(self, GBSpan other) -> bool"""
10224 return _core_
.GBSpan___eq__(*args
, **kwargs
)
10226 def __ne__(*args
, **kwargs
):
10227 """__ne__(self, GBSpan other) -> bool"""
10228 return _core_
.GBSpan___ne__(*args
, **kwargs
)
10230 def Set(*args
, **kwargs
):
10231 """Set(self, int rowspan=1, int colspan=1)"""
10232 return _core_
.GBSpan_Set(*args
, **kwargs
)
10234 def Get(*args
, **kwargs
):
10235 """Get(self) -> PyObject"""
10236 return _core_
.GBSpan_Get(*args
, **kwargs
)
10238 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10239 def __str__(self
): return str(self
.Get())
10240 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
10241 def __len__(self
): return len(self
.Get())
10242 def __getitem__(self
, index
): return self
.Get()[index
]
10243 def __setitem__(self
, index
, val
):
10244 if index
== 0: self
.SetRowspan(val
)
10245 elif index
== 1: self
.SetColspan(val
)
10246 else: raise IndexError
10247 def __nonzero__(self
): return self
.Get() != (0,0)
10248 __safe_for_unpickling__
= True
10249 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
10251 rowspan
= property(GetRowspan
, SetRowspan
)
10252 colspan
= property(GetColspan
, SetColspan
)
10255 class GBSpanPtr(GBSpan
):
10256 def __init__(self
, this
):
10258 if not hasattr(self
,"thisown"): self
.thisown
= 0
10259 self
.__class
__ = GBSpan
10260 _core_
.GBSpan_swigregister(GBSpanPtr
)
10262 class GBSizerItem(SizerItem
):
10264 The wx.GBSizerItem class is used to track the additional data about
10265 items in a `wx.GridBagSizer` such as the item's position in the grid
10266 and how many rows or columns it spans.
10269 def __repr__(self
):
10270 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10271 def __init__(self
, *args
, **kwargs
):
10273 __init__(self) -> GBSizerItem
10275 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10276 size will need to be set, as well as a position and span before this
10277 item can be used in a Sizer.
10279 You will probably never need to create a wx.GBSizerItem directly as they
10280 are created automatically when the sizer's Add method is called.
10282 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
10283 self
.this
= newobj
.this
10286 def GetPos(*args
, **kwargs
):
10288 GetPos(self) -> GBPosition
10290 Get the grid position of the item
10292 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
10294 def GetPosTuple(self
): return self
.GetPos().Get()
10295 def GetSpan(*args
, **kwargs
):
10297 GetSpan(self) -> GBSpan
10299 Get the row and column spanning of the item
10301 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
10303 def GetSpanTuple(self
): return self
.GetSpan().Get()
10304 def SetPos(*args
, **kwargs
):
10306 SetPos(self, GBPosition pos) -> bool
10308 If the item is already a member of a sizer then first ensure that
10309 there is no other item that would intersect with this one at the new
10310 position, then set the new position. Returns True if the change is
10311 successful and after the next Layout() the item will be moved.
10313 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
10315 def SetSpan(*args
, **kwargs
):
10317 SetSpan(self, GBSpan span) -> bool
10319 If the item is already a member of a sizer then first ensure that
10320 there is no other item that would intersect with this one with its new
10321 spanning size, then set the new spanning. Returns True if the change
10322 is successful and after the next Layout() the item will be resized.
10325 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
10327 def Intersects(*args
, **kwargs
):
10329 Intersects(self, GBSizerItem other) -> bool
10331 Returns True if this item and the other item instersect.
10333 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
10335 def IntersectsPos(*args
, **kwargs
):
10337 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10339 Returns True if the given pos/span would intersect with this item.
10341 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
10343 def GetEndPos(*args
, **kwargs
):
10345 GetEndPos(self) -> GBPosition
10347 Get the row and column of the endpoint of this item.
10349 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
10351 def GetGBSizer(*args
, **kwargs
):
10353 GetGBSizer(self) -> GridBagSizer
10355 Get the sizer this item is a member of.
10357 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
10359 def SetGBSizer(*args
, **kwargs
):
10361 SetGBSizer(self, GridBagSizer sizer)
10363 Set the sizer this item is a member of.
10365 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
10368 class GBSizerItemPtr(GBSizerItem
):
10369 def __init__(self
, this
):
10371 if not hasattr(self
,"thisown"): self
.thisown
= 0
10372 self
.__class
__ = GBSizerItem
10373 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
10374 DefaultSpan
= cvar
.DefaultSpan
10376 def GBSizerItemWindow(*args
, **kwargs
):
10378 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10379 int border, PyObject userData=None) -> GBSizerItem
10381 Construct a `wx.GBSizerItem` for a window.
10383 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
10387 def GBSizerItemSizer(*args
, **kwargs
):
10389 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10390 int border, PyObject userData=None) -> GBSizerItem
10392 Construct a `wx.GBSizerItem` for a sizer
10394 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
10398 def GBSizerItemSpacer(*args
, **kwargs
):
10400 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10401 int flag, int border, PyObject userData=None) -> GBSizerItem
10403 Construct a `wx.GBSizerItem` for a spacer.
10405 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
10409 class GridBagSizer(FlexGridSizer
):
10411 A `wx.Sizer` that can lay out items in a virtual grid like a
10412 `wx.FlexGridSizer` but in this case explicit positioning of the items
10413 is allowed using `wx.GBPosition`, and items can optionally span more
10414 than one row and/or column using `wx.GBSpan`. The total size of the
10415 virtual grid is determined by the largest row and column that items are
10416 positioned at, adjusted for spanning.
10419 def __repr__(self
):
10420 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10421 def __init__(self
, *args
, **kwargs
):
10423 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10425 Constructor, with optional parameters to specify the gap between the
10428 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
10429 self
.this
= newobj
.this
10432 self
._setOORInfo
(self
)
10434 def Add(*args
, **kwargs
):
10436 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10437 int border=0, userData=None) -> wx.GBSizerItem
10439 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10440 more than one row or column as specified with *span*. The remaining
10441 args behave similarly to `wx.Sizer.Add`.
10443 Returns True if the item was successfully placed at the given cell
10444 position, False if something was already there.
10447 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
10449 def AddItem(*args
, **kwargs
):
10451 Add(self, GBSizerItem item) -> wx.GBSizerItem
10453 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10454 the item was successfully placed at its given cell position, False if
10455 something was already there.
10457 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
10459 def GetCellSize(*args
, **kwargs
):
10461 GetCellSize(self, int row, int col) -> Size
10463 Get the size of the specified cell, including hgap and
10464 vgap. Only valid after a Layout.
10466 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
10468 def GetEmptyCellSize(*args
, **kwargs
):
10470 GetEmptyCellSize(self) -> Size
10472 Get the size used for cells in the grid with no item.
10474 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
10476 def SetEmptyCellSize(*args
, **kwargs
):
10478 SetEmptyCellSize(self, Size sz)
10480 Set the size used for cells in the grid with no item.
10482 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
10484 def GetItemPosition(*args
):
10486 GetItemPosition(self, item) -> GBPosition
10488 Get the grid position of the specified *item* where *item* is either a
10489 window or subsizer that is a member of this sizer, or a zero-based
10492 return _core_
.GridBagSizer_GetItemPosition(*args
)
10494 def SetItemPosition(*args
):
10496 SetItemPosition(self, item, GBPosition pos) -> bool
10498 Set the grid position of the specified *item* where *item* is either a
10499 window or subsizer that is a member of this sizer, or a zero-based
10500 index of an item. Returns True on success. If the move is not
10501 allowed (because an item is already there) then False is returned.
10504 return _core_
.GridBagSizer_SetItemPosition(*args
)
10506 def GetItemSpan(*args
):
10508 GetItemSpan(self, item) -> GBSpan
10510 Get the row/col spanning of the specified *item* where *item* is
10511 either a window or subsizer that is a member of this sizer, or a
10512 zero-based index of an item.
10514 return _core_
.GridBagSizer_GetItemSpan(*args
)
10516 def SetItemSpan(*args
):
10518 SetItemSpan(self, item, GBSpan span) -> bool
10520 Set the row/col spanning of the specified *item* where *item* is
10521 either a window or subsizer that is a member of this sizer, or a
10522 zero-based index of an item. Returns True on success. If the move is
10523 not allowed (because an item is already there) then False is returned.
10525 return _core_
.GridBagSizer_SetItemSpan(*args
)
10527 def FindItem(*args
):
10529 FindItem(self, item) -> GBSizerItem
10531 Find the sizer item for the given window or subsizer, returns None if
10532 not found. (non-recursive)
10534 return _core_
.GridBagSizer_FindItem(*args
)
10536 def FindItemAtPosition(*args
, **kwargs
):
10538 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10540 Return the sizer item for the given grid cell, or None if there is no
10541 item at that position. (non-recursive)
10543 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
10545 def FindItemAtPoint(*args
, **kwargs
):
10547 FindItemAtPoint(self, Point pt) -> GBSizerItem
10549 Return the sizer item located at the point given in *pt*, or None if
10550 there is no item at that point. The (x,y) coordinates in pt correspond
10551 to the client coordinates of the window using the sizer for
10552 layout. (non-recursive)
10554 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
10556 def CheckForIntersection(*args
, **kwargs
):
10558 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10560 Look at all items and see if any intersect (or would overlap) the
10561 given *item*. Returns True if so, False if there would be no overlap.
10562 If an *excludeItem* is given then it will not be checked for
10563 intersection, for example it may be the item we are checking the
10567 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
10569 def CheckForIntersectionPos(*args
, **kwargs
):
10571 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10573 Look at all items and see if any intersect (or would overlap) the
10574 given position and span. Returns True if so, False if there would be
10575 no overlap. If an *excludeItem* is given then it will not be checked
10576 for intersection, for example it may be the item we are checking the
10579 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
10582 class GridBagSizerPtr(GridBagSizer
):
10583 def __init__(self
, this
):
10585 if not hasattr(self
,"thisown"): self
.thisown
= 0
10586 self
.__class
__ = GridBagSizer
10587 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
10589 #---------------------------------------------------------------------------
10593 Right
= _core_
.Right
10594 Bottom
= _core_
.Bottom
10595 Width
= _core_
.Width
10596 Height
= _core_
.Height
10597 Centre
= _core_
.Centre
10598 Center
= _core_
.Center
10599 CentreX
= _core_
.CentreX
10600 CentreY
= _core_
.CentreY
10601 Unconstrained
= _core_
.Unconstrained
10603 PercentOf
= _core_
.PercentOf
10604 Above
= _core_
.Above
10605 Below
= _core_
.Below
10606 LeftOf
= _core_
.LeftOf
10607 RightOf
= _core_
.RightOf
10608 SameAs
= _core_
.SameAs
10609 Absolute
= _core_
.Absolute
10610 class IndividualLayoutConstraint(Object
):
10612 Objects of this class are stored in the `wx.LayoutConstraints` class as
10613 one of eight possible constraints that a window can be involved in.
10614 You will never need to create an instance of
10615 wx.IndividualLayoutConstraint, rather you should create a
10616 `wx.LayoutConstraints` instance and use the individual contstraints
10619 def __init__(self
): raise RuntimeError, "No constructor defined"
10620 def __repr__(self
):
10621 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10622 def Set(*args
, **kwargs
):
10624 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10626 Sets the properties of the constraint. Normally called by one of the
10627 convenience functions such as Above, RightOf, SameAs.
10629 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
10631 def LeftOf(*args
, **kwargs
):
10633 LeftOf(self, Window sibling, int marg=0)
10635 Constrains this edge to be to the left of the given window, with an
10636 optional margin. Implicitly, this is relative to the left edge of the
10639 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
10641 def RightOf(*args
, **kwargs
):
10643 RightOf(self, Window sibling, int marg=0)
10645 Constrains this edge to be to the right of the given window, with an
10646 optional margin. Implicitly, this is relative to the right edge of the
10649 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
10651 def Above(*args
, **kwargs
):
10653 Above(self, Window sibling, int marg=0)
10655 Constrains this edge to be above the given window, with an optional
10656 margin. Implicitly, this is relative to the top edge of the other
10659 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
10661 def Below(*args
, **kwargs
):
10663 Below(self, Window sibling, int marg=0)
10665 Constrains this edge to be below the given window, with an optional
10666 margin. Implicitly, this is relative to the bottom edge of the other
10669 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
10671 def SameAs(*args
, **kwargs
):
10673 SameAs(self, Window otherW, int edge, int marg=0)
10675 Constrains this edge or dimension to be to the same as the edge of the
10676 given window, with an optional margin.
10678 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
10680 def PercentOf(*args
, **kwargs
):
10682 PercentOf(self, Window otherW, int wh, int per)
10684 Constrains this edge or dimension to be to a percentage of the given
10685 window, with an optional margin.
10687 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
10689 def Absolute(*args
, **kwargs
):
10691 Absolute(self, int val)
10693 Constrains this edge or dimension to be the given absolute value.
10695 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
10697 def Unconstrained(*args
, **kwargs
):
10699 Unconstrained(self)
10701 Sets this edge or dimension to be unconstrained, that is, dependent on
10702 other edges and dimensions from which this value can be deduced.
10704 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
10706 def AsIs(*args
, **kwargs
):
10710 Sets this edge or constraint to be whatever the window's value is at
10711 the moment. If either of the width and height constraints are *as is*,
10712 the window will not be resized, but moved instead. This is important
10713 when considering panel items which are intended to have a default
10714 size, such as a button, which may take its size from the size of the
10717 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
10719 def GetOtherWindow(*args
, **kwargs
):
10720 """GetOtherWindow(self) -> Window"""
10721 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
10723 def GetMyEdge(*args
, **kwargs
):
10724 """GetMyEdge(self) -> int"""
10725 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
10727 def SetEdge(*args
, **kwargs
):
10728 """SetEdge(self, int which)"""
10729 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
10731 def SetValue(*args
, **kwargs
):
10732 """SetValue(self, int v)"""
10733 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
10735 def GetMargin(*args
, **kwargs
):
10736 """GetMargin(self) -> int"""
10737 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
10739 def SetMargin(*args
, **kwargs
):
10740 """SetMargin(self, int m)"""
10741 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
10743 def GetValue(*args
, **kwargs
):
10744 """GetValue(self) -> int"""
10745 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
10747 def GetPercent(*args
, **kwargs
):
10748 """GetPercent(self) -> int"""
10749 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
10751 def GetOtherEdge(*args
, **kwargs
):
10752 """GetOtherEdge(self) -> int"""
10753 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
10755 def GetDone(*args
, **kwargs
):
10756 """GetDone(self) -> bool"""
10757 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
10759 def SetDone(*args
, **kwargs
):
10760 """SetDone(self, bool d)"""
10761 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
10763 def GetRelationship(*args
, **kwargs
):
10764 """GetRelationship(self) -> int"""
10765 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
10767 def SetRelationship(*args
, **kwargs
):
10768 """SetRelationship(self, int r)"""
10769 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
10771 def ResetIfWin(*args
, **kwargs
):
10773 ResetIfWin(self, Window otherW) -> bool
10775 Reset constraint if it mentions otherWin
10777 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
10779 def SatisfyConstraint(*args
, **kwargs
):
10781 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10783 Try to satisfy constraint
10785 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
10787 def GetEdge(*args
, **kwargs
):
10789 GetEdge(self, int which, Window thisWin, Window other) -> int
10791 Get the value of this edge or dimension, or if this
10792 is not determinable, -1.
10794 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
10797 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
10798 def __init__(self
, this
):
10800 if not hasattr(self
,"thisown"): self
.thisown
= 0
10801 self
.__class
__ = IndividualLayoutConstraint
10802 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
10804 class LayoutConstraints(Object
):
10806 **Note:** constraints are now deprecated and you should use sizers
10809 Objects of this class can be associated with a window to define its
10810 layout constraints, with respect to siblings or its parent.
10812 The class consists of the following eight constraints of class
10813 wx.IndividualLayoutConstraint, some or all of which should be accessed
10814 directly to set the appropriate constraints.
10816 * left: represents the left hand edge of the window
10817 * right: represents the right hand edge of the window
10818 * top: represents the top edge of the window
10819 * bottom: represents the bottom edge of the window
10820 * width: represents the width of the window
10821 * height: represents the height of the window
10822 * centreX: represents the horizontal centre point of the window
10823 * centreY: represents the vertical centre point of the window
10825 Most constraints are initially set to have the relationship
10826 wxUnconstrained, which means that their values should be calculated by
10827 looking at known constraints. The exceptions are width and height,
10828 which are set to wxAsIs to ensure that if the user does not specify a
10829 constraint, the existing width and height will be used, to be
10830 compatible with panel items which often have take a default size. If
10831 the constraint is ``wx.AsIs``, the dimension will not be changed.
10833 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
10836 def __repr__(self
):
10837 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10838 left
= property(_core_
.LayoutConstraints_left_get
)
10839 top
= property(_core_
.LayoutConstraints_top_get
)
10840 right
= property(_core_
.LayoutConstraints_right_get
)
10841 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
10842 width
= property(_core_
.LayoutConstraints_width_get
)
10843 height
= property(_core_
.LayoutConstraints_height_get
)
10844 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
10845 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
10846 def __init__(self
, *args
, **kwargs
):
10847 """__init__(self) -> LayoutConstraints"""
10848 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
10849 self
.this
= newobj
.this
10852 def SatisfyConstraints(*args
, **kwargs
):
10853 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
10854 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
10856 def AreSatisfied(*args
, **kwargs
):
10857 """AreSatisfied(self) -> bool"""
10858 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
10861 class LayoutConstraintsPtr(LayoutConstraints
):
10862 def __init__(self
, this
):
10864 if not hasattr(self
,"thisown"): self
.thisown
= 0
10865 self
.__class
__ = LayoutConstraints
10866 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
10868 #----------------------------------------------------------------------------
10870 # Use Python's bool constants if available, make some if not
10874 __builtins__
.True = 1==1
10875 __builtins__
.False = 1==0
10876 def bool(value
): return not not value
10877 __builtins__
.bool = bool
10881 # workarounds for bad wxRTTI names
10882 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
10883 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
10884 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
10887 #----------------------------------------------------------------------------
10888 # Load version numbers from __version__... Ensure that major and minor
10889 # versions are the same for both wxPython and wxWidgets.
10891 from __version__
import *
10892 __version__
= VERSION_STRING
10894 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
10895 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
10896 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
10898 warnings
.warn("wxPython/wxWidgets release number mismatch")
10900 #----------------------------------------------------------------------------
10902 # Set the default string conversion encoding from the locale
10904 default
= locale
.getdefaultlocale()[1]
10906 wx
.SetDefaultPyEncoding(default
)
10910 #----------------------------------------------------------------------------
10912 class PyDeadObjectError(AttributeError):
10915 class _wxPyDeadObject(object):
10917 Instances of wx objects that are OOR capable will have their __class__
10918 changed to this class when the C++ object is deleted. This should help
10919 prevent crashes due to referencing a bogus C++ pointer.
10921 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
10922 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
10924 def __repr__(self
):
10925 if not hasattr(self
, "_name"):
10926 self
._name
= "[unknown]"
10927 return self
.reprStr
% self
._name
10929 def __getattr__(self
, *args
):
10930 if not hasattr(self
, "_name"):
10931 self
._name
= "[unknown]"
10932 raise PyDeadObjectError(self
.attrStr
% self
._name
)
10934 def __nonzero__(self
):
10939 class PyUnbornObjectError(AttributeError):
10942 class _wxPyUnbornObject(object):
10944 Some stock objects are created when the wx._core module is
10945 imported, but their C++ instance is not created until the wx.App
10946 object is created and initialized. These object instances will
10947 temporarily have their __class__ changed to this class so an
10948 exception will be raised if they are used before the C++ instance
10952 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
10953 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
10955 def __repr__(self
):
10956 #if not hasattr(self, "_name"):
10957 # self._name = "[unknown]"
10958 return self
.reprStr
#% self._name
10960 def __getattr__(self
, *args
):
10961 #if not hasattr(self, "_name"):
10962 # self._name = "[unknown]"
10963 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
10965 def __nonzero__(self
):
10969 #----------------------------------------------------------------------------
10971 def CallAfter(callable, *args
, **kw
):
10973 Call the specified function after the current and pending event
10974 handlers have been completed. This is also good for making GUI
10975 method calls from non-GUI threads. Any extra positional or
10976 keyword args are passed on to the callable when it is called.
10978 :see: `wx.FutureCall`
10981 assert app
is not None, 'No wx.App created yet'
10983 if not hasattr(app
, "_CallAfterId"):
10984 app
._CallAfterId
= wx
.NewEventType()
10985 app
.Connect(-1, -1, app
._CallAfterId
,
10986 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
10988 evt
.SetEventType(app
._CallAfterId
)
10989 evt
.callable = callable
10992 wx
.PostEvent(app
, evt
)
10994 #----------------------------------------------------------------------------
10999 A convenience class for `wx.Timer`, that calls the given callable
11000 object once after the given amount of milliseconds, passing any
11001 positional or keyword args. The return value of the callable is
11002 availbale after it has been run with the `GetResult` method.
11004 If you don't need to get the return value or restart the timer
11005 then there is no need to hold a reference to this object. It will
11006 hold a reference to itself while the timer is running (the timer
11007 has a reference to self.Notify) but the cycle will be broken when
11008 the timer completes, automatically cleaning up the wx.FutureCall
11011 :see: `wx.CallAfter`
11013 def __init__(self
, millis
, callable, *args
, **kwargs
):
11014 self
.millis
= millis
11015 self
.callable = callable
11016 self
.SetArgs(*args
, **kwargs
)
11018 self
.running
= False
11019 self
.hasRun
= False
11028 def Start(self
, millis
=None, *args
, **kwargs
):
11030 (Re)start the timer
11032 self
.hasRun
= False
11033 if millis
is not None:
11034 self
.millis
= millis
11036 self
.SetArgs(*args
, **kwargs
)
11038 self
.timer
= wx
.PyTimer(self
.Notify
)
11039 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
11040 self
.running
= True
11046 Stop and destroy the timer.
11048 if self
.timer
is not None:
11053 def GetInterval(self
):
11054 if self
.timer
is not None:
11055 return self
.timer
.GetInterval()
11060 def IsRunning(self
):
11061 return self
.timer
is not None and self
.timer
.IsRunning()
11064 def SetArgs(self
, *args
, **kwargs
):
11066 (Re)set the args passed to the callable object. This is
11067 useful in conjunction with Restart if you want to schedule a
11068 new call to the same callable object but with different
11072 self
.kwargs
= kwargs
11078 def GetResult(self
):
11083 The timer has expired so call the callable.
11085 if self
.callable and getattr(self
.callable, 'im_self', True):
11087 self
.running
= False
11088 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
11090 if not self
.running
:
11091 # if it wasn't restarted, then cleanup
11092 wx
.CallAfter(self
.Stop
)
11096 #----------------------------------------------------------------------------
11097 # Control which items in this module should be documented by epydoc.
11098 # We allow only classes and functions, which will help reduce the size
11099 # of the docs by filtering out the zillions of constants, EVT objects,
11100 # and etc that don't make much sense by themselves, but are instead
11101 # documented (or will be) as part of the classes/functions/methods
11102 # where they should be used.
11106 A filter for epydoc that only allows non-Ptr classes and
11107 fucntions, in order to reduce the clutter in the API docs.
11109 def __init__(self
, globals):
11110 self
._globals
= globals
11112 def __call__(self
, name
):
11114 obj
= self
._globals
.get(name
, None)
11115 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
11117 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
11121 #----------------------------------------------------------------------------
11122 #----------------------------------------------------------------------------
11124 # Import other modules in this package that should show up in the
11125 # "core" wx namespace
11127 from _windows
import *
11128 from _controls
import *
11129 from _misc
import *
11132 # Fixup the stock objects since they can't be used yet. (They will be
11133 # restored in wx.PyApp.OnInit.)
11134 _core_
._wxPyFixStockObjects
()
11136 #----------------------------------------------------------------------------
11137 #----------------------------------------------------------------------------