1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
6 #// Give a reference to the dictionary of this module to the C++ extension
8 _core_
._wxPySetDictionary
(vars())
10 #// A little trick to make 'wx' be a reference to this module so wx.Names can
13 wx
= _sys
.modules
[__name__
]
16 #----------------------------------------------------------------------------
18 def _deprecated(callable, msg
=None):
20 Create a wrapper function that will raise a DeprecationWarning
21 before calling the callable.
24 msg
= "%s is deprecated" % callable
25 def deprecatedWrapper(*args
, **kwargs
):
27 warnings
.warn(msg
, DeprecationWarning, stacklevel
=2)
28 return callable(*args
, **kwargs
)
29 deprecatedWrapper
.__doc
__ = msg
30 return deprecatedWrapper
33 #----------------------------------------------------------------------------
35 NOT_FOUND
= _core_
.NOT_FOUND
36 VSCROLL
= _core_
.VSCROLL
37 HSCROLL
= _core_
.HSCROLL
38 CAPTION
= _core_
.CAPTION
39 DOUBLE_BORDER
= _core_
.DOUBLE_BORDER
40 SUNKEN_BORDER
= _core_
.SUNKEN_BORDER
41 RAISED_BORDER
= _core_
.RAISED_BORDER
42 BORDER
= _core_
.BORDER
43 SIMPLE_BORDER
= _core_
.SIMPLE_BORDER
44 STATIC_BORDER
= _core_
.STATIC_BORDER
45 TRANSPARENT_WINDOW
= _core_
.TRANSPARENT_WINDOW
46 NO_BORDER
= _core_
.NO_BORDER
47 TAB_TRAVERSAL
= _core_
.TAB_TRAVERSAL
48 WANTS_CHARS
= _core_
.WANTS_CHARS
49 POPUP_WINDOW
= _core_
.POPUP_WINDOW
50 CENTER_FRAME
= _core_
.CENTER_FRAME
51 CENTRE_ON_SCREEN
= _core_
.CENTRE_ON_SCREEN
52 CENTER_ON_SCREEN
= _core_
.CENTER_ON_SCREEN
53 ED_CLIENT_MARGIN
= _core_
.ED_CLIENT_MARGIN
54 ED_BUTTONS_BOTTOM
= _core_
.ED_BUTTONS_BOTTOM
55 ED_BUTTONS_RIGHT
= _core_
.ED_BUTTONS_RIGHT
56 ED_STATIC_LINE
= _core_
.ED_STATIC_LINE
57 EXT_DIALOG_STYLE
= _core_
.EXT_DIALOG_STYLE
58 CLIP_CHILDREN
= _core_
.CLIP_CHILDREN
59 CLIP_SIBLINGS
= _core_
.CLIP_SIBLINGS
60 ALWAYS_SHOW_SB
= _core_
.ALWAYS_SHOW_SB
61 RETAINED
= _core_
.RETAINED
62 BACKINGSTORE
= _core_
.BACKINGSTORE
63 COLOURED
= _core_
.COLOURED
64 FIXED_LENGTH
= _core_
.FIXED_LENGTH
65 LB_NEEDED_SB
= _core_
.LB_NEEDED_SB
66 LB_ALWAYS_SB
= _core_
.LB_ALWAYS_SB
67 LB_SORT
= _core_
.LB_SORT
68 LB_SINGLE
= _core_
.LB_SINGLE
69 LB_MULTIPLE
= _core_
.LB_MULTIPLE
70 LB_EXTENDED
= _core_
.LB_EXTENDED
71 LB_OWNERDRAW
= _core_
.LB_OWNERDRAW
72 LB_HSCROLL
= _core_
.LB_HSCROLL
73 PROCESS_ENTER
= _core_
.PROCESS_ENTER
74 PASSWORD
= _core_
.PASSWORD
75 CB_SIMPLE
= _core_
.CB_SIMPLE
76 CB_DROPDOWN
= _core_
.CB_DROPDOWN
77 CB_SORT
= _core_
.CB_SORT
78 CB_READONLY
= _core_
.CB_READONLY
79 RA_HORIZONTAL
= _core_
.RA_HORIZONTAL
80 RA_VERTICAL
= _core_
.RA_VERTICAL
81 RA_SPECIFY_ROWS
= _core_
.RA_SPECIFY_ROWS
82 RA_SPECIFY_COLS
= _core_
.RA_SPECIFY_COLS
83 RB_GROUP
= _core_
.RB_GROUP
84 RB_SINGLE
= _core_
.RB_SINGLE
85 SL_HORIZONTAL
= _core_
.SL_HORIZONTAL
86 SL_VERTICAL
= _core_
.SL_VERTICAL
87 SL_AUTOTICKS
= _core_
.SL_AUTOTICKS
88 SL_LABELS
= _core_
.SL_LABELS
89 SL_LEFT
= _core_
.SL_LEFT
90 SL_TOP
= _core_
.SL_TOP
91 SL_RIGHT
= _core_
.SL_RIGHT
92 SL_BOTTOM
= _core_
.SL_BOTTOM
93 SL_BOTH
= _core_
.SL_BOTH
94 SL_SELRANGE
= _core_
.SL_SELRANGE
95 SB_HORIZONTAL
= _core_
.SB_HORIZONTAL
96 SB_VERTICAL
= _core_
.SB_VERTICAL
97 ST_SIZEGRIP
= _core_
.ST_SIZEGRIP
98 ST_NO_AUTORESIZE
= _core_
.ST_NO_AUTORESIZE
99 FLOOD_SURFACE
= _core_
.FLOOD_SURFACE
100 FLOOD_BORDER
= _core_
.FLOOD_BORDER
101 ODDEVEN_RULE
= _core_
.ODDEVEN_RULE
102 WINDING_RULE
= _core_
.WINDING_RULE
103 TOOL_TOP
= _core_
.TOOL_TOP
104 TOOL_BOTTOM
= _core_
.TOOL_BOTTOM
105 TOOL_LEFT
= _core_
.TOOL_LEFT
106 TOOL_RIGHT
= _core_
.TOOL_RIGHT
108 YES_NO
= _core_
.YES_NO
109 CANCEL
= _core_
.CANCEL
112 NO_DEFAULT
= _core_
.NO_DEFAULT
113 YES_DEFAULT
= _core_
.YES_DEFAULT
114 ICON_EXCLAMATION
= _core_
.ICON_EXCLAMATION
115 ICON_HAND
= _core_
.ICON_HAND
116 ICON_QUESTION
= _core_
.ICON_QUESTION
117 ICON_INFORMATION
= _core_
.ICON_INFORMATION
118 ICON_STOP
= _core_
.ICON_STOP
119 ICON_ASTERISK
= _core_
.ICON_ASTERISK
120 ICON_MASK
= _core_
.ICON_MASK
121 ICON_WARNING
= _core_
.ICON_WARNING
122 ICON_ERROR
= _core_
.ICON_ERROR
123 FORWARD
= _core_
.FORWARD
124 BACKWARD
= _core_
.BACKWARD
129 SIZE_AUTO_WIDTH
= _core_
.SIZE_AUTO_WIDTH
130 SIZE_AUTO_HEIGHT
= _core_
.SIZE_AUTO_HEIGHT
131 SIZE_AUTO
= _core_
.SIZE_AUTO
132 SIZE_USE_EXISTING
= _core_
.SIZE_USE_EXISTING
133 SIZE_ALLOW_MINUS_ONE
= _core_
.SIZE_ALLOW_MINUS_ONE
134 PORTRAIT
= _core_
.PORTRAIT
135 LANDSCAPE
= _core_
.LANDSCAPE
136 PRINT_QUALITY_HIGH
= _core_
.PRINT_QUALITY_HIGH
137 PRINT_QUALITY_MEDIUM
= _core_
.PRINT_QUALITY_MEDIUM
138 PRINT_QUALITY_LOW
= _core_
.PRINT_QUALITY_LOW
139 PRINT_QUALITY_DRAFT
= _core_
.PRINT_QUALITY_DRAFT
140 ID_ANY
= _core_
.ID_ANY
141 ID_SEPARATOR
= _core_
.ID_SEPARATOR
142 ID_LOWEST
= _core_
.ID_LOWEST
143 ID_OPEN
= _core_
.ID_OPEN
144 ID_CLOSE
= _core_
.ID_CLOSE
145 ID_NEW
= _core_
.ID_NEW
146 ID_SAVE
= _core_
.ID_SAVE
147 ID_SAVEAS
= _core_
.ID_SAVEAS
148 ID_REVERT
= _core_
.ID_REVERT
149 ID_EXIT
= _core_
.ID_EXIT
150 ID_UNDO
= _core_
.ID_UNDO
151 ID_REDO
= _core_
.ID_REDO
152 ID_HELP
= _core_
.ID_HELP
153 ID_PRINT
= _core_
.ID_PRINT
154 ID_PRINT_SETUP
= _core_
.ID_PRINT_SETUP
155 ID_PREVIEW
= _core_
.ID_PREVIEW
156 ID_ABOUT
= _core_
.ID_ABOUT
157 ID_HELP_CONTENTS
= _core_
.ID_HELP_CONTENTS
158 ID_HELP_COMMANDS
= _core_
.ID_HELP_COMMANDS
159 ID_HELP_PROCEDURES
= _core_
.ID_HELP_PROCEDURES
160 ID_HELP_CONTEXT
= _core_
.ID_HELP_CONTEXT
161 ID_CLOSE_ALL
= _core_
.ID_CLOSE_ALL
162 ID_PREFERENCES
= _core_
.ID_PREFERENCES
163 ID_CUT
= _core_
.ID_CUT
164 ID_COPY
= _core_
.ID_COPY
165 ID_PASTE
= _core_
.ID_PASTE
166 ID_CLEAR
= _core_
.ID_CLEAR
167 ID_FIND
= _core_
.ID_FIND
168 ID_DUPLICATE
= _core_
.ID_DUPLICATE
169 ID_SELECTALL
= _core_
.ID_SELECTALL
170 ID_DELETE
= _core_
.ID_DELETE
171 ID_REPLACE
= _core_
.ID_REPLACE
172 ID_REPLACE_ALL
= _core_
.ID_REPLACE_ALL
173 ID_PROPERTIES
= _core_
.ID_PROPERTIES
174 ID_VIEW_DETAILS
= _core_
.ID_VIEW_DETAILS
175 ID_VIEW_LARGEICONS
= _core_
.ID_VIEW_LARGEICONS
176 ID_VIEW_SMALLICONS
= _core_
.ID_VIEW_SMALLICONS
177 ID_VIEW_LIST
= _core_
.ID_VIEW_LIST
178 ID_VIEW_SORTDATE
= _core_
.ID_VIEW_SORTDATE
179 ID_VIEW_SORTNAME
= _core_
.ID_VIEW_SORTNAME
180 ID_VIEW_SORTSIZE
= _core_
.ID_VIEW_SORTSIZE
181 ID_VIEW_SORTTYPE
= _core_
.ID_VIEW_SORTTYPE
182 ID_FILE1
= _core_
.ID_FILE1
183 ID_FILE2
= _core_
.ID_FILE2
184 ID_FILE3
= _core_
.ID_FILE3
185 ID_FILE4
= _core_
.ID_FILE4
186 ID_FILE5
= _core_
.ID_FILE5
187 ID_FILE6
= _core_
.ID_FILE6
188 ID_FILE7
= _core_
.ID_FILE7
189 ID_FILE8
= _core_
.ID_FILE8
190 ID_FILE9
= _core_
.ID_FILE9
192 ID_CANCEL
= _core_
.ID_CANCEL
193 ID_APPLY
= _core_
.ID_APPLY
194 ID_YES
= _core_
.ID_YES
196 ID_STATIC
= _core_
.ID_STATIC
197 ID_FORWARD
= _core_
.ID_FORWARD
198 ID_BACKWARD
= _core_
.ID_BACKWARD
199 ID_DEFAULT
= _core_
.ID_DEFAULT
200 ID_MORE
= _core_
.ID_MORE
201 ID_SETUP
= _core_
.ID_SETUP
202 ID_RESET
= _core_
.ID_RESET
203 ID_CONTEXT_HELP
= _core_
.ID_CONTEXT_HELP
204 ID_YESTOALL
= _core_
.ID_YESTOALL
205 ID_NOTOALL
= _core_
.ID_NOTOALL
206 ID_ABORT
= _core_
.ID_ABORT
207 ID_RETRY
= _core_
.ID_RETRY
208 ID_IGNORE
= _core_
.ID_IGNORE
209 ID_ADD
= _core_
.ID_ADD
210 ID_REMOVE
= _core_
.ID_REMOVE
212 ID_DOWN
= _core_
.ID_DOWN
213 ID_HOME
= _core_
.ID_HOME
214 ID_REFRESH
= _core_
.ID_REFRESH
215 ID_STOP
= _core_
.ID_STOP
216 ID_INDEX
= _core_
.ID_INDEX
217 ID_BOLD
= _core_
.ID_BOLD
218 ID_ITALIC
= _core_
.ID_ITALIC
219 ID_JUSTIFY_CENTER
= _core_
.ID_JUSTIFY_CENTER
220 ID_JUSTIFY_FILL
= _core_
.ID_JUSTIFY_FILL
221 ID_JUSTIFY_RIGHT
= _core_
.ID_JUSTIFY_RIGHT
222 ID_JUSTIFY_LEFT
= _core_
.ID_JUSTIFY_LEFT
223 ID_UNDERLINE
= _core_
.ID_UNDERLINE
224 ID_INDENT
= _core_
.ID_INDENT
225 ID_UNINDENT
= _core_
.ID_UNINDENT
226 ID_ZOOM_100
= _core_
.ID_ZOOM_100
227 ID_ZOOM_FIT
= _core_
.ID_ZOOM_FIT
228 ID_ZOOM_IN
= _core_
.ID_ZOOM_IN
229 ID_ZOOM_OUT
= _core_
.ID_ZOOM_OUT
230 ID_UNDELETE
= _core_
.ID_UNDELETE
231 ID_REVERT_TO_SAVED
= _core_
.ID_REVERT_TO_SAVED
232 ID_HIGHEST
= _core_
.ID_HIGHEST
235 HIDE_READONLY
= _core_
.HIDE_READONLY
236 OVERWRITE_PROMPT
= _core_
.OVERWRITE_PROMPT
237 FILE_MUST_EXIST
= _core_
.FILE_MUST_EXIST
238 MULTIPLE
= _core_
.MULTIPLE
239 CHANGE_DIR
= _core_
.CHANGE_DIR
240 ACCEL_ALT
= _core_
.ACCEL_ALT
241 ACCEL_CTRL
= _core_
.ACCEL_CTRL
242 ACCEL_SHIFT
= _core_
.ACCEL_SHIFT
243 ACCEL_NORMAL
= _core_
.ACCEL_NORMAL
244 PD_AUTO_HIDE
= _core_
.PD_AUTO_HIDE
245 PD_APP_MODAL
= _core_
.PD_APP_MODAL
246 PD_CAN_ABORT
= _core_
.PD_CAN_ABORT
247 PD_ELAPSED_TIME
= _core_
.PD_ELAPSED_TIME
248 PD_ESTIMATED_TIME
= _core_
.PD_ESTIMATED_TIME
249 PD_REMAINING_TIME
= _core_
.PD_REMAINING_TIME
250 DD_NEW_DIR_BUTTON
= _core_
.DD_NEW_DIR_BUTTON
251 DD_DEFAULT_STYLE
= _core_
.DD_DEFAULT_STYLE
252 MENU_TEAROFF
= _core_
.MENU_TEAROFF
253 MB_DOCKABLE
= _core_
.MB_DOCKABLE
254 NO_FULL_REPAINT_ON_RESIZE
= _core_
.NO_FULL_REPAINT_ON_RESIZE
255 FULL_REPAINT_ON_RESIZE
= _core_
.FULL_REPAINT_ON_RESIZE
256 LI_HORIZONTAL
= _core_
.LI_HORIZONTAL
257 LI_VERTICAL
= _core_
.LI_VERTICAL
258 WS_EX_VALIDATE_RECURSIVELY
= _core_
.WS_EX_VALIDATE_RECURSIVELY
259 WS_EX_BLOCK_EVENTS
= _core_
.WS_EX_BLOCK_EVENTS
260 WS_EX_TRANSIENT
= _core_
.WS_EX_TRANSIENT
261 WS_EX_THEMED_BACKGROUND
= _core_
.WS_EX_THEMED_BACKGROUND
262 WS_EX_PROCESS_IDLE
= _core_
.WS_EX_PROCESS_IDLE
263 WS_EX_PROCESS_UI_UPDATES
= _core_
.WS_EX_PROCESS_UI_UPDATES
264 MM_TEXT
= _core_
.MM_TEXT
265 MM_LOMETRIC
= _core_
.MM_LOMETRIC
266 MM_HIMETRIC
= _core_
.MM_HIMETRIC
267 MM_LOENGLISH
= _core_
.MM_LOENGLISH
268 MM_HIENGLISH
= _core_
.MM_HIENGLISH
269 MM_TWIPS
= _core_
.MM_TWIPS
270 MM_ISOTROPIC
= _core_
.MM_ISOTROPIC
271 MM_ANISOTROPIC
= _core_
.MM_ANISOTROPIC
272 MM_POINTS
= _core_
.MM_POINTS
273 MM_METRIC
= _core_
.MM_METRIC
274 CENTRE
= _core_
.CENTRE
275 CENTER
= _core_
.CENTER
276 HORIZONTAL
= _core_
.HORIZONTAL
277 VERTICAL
= _core_
.VERTICAL
284 BOTTOM
= _core_
.BOTTOM
290 ALIGN_NOT
= _core_
.ALIGN_NOT
291 ALIGN_CENTER_HORIZONTAL
= _core_
.ALIGN_CENTER_HORIZONTAL
292 ALIGN_CENTRE_HORIZONTAL
= _core_
.ALIGN_CENTRE_HORIZONTAL
293 ALIGN_LEFT
= _core_
.ALIGN_LEFT
294 ALIGN_TOP
= _core_
.ALIGN_TOP
295 ALIGN_RIGHT
= _core_
.ALIGN_RIGHT
296 ALIGN_BOTTOM
= _core_
.ALIGN_BOTTOM
297 ALIGN_CENTER_VERTICAL
= _core_
.ALIGN_CENTER_VERTICAL
298 ALIGN_CENTRE_VERTICAL
= _core_
.ALIGN_CENTRE_VERTICAL
299 ALIGN_CENTER
= _core_
.ALIGN_CENTER
300 ALIGN_CENTRE
= _core_
.ALIGN_CENTRE
301 ALIGN_MASK
= _core_
.ALIGN_MASK
302 STRETCH_NOT
= _core_
.STRETCH_NOT
303 SHRINK
= _core_
.SHRINK
305 EXPAND
= _core_
.EXPAND
306 SHAPED
= _core_
.SHAPED
307 FIXED_MINSIZE
= _core_
.FIXED_MINSIZE
309 ADJUST_MINSIZE
= _core_
.ADJUST_MINSIZE
310 BORDER_DEFAULT
= _core_
.BORDER_DEFAULT
311 BORDER_NONE
= _core_
.BORDER_NONE
312 BORDER_STATIC
= _core_
.BORDER_STATIC
313 BORDER_SIMPLE
= _core_
.BORDER_SIMPLE
314 BORDER_RAISED
= _core_
.BORDER_RAISED
315 BORDER_SUNKEN
= _core_
.BORDER_SUNKEN
316 BORDER_DOUBLE
= _core_
.BORDER_DOUBLE
317 BORDER_MASK
= _core_
.BORDER_MASK
318 BG_STYLE_SYSTEM
= _core_
.BG_STYLE_SYSTEM
319 BG_STYLE_COLOUR
= _core_
.BG_STYLE_COLOUR
320 BG_STYLE_CUSTOM
= _core_
.BG_STYLE_CUSTOM
321 DEFAULT
= _core_
.DEFAULT
322 DECORATIVE
= _core_
.DECORATIVE
324 SCRIPT
= _core_
.SCRIPT
326 MODERN
= _core_
.MODERN
327 TELETYPE
= _core_
.TELETYPE
328 VARIABLE
= _core_
.VARIABLE
330 NORMAL
= _core_
.NORMAL
333 ITALIC
= _core_
.ITALIC
337 LONG_DASH
= _core_
.LONG_DASH
338 SHORT_DASH
= _core_
.SHORT_DASH
339 DOT_DASH
= _core_
.DOT_DASH
340 USER_DASH
= _core_
.USER_DASH
341 TRANSPARENT
= _core_
.TRANSPARENT
342 STIPPLE
= _core_
.STIPPLE
343 BDIAGONAL_HATCH
= _core_
.BDIAGONAL_HATCH
344 CROSSDIAG_HATCH
= _core_
.CROSSDIAG_HATCH
345 FDIAGONAL_HATCH
= _core_
.FDIAGONAL_HATCH
346 CROSS_HATCH
= _core_
.CROSS_HATCH
347 HORIZONTAL_HATCH
= _core_
.HORIZONTAL_HATCH
348 VERTICAL_HATCH
= _core_
.VERTICAL_HATCH
349 JOIN_BEVEL
= _core_
.JOIN_BEVEL
350 JOIN_MITER
= _core_
.JOIN_MITER
351 JOIN_ROUND
= _core_
.JOIN_ROUND
352 CAP_ROUND
= _core_
.CAP_ROUND
353 CAP_PROJECTING
= _core_
.CAP_PROJECTING
354 CAP_BUTT
= _core_
.CAP_BUTT
357 INVERT
= _core_
.INVERT
358 OR_REVERSE
= _core_
.OR_REVERSE
359 AND_REVERSE
= _core_
.AND_REVERSE
362 AND_INVERT
= _core_
.AND_INVERT
366 SRC_INVERT
= _core_
.SRC_INVERT
367 OR_INVERT
= _core_
.OR_INVERT
371 WXK_BACK
= _core_
.WXK_BACK
372 WXK_TAB
= _core_
.WXK_TAB
373 WXK_RETURN
= _core_
.WXK_RETURN
374 WXK_ESCAPE
= _core_
.WXK_ESCAPE
375 WXK_SPACE
= _core_
.WXK_SPACE
376 WXK_DELETE
= _core_
.WXK_DELETE
377 WXK_START
= _core_
.WXK_START
378 WXK_LBUTTON
= _core_
.WXK_LBUTTON
379 WXK_RBUTTON
= _core_
.WXK_RBUTTON
380 WXK_CANCEL
= _core_
.WXK_CANCEL
381 WXK_MBUTTON
= _core_
.WXK_MBUTTON
382 WXK_CLEAR
= _core_
.WXK_CLEAR
383 WXK_SHIFT
= _core_
.WXK_SHIFT
384 WXK_ALT
= _core_
.WXK_ALT
385 WXK_CONTROL
= _core_
.WXK_CONTROL
386 WXK_MENU
= _core_
.WXK_MENU
387 WXK_PAUSE
= _core_
.WXK_PAUSE
388 WXK_CAPITAL
= _core_
.WXK_CAPITAL
389 WXK_PRIOR
= _core_
.WXK_PRIOR
390 WXK_NEXT
= _core_
.WXK_NEXT
391 WXK_END
= _core_
.WXK_END
392 WXK_HOME
= _core_
.WXK_HOME
393 WXK_LEFT
= _core_
.WXK_LEFT
394 WXK_UP
= _core_
.WXK_UP
395 WXK_RIGHT
= _core_
.WXK_RIGHT
396 WXK_DOWN
= _core_
.WXK_DOWN
397 WXK_SELECT
= _core_
.WXK_SELECT
398 WXK_PRINT
= _core_
.WXK_PRINT
399 WXK_EXECUTE
= _core_
.WXK_EXECUTE
400 WXK_SNAPSHOT
= _core_
.WXK_SNAPSHOT
401 WXK_INSERT
= _core_
.WXK_INSERT
402 WXK_HELP
= _core_
.WXK_HELP
403 WXK_NUMPAD0
= _core_
.WXK_NUMPAD0
404 WXK_NUMPAD1
= _core_
.WXK_NUMPAD1
405 WXK_NUMPAD2
= _core_
.WXK_NUMPAD2
406 WXK_NUMPAD3
= _core_
.WXK_NUMPAD3
407 WXK_NUMPAD4
= _core_
.WXK_NUMPAD4
408 WXK_NUMPAD5
= _core_
.WXK_NUMPAD5
409 WXK_NUMPAD6
= _core_
.WXK_NUMPAD6
410 WXK_NUMPAD7
= _core_
.WXK_NUMPAD7
411 WXK_NUMPAD8
= _core_
.WXK_NUMPAD8
412 WXK_NUMPAD9
= _core_
.WXK_NUMPAD9
413 WXK_MULTIPLY
= _core_
.WXK_MULTIPLY
414 WXK_ADD
= _core_
.WXK_ADD
415 WXK_SEPARATOR
= _core_
.WXK_SEPARATOR
416 WXK_SUBTRACT
= _core_
.WXK_SUBTRACT
417 WXK_DECIMAL
= _core_
.WXK_DECIMAL
418 WXK_DIVIDE
= _core_
.WXK_DIVIDE
419 WXK_F1
= _core_
.WXK_F1
420 WXK_F2
= _core_
.WXK_F2
421 WXK_F3
= _core_
.WXK_F3
422 WXK_F4
= _core_
.WXK_F4
423 WXK_F5
= _core_
.WXK_F5
424 WXK_F6
= _core_
.WXK_F6
425 WXK_F7
= _core_
.WXK_F7
426 WXK_F8
= _core_
.WXK_F8
427 WXK_F9
= _core_
.WXK_F9
428 WXK_F10
= _core_
.WXK_F10
429 WXK_F11
= _core_
.WXK_F11
430 WXK_F12
= _core_
.WXK_F12
431 WXK_F13
= _core_
.WXK_F13
432 WXK_F14
= _core_
.WXK_F14
433 WXK_F15
= _core_
.WXK_F15
434 WXK_F16
= _core_
.WXK_F16
435 WXK_F17
= _core_
.WXK_F17
436 WXK_F18
= _core_
.WXK_F18
437 WXK_F19
= _core_
.WXK_F19
438 WXK_F20
= _core_
.WXK_F20
439 WXK_F21
= _core_
.WXK_F21
440 WXK_F22
= _core_
.WXK_F22
441 WXK_F23
= _core_
.WXK_F23
442 WXK_F24
= _core_
.WXK_F24
443 WXK_NUMLOCK
= _core_
.WXK_NUMLOCK
444 WXK_SCROLL
= _core_
.WXK_SCROLL
445 WXK_PAGEUP
= _core_
.WXK_PAGEUP
446 WXK_PAGEDOWN
= _core_
.WXK_PAGEDOWN
447 WXK_NUMPAD_SPACE
= _core_
.WXK_NUMPAD_SPACE
448 WXK_NUMPAD_TAB
= _core_
.WXK_NUMPAD_TAB
449 WXK_NUMPAD_ENTER
= _core_
.WXK_NUMPAD_ENTER
450 WXK_NUMPAD_F1
= _core_
.WXK_NUMPAD_F1
451 WXK_NUMPAD_F2
= _core_
.WXK_NUMPAD_F2
452 WXK_NUMPAD_F3
= _core_
.WXK_NUMPAD_F3
453 WXK_NUMPAD_F4
= _core_
.WXK_NUMPAD_F4
454 WXK_NUMPAD_HOME
= _core_
.WXK_NUMPAD_HOME
455 WXK_NUMPAD_LEFT
= _core_
.WXK_NUMPAD_LEFT
456 WXK_NUMPAD_UP
= _core_
.WXK_NUMPAD_UP
457 WXK_NUMPAD_RIGHT
= _core_
.WXK_NUMPAD_RIGHT
458 WXK_NUMPAD_DOWN
= _core_
.WXK_NUMPAD_DOWN
459 WXK_NUMPAD_PRIOR
= _core_
.WXK_NUMPAD_PRIOR
460 WXK_NUMPAD_PAGEUP
= _core_
.WXK_NUMPAD_PAGEUP
461 WXK_NUMPAD_NEXT
= _core_
.WXK_NUMPAD_NEXT
462 WXK_NUMPAD_PAGEDOWN
= _core_
.WXK_NUMPAD_PAGEDOWN
463 WXK_NUMPAD_END
= _core_
.WXK_NUMPAD_END
464 WXK_NUMPAD_BEGIN
= _core_
.WXK_NUMPAD_BEGIN
465 WXK_NUMPAD_INSERT
= _core_
.WXK_NUMPAD_INSERT
466 WXK_NUMPAD_DELETE
= _core_
.WXK_NUMPAD_DELETE
467 WXK_NUMPAD_EQUAL
= _core_
.WXK_NUMPAD_EQUAL
468 WXK_NUMPAD_MULTIPLY
= _core_
.WXK_NUMPAD_MULTIPLY
469 WXK_NUMPAD_ADD
= _core_
.WXK_NUMPAD_ADD
470 WXK_NUMPAD_SEPARATOR
= _core_
.WXK_NUMPAD_SEPARATOR
471 WXK_NUMPAD_SUBTRACT
= _core_
.WXK_NUMPAD_SUBTRACT
472 WXK_NUMPAD_DECIMAL
= _core_
.WXK_NUMPAD_DECIMAL
473 WXK_NUMPAD_DIVIDE
= _core_
.WXK_NUMPAD_DIVIDE
474 WXK_WINDOWS_LEFT
= _core_
.WXK_WINDOWS_LEFT
475 WXK_WINDOWS_RIGHT
= _core_
.WXK_WINDOWS_RIGHT
476 WXK_WINDOWS_MENU
= _core_
.WXK_WINDOWS_MENU
477 PAPER_NONE
= _core_
.PAPER_NONE
478 PAPER_LETTER
= _core_
.PAPER_LETTER
479 PAPER_LEGAL
= _core_
.PAPER_LEGAL
480 PAPER_A4
= _core_
.PAPER_A4
481 PAPER_CSHEET
= _core_
.PAPER_CSHEET
482 PAPER_DSHEET
= _core_
.PAPER_DSHEET
483 PAPER_ESHEET
= _core_
.PAPER_ESHEET
484 PAPER_LETTERSMALL
= _core_
.PAPER_LETTERSMALL
485 PAPER_TABLOID
= _core_
.PAPER_TABLOID
486 PAPER_LEDGER
= _core_
.PAPER_LEDGER
487 PAPER_STATEMENT
= _core_
.PAPER_STATEMENT
488 PAPER_EXECUTIVE
= _core_
.PAPER_EXECUTIVE
489 PAPER_A3
= _core_
.PAPER_A3
490 PAPER_A4SMALL
= _core_
.PAPER_A4SMALL
491 PAPER_A5
= _core_
.PAPER_A5
492 PAPER_B4
= _core_
.PAPER_B4
493 PAPER_B5
= _core_
.PAPER_B5
494 PAPER_FOLIO
= _core_
.PAPER_FOLIO
495 PAPER_QUARTO
= _core_
.PAPER_QUARTO
496 PAPER_10X14
= _core_
.PAPER_10X14
497 PAPER_11X17
= _core_
.PAPER_11X17
498 PAPER_NOTE
= _core_
.PAPER_NOTE
499 PAPER_ENV_9
= _core_
.PAPER_ENV_9
500 PAPER_ENV_10
= _core_
.PAPER_ENV_10
501 PAPER_ENV_11
= _core_
.PAPER_ENV_11
502 PAPER_ENV_12
= _core_
.PAPER_ENV_12
503 PAPER_ENV_14
= _core_
.PAPER_ENV_14
504 PAPER_ENV_DL
= _core_
.PAPER_ENV_DL
505 PAPER_ENV_C5
= _core_
.PAPER_ENV_C5
506 PAPER_ENV_C3
= _core_
.PAPER_ENV_C3
507 PAPER_ENV_C4
= _core_
.PAPER_ENV_C4
508 PAPER_ENV_C6
= _core_
.PAPER_ENV_C6
509 PAPER_ENV_C65
= _core_
.PAPER_ENV_C65
510 PAPER_ENV_B4
= _core_
.PAPER_ENV_B4
511 PAPER_ENV_B5
= _core_
.PAPER_ENV_B5
512 PAPER_ENV_B6
= _core_
.PAPER_ENV_B6
513 PAPER_ENV_ITALY
= _core_
.PAPER_ENV_ITALY
514 PAPER_ENV_MONARCH
= _core_
.PAPER_ENV_MONARCH
515 PAPER_ENV_PERSONAL
= _core_
.PAPER_ENV_PERSONAL
516 PAPER_FANFOLD_US
= _core_
.PAPER_FANFOLD_US
517 PAPER_FANFOLD_STD_GERMAN
= _core_
.PAPER_FANFOLD_STD_GERMAN
518 PAPER_FANFOLD_LGL_GERMAN
= _core_
.PAPER_FANFOLD_LGL_GERMAN
519 PAPER_ISO_B4
= _core_
.PAPER_ISO_B4
520 PAPER_JAPANESE_POSTCARD
= _core_
.PAPER_JAPANESE_POSTCARD
521 PAPER_9X11
= _core_
.PAPER_9X11
522 PAPER_10X11
= _core_
.PAPER_10X11
523 PAPER_15X11
= _core_
.PAPER_15X11
524 PAPER_ENV_INVITE
= _core_
.PAPER_ENV_INVITE
525 PAPER_LETTER_EXTRA
= _core_
.PAPER_LETTER_EXTRA
526 PAPER_LEGAL_EXTRA
= _core_
.PAPER_LEGAL_EXTRA
527 PAPER_TABLOID_EXTRA
= _core_
.PAPER_TABLOID_EXTRA
528 PAPER_A4_EXTRA
= _core_
.PAPER_A4_EXTRA
529 PAPER_LETTER_TRANSVERSE
= _core_
.PAPER_LETTER_TRANSVERSE
530 PAPER_A4_TRANSVERSE
= _core_
.PAPER_A4_TRANSVERSE
531 PAPER_LETTER_EXTRA_TRANSVERSE
= _core_
.PAPER_LETTER_EXTRA_TRANSVERSE
532 PAPER_A_PLUS
= _core_
.PAPER_A_PLUS
533 PAPER_B_PLUS
= _core_
.PAPER_B_PLUS
534 PAPER_LETTER_PLUS
= _core_
.PAPER_LETTER_PLUS
535 PAPER_A4_PLUS
= _core_
.PAPER_A4_PLUS
536 PAPER_A5_TRANSVERSE
= _core_
.PAPER_A5_TRANSVERSE
537 PAPER_B5_TRANSVERSE
= _core_
.PAPER_B5_TRANSVERSE
538 PAPER_A3_EXTRA
= _core_
.PAPER_A3_EXTRA
539 PAPER_A5_EXTRA
= _core_
.PAPER_A5_EXTRA
540 PAPER_B5_EXTRA
= _core_
.PAPER_B5_EXTRA
541 PAPER_A2
= _core_
.PAPER_A2
542 PAPER_A3_TRANSVERSE
= _core_
.PAPER_A3_TRANSVERSE
543 PAPER_A3_EXTRA_TRANSVERSE
= _core_
.PAPER_A3_EXTRA_TRANSVERSE
544 DUPLEX_SIMPLEX
= _core_
.DUPLEX_SIMPLEX
545 DUPLEX_HORIZONTAL
= _core_
.DUPLEX_HORIZONTAL
546 DUPLEX_VERTICAL
= _core_
.DUPLEX_VERTICAL
547 ITEM_SEPARATOR
= _core_
.ITEM_SEPARATOR
548 ITEM_NORMAL
= _core_
.ITEM_NORMAL
549 ITEM_CHECK
= _core_
.ITEM_CHECK
550 ITEM_RADIO
= _core_
.ITEM_RADIO
551 ITEM_MAX
= _core_
.ITEM_MAX
552 HT_NOWHERE
= _core_
.HT_NOWHERE
553 HT_SCROLLBAR_FIRST
= _core_
.HT_SCROLLBAR_FIRST
554 HT_SCROLLBAR_ARROW_LINE_1
= _core_
.HT_SCROLLBAR_ARROW_LINE_1
555 HT_SCROLLBAR_ARROW_LINE_2
= _core_
.HT_SCROLLBAR_ARROW_LINE_2
556 HT_SCROLLBAR_ARROW_PAGE_1
= _core_
.HT_SCROLLBAR_ARROW_PAGE_1
557 HT_SCROLLBAR_ARROW_PAGE_2
= _core_
.HT_SCROLLBAR_ARROW_PAGE_2
558 HT_SCROLLBAR_THUMB
= _core_
.HT_SCROLLBAR_THUMB
559 HT_SCROLLBAR_BAR_1
= _core_
.HT_SCROLLBAR_BAR_1
560 HT_SCROLLBAR_BAR_2
= _core_
.HT_SCROLLBAR_BAR_2
561 HT_SCROLLBAR_LAST
= _core_
.HT_SCROLLBAR_LAST
562 HT_WINDOW_OUTSIDE
= _core_
.HT_WINDOW_OUTSIDE
563 HT_WINDOW_INSIDE
= _core_
.HT_WINDOW_INSIDE
564 HT_WINDOW_VERT_SCROLLBAR
= _core_
.HT_WINDOW_VERT_SCROLLBAR
565 HT_WINDOW_HORZ_SCROLLBAR
= _core_
.HT_WINDOW_HORZ_SCROLLBAR
566 HT_WINDOW_CORNER
= _core_
.HT_WINDOW_CORNER
567 HT_MAX
= _core_
.HT_MAX
568 MOD_NONE
= _core_
.MOD_NONE
569 MOD_ALT
= _core_
.MOD_ALT
570 MOD_CONTROL
= _core_
.MOD_CONTROL
571 MOD_SHIFT
= _core_
.MOD_SHIFT
572 MOD_WIN
= _core_
.MOD_WIN
573 UPDATE_UI_NONE
= _core_
.UPDATE_UI_NONE
574 UPDATE_UI_RECURSE
= _core_
.UPDATE_UI_RECURSE
575 UPDATE_UI_FROMIDLE
= _core_
.UPDATE_UI_FROMIDLE
576 #---------------------------------------------------------------------------
578 class Object(object):
580 The base class for most wx objects, although in wxPython not
581 much functionality is needed nor exposed.
583 def __init__(self
): raise RuntimeError, "No constructor defined"
585 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
586 def GetClassName(*args
, **kwargs
):
588 GetClassName(self) -> String
590 Returns the class name of the C++ class using wxRTTI.
592 return _core_
.Object_GetClassName(*args
, **kwargs
)
594 def Destroy(*args
, **kwargs
):
598 Deletes the C++ object this Python object is a proxy for.
600 return _core_
.Object_Destroy(*args
, **kwargs
)
603 class ObjectPtr(Object
):
604 def __init__(self
, this
):
606 if not hasattr(self
,"thisown"): self
.thisown
= 0
607 self
.__class
__ = Object
608 _core_
.Object_swigregister(ObjectPtr
)
609 _wxPySetDictionary
= _core_
._wxPySetDictionary
611 _wxPyFixStockObjects
= _core_
._wxPyFixStockObjects
614 EmptyString
= cvar
.EmptyString
616 #---------------------------------------------------------------------------
618 BITMAP_TYPE_INVALID
= _core_
.BITMAP_TYPE_INVALID
619 BITMAP_TYPE_BMP
= _core_
.BITMAP_TYPE_BMP
620 BITMAP_TYPE_ICO
= _core_
.BITMAP_TYPE_ICO
621 BITMAP_TYPE_CUR
= _core_
.BITMAP_TYPE_CUR
622 BITMAP_TYPE_XBM
= _core_
.BITMAP_TYPE_XBM
623 BITMAP_TYPE_XBM_DATA
= _core_
.BITMAP_TYPE_XBM_DATA
624 BITMAP_TYPE_XPM
= _core_
.BITMAP_TYPE_XPM
625 BITMAP_TYPE_XPM_DATA
= _core_
.BITMAP_TYPE_XPM_DATA
626 BITMAP_TYPE_TIF
= _core_
.BITMAP_TYPE_TIF
627 BITMAP_TYPE_GIF
= _core_
.BITMAP_TYPE_GIF
628 BITMAP_TYPE_PNG
= _core_
.BITMAP_TYPE_PNG
629 BITMAP_TYPE_JPEG
= _core_
.BITMAP_TYPE_JPEG
630 BITMAP_TYPE_PNM
= _core_
.BITMAP_TYPE_PNM
631 BITMAP_TYPE_PCX
= _core_
.BITMAP_TYPE_PCX
632 BITMAP_TYPE_PICT
= _core_
.BITMAP_TYPE_PICT
633 BITMAP_TYPE_ICON
= _core_
.BITMAP_TYPE_ICON
634 BITMAP_TYPE_ANI
= _core_
.BITMAP_TYPE_ANI
635 BITMAP_TYPE_IFF
= _core_
.BITMAP_TYPE_IFF
636 BITMAP_TYPE_MACCURSOR
= _core_
.BITMAP_TYPE_MACCURSOR
637 BITMAP_TYPE_ANY
= _core_
.BITMAP_TYPE_ANY
638 CURSOR_NONE
= _core_
.CURSOR_NONE
639 CURSOR_ARROW
= _core_
.CURSOR_ARROW
640 CURSOR_RIGHT_ARROW
= _core_
.CURSOR_RIGHT_ARROW
641 CURSOR_BULLSEYE
= _core_
.CURSOR_BULLSEYE
642 CURSOR_CHAR
= _core_
.CURSOR_CHAR
643 CURSOR_CROSS
= _core_
.CURSOR_CROSS
644 CURSOR_HAND
= _core_
.CURSOR_HAND
645 CURSOR_IBEAM
= _core_
.CURSOR_IBEAM
646 CURSOR_LEFT_BUTTON
= _core_
.CURSOR_LEFT_BUTTON
647 CURSOR_MAGNIFIER
= _core_
.CURSOR_MAGNIFIER
648 CURSOR_MIDDLE_BUTTON
= _core_
.CURSOR_MIDDLE_BUTTON
649 CURSOR_NO_ENTRY
= _core_
.CURSOR_NO_ENTRY
650 CURSOR_PAINT_BRUSH
= _core_
.CURSOR_PAINT_BRUSH
651 CURSOR_PENCIL
= _core_
.CURSOR_PENCIL
652 CURSOR_POINT_LEFT
= _core_
.CURSOR_POINT_LEFT
653 CURSOR_POINT_RIGHT
= _core_
.CURSOR_POINT_RIGHT
654 CURSOR_QUESTION_ARROW
= _core_
.CURSOR_QUESTION_ARROW
655 CURSOR_RIGHT_BUTTON
= _core_
.CURSOR_RIGHT_BUTTON
656 CURSOR_SIZENESW
= _core_
.CURSOR_SIZENESW
657 CURSOR_SIZENS
= _core_
.CURSOR_SIZENS
658 CURSOR_SIZENWSE
= _core_
.CURSOR_SIZENWSE
659 CURSOR_SIZEWE
= _core_
.CURSOR_SIZEWE
660 CURSOR_SIZING
= _core_
.CURSOR_SIZING
661 CURSOR_SPRAYCAN
= _core_
.CURSOR_SPRAYCAN
662 CURSOR_WAIT
= _core_
.CURSOR_WAIT
663 CURSOR_WATCH
= _core_
.CURSOR_WATCH
664 CURSOR_BLANK
= _core_
.CURSOR_BLANK
665 CURSOR_DEFAULT
= _core_
.CURSOR_DEFAULT
666 CURSOR_COPY_ARROW
= _core_
.CURSOR_COPY_ARROW
667 CURSOR_ARROWWAIT
= _core_
.CURSOR_ARROWWAIT
668 CURSOR_MAX
= _core_
.CURSOR_MAX
669 #---------------------------------------------------------------------------
673 wx.Size is a useful data structure used to represent the size of
674 something. It simply contians integer width and height proprtites.
675 In most places in wxPython where a wx.Size is expected a
676 (width,height) tuple can be used instead.
679 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
680 width
= property(_core_
.Size_width_get
, _core_
.Size_width_set
)
681 height
= property(_core_
.Size_height_get
, _core_
.Size_height_set
)
682 x
= width
; y
= height
683 def __init__(self
, *args
, **kwargs
):
685 __init__(self, int w=0, int h=0) -> Size
687 Creates a size object.
689 newobj
= _core_
.new_Size(*args
, **kwargs
)
690 self
.this
= newobj
.this
693 def __del__(self
, destroy
=_core_
.delete_Size
):
696 if self
.thisown
: destroy(self
)
699 def __eq__(*args
, **kwargs
):
701 __eq__(self, Size sz) -> bool
703 Test for equality of wx.Size objects.
705 return _core_
.Size___eq__(*args
, **kwargs
)
707 def __ne__(*args
, **kwargs
):
709 __ne__(self, Size sz) -> bool
713 return _core_
.Size___ne__(*args
, **kwargs
)
715 def __add__(*args
, **kwargs
):
717 __add__(self, Size sz) -> Size
719 Add sz's proprties to this and return the result.
721 return _core_
.Size___add__(*args
, **kwargs
)
723 def __sub__(*args
, **kwargs
):
725 __sub__(self, Size sz) -> Size
727 Subtract sz's properties from this and return the result.
729 return _core_
.Size___sub__(*args
, **kwargs
)
731 def IncTo(*args
, **kwargs
):
735 Increments this object so that both of its dimensions are not less
736 than the corresponding dimensions of the size.
738 return _core_
.Size_IncTo(*args
, **kwargs
)
740 def DecTo(*args
, **kwargs
):
744 Decrements this object so that both of its dimensions are not greater
745 than the corresponding dimensions of the size.
747 return _core_
.Size_DecTo(*args
, **kwargs
)
749 def Set(*args
, **kwargs
):
751 Set(self, int w, int h)
753 Set both width and height.
755 return _core_
.Size_Set(*args
, **kwargs
)
757 def SetWidth(*args
, **kwargs
):
758 """SetWidth(self, int w)"""
759 return _core_
.Size_SetWidth(*args
, **kwargs
)
761 def SetHeight(*args
, **kwargs
):
762 """SetHeight(self, int h)"""
763 return _core_
.Size_SetHeight(*args
, **kwargs
)
765 def GetWidth(*args
, **kwargs
):
766 """GetWidth(self) -> int"""
767 return _core_
.Size_GetWidth(*args
, **kwargs
)
769 def GetHeight(*args
, **kwargs
):
770 """GetHeight(self) -> int"""
771 return _core_
.Size_GetHeight(*args
, **kwargs
)
773 def IsFullySpecified(*args
, **kwargs
):
775 IsFullySpecified(self) -> bool
777 Returns True if both components of the size are non-default values.
779 return _core_
.Size_IsFullySpecified(*args
, **kwargs
)
781 def SetDefaults(*args
, **kwargs
):
783 SetDefaults(self, Size size)
785 Combine this size with the other one replacing the default components
786 of this object (i.e. equal to -1) with those of the other.
788 return _core_
.Size_SetDefaults(*args
, **kwargs
)
790 def Get(*args
, **kwargs
):
792 Get() -> (width,height)
794 Returns the width and height properties as a tuple.
796 return _core_
.Size_Get(*args
, **kwargs
)
798 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
799 def __str__(self
): return str(self
.Get())
800 def __repr__(self
): return 'wx.Size'+str(self
.Get())
801 def __len__(self
): return len(self
.Get())
802 def __getitem__(self
, index
): return self
.Get()[index
]
803 def __setitem__(self
, index
, val
):
804 if index
== 0: self
.width
= val
805 elif index
== 1: self
.height
= val
806 else: raise IndexError
807 def __nonzero__(self
): return self
.Get() != (0,0)
808 __safe_for_unpickling__
= True
809 def __reduce__(self
): return (wx
.Size
, self
.Get())
813 def __init__(self
, this
):
815 if not hasattr(self
,"thisown"): self
.thisown
= 0
816 self
.__class
__ = Size
817 _core_
.Size_swigregister(SizePtr
)
819 #---------------------------------------------------------------------------
821 class RealPoint(object):
823 A data structure for representing a point or position with floating
824 point x and y properties. In wxPython most places that expect a
825 wx.RealPoint can also accept a (x,y) tuple.
828 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
829 x
= property(_core_
.RealPoint_x_get
, _core_
.RealPoint_x_set
)
830 y
= property(_core_
.RealPoint_y_get
, _core_
.RealPoint_y_set
)
831 def __init__(self
, *args
, **kwargs
):
833 __init__(self, double x=0.0, double y=0.0) -> RealPoint
835 Create a wx.RealPoint object
837 newobj
= _core_
.new_RealPoint(*args
, **kwargs
)
838 self
.this
= newobj
.this
841 def __del__(self
, destroy
=_core_
.delete_RealPoint
):
844 if self
.thisown
: destroy(self
)
847 def __eq__(*args
, **kwargs
):
849 __eq__(self, RealPoint pt) -> bool
851 Test for equality of wx.RealPoint objects.
853 return _core_
.RealPoint___eq__(*args
, **kwargs
)
855 def __ne__(*args
, **kwargs
):
857 __ne__(self, RealPoint pt) -> bool
859 Test for inequality of wx.RealPoint objects.
861 return _core_
.RealPoint___ne__(*args
, **kwargs
)
863 def __add__(*args
, **kwargs
):
865 __add__(self, RealPoint pt) -> RealPoint
867 Add pt's proprties to this and return the result.
869 return _core_
.RealPoint___add__(*args
, **kwargs
)
871 def __sub__(*args
, **kwargs
):
873 __sub__(self, RealPoint pt) -> RealPoint
875 Subtract pt's proprties from this and return the result
877 return _core_
.RealPoint___sub__(*args
, **kwargs
)
879 def Set(*args
, **kwargs
):
881 Set(self, double x, double y)
883 Set both the x and y properties
885 return _core_
.RealPoint_Set(*args
, **kwargs
)
887 def Get(*args
, **kwargs
):
891 Return the x and y properties as a tuple.
893 return _core_
.RealPoint_Get(*args
, **kwargs
)
895 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
896 def __str__(self
): return str(self
.Get())
897 def __repr__(self
): return 'wx.RealPoint'+str(self
.Get())
898 def __len__(self
): return len(self
.Get())
899 def __getitem__(self
, index
): return self
.Get()[index
]
900 def __setitem__(self
, index
, val
):
901 if index
== 0: self
.x
= val
902 elif index
== 1: self
.y
= val
903 else: raise IndexError
904 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
905 __safe_for_unpickling__
= True
906 def __reduce__(self
): return (wx
.RealPoint
, self
.Get())
909 class RealPointPtr(RealPoint
):
910 def __init__(self
, this
):
912 if not hasattr(self
,"thisown"): self
.thisown
= 0
913 self
.__class
__ = RealPoint
914 _core_
.RealPoint_swigregister(RealPointPtr
)
916 #---------------------------------------------------------------------------
920 A data structure for representing a point or position with integer x
921 and y properties. Most places in wxPython that expect a wx.Point can
922 also accept a (x,y) tuple.
925 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
926 x
= property(_core_
.Point_x_get
, _core_
.Point_x_set
)
927 y
= property(_core_
.Point_y_get
, _core_
.Point_y_set
)
928 def __init__(self
, *args
, **kwargs
):
930 __init__(self, int x=0, int y=0) -> Point
932 Create a wx.Point object
934 newobj
= _core_
.new_Point(*args
, **kwargs
)
935 self
.this
= newobj
.this
938 def __del__(self
, destroy
=_core_
.delete_Point
):
941 if self
.thisown
: destroy(self
)
944 def __eq__(*args
, **kwargs
):
946 __eq__(self, Point pt) -> bool
948 Test for equality of wx.Point objects.
950 return _core_
.Point___eq__(*args
, **kwargs
)
952 def __ne__(*args
, **kwargs
):
954 __ne__(self, Point pt) -> bool
956 Test for inequality of wx.Point objects.
958 return _core_
.Point___ne__(*args
, **kwargs
)
960 def __add__(*args
, **kwargs
):
962 __add__(self, Point pt) -> Point
964 Add pt's proprties to this and return the result.
966 return _core_
.Point___add__(*args
, **kwargs
)
968 def __sub__(*args
, **kwargs
):
970 __sub__(self, Point pt) -> Point
972 Subtract pt's proprties from this and return the result
974 return _core_
.Point___sub__(*args
, **kwargs
)
976 def __iadd__(*args
, **kwargs
):
978 __iadd__(self, Point pt) -> Point
980 Add pt to this object.
982 return _core_
.Point___iadd__(*args
, **kwargs
)
984 def __isub__(*args
, **kwargs
):
986 __isub__(self, Point pt) -> Point
988 Subtract pt from this object.
990 return _core_
.Point___isub__(*args
, **kwargs
)
992 def Set(*args
, **kwargs
):
994 Set(self, long x, long y)
996 Set both the x and y properties
998 return _core_
.Point_Set(*args
, **kwargs
)
1000 def Get(*args
, **kwargs
):
1004 Return the x and y properties as a tuple.
1006 return _core_
.Point_Get(*args
, **kwargs
)
1008 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1009 def __str__(self
): return str(self
.Get())
1010 def __repr__(self
): return 'wx.Point'+str(self
.Get())
1011 def __len__(self
): return len(self
.Get())
1012 def __getitem__(self
, index
): return self
.Get()[index
]
1013 def __setitem__(self
, index
, val
):
1014 if index
== 0: self
.x
= val
1015 elif index
== 1: self
.y
= val
1016 else: raise IndexError
1017 def __nonzero__(self
): return self
.Get() != (0,0)
1018 __safe_for_unpickling__
= True
1019 def __reduce__(self
): return (wx
.Point
, self
.Get())
1022 class PointPtr(Point
):
1023 def __init__(self
, this
):
1025 if not hasattr(self
,"thisown"): self
.thisown
= 0
1026 self
.__class
__ = Point
1027 _core_
.Point_swigregister(PointPtr
)
1029 #---------------------------------------------------------------------------
1033 A class for representing and manipulating rectangles. It has x, y,
1034 width and height properties. In wxPython most palces that expect a
1035 wx.Rect can also accept a (x,y,width,height) tuple.
1038 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1039 def __init__(self
, *args
, **kwargs
):
1041 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1043 Create a new Rect object.
1045 newobj
= _core_
.new_Rect(*args
, **kwargs
)
1046 self
.this
= newobj
.this
1049 def __del__(self
, destroy
=_core_
.delete_Rect
):
1052 if self
.thisown
: destroy(self
)
1055 def GetX(*args
, **kwargs
):
1056 """GetX(self) -> int"""
1057 return _core_
.Rect_GetX(*args
, **kwargs
)
1059 def SetX(*args
, **kwargs
):
1060 """SetX(self, int x)"""
1061 return _core_
.Rect_SetX(*args
, **kwargs
)
1063 def GetY(*args
, **kwargs
):
1064 """GetY(self) -> int"""
1065 return _core_
.Rect_GetY(*args
, **kwargs
)
1067 def SetY(*args
, **kwargs
):
1068 """SetY(self, int y)"""
1069 return _core_
.Rect_SetY(*args
, **kwargs
)
1071 def GetWidth(*args
, **kwargs
):
1072 """GetWidth(self) -> int"""
1073 return _core_
.Rect_GetWidth(*args
, **kwargs
)
1075 def SetWidth(*args
, **kwargs
):
1076 """SetWidth(self, int w)"""
1077 return _core_
.Rect_SetWidth(*args
, **kwargs
)
1079 def GetHeight(*args
, **kwargs
):
1080 """GetHeight(self) -> int"""
1081 return _core_
.Rect_GetHeight(*args
, **kwargs
)
1083 def SetHeight(*args
, **kwargs
):
1084 """SetHeight(self, int h)"""
1085 return _core_
.Rect_SetHeight(*args
, **kwargs
)
1087 def GetPosition(*args
, **kwargs
):
1088 """GetPosition(self) -> Point"""
1089 return _core_
.Rect_GetPosition(*args
, **kwargs
)
1091 def SetPosition(*args
, **kwargs
):
1092 """SetPosition(self, Point p)"""
1093 return _core_
.Rect_SetPosition(*args
, **kwargs
)
1095 def GetSize(*args
, **kwargs
):
1096 """GetSize(self) -> Size"""
1097 return _core_
.Rect_GetSize(*args
, **kwargs
)
1099 def SetSize(*args
, **kwargs
):
1100 """SetSize(self, Size s)"""
1101 return _core_
.Rect_SetSize(*args
, **kwargs
)
1103 def GetTopLeft(*args
, **kwargs
):
1104 """GetTopLeft(self) -> Point"""
1105 return _core_
.Rect_GetTopLeft(*args
, **kwargs
)
1107 def SetTopLeft(*args
, **kwargs
):
1108 """SetTopLeft(self, Point p)"""
1109 return _core_
.Rect_SetTopLeft(*args
, **kwargs
)
1111 def GetBottomRight(*args
, **kwargs
):
1112 """GetBottomRight(self) -> Point"""
1113 return _core_
.Rect_GetBottomRight(*args
, **kwargs
)
1115 def SetBottomRight(*args
, **kwargs
):
1116 """SetBottomRight(self, Point p)"""
1117 return _core_
.Rect_SetBottomRight(*args
, **kwargs
)
1119 def GetLeft(*args
, **kwargs
):
1120 """GetLeft(self) -> int"""
1121 return _core_
.Rect_GetLeft(*args
, **kwargs
)
1123 def GetTop(*args
, **kwargs
):
1124 """GetTop(self) -> int"""
1125 return _core_
.Rect_GetTop(*args
, **kwargs
)
1127 def GetBottom(*args
, **kwargs
):
1128 """GetBottom(self) -> int"""
1129 return _core_
.Rect_GetBottom(*args
, **kwargs
)
1131 def GetRight(*args
, **kwargs
):
1132 """GetRight(self) -> int"""
1133 return _core_
.Rect_GetRight(*args
, **kwargs
)
1135 def SetLeft(*args
, **kwargs
):
1136 """SetLeft(self, int left)"""
1137 return _core_
.Rect_SetLeft(*args
, **kwargs
)
1139 def SetRight(*args
, **kwargs
):
1140 """SetRight(self, int right)"""
1141 return _core_
.Rect_SetRight(*args
, **kwargs
)
1143 def SetTop(*args
, **kwargs
):
1144 """SetTop(self, int top)"""
1145 return _core_
.Rect_SetTop(*args
, **kwargs
)
1147 def SetBottom(*args
, **kwargs
):
1148 """SetBottom(self, int bottom)"""
1149 return _core_
.Rect_SetBottom(*args
, **kwargs
)
1151 position
= property(GetPosition
, SetPosition
)
1152 size
= property(GetSize
, SetSize
)
1153 left
= property(GetLeft
, SetLeft
)
1154 right
= property(GetRight
, SetRight
)
1155 top
= property(GetTop
, SetTop
)
1156 bottom
= property(GetBottom
, SetBottom
)
1158 def Inflate(*args
, **kwargs
):
1160 Inflate(self, int dx, int dy) -> Rect
1162 Increase the rectangle size by dx in x direction and dy in y
1163 direction. Both or one of) parameters may be negative to decrease the
1166 return _core_
.Rect_Inflate(*args
, **kwargs
)
1168 def Deflate(*args
, **kwargs
):
1170 Deflate(self, int dx, int dy) -> Rect
1172 Decrease the rectangle size by dx in x direction and dy in y
1173 direction. Both or one of) parameters may be negative to increase the
1174 rectngle size. This method is the opposite of Inflate.
1176 return _core_
.Rect_Deflate(*args
, **kwargs
)
1178 def OffsetXY(*args
, **kwargs
):
1180 OffsetXY(self, int dx, int dy)
1182 Moves the rectangle by the specified offset. If dx is positive, the
1183 rectangle is moved to the right, if dy is positive, it is moved to the
1184 bottom, otherwise it is moved to the left or top respectively.
1186 return _core_
.Rect_OffsetXY(*args
, **kwargs
)
1188 def Offset(*args
, **kwargs
):
1190 Offset(self, Point pt)
1192 Same as OffsetXY but uses dx,dy from Point
1194 return _core_
.Rect_Offset(*args
, **kwargs
)
1196 def Intersect(*args
, **kwargs
):
1198 Intersect(self, Rect rect) -> Rect
1200 Return the intersectsion of this rectangle and rect.
1202 return _core_
.Rect_Intersect(*args
, **kwargs
)
1204 def __add__(*args
, **kwargs
):
1206 __add__(self, Rect rect) -> Rect
1208 Add the properties of rect to this rectangle and return the result.
1210 return _core_
.Rect___add__(*args
, **kwargs
)
1212 def __iadd__(*args
, **kwargs
):
1214 __iadd__(self, Rect rect) -> Rect
1216 Add the properties of rect to this rectangle, updating this rectangle.
1218 return _core_
.Rect___iadd__(*args
, **kwargs
)
1220 def __eq__(*args
, **kwargs
):
1222 __eq__(self, Rect rect) -> bool
1226 return _core_
.Rect___eq__(*args
, **kwargs
)
1228 def __ne__(*args
, **kwargs
):
1230 __ne__(self, Rect rect) -> bool
1232 Test for inequality.
1234 return _core_
.Rect___ne__(*args
, **kwargs
)
1236 def InsideXY(*args
, **kwargs
):
1238 InsideXY(self, int x, int y) -> bool
1240 Return True if the point is (not strcitly) inside the rect.
1242 return _core_
.Rect_InsideXY(*args
, **kwargs
)
1244 def Inside(*args
, **kwargs
):
1246 Inside(self, Point pt) -> bool
1248 Return True if the point is (not strcitly) inside the rect.
1250 return _core_
.Rect_Inside(*args
, **kwargs
)
1252 def Intersects(*args
, **kwargs
):
1254 Intersects(self, Rect rect) -> bool
1256 Returns True if the rectangles have a non empty intersection.
1258 return _core_
.Rect_Intersects(*args
, **kwargs
)
1260 x
= property(_core_
.Rect_x_get
, _core_
.Rect_x_set
)
1261 y
= property(_core_
.Rect_y_get
, _core_
.Rect_y_set
)
1262 width
= property(_core_
.Rect_width_get
, _core_
.Rect_width_set
)
1263 height
= property(_core_
.Rect_height_get
, _core_
.Rect_height_set
)
1264 def Set(*args
, **kwargs
):
1266 Set(self, int x=0, int y=0, int width=0, int height=0)
1268 Set all rectangle properties.
1270 return _core_
.Rect_Set(*args
, **kwargs
)
1272 def Get(*args
, **kwargs
):
1274 Get() -> (x,y,width,height)
1276 Return the rectangle properties as a tuple.
1278 return _core_
.Rect_Get(*args
, **kwargs
)
1280 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1281 def __str__(self
): return str(self
.Get())
1282 def __repr__(self
): return 'wx.Rect'+str(self
.Get())
1283 def __len__(self
): return len(self
.Get())
1284 def __getitem__(self
, index
): return self
.Get()[index
]
1285 def __setitem__(self
, index
, val
):
1286 if index
== 0: self
.x
= val
1287 elif index
== 1: self
.y
= val
1288 elif index
== 2: self
.width
= val
1289 elif index
== 3: self
.height
= val
1290 else: raise IndexError
1291 def __nonzero__(self
): return self
.Get() != (0,0,0,0)
1292 __safe_for_unpickling__
= True
1293 def __reduce__(self
): return (wx
.Rect
, self
.Get())
1296 class RectPtr(Rect
):
1297 def __init__(self
, this
):
1299 if not hasattr(self
,"thisown"): self
.thisown
= 0
1300 self
.__class
__ = Rect
1301 _core_
.Rect_swigregister(RectPtr
)
1303 def RectPP(*args
, **kwargs
):
1305 RectPP(Point topLeft, Point bottomRight) -> Rect
1307 Create a new Rect object from Points representing two corners.
1309 val
= _core_
.new_RectPP(*args
, **kwargs
)
1313 def RectPS(*args
, **kwargs
):
1315 RectPS(Point pos, Size size) -> Rect
1317 Create a new Rect from a position and size.
1319 val
= _core_
.new_RectPS(*args
, **kwargs
)
1323 def RectS(*args
, **kwargs
):
1325 RectS(Size size) -> Rect
1327 Create a new Rect from a size only.
1329 val
= _core_
.new_RectS(*args
, **kwargs
)
1334 def IntersectRect(*args
, **kwargs
):
1336 IntersectRect(Rect r1, Rect r2) -> Rect
1338 Calculate and return the intersection of r1 and r2.
1340 return _core_
.IntersectRect(*args
, **kwargs
)
1341 #---------------------------------------------------------------------------
1343 class Point2D(object):
1345 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1346 with floating point values.
1349 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1350 def __init__(self
, *args
, **kwargs
):
1352 __init__(self, double x=0.0, double y=0.0) -> Point2D
1354 Create a w.Point2D object.
1356 newobj
= _core_
.new_Point2D(*args
, **kwargs
)
1357 self
.this
= newobj
.this
1360 def GetFloor(*args
, **kwargs
):
1366 return _core_
.Point2D_GetFloor(*args
, **kwargs
)
1368 def GetRounded(*args
, **kwargs
):
1370 GetRounded() -> (x,y)
1374 return _core_
.Point2D_GetRounded(*args
, **kwargs
)
1376 def GetVectorLength(*args
, **kwargs
):
1377 """GetVectorLength(self) -> double"""
1378 return _core_
.Point2D_GetVectorLength(*args
, **kwargs
)
1380 def GetVectorAngle(*args
, **kwargs
):
1381 """GetVectorAngle(self) -> double"""
1382 return _core_
.Point2D_GetVectorAngle(*args
, **kwargs
)
1384 def SetVectorLength(*args
, **kwargs
):
1385 """SetVectorLength(self, double length)"""
1386 return _core_
.Point2D_SetVectorLength(*args
, **kwargs
)
1388 def SetVectorAngle(*args
, **kwargs
):
1389 """SetVectorAngle(self, double degrees)"""
1390 return _core_
.Point2D_SetVectorAngle(*args
, **kwargs
)
1392 def SetPolarCoordinates(self
, angle
, length
):
1393 self
.SetVectorLength(length
)
1394 self
.SetVectorAngle(angle
)
1395 def Normalize(self
):
1396 self
.SetVectorLength(1.0)
1398 def GetDistance(*args
, **kwargs
):
1399 """GetDistance(self, Point2D pt) -> double"""
1400 return _core_
.Point2D_GetDistance(*args
, **kwargs
)
1402 def GetDistanceSquare(*args
, **kwargs
):
1403 """GetDistanceSquare(self, Point2D pt) -> double"""
1404 return _core_
.Point2D_GetDistanceSquare(*args
, **kwargs
)
1406 def GetDotProduct(*args
, **kwargs
):
1407 """GetDotProduct(self, Point2D vec) -> double"""
1408 return _core_
.Point2D_GetDotProduct(*args
, **kwargs
)
1410 def GetCrossProduct(*args
, **kwargs
):
1411 """GetCrossProduct(self, Point2D vec) -> double"""
1412 return _core_
.Point2D_GetCrossProduct(*args
, **kwargs
)
1414 def __neg__(*args
, **kwargs
):
1416 __neg__(self) -> Point2D
1418 the reflection of this point
1420 return _core_
.Point2D___neg__(*args
, **kwargs
)
1422 def __iadd__(*args
, **kwargs
):
1423 """__iadd__(self, Point2D pt) -> Point2D"""
1424 return _core_
.Point2D___iadd__(*args
, **kwargs
)
1426 def __isub__(*args
, **kwargs
):
1427 """__isub__(self, Point2D pt) -> Point2D"""
1428 return _core_
.Point2D___isub__(*args
, **kwargs
)
1430 def __imul__(*args
, **kwargs
):
1431 """__imul__(self, Point2D pt) -> Point2D"""
1432 return _core_
.Point2D___imul__(*args
, **kwargs
)
1434 def __idiv__(*args
, **kwargs
):
1435 """__idiv__(self, Point2D pt) -> Point2D"""
1436 return _core_
.Point2D___idiv__(*args
, **kwargs
)
1438 def __eq__(*args
, **kwargs
):
1440 __eq__(self, Point2D pt) -> bool
1444 return _core_
.Point2D___eq__(*args
, **kwargs
)
1446 def __ne__(*args
, **kwargs
):
1448 __ne__(self, Point2D pt) -> bool
1452 return _core_
.Point2D___ne__(*args
, **kwargs
)
1454 x
= property(_core_
.Point2D_x_get
, _core_
.Point2D_x_set
)
1455 y
= property(_core_
.Point2D_y_get
, _core_
.Point2D_y_set
)
1456 def Set(*args
, **kwargs
):
1457 """Set(self, double x=0, double y=0)"""
1458 return _core_
.Point2D_Set(*args
, **kwargs
)
1460 def Get(*args
, **kwargs
):
1464 Return x and y properties as a tuple.
1466 return _core_
.Point2D_Get(*args
, **kwargs
)
1468 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
1469 def __str__(self
): return str(self
.Get())
1470 def __repr__(self
): return 'wx.Point2D'+str(self
.Get())
1471 def __len__(self
): return len(self
.Get())
1472 def __getitem__(self
, index
): return self
.Get()[index
]
1473 def __setitem__(self
, index
, val
):
1474 if index
== 0: self
.x
= val
1475 elif index
== 1: self
.y
= val
1476 else: raise IndexError
1477 def __nonzero__(self
): return self
.Get() != (0.0, 0.0)
1478 __safe_for_unpickling__
= True
1479 def __reduce__(self
): return (wx
.Point2D
, self
.Get())
1482 class Point2DPtr(Point2D
):
1483 def __init__(self
, this
):
1485 if not hasattr(self
,"thisown"): self
.thisown
= 0
1486 self
.__class
__ = Point2D
1487 _core_
.Point2D_swigregister(Point2DPtr
)
1489 def Point2DCopy(*args
, **kwargs
):
1491 Point2DCopy(Point2D pt) -> Point2D
1493 Create a w.Point2D object.
1495 val
= _core_
.new_Point2DCopy(*args
, **kwargs
)
1499 def Point2DFromPoint(*args
, **kwargs
):
1501 Point2DFromPoint(Point pt) -> Point2D
1503 Create a w.Point2D object.
1505 val
= _core_
.new_Point2DFromPoint(*args
, **kwargs
)
1509 #---------------------------------------------------------------------------
1511 FromStart
= _core_
.FromStart
1512 FromCurrent
= _core_
.FromCurrent
1513 FromEnd
= _core_
.FromEnd
1514 class InputStream(object):
1516 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1517 def __init__(self
, *args
, **kwargs
):
1518 """__init__(self, PyObject p) -> InputStream"""
1519 newobj
= _core_
.new_InputStream(*args
, **kwargs
)
1520 self
.this
= newobj
.this
1523 def close(*args
, **kwargs
):
1525 return _core_
.InputStream_close(*args
, **kwargs
)
1527 def flush(*args
, **kwargs
):
1529 return _core_
.InputStream_flush(*args
, **kwargs
)
1531 def eof(*args
, **kwargs
):
1532 """eof(self) -> bool"""
1533 return _core_
.InputStream_eof(*args
, **kwargs
)
1535 def read(*args
, **kwargs
):
1536 """read(self, int size=-1) -> PyObject"""
1537 return _core_
.InputStream_read(*args
, **kwargs
)
1539 def readline(*args
, **kwargs
):
1540 """readline(self, int size=-1) -> PyObject"""
1541 return _core_
.InputStream_readline(*args
, **kwargs
)
1543 def readlines(*args
, **kwargs
):
1544 """readlines(self, int sizehint=-1) -> PyObject"""
1545 return _core_
.InputStream_readlines(*args
, **kwargs
)
1547 def seek(*args
, **kwargs
):
1548 """seek(self, int offset, int whence=0)"""
1549 return _core_
.InputStream_seek(*args
, **kwargs
)
1551 def tell(*args
, **kwargs
):
1552 """tell(self) -> int"""
1553 return _core_
.InputStream_tell(*args
, **kwargs
)
1555 def Peek(*args
, **kwargs
):
1556 """Peek(self) -> char"""
1557 return _core_
.InputStream_Peek(*args
, **kwargs
)
1559 def GetC(*args
, **kwargs
):
1560 """GetC(self) -> char"""
1561 return _core_
.InputStream_GetC(*args
, **kwargs
)
1563 def LastRead(*args
, **kwargs
):
1564 """LastRead(self) -> size_t"""
1565 return _core_
.InputStream_LastRead(*args
, **kwargs
)
1567 def CanRead(*args
, **kwargs
):
1568 """CanRead(self) -> bool"""
1569 return _core_
.InputStream_CanRead(*args
, **kwargs
)
1571 def Eof(*args
, **kwargs
):
1572 """Eof(self) -> bool"""
1573 return _core_
.InputStream_Eof(*args
, **kwargs
)
1575 def Ungetch(*args
, **kwargs
):
1576 """Ungetch(self, char c) -> bool"""
1577 return _core_
.InputStream_Ungetch(*args
, **kwargs
)
1579 def SeekI(*args
, **kwargs
):
1580 """SeekI(self, long pos, int mode=FromStart) -> long"""
1581 return _core_
.InputStream_SeekI(*args
, **kwargs
)
1583 def TellI(*args
, **kwargs
):
1584 """TellI(self) -> long"""
1585 return _core_
.InputStream_TellI(*args
, **kwargs
)
1588 class InputStreamPtr(InputStream
):
1589 def __init__(self
, this
):
1591 if not hasattr(self
,"thisown"): self
.thisown
= 0
1592 self
.__class
__ = InputStream
1593 _core_
.InputStream_swigregister(InputStreamPtr
)
1594 DefaultPosition
= cvar
.DefaultPosition
1595 DefaultSize
= cvar
.DefaultSize
1597 class OutputStream(object):
1598 def __init__(self
): raise RuntimeError, "No constructor defined"
1600 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1601 def write(*args
, **kwargs
):
1602 """write(self, PyObject obj)"""
1603 return _core_
.OutputStream_write(*args
, **kwargs
)
1606 class OutputStreamPtr(OutputStream
):
1607 def __init__(self
, this
):
1609 if not hasattr(self
,"thisown"): self
.thisown
= 0
1610 self
.__class
__ = OutputStream
1611 _core_
.OutputStream_swigregister(OutputStreamPtr
)
1613 #---------------------------------------------------------------------------
1615 class FSFile(Object
):
1617 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1618 def __init__(self
, *args
, **kwargs
):
1620 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1621 DateTime modif) -> FSFile
1623 newobj
= _core_
.new_FSFile(*args
, **kwargs
)
1624 self
.this
= newobj
.this
1627 self
.thisown
= 0 # It will normally be deleted by the user of the wxFileSystem
1629 def __del__(self
, destroy
=_core_
.delete_FSFile
):
1632 if self
.thisown
: destroy(self
)
1635 def GetStream(*args
, **kwargs
):
1636 """GetStream(self) -> InputStream"""
1637 return _core_
.FSFile_GetStream(*args
, **kwargs
)
1639 def GetMimeType(*args
, **kwargs
):
1640 """GetMimeType(self) -> String"""
1641 return _core_
.FSFile_GetMimeType(*args
, **kwargs
)
1643 def GetLocation(*args
, **kwargs
):
1644 """GetLocation(self) -> String"""
1645 return _core_
.FSFile_GetLocation(*args
, **kwargs
)
1647 def GetAnchor(*args
, **kwargs
):
1648 """GetAnchor(self) -> String"""
1649 return _core_
.FSFile_GetAnchor(*args
, **kwargs
)
1651 def GetModificationTime(*args
, **kwargs
):
1652 """GetModificationTime(self) -> DateTime"""
1653 return _core_
.FSFile_GetModificationTime(*args
, **kwargs
)
1656 class FSFilePtr(FSFile
):
1657 def __init__(self
, this
):
1659 if not hasattr(self
,"thisown"): self
.thisown
= 0
1660 self
.__class
__ = FSFile
1661 _core_
.FSFile_swigregister(FSFilePtr
)
1663 class CPPFileSystemHandler(object):
1664 def __init__(self
): raise RuntimeError, "No constructor defined"
1666 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1668 class CPPFileSystemHandlerPtr(CPPFileSystemHandler
):
1669 def __init__(self
, this
):
1671 if not hasattr(self
,"thisown"): self
.thisown
= 0
1672 self
.__class
__ = CPPFileSystemHandler
1673 _core_
.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr
)
1675 class FileSystemHandler(CPPFileSystemHandler
):
1677 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1678 def __init__(self
, *args
, **kwargs
):
1679 """__init__(self) -> FileSystemHandler"""
1680 newobj
= _core_
.new_FileSystemHandler(*args
, **kwargs
)
1681 self
.this
= newobj
.this
1684 self
._setCallbackInfo
(self
, FileSystemHandler
)
1686 def _setCallbackInfo(*args
, **kwargs
):
1687 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1688 return _core_
.FileSystemHandler__setCallbackInfo(*args
, **kwargs
)
1690 def CanOpen(*args
, **kwargs
):
1691 """CanOpen(self, String location) -> bool"""
1692 return _core_
.FileSystemHandler_CanOpen(*args
, **kwargs
)
1694 def OpenFile(*args
, **kwargs
):
1695 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1696 return _core_
.FileSystemHandler_OpenFile(*args
, **kwargs
)
1698 def FindFirst(*args
, **kwargs
):
1699 """FindFirst(self, String spec, int flags=0) -> String"""
1700 return _core_
.FileSystemHandler_FindFirst(*args
, **kwargs
)
1702 def FindNext(*args
, **kwargs
):
1703 """FindNext(self) -> String"""
1704 return _core_
.FileSystemHandler_FindNext(*args
, **kwargs
)
1706 def GetProtocol(*args
, **kwargs
):
1707 """GetProtocol(self, String location) -> String"""
1708 return _core_
.FileSystemHandler_GetProtocol(*args
, **kwargs
)
1710 def GetLeftLocation(*args
, **kwargs
):
1711 """GetLeftLocation(self, String location) -> String"""
1712 return _core_
.FileSystemHandler_GetLeftLocation(*args
, **kwargs
)
1714 def GetAnchor(*args
, **kwargs
):
1715 """GetAnchor(self, String location) -> String"""
1716 return _core_
.FileSystemHandler_GetAnchor(*args
, **kwargs
)
1718 def GetRightLocation(*args
, **kwargs
):
1719 """GetRightLocation(self, String location) -> String"""
1720 return _core_
.FileSystemHandler_GetRightLocation(*args
, **kwargs
)
1722 def GetMimeTypeFromExt(*args
, **kwargs
):
1723 """GetMimeTypeFromExt(self, String location) -> String"""
1724 return _core_
.FileSystemHandler_GetMimeTypeFromExt(*args
, **kwargs
)
1727 class FileSystemHandlerPtr(FileSystemHandler
):
1728 def __init__(self
, this
):
1730 if not hasattr(self
,"thisown"): self
.thisown
= 0
1731 self
.__class
__ = FileSystemHandler
1732 _core_
.FileSystemHandler_swigregister(FileSystemHandlerPtr
)
1734 class FileSystem(Object
):
1736 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1737 def __init__(self
, *args
, **kwargs
):
1738 """__init__(self) -> FileSystem"""
1739 newobj
= _core_
.new_FileSystem(*args
, **kwargs
)
1740 self
.this
= newobj
.this
1743 def __del__(self
, destroy
=_core_
.delete_FileSystem
):
1746 if self
.thisown
: destroy(self
)
1749 def ChangePathTo(*args
, **kwargs
):
1750 """ChangePathTo(self, String location, bool is_dir=False)"""
1751 return _core_
.FileSystem_ChangePathTo(*args
, **kwargs
)
1753 def GetPath(*args
, **kwargs
):
1754 """GetPath(self) -> String"""
1755 return _core_
.FileSystem_GetPath(*args
, **kwargs
)
1757 def OpenFile(*args
, **kwargs
):
1758 """OpenFile(self, String location) -> FSFile"""
1759 return _core_
.FileSystem_OpenFile(*args
, **kwargs
)
1761 def FindFirst(*args
, **kwargs
):
1762 """FindFirst(self, String spec, int flags=0) -> String"""
1763 return _core_
.FileSystem_FindFirst(*args
, **kwargs
)
1765 def FindNext(*args
, **kwargs
):
1766 """FindNext(self) -> String"""
1767 return _core_
.FileSystem_FindNext(*args
, **kwargs
)
1769 def AddHandler(*args
, **kwargs
):
1770 """AddHandler(CPPFileSystemHandler handler)"""
1771 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1773 AddHandler
= staticmethod(AddHandler
)
1774 def CleanUpHandlers(*args
, **kwargs
):
1775 """CleanUpHandlers()"""
1776 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1778 CleanUpHandlers
= staticmethod(CleanUpHandlers
)
1779 def FileNameToURL(*args
, **kwargs
):
1780 """FileNameToURL(String filename) -> String"""
1781 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1783 FileNameToURL
= staticmethod(FileNameToURL
)
1784 def URLToFileName(*args
, **kwargs
):
1785 """URLToFileName(String url) -> String"""
1786 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1788 URLToFileName
= staticmethod(URLToFileName
)
1790 class FileSystemPtr(FileSystem
):
1791 def __init__(self
, this
):
1793 if not hasattr(self
,"thisown"): self
.thisown
= 0
1794 self
.__class
__ = FileSystem
1795 _core_
.FileSystem_swigregister(FileSystemPtr
)
1797 def FileSystem_AddHandler(*args
, **kwargs
):
1798 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1799 return _core_
.FileSystem_AddHandler(*args
, **kwargs
)
1801 def FileSystem_CleanUpHandlers(*args
, **kwargs
):
1802 """FileSystem_CleanUpHandlers()"""
1803 return _core_
.FileSystem_CleanUpHandlers(*args
, **kwargs
)
1805 def FileSystem_FileNameToURL(*args
, **kwargs
):
1806 """FileSystem_FileNameToURL(String filename) -> String"""
1807 return _core_
.FileSystem_FileNameToURL(*args
, **kwargs
)
1809 def FileSystem_URLToFileName(*args
, **kwargs
):
1810 """FileSystem_URLToFileName(String url) -> String"""
1811 return _core_
.FileSystem_URLToFileName(*args
, **kwargs
)
1813 class InternetFSHandler(CPPFileSystemHandler
):
1815 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1816 def __init__(self
, *args
, **kwargs
):
1817 """__init__(self) -> InternetFSHandler"""
1818 newobj
= _core_
.new_InternetFSHandler(*args
, **kwargs
)
1819 self
.this
= newobj
.this
1822 def CanOpen(*args
, **kwargs
):
1823 """CanOpen(self, String location) -> bool"""
1824 return _core_
.InternetFSHandler_CanOpen(*args
, **kwargs
)
1826 def OpenFile(*args
, **kwargs
):
1827 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1828 return _core_
.InternetFSHandler_OpenFile(*args
, **kwargs
)
1831 class InternetFSHandlerPtr(InternetFSHandler
):
1832 def __init__(self
, this
):
1834 if not hasattr(self
,"thisown"): self
.thisown
= 0
1835 self
.__class
__ = InternetFSHandler
1836 _core_
.InternetFSHandler_swigregister(InternetFSHandlerPtr
)
1838 class ZipFSHandler(CPPFileSystemHandler
):
1840 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1841 def __init__(self
, *args
, **kwargs
):
1842 """__init__(self) -> ZipFSHandler"""
1843 newobj
= _core_
.new_ZipFSHandler(*args
, **kwargs
)
1844 self
.this
= newobj
.this
1847 def CanOpen(*args
, **kwargs
):
1848 """CanOpen(self, String location) -> bool"""
1849 return _core_
.ZipFSHandler_CanOpen(*args
, **kwargs
)
1851 def OpenFile(*args
, **kwargs
):
1852 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1853 return _core_
.ZipFSHandler_OpenFile(*args
, **kwargs
)
1855 def FindFirst(*args
, **kwargs
):
1856 """FindFirst(self, String spec, int flags=0) -> String"""
1857 return _core_
.ZipFSHandler_FindFirst(*args
, **kwargs
)
1859 def FindNext(*args
, **kwargs
):
1860 """FindNext(self) -> String"""
1861 return _core_
.ZipFSHandler_FindNext(*args
, **kwargs
)
1864 class ZipFSHandlerPtr(ZipFSHandler
):
1865 def __init__(self
, this
):
1867 if not hasattr(self
,"thisown"): self
.thisown
= 0
1868 self
.__class
__ = ZipFSHandler
1869 _core_
.ZipFSHandler_swigregister(ZipFSHandlerPtr
)
1872 def __wxMemoryFSHandler_AddFile_wxImage(*args
, **kwargs
):
1873 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1874 return _core_
.__wxMemoryFSHandler
_AddFile
_wxImage
(*args
, **kwargs
)
1876 def __wxMemoryFSHandler_AddFile_wxBitmap(*args
, **kwargs
):
1877 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1878 return _core_
.__wxMemoryFSHandler
_AddFile
_wxBitmap
(*args
, **kwargs
)
1880 def __wxMemoryFSHandler_AddFile_Data(*args
, **kwargs
):
1881 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1882 return _core_
.__wxMemoryFSHandler
_AddFile
_Data
(*args
, **kwargs
)
1883 def MemoryFSHandler_AddFile(filename
, dataItem
, imgType
=-1):
1885 Add 'file' to the memory filesystem. The dataItem parameter can
1886 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1887 arbitrary data. If a bitmap or image is used then the imgType
1888 parameter should specify what kind of image file it should be
1889 written as, wx.BITMAP_TYPE_PNG, etc.
1891 if isinstance(dataItem
, wx
.Image
):
1892 __wxMemoryFSHandler_AddFile_wxImage(filename
, dataItem
, imgType
)
1893 elif isinstance(dataItem
, wx
.Bitmap
):
1894 __wxMemoryFSHandler_AddFile_wxBitmap(filename
, dataItem
, imgType
)
1895 elif type(dataItem
) == str:
1896 __wxMemoryFSHandler_AddFile_Data(filename
, dataItem
)
1898 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1900 class MemoryFSHandler(CPPFileSystemHandler
):
1902 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1903 def __init__(self
, *args
, **kwargs
):
1904 """__init__(self) -> MemoryFSHandler"""
1905 newobj
= _core_
.new_MemoryFSHandler(*args
, **kwargs
)
1906 self
.this
= newobj
.this
1909 def RemoveFile(*args
, **kwargs
):
1910 """RemoveFile(String filename)"""
1911 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1913 RemoveFile
= staticmethod(RemoveFile
)
1914 AddFile
= staticmethod(MemoryFSHandler_AddFile
)
1915 def CanOpen(*args
, **kwargs
):
1916 """CanOpen(self, String location) -> bool"""
1917 return _core_
.MemoryFSHandler_CanOpen(*args
, **kwargs
)
1919 def OpenFile(*args
, **kwargs
):
1920 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1921 return _core_
.MemoryFSHandler_OpenFile(*args
, **kwargs
)
1923 def FindFirst(*args
, **kwargs
):
1924 """FindFirst(self, String spec, int flags=0) -> String"""
1925 return _core_
.MemoryFSHandler_FindFirst(*args
, **kwargs
)
1927 def FindNext(*args
, **kwargs
):
1928 """FindNext(self) -> String"""
1929 return _core_
.MemoryFSHandler_FindNext(*args
, **kwargs
)
1932 class MemoryFSHandlerPtr(MemoryFSHandler
):
1933 def __init__(self
, this
):
1935 if not hasattr(self
,"thisown"): self
.thisown
= 0
1936 self
.__class
__ = MemoryFSHandler
1937 _core_
.MemoryFSHandler_swigregister(MemoryFSHandlerPtr
)
1939 def MemoryFSHandler_RemoveFile(*args
, **kwargs
):
1940 """MemoryFSHandler_RemoveFile(String filename)"""
1941 return _core_
.MemoryFSHandler_RemoveFile(*args
, **kwargs
)
1943 #---------------------------------------------------------------------------
1945 class ImageHandler(Object
):
1946 def __init__(self
): raise RuntimeError, "No constructor defined"
1948 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1949 def GetName(*args
, **kwargs
):
1950 """GetName(self) -> String"""
1951 return _core_
.ImageHandler_GetName(*args
, **kwargs
)
1953 def GetExtension(*args
, **kwargs
):
1954 """GetExtension(self) -> String"""
1955 return _core_
.ImageHandler_GetExtension(*args
, **kwargs
)
1957 def GetType(*args
, **kwargs
):
1958 """GetType(self) -> long"""
1959 return _core_
.ImageHandler_GetType(*args
, **kwargs
)
1961 def GetMimeType(*args
, **kwargs
):
1962 """GetMimeType(self) -> String"""
1963 return _core_
.ImageHandler_GetMimeType(*args
, **kwargs
)
1965 def CanRead(*args
, **kwargs
):
1966 """CanRead(self, String name) -> bool"""
1967 return _core_
.ImageHandler_CanRead(*args
, **kwargs
)
1969 def SetName(*args
, **kwargs
):
1970 """SetName(self, String name)"""
1971 return _core_
.ImageHandler_SetName(*args
, **kwargs
)
1973 def SetExtension(*args
, **kwargs
):
1974 """SetExtension(self, String extension)"""
1975 return _core_
.ImageHandler_SetExtension(*args
, **kwargs
)
1977 def SetType(*args
, **kwargs
):
1978 """SetType(self, long type)"""
1979 return _core_
.ImageHandler_SetType(*args
, **kwargs
)
1981 def SetMimeType(*args
, **kwargs
):
1982 """SetMimeType(self, String mimetype)"""
1983 return _core_
.ImageHandler_SetMimeType(*args
, **kwargs
)
1986 class ImageHandlerPtr(ImageHandler
):
1987 def __init__(self
, this
):
1989 if not hasattr(self
,"thisown"): self
.thisown
= 0
1990 self
.__class
__ = ImageHandler
1991 _core_
.ImageHandler_swigregister(ImageHandlerPtr
)
1993 class ImageHistogram(object):
1995 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1996 def __init__(self
, *args
, **kwargs
):
1997 """__init__(self) -> ImageHistogram"""
1998 newobj
= _core_
.new_ImageHistogram(*args
, **kwargs
)
1999 self
.this
= newobj
.this
2002 def MakeKey(*args
, **kwargs
):
2004 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2006 Get the key in the histogram for the given RGB values
2008 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2010 MakeKey
= staticmethod(MakeKey
)
2011 def FindFirstUnusedColour(*args
, **kwargs
):
2013 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2015 Find first colour that is not used in the image and has higher RGB
2016 values than startR, startG, startB. Returns a tuple consisting of a
2017 success flag and rgb values.
2019 return _core_
.ImageHistogram_FindFirstUnusedColour(*args
, **kwargs
)
2022 class ImageHistogramPtr(ImageHistogram
):
2023 def __init__(self
, this
):
2025 if not hasattr(self
,"thisown"): self
.thisown
= 0
2026 self
.__class
__ = ImageHistogram
2027 _core_
.ImageHistogram_swigregister(ImageHistogramPtr
)
2029 def ImageHistogram_MakeKey(*args
, **kwargs
):
2031 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2033 Get the key in the histogram for the given RGB values
2035 return _core_
.ImageHistogram_MakeKey(*args
, **kwargs
)
2037 class Image(Object
):
2039 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2040 def __init__(self
, *args
, **kwargs
):
2041 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2042 newobj
= _core_
.new_Image(*args
, **kwargs
)
2043 self
.this
= newobj
.this
2046 def __del__(self
, destroy
=_core_
.delete_Image
):
2049 if self
.thisown
: destroy(self
)
2052 def Create(*args
, **kwargs
):
2053 """Create(self, int width, int height)"""
2054 return _core_
.Image_Create(*args
, **kwargs
)
2056 def Destroy(*args
, **kwargs
):
2060 Deletes the C++ object this Python object is a proxy for.
2062 return _core_
.Image_Destroy(*args
, **kwargs
)
2064 def Scale(*args
, **kwargs
):
2065 """Scale(self, int width, int height) -> Image"""
2066 return _core_
.Image_Scale(*args
, **kwargs
)
2068 def ShrinkBy(*args
, **kwargs
):
2069 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2070 return _core_
.Image_ShrinkBy(*args
, **kwargs
)
2072 def Rescale(*args
, **kwargs
):
2073 """Rescale(self, int width, int height) -> Image"""
2074 return _core_
.Image_Rescale(*args
, **kwargs
)
2076 def SetRGB(*args
, **kwargs
):
2077 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2078 return _core_
.Image_SetRGB(*args
, **kwargs
)
2080 def GetRed(*args
, **kwargs
):
2081 """GetRed(self, int x, int y) -> unsigned char"""
2082 return _core_
.Image_GetRed(*args
, **kwargs
)
2084 def GetGreen(*args
, **kwargs
):
2085 """GetGreen(self, int x, int y) -> unsigned char"""
2086 return _core_
.Image_GetGreen(*args
, **kwargs
)
2088 def GetBlue(*args
, **kwargs
):
2089 """GetBlue(self, int x, int y) -> unsigned char"""
2090 return _core_
.Image_GetBlue(*args
, **kwargs
)
2092 def SetAlpha(*args
, **kwargs
):
2093 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2094 return _core_
.Image_SetAlpha(*args
, **kwargs
)
2096 def GetAlpha(*args
, **kwargs
):
2097 """GetAlpha(self, int x, int y) -> unsigned char"""
2098 return _core_
.Image_GetAlpha(*args
, **kwargs
)
2100 def HasAlpha(*args
, **kwargs
):
2101 """HasAlpha(self) -> bool"""
2102 return _core_
.Image_HasAlpha(*args
, **kwargs
)
2104 def FindFirstUnusedColour(*args
, **kwargs
):
2106 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2108 Find first colour that is not used in the image and has higher RGB
2109 values than startR, startG, startB. Returns a tuple consisting of a
2110 success flag and rgb values.
2112 return _core_
.Image_FindFirstUnusedColour(*args
, **kwargs
)
2114 def ConvertAlphaToMask(*args
, **kwargs
):
2116 ConvertAlphaToMask(self, byte threshold=128) -> bool
2118 If the image has alpha channel, this method converts it to mask. All pixels
2119 with alpha value less than ``threshold`` are replaced with mask colour and the
2120 alpha channel is removed. Mask colour is chosen automatically using
2121 `FindFirstUnusedColour`.
2123 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2126 return _core_
.Image_ConvertAlphaToMask(*args
, **kwargs
)
2128 def SetMaskFromImage(*args
, **kwargs
):
2129 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2130 return _core_
.Image_SetMaskFromImage(*args
, **kwargs
)
2132 def CanRead(*args
, **kwargs
):
2133 """CanRead(String name) -> bool"""
2134 return _core_
.Image_CanRead(*args
, **kwargs
)
2136 CanRead
= staticmethod(CanRead
)
2137 def GetImageCount(*args
, **kwargs
):
2138 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2139 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2141 GetImageCount
= staticmethod(GetImageCount
)
2142 def LoadFile(*args
, **kwargs
):
2143 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2144 return _core_
.Image_LoadFile(*args
, **kwargs
)
2146 def LoadMimeFile(*args
, **kwargs
):
2147 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2148 return _core_
.Image_LoadMimeFile(*args
, **kwargs
)
2150 def SaveFile(*args
, **kwargs
):
2151 """SaveFile(self, String name, int type) -> bool"""
2152 return _core_
.Image_SaveFile(*args
, **kwargs
)
2154 def SaveMimeFile(*args
, **kwargs
):
2155 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2156 return _core_
.Image_SaveMimeFile(*args
, **kwargs
)
2158 def CanReadStream(*args
, **kwargs
):
2159 """CanReadStream(InputStream stream) -> bool"""
2160 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2162 CanReadStream
= staticmethod(CanReadStream
)
2163 def LoadStream(*args
, **kwargs
):
2164 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2165 return _core_
.Image_LoadStream(*args
, **kwargs
)
2167 def LoadMimeStream(*args
, **kwargs
):
2168 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2169 return _core_
.Image_LoadMimeStream(*args
, **kwargs
)
2171 def Ok(*args
, **kwargs
):
2172 """Ok(self) -> bool"""
2173 return _core_
.Image_Ok(*args
, **kwargs
)
2175 def GetWidth(*args
, **kwargs
):
2176 """GetWidth(self) -> int"""
2177 return _core_
.Image_GetWidth(*args
, **kwargs
)
2179 def GetHeight(*args
, **kwargs
):
2180 """GetHeight(self) -> int"""
2181 return _core_
.Image_GetHeight(*args
, **kwargs
)
2183 def GetSize(*args
, **kwargs
):
2184 """GetSize(self) -> Size"""
2185 return _core_
.Image_GetSize(*args
, **kwargs
)
2187 def GetSubImage(*args
, **kwargs
):
2188 """GetSubImage(self, Rect rect) -> Image"""
2189 return _core_
.Image_GetSubImage(*args
, **kwargs
)
2191 def Copy(*args
, **kwargs
):
2192 """Copy(self) -> Image"""
2193 return _core_
.Image_Copy(*args
, **kwargs
)
2195 def Paste(*args
, **kwargs
):
2196 """Paste(self, Image image, int x, int y)"""
2197 return _core_
.Image_Paste(*args
, **kwargs
)
2199 def GetData(*args
, **kwargs
):
2200 """GetData(self) -> PyObject"""
2201 return _core_
.Image_GetData(*args
, **kwargs
)
2203 def SetData(*args
, **kwargs
):
2204 """SetData(self, PyObject data)"""
2205 return _core_
.Image_SetData(*args
, **kwargs
)
2207 def GetDataBuffer(*args
, **kwargs
):
2208 """GetDataBuffer(self) -> PyObject"""
2209 return _core_
.Image_GetDataBuffer(*args
, **kwargs
)
2211 def SetDataBuffer(*args
, **kwargs
):
2212 """SetDataBuffer(self, PyObject data)"""
2213 return _core_
.Image_SetDataBuffer(*args
, **kwargs
)
2215 def GetAlphaData(*args
, **kwargs
):
2216 """GetAlphaData(self) -> PyObject"""
2217 return _core_
.Image_GetAlphaData(*args
, **kwargs
)
2219 def SetAlphaData(*args
, **kwargs
):
2220 """SetAlphaData(self, PyObject data)"""
2221 return _core_
.Image_SetAlphaData(*args
, **kwargs
)
2223 def GetAlphaBuffer(*args
, **kwargs
):
2224 """GetAlphaBuffer(self) -> PyObject"""
2225 return _core_
.Image_GetAlphaBuffer(*args
, **kwargs
)
2227 def SetAlphaBuffer(*args
, **kwargs
):
2228 """SetAlphaBuffer(self, PyObject data)"""
2229 return _core_
.Image_SetAlphaBuffer(*args
, **kwargs
)
2231 def SetMaskColour(*args
, **kwargs
):
2232 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2233 return _core_
.Image_SetMaskColour(*args
, **kwargs
)
2235 def GetMaskRed(*args
, **kwargs
):
2236 """GetMaskRed(self) -> unsigned char"""
2237 return _core_
.Image_GetMaskRed(*args
, **kwargs
)
2239 def GetMaskGreen(*args
, **kwargs
):
2240 """GetMaskGreen(self) -> unsigned char"""
2241 return _core_
.Image_GetMaskGreen(*args
, **kwargs
)
2243 def GetMaskBlue(*args
, **kwargs
):
2244 """GetMaskBlue(self) -> unsigned char"""
2245 return _core_
.Image_GetMaskBlue(*args
, **kwargs
)
2247 def SetMask(*args
, **kwargs
):
2248 """SetMask(self, bool mask=True)"""
2249 return _core_
.Image_SetMask(*args
, **kwargs
)
2251 def HasMask(*args
, **kwargs
):
2252 """HasMask(self) -> bool"""
2253 return _core_
.Image_HasMask(*args
, **kwargs
)
2255 def Rotate(*args
, **kwargs
):
2257 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2258 Point offset_after_rotation=None) -> Image
2260 return _core_
.Image_Rotate(*args
, **kwargs
)
2262 def Rotate90(*args
, **kwargs
):
2263 """Rotate90(self, bool clockwise=True) -> Image"""
2264 return _core_
.Image_Rotate90(*args
, **kwargs
)
2266 def Mirror(*args
, **kwargs
):
2267 """Mirror(self, bool horizontally=True) -> Image"""
2268 return _core_
.Image_Mirror(*args
, **kwargs
)
2270 def Replace(*args
, **kwargs
):
2272 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2273 unsigned char r2, unsigned char g2, unsigned char b2)
2275 return _core_
.Image_Replace(*args
, **kwargs
)
2277 def ConvertToMono(*args
, **kwargs
):
2278 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2279 return _core_
.Image_ConvertToMono(*args
, **kwargs
)
2281 def SetOption(*args
, **kwargs
):
2282 """SetOption(self, String name, String value)"""
2283 return _core_
.Image_SetOption(*args
, **kwargs
)
2285 def SetOptionInt(*args
, **kwargs
):
2286 """SetOptionInt(self, String name, int value)"""
2287 return _core_
.Image_SetOptionInt(*args
, **kwargs
)
2289 def GetOption(*args
, **kwargs
):
2290 """GetOption(self, String name) -> String"""
2291 return _core_
.Image_GetOption(*args
, **kwargs
)
2293 def GetOptionInt(*args
, **kwargs
):
2294 """GetOptionInt(self, String name) -> int"""
2295 return _core_
.Image_GetOptionInt(*args
, **kwargs
)
2297 def HasOption(*args
, **kwargs
):
2298 """HasOption(self, String name) -> bool"""
2299 return _core_
.Image_HasOption(*args
, **kwargs
)
2301 def CountColours(*args
, **kwargs
):
2302 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2303 return _core_
.Image_CountColours(*args
, **kwargs
)
2305 def ComputeHistogram(*args
, **kwargs
):
2306 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2307 return _core_
.Image_ComputeHistogram(*args
, **kwargs
)
2309 def AddHandler(*args
, **kwargs
):
2310 """AddHandler(ImageHandler handler)"""
2311 return _core_
.Image_AddHandler(*args
, **kwargs
)
2313 AddHandler
= staticmethod(AddHandler
)
2314 def InsertHandler(*args
, **kwargs
):
2315 """InsertHandler(ImageHandler handler)"""
2316 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2318 InsertHandler
= staticmethod(InsertHandler
)
2319 def RemoveHandler(*args
, **kwargs
):
2320 """RemoveHandler(String name) -> bool"""
2321 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2323 RemoveHandler
= staticmethod(RemoveHandler
)
2324 def GetImageExtWildcard(*args
, **kwargs
):
2325 """GetImageExtWildcard() -> String"""
2326 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2328 GetImageExtWildcard
= staticmethod(GetImageExtWildcard
)
2329 def ConvertToBitmap(*args
, **kwargs
):
2330 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2331 return _core_
.Image_ConvertToBitmap(*args
, **kwargs
)
2333 def ConvertToMonoBitmap(*args
, **kwargs
):
2334 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2335 return _core_
.Image_ConvertToMonoBitmap(*args
, **kwargs
)
2337 def __nonzero__(self
): return self
.Ok()
2339 class ImagePtr(Image
):
2340 def __init__(self
, this
):
2342 if not hasattr(self
,"thisown"): self
.thisown
= 0
2343 self
.__class
__ = Image
2344 _core_
.Image_swigregister(ImagePtr
)
2346 def ImageFromMime(*args
, **kwargs
):
2347 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2348 val
= _core_
.new_ImageFromMime(*args
, **kwargs
)
2352 def ImageFromStream(*args
, **kwargs
):
2353 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2354 val
= _core_
.new_ImageFromStream(*args
, **kwargs
)
2358 def ImageFromStreamMime(*args
, **kwargs
):
2359 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2360 val
= _core_
.new_ImageFromStreamMime(*args
, **kwargs
)
2364 def EmptyImage(*args
, **kwargs
):
2365 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2366 val
= _core_
.new_EmptyImage(*args
, **kwargs
)
2370 def ImageFromBitmap(*args
, **kwargs
):
2371 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2372 val
= _core_
.new_ImageFromBitmap(*args
, **kwargs
)
2376 def ImageFromData(*args
, **kwargs
):
2377 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2378 val
= _core_
.new_ImageFromData(*args
, **kwargs
)
2382 def Image_CanRead(*args
, **kwargs
):
2383 """Image_CanRead(String name) -> bool"""
2384 return _core_
.Image_CanRead(*args
, **kwargs
)
2386 def Image_GetImageCount(*args
, **kwargs
):
2387 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2388 return _core_
.Image_GetImageCount(*args
, **kwargs
)
2390 def Image_CanReadStream(*args
, **kwargs
):
2391 """Image_CanReadStream(InputStream stream) -> bool"""
2392 return _core_
.Image_CanReadStream(*args
, **kwargs
)
2394 def Image_AddHandler(*args
, **kwargs
):
2395 """Image_AddHandler(ImageHandler handler)"""
2396 return _core_
.Image_AddHandler(*args
, **kwargs
)
2398 def Image_InsertHandler(*args
, **kwargs
):
2399 """Image_InsertHandler(ImageHandler handler)"""
2400 return _core_
.Image_InsertHandler(*args
, **kwargs
)
2402 def Image_RemoveHandler(*args
, **kwargs
):
2403 """Image_RemoveHandler(String name) -> bool"""
2404 return _core_
.Image_RemoveHandler(*args
, **kwargs
)
2406 def Image_GetImageExtWildcard(*args
, **kwargs
):
2407 """Image_GetImageExtWildcard() -> String"""
2408 return _core_
.Image_GetImageExtWildcard(*args
, **kwargs
)
2410 def InitAllImageHandlers():
2412 The former functionality of InitAllImageHanders is now done internal to
2413 the _core_ extension module and so this function has become a simple NOP.
2417 IMAGE_RESOLUTION_INCHES
= _core_
.IMAGE_RESOLUTION_INCHES
2418 IMAGE_RESOLUTION_CM
= _core_
.IMAGE_RESOLUTION_CM
2419 BMP_24BPP
= _core_
.BMP_24BPP
2420 BMP_8BPP
= _core_
.BMP_8BPP
2421 BMP_8BPP_GREY
= _core_
.BMP_8BPP_GREY
2422 BMP_8BPP_GRAY
= _core_
.BMP_8BPP_GRAY
2423 BMP_8BPP_RED
= _core_
.BMP_8BPP_RED
2424 BMP_8BPP_PALETTE
= _core_
.BMP_8BPP_PALETTE
2425 BMP_4BPP
= _core_
.BMP_4BPP
2426 BMP_1BPP
= _core_
.BMP_1BPP
2427 BMP_1BPP_BW
= _core_
.BMP_1BPP_BW
2428 class BMPHandler(ImageHandler
):
2430 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2431 def __init__(self
, *args
, **kwargs
):
2432 """__init__(self) -> BMPHandler"""
2433 newobj
= _core_
.new_BMPHandler(*args
, **kwargs
)
2434 self
.this
= newobj
.this
2438 class BMPHandlerPtr(BMPHandler
):
2439 def __init__(self
, this
):
2441 if not hasattr(self
,"thisown"): self
.thisown
= 0
2442 self
.__class
__ = BMPHandler
2443 _core_
.BMPHandler_swigregister(BMPHandlerPtr
)
2444 NullImage
= cvar
.NullImage
2445 IMAGE_OPTION_BMP_FORMAT
= cvar
.IMAGE_OPTION_BMP_FORMAT
2446 IMAGE_OPTION_CUR_HOTSPOT_X
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_X
2447 IMAGE_OPTION_CUR_HOTSPOT_Y
= cvar
.IMAGE_OPTION_CUR_HOTSPOT_Y
2448 IMAGE_OPTION_RESOLUTION
= cvar
.IMAGE_OPTION_RESOLUTION
2449 IMAGE_OPTION_RESOLUTIONUNIT
= cvar
.IMAGE_OPTION_RESOLUTIONUNIT
2451 class ICOHandler(BMPHandler
):
2453 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2454 def __init__(self
, *args
, **kwargs
):
2455 """__init__(self) -> ICOHandler"""
2456 newobj
= _core_
.new_ICOHandler(*args
, **kwargs
)
2457 self
.this
= newobj
.this
2461 class ICOHandlerPtr(ICOHandler
):
2462 def __init__(self
, this
):
2464 if not hasattr(self
,"thisown"): self
.thisown
= 0
2465 self
.__class
__ = ICOHandler
2466 _core_
.ICOHandler_swigregister(ICOHandlerPtr
)
2468 class CURHandler(ICOHandler
):
2470 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2471 def __init__(self
, *args
, **kwargs
):
2472 """__init__(self) -> CURHandler"""
2473 newobj
= _core_
.new_CURHandler(*args
, **kwargs
)
2474 self
.this
= newobj
.this
2478 class CURHandlerPtr(CURHandler
):
2479 def __init__(self
, this
):
2481 if not hasattr(self
,"thisown"): self
.thisown
= 0
2482 self
.__class
__ = CURHandler
2483 _core_
.CURHandler_swigregister(CURHandlerPtr
)
2485 class ANIHandler(CURHandler
):
2487 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2488 def __init__(self
, *args
, **kwargs
):
2489 """__init__(self) -> ANIHandler"""
2490 newobj
= _core_
.new_ANIHandler(*args
, **kwargs
)
2491 self
.this
= newobj
.this
2495 class ANIHandlerPtr(ANIHandler
):
2496 def __init__(self
, this
):
2498 if not hasattr(self
,"thisown"): self
.thisown
= 0
2499 self
.__class
__ = ANIHandler
2500 _core_
.ANIHandler_swigregister(ANIHandlerPtr
)
2502 class PNGHandler(ImageHandler
):
2504 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2505 def __init__(self
, *args
, **kwargs
):
2506 """__init__(self) -> PNGHandler"""
2507 newobj
= _core_
.new_PNGHandler(*args
, **kwargs
)
2508 self
.this
= newobj
.this
2512 class PNGHandlerPtr(PNGHandler
):
2513 def __init__(self
, this
):
2515 if not hasattr(self
,"thisown"): self
.thisown
= 0
2516 self
.__class
__ = PNGHandler
2517 _core_
.PNGHandler_swigregister(PNGHandlerPtr
)
2519 class GIFHandler(ImageHandler
):
2521 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2522 def __init__(self
, *args
, **kwargs
):
2523 """__init__(self) -> GIFHandler"""
2524 newobj
= _core_
.new_GIFHandler(*args
, **kwargs
)
2525 self
.this
= newobj
.this
2529 class GIFHandlerPtr(GIFHandler
):
2530 def __init__(self
, this
):
2532 if not hasattr(self
,"thisown"): self
.thisown
= 0
2533 self
.__class
__ = GIFHandler
2534 _core_
.GIFHandler_swigregister(GIFHandlerPtr
)
2536 class PCXHandler(ImageHandler
):
2538 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2539 def __init__(self
, *args
, **kwargs
):
2540 """__init__(self) -> PCXHandler"""
2541 newobj
= _core_
.new_PCXHandler(*args
, **kwargs
)
2542 self
.this
= newobj
.this
2546 class PCXHandlerPtr(PCXHandler
):
2547 def __init__(self
, this
):
2549 if not hasattr(self
,"thisown"): self
.thisown
= 0
2550 self
.__class
__ = PCXHandler
2551 _core_
.PCXHandler_swigregister(PCXHandlerPtr
)
2553 class JPEGHandler(ImageHandler
):
2555 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2556 def __init__(self
, *args
, **kwargs
):
2557 """__init__(self) -> JPEGHandler"""
2558 newobj
= _core_
.new_JPEGHandler(*args
, **kwargs
)
2559 self
.this
= newobj
.this
2563 class JPEGHandlerPtr(JPEGHandler
):
2564 def __init__(self
, this
):
2566 if not hasattr(self
,"thisown"): self
.thisown
= 0
2567 self
.__class
__ = JPEGHandler
2568 _core_
.JPEGHandler_swigregister(JPEGHandlerPtr
)
2570 class PNMHandler(ImageHandler
):
2572 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2573 def __init__(self
, *args
, **kwargs
):
2574 """__init__(self) -> PNMHandler"""
2575 newobj
= _core_
.new_PNMHandler(*args
, **kwargs
)
2576 self
.this
= newobj
.this
2580 class PNMHandlerPtr(PNMHandler
):
2581 def __init__(self
, this
):
2583 if not hasattr(self
,"thisown"): self
.thisown
= 0
2584 self
.__class
__ = PNMHandler
2585 _core_
.PNMHandler_swigregister(PNMHandlerPtr
)
2587 class XPMHandler(ImageHandler
):
2589 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2590 def __init__(self
, *args
, **kwargs
):
2591 """__init__(self) -> XPMHandler"""
2592 newobj
= _core_
.new_XPMHandler(*args
, **kwargs
)
2593 self
.this
= newobj
.this
2597 class XPMHandlerPtr(XPMHandler
):
2598 def __init__(self
, this
):
2600 if not hasattr(self
,"thisown"): self
.thisown
= 0
2601 self
.__class
__ = XPMHandler
2602 _core_
.XPMHandler_swigregister(XPMHandlerPtr
)
2604 class TIFFHandler(ImageHandler
):
2606 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2607 def __init__(self
, *args
, **kwargs
):
2608 """__init__(self) -> TIFFHandler"""
2609 newobj
= _core_
.new_TIFFHandler(*args
, **kwargs
)
2610 self
.this
= newobj
.this
2614 class TIFFHandlerPtr(TIFFHandler
):
2615 def __init__(self
, this
):
2617 if not hasattr(self
,"thisown"): self
.thisown
= 0
2618 self
.__class
__ = TIFFHandler
2619 _core_
.TIFFHandler_swigregister(TIFFHandlerPtr
)
2621 QUANTIZE_INCLUDE_WINDOWS_COLOURS
= _core_
.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2622 QUANTIZE_FILL_DESTINATION_IMAGE
= _core_
.QUANTIZE_FILL_DESTINATION_IMAGE
2623 class Quantize(object):
2624 """Performs quantization, or colour reduction, on a wxImage."""
2625 def __init__(self
): raise RuntimeError, "No constructor defined"
2627 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2628 def Quantize(*args
, **kwargs
):
2630 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2632 Reduce the colours in the source image and put the result into the
2633 destination image, setting the palette in the destination if
2634 needed. Both images may be the same, to overwrite the source image.
2636 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2638 Quantize
= staticmethod(Quantize
)
2640 class QuantizePtr(Quantize
):
2641 def __init__(self
, this
):
2643 if not hasattr(self
,"thisown"): self
.thisown
= 0
2644 self
.__class
__ = Quantize
2645 _core_
.Quantize_swigregister(QuantizePtr
)
2647 def Quantize_Quantize(*args
, **kwargs
):
2649 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2651 Reduce the colours in the source image and put the result into the
2652 destination image, setting the palette in the destination if
2653 needed. Both images may be the same, to overwrite the source image.
2655 return _core_
.Quantize_Quantize(*args
, **kwargs
)
2657 #---------------------------------------------------------------------------
2659 class EvtHandler(Object
):
2661 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2662 def __init__(self
, *args
, **kwargs
):
2663 """__init__(self) -> EvtHandler"""
2664 newobj
= _core_
.new_EvtHandler(*args
, **kwargs
)
2665 self
.this
= newobj
.this
2668 def GetNextHandler(*args
, **kwargs
):
2669 """GetNextHandler(self) -> EvtHandler"""
2670 return _core_
.EvtHandler_GetNextHandler(*args
, **kwargs
)
2672 def GetPreviousHandler(*args
, **kwargs
):
2673 """GetPreviousHandler(self) -> EvtHandler"""
2674 return _core_
.EvtHandler_GetPreviousHandler(*args
, **kwargs
)
2676 def SetNextHandler(*args
, **kwargs
):
2677 """SetNextHandler(self, EvtHandler handler)"""
2678 return _core_
.EvtHandler_SetNextHandler(*args
, **kwargs
)
2680 def SetPreviousHandler(*args
, **kwargs
):
2681 """SetPreviousHandler(self, EvtHandler handler)"""
2682 return _core_
.EvtHandler_SetPreviousHandler(*args
, **kwargs
)
2684 def GetEvtHandlerEnabled(*args
, **kwargs
):
2685 """GetEvtHandlerEnabled(self) -> bool"""
2686 return _core_
.EvtHandler_GetEvtHandlerEnabled(*args
, **kwargs
)
2688 def SetEvtHandlerEnabled(*args
, **kwargs
):
2689 """SetEvtHandlerEnabled(self, bool enabled)"""
2690 return _core_
.EvtHandler_SetEvtHandlerEnabled(*args
, **kwargs
)
2692 def ProcessEvent(*args
, **kwargs
):
2693 """ProcessEvent(self, Event event) -> bool"""
2694 return _core_
.EvtHandler_ProcessEvent(*args
, **kwargs
)
2696 def AddPendingEvent(*args
, **kwargs
):
2697 """AddPendingEvent(self, Event event)"""
2698 return _core_
.EvtHandler_AddPendingEvent(*args
, **kwargs
)
2700 def ProcessPendingEvents(*args
, **kwargs
):
2701 """ProcessPendingEvents(self)"""
2702 return _core_
.EvtHandler_ProcessPendingEvents(*args
, **kwargs
)
2704 def Connect(*args
, **kwargs
):
2705 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2706 return _core_
.EvtHandler_Connect(*args
, **kwargs
)
2708 def Disconnect(*args
, **kwargs
):
2709 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2710 return _core_
.EvtHandler_Disconnect(*args
, **kwargs
)
2712 def _setOORInfo(*args
, **kwargs
):
2713 """_setOORInfo(self, PyObject _self)"""
2714 return _core_
.EvtHandler__setOORInfo(*args
, **kwargs
)
2716 def Bind(self
, event
, handler
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2718 Bind an event to an event handler.
2720 :param event: One of the EVT_* objects that specifies the
2721 type of event to bind,
2723 :param handler: A callable object to be invoked when the
2724 event is delivered to self. Pass None to
2725 disconnect an event handler.
2727 :param source: Sometimes the event originates from a
2728 different window than self, but you still
2729 want to catch it in self. (For example, a
2730 button event delivered to a frame.) By
2731 passing the source of the event, the event
2732 handling system is able to differentiate
2733 between the same event type from different
2736 :param id: Used to spcify the event source by ID instead
2739 :param id2: Used when it is desirable to bind a handler
2740 to a range of IDs, such as with EVT_MENU_RANGE.
2742 if source
is not None:
2744 event
.Bind(self
, id, id2
, handler
)
2746 def Unbind(self
, event
, source
=None, id=wx
.ID_ANY
, id2
=wx
.ID_ANY
):
2748 Disconencts the event handler binding for event from self.
2749 Returns True if successful.
2751 if source
is not None:
2753 return event
.Unbind(self
, id, id2
)
2756 class EvtHandlerPtr(EvtHandler
):
2757 def __init__(self
, this
):
2759 if not hasattr(self
,"thisown"): self
.thisown
= 0
2760 self
.__class
__ = EvtHandler
2761 _core_
.EvtHandler_swigregister(EvtHandlerPtr
)
2763 #---------------------------------------------------------------------------
2765 class PyEventBinder(object):
2767 Instances of this class are used to bind specific events to event
2770 def __init__(self
, evtType
, expectedIDs
=0):
2771 if expectedIDs
not in [0, 1, 2]:
2772 raise ValueError, "Invalid number of expectedIDs"
2773 self
.expectedIDs
= expectedIDs
2775 if type(evtType
) == list or type(evtType
) == tuple:
2776 self
.evtType
= evtType
2778 self
.evtType
= [evtType
]
2781 def Bind(self
, target
, id1
, id2
, function
):
2782 """Bind this set of event types to target."""
2783 for et
in self
.evtType
:
2784 target
.Connect(id1
, id2
, et
, function
)
2787 def Unbind(self
, target
, id1
, id2
):
2788 """Remove an event binding."""
2790 for et
in self
.evtType
:
2791 success
+= target
.Disconnect(id1
, id2
, et
)
2795 def __call__(self
, *args
):
2797 For backwards compatibility with the old EVT_* functions.
2798 Should be called with either (window, func), (window, ID,
2799 func) or (window, ID1, ID2, func) parameters depending on the
2802 assert len(args
) == 2 + self
.expectedIDs
2806 if self
.expectedIDs
== 0:
2808 elif self
.expectedIDs
== 1:
2811 elif self
.expectedIDs
== 2:
2816 raise ValueError, "Unexpected number of IDs"
2818 self
.Bind(target
, id1
, id2
, func
)
2821 # These two are square pegs that don't fit the PyEventBinder hole...
2822 def EVT_COMMAND(win
, id, cmd
, func
):
2823 win
.Connect(id, -1, cmd
, func
)
2824 def EVT_COMMAND_RANGE(win
, id1
, id2
, cmd
, func
):
2825 win
.Connect(id1
, id2
, cmd
, func
)
2828 #---------------------------------------------------------------------------
2830 #---------------------------------------------------------------------------
2832 EVENT_PROPAGATE_NONE
= _core_
.EVENT_PROPAGATE_NONE
2833 EVENT_PROPAGATE_MAX
= _core_
.EVENT_PROPAGATE_MAX
2835 def NewEventType(*args
, **kwargs
):
2836 """NewEventType() -> wxEventType"""
2837 return _core_
.NewEventType(*args
, **kwargs
)
2838 wxEVT_NULL
= _core_
.wxEVT_NULL
2839 wxEVT_FIRST
= _core_
.wxEVT_FIRST
2840 wxEVT_USER_FIRST
= _core_
.wxEVT_USER_FIRST
2841 wxEVT_COMMAND_BUTTON_CLICKED
= _core_
.wxEVT_COMMAND_BUTTON_CLICKED
2842 wxEVT_COMMAND_CHECKBOX_CLICKED
= _core_
.wxEVT_COMMAND_CHECKBOX_CLICKED
2843 wxEVT_COMMAND_CHOICE_SELECTED
= _core_
.wxEVT_COMMAND_CHOICE_SELECTED
2844 wxEVT_COMMAND_LISTBOX_SELECTED
= _core_
.wxEVT_COMMAND_LISTBOX_SELECTED
2845 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
= _core_
.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2846 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
= _core_
.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2847 wxEVT_COMMAND_MENU_SELECTED
= _core_
.wxEVT_COMMAND_MENU_SELECTED
2848 wxEVT_COMMAND_TOOL_CLICKED
= _core_
.wxEVT_COMMAND_TOOL_CLICKED
2849 wxEVT_COMMAND_SLIDER_UPDATED
= _core_
.wxEVT_COMMAND_SLIDER_UPDATED
2850 wxEVT_COMMAND_RADIOBOX_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBOX_SELECTED
2851 wxEVT_COMMAND_RADIOBUTTON_SELECTED
= _core_
.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2852 wxEVT_COMMAND_SCROLLBAR_UPDATED
= _core_
.wxEVT_COMMAND_SCROLLBAR_UPDATED
2853 wxEVT_COMMAND_VLBOX_SELECTED
= _core_
.wxEVT_COMMAND_VLBOX_SELECTED
2854 wxEVT_COMMAND_COMBOBOX_SELECTED
= _core_
.wxEVT_COMMAND_COMBOBOX_SELECTED
2855 wxEVT_COMMAND_TOOL_RCLICKED
= _core_
.wxEVT_COMMAND_TOOL_RCLICKED
2856 wxEVT_COMMAND_TOOL_ENTER
= _core_
.wxEVT_COMMAND_TOOL_ENTER
2857 wxEVT_LEFT_DOWN
= _core_
.wxEVT_LEFT_DOWN
2858 wxEVT_LEFT_UP
= _core_
.wxEVT_LEFT_UP
2859 wxEVT_MIDDLE_DOWN
= _core_
.wxEVT_MIDDLE_DOWN
2860 wxEVT_MIDDLE_UP
= _core_
.wxEVT_MIDDLE_UP
2861 wxEVT_RIGHT_DOWN
= _core_
.wxEVT_RIGHT_DOWN
2862 wxEVT_RIGHT_UP
= _core_
.wxEVT_RIGHT_UP
2863 wxEVT_MOTION
= _core_
.wxEVT_MOTION
2864 wxEVT_ENTER_WINDOW
= _core_
.wxEVT_ENTER_WINDOW
2865 wxEVT_LEAVE_WINDOW
= _core_
.wxEVT_LEAVE_WINDOW
2866 wxEVT_LEFT_DCLICK
= _core_
.wxEVT_LEFT_DCLICK
2867 wxEVT_MIDDLE_DCLICK
= _core_
.wxEVT_MIDDLE_DCLICK
2868 wxEVT_RIGHT_DCLICK
= _core_
.wxEVT_RIGHT_DCLICK
2869 wxEVT_SET_FOCUS
= _core_
.wxEVT_SET_FOCUS
2870 wxEVT_KILL_FOCUS
= _core_
.wxEVT_KILL_FOCUS
2871 wxEVT_CHILD_FOCUS
= _core_
.wxEVT_CHILD_FOCUS
2872 wxEVT_MOUSEWHEEL
= _core_
.wxEVT_MOUSEWHEEL
2873 wxEVT_NC_LEFT_DOWN
= _core_
.wxEVT_NC_LEFT_DOWN
2874 wxEVT_NC_LEFT_UP
= _core_
.wxEVT_NC_LEFT_UP
2875 wxEVT_NC_MIDDLE_DOWN
= _core_
.wxEVT_NC_MIDDLE_DOWN
2876 wxEVT_NC_MIDDLE_UP
= _core_
.wxEVT_NC_MIDDLE_UP
2877 wxEVT_NC_RIGHT_DOWN
= _core_
.wxEVT_NC_RIGHT_DOWN
2878 wxEVT_NC_RIGHT_UP
= _core_
.wxEVT_NC_RIGHT_UP
2879 wxEVT_NC_MOTION
= _core_
.wxEVT_NC_MOTION
2880 wxEVT_NC_ENTER_WINDOW
= _core_
.wxEVT_NC_ENTER_WINDOW
2881 wxEVT_NC_LEAVE_WINDOW
= _core_
.wxEVT_NC_LEAVE_WINDOW
2882 wxEVT_NC_LEFT_DCLICK
= _core_
.wxEVT_NC_LEFT_DCLICK
2883 wxEVT_NC_MIDDLE_DCLICK
= _core_
.wxEVT_NC_MIDDLE_DCLICK
2884 wxEVT_NC_RIGHT_DCLICK
= _core_
.wxEVT_NC_RIGHT_DCLICK
2885 wxEVT_CHAR
= _core_
.wxEVT_CHAR
2886 wxEVT_CHAR_HOOK
= _core_
.wxEVT_CHAR_HOOK
2887 wxEVT_NAVIGATION_KEY
= _core_
.wxEVT_NAVIGATION_KEY
2888 wxEVT_KEY_DOWN
= _core_
.wxEVT_KEY_DOWN
2889 wxEVT_KEY_UP
= _core_
.wxEVT_KEY_UP
2890 wxEVT_HOTKEY
= _core_
.wxEVT_HOTKEY
2891 wxEVT_SET_CURSOR
= _core_
.wxEVT_SET_CURSOR
2892 wxEVT_SCROLL_TOP
= _core_
.wxEVT_SCROLL_TOP
2893 wxEVT_SCROLL_BOTTOM
= _core_
.wxEVT_SCROLL_BOTTOM
2894 wxEVT_SCROLL_LINEUP
= _core_
.wxEVT_SCROLL_LINEUP
2895 wxEVT_SCROLL_LINEDOWN
= _core_
.wxEVT_SCROLL_LINEDOWN
2896 wxEVT_SCROLL_PAGEUP
= _core_
.wxEVT_SCROLL_PAGEUP
2897 wxEVT_SCROLL_PAGEDOWN
= _core_
.wxEVT_SCROLL_PAGEDOWN
2898 wxEVT_SCROLL_THUMBTRACK
= _core_
.wxEVT_SCROLL_THUMBTRACK
2899 wxEVT_SCROLL_THUMBRELEASE
= _core_
.wxEVT_SCROLL_THUMBRELEASE
2900 wxEVT_SCROLL_ENDSCROLL
= _core_
.wxEVT_SCROLL_ENDSCROLL
2901 wxEVT_SCROLLWIN_TOP
= _core_
.wxEVT_SCROLLWIN_TOP
2902 wxEVT_SCROLLWIN_BOTTOM
= _core_
.wxEVT_SCROLLWIN_BOTTOM
2903 wxEVT_SCROLLWIN_LINEUP
= _core_
.wxEVT_SCROLLWIN_LINEUP
2904 wxEVT_SCROLLWIN_LINEDOWN
= _core_
.wxEVT_SCROLLWIN_LINEDOWN
2905 wxEVT_SCROLLWIN_PAGEUP
= _core_
.wxEVT_SCROLLWIN_PAGEUP
2906 wxEVT_SCROLLWIN_PAGEDOWN
= _core_
.wxEVT_SCROLLWIN_PAGEDOWN
2907 wxEVT_SCROLLWIN_THUMBTRACK
= _core_
.wxEVT_SCROLLWIN_THUMBTRACK
2908 wxEVT_SCROLLWIN_THUMBRELEASE
= _core_
.wxEVT_SCROLLWIN_THUMBRELEASE
2909 wxEVT_SIZE
= _core_
.wxEVT_SIZE
2910 wxEVT_MOVE
= _core_
.wxEVT_MOVE
2911 wxEVT_CLOSE_WINDOW
= _core_
.wxEVT_CLOSE_WINDOW
2912 wxEVT_END_SESSION
= _core_
.wxEVT_END_SESSION
2913 wxEVT_QUERY_END_SESSION
= _core_
.wxEVT_QUERY_END_SESSION
2914 wxEVT_ACTIVATE_APP
= _core_
.wxEVT_ACTIVATE_APP
2915 wxEVT_POWER
= _core_
.wxEVT_POWER
2916 wxEVT_ACTIVATE
= _core_
.wxEVT_ACTIVATE
2917 wxEVT_CREATE
= _core_
.wxEVT_CREATE
2918 wxEVT_DESTROY
= _core_
.wxEVT_DESTROY
2919 wxEVT_SHOW
= _core_
.wxEVT_SHOW
2920 wxEVT_ICONIZE
= _core_
.wxEVT_ICONIZE
2921 wxEVT_MAXIMIZE
= _core_
.wxEVT_MAXIMIZE
2922 wxEVT_MOUSE_CAPTURE_CHANGED
= _core_
.wxEVT_MOUSE_CAPTURE_CHANGED
2923 wxEVT_PAINT
= _core_
.wxEVT_PAINT
2924 wxEVT_ERASE_BACKGROUND
= _core_
.wxEVT_ERASE_BACKGROUND
2925 wxEVT_NC_PAINT
= _core_
.wxEVT_NC_PAINT
2926 wxEVT_PAINT_ICON
= _core_
.wxEVT_PAINT_ICON
2927 wxEVT_MENU_OPEN
= _core_
.wxEVT_MENU_OPEN
2928 wxEVT_MENU_CLOSE
= _core_
.wxEVT_MENU_CLOSE
2929 wxEVT_MENU_HIGHLIGHT
= _core_
.wxEVT_MENU_HIGHLIGHT
2930 wxEVT_CONTEXT_MENU
= _core_
.wxEVT_CONTEXT_MENU
2931 wxEVT_SYS_COLOUR_CHANGED
= _core_
.wxEVT_SYS_COLOUR_CHANGED
2932 wxEVT_DISPLAY_CHANGED
= _core_
.wxEVT_DISPLAY_CHANGED
2933 wxEVT_SETTING_CHANGED
= _core_
.wxEVT_SETTING_CHANGED
2934 wxEVT_QUERY_NEW_PALETTE
= _core_
.wxEVT_QUERY_NEW_PALETTE
2935 wxEVT_PALETTE_CHANGED
= _core_
.wxEVT_PALETTE_CHANGED
2936 wxEVT_DROP_FILES
= _core_
.wxEVT_DROP_FILES
2937 wxEVT_DRAW_ITEM
= _core_
.wxEVT_DRAW_ITEM
2938 wxEVT_MEASURE_ITEM
= _core_
.wxEVT_MEASURE_ITEM
2939 wxEVT_COMPARE_ITEM
= _core_
.wxEVT_COMPARE_ITEM
2940 wxEVT_INIT_DIALOG
= _core_
.wxEVT_INIT_DIALOG
2941 wxEVT_IDLE
= _core_
.wxEVT_IDLE
2942 wxEVT_UPDATE_UI
= _core_
.wxEVT_UPDATE_UI
2943 wxEVT_SIZING
= _core_
.wxEVT_SIZING
2944 wxEVT_MOVING
= _core_
.wxEVT_MOVING
2945 wxEVT_COMMAND_LEFT_CLICK
= _core_
.wxEVT_COMMAND_LEFT_CLICK
2946 wxEVT_COMMAND_LEFT_DCLICK
= _core_
.wxEVT_COMMAND_LEFT_DCLICK
2947 wxEVT_COMMAND_RIGHT_CLICK
= _core_
.wxEVT_COMMAND_RIGHT_CLICK
2948 wxEVT_COMMAND_RIGHT_DCLICK
= _core_
.wxEVT_COMMAND_RIGHT_DCLICK
2949 wxEVT_COMMAND_SET_FOCUS
= _core_
.wxEVT_COMMAND_SET_FOCUS
2950 wxEVT_COMMAND_KILL_FOCUS
= _core_
.wxEVT_COMMAND_KILL_FOCUS
2951 wxEVT_COMMAND_ENTER
= _core_
.wxEVT_COMMAND_ENTER
2953 # Create some event binders
2954 EVT_SIZE
= wx
.PyEventBinder( wxEVT_SIZE
)
2955 EVT_SIZING
= wx
.PyEventBinder( wxEVT_SIZING
)
2956 EVT_MOVE
= wx
.PyEventBinder( wxEVT_MOVE
)
2957 EVT_MOVING
= wx
.PyEventBinder( wxEVT_MOVING
)
2958 EVT_CLOSE
= wx
.PyEventBinder( wxEVT_CLOSE_WINDOW
)
2959 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
2960 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
2961 EVT_PAINT
= wx
.PyEventBinder( wxEVT_PAINT
)
2962 EVT_NC_PAINT
= wx
.PyEventBinder( wxEVT_NC_PAINT
)
2963 EVT_ERASE_BACKGROUND
= wx
.PyEventBinder( wxEVT_ERASE_BACKGROUND
)
2964 EVT_CHAR
= wx
.PyEventBinder( wxEVT_CHAR
)
2965 EVT_KEY_DOWN
= wx
.PyEventBinder( wxEVT_KEY_DOWN
)
2966 EVT_KEY_UP
= wx
.PyEventBinder( wxEVT_KEY_UP
)
2967 EVT_HOTKEY
= wx
.PyEventBinder( wxEVT_HOTKEY
, 1)
2968 EVT_CHAR_HOOK
= wx
.PyEventBinder( wxEVT_CHAR_HOOK
)
2969 EVT_MENU_OPEN
= wx
.PyEventBinder( wxEVT_MENU_OPEN
)
2970 EVT_MENU_CLOSE
= wx
.PyEventBinder( wxEVT_MENU_CLOSE
)
2971 EVT_MENU_HIGHLIGHT
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
, 1)
2972 EVT_MENU_HIGHLIGHT_ALL
= wx
.PyEventBinder( wxEVT_MENU_HIGHLIGHT
)
2973 EVT_SET_FOCUS
= wx
.PyEventBinder( wxEVT_SET_FOCUS
)
2974 EVT_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_KILL_FOCUS
)
2975 EVT_CHILD_FOCUS
= wx
.PyEventBinder( wxEVT_CHILD_FOCUS
)
2976 EVT_ACTIVATE
= wx
.PyEventBinder( wxEVT_ACTIVATE
)
2977 EVT_ACTIVATE_APP
= wx
.PyEventBinder( wxEVT_ACTIVATE_APP
)
2978 EVT_END_SESSION
= wx
.PyEventBinder( wxEVT_END_SESSION
)
2979 EVT_QUERY_END_SESSION
= wx
.PyEventBinder( wxEVT_QUERY_END_SESSION
)
2980 EVT_DROP_FILES
= wx
.PyEventBinder( wxEVT_DROP_FILES
)
2981 EVT_INIT_DIALOG
= wx
.PyEventBinder( wxEVT_INIT_DIALOG
)
2982 EVT_SYS_COLOUR_CHANGED
= wx
.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED
)
2983 EVT_DISPLAY_CHANGED
= wx
.PyEventBinder( wxEVT_DISPLAY_CHANGED
)
2984 EVT_SHOW
= wx
.PyEventBinder( wxEVT_SHOW
)
2985 EVT_MAXIMIZE
= wx
.PyEventBinder( wxEVT_MAXIMIZE
)
2986 EVT_ICONIZE
= wx
.PyEventBinder( wxEVT_ICONIZE
)
2987 EVT_NAVIGATION_KEY
= wx
.PyEventBinder( wxEVT_NAVIGATION_KEY
)
2988 EVT_PALETTE_CHANGED
= wx
.PyEventBinder( wxEVT_PALETTE_CHANGED
)
2989 EVT_QUERY_NEW_PALETTE
= wx
.PyEventBinder( wxEVT_QUERY_NEW_PALETTE
)
2990 EVT_WINDOW_CREATE
= wx
.PyEventBinder( wxEVT_CREATE
)
2991 EVT_WINDOW_DESTROY
= wx
.PyEventBinder( wxEVT_DESTROY
)
2992 EVT_SET_CURSOR
= wx
.PyEventBinder( wxEVT_SET_CURSOR
)
2993 EVT_MOUSE_CAPTURE_CHANGED
= wx
.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED
)
2995 EVT_LEFT_DOWN
= wx
.PyEventBinder( wxEVT_LEFT_DOWN
)
2996 EVT_LEFT_UP
= wx
.PyEventBinder( wxEVT_LEFT_UP
)
2997 EVT_MIDDLE_DOWN
= wx
.PyEventBinder( wxEVT_MIDDLE_DOWN
)
2998 EVT_MIDDLE_UP
= wx
.PyEventBinder( wxEVT_MIDDLE_UP
)
2999 EVT_RIGHT_DOWN
= wx
.PyEventBinder( wxEVT_RIGHT_DOWN
)
3000 EVT_RIGHT_UP
= wx
.PyEventBinder( wxEVT_RIGHT_UP
)
3001 EVT_MOTION
= wx
.PyEventBinder( wxEVT_MOTION
)
3002 EVT_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_LEFT_DCLICK
)
3003 EVT_MIDDLE_DCLICK
= wx
.PyEventBinder( wxEVT_MIDDLE_DCLICK
)
3004 EVT_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_RIGHT_DCLICK
)
3005 EVT_LEAVE_WINDOW
= wx
.PyEventBinder( wxEVT_LEAVE_WINDOW
)
3006 EVT_ENTER_WINDOW
= wx
.PyEventBinder( wxEVT_ENTER_WINDOW
)
3007 EVT_MOUSEWHEEL
= wx
.PyEventBinder( wxEVT_MOUSEWHEEL
)
3009 EVT_MOUSE_EVENTS
= wx
.PyEventBinder([ wxEVT_LEFT_DOWN
,
3017 wxEVT_MIDDLE_DCLICK
,
3025 # Scrolling from wxWindow (sent to wxScrolledWindow)
3026 EVT_SCROLLWIN
= wx
.PyEventBinder([ wxEVT_SCROLLWIN_TOP
,
3027 wxEVT_SCROLLWIN_BOTTOM
,
3028 wxEVT_SCROLLWIN_LINEUP
,
3029 wxEVT_SCROLLWIN_LINEDOWN
,
3030 wxEVT_SCROLLWIN_PAGEUP
,
3031 wxEVT_SCROLLWIN_PAGEDOWN
,
3032 wxEVT_SCROLLWIN_THUMBTRACK
,
3033 wxEVT_SCROLLWIN_THUMBRELEASE
,
3036 EVT_SCROLLWIN_TOP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_TOP
)
3037 EVT_SCROLLWIN_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM
)
3038 EVT_SCROLLWIN_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEUP
)
3039 EVT_SCROLLWIN_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN
)
3040 EVT_SCROLLWIN_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP
)
3041 EVT_SCROLLWIN_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN
)
3042 EVT_SCROLLWIN_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK
)
3043 EVT_SCROLLWIN_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE
)
3045 # Scrolling from wxSlider and wxScrollBar
3046 EVT_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3047 wxEVT_SCROLL_BOTTOM
,
3048 wxEVT_SCROLL_LINEUP
,
3049 wxEVT_SCROLL_LINEDOWN
,
3050 wxEVT_SCROLL_PAGEUP
,
3051 wxEVT_SCROLL_PAGEDOWN
,
3052 wxEVT_SCROLL_THUMBTRACK
,
3053 wxEVT_SCROLL_THUMBRELEASE
,
3054 wxEVT_SCROLL_ENDSCROLL
,
3057 EVT_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
)
3058 EVT_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
)
3059 EVT_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
)
3060 EVT_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
)
3061 EVT_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
)
3062 EVT_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
)
3063 EVT_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
)
3064 EVT_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
)
3065 EVT_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
)
3067 # Scrolling from wxSlider and wxScrollBar, with an id
3068 EVT_COMMAND_SCROLL
= wx
.PyEventBinder([ wxEVT_SCROLL_TOP
,
3069 wxEVT_SCROLL_BOTTOM
,
3070 wxEVT_SCROLL_LINEUP
,
3071 wxEVT_SCROLL_LINEDOWN
,
3072 wxEVT_SCROLL_PAGEUP
,
3073 wxEVT_SCROLL_PAGEDOWN
,
3074 wxEVT_SCROLL_THUMBTRACK
,
3075 wxEVT_SCROLL_THUMBRELEASE
,
3076 wxEVT_SCROLL_ENDSCROLL
,
3079 EVT_COMMAND_SCROLL_TOP
= wx
.PyEventBinder( wxEVT_SCROLL_TOP
, 1)
3080 EVT_COMMAND_SCROLL_BOTTOM
= wx
.PyEventBinder( wxEVT_SCROLL_BOTTOM
, 1)
3081 EVT_COMMAND_SCROLL_LINEUP
= wx
.PyEventBinder( wxEVT_SCROLL_LINEUP
, 1)
3082 EVT_COMMAND_SCROLL_LINEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_LINEDOWN
, 1)
3083 EVT_COMMAND_SCROLL_PAGEUP
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEUP
, 1)
3084 EVT_COMMAND_SCROLL_PAGEDOWN
= wx
.PyEventBinder( wxEVT_SCROLL_PAGEDOWN
, 1)
3085 EVT_COMMAND_SCROLL_THUMBTRACK
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBTRACK
, 1)
3086 EVT_COMMAND_SCROLL_THUMBRELEASE
= wx
.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE
, 1)
3087 EVT_COMMAND_SCROLL_ENDSCROLL
= wx
.PyEventBinder( wxEVT_SCROLL_ENDSCROLL
, 1)
3089 EVT_BUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED
, 1)
3090 EVT_CHECKBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED
, 1)
3091 EVT_CHOICE
= wx
.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED
, 1)
3092 EVT_LISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED
, 1)
3093 EVT_LISTBOX_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
, 1)
3094 EVT_MENU
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 1)
3095 EVT_MENU_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED
, 2)
3096 EVT_SLIDER
= wx
.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED
, 1)
3097 EVT_RADIOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED
, 1)
3098 EVT_RADIOBUTTON
= wx
.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED
, 1)
3100 EVT_SCROLLBAR
= wx
.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED
, 1)
3101 EVT_VLBOX
= wx
.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED
, 1)
3102 EVT_COMBOBOX
= wx
.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED
, 1)
3103 EVT_TOOL
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 1)
3104 EVT_TOOL_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED
, 2)
3105 EVT_TOOL_RCLICKED
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 1)
3106 EVT_TOOL_RCLICKED_RANGE
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED
, 2)
3107 EVT_TOOL_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER
, 1)
3108 EVT_CHECKLISTBOX
= wx
.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
, 1)
3111 EVT_COMMAND_LEFT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK
, 1)
3112 EVT_COMMAND_LEFT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK
, 1)
3113 EVT_COMMAND_RIGHT_CLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK
, 1)
3114 EVT_COMMAND_RIGHT_DCLICK
= wx
.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK
, 1)
3115 EVT_COMMAND_SET_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_SET_FOCUS
, 1)
3116 EVT_COMMAND_KILL_FOCUS
= wx
.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS
, 1)
3117 EVT_COMMAND_ENTER
= wx
.PyEventBinder( wxEVT_COMMAND_ENTER
, 1)
3119 EVT_IDLE
= wx
.PyEventBinder( wxEVT_IDLE
)
3121 EVT_UPDATE_UI
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 1)
3122 EVT_UPDATE_UI_RANGE
= wx
.PyEventBinder( wxEVT_UPDATE_UI
, 2)
3124 EVT_CONTEXT_MENU
= wx
.PyEventBinder( wxEVT_CONTEXT_MENU
)
3128 #---------------------------------------------------------------------------
3130 class Event(Object
):
3131 def __init__(self
): raise RuntimeError, "No constructor defined"
3133 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3134 def __del__(self
, destroy
=_core_
.delete_Event
):
3137 if self
.thisown
: destroy(self
)
3140 def SetEventType(*args
, **kwargs
):
3141 """SetEventType(self, wxEventType typ)"""
3142 return _core_
.Event_SetEventType(*args
, **kwargs
)
3144 def GetEventType(*args
, **kwargs
):
3145 """GetEventType(self) -> wxEventType"""
3146 return _core_
.Event_GetEventType(*args
, **kwargs
)
3148 def GetEventObject(*args
, **kwargs
):
3149 """GetEventObject(self) -> Object"""
3150 return _core_
.Event_GetEventObject(*args
, **kwargs
)
3152 def SetEventObject(*args
, **kwargs
):
3153 """SetEventObject(self, Object obj)"""
3154 return _core_
.Event_SetEventObject(*args
, **kwargs
)
3156 def GetTimestamp(*args
, **kwargs
):
3157 """GetTimestamp(self) -> long"""
3158 return _core_
.Event_GetTimestamp(*args
, **kwargs
)
3160 def SetTimestamp(*args
, **kwargs
):
3161 """SetTimestamp(self, long ts=0)"""
3162 return _core_
.Event_SetTimestamp(*args
, **kwargs
)
3164 def GetId(*args
, **kwargs
):
3165 """GetId(self) -> int"""
3166 return _core_
.Event_GetId(*args
, **kwargs
)
3168 def SetId(*args
, **kwargs
):
3169 """SetId(self, int Id)"""
3170 return _core_
.Event_SetId(*args
, **kwargs
)
3172 def IsCommandEvent(*args
, **kwargs
):
3173 """IsCommandEvent(self) -> bool"""
3174 return _core_
.Event_IsCommandEvent(*args
, **kwargs
)
3176 def Skip(*args
, **kwargs
):
3177 """Skip(self, bool skip=True)"""
3178 return _core_
.Event_Skip(*args
, **kwargs
)
3180 def GetSkipped(*args
, **kwargs
):
3181 """GetSkipped(self) -> bool"""
3182 return _core_
.Event_GetSkipped(*args
, **kwargs
)
3184 def ShouldPropagate(*args
, **kwargs
):
3185 """ShouldPropagate(self) -> bool"""
3186 return _core_
.Event_ShouldPropagate(*args
, **kwargs
)
3188 def StopPropagation(*args
, **kwargs
):
3189 """StopPropagation(self) -> int"""
3190 return _core_
.Event_StopPropagation(*args
, **kwargs
)
3192 def ResumePropagation(*args
, **kwargs
):
3193 """ResumePropagation(self, int propagationLevel)"""
3194 return _core_
.Event_ResumePropagation(*args
, **kwargs
)
3196 def Clone(*args
, **kwargs
):
3197 """Clone(self) -> Event"""
3198 return _core_
.Event_Clone(*args
, **kwargs
)
3201 class EventPtr(Event
):
3202 def __init__(self
, this
):
3204 if not hasattr(self
,"thisown"): self
.thisown
= 0
3205 self
.__class
__ = Event
3206 _core_
.Event_swigregister(EventPtr
)
3208 #---------------------------------------------------------------------------
3210 class PropagationDisabler(object):
3212 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3213 def __init__(self
, *args
, **kwargs
):
3214 """__init__(self, Event event) -> PropagationDisabler"""
3215 newobj
= _core_
.new_PropagationDisabler(*args
, **kwargs
)
3216 self
.this
= newobj
.this
3219 def __del__(self
, destroy
=_core_
.delete_PropagationDisabler
):
3222 if self
.thisown
: destroy(self
)
3226 class PropagationDisablerPtr(PropagationDisabler
):
3227 def __init__(self
, this
):
3229 if not hasattr(self
,"thisown"): self
.thisown
= 0
3230 self
.__class
__ = PropagationDisabler
3231 _core_
.PropagationDisabler_swigregister(PropagationDisablerPtr
)
3233 class PropagateOnce(object):
3235 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3236 def __init__(self
, *args
, **kwargs
):
3237 """__init__(self, Event event) -> PropagateOnce"""
3238 newobj
= _core_
.new_PropagateOnce(*args
, **kwargs
)
3239 self
.this
= newobj
.this
3242 def __del__(self
, destroy
=_core_
.delete_PropagateOnce
):
3245 if self
.thisown
: destroy(self
)
3249 class PropagateOncePtr(PropagateOnce
):
3250 def __init__(self
, this
):
3252 if not hasattr(self
,"thisown"): self
.thisown
= 0
3253 self
.__class
__ = PropagateOnce
3254 _core_
.PropagateOnce_swigregister(PropagateOncePtr
)
3256 #---------------------------------------------------------------------------
3258 class CommandEvent(Event
):
3260 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3261 def __init__(self
, *args
, **kwargs
):
3262 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3263 newobj
= _core_
.new_CommandEvent(*args
, **kwargs
)
3264 self
.this
= newobj
.this
3267 def GetSelection(*args
, **kwargs
):
3268 """GetSelection(self) -> int"""
3269 return _core_
.CommandEvent_GetSelection(*args
, **kwargs
)
3271 def SetString(*args
, **kwargs
):
3272 """SetString(self, String s)"""
3273 return _core_
.CommandEvent_SetString(*args
, **kwargs
)
3275 def GetString(*args
, **kwargs
):
3276 """GetString(self) -> String"""
3277 return _core_
.CommandEvent_GetString(*args
, **kwargs
)
3279 def IsChecked(*args
, **kwargs
):
3280 """IsChecked(self) -> bool"""
3281 return _core_
.CommandEvent_IsChecked(*args
, **kwargs
)
3284 def IsSelection(*args
, **kwargs
):
3285 """IsSelection(self) -> bool"""
3286 return _core_
.CommandEvent_IsSelection(*args
, **kwargs
)
3288 def SetExtraLong(*args
, **kwargs
):
3289 """SetExtraLong(self, long extraLong)"""
3290 return _core_
.CommandEvent_SetExtraLong(*args
, **kwargs
)
3292 def GetExtraLong(*args
, **kwargs
):
3293 """GetExtraLong(self) -> long"""
3294 return _core_
.CommandEvent_GetExtraLong(*args
, **kwargs
)
3296 def SetInt(*args
, **kwargs
):
3297 """SetInt(self, int i)"""
3298 return _core_
.CommandEvent_SetInt(*args
, **kwargs
)
3300 def GetInt(*args
, **kwargs
):
3301 """GetInt(self) -> long"""
3302 return _core_
.CommandEvent_GetInt(*args
, **kwargs
)
3304 def Clone(*args
, **kwargs
):
3305 """Clone(self) -> Event"""
3306 return _core_
.CommandEvent_Clone(*args
, **kwargs
)
3309 class CommandEventPtr(CommandEvent
):
3310 def __init__(self
, this
):
3312 if not hasattr(self
,"thisown"): self
.thisown
= 0
3313 self
.__class
__ = CommandEvent
3314 _core_
.CommandEvent_swigregister(CommandEventPtr
)
3316 #---------------------------------------------------------------------------
3318 class NotifyEvent(CommandEvent
):
3320 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3321 def __init__(self
, *args
, **kwargs
):
3322 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3323 newobj
= _core_
.new_NotifyEvent(*args
, **kwargs
)
3324 self
.this
= newobj
.this
3327 def Veto(*args
, **kwargs
):
3329 return _core_
.NotifyEvent_Veto(*args
, **kwargs
)
3331 def Allow(*args
, **kwargs
):
3333 return _core_
.NotifyEvent_Allow(*args
, **kwargs
)
3335 def IsAllowed(*args
, **kwargs
):
3336 """IsAllowed(self) -> bool"""
3337 return _core_
.NotifyEvent_IsAllowed(*args
, **kwargs
)
3340 class NotifyEventPtr(NotifyEvent
):
3341 def __init__(self
, this
):
3343 if not hasattr(self
,"thisown"): self
.thisown
= 0
3344 self
.__class
__ = NotifyEvent
3345 _core_
.NotifyEvent_swigregister(NotifyEventPtr
)
3347 #---------------------------------------------------------------------------
3349 class ScrollEvent(CommandEvent
):
3351 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3352 def __init__(self
, *args
, **kwargs
):
3354 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3355 int orient=0) -> ScrollEvent
3357 newobj
= _core_
.new_ScrollEvent(*args
, **kwargs
)
3358 self
.this
= newobj
.this
3361 def GetOrientation(*args
, **kwargs
):
3362 """GetOrientation(self) -> int"""
3363 return _core_
.ScrollEvent_GetOrientation(*args
, **kwargs
)
3365 def GetPosition(*args
, **kwargs
):
3366 """GetPosition(self) -> int"""
3367 return _core_
.ScrollEvent_GetPosition(*args
, **kwargs
)
3369 def SetOrientation(*args
, **kwargs
):
3370 """SetOrientation(self, int orient)"""
3371 return _core_
.ScrollEvent_SetOrientation(*args
, **kwargs
)
3373 def SetPosition(*args
, **kwargs
):
3374 """SetPosition(self, int pos)"""
3375 return _core_
.ScrollEvent_SetPosition(*args
, **kwargs
)
3378 class ScrollEventPtr(ScrollEvent
):
3379 def __init__(self
, this
):
3381 if not hasattr(self
,"thisown"): self
.thisown
= 0
3382 self
.__class
__ = ScrollEvent
3383 _core_
.ScrollEvent_swigregister(ScrollEventPtr
)
3385 #---------------------------------------------------------------------------
3387 class ScrollWinEvent(Event
):
3389 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3390 def __init__(self
, *args
, **kwargs
):
3391 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3392 newobj
= _core_
.new_ScrollWinEvent(*args
, **kwargs
)
3393 self
.this
= newobj
.this
3396 def GetOrientation(*args
, **kwargs
):
3397 """GetOrientation(self) -> int"""
3398 return _core_
.ScrollWinEvent_GetOrientation(*args
, **kwargs
)
3400 def GetPosition(*args
, **kwargs
):
3401 """GetPosition(self) -> int"""
3402 return _core_
.ScrollWinEvent_GetPosition(*args
, **kwargs
)
3404 def SetOrientation(*args
, **kwargs
):
3405 """SetOrientation(self, int orient)"""
3406 return _core_
.ScrollWinEvent_SetOrientation(*args
, **kwargs
)
3408 def SetPosition(*args
, **kwargs
):
3409 """SetPosition(self, int pos)"""
3410 return _core_
.ScrollWinEvent_SetPosition(*args
, **kwargs
)
3413 class ScrollWinEventPtr(ScrollWinEvent
):
3414 def __init__(self
, this
):
3416 if not hasattr(self
,"thisown"): self
.thisown
= 0
3417 self
.__class
__ = ScrollWinEvent
3418 _core_
.ScrollWinEvent_swigregister(ScrollWinEventPtr
)
3420 #---------------------------------------------------------------------------
3422 MOUSE_BTN_ANY
= _core_
.MOUSE_BTN_ANY
3423 MOUSE_BTN_NONE
= _core_
.MOUSE_BTN_NONE
3424 MOUSE_BTN_LEFT
= _core_
.MOUSE_BTN_LEFT
3425 MOUSE_BTN_MIDDLE
= _core_
.MOUSE_BTN_MIDDLE
3426 MOUSE_BTN_RIGHT
= _core_
.MOUSE_BTN_RIGHT
3427 class MouseEvent(Event
):
3429 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3430 def __init__(self
, *args
, **kwargs
):
3431 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3432 newobj
= _core_
.new_MouseEvent(*args
, **kwargs
)
3433 self
.this
= newobj
.this
3436 def IsButton(*args
, **kwargs
):
3437 """IsButton(self) -> bool"""
3438 return _core_
.MouseEvent_IsButton(*args
, **kwargs
)
3440 def ButtonDown(*args
, **kwargs
):
3441 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3442 return _core_
.MouseEvent_ButtonDown(*args
, **kwargs
)
3444 def ButtonDClick(*args
, **kwargs
):
3445 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3446 return _core_
.MouseEvent_ButtonDClick(*args
, **kwargs
)
3448 def ButtonUp(*args
, **kwargs
):
3449 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3450 return _core_
.MouseEvent_ButtonUp(*args
, **kwargs
)
3452 def Button(*args
, **kwargs
):
3453 """Button(self, int but) -> bool"""
3454 return _core_
.MouseEvent_Button(*args
, **kwargs
)
3456 def ButtonIsDown(*args
, **kwargs
):
3457 """ButtonIsDown(self, int but) -> bool"""
3458 return _core_
.MouseEvent_ButtonIsDown(*args
, **kwargs
)
3460 def GetButton(*args
, **kwargs
):
3461 """GetButton(self) -> int"""
3462 return _core_
.MouseEvent_GetButton(*args
, **kwargs
)
3464 def ControlDown(*args
, **kwargs
):
3465 """ControlDown(self) -> bool"""
3466 return _core_
.MouseEvent_ControlDown(*args
, **kwargs
)
3468 def MetaDown(*args
, **kwargs
):
3469 """MetaDown(self) -> bool"""
3470 return _core_
.MouseEvent_MetaDown(*args
, **kwargs
)
3472 def AltDown(*args
, **kwargs
):
3473 """AltDown(self) -> bool"""
3474 return _core_
.MouseEvent_AltDown(*args
, **kwargs
)
3476 def ShiftDown(*args
, **kwargs
):
3477 """ShiftDown(self) -> bool"""
3478 return _core_
.MouseEvent_ShiftDown(*args
, **kwargs
)
3480 def CmdDown(*args
, **kwargs
):
3482 CmdDown(self) -> bool
3484 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3485 platforms but the special "Apple" (a.k.a as "Command") key on
3486 Macs: it makes often sense to use it instead of, say, `ControlDown`
3487 because Cmd key is used for the same thing under Mac as Ctrl
3488 elsewhere. The Ctrl still exists, it's just not used for this
3489 purpose. So for non-Mac platforms this is the same as `ControlDown`
3490 and Macs this is the same as `MetaDown`.
3492 return _core_
.MouseEvent_CmdDown(*args
, **kwargs
)
3494 def LeftDown(*args
, **kwargs
):
3495 """LeftDown(self) -> bool"""
3496 return _core_
.MouseEvent_LeftDown(*args
, **kwargs
)
3498 def MiddleDown(*args
, **kwargs
):
3499 """MiddleDown(self) -> bool"""
3500 return _core_
.MouseEvent_MiddleDown(*args
, **kwargs
)
3502 def RightDown(*args
, **kwargs
):
3503 """RightDown(self) -> bool"""
3504 return _core_
.MouseEvent_RightDown(*args
, **kwargs
)
3506 def LeftUp(*args
, **kwargs
):
3507 """LeftUp(self) -> bool"""
3508 return _core_
.MouseEvent_LeftUp(*args
, **kwargs
)
3510 def MiddleUp(*args
, **kwargs
):
3511 """MiddleUp(self) -> bool"""
3512 return _core_
.MouseEvent_MiddleUp(*args
, **kwargs
)
3514 def RightUp(*args
, **kwargs
):
3515 """RightUp(self) -> bool"""
3516 return _core_
.MouseEvent_RightUp(*args
, **kwargs
)
3518 def LeftDClick(*args
, **kwargs
):
3519 """LeftDClick(self) -> bool"""
3520 return _core_
.MouseEvent_LeftDClick(*args
, **kwargs
)
3522 def MiddleDClick(*args
, **kwargs
):
3523 """MiddleDClick(self) -> bool"""
3524 return _core_
.MouseEvent_MiddleDClick(*args
, **kwargs
)
3526 def RightDClick(*args
, **kwargs
):
3527 """RightDClick(self) -> bool"""
3528 return _core_
.MouseEvent_RightDClick(*args
, **kwargs
)
3530 def LeftIsDown(*args
, **kwargs
):
3531 """LeftIsDown(self) -> bool"""
3532 return _core_
.MouseEvent_LeftIsDown(*args
, **kwargs
)
3534 def MiddleIsDown(*args
, **kwargs
):
3535 """MiddleIsDown(self) -> bool"""
3536 return _core_
.MouseEvent_MiddleIsDown(*args
, **kwargs
)
3538 def RightIsDown(*args
, **kwargs
):
3539 """RightIsDown(self) -> bool"""
3540 return _core_
.MouseEvent_RightIsDown(*args
, **kwargs
)
3542 def Dragging(*args
, **kwargs
):
3543 """Dragging(self) -> bool"""
3544 return _core_
.MouseEvent_Dragging(*args
, **kwargs
)
3546 def Moving(*args
, **kwargs
):
3547 """Moving(self) -> bool"""
3548 return _core_
.MouseEvent_Moving(*args
, **kwargs
)
3550 def Entering(*args
, **kwargs
):
3551 """Entering(self) -> bool"""
3552 return _core_
.MouseEvent_Entering(*args
, **kwargs
)
3554 def Leaving(*args
, **kwargs
):
3555 """Leaving(self) -> bool"""
3556 return _core_
.MouseEvent_Leaving(*args
, **kwargs
)
3558 def GetPosition(*args
, **kwargs
):
3560 GetPosition(self) -> Point
3562 Returns the position of the mouse in window coordinates when the event
3565 return _core_
.MouseEvent_GetPosition(*args
, **kwargs
)
3567 def GetPositionTuple(*args
, **kwargs
):
3569 GetPositionTuple() -> (x,y)
3571 Returns the position of the mouse in window coordinates when the event
3574 return _core_
.MouseEvent_GetPositionTuple(*args
, **kwargs
)
3576 def GetLogicalPosition(*args
, **kwargs
):
3577 """GetLogicalPosition(self, DC dc) -> Point"""
3578 return _core_
.MouseEvent_GetLogicalPosition(*args
, **kwargs
)
3580 def GetX(*args
, **kwargs
):
3581 """GetX(self) -> int"""
3582 return _core_
.MouseEvent_GetX(*args
, **kwargs
)
3584 def GetY(*args
, **kwargs
):
3585 """GetY(self) -> int"""
3586 return _core_
.MouseEvent_GetY(*args
, **kwargs
)
3588 def GetWheelRotation(*args
, **kwargs
):
3589 """GetWheelRotation(self) -> int"""
3590 return _core_
.MouseEvent_GetWheelRotation(*args
, **kwargs
)
3592 def GetWheelDelta(*args
, **kwargs
):
3593 """GetWheelDelta(self) -> int"""
3594 return _core_
.MouseEvent_GetWheelDelta(*args
, **kwargs
)
3596 def GetLinesPerAction(*args
, **kwargs
):
3597 """GetLinesPerAction(self) -> int"""
3598 return _core_
.MouseEvent_GetLinesPerAction(*args
, **kwargs
)
3600 def IsPageScroll(*args
, **kwargs
):
3601 """IsPageScroll(self) -> bool"""
3602 return _core_
.MouseEvent_IsPageScroll(*args
, **kwargs
)
3604 m_x
= property(_core_
.MouseEvent_m_x_get
, _core_
.MouseEvent_m_x_set
)
3605 m_y
= property(_core_
.MouseEvent_m_y_get
, _core_
.MouseEvent_m_y_set
)
3606 m_leftDown
= property(_core_
.MouseEvent_m_leftDown_get
, _core_
.MouseEvent_m_leftDown_set
)
3607 m_middleDown
= property(_core_
.MouseEvent_m_middleDown_get
, _core_
.MouseEvent_m_middleDown_set
)
3608 m_rightDown
= property(_core_
.MouseEvent_m_rightDown_get
, _core_
.MouseEvent_m_rightDown_set
)
3609 m_controlDown
= property(_core_
.MouseEvent_m_controlDown_get
, _core_
.MouseEvent_m_controlDown_set
)
3610 m_shiftDown
= property(_core_
.MouseEvent_m_shiftDown_get
, _core_
.MouseEvent_m_shiftDown_set
)
3611 m_altDown
= property(_core_
.MouseEvent_m_altDown_get
, _core_
.MouseEvent_m_altDown_set
)
3612 m_metaDown
= property(_core_
.MouseEvent_m_metaDown_get
, _core_
.MouseEvent_m_metaDown_set
)
3613 m_wheelRotation
= property(_core_
.MouseEvent_m_wheelRotation_get
, _core_
.MouseEvent_m_wheelRotation_set
)
3614 m_wheelDelta
= property(_core_
.MouseEvent_m_wheelDelta_get
, _core_
.MouseEvent_m_wheelDelta_set
)
3615 m_linesPerAction
= property(_core_
.MouseEvent_m_linesPerAction_get
, _core_
.MouseEvent_m_linesPerAction_set
)
3617 class MouseEventPtr(MouseEvent
):
3618 def __init__(self
, this
):
3620 if not hasattr(self
,"thisown"): self
.thisown
= 0
3621 self
.__class
__ = MouseEvent
3622 _core_
.MouseEvent_swigregister(MouseEventPtr
)
3624 #---------------------------------------------------------------------------
3626 class SetCursorEvent(Event
):
3628 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3629 def __init__(self
, *args
, **kwargs
):
3630 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3631 newobj
= _core_
.new_SetCursorEvent(*args
, **kwargs
)
3632 self
.this
= newobj
.this
3635 def GetX(*args
, **kwargs
):
3636 """GetX(self) -> int"""
3637 return _core_
.SetCursorEvent_GetX(*args
, **kwargs
)
3639 def GetY(*args
, **kwargs
):
3640 """GetY(self) -> int"""
3641 return _core_
.SetCursorEvent_GetY(*args
, **kwargs
)
3643 def SetCursor(*args
, **kwargs
):
3644 """SetCursor(self, Cursor cursor)"""
3645 return _core_
.SetCursorEvent_SetCursor(*args
, **kwargs
)
3647 def GetCursor(*args
, **kwargs
):
3648 """GetCursor(self) -> Cursor"""
3649 return _core_
.SetCursorEvent_GetCursor(*args
, **kwargs
)
3651 def HasCursor(*args
, **kwargs
):
3652 """HasCursor(self) -> bool"""
3653 return _core_
.SetCursorEvent_HasCursor(*args
, **kwargs
)
3656 class SetCursorEventPtr(SetCursorEvent
):
3657 def __init__(self
, this
):
3659 if not hasattr(self
,"thisown"): self
.thisown
= 0
3660 self
.__class
__ = SetCursorEvent
3661 _core_
.SetCursorEvent_swigregister(SetCursorEventPtr
)
3663 #---------------------------------------------------------------------------
3665 class KeyEvent(Event
):
3667 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3668 def __init__(self
, *args
, **kwargs
):
3669 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3670 newobj
= _core_
.new_KeyEvent(*args
, **kwargs
)
3671 self
.this
= newobj
.this
3674 def ControlDown(*args
, **kwargs
):
3675 """ControlDown(self) -> bool"""
3676 return _core_
.KeyEvent_ControlDown(*args
, **kwargs
)
3678 def MetaDown(*args
, **kwargs
):
3679 """MetaDown(self) -> bool"""
3680 return _core_
.KeyEvent_MetaDown(*args
, **kwargs
)
3682 def AltDown(*args
, **kwargs
):
3683 """AltDown(self) -> bool"""
3684 return _core_
.KeyEvent_AltDown(*args
, **kwargs
)
3686 def ShiftDown(*args
, **kwargs
):
3687 """ShiftDown(self) -> bool"""
3688 return _core_
.KeyEvent_ShiftDown(*args
, **kwargs
)
3690 def CmdDown(*args
, **kwargs
):
3692 CmdDown(self) -> bool
3694 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3695 platforms but the special "Apple" (a.k.a as "Command") key on
3696 Macs: it makes often sense to use it instead of, say, `ControlDown`
3697 because Cmd key is used for the same thing under Mac as Ctrl
3698 elsewhere. The Ctrl still exists, it's just not used for this
3699 purpose. So for non-Mac platforms this is the same as `ControlDown`
3700 and Macs this is the same as `MetaDown`.
3702 return _core_
.KeyEvent_CmdDown(*args
, **kwargs
)
3704 def HasModifiers(*args
, **kwargs
):
3705 """HasModifiers(self) -> bool"""
3706 return _core_
.KeyEvent_HasModifiers(*args
, **kwargs
)
3708 def GetKeyCode(*args
, **kwargs
):
3709 """GetKeyCode(self) -> int"""
3710 return _core_
.KeyEvent_GetKeyCode(*args
, **kwargs
)
3712 KeyCode
= GetKeyCode
3713 def GetUnicodeKey(*args
, **kwargs
):
3714 """GetUnicodeKey(self) -> int"""
3715 return _core_
.KeyEvent_GetUnicodeKey(*args
, **kwargs
)
3717 GetUniChar
= GetUnicodeKey
3718 def GetRawKeyCode(*args
, **kwargs
):
3719 """GetRawKeyCode(self) -> unsigned int"""
3720 return _core_
.KeyEvent_GetRawKeyCode(*args
, **kwargs
)
3722 def GetRawKeyFlags(*args
, **kwargs
):
3723 """GetRawKeyFlags(self) -> unsigned int"""
3724 return _core_
.KeyEvent_GetRawKeyFlags(*args
, **kwargs
)
3726 def GetPosition(*args
, **kwargs
):
3728 GetPosition(self) -> Point
3730 Find the position of the event.
3732 return _core_
.KeyEvent_GetPosition(*args
, **kwargs
)
3734 def GetPositionTuple(*args
, **kwargs
):
3736 GetPositionTuple() -> (x,y)
3738 Find the position of the event.
3740 return _core_
.KeyEvent_GetPositionTuple(*args
, **kwargs
)
3742 def GetX(*args
, **kwargs
):
3743 """GetX(self) -> int"""
3744 return _core_
.KeyEvent_GetX(*args
, **kwargs
)
3746 def GetY(*args
, **kwargs
):
3747 """GetY(self) -> int"""
3748 return _core_
.KeyEvent_GetY(*args
, **kwargs
)
3750 m_x
= property(_core_
.KeyEvent_m_x_get
, _core_
.KeyEvent_m_x_set
)
3751 m_y
= property(_core_
.KeyEvent_m_y_get
, _core_
.KeyEvent_m_y_set
)
3752 m_keyCode
= property(_core_
.KeyEvent_m_keyCode_get
, _core_
.KeyEvent_m_keyCode_set
)
3753 m_controlDown
= property(_core_
.KeyEvent_m_controlDown_get
, _core_
.KeyEvent_m_controlDown_set
)
3754 m_shiftDown
= property(_core_
.KeyEvent_m_shiftDown_get
, _core_
.KeyEvent_m_shiftDown_set
)
3755 m_altDown
= property(_core_
.KeyEvent_m_altDown_get
, _core_
.KeyEvent_m_altDown_set
)
3756 m_metaDown
= property(_core_
.KeyEvent_m_metaDown_get
, _core_
.KeyEvent_m_metaDown_set
)
3757 m_scanCode
= property(_core_
.KeyEvent_m_scanCode_get
, _core_
.KeyEvent_m_scanCode_set
)
3758 m_rawCode
= property(_core_
.KeyEvent_m_rawCode_get
, _core_
.KeyEvent_m_rawCode_set
)
3759 m_rawFlags
= property(_core_
.KeyEvent_m_rawFlags_get
, _core_
.KeyEvent_m_rawFlags_set
)
3761 class KeyEventPtr(KeyEvent
):
3762 def __init__(self
, this
):
3764 if not hasattr(self
,"thisown"): self
.thisown
= 0
3765 self
.__class
__ = KeyEvent
3766 _core_
.KeyEvent_swigregister(KeyEventPtr
)
3768 #---------------------------------------------------------------------------
3770 class SizeEvent(Event
):
3772 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3773 def __init__(self
, *args
, **kwargs
):
3774 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3775 newobj
= _core_
.new_SizeEvent(*args
, **kwargs
)
3776 self
.this
= newobj
.this
3779 def GetSize(*args
, **kwargs
):
3780 """GetSize(self) -> Size"""
3781 return _core_
.SizeEvent_GetSize(*args
, **kwargs
)
3783 def GetRect(*args
, **kwargs
):
3784 """GetRect(self) -> Rect"""
3785 return _core_
.SizeEvent_GetRect(*args
, **kwargs
)
3787 def SetRect(*args
, **kwargs
):
3788 """SetRect(self, Rect rect)"""
3789 return _core_
.SizeEvent_SetRect(*args
, **kwargs
)
3791 def SetSize(*args
, **kwargs
):
3792 """SetSize(self, Size size)"""
3793 return _core_
.SizeEvent_SetSize(*args
, **kwargs
)
3795 m_size
= property(_core_
.SizeEvent_m_size_get
, _core_
.SizeEvent_m_size_set
)
3796 m_rect
= property(_core_
.SizeEvent_m_rect_get
, _core_
.SizeEvent_m_rect_set
)
3798 class SizeEventPtr(SizeEvent
):
3799 def __init__(self
, this
):
3801 if not hasattr(self
,"thisown"): self
.thisown
= 0
3802 self
.__class
__ = SizeEvent
3803 _core_
.SizeEvent_swigregister(SizeEventPtr
)
3805 #---------------------------------------------------------------------------
3807 class MoveEvent(Event
):
3809 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3810 def __init__(self
, *args
, **kwargs
):
3811 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3812 newobj
= _core_
.new_MoveEvent(*args
, **kwargs
)
3813 self
.this
= newobj
.this
3816 def GetPosition(*args
, **kwargs
):
3817 """GetPosition(self) -> Point"""
3818 return _core_
.MoveEvent_GetPosition(*args
, **kwargs
)
3820 def GetRect(*args
, **kwargs
):
3821 """GetRect(self) -> Rect"""
3822 return _core_
.MoveEvent_GetRect(*args
, **kwargs
)
3824 def SetRect(*args
, **kwargs
):
3825 """SetRect(self, Rect rect)"""
3826 return _core_
.MoveEvent_SetRect(*args
, **kwargs
)
3828 def SetPosition(*args
, **kwargs
):
3829 """SetPosition(self, Point pos)"""
3830 return _core_
.MoveEvent_SetPosition(*args
, **kwargs
)
3832 m_pos
= property(_core_
.MoveEvent_m_pos_get
, _core_
.MoveEvent_m_pos_set
)
3833 m_rect
= property(_core_
.MoveEvent_m_rect_get
, _core_
.MoveEvent_m_rect_set
)
3835 class MoveEventPtr(MoveEvent
):
3836 def __init__(self
, this
):
3838 if not hasattr(self
,"thisown"): self
.thisown
= 0
3839 self
.__class
__ = MoveEvent
3840 _core_
.MoveEvent_swigregister(MoveEventPtr
)
3842 #---------------------------------------------------------------------------
3844 class PaintEvent(Event
):
3846 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3847 def __init__(self
, *args
, **kwargs
):
3848 """__init__(self, int Id=0) -> PaintEvent"""
3849 newobj
= _core_
.new_PaintEvent(*args
, **kwargs
)
3850 self
.this
= newobj
.this
3854 class PaintEventPtr(PaintEvent
):
3855 def __init__(self
, this
):
3857 if not hasattr(self
,"thisown"): self
.thisown
= 0
3858 self
.__class
__ = PaintEvent
3859 _core_
.PaintEvent_swigregister(PaintEventPtr
)
3861 class NcPaintEvent(Event
):
3863 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3864 def __init__(self
, *args
, **kwargs
):
3865 """__init__(self, int winid=0) -> NcPaintEvent"""
3866 newobj
= _core_
.new_NcPaintEvent(*args
, **kwargs
)
3867 self
.this
= newobj
.this
3871 class NcPaintEventPtr(NcPaintEvent
):
3872 def __init__(self
, this
):
3874 if not hasattr(self
,"thisown"): self
.thisown
= 0
3875 self
.__class
__ = NcPaintEvent
3876 _core_
.NcPaintEvent_swigregister(NcPaintEventPtr
)
3878 #---------------------------------------------------------------------------
3880 class EraseEvent(Event
):
3882 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3883 def __init__(self
, *args
, **kwargs
):
3884 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3885 newobj
= _core_
.new_EraseEvent(*args
, **kwargs
)
3886 self
.this
= newobj
.this
3889 def GetDC(*args
, **kwargs
):
3890 """GetDC(self) -> DC"""
3891 return _core_
.EraseEvent_GetDC(*args
, **kwargs
)
3894 class EraseEventPtr(EraseEvent
):
3895 def __init__(self
, this
):
3897 if not hasattr(self
,"thisown"): self
.thisown
= 0
3898 self
.__class
__ = EraseEvent
3899 _core_
.EraseEvent_swigregister(EraseEventPtr
)
3901 #---------------------------------------------------------------------------
3903 class FocusEvent(Event
):
3905 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3906 def __init__(self
, *args
, **kwargs
):
3907 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
3908 newobj
= _core_
.new_FocusEvent(*args
, **kwargs
)
3909 self
.this
= newobj
.this
3912 def GetWindow(*args
, **kwargs
):
3913 """GetWindow(self) -> Window"""
3914 return _core_
.FocusEvent_GetWindow(*args
, **kwargs
)
3916 def SetWindow(*args
, **kwargs
):
3917 """SetWindow(self, Window win)"""
3918 return _core_
.FocusEvent_SetWindow(*args
, **kwargs
)
3921 class FocusEventPtr(FocusEvent
):
3922 def __init__(self
, this
):
3924 if not hasattr(self
,"thisown"): self
.thisown
= 0
3925 self
.__class
__ = FocusEvent
3926 _core_
.FocusEvent_swigregister(FocusEventPtr
)
3928 #---------------------------------------------------------------------------
3930 class ChildFocusEvent(CommandEvent
):
3932 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3933 def __init__(self
, *args
, **kwargs
):
3934 """__init__(self, Window win=None) -> ChildFocusEvent"""
3935 newobj
= _core_
.new_ChildFocusEvent(*args
, **kwargs
)
3936 self
.this
= newobj
.this
3939 def GetWindow(*args
, **kwargs
):
3940 """GetWindow(self) -> Window"""
3941 return _core_
.ChildFocusEvent_GetWindow(*args
, **kwargs
)
3944 class ChildFocusEventPtr(ChildFocusEvent
):
3945 def __init__(self
, this
):
3947 if not hasattr(self
,"thisown"): self
.thisown
= 0
3948 self
.__class
__ = ChildFocusEvent
3949 _core_
.ChildFocusEvent_swigregister(ChildFocusEventPtr
)
3951 #---------------------------------------------------------------------------
3953 class ActivateEvent(Event
):
3955 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3956 def __init__(self
, *args
, **kwargs
):
3957 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
3958 newobj
= _core_
.new_ActivateEvent(*args
, **kwargs
)
3959 self
.this
= newobj
.this
3962 def GetActive(*args
, **kwargs
):
3963 """GetActive(self) -> bool"""
3964 return _core_
.ActivateEvent_GetActive(*args
, **kwargs
)
3967 class ActivateEventPtr(ActivateEvent
):
3968 def __init__(self
, this
):
3970 if not hasattr(self
,"thisown"): self
.thisown
= 0
3971 self
.__class
__ = ActivateEvent
3972 _core_
.ActivateEvent_swigregister(ActivateEventPtr
)
3974 #---------------------------------------------------------------------------
3976 class InitDialogEvent(Event
):
3978 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3979 def __init__(self
, *args
, **kwargs
):
3980 """__init__(self, int Id=0) -> InitDialogEvent"""
3981 newobj
= _core_
.new_InitDialogEvent(*args
, **kwargs
)
3982 self
.this
= newobj
.this
3986 class InitDialogEventPtr(InitDialogEvent
):
3987 def __init__(self
, this
):
3989 if not hasattr(self
,"thisown"): self
.thisown
= 0
3990 self
.__class
__ = InitDialogEvent
3991 _core_
.InitDialogEvent_swigregister(InitDialogEventPtr
)
3993 #---------------------------------------------------------------------------
3995 class MenuEvent(Event
):
3997 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3998 def __init__(self
, *args
, **kwargs
):
3999 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4000 newobj
= _core_
.new_MenuEvent(*args
, **kwargs
)
4001 self
.this
= newobj
.this
4004 def GetMenuId(*args
, **kwargs
):
4005 """GetMenuId(self) -> int"""
4006 return _core_
.MenuEvent_GetMenuId(*args
, **kwargs
)
4008 def IsPopup(*args
, **kwargs
):
4009 """IsPopup(self) -> bool"""
4010 return _core_
.MenuEvent_IsPopup(*args
, **kwargs
)
4012 def GetMenu(*args
, **kwargs
):
4013 """GetMenu(self) -> Menu"""
4014 return _core_
.MenuEvent_GetMenu(*args
, **kwargs
)
4017 class MenuEventPtr(MenuEvent
):
4018 def __init__(self
, this
):
4020 if not hasattr(self
,"thisown"): self
.thisown
= 0
4021 self
.__class
__ = MenuEvent
4022 _core_
.MenuEvent_swigregister(MenuEventPtr
)
4024 #---------------------------------------------------------------------------
4026 class CloseEvent(Event
):
4028 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4029 def __init__(self
, *args
, **kwargs
):
4030 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4031 newobj
= _core_
.new_CloseEvent(*args
, **kwargs
)
4032 self
.this
= newobj
.this
4035 def SetLoggingOff(*args
, **kwargs
):
4036 """SetLoggingOff(self, bool logOff)"""
4037 return _core_
.CloseEvent_SetLoggingOff(*args
, **kwargs
)
4039 def GetLoggingOff(*args
, **kwargs
):
4040 """GetLoggingOff(self) -> bool"""
4041 return _core_
.CloseEvent_GetLoggingOff(*args
, **kwargs
)
4043 def Veto(*args
, **kwargs
):
4044 """Veto(self, bool veto=True)"""
4045 return _core_
.CloseEvent_Veto(*args
, **kwargs
)
4047 def SetCanVeto(*args
, **kwargs
):
4048 """SetCanVeto(self, bool canVeto)"""
4049 return _core_
.CloseEvent_SetCanVeto(*args
, **kwargs
)
4051 def CanVeto(*args
, **kwargs
):
4052 """CanVeto(self) -> bool"""
4053 return _core_
.CloseEvent_CanVeto(*args
, **kwargs
)
4055 def GetVeto(*args
, **kwargs
):
4056 """GetVeto(self) -> bool"""
4057 return _core_
.CloseEvent_GetVeto(*args
, **kwargs
)
4060 class CloseEventPtr(CloseEvent
):
4061 def __init__(self
, this
):
4063 if not hasattr(self
,"thisown"): self
.thisown
= 0
4064 self
.__class
__ = CloseEvent
4065 _core_
.CloseEvent_swigregister(CloseEventPtr
)
4067 #---------------------------------------------------------------------------
4069 class ShowEvent(Event
):
4071 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4072 def __init__(self
, *args
, **kwargs
):
4073 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4074 newobj
= _core_
.new_ShowEvent(*args
, **kwargs
)
4075 self
.this
= newobj
.this
4078 def SetShow(*args
, **kwargs
):
4079 """SetShow(self, bool show)"""
4080 return _core_
.ShowEvent_SetShow(*args
, **kwargs
)
4082 def GetShow(*args
, **kwargs
):
4083 """GetShow(self) -> bool"""
4084 return _core_
.ShowEvent_GetShow(*args
, **kwargs
)
4087 class ShowEventPtr(ShowEvent
):
4088 def __init__(self
, this
):
4090 if not hasattr(self
,"thisown"): self
.thisown
= 0
4091 self
.__class
__ = ShowEvent
4092 _core_
.ShowEvent_swigregister(ShowEventPtr
)
4094 #---------------------------------------------------------------------------
4096 class IconizeEvent(Event
):
4098 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4099 def __init__(self
, *args
, **kwargs
):
4100 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4101 newobj
= _core_
.new_IconizeEvent(*args
, **kwargs
)
4102 self
.this
= newobj
.this
4105 def Iconized(*args
, **kwargs
):
4106 """Iconized(self) -> bool"""
4107 return _core_
.IconizeEvent_Iconized(*args
, **kwargs
)
4110 class IconizeEventPtr(IconizeEvent
):
4111 def __init__(self
, this
):
4113 if not hasattr(self
,"thisown"): self
.thisown
= 0
4114 self
.__class
__ = IconizeEvent
4115 _core_
.IconizeEvent_swigregister(IconizeEventPtr
)
4117 #---------------------------------------------------------------------------
4119 class MaximizeEvent(Event
):
4121 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4122 def __init__(self
, *args
, **kwargs
):
4123 """__init__(self, int id=0) -> MaximizeEvent"""
4124 newobj
= _core_
.new_MaximizeEvent(*args
, **kwargs
)
4125 self
.this
= newobj
.this
4129 class MaximizeEventPtr(MaximizeEvent
):
4130 def __init__(self
, this
):
4132 if not hasattr(self
,"thisown"): self
.thisown
= 0
4133 self
.__class
__ = MaximizeEvent
4134 _core_
.MaximizeEvent_swigregister(MaximizeEventPtr
)
4136 #---------------------------------------------------------------------------
4138 class DropFilesEvent(Event
):
4139 def __init__(self
): raise RuntimeError, "No constructor defined"
4141 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4142 def GetPosition(*args
, **kwargs
):
4143 """GetPosition(self) -> Point"""
4144 return _core_
.DropFilesEvent_GetPosition(*args
, **kwargs
)
4146 def GetNumberOfFiles(*args
, **kwargs
):
4147 """GetNumberOfFiles(self) -> int"""
4148 return _core_
.DropFilesEvent_GetNumberOfFiles(*args
, **kwargs
)
4150 def GetFiles(*args
, **kwargs
):
4151 """GetFiles(self) -> PyObject"""
4152 return _core_
.DropFilesEvent_GetFiles(*args
, **kwargs
)
4155 class DropFilesEventPtr(DropFilesEvent
):
4156 def __init__(self
, this
):
4158 if not hasattr(self
,"thisown"): self
.thisown
= 0
4159 self
.__class
__ = DropFilesEvent
4160 _core_
.DropFilesEvent_swigregister(DropFilesEventPtr
)
4162 #---------------------------------------------------------------------------
4164 UPDATE_UI_PROCESS_ALL
= _core_
.UPDATE_UI_PROCESS_ALL
4165 UPDATE_UI_PROCESS_SPECIFIED
= _core_
.UPDATE_UI_PROCESS_SPECIFIED
4166 class UpdateUIEvent(CommandEvent
):
4168 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4169 def __init__(self
, *args
, **kwargs
):
4170 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4171 newobj
= _core_
.new_UpdateUIEvent(*args
, **kwargs
)
4172 self
.this
= newobj
.this
4175 def GetChecked(*args
, **kwargs
):
4176 """GetChecked(self) -> bool"""
4177 return _core_
.UpdateUIEvent_GetChecked(*args
, **kwargs
)
4179 def GetEnabled(*args
, **kwargs
):
4180 """GetEnabled(self) -> bool"""
4181 return _core_
.UpdateUIEvent_GetEnabled(*args
, **kwargs
)
4183 def GetText(*args
, **kwargs
):
4184 """GetText(self) -> String"""
4185 return _core_
.UpdateUIEvent_GetText(*args
, **kwargs
)
4187 def GetSetText(*args
, **kwargs
):
4188 """GetSetText(self) -> bool"""
4189 return _core_
.UpdateUIEvent_GetSetText(*args
, **kwargs
)
4191 def GetSetChecked(*args
, **kwargs
):
4192 """GetSetChecked(self) -> bool"""
4193 return _core_
.UpdateUIEvent_GetSetChecked(*args
, **kwargs
)
4195 def GetSetEnabled(*args
, **kwargs
):
4196 """GetSetEnabled(self) -> bool"""
4197 return _core_
.UpdateUIEvent_GetSetEnabled(*args
, **kwargs
)
4199 def Check(*args
, **kwargs
):
4200 """Check(self, bool check)"""
4201 return _core_
.UpdateUIEvent_Check(*args
, **kwargs
)
4203 def Enable(*args
, **kwargs
):
4204 """Enable(self, bool enable)"""
4205 return _core_
.UpdateUIEvent_Enable(*args
, **kwargs
)
4207 def SetText(*args
, **kwargs
):
4208 """SetText(self, String text)"""
4209 return _core_
.UpdateUIEvent_SetText(*args
, **kwargs
)
4211 def SetUpdateInterval(*args
, **kwargs
):
4212 """SetUpdateInterval(long updateInterval)"""
4213 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4215 SetUpdateInterval
= staticmethod(SetUpdateInterval
)
4216 def GetUpdateInterval(*args
, **kwargs
):
4217 """GetUpdateInterval() -> long"""
4218 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4220 GetUpdateInterval
= staticmethod(GetUpdateInterval
)
4221 def CanUpdate(*args
, **kwargs
):
4222 """CanUpdate(Window win) -> bool"""
4223 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4225 CanUpdate
= staticmethod(CanUpdate
)
4226 def ResetUpdateTime(*args
, **kwargs
):
4227 """ResetUpdateTime()"""
4228 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4230 ResetUpdateTime
= staticmethod(ResetUpdateTime
)
4231 def SetMode(*args
, **kwargs
):
4232 """SetMode(int mode)"""
4233 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4235 SetMode
= staticmethod(SetMode
)
4236 def GetMode(*args
, **kwargs
):
4237 """GetMode() -> int"""
4238 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4240 GetMode
= staticmethod(GetMode
)
4242 class UpdateUIEventPtr(UpdateUIEvent
):
4243 def __init__(self
, this
):
4245 if not hasattr(self
,"thisown"): self
.thisown
= 0
4246 self
.__class
__ = UpdateUIEvent
4247 _core_
.UpdateUIEvent_swigregister(UpdateUIEventPtr
)
4249 def UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
):
4250 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4251 return _core_
.UpdateUIEvent_SetUpdateInterval(*args
, **kwargs
)
4253 def UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
):
4254 """UpdateUIEvent_GetUpdateInterval() -> long"""
4255 return _core_
.UpdateUIEvent_GetUpdateInterval(*args
, **kwargs
)
4257 def UpdateUIEvent_CanUpdate(*args
, **kwargs
):
4258 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4259 return _core_
.UpdateUIEvent_CanUpdate(*args
, **kwargs
)
4261 def UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
):
4262 """UpdateUIEvent_ResetUpdateTime()"""
4263 return _core_
.UpdateUIEvent_ResetUpdateTime(*args
, **kwargs
)
4265 def UpdateUIEvent_SetMode(*args
, **kwargs
):
4266 """UpdateUIEvent_SetMode(int mode)"""
4267 return _core_
.UpdateUIEvent_SetMode(*args
, **kwargs
)
4269 def UpdateUIEvent_GetMode(*args
, **kwargs
):
4270 """UpdateUIEvent_GetMode() -> int"""
4271 return _core_
.UpdateUIEvent_GetMode(*args
, **kwargs
)
4273 #---------------------------------------------------------------------------
4275 class SysColourChangedEvent(Event
):
4277 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4278 def __init__(self
, *args
, **kwargs
):
4279 """__init__(self) -> SysColourChangedEvent"""
4280 newobj
= _core_
.new_SysColourChangedEvent(*args
, **kwargs
)
4281 self
.this
= newobj
.this
4285 class SysColourChangedEventPtr(SysColourChangedEvent
):
4286 def __init__(self
, this
):
4288 if not hasattr(self
,"thisown"): self
.thisown
= 0
4289 self
.__class
__ = SysColourChangedEvent
4290 _core_
.SysColourChangedEvent_swigregister(SysColourChangedEventPtr
)
4292 #---------------------------------------------------------------------------
4294 class MouseCaptureChangedEvent(Event
):
4296 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4297 def __init__(self
, *args
, **kwargs
):
4298 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4299 newobj
= _core_
.new_MouseCaptureChangedEvent(*args
, **kwargs
)
4300 self
.this
= newobj
.this
4303 def GetCapturedWindow(*args
, **kwargs
):
4304 """GetCapturedWindow(self) -> Window"""
4305 return _core_
.MouseCaptureChangedEvent_GetCapturedWindow(*args
, **kwargs
)
4308 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent
):
4309 def __init__(self
, this
):
4311 if not hasattr(self
,"thisown"): self
.thisown
= 0
4312 self
.__class
__ = MouseCaptureChangedEvent
4313 _core_
.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr
)
4315 #---------------------------------------------------------------------------
4317 class DisplayChangedEvent(Event
):
4319 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4320 def __init__(self
, *args
, **kwargs
):
4321 """__init__(self) -> DisplayChangedEvent"""
4322 newobj
= _core_
.new_DisplayChangedEvent(*args
, **kwargs
)
4323 self
.this
= newobj
.this
4327 class DisplayChangedEventPtr(DisplayChangedEvent
):
4328 def __init__(self
, this
):
4330 if not hasattr(self
,"thisown"): self
.thisown
= 0
4331 self
.__class
__ = DisplayChangedEvent
4332 _core_
.DisplayChangedEvent_swigregister(DisplayChangedEventPtr
)
4334 #---------------------------------------------------------------------------
4336 class PaletteChangedEvent(Event
):
4338 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4339 def __init__(self
, *args
, **kwargs
):
4340 """__init__(self, int id=0) -> PaletteChangedEvent"""
4341 newobj
= _core_
.new_PaletteChangedEvent(*args
, **kwargs
)
4342 self
.this
= newobj
.this
4345 def SetChangedWindow(*args
, **kwargs
):
4346 """SetChangedWindow(self, Window win)"""
4347 return _core_
.PaletteChangedEvent_SetChangedWindow(*args
, **kwargs
)
4349 def GetChangedWindow(*args
, **kwargs
):
4350 """GetChangedWindow(self) -> Window"""
4351 return _core_
.PaletteChangedEvent_GetChangedWindow(*args
, **kwargs
)
4354 class PaletteChangedEventPtr(PaletteChangedEvent
):
4355 def __init__(self
, this
):
4357 if not hasattr(self
,"thisown"): self
.thisown
= 0
4358 self
.__class
__ = PaletteChangedEvent
4359 _core_
.PaletteChangedEvent_swigregister(PaletteChangedEventPtr
)
4361 #---------------------------------------------------------------------------
4363 class QueryNewPaletteEvent(Event
):
4365 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4366 def __init__(self
, *args
, **kwargs
):
4367 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4368 newobj
= _core_
.new_QueryNewPaletteEvent(*args
, **kwargs
)
4369 self
.this
= newobj
.this
4372 def SetPaletteRealized(*args
, **kwargs
):
4373 """SetPaletteRealized(self, bool realized)"""
4374 return _core_
.QueryNewPaletteEvent_SetPaletteRealized(*args
, **kwargs
)
4376 def GetPaletteRealized(*args
, **kwargs
):
4377 """GetPaletteRealized(self) -> bool"""
4378 return _core_
.QueryNewPaletteEvent_GetPaletteRealized(*args
, **kwargs
)
4381 class QueryNewPaletteEventPtr(QueryNewPaletteEvent
):
4382 def __init__(self
, this
):
4384 if not hasattr(self
,"thisown"): self
.thisown
= 0
4385 self
.__class
__ = QueryNewPaletteEvent
4386 _core_
.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr
)
4388 #---------------------------------------------------------------------------
4390 class NavigationKeyEvent(Event
):
4392 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4393 def __init__(self
, *args
, **kwargs
):
4394 """__init__(self) -> NavigationKeyEvent"""
4395 newobj
= _core_
.new_NavigationKeyEvent(*args
, **kwargs
)
4396 self
.this
= newobj
.this
4399 def GetDirection(*args
, **kwargs
):
4400 """GetDirection(self) -> bool"""
4401 return _core_
.NavigationKeyEvent_GetDirection(*args
, **kwargs
)
4403 def SetDirection(*args
, **kwargs
):
4404 """SetDirection(self, bool forward)"""
4405 return _core_
.NavigationKeyEvent_SetDirection(*args
, **kwargs
)
4407 def IsWindowChange(*args
, **kwargs
):
4408 """IsWindowChange(self) -> bool"""
4409 return _core_
.NavigationKeyEvent_IsWindowChange(*args
, **kwargs
)
4411 def SetWindowChange(*args
, **kwargs
):
4412 """SetWindowChange(self, bool ischange)"""
4413 return _core_
.NavigationKeyEvent_SetWindowChange(*args
, **kwargs
)
4415 def SetFlags(*args
, **kwargs
):
4416 """SetFlags(self, long flags)"""
4417 return _core_
.NavigationKeyEvent_SetFlags(*args
, **kwargs
)
4419 def GetCurrentFocus(*args
, **kwargs
):
4420 """GetCurrentFocus(self) -> Window"""
4421 return _core_
.NavigationKeyEvent_GetCurrentFocus(*args
, **kwargs
)
4423 def SetCurrentFocus(*args
, **kwargs
):
4424 """SetCurrentFocus(self, Window win)"""
4425 return _core_
.NavigationKeyEvent_SetCurrentFocus(*args
, **kwargs
)
4427 IsBackward
= _core_
.NavigationKeyEvent_IsBackward
4428 IsForward
= _core_
.NavigationKeyEvent_IsForward
4429 WinChange
= _core_
.NavigationKeyEvent_WinChange
4431 class NavigationKeyEventPtr(NavigationKeyEvent
):
4432 def __init__(self
, this
):
4434 if not hasattr(self
,"thisown"): self
.thisown
= 0
4435 self
.__class
__ = NavigationKeyEvent
4436 _core_
.NavigationKeyEvent_swigregister(NavigationKeyEventPtr
)
4438 #---------------------------------------------------------------------------
4440 class WindowCreateEvent(CommandEvent
):
4442 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4443 def __init__(self
, *args
, **kwargs
):
4444 """__init__(self, Window win=None) -> WindowCreateEvent"""
4445 newobj
= _core_
.new_WindowCreateEvent(*args
, **kwargs
)
4446 self
.this
= newobj
.this
4449 def GetWindow(*args
, **kwargs
):
4450 """GetWindow(self) -> Window"""
4451 return _core_
.WindowCreateEvent_GetWindow(*args
, **kwargs
)
4454 class WindowCreateEventPtr(WindowCreateEvent
):
4455 def __init__(self
, this
):
4457 if not hasattr(self
,"thisown"): self
.thisown
= 0
4458 self
.__class
__ = WindowCreateEvent
4459 _core_
.WindowCreateEvent_swigregister(WindowCreateEventPtr
)
4461 class WindowDestroyEvent(CommandEvent
):
4463 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4464 def __init__(self
, *args
, **kwargs
):
4465 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4466 newobj
= _core_
.new_WindowDestroyEvent(*args
, **kwargs
)
4467 self
.this
= newobj
.this
4470 def GetWindow(*args
, **kwargs
):
4471 """GetWindow(self) -> Window"""
4472 return _core_
.WindowDestroyEvent_GetWindow(*args
, **kwargs
)
4475 class WindowDestroyEventPtr(WindowDestroyEvent
):
4476 def __init__(self
, this
):
4478 if not hasattr(self
,"thisown"): self
.thisown
= 0
4479 self
.__class
__ = WindowDestroyEvent
4480 _core_
.WindowDestroyEvent_swigregister(WindowDestroyEventPtr
)
4482 #---------------------------------------------------------------------------
4484 class ContextMenuEvent(CommandEvent
):
4486 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4487 def __init__(self
, *args
, **kwargs
):
4488 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4489 newobj
= _core_
.new_ContextMenuEvent(*args
, **kwargs
)
4490 self
.this
= newobj
.this
4493 def GetPosition(*args
, **kwargs
):
4494 """GetPosition(self) -> Point"""
4495 return _core_
.ContextMenuEvent_GetPosition(*args
, **kwargs
)
4497 def SetPosition(*args
, **kwargs
):
4498 """SetPosition(self, Point pos)"""
4499 return _core_
.ContextMenuEvent_SetPosition(*args
, **kwargs
)
4502 class ContextMenuEventPtr(ContextMenuEvent
):
4503 def __init__(self
, this
):
4505 if not hasattr(self
,"thisown"): self
.thisown
= 0
4506 self
.__class
__ = ContextMenuEvent
4507 _core_
.ContextMenuEvent_swigregister(ContextMenuEventPtr
)
4509 #---------------------------------------------------------------------------
4511 IDLE_PROCESS_ALL
= _core_
.IDLE_PROCESS_ALL
4512 IDLE_PROCESS_SPECIFIED
= _core_
.IDLE_PROCESS_SPECIFIED
4513 class IdleEvent(Event
):
4515 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4516 def __init__(self
, *args
, **kwargs
):
4517 """__init__(self) -> IdleEvent"""
4518 newobj
= _core_
.new_IdleEvent(*args
, **kwargs
)
4519 self
.this
= newobj
.this
4522 def RequestMore(*args
, **kwargs
):
4523 """RequestMore(self, bool needMore=True)"""
4524 return _core_
.IdleEvent_RequestMore(*args
, **kwargs
)
4526 def MoreRequested(*args
, **kwargs
):
4527 """MoreRequested(self) -> bool"""
4528 return _core_
.IdleEvent_MoreRequested(*args
, **kwargs
)
4530 def SetMode(*args
, **kwargs
):
4531 """SetMode(int mode)"""
4532 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4534 SetMode
= staticmethod(SetMode
)
4535 def GetMode(*args
, **kwargs
):
4536 """GetMode() -> int"""
4537 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4539 GetMode
= staticmethod(GetMode
)
4540 def CanSend(*args
, **kwargs
):
4541 """CanSend(Window win) -> bool"""
4542 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4544 CanSend
= staticmethod(CanSend
)
4546 class IdleEventPtr(IdleEvent
):
4547 def __init__(self
, this
):
4549 if not hasattr(self
,"thisown"): self
.thisown
= 0
4550 self
.__class
__ = IdleEvent
4551 _core_
.IdleEvent_swigregister(IdleEventPtr
)
4553 def IdleEvent_SetMode(*args
, **kwargs
):
4554 """IdleEvent_SetMode(int mode)"""
4555 return _core_
.IdleEvent_SetMode(*args
, **kwargs
)
4557 def IdleEvent_GetMode(*args
, **kwargs
):
4558 """IdleEvent_GetMode() -> int"""
4559 return _core_
.IdleEvent_GetMode(*args
, **kwargs
)
4561 def IdleEvent_CanSend(*args
, **kwargs
):
4562 """IdleEvent_CanSend(Window win) -> bool"""
4563 return _core_
.IdleEvent_CanSend(*args
, **kwargs
)
4565 #---------------------------------------------------------------------------
4567 class PyEvent(Event
):
4569 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4570 def __init__(self
, *args
, **kwargs
):
4571 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4572 newobj
= _core_
.new_PyEvent(*args
, **kwargs
)
4573 self
.this
= newobj
.this
4578 def __del__(self
, destroy
=_core_
.delete_PyEvent
):
4581 if self
.thisown
: destroy(self
)
4584 def SetSelf(*args
, **kwargs
):
4585 """SetSelf(self, PyObject self)"""
4586 return _core_
.PyEvent_SetSelf(*args
, **kwargs
)
4588 def GetSelf(*args
, **kwargs
):
4589 """GetSelf(self) -> PyObject"""
4590 return _core_
.PyEvent_GetSelf(*args
, **kwargs
)
4593 class PyEventPtr(PyEvent
):
4594 def __init__(self
, this
):
4596 if not hasattr(self
,"thisown"): self
.thisown
= 0
4597 self
.__class
__ = PyEvent
4598 _core_
.PyEvent_swigregister(PyEventPtr
)
4600 class PyCommandEvent(CommandEvent
):
4602 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4603 def __init__(self
, *args
, **kwargs
):
4604 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4605 newobj
= _core_
.new_PyCommandEvent(*args
, **kwargs
)
4606 self
.this
= newobj
.this
4611 def __del__(self
, destroy
=_core_
.delete_PyCommandEvent
):
4614 if self
.thisown
: destroy(self
)
4617 def SetSelf(*args
, **kwargs
):
4618 """SetSelf(self, PyObject self)"""
4619 return _core_
.PyCommandEvent_SetSelf(*args
, **kwargs
)
4621 def GetSelf(*args
, **kwargs
):
4622 """GetSelf(self) -> PyObject"""
4623 return _core_
.PyCommandEvent_GetSelf(*args
, **kwargs
)
4626 class PyCommandEventPtr(PyCommandEvent
):
4627 def __init__(self
, this
):
4629 if not hasattr(self
,"thisown"): self
.thisown
= 0
4630 self
.__class
__ = PyCommandEvent
4631 _core_
.PyCommandEvent_swigregister(PyCommandEventPtr
)
4633 #---------------------------------------------------------------------------
4635 PYAPP_ASSERT_SUPPRESS
= _core_
.PYAPP_ASSERT_SUPPRESS
4636 PYAPP_ASSERT_EXCEPTION
= _core_
.PYAPP_ASSERT_EXCEPTION
4637 PYAPP_ASSERT_DIALOG
= _core_
.PYAPP_ASSERT_DIALOG
4638 PYAPP_ASSERT_LOG
= _core_
.PYAPP_ASSERT_LOG
4639 PRINT_WINDOWS
= _core_
.PRINT_WINDOWS
4640 PRINT_POSTSCRIPT
= _core_
.PRINT_POSTSCRIPT
4641 class PyApp(EvtHandler
):
4643 The ``wx.PyApp`` class is an *implementation detail*, please use the
4644 `wx.App` class (or some other derived class) instead.
4647 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4648 def __init__(self
, *args
, **kwargs
):
4650 __init__(self) -> PyApp
4652 Create a new application object, starting the bootstrap process.
4654 newobj
= _core_
.new_PyApp(*args
, **kwargs
)
4655 self
.this
= newobj
.this
4658 self
._setCallbackInfo
(self
, PyApp
)
4659 self
._setOORInfo
(self
)
4661 def __del__(self
, destroy
=_core_
.delete_PyApp
):
4664 if self
.thisown
: destroy(self
)
4667 def _setCallbackInfo(*args
, **kwargs
):
4668 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4669 return _core_
.PyApp__setCallbackInfo(*args
, **kwargs
)
4671 def GetAppName(*args
, **kwargs
):
4673 GetAppName(self) -> String
4675 Get the application name.
4677 return _core_
.PyApp_GetAppName(*args
, **kwargs
)
4679 def SetAppName(*args
, **kwargs
):
4681 SetAppName(self, String name)
4683 Set the application name. This value may be used automatically by
4684 `wx.Config` and such.
4686 return _core_
.PyApp_SetAppName(*args
, **kwargs
)
4688 def GetClassName(*args
, **kwargs
):
4690 GetClassName(self) -> String
4692 Get the application's class name.
4694 return _core_
.PyApp_GetClassName(*args
, **kwargs
)
4696 def SetClassName(*args
, **kwargs
):
4698 SetClassName(self, String name)
4700 Set the application's class name. This value may be used for
4701 X-resources if applicable for the platform
4703 return _core_
.PyApp_SetClassName(*args
, **kwargs
)
4705 def GetVendorName(*args
, **kwargs
):
4707 GetVendorName(self) -> String
4709 Get the application's vendor name.
4711 return _core_
.PyApp_GetVendorName(*args
, **kwargs
)
4713 def SetVendorName(*args
, **kwargs
):
4715 SetVendorName(self, String name)
4717 Set the application's vendor name. This value may be used
4718 automatically by `wx.Config` and such.
4720 return _core_
.PyApp_SetVendorName(*args
, **kwargs
)
4722 def GetTraits(*args
, **kwargs
):
4724 GetTraits(self) -> wxAppTraits
4726 Return (and create if necessary) the app traits object to which we
4727 delegate for everything which either should be configurable by the
4728 user (then he can change the default behaviour simply by overriding
4729 CreateTraits() and returning his own traits object) or which is
4730 GUI/console dependent as then wx.AppTraits allows us to abstract the
4731 differences behind the common facade.
4733 :todo: Add support for overriding CreateAppTraits in wxPython.
4735 return _core_
.PyApp_GetTraits(*args
, **kwargs
)
4737 def ProcessPendingEvents(*args
, **kwargs
):
4739 ProcessPendingEvents(self)
4741 Process all events in the Pending Events list -- it is necessary to
4742 call this function to process posted events. This normally happens
4743 during each event loop iteration.
4745 return _core_
.PyApp_ProcessPendingEvents(*args
, **kwargs
)
4747 def Yield(*args
, **kwargs
):
4749 Yield(self, bool onlyIfNeeded=False) -> bool
4751 Process all currently pending events right now, instead of waiting
4752 until return to the event loop. It is an error to call ``Yield``
4753 recursively unless the value of ``onlyIfNeeded`` is True.
4755 :warning: This function is dangerous as it can lead to unexpected
4756 reentrancies (i.e. when called from an event handler it may
4757 result in calling the same event handler again), use with
4758 extreme care or, better, don't use at all!
4760 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4763 return _core_
.PyApp_Yield(*args
, **kwargs
)
4765 def WakeUpIdle(*args
, **kwargs
):
4769 Make sure that idle events are sent again.
4770 :see: `wx.WakeUpIdle`
4772 return _core_
.PyApp_WakeUpIdle(*args
, **kwargs
)
4774 def IsMainLoopRunning(*args
, **kwargs
):
4776 IsMainLoopRunning() -> bool
4778 Returns True if we're running the main loop, i.e. if the events can
4779 currently be dispatched.
4781 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
4783 IsMainLoopRunning
= staticmethod(IsMainLoopRunning
)
4784 def MainLoop(*args
, **kwargs
):
4786 MainLoop(self) -> int
4788 Execute the main GUI loop, the function doesn't normally return until
4789 all top level windows have been closed and destroyed.
4791 return _core_
.PyApp_MainLoop(*args
, **kwargs
)
4793 def Exit(*args
, **kwargs
):
4797 Exit the main loop thus terminating the application.
4800 return _core_
.PyApp_Exit(*args
, **kwargs
)
4802 def ExitMainLoop(*args
, **kwargs
):
4806 Exit the main GUI loop during the next iteration of the main
4807 loop, (i.e. it does not stop the program immediately!)
4809 return _core_
.PyApp_ExitMainLoop(*args
, **kwargs
)
4811 def Pending(*args
, **kwargs
):
4813 Pending(self) -> bool
4815 Returns True if there are unprocessed events in the event queue.
4817 return _core_
.PyApp_Pending(*args
, **kwargs
)
4819 def Dispatch(*args
, **kwargs
):
4821 Dispatch(self) -> bool
4823 Process the first event in the event queue (blocks until an event
4824 appears if there are none currently)
4826 return _core_
.PyApp_Dispatch(*args
, **kwargs
)
4828 def ProcessIdle(*args
, **kwargs
):
4830 ProcessIdle(self) -> bool
4832 Called from the MainLoop when the application becomes idle (there are
4833 no pending events) and sends a `wx.IdleEvent` to all interested
4834 parties. Returns True if more idle events are needed, False if not.
4836 return _core_
.PyApp_ProcessIdle(*args
, **kwargs
)
4838 def SendIdleEvents(*args
, **kwargs
):
4840 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4842 Send idle event to window and all subwindows. Returns True if more
4843 idle time is requested.
4845 return _core_
.PyApp_SendIdleEvents(*args
, **kwargs
)
4847 def IsActive(*args
, **kwargs
):
4849 IsActive(self) -> bool
4851 Return True if our app has focus.
4853 return _core_
.PyApp_IsActive(*args
, **kwargs
)
4855 def SetTopWindow(*args
, **kwargs
):
4857 SetTopWindow(self, Window win)
4859 Set the *main* top level window
4861 return _core_
.PyApp_SetTopWindow(*args
, **kwargs
)
4863 def GetTopWindow(*args
, **kwargs
):
4865 GetTopWindow(self) -> Window
4867 Return the *main* top level window (if it hadn't been set previously
4868 with SetTopWindow(), will return just some top level window and, if
4869 there not any, will return None)
4871 return _core_
.PyApp_GetTopWindow(*args
, **kwargs
)
4873 def SetExitOnFrameDelete(*args
, **kwargs
):
4875 SetExitOnFrameDelete(self, bool flag)
4877 Control the exit behaviour: by default, the program will exit the main
4878 loop (and so, usually, terminate) when the last top-level program
4879 window is deleted. Beware that if you disable this behaviour (with
4880 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
4881 explicitly from somewhere.
4883 return _core_
.PyApp_SetExitOnFrameDelete(*args
, **kwargs
)
4885 def GetExitOnFrameDelete(*args
, **kwargs
):
4887 GetExitOnFrameDelete(self) -> bool
4889 Get the current exit behaviour setting.
4891 return _core_
.PyApp_GetExitOnFrameDelete(*args
, **kwargs
)
4893 def SetUseBestVisual(*args
, **kwargs
):
4895 SetUseBestVisual(self, bool flag)
4897 Set whether the app should try to use the best available visual on
4898 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
4900 return _core_
.PyApp_SetUseBestVisual(*args
, **kwargs
)
4902 def GetUseBestVisual(*args
, **kwargs
):
4904 GetUseBestVisual(self) -> bool
4906 Get current UseBestVisual setting.
4908 return _core_
.PyApp_GetUseBestVisual(*args
, **kwargs
)
4910 def SetPrintMode(*args
, **kwargs
):
4911 """SetPrintMode(self, int mode)"""
4912 return _core_
.PyApp_SetPrintMode(*args
, **kwargs
)
4914 def GetPrintMode(*args
, **kwargs
):
4915 """GetPrintMode(self) -> int"""
4916 return _core_
.PyApp_GetPrintMode(*args
, **kwargs
)
4918 def SetAssertMode(*args
, **kwargs
):
4920 SetAssertMode(self, int mode)
4922 Set the OnAssert behaviour for debug and hybrid builds.
4924 return _core_
.PyApp_SetAssertMode(*args
, **kwargs
)
4926 def GetAssertMode(*args
, **kwargs
):
4928 GetAssertMode(self) -> int
4930 Get the current OnAssert behaviour setting.
4932 return _core_
.PyApp_GetAssertMode(*args
, **kwargs
)
4934 def GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4935 """GetMacSupportPCMenuShortcuts() -> bool"""
4936 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4938 GetMacSupportPCMenuShortcuts
= staticmethod(GetMacSupportPCMenuShortcuts
)
4939 def GetMacAboutMenuItemId(*args
, **kwargs
):
4940 """GetMacAboutMenuItemId() -> long"""
4941 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
4943 GetMacAboutMenuItemId
= staticmethod(GetMacAboutMenuItemId
)
4944 def GetMacPreferencesMenuItemId(*args
, **kwargs
):
4945 """GetMacPreferencesMenuItemId() -> long"""
4946 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
4948 GetMacPreferencesMenuItemId
= staticmethod(GetMacPreferencesMenuItemId
)
4949 def GetMacExitMenuItemId(*args
, **kwargs
):
4950 """GetMacExitMenuItemId() -> long"""
4951 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
4953 GetMacExitMenuItemId
= staticmethod(GetMacExitMenuItemId
)
4954 def GetMacHelpMenuTitleName(*args
, **kwargs
):
4955 """GetMacHelpMenuTitleName() -> String"""
4956 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
4958 GetMacHelpMenuTitleName
= staticmethod(GetMacHelpMenuTitleName
)
4959 def SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
4960 """SetMacSupportPCMenuShortcuts(bool val)"""
4961 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
4963 SetMacSupportPCMenuShortcuts
= staticmethod(SetMacSupportPCMenuShortcuts
)
4964 def SetMacAboutMenuItemId(*args
, **kwargs
):
4965 """SetMacAboutMenuItemId(long val)"""
4966 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
4968 SetMacAboutMenuItemId
= staticmethod(SetMacAboutMenuItemId
)
4969 def SetMacPreferencesMenuItemId(*args
, **kwargs
):
4970 """SetMacPreferencesMenuItemId(long val)"""
4971 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
4973 SetMacPreferencesMenuItemId
= staticmethod(SetMacPreferencesMenuItemId
)
4974 def SetMacExitMenuItemId(*args
, **kwargs
):
4975 """SetMacExitMenuItemId(long val)"""
4976 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
4978 SetMacExitMenuItemId
= staticmethod(SetMacExitMenuItemId
)
4979 def SetMacHelpMenuTitleName(*args
, **kwargs
):
4980 """SetMacHelpMenuTitleName(String val)"""
4981 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
4983 SetMacHelpMenuTitleName
= staticmethod(SetMacHelpMenuTitleName
)
4984 def _BootstrapApp(*args
, **kwargs
):
4988 For internal use only
4990 return _core_
.PyApp__BootstrapApp(*args
, **kwargs
)
4992 def GetComCtl32Version(*args
, **kwargs
):
4994 GetComCtl32Version() -> int
4996 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
4997 it wasn't found at all. Raises an exception on non-Windows platforms.
4999 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5001 GetComCtl32Version
= staticmethod(GetComCtl32Version
)
5003 class PyAppPtr(PyApp
):
5004 def __init__(self
, this
):
5006 if not hasattr(self
,"thisown"): self
.thisown
= 0
5007 self
.__class
__ = PyApp
5008 _core_
.PyApp_swigregister(PyAppPtr
)
5010 def PyApp_IsMainLoopRunning(*args
, **kwargs
):
5012 PyApp_IsMainLoopRunning() -> bool
5014 Returns True if we're running the main loop, i.e. if the events can
5015 currently be dispatched.
5017 return _core_
.PyApp_IsMainLoopRunning(*args
, **kwargs
)
5019 def PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5020 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5021 return _core_
.PyApp_GetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5023 def PyApp_GetMacAboutMenuItemId(*args
, **kwargs
):
5024 """PyApp_GetMacAboutMenuItemId() -> long"""
5025 return _core_
.PyApp_GetMacAboutMenuItemId(*args
, **kwargs
)
5027 def PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
):
5028 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5029 return _core_
.PyApp_GetMacPreferencesMenuItemId(*args
, **kwargs
)
5031 def PyApp_GetMacExitMenuItemId(*args
, **kwargs
):
5032 """PyApp_GetMacExitMenuItemId() -> long"""
5033 return _core_
.PyApp_GetMacExitMenuItemId(*args
, **kwargs
)
5035 def PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
):
5036 """PyApp_GetMacHelpMenuTitleName() -> String"""
5037 return _core_
.PyApp_GetMacHelpMenuTitleName(*args
, **kwargs
)
5039 def PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
):
5040 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5041 return _core_
.PyApp_SetMacSupportPCMenuShortcuts(*args
, **kwargs
)
5043 def PyApp_SetMacAboutMenuItemId(*args
, **kwargs
):
5044 """PyApp_SetMacAboutMenuItemId(long val)"""
5045 return _core_
.PyApp_SetMacAboutMenuItemId(*args
, **kwargs
)
5047 def PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
):
5048 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5049 return _core_
.PyApp_SetMacPreferencesMenuItemId(*args
, **kwargs
)
5051 def PyApp_SetMacExitMenuItemId(*args
, **kwargs
):
5052 """PyApp_SetMacExitMenuItemId(long val)"""
5053 return _core_
.PyApp_SetMacExitMenuItemId(*args
, **kwargs
)
5055 def PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
):
5056 """PyApp_SetMacHelpMenuTitleName(String val)"""
5057 return _core_
.PyApp_SetMacHelpMenuTitleName(*args
, **kwargs
)
5059 def PyApp_GetComCtl32Version(*args
, **kwargs
):
5061 PyApp_GetComCtl32Version() -> int
5063 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5064 it wasn't found at all. Raises an exception on non-Windows platforms.
5066 return _core_
.PyApp_GetComCtl32Version(*args
, **kwargs
)
5068 #---------------------------------------------------------------------------
5071 def Exit(*args
, **kwargs
):
5075 Force an exit of the application. Convenience for wx.GetApp().Exit()
5077 return _core_
.Exit(*args
, **kwargs
)
5079 def Yield(*args
, **kwargs
):
5083 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5085 return _core_
.Yield(*args
, **kwargs
)
5087 def YieldIfNeeded(*args
, **kwargs
):
5089 YieldIfNeeded() -> bool
5091 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5093 return _core_
.YieldIfNeeded(*args
, **kwargs
)
5095 def SafeYield(*args
, **kwargs
):
5097 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5099 This function is similar to `wx.Yield`, except that it disables the
5100 user input to all program windows before calling `wx.Yield` and
5101 re-enables it again afterwards. If ``win`` is not None, this window
5102 will remain enabled, allowing the implementation of some limited user
5105 :Returns: the result of the call to `wx.Yield`.
5107 return _core_
.SafeYield(*args
, **kwargs
)
5109 def WakeUpIdle(*args
, **kwargs
):
5113 Cause the message queue to become empty again, so idle events will be
5116 return _core_
.WakeUpIdle(*args
, **kwargs
)
5118 def PostEvent(*args
, **kwargs
):
5120 PostEvent(EvtHandler dest, Event event)
5122 Send an event to a window or other wx.EvtHandler to be processed
5125 return _core_
.PostEvent(*args
, **kwargs
)
5127 def App_CleanUp(*args
, **kwargs
):
5131 For internal use only, it is used to cleanup after wxWidgets when
5134 return _core_
.App_CleanUp(*args
, **kwargs
)
5136 def GetApp(*args
, **kwargs
):
5140 Return a reference to the current wx.App object.
5142 return _core_
.GetApp(*args
, **kwargs
)
5143 #----------------------------------------------------------------------
5145 class PyOnDemandOutputWindow
:
5147 A class that can be used for redirecting Python's stdout and
5148 stderr streams. It will do nothing until something is wrriten to
5149 the stream at which point it will create a Frame with a text area
5150 and write the text there.
5152 def __init__(self
, title
= "wxPython: stdout/stderr"):
5155 self
.pos
= wx
.DefaultPosition
5156 self
.size
= (450, 300)
5159 def SetParent(self
, parent
):
5160 """Set the window to be used as the popup Frame's parent."""
5161 self
.parent
= parent
5164 def CreateOutputWindow(self
, st
):
5165 self
.frame
= wx
.Frame(self
.parent
, -1, self
.title
, self
.pos
, self
.size
,
5166 style
=wx
.DEFAULT_FRAME_STYLE
)
5167 self
.text
= wx
.TextCtrl(self
.frame
, -1, "",
5168 style
=wx
.TE_MULTILINE|wx
.TE_READONLY
)
5169 self
.text
.AppendText(st
)
5170 self
.frame
.Show(True)
5171 EVT_CLOSE(self
.frame
, self
.OnCloseWindow
)
5174 def OnCloseWindow(self
, event
):
5175 if self
.frame
is not None:
5176 self
.frame
.Destroy()
5181 # These methods provide the file-like output behaviour.
5182 def write(self
, text
):
5184 Create the output window if needed and write the string to it.
5185 If not called in the context of the gui thread then uses
5186 CallAfter to do the work there.
5188 if self
.frame
is None:
5189 if not wx
.Thread_IsMain():
5190 wx
.CallAfter(self
.CreateOutputWindow
, text
)
5192 self
.CreateOutputWindow(text
)
5194 if not wx
.Thread_IsMain():
5195 wx
.CallAfter(self
.text
.AppendText
, text
)
5197 self
.text
.AppendText(text
)
5201 if self
.frame
is not None:
5202 wx
.CallAfter(self
.frame
.Close
)
5210 #----------------------------------------------------------------------
5212 _defRedirect
= (wx
.Platform
== '__WXMSW__' or wx
.Platform
== '__WXMAC__')
5214 class App(wx
.PyApp
):
5216 The ``wx.App`` class represents the application and is used to:
5218 * bootstrap the wxPython system and initialize the underlying
5220 * set and get application-wide properties
5221 * implement the windowing system main message or event loop,
5222 and to dispatch events to window instances
5225 Every application must have a ``wx.App`` instance, and all
5226 creation of UI objects should be delayed until after the
5227 ``wx.App`` object has been created in order to ensure that the gui
5228 platform and wxWidgets have been fully initialized.
5230 Normally you would derive from this class and implement an
5231 ``OnInit`` method that creates a frame and then calls
5232 ``self.SetTopWindow(frame)``.
5234 :see: `wx.PySimpleApp` for a simpler app class that can be used
5238 outputWindowClass
= PyOnDemandOutputWindow
5240 def __init__(self
, redirect
=_defRedirect
, filename
=None,
5241 useBestVisual
=False, clearSigInt
=True):
5243 Construct a ``wx.App`` object.
5245 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5246 redirected? Defaults to True on Windows and Mac, False
5247 otherwise. If `filename` is None then output will be
5248 redirected to a window that pops up as needed. (You can
5249 control what kind of window is created for the output by
5250 resetting the class variable ``outputWindowClass`` to a
5251 class of your choosing.)
5253 :param filename: The name of a file to redirect output to, if
5256 :param useBestVisual: Should the app try to use the best
5257 available visual provided by the system (only relevant on
5258 systems that have more than one visual.) This parameter
5259 must be used instead of calling `SetUseBestVisual` later
5260 on because it must be set before the underlying GUI
5261 toolkit is initialized.
5263 :param clearSigInt: Should SIGINT be cleared? This allows the
5264 app to terminate upon a Ctrl-C in the console like other
5267 :note: You should override OnInit to do applicaition
5268 initialization to ensure that the system, toolkit and
5269 wxWidgets are fully initialized.
5271 wx
.PyApp
.__init
__(self
)
5273 if wx
.Platform
== "__WXMAC__":
5276 if not MacOS
.WMAvailable():
5278 This program needs access to the screen. Please run with 'pythonw',
5279 not 'python', and only when you are logged in on the main display of
5287 # This has to be done before OnInit
5288 self
.SetUseBestVisual(useBestVisual
)
5290 # Set the default handler for SIGINT. This fixes a problem
5291 # where if Ctrl-C is pressed in the console that started this
5292 # app then it will not appear to do anything, (not even send
5293 # KeyboardInterrupt???) but will later segfault on exit. By
5294 # setting the default handler then the app will exit, as
5295 # expected (depending on platform.)
5299 signal
.signal(signal
.SIGINT
, signal
.SIG_DFL
)
5303 # Save and redirect the stdio to a window?
5304 self
.stdioWin
= None
5305 self
.saveStdio
= (_sys
.stdout
, _sys
.stderr
)
5307 self
.RedirectStdio(filename
)
5309 # This finishes the initialization of wxWindows and then calls
5310 # the OnInit that should be present in the derived class
5311 self
._BootstrapApp
()
5316 self
.RestoreStdio() # Just in case the MainLoop was overridden
5321 def SetTopWindow(self
, frame
):
5322 """Set the \"main\" top level window"""
5324 self
.stdioWin
.SetParent(frame
)
5325 wx
.PyApp
.SetTopWindow(self
, frame
)
5329 """Execute the main GUI event loop"""
5330 wx
.PyApp
.MainLoop(self
)
5334 def RedirectStdio(self
, filename
=None):
5335 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5337 _sys
.stdout
= _sys
.stderr
= open(filename
, 'a')
5339 self
.stdioWin
= self
.outputWindowClass()
5340 _sys
.stdout
= _sys
.stderr
= self
.stdioWin
5343 def RestoreStdio(self
):
5344 _sys
.stdout
, _sys
.stderr
= self
.saveStdio
5347 def SetOutputWindowAttributes(self
, title
=None, pos
=None, size
=None):
5349 Set the title, position and/or size of the output window if
5350 the stdio has been redirected. This should be called before
5351 any output would cause the output window to be created.
5354 if title
is not None:
5355 self
.stdioWin
.title
= title
5357 self
.stdioWin
.pos
= pos
5358 if size
is not None:
5359 self
.stdioWin
.size
= size
5364 # change from wx.PyApp_XX to wx.App_XX
5365 App_GetMacSupportPCMenuShortcuts
= _core_
.PyApp_GetMacSupportPCMenuShortcuts
5366 App_GetMacAboutMenuItemId
= _core_
.PyApp_GetMacAboutMenuItemId
5367 App_GetMacPreferencesMenuItemId
= _core_
.PyApp_GetMacPreferencesMenuItemId
5368 App_GetMacExitMenuItemId
= _core_
.PyApp_GetMacExitMenuItemId
5369 App_GetMacHelpMenuTitleName
= _core_
.PyApp_GetMacHelpMenuTitleName
5370 App_SetMacSupportPCMenuShortcuts
= _core_
.PyApp_SetMacSupportPCMenuShortcuts
5371 App_SetMacAboutMenuItemId
= _core_
.PyApp_SetMacAboutMenuItemId
5372 App_SetMacPreferencesMenuItemId
= _core_
.PyApp_SetMacPreferencesMenuItemId
5373 App_SetMacExitMenuItemId
= _core_
.PyApp_SetMacExitMenuItemId
5374 App_SetMacHelpMenuTitleName
= _core_
.PyApp_SetMacHelpMenuTitleName
5375 App_GetComCtl32Version
= _core_
.PyApp_GetComCtl32Version
5377 #----------------------------------------------------------------------------
5379 class PySimpleApp(wx
.App
):
5381 A simple application class. You can just create one of these and
5382 then then make your top level windows later, and not have to worry
5383 about OnInit. For example::
5385 app = wx.PySimpleApp()
5386 frame = wx.Frame(None, title='Hello World')
5393 def __init__(self
, redirect
=False, filename
=None,
5394 useBestVisual
=False, clearSigInt
=True):
5396 :see: `wx.App.__init__`
5398 wx
.App
.__init
__(self
, redirect
, filename
, useBestVisual
, clearSigInt
)
5405 # Is anybody using this one?
5406 class PyWidgetTester(wx
.App
):
5407 def __init__(self
, size
= (250, 100)):
5409 wx
.App
.__init
__(self
, 0)
5412 self
.frame
= wx
.Frame(None, -1, "Widget Tester", pos
=(0,0), size
=self
.size
)
5413 self
.SetTopWindow(self
.frame
)
5416 def SetWidget(self
, widgetClass
, *args
, **kwargs
):
5417 w
= widgetClass(self
.frame
, *args
, **kwargs
)
5418 self
.frame
.Show(True)
5420 #----------------------------------------------------------------------------
5421 # DO NOT hold any other references to this object. This is how we
5422 # know when to cleanup system resources that wxWidgets is holding. When
5423 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5424 # goes to zero and it calls the wx.App_CleanUp function.
5426 class __wxPyCleanup
:
5428 self
.cleanup
= _core_
.App_CleanUp
5432 _sys
.__wxPythonCleanup
= __wxPyCleanup()
5434 ## # another possible solution, but it gets called too early...
5436 ## atexit.register(_core_.wxApp_CleanUp)
5439 #----------------------------------------------------------------------------
5441 #---------------------------------------------------------------------------
5443 class EventLoop(object):
5445 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5446 def __init__(self
, *args
, **kwargs
):
5447 """__init__(self) -> EventLoop"""
5448 newobj
= _core_
.new_EventLoop(*args
, **kwargs
)
5449 self
.this
= newobj
.this
5452 def __del__(self
, destroy
=_core_
.delete_EventLoop
):
5455 if self
.thisown
: destroy(self
)
5458 def Run(*args
, **kwargs
):
5459 """Run(self) -> int"""
5460 return _core_
.EventLoop_Run(*args
, **kwargs
)
5462 def Exit(*args
, **kwargs
):
5463 """Exit(self, int rc=0)"""
5464 return _core_
.EventLoop_Exit(*args
, **kwargs
)
5466 def Pending(*args
, **kwargs
):
5467 """Pending(self) -> bool"""
5468 return _core_
.EventLoop_Pending(*args
, **kwargs
)
5470 def Dispatch(*args
, **kwargs
):
5471 """Dispatch(self) -> bool"""
5472 return _core_
.EventLoop_Dispatch(*args
, **kwargs
)
5474 def IsRunning(*args
, **kwargs
):
5475 """IsRunning(self) -> bool"""
5476 return _core_
.EventLoop_IsRunning(*args
, **kwargs
)
5478 def GetActive(*args
, **kwargs
):
5479 """GetActive() -> EventLoop"""
5480 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5482 GetActive
= staticmethod(GetActive
)
5483 def SetActive(*args
, **kwargs
):
5484 """SetActive(EventLoop loop)"""
5485 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5487 SetActive
= staticmethod(SetActive
)
5489 class EventLoopPtr(EventLoop
):
5490 def __init__(self
, this
):
5492 if not hasattr(self
,"thisown"): self
.thisown
= 0
5493 self
.__class
__ = EventLoop
5494 _core_
.EventLoop_swigregister(EventLoopPtr
)
5496 def EventLoop_GetActive(*args
, **kwargs
):
5497 """EventLoop_GetActive() -> EventLoop"""
5498 return _core_
.EventLoop_GetActive(*args
, **kwargs
)
5500 def EventLoop_SetActive(*args
, **kwargs
):
5501 """EventLoop_SetActive(EventLoop loop)"""
5502 return _core_
.EventLoop_SetActive(*args
, **kwargs
)
5504 #---------------------------------------------------------------------------
5506 class AcceleratorEntry(object):
5508 A class used to define items in an `wx.AcceleratorTable`. wxPython
5509 programs can choose to use wx.AcceleratorEntry objects, but using a
5510 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5511 as well. See `__init__` for of the tuple values.
5513 :see: `wx.AcceleratorTable`
5516 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5517 def __init__(self
, *args
, **kwargs
):
5519 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5521 Construct a wx.AcceleratorEntry.
5523 newobj
= _core_
.new_AcceleratorEntry(*args
, **kwargs
)
5524 self
.this
= newobj
.this
5527 def __del__(self
, destroy
=_core_
.delete_AcceleratorEntry
):
5530 if self
.thisown
: destroy(self
)
5533 def Set(*args
, **kwargs
):
5535 Set(self, int flags, int keyCode, int cmd)
5537 (Re)set the attributes of a wx.AcceleratorEntry.
5540 return _core_
.AcceleratorEntry_Set(*args
, **kwargs
)
5542 def GetFlags(*args
, **kwargs
):
5544 GetFlags(self) -> int
5546 Get the AcceleratorEntry's flags.
5548 return _core_
.AcceleratorEntry_GetFlags(*args
, **kwargs
)
5550 def GetKeyCode(*args
, **kwargs
):
5552 GetKeyCode(self) -> int
5554 Get the AcceleratorEntry's keycode.
5556 return _core_
.AcceleratorEntry_GetKeyCode(*args
, **kwargs
)
5558 def GetCommand(*args
, **kwargs
):
5560 GetCommand(self) -> int
5562 Get the AcceleratorEntry's command ID.
5564 return _core_
.AcceleratorEntry_GetCommand(*args
, **kwargs
)
5567 class AcceleratorEntryPtr(AcceleratorEntry
):
5568 def __init__(self
, this
):
5570 if not hasattr(self
,"thisown"): self
.thisown
= 0
5571 self
.__class
__ = AcceleratorEntry
5572 _core_
.AcceleratorEntry_swigregister(AcceleratorEntryPtr
)
5574 class AcceleratorTable(Object
):
5576 An accelerator table allows the application to specify a table of
5577 keyboard shortcuts for menus or other commands. On Windows, menu or
5578 button commands are supported; on GTK, only menu commands are
5582 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5583 def __init__(self
, *args
, **kwargs
):
5585 __init__(entries) -> AcceleratorTable
5587 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5588 items or or of 3-tuples (flags, keyCode, cmdID)
5590 :see: `wx.AcceleratorEntry`
5592 newobj
= _core_
.new_AcceleratorTable(*args
, **kwargs
)
5593 self
.this
= newobj
.this
5596 def __del__(self
, destroy
=_core_
.delete_AcceleratorTable
):
5599 if self
.thisown
: destroy(self
)
5602 def Ok(*args
, **kwargs
):
5603 """Ok(self) -> bool"""
5604 return _core_
.AcceleratorTable_Ok(*args
, **kwargs
)
5607 class AcceleratorTablePtr(AcceleratorTable
):
5608 def __init__(self
, this
):
5610 if not hasattr(self
,"thisown"): self
.thisown
= 0
5611 self
.__class
__ = AcceleratorTable
5612 _core_
.AcceleratorTable_swigregister(AcceleratorTablePtr
)
5615 def GetAccelFromString(*args
, **kwargs
):
5616 """GetAccelFromString(String label) -> AcceleratorEntry"""
5617 return _core_
.GetAccelFromString(*args
, **kwargs
)
5618 #---------------------------------------------------------------------------
5620 class VisualAttributes(object):
5621 """struct containing all the visual attributes of a control"""
5623 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5624 def __init__(self
, *args
, **kwargs
):
5626 __init__(self) -> VisualAttributes
5628 struct containing all the visual attributes of a control
5630 newobj
= _core_
.new_VisualAttributes(*args
, **kwargs
)
5631 self
.this
= newobj
.this
5634 def __del__(self
, destroy
=_core_
.delete_VisualAttributes
):
5637 if self
.thisown
: destroy(self
)
5640 font
= property(_core_
.VisualAttributes_font_get
, _core_
.VisualAttributes_font_set
)
5641 colFg
= property(_core_
.VisualAttributes_colFg_get
, _core_
.VisualAttributes_colFg_set
)
5642 colBg
= property(_core_
.VisualAttributes_colBg_get
, _core_
.VisualAttributes_colBg_set
)
5644 class VisualAttributesPtr(VisualAttributes
):
5645 def __init__(self
, this
):
5647 if not hasattr(self
,"thisown"): self
.thisown
= 0
5648 self
.__class
__ = VisualAttributes
5649 _core_
.VisualAttributes_swigregister(VisualAttributesPtr
)
5650 NullAcceleratorTable
= cvar
.NullAcceleratorTable
5651 PanelNameStr
= cvar
.PanelNameStr
5653 WINDOW_VARIANT_NORMAL
= _core_
.WINDOW_VARIANT_NORMAL
5654 WINDOW_VARIANT_SMALL
= _core_
.WINDOW_VARIANT_SMALL
5655 WINDOW_VARIANT_MINI
= _core_
.WINDOW_VARIANT_MINI
5656 WINDOW_VARIANT_LARGE
= _core_
.WINDOW_VARIANT_LARGE
5657 WINDOW_VARIANT_MAX
= _core_
.WINDOW_VARIANT_MAX
5658 class Window(EvtHandler
):
5660 wx.Window is the base class for all windows and represents any visible
5661 object on the screen. All controls, top level windows and so on are
5662 wx.Windows. Sizers and device contexts are not however, as they don't
5663 appear on screen themselves.
5667 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5668 def __init__(self
, *args
, **kwargs
):
5670 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5671 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5673 Construct and show a generic Window.
5675 newobj
= _core_
.new_Window(*args
, **kwargs
)
5676 self
.this
= newobj
.this
5679 self
._setOORInfo
(self
)
5681 def Create(*args
, **kwargs
):
5683 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5684 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5686 Create the GUI part of the Window for 2-phase creation mode.
5688 return _core_
.Window_Create(*args
, **kwargs
)
5690 def Close(*args
, **kwargs
):
5692 Close(self, bool force=False) -> bool
5694 This function simply generates a EVT_CLOSE event whose handler usually
5695 tries to close the window. It doesn't close the window itself,
5696 however. If force is False (the default) then the window's close
5697 handler will be allowed to veto the destruction of the window.
5699 return _core_
.Window_Close(*args
, **kwargs
)
5701 def Destroy(*args
, **kwargs
):
5703 Destroy(self) -> bool
5705 Destroys the window safely. Frames and dialogs are not destroyed
5706 immediately when this function is called -- they are added to a list
5707 of windows to be deleted on idle time, when all the window's events
5708 have been processed. This prevents problems with events being sent to
5709 non-existent windows.
5711 Returns True if the window has either been successfully deleted, or it
5712 has been added to the list of windows pending real deletion.
5714 return _core_
.Window_Destroy(*args
, **kwargs
)
5716 def DestroyChildren(*args
, **kwargs
):
5718 DestroyChildren(self) -> bool
5720 Destroys all children of a window. Called automatically by the
5723 return _core_
.Window_DestroyChildren(*args
, **kwargs
)
5725 def IsBeingDeleted(*args
, **kwargs
):
5727 IsBeingDeleted(self) -> bool
5729 Is the window in the process of being deleted?
5731 return _core_
.Window_IsBeingDeleted(*args
, **kwargs
)
5733 def SetTitle(*args
, **kwargs
):
5735 SetTitle(self, String title)
5737 Sets the window's title. Applicable only to frames and dialogs.
5739 return _core_
.Window_SetTitle(*args
, **kwargs
)
5741 def GetTitle(*args
, **kwargs
):
5743 GetTitle(self) -> String
5745 Gets the window's title. Applicable only to frames and dialogs.
5747 return _core_
.Window_GetTitle(*args
, **kwargs
)
5749 def SetLabel(*args
, **kwargs
):
5751 SetLabel(self, String label)
5753 Set the text which the window shows in its label if applicable.
5755 return _core_
.Window_SetLabel(*args
, **kwargs
)
5757 def GetLabel(*args
, **kwargs
):
5759 GetLabel(self) -> String
5761 Generic way of getting a label from any window, for identification
5762 purposes. The interpretation of this function differs from class to
5763 class. For frames and dialogs, the value returned is the title. For
5764 buttons or static text controls, it is the button text. This function
5765 can be useful for meta-programs such as testing tools or special-needs
5766 access programs)which need to identify windows by name.
5768 return _core_
.Window_GetLabel(*args
, **kwargs
)
5770 def SetName(*args
, **kwargs
):
5772 SetName(self, String name)
5774 Sets the window's name. The window name is used for ressource setting
5775 in X, it is not the same as the window title/label
5777 return _core_
.Window_SetName(*args
, **kwargs
)
5779 def GetName(*args
, **kwargs
):
5781 GetName(self) -> String
5783 Returns the windows name. This name is not guaranteed to be unique;
5784 it is up to the programmer to supply an appropriate name in the window
5785 constructor or via wx.Window.SetName.
5787 return _core_
.Window_GetName(*args
, **kwargs
)
5789 def SetWindowVariant(*args
, **kwargs
):
5791 SetWindowVariant(self, int variant)
5793 Sets the variant of the window/font size to use for this window, if
5794 the platform supports variants, for example, wxMac.
5796 return _core_
.Window_SetWindowVariant(*args
, **kwargs
)
5798 def GetWindowVariant(*args
, **kwargs
):
5799 """GetWindowVariant(self) -> int"""
5800 return _core_
.Window_GetWindowVariant(*args
, **kwargs
)
5802 def SetId(*args
, **kwargs
):
5804 SetId(self, int winid)
5806 Sets the identifier of the window. Each window has an integer
5807 identifier. If the application has not provided one, an identifier
5808 will be generated. Normally, the identifier should be provided on
5809 creation and should not be modified subsequently.
5811 return _core_
.Window_SetId(*args
, **kwargs
)
5813 def GetId(*args
, **kwargs
):
5817 Returns the identifier of the window. Each window has an integer
5818 identifier. If the application has not provided one (or the default Id
5819 -1 is used) then an unique identifier with a negative value will be
5822 return _core_
.Window_GetId(*args
, **kwargs
)
5824 def NewControlId(*args
, **kwargs
):
5826 NewControlId() -> int
5828 Generate a control id for the controls which were not given one.
5830 return _core_
.Window_NewControlId(*args
, **kwargs
)
5832 NewControlId
= staticmethod(NewControlId
)
5833 def NextControlId(*args
, **kwargs
):
5835 NextControlId(int winid) -> int
5837 Get the id of the control following the one with the given
5840 return _core_
.Window_NextControlId(*args
, **kwargs
)
5842 NextControlId
= staticmethod(NextControlId
)
5843 def PrevControlId(*args
, **kwargs
):
5845 PrevControlId(int winid) -> int
5847 Get the id of the control preceding the one with the given
5850 return _core_
.Window_PrevControlId(*args
, **kwargs
)
5852 PrevControlId
= staticmethod(PrevControlId
)
5853 def SetSize(*args
, **kwargs
):
5855 SetSize(self, Size size)
5857 Sets the size of the window in pixels.
5859 return _core_
.Window_SetSize(*args
, **kwargs
)
5861 def SetDimensions(*args
, **kwargs
):
5863 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
5865 Sets the position and size of the window in pixels. The sizeFlags
5866 parameter indicates the interpretation of the other params if they are
5867 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
5868 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
5869 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
5870 dimensions of -1 and less to be interpreted as real dimensions, not
5873 return _core_
.Window_SetDimensions(*args
, **kwargs
)
5875 def SetRect(*args
, **kwargs
):
5877 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
5879 Sets the position and size of the window in pixels using a wx.Rect.
5881 return _core_
.Window_SetRect(*args
, **kwargs
)
5883 def SetSizeWH(*args
, **kwargs
):
5885 SetSizeWH(self, int width, int height)
5887 Sets the size of the window in pixels.
5889 return _core_
.Window_SetSizeWH(*args
, **kwargs
)
5891 def Move(*args
, **kwargs
):
5893 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
5895 Moves the window to the given position.
5897 return _core_
.Window_Move(*args
, **kwargs
)
5900 def MoveXY(*args
, **kwargs
):
5902 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
5904 Moves the window to the given position.
5906 return _core_
.Window_MoveXY(*args
, **kwargs
)
5908 def SetBestFittingSize(*args
, **kwargs
):
5910 SetBestFittingSize(self, Size size=DefaultSize)
5912 A 'Smart' SetSize that will fill in default size components with the
5913 window's *best size* values. Also set's the minsize for use with sizers.
5915 return _core_
.Window_SetBestFittingSize(*args
, **kwargs
)
5917 def Raise(*args
, **kwargs
):
5921 Raises the window to the top of the window hierarchy if it is a
5922 managed window (dialog or frame).
5924 return _core_
.Window_Raise(*args
, **kwargs
)
5926 def Lower(*args
, **kwargs
):
5930 Lowers the window to the bottom of the window hierarchy if it is a
5931 managed window (dialog or frame).
5933 return _core_
.Window_Lower(*args
, **kwargs
)
5935 def SetClientSize(*args
, **kwargs
):
5937 SetClientSize(self, Size size)
5939 This sets the size of the window client area in pixels. Using this
5940 function to size a window tends to be more device-independent than
5941 wx.Window.SetSize, since the application need not worry about what
5942 dimensions the border or title bar have when trying to fit the window
5943 around panel items, for example.
5945 return _core_
.Window_SetClientSize(*args
, **kwargs
)
5947 def SetClientSizeWH(*args
, **kwargs
):
5949 SetClientSizeWH(self, int width, int height)
5951 This sets the size of the window client area in pixels. Using this
5952 function to size a window tends to be more device-independent than
5953 wx.Window.SetSize, since the application need not worry about what
5954 dimensions the border or title bar have when trying to fit the window
5955 around panel items, for example.
5957 return _core_
.Window_SetClientSizeWH(*args
, **kwargs
)
5959 def SetClientRect(*args
, **kwargs
):
5961 SetClientRect(self, Rect rect)
5963 This sets the size of the window client area in pixels. Using this
5964 function to size a window tends to be more device-independent than
5965 wx.Window.SetSize, since the application need not worry about what
5966 dimensions the border or title bar have when trying to fit the window
5967 around panel items, for example.
5969 return _core_
.Window_SetClientRect(*args
, **kwargs
)
5971 def GetPosition(*args
, **kwargs
):
5973 GetPosition(self) -> Point
5975 Get the window's position.
5977 return _core_
.Window_GetPosition(*args
, **kwargs
)
5979 def GetPositionTuple(*args
, **kwargs
):
5981 GetPositionTuple() -> (x,y)
5983 Get the window's position.
5985 return _core_
.Window_GetPositionTuple(*args
, **kwargs
)
5987 def GetSize(*args
, **kwargs
):
5989 GetSize(self) -> Size
5991 Get the window size.
5993 return _core_
.Window_GetSize(*args
, **kwargs
)
5995 def GetSizeTuple(*args
, **kwargs
):
5997 GetSizeTuple() -> (width, height)
5999 Get the window size.
6001 return _core_
.Window_GetSizeTuple(*args
, **kwargs
)
6003 def GetRect(*args
, **kwargs
):
6005 GetRect(self) -> Rect
6007 Returns the size and position of the window as a wx.Rect object.
6009 return _core_
.Window_GetRect(*args
, **kwargs
)
6011 def GetClientSize(*args
, **kwargs
):
6013 GetClientSize(self) -> Size
6015 This gets the size of the window's 'client area' in pixels. The client
6016 area is the area which may be drawn on by the programmer, excluding
6017 title bar, border, scrollbars, etc.
6019 return _core_
.Window_GetClientSize(*args
, **kwargs
)
6021 def GetClientSizeTuple(*args
, **kwargs
):
6023 GetClientSizeTuple() -> (width, height)
6025 This gets the size of the window's 'client area' in pixels. The client
6026 area is the area which may be drawn on by the programmer, excluding
6027 title bar, border, scrollbars, etc.
6029 return _core_
.Window_GetClientSizeTuple(*args
, **kwargs
)
6031 def GetClientAreaOrigin(*args
, **kwargs
):
6033 GetClientAreaOrigin(self) -> Point
6035 Get the origin of the client area of the window relative to the
6036 window's top left corner (the client area may be shifted because of
6037 the borders, scrollbars, other decorations...)
6039 return _core_
.Window_GetClientAreaOrigin(*args
, **kwargs
)
6041 def GetClientRect(*args
, **kwargs
):
6043 GetClientRect(self) -> Rect
6045 Get the client area position and size as a `wx.Rect` object.
6047 return _core_
.Window_GetClientRect(*args
, **kwargs
)
6049 def GetBestSize(*args
, **kwargs
):
6051 GetBestSize(self) -> Size
6053 This function returns the best acceptable minimal size for the
6054 window, if applicable. For example, for a static text control, it will
6055 be the minimal size such that the control label is not truncated. For
6056 windows containing subwindows (suzh aswx.Panel), the size returned by
6057 this function will be the same as the size the window would have had
6060 return _core_
.Window_GetBestSize(*args
, **kwargs
)
6062 def GetBestSizeTuple(*args
, **kwargs
):
6064 GetBestSizeTuple() -> (width, height)
6066 This function returns the best acceptable minimal size for the
6067 window, if applicable. For example, for a static text control, it will
6068 be the minimal size such that the control label is not truncated. For
6069 windows containing subwindows (suzh aswx.Panel), the size returned by
6070 this function will be the same as the size the window would have had
6073 return _core_
.Window_GetBestSizeTuple(*args
, **kwargs
)
6075 def InvalidateBestSize(*args
, **kwargs
):
6077 InvalidateBestSize(self)
6079 Reset the cached best size value so it will be recalculated the next
6082 return _core_
.Window_InvalidateBestSize(*args
, **kwargs
)
6084 def GetBestFittingSize(*args
, **kwargs
):
6086 GetBestFittingSize(self) -> Size
6088 This function will merge the window's best size into the window's
6089 minimum size, giving priority to the min size components, and returns
6093 return _core_
.Window_GetBestFittingSize(*args
, **kwargs
)
6095 def GetAdjustedBestSize(*args
, **kwargs
):
6097 GetAdjustedBestSize(self) -> Size
6099 This method is similar to GetBestSize, except in one
6100 thing. GetBestSize should return the minimum untruncated size of the
6101 window, while this method will return the largest of BestSize and any
6102 user specified minimum size. ie. it is the minimum size the window
6103 should currently be drawn at, not the minimal size it can possibly
6106 return _core_
.Window_GetAdjustedBestSize(*args
, **kwargs
)
6108 def Center(*args
, **kwargs
):
6110 Center(self, int direction=BOTH)
6112 Centers the window. The parameter specifies the direction for
6113 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6114 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6115 on the entire screen and not on its parent window. If it is a
6116 top-level window and has no parent then it will always be centered
6117 relative to the screen.
6119 return _core_
.Window_Center(*args
, **kwargs
)
6122 def CenterOnScreen(*args
, **kwargs
):
6124 CenterOnScreen(self, int dir=BOTH)
6126 Center on screen (only works for top level windows)
6128 return _core_
.Window_CenterOnScreen(*args
, **kwargs
)
6130 CentreOnScreen
= CenterOnScreen
6131 def CenterOnParent(*args
, **kwargs
):
6133 CenterOnParent(self, int dir=BOTH)
6135 Center with respect to the the parent window
6137 return _core_
.Window_CenterOnParent(*args
, **kwargs
)
6139 CentreOnParent
= CenterOnParent
6140 def Fit(*args
, **kwargs
):
6144 Sizes the window so that it fits around its subwindows. This function
6145 won't do anything if there are no subwindows and will only really work
6146 correctly if sizers are used for the subwindows layout. Also, if the
6147 window has exactly one subwindow it is better (faster and the result
6148 is more precise as Fit adds some margin to account for fuzziness of
6149 its calculations) to call window.SetClientSize(child.GetSize())
6150 instead of calling Fit.
6152 return _core_
.Window_Fit(*args
, **kwargs
)
6154 def FitInside(*args
, **kwargs
):
6158 Similar to Fit, but sizes the interior (virtual) size of a
6159 window. Mainly useful with scrolled windows to reset scrollbars after
6160 sizing changes that do not trigger a size event, and/or scrolled
6161 windows without an interior sizer. This function similarly won't do
6162 anything if there are no subwindows.
6164 return _core_
.Window_FitInside(*args
, **kwargs
)
6166 def SetSizeHints(*args
, **kwargs
):
6168 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6171 Allows specification of minimum and maximum window sizes, and window
6172 size increments. If a pair of values is not set (or set to -1), the
6173 default values will be used. If this function is called, the user
6174 will not be able to size the window outside the given bounds (if it is
6175 a top-level window.) Sizers will also inspect the minimum window size
6176 and will use that value if set when calculating layout.
6178 The resizing increments are only significant under Motif or Xt.
6180 return _core_
.Window_SetSizeHints(*args
, **kwargs
)
6182 def SetSizeHintsSz(*args
, **kwargs
):
6184 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6186 Allows specification of minimum and maximum window sizes, and window
6187 size increments. If a pair of values is not set (or set to -1), the
6188 default values will be used. If this function is called, the user
6189 will not be able to size the window outside the given bounds (if it is
6190 a top-level window.) Sizers will also inspect the minimum window size
6191 and will use that value if set when calculating layout.
6193 The resizing increments are only significant under Motif or Xt.
6195 return _core_
.Window_SetSizeHintsSz(*args
, **kwargs
)
6197 def SetVirtualSizeHints(*args
, **kwargs
):
6199 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6201 Allows specification of minimum and maximum virtual window sizes. If a
6202 pair of values is not set (or set to -1), the default values will be
6203 used. If this function is called, the user will not be able to size
6204 the virtual area of the window outside the given bounds.
6206 return _core_
.Window_SetVirtualSizeHints(*args
, **kwargs
)
6208 def SetVirtualSizeHintsSz(*args
, **kwargs
):
6210 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6212 Allows specification of minimum and maximum virtual window sizes. If a
6213 pair of values is not set (or set to -1), the default values will be
6214 used. If this function is called, the user will not be able to size
6215 the virtual area of the window outside the given bounds.
6217 return _core_
.Window_SetVirtualSizeHintsSz(*args
, **kwargs
)
6219 def GetMaxSize(*args
, **kwargs
):
6220 """GetMaxSize(self) -> Size"""
6221 return _core_
.Window_GetMaxSize(*args
, **kwargs
)
6223 def GetMinSize(*args
, **kwargs
):
6224 """GetMinSize(self) -> Size"""
6225 return _core_
.Window_GetMinSize(*args
, **kwargs
)
6227 def SetMinSize(*args
, **kwargs
):
6229 SetMinSize(self, Size minSize)
6231 A more convenient method than `SetSizeHints` for setting just the
6234 return _core_
.Window_SetMinSize(*args
, **kwargs
)
6236 def SetMaxSize(*args
, **kwargs
):
6238 SetMaxSize(self, Size maxSize)
6240 A more convenient method than `SetSizeHints` for setting just the
6243 return _core_
.Window_SetMaxSize(*args
, **kwargs
)
6245 def GetMinWidth(*args
, **kwargs
):
6246 """GetMinWidth(self) -> int"""
6247 return _core_
.Window_GetMinWidth(*args
, **kwargs
)
6249 def GetMinHeight(*args
, **kwargs
):
6250 """GetMinHeight(self) -> int"""
6251 return _core_
.Window_GetMinHeight(*args
, **kwargs
)
6253 def GetMaxWidth(*args
, **kwargs
):
6254 """GetMaxWidth(self) -> int"""
6255 return _core_
.Window_GetMaxWidth(*args
, **kwargs
)
6257 def GetMaxHeight(*args
, **kwargs
):
6258 """GetMaxHeight(self) -> int"""
6259 return _core_
.Window_GetMaxHeight(*args
, **kwargs
)
6261 def SetVirtualSize(*args
, **kwargs
):
6263 SetVirtualSize(self, Size size)
6265 Set the the virtual size of a window in pixels. For most windows this
6266 is just the client area of the window, but for some like scrolled
6267 windows it is more or less independent of the screen window size.
6269 return _core_
.Window_SetVirtualSize(*args
, **kwargs
)
6271 def SetVirtualSizeWH(*args
, **kwargs
):
6273 SetVirtualSizeWH(self, int w, int h)
6275 Set the the virtual size of a window in pixels. For most windows this
6276 is just the client area of the window, but for some like scrolled
6277 windows it is more or less independent of the screen window size.
6279 return _core_
.Window_SetVirtualSizeWH(*args
, **kwargs
)
6281 def GetVirtualSize(*args
, **kwargs
):
6283 GetVirtualSize(self) -> Size
6285 Get the the virtual size of the window in pixels. For most windows
6286 this is just the client area of the window, but for some like scrolled
6287 windows it is more or less independent of the screen window size.
6289 return _core_
.Window_GetVirtualSize(*args
, **kwargs
)
6291 def GetVirtualSizeTuple(*args
, **kwargs
):
6293 GetVirtualSizeTuple() -> (width, height)
6295 Get the the virtual size of the window in pixels. For most windows
6296 this is just the client area of the window, but for some like scrolled
6297 windows it is more or less independent of the screen window size.
6299 return _core_
.Window_GetVirtualSizeTuple(*args
, **kwargs
)
6301 def GetBestVirtualSize(*args
, **kwargs
):
6303 GetBestVirtualSize(self) -> Size
6305 Return the largest of ClientSize and BestSize (as determined by a
6306 sizer, interior children, or other means)
6308 return _core_
.Window_GetBestVirtualSize(*args
, **kwargs
)
6310 def Show(*args
, **kwargs
):
6312 Show(self, bool show=True) -> bool
6314 Shows or hides the window. You may need to call Raise for a top level
6315 window if you want to bring it to top, although this is not needed if
6316 Show is called immediately after the frame creation. Returns True if
6317 the window has been shown or hidden or False if nothing was done
6318 because it already was in the requested state.
6320 return _core_
.Window_Show(*args
, **kwargs
)
6322 def Hide(*args
, **kwargs
):
6326 Equivalent to calling Show(False).
6328 return _core_
.Window_Hide(*args
, **kwargs
)
6330 def Enable(*args
, **kwargs
):
6332 Enable(self, bool enable=True) -> bool
6334 Enable or disable the window for user input. Note that when a parent
6335 window is disabled, all of its children are disabled as well and they
6336 are reenabled again when the parent is. Returns true if the window
6337 has been enabled or disabled, false if nothing was done, i.e. if the
6338 window had already been in the specified state.
6340 return _core_
.Window_Enable(*args
, **kwargs
)
6342 def Disable(*args
, **kwargs
):
6344 Disable(self) -> bool
6346 Disables the window, same as Enable(false).
6348 return _core_
.Window_Disable(*args
, **kwargs
)
6350 def IsShown(*args
, **kwargs
):
6352 IsShown(self) -> bool
6354 Returns true if the window is shown, false if it has been hidden.
6356 return _core_
.Window_IsShown(*args
, **kwargs
)
6358 def IsEnabled(*args
, **kwargs
):
6360 IsEnabled(self) -> bool
6362 Returns true if the window is enabled for input, false otherwise.
6364 return _core_
.Window_IsEnabled(*args
, **kwargs
)
6366 def SetWindowStyleFlag(*args
, **kwargs
):
6368 SetWindowStyleFlag(self, long style)
6370 Sets the style of the window. Please note that some styles cannot be
6371 changed after the window creation and that Refresh() might need to be
6372 called after changing the others for the change to take place
6375 return _core_
.Window_SetWindowStyleFlag(*args
, **kwargs
)
6377 def GetWindowStyleFlag(*args
, **kwargs
):
6379 GetWindowStyleFlag(self) -> long
6381 Gets the window style that was passed to the constructor or Create
6384 return _core_
.Window_GetWindowStyleFlag(*args
, **kwargs
)
6386 SetWindowStyle
= SetWindowStyleFlag
; GetWindowStyle
= GetWindowStyleFlag
6387 def HasFlag(*args
, **kwargs
):
6389 HasFlag(self, int flag) -> bool
6391 Test if the given style is set for this window.
6393 return _core_
.Window_HasFlag(*args
, **kwargs
)
6395 def IsRetained(*args
, **kwargs
):
6397 IsRetained(self) -> bool
6399 Returns true if the window is retained, false otherwise. Retained
6400 windows are only available on X platforms.
6402 return _core_
.Window_IsRetained(*args
, **kwargs
)
6404 def SetExtraStyle(*args
, **kwargs
):
6406 SetExtraStyle(self, long exStyle)
6408 Sets the extra style bits for the window. Extra styles are the less
6409 often used style bits which can't be set with the constructor or with
6410 SetWindowStyleFlag()
6412 return _core_
.Window_SetExtraStyle(*args
, **kwargs
)
6414 def GetExtraStyle(*args
, **kwargs
):
6416 GetExtraStyle(self) -> long
6418 Returns the extra style bits for the window.
6420 return _core_
.Window_GetExtraStyle(*args
, **kwargs
)
6422 def MakeModal(*args
, **kwargs
):
6424 MakeModal(self, bool modal=True)
6426 Disables all other windows in the application so that the user can
6427 only interact with this window. Passing False will reverse this
6430 return _core_
.Window_MakeModal(*args
, **kwargs
)
6432 def SetThemeEnabled(*args
, **kwargs
):
6434 SetThemeEnabled(self, bool enableTheme)
6436 This function tells a window if it should use the system's "theme"
6437 code to draw the windows' background instead if its own background
6438 drawing code. This will only have an effect on platforms that support
6439 the notion of themes in user defined windows. One such platform is
6440 GTK+ where windows can have (very colourful) backgrounds defined by a
6441 user's selected theme.
6443 Dialogs, notebook pages and the status bar have this flag set to true
6444 by default so that the default look and feel is simulated best.
6446 return _core_
.Window_SetThemeEnabled(*args
, **kwargs
)
6448 def GetThemeEnabled(*args
, **kwargs
):
6450 GetThemeEnabled(self) -> bool
6452 Return the themeEnabled flag.
6454 return _core_
.Window_GetThemeEnabled(*args
, **kwargs
)
6456 def SetFocus(*args
, **kwargs
):
6460 Set's the focus to this window, allowing it to receive keyboard input.
6462 return _core_
.Window_SetFocus(*args
, **kwargs
)
6464 def SetFocusFromKbd(*args
, **kwargs
):
6466 SetFocusFromKbd(self)
6468 Set focus to this window as the result of a keyboard action. Normally
6469 only called internally.
6471 return _core_
.Window_SetFocusFromKbd(*args
, **kwargs
)
6473 def FindFocus(*args
, **kwargs
):
6475 FindFocus() -> Window
6477 Returns the window or control that currently has the keyboard focus,
6480 return _core_
.Window_FindFocus(*args
, **kwargs
)
6482 FindFocus
= staticmethod(FindFocus
)
6483 def AcceptsFocus(*args
, **kwargs
):
6485 AcceptsFocus(self) -> bool
6487 Can this window have focus?
6489 return _core_
.Window_AcceptsFocus(*args
, **kwargs
)
6491 def AcceptsFocusFromKeyboard(*args
, **kwargs
):
6493 AcceptsFocusFromKeyboard(self) -> bool
6495 Can this window be given focus by keyboard navigation? if not, the
6496 only way to give it focus (provided it accepts it at all) is to click
6499 return _core_
.Window_AcceptsFocusFromKeyboard(*args
, **kwargs
)
6501 def GetDefaultItem(*args
, **kwargs
):
6503 GetDefaultItem(self) -> Window
6505 Get the default child of this parent, i.e. the one which is activated
6506 by pressing <Enter> such as the OK button on a wx.Dialog.
6508 return _core_
.Window_GetDefaultItem(*args
, **kwargs
)
6510 def SetDefaultItem(*args
, **kwargs
):
6512 SetDefaultItem(self, Window child) -> Window
6514 Set this child as default, return the old default.
6516 return _core_
.Window_SetDefaultItem(*args
, **kwargs
)
6518 def SetTmpDefaultItem(*args
, **kwargs
):
6520 SetTmpDefaultItem(self, Window win)
6522 Set this child as temporary default
6524 return _core_
.Window_SetTmpDefaultItem(*args
, **kwargs
)
6526 def Navigate(*args
, **kwargs
):
6528 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6530 Does keyboard navigation from this window to another, by sending a
6531 `wx.NavigationKeyEvent`.
6533 return _core_
.Window_Navigate(*args
, **kwargs
)
6535 def MoveAfterInTabOrder(*args
, **kwargs
):
6537 MoveAfterInTabOrder(self, Window win)
6539 Moves this window in the tab navigation order after the specified
6540 sibling window. This means that when the user presses the TAB key on
6541 that other window, the focus switches to this window.
6543 The default tab order is the same as creation order. This function
6544 and `MoveBeforeInTabOrder` allow to change it after creating all the
6548 return _core_
.Window_MoveAfterInTabOrder(*args
, **kwargs
)
6550 def MoveBeforeInTabOrder(*args
, **kwargs
):
6552 MoveBeforeInTabOrder(self, Window win)
6554 Same as `MoveAfterInTabOrder` except that it inserts this window just
6555 before win instead of putting it right after it.
6557 return _core_
.Window_MoveBeforeInTabOrder(*args
, **kwargs
)
6559 def GetChildren(*args
, **kwargs
):
6561 GetChildren(self) -> PyObject
6563 Returns a list of the window's children. NOTE: Currently this is a
6564 copy of the child window list maintained by the window, so the return
6565 value of this function is only valid as long as the window's children
6568 return _core_
.Window_GetChildren(*args
, **kwargs
)
6570 def GetParent(*args
, **kwargs
):
6572 GetParent(self) -> Window
6574 Returns the parent window of this window, or None if there isn't one.
6576 return _core_
.Window_GetParent(*args
, **kwargs
)
6578 def GetGrandParent(*args
, **kwargs
):
6580 GetGrandParent(self) -> Window
6582 Returns the parent of the parent of this window, or None if there
6585 return _core_
.Window_GetGrandParent(*args
, **kwargs
)
6587 def IsTopLevel(*args
, **kwargs
):
6589 IsTopLevel(self) -> bool
6591 Returns true if the given window is a top-level one. Currently all
6592 frames and dialogs are always considered to be top-level windows (even
6593 if they have a parent window).
6595 return _core_
.Window_IsTopLevel(*args
, **kwargs
)
6597 def Reparent(*args
, **kwargs
):
6599 Reparent(self, Window newParent) -> bool
6601 Reparents the window, i.e the window will be removed from its current
6602 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6603 re-inserted into another. Available on Windows and GTK. Returns True
6604 if the parent was changed, False otherwise (error or newParent ==
6607 return _core_
.Window_Reparent(*args
, **kwargs
)
6609 def AddChild(*args
, **kwargs
):
6611 AddChild(self, Window child)
6613 Adds a child window. This is called automatically by window creation
6614 functions so should not be required by the application programmer.
6616 return _core_
.Window_AddChild(*args
, **kwargs
)
6618 def RemoveChild(*args
, **kwargs
):
6620 RemoveChild(self, Window child)
6622 Removes a child window. This is called automatically by window
6623 deletion functions so should not be required by the application
6626 return _core_
.Window_RemoveChild(*args
, **kwargs
)
6628 def FindWindowById(*args
, **kwargs
):
6630 FindWindowById(self, long winid) -> Window
6632 Find a chld of this window by window ID
6634 return _core_
.Window_FindWindowById(*args
, **kwargs
)
6636 def FindWindowByName(*args
, **kwargs
):
6638 FindWindowByName(self, String name) -> Window
6640 Find a child of this window by name
6642 return _core_
.Window_FindWindowByName(*args
, **kwargs
)
6644 def GetEventHandler(*args
, **kwargs
):
6646 GetEventHandler(self) -> EvtHandler
6648 Returns the event handler for this window. By default, the window is
6649 its own event handler.
6651 return _core_
.Window_GetEventHandler(*args
, **kwargs
)
6653 def SetEventHandler(*args
, **kwargs
):
6655 SetEventHandler(self, EvtHandler handler)
6657 Sets the event handler for this window. An event handler is an object
6658 that is capable of processing the events sent to a window. By default,
6659 the window is its own event handler, but an application may wish to
6660 substitute another, for example to allow central implementation of
6661 event-handling for a variety of different window classes.
6663 It is usually better to use `wx.Window.PushEventHandler` since this sets
6664 up a chain of event handlers, where an event not handled by one event
6665 handler is handed to the next one in the chain.
6667 return _core_
.Window_SetEventHandler(*args
, **kwargs
)
6669 def PushEventHandler(*args
, **kwargs
):
6671 PushEventHandler(self, EvtHandler handler)
6673 Pushes this event handler onto the event handler stack for the window.
6674 An event handler is an object that is capable of processing the events
6675 sent to a window. By default, the window is its own event handler, but
6676 an application may wish to substitute another, for example to allow
6677 central implementation of event-handling for a variety of different
6680 wx.Window.PushEventHandler allows an application to set up a chain of
6681 event handlers, where an event not handled by one event handler is
6682 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6683 remove the event handler.
6685 return _core_
.Window_PushEventHandler(*args
, **kwargs
)
6687 def PopEventHandler(*args
, **kwargs
):
6689 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6691 Removes and returns the top-most event handler on the event handler
6692 stack. If deleteHandler is True then the wx.EvtHandler object will be
6693 destroyed after it is popped.
6695 return _core_
.Window_PopEventHandler(*args
, **kwargs
)
6697 def RemoveEventHandler(*args
, **kwargs
):
6699 RemoveEventHandler(self, EvtHandler handler) -> bool
6701 Find the given handler in the event handler chain and remove (but not
6702 delete) it from the event handler chain, return True if it was found
6703 and False otherwise (this also results in an assert failure so this
6704 function should only be called when the handler is supposed to be
6707 return _core_
.Window_RemoveEventHandler(*args
, **kwargs
)
6709 def SetValidator(*args
, **kwargs
):
6711 SetValidator(self, Validator validator)
6713 Deletes the current validator (if any) and sets the window validator,
6714 having called wx.Validator.Clone to create a new validator of this
6717 return _core_
.Window_SetValidator(*args
, **kwargs
)
6719 def GetValidator(*args
, **kwargs
):
6721 GetValidator(self) -> Validator
6723 Returns a pointer to the current validator for the window, or None if
6726 return _core_
.Window_GetValidator(*args
, **kwargs
)
6728 def Validate(*args
, **kwargs
):
6730 Validate(self) -> bool
6732 Validates the current values of the child controls using their
6733 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6734 style flag set, the method will also call Validate() of all child
6735 windows. Returns false if any of the validations failed.
6737 return _core_
.Window_Validate(*args
, **kwargs
)
6739 def TransferDataToWindow(*args
, **kwargs
):
6741 TransferDataToWindow(self) -> bool
6743 Transfers values to child controls from data areas specified by their
6744 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6745 style flag set, the method will also call TransferDataToWindow() of
6748 return _core_
.Window_TransferDataToWindow(*args
, **kwargs
)
6750 def TransferDataFromWindow(*args
, **kwargs
):
6752 TransferDataFromWindow(self) -> bool
6754 Transfers values from child controls to data areas specified by their
6755 validators. Returns false if a transfer failed. If the window has
6756 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6757 also call TransferDataFromWindow() of all child windows.
6759 return _core_
.Window_TransferDataFromWindow(*args
, **kwargs
)
6761 def InitDialog(*args
, **kwargs
):
6765 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6766 to the dialog via validators.
6768 return _core_
.Window_InitDialog(*args
, **kwargs
)
6770 def SetAcceleratorTable(*args
, **kwargs
):
6772 SetAcceleratorTable(self, AcceleratorTable accel)
6774 Sets the accelerator table for this window.
6776 return _core_
.Window_SetAcceleratorTable(*args
, **kwargs
)
6778 def GetAcceleratorTable(*args
, **kwargs
):
6780 GetAcceleratorTable(self) -> AcceleratorTable
6782 Gets the accelerator table for this window.
6784 return _core_
.Window_GetAcceleratorTable(*args
, **kwargs
)
6786 def RegisterHotKey(*args
, **kwargs
):
6788 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6790 Registers a system wide hotkey. Every time the user presses the hotkey
6791 registered here, this window will receive a hotkey event. It will
6792 receive the event even if the application is in the background and
6793 does not have the input focus because the user is working with some
6794 other application. To bind an event handler function to this hotkey
6795 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6796 hotkey was registered successfully.
6798 return _core_
.Window_RegisterHotKey(*args
, **kwargs
)
6800 def UnregisterHotKey(*args
, **kwargs
):
6802 UnregisterHotKey(self, int hotkeyId) -> bool
6804 Unregisters a system wide hotkey.
6806 return _core_
.Window_UnregisterHotKey(*args
, **kwargs
)
6808 def ConvertDialogPointToPixels(*args
, **kwargs
):
6810 ConvertDialogPointToPixels(self, Point pt) -> Point
6812 Converts a point or size from dialog units to pixels. Dialog units
6813 are used for maintaining a dialog's proportions even if the font
6814 changes. For the x dimension, the dialog units are multiplied by the
6815 average character width and then divided by 4. For the y dimension,
6816 the dialog units are multiplied by the average character height and
6819 return _core_
.Window_ConvertDialogPointToPixels(*args
, **kwargs
)
6821 def ConvertDialogSizeToPixels(*args
, **kwargs
):
6823 ConvertDialogSizeToPixels(self, Size sz) -> Size
6825 Converts a point or size from dialog units to pixels. Dialog units
6826 are used for maintaining a dialog's proportions even if the font
6827 changes. For the x dimension, the dialog units are multiplied by the
6828 average character width and then divided by 4. For the y dimension,
6829 the dialog units are multiplied by the average character height and
6832 return _core_
.Window_ConvertDialogSizeToPixels(*args
, **kwargs
)
6834 def DLG_PNT(*args
, **kwargs
):
6836 DLG_PNT(self, Point pt) -> Point
6838 Converts a point or size from dialog units to pixels. Dialog units
6839 are used for maintaining a dialog's proportions even if the font
6840 changes. For the x dimension, the dialog units are multiplied by the
6841 average character width and then divided by 4. For the y dimension,
6842 the dialog units are multiplied by the average character height and
6845 return _core_
.Window_DLG_PNT(*args
, **kwargs
)
6847 def DLG_SZE(*args
, **kwargs
):
6849 DLG_SZE(self, Size sz) -> Size
6851 Converts a point or size from dialog units to pixels. Dialog units
6852 are used for maintaining a dialog's proportions even if the font
6853 changes. For the x dimension, the dialog units are multiplied by the
6854 average character width and then divided by 4. For the y dimension,
6855 the dialog units are multiplied by the average character height and
6858 return _core_
.Window_DLG_SZE(*args
, **kwargs
)
6860 def ConvertPixelPointToDialog(*args
, **kwargs
):
6861 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
6862 return _core_
.Window_ConvertPixelPointToDialog(*args
, **kwargs
)
6864 def ConvertPixelSizeToDialog(*args
, **kwargs
):
6865 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
6866 return _core_
.Window_ConvertPixelSizeToDialog(*args
, **kwargs
)
6868 def WarpPointer(*args
, **kwargs
):
6870 WarpPointer(self, int x, int y)
6872 Moves the pointer to the given position on the window.
6874 NOTE: This function is not supported under Mac because Apple Human
6875 Interface Guidelines forbid moving the mouse cursor programmatically.
6877 return _core_
.Window_WarpPointer(*args
, **kwargs
)
6879 def CaptureMouse(*args
, **kwargs
):
6883 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
6884 release the capture.
6886 Note that wxWindows maintains the stack of windows having captured the
6887 mouse and when the mouse is released the capture returns to the window
6888 which had had captured it previously and it is only really released if
6889 there were no previous window. In particular, this means that you must
6890 release the mouse as many times as you capture it.
6892 return _core_
.Window_CaptureMouse(*args
, **kwargs
)
6894 def ReleaseMouse(*args
, **kwargs
):
6898 Releases mouse input captured with wx.Window.CaptureMouse.
6900 return _core_
.Window_ReleaseMouse(*args
, **kwargs
)
6902 def GetCapture(*args
, **kwargs
):
6904 GetCapture() -> Window
6906 Returns the window which currently captures the mouse or None
6908 return _core_
.Window_GetCapture(*args
, **kwargs
)
6910 GetCapture
= staticmethod(GetCapture
)
6911 def HasCapture(*args
, **kwargs
):
6913 HasCapture(self) -> bool
6915 Returns true if this window has the current mouse capture.
6917 return _core_
.Window_HasCapture(*args
, **kwargs
)
6919 def Refresh(*args
, **kwargs
):
6921 Refresh(self, bool eraseBackground=True, Rect rect=None)
6923 Mark the specified rectangle (or the whole window) as "dirty" so it
6924 will be repainted. Causes an EVT_PAINT event to be generated and sent
6927 return _core_
.Window_Refresh(*args
, **kwargs
)
6929 def RefreshRect(*args
, **kwargs
):
6931 RefreshRect(self, Rect rect)
6933 Redraws the contents of the given rectangle: the area inside it will
6934 be repainted. This is the same as Refresh but has a nicer syntax.
6936 return _core_
.Window_RefreshRect(*args
, **kwargs
)
6938 def Update(*args
, **kwargs
):
6942 Calling this method immediately repaints the invalidated area of the
6943 window instead of waiting for the EVT_PAINT event to happen, (normally
6944 this would usually only happen when the flow of control returns to the
6945 event loop.) Notice that this function doesn't refresh the window and
6946 does nothing if the window has been already repainted. Use Refresh
6947 first if you want to immediately redraw the window (or some portion of
6948 it) unconditionally.
6950 return _core_
.Window_Update(*args
, **kwargs
)
6952 def ClearBackground(*args
, **kwargs
):
6954 ClearBackground(self)
6956 Clears the window by filling it with the current background
6957 colour. Does not cause an erase background event to be generated.
6959 return _core_
.Window_ClearBackground(*args
, **kwargs
)
6961 def Freeze(*args
, **kwargs
):
6965 Freezes the window or, in other words, prevents any updates from
6966 taking place on screen, the window is not redrawn at all. Thaw must be
6967 called to reenable window redrawing. Calls to Freeze/Thaw may be
6968 nested, with the actual Thaw being delayed until all the nesting has
6971 This method is useful for visual appearance optimization (for example,
6972 it is a good idea to use it before inserting large amount of text into
6973 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
6974 for all controls so it is mostly just a hint to wxWindows and not a
6975 mandatory directive.
6977 return _core_
.Window_Freeze(*args
, **kwargs
)
6979 def Thaw(*args
, **kwargs
):
6983 Reenables window updating after a previous call to Freeze. Calls to
6984 Freeze/Thaw may be nested, so Thaw must be called the same number of
6985 times that Freeze was before the window will be updated.
6987 return _core_
.Window_Thaw(*args
, **kwargs
)
6989 def PrepareDC(*args
, **kwargs
):
6991 PrepareDC(self, DC dc)
6993 Call this function to prepare the device context for drawing a
6994 scrolled image. It sets the device origin according to the current
6997 return _core_
.Window_PrepareDC(*args
, **kwargs
)
6999 def GetUpdateRegion(*args
, **kwargs
):
7001 GetUpdateRegion(self) -> Region
7003 Returns the region specifying which parts of the window have been
7004 damaged. Should only be called within an EVT_PAINT handler.
7006 return _core_
.Window_GetUpdateRegion(*args
, **kwargs
)
7008 def GetUpdateClientRect(*args
, **kwargs
):
7010 GetUpdateClientRect(self) -> Rect
7012 Get the update rectangle region bounding box in client coords.
7014 return _core_
.Window_GetUpdateClientRect(*args
, **kwargs
)
7016 def IsExposed(*args
, **kwargs
):
7018 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7020 Returns true if the given point or rectangle area has been exposed
7021 since the last repaint. Call this in an paint event handler to
7022 optimize redrawing by only redrawing those areas, which have been
7025 return _core_
.Window_IsExposed(*args
, **kwargs
)
7027 def IsExposedPoint(*args
, **kwargs
):
7029 IsExposedPoint(self, Point pt) -> bool
7031 Returns true if the given point or rectangle area has been exposed
7032 since the last repaint. Call this in an paint event handler to
7033 optimize redrawing by only redrawing those areas, which have been
7036 return _core_
.Window_IsExposedPoint(*args
, **kwargs
)
7038 def IsExposedRect(*args
, **kwargs
):
7040 IsExposedRect(self, Rect rect) -> bool
7042 Returns true if the given point or rectangle area has been exposed
7043 since the last repaint. Call this in an paint event handler to
7044 optimize redrawing by only redrawing those areas, which have been
7047 return _core_
.Window_IsExposedRect(*args
, **kwargs
)
7049 def GetDefaultAttributes(*args
, **kwargs
):
7051 GetDefaultAttributes(self) -> VisualAttributes
7053 Get the default attributes for an instance of this class. This is
7054 useful if you want to use the same font or colour in your own control
7055 as in a standard control -- which is a much better idea than hard
7056 coding specific colours or fonts which might look completely out of
7057 place on the user's system, especially if it uses themes.
7059 return _core_
.Window_GetDefaultAttributes(*args
, **kwargs
)
7061 def GetClassDefaultAttributes(*args
, **kwargs
):
7063 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7065 Get the default attributes for this class. This is useful if you want
7066 to use the same font or colour in your own control as in a standard
7067 control -- which is a much better idea than hard coding specific
7068 colours or fonts which might look completely out of place on the
7069 user's system, especially if it uses themes.
7071 The variant parameter is only relevant under Mac currently and is
7072 ignore under other platforms. Under Mac, it will change the size of
7073 the returned font. See `wx.Window.SetWindowVariant` for more about
7076 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7078 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
7079 def SetBackgroundColour(*args
, **kwargs
):
7081 SetBackgroundColour(self, Colour colour) -> bool
7083 Sets the background colour of the window. Returns True if the colour
7084 was changed. The background colour is usually painted by the default
7085 EVT_ERASE_BACKGROUND event handler function under Windows and
7086 automatically under GTK. Using `wx.NullColour` will reset the window
7087 to the default background colour.
7089 Note that setting the background colour may not cause an immediate
7090 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7091 calling this function.
7093 Using this function will disable attempts to use themes for this
7094 window, if the system supports them. Use with care since usually the
7095 themes represent the appearance chosen by the user to be used for all
7096 applications on the system.
7098 return _core_
.Window_SetBackgroundColour(*args
, **kwargs
)
7100 def SetOwnBackgroundColour(*args
, **kwargs
):
7101 """SetOwnBackgroundColour(self, Colour colour)"""
7102 return _core_
.Window_SetOwnBackgroundColour(*args
, **kwargs
)
7104 def SetForegroundColour(*args
, **kwargs
):
7106 SetForegroundColour(self, Colour colour) -> bool
7108 Sets the foreground colour of the window. Returns True is the colour
7109 was changed. The interpretation of foreground colour is dependent on
7110 the window class; it may be the text colour or other colour, or it may
7113 return _core_
.Window_SetForegroundColour(*args
, **kwargs
)
7115 def SetOwnForegroundColour(*args
, **kwargs
):
7116 """SetOwnForegroundColour(self, Colour colour)"""
7117 return _core_
.Window_SetOwnForegroundColour(*args
, **kwargs
)
7119 def GetBackgroundColour(*args
, **kwargs
):
7121 GetBackgroundColour(self) -> Colour
7123 Returns the background colour of the window.
7125 return _core_
.Window_GetBackgroundColour(*args
, **kwargs
)
7127 def GetForegroundColour(*args
, **kwargs
):
7129 GetForegroundColour(self) -> Colour
7131 Returns the foreground colour of the window. The interpretation of
7132 foreground colour is dependent on the window class; it may be the text
7133 colour or other colour, or it may not be used at all.
7135 return _core_
.Window_GetForegroundColour(*args
, **kwargs
)
7137 def SetBackgroundStyle(*args
, **kwargs
):
7139 SetBackgroundStyle(self, int style) -> bool
7141 Returns the background style of the window. The background style
7142 indicates how the background of the window is drawn.
7144 ====================== ========================================
7145 wx.BG_STYLE_SYSTEM The background colour or pattern should
7146 be determined by the system
7147 wx.BG_STYLE_COLOUR The background should be a solid colour
7148 wx.BG_STYLE_CUSTOM The background will be implemented by the
7150 ====================== ========================================
7152 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7153 a custom background, such as a tiled bitmap. Currently the style has
7154 no effect on other platforms.
7156 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7158 return _core_
.Window_SetBackgroundStyle(*args
, **kwargs
)
7160 def GetBackgroundStyle(*args
, **kwargs
):
7162 GetBackgroundStyle(self) -> int
7164 Returns the background style of the window.
7166 :see: `SetBackgroundStyle`
7168 return _core_
.Window_GetBackgroundStyle(*args
, **kwargs
)
7170 def SetCursor(*args
, **kwargs
):
7172 SetCursor(self, Cursor cursor) -> bool
7174 Sets the window's cursor. Notice that the window cursor also sets it
7175 for the children of the window implicitly.
7177 The cursor may be wx.NullCursor in which case the window cursor will
7178 be reset back to default.
7180 return _core_
.Window_SetCursor(*args
, **kwargs
)
7182 def GetCursor(*args
, **kwargs
):
7184 GetCursor(self) -> Cursor
7186 Return the cursor associated with this window.
7188 return _core_
.Window_GetCursor(*args
, **kwargs
)
7190 def SetFont(*args
, **kwargs
):
7192 SetFont(self, Font font) -> bool
7194 Sets the font for this window.
7196 return _core_
.Window_SetFont(*args
, **kwargs
)
7198 def SetOwnFont(*args
, **kwargs
):
7199 """SetOwnFont(self, Font font)"""
7200 return _core_
.Window_SetOwnFont(*args
, **kwargs
)
7202 def GetFont(*args
, **kwargs
):
7204 GetFont(self) -> Font
7206 Returns the default font used for this window.
7208 return _core_
.Window_GetFont(*args
, **kwargs
)
7210 def SetCaret(*args
, **kwargs
):
7212 SetCaret(self, Caret caret)
7214 Sets the caret associated with the window.
7216 return _core_
.Window_SetCaret(*args
, **kwargs
)
7218 def GetCaret(*args
, **kwargs
):
7220 GetCaret(self) -> Caret
7222 Returns the caret associated with the window.
7224 return _core_
.Window_GetCaret(*args
, **kwargs
)
7226 def GetCharHeight(*args
, **kwargs
):
7228 GetCharHeight(self) -> int
7230 Get the (average) character size for the current font.
7232 return _core_
.Window_GetCharHeight(*args
, **kwargs
)
7234 def GetCharWidth(*args
, **kwargs
):
7236 GetCharWidth(self) -> int
7238 Get the (average) character size for the current font.
7240 return _core_
.Window_GetCharWidth(*args
, **kwargs
)
7242 def GetTextExtent(*args
, **kwargs
):
7244 GetTextExtent(String string) -> (width, height)
7246 Get the width and height of the text using the current font.
7248 return _core_
.Window_GetTextExtent(*args
, **kwargs
)
7250 def GetFullTextExtent(*args
, **kwargs
):
7252 GetFullTextExtent(String string, Font font=None) ->
7253 (width, height, descent, externalLeading)
7255 Get the width, height, decent and leading of the text using the
7256 current or specified font.
7258 return _core_
.Window_GetFullTextExtent(*args
, **kwargs
)
7260 def ClientToScreenXY(*args
, **kwargs
):
7262 ClientToScreenXY(int x, int y) -> (x,y)
7264 Converts to screen coordinates from coordinates relative to this window.
7266 return _core_
.Window_ClientToScreenXY(*args
, **kwargs
)
7268 def ScreenToClientXY(*args
, **kwargs
):
7270 ScreenToClientXY(int x, int y) -> (x,y)
7272 Converts from screen to client window coordinates.
7274 return _core_
.Window_ScreenToClientXY(*args
, **kwargs
)
7276 def ClientToScreen(*args
, **kwargs
):
7278 ClientToScreen(self, Point pt) -> Point
7280 Converts to screen coordinates from coordinates relative to this window.
7282 return _core_
.Window_ClientToScreen(*args
, **kwargs
)
7284 def ScreenToClient(*args
, **kwargs
):
7286 ScreenToClient(self, Point pt) -> Point
7288 Converts from screen to client window coordinates.
7290 return _core_
.Window_ScreenToClient(*args
, **kwargs
)
7292 def HitTestXY(*args
, **kwargs
):
7294 HitTestXY(self, int x, int y) -> int
7296 Test where the given (in client coords) point lies
7298 return _core_
.Window_HitTestXY(*args
, **kwargs
)
7300 def HitTest(*args
, **kwargs
):
7302 HitTest(self, Point pt) -> int
7304 Test where the given (in client coords) point lies
7306 return _core_
.Window_HitTest(*args
, **kwargs
)
7308 def GetBorder(*args
):
7310 GetBorder(self, long flags) -> int
7311 GetBorder(self) -> int
7313 Get border for the flags of this window
7315 return _core_
.Window_GetBorder(*args
)
7317 def UpdateWindowUI(*args
, **kwargs
):
7319 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7321 This function sends EVT_UPDATE_UI events to the window. The particular
7322 implementation depends on the window; for example a wx.ToolBar will
7323 send an update UI event for each toolbar button, and a wx.Frame will
7324 send an update UI event for each menubar menu item. You can call this
7325 function from your application to ensure that your UI is up-to-date at
7326 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7327 concerned). This may be necessary if you have called
7328 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7329 limit the overhead that wxWindows incurs by sending update UI events
7332 return _core_
.Window_UpdateWindowUI(*args
, **kwargs
)
7334 def PopupMenuXY(*args
, **kwargs
):
7336 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7338 Pops up the given menu at the specified coordinates, relative to this window,
7339 and returns control when the user has dismissed the menu. If a menu item is
7340 selected, the corresponding menu event is generated and will be processed as
7341 usual. If the default position is given then the current position of the
7342 mouse cursor will be used.
7344 return _core_
.Window_PopupMenuXY(*args
, **kwargs
)
7346 def PopupMenu(*args
, **kwargs
):
7348 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7350 Pops up the given menu at the specified coordinates, relative to this window,
7351 and returns control when the user has dismissed the menu. If a menu item is
7352 selected, the corresponding menu event is generated and will be processed as
7353 usual. If the default position is given then the current position of the
7354 mouse cursor will be used.
7356 return _core_
.Window_PopupMenu(*args
, **kwargs
)
7358 def GetHandle(*args
, **kwargs
):
7360 GetHandle(self) -> long
7362 Returns the platform-specific handle (as a long integer) of the
7363 physical window. Currently on wxMac it returns the handle of the
7364 toplevel parent of the window.
7366 return _core_
.Window_GetHandle(*args
, **kwargs
)
7368 def AssociateHandle(*args
, **kwargs
):
7370 AssociateHandle(self, long handle)
7372 Associate the window with a new native handle
7374 return _core_
.Window_AssociateHandle(*args
, **kwargs
)
7376 def DissociateHandle(*args
, **kwargs
):
7378 DissociateHandle(self)
7380 Dissociate the current native handle from the window
7382 return _core_
.Window_DissociateHandle(*args
, **kwargs
)
7384 def HasScrollbar(*args
, **kwargs
):
7386 HasScrollbar(self, int orient) -> bool
7388 Does the window have the scrollbar for this orientation?
7390 return _core_
.Window_HasScrollbar(*args
, **kwargs
)
7392 def SetScrollbar(*args
, **kwargs
):
7394 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7397 Sets the scrollbar properties of a built-in scrollbar.
7399 return _core_
.Window_SetScrollbar(*args
, **kwargs
)
7401 def SetScrollPos(*args
, **kwargs
):
7403 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7405 Sets the position of one of the built-in scrollbars.
7407 return _core_
.Window_SetScrollPos(*args
, **kwargs
)
7409 def GetScrollPos(*args
, **kwargs
):
7411 GetScrollPos(self, int orientation) -> int
7413 Returns the built-in scrollbar position.
7415 return _core_
.Window_GetScrollPos(*args
, **kwargs
)
7417 def GetScrollThumb(*args
, **kwargs
):
7419 GetScrollThumb(self, int orientation) -> int
7421 Returns the built-in scrollbar thumb size.
7423 return _core_
.Window_GetScrollThumb(*args
, **kwargs
)
7425 def GetScrollRange(*args
, **kwargs
):
7427 GetScrollRange(self, int orientation) -> int
7429 Returns the built-in scrollbar range.
7431 return _core_
.Window_GetScrollRange(*args
, **kwargs
)
7433 def ScrollWindow(*args
, **kwargs
):
7435 ScrollWindow(self, int dx, int dy, Rect rect=None)
7437 Physically scrolls the pixels in the window and move child windows
7438 accordingly. Use this function to optimise your scrolling
7439 implementations, to minimise the area that must be redrawn. Note that
7440 it is rarely required to call this function from a user program.
7442 return _core_
.Window_ScrollWindow(*args
, **kwargs
)
7444 def ScrollLines(*args
, **kwargs
):
7446 ScrollLines(self, int lines) -> bool
7448 If the platform and window class supports it, scrolls the window by
7449 the given number of lines down, if lines is positive, or up if lines
7450 is negative. Returns True if the window was scrolled, False if it was
7451 already on top/bottom and nothing was done.
7453 return _core_
.Window_ScrollLines(*args
, **kwargs
)
7455 def ScrollPages(*args
, **kwargs
):
7457 ScrollPages(self, int pages) -> bool
7459 If the platform and window class supports it, scrolls the window by
7460 the given number of pages down, if pages is positive, or up if pages
7461 is negative. Returns True if the window was scrolled, False if it was
7462 already on top/bottom and nothing was done.
7464 return _core_
.Window_ScrollPages(*args
, **kwargs
)
7466 def LineUp(*args
, **kwargs
):
7468 LineUp(self) -> bool
7470 This is just a wrapper for ScrollLines(-1).
7472 return _core_
.Window_LineUp(*args
, **kwargs
)
7474 def LineDown(*args
, **kwargs
):
7476 LineDown(self) -> bool
7478 This is just a wrapper for ScrollLines(1).
7480 return _core_
.Window_LineDown(*args
, **kwargs
)
7482 def PageUp(*args
, **kwargs
):
7484 PageUp(self) -> bool
7486 This is just a wrapper for ScrollPages(-1).
7488 return _core_
.Window_PageUp(*args
, **kwargs
)
7490 def PageDown(*args
, **kwargs
):
7492 PageDown(self) -> bool
7494 This is just a wrapper for ScrollPages(1).
7496 return _core_
.Window_PageDown(*args
, **kwargs
)
7498 def SetHelpText(*args
, **kwargs
):
7500 SetHelpText(self, String text)
7502 Sets the help text to be used as context-sensitive help for this
7503 window. Note that the text is actually stored by the current
7504 wxHelpProvider implementation, and not in the window object itself.
7506 return _core_
.Window_SetHelpText(*args
, **kwargs
)
7508 def SetHelpTextForId(*args
, **kwargs
):
7510 SetHelpTextForId(self, String text)
7512 Associate this help text with all windows with the same id as this
7515 return _core_
.Window_SetHelpTextForId(*args
, **kwargs
)
7517 def GetHelpText(*args
, **kwargs
):
7519 GetHelpText(self) -> String
7521 Gets the help text to be used as context-sensitive help for this
7522 window. Note that the text is actually stored by the current
7523 wxHelpProvider implementation, and not in the window object itself.
7525 return _core_
.Window_GetHelpText(*args
, **kwargs
)
7527 def SetToolTipString(*args
, **kwargs
):
7529 SetToolTipString(self, String tip)
7531 Attach a tooltip to the window.
7533 return _core_
.Window_SetToolTipString(*args
, **kwargs
)
7535 def SetToolTip(*args
, **kwargs
):
7537 SetToolTip(self, ToolTip tip)
7539 Attach a tooltip to the window.
7541 return _core_
.Window_SetToolTip(*args
, **kwargs
)
7543 def GetToolTip(*args
, **kwargs
):
7545 GetToolTip(self) -> ToolTip
7547 get the associated tooltip or None if none
7549 return _core_
.Window_GetToolTip(*args
, **kwargs
)
7551 def SetDropTarget(*args
, **kwargs
):
7553 SetDropTarget(self, DropTarget dropTarget)
7555 Associates a drop target with this window. If the window already has
7556 a drop target, it is deleted.
7558 return _core_
.Window_SetDropTarget(*args
, **kwargs
)
7560 def GetDropTarget(*args
, **kwargs
):
7562 GetDropTarget(self) -> DropTarget
7564 Returns the associated drop target, which may be None.
7566 return _core_
.Window_GetDropTarget(*args
, **kwargs
)
7568 def SetConstraints(*args
, **kwargs
):
7570 SetConstraints(self, LayoutConstraints constraints)
7572 Sets the window to have the given layout constraints. If an existing
7573 layout constraints object is already owned by the window, it will be
7574 deleted. Pass None to disassociate and delete the window's current
7577 You must call SetAutoLayout to tell a window to use the constraints
7578 automatically in its default EVT_SIZE handler; otherwise, you must
7579 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7580 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7583 return _core_
.Window_SetConstraints(*args
, **kwargs
)
7585 def GetConstraints(*args
, **kwargs
):
7587 GetConstraints(self) -> LayoutConstraints
7589 Returns a pointer to the window's layout constraints, or None if there
7592 return _core_
.Window_GetConstraints(*args
, **kwargs
)
7594 def SetAutoLayout(*args
, **kwargs
):
7596 SetAutoLayout(self, bool autoLayout)
7598 Determines whether the Layout function will be called automatically
7599 when the window is resized. It is called implicitly by SetSizer but
7600 if you use SetConstraints you should call it manually or otherwise the
7601 window layout won't be correctly updated when its size changes.
7603 return _core_
.Window_SetAutoLayout(*args
, **kwargs
)
7605 def GetAutoLayout(*args
, **kwargs
):
7607 GetAutoLayout(self) -> bool
7609 Returns the current autoLayout setting
7611 return _core_
.Window_GetAutoLayout(*args
, **kwargs
)
7613 def Layout(*args
, **kwargs
):
7615 Layout(self) -> bool
7617 Invokes the constraint-based layout algorithm or the sizer-based
7618 algorithm for this window. See SetAutoLayout: when auto layout is on,
7619 this function gets called automatically by the default EVT_SIZE
7620 handler when the window is resized.
7622 return _core_
.Window_Layout(*args
, **kwargs
)
7624 def SetSizer(*args
, **kwargs
):
7626 SetSizer(self, Sizer sizer, bool deleteOld=True)
7628 Sets the window to have the given layout sizer. The window will then
7629 own the object, and will take care of its deletion. If an existing
7630 layout sizer object is already owned by the window, it will be deleted
7631 if the deleteOld parameter is true. Note that this function will also
7632 call SetAutoLayout implicitly with a True parameter if the sizer is
7633 non-None, and False otherwise.
7635 return _core_
.Window_SetSizer(*args
, **kwargs
)
7637 def SetSizerAndFit(*args
, **kwargs
):
7639 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7641 The same as SetSizer, except it also sets the size hints for the
7642 window based on the sizer's minimum size.
7644 return _core_
.Window_SetSizerAndFit(*args
, **kwargs
)
7646 def GetSizer(*args
, **kwargs
):
7648 GetSizer(self) -> Sizer
7650 Return the sizer associated with the window by a previous call to
7651 SetSizer or None if there isn't one.
7653 return _core_
.Window_GetSizer(*args
, **kwargs
)
7655 def SetContainingSizer(*args
, **kwargs
):
7657 SetContainingSizer(self, Sizer sizer)
7659 This normally does not need to be called by application code. It is
7660 called internally when a window is added to a sizer, and is used so
7661 the window can remove itself from the sizer when it is destroyed.
7663 return _core_
.Window_SetContainingSizer(*args
, **kwargs
)
7665 def GetContainingSizer(*args
, **kwargs
):
7667 GetContainingSizer(self) -> Sizer
7669 Return the sizer that this window is a member of, if any, otherwise None.
7671 return _core_
.Window_GetContainingSizer(*args
, **kwargs
)
7673 def InheritAttributes(*args
, **kwargs
):
7675 InheritAttributes(self)
7677 This function is (or should be, in case of custom controls) called
7678 during window creation to intelligently set up the window visual
7679 attributes, that is the font and the foreground and background
7682 By 'intelligently' the following is meant: by default, all windows use
7683 their own default attributes. However if some of the parent's
7684 attributes are explicitly changed (that is, using SetFont and not
7685 SetOwnFont) and if the corresponding attribute hadn't been
7686 explicitly set for this window itself, then this window takes the same
7687 value as used by the parent. In addition, if the window overrides
7688 ShouldInheritColours to return false, the colours will not be changed
7689 no matter what and only the font might.
7691 This rather complicated logic is necessary in order to accommodate the
7692 different usage scenarios. The most common one is when all default
7693 attributes are used and in this case, nothing should be inherited as
7694 in modern GUIs different controls use different fonts (and colours)
7695 than their siblings so they can't inherit the same value from the
7696 parent. However it was also deemed desirable to allow to simply change
7697 the attributes of all children at once by just changing the font or
7698 colour of their common parent, hence in this case we do inherit the
7702 return _core_
.Window_InheritAttributes(*args
, **kwargs
)
7704 def ShouldInheritColours(*args
, **kwargs
):
7706 ShouldInheritColours(self) -> bool
7708 Return true from here to allow the colours of this window to be
7709 changed by InheritAttributes, returning false forbids inheriting them
7710 from the parent window.
7712 The base class version returns false, but this method is overridden in
7713 wxControl where it returns true.
7715 return _core_
.Window_ShouldInheritColours(*args
, **kwargs
)
7717 def PostCreate(self
, pre
):
7719 Phase 3 of the 2-phase create <wink!>
7720 Call this method after precreating the window with the 2-phase create method.
7722 self
.this
= pre
.this
7723 self
.thisown
= pre
.thisown
7725 if hasattr(self
, '_setOORInfo'):
7726 self
._setOORInfo
(self
)
7727 if hasattr(self
, '_setCallbackInfo'):
7728 self
._setCallbackInfo
(self
, self
.__class
__)
7731 class WindowPtr(Window
):
7732 def __init__(self
, this
):
7734 if not hasattr(self
,"thisown"): self
.thisown
= 0
7735 self
.__class
__ = Window
7736 _core_
.Window_swigregister(WindowPtr
)
7738 def PreWindow(*args
, **kwargs
):
7740 PreWindow() -> Window
7742 Precreate a Window for 2-phase creation.
7744 val
= _core_
.new_PreWindow(*args
, **kwargs
)
7748 def Window_NewControlId(*args
, **kwargs
):
7750 Window_NewControlId() -> int
7752 Generate a control id for the controls which were not given one.
7754 return _core_
.Window_NewControlId(*args
, **kwargs
)
7756 def Window_NextControlId(*args
, **kwargs
):
7758 Window_NextControlId(int winid) -> int
7760 Get the id of the control following the one with the given
7763 return _core_
.Window_NextControlId(*args
, **kwargs
)
7765 def Window_PrevControlId(*args
, **kwargs
):
7767 Window_PrevControlId(int winid) -> int
7769 Get the id of the control preceding the one with the given
7772 return _core_
.Window_PrevControlId(*args
, **kwargs
)
7774 def Window_FindFocus(*args
, **kwargs
):
7776 Window_FindFocus() -> Window
7778 Returns the window or control that currently has the keyboard focus,
7781 return _core_
.Window_FindFocus(*args
, **kwargs
)
7783 def Window_GetCapture(*args
, **kwargs
):
7785 Window_GetCapture() -> Window
7787 Returns the window which currently captures the mouse or None
7789 return _core_
.Window_GetCapture(*args
, **kwargs
)
7791 def Window_GetClassDefaultAttributes(*args
, **kwargs
):
7793 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7795 Get the default attributes for this class. This is useful if you want
7796 to use the same font or colour in your own control as in a standard
7797 control -- which is a much better idea than hard coding specific
7798 colours or fonts which might look completely out of place on the
7799 user's system, especially if it uses themes.
7801 The variant parameter is only relevant under Mac currently and is
7802 ignore under other platforms. Under Mac, it will change the size of
7803 the returned font. See `wx.Window.SetWindowVariant` for more about
7806 return _core_
.Window_GetClassDefaultAttributes(*args
, **kwargs
)
7808 def DLG_PNT(win
, point_or_x
, y
=None):
7810 Convenience function for converting a Point or (x,y) in
7811 dialog units to pixel units.
7814 return win
.ConvertDialogPointToPixels(point_or_x
)
7816 return win
.ConvertDialogPointToPixels(wx
.Point(point_or_x
, y
))
7818 def DLG_SZE(win
, size_width
, height
=None):
7820 Convenience function for converting a Size or (w,h) in
7821 dialog units to pixel units.
7824 return win
.ConvertDialogSizeToPixels(size_width
)
7826 return win
.ConvertDialogSizeToPixels(wx
.Size(size_width
, height
))
7829 def FindWindowById(*args
, **kwargs
):
7831 FindWindowById(long id, Window parent=None) -> Window
7833 Find the first window in the application with the given id. If parent
7834 is None, the search will start from all top-level frames and dialog
7835 boxes; if non-None, the search will be limited to the given window
7836 hierarchy. The search is recursive in both cases.
7838 return _core_
.FindWindowById(*args
, **kwargs
)
7840 def FindWindowByName(*args
, **kwargs
):
7842 FindWindowByName(String name, Window parent=None) -> Window
7844 Find a window by its name (as given in a window constructor or Create
7845 function call). If parent is None, the search will start from all
7846 top-level frames and dialog boxes; if non-None, the search will be
7847 limited to the given window hierarchy. The search is recursive in both
7850 If no window with such name is found, wx.FindWindowByLabel is called.
7852 return _core_
.FindWindowByName(*args
, **kwargs
)
7854 def FindWindowByLabel(*args
, **kwargs
):
7856 FindWindowByLabel(String label, Window parent=None) -> Window
7858 Find a window by its label. Depending on the type of window, the label
7859 may be a window title or panel item label. If parent is None, the
7860 search will start from all top-level frames and dialog boxes; if
7861 non-None, the search will be limited to the given window
7862 hierarchy. The search is recursive in both cases.
7864 return _core_
.FindWindowByLabel(*args
, **kwargs
)
7866 def Window_FromHWND(*args
, **kwargs
):
7867 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
7868 return _core_
.Window_FromHWND(*args
, **kwargs
)
7869 #---------------------------------------------------------------------------
7871 class Validator(EvtHandler
):
7873 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7874 def __init__(self
, *args
, **kwargs
):
7875 """__init__(self) -> Validator"""
7876 newobj
= _core_
.new_Validator(*args
, **kwargs
)
7877 self
.this
= newobj
.this
7880 self
._setOORInfo
(self
)
7882 def Clone(*args
, **kwargs
):
7883 """Clone(self) -> Validator"""
7884 return _core_
.Validator_Clone(*args
, **kwargs
)
7886 def Validate(*args
, **kwargs
):
7887 """Validate(self, Window parent) -> bool"""
7888 return _core_
.Validator_Validate(*args
, **kwargs
)
7890 def TransferToWindow(*args
, **kwargs
):
7891 """TransferToWindow(self) -> bool"""
7892 return _core_
.Validator_TransferToWindow(*args
, **kwargs
)
7894 def TransferFromWindow(*args
, **kwargs
):
7895 """TransferFromWindow(self) -> bool"""
7896 return _core_
.Validator_TransferFromWindow(*args
, **kwargs
)
7898 def GetWindow(*args
, **kwargs
):
7899 """GetWindow(self) -> Window"""
7900 return _core_
.Validator_GetWindow(*args
, **kwargs
)
7902 def SetWindow(*args
, **kwargs
):
7903 """SetWindow(self, Window window)"""
7904 return _core_
.Validator_SetWindow(*args
, **kwargs
)
7906 def IsSilent(*args
, **kwargs
):
7907 """IsSilent() -> bool"""
7908 return _core_
.Validator_IsSilent(*args
, **kwargs
)
7910 IsSilent
= staticmethod(IsSilent
)
7911 def SetBellOnError(*args
, **kwargs
):
7912 """SetBellOnError(int doIt=True)"""
7913 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
7915 SetBellOnError
= staticmethod(SetBellOnError
)
7917 class ValidatorPtr(Validator
):
7918 def __init__(self
, this
):
7920 if not hasattr(self
,"thisown"): self
.thisown
= 0
7921 self
.__class
__ = Validator
7922 _core_
.Validator_swigregister(ValidatorPtr
)
7924 def Validator_IsSilent(*args
, **kwargs
):
7925 """Validator_IsSilent() -> bool"""
7926 return _core_
.Validator_IsSilent(*args
, **kwargs
)
7928 def Validator_SetBellOnError(*args
, **kwargs
):
7929 """Validator_SetBellOnError(int doIt=True)"""
7930 return _core_
.Validator_SetBellOnError(*args
, **kwargs
)
7932 class PyValidator(Validator
):
7934 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7935 def __init__(self
, *args
, **kwargs
):
7936 """__init__(self) -> PyValidator"""
7937 newobj
= _core_
.new_PyValidator(*args
, **kwargs
)
7938 self
.this
= newobj
.this
7942 self
._setCallbackInfo
(self
, PyValidator
, 1)
7943 self
._setOORInfo
(self
)
7945 def _setCallbackInfo(*args
, **kwargs
):
7946 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
7947 return _core_
.PyValidator__setCallbackInfo(*args
, **kwargs
)
7950 class PyValidatorPtr(PyValidator
):
7951 def __init__(self
, this
):
7953 if not hasattr(self
,"thisown"): self
.thisown
= 0
7954 self
.__class
__ = PyValidator
7955 _core_
.PyValidator_swigregister(PyValidatorPtr
)
7957 #---------------------------------------------------------------------------
7959 class Menu(EvtHandler
):
7961 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
7962 def __init__(self
, *args
, **kwargs
):
7963 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
7964 newobj
= _core_
.new_Menu(*args
, **kwargs
)
7965 self
.this
= newobj
.this
7968 self
._setOORInfo
(self
)
7970 def Append(*args
, **kwargs
):
7971 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7972 return _core_
.Menu_Append(*args
, **kwargs
)
7974 def AppendSeparator(*args
, **kwargs
):
7975 """AppendSeparator(self) -> MenuItem"""
7976 return _core_
.Menu_AppendSeparator(*args
, **kwargs
)
7978 def AppendCheckItem(*args
, **kwargs
):
7979 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7980 return _core_
.Menu_AppendCheckItem(*args
, **kwargs
)
7982 def AppendRadioItem(*args
, **kwargs
):
7983 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7984 return _core_
.Menu_AppendRadioItem(*args
, **kwargs
)
7986 def AppendMenu(*args
, **kwargs
):
7987 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7988 return _core_
.Menu_AppendMenu(*args
, **kwargs
)
7990 def AppendItem(*args
, **kwargs
):
7991 """AppendItem(self, MenuItem item) -> MenuItem"""
7992 return _core_
.Menu_AppendItem(*args
, **kwargs
)
7994 def Break(*args
, **kwargs
):
7996 return _core_
.Menu_Break(*args
, **kwargs
)
7998 def InsertItem(*args
, **kwargs
):
7999 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8000 return _core_
.Menu_InsertItem(*args
, **kwargs
)
8002 def Insert(*args
, **kwargs
):
8004 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8005 int kind=ITEM_NORMAL) -> MenuItem
8007 return _core_
.Menu_Insert(*args
, **kwargs
)
8009 def InsertSeparator(*args
, **kwargs
):
8010 """InsertSeparator(self, size_t pos) -> MenuItem"""
8011 return _core_
.Menu_InsertSeparator(*args
, **kwargs
)
8013 def InsertCheckItem(*args
, **kwargs
):
8014 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8015 return _core_
.Menu_InsertCheckItem(*args
, **kwargs
)
8017 def InsertRadioItem(*args
, **kwargs
):
8018 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8019 return _core_
.Menu_InsertRadioItem(*args
, **kwargs
)
8021 def InsertMenu(*args
, **kwargs
):
8022 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8023 return _core_
.Menu_InsertMenu(*args
, **kwargs
)
8025 def PrependItem(*args
, **kwargs
):
8026 """PrependItem(self, MenuItem item) -> MenuItem"""
8027 return _core_
.Menu_PrependItem(*args
, **kwargs
)
8029 def Prepend(*args
, **kwargs
):
8030 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8031 return _core_
.Menu_Prepend(*args
, **kwargs
)
8033 def PrependSeparator(*args
, **kwargs
):
8034 """PrependSeparator(self) -> MenuItem"""
8035 return _core_
.Menu_PrependSeparator(*args
, **kwargs
)
8037 def PrependCheckItem(*args
, **kwargs
):
8038 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8039 return _core_
.Menu_PrependCheckItem(*args
, **kwargs
)
8041 def PrependRadioItem(*args
, **kwargs
):
8042 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8043 return _core_
.Menu_PrependRadioItem(*args
, **kwargs
)
8045 def PrependMenu(*args
, **kwargs
):
8046 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8047 return _core_
.Menu_PrependMenu(*args
, **kwargs
)
8049 def Remove(*args
, **kwargs
):
8050 """Remove(self, int id) -> MenuItem"""
8051 return _core_
.Menu_Remove(*args
, **kwargs
)
8053 def RemoveItem(*args
, **kwargs
):
8054 """RemoveItem(self, MenuItem item) -> MenuItem"""
8055 return _core_
.Menu_RemoveItem(*args
, **kwargs
)
8057 def Delete(*args
, **kwargs
):
8058 """Delete(self, int id) -> bool"""
8059 return _core_
.Menu_Delete(*args
, **kwargs
)
8061 def DeleteItem(*args
, **kwargs
):
8062 """DeleteItem(self, MenuItem item) -> bool"""
8063 return _core_
.Menu_DeleteItem(*args
, **kwargs
)
8065 def Destroy(*args
, **kwargs
):
8069 Deletes the C++ object this Python object is a proxy for.
8071 return _core_
.Menu_Destroy(*args
, **kwargs
)
8073 def DestroyId(*args
, **kwargs
):
8075 DestroyId(self, int id) -> bool
8077 Deletes the C++ object this Python object is a proxy for.
8079 return _core_
.Menu_DestroyId(*args
, **kwargs
)
8081 def DestroyItem(*args
, **kwargs
):
8083 DestroyItem(self, MenuItem item) -> bool
8085 Deletes the C++ object this Python object is a proxy for.
8087 return _core_
.Menu_DestroyItem(*args
, **kwargs
)
8089 def GetMenuItemCount(*args
, **kwargs
):
8090 """GetMenuItemCount(self) -> size_t"""
8091 return _core_
.Menu_GetMenuItemCount(*args
, **kwargs
)
8093 def GetMenuItems(*args
, **kwargs
):
8094 """GetMenuItems(self) -> PyObject"""
8095 return _core_
.Menu_GetMenuItems(*args
, **kwargs
)
8097 def FindItem(*args
, **kwargs
):
8098 """FindItem(self, String item) -> int"""
8099 return _core_
.Menu_FindItem(*args
, **kwargs
)
8101 def FindItemById(*args
, **kwargs
):
8102 """FindItemById(self, int id) -> MenuItem"""
8103 return _core_
.Menu_FindItemById(*args
, **kwargs
)
8105 def FindItemByPosition(*args
, **kwargs
):
8106 """FindItemByPosition(self, size_t position) -> MenuItem"""
8107 return _core_
.Menu_FindItemByPosition(*args
, **kwargs
)
8109 def Enable(*args
, **kwargs
):
8110 """Enable(self, int id, bool enable)"""
8111 return _core_
.Menu_Enable(*args
, **kwargs
)
8113 def IsEnabled(*args
, **kwargs
):
8114 """IsEnabled(self, int id) -> bool"""
8115 return _core_
.Menu_IsEnabled(*args
, **kwargs
)
8117 def Check(*args
, **kwargs
):
8118 """Check(self, int id, bool check)"""
8119 return _core_
.Menu_Check(*args
, **kwargs
)
8121 def IsChecked(*args
, **kwargs
):
8122 """IsChecked(self, int id) -> bool"""
8123 return _core_
.Menu_IsChecked(*args
, **kwargs
)
8125 def SetLabel(*args
, **kwargs
):
8126 """SetLabel(self, int id, String label)"""
8127 return _core_
.Menu_SetLabel(*args
, **kwargs
)
8129 def GetLabel(*args
, **kwargs
):
8130 """GetLabel(self, int id) -> String"""
8131 return _core_
.Menu_GetLabel(*args
, **kwargs
)
8133 def SetHelpString(*args
, **kwargs
):
8134 """SetHelpString(self, int id, String helpString)"""
8135 return _core_
.Menu_SetHelpString(*args
, **kwargs
)
8137 def GetHelpString(*args
, **kwargs
):
8138 """GetHelpString(self, int id) -> String"""
8139 return _core_
.Menu_GetHelpString(*args
, **kwargs
)
8141 def SetTitle(*args
, **kwargs
):
8142 """SetTitle(self, String title)"""
8143 return _core_
.Menu_SetTitle(*args
, **kwargs
)
8145 def GetTitle(*args
, **kwargs
):
8146 """GetTitle(self) -> String"""
8147 return _core_
.Menu_GetTitle(*args
, **kwargs
)
8149 def SetEventHandler(*args
, **kwargs
):
8150 """SetEventHandler(self, EvtHandler handler)"""
8151 return _core_
.Menu_SetEventHandler(*args
, **kwargs
)
8153 def GetEventHandler(*args
, **kwargs
):
8154 """GetEventHandler(self) -> EvtHandler"""
8155 return _core_
.Menu_GetEventHandler(*args
, **kwargs
)
8157 def SetInvokingWindow(*args
, **kwargs
):
8158 """SetInvokingWindow(self, Window win)"""
8159 return _core_
.Menu_SetInvokingWindow(*args
, **kwargs
)
8161 def GetInvokingWindow(*args
, **kwargs
):
8162 """GetInvokingWindow(self) -> Window"""
8163 return _core_
.Menu_GetInvokingWindow(*args
, **kwargs
)
8165 def GetStyle(*args
, **kwargs
):
8166 """GetStyle(self) -> long"""
8167 return _core_
.Menu_GetStyle(*args
, **kwargs
)
8169 def UpdateUI(*args
, **kwargs
):
8170 """UpdateUI(self, EvtHandler source=None)"""
8171 return _core_
.Menu_UpdateUI(*args
, **kwargs
)
8173 def GetMenuBar(*args
, **kwargs
):
8174 """GetMenuBar(self) -> MenuBar"""
8175 return _core_
.Menu_GetMenuBar(*args
, **kwargs
)
8177 def Attach(*args
, **kwargs
):
8178 """Attach(self, wxMenuBarBase menubar)"""
8179 return _core_
.Menu_Attach(*args
, **kwargs
)
8181 def Detach(*args
, **kwargs
):
8183 return _core_
.Menu_Detach(*args
, **kwargs
)
8185 def IsAttached(*args
, **kwargs
):
8186 """IsAttached(self) -> bool"""
8187 return _core_
.Menu_IsAttached(*args
, **kwargs
)
8189 def SetParent(*args
, **kwargs
):
8190 """SetParent(self, Menu parent)"""
8191 return _core_
.Menu_SetParent(*args
, **kwargs
)
8193 def GetParent(*args
, **kwargs
):
8194 """GetParent(self) -> Menu"""
8195 return _core_
.Menu_GetParent(*args
, **kwargs
)
8198 class MenuPtr(Menu
):
8199 def __init__(self
, this
):
8201 if not hasattr(self
,"thisown"): self
.thisown
= 0
8202 self
.__class
__ = Menu
8203 _core_
.Menu_swigregister(MenuPtr
)
8204 DefaultValidator
= cvar
.DefaultValidator
8206 #---------------------------------------------------------------------------
8208 class MenuBar(Window
):
8210 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8211 def __init__(self
, *args
, **kwargs
):
8212 """__init__(self, long style=0) -> MenuBar"""
8213 newobj
= _core_
.new_MenuBar(*args
, **kwargs
)
8214 self
.this
= newobj
.this
8217 self
._setOORInfo
(self
)
8219 def Append(*args
, **kwargs
):
8220 """Append(self, Menu menu, String title) -> bool"""
8221 return _core_
.MenuBar_Append(*args
, **kwargs
)
8223 def Insert(*args
, **kwargs
):
8224 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8225 return _core_
.MenuBar_Insert(*args
, **kwargs
)
8227 def GetMenuCount(*args
, **kwargs
):
8228 """GetMenuCount(self) -> size_t"""
8229 return _core_
.MenuBar_GetMenuCount(*args
, **kwargs
)
8231 def GetMenu(*args
, **kwargs
):
8232 """GetMenu(self, size_t pos) -> Menu"""
8233 return _core_
.MenuBar_GetMenu(*args
, **kwargs
)
8235 def Replace(*args
, **kwargs
):
8236 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8237 return _core_
.MenuBar_Replace(*args
, **kwargs
)
8239 def Remove(*args
, **kwargs
):
8240 """Remove(self, size_t pos) -> Menu"""
8241 return _core_
.MenuBar_Remove(*args
, **kwargs
)
8243 def EnableTop(*args
, **kwargs
):
8244 """EnableTop(self, size_t pos, bool enable)"""
8245 return _core_
.MenuBar_EnableTop(*args
, **kwargs
)
8247 def IsEnabledTop(*args
, **kwargs
):
8248 """IsEnabledTop(self, size_t pos) -> bool"""
8249 return _core_
.MenuBar_IsEnabledTop(*args
, **kwargs
)
8251 def SetLabelTop(*args
, **kwargs
):
8252 """SetLabelTop(self, size_t pos, String label)"""
8253 return _core_
.MenuBar_SetLabelTop(*args
, **kwargs
)
8255 def GetLabelTop(*args
, **kwargs
):
8256 """GetLabelTop(self, size_t pos) -> String"""
8257 return _core_
.MenuBar_GetLabelTop(*args
, **kwargs
)
8259 def FindMenuItem(*args
, **kwargs
):
8260 """FindMenuItem(self, String menu, String item) -> int"""
8261 return _core_
.MenuBar_FindMenuItem(*args
, **kwargs
)
8263 def FindItemById(*args
, **kwargs
):
8264 """FindItemById(self, int id) -> MenuItem"""
8265 return _core_
.MenuBar_FindItemById(*args
, **kwargs
)
8267 def FindMenu(*args
, **kwargs
):
8268 """FindMenu(self, String title) -> int"""
8269 return _core_
.MenuBar_FindMenu(*args
, **kwargs
)
8271 def Enable(*args
, **kwargs
):
8272 """Enable(self, int id, bool enable)"""
8273 return _core_
.MenuBar_Enable(*args
, **kwargs
)
8275 def Check(*args
, **kwargs
):
8276 """Check(self, int id, bool check)"""
8277 return _core_
.MenuBar_Check(*args
, **kwargs
)
8279 def IsChecked(*args
, **kwargs
):
8280 """IsChecked(self, int id) -> bool"""
8281 return _core_
.MenuBar_IsChecked(*args
, **kwargs
)
8283 def IsEnabled(*args
, **kwargs
):
8284 """IsEnabled(self, int id) -> bool"""
8285 return _core_
.MenuBar_IsEnabled(*args
, **kwargs
)
8287 def SetLabel(*args
, **kwargs
):
8288 """SetLabel(self, int id, String label)"""
8289 return _core_
.MenuBar_SetLabel(*args
, **kwargs
)
8291 def GetLabel(*args
, **kwargs
):
8292 """GetLabel(self, int id) -> String"""
8293 return _core_
.MenuBar_GetLabel(*args
, **kwargs
)
8295 def SetHelpString(*args
, **kwargs
):
8296 """SetHelpString(self, int id, String helpString)"""
8297 return _core_
.MenuBar_SetHelpString(*args
, **kwargs
)
8299 def GetHelpString(*args
, **kwargs
):
8300 """GetHelpString(self, int id) -> String"""
8301 return _core_
.MenuBar_GetHelpString(*args
, **kwargs
)
8303 def GetFrame(*args
, **kwargs
):
8304 """GetFrame(self) -> wxFrame"""
8305 return _core_
.MenuBar_GetFrame(*args
, **kwargs
)
8307 def IsAttached(*args
, **kwargs
):
8308 """IsAttached(self) -> bool"""
8309 return _core_
.MenuBar_IsAttached(*args
, **kwargs
)
8311 def Attach(*args
, **kwargs
):
8312 """Attach(self, wxFrame frame)"""
8313 return _core_
.MenuBar_Attach(*args
, **kwargs
)
8315 def Detach(*args
, **kwargs
):
8317 return _core_
.MenuBar_Detach(*args
, **kwargs
)
8320 class MenuBarPtr(MenuBar
):
8321 def __init__(self
, this
):
8323 if not hasattr(self
,"thisown"): self
.thisown
= 0
8324 self
.__class
__ = MenuBar
8325 _core_
.MenuBar_swigregister(MenuBarPtr
)
8327 #---------------------------------------------------------------------------
8329 class MenuItem(Object
):
8331 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8332 def __init__(self
, *args
, **kwargs
):
8334 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8335 String help=EmptyString, int kind=ITEM_NORMAL,
8336 Menu subMenu=None) -> MenuItem
8338 newobj
= _core_
.new_MenuItem(*args
, **kwargs
)
8339 self
.this
= newobj
.this
8342 def GetMenu(*args
, **kwargs
):
8343 """GetMenu(self) -> Menu"""
8344 return _core_
.MenuItem_GetMenu(*args
, **kwargs
)
8346 def SetMenu(*args
, **kwargs
):
8347 """SetMenu(self, Menu menu)"""
8348 return _core_
.MenuItem_SetMenu(*args
, **kwargs
)
8350 def SetId(*args
, **kwargs
):
8351 """SetId(self, int id)"""
8352 return _core_
.MenuItem_SetId(*args
, **kwargs
)
8354 def GetId(*args
, **kwargs
):
8355 """GetId(self) -> int"""
8356 return _core_
.MenuItem_GetId(*args
, **kwargs
)
8358 def IsSeparator(*args
, **kwargs
):
8359 """IsSeparator(self) -> bool"""
8360 return _core_
.MenuItem_IsSeparator(*args
, **kwargs
)
8362 def SetText(*args
, **kwargs
):
8363 """SetText(self, String str)"""
8364 return _core_
.MenuItem_SetText(*args
, **kwargs
)
8366 def GetLabel(*args
, **kwargs
):
8367 """GetLabel(self) -> String"""
8368 return _core_
.MenuItem_GetLabel(*args
, **kwargs
)
8370 def GetText(*args
, **kwargs
):
8371 """GetText(self) -> String"""
8372 return _core_
.MenuItem_GetText(*args
, **kwargs
)
8374 def GetLabelFromText(*args
, **kwargs
):
8375 """GetLabelFromText(String text) -> String"""
8376 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8378 GetLabelFromText
= staticmethod(GetLabelFromText
)
8379 def GetKind(*args
, **kwargs
):
8380 """GetKind(self) -> int"""
8381 return _core_
.MenuItem_GetKind(*args
, **kwargs
)
8383 def SetKind(*args
, **kwargs
):
8384 """SetKind(self, int kind)"""
8385 return _core_
.MenuItem_SetKind(*args
, **kwargs
)
8387 def SetCheckable(*args
, **kwargs
):
8388 """SetCheckable(self, bool checkable)"""
8389 return _core_
.MenuItem_SetCheckable(*args
, **kwargs
)
8391 def IsCheckable(*args
, **kwargs
):
8392 """IsCheckable(self) -> bool"""
8393 return _core_
.MenuItem_IsCheckable(*args
, **kwargs
)
8395 def IsSubMenu(*args
, **kwargs
):
8396 """IsSubMenu(self) -> bool"""
8397 return _core_
.MenuItem_IsSubMenu(*args
, **kwargs
)
8399 def SetSubMenu(*args
, **kwargs
):
8400 """SetSubMenu(self, Menu menu)"""
8401 return _core_
.MenuItem_SetSubMenu(*args
, **kwargs
)
8403 def GetSubMenu(*args
, **kwargs
):
8404 """GetSubMenu(self) -> Menu"""
8405 return _core_
.MenuItem_GetSubMenu(*args
, **kwargs
)
8407 def Enable(*args
, **kwargs
):
8408 """Enable(self, bool enable=True)"""
8409 return _core_
.MenuItem_Enable(*args
, **kwargs
)
8411 def IsEnabled(*args
, **kwargs
):
8412 """IsEnabled(self) -> bool"""
8413 return _core_
.MenuItem_IsEnabled(*args
, **kwargs
)
8415 def Check(*args
, **kwargs
):
8416 """Check(self, bool check=True)"""
8417 return _core_
.MenuItem_Check(*args
, **kwargs
)
8419 def IsChecked(*args
, **kwargs
):
8420 """IsChecked(self) -> bool"""
8421 return _core_
.MenuItem_IsChecked(*args
, **kwargs
)
8423 def Toggle(*args
, **kwargs
):
8425 return _core_
.MenuItem_Toggle(*args
, **kwargs
)
8427 def SetHelp(*args
, **kwargs
):
8428 """SetHelp(self, String str)"""
8429 return _core_
.MenuItem_SetHelp(*args
, **kwargs
)
8431 def GetHelp(*args
, **kwargs
):
8432 """GetHelp(self) -> String"""
8433 return _core_
.MenuItem_GetHelp(*args
, **kwargs
)
8435 def GetAccel(*args
, **kwargs
):
8436 """GetAccel(self) -> AcceleratorEntry"""
8437 return _core_
.MenuItem_GetAccel(*args
, **kwargs
)
8439 def SetAccel(*args
, **kwargs
):
8440 """SetAccel(self, AcceleratorEntry accel)"""
8441 return _core_
.MenuItem_SetAccel(*args
, **kwargs
)
8443 def GetDefaultMarginWidth(*args
, **kwargs
):
8444 """GetDefaultMarginWidth() -> int"""
8445 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8447 GetDefaultMarginWidth
= staticmethod(GetDefaultMarginWidth
)
8448 def SetBitmap(*args
, **kwargs
):
8449 """SetBitmap(self, Bitmap bitmap)"""
8450 return _core_
.MenuItem_SetBitmap(*args
, **kwargs
)
8452 def GetBitmap(*args
, **kwargs
):
8453 """GetBitmap(self) -> Bitmap"""
8454 return _core_
.MenuItem_GetBitmap(*args
, **kwargs
)
8457 class MenuItemPtr(MenuItem
):
8458 def __init__(self
, this
):
8460 if not hasattr(self
,"thisown"): self
.thisown
= 0
8461 self
.__class
__ = MenuItem
8462 _core_
.MenuItem_swigregister(MenuItemPtr
)
8464 def MenuItem_GetLabelFromText(*args
, **kwargs
):
8465 """MenuItem_GetLabelFromText(String text) -> String"""
8466 return _core_
.MenuItem_GetLabelFromText(*args
, **kwargs
)
8468 def MenuItem_GetDefaultMarginWidth(*args
, **kwargs
):
8469 """MenuItem_GetDefaultMarginWidth() -> int"""
8470 return _core_
.MenuItem_GetDefaultMarginWidth(*args
, **kwargs
)
8472 #---------------------------------------------------------------------------
8474 class Control(Window
):
8476 This is the base class for a control or 'widget'.
8478 A control is generally a small window which processes user input
8479 and/or displays one or more item of data.
8482 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8483 def __init__(self
, *args
, **kwargs
):
8485 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8486 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8487 String name=ControlNameStr) -> Control
8489 Create a Control. Normally you should only call this from a subclass'
8490 __init__ as a plain old wx.Control is not very useful.
8492 newobj
= _core_
.new_Control(*args
, **kwargs
)
8493 self
.this
= newobj
.this
8496 self
._setOORInfo
(self
)
8498 def Create(*args
, **kwargs
):
8500 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8501 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8502 String name=ControlNameStr) -> bool
8504 Do the 2nd phase and create the GUI control.
8506 return _core_
.Control_Create(*args
, **kwargs
)
8508 def Command(*args
, **kwargs
):
8510 Command(self, CommandEvent event)
8512 Simulates the effect of the user issuing a command to the item.
8514 :see: `wx.CommandEvent`
8517 return _core_
.Control_Command(*args
, **kwargs
)
8519 def GetLabel(*args
, **kwargs
):
8521 GetLabel(self) -> String
8523 Return a control's text.
8525 return _core_
.Control_GetLabel(*args
, **kwargs
)
8527 def SetLabel(*args
, **kwargs
):
8529 SetLabel(self, String label)
8531 Sets the item's text.
8533 return _core_
.Control_SetLabel(*args
, **kwargs
)
8535 def GetClassDefaultAttributes(*args
, **kwargs
):
8537 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8539 Get the default attributes for this class. This is useful if you want
8540 to use the same font or colour in your own control as in a standard
8541 control -- which is a much better idea than hard coding specific
8542 colours or fonts which might look completely out of place on the
8543 user's system, especially if it uses themes.
8545 The variant parameter is only relevant under Mac currently and is
8546 ignore under other platforms. Under Mac, it will change the size of
8547 the returned font. See `wx.Window.SetWindowVariant` for more about
8550 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8552 GetClassDefaultAttributes
= staticmethod(GetClassDefaultAttributes
)
8554 class ControlPtr(Control
):
8555 def __init__(self
, this
):
8557 if not hasattr(self
,"thisown"): self
.thisown
= 0
8558 self
.__class
__ = Control
8559 _core_
.Control_swigregister(ControlPtr
)
8560 ControlNameStr
= cvar
.ControlNameStr
8562 def PreControl(*args
, **kwargs
):
8564 PreControl() -> Control
8566 Precreate a Control control for 2-phase creation
8568 val
= _core_
.new_PreControl(*args
, **kwargs
)
8572 def Control_GetClassDefaultAttributes(*args
, **kwargs
):
8574 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8576 Get the default attributes for this class. This is useful if you want
8577 to use the same font or colour in your own control as in a standard
8578 control -- which is a much better idea than hard coding specific
8579 colours or fonts which might look completely out of place on the
8580 user's system, especially if it uses themes.
8582 The variant parameter is only relevant under Mac currently and is
8583 ignore under other platforms. Under Mac, it will change the size of
8584 the returned font. See `wx.Window.SetWindowVariant` for more about
8587 return _core_
.Control_GetClassDefaultAttributes(*args
, **kwargs
)
8589 #---------------------------------------------------------------------------
8591 class ItemContainer(object):
8593 wx.ItemContainer defines an interface which is implemented by all
8594 controls which have string subitems, each of which may be selected,
8595 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8596 `wx.ComboBox` which implements an extended interface deriving from
8599 It defines the methods for accessing the control's items and although
8600 each of the derived classes implements them differently, they still
8601 all conform to the same interface.
8603 The items in a wx.ItemContainer have (non empty) string labels and,
8604 optionally, client data associated with them.
8607 def __init__(self
): raise RuntimeError, "No constructor defined"
8609 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8610 def Append(*args
, **kwargs
):
8612 Append(self, String item, PyObject clientData=None) -> int
8614 Adds the item to the control, associating the given data with the item
8615 if not None. The return value is the index of the newly added item
8616 which may be different from the last one if the control is sorted (e.g.
8617 has wx.LB_SORT or wx.CB_SORT style).
8619 return _core_
.ItemContainer_Append(*args
, **kwargs
)
8621 def AppendItems(*args
, **kwargs
):
8623 AppendItems(self, List strings)
8625 Apend several items at once to the control. Notice that calling this
8626 method may be much faster than appending the items one by one if you
8627 need to add a lot of items.
8629 return _core_
.ItemContainer_AppendItems(*args
, **kwargs
)
8631 def Insert(*args
, **kwargs
):
8633 Insert(self, String item, int pos, PyObject clientData=None) -> int
8635 Insert an item into the control before the item at the ``pos`` index,
8636 optionally associating some data object with the item.
8638 return _core_
.ItemContainer_Insert(*args
, **kwargs
)
8640 def Clear(*args
, **kwargs
):
8644 Removes all items from the control.
8646 return _core_
.ItemContainer_Clear(*args
, **kwargs
)
8648 def Delete(*args
, **kwargs
):
8652 Deletes the item at the zero-based index 'n' from the control. Note
8653 that it is an error (signalled by a `wx.PyAssertionError` exception if
8654 enabled) to remove an item with the index negative or greater or equal
8655 than the number of items in the control.
8657 return _core_
.ItemContainer_Delete(*args
, **kwargs
)
8659 def GetCount(*args
, **kwargs
):
8661 GetCount(self) -> int
8663 Returns the number of items in the control.
8665 return _core_
.ItemContainer_GetCount(*args
, **kwargs
)
8667 def IsEmpty(*args
, **kwargs
):
8669 IsEmpty(self) -> bool
8671 Returns True if the control is empty or False if it has some items.
8673 return _core_
.ItemContainer_IsEmpty(*args
, **kwargs
)
8675 def GetString(*args
, **kwargs
):
8677 GetString(self, int n) -> String
8679 Returns the label of the item with the given index.
8681 return _core_
.ItemContainer_GetString(*args
, **kwargs
)
8683 def GetStrings(*args
, **kwargs
):
8684 """GetStrings(self) -> wxArrayString"""
8685 return _core_
.ItemContainer_GetStrings(*args
, **kwargs
)
8687 def SetString(*args
, **kwargs
):
8689 SetString(self, int n, String s)
8691 Sets the label for the given item.
8693 return _core_
.ItemContainer_SetString(*args
, **kwargs
)
8695 def FindString(*args
, **kwargs
):
8697 FindString(self, String s) -> int
8699 Finds an item whose label matches the given string. Returns the
8700 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8703 return _core_
.ItemContainer_FindString(*args
, **kwargs
)
8705 def Select(*args
, **kwargs
):
8709 Sets the item at index 'n' to be the selected item.
8711 return _core_
.ItemContainer_Select(*args
, **kwargs
)
8713 SetSelection
= Select
8714 def GetSelection(*args
, **kwargs
):
8716 GetSelection(self) -> int
8718 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8721 return _core_
.ItemContainer_GetSelection(*args
, **kwargs
)
8723 def GetStringSelection(*args
, **kwargs
):
8725 GetStringSelection(self) -> String
8727 Returns the label of the selected item or an empty string if no item
8730 return _core_
.ItemContainer_GetStringSelection(*args
, **kwargs
)
8732 def GetClientData(*args
, **kwargs
):
8734 GetClientData(self, int n) -> PyObject
8736 Returns the client data associated with the given item, (if any.)
8738 return _core_
.ItemContainer_GetClientData(*args
, **kwargs
)
8740 def SetClientData(*args
, **kwargs
):
8742 SetClientData(self, int n, PyObject clientData)
8744 Associate the given client data with the item at position n.
8746 return _core_
.ItemContainer_SetClientData(*args
, **kwargs
)
8749 class ItemContainerPtr(ItemContainer
):
8750 def __init__(self
, this
):
8752 if not hasattr(self
,"thisown"): self
.thisown
= 0
8753 self
.__class
__ = ItemContainer
8754 _core_
.ItemContainer_swigregister(ItemContainerPtr
)
8756 #---------------------------------------------------------------------------
8758 class ControlWithItems(Control
,ItemContainer
):
8760 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8761 wx.Control class, and is used for the base class of various controls
8764 def __init__(self
): raise RuntimeError, "No constructor defined"
8766 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8768 class ControlWithItemsPtr(ControlWithItems
):
8769 def __init__(self
, this
):
8771 if not hasattr(self
,"thisown"): self
.thisown
= 0
8772 self
.__class
__ = ControlWithItems
8773 _core_
.ControlWithItems_swigregister(ControlWithItemsPtr
)
8775 #---------------------------------------------------------------------------
8777 class SizerItem(Object
):
8779 The wx.SizerItem class is used to track the position, size and other
8780 attributes of each item managed by a `wx.Sizer`. In normal usage user
8781 code should never need to deal directly with a wx.SizerItem, but
8782 custom classes derived from `wx.PySizer` will probably need to use the
8783 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8785 :see: `wx.Sizer`, `wx.GBSizerItem`
8788 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
8789 def __init__(self
, *args
, **kwargs
):
8791 __init__(self) -> SizerItem
8793 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8794 size will need to be set before this item can be used in a Sizer.
8796 You will probably never need to create a wx.SizerItem directly as they
8797 are created automatically when the sizer's Add, Insert or Prepend
8800 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8802 newobj
= _core_
.new_SizerItem(*args
, **kwargs
)
8803 self
.this
= newobj
.this
8806 def DeleteWindows(*args
, **kwargs
):
8810 Destroy the window or the windows in a subsizer, depending on the type
8813 return _core_
.SizerItem_DeleteWindows(*args
, **kwargs
)
8815 def DetachSizer(*args
, **kwargs
):
8819 Enable deleting the SizerItem without destroying the contained sizer.
8821 return _core_
.SizerItem_DetachSizer(*args
, **kwargs
)
8823 def GetSize(*args
, **kwargs
):
8825 GetSize(self) -> Size
8827 Get the current size of the item, as set in the last Layout.
8829 return _core_
.SizerItem_GetSize(*args
, **kwargs
)
8831 def CalcMin(*args
, **kwargs
):
8833 CalcMin(self) -> Size
8835 Calculates the minimum desired size for the item, including any space
8838 return _core_
.SizerItem_CalcMin(*args
, **kwargs
)
8840 def SetDimension(*args
, **kwargs
):
8842 SetDimension(self, Point pos, Size size)
8844 Set the position and size of the space allocated for this item by the
8845 sizer, and adjust the position and size of the item (window or
8846 subsizer) to be within that space taking alignment and borders into
8849 return _core_
.SizerItem_SetDimension(*args
, **kwargs
)
8851 def GetMinSize(*args
, **kwargs
):
8853 GetMinSize(self) -> Size
8855 Get the minimum size needed for the item.
8857 return _core_
.SizerItem_GetMinSize(*args
, **kwargs
)
8859 def GetMinSizeWithBorder(*args
, **kwargs
):
8861 GetMinSizeWithBorder(self) -> Size
8863 Get the minimum size needed for the item with space for the borders
8866 return _core_
.SizerItem_GetMinSizeWithBorder(*args
, **kwargs
)
8868 def SetInitSize(*args
, **kwargs
):
8869 """SetInitSize(self, int x, int y)"""
8870 return _core_
.SizerItem_SetInitSize(*args
, **kwargs
)
8872 def SetRatioWH(*args
, **kwargs
):
8874 SetRatioWH(self, int width, int height)
8876 Set the ratio item attribute.
8878 return _core_
.SizerItem_SetRatioWH(*args
, **kwargs
)
8880 def SetRatioSize(*args
, **kwargs
):
8882 SetRatioSize(self, Size size)
8884 Set the ratio item attribute.
8886 return _core_
.SizerItem_SetRatioSize(*args
, **kwargs
)
8888 def SetRatio(*args
, **kwargs
):
8890 SetRatio(self, float ratio)
8892 Set the ratio item attribute.
8894 return _core_
.SizerItem_SetRatio(*args
, **kwargs
)
8896 def GetRatio(*args
, **kwargs
):
8898 GetRatio(self) -> float
8900 Set the ratio item attribute.
8902 return _core_
.SizerItem_GetRatio(*args
, **kwargs
)
8904 def GetRect(*args
, **kwargs
):
8906 GetRect(self) -> Rect
8908 Returns the rectangle that the sizer item should occupy
8910 return _core_
.SizerItem_GetRect(*args
, **kwargs
)
8912 def IsWindow(*args
, **kwargs
):
8914 IsWindow(self) -> bool
8916 Is this sizer item a window?
8918 return _core_
.SizerItem_IsWindow(*args
, **kwargs
)
8920 def IsSizer(*args
, **kwargs
):
8922 IsSizer(self) -> bool
8924 Is this sizer item a subsizer?
8926 return _core_
.SizerItem_IsSizer(*args
, **kwargs
)
8928 def IsSpacer(*args
, **kwargs
):
8930 IsSpacer(self) -> bool
8932 Is this sizer item a spacer?
8934 return _core_
.SizerItem_IsSpacer(*args
, **kwargs
)
8936 def SetProportion(*args
, **kwargs
):
8938 SetProportion(self, int proportion)
8940 Set the proportion value for this item.
8942 return _core_
.SizerItem_SetProportion(*args
, **kwargs
)
8944 def GetProportion(*args
, **kwargs
):
8946 GetProportion(self) -> int
8948 Get the proportion value for this item.
8950 return _core_
.SizerItem_GetProportion(*args
, **kwargs
)
8952 SetOption
= wx
._deprecated
(SetProportion
, "Please use `SetProportion` instead.")
8953 GetOption
= wx
._deprecated
(GetProportion
, "Please use `GetProportion` instead.")
8954 def SetFlag(*args
, **kwargs
):
8956 SetFlag(self, int flag)
8958 Set the flag value for this item.
8960 return _core_
.SizerItem_SetFlag(*args
, **kwargs
)
8962 def GetFlag(*args
, **kwargs
):
8964 GetFlag(self) -> int
8966 Get the flag value for this item.
8968 return _core_
.SizerItem_GetFlag(*args
, **kwargs
)
8970 def SetBorder(*args
, **kwargs
):
8972 SetBorder(self, int border)
8974 Set the border value for this item.
8976 return _core_
.SizerItem_SetBorder(*args
, **kwargs
)
8978 def GetBorder(*args
, **kwargs
):
8980 GetBorder(self) -> int
8982 Get the border value for this item.
8984 return _core_
.SizerItem_GetBorder(*args
, **kwargs
)
8986 def GetWindow(*args
, **kwargs
):
8988 GetWindow(self) -> Window
8990 Get the window (if any) that is managed by this sizer item.
8992 return _core_
.SizerItem_GetWindow(*args
, **kwargs
)
8994 def SetWindow(*args
, **kwargs
):
8996 SetWindow(self, Window window)
8998 Set the window to be managed by this sizer item.
9000 return _core_
.SizerItem_SetWindow(*args
, **kwargs
)
9002 def GetSizer(*args
, **kwargs
):
9004 GetSizer(self) -> Sizer
9006 Get the subsizer (if any) that is managed by this sizer item.
9008 return _core_
.SizerItem_GetSizer(*args
, **kwargs
)
9010 def SetSizer(*args
, **kwargs
):
9012 SetSizer(self, Sizer sizer)
9014 Set the subsizer to be managed by this sizer item.
9016 return _core_
.SizerItem_SetSizer(*args
, **kwargs
)
9018 def GetSpacer(*args
, **kwargs
):
9020 GetSpacer(self) -> Size
9022 Get the size of the spacer managed by this sizer item.
9024 return _core_
.SizerItem_GetSpacer(*args
, **kwargs
)
9026 def SetSpacer(*args
, **kwargs
):
9028 SetSpacer(self, Size size)
9030 Set the size of the spacer to be managed by this sizer item.
9032 return _core_
.SizerItem_SetSpacer(*args
, **kwargs
)
9034 def Show(*args
, **kwargs
):
9036 Show(self, bool show)
9038 Set the show item attribute, which sizers use to determine if the item
9039 is to be made part of the layout or not. If the item is tracking a
9040 window then it is shown or hidden as needed.
9042 return _core_
.SizerItem_Show(*args
, **kwargs
)
9044 def IsShown(*args
, **kwargs
):
9046 IsShown(self) -> bool
9048 Is the item to be shown in the layout?
9050 return _core_
.SizerItem_IsShown(*args
, **kwargs
)
9052 def GetPosition(*args
, **kwargs
):
9054 GetPosition(self) -> Point
9056 Returns the current position of the item, as set in the last Layout.
9058 return _core_
.SizerItem_GetPosition(*args
, **kwargs
)
9060 def GetUserData(*args
, **kwargs
):
9062 GetUserData(self) -> PyObject
9064 Returns the userData associated with this sizer item, or None if there
9067 return _core_
.SizerItem_GetUserData(*args
, **kwargs
)
9070 class SizerItemPtr(SizerItem
):
9071 def __init__(self
, this
):
9073 if not hasattr(self
,"thisown"): self
.thisown
= 0
9074 self
.__class
__ = SizerItem
9075 _core_
.SizerItem_swigregister(SizerItemPtr
)
9077 def SizerItemWindow(*args
, **kwargs
):
9079 SizerItemWindow(Window window, int proportion, int flag, int border,
9080 PyObject userData=None) -> SizerItem
9082 Constructs a `wx.SizerItem` for tracking a window.
9084 val
= _core_
.new_SizerItemWindow(*args
, **kwargs
)
9088 def SizerItemSpacer(*args
, **kwargs
):
9090 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9091 PyObject userData=None) -> SizerItem
9093 Constructs a `wx.SizerItem` for tracking a spacer.
9095 val
= _core_
.new_SizerItemSpacer(*args
, **kwargs
)
9099 def SizerItemSizer(*args
, **kwargs
):
9101 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9102 PyObject userData=None) -> SizerItem
9104 Constructs a `wx.SizerItem` for tracking a subsizer
9106 val
= _core_
.new_SizerItemSizer(*args
, **kwargs
)
9110 class Sizer(Object
):
9112 wx.Sizer is the abstract base class used for laying out subwindows in
9113 a window. You cannot use wx.Sizer directly; instead, you will have to
9114 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9115 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9116 and `wx.GridBagSizer`.
9118 The concept implemented by sizers in wxWidgets is closely related to
9119 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9120 toolkit or the Qt toolkit. It is based upon the idea of the individual
9121 subwindows reporting their minimal required size and their ability to
9122 get stretched if the size of the parent window has changed. This will
9123 most often mean that the programmer does not set the original size of
9124 a dialog in the beginning, rather the dialog will assigned a sizer and
9125 this sizer will be queried about the recommended size. The sizer in
9126 turn will query its children, which can be normal windows or contorls,
9127 empty space or other sizers, so that a hierarchy of sizers can be
9128 constructed. Note that wxSizer does not derive from wxWindow and thus
9129 do not interfere with tab ordering and requires very little resources
9130 compared to a real window on screen.
9132 What makes sizers so well fitted for use in wxWidgets is the fact that
9133 every control reports its own minimal size and the algorithm can
9134 handle differences in font sizes or different window (dialog item)
9135 sizes on different platforms without problems. If for example the
9136 standard font as well as the overall design of Mac widgets requires
9137 more space than on Windows, then the initial size of a dialog using a
9138 sizer will automatically be bigger on Mac than on Windows.
9140 def __init__(self
): raise RuntimeError, "No constructor defined"
9142 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9143 def _setOORInfo(*args
, **kwargs
):
9144 """_setOORInfo(self, PyObject _self)"""
9145 return _core_
.Sizer__setOORInfo(*args
, **kwargs
)
9147 def Add(*args
, **kwargs
):
9149 Add(self, item, int proportion=0, int flag=0, int border=0,
9150 PyObject userData=None) -> wx.SizerItem
9152 Appends a child item to the sizer.
9154 return _core_
.Sizer_Add(*args
, **kwargs
)
9156 def Insert(*args
, **kwargs
):
9158 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9159 PyObject userData=None) -> wx.SizerItem
9161 Inserts a new item into the list of items managed by this sizer before
9162 the item at index *before*. See `Add` for a description of the parameters.
9164 return _core_
.Sizer_Insert(*args
, **kwargs
)
9166 def Prepend(*args
, **kwargs
):
9168 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9169 PyObject userData=None) -> wx.SizerItem
9171 Adds a new item to the begining of the list of sizer items managed by
9172 this sizer. See `Add` for a description of the parameters.
9174 return _core_
.Sizer_Prepend(*args
, **kwargs
)
9176 def Remove(*args
, **kwargs
):
9178 Remove(self, item) -> bool
9180 Removes an item from the sizer and destroys it. This method does not
9181 cause any layout or resizing to take place, call `Layout` to update
9182 the layout on screen after removing a child from the sizer. The
9183 *item* parameter can be either a window, a sizer, or the zero-based
9184 index of an item to remove. Returns True if the child item was found
9187 return _core_
.Sizer_Remove(*args
, **kwargs
)
9189 def Detach(*args
, **kwargs
):
9191 Detach(self, item) -> bool
9193 Detaches an item from the sizer without destroying it. This method
9194 does not cause any layout or resizing to take place, call `Layout` to
9195 do so. The *item* parameter can be either a window, a sizer, or the
9196 zero-based index of the item to be detached. Returns True if the child item
9197 was found and detached.
9199 return _core_
.Sizer_Detach(*args
, **kwargs
)
9201 def GetItem(*args
, **kwargs
):
9203 GetItem(self, item) -> wx.SizerItem
9205 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9206 parameter can be either a window, a sizer, or the zero-based index of
9207 the item to be detached.
9209 return _core_
.Sizer_GetItem(*args
, **kwargs
)
9211 def _SetItemMinSize(*args
, **kwargs
):
9212 """_SetItemMinSize(self, PyObject item, Size size)"""
9213 return _core_
.Sizer__SetItemMinSize(*args
, **kwargs
)
9215 def SetItemMinSize(self
, item
, *args
):
9217 SetItemMinSize(self, item, Size size)
9219 Sets the minimum size that will be allocated for an item in the sizer.
9220 The *item* parameter can be either a window, a sizer, or the
9221 zero-based index of the item. If a window or sizer is given then it
9222 will be searched for recursivly in subsizers if neccessary.
9225 # for backward compatibility accept separate width,height args too
9226 return self
._SetItemMinSize
(item
, args
)
9228 return self
._SetItemMinSize
(item
, args
[0])
9230 def AddItem(*args
, **kwargs
):
9232 AddItem(self, SizerItem item)
9234 Adds a `wx.SizerItem` to the sizer.
9236 return _core_
.Sizer_AddItem(*args
, **kwargs
)
9238 def InsertItem(*args
, **kwargs
):
9240 InsertItem(self, int index, SizerItem item)
9242 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9244 return _core_
.Sizer_InsertItem(*args
, **kwargs
)
9246 def PrependItem(*args
, **kwargs
):
9248 PrependItem(self, SizerItem item)
9250 Prepends a `wx.SizerItem` to the sizer.
9252 return _core_
.Sizer_PrependItem(*args
, **kwargs
)
9254 def AddMany(self
, items
):
9256 AddMany is a convenience method for adding several items
9257 to a sizer at one time. Simply pass it a list of tuples,
9258 where each tuple consists of the parameters that you
9259 would normally pass to the `Add` method.
9262 if type(item
) != type(()) or (len(item
) == 2 and type(item
[0]) == type(1)):
9266 # for backwards compatibility only, please do not use in new code
9267 AddWindow
= wx
._deprecated
(Add
, "AddWindow is deprecated, use `Add` instead.")
9268 AddSizer
= wx
._deprecated
(Add
, "AddSizer is deprecated, use `Add` instead.")
9269 AddSpacer
= wx
._deprecated
(Add
, "AddSpacer is deprecated, use `Add` instead.")
9270 PrependWindow
= wx
._deprecated
(Prepend
, "PrependWindow is deprecated, use `Prepend` instead.")
9271 PrependSizer
= wx
._deprecated
(Prepend
, "PrependSizer is deprecated, use `Prepend` instead.")
9272 PrependSpacer
= wx
._deprecated
(Prepend
, "PrependSpacer is deprecated, use `Prepend` instead.")
9273 InsertWindow
= wx
._deprecated
(Insert
, "InsertWindow is deprecated, use `Insert` instead.")
9274 InsertSizer
= wx
._deprecated
(Insert
, "InsertSizer is deprecated, use `Insert` instead.")
9275 InsertSpacer
= wx
._deprecated
(Insert
, "InsertSpacer is deprecated, use `Insert` instead.")
9276 RemoveWindow
= wx
._deprecated
(Remove
, "RemoveWindow is deprecated, use `Remove` instead.")
9277 RemoveSizer
= wx
._deprecated
(Remove
, "RemoveSizer is deprecated, use `Remove` instead.")
9278 RemovePos
= wx
._deprecated
(Remove
, "RemovePos is deprecated, use `Remove` instead.")
9281 def SetDimension(*args
, **kwargs
):
9283 SetDimension(self, int x, int y, int width, int height)
9285 Call this to force the sizer to take the given dimension and thus
9286 force the items owned by the sizer to resize themselves according to
9287 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9290 return _core_
.Sizer_SetDimension(*args
, **kwargs
)
9292 def SetMinSize(*args
, **kwargs
):
9294 SetMinSize(self, Size size)
9296 Call this to give the sizer a minimal size. Normally, the sizer will
9297 calculate its minimal size based purely on how much space its children
9298 need. After calling this method `GetMinSize` will return either the
9299 minimal size as requested by its children or the minimal size set
9300 here, depending on which is bigger.
9302 return _core_
.Sizer_SetMinSize(*args
, **kwargs
)
9304 def GetSize(*args
, **kwargs
):
9306 GetSize(self) -> Size
9308 Returns the current size of the space managed by the sizer.
9310 return _core_
.Sizer_GetSize(*args
, **kwargs
)
9312 def GetPosition(*args
, **kwargs
):
9314 GetPosition(self) -> Point
9316 Returns the current position of the sizer's managed space.
9318 return _core_
.Sizer_GetPosition(*args
, **kwargs
)
9320 def GetMinSize(*args
, **kwargs
):
9322 GetMinSize(self) -> Size
9324 Returns the minimal size of the sizer. This is either the combined
9325 minimal size of all the children and their borders or the minimal size
9326 set by SetMinSize, depending on which is bigger.
9328 return _core_
.Sizer_GetMinSize(*args
, **kwargs
)
9330 def GetSizeTuple(self
):
9331 return self
.GetSize().Get()
9332 def GetPositionTuple(self
):
9333 return self
.GetPosition().Get()
9334 def GetMinSizeTuple(self
):
9335 return self
.GetMinSize().Get()
9337 def RecalcSizes(*args
, **kwargs
):
9341 Using the sizes calculated by `CalcMin` reposition and resize all the
9342 items managed by this sizer. You should not need to call this directly as
9343 it is called by `Layout`.
9345 return _core_
.Sizer_RecalcSizes(*args
, **kwargs
)
9347 def CalcMin(*args
, **kwargs
):
9349 CalcMin(self) -> Size
9351 This method is where the sizer will do the actual calculation of its
9352 children's minimal sizes. You should not need to call this directly as
9353 it is called by `Layout`.
9355 return _core_
.Sizer_CalcMin(*args
, **kwargs
)
9357 def Layout(*args
, **kwargs
):
9361 This method will force the recalculation and layout of the items
9362 controlled by the sizer using the current space allocated to the
9363 sizer. Normally this is called automatically from the owning window's
9364 EVT_SIZE handler, but it is also useful to call it from user code when
9365 one of the items in a sizer change size, or items are added or
9368 return _core_
.Sizer_Layout(*args
, **kwargs
)
9370 def Fit(*args
, **kwargs
):
9372 Fit(self, Window window) -> Size
9374 Tell the sizer to resize the *window* to match the sizer's minimal
9375 size. This is commonly done in the constructor of the window itself in
9376 order to set its initial size to match the needs of the children as
9377 determined by the sizer. Returns the new size.
9379 For a top level window this is the total window size, not the client size.
9381 return _core_
.Sizer_Fit(*args
, **kwargs
)
9383 def FitInside(*args
, **kwargs
):
9385 FitInside(self, Window window)
9387 Tell the sizer to resize the *virtual size* of the *window* to match the
9388 sizer's minimal size. This will not alter the on screen size of the
9389 window, but may cause the addition/removal/alteration of scrollbars
9390 required to view the virtual area in windows which manage it.
9392 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9395 return _core_
.Sizer_FitInside(*args
, **kwargs
)
9397 def SetSizeHints(*args
, **kwargs
):
9399 SetSizeHints(self, Window window)
9401 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9402 match the sizer's minimal size. This is commonly done in the
9403 constructor of the window itself if the window is resizable (as are
9404 many dialogs under Unix and frames on probably all platforms) in order
9405 to prevent the window from being sized smaller than the minimal size
9406 required by the sizer.
9408 return _core_
.Sizer_SetSizeHints(*args
, **kwargs
)
9410 def SetVirtualSizeHints(*args
, **kwargs
):
9412 SetVirtualSizeHints(self, Window window)
9414 Tell the sizer to set the minimal size of the window virtual area to
9415 match the sizer's minimal size. For windows with managed scrollbars
9416 this will set them appropriately.
9418 :see: `wx.ScrolledWindow.SetScrollbars`
9421 return _core_
.Sizer_SetVirtualSizeHints(*args
, **kwargs
)
9423 def Clear(*args
, **kwargs
):
9425 Clear(self, bool deleteWindows=False)
9427 Clear all items from the sizer, optionally destroying the window items
9430 return _core_
.Sizer_Clear(*args
, **kwargs
)
9432 def DeleteWindows(*args
, **kwargs
):
9436 Destroy all windows managed by the sizer.
9438 return _core_
.Sizer_DeleteWindows(*args
, **kwargs
)
9440 def GetChildren(*args
, **kwargs
):
9442 GetChildren(sefl) -> list
9444 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9446 return _core_
.Sizer_GetChildren(*args
, **kwargs
)
9448 def Show(*args
, **kwargs
):
9450 Show(self, item, bool show=True, bool recursive=false) -> bool
9452 Shows or hides an item managed by the sizer. To make a sizer item
9453 disappear or reappear, use Show followed by `Layout`. The *item*
9454 parameter can be either a window, a sizer, or the zero-based index of
9455 the item. Use the recursive parameter to show or hide an item in a
9456 subsizer. Returns True if the item was found.
9458 return _core_
.Sizer_Show(*args
, **kwargs
)
9460 def IsShown(*args
, **kwargs
):
9464 Determines if the item is currently shown. sizer. To make a sizer
9465 item disappear or reappear, use Show followed by `Layout`. The *item*
9466 parameter can be either a window, a sizer, or the zero-based index of
9469 return _core_
.Sizer_IsShown(*args
, **kwargs
)
9471 def Hide(self
, item
, recursive
=False):
9473 A convenience method for Show(item, False, recursive).
9475 return self
.Show(item
, False, recursive
)
9477 def ShowItems(*args
, **kwargs
):
9479 ShowItems(self, bool show)
9481 Recursively call `wx.SizerItem.Show` on all sizer items.
9483 return _core_
.Sizer_ShowItems(*args
, **kwargs
)
9486 class SizerPtr(Sizer
):
9487 def __init__(self
, this
):
9489 if not hasattr(self
,"thisown"): self
.thisown
= 0
9490 self
.__class
__ = Sizer
9491 _core_
.Sizer_swigregister(SizerPtr
)
9493 class PySizer(Sizer
):
9495 wx.PySizer is a special version of `wx.Sizer` that has been
9496 instrumented to allow the C++ virtual methods to be overloaded in
9497 Python derived classes. You would derive from this class if you are
9498 wanting to implement a custom sizer in Python code. Simply implement
9499 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9502 class MySizer(wx.PySizer):
9504 wx.PySizer.__init__(self)
9507 for item in self.GetChildren():
9508 # calculate the total minimum width and height needed
9509 # by all items in the sizer according to this sizer's
9512 return wx.Size(width, height)
9514 def RecalcSizes(self):
9515 # find the space allotted to this sizer
9516 pos = self.GetPosition()
9517 size = self.GetSize()
9518 for item in self.GetChildren():
9519 # Recalculate (if necessary) the position and size of
9520 # each item and then call item.SetDimension to do the
9521 # actual positioning and sizing of the items within the
9522 # space alloted to this sizer.
9524 item.SetDimension(itemPos, itemSize)
9527 When `Layout` is called it first calls `CalcMin` followed by
9528 `RecalcSizes` so you can optimize a bit by saving the results of
9529 `CalcMin` and resuing them in `RecalcSizes`.
9531 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9536 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9537 def __init__(self
, *args
, **kwargs
):
9539 __init__(self) -> PySizer
9541 Creates a wx.PySizer. Must be called from the __init__ in the derived
9544 newobj
= _core_
.new_PySizer(*args
, **kwargs
)
9545 self
.this
= newobj
.this
9548 self
._setCallbackInfo
(self
, PySizer
);self
._setOORInfo
(self
)
9550 def _setCallbackInfo(*args
, **kwargs
):
9551 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9552 return _core_
.PySizer__setCallbackInfo(*args
, **kwargs
)
9555 class PySizerPtr(PySizer
):
9556 def __init__(self
, this
):
9558 if not hasattr(self
,"thisown"): self
.thisown
= 0
9559 self
.__class
__ = PySizer
9560 _core_
.PySizer_swigregister(PySizerPtr
)
9562 #---------------------------------------------------------------------------
9564 class BoxSizer(Sizer
):
9566 The basic idea behind a box sizer is that windows will most often be
9567 laid out in rather simple basic geometry, typically in a row or a
9568 column or nested hierarchies of either. A wx.BoxSizer will lay out
9569 its items in a simple row or column, depending on the orientation
9570 parameter passed to the constructor.
9573 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9574 def __init__(self
, *args
, **kwargs
):
9576 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9578 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9579 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9582 newobj
= _core_
.new_BoxSizer(*args
, **kwargs
)
9583 self
.this
= newobj
.this
9586 self
._setOORInfo
(self
)
9588 def GetOrientation(*args
, **kwargs
):
9590 GetOrientation(self) -> int
9592 Returns the current orientation of the sizer.
9594 return _core_
.BoxSizer_GetOrientation(*args
, **kwargs
)
9596 def SetOrientation(*args
, **kwargs
):
9598 SetOrientation(self, int orient)
9600 Resets the orientation of the sizer.
9602 return _core_
.BoxSizer_SetOrientation(*args
, **kwargs
)
9605 class BoxSizerPtr(BoxSizer
):
9606 def __init__(self
, this
):
9608 if not hasattr(self
,"thisown"): self
.thisown
= 0
9609 self
.__class
__ = BoxSizer
9610 _core_
.BoxSizer_swigregister(BoxSizerPtr
)
9612 #---------------------------------------------------------------------------
9614 class StaticBoxSizer(BoxSizer
):
9616 wx.StaticBoxSizer derives from and functions identically to the
9617 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9618 manages. Note that this static box must be created separately and
9619 passed to the sizer constructor.
9622 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9623 def __init__(self
, *args
, **kwargs
):
9625 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9627 Constructor. It takes an associated static box and the orientation
9628 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9631 newobj
= _core_
.new_StaticBoxSizer(*args
, **kwargs
)
9632 self
.this
= newobj
.this
9635 self
._setOORInfo
(self
)
9637 def GetStaticBox(*args
, **kwargs
):
9639 GetStaticBox(self) -> StaticBox
9641 Returns the static box associated with this sizer.
9643 return _core_
.StaticBoxSizer_GetStaticBox(*args
, **kwargs
)
9646 class StaticBoxSizerPtr(StaticBoxSizer
):
9647 def __init__(self
, this
):
9649 if not hasattr(self
,"thisown"): self
.thisown
= 0
9650 self
.__class
__ = StaticBoxSizer
9651 _core_
.StaticBoxSizer_swigregister(StaticBoxSizerPtr
)
9653 #---------------------------------------------------------------------------
9655 class GridSizer(Sizer
):
9657 A grid sizer is a sizer which lays out its children in a
9658 two-dimensional table with all cells having the same size. In other
9659 words, the width of each cell within the grid is the width of the
9660 widest item added to the sizer and the height of each grid cell is the
9661 height of the tallest item. An optional vertical and/or horizontal
9662 gap between items can also be specified (in pixels.)
9664 Items are placed in the cells of the grid in the order they are added,
9665 in row-major order. In other words, the first row is filled first,
9666 then the second, and so on until all items have been added. (If
9667 neccessary, additional rows will be added as items are added.) If you
9668 need to have greater control over the cells that items are placed in
9669 then use the `wx.GridBagSizer`.
9673 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9674 def __init__(self
, *args
, **kwargs
):
9676 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9678 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9679 of columns and rows in the sizer - if either of the parameters is
9680 zero, it will be calculated to from the total number of children in
9681 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9682 define extra space between all children.
9684 newobj
= _core_
.new_GridSizer(*args
, **kwargs
)
9685 self
.this
= newobj
.this
9688 self
._setOORInfo
(self
)
9690 def SetCols(*args
, **kwargs
):
9692 SetCols(self, int cols)
9694 Sets the number of columns in the sizer.
9696 return _core_
.GridSizer_SetCols(*args
, **kwargs
)
9698 def SetRows(*args
, **kwargs
):
9700 SetRows(self, int rows)
9702 Sets the number of rows in the sizer.
9704 return _core_
.GridSizer_SetRows(*args
, **kwargs
)
9706 def SetVGap(*args
, **kwargs
):
9708 SetVGap(self, int gap)
9710 Sets the vertical gap (in pixels) between the cells in the sizer.
9712 return _core_
.GridSizer_SetVGap(*args
, **kwargs
)
9714 def SetHGap(*args
, **kwargs
):
9716 SetHGap(self, int gap)
9718 Sets the horizontal gap (in pixels) between cells in the sizer
9720 return _core_
.GridSizer_SetHGap(*args
, **kwargs
)
9722 def GetCols(*args
, **kwargs
):
9724 GetCols(self) -> int
9726 Returns the number of columns in the sizer.
9728 return _core_
.GridSizer_GetCols(*args
, **kwargs
)
9730 def GetRows(*args
, **kwargs
):
9732 GetRows(self) -> int
9734 Returns the number of rows in the sizer.
9736 return _core_
.GridSizer_GetRows(*args
, **kwargs
)
9738 def GetVGap(*args
, **kwargs
):
9740 GetVGap(self) -> int
9742 Returns the vertical gap (in pixels) between the cells in the sizer.
9744 return _core_
.GridSizer_GetVGap(*args
, **kwargs
)
9746 def GetHGap(*args
, **kwargs
):
9748 GetHGap(self) -> int
9750 Returns the horizontal gap (in pixels) between cells in the sizer.
9752 return _core_
.GridSizer_GetHGap(*args
, **kwargs
)
9755 class GridSizerPtr(GridSizer
):
9756 def __init__(self
, this
):
9758 if not hasattr(self
,"thisown"): self
.thisown
= 0
9759 self
.__class
__ = GridSizer
9760 _core_
.GridSizer_swigregister(GridSizerPtr
)
9762 #---------------------------------------------------------------------------
9764 FLEX_GROWMODE_NONE
= _core_
.FLEX_GROWMODE_NONE
9765 FLEX_GROWMODE_SPECIFIED
= _core_
.FLEX_GROWMODE_SPECIFIED
9766 FLEX_GROWMODE_ALL
= _core_
.FLEX_GROWMODE_ALL
9767 class FlexGridSizer(GridSizer
):
9769 A flex grid sizer is a sizer which lays out its children in a
9770 two-dimensional table with all table cells in one row having the same
9771 height and all cells in one column having the same width, but all
9772 rows or all columns are not necessarily the same height or width as in
9775 wx.FlexGridSizer can also size items equally in one direction but
9776 unequally ("flexibly") in the other. If the sizer is only flexible
9777 in one direction (this can be changed using `SetFlexibleDirection`), it
9778 needs to be decided how the sizer should grow in the other ("non
9779 flexible") direction in order to fill the available space. The
9780 `SetNonFlexibleGrowMode` method serves this purpose.
9785 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9786 def __init__(self
, *args
, **kwargs
):
9788 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9790 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9791 number of columns and rows in the sizer - if either of the parameters
9792 is zero, it will be calculated to from the total number of children in
9793 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9794 define extra space between all children.
9796 newobj
= _core_
.new_FlexGridSizer(*args
, **kwargs
)
9797 self
.this
= newobj
.this
9800 self
._setOORInfo
(self
)
9802 def AddGrowableRow(*args
, **kwargs
):
9804 AddGrowableRow(self, size_t idx, int proportion=0)
9806 Specifies that row *idx* (starting from zero) should be grown if there
9807 is extra space available to the sizer.
9809 The *proportion* parameter has the same meaning as the stretch factor
9810 for the box sizers except that if all proportions are 0, then all
9811 columns are resized equally (instead of not being resized at all).
9813 return _core_
.FlexGridSizer_AddGrowableRow(*args
, **kwargs
)
9815 def RemoveGrowableRow(*args
, **kwargs
):
9817 RemoveGrowableRow(self, size_t idx)
9819 Specifies that row *idx* is no longer growable.
9821 return _core_
.FlexGridSizer_RemoveGrowableRow(*args
, **kwargs
)
9823 def AddGrowableCol(*args
, **kwargs
):
9825 AddGrowableCol(self, size_t idx, int proportion=0)
9827 Specifies that column *idx* (starting from zero) should be grown if
9828 there is extra space available to the sizer.
9830 The *proportion* parameter has the same meaning as the stretch factor
9831 for the box sizers except that if all proportions are 0, then all
9832 columns are resized equally (instead of not being resized at all).
9834 return _core_
.FlexGridSizer_AddGrowableCol(*args
, **kwargs
)
9836 def RemoveGrowableCol(*args
, **kwargs
):
9838 RemoveGrowableCol(self, size_t idx)
9840 Specifies that column *idx* is no longer growable.
9842 return _core_
.FlexGridSizer_RemoveGrowableCol(*args
, **kwargs
)
9844 def SetFlexibleDirection(*args
, **kwargs
):
9846 SetFlexibleDirection(self, int direction)
9848 Specifies whether the sizer should flexibly resize its columns, rows,
9849 or both. Argument *direction* can be one of the following values. Any
9850 other value is ignored.
9852 ============== =======================================
9853 wx.VERTICAL Rows are flexibly sized.
9854 wx.HORIZONTAL Columns are flexibly sized.
9855 wx.BOTH Both rows and columns are flexibly sized
9856 (this is the default value).
9857 ============== =======================================
9859 Note that this method does not trigger relayout.
9862 return _core_
.FlexGridSizer_SetFlexibleDirection(*args
, **kwargs
)
9864 def GetFlexibleDirection(*args
, **kwargs
):
9866 GetFlexibleDirection(self) -> int
9868 Returns a value that specifies whether the sizer
9869 flexibly resizes its columns, rows, or both (default).
9871 :see: `SetFlexibleDirection`
9873 return _core_
.FlexGridSizer_GetFlexibleDirection(*args
, **kwargs
)
9875 def SetNonFlexibleGrowMode(*args
, **kwargs
):
9877 SetNonFlexibleGrowMode(self, int mode)
9879 Specifies how the sizer should grow in the non-flexible direction if
9880 there is one (so `SetFlexibleDirection` must have been called
9881 previously). Argument *mode* can be one of the following values:
9883 ========================== =================================================
9884 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
9885 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
9886 `AddGrowableCol` and `AddGrowableRow`. In this
9887 case equal sizing applies to minimum sizes of
9888 columns or rows (this is the default value).
9889 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
9890 the non flexible direction, whether they are
9891 growable or not in the flexbile direction.
9892 ========================== =================================================
9894 Note that this method does not trigger relayout.
9898 return _core_
.FlexGridSizer_SetNonFlexibleGrowMode(*args
, **kwargs
)
9900 def GetNonFlexibleGrowMode(*args
, **kwargs
):
9902 GetNonFlexibleGrowMode(self) -> int
9904 Returns the value that specifies how the sizer grows in the
9905 non-flexible direction if there is one.
9907 :see: `SetNonFlexibleGrowMode`
9909 return _core_
.FlexGridSizer_GetNonFlexibleGrowMode(*args
, **kwargs
)
9911 def GetRowHeights(*args
, **kwargs
):
9913 GetRowHeights(self) -> list
9915 Returns a list of integers representing the heights of each of the
9918 return _core_
.FlexGridSizer_GetRowHeights(*args
, **kwargs
)
9920 def GetColWidths(*args
, **kwargs
):
9922 GetColWidths(self) -> list
9924 Returns a list of integers representing the widths of each of the
9925 columns in the sizer.
9927 return _core_
.FlexGridSizer_GetColWidths(*args
, **kwargs
)
9930 class FlexGridSizerPtr(FlexGridSizer
):
9931 def __init__(self
, this
):
9933 if not hasattr(self
,"thisown"): self
.thisown
= 0
9934 self
.__class
__ = FlexGridSizer
9935 _core_
.FlexGridSizer_swigregister(FlexGridSizerPtr
)
9937 #---------------------------------------------------------------------------
9939 class GBPosition(object):
9941 This class represents the position of an item in a virtual grid of
9942 rows and columns managed by a `wx.GridBagSizer`. wxPython has
9943 typemaps that will automatically convert from a 2-element sequence of
9944 integers to a wx.GBPosition, so you can use the more pythonic
9945 representation of the position nearly transparently in Python code.
9948 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
9949 def __init__(self
, *args
, **kwargs
):
9951 __init__(self, int row=0, int col=0) -> GBPosition
9953 This class represents the position of an item in a virtual grid of
9954 rows and columns managed by a `wx.GridBagSizer`. wxPython has
9955 typemaps that will automatically convert from a 2-element sequence of
9956 integers to a wx.GBPosition, so you can use the more pythonic
9957 representation of the position nearly transparently in Python code.
9959 newobj
= _core_
.new_GBPosition(*args
, **kwargs
)
9960 self
.this
= newobj
.this
9963 def GetRow(*args
, **kwargs
):
9964 """GetRow(self) -> int"""
9965 return _core_
.GBPosition_GetRow(*args
, **kwargs
)
9967 def GetCol(*args
, **kwargs
):
9968 """GetCol(self) -> int"""
9969 return _core_
.GBPosition_GetCol(*args
, **kwargs
)
9971 def SetRow(*args
, **kwargs
):
9972 """SetRow(self, int row)"""
9973 return _core_
.GBPosition_SetRow(*args
, **kwargs
)
9975 def SetCol(*args
, **kwargs
):
9976 """SetCol(self, int col)"""
9977 return _core_
.GBPosition_SetCol(*args
, **kwargs
)
9979 def __eq__(*args
, **kwargs
):
9980 """__eq__(self, GBPosition other) -> bool"""
9981 return _core_
.GBPosition___eq__(*args
, **kwargs
)
9983 def __ne__(*args
, **kwargs
):
9984 """__ne__(self, GBPosition other) -> bool"""
9985 return _core_
.GBPosition___ne__(*args
, **kwargs
)
9987 def Set(*args
, **kwargs
):
9988 """Set(self, int row=0, int col=0)"""
9989 return _core_
.GBPosition_Set(*args
, **kwargs
)
9991 def Get(*args
, **kwargs
):
9992 """Get(self) -> PyObject"""
9993 return _core_
.GBPosition_Get(*args
, **kwargs
)
9995 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
9996 def __str__(self
): return str(self
.Get())
9997 def __repr__(self
): return 'wx.GBPosition'+str(self
.Get())
9998 def __len__(self
): return len(self
.Get())
9999 def __getitem__(self
, index
): return self
.Get()[index
]
10000 def __setitem__(self
, index
, val
):
10001 if index
== 0: self
.SetRow(val
)
10002 elif index
== 1: self
.SetCol(val
)
10003 else: raise IndexError
10004 def __nonzero__(self
): return self
.Get() != (0,0)
10005 __safe_for_unpickling__
= True
10006 def __reduce__(self
): return (wx
.GBPosition
, self
.Get())
10008 row
= property(GetRow
, SetRow
)
10009 col
= property(GetCol
, SetCol
)
10012 class GBPositionPtr(GBPosition
):
10013 def __init__(self
, this
):
10015 if not hasattr(self
,"thisown"): self
.thisown
= 0
10016 self
.__class
__ = GBPosition
10017 _core_
.GBPosition_swigregister(GBPositionPtr
)
10019 class GBSpan(object):
10021 This class is used to hold the row and column spanning attributes of
10022 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10023 automatically convert from a 2-element sequence of integers to a
10024 wx.GBSpan, so you can use the more pythonic representation of the span
10025 nearly transparently in Python code.
10028 def __repr__(self
):
10029 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10030 def __init__(self
, *args
, **kwargs
):
10032 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10034 Construct a new wxGBSpan, optionally setting the rowspan and
10035 colspan. The default is (1,1). (Meaning that the item occupies one
10036 cell in each direction.
10038 newobj
= _core_
.new_GBSpan(*args
, **kwargs
)
10039 self
.this
= newobj
.this
10042 def GetRowspan(*args
, **kwargs
):
10043 """GetRowspan(self) -> int"""
10044 return _core_
.GBSpan_GetRowspan(*args
, **kwargs
)
10046 def GetColspan(*args
, **kwargs
):
10047 """GetColspan(self) -> int"""
10048 return _core_
.GBSpan_GetColspan(*args
, **kwargs
)
10050 def SetRowspan(*args
, **kwargs
):
10051 """SetRowspan(self, int rowspan)"""
10052 return _core_
.GBSpan_SetRowspan(*args
, **kwargs
)
10054 def SetColspan(*args
, **kwargs
):
10055 """SetColspan(self, int colspan)"""
10056 return _core_
.GBSpan_SetColspan(*args
, **kwargs
)
10058 def __eq__(*args
, **kwargs
):
10059 """__eq__(self, GBSpan other) -> bool"""
10060 return _core_
.GBSpan___eq__(*args
, **kwargs
)
10062 def __ne__(*args
, **kwargs
):
10063 """__ne__(self, GBSpan other) -> bool"""
10064 return _core_
.GBSpan___ne__(*args
, **kwargs
)
10066 def Set(*args
, **kwargs
):
10067 """Set(self, int rowspan=1, int colspan=1)"""
10068 return _core_
.GBSpan_Set(*args
, **kwargs
)
10070 def Get(*args
, **kwargs
):
10071 """Get(self) -> PyObject"""
10072 return _core_
.GBSpan_Get(*args
, **kwargs
)
10074 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
10075 def __str__(self
): return str(self
.Get())
10076 def __repr__(self
): return 'wx.GBSpan'+str(self
.Get())
10077 def __len__(self
): return len(self
.Get())
10078 def __getitem__(self
, index
): return self
.Get()[index
]
10079 def __setitem__(self
, index
, val
):
10080 if index
== 0: self
.SetRowspan(val
)
10081 elif index
== 1: self
.SetColspan(val
)
10082 else: raise IndexError
10083 def __nonzero__(self
): return self
.Get() != (0,0)
10084 __safe_for_unpickling__
= True
10085 def __reduce__(self
): return (wx
.GBSpan
, self
.Get())
10087 rowspan
= property(GetRowspan
, SetRowspan
)
10088 colspan
= property(GetColspan
, SetColspan
)
10091 class GBSpanPtr(GBSpan
):
10092 def __init__(self
, this
):
10094 if not hasattr(self
,"thisown"): self
.thisown
= 0
10095 self
.__class
__ = GBSpan
10096 _core_
.GBSpan_swigregister(GBSpanPtr
)
10098 class GBSizerItem(SizerItem
):
10100 The wx.GBSizerItem class is used to track the additional data about
10101 items in a `wx.GridBagSizer` such as the item's position in the grid
10102 and how many rows or columns it spans.
10105 def __repr__(self
):
10106 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10107 def __init__(self
, *args
, **kwargs
):
10109 __init__(self) -> GBSizerItem
10111 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10112 size will need to be set, as well as a position and span before this
10113 item can be used in a Sizer.
10115 You will probably never need to create a wx.GBSizerItem directly as they
10116 are created automatically when the sizer's Add method is called.
10118 newobj
= _core_
.new_GBSizerItem(*args
, **kwargs
)
10119 self
.this
= newobj
.this
10122 def GetPos(*args
, **kwargs
):
10124 GetPos(self) -> GBPosition
10126 Get the grid position of the item
10128 return _core_
.GBSizerItem_GetPos(*args
, **kwargs
)
10130 def GetPosTuple(self
): return self
.GetPos().Get()
10131 def GetSpan(*args
, **kwargs
):
10133 GetSpan(self) -> GBSpan
10135 Get the row and column spanning of the item
10137 return _core_
.GBSizerItem_GetSpan(*args
, **kwargs
)
10139 def GetSpanTuple(self
): return self
.GetSpan().Get()
10140 def SetPos(*args
, **kwargs
):
10142 SetPos(self, GBPosition pos) -> bool
10144 If the item is already a member of a sizer then first ensure that
10145 there is no other item that would intersect with this one at the new
10146 position, then set the new position. Returns True if the change is
10147 successful and after the next Layout() the item will be moved.
10149 return _core_
.GBSizerItem_SetPos(*args
, **kwargs
)
10151 def SetSpan(*args
, **kwargs
):
10153 SetSpan(self, GBSpan span) -> bool
10155 If the item is already a member of a sizer then first ensure that
10156 there is no other item that would intersect with this one with its new
10157 spanning size, then set the new spanning. Returns True if the change
10158 is successful and after the next Layout() the item will be resized.
10161 return _core_
.GBSizerItem_SetSpan(*args
, **kwargs
)
10163 def Intersects(*args
, **kwargs
):
10165 Intersects(self, GBSizerItem other) -> bool
10167 Returns True if this item and the other item instersect.
10169 return _core_
.GBSizerItem_Intersects(*args
, **kwargs
)
10171 def IntersectsPos(*args
, **kwargs
):
10173 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10175 Returns True if the given pos/span would intersect with this item.
10177 return _core_
.GBSizerItem_IntersectsPos(*args
, **kwargs
)
10179 def GetEndPos(*args
, **kwargs
):
10181 GetEndPos(self) -> GBPosition
10183 Get the row and column of the endpoint of this item.
10185 return _core_
.GBSizerItem_GetEndPos(*args
, **kwargs
)
10187 def GetGBSizer(*args
, **kwargs
):
10189 GetGBSizer(self) -> GridBagSizer
10191 Get the sizer this item is a member of.
10193 return _core_
.GBSizerItem_GetGBSizer(*args
, **kwargs
)
10195 def SetGBSizer(*args
, **kwargs
):
10197 SetGBSizer(self, GridBagSizer sizer)
10199 Set the sizer this item is a member of.
10201 return _core_
.GBSizerItem_SetGBSizer(*args
, **kwargs
)
10204 class GBSizerItemPtr(GBSizerItem
):
10205 def __init__(self
, this
):
10207 if not hasattr(self
,"thisown"): self
.thisown
= 0
10208 self
.__class
__ = GBSizerItem
10209 _core_
.GBSizerItem_swigregister(GBSizerItemPtr
)
10210 DefaultSpan
= cvar
.DefaultSpan
10212 def GBSizerItemWindow(*args
, **kwargs
):
10214 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10215 int border, PyObject userData=None) -> GBSizerItem
10217 Construct a `wx.GBSizerItem` for a window.
10219 val
= _core_
.new_GBSizerItemWindow(*args
, **kwargs
)
10223 def GBSizerItemSizer(*args
, **kwargs
):
10225 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10226 int border, PyObject userData=None) -> GBSizerItem
10228 Construct a `wx.GBSizerItem` for a sizer
10230 val
= _core_
.new_GBSizerItemSizer(*args
, **kwargs
)
10234 def GBSizerItemSpacer(*args
, **kwargs
):
10236 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10237 int flag, int border, PyObject userData=None) -> GBSizerItem
10239 Construct a `wx.GBSizerItem` for a spacer.
10241 val
= _core_
.new_GBSizerItemSpacer(*args
, **kwargs
)
10245 class GridBagSizer(FlexGridSizer
):
10247 A `wx.Sizer` that can lay out items in a virtual grid like a
10248 `wx.FlexGridSizer` but in this case explicit positioning of the items
10249 is allowed using `wx.GBPosition`, and items can optionally span more
10250 than one row and/or column using `wx.GBSpan`. The total size of the
10251 virtual grid is determined by the largest row and column that items are
10252 positioned at, adjusted for spanning.
10255 def __repr__(self
):
10256 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10257 def __init__(self
, *args
, **kwargs
):
10259 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10261 Constructor, with optional parameters to specify the gap between the
10264 newobj
= _core_
.new_GridBagSizer(*args
, **kwargs
)
10265 self
.this
= newobj
.this
10268 def Add(*args
, **kwargs
):
10270 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10271 int border=0, userData=None) -> wx.GBSizerItem
10273 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10274 more than one row or column as specified with *span*. The remaining
10275 args behave similarly to `wx.Sizer.Add`.
10277 Returns True if the item was successfully placed at the given cell
10278 position, False if something was already there.
10281 return _core_
.GridBagSizer_Add(*args
, **kwargs
)
10283 def AddItem(*args
, **kwargs
):
10285 Add(self, GBSizerItem item) -> wx.GBSizerItem
10287 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10288 the item was successfully placed at its given cell position, False if
10289 something was already there.
10291 return _core_
.GridBagSizer_AddItem(*args
, **kwargs
)
10293 def GetCellSize(*args
, **kwargs
):
10295 GetCellSize(self, int row, int col) -> Size
10297 Get the size of the specified cell, including hgap and
10298 vgap. Only valid after a Layout.
10300 return _core_
.GridBagSizer_GetCellSize(*args
, **kwargs
)
10302 def GetEmptyCellSize(*args
, **kwargs
):
10304 GetEmptyCellSize(self) -> Size
10306 Get the size used for cells in the grid with no item.
10308 return _core_
.GridBagSizer_GetEmptyCellSize(*args
, **kwargs
)
10310 def SetEmptyCellSize(*args
, **kwargs
):
10312 SetEmptyCellSize(self, Size sz)
10314 Set the size used for cells in the grid with no item.
10316 return _core_
.GridBagSizer_SetEmptyCellSize(*args
, **kwargs
)
10318 def GetItemPosition(*args
):
10320 GetItemPosition(self, item) -> GBPosition
10322 Get the grid position of the specified *item* where *item* is either a
10323 window or subsizer that is a member of this sizer, or a zero-based
10326 return _core_
.GridBagSizer_GetItemPosition(*args
)
10328 def SetItemPosition(*args
):
10330 SetItemPosition(self, item, GBPosition pos) -> bool
10332 Set the grid position of the specified *item* where *item* is either a
10333 window or subsizer that is a member of this sizer, or a zero-based
10334 index of an item. Returns True on success. If the move is not
10335 allowed (because an item is already there) then False is returned.
10338 return _core_
.GridBagSizer_SetItemPosition(*args
)
10340 def GetItemSpan(*args
):
10342 GetItemSpan(self, item) -> GBSpan
10344 Get the row/col spanning of the specified *item* where *item* is
10345 either a window or subsizer that is a member of this sizer, or a
10346 zero-based index of an item.
10348 return _core_
.GridBagSizer_GetItemSpan(*args
)
10350 def SetItemSpan(*args
):
10352 SetItemSpan(self, item, GBSpan span) -> bool
10354 Set the row/col spanning of the specified *item* where *item* is
10355 either a window or subsizer that is a member of this sizer, or a
10356 zero-based index of an item. Returns True on success. If the move is
10357 not allowed (because an item is already there) then False is returned.
10359 return _core_
.GridBagSizer_SetItemSpan(*args
)
10361 def FindItem(*args
):
10363 FindItem(self, item) -> GBSizerItem
10365 Find the sizer item for the given window or subsizer, returns None if
10366 not found. (non-recursive)
10368 return _core_
.GridBagSizer_FindItem(*args
)
10370 def FindItemAtPosition(*args
, **kwargs
):
10372 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10374 Return the sizer item for the given grid cell, or None if there is no
10375 item at that position. (non-recursive)
10377 return _core_
.GridBagSizer_FindItemAtPosition(*args
, **kwargs
)
10379 def FindItemAtPoint(*args
, **kwargs
):
10381 FindItemAtPoint(self, Point pt) -> GBSizerItem
10383 Return the sizer item located at the point given in *pt*, or None if
10384 there is no item at that point. The (x,y) coordinates in pt correspond
10385 to the client coordinates of the window using the sizer for
10386 layout. (non-recursive)
10388 return _core_
.GridBagSizer_FindItemAtPoint(*args
, **kwargs
)
10390 def CheckForIntersection(*args
, **kwargs
):
10392 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10394 Look at all items and see if any intersect (or would overlap) the
10395 given *item*. Returns True if so, False if there would be no overlap.
10396 If an *excludeItem* is given then it will not be checked for
10397 intersection, for example it may be the item we are checking the
10401 return _core_
.GridBagSizer_CheckForIntersection(*args
, **kwargs
)
10403 def CheckForIntersectionPos(*args
, **kwargs
):
10405 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10407 Look at all items and see if any intersect (or would overlap) the
10408 given position and span. Returns True if so, False if there would be
10409 no overlap. If an *excludeItem* is given then it will not be checked
10410 for intersection, for example it may be the item we are checking the
10413 return _core_
.GridBagSizer_CheckForIntersectionPos(*args
, **kwargs
)
10416 class GridBagSizerPtr(GridBagSizer
):
10417 def __init__(self
, this
):
10419 if not hasattr(self
,"thisown"): self
.thisown
= 0
10420 self
.__class
__ = GridBagSizer
10421 _core_
.GridBagSizer_swigregister(GridBagSizerPtr
)
10423 #---------------------------------------------------------------------------
10427 Right
= _core_
.Right
10428 Bottom
= _core_
.Bottom
10429 Width
= _core_
.Width
10430 Height
= _core_
.Height
10431 Centre
= _core_
.Centre
10432 Center
= _core_
.Center
10433 CentreX
= _core_
.CentreX
10434 CentreY
= _core_
.CentreY
10435 Unconstrained
= _core_
.Unconstrained
10437 PercentOf
= _core_
.PercentOf
10438 Above
= _core_
.Above
10439 Below
= _core_
.Below
10440 LeftOf
= _core_
.LeftOf
10441 RightOf
= _core_
.RightOf
10442 SameAs
= _core_
.SameAs
10443 Absolute
= _core_
.Absolute
10444 class IndividualLayoutConstraint(Object
):
10446 Objects of this class are stored in the `wx.LayoutConstraints` class as
10447 one of eight possible constraints that a window can be involved in.
10448 You will never need to create an instance of
10449 wx.IndividualLayoutConstraint, rather you should create a
10450 `wx.LayoutConstraints` instance and use the individual contstraints
10453 def __init__(self
): raise RuntimeError, "No constructor defined"
10454 def __repr__(self
):
10455 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10456 def Set(*args
, **kwargs
):
10458 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10460 Sets the properties of the constraint. Normally called by one of the
10461 convenience functions such as Above, RightOf, SameAs.
10463 return _core_
.IndividualLayoutConstraint_Set(*args
, **kwargs
)
10465 def LeftOf(*args
, **kwargs
):
10467 LeftOf(self, Window sibling, int marg=0)
10469 Constrains this edge to be to the left of the given window, with an
10470 optional margin. Implicitly, this is relative to the left edge of the
10473 return _core_
.IndividualLayoutConstraint_LeftOf(*args
, **kwargs
)
10475 def RightOf(*args
, **kwargs
):
10477 RightOf(self, Window sibling, int marg=0)
10479 Constrains this edge to be to the right of the given window, with an
10480 optional margin. Implicitly, this is relative to the right edge of the
10483 return _core_
.IndividualLayoutConstraint_RightOf(*args
, **kwargs
)
10485 def Above(*args
, **kwargs
):
10487 Above(self, Window sibling, int marg=0)
10489 Constrains this edge to be above the given window, with an optional
10490 margin. Implicitly, this is relative to the top edge of the other
10493 return _core_
.IndividualLayoutConstraint_Above(*args
, **kwargs
)
10495 def Below(*args
, **kwargs
):
10497 Below(self, Window sibling, int marg=0)
10499 Constrains this edge to be below the given window, with an optional
10500 margin. Implicitly, this is relative to the bottom edge of the other
10503 return _core_
.IndividualLayoutConstraint_Below(*args
, **kwargs
)
10505 def SameAs(*args
, **kwargs
):
10507 SameAs(self, Window otherW, int edge, int marg=0)
10509 Constrains this edge or dimension to be to the same as the edge of the
10510 given window, with an optional margin.
10512 return _core_
.IndividualLayoutConstraint_SameAs(*args
, **kwargs
)
10514 def PercentOf(*args
, **kwargs
):
10516 PercentOf(self, Window otherW, int wh, int per)
10518 Constrains this edge or dimension to be to a percentage of the given
10519 window, with an optional margin.
10521 return _core_
.IndividualLayoutConstraint_PercentOf(*args
, **kwargs
)
10523 def Absolute(*args
, **kwargs
):
10525 Absolute(self, int val)
10527 Constrains this edge or dimension to be the given absolute value.
10529 return _core_
.IndividualLayoutConstraint_Absolute(*args
, **kwargs
)
10531 def Unconstrained(*args
, **kwargs
):
10533 Unconstrained(self)
10535 Sets this edge or dimension to be unconstrained, that is, dependent on
10536 other edges and dimensions from which this value can be deduced.
10538 return _core_
.IndividualLayoutConstraint_Unconstrained(*args
, **kwargs
)
10540 def AsIs(*args
, **kwargs
):
10544 Sets this edge or constraint to be whatever the window's value is at
10545 the moment. If either of the width and height constraints are *as is*,
10546 the window will not be resized, but moved instead. This is important
10547 when considering panel items which are intended to have a default
10548 size, such as a button, which may take its size from the size of the
10551 return _core_
.IndividualLayoutConstraint_AsIs(*args
, **kwargs
)
10553 def GetOtherWindow(*args
, **kwargs
):
10554 """GetOtherWindow(self) -> Window"""
10555 return _core_
.IndividualLayoutConstraint_GetOtherWindow(*args
, **kwargs
)
10557 def GetMyEdge(*args
, **kwargs
):
10558 """GetMyEdge(self) -> int"""
10559 return _core_
.IndividualLayoutConstraint_GetMyEdge(*args
, **kwargs
)
10561 def SetEdge(*args
, **kwargs
):
10562 """SetEdge(self, int which)"""
10563 return _core_
.IndividualLayoutConstraint_SetEdge(*args
, **kwargs
)
10565 def SetValue(*args
, **kwargs
):
10566 """SetValue(self, int v)"""
10567 return _core_
.IndividualLayoutConstraint_SetValue(*args
, **kwargs
)
10569 def GetMargin(*args
, **kwargs
):
10570 """GetMargin(self) -> int"""
10571 return _core_
.IndividualLayoutConstraint_GetMargin(*args
, **kwargs
)
10573 def SetMargin(*args
, **kwargs
):
10574 """SetMargin(self, int m)"""
10575 return _core_
.IndividualLayoutConstraint_SetMargin(*args
, **kwargs
)
10577 def GetValue(*args
, **kwargs
):
10578 """GetValue(self) -> int"""
10579 return _core_
.IndividualLayoutConstraint_GetValue(*args
, **kwargs
)
10581 def GetPercent(*args
, **kwargs
):
10582 """GetPercent(self) -> int"""
10583 return _core_
.IndividualLayoutConstraint_GetPercent(*args
, **kwargs
)
10585 def GetOtherEdge(*args
, **kwargs
):
10586 """GetOtherEdge(self) -> int"""
10587 return _core_
.IndividualLayoutConstraint_GetOtherEdge(*args
, **kwargs
)
10589 def GetDone(*args
, **kwargs
):
10590 """GetDone(self) -> bool"""
10591 return _core_
.IndividualLayoutConstraint_GetDone(*args
, **kwargs
)
10593 def SetDone(*args
, **kwargs
):
10594 """SetDone(self, bool d)"""
10595 return _core_
.IndividualLayoutConstraint_SetDone(*args
, **kwargs
)
10597 def GetRelationship(*args
, **kwargs
):
10598 """GetRelationship(self) -> int"""
10599 return _core_
.IndividualLayoutConstraint_GetRelationship(*args
, **kwargs
)
10601 def SetRelationship(*args
, **kwargs
):
10602 """SetRelationship(self, int r)"""
10603 return _core_
.IndividualLayoutConstraint_SetRelationship(*args
, **kwargs
)
10605 def ResetIfWin(*args
, **kwargs
):
10607 ResetIfWin(self, Window otherW) -> bool
10609 Reset constraint if it mentions otherWin
10611 return _core_
.IndividualLayoutConstraint_ResetIfWin(*args
, **kwargs
)
10613 def SatisfyConstraint(*args
, **kwargs
):
10615 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10617 Try to satisfy constraint
10619 return _core_
.IndividualLayoutConstraint_SatisfyConstraint(*args
, **kwargs
)
10621 def GetEdge(*args
, **kwargs
):
10623 GetEdge(self, int which, Window thisWin, Window other) -> int
10625 Get the value of this edge or dimension, or if this
10626 is not determinable, -1.
10628 return _core_
.IndividualLayoutConstraint_GetEdge(*args
, **kwargs
)
10631 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint
):
10632 def __init__(self
, this
):
10634 if not hasattr(self
,"thisown"): self
.thisown
= 0
10635 self
.__class
__ = IndividualLayoutConstraint
10636 _core_
.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr
)
10638 class LayoutConstraints(Object
):
10640 **Note:** constraints are now deprecated and you should use sizers
10643 Objects of this class can be associated with a window to define its
10644 layout constraints, with respect to siblings or its parent.
10646 The class consists of the following eight constraints of class
10647 wx.IndividualLayoutConstraint, some or all of which should be accessed
10648 directly to set the appropriate constraints.
10650 * left: represents the left hand edge of the window
10651 * right: represents the right hand edge of the window
10652 * top: represents the top edge of the window
10653 * bottom: represents the bottom edge of the window
10654 * width: represents the width of the window
10655 * height: represents the height of the window
10656 * centreX: represents the horizontal centre point of the window
10657 * centreY: represents the vertical centre point of the window
10659 Most constraints are initially set to have the relationship
10660 wxUnconstrained, which means that their values should be calculated by
10661 looking at known constraints. The exceptions are width and height,
10662 which are set to wxAsIs to ensure that if the user does not specify a
10663 constraint, the existing width and height will be used, to be
10664 compatible with panel items which often have take a default size. If
10665 the constraint is ``wx.AsIs``, the dimension will not be changed.
10667 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
10670 def __repr__(self
):
10671 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
10672 left
= property(_core_
.LayoutConstraints_left_get
)
10673 top
= property(_core_
.LayoutConstraints_top_get
)
10674 right
= property(_core_
.LayoutConstraints_right_get
)
10675 bottom
= property(_core_
.LayoutConstraints_bottom_get
)
10676 width
= property(_core_
.LayoutConstraints_width_get
)
10677 height
= property(_core_
.LayoutConstraints_height_get
)
10678 centreX
= property(_core_
.LayoutConstraints_centreX_get
)
10679 centreY
= property(_core_
.LayoutConstraints_centreY_get
)
10680 def __init__(self
, *args
, **kwargs
):
10681 """__init__(self) -> LayoutConstraints"""
10682 newobj
= _core_
.new_LayoutConstraints(*args
, **kwargs
)
10683 self
.this
= newobj
.this
10686 def SatisfyConstraints(*args
, **kwargs
):
10687 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
10688 return _core_
.LayoutConstraints_SatisfyConstraints(*args
, **kwargs
)
10690 def AreSatisfied(*args
, **kwargs
):
10691 """AreSatisfied(self) -> bool"""
10692 return _core_
.LayoutConstraints_AreSatisfied(*args
, **kwargs
)
10695 class LayoutConstraintsPtr(LayoutConstraints
):
10696 def __init__(self
, this
):
10698 if not hasattr(self
,"thisown"): self
.thisown
= 0
10699 self
.__class
__ = LayoutConstraints
10700 _core_
.LayoutConstraints_swigregister(LayoutConstraintsPtr
)
10702 #----------------------------------------------------------------------------
10704 # Use Python's bool constants if available, make some if not
10708 __builtins__
.True = 1==1
10709 __builtins__
.False = 1==0
10710 def bool(value
): return not not value
10711 __builtins__
.bool = bool
10715 # workarounds for bad wxRTTI names
10716 __wxPyPtrTypeMap
['wxGauge95'] = 'wxGauge'
10717 __wxPyPtrTypeMap
['wxSlider95'] = 'wxSlider'
10718 __wxPyPtrTypeMap
['wxStatusBar95'] = 'wxStatusBar'
10721 #----------------------------------------------------------------------------
10722 # Load version numbers from __version__... Ensure that major and minor
10723 # versions are the same for both wxPython and wxWidgets.
10725 from __version__
import *
10726 __version__
= VERSION_STRING
10728 assert MAJOR_VERSION
== _core_
.MAJOR_VERSION
, "wxPython/wxWidgets version mismatch"
10729 assert MINOR_VERSION
== _core_
.MINOR_VERSION
, "wxPython/wxWidgets version mismatch"
10730 if RELEASE_VERSION
!= _core_
.RELEASE_VERSION
:
10732 warnings
.warn("wxPython/wxWidgets release number mismatch")
10734 #----------------------------------------------------------------------------
10736 class PyDeadObjectError(AttributeError):
10739 class _wxPyDeadObject(object):
10741 Instances of wx objects that are OOR capable will have their __class__
10742 changed to this class when the C++ object is deleted. This should help
10743 prevent crashes due to referencing a bogus C++ pointer.
10745 reprStr
= "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
10746 attrStr
= "The C++ part of the %s object has been deleted, attribute access no longer allowed."
10748 def __repr__(self
):
10749 if not hasattr(self
, "_name"):
10750 self
._name
= "[unknown]"
10751 return self
.reprStr
% self
._name
10753 def __getattr__(self
, *args
):
10754 if not hasattr(self
, "_name"):
10755 self
._name
= "[unknown]"
10756 raise PyDeadObjectError(self
.attrStr
% self
._name
)
10758 def __nonzero__(self
):
10763 class PyUnbornObjectError(AttributeError):
10766 class _wxPyUnbornObject(object):
10768 Some stock objects are created when the wx._core module is
10769 imported, but their C++ instance is not created until the wx.App
10770 object is created and initialized. These object instances will
10771 temporarily have their __class__ changed to this class so an
10772 exception will be raised if they are used before the C++ instance
10776 reprStr
= "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
10777 attrStr
= "The C++ part of this object has not been initialized, attribute access not allowed."
10779 def __repr__(self
):
10780 #if not hasattr(self, "_name"):
10781 # self._name = "[unknown]"
10782 return self
.reprStr
#% self._name
10784 def __getattr__(self
, *args
):
10785 #if not hasattr(self, "_name"):
10786 # self._name = "[unknown]"
10787 raise PyUnbornObjectError(self
.attrStr
) # % self._name )
10789 def __nonzero__(self
):
10793 #----------------------------------------------------------------------------
10794 _wxPyCallAfterId
= None
10796 def CallAfter(callable, *args
, **kw
):
10798 Call the specified function after the current and pending event
10799 handlers have been completed. This is also good for making GUI
10800 method calls from non-GUI threads. Any extra positional or
10801 keyword args are passed on to the callable when it is called.
10803 :see: `wx.FutureCall`
10806 assert app
is not None, 'No wx.App created yet'
10808 global _wxPyCallAfterId
10809 if _wxPyCallAfterId
is None:
10810 _wxPyCallAfterId
= wx
.NewEventType()
10811 app
.Connect(-1, -1, _wxPyCallAfterId
,
10812 lambda event
: event
.callable(*event
.args
, **event
.kw
) )
10814 evt
.SetEventType(_wxPyCallAfterId
)
10815 evt
.callable = callable
10818 wx
.PostEvent(app
, evt
)
10821 #----------------------------------------------------------------------------
10826 A convenience class for wx.Timer, that calls the given callable
10827 object once after the given amount of milliseconds, passing any
10828 positional or keyword args. The return value of the callable is
10829 availbale after it has been run with the `GetResult` method.
10831 If you don't need to get the return value or restart the timer
10832 then there is no need to hold a reference to this object. It will
10833 hold a reference to itself while the timer is running (the timer
10834 has a reference to self.Notify) but the cycle will be broken when
10835 the timer completes, automatically cleaning up the wx.FutureCall
10838 :see: `wx.CallAfter`
10840 def __init__(self
, millis
, callable, *args
, **kwargs
):
10841 self
.millis
= millis
10842 self
.callable = callable
10843 self
.SetArgs(*args
, **kwargs
)
10845 self
.running
= False
10846 self
.hasRun
= False
10855 def Start(self
, millis
=None, *args
, **kwargs
):
10857 (Re)start the timer
10859 self
.hasRun
= False
10860 if millis
is not None:
10861 self
.millis
= millis
10863 self
.SetArgs(*args
, **kwargs
)
10865 self
.timer
= wx
.PyTimer(self
.Notify
)
10866 self
.timer
.Start(self
.millis
, wx
.TIMER_ONE_SHOT
)
10867 self
.running
= True
10873 Stop and destroy the timer.
10875 if self
.timer
is not None:
10880 def GetInterval(self
):
10881 if self
.timer
is not None:
10882 return self
.timer
.GetInterval()
10887 def IsRunning(self
):
10888 return self
.timer
is not None and self
.timer
.IsRunning()
10891 def SetArgs(self
, *args
, **kwargs
):
10893 (Re)set the args passed to the callable object. This is
10894 useful in conjunction with Restart if you want to schedule a
10895 new call to the same callable object but with different
10899 self
.kwargs
= kwargs
10905 def GetResult(self
):
10910 The timer has expired so call the callable.
10912 if self
.callable and getattr(self
.callable, 'im_self', True):
10914 self
.running
= False
10915 self
.result
= self
.callable(*self
.args
, **self
.kwargs
)
10917 if not self
.running
:
10918 # if it wasn't restarted, then cleanup
10919 wx
.CallAfter(self
.Stop
)
10923 #----------------------------------------------------------------------------
10924 # Control which items in this module should be documented by epydoc.
10925 # We allow only classes and functions, which will help reduce the size
10926 # of the docs by filtering out the zillions of constants, EVT objects,
10927 # and etc that don't make much sense by themselves, but are instead
10928 # documented (or will be) as part of the classes/functions/methods
10929 # where they should be used.
10933 A filter for epydoc that only allows non-Ptr classes and
10934 fucntions, in order to reduce the clutter in the API docs.
10936 def __init__(self
, globals):
10937 self
._globals
= globals
10939 def __call__(self
, name
):
10941 obj
= self
._globals
.get(name
, None)
10942 if type(obj
) not in [type, types
.ClassType
, types
.FunctionType
, types
.BuiltinFunctionType
]:
10944 if name
.startswith('_') or name
.endswith('Ptr') or name
.startswith('EVT'):
10948 #----------------------------------------------------------------------------
10949 #----------------------------------------------------------------------------
10951 # Import other modules in this package that should show up in the
10952 # "core" wx namespace
10954 from _windows
import *
10955 from _controls
import *
10956 from _misc
import *
10959 # Fixup the stock objects since they can't be used yet. (They will be
10960 # restored in wx.PyApp.OnInit.)
10961 _core_
._wxPyFixStockObjects
()
10963 #----------------------------------------------------------------------------
10964 #----------------------------------------------------------------------------