]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/mac/_core.py
Correct compilation error on Tiger
[wxWidgets.git] / wxPython / src / mac / _core.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _core_
5
6 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20 def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23 def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28 import types
29 try:
30 _object = types.ObjectType
31 _newclass = 1
32 except AttributeError:
33 class _object : pass
34 _newclass = 0
35 del types
36
37
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
47 #// Give a reference to the dictionary of this module to the C++ extension
48 #// code.
49 _core_._wxPySetDictionary(vars())
50
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
52 #// be used here.
53 import sys as _sys
54 wx = _sys.modules[__name__]
55
56
57 #----------------------------------------------------------------------------
58
59 def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74 #----------------------------------------------------------------------------
75
76 NOT_FOUND = _core_.NOT_FOUND
77 VSCROLL = _core_.VSCROLL
78 HSCROLL = _core_.HSCROLL
79 CAPTION = _core_.CAPTION
80 DOUBLE_BORDER = _core_.DOUBLE_BORDER
81 SUNKEN_BORDER = _core_.SUNKEN_BORDER
82 RAISED_BORDER = _core_.RAISED_BORDER
83 BORDER = _core_.BORDER
84 SIMPLE_BORDER = _core_.SIMPLE_BORDER
85 STATIC_BORDER = _core_.STATIC_BORDER
86 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87 NO_BORDER = _core_.NO_BORDER
88 DEFAULT_CONTROL_BORDER = _core_.DEFAULT_CONTROL_BORDER
89 DEFAULT_STATUSBAR_STYLE = _core_.DEFAULT_STATUSBAR_STYLE
90 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
91 WANTS_CHARS = _core_.WANTS_CHARS
92 POPUP_WINDOW = _core_.POPUP_WINDOW
93 CENTER_FRAME = _core_.CENTER_FRAME
94 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
95 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
96 CLIP_CHILDREN = _core_.CLIP_CHILDREN
97 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
98 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
99 RETAINED = _core_.RETAINED
100 BACKINGSTORE = _core_.BACKINGSTORE
101 COLOURED = _core_.COLOURED
102 FIXED_LENGTH = _core_.FIXED_LENGTH
103 LB_NEEDED_SB = _core_.LB_NEEDED_SB
104 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
105 LB_SORT = _core_.LB_SORT
106 LB_SINGLE = _core_.LB_SINGLE
107 LB_MULTIPLE = _core_.LB_MULTIPLE
108 LB_EXTENDED = _core_.LB_EXTENDED
109 LB_OWNERDRAW = _core_.LB_OWNERDRAW
110 LB_HSCROLL = _core_.LB_HSCROLL
111 PROCESS_ENTER = _core_.PROCESS_ENTER
112 PASSWORD = _core_.PASSWORD
113 CB_SIMPLE = _core_.CB_SIMPLE
114 CB_DROPDOWN = _core_.CB_DROPDOWN
115 CB_SORT = _core_.CB_SORT
116 CB_READONLY = _core_.CB_READONLY
117 RA_HORIZONTAL = _core_.RA_HORIZONTAL
118 RA_VERTICAL = _core_.RA_VERTICAL
119 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
120 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
121 RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
122 RB_GROUP = _core_.RB_GROUP
123 RB_SINGLE = _core_.RB_SINGLE
124 SB_HORIZONTAL = _core_.SB_HORIZONTAL
125 SB_VERTICAL = _core_.SB_VERTICAL
126 RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
127 ST_SIZEGRIP = _core_.ST_SIZEGRIP
128 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
129 FLOOD_SURFACE = _core_.FLOOD_SURFACE
130 FLOOD_BORDER = _core_.FLOOD_BORDER
131 ODDEVEN_RULE = _core_.ODDEVEN_RULE
132 WINDING_RULE = _core_.WINDING_RULE
133 TOOL_TOP = _core_.TOOL_TOP
134 TOOL_BOTTOM = _core_.TOOL_BOTTOM
135 TOOL_LEFT = _core_.TOOL_LEFT
136 TOOL_RIGHT = _core_.TOOL_RIGHT
137 OK = _core_.OK
138 YES_NO = _core_.YES_NO
139 CANCEL = _core_.CANCEL
140 YES = _core_.YES
141 NO = _core_.NO
142 NO_DEFAULT = _core_.NO_DEFAULT
143 YES_DEFAULT = _core_.YES_DEFAULT
144 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
145 ICON_HAND = _core_.ICON_HAND
146 ICON_QUESTION = _core_.ICON_QUESTION
147 ICON_INFORMATION = _core_.ICON_INFORMATION
148 ICON_STOP = _core_.ICON_STOP
149 ICON_ASTERISK = _core_.ICON_ASTERISK
150 ICON_MASK = _core_.ICON_MASK
151 ICON_WARNING = _core_.ICON_WARNING
152 ICON_ERROR = _core_.ICON_ERROR
153 FORWARD = _core_.FORWARD
154 BACKWARD = _core_.BACKWARD
155 RESET = _core_.RESET
156 HELP = _core_.HELP
157 MORE = _core_.MORE
158 SETUP = _core_.SETUP
159 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
160 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
161 SIZE_AUTO = _core_.SIZE_AUTO
162 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
163 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
164 PORTRAIT = _core_.PORTRAIT
165 LANDSCAPE = _core_.LANDSCAPE
166 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
167 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
168 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
169 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
170 ID_ANY = _core_.ID_ANY
171 ID_SEPARATOR = _core_.ID_SEPARATOR
172 ID_LOWEST = _core_.ID_LOWEST
173 ID_OPEN = _core_.ID_OPEN
174 ID_CLOSE = _core_.ID_CLOSE
175 ID_NEW = _core_.ID_NEW
176 ID_SAVE = _core_.ID_SAVE
177 ID_SAVEAS = _core_.ID_SAVEAS
178 ID_REVERT = _core_.ID_REVERT
179 ID_EXIT = _core_.ID_EXIT
180 ID_UNDO = _core_.ID_UNDO
181 ID_REDO = _core_.ID_REDO
182 ID_HELP = _core_.ID_HELP
183 ID_PRINT = _core_.ID_PRINT
184 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
185 ID_PREVIEW = _core_.ID_PREVIEW
186 ID_ABOUT = _core_.ID_ABOUT
187 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
188 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
189 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
190 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
191 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
192 ID_PREFERENCES = _core_.ID_PREFERENCES
193 ID_CUT = _core_.ID_CUT
194 ID_COPY = _core_.ID_COPY
195 ID_PASTE = _core_.ID_PASTE
196 ID_CLEAR = _core_.ID_CLEAR
197 ID_FIND = _core_.ID_FIND
198 ID_DUPLICATE = _core_.ID_DUPLICATE
199 ID_SELECTALL = _core_.ID_SELECTALL
200 ID_DELETE = _core_.ID_DELETE
201 ID_REPLACE = _core_.ID_REPLACE
202 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
203 ID_PROPERTIES = _core_.ID_PROPERTIES
204 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
205 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
206 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
207 ID_VIEW_LIST = _core_.ID_VIEW_LIST
208 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
209 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
210 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
211 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
212 ID_FILE1 = _core_.ID_FILE1
213 ID_FILE2 = _core_.ID_FILE2
214 ID_FILE3 = _core_.ID_FILE3
215 ID_FILE4 = _core_.ID_FILE4
216 ID_FILE5 = _core_.ID_FILE5
217 ID_FILE6 = _core_.ID_FILE6
218 ID_FILE7 = _core_.ID_FILE7
219 ID_FILE8 = _core_.ID_FILE8
220 ID_FILE9 = _core_.ID_FILE9
221 ID_OK = _core_.ID_OK
222 ID_CANCEL = _core_.ID_CANCEL
223 ID_APPLY = _core_.ID_APPLY
224 ID_YES = _core_.ID_YES
225 ID_NO = _core_.ID_NO
226 ID_STATIC = _core_.ID_STATIC
227 ID_FORWARD = _core_.ID_FORWARD
228 ID_BACKWARD = _core_.ID_BACKWARD
229 ID_DEFAULT = _core_.ID_DEFAULT
230 ID_MORE = _core_.ID_MORE
231 ID_SETUP = _core_.ID_SETUP
232 ID_RESET = _core_.ID_RESET
233 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
234 ID_YESTOALL = _core_.ID_YESTOALL
235 ID_NOTOALL = _core_.ID_NOTOALL
236 ID_ABORT = _core_.ID_ABORT
237 ID_RETRY = _core_.ID_RETRY
238 ID_IGNORE = _core_.ID_IGNORE
239 ID_ADD = _core_.ID_ADD
240 ID_REMOVE = _core_.ID_REMOVE
241 ID_UP = _core_.ID_UP
242 ID_DOWN = _core_.ID_DOWN
243 ID_HOME = _core_.ID_HOME
244 ID_REFRESH = _core_.ID_REFRESH
245 ID_STOP = _core_.ID_STOP
246 ID_INDEX = _core_.ID_INDEX
247 ID_BOLD = _core_.ID_BOLD
248 ID_ITALIC = _core_.ID_ITALIC
249 ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
250 ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
251 ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
252 ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
253 ID_UNDERLINE = _core_.ID_UNDERLINE
254 ID_INDENT = _core_.ID_INDENT
255 ID_UNINDENT = _core_.ID_UNINDENT
256 ID_ZOOM_100 = _core_.ID_ZOOM_100
257 ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
258 ID_ZOOM_IN = _core_.ID_ZOOM_IN
259 ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
260 ID_UNDELETE = _core_.ID_UNDELETE
261 ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
262 ID_HIGHEST = _core_.ID_HIGHEST
263 OPEN = _core_.OPEN
264 SAVE = _core_.SAVE
265 HIDE_READONLY = _core_.HIDE_READONLY
266 OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
267 FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
268 MULTIPLE = _core_.MULTIPLE
269 CHANGE_DIR = _core_.CHANGE_DIR
270 ACCEL_ALT = _core_.ACCEL_ALT
271 ACCEL_CTRL = _core_.ACCEL_CTRL
272 ACCEL_SHIFT = _core_.ACCEL_SHIFT
273 ACCEL_NORMAL = _core_.ACCEL_NORMAL
274 PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
275 PD_APP_MODAL = _core_.PD_APP_MODAL
276 PD_CAN_ABORT = _core_.PD_CAN_ABORT
277 PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
278 PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
279 PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
280 PD_SMOOTH = _core_.PD_SMOOTH
281 PD_CAN_SKIP = _core_.PD_CAN_SKIP
282 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
283 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
284 MENU_TEAROFF = _core_.MENU_TEAROFF
285 MB_DOCKABLE = _core_.MB_DOCKABLE
286 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
287 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
288 LI_HORIZONTAL = _core_.LI_HORIZONTAL
289 LI_VERTICAL = _core_.LI_VERTICAL
290 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
291 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
292 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
293 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
294 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
295 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
296 MM_TEXT = _core_.MM_TEXT
297 MM_LOMETRIC = _core_.MM_LOMETRIC
298 MM_HIMETRIC = _core_.MM_HIMETRIC
299 MM_LOENGLISH = _core_.MM_LOENGLISH
300 MM_HIENGLISH = _core_.MM_HIENGLISH
301 MM_TWIPS = _core_.MM_TWIPS
302 MM_ISOTROPIC = _core_.MM_ISOTROPIC
303 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
304 MM_POINTS = _core_.MM_POINTS
305 MM_METRIC = _core_.MM_METRIC
306 CENTRE = _core_.CENTRE
307 CENTER = _core_.CENTER
308 HORIZONTAL = _core_.HORIZONTAL
309 VERTICAL = _core_.VERTICAL
310 BOTH = _core_.BOTH
311 LEFT = _core_.LEFT
312 RIGHT = _core_.RIGHT
313 UP = _core_.UP
314 DOWN = _core_.DOWN
315 TOP = _core_.TOP
316 BOTTOM = _core_.BOTTOM
317 NORTH = _core_.NORTH
318 SOUTH = _core_.SOUTH
319 WEST = _core_.WEST
320 EAST = _core_.EAST
321 ALL = _core_.ALL
322 ALIGN_NOT = _core_.ALIGN_NOT
323 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
324 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
325 ALIGN_LEFT = _core_.ALIGN_LEFT
326 ALIGN_TOP = _core_.ALIGN_TOP
327 ALIGN_RIGHT = _core_.ALIGN_RIGHT
328 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
329 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
330 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
331 ALIGN_CENTER = _core_.ALIGN_CENTER
332 ALIGN_CENTRE = _core_.ALIGN_CENTRE
333 ALIGN_MASK = _core_.ALIGN_MASK
334 STRETCH_NOT = _core_.STRETCH_NOT
335 SHRINK = _core_.SHRINK
336 GROW = _core_.GROW
337 EXPAND = _core_.EXPAND
338 SHAPED = _core_.SHAPED
339 FIXED_MINSIZE = _core_.FIXED_MINSIZE
340 TILE = _core_.TILE
341 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
342 BORDER_DEFAULT = _core_.BORDER_DEFAULT
343 BORDER_NONE = _core_.BORDER_NONE
344 BORDER_STATIC = _core_.BORDER_STATIC
345 BORDER_SIMPLE = _core_.BORDER_SIMPLE
346 BORDER_RAISED = _core_.BORDER_RAISED
347 BORDER_SUNKEN = _core_.BORDER_SUNKEN
348 BORDER_DOUBLE = _core_.BORDER_DOUBLE
349 BORDER_MASK = _core_.BORDER_MASK
350 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
351 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
352 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
353 DEFAULT = _core_.DEFAULT
354 DECORATIVE = _core_.DECORATIVE
355 ROMAN = _core_.ROMAN
356 SCRIPT = _core_.SCRIPT
357 SWISS = _core_.SWISS
358 MODERN = _core_.MODERN
359 TELETYPE = _core_.TELETYPE
360 VARIABLE = _core_.VARIABLE
361 FIXED = _core_.FIXED
362 NORMAL = _core_.NORMAL
363 LIGHT = _core_.LIGHT
364 BOLD = _core_.BOLD
365 ITALIC = _core_.ITALIC
366 SLANT = _core_.SLANT
367 SOLID = _core_.SOLID
368 DOT = _core_.DOT
369 LONG_DASH = _core_.LONG_DASH
370 SHORT_DASH = _core_.SHORT_DASH
371 DOT_DASH = _core_.DOT_DASH
372 USER_DASH = _core_.USER_DASH
373 TRANSPARENT = _core_.TRANSPARENT
374 STIPPLE = _core_.STIPPLE
375 STIPPLE_MASK = _core_.STIPPLE_MASK
376 STIPPLE_MASK_OPAQUE = _core_.STIPPLE_MASK_OPAQUE
377 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
378 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
379 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
380 CROSS_HATCH = _core_.CROSS_HATCH
381 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
382 VERTICAL_HATCH = _core_.VERTICAL_HATCH
383 JOIN_BEVEL = _core_.JOIN_BEVEL
384 JOIN_MITER = _core_.JOIN_MITER
385 JOIN_ROUND = _core_.JOIN_ROUND
386 CAP_ROUND = _core_.CAP_ROUND
387 CAP_PROJECTING = _core_.CAP_PROJECTING
388 CAP_BUTT = _core_.CAP_BUTT
389 CLEAR = _core_.CLEAR
390 XOR = _core_.XOR
391 INVERT = _core_.INVERT
392 OR_REVERSE = _core_.OR_REVERSE
393 AND_REVERSE = _core_.AND_REVERSE
394 COPY = _core_.COPY
395 AND = _core_.AND
396 AND_INVERT = _core_.AND_INVERT
397 NO_OP = _core_.NO_OP
398 NOR = _core_.NOR
399 EQUIV = _core_.EQUIV
400 SRC_INVERT = _core_.SRC_INVERT
401 OR_INVERT = _core_.OR_INVERT
402 NAND = _core_.NAND
403 OR = _core_.OR
404 SET = _core_.SET
405 WXK_BACK = _core_.WXK_BACK
406 WXK_TAB = _core_.WXK_TAB
407 WXK_RETURN = _core_.WXK_RETURN
408 WXK_ESCAPE = _core_.WXK_ESCAPE
409 WXK_SPACE = _core_.WXK_SPACE
410 WXK_DELETE = _core_.WXK_DELETE
411 WXK_START = _core_.WXK_START
412 WXK_LBUTTON = _core_.WXK_LBUTTON
413 WXK_RBUTTON = _core_.WXK_RBUTTON
414 WXK_CANCEL = _core_.WXK_CANCEL
415 WXK_MBUTTON = _core_.WXK_MBUTTON
416 WXK_CLEAR = _core_.WXK_CLEAR
417 WXK_SHIFT = _core_.WXK_SHIFT
418 WXK_ALT = _core_.WXK_ALT
419 WXK_CONTROL = _core_.WXK_CONTROL
420 WXK_MENU = _core_.WXK_MENU
421 WXK_PAUSE = _core_.WXK_PAUSE
422 WXK_CAPITAL = _core_.WXK_CAPITAL
423 WXK_PRIOR = _core_.WXK_PRIOR
424 WXK_NEXT = _core_.WXK_NEXT
425 WXK_END = _core_.WXK_END
426 WXK_HOME = _core_.WXK_HOME
427 WXK_LEFT = _core_.WXK_LEFT
428 WXK_UP = _core_.WXK_UP
429 WXK_RIGHT = _core_.WXK_RIGHT
430 WXK_DOWN = _core_.WXK_DOWN
431 WXK_SELECT = _core_.WXK_SELECT
432 WXK_PRINT = _core_.WXK_PRINT
433 WXK_EXECUTE = _core_.WXK_EXECUTE
434 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
435 WXK_INSERT = _core_.WXK_INSERT
436 WXK_HELP = _core_.WXK_HELP
437 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
438 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
439 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
440 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
441 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
442 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
443 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
444 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
445 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
446 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
447 WXK_MULTIPLY = _core_.WXK_MULTIPLY
448 WXK_ADD = _core_.WXK_ADD
449 WXK_SEPARATOR = _core_.WXK_SEPARATOR
450 WXK_SUBTRACT = _core_.WXK_SUBTRACT
451 WXK_DECIMAL = _core_.WXK_DECIMAL
452 WXK_DIVIDE = _core_.WXK_DIVIDE
453 WXK_F1 = _core_.WXK_F1
454 WXK_F2 = _core_.WXK_F2
455 WXK_F3 = _core_.WXK_F3
456 WXK_F4 = _core_.WXK_F4
457 WXK_F5 = _core_.WXK_F5
458 WXK_F6 = _core_.WXK_F6
459 WXK_F7 = _core_.WXK_F7
460 WXK_F8 = _core_.WXK_F8
461 WXK_F9 = _core_.WXK_F9
462 WXK_F10 = _core_.WXK_F10
463 WXK_F11 = _core_.WXK_F11
464 WXK_F12 = _core_.WXK_F12
465 WXK_F13 = _core_.WXK_F13
466 WXK_F14 = _core_.WXK_F14
467 WXK_F15 = _core_.WXK_F15
468 WXK_F16 = _core_.WXK_F16
469 WXK_F17 = _core_.WXK_F17
470 WXK_F18 = _core_.WXK_F18
471 WXK_F19 = _core_.WXK_F19
472 WXK_F20 = _core_.WXK_F20
473 WXK_F21 = _core_.WXK_F21
474 WXK_F22 = _core_.WXK_F22
475 WXK_F23 = _core_.WXK_F23
476 WXK_F24 = _core_.WXK_F24
477 WXK_NUMLOCK = _core_.WXK_NUMLOCK
478 WXK_SCROLL = _core_.WXK_SCROLL
479 WXK_PAGEUP = _core_.WXK_PAGEUP
480 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
481 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
482 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
483 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
484 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
485 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
486 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
487 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
488 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
489 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
490 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
491 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
492 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
493 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
494 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
495 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
496 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
497 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
498 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
499 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
500 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
501 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
502 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
503 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
504 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
505 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
506 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
507 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
508 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
509 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
510 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
511 WXK_COMMAND = _core_.WXK_COMMAND
512 WXK_SPECIAL1 = _core_.WXK_SPECIAL1
513 WXK_SPECIAL2 = _core_.WXK_SPECIAL2
514 WXK_SPECIAL3 = _core_.WXK_SPECIAL3
515 WXK_SPECIAL4 = _core_.WXK_SPECIAL4
516 WXK_SPECIAL5 = _core_.WXK_SPECIAL5
517 WXK_SPECIAL6 = _core_.WXK_SPECIAL6
518 WXK_SPECIAL7 = _core_.WXK_SPECIAL7
519 WXK_SPECIAL8 = _core_.WXK_SPECIAL8
520 WXK_SPECIAL9 = _core_.WXK_SPECIAL9
521 WXK_SPECIAL10 = _core_.WXK_SPECIAL10
522 WXK_SPECIAL11 = _core_.WXK_SPECIAL11
523 WXK_SPECIAL12 = _core_.WXK_SPECIAL12
524 WXK_SPECIAL13 = _core_.WXK_SPECIAL13
525 WXK_SPECIAL14 = _core_.WXK_SPECIAL14
526 WXK_SPECIAL15 = _core_.WXK_SPECIAL15
527 WXK_SPECIAL16 = _core_.WXK_SPECIAL16
528 WXK_SPECIAL17 = _core_.WXK_SPECIAL17
529 WXK_SPECIAL18 = _core_.WXK_SPECIAL18
530 WXK_SPECIAL19 = _core_.WXK_SPECIAL19
531 WXK_SPECIAL20 = _core_.WXK_SPECIAL20
532 PAPER_NONE = _core_.PAPER_NONE
533 PAPER_LETTER = _core_.PAPER_LETTER
534 PAPER_LEGAL = _core_.PAPER_LEGAL
535 PAPER_A4 = _core_.PAPER_A4
536 PAPER_CSHEET = _core_.PAPER_CSHEET
537 PAPER_DSHEET = _core_.PAPER_DSHEET
538 PAPER_ESHEET = _core_.PAPER_ESHEET
539 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
540 PAPER_TABLOID = _core_.PAPER_TABLOID
541 PAPER_LEDGER = _core_.PAPER_LEDGER
542 PAPER_STATEMENT = _core_.PAPER_STATEMENT
543 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
544 PAPER_A3 = _core_.PAPER_A3
545 PAPER_A4SMALL = _core_.PAPER_A4SMALL
546 PAPER_A5 = _core_.PAPER_A5
547 PAPER_B4 = _core_.PAPER_B4
548 PAPER_B5 = _core_.PAPER_B5
549 PAPER_FOLIO = _core_.PAPER_FOLIO
550 PAPER_QUARTO = _core_.PAPER_QUARTO
551 PAPER_10X14 = _core_.PAPER_10X14
552 PAPER_11X17 = _core_.PAPER_11X17
553 PAPER_NOTE = _core_.PAPER_NOTE
554 PAPER_ENV_9 = _core_.PAPER_ENV_9
555 PAPER_ENV_10 = _core_.PAPER_ENV_10
556 PAPER_ENV_11 = _core_.PAPER_ENV_11
557 PAPER_ENV_12 = _core_.PAPER_ENV_12
558 PAPER_ENV_14 = _core_.PAPER_ENV_14
559 PAPER_ENV_DL = _core_.PAPER_ENV_DL
560 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
561 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
562 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
563 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
564 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
565 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
566 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
567 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
568 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
569 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
570 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
571 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
572 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
573 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
574 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
575 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
576 PAPER_9X11 = _core_.PAPER_9X11
577 PAPER_10X11 = _core_.PAPER_10X11
578 PAPER_15X11 = _core_.PAPER_15X11
579 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
580 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
581 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
582 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
583 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
584 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
585 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
586 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
587 PAPER_A_PLUS = _core_.PAPER_A_PLUS
588 PAPER_B_PLUS = _core_.PAPER_B_PLUS
589 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
590 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
591 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
592 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
593 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
594 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
595 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
596 PAPER_A2 = _core_.PAPER_A2
597 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
598 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
599 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
600 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
601 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
602 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
603 ITEM_NORMAL = _core_.ITEM_NORMAL
604 ITEM_CHECK = _core_.ITEM_CHECK
605 ITEM_RADIO = _core_.ITEM_RADIO
606 ITEM_MAX = _core_.ITEM_MAX
607 HT_NOWHERE = _core_.HT_NOWHERE
608 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
609 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
610 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
611 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
612 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
613 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
614 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
615 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
616 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
617 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
618 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
619 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
620 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
621 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
622 HT_MAX = _core_.HT_MAX
623 MOD_NONE = _core_.MOD_NONE
624 MOD_ALT = _core_.MOD_ALT
625 MOD_CONTROL = _core_.MOD_CONTROL
626 MOD_SHIFT = _core_.MOD_SHIFT
627 MOD_WIN = _core_.MOD_WIN
628 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
629 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
630 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
631 #---------------------------------------------------------------------------
632
633 class Object(object):
634 """
635 The base class for most wx objects, although in wxPython not
636 much functionality is needed nor exposed.
637 """
638 def __init__(self): raise RuntimeError, "No constructor defined"
639 def __repr__(self):
640 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
641 def GetClassName(*args, **kwargs):
642 """
643 GetClassName(self) -> String
644
645 Returns the class name of the C++ class using wxRTTI.
646 """
647 return _core_.Object_GetClassName(*args, **kwargs)
648
649 def Destroy(*args, **kwargs):
650 """
651 Destroy(self)
652
653 Deletes the C++ object this Python object is a proxy for.
654 """
655 return _core_.Object_Destroy(*args, **kwargs)
656
657
658 class ObjectPtr(Object):
659 def __init__(self, this):
660 self.this = this
661 if not hasattr(self,"thisown"): self.thisown = 0
662 self.__class__ = Object
663 _core_.Object_swigregister(ObjectPtr)
664 _wxPySetDictionary = _core_._wxPySetDictionary
665
666 _wxPyFixStockObjects = _core_._wxPyFixStockObjects
667
668 cvar = _core_.cvar
669 EmptyString = cvar.EmptyString
670
671 #---------------------------------------------------------------------------
672
673 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
674 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
675 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
676 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
677 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
678 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
679 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
680 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
681 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
682 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
683 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
684 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
685 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
686 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
687 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
688 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
689 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
690 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
691 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
692 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
693 CURSOR_NONE = _core_.CURSOR_NONE
694 CURSOR_ARROW = _core_.CURSOR_ARROW
695 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
696 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
697 CURSOR_CHAR = _core_.CURSOR_CHAR
698 CURSOR_CROSS = _core_.CURSOR_CROSS
699 CURSOR_HAND = _core_.CURSOR_HAND
700 CURSOR_IBEAM = _core_.CURSOR_IBEAM
701 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
702 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
703 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
704 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
705 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
706 CURSOR_PENCIL = _core_.CURSOR_PENCIL
707 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
708 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
709 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
710 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
711 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
712 CURSOR_SIZENS = _core_.CURSOR_SIZENS
713 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
714 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
715 CURSOR_SIZING = _core_.CURSOR_SIZING
716 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
717 CURSOR_WAIT = _core_.CURSOR_WAIT
718 CURSOR_WATCH = _core_.CURSOR_WATCH
719 CURSOR_BLANK = _core_.CURSOR_BLANK
720 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
721 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
722 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
723 CURSOR_MAX = _core_.CURSOR_MAX
724 #---------------------------------------------------------------------------
725
726 class Size(object):
727 """
728 wx.Size is a useful data structure used to represent the size of
729 something. It simply contians integer width and height
730 proprtites. In most places in wxPython where a wx.Size is
731 expected a (width, height) tuple can be used instead.
732 """
733 def __repr__(self):
734 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
735 width = property(_core_.Size_width_get, _core_.Size_width_set)
736 height = property(_core_.Size_height_get, _core_.Size_height_set)
737 x = width; y = height
738 def __init__(self, *args, **kwargs):
739 """
740 __init__(self, int w=0, int h=0) -> Size
741
742 Creates a size object.
743 """
744 newobj = _core_.new_Size(*args, **kwargs)
745 self.this = newobj.this
746 self.thisown = 1
747 del newobj.thisown
748 def __del__(self, destroy=_core_.delete_Size):
749 """__del__(self)"""
750 try:
751 if self.thisown: destroy(self)
752 except: pass
753
754 def __eq__(*args, **kwargs):
755 """
756 __eq__(self, Size sz) -> bool
757
758 Test for equality of wx.Size objects.
759 """
760 return _core_.Size___eq__(*args, **kwargs)
761
762 def __ne__(*args, **kwargs):
763 """
764 __ne__(self, Size sz) -> bool
765
766 Test for inequality.
767 """
768 return _core_.Size___ne__(*args, **kwargs)
769
770 def __add__(*args, **kwargs):
771 """
772 __add__(self, Size sz) -> Size
773
774 Add sz's proprties to this and return the result.
775 """
776 return _core_.Size___add__(*args, **kwargs)
777
778 def __sub__(*args, **kwargs):
779 """
780 __sub__(self, Size sz) -> Size
781
782 Subtract sz's properties from this and return the result.
783 """
784 return _core_.Size___sub__(*args, **kwargs)
785
786 def IncTo(*args, **kwargs):
787 """
788 IncTo(self, Size sz)
789
790 Increments this object so that both of its dimensions are not less
791 than the corresponding dimensions of the size.
792 """
793 return _core_.Size_IncTo(*args, **kwargs)
794
795 def DecTo(*args, **kwargs):
796 """
797 DecTo(self, Size sz)
798
799 Decrements this object so that both of its dimensions are not greater
800 than the corresponding dimensions of the size.
801 """
802 return _core_.Size_DecTo(*args, **kwargs)
803
804 def Set(*args, **kwargs):
805 """
806 Set(self, int w, int h)
807
808 Set both width and height.
809 """
810 return _core_.Size_Set(*args, **kwargs)
811
812 def SetWidth(*args, **kwargs):
813 """SetWidth(self, int w)"""
814 return _core_.Size_SetWidth(*args, **kwargs)
815
816 def SetHeight(*args, **kwargs):
817 """SetHeight(self, int h)"""
818 return _core_.Size_SetHeight(*args, **kwargs)
819
820 def GetWidth(*args, **kwargs):
821 """GetWidth(self) -> int"""
822 return _core_.Size_GetWidth(*args, **kwargs)
823
824 def GetHeight(*args, **kwargs):
825 """GetHeight(self) -> int"""
826 return _core_.Size_GetHeight(*args, **kwargs)
827
828 def IsFullySpecified(*args, **kwargs):
829 """
830 IsFullySpecified(self) -> bool
831
832 Returns True if both components of the size are non-default values.
833 """
834 return _core_.Size_IsFullySpecified(*args, **kwargs)
835
836 def SetDefaults(*args, **kwargs):
837 """
838 SetDefaults(self, Size size)
839
840 Combine this size with the other one replacing the default components
841 of this object (i.e. equal to -1) with those of the other.
842 """
843 return _core_.Size_SetDefaults(*args, **kwargs)
844
845 def Get(*args, **kwargs):
846 """
847 Get() -> (width,height)
848
849 Returns the width and height properties as a tuple.
850 """
851 return _core_.Size_Get(*args, **kwargs)
852
853 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
854 def __str__(self): return str(self.Get())
855 def __repr__(self): return 'wx.Size'+str(self.Get())
856 def __len__(self): return len(self.Get())
857 def __getitem__(self, index): return self.Get()[index]
858 def __setitem__(self, index, val):
859 if index == 0: self.width = val
860 elif index == 1: self.height = val
861 else: raise IndexError
862 def __nonzero__(self): return self.Get() != (0,0)
863 __safe_for_unpickling__ = True
864 def __reduce__(self): return (wx.Size, self.Get())
865
866
867 class SizePtr(Size):
868 def __init__(self, this):
869 self.this = this
870 if not hasattr(self,"thisown"): self.thisown = 0
871 self.__class__ = Size
872 _core_.Size_swigregister(SizePtr)
873
874 #---------------------------------------------------------------------------
875
876 class RealPoint(object):
877 """
878 A data structure for representing a point or position with floating
879 point x and y properties. In wxPython most places that expect a
880 wx.RealPoint can also accept a (x,y) tuple.
881 """
882 def __repr__(self):
883 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
884 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
885 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
886 def __init__(self, *args, **kwargs):
887 """
888 __init__(self, double x=0.0, double y=0.0) -> RealPoint
889
890 Create a wx.RealPoint object
891 """
892 newobj = _core_.new_RealPoint(*args, **kwargs)
893 self.this = newobj.this
894 self.thisown = 1
895 del newobj.thisown
896 def __del__(self, destroy=_core_.delete_RealPoint):
897 """__del__(self)"""
898 try:
899 if self.thisown: destroy(self)
900 except: pass
901
902 def __eq__(*args, **kwargs):
903 """
904 __eq__(self, RealPoint pt) -> bool
905
906 Test for equality of wx.RealPoint objects.
907 """
908 return _core_.RealPoint___eq__(*args, **kwargs)
909
910 def __ne__(*args, **kwargs):
911 """
912 __ne__(self, RealPoint pt) -> bool
913
914 Test for inequality of wx.RealPoint objects.
915 """
916 return _core_.RealPoint___ne__(*args, **kwargs)
917
918 def __add__(*args, **kwargs):
919 """
920 __add__(self, RealPoint pt) -> RealPoint
921
922 Add pt's proprties to this and return the result.
923 """
924 return _core_.RealPoint___add__(*args, **kwargs)
925
926 def __sub__(*args, **kwargs):
927 """
928 __sub__(self, RealPoint pt) -> RealPoint
929
930 Subtract pt's proprties from this and return the result
931 """
932 return _core_.RealPoint___sub__(*args, **kwargs)
933
934 def Set(*args, **kwargs):
935 """
936 Set(self, double x, double y)
937
938 Set both the x and y properties
939 """
940 return _core_.RealPoint_Set(*args, **kwargs)
941
942 def Get(*args, **kwargs):
943 """
944 Get() -> (x,y)
945
946 Return the x and y properties as a tuple.
947 """
948 return _core_.RealPoint_Get(*args, **kwargs)
949
950 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
951 def __str__(self): return str(self.Get())
952 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
953 def __len__(self): return len(self.Get())
954 def __getitem__(self, index): return self.Get()[index]
955 def __setitem__(self, index, val):
956 if index == 0: self.x = val
957 elif index == 1: self.y = val
958 else: raise IndexError
959 def __nonzero__(self): return self.Get() != (0.0, 0.0)
960 __safe_for_unpickling__ = True
961 def __reduce__(self): return (wx.RealPoint, self.Get())
962
963
964 class RealPointPtr(RealPoint):
965 def __init__(self, this):
966 self.this = this
967 if not hasattr(self,"thisown"): self.thisown = 0
968 self.__class__ = RealPoint
969 _core_.RealPoint_swigregister(RealPointPtr)
970
971 #---------------------------------------------------------------------------
972
973 class Point(object):
974 """
975 A data structure for representing a point or position with integer x
976 and y properties. Most places in wxPython that expect a wx.Point can
977 also accept a (x,y) tuple.
978 """
979 def __repr__(self):
980 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
981 x = property(_core_.Point_x_get, _core_.Point_x_set)
982 y = property(_core_.Point_y_get, _core_.Point_y_set)
983 def __init__(self, *args, **kwargs):
984 """
985 __init__(self, int x=0, int y=0) -> Point
986
987 Create a wx.Point object
988 """
989 newobj = _core_.new_Point(*args, **kwargs)
990 self.this = newobj.this
991 self.thisown = 1
992 del newobj.thisown
993 def __del__(self, destroy=_core_.delete_Point):
994 """__del__(self)"""
995 try:
996 if self.thisown: destroy(self)
997 except: pass
998
999 def __eq__(*args, **kwargs):
1000 """
1001 __eq__(self, Point pt) -> bool
1002
1003 Test for equality of wx.Point objects.
1004 """
1005 return _core_.Point___eq__(*args, **kwargs)
1006
1007 def __ne__(*args, **kwargs):
1008 """
1009 __ne__(self, Point pt) -> bool
1010
1011 Test for inequality of wx.Point objects.
1012 """
1013 return _core_.Point___ne__(*args, **kwargs)
1014
1015 def __add__(*args, **kwargs):
1016 """
1017 __add__(self, Point pt) -> Point
1018
1019 Add pt's proprties to this and return the result.
1020 """
1021 return _core_.Point___add__(*args, **kwargs)
1022
1023 def __sub__(*args, **kwargs):
1024 """
1025 __sub__(self, Point pt) -> Point
1026
1027 Subtract pt's proprties from this and return the result
1028 """
1029 return _core_.Point___sub__(*args, **kwargs)
1030
1031 def __iadd__(*args, **kwargs):
1032 """
1033 __iadd__(self, Point pt) -> Point
1034
1035 Add pt to this object.
1036 """
1037 return _core_.Point___iadd__(*args, **kwargs)
1038
1039 def __isub__(*args, **kwargs):
1040 """
1041 __isub__(self, Point pt) -> Point
1042
1043 Subtract pt from this object.
1044 """
1045 return _core_.Point___isub__(*args, **kwargs)
1046
1047 def Set(*args, **kwargs):
1048 """
1049 Set(self, long x, long y)
1050
1051 Set both the x and y properties
1052 """
1053 return _core_.Point_Set(*args, **kwargs)
1054
1055 def Get(*args, **kwargs):
1056 """
1057 Get() -> (x,y)
1058
1059 Return the x and y properties as a tuple.
1060 """
1061 return _core_.Point_Get(*args, **kwargs)
1062
1063 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1064 def __str__(self): return str(self.Get())
1065 def __repr__(self): return 'wx.Point'+str(self.Get())
1066 def __len__(self): return len(self.Get())
1067 def __getitem__(self, index): return self.Get()[index]
1068 def __setitem__(self, index, val):
1069 if index == 0: self.x = val
1070 elif index == 1: self.y = val
1071 else: raise IndexError
1072 def __nonzero__(self): return self.Get() != (0,0)
1073 __safe_for_unpickling__ = True
1074 def __reduce__(self): return (wx.Point, self.Get())
1075
1076
1077 class PointPtr(Point):
1078 def __init__(self, this):
1079 self.this = this
1080 if not hasattr(self,"thisown"): self.thisown = 0
1081 self.__class__ = Point
1082 _core_.Point_swigregister(PointPtr)
1083
1084 #---------------------------------------------------------------------------
1085
1086 class Rect(object):
1087 """
1088 A class for representing and manipulating rectangles. It has x, y,
1089 width and height properties. In wxPython most palces that expect a
1090 wx.Rect can also accept a (x,y,width,height) tuple.
1091 """
1092 def __repr__(self):
1093 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1094 def __init__(self, *args, **kwargs):
1095 """
1096 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1097
1098 Create a new Rect object.
1099 """
1100 newobj = _core_.new_Rect(*args, **kwargs)
1101 self.this = newobj.this
1102 self.thisown = 1
1103 del newobj.thisown
1104 def __del__(self, destroy=_core_.delete_Rect):
1105 """__del__(self)"""
1106 try:
1107 if self.thisown: destroy(self)
1108 except: pass
1109
1110 def GetX(*args, **kwargs):
1111 """GetX(self) -> int"""
1112 return _core_.Rect_GetX(*args, **kwargs)
1113
1114 def SetX(*args, **kwargs):
1115 """SetX(self, int x)"""
1116 return _core_.Rect_SetX(*args, **kwargs)
1117
1118 def GetY(*args, **kwargs):
1119 """GetY(self) -> int"""
1120 return _core_.Rect_GetY(*args, **kwargs)
1121
1122 def SetY(*args, **kwargs):
1123 """SetY(self, int y)"""
1124 return _core_.Rect_SetY(*args, **kwargs)
1125
1126 def GetWidth(*args, **kwargs):
1127 """GetWidth(self) -> int"""
1128 return _core_.Rect_GetWidth(*args, **kwargs)
1129
1130 def SetWidth(*args, **kwargs):
1131 """SetWidth(self, int w)"""
1132 return _core_.Rect_SetWidth(*args, **kwargs)
1133
1134 def GetHeight(*args, **kwargs):
1135 """GetHeight(self) -> int"""
1136 return _core_.Rect_GetHeight(*args, **kwargs)
1137
1138 def SetHeight(*args, **kwargs):
1139 """SetHeight(self, int h)"""
1140 return _core_.Rect_SetHeight(*args, **kwargs)
1141
1142 def GetPosition(*args, **kwargs):
1143 """GetPosition(self) -> Point"""
1144 return _core_.Rect_GetPosition(*args, **kwargs)
1145
1146 def SetPosition(*args, **kwargs):
1147 """SetPosition(self, Point p)"""
1148 return _core_.Rect_SetPosition(*args, **kwargs)
1149
1150 def GetSize(*args, **kwargs):
1151 """GetSize(self) -> Size"""
1152 return _core_.Rect_GetSize(*args, **kwargs)
1153
1154 def SetSize(*args, **kwargs):
1155 """SetSize(self, Size s)"""
1156 return _core_.Rect_SetSize(*args, **kwargs)
1157
1158 def IsEmpty(*args, **kwargs):
1159 """IsEmpty(self) -> bool"""
1160 return _core_.Rect_IsEmpty(*args, **kwargs)
1161
1162 def GetTopLeft(*args, **kwargs):
1163 """GetTopLeft(self) -> Point"""
1164 return _core_.Rect_GetTopLeft(*args, **kwargs)
1165
1166 def SetTopLeft(*args, **kwargs):
1167 """SetTopLeft(self, Point p)"""
1168 return _core_.Rect_SetTopLeft(*args, **kwargs)
1169
1170 def GetBottomRight(*args, **kwargs):
1171 """GetBottomRight(self) -> Point"""
1172 return _core_.Rect_GetBottomRight(*args, **kwargs)
1173
1174 def SetBottomRight(*args, **kwargs):
1175 """SetBottomRight(self, Point p)"""
1176 return _core_.Rect_SetBottomRight(*args, **kwargs)
1177
1178 def GetLeft(*args, **kwargs):
1179 """GetLeft(self) -> int"""
1180 return _core_.Rect_GetLeft(*args, **kwargs)
1181
1182 def GetTop(*args, **kwargs):
1183 """GetTop(self) -> int"""
1184 return _core_.Rect_GetTop(*args, **kwargs)
1185
1186 def GetBottom(*args, **kwargs):
1187 """GetBottom(self) -> int"""
1188 return _core_.Rect_GetBottom(*args, **kwargs)
1189
1190 def GetRight(*args, **kwargs):
1191 """GetRight(self) -> int"""
1192 return _core_.Rect_GetRight(*args, **kwargs)
1193
1194 def SetLeft(*args, **kwargs):
1195 """SetLeft(self, int left)"""
1196 return _core_.Rect_SetLeft(*args, **kwargs)
1197
1198 def SetRight(*args, **kwargs):
1199 """SetRight(self, int right)"""
1200 return _core_.Rect_SetRight(*args, **kwargs)
1201
1202 def SetTop(*args, **kwargs):
1203 """SetTop(self, int top)"""
1204 return _core_.Rect_SetTop(*args, **kwargs)
1205
1206 def SetBottom(*args, **kwargs):
1207 """SetBottom(self, int bottom)"""
1208 return _core_.Rect_SetBottom(*args, **kwargs)
1209
1210 position = property(GetPosition, SetPosition)
1211 size = property(GetSize, SetSize)
1212 left = property(GetLeft, SetLeft)
1213 right = property(GetRight, SetRight)
1214 top = property(GetTop, SetTop)
1215 bottom = property(GetBottom, SetBottom)
1216
1217 def Inflate(*args, **kwargs):
1218 """
1219 Inflate(self, int dx, int dy) -> Rect
1220
1221 Increases the size of the rectangle.
1222
1223 The left border is moved farther left and the right border is moved
1224 farther right by ``dx``. The upper border is moved farther up and the
1225 bottom border is moved farther down by ``dy``. (Note the the width and
1226 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1227 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1228 opposite happens: the rectangle size decreases in the respective
1229 direction.
1230
1231 The change is made to the rectangle inplace, if instead you need a
1232 copy that is inflated, preserving the original then make the copy
1233 first::
1234
1235 copy = wx.Rect(*original)
1236 copy.Inflate(10,15)
1237
1238
1239 """
1240 return _core_.Rect_Inflate(*args, **kwargs)
1241
1242 def Deflate(*args, **kwargs):
1243 """
1244 Deflate(self, int dx, int dy) -> Rect
1245
1246 Decrease the rectangle size. This method is the opposite of `Inflate`
1247 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1248 `Inflate` for a full description.
1249 """
1250 return _core_.Rect_Deflate(*args, **kwargs)
1251
1252 def OffsetXY(*args, **kwargs):
1253 """
1254 OffsetXY(self, int dx, int dy)
1255
1256 Moves the rectangle by the specified offset. If dx is positive, the
1257 rectangle is moved to the right, if dy is positive, it is moved to the
1258 bottom, otherwise it is moved to the left or top respectively.
1259 """
1260 return _core_.Rect_OffsetXY(*args, **kwargs)
1261
1262 def Offset(*args, **kwargs):
1263 """
1264 Offset(self, Point pt)
1265
1266 Same as OffsetXY but uses dx,dy from Point
1267 """
1268 return _core_.Rect_Offset(*args, **kwargs)
1269
1270 def Intersect(*args, **kwargs):
1271 """
1272 Intersect(self, Rect rect) -> Rect
1273
1274 Returns the intersectsion of this rectangle and rect.
1275 """
1276 return _core_.Rect_Intersect(*args, **kwargs)
1277
1278 def Union(*args, **kwargs):
1279 """
1280 Union(self, Rect rect) -> Rect
1281
1282 Returns the union of this rectangle and rect.
1283 """
1284 return _core_.Rect_Union(*args, **kwargs)
1285
1286 def __add__(*args, **kwargs):
1287 """
1288 __add__(self, Rect rect) -> Rect
1289
1290 Add the properties of rect to this rectangle and return the result.
1291 """
1292 return _core_.Rect___add__(*args, **kwargs)
1293
1294 def __iadd__(*args, **kwargs):
1295 """
1296 __iadd__(self, Rect rect) -> Rect
1297
1298 Add the properties of rect to this rectangle, updating this rectangle.
1299 """
1300 return _core_.Rect___iadd__(*args, **kwargs)
1301
1302 def __eq__(*args, **kwargs):
1303 """
1304 __eq__(self, Rect rect) -> bool
1305
1306 Test for equality.
1307 """
1308 return _core_.Rect___eq__(*args, **kwargs)
1309
1310 def __ne__(*args, **kwargs):
1311 """
1312 __ne__(self, Rect rect) -> bool
1313
1314 Test for inequality.
1315 """
1316 return _core_.Rect___ne__(*args, **kwargs)
1317
1318 def InsideXY(*args, **kwargs):
1319 """
1320 InsideXY(self, int x, int y) -> bool
1321
1322 Return True if the point is (not strcitly) inside the rect.
1323 """
1324 return _core_.Rect_InsideXY(*args, **kwargs)
1325
1326 def Inside(*args, **kwargs):
1327 """
1328 Inside(self, Point pt) -> bool
1329
1330 Return True if the point is (not strcitly) inside the rect.
1331 """
1332 return _core_.Rect_Inside(*args, **kwargs)
1333
1334 def Intersects(*args, **kwargs):
1335 """
1336 Intersects(self, Rect rect) -> bool
1337
1338 Returns True if the rectangles have a non empty intersection.
1339 """
1340 return _core_.Rect_Intersects(*args, **kwargs)
1341
1342 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1343 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1344 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1345 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1346 def Set(*args, **kwargs):
1347 """
1348 Set(self, int x=0, int y=0, int width=0, int height=0)
1349
1350 Set all rectangle properties.
1351 """
1352 return _core_.Rect_Set(*args, **kwargs)
1353
1354 def Get(*args, **kwargs):
1355 """
1356 Get() -> (x,y,width,height)
1357
1358 Return the rectangle properties as a tuple.
1359 """
1360 return _core_.Rect_Get(*args, **kwargs)
1361
1362 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1363 def __str__(self): return str(self.Get())
1364 def __repr__(self): return 'wx.Rect'+str(self.Get())
1365 def __len__(self): return len(self.Get())
1366 def __getitem__(self, index): return self.Get()[index]
1367 def __setitem__(self, index, val):
1368 if index == 0: self.x = val
1369 elif index == 1: self.y = val
1370 elif index == 2: self.width = val
1371 elif index == 3: self.height = val
1372 else: raise IndexError
1373 def __nonzero__(self): return self.Get() != (0,0,0,0)
1374 __safe_for_unpickling__ = True
1375 def __reduce__(self): return (wx.Rect, self.Get())
1376
1377
1378 class RectPtr(Rect):
1379 def __init__(self, this):
1380 self.this = this
1381 if not hasattr(self,"thisown"): self.thisown = 0
1382 self.__class__ = Rect
1383 _core_.Rect_swigregister(RectPtr)
1384
1385 def RectPP(*args, **kwargs):
1386 """
1387 RectPP(Point topLeft, Point bottomRight) -> Rect
1388
1389 Create a new Rect object from Points representing two corners.
1390 """
1391 val = _core_.new_RectPP(*args, **kwargs)
1392 val.thisown = 1
1393 return val
1394
1395 def RectPS(*args, **kwargs):
1396 """
1397 RectPS(Point pos, Size size) -> Rect
1398
1399 Create a new Rect from a position and size.
1400 """
1401 val = _core_.new_RectPS(*args, **kwargs)
1402 val.thisown = 1
1403 return val
1404
1405 def RectS(*args, **kwargs):
1406 """
1407 RectS(Size size) -> Rect
1408
1409 Create a new Rect from a size only.
1410 """
1411 val = _core_.new_RectS(*args, **kwargs)
1412 val.thisown = 1
1413 return val
1414
1415
1416 def IntersectRect(*args, **kwargs):
1417 """
1418 IntersectRect(Rect r1, Rect r2) -> Rect
1419
1420 Calculate and return the intersection of r1 and r2.
1421 """
1422 return _core_.IntersectRect(*args, **kwargs)
1423 #---------------------------------------------------------------------------
1424
1425 class Point2D(object):
1426 """
1427 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1428 with floating point values.
1429 """
1430 def __repr__(self):
1431 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1432 def __init__(self, *args, **kwargs):
1433 """
1434 __init__(self, double x=0.0, double y=0.0) -> Point2D
1435
1436 Create a w.Point2D object.
1437 """
1438 newobj = _core_.new_Point2D(*args, **kwargs)
1439 self.this = newobj.this
1440 self.thisown = 1
1441 del newobj.thisown
1442 def GetFloor(*args, **kwargs):
1443 """
1444 GetFloor() -> (x,y)
1445
1446 Convert to integer
1447 """
1448 return _core_.Point2D_GetFloor(*args, **kwargs)
1449
1450 def GetRounded(*args, **kwargs):
1451 """
1452 GetRounded() -> (x,y)
1453
1454 Convert to integer
1455 """
1456 return _core_.Point2D_GetRounded(*args, **kwargs)
1457
1458 def GetVectorLength(*args, **kwargs):
1459 """GetVectorLength(self) -> double"""
1460 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1461
1462 def GetVectorAngle(*args, **kwargs):
1463 """GetVectorAngle(self) -> double"""
1464 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1465
1466 def SetVectorLength(*args, **kwargs):
1467 """SetVectorLength(self, double length)"""
1468 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1469
1470 def SetVectorAngle(*args, **kwargs):
1471 """SetVectorAngle(self, double degrees)"""
1472 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1473
1474 def SetPolarCoordinates(self, angle, length):
1475 self.SetVectorLength(length)
1476 self.SetVectorAngle(angle)
1477 def Normalize(self):
1478 self.SetVectorLength(1.0)
1479
1480 def GetDistance(*args, **kwargs):
1481 """GetDistance(self, Point2D pt) -> double"""
1482 return _core_.Point2D_GetDistance(*args, **kwargs)
1483
1484 def GetDistanceSquare(*args, **kwargs):
1485 """GetDistanceSquare(self, Point2D pt) -> double"""
1486 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1487
1488 def GetDotProduct(*args, **kwargs):
1489 """GetDotProduct(self, Point2D vec) -> double"""
1490 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1491
1492 def GetCrossProduct(*args, **kwargs):
1493 """GetCrossProduct(self, Point2D vec) -> double"""
1494 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1495
1496 def __neg__(*args, **kwargs):
1497 """
1498 __neg__(self) -> Point2D
1499
1500 the reflection of this point
1501 """
1502 return _core_.Point2D___neg__(*args, **kwargs)
1503
1504 def __iadd__(*args, **kwargs):
1505 """__iadd__(self, Point2D pt) -> Point2D"""
1506 return _core_.Point2D___iadd__(*args, **kwargs)
1507
1508 def __isub__(*args, **kwargs):
1509 """__isub__(self, Point2D pt) -> Point2D"""
1510 return _core_.Point2D___isub__(*args, **kwargs)
1511
1512 def __imul__(*args, **kwargs):
1513 """__imul__(self, Point2D pt) -> Point2D"""
1514 return _core_.Point2D___imul__(*args, **kwargs)
1515
1516 def __idiv__(*args, **kwargs):
1517 """__idiv__(self, Point2D pt) -> Point2D"""
1518 return _core_.Point2D___idiv__(*args, **kwargs)
1519
1520 def __eq__(*args, **kwargs):
1521 """
1522 __eq__(self, Point2D pt) -> bool
1523
1524 Test for equality
1525 """
1526 return _core_.Point2D___eq__(*args, **kwargs)
1527
1528 def __ne__(*args, **kwargs):
1529 """
1530 __ne__(self, Point2D pt) -> bool
1531
1532 Test for inequality
1533 """
1534 return _core_.Point2D___ne__(*args, **kwargs)
1535
1536 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1537 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1538 def Set(*args, **kwargs):
1539 """Set(self, double x=0, double y=0)"""
1540 return _core_.Point2D_Set(*args, **kwargs)
1541
1542 def Get(*args, **kwargs):
1543 """
1544 Get() -> (x,y)
1545
1546 Return x and y properties as a tuple.
1547 """
1548 return _core_.Point2D_Get(*args, **kwargs)
1549
1550 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1551 def __str__(self): return str(self.Get())
1552 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1553 def __len__(self): return len(self.Get())
1554 def __getitem__(self, index): return self.Get()[index]
1555 def __setitem__(self, index, val):
1556 if index == 0: self.x = val
1557 elif index == 1: self.y = val
1558 else: raise IndexError
1559 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1560 __safe_for_unpickling__ = True
1561 def __reduce__(self): return (wx.Point2D, self.Get())
1562
1563
1564 class Point2DPtr(Point2D):
1565 def __init__(self, this):
1566 self.this = this
1567 if not hasattr(self,"thisown"): self.thisown = 0
1568 self.__class__ = Point2D
1569 _core_.Point2D_swigregister(Point2DPtr)
1570
1571 def Point2DCopy(*args, **kwargs):
1572 """
1573 Point2DCopy(Point2D pt) -> Point2D
1574
1575 Create a w.Point2D object.
1576 """
1577 val = _core_.new_Point2DCopy(*args, **kwargs)
1578 val.thisown = 1
1579 return val
1580
1581 def Point2DFromPoint(*args, **kwargs):
1582 """
1583 Point2DFromPoint(Point pt) -> Point2D
1584
1585 Create a w.Point2D object.
1586 """
1587 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1588 val.thisown = 1
1589 return val
1590
1591 #---------------------------------------------------------------------------
1592
1593 FromStart = _core_.FromStart
1594 FromCurrent = _core_.FromCurrent
1595 FromEnd = _core_.FromEnd
1596 class InputStream(object):
1597 """Proxy of C++ InputStream class"""
1598 def __repr__(self):
1599 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1600 def __init__(self, *args, **kwargs):
1601 """__init__(self, PyObject p) -> InputStream"""
1602 newobj = _core_.new_InputStream(*args, **kwargs)
1603 self.this = newobj.this
1604 self.thisown = 1
1605 del newobj.thisown
1606 def __del__(self, destroy=_core_.delete_InputStream):
1607 """__del__(self)"""
1608 try:
1609 if self.thisown: destroy(self)
1610 except: pass
1611
1612 def close(*args, **kwargs):
1613 """close(self)"""
1614 return _core_.InputStream_close(*args, **kwargs)
1615
1616 def flush(*args, **kwargs):
1617 """flush(self)"""
1618 return _core_.InputStream_flush(*args, **kwargs)
1619
1620 def eof(*args, **kwargs):
1621 """eof(self) -> bool"""
1622 return _core_.InputStream_eof(*args, **kwargs)
1623
1624 def read(*args, **kwargs):
1625 """read(self, int size=-1) -> PyObject"""
1626 return _core_.InputStream_read(*args, **kwargs)
1627
1628 def readline(*args, **kwargs):
1629 """readline(self, int size=-1) -> PyObject"""
1630 return _core_.InputStream_readline(*args, **kwargs)
1631
1632 def readlines(*args, **kwargs):
1633 """readlines(self, int sizehint=-1) -> PyObject"""
1634 return _core_.InputStream_readlines(*args, **kwargs)
1635
1636 def seek(*args, **kwargs):
1637 """seek(self, int offset, int whence=0)"""
1638 return _core_.InputStream_seek(*args, **kwargs)
1639
1640 def tell(*args, **kwargs):
1641 """tell(self) -> int"""
1642 return _core_.InputStream_tell(*args, **kwargs)
1643
1644 def Peek(*args, **kwargs):
1645 """Peek(self) -> char"""
1646 return _core_.InputStream_Peek(*args, **kwargs)
1647
1648 def GetC(*args, **kwargs):
1649 """GetC(self) -> char"""
1650 return _core_.InputStream_GetC(*args, **kwargs)
1651
1652 def LastRead(*args, **kwargs):
1653 """LastRead(self) -> size_t"""
1654 return _core_.InputStream_LastRead(*args, **kwargs)
1655
1656 def CanRead(*args, **kwargs):
1657 """CanRead(self) -> bool"""
1658 return _core_.InputStream_CanRead(*args, **kwargs)
1659
1660 def Eof(*args, **kwargs):
1661 """Eof(self) -> bool"""
1662 return _core_.InputStream_Eof(*args, **kwargs)
1663
1664 def Ungetch(*args, **kwargs):
1665 """Ungetch(self, char c) -> bool"""
1666 return _core_.InputStream_Ungetch(*args, **kwargs)
1667
1668 def SeekI(*args, **kwargs):
1669 """SeekI(self, long pos, int mode=FromStart) -> long"""
1670 return _core_.InputStream_SeekI(*args, **kwargs)
1671
1672 def TellI(*args, **kwargs):
1673 """TellI(self) -> long"""
1674 return _core_.InputStream_TellI(*args, **kwargs)
1675
1676
1677 class InputStreamPtr(InputStream):
1678 def __init__(self, this):
1679 self.this = this
1680 if not hasattr(self,"thisown"): self.thisown = 0
1681 self.__class__ = InputStream
1682 _core_.InputStream_swigregister(InputStreamPtr)
1683 DefaultPosition = cvar.DefaultPosition
1684 DefaultSize = cvar.DefaultSize
1685
1686 class OutputStream(object):
1687 """Proxy of C++ OutputStream class"""
1688 def __init__(self): raise RuntimeError, "No constructor defined"
1689 def __repr__(self):
1690 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1691 def write(*args, **kwargs):
1692 """write(self, PyObject obj)"""
1693 return _core_.OutputStream_write(*args, **kwargs)
1694
1695
1696 class OutputStreamPtr(OutputStream):
1697 def __init__(self, this):
1698 self.this = this
1699 if not hasattr(self,"thisown"): self.thisown = 0
1700 self.__class__ = OutputStream
1701 _core_.OutputStream_swigregister(OutputStreamPtr)
1702
1703 #---------------------------------------------------------------------------
1704
1705 class FSFile(Object):
1706 """Proxy of C++ FSFile class"""
1707 def __repr__(self):
1708 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1709 def __init__(self, *args, **kwargs):
1710 """
1711 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1712 DateTime modif) -> FSFile
1713 """
1714 newobj = _core_.new_FSFile(*args, **kwargs)
1715 self.this = newobj.this
1716 self.thisown = 1
1717 del newobj.thisown
1718 self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem
1719
1720 def __del__(self, destroy=_core_.delete_FSFile):
1721 """__del__(self)"""
1722 try:
1723 if self.thisown: destroy(self)
1724 except: pass
1725
1726 def GetStream(*args, **kwargs):
1727 """GetStream(self) -> InputStream"""
1728 return _core_.FSFile_GetStream(*args, **kwargs)
1729
1730 def GetMimeType(*args, **kwargs):
1731 """GetMimeType(self) -> String"""
1732 return _core_.FSFile_GetMimeType(*args, **kwargs)
1733
1734 def GetLocation(*args, **kwargs):
1735 """GetLocation(self) -> String"""
1736 return _core_.FSFile_GetLocation(*args, **kwargs)
1737
1738 def GetAnchor(*args, **kwargs):
1739 """GetAnchor(self) -> String"""
1740 return _core_.FSFile_GetAnchor(*args, **kwargs)
1741
1742 def GetModificationTime(*args, **kwargs):
1743 """GetModificationTime(self) -> DateTime"""
1744 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1745
1746
1747 class FSFilePtr(FSFile):
1748 def __init__(self, this):
1749 self.this = this
1750 if not hasattr(self,"thisown"): self.thisown = 0
1751 self.__class__ = FSFile
1752 _core_.FSFile_swigregister(FSFilePtr)
1753
1754 class CPPFileSystemHandler(object):
1755 """Proxy of C++ CPPFileSystemHandler class"""
1756 def __init__(self): raise RuntimeError, "No constructor defined"
1757 def __repr__(self):
1758 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1759
1760 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1761 def __init__(self, this):
1762 self.this = this
1763 if not hasattr(self,"thisown"): self.thisown = 0
1764 self.__class__ = CPPFileSystemHandler
1765 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1766
1767 class FileSystemHandler(CPPFileSystemHandler):
1768 """Proxy of C++ FileSystemHandler class"""
1769 def __repr__(self):
1770 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1771 def __init__(self, *args, **kwargs):
1772 """__init__(self) -> FileSystemHandler"""
1773 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1774 self.this = newobj.this
1775 self.thisown = 1
1776 del newobj.thisown
1777 self._setCallbackInfo(self, FileSystemHandler)
1778
1779 def _setCallbackInfo(*args, **kwargs):
1780 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1781 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1782
1783 def CanOpen(*args, **kwargs):
1784 """CanOpen(self, String location) -> bool"""
1785 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1786
1787 def OpenFile(*args, **kwargs):
1788 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1789 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1790
1791 def FindFirst(*args, **kwargs):
1792 """FindFirst(self, String spec, int flags=0) -> String"""
1793 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1794
1795 def FindNext(*args, **kwargs):
1796 """FindNext(self) -> String"""
1797 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1798
1799 def GetProtocol(*args, **kwargs):
1800 """GetProtocol(self, String location) -> String"""
1801 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1802
1803 def GetLeftLocation(*args, **kwargs):
1804 """GetLeftLocation(self, String location) -> String"""
1805 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1806
1807 def GetAnchor(*args, **kwargs):
1808 """GetAnchor(self, String location) -> String"""
1809 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1810
1811 def GetRightLocation(*args, **kwargs):
1812 """GetRightLocation(self, String location) -> String"""
1813 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1814
1815 def GetMimeTypeFromExt(*args, **kwargs):
1816 """GetMimeTypeFromExt(self, String location) -> String"""
1817 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1818
1819
1820 class FileSystemHandlerPtr(FileSystemHandler):
1821 def __init__(self, this):
1822 self.this = this
1823 if not hasattr(self,"thisown"): self.thisown = 0
1824 self.__class__ = FileSystemHandler
1825 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1826
1827 class FileSystem(Object):
1828 """Proxy of C++ FileSystem class"""
1829 def __repr__(self):
1830 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1831 def __init__(self, *args, **kwargs):
1832 """__init__(self) -> FileSystem"""
1833 newobj = _core_.new_FileSystem(*args, **kwargs)
1834 self.this = newobj.this
1835 self.thisown = 1
1836 del newobj.thisown
1837 def __del__(self, destroy=_core_.delete_FileSystem):
1838 """__del__(self)"""
1839 try:
1840 if self.thisown: destroy(self)
1841 except: pass
1842
1843 def ChangePathTo(*args, **kwargs):
1844 """ChangePathTo(self, String location, bool is_dir=False)"""
1845 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1846
1847 def GetPath(*args, **kwargs):
1848 """GetPath(self) -> String"""
1849 return _core_.FileSystem_GetPath(*args, **kwargs)
1850
1851 def OpenFile(*args, **kwargs):
1852 """OpenFile(self, String location) -> FSFile"""
1853 return _core_.FileSystem_OpenFile(*args, **kwargs)
1854
1855 def FindFirst(*args, **kwargs):
1856 """FindFirst(self, String spec, int flags=0) -> String"""
1857 return _core_.FileSystem_FindFirst(*args, **kwargs)
1858
1859 def FindNext(*args, **kwargs):
1860 """FindNext(self) -> String"""
1861 return _core_.FileSystem_FindNext(*args, **kwargs)
1862
1863 def AddHandler(*args, **kwargs):
1864 """AddHandler(CPPFileSystemHandler handler)"""
1865 return _core_.FileSystem_AddHandler(*args, **kwargs)
1866
1867 AddHandler = staticmethod(AddHandler)
1868 def CleanUpHandlers(*args, **kwargs):
1869 """CleanUpHandlers()"""
1870 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1871
1872 CleanUpHandlers = staticmethod(CleanUpHandlers)
1873 def FileNameToURL(*args, **kwargs):
1874 """FileNameToURL(String filename) -> String"""
1875 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1876
1877 FileNameToURL = staticmethod(FileNameToURL)
1878 def URLToFileName(*args, **kwargs):
1879 """URLToFileName(String url) -> String"""
1880 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1881
1882 URLToFileName = staticmethod(URLToFileName)
1883
1884 class FileSystemPtr(FileSystem):
1885 def __init__(self, this):
1886 self.this = this
1887 if not hasattr(self,"thisown"): self.thisown = 0
1888 self.__class__ = FileSystem
1889 _core_.FileSystem_swigregister(FileSystemPtr)
1890
1891 def FileSystem_AddHandler(*args, **kwargs):
1892 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1893 return _core_.FileSystem_AddHandler(*args, **kwargs)
1894
1895 def FileSystem_CleanUpHandlers(*args, **kwargs):
1896 """FileSystem_CleanUpHandlers()"""
1897 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1898
1899 def FileSystem_FileNameToURL(*args, **kwargs):
1900 """FileSystem_FileNameToURL(String filename) -> String"""
1901 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1902
1903 def FileSystem_URLToFileName(*args, **kwargs):
1904 """FileSystem_URLToFileName(String url) -> String"""
1905 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1906
1907 class InternetFSHandler(CPPFileSystemHandler):
1908 """Proxy of C++ InternetFSHandler class"""
1909 def __repr__(self):
1910 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1911 def __init__(self, *args, **kwargs):
1912 """__init__(self) -> InternetFSHandler"""
1913 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1914 self.this = newobj.this
1915 self.thisown = 1
1916 del newobj.thisown
1917 def CanOpen(*args, **kwargs):
1918 """CanOpen(self, String location) -> bool"""
1919 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1920
1921 def OpenFile(*args, **kwargs):
1922 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1923 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1924
1925
1926 class InternetFSHandlerPtr(InternetFSHandler):
1927 def __init__(self, this):
1928 self.this = this
1929 if not hasattr(self,"thisown"): self.thisown = 0
1930 self.__class__ = InternetFSHandler
1931 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1932
1933 class ZipFSHandler(CPPFileSystemHandler):
1934 """Proxy of C++ ZipFSHandler class"""
1935 def __repr__(self):
1936 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1937 def __init__(self, *args, **kwargs):
1938 """__init__(self) -> ZipFSHandler"""
1939 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1940 self.this = newobj.this
1941 self.thisown = 1
1942 del newobj.thisown
1943 def CanOpen(*args, **kwargs):
1944 """CanOpen(self, String location) -> bool"""
1945 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1946
1947 def OpenFile(*args, **kwargs):
1948 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1949 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1950
1951 def FindFirst(*args, **kwargs):
1952 """FindFirst(self, String spec, int flags=0) -> String"""
1953 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1954
1955 def FindNext(*args, **kwargs):
1956 """FindNext(self) -> String"""
1957 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1958
1959
1960 class ZipFSHandlerPtr(ZipFSHandler):
1961 def __init__(self, this):
1962 self.this = this
1963 if not hasattr(self,"thisown"): self.thisown = 0
1964 self.__class__ = ZipFSHandler
1965 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1966
1967
1968 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1969 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1970 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1971
1972 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1973 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1974 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1975
1976 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1977 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1978 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1979 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1980 """
1981 Add 'file' to the memory filesystem. The dataItem parameter can
1982 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1983 arbitrary data. If a bitmap or image is used then the imgType
1984 parameter should specify what kind of image file it should be
1985 written as, wx.BITMAP_TYPE_PNG, etc.
1986 """
1987 if isinstance(dataItem, wx.Image):
1988 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1989 elif isinstance(dataItem, wx.Bitmap):
1990 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1991 elif type(dataItem) == str:
1992 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1993 else:
1994 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1995
1996 class MemoryFSHandler(CPPFileSystemHandler):
1997 """Proxy of C++ MemoryFSHandler class"""
1998 def __repr__(self):
1999 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2000 def __init__(self, *args, **kwargs):
2001 """__init__(self) -> MemoryFSHandler"""
2002 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
2003 self.this = newobj.this
2004 self.thisown = 1
2005 del newobj.thisown
2006 def RemoveFile(*args, **kwargs):
2007 """RemoveFile(String filename)"""
2008 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2009
2010 RemoveFile = staticmethod(RemoveFile)
2011 AddFile = staticmethod(MemoryFSHandler_AddFile)
2012 def CanOpen(*args, **kwargs):
2013 """CanOpen(self, String location) -> bool"""
2014 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
2015
2016 def OpenFile(*args, **kwargs):
2017 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
2018 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
2019
2020 def FindFirst(*args, **kwargs):
2021 """FindFirst(self, String spec, int flags=0) -> String"""
2022 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
2023
2024 def FindNext(*args, **kwargs):
2025 """FindNext(self) -> String"""
2026 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
2027
2028
2029 class MemoryFSHandlerPtr(MemoryFSHandler):
2030 def __init__(self, this):
2031 self.this = this
2032 if not hasattr(self,"thisown"): self.thisown = 0
2033 self.__class__ = MemoryFSHandler
2034 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2035
2036 def MemoryFSHandler_RemoveFile(*args, **kwargs):
2037 """MemoryFSHandler_RemoveFile(String filename)"""
2038 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2039
2040 IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT
2041 IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD
2042 IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE
2043 #---------------------------------------------------------------------------
2044
2045 class ImageHandler(Object):
2046 """
2047 This is the base class for implementing image file loading/saving, and
2048 image creation from data. It is used within `wx.Image` and is not
2049 normally seen by the application.
2050 """
2051 def __init__(self): raise RuntimeError, "No constructor defined"
2052 def __repr__(self):
2053 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2054 def GetName(*args, **kwargs):
2055 """GetName(self) -> String"""
2056 return _core_.ImageHandler_GetName(*args, **kwargs)
2057
2058 def GetExtension(*args, **kwargs):
2059 """GetExtension(self) -> String"""
2060 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2061
2062 def GetType(*args, **kwargs):
2063 """GetType(self) -> long"""
2064 return _core_.ImageHandler_GetType(*args, **kwargs)
2065
2066 def GetMimeType(*args, **kwargs):
2067 """GetMimeType(self) -> String"""
2068 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2069
2070 def CanRead(*args, **kwargs):
2071 """CanRead(self, String name) -> bool"""
2072 return _core_.ImageHandler_CanRead(*args, **kwargs)
2073
2074 def SetName(*args, **kwargs):
2075 """SetName(self, String name)"""
2076 return _core_.ImageHandler_SetName(*args, **kwargs)
2077
2078 def SetExtension(*args, **kwargs):
2079 """SetExtension(self, String extension)"""
2080 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2081
2082 def SetType(*args, **kwargs):
2083 """SetType(self, long type)"""
2084 return _core_.ImageHandler_SetType(*args, **kwargs)
2085
2086 def SetMimeType(*args, **kwargs):
2087 """SetMimeType(self, String mimetype)"""
2088 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2089
2090
2091 class ImageHandlerPtr(ImageHandler):
2092 def __init__(self, this):
2093 self.this = this
2094 if not hasattr(self,"thisown"): self.thisown = 0
2095 self.__class__ = ImageHandler
2096 _core_.ImageHandler_swigregister(ImageHandlerPtr)
2097
2098 class ImageHistogram(object):
2099 """Proxy of C++ ImageHistogram class"""
2100 def __repr__(self):
2101 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2102 def __init__(self, *args, **kwargs):
2103 """__init__(self) -> ImageHistogram"""
2104 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2105 self.this = newobj.this
2106 self.thisown = 1
2107 del newobj.thisown
2108 def MakeKey(*args, **kwargs):
2109 """
2110 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2111
2112 Get the key in the histogram for the given RGB values
2113 """
2114 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2115
2116 MakeKey = staticmethod(MakeKey)
2117 def FindFirstUnusedColour(*args, **kwargs):
2118 """
2119 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2120
2121 Find first colour that is not used in the image and has higher RGB
2122 values than startR, startG, startB. Returns a tuple consisting of a
2123 success flag and rgb values.
2124 """
2125 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2126
2127 def GetCount(*args, **kwargs):
2128 """
2129 GetCount(self, unsigned long key) -> unsigned long
2130
2131 Returns the pixel count for the given key. Use `MakeKey` to create a
2132 key value from a RGB tripple.
2133 """
2134 return _core_.ImageHistogram_GetCount(*args, **kwargs)
2135
2136 def GetCountRGB(*args, **kwargs):
2137 """
2138 GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2139
2140 Returns the pixel count for the given RGB values.
2141 """
2142 return _core_.ImageHistogram_GetCountRGB(*args, **kwargs)
2143
2144 def GetCountColour(*args, **kwargs):
2145 """
2146 GetCountColour(self, Colour colour) -> unsigned long
2147
2148 Returns the pixel count for the given `wx.Colour` value.
2149 """
2150 return _core_.ImageHistogram_GetCountColour(*args, **kwargs)
2151
2152
2153 class ImageHistogramPtr(ImageHistogram):
2154 def __init__(self, this):
2155 self.this = this
2156 if not hasattr(self,"thisown"): self.thisown = 0
2157 self.__class__ = ImageHistogram
2158 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
2159
2160 def ImageHistogram_MakeKey(*args, **kwargs):
2161 """
2162 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2163
2164 Get the key in the histogram for the given RGB values
2165 """
2166 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2167
2168 class Image(Object):
2169 """Proxy of C++ Image class"""
2170 def __repr__(self):
2171 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2172 def __init__(self, *args, **kwargs):
2173 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2174 newobj = _core_.new_Image(*args, **kwargs)
2175 self.this = newobj.this
2176 self.thisown = 1
2177 del newobj.thisown
2178 def __del__(self, destroy=_core_.delete_Image):
2179 """__del__(self)"""
2180 try:
2181 if self.thisown: destroy(self)
2182 except: pass
2183
2184 def Create(*args, **kwargs):
2185 """Create(self, int width, int height)"""
2186 return _core_.Image_Create(*args, **kwargs)
2187
2188 def Destroy(*args, **kwargs):
2189 """
2190 Destroy(self)
2191
2192 Deletes the C++ object this Python object is a proxy for.
2193 """
2194 return _core_.Image_Destroy(*args, **kwargs)
2195
2196 def Scale(*args, **kwargs):
2197 """Scale(self, int width, int height) -> Image"""
2198 return _core_.Image_Scale(*args, **kwargs)
2199
2200 def ShrinkBy(*args, **kwargs):
2201 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2202 return _core_.Image_ShrinkBy(*args, **kwargs)
2203
2204 def Rescale(*args, **kwargs):
2205 """Rescale(self, int width, int height) -> Image"""
2206 return _core_.Image_Rescale(*args, **kwargs)
2207
2208 def Resize(*args, **kwargs):
2209 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2210 return _core_.Image_Resize(*args, **kwargs)
2211
2212 def SetRGB(*args, **kwargs):
2213 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2214 return _core_.Image_SetRGB(*args, **kwargs)
2215
2216 def SetRGBRect(*args, **kwargs):
2217 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2218 return _core_.Image_SetRGBRect(*args, **kwargs)
2219
2220 def GetRed(*args, **kwargs):
2221 """GetRed(self, int x, int y) -> unsigned char"""
2222 return _core_.Image_GetRed(*args, **kwargs)
2223
2224 def GetGreen(*args, **kwargs):
2225 """GetGreen(self, int x, int y) -> unsigned char"""
2226 return _core_.Image_GetGreen(*args, **kwargs)
2227
2228 def GetBlue(*args, **kwargs):
2229 """GetBlue(self, int x, int y) -> unsigned char"""
2230 return _core_.Image_GetBlue(*args, **kwargs)
2231
2232 def SetAlpha(*args, **kwargs):
2233 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2234 return _core_.Image_SetAlpha(*args, **kwargs)
2235
2236 def GetAlpha(*args, **kwargs):
2237 """GetAlpha(self, int x, int y) -> unsigned char"""
2238 return _core_.Image_GetAlpha(*args, **kwargs)
2239
2240 def HasAlpha(*args, **kwargs):
2241 """HasAlpha(self) -> bool"""
2242 return _core_.Image_HasAlpha(*args, **kwargs)
2243
2244 def InitAlpha(*args, **kwargs):
2245 """
2246 InitAlpha(self)
2247
2248 Initializes the image alpha channel data. It is an error to call it if
2249 the image already has alpha data. If it doesn't, alpha data will be by
2250 default initialized to all pixels being fully opaque. But if the image
2251 has a a mask colour, all mask pixels will be completely transparent.
2252 """
2253 return _core_.Image_InitAlpha(*args, **kwargs)
2254
2255 def IsTransparent(*args, **kwargs):
2256 """
2257 IsTransparent(self, int x, int y, unsigned char threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2258
2259 Returns True if this pixel is masked or has an alpha value less than
2260 the spcified threshold.
2261 """
2262 return _core_.Image_IsTransparent(*args, **kwargs)
2263
2264 def FindFirstUnusedColour(*args, **kwargs):
2265 """
2266 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2267
2268 Find first colour that is not used in the image and has higher RGB
2269 values than startR, startG, startB. Returns a tuple consisting of a
2270 success flag and rgb values.
2271 """
2272 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2273
2274 def ConvertAlphaToMask(*args, **kwargs):
2275 """
2276 ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2277
2278 If the image has alpha channel, this method converts it to mask. All pixels
2279 with alpha value less than ``threshold`` are replaced with mask colour and the
2280 alpha channel is removed. Mask colour is chosen automatically using
2281 `FindFirstUnusedColour`.
2282
2283 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2284 nothing.
2285 """
2286 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2287
2288 def ConvertColourToAlpha(*args, **kwargs):
2289 """
2290 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2291
2292 This method converts an image where the original alpha information is
2293 only available as a shades of a colour (actually shades of grey)
2294 typically when you draw anti-aliased text into a bitmap. The DC
2295 drawing routines draw grey values on the black background although
2296 they actually mean to draw white with differnt alpha values. This
2297 method reverses it, assuming a black (!) background and white text.
2298 The method will then fill up the whole image with the colour given.
2299 """
2300 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2301
2302 def SetMaskFromImage(*args, **kwargs):
2303 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2304 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2305
2306 def CanRead(*args, **kwargs):
2307 """CanRead(String name) -> bool"""
2308 return _core_.Image_CanRead(*args, **kwargs)
2309
2310 CanRead = staticmethod(CanRead)
2311 def GetImageCount(*args, **kwargs):
2312 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2313 return _core_.Image_GetImageCount(*args, **kwargs)
2314
2315 GetImageCount = staticmethod(GetImageCount)
2316 def LoadFile(*args, **kwargs):
2317 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2318 return _core_.Image_LoadFile(*args, **kwargs)
2319
2320 def LoadMimeFile(*args, **kwargs):
2321 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2322 return _core_.Image_LoadMimeFile(*args, **kwargs)
2323
2324 def SaveFile(*args, **kwargs):
2325 """SaveFile(self, String name, int type) -> bool"""
2326 return _core_.Image_SaveFile(*args, **kwargs)
2327
2328 def SaveMimeFile(*args, **kwargs):
2329 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2330 return _core_.Image_SaveMimeFile(*args, **kwargs)
2331
2332 def CanReadStream(*args, **kwargs):
2333 """CanReadStream(InputStream stream) -> bool"""
2334 return _core_.Image_CanReadStream(*args, **kwargs)
2335
2336 CanReadStream = staticmethod(CanReadStream)
2337 def LoadStream(*args, **kwargs):
2338 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2339 return _core_.Image_LoadStream(*args, **kwargs)
2340
2341 def LoadMimeStream(*args, **kwargs):
2342 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2343 return _core_.Image_LoadMimeStream(*args, **kwargs)
2344
2345 def Ok(*args, **kwargs):
2346 """Ok(self) -> bool"""
2347 return _core_.Image_Ok(*args, **kwargs)
2348
2349 def GetWidth(*args, **kwargs):
2350 """GetWidth(self) -> int"""
2351 return _core_.Image_GetWidth(*args, **kwargs)
2352
2353 def GetHeight(*args, **kwargs):
2354 """GetHeight(self) -> int"""
2355 return _core_.Image_GetHeight(*args, **kwargs)
2356
2357 def GetSize(*args, **kwargs):
2358 """GetSize(self) -> Size"""
2359 return _core_.Image_GetSize(*args, **kwargs)
2360
2361 def GetSubImage(*args, **kwargs):
2362 """GetSubImage(self, Rect rect) -> Image"""
2363 return _core_.Image_GetSubImage(*args, **kwargs)
2364
2365 def Size(*args, **kwargs):
2366 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2367 return _core_.Image_Size(*args, **kwargs)
2368
2369 def Copy(*args, **kwargs):
2370 """Copy(self) -> Image"""
2371 return _core_.Image_Copy(*args, **kwargs)
2372
2373 def Paste(*args, **kwargs):
2374 """Paste(self, Image image, int x, int y)"""
2375 return _core_.Image_Paste(*args, **kwargs)
2376
2377 def GetData(*args, **kwargs):
2378 """
2379 GetData(self) -> PyObject
2380
2381 Returns a string containing a copy of the RGB bytes of the image.
2382 """
2383 return _core_.Image_GetData(*args, **kwargs)
2384
2385 def SetData(*args, **kwargs):
2386 """
2387 SetData(self, buffer data)
2388
2389 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2390 either a string or a buffer object holding the data and the length of
2391 the data must be width*height*3.
2392 """
2393 return _core_.Image_SetData(*args, **kwargs)
2394
2395 def GetDataBuffer(*args, **kwargs):
2396 """
2397 GetDataBuffer(self) -> PyObject
2398
2399 Returns a writable Python buffer object that is pointing at the RGB
2400 image data buffer inside the wx.Image.
2401 """
2402 return _core_.Image_GetDataBuffer(*args, **kwargs)
2403
2404 def SetDataBuffer(*args, **kwargs):
2405 """
2406 SetDataBuffer(self, buffer data)
2407
2408 Sets the internal image data pointer to point at a Python buffer
2409 object. This can save a copy of the data but you must ensure that the
2410 buffer object lives longer than the wx.Image does.
2411 """
2412 return _core_.Image_SetDataBuffer(*args, **kwargs)
2413
2414 def GetAlphaData(*args, **kwargs):
2415 """
2416 GetAlphaData(self) -> PyObject
2417
2418 Returns a string containing a copy of the alpha bytes of the image.
2419 """
2420 return _core_.Image_GetAlphaData(*args, **kwargs)
2421
2422 def SetAlphaData(*args, **kwargs):
2423 """
2424 SetAlphaData(self, buffer alpha)
2425
2426 Resets the Image's alpha data from a buffer of bytes. Accepts either
2427 a string or a buffer object holding the data and the length of the
2428 data must be width*height.
2429 """
2430 return _core_.Image_SetAlphaData(*args, **kwargs)
2431
2432 def GetAlphaBuffer(*args, **kwargs):
2433 """GetAlphaBuffer(self) -> PyObject"""
2434 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2435
2436 def SetAlphaBuffer(*args, **kwargs):
2437 """SetAlphaBuffer(self, buffer alpha)"""
2438 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2439
2440 def SetMaskColour(*args, **kwargs):
2441 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2442 return _core_.Image_SetMaskColour(*args, **kwargs)
2443
2444 def GetOrFindMaskColour(*args, **kwargs):
2445 """
2446 GetOrFindMaskColour() -> (r,g,b)
2447
2448 Get the current mask colour or find a suitable colour.
2449 """
2450 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2451
2452 def GetMaskRed(*args, **kwargs):
2453 """GetMaskRed(self) -> unsigned char"""
2454 return _core_.Image_GetMaskRed(*args, **kwargs)
2455
2456 def GetMaskGreen(*args, **kwargs):
2457 """GetMaskGreen(self) -> unsigned char"""
2458 return _core_.Image_GetMaskGreen(*args, **kwargs)
2459
2460 def GetMaskBlue(*args, **kwargs):
2461 """GetMaskBlue(self) -> unsigned char"""
2462 return _core_.Image_GetMaskBlue(*args, **kwargs)
2463
2464 def SetMask(*args, **kwargs):
2465 """SetMask(self, bool mask=True)"""
2466 return _core_.Image_SetMask(*args, **kwargs)
2467
2468 def HasMask(*args, **kwargs):
2469 """HasMask(self) -> bool"""
2470 return _core_.Image_HasMask(*args, **kwargs)
2471
2472 def Rotate(*args, **kwargs):
2473 """
2474 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2475 Point offset_after_rotation=None) -> Image
2476 """
2477 return _core_.Image_Rotate(*args, **kwargs)
2478
2479 def Rotate90(*args, **kwargs):
2480 """Rotate90(self, bool clockwise=True) -> Image"""
2481 return _core_.Image_Rotate90(*args, **kwargs)
2482
2483 def Mirror(*args, **kwargs):
2484 """Mirror(self, bool horizontally=True) -> Image"""
2485 return _core_.Image_Mirror(*args, **kwargs)
2486
2487 def Replace(*args, **kwargs):
2488 """
2489 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2490 unsigned char r2, unsigned char g2, unsigned char b2)
2491 """
2492 return _core_.Image_Replace(*args, **kwargs)
2493
2494 def ConvertToMono(*args, **kwargs):
2495 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2496 return _core_.Image_ConvertToMono(*args, **kwargs)
2497
2498 def SetOption(*args, **kwargs):
2499 """SetOption(self, String name, String value)"""
2500 return _core_.Image_SetOption(*args, **kwargs)
2501
2502 def SetOptionInt(*args, **kwargs):
2503 """SetOptionInt(self, String name, int value)"""
2504 return _core_.Image_SetOptionInt(*args, **kwargs)
2505
2506 def GetOption(*args, **kwargs):
2507 """GetOption(self, String name) -> String"""
2508 return _core_.Image_GetOption(*args, **kwargs)
2509
2510 def GetOptionInt(*args, **kwargs):
2511 """GetOptionInt(self, String name) -> int"""
2512 return _core_.Image_GetOptionInt(*args, **kwargs)
2513
2514 def HasOption(*args, **kwargs):
2515 """HasOption(self, String name) -> bool"""
2516 return _core_.Image_HasOption(*args, **kwargs)
2517
2518 def CountColours(*args, **kwargs):
2519 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2520 return _core_.Image_CountColours(*args, **kwargs)
2521
2522 def ComputeHistogram(*args, **kwargs):
2523 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2524 return _core_.Image_ComputeHistogram(*args, **kwargs)
2525
2526 def AddHandler(*args, **kwargs):
2527 """AddHandler(ImageHandler handler)"""
2528 return _core_.Image_AddHandler(*args, **kwargs)
2529
2530 AddHandler = staticmethod(AddHandler)
2531 def InsertHandler(*args, **kwargs):
2532 """InsertHandler(ImageHandler handler)"""
2533 return _core_.Image_InsertHandler(*args, **kwargs)
2534
2535 InsertHandler = staticmethod(InsertHandler)
2536 def RemoveHandler(*args, **kwargs):
2537 """RemoveHandler(String name) -> bool"""
2538 return _core_.Image_RemoveHandler(*args, **kwargs)
2539
2540 RemoveHandler = staticmethod(RemoveHandler)
2541 def GetImageExtWildcard(*args, **kwargs):
2542 """GetImageExtWildcard() -> String"""
2543 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2544
2545 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2546 def ConvertToBitmap(*args, **kwargs):
2547 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2548 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2549
2550 def ConvertToMonoBitmap(*args, **kwargs):
2551 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2552 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2553
2554 def __nonzero__(self): return self.Ok()
2555
2556 class ImagePtr(Image):
2557 def __init__(self, this):
2558 self.this = this
2559 if not hasattr(self,"thisown"): self.thisown = 0
2560 self.__class__ = Image
2561 _core_.Image_swigregister(ImagePtr)
2562
2563 def ImageFromMime(*args, **kwargs):
2564 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2565 val = _core_.new_ImageFromMime(*args, **kwargs)
2566 val.thisown = 1
2567 return val
2568
2569 def ImageFromStream(*args, **kwargs):
2570 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2571 val = _core_.new_ImageFromStream(*args, **kwargs)
2572 val.thisown = 1
2573 return val
2574
2575 def ImageFromStreamMime(*args, **kwargs):
2576 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2577 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2578 val.thisown = 1
2579 return val
2580
2581 def EmptyImage(*args, **kwargs):
2582 """
2583 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2584
2585 Construct an empty image of a given size, optionally setting all
2586 pixels to black.
2587 """
2588 val = _core_.new_EmptyImage(*args, **kwargs)
2589 val.thisown = 1
2590 return val
2591
2592 def ImageFromBitmap(*args, **kwargs):
2593 """
2594 ImageFromBitmap(Bitmap bitmap) -> Image
2595
2596 Construct an Image from a `wx.Bitmap`.
2597 """
2598 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2599 val.thisown = 1
2600 return val
2601
2602 def ImageFromData(*args, **kwargs):
2603 """
2604 ImageFromData(int width, int height, buffer data) -> Image
2605
2606 Construct an Image from a buffer of RGB bytes. Accepts either a
2607 string or a buffer object holding the data and the length of the data
2608 must be width*height*3.
2609 """
2610 val = _core_.new_ImageFromData(*args, **kwargs)
2611 val.thisown = 1
2612 return val
2613
2614 def ImageFromDataWithAlpha(*args, **kwargs):
2615 """
2616 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
2617
2618 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2619 Accepts either a string or a buffer object holding the data and the
2620 length of the data must be width*height*3.
2621 """
2622 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2623 val.thisown = 1
2624 return val
2625
2626 def Image_CanRead(*args, **kwargs):
2627 """Image_CanRead(String name) -> bool"""
2628 return _core_.Image_CanRead(*args, **kwargs)
2629
2630 def Image_GetImageCount(*args, **kwargs):
2631 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2632 return _core_.Image_GetImageCount(*args, **kwargs)
2633
2634 def Image_CanReadStream(*args, **kwargs):
2635 """Image_CanReadStream(InputStream stream) -> bool"""
2636 return _core_.Image_CanReadStream(*args, **kwargs)
2637
2638 def Image_AddHandler(*args, **kwargs):
2639 """Image_AddHandler(ImageHandler handler)"""
2640 return _core_.Image_AddHandler(*args, **kwargs)
2641
2642 def Image_InsertHandler(*args, **kwargs):
2643 """Image_InsertHandler(ImageHandler handler)"""
2644 return _core_.Image_InsertHandler(*args, **kwargs)
2645
2646 def Image_RemoveHandler(*args, **kwargs):
2647 """Image_RemoveHandler(String name) -> bool"""
2648 return _core_.Image_RemoveHandler(*args, **kwargs)
2649
2650 def Image_GetImageExtWildcard(*args, **kwargs):
2651 """Image_GetImageExtWildcard() -> String"""
2652 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2653
2654 def InitAllImageHandlers():
2655 """
2656 The former functionality of InitAllImageHanders is now done internal to
2657 the _core_ extension module and so this function has become a simple NOP.
2658 """
2659 pass
2660
2661 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2662 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2663 PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
2664 PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
2665 PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
2666 BMP_24BPP = _core_.BMP_24BPP
2667 BMP_8BPP = _core_.BMP_8BPP
2668 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2669 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2670 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2671 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2672 BMP_4BPP = _core_.BMP_4BPP
2673 BMP_1BPP = _core_.BMP_1BPP
2674 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2675 class BMPHandler(ImageHandler):
2676 """A `wx.ImageHandler` for \*.bmp bitmap files."""
2677 def __repr__(self):
2678 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2679 def __init__(self, *args, **kwargs):
2680 """
2681 __init__(self) -> BMPHandler
2682
2683 A `wx.ImageHandler` for \*.bmp bitmap files.
2684 """
2685 newobj = _core_.new_BMPHandler(*args, **kwargs)
2686 self.this = newobj.this
2687 self.thisown = 1
2688 del newobj.thisown
2689
2690 class BMPHandlerPtr(BMPHandler):
2691 def __init__(self, this):
2692 self.this = this
2693 if not hasattr(self,"thisown"): self.thisown = 0
2694 self.__class__ = BMPHandler
2695 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2696 NullImage = cvar.NullImage
2697 IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
2698 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2699 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2700 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2701 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2702 IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2703 IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
2704 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2705 IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
2706 IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2707 IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2708 IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2709 IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
2710 IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2711 IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
2712
2713 class ICOHandler(BMPHandler):
2714 """A `wx.ImageHandler` for \*.ico icon files."""
2715 def __repr__(self):
2716 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2717 def __init__(self, *args, **kwargs):
2718 """
2719 __init__(self) -> ICOHandler
2720
2721 A `wx.ImageHandler` for \*.ico icon files.
2722 """
2723 newobj = _core_.new_ICOHandler(*args, **kwargs)
2724 self.this = newobj.this
2725 self.thisown = 1
2726 del newobj.thisown
2727
2728 class ICOHandlerPtr(ICOHandler):
2729 def __init__(self, this):
2730 self.this = this
2731 if not hasattr(self,"thisown"): self.thisown = 0
2732 self.__class__ = ICOHandler
2733 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2734
2735 class CURHandler(ICOHandler):
2736 """A `wx.ImageHandler` for \*.cur cursor files."""
2737 def __repr__(self):
2738 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2739 def __init__(self, *args, **kwargs):
2740 """
2741 __init__(self) -> CURHandler
2742
2743 A `wx.ImageHandler` for \*.cur cursor files.
2744 """
2745 newobj = _core_.new_CURHandler(*args, **kwargs)
2746 self.this = newobj.this
2747 self.thisown = 1
2748 del newobj.thisown
2749
2750 class CURHandlerPtr(CURHandler):
2751 def __init__(self, this):
2752 self.this = this
2753 if not hasattr(self,"thisown"): self.thisown = 0
2754 self.__class__ = CURHandler
2755 _core_.CURHandler_swigregister(CURHandlerPtr)
2756
2757 class ANIHandler(CURHandler):
2758 """A `wx.ImageHandler` for \*.ani animated cursor files."""
2759 def __repr__(self):
2760 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2761 def __init__(self, *args, **kwargs):
2762 """
2763 __init__(self) -> ANIHandler
2764
2765 A `wx.ImageHandler` for \*.ani animated cursor files.
2766 """
2767 newobj = _core_.new_ANIHandler(*args, **kwargs)
2768 self.this = newobj.this
2769 self.thisown = 1
2770 del newobj.thisown
2771
2772 class ANIHandlerPtr(ANIHandler):
2773 def __init__(self, this):
2774 self.this = this
2775 if not hasattr(self,"thisown"): self.thisown = 0
2776 self.__class__ = ANIHandler
2777 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2778
2779 class PNGHandler(ImageHandler):
2780 """A `wx.ImageHandler` for PNG image files."""
2781 def __repr__(self):
2782 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2783 def __init__(self, *args, **kwargs):
2784 """
2785 __init__(self) -> PNGHandler
2786
2787 A `wx.ImageHandler` for PNG image files.
2788 """
2789 newobj = _core_.new_PNGHandler(*args, **kwargs)
2790 self.this = newobj.this
2791 self.thisown = 1
2792 del newobj.thisown
2793
2794 class PNGHandlerPtr(PNGHandler):
2795 def __init__(self, this):
2796 self.this = this
2797 if not hasattr(self,"thisown"): self.thisown = 0
2798 self.__class__ = PNGHandler
2799 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2800
2801 class GIFHandler(ImageHandler):
2802 """A `wx.ImageHandler` for GIF image files."""
2803 def __repr__(self):
2804 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2805 def __init__(self, *args, **kwargs):
2806 """
2807 __init__(self) -> GIFHandler
2808
2809 A `wx.ImageHandler` for GIF image files.
2810 """
2811 newobj = _core_.new_GIFHandler(*args, **kwargs)
2812 self.this = newobj.this
2813 self.thisown = 1
2814 del newobj.thisown
2815
2816 class GIFHandlerPtr(GIFHandler):
2817 def __init__(self, this):
2818 self.this = this
2819 if not hasattr(self,"thisown"): self.thisown = 0
2820 self.__class__ = GIFHandler
2821 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2822
2823 class PCXHandler(ImageHandler):
2824 """A `wx.ImageHandler` for PCX imager files."""
2825 def __repr__(self):
2826 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2827 def __init__(self, *args, **kwargs):
2828 """
2829 __init__(self) -> PCXHandler
2830
2831 A `wx.ImageHandler` for PCX imager files.
2832 """
2833 newobj = _core_.new_PCXHandler(*args, **kwargs)
2834 self.this = newobj.this
2835 self.thisown = 1
2836 del newobj.thisown
2837
2838 class PCXHandlerPtr(PCXHandler):
2839 def __init__(self, this):
2840 self.this = this
2841 if not hasattr(self,"thisown"): self.thisown = 0
2842 self.__class__ = PCXHandler
2843 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2844
2845 class JPEGHandler(ImageHandler):
2846 """A `wx.ImageHandler` for JPEG/JPG image files."""
2847 def __repr__(self):
2848 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2849 def __init__(self, *args, **kwargs):
2850 """
2851 __init__(self) -> JPEGHandler
2852
2853 A `wx.ImageHandler` for JPEG/JPG image files.
2854 """
2855 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2856 self.this = newobj.this
2857 self.thisown = 1
2858 del newobj.thisown
2859
2860 class JPEGHandlerPtr(JPEGHandler):
2861 def __init__(self, this):
2862 self.this = this
2863 if not hasattr(self,"thisown"): self.thisown = 0
2864 self.__class__ = JPEGHandler
2865 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2866
2867 class PNMHandler(ImageHandler):
2868 """A `wx.ImageHandler` for PNM image files."""
2869 def __repr__(self):
2870 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2871 def __init__(self, *args, **kwargs):
2872 """
2873 __init__(self) -> PNMHandler
2874
2875 A `wx.ImageHandler` for PNM image files.
2876 """
2877 newobj = _core_.new_PNMHandler(*args, **kwargs)
2878 self.this = newobj.this
2879 self.thisown = 1
2880 del newobj.thisown
2881
2882 class PNMHandlerPtr(PNMHandler):
2883 def __init__(self, this):
2884 self.this = this
2885 if not hasattr(self,"thisown"): self.thisown = 0
2886 self.__class__ = PNMHandler
2887 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2888
2889 class XPMHandler(ImageHandler):
2890 """A `wx.ImageHandler` for XPM image."""
2891 def __repr__(self):
2892 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2893 def __init__(self, *args, **kwargs):
2894 """
2895 __init__(self) -> XPMHandler
2896
2897 A `wx.ImageHandler` for XPM image.
2898 """
2899 newobj = _core_.new_XPMHandler(*args, **kwargs)
2900 self.this = newobj.this
2901 self.thisown = 1
2902 del newobj.thisown
2903
2904 class XPMHandlerPtr(XPMHandler):
2905 def __init__(self, this):
2906 self.this = this
2907 if not hasattr(self,"thisown"): self.thisown = 0
2908 self.__class__ = XPMHandler
2909 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2910
2911 class TIFFHandler(ImageHandler):
2912 """A `wx.ImageHandler` for TIFF image files."""
2913 def __repr__(self):
2914 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2915 def __init__(self, *args, **kwargs):
2916 """
2917 __init__(self) -> TIFFHandler
2918
2919 A `wx.ImageHandler` for TIFF image files.
2920 """
2921 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2922 self.this = newobj.this
2923 self.thisown = 1
2924 del newobj.thisown
2925
2926 class TIFFHandlerPtr(TIFFHandler):
2927 def __init__(self, this):
2928 self.this = this
2929 if not hasattr(self,"thisown"): self.thisown = 0
2930 self.__class__ = TIFFHandler
2931 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2932
2933 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2934 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2935 class Quantize(object):
2936 """Performs quantization, or colour reduction, on a wxImage."""
2937 def __init__(self): raise RuntimeError, "No constructor defined"
2938 def __repr__(self):
2939 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2940 def Quantize(*args, **kwargs):
2941 """
2942 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2943
2944 Reduce the colours in the source image and put the result into the
2945 destination image, setting the palette in the destination if
2946 needed. Both images may be the same, to overwrite the source image.
2947 """
2948 return _core_.Quantize_Quantize(*args, **kwargs)
2949
2950 Quantize = staticmethod(Quantize)
2951
2952 class QuantizePtr(Quantize):
2953 def __init__(self, this):
2954 self.this = this
2955 if not hasattr(self,"thisown"): self.thisown = 0
2956 self.__class__ = Quantize
2957 _core_.Quantize_swigregister(QuantizePtr)
2958
2959 def Quantize_Quantize(*args, **kwargs):
2960 """
2961 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2962
2963 Reduce the colours in the source image and put the result into the
2964 destination image, setting the palette in the destination if
2965 needed. Both images may be the same, to overwrite the source image.
2966 """
2967 return _core_.Quantize_Quantize(*args, **kwargs)
2968
2969 #---------------------------------------------------------------------------
2970
2971 class EvtHandler(Object):
2972 """Proxy of C++ EvtHandler class"""
2973 def __repr__(self):
2974 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2975 def __init__(self, *args, **kwargs):
2976 """__init__(self) -> EvtHandler"""
2977 newobj = _core_.new_EvtHandler(*args, **kwargs)
2978 self.this = newobj.this
2979 self.thisown = 1
2980 del newobj.thisown
2981 def GetNextHandler(*args, **kwargs):
2982 """GetNextHandler(self) -> EvtHandler"""
2983 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2984
2985 def GetPreviousHandler(*args, **kwargs):
2986 """GetPreviousHandler(self) -> EvtHandler"""
2987 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2988
2989 def SetNextHandler(*args, **kwargs):
2990 """SetNextHandler(self, EvtHandler handler)"""
2991 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2992
2993 def SetPreviousHandler(*args, **kwargs):
2994 """SetPreviousHandler(self, EvtHandler handler)"""
2995 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2996
2997 def GetEvtHandlerEnabled(*args, **kwargs):
2998 """GetEvtHandlerEnabled(self) -> bool"""
2999 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
3000
3001 def SetEvtHandlerEnabled(*args, **kwargs):
3002 """SetEvtHandlerEnabled(self, bool enabled)"""
3003 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
3004
3005 def ProcessEvent(*args, **kwargs):
3006 """ProcessEvent(self, Event event) -> bool"""
3007 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
3008
3009 def AddPendingEvent(*args, **kwargs):
3010 """AddPendingEvent(self, Event event)"""
3011 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
3012
3013 def ProcessPendingEvents(*args, **kwargs):
3014 """ProcessPendingEvents(self)"""
3015 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
3016
3017 def Connect(*args, **kwargs):
3018 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
3019 return _core_.EvtHandler_Connect(*args, **kwargs)
3020
3021 def Disconnect(*args, **kwargs):
3022 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
3023 return _core_.EvtHandler_Disconnect(*args, **kwargs)
3024
3025 def _setOORInfo(*args, **kwargs):
3026 """_setOORInfo(self, PyObject _self, bool incref=True)"""
3027 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
3028
3029 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3030 """
3031 Bind an event to an event handler.
3032
3033 :param event: One of the EVT_* objects that specifies the
3034 type of event to bind,
3035
3036 :param handler: A callable object to be invoked when the
3037 event is delivered to self. Pass None to
3038 disconnect an event handler.
3039
3040 :param source: Sometimes the event originates from a
3041 different window than self, but you still
3042 want to catch it in self. (For example, a
3043 button event delivered to a frame.) By
3044 passing the source of the event, the event
3045 handling system is able to differentiate
3046 between the same event type from different
3047 controls.
3048
3049 :param id: Used to spcify the event source by ID instead
3050 of instance.
3051
3052 :param id2: Used when it is desirable to bind a handler
3053 to a range of IDs, such as with EVT_MENU_RANGE.
3054 """
3055 if source is not None:
3056 id = source.GetId()
3057 event.Bind(self, id, id2, handler)
3058
3059 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3060 """
3061 Disconencts the event handler binding for event from self.
3062 Returns True if successful.
3063 """
3064 if source is not None:
3065 id = source.GetId()
3066 return event.Unbind(self, id, id2)
3067
3068
3069 class EvtHandlerPtr(EvtHandler):
3070 def __init__(self, this):
3071 self.this = this
3072 if not hasattr(self,"thisown"): self.thisown = 0
3073 self.__class__ = EvtHandler
3074 _core_.EvtHandler_swigregister(EvtHandlerPtr)
3075
3076 #---------------------------------------------------------------------------
3077
3078 class PyEventBinder(object):
3079 """
3080 Instances of this class are used to bind specific events to event
3081 handlers.
3082 """
3083 def __init__(self, evtType, expectedIDs=0):
3084 if expectedIDs not in [0, 1, 2]:
3085 raise ValueError, "Invalid number of expectedIDs"
3086 self.expectedIDs = expectedIDs
3087
3088 if type(evtType) == list or type(evtType) == tuple:
3089 self.evtType = evtType
3090 else:
3091 self.evtType = [evtType]
3092
3093
3094 def Bind(self, target, id1, id2, function):
3095 """Bind this set of event types to target."""
3096 for et in self.evtType:
3097 target.Connect(id1, id2, et, function)
3098
3099
3100 def Unbind(self, target, id1, id2):
3101 """Remove an event binding."""
3102 success = 0
3103 for et in self.evtType:
3104 success += target.Disconnect(id1, id2, et)
3105 return success != 0
3106
3107
3108 def __call__(self, *args):
3109 """
3110 For backwards compatibility with the old EVT_* functions.
3111 Should be called with either (window, func), (window, ID,
3112 func) or (window, ID1, ID2, func) parameters depending on the
3113 type of the event.
3114 """
3115 assert len(args) == 2 + self.expectedIDs
3116 id1 = wx.ID_ANY
3117 id2 = wx.ID_ANY
3118 target = args[0]
3119 if self.expectedIDs == 0:
3120 func = args[1]
3121 elif self.expectedIDs == 1:
3122 id1 = args[1]
3123 func = args[2]
3124 elif self.expectedIDs == 2:
3125 id1 = args[1]
3126 id2 = args[2]
3127 func = args[3]
3128 else:
3129 raise ValueError, "Unexpected number of IDs"
3130
3131 self.Bind(target, id1, id2, func)
3132
3133
3134 # These two are square pegs that don't fit the PyEventBinder hole...
3135 def EVT_COMMAND(win, id, cmd, func):
3136 win.Connect(id, -1, cmd, func)
3137 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
3138 win.Connect(id1, id2, cmd, func)
3139
3140
3141 #---------------------------------------------------------------------------
3142
3143 #---------------------------------------------------------------------------
3144
3145 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
3146 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
3147
3148 def NewEventType(*args, **kwargs):
3149 """NewEventType() -> wxEventType"""
3150 return _core_.NewEventType(*args, **kwargs)
3151 wxEVT_NULL = _core_.wxEVT_NULL
3152 wxEVT_FIRST = _core_.wxEVT_FIRST
3153 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
3154 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
3155 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
3156 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
3157 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
3158 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3159 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3160 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
3161 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3162 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3163 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3164 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3165 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3166 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3167 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3168 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3169 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3170 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3171 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3172 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3173 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3174 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3175 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3176 wxEVT_MOTION = _core_.wxEVT_MOTION
3177 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3178 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3179 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3180 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3181 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3182 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3183 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3184 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3185 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3186 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3187 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3188 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3189 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3190 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3191 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3192 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3193 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3194 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3195 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3196 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3197 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3198 wxEVT_CHAR = _core_.wxEVT_CHAR
3199 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3200 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3201 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3202 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3203 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3204 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3205 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3206 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3207 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3208 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3209 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3210 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3211 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3212 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3213 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3214 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3215 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3216 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3217 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3218 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3219 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3220 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3221 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3222 wxEVT_SIZE = _core_.wxEVT_SIZE
3223 wxEVT_MOVE = _core_.wxEVT_MOVE
3224 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3225 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3226 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3227 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3228 wxEVT_POWER = _core_.wxEVT_POWER
3229 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3230 wxEVT_CREATE = _core_.wxEVT_CREATE
3231 wxEVT_DESTROY = _core_.wxEVT_DESTROY
3232 wxEVT_SHOW = _core_.wxEVT_SHOW
3233 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3234 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3235 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3236 wxEVT_PAINT = _core_.wxEVT_PAINT
3237 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3238 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3239 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3240 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3241 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3242 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3243 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3244 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3245 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3246 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3247 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3248 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3249 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3250 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3251 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3252 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3253 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3254 wxEVT_IDLE = _core_.wxEVT_IDLE
3255 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3256 wxEVT_SIZING = _core_.wxEVT_SIZING
3257 wxEVT_MOVING = _core_.wxEVT_MOVING
3258 wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE
3259 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3260 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3261 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3262 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3263 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3264 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3265 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3266 #
3267 # Create some event binders
3268 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3269 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3270 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3271 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3272 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3273 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3274 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3275 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3276 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3277 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3278 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3279 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3280 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3281 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3282 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3283 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3284 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3285 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3286 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3287 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3288 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3289 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3290 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3291 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3292 EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
3293 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3294 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3295 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3296 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3297 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3298 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3299 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3300 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3301 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3302 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3303 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3304 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3305 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3306 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3307 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3308 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3309
3310 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3311 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3312 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3313 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3314 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3315 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3316 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3317 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3318 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3319 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3320 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3321 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3322 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3323
3324 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3325 wxEVT_LEFT_UP,
3326 wxEVT_MIDDLE_DOWN,
3327 wxEVT_MIDDLE_UP,
3328 wxEVT_RIGHT_DOWN,
3329 wxEVT_RIGHT_UP,
3330 wxEVT_MOTION,
3331 wxEVT_LEFT_DCLICK,
3332 wxEVT_MIDDLE_DCLICK,
3333 wxEVT_RIGHT_DCLICK,
3334 wxEVT_ENTER_WINDOW,
3335 wxEVT_LEAVE_WINDOW,
3336 wxEVT_MOUSEWHEEL
3337 ])
3338
3339
3340 # Scrolling from wxWindow (sent to wxScrolledWindow)
3341 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3342 wxEVT_SCROLLWIN_BOTTOM,
3343 wxEVT_SCROLLWIN_LINEUP,
3344 wxEVT_SCROLLWIN_LINEDOWN,
3345 wxEVT_SCROLLWIN_PAGEUP,
3346 wxEVT_SCROLLWIN_PAGEDOWN,
3347 wxEVT_SCROLLWIN_THUMBTRACK,
3348 wxEVT_SCROLLWIN_THUMBRELEASE,
3349 ])
3350
3351 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3352 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3353 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3354 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3355 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3356 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3357 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3358 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3359
3360 # Scrolling from wx.Slider and wx.ScrollBar
3361 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3362 wxEVT_SCROLL_BOTTOM,
3363 wxEVT_SCROLL_LINEUP,
3364 wxEVT_SCROLL_LINEDOWN,
3365 wxEVT_SCROLL_PAGEUP,
3366 wxEVT_SCROLL_PAGEDOWN,
3367 wxEVT_SCROLL_THUMBTRACK,
3368 wxEVT_SCROLL_THUMBRELEASE,
3369 wxEVT_SCROLL_ENDSCROLL,
3370 ])
3371
3372 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3373 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3374 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3375 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3376 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3377 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3378 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3379 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3380 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3381
3382 # Scrolling from wx.Slider and wx.ScrollBar, with an id
3383 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3384 wxEVT_SCROLL_BOTTOM,
3385 wxEVT_SCROLL_LINEUP,
3386 wxEVT_SCROLL_LINEDOWN,
3387 wxEVT_SCROLL_PAGEUP,
3388 wxEVT_SCROLL_PAGEDOWN,
3389 wxEVT_SCROLL_THUMBTRACK,
3390 wxEVT_SCROLL_THUMBRELEASE,
3391 wxEVT_SCROLL_ENDSCROLL,
3392 ], 1)
3393
3394 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3395 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3396 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3397 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3398 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3399 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3400 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3401 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3402 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3403
3404 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3405 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3406 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3407 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3408 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3409 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3410 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3411 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3412 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3413 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3414
3415 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3416 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3417 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3418 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3419 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3420 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3421 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3422 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3423 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3424
3425
3426 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3427 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3428 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3429 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3430 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3431 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3432 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3433
3434 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3435
3436 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3437 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3438
3439 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3440
3441
3442
3443 #---------------------------------------------------------------------------
3444
3445 class Event(Object):
3446 """
3447 An event is a structure holding information about an event passed to a
3448 callback or member function. wx.Event is an abstract base class for
3449 other event classes
3450 """
3451 def __init__(self): raise RuntimeError, "No constructor defined"
3452 def __repr__(self):
3453 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3454 def __del__(self, destroy=_core_.delete_Event):
3455 """__del__(self)"""
3456 try:
3457 if self.thisown: destroy(self)
3458 except: pass
3459
3460 def SetEventType(*args, **kwargs):
3461 """
3462 SetEventType(self, wxEventType typ)
3463
3464 Sets the specific type of the event.
3465 """
3466 return _core_.Event_SetEventType(*args, **kwargs)
3467
3468 def GetEventType(*args, **kwargs):
3469 """
3470 GetEventType(self) -> wxEventType
3471
3472 Returns the identifier of the given event type, such as
3473 ``wxEVT_COMMAND_BUTTON_CLICKED``.
3474 """
3475 return _core_.Event_GetEventType(*args, **kwargs)
3476
3477 def GetEventObject(*args, **kwargs):
3478 """
3479 GetEventObject(self) -> Object
3480
3481 Returns the object (usually a window) associated with the event, if
3482 any.
3483 """
3484 return _core_.Event_GetEventObject(*args, **kwargs)
3485
3486 def SetEventObject(*args, **kwargs):
3487 """
3488 SetEventObject(self, Object obj)
3489
3490 Sets the originating object, or in other words, obj is normally the
3491 object that is sending the event.
3492 """
3493 return _core_.Event_SetEventObject(*args, **kwargs)
3494
3495 def GetTimestamp(*args, **kwargs):
3496 """GetTimestamp(self) -> long"""
3497 return _core_.Event_GetTimestamp(*args, **kwargs)
3498
3499 def SetTimestamp(*args, **kwargs):
3500 """SetTimestamp(self, long ts=0)"""
3501 return _core_.Event_SetTimestamp(*args, **kwargs)
3502
3503 def GetId(*args, **kwargs):
3504 """
3505 GetId(self) -> int
3506
3507 Returns the identifier associated with this event, such as a button
3508 command id.
3509 """
3510 return _core_.Event_GetId(*args, **kwargs)
3511
3512 def SetId(*args, **kwargs):
3513 """
3514 SetId(self, int Id)
3515
3516 Set's the ID for the event. This is usually the ID of the window that
3517 is sending the event, but it can also be a command id from a menu
3518 item, etc.
3519 """
3520 return _core_.Event_SetId(*args, **kwargs)
3521
3522 def IsCommandEvent(*args, **kwargs):
3523 """
3524 IsCommandEvent(self) -> bool
3525
3526 Returns true if the event is or is derived from `wx.CommandEvent` else
3527 it returns false. Note: Exists only for optimization purposes.
3528 """
3529 return _core_.Event_IsCommandEvent(*args, **kwargs)
3530
3531 def Skip(*args, **kwargs):
3532 """
3533 Skip(self, bool skip=True)
3534
3535 Called by an event handler, it controls whether additional event
3536 handlers bound to this event will be called after the current event
3537 handler returns. Skip(false) (the default setting) will prevent
3538 additional event handlers from being called and control will be
3539 returned to the sender of the event immediately after the current
3540 handler has finished. Skip(True) will cause the event processing
3541 system to continue searching for a handler function for this event.
3542
3543 """
3544 return _core_.Event_Skip(*args, **kwargs)
3545
3546 def GetSkipped(*args, **kwargs):
3547 """
3548 GetSkipped(self) -> bool
3549
3550 Returns true if the event handler should be skipped, false otherwise.
3551 :see: `Skip`
3552 """
3553 return _core_.Event_GetSkipped(*args, **kwargs)
3554
3555 def ShouldPropagate(*args, **kwargs):
3556 """
3557 ShouldPropagate(self) -> bool
3558
3559 Test if this event should be propagated to the parent window or not,
3560 i.e. if the propagation level is currently greater than 0.
3561 """
3562 return _core_.Event_ShouldPropagate(*args, **kwargs)
3563
3564 def StopPropagation(*args, **kwargs):
3565 """
3566 StopPropagation(self) -> int
3567
3568 Stop the event from propagating to its parent window. Returns the old
3569 propagation level value which may be later passed to
3570 `ResumePropagation` to allow propagating the event again.
3571 """
3572 return _core_.Event_StopPropagation(*args, **kwargs)
3573
3574 def ResumePropagation(*args, **kwargs):
3575 """
3576 ResumePropagation(self, int propagationLevel)
3577
3578 Resume the event propagation by restoring the propagation level. (For
3579 example, you can use the value returned by an earlier call to
3580 `StopPropagation`.)
3581
3582 """
3583 return _core_.Event_ResumePropagation(*args, **kwargs)
3584
3585 def Clone(*args, **kwargs):
3586 """Clone(self) -> Event"""
3587 return _core_.Event_Clone(*args, **kwargs)
3588
3589
3590 class EventPtr(Event):
3591 def __init__(self, this):
3592 self.this = this
3593 if not hasattr(self,"thisown"): self.thisown = 0
3594 self.__class__ = Event
3595 _core_.Event_swigregister(EventPtr)
3596
3597 #---------------------------------------------------------------------------
3598
3599 class PropagationDisabler(object):
3600 """
3601 Helper class to temporarily change an event not to propagate. Simply
3602 create an instance of this class and then whe it is destroyed the
3603 propogation of the event will be restored.
3604 """
3605 def __repr__(self):
3606 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3607 def __init__(self, *args, **kwargs):
3608 """
3609 __init__(self, Event event) -> PropagationDisabler
3610
3611 Helper class to temporarily change an event not to propagate. Simply
3612 create an instance of this class and then whe it is destroyed the
3613 propogation of the event will be restored.
3614 """
3615 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3616 self.this = newobj.this
3617 self.thisown = 1
3618 del newobj.thisown
3619 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3620 """__del__(self)"""
3621 try:
3622 if self.thisown: destroy(self)
3623 except: pass
3624
3625
3626 class PropagationDisablerPtr(PropagationDisabler):
3627 def __init__(self, this):
3628 self.this = this
3629 if not hasattr(self,"thisown"): self.thisown = 0
3630 self.__class__ = PropagationDisabler
3631 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3632
3633 class PropagateOnce(object):
3634 """
3635 A helper class that will temporarily lower propagation level of an
3636 event. Simply create an instance of this class and then whe it is
3637 destroyed the propogation of the event will be restored.
3638 """
3639 def __repr__(self):
3640 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3641 def __init__(self, *args, **kwargs):
3642 """
3643 __init__(self, Event event) -> PropagateOnce
3644
3645 A helper class that will temporarily lower propagation level of an
3646 event. Simply create an instance of this class and then whe it is
3647 destroyed the propogation of the event will be restored.
3648 """
3649 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3650 self.this = newobj.this
3651 self.thisown = 1
3652 del newobj.thisown
3653 def __del__(self, destroy=_core_.delete_PropagateOnce):
3654 """__del__(self)"""
3655 try:
3656 if self.thisown: destroy(self)
3657 except: pass
3658
3659
3660 class PropagateOncePtr(PropagateOnce):
3661 def __init__(self, this):
3662 self.this = this
3663 if not hasattr(self,"thisown"): self.thisown = 0
3664 self.__class__ = PropagateOnce
3665 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3666
3667 #---------------------------------------------------------------------------
3668
3669 class CommandEvent(Event):
3670 """
3671 This event class contains information about command events, which
3672 originate from a variety of simple controls, as well as menus and
3673 toolbars.
3674 """
3675 def __repr__(self):
3676 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3677 def __init__(self, *args, **kwargs):
3678 """
3679 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent
3680
3681 This event class contains information about command events, which
3682 originate from a variety of simple controls, as well as menus and
3683 toolbars.
3684 """
3685 newobj = _core_.new_CommandEvent(*args, **kwargs)
3686 self.this = newobj.this
3687 self.thisown = 1
3688 del newobj.thisown
3689 def GetSelection(*args, **kwargs):
3690 """
3691 GetSelection(self) -> int
3692
3693 Returns item index for a listbox or choice selection event (not valid
3694 for a deselection).
3695 """
3696 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3697
3698 def SetString(*args, **kwargs):
3699 """SetString(self, String s)"""
3700 return _core_.CommandEvent_SetString(*args, **kwargs)
3701
3702 def GetString(*args, **kwargs):
3703 """
3704 GetString(self) -> String
3705
3706 Returns item string for a listbox or choice selection event (not valid
3707 for a deselection).
3708 """
3709 return _core_.CommandEvent_GetString(*args, **kwargs)
3710
3711 def IsChecked(*args, **kwargs):
3712 """
3713 IsChecked(self) -> bool
3714
3715 This method can be used with checkbox and menu events: for the
3716 checkboxes, the method returns true for a selection event and false
3717 for a deselection one. For the menu events, this method indicates if
3718 the menu item just has become checked or unchecked (and thus only
3719 makes sense for checkable menu items).
3720 """
3721 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3722
3723 Checked = IsChecked
3724 def IsSelection(*args, **kwargs):
3725 """
3726 IsSelection(self) -> bool
3727
3728 For a listbox or similar event, returns true if it is a selection,
3729 false if it is a deselection.
3730 """
3731 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3732
3733 def SetExtraLong(*args, **kwargs):
3734 """SetExtraLong(self, long extraLong)"""
3735 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3736
3737 def GetExtraLong(*args, **kwargs):
3738 """
3739 GetExtraLong(self) -> long
3740
3741 Returns extra information dependant on the event objects type. If the event
3742 comes from a listbox selection, it is a boolean determining whether the event
3743 was a selection (true) or a deselection (false). A listbox deselection only
3744 occurs for multiple-selection boxes, and in this case the index and string
3745 values are indeterminate and the listbox must be examined by the application.
3746 """
3747 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3748
3749 def SetInt(*args, **kwargs):
3750 """SetInt(self, int i)"""
3751 return _core_.CommandEvent_SetInt(*args, **kwargs)
3752
3753 def GetInt(*args, **kwargs):
3754 """
3755 GetInt(self) -> long
3756
3757 Returns the integer identifier corresponding to a listbox, choice or radiobox
3758 selection (only if the event was a selection, not a deselection), or a boolean
3759 value representing the value of a checkbox.
3760 """
3761 return _core_.CommandEvent_GetInt(*args, **kwargs)
3762
3763 def Clone(*args, **kwargs):
3764 """Clone(self) -> Event"""
3765 return _core_.CommandEvent_Clone(*args, **kwargs)
3766
3767
3768 class CommandEventPtr(CommandEvent):
3769 def __init__(self, this):
3770 self.this = this
3771 if not hasattr(self,"thisown"): self.thisown = 0
3772 self.__class__ = CommandEvent
3773 _core_.CommandEvent_swigregister(CommandEventPtr)
3774
3775 #---------------------------------------------------------------------------
3776
3777 class NotifyEvent(CommandEvent):
3778 """
3779 An instance of this class (or one of its derived classes) is sent from
3780 a control when the control's state is being changed and the control
3781 allows that change to be prevented from happening. The event handler
3782 can call `Veto` or `Allow` to tell the control what to do.
3783 """
3784 def __repr__(self):
3785 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3786 def __init__(self, *args, **kwargs):
3787 """
3788 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent
3789
3790 An instance of this class (or one of its derived classes) is sent from
3791 a control when the control's state is being changed and the control
3792 allows that change to be prevented from happening. The event handler
3793 can call `Veto` or `Allow` to tell the control what to do.
3794 """
3795 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3796 self.this = newobj.this
3797 self.thisown = 1
3798 del newobj.thisown
3799 def Veto(*args, **kwargs):
3800 """
3801 Veto(self)
3802
3803 Prevents the change announced by this event from happening.
3804
3805 It is in general a good idea to notify the user about the reasons for
3806 vetoing the change because otherwise the applications behaviour (which
3807 just refuses to do what the user wants) might be quite surprising.
3808 """
3809 return _core_.NotifyEvent_Veto(*args, **kwargs)
3810
3811 def Allow(*args, **kwargs):
3812 """
3813 Allow(self)
3814
3815 This is the opposite of `Veto`: it explicitly allows the event to be
3816 processed. For most events it is not necessary to call this method as
3817 the events are allowed anyhow but some are forbidden by default (this
3818 will be mentioned in the corresponding event description).
3819 """
3820 return _core_.NotifyEvent_Allow(*args, **kwargs)
3821
3822 def IsAllowed(*args, **kwargs):
3823 """
3824 IsAllowed(self) -> bool
3825
3826 Returns true if the change is allowed (`Veto` hasn't been called) or
3827 false otherwise (if it was).
3828 """
3829 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3830
3831
3832 class NotifyEventPtr(NotifyEvent):
3833 def __init__(self, this):
3834 self.this = this
3835 if not hasattr(self,"thisown"): self.thisown = 0
3836 self.__class__ = NotifyEvent
3837 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3838
3839 #---------------------------------------------------------------------------
3840
3841 class ScrollEvent(CommandEvent):
3842 """
3843 A scroll event holds information about events sent from stand-alone
3844 scrollbars and sliders. Note that scrolled windows do not send
3845 instnaces of this event class, but send the `wx.ScrollWinEvent`
3846 instead.
3847 """
3848 def __repr__(self):
3849 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3850 def __init__(self, *args, **kwargs):
3851 """
3852 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3853 int orient=0) -> ScrollEvent
3854 """
3855 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3856 self.this = newobj.this
3857 self.thisown = 1
3858 del newobj.thisown
3859 def GetOrientation(*args, **kwargs):
3860 """
3861 GetOrientation(self) -> int
3862
3863 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
3864 the scrollbar.
3865 """
3866 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3867
3868 def GetPosition(*args, **kwargs):
3869 """
3870 GetPosition(self) -> int
3871
3872 Returns the position of the scrollbar.
3873 """
3874 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3875
3876 def SetOrientation(*args, **kwargs):
3877 """SetOrientation(self, int orient)"""
3878 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3879
3880 def SetPosition(*args, **kwargs):
3881 """SetPosition(self, int pos)"""
3882 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3883
3884
3885 class ScrollEventPtr(ScrollEvent):
3886 def __init__(self, this):
3887 self.this = this
3888 if not hasattr(self,"thisown"): self.thisown = 0
3889 self.__class__ = ScrollEvent
3890 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3891
3892 #---------------------------------------------------------------------------
3893
3894 class ScrollWinEvent(Event):
3895 """
3896 A wx.ScrollWinEvent holds information about scrolling and is sent from
3897 scrolling windows.
3898 """
3899 def __repr__(self):
3900 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3901 def __init__(self, *args, **kwargs):
3902 """
3903 __init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent
3904
3905 A wx.ScrollWinEvent holds information about scrolling and is sent from
3906 scrolling windows.
3907 """
3908 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3909 self.this = newobj.this
3910 self.thisown = 1
3911 del newobj.thisown
3912 def GetOrientation(*args, **kwargs):
3913 """
3914 GetOrientation(self) -> int
3915
3916 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
3917 the scrollbar.
3918 """
3919 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3920
3921 def GetPosition(*args, **kwargs):
3922 """
3923 GetPosition(self) -> int
3924
3925 Returns the position of the scrollbar for the thumb track and release
3926 events. Note that this field can't be used for the other events, you
3927 need to query the window itself for the current position in that case.
3928 """
3929 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3930
3931 def SetOrientation(*args, **kwargs):
3932 """SetOrientation(self, int orient)"""
3933 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3934
3935 def SetPosition(*args, **kwargs):
3936 """SetPosition(self, int pos)"""
3937 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3938
3939
3940 class ScrollWinEventPtr(ScrollWinEvent):
3941 def __init__(self, this):
3942 self.this = this
3943 if not hasattr(self,"thisown"): self.thisown = 0
3944 self.__class__ = ScrollWinEvent
3945 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3946
3947 #---------------------------------------------------------------------------
3948
3949 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3950 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3951 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3952 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3953 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3954 class MouseEvent(Event):
3955 """
3956 This event class contains information about the events generated by
3957 the mouse: they include mouse buttons press and release events and
3958 mouse move events.
3959
3960 All mouse events involving the buttons use ``wx.MOUSE_BTN_LEFT`` for
3961 the left mouse button, ``wx.MOUSE_BTN_MIDDLE`` for the middle one and
3962 ``wx.MOUSE_BTN_RIGHT`` for the right one. Note that not all mice have
3963 a middle button so a portable application should avoid relying on the
3964 events from it.
3965
3966 Note the difference between methods like `LeftDown` and `LeftIsDown`:
3967 the former returns true when the event corresponds to the left mouse
3968 button click while the latter returns true if the left mouse button is
3969 currently being pressed. For example, when the user is dragging the
3970 mouse you can use `LeftIsDown` to test whether the left mouse button
3971 is (still) depressed. Also, by convention, if `LeftDown` returns true,
3972 `LeftIsDown` will also return true in wxWidgets whatever the
3973 underlying GUI behaviour is (which is platform-dependent). The same
3974 applies, of course, to other mouse buttons as well.
3975 """
3976 def __repr__(self):
3977 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3978 def __init__(self, *args, **kwargs):
3979 """
3980 __init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent
3981
3982 Constructs a wx.MouseEvent. Valid event types are:
3983
3984 * wxEVT_ENTER_WINDOW
3985 * wxEVT_LEAVE_WINDOW
3986 * wxEVT_LEFT_DOWN
3987 * wxEVT_LEFT_UP
3988 * wxEVT_LEFT_DCLICK
3989 * wxEVT_MIDDLE_DOWN
3990 * wxEVT_MIDDLE_UP
3991 * wxEVT_MIDDLE_DCLICK
3992 * wxEVT_RIGHT_DOWN
3993 * wxEVT_RIGHT_UP
3994 * wxEVT_RIGHT_DCLICK
3995 * wxEVT_MOTION
3996 * wxEVT_MOUSEWHEEL
3997 """
3998 newobj = _core_.new_MouseEvent(*args, **kwargs)
3999 self.this = newobj.this
4000 self.thisown = 1
4001 del newobj.thisown
4002 def IsButton(*args, **kwargs):
4003 """
4004 IsButton(self) -> bool
4005
4006 Returns true if the event was a mouse button event (not necessarily a
4007 button down event - that may be tested using `ButtonDown`).
4008 """
4009 return _core_.MouseEvent_IsButton(*args, **kwargs)
4010
4011 def ButtonDown(*args, **kwargs):
4012 """
4013 ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool
4014
4015 If the argument is omitted, this returns true if the event was any mouse
4016 button down event. Otherwise the argument specifies which button-down
4017 event shold be checked for (see `Button` for the possible values).
4018 """
4019 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
4020
4021 def ButtonDClick(*args, **kwargs):
4022 """
4023 ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool
4024
4025 If the argument is omitted, this returns true if the event was any
4026 mouse double click event. Otherwise the argument specifies which
4027 double click event to check for (see `Button` for the possible
4028 values).
4029 """
4030 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
4031
4032 def ButtonUp(*args, **kwargs):
4033 """
4034 ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool
4035
4036 If the argument is omitted, this returns true if the event was any
4037 mouse button up event. Otherwise the argument specifies which
4038 button up event to check for (see `Button` for the possible values).
4039 """
4040 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
4041
4042 def Button(*args, **kwargs):
4043 """
4044 Button(self, int button) -> bool
4045
4046 Returns true if the identified mouse button is changing state. Valid
4047 values of button are:
4048
4049 ==================== =====================================
4050 wx.MOUSE_BTN_LEFT check if left button was pressed
4051 wx.MOUSE_BTN_MIDDLE check if middle button was pressed
4052 wx.MOUSE_BTN_RIGHT check if right button was pressed
4053 wx.MOUSE_BTN_ANY check if any button was pressed
4054 ==================== =====================================
4055
4056 """
4057 return _core_.MouseEvent_Button(*args, **kwargs)
4058
4059 def ButtonIsDown(*args, **kwargs):
4060 """ButtonIsDown(self, int but) -> bool"""
4061 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
4062
4063 def GetButton(*args, **kwargs):
4064 """
4065 GetButton(self) -> int
4066
4067 Returns the mouse button which generated this event or
4068 wx.MOUSE_BTN_NONE if no button is involved (for mouse move, enter or
4069 leave event, for example). Otherwise wx.MOUSE_BTN_LEFT is returned for
4070 the left button down, up and double click events, wx.MOUSE_BTN_MIDDLE
4071 and wx.MOUSE_BTN_RIGHT for the same events for the middle and the
4072 right buttons respectively.
4073 """
4074 return _core_.MouseEvent_GetButton(*args, **kwargs)
4075
4076 def ControlDown(*args, **kwargs):
4077 """
4078 ControlDown(self) -> bool
4079
4080 Returns true if the control key was down at the time of the event.
4081 """
4082 return _core_.MouseEvent_ControlDown(*args, **kwargs)
4083
4084 def MetaDown(*args, **kwargs):
4085 """
4086 MetaDown(self) -> bool
4087
4088 Returns true if the Meta key was down at the time of the event.
4089 """
4090 return _core_.MouseEvent_MetaDown(*args, **kwargs)
4091
4092 def AltDown(*args, **kwargs):
4093 """
4094 AltDown(self) -> bool
4095
4096 Returns true if the Alt key was down at the time of the event.
4097 """
4098 return _core_.MouseEvent_AltDown(*args, **kwargs)
4099
4100 def ShiftDown(*args, **kwargs):
4101 """
4102 ShiftDown(self) -> bool
4103
4104 Returns true if the Shift key was down at the time of the event.
4105 """
4106 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
4107
4108 def CmdDown(*args, **kwargs):
4109 """
4110 CmdDown(self) -> bool
4111
4112 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4113 platforms but the special "Apple" (a.k.a as "Command") key on
4114 Macs: it often makes sense to use it instead of, say, `ControlDown`
4115 because Cmd key is used for the same thing under Mac as Ctrl
4116 elsewhere. The Ctrl key still exists, it's just not used for this
4117 purpose. So for non-Mac platforms this is the same as `ControlDown`
4118 and Macs this is the same as `MetaDown`.
4119 """
4120 return _core_.MouseEvent_CmdDown(*args, **kwargs)
4121
4122 def LeftDown(*args, **kwargs):
4123 """
4124 LeftDown(self) -> bool
4125
4126 Returns true if the left mouse button state changed to down.
4127 """
4128 return _core_.MouseEvent_LeftDown(*args, **kwargs)
4129
4130 def MiddleDown(*args, **kwargs):
4131 """
4132 MiddleDown(self) -> bool
4133
4134 Returns true if the middle mouse button state changed to down.
4135 """
4136 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
4137
4138 def RightDown(*args, **kwargs):
4139 """
4140 RightDown(self) -> bool
4141
4142 Returns true if the right mouse button state changed to down.
4143 """
4144 return _core_.MouseEvent_RightDown(*args, **kwargs)
4145
4146 def LeftUp(*args, **kwargs):
4147 """
4148 LeftUp(self) -> bool
4149
4150 Returns true if the left mouse button state changed to up.
4151 """
4152 return _core_.MouseEvent_LeftUp(*args, **kwargs)
4153
4154 def MiddleUp(*args, **kwargs):
4155 """
4156 MiddleUp(self) -> bool
4157
4158 Returns true if the middle mouse button state changed to up.
4159 """
4160 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
4161
4162 def RightUp(*args, **kwargs):
4163 """
4164 RightUp(self) -> bool
4165
4166 Returns true if the right mouse button state changed to up.
4167 """
4168 return _core_.MouseEvent_RightUp(*args, **kwargs)
4169
4170 def LeftDClick(*args, **kwargs):
4171 """
4172 LeftDClick(self) -> bool
4173
4174 Returns true if the event was a left button double click.
4175 """
4176 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
4177
4178 def MiddleDClick(*args, **kwargs):
4179 """
4180 MiddleDClick(self) -> bool
4181
4182 Returns true if the event was a middle button double click.
4183 """
4184 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
4185
4186 def RightDClick(*args, **kwargs):
4187 """
4188 RightDClick(self) -> bool
4189
4190 Returns true if the event was a right button double click.
4191 """
4192 return _core_.MouseEvent_RightDClick(*args, **kwargs)
4193
4194 def LeftIsDown(*args, **kwargs):
4195 """
4196 LeftIsDown(self) -> bool
4197
4198 Returns true if the left mouse button is currently down, independent
4199 of the current event type.
4200
4201 Please notice that it is not the same as LeftDown which returns true
4202 if the left mouse button was just pressed. Rather, it describes the
4203 state of the mouse button before the event happened.
4204
4205 This event is usually used in the mouse event handlers which process
4206 "move mouse" messages to determine whether the user is (still)
4207 dragging the mouse.
4208 """
4209 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
4210
4211 def MiddleIsDown(*args, **kwargs):
4212 """
4213 MiddleIsDown(self) -> bool
4214
4215 Returns true if the middle mouse button is currently down, independent
4216 of the current event type.
4217 """
4218 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
4219
4220 def RightIsDown(*args, **kwargs):
4221 """
4222 RightIsDown(self) -> bool
4223
4224 Returns true if the right mouse button is currently down, independent
4225 of the current event type.
4226 """
4227 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
4228
4229 def Dragging(*args, **kwargs):
4230 """
4231 Dragging(self) -> bool
4232
4233 Returns true if this was a dragging event (motion while a button is
4234 depressed).
4235 """
4236 return _core_.MouseEvent_Dragging(*args, **kwargs)
4237
4238 def Moving(*args, **kwargs):
4239 """
4240 Moving(self) -> bool
4241
4242 Returns true if this was a motion event and no mouse buttons were
4243 pressed. If any mouse button is held pressed, then this method returns
4244 false and Dragging returns true.
4245 """
4246 return _core_.MouseEvent_Moving(*args, **kwargs)
4247
4248 def Entering(*args, **kwargs):
4249 """
4250 Entering(self) -> bool
4251
4252 Returns true if the mouse was entering the window.
4253 """
4254 return _core_.MouseEvent_Entering(*args, **kwargs)
4255
4256 def Leaving(*args, **kwargs):
4257 """
4258 Leaving(self) -> bool
4259
4260 Returns true if the mouse was leaving the window.
4261 """
4262 return _core_.MouseEvent_Leaving(*args, **kwargs)
4263
4264 def GetPosition(*args, **kwargs):
4265 """
4266 GetPosition(self) -> Point
4267
4268 Returns the pixel position of the mouse in window coordinates when the
4269 event happened.
4270 """
4271 return _core_.MouseEvent_GetPosition(*args, **kwargs)
4272
4273 def GetPositionTuple(*args, **kwargs):
4274 """
4275 GetPositionTuple() -> (x,y)
4276
4277 Returns the pixel position of the mouse in window coordinates when the
4278 event happened.
4279 """
4280 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
4281
4282 def GetLogicalPosition(*args, **kwargs):
4283 """
4284 GetLogicalPosition(self, DC dc) -> Point
4285
4286 Returns the logical mouse position in pixels (i.e. translated
4287 according to the translation set for the DC, which usually indicates
4288 that the window has been scrolled).
4289 """
4290 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
4291
4292 def GetX(*args, **kwargs):
4293 """
4294 GetX(self) -> int
4295
4296 Returns X coordinate of the physical mouse event position.
4297 """
4298 return _core_.MouseEvent_GetX(*args, **kwargs)
4299
4300 def GetY(*args, **kwargs):
4301 """
4302 GetY(self) -> int
4303
4304 Returns Y coordinate of the physical mouse event position.
4305 """
4306 return _core_.MouseEvent_GetY(*args, **kwargs)
4307
4308 def GetWheelRotation(*args, **kwargs):
4309 """
4310 GetWheelRotation(self) -> int
4311
4312 Get wheel rotation, positive or negative indicates direction of
4313 rotation. Current devices all send an event when rotation is equal to
4314 +/-WheelDelta, but this allows for finer resolution devices to be
4315 created in the future. Because of this you shouldn't assume that one
4316 event is equal to 1 line or whatever, but you should be able to either
4317 do partial line scrolling or wait until +/-WheelDelta rotation values
4318 have been accumulated before scrolling.
4319 """
4320 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
4321
4322 def GetWheelDelta(*args, **kwargs):
4323 """
4324 GetWheelDelta(self) -> int
4325
4326 Get wheel delta, normally 120. This is the threshold for action to be
4327 taken, and one such action (for example, scrolling one increment)
4328 should occur for each delta.
4329 """
4330 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
4331
4332 def GetLinesPerAction(*args, **kwargs):
4333 """
4334 GetLinesPerAction(self) -> int
4335
4336 Returns the configured number of lines (or whatever) to be scrolled
4337 per wheel action. Defaults to three.
4338 """
4339 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
4340
4341 def IsPageScroll(*args, **kwargs):
4342 """
4343 IsPageScroll(self) -> bool
4344
4345 Returns true if the system has been setup to do page scrolling with
4346 the mouse wheel instead of line scrolling.
4347 """
4348 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
4349
4350 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
4351 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
4352 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
4353 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
4354 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
4355 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
4356 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
4357 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
4358 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
4359 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
4360 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
4361 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
4362
4363 class MouseEventPtr(MouseEvent):
4364 def __init__(self, this):
4365 self.this = this
4366 if not hasattr(self,"thisown"): self.thisown = 0
4367 self.__class__ = MouseEvent
4368 _core_.MouseEvent_swigregister(MouseEventPtr)
4369
4370 #---------------------------------------------------------------------------
4371
4372 class SetCursorEvent(Event):
4373 """Proxy of C++ SetCursorEvent class"""
4374 def __repr__(self):
4375 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4376 def __init__(self, *args, **kwargs):
4377 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
4378 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
4379 self.this = newobj.this
4380 self.thisown = 1
4381 del newobj.thisown
4382 def GetX(*args, **kwargs):
4383 """GetX(self) -> int"""
4384 return _core_.SetCursorEvent_GetX(*args, **kwargs)
4385
4386 def GetY(*args, **kwargs):
4387 """GetY(self) -> int"""
4388 return _core_.SetCursorEvent_GetY(*args, **kwargs)
4389
4390 def SetCursor(*args, **kwargs):
4391 """SetCursor(self, Cursor cursor)"""
4392 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
4393
4394 def GetCursor(*args, **kwargs):
4395 """GetCursor(self) -> Cursor"""
4396 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
4397
4398 def HasCursor(*args, **kwargs):
4399 """HasCursor(self) -> bool"""
4400 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
4401
4402
4403 class SetCursorEventPtr(SetCursorEvent):
4404 def __init__(self, this):
4405 self.this = this
4406 if not hasattr(self,"thisown"): self.thisown = 0
4407 self.__class__ = SetCursorEvent
4408 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
4409
4410 #---------------------------------------------------------------------------
4411
4412 class KeyEvent(Event):
4413 """Proxy of C++ KeyEvent class"""
4414 def __repr__(self):
4415 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4416 def __init__(self, *args, **kwargs):
4417 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
4418 newobj = _core_.new_KeyEvent(*args, **kwargs)
4419 self.this = newobj.this
4420 self.thisown = 1
4421 del newobj.thisown
4422 def ControlDown(*args, **kwargs):
4423 """ControlDown(self) -> bool"""
4424 return _core_.KeyEvent_ControlDown(*args, **kwargs)
4425
4426 def MetaDown(*args, **kwargs):
4427 """MetaDown(self) -> bool"""
4428 return _core_.KeyEvent_MetaDown(*args, **kwargs)
4429
4430 def AltDown(*args, **kwargs):
4431 """AltDown(self) -> bool"""
4432 return _core_.KeyEvent_AltDown(*args, **kwargs)
4433
4434 def ShiftDown(*args, **kwargs):
4435 """ShiftDown(self) -> bool"""
4436 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
4437
4438 def CmdDown(*args, **kwargs):
4439 """
4440 CmdDown(self) -> bool
4441
4442 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4443 platforms but the special "Apple" (a.k.a as "Command") key on
4444 Macs: it makes often sense to use it instead of, say, `ControlDown`
4445 because Cmd key is used for the same thing under Mac as Ctrl
4446 elsewhere. The Ctrl still exists, it's just not used for this
4447 purpose. So for non-Mac platforms this is the same as `ControlDown`
4448 and Macs this is the same as `MetaDown`.
4449 """
4450 return _core_.KeyEvent_CmdDown(*args, **kwargs)
4451
4452 def HasModifiers(*args, **kwargs):
4453 """HasModifiers(self) -> bool"""
4454 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
4455
4456 def GetKeyCode(*args, **kwargs):
4457 """GetKeyCode(self) -> int"""
4458 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
4459
4460 KeyCode = GetKeyCode
4461 def GetUnicodeKey(*args, **kwargs):
4462 """GetUnicodeKey(self) -> int"""
4463 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
4464
4465 GetUniChar = GetUnicodeKey
4466 def GetRawKeyCode(*args, **kwargs):
4467 """GetRawKeyCode(self) -> unsigned int"""
4468 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
4469
4470 def GetRawKeyFlags(*args, **kwargs):
4471 """GetRawKeyFlags(self) -> unsigned int"""
4472 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
4473
4474 def GetPosition(*args, **kwargs):
4475 """
4476 GetPosition(self) -> Point
4477
4478 Find the position of the event.
4479 """
4480 return _core_.KeyEvent_GetPosition(*args, **kwargs)
4481
4482 def GetPositionTuple(*args, **kwargs):
4483 """
4484 GetPositionTuple() -> (x,y)
4485
4486 Find the position of the event.
4487 """
4488 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
4489
4490 def GetX(*args, **kwargs):
4491 """GetX(self) -> int"""
4492 return _core_.KeyEvent_GetX(*args, **kwargs)
4493
4494 def GetY(*args, **kwargs):
4495 """GetY(self) -> int"""
4496 return _core_.KeyEvent_GetY(*args, **kwargs)
4497
4498 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
4499 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
4500 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
4501 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
4502 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
4503 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
4504 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
4505 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
4506 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
4507 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
4508
4509 class KeyEventPtr(KeyEvent):
4510 def __init__(self, this):
4511 self.this = this
4512 if not hasattr(self,"thisown"): self.thisown = 0
4513 self.__class__ = KeyEvent
4514 _core_.KeyEvent_swigregister(KeyEventPtr)
4515
4516 #---------------------------------------------------------------------------
4517
4518 class SizeEvent(Event):
4519 """Proxy of C++ SizeEvent class"""
4520 def __repr__(self):
4521 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4522 def __init__(self, *args, **kwargs):
4523 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
4524 newobj = _core_.new_SizeEvent(*args, **kwargs)
4525 self.this = newobj.this
4526 self.thisown = 1
4527 del newobj.thisown
4528 def GetSize(*args, **kwargs):
4529 """GetSize(self) -> Size"""
4530 return _core_.SizeEvent_GetSize(*args, **kwargs)
4531
4532 def GetRect(*args, **kwargs):
4533 """GetRect(self) -> Rect"""
4534 return _core_.SizeEvent_GetRect(*args, **kwargs)
4535
4536 def SetRect(*args, **kwargs):
4537 """SetRect(self, Rect rect)"""
4538 return _core_.SizeEvent_SetRect(*args, **kwargs)
4539
4540 def SetSize(*args, **kwargs):
4541 """SetSize(self, Size size)"""
4542 return _core_.SizeEvent_SetSize(*args, **kwargs)
4543
4544 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
4545 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
4546
4547 class SizeEventPtr(SizeEvent):
4548 def __init__(self, this):
4549 self.this = this
4550 if not hasattr(self,"thisown"): self.thisown = 0
4551 self.__class__ = SizeEvent
4552 _core_.SizeEvent_swigregister(SizeEventPtr)
4553
4554 #---------------------------------------------------------------------------
4555
4556 class MoveEvent(Event):
4557 """Proxy of C++ MoveEvent class"""
4558 def __repr__(self):
4559 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4560 def __init__(self, *args, **kwargs):
4561 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
4562 newobj = _core_.new_MoveEvent(*args, **kwargs)
4563 self.this = newobj.this
4564 self.thisown = 1
4565 del newobj.thisown
4566 def GetPosition(*args, **kwargs):
4567 """GetPosition(self) -> Point"""
4568 return _core_.MoveEvent_GetPosition(*args, **kwargs)
4569
4570 def GetRect(*args, **kwargs):
4571 """GetRect(self) -> Rect"""
4572 return _core_.MoveEvent_GetRect(*args, **kwargs)
4573
4574 def SetRect(*args, **kwargs):
4575 """SetRect(self, Rect rect)"""
4576 return _core_.MoveEvent_SetRect(*args, **kwargs)
4577
4578 def SetPosition(*args, **kwargs):
4579 """SetPosition(self, Point pos)"""
4580 return _core_.MoveEvent_SetPosition(*args, **kwargs)
4581
4582 m_pos = property(GetPosition, SetPosition)
4583 m_rect = property(GetRect, SetRect)
4584
4585
4586 class MoveEventPtr(MoveEvent):
4587 def __init__(self, this):
4588 self.this = this
4589 if not hasattr(self,"thisown"): self.thisown = 0
4590 self.__class__ = MoveEvent
4591 _core_.MoveEvent_swigregister(MoveEventPtr)
4592
4593 #---------------------------------------------------------------------------
4594
4595 class PaintEvent(Event):
4596 """Proxy of C++ PaintEvent class"""
4597 def __repr__(self):
4598 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4599 def __init__(self, *args, **kwargs):
4600 """__init__(self, int Id=0) -> PaintEvent"""
4601 newobj = _core_.new_PaintEvent(*args, **kwargs)
4602 self.this = newobj.this
4603 self.thisown = 1
4604 del newobj.thisown
4605
4606 class PaintEventPtr(PaintEvent):
4607 def __init__(self, this):
4608 self.this = this
4609 if not hasattr(self,"thisown"): self.thisown = 0
4610 self.__class__ = PaintEvent
4611 _core_.PaintEvent_swigregister(PaintEventPtr)
4612
4613 class NcPaintEvent(Event):
4614 """Proxy of C++ NcPaintEvent class"""
4615 def __repr__(self):
4616 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4617 def __init__(self, *args, **kwargs):
4618 """__init__(self, int winid=0) -> NcPaintEvent"""
4619 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
4620 self.this = newobj.this
4621 self.thisown = 1
4622 del newobj.thisown
4623
4624 class NcPaintEventPtr(NcPaintEvent):
4625 def __init__(self, this):
4626 self.this = this
4627 if not hasattr(self,"thisown"): self.thisown = 0
4628 self.__class__ = NcPaintEvent
4629 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
4630
4631 #---------------------------------------------------------------------------
4632
4633 class EraseEvent(Event):
4634 """Proxy of C++ EraseEvent class"""
4635 def __repr__(self):
4636 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4637 def __init__(self, *args, **kwargs):
4638 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4639 newobj = _core_.new_EraseEvent(*args, **kwargs)
4640 self.this = newobj.this
4641 self.thisown = 1
4642 del newobj.thisown
4643 def GetDC(*args, **kwargs):
4644 """GetDC(self) -> DC"""
4645 return _core_.EraseEvent_GetDC(*args, **kwargs)
4646
4647
4648 class EraseEventPtr(EraseEvent):
4649 def __init__(self, this):
4650 self.this = this
4651 if not hasattr(self,"thisown"): self.thisown = 0
4652 self.__class__ = EraseEvent
4653 _core_.EraseEvent_swigregister(EraseEventPtr)
4654
4655 #---------------------------------------------------------------------------
4656
4657 class FocusEvent(Event):
4658 """Proxy of C++ FocusEvent class"""
4659 def __repr__(self):
4660 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4661 def __init__(self, *args, **kwargs):
4662 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4663 newobj = _core_.new_FocusEvent(*args, **kwargs)
4664 self.this = newobj.this
4665 self.thisown = 1
4666 del newobj.thisown
4667 def GetWindow(*args, **kwargs):
4668 """GetWindow(self) -> Window"""
4669 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4670
4671 def SetWindow(*args, **kwargs):
4672 """SetWindow(self, Window win)"""
4673 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4674
4675
4676 class FocusEventPtr(FocusEvent):
4677 def __init__(self, this):
4678 self.this = this
4679 if not hasattr(self,"thisown"): self.thisown = 0
4680 self.__class__ = FocusEvent
4681 _core_.FocusEvent_swigregister(FocusEventPtr)
4682
4683 #---------------------------------------------------------------------------
4684
4685 class ChildFocusEvent(CommandEvent):
4686 """Proxy of C++ ChildFocusEvent class"""
4687 def __repr__(self):
4688 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4689 def __init__(self, *args, **kwargs):
4690 """__init__(self, Window win=None) -> ChildFocusEvent"""
4691 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4692 self.this = newobj.this
4693 self.thisown = 1
4694 del newobj.thisown
4695 def GetWindow(*args, **kwargs):
4696 """GetWindow(self) -> Window"""
4697 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4698
4699
4700 class ChildFocusEventPtr(ChildFocusEvent):
4701 def __init__(self, this):
4702 self.this = this
4703 if not hasattr(self,"thisown"): self.thisown = 0
4704 self.__class__ = ChildFocusEvent
4705 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4706
4707 #---------------------------------------------------------------------------
4708
4709 class ActivateEvent(Event):
4710 """Proxy of C++ ActivateEvent class"""
4711 def __repr__(self):
4712 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4713 def __init__(self, *args, **kwargs):
4714 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4715 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4716 self.this = newobj.this
4717 self.thisown = 1
4718 del newobj.thisown
4719 def GetActive(*args, **kwargs):
4720 """GetActive(self) -> bool"""
4721 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4722
4723
4724 class ActivateEventPtr(ActivateEvent):
4725 def __init__(self, this):
4726 self.this = this
4727 if not hasattr(self,"thisown"): self.thisown = 0
4728 self.__class__ = ActivateEvent
4729 _core_.ActivateEvent_swigregister(ActivateEventPtr)
4730
4731 #---------------------------------------------------------------------------
4732
4733 class InitDialogEvent(Event):
4734 """Proxy of C++ InitDialogEvent class"""
4735 def __repr__(self):
4736 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4737 def __init__(self, *args, **kwargs):
4738 """__init__(self, int Id=0) -> InitDialogEvent"""
4739 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4740 self.this = newobj.this
4741 self.thisown = 1
4742 del newobj.thisown
4743
4744 class InitDialogEventPtr(InitDialogEvent):
4745 def __init__(self, this):
4746 self.this = this
4747 if not hasattr(self,"thisown"): self.thisown = 0
4748 self.__class__ = InitDialogEvent
4749 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4750
4751 #---------------------------------------------------------------------------
4752
4753 class MenuEvent(Event):
4754 """Proxy of C++ MenuEvent class"""
4755 def __repr__(self):
4756 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4757 def __init__(self, *args, **kwargs):
4758 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4759 newobj = _core_.new_MenuEvent(*args, **kwargs)
4760 self.this = newobj.this
4761 self.thisown = 1
4762 del newobj.thisown
4763 def GetMenuId(*args, **kwargs):
4764 """GetMenuId(self) -> int"""
4765 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4766
4767 def IsPopup(*args, **kwargs):
4768 """IsPopup(self) -> bool"""
4769 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4770
4771 def GetMenu(*args, **kwargs):
4772 """GetMenu(self) -> Menu"""
4773 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4774
4775
4776 class MenuEventPtr(MenuEvent):
4777 def __init__(self, this):
4778 self.this = this
4779 if not hasattr(self,"thisown"): self.thisown = 0
4780 self.__class__ = MenuEvent
4781 _core_.MenuEvent_swigregister(MenuEventPtr)
4782
4783 #---------------------------------------------------------------------------
4784
4785 class CloseEvent(Event):
4786 """Proxy of C++ CloseEvent class"""
4787 def __repr__(self):
4788 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4789 def __init__(self, *args, **kwargs):
4790 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4791 newobj = _core_.new_CloseEvent(*args, **kwargs)
4792 self.this = newobj.this
4793 self.thisown = 1
4794 del newobj.thisown
4795 def SetLoggingOff(*args, **kwargs):
4796 """SetLoggingOff(self, bool logOff)"""
4797 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4798
4799 def GetLoggingOff(*args, **kwargs):
4800 """GetLoggingOff(self) -> bool"""
4801 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4802
4803 def Veto(*args, **kwargs):
4804 """Veto(self, bool veto=True)"""
4805 return _core_.CloseEvent_Veto(*args, **kwargs)
4806
4807 def SetCanVeto(*args, **kwargs):
4808 """SetCanVeto(self, bool canVeto)"""
4809 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4810
4811 def CanVeto(*args, **kwargs):
4812 """CanVeto(self) -> bool"""
4813 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4814
4815 def GetVeto(*args, **kwargs):
4816 """GetVeto(self) -> bool"""
4817 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4818
4819
4820 class CloseEventPtr(CloseEvent):
4821 def __init__(self, this):
4822 self.this = this
4823 if not hasattr(self,"thisown"): self.thisown = 0
4824 self.__class__ = CloseEvent
4825 _core_.CloseEvent_swigregister(CloseEventPtr)
4826
4827 #---------------------------------------------------------------------------
4828
4829 class ShowEvent(Event):
4830 """Proxy of C++ ShowEvent class"""
4831 def __repr__(self):
4832 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4833 def __init__(self, *args, **kwargs):
4834 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4835 newobj = _core_.new_ShowEvent(*args, **kwargs)
4836 self.this = newobj.this
4837 self.thisown = 1
4838 del newobj.thisown
4839 def SetShow(*args, **kwargs):
4840 """SetShow(self, bool show)"""
4841 return _core_.ShowEvent_SetShow(*args, **kwargs)
4842
4843 def GetShow(*args, **kwargs):
4844 """GetShow(self) -> bool"""
4845 return _core_.ShowEvent_GetShow(*args, **kwargs)
4846
4847
4848 class ShowEventPtr(ShowEvent):
4849 def __init__(self, this):
4850 self.this = this
4851 if not hasattr(self,"thisown"): self.thisown = 0
4852 self.__class__ = ShowEvent
4853 _core_.ShowEvent_swigregister(ShowEventPtr)
4854
4855 #---------------------------------------------------------------------------
4856
4857 class IconizeEvent(Event):
4858 """Proxy of C++ IconizeEvent class"""
4859 def __repr__(self):
4860 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4861 def __init__(self, *args, **kwargs):
4862 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4863 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4864 self.this = newobj.this
4865 self.thisown = 1
4866 del newobj.thisown
4867 def Iconized(*args, **kwargs):
4868 """Iconized(self) -> bool"""
4869 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4870
4871
4872 class IconizeEventPtr(IconizeEvent):
4873 def __init__(self, this):
4874 self.this = this
4875 if not hasattr(self,"thisown"): self.thisown = 0
4876 self.__class__ = IconizeEvent
4877 _core_.IconizeEvent_swigregister(IconizeEventPtr)
4878
4879 #---------------------------------------------------------------------------
4880
4881 class MaximizeEvent(Event):
4882 """Proxy of C++ MaximizeEvent class"""
4883 def __repr__(self):
4884 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4885 def __init__(self, *args, **kwargs):
4886 """__init__(self, int id=0) -> MaximizeEvent"""
4887 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4888 self.this = newobj.this
4889 self.thisown = 1
4890 del newobj.thisown
4891
4892 class MaximizeEventPtr(MaximizeEvent):
4893 def __init__(self, this):
4894 self.this = this
4895 if not hasattr(self,"thisown"): self.thisown = 0
4896 self.__class__ = MaximizeEvent
4897 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4898
4899 #---------------------------------------------------------------------------
4900
4901 class DropFilesEvent(Event):
4902 """Proxy of C++ DropFilesEvent class"""
4903 def __init__(self): raise RuntimeError, "No constructor defined"
4904 def __repr__(self):
4905 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4906 def GetPosition(*args, **kwargs):
4907 """GetPosition(self) -> Point"""
4908 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4909
4910 def GetNumberOfFiles(*args, **kwargs):
4911 """GetNumberOfFiles(self) -> int"""
4912 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4913
4914 def GetFiles(*args, **kwargs):
4915 """GetFiles(self) -> PyObject"""
4916 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4917
4918
4919 class DropFilesEventPtr(DropFilesEvent):
4920 def __init__(self, this):
4921 self.this = this
4922 if not hasattr(self,"thisown"): self.thisown = 0
4923 self.__class__ = DropFilesEvent
4924 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4925
4926 #---------------------------------------------------------------------------
4927
4928 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4929 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4930 class UpdateUIEvent(CommandEvent):
4931 """Proxy of C++ UpdateUIEvent class"""
4932 def __repr__(self):
4933 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4934 def __init__(self, *args, **kwargs):
4935 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4936 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4937 self.this = newobj.this
4938 self.thisown = 1
4939 del newobj.thisown
4940 def GetChecked(*args, **kwargs):
4941 """GetChecked(self) -> bool"""
4942 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4943
4944 def GetEnabled(*args, **kwargs):
4945 """GetEnabled(self) -> bool"""
4946 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4947
4948 def GetText(*args, **kwargs):
4949 """GetText(self) -> String"""
4950 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4951
4952 def GetSetText(*args, **kwargs):
4953 """GetSetText(self) -> bool"""
4954 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4955
4956 def GetSetChecked(*args, **kwargs):
4957 """GetSetChecked(self) -> bool"""
4958 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4959
4960 def GetSetEnabled(*args, **kwargs):
4961 """GetSetEnabled(self) -> bool"""
4962 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4963
4964 def Check(*args, **kwargs):
4965 """Check(self, bool check)"""
4966 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4967
4968 def Enable(*args, **kwargs):
4969 """Enable(self, bool enable)"""
4970 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4971
4972 def SetText(*args, **kwargs):
4973 """SetText(self, String text)"""
4974 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4975
4976 def SetUpdateInterval(*args, **kwargs):
4977 """SetUpdateInterval(long updateInterval)"""
4978 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4979
4980 SetUpdateInterval = staticmethod(SetUpdateInterval)
4981 def GetUpdateInterval(*args, **kwargs):
4982 """GetUpdateInterval() -> long"""
4983 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4984
4985 GetUpdateInterval = staticmethod(GetUpdateInterval)
4986 def CanUpdate(*args, **kwargs):
4987 """CanUpdate(Window win) -> bool"""
4988 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4989
4990 CanUpdate = staticmethod(CanUpdate)
4991 def ResetUpdateTime(*args, **kwargs):
4992 """ResetUpdateTime()"""
4993 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4994
4995 ResetUpdateTime = staticmethod(ResetUpdateTime)
4996 def SetMode(*args, **kwargs):
4997 """SetMode(int mode)"""
4998 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4999
5000 SetMode = staticmethod(SetMode)
5001 def GetMode(*args, **kwargs):
5002 """GetMode() -> int"""
5003 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
5004
5005 GetMode = staticmethod(GetMode)
5006
5007 class UpdateUIEventPtr(UpdateUIEvent):
5008 def __init__(self, this):
5009 self.this = this
5010 if not hasattr(self,"thisown"): self.thisown = 0
5011 self.__class__ = UpdateUIEvent
5012 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
5013
5014 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
5015 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
5016 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
5017
5018 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
5019 """UpdateUIEvent_GetUpdateInterval() -> long"""
5020 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
5021
5022 def UpdateUIEvent_CanUpdate(*args, **kwargs):
5023 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
5024 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
5025
5026 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
5027 """UpdateUIEvent_ResetUpdateTime()"""
5028 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
5029
5030 def UpdateUIEvent_SetMode(*args, **kwargs):
5031 """UpdateUIEvent_SetMode(int mode)"""
5032 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
5033
5034 def UpdateUIEvent_GetMode(*args, **kwargs):
5035 """UpdateUIEvent_GetMode() -> int"""
5036 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
5037
5038 #---------------------------------------------------------------------------
5039
5040 class SysColourChangedEvent(Event):
5041 """Proxy of C++ SysColourChangedEvent class"""
5042 def __repr__(self):
5043 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5044 def __init__(self, *args, **kwargs):
5045 """__init__(self) -> SysColourChangedEvent"""
5046 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
5047 self.this = newobj.this
5048 self.thisown = 1
5049 del newobj.thisown
5050
5051 class SysColourChangedEventPtr(SysColourChangedEvent):
5052 def __init__(self, this):
5053 self.this = this
5054 if not hasattr(self,"thisown"): self.thisown = 0
5055 self.__class__ = SysColourChangedEvent
5056 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
5057
5058 #---------------------------------------------------------------------------
5059
5060 class MouseCaptureChangedEvent(Event):
5061 """Proxy of C++ MouseCaptureChangedEvent class"""
5062 def __repr__(self):
5063 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5064 def __init__(self, *args, **kwargs):
5065 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
5066 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
5067 self.this = newobj.this
5068 self.thisown = 1
5069 del newobj.thisown
5070 def GetCapturedWindow(*args, **kwargs):
5071 """GetCapturedWindow(self) -> Window"""
5072 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
5073
5074
5075 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
5076 def __init__(self, this):
5077 self.this = this
5078 if not hasattr(self,"thisown"): self.thisown = 0
5079 self.__class__ = MouseCaptureChangedEvent
5080 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
5081
5082 #---------------------------------------------------------------------------
5083
5084 class DisplayChangedEvent(Event):
5085 """Proxy of C++ DisplayChangedEvent class"""
5086 def __repr__(self):
5087 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5088 def __init__(self, *args, **kwargs):
5089 """__init__(self) -> DisplayChangedEvent"""
5090 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
5091 self.this = newobj.this
5092 self.thisown = 1
5093 del newobj.thisown
5094
5095 class DisplayChangedEventPtr(DisplayChangedEvent):
5096 def __init__(self, this):
5097 self.this = this
5098 if not hasattr(self,"thisown"): self.thisown = 0
5099 self.__class__ = DisplayChangedEvent
5100 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
5101
5102 #---------------------------------------------------------------------------
5103
5104 class PaletteChangedEvent(Event):
5105 """Proxy of C++ PaletteChangedEvent class"""
5106 def __repr__(self):
5107 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5108 def __init__(self, *args, **kwargs):
5109 """__init__(self, int id=0) -> PaletteChangedEvent"""
5110 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
5111 self.this = newobj.this
5112 self.thisown = 1
5113 del newobj.thisown
5114 def SetChangedWindow(*args, **kwargs):
5115 """SetChangedWindow(self, Window win)"""
5116 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
5117
5118 def GetChangedWindow(*args, **kwargs):
5119 """GetChangedWindow(self) -> Window"""
5120 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
5121
5122
5123 class PaletteChangedEventPtr(PaletteChangedEvent):
5124 def __init__(self, this):
5125 self.this = this
5126 if not hasattr(self,"thisown"): self.thisown = 0
5127 self.__class__ = PaletteChangedEvent
5128 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
5129
5130 #---------------------------------------------------------------------------
5131
5132 class QueryNewPaletteEvent(Event):
5133 """Proxy of C++ QueryNewPaletteEvent class"""
5134 def __repr__(self):
5135 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5136 def __init__(self, *args, **kwargs):
5137 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
5138 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
5139 self.this = newobj.this
5140 self.thisown = 1
5141 del newobj.thisown
5142 def SetPaletteRealized(*args, **kwargs):
5143 """SetPaletteRealized(self, bool realized)"""
5144 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
5145
5146 def GetPaletteRealized(*args, **kwargs):
5147 """GetPaletteRealized(self) -> bool"""
5148 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
5149
5150
5151 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
5152 def __init__(self, this):
5153 self.this = this
5154 if not hasattr(self,"thisown"): self.thisown = 0
5155 self.__class__ = QueryNewPaletteEvent
5156 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
5157
5158 #---------------------------------------------------------------------------
5159
5160 class NavigationKeyEvent(Event):
5161 """Proxy of C++ NavigationKeyEvent class"""
5162 def __repr__(self):
5163 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5164 def __init__(self, *args, **kwargs):
5165 """__init__(self) -> NavigationKeyEvent"""
5166 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
5167 self.this = newobj.this
5168 self.thisown = 1
5169 del newobj.thisown
5170 def GetDirection(*args, **kwargs):
5171 """GetDirection(self) -> bool"""
5172 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
5173
5174 def SetDirection(*args, **kwargs):
5175 """SetDirection(self, bool forward)"""
5176 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
5177
5178 def IsWindowChange(*args, **kwargs):
5179 """IsWindowChange(self) -> bool"""
5180 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
5181
5182 def SetWindowChange(*args, **kwargs):
5183 """SetWindowChange(self, bool ischange)"""
5184 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
5185
5186 def IsFromTab(*args, **kwargs):
5187 """IsFromTab(self) -> bool"""
5188 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
5189
5190 def SetFromTab(*args, **kwargs):
5191 """SetFromTab(self, bool bIs)"""
5192 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
5193
5194 def SetFlags(*args, **kwargs):
5195 """SetFlags(self, long flags)"""
5196 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
5197
5198 def GetCurrentFocus(*args, **kwargs):
5199 """GetCurrentFocus(self) -> Window"""
5200 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
5201
5202 def SetCurrentFocus(*args, **kwargs):
5203 """SetCurrentFocus(self, Window win)"""
5204 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
5205
5206 IsBackward = _core_.NavigationKeyEvent_IsBackward
5207 IsForward = _core_.NavigationKeyEvent_IsForward
5208 WinChange = _core_.NavigationKeyEvent_WinChange
5209 FromTab = _core_.NavigationKeyEvent_FromTab
5210
5211 class NavigationKeyEventPtr(NavigationKeyEvent):
5212 def __init__(self, this):
5213 self.this = this
5214 if not hasattr(self,"thisown"): self.thisown = 0
5215 self.__class__ = NavigationKeyEvent
5216 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
5217
5218 #---------------------------------------------------------------------------
5219
5220 class WindowCreateEvent(CommandEvent):
5221 """Proxy of C++ WindowCreateEvent class"""
5222 def __repr__(self):
5223 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5224 def __init__(self, *args, **kwargs):
5225 """__init__(self, Window win=None) -> WindowCreateEvent"""
5226 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
5227 self.this = newobj.this
5228 self.thisown = 1
5229 del newobj.thisown
5230 def GetWindow(*args, **kwargs):
5231 """GetWindow(self) -> Window"""
5232 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
5233
5234
5235 class WindowCreateEventPtr(WindowCreateEvent):
5236 def __init__(self, this):
5237 self.this = this
5238 if not hasattr(self,"thisown"): self.thisown = 0
5239 self.__class__ = WindowCreateEvent
5240 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
5241
5242 class WindowDestroyEvent(CommandEvent):
5243 """Proxy of C++ WindowDestroyEvent class"""
5244 def __repr__(self):
5245 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5246 def __init__(self, *args, **kwargs):
5247 """__init__(self, Window win=None) -> WindowDestroyEvent"""
5248 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
5249 self.this = newobj.this
5250 self.thisown = 1
5251 del newobj.thisown
5252 def GetWindow(*args, **kwargs):
5253 """GetWindow(self) -> Window"""
5254 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
5255
5256
5257 class WindowDestroyEventPtr(WindowDestroyEvent):
5258 def __init__(self, this):
5259 self.this = this
5260 if not hasattr(self,"thisown"): self.thisown = 0
5261 self.__class__ = WindowDestroyEvent
5262 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
5263
5264 #---------------------------------------------------------------------------
5265
5266 class ContextMenuEvent(CommandEvent):
5267 """Proxy of C++ ContextMenuEvent class"""
5268 def __repr__(self):
5269 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5270 def __init__(self, *args, **kwargs):
5271 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
5272 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
5273 self.this = newobj.this
5274 self.thisown = 1
5275 del newobj.thisown
5276 def GetPosition(*args, **kwargs):
5277 """GetPosition(self) -> Point"""
5278 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
5279
5280 def SetPosition(*args, **kwargs):
5281 """SetPosition(self, Point pos)"""
5282 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
5283
5284
5285 class ContextMenuEventPtr(ContextMenuEvent):
5286 def __init__(self, this):
5287 self.this = this
5288 if not hasattr(self,"thisown"): self.thisown = 0
5289 self.__class__ = ContextMenuEvent
5290 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
5291
5292 #---------------------------------------------------------------------------
5293
5294 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
5295 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
5296 class IdleEvent(Event):
5297 """Proxy of C++ IdleEvent class"""
5298 def __repr__(self):
5299 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5300 def __init__(self, *args, **kwargs):
5301 """__init__(self) -> IdleEvent"""
5302 newobj = _core_.new_IdleEvent(*args, **kwargs)
5303 self.this = newobj.this
5304 self.thisown = 1
5305 del newobj.thisown
5306 def RequestMore(*args, **kwargs):
5307 """RequestMore(self, bool needMore=True)"""
5308 return _core_.IdleEvent_RequestMore(*args, **kwargs)
5309
5310 def MoreRequested(*args, **kwargs):
5311 """MoreRequested(self) -> bool"""
5312 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
5313
5314 def SetMode(*args, **kwargs):
5315 """SetMode(int mode)"""
5316 return _core_.IdleEvent_SetMode(*args, **kwargs)
5317
5318 SetMode = staticmethod(SetMode)
5319 def GetMode(*args, **kwargs):
5320 """GetMode() -> int"""
5321 return _core_.IdleEvent_GetMode(*args, **kwargs)
5322
5323 GetMode = staticmethod(GetMode)
5324 def CanSend(*args, **kwargs):
5325 """CanSend(Window win) -> bool"""
5326 return _core_.IdleEvent_CanSend(*args, **kwargs)
5327
5328 CanSend = staticmethod(CanSend)
5329
5330 class IdleEventPtr(IdleEvent):
5331 def __init__(self, this):
5332 self.this = this
5333 if not hasattr(self,"thisown"): self.thisown = 0
5334 self.__class__ = IdleEvent
5335 _core_.IdleEvent_swigregister(IdleEventPtr)
5336
5337 def IdleEvent_SetMode(*args, **kwargs):
5338 """IdleEvent_SetMode(int mode)"""
5339 return _core_.IdleEvent_SetMode(*args, **kwargs)
5340
5341 def IdleEvent_GetMode(*args, **kwargs):
5342 """IdleEvent_GetMode() -> int"""
5343 return _core_.IdleEvent_GetMode(*args, **kwargs)
5344
5345 def IdleEvent_CanSend(*args, **kwargs):
5346 """IdleEvent_CanSend(Window win) -> bool"""
5347 return _core_.IdleEvent_CanSend(*args, **kwargs)
5348
5349 #---------------------------------------------------------------------------
5350
5351 class PyEvent(Event):
5352 """Proxy of C++ PyEvent class"""
5353 def __repr__(self):
5354 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5355 def __init__(self, *args, **kwargs):
5356 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
5357 newobj = _core_.new_PyEvent(*args, **kwargs)
5358 self.this = newobj.this
5359 self.thisown = 1
5360 del newobj.thisown
5361 self.SetSelf(self)
5362
5363 def __del__(self, destroy=_core_.delete_PyEvent):
5364 """__del__(self)"""
5365 try:
5366 if self.thisown: destroy(self)
5367 except: pass
5368
5369 def SetSelf(*args, **kwargs):
5370 """SetSelf(self, PyObject self)"""
5371 return _core_.PyEvent_SetSelf(*args, **kwargs)
5372
5373 def GetSelf(*args, **kwargs):
5374 """GetSelf(self) -> PyObject"""
5375 return _core_.PyEvent_GetSelf(*args, **kwargs)
5376
5377
5378 class PyEventPtr(PyEvent):
5379 def __init__(self, this):
5380 self.this = this
5381 if not hasattr(self,"thisown"): self.thisown = 0
5382 self.__class__ = PyEvent
5383 _core_.PyEvent_swigregister(PyEventPtr)
5384
5385 class PyCommandEvent(CommandEvent):
5386 """Proxy of C++ PyCommandEvent class"""
5387 def __repr__(self):
5388 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5389 def __init__(self, *args, **kwargs):
5390 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
5391 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
5392 self.this = newobj.this
5393 self.thisown = 1
5394 del newobj.thisown
5395 self.SetSelf(self)
5396
5397 def __del__(self, destroy=_core_.delete_PyCommandEvent):
5398 """__del__(self)"""
5399 try:
5400 if self.thisown: destroy(self)
5401 except: pass
5402
5403 def SetSelf(*args, **kwargs):
5404 """SetSelf(self, PyObject self)"""
5405 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
5406
5407 def GetSelf(*args, **kwargs):
5408 """GetSelf(self) -> PyObject"""
5409 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
5410
5411
5412 class PyCommandEventPtr(PyCommandEvent):
5413 def __init__(self, this):
5414 self.this = this
5415 if not hasattr(self,"thisown"): self.thisown = 0
5416 self.__class__ = PyCommandEvent
5417 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
5418
5419 class DateEvent(CommandEvent):
5420 """Proxy of C++ DateEvent class"""
5421 def __repr__(self):
5422 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5423 def __init__(self, *args, **kwargs):
5424 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
5425 newobj = _core_.new_DateEvent(*args, **kwargs)
5426 self.this = newobj.this
5427 self.thisown = 1
5428 del newobj.thisown
5429 def GetDate(*args, **kwargs):
5430 """GetDate(self) -> DateTime"""
5431 return _core_.DateEvent_GetDate(*args, **kwargs)
5432
5433 def SetDate(*args, **kwargs):
5434 """SetDate(self, DateTime date)"""
5435 return _core_.DateEvent_SetDate(*args, **kwargs)
5436
5437
5438 class DateEventPtr(DateEvent):
5439 def __init__(self, this):
5440 self.this = this
5441 if not hasattr(self,"thisown"): self.thisown = 0
5442 self.__class__ = DateEvent
5443 _core_.DateEvent_swigregister(DateEventPtr)
5444
5445 wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
5446 EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
5447
5448 #---------------------------------------------------------------------------
5449
5450 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
5451 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
5452 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
5453 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
5454 PRINT_WINDOWS = _core_.PRINT_WINDOWS
5455 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
5456 class PyApp(EvtHandler):
5457 """
5458 The ``wx.PyApp`` class is an *implementation detail*, please use the
5459 `wx.App` class (or some other derived class) instead.
5460 """
5461 def __repr__(self):
5462 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5463 def __init__(self, *args, **kwargs):
5464 """
5465 __init__(self) -> PyApp
5466
5467 Create a new application object, starting the bootstrap process.
5468 """
5469 newobj = _core_.new_PyApp(*args, **kwargs)
5470 self.this = newobj.this
5471 self.thisown = 1
5472 del newobj.thisown
5473 self._setCallbackInfo(self, PyApp, False)
5474 self._setOORInfo(self, False)
5475
5476 def __del__(self, destroy=_core_.delete_PyApp):
5477 """__del__(self)"""
5478 try:
5479 if self.thisown: destroy(self)
5480 except: pass
5481
5482 def _setCallbackInfo(*args, **kwargs):
5483 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
5484 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
5485
5486 def GetAppName(*args, **kwargs):
5487 """
5488 GetAppName(self) -> String
5489
5490 Get the application name.
5491 """
5492 return _core_.PyApp_GetAppName(*args, **kwargs)
5493
5494 def SetAppName(*args, **kwargs):
5495 """
5496 SetAppName(self, String name)
5497
5498 Set the application name. This value may be used automatically by
5499 `wx.Config` and such.
5500 """
5501 return _core_.PyApp_SetAppName(*args, **kwargs)
5502
5503 def GetClassName(*args, **kwargs):
5504 """
5505 GetClassName(self) -> String
5506
5507 Get the application's class name.
5508 """
5509 return _core_.PyApp_GetClassName(*args, **kwargs)
5510
5511 def SetClassName(*args, **kwargs):
5512 """
5513 SetClassName(self, String name)
5514
5515 Set the application's class name. This value may be used for
5516 X-resources if applicable for the platform
5517 """
5518 return _core_.PyApp_SetClassName(*args, **kwargs)
5519
5520 def GetVendorName(*args, **kwargs):
5521 """
5522 GetVendorName(self) -> String
5523
5524 Get the application's vendor name.
5525 """
5526 return _core_.PyApp_GetVendorName(*args, **kwargs)
5527
5528 def SetVendorName(*args, **kwargs):
5529 """
5530 SetVendorName(self, String name)
5531
5532 Set the application's vendor name. This value may be used
5533 automatically by `wx.Config` and such.
5534 """
5535 return _core_.PyApp_SetVendorName(*args, **kwargs)
5536
5537 def GetTraits(*args, **kwargs):
5538 """
5539 GetTraits(self) -> wxAppTraits
5540
5541 Return (and create if necessary) the app traits object to which we
5542 delegate for everything which either should be configurable by the
5543 user (then he can change the default behaviour simply by overriding
5544 CreateTraits() and returning his own traits object) or which is
5545 GUI/console dependent as then wx.AppTraits allows us to abstract the
5546 differences behind the common facade.
5547
5548 :todo: Add support for overriding CreateAppTraits in wxPython.
5549 """
5550 return _core_.PyApp_GetTraits(*args, **kwargs)
5551
5552 def ProcessPendingEvents(*args, **kwargs):
5553 """
5554 ProcessPendingEvents(self)
5555
5556 Process all events in the Pending Events list -- it is necessary to
5557 call this function to process posted events. This normally happens
5558 during each event loop iteration.
5559 """
5560 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
5561
5562 def Yield(*args, **kwargs):
5563 """
5564 Yield(self, bool onlyIfNeeded=False) -> bool
5565
5566 Process all currently pending events right now, instead of waiting
5567 until return to the event loop. It is an error to call ``Yield``
5568 recursively unless the value of ``onlyIfNeeded`` is True.
5569
5570 :warning: This function is dangerous as it can lead to unexpected
5571 reentrancies (i.e. when called from an event handler it may
5572 result in calling the same event handler again), use with
5573 extreme care or, better, don't use at all!
5574
5575 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
5576
5577 """
5578 return _core_.PyApp_Yield(*args, **kwargs)
5579
5580 def WakeUpIdle(*args, **kwargs):
5581 """
5582 WakeUpIdle(self)
5583
5584 Make sure that idle events are sent again.
5585 :see: `wx.WakeUpIdle`
5586 """
5587 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
5588
5589 def IsMainLoopRunning(*args, **kwargs):
5590 """
5591 IsMainLoopRunning() -> bool
5592
5593 Returns True if we're running the main loop, i.e. if the events can
5594 currently be dispatched.
5595 """
5596 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5597
5598 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
5599 def MainLoop(*args, **kwargs):
5600 """
5601 MainLoop(self) -> int
5602
5603 Execute the main GUI loop, the function doesn't normally return until
5604 all top level windows have been closed and destroyed.
5605 """
5606 return _core_.PyApp_MainLoop(*args, **kwargs)
5607
5608 def Exit(*args, **kwargs):
5609 """
5610 Exit(self)
5611
5612 Exit the main loop thus terminating the application.
5613 :see: `wx.Exit`
5614 """
5615 return _core_.PyApp_Exit(*args, **kwargs)
5616
5617 def ExitMainLoop(*args, **kwargs):
5618 """
5619 ExitMainLoop(self)
5620
5621 Exit the main GUI loop during the next iteration of the main
5622 loop, (i.e. it does not stop the program immediately!)
5623 """
5624 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
5625
5626 def Pending(*args, **kwargs):
5627 """
5628 Pending(self) -> bool
5629
5630 Returns True if there are unprocessed events in the event queue.
5631 """
5632 return _core_.PyApp_Pending(*args, **kwargs)
5633
5634 def Dispatch(*args, **kwargs):
5635 """
5636 Dispatch(self) -> bool
5637
5638 Process the first event in the event queue (blocks until an event
5639 appears if there are none currently)
5640 """
5641 return _core_.PyApp_Dispatch(*args, **kwargs)
5642
5643 def ProcessIdle(*args, **kwargs):
5644 """
5645 ProcessIdle(self) -> bool
5646
5647 Called from the MainLoop when the application becomes idle (there are
5648 no pending events) and sends a `wx.IdleEvent` to all interested
5649 parties. Returns True if more idle events are needed, False if not.
5650 """
5651 return _core_.PyApp_ProcessIdle(*args, **kwargs)
5652
5653 def SendIdleEvents(*args, **kwargs):
5654 """
5655 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5656
5657 Send idle event to window and all subwindows. Returns True if more
5658 idle time is requested.
5659 """
5660 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
5661
5662 def IsActive(*args, **kwargs):
5663 """
5664 IsActive(self) -> bool
5665
5666 Return True if our app has focus.
5667 """
5668 return _core_.PyApp_IsActive(*args, **kwargs)
5669
5670 def SetTopWindow(*args, **kwargs):
5671 """
5672 SetTopWindow(self, Window win)
5673
5674 Set the *main* top level window
5675 """
5676 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5677
5678 def GetTopWindow(*args, **kwargs):
5679 """
5680 GetTopWindow(self) -> Window
5681
5682 Return the *main* top level window (if it hadn't been set previously
5683 with SetTopWindow(), will return just some top level window and, if
5684 there not any, will return None)
5685 """
5686 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5687
5688 def SetExitOnFrameDelete(*args, **kwargs):
5689 """
5690 SetExitOnFrameDelete(self, bool flag)
5691
5692 Control the exit behaviour: by default, the program will exit the main
5693 loop (and so, usually, terminate) when the last top-level program
5694 window is deleted. Beware that if you disable this behaviour (with
5695 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5696 explicitly from somewhere.
5697 """
5698 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5699
5700 def GetExitOnFrameDelete(*args, **kwargs):
5701 """
5702 GetExitOnFrameDelete(self) -> bool
5703
5704 Get the current exit behaviour setting.
5705 """
5706 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5707
5708 def SetUseBestVisual(*args, **kwargs):
5709 """
5710 SetUseBestVisual(self, bool flag)
5711
5712 Set whether the app should try to use the best available visual on
5713 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5714 """
5715 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5716
5717 def GetUseBestVisual(*args, **kwargs):
5718 """
5719 GetUseBestVisual(self) -> bool
5720
5721 Get current UseBestVisual setting.
5722 """
5723 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5724
5725 def SetPrintMode(*args, **kwargs):
5726 """SetPrintMode(self, int mode)"""
5727 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5728
5729 def GetPrintMode(*args, **kwargs):
5730 """GetPrintMode(self) -> int"""
5731 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5732
5733 def SetAssertMode(*args, **kwargs):
5734 """
5735 SetAssertMode(self, int mode)
5736
5737 Set the OnAssert behaviour for debug and hybrid builds.
5738 """
5739 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5740
5741 def GetAssertMode(*args, **kwargs):
5742 """
5743 GetAssertMode(self) -> int
5744
5745 Get the current OnAssert behaviour setting.
5746 """
5747 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5748
5749 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
5750 """GetMacSupportPCMenuShortcuts() -> bool"""
5751 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5752
5753 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5754 def GetMacAboutMenuItemId(*args, **kwargs):
5755 """GetMacAboutMenuItemId() -> long"""
5756 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5757
5758 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5759 def GetMacPreferencesMenuItemId(*args, **kwargs):
5760 """GetMacPreferencesMenuItemId() -> long"""
5761 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5762
5763 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5764 def GetMacExitMenuItemId(*args, **kwargs):
5765 """GetMacExitMenuItemId() -> long"""
5766 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5767
5768 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5769 def GetMacHelpMenuTitleName(*args, **kwargs):
5770 """GetMacHelpMenuTitleName() -> String"""
5771 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5772
5773 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5774 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
5775 """SetMacSupportPCMenuShortcuts(bool val)"""
5776 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5777
5778 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5779 def SetMacAboutMenuItemId(*args, **kwargs):
5780 """SetMacAboutMenuItemId(long val)"""
5781 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5782
5783 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5784 def SetMacPreferencesMenuItemId(*args, **kwargs):
5785 """SetMacPreferencesMenuItemId(long val)"""
5786 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5787
5788 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5789 def SetMacExitMenuItemId(*args, **kwargs):
5790 """SetMacExitMenuItemId(long val)"""
5791 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5792
5793 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5794 def SetMacHelpMenuTitleName(*args, **kwargs):
5795 """SetMacHelpMenuTitleName(String val)"""
5796 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5797
5798 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5799 def _BootstrapApp(*args, **kwargs):
5800 """
5801 _BootstrapApp(self)
5802
5803 For internal use only
5804 """
5805 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5806
5807 def GetComCtl32Version(*args, **kwargs):
5808 """
5809 GetComCtl32Version() -> int
5810
5811 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5812 it wasn't found at all. Raises an exception on non-Windows platforms.
5813 """
5814 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5815
5816 GetComCtl32Version = staticmethod(GetComCtl32Version)
5817
5818 class PyAppPtr(PyApp):
5819 def __init__(self, this):
5820 self.this = this
5821 if not hasattr(self,"thisown"): self.thisown = 0
5822 self.__class__ = PyApp
5823 _core_.PyApp_swigregister(PyAppPtr)
5824
5825 def PyApp_IsMainLoopRunning(*args, **kwargs):
5826 """
5827 PyApp_IsMainLoopRunning() -> bool
5828
5829 Returns True if we're running the main loop, i.e. if the events can
5830 currently be dispatched.
5831 """
5832 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5833
5834 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5835 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5836 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5837
5838 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5839 """PyApp_GetMacAboutMenuItemId() -> long"""
5840 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5841
5842 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5843 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5844 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5845
5846 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5847 """PyApp_GetMacExitMenuItemId() -> long"""
5848 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5849
5850 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5851 """PyApp_GetMacHelpMenuTitleName() -> String"""
5852 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5853
5854 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5855 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5856 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5857
5858 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5859 """PyApp_SetMacAboutMenuItemId(long val)"""
5860 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5861
5862 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5863 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5864 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5865
5866 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5867 """PyApp_SetMacExitMenuItemId(long val)"""
5868 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5869
5870 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5871 """PyApp_SetMacHelpMenuTitleName(String val)"""
5872 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5873
5874 def PyApp_GetComCtl32Version(*args, **kwargs):
5875 """
5876 PyApp_GetComCtl32Version() -> int
5877
5878 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5879 it wasn't found at all. Raises an exception on non-Windows platforms.
5880 """
5881 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5882
5883 #---------------------------------------------------------------------------
5884
5885
5886 def Exit(*args, **kwargs):
5887 """
5888 Exit()
5889
5890 Force an exit of the application. Convenience for wx.GetApp().Exit()
5891 """
5892 return _core_.Exit(*args, **kwargs)
5893
5894 def Yield(*args, **kwargs):
5895 """
5896 Yield() -> bool
5897
5898 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5899 """
5900 return _core_.Yield(*args, **kwargs)
5901
5902 def YieldIfNeeded(*args, **kwargs):
5903 """
5904 YieldIfNeeded() -> bool
5905
5906 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5907 """
5908 return _core_.YieldIfNeeded(*args, **kwargs)
5909
5910 def SafeYield(*args, **kwargs):
5911 """
5912 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5913
5914 This function is similar to `wx.Yield`, except that it disables the
5915 user input to all program windows before calling `wx.Yield` and
5916 re-enables it again afterwards. If ``win`` is not None, this window
5917 will remain enabled, allowing the implementation of some limited user
5918 interaction.
5919
5920 :Returns: the result of the call to `wx.Yield`.
5921 """
5922 return _core_.SafeYield(*args, **kwargs)
5923
5924 def WakeUpIdle(*args, **kwargs):
5925 """
5926 WakeUpIdle()
5927
5928 Cause the message queue to become empty again, so idle events will be
5929 sent.
5930 """
5931 return _core_.WakeUpIdle(*args, **kwargs)
5932
5933 def PostEvent(*args, **kwargs):
5934 """
5935 PostEvent(EvtHandler dest, Event event)
5936
5937 Send an event to a window or other wx.EvtHandler to be processed
5938 later.
5939 """
5940 return _core_.PostEvent(*args, **kwargs)
5941
5942 def App_CleanUp(*args, **kwargs):
5943 """
5944 App_CleanUp()
5945
5946 For internal use only, it is used to cleanup after wxWidgets when
5947 Python shuts down.
5948 """
5949 return _core_.App_CleanUp(*args, **kwargs)
5950
5951 def GetApp(*args, **kwargs):
5952 """
5953 GetApp() -> PyApp
5954
5955 Return a reference to the current wx.App object.
5956 """
5957 return _core_.GetApp(*args, **kwargs)
5958
5959 def SetDefaultPyEncoding(*args, **kwargs):
5960 """
5961 SetDefaultPyEncoding(string encoding)
5962
5963 Sets the encoding that wxPython will use when it needs to convert a
5964 Python string or unicode object to or from a wxString.
5965
5966 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5967 but please be aware that the default encoding within the same locale
5968 may be slightly different on different platforms. For example, please
5969 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5970 between the common latin/roman encodings.
5971 """
5972 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5973
5974 def GetDefaultPyEncoding(*args, **kwargs):
5975 """
5976 GetDefaultPyEncoding() -> string
5977
5978 Gets the current encoding that wxPython will use when it needs to
5979 convert a Python string or unicode object to or from a wxString.
5980 """
5981 return _core_.GetDefaultPyEncoding(*args, **kwargs)
5982 #----------------------------------------------------------------------
5983
5984 class PyOnDemandOutputWindow:
5985 """
5986 A class that can be used for redirecting Python's stdout and
5987 stderr streams. It will do nothing until something is wrriten to
5988 the stream at which point it will create a Frame with a text area
5989 and write the text there.
5990 """
5991 def __init__(self, title = "wxPython: stdout/stderr"):
5992 self.frame = None
5993 self.title = title
5994 self.pos = wx.DefaultPosition
5995 self.size = (450, 300)
5996 self.parent = None
5997
5998 def SetParent(self, parent):
5999 """Set the window to be used as the popup Frame's parent."""
6000 self.parent = parent
6001
6002
6003 def CreateOutputWindow(self, st):
6004 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
6005 style=wx.DEFAULT_FRAME_STYLE)
6006 self.text = wx.TextCtrl(self.frame, -1, "",
6007 style=wx.TE_MULTILINE|wx.TE_READONLY)
6008 self.text.AppendText(st)
6009 self.frame.Show(True)
6010 EVT_CLOSE(self.frame, self.OnCloseWindow)
6011
6012
6013 def OnCloseWindow(self, event):
6014 if self.frame is not None:
6015 self.frame.Destroy()
6016 self.frame = None
6017 self.text = None
6018
6019
6020 # These methods provide the file-like output behaviour.
6021 def write(self, text):
6022 """
6023 Create the output window if needed and write the string to it.
6024 If not called in the context of the gui thread then uses
6025 CallAfter to do the work there.
6026 """
6027 if self.frame is None:
6028 if not wx.Thread_IsMain():
6029 wx.CallAfter(self.CreateOutputWindow, text)
6030 else:
6031 self.CreateOutputWindow(text)
6032 else:
6033 if not wx.Thread_IsMain():
6034 wx.CallAfter(self.text.AppendText, text)
6035 else:
6036 self.text.AppendText(text)
6037
6038
6039 def close(self):
6040 if self.frame is not None:
6041 wx.CallAfter(self.frame.Close)
6042
6043
6044 def flush(self):
6045 pass
6046
6047
6048
6049 #----------------------------------------------------------------------
6050
6051 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
6052
6053 class App(wx.PyApp):
6054 """
6055 The ``wx.App`` class represents the application and is used to:
6056
6057 * bootstrap the wxPython system and initialize the underlying
6058 gui toolkit
6059 * set and get application-wide properties
6060 * implement the windowing system main message or event loop,
6061 and to dispatch events to window instances
6062 * etc.
6063
6064 Every application must have a ``wx.App`` instance, and all
6065 creation of UI objects should be delayed until after the
6066 ``wx.App`` object has been created in order to ensure that the gui
6067 platform and wxWidgets have been fully initialized.
6068
6069 Normally you would derive from this class and implement an
6070 ``OnInit`` method that creates a frame and then calls
6071 ``self.SetTopWindow(frame)``.
6072
6073 :see: `wx.PySimpleApp` for a simpler app class that can be used
6074 directly.
6075 """
6076
6077 outputWindowClass = PyOnDemandOutputWindow
6078
6079 def __init__(self, redirect=_defRedirect, filename=None,
6080 useBestVisual=False, clearSigInt=True):
6081 """
6082 Construct a ``wx.App`` object.
6083
6084 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
6085 redirected? Defaults to True on Windows and Mac, False
6086 otherwise. If `filename` is None then output will be
6087 redirected to a window that pops up as needed. (You can
6088 control what kind of window is created for the output by
6089 resetting the class variable ``outputWindowClass`` to a
6090 class of your choosing.)
6091
6092 :param filename: The name of a file to redirect output to, if
6093 redirect is True.
6094
6095 :param useBestVisual: Should the app try to use the best
6096 available visual provided by the system (only relevant on
6097 systems that have more than one visual.) This parameter
6098 must be used instead of calling `SetUseBestVisual` later
6099 on because it must be set before the underlying GUI
6100 toolkit is initialized.
6101
6102 :param clearSigInt: Should SIGINT be cleared? This allows the
6103 app to terminate upon a Ctrl-C in the console like other
6104 GUI apps will.
6105
6106 :note: You should override OnInit to do applicaition
6107 initialization to ensure that the system, toolkit and
6108 wxWidgets are fully initialized.
6109 """
6110 wx.PyApp.__init__(self)
6111
6112 if wx.Platform == "__WXMAC__":
6113 try:
6114 import MacOS
6115 if not MacOS.WMAvailable():
6116 print """\
6117 This program needs access to the screen. Please run with 'pythonw',
6118 not 'python', and only when you are logged in on the main display of
6119 your Mac."""
6120 _sys.exit(1)
6121 except SystemExit:
6122 raise
6123 except:
6124 pass
6125
6126 # This has to be done before OnInit
6127 self.SetUseBestVisual(useBestVisual)
6128
6129 # Set the default handler for SIGINT. This fixes a problem
6130 # where if Ctrl-C is pressed in the console that started this
6131 # app then it will not appear to do anything, (not even send
6132 # KeyboardInterrupt???) but will later segfault on exit. By
6133 # setting the default handler then the app will exit, as
6134 # expected (depending on platform.)
6135 if clearSigInt:
6136 try:
6137 import signal
6138 signal.signal(signal.SIGINT, signal.SIG_DFL)
6139 except:
6140 pass
6141
6142 # Save and redirect the stdio to a window?
6143 self.stdioWin = None
6144 self.saveStdio = (_sys.stdout, _sys.stderr)
6145 if redirect:
6146 self.RedirectStdio(filename)
6147
6148 # Use Python's install prefix as the default
6149 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
6150
6151 # This finishes the initialization of wxWindows and then calls
6152 # the OnInit that should be present in the derived class
6153 self._BootstrapApp()
6154
6155
6156 def __del__(self, destroy=wx.PyApp.__del__):
6157 self.RestoreStdio() # Just in case the MainLoop was overridden
6158 destroy(self)
6159
6160 def Destroy(self):
6161 wx.PyApp.Destroy(self)
6162 self.thisown = 0
6163
6164 def SetTopWindow(self, frame):
6165 """Set the \"main\" top level window"""
6166 if self.stdioWin:
6167 self.stdioWin.SetParent(frame)
6168 wx.PyApp.SetTopWindow(self, frame)
6169
6170
6171 def MainLoop(self):
6172 """Execute the main GUI event loop"""
6173 wx.PyApp.MainLoop(self)
6174 self.RestoreStdio()
6175
6176
6177 def RedirectStdio(self, filename=None):
6178 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
6179 if filename:
6180 _sys.stdout = _sys.stderr = open(filename, 'a')
6181 else:
6182 self.stdioWin = self.outputWindowClass()
6183 _sys.stdout = _sys.stderr = self.stdioWin
6184
6185
6186 def RestoreStdio(self):
6187 try:
6188 _sys.stdout, _sys.stderr = self.saveStdio
6189 except:
6190 pass
6191
6192
6193 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
6194 """
6195 Set the title, position and/or size of the output window if
6196 the stdio has been redirected. This should be called before
6197 any output would cause the output window to be created.
6198 """
6199 if self.stdioWin:
6200 if title is not None:
6201 self.stdioWin.title = title
6202 if pos is not None:
6203 self.stdioWin.pos = pos
6204 if size is not None:
6205 self.stdioWin.size = size
6206
6207
6208
6209
6210 # change from wx.PyApp_XX to wx.App_XX
6211 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
6212 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
6213 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
6214 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
6215 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
6216 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
6217 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
6218 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
6219 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
6220 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
6221 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
6222
6223 #----------------------------------------------------------------------------
6224
6225 class PySimpleApp(wx.App):
6226 """
6227 A simple application class. You can just create one of these and
6228 then then make your top level windows later, and not have to worry
6229 about OnInit. For example::
6230
6231 app = wx.PySimpleApp()
6232 frame = wx.Frame(None, title='Hello World')
6233 frame.Show()
6234 app.MainLoop()
6235
6236 :see: `wx.App`
6237 """
6238
6239 def __init__(self, redirect=False, filename=None,
6240 useBestVisual=False, clearSigInt=True):
6241 """
6242 :see: `wx.App.__init__`
6243 """
6244 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6245
6246 def OnInit(self):
6247 return True
6248
6249
6250
6251 # Is anybody using this one?
6252 class PyWidgetTester(wx.App):
6253 def __init__(self, size = (250, 100)):
6254 self.size = size
6255 wx.App.__init__(self, 0)
6256
6257 def OnInit(self):
6258 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
6259 self.SetTopWindow(self.frame)
6260 return True
6261
6262 def SetWidget(self, widgetClass, *args, **kwargs):
6263 w = widgetClass(self.frame, *args, **kwargs)
6264 self.frame.Show(True)
6265
6266 #----------------------------------------------------------------------------
6267 # DO NOT hold any other references to this object. This is how we
6268 # know when to cleanup system resources that wxWidgets is holding. When
6269 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
6270 # goes to zero and it calls the wx.App_CleanUp function.
6271
6272 class __wxPyCleanup:
6273 def __init__(self):
6274 self.cleanup = _core_.App_CleanUp
6275 def __del__(self):
6276 self.cleanup()
6277
6278 _sys.__wxPythonCleanup = __wxPyCleanup()
6279
6280 ## # another possible solution, but it gets called too early...
6281 ## import atexit
6282 ## atexit.register(_core_.wxApp_CleanUp)
6283
6284
6285 #----------------------------------------------------------------------------
6286
6287 #---------------------------------------------------------------------------
6288
6289 class EventLoop(object):
6290 """Proxy of C++ EventLoop class"""
6291 def __repr__(self):
6292 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6293 def __init__(self, *args, **kwargs):
6294 """__init__(self) -> EventLoop"""
6295 newobj = _core_.new_EventLoop(*args, **kwargs)
6296 self.this = newobj.this
6297 self.thisown = 1
6298 del newobj.thisown
6299 def __del__(self, destroy=_core_.delete_EventLoop):
6300 """__del__(self)"""
6301 try:
6302 if self.thisown: destroy(self)
6303 except: pass
6304
6305 def Run(*args, **kwargs):
6306 """Run(self) -> int"""
6307 return _core_.EventLoop_Run(*args, **kwargs)
6308
6309 def Exit(*args, **kwargs):
6310 """Exit(self, int rc=0)"""
6311 return _core_.EventLoop_Exit(*args, **kwargs)
6312
6313 def Pending(*args, **kwargs):
6314 """Pending(self) -> bool"""
6315 return _core_.EventLoop_Pending(*args, **kwargs)
6316
6317 def Dispatch(*args, **kwargs):
6318 """Dispatch(self) -> bool"""
6319 return _core_.EventLoop_Dispatch(*args, **kwargs)
6320
6321 def IsRunning(*args, **kwargs):
6322 """IsRunning(self) -> bool"""
6323 return _core_.EventLoop_IsRunning(*args, **kwargs)
6324
6325 def GetActive(*args, **kwargs):
6326 """GetActive() -> EventLoop"""
6327 return _core_.EventLoop_GetActive(*args, **kwargs)
6328
6329 GetActive = staticmethod(GetActive)
6330 def SetActive(*args, **kwargs):
6331 """SetActive(EventLoop loop)"""
6332 return _core_.EventLoop_SetActive(*args, **kwargs)
6333
6334 SetActive = staticmethod(SetActive)
6335
6336 class EventLoopPtr(EventLoop):
6337 def __init__(self, this):
6338 self.this = this
6339 if not hasattr(self,"thisown"): self.thisown = 0
6340 self.__class__ = EventLoop
6341 _core_.EventLoop_swigregister(EventLoopPtr)
6342
6343 def EventLoop_GetActive(*args, **kwargs):
6344 """EventLoop_GetActive() -> EventLoop"""
6345 return _core_.EventLoop_GetActive(*args, **kwargs)
6346
6347 def EventLoop_SetActive(*args, **kwargs):
6348 """EventLoop_SetActive(EventLoop loop)"""
6349 return _core_.EventLoop_SetActive(*args, **kwargs)
6350
6351 #---------------------------------------------------------------------------
6352
6353 class AcceleratorEntry(object):
6354 """
6355 A class used to define items in an `wx.AcceleratorTable`. wxPython
6356 programs can choose to use wx.AcceleratorEntry objects, but using a
6357 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
6358 as well. See `__init__` for of the tuple values.
6359
6360 :see: `wx.AcceleratorTable`
6361 """
6362 def __repr__(self):
6363 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6364 def __init__(self, *args, **kwargs):
6365 """
6366 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
6367
6368 Construct a wx.AcceleratorEntry.
6369 """
6370 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
6371 self.this = newobj.this
6372 self.thisown = 1
6373 del newobj.thisown
6374 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
6375 """__del__(self)"""
6376 try:
6377 if self.thisown: destroy(self)
6378 except: pass
6379
6380 def Set(*args, **kwargs):
6381 """
6382 Set(self, int flags, int keyCode, int cmd)
6383
6384 (Re)set the attributes of a wx.AcceleratorEntry.
6385 :see `__init__`
6386 """
6387 return _core_.AcceleratorEntry_Set(*args, **kwargs)
6388
6389 def GetFlags(*args, **kwargs):
6390 """
6391 GetFlags(self) -> int
6392
6393 Get the AcceleratorEntry's flags.
6394 """
6395 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
6396
6397 def GetKeyCode(*args, **kwargs):
6398 """
6399 GetKeyCode(self) -> int
6400
6401 Get the AcceleratorEntry's keycode.
6402 """
6403 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
6404
6405 def GetCommand(*args, **kwargs):
6406 """
6407 GetCommand(self) -> int
6408
6409 Get the AcceleratorEntry's command ID.
6410 """
6411 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
6412
6413
6414 class AcceleratorEntryPtr(AcceleratorEntry):
6415 def __init__(self, this):
6416 self.this = this
6417 if not hasattr(self,"thisown"): self.thisown = 0
6418 self.__class__ = AcceleratorEntry
6419 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
6420
6421 class AcceleratorTable(Object):
6422 """
6423 An accelerator table allows the application to specify a table of
6424 keyboard shortcuts for menus or other commands. On Windows, menu or
6425 button commands are supported; on GTK, only menu commands are
6426 supported.
6427 """
6428 def __repr__(self):
6429 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6430 def __init__(self, *args, **kwargs):
6431 """
6432 __init__(entries) -> AcceleratorTable
6433
6434 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
6435 items or or of 3-tuples (flags, keyCode, cmdID)
6436
6437 :see: `wx.AcceleratorEntry`
6438 """
6439 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
6440 self.this = newobj.this
6441 self.thisown = 1
6442 del newobj.thisown
6443 def __del__(self, destroy=_core_.delete_AcceleratorTable):
6444 """__del__(self)"""
6445 try:
6446 if self.thisown: destroy(self)
6447 except: pass
6448
6449 def Ok(*args, **kwargs):
6450 """Ok(self) -> bool"""
6451 return _core_.AcceleratorTable_Ok(*args, **kwargs)
6452
6453
6454 class AcceleratorTablePtr(AcceleratorTable):
6455 def __init__(self, this):
6456 self.this = this
6457 if not hasattr(self,"thisown"): self.thisown = 0
6458 self.__class__ = AcceleratorTable
6459 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
6460
6461
6462 def GetAccelFromString(*args, **kwargs):
6463 """GetAccelFromString(String label) -> AcceleratorEntry"""
6464 return _core_.GetAccelFromString(*args, **kwargs)
6465 #---------------------------------------------------------------------------
6466
6467 class VisualAttributes(object):
6468 """struct containing all the visual attributes of a control"""
6469 def __repr__(self):
6470 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6471 def __init__(self, *args, **kwargs):
6472 """
6473 __init__(self) -> VisualAttributes
6474
6475 struct containing all the visual attributes of a control
6476 """
6477 newobj = _core_.new_VisualAttributes(*args, **kwargs)
6478 self.this = newobj.this
6479 self.thisown = 1
6480 del newobj.thisown
6481 def __del__(self, destroy=_core_.delete_VisualAttributes):
6482 """__del__(self)"""
6483 try:
6484 if self.thisown: destroy(self)
6485 except: pass
6486
6487 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
6488 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
6489 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
6490
6491 class VisualAttributesPtr(VisualAttributes):
6492 def __init__(self, this):
6493 self.this = this
6494 if not hasattr(self,"thisown"): self.thisown = 0
6495 self.__class__ = VisualAttributes
6496 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
6497 NullAcceleratorTable = cvar.NullAcceleratorTable
6498 PanelNameStr = cvar.PanelNameStr
6499
6500 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
6501 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
6502 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
6503 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
6504 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
6505 class Window(EvtHandler):
6506 """
6507 wx.Window is the base class for all windows and represents any visible
6508 object on the screen. All controls, top level windows and so on are
6509 wx.Windows. Sizers and device contexts are not however, as they don't
6510 appear on screen themselves.
6511
6512 """
6513 def __repr__(self):
6514 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6515 def __init__(self, *args, **kwargs):
6516 """
6517 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
6518 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
6519
6520 Construct and show a generic Window.
6521 """
6522 newobj = _core_.new_Window(*args, **kwargs)
6523 self.this = newobj.this
6524 self.thisown = 1
6525 del newobj.thisown
6526 self._setOORInfo(self)
6527
6528 def Create(*args, **kwargs):
6529 """
6530 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
6531 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
6532
6533 Create the GUI part of the Window for 2-phase creation mode.
6534 """
6535 return _core_.Window_Create(*args, **kwargs)
6536
6537 def Close(*args, **kwargs):
6538 """
6539 Close(self, bool force=False) -> bool
6540
6541 This function simply generates a EVT_CLOSE event whose handler usually
6542 tries to close the window. It doesn't close the window itself,
6543 however. If force is False (the default) then the window's close
6544 handler will be allowed to veto the destruction of the window.
6545 """
6546 return _core_.Window_Close(*args, **kwargs)
6547
6548 def Destroy(*args, **kwargs):
6549 """
6550 Destroy(self) -> bool
6551
6552 Destroys the window safely. Frames and dialogs are not destroyed
6553 immediately when this function is called -- they are added to a list
6554 of windows to be deleted on idle time, when all the window's events
6555 have been processed. This prevents problems with events being sent to
6556 non-existent windows.
6557
6558 Returns True if the window has either been successfully deleted, or it
6559 has been added to the list of windows pending real deletion.
6560 """
6561 return _core_.Window_Destroy(*args, **kwargs)
6562
6563 def DestroyChildren(*args, **kwargs):
6564 """
6565 DestroyChildren(self) -> bool
6566
6567 Destroys all children of a window. Called automatically by the
6568 destructor.
6569 """
6570 return _core_.Window_DestroyChildren(*args, **kwargs)
6571
6572 def IsBeingDeleted(*args, **kwargs):
6573 """
6574 IsBeingDeleted(self) -> bool
6575
6576 Is the window in the process of being deleted?
6577 """
6578 return _core_.Window_IsBeingDeleted(*args, **kwargs)
6579
6580 def SetTitle(*args, **kwargs):
6581 """
6582 SetTitle(self, String title)
6583
6584 Sets the window's title. Applicable only to frames and dialogs.
6585 """
6586 return _core_.Window_SetTitle(*args, **kwargs)
6587
6588 def GetTitle(*args, **kwargs):
6589 """
6590 GetTitle(self) -> String
6591
6592 Gets the window's title. Applicable only to frames and dialogs.
6593 """
6594 return _core_.Window_GetTitle(*args, **kwargs)
6595
6596 def SetLabel(*args, **kwargs):
6597 """
6598 SetLabel(self, String label)
6599
6600 Set the text which the window shows in its label if applicable.
6601 """
6602 return _core_.Window_SetLabel(*args, **kwargs)
6603
6604 def GetLabel(*args, **kwargs):
6605 """
6606 GetLabel(self) -> String
6607
6608 Generic way of getting a label from any window, for identification
6609 purposes. The interpretation of this function differs from class to
6610 class. For frames and dialogs, the value returned is the title. For
6611 buttons or static text controls, it is the button text. This function
6612 can be useful for meta-programs such as testing tools or special-needs
6613 access programs)which need to identify windows by name.
6614 """
6615 return _core_.Window_GetLabel(*args, **kwargs)
6616
6617 def SetName(*args, **kwargs):
6618 """
6619 SetName(self, String name)
6620
6621 Sets the window's name. The window name is used for ressource setting
6622 in X, it is not the same as the window title/label
6623 """
6624 return _core_.Window_SetName(*args, **kwargs)
6625
6626 def GetName(*args, **kwargs):
6627 """
6628 GetName(self) -> String
6629
6630 Returns the windows name. This name is not guaranteed to be unique;
6631 it is up to the programmer to supply an appropriate name in the window
6632 constructor or via wx.Window.SetName.
6633 """
6634 return _core_.Window_GetName(*args, **kwargs)
6635
6636 def SetWindowVariant(*args, **kwargs):
6637 """
6638 SetWindowVariant(self, int variant)
6639
6640 Sets the variant of the window/font size to use for this window, if
6641 the platform supports variants, for example, wxMac.
6642 """
6643 return _core_.Window_SetWindowVariant(*args, **kwargs)
6644
6645 def GetWindowVariant(*args, **kwargs):
6646 """GetWindowVariant(self) -> int"""
6647 return _core_.Window_GetWindowVariant(*args, **kwargs)
6648
6649 def SetId(*args, **kwargs):
6650 """
6651 SetId(self, int winid)
6652
6653 Sets the identifier of the window. Each window has an integer
6654 identifier. If the application has not provided one, an identifier
6655 will be generated. Normally, the identifier should be provided on
6656 creation and should not be modified subsequently.
6657 """
6658 return _core_.Window_SetId(*args, **kwargs)
6659
6660 def GetId(*args, **kwargs):
6661 """
6662 GetId(self) -> int
6663
6664 Returns the identifier of the window. Each window has an integer
6665 identifier. If the application has not provided one (or the default Id
6666 -1 is used) then an unique identifier with a negative value will be
6667 generated.
6668 """
6669 return _core_.Window_GetId(*args, **kwargs)
6670
6671 def NewControlId(*args, **kwargs):
6672 """
6673 NewControlId() -> int
6674
6675 Generate a control id for the controls which were not given one.
6676 """
6677 return _core_.Window_NewControlId(*args, **kwargs)
6678
6679 NewControlId = staticmethod(NewControlId)
6680 def NextControlId(*args, **kwargs):
6681 """
6682 NextControlId(int winid) -> int
6683
6684 Get the id of the control following the one with the given
6685 autogenerated) id
6686 """
6687 return _core_.Window_NextControlId(*args, **kwargs)
6688
6689 NextControlId = staticmethod(NextControlId)
6690 def PrevControlId(*args, **kwargs):
6691 """
6692 PrevControlId(int winid) -> int
6693
6694 Get the id of the control preceding the one with the given
6695 autogenerated) id
6696 """
6697 return _core_.Window_PrevControlId(*args, **kwargs)
6698
6699 PrevControlId = staticmethod(PrevControlId)
6700 def SetSize(*args, **kwargs):
6701 """
6702 SetSize(self, Size size)
6703
6704 Sets the size of the window in pixels.
6705 """
6706 return _core_.Window_SetSize(*args, **kwargs)
6707
6708 def SetDimensions(*args, **kwargs):
6709 """
6710 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6711
6712 Sets the position and size of the window in pixels. The sizeFlags
6713 parameter indicates the interpretation of the other params if they are
6714 equal to -1.
6715
6716 ======================== ======================================
6717 wx.SIZE_AUTO A -1 indicates that a class-specific
6718 default should be used.
6719 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6720 -1 values are supplied.
6721 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6722 interpreted as real dimensions, not
6723 default values.
6724 ======================== ======================================
6725
6726 """
6727 return _core_.Window_SetDimensions(*args, **kwargs)
6728
6729 def SetRect(*args, **kwargs):
6730 """
6731 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6732
6733 Sets the position and size of the window in pixels using a wx.Rect.
6734 """
6735 return _core_.Window_SetRect(*args, **kwargs)
6736
6737 def SetSizeWH(*args, **kwargs):
6738 """
6739 SetSizeWH(self, int width, int height)
6740
6741 Sets the size of the window in pixels.
6742 """
6743 return _core_.Window_SetSizeWH(*args, **kwargs)
6744
6745 def Move(*args, **kwargs):
6746 """
6747 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6748
6749 Moves the window to the given position.
6750 """
6751 return _core_.Window_Move(*args, **kwargs)
6752
6753 SetPosition = Move
6754 def MoveXY(*args, **kwargs):
6755 """
6756 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6757
6758 Moves the window to the given position.
6759 """
6760 return _core_.Window_MoveXY(*args, **kwargs)
6761
6762 def SetBestFittingSize(*args, **kwargs):
6763 """
6764 SetBestFittingSize(self, Size size=DefaultSize)
6765
6766 A 'Smart' SetSize that will fill in default size components with the
6767 window's *best size* values. Also set's the minsize for use with sizers.
6768 """
6769 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6770
6771 def Raise(*args, **kwargs):
6772 """
6773 Raise(self)
6774
6775 Raises the window to the top of the window hierarchy if it is a
6776 managed window (dialog or frame).
6777 """
6778 return _core_.Window_Raise(*args, **kwargs)
6779
6780 def Lower(*args, **kwargs):
6781 """
6782 Lower(self)
6783
6784 Lowers the window to the bottom of the window hierarchy if it is a
6785 managed window (dialog or frame).
6786 """
6787 return _core_.Window_Lower(*args, **kwargs)
6788
6789 def SetClientSize(*args, **kwargs):
6790 """
6791 SetClientSize(self, Size size)
6792
6793 This sets the size of the window client area in pixels. Using this
6794 function to size a window tends to be more device-independent than
6795 wx.Window.SetSize, since the application need not worry about what
6796 dimensions the border or title bar have when trying to fit the window
6797 around panel items, for example.
6798 """
6799 return _core_.Window_SetClientSize(*args, **kwargs)
6800
6801 def SetClientSizeWH(*args, **kwargs):
6802 """
6803 SetClientSizeWH(self, int width, int height)
6804
6805 This sets the size of the window client area in pixels. Using this
6806 function to size a window tends to be more device-independent than
6807 wx.Window.SetSize, since the application need not worry about what
6808 dimensions the border or title bar have when trying to fit the window
6809 around panel items, for example.
6810 """
6811 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6812
6813 def SetClientRect(*args, **kwargs):
6814 """
6815 SetClientRect(self, Rect rect)
6816
6817 This sets the size of the window client area in pixels. Using this
6818 function to size a window tends to be more device-independent than
6819 wx.Window.SetSize, since the application need not worry about what
6820 dimensions the border or title bar have when trying to fit the window
6821 around panel items, for example.
6822 """
6823 return _core_.Window_SetClientRect(*args, **kwargs)
6824
6825 def GetPosition(*args, **kwargs):
6826 """
6827 GetPosition(self) -> Point
6828
6829 Get the window's position.
6830 """
6831 return _core_.Window_GetPosition(*args, **kwargs)
6832
6833 def GetPositionTuple(*args, **kwargs):
6834 """
6835 GetPositionTuple() -> (x,y)
6836
6837 Get the window's position.
6838 """
6839 return _core_.Window_GetPositionTuple(*args, **kwargs)
6840
6841 def GetSize(*args, **kwargs):
6842 """
6843 GetSize(self) -> Size
6844
6845 Get the window size.
6846 """
6847 return _core_.Window_GetSize(*args, **kwargs)
6848
6849 def GetSizeTuple(*args, **kwargs):
6850 """
6851 GetSizeTuple() -> (width, height)
6852
6853 Get the window size.
6854 """
6855 return _core_.Window_GetSizeTuple(*args, **kwargs)
6856
6857 def GetRect(*args, **kwargs):
6858 """
6859 GetRect(self) -> Rect
6860
6861 Returns the size and position of the window as a wx.Rect object.
6862 """
6863 return _core_.Window_GetRect(*args, **kwargs)
6864
6865 def GetClientSize(*args, **kwargs):
6866 """
6867 GetClientSize(self) -> Size
6868
6869 This gets the size of the window's 'client area' in pixels. The client
6870 area is the area which may be drawn on by the programmer, excluding
6871 title bar, border, scrollbars, etc.
6872 """
6873 return _core_.Window_GetClientSize(*args, **kwargs)
6874
6875 def GetClientSizeTuple(*args, **kwargs):
6876 """
6877 GetClientSizeTuple() -> (width, height)
6878
6879 This gets the size of the window's 'client area' in pixels. The client
6880 area is the area which may be drawn on by the programmer, excluding
6881 title bar, border, scrollbars, etc.
6882 """
6883 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6884
6885 def GetClientAreaOrigin(*args, **kwargs):
6886 """
6887 GetClientAreaOrigin(self) -> Point
6888
6889 Get the origin of the client area of the window relative to the
6890 window's top left corner (the client area may be shifted because of
6891 the borders, scrollbars, other decorations...)
6892 """
6893 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6894
6895 def GetClientRect(*args, **kwargs):
6896 """
6897 GetClientRect(self) -> Rect
6898
6899 Get the client area position and size as a `wx.Rect` object.
6900 """
6901 return _core_.Window_GetClientRect(*args, **kwargs)
6902
6903 def GetBestSize(*args, **kwargs):
6904 """
6905 GetBestSize(self) -> Size
6906
6907 This function returns the best acceptable minimal size for the
6908 window, if applicable. For example, for a static text control, it will
6909 be the minimal size such that the control label is not truncated. For
6910 windows containing subwindows (suzh aswx.Panel), the size returned by
6911 this function will be the same as the size the window would have had
6912 after calling Fit.
6913 """
6914 return _core_.Window_GetBestSize(*args, **kwargs)
6915
6916 def GetBestSizeTuple(*args, **kwargs):
6917 """
6918 GetBestSizeTuple() -> (width, height)
6919
6920 This function returns the best acceptable minimal size for the
6921 window, if applicable. For example, for a static text control, it will
6922 be the minimal size such that the control label is not truncated. For
6923 windows containing subwindows (suzh aswx.Panel), the size returned by
6924 this function will be the same as the size the window would have had
6925 after calling Fit.
6926 """
6927 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6928
6929 def InvalidateBestSize(*args, **kwargs):
6930 """
6931 InvalidateBestSize(self)
6932
6933 Reset the cached best size value so it will be recalculated the next
6934 time it is needed.
6935 """
6936 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6937
6938 def GetBestFittingSize(*args, **kwargs):
6939 """
6940 GetBestFittingSize(self) -> Size
6941
6942 This function will merge the window's best size into the window's
6943 minimum size, giving priority to the min size components, and returns
6944 the results.
6945
6946 """
6947 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6948
6949 def GetAdjustedBestSize(*args, **kwargs):
6950 """
6951 GetAdjustedBestSize(self) -> Size
6952
6953 This method is similar to GetBestSize, except in one
6954 thing. GetBestSize should return the minimum untruncated size of the
6955 window, while this method will return the largest of BestSize and any
6956 user specified minimum size. ie. it is the minimum size the window
6957 should currently be drawn at, not the minimal size it can possibly
6958 tolerate.
6959 """
6960 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6961
6962 def Center(*args, **kwargs):
6963 """
6964 Center(self, int direction=BOTH)
6965
6966 Centers the window. The parameter specifies the direction for
6967 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6968 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6969 on the entire screen and not on its parent window. If it is a
6970 top-level window and has no parent then it will always be centered
6971 relative to the screen.
6972 """
6973 return _core_.Window_Center(*args, **kwargs)
6974
6975 Centre = Center
6976 def CenterOnScreen(*args, **kwargs):
6977 """
6978 CenterOnScreen(self, int dir=BOTH)
6979
6980 Center on screen (only works for top level windows)
6981 """
6982 return _core_.Window_CenterOnScreen(*args, **kwargs)
6983
6984 CentreOnScreen = CenterOnScreen
6985 def CenterOnParent(*args, **kwargs):
6986 """
6987 CenterOnParent(self, int dir=BOTH)
6988
6989 Center with respect to the the parent window
6990 """
6991 return _core_.Window_CenterOnParent(*args, **kwargs)
6992
6993 CentreOnParent = CenterOnParent
6994 def Fit(*args, **kwargs):
6995 """
6996 Fit(self)
6997
6998 Sizes the window so that it fits around its subwindows. This function
6999 won't do anything if there are no subwindows and will only really work
7000 correctly if sizers are used for the subwindows layout. Also, if the
7001 window has exactly one subwindow it is better (faster and the result
7002 is more precise as Fit adds some margin to account for fuzziness of
7003 its calculations) to call window.SetClientSize(child.GetSize())
7004 instead of calling Fit.
7005 """
7006 return _core_.Window_Fit(*args, **kwargs)
7007
7008 def FitInside(*args, **kwargs):
7009 """
7010 FitInside(self)
7011
7012 Similar to Fit, but sizes the interior (virtual) size of a
7013 window. Mainly useful with scrolled windows to reset scrollbars after
7014 sizing changes that do not trigger a size event, and/or scrolled
7015 windows without an interior sizer. This function similarly won't do
7016 anything if there are no subwindows.
7017 """
7018 return _core_.Window_FitInside(*args, **kwargs)
7019
7020 def SetSizeHints(*args, **kwargs):
7021 """
7022 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
7023 int incH=-1)
7024
7025 Allows specification of minimum and maximum window sizes, and window
7026 size increments. If a pair of values is not set (or set to -1), the
7027 default values will be used. If this function is called, the user
7028 will not be able to size the window outside the given bounds (if it is
7029 a top-level window.) Sizers will also inspect the minimum window size
7030 and will use that value if set when calculating layout.
7031
7032 The resizing increments are only significant under Motif or Xt.
7033 """
7034 return _core_.Window_SetSizeHints(*args, **kwargs)
7035
7036 def SetSizeHintsSz(*args, **kwargs):
7037 """
7038 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
7039
7040 Allows specification of minimum and maximum window sizes, and window
7041 size increments. If a pair of values is not set (or set to -1), the
7042 default values will be used. If this function is called, the user
7043 will not be able to size the window outside the given bounds (if it is
7044 a top-level window.) Sizers will also inspect the minimum window size
7045 and will use that value if set when calculating layout.
7046
7047 The resizing increments are only significant under Motif or Xt.
7048 """
7049 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
7050
7051 def SetVirtualSizeHints(*args, **kwargs):
7052 """
7053 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
7054
7055 Allows specification of minimum and maximum virtual window sizes. If a
7056 pair of values is not set (or set to -1), the default values will be
7057 used. If this function is called, the user will not be able to size
7058 the virtual area of the window outside the given bounds.
7059 """
7060 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
7061
7062 def SetVirtualSizeHintsSz(*args, **kwargs):
7063 """
7064 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
7065
7066 Allows specification of minimum and maximum virtual window sizes. If a
7067 pair of values is not set (or set to -1), the default values will be
7068 used. If this function is called, the user will not be able to size
7069 the virtual area of the window outside the given bounds.
7070 """
7071 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
7072
7073 def GetMaxSize(*args, **kwargs):
7074 """GetMaxSize(self) -> Size"""
7075 return _core_.Window_GetMaxSize(*args, **kwargs)
7076
7077 def GetMinSize(*args, **kwargs):
7078 """GetMinSize(self) -> Size"""
7079 return _core_.Window_GetMinSize(*args, **kwargs)
7080
7081 def SetMinSize(*args, **kwargs):
7082 """
7083 SetMinSize(self, Size minSize)
7084
7085 A more convenient method than `SetSizeHints` for setting just the
7086 min size.
7087 """
7088 return _core_.Window_SetMinSize(*args, **kwargs)
7089
7090 def SetMaxSize(*args, **kwargs):
7091 """
7092 SetMaxSize(self, Size maxSize)
7093
7094 A more convenient method than `SetSizeHints` for setting just the
7095 max size.
7096 """
7097 return _core_.Window_SetMaxSize(*args, **kwargs)
7098
7099 def GetMinWidth(*args, **kwargs):
7100 """GetMinWidth(self) -> int"""
7101 return _core_.Window_GetMinWidth(*args, **kwargs)
7102
7103 def GetMinHeight(*args, **kwargs):
7104 """GetMinHeight(self) -> int"""
7105 return _core_.Window_GetMinHeight(*args, **kwargs)
7106
7107 def GetMaxWidth(*args, **kwargs):
7108 """GetMaxWidth(self) -> int"""
7109 return _core_.Window_GetMaxWidth(*args, **kwargs)
7110
7111 def GetMaxHeight(*args, **kwargs):
7112 """GetMaxHeight(self) -> int"""
7113 return _core_.Window_GetMaxHeight(*args, **kwargs)
7114
7115 def SetVirtualSize(*args, **kwargs):
7116 """
7117 SetVirtualSize(self, Size size)
7118
7119 Set the the virtual size of a window in pixels. For most windows this
7120 is just the client area of the window, but for some like scrolled
7121 windows it is more or less independent of the screen window size.
7122 """
7123 return _core_.Window_SetVirtualSize(*args, **kwargs)
7124
7125 def SetVirtualSizeWH(*args, **kwargs):
7126 """
7127 SetVirtualSizeWH(self, int w, int h)
7128
7129 Set the the virtual size of a window in pixels. For most windows this
7130 is just the client area of the window, but for some like scrolled
7131 windows it is more or less independent of the screen window size.
7132 """
7133 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
7134
7135 def GetVirtualSize(*args, **kwargs):
7136 """
7137 GetVirtualSize(self) -> Size
7138
7139 Get the the virtual size of the window in pixels. For most windows
7140 this is just the client area of the window, but for some like scrolled
7141 windows it is more or less independent of the screen window size.
7142 """
7143 return _core_.Window_GetVirtualSize(*args, **kwargs)
7144
7145 def GetVirtualSizeTuple(*args, **kwargs):
7146 """
7147 GetVirtualSizeTuple() -> (width, height)
7148
7149 Get the the virtual size of the window in pixels. For most windows
7150 this is just the client area of the window, but for some like scrolled
7151 windows it is more or less independent of the screen window size.
7152 """
7153 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
7154
7155 def GetBestVirtualSize(*args, **kwargs):
7156 """
7157 GetBestVirtualSize(self) -> Size
7158
7159 Return the largest of ClientSize and BestSize (as determined by a
7160 sizer, interior children, or other means)
7161 """
7162 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
7163
7164 def Show(*args, **kwargs):
7165 """
7166 Show(self, bool show=True) -> bool
7167
7168 Shows or hides the window. You may need to call Raise for a top level
7169 window if you want to bring it to top, although this is not needed if
7170 Show is called immediately after the frame creation. Returns True if
7171 the window has been shown or hidden or False if nothing was done
7172 because it already was in the requested state.
7173 """
7174 return _core_.Window_Show(*args, **kwargs)
7175
7176 def Hide(*args, **kwargs):
7177 """
7178 Hide(self) -> bool
7179
7180 Equivalent to calling Show(False).
7181 """
7182 return _core_.Window_Hide(*args, **kwargs)
7183
7184 def Enable(*args, **kwargs):
7185 """
7186 Enable(self, bool enable=True) -> bool
7187
7188 Enable or disable the window for user input. Note that when a parent
7189 window is disabled, all of its children are disabled as well and they
7190 are reenabled again when the parent is. Returns true if the window
7191 has been enabled or disabled, false if nothing was done, i.e. if the
7192 window had already been in the specified state.
7193 """
7194 return _core_.Window_Enable(*args, **kwargs)
7195
7196 def Disable(*args, **kwargs):
7197 """
7198 Disable(self) -> bool
7199
7200 Disables the window, same as Enable(false).
7201 """
7202 return _core_.Window_Disable(*args, **kwargs)
7203
7204 def IsShown(*args, **kwargs):
7205 """
7206 IsShown(self) -> bool
7207
7208 Returns true if the window is shown, false if it has been hidden.
7209 """
7210 return _core_.Window_IsShown(*args, **kwargs)
7211
7212 def IsEnabled(*args, **kwargs):
7213 """
7214 IsEnabled(self) -> bool
7215
7216 Returns true if the window is enabled for input, false otherwise.
7217 """
7218 return _core_.Window_IsEnabled(*args, **kwargs)
7219
7220 def SetWindowStyleFlag(*args, **kwargs):
7221 """
7222 SetWindowStyleFlag(self, long style)
7223
7224 Sets the style of the window. Please note that some styles cannot be
7225 changed after the window creation and that Refresh() might need to be
7226 called after changing the others for the change to take place
7227 immediately.
7228 """
7229 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
7230
7231 def GetWindowStyleFlag(*args, **kwargs):
7232 """
7233 GetWindowStyleFlag(self) -> long
7234
7235 Gets the window style that was passed to the constructor or Create
7236 method.
7237 """
7238 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
7239
7240 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
7241 def HasFlag(*args, **kwargs):
7242 """
7243 HasFlag(self, int flag) -> bool
7244
7245 Test if the given style is set for this window.
7246 """
7247 return _core_.Window_HasFlag(*args, **kwargs)
7248
7249 def IsRetained(*args, **kwargs):
7250 """
7251 IsRetained(self) -> bool
7252
7253 Returns true if the window is retained, false otherwise. Retained
7254 windows are only available on X platforms.
7255 """
7256 return _core_.Window_IsRetained(*args, **kwargs)
7257
7258 def SetExtraStyle(*args, **kwargs):
7259 """
7260 SetExtraStyle(self, long exStyle)
7261
7262 Sets the extra style bits for the window. Extra styles are the less
7263 often used style bits which can't be set with the constructor or with
7264 SetWindowStyleFlag()
7265 """
7266 return _core_.Window_SetExtraStyle(*args, **kwargs)
7267
7268 def GetExtraStyle(*args, **kwargs):
7269 """
7270 GetExtraStyle(self) -> long
7271
7272 Returns the extra style bits for the window.
7273 """
7274 return _core_.Window_GetExtraStyle(*args, **kwargs)
7275
7276 def MakeModal(*args, **kwargs):
7277 """
7278 MakeModal(self, bool modal=True)
7279
7280 Disables all other windows in the application so that the user can
7281 only interact with this window. Passing False will reverse this
7282 effect.
7283 """
7284 return _core_.Window_MakeModal(*args, **kwargs)
7285
7286 def SetThemeEnabled(*args, **kwargs):
7287 """
7288 SetThemeEnabled(self, bool enableTheme)
7289
7290 This function tells a window if it should use the system's "theme"
7291 code to draw the windows' background instead if its own background
7292 drawing code. This will only have an effect on platforms that support
7293 the notion of themes in user defined windows. One such platform is
7294 GTK+ where windows can have (very colourful) backgrounds defined by a
7295 user's selected theme.
7296
7297 Dialogs, notebook pages and the status bar have this flag set to true
7298 by default so that the default look and feel is simulated best.
7299 """
7300 return _core_.Window_SetThemeEnabled(*args, **kwargs)
7301
7302 def GetThemeEnabled(*args, **kwargs):
7303 """
7304 GetThemeEnabled(self) -> bool
7305
7306 Return the themeEnabled flag.
7307 """
7308 return _core_.Window_GetThemeEnabled(*args, **kwargs)
7309
7310 def SetFocus(*args, **kwargs):
7311 """
7312 SetFocus(self)
7313
7314 Set's the focus to this window, allowing it to receive keyboard input.
7315 """
7316 return _core_.Window_SetFocus(*args, **kwargs)
7317
7318 def SetFocusFromKbd(*args, **kwargs):
7319 """
7320 SetFocusFromKbd(self)
7321
7322 Set focus to this window as the result of a keyboard action. Normally
7323 only called internally.
7324 """
7325 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
7326
7327 def FindFocus(*args, **kwargs):
7328 """
7329 FindFocus() -> Window
7330
7331 Returns the window or control that currently has the keyboard focus,
7332 or None.
7333 """
7334 return _core_.Window_FindFocus(*args, **kwargs)
7335
7336 FindFocus = staticmethod(FindFocus)
7337 def AcceptsFocus(*args, **kwargs):
7338 """
7339 AcceptsFocus(self) -> bool
7340
7341 Can this window have focus?
7342 """
7343 return _core_.Window_AcceptsFocus(*args, **kwargs)
7344
7345 def AcceptsFocusFromKeyboard(*args, **kwargs):
7346 """
7347 AcceptsFocusFromKeyboard(self) -> bool
7348
7349 Can this window be given focus by keyboard navigation? if not, the
7350 only way to give it focus (provided it accepts it at all) is to click
7351 it.
7352 """
7353 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
7354
7355 def GetDefaultItem(*args, **kwargs):
7356 """
7357 GetDefaultItem(self) -> Window
7358
7359 Get the default child of this parent, i.e. the one which is activated
7360 by pressing <Enter> such as the OK button on a wx.Dialog.
7361 """
7362 return _core_.Window_GetDefaultItem(*args, **kwargs)
7363
7364 def SetDefaultItem(*args, **kwargs):
7365 """
7366 SetDefaultItem(self, Window child) -> Window
7367
7368 Set this child as default, return the old default.
7369 """
7370 return _core_.Window_SetDefaultItem(*args, **kwargs)
7371
7372 def SetTmpDefaultItem(*args, **kwargs):
7373 """
7374 SetTmpDefaultItem(self, Window win)
7375
7376 Set this child as temporary default
7377 """
7378 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
7379
7380 def Navigate(*args, **kwargs):
7381 """
7382 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
7383
7384 Does keyboard navigation from this window to another, by sending a
7385 `wx.NavigationKeyEvent`.
7386 """
7387 return _core_.Window_Navigate(*args, **kwargs)
7388
7389 def MoveAfterInTabOrder(*args, **kwargs):
7390 """
7391 MoveAfterInTabOrder(self, Window win)
7392
7393 Moves this window in the tab navigation order after the specified
7394 sibling window. This means that when the user presses the TAB key on
7395 that other window, the focus switches to this window.
7396
7397 The default tab order is the same as creation order. This function
7398 and `MoveBeforeInTabOrder` allow to change it after creating all the
7399 windows.
7400
7401 """
7402 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
7403
7404 def MoveBeforeInTabOrder(*args, **kwargs):
7405 """
7406 MoveBeforeInTabOrder(self, Window win)
7407
7408 Same as `MoveAfterInTabOrder` except that it inserts this window just
7409 before win instead of putting it right after it.
7410 """
7411 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
7412
7413 def GetChildren(*args, **kwargs):
7414 """
7415 GetChildren(self) -> PyObject
7416
7417 Returns a list of the window's children. NOTE: Currently this is a
7418 copy of the child window list maintained by the window, so the return
7419 value of this function is only valid as long as the window's children
7420 do not change.
7421 """
7422 return _core_.Window_GetChildren(*args, **kwargs)
7423
7424 def GetParent(*args, **kwargs):
7425 """
7426 GetParent(self) -> Window
7427
7428 Returns the parent window of this window, or None if there isn't one.
7429 """
7430 return _core_.Window_GetParent(*args, **kwargs)
7431
7432 def GetGrandParent(*args, **kwargs):
7433 """
7434 GetGrandParent(self) -> Window
7435
7436 Returns the parent of the parent of this window, or None if there
7437 isn't one.
7438 """
7439 return _core_.Window_GetGrandParent(*args, **kwargs)
7440
7441 def IsTopLevel(*args, **kwargs):
7442 """
7443 IsTopLevel(self) -> bool
7444
7445 Returns true if the given window is a top-level one. Currently all
7446 frames and dialogs are always considered to be top-level windows (even
7447 if they have a parent window).
7448 """
7449 return _core_.Window_IsTopLevel(*args, **kwargs)
7450
7451 def Reparent(*args, **kwargs):
7452 """
7453 Reparent(self, Window newParent) -> bool
7454
7455 Reparents the window, i.e the window will be removed from its current
7456 parent window (e.g. a non-standard toolbar in a wxFrame) and then
7457 re-inserted into another. Available on Windows and GTK. Returns True
7458 if the parent was changed, False otherwise (error or newParent ==
7459 oldParent)
7460 """
7461 return _core_.Window_Reparent(*args, **kwargs)
7462
7463 def AddChild(*args, **kwargs):
7464 """
7465 AddChild(self, Window child)
7466
7467 Adds a child window. This is called automatically by window creation
7468 functions so should not be required by the application programmer.
7469 """
7470 return _core_.Window_AddChild(*args, **kwargs)
7471
7472 def RemoveChild(*args, **kwargs):
7473 """
7474 RemoveChild(self, Window child)
7475
7476 Removes a child window. This is called automatically by window
7477 deletion functions so should not be required by the application
7478 programmer.
7479 """
7480 return _core_.Window_RemoveChild(*args, **kwargs)
7481
7482 def FindWindowById(*args, **kwargs):
7483 """
7484 FindWindowById(self, long winid) -> Window
7485
7486 Find a chld of this window by window ID
7487 """
7488 return _core_.Window_FindWindowById(*args, **kwargs)
7489
7490 def FindWindowByName(*args, **kwargs):
7491 """
7492 FindWindowByName(self, String name) -> Window
7493
7494 Find a child of this window by name
7495 """
7496 return _core_.Window_FindWindowByName(*args, **kwargs)
7497
7498 def GetEventHandler(*args, **kwargs):
7499 """
7500 GetEventHandler(self) -> EvtHandler
7501
7502 Returns the event handler for this window. By default, the window is
7503 its own event handler.
7504 """
7505 return _core_.Window_GetEventHandler(*args, **kwargs)
7506
7507 def SetEventHandler(*args, **kwargs):
7508 """
7509 SetEventHandler(self, EvtHandler handler)
7510
7511 Sets the event handler for this window. An event handler is an object
7512 that is capable of processing the events sent to a window. By default,
7513 the window is its own event handler, but an application may wish to
7514 substitute another, for example to allow central implementation of
7515 event-handling for a variety of different window classes.
7516
7517 It is usually better to use `wx.Window.PushEventHandler` since this sets
7518 up a chain of event handlers, where an event not handled by one event
7519 handler is handed to the next one in the chain.
7520 """
7521 return _core_.Window_SetEventHandler(*args, **kwargs)
7522
7523 def PushEventHandler(*args, **kwargs):
7524 """
7525 PushEventHandler(self, EvtHandler handler)
7526
7527 Pushes this event handler onto the event handler stack for the window.
7528 An event handler is an object that is capable of processing the events
7529 sent to a window. By default, the window is its own event handler, but
7530 an application may wish to substitute another, for example to allow
7531 central implementation of event-handling for a variety of different
7532 window classes.
7533
7534 wx.Window.PushEventHandler allows an application to set up a chain of
7535 event handlers, where an event not handled by one event handler is
7536 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
7537 remove the event handler.
7538 """
7539 return _core_.Window_PushEventHandler(*args, **kwargs)
7540
7541 def PopEventHandler(*args, **kwargs):
7542 """
7543 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
7544
7545 Removes and returns the top-most event handler on the event handler
7546 stack. If deleteHandler is True then the wx.EvtHandler object will be
7547 destroyed after it is popped.
7548 """
7549 return _core_.Window_PopEventHandler(*args, **kwargs)
7550
7551 def RemoveEventHandler(*args, **kwargs):
7552 """
7553 RemoveEventHandler(self, EvtHandler handler) -> bool
7554
7555 Find the given handler in the event handler chain and remove (but not
7556 delete) it from the event handler chain, return True if it was found
7557 and False otherwise (this also results in an assert failure so this
7558 function should only be called when the handler is supposed to be
7559 there.)
7560 """
7561 return _core_.Window_RemoveEventHandler(*args, **kwargs)
7562
7563 def SetValidator(*args, **kwargs):
7564 """
7565 SetValidator(self, Validator validator)
7566
7567 Deletes the current validator (if any) and sets the window validator,
7568 having called wx.Validator.Clone to create a new validator of this
7569 type.
7570 """
7571 return _core_.Window_SetValidator(*args, **kwargs)
7572
7573 def GetValidator(*args, **kwargs):
7574 """
7575 GetValidator(self) -> Validator
7576
7577 Returns a pointer to the current validator for the window, or None if
7578 there is none.
7579 """
7580 return _core_.Window_GetValidator(*args, **kwargs)
7581
7582 def Validate(*args, **kwargs):
7583 """
7584 Validate(self) -> bool
7585
7586 Validates the current values of the child controls using their
7587 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7588 style flag set, the method will also call Validate() of all child
7589 windows. Returns false if any of the validations failed.
7590 """
7591 return _core_.Window_Validate(*args, **kwargs)
7592
7593 def TransferDataToWindow(*args, **kwargs):
7594 """
7595 TransferDataToWindow(self) -> bool
7596
7597 Transfers values to child controls from data areas specified by their
7598 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7599 style flag set, the method will also call TransferDataToWindow() of
7600 all child windows.
7601 """
7602 return _core_.Window_TransferDataToWindow(*args, **kwargs)
7603
7604 def TransferDataFromWindow(*args, **kwargs):
7605 """
7606 TransferDataFromWindow(self) -> bool
7607
7608 Transfers values from child controls to data areas specified by their
7609 validators. Returns false if a transfer failed. If the window has
7610 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7611 also call TransferDataFromWindow() of all child windows.
7612 """
7613 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
7614
7615 def InitDialog(*args, **kwargs):
7616 """
7617 InitDialog(self)
7618
7619 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7620 to the dialog via validators.
7621 """
7622 return _core_.Window_InitDialog(*args, **kwargs)
7623
7624 def SetAcceleratorTable(*args, **kwargs):
7625 """
7626 SetAcceleratorTable(self, AcceleratorTable accel)
7627
7628 Sets the accelerator table for this window.
7629 """
7630 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
7631
7632 def GetAcceleratorTable(*args, **kwargs):
7633 """
7634 GetAcceleratorTable(self) -> AcceleratorTable
7635
7636 Gets the accelerator table for this window.
7637 """
7638 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
7639
7640 def RegisterHotKey(*args, **kwargs):
7641 """
7642 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7643
7644 Registers a system wide hotkey. Every time the user presses the hotkey
7645 registered here, this window will receive a hotkey event. It will
7646 receive the event even if the application is in the background and
7647 does not have the input focus because the user is working with some
7648 other application. To bind an event handler function to this hotkey
7649 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7650 hotkey was registered successfully.
7651 """
7652 return _core_.Window_RegisterHotKey(*args, **kwargs)
7653
7654 def UnregisterHotKey(*args, **kwargs):
7655 """
7656 UnregisterHotKey(self, int hotkeyId) -> bool
7657
7658 Unregisters a system wide hotkey.
7659 """
7660 return _core_.Window_UnregisterHotKey(*args, **kwargs)
7661
7662 def ConvertDialogPointToPixels(*args, **kwargs):
7663 """
7664 ConvertDialogPointToPixels(self, Point pt) -> Point
7665
7666 Converts a point or size from dialog units to pixels. Dialog units
7667 are used for maintaining a dialog's proportions even if the font
7668 changes. For the x dimension, the dialog units are multiplied by the
7669 average character width and then divided by 4. For the y dimension,
7670 the dialog units are multiplied by the average character height and
7671 then divided by 8.
7672 """
7673 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
7674
7675 def ConvertDialogSizeToPixels(*args, **kwargs):
7676 """
7677 ConvertDialogSizeToPixels(self, Size sz) -> Size
7678
7679 Converts a point or size from dialog units to pixels. Dialog units
7680 are used for maintaining a dialog's proportions even if the font
7681 changes. For the x dimension, the dialog units are multiplied by the
7682 average character width and then divided by 4. For the y dimension,
7683 the dialog units are multiplied by the average character height and
7684 then divided by 8.
7685 """
7686 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7687
7688 def DLG_PNT(*args, **kwargs):
7689 """
7690 DLG_PNT(self, Point pt) -> Point
7691
7692 Converts a point or size from dialog units to pixels. Dialog units
7693 are used for maintaining a dialog's proportions even if the font
7694 changes. For the x dimension, the dialog units are multiplied by the
7695 average character width and then divided by 4. For the y dimension,
7696 the dialog units are multiplied by the average character height and
7697 then divided by 8.
7698 """
7699 return _core_.Window_DLG_PNT(*args, **kwargs)
7700
7701 def DLG_SZE(*args, **kwargs):
7702 """
7703 DLG_SZE(self, Size sz) -> Size
7704
7705 Converts a point or size from dialog units to pixels. Dialog units
7706 are used for maintaining a dialog's proportions even if the font
7707 changes. For the x dimension, the dialog units are multiplied by the
7708 average character width and then divided by 4. For the y dimension,
7709 the dialog units are multiplied by the average character height and
7710 then divided by 8.
7711 """
7712 return _core_.Window_DLG_SZE(*args, **kwargs)
7713
7714 def ConvertPixelPointToDialog(*args, **kwargs):
7715 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7716 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7717
7718 def ConvertPixelSizeToDialog(*args, **kwargs):
7719 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7720 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7721
7722 def WarpPointer(*args, **kwargs):
7723 """
7724 WarpPointer(self, int x, int y)
7725
7726 Moves the pointer to the given position on the window.
7727
7728 NOTE: This function is not supported under Mac because Apple Human
7729 Interface Guidelines forbid moving the mouse cursor programmatically.
7730 """
7731 return _core_.Window_WarpPointer(*args, **kwargs)
7732
7733 def CaptureMouse(*args, **kwargs):
7734 """
7735 CaptureMouse(self)
7736
7737 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7738 release the capture.
7739
7740 Note that wxWindows maintains the stack of windows having captured the
7741 mouse and when the mouse is released the capture returns to the window
7742 which had had captured it previously and it is only really released if
7743 there were no previous window. In particular, this means that you must
7744 release the mouse as many times as you capture it.
7745 """
7746 return _core_.Window_CaptureMouse(*args, **kwargs)
7747
7748 def ReleaseMouse(*args, **kwargs):
7749 """
7750 ReleaseMouse(self)
7751
7752 Releases mouse input captured with wx.Window.CaptureMouse.
7753 """
7754 return _core_.Window_ReleaseMouse(*args, **kwargs)
7755
7756 def GetCapture(*args, **kwargs):
7757 """
7758 GetCapture() -> Window
7759
7760 Returns the window which currently captures the mouse or None
7761 """
7762 return _core_.Window_GetCapture(*args, **kwargs)
7763
7764 GetCapture = staticmethod(GetCapture)
7765 def HasCapture(*args, **kwargs):
7766 """
7767 HasCapture(self) -> bool
7768
7769 Returns true if this window has the current mouse capture.
7770 """
7771 return _core_.Window_HasCapture(*args, **kwargs)
7772
7773 def Refresh(*args, **kwargs):
7774 """
7775 Refresh(self, bool eraseBackground=True, Rect rect=None)
7776
7777 Mark the specified rectangle (or the whole window) as "dirty" so it
7778 will be repainted. Causes an EVT_PAINT event to be generated and sent
7779 to the window.
7780 """
7781 return _core_.Window_Refresh(*args, **kwargs)
7782
7783 def RefreshRect(*args, **kwargs):
7784 """
7785 RefreshRect(self, Rect rect, bool eraseBackground=True)
7786
7787 Redraws the contents of the given rectangle: the area inside it will
7788 be repainted. This is the same as Refresh but has a nicer syntax.
7789 """
7790 return _core_.Window_RefreshRect(*args, **kwargs)
7791
7792 def Update(*args, **kwargs):
7793 """
7794 Update(self)
7795
7796 Calling this method immediately repaints the invalidated area of the
7797 window instead of waiting for the EVT_PAINT event to happen, (normally
7798 this would usually only happen when the flow of control returns to the
7799 event loop.) Notice that this function doesn't refresh the window and
7800 does nothing if the window has been already repainted. Use Refresh
7801 first if you want to immediately redraw the window (or some portion of
7802 it) unconditionally.
7803 """
7804 return _core_.Window_Update(*args, **kwargs)
7805
7806 def ClearBackground(*args, **kwargs):
7807 """
7808 ClearBackground(self)
7809
7810 Clears the window by filling it with the current background
7811 colour. Does not cause an erase background event to be generated.
7812 """
7813 return _core_.Window_ClearBackground(*args, **kwargs)
7814
7815 def Freeze(*args, **kwargs):
7816 """
7817 Freeze(self)
7818
7819 Freezes the window or, in other words, prevents any updates from
7820 taking place on screen, the window is not redrawn at all. Thaw must be
7821 called to reenable window redrawing. Calls to Freeze/Thaw may be
7822 nested, with the actual Thaw being delayed until all the nesting has
7823 been undone.
7824
7825 This method is useful for visual appearance optimization (for example,
7826 it is a good idea to use it before inserting large amount of text into
7827 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7828 for all controls so it is mostly just a hint to wxWindows and not a
7829 mandatory directive.
7830 """
7831 return _core_.Window_Freeze(*args, **kwargs)
7832
7833 def Thaw(*args, **kwargs):
7834 """
7835 Thaw(self)
7836
7837 Reenables window updating after a previous call to Freeze. Calls to
7838 Freeze/Thaw may be nested, so Thaw must be called the same number of
7839 times that Freeze was before the window will be updated.
7840 """
7841 return _core_.Window_Thaw(*args, **kwargs)
7842
7843 def PrepareDC(*args, **kwargs):
7844 """
7845 PrepareDC(self, DC dc)
7846
7847 Call this function to prepare the device context for drawing a
7848 scrolled image. It sets the device origin according to the current
7849 scroll position.
7850 """
7851 return _core_.Window_PrepareDC(*args, **kwargs)
7852
7853 def GetUpdateRegion(*args, **kwargs):
7854 """
7855 GetUpdateRegion(self) -> Region
7856
7857 Returns the region specifying which parts of the window have been
7858 damaged. Should only be called within an EVT_PAINT handler.
7859 """
7860 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7861
7862 def GetUpdateClientRect(*args, **kwargs):
7863 """
7864 GetUpdateClientRect(self) -> Rect
7865
7866 Get the update rectangle region bounding box in client coords.
7867 """
7868 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7869
7870 def IsExposed(*args, **kwargs):
7871 """
7872 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7873
7874 Returns true if the given point or rectangle area has been exposed
7875 since the last repaint. Call this in an paint event handler to
7876 optimize redrawing by only redrawing those areas, which have been
7877 exposed.
7878 """
7879 return _core_.Window_IsExposed(*args, **kwargs)
7880
7881 def IsExposedPoint(*args, **kwargs):
7882 """
7883 IsExposedPoint(self, Point pt) -> bool
7884
7885 Returns true if the given point or rectangle area has been exposed
7886 since the last repaint. Call this in an paint event handler to
7887 optimize redrawing by only redrawing those areas, which have been
7888 exposed.
7889 """
7890 return _core_.Window_IsExposedPoint(*args, **kwargs)
7891
7892 def IsExposedRect(*args, **kwargs):
7893 """
7894 IsExposedRect(self, Rect rect) -> bool
7895
7896 Returns true if the given point or rectangle area has been exposed
7897 since the last repaint. Call this in an paint event handler to
7898 optimize redrawing by only redrawing those areas, which have been
7899 exposed.
7900 """
7901 return _core_.Window_IsExposedRect(*args, **kwargs)
7902
7903 def GetDefaultAttributes(*args, **kwargs):
7904 """
7905 GetDefaultAttributes(self) -> VisualAttributes
7906
7907 Get the default attributes for an instance of this class. This is
7908 useful if you want to use the same font or colour in your own control
7909 as in a standard control -- which is a much better idea than hard
7910 coding specific colours or fonts which might look completely out of
7911 place on the user's system, especially if it uses themes.
7912 """
7913 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7914
7915 def GetClassDefaultAttributes(*args, **kwargs):
7916 """
7917 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7918
7919 Get the default attributes for this class. This is useful if you want
7920 to use the same font or colour in your own control as in a standard
7921 control -- which is a much better idea than hard coding specific
7922 colours or fonts which might look completely out of place on the
7923 user's system, especially if it uses themes.
7924
7925 The variant parameter is only relevant under Mac currently and is
7926 ignore under other platforms. Under Mac, it will change the size of
7927 the returned font. See `wx.Window.SetWindowVariant` for more about
7928 this.
7929 """
7930 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7931
7932 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7933 def SetBackgroundColour(*args, **kwargs):
7934 """
7935 SetBackgroundColour(self, Colour colour) -> bool
7936
7937 Sets the background colour of the window. Returns True if the colour
7938 was changed. The background colour is usually painted by the default
7939 EVT_ERASE_BACKGROUND event handler function under Windows and
7940 automatically under GTK. Using `wx.NullColour` will reset the window
7941 to the default background colour.
7942
7943 Note that setting the background colour may not cause an immediate
7944 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7945 calling this function.
7946
7947 Using this function will disable attempts to use themes for this
7948 window, if the system supports them. Use with care since usually the
7949 themes represent the appearance chosen by the user to be used for all
7950 applications on the system.
7951 """
7952 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7953
7954 def SetOwnBackgroundColour(*args, **kwargs):
7955 """SetOwnBackgroundColour(self, Colour colour)"""
7956 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7957
7958 def SetForegroundColour(*args, **kwargs):
7959 """
7960 SetForegroundColour(self, Colour colour) -> bool
7961
7962 Sets the foreground colour of the window. Returns True is the colour
7963 was changed. The interpretation of foreground colour is dependent on
7964 the window class; it may be the text colour or other colour, or it may
7965 not be used at all.
7966 """
7967 return _core_.Window_SetForegroundColour(*args, **kwargs)
7968
7969 def SetOwnForegroundColour(*args, **kwargs):
7970 """SetOwnForegroundColour(self, Colour colour)"""
7971 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7972
7973 def GetBackgroundColour(*args, **kwargs):
7974 """
7975 GetBackgroundColour(self) -> Colour
7976
7977 Returns the background colour of the window.
7978 """
7979 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7980
7981 def GetForegroundColour(*args, **kwargs):
7982 """
7983 GetForegroundColour(self) -> Colour
7984
7985 Returns the foreground colour of the window. The interpretation of
7986 foreground colour is dependent on the window class; it may be the text
7987 colour or other colour, or it may not be used at all.
7988 """
7989 return _core_.Window_GetForegroundColour(*args, **kwargs)
7990
7991 def InheritsBackgroundColour(*args, **kwargs):
7992 """InheritsBackgroundColour(self) -> bool"""
7993 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
7994
7995 def UseBgCol(*args, **kwargs):
7996 """UseBgCol(self) -> bool"""
7997 return _core_.Window_UseBgCol(*args, **kwargs)
7998
7999 def SetBackgroundStyle(*args, **kwargs):
8000 """
8001 SetBackgroundStyle(self, int style) -> bool
8002
8003 Returns the background style of the window. The background style
8004 indicates how the background of the window is drawn.
8005
8006 ====================== ========================================
8007 wx.BG_STYLE_SYSTEM The background colour or pattern should
8008 be determined by the system
8009 wx.BG_STYLE_COLOUR The background should be a solid colour
8010 wx.BG_STYLE_CUSTOM The background will be implemented by the
8011 application.
8012 ====================== ========================================
8013
8014 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
8015 a custom background, such as a tiled bitmap. Currently the style has
8016 no effect on other platforms.
8017
8018 :see: `GetBackgroundStyle`, `SetBackgroundColour`
8019 """
8020 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
8021
8022 def GetBackgroundStyle(*args, **kwargs):
8023 """
8024 GetBackgroundStyle(self) -> int
8025
8026 Returns the background style of the window.
8027
8028 :see: `SetBackgroundStyle`
8029 """
8030 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
8031
8032 def HasTransparentBackground(*args, **kwargs):
8033 """
8034 HasTransparentBackground(self) -> bool
8035
8036 Returns True if this window's background is transparent (as, for
8037 example, for `wx.StaticText`) and should show the parent window's
8038 background.
8039
8040 This method is mostly used internally by the library itself and you
8041 normally shouldn't have to call it. You may, however, have to override
8042 it in your custom control classes to ensure that background is painted
8043 correctly.
8044 """
8045 return _core_.Window_HasTransparentBackground(*args, **kwargs)
8046
8047 def SetCursor(*args, **kwargs):
8048 """
8049 SetCursor(self, Cursor cursor) -> bool
8050
8051 Sets the window's cursor. Notice that the window cursor also sets it
8052 for the children of the window implicitly.
8053
8054 The cursor may be wx.NullCursor in which case the window cursor will
8055 be reset back to default.
8056 """
8057 return _core_.Window_SetCursor(*args, **kwargs)
8058
8059 def GetCursor(*args, **kwargs):
8060 """
8061 GetCursor(self) -> Cursor
8062
8063 Return the cursor associated with this window.
8064 """
8065 return _core_.Window_GetCursor(*args, **kwargs)
8066
8067 def SetFont(*args, **kwargs):
8068 """
8069 SetFont(self, Font font) -> bool
8070
8071 Sets the font for this window.
8072 """
8073 return _core_.Window_SetFont(*args, **kwargs)
8074
8075 def SetOwnFont(*args, **kwargs):
8076 """SetOwnFont(self, Font font)"""
8077 return _core_.Window_SetOwnFont(*args, **kwargs)
8078
8079 def GetFont(*args, **kwargs):
8080 """
8081 GetFont(self) -> Font
8082
8083 Returns the default font used for this window.
8084 """
8085 return _core_.Window_GetFont(*args, **kwargs)
8086
8087 def SetCaret(*args, **kwargs):
8088 """
8089 SetCaret(self, Caret caret)
8090
8091 Sets the caret associated with the window.
8092 """
8093 return _core_.Window_SetCaret(*args, **kwargs)
8094
8095 def GetCaret(*args, **kwargs):
8096 """
8097 GetCaret(self) -> Caret
8098
8099 Returns the caret associated with the window.
8100 """
8101 return _core_.Window_GetCaret(*args, **kwargs)
8102
8103 def GetCharHeight(*args, **kwargs):
8104 """
8105 GetCharHeight(self) -> int
8106
8107 Get the (average) character size for the current font.
8108 """
8109 return _core_.Window_GetCharHeight(*args, **kwargs)
8110
8111 def GetCharWidth(*args, **kwargs):
8112 """
8113 GetCharWidth(self) -> int
8114
8115 Get the (average) character size for the current font.
8116 """
8117 return _core_.Window_GetCharWidth(*args, **kwargs)
8118
8119 def GetTextExtent(*args, **kwargs):
8120 """
8121 GetTextExtent(String string) -> (width, height)
8122
8123 Get the width and height of the text using the current font.
8124 """
8125 return _core_.Window_GetTextExtent(*args, **kwargs)
8126
8127 def GetFullTextExtent(*args, **kwargs):
8128 """
8129 GetFullTextExtent(String string, Font font=None) ->
8130 (width, height, descent, externalLeading)
8131
8132 Get the width, height, decent and leading of the text using the
8133 current or specified font.
8134 """
8135 return _core_.Window_GetFullTextExtent(*args, **kwargs)
8136
8137 def ClientToScreenXY(*args, **kwargs):
8138 """
8139 ClientToScreenXY(int x, int y) -> (x,y)
8140
8141 Converts to screen coordinates from coordinates relative to this window.
8142 """
8143 return _core_.Window_ClientToScreenXY(*args, **kwargs)
8144
8145 def ScreenToClientXY(*args, **kwargs):
8146 """
8147 ScreenToClientXY(int x, int y) -> (x,y)
8148
8149 Converts from screen to client window coordinates.
8150 """
8151 return _core_.Window_ScreenToClientXY(*args, **kwargs)
8152
8153 def ClientToScreen(*args, **kwargs):
8154 """
8155 ClientToScreen(self, Point pt) -> Point
8156
8157 Converts to screen coordinates from coordinates relative to this window.
8158 """
8159 return _core_.Window_ClientToScreen(*args, **kwargs)
8160
8161 def ScreenToClient(*args, **kwargs):
8162 """
8163 ScreenToClient(self, Point pt) -> Point
8164
8165 Converts from screen to client window coordinates.
8166 """
8167 return _core_.Window_ScreenToClient(*args, **kwargs)
8168
8169 def HitTestXY(*args, **kwargs):
8170 """
8171 HitTestXY(self, int x, int y) -> int
8172
8173 Test where the given (in client coords) point lies
8174 """
8175 return _core_.Window_HitTestXY(*args, **kwargs)
8176
8177 def HitTest(*args, **kwargs):
8178 """
8179 HitTest(self, Point pt) -> int
8180
8181 Test where the given (in client coords) point lies
8182 """
8183 return _core_.Window_HitTest(*args, **kwargs)
8184
8185 def GetBorder(*args):
8186 """
8187 GetBorder(self, long flags) -> int
8188 GetBorder(self) -> int
8189
8190 Get border for the flags of this window
8191 """
8192 return _core_.Window_GetBorder(*args)
8193
8194 def UpdateWindowUI(*args, **kwargs):
8195 """
8196 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
8197
8198 This function sends EVT_UPDATE_UI events to the window. The particular
8199 implementation depends on the window; for example a wx.ToolBar will
8200 send an update UI event for each toolbar button, and a wx.Frame will
8201 send an update UI event for each menubar menu item. You can call this
8202 function from your application to ensure that your UI is up-to-date at
8203 a particular point in time (as far as your EVT_UPDATE_UI handlers are
8204 concerned). This may be necessary if you have called
8205 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
8206 limit the overhead that wxWindows incurs by sending update UI events
8207 in idle time.
8208 """
8209 return _core_.Window_UpdateWindowUI(*args, **kwargs)
8210
8211 def PopupMenuXY(*args, **kwargs):
8212 """
8213 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
8214
8215 Pops up the given menu at the specified coordinates, relative to this window,
8216 and returns control when the user has dismissed the menu. If a menu item is
8217 selected, the corresponding menu event is generated and will be processed as
8218 usual. If the default position is given then the current position of the
8219 mouse cursor will be used.
8220 """
8221 return _core_.Window_PopupMenuXY(*args, **kwargs)
8222
8223 def PopupMenu(*args, **kwargs):
8224 """
8225 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
8226
8227 Pops up the given menu at the specified coordinates, relative to this window,
8228 and returns control when the user has dismissed the menu. If a menu item is
8229 selected, the corresponding menu event is generated and will be processed as
8230 usual. If the default position is given then the current position of the
8231 mouse cursor will be used.
8232 """
8233 return _core_.Window_PopupMenu(*args, **kwargs)
8234
8235 def GetHandle(*args, **kwargs):
8236 """
8237 GetHandle(self) -> long
8238
8239 Returns the platform-specific handle (as a long integer) of the
8240 physical window. Currently on wxMac it returns the handle of the
8241 toplevel parent of the window.
8242 """
8243 return _core_.Window_GetHandle(*args, **kwargs)
8244
8245 def AssociateHandle(*args, **kwargs):
8246 """
8247 AssociateHandle(self, long handle)
8248
8249 Associate the window with a new native handle
8250 """
8251 return _core_.Window_AssociateHandle(*args, **kwargs)
8252
8253 def DissociateHandle(*args, **kwargs):
8254 """
8255 DissociateHandle(self)
8256
8257 Dissociate the current native handle from the window
8258 """
8259 return _core_.Window_DissociateHandle(*args, **kwargs)
8260
8261 def HasScrollbar(*args, **kwargs):
8262 """
8263 HasScrollbar(self, int orient) -> bool
8264
8265 Does the window have the scrollbar for this orientation?
8266 """
8267 return _core_.Window_HasScrollbar(*args, **kwargs)
8268
8269 def SetScrollbar(*args, **kwargs):
8270 """
8271 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
8272 bool refresh=True)
8273
8274 Sets the scrollbar properties of a built-in scrollbar.
8275 """
8276 return _core_.Window_SetScrollbar(*args, **kwargs)
8277
8278 def SetScrollPos(*args, **kwargs):
8279 """
8280 SetScrollPos(self, int orientation, int pos, bool refresh=True)
8281
8282 Sets the position of one of the built-in scrollbars.
8283 """
8284 return _core_.Window_SetScrollPos(*args, **kwargs)
8285
8286 def GetScrollPos(*args, **kwargs):
8287 """
8288 GetScrollPos(self, int orientation) -> int
8289
8290 Returns the built-in scrollbar position.
8291 """
8292 return _core_.Window_GetScrollPos(*args, **kwargs)
8293
8294 def GetScrollThumb(*args, **kwargs):
8295 """
8296 GetScrollThumb(self, int orientation) -> int
8297
8298 Returns the built-in scrollbar thumb size.
8299 """
8300 return _core_.Window_GetScrollThumb(*args, **kwargs)
8301
8302 def GetScrollRange(*args, **kwargs):
8303 """
8304 GetScrollRange(self, int orientation) -> int
8305
8306 Returns the built-in scrollbar range.
8307 """
8308 return _core_.Window_GetScrollRange(*args, **kwargs)
8309
8310 def ScrollWindow(*args, **kwargs):
8311 """
8312 ScrollWindow(self, int dx, int dy, Rect rect=None)
8313
8314 Physically scrolls the pixels in the window and move child windows
8315 accordingly. Use this function to optimise your scrolling
8316 implementations, to minimise the area that must be redrawn. Note that
8317 it is rarely required to call this function from a user program.
8318 """
8319 return _core_.Window_ScrollWindow(*args, **kwargs)
8320
8321 def ScrollLines(*args, **kwargs):
8322 """
8323 ScrollLines(self, int lines) -> bool
8324
8325 If the platform and window class supports it, scrolls the window by
8326 the given number of lines down, if lines is positive, or up if lines
8327 is negative. Returns True if the window was scrolled, False if it was
8328 already on top/bottom and nothing was done.
8329 """
8330 return _core_.Window_ScrollLines(*args, **kwargs)
8331
8332 def ScrollPages(*args, **kwargs):
8333 """
8334 ScrollPages(self, int pages) -> bool
8335
8336 If the platform and window class supports it, scrolls the window by
8337 the given number of pages down, if pages is positive, or up if pages
8338 is negative. Returns True if the window was scrolled, False if it was
8339 already on top/bottom and nothing was done.
8340 """
8341 return _core_.Window_ScrollPages(*args, **kwargs)
8342
8343 def LineUp(*args, **kwargs):
8344 """
8345 LineUp(self) -> bool
8346
8347 This is just a wrapper for ScrollLines(-1).
8348 """
8349 return _core_.Window_LineUp(*args, **kwargs)
8350
8351 def LineDown(*args, **kwargs):
8352 """
8353 LineDown(self) -> bool
8354
8355 This is just a wrapper for ScrollLines(1).
8356 """
8357 return _core_.Window_LineDown(*args, **kwargs)
8358
8359 def PageUp(*args, **kwargs):
8360 """
8361 PageUp(self) -> bool
8362
8363 This is just a wrapper for ScrollPages(-1).
8364 """
8365 return _core_.Window_PageUp(*args, **kwargs)
8366
8367 def PageDown(*args, **kwargs):
8368 """
8369 PageDown(self) -> bool
8370
8371 This is just a wrapper for ScrollPages(1).
8372 """
8373 return _core_.Window_PageDown(*args, **kwargs)
8374
8375 def SetHelpText(*args, **kwargs):
8376 """
8377 SetHelpText(self, String text)
8378
8379 Sets the help text to be used as context-sensitive help for this
8380 window. Note that the text is actually stored by the current
8381 wxHelpProvider implementation, and not in the window object itself.
8382 """
8383 return _core_.Window_SetHelpText(*args, **kwargs)
8384
8385 def SetHelpTextForId(*args, **kwargs):
8386 """
8387 SetHelpTextForId(self, String text)
8388
8389 Associate this help text with all windows with the same id as this
8390 one.
8391 """
8392 return _core_.Window_SetHelpTextForId(*args, **kwargs)
8393
8394 def GetHelpText(*args, **kwargs):
8395 """
8396 GetHelpText(self) -> String
8397
8398 Gets the help text to be used as context-sensitive help for this
8399 window. Note that the text is actually stored by the current
8400 wxHelpProvider implementation, and not in the window object itself.
8401 """
8402 return _core_.Window_GetHelpText(*args, **kwargs)
8403
8404 def SetToolTipString(*args, **kwargs):
8405 """
8406 SetToolTipString(self, String tip)
8407
8408 Attach a tooltip to the window.
8409 """
8410 return _core_.Window_SetToolTipString(*args, **kwargs)
8411
8412 def SetToolTip(*args, **kwargs):
8413 """
8414 SetToolTip(self, ToolTip tip)
8415
8416 Attach a tooltip to the window.
8417 """
8418 return _core_.Window_SetToolTip(*args, **kwargs)
8419
8420 def GetToolTip(*args, **kwargs):
8421 """
8422 GetToolTip(self) -> ToolTip
8423
8424 get the associated tooltip or None if none
8425 """
8426 return _core_.Window_GetToolTip(*args, **kwargs)
8427
8428 def SetDropTarget(*args, **kwargs):
8429 """
8430 SetDropTarget(self, DropTarget dropTarget)
8431
8432 Associates a drop target with this window. If the window already has
8433 a drop target, it is deleted.
8434 """
8435 return _core_.Window_SetDropTarget(*args, **kwargs)
8436
8437 def GetDropTarget(*args, **kwargs):
8438 """
8439 GetDropTarget(self) -> DropTarget
8440
8441 Returns the associated drop target, which may be None.
8442 """
8443 return _core_.Window_GetDropTarget(*args, **kwargs)
8444
8445 def SetConstraints(*args, **kwargs):
8446 """
8447 SetConstraints(self, LayoutConstraints constraints)
8448
8449 Sets the window to have the given layout constraints. If an existing
8450 layout constraints object is already owned by the window, it will be
8451 deleted. Pass None to disassociate and delete the window's current
8452 constraints.
8453
8454 You must call SetAutoLayout to tell a window to use the constraints
8455 automatically in its default EVT_SIZE handler; otherwise, you must
8456 handle EVT_SIZE yourself and call Layout() explicitly. When setting
8457 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
8458 effect.
8459 """
8460 return _core_.Window_SetConstraints(*args, **kwargs)
8461
8462 def GetConstraints(*args, **kwargs):
8463 """
8464 GetConstraints(self) -> LayoutConstraints
8465
8466 Returns a pointer to the window's layout constraints, or None if there
8467 are none.
8468 """
8469 return _core_.Window_GetConstraints(*args, **kwargs)
8470
8471 def SetAutoLayout(*args, **kwargs):
8472 """
8473 SetAutoLayout(self, bool autoLayout)
8474
8475 Determines whether the Layout function will be called automatically
8476 when the window is resized. It is called implicitly by SetSizer but
8477 if you use SetConstraints you should call it manually or otherwise the
8478 window layout won't be correctly updated when its size changes.
8479 """
8480 return _core_.Window_SetAutoLayout(*args, **kwargs)
8481
8482 def GetAutoLayout(*args, **kwargs):
8483 """
8484 GetAutoLayout(self) -> bool
8485
8486 Returns the current autoLayout setting
8487 """
8488 return _core_.Window_GetAutoLayout(*args, **kwargs)
8489
8490 def Layout(*args, **kwargs):
8491 """
8492 Layout(self) -> bool
8493
8494 Invokes the constraint-based layout algorithm or the sizer-based
8495 algorithm for this window. See SetAutoLayout: when auto layout is on,
8496 this function gets called automatically by the default EVT_SIZE
8497 handler when the window is resized.
8498 """
8499 return _core_.Window_Layout(*args, **kwargs)
8500
8501 def SetSizer(*args, **kwargs):
8502 """
8503 SetSizer(self, Sizer sizer, bool deleteOld=True)
8504
8505 Sets the window to have the given layout sizer. The window will then
8506 own the object, and will take care of its deletion. If an existing
8507 layout sizer object is already owned by the window, it will be deleted
8508 if the deleteOld parameter is true. Note that this function will also
8509 call SetAutoLayout implicitly with a True parameter if the sizer is
8510 non-None, and False otherwise.
8511 """
8512 return _core_.Window_SetSizer(*args, **kwargs)
8513
8514 def SetSizerAndFit(*args, **kwargs):
8515 """
8516 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
8517
8518 The same as SetSizer, except it also sets the size hints for the
8519 window based on the sizer's minimum size.
8520 """
8521 return _core_.Window_SetSizerAndFit(*args, **kwargs)
8522
8523 def GetSizer(*args, **kwargs):
8524 """
8525 GetSizer(self) -> Sizer
8526
8527 Return the sizer associated with the window by a previous call to
8528 SetSizer or None if there isn't one.
8529 """
8530 return _core_.Window_GetSizer(*args, **kwargs)
8531
8532 def SetContainingSizer(*args, **kwargs):
8533 """
8534 SetContainingSizer(self, Sizer sizer)
8535
8536 This normally does not need to be called by application code. It is
8537 called internally when a window is added to a sizer, and is used so
8538 the window can remove itself from the sizer when it is destroyed.
8539 """
8540 return _core_.Window_SetContainingSizer(*args, **kwargs)
8541
8542 def GetContainingSizer(*args, **kwargs):
8543 """
8544 GetContainingSizer(self) -> Sizer
8545
8546 Return the sizer that this window is a member of, if any, otherwise None.
8547 """
8548 return _core_.Window_GetContainingSizer(*args, **kwargs)
8549
8550 def InheritAttributes(*args, **kwargs):
8551 """
8552 InheritAttributes(self)
8553
8554 This function is (or should be, in case of custom controls) called
8555 during window creation to intelligently set up the window visual
8556 attributes, that is the font and the foreground and background
8557 colours.
8558
8559 By 'intelligently' the following is meant: by default, all windows use
8560 their own default attributes. However if some of the parent's
8561 attributes are explicitly changed (that is, using SetFont and not
8562 SetOwnFont) and if the corresponding attribute hadn't been
8563 explicitly set for this window itself, then this window takes the same
8564 value as used by the parent. In addition, if the window overrides
8565 ShouldInheritColours to return false, the colours will not be changed
8566 no matter what and only the font might.
8567
8568 This rather complicated logic is necessary in order to accommodate the
8569 different usage scenarios. The most common one is when all default
8570 attributes are used and in this case, nothing should be inherited as
8571 in modern GUIs different controls use different fonts (and colours)
8572 than their siblings so they can't inherit the same value from the
8573 parent. However it was also deemed desirable to allow to simply change
8574 the attributes of all children at once by just changing the font or
8575 colour of their common parent, hence in this case we do inherit the
8576 parents attributes.
8577
8578 """
8579 return _core_.Window_InheritAttributes(*args, **kwargs)
8580
8581 def ShouldInheritColours(*args, **kwargs):
8582 """
8583 ShouldInheritColours(self) -> bool
8584
8585 Return true from here to allow the colours of this window to be
8586 changed by InheritAttributes, returning false forbids inheriting them
8587 from the parent window.
8588
8589 The base class version returns false, but this method is overridden in
8590 wxControl where it returns true.
8591 """
8592 return _core_.Window_ShouldInheritColours(*args, **kwargs)
8593
8594 def PostCreate(self, pre):
8595 """
8596 Phase 3 of the 2-phase create <wink!>
8597 Call this method after precreating the window with the 2-phase create method.
8598 """
8599 self.this = pre.this
8600 self.thisown = pre.thisown
8601 pre.thisown = 0
8602 if hasattr(self, '_setOORInfo'):
8603 self._setOORInfo(self)
8604 if hasattr(self, '_setCallbackInfo'):
8605 self._setCallbackInfo(self, self.__class__)
8606
8607
8608 class WindowPtr(Window):
8609 def __init__(self, this):
8610 self.this = this
8611 if not hasattr(self,"thisown"): self.thisown = 0
8612 self.__class__ = Window
8613 _core_.Window_swigregister(WindowPtr)
8614
8615 def PreWindow(*args, **kwargs):
8616 """
8617 PreWindow() -> Window
8618
8619 Precreate a Window for 2-phase creation.
8620 """
8621 val = _core_.new_PreWindow(*args, **kwargs)
8622 val.thisown = 1
8623 return val
8624
8625 def Window_NewControlId(*args, **kwargs):
8626 """
8627 Window_NewControlId() -> int
8628
8629 Generate a control id for the controls which were not given one.
8630 """
8631 return _core_.Window_NewControlId(*args, **kwargs)
8632
8633 def Window_NextControlId(*args, **kwargs):
8634 """
8635 Window_NextControlId(int winid) -> int
8636
8637 Get the id of the control following the one with the given
8638 autogenerated) id
8639 """
8640 return _core_.Window_NextControlId(*args, **kwargs)
8641
8642 def Window_PrevControlId(*args, **kwargs):
8643 """
8644 Window_PrevControlId(int winid) -> int
8645
8646 Get the id of the control preceding the one with the given
8647 autogenerated) id
8648 """
8649 return _core_.Window_PrevControlId(*args, **kwargs)
8650
8651 def Window_FindFocus(*args, **kwargs):
8652 """
8653 Window_FindFocus() -> Window
8654
8655 Returns the window or control that currently has the keyboard focus,
8656 or None.
8657 """
8658 return _core_.Window_FindFocus(*args, **kwargs)
8659
8660 def Window_GetCapture(*args, **kwargs):
8661 """
8662 Window_GetCapture() -> Window
8663
8664 Returns the window which currently captures the mouse or None
8665 """
8666 return _core_.Window_GetCapture(*args, **kwargs)
8667
8668 def Window_GetClassDefaultAttributes(*args, **kwargs):
8669 """
8670 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8671
8672 Get the default attributes for this class. This is useful if you want
8673 to use the same font or colour in your own control as in a standard
8674 control -- which is a much better idea than hard coding specific
8675 colours or fonts which might look completely out of place on the
8676 user's system, especially if it uses themes.
8677
8678 The variant parameter is only relevant under Mac currently and is
8679 ignore under other platforms. Under Mac, it will change the size of
8680 the returned font. See `wx.Window.SetWindowVariant` for more about
8681 this.
8682 """
8683 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
8684
8685 def DLG_PNT(win, point_or_x, y=None):
8686 """
8687 Convenience function for converting a Point or (x,y) in
8688 dialog units to pixel units.
8689 """
8690 if y is None:
8691 return win.ConvertDialogPointToPixels(point_or_x)
8692 else:
8693 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8694
8695 def DLG_SZE(win, size_width, height=None):
8696 """
8697 Convenience function for converting a Size or (w,h) in
8698 dialog units to pixel units.
8699 """
8700 if height is None:
8701 return win.ConvertDialogSizeToPixels(size_width)
8702 else:
8703 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8704
8705
8706 def FindWindowById(*args, **kwargs):
8707 """
8708 FindWindowById(long id, Window parent=None) -> Window
8709
8710 Find the first window in the application with the given id. If parent
8711 is None, the search will start from all top-level frames and dialog
8712 boxes; if non-None, the search will be limited to the given window
8713 hierarchy. The search is recursive in both cases.
8714 """
8715 return _core_.FindWindowById(*args, **kwargs)
8716
8717 def FindWindowByName(*args, **kwargs):
8718 """
8719 FindWindowByName(String name, Window parent=None) -> Window
8720
8721 Find a window by its name (as given in a window constructor or Create
8722 function call). If parent is None, the search will start from all
8723 top-level frames and dialog boxes; if non-None, the search will be
8724 limited to the given window hierarchy. The search is recursive in both
8725 cases.
8726
8727 If no window with such name is found, wx.FindWindowByLabel is called.
8728 """
8729 return _core_.FindWindowByName(*args, **kwargs)
8730
8731 def FindWindowByLabel(*args, **kwargs):
8732 """
8733 FindWindowByLabel(String label, Window parent=None) -> Window
8734
8735 Find a window by its label. Depending on the type of window, the label
8736 may be a window title or panel item label. If parent is None, the
8737 search will start from all top-level frames and dialog boxes; if
8738 non-None, the search will be limited to the given window
8739 hierarchy. The search is recursive in both cases.
8740 """
8741 return _core_.FindWindowByLabel(*args, **kwargs)
8742
8743 def Window_FromHWND(*args, **kwargs):
8744 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8745 return _core_.Window_FromHWND(*args, **kwargs)
8746
8747 def GetTopLevelWindows(*args, **kwargs):
8748 """
8749 GetTopLevelWindows() -> PyObject
8750
8751 Returns a list of the the application's top-level windows, (frames,
8752 dialogs, etc.) NOTE: Currently this is a copy of the list maintained
8753 by wxWidgets, and so it is only valid as long as no top-level windows
8754 are closed or new top-level windows are created.
8755
8756 """
8757 return _core_.GetTopLevelWindows(*args, **kwargs)
8758 #---------------------------------------------------------------------------
8759
8760 class Validator(EvtHandler):
8761 """Proxy of C++ Validator class"""
8762 def __repr__(self):
8763 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8764 def __init__(self, *args, **kwargs):
8765 """__init__(self) -> Validator"""
8766 newobj = _core_.new_Validator(*args, **kwargs)
8767 self.this = newobj.this
8768 self.thisown = 1
8769 del newobj.thisown
8770 self._setOORInfo(self)
8771
8772 def Clone(*args, **kwargs):
8773 """Clone(self) -> Validator"""
8774 return _core_.Validator_Clone(*args, **kwargs)
8775
8776 def Validate(*args, **kwargs):
8777 """Validate(self, Window parent) -> bool"""
8778 return _core_.Validator_Validate(*args, **kwargs)
8779
8780 def TransferToWindow(*args, **kwargs):
8781 """TransferToWindow(self) -> bool"""
8782 return _core_.Validator_TransferToWindow(*args, **kwargs)
8783
8784 def TransferFromWindow(*args, **kwargs):
8785 """TransferFromWindow(self) -> bool"""
8786 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8787
8788 def GetWindow(*args, **kwargs):
8789 """GetWindow(self) -> Window"""
8790 return _core_.Validator_GetWindow(*args, **kwargs)
8791
8792 def SetWindow(*args, **kwargs):
8793 """SetWindow(self, Window window)"""
8794 return _core_.Validator_SetWindow(*args, **kwargs)
8795
8796 def IsSilent(*args, **kwargs):
8797 """IsSilent() -> bool"""
8798 return _core_.Validator_IsSilent(*args, **kwargs)
8799
8800 IsSilent = staticmethod(IsSilent)
8801 def SetBellOnError(*args, **kwargs):
8802 """SetBellOnError(int doIt=True)"""
8803 return _core_.Validator_SetBellOnError(*args, **kwargs)
8804
8805 SetBellOnError = staticmethod(SetBellOnError)
8806
8807 class ValidatorPtr(Validator):
8808 def __init__(self, this):
8809 self.this = this
8810 if not hasattr(self,"thisown"): self.thisown = 0
8811 self.__class__ = Validator
8812 _core_.Validator_swigregister(ValidatorPtr)
8813
8814 def Validator_IsSilent(*args, **kwargs):
8815 """Validator_IsSilent() -> bool"""
8816 return _core_.Validator_IsSilent(*args, **kwargs)
8817
8818 def Validator_SetBellOnError(*args, **kwargs):
8819 """Validator_SetBellOnError(int doIt=True)"""
8820 return _core_.Validator_SetBellOnError(*args, **kwargs)
8821
8822 class PyValidator(Validator):
8823 """Proxy of C++ PyValidator class"""
8824 def __repr__(self):
8825 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8826 def __init__(self, *args, **kwargs):
8827 """__init__(self) -> PyValidator"""
8828 newobj = _core_.new_PyValidator(*args, **kwargs)
8829 self.this = newobj.this
8830 self.thisown = 1
8831 del newobj.thisown
8832
8833 self._setCallbackInfo(self, PyValidator, 1)
8834 self._setOORInfo(self)
8835
8836 def _setCallbackInfo(*args, **kwargs):
8837 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8838 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8839
8840
8841 class PyValidatorPtr(PyValidator):
8842 def __init__(self, this):
8843 self.this = this
8844 if not hasattr(self,"thisown"): self.thisown = 0
8845 self.__class__ = PyValidator
8846 _core_.PyValidator_swigregister(PyValidatorPtr)
8847
8848 #---------------------------------------------------------------------------
8849
8850 class Menu(EvtHandler):
8851 """Proxy of C++ Menu class"""
8852 def __repr__(self):
8853 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8854 def __init__(self, *args, **kwargs):
8855 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8856 newobj = _core_.new_Menu(*args, **kwargs)
8857 self.this = newobj.this
8858 self.thisown = 1
8859 del newobj.thisown
8860 self._setOORInfo(self)
8861
8862 def Append(*args, **kwargs):
8863 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8864 return _core_.Menu_Append(*args, **kwargs)
8865
8866 def AppendSeparator(*args, **kwargs):
8867 """AppendSeparator(self) -> MenuItem"""
8868 return _core_.Menu_AppendSeparator(*args, **kwargs)
8869
8870 def AppendCheckItem(*args, **kwargs):
8871 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8872 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8873
8874 def AppendRadioItem(*args, **kwargs):
8875 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8876 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8877
8878 def AppendMenu(*args, **kwargs):
8879 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8880 return _core_.Menu_AppendMenu(*args, **kwargs)
8881
8882 def AppendItem(*args, **kwargs):
8883 """AppendItem(self, MenuItem item) -> MenuItem"""
8884 return _core_.Menu_AppendItem(*args, **kwargs)
8885
8886 def Break(*args, **kwargs):
8887 """Break(self)"""
8888 return _core_.Menu_Break(*args, **kwargs)
8889
8890 def InsertItem(*args, **kwargs):
8891 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8892 return _core_.Menu_InsertItem(*args, **kwargs)
8893
8894 def Insert(*args, **kwargs):
8895 """
8896 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8897 int kind=ITEM_NORMAL) -> MenuItem
8898 """
8899 return _core_.Menu_Insert(*args, **kwargs)
8900
8901 def InsertSeparator(*args, **kwargs):
8902 """InsertSeparator(self, size_t pos) -> MenuItem"""
8903 return _core_.Menu_InsertSeparator(*args, **kwargs)
8904
8905 def InsertCheckItem(*args, **kwargs):
8906 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8907 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8908
8909 def InsertRadioItem(*args, **kwargs):
8910 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8911 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8912
8913 def InsertMenu(*args, **kwargs):
8914 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8915 return _core_.Menu_InsertMenu(*args, **kwargs)
8916
8917 def PrependItem(*args, **kwargs):
8918 """PrependItem(self, MenuItem item) -> MenuItem"""
8919 return _core_.Menu_PrependItem(*args, **kwargs)
8920
8921 def Prepend(*args, **kwargs):
8922 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8923 return _core_.Menu_Prepend(*args, **kwargs)
8924
8925 def PrependSeparator(*args, **kwargs):
8926 """PrependSeparator(self) -> MenuItem"""
8927 return _core_.Menu_PrependSeparator(*args, **kwargs)
8928
8929 def PrependCheckItem(*args, **kwargs):
8930 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8931 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8932
8933 def PrependRadioItem(*args, **kwargs):
8934 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8935 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8936
8937 def PrependMenu(*args, **kwargs):
8938 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8939 return _core_.Menu_PrependMenu(*args, **kwargs)
8940
8941 def Remove(*args, **kwargs):
8942 """Remove(self, int id) -> MenuItem"""
8943 return _core_.Menu_Remove(*args, **kwargs)
8944
8945 def RemoveItem(*args, **kwargs):
8946 """RemoveItem(self, MenuItem item) -> MenuItem"""
8947 return _core_.Menu_RemoveItem(*args, **kwargs)
8948
8949 def Delete(*args, **kwargs):
8950 """Delete(self, int id) -> bool"""
8951 return _core_.Menu_Delete(*args, **kwargs)
8952
8953 def DeleteItem(*args, **kwargs):
8954 """DeleteItem(self, MenuItem item) -> bool"""
8955 return _core_.Menu_DeleteItem(*args, **kwargs)
8956
8957 def Destroy(*args, **kwargs):
8958 """
8959 Destroy(self)
8960
8961 Deletes the C++ object this Python object is a proxy for.
8962 """
8963 return _core_.Menu_Destroy(*args, **kwargs)
8964
8965 def DestroyId(*args, **kwargs):
8966 """
8967 DestroyId(self, int id) -> bool
8968
8969 Deletes the C++ object this Python object is a proxy for.
8970 """
8971 return _core_.Menu_DestroyId(*args, **kwargs)
8972
8973 def DestroyItem(*args, **kwargs):
8974 """
8975 DestroyItem(self, MenuItem item) -> bool
8976
8977 Deletes the C++ object this Python object is a proxy for.
8978 """
8979 return _core_.Menu_DestroyItem(*args, **kwargs)
8980
8981 def GetMenuItemCount(*args, **kwargs):
8982 """GetMenuItemCount(self) -> size_t"""
8983 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8984
8985 def GetMenuItems(*args, **kwargs):
8986 """GetMenuItems(self) -> PyObject"""
8987 return _core_.Menu_GetMenuItems(*args, **kwargs)
8988
8989 def FindItem(*args, **kwargs):
8990 """FindItem(self, String item) -> int"""
8991 return _core_.Menu_FindItem(*args, **kwargs)
8992
8993 def FindItemById(*args, **kwargs):
8994 """FindItemById(self, int id) -> MenuItem"""
8995 return _core_.Menu_FindItemById(*args, **kwargs)
8996
8997 def FindItemByPosition(*args, **kwargs):
8998 """FindItemByPosition(self, size_t position) -> MenuItem"""
8999 return _core_.Menu_FindItemByPosition(*args, **kwargs)
9000
9001 def Enable(*args, **kwargs):
9002 """Enable(self, int id, bool enable)"""
9003 return _core_.Menu_Enable(*args, **kwargs)
9004
9005 def IsEnabled(*args, **kwargs):
9006 """IsEnabled(self, int id) -> bool"""
9007 return _core_.Menu_IsEnabled(*args, **kwargs)
9008
9009 def Check(*args, **kwargs):
9010 """Check(self, int id, bool check)"""
9011 return _core_.Menu_Check(*args, **kwargs)
9012
9013 def IsChecked(*args, **kwargs):
9014 """IsChecked(self, int id) -> bool"""
9015 return _core_.Menu_IsChecked(*args, **kwargs)
9016
9017 def SetLabel(*args, **kwargs):
9018 """SetLabel(self, int id, String label)"""
9019 return _core_.Menu_SetLabel(*args, **kwargs)
9020
9021 def GetLabel(*args, **kwargs):
9022 """GetLabel(self, int id) -> String"""
9023 return _core_.Menu_GetLabel(*args, **kwargs)
9024
9025 def SetHelpString(*args, **kwargs):
9026 """SetHelpString(self, int id, String helpString)"""
9027 return _core_.Menu_SetHelpString(*args, **kwargs)
9028
9029 def GetHelpString(*args, **kwargs):
9030 """GetHelpString(self, int id) -> String"""
9031 return _core_.Menu_GetHelpString(*args, **kwargs)
9032
9033 def SetTitle(*args, **kwargs):
9034 """SetTitle(self, String title)"""
9035 return _core_.Menu_SetTitle(*args, **kwargs)
9036
9037 def GetTitle(*args, **kwargs):
9038 """GetTitle(self) -> String"""
9039 return _core_.Menu_GetTitle(*args, **kwargs)
9040
9041 def SetEventHandler(*args, **kwargs):
9042 """SetEventHandler(self, EvtHandler handler)"""
9043 return _core_.Menu_SetEventHandler(*args, **kwargs)
9044
9045 def GetEventHandler(*args, **kwargs):
9046 """GetEventHandler(self) -> EvtHandler"""
9047 return _core_.Menu_GetEventHandler(*args, **kwargs)
9048
9049 def SetInvokingWindow(*args, **kwargs):
9050 """SetInvokingWindow(self, Window win)"""
9051 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
9052
9053 def GetInvokingWindow(*args, **kwargs):
9054 """GetInvokingWindow(self) -> Window"""
9055 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
9056
9057 def GetStyle(*args, **kwargs):
9058 """GetStyle(self) -> long"""
9059 return _core_.Menu_GetStyle(*args, **kwargs)
9060
9061 def UpdateUI(*args, **kwargs):
9062 """UpdateUI(self, EvtHandler source=None)"""
9063 return _core_.Menu_UpdateUI(*args, **kwargs)
9064
9065 def GetMenuBar(*args, **kwargs):
9066 """GetMenuBar(self) -> MenuBar"""
9067 return _core_.Menu_GetMenuBar(*args, **kwargs)
9068
9069 def Attach(*args, **kwargs):
9070 """Attach(self, wxMenuBarBase menubar)"""
9071 return _core_.Menu_Attach(*args, **kwargs)
9072
9073 def Detach(*args, **kwargs):
9074 """Detach(self)"""
9075 return _core_.Menu_Detach(*args, **kwargs)
9076
9077 def IsAttached(*args, **kwargs):
9078 """IsAttached(self) -> bool"""
9079 return _core_.Menu_IsAttached(*args, **kwargs)
9080
9081 def SetParent(*args, **kwargs):
9082 """SetParent(self, Menu parent)"""
9083 return _core_.Menu_SetParent(*args, **kwargs)
9084
9085 def GetParent(*args, **kwargs):
9086 """GetParent(self) -> Menu"""
9087 return _core_.Menu_GetParent(*args, **kwargs)
9088
9089
9090 class MenuPtr(Menu):
9091 def __init__(self, this):
9092 self.this = this
9093 if not hasattr(self,"thisown"): self.thisown = 0
9094 self.__class__ = Menu
9095 _core_.Menu_swigregister(MenuPtr)
9096 DefaultValidator = cvar.DefaultValidator
9097
9098 #---------------------------------------------------------------------------
9099
9100 class MenuBar(Window):
9101 """Proxy of C++ MenuBar class"""
9102 def __repr__(self):
9103 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9104 def __init__(self, *args, **kwargs):
9105 """__init__(self, long style=0) -> MenuBar"""
9106 newobj = _core_.new_MenuBar(*args, **kwargs)
9107 self.this = newobj.this
9108 self.thisown = 1
9109 del newobj.thisown
9110 self._setOORInfo(self)
9111
9112 def Append(*args, **kwargs):
9113 """Append(self, Menu menu, String title) -> bool"""
9114 return _core_.MenuBar_Append(*args, **kwargs)
9115
9116 def Insert(*args, **kwargs):
9117 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
9118 return _core_.MenuBar_Insert(*args, **kwargs)
9119
9120 def GetMenuCount(*args, **kwargs):
9121 """GetMenuCount(self) -> size_t"""
9122 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
9123
9124 def GetMenu(*args, **kwargs):
9125 """GetMenu(self, size_t pos) -> Menu"""
9126 return _core_.MenuBar_GetMenu(*args, **kwargs)
9127
9128 def Replace(*args, **kwargs):
9129 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
9130 return _core_.MenuBar_Replace(*args, **kwargs)
9131
9132 def Remove(*args, **kwargs):
9133 """Remove(self, size_t pos) -> Menu"""
9134 return _core_.MenuBar_Remove(*args, **kwargs)
9135
9136 def EnableTop(*args, **kwargs):
9137 """EnableTop(self, size_t pos, bool enable)"""
9138 return _core_.MenuBar_EnableTop(*args, **kwargs)
9139
9140 def IsEnabledTop(*args, **kwargs):
9141 """IsEnabledTop(self, size_t pos) -> bool"""
9142 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
9143
9144 def SetLabelTop(*args, **kwargs):
9145 """SetLabelTop(self, size_t pos, String label)"""
9146 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
9147
9148 def GetLabelTop(*args, **kwargs):
9149 """GetLabelTop(self, size_t pos) -> String"""
9150 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
9151
9152 def FindMenuItem(*args, **kwargs):
9153 """FindMenuItem(self, String menu, String item) -> int"""
9154 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
9155
9156 def FindItemById(*args, **kwargs):
9157 """FindItemById(self, int id) -> MenuItem"""
9158 return _core_.MenuBar_FindItemById(*args, **kwargs)
9159
9160 def FindMenu(*args, **kwargs):
9161 """FindMenu(self, String title) -> int"""
9162 return _core_.MenuBar_FindMenu(*args, **kwargs)
9163
9164 def Enable(*args, **kwargs):
9165 """Enable(self, int id, bool enable)"""
9166 return _core_.MenuBar_Enable(*args, **kwargs)
9167
9168 def Check(*args, **kwargs):
9169 """Check(self, int id, bool check)"""
9170 return _core_.MenuBar_Check(*args, **kwargs)
9171
9172 def IsChecked(*args, **kwargs):
9173 """IsChecked(self, int id) -> bool"""
9174 return _core_.MenuBar_IsChecked(*args, **kwargs)
9175
9176 def IsEnabled(*args, **kwargs):
9177 """IsEnabled(self, int id) -> bool"""
9178 return _core_.MenuBar_IsEnabled(*args, **kwargs)
9179
9180 def SetLabel(*args, **kwargs):
9181 """SetLabel(self, int id, String label)"""
9182 return _core_.MenuBar_SetLabel(*args, **kwargs)
9183
9184 def GetLabel(*args, **kwargs):
9185 """GetLabel(self, int id) -> String"""
9186 return _core_.MenuBar_GetLabel(*args, **kwargs)
9187
9188 def SetHelpString(*args, **kwargs):
9189 """SetHelpString(self, int id, String helpString)"""
9190 return _core_.MenuBar_SetHelpString(*args, **kwargs)
9191
9192 def GetHelpString(*args, **kwargs):
9193 """GetHelpString(self, int id) -> String"""
9194 return _core_.MenuBar_GetHelpString(*args, **kwargs)
9195
9196 def GetFrame(*args, **kwargs):
9197 """GetFrame(self) -> wxFrame"""
9198 return _core_.MenuBar_GetFrame(*args, **kwargs)
9199
9200 def IsAttached(*args, **kwargs):
9201 """IsAttached(self) -> bool"""
9202 return _core_.MenuBar_IsAttached(*args, **kwargs)
9203
9204 def Attach(*args, **kwargs):
9205 """Attach(self, wxFrame frame)"""
9206 return _core_.MenuBar_Attach(*args, **kwargs)
9207
9208 def Detach(*args, **kwargs):
9209 """Detach(self)"""
9210 return _core_.MenuBar_Detach(*args, **kwargs)
9211
9212
9213 class MenuBarPtr(MenuBar):
9214 def __init__(self, this):
9215 self.this = this
9216 if not hasattr(self,"thisown"): self.thisown = 0
9217 self.__class__ = MenuBar
9218 _core_.MenuBar_swigregister(MenuBarPtr)
9219
9220 #---------------------------------------------------------------------------
9221
9222 class MenuItem(Object):
9223 """Proxy of C++ MenuItem class"""
9224 def __repr__(self):
9225 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9226 def __init__(self, *args, **kwargs):
9227 """
9228 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
9229 String help=EmptyString, int kind=ITEM_NORMAL,
9230 Menu subMenu=None) -> MenuItem
9231 """
9232 newobj = _core_.new_MenuItem(*args, **kwargs)
9233 self.this = newobj.this
9234 self.thisown = 1
9235 del newobj.thisown
9236 def GetMenu(*args, **kwargs):
9237 """GetMenu(self) -> Menu"""
9238 return _core_.MenuItem_GetMenu(*args, **kwargs)
9239
9240 def SetMenu(*args, **kwargs):
9241 """SetMenu(self, Menu menu)"""
9242 return _core_.MenuItem_SetMenu(*args, **kwargs)
9243
9244 def SetId(*args, **kwargs):
9245 """SetId(self, int id)"""
9246 return _core_.MenuItem_SetId(*args, **kwargs)
9247
9248 def GetId(*args, **kwargs):
9249 """GetId(self) -> int"""
9250 return _core_.MenuItem_GetId(*args, **kwargs)
9251
9252 def IsSeparator(*args, **kwargs):
9253 """IsSeparator(self) -> bool"""
9254 return _core_.MenuItem_IsSeparator(*args, **kwargs)
9255
9256 def SetText(*args, **kwargs):
9257 """SetText(self, String str)"""
9258 return _core_.MenuItem_SetText(*args, **kwargs)
9259
9260 def GetLabel(*args, **kwargs):
9261 """GetLabel(self) -> String"""
9262 return _core_.MenuItem_GetLabel(*args, **kwargs)
9263
9264 def GetText(*args, **kwargs):
9265 """GetText(self) -> String"""
9266 return _core_.MenuItem_GetText(*args, **kwargs)
9267
9268 def GetLabelFromText(*args, **kwargs):
9269 """GetLabelFromText(String text) -> String"""
9270 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
9271
9272 GetLabelFromText = staticmethod(GetLabelFromText)
9273 def GetKind(*args, **kwargs):
9274 """GetKind(self) -> int"""
9275 return _core_.MenuItem_GetKind(*args, **kwargs)
9276
9277 def SetKind(*args, **kwargs):
9278 """SetKind(self, int kind)"""
9279 return _core_.MenuItem_SetKind(*args, **kwargs)
9280
9281 def SetCheckable(*args, **kwargs):
9282 """SetCheckable(self, bool checkable)"""
9283 return _core_.MenuItem_SetCheckable(*args, **kwargs)
9284
9285 def IsCheckable(*args, **kwargs):
9286 """IsCheckable(self) -> bool"""
9287 return _core_.MenuItem_IsCheckable(*args, **kwargs)
9288
9289 def IsSubMenu(*args, **kwargs):
9290 """IsSubMenu(self) -> bool"""
9291 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
9292
9293 def SetSubMenu(*args, **kwargs):
9294 """SetSubMenu(self, Menu menu)"""
9295 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
9296
9297 def GetSubMenu(*args, **kwargs):
9298 """GetSubMenu(self) -> Menu"""
9299 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
9300
9301 def Enable(*args, **kwargs):
9302 """Enable(self, bool enable=True)"""
9303 return _core_.MenuItem_Enable(*args, **kwargs)
9304
9305 def IsEnabled(*args, **kwargs):
9306 """IsEnabled(self) -> bool"""
9307 return _core_.MenuItem_IsEnabled(*args, **kwargs)
9308
9309 def Check(*args, **kwargs):
9310 """Check(self, bool check=True)"""
9311 return _core_.MenuItem_Check(*args, **kwargs)
9312
9313 def IsChecked(*args, **kwargs):
9314 """IsChecked(self) -> bool"""
9315 return _core_.MenuItem_IsChecked(*args, **kwargs)
9316
9317 def Toggle(*args, **kwargs):
9318 """Toggle(self)"""
9319 return _core_.MenuItem_Toggle(*args, **kwargs)
9320
9321 def SetHelp(*args, **kwargs):
9322 """SetHelp(self, String str)"""
9323 return _core_.MenuItem_SetHelp(*args, **kwargs)
9324
9325 def GetHelp(*args, **kwargs):
9326 """GetHelp(self) -> String"""
9327 return _core_.MenuItem_GetHelp(*args, **kwargs)
9328
9329 def GetAccel(*args, **kwargs):
9330 """GetAccel(self) -> AcceleratorEntry"""
9331 return _core_.MenuItem_GetAccel(*args, **kwargs)
9332
9333 def SetAccel(*args, **kwargs):
9334 """SetAccel(self, AcceleratorEntry accel)"""
9335 return _core_.MenuItem_SetAccel(*args, **kwargs)
9336
9337 def SetFont(*args, **kwargs):
9338 """SetFont(self, Font font)"""
9339 return _core_.MenuItem_SetFont(*args, **kwargs)
9340
9341 def GetFont(*args, **kwargs):
9342 """GetFont(self) -> Font"""
9343 return _core_.MenuItem_GetFont(*args, **kwargs)
9344
9345 def SetTextColour(*args, **kwargs):
9346 """SetTextColour(self, Colour colText)"""
9347 return _core_.MenuItem_SetTextColour(*args, **kwargs)
9348
9349 def GetTextColour(*args, **kwargs):
9350 """GetTextColour(self) -> Colour"""
9351 return _core_.MenuItem_GetTextColour(*args, **kwargs)
9352
9353 def SetBackgroundColour(*args, **kwargs):
9354 """SetBackgroundColour(self, Colour colBack)"""
9355 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
9356
9357 def GetBackgroundColour(*args, **kwargs):
9358 """GetBackgroundColour(self) -> Colour"""
9359 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
9360
9361 def SetBitmaps(*args, **kwargs):
9362 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
9363 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
9364
9365 def SetDisabledBitmap(*args, **kwargs):
9366 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
9367 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
9368
9369 def GetDisabledBitmap(*args, **kwargs):
9370 """GetDisabledBitmap(self) -> Bitmap"""
9371 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
9372
9373 def SetMarginWidth(*args, **kwargs):
9374 """SetMarginWidth(self, int nWidth)"""
9375 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
9376
9377 def GetMarginWidth(*args, **kwargs):
9378 """GetMarginWidth(self) -> int"""
9379 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
9380
9381 def GetDefaultMarginWidth(*args, **kwargs):
9382 """GetDefaultMarginWidth() -> int"""
9383 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
9384
9385 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
9386 def IsOwnerDrawn(*args, **kwargs):
9387 """IsOwnerDrawn(self) -> bool"""
9388 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
9389
9390 def SetOwnerDrawn(*args, **kwargs):
9391 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
9392 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
9393
9394 def ResetOwnerDrawn(*args, **kwargs):
9395 """ResetOwnerDrawn(self)"""
9396 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
9397
9398 def SetBitmap(*args, **kwargs):
9399 """SetBitmap(self, Bitmap bitmap)"""
9400 return _core_.MenuItem_SetBitmap(*args, **kwargs)
9401
9402 def GetBitmap(*args, **kwargs):
9403 """GetBitmap(self) -> Bitmap"""
9404 return _core_.MenuItem_GetBitmap(*args, **kwargs)
9405
9406
9407 class MenuItemPtr(MenuItem):
9408 def __init__(self, this):
9409 self.this = this
9410 if not hasattr(self,"thisown"): self.thisown = 0
9411 self.__class__ = MenuItem
9412 _core_.MenuItem_swigregister(MenuItemPtr)
9413
9414 def MenuItem_GetLabelFromText(*args, **kwargs):
9415 """MenuItem_GetLabelFromText(String text) -> String"""
9416 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
9417
9418 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
9419 """MenuItem_GetDefaultMarginWidth() -> int"""
9420 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
9421
9422 #---------------------------------------------------------------------------
9423
9424 class Control(Window):
9425 """
9426 This is the base class for a control or 'widget'.
9427
9428 A control is generally a small window which processes user input
9429 and/or displays one or more item of data.
9430 """
9431 def __repr__(self):
9432 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9433 def __init__(self, *args, **kwargs):
9434 """
9435 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
9436 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
9437 String name=ControlNameStr) -> Control
9438
9439 Create a Control. Normally you should only call this from a subclass'
9440 __init__ as a plain old wx.Control is not very useful.
9441 """
9442 newobj = _core_.new_Control(*args, **kwargs)
9443 self.this = newobj.this
9444 self.thisown = 1
9445 del newobj.thisown
9446 self._setOORInfo(self)
9447
9448 def Create(*args, **kwargs):
9449 """
9450 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
9451 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
9452 String name=ControlNameStr) -> bool
9453
9454 Do the 2nd phase and create the GUI control.
9455 """
9456 return _core_.Control_Create(*args, **kwargs)
9457
9458 def Command(*args, **kwargs):
9459 """
9460 Command(self, CommandEvent event)
9461
9462 Simulates the effect of the user issuing a command to the item.
9463
9464 :see: `wx.CommandEvent`
9465
9466 """
9467 return _core_.Control_Command(*args, **kwargs)
9468
9469 def GetLabel(*args, **kwargs):
9470 """
9471 GetLabel(self) -> String
9472
9473 Return a control's text.
9474 """
9475 return _core_.Control_GetLabel(*args, **kwargs)
9476
9477 def SetLabel(*args, **kwargs):
9478 """
9479 SetLabel(self, String label)
9480
9481 Sets the item's text.
9482 """
9483 return _core_.Control_SetLabel(*args, **kwargs)
9484
9485 def GetClassDefaultAttributes(*args, **kwargs):
9486 """
9487 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9488
9489 Get the default attributes for this class. This is useful if you want
9490 to use the same font or colour in your own control as in a standard
9491 control -- which is a much better idea than hard coding specific
9492 colours or fonts which might look completely out of place on the
9493 user's system, especially if it uses themes.
9494
9495 The variant parameter is only relevant under Mac currently and is
9496 ignore under other platforms. Under Mac, it will change the size of
9497 the returned font. See `wx.Window.SetWindowVariant` for more about
9498 this.
9499 """
9500 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
9501
9502 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
9503
9504 class ControlPtr(Control):
9505 def __init__(self, this):
9506 self.this = this
9507 if not hasattr(self,"thisown"): self.thisown = 0
9508 self.__class__ = Control
9509 _core_.Control_swigregister(ControlPtr)
9510 ControlNameStr = cvar.ControlNameStr
9511
9512 def PreControl(*args, **kwargs):
9513 """
9514 PreControl() -> Control
9515
9516 Precreate a Control control for 2-phase creation
9517 """
9518 val = _core_.new_PreControl(*args, **kwargs)
9519 val.thisown = 1
9520 return val
9521
9522 def Control_GetClassDefaultAttributes(*args, **kwargs):
9523 """
9524 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9525
9526 Get the default attributes for this class. This is useful if you want
9527 to use the same font or colour in your own control as in a standard
9528 control -- which is a much better idea than hard coding specific
9529 colours or fonts which might look completely out of place on the
9530 user's system, especially if it uses themes.
9531
9532 The variant parameter is only relevant under Mac currently and is
9533 ignore under other platforms. Under Mac, it will change the size of
9534 the returned font. See `wx.Window.SetWindowVariant` for more about
9535 this.
9536 """
9537 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
9538
9539 #---------------------------------------------------------------------------
9540
9541 class ItemContainer(object):
9542 """
9543 The wx.ItemContainer class defines an interface which is implemented
9544 by all controls which have string subitems, each of which may be
9545 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
9546 as `wx.ComboBox` which implements an extended interface deriving from
9547 this one.
9548
9549 It defines the methods for accessing the control's items and although
9550 each of the derived classes implements them differently, they still
9551 all conform to the same interface.
9552
9553 The items in a wx.ItemContainer have (non empty) string labels and,
9554 optionally, client data associated with them.
9555
9556 """
9557 def __init__(self): raise RuntimeError, "No constructor defined"
9558 def __repr__(self):
9559 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9560 def Append(*args, **kwargs):
9561 """
9562 Append(self, String item, PyObject clientData=None) -> int
9563
9564 Adds the item to the control, associating the given data with the item
9565 if not None. The return value is the index of the newly added item
9566 which may be different from the last one if the control is sorted (e.g.
9567 has wx.LB_SORT or wx.CB_SORT style).
9568 """
9569 return _core_.ItemContainer_Append(*args, **kwargs)
9570
9571 def AppendItems(*args, **kwargs):
9572 """
9573 AppendItems(self, List strings)
9574
9575 Apend several items at once to the control. Notice that calling this
9576 method may be much faster than appending the items one by one if you
9577 need to add a lot of items.
9578 """
9579 return _core_.ItemContainer_AppendItems(*args, **kwargs)
9580
9581 def Insert(*args, **kwargs):
9582 """
9583 Insert(self, String item, int pos, PyObject clientData=None) -> int
9584
9585 Insert an item into the control before the item at the ``pos`` index,
9586 optionally associating some data object with the item.
9587 """
9588 return _core_.ItemContainer_Insert(*args, **kwargs)
9589
9590 def Clear(*args, **kwargs):
9591 """
9592 Clear(self)
9593
9594 Removes all items from the control.
9595 """
9596 return _core_.ItemContainer_Clear(*args, **kwargs)
9597
9598 def Delete(*args, **kwargs):
9599 """
9600 Delete(self, int n)
9601
9602 Deletes the item at the zero-based index 'n' from the control. Note
9603 that it is an error (signalled by a `wx.PyAssertionError` exception if
9604 enabled) to remove an item with the index negative or greater or equal
9605 than the number of items in the control.
9606 """
9607 return _core_.ItemContainer_Delete(*args, **kwargs)
9608
9609 def GetClientData(*args, **kwargs):
9610 """
9611 GetClientData(self, int n) -> PyObject
9612
9613 Returns the client data associated with the given item, (if any.)
9614 """
9615 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9616
9617 def SetClientData(*args, **kwargs):
9618 """
9619 SetClientData(self, int n, PyObject clientData)
9620
9621 Associate the given client data with the item at position n.
9622 """
9623 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9624
9625 def GetCount(*args, **kwargs):
9626 """
9627 GetCount(self) -> int
9628
9629 Returns the number of items in the control.
9630 """
9631 return _core_.ItemContainer_GetCount(*args, **kwargs)
9632
9633 def IsEmpty(*args, **kwargs):
9634 """
9635 IsEmpty(self) -> bool
9636
9637 Returns True if the control is empty or False if it has some items.
9638 """
9639 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
9640
9641 def GetString(*args, **kwargs):
9642 """
9643 GetString(self, int n) -> String
9644
9645 Returns the label of the item with the given index.
9646 """
9647 return _core_.ItemContainer_GetString(*args, **kwargs)
9648
9649 def GetStrings(*args, **kwargs):
9650 """GetStrings(self) -> wxArrayString"""
9651 return _core_.ItemContainer_GetStrings(*args, **kwargs)
9652
9653 def SetString(*args, **kwargs):
9654 """
9655 SetString(self, int n, String s)
9656
9657 Sets the label for the given item.
9658 """
9659 return _core_.ItemContainer_SetString(*args, **kwargs)
9660
9661 def FindString(*args, **kwargs):
9662 """
9663 FindString(self, String s) -> int
9664
9665 Finds an item whose label matches the given string. Returns the
9666 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9667 found.
9668 """
9669 return _core_.ItemContainer_FindString(*args, **kwargs)
9670
9671 def SetSelection(*args, **kwargs):
9672 """
9673 SetSelection(self, int n)
9674
9675 Sets the item at index 'n' to be the selected item.
9676 """
9677 return _core_.ItemContainer_SetSelection(*args, **kwargs)
9678
9679 def GetSelection(*args, **kwargs):
9680 """
9681 GetSelection(self) -> int
9682
9683 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9684 is selected.
9685 """
9686 return _core_.ItemContainer_GetSelection(*args, **kwargs)
9687
9688 def SetStringSelection(*args, **kwargs):
9689 """SetStringSelection(self, String s) -> bool"""
9690 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9691
9692 def GetStringSelection(*args, **kwargs):
9693 """
9694 GetStringSelection(self) -> String
9695
9696 Returns the label of the selected item or an empty string if no item
9697 is selected.
9698 """
9699 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
9700
9701 def Select(*args, **kwargs):
9702 """
9703 Select(self, int n)
9704
9705 This is the same as `SetSelection` and exists only because it is
9706 slightly more natural for controls which support multiple selection.
9707 """
9708 return _core_.ItemContainer_Select(*args, **kwargs)
9709
9710
9711 class ItemContainerPtr(ItemContainer):
9712 def __init__(self, this):
9713 self.this = this
9714 if not hasattr(self,"thisown"): self.thisown = 0
9715 self.__class__ = ItemContainer
9716 _core_.ItemContainer_swigregister(ItemContainerPtr)
9717
9718 #---------------------------------------------------------------------------
9719
9720 class ControlWithItems(Control,ItemContainer):
9721 """
9722 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9723 wx.Control class, and is used for the base class of various controls
9724 that have items.
9725 """
9726 def __init__(self): raise RuntimeError, "No constructor defined"
9727 def __repr__(self):
9728 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9729
9730 class ControlWithItemsPtr(ControlWithItems):
9731 def __init__(self, this):
9732 self.this = this
9733 if not hasattr(self,"thisown"): self.thisown = 0
9734 self.__class__ = ControlWithItems
9735 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
9736
9737 #---------------------------------------------------------------------------
9738
9739 class SizerItem(Object):
9740 """
9741 The wx.SizerItem class is used to track the position, size and other
9742 attributes of each item managed by a `wx.Sizer`. In normal usage user
9743 code should never need to deal directly with a wx.SizerItem, but
9744 custom classes derived from `wx.PySizer` will probably need to use the
9745 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9746
9747 :see: `wx.Sizer`, `wx.GBSizerItem`
9748 """
9749 def __repr__(self):
9750 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9751 def __init__(self, *args, **kwargs):
9752 """
9753 __init__(self) -> SizerItem
9754
9755 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9756 size will need to be set before this item can be used in a Sizer.
9757
9758 You will probably never need to create a wx.SizerItem directly as they
9759 are created automatically when the sizer's Add, Insert or Prepend
9760 methods are called.
9761
9762 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9763 """
9764 newobj = _core_.new_SizerItem(*args, **kwargs)
9765 self.this = newobj.this
9766 self.thisown = 1
9767 del newobj.thisown
9768 def DeleteWindows(*args, **kwargs):
9769 """
9770 DeleteWindows(self)
9771
9772 Destroy the window or the windows in a subsizer, depending on the type
9773 of item.
9774 """
9775 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
9776
9777 def DetachSizer(*args, **kwargs):
9778 """
9779 DetachSizer(self)
9780
9781 Enable deleting the SizerItem without destroying the contained sizer.
9782 """
9783 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9784
9785 def GetSize(*args, **kwargs):
9786 """
9787 GetSize(self) -> Size
9788
9789 Get the current size of the item, as set in the last Layout.
9790 """
9791 return _core_.SizerItem_GetSize(*args, **kwargs)
9792
9793 def CalcMin(*args, **kwargs):
9794 """
9795 CalcMin(self) -> Size
9796
9797 Calculates the minimum desired size for the item, including any space
9798 needed by borders.
9799 """
9800 return _core_.SizerItem_CalcMin(*args, **kwargs)
9801
9802 def SetDimension(*args, **kwargs):
9803 """
9804 SetDimension(self, Point pos, Size size)
9805
9806 Set the position and size of the space allocated for this item by the
9807 sizer, and adjust the position and size of the item (window or
9808 subsizer) to be within that space taking alignment and borders into
9809 account.
9810 """
9811 return _core_.SizerItem_SetDimension(*args, **kwargs)
9812
9813 def GetMinSize(*args, **kwargs):
9814 """
9815 GetMinSize(self) -> Size
9816
9817 Get the minimum size needed for the item.
9818 """
9819 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9820
9821 def GetMinSizeWithBorder(*args, **kwargs):
9822 """
9823 GetMinSizeWithBorder(self) -> Size
9824
9825 Get the minimum size needed for the item with space for the borders
9826 added, if needed.
9827 """
9828 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9829
9830 def SetInitSize(*args, **kwargs):
9831 """SetInitSize(self, int x, int y)"""
9832 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9833
9834 def SetRatioWH(*args, **kwargs):
9835 """
9836 SetRatioWH(self, int width, int height)
9837
9838 Set the ratio item attribute.
9839 """
9840 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9841
9842 def SetRatioSize(*args, **kwargs):
9843 """
9844 SetRatioSize(self, Size size)
9845
9846 Set the ratio item attribute.
9847 """
9848 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9849
9850 def SetRatio(*args, **kwargs):
9851 """
9852 SetRatio(self, float ratio)
9853
9854 Set the ratio item attribute.
9855 """
9856 return _core_.SizerItem_SetRatio(*args, **kwargs)
9857
9858 def GetRatio(*args, **kwargs):
9859 """
9860 GetRatio(self) -> float
9861
9862 Set the ratio item attribute.
9863 """
9864 return _core_.SizerItem_GetRatio(*args, **kwargs)
9865
9866 def GetRect(*args, **kwargs):
9867 """
9868 GetRect(self) -> Rect
9869
9870 Returns the rectangle that the sizer item should occupy
9871 """
9872 return _core_.SizerItem_GetRect(*args, **kwargs)
9873
9874 def IsWindow(*args, **kwargs):
9875 """
9876 IsWindow(self) -> bool
9877
9878 Is this sizer item a window?
9879 """
9880 return _core_.SizerItem_IsWindow(*args, **kwargs)
9881
9882 def IsSizer(*args, **kwargs):
9883 """
9884 IsSizer(self) -> bool
9885
9886 Is this sizer item a subsizer?
9887 """
9888 return _core_.SizerItem_IsSizer(*args, **kwargs)
9889
9890 def IsSpacer(*args, **kwargs):
9891 """
9892 IsSpacer(self) -> bool
9893
9894 Is this sizer item a spacer?
9895 """
9896 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9897
9898 def SetProportion(*args, **kwargs):
9899 """
9900 SetProportion(self, int proportion)
9901
9902 Set the proportion value for this item.
9903 """
9904 return _core_.SizerItem_SetProportion(*args, **kwargs)
9905
9906 def GetProportion(*args, **kwargs):
9907 """
9908 GetProportion(self) -> int
9909
9910 Get the proportion value for this item.
9911 """
9912 return _core_.SizerItem_GetProportion(*args, **kwargs)
9913
9914 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9915 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9916 def SetFlag(*args, **kwargs):
9917 """
9918 SetFlag(self, int flag)
9919
9920 Set the flag value for this item.
9921 """
9922 return _core_.SizerItem_SetFlag(*args, **kwargs)
9923
9924 def GetFlag(*args, **kwargs):
9925 """
9926 GetFlag(self) -> int
9927
9928 Get the flag value for this item.
9929 """
9930 return _core_.SizerItem_GetFlag(*args, **kwargs)
9931
9932 def SetBorder(*args, **kwargs):
9933 """
9934 SetBorder(self, int border)
9935
9936 Set the border value for this item.
9937 """
9938 return _core_.SizerItem_SetBorder(*args, **kwargs)
9939
9940 def GetBorder(*args, **kwargs):
9941 """
9942 GetBorder(self) -> int
9943
9944 Get the border value for this item.
9945 """
9946 return _core_.SizerItem_GetBorder(*args, **kwargs)
9947
9948 def GetWindow(*args, **kwargs):
9949 """
9950 GetWindow(self) -> Window
9951
9952 Get the window (if any) that is managed by this sizer item.
9953 """
9954 return _core_.SizerItem_GetWindow(*args, **kwargs)
9955
9956 def SetWindow(*args, **kwargs):
9957 """
9958 SetWindow(self, Window window)
9959
9960 Set the window to be managed by this sizer item.
9961 """
9962 return _core_.SizerItem_SetWindow(*args, **kwargs)
9963
9964 def GetSizer(*args, **kwargs):
9965 """
9966 GetSizer(self) -> Sizer
9967
9968 Get the subsizer (if any) that is managed by this sizer item.
9969 """
9970 return _core_.SizerItem_GetSizer(*args, **kwargs)
9971
9972 def SetSizer(*args, **kwargs):
9973 """
9974 SetSizer(self, Sizer sizer)
9975
9976 Set the subsizer to be managed by this sizer item.
9977 """
9978 return _core_.SizerItem_SetSizer(*args, **kwargs)
9979
9980 def GetSpacer(*args, **kwargs):
9981 """
9982 GetSpacer(self) -> Size
9983
9984 Get the size of the spacer managed by this sizer item.
9985 """
9986 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9987
9988 def SetSpacer(*args, **kwargs):
9989 """
9990 SetSpacer(self, Size size)
9991
9992 Set the size of the spacer to be managed by this sizer item.
9993 """
9994 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9995
9996 def Show(*args, **kwargs):
9997 """
9998 Show(self, bool show)
9999
10000 Set the show item attribute, which sizers use to determine if the item
10001 is to be made part of the layout or not. If the item is tracking a
10002 window then it is shown or hidden as needed.
10003 """
10004 return _core_.SizerItem_Show(*args, **kwargs)
10005
10006 def IsShown(*args, **kwargs):
10007 """
10008 IsShown(self) -> bool
10009
10010 Is the item to be shown in the layout?
10011 """
10012 return _core_.SizerItem_IsShown(*args, **kwargs)
10013
10014 def GetPosition(*args, **kwargs):
10015 """
10016 GetPosition(self) -> Point
10017
10018 Returns the current position of the item, as set in the last Layout.
10019 """
10020 return _core_.SizerItem_GetPosition(*args, **kwargs)
10021
10022 def GetUserData(*args, **kwargs):
10023 """
10024 GetUserData(self) -> PyObject
10025
10026 Returns the userData associated with this sizer item, or None if there
10027 isn't any.
10028 """
10029 return _core_.SizerItem_GetUserData(*args, **kwargs)
10030
10031
10032 class SizerItemPtr(SizerItem):
10033 def __init__(self, this):
10034 self.this = this
10035 if not hasattr(self,"thisown"): self.thisown = 0
10036 self.__class__ = SizerItem
10037 _core_.SizerItem_swigregister(SizerItemPtr)
10038
10039 def SizerItemWindow(*args, **kwargs):
10040 """
10041 SizerItemWindow(Window window, int proportion, int flag, int border,
10042 PyObject userData=None) -> SizerItem
10043
10044 Constructs a `wx.SizerItem` for tracking a window.
10045 """
10046 val = _core_.new_SizerItemWindow(*args, **kwargs)
10047 val.thisown = 1
10048 return val
10049
10050 def SizerItemSpacer(*args, **kwargs):
10051 """
10052 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
10053 PyObject userData=None) -> SizerItem
10054
10055 Constructs a `wx.SizerItem` for tracking a spacer.
10056 """
10057 val = _core_.new_SizerItemSpacer(*args, **kwargs)
10058 val.thisown = 1
10059 return val
10060
10061 def SizerItemSizer(*args, **kwargs):
10062 """
10063 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
10064 PyObject userData=None) -> SizerItem
10065
10066 Constructs a `wx.SizerItem` for tracking a subsizer
10067 """
10068 val = _core_.new_SizerItemSizer(*args, **kwargs)
10069 val.thisown = 1
10070 return val
10071
10072 class Sizer(Object):
10073 """
10074 wx.Sizer is the abstract base class used for laying out subwindows in
10075 a window. You cannot use wx.Sizer directly; instead, you will have to
10076 use one of the sizer classes derived from it such as `wx.BoxSizer`,
10077 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
10078 and `wx.GridBagSizer`.
10079
10080 The concept implemented by sizers in wxWidgets is closely related to
10081 layout tools in other GUI toolkits, such as Java's AWT, the GTK
10082 toolkit or the Qt toolkit. It is based upon the idea of the individual
10083 subwindows reporting their minimal required size and their ability to
10084 get stretched if the size of the parent window has changed. This will
10085 most often mean that the programmer does not set the original size of
10086 a dialog in the beginning, rather the dialog will assigned a sizer and
10087 this sizer will be queried about the recommended size. The sizer in
10088 turn will query its children, which can be normal windows or contorls,
10089 empty space or other sizers, so that a hierarchy of sizers can be
10090 constructed. Note that wxSizer does not derive from wxWindow and thus
10091 do not interfere with tab ordering and requires very little resources
10092 compared to a real window on screen.
10093
10094 What makes sizers so well fitted for use in wxWidgets is the fact that
10095 every control reports its own minimal size and the algorithm can
10096 handle differences in font sizes or different window (dialog item)
10097 sizes on different platforms without problems. If for example the
10098 standard font as well as the overall design of Mac widgets requires
10099 more space than on Windows, then the initial size of a dialog using a
10100 sizer will automatically be bigger on Mac than on Windows.
10101 """
10102 def __init__(self): raise RuntimeError, "No constructor defined"
10103 def __repr__(self):
10104 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10105 def _setOORInfo(*args, **kwargs):
10106 """_setOORInfo(self, PyObject _self)"""
10107 return _core_.Sizer__setOORInfo(*args, **kwargs)
10108
10109 def Add(*args, **kwargs):
10110 """
10111 Add(self, item, int proportion=0, int flag=0, int border=0,
10112 PyObject userData=None) -> wx.SizerItem
10113
10114 Appends a child item to the sizer.
10115 """
10116 return _core_.Sizer_Add(*args, **kwargs)
10117
10118 def Insert(*args, **kwargs):
10119 """
10120 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
10121 PyObject userData=None) -> wx.SizerItem
10122
10123 Inserts a new item into the list of items managed by this sizer before
10124 the item at index *before*. See `Add` for a description of the parameters.
10125 """
10126 return _core_.Sizer_Insert(*args, **kwargs)
10127
10128 def Prepend(*args, **kwargs):
10129 """
10130 Prepend(self, item, int proportion=0, int flag=0, int border=0,
10131 PyObject userData=None) -> wx.SizerItem
10132
10133 Adds a new item to the begining of the list of sizer items managed by
10134 this sizer. See `Add` for a description of the parameters.
10135 """
10136 return _core_.Sizer_Prepend(*args, **kwargs)
10137
10138 def Remove(*args, **kwargs):
10139 """
10140 Remove(self, item) -> bool
10141
10142 Removes an item from the sizer and destroys it. This method does not
10143 cause any layout or resizing to take place, call `Layout` to update
10144 the layout on screen after removing a child from the sizer. The
10145 *item* parameter can be either a window, a sizer, or the zero-based
10146 index of an item to remove. Returns True if the child item was found
10147 and removed.
10148 """
10149 return _core_.Sizer_Remove(*args, **kwargs)
10150
10151 def Detach(*args, **kwargs):
10152 """
10153 Detach(self, item) -> bool
10154
10155 Detaches an item from the sizer without destroying it. This method
10156 does not cause any layout or resizing to take place, call `Layout` to
10157 do so. The *item* parameter can be either a window, a sizer, or the
10158 zero-based index of the item to be detached. Returns True if the child item
10159 was found and detached.
10160 """
10161 return _core_.Sizer_Detach(*args, **kwargs)
10162
10163 def GetItem(*args, **kwargs):
10164 """
10165 GetItem(self, item) -> wx.SizerItem
10166
10167 Returns the `wx.SizerItem` which holds the *item* given. The *item*
10168 parameter can be either a window, a sizer, or the zero-based index of
10169 the item to be detached.
10170 """
10171 return _core_.Sizer_GetItem(*args, **kwargs)
10172
10173 def _SetItemMinSize(*args, **kwargs):
10174 """_SetItemMinSize(self, PyObject item, Size size)"""
10175 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
10176
10177 def SetItemMinSize(self, item, *args):
10178 """
10179 SetItemMinSize(self, item, Size size)
10180
10181 Sets the minimum size that will be allocated for an item in the sizer.
10182 The *item* parameter can be either a window, a sizer, or the
10183 zero-based index of the item. If a window or sizer is given then it
10184 will be searched for recursivly in subsizers if neccessary.
10185 """
10186 if len(args) == 2:
10187 # for backward compatibility accept separate width,height args too
10188 return self._SetItemMinSize(item, args)
10189 else:
10190 return self._SetItemMinSize(item, args[0])
10191
10192 def AddItem(*args, **kwargs):
10193 """
10194 AddItem(self, SizerItem item)
10195
10196 Adds a `wx.SizerItem` to the sizer.
10197 """
10198 return _core_.Sizer_AddItem(*args, **kwargs)
10199
10200 def InsertItem(*args, **kwargs):
10201 """
10202 InsertItem(self, int index, SizerItem item)
10203
10204 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
10205 """
10206 return _core_.Sizer_InsertItem(*args, **kwargs)
10207
10208 def PrependItem(*args, **kwargs):
10209 """
10210 PrependItem(self, SizerItem item)
10211
10212 Prepends a `wx.SizerItem` to the sizer.
10213 """
10214 return _core_.Sizer_PrependItem(*args, **kwargs)
10215
10216 def AddMany(self, items):
10217 """
10218 AddMany is a convenience method for adding several items
10219 to a sizer at one time. Simply pass it a list of tuples,
10220 where each tuple consists of the parameters that you
10221 would normally pass to the `Add` method.
10222 """
10223 for item in items:
10224 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
10225 item = (item, )
10226 self.Add(*item)
10227
10228 # for backwards compatibility only, please do not use in new code
10229 def AddWindow(self, *args, **kw):
10230 """Compatibility alias for `Add`."""
10231 return self.Add(*args, **kw)
10232 def AddSizer(self, *args, **kw):
10233 """Compatibility alias for `Add`."""
10234 return self.Add(*args, **kw)
10235 def AddSpacer(self, *args, **kw):
10236 """Compatibility alias for `Add`."""
10237 return self.Add(*args, **kw)
10238
10239 def PrependWindow(self, *args, **kw):
10240 """Compatibility alias for `Prepend`."""
10241 return self.Prepend(*args, **kw)
10242 def PrependSizer(self, *args, **kw):
10243 """Compatibility alias for `Prepend`."""
10244 return self.Prepend(*args, **kw)
10245 def PrependSpacer(self, *args, **kw):
10246 """Compatibility alias for `Prepend`."""
10247 return self.Prepend(*args, **kw)
10248
10249 def InsertWindow(self, *args, **kw):
10250 """Compatibility alias for `Insert`."""
10251 return self.Insert(*args, **kw)
10252 def InsertSizer(self, *args, **kw):
10253 """Compatibility alias for `Insert`."""
10254 return self.Insert(*args, **kw)
10255 def InsertSpacer(self, *args, **kw):
10256 """Compatibility alias for `Insert`."""
10257 return self.Insert(*args, **kw)
10258
10259 def RemoveWindow(self, *args, **kw):
10260 """Compatibility alias for `Remove`."""
10261 return self.Remove(*args, **kw)
10262 def RemoveSizer(self, *args, **kw):
10263 """Compatibility alias for `Remove`."""
10264 return self.Remove(*args, **kw)
10265 def RemovePos(self, *args, **kw):
10266 """Compatibility alias for `Remove`."""
10267 return self.Remove(*args, **kw)
10268
10269
10270 def SetDimension(*args, **kwargs):
10271 """
10272 SetDimension(self, int x, int y, int width, int height)
10273
10274 Call this to force the sizer to take the given dimension and thus
10275 force the items owned by the sizer to resize themselves according to
10276 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
10277 methods.
10278 """
10279 return _core_.Sizer_SetDimension(*args, **kwargs)
10280
10281 def SetMinSize(*args, **kwargs):
10282 """
10283 SetMinSize(self, Size size)
10284
10285 Call this to give the sizer a minimal size. Normally, the sizer will
10286 calculate its minimal size based purely on how much space its children
10287 need. After calling this method `GetMinSize` will return either the
10288 minimal size as requested by its children or the minimal size set
10289 here, depending on which is bigger.
10290 """
10291 return _core_.Sizer_SetMinSize(*args, **kwargs)
10292
10293 def GetSize(*args, **kwargs):
10294 """
10295 GetSize(self) -> Size
10296
10297 Returns the current size of the space managed by the sizer.
10298 """
10299 return _core_.Sizer_GetSize(*args, **kwargs)
10300
10301 def GetPosition(*args, **kwargs):
10302 """
10303 GetPosition(self) -> Point
10304
10305 Returns the current position of the sizer's managed space.
10306 """
10307 return _core_.Sizer_GetPosition(*args, **kwargs)
10308
10309 def GetMinSize(*args, **kwargs):
10310 """
10311 GetMinSize(self) -> Size
10312
10313 Returns the minimal size of the sizer. This is either the combined
10314 minimal size of all the children and their borders or the minimal size
10315 set by SetMinSize, depending on which is bigger.
10316 """
10317 return _core_.Sizer_GetMinSize(*args, **kwargs)
10318
10319 def GetSizeTuple(self):
10320 return self.GetSize().Get()
10321 def GetPositionTuple(self):
10322 return self.GetPosition().Get()
10323 def GetMinSizeTuple(self):
10324 return self.GetMinSize().Get()
10325
10326 def RecalcSizes(*args, **kwargs):
10327 """
10328 RecalcSizes(self)
10329
10330 Using the sizes calculated by `CalcMin` reposition and resize all the
10331 items managed by this sizer. You should not need to call this directly as
10332 it is called by `Layout`.
10333 """
10334 return _core_.Sizer_RecalcSizes(*args, **kwargs)
10335
10336 def CalcMin(*args, **kwargs):
10337 """
10338 CalcMin(self) -> Size
10339
10340 This method is where the sizer will do the actual calculation of its
10341 children's minimal sizes. You should not need to call this directly as
10342 it is called by `Layout`.
10343 """
10344 return _core_.Sizer_CalcMin(*args, **kwargs)
10345
10346 def Layout(*args, **kwargs):
10347 """
10348 Layout(self)
10349
10350 This method will force the recalculation and layout of the items
10351 controlled by the sizer using the current space allocated to the
10352 sizer. Normally this is called automatically from the owning window's
10353 EVT_SIZE handler, but it is also useful to call it from user code when
10354 one of the items in a sizer change size, or items are added or
10355 removed.
10356 """
10357 return _core_.Sizer_Layout(*args, **kwargs)
10358
10359 def Fit(*args, **kwargs):
10360 """
10361 Fit(self, Window window) -> Size
10362
10363 Tell the sizer to resize the *window* to match the sizer's minimal
10364 size. This is commonly done in the constructor of the window itself in
10365 order to set its initial size to match the needs of the children as
10366 determined by the sizer. Returns the new size.
10367
10368 For a top level window this is the total window size, not the client size.
10369 """
10370 return _core_.Sizer_Fit(*args, **kwargs)
10371
10372 def FitInside(*args, **kwargs):
10373 """
10374 FitInside(self, Window window)
10375
10376 Tell the sizer to resize the *virtual size* of the *window* to match the
10377 sizer's minimal size. This will not alter the on screen size of the
10378 window, but may cause the addition/removal/alteration of scrollbars
10379 required to view the virtual area in windows which manage it.
10380
10381 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
10382
10383 """
10384 return _core_.Sizer_FitInside(*args, **kwargs)
10385
10386 def SetSizeHints(*args, **kwargs):
10387 """
10388 SetSizeHints(self, Window window)
10389
10390 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
10391 match the sizer's minimal size. This is commonly done in the
10392 constructor of the window itself if the window is resizable (as are
10393 many dialogs under Unix and frames on probably all platforms) in order
10394 to prevent the window from being sized smaller than the minimal size
10395 required by the sizer.
10396 """
10397 return _core_.Sizer_SetSizeHints(*args, **kwargs)
10398
10399 def SetVirtualSizeHints(*args, **kwargs):
10400 """
10401 SetVirtualSizeHints(self, Window window)
10402
10403 Tell the sizer to set the minimal size of the window virtual area to
10404 match the sizer's minimal size. For windows with managed scrollbars
10405 this will set them appropriately.
10406
10407 :see: `wx.ScrolledWindow.SetScrollbars`
10408
10409 """
10410 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
10411
10412 def Clear(*args, **kwargs):
10413 """
10414 Clear(self, bool deleteWindows=False)
10415
10416 Clear all items from the sizer, optionally destroying the window items
10417 as well.
10418 """
10419 return _core_.Sizer_Clear(*args, **kwargs)
10420
10421 def DeleteWindows(*args, **kwargs):
10422 """
10423 DeleteWindows(self)
10424
10425 Destroy all windows managed by the sizer.
10426 """
10427 return _core_.Sizer_DeleteWindows(*args, **kwargs)
10428
10429 def GetChildren(*args, **kwargs):
10430 """
10431 GetChildren(self) -> list
10432
10433 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
10434 """
10435 return _core_.Sizer_GetChildren(*args, **kwargs)
10436
10437 def Show(*args, **kwargs):
10438 """
10439 Show(self, item, bool show=True, bool recursive=false) -> bool
10440
10441 Shows or hides an item managed by the sizer. To make a sizer item
10442 disappear or reappear, use Show followed by `Layout`. The *item*
10443 parameter can be either a window, a sizer, or the zero-based index of
10444 the item. Use the recursive parameter to show or hide an item in a
10445 subsizer. Returns True if the item was found.
10446 """
10447 return _core_.Sizer_Show(*args, **kwargs)
10448
10449 def IsShown(*args, **kwargs):
10450 """
10451 IsShown(self, item)
10452
10453 Determines if the item is currently shown. sizer. To make a sizer
10454 item disappear or reappear, use Show followed by `Layout`. The *item*
10455 parameter can be either a window, a sizer, or the zero-based index of
10456 the item.
10457 """
10458 return _core_.Sizer_IsShown(*args, **kwargs)
10459
10460 def Hide(self, item, recursive=False):
10461 """
10462 A convenience method for `Show` (item, False, recursive).
10463 """
10464 return self.Show(item, False, recursive)
10465
10466 def ShowItems(*args, **kwargs):
10467 """
10468 ShowItems(self, bool show)
10469
10470 Recursively call `wx.SizerItem.Show` on all sizer items.
10471 """
10472 return _core_.Sizer_ShowItems(*args, **kwargs)
10473
10474
10475 class SizerPtr(Sizer):
10476 def __init__(self, this):
10477 self.this = this
10478 if not hasattr(self,"thisown"): self.thisown = 0
10479 self.__class__ = Sizer
10480 _core_.Sizer_swigregister(SizerPtr)
10481
10482 class PySizer(Sizer):
10483 """
10484 wx.PySizer is a special version of `wx.Sizer` that has been
10485 instrumented to allow the C++ virtual methods to be overloaded in
10486 Python derived classes. You would derive from this class if you are
10487 wanting to implement a custom sizer in Python code. Simply implement
10488 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
10489 For example::
10490
10491 class MySizer(wx.PySizer):
10492 def __init__(self):
10493 wx.PySizer.__init__(self)
10494
10495 def CalcMin(self):
10496 for item in self.GetChildren():
10497 # calculate the total minimum width and height needed
10498 # by all items in the sizer according to this sizer's
10499 # layout algorithm.
10500 ...
10501 return wx.Size(width, height)
10502
10503 def RecalcSizes(self):
10504 # find the space allotted to this sizer
10505 pos = self.GetPosition()
10506 size = self.GetSize()
10507 for item in self.GetChildren():
10508 # Recalculate (if necessary) the position and size of
10509 # each item and then call item.SetDimension to do the
10510 # actual positioning and sizing of the items within the
10511 # space alloted to this sizer.
10512 ...
10513 item.SetDimension(itemPos, itemSize)
10514
10515
10516 When `Layout` is called it first calls `CalcMin` followed by
10517 `RecalcSizes` so you can optimize a bit by saving the results of
10518 `CalcMin` and reusing them in `RecalcSizes`.
10519
10520 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
10521
10522
10523 """
10524 def __repr__(self):
10525 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10526 def __init__(self, *args, **kwargs):
10527 """
10528 __init__(self) -> PySizer
10529
10530 Creates a wx.PySizer. Must be called from the __init__ in the derived
10531 class.
10532 """
10533 newobj = _core_.new_PySizer(*args, **kwargs)
10534 self.this = newobj.this
10535 self.thisown = 1
10536 del newobj.thisown
10537 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
10538
10539 def _setCallbackInfo(*args, **kwargs):
10540 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
10541 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
10542
10543
10544 class PySizerPtr(PySizer):
10545 def __init__(self, this):
10546 self.this = this
10547 if not hasattr(self,"thisown"): self.thisown = 0
10548 self.__class__ = PySizer
10549 _core_.PySizer_swigregister(PySizerPtr)
10550
10551 #---------------------------------------------------------------------------
10552
10553 class BoxSizer(Sizer):
10554 """
10555 The basic idea behind a box sizer is that windows will most often be
10556 laid out in rather simple basic geometry, typically in a row or a
10557 column or nested hierarchies of either. A wx.BoxSizer will lay out
10558 its items in a simple row or column, depending on the orientation
10559 parameter passed to the constructor.
10560 """
10561 def __repr__(self):
10562 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10563 def __init__(self, *args, **kwargs):
10564 """
10565 __init__(self, int orient=HORIZONTAL) -> BoxSizer
10566
10567 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
10568 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
10569 sizer.
10570 """
10571 newobj = _core_.new_BoxSizer(*args, **kwargs)
10572 self.this = newobj.this
10573 self.thisown = 1
10574 del newobj.thisown
10575 self._setOORInfo(self)
10576
10577 def GetOrientation(*args, **kwargs):
10578 """
10579 GetOrientation(self) -> int
10580
10581 Returns the current orientation of the sizer.
10582 """
10583 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
10584
10585 def SetOrientation(*args, **kwargs):
10586 """
10587 SetOrientation(self, int orient)
10588
10589 Resets the orientation of the sizer.
10590 """
10591 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
10592
10593
10594 class BoxSizerPtr(BoxSizer):
10595 def __init__(self, this):
10596 self.this = this
10597 if not hasattr(self,"thisown"): self.thisown = 0
10598 self.__class__ = BoxSizer
10599 _core_.BoxSizer_swigregister(BoxSizerPtr)
10600
10601 #---------------------------------------------------------------------------
10602
10603 class StaticBoxSizer(BoxSizer):
10604 """
10605 wx.StaticBoxSizer derives from and functions identically to the
10606 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10607 manages. Note that this static box must be created separately and
10608 passed to the sizer constructor.
10609 """
10610 def __repr__(self):
10611 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10612 def __init__(self, *args, **kwargs):
10613 """
10614 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10615
10616 Constructor. It takes an associated static box and the orientation
10617 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10618 ``wx.HORIZONTAL``.
10619 """
10620 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
10621 self.this = newobj.this
10622 self.thisown = 1
10623 del newobj.thisown
10624 self._setOORInfo(self)
10625
10626 def GetStaticBox(*args, **kwargs):
10627 """
10628 GetStaticBox(self) -> StaticBox
10629
10630 Returns the static box associated with this sizer.
10631 """
10632 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
10633
10634
10635 class StaticBoxSizerPtr(StaticBoxSizer):
10636 def __init__(self, this):
10637 self.this = this
10638 if not hasattr(self,"thisown"): self.thisown = 0
10639 self.__class__ = StaticBoxSizer
10640 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
10641
10642 #---------------------------------------------------------------------------
10643
10644 class GridSizer(Sizer):
10645 """
10646 A grid sizer is a sizer which lays out its children in a
10647 two-dimensional table with all cells having the same size. In other
10648 words, the width of each cell within the grid is the width of the
10649 widest item added to the sizer and the height of each grid cell is the
10650 height of the tallest item. An optional vertical and/or horizontal
10651 gap between items can also be specified (in pixels.)
10652
10653 Items are placed in the cells of the grid in the order they are added,
10654 in row-major order. In other words, the first row is filled first,
10655 then the second, and so on until all items have been added. (If
10656 neccessary, additional rows will be added as items are added.) If you
10657 need to have greater control over the cells that items are placed in
10658 then use the `wx.GridBagSizer`.
10659
10660 """
10661 def __repr__(self):
10662 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10663 def __init__(self, *args, **kwargs):
10664 """
10665 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10666
10667 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10668 of columns and rows in the sizer - if either of the parameters is
10669 zero, it will be calculated to from the total number of children in
10670 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10671 define extra space between all children.
10672 """
10673 newobj = _core_.new_GridSizer(*args, **kwargs)
10674 self.this = newobj.this
10675 self.thisown = 1
10676 del newobj.thisown
10677 self._setOORInfo(self)
10678
10679 def SetCols(*args, **kwargs):
10680 """
10681 SetCols(self, int cols)
10682
10683 Sets the number of columns in the sizer.
10684 """
10685 return _core_.GridSizer_SetCols(*args, **kwargs)
10686
10687 def SetRows(*args, **kwargs):
10688 """
10689 SetRows(self, int rows)
10690
10691 Sets the number of rows in the sizer.
10692 """
10693 return _core_.GridSizer_SetRows(*args, **kwargs)
10694
10695 def SetVGap(*args, **kwargs):
10696 """
10697 SetVGap(self, int gap)
10698
10699 Sets the vertical gap (in pixels) between the cells in the sizer.
10700 """
10701 return _core_.GridSizer_SetVGap(*args, **kwargs)
10702
10703 def SetHGap(*args, **kwargs):
10704 """
10705 SetHGap(self, int gap)
10706
10707 Sets the horizontal gap (in pixels) between cells in the sizer
10708 """
10709 return _core_.GridSizer_SetHGap(*args, **kwargs)
10710
10711 def GetCols(*args, **kwargs):
10712 """
10713 GetCols(self) -> int
10714
10715 Returns the number of columns in the sizer.
10716 """
10717 return _core_.GridSizer_GetCols(*args, **kwargs)
10718
10719 def GetRows(*args, **kwargs):
10720 """
10721 GetRows(self) -> int
10722
10723 Returns the number of rows in the sizer.
10724 """
10725 return _core_.GridSizer_GetRows(*args, **kwargs)
10726
10727 def GetVGap(*args, **kwargs):
10728 """
10729 GetVGap(self) -> int
10730
10731 Returns the vertical gap (in pixels) between the cells in the sizer.
10732 """
10733 return _core_.GridSizer_GetVGap(*args, **kwargs)
10734
10735 def GetHGap(*args, **kwargs):
10736 """
10737 GetHGap(self) -> int
10738
10739 Returns the horizontal gap (in pixels) between cells in the sizer.
10740 """
10741 return _core_.GridSizer_GetHGap(*args, **kwargs)
10742
10743
10744 class GridSizerPtr(GridSizer):
10745 def __init__(self, this):
10746 self.this = this
10747 if not hasattr(self,"thisown"): self.thisown = 0
10748 self.__class__ = GridSizer
10749 _core_.GridSizer_swigregister(GridSizerPtr)
10750
10751 #---------------------------------------------------------------------------
10752
10753 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10754 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10755 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
10756 class FlexGridSizer(GridSizer):
10757 """
10758 A flex grid sizer is a sizer which lays out its children in a
10759 two-dimensional table with all table cells in one row having the same
10760 height and all cells in one column having the same width, but all
10761 rows or all columns are not necessarily the same height or width as in
10762 the `wx.GridSizer`.
10763
10764 wx.FlexGridSizer can also size items equally in one direction but
10765 unequally ("flexibly") in the other. If the sizer is only flexible
10766 in one direction (this can be changed using `SetFlexibleDirection`), it
10767 needs to be decided how the sizer should grow in the other ("non
10768 flexible") direction in order to fill the available space. The
10769 `SetNonFlexibleGrowMode` method serves this purpose.
10770
10771
10772 """
10773 def __repr__(self):
10774 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10775 def __init__(self, *args, **kwargs):
10776 """
10777 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10778
10779 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10780 number of columns and rows in the sizer - if either of the parameters
10781 is zero, it will be calculated to from the total number of children in
10782 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10783 define extra space between all children.
10784 """
10785 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
10786 self.this = newobj.this
10787 self.thisown = 1
10788 del newobj.thisown
10789 self._setOORInfo(self)
10790
10791 def AddGrowableRow(*args, **kwargs):
10792 """
10793 AddGrowableRow(self, size_t idx, int proportion=0)
10794
10795 Specifies that row *idx* (starting from zero) should be grown if there
10796 is extra space available to the sizer.
10797
10798 The *proportion* parameter has the same meaning as the stretch factor
10799 for the box sizers except that if all proportions are 0, then all
10800 columns are resized equally (instead of not being resized at all).
10801 """
10802 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
10803
10804 def RemoveGrowableRow(*args, **kwargs):
10805 """
10806 RemoveGrowableRow(self, size_t idx)
10807
10808 Specifies that row *idx* is no longer growable.
10809 """
10810 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10811
10812 def AddGrowableCol(*args, **kwargs):
10813 """
10814 AddGrowableCol(self, size_t idx, int proportion=0)
10815
10816 Specifies that column *idx* (starting from zero) should be grown if
10817 there is extra space available to the sizer.
10818
10819 The *proportion* parameter has the same meaning as the stretch factor
10820 for the box sizers except that if all proportions are 0, then all
10821 columns are resized equally (instead of not being resized at all).
10822 """
10823 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10824
10825 def RemoveGrowableCol(*args, **kwargs):
10826 """
10827 RemoveGrowableCol(self, size_t idx)
10828
10829 Specifies that column *idx* is no longer growable.
10830 """
10831 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10832
10833 def SetFlexibleDirection(*args, **kwargs):
10834 """
10835 SetFlexibleDirection(self, int direction)
10836
10837 Specifies whether the sizer should flexibly resize its columns, rows,
10838 or both. Argument *direction* can be one of the following values. Any
10839 other value is ignored.
10840
10841 ============== =======================================
10842 wx.VERTICAL Rows are flexibly sized.
10843 wx.HORIZONTAL Columns are flexibly sized.
10844 wx.BOTH Both rows and columns are flexibly sized
10845 (this is the default value).
10846 ============== =======================================
10847
10848 Note that this method does not trigger relayout.
10849
10850 """
10851 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10852
10853 def GetFlexibleDirection(*args, **kwargs):
10854 """
10855 GetFlexibleDirection(self) -> int
10856
10857 Returns a value that specifies whether the sizer
10858 flexibly resizes its columns, rows, or both (default).
10859
10860 :see: `SetFlexibleDirection`
10861 """
10862 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10863
10864 def SetNonFlexibleGrowMode(*args, **kwargs):
10865 """
10866 SetNonFlexibleGrowMode(self, int mode)
10867
10868 Specifies how the sizer should grow in the non-flexible direction if
10869 there is one (so `SetFlexibleDirection` must have been called
10870 previously). Argument *mode* can be one of the following values:
10871
10872 ========================== =================================================
10873 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10874 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10875 `AddGrowableCol` and `AddGrowableRow`. In this
10876 case equal sizing applies to minimum sizes of
10877 columns or rows (this is the default value).
10878 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10879 the non flexible direction, whether they are
10880 growable or not in the flexbile direction.
10881 ========================== =================================================
10882
10883 Note that this method does not trigger relayout.
10884
10885
10886 """
10887 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10888
10889 def GetNonFlexibleGrowMode(*args, **kwargs):
10890 """
10891 GetNonFlexibleGrowMode(self) -> int
10892
10893 Returns the value that specifies how the sizer grows in the
10894 non-flexible direction if there is one.
10895
10896 :see: `SetNonFlexibleGrowMode`
10897 """
10898 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10899
10900 def GetRowHeights(*args, **kwargs):
10901 """
10902 GetRowHeights(self) -> list
10903
10904 Returns a list of integers representing the heights of each of the
10905 rows in the sizer.
10906 """
10907 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10908
10909 def GetColWidths(*args, **kwargs):
10910 """
10911 GetColWidths(self) -> list
10912
10913 Returns a list of integers representing the widths of each of the
10914 columns in the sizer.
10915 """
10916 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10917
10918
10919 class FlexGridSizerPtr(FlexGridSizer):
10920 def __init__(self, this):
10921 self.this = this
10922 if not hasattr(self,"thisown"): self.thisown = 0
10923 self.__class__ = FlexGridSizer
10924 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10925
10926 class StdDialogButtonSizer(BoxSizer):
10927 """
10928 A special sizer that knows how to order and position standard buttons
10929 in order to conform to the current platform's standards. You simply
10930 need to add each `wx.Button` to the sizer, and be sure to create the
10931 buttons using the standard ID's. Then call `Realize` and the sizer
10932 will take care of the rest.
10933
10934 """
10935 def __repr__(self):
10936 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10937 def __init__(self, *args, **kwargs):
10938 """__init__(self) -> StdDialogButtonSizer"""
10939 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10940 self.this = newobj.this
10941 self.thisown = 1
10942 del newobj.thisown
10943 def AddButton(*args, **kwargs):
10944 """
10945 AddButton(self, wxButton button)
10946
10947 Use this to add the buttons to this sizer. Do not use the `Add`
10948 method in the base class.
10949 """
10950 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10951
10952 def Realize(*args, **kwargs):
10953 """
10954 Realize(self)
10955
10956 This funciton needs to be called after all the buttons have been added
10957 to the sizer. It will reorder them and position them in a platform
10958 specifc manner.
10959 """
10960 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
10961
10962 def SetAffirmativeButton(*args, **kwargs):
10963 """SetAffirmativeButton(self, wxButton button)"""
10964 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10965
10966 def SetNegativeButton(*args, **kwargs):
10967 """SetNegativeButton(self, wxButton button)"""
10968 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10969
10970 def SetCancelButton(*args, **kwargs):
10971 """SetCancelButton(self, wxButton button)"""
10972 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
10973
10974 def GetAffirmativeButton(*args, **kwargs):
10975 """GetAffirmativeButton(self) -> wxButton"""
10976 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10977
10978 def GetApplyButton(*args, **kwargs):
10979 """GetApplyButton(self) -> wxButton"""
10980 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10981
10982 def GetNegativeButton(*args, **kwargs):
10983 """GetNegativeButton(self) -> wxButton"""
10984 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10985
10986 def GetCancelButton(*args, **kwargs):
10987 """GetCancelButton(self) -> wxButton"""
10988 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10989
10990 def GetHelpButton(*args, **kwargs):
10991 """GetHelpButton(self) -> wxButton"""
10992 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10993
10994
10995 class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10996 def __init__(self, this):
10997 self.this = this
10998 if not hasattr(self,"thisown"): self.thisown = 0
10999 self.__class__ = StdDialogButtonSizer
11000 _core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
11001
11002 #---------------------------------------------------------------------------
11003
11004 class GBPosition(object):
11005 """
11006 This class represents the position of an item in a virtual grid of
11007 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11008 typemaps that will automatically convert from a 2-element sequence of
11009 integers to a wx.GBPosition, so you can use the more pythonic
11010 representation of the position nearly transparently in Python code.
11011 """
11012 def __repr__(self):
11013 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11014 def __init__(self, *args, **kwargs):
11015 """
11016 __init__(self, int row=0, int col=0) -> GBPosition
11017
11018 This class represents the position of an item in a virtual grid of
11019 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11020 typemaps that will automatically convert from a 2-element sequence of
11021 integers to a wx.GBPosition, so you can use the more pythonic
11022 representation of the position nearly transparently in Python code.
11023 """
11024 newobj = _core_.new_GBPosition(*args, **kwargs)
11025 self.this = newobj.this
11026 self.thisown = 1
11027 del newobj.thisown
11028 def GetRow(*args, **kwargs):
11029 """GetRow(self) -> int"""
11030 return _core_.GBPosition_GetRow(*args, **kwargs)
11031
11032 def GetCol(*args, **kwargs):
11033 """GetCol(self) -> int"""
11034 return _core_.GBPosition_GetCol(*args, **kwargs)
11035
11036 def SetRow(*args, **kwargs):
11037 """SetRow(self, int row)"""
11038 return _core_.GBPosition_SetRow(*args, **kwargs)
11039
11040 def SetCol(*args, **kwargs):
11041 """SetCol(self, int col)"""
11042 return _core_.GBPosition_SetCol(*args, **kwargs)
11043
11044 def __eq__(*args, **kwargs):
11045 """__eq__(self, GBPosition other) -> bool"""
11046 return _core_.GBPosition___eq__(*args, **kwargs)
11047
11048 def __ne__(*args, **kwargs):
11049 """__ne__(self, GBPosition other) -> bool"""
11050 return _core_.GBPosition___ne__(*args, **kwargs)
11051
11052 def Set(*args, **kwargs):
11053 """Set(self, int row=0, int col=0)"""
11054 return _core_.GBPosition_Set(*args, **kwargs)
11055
11056 def Get(*args, **kwargs):
11057 """Get(self) -> PyObject"""
11058 return _core_.GBPosition_Get(*args, **kwargs)
11059
11060 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
11061 def __str__(self): return str(self.Get())
11062 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
11063 def __len__(self): return len(self.Get())
11064 def __getitem__(self, index): return self.Get()[index]
11065 def __setitem__(self, index, val):
11066 if index == 0: self.SetRow(val)
11067 elif index == 1: self.SetCol(val)
11068 else: raise IndexError
11069 def __nonzero__(self): return self.Get() != (0,0)
11070 __safe_for_unpickling__ = True
11071 def __reduce__(self): return (wx.GBPosition, self.Get())
11072
11073 row = property(GetRow, SetRow)
11074 col = property(GetCol, SetCol)
11075
11076
11077 class GBPositionPtr(GBPosition):
11078 def __init__(self, this):
11079 self.this = this
11080 if not hasattr(self,"thisown"): self.thisown = 0
11081 self.__class__ = GBPosition
11082 _core_.GBPosition_swigregister(GBPositionPtr)
11083
11084 class GBSpan(object):
11085 """
11086 This class is used to hold the row and column spanning attributes of
11087 items in a `wx.GridBagSizer`. wxPython has typemaps that will
11088 automatically convert from a 2-element sequence of integers to a
11089 wx.GBSpan, so you can use the more pythonic representation of the span
11090 nearly transparently in Python code.
11091
11092 """
11093 def __repr__(self):
11094 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11095 def __init__(self, *args, **kwargs):
11096 """
11097 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
11098
11099 Construct a new wxGBSpan, optionally setting the rowspan and
11100 colspan. The default is (1,1). (Meaning that the item occupies one
11101 cell in each direction.
11102 """
11103 newobj = _core_.new_GBSpan(*args, **kwargs)
11104 self.this = newobj.this
11105 self.thisown = 1
11106 del newobj.thisown
11107 def GetRowspan(*args, **kwargs):
11108 """GetRowspan(self) -> int"""
11109 return _core_.GBSpan_GetRowspan(*args, **kwargs)
11110
11111 def GetColspan(*args, **kwargs):
11112 """GetColspan(self) -> int"""
11113 return _core_.GBSpan_GetColspan(*args, **kwargs)
11114
11115 def SetRowspan(*args, **kwargs):
11116 """SetRowspan(self, int rowspan)"""
11117 return _core_.GBSpan_SetRowspan(*args, **kwargs)
11118
11119 def SetColspan(*args, **kwargs):
11120 """SetColspan(self, int colspan)"""
11121 return _core_.GBSpan_SetColspan(*args, **kwargs)
11122
11123 def __eq__(*args, **kwargs):
11124 """__eq__(self, GBSpan other) -> bool"""
11125 return _core_.GBSpan___eq__(*args, **kwargs)
11126
11127 def __ne__(*args, **kwargs):
11128 """__ne__(self, GBSpan other) -> bool"""
11129 return _core_.GBSpan___ne__(*args, **kwargs)
11130
11131 def Set(*args, **kwargs):
11132 """Set(self, int rowspan=1, int colspan=1)"""
11133 return _core_.GBSpan_Set(*args, **kwargs)
11134
11135 def Get(*args, **kwargs):
11136 """Get(self) -> PyObject"""
11137 return _core_.GBSpan_Get(*args, **kwargs)
11138
11139 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
11140 def __str__(self): return str(self.Get())
11141 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
11142 def __len__(self): return len(self.Get())
11143 def __getitem__(self, index): return self.Get()[index]
11144 def __setitem__(self, index, val):
11145 if index == 0: self.SetRowspan(val)
11146 elif index == 1: self.SetColspan(val)
11147 else: raise IndexError
11148 def __nonzero__(self): return self.Get() != (0,0)
11149 __safe_for_unpickling__ = True
11150 def __reduce__(self): return (wx.GBSpan, self.Get())
11151
11152 rowspan = property(GetRowspan, SetRowspan)
11153 colspan = property(GetColspan, SetColspan)
11154
11155
11156 class GBSpanPtr(GBSpan):
11157 def __init__(self, this):
11158 self.this = this
11159 if not hasattr(self,"thisown"): self.thisown = 0
11160 self.__class__ = GBSpan
11161 _core_.GBSpan_swigregister(GBSpanPtr)
11162
11163 class GBSizerItem(SizerItem):
11164 """
11165 The wx.GBSizerItem class is used to track the additional data about
11166 items in a `wx.GridBagSizer` such as the item's position in the grid
11167 and how many rows or columns it spans.
11168
11169 """
11170 def __repr__(self):
11171 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11172 def __init__(self, *args, **kwargs):
11173 """
11174 __init__(self) -> GBSizerItem
11175
11176 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
11177 size will need to be set, as well as a position and span before this
11178 item can be used in a Sizer.
11179
11180 You will probably never need to create a wx.GBSizerItem directly as they
11181 are created automatically when the sizer's Add method is called.
11182 """
11183 newobj = _core_.new_GBSizerItem(*args, **kwargs)
11184 self.this = newobj.this
11185 self.thisown = 1
11186 del newobj.thisown
11187 def GetPos(*args, **kwargs):
11188 """
11189 GetPos(self) -> GBPosition
11190
11191 Get the grid position of the item
11192 """
11193 return _core_.GBSizerItem_GetPos(*args, **kwargs)
11194
11195 def GetPosTuple(self): return self.GetPos().Get()
11196 def GetSpan(*args, **kwargs):
11197 """
11198 GetSpan(self) -> GBSpan
11199
11200 Get the row and column spanning of the item
11201 """
11202 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
11203
11204 def GetSpanTuple(self): return self.GetSpan().Get()
11205 def SetPos(*args, **kwargs):
11206 """
11207 SetPos(self, GBPosition pos) -> bool
11208
11209 If the item is already a member of a sizer then first ensure that
11210 there is no other item that would intersect with this one at the new
11211 position, then set the new position. Returns True if the change is
11212 successful and after the next Layout() the item will be moved.
11213 """
11214 return _core_.GBSizerItem_SetPos(*args, **kwargs)
11215
11216 def SetSpan(*args, **kwargs):
11217 """
11218 SetSpan(self, GBSpan span) -> bool
11219
11220 If the item is already a member of a sizer then first ensure that
11221 there is no other item that would intersect with this one with its new
11222 spanning size, then set the new spanning. Returns True if the change
11223 is successful and after the next Layout() the item will be resized.
11224
11225 """
11226 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
11227
11228 def Intersects(*args, **kwargs):
11229 """
11230 Intersects(self, GBSizerItem other) -> bool
11231
11232 Returns True if this item and the other item instersect.
11233 """
11234 return _core_.GBSizerItem_Intersects(*args, **kwargs)
11235
11236 def IntersectsPos(*args, **kwargs):
11237 """
11238 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
11239
11240 Returns True if the given pos/span would intersect with this item.
11241 """
11242 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
11243
11244 def GetEndPos(*args, **kwargs):
11245 """
11246 GetEndPos(self) -> GBPosition
11247
11248 Get the row and column of the endpoint of this item.
11249 """
11250 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
11251
11252 def GetGBSizer(*args, **kwargs):
11253 """
11254 GetGBSizer(self) -> GridBagSizer
11255
11256 Get the sizer this item is a member of.
11257 """
11258 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
11259
11260 def SetGBSizer(*args, **kwargs):
11261 """
11262 SetGBSizer(self, GridBagSizer sizer)
11263
11264 Set the sizer this item is a member of.
11265 """
11266 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
11267
11268
11269 class GBSizerItemPtr(GBSizerItem):
11270 def __init__(self, this):
11271 self.this = this
11272 if not hasattr(self,"thisown"): self.thisown = 0
11273 self.__class__ = GBSizerItem
11274 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
11275 DefaultSpan = cvar.DefaultSpan
11276
11277 def GBSizerItemWindow(*args, **kwargs):
11278 """
11279 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
11280 int border, PyObject userData=None) -> GBSizerItem
11281
11282 Construct a `wx.GBSizerItem` for a window.
11283 """
11284 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
11285 val.thisown = 1
11286 return val
11287
11288 def GBSizerItemSizer(*args, **kwargs):
11289 """
11290 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
11291 int border, PyObject userData=None) -> GBSizerItem
11292
11293 Construct a `wx.GBSizerItem` for a sizer
11294 """
11295 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
11296 val.thisown = 1
11297 return val
11298
11299 def GBSizerItemSpacer(*args, **kwargs):
11300 """
11301 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
11302 int flag, int border, PyObject userData=None) -> GBSizerItem
11303
11304 Construct a `wx.GBSizerItem` for a spacer.
11305 """
11306 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
11307 val.thisown = 1
11308 return val
11309
11310 class GridBagSizer(FlexGridSizer):
11311 """
11312 A `wx.Sizer` that can lay out items in a virtual grid like a
11313 `wx.FlexGridSizer` but in this case explicit positioning of the items
11314 is allowed using `wx.GBPosition`, and items can optionally span more
11315 than one row and/or column using `wx.GBSpan`. The total size of the
11316 virtual grid is determined by the largest row and column that items are
11317 positioned at, adjusted for spanning.
11318
11319 """
11320 def __repr__(self):
11321 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11322 def __init__(self, *args, **kwargs):
11323 """
11324 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
11325
11326 Constructor, with optional parameters to specify the gap between the
11327 rows and columns.
11328 """
11329 newobj = _core_.new_GridBagSizer(*args, **kwargs)
11330 self.this = newobj.this
11331 self.thisown = 1
11332 del newobj.thisown
11333 self._setOORInfo(self)
11334
11335 def Add(*args, **kwargs):
11336 """
11337 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
11338 int border=0, userData=None) -> wx.GBSizerItem
11339
11340 Adds an item to the sizer at the grid cell *pos*, optionally spanning
11341 more than one row or column as specified with *span*. The remaining
11342 args behave similarly to `wx.Sizer.Add`.
11343
11344 Returns True if the item was successfully placed at the given cell
11345 position, False if something was already there.
11346
11347 """
11348 return _core_.GridBagSizer_Add(*args, **kwargs)
11349
11350 def AddItem(*args, **kwargs):
11351 """
11352 Add(self, GBSizerItem item) -> wx.GBSizerItem
11353
11354 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
11355 the item was successfully placed at its given cell position, False if
11356 something was already there.
11357 """
11358 return _core_.GridBagSizer_AddItem(*args, **kwargs)
11359
11360 def GetCellSize(*args, **kwargs):
11361 """
11362 GetCellSize(self, int row, int col) -> Size
11363
11364 Get the size of the specified cell, including hgap and
11365 vgap. Only valid after a Layout.
11366 """
11367 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
11368
11369 def GetEmptyCellSize(*args, **kwargs):
11370 """
11371 GetEmptyCellSize(self) -> Size
11372
11373 Get the size used for cells in the grid with no item.
11374 """
11375 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
11376
11377 def SetEmptyCellSize(*args, **kwargs):
11378 """
11379 SetEmptyCellSize(self, Size sz)
11380
11381 Set the size used for cells in the grid with no item.
11382 """
11383 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
11384
11385 def GetItemPosition(*args):
11386 """
11387 GetItemPosition(self, item) -> GBPosition
11388
11389 Get the grid position of the specified *item* where *item* is either a
11390 window or subsizer that is a member of this sizer, or a zero-based
11391 index of an item.
11392 """
11393 return _core_.GridBagSizer_GetItemPosition(*args)
11394
11395 def SetItemPosition(*args):
11396 """
11397 SetItemPosition(self, item, GBPosition pos) -> bool
11398
11399 Set the grid position of the specified *item* where *item* is either a
11400 window or subsizer that is a member of this sizer, or a zero-based
11401 index of an item. Returns True on success. If the move is not
11402 allowed (because an item is already there) then False is returned.
11403
11404 """
11405 return _core_.GridBagSizer_SetItemPosition(*args)
11406
11407 def GetItemSpan(*args):
11408 """
11409 GetItemSpan(self, item) -> GBSpan
11410
11411 Get the row/col spanning of the specified *item* where *item* is
11412 either a window or subsizer that is a member of this sizer, or a
11413 zero-based index of an item.
11414 """
11415 return _core_.GridBagSizer_GetItemSpan(*args)
11416
11417 def SetItemSpan(*args):
11418 """
11419 SetItemSpan(self, item, GBSpan span) -> bool
11420
11421 Set the row/col spanning of the specified *item* where *item* is
11422 either a window or subsizer that is a member of this sizer, or a
11423 zero-based index of an item. Returns True on success. If the move is
11424 not allowed (because an item is already there) then False is returned.
11425 """
11426 return _core_.GridBagSizer_SetItemSpan(*args)
11427
11428 def FindItem(*args):
11429 """
11430 FindItem(self, item) -> GBSizerItem
11431
11432 Find the sizer item for the given window or subsizer, returns None if
11433 not found. (non-recursive)
11434 """
11435 return _core_.GridBagSizer_FindItem(*args)
11436
11437 def FindItemAtPosition(*args, **kwargs):
11438 """
11439 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
11440
11441 Return the sizer item for the given grid cell, or None if there is no
11442 item at that position. (non-recursive)
11443 """
11444 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
11445
11446 def FindItemAtPoint(*args, **kwargs):
11447 """
11448 FindItemAtPoint(self, Point pt) -> GBSizerItem
11449
11450 Return the sizer item located at the point given in *pt*, or None if
11451 there is no item at that point. The (x,y) coordinates in pt correspond
11452 to the client coordinates of the window using the sizer for
11453 layout. (non-recursive)
11454 """
11455 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
11456
11457 def CheckForIntersection(*args, **kwargs):
11458 """
11459 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
11460
11461 Look at all items and see if any intersect (or would overlap) the
11462 given *item*. Returns True if so, False if there would be no overlap.
11463 If an *excludeItem* is given then it will not be checked for
11464 intersection, for example it may be the item we are checking the
11465 position of.
11466
11467 """
11468 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
11469
11470 def CheckForIntersectionPos(*args, **kwargs):
11471 """
11472 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
11473
11474 Look at all items and see if any intersect (or would overlap) the
11475 given position and span. Returns True if so, False if there would be
11476 no overlap. If an *excludeItem* is given then it will not be checked
11477 for intersection, for example it may be the item we are checking the
11478 position of.
11479 """
11480 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
11481
11482
11483 class GridBagSizerPtr(GridBagSizer):
11484 def __init__(self, this):
11485 self.this = this
11486 if not hasattr(self,"thisown"): self.thisown = 0
11487 self.__class__ = GridBagSizer
11488 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
11489
11490 #---------------------------------------------------------------------------
11491
11492 Left = _core_.Left
11493 Top = _core_.Top
11494 Right = _core_.Right
11495 Bottom = _core_.Bottom
11496 Width = _core_.Width
11497 Height = _core_.Height
11498 Centre = _core_.Centre
11499 Center = _core_.Center
11500 CentreX = _core_.CentreX
11501 CentreY = _core_.CentreY
11502 Unconstrained = _core_.Unconstrained
11503 AsIs = _core_.AsIs
11504 PercentOf = _core_.PercentOf
11505 Above = _core_.Above
11506 Below = _core_.Below
11507 LeftOf = _core_.LeftOf
11508 RightOf = _core_.RightOf
11509 SameAs = _core_.SameAs
11510 Absolute = _core_.Absolute
11511 class IndividualLayoutConstraint(Object):
11512 """
11513 Objects of this class are stored in the `wx.LayoutConstraints` class as
11514 one of eight possible constraints that a window can be involved in.
11515 You will never need to create an instance of
11516 wx.IndividualLayoutConstraint, rather you should create a
11517 `wx.LayoutConstraints` instance and use the individual contstraints
11518 that it contains.
11519 """
11520 def __init__(self): raise RuntimeError, "No constructor defined"
11521 def __repr__(self):
11522 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11523 def Set(*args, **kwargs):
11524 """
11525 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
11526
11527 Sets the properties of the constraint. Normally called by one of the
11528 convenience functions such as Above, RightOf, SameAs.
11529 """
11530 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
11531
11532 def LeftOf(*args, **kwargs):
11533 """
11534 LeftOf(self, Window sibling, int marg=0)
11535
11536 Constrains this edge to be to the left of the given window, with an
11537 optional margin. Implicitly, this is relative to the left edge of the
11538 other window.
11539 """
11540 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
11541
11542 def RightOf(*args, **kwargs):
11543 """
11544 RightOf(self, Window sibling, int marg=0)
11545
11546 Constrains this edge to be to the right of the given window, with an
11547 optional margin. Implicitly, this is relative to the right edge of the
11548 other window.
11549 """
11550 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
11551
11552 def Above(*args, **kwargs):
11553 """
11554 Above(self, Window sibling, int marg=0)
11555
11556 Constrains this edge to be above the given window, with an optional
11557 margin. Implicitly, this is relative to the top edge of the other
11558 window.
11559 """
11560 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
11561
11562 def Below(*args, **kwargs):
11563 """
11564 Below(self, Window sibling, int marg=0)
11565
11566 Constrains this edge to be below the given window, with an optional
11567 margin. Implicitly, this is relative to the bottom edge of the other
11568 window.
11569 """
11570 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
11571
11572 def SameAs(*args, **kwargs):
11573 """
11574 SameAs(self, Window otherW, int edge, int marg=0)
11575
11576 Constrains this edge or dimension to be to the same as the edge of the
11577 given window, with an optional margin.
11578 """
11579 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
11580
11581 def PercentOf(*args, **kwargs):
11582 """
11583 PercentOf(self, Window otherW, int wh, int per)
11584
11585 Constrains this edge or dimension to be to a percentage of the given
11586 window, with an optional margin.
11587 """
11588 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
11589
11590 def Absolute(*args, **kwargs):
11591 """
11592 Absolute(self, int val)
11593
11594 Constrains this edge or dimension to be the given absolute value.
11595 """
11596 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
11597
11598 def Unconstrained(*args, **kwargs):
11599 """
11600 Unconstrained(self)
11601
11602 Sets this edge or dimension to be unconstrained, that is, dependent on
11603 other edges and dimensions from which this value can be deduced.
11604 """
11605 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
11606
11607 def AsIs(*args, **kwargs):
11608 """
11609 AsIs(self)
11610
11611 Sets this edge or constraint to be whatever the window's value is at
11612 the moment. If either of the width and height constraints are *as is*,
11613 the window will not be resized, but moved instead. This is important
11614 when considering panel items which are intended to have a default
11615 size, such as a button, which may take its size from the size of the
11616 button label.
11617 """
11618 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
11619
11620 def GetOtherWindow(*args, **kwargs):
11621 """GetOtherWindow(self) -> Window"""
11622 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
11623
11624 def GetMyEdge(*args, **kwargs):
11625 """GetMyEdge(self) -> int"""
11626 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
11627
11628 def SetEdge(*args, **kwargs):
11629 """SetEdge(self, int which)"""
11630 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
11631
11632 def SetValue(*args, **kwargs):
11633 """SetValue(self, int v)"""
11634 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
11635
11636 def GetMargin(*args, **kwargs):
11637 """GetMargin(self) -> int"""
11638 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
11639
11640 def SetMargin(*args, **kwargs):
11641 """SetMargin(self, int m)"""
11642 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
11643
11644 def GetValue(*args, **kwargs):
11645 """GetValue(self) -> int"""
11646 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
11647
11648 def GetPercent(*args, **kwargs):
11649 """GetPercent(self) -> int"""
11650 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
11651
11652 def GetOtherEdge(*args, **kwargs):
11653 """GetOtherEdge(self) -> int"""
11654 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
11655
11656 def GetDone(*args, **kwargs):
11657 """GetDone(self) -> bool"""
11658 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
11659
11660 def SetDone(*args, **kwargs):
11661 """SetDone(self, bool d)"""
11662 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
11663
11664 def GetRelationship(*args, **kwargs):
11665 """GetRelationship(self) -> int"""
11666 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
11667
11668 def SetRelationship(*args, **kwargs):
11669 """SetRelationship(self, int r)"""
11670 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
11671
11672 def ResetIfWin(*args, **kwargs):
11673 """
11674 ResetIfWin(self, Window otherW) -> bool
11675
11676 Reset constraint if it mentions otherWin
11677 """
11678 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
11679
11680 def SatisfyConstraint(*args, **kwargs):
11681 """
11682 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11683
11684 Try to satisfy constraint
11685 """
11686 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
11687
11688 def GetEdge(*args, **kwargs):
11689 """
11690 GetEdge(self, int which, Window thisWin, Window other) -> int
11691
11692 Get the value of this edge or dimension, or if this
11693 is not determinable, -1.
11694 """
11695 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
11696
11697
11698 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11699 def __init__(self, this):
11700 self.this = this
11701 if not hasattr(self,"thisown"): self.thisown = 0
11702 self.__class__ = IndividualLayoutConstraint
11703 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
11704
11705 class LayoutConstraints(Object):
11706 """
11707 **Note:** constraints are now deprecated and you should use sizers
11708 instead.
11709
11710 Objects of this class can be associated with a window to define its
11711 layout constraints, with respect to siblings or its parent.
11712
11713 The class consists of the following eight constraints of class
11714 wx.IndividualLayoutConstraint, some or all of which should be accessed
11715 directly to set the appropriate constraints.
11716
11717 * left: represents the left hand edge of the window
11718 * right: represents the right hand edge of the window
11719 * top: represents the top edge of the window
11720 * bottom: represents the bottom edge of the window
11721 * width: represents the width of the window
11722 * height: represents the height of the window
11723 * centreX: represents the horizontal centre point of the window
11724 * centreY: represents the vertical centre point of the window
11725
11726 Most constraints are initially set to have the relationship
11727 wxUnconstrained, which means that their values should be calculated by
11728 looking at known constraints. The exceptions are width and height,
11729 which are set to wxAsIs to ensure that if the user does not specify a
11730 constraint, the existing width and height will be used, to be
11731 compatible with panel items which often have take a default size. If
11732 the constraint is ``wx.AsIs``, the dimension will not be changed.
11733
11734 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11735
11736 """
11737 def __repr__(self):
11738 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11739 left = property(_core_.LayoutConstraints_left_get)
11740 top = property(_core_.LayoutConstraints_top_get)
11741 right = property(_core_.LayoutConstraints_right_get)
11742 bottom = property(_core_.LayoutConstraints_bottom_get)
11743 width = property(_core_.LayoutConstraints_width_get)
11744 height = property(_core_.LayoutConstraints_height_get)
11745 centreX = property(_core_.LayoutConstraints_centreX_get)
11746 centreY = property(_core_.LayoutConstraints_centreY_get)
11747 def __init__(self, *args, **kwargs):
11748 """__init__(self) -> LayoutConstraints"""
11749 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
11750 self.this = newobj.this
11751 self.thisown = 1
11752 del newobj.thisown
11753 def SatisfyConstraints(*args, **kwargs):
11754 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11755 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
11756
11757 def AreSatisfied(*args, **kwargs):
11758 """AreSatisfied(self) -> bool"""
11759 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
11760
11761
11762 class LayoutConstraintsPtr(LayoutConstraints):
11763 def __init__(self, this):
11764 self.this = this
11765 if not hasattr(self,"thisown"): self.thisown = 0
11766 self.__class__ = LayoutConstraints
11767 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
11768
11769 #----------------------------------------------------------------------------
11770
11771 # Use Python's bool constants if available, make some if not
11772 try:
11773 True
11774 except NameError:
11775 __builtins__.True = 1==1
11776 __builtins__.False = 1==0
11777 def bool(value): return not not value
11778 __builtins__.bool = bool
11779
11780
11781
11782 # workarounds for bad wxRTTI names
11783 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11784 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11785 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11786
11787
11788 #----------------------------------------------------------------------------
11789 # Load version numbers from __version__... Ensure that major and minor
11790 # versions are the same for both wxPython and wxWidgets.
11791
11792 from __version__ import *
11793 __version__ = VERSION_STRING
11794
11795 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11796 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
11797 if RELEASE_VERSION != _core_.RELEASE_VERSION:
11798 import warnings
11799 warnings.warn("wxPython/wxWidgets release number mismatch")
11800
11801 #----------------------------------------------------------------------------
11802
11803 # Set wxPython's default string<-->unicode conversion encoding from
11804 # the locale, but only if Python's default hasn't been changed. (We
11805 # assume that if the user has customized it already then that is the
11806 # encoding we need to use as well.)
11807 #
11808 # The encoding selected here is used when string or unicode objects
11809 # need to be converted in order to pass them to wxWidgets. Please be
11810 # aware that the default encoding within the same locale may be
11811 # slightly different on different platforms. For example, please see
11812 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11813 # between the common latin/roman encodings.
11814
11815 default = _sys.getdefaultencoding()
11816 if default == 'ascii':
11817 import locale
11818 import codecs
11819 try:
11820 default = locale.getdefaultlocale()[1]
11821 codecs.lookup(default)
11822 except (ValueError, LookupError, TypeError):
11823 default = _sys.getdefaultencoding()
11824 del locale
11825 del codecs
11826 if default:
11827 wx.SetDefaultPyEncoding(default)
11828 del default
11829
11830 #----------------------------------------------------------------------------
11831
11832 class PyDeadObjectError(AttributeError):
11833 pass
11834
11835 class _wxPyDeadObject(object):
11836 """
11837 Instances of wx objects that are OOR capable will have their __class__
11838 changed to this class when the C++ object is deleted. This should help
11839 prevent crashes due to referencing a bogus C++ pointer.
11840 """
11841 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11842 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11843
11844 def __repr__(self):
11845 if not hasattr(self, "_name"):
11846 self._name = "[unknown]"
11847 return self.reprStr % self._name
11848
11849 def __getattr__(self, *args):
11850 if not hasattr(self, "_name"):
11851 self._name = "[unknown]"
11852 raise PyDeadObjectError(self.attrStr % self._name)
11853
11854 def __nonzero__(self):
11855 return 0
11856
11857
11858
11859 class PyUnbornObjectError(AttributeError):
11860 pass
11861
11862 class _wxPyUnbornObject(object):
11863 """
11864 Some stock objects are created when the wx._core module is
11865 imported, but their C++ instance is not created until the wx.App
11866 object is created and initialized. These object instances will
11867 temporarily have their __class__ changed to this class so an
11868 exception will be raised if they are used before the C++ instance
11869 is ready.
11870 """
11871
11872 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11873 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11874
11875 def __repr__(self):
11876 #if not hasattr(self, "_name"):
11877 # self._name = "[unknown]"
11878 return self.reprStr #% self._name
11879
11880 def __getattr__(self, *args):
11881 #if not hasattr(self, "_name"):
11882 # self._name = "[unknown]"
11883 raise PyUnbornObjectError(self.attrStr) # % self._name )
11884
11885 def __nonzero__(self):
11886 return 0
11887
11888
11889 #----------------------------------------------------------------------------
11890
11891 def CallAfter(callable, *args, **kw):
11892 """
11893 Call the specified function after the current and pending event
11894 handlers have been completed. This is also good for making GUI
11895 method calls from non-GUI threads. Any extra positional or
11896 keyword args are passed on to the callable when it is called.
11897
11898 :see: `wx.FutureCall`
11899 """
11900 app = wx.GetApp()
11901 assert app is not None, 'No wx.App created yet'
11902
11903 if not hasattr(app, "_CallAfterId"):
11904 app._CallAfterId = wx.NewEventType()
11905 app.Connect(-1, -1, app._CallAfterId,
11906 lambda event: event.callable(*event.args, **event.kw) )
11907 evt = wx.PyEvent()
11908 evt.SetEventType(app._CallAfterId)
11909 evt.callable = callable
11910 evt.args = args
11911 evt.kw = kw
11912 wx.PostEvent(app, evt)
11913
11914 #----------------------------------------------------------------------------
11915
11916
11917 class FutureCall:
11918 """
11919 A convenience class for `wx.Timer`, that calls the given callable
11920 object once after the given amount of milliseconds, passing any
11921 positional or keyword args. The return value of the callable is
11922 availbale after it has been run with the `GetResult` method.
11923
11924 If you don't need to get the return value or restart the timer
11925 then there is no need to hold a reference to this object. It will
11926 hold a reference to itself while the timer is running (the timer
11927 has a reference to self.Notify) but the cycle will be broken when
11928 the timer completes, automatically cleaning up the wx.FutureCall
11929 object.
11930
11931 :see: `wx.CallAfter`
11932 """
11933 def __init__(self, millis, callable, *args, **kwargs):
11934 self.millis = millis
11935 self.callable = callable
11936 self.SetArgs(*args, **kwargs)
11937 self.runCount = 0
11938 self.running = False
11939 self.hasRun = False
11940 self.result = None
11941 self.timer = None
11942 self.Start()
11943
11944 def __del__(self):
11945 self.Stop()
11946
11947
11948 def Start(self, millis=None, *args, **kwargs):
11949 """
11950 (Re)start the timer
11951 """
11952 self.hasRun = False
11953 if millis is not None:
11954 self.millis = millis
11955 if args or kwargs:
11956 self.SetArgs(*args, **kwargs)
11957 self.Stop()
11958 self.timer = wx.PyTimer(self.Notify)
11959 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11960 self.running = True
11961 Restart = Start
11962
11963
11964 def Stop(self):
11965 """
11966 Stop and destroy the timer.
11967 """
11968 if self.timer is not None:
11969 self.timer.Stop()
11970 self.timer = None
11971
11972
11973 def GetInterval(self):
11974 if self.timer is not None:
11975 return self.timer.GetInterval()
11976 else:
11977 return 0
11978
11979
11980 def IsRunning(self):
11981 return self.timer is not None and self.timer.IsRunning()
11982
11983
11984 def SetArgs(self, *args, **kwargs):
11985 """
11986 (Re)set the args passed to the callable object. This is
11987 useful in conjunction with Restart if you want to schedule a
11988 new call to the same callable object but with different
11989 parameters.
11990 """
11991 self.args = args
11992 self.kwargs = kwargs
11993
11994
11995 def HasRun(self):
11996 return self.hasRun
11997
11998 def GetResult(self):
11999 return self.result
12000
12001 def Notify(self):
12002 """
12003 The timer has expired so call the callable.
12004 """
12005 if self.callable and getattr(self.callable, 'im_self', True):
12006 self.runCount += 1
12007 self.running = False
12008 self.result = self.callable(*self.args, **self.kwargs)
12009 self.hasRun = True
12010 if not self.running:
12011 # if it wasn't restarted, then cleanup
12012 wx.CallAfter(self.Stop)
12013
12014
12015
12016 #----------------------------------------------------------------------------
12017 # Control which items in this module should be documented by epydoc.
12018 # We allow only classes and functions, which will help reduce the size
12019 # of the docs by filtering out the zillions of constants, EVT objects,
12020 # and etc that don't make much sense by themselves, but are instead
12021 # documented (or will be) as part of the classes/functions/methods
12022 # where they should be used.
12023
12024 class __DocFilter:
12025 """
12026 A filter for epydoc that only allows non-Ptr classes and
12027 fucntions, in order to reduce the clutter in the API docs.
12028 """
12029 def __init__(self, globals):
12030 self._globals = globals
12031
12032 def __call__(self, name):
12033 import types
12034 obj = self._globals.get(name, None)
12035 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
12036 return False
12037 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
12038 return False
12039 return True
12040
12041 #----------------------------------------------------------------------------
12042 #----------------------------------------------------------------------------
12043
12044 # Import other modules in this package that should show up in the
12045 # "core" wx namespace
12046 from _gdi import *
12047 from _windows import *
12048 from _controls import *
12049 from _misc import *
12050
12051
12052 # Fixup the stock objects since they can't be used yet. (They will be
12053 # restored in wx.PyApp.OnInit.)
12054 _core_._wxPyFixStockObjects()
12055
12056 #----------------------------------------------------------------------------
12057 #----------------------------------------------------------------------------
12058
12059