]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/mac/_core.py
reSWIGged
[wxWidgets.git] / wxPython / src / mac / _core.py
1 # This file was created automatically by SWIG 1.3.29.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _core_
5 import new
6 new_instancemethod = new.instancemethod
7 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
8 if (name == "thisown"): return self.this.own(value)
9 if (name == "this"):
10 if type(value).__name__ == 'PySwigObject':
11 self.__dict__[name] = value
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):
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 if (name == "thisown"): return self.this.own()
25 method = class_type.__swig_getmethods__.get(name,None)
26 if method: return method(self)
27 raise AttributeError,name
28
29 def _swig_repr(self):
30 try: strthis = "proxy of " + self.this.__repr__()
31 except: strthis = ""
32 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
33
34 import types
35 try:
36 _object = types.ObjectType
37 _newclass = 1
38 except AttributeError:
39 class _object : pass
40 _newclass = 0
41 del types
42
43
44 def _swig_setattr_nondynamic_method(set):
45 def set_attr(self,name,value):
46 if (name == "thisown"): return self.this.own(value)
47 if hasattr(self,name) or (name == "this"):
48 set(self,name,value)
49 else:
50 raise AttributeError("You cannot add attributes to %s" % self)
51 return set_attr
52
53
54 #// Give a reference to the dictionary of this module to the C++ extension
55 #// code.
56 _core_._wxPySetDictionary(vars())
57
58 #// A little trick to make 'wx' be a reference to this module so wx.Names can
59 #// be used here.
60 import sys as _sys
61 wx = _sys.modules[__name__]
62
63
64 #----------------------------------------------------------------------------
65
66 def _deprecated(callable, msg=None):
67 """
68 Create a wrapper function that will raise a DeprecationWarning
69 before calling the callable.
70 """
71 if msg is None:
72 msg = "%s is deprecated" % callable
73 def deprecatedWrapper(*args, **kwargs):
74 import warnings
75 warnings.warn(msg, DeprecationWarning, stacklevel=2)
76 return callable(*args, **kwargs)
77 deprecatedWrapper.__doc__ = msg
78 return deprecatedWrapper
79
80
81 #----------------------------------------------------------------------------
82
83 NOT_FOUND = _core_.NOT_FOUND
84 VSCROLL = _core_.VSCROLL
85 HSCROLL = _core_.HSCROLL
86 CAPTION = _core_.CAPTION
87 DOUBLE_BORDER = _core_.DOUBLE_BORDER
88 SUNKEN_BORDER = _core_.SUNKEN_BORDER
89 RAISED_BORDER = _core_.RAISED_BORDER
90 BORDER = _core_.BORDER
91 SIMPLE_BORDER = _core_.SIMPLE_BORDER
92 STATIC_BORDER = _core_.STATIC_BORDER
93 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
94 NO_BORDER = _core_.NO_BORDER
95 DEFAULT_CONTROL_BORDER = _core_.DEFAULT_CONTROL_BORDER
96 DEFAULT_STATUSBAR_STYLE = _core_.DEFAULT_STATUSBAR_STYLE
97 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
98 WANTS_CHARS = _core_.WANTS_CHARS
99 POPUP_WINDOW = _core_.POPUP_WINDOW
100 CENTER_FRAME = _core_.CENTER_FRAME
101 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
102 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
103 CLIP_CHILDREN = _core_.CLIP_CHILDREN
104 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
105 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
106 RETAINED = _core_.RETAINED
107 BACKINGSTORE = _core_.BACKINGSTORE
108 COLOURED = _core_.COLOURED
109 FIXED_LENGTH = _core_.FIXED_LENGTH
110 LB_NEEDED_SB = _core_.LB_NEEDED_SB
111 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
112 LB_SORT = _core_.LB_SORT
113 LB_SINGLE = _core_.LB_SINGLE
114 LB_MULTIPLE = _core_.LB_MULTIPLE
115 LB_EXTENDED = _core_.LB_EXTENDED
116 LB_OWNERDRAW = _core_.LB_OWNERDRAW
117 LB_HSCROLL = _core_.LB_HSCROLL
118 PROCESS_ENTER = _core_.PROCESS_ENTER
119 PASSWORD = _core_.PASSWORD
120 CB_SIMPLE = _core_.CB_SIMPLE
121 CB_DROPDOWN = _core_.CB_DROPDOWN
122 CB_SORT = _core_.CB_SORT
123 CB_READONLY = _core_.CB_READONLY
124 RA_HORIZONTAL = _core_.RA_HORIZONTAL
125 RA_VERTICAL = _core_.RA_VERTICAL
126 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
127 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
128 RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
129 RB_GROUP = _core_.RB_GROUP
130 RB_SINGLE = _core_.RB_SINGLE
131 SB_HORIZONTAL = _core_.SB_HORIZONTAL
132 SB_VERTICAL = _core_.SB_VERTICAL
133 RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
134 ST_SIZEGRIP = _core_.ST_SIZEGRIP
135 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
136 ST_DOTS_MIDDLE = _core_.ST_DOTS_MIDDLE
137 ST_DOTS_END = _core_.ST_DOTS_END
138 FLOOD_SURFACE = _core_.FLOOD_SURFACE
139 FLOOD_BORDER = _core_.FLOOD_BORDER
140 ODDEVEN_RULE = _core_.ODDEVEN_RULE
141 WINDING_RULE = _core_.WINDING_RULE
142 TOOL_TOP = _core_.TOOL_TOP
143 TOOL_BOTTOM = _core_.TOOL_BOTTOM
144 TOOL_LEFT = _core_.TOOL_LEFT
145 TOOL_RIGHT = _core_.TOOL_RIGHT
146 OK = _core_.OK
147 YES_NO = _core_.YES_NO
148 CANCEL = _core_.CANCEL
149 YES = _core_.YES
150 NO = _core_.NO
151 NO_DEFAULT = _core_.NO_DEFAULT
152 YES_DEFAULT = _core_.YES_DEFAULT
153 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
154 ICON_HAND = _core_.ICON_HAND
155 ICON_QUESTION = _core_.ICON_QUESTION
156 ICON_INFORMATION = _core_.ICON_INFORMATION
157 ICON_STOP = _core_.ICON_STOP
158 ICON_ASTERISK = _core_.ICON_ASTERISK
159 ICON_MASK = _core_.ICON_MASK
160 ICON_WARNING = _core_.ICON_WARNING
161 ICON_ERROR = _core_.ICON_ERROR
162 FORWARD = _core_.FORWARD
163 BACKWARD = _core_.BACKWARD
164 RESET = _core_.RESET
165 HELP = _core_.HELP
166 MORE = _core_.MORE
167 SETUP = _core_.SETUP
168 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
169 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
170 SIZE_AUTO = _core_.SIZE_AUTO
171 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
172 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
173 SIZE_FORCE = _core_.SIZE_FORCE
174 PORTRAIT = _core_.PORTRAIT
175 LANDSCAPE = _core_.LANDSCAPE
176 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
177 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
178 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
179 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
180 ID_ANY = _core_.ID_ANY
181 ID_SEPARATOR = _core_.ID_SEPARATOR
182 ID_NONE = _core_.ID_NONE
183 ID_LOWEST = _core_.ID_LOWEST
184 ID_OPEN = _core_.ID_OPEN
185 ID_CLOSE = _core_.ID_CLOSE
186 ID_NEW = _core_.ID_NEW
187 ID_SAVE = _core_.ID_SAVE
188 ID_SAVEAS = _core_.ID_SAVEAS
189 ID_REVERT = _core_.ID_REVERT
190 ID_EXIT = _core_.ID_EXIT
191 ID_UNDO = _core_.ID_UNDO
192 ID_REDO = _core_.ID_REDO
193 ID_HELP = _core_.ID_HELP
194 ID_PRINT = _core_.ID_PRINT
195 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
196 ID_PREVIEW = _core_.ID_PREVIEW
197 ID_ABOUT = _core_.ID_ABOUT
198 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
199 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
200 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
201 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
202 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
203 ID_PREFERENCES = _core_.ID_PREFERENCES
204 ID_CUT = _core_.ID_CUT
205 ID_COPY = _core_.ID_COPY
206 ID_PASTE = _core_.ID_PASTE
207 ID_CLEAR = _core_.ID_CLEAR
208 ID_FIND = _core_.ID_FIND
209 ID_DUPLICATE = _core_.ID_DUPLICATE
210 ID_SELECTALL = _core_.ID_SELECTALL
211 ID_DELETE = _core_.ID_DELETE
212 ID_REPLACE = _core_.ID_REPLACE
213 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
214 ID_PROPERTIES = _core_.ID_PROPERTIES
215 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
216 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
217 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
218 ID_VIEW_LIST = _core_.ID_VIEW_LIST
219 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
220 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
221 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
222 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
223 ID_FILE1 = _core_.ID_FILE1
224 ID_FILE2 = _core_.ID_FILE2
225 ID_FILE3 = _core_.ID_FILE3
226 ID_FILE4 = _core_.ID_FILE4
227 ID_FILE5 = _core_.ID_FILE5
228 ID_FILE6 = _core_.ID_FILE6
229 ID_FILE7 = _core_.ID_FILE7
230 ID_FILE8 = _core_.ID_FILE8
231 ID_FILE9 = _core_.ID_FILE9
232 ID_OK = _core_.ID_OK
233 ID_CANCEL = _core_.ID_CANCEL
234 ID_APPLY = _core_.ID_APPLY
235 ID_YES = _core_.ID_YES
236 ID_NO = _core_.ID_NO
237 ID_STATIC = _core_.ID_STATIC
238 ID_FORWARD = _core_.ID_FORWARD
239 ID_BACKWARD = _core_.ID_BACKWARD
240 ID_DEFAULT = _core_.ID_DEFAULT
241 ID_MORE = _core_.ID_MORE
242 ID_SETUP = _core_.ID_SETUP
243 ID_RESET = _core_.ID_RESET
244 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
245 ID_YESTOALL = _core_.ID_YESTOALL
246 ID_NOTOALL = _core_.ID_NOTOALL
247 ID_ABORT = _core_.ID_ABORT
248 ID_RETRY = _core_.ID_RETRY
249 ID_IGNORE = _core_.ID_IGNORE
250 ID_ADD = _core_.ID_ADD
251 ID_REMOVE = _core_.ID_REMOVE
252 ID_UP = _core_.ID_UP
253 ID_DOWN = _core_.ID_DOWN
254 ID_HOME = _core_.ID_HOME
255 ID_REFRESH = _core_.ID_REFRESH
256 ID_STOP = _core_.ID_STOP
257 ID_INDEX = _core_.ID_INDEX
258 ID_BOLD = _core_.ID_BOLD
259 ID_ITALIC = _core_.ID_ITALIC
260 ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
261 ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
262 ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
263 ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
264 ID_UNDERLINE = _core_.ID_UNDERLINE
265 ID_INDENT = _core_.ID_INDENT
266 ID_UNINDENT = _core_.ID_UNINDENT
267 ID_ZOOM_100 = _core_.ID_ZOOM_100
268 ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
269 ID_ZOOM_IN = _core_.ID_ZOOM_IN
270 ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
271 ID_UNDELETE = _core_.ID_UNDELETE
272 ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
273 ID_HIGHEST = _core_.ID_HIGHEST
274 OPEN = _core_.OPEN
275 SAVE = _core_.SAVE
276 HIDE_READONLY = _core_.HIDE_READONLY
277 OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
278 FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
279 MULTIPLE = _core_.MULTIPLE
280 CHANGE_DIR = _core_.CHANGE_DIR
281 ACCEL_ALT = _core_.ACCEL_ALT
282 ACCEL_CTRL = _core_.ACCEL_CTRL
283 ACCEL_SHIFT = _core_.ACCEL_SHIFT
284 ACCEL_NORMAL = _core_.ACCEL_NORMAL
285 PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
286 PD_APP_MODAL = _core_.PD_APP_MODAL
287 PD_CAN_ABORT = _core_.PD_CAN_ABORT
288 PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
289 PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
290 PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
291 PD_SMOOTH = _core_.PD_SMOOTH
292 PD_CAN_SKIP = _core_.PD_CAN_SKIP
293 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
294 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
295 MENU_TEAROFF = _core_.MENU_TEAROFF
296 MB_DOCKABLE = _core_.MB_DOCKABLE
297 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
298 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
299 LI_HORIZONTAL = _core_.LI_HORIZONTAL
300 LI_VERTICAL = _core_.LI_VERTICAL
301 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
302 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
303 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
304 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
305 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
306 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
307 MM_TEXT = _core_.MM_TEXT
308 MM_LOMETRIC = _core_.MM_LOMETRIC
309 MM_HIMETRIC = _core_.MM_HIMETRIC
310 MM_LOENGLISH = _core_.MM_LOENGLISH
311 MM_HIENGLISH = _core_.MM_HIENGLISH
312 MM_TWIPS = _core_.MM_TWIPS
313 MM_ISOTROPIC = _core_.MM_ISOTROPIC
314 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
315 MM_POINTS = _core_.MM_POINTS
316 MM_METRIC = _core_.MM_METRIC
317 CENTRE = _core_.CENTRE
318 CENTER = _core_.CENTER
319 HORIZONTAL = _core_.HORIZONTAL
320 VERTICAL = _core_.VERTICAL
321 BOTH = _core_.BOTH
322 LEFT = _core_.LEFT
323 RIGHT = _core_.RIGHT
324 UP = _core_.UP
325 DOWN = _core_.DOWN
326 TOP = _core_.TOP
327 BOTTOM = _core_.BOTTOM
328 NORTH = _core_.NORTH
329 SOUTH = _core_.SOUTH
330 WEST = _core_.WEST
331 EAST = _core_.EAST
332 ALL = _core_.ALL
333 ALIGN_NOT = _core_.ALIGN_NOT
334 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
335 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
336 ALIGN_LEFT = _core_.ALIGN_LEFT
337 ALIGN_TOP = _core_.ALIGN_TOP
338 ALIGN_RIGHT = _core_.ALIGN_RIGHT
339 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
340 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
341 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
342 ALIGN_CENTER = _core_.ALIGN_CENTER
343 ALIGN_CENTRE = _core_.ALIGN_CENTRE
344 ALIGN_MASK = _core_.ALIGN_MASK
345 STRETCH_NOT = _core_.STRETCH_NOT
346 SHRINK = _core_.SHRINK
347 GROW = _core_.GROW
348 EXPAND = _core_.EXPAND
349 SHAPED = _core_.SHAPED
350 FIXED_MINSIZE = _core_.FIXED_MINSIZE
351 TILE = _core_.TILE
352 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
353 BORDER_DEFAULT = _core_.BORDER_DEFAULT
354 BORDER_NONE = _core_.BORDER_NONE
355 BORDER_STATIC = _core_.BORDER_STATIC
356 BORDER_SIMPLE = _core_.BORDER_SIMPLE
357 BORDER_RAISED = _core_.BORDER_RAISED
358 BORDER_SUNKEN = _core_.BORDER_SUNKEN
359 BORDER_DOUBLE = _core_.BORDER_DOUBLE
360 BORDER_MASK = _core_.BORDER_MASK
361 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
362 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
363 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
364 DEFAULT = _core_.DEFAULT
365 DECORATIVE = _core_.DECORATIVE
366 ROMAN = _core_.ROMAN
367 SCRIPT = _core_.SCRIPT
368 SWISS = _core_.SWISS
369 MODERN = _core_.MODERN
370 TELETYPE = _core_.TELETYPE
371 VARIABLE = _core_.VARIABLE
372 FIXED = _core_.FIXED
373 NORMAL = _core_.NORMAL
374 LIGHT = _core_.LIGHT
375 BOLD = _core_.BOLD
376 ITALIC = _core_.ITALIC
377 SLANT = _core_.SLANT
378 SOLID = _core_.SOLID
379 DOT = _core_.DOT
380 LONG_DASH = _core_.LONG_DASH
381 SHORT_DASH = _core_.SHORT_DASH
382 DOT_DASH = _core_.DOT_DASH
383 USER_DASH = _core_.USER_DASH
384 TRANSPARENT = _core_.TRANSPARENT
385 STIPPLE = _core_.STIPPLE
386 STIPPLE_MASK = _core_.STIPPLE_MASK
387 STIPPLE_MASK_OPAQUE = _core_.STIPPLE_MASK_OPAQUE
388 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
389 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
390 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
391 CROSS_HATCH = _core_.CROSS_HATCH
392 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
393 VERTICAL_HATCH = _core_.VERTICAL_HATCH
394 JOIN_BEVEL = _core_.JOIN_BEVEL
395 JOIN_MITER = _core_.JOIN_MITER
396 JOIN_ROUND = _core_.JOIN_ROUND
397 CAP_ROUND = _core_.CAP_ROUND
398 CAP_PROJECTING = _core_.CAP_PROJECTING
399 CAP_BUTT = _core_.CAP_BUTT
400 CLEAR = _core_.CLEAR
401 XOR = _core_.XOR
402 INVERT = _core_.INVERT
403 OR_REVERSE = _core_.OR_REVERSE
404 AND_REVERSE = _core_.AND_REVERSE
405 COPY = _core_.COPY
406 AND = _core_.AND
407 AND_INVERT = _core_.AND_INVERT
408 NO_OP = _core_.NO_OP
409 NOR = _core_.NOR
410 EQUIV = _core_.EQUIV
411 SRC_INVERT = _core_.SRC_INVERT
412 OR_INVERT = _core_.OR_INVERT
413 NAND = _core_.NAND
414 OR = _core_.OR
415 SET = _core_.SET
416 WXK_BACK = _core_.WXK_BACK
417 WXK_TAB = _core_.WXK_TAB
418 WXK_RETURN = _core_.WXK_RETURN
419 WXK_ESCAPE = _core_.WXK_ESCAPE
420 WXK_SPACE = _core_.WXK_SPACE
421 WXK_DELETE = _core_.WXK_DELETE
422 WXK_START = _core_.WXK_START
423 WXK_LBUTTON = _core_.WXK_LBUTTON
424 WXK_RBUTTON = _core_.WXK_RBUTTON
425 WXK_CANCEL = _core_.WXK_CANCEL
426 WXK_MBUTTON = _core_.WXK_MBUTTON
427 WXK_CLEAR = _core_.WXK_CLEAR
428 WXK_SHIFT = _core_.WXK_SHIFT
429 WXK_ALT = _core_.WXK_ALT
430 WXK_CONTROL = _core_.WXK_CONTROL
431 WXK_MENU = _core_.WXK_MENU
432 WXK_PAUSE = _core_.WXK_PAUSE
433 WXK_CAPITAL = _core_.WXK_CAPITAL
434 WXK_PRIOR = _core_.WXK_PRIOR
435 WXK_NEXT = _core_.WXK_NEXT
436 WXK_END = _core_.WXK_END
437 WXK_HOME = _core_.WXK_HOME
438 WXK_LEFT = _core_.WXK_LEFT
439 WXK_UP = _core_.WXK_UP
440 WXK_RIGHT = _core_.WXK_RIGHT
441 WXK_DOWN = _core_.WXK_DOWN
442 WXK_SELECT = _core_.WXK_SELECT
443 WXK_PRINT = _core_.WXK_PRINT
444 WXK_EXECUTE = _core_.WXK_EXECUTE
445 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
446 WXK_INSERT = _core_.WXK_INSERT
447 WXK_HELP = _core_.WXK_HELP
448 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
449 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
450 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
451 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
452 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
453 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
454 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
455 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
456 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
457 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
458 WXK_MULTIPLY = _core_.WXK_MULTIPLY
459 WXK_ADD = _core_.WXK_ADD
460 WXK_SEPARATOR = _core_.WXK_SEPARATOR
461 WXK_SUBTRACT = _core_.WXK_SUBTRACT
462 WXK_DECIMAL = _core_.WXK_DECIMAL
463 WXK_DIVIDE = _core_.WXK_DIVIDE
464 WXK_F1 = _core_.WXK_F1
465 WXK_F2 = _core_.WXK_F2
466 WXK_F3 = _core_.WXK_F3
467 WXK_F4 = _core_.WXK_F4
468 WXK_F5 = _core_.WXK_F5
469 WXK_F6 = _core_.WXK_F6
470 WXK_F7 = _core_.WXK_F7
471 WXK_F8 = _core_.WXK_F8
472 WXK_F9 = _core_.WXK_F9
473 WXK_F10 = _core_.WXK_F10
474 WXK_F11 = _core_.WXK_F11
475 WXK_F12 = _core_.WXK_F12
476 WXK_F13 = _core_.WXK_F13
477 WXK_F14 = _core_.WXK_F14
478 WXK_F15 = _core_.WXK_F15
479 WXK_F16 = _core_.WXK_F16
480 WXK_F17 = _core_.WXK_F17
481 WXK_F18 = _core_.WXK_F18
482 WXK_F19 = _core_.WXK_F19
483 WXK_F20 = _core_.WXK_F20
484 WXK_F21 = _core_.WXK_F21
485 WXK_F22 = _core_.WXK_F22
486 WXK_F23 = _core_.WXK_F23
487 WXK_F24 = _core_.WXK_F24
488 WXK_NUMLOCK = _core_.WXK_NUMLOCK
489 WXK_SCROLL = _core_.WXK_SCROLL
490 WXK_PAGEUP = _core_.WXK_PAGEUP
491 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
492 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
493 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
494 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
495 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
496 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
497 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
498 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
499 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
500 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
501 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
502 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
503 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
504 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
505 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
506 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
507 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
508 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
509 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
510 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
511 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
512 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
513 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
514 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
515 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
516 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
517 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
518 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
519 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
520 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
521 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
522 WXK_COMMAND = _core_.WXK_COMMAND
523 WXK_SPECIAL1 = _core_.WXK_SPECIAL1
524 WXK_SPECIAL2 = _core_.WXK_SPECIAL2
525 WXK_SPECIAL3 = _core_.WXK_SPECIAL3
526 WXK_SPECIAL4 = _core_.WXK_SPECIAL4
527 WXK_SPECIAL5 = _core_.WXK_SPECIAL5
528 WXK_SPECIAL6 = _core_.WXK_SPECIAL6
529 WXK_SPECIAL7 = _core_.WXK_SPECIAL7
530 WXK_SPECIAL8 = _core_.WXK_SPECIAL8
531 WXK_SPECIAL9 = _core_.WXK_SPECIAL9
532 WXK_SPECIAL10 = _core_.WXK_SPECIAL10
533 WXK_SPECIAL11 = _core_.WXK_SPECIAL11
534 WXK_SPECIAL12 = _core_.WXK_SPECIAL12
535 WXK_SPECIAL13 = _core_.WXK_SPECIAL13
536 WXK_SPECIAL14 = _core_.WXK_SPECIAL14
537 WXK_SPECIAL15 = _core_.WXK_SPECIAL15
538 WXK_SPECIAL16 = _core_.WXK_SPECIAL16
539 WXK_SPECIAL17 = _core_.WXK_SPECIAL17
540 WXK_SPECIAL18 = _core_.WXK_SPECIAL18
541 WXK_SPECIAL19 = _core_.WXK_SPECIAL19
542 WXK_SPECIAL20 = _core_.WXK_SPECIAL20
543 PAPER_NONE = _core_.PAPER_NONE
544 PAPER_LETTER = _core_.PAPER_LETTER
545 PAPER_LEGAL = _core_.PAPER_LEGAL
546 PAPER_A4 = _core_.PAPER_A4
547 PAPER_CSHEET = _core_.PAPER_CSHEET
548 PAPER_DSHEET = _core_.PAPER_DSHEET
549 PAPER_ESHEET = _core_.PAPER_ESHEET
550 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
551 PAPER_TABLOID = _core_.PAPER_TABLOID
552 PAPER_LEDGER = _core_.PAPER_LEDGER
553 PAPER_STATEMENT = _core_.PAPER_STATEMENT
554 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
555 PAPER_A3 = _core_.PAPER_A3
556 PAPER_A4SMALL = _core_.PAPER_A4SMALL
557 PAPER_A5 = _core_.PAPER_A5
558 PAPER_B4 = _core_.PAPER_B4
559 PAPER_B5 = _core_.PAPER_B5
560 PAPER_FOLIO = _core_.PAPER_FOLIO
561 PAPER_QUARTO = _core_.PAPER_QUARTO
562 PAPER_10X14 = _core_.PAPER_10X14
563 PAPER_11X17 = _core_.PAPER_11X17
564 PAPER_NOTE = _core_.PAPER_NOTE
565 PAPER_ENV_9 = _core_.PAPER_ENV_9
566 PAPER_ENV_10 = _core_.PAPER_ENV_10
567 PAPER_ENV_11 = _core_.PAPER_ENV_11
568 PAPER_ENV_12 = _core_.PAPER_ENV_12
569 PAPER_ENV_14 = _core_.PAPER_ENV_14
570 PAPER_ENV_DL = _core_.PAPER_ENV_DL
571 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
572 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
573 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
574 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
575 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
576 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
577 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
578 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
579 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
580 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
581 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
582 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
583 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
584 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
585 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
586 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
587 PAPER_9X11 = _core_.PAPER_9X11
588 PAPER_10X11 = _core_.PAPER_10X11
589 PAPER_15X11 = _core_.PAPER_15X11
590 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
591 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
592 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
593 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
594 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
595 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
596 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
597 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
598 PAPER_A_PLUS = _core_.PAPER_A_PLUS
599 PAPER_B_PLUS = _core_.PAPER_B_PLUS
600 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
601 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
602 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
603 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
604 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
605 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
606 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
607 PAPER_A2 = _core_.PAPER_A2
608 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
609 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
610 PAPER_DBL_JAPANESE_POSTCARD = _core_.PAPER_DBL_JAPANESE_POSTCARD
611 PAPER_A6 = _core_.PAPER_A6
612 PAPER_JENV_KAKU2 = _core_.PAPER_JENV_KAKU2
613 PAPER_JENV_KAKU3 = _core_.PAPER_JENV_KAKU3
614 PAPER_JENV_CHOU3 = _core_.PAPER_JENV_CHOU3
615 PAPER_JENV_CHOU4 = _core_.PAPER_JENV_CHOU4
616 PAPER_LETTER_ROTATED = _core_.PAPER_LETTER_ROTATED
617 PAPER_A3_ROTATED = _core_.PAPER_A3_ROTATED
618 PAPER_A4_ROTATED = _core_.PAPER_A4_ROTATED
619 PAPER_A5_ROTATED = _core_.PAPER_A5_ROTATED
620 PAPER_B4_JIS_ROTATED = _core_.PAPER_B4_JIS_ROTATED
621 PAPER_B5_JIS_ROTATED = _core_.PAPER_B5_JIS_ROTATED
622 PAPER_JAPANESE_POSTCARD_ROTATED = _core_.PAPER_JAPANESE_POSTCARD_ROTATED
623 PAPER_DBL_JAPANESE_POSTCARD_ROTATED = _core_.PAPER_DBL_JAPANESE_POSTCARD_ROTATED
624 PAPER_A6_ROTATED = _core_.PAPER_A6_ROTATED
625 PAPER_JENV_KAKU2_ROTATED = _core_.PAPER_JENV_KAKU2_ROTATED
626 PAPER_JENV_KAKU3_ROTATED = _core_.PAPER_JENV_KAKU3_ROTATED
627 PAPER_JENV_CHOU3_ROTATED = _core_.PAPER_JENV_CHOU3_ROTATED
628 PAPER_JENV_CHOU4_ROTATED = _core_.PAPER_JENV_CHOU4_ROTATED
629 PAPER_B6_JIS = _core_.PAPER_B6_JIS
630 PAPER_B6_JIS_ROTATED = _core_.PAPER_B6_JIS_ROTATED
631 PAPER_12X11 = _core_.PAPER_12X11
632 PAPER_JENV_YOU4 = _core_.PAPER_JENV_YOU4
633 PAPER_JENV_YOU4_ROTATED = _core_.PAPER_JENV_YOU4_ROTATED
634 PAPER_P16K = _core_.PAPER_P16K
635 PAPER_P32K = _core_.PAPER_P32K
636 PAPER_P32KBIG = _core_.PAPER_P32KBIG
637 PAPER_PENV_1 = _core_.PAPER_PENV_1
638 PAPER_PENV_2 = _core_.PAPER_PENV_2
639 PAPER_PENV_3 = _core_.PAPER_PENV_3
640 PAPER_PENV_4 = _core_.PAPER_PENV_4
641 PAPER_PENV_5 = _core_.PAPER_PENV_5
642 PAPER_PENV_6 = _core_.PAPER_PENV_6
643 PAPER_PENV_7 = _core_.PAPER_PENV_7
644 PAPER_PENV_8 = _core_.PAPER_PENV_8
645 PAPER_PENV_9 = _core_.PAPER_PENV_9
646 PAPER_PENV_10 = _core_.PAPER_PENV_10
647 PAPER_P16K_ROTATED = _core_.PAPER_P16K_ROTATED
648 PAPER_P32K_ROTATED = _core_.PAPER_P32K_ROTATED
649 PAPER_P32KBIG_ROTATED = _core_.PAPER_P32KBIG_ROTATED
650 PAPER_PENV_1_ROTATED = _core_.PAPER_PENV_1_ROTATED
651 PAPER_PENV_2_ROTATED = _core_.PAPER_PENV_2_ROTATED
652 PAPER_PENV_3_ROTATED = _core_.PAPER_PENV_3_ROTATED
653 PAPER_PENV_4_ROTATED = _core_.PAPER_PENV_4_ROTATED
654 PAPER_PENV_5_ROTATED = _core_.PAPER_PENV_5_ROTATED
655 PAPER_PENV_6_ROTATED = _core_.PAPER_PENV_6_ROTATED
656 PAPER_PENV_7_ROTATED = _core_.PAPER_PENV_7_ROTATED
657 PAPER_PENV_8_ROTATED = _core_.PAPER_PENV_8_ROTATED
658 PAPER_PENV_9_ROTATED = _core_.PAPER_PENV_9_ROTATED
659 PAPER_PENV_10_ROTATED = _core_.PAPER_PENV_10_ROTATED
660 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
661 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
662 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
663 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
664 ITEM_NORMAL = _core_.ITEM_NORMAL
665 ITEM_CHECK = _core_.ITEM_CHECK
666 ITEM_RADIO = _core_.ITEM_RADIO
667 ITEM_MAX = _core_.ITEM_MAX
668 HT_NOWHERE = _core_.HT_NOWHERE
669 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
670 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
671 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
672 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
673 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
674 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
675 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
676 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
677 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
678 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
679 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
680 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
681 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
682 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
683 HT_MAX = _core_.HT_MAX
684 MOD_NONE = _core_.MOD_NONE
685 MOD_ALT = _core_.MOD_ALT
686 MOD_CONTROL = _core_.MOD_CONTROL
687 MOD_ALTGR = _core_.MOD_ALTGR
688 MOD_SHIFT = _core_.MOD_SHIFT
689 MOD_META = _core_.MOD_META
690 MOD_WIN = _core_.MOD_WIN
691 MOD_CMD = _core_.MOD_CMD
692 MOD_ALL = _core_.MOD_ALL
693 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
694 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
695 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
696 #---------------------------------------------------------------------------
697
698 class Object(object):
699 """
700 The base class for most wx objects, although in wxPython not
701 much functionality is needed nor exposed.
702 """
703 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
704 def __init__(self): raise AttributeError, "No constructor defined"
705 __repr__ = _swig_repr
706 def GetClassName(*args, **kwargs):
707 """
708 GetClassName(self) -> String
709
710 Returns the class name of the C++ class using wxRTTI.
711 """
712 return _core_.Object_GetClassName(*args, **kwargs)
713
714 def Destroy(*args, **kwargs):
715 """
716 Destroy(self)
717
718 Deletes the C++ object this Python object is a proxy for.
719 """
720 val = _core_.Object_Destroy(*args, **kwargs)
721 args[0].thisown = 0
722 return val
723
724 Object_swigregister = _core_.Object_swigregister
725 Object_swigregister(Object)
726 _wxPySetDictionary = _core_._wxPySetDictionary
727 cvar = _core_.cvar
728 EmptyString = cvar.EmptyString
729
730 #---------------------------------------------------------------------------
731
732 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
733 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
734 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
735 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
736 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
737 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
738 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
739 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
740 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
741 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
742 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
743 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
744 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
745 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
746 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
747 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
748 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
749 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
750 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
751 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
752 CURSOR_NONE = _core_.CURSOR_NONE
753 CURSOR_ARROW = _core_.CURSOR_ARROW
754 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
755 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
756 CURSOR_CHAR = _core_.CURSOR_CHAR
757 CURSOR_CROSS = _core_.CURSOR_CROSS
758 CURSOR_HAND = _core_.CURSOR_HAND
759 CURSOR_IBEAM = _core_.CURSOR_IBEAM
760 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
761 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
762 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
763 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
764 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
765 CURSOR_PENCIL = _core_.CURSOR_PENCIL
766 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
767 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
768 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
769 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
770 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
771 CURSOR_SIZENS = _core_.CURSOR_SIZENS
772 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
773 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
774 CURSOR_SIZING = _core_.CURSOR_SIZING
775 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
776 CURSOR_WAIT = _core_.CURSOR_WAIT
777 CURSOR_WATCH = _core_.CURSOR_WATCH
778 CURSOR_BLANK = _core_.CURSOR_BLANK
779 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
780 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
781 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
782 CURSOR_MAX = _core_.CURSOR_MAX
783 #---------------------------------------------------------------------------
784
785 class Size(object):
786 """
787 wx.Size is a useful data structure used to represent the size of
788 something. It simply contains integer width and height
789 properties. In most places in wxPython where a wx.Size is
790 expected a (width, height) tuple can be used instead.
791 """
792 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
793 __repr__ = _swig_repr
794 width = property(_core_.Size_width_get, _core_.Size_width_set)
795 height = property(_core_.Size_height_get, _core_.Size_height_set)
796 x = width; y = height
797 def __init__(self, *args, **kwargs):
798 """
799 __init__(self, int w=0, int h=0) -> Size
800
801 Creates a size object.
802 """
803 _core_.Size_swiginit(self,_core_.new_Size(*args, **kwargs))
804 __swig_destroy__ = _core_.delete_Size
805 __del__ = lambda self : None;
806 def __eq__(*args, **kwargs):
807 """
808 __eq__(self, PyObject other) -> bool
809
810 Test for equality of wx.Size objects.
811 """
812 return _core_.Size___eq__(*args, **kwargs)
813
814 def __ne__(*args, **kwargs):
815 """
816 __ne__(self, PyObject other) -> bool
817
818 Test for inequality of wx.Size objects.
819 """
820 return _core_.Size___ne__(*args, **kwargs)
821
822 def __add__(*args, **kwargs):
823 """
824 __add__(self, Size sz) -> Size
825
826 Add sz's proprties to this and return the result.
827 """
828 return _core_.Size___add__(*args, **kwargs)
829
830 def __sub__(*args, **kwargs):
831 """
832 __sub__(self, Size sz) -> Size
833
834 Subtract sz's properties from this and return the result.
835 """
836 return _core_.Size___sub__(*args, **kwargs)
837
838 def IncTo(*args, **kwargs):
839 """
840 IncTo(self, Size sz)
841
842 Increments this object so that both of its dimensions are not less
843 than the corresponding dimensions of the size.
844 """
845 return _core_.Size_IncTo(*args, **kwargs)
846
847 def DecTo(*args, **kwargs):
848 """
849 DecTo(self, Size sz)
850
851 Decrements this object so that both of its dimensions are not greater
852 than the corresponding dimensions of the size.
853 """
854 return _core_.Size_DecTo(*args, **kwargs)
855
856 def Set(*args, **kwargs):
857 """
858 Set(self, int w, int h)
859
860 Set both width and height.
861 """
862 return _core_.Size_Set(*args, **kwargs)
863
864 def SetWidth(*args, **kwargs):
865 """SetWidth(self, int w)"""
866 return _core_.Size_SetWidth(*args, **kwargs)
867
868 def SetHeight(*args, **kwargs):
869 """SetHeight(self, int h)"""
870 return _core_.Size_SetHeight(*args, **kwargs)
871
872 def GetWidth(*args, **kwargs):
873 """GetWidth(self) -> int"""
874 return _core_.Size_GetWidth(*args, **kwargs)
875
876 def GetHeight(*args, **kwargs):
877 """GetHeight(self) -> int"""
878 return _core_.Size_GetHeight(*args, **kwargs)
879
880 def IsFullySpecified(*args, **kwargs):
881 """
882 IsFullySpecified(self) -> bool
883
884 Returns True if both components of the size are non-default values.
885 """
886 return _core_.Size_IsFullySpecified(*args, **kwargs)
887
888 def SetDefaults(*args, **kwargs):
889 """
890 SetDefaults(self, Size size)
891
892 Combine this size with the other one replacing the default components
893 of this object (i.e. equal to -1) with those of the other.
894 """
895 return _core_.Size_SetDefaults(*args, **kwargs)
896
897 def Get(*args, **kwargs):
898 """
899 Get() -> (width,height)
900
901 Returns the width and height properties as a tuple.
902 """
903 return _core_.Size_Get(*args, **kwargs)
904
905 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
906 def __str__(self): return str(self.Get())
907 def __repr__(self): return 'wx.Size'+str(self.Get())
908 def __len__(self): return len(self.Get())
909 def __getitem__(self, index): return self.Get()[index]
910 def __setitem__(self, index, val):
911 if index == 0: self.width = val
912 elif index == 1: self.height = val
913 else: raise IndexError
914 def __nonzero__(self): return self.Get() != (0,0)
915 __safe_for_unpickling__ = True
916 def __reduce__(self): return (wx.Size, self.Get())
917
918 Size_swigregister = _core_.Size_swigregister
919 Size_swigregister(Size)
920
921 #---------------------------------------------------------------------------
922
923 class RealPoint(object):
924 """
925 A data structure for representing a point or position with floating
926 point x and y properties. In wxPython most places that expect a
927 wx.RealPoint can also accept a (x,y) tuple.
928 """
929 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
930 __repr__ = _swig_repr
931 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
932 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
933 def __init__(self, *args, **kwargs):
934 """
935 __init__(self, double x=0.0, double y=0.0) -> RealPoint
936
937 Create a wx.RealPoint object
938 """
939 _core_.RealPoint_swiginit(self,_core_.new_RealPoint(*args, **kwargs))
940 __swig_destroy__ = _core_.delete_RealPoint
941 __del__ = lambda self : None;
942 def __eq__(*args, **kwargs):
943 """
944 __eq__(self, PyObject other) -> bool
945
946 Test for equality of wx.RealPoint objects.
947 """
948 return _core_.RealPoint___eq__(*args, **kwargs)
949
950 def __ne__(*args, **kwargs):
951 """
952 __ne__(self, PyObject other) -> bool
953
954 Test for inequality of wx.RealPoint objects.
955 """
956 return _core_.RealPoint___ne__(*args, **kwargs)
957
958 def __add__(*args, **kwargs):
959 """
960 __add__(self, RealPoint pt) -> RealPoint
961
962 Add pt's proprties to this and return the result.
963 """
964 return _core_.RealPoint___add__(*args, **kwargs)
965
966 def __sub__(*args, **kwargs):
967 """
968 __sub__(self, RealPoint pt) -> RealPoint
969
970 Subtract pt's proprties from this and return the result
971 """
972 return _core_.RealPoint___sub__(*args, **kwargs)
973
974 def Set(*args, **kwargs):
975 """
976 Set(self, double x, double y)
977
978 Set both the x and y properties
979 """
980 return _core_.RealPoint_Set(*args, **kwargs)
981
982 def Get(*args, **kwargs):
983 """
984 Get() -> (x,y)
985
986 Return the x and y properties as a tuple.
987 """
988 return _core_.RealPoint_Get(*args, **kwargs)
989
990 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
991 def __str__(self): return str(self.Get())
992 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
993 def __len__(self): return len(self.Get())
994 def __getitem__(self, index): return self.Get()[index]
995 def __setitem__(self, index, val):
996 if index == 0: self.x = val
997 elif index == 1: self.y = val
998 else: raise IndexError
999 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1000 __safe_for_unpickling__ = True
1001 def __reduce__(self): return (wx.RealPoint, self.Get())
1002
1003 RealPoint_swigregister = _core_.RealPoint_swigregister
1004 RealPoint_swigregister(RealPoint)
1005
1006 #---------------------------------------------------------------------------
1007
1008 class Point(object):
1009 """
1010 A data structure for representing a point or position with integer x
1011 and y properties. Most places in wxPython that expect a wx.Point can
1012 also accept a (x,y) tuple.
1013 """
1014 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1015 __repr__ = _swig_repr
1016 x = property(_core_.Point_x_get, _core_.Point_x_set)
1017 y = property(_core_.Point_y_get, _core_.Point_y_set)
1018 def __init__(self, *args, **kwargs):
1019 """
1020 __init__(self, int x=0, int y=0) -> Point
1021
1022 Create a wx.Point object
1023 """
1024 _core_.Point_swiginit(self,_core_.new_Point(*args, **kwargs))
1025 __swig_destroy__ = _core_.delete_Point
1026 __del__ = lambda self : None;
1027 def __eq__(*args, **kwargs):
1028 """
1029 __eq__(self, PyObject other) -> bool
1030
1031 Test for equality of wx.Point objects.
1032 """
1033 return _core_.Point___eq__(*args, **kwargs)
1034
1035 def __ne__(*args, **kwargs):
1036 """
1037 __ne__(self, PyObject other) -> bool
1038
1039 Test for inequality of wx.Point objects.
1040 """
1041 return _core_.Point___ne__(*args, **kwargs)
1042
1043 def __add__(*args, **kwargs):
1044 """
1045 __add__(self, Point pt) -> Point
1046
1047 Add pt's proprties to this and return the result.
1048 """
1049 return _core_.Point___add__(*args, **kwargs)
1050
1051 def __sub__(*args, **kwargs):
1052 """
1053 __sub__(self, Point pt) -> Point
1054
1055 Subtract pt's proprties from this and return the result
1056 """
1057 return _core_.Point___sub__(*args, **kwargs)
1058
1059 def __iadd__(*args, **kwargs):
1060 """
1061 __iadd__(self, Point pt) -> Point
1062
1063 Add pt to this object.
1064 """
1065 return _core_.Point___iadd__(*args, **kwargs)
1066
1067 def __isub__(*args, **kwargs):
1068 """
1069 __isub__(self, Point pt) -> Point
1070
1071 Subtract pt from this object.
1072 """
1073 return _core_.Point___isub__(*args, **kwargs)
1074
1075 def Set(*args, **kwargs):
1076 """
1077 Set(self, long x, long y)
1078
1079 Set both the x and y properties
1080 """
1081 return _core_.Point_Set(*args, **kwargs)
1082
1083 def Get(*args, **kwargs):
1084 """
1085 Get() -> (x,y)
1086
1087 Return the x and y properties as a tuple.
1088 """
1089 return _core_.Point_Get(*args, **kwargs)
1090
1091 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1092 def __str__(self): return str(self.Get())
1093 def __repr__(self): return 'wx.Point'+str(self.Get())
1094 def __len__(self): return len(self.Get())
1095 def __getitem__(self, index): return self.Get()[index]
1096 def __setitem__(self, index, val):
1097 if index == 0: self.x = val
1098 elif index == 1: self.y = val
1099 else: raise IndexError
1100 def __nonzero__(self): return self.Get() != (0,0)
1101 __safe_for_unpickling__ = True
1102 def __reduce__(self): return (wx.Point, self.Get())
1103
1104 Point_swigregister = _core_.Point_swigregister
1105 Point_swigregister(Point)
1106
1107 #---------------------------------------------------------------------------
1108
1109 class Rect(object):
1110 """
1111 A class for representing and manipulating rectangles. It has x, y,
1112 width and height properties. In wxPython most palces that expect a
1113 wx.Rect can also accept a (x,y,width,height) tuple.
1114 """
1115 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1116 __repr__ = _swig_repr
1117 def __init__(self, *args, **kwargs):
1118 """
1119 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1120
1121 Create a new Rect object.
1122 """
1123 _core_.Rect_swiginit(self,_core_.new_Rect(*args, **kwargs))
1124 __swig_destroy__ = _core_.delete_Rect
1125 __del__ = lambda self : None;
1126 def GetX(*args, **kwargs):
1127 """GetX(self) -> int"""
1128 return _core_.Rect_GetX(*args, **kwargs)
1129
1130 def SetX(*args, **kwargs):
1131 """SetX(self, int x)"""
1132 return _core_.Rect_SetX(*args, **kwargs)
1133
1134 def GetY(*args, **kwargs):
1135 """GetY(self) -> int"""
1136 return _core_.Rect_GetY(*args, **kwargs)
1137
1138 def SetY(*args, **kwargs):
1139 """SetY(self, int y)"""
1140 return _core_.Rect_SetY(*args, **kwargs)
1141
1142 def GetWidth(*args, **kwargs):
1143 """GetWidth(self) -> int"""
1144 return _core_.Rect_GetWidth(*args, **kwargs)
1145
1146 def SetWidth(*args, **kwargs):
1147 """SetWidth(self, int w)"""
1148 return _core_.Rect_SetWidth(*args, **kwargs)
1149
1150 def GetHeight(*args, **kwargs):
1151 """GetHeight(self) -> int"""
1152 return _core_.Rect_GetHeight(*args, **kwargs)
1153
1154 def SetHeight(*args, **kwargs):
1155 """SetHeight(self, int h)"""
1156 return _core_.Rect_SetHeight(*args, **kwargs)
1157
1158 def GetPosition(*args, **kwargs):
1159 """GetPosition(self) -> Point"""
1160 return _core_.Rect_GetPosition(*args, **kwargs)
1161
1162 def SetPosition(*args, **kwargs):
1163 """SetPosition(self, Point p)"""
1164 return _core_.Rect_SetPosition(*args, **kwargs)
1165
1166 def GetSize(*args, **kwargs):
1167 """GetSize(self) -> Size"""
1168 return _core_.Rect_GetSize(*args, **kwargs)
1169
1170 def SetSize(*args, **kwargs):
1171 """SetSize(self, Size s)"""
1172 return _core_.Rect_SetSize(*args, **kwargs)
1173
1174 def IsEmpty(*args, **kwargs):
1175 """IsEmpty(self) -> bool"""
1176 return _core_.Rect_IsEmpty(*args, **kwargs)
1177
1178 def GetTopLeft(*args, **kwargs):
1179 """GetTopLeft(self) -> Point"""
1180 return _core_.Rect_GetTopLeft(*args, **kwargs)
1181
1182 def SetTopLeft(*args, **kwargs):
1183 """SetTopLeft(self, Point p)"""
1184 return _core_.Rect_SetTopLeft(*args, **kwargs)
1185
1186 def GetBottomRight(*args, **kwargs):
1187 """GetBottomRight(self) -> Point"""
1188 return _core_.Rect_GetBottomRight(*args, **kwargs)
1189
1190 def SetBottomRight(*args, **kwargs):
1191 """SetBottomRight(self, Point p)"""
1192 return _core_.Rect_SetBottomRight(*args, **kwargs)
1193
1194 def GetLeft(*args, **kwargs):
1195 """GetLeft(self) -> int"""
1196 return _core_.Rect_GetLeft(*args, **kwargs)
1197
1198 def GetTop(*args, **kwargs):
1199 """GetTop(self) -> int"""
1200 return _core_.Rect_GetTop(*args, **kwargs)
1201
1202 def GetBottom(*args, **kwargs):
1203 """GetBottom(self) -> int"""
1204 return _core_.Rect_GetBottom(*args, **kwargs)
1205
1206 def GetRight(*args, **kwargs):
1207 """GetRight(self) -> int"""
1208 return _core_.Rect_GetRight(*args, **kwargs)
1209
1210 def SetLeft(*args, **kwargs):
1211 """SetLeft(self, int left)"""
1212 return _core_.Rect_SetLeft(*args, **kwargs)
1213
1214 def SetRight(*args, **kwargs):
1215 """SetRight(self, int right)"""
1216 return _core_.Rect_SetRight(*args, **kwargs)
1217
1218 def SetTop(*args, **kwargs):
1219 """SetTop(self, int top)"""
1220 return _core_.Rect_SetTop(*args, **kwargs)
1221
1222 def SetBottom(*args, **kwargs):
1223 """SetBottom(self, int bottom)"""
1224 return _core_.Rect_SetBottom(*args, **kwargs)
1225
1226 position = property(GetPosition, SetPosition)
1227 size = property(GetSize, SetSize)
1228 left = property(GetLeft, SetLeft)
1229 right = property(GetRight, SetRight)
1230 top = property(GetTop, SetTop)
1231 bottom = property(GetBottom, SetBottom)
1232
1233 def Inflate(*args, **kwargs):
1234 """
1235 Inflate(self, int dx, int dy) -> Rect
1236
1237 Increases the size of the rectangle.
1238
1239 The left border is moved farther left and the right border is moved
1240 farther right by ``dx``. The upper border is moved farther up and the
1241 bottom border is moved farther down by ``dy``. (Note the the width and
1242 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1243 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1244 opposite happens: the rectangle size decreases in the respective
1245 direction.
1246
1247 The change is made to the rectangle inplace, if instead you need a
1248 copy that is inflated, preserving the original then make the copy
1249 first::
1250
1251 copy = wx.Rect(*original)
1252 copy.Inflate(10,15)
1253
1254
1255 """
1256 return _core_.Rect_Inflate(*args, **kwargs)
1257
1258 def Deflate(*args, **kwargs):
1259 """
1260 Deflate(self, int dx, int dy) -> Rect
1261
1262 Decrease the rectangle size. This method is the opposite of `Inflate`
1263 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1264 `Inflate` for a full description.
1265 """
1266 return _core_.Rect_Deflate(*args, **kwargs)
1267
1268 def OffsetXY(*args, **kwargs):
1269 """
1270 OffsetXY(self, int dx, int dy)
1271
1272 Moves the rectangle by the specified offset. If dx is positive, the
1273 rectangle is moved to the right, if dy is positive, it is moved to the
1274 bottom, otherwise it is moved to the left or top respectively.
1275 """
1276 return _core_.Rect_OffsetXY(*args, **kwargs)
1277
1278 def Offset(*args, **kwargs):
1279 """
1280 Offset(self, Point pt)
1281
1282 Same as `OffsetXY` but uses dx,dy from Point
1283 """
1284 return _core_.Rect_Offset(*args, **kwargs)
1285
1286 def Intersect(*args, **kwargs):
1287 """
1288 Intersect(self, Rect rect) -> Rect
1289
1290 Returns the intersectsion of this rectangle and rect.
1291 """
1292 return _core_.Rect_Intersect(*args, **kwargs)
1293
1294 def Union(*args, **kwargs):
1295 """
1296 Union(self, Rect rect) -> Rect
1297
1298 Returns the union of this rectangle and rect.
1299 """
1300 return _core_.Rect_Union(*args, **kwargs)
1301
1302 def __add__(*args, **kwargs):
1303 """
1304 __add__(self, Rect rect) -> Rect
1305
1306 Add the properties of rect to this rectangle and return the result.
1307 """
1308 return _core_.Rect___add__(*args, **kwargs)
1309
1310 def __iadd__(*args, **kwargs):
1311 """
1312 __iadd__(self, Rect rect) -> Rect
1313
1314 Add the properties of rect to this rectangle, updating this rectangle.
1315 """
1316 return _core_.Rect___iadd__(*args, **kwargs)
1317
1318 def __eq__(*args, **kwargs):
1319 """
1320 __eq__(self, PyObject other) -> bool
1321
1322 Test for equality of wx.Rect objects.
1323 """
1324 return _core_.Rect___eq__(*args, **kwargs)
1325
1326 def __ne__(*args, **kwargs):
1327 """
1328 __ne__(self, PyObject other) -> bool
1329
1330 Test for inequality of wx.Rect objects.
1331 """
1332 return _core_.Rect___ne__(*args, **kwargs)
1333
1334 def InsideXY(*args, **kwargs):
1335 """
1336 InsideXY(self, int x, int y) -> bool
1337
1338 Return True if the point is (not strcitly) inside the rect.
1339 """
1340 return _core_.Rect_InsideXY(*args, **kwargs)
1341
1342 def Inside(*args, **kwargs):
1343 """
1344 Inside(self, Point pt) -> bool
1345
1346 Return True if the point is (not strcitly) inside the rect.
1347 """
1348 return _core_.Rect_Inside(*args, **kwargs)
1349
1350 def Intersects(*args, **kwargs):
1351 """
1352 Intersects(self, Rect rect) -> bool
1353
1354 Returns True if the rectangles have a non empty intersection.
1355 """
1356 return _core_.Rect_Intersects(*args, **kwargs)
1357
1358 def CenterIn(*args, **kwargs):
1359 """
1360 CenterIn(self, Rect r, int dir=BOTH) -> Rect
1361
1362 Center this rectangle within the one passed to the method, which is
1363 usually, but not necessarily, the larger one.
1364 """
1365 return _core_.Rect_CenterIn(*args, **kwargs)
1366
1367 CentreIn = CenterIn
1368 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1369 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1370 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1371 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1372 def Set(*args, **kwargs):
1373 """
1374 Set(self, int x=0, int y=0, int width=0, int height=0)
1375
1376 Set all rectangle properties.
1377 """
1378 return _core_.Rect_Set(*args, **kwargs)
1379
1380 def Get(*args, **kwargs):
1381 """
1382 Get() -> (x,y,width,height)
1383
1384 Return the rectangle properties as a tuple.
1385 """
1386 return _core_.Rect_Get(*args, **kwargs)
1387
1388 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1389 def __str__(self): return str(self.Get())
1390 def __repr__(self): return 'wx.Rect'+str(self.Get())
1391 def __len__(self): return len(self.Get())
1392 def __getitem__(self, index): return self.Get()[index]
1393 def __setitem__(self, index, val):
1394 if index == 0: self.x = val
1395 elif index == 1: self.y = val
1396 elif index == 2: self.width = val
1397 elif index == 3: self.height = val
1398 else: raise IndexError
1399 def __nonzero__(self): return self.Get() != (0,0,0,0)
1400 __safe_for_unpickling__ = True
1401 def __reduce__(self): return (wx.Rect, self.Get())
1402
1403 Rect_swigregister = _core_.Rect_swigregister
1404 Rect_swigregister(Rect)
1405
1406 def RectPP(*args, **kwargs):
1407 """
1408 RectPP(Point topLeft, Point bottomRight) -> Rect
1409
1410 Create a new Rect object from Points representing two corners.
1411 """
1412 val = _core_.new_RectPP(*args, **kwargs)
1413 return val
1414
1415 def RectPS(*args, **kwargs):
1416 """
1417 RectPS(Point pos, Size size) -> Rect
1418
1419 Create a new Rect from a position and size.
1420 """
1421 val = _core_.new_RectPS(*args, **kwargs)
1422 return val
1423
1424 def RectS(*args, **kwargs):
1425 """
1426 RectS(Size size) -> Rect
1427
1428 Create a new Rect from a size only.
1429 """
1430 val = _core_.new_RectS(*args, **kwargs)
1431 return val
1432
1433
1434 def IntersectRect(*args, **kwargs):
1435 """
1436 IntersectRect(Rect r1, Rect r2) -> Rect
1437
1438 Calculate and return the intersection of r1 and r2.
1439 """
1440 return _core_.IntersectRect(*args, **kwargs)
1441 #---------------------------------------------------------------------------
1442
1443 class Point2D(object):
1444 """
1445 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1446 with floating point values.
1447 """
1448 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1449 __repr__ = _swig_repr
1450 def __init__(self, *args, **kwargs):
1451 """
1452 __init__(self, double x=0.0, double y=0.0) -> Point2D
1453
1454 Create a w.Point2D object.
1455 """
1456 _core_.Point2D_swiginit(self,_core_.new_Point2D(*args, **kwargs))
1457 def GetFloor(*args, **kwargs):
1458 """
1459 GetFloor() -> (x,y)
1460
1461 Convert to integer
1462 """
1463 return _core_.Point2D_GetFloor(*args, **kwargs)
1464
1465 def GetRounded(*args, **kwargs):
1466 """
1467 GetRounded() -> (x,y)
1468
1469 Convert to integer
1470 """
1471 return _core_.Point2D_GetRounded(*args, **kwargs)
1472
1473 def GetVectorLength(*args, **kwargs):
1474 """GetVectorLength(self) -> double"""
1475 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1476
1477 def GetVectorAngle(*args, **kwargs):
1478 """GetVectorAngle(self) -> double"""
1479 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1480
1481 def SetVectorLength(*args, **kwargs):
1482 """SetVectorLength(self, double length)"""
1483 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1484
1485 def SetVectorAngle(*args, **kwargs):
1486 """SetVectorAngle(self, double degrees)"""
1487 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1488
1489 def SetPolarCoordinates(self, angle, length):
1490 self.SetVectorLength(length)
1491 self.SetVectorAngle(angle)
1492 def Normalize(self):
1493 self.SetVectorLength(1.0)
1494
1495 def GetDistance(*args, **kwargs):
1496 """GetDistance(self, Point2D pt) -> double"""
1497 return _core_.Point2D_GetDistance(*args, **kwargs)
1498
1499 def GetDistanceSquare(*args, **kwargs):
1500 """GetDistanceSquare(self, Point2D pt) -> double"""
1501 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1502
1503 def GetDotProduct(*args, **kwargs):
1504 """GetDotProduct(self, Point2D vec) -> double"""
1505 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1506
1507 def GetCrossProduct(*args, **kwargs):
1508 """GetCrossProduct(self, Point2D vec) -> double"""
1509 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1510
1511 def __neg__(*args, **kwargs):
1512 """
1513 __neg__(self) -> Point2D
1514
1515 the reflection of this point
1516 """
1517 return _core_.Point2D___neg__(*args, **kwargs)
1518
1519 def __iadd__(*args, **kwargs):
1520 """__iadd__(self, Point2D pt) -> Point2D"""
1521 return _core_.Point2D___iadd__(*args, **kwargs)
1522
1523 def __isub__(*args, **kwargs):
1524 """__isub__(self, Point2D pt) -> Point2D"""
1525 return _core_.Point2D___isub__(*args, **kwargs)
1526
1527 def __imul__(*args, **kwargs):
1528 """__imul__(self, Point2D pt) -> Point2D"""
1529 return _core_.Point2D___imul__(*args, **kwargs)
1530
1531 def __idiv__(*args, **kwargs):
1532 """__idiv__(self, Point2D pt) -> Point2D"""
1533 return _core_.Point2D___idiv__(*args, **kwargs)
1534
1535 def __eq__(*args, **kwargs):
1536 """
1537 __eq__(self, PyObject other) -> bool
1538
1539 Test for equality of wx.Point2D objects.
1540 """
1541 return _core_.Point2D___eq__(*args, **kwargs)
1542
1543 def __ne__(*args, **kwargs):
1544 """
1545 __ne__(self, PyObject other) -> bool
1546
1547 Test for inequality of wx.Point2D objects.
1548 """
1549 return _core_.Point2D___ne__(*args, **kwargs)
1550
1551 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1552 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1553 def Set(*args, **kwargs):
1554 """Set(self, double x=0, double y=0)"""
1555 return _core_.Point2D_Set(*args, **kwargs)
1556
1557 def Get(*args, **kwargs):
1558 """
1559 Get() -> (x,y)
1560
1561 Return x and y properties as a tuple.
1562 """
1563 return _core_.Point2D_Get(*args, **kwargs)
1564
1565 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1566 def __str__(self): return str(self.Get())
1567 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1568 def __len__(self): return len(self.Get())
1569 def __getitem__(self, index): return self.Get()[index]
1570 def __setitem__(self, index, val):
1571 if index == 0: self.x = val
1572 elif index == 1: self.y = val
1573 else: raise IndexError
1574 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1575 __safe_for_unpickling__ = True
1576 def __reduce__(self): return (wx.Point2D, self.Get())
1577
1578 Point2D_swigregister = _core_.Point2D_swigregister
1579 Point2D_swigregister(Point2D)
1580
1581 def Point2DCopy(*args, **kwargs):
1582 """
1583 Point2DCopy(Point2D pt) -> Point2D
1584
1585 Create a w.Point2D object.
1586 """
1587 val = _core_.new_Point2DCopy(*args, **kwargs)
1588 return val
1589
1590 def Point2DFromPoint(*args, **kwargs):
1591 """
1592 Point2DFromPoint(Point pt) -> Point2D
1593
1594 Create a w.Point2D object.
1595 """
1596 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1597 return val
1598
1599 #---------------------------------------------------------------------------
1600
1601 FromStart = _core_.FromStart
1602 FromCurrent = _core_.FromCurrent
1603 FromEnd = _core_.FromEnd
1604 class InputStream(object):
1605 """Proxy of C++ InputStream class"""
1606 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1607 __repr__ = _swig_repr
1608 def __init__(self, *args, **kwargs):
1609 """__init__(self, PyObject p) -> InputStream"""
1610 _core_.InputStream_swiginit(self,_core_.new_InputStream(*args, **kwargs))
1611 __swig_destroy__ = _core_.delete_InputStream
1612 __del__ = lambda self : None;
1613 def close(*args, **kwargs):
1614 """close(self)"""
1615 return _core_.InputStream_close(*args, **kwargs)
1616
1617 def flush(*args, **kwargs):
1618 """flush(self)"""
1619 return _core_.InputStream_flush(*args, **kwargs)
1620
1621 def eof(*args, **kwargs):
1622 """eof(self) -> bool"""
1623 return _core_.InputStream_eof(*args, **kwargs)
1624
1625 def read(*args, **kwargs):
1626 """read(self, int size=-1) -> PyObject"""
1627 return _core_.InputStream_read(*args, **kwargs)
1628
1629 def readline(*args, **kwargs):
1630 """readline(self, int size=-1) -> PyObject"""
1631 return _core_.InputStream_readline(*args, **kwargs)
1632
1633 def readlines(*args, **kwargs):
1634 """readlines(self, int sizehint=-1) -> PyObject"""
1635 return _core_.InputStream_readlines(*args, **kwargs)
1636
1637 def seek(*args, **kwargs):
1638 """seek(self, int offset, int whence=0)"""
1639 return _core_.InputStream_seek(*args, **kwargs)
1640
1641 def tell(*args, **kwargs):
1642 """tell(self) -> int"""
1643 return _core_.InputStream_tell(*args, **kwargs)
1644
1645 def Peek(*args, **kwargs):
1646 """Peek(self) -> char"""
1647 return _core_.InputStream_Peek(*args, **kwargs)
1648
1649 def GetC(*args, **kwargs):
1650 """GetC(self) -> char"""
1651 return _core_.InputStream_GetC(*args, **kwargs)
1652
1653 def LastRead(*args, **kwargs):
1654 """LastRead(self) -> size_t"""
1655 return _core_.InputStream_LastRead(*args, **kwargs)
1656
1657 def CanRead(*args, **kwargs):
1658 """CanRead(self) -> bool"""
1659 return _core_.InputStream_CanRead(*args, **kwargs)
1660
1661 def Eof(*args, **kwargs):
1662 """Eof(self) -> bool"""
1663 return _core_.InputStream_Eof(*args, **kwargs)
1664
1665 def Ungetch(*args, **kwargs):
1666 """Ungetch(self, char c) -> bool"""
1667 return _core_.InputStream_Ungetch(*args, **kwargs)
1668
1669 def SeekI(*args, **kwargs):
1670 """SeekI(self, long pos, int mode=FromStart) -> long"""
1671 return _core_.InputStream_SeekI(*args, **kwargs)
1672
1673 def TellI(*args, **kwargs):
1674 """TellI(self) -> long"""
1675 return _core_.InputStream_TellI(*args, **kwargs)
1676
1677 InputStream_swigregister = _core_.InputStream_swigregister
1678 InputStream_swigregister(InputStream)
1679 DefaultPosition = cvar.DefaultPosition
1680 DefaultSize = cvar.DefaultSize
1681
1682 class OutputStream(object):
1683 """Proxy of C++ OutputStream class"""
1684 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1685 def __init__(self): raise AttributeError, "No constructor defined"
1686 __repr__ = _swig_repr
1687 def write(*args, **kwargs):
1688 """write(self, PyObject obj)"""
1689 return _core_.OutputStream_write(*args, **kwargs)
1690
1691 def LastWrite(*args, **kwargs):
1692 """LastWrite(self) -> size_t"""
1693 return _core_.OutputStream_LastWrite(*args, **kwargs)
1694
1695 OutputStream_swigregister = _core_.OutputStream_swigregister
1696 OutputStream_swigregister(OutputStream)
1697
1698 #---------------------------------------------------------------------------
1699
1700 class FSFile(Object):
1701 """Proxy of C++ FSFile class"""
1702 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1703 __repr__ = _swig_repr
1704 def __init__(self, *args, **kwargs):
1705 """
1706 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1707 DateTime modif) -> FSFile
1708 """
1709 _core_.FSFile_swiginit(self,_core_.new_FSFile(*args, **kwargs))
1710 self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem
1711
1712 __swig_destroy__ = _core_.delete_FSFile
1713 __del__ = lambda self : None;
1714 def GetStream(*args, **kwargs):
1715 """GetStream(self) -> InputStream"""
1716 return _core_.FSFile_GetStream(*args, **kwargs)
1717
1718 def GetMimeType(*args, **kwargs):
1719 """GetMimeType(self) -> String"""
1720 return _core_.FSFile_GetMimeType(*args, **kwargs)
1721
1722 def GetLocation(*args, **kwargs):
1723 """GetLocation(self) -> String"""
1724 return _core_.FSFile_GetLocation(*args, **kwargs)
1725
1726 def GetAnchor(*args, **kwargs):
1727 """GetAnchor(self) -> String"""
1728 return _core_.FSFile_GetAnchor(*args, **kwargs)
1729
1730 def GetModificationTime(*args, **kwargs):
1731 """GetModificationTime(self) -> DateTime"""
1732 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1733
1734 FSFile_swigregister = _core_.FSFile_swigregister
1735 FSFile_swigregister(FSFile)
1736
1737 class CPPFileSystemHandler(object):
1738 """Proxy of C++ CPPFileSystemHandler class"""
1739 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1740 def __init__(self): raise AttributeError, "No constructor defined"
1741 __repr__ = _swig_repr
1742 __swig_destroy__ = _core_.delete_CPPFileSystemHandler
1743 __del__ = lambda self : None;
1744 CPPFileSystemHandler_swigregister = _core_.CPPFileSystemHandler_swigregister
1745 CPPFileSystemHandler_swigregister(CPPFileSystemHandler)
1746
1747 class FileSystemHandler(CPPFileSystemHandler):
1748 """Proxy of C++ FileSystemHandler class"""
1749 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1750 __repr__ = _swig_repr
1751 def __init__(self, *args, **kwargs):
1752 """__init__(self) -> FileSystemHandler"""
1753 _core_.FileSystemHandler_swiginit(self,_core_.new_FileSystemHandler(*args, **kwargs))
1754 self._setCallbackInfo(self, FileSystemHandler)
1755
1756 def _setCallbackInfo(*args, **kwargs):
1757 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1758 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1759
1760 def CanOpen(*args, **kwargs):
1761 """CanOpen(self, String location) -> bool"""
1762 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1763
1764 def OpenFile(*args, **kwargs):
1765 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1766 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1767
1768 def FindFirst(*args, **kwargs):
1769 """FindFirst(self, String spec, int flags=0) -> String"""
1770 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1771
1772 def FindNext(*args, **kwargs):
1773 """FindNext(self) -> String"""
1774 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1775
1776 def GetProtocol(*args, **kwargs):
1777 """GetProtocol(self, String location) -> String"""
1778 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1779
1780 def GetLeftLocation(*args, **kwargs):
1781 """GetLeftLocation(self, String location) -> String"""
1782 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1783
1784 def GetAnchor(*args, **kwargs):
1785 """GetAnchor(self, String location) -> String"""
1786 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1787
1788 def GetRightLocation(*args, **kwargs):
1789 """GetRightLocation(self, String location) -> String"""
1790 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1791
1792 def GetMimeTypeFromExt(*args, **kwargs):
1793 """GetMimeTypeFromExt(self, String location) -> String"""
1794 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1795
1796 FileSystemHandler_swigregister = _core_.FileSystemHandler_swigregister
1797 FileSystemHandler_swigregister(FileSystemHandler)
1798
1799 class FileSystem(Object):
1800 """Proxy of C++ FileSystem class"""
1801 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1802 __repr__ = _swig_repr
1803 def __init__(self, *args, **kwargs):
1804 """__init__(self) -> FileSystem"""
1805 _core_.FileSystem_swiginit(self,_core_.new_FileSystem(*args, **kwargs))
1806 __swig_destroy__ = _core_.delete_FileSystem
1807 __del__ = lambda self : None;
1808 def ChangePathTo(*args, **kwargs):
1809 """ChangePathTo(self, String location, bool is_dir=False)"""
1810 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1811
1812 def GetPath(*args, **kwargs):
1813 """GetPath(self) -> String"""
1814 return _core_.FileSystem_GetPath(*args, **kwargs)
1815
1816 def OpenFile(*args, **kwargs):
1817 """OpenFile(self, String location) -> FSFile"""
1818 return _core_.FileSystem_OpenFile(*args, **kwargs)
1819
1820 def FindFirst(*args, **kwargs):
1821 """FindFirst(self, String spec, int flags=0) -> String"""
1822 return _core_.FileSystem_FindFirst(*args, **kwargs)
1823
1824 def FindNext(*args, **kwargs):
1825 """FindNext(self) -> String"""
1826 return _core_.FileSystem_FindNext(*args, **kwargs)
1827
1828 def AddHandler(*args, **kwargs):
1829 """AddHandler(CPPFileSystemHandler handler)"""
1830 return _core_.FileSystem_AddHandler(*args, **kwargs)
1831
1832 AddHandler = staticmethod(AddHandler)
1833 def CleanUpHandlers(*args, **kwargs):
1834 """CleanUpHandlers()"""
1835 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1836
1837 CleanUpHandlers = staticmethod(CleanUpHandlers)
1838 def FileNameToURL(*args, **kwargs):
1839 """FileNameToURL(String filename) -> String"""
1840 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1841
1842 FileNameToURL = staticmethod(FileNameToURL)
1843 def URLToFileName(*args, **kwargs):
1844 """URLToFileName(String url) -> String"""
1845 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1846
1847 URLToFileName = staticmethod(URLToFileName)
1848 FileSystem_swigregister = _core_.FileSystem_swigregister
1849 FileSystem_swigregister(FileSystem)
1850
1851 def FileSystem_AddHandler(*args, **kwargs):
1852 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1853 return _core_.FileSystem_AddHandler(*args, **kwargs)
1854
1855 def FileSystem_CleanUpHandlers(*args):
1856 """FileSystem_CleanUpHandlers()"""
1857 return _core_.FileSystem_CleanUpHandlers(*args)
1858
1859 def FileSystem_FileNameToURL(*args, **kwargs):
1860 """FileSystem_FileNameToURL(String filename) -> String"""
1861 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1862
1863 def FileSystem_URLToFileName(*args, **kwargs):
1864 """FileSystem_URLToFileName(String url) -> String"""
1865 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1866
1867 class InternetFSHandler(CPPFileSystemHandler):
1868 """Proxy of C++ InternetFSHandler class"""
1869 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1870 __repr__ = _swig_repr
1871 def __init__(self, *args, **kwargs):
1872 """__init__(self) -> InternetFSHandler"""
1873 _core_.InternetFSHandler_swiginit(self,_core_.new_InternetFSHandler(*args, **kwargs))
1874 def CanOpen(*args, **kwargs):
1875 """CanOpen(self, String location) -> bool"""
1876 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1877
1878 def OpenFile(*args, **kwargs):
1879 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1880 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1881
1882 InternetFSHandler_swigregister = _core_.InternetFSHandler_swigregister
1883 InternetFSHandler_swigregister(InternetFSHandler)
1884
1885 class ZipFSHandler(CPPFileSystemHandler):
1886 """Proxy of C++ ZipFSHandler class"""
1887 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1888 __repr__ = _swig_repr
1889 def __init__(self, *args, **kwargs):
1890 """__init__(self) -> ZipFSHandler"""
1891 _core_.ZipFSHandler_swiginit(self,_core_.new_ZipFSHandler(*args, **kwargs))
1892 def CanOpen(*args, **kwargs):
1893 """CanOpen(self, String location) -> bool"""
1894 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1895
1896 def OpenFile(*args, **kwargs):
1897 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1898 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1899
1900 def FindFirst(*args, **kwargs):
1901 """FindFirst(self, String spec, int flags=0) -> String"""
1902 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1903
1904 def FindNext(*args, **kwargs):
1905 """FindNext(self) -> String"""
1906 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1907
1908 ZipFSHandler_swigregister = _core_.ZipFSHandler_swigregister
1909 ZipFSHandler_swigregister(ZipFSHandler)
1910
1911
1912 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1913 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1914 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1915
1916 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1917 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1918 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1919
1920 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1921 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1922 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1923 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1924 """
1925 Add 'file' to the memory filesystem. The dataItem parameter can
1926 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1927 arbitrary data. If a bitmap or image is used then the imgType
1928 parameter should specify what kind of image file it should be
1929 written as, wx.BITMAP_TYPE_PNG, etc.
1930 """
1931 if isinstance(dataItem, wx.Image):
1932 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1933 elif isinstance(dataItem, wx.Bitmap):
1934 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1935 elif type(dataItem) == str:
1936 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1937 else:
1938 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1939
1940 class MemoryFSHandler(CPPFileSystemHandler):
1941 """Proxy of C++ MemoryFSHandler class"""
1942 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1943 __repr__ = _swig_repr
1944 def __init__(self, *args, **kwargs):
1945 """__init__(self) -> MemoryFSHandler"""
1946 _core_.MemoryFSHandler_swiginit(self,_core_.new_MemoryFSHandler(*args, **kwargs))
1947 def RemoveFile(*args, **kwargs):
1948 """RemoveFile(String filename)"""
1949 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1950
1951 RemoveFile = staticmethod(RemoveFile)
1952 AddFile = staticmethod(MemoryFSHandler_AddFile)
1953 def CanOpen(*args, **kwargs):
1954 """CanOpen(self, String location) -> bool"""
1955 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1956
1957 def OpenFile(*args, **kwargs):
1958 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1959 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1960
1961 def FindFirst(*args, **kwargs):
1962 """FindFirst(self, String spec, int flags=0) -> String"""
1963 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1964
1965 def FindNext(*args, **kwargs):
1966 """FindNext(self) -> String"""
1967 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
1968
1969 MemoryFSHandler_swigregister = _core_.MemoryFSHandler_swigregister
1970 MemoryFSHandler_swigregister(MemoryFSHandler)
1971
1972 def MemoryFSHandler_RemoveFile(*args, **kwargs):
1973 """MemoryFSHandler_RemoveFile(String filename)"""
1974 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1975
1976 IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT
1977 IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD
1978 IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE
1979 #---------------------------------------------------------------------------
1980
1981 class ImageHandler(Object):
1982 """
1983 This is the base class for implementing image file loading/saving, and
1984 image creation from data. It is used within `wx.Image` and is not
1985 normally seen by the application.
1986 """
1987 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1988 def __init__(self): raise AttributeError, "No constructor defined"
1989 __repr__ = _swig_repr
1990 def GetName(*args, **kwargs):
1991 """GetName(self) -> String"""
1992 return _core_.ImageHandler_GetName(*args, **kwargs)
1993
1994 def GetExtension(*args, **kwargs):
1995 """GetExtension(self) -> String"""
1996 return _core_.ImageHandler_GetExtension(*args, **kwargs)
1997
1998 def GetType(*args, **kwargs):
1999 """GetType(self) -> long"""
2000 return _core_.ImageHandler_GetType(*args, **kwargs)
2001
2002 def GetMimeType(*args, **kwargs):
2003 """GetMimeType(self) -> String"""
2004 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2005
2006 def CanRead(*args, **kwargs):
2007 """CanRead(self, String name) -> bool"""
2008 return _core_.ImageHandler_CanRead(*args, **kwargs)
2009
2010 def SetName(*args, **kwargs):
2011 """SetName(self, String name)"""
2012 return _core_.ImageHandler_SetName(*args, **kwargs)
2013
2014 def SetExtension(*args, **kwargs):
2015 """SetExtension(self, String extension)"""
2016 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2017
2018 def SetType(*args, **kwargs):
2019 """SetType(self, long type)"""
2020 return _core_.ImageHandler_SetType(*args, **kwargs)
2021
2022 def SetMimeType(*args, **kwargs):
2023 """SetMimeType(self, String mimetype)"""
2024 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2025
2026 ImageHandler_swigregister = _core_.ImageHandler_swigregister
2027 ImageHandler_swigregister(ImageHandler)
2028
2029 class PyImageHandler(ImageHandler):
2030 """
2031 This is the base class for implementing image file loading/saving, and
2032 image creation from data, all written in Python. To create a custom
2033 image handler derive a new class from wx.PyImageHandler and provide
2034 the following methods::
2035
2036 def DoCanRead(self, stream) --> bool
2037 '''Check if this handler can read the image on the stream'''
2038
2039 def LoadFile(self, image, stream, verbose, index) --> bool
2040 '''Load image data from the stream and load it into image.'''
2041
2042 def SaveFile(self, image, stream, verbose) --> bool
2043 '''Save the iamge data in image to the stream using
2044 this handler's image file format.'''
2045
2046 def GetImageCount(self, stream) --> int
2047 '''If this image format can hold more than one image,
2048 how many does the image on the stream have?'''
2049
2050 To activate your handler create an instance of it and pass it to
2051 `wx.Image_AddHandler`. Be sure to call `SetName`, `SetType`, and
2052 `SetExtension` from your constructor.
2053
2054 """
2055 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2056 __repr__ = _swig_repr
2057 def __init__(self, *args, **kwargs):
2058 """
2059 __init__(self) -> PyImageHandler
2060
2061 This is the base class for implementing image file loading/saving, and
2062 image creation from data, all written in Python. To create a custom
2063 image handler derive a new class from wx.PyImageHandler and provide
2064 the following methods::
2065
2066 def DoCanRead(self, stream) --> bool
2067 '''Check if this handler can read the image on the stream'''
2068
2069 def LoadFile(self, image, stream, verbose, index) --> bool
2070 '''Load image data from the stream and load it into image.'''
2071
2072 def SaveFile(self, image, stream, verbose) --> bool
2073 '''Save the iamge data in image to the stream using
2074 this handler's image file format.'''
2075
2076 def GetImageCount(self, stream) --> int
2077 '''If this image format can hold more than one image,
2078 how many does the image on the stream have?'''
2079
2080 To activate your handler create an instance of it and pass it to
2081 `wx.Image_AddHandler`. Be sure to call `SetName`, `SetType`, and
2082 `SetExtension` from your constructor.
2083
2084 """
2085 _core_.PyImageHandler_swiginit(self,_core_.new_PyImageHandler(*args, **kwargs))
2086 self._SetSelf(self)
2087
2088 def _SetSelf(*args, **kwargs):
2089 """_SetSelf(self, PyObject self)"""
2090 return _core_.PyImageHandler__SetSelf(*args, **kwargs)
2091
2092 PyImageHandler_swigregister = _core_.PyImageHandler_swigregister
2093 PyImageHandler_swigregister(PyImageHandler)
2094
2095 class ImageHistogram(object):
2096 """Proxy of C++ ImageHistogram class"""
2097 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2098 __repr__ = _swig_repr
2099 def __init__(self, *args, **kwargs):
2100 """__init__(self) -> ImageHistogram"""
2101 _core_.ImageHistogram_swiginit(self,_core_.new_ImageHistogram(*args, **kwargs))
2102 def MakeKey(*args, **kwargs):
2103 """
2104 MakeKey(byte r, byte g, byte b) -> unsigned long
2105
2106 Get the key in the histogram for the given RGB values
2107 """
2108 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2109
2110 MakeKey = staticmethod(MakeKey)
2111 def FindFirstUnusedColour(*args, **kwargs):
2112 """
2113 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2114
2115 Find first colour that is not used in the image and has higher RGB
2116 values than startR, startG, startB. Returns a tuple consisting of a
2117 success flag and rgb values.
2118 """
2119 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2120
2121 def GetCount(*args, **kwargs):
2122 """
2123 GetCount(self, unsigned long key) -> unsigned long
2124
2125 Returns the pixel count for the given key. Use `MakeKey` to create a
2126 key value from a RGB tripple.
2127 """
2128 return _core_.ImageHistogram_GetCount(*args, **kwargs)
2129
2130 def GetCountRGB(*args, **kwargs):
2131 """
2132 GetCountRGB(self, byte r, byte g, byte b) -> unsigned long
2133
2134 Returns the pixel count for the given RGB values.
2135 """
2136 return _core_.ImageHistogram_GetCountRGB(*args, **kwargs)
2137
2138 def GetCountColour(*args, **kwargs):
2139 """
2140 GetCountColour(self, Colour colour) -> unsigned long
2141
2142 Returns the pixel count for the given `wx.Colour` value.
2143 """
2144 return _core_.ImageHistogram_GetCountColour(*args, **kwargs)
2145
2146 ImageHistogram_swigregister = _core_.ImageHistogram_swigregister
2147 ImageHistogram_swigregister(ImageHistogram)
2148
2149 def ImageHistogram_MakeKey(*args, **kwargs):
2150 """
2151 ImageHistogram_MakeKey(byte r, byte g, byte b) -> unsigned long
2152
2153 Get the key in the histogram for the given RGB values
2154 """
2155 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2156
2157 class Image_RGBValue(object):
2158 """
2159 An object that contains values for red, green and blue which represent
2160 the value of a color. It is used by `wx.Image.HSVtoRGB` and
2161 `wx.Image.RGBtoHSV`, which converts between HSV color space and RGB
2162 color space.
2163 """
2164 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2165 __repr__ = _swig_repr
2166 def __init__(self, *args, **kwargs):
2167 """
2168 __init__(self, byte r=0, byte g=0, byte b=0) -> Image_RGBValue
2169
2170 Constructor.
2171 """
2172 _core_.Image_RGBValue_swiginit(self,_core_.new_Image_RGBValue(*args, **kwargs))
2173 red = property(_core_.Image_RGBValue_red_get, _core_.Image_RGBValue_red_set)
2174 green = property(_core_.Image_RGBValue_green_get, _core_.Image_RGBValue_green_set)
2175 blue = property(_core_.Image_RGBValue_blue_get, _core_.Image_RGBValue_blue_set)
2176 Image_RGBValue_swigregister = _core_.Image_RGBValue_swigregister
2177 Image_RGBValue_swigregister(Image_RGBValue)
2178
2179 class Image_HSVValue(object):
2180 """
2181 An object that contains values for hue, saturation and value which
2182 represent the value of a color. It is used by `wx.Image.HSVtoRGB` and
2183 `wx.Image.RGBtoHSV`, which +converts between HSV color space and RGB
2184 color space.
2185 """
2186 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2187 __repr__ = _swig_repr
2188 def __init__(self, *args, **kwargs):
2189 """
2190 __init__(self, double h=0.0, double s=0.0, double v=0.0) -> Image_HSVValue
2191
2192 Constructor.
2193 """
2194 _core_.Image_HSVValue_swiginit(self,_core_.new_Image_HSVValue(*args, **kwargs))
2195 hue = property(_core_.Image_HSVValue_hue_get, _core_.Image_HSVValue_hue_set)
2196 saturation = property(_core_.Image_HSVValue_saturation_get, _core_.Image_HSVValue_saturation_set)
2197 value = property(_core_.Image_HSVValue_value_get, _core_.Image_HSVValue_value_set)
2198 Image_HSVValue_swigregister = _core_.Image_HSVValue_swigregister
2199 Image_HSVValue_swigregister(Image_HSVValue)
2200
2201 class Image(Object):
2202 """
2203 A platform-independent image class. An image can be created from
2204 data, or using `wx.Bitmap.ConvertToImage`, or loaded from a file in a
2205 variety of formats. Functions are available to set and get image
2206 bits, so it can be used for basic image manipulation.
2207
2208 A wx.Image cannot be drawn directly to a `wx.DC`. Instead, a
2209 platform-specific `wx.Bitmap` object must be created from it using the
2210 `wx.BitmapFromImage` constructor. This bitmap can then be drawn in a
2211 device context, using `wx.DC.DrawBitmap`.
2212
2213 One colour value of the image may be used as a mask colour which will
2214 lead to the automatic creation of a `wx.Mask` object associated to the
2215 bitmap object.
2216
2217 wx.Image supports alpha channel data, that is in addition to a byte
2218 for the red, green and blue colour components for each pixel it also
2219 stores a byte representing the pixel opacity. An alpha value of 0
2220 corresponds to a transparent pixel (null opacity) while a value of 255
2221 means that the pixel is 100% opaque.
2222
2223 Unlike RGB data, not all images have an alpha channel and before using
2224 `GetAlpha` you should check if this image contains an alpha channel
2225 with `HasAlpha`. Note that currently only images loaded from PNG files
2226 with transparency information will have an alpha channel.
2227 """
2228 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2229 __repr__ = _swig_repr
2230 def __init__(self, *args, **kwargs):
2231 """
2232 __init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image
2233
2234 Loads an image from a file.
2235 """
2236 _core_.Image_swiginit(self,_core_.new_Image(*args, **kwargs))
2237 __swig_destroy__ = _core_.delete_Image
2238 __del__ = lambda self : None;
2239 def Create(*args, **kwargs):
2240 """
2241 Create(self, int width, int height, bool clear=True)
2242
2243 Creates a fresh image. If clear is ``True``, the new image will be
2244 initialized to black. Otherwise, the image data will be uninitialized.
2245 """
2246 return _core_.Image_Create(*args, **kwargs)
2247
2248 def Destroy(*args, **kwargs):
2249 """
2250 Destroy(self)
2251
2252 Destroys the image data.
2253 """
2254 val = _core_.Image_Destroy(*args, **kwargs)
2255 args[0].thisown = 0
2256 return val
2257
2258 def Scale(*args, **kwargs):
2259 """
2260 Scale(self, int width, int height) -> Image
2261
2262 Returns a scaled version of the image. This is also useful for scaling
2263 bitmaps in general as the only other way to scale bitmaps is to blit a
2264 `wx.MemoryDC` into another `wx.MemoryDC`.
2265 """
2266 return _core_.Image_Scale(*args, **kwargs)
2267
2268 def ShrinkBy(*args, **kwargs):
2269 """
2270 ShrinkBy(self, int xFactor, int yFactor) -> Image
2271
2272 Return a version of the image scaled smaller by the given factors.
2273 """
2274 return _core_.Image_ShrinkBy(*args, **kwargs)
2275
2276 def Rescale(*args, **kwargs):
2277 """
2278 Rescale(self, int width, int height) -> Image
2279
2280 Changes the size of the image in-place by scaling it: after a call to
2281 this function, the image will have the given width and height.
2282
2283 Returns the (modified) image itself.
2284 """
2285 return _core_.Image_Rescale(*args, **kwargs)
2286
2287 def Resize(*args, **kwargs):
2288 """
2289 Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image
2290
2291 Changes the size of the image in-place without scaling it, by adding
2292 either a border with the given colour or cropping as necessary. The
2293 image is pasted into a new image with the given size and background
2294 colour at the position pos relative to the upper left of the new
2295 image. If red = green = blue = -1 then use either the current mask
2296 colour if set or find, use, and set a suitable mask colour for any
2297 newly exposed areas.
2298
2299 Returns the (modified) image itself.
2300 """
2301 return _core_.Image_Resize(*args, **kwargs)
2302
2303 def SetRGB(*args, **kwargs):
2304 """
2305 SetRGB(self, int x, int y, byte r, byte g, byte b)
2306
2307 Sets the pixel at the given coordinate. This routine performs
2308 bounds-checks for the coordinate so it can be considered a safe way to
2309 manipulate the data, but in some cases this might be too slow so that
2310 the data will have to be set directly. In that case you will have to
2311 get access to the image data using the `GetData` method.
2312 """
2313 return _core_.Image_SetRGB(*args, **kwargs)
2314
2315 def SetRGBRect(*args, **kwargs):
2316 """
2317 SetRGBRect(self, Rect rect, byte r, byte g, byte b)
2318
2319 Sets the colour of the pixels within the given rectangle. This routine
2320 performs bounds-checks for the rectangle so it can be considered a
2321 safe way to manipulate the data.
2322 """
2323 return _core_.Image_SetRGBRect(*args, **kwargs)
2324
2325 def GetRed(*args, **kwargs):
2326 """
2327 GetRed(self, int x, int y) -> byte
2328
2329 Returns the red intensity at the given coordinate.
2330 """
2331 return _core_.Image_GetRed(*args, **kwargs)
2332
2333 def GetGreen(*args, **kwargs):
2334 """
2335 GetGreen(self, int x, int y) -> byte
2336
2337 Returns the green intensity at the given coordinate.
2338 """
2339 return _core_.Image_GetGreen(*args, **kwargs)
2340
2341 def GetBlue(*args, **kwargs):
2342 """
2343 GetBlue(self, int x, int y) -> byte
2344
2345 Returns the blue intensity at the given coordinate.
2346 """
2347 return _core_.Image_GetBlue(*args, **kwargs)
2348
2349 def SetAlpha(*args, **kwargs):
2350 """
2351 SetAlpha(self, int x, int y, byte alpha)
2352
2353 Sets the alpha value for the given pixel. This function should only be
2354 called if the image has alpha channel data, use `HasAlpha` to check
2355 for this.
2356 """
2357 return _core_.Image_SetAlpha(*args, **kwargs)
2358
2359 def GetAlpha(*args, **kwargs):
2360 """
2361 GetAlpha(self, int x, int y) -> byte
2362
2363 Returns the alpha value for the given pixel. This function may only be
2364 called for the images with alpha channel, use `HasAlpha` to check for
2365 this.
2366
2367 The returned value is the *opacity* of the image, i.e. the value of 0
2368 corresponds to the fully transparent pixels while the value of 255 to
2369 the fully opaque pixels.
2370 """
2371 return _core_.Image_GetAlpha(*args, **kwargs)
2372
2373 def HasAlpha(*args, **kwargs):
2374 """
2375 HasAlpha(self) -> bool
2376
2377 Returns true if this image has alpha channel, false otherwise.
2378 """
2379 return _core_.Image_HasAlpha(*args, **kwargs)
2380
2381 def InitAlpha(*args, **kwargs):
2382 """
2383 InitAlpha(self)
2384
2385 Initializes the image alpha channel data. It is an error to call it if
2386 the image already has alpha data. If it doesn't, alpha data will be by
2387 default initialized to all pixels being fully opaque. But if the image
2388 has a a mask colour, all mask pixels will be completely transparent.
2389 """
2390 return _core_.Image_InitAlpha(*args, **kwargs)
2391
2392 def IsTransparent(*args, **kwargs):
2393 """
2394 IsTransparent(self, int x, int y, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2395
2396 Returns ``True`` if this pixel is masked or has an alpha value less
2397 than the spcified threshold.
2398 """
2399 return _core_.Image_IsTransparent(*args, **kwargs)
2400
2401 def FindFirstUnusedColour(*args, **kwargs):
2402 """
2403 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2404
2405 Find first colour that is not used in the image and has higher RGB
2406 values than startR, startG, startB. Returns a tuple consisting of a
2407 success flag and rgb values.
2408 """
2409 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2410
2411 def ConvertAlphaToMask(*args, **kwargs):
2412 """
2413 ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2414
2415 If the image has alpha channel, this method converts it to mask. All
2416 pixels with alpha value less than ``threshold`` are replaced with the
2417 mask colour and the alpha channel is removed. The mask colour is
2418 chosen automatically using `FindFirstUnusedColour`.
2419
2420 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2421 nothing.
2422 """
2423 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2424
2425 def ConvertColourToAlpha(*args, **kwargs):
2426 """
2427 ConvertColourToAlpha(self, byte r, byte g, byte b) -> bool
2428
2429 This method converts an image where the original alpha information is
2430 only available as a shades of a colour (actually shades of grey)
2431 typically when you draw anti-aliased text into a bitmap. The DC
2432 drawing routines draw grey values on the black background although
2433 they actually mean to draw white with differnt alpha values. This
2434 method reverses it, assuming a black (!) background and white text.
2435 The method will then fill up the whole image with the colour given.
2436 """
2437 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2438
2439 def SetMaskFromImage(*args, **kwargs):
2440 """
2441 SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool
2442
2443 Sets the image's mask so that the pixels that have RGB value of
2444 ``(mr,mg,mb)`` in ``mask`` will be masked in this image. This is done
2445 by first finding an unused colour in the image, setting this colour as
2446 the mask colour and then using this colour to draw all pixels in the
2447 image who corresponding pixel in mask has given RGB value.
2448
2449 Returns ``False`` if ``mask`` does not have same dimensions as the
2450 image or if there is no unused colour left. Returns ``True`` if the
2451 mask was successfully applied.
2452
2453 Note that this method involves computing the histogram, which is
2454 computationally intensive operation.
2455 """
2456 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2457
2458 def CanRead(*args, **kwargs):
2459 """
2460 CanRead(String filename) -> bool
2461
2462 Returns True if the image handlers can read this file.
2463 """
2464 return _core_.Image_CanRead(*args, **kwargs)
2465
2466 CanRead = staticmethod(CanRead)
2467 def GetImageCount(*args, **kwargs):
2468 """
2469 GetImageCount(String filename, long type=BITMAP_TYPE_ANY) -> int
2470
2471 If the image file contains more than one image and the image handler
2472 is capable of retrieving these individually, this function will return
2473 the number of available images.
2474 """
2475 return _core_.Image_GetImageCount(*args, **kwargs)
2476
2477 GetImageCount = staticmethod(GetImageCount)
2478 def LoadFile(*args, **kwargs):
2479 """
2480 LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool
2481
2482 Loads an image from a file. If no handler type is provided, the
2483 library will try to autodetect the format.
2484 """
2485 return _core_.Image_LoadFile(*args, **kwargs)
2486
2487 def LoadMimeFile(*args, **kwargs):
2488 """
2489 LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool
2490
2491 Loads an image from a file, specifying the image type with a MIME type
2492 string.
2493 """
2494 return _core_.Image_LoadMimeFile(*args, **kwargs)
2495
2496 def SaveFile(*args, **kwargs):
2497 """
2498 SaveFile(self, String name, int type) -> bool
2499
2500 Saves an image in the named file.
2501 """
2502 return _core_.Image_SaveFile(*args, **kwargs)
2503
2504 def SaveMimeFile(*args, **kwargs):
2505 """
2506 SaveMimeFile(self, String name, String mimetype) -> bool
2507
2508 Saves an image in the named file.
2509 """
2510 return _core_.Image_SaveMimeFile(*args, **kwargs)
2511
2512 def CanReadStream(*args, **kwargs):
2513 """
2514 CanReadStream(InputStream stream) -> bool
2515
2516 Returns True if the image handlers can read an image file from the
2517 data currently on the input stream, or a readable Python file-like
2518 object.
2519 """
2520 return _core_.Image_CanReadStream(*args, **kwargs)
2521
2522 CanReadStream = staticmethod(CanReadStream)
2523 def LoadStream(*args, **kwargs):
2524 """
2525 LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool
2526
2527 Loads an image from an input stream or a readable Python file-like
2528 object. If no handler type is provided, the library will try to
2529 autodetect the format.
2530 """
2531 return _core_.Image_LoadStream(*args, **kwargs)
2532
2533 def LoadMimeStream(*args, **kwargs):
2534 """
2535 LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool
2536
2537 Loads an image from an input stream or a readable Python file-like
2538 object, using a MIME type string to specify the image file format.
2539 """
2540 return _core_.Image_LoadMimeStream(*args, **kwargs)
2541
2542 def Ok(*args, **kwargs):
2543 """
2544 Ok(self) -> bool
2545
2546 Returns true if image data is present.
2547 """
2548 return _core_.Image_Ok(*args, **kwargs)
2549
2550 def GetWidth(*args, **kwargs):
2551 """
2552 GetWidth(self) -> int
2553
2554 Gets the width of the image in pixels.
2555 """
2556 return _core_.Image_GetWidth(*args, **kwargs)
2557
2558 def GetHeight(*args, **kwargs):
2559 """
2560 GetHeight(self) -> int
2561
2562 Gets the height of the image in pixels.
2563 """
2564 return _core_.Image_GetHeight(*args, **kwargs)
2565
2566 def GetSize(*args, **kwargs):
2567 """
2568 GetSize(self) -> Size
2569
2570 Returns the size of the image in pixels.
2571 """
2572 return _core_.Image_GetSize(*args, **kwargs)
2573
2574 def GetSubImage(*args, **kwargs):
2575 """
2576 GetSubImage(self, Rect rect) -> Image
2577
2578 Returns a sub image of the current one as long as the rect belongs
2579 entirely to the image.
2580 """
2581 return _core_.Image_GetSubImage(*args, **kwargs)
2582
2583 def Size(*args, **kwargs):
2584 """
2585 Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image
2586
2587 Returns a resized version of this image without scaling it by adding
2588 either a border with the given colour or cropping as necessary. The
2589 image is pasted into a new image with the given size and background
2590 colour at the position ``pos`` relative to the upper left of the new
2591 image. If red = green = blue = -1 then use either the current mask
2592 colour if set or find, use, and set a suitable mask colour for any
2593 newly exposed areas.
2594 """
2595 return _core_.Image_Size(*args, **kwargs)
2596
2597 def Copy(*args, **kwargs):
2598 """
2599 Copy(self) -> Image
2600
2601 Returns an identical copy of the image.
2602 """
2603 return _core_.Image_Copy(*args, **kwargs)
2604
2605 def Paste(*args, **kwargs):
2606 """
2607 Paste(self, Image image, int x, int y)
2608
2609 Pastes ``image`` into this instance and takes care of the mask colour
2610 and any out of bounds problems.
2611 """
2612 return _core_.Image_Paste(*args, **kwargs)
2613
2614 def GetData(*args, **kwargs):
2615 """
2616 GetData(self) -> PyObject
2617
2618 Returns a string containing a copy of the RGB bytes of the image.
2619 """
2620 return _core_.Image_GetData(*args, **kwargs)
2621
2622 def SetData(*args, **kwargs):
2623 """
2624 SetData(self, buffer data)
2625
2626 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2627 either a string or a buffer object holding the data and the length of
2628 the data must be width*height*3.
2629 """
2630 return _core_.Image_SetData(*args, **kwargs)
2631
2632 def GetDataBuffer(*args, **kwargs):
2633 """
2634 GetDataBuffer(self) -> PyObject
2635
2636 Returns a writable Python buffer object that is pointing at the RGB
2637 image data buffer inside the wx.Image. You need to ensure that you do
2638 not use this buffer object after the image has been destroyed.
2639 """
2640 return _core_.Image_GetDataBuffer(*args, **kwargs)
2641
2642 def SetDataBuffer(*args, **kwargs):
2643 """
2644 SetDataBuffer(self, buffer data)
2645
2646 Sets the internal image data pointer to point at a Python buffer
2647 object. This can save making an extra copy of the data but you must
2648 ensure that the buffer object lives longer than the wx.Image does.
2649 """
2650 return _core_.Image_SetDataBuffer(*args, **kwargs)
2651
2652 def GetAlphaData(*args, **kwargs):
2653 """
2654 GetAlphaData(self) -> PyObject
2655
2656 Returns a string containing a copy of the alpha bytes of the image.
2657 """
2658 return _core_.Image_GetAlphaData(*args, **kwargs)
2659
2660 def SetAlphaData(*args, **kwargs):
2661 """
2662 SetAlphaData(self, buffer alpha)
2663
2664 Resets the Image's alpha data from a buffer of bytes. Accepts either
2665 a string or a buffer object holding the data and the length of the
2666 data must be width*height.
2667 """
2668 return _core_.Image_SetAlphaData(*args, **kwargs)
2669
2670 def GetAlphaBuffer(*args, **kwargs):
2671 """GetAlphaBuffer(self) -> PyObject"""
2672 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2673
2674 def SetAlphaBuffer(*args, **kwargs):
2675 """SetAlphaBuffer(self, buffer alpha)"""
2676 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2677
2678 def SetMaskColour(*args, **kwargs):
2679 """
2680 SetMaskColour(self, byte r, byte g, byte b)
2681
2682 Sets the mask colour for this image (and tells the image to use the
2683 mask).
2684 """
2685 return _core_.Image_SetMaskColour(*args, **kwargs)
2686
2687 def GetOrFindMaskColour(*args, **kwargs):
2688 """
2689 GetOrFindMaskColour() -> (r,g,b)
2690
2691 Get the current mask colour or find a suitable colour.
2692 """
2693 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2694
2695 def GetMaskRed(*args, **kwargs):
2696 """
2697 GetMaskRed(self) -> byte
2698
2699 Gets the red component of the mask colour.
2700 """
2701 return _core_.Image_GetMaskRed(*args, **kwargs)
2702
2703 def GetMaskGreen(*args, **kwargs):
2704 """
2705 GetMaskGreen(self) -> byte
2706
2707 Gets the green component of the mask colour.
2708 """
2709 return _core_.Image_GetMaskGreen(*args, **kwargs)
2710
2711 def GetMaskBlue(*args, **kwargs):
2712 """
2713 GetMaskBlue(self) -> byte
2714
2715 Gets the blue component of the mask colour.
2716 """
2717 return _core_.Image_GetMaskBlue(*args, **kwargs)
2718
2719 def SetMask(*args, **kwargs):
2720 """
2721 SetMask(self, bool mask=True)
2722
2723 Specifies whether there is a mask or not. The area of the mask is
2724 determined by the current mask colour.
2725 """
2726 return _core_.Image_SetMask(*args, **kwargs)
2727
2728 def HasMask(*args, **kwargs):
2729 """
2730 HasMask(self) -> bool
2731
2732 Returns ``True`` if there is a mask active, ``False`` otherwise.
2733 """
2734 return _core_.Image_HasMask(*args, **kwargs)
2735
2736 def Rotate(*args, **kwargs):
2737 """
2738 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2739 Point offset_after_rotation=None) -> Image
2740
2741 Rotates the image about the given point, by ``angle`` radians. Passing
2742 ``True`` to ``interpolating`` results in better image quality, but is
2743 slower. If the image has a mask, then the mask colour is used for the
2744 uncovered pixels in the rotated image background. Otherwise, black
2745 will be used as the fill colour.
2746
2747 Returns the rotated image, leaving this image intact.
2748 """
2749 return _core_.Image_Rotate(*args, **kwargs)
2750
2751 def Rotate90(*args, **kwargs):
2752 """
2753 Rotate90(self, bool clockwise=True) -> Image
2754
2755 Returns a copy of the image rotated 90 degrees in the direction
2756 indicated by ``clockwise``.
2757 """
2758 return _core_.Image_Rotate90(*args, **kwargs)
2759
2760 def Mirror(*args, **kwargs):
2761 """
2762 Mirror(self, bool horizontally=True) -> Image
2763
2764 Returns a mirrored copy of the image. The parameter ``horizontally``
2765 indicates the orientation.
2766 """
2767 return _core_.Image_Mirror(*args, **kwargs)
2768
2769 def Replace(*args, **kwargs):
2770 """
2771 Replace(self, byte r1, byte g1, byte b1, byte r2, byte g2, byte b2)
2772
2773 Replaces the colour specified by ``(r1,g1,b1)`` by the colour
2774 ``(r2,g2,b2)``.
2775 """
2776 return _core_.Image_Replace(*args, **kwargs)
2777
2778 def ConvertToGreyscale(*args, **kwargs):
2779 """
2780 ConvertToGreyscale(self, double lr=0.299, double lg=0.587, double lb=0.114) -> Image
2781
2782 Convert to greyscale image. Uses the luminance component (Y) of the
2783 image. The luma value (YUV) is calculated using (R * lr) + (G * lg) + (B * lb),
2784 defaults to ITU-T BT.601
2785 """
2786 return _core_.Image_ConvertToGreyscale(*args, **kwargs)
2787
2788 def ConvertToMono(*args, **kwargs):
2789 """
2790 ConvertToMono(self, byte r, byte g, byte b) -> Image
2791
2792 Returns monochromatic version of the image. The returned image has
2793 white colour where the original has ``(r,g,b)`` colour and black
2794 colour everywhere else.
2795 """
2796 return _core_.Image_ConvertToMono(*args, **kwargs)
2797
2798 def SetOption(*args, **kwargs):
2799 """
2800 SetOption(self, String name, String value)
2801
2802 Sets an image handler defined option. For example, when saving as a
2803 JPEG file, the option ``wx.IMAGE_OPTION_QUALITY`` is used, which is a
2804 number between 0 and 100 (0 is terrible, 100 is very good).
2805 """
2806 return _core_.Image_SetOption(*args, **kwargs)
2807
2808 def SetOptionInt(*args, **kwargs):
2809 """
2810 SetOptionInt(self, String name, int value)
2811
2812 Sets an image option as an integer.
2813 """
2814 return _core_.Image_SetOptionInt(*args, **kwargs)
2815
2816 def GetOption(*args, **kwargs):
2817 """
2818 GetOption(self, String name) -> String
2819
2820 Gets the value of an image handler option.
2821 """
2822 return _core_.Image_GetOption(*args, **kwargs)
2823
2824 def GetOptionInt(*args, **kwargs):
2825 """
2826 GetOptionInt(self, String name) -> int
2827
2828 Gets the value of an image handler option as an integer. If the given
2829 option is not present, the function returns 0.
2830 """
2831 return _core_.Image_GetOptionInt(*args, **kwargs)
2832
2833 def HasOption(*args, **kwargs):
2834 """
2835 HasOption(self, String name) -> bool
2836
2837 Returns true if the given option is present.
2838 """
2839 return _core_.Image_HasOption(*args, **kwargs)
2840
2841 def CountColours(*args, **kwargs):
2842 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2843 return _core_.Image_CountColours(*args, **kwargs)
2844
2845 def ComputeHistogram(*args, **kwargs):
2846 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2847 return _core_.Image_ComputeHistogram(*args, **kwargs)
2848
2849 def AddHandler(*args, **kwargs):
2850 """AddHandler(ImageHandler handler)"""
2851 return _core_.Image_AddHandler(*args, **kwargs)
2852
2853 AddHandler = staticmethod(AddHandler)
2854 def InsertHandler(*args, **kwargs):
2855 """InsertHandler(ImageHandler handler)"""
2856 return _core_.Image_InsertHandler(*args, **kwargs)
2857
2858 InsertHandler = staticmethod(InsertHandler)
2859 def RemoveHandler(*args, **kwargs):
2860 """RemoveHandler(String name) -> bool"""
2861 return _core_.Image_RemoveHandler(*args, **kwargs)
2862
2863 RemoveHandler = staticmethod(RemoveHandler)
2864 def GetHandlers(*args, **kwargs):
2865 """GetHandlers() -> PyObject"""
2866 return _core_.Image_GetHandlers(*args, **kwargs)
2867
2868 GetHandlers = staticmethod(GetHandlers)
2869 def GetImageExtWildcard(*args, **kwargs):
2870 """
2871 GetImageExtWildcard() -> String
2872
2873 Iterates all registered wxImageHandler objects, and returns a string
2874 containing file extension masks suitable for passing to file open/save
2875 dialog boxes.
2876 """
2877 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2878
2879 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2880 def ConvertToBitmap(*args, **kwargs):
2881 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2882 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2883
2884 def ConvertToMonoBitmap(*args, **kwargs):
2885 """ConvertToMonoBitmap(self, byte red, byte green, byte blue) -> Bitmap"""
2886 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2887
2888 def RotateHue(*args, **kwargs):
2889 """
2890 RotateHue(self, double angle)
2891
2892 Rotates the hue of each pixel of the image. Hue is a double in the
2893 range -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees
2894 """
2895 return _core_.Image_RotateHue(*args, **kwargs)
2896
2897 def RGBtoHSV(*args, **kwargs):
2898 """
2899 RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue
2900
2901 Converts a color in RGB color space to HSV color space.
2902 """
2903 return _core_.Image_RGBtoHSV(*args, **kwargs)
2904
2905 RGBtoHSV = staticmethod(RGBtoHSV)
2906 def HSVtoRGB(*args, **kwargs):
2907 """
2908 HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue
2909
2910 Converts a color in HSV color space to RGB color space.
2911 """
2912 return _core_.Image_HSVtoRGB(*args, **kwargs)
2913
2914 HSVtoRGB = staticmethod(HSVtoRGB)
2915 def __nonzero__(self): return self.Ok()
2916 Image_swigregister = _core_.Image_swigregister
2917 Image_swigregister(Image)
2918
2919 def ImageFromMime(*args, **kwargs):
2920 """
2921 ImageFromMime(String name, String mimetype, int index=-1) -> Image
2922
2923 Loads an image from a file, using a MIME type string (such as
2924 'image/jpeg') to specify image type.
2925 """
2926 val = _core_.new_ImageFromMime(*args, **kwargs)
2927 return val
2928
2929 def ImageFromStream(*args, **kwargs):
2930 """
2931 ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image
2932
2933 Loads an image from an input stream, or any readable Python file-like
2934 object.
2935 """
2936 val = _core_.new_ImageFromStream(*args, **kwargs)
2937 return val
2938
2939 def ImageFromStreamMime(*args, **kwargs):
2940 """
2941 ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image
2942
2943 Loads an image from an input stream, or any readable Python file-like
2944 object, specifying the image format with a MIME type string.
2945 """
2946 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2947 return val
2948
2949 def EmptyImage(*args, **kwargs):
2950 """
2951 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2952
2953 Construct an empty image of a given size, optionally setting all
2954 pixels to black.
2955 """
2956 val = _core_.new_EmptyImage(*args, **kwargs)
2957 return val
2958
2959 def ImageFromBitmap(*args, **kwargs):
2960 """
2961 ImageFromBitmap(Bitmap bitmap) -> Image
2962
2963 Construct an Image from a `wx.Bitmap`.
2964 """
2965 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2966 return val
2967
2968 def ImageFromData(*args, **kwargs):
2969 """
2970 ImageFromData(int width, int height, buffer data) -> Image
2971
2972 Construct an Image from a buffer of RGB bytes. Accepts either a
2973 string or a buffer object holding the data and the length of the data
2974 must be width*height*3.
2975 """
2976 val = _core_.new_ImageFromData(*args, **kwargs)
2977 return val
2978
2979 def ImageFromDataWithAlpha(*args, **kwargs):
2980 """
2981 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
2982
2983 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2984 Accepts either a string or a buffer object holding the data and the
2985 length of the data must be width*height*3 bytes, and the length of the
2986 alpha data must be width*height bytes.
2987 """
2988 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2989 return val
2990
2991 def Image_CanRead(*args, **kwargs):
2992 """
2993 Image_CanRead(String filename) -> bool
2994
2995 Returns True if the image handlers can read this file.
2996 """
2997 return _core_.Image_CanRead(*args, **kwargs)
2998
2999 def Image_GetImageCount(*args, **kwargs):
3000 """
3001 Image_GetImageCount(String filename, long type=BITMAP_TYPE_ANY) -> int
3002
3003 If the image file contains more than one image and the image handler
3004 is capable of retrieving these individually, this function will return
3005 the number of available images.
3006 """
3007 return _core_.Image_GetImageCount(*args, **kwargs)
3008
3009 def Image_CanReadStream(*args, **kwargs):
3010 """
3011 Image_CanReadStream(InputStream stream) -> bool
3012
3013 Returns True if the image handlers can read an image file from the
3014 data currently on the input stream, or a readable Python file-like
3015 object.
3016 """
3017 return _core_.Image_CanReadStream(*args, **kwargs)
3018
3019 def Image_AddHandler(*args, **kwargs):
3020 """Image_AddHandler(ImageHandler handler)"""
3021 return _core_.Image_AddHandler(*args, **kwargs)
3022
3023 def Image_InsertHandler(*args, **kwargs):
3024 """Image_InsertHandler(ImageHandler handler)"""
3025 return _core_.Image_InsertHandler(*args, **kwargs)
3026
3027 def Image_RemoveHandler(*args, **kwargs):
3028 """Image_RemoveHandler(String name) -> bool"""
3029 return _core_.Image_RemoveHandler(*args, **kwargs)
3030
3031 def Image_GetHandlers(*args):
3032 """Image_GetHandlers() -> PyObject"""
3033 return _core_.Image_GetHandlers(*args)
3034
3035 def Image_GetImageExtWildcard(*args):
3036 """
3037 Image_GetImageExtWildcard() -> String
3038
3039 Iterates all registered wxImageHandler objects, and returns a string
3040 containing file extension masks suitable for passing to file open/save
3041 dialog boxes.
3042 """
3043 return _core_.Image_GetImageExtWildcard(*args)
3044
3045 def Image_RGBtoHSV(*args, **kwargs):
3046 """
3047 Image_RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue
3048
3049 Converts a color in RGB color space to HSV color space.
3050 """
3051 return _core_.Image_RGBtoHSV(*args, **kwargs)
3052
3053 def Image_HSVtoRGB(*args, **kwargs):
3054 """
3055 Image_HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue
3056
3057 Converts a color in HSV color space to RGB color space.
3058 """
3059 return _core_.Image_HSVtoRGB(*args, **kwargs)
3060
3061 def InitAllImageHandlers():
3062 """
3063 The former functionality of InitAllImageHanders is now done internal to
3064 the _core_ extension module and so this function has become a simple NOP.
3065 """
3066 pass
3067
3068 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
3069 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
3070 PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
3071 PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
3072 PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
3073 BMP_24BPP = _core_.BMP_24BPP
3074 BMP_8BPP = _core_.BMP_8BPP
3075 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
3076 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
3077 BMP_8BPP_RED = _core_.BMP_8BPP_RED
3078 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
3079 BMP_4BPP = _core_.BMP_4BPP
3080 BMP_1BPP = _core_.BMP_1BPP
3081 BMP_1BPP_BW = _core_.BMP_1BPP_BW
3082 class BMPHandler(ImageHandler):
3083 """A `wx.ImageHandler` for \*.bmp bitmap files."""
3084 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3085 __repr__ = _swig_repr
3086 def __init__(self, *args, **kwargs):
3087 """
3088 __init__(self) -> BMPHandler
3089
3090 A `wx.ImageHandler` for \*.bmp bitmap files.
3091 """
3092 _core_.BMPHandler_swiginit(self,_core_.new_BMPHandler(*args, **kwargs))
3093 BMPHandler_swigregister = _core_.BMPHandler_swigregister
3094 BMPHandler_swigregister(BMPHandler)
3095 NullImage = cvar.NullImage
3096 IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
3097 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
3098 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
3099 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
3100 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
3101 IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
3102 IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
3103 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
3104 IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
3105 IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
3106 IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
3107 IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
3108 IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
3109 IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
3110 IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
3111
3112 class ICOHandler(BMPHandler):
3113 """A `wx.ImageHandler` for \*.ico icon files."""
3114 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3115 __repr__ = _swig_repr
3116 def __init__(self, *args, **kwargs):
3117 """
3118 __init__(self) -> ICOHandler
3119
3120 A `wx.ImageHandler` for \*.ico icon files.
3121 """
3122 _core_.ICOHandler_swiginit(self,_core_.new_ICOHandler(*args, **kwargs))
3123 ICOHandler_swigregister = _core_.ICOHandler_swigregister
3124 ICOHandler_swigregister(ICOHandler)
3125
3126 class CURHandler(ICOHandler):
3127 """A `wx.ImageHandler` for \*.cur cursor files."""
3128 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3129 __repr__ = _swig_repr
3130 def __init__(self, *args, **kwargs):
3131 """
3132 __init__(self) -> CURHandler
3133
3134 A `wx.ImageHandler` for \*.cur cursor files.
3135 """
3136 _core_.CURHandler_swiginit(self,_core_.new_CURHandler(*args, **kwargs))
3137 CURHandler_swigregister = _core_.CURHandler_swigregister
3138 CURHandler_swigregister(CURHandler)
3139
3140 class ANIHandler(CURHandler):
3141 """A `wx.ImageHandler` for \*.ani animated cursor files."""
3142 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3143 __repr__ = _swig_repr
3144 def __init__(self, *args, **kwargs):
3145 """
3146 __init__(self) -> ANIHandler
3147
3148 A `wx.ImageHandler` for \*.ani animated cursor files.
3149 """
3150 _core_.ANIHandler_swiginit(self,_core_.new_ANIHandler(*args, **kwargs))
3151 ANIHandler_swigregister = _core_.ANIHandler_swigregister
3152 ANIHandler_swigregister(ANIHandler)
3153
3154 class PNGHandler(ImageHandler):
3155 """A `wx.ImageHandler` for PNG image files."""
3156 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3157 __repr__ = _swig_repr
3158 def __init__(self, *args, **kwargs):
3159 """
3160 __init__(self) -> PNGHandler
3161
3162 A `wx.ImageHandler` for PNG image files.
3163 """
3164 _core_.PNGHandler_swiginit(self,_core_.new_PNGHandler(*args, **kwargs))
3165 PNGHandler_swigregister = _core_.PNGHandler_swigregister
3166 PNGHandler_swigregister(PNGHandler)
3167
3168 class GIFHandler(ImageHandler):
3169 """A `wx.ImageHandler` for GIF image files."""
3170 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3171 __repr__ = _swig_repr
3172 def __init__(self, *args, **kwargs):
3173 """
3174 __init__(self) -> GIFHandler
3175
3176 A `wx.ImageHandler` for GIF image files.
3177 """
3178 _core_.GIFHandler_swiginit(self,_core_.new_GIFHandler(*args, **kwargs))
3179 GIFHandler_swigregister = _core_.GIFHandler_swigregister
3180 GIFHandler_swigregister(GIFHandler)
3181
3182 class PCXHandler(ImageHandler):
3183 """A `wx.ImageHandler` for PCX imager files."""
3184 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3185 __repr__ = _swig_repr
3186 def __init__(self, *args, **kwargs):
3187 """
3188 __init__(self) -> PCXHandler
3189
3190 A `wx.ImageHandler` for PCX imager files.
3191 """
3192 _core_.PCXHandler_swiginit(self,_core_.new_PCXHandler(*args, **kwargs))
3193 PCXHandler_swigregister = _core_.PCXHandler_swigregister
3194 PCXHandler_swigregister(PCXHandler)
3195
3196 class JPEGHandler(ImageHandler):
3197 """A `wx.ImageHandler` for JPEG/JPG image files."""
3198 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3199 __repr__ = _swig_repr
3200 def __init__(self, *args, **kwargs):
3201 """
3202 __init__(self) -> JPEGHandler
3203
3204 A `wx.ImageHandler` for JPEG/JPG image files.
3205 """
3206 _core_.JPEGHandler_swiginit(self,_core_.new_JPEGHandler(*args, **kwargs))
3207 JPEGHandler_swigregister = _core_.JPEGHandler_swigregister
3208 JPEGHandler_swigregister(JPEGHandler)
3209
3210 class PNMHandler(ImageHandler):
3211 """A `wx.ImageHandler` for PNM image files."""
3212 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3213 __repr__ = _swig_repr
3214 def __init__(self, *args, **kwargs):
3215 """
3216 __init__(self) -> PNMHandler
3217
3218 A `wx.ImageHandler` for PNM image files.
3219 """
3220 _core_.PNMHandler_swiginit(self,_core_.new_PNMHandler(*args, **kwargs))
3221 PNMHandler_swigregister = _core_.PNMHandler_swigregister
3222 PNMHandler_swigregister(PNMHandler)
3223
3224 class XPMHandler(ImageHandler):
3225 """A `wx.ImageHandler` for XPM image."""
3226 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3227 __repr__ = _swig_repr
3228 def __init__(self, *args, **kwargs):
3229 """
3230 __init__(self) -> XPMHandler
3231
3232 A `wx.ImageHandler` for XPM image.
3233 """
3234 _core_.XPMHandler_swiginit(self,_core_.new_XPMHandler(*args, **kwargs))
3235 XPMHandler_swigregister = _core_.XPMHandler_swigregister
3236 XPMHandler_swigregister(XPMHandler)
3237
3238 class TIFFHandler(ImageHandler):
3239 """A `wx.ImageHandler` for TIFF image files."""
3240 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3241 __repr__ = _swig_repr
3242 def __init__(self, *args, **kwargs):
3243 """
3244 __init__(self) -> TIFFHandler
3245
3246 A `wx.ImageHandler` for TIFF image files.
3247 """
3248 _core_.TIFFHandler_swiginit(self,_core_.new_TIFFHandler(*args, **kwargs))
3249 TIFFHandler_swigregister = _core_.TIFFHandler_swigregister
3250 TIFFHandler_swigregister(TIFFHandler)
3251
3252 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
3253 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
3254 class Quantize(object):
3255 """Performs quantization, or colour reduction, on a wxImage."""
3256 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3257 def __init__(self): raise AttributeError, "No constructor defined"
3258 __repr__ = _swig_repr
3259 def Quantize(*args, **kwargs):
3260 """
3261 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
3262
3263 Reduce the colours in the source image and put the result into the
3264 destination image, setting the palette in the destination if
3265 needed. Both images may be the same, to overwrite the source image.
3266 """
3267 return _core_.Quantize_Quantize(*args, **kwargs)
3268
3269 Quantize = staticmethod(Quantize)
3270 Quantize_swigregister = _core_.Quantize_swigregister
3271 Quantize_swigregister(Quantize)
3272
3273 def Quantize_Quantize(*args, **kwargs):
3274 """
3275 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
3276
3277 Reduce the colours in the source image and put the result into the
3278 destination image, setting the palette in the destination if
3279 needed. Both images may be the same, to overwrite the source image.
3280 """
3281 return _core_.Quantize_Quantize(*args, **kwargs)
3282
3283 #---------------------------------------------------------------------------
3284
3285 class EvtHandler(Object):
3286 """Proxy of C++ EvtHandler class"""
3287 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3288 __repr__ = _swig_repr
3289 def __init__(self, *args, **kwargs):
3290 """__init__(self) -> EvtHandler"""
3291 _core_.EvtHandler_swiginit(self,_core_.new_EvtHandler(*args, **kwargs))
3292 def GetNextHandler(*args, **kwargs):
3293 """GetNextHandler(self) -> EvtHandler"""
3294 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
3295
3296 def GetPreviousHandler(*args, **kwargs):
3297 """GetPreviousHandler(self) -> EvtHandler"""
3298 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
3299
3300 def SetNextHandler(*args, **kwargs):
3301 """SetNextHandler(self, EvtHandler handler)"""
3302 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
3303
3304 def SetPreviousHandler(*args, **kwargs):
3305 """SetPreviousHandler(self, EvtHandler handler)"""
3306 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
3307
3308 def GetEvtHandlerEnabled(*args, **kwargs):
3309 """GetEvtHandlerEnabled(self) -> bool"""
3310 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
3311
3312 def SetEvtHandlerEnabled(*args, **kwargs):
3313 """SetEvtHandlerEnabled(self, bool enabled)"""
3314 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
3315
3316 def ProcessEvent(*args, **kwargs):
3317 """ProcessEvent(self, Event event) -> bool"""
3318 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
3319
3320 def AddPendingEvent(*args, **kwargs):
3321 """AddPendingEvent(self, Event event)"""
3322 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
3323
3324 def ProcessPendingEvents(*args, **kwargs):
3325 """ProcessPendingEvents(self)"""
3326 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
3327
3328 def Connect(*args, **kwargs):
3329 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
3330 return _core_.EvtHandler_Connect(*args, **kwargs)
3331
3332 def Disconnect(*args, **kwargs):
3333 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
3334 return _core_.EvtHandler_Disconnect(*args, **kwargs)
3335
3336 def _setOORInfo(*args, **kwargs):
3337 """_setOORInfo(self, PyObject _self, bool incref=True)"""
3338 val = _core_.EvtHandler__setOORInfo(*args, **kwargs)
3339 args[0].thisown = 0
3340 return val
3341
3342 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3343 """
3344 Bind an event to an event handler.
3345
3346 :param event: One of the EVT_* objects that specifies the
3347 type of event to bind,
3348
3349 :param handler: A callable object to be invoked when the
3350 event is delivered to self. Pass None to
3351 disconnect an event handler.
3352
3353 :param source: Sometimes the event originates from a
3354 different window than self, but you still
3355 want to catch it in self. (For example, a
3356 button event delivered to a frame.) By
3357 passing the source of the event, the event
3358 handling system is able to differentiate
3359 between the same event type from different
3360 controls.
3361
3362 :param id: Used to spcify the event source by ID instead
3363 of instance.
3364
3365 :param id2: Used when it is desirable to bind a handler
3366 to a range of IDs, such as with EVT_MENU_RANGE.
3367 """
3368 if source is not None:
3369 id = source.GetId()
3370 event.Bind(self, id, id2, handler)
3371
3372 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3373 """
3374 Disconencts the event handler binding for event from self.
3375 Returns True if successful.
3376 """
3377 if source is not None:
3378 id = source.GetId()
3379 return event.Unbind(self, id, id2)
3380
3381 EvtHandler_swigregister = _core_.EvtHandler_swigregister
3382 EvtHandler_swigregister(EvtHandler)
3383
3384 #---------------------------------------------------------------------------
3385
3386 class PyEventBinder(object):
3387 """
3388 Instances of this class are used to bind specific events to event
3389 handlers.
3390 """
3391 def __init__(self, evtType, expectedIDs=0):
3392 if expectedIDs not in [0, 1, 2]:
3393 raise ValueError, "Invalid number of expectedIDs"
3394 self.expectedIDs = expectedIDs
3395
3396 if type(evtType) == list or type(evtType) == tuple:
3397 self.evtType = evtType
3398 else:
3399 self.evtType = [evtType]
3400
3401
3402 def Bind(self, target, id1, id2, function):
3403 """Bind this set of event types to target."""
3404 for et in self.evtType:
3405 target.Connect(id1, id2, et, function)
3406
3407
3408 def Unbind(self, target, id1, id2):
3409 """Remove an event binding."""
3410 success = 0
3411 for et in self.evtType:
3412 success += target.Disconnect(id1, id2, et)
3413 return success != 0
3414
3415
3416 def __call__(self, *args):
3417 """
3418 For backwards compatibility with the old EVT_* functions.
3419 Should be called with either (window, func), (window, ID,
3420 func) or (window, ID1, ID2, func) parameters depending on the
3421 type of the event.
3422 """
3423 assert len(args) == 2 + self.expectedIDs
3424 id1 = wx.ID_ANY
3425 id2 = wx.ID_ANY
3426 target = args[0]
3427 if self.expectedIDs == 0:
3428 func = args[1]
3429 elif self.expectedIDs == 1:
3430 id1 = args[1]
3431 func = args[2]
3432 elif self.expectedIDs == 2:
3433 id1 = args[1]
3434 id2 = args[2]
3435 func = args[3]
3436 else:
3437 raise ValueError, "Unexpected number of IDs"
3438
3439 self.Bind(target, id1, id2, func)
3440
3441
3442 # These two are square pegs that don't fit the PyEventBinder hole...
3443 def EVT_COMMAND(win, id, cmd, func):
3444 win.Connect(id, -1, cmd, func)
3445 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
3446 win.Connect(id1, id2, cmd, func)
3447
3448
3449 #---------------------------------------------------------------------------
3450
3451 #---------------------------------------------------------------------------
3452
3453 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
3454 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
3455
3456 def NewEventType(*args):
3457 """NewEventType() -> wxEventType"""
3458 return _core_.NewEventType(*args)
3459 wxEVT_NULL = _core_.wxEVT_NULL
3460 wxEVT_FIRST = _core_.wxEVT_FIRST
3461 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
3462 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
3463 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
3464 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
3465 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
3466 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3467 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3468 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
3469 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3470 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3471 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3472 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3473 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3474 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3475 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3476 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3477 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3478 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3479 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3480 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3481 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3482 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3483 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3484 wxEVT_MOTION = _core_.wxEVT_MOTION
3485 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3486 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3487 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3488 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3489 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3490 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3491 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3492 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3493 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3494 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3495 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3496 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3497 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3498 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3499 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3500 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3501 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3502 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3503 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3504 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3505 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3506 wxEVT_CHAR = _core_.wxEVT_CHAR
3507 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3508 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3509 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3510 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3511 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3512 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3513 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3514 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3515 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3516 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3517 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3518 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3519 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3520 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3521 wxEVT_SCROLL_CHANGED = _core_.wxEVT_SCROLL_CHANGED
3522 wxEVT_SCROLL_ENDSCROLL = wxEVT_SCROLL_CHANGED
3523 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3524 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3525 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3526 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3527 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3528 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3529 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3530 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3531 wxEVT_SIZE = _core_.wxEVT_SIZE
3532 wxEVT_MOVE = _core_.wxEVT_MOVE
3533 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3534 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3535 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3536 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3537 wxEVT_POWER = _core_.wxEVT_POWER
3538 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3539 wxEVT_CREATE = _core_.wxEVT_CREATE
3540 wxEVT_DESTROY = _core_.wxEVT_DESTROY
3541 wxEVT_SHOW = _core_.wxEVT_SHOW
3542 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3543 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3544 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3545 wxEVT_PAINT = _core_.wxEVT_PAINT
3546 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3547 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3548 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3549 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3550 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3551 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3552 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3553 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3554 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3555 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3556 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3557 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3558 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3559 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3560 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3561 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3562 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3563 wxEVT_IDLE = _core_.wxEVT_IDLE
3564 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3565 wxEVT_SIZING = _core_.wxEVT_SIZING
3566 wxEVT_MOVING = _core_.wxEVT_MOVING
3567 wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE
3568 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3569 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3570 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3571 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3572 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3573 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3574 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3575 #
3576 # Create some event binders
3577 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3578 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3579 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3580 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3581 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3582 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3583 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3584 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3585 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3586 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3587 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3588 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3589 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3590 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3591 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3592 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3593 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3594 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3595 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3596 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3597 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3598 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3599 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3600 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3601 EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
3602 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3603 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3604 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3605 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3606 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3607 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3608 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3609 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3610 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3611 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3612 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3613 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3614 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3615 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3616 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3617 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3618
3619 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3620 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3621 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3622 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3623 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3624 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3625 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3626 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3627 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3628 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3629 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3630 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3631 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3632
3633 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3634 wxEVT_LEFT_UP,
3635 wxEVT_MIDDLE_DOWN,
3636 wxEVT_MIDDLE_UP,
3637 wxEVT_RIGHT_DOWN,
3638 wxEVT_RIGHT_UP,
3639 wxEVT_MOTION,
3640 wxEVT_LEFT_DCLICK,
3641 wxEVT_MIDDLE_DCLICK,
3642 wxEVT_RIGHT_DCLICK,
3643 wxEVT_ENTER_WINDOW,
3644 wxEVT_LEAVE_WINDOW,
3645 wxEVT_MOUSEWHEEL
3646 ])
3647
3648
3649 # Scrolling from wxWindow (sent to wxScrolledWindow)
3650 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3651 wxEVT_SCROLLWIN_BOTTOM,
3652 wxEVT_SCROLLWIN_LINEUP,
3653 wxEVT_SCROLLWIN_LINEDOWN,
3654 wxEVT_SCROLLWIN_PAGEUP,
3655 wxEVT_SCROLLWIN_PAGEDOWN,
3656 wxEVT_SCROLLWIN_THUMBTRACK,
3657 wxEVT_SCROLLWIN_THUMBRELEASE,
3658 ])
3659
3660 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3661 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3662 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3663 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3664 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3665 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3666 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3667 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3668
3669 # Scrolling from wx.Slider and wx.ScrollBar
3670 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3671 wxEVT_SCROLL_BOTTOM,
3672 wxEVT_SCROLL_LINEUP,
3673 wxEVT_SCROLL_LINEDOWN,
3674 wxEVT_SCROLL_PAGEUP,
3675 wxEVT_SCROLL_PAGEDOWN,
3676 wxEVT_SCROLL_THUMBTRACK,
3677 wxEVT_SCROLL_THUMBRELEASE,
3678 wxEVT_SCROLL_CHANGED,
3679 ])
3680
3681 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3682 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3683 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3684 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3685 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3686 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3687 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3688 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3689 EVT_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED )
3690 EVT_SCROLL_ENDSCROLL = EVT_SCROLL_CHANGED
3691
3692 # Scrolling from wx.Slider and wx.ScrollBar, with an id
3693 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3694 wxEVT_SCROLL_BOTTOM,
3695 wxEVT_SCROLL_LINEUP,
3696 wxEVT_SCROLL_LINEDOWN,
3697 wxEVT_SCROLL_PAGEUP,
3698 wxEVT_SCROLL_PAGEDOWN,
3699 wxEVT_SCROLL_THUMBTRACK,
3700 wxEVT_SCROLL_THUMBRELEASE,
3701 wxEVT_SCROLL_CHANGED,
3702 ], 1)
3703
3704 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3705 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3706 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3707 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3708 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3709 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3710 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3711 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3712 EVT_COMMAND_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED, 1)
3713 EVT_COMMAND_SCROLL_ENDSCROLL = EVT_COMMAND_SCROLL_CHANGED
3714
3715 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3716 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3717 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3718 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3719 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3720 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3721 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3722 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3723 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3724 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3725
3726 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3727 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3728 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3729 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3730 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3731 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3732 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3733 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3734 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3735
3736
3737 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3738 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3739 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3740 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3741 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3742 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3743 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3744
3745 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3746
3747 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3748 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3749
3750 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3751
3752
3753
3754 #---------------------------------------------------------------------------
3755
3756 class Event(Object):
3757 """
3758 An event is a structure holding information about an event passed to a
3759 callback or member function. wx.Event is an abstract base class for
3760 other event classes
3761 """
3762 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3763 def __init__(self): raise AttributeError, "No constructor defined"
3764 __repr__ = _swig_repr
3765 __swig_destroy__ = _core_.delete_Event
3766 __del__ = lambda self : None;
3767 def SetEventType(*args, **kwargs):
3768 """
3769 SetEventType(self, wxEventType typ)
3770
3771 Sets the specific type of the event.
3772 """
3773 return _core_.Event_SetEventType(*args, **kwargs)
3774
3775 def GetEventType(*args, **kwargs):
3776 """
3777 GetEventType(self) -> wxEventType
3778
3779 Returns the identifier of the given event type, such as
3780 ``wxEVT_COMMAND_BUTTON_CLICKED``.
3781 """
3782 return _core_.Event_GetEventType(*args, **kwargs)
3783
3784 def GetEventObject(*args, **kwargs):
3785 """
3786 GetEventObject(self) -> Object
3787
3788 Returns the object (usually a window) associated with the event, if
3789 any.
3790 """
3791 return _core_.Event_GetEventObject(*args, **kwargs)
3792
3793 def SetEventObject(*args, **kwargs):
3794 """
3795 SetEventObject(self, Object obj)
3796
3797 Sets the originating object, or in other words, obj is normally the
3798 object that is sending the event.
3799 """
3800 return _core_.Event_SetEventObject(*args, **kwargs)
3801
3802 def GetTimestamp(*args, **kwargs):
3803 """GetTimestamp(self) -> long"""
3804 return _core_.Event_GetTimestamp(*args, **kwargs)
3805
3806 def SetTimestamp(*args, **kwargs):
3807 """SetTimestamp(self, long ts=0)"""
3808 return _core_.Event_SetTimestamp(*args, **kwargs)
3809
3810 def GetId(*args, **kwargs):
3811 """
3812 GetId(self) -> int
3813
3814 Returns the identifier associated with this event, such as a button
3815 command id.
3816 """
3817 return _core_.Event_GetId(*args, **kwargs)
3818
3819 def SetId(*args, **kwargs):
3820 """
3821 SetId(self, int Id)
3822
3823 Set's the ID for the event. This is usually the ID of the window that
3824 is sending the event, but it can also be a command id from a menu
3825 item, etc.
3826 """
3827 return _core_.Event_SetId(*args, **kwargs)
3828
3829 def IsCommandEvent(*args, **kwargs):
3830 """
3831 IsCommandEvent(self) -> bool
3832
3833 Returns true if the event is or is derived from `wx.CommandEvent` else
3834 it returns false. Note: Exists only for optimization purposes.
3835 """
3836 return _core_.Event_IsCommandEvent(*args, **kwargs)
3837
3838 def Skip(*args, **kwargs):
3839 """
3840 Skip(self, bool skip=True)
3841
3842 Called by an event handler, it controls whether additional event
3843 handlers bound to this event will be called after the current event
3844 handler returns. Skip(false) (the default setting) will prevent
3845 additional event handlers from being called and control will be
3846 returned to the sender of the event immediately after the current
3847 handler has finished. Skip(True) will cause the event processing
3848 system to continue searching for a handler function for this event.
3849
3850 """
3851 return _core_.Event_Skip(*args, **kwargs)
3852
3853 def GetSkipped(*args, **kwargs):
3854 """
3855 GetSkipped(self) -> bool
3856
3857 Returns true if the event handler should be skipped, false otherwise.
3858 :see: `Skip`
3859 """
3860 return _core_.Event_GetSkipped(*args, **kwargs)
3861
3862 def ShouldPropagate(*args, **kwargs):
3863 """
3864 ShouldPropagate(self) -> bool
3865
3866 Test if this event should be propagated to the parent window or not,
3867 i.e. if the propagation level is currently greater than 0.
3868 """
3869 return _core_.Event_ShouldPropagate(*args, **kwargs)
3870
3871 def StopPropagation(*args, **kwargs):
3872 """
3873 StopPropagation(self) -> int
3874
3875 Stop the event from propagating to its parent window. Returns the old
3876 propagation level value which may be later passed to
3877 `ResumePropagation` to allow propagating the event again.
3878 """
3879 return _core_.Event_StopPropagation(*args, **kwargs)
3880
3881 def ResumePropagation(*args, **kwargs):
3882 """
3883 ResumePropagation(self, int propagationLevel)
3884
3885 Resume the event propagation by restoring the propagation level. (For
3886 example, you can use the value returned by an earlier call to
3887 `StopPropagation`.)
3888
3889 """
3890 return _core_.Event_ResumePropagation(*args, **kwargs)
3891
3892 def Clone(*args, **kwargs):
3893 """Clone(self) -> Event"""
3894 return _core_.Event_Clone(*args, **kwargs)
3895
3896 Event_swigregister = _core_.Event_swigregister
3897 Event_swigregister(Event)
3898
3899 #---------------------------------------------------------------------------
3900
3901 class PropagationDisabler(object):
3902 """
3903 Helper class to temporarily change an event not to propagate. Simply
3904 create an instance of this class and then whe it is destroyed the
3905 propogation of the event will be restored.
3906 """
3907 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3908 __repr__ = _swig_repr
3909 def __init__(self, *args, **kwargs):
3910 """
3911 __init__(self, Event event) -> PropagationDisabler
3912
3913 Helper class to temporarily change an event not to propagate. Simply
3914 create an instance of this class and then whe it is destroyed the
3915 propogation of the event will be restored.
3916 """
3917 _core_.PropagationDisabler_swiginit(self,_core_.new_PropagationDisabler(*args, **kwargs))
3918 __swig_destroy__ = _core_.delete_PropagationDisabler
3919 __del__ = lambda self : None;
3920 PropagationDisabler_swigregister = _core_.PropagationDisabler_swigregister
3921 PropagationDisabler_swigregister(PropagationDisabler)
3922
3923 class PropagateOnce(object):
3924 """
3925 A helper class that will temporarily lower propagation level of an
3926 event. Simply create an instance of this class and then whe it is
3927 destroyed the propogation of the event will be restored.
3928 """
3929 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3930 __repr__ = _swig_repr
3931 def __init__(self, *args, **kwargs):
3932 """
3933 __init__(self, Event event) -> PropagateOnce
3934
3935 A helper class that will temporarily lower propagation level of an
3936 event. Simply create an instance of this class and then whe it is
3937 destroyed the propogation of the event will be restored.
3938 """
3939 _core_.PropagateOnce_swiginit(self,_core_.new_PropagateOnce(*args, **kwargs))
3940 __swig_destroy__ = _core_.delete_PropagateOnce
3941 __del__ = lambda self : None;
3942 PropagateOnce_swigregister = _core_.PropagateOnce_swigregister
3943 PropagateOnce_swigregister(PropagateOnce)
3944
3945 #---------------------------------------------------------------------------
3946
3947 class CommandEvent(Event):
3948 """
3949 This event class contains information about command events, which
3950 originate from a variety of simple controls, as well as menus and
3951 toolbars.
3952 """
3953 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3954 __repr__ = _swig_repr
3955 def __init__(self, *args, **kwargs):
3956 """
3957 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent
3958
3959 This event class contains information about command events, which
3960 originate from a variety of simple controls, as well as menus and
3961 toolbars.
3962 """
3963 _core_.CommandEvent_swiginit(self,_core_.new_CommandEvent(*args, **kwargs))
3964 def GetSelection(*args, **kwargs):
3965 """
3966 GetSelection(self) -> int
3967
3968 Returns item index for a listbox or choice selection event (not valid
3969 for a deselection).
3970 """
3971 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3972
3973 def SetString(*args, **kwargs):
3974 """SetString(self, String s)"""
3975 return _core_.CommandEvent_SetString(*args, **kwargs)
3976
3977 def GetString(*args, **kwargs):
3978 """
3979 GetString(self) -> String
3980
3981 Returns item string for a listbox or choice selection event (not valid
3982 for a deselection).
3983 """
3984 return _core_.CommandEvent_GetString(*args, **kwargs)
3985
3986 def IsChecked(*args, **kwargs):
3987 """
3988 IsChecked(self) -> bool
3989
3990 This method can be used with checkbox and menu events: for the
3991 checkboxes, the method returns true for a selection event and false
3992 for a deselection one. For the menu events, this method indicates if
3993 the menu item just has become checked or unchecked (and thus only
3994 makes sense for checkable menu items).
3995 """
3996 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3997
3998 Checked = IsChecked
3999 def IsSelection(*args, **kwargs):
4000 """
4001 IsSelection(self) -> bool
4002
4003 For a listbox or similar event, returns true if it is a selection,
4004 false if it is a deselection.
4005 """
4006 return _core_.CommandEvent_IsSelection(*args, **kwargs)
4007
4008 def SetExtraLong(*args, **kwargs):
4009 """SetExtraLong(self, long extraLong)"""
4010 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
4011
4012 def GetExtraLong(*args, **kwargs):
4013 """
4014 GetExtraLong(self) -> long
4015
4016 Returns extra information dependant on the event objects type. If the
4017 event comes from a listbox selection, it is a boolean determining
4018 whether the event was a selection (true) or a deselection (false). A
4019 listbox deselection only occurs for multiple-selection boxes, and in
4020 this case the index and string values are indeterminate and the
4021 listbox must be examined by the application.
4022 """
4023 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
4024
4025 def SetInt(*args, **kwargs):
4026 """SetInt(self, int i)"""
4027 return _core_.CommandEvent_SetInt(*args, **kwargs)
4028
4029 def GetInt(*args, **kwargs):
4030 """
4031 GetInt(self) -> long
4032
4033 Returns the integer identifier corresponding to a listbox, choice or
4034 radiobox selection (only if the event was a selection, not a
4035 deselection), or a boolean value representing the value of a checkbox.
4036 """
4037 return _core_.CommandEvent_GetInt(*args, **kwargs)
4038
4039 def GetClientData(*args, **kwargs):
4040 """
4041 GetClientData(self) -> PyObject
4042
4043 Returns the client data object for a listbox or choice selection event, (if any.)
4044 """
4045 return _core_.CommandEvent_GetClientData(*args, **kwargs)
4046
4047 def SetClientData(*args, **kwargs):
4048 """
4049 SetClientData(self, PyObject clientData)
4050
4051 Associate the given client data with the item at position n.
4052 """
4053 return _core_.CommandEvent_SetClientData(*args, **kwargs)
4054
4055 GetClientObject = GetClientData
4056 SetClientObject = SetClientData
4057
4058 def Clone(*args, **kwargs):
4059 """Clone(self) -> Event"""
4060 return _core_.CommandEvent_Clone(*args, **kwargs)
4061
4062 CommandEvent_swigregister = _core_.CommandEvent_swigregister
4063 CommandEvent_swigregister(CommandEvent)
4064
4065 #---------------------------------------------------------------------------
4066
4067 class NotifyEvent(CommandEvent):
4068 """
4069 An instance of this class (or one of its derived classes) is sent from
4070 a control when the control's state is being changed and the control
4071 allows that change to be prevented from happening. The event handler
4072 can call `Veto` or `Allow` to tell the control what to do.
4073 """
4074 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4075 __repr__ = _swig_repr
4076 def __init__(self, *args, **kwargs):
4077 """
4078 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent
4079
4080 An instance of this class (or one of its derived classes) is sent from
4081 a control when the control's state is being changed and the control
4082 allows that change to be prevented from happening. The event handler
4083 can call `Veto` or `Allow` to tell the control what to do.
4084 """
4085 _core_.NotifyEvent_swiginit(self,_core_.new_NotifyEvent(*args, **kwargs))
4086 def Veto(*args, **kwargs):
4087 """
4088 Veto(self)
4089
4090 Prevents the change announced by this event from happening.
4091
4092 It is in general a good idea to notify the user about the reasons for
4093 vetoing the change because otherwise the applications behaviour (which
4094 just refuses to do what the user wants) might be quite surprising.
4095 """
4096 return _core_.NotifyEvent_Veto(*args, **kwargs)
4097
4098 def Allow(*args, **kwargs):
4099 """
4100 Allow(self)
4101
4102 This is the opposite of `Veto`: it explicitly allows the event to be
4103 processed. For most events it is not necessary to call this method as
4104 the events are allowed anyhow but some are forbidden by default (this
4105 will be mentioned in the corresponding event description).
4106 """
4107 return _core_.NotifyEvent_Allow(*args, **kwargs)
4108
4109 def IsAllowed(*args, **kwargs):
4110 """
4111 IsAllowed(self) -> bool
4112
4113 Returns true if the change is allowed (`Veto` hasn't been called) or
4114 false otherwise (if it was).
4115 """
4116 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
4117
4118 NotifyEvent_swigregister = _core_.NotifyEvent_swigregister
4119 NotifyEvent_swigregister(NotifyEvent)
4120
4121 #---------------------------------------------------------------------------
4122
4123 class ScrollEvent(CommandEvent):
4124 """
4125 A scroll event holds information about events sent from stand-alone
4126 scrollbars and sliders. Note that scrolled windows do not send
4127 instnaces of this event class, but send the `wx.ScrollWinEvent`
4128 instead.
4129 """
4130 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4131 __repr__ = _swig_repr
4132 def __init__(self, *args, **kwargs):
4133 """
4134 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
4135 int orient=0) -> ScrollEvent
4136 """
4137 _core_.ScrollEvent_swiginit(self,_core_.new_ScrollEvent(*args, **kwargs))
4138 def GetOrientation(*args, **kwargs):
4139 """
4140 GetOrientation(self) -> int
4141
4142 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
4143 the scrollbar.
4144 """
4145 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
4146
4147 def GetPosition(*args, **kwargs):
4148 """
4149 GetPosition(self) -> int
4150
4151 Returns the position of the scrollbar.
4152 """
4153 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
4154
4155 def SetOrientation(*args, **kwargs):
4156 """SetOrientation(self, int orient)"""
4157 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
4158
4159 def SetPosition(*args, **kwargs):
4160 """SetPosition(self, int pos)"""
4161 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
4162
4163 ScrollEvent_swigregister = _core_.ScrollEvent_swigregister
4164 ScrollEvent_swigregister(ScrollEvent)
4165
4166 #---------------------------------------------------------------------------
4167
4168 class ScrollWinEvent(Event):
4169 """
4170 A wx.ScrollWinEvent holds information about scrolling and is sent from
4171 scrolling windows.
4172 """
4173 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4174 __repr__ = _swig_repr
4175 def __init__(self, *args, **kwargs):
4176 """
4177 __init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent
4178
4179 A wx.ScrollWinEvent holds information about scrolling and is sent from
4180 scrolling windows.
4181 """
4182 _core_.ScrollWinEvent_swiginit(self,_core_.new_ScrollWinEvent(*args, **kwargs))
4183 def GetOrientation(*args, **kwargs):
4184 """
4185 GetOrientation(self) -> int
4186
4187 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
4188 the scrollbar.
4189 """
4190 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
4191
4192 def GetPosition(*args, **kwargs):
4193 """
4194 GetPosition(self) -> int
4195
4196 Returns the position of the scrollbar for the thumb track and release
4197 events. Note that this field can't be used for the other events, you
4198 need to query the window itself for the current position in that case.
4199 """
4200 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
4201
4202 def SetOrientation(*args, **kwargs):
4203 """SetOrientation(self, int orient)"""
4204 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
4205
4206 def SetPosition(*args, **kwargs):
4207 """SetPosition(self, int pos)"""
4208 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
4209
4210 ScrollWinEvent_swigregister = _core_.ScrollWinEvent_swigregister
4211 ScrollWinEvent_swigregister(ScrollWinEvent)
4212
4213 #---------------------------------------------------------------------------
4214
4215 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
4216 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
4217 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
4218 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
4219 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
4220 class MouseEvent(Event):
4221 """
4222 This event class contains information about the events generated by
4223 the mouse: they include mouse buttons press and release events and
4224 mouse move events.
4225
4226 All mouse events involving the buttons use ``wx.MOUSE_BTN_LEFT`` for
4227 the left mouse button, ``wx.MOUSE_BTN_MIDDLE`` for the middle one and
4228 ``wx.MOUSE_BTN_RIGHT`` for the right one. Note that not all mice have
4229 a middle button so a portable application should avoid relying on the
4230 events from it.
4231
4232 Note the difference between methods like `LeftDown` and `LeftIsDown`:
4233 the former returns true when the event corresponds to the left mouse
4234 button click while the latter returns true if the left mouse button is
4235 currently being pressed. For example, when the user is dragging the
4236 mouse you can use `LeftIsDown` to test whether the left mouse button
4237 is (still) depressed. Also, by convention, if `LeftDown` returns true,
4238 `LeftIsDown` will also return true in wxWidgets whatever the
4239 underlying GUI behaviour is (which is platform-dependent). The same
4240 applies, of course, to other mouse buttons as well.
4241 """
4242 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4243 __repr__ = _swig_repr
4244 def __init__(self, *args, **kwargs):
4245 """
4246 __init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent
4247
4248 Constructs a wx.MouseEvent. Valid event types are:
4249
4250 * wxEVT_ENTER_WINDOW
4251 * wxEVT_LEAVE_WINDOW
4252 * wxEVT_LEFT_DOWN
4253 * wxEVT_LEFT_UP
4254 * wxEVT_LEFT_DCLICK
4255 * wxEVT_MIDDLE_DOWN
4256 * wxEVT_MIDDLE_UP
4257 * wxEVT_MIDDLE_DCLICK
4258 * wxEVT_RIGHT_DOWN
4259 * wxEVT_RIGHT_UP
4260 * wxEVT_RIGHT_DCLICK
4261 * wxEVT_MOTION
4262 * wxEVT_MOUSEWHEEL
4263 """
4264 _core_.MouseEvent_swiginit(self,_core_.new_MouseEvent(*args, **kwargs))
4265 def IsButton(*args, **kwargs):
4266 """
4267 IsButton(self) -> bool
4268
4269 Returns true if the event was a mouse button event (not necessarily a
4270 button down event - that may be tested using `ButtonDown`).
4271 """
4272 return _core_.MouseEvent_IsButton(*args, **kwargs)
4273
4274 def ButtonDown(*args, **kwargs):
4275 """
4276 ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool
4277
4278 If the argument is omitted, this returns true if the event was any
4279 mouse button down event. Otherwise the argument specifies which
4280 button-down event shold be checked for (see `Button` for the possible
4281 values).
4282 """
4283 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
4284
4285 def ButtonDClick(*args, **kwargs):
4286 """
4287 ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool
4288
4289 If the argument is omitted, this returns true if the event was any
4290 mouse double click event. Otherwise the argument specifies which
4291 double click event to check for (see `Button` for the possible
4292 values).
4293 """
4294 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
4295
4296 def ButtonUp(*args, **kwargs):
4297 """
4298 ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool
4299
4300 If the argument is omitted, this returns true if the event was any
4301 mouse button up event. Otherwise the argument specifies which button
4302 up event to check for (see `Button` for the possible values).
4303 """
4304 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
4305
4306 def Button(*args, **kwargs):
4307 """
4308 Button(self, int button) -> bool
4309
4310 Returns true if the identified mouse button is changing state. Valid
4311 values of button are:
4312
4313 ==================== =====================================
4314 wx.MOUSE_BTN_LEFT check if left button was pressed
4315 wx.MOUSE_BTN_MIDDLE check if middle button was pressed
4316 wx.MOUSE_BTN_RIGHT check if right button was pressed
4317 wx.MOUSE_BTN_ANY check if any button was pressed
4318 ==================== =====================================
4319
4320 """
4321 return _core_.MouseEvent_Button(*args, **kwargs)
4322
4323 def ButtonIsDown(*args, **kwargs):
4324 """ButtonIsDown(self, int but) -> bool"""
4325 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
4326
4327 def GetButton(*args, **kwargs):
4328 """
4329 GetButton(self) -> int
4330
4331 Returns the mouse button which generated this event or
4332 wx.MOUSE_BTN_NONE if no button is involved (for mouse move, enter or
4333 leave event, for example). Otherwise wx.MOUSE_BTN_LEFT is returned for
4334 the left button down, up and double click events, wx.MOUSE_BTN_MIDDLE
4335 and wx.MOUSE_BTN_RIGHT for the same events for the middle and the
4336 right buttons respectively.
4337 """
4338 return _core_.MouseEvent_GetButton(*args, **kwargs)
4339
4340 def ControlDown(*args, **kwargs):
4341 """
4342 ControlDown(self) -> bool
4343
4344 Returns true if the control key was down at the time of the event.
4345 """
4346 return _core_.MouseEvent_ControlDown(*args, **kwargs)
4347
4348 def MetaDown(*args, **kwargs):
4349 """
4350 MetaDown(self) -> bool
4351
4352 Returns true if the Meta key was down at the time of the event.
4353 """
4354 return _core_.MouseEvent_MetaDown(*args, **kwargs)
4355
4356 def AltDown(*args, **kwargs):
4357 """
4358 AltDown(self) -> bool
4359
4360 Returns true if the Alt key was down at the time of the event.
4361 """
4362 return _core_.MouseEvent_AltDown(*args, **kwargs)
4363
4364 def ShiftDown(*args, **kwargs):
4365 """
4366 ShiftDown(self) -> bool
4367
4368 Returns true if the Shift key was down at the time of the event.
4369 """
4370 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
4371
4372 def CmdDown(*args, **kwargs):
4373 """
4374 CmdDown(self) -> bool
4375
4376 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4377 platforms but the special "Apple" (a.k.a as "Command") key on
4378 Macs. It often makes sense to use it instead of, say, `ControlDown`
4379 because Cmd key is used for the same thing under Mac as Ctrl
4380 elsewhere. The Ctrl key still exists, it's just not used for this
4381 purpose. So for non-Mac platforms this is the same as `ControlDown`
4382 and Macs this is the same as `MetaDown`.
4383 """
4384 return _core_.MouseEvent_CmdDown(*args, **kwargs)
4385
4386 def LeftDown(*args, **kwargs):
4387 """
4388 LeftDown(self) -> bool
4389
4390 Returns true if the left mouse button state changed to down.
4391 """
4392 return _core_.MouseEvent_LeftDown(*args, **kwargs)
4393
4394 def MiddleDown(*args, **kwargs):
4395 """
4396 MiddleDown(self) -> bool
4397
4398 Returns true if the middle mouse button state changed to down.
4399 """
4400 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
4401
4402 def RightDown(*args, **kwargs):
4403 """
4404 RightDown(self) -> bool
4405
4406 Returns true if the right mouse button state changed to down.
4407 """
4408 return _core_.MouseEvent_RightDown(*args, **kwargs)
4409
4410 def LeftUp(*args, **kwargs):
4411 """
4412 LeftUp(self) -> bool
4413
4414 Returns true if the left mouse button state changed to up.
4415 """
4416 return _core_.MouseEvent_LeftUp(*args, **kwargs)
4417
4418 def MiddleUp(*args, **kwargs):
4419 """
4420 MiddleUp(self) -> bool
4421
4422 Returns true if the middle mouse button state changed to up.
4423 """
4424 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
4425
4426 def RightUp(*args, **kwargs):
4427 """
4428 RightUp(self) -> bool
4429
4430 Returns true if the right mouse button state changed to up.
4431 """
4432 return _core_.MouseEvent_RightUp(*args, **kwargs)
4433
4434 def LeftDClick(*args, **kwargs):
4435 """
4436 LeftDClick(self) -> bool
4437
4438 Returns true if the event was a left button double click.
4439 """
4440 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
4441
4442 def MiddleDClick(*args, **kwargs):
4443 """
4444 MiddleDClick(self) -> bool
4445
4446 Returns true if the event was a middle button double click.
4447 """
4448 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
4449
4450 def RightDClick(*args, **kwargs):
4451 """
4452 RightDClick(self) -> bool
4453
4454 Returns true if the event was a right button double click.
4455 """
4456 return _core_.MouseEvent_RightDClick(*args, **kwargs)
4457
4458 def LeftIsDown(*args, **kwargs):
4459 """
4460 LeftIsDown(self) -> bool
4461
4462 Returns true if the left mouse button is currently down, independent
4463 of the current event type.
4464
4465 Please notice that it is not the same as LeftDown which returns true
4466 if the left mouse button was just pressed. Rather, it describes the
4467 state of the mouse button before the event happened.
4468
4469 This event is usually used in the mouse event handlers which process
4470 "move mouse" messages to determine whether the user is (still)
4471 dragging the mouse.
4472 """
4473 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
4474
4475 def MiddleIsDown(*args, **kwargs):
4476 """
4477 MiddleIsDown(self) -> bool
4478
4479 Returns true if the middle mouse button is currently down, independent
4480 of the current event type.
4481 """
4482 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
4483
4484 def RightIsDown(*args, **kwargs):
4485 """
4486 RightIsDown(self) -> bool
4487
4488 Returns true if the right mouse button is currently down, independent
4489 of the current event type.
4490 """
4491 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
4492
4493 def Dragging(*args, **kwargs):
4494 """
4495 Dragging(self) -> bool
4496
4497 Returns true if this was a dragging event (motion while a button is
4498 depressed).
4499 """
4500 return _core_.MouseEvent_Dragging(*args, **kwargs)
4501
4502 def Moving(*args, **kwargs):
4503 """
4504 Moving(self) -> bool
4505
4506 Returns true if this was a motion event and no mouse buttons were
4507 pressed. If any mouse button is held pressed, then this method returns
4508 false and Dragging returns true.
4509 """
4510 return _core_.MouseEvent_Moving(*args, **kwargs)
4511
4512 def Entering(*args, **kwargs):
4513 """
4514 Entering(self) -> bool
4515
4516 Returns true if the mouse was entering the window.
4517 """
4518 return _core_.MouseEvent_Entering(*args, **kwargs)
4519
4520 def Leaving(*args, **kwargs):
4521 """
4522 Leaving(self) -> bool
4523
4524 Returns true if the mouse was leaving the window.
4525 """
4526 return _core_.MouseEvent_Leaving(*args, **kwargs)
4527
4528 def GetPosition(*args, **kwargs):
4529 """
4530 GetPosition(self) -> Point
4531
4532 Returns the pixel position of the mouse in window coordinates when the
4533 event happened.
4534 """
4535 return _core_.MouseEvent_GetPosition(*args, **kwargs)
4536
4537 def GetPositionTuple(*args, **kwargs):
4538 """
4539 GetPositionTuple() -> (x,y)
4540
4541 Returns the pixel position of the mouse in window coordinates when the
4542 event happened.
4543 """
4544 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
4545
4546 def GetLogicalPosition(*args, **kwargs):
4547 """
4548 GetLogicalPosition(self, DC dc) -> Point
4549
4550 Returns the logical mouse position in pixels (i.e. translated
4551 according to the translation set for the DC, which usually indicates
4552 that the window has been scrolled).
4553 """
4554 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
4555
4556 def GetX(*args, **kwargs):
4557 """
4558 GetX(self) -> int
4559
4560 Returns X coordinate of the physical mouse event position.
4561 """
4562 return _core_.MouseEvent_GetX(*args, **kwargs)
4563
4564 def GetY(*args, **kwargs):
4565 """
4566 GetY(self) -> int
4567
4568 Returns Y coordinate of the physical mouse event position.
4569 """
4570 return _core_.MouseEvent_GetY(*args, **kwargs)
4571
4572 def GetWheelRotation(*args, **kwargs):
4573 """
4574 GetWheelRotation(self) -> int
4575
4576 Get wheel rotation, positive or negative indicates direction of
4577 rotation. Current devices all send an event when rotation is equal to
4578 +/-WheelDelta, but this allows for finer resolution devices to be
4579 created in the future. Because of this you shouldn't assume that one
4580 event is equal to 1 line or whatever, but you should be able to either
4581 do partial line scrolling or wait until +/-WheelDelta rotation values
4582 have been accumulated before scrolling.
4583 """
4584 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
4585
4586 def GetWheelDelta(*args, **kwargs):
4587 """
4588 GetWheelDelta(self) -> int
4589
4590 Get wheel delta, normally 120. This is the threshold for action to be
4591 taken, and one such action (for example, scrolling one increment)
4592 should occur for each delta.
4593 """
4594 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
4595
4596 def GetLinesPerAction(*args, **kwargs):
4597 """
4598 GetLinesPerAction(self) -> int
4599
4600 Returns the configured number of lines (or whatever) to be scrolled
4601 per wheel action. Defaults to three.
4602 """
4603 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
4604
4605 def IsPageScroll(*args, **kwargs):
4606 """
4607 IsPageScroll(self) -> bool
4608
4609 Returns true if the system has been setup to do page scrolling with
4610 the mouse wheel instead of line scrolling.
4611 """
4612 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
4613
4614 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
4615 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
4616 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
4617 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
4618 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
4619 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
4620 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
4621 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
4622 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
4623 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
4624 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
4625 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
4626 MouseEvent_swigregister = _core_.MouseEvent_swigregister
4627 MouseEvent_swigregister(MouseEvent)
4628
4629 #---------------------------------------------------------------------------
4630
4631 class SetCursorEvent(Event):
4632 """
4633 A SetCursorEvent is generated when the mouse cursor is about to be set
4634 as a result of mouse motion. This event gives the application the
4635 chance to perform specific mouse cursor processing based on the
4636 current position of the mouse within the window. Use the `SetCursor`
4637 method to specify the cursor you want to be displayed.
4638 """
4639 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4640 __repr__ = _swig_repr
4641 def __init__(self, *args, **kwargs):
4642 """
4643 __init__(self, int x=0, int y=0) -> SetCursorEvent
4644
4645 Construct a new `wx.SetCursorEvent`.
4646 """
4647 _core_.SetCursorEvent_swiginit(self,_core_.new_SetCursorEvent(*args, **kwargs))
4648 def GetX(*args, **kwargs):
4649 """
4650 GetX(self) -> int
4651
4652 Returns the X coordinate of the mouse in client coordinates.
4653 """
4654 return _core_.SetCursorEvent_GetX(*args, **kwargs)
4655
4656 def GetY(*args, **kwargs):
4657 """
4658 GetY(self) -> int
4659
4660 Returns the Y coordinate of the mouse in client coordinates.
4661 """
4662 return _core_.SetCursorEvent_GetY(*args, **kwargs)
4663
4664 def SetCursor(*args, **kwargs):
4665 """
4666 SetCursor(self, Cursor cursor)
4667
4668 Sets the cursor associated with this event.
4669 """
4670 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
4671
4672 def GetCursor(*args, **kwargs):
4673 """
4674 GetCursor(self) -> Cursor
4675
4676 Returns a reference to the cursor specified by this event.
4677 """
4678 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
4679
4680 def HasCursor(*args, **kwargs):
4681 """
4682 HasCursor(self) -> bool
4683
4684 Returns true if the cursor specified by this event is a valid cursor.
4685 """
4686 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
4687
4688 SetCursorEvent_swigregister = _core_.SetCursorEvent_swigregister
4689 SetCursorEvent_swigregister(SetCursorEvent)
4690
4691 #---------------------------------------------------------------------------
4692
4693 class KeyEvent(Event):
4694 """
4695 This event class contains information about keypress and character
4696 events. These events are only sent to the widget that currently has
4697 the keyboard focus.
4698
4699 Notice that there are three different kinds of keyboard events in
4700 wxWidgets: key down and up events and char events. The difference
4701 between the first two is clear - the first corresponds to a key press
4702 and the second to a key release - otherwise they are identical. Just
4703 note that if the key is maintained in a pressed state you will
4704 typically get a lot of (automatically generated) down events but only
4705 one up so it is wrong to assume that there is one up event
4706 corresponding to each down one.
4707
4708 Both key events provide untranslated key codes while the char event
4709 carries the translated one. The untranslated code for alphanumeric
4710 keys is always an upper case value. For the other keys it is one of
4711 WXK_XXX values from the keycodes table. The translated key is, in
4712 general, the character the user expects to appear as the result of the
4713 key combination when typing the text into a text entry zone, for
4714 example.
4715
4716 A few examples to clarify this (all assume that CAPS LOCK is unpressed
4717 and the standard US keyboard): when the 'A' key is pressed, the key
4718 down event key code is equal to ASCII A == 65. But the char event key
4719 code is ASCII a == 97. On the other hand, if you press both SHIFT and
4720 'A' keys simultaneously , the key code in key down event will still be
4721 just 'A' while the char event key code parameter will now be 'A' as
4722 well.
4723
4724 Although in this simple case it is clear that the correct key code
4725 could be found in the key down event handler by checking the value
4726 returned by `ShiftDown`, in general you should use EVT_CHAR for this
4727 as for non alphanumeric keys or non-US keyboard layouts the
4728 translation is keyboard-layout dependent and can only be done properly
4729 by the system itself.
4730
4731 Another kind of translation is done when the control key is pressed:
4732 for example, for CTRL-A key press the key down event still carries the
4733 same key code 'A' as usual but the char event will have key code of 1,
4734 the ASCII value of this key combination.
4735
4736 You may discover how the other keys on your system behave
4737 interactively by running the KeyEvents sample in the wxPython demo and
4738 pressing some keys while the blue box at the top has the keyboard
4739 focus.
4740
4741 **Note**: If a key down event is caught and the event handler does not
4742 call event.Skip() then the coresponding char event will not
4743 happen. This is by design and enables the programs that handle both
4744 types of events to be a bit simpler.
4745
4746 **Note for Windows programmers**: The key and char events in wxWidgets
4747 are similar to but slightly different from Windows WM_KEYDOWN and
4748 WM_CHAR events. In particular, Alt-x combination will generate a char
4749 event in wxWidgets (unless it is used as an accelerator).
4750
4751 **Tip**: be sure to call event.Skip() for events that you don't
4752 process in key event function, otherwise menu shortcuts may cease to
4753 work under Windows.
4754
4755 """
4756 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4757 __repr__ = _swig_repr
4758 def __init__(self, *args, **kwargs):
4759 """
4760 __init__(self, wxEventType eventType=wxEVT_NULL) -> KeyEvent
4761
4762 Construct a new `wx.KeyEvent`. Valid event types are:
4763 *
4764 """
4765 _core_.KeyEvent_swiginit(self,_core_.new_KeyEvent(*args, **kwargs))
4766 def GetModifiers(*args, **kwargs):
4767 """
4768 GetModifiers(self) -> int
4769
4770 Returns a bitmask of the current modifier settings. Can be used to
4771 check if the key event has exactly the given modifiers without having
4772 to explicitly check that the other modifiers are not down. For
4773 example::
4774
4775 if event.GetModifers() == wx.MOD_CONTROL:
4776 DoSomething()
4777
4778 """
4779 return _core_.KeyEvent_GetModifiers(*args, **kwargs)
4780
4781 def ControlDown(*args, **kwargs):
4782 """
4783 ControlDown(self) -> bool
4784
4785 Returns ``True`` if the Control key was down at the time of the event.
4786 """
4787 return _core_.KeyEvent_ControlDown(*args, **kwargs)
4788
4789 def MetaDown(*args, **kwargs):
4790 """
4791 MetaDown(self) -> bool
4792
4793 Returns ``True`` if the Meta key was down at the time of the event.
4794 """
4795 return _core_.KeyEvent_MetaDown(*args, **kwargs)
4796
4797 def AltDown(*args, **kwargs):
4798 """
4799 AltDown(self) -> bool
4800
4801 Returns ``True`` if the Alt key was down at the time of the event.
4802 """
4803 return _core_.KeyEvent_AltDown(*args, **kwargs)
4804
4805 def ShiftDown(*args, **kwargs):
4806 """
4807 ShiftDown(self) -> bool
4808
4809 Returns ``True`` if the Shift key was down at the time of the event.
4810 """
4811 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
4812
4813 def CmdDown(*args, **kwargs):
4814 """
4815 CmdDown(self) -> bool
4816
4817 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4818 platforms but the special "Apple" (a.k.a as "Command") key on
4819 Macs. It makes often sense to use it instead of, say, `ControlDown`
4820 because Cmd key is used for the same thing under Mac as Ctrl
4821 elsewhere. The Ctrl still exists, it's just not used for this
4822 purpose. So for non-Mac platforms this is the same as `ControlDown`
4823 and Macs this is the same as `MetaDown`.
4824 """
4825 return _core_.KeyEvent_CmdDown(*args, **kwargs)
4826
4827 def HasModifiers(*args, **kwargs):
4828 """
4829 HasModifiers(self) -> bool
4830
4831 Returns true if either CTRL or ALT keys was down at the time of the
4832 key event. Note that this function does not take into account neither
4833 SHIFT nor META key states (the reason for ignoring the latter is that
4834 it is common for NUMLOCK key to be configured as META under X but the
4835 key presses even while NUMLOCK is on should be still processed
4836 normally).
4837 """
4838 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
4839
4840 def GetKeyCode(*args, **kwargs):
4841 """
4842 GetKeyCode(self) -> int
4843
4844 Returns the virtual key code. ASCII events return normal ASCII values,
4845 while non-ASCII events return values such as WXK_LEFT for the left
4846 cursor key. See `wx.KeyEvent` for a full list of the virtual key
4847 codes.
4848
4849 Note that in Unicode build, the returned value is meaningful only if
4850 the user entered a character that can be represented in current
4851 locale's default charset. You can obtain the corresponding Unicode
4852 character using `GetUnicodeKey`.
4853 """
4854 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
4855
4856 KeyCode = GetKeyCode
4857 def GetUnicodeKey(*args, **kwargs):
4858 """
4859 GetUnicodeKey(self) -> int
4860
4861 Returns the Unicode character corresponding to this key event. This
4862 function is only meaningfule in a Unicode build of wxPython.
4863 """
4864 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
4865
4866 GetUniChar = GetUnicodeKey
4867 def GetRawKeyCode(*args, **kwargs):
4868 """
4869 GetRawKeyCode(self) -> unsigned int
4870
4871 Returns the raw key code for this event. This is a platform-dependent
4872 scan code which should only be used in advanced
4873 applications. Currently the raw key codes are not supported by all
4874 ports.
4875 """
4876 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
4877
4878 def GetRawKeyFlags(*args, **kwargs):
4879 """
4880 GetRawKeyFlags(self) -> unsigned int
4881
4882 Returns the low level key flags for this event. The flags are
4883 platform-dependent and should only be used in advanced applications.
4884 Currently the raw key flags are not supported by all ports.
4885 """
4886 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
4887
4888 def GetPosition(*args, **kwargs):
4889 """
4890 GetPosition(self) -> Point
4891
4892 Find the position of the event, if applicable.
4893 """
4894 return _core_.KeyEvent_GetPosition(*args, **kwargs)
4895
4896 def GetPositionTuple(*args, **kwargs):
4897 """
4898 GetPositionTuple() -> (x,y)
4899
4900 Find the position of the event, if applicable.
4901 """
4902 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
4903
4904 def GetX(*args, **kwargs):
4905 """
4906 GetX(self) -> int
4907
4908 Returns the X position (in client coordinates) of the event, if
4909 applicable.
4910 """
4911 return _core_.KeyEvent_GetX(*args, **kwargs)
4912
4913 def GetY(*args, **kwargs):
4914 """
4915 GetY(self) -> int
4916
4917 Returns the Y position (in client coordinates) of the event, if
4918 applicable.
4919 """
4920 return _core_.KeyEvent_GetY(*args, **kwargs)
4921
4922 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
4923 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
4924 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
4925 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
4926 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
4927 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
4928 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
4929 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
4930 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
4931 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
4932 KeyEvent_swigregister = _core_.KeyEvent_swigregister
4933 KeyEvent_swigregister(KeyEvent)
4934
4935 #---------------------------------------------------------------------------
4936
4937 class SizeEvent(Event):
4938 """
4939 A size event holds information about size change events. The EVT_SIZE
4940 handler function will be called when the window it is bound to has
4941 been resized.
4942
4943 Note that the size passed is of the whole window: call
4944 `wx.Window.GetClientSize` for the area which may be used by the
4945 application.
4946
4947 When a window is resized, usually only a small part of the window is
4948 damaged and and that area is all that is in the update region for the
4949 next paint event. However, if your drawing depends on the size of the
4950 window, you may need to clear the DC explicitly and repaint the whole
4951 window. In which case, you may need to call `wx.Window.Refresh` to
4952 invalidate the entire window.
4953
4954 """
4955 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4956 __repr__ = _swig_repr
4957 def __init__(self, *args, **kwargs):
4958 """
4959 __init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent
4960
4961 Construct a new ``wx.SizeEvent``.
4962 """
4963 _core_.SizeEvent_swiginit(self,_core_.new_SizeEvent(*args, **kwargs))
4964 def GetSize(*args, **kwargs):
4965 """
4966 GetSize(self) -> Size
4967
4968 Returns the entire size of the window generating the size change
4969 event.
4970 """
4971 return _core_.SizeEvent_GetSize(*args, **kwargs)
4972
4973 def GetRect(*args, **kwargs):
4974 """GetRect(self) -> Rect"""
4975 return _core_.SizeEvent_GetRect(*args, **kwargs)
4976
4977 def SetRect(*args, **kwargs):
4978 """SetRect(self, Rect rect)"""
4979 return _core_.SizeEvent_SetRect(*args, **kwargs)
4980
4981 def SetSize(*args, **kwargs):
4982 """SetSize(self, Size size)"""
4983 return _core_.SizeEvent_SetSize(*args, **kwargs)
4984
4985 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
4986 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
4987 SizeEvent_swigregister = _core_.SizeEvent_swigregister
4988 SizeEvent_swigregister(SizeEvent)
4989
4990 #---------------------------------------------------------------------------
4991
4992 class MoveEvent(Event):
4993 """
4994 This event object is sent for EVT_MOVE event bindings when a window is
4995 moved to a new position.
4996 """
4997 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4998 __repr__ = _swig_repr
4999 def __init__(self, *args, **kwargs):
5000 """
5001 __init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent
5002
5003 Constructor.
5004 """
5005 _core_.MoveEvent_swiginit(self,_core_.new_MoveEvent(*args, **kwargs))
5006 def GetPosition(*args, **kwargs):
5007 """
5008 GetPosition(self) -> Point
5009
5010 Returns the position of the window generating the move change event.
5011 """
5012 return _core_.MoveEvent_GetPosition(*args, **kwargs)
5013
5014 def GetRect(*args, **kwargs):
5015 """GetRect(self) -> Rect"""
5016 return _core_.MoveEvent_GetRect(*args, **kwargs)
5017
5018 def SetRect(*args, **kwargs):
5019 """SetRect(self, Rect rect)"""
5020 return _core_.MoveEvent_SetRect(*args, **kwargs)
5021
5022 def SetPosition(*args, **kwargs):
5023 """SetPosition(self, Point pos)"""
5024 return _core_.MoveEvent_SetPosition(*args, **kwargs)
5025
5026 m_pos = property(GetPosition, SetPosition)
5027 m_rect = property(GetRect, SetRect)
5028
5029 MoveEvent_swigregister = _core_.MoveEvent_swigregister
5030 MoveEvent_swigregister(MoveEvent)
5031
5032 #---------------------------------------------------------------------------
5033
5034 class PaintEvent(Event):
5035 """
5036 A paint event is sent when a window's contents needs to be repainted.
5037 Note that in an EVT_PAINT handler the application must *always* create
5038 a `wx.PaintDC` object, even if you do not use it. Otherwise MS
5039 Windows assumes that the window has not been painted yet and will send
5040 the event again, causing endless refreshes.
5041
5042 You can optimize painting by retrieving the rectangles that have been
5043 damaged using `wx.Window.GetUpdateRegion` and/or `wx.RegionIterator`,
5044 and only repainting these rectangles. The rectangles are in terms of
5045 the client area, and are unscrolled, so you will need to do some
5046 calculations using the current view position to obtain logical,
5047 scrolled units.
5048
5049 """
5050 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5051 __repr__ = _swig_repr
5052 def __init__(self, *args, **kwargs):
5053 """__init__(self, int Id=0) -> PaintEvent"""
5054 _core_.PaintEvent_swiginit(self,_core_.new_PaintEvent(*args, **kwargs))
5055 PaintEvent_swigregister = _core_.PaintEvent_swigregister
5056 PaintEvent_swigregister(PaintEvent)
5057
5058 class NcPaintEvent(Event):
5059 """Proxy of C++ NcPaintEvent class"""
5060 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5061 __repr__ = _swig_repr
5062 def __init__(self, *args, **kwargs):
5063 """__init__(self, int winid=0) -> NcPaintEvent"""
5064 _core_.NcPaintEvent_swiginit(self,_core_.new_NcPaintEvent(*args, **kwargs))
5065 NcPaintEvent_swigregister = _core_.NcPaintEvent_swigregister
5066 NcPaintEvent_swigregister(NcPaintEvent)
5067
5068 #---------------------------------------------------------------------------
5069
5070 class EraseEvent(Event):
5071 """
5072 An erase event is sent whenever the background of a window needs to be
5073 repainted. To intercept this event use the EVT_ERASE_BACKGROUND event
5074 binder. On some platforms, such as GTK+, this event is simulated
5075 (simply generated just before the paint event) and may cause flicker.
5076
5077 To paint a custom background use the `GetDC` method and use the returned
5078 device context if it is not ``None``, otherwise create a temporary
5079 `wx.ClientDC` and draw on that.
5080
5081 """
5082 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5083 __repr__ = _swig_repr
5084 def __init__(self, *args, **kwargs):
5085 """
5086 __init__(self, int Id=0, DC dc=None) -> EraseEvent
5087
5088 Constructor
5089 """
5090 _core_.EraseEvent_swiginit(self,_core_.new_EraseEvent(*args, **kwargs))
5091 def GetDC(*args, **kwargs):
5092 """
5093 GetDC(self) -> DC
5094
5095 Returns the device context the event handler should draw upon. If
5096 ``None`` is returned then create a temporary `wx.ClientDC` and use
5097 that instead.
5098 """
5099 return _core_.EraseEvent_GetDC(*args, **kwargs)
5100
5101 EraseEvent_swigregister = _core_.EraseEvent_swigregister
5102 EraseEvent_swigregister(EraseEvent)
5103
5104 #---------------------------------------------------------------------------
5105
5106 class FocusEvent(Event):
5107 """
5108 A focus event is sent when a window's focus changes. The window losing
5109 focus receives an EVT_KILL_FOCUS event while the window gaining it
5110 gets an EVT_SET_FOCUS event.
5111
5112 Notice that the set focus event happens both when the user gives focus
5113 to the window (whether using the mouse or keyboard) and when it is
5114 done from the program itself using `wx.Window.SetFocus`.
5115
5116 """
5117 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5118 __repr__ = _swig_repr
5119 def __init__(self, *args, **kwargs):
5120 """
5121 __init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent
5122
5123 Constructor
5124 """
5125 _core_.FocusEvent_swiginit(self,_core_.new_FocusEvent(*args, **kwargs))
5126 def GetWindow(*args, **kwargs):
5127 """
5128 GetWindow(self) -> Window
5129
5130 Returns the other window associated with this event, that is the
5131 window which had the focus before for the EVT_SET_FOCUS event and the
5132 window which is going to receive focus for the wxEVT_KILL_FOCUS event.
5133
5134 Warning: the window returned may be None!
5135 """
5136 return _core_.FocusEvent_GetWindow(*args, **kwargs)
5137
5138 def SetWindow(*args, **kwargs):
5139 """SetWindow(self, Window win)"""
5140 return _core_.FocusEvent_SetWindow(*args, **kwargs)
5141
5142 FocusEvent_swigregister = _core_.FocusEvent_swigregister
5143 FocusEvent_swigregister(FocusEvent)
5144
5145 #---------------------------------------------------------------------------
5146
5147 class ChildFocusEvent(CommandEvent):
5148 """
5149 wx.ChildFocusEvent notifies the parent that a child has received the
5150 focus. Unlike `wx.FocusEvent` it is propagated up the window
5151 heirarchy.
5152 """
5153 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5154 __repr__ = _swig_repr
5155 def __init__(self, *args, **kwargs):
5156 """
5157 __init__(self, Window win=None) -> ChildFocusEvent
5158
5159 Constructor
5160 """
5161 _core_.ChildFocusEvent_swiginit(self,_core_.new_ChildFocusEvent(*args, **kwargs))
5162 def GetWindow(*args, **kwargs):
5163 """
5164 GetWindow(self) -> Window
5165
5166 The window which has just received the focus.
5167 """
5168 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
5169
5170 ChildFocusEvent_swigregister = _core_.ChildFocusEvent_swigregister
5171 ChildFocusEvent_swigregister(ChildFocusEvent)
5172
5173 #---------------------------------------------------------------------------
5174
5175 class ActivateEvent(Event):
5176 """
5177 An activate event is sent when a top-level window or the entire
5178 application is being activated or deactivated.
5179
5180 A top-level window (a dialog or frame) receives an activate event when
5181 is being activated or deactivated. This is indicated visually by the
5182 title bar changing colour, and a subwindow gaining the keyboard focus.
5183 An application is activated or deactivated when one of its frames
5184 becomes activated, or a frame becomes inactivate resulting in all
5185 application frames being inactive.
5186
5187 Please note that usually you should call event.Skip() in your handlers
5188 for these events so the default handlers will still be called, as not
5189 doing so can result in strange effects.
5190
5191 """
5192 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5193 __repr__ = _swig_repr
5194 def __init__(self, *args, **kwargs):
5195 """
5196 __init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent
5197
5198 Constructor
5199 """
5200 _core_.ActivateEvent_swiginit(self,_core_.new_ActivateEvent(*args, **kwargs))
5201 def GetActive(*args, **kwargs):
5202 """
5203 GetActive(self) -> bool
5204
5205 Returns true if the application or window is being activated, false
5206 otherwise.
5207 """
5208 return _core_.ActivateEvent_GetActive(*args, **kwargs)
5209
5210 ActivateEvent_swigregister = _core_.ActivateEvent_swigregister
5211 ActivateEvent_swigregister(ActivateEvent)
5212
5213 #---------------------------------------------------------------------------
5214
5215 class InitDialogEvent(Event):
5216 """
5217 A wx.InitDialogEvent is sent as a dialog is being initialised, or for
5218 any window when `wx.Window.InitDialog` is called. Handlers for this
5219 event can transfer data to the window, or anything else that should be
5220 done before the user begins editing the form. The default handler
5221 calls `wx.Window.TransferDataToWindow`.
5222 """
5223 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5224 __repr__ = _swig_repr
5225 def __init__(self, *args, **kwargs):
5226 """
5227 __init__(self, int Id=0) -> InitDialogEvent
5228
5229 Constructor
5230 """
5231 _core_.InitDialogEvent_swiginit(self,_core_.new_InitDialogEvent(*args, **kwargs))
5232 InitDialogEvent_swigregister = _core_.InitDialogEvent_swigregister
5233 InitDialogEvent_swigregister(InitDialogEvent)
5234
5235 #---------------------------------------------------------------------------
5236
5237 class MenuEvent(Event):
5238 """
5239 This class is used for a variety of menu-related events. Note that
5240 these do not include menu command events, which are handled by sending
5241 `wx.CommandEvent` objects.
5242
5243 The default handler for wx.EVT_MENU_HIGHLIGHT displays menu item help
5244 text in the first field of the status bar.
5245 """
5246 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5247 __repr__ = _swig_repr
5248 def __init__(self, *args, **kwargs):
5249 """
5250 __init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent
5251
5252 Constructor
5253 """
5254 _core_.MenuEvent_swiginit(self,_core_.new_MenuEvent(*args, **kwargs))
5255 def GetMenuId(*args, **kwargs):
5256 """
5257 GetMenuId(self) -> int
5258
5259 Returns the menu identifier associated with the event. This method
5260 should be only used with the HIGHLIGHT events.
5261 """
5262 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
5263
5264 def IsPopup(*args, **kwargs):
5265 """
5266 IsPopup(self) -> bool
5267
5268 Returns ``True`` if the menu which is being opened or closed is a
5269 popup menu, ``False`` if it is a normal one. This method should only
5270 be used with the OPEN and CLOSE events.
5271 """
5272 return _core_.MenuEvent_IsPopup(*args, **kwargs)
5273
5274 def GetMenu(*args, **kwargs):
5275 """
5276 GetMenu(self) -> Menu
5277
5278 Returns the menu which is being opened or closed. This method should
5279 only be used with the OPEN and CLOSE events.
5280 """
5281 return _core_.MenuEvent_GetMenu(*args, **kwargs)
5282
5283 MenuEvent_swigregister = _core_.MenuEvent_swigregister
5284 MenuEvent_swigregister(MenuEvent)
5285
5286 #---------------------------------------------------------------------------
5287
5288 class CloseEvent(Event):
5289 """
5290 This event class contains information about window and session close
5291 events.
5292
5293 The handler function for EVT_CLOSE is called when the user has tried
5294 to close a a frame or dialog box using the window manager controls or
5295 the system menu. It can also be invoked by the application itself
5296 programmatically, for example by calling the `wx.Window.Close`
5297 function.
5298
5299 You should check whether the application is forcing the deletion of
5300 the window using `CanVeto`. If it returns ``False``, you must destroy
5301 the window using `wx.Window.Destroy`. If the return value is ``True``,
5302 it is up to you whether you respond by destroying the window or not.
5303 For example you may wish to display a message dialog prompting to save
5304 files or to cancel the close.
5305
5306 If you don't destroy the window, you should call `Veto` to let the
5307 calling code know that you did not destroy the window. This allows the
5308 `wx.Window.Close` function to return ``True`` or ``False`` depending
5309 on whether the close instruction was honored or not.
5310 """
5311 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5312 __repr__ = _swig_repr
5313 def __init__(self, *args, **kwargs):
5314 """
5315 __init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent
5316
5317 Constructor.
5318 """
5319 _core_.CloseEvent_swiginit(self,_core_.new_CloseEvent(*args, **kwargs))
5320 def SetLoggingOff(*args, **kwargs):
5321 """
5322 SetLoggingOff(self, bool logOff)
5323
5324 Sets the 'logging off' flag.
5325 """
5326 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
5327
5328 def GetLoggingOff(*args, **kwargs):
5329 """
5330 GetLoggingOff(self) -> bool
5331
5332 Returns ``True`` if the user is logging off or ``False`` if the
5333 system is shutting down. This method can only be called for end
5334 session and query end session events, it doesn't make sense for close
5335 window event.
5336 """
5337 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
5338
5339 def Veto(*args, **kwargs):
5340 """
5341 Veto(self, bool veto=True)
5342
5343 Call this from your event handler to veto a system shutdown or to
5344 signal to the calling application that a window close did not happen.
5345
5346 You can only veto a shutdown or close if `CanVeto` returns true.
5347 """
5348 return _core_.CloseEvent_Veto(*args, **kwargs)
5349
5350 def GetVeto(*args, **kwargs):
5351 """GetVeto(self) -> bool"""
5352 return _core_.CloseEvent_GetVeto(*args, **kwargs)
5353
5354 def SetCanVeto(*args, **kwargs):
5355 """
5356 SetCanVeto(self, bool canVeto)
5357
5358 Sets the 'can veto' flag.
5359 """
5360 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
5361
5362 def CanVeto(*args, **kwargs):
5363 """
5364 CanVeto(self) -> bool
5365
5366 Returns true if you can veto a system shutdown or a window close
5367 event. Vetoing a window close event is not possible if the calling
5368 code wishes to force the application to exit, and so this function
5369 must be called to check this.
5370 """
5371 return _core_.CloseEvent_CanVeto(*args, **kwargs)
5372
5373 CloseEvent_swigregister = _core_.CloseEvent_swigregister
5374 CloseEvent_swigregister(CloseEvent)
5375
5376 #---------------------------------------------------------------------------
5377
5378 class ShowEvent(Event):
5379 """An EVT_SHOW event is sent when a window is shown or hidden."""
5380 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5381 __repr__ = _swig_repr
5382 def __init__(self, *args, **kwargs):
5383 """
5384 __init__(self, int winid=0, bool show=False) -> ShowEvent
5385
5386 An EVT_SHOW event is sent when a window is shown or hidden.
5387 """
5388 _core_.ShowEvent_swiginit(self,_core_.new_ShowEvent(*args, **kwargs))
5389 def SetShow(*args, **kwargs):
5390 """SetShow(self, bool show)"""
5391 return _core_.ShowEvent_SetShow(*args, **kwargs)
5392
5393 def GetShow(*args, **kwargs):
5394 """GetShow(self) -> bool"""
5395 return _core_.ShowEvent_GetShow(*args, **kwargs)
5396
5397 ShowEvent_swigregister = _core_.ShowEvent_swigregister
5398 ShowEvent_swigregister(ShowEvent)
5399
5400 #---------------------------------------------------------------------------
5401
5402 class IconizeEvent(Event):
5403 """
5404 An EVT_ICONIZE event is sent when a frame is iconized (minimized) or
5405 restored.
5406 """
5407 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5408 __repr__ = _swig_repr
5409 def __init__(self, *args, **kwargs):
5410 """
5411 __init__(self, int id=0, bool iconized=True) -> IconizeEvent
5412
5413 An EVT_ICONIZE event is sent when a frame is iconized (minimized) or
5414 restored.
5415 """
5416 _core_.IconizeEvent_swiginit(self,_core_.new_IconizeEvent(*args, **kwargs))
5417 def Iconized(*args, **kwargs):
5418 """
5419 Iconized(self) -> bool
5420
5421 Returns ``True`` if the frame has been iconized, ``False`` if it has
5422 been restored.
5423 """
5424 return _core_.IconizeEvent_Iconized(*args, **kwargs)
5425
5426 IconizeEvent_swigregister = _core_.IconizeEvent_swigregister
5427 IconizeEvent_swigregister(IconizeEvent)
5428
5429 #---------------------------------------------------------------------------
5430
5431 class MaximizeEvent(Event):
5432 """An EVT_MAXIMIZE event is sent when a frame is maximized or restored."""
5433 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5434 __repr__ = _swig_repr
5435 def __init__(self, *args, **kwargs):
5436 """
5437 __init__(self, int id=0) -> MaximizeEvent
5438
5439 An EVT_MAXIMIZE event is sent when a frame is maximized or restored.
5440 """
5441 _core_.MaximizeEvent_swiginit(self,_core_.new_MaximizeEvent(*args, **kwargs))
5442 MaximizeEvent_swigregister = _core_.MaximizeEvent_swigregister
5443 MaximizeEvent_swigregister(MaximizeEvent)
5444
5445 #---------------------------------------------------------------------------
5446
5447 class DropFilesEvent(Event):
5448 """
5449 This class is used for drop files events, that is, when files have
5450 been dropped onto the window. This functionality is only available
5451 under Windows. The window must have previously been enabled for
5452 dropping by calling `wx.Window.DragAcceptFiles`.
5453
5454 Important note: this is a separate implementation to the more general
5455 drag and drop implementation using `wx.FileDropTarget`, and etc. This
5456 implementation uses the older, Windows message-based approach of
5457 dropping files.
5458
5459 Use wx.EVT_DROP_FILES to bind an event handler to receive file drop
5460 events.
5461
5462 """
5463 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5464 def __init__(self): raise AttributeError, "No constructor defined"
5465 __repr__ = _swig_repr
5466 def GetPosition(*args, **kwargs):
5467 """
5468 GetPosition(self) -> Point
5469
5470 Returns the position at which the files were dropped.
5471 """
5472 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
5473
5474 def GetNumberOfFiles(*args, **kwargs):
5475 """
5476 GetNumberOfFiles(self) -> int
5477
5478 Returns the number of files dropped.
5479 """
5480 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
5481
5482 def GetFiles(*args, **kwargs):
5483 """
5484 GetFiles(self) -> PyObject
5485
5486 Returns a list of the filenames that were dropped.
5487 """
5488 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
5489
5490 DropFilesEvent_swigregister = _core_.DropFilesEvent_swigregister
5491 DropFilesEvent_swigregister(DropFilesEvent)
5492
5493 #---------------------------------------------------------------------------
5494
5495 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
5496 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
5497 class UpdateUIEvent(CommandEvent):
5498 """
5499 This class is used for EVT_UPDATE_UI pseudo-events which are sent by
5500 wxWidgets to give an application the chance to update various user
5501 interface elements.
5502
5503 Without update UI events, an application has to work hard to
5504 check/uncheck, enable/disable, and set the text for elements such as
5505 menu items and toolbar buttons. The code for doing this has to be
5506 mixed up with the code that is invoked when an action is invoked for a
5507 menu item or button.
5508
5509 With update UI events, you define an event handler to look at the
5510 state of the application and change UI elements accordingly. wxWidgets
5511 will call your handler functions in idle time, so you don't have to
5512 worry where to call this code. In addition to being a clearer and more
5513 declarative method, it also means you don't have to worry whether
5514 you're updating a toolbar or menubar identifier. The same handler can
5515 update a menu item and toolbar button, if the ID values are the same.
5516
5517 Instead of directly manipulating the menu or button, you call
5518 functions in the event object, such as `Check`. wxWidgets will
5519 determine whether such a call has been made, and which UI element to
5520 update.
5521
5522 These events will work for popup menus as well as menubars. Just
5523 before a menu is popped up, `wx.Menu.UpdateUI` is called to process
5524 any UI events for the window that owns the menu.
5525
5526 If you find that the overhead of UI update processing is affecting
5527 your application, you can do one or both of the following:
5528
5529 1. Call `wx.UpdateUIEvent.SetMode` with a value of
5530 wx.UPDATE_UI_PROCESS_SPECIFIED, and set the extra style
5531 wx.WS_EX_PROCESS_UPDATE_EVENTS for every window that should
5532 receive update events. No other windows will receive update
5533 events.
5534
5535 2. Call `wx.UpdateUIEvent.SetUpdateInterval` with a millisecond
5536 value to set the delay between updates. You may need to call
5537 `wx.Window.UpdateWindowUI` at critical points, for example when
5538 a dialog is about to be shown, in case the user sees a slight
5539 delay before windows are updated.
5540
5541 Note that although events are sent in idle time, defining a EVT_IDLE
5542 handler for a window does not affect this because the events are sent
5543 from an internal idle handler.
5544
5545 wxWidgets tries to optimize update events on some platforms. On
5546 Windows and GTK+, events for menubar items are only sent when the menu
5547 is about to be shown, and not in idle time.
5548
5549 """
5550 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5551 __repr__ = _swig_repr
5552 def __init__(self, *args, **kwargs):
5553 """
5554 __init__(self, int commandId=0) -> UpdateUIEvent
5555
5556 Constructor
5557 """
5558 _core_.UpdateUIEvent_swiginit(self,_core_.new_UpdateUIEvent(*args, **kwargs))
5559 def GetChecked(*args, **kwargs):
5560 """
5561 GetChecked(self) -> bool
5562
5563 Returns ``True`` if the UI element should be checked.
5564 """
5565 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
5566
5567 def GetEnabled(*args, **kwargs):
5568 """
5569 GetEnabled(self) -> bool
5570
5571 Returns ``True`` if the UI element should be enabled.
5572 """
5573 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
5574
5575 def GetShown(*args, **kwargs):
5576 """
5577 GetShown(self) -> bool
5578
5579 Returns ``True`` if the UI element should be shown.
5580 """
5581 return _core_.UpdateUIEvent_GetShown(*args, **kwargs)
5582
5583 def GetText(*args, **kwargs):
5584 """
5585 GetText(self) -> String
5586
5587 Returns the text that should be set for the UI element.
5588 """
5589 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
5590
5591 def GetSetText(*args, **kwargs):
5592 """
5593 GetSetText(self) -> bool
5594
5595 Returns ``True`` if the application has called `SetText`. For
5596 wxWidgets internal use only.
5597 """
5598 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
5599
5600 def GetSetChecked(*args, **kwargs):
5601 """
5602 GetSetChecked(self) -> bool
5603
5604 Returns ``True`` if the application has called `Check`. For wxWidgets
5605 internal use only.
5606 """
5607 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
5608
5609 def GetSetEnabled(*args, **kwargs):
5610 """
5611 GetSetEnabled(self) -> bool
5612
5613 Returns ``True`` if the application has called `Enable`. For wxWidgets
5614 internal use only.
5615 """
5616 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
5617
5618 def GetSetShown(*args, **kwargs):
5619 """
5620 GetSetShown(self) -> bool
5621
5622 Returns ``True`` if the application has called `Show`. For wxWidgets
5623 internal use only.
5624 """
5625 return _core_.UpdateUIEvent_GetSetShown(*args, **kwargs)
5626
5627 def Check(*args, **kwargs):
5628 """
5629 Check(self, bool check)
5630
5631 Check or uncheck the UI element.
5632 """
5633 return _core_.UpdateUIEvent_Check(*args, **kwargs)
5634
5635 def Enable(*args, **kwargs):
5636 """
5637 Enable(self, bool enable)
5638
5639 Enable or disable the UI element.
5640 """
5641 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
5642
5643 def Show(*args, **kwargs):
5644 """
5645 Show(self, bool show)
5646
5647 Show or hide the UI element.
5648 """
5649 return _core_.UpdateUIEvent_Show(*args, **kwargs)
5650
5651 def SetText(*args, **kwargs):
5652 """
5653 SetText(self, String text)
5654
5655 Sets the text for this UI element.
5656 """
5657 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
5658
5659 def SetUpdateInterval(*args, **kwargs):
5660 """
5661 SetUpdateInterval(long updateInterval)
5662
5663 Sets the interval between updates in milliseconds. Set to -1 to
5664 disable updates, or to 0 to update as frequently as possible. The
5665 default is 0.
5666
5667 Use this to reduce the overhead of UI update events if your
5668 application has a lot of windows. If you set the value to -1 or
5669 greater than 0, you may also need to call `wx.Window.UpdateWindowUI`
5670 at appropriate points in your application, such as when a dialog is
5671 about to be shown.
5672 """
5673 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
5674
5675 SetUpdateInterval = staticmethod(SetUpdateInterval)
5676 def GetUpdateInterval(*args, **kwargs):
5677 """
5678 GetUpdateInterval() -> long
5679
5680 Returns the current interval between updates in milliseconds. -1
5681 disables updates, 0 updates as frequently as possible.
5682 """
5683 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
5684
5685 GetUpdateInterval = staticmethod(GetUpdateInterval)
5686 def CanUpdate(*args, **kwargs):
5687 """
5688 CanUpdate(Window win) -> bool
5689
5690 Returns ``True`` if it is appropriate to update (send UI update events
5691 to) this window.
5692
5693 This function looks at the mode used (see `wx.UpdateUIEvent.SetMode`),
5694 the wx.WS_EX_PROCESS_UPDATE_EVENTS flag in window, the time update
5695 events were last sent in idle time, and the update interval, to
5696 determine whether events should be sent to this window now. By default
5697 this will always return true because the update mode is initially
5698 wx.UPDATE_UI_PROCESS_ALL and the interval is set to 0; so update
5699 events will be sent as often as possible. You can reduce the frequency
5700 that events are sent by changing the mode and/or setting an update
5701 interval.
5702
5703 """
5704 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
5705
5706 CanUpdate = staticmethod(CanUpdate)
5707 def ResetUpdateTime(*args, **kwargs):
5708 """
5709 ResetUpdateTime()
5710
5711 Used internally to reset the last-updated time to the current time. It
5712 is assumed that update events are normally sent in idle time, so this
5713 is called at the end of idle processing.
5714 """
5715 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
5716
5717 ResetUpdateTime = staticmethod(ResetUpdateTime)
5718 def SetMode(*args, **kwargs):
5719 """
5720 SetMode(int mode)
5721
5722 Specify how wxWidgets will send update events: to all windows, or only
5723 to those which specify that they will process the events.
5724
5725 The mode may be one of the following values:
5726
5727 ============================= ==========================================
5728 wxUPDATE_UI_PROCESS_ALL Send UI update events to all windows. This
5729 is the default setting.
5730 wxUPDATE_UI_PROCESS_SPECIFIED Send UI update events only to windows that
5731 have the wx.WS_EX_PROCESS_UI_UPDATES extra
5732 style set.
5733 ============================= ==========================================
5734
5735 """
5736 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
5737
5738 SetMode = staticmethod(SetMode)
5739 def GetMode(*args, **kwargs):
5740 """
5741 GetMode() -> int
5742
5743 Returns a value specifying how wxWidgets will send update events: to
5744 all windows, or only to those which specify that they will process the
5745 events.
5746 """
5747 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
5748
5749 GetMode = staticmethod(GetMode)
5750 UpdateUIEvent_swigregister = _core_.UpdateUIEvent_swigregister
5751 UpdateUIEvent_swigregister(UpdateUIEvent)
5752
5753 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
5754 """
5755 UpdateUIEvent_SetUpdateInterval(long updateInterval)
5756
5757 Sets the interval between updates in milliseconds. Set to -1 to
5758 disable updates, or to 0 to update as frequently as possible. The
5759 default is 0.
5760
5761 Use this to reduce the overhead of UI update events if your
5762 application has a lot of windows. If you set the value to -1 or
5763 greater than 0, you may also need to call `wx.Window.UpdateWindowUI`
5764 at appropriate points in your application, such as when a dialog is
5765 about to be shown.
5766 """
5767 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
5768
5769 def UpdateUIEvent_GetUpdateInterval(*args):
5770 """
5771 UpdateUIEvent_GetUpdateInterval() -> long
5772
5773 Returns the current interval between updates in milliseconds. -1
5774 disables updates, 0 updates as frequently as possible.
5775 """
5776 return _core_.UpdateUIEvent_GetUpdateInterval(*args)
5777
5778 def UpdateUIEvent_CanUpdate(*args, **kwargs):
5779 """
5780 UpdateUIEvent_CanUpdate(Window win) -> bool
5781
5782 Returns ``True`` if it is appropriate to update (send UI update events
5783 to) this window.
5784
5785 This function looks at the mode used (see `wx.UpdateUIEvent.SetMode`),
5786 the wx.WS_EX_PROCESS_UPDATE_EVENTS flag in window, the time update
5787 events were last sent in idle time, and the update interval, to
5788 determine whether events should be sent to this window now. By default
5789 this will always return true because the update mode is initially
5790 wx.UPDATE_UI_PROCESS_ALL and the interval is set to 0; so update
5791 events will be sent as often as possible. You can reduce the frequency
5792 that events are sent by changing the mode and/or setting an update
5793 interval.
5794
5795 """
5796 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
5797
5798 def UpdateUIEvent_ResetUpdateTime(*args):
5799 """
5800 UpdateUIEvent_ResetUpdateTime()
5801
5802 Used internally to reset the last-updated time to the current time. It
5803 is assumed that update events are normally sent in idle time, so this
5804 is called at the end of idle processing.
5805 """
5806 return _core_.UpdateUIEvent_ResetUpdateTime(*args)
5807
5808 def UpdateUIEvent_SetMode(*args, **kwargs):
5809 """
5810 UpdateUIEvent_SetMode(int mode)
5811
5812 Specify how wxWidgets will send update events: to all windows, or only
5813 to those which specify that they will process the events.
5814
5815 The mode may be one of the following values:
5816
5817 ============================= ==========================================
5818 wxUPDATE_UI_PROCESS_ALL Send UI update events to all windows. This
5819 is the default setting.
5820 wxUPDATE_UI_PROCESS_SPECIFIED Send UI update events only to windows that
5821 have the wx.WS_EX_PROCESS_UI_UPDATES extra
5822 style set.
5823 ============================= ==========================================
5824
5825 """
5826 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
5827
5828 def UpdateUIEvent_GetMode(*args):
5829 """
5830 UpdateUIEvent_GetMode() -> int
5831
5832 Returns a value specifying how wxWidgets will send update events: to
5833 all windows, or only to those which specify that they will process the
5834 events.
5835 """
5836 return _core_.UpdateUIEvent_GetMode(*args)
5837
5838 #---------------------------------------------------------------------------
5839
5840 class SysColourChangedEvent(Event):
5841 """
5842 This class is used for EVT_SYS_COLOUR_CHANGED, which are generated
5843 when the user changes the colour settings using the control
5844 panel. This is only applicable under Windows.
5845
5846 The default event handler for this event propagates the event to child
5847 windows, since Windows only sends the events to top-level windows. If
5848 intercepting this event for a top-level window, remember to call
5849 `Skip` so the the base class handler will still be executed, or to
5850 pass the event on to the window's children explicitly.
5851
5852 """
5853 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5854 __repr__ = _swig_repr
5855 def __init__(self, *args, **kwargs):
5856 """
5857 __init__(self) -> SysColourChangedEvent
5858
5859 Constructor
5860 """
5861 _core_.SysColourChangedEvent_swiginit(self,_core_.new_SysColourChangedEvent(*args, **kwargs))
5862 SysColourChangedEvent_swigregister = _core_.SysColourChangedEvent_swigregister
5863 SysColourChangedEvent_swigregister(SysColourChangedEvent)
5864
5865 #---------------------------------------------------------------------------
5866
5867 class MouseCaptureChangedEvent(Event):
5868 """
5869 An mouse capture changed event (EVT_MOUSE_CAPTURE_CHANGED) is sent to
5870 a window that loses its mouse capture. This is called even if
5871 `wx.Window.ReleaseMouse` was called by the application code. Handling
5872 this event allows an application to cater for unexpected capture
5873 releases which might otherwise confuse mouse handling code.
5874
5875 This event is implemented under Windows only.
5876 """
5877 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5878 __repr__ = _swig_repr
5879 def __init__(self, *args, **kwargs):
5880 """
5881 __init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent
5882
5883 Constructor
5884 """
5885 _core_.MouseCaptureChangedEvent_swiginit(self,_core_.new_MouseCaptureChangedEvent(*args, **kwargs))
5886 def GetCapturedWindow(*args, **kwargs):
5887 """
5888 GetCapturedWindow(self) -> Window
5889
5890 Returns the window that gained the capture, or ``None`` if it was a
5891 non-wxWidgets window.
5892 """
5893 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
5894
5895 MouseCaptureChangedEvent_swigregister = _core_.MouseCaptureChangedEvent_swigregister
5896 MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEvent)
5897
5898 #---------------------------------------------------------------------------
5899
5900 class DisplayChangedEvent(Event):
5901 """
5902 An EVT_DISPLAY_CHANGED event is sent to all windows when the display
5903 resolution has changed.
5904
5905 This event is implemented under Windows only.
5906 """
5907 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5908 __repr__ = _swig_repr
5909 def __init__(self, *args, **kwargs):
5910 """__init__(self) -> DisplayChangedEvent"""
5911 _core_.DisplayChangedEvent_swiginit(self,_core_.new_DisplayChangedEvent(*args, **kwargs))
5912 DisplayChangedEvent_swigregister = _core_.DisplayChangedEvent_swigregister
5913 DisplayChangedEvent_swigregister(DisplayChangedEvent)
5914
5915 #---------------------------------------------------------------------------
5916
5917 class PaletteChangedEvent(Event):
5918 """
5919 An EVT_PALETTE_CHANGED event is sent when the system palette has
5920 changed, thereby giving each window a chance to redo their own to
5921 match.
5922
5923 This event is implemented under Windows only.
5924 """
5925 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5926 __repr__ = _swig_repr
5927 def __init__(self, *args, **kwargs):
5928 """
5929 __init__(self, int id=0) -> PaletteChangedEvent
5930
5931 An EVT_PALETTE_CHANGED event is sent when the system palette has
5932 changed, thereby giving each window a chance to redo their own to
5933 match.
5934
5935 This event is implemented under Windows only.
5936 """
5937 _core_.PaletteChangedEvent_swiginit(self,_core_.new_PaletteChangedEvent(*args, **kwargs))
5938 def SetChangedWindow(*args, **kwargs):
5939 """SetChangedWindow(self, Window win)"""
5940 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
5941
5942 def GetChangedWindow(*args, **kwargs):
5943 """GetChangedWindow(self) -> Window"""
5944 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
5945
5946 PaletteChangedEvent_swigregister = _core_.PaletteChangedEvent_swigregister
5947 PaletteChangedEvent_swigregister(PaletteChangedEvent)
5948
5949 #---------------------------------------------------------------------------
5950
5951 class QueryNewPaletteEvent(Event):
5952 """
5953 An EVT_QUERY_NEW_PALETE event indicates the window is getting keyboard
5954 focus and should re-do its palette.
5955
5956 This event is implemented under Windows only.
5957 """
5958 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5959 __repr__ = _swig_repr
5960 def __init__(self, *args, **kwargs):
5961 """
5962 __init__(self, int winid=0) -> QueryNewPaletteEvent
5963
5964 Constructor.
5965 """
5966 _core_.QueryNewPaletteEvent_swiginit(self,_core_.new_QueryNewPaletteEvent(*args, **kwargs))
5967 def SetPaletteRealized(*args, **kwargs):
5968 """
5969 SetPaletteRealized(self, bool realized)
5970
5971 App should set this if it changes the palette.
5972 """
5973 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
5974
5975 def GetPaletteRealized(*args, **kwargs):
5976 """GetPaletteRealized(self) -> bool"""
5977 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
5978
5979 QueryNewPaletteEvent_swigregister = _core_.QueryNewPaletteEvent_swigregister
5980 QueryNewPaletteEvent_swigregister(QueryNewPaletteEvent)
5981
5982 #---------------------------------------------------------------------------
5983
5984 class NavigationKeyEvent(Event):
5985 """
5986 EVT_NAVIGATION_KEY events are used to control moving the focus between
5987 widgets, otherwise known as tab-traversal. You woudl normally not
5988 catch navigation events in applications as there are already
5989 appropriate handlers in `wx.Dialog` and `wx.Panel`, but you may find
5990 it useful to send navigation events in certain situations to change
5991 the focus in certain ways, although it's probably easier to just call
5992 `wx.Window.Navigate`.
5993 """
5994 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5995 __repr__ = _swig_repr
5996 def __init__(self, *args, **kwargs):
5997 """__init__(self) -> NavigationKeyEvent"""
5998 _core_.NavigationKeyEvent_swiginit(self,_core_.new_NavigationKeyEvent(*args, **kwargs))
5999 def GetDirection(*args, **kwargs):
6000 """
6001 GetDirection(self) -> bool
6002
6003 Returns ``True`` if the direction is forward, ``False`` otherwise.
6004 """
6005 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
6006
6007 def SetDirection(*args, **kwargs):
6008 """
6009 SetDirection(self, bool forward)
6010
6011 Specify the direction that the navigation should take. Usually the
6012 difference between using Tab and Shift-Tab.
6013 """
6014 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
6015
6016 def IsWindowChange(*args, **kwargs):
6017 """
6018 IsWindowChange(self) -> bool
6019
6020 Returns ``True`` if window change is allowed.
6021 """
6022 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
6023
6024 def SetWindowChange(*args, **kwargs):
6025 """
6026 SetWindowChange(self, bool ischange)
6027
6028 Specify if the navigation should be able to change parent windows.
6029 For example, changing notebook pages, etc. This is usually implemented
6030 by using Control-Tab.
6031 """
6032 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
6033
6034 def IsFromTab(*args, **kwargs):
6035 """
6036 IsFromTab(self) -> bool
6037
6038 Returns ``True`` if the navigation event is originated from the Tab
6039 key.
6040 """
6041 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
6042
6043 def SetFromTab(*args, **kwargs):
6044 """
6045 SetFromTab(self, bool bIs)
6046
6047 Set to true under MSW if the event was generated using the tab key.
6048 This is required for proper navogation over radio buttons.
6049 """
6050 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
6051
6052 def SetFlags(*args, **kwargs):
6053 """
6054 SetFlags(self, long flags)
6055
6056 Set the navigation flags to a combination of the following:
6057
6058 * wx.NavigationKeyEvent.IsBackward
6059 * wx.NavigationKeyEvent.IsForward
6060 * wx.NavigationKeyEvent.WinChange
6061 * wx.NavigationKeyEvent.FromTab
6062
6063 """
6064 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
6065
6066 def GetCurrentFocus(*args, **kwargs):
6067 """
6068 GetCurrentFocus(self) -> Window
6069
6070 Returns the child window which currenty has the focus. May be
6071 ``None``.
6072 """
6073 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
6074
6075 def SetCurrentFocus(*args, **kwargs):
6076 """
6077 SetCurrentFocus(self, Window win)
6078
6079 Set the window that has the focus.
6080 """
6081 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
6082
6083 IsBackward = _core_.NavigationKeyEvent_IsBackward
6084 IsForward = _core_.NavigationKeyEvent_IsForward
6085 WinChange = _core_.NavigationKeyEvent_WinChange
6086 FromTab = _core_.NavigationKeyEvent_FromTab
6087 NavigationKeyEvent_swigregister = _core_.NavigationKeyEvent_swigregister
6088 NavigationKeyEvent_swigregister(NavigationKeyEvent)
6089
6090 #---------------------------------------------------------------------------
6091
6092 class WindowCreateEvent(CommandEvent):
6093 """
6094 The EVT_WINDOW_CREATE event is sent as soon as the window object (the
6095 underlying GUI object) exists.
6096 """
6097 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6098 __repr__ = _swig_repr
6099 def __init__(self, *args, **kwargs):
6100 """
6101 __init__(self, Window win=None) -> WindowCreateEvent
6102
6103 The EVT_WINDOW_CREATE event is sent as soon as the window object (the
6104 underlying GUI object) exists.
6105 """
6106 _core_.WindowCreateEvent_swiginit(self,_core_.new_WindowCreateEvent(*args, **kwargs))
6107 def GetWindow(*args, **kwargs):
6108 """
6109 GetWindow(self) -> Window
6110
6111 Returns the window that this event refers to.
6112 """
6113 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
6114
6115 WindowCreateEvent_swigregister = _core_.WindowCreateEvent_swigregister
6116 WindowCreateEvent_swigregister(WindowCreateEvent)
6117
6118 class WindowDestroyEvent(CommandEvent):
6119 """
6120 The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor
6121 when the GUI window is destroyed.
6122
6123 When a class derived from `wx.Window` is destroyed its destructor will
6124 have already run by the time this event is sent. Therefore this event
6125 will not usually be received at all by the window itself. Since it is
6126 received after the destructor has run, an object should not try to
6127 handle its own wx.WindowDestroyEvent, but it can be used to get
6128 notification of the destruction of another window.
6129 """
6130 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6131 __repr__ = _swig_repr
6132 def __init__(self, *args, **kwargs):
6133 """
6134 __init__(self, Window win=None) -> WindowDestroyEvent
6135
6136 The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor
6137 when the GUI window is destroyed.
6138
6139 When a class derived from `wx.Window` is destroyed its destructor will
6140 have already run by the time this event is sent. Therefore this event
6141 will not usually be received at all by the window itself. Since it is
6142 received after the destructor has run, an object should not try to
6143 handle its own wx.WindowDestroyEvent, but it can be used to get
6144 notification of the destruction of another window.
6145 """
6146 _core_.WindowDestroyEvent_swiginit(self,_core_.new_WindowDestroyEvent(*args, **kwargs))
6147 def GetWindow(*args, **kwargs):
6148 """
6149 GetWindow(self) -> Window
6150
6151 Returns the window that this event refers to.
6152 """
6153 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
6154
6155 WindowDestroyEvent_swigregister = _core_.WindowDestroyEvent_swigregister
6156 WindowDestroyEvent_swigregister(WindowDestroyEvent)
6157
6158 #---------------------------------------------------------------------------
6159
6160 class ContextMenuEvent(CommandEvent):
6161 """
6162 This class is used for context menu events (EVT_CONTECT_MENU,) sent to
6163 give the application a chance to show a context (popup) menu.
6164 """
6165 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6166 __repr__ = _swig_repr
6167 def __init__(self, *args, **kwargs):
6168 """
6169 __init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent
6170
6171 Constructor.
6172 """
6173 _core_.ContextMenuEvent_swiginit(self,_core_.new_ContextMenuEvent(*args, **kwargs))
6174 def GetPosition(*args, **kwargs):
6175 """
6176 GetPosition(self) -> Point
6177
6178 Returns the position (in screen coordinants) at which the menu should
6179 be shown.
6180 """
6181 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
6182
6183 def SetPosition(*args, **kwargs):
6184 """
6185 SetPosition(self, Point pos)
6186
6187 Sets the position at which the menu should be shown.
6188 """
6189 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
6190
6191 ContextMenuEvent_swigregister = _core_.ContextMenuEvent_swigregister
6192 ContextMenuEvent_swigregister(ContextMenuEvent)
6193
6194 #---------------------------------------------------------------------------
6195
6196 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
6197 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
6198 class IdleEvent(Event):
6199 """
6200 This class is used for EVT_IDLE events, which are generated and sent
6201 when the application *becomes* idle. In other words, the when the
6202 event queue becomes empty then idle events are sent to all windows (by
6203 default) and as long as none of them call `RequestMore` then there are
6204 no more idle events until after the system event queue has some normal
6205 events and then becomes empty again.
6206
6207 By default, idle events are sent to all windows. If this is causing a
6208 significant overhead in your application, you can call
6209 `wx.IdleEvent.SetMode` with the value wx.IDLE_PROCESS_SPECIFIED, and
6210 set the wx.WS_EX_PROCESS_IDLE extra window style for every window
6211 which should receive idle events. Then idle events will only be sent
6212 to those windows and not to any others.
6213 """
6214 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6215 __repr__ = _swig_repr
6216 def __init__(self, *args, **kwargs):
6217 """
6218 __init__(self) -> IdleEvent
6219
6220 Constructor
6221 """
6222 _core_.IdleEvent_swiginit(self,_core_.new_IdleEvent(*args, **kwargs))
6223 def RequestMore(*args, **kwargs):
6224 """
6225 RequestMore(self, bool needMore=True)
6226
6227 Tells wxWidgets that more processing is required. This function can be
6228 called by an EVT_IDLE handler for a window to indicate that the
6229 application should forward the EVT_IDLE event once more to the
6230 application windows. If no window calls this function during its
6231 EVT_IDLE handler, then the application will remain in a passive event
6232 loop until a new event is posted to the application by the windowing
6233 system.
6234 """
6235 return _core_.IdleEvent_RequestMore(*args, **kwargs)
6236
6237 def MoreRequested(*args, **kwargs):
6238 """
6239 MoreRequested(self) -> bool
6240
6241 Returns ``True`` if the OnIdle function processing this event
6242 requested more processing time.
6243 """
6244 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
6245
6246 def SetMode(*args, **kwargs):
6247 """
6248 SetMode(int mode)
6249
6250 Static method for specifying how wxWidgets will send idle events: to
6251 all windows, or only to those which specify that they will process the
6252 events.
6253
6254 The mode can be one of the following values:
6255
6256 ========================= ========================================
6257 wx.IDLE_PROCESS_ALL Send idle events to all windows
6258 wx.IDLE_PROCESS_SPECIFIED Send idle events only to windows that have
6259 the wx.WS_EX_PROCESS_IDLE extra style
6260 flag set.
6261 ========================= ========================================
6262
6263 """
6264 return _core_.IdleEvent_SetMode(*args, **kwargs)
6265
6266 SetMode = staticmethod(SetMode)
6267 def GetMode(*args, **kwargs):
6268 """
6269 GetMode() -> int
6270
6271 Static method returning a value specifying how wxWidgets will send
6272 idle events: to all windows, or only to those which specify that they
6273 will process the events.
6274 """
6275 return _core_.IdleEvent_GetMode(*args, **kwargs)
6276
6277 GetMode = staticmethod(GetMode)
6278 def CanSend(*args, **kwargs):
6279 """
6280 CanSend(Window win) -> bool
6281
6282 Returns ``True`` if it is appropriate to send idle events to this
6283 window.
6284
6285 This function looks at the mode used (see `wx.IdleEvent.SetMode`), and
6286 the wx.WS_EX_PROCESS_IDLE style in window to determine whether idle
6287 events should be sent to this window now. By default this will always
6288 return ``True`` because the update mode is initially
6289 wx.IDLE_PROCESS_ALL. You can change the mode to only send idle events
6290 to windows with the wx.WS_EX_PROCESS_IDLE extra window style set.
6291 """
6292 return _core_.IdleEvent_CanSend(*args, **kwargs)
6293
6294 CanSend = staticmethod(CanSend)
6295 IdleEvent_swigregister = _core_.IdleEvent_swigregister
6296 IdleEvent_swigregister(IdleEvent)
6297
6298 def IdleEvent_SetMode(*args, **kwargs):
6299 """
6300 IdleEvent_SetMode(int mode)
6301
6302 Static method for specifying how wxWidgets will send idle events: to
6303 all windows, or only to those which specify that they will process the
6304 events.
6305
6306 The mode can be one of the following values:
6307
6308 ========================= ========================================
6309 wx.IDLE_PROCESS_ALL Send idle events to all windows
6310 wx.IDLE_PROCESS_SPECIFIED Send idle events only to windows that have
6311 the wx.WS_EX_PROCESS_IDLE extra style
6312 flag set.
6313 ========================= ========================================
6314
6315 """
6316 return _core_.IdleEvent_SetMode(*args, **kwargs)
6317
6318 def IdleEvent_GetMode(*args):
6319 """
6320 IdleEvent_GetMode() -> int
6321
6322 Static method returning a value specifying how wxWidgets will send
6323 idle events: to all windows, or only to those which specify that they
6324 will process the events.
6325 """
6326 return _core_.IdleEvent_GetMode(*args)
6327
6328 def IdleEvent_CanSend(*args, **kwargs):
6329 """
6330 IdleEvent_CanSend(Window win) -> bool
6331
6332 Returns ``True`` if it is appropriate to send idle events to this
6333 window.
6334
6335 This function looks at the mode used (see `wx.IdleEvent.SetMode`), and
6336 the wx.WS_EX_PROCESS_IDLE style in window to determine whether idle
6337 events should be sent to this window now. By default this will always
6338 return ``True`` because the update mode is initially
6339 wx.IDLE_PROCESS_ALL. You can change the mode to only send idle events
6340 to windows with the wx.WS_EX_PROCESS_IDLE extra window style set.
6341 """
6342 return _core_.IdleEvent_CanSend(*args, **kwargs)
6343
6344 #---------------------------------------------------------------------------
6345
6346 class PyEvent(Event):
6347 """
6348 wx.PyEvent can be used as a base class for implementing custom event
6349 types in Python. You should derived from this class instead of
6350 `wx.Event` because this class is Python-aware and is able to transport
6351 its Python bits safely through the wxWidgets event system and have
6352 them still be there when the event handler is invoked.
6353
6354 :see: `wx.PyCommandEvent`
6355
6356 """
6357 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6358 __repr__ = _swig_repr
6359 def __init__(self, *args, **kwargs):
6360 """__init__(self, int winid=0, wxEventType eventType=wxEVT_NULL) -> PyEvent"""
6361 _core_.PyEvent_swiginit(self,_core_.new_PyEvent(*args, **kwargs))
6362 self._SetSelf(self)
6363
6364 __swig_destroy__ = _core_.delete_PyEvent
6365 __del__ = lambda self : None;
6366 def _SetSelf(*args, **kwargs):
6367 """_SetSelf(self, PyObject self)"""
6368 return _core_.PyEvent__SetSelf(*args, **kwargs)
6369
6370 def _GetSelf(*args, **kwargs):
6371 """_GetSelf(self) -> PyObject"""
6372 return _core_.PyEvent__GetSelf(*args, **kwargs)
6373
6374 PyEvent_swigregister = _core_.PyEvent_swigregister
6375 PyEvent_swigregister(PyEvent)
6376
6377 class PyCommandEvent(CommandEvent):
6378 """
6379 wx.PyCommandEvent can be used as a base class for implementing custom
6380 event types in Python, where the event shoudl travel up to parent
6381 windows looking for a handler. You should derived from this class
6382 instead of `wx.CommandEvent` because this class is Python-aware and is
6383 able to transport its Python bits safely through the wxWidgets event
6384 system and have them still be there when the event handler is invoked.
6385
6386 :see: `wx.PyEvent`
6387
6388 """
6389 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6390 __repr__ = _swig_repr
6391 def __init__(self, *args, **kwargs):
6392 """__init__(self, wxEventType eventType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
6393 _core_.PyCommandEvent_swiginit(self,_core_.new_PyCommandEvent(*args, **kwargs))
6394 self._SetSelf(self)
6395
6396 __swig_destroy__ = _core_.delete_PyCommandEvent
6397 __del__ = lambda self : None;
6398 def _SetSelf(*args, **kwargs):
6399 """_SetSelf(self, PyObject self)"""
6400 return _core_.PyCommandEvent__SetSelf(*args, **kwargs)
6401
6402 def _GetSelf(*args, **kwargs):
6403 """_GetSelf(self) -> PyObject"""
6404 return _core_.PyCommandEvent__GetSelf(*args, **kwargs)
6405
6406 PyCommandEvent_swigregister = _core_.PyCommandEvent_swigregister
6407 PyCommandEvent_swigregister(PyCommandEvent)
6408
6409 class DateEvent(CommandEvent):
6410 """
6411 This event class holds information about a date change event and is
6412 used together with `wx.DatePickerCtrl`. It also serves as a base class
6413 for `wx.calendar.CalendarEvent`. Bind these event types with
6414 EVT_DATE_CHANGED.
6415 """
6416 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6417 __repr__ = _swig_repr
6418 def __init__(self, *args, **kwargs):
6419 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
6420 _core_.DateEvent_swiginit(self,_core_.new_DateEvent(*args, **kwargs))
6421 def GetDate(*args, **kwargs):
6422 """
6423 GetDate(self) -> DateTime
6424
6425 Returns the date.
6426 """
6427 return _core_.DateEvent_GetDate(*args, **kwargs)
6428
6429 def SetDate(*args, **kwargs):
6430 """
6431 SetDate(self, DateTime date)
6432
6433 Sets the date carried by the event, normally only used by the library
6434 internally.
6435 """
6436 return _core_.DateEvent_SetDate(*args, **kwargs)
6437
6438 DateEvent_swigregister = _core_.DateEvent_swigregister
6439 DateEvent_swigregister(DateEvent)
6440
6441 wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
6442 EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
6443
6444 #---------------------------------------------------------------------------
6445
6446 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
6447 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
6448 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
6449 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
6450 PRINT_WINDOWS = _core_.PRINT_WINDOWS
6451 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
6452 class PyApp(EvtHandler):
6453 """
6454 The ``wx.PyApp`` class is an *implementation detail*, please use the
6455 `wx.App` class (or some other derived class) instead.
6456 """
6457 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6458 __repr__ = _swig_repr
6459 def __init__(self, *args, **kwargs):
6460 """
6461 __init__(self) -> PyApp
6462
6463 Create a new application object, starting the bootstrap process.
6464 """
6465 _core_.PyApp_swiginit(self,_core_.new_PyApp(*args, **kwargs))
6466 self._setCallbackInfo(self, PyApp, False)
6467 self._setOORInfo(self, False)
6468
6469 __swig_destroy__ = _core_.delete_PyApp
6470 __del__ = lambda self : None;
6471 def _setCallbackInfo(*args, **kwargs):
6472 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
6473 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
6474
6475 def GetAppName(*args, **kwargs):
6476 """
6477 GetAppName(self) -> String
6478
6479 Get the application name.
6480 """
6481 return _core_.PyApp_GetAppName(*args, **kwargs)
6482
6483 def SetAppName(*args, **kwargs):
6484 """
6485 SetAppName(self, String name)
6486
6487 Set the application name. This value may be used automatically by
6488 `wx.Config` and such.
6489 """
6490 return _core_.PyApp_SetAppName(*args, **kwargs)
6491
6492 def GetClassName(*args, **kwargs):
6493 """
6494 GetClassName(self) -> String
6495
6496 Get the application's class name.
6497 """
6498 return _core_.PyApp_GetClassName(*args, **kwargs)
6499
6500 def SetClassName(*args, **kwargs):
6501 """
6502 SetClassName(self, String name)
6503
6504 Set the application's class name. This value may be used for
6505 X-resources if applicable for the platform
6506 """
6507 return _core_.PyApp_SetClassName(*args, **kwargs)
6508
6509 def GetVendorName(*args, **kwargs):
6510 """
6511 GetVendorName(self) -> String
6512
6513 Get the application's vendor name.
6514 """
6515 return _core_.PyApp_GetVendorName(*args, **kwargs)
6516
6517 def SetVendorName(*args, **kwargs):
6518 """
6519 SetVendorName(self, String name)
6520
6521 Set the application's vendor name. This value may be used
6522 automatically by `wx.Config` and such.
6523 """
6524 return _core_.PyApp_SetVendorName(*args, **kwargs)
6525
6526 def GetTraits(*args, **kwargs):
6527 """
6528 GetTraits(self) -> wxAppTraits
6529
6530 Return (and create if necessary) the app traits object to which we
6531 delegate for everything which either should be configurable by the
6532 user (then he can change the default behaviour simply by overriding
6533 CreateTraits() and returning his own traits object) or which is
6534 GUI/console dependent as then wx.AppTraits allows us to abstract the
6535 differences behind the common facade.
6536
6537 :todo: Add support for overriding CreateAppTraits in wxPython.
6538 """
6539 return _core_.PyApp_GetTraits(*args, **kwargs)
6540
6541 def ProcessPendingEvents(*args, **kwargs):
6542 """
6543 ProcessPendingEvents(self)
6544
6545 Process all events in the Pending Events list -- it is necessary to
6546 call this function to process posted events. This normally happens
6547 during each event loop iteration.
6548 """
6549 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
6550
6551 def Yield(*args, **kwargs):
6552 """
6553 Yield(self, bool onlyIfNeeded=False) -> bool
6554
6555 Process all currently pending events right now, instead of waiting
6556 until return to the event loop. It is an error to call ``Yield``
6557 recursively unless the value of ``onlyIfNeeded`` is True.
6558
6559 :warning: This function is dangerous as it can lead to unexpected
6560 reentrancies (i.e. when called from an event handler it may
6561 result in calling the same event handler again), use with
6562 extreme care or, better, don't use at all!
6563
6564 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
6565
6566 """
6567 return _core_.PyApp_Yield(*args, **kwargs)
6568
6569 def WakeUpIdle(*args, **kwargs):
6570 """
6571 WakeUpIdle(self)
6572
6573 Make sure that idle events are sent again.
6574 :see: `wx.WakeUpIdle`
6575 """
6576 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
6577
6578 def IsMainLoopRunning(*args, **kwargs):
6579 """
6580 IsMainLoopRunning() -> bool
6581
6582 Returns True if we're running the main loop, i.e. if the events can
6583 currently be dispatched.
6584 """
6585 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
6586
6587 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
6588 def MainLoop(*args, **kwargs):
6589 """
6590 MainLoop(self) -> int
6591
6592 Execute the main GUI loop, the function doesn't normally return until
6593 all top level windows have been closed and destroyed.
6594 """
6595 return _core_.PyApp_MainLoop(*args, **kwargs)
6596
6597 def Exit(*args, **kwargs):
6598 """
6599 Exit(self)
6600
6601 Exit the main loop thus terminating the application.
6602 :see: `wx.Exit`
6603 """
6604 return _core_.PyApp_Exit(*args, **kwargs)
6605
6606 def ExitMainLoop(*args, **kwargs):
6607 """
6608 ExitMainLoop(self)
6609
6610 Exit the main GUI loop during the next iteration of the main
6611 loop, (i.e. it does not stop the program immediately!)
6612 """
6613 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
6614
6615 def Pending(*args, **kwargs):
6616 """
6617 Pending(self) -> bool
6618
6619 Returns True if there are unprocessed events in the event queue.
6620 """
6621 return _core_.PyApp_Pending(*args, **kwargs)
6622
6623 def Dispatch(*args, **kwargs):
6624 """
6625 Dispatch(self) -> bool
6626
6627 Process the first event in the event queue (blocks until an event
6628 appears if there are none currently)
6629 """
6630 return _core_.PyApp_Dispatch(*args, **kwargs)
6631
6632 def ProcessIdle(*args, **kwargs):
6633 """
6634 ProcessIdle(self) -> bool
6635
6636 Called from the MainLoop when the application becomes idle (there are
6637 no pending events) and sends a `wx.IdleEvent` to all interested
6638 parties. Returns True if more idle events are needed, False if not.
6639 """
6640 return _core_.PyApp_ProcessIdle(*args, **kwargs)
6641
6642 def SendIdleEvents(*args, **kwargs):
6643 """
6644 SendIdleEvents(self, Window win, IdleEvent event) -> bool
6645
6646 Send idle event to window and all subwindows. Returns True if more
6647 idle time is requested.
6648 """
6649 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
6650
6651 def IsActive(*args, **kwargs):
6652 """
6653 IsActive(self) -> bool
6654
6655 Return True if our app has focus.
6656 """
6657 return _core_.PyApp_IsActive(*args, **kwargs)
6658
6659 def SetTopWindow(*args, **kwargs):
6660 """
6661 SetTopWindow(self, Window win)
6662
6663 Set the *main* top level window
6664 """
6665 return _core_.PyApp_SetTopWindow(*args, **kwargs)
6666
6667 def GetTopWindow(*args, **kwargs):
6668 """
6669 GetTopWindow(self) -> Window
6670
6671 Return the *main* top level window (if it hadn't been set previously
6672 with SetTopWindow(), will return just some top level window and, if
6673 there not any, will return None)
6674 """
6675 return _core_.PyApp_GetTopWindow(*args, **kwargs)
6676
6677 def SetExitOnFrameDelete(*args, **kwargs):
6678 """
6679 SetExitOnFrameDelete(self, bool flag)
6680
6681 Control the exit behaviour: by default, the program will exit the main
6682 loop (and so, usually, terminate) when the last top-level program
6683 window is deleted. Beware that if you disable this behaviour (with
6684 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
6685 explicitly from somewhere.
6686 """
6687 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
6688
6689 def GetExitOnFrameDelete(*args, **kwargs):
6690 """
6691 GetExitOnFrameDelete(self) -> bool
6692
6693 Get the current exit behaviour setting.
6694 """
6695 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
6696
6697 def SetUseBestVisual(*args, **kwargs):
6698 """
6699 SetUseBestVisual(self, bool flag)
6700
6701 Set whether the app should try to use the best available visual on
6702 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
6703 """
6704 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
6705
6706 def GetUseBestVisual(*args, **kwargs):
6707 """
6708 GetUseBestVisual(self) -> bool
6709
6710 Get current UseBestVisual setting.
6711 """
6712 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
6713
6714 def SetPrintMode(*args, **kwargs):
6715 """SetPrintMode(self, int mode)"""
6716 return _core_.PyApp_SetPrintMode(*args, **kwargs)
6717
6718 def GetPrintMode(*args, **kwargs):
6719 """GetPrintMode(self) -> int"""
6720 return _core_.PyApp_GetPrintMode(*args, **kwargs)
6721
6722 def SetAssertMode(*args, **kwargs):
6723 """
6724 SetAssertMode(self, int mode)
6725
6726 Set the OnAssert behaviour for debug and hybrid builds.
6727 """
6728 return _core_.PyApp_SetAssertMode(*args, **kwargs)
6729
6730 def GetAssertMode(*args, **kwargs):
6731 """
6732 GetAssertMode(self) -> int
6733
6734 Get the current OnAssert behaviour setting.
6735 """
6736 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6737
6738 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
6739 """GetMacSupportPCMenuShortcuts() -> bool"""
6740 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
6741
6742 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
6743 def GetMacAboutMenuItemId(*args, **kwargs):
6744 """GetMacAboutMenuItemId() -> long"""
6745 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
6746
6747 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
6748 def GetMacPreferencesMenuItemId(*args, **kwargs):
6749 """GetMacPreferencesMenuItemId() -> long"""
6750 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
6751
6752 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
6753 def GetMacExitMenuItemId(*args, **kwargs):
6754 """GetMacExitMenuItemId() -> long"""
6755 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
6756
6757 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
6758 def GetMacHelpMenuTitleName(*args, **kwargs):
6759 """GetMacHelpMenuTitleName() -> String"""
6760 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
6761
6762 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
6763 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
6764 """SetMacSupportPCMenuShortcuts(bool val)"""
6765 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
6766
6767 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
6768 def SetMacAboutMenuItemId(*args, **kwargs):
6769 """SetMacAboutMenuItemId(long val)"""
6770 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
6771
6772 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
6773 def SetMacPreferencesMenuItemId(*args, **kwargs):
6774 """SetMacPreferencesMenuItemId(long val)"""
6775 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
6776
6777 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
6778 def SetMacExitMenuItemId(*args, **kwargs):
6779 """SetMacExitMenuItemId(long val)"""
6780 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
6781
6782 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
6783 def SetMacHelpMenuTitleName(*args, **kwargs):
6784 """SetMacHelpMenuTitleName(String val)"""
6785 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
6786
6787 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
6788 def _BootstrapApp(*args, **kwargs):
6789 """
6790 _BootstrapApp(self)
6791
6792 For internal use only
6793 """
6794 return _core_.PyApp__BootstrapApp(*args, **kwargs)
6795
6796 def GetComCtl32Version(*args, **kwargs):
6797 """
6798 GetComCtl32Version() -> int
6799
6800 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
6801 it wasn't found at all. Raises an exception on non-Windows platforms.
6802 """
6803 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
6804
6805 GetComCtl32Version = staticmethod(GetComCtl32Version)
6806 PyApp_swigregister = _core_.PyApp_swigregister
6807 PyApp_swigregister(PyApp)
6808
6809 def PyApp_IsMainLoopRunning(*args):
6810 """
6811 PyApp_IsMainLoopRunning() -> bool
6812
6813 Returns True if we're running the main loop, i.e. if the events can
6814 currently be dispatched.
6815 """
6816 return _core_.PyApp_IsMainLoopRunning(*args)
6817
6818 def PyApp_GetMacSupportPCMenuShortcuts(*args):
6819 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
6820 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args)
6821
6822 def PyApp_GetMacAboutMenuItemId(*args):
6823 """PyApp_GetMacAboutMenuItemId() -> long"""
6824 return _core_.PyApp_GetMacAboutMenuItemId(*args)
6825
6826 def PyApp_GetMacPreferencesMenuItemId(*args):
6827 """PyApp_GetMacPreferencesMenuItemId() -> long"""
6828 return _core_.PyApp_GetMacPreferencesMenuItemId(*args)
6829
6830 def PyApp_GetMacExitMenuItemId(*args):
6831 """PyApp_GetMacExitMenuItemId() -> long"""
6832 return _core_.PyApp_GetMacExitMenuItemId(*args)
6833
6834 def PyApp_GetMacHelpMenuTitleName(*args):
6835 """PyApp_GetMacHelpMenuTitleName() -> String"""
6836 return _core_.PyApp_GetMacHelpMenuTitleName(*args)
6837
6838 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
6839 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
6840 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
6841
6842 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
6843 """PyApp_SetMacAboutMenuItemId(long val)"""
6844 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
6845
6846 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
6847 """PyApp_SetMacPreferencesMenuItemId(long val)"""
6848 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
6849
6850 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
6851 """PyApp_SetMacExitMenuItemId(long val)"""
6852 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
6853
6854 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
6855 """PyApp_SetMacHelpMenuTitleName(String val)"""
6856 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
6857
6858 def PyApp_GetComCtl32Version(*args):
6859 """
6860 PyApp_GetComCtl32Version() -> int
6861
6862 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
6863 it wasn't found at all. Raises an exception on non-Windows platforms.
6864 """
6865 return _core_.PyApp_GetComCtl32Version(*args)
6866
6867 #---------------------------------------------------------------------------
6868
6869
6870 def Exit(*args):
6871 """
6872 Exit()
6873
6874 Force an exit of the application. Convenience for wx.GetApp().Exit()
6875 """
6876 return _core_.Exit(*args)
6877
6878 def Yield(*args):
6879 """
6880 Yield() -> bool
6881
6882 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
6883 """
6884 return _core_.Yield(*args)
6885
6886 def YieldIfNeeded(*args):
6887 """
6888 YieldIfNeeded() -> bool
6889
6890 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
6891 """
6892 return _core_.YieldIfNeeded(*args)
6893
6894 def SafeYield(*args, **kwargs):
6895 """
6896 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6897
6898 This function is similar to `wx.Yield`, except that it disables the
6899 user input to all program windows before calling `wx.Yield` and
6900 re-enables it again afterwards. If ``win`` is not None, this window
6901 will remain enabled, allowing the implementation of some limited user
6902 interaction.
6903
6904 :Returns: the result of the call to `wx.Yield`.
6905 """
6906 return _core_.SafeYield(*args, **kwargs)
6907
6908 def WakeUpIdle(*args):
6909 """
6910 WakeUpIdle()
6911
6912 Cause the message queue to become empty again, so idle events will be
6913 sent.
6914 """
6915 return _core_.WakeUpIdle(*args)
6916
6917 def PostEvent(*args, **kwargs):
6918 """
6919 PostEvent(EvtHandler dest, Event event)
6920
6921 Send an event to a window or other wx.EvtHandler to be processed
6922 later.
6923 """
6924 return _core_.PostEvent(*args, **kwargs)
6925
6926 def App_CleanUp(*args):
6927 """
6928 App_CleanUp()
6929
6930 For internal use only, it is used to cleanup after wxWidgets when
6931 Python shuts down.
6932 """
6933 return _core_.App_CleanUp(*args)
6934
6935 def GetApp(*args):
6936 """
6937 GetApp() -> PyApp
6938
6939 Return a reference to the current wx.App object.
6940 """
6941 return _core_.GetApp(*args)
6942
6943 def SetDefaultPyEncoding(*args, **kwargs):
6944 """
6945 SetDefaultPyEncoding(string encoding)
6946
6947 Sets the encoding that wxPython will use when it needs to convert a
6948 Python string or unicode object to or from a wxString.
6949
6950 The default encoding is the value of ``locale.getdefaultlocale()[1]``
6951 but please be aware that the default encoding within the same locale
6952 may be slightly different on different platforms. For example, please
6953 see http://www.alanwood.net/demos/charsetdiffs.html for differences
6954 between the common latin/roman encodings.
6955 """
6956 return _core_.SetDefaultPyEncoding(*args, **kwargs)
6957
6958 def GetDefaultPyEncoding(*args):
6959 """
6960 GetDefaultPyEncoding() -> string
6961
6962 Gets the current encoding that wxPython will use when it needs to
6963 convert a Python string or unicode object to or from a wxString.
6964 """
6965 return _core_.GetDefaultPyEncoding(*args)
6966 #----------------------------------------------------------------------
6967
6968 class PyOnDemandOutputWindow:
6969 """
6970 A class that can be used for redirecting Python's stdout and
6971 stderr streams. It will do nothing until something is wrriten to
6972 the stream at which point it will create a Frame with a text area
6973 and write the text there.
6974 """
6975 def __init__(self, title = "wxPython: stdout/stderr"):
6976 self.frame = None
6977 self.title = title
6978 self.pos = wx.DefaultPosition
6979 self.size = (450, 300)
6980 self.parent = None
6981
6982 def SetParent(self, parent):
6983 """Set the window to be used as the popup Frame's parent."""
6984 self.parent = parent
6985
6986
6987 def CreateOutputWindow(self, st):
6988 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
6989 style=wx.DEFAULT_FRAME_STYLE)
6990 self.text = wx.TextCtrl(self.frame, -1, "",
6991 style=wx.TE_MULTILINE|wx.TE_READONLY)
6992 self.text.AppendText(st)
6993 self.frame.Show(True)
6994 EVT_CLOSE(self.frame, self.OnCloseWindow)
6995
6996
6997 def OnCloseWindow(self, event):
6998 if self.frame is not None:
6999 self.frame.Destroy()
7000 self.frame = None
7001 self.text = None
7002
7003
7004 # These methods provide the file-like output behaviour.
7005 def write(self, text):
7006 """
7007 Create the output window if needed and write the string to it.
7008 If not called in the context of the gui thread then uses
7009 CallAfter to do the work there.
7010 """
7011 if self.frame is None:
7012 if not wx.Thread_IsMain():
7013 wx.CallAfter(self.CreateOutputWindow, text)
7014 else:
7015 self.CreateOutputWindow(text)
7016 else:
7017 if not wx.Thread_IsMain():
7018 wx.CallAfter(self.text.AppendText, text)
7019 else:
7020 self.text.AppendText(text)
7021
7022
7023 def close(self):
7024 if self.frame is not None:
7025 wx.CallAfter(self.frame.Close)
7026
7027
7028 def flush(self):
7029 pass
7030
7031
7032
7033 #----------------------------------------------------------------------
7034
7035 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
7036
7037 class App(wx.PyApp):
7038 """
7039 The ``wx.App`` class represents the application and is used to:
7040
7041 * bootstrap the wxPython system and initialize the underlying
7042 gui toolkit
7043 * set and get application-wide properties
7044 * implement the windowing system main message or event loop,
7045 and to dispatch events to window instances
7046 * etc.
7047
7048 Every application must have a ``wx.App`` instance, and all
7049 creation of UI objects should be delayed until after the
7050 ``wx.App`` object has been created in order to ensure that the gui
7051 platform and wxWidgets have been fully initialized.
7052
7053 Normally you would derive from this class and implement an
7054 ``OnInit`` method that creates a frame and then calls
7055 ``self.SetTopWindow(frame)``.
7056
7057 :see: `wx.PySimpleApp` for a simpler app class that can be used
7058 directly.
7059 """
7060
7061 outputWindowClass = PyOnDemandOutputWindow
7062
7063 def __init__(self, redirect=_defRedirect, filename=None,
7064 useBestVisual=False, clearSigInt=True):
7065 """
7066 Construct a ``wx.App`` object.
7067
7068 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
7069 redirected? Defaults to True on Windows and Mac, False
7070 otherwise. If `filename` is None then output will be
7071 redirected to a window that pops up as needed. (You can
7072 control what kind of window is created for the output by
7073 resetting the class variable ``outputWindowClass`` to a
7074 class of your choosing.)
7075
7076 :param filename: The name of a file to redirect output to, if
7077 redirect is True.
7078
7079 :param useBestVisual: Should the app try to use the best
7080 available visual provided by the system (only relevant on
7081 systems that have more than one visual.) This parameter
7082 must be used instead of calling `SetUseBestVisual` later
7083 on because it must be set before the underlying GUI
7084 toolkit is initialized.
7085
7086 :param clearSigInt: Should SIGINT be cleared? This allows the
7087 app to terminate upon a Ctrl-C in the console like other
7088 GUI apps will.
7089
7090 :note: You should override OnInit to do applicaition
7091 initialization to ensure that the system, toolkit and
7092 wxWidgets are fully initialized.
7093 """
7094 wx.PyApp.__init__(self)
7095
7096 if wx.Platform == "__WXMAC__":
7097 try:
7098 import MacOS
7099 if not MacOS.WMAvailable():
7100 print """\
7101 This program needs access to the screen. Please run with 'pythonw',
7102 not 'python', and only when you are logged in on the main display of
7103 your Mac."""
7104 _sys.exit(1)
7105 except SystemExit:
7106 raise
7107 except:
7108 pass
7109
7110 # This has to be done before OnInit
7111 self.SetUseBestVisual(useBestVisual)
7112
7113 # Set the default handler for SIGINT. This fixes a problem
7114 # where if Ctrl-C is pressed in the console that started this
7115 # app then it will not appear to do anything, (not even send
7116 # KeyboardInterrupt???) but will later segfault on exit. By
7117 # setting the default handler then the app will exit, as
7118 # expected (depending on platform.)
7119 if clearSigInt:
7120 try:
7121 import signal
7122 signal.signal(signal.SIGINT, signal.SIG_DFL)
7123 except:
7124 pass
7125
7126 # Save and redirect the stdio to a window?
7127 self.stdioWin = None
7128 self.saveStdio = (_sys.stdout, _sys.stderr)
7129 if redirect:
7130 self.RedirectStdio(filename)
7131
7132 # Use Python's install prefix as the default
7133 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
7134
7135 # This finishes the initialization of wxWindows and then calls
7136 # the OnInit that should be present in the derived class
7137 self._BootstrapApp()
7138
7139
7140 def __del__(self, destroy=wx.PyApp.__del__):
7141 self.RestoreStdio() # Just in case the MainLoop was overridden
7142 destroy(self)
7143
7144 def Destroy(self):
7145 wx.PyApp.Destroy(self)
7146 self.thisown = 0
7147
7148 def SetTopWindow(self, frame):
7149 """Set the \"main\" top level window"""
7150 if self.stdioWin:
7151 self.stdioWin.SetParent(frame)
7152 wx.PyApp.SetTopWindow(self, frame)
7153
7154
7155 def MainLoop(self):
7156 """Execute the main GUI event loop"""
7157 wx.PyApp.MainLoop(self)
7158 self.RestoreStdio()
7159
7160
7161 def RedirectStdio(self, filename=None):
7162 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
7163 if filename:
7164 _sys.stdout = _sys.stderr = open(filename, 'a')
7165 else:
7166 self.stdioWin = self.outputWindowClass()
7167 _sys.stdout = _sys.stderr = self.stdioWin
7168
7169
7170 def RestoreStdio(self):
7171 try:
7172 _sys.stdout, _sys.stderr = self.saveStdio
7173 except:
7174 pass
7175
7176
7177 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
7178 """
7179 Set the title, position and/or size of the output window if
7180 the stdio has been redirected. This should be called before
7181 any output would cause the output window to be created.
7182 """
7183 if self.stdioWin:
7184 if title is not None:
7185 self.stdioWin.title = title
7186 if pos is not None:
7187 self.stdioWin.pos = pos
7188 if size is not None:
7189 self.stdioWin.size = size
7190
7191
7192
7193
7194 # change from wx.PyApp_XX to wx.App_XX
7195 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
7196 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
7197 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
7198 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
7199 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
7200 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
7201 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
7202 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
7203 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
7204 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
7205 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
7206
7207 #----------------------------------------------------------------------------
7208
7209 class PySimpleApp(wx.App):
7210 """
7211 A simple application class. You can just create one of these and
7212 then then make your top level windows later, and not have to worry
7213 about OnInit. For example::
7214
7215 app = wx.PySimpleApp()
7216 frame = wx.Frame(None, title='Hello World')
7217 frame.Show()
7218 app.MainLoop()
7219
7220 :see: `wx.App`
7221 """
7222
7223 def __init__(self, redirect=False, filename=None,
7224 useBestVisual=False, clearSigInt=True):
7225 """
7226 :see: `wx.App.__init__`
7227 """
7228 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
7229
7230 def OnInit(self):
7231 return True
7232
7233
7234
7235 # Is anybody using this one?
7236 class PyWidgetTester(wx.App):
7237 def __init__(self, size = (250, 100)):
7238 self.size = size
7239 wx.App.__init__(self, 0)
7240
7241 def OnInit(self):
7242 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
7243 self.SetTopWindow(self.frame)
7244 return True
7245
7246 def SetWidget(self, widgetClass, *args, **kwargs):
7247 w = widgetClass(self.frame, *args, **kwargs)
7248 self.frame.Show(True)
7249
7250 #----------------------------------------------------------------------------
7251 # DO NOT hold any other references to this object. This is how we
7252 # know when to cleanup system resources that wxWidgets is holding. When
7253 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
7254 # goes to zero and it calls the wx.App_CleanUp function.
7255
7256 class __wxPyCleanup:
7257 def __init__(self):
7258 self.cleanup = _core_.App_CleanUp
7259 def __del__(self):
7260 self.cleanup()
7261
7262 _sys.__wxPythonCleanup = __wxPyCleanup()
7263
7264 ## # another possible solution, but it gets called too early...
7265 ## import atexit
7266 ## atexit.register(_core_.wxApp_CleanUp)
7267
7268
7269 #----------------------------------------------------------------------------
7270
7271 #---------------------------------------------------------------------------
7272
7273 class EventLoop(object):
7274 """Proxy of C++ EventLoop class"""
7275 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7276 __repr__ = _swig_repr
7277 def __init__(self, *args, **kwargs):
7278 """__init__(self) -> EventLoop"""
7279 _core_.EventLoop_swiginit(self,_core_.new_EventLoop(*args, **kwargs))
7280 __swig_destroy__ = _core_.delete_EventLoop
7281 __del__ = lambda self : None;
7282 def Run(*args, **kwargs):
7283 """Run(self) -> int"""
7284 return _core_.EventLoop_Run(*args, **kwargs)
7285
7286 def Exit(*args, **kwargs):
7287 """Exit(self, int rc=0)"""
7288 return _core_.EventLoop_Exit(*args, **kwargs)
7289
7290 def Pending(*args, **kwargs):
7291 """Pending(self) -> bool"""
7292 return _core_.EventLoop_Pending(*args, **kwargs)
7293
7294 def Dispatch(*args, **kwargs):
7295 """Dispatch(self) -> bool"""
7296 return _core_.EventLoop_Dispatch(*args, **kwargs)
7297
7298 def IsRunning(*args, **kwargs):
7299 """IsRunning(self) -> bool"""
7300 return _core_.EventLoop_IsRunning(*args, **kwargs)
7301
7302 def GetActive(*args, **kwargs):
7303 """GetActive() -> EventLoop"""
7304 return _core_.EventLoop_GetActive(*args, **kwargs)
7305
7306 GetActive = staticmethod(GetActive)
7307 def SetActive(*args, **kwargs):
7308 """SetActive(EventLoop loop)"""
7309 return _core_.EventLoop_SetActive(*args, **kwargs)
7310
7311 SetActive = staticmethod(SetActive)
7312 EventLoop_swigregister = _core_.EventLoop_swigregister
7313 EventLoop_swigregister(EventLoop)
7314
7315 def EventLoop_GetActive(*args):
7316 """EventLoop_GetActive() -> EventLoop"""
7317 return _core_.EventLoop_GetActive(*args)
7318
7319 def EventLoop_SetActive(*args, **kwargs):
7320 """EventLoop_SetActive(EventLoop loop)"""
7321 return _core_.EventLoop_SetActive(*args, **kwargs)
7322
7323 class EventLoopActivator(object):
7324 """Proxy of C++ EventLoopActivator class"""
7325 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7326 __repr__ = _swig_repr
7327 def __init__(self, *args, **kwargs):
7328 """__init__(self, EventLoop evtLoop) -> EventLoopActivator"""
7329 _core_.EventLoopActivator_swiginit(self,_core_.new_EventLoopActivator(*args, **kwargs))
7330 __swig_destroy__ = _core_.delete_EventLoopActivator
7331 __del__ = lambda self : None;
7332 EventLoopActivator_swigregister = _core_.EventLoopActivator_swigregister
7333 EventLoopActivator_swigregister(EventLoopActivator)
7334
7335 #---------------------------------------------------------------------------
7336
7337 class AcceleratorEntry(object):
7338 """
7339 A class used to define items in an `wx.AcceleratorTable`. wxPython
7340 programs can choose to use wx.AcceleratorEntry objects, but using a
7341 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
7342 as well. See `__init__` for of the tuple values.
7343
7344 :see: `wx.AcceleratorTable`
7345 """
7346 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7347 __repr__ = _swig_repr
7348 def __init__(self, *args, **kwargs):
7349 """
7350 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
7351
7352 Construct a wx.AcceleratorEntry.
7353 """
7354 _core_.AcceleratorEntry_swiginit(self,_core_.new_AcceleratorEntry(*args, **kwargs))
7355 __swig_destroy__ = _core_.delete_AcceleratorEntry
7356 __del__ = lambda self : None;
7357 def Set(*args, **kwargs):
7358 """
7359 Set(self, int flags, int keyCode, int cmd)
7360
7361 (Re)set the attributes of a wx.AcceleratorEntry.
7362 :see `__init__`
7363 """
7364 return _core_.AcceleratorEntry_Set(*args, **kwargs)
7365
7366 def GetFlags(*args, **kwargs):
7367 """
7368 GetFlags(self) -> int
7369
7370 Get the AcceleratorEntry's flags.
7371 """
7372 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
7373
7374 def GetKeyCode(*args, **kwargs):
7375 """
7376 GetKeyCode(self) -> int
7377
7378 Get the AcceleratorEntry's keycode.
7379 """
7380 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
7381
7382 def GetCommand(*args, **kwargs):
7383 """
7384 GetCommand(self) -> int
7385
7386 Get the AcceleratorEntry's command ID.
7387 """
7388 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
7389
7390 AcceleratorEntry_swigregister = _core_.AcceleratorEntry_swigregister
7391 AcceleratorEntry_swigregister(AcceleratorEntry)
7392
7393 class AcceleratorTable(Object):
7394 """
7395 An accelerator table allows the application to specify a table of
7396 keyboard shortcuts for menus or other commands. On Windows, menu or
7397 button commands are supported; on GTK, only menu commands are
7398 supported.
7399 """
7400 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7401 __repr__ = _swig_repr
7402 def __init__(self, *args, **kwargs):
7403 """
7404 __init__(entries) -> AcceleratorTable
7405
7406 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
7407 items or or of 3-tuples (flags, keyCode, cmdID)
7408
7409 :see: `wx.AcceleratorEntry`
7410 """
7411 _core_.AcceleratorTable_swiginit(self,_core_.new_AcceleratorTable(*args, **kwargs))
7412 __swig_destroy__ = _core_.delete_AcceleratorTable
7413 __del__ = lambda self : None;
7414 def Ok(*args, **kwargs):
7415 """Ok(self) -> bool"""
7416 return _core_.AcceleratorTable_Ok(*args, **kwargs)
7417
7418 AcceleratorTable_swigregister = _core_.AcceleratorTable_swigregister
7419 AcceleratorTable_swigregister(AcceleratorTable)
7420
7421
7422 def GetAccelFromString(*args, **kwargs):
7423 """GetAccelFromString(String label) -> AcceleratorEntry"""
7424 return _core_.GetAccelFromString(*args, **kwargs)
7425 #---------------------------------------------------------------------------
7426
7427 class VisualAttributes(object):
7428 """struct containing all the visual attributes of a control"""
7429 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7430 __repr__ = _swig_repr
7431 def __init__(self, *args, **kwargs):
7432 """
7433 __init__(self) -> VisualAttributes
7434
7435 struct containing all the visual attributes of a control
7436 """
7437 _core_.VisualAttributes_swiginit(self,_core_.new_VisualAttributes(*args, **kwargs))
7438 __swig_destroy__ = _core_.delete_VisualAttributes
7439 __del__ = lambda self : None;
7440 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
7441 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
7442 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
7443 VisualAttributes_swigregister = _core_.VisualAttributes_swigregister
7444 VisualAttributes_swigregister(VisualAttributes)
7445 NullAcceleratorTable = cvar.NullAcceleratorTable
7446 PanelNameStr = cvar.PanelNameStr
7447
7448 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
7449 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
7450 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
7451 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
7452 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
7453 class Window(EvtHandler):
7454 """
7455 wx.Window is the base class for all windows and represents any visible
7456 object on the screen. All controls, top level windows and so on are
7457 wx.Windows. Sizers and device contexts are not however, as they don't
7458 appear on screen themselves.
7459
7460 """
7461 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7462 __repr__ = _swig_repr
7463 def __init__(self, *args, **kwargs):
7464 """
7465 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
7466 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
7467
7468 Construct and show a generic Window.
7469 """
7470 _core_.Window_swiginit(self,_core_.new_Window(*args, **kwargs))
7471 self._setOORInfo(self)
7472
7473 def Create(*args, **kwargs):
7474 """
7475 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
7476 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
7477
7478 Create the GUI part of the Window for 2-phase creation mode.
7479 """
7480 return _core_.Window_Create(*args, **kwargs)
7481
7482 def Close(*args, **kwargs):
7483 """
7484 Close(self, bool force=False) -> bool
7485
7486 This function simply generates a EVT_CLOSE event whose handler usually
7487 tries to close the window. It doesn't close the window itself,
7488 however. If force is False (the default) then the window's close
7489 handler will be allowed to veto the destruction of the window.
7490 """
7491 return _core_.Window_Close(*args, **kwargs)
7492
7493 def Destroy(*args, **kwargs):
7494 """
7495 Destroy(self) -> bool
7496
7497 Destroys the window safely. Frames and dialogs are not destroyed
7498 immediately when this function is called -- they are added to a list
7499 of windows to be deleted on idle time, when all the window's events
7500 have been processed. This prevents problems with events being sent to
7501 non-existent windows.
7502
7503 Returns True if the window has either been successfully deleted, or it
7504 has been added to the list of windows pending real deletion.
7505 """
7506 val = _core_.Window_Destroy(*args, **kwargs)
7507 args[0].thisown = 0
7508 return val
7509
7510 def DestroyChildren(*args, **kwargs):
7511 """
7512 DestroyChildren(self) -> bool
7513
7514 Destroys all children of a window. Called automatically by the
7515 destructor.
7516 """
7517 return _core_.Window_DestroyChildren(*args, **kwargs)
7518
7519 def IsBeingDeleted(*args, **kwargs):
7520 """
7521 IsBeingDeleted(self) -> bool
7522
7523 Is the window in the process of being deleted?
7524 """
7525 return _core_.Window_IsBeingDeleted(*args, **kwargs)
7526
7527 def SetLabel(*args, **kwargs):
7528 """
7529 SetLabel(self, String label)
7530
7531 Set the text which the window shows in its label if applicable.
7532 """
7533 return _core_.Window_SetLabel(*args, **kwargs)
7534
7535 def GetLabel(*args, **kwargs):
7536 """
7537 GetLabel(self) -> String
7538
7539 Generic way of getting a label from any window, for identification
7540 purposes. The interpretation of this function differs from class to
7541 class. For frames and dialogs, the value returned is the title. For
7542 buttons or static text controls, it is the button text. This function
7543 can be useful for meta-programs such as testing tools or special-needs
7544 access programs)which need to identify windows by name.
7545 """
7546 return _core_.Window_GetLabel(*args, **kwargs)
7547
7548 def SetName(*args, **kwargs):
7549 """
7550 SetName(self, String name)
7551
7552 Sets the window's name. The window name is used for ressource setting
7553 in X, it is not the same as the window title/label
7554 """
7555 return _core_.Window_SetName(*args, **kwargs)
7556
7557 def GetName(*args, **kwargs):
7558 """
7559 GetName(self) -> String
7560
7561 Returns the windows name. This name is not guaranteed to be unique;
7562 it is up to the programmer to supply an appropriate name in the window
7563 constructor or via wx.Window.SetName.
7564 """
7565 return _core_.Window_GetName(*args, **kwargs)
7566
7567 def SetWindowVariant(*args, **kwargs):
7568 """
7569 SetWindowVariant(self, int variant)
7570
7571 Sets the variant of the window/font size to use for this window, if
7572 the platform supports variants, for example, wxMac.
7573 """
7574 return _core_.Window_SetWindowVariant(*args, **kwargs)
7575
7576 def GetWindowVariant(*args, **kwargs):
7577 """GetWindowVariant(self) -> int"""
7578 return _core_.Window_GetWindowVariant(*args, **kwargs)
7579
7580 def SetId(*args, **kwargs):
7581 """
7582 SetId(self, int winid)
7583
7584 Sets the identifier of the window. Each window has an integer
7585 identifier. If the application has not provided one, an identifier
7586 will be generated. Normally, the identifier should be provided on
7587 creation and should not be modified subsequently.
7588 """
7589 return _core_.Window_SetId(*args, **kwargs)
7590
7591 def GetId(*args, **kwargs):
7592 """
7593 GetId(self) -> int
7594
7595 Returns the identifier of the window. Each window has an integer
7596 identifier. If the application has not provided one (or the default Id
7597 -1 is used) then an unique identifier with a negative value will be
7598 generated.
7599 """
7600 return _core_.Window_GetId(*args, **kwargs)
7601
7602 def NewControlId(*args, **kwargs):
7603 """
7604 NewControlId() -> int
7605
7606 Generate a control id for the controls which were not given one.
7607 """
7608 return _core_.Window_NewControlId(*args, **kwargs)
7609
7610 NewControlId = staticmethod(NewControlId)
7611 def NextControlId(*args, **kwargs):
7612 """
7613 NextControlId(int winid) -> int
7614
7615 Get the id of the control following the one with the given
7616 autogenerated) id
7617 """
7618 return _core_.Window_NextControlId(*args, **kwargs)
7619
7620 NextControlId = staticmethod(NextControlId)
7621 def PrevControlId(*args, **kwargs):
7622 """
7623 PrevControlId(int winid) -> int
7624
7625 Get the id of the control preceding the one with the given
7626 autogenerated) id
7627 """
7628 return _core_.Window_PrevControlId(*args, **kwargs)
7629
7630 PrevControlId = staticmethod(PrevControlId)
7631 def SetSize(*args, **kwargs):
7632 """
7633 SetSize(self, Size size)
7634
7635 Sets the size of the window in pixels.
7636 """
7637 return _core_.Window_SetSize(*args, **kwargs)
7638
7639 def SetDimensions(*args, **kwargs):
7640 """
7641 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
7642
7643 Sets the position and size of the window in pixels. The sizeFlags
7644 parameter indicates the interpretation of the other params if they are
7645 equal to -1.
7646
7647 ======================== ======================================
7648 wx.SIZE_AUTO A -1 indicates that a class-specific
7649 default should be used.
7650 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
7651 -1 values are supplied.
7652 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
7653 interpreted as real dimensions, not
7654 default values.
7655 ======================== ======================================
7656
7657 """
7658 return _core_.Window_SetDimensions(*args, **kwargs)
7659
7660 def SetRect(*args, **kwargs):
7661 """
7662 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
7663
7664 Sets the position and size of the window in pixels using a wx.Rect.
7665 """
7666 return _core_.Window_SetRect(*args, **kwargs)
7667
7668 def SetSizeWH(*args, **kwargs):
7669 """
7670 SetSizeWH(self, int width, int height)
7671
7672 Sets the size of the window in pixels.
7673 """
7674 return _core_.Window_SetSizeWH(*args, **kwargs)
7675
7676 def Move(*args, **kwargs):
7677 """
7678 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
7679
7680 Moves the window to the given position.
7681 """
7682 return _core_.Window_Move(*args, **kwargs)
7683
7684 SetPosition = Move
7685 def MoveXY(*args, **kwargs):
7686 """
7687 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
7688
7689 Moves the window to the given position.
7690 """
7691 return _core_.Window_MoveXY(*args, **kwargs)
7692
7693 def SetBestFittingSize(*args, **kwargs):
7694 """
7695 SetBestFittingSize(self, Size size=DefaultSize)
7696
7697 A 'Smart' SetSize that will fill in default size components with the
7698 window's *best size* values. Also set's the minsize for use with sizers.
7699 """
7700 return _core_.Window_SetBestFittingSize(*args, **kwargs)
7701
7702 def Raise(*args, **kwargs):
7703 """
7704 Raise(self)
7705
7706 Raises the window to the top of the window hierarchy. In current
7707 version of wxWidgets this works both for manage and child windows.
7708 """
7709 return _core_.Window_Raise(*args, **kwargs)
7710
7711 def Lower(*args, **kwargs):
7712 """
7713 Lower(self)
7714
7715 Lowers the window to the bottom of the window hierarchy. In current
7716 version of wxWidgets this works both for manage and child windows.
7717 """
7718 return _core_.Window_Lower(*args, **kwargs)
7719
7720 def SetClientSize(*args, **kwargs):
7721 """
7722 SetClientSize(self, Size size)
7723
7724 This sets the size of the window client area in pixels. Using this
7725 function to size a window tends to be more device-independent than
7726 wx.Window.SetSize, since the application need not worry about what
7727 dimensions the border or title bar have when trying to fit the window
7728 around panel items, for example.
7729 """
7730 return _core_.Window_SetClientSize(*args, **kwargs)
7731
7732 def SetClientSizeWH(*args, **kwargs):
7733 """
7734 SetClientSizeWH(self, int width, int height)
7735
7736 This sets the size of the window client area in pixels. Using this
7737 function to size a window tends to be more device-independent than
7738 wx.Window.SetSize, since the application need not worry about what
7739 dimensions the border or title bar have when trying to fit the window
7740 around panel items, for example.
7741 """
7742 return _core_.Window_SetClientSizeWH(*args, **kwargs)
7743
7744 def SetClientRect(*args, **kwargs):
7745 """
7746 SetClientRect(self, Rect rect)
7747
7748 This sets the size of the window client area in pixels. Using this
7749 function to size a window tends to be more device-independent than
7750 wx.Window.SetSize, since the application need not worry about what
7751 dimensions the border or title bar have when trying to fit the window
7752 around panel items, for example.
7753 """
7754 return _core_.Window_SetClientRect(*args, **kwargs)
7755
7756 def GetPosition(*args, **kwargs):
7757 """
7758 GetPosition(self) -> Point
7759
7760 Get the window's position. Notice that the position is in client
7761 coordinates for child windows and screen coordinates for the top level
7762 ones, use `GetScreenPosition` if you need screen coordinates for all
7763 kinds of windows.
7764 """
7765 return _core_.Window_GetPosition(*args, **kwargs)
7766
7767 def GetPositionTuple(*args, **kwargs):
7768 """
7769 GetPositionTuple() -> (x,y)
7770
7771 Get the window's position. Notice that the position is in client
7772 coordinates for child windows and screen coordinates for the top level
7773 ones, use `GetScreenPosition` if you need screen coordinates for all
7774 kinds of windows.
7775 """
7776 return _core_.Window_GetPositionTuple(*args, **kwargs)
7777
7778 def GetScreenPosition(*args, **kwargs):
7779 """
7780 GetScreenPosition(self) -> Point
7781
7782 Get the position of the window in screen coordinantes.
7783 """
7784 return _core_.Window_GetScreenPosition(*args, **kwargs)
7785
7786 def GetScreenPositionTuple(*args, **kwargs):
7787 """
7788 GetScreenPositionTuple() -> (x,y)
7789
7790 Get the position of the window in screen coordinantes.
7791 """
7792 return _core_.Window_GetScreenPositionTuple(*args, **kwargs)
7793
7794 def GetScreenRect(*args, **kwargs):
7795 """
7796 GetScreenRect(self) -> Rect
7797
7798 Returns the size and position of the window in screen coordinantes as
7799 a `wx.Rect` object.
7800 """
7801 return _core_.Window_GetScreenRect(*args, **kwargs)
7802
7803 def GetSize(*args, **kwargs):
7804 """
7805 GetSize(self) -> Size
7806
7807 Get the window size.
7808 """
7809 return _core_.Window_GetSize(*args, **kwargs)
7810
7811 def GetSizeTuple(*args, **kwargs):
7812 """
7813 GetSizeTuple() -> (width, height)
7814
7815 Get the window size.
7816 """
7817 return _core_.Window_GetSizeTuple(*args, **kwargs)
7818
7819 def GetRect(*args, **kwargs):
7820 """
7821 GetRect(self) -> Rect
7822
7823 Returns the size and position of the window as a `wx.Rect` object.
7824 """
7825 return _core_.Window_GetRect(*args, **kwargs)
7826
7827 def GetClientSize(*args, **kwargs):
7828 """
7829 GetClientSize(self) -> Size
7830
7831 This gets the size of the window's 'client area' in pixels. The client
7832 area is the area which may be drawn on by the programmer, excluding
7833 title bar, border, scrollbars, etc.
7834 """
7835 return _core_.Window_GetClientSize(*args, **kwargs)
7836
7837 def GetClientSizeTuple(*args, **kwargs):
7838 """
7839 GetClientSizeTuple() -> (width, height)
7840
7841 This gets the size of the window's 'client area' in pixels. The client
7842 area is the area which may be drawn on by the programmer, excluding
7843 title bar, border, scrollbars, etc.
7844 """
7845 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
7846
7847 def GetClientAreaOrigin(*args, **kwargs):
7848 """
7849 GetClientAreaOrigin(self) -> Point
7850
7851 Get the origin of the client area of the window relative to the
7852 window's top left corner (the client area may be shifted because of
7853 the borders, scrollbars, other decorations...)
7854 """
7855 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
7856
7857 def GetClientRect(*args, **kwargs):
7858 """
7859 GetClientRect(self) -> Rect
7860
7861 Get the client area position and size as a `wx.Rect` object.
7862 """
7863 return _core_.Window_GetClientRect(*args, **kwargs)
7864
7865 def GetBestSize(*args, **kwargs):
7866 """
7867 GetBestSize(self) -> Size
7868
7869 This function returns the best acceptable minimal size for the
7870 window, if applicable. For example, for a static text control, it will
7871 be the minimal size such that the control label is not truncated. For
7872 windows containing subwindows (suzh aswx.Panel), the size returned by
7873 this function will be the same as the size the window would have had
7874 after calling Fit.
7875 """
7876 return _core_.Window_GetBestSize(*args, **kwargs)
7877
7878 def GetBestSizeTuple(*args, **kwargs):
7879 """
7880 GetBestSizeTuple() -> (width, height)
7881
7882 This function returns the best acceptable minimal size for the
7883 window, if applicable. For example, for a static text control, it will
7884 be the minimal size such that the control label is not truncated. For
7885 windows containing subwindows (suzh aswx.Panel), the size returned by
7886 this function will be the same as the size the window would have had
7887 after calling Fit.
7888 """
7889 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
7890
7891 def InvalidateBestSize(*args, **kwargs):
7892 """
7893 InvalidateBestSize(self)
7894
7895 Reset the cached best size value so it will be recalculated the next
7896 time it is needed.
7897 """
7898 return _core_.Window_InvalidateBestSize(*args, **kwargs)
7899
7900 def CacheBestSize(*args, **kwargs):
7901 """
7902 CacheBestSize(self, Size size)
7903
7904 Cache the best size so it doesn't need to be calculated again, (at least until
7905 some properties of the window change.)
7906 """
7907 return _core_.Window_CacheBestSize(*args, **kwargs)
7908
7909 def GetBestFittingSize(*args, **kwargs):
7910 """
7911 GetBestFittingSize(self) -> Size
7912
7913 This function will merge the window's best size into the window's
7914 minimum size, giving priority to the min size components, and returns
7915 the results.
7916
7917 """
7918 return _core_.Window_GetBestFittingSize(*args, **kwargs)
7919
7920 def GetAdjustedBestSize(*args, **kwargs):
7921 """
7922 GetAdjustedBestSize(self) -> Size
7923
7924 This method is similar to GetBestSize, except in one
7925 thing. GetBestSize should return the minimum untruncated size of the
7926 window, while this method will return the largest of BestSize and any
7927 user specified minimum size. ie. it is the minimum size the window
7928 should currently be drawn at, not the minimal size it can possibly
7929 tolerate.
7930 """
7931 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
7932
7933 def Center(*args, **kwargs):
7934 """
7935 Center(self, int direction=BOTH)
7936
7937 Centers the window. The parameter specifies the direction for
7938 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
7939 also include wx.CENTER_ON_SCREEN flag if you want to center the window
7940 on the entire screen and not on its parent window. If it is a
7941 top-level window and has no parent then it will always be centered
7942 relative to the screen.
7943 """
7944 return _core_.Window_Center(*args, **kwargs)
7945
7946 Centre = Center
7947 def CenterOnParent(*args, **kwargs):
7948 """
7949 CenterOnParent(self, int dir=BOTH)
7950
7951 Center with respect to the the parent window
7952 """
7953 return _core_.Window_CenterOnParent(*args, **kwargs)
7954
7955 CentreOnParent = CenterOnParent
7956 def Fit(*args, **kwargs):
7957 """
7958 Fit(self)
7959
7960 Sizes the window so that it fits around its subwindows. This function
7961 won't do anything if there are no subwindows and will only really work
7962 correctly if sizers are used for the subwindows layout. Also, if the
7963 window has exactly one subwindow it is better (faster and the result
7964 is more precise as Fit adds some margin to account for fuzziness of
7965 its calculations) to call window.SetClientSize(child.GetSize())
7966 instead of calling Fit.
7967 """
7968 return _core_.Window_Fit(*args, **kwargs)
7969
7970 def FitInside(*args, **kwargs):
7971 """
7972 FitInside(self)
7973
7974 Similar to Fit, but sizes the interior (virtual) size of a
7975 window. Mainly useful with scrolled windows to reset scrollbars after
7976 sizing changes that do not trigger a size event, and/or scrolled
7977 windows without an interior sizer. This function similarly won't do
7978 anything if there are no subwindows.
7979 """
7980 return _core_.Window_FitInside(*args, **kwargs)
7981
7982 def SetSizeHints(*args, **kwargs):
7983 """
7984 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
7985 int incH=-1)
7986
7987 Allows specification of minimum and maximum window sizes, and window
7988 size increments. If a pair of values is not set (or set to -1), the
7989 default values will be used. If this function is called, the user
7990 will not be able to size the window outside the given bounds (if it is
7991 a top-level window.) Sizers will also inspect the minimum window size
7992 and will use that value if set when calculating layout.
7993
7994 The resizing increments are only significant under Motif or Xt.
7995 """
7996 return _core_.Window_SetSizeHints(*args, **kwargs)
7997
7998 def SetSizeHintsSz(*args, **kwargs):
7999 """
8000 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
8001
8002 Allows specification of minimum and maximum window sizes, and window
8003 size increments. If a pair of values is not set (or set to -1), the
8004 default values will be used. If this function is called, the user
8005 will not be able to size the window outside the given bounds (if it is
8006 a top-level window.) Sizers will also inspect the minimum window size
8007 and will use that value if set when calculating layout.
8008
8009 The resizing increments are only significant under Motif or Xt.
8010 """
8011 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
8012
8013 def SetVirtualSizeHints(*args, **kwargs):
8014 """
8015 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
8016
8017 Allows specification of minimum and maximum virtual window sizes. If a
8018 pair of values is not set (or set to -1), the default values will be
8019 used. If this function is called, the user will not be able to size
8020 the virtual area of the window outside the given bounds.
8021 """
8022 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
8023
8024 def SetVirtualSizeHintsSz(*args, **kwargs):
8025 """
8026 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
8027
8028 Allows specification of minimum and maximum virtual window sizes. If a
8029 pair of values is not set (or set to -1), the default values will be
8030 used. If this function is called, the user will not be able to size
8031 the virtual area of the window outside the given bounds.
8032 """
8033 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
8034
8035 def GetMaxSize(*args, **kwargs):
8036 """GetMaxSize(self) -> Size"""
8037 return _core_.Window_GetMaxSize(*args, **kwargs)
8038
8039 def GetMinSize(*args, **kwargs):
8040 """GetMinSize(self) -> Size"""
8041 return _core_.Window_GetMinSize(*args, **kwargs)
8042
8043 def SetMinSize(*args, **kwargs):
8044 """
8045 SetMinSize(self, Size minSize)
8046
8047 A more convenient method than `SetSizeHints` for setting just the
8048 min size.
8049 """
8050 return _core_.Window_SetMinSize(*args, **kwargs)
8051
8052 def SetMaxSize(*args, **kwargs):
8053 """
8054 SetMaxSize(self, Size maxSize)
8055
8056 A more convenient method than `SetSizeHints` for setting just the
8057 max size.
8058 """
8059 return _core_.Window_SetMaxSize(*args, **kwargs)
8060
8061 def GetMinWidth(*args, **kwargs):
8062 """GetMinWidth(self) -> int"""
8063 return _core_.Window_GetMinWidth(*args, **kwargs)
8064
8065 def GetMinHeight(*args, **kwargs):
8066 """GetMinHeight(self) -> int"""
8067 return _core_.Window_GetMinHeight(*args, **kwargs)
8068
8069 def GetMaxWidth(*args, **kwargs):
8070 """GetMaxWidth(self) -> int"""
8071 return _core_.Window_GetMaxWidth(*args, **kwargs)
8072
8073 def GetMaxHeight(*args, **kwargs):
8074 """GetMaxHeight(self) -> int"""
8075 return _core_.Window_GetMaxHeight(*args, **kwargs)
8076
8077 def SetVirtualSize(*args, **kwargs):
8078 """
8079 SetVirtualSize(self, Size size)
8080
8081 Set the the virtual size of a window in pixels. For most windows this
8082 is just the client area of the window, but for some like scrolled
8083 windows it is more or less independent of the screen window size.
8084 """
8085 return _core_.Window_SetVirtualSize(*args, **kwargs)
8086
8087 def SetVirtualSizeWH(*args, **kwargs):
8088 """
8089 SetVirtualSizeWH(self, int w, int h)
8090
8091 Set the the virtual size of a window in pixels. For most windows this
8092 is just the client area of the window, but for some like scrolled
8093 windows it is more or less independent of the screen window size.
8094 """
8095 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
8096
8097 def GetVirtualSize(*args, **kwargs):
8098 """
8099 GetVirtualSize(self) -> Size
8100
8101 Get the the virtual size of the window in pixels. For most windows
8102 this is just the client area of the window, but for some like scrolled
8103 windows it is more or less independent of the screen window size.
8104 """
8105 return _core_.Window_GetVirtualSize(*args, **kwargs)
8106
8107 def GetVirtualSizeTuple(*args, **kwargs):
8108 """
8109 GetVirtualSizeTuple() -> (width, height)
8110
8111 Get the the virtual size of the window in pixels. For most windows
8112 this is just the client area of the window, but for some like scrolled
8113 windows it is more or less independent of the screen window size.
8114 """
8115 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
8116
8117 def GetBestVirtualSize(*args, **kwargs):
8118 """
8119 GetBestVirtualSize(self) -> Size
8120
8121 Return the largest of ClientSize and BestSize (as determined by a
8122 sizer, interior children, or other means)
8123 """
8124 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
8125
8126 def Show(*args, **kwargs):
8127 """
8128 Show(self, bool show=True) -> bool
8129
8130 Shows or hides the window. You may need to call Raise for a top level
8131 window if you want to bring it to top, although this is not needed if
8132 Show is called immediately after the frame creation. Returns True if
8133 the window has been shown or hidden or False if nothing was done
8134 because it already was in the requested state.
8135 """
8136 return _core_.Window_Show(*args, **kwargs)
8137
8138 def Hide(*args, **kwargs):
8139 """
8140 Hide(self) -> bool
8141
8142 Equivalent to calling Show(False).
8143 """
8144 return _core_.Window_Hide(*args, **kwargs)
8145
8146 def Enable(*args, **kwargs):
8147 """
8148 Enable(self, bool enable=True) -> bool
8149
8150 Enable or disable the window for user input. Note that when a parent
8151 window is disabled, all of its children are disabled as well and they
8152 are reenabled again when the parent is. Returns true if the window
8153 has been enabled or disabled, false if nothing was done, i.e. if the
8154 window had already been in the specified state.
8155 """
8156 return _core_.Window_Enable(*args, **kwargs)
8157
8158 def Disable(*args, **kwargs):
8159 """
8160 Disable(self) -> bool
8161
8162 Disables the window, same as Enable(false).
8163 """
8164 return _core_.Window_Disable(*args, **kwargs)
8165
8166 def IsShown(*args, **kwargs):
8167 """
8168 IsShown(self) -> bool
8169
8170 Returns true if the window is shown, false if it has been hidden.
8171 """
8172 return _core_.Window_IsShown(*args, **kwargs)
8173
8174 def IsEnabled(*args, **kwargs):
8175 """
8176 IsEnabled(self) -> bool
8177
8178 Returns true if the window is enabled for input, false otherwise.
8179 """
8180 return _core_.Window_IsEnabled(*args, **kwargs)
8181
8182 def SetWindowStyleFlag(*args, **kwargs):
8183 """
8184 SetWindowStyleFlag(self, long style)
8185
8186 Sets the style of the window. Please note that some styles cannot be
8187 changed after the window creation and that Refresh() might need to be
8188 called after changing the others for the change to take place
8189 immediately.
8190 """
8191 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
8192
8193 def GetWindowStyleFlag(*args, **kwargs):
8194 """
8195 GetWindowStyleFlag(self) -> long
8196
8197 Gets the window style that was passed to the constructor or Create
8198 method.
8199 """
8200 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
8201
8202 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
8203 def HasFlag(*args, **kwargs):
8204 """
8205 HasFlag(self, int flag) -> bool
8206
8207 Test if the given style is set for this window.
8208 """
8209 return _core_.Window_HasFlag(*args, **kwargs)
8210
8211 def IsRetained(*args, **kwargs):
8212 """
8213 IsRetained(self) -> bool
8214
8215 Returns true if the window is retained, false otherwise. Retained
8216 windows are only available on X platforms.
8217 """
8218 return _core_.Window_IsRetained(*args, **kwargs)
8219
8220 def SetExtraStyle(*args, **kwargs):
8221 """
8222 SetExtraStyle(self, long exStyle)
8223
8224 Sets the extra style bits for the window. Extra styles are the less
8225 often used style bits which can't be set with the constructor or with
8226 SetWindowStyleFlag()
8227 """
8228 return _core_.Window_SetExtraStyle(*args, **kwargs)
8229
8230 def GetExtraStyle(*args, **kwargs):
8231 """
8232 GetExtraStyle(self) -> long
8233
8234 Returns the extra style bits for the window.
8235 """
8236 return _core_.Window_GetExtraStyle(*args, **kwargs)
8237
8238 def MakeModal(*args, **kwargs):
8239 """
8240 MakeModal(self, bool modal=True)
8241
8242 Disables all other windows in the application so that the user can
8243 only interact with this window. Passing False will reverse this
8244 effect.
8245 """
8246 return _core_.Window_MakeModal(*args, **kwargs)
8247
8248 def SetThemeEnabled(*args, **kwargs):
8249 """
8250 SetThemeEnabled(self, bool enableTheme)
8251
8252 This function tells a window if it should use the system's "theme"
8253 code to draw the windows' background instead if its own background
8254 drawing code. This will only have an effect on platforms that support
8255 the notion of themes in user defined windows. One such platform is
8256 GTK+ where windows can have (very colourful) backgrounds defined by a
8257 user's selected theme.
8258
8259 Dialogs, notebook pages and the status bar have this flag set to true
8260 by default so that the default look and feel is simulated best.
8261 """
8262 return _core_.Window_SetThemeEnabled(*args, **kwargs)
8263
8264 def GetThemeEnabled(*args, **kwargs):
8265 """
8266 GetThemeEnabled(self) -> bool
8267
8268 Return the themeEnabled flag.
8269 """
8270 return _core_.Window_GetThemeEnabled(*args, **kwargs)
8271
8272 def SetFocus(*args, **kwargs):
8273 """
8274 SetFocus(self)
8275
8276 Set's the focus to this window, allowing it to receive keyboard input.
8277 """
8278 return _core_.Window_SetFocus(*args, **kwargs)
8279
8280 def SetFocusFromKbd(*args, **kwargs):
8281 """
8282 SetFocusFromKbd(self)
8283
8284 Set focus to this window as the result of a keyboard action. Normally
8285 only called internally.
8286 """
8287 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
8288
8289 def FindFocus(*args, **kwargs):
8290 """
8291 FindFocus() -> Window
8292
8293 Returns the window or control that currently has the keyboard focus,
8294 or None.
8295 """
8296 return _core_.Window_FindFocus(*args, **kwargs)
8297
8298 FindFocus = staticmethod(FindFocus)
8299 def AcceptsFocus(*args, **kwargs):
8300 """
8301 AcceptsFocus(self) -> bool
8302
8303 Can this window have focus?
8304 """
8305 return _core_.Window_AcceptsFocus(*args, **kwargs)
8306
8307 def AcceptsFocusFromKeyboard(*args, **kwargs):
8308 """
8309 AcceptsFocusFromKeyboard(self) -> bool
8310
8311 Can this window be given focus by keyboard navigation? if not, the
8312 only way to give it focus (provided it accepts it at all) is to click
8313 it.
8314 """
8315 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
8316
8317 def GetDefaultItem(*args, **kwargs):
8318 """
8319 GetDefaultItem(self) -> Window
8320
8321 Get the default child of this parent, i.e. the one which is activated
8322 by pressing <Enter> such as the OK button on a wx.Dialog.
8323 """
8324 return _core_.Window_GetDefaultItem(*args, **kwargs)
8325
8326 def SetDefaultItem(*args, **kwargs):
8327 """
8328 SetDefaultItem(self, Window child) -> Window
8329
8330 Set this child as default, return the old default.
8331 """
8332 return _core_.Window_SetDefaultItem(*args, **kwargs)
8333
8334 def SetTmpDefaultItem(*args, **kwargs):
8335 """
8336 SetTmpDefaultItem(self, Window win)
8337
8338 Set this child as temporary default
8339 """
8340 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
8341
8342 def Navigate(*args, **kwargs):
8343 """
8344 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
8345
8346 Does keyboard navigation from this window to another, by sending a
8347 `wx.NavigationKeyEvent`.
8348 """
8349 return _core_.Window_Navigate(*args, **kwargs)
8350
8351 def MoveAfterInTabOrder(*args, **kwargs):
8352 """
8353 MoveAfterInTabOrder(self, Window win)
8354
8355 Moves this window in the tab navigation order after the specified
8356 sibling window. This means that when the user presses the TAB key on
8357 that other window, the focus switches to this window.
8358
8359 The default tab order is the same as creation order. This function
8360 and `MoveBeforeInTabOrder` allow to change it after creating all the
8361 windows.
8362
8363 """
8364 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
8365
8366 def MoveBeforeInTabOrder(*args, **kwargs):
8367 """
8368 MoveBeforeInTabOrder(self, Window win)
8369
8370 Same as `MoveAfterInTabOrder` except that it inserts this window just
8371 before win instead of putting it right after it.
8372 """
8373 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
8374
8375 def GetChildren(*args, **kwargs):
8376 """
8377 GetChildren(self) -> PyObject
8378
8379 Returns a list of the window's children. NOTE: Currently this is a
8380 copy of the child window list maintained by the window, so the return
8381 value of this function is only valid as long as the window's children
8382 do not change.
8383 """
8384 return _core_.Window_GetChildren(*args, **kwargs)
8385
8386 def GetParent(*args, **kwargs):
8387 """
8388 GetParent(self) -> Window
8389
8390 Returns the parent window of this window, or None if there isn't one.
8391 """
8392 return _core_.Window_GetParent(*args, **kwargs)
8393
8394 def GetGrandParent(*args, **kwargs):
8395 """
8396 GetGrandParent(self) -> Window
8397
8398 Returns the parent of the parent of this window, or None if there
8399 isn't one.
8400 """
8401 return _core_.Window_GetGrandParent(*args, **kwargs)
8402
8403 def IsTopLevel(*args, **kwargs):
8404 """
8405 IsTopLevel(self) -> bool
8406
8407 Returns true if the given window is a top-level one. Currently all
8408 frames and dialogs are always considered to be top-level windows (even
8409 if they have a parent window).
8410 """
8411 return _core_.Window_IsTopLevel(*args, **kwargs)
8412
8413 def Reparent(*args, **kwargs):
8414 """
8415 Reparent(self, Window newParent) -> bool
8416
8417 Reparents the window, i.e the window will be removed from its current
8418 parent window (e.g. a non-standard toolbar in a wxFrame) and then
8419 re-inserted into another. Available on Windows and GTK. Returns True
8420 if the parent was changed, False otherwise (error or newParent ==
8421 oldParent)
8422 """
8423 return _core_.Window_Reparent(*args, **kwargs)
8424
8425 def AddChild(*args, **kwargs):
8426 """
8427 AddChild(self, Window child)
8428
8429 Adds a child window. This is called automatically by window creation
8430 functions so should not be required by the application programmer.
8431 """
8432 return _core_.Window_AddChild(*args, **kwargs)
8433
8434 def RemoveChild(*args, **kwargs):
8435 """
8436 RemoveChild(self, Window child)
8437
8438 Removes a child window. This is called automatically by window
8439 deletion functions so should not be required by the application
8440 programmer.
8441 """
8442 return _core_.Window_RemoveChild(*args, **kwargs)
8443
8444 def FindWindowById(*args, **kwargs):
8445 """
8446 FindWindowById(self, long winid) -> Window
8447
8448 Find a chld of this window by window ID
8449 """
8450 return _core_.Window_FindWindowById(*args, **kwargs)
8451
8452 def FindWindowByName(*args, **kwargs):
8453 """
8454 FindWindowByName(self, String name) -> Window
8455
8456 Find a child of this window by name
8457 """
8458 return _core_.Window_FindWindowByName(*args, **kwargs)
8459
8460 def GetEventHandler(*args, **kwargs):
8461 """
8462 GetEventHandler(self) -> EvtHandler
8463
8464 Returns the event handler for this window. By default, the window is
8465 its own event handler.
8466 """
8467 return _core_.Window_GetEventHandler(*args, **kwargs)
8468
8469 def SetEventHandler(*args, **kwargs):
8470 """
8471 SetEventHandler(self, EvtHandler handler)
8472
8473 Sets the event handler for this window. An event handler is an object
8474 that is capable of processing the events sent to a window. By default,
8475 the window is its own event handler, but an application may wish to
8476 substitute another, for example to allow central implementation of
8477 event-handling for a variety of different window classes.
8478
8479 It is usually better to use `wx.Window.PushEventHandler` since this sets
8480 up a chain of event handlers, where an event not handled by one event
8481 handler is handed to the next one in the chain.
8482 """
8483 return _core_.Window_SetEventHandler(*args, **kwargs)
8484
8485 def PushEventHandler(*args, **kwargs):
8486 """
8487 PushEventHandler(self, EvtHandler handler)
8488
8489 Pushes this event handler onto the event handler stack for the window.
8490 An event handler is an object that is capable of processing the events
8491 sent to a window. By default, the window is its own event handler, but
8492 an application may wish to substitute another, for example to allow
8493 central implementation of event-handling for a variety of different
8494 window classes.
8495
8496 wx.Window.PushEventHandler allows an application to set up a chain of
8497 event handlers, where an event not handled by one event handler is
8498 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
8499 remove the event handler.
8500 """
8501 return _core_.Window_PushEventHandler(*args, **kwargs)
8502
8503 def PopEventHandler(*args, **kwargs):
8504 """
8505 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
8506
8507 Removes and returns the top-most event handler on the event handler
8508 stack. If deleteHandler is True then the wx.EvtHandler object will be
8509 destroyed after it is popped.
8510 """
8511 return _core_.Window_PopEventHandler(*args, **kwargs)
8512
8513 def RemoveEventHandler(*args, **kwargs):
8514 """
8515 RemoveEventHandler(self, EvtHandler handler) -> bool
8516
8517 Find the given handler in the event handler chain and remove (but not
8518 delete) it from the event handler chain, return True if it was found
8519 and False otherwise (this also results in an assert failure so this
8520 function should only be called when the handler is supposed to be
8521 there.)
8522 """
8523 return _core_.Window_RemoveEventHandler(*args, **kwargs)
8524
8525 def SetValidator(*args, **kwargs):
8526 """
8527 SetValidator(self, Validator validator)
8528
8529 Deletes the current validator (if any) and sets the window validator,
8530 having called wx.Validator.Clone to create a new validator of this
8531 type.
8532 """
8533 return _core_.Window_SetValidator(*args, **kwargs)
8534
8535 def GetValidator(*args, **kwargs):
8536 """
8537 GetValidator(self) -> Validator
8538
8539 Returns a pointer to the current validator for the window, or None if
8540 there is none.
8541 """
8542 return _core_.Window_GetValidator(*args, **kwargs)
8543
8544 def Validate(*args, **kwargs):
8545 """
8546 Validate(self) -> bool
8547
8548 Validates the current values of the child controls using their
8549 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
8550 style flag set, the method will also call Validate() of all child
8551 windows. Returns false if any of the validations failed.
8552 """
8553 return _core_.Window_Validate(*args, **kwargs)
8554
8555 def TransferDataToWindow(*args, **kwargs):
8556 """
8557 TransferDataToWindow(self) -> bool
8558
8559 Transfers values to child controls from data areas specified by their
8560 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
8561 style flag set, the method will also call TransferDataToWindow() of
8562 all child windows.
8563 """
8564 return _core_.Window_TransferDataToWindow(*args, **kwargs)
8565
8566 def TransferDataFromWindow(*args, **kwargs):
8567 """
8568 TransferDataFromWindow(self) -> bool
8569
8570 Transfers values from child controls to data areas specified by their
8571 validators. Returns false if a transfer failed. If the window has
8572 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
8573 also call TransferDataFromWindow() of all child windows.
8574 """
8575 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
8576
8577 def InitDialog(*args, **kwargs):
8578 """
8579 InitDialog(self)
8580
8581 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
8582 to the dialog via validators.
8583 """
8584 return _core_.Window_InitDialog(*args, **kwargs)
8585
8586 def SetAcceleratorTable(*args, **kwargs):
8587 """
8588 SetAcceleratorTable(self, AcceleratorTable accel)
8589
8590 Sets the accelerator table for this window.
8591 """
8592 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
8593
8594 def GetAcceleratorTable(*args, **kwargs):
8595 """
8596 GetAcceleratorTable(self) -> AcceleratorTable
8597
8598 Gets the accelerator table for this window.
8599 """
8600 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
8601
8602 def RegisterHotKey(*args, **kwargs):
8603 """
8604 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
8605
8606 Registers a system wide hotkey. Every time the user presses the hotkey
8607 registered here, this window will receive a hotkey event. It will
8608 receive the event even if the application is in the background and
8609 does not have the input focus because the user is working with some
8610 other application. To bind an event handler function to this hotkey
8611 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
8612 hotkey was registered successfully.
8613 """
8614 return _core_.Window_RegisterHotKey(*args, **kwargs)
8615
8616 def UnregisterHotKey(*args, **kwargs):
8617 """
8618 UnregisterHotKey(self, int hotkeyId) -> bool
8619
8620 Unregisters a system wide hotkey.
8621 """
8622 return _core_.Window_UnregisterHotKey(*args, **kwargs)
8623
8624 def ConvertDialogPointToPixels(*args, **kwargs):
8625 """
8626 ConvertDialogPointToPixels(self, Point pt) -> Point
8627
8628 Converts a point or size from dialog units to pixels. Dialog units
8629 are used for maintaining a dialog's proportions even if the font
8630 changes. For the x dimension, the dialog units are multiplied by the
8631 average character width and then divided by 4. For the y dimension,
8632 the dialog units are multiplied by the average character height and
8633 then divided by 8.
8634 """
8635 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
8636
8637 def ConvertDialogSizeToPixels(*args, **kwargs):
8638 """
8639 ConvertDialogSizeToPixels(self, Size sz) -> Size
8640
8641 Converts a point or size from dialog units to pixels. Dialog units
8642 are used for maintaining a dialog's proportions even if the font
8643 changes. For the x dimension, the dialog units are multiplied by the
8644 average character width and then divided by 4. For the y dimension,
8645 the dialog units are multiplied by the average character height and
8646 then divided by 8.
8647 """
8648 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
8649
8650 def DLG_PNT(*args, **kwargs):
8651 """
8652 DLG_PNT(self, Point pt) -> Point
8653
8654 Converts a point or size from dialog units to pixels. Dialog units
8655 are used for maintaining a dialog's proportions even if the font
8656 changes. For the x dimension, the dialog units are multiplied by the
8657 average character width and then divided by 4. For the y dimension,
8658 the dialog units are multiplied by the average character height and
8659 then divided by 8.
8660 """
8661 return _core_.Window_DLG_PNT(*args, **kwargs)
8662
8663 def DLG_SZE(*args, **kwargs):
8664 """
8665 DLG_SZE(self, Size sz) -> Size
8666
8667 Converts a point or size from dialog units to pixels. Dialog units
8668 are used for maintaining a dialog's proportions even if the font
8669 changes. For the x dimension, the dialog units are multiplied by the
8670 average character width and then divided by 4. For the y dimension,
8671 the dialog units are multiplied by the average character height and
8672 then divided by 8.
8673 """
8674 return _core_.Window_DLG_SZE(*args, **kwargs)
8675
8676 def ConvertPixelPointToDialog(*args, **kwargs):
8677 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
8678 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
8679
8680 def ConvertPixelSizeToDialog(*args, **kwargs):
8681 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
8682 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
8683
8684 def WarpPointer(*args, **kwargs):
8685 """
8686 WarpPointer(self, int x, int y)
8687
8688 Moves the pointer to the given position on the window.
8689
8690 NOTE: This function is not supported under Mac because Apple Human
8691 Interface Guidelines forbid moving the mouse cursor programmatically.
8692 """
8693 return _core_.Window_WarpPointer(*args, **kwargs)
8694
8695 def CaptureMouse(*args, **kwargs):
8696 """
8697 CaptureMouse(self)
8698
8699 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
8700 release the capture.
8701
8702 Note that wxWindows maintains the stack of windows having captured the
8703 mouse and when the mouse is released the capture returns to the window
8704 which had had captured it previously and it is only really released if
8705 there were no previous window. In particular, this means that you must
8706 release the mouse as many times as you capture it.
8707 """
8708 return _core_.Window_CaptureMouse(*args, **kwargs)
8709
8710 def ReleaseMouse(*args, **kwargs):
8711 """
8712 ReleaseMouse(self)
8713
8714 Releases mouse input captured with wx.Window.CaptureMouse.
8715 """
8716 return _core_.Window_ReleaseMouse(*args, **kwargs)
8717
8718 def GetCapture(*args, **kwargs):
8719 """
8720 GetCapture() -> Window
8721
8722 Returns the window which currently captures the mouse or None
8723 """
8724 return _core_.Window_GetCapture(*args, **kwargs)
8725
8726 GetCapture = staticmethod(GetCapture)
8727 def HasCapture(*args, **kwargs):
8728 """
8729 HasCapture(self) -> bool
8730
8731 Returns true if this window has the current mouse capture.
8732 """
8733 return _core_.Window_HasCapture(*args, **kwargs)
8734
8735 def Refresh(*args, **kwargs):
8736 """
8737 Refresh(self, bool eraseBackground=True, Rect rect=None)
8738
8739 Mark the specified rectangle (or the whole window) as "dirty" so it
8740 will be repainted. Causes an EVT_PAINT event to be generated and sent
8741 to the window.
8742 """
8743 return _core_.Window_Refresh(*args, **kwargs)
8744
8745 def RefreshRect(*args, **kwargs):
8746 """
8747 RefreshRect(self, Rect rect, bool eraseBackground=True)
8748
8749 Redraws the contents of the given rectangle: the area inside it will
8750 be repainted. This is the same as Refresh but has a nicer syntax.
8751 """
8752 return _core_.Window_RefreshRect(*args, **kwargs)
8753
8754 def Update(*args, **kwargs):
8755 """
8756 Update(self)
8757
8758 Calling this method immediately repaints the invalidated area of the
8759 window instead of waiting for the EVT_PAINT event to happen, (normally
8760 this would usually only happen when the flow of control returns to the
8761 event loop.) Notice that this function doesn't refresh the window and
8762 does nothing if the window has been already repainted. Use Refresh
8763 first if you want to immediately redraw the window (or some portion of
8764 it) unconditionally.
8765 """
8766 return _core_.Window_Update(*args, **kwargs)
8767
8768 def ClearBackground(*args, **kwargs):
8769 """
8770 ClearBackground(self)
8771
8772 Clears the window by filling it with the current background
8773 colour. Does not cause an erase background event to be generated.
8774 """
8775 return _core_.Window_ClearBackground(*args, **kwargs)
8776
8777 def Freeze(*args, **kwargs):
8778 """
8779 Freeze(self)
8780
8781 Freezes the window or, in other words, prevents any updates from
8782 taking place on screen, the window is not redrawn at all. Thaw must be
8783 called to reenable window redrawing. Calls to Freeze/Thaw may be
8784 nested, with the actual Thaw being delayed until all the nesting has
8785 been undone.
8786
8787 This method is useful for visual appearance optimization (for example,
8788 it is a good idea to use it before inserting large amount of text into
8789 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
8790 for all controls so it is mostly just a hint to wxWindows and not a
8791 mandatory directive.
8792 """
8793 return _core_.Window_Freeze(*args, **kwargs)
8794
8795 def Thaw(*args, **kwargs):
8796 """
8797 Thaw(self)
8798
8799 Reenables window updating after a previous call to Freeze. Calls to
8800 Freeze/Thaw may be nested, so Thaw must be called the same number of
8801 times that Freeze was before the window will be updated.
8802 """
8803 return _core_.Window_Thaw(*args, **kwargs)
8804
8805 def PrepareDC(*args, **kwargs):
8806 """
8807 PrepareDC(self, DC dc)
8808
8809 Call this function to prepare the device context for drawing a
8810 scrolled image. It sets the device origin according to the current
8811 scroll position.
8812 """
8813 return _core_.Window_PrepareDC(*args, **kwargs)
8814
8815 def GetUpdateRegion(*args, **kwargs):
8816 """
8817 GetUpdateRegion(self) -> Region
8818
8819 Returns the region specifying which parts of the window have been
8820 damaged. Should only be called within an EVT_PAINT handler.
8821 """
8822 return _core_.Window_GetUpdateRegion(*args, **kwargs)
8823
8824 def GetUpdateClientRect(*args, **kwargs):
8825 """
8826 GetUpdateClientRect(self) -> Rect
8827
8828 Get the update rectangle region bounding box in client coords.
8829 """
8830 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
8831
8832 def IsExposed(*args, **kwargs):
8833 """
8834 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
8835
8836 Returns true if the given point or rectangle area has been exposed
8837 since the last repaint. Call this in an paint event handler to
8838 optimize redrawing by only redrawing those areas, which have been
8839 exposed.
8840 """
8841 return _core_.Window_IsExposed(*args, **kwargs)
8842
8843 def IsExposedPoint(*args, **kwargs):
8844 """
8845 IsExposedPoint(self, Point pt) -> bool
8846
8847 Returns true if the given point or rectangle area has been exposed
8848 since the last repaint. Call this in an paint event handler to
8849 optimize redrawing by only redrawing those areas, which have been
8850 exposed.
8851 """
8852 return _core_.Window_IsExposedPoint(*args, **kwargs)
8853
8854 def IsExposedRect(*args, **kwargs):
8855 """
8856 IsExposedRect(self, Rect rect) -> bool
8857
8858 Returns true if the given point or rectangle area has been exposed
8859 since the last repaint. Call this in an paint event handler to
8860 optimize redrawing by only redrawing those areas, which have been
8861 exposed.
8862 """
8863 return _core_.Window_IsExposedRect(*args, **kwargs)
8864
8865 def GetDefaultAttributes(*args, **kwargs):
8866 """
8867 GetDefaultAttributes(self) -> VisualAttributes
8868
8869 Get the default attributes for an instance of this class. This is
8870 useful if you want to use the same font or colour in your own control
8871 as in a standard control -- which is a much better idea than hard
8872 coding specific colours or fonts which might look completely out of
8873 place on the user's system, especially if it uses themes.
8874 """
8875 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
8876
8877 def GetClassDefaultAttributes(*args, **kwargs):
8878 """
8879 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8880
8881 Get the default attributes for this class. This is useful if you want
8882 to use the same font or colour in your own control as in a standard
8883 control -- which is a much better idea than hard coding specific
8884 colours or fonts which might look completely out of place on the
8885 user's system, especially if it uses themes.
8886
8887 The variant parameter is only relevant under Mac currently and is
8888 ignore under other platforms. Under Mac, it will change the size of
8889 the returned font. See `wx.Window.SetWindowVariant` for more about
8890 this.
8891 """
8892 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
8893
8894 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8895 def SetBackgroundColour(*args, **kwargs):
8896 """
8897 SetBackgroundColour(self, Colour colour) -> bool
8898
8899 Sets the background colour of the window. Returns True if the colour
8900 was changed. The background colour is usually painted by the default
8901 EVT_ERASE_BACKGROUND event handler function under Windows and
8902 automatically under GTK. Using `wx.NullColour` will reset the window
8903 to the default background colour.
8904
8905 Note that setting the background colour may not cause an immediate
8906 refresh, so you may wish to call `ClearBackground` or `Refresh` after
8907 calling this function.
8908
8909 Using this function will disable attempts to use themes for this
8910 window, if the system supports them. Use with care since usually the
8911 themes represent the appearance chosen by the user to be used for all
8912 applications on the system.
8913 """
8914 return _core_.Window_SetBackgroundColour(*args, **kwargs)
8915
8916 def SetOwnBackgroundColour(*args, **kwargs):
8917 """SetOwnBackgroundColour(self, Colour colour)"""
8918 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
8919
8920 def SetForegroundColour(*args, **kwargs):
8921 """
8922 SetForegroundColour(self, Colour colour) -> bool
8923
8924 Sets the foreground colour of the window. Returns True is the colour
8925 was changed. The interpretation of foreground colour is dependent on
8926 the window class; it may be the text colour or other colour, or it may
8927 not be used at all.
8928 """
8929 return _core_.Window_SetForegroundColour(*args, **kwargs)
8930
8931 def SetOwnForegroundColour(*args, **kwargs):
8932 """SetOwnForegroundColour(self, Colour colour)"""
8933 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
8934
8935 def GetBackgroundColour(*args, **kwargs):
8936 """
8937 GetBackgroundColour(self) -> Colour
8938
8939 Returns the background colour of the window.
8940 """
8941 return _core_.Window_GetBackgroundColour(*args, **kwargs)
8942
8943 def GetForegroundColour(*args, **kwargs):
8944 """
8945 GetForegroundColour(self) -> Colour
8946
8947 Returns the foreground colour of the window. The interpretation of
8948 foreground colour is dependent on the window class; it may be the text
8949 colour or other colour, or it may not be used at all.
8950 """
8951 return _core_.Window_GetForegroundColour(*args, **kwargs)
8952
8953 def InheritsBackgroundColour(*args, **kwargs):
8954 """InheritsBackgroundColour(self) -> bool"""
8955 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
8956
8957 def UseBgCol(*args, **kwargs):
8958 """UseBgCol(self) -> bool"""
8959 return _core_.Window_UseBgCol(*args, **kwargs)
8960
8961 def SetBackgroundStyle(*args, **kwargs):
8962 """
8963 SetBackgroundStyle(self, int style) -> bool
8964
8965 Returns the background style of the window. The background style
8966 indicates how the background of the window is drawn.
8967
8968 ====================== ========================================
8969 wx.BG_STYLE_SYSTEM The background colour or pattern should
8970 be determined by the system
8971 wx.BG_STYLE_COLOUR The background should be a solid colour
8972 wx.BG_STYLE_CUSTOM The background will be implemented by the
8973 application.
8974 ====================== ========================================
8975
8976 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
8977 a custom background, such as a tiled bitmap. Currently the style has
8978 no effect on other platforms.
8979
8980 :see: `GetBackgroundStyle`, `SetBackgroundColour`
8981 """
8982 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
8983
8984 def GetBackgroundStyle(*args, **kwargs):
8985 """
8986 GetBackgroundStyle(self) -> int
8987
8988 Returns the background style of the window.
8989
8990 :see: `SetBackgroundStyle`
8991 """
8992 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
8993
8994 def HasTransparentBackground(*args, **kwargs):
8995 """
8996 HasTransparentBackground(self) -> bool
8997
8998 Returns True if this window's background is transparent (as, for
8999 example, for `wx.StaticText`) and should show the parent window's
9000 background.
9001
9002 This method is mostly used internally by the library itself and you
9003 normally shouldn't have to call it. You may, however, have to override
9004 it in your custom control classes to ensure that background is painted
9005 correctly.
9006 """
9007 return _core_.Window_HasTransparentBackground(*args, **kwargs)
9008
9009 def SetCursor(*args, **kwargs):
9010 """
9011 SetCursor(self, Cursor cursor) -> bool
9012
9013 Sets the window's cursor. Notice that the window cursor also sets it
9014 for the children of the window implicitly.
9015
9016 The cursor may be wx.NullCursor in which case the window cursor will
9017 be reset back to default.
9018 """
9019 return _core_.Window_SetCursor(*args, **kwargs)
9020
9021 def GetCursor(*args, **kwargs):
9022 """
9023 GetCursor(self) -> Cursor
9024
9025 Return the cursor associated with this window.
9026 """
9027 return _core_.Window_GetCursor(*args, **kwargs)
9028
9029 def SetFont(*args, **kwargs):
9030 """
9031 SetFont(self, Font font) -> bool
9032
9033 Sets the font for this window.
9034 """
9035 return _core_.Window_SetFont(*args, **kwargs)
9036
9037 def SetOwnFont(*args, **kwargs):
9038 """SetOwnFont(self, Font font)"""
9039 return _core_.Window_SetOwnFont(*args, **kwargs)
9040
9041 def GetFont(*args, **kwargs):
9042 """
9043 GetFont(self) -> Font
9044
9045 Returns the default font used for this window.
9046 """
9047 return _core_.Window_GetFont(*args, **kwargs)
9048
9049 def SetCaret(*args, **kwargs):
9050 """
9051 SetCaret(self, Caret caret)
9052
9053 Sets the caret associated with the window.
9054 """
9055 return _core_.Window_SetCaret(*args, **kwargs)
9056
9057 def GetCaret(*args, **kwargs):
9058 """
9059 GetCaret(self) -> Caret
9060
9061 Returns the caret associated with the window.
9062 """
9063 return _core_.Window_GetCaret(*args, **kwargs)
9064
9065 def GetCharHeight(*args, **kwargs):
9066 """
9067 GetCharHeight(self) -> int
9068
9069 Get the (average) character size for the current font.
9070 """
9071 return _core_.Window_GetCharHeight(*args, **kwargs)
9072
9073 def GetCharWidth(*args, **kwargs):
9074 """
9075 GetCharWidth(self) -> int
9076
9077 Get the (average) character size for the current font.
9078 """
9079 return _core_.Window_GetCharWidth(*args, **kwargs)
9080
9081 def GetTextExtent(*args, **kwargs):
9082 """
9083 GetTextExtent(String string) -> (width, height)
9084
9085 Get the width and height of the text using the current font.
9086 """
9087 return _core_.Window_GetTextExtent(*args, **kwargs)
9088
9089 def GetFullTextExtent(*args, **kwargs):
9090 """
9091 GetFullTextExtent(String string, Font font=None) ->
9092 (width, height, descent, externalLeading)
9093
9094 Get the width, height, decent and leading of the text using the
9095 current or specified font.
9096 """
9097 return _core_.Window_GetFullTextExtent(*args, **kwargs)
9098
9099 def ClientToScreenXY(*args, **kwargs):
9100 """
9101 ClientToScreenXY(int x, int y) -> (x,y)
9102
9103 Converts to screen coordinates from coordinates relative to this window.
9104 """
9105 return _core_.Window_ClientToScreenXY(*args, **kwargs)
9106
9107 def ScreenToClientXY(*args, **kwargs):
9108 """
9109 ScreenToClientXY(int x, int y) -> (x,y)
9110
9111 Converts from screen to client window coordinates.
9112 """
9113 return _core_.Window_ScreenToClientXY(*args, **kwargs)
9114
9115 def ClientToScreen(*args, **kwargs):
9116 """
9117 ClientToScreen(self, Point pt) -> Point
9118
9119 Converts to screen coordinates from coordinates relative to this window.
9120 """
9121 return _core_.Window_ClientToScreen(*args, **kwargs)
9122
9123 def ScreenToClient(*args, **kwargs):
9124 """
9125 ScreenToClient(self, Point pt) -> Point
9126
9127 Converts from screen to client window coordinates.
9128 """
9129 return _core_.Window_ScreenToClient(*args, **kwargs)
9130
9131 def HitTestXY(*args, **kwargs):
9132 """
9133 HitTestXY(self, int x, int y) -> int
9134
9135 Test where the given (in client coords) point lies
9136 """
9137 return _core_.Window_HitTestXY(*args, **kwargs)
9138
9139 def HitTest(*args, **kwargs):
9140 """
9141 HitTest(self, Point pt) -> int
9142
9143 Test where the given (in client coords) point lies
9144 """
9145 return _core_.Window_HitTest(*args, **kwargs)
9146
9147 def GetBorder(*args):
9148 """
9149 GetBorder(self, long flags) -> int
9150 GetBorder(self) -> int
9151
9152 Get border for the flags of this window
9153 """
9154 return _core_.Window_GetBorder(*args)
9155
9156 def UpdateWindowUI(*args, **kwargs):
9157 """
9158 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
9159
9160 This function sends EVT_UPDATE_UI events to the window. The particular
9161 implementation depends on the window; for example a wx.ToolBar will
9162 send an update UI event for each toolbar button, and a wx.Frame will
9163 send an update UI event for each menubar menu item. You can call this
9164 function from your application to ensure that your UI is up-to-date at
9165 a particular point in time (as far as your EVT_UPDATE_UI handlers are
9166 concerned). This may be necessary if you have called
9167 `wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
9168 limit the overhead that wxWindows incurs by sending update UI events
9169 in idle time.
9170 """
9171 return _core_.Window_UpdateWindowUI(*args, **kwargs)
9172
9173 def PopupMenuXY(*args, **kwargs):
9174 """
9175 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
9176
9177 Pops up the given menu at the specified coordinates, relative to this window,
9178 and returns control when the user has dismissed the menu. If a menu item is
9179 selected, the corresponding menu event is generated and will be processed as
9180 usual. If the default position is given then the current position of the
9181 mouse cursor will be used.
9182 """
9183 return _core_.Window_PopupMenuXY(*args, **kwargs)
9184
9185 def PopupMenu(*args, **kwargs):
9186 """
9187 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
9188
9189 Pops up the given menu at the specified coordinates, relative to this window,
9190 and returns control when the user has dismissed the menu. If a menu item is
9191 selected, the corresponding menu event is generated and will be processed as
9192 usual. If the default position is given then the current position of the
9193 mouse cursor will be used.
9194 """
9195 return _core_.Window_PopupMenu(*args, **kwargs)
9196
9197 def GetHandle(*args, **kwargs):
9198 """
9199 GetHandle(self) -> long
9200
9201 Returns the platform-specific handle (as a long integer) of the
9202 physical window. Currently on wxMac it returns the handle of the
9203 toplevel parent of the window.
9204 """
9205 return _core_.Window_GetHandle(*args, **kwargs)
9206
9207 def AssociateHandle(*args, **kwargs):
9208 """
9209 AssociateHandle(self, long handle)
9210
9211 Associate the window with a new native handle
9212 """
9213 return _core_.Window_AssociateHandle(*args, **kwargs)
9214
9215 def DissociateHandle(*args, **kwargs):
9216 """
9217 DissociateHandle(self)
9218
9219 Dissociate the current native handle from the window
9220 """
9221 return _core_.Window_DissociateHandle(*args, **kwargs)
9222
9223 def HasScrollbar(*args, **kwargs):
9224 """
9225 HasScrollbar(self, int orient) -> bool
9226
9227 Does the window have the scrollbar for this orientation?
9228 """
9229 return _core_.Window_HasScrollbar(*args, **kwargs)
9230
9231 def SetScrollbar(*args, **kwargs):
9232 """
9233 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
9234 bool refresh=True)
9235
9236 Sets the scrollbar properties of a built-in scrollbar.
9237 """
9238 return _core_.Window_SetScrollbar(*args, **kwargs)
9239
9240 def SetScrollPos(*args, **kwargs):
9241 """
9242 SetScrollPos(self, int orientation, int pos, bool refresh=True)
9243
9244 Sets the position of one of the built-in scrollbars.
9245 """
9246 return _core_.Window_SetScrollPos(*args, **kwargs)
9247
9248 def GetScrollPos(*args, **kwargs):
9249 """
9250 GetScrollPos(self, int orientation) -> int
9251
9252 Returns the built-in scrollbar position.
9253 """
9254 return _core_.Window_GetScrollPos(*args, **kwargs)
9255
9256 def GetScrollThumb(*args, **kwargs):
9257 """
9258 GetScrollThumb(self, int orientation) -> int
9259
9260 Returns the built-in scrollbar thumb size.
9261 """
9262 return _core_.Window_GetScrollThumb(*args, **kwargs)
9263
9264 def GetScrollRange(*args, **kwargs):
9265 """
9266 GetScrollRange(self, int orientation) -> int
9267
9268 Returns the built-in scrollbar range.
9269 """
9270 return _core_.Window_GetScrollRange(*args, **kwargs)
9271
9272 def ScrollWindow(*args, **kwargs):
9273 """
9274 ScrollWindow(self, int dx, int dy, Rect rect=None)
9275
9276 Physically scrolls the pixels in the window and move child windows
9277 accordingly. Use this function to optimise your scrolling
9278 implementations, to minimise the area that must be redrawn. Note that
9279 it is rarely required to call this function from a user program.
9280 """
9281 return _core_.Window_ScrollWindow(*args, **kwargs)
9282
9283 def ScrollLines(*args, **kwargs):
9284 """
9285 ScrollLines(self, int lines) -> bool
9286
9287 If the platform and window class supports it, scrolls the window by
9288 the given number of lines down, if lines is positive, or up if lines
9289 is negative. Returns True if the window was scrolled, False if it was
9290 already on top/bottom and nothing was done.
9291 """
9292 return _core_.Window_ScrollLines(*args, **kwargs)
9293
9294 def ScrollPages(*args, **kwargs):
9295 """
9296 ScrollPages(self, int pages) -> bool
9297
9298 If the platform and window class supports it, scrolls the window by
9299 the given number of pages down, if pages is positive, or up if pages
9300 is negative. Returns True if the window was scrolled, False if it was
9301 already on top/bottom and nothing was done.
9302 """
9303 return _core_.Window_ScrollPages(*args, **kwargs)
9304
9305 def LineUp(*args, **kwargs):
9306 """
9307 LineUp(self) -> bool
9308
9309 This is just a wrapper for ScrollLines(-1).
9310 """
9311 return _core_.Window_LineUp(*args, **kwargs)
9312
9313 def LineDown(*args, **kwargs):
9314 """
9315 LineDown(self) -> bool
9316
9317 This is just a wrapper for ScrollLines(1).
9318 """
9319 return _core_.Window_LineDown(*args, **kwargs)
9320
9321 def PageUp(*args, **kwargs):
9322 """
9323 PageUp(self) -> bool
9324
9325 This is just a wrapper for ScrollPages(-1).
9326 """
9327 return _core_.Window_PageUp(*args, **kwargs)
9328
9329 def PageDown(*args, **kwargs):
9330 """
9331 PageDown(self) -> bool
9332
9333 This is just a wrapper for ScrollPages(1).
9334 """
9335 return _core_.Window_PageDown(*args, **kwargs)
9336
9337 def SetHelpText(*args, **kwargs):
9338 """
9339 SetHelpText(self, String text)
9340
9341 Sets the help text to be used as context-sensitive help for this
9342 window. Note that the text is actually stored by the current
9343 `wx.HelpProvider` implementation, and not in the window object itself.
9344 """
9345 return _core_.Window_SetHelpText(*args, **kwargs)
9346
9347 def SetHelpTextForId(*args, **kwargs):
9348 """
9349 SetHelpTextForId(self, String text)
9350
9351 Associate this help text with all windows with the same id as this
9352 one.
9353 """
9354 return _core_.Window_SetHelpTextForId(*args, **kwargs)
9355
9356 def GetHelpText(*args, **kwargs):
9357 """
9358 GetHelpText(self) -> String
9359
9360 Gets the help text to be used as context-sensitive help for this
9361 window. Note that the text is actually stored by the current
9362 `wx.HelpProvider` implementation, and not in the window object itself.
9363 """
9364 return _core_.Window_GetHelpText(*args, **kwargs)
9365
9366 def SetToolTipString(*args, **kwargs):
9367 """
9368 SetToolTipString(self, String tip)
9369
9370 Attach a tooltip to the window.
9371 """
9372 return _core_.Window_SetToolTipString(*args, **kwargs)
9373
9374 def SetToolTip(*args, **kwargs):
9375 """
9376 SetToolTip(self, ToolTip tip)
9377
9378 Attach a tooltip to the window.
9379 """
9380 return _core_.Window_SetToolTip(*args, **kwargs)
9381
9382 def GetToolTip(*args, **kwargs):
9383 """
9384 GetToolTip(self) -> ToolTip
9385
9386 get the associated tooltip or None if none
9387 """
9388 return _core_.Window_GetToolTip(*args, **kwargs)
9389
9390 def SetDropTarget(*args, **kwargs):
9391 """
9392 SetDropTarget(self, DropTarget dropTarget)
9393
9394 Associates a drop target with this window. If the window already has
9395 a drop target, it is deleted.
9396 """
9397 return _core_.Window_SetDropTarget(*args, **kwargs)
9398
9399 def GetDropTarget(*args, **kwargs):
9400 """
9401 GetDropTarget(self) -> DropTarget
9402
9403 Returns the associated drop target, which may be None.
9404 """
9405 return _core_.Window_GetDropTarget(*args, **kwargs)
9406
9407 def DragAcceptFiles(*args, **kwargs):
9408 """
9409 DragAcceptFiles(self, bool accept)
9410
9411 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
9412 Only functional on Windows.
9413 """
9414 return _core_.Window_DragAcceptFiles(*args, **kwargs)
9415
9416 def SetConstraints(*args, **kwargs):
9417 """
9418 SetConstraints(self, LayoutConstraints constraints)
9419
9420 Sets the window to have the given layout constraints. If an existing
9421 layout constraints object is already owned by the window, it will be
9422 deleted. Pass None to disassociate and delete the window's current
9423 constraints.
9424
9425 You must call SetAutoLayout to tell a window to use the constraints
9426 automatically in its default EVT_SIZE handler; otherwise, you must
9427 handle EVT_SIZE yourself and call Layout() explicitly. When setting
9428 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
9429 effect.
9430 """
9431 return _core_.Window_SetConstraints(*args, **kwargs)
9432
9433 def GetConstraints(*args, **kwargs):
9434 """
9435 GetConstraints(self) -> LayoutConstraints
9436
9437 Returns a pointer to the window's layout constraints, or None if there
9438 are none.
9439 """
9440 return _core_.Window_GetConstraints(*args, **kwargs)
9441
9442 def SetAutoLayout(*args, **kwargs):
9443 """
9444 SetAutoLayout(self, bool autoLayout)
9445
9446 Determines whether the Layout function will be called automatically
9447 when the window is resized. lease note that this only happens for the
9448 windows usually used to contain children, namely `wx.Panel` and
9449 `wx.TopLevelWindow` (and the classes deriving from them).
9450
9451 This method is called implicitly by `SetSizer` but if you use
9452 `SetConstraints` you should call it manually or otherwise the window
9453 layout won't be correctly updated when its size changes.
9454 """
9455 return _core_.Window_SetAutoLayout(*args, **kwargs)
9456
9457 def GetAutoLayout(*args, **kwargs):
9458 """
9459 GetAutoLayout(self) -> bool
9460
9461 Returns the current autoLayout setting
9462 """
9463 return _core_.Window_GetAutoLayout(*args, **kwargs)
9464
9465 def Layout(*args, **kwargs):
9466 """
9467 Layout(self) -> bool
9468
9469 Invokes the constraint-based layout algorithm or the sizer-based
9470 algorithm for this window. See SetAutoLayout: when auto layout is on,
9471 this function gets called automatically by the default EVT_SIZE
9472 handler when the window is resized.
9473 """
9474 return _core_.Window_Layout(*args, **kwargs)
9475
9476 def SetSizer(*args, **kwargs):
9477 """
9478 SetSizer(self, Sizer sizer, bool deleteOld=True)
9479
9480 Sets the window to have the given layout sizer. The window will then
9481 own the object, and will take care of its deletion. If an existing
9482 layout sizer object is already owned by the window, it will be deleted
9483 if the deleteOld parameter is true. Note that this function will also
9484 call SetAutoLayout implicitly with a True parameter if the sizer is
9485 non-None, and False otherwise.
9486 """
9487 return _core_.Window_SetSizer(*args, **kwargs)
9488
9489 def SetSizerAndFit(*args, **kwargs):
9490 """
9491 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
9492
9493 The same as SetSizer, except it also sets the size hints for the
9494 window based on the sizer's minimum size.
9495 """
9496 return _core_.Window_SetSizerAndFit(*args, **kwargs)
9497
9498 def GetSizer(*args, **kwargs):
9499 """
9500 GetSizer(self) -> Sizer
9501
9502 Return the sizer associated with the window by a previous call to
9503 SetSizer or None if there isn't one.
9504 """
9505 return _core_.Window_GetSizer(*args, **kwargs)
9506
9507 def SetContainingSizer(*args, **kwargs):
9508 """
9509 SetContainingSizer(self, Sizer sizer)
9510
9511 This normally does not need to be called by application code. It is
9512 called internally when a window is added to a sizer, and is used so
9513 the window can remove itself from the sizer when it is destroyed.
9514 """
9515 return _core_.Window_SetContainingSizer(*args, **kwargs)
9516
9517 def GetContainingSizer(*args, **kwargs):
9518 """
9519 GetContainingSizer(self) -> Sizer
9520
9521 Return the sizer that this window is a member of, if any, otherwise None.
9522 """
9523 return _core_.Window_GetContainingSizer(*args, **kwargs)
9524
9525 def InheritAttributes(*args, **kwargs):
9526 """
9527 InheritAttributes(self)
9528
9529 This function is (or should be, in case of custom controls) called
9530 during window creation to intelligently set up the window visual
9531 attributes, that is the font and the foreground and background
9532 colours.
9533
9534 By 'intelligently' the following is meant: by default, all windows use
9535 their own default attributes. However if some of the parent's
9536 attributes are explicitly changed (that is, using SetFont and not
9537 SetOwnFont) and if the corresponding attribute hadn't been
9538 explicitly set for this window itself, then this window takes the same
9539 value as used by the parent. In addition, if the window overrides
9540 ShouldInheritColours to return false, the colours will not be changed
9541 no matter what and only the font might.
9542
9543 This rather complicated logic is necessary in order to accommodate the
9544 different usage scenarios. The most common one is when all default
9545 attributes are used and in this case, nothing should be inherited as
9546 in modern GUIs different controls use different fonts (and colours)
9547 than their siblings so they can't inherit the same value from the
9548 parent. However it was also deemed desirable to allow to simply change
9549 the attributes of all children at once by just changing the font or
9550 colour of their common parent, hence in this case we do inherit the
9551 parents attributes.
9552
9553 """
9554 return _core_.Window_InheritAttributes(*args, **kwargs)
9555
9556 def ShouldInheritColours(*args, **kwargs):
9557 """
9558 ShouldInheritColours(self) -> bool
9559
9560 Return true from here to allow the colours of this window to be
9561 changed by InheritAttributes, returning false forbids inheriting them
9562 from the parent window.
9563
9564 The base class version returns false, but this method is overridden in
9565 wxControl where it returns true.
9566 """
9567 return _core_.Window_ShouldInheritColours(*args, **kwargs)
9568
9569 def PostCreate(self, pre):
9570 """
9571 Phase 3 of the 2-phase create <wink!>
9572 Call this method after precreating the window with the 2-phase create method.
9573 """
9574 self.this = pre.this
9575 self.thisown = pre.thisown
9576 pre.thisown = 0
9577 if hasattr(self, '_setOORInfo'):
9578 self._setOORInfo(self)
9579 if hasattr(self, '_setCallbackInfo'):
9580 self._setCallbackInfo(self, self.__class__)
9581
9582 def SendSizeEvent(self):
9583 self.GetEventhandler().ProcessEvent(wx.SizeEvent((-1,-1)))
9584
9585 Window_swigregister = _core_.Window_swigregister
9586 Window_swigregister(Window)
9587
9588 def PreWindow(*args, **kwargs):
9589 """
9590 PreWindow() -> Window
9591
9592 Precreate a Window for 2-phase creation.
9593 """
9594 val = _core_.new_PreWindow(*args, **kwargs)
9595 return val
9596
9597 def Window_NewControlId(*args):
9598 """
9599 Window_NewControlId() -> int
9600
9601 Generate a control id for the controls which were not given one.
9602 """
9603 return _core_.Window_NewControlId(*args)
9604
9605 def Window_NextControlId(*args, **kwargs):
9606 """
9607 Window_NextControlId(int winid) -> int
9608
9609 Get the id of the control following the one with the given
9610 autogenerated) id
9611 """
9612 return _core_.Window_NextControlId(*args, **kwargs)
9613
9614 def Window_PrevControlId(*args, **kwargs):
9615 """
9616 Window_PrevControlId(int winid) -> int
9617
9618 Get the id of the control preceding the one with the given
9619 autogenerated) id
9620 """
9621 return _core_.Window_PrevControlId(*args, **kwargs)
9622
9623 def Window_FindFocus(*args):
9624 """
9625 Window_FindFocus() -> Window
9626
9627 Returns the window or control that currently has the keyboard focus,
9628 or None.
9629 """
9630 return _core_.Window_FindFocus(*args)
9631
9632 def Window_GetCapture(*args):
9633 """
9634 Window_GetCapture() -> Window
9635
9636 Returns the window which currently captures the mouse or None
9637 """
9638 return _core_.Window_GetCapture(*args)
9639
9640 def Window_GetClassDefaultAttributes(*args, **kwargs):
9641 """
9642 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9643
9644 Get the default attributes for this class. This is useful if you want
9645 to use the same font or colour in your own control as in a standard
9646 control -- which is a much better idea than hard coding specific
9647 colours or fonts which might look completely out of place on the
9648 user's system, especially if it uses themes.
9649
9650 The variant parameter is only relevant under Mac currently and is
9651 ignore under other platforms. Under Mac, it will change the size of
9652 the returned font. See `wx.Window.SetWindowVariant` for more about
9653 this.
9654 """
9655 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
9656
9657 def DLG_PNT(win, point_or_x, y=None):
9658 """
9659 Convenience function for converting a Point or (x,y) in
9660 dialog units to pixel units.
9661 """
9662 if y is None:
9663 return win.ConvertDialogPointToPixels(point_or_x)
9664 else:
9665 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
9666
9667 def DLG_SZE(win, size_width, height=None):
9668 """
9669 Convenience function for converting a Size or (w,h) in
9670 dialog units to pixel units.
9671 """
9672 if height is None:
9673 return win.ConvertDialogSizeToPixels(size_width)
9674 else:
9675 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
9676
9677
9678 def FindWindowById(*args, **kwargs):
9679 """
9680 FindWindowById(long id, Window parent=None) -> Window
9681
9682 Find the first window in the application with the given id. If parent
9683 is None, the search will start from all top-level frames and dialog
9684 boxes; if non-None, the search will be limited to the given window
9685 hierarchy. The search is recursive in both cases.
9686 """
9687 return _core_.FindWindowById(*args, **kwargs)
9688
9689 def FindWindowByName(*args, **kwargs):
9690 """
9691 FindWindowByName(String name, Window parent=None) -> Window
9692
9693 Find a window by its name (as given in a window constructor or Create
9694 function call). If parent is None, the search will start from all
9695 top-level frames and dialog boxes; if non-None, the search will be
9696 limited to the given window hierarchy. The search is recursive in both
9697 cases.
9698
9699 If no window with such name is found, wx.FindWindowByLabel is called.
9700 """
9701 return _core_.FindWindowByName(*args, **kwargs)
9702
9703 def FindWindowByLabel(*args, **kwargs):
9704 """
9705 FindWindowByLabel(String label, Window parent=None) -> Window
9706
9707 Find a window by its label. Depending on the type of window, the label
9708 may be a window title or panel item label. If parent is None, the
9709 search will start from all top-level frames and dialog boxes; if
9710 non-None, the search will be limited to the given window
9711 hierarchy. The search is recursive in both cases.
9712 """
9713 return _core_.FindWindowByLabel(*args, **kwargs)
9714
9715 def Window_FromHWND(*args, **kwargs):
9716 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
9717 return _core_.Window_FromHWND(*args, **kwargs)
9718
9719 def GetTopLevelWindows(*args):
9720 """
9721 GetTopLevelWindows() -> PyObject
9722
9723 Returns a list of the the application's top-level windows, (frames,
9724 dialogs, etc.) NOTE: Currently this is a copy of the list maintained
9725 by wxWidgets, and so it is only valid as long as no top-level windows
9726 are closed or new top-level windows are created.
9727
9728 """
9729 return _core_.GetTopLevelWindows(*args)
9730 #---------------------------------------------------------------------------
9731
9732 class Validator(EvtHandler):
9733 """Proxy of C++ Validator class"""
9734 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
9735 __repr__ = _swig_repr
9736 def __init__(self, *args, **kwargs):
9737 """__init__(self) -> Validator"""
9738 _core_.Validator_swiginit(self,_core_.new_Validator(*args, **kwargs))
9739 self._setOORInfo(self)
9740
9741 def Clone(*args, **kwargs):
9742 """Clone(self) -> Validator"""
9743 return _core_.Validator_Clone(*args, **kwargs)
9744
9745 def Validate(*args, **kwargs):
9746 """Validate(self, Window parent) -> bool"""
9747 return _core_.Validator_Validate(*args, **kwargs)
9748
9749 def TransferToWindow(*args, **kwargs):
9750 """TransferToWindow(self) -> bool"""
9751 return _core_.Validator_TransferToWindow(*args, **kwargs)
9752
9753 def TransferFromWindow(*args, **kwargs):
9754 """TransferFromWindow(self) -> bool"""
9755 return _core_.Validator_TransferFromWindow(*args, **kwargs)
9756
9757 def GetWindow(*args, **kwargs):
9758 """GetWindow(self) -> Window"""
9759 return _core_.Validator_GetWindow(*args, **kwargs)
9760
9761 def SetWindow(*args, **kwargs):
9762 """SetWindow(self, Window window)"""
9763 return _core_.Validator_SetWindow(*args, **kwargs)
9764
9765 def IsSilent(*args, **kwargs):
9766 """IsSilent() -> bool"""
9767 return _core_.Validator_IsSilent(*args, **kwargs)
9768
9769 IsSilent = staticmethod(IsSilent)
9770 def SetBellOnError(*args, **kwargs):
9771 """SetBellOnError(int doIt=True)"""
9772 return _core_.Validator_SetBellOnError(*args, **kwargs)
9773
9774 SetBellOnError = staticmethod(SetBellOnError)
9775 Validator_swigregister = _core_.Validator_swigregister
9776 Validator_swigregister(Validator)
9777
9778 def Validator_IsSilent(*args):
9779 """Validator_IsSilent() -> bool"""
9780 return _core_.Validator_IsSilent(*args)
9781
9782 def Validator_SetBellOnError(*args, **kwargs):
9783 """Validator_SetBellOnError(int doIt=True)"""
9784 return _core_.Validator_SetBellOnError(*args, **kwargs)
9785
9786 class PyValidator(Validator):
9787 """Proxy of C++ PyValidator class"""
9788 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
9789 __repr__ = _swig_repr
9790 def __init__(self, *args, **kwargs):
9791 """__init__(self) -> PyValidator"""
9792 _core_.PyValidator_swiginit(self,_core_.new_PyValidator(*args, **kwargs))
9793
9794 self._setCallbackInfo(self, PyValidator, 1)
9795 self._setOORInfo(self)
9796
9797 def _setCallbackInfo(*args, **kwargs):
9798 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
9799 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
9800
9801 PyValidator_swigregister = _core_.PyValidator_swigregister
9802 PyValidator_swigregister(PyValidator)
9803
9804 #---------------------------------------------------------------------------
9805
9806 class Menu(EvtHandler):
9807 """Proxy of C++ Menu class"""
9808 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
9809 __repr__ = _swig_repr
9810 def __init__(self, *args, **kwargs):
9811 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
9812 _core_.Menu_swiginit(self,_core_.new_Menu(*args, **kwargs))
9813 self._setOORInfo(self)
9814
9815 def Append(*args, **kwargs):
9816 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
9817 return _core_.Menu_Append(*args, **kwargs)
9818
9819 def AppendSeparator(*args, **kwargs):
9820 """AppendSeparator(self) -> MenuItem"""
9821 return _core_.Menu_AppendSeparator(*args, **kwargs)
9822
9823 def AppendCheckItem(*args, **kwargs):
9824 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
9825 return _core_.Menu_AppendCheckItem(*args, **kwargs)
9826
9827 def AppendRadioItem(*args, **kwargs):
9828 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
9829 return _core_.Menu_AppendRadioItem(*args, **kwargs)
9830
9831 def AppendMenu(*args, **kwargs):
9832 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
9833 return _core_.Menu_AppendMenu(*args, **kwargs)
9834
9835 def AppendSubMenu(*args, **kwargs):
9836 """AppendSubMenu(self, Menu submenu, String text, String help=EmptyString) -> MenuItem"""
9837 return _core_.Menu_AppendSubMenu(*args, **kwargs)
9838
9839 def AppendItem(*args, **kwargs):
9840 """AppendItem(self, MenuItem item) -> MenuItem"""
9841 return _core_.Menu_AppendItem(*args, **kwargs)
9842
9843 def InsertItem(*args, **kwargs):
9844 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
9845 return _core_.Menu_InsertItem(*args, **kwargs)
9846
9847 def PrependItem(*args, **kwargs):
9848 """PrependItem(self, MenuItem item) -> MenuItem"""
9849 return _core_.Menu_PrependItem(*args, **kwargs)
9850
9851 def Break(*args, **kwargs):
9852 """Break(self)"""
9853 return _core_.Menu_Break(*args, **kwargs)
9854
9855 def Insert(*args, **kwargs):
9856 """
9857 Insert(self, size_t pos, int id, String text, String help=EmptyString,
9858 int kind=ITEM_NORMAL) -> MenuItem
9859 """
9860 return _core_.Menu_Insert(*args, **kwargs)
9861
9862 def InsertSeparator(*args, **kwargs):
9863 """InsertSeparator(self, size_t pos) -> MenuItem"""
9864 return _core_.Menu_InsertSeparator(*args, **kwargs)
9865
9866 def InsertCheckItem(*args, **kwargs):
9867 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
9868 return _core_.Menu_InsertCheckItem(*args, **kwargs)
9869
9870 def InsertRadioItem(*args, **kwargs):
9871 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
9872 return _core_.Menu_InsertRadioItem(*args, **kwargs)
9873
9874 def InsertMenu(*args, **kwargs):
9875 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
9876 return _core_.Menu_InsertMenu(*args, **kwargs)
9877
9878 def Prepend(*args, **kwargs):
9879 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
9880 return _core_.Menu_Prepend(*args, **kwargs)
9881
9882 def PrependSeparator(*args, **kwargs):
9883 """PrependSeparator(self) -> MenuItem"""
9884 return _core_.Menu_PrependSeparator(*args, **kwargs)
9885
9886 def PrependCheckItem(*args, **kwargs):
9887 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
9888 return _core_.Menu_PrependCheckItem(*args, **kwargs)
9889
9890 def PrependRadioItem(*args, **kwargs):
9891 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
9892 return _core_.Menu_PrependRadioItem(*args, **kwargs)
9893
9894 def PrependMenu(*args, **kwargs):
9895 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
9896 return _core_.Menu_PrependMenu(*args, **kwargs)
9897
9898 def Remove(*args, **kwargs):
9899 """Remove(self, int id) -> MenuItem"""
9900 return _core_.Menu_Remove(*args, **kwargs)
9901
9902 def RemoveItem(*args, **kwargs):
9903 """RemoveItem(self, MenuItem item) -> MenuItem"""
9904 return _core_.Menu_RemoveItem(*args, **kwargs)
9905
9906 def Delete(*args, **kwargs):
9907 """Delete(self, int id) -> bool"""
9908 return _core_.Menu_Delete(*args, **kwargs)
9909
9910 def DeleteItem(*args, **kwargs):
9911 """DeleteItem(self, MenuItem item) -> bool"""
9912 return _core_.Menu_DeleteItem(*args, **kwargs)
9913
9914 def Destroy(*args, **kwargs):
9915 """
9916 Destroy(self)
9917
9918 Deletes the C++ object this Python object is a proxy for.
9919 """
9920 val = _core_.Menu_Destroy(*args, **kwargs)
9921 args[0].thisown = 0
9922 return val
9923
9924 def DestroyId(*args, **kwargs):
9925 """
9926 DestroyId(self, int id) -> bool
9927
9928 Deletes the C++ object this Python object is a proxy for.
9929 """
9930 val = _core_.Menu_DestroyId(*args, **kwargs)
9931 args[0].thisown = 0
9932 return val
9933
9934 def DestroyItem(*args, **kwargs):
9935 """
9936 DestroyItem(self, MenuItem item) -> bool
9937
9938 Deletes the C++ object this Python object is a proxy for.
9939 """
9940 val = _core_.Menu_DestroyItem(*args, **kwargs)
9941 args[0].thisown = 0
9942 return val
9943
9944 def GetMenuItemCount(*args, **kwargs):
9945 """GetMenuItemCount(self) -> size_t"""
9946 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
9947
9948 def GetMenuItems(*args, **kwargs):
9949 """GetMenuItems(self) -> PyObject"""
9950 return _core_.Menu_GetMenuItems(*args, **kwargs)
9951
9952 def FindItem(*args, **kwargs):
9953 """FindItem(self, String item) -> int"""
9954 return _core_.Menu_FindItem(*args, **kwargs)
9955
9956 def FindItemById(*args, **kwargs):
9957 """FindItemById(self, int id) -> MenuItem"""
9958 return _core_.Menu_FindItemById(*args, **kwargs)
9959
9960 def FindItemByPosition(*args, **kwargs):
9961 """FindItemByPosition(self, size_t position) -> MenuItem"""
9962 return _core_.Menu_FindItemByPosition(*args, **kwargs)
9963
9964 def Enable(*args, **kwargs):
9965 """Enable(self, int id, bool enable)"""
9966 return _core_.Menu_Enable(*args, **kwargs)
9967
9968 def IsEnabled(*args, **kwargs):
9969 """IsEnabled(self, int id) -> bool"""
9970 return _core_.Menu_IsEnabled(*args, **kwargs)
9971
9972 def Check(*args, **kwargs):
9973 """Check(self, int id, bool check)"""
9974 return _core_.Menu_Check(*args, **kwargs)
9975
9976 def IsChecked(*args, **kwargs):
9977 """IsChecked(self, int id) -> bool"""
9978 return _core_.Menu_IsChecked(*args, **kwargs)
9979
9980 def SetLabel(*args, **kwargs):
9981 """SetLabel(self, int id, String label)"""
9982 return _core_.Menu_SetLabel(*args, **kwargs)
9983
9984 def GetLabel(*args, **kwargs):
9985 """GetLabel(self, int id) -> String"""
9986 return _core_.Menu_GetLabel(*args, **kwargs)
9987
9988 def SetHelpString(*args, **kwargs):
9989 """SetHelpString(self, int id, String helpString)"""
9990 return _core_.Menu_SetHelpString(*args, **kwargs)
9991
9992 def GetHelpString(*args, **kwargs):
9993 """GetHelpString(self, int id) -> String"""
9994 return _core_.Menu_GetHelpString(*args, **kwargs)
9995
9996 def SetTitle(*args, **kwargs):
9997 """SetTitle(self, String title)"""
9998 return _core_.Menu_SetTitle(*args, **kwargs)
9999
10000 def GetTitle(*args, **kwargs):
10001 """GetTitle(self) -> String"""
10002 return _core_.Menu_GetTitle(*args, **kwargs)
10003
10004 def SetEventHandler(*args, **kwargs):
10005 """SetEventHandler(self, EvtHandler handler)"""
10006 return _core_.Menu_SetEventHandler(*args, **kwargs)
10007
10008 def GetEventHandler(*args, **kwargs):
10009 """GetEventHandler(self) -> EvtHandler"""
10010 return _core_.Menu_GetEventHandler(*args, **kwargs)
10011
10012 def SetInvokingWindow(*args, **kwargs):
10013 """SetInvokingWindow(self, Window win)"""
10014 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
10015
10016 def GetInvokingWindow(*args, **kwargs):
10017 """GetInvokingWindow(self) -> Window"""
10018 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
10019
10020 def GetStyle(*args, **kwargs):
10021 """GetStyle(self) -> long"""
10022 return _core_.Menu_GetStyle(*args, **kwargs)
10023
10024 def UpdateUI(*args, **kwargs):
10025 """UpdateUI(self, EvtHandler source=None)"""
10026 return _core_.Menu_UpdateUI(*args, **kwargs)
10027
10028 def GetMenuBar(*args, **kwargs):
10029 """GetMenuBar(self) -> MenuBar"""
10030 return _core_.Menu_GetMenuBar(*args, **kwargs)
10031
10032 def Attach(*args, **kwargs):
10033 """Attach(self, wxMenuBarBase menubar)"""
10034 return _core_.Menu_Attach(*args, **kwargs)
10035
10036 def Detach(*args, **kwargs):
10037 """Detach(self)"""
10038 return _core_.Menu_Detach(*args, **kwargs)
10039
10040 def IsAttached(*args, **kwargs):
10041 """IsAttached(self) -> bool"""
10042 return _core_.Menu_IsAttached(*args, **kwargs)
10043
10044 def SetParent(*args, **kwargs):
10045 """SetParent(self, Menu parent)"""
10046 return _core_.Menu_SetParent(*args, **kwargs)
10047
10048 def GetParent(*args, **kwargs):
10049 """GetParent(self) -> Menu"""
10050 return _core_.Menu_GetParent(*args, **kwargs)
10051
10052 Menu_swigregister = _core_.Menu_swigregister
10053 Menu_swigregister(Menu)
10054 DefaultValidator = cvar.DefaultValidator
10055
10056 #---------------------------------------------------------------------------
10057
10058 class MenuBar(Window):
10059 """Proxy of C++ MenuBar class"""
10060 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10061 __repr__ = _swig_repr
10062 def __init__(self, *args, **kwargs):
10063 """__init__(self, long style=0) -> MenuBar"""
10064 _core_.MenuBar_swiginit(self,_core_.new_MenuBar(*args, **kwargs))
10065 self._setOORInfo(self)
10066
10067 def Append(*args, **kwargs):
10068 """Append(self, Menu menu, String title) -> bool"""
10069 return _core_.MenuBar_Append(*args, **kwargs)
10070
10071 def Insert(*args, **kwargs):
10072 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
10073 return _core_.MenuBar_Insert(*args, **kwargs)
10074
10075 def GetMenuCount(*args, **kwargs):
10076 """GetMenuCount(self) -> size_t"""
10077 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
10078
10079 def GetMenu(*args, **kwargs):
10080 """GetMenu(self, size_t pos) -> Menu"""
10081 return _core_.MenuBar_GetMenu(*args, **kwargs)
10082
10083 def Replace(*args, **kwargs):
10084 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
10085 return _core_.MenuBar_Replace(*args, **kwargs)
10086
10087 def Remove(*args, **kwargs):
10088 """Remove(self, size_t pos) -> Menu"""
10089 return _core_.MenuBar_Remove(*args, **kwargs)
10090
10091 def EnableTop(*args, **kwargs):
10092 """EnableTop(self, size_t pos, bool enable)"""
10093 return _core_.MenuBar_EnableTop(*args, **kwargs)
10094
10095 def IsEnabledTop(*args, **kwargs):
10096 """IsEnabledTop(self, size_t pos) -> bool"""
10097 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
10098
10099 def SetLabelTop(*args, **kwargs):
10100 """SetLabelTop(self, size_t pos, String label)"""
10101 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
10102
10103 def GetLabelTop(*args, **kwargs):
10104 """GetLabelTop(self, size_t pos) -> String"""
10105 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
10106
10107 def FindMenuItem(*args, **kwargs):
10108 """FindMenuItem(self, String menu, String item) -> int"""
10109 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
10110
10111 def FindItemById(*args, **kwargs):
10112 """FindItemById(self, int id) -> MenuItem"""
10113 return _core_.MenuBar_FindItemById(*args, **kwargs)
10114
10115 def FindMenu(*args, **kwargs):
10116 """FindMenu(self, String title) -> int"""
10117 return _core_.MenuBar_FindMenu(*args, **kwargs)
10118
10119 def Enable(*args, **kwargs):
10120 """Enable(self, int id, bool enable)"""
10121 return _core_.MenuBar_Enable(*args, **kwargs)
10122
10123 def Check(*args, **kwargs):
10124 """Check(self, int id, bool check)"""
10125 return _core_.MenuBar_Check(*args, **kwargs)
10126
10127 def IsChecked(*args, **kwargs):
10128 """IsChecked(self, int id) -> bool"""
10129 return _core_.MenuBar_IsChecked(*args, **kwargs)
10130
10131 def IsEnabled(*args, **kwargs):
10132 """IsEnabled(self, int id) -> bool"""
10133 return _core_.MenuBar_IsEnabled(*args, **kwargs)
10134
10135 def SetLabel(*args, **kwargs):
10136 """SetLabel(self, int id, String label)"""
10137 return _core_.MenuBar_SetLabel(*args, **kwargs)
10138
10139 def GetLabel(*args, **kwargs):
10140 """GetLabel(self, int id) -> String"""
10141 return _core_.MenuBar_GetLabel(*args, **kwargs)
10142
10143 def SetHelpString(*args, **kwargs):
10144 """SetHelpString(self, int id, String helpString)"""
10145 return _core_.MenuBar_SetHelpString(*args, **kwargs)
10146
10147 def GetHelpString(*args, **kwargs):
10148 """GetHelpString(self, int id) -> String"""
10149 return _core_.MenuBar_GetHelpString(*args, **kwargs)
10150
10151 def GetFrame(*args, **kwargs):
10152 """GetFrame(self) -> wxFrame"""
10153 return _core_.MenuBar_GetFrame(*args, **kwargs)
10154
10155 def IsAttached(*args, **kwargs):
10156 """IsAttached(self) -> bool"""
10157 return _core_.MenuBar_IsAttached(*args, **kwargs)
10158
10159 def Attach(*args, **kwargs):
10160 """Attach(self, wxFrame frame)"""
10161 return _core_.MenuBar_Attach(*args, **kwargs)
10162
10163 def Detach(*args, **kwargs):
10164 """Detach(self)"""
10165 return _core_.MenuBar_Detach(*args, **kwargs)
10166
10167 def SetAutoWindowMenu(*args, **kwargs):
10168 """SetAutoWindowMenu(bool enable)"""
10169 return _core_.MenuBar_SetAutoWindowMenu(*args, **kwargs)
10170
10171 SetAutoWindowMenu = staticmethod(SetAutoWindowMenu)
10172 def GetAutoWindowMenu(*args, **kwargs):
10173 """GetAutoWindowMenu() -> bool"""
10174 return _core_.MenuBar_GetAutoWindowMenu(*args, **kwargs)
10175
10176 GetAutoWindowMenu = staticmethod(GetAutoWindowMenu)
10177 MenuBar_swigregister = _core_.MenuBar_swigregister
10178 MenuBar_swigregister(MenuBar)
10179
10180 def MenuBar_SetAutoWindowMenu(*args, **kwargs):
10181 """MenuBar_SetAutoWindowMenu(bool enable)"""
10182 return _core_.MenuBar_SetAutoWindowMenu(*args, **kwargs)
10183
10184 def MenuBar_GetAutoWindowMenu(*args):
10185 """MenuBar_GetAutoWindowMenu() -> bool"""
10186 return _core_.MenuBar_GetAutoWindowMenu(*args)
10187
10188 #---------------------------------------------------------------------------
10189
10190 class MenuItem(Object):
10191 """Proxy of C++ MenuItem class"""
10192 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10193 __repr__ = _swig_repr
10194 def __init__(self, *args, **kwargs):
10195 """
10196 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
10197 String help=EmptyString, int kind=ITEM_NORMAL,
10198 Menu subMenu=None) -> MenuItem
10199 """
10200 _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs))
10201 __swig_destroy__ = _core_.delete_MenuItem
10202 __del__ = lambda self : None;
10203 def GetMenu(*args, **kwargs):
10204 """GetMenu(self) -> Menu"""
10205 return _core_.MenuItem_GetMenu(*args, **kwargs)
10206
10207 def SetMenu(*args, **kwargs):
10208 """SetMenu(self, Menu menu)"""
10209 return _core_.MenuItem_SetMenu(*args, **kwargs)
10210
10211 def SetId(*args, **kwargs):
10212 """SetId(self, int id)"""
10213 return _core_.MenuItem_SetId(*args, **kwargs)
10214
10215 def GetId(*args, **kwargs):
10216 """GetId(self) -> int"""
10217 return _core_.MenuItem_GetId(*args, **kwargs)
10218
10219 def IsSeparator(*args, **kwargs):
10220 """IsSeparator(self) -> bool"""
10221 return _core_.MenuItem_IsSeparator(*args, **kwargs)
10222
10223 def SetText(*args, **kwargs):
10224 """SetText(self, String str)"""
10225 return _core_.MenuItem_SetText(*args, **kwargs)
10226
10227 def GetLabel(*args, **kwargs):
10228 """GetLabel(self) -> String"""
10229 return _core_.MenuItem_GetLabel(*args, **kwargs)
10230
10231 def GetText(*args, **kwargs):
10232 """GetText(self) -> String"""
10233 return _core_.MenuItem_GetText(*args, **kwargs)
10234
10235 def GetLabelFromText(*args, **kwargs):
10236 """GetLabelFromText(String text) -> String"""
10237 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
10238
10239 GetLabelFromText = staticmethod(GetLabelFromText)
10240 def GetKind(*args, **kwargs):
10241 """GetKind(self) -> int"""
10242 return _core_.MenuItem_GetKind(*args, **kwargs)
10243
10244 def SetKind(*args, **kwargs):
10245 """SetKind(self, int kind)"""
10246 return _core_.MenuItem_SetKind(*args, **kwargs)
10247
10248 def SetCheckable(*args, **kwargs):
10249 """SetCheckable(self, bool checkable)"""
10250 return _core_.MenuItem_SetCheckable(*args, **kwargs)
10251
10252 def IsCheckable(*args, **kwargs):
10253 """IsCheckable(self) -> bool"""
10254 return _core_.MenuItem_IsCheckable(*args, **kwargs)
10255
10256 def IsSubMenu(*args, **kwargs):
10257 """IsSubMenu(self) -> bool"""
10258 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
10259
10260 def SetSubMenu(*args, **kwargs):
10261 """SetSubMenu(self, Menu menu)"""
10262 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
10263
10264 def GetSubMenu(*args, **kwargs):
10265 """GetSubMenu(self) -> Menu"""
10266 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
10267
10268 def Enable(*args, **kwargs):
10269 """Enable(self, bool enable=True)"""
10270 return _core_.MenuItem_Enable(*args, **kwargs)
10271
10272 def IsEnabled(*args, **kwargs):
10273 """IsEnabled(self) -> bool"""
10274 return _core_.MenuItem_IsEnabled(*args, **kwargs)
10275
10276 def Check(*args, **kwargs):
10277 """Check(self, bool check=True)"""
10278 return _core_.MenuItem_Check(*args, **kwargs)
10279
10280 def IsChecked(*args, **kwargs):
10281 """IsChecked(self) -> bool"""
10282 return _core_.MenuItem_IsChecked(*args, **kwargs)
10283
10284 def Toggle(*args, **kwargs):
10285 """Toggle(self)"""
10286 return _core_.MenuItem_Toggle(*args, **kwargs)
10287
10288 def SetHelp(*args, **kwargs):
10289 """SetHelp(self, String str)"""
10290 return _core_.MenuItem_SetHelp(*args, **kwargs)
10291
10292 def GetHelp(*args, **kwargs):
10293 """GetHelp(self) -> String"""
10294 return _core_.MenuItem_GetHelp(*args, **kwargs)
10295
10296 def GetAccel(*args, **kwargs):
10297 """GetAccel(self) -> AcceleratorEntry"""
10298 return _core_.MenuItem_GetAccel(*args, **kwargs)
10299
10300 def SetAccel(*args, **kwargs):
10301 """SetAccel(self, AcceleratorEntry accel)"""
10302 return _core_.MenuItem_SetAccel(*args, **kwargs)
10303
10304 def SetBitmap(*args, **kwargs):
10305 """SetBitmap(self, Bitmap bitmap)"""
10306 return _core_.MenuItem_SetBitmap(*args, **kwargs)
10307
10308 def GetBitmap(*args, **kwargs):
10309 """GetBitmap(self) -> Bitmap"""
10310 return _core_.MenuItem_GetBitmap(*args, **kwargs)
10311
10312 def SetFont(*args, **kwargs):
10313 """SetFont(self, Font font)"""
10314 return _core_.MenuItem_SetFont(*args, **kwargs)
10315
10316 def GetFont(*args, **kwargs):
10317 """GetFont(self) -> Font"""
10318 return _core_.MenuItem_GetFont(*args, **kwargs)
10319
10320 def SetTextColour(*args, **kwargs):
10321 """SetTextColour(self, Colour colText)"""
10322 return _core_.MenuItem_SetTextColour(*args, **kwargs)
10323
10324 def GetTextColour(*args, **kwargs):
10325 """GetTextColour(self) -> Colour"""
10326 return _core_.MenuItem_GetTextColour(*args, **kwargs)
10327
10328 def SetBackgroundColour(*args, **kwargs):
10329 """SetBackgroundColour(self, Colour colBack)"""
10330 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
10331
10332 def GetBackgroundColour(*args, **kwargs):
10333 """GetBackgroundColour(self) -> Colour"""
10334 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
10335
10336 def SetBitmaps(*args, **kwargs):
10337 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
10338 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
10339
10340 def SetDisabledBitmap(*args, **kwargs):
10341 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
10342 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
10343
10344 def GetDisabledBitmap(*args, **kwargs):
10345 """GetDisabledBitmap(self) -> Bitmap"""
10346 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
10347
10348 def SetMarginWidth(*args, **kwargs):
10349 """SetMarginWidth(self, int nWidth)"""
10350 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
10351
10352 def GetMarginWidth(*args, **kwargs):
10353 """GetMarginWidth(self) -> int"""
10354 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
10355
10356 def GetDefaultMarginWidth(*args, **kwargs):
10357 """GetDefaultMarginWidth() -> int"""
10358 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
10359
10360 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
10361 def IsOwnerDrawn(*args, **kwargs):
10362 """IsOwnerDrawn(self) -> bool"""
10363 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
10364
10365 def SetOwnerDrawn(*args, **kwargs):
10366 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
10367 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
10368
10369 def ResetOwnerDrawn(*args, **kwargs):
10370 """ResetOwnerDrawn(self)"""
10371 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
10372
10373 MenuItem_swigregister = _core_.MenuItem_swigregister
10374 MenuItem_swigregister(MenuItem)
10375
10376 def MenuItem_GetLabelFromText(*args, **kwargs):
10377 """MenuItem_GetLabelFromText(String text) -> String"""
10378 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
10379
10380 def MenuItem_GetDefaultMarginWidth(*args):
10381 """MenuItem_GetDefaultMarginWidth() -> int"""
10382 return _core_.MenuItem_GetDefaultMarginWidth(*args)
10383
10384 #---------------------------------------------------------------------------
10385
10386 class Control(Window):
10387 """
10388 This is the base class for a control or 'widget'.
10389
10390 A control is generally a small window which processes user input
10391 and/or displays one or more item of data.
10392 """
10393 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10394 __repr__ = _swig_repr
10395 def __init__(self, *args, **kwargs):
10396 """
10397 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
10398 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
10399 String name=ControlNameStr) -> Control
10400
10401 Create a Control. Normally you should only call this from a subclass'
10402 __init__ as a plain old wx.Control is not very useful.
10403 """
10404 _core_.Control_swiginit(self,_core_.new_Control(*args, **kwargs))
10405 self._setOORInfo(self)
10406
10407 def Create(*args, **kwargs):
10408 """
10409 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
10410 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
10411 String name=ControlNameStr) -> bool
10412
10413 Do the 2nd phase and create the GUI control.
10414 """
10415 return _core_.Control_Create(*args, **kwargs)
10416
10417 def Command(*args, **kwargs):
10418 """
10419 Command(self, CommandEvent event)
10420
10421 Simulates the effect of the user issuing a command to the item.
10422
10423 :see: `wx.CommandEvent`
10424
10425 """
10426 return _core_.Control_Command(*args, **kwargs)
10427
10428 def GetLabel(*args, **kwargs):
10429 """
10430 GetLabel(self) -> String
10431
10432 Return a control's text.
10433 """
10434 return _core_.Control_GetLabel(*args, **kwargs)
10435
10436 def GetClassDefaultAttributes(*args, **kwargs):
10437 """
10438 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
10439
10440 Get the default attributes for this class. This is useful if you want
10441 to use the same font or colour in your own control as in a standard
10442 control -- which is a much better idea than hard coding specific
10443 colours or fonts which might look completely out of place on the
10444 user's system, especially if it uses themes.
10445
10446 The variant parameter is only relevant under Mac currently and is
10447 ignore under other platforms. Under Mac, it will change the size of
10448 the returned font. See `wx.Window.SetWindowVariant` for more about
10449 this.
10450 """
10451 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
10452
10453 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
10454 Control_swigregister = _core_.Control_swigregister
10455 Control_swigregister(Control)
10456 ControlNameStr = cvar.ControlNameStr
10457
10458 def PreControl(*args, **kwargs):
10459 """
10460 PreControl() -> Control
10461
10462 Precreate a Control control for 2-phase creation
10463 """
10464 val = _core_.new_PreControl(*args, **kwargs)
10465 return val
10466
10467 def Control_GetClassDefaultAttributes(*args, **kwargs):
10468 """
10469 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
10470
10471 Get the default attributes for this class. This is useful if you want
10472 to use the same font or colour in your own control as in a standard
10473 control -- which is a much better idea than hard coding specific
10474 colours or fonts which might look completely out of place on the
10475 user's system, especially if it uses themes.
10476
10477 The variant parameter is only relevant under Mac currently and is
10478 ignore under other platforms. Under Mac, it will change the size of
10479 the returned font. See `wx.Window.SetWindowVariant` for more about
10480 this.
10481 """
10482 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
10483
10484 #---------------------------------------------------------------------------
10485
10486 class ItemContainer(object):
10487 """
10488 The wx.ItemContainer class defines an interface which is implemented
10489 by all controls which have string subitems, each of which may be
10490 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
10491 as `wx.ComboBox` which implements an extended interface deriving from
10492 this one.
10493
10494 It defines the methods for accessing the control's items and although
10495 each of the derived classes implements them differently, they still
10496 all conform to the same interface.
10497
10498 The items in a wx.ItemContainer have (non empty) string labels and,
10499 optionally, client data associated with them.
10500
10501 """
10502 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10503 def __init__(self): raise AttributeError, "No constructor defined"
10504 __repr__ = _swig_repr
10505 def Append(*args, **kwargs):
10506 """
10507 Append(self, String item, PyObject clientData=None) -> int
10508
10509 Adds the item to the control, associating the given data with the item
10510 if not None. The return value is the index of the newly added item
10511 which may be different from the last one if the control is sorted (e.g.
10512 has wx.LB_SORT or wx.CB_SORT style).
10513 """
10514 return _core_.ItemContainer_Append(*args, **kwargs)
10515
10516 def AppendItems(*args, **kwargs):
10517 """
10518 AppendItems(self, List strings)
10519
10520 Apend several items at once to the control. Notice that calling this
10521 method may be much faster than appending the items one by one if you
10522 need to add a lot of items.
10523 """
10524 return _core_.ItemContainer_AppendItems(*args, **kwargs)
10525
10526 def Insert(*args, **kwargs):
10527 """
10528 Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int
10529
10530 Insert an item into the control before the item at the ``pos`` index,
10531 optionally associating some data object with the item.
10532 """
10533 return _core_.ItemContainer_Insert(*args, **kwargs)
10534
10535 def Clear(*args, **kwargs):
10536 """
10537 Clear(self)
10538
10539 Removes all items from the control.
10540 """
10541 return _core_.ItemContainer_Clear(*args, **kwargs)
10542
10543 def Delete(*args, **kwargs):
10544 """
10545 Delete(self, unsigned int n)
10546
10547 Deletes the item at the zero-based index 'n' from the control. Note
10548 that it is an error (signalled by a `wx.PyAssertionError` exception if
10549 enabled) to remove an item with the index negative or greater or equal
10550 than the number of items in the control.
10551 """
10552 return _core_.ItemContainer_Delete(*args, **kwargs)
10553
10554 def GetClientData(*args, **kwargs):
10555 """
10556 GetClientData(self, unsigned int n) -> PyObject
10557
10558 Returns the client data associated with the given item, (if any.)
10559 """
10560 return _core_.ItemContainer_GetClientData(*args, **kwargs)
10561
10562 def SetClientData(*args, **kwargs):
10563 """
10564 SetClientData(self, unsigned int n, PyObject clientData)
10565
10566 Associate the given client data with the item at position n.
10567 """
10568 return _core_.ItemContainer_SetClientData(*args, **kwargs)
10569
10570 def GetCount(*args, **kwargs):
10571 """
10572 GetCount(self) -> unsigned int
10573
10574 Returns the number of items in the control.
10575 """
10576 return _core_.ItemContainer_GetCount(*args, **kwargs)
10577
10578 def IsEmpty(*args, **kwargs):
10579 """
10580 IsEmpty(self) -> bool
10581
10582 Returns True if the control is empty or False if it has some items.
10583 """
10584 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
10585
10586 def GetString(*args, **kwargs):
10587 """
10588 GetString(self, unsigned int n) -> String
10589
10590 Returns the label of the item with the given index.
10591 """
10592 return _core_.ItemContainer_GetString(*args, **kwargs)
10593
10594 def GetStrings(*args, **kwargs):
10595 """GetStrings(self) -> wxArrayString"""
10596 return _core_.ItemContainer_GetStrings(*args, **kwargs)
10597
10598 def SetString(*args, **kwargs):
10599 """
10600 SetString(self, unsigned int n, String s)
10601
10602 Sets the label for the given item.
10603 """
10604 return _core_.ItemContainer_SetString(*args, **kwargs)
10605
10606 def FindString(*args, **kwargs):
10607 """
10608 FindString(self, String s) -> int
10609
10610 Finds an item whose label matches the given string. Returns the
10611 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
10612 found.
10613 """
10614 return _core_.ItemContainer_FindString(*args, **kwargs)
10615
10616 def SetSelection(*args, **kwargs):
10617 """
10618 SetSelection(self, int n)
10619
10620 Sets the item at index 'n' to be the selected item.
10621 """
10622 return _core_.ItemContainer_SetSelection(*args, **kwargs)
10623
10624 def GetSelection(*args, **kwargs):
10625 """
10626 GetSelection(self) -> int
10627
10628 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
10629 is selected.
10630 """
10631 return _core_.ItemContainer_GetSelection(*args, **kwargs)
10632
10633 def SetStringSelection(*args, **kwargs):
10634 """SetStringSelection(self, String s) -> bool"""
10635 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
10636
10637 def GetStringSelection(*args, **kwargs):
10638 """
10639 GetStringSelection(self) -> String
10640
10641 Returns the label of the selected item or an empty string if no item
10642 is selected.
10643 """
10644 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
10645
10646 def Select(*args, **kwargs):
10647 """
10648 Select(self, int n)
10649
10650 This is the same as `SetSelection` and exists only because it is
10651 slightly more natural for controls which support multiple selection.
10652 """
10653 return _core_.ItemContainer_Select(*args, **kwargs)
10654
10655 ItemContainer_swigregister = _core_.ItemContainer_swigregister
10656 ItemContainer_swigregister(ItemContainer)
10657
10658 #---------------------------------------------------------------------------
10659
10660 class ControlWithItems(Control,ItemContainer):
10661 """
10662 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
10663 wx.Control class, and is used for the base class of various controls
10664 that have items.
10665 """
10666 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10667 def __init__(self): raise AttributeError, "No constructor defined"
10668 __repr__ = _swig_repr
10669 ControlWithItems_swigregister = _core_.ControlWithItems_swigregister
10670 ControlWithItems_swigregister(ControlWithItems)
10671
10672 #---------------------------------------------------------------------------
10673
10674 class SizerItem(Object):
10675 """
10676 The wx.SizerItem class is used to track the position, size and other
10677 attributes of each item managed by a `wx.Sizer`. In normal usage user
10678 code should never need to deal directly with a wx.SizerItem, but
10679 custom classes derived from `wx.PySizer` will probably need to use the
10680 collection of wx.SizerItems held by wx.Sizer when calculating layout.
10681
10682 :see: `wx.Sizer`, `wx.GBSizerItem`
10683 """
10684 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10685 __repr__ = _swig_repr
10686 def __init__(self, *args, **kwargs):
10687 """
10688 __init__(self) -> SizerItem
10689
10690 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
10691 size will need to be set before this item can be used in a Sizer.
10692
10693 You will probably never need to create a wx.SizerItem directly as they
10694 are created automatically when the sizer's Add, Insert or Prepend
10695 methods are called.
10696
10697 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
10698 """
10699 _core_.SizerItem_swiginit(self,_core_.new_SizerItem(*args, **kwargs))
10700 __swig_destroy__ = _core_.delete_SizerItem
10701 __del__ = lambda self : None;
10702 def DeleteWindows(*args, **kwargs):
10703 """
10704 DeleteWindows(self)
10705
10706 Destroy the window or the windows in a subsizer, depending on the type
10707 of item.
10708 """
10709 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
10710
10711 def DetachSizer(*args, **kwargs):
10712 """
10713 DetachSizer(self)
10714
10715 Enable deleting the SizerItem without destroying the contained sizer.
10716 """
10717 return _core_.SizerItem_DetachSizer(*args, **kwargs)
10718
10719 def GetSize(*args, **kwargs):
10720 """
10721 GetSize(self) -> Size
10722
10723 Get the current size of the item, as set in the last Layout.
10724 """
10725 return _core_.SizerItem_GetSize(*args, **kwargs)
10726
10727 def CalcMin(*args, **kwargs):
10728 """
10729 CalcMin(self) -> Size
10730
10731 Calculates the minimum desired size for the item, including any space
10732 needed by borders.
10733 """
10734 return _core_.SizerItem_CalcMin(*args, **kwargs)
10735
10736 def SetDimension(*args, **kwargs):
10737 """
10738 SetDimension(self, Point pos, Size size)
10739
10740 Set the position and size of the space allocated for this item by the
10741 sizer, and adjust the position and size of the item (window or
10742 subsizer) to be within that space taking alignment and borders into
10743 account.
10744 """
10745 return _core_.SizerItem_SetDimension(*args, **kwargs)
10746
10747 def GetMinSize(*args, **kwargs):
10748 """
10749 GetMinSize(self) -> Size
10750
10751 Get the minimum size needed for the item.
10752 """
10753 return _core_.SizerItem_GetMinSize(*args, **kwargs)
10754
10755 def GetMinSizeWithBorder(*args, **kwargs):
10756 """
10757 GetMinSizeWithBorder(self) -> Size
10758
10759 Get the minimum size needed for the item with space for the borders
10760 added, if needed.
10761 """
10762 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
10763
10764 def SetInitSize(*args, **kwargs):
10765 """SetInitSize(self, int x, int y)"""
10766 return _core_.SizerItem_SetInitSize(*args, **kwargs)
10767
10768 def SetRatioWH(*args, **kwargs):
10769 """
10770 SetRatioWH(self, int width, int height)
10771
10772 Set the ratio item attribute.
10773 """
10774 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
10775
10776 def SetRatioSize(*args, **kwargs):
10777 """
10778 SetRatioSize(self, Size size)
10779
10780 Set the ratio item attribute.
10781 """
10782 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
10783
10784 def SetRatio(*args, **kwargs):
10785 """
10786 SetRatio(self, float ratio)
10787
10788 Set the ratio item attribute.
10789 """
10790 return _core_.SizerItem_SetRatio(*args, **kwargs)
10791
10792 def GetRatio(*args, **kwargs):
10793 """
10794 GetRatio(self) -> float
10795
10796 Set the ratio item attribute.
10797 """
10798 return _core_.SizerItem_GetRatio(*args, **kwargs)
10799
10800 def GetRect(*args, **kwargs):
10801 """
10802 GetRect(self) -> Rect
10803
10804 Returns the rectangle that the sizer item should occupy
10805 """
10806 return _core_.SizerItem_GetRect(*args, **kwargs)
10807
10808 def IsWindow(*args, **kwargs):
10809 """
10810 IsWindow(self) -> bool
10811
10812 Is this sizer item a window?
10813 """
10814 return _core_.SizerItem_IsWindow(*args, **kwargs)
10815
10816 def IsSizer(*args, **kwargs):
10817 """
10818 IsSizer(self) -> bool
10819
10820 Is this sizer item a subsizer?
10821 """
10822 return _core_.SizerItem_IsSizer(*args, **kwargs)
10823
10824 def IsSpacer(*args, **kwargs):
10825 """
10826 IsSpacer(self) -> bool
10827
10828 Is this sizer item a spacer?
10829 """
10830 return _core_.SizerItem_IsSpacer(*args, **kwargs)
10831
10832 def SetProportion(*args, **kwargs):
10833 """
10834 SetProportion(self, int proportion)
10835
10836 Set the proportion value for this item.
10837 """
10838 return _core_.SizerItem_SetProportion(*args, **kwargs)
10839
10840 def GetProportion(*args, **kwargs):
10841 """
10842 GetProportion(self) -> int
10843
10844 Get the proportion value for this item.
10845 """
10846 return _core_.SizerItem_GetProportion(*args, **kwargs)
10847
10848 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
10849 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
10850 def SetFlag(*args, **kwargs):
10851 """
10852 SetFlag(self, int flag)
10853
10854 Set the flag value for this item.
10855 """
10856 return _core_.SizerItem_SetFlag(*args, **kwargs)
10857
10858 def GetFlag(*args, **kwargs):
10859 """
10860 GetFlag(self) -> int
10861
10862 Get the flag value for this item.
10863 """
10864 return _core_.SizerItem_GetFlag(*args, **kwargs)
10865
10866 def SetBorder(*args, **kwargs):
10867 """
10868 SetBorder(self, int border)
10869
10870 Set the border value for this item.
10871 """
10872 return _core_.SizerItem_SetBorder(*args, **kwargs)
10873
10874 def GetBorder(*args, **kwargs):
10875 """
10876 GetBorder(self) -> int
10877
10878 Get the border value for this item.
10879 """
10880 return _core_.SizerItem_GetBorder(*args, **kwargs)
10881
10882 def GetWindow(*args, **kwargs):
10883 """
10884 GetWindow(self) -> Window
10885
10886 Get the window (if any) that is managed by this sizer item.
10887 """
10888 return _core_.SizerItem_GetWindow(*args, **kwargs)
10889
10890 def SetWindow(*args, **kwargs):
10891 """
10892 SetWindow(self, Window window)
10893
10894 Set the window to be managed by this sizer item.
10895 """
10896 return _core_.SizerItem_SetWindow(*args, **kwargs)
10897
10898 def GetSizer(*args, **kwargs):
10899 """
10900 GetSizer(self) -> Sizer
10901
10902 Get the subsizer (if any) that is managed by this sizer item.
10903 """
10904 return _core_.SizerItem_GetSizer(*args, **kwargs)
10905
10906 def SetSizer(*args, **kwargs):
10907 """
10908 SetSizer(self, Sizer sizer)
10909
10910 Set the subsizer to be managed by this sizer item.
10911 """
10912 return _core_.SizerItem_SetSizer(*args, **kwargs)
10913
10914 def GetSpacer(*args, **kwargs):
10915 """
10916 GetSpacer(self) -> Size
10917
10918 Get the size of the spacer managed by this sizer item.
10919 """
10920 return _core_.SizerItem_GetSpacer(*args, **kwargs)
10921
10922 def SetSpacer(*args, **kwargs):
10923 """
10924 SetSpacer(self, Size size)
10925
10926 Set the size of the spacer to be managed by this sizer item.
10927 """
10928 return _core_.SizerItem_SetSpacer(*args, **kwargs)
10929
10930 def Show(*args, **kwargs):
10931 """
10932 Show(self, bool show)
10933
10934 Set the show item attribute, which sizers use to determine if the item
10935 is to be made part of the layout or not. If the item is tracking a
10936 window then it is shown or hidden as needed.
10937 """
10938 return _core_.SizerItem_Show(*args, **kwargs)
10939
10940 def IsShown(*args, **kwargs):
10941 """
10942 IsShown(self) -> bool
10943
10944 Is the item to be shown in the layout?
10945 """
10946 return _core_.SizerItem_IsShown(*args, **kwargs)
10947
10948 def GetPosition(*args, **kwargs):
10949 """
10950 GetPosition(self) -> Point
10951
10952 Returns the current position of the item, as set in the last Layout.
10953 """
10954 return _core_.SizerItem_GetPosition(*args, **kwargs)
10955
10956 def GetUserData(*args, **kwargs):
10957 """
10958 GetUserData(self) -> PyObject
10959
10960 Returns the userData associated with this sizer item, or None if there
10961 isn't any.
10962 """
10963 return _core_.SizerItem_GetUserData(*args, **kwargs)
10964
10965 def SetUserData(*args, **kwargs):
10966 """
10967 SetUserData(self, PyObject userData)
10968
10969 Associate a Python object with this sizer item.
10970 """
10971 return _core_.SizerItem_SetUserData(*args, **kwargs)
10972
10973 SizerItem_swigregister = _core_.SizerItem_swigregister
10974 SizerItem_swigregister(SizerItem)
10975
10976 def SizerItemWindow(*args, **kwargs):
10977 """
10978 SizerItemWindow(Window window, int proportion, int flag, int border,
10979 PyObject userData=None) -> SizerItem
10980
10981 Constructs a `wx.SizerItem` for tracking a window.
10982 """
10983 val = _core_.new_SizerItemWindow(*args, **kwargs)
10984 return val
10985
10986 def SizerItemSpacer(*args, **kwargs):
10987 """
10988 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
10989 PyObject userData=None) -> SizerItem
10990
10991 Constructs a `wx.SizerItem` for tracking a spacer.
10992 """
10993 val = _core_.new_SizerItemSpacer(*args, **kwargs)
10994 return val
10995
10996 def SizerItemSizer(*args, **kwargs):
10997 """
10998 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
10999 PyObject userData=None) -> SizerItem
11000
11001 Constructs a `wx.SizerItem` for tracking a subsizer
11002 """
11003 val = _core_.new_SizerItemSizer(*args, **kwargs)
11004 return val
11005
11006 class Sizer(Object):
11007 """
11008 wx.Sizer is the abstract base class used for laying out subwindows in
11009 a window. You cannot use wx.Sizer directly; instead, you will have to
11010 use one of the sizer classes derived from it such as `wx.BoxSizer`,
11011 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
11012 and `wx.GridBagSizer`.
11013
11014 The concept implemented by sizers in wxWidgets is closely related to
11015 layout tools in other GUI toolkits, such as Java's AWT, the GTK
11016 toolkit or the Qt toolkit. It is based upon the idea of the individual
11017 subwindows reporting their minimal required size and their ability to
11018 get stretched if the size of the parent window has changed. This will
11019 most often mean that the programmer does not set the original size of
11020 a dialog in the beginning, rather the dialog will assigned a sizer and
11021 this sizer will be queried about the recommended size. The sizer in
11022 turn will query its children, which can be normal windows or contorls,
11023 empty space or other sizers, so that a hierarchy of sizers can be
11024 constructed. Note that wxSizer does not derive from wxWindow and thus
11025 do not interfere with tab ordering and requires very little resources
11026 compared to a real window on screen.
11027
11028 What makes sizers so well fitted for use in wxWidgets is the fact that
11029 every control reports its own minimal size and the algorithm can
11030 handle differences in font sizes or different window (dialog item)
11031 sizes on different platforms without problems. If for example the
11032 standard font as well as the overall design of Mac widgets requires
11033 more space than on Windows, then the initial size of a dialog using a
11034 sizer will automatically be bigger on Mac than on Windows.
11035 """
11036 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11037 def __init__(self): raise AttributeError, "No constructor defined"
11038 __repr__ = _swig_repr
11039 __swig_destroy__ = _core_.delete_Sizer
11040 __del__ = lambda self : None;
11041 def _setOORInfo(*args, **kwargs):
11042 """_setOORInfo(self, PyObject _self)"""
11043 return _core_.Sizer__setOORInfo(*args, **kwargs)
11044
11045 def Add(*args, **kwargs):
11046 """
11047 Add(self, item, int proportion=0, int flag=0, int border=0,
11048 PyObject userData=None) -> wx.SizerItem
11049
11050 Appends a child item to the sizer.
11051 """
11052 return _core_.Sizer_Add(*args, **kwargs)
11053
11054 def Insert(*args, **kwargs):
11055 """
11056 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
11057 PyObject userData=None) -> wx.SizerItem
11058
11059 Inserts a new item into the list of items managed by this sizer before
11060 the item at index *before*. See `Add` for a description of the parameters.
11061 """
11062 return _core_.Sizer_Insert(*args, **kwargs)
11063
11064 def Prepend(*args, **kwargs):
11065 """
11066 Prepend(self, item, int proportion=0, int flag=0, int border=0,
11067 PyObject userData=None) -> wx.SizerItem
11068
11069 Adds a new item to the begining of the list of sizer items managed by
11070 this sizer. See `Add` for a description of the parameters.
11071 """
11072 return _core_.Sizer_Prepend(*args, **kwargs)
11073
11074 def Remove(*args, **kwargs):
11075 """
11076 Remove(self, item) -> bool
11077
11078 Removes an item from the sizer and destroys it. This method does not
11079 cause any layout or resizing to take place, call `Layout` to update
11080 the layout on screen after removing a child from the sizer. The
11081 *item* parameter can be either a window, a sizer, or the zero-based
11082 index of an item to remove. Returns True if the child item was found
11083 and removed.
11084 """
11085 return _core_.Sizer_Remove(*args, **kwargs)
11086
11087 def Detach(*args, **kwargs):
11088 """
11089 Detach(self, item) -> bool
11090
11091 Detaches an item from the sizer without destroying it. This method
11092 does not cause any layout or resizing to take place, call `Layout` to
11093 do so. The *item* parameter can be either a window, a sizer, or the
11094 zero-based index of the item to be detached. Returns True if the child item
11095 was found and detached.
11096 """
11097 return _core_.Sizer_Detach(*args, **kwargs)
11098
11099 def GetItem(*args, **kwargs):
11100 """
11101 GetItem(self, item) -> wx.SizerItem
11102
11103 Returns the `wx.SizerItem` which holds the *item* given. The *item*
11104 parameter can be either a window, a sizer, or the zero-based index of
11105 the item to be found.
11106 """
11107 return _core_.Sizer_GetItem(*args, **kwargs)
11108
11109 def _SetItemMinSize(*args, **kwargs):
11110 """_SetItemMinSize(self, PyObject item, Size size)"""
11111 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
11112
11113 def SetItemMinSize(self, item, *args):
11114 """
11115 SetItemMinSize(self, item, Size size)
11116
11117 Sets the minimum size that will be allocated for an item in the sizer.
11118 The *item* parameter can be either a window, a sizer, or the
11119 zero-based index of the item. If a window or sizer is given then it
11120 will be searched for recursivly in subsizers if neccessary.
11121 """
11122 if len(args) == 2:
11123 # for backward compatibility accept separate width,height args too
11124 return self._SetItemMinSize(item, args)
11125 else:
11126 return self._SetItemMinSize(item, args[0])
11127
11128 def AddItem(*args, **kwargs):
11129 """
11130 AddItem(self, SizerItem item)
11131
11132 Adds a `wx.SizerItem` to the sizer.
11133 """
11134 return _core_.Sizer_AddItem(*args, **kwargs)
11135
11136 def InsertItem(*args, **kwargs):
11137 """
11138 InsertItem(self, int index, SizerItem item)
11139
11140 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
11141 """
11142 return _core_.Sizer_InsertItem(*args, **kwargs)
11143
11144 def PrependItem(*args, **kwargs):
11145 """
11146 PrependItem(self, SizerItem item)
11147
11148 Prepends a `wx.SizerItem` to the sizer.
11149 """
11150 return _core_.Sizer_PrependItem(*args, **kwargs)
11151
11152 def AddMany(self, items):
11153 """
11154 AddMany is a convenience method for adding several items
11155 to a sizer at one time. Simply pass it a list of tuples,
11156 where each tuple consists of the parameters that you
11157 would normally pass to the `Add` method.
11158 """
11159 for item in items:
11160 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
11161 item = (item, )
11162 self.Add(*item)
11163
11164 # for backwards compatibility only, please do not use in new code
11165 def AddWindow(self, *args, **kw):
11166 """Compatibility alias for `Add`."""
11167 return self.Add(*args, **kw)
11168 def AddSizer(self, *args, **kw):
11169 """Compatibility alias for `Add`."""
11170 return self.Add(*args, **kw)
11171 def AddSpacer(self, *args, **kw):
11172 """Compatibility alias for `Add`."""
11173 return self.Add(*args, **kw)
11174
11175 def PrependWindow(self, *args, **kw):
11176 """Compatibility alias for `Prepend`."""
11177 return self.Prepend(*args, **kw)
11178 def PrependSizer(self, *args, **kw):
11179 """Compatibility alias for `Prepend`."""
11180 return self.Prepend(*args, **kw)
11181 def PrependSpacer(self, *args, **kw):
11182 """Compatibility alias for `Prepend`."""
11183 return self.Prepend(*args, **kw)
11184
11185 def InsertWindow(self, *args, **kw):
11186 """Compatibility alias for `Insert`."""
11187 return self.Insert(*args, **kw)
11188 def InsertSizer(self, *args, **kw):
11189 """Compatibility alias for `Insert`."""
11190 return self.Insert(*args, **kw)
11191 def InsertSpacer(self, *args, **kw):
11192 """Compatibility alias for `Insert`."""
11193 return self.Insert(*args, **kw)
11194
11195 def RemoveWindow(self, *args, **kw):
11196 """Compatibility alias for `Remove`."""
11197 return self.Remove(*args, **kw)
11198 def RemoveSizer(self, *args, **kw):
11199 """Compatibility alias for `Remove`."""
11200 return self.Remove(*args, **kw)
11201 def RemovePos(self, *args, **kw):
11202 """Compatibility alias for `Remove`."""
11203 return self.Remove(*args, **kw)
11204
11205
11206 def SetDimension(*args, **kwargs):
11207 """
11208 SetDimension(self, int x, int y, int width, int height)
11209
11210 Call this to force the sizer to take the given dimension and thus
11211 force the items owned by the sizer to resize themselves according to
11212 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
11213 methods.
11214 """
11215 return _core_.Sizer_SetDimension(*args, **kwargs)
11216
11217 def SetMinSize(*args, **kwargs):
11218 """
11219 SetMinSize(self, Size size)
11220
11221 Call this to give the sizer a minimal size. Normally, the sizer will
11222 calculate its minimal size based purely on how much space its children
11223 need. After calling this method `GetMinSize` will return either the
11224 minimal size as requested by its children or the minimal size set
11225 here, depending on which is bigger.
11226 """
11227 return _core_.Sizer_SetMinSize(*args, **kwargs)
11228
11229 def GetSize(*args, **kwargs):
11230 """
11231 GetSize(self) -> Size
11232
11233 Returns the current size of the space managed by the sizer.
11234 """
11235 return _core_.Sizer_GetSize(*args, **kwargs)
11236
11237 def GetPosition(*args, **kwargs):
11238 """
11239 GetPosition(self) -> Point
11240
11241 Returns the current position of the sizer's managed space.
11242 """
11243 return _core_.Sizer_GetPosition(*args, **kwargs)
11244
11245 def GetMinSize(*args, **kwargs):
11246 """
11247 GetMinSize(self) -> Size
11248
11249 Returns the minimal size of the sizer. This is either the combined
11250 minimal size of all the children and their borders or the minimal size
11251 set by SetMinSize, depending on which is bigger.
11252 """
11253 return _core_.Sizer_GetMinSize(*args, **kwargs)
11254
11255 def GetSizeTuple(self):
11256 return self.GetSize().Get()
11257 def GetPositionTuple(self):
11258 return self.GetPosition().Get()
11259 def GetMinSizeTuple(self):
11260 return self.GetMinSize().Get()
11261
11262 def RecalcSizes(*args, **kwargs):
11263 """
11264 RecalcSizes(self)
11265
11266 Using the sizes calculated by `CalcMin` reposition and resize all the
11267 items managed by this sizer. You should not need to call this directly as
11268 it is called by `Layout`.
11269 """
11270 return _core_.Sizer_RecalcSizes(*args, **kwargs)
11271
11272 def CalcMin(*args, **kwargs):
11273 """
11274 CalcMin(self) -> Size
11275
11276 This method is where the sizer will do the actual calculation of its
11277 children's minimal sizes. You should not need to call this directly as
11278 it is called by `Layout`.
11279 """
11280 return _core_.Sizer_CalcMin(*args, **kwargs)
11281
11282 def Layout(*args, **kwargs):
11283 """
11284 Layout(self)
11285
11286 This method will force the recalculation and layout of the items
11287 controlled by the sizer using the current space allocated to the
11288 sizer. Normally this is called automatically from the owning window's
11289 EVT_SIZE handler, but it is also useful to call it from user code when
11290 one of the items in a sizer change size, or items are added or
11291 removed.
11292 """
11293 return _core_.Sizer_Layout(*args, **kwargs)
11294
11295 def Fit(*args, **kwargs):
11296 """
11297 Fit(self, Window window) -> Size
11298
11299 Tell the sizer to resize the *window* to match the sizer's minimal
11300 size. This is commonly done in the constructor of the window itself in
11301 order to set its initial size to match the needs of the children as
11302 determined by the sizer. Returns the new size.
11303
11304 For a top level window this is the total window size, not the client size.
11305 """
11306 return _core_.Sizer_Fit(*args, **kwargs)
11307
11308 def FitInside(*args, **kwargs):
11309 """
11310 FitInside(self, Window window)
11311
11312 Tell the sizer to resize the *virtual size* of the *window* to match the
11313 sizer's minimal size. This will not alter the on screen size of the
11314 window, but may cause the addition/removal/alteration of scrollbars
11315 required to view the virtual area in windows which manage it.
11316
11317 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
11318
11319 """
11320 return _core_.Sizer_FitInside(*args, **kwargs)
11321
11322 def SetSizeHints(*args, **kwargs):
11323 """
11324 SetSizeHints(self, Window window)
11325
11326 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
11327 match the sizer's minimal size. This is commonly done in the
11328 constructor of the window itself if the window is resizable (as are
11329 many dialogs under Unix and frames on probably all platforms) in order
11330 to prevent the window from being sized smaller than the minimal size
11331 required by the sizer.
11332 """
11333 return _core_.Sizer_SetSizeHints(*args, **kwargs)
11334
11335 def SetVirtualSizeHints(*args, **kwargs):
11336 """
11337 SetVirtualSizeHints(self, Window window)
11338
11339 Tell the sizer to set the minimal size of the window virtual area to
11340 match the sizer's minimal size. For windows with managed scrollbars
11341 this will set them appropriately.
11342
11343 :see: `wx.ScrolledWindow.SetScrollbars`
11344
11345 """
11346 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
11347
11348 def Clear(*args, **kwargs):
11349 """
11350 Clear(self, bool deleteWindows=False)
11351
11352 Clear all items from the sizer, optionally destroying the window items
11353 as well.
11354 """
11355 return _core_.Sizer_Clear(*args, **kwargs)
11356
11357 def DeleteWindows(*args, **kwargs):
11358 """
11359 DeleteWindows(self)
11360
11361 Destroy all windows managed by the sizer.
11362 """
11363 return _core_.Sizer_DeleteWindows(*args, **kwargs)
11364
11365 def GetChildren(*args, **kwargs):
11366 """
11367 GetChildren(self) -> list
11368
11369 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
11370 """
11371 return _core_.Sizer_GetChildren(*args, **kwargs)
11372
11373 def Show(*args, **kwargs):
11374 """
11375 Show(self, item, bool show=True, bool recursive=false) -> bool
11376
11377 Shows or hides an item managed by the sizer. To make a sizer item
11378 disappear or reappear, use Show followed by `Layout`. The *item*
11379 parameter can be either a window, a sizer, or the zero-based index of
11380 the item. Use the recursive parameter to show or hide an item in a
11381 subsizer. Returns True if the item was found.
11382 """
11383 return _core_.Sizer_Show(*args, **kwargs)
11384
11385 def IsShown(*args, **kwargs):
11386 """
11387 IsShown(self, item)
11388
11389 Determines if the item is currently shown. To make a sizer
11390 item disappear or reappear, use Show followed by `Layout`. The *item*
11391 parameter can be either a window, a sizer, or the zero-based index of
11392 the item.
11393 """
11394 return _core_.Sizer_IsShown(*args, **kwargs)
11395
11396 def Hide(self, item, recursive=False):
11397 """
11398 A convenience method for `Show` (item, False, recursive).
11399 """
11400 return self.Show(item, False, recursive)
11401
11402 def ShowItems(*args, **kwargs):
11403 """
11404 ShowItems(self, bool show)
11405
11406 Recursively call `wx.SizerItem.Show` on all sizer items.
11407 """
11408 return _core_.Sizer_ShowItems(*args, **kwargs)
11409
11410 Sizer_swigregister = _core_.Sizer_swigregister
11411 Sizer_swigregister(Sizer)
11412
11413 class PySizer(Sizer):
11414 """
11415 wx.PySizer is a special version of `wx.Sizer` that has been
11416 instrumented to allow the C++ virtual methods to be overloaded in
11417 Python derived classes. You would derive from this class if you are
11418 wanting to implement a custom sizer in Python code. Simply implement
11419 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
11420 For example::
11421
11422 class MySizer(wx.PySizer):
11423 def __init__(self):
11424 wx.PySizer.__init__(self)
11425
11426 def CalcMin(self):
11427 for item in self.GetChildren():
11428 # calculate the total minimum width and height needed
11429 # by all items in the sizer according to this sizer's
11430 # layout algorithm.
11431 ...
11432 return wx.Size(width, height)
11433
11434 def RecalcSizes(self):
11435 # find the space allotted to this sizer
11436 pos = self.GetPosition()
11437 size = self.GetSize()
11438 for item in self.GetChildren():
11439 # Recalculate (if necessary) the position and size of
11440 # each item and then call item.SetDimension to do the
11441 # actual positioning and sizing of the items within the
11442 # space alloted to this sizer.
11443 ...
11444 item.SetDimension(itemPos, itemSize)
11445
11446
11447 When `Layout` is called it first calls `CalcMin` followed by
11448 `RecalcSizes` so you can optimize a bit by saving the results of
11449 `CalcMin` and reusing them in `RecalcSizes`.
11450
11451 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
11452
11453
11454 """
11455 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11456 __repr__ = _swig_repr
11457 def __init__(self, *args, **kwargs):
11458 """
11459 __init__(self) -> PySizer
11460
11461 Creates a wx.PySizer. Must be called from the __init__ in the derived
11462 class.
11463 """
11464 _core_.PySizer_swiginit(self,_core_.new_PySizer(*args, **kwargs))
11465 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
11466
11467 def _setCallbackInfo(*args, **kwargs):
11468 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
11469 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
11470
11471 PySizer_swigregister = _core_.PySizer_swigregister
11472 PySizer_swigregister(PySizer)
11473
11474 #---------------------------------------------------------------------------
11475
11476 class BoxSizer(Sizer):
11477 """
11478 The basic idea behind a box sizer is that windows will most often be
11479 laid out in rather simple basic geometry, typically in a row or a
11480 column or nested hierarchies of either. A wx.BoxSizer will lay out
11481 its items in a simple row or column, depending on the orientation
11482 parameter passed to the constructor.
11483 """
11484 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11485 __repr__ = _swig_repr
11486 def __init__(self, *args, **kwargs):
11487 """
11488 __init__(self, int orient=HORIZONTAL) -> BoxSizer
11489
11490 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
11491 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
11492 sizer.
11493 """
11494 _core_.BoxSizer_swiginit(self,_core_.new_BoxSizer(*args, **kwargs))
11495 self._setOORInfo(self)
11496
11497 def GetOrientation(*args, **kwargs):
11498 """
11499 GetOrientation(self) -> int
11500
11501 Returns the current orientation of the sizer.
11502 """
11503 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
11504
11505 def SetOrientation(*args, **kwargs):
11506 """
11507 SetOrientation(self, int orient)
11508
11509 Resets the orientation of the sizer.
11510 """
11511 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
11512
11513 BoxSizer_swigregister = _core_.BoxSizer_swigregister
11514 BoxSizer_swigregister(BoxSizer)
11515
11516 #---------------------------------------------------------------------------
11517
11518 class StaticBoxSizer(BoxSizer):
11519 """
11520 wx.StaticBoxSizer derives from and functions identically to the
11521 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
11522 manages. Note that this static box must be created separately and
11523 passed to the sizer constructor.
11524 """
11525 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11526 __repr__ = _swig_repr
11527 def __init__(self, *args, **kwargs):
11528 """
11529 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
11530
11531 Constructor. It takes an associated static box and the orientation
11532 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
11533 ``wx.HORIZONTAL``.
11534 """
11535 _core_.StaticBoxSizer_swiginit(self,_core_.new_StaticBoxSizer(*args, **kwargs))
11536 self._setOORInfo(self)
11537
11538 def GetStaticBox(*args, **kwargs):
11539 """
11540 GetStaticBox(self) -> StaticBox
11541
11542 Returns the static box associated with this sizer.
11543 """
11544 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
11545
11546 StaticBoxSizer_swigregister = _core_.StaticBoxSizer_swigregister
11547 StaticBoxSizer_swigregister(StaticBoxSizer)
11548
11549 #---------------------------------------------------------------------------
11550
11551 class GridSizer(Sizer):
11552 """
11553 A grid sizer is a sizer which lays out its children in a
11554 two-dimensional table with all cells having the same size. In other
11555 words, the width of each cell within the grid is the width of the
11556 widest item added to the sizer and the height of each grid cell is the
11557 height of the tallest item. An optional vertical and/or horizontal
11558 gap between items can also be specified (in pixels.)
11559
11560 Items are placed in the cells of the grid in the order they are added,
11561 in row-major order. In other words, the first row is filled first,
11562 then the second, and so on until all items have been added. (If
11563 neccessary, additional rows will be added as items are added.) If you
11564 need to have greater control over the cells that items are placed in
11565 then use the `wx.GridBagSizer`.
11566
11567 """
11568 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11569 __repr__ = _swig_repr
11570 def __init__(self, *args, **kwargs):
11571 """
11572 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
11573
11574 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
11575 of columns and rows in the sizer - if either of the parameters is
11576 zero, it will be calculated to from the total number of children in
11577 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
11578 define extra space between all children.
11579 """
11580 _core_.GridSizer_swiginit(self,_core_.new_GridSizer(*args, **kwargs))
11581 self._setOORInfo(self)
11582
11583 def SetCols(*args, **kwargs):
11584 """
11585 SetCols(self, int cols)
11586
11587 Sets the number of columns in the sizer.
11588 """
11589 return _core_.GridSizer_SetCols(*args, **kwargs)
11590
11591 def SetRows(*args, **kwargs):
11592 """
11593 SetRows(self, int rows)
11594
11595 Sets the number of rows in the sizer.
11596 """
11597 return _core_.GridSizer_SetRows(*args, **kwargs)
11598
11599 def SetVGap(*args, **kwargs):
11600 """
11601 SetVGap(self, int gap)
11602
11603 Sets the vertical gap (in pixels) between the cells in the sizer.
11604 """
11605 return _core_.GridSizer_SetVGap(*args, **kwargs)
11606
11607 def SetHGap(*args, **kwargs):
11608 """
11609 SetHGap(self, int gap)
11610
11611 Sets the horizontal gap (in pixels) between cells in the sizer
11612 """
11613 return _core_.GridSizer_SetHGap(*args, **kwargs)
11614
11615 def GetCols(*args, **kwargs):
11616 """
11617 GetCols(self) -> int
11618
11619 Returns the number of columns in the sizer.
11620 """
11621 return _core_.GridSizer_GetCols(*args, **kwargs)
11622
11623 def GetRows(*args, **kwargs):
11624 """
11625 GetRows(self) -> int
11626
11627 Returns the number of rows in the sizer.
11628 """
11629 return _core_.GridSizer_GetRows(*args, **kwargs)
11630
11631 def GetVGap(*args, **kwargs):
11632 """
11633 GetVGap(self) -> int
11634
11635 Returns the vertical gap (in pixels) between the cells in the sizer.
11636 """
11637 return _core_.GridSizer_GetVGap(*args, **kwargs)
11638
11639 def GetHGap(*args, **kwargs):
11640 """
11641 GetHGap(self) -> int
11642
11643 Returns the horizontal gap (in pixels) between cells in the sizer.
11644 """
11645 return _core_.GridSizer_GetHGap(*args, **kwargs)
11646
11647 def CalcRowsCols(self):
11648 """
11649 CalcRowsCols() -> (rows, cols)
11650
11651 Calculates how many rows and columns will be in the sizer based
11652 on the current number of items and also the rows, cols specified
11653 in the constructor.
11654 """
11655 nitems = len(self.GetChildren())
11656 rows = self.GetRows()
11657 cols = self.GetCols()
11658 assert rows != 0 or cols != 0, "Grid sizer must have either rows or columns fixed"
11659 if cols != 0:
11660 rows = (nitems + cols - 1) / cols
11661 elif rows != 0:
11662 cols = (nitems + rows - 1) / rows
11663 return (rows, cols)
11664
11665 GridSizer_swigregister = _core_.GridSizer_swigregister
11666 GridSizer_swigregister(GridSizer)
11667
11668 #---------------------------------------------------------------------------
11669
11670 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
11671 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
11672 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
11673 class FlexGridSizer(GridSizer):
11674 """
11675 A flex grid sizer is a sizer which lays out its children in a
11676 two-dimensional table with all table cells in one row having the same
11677 height and all cells in one column having the same width, but all
11678 rows or all columns are not necessarily the same height or width as in
11679 the `wx.GridSizer`.
11680
11681 wx.FlexGridSizer can also size items equally in one direction but
11682 unequally ("flexibly") in the other. If the sizer is only flexible
11683 in one direction (this can be changed using `SetFlexibleDirection`), it
11684 needs to be decided how the sizer should grow in the other ("non
11685 flexible") direction in order to fill the available space. The
11686 `SetNonFlexibleGrowMode` method serves this purpose.
11687
11688
11689 """
11690 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11691 __repr__ = _swig_repr
11692 def __init__(self, *args, **kwargs):
11693 """
11694 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
11695
11696 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
11697 number of columns and rows in the sizer - if either of the parameters
11698 is zero, it will be calculated to from the total number of children in
11699 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
11700 define extra space between all children.
11701 """
11702 _core_.FlexGridSizer_swiginit(self,_core_.new_FlexGridSizer(*args, **kwargs))
11703 self._setOORInfo(self)
11704
11705 def AddGrowableRow(*args, **kwargs):
11706 """
11707 AddGrowableRow(self, size_t idx, int proportion=0)
11708
11709 Specifies that row *idx* (starting from zero) should be grown if there
11710 is extra space available to the sizer.
11711
11712 The *proportion* parameter has the same meaning as the stretch factor
11713 for the box sizers except that if all proportions are 0, then all
11714 columns are resized equally (instead of not being resized at all).
11715 """
11716 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
11717
11718 def RemoveGrowableRow(*args, **kwargs):
11719 """
11720 RemoveGrowableRow(self, size_t idx)
11721
11722 Specifies that row *idx* is no longer growable.
11723 """
11724 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
11725
11726 def AddGrowableCol(*args, **kwargs):
11727 """
11728 AddGrowableCol(self, size_t idx, int proportion=0)
11729
11730 Specifies that column *idx* (starting from zero) should be grown if
11731 there is extra space available to the sizer.
11732
11733 The *proportion* parameter has the same meaning as the stretch factor
11734 for the box sizers except that if all proportions are 0, then all
11735 columns are resized equally (instead of not being resized at all).
11736 """
11737 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
11738
11739 def RemoveGrowableCol(*args, **kwargs):
11740 """
11741 RemoveGrowableCol(self, size_t idx)
11742
11743 Specifies that column *idx* is no longer growable.
11744 """
11745 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
11746
11747 def SetFlexibleDirection(*args, **kwargs):
11748 """
11749 SetFlexibleDirection(self, int direction)
11750
11751 Specifies whether the sizer should flexibly resize its columns, rows,
11752 or both. Argument *direction* can be one of the following values. Any
11753 other value is ignored.
11754
11755 ============== =======================================
11756 wx.VERTICAL Rows are flexibly sized.
11757 wx.HORIZONTAL Columns are flexibly sized.
11758 wx.BOTH Both rows and columns are flexibly sized
11759 (this is the default value).
11760 ============== =======================================
11761
11762 Note that this method does not trigger relayout.
11763
11764 """
11765 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
11766
11767 def GetFlexibleDirection(*args, **kwargs):
11768 """
11769 GetFlexibleDirection(self) -> int
11770
11771 Returns a value that specifies whether the sizer
11772 flexibly resizes its columns, rows, or both (default).
11773
11774 :see: `SetFlexibleDirection`
11775 """
11776 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
11777
11778 def SetNonFlexibleGrowMode(*args, **kwargs):
11779 """
11780 SetNonFlexibleGrowMode(self, int mode)
11781
11782 Specifies how the sizer should grow in the non-flexible direction if
11783 there is one (so `SetFlexibleDirection` must have been called
11784 previously). Argument *mode* can be one of the following values:
11785
11786 ========================== =================================================
11787 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
11788 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
11789 `AddGrowableCol` and `AddGrowableRow`. In this
11790 case equal sizing applies to minimum sizes of
11791 columns or rows (this is the default value).
11792 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
11793 the non flexible direction, whether they are
11794 growable or not in the flexbile direction.
11795 ========================== =================================================
11796
11797 Note that this method does not trigger relayout.
11798
11799
11800 """
11801 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
11802
11803 def GetNonFlexibleGrowMode(*args, **kwargs):
11804 """
11805 GetNonFlexibleGrowMode(self) -> int
11806
11807 Returns the value that specifies how the sizer grows in the
11808 non-flexible direction if there is one.
11809
11810 :see: `SetNonFlexibleGrowMode`
11811 """
11812 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
11813
11814 def GetRowHeights(*args, **kwargs):
11815 """
11816 GetRowHeights(self) -> list
11817
11818 Returns a list of integers representing the heights of each of the
11819 rows in the sizer.
11820 """
11821 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
11822
11823 def GetColWidths(*args, **kwargs):
11824 """
11825 GetColWidths(self) -> list
11826
11827 Returns a list of integers representing the widths of each of the
11828 columns in the sizer.
11829 """
11830 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
11831
11832 FlexGridSizer_swigregister = _core_.FlexGridSizer_swigregister
11833 FlexGridSizer_swigregister(FlexGridSizer)
11834
11835 class StdDialogButtonSizer(BoxSizer):
11836 """
11837 A special sizer that knows how to order and position standard buttons
11838 in order to conform to the current platform's standards. You simply
11839 need to add each `wx.Button` to the sizer, and be sure to create the
11840 buttons using the standard ID's. Then call `Realize` and the sizer
11841 will take care of the rest.
11842
11843 """
11844 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11845 __repr__ = _swig_repr
11846 def __init__(self, *args, **kwargs):
11847 """__init__(self) -> StdDialogButtonSizer"""
11848 _core_.StdDialogButtonSizer_swiginit(self,_core_.new_StdDialogButtonSizer(*args, **kwargs))
11849 def AddButton(*args, **kwargs):
11850 """
11851 AddButton(self, wxButton button)
11852
11853 Use this to add the buttons to this sizer. Do not use the `Add`
11854 method in the base class.
11855 """
11856 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
11857
11858 def Realize(*args, **kwargs):
11859 """
11860 Realize(self)
11861
11862 This funciton needs to be called after all the buttons have been added
11863 to the sizer. It will reorder them and position them in a platform
11864 specifc manner.
11865 """
11866 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
11867
11868 def SetAffirmativeButton(*args, **kwargs):
11869 """SetAffirmativeButton(self, wxButton button)"""
11870 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
11871
11872 def SetNegativeButton(*args, **kwargs):
11873 """SetNegativeButton(self, wxButton button)"""
11874 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
11875
11876 def SetCancelButton(*args, **kwargs):
11877 """SetCancelButton(self, wxButton button)"""
11878 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
11879
11880 def GetAffirmativeButton(*args, **kwargs):
11881 """GetAffirmativeButton(self) -> wxButton"""
11882 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
11883
11884 def GetApplyButton(*args, **kwargs):
11885 """GetApplyButton(self) -> wxButton"""
11886 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
11887
11888 def GetNegativeButton(*args, **kwargs):
11889 """GetNegativeButton(self) -> wxButton"""
11890 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
11891
11892 def GetCancelButton(*args, **kwargs):
11893 """GetCancelButton(self) -> wxButton"""
11894 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
11895
11896 def GetHelpButton(*args, **kwargs):
11897 """GetHelpButton(self) -> wxButton"""
11898 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
11899
11900 StdDialogButtonSizer_swigregister = _core_.StdDialogButtonSizer_swigregister
11901 StdDialogButtonSizer_swigregister(StdDialogButtonSizer)
11902
11903 #---------------------------------------------------------------------------
11904
11905 class GBPosition(object):
11906 """
11907 This class represents the position of an item in a virtual grid of
11908 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11909 typemaps that will automatically convert from a 2-element sequence of
11910 integers to a wx.GBPosition, so you can use the more pythonic
11911 representation of the position nearly transparently in Python code.
11912 """
11913 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11914 __repr__ = _swig_repr
11915 def __init__(self, *args, **kwargs):
11916 """
11917 __init__(self, int row=0, int col=0) -> GBPosition
11918
11919 This class represents the position of an item in a virtual grid of
11920 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11921 typemaps that will automatically convert from a 2-element sequence of
11922 integers to a wx.GBPosition, so you can use the more pythonic
11923 representation of the position nearly transparently in Python code.
11924 """
11925 _core_.GBPosition_swiginit(self,_core_.new_GBPosition(*args, **kwargs))
11926 __swig_destroy__ = _core_.delete_GBPosition
11927 __del__ = lambda self : None;
11928 def GetRow(*args, **kwargs):
11929 """GetRow(self) -> int"""
11930 return _core_.GBPosition_GetRow(*args, **kwargs)
11931
11932 def GetCol(*args, **kwargs):
11933 """GetCol(self) -> int"""
11934 return _core_.GBPosition_GetCol(*args, **kwargs)
11935
11936 def SetRow(*args, **kwargs):
11937 """SetRow(self, int row)"""
11938 return _core_.GBPosition_SetRow(*args, **kwargs)
11939
11940 def SetCol(*args, **kwargs):
11941 """SetCol(self, int col)"""
11942 return _core_.GBPosition_SetCol(*args, **kwargs)
11943
11944 def __eq__(*args, **kwargs):
11945 """
11946 __eq__(self, PyObject other) -> bool
11947
11948 Compare GBPosition for equality.
11949 """
11950 return _core_.GBPosition___eq__(*args, **kwargs)
11951
11952 def __ne__(*args, **kwargs):
11953 """
11954 __ne__(self, PyObject other) -> bool
11955
11956 Compare GBPosition for inequality.
11957 """
11958 return _core_.GBPosition___ne__(*args, **kwargs)
11959
11960 def Set(*args, **kwargs):
11961 """Set(self, int row=0, int col=0)"""
11962 return _core_.GBPosition_Set(*args, **kwargs)
11963
11964 def Get(*args, **kwargs):
11965 """Get(self) -> PyObject"""
11966 return _core_.GBPosition_Get(*args, **kwargs)
11967
11968 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
11969 def __str__(self): return str(self.Get())
11970 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
11971 def __len__(self): return len(self.Get())
11972 def __getitem__(self, index): return self.Get()[index]
11973 def __setitem__(self, index, val):
11974 if index == 0: self.SetRow(val)
11975 elif index == 1: self.SetCol(val)
11976 else: raise IndexError
11977 def __nonzero__(self): return self.Get() != (0,0)
11978 __safe_for_unpickling__ = True
11979 def __reduce__(self): return (wx.GBPosition, self.Get())
11980
11981 row = property(GetRow, SetRow)
11982 col = property(GetCol, SetCol)
11983
11984 GBPosition_swigregister = _core_.GBPosition_swigregister
11985 GBPosition_swigregister(GBPosition)
11986
11987 class GBSpan(object):
11988 """
11989 This class is used to hold the row and column spanning attributes of
11990 items in a `wx.GridBagSizer`. wxPython has typemaps that will
11991 automatically convert from a 2-element sequence of integers to a
11992 wx.GBSpan, so you can use the more pythonic representation of the span
11993 nearly transparently in Python code.
11994
11995 """
11996 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11997 __repr__ = _swig_repr
11998 def __init__(self, *args, **kwargs):
11999 """
12000 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
12001
12002 Construct a new wxGBSpan, optionally setting the rowspan and
12003 colspan. The default is (1,1). (Meaning that the item occupies one
12004 cell in each direction.
12005 """
12006 _core_.GBSpan_swiginit(self,_core_.new_GBSpan(*args, **kwargs))
12007 __swig_destroy__ = _core_.delete_GBSpan
12008 __del__ = lambda self : None;
12009 def GetRowspan(*args, **kwargs):
12010 """GetRowspan(self) -> int"""
12011 return _core_.GBSpan_GetRowspan(*args, **kwargs)
12012
12013 def GetColspan(*args, **kwargs):
12014 """GetColspan(self) -> int"""
12015 return _core_.GBSpan_GetColspan(*args, **kwargs)
12016
12017 def SetRowspan(*args, **kwargs):
12018 """SetRowspan(self, int rowspan)"""
12019 return _core_.GBSpan_SetRowspan(*args, **kwargs)
12020
12021 def SetColspan(*args, **kwargs):
12022 """SetColspan(self, int colspan)"""
12023 return _core_.GBSpan_SetColspan(*args, **kwargs)
12024
12025 def __eq__(*args, **kwargs):
12026 """
12027 __eq__(self, PyObject other) -> bool
12028
12029 Compare wxGBSpan for equality.
12030 """
12031 return _core_.GBSpan___eq__(*args, **kwargs)
12032
12033 def __ne__(*args, **kwargs):
12034 """
12035 __ne__(self, PyObject other) -> bool
12036
12037 Compare GBSpan for inequality.
12038 """
12039 return _core_.GBSpan___ne__(*args, **kwargs)
12040
12041 def Set(*args, **kwargs):
12042 """Set(self, int rowspan=1, int colspan=1)"""
12043 return _core_.GBSpan_Set(*args, **kwargs)
12044
12045 def Get(*args, **kwargs):
12046 """Get(self) -> PyObject"""
12047 return _core_.GBSpan_Get(*args, **kwargs)
12048
12049 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
12050 def __str__(self): return str(self.Get())
12051 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
12052 def __len__(self): return len(self.Get())
12053 def __getitem__(self, index): return self.Get()[index]
12054 def __setitem__(self, index, val):
12055 if index == 0: self.SetRowspan(val)
12056 elif index == 1: self.SetColspan(val)
12057 else: raise IndexError
12058 def __nonzero__(self): return self.Get() != (0,0)
12059 __safe_for_unpickling__ = True
12060 def __reduce__(self): return (wx.GBSpan, self.Get())
12061
12062 rowspan = property(GetRowspan, SetRowspan)
12063 colspan = property(GetColspan, SetColspan)
12064
12065 GBSpan_swigregister = _core_.GBSpan_swigregister
12066 GBSpan_swigregister(GBSpan)
12067
12068 class GBSizerItem(SizerItem):
12069 """
12070 The wx.GBSizerItem class is used to track the additional data about
12071 items in a `wx.GridBagSizer` such as the item's position in the grid
12072 and how many rows or columns it spans.
12073
12074 """
12075 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12076 __repr__ = _swig_repr
12077 def __init__(self, *args, **kwargs):
12078 """
12079 __init__(self) -> GBSizerItem
12080
12081 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
12082 size will need to be set, as well as a position and span before this
12083 item can be used in a Sizer.
12084
12085 You will probably never need to create a wx.GBSizerItem directly as they
12086 are created automatically when the sizer's Add method is called.
12087 """
12088 _core_.GBSizerItem_swiginit(self,_core_.new_GBSizerItem(*args, **kwargs))
12089 __swig_destroy__ = _core_.delete_GBSizerItem
12090 __del__ = lambda self : None;
12091 def GetPos(*args, **kwargs):
12092 """
12093 GetPos(self) -> GBPosition
12094
12095 Get the grid position of the item
12096 """
12097 return _core_.GBSizerItem_GetPos(*args, **kwargs)
12098
12099 def GetPosTuple(self): return self.GetPos().Get()
12100 def GetSpan(*args, **kwargs):
12101 """
12102 GetSpan(self) -> GBSpan
12103
12104 Get the row and column spanning of the item
12105 """
12106 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
12107
12108 def GetSpanTuple(self): return self.GetSpan().Get()
12109 def SetPos(*args, **kwargs):
12110 """
12111 SetPos(self, GBPosition pos) -> bool
12112
12113 If the item is already a member of a sizer then first ensure that
12114 there is no other item that would intersect with this one at the new
12115 position, then set the new position. Returns True if the change is
12116 successful and after the next Layout() the item will be moved.
12117 """
12118 return _core_.GBSizerItem_SetPos(*args, **kwargs)
12119
12120 def SetSpan(*args, **kwargs):
12121 """
12122 SetSpan(self, GBSpan span) -> bool
12123
12124 If the item is already a member of a sizer then first ensure that
12125 there is no other item that would intersect with this one with its new
12126 spanning size, then set the new spanning. Returns True if the change
12127 is successful and after the next Layout() the item will be resized.
12128
12129 """
12130 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
12131
12132 def Intersects(*args, **kwargs):
12133 """
12134 Intersects(self, GBSizerItem other) -> bool
12135
12136 Returns True if this item and the other item instersect.
12137 """
12138 return _core_.GBSizerItem_Intersects(*args, **kwargs)
12139
12140 def IntersectsPos(*args, **kwargs):
12141 """
12142 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
12143
12144 Returns True if the given pos/span would intersect with this item.
12145 """
12146 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
12147
12148 def GetEndPos(*args, **kwargs):
12149 """
12150 GetEndPos(self) -> GBPosition
12151
12152 Get the row and column of the endpoint of this item.
12153 """
12154 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
12155
12156 def GetGBSizer(*args, **kwargs):
12157 """
12158 GetGBSizer(self) -> GridBagSizer
12159
12160 Get the sizer this item is a member of.
12161 """
12162 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
12163
12164 def SetGBSizer(*args, **kwargs):
12165 """
12166 SetGBSizer(self, GridBagSizer sizer)
12167
12168 Set the sizer this item is a member of.
12169 """
12170 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
12171
12172 GBSizerItem_swigregister = _core_.GBSizerItem_swigregister
12173 GBSizerItem_swigregister(GBSizerItem)
12174 DefaultSpan = cvar.DefaultSpan
12175
12176 def GBSizerItemWindow(*args, **kwargs):
12177 """
12178 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
12179 int border, PyObject userData=None) -> GBSizerItem
12180
12181 Construct a `wx.GBSizerItem` for a window.
12182 """
12183 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
12184 return val
12185
12186 def GBSizerItemSizer(*args, **kwargs):
12187 """
12188 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
12189 int border, PyObject userData=None) -> GBSizerItem
12190
12191 Construct a `wx.GBSizerItem` for a sizer
12192 """
12193 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
12194 return val
12195
12196 def GBSizerItemSpacer(*args, **kwargs):
12197 """
12198 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
12199 int flag, int border, PyObject userData=None) -> GBSizerItem
12200
12201 Construct a `wx.GBSizerItem` for a spacer.
12202 """
12203 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
12204 return val
12205
12206 class GridBagSizer(FlexGridSizer):
12207 """
12208 A `wx.Sizer` that can lay out items in a virtual grid like a
12209 `wx.FlexGridSizer` but in this case explicit positioning of the items
12210 is allowed using `wx.GBPosition`, and items can optionally span more
12211 than one row and/or column using `wx.GBSpan`. The total size of the
12212 virtual grid is determined by the largest row and column that items are
12213 positioned at, adjusted for spanning.
12214
12215 """
12216 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12217 __repr__ = _swig_repr
12218 def __init__(self, *args, **kwargs):
12219 """
12220 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
12221
12222 Constructor, with optional parameters to specify the gap between the
12223 rows and columns.
12224 """
12225 _core_.GridBagSizer_swiginit(self,_core_.new_GridBagSizer(*args, **kwargs))
12226 self._setOORInfo(self)
12227
12228 def Add(*args, **kwargs):
12229 """
12230 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
12231 int border=0, userData=None) -> wx.GBSizerItem
12232
12233 Adds an item to the sizer at the grid cell *pos*, optionally spanning
12234 more than one row or column as specified with *span*. The remaining
12235 args behave similarly to `wx.Sizer.Add`.
12236
12237 Returns True if the item was successfully placed at the given cell
12238 position, False if something was already there.
12239
12240 """
12241 return _core_.GridBagSizer_Add(*args, **kwargs)
12242
12243 def AddItem(*args, **kwargs):
12244 """
12245 Add(self, GBSizerItem item) -> wx.GBSizerItem
12246
12247 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
12248 the item was successfully placed at its given cell position, False if
12249 something was already there.
12250 """
12251 return _core_.GridBagSizer_AddItem(*args, **kwargs)
12252
12253 def GetCellSize(*args, **kwargs):
12254 """
12255 GetCellSize(self, int row, int col) -> Size
12256
12257 Get the size of the specified cell, including hgap and
12258 vgap. Only valid after a Layout.
12259 """
12260 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
12261
12262 def GetEmptyCellSize(*args, **kwargs):
12263 """
12264 GetEmptyCellSize(self) -> Size
12265
12266 Get the size used for cells in the grid with no item.
12267 """
12268 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
12269
12270 def SetEmptyCellSize(*args, **kwargs):
12271 """
12272 SetEmptyCellSize(self, Size sz)
12273
12274 Set the size used for cells in the grid with no item.
12275 """
12276 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
12277
12278 def GetItemPosition(*args):
12279 """
12280 GetItemPosition(self, item) -> GBPosition
12281
12282 Get the grid position of the specified *item* where *item* is either a
12283 window or subsizer that is a member of this sizer, or a zero-based
12284 index of an item.
12285 """
12286 return _core_.GridBagSizer_GetItemPosition(*args)
12287
12288 def SetItemPosition(*args):
12289 """
12290 SetItemPosition(self, item, GBPosition pos) -> bool
12291
12292 Set the grid position of the specified *item* where *item* is either a
12293 window or subsizer that is a member of this sizer, or a zero-based
12294 index of an item. Returns True on success. If the move is not
12295 allowed (because an item is already there) then False is returned.
12296
12297 """
12298 return _core_.GridBagSizer_SetItemPosition(*args)
12299
12300 def GetItemSpan(*args):
12301 """
12302 GetItemSpan(self, item) -> GBSpan
12303
12304 Get the row/col spanning of the specified *item* where *item* is
12305 either a window or subsizer that is a member of this sizer, or a
12306 zero-based index of an item.
12307 """
12308 return _core_.GridBagSizer_GetItemSpan(*args)
12309
12310 def SetItemSpan(*args):
12311 """
12312 SetItemSpan(self, item, GBSpan span) -> bool
12313
12314 Set the row/col spanning of the specified *item* where *item* is
12315 either a window or subsizer that is a member of this sizer, or a
12316 zero-based index of an item. Returns True on success. If the move is
12317 not allowed (because an item is already there) then False is returned.
12318 """
12319 return _core_.GridBagSizer_SetItemSpan(*args)
12320
12321 def FindItem(*args):
12322 """
12323 FindItem(self, item) -> GBSizerItem
12324
12325 Find the sizer item for the given window or subsizer, returns None if
12326 not found. (non-recursive)
12327 """
12328 return _core_.GridBagSizer_FindItem(*args)
12329
12330 def FindItemAtPosition(*args, **kwargs):
12331 """
12332 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
12333
12334 Return the sizer item for the given grid cell, or None if there is no
12335 item at that position. (non-recursive)
12336 """
12337 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
12338
12339 def FindItemAtPoint(*args, **kwargs):
12340 """
12341 FindItemAtPoint(self, Point pt) -> GBSizerItem
12342
12343 Return the sizer item located at the point given in *pt*, or None if
12344 there is no item at that point. The (x,y) coordinates in pt correspond
12345 to the client coordinates of the window using the sizer for
12346 layout. (non-recursive)
12347 """
12348 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
12349
12350 def CheckForIntersection(*args, **kwargs):
12351 """
12352 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
12353
12354 Look at all items and see if any intersect (or would overlap) the
12355 given *item*. Returns True if so, False if there would be no overlap.
12356 If an *excludeItem* is given then it will not be checked for
12357 intersection, for example it may be the item we are checking the
12358 position of.
12359
12360 """
12361 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
12362
12363 def CheckForIntersectionPos(*args, **kwargs):
12364 """
12365 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
12366
12367 Look at all items and see if any intersect (or would overlap) the
12368 given position and span. Returns True if so, False if there would be
12369 no overlap. If an *excludeItem* is given then it will not be checked
12370 for intersection, for example it may be the item we are checking the
12371 position of.
12372 """
12373 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
12374
12375 GridBagSizer_swigregister = _core_.GridBagSizer_swigregister
12376 GridBagSizer_swigregister(GridBagSizer)
12377
12378 #---------------------------------------------------------------------------
12379
12380 Left = _core_.Left
12381 Top = _core_.Top
12382 Right = _core_.Right
12383 Bottom = _core_.Bottom
12384 Width = _core_.Width
12385 Height = _core_.Height
12386 Centre = _core_.Centre
12387 Center = _core_.Center
12388 CentreX = _core_.CentreX
12389 CentreY = _core_.CentreY
12390 Unconstrained = _core_.Unconstrained
12391 AsIs = _core_.AsIs
12392 PercentOf = _core_.PercentOf
12393 Above = _core_.Above
12394 Below = _core_.Below
12395 LeftOf = _core_.LeftOf
12396 RightOf = _core_.RightOf
12397 SameAs = _core_.SameAs
12398 Absolute = _core_.Absolute
12399 class IndividualLayoutConstraint(Object):
12400 """
12401 Objects of this class are stored in the `wx.LayoutConstraints` class as
12402 one of eight possible constraints that a window can be involved in.
12403 You will never need to create an instance of
12404 wx.IndividualLayoutConstraint, rather you should create a
12405 `wx.LayoutConstraints` instance and use the individual contstraints
12406 that it contains.
12407 """
12408 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12409 def __init__(self): raise AttributeError, "No constructor defined"
12410 __repr__ = _swig_repr
12411 def Set(*args, **kwargs):
12412 """
12413 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
12414
12415 Sets the properties of the constraint. Normally called by one of the
12416 convenience functions such as Above, RightOf, SameAs.
12417 """
12418 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
12419
12420 def LeftOf(*args, **kwargs):
12421 """
12422 LeftOf(self, Window sibling, int marg=0)
12423
12424 Constrains this edge to be to the left of the given window, with an
12425 optional margin. Implicitly, this is relative to the left edge of the
12426 other window.
12427 """
12428 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
12429
12430 def RightOf(*args, **kwargs):
12431 """
12432 RightOf(self, Window sibling, int marg=0)
12433
12434 Constrains this edge to be to the right of the given window, with an
12435 optional margin. Implicitly, this is relative to the right edge of the
12436 other window.
12437 """
12438 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
12439
12440 def Above(*args, **kwargs):
12441 """
12442 Above(self, Window sibling, int marg=0)
12443
12444 Constrains this edge to be above the given window, with an optional
12445 margin. Implicitly, this is relative to the top edge of the other
12446 window.
12447 """
12448 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
12449
12450 def Below(*args, **kwargs):
12451 """
12452 Below(self, Window sibling, int marg=0)
12453
12454 Constrains this edge to be below the given window, with an optional
12455 margin. Implicitly, this is relative to the bottom edge of the other
12456 window.
12457 """
12458 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
12459
12460 def SameAs(*args, **kwargs):
12461 """
12462 SameAs(self, Window otherW, int edge, int marg=0)
12463
12464 Constrains this edge or dimension to be to the same as the edge of the
12465 given window, with an optional margin.
12466 """
12467 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
12468
12469 def PercentOf(*args, **kwargs):
12470 """
12471 PercentOf(self, Window otherW, int wh, int per)
12472
12473 Constrains this edge or dimension to be to a percentage of the given
12474 window, with an optional margin.
12475 """
12476 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
12477
12478 def Absolute(*args, **kwargs):
12479 """
12480 Absolute(self, int val)
12481
12482 Constrains this edge or dimension to be the given absolute value.
12483 """
12484 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
12485
12486 def Unconstrained(*args, **kwargs):
12487 """
12488 Unconstrained(self)
12489
12490 Sets this edge or dimension to be unconstrained, that is, dependent on
12491 other edges and dimensions from which this value can be deduced.
12492 """
12493 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
12494
12495 def AsIs(*args, **kwargs):
12496 """
12497 AsIs(self)
12498
12499 Sets this edge or constraint to be whatever the window's value is at
12500 the moment. If either of the width and height constraints are *as is*,
12501 the window will not be resized, but moved instead. This is important
12502 when considering panel items which are intended to have a default
12503 size, such as a button, which may take its size from the size of the
12504 button label.
12505 """
12506 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
12507
12508 def GetOtherWindow(*args, **kwargs):
12509 """GetOtherWindow(self) -> Window"""
12510 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
12511
12512 def GetMyEdge(*args, **kwargs):
12513 """GetMyEdge(self) -> int"""
12514 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
12515
12516 def SetEdge(*args, **kwargs):
12517 """SetEdge(self, int which)"""
12518 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
12519
12520 def SetValue(*args, **kwargs):
12521 """SetValue(self, int v)"""
12522 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
12523
12524 def GetMargin(*args, **kwargs):
12525 """GetMargin(self) -> int"""
12526 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
12527
12528 def SetMargin(*args, **kwargs):
12529 """SetMargin(self, int m)"""
12530 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
12531
12532 def GetValue(*args, **kwargs):
12533 """GetValue(self) -> int"""
12534 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
12535
12536 def GetPercent(*args, **kwargs):
12537 """GetPercent(self) -> int"""
12538 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
12539
12540 def GetOtherEdge(*args, **kwargs):
12541 """GetOtherEdge(self) -> int"""
12542 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
12543
12544 def GetDone(*args, **kwargs):
12545 """GetDone(self) -> bool"""
12546 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
12547
12548 def SetDone(*args, **kwargs):
12549 """SetDone(self, bool d)"""
12550 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
12551
12552 def GetRelationship(*args, **kwargs):
12553 """GetRelationship(self) -> int"""
12554 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
12555
12556 def SetRelationship(*args, **kwargs):
12557 """SetRelationship(self, int r)"""
12558 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
12559
12560 def ResetIfWin(*args, **kwargs):
12561 """
12562 ResetIfWin(self, Window otherW) -> bool
12563
12564 Reset constraint if it mentions otherWin
12565 """
12566 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
12567
12568 def SatisfyConstraint(*args, **kwargs):
12569 """
12570 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
12571
12572 Try to satisfy constraint
12573 """
12574 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
12575
12576 def GetEdge(*args, **kwargs):
12577 """
12578 GetEdge(self, int which, Window thisWin, Window other) -> int
12579
12580 Get the value of this edge or dimension, or if this
12581 is not determinable, -1.
12582 """
12583 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
12584
12585 IndividualLayoutConstraint_swigregister = _core_.IndividualLayoutConstraint_swigregister
12586 IndividualLayoutConstraint_swigregister(IndividualLayoutConstraint)
12587
12588 class LayoutConstraints(Object):
12589 """
12590 **Note:** constraints are now deprecated and you should use sizers
12591 instead.
12592
12593 Objects of this class can be associated with a window to define its
12594 layout constraints, with respect to siblings or its parent.
12595
12596 The class consists of the following eight constraints of class
12597 wx.IndividualLayoutConstraint, some or all of which should be accessed
12598 directly to set the appropriate constraints.
12599
12600 * left: represents the left hand edge of the window
12601 * right: represents the right hand edge of the window
12602 * top: represents the top edge of the window
12603 * bottom: represents the bottom edge of the window
12604 * width: represents the width of the window
12605 * height: represents the height of the window
12606 * centreX: represents the horizontal centre point of the window
12607 * centreY: represents the vertical centre point of the window
12608
12609 Most constraints are initially set to have the relationship
12610 wxUnconstrained, which means that their values should be calculated by
12611 looking at known constraints. The exceptions are width and height,
12612 which are set to wxAsIs to ensure that if the user does not specify a
12613 constraint, the existing width and height will be used, to be
12614 compatible with panel items which often have take a default size. If
12615 the constraint is ``wx.AsIs``, the dimension will not be changed.
12616
12617 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
12618
12619 """
12620 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12621 __repr__ = _swig_repr
12622 left = property(_core_.LayoutConstraints_left_get)
12623 top = property(_core_.LayoutConstraints_top_get)
12624 right = property(_core_.LayoutConstraints_right_get)
12625 bottom = property(_core_.LayoutConstraints_bottom_get)
12626 width = property(_core_.LayoutConstraints_width_get)
12627 height = property(_core_.LayoutConstraints_height_get)
12628 centreX = property(_core_.LayoutConstraints_centreX_get)
12629 centreY = property(_core_.LayoutConstraints_centreY_get)
12630 def __init__(self, *args, **kwargs):
12631 """__init__(self) -> LayoutConstraints"""
12632 _core_.LayoutConstraints_swiginit(self,_core_.new_LayoutConstraints(*args, **kwargs))
12633 __swig_destroy__ = _core_.delete_LayoutConstraints
12634 __del__ = lambda self : None;
12635 def SatisfyConstraints(*args, **kwargs):
12636 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
12637 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
12638
12639 def AreSatisfied(*args, **kwargs):
12640 """AreSatisfied(self) -> bool"""
12641 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
12642
12643 LayoutConstraints_swigregister = _core_.LayoutConstraints_swigregister
12644 LayoutConstraints_swigregister(LayoutConstraints)
12645
12646 #----------------------------------------------------------------------------
12647
12648 # Use Python's bool constants if available, make some if not
12649 try:
12650 True
12651 except NameError:
12652 __builtins__.True = 1==1
12653 __builtins__.False = 1==0
12654 def bool(value): return not not value
12655 __builtins__.bool = bool
12656
12657
12658
12659 # workarounds for bad wxRTTI names
12660 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
12661 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
12662 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
12663
12664
12665 #----------------------------------------------------------------------------
12666 # Load version numbers from __version__... Ensure that major and minor
12667 # versions are the same for both wxPython and wxWidgets.
12668
12669 from __version__ import *
12670 __version__ = VERSION_STRING
12671
12672 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
12673 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
12674 if RELEASE_VERSION != _core_.RELEASE_VERSION:
12675 import warnings
12676 warnings.warn("wxPython/wxWidgets release number mismatch")
12677
12678 #----------------------------------------------------------------------------
12679
12680 # Set wxPython's default string<-->unicode conversion encoding from
12681 # the locale, but only if Python's default hasn't been changed. (We
12682 # assume that if the user has customized it already then that is the
12683 # encoding we need to use as well.)
12684 #
12685 # The encoding selected here is used when string or unicode objects
12686 # need to be converted in order to pass them to wxWidgets. Please be
12687 # aware that the default encoding within the same locale may be
12688 # slightly different on different platforms. For example, please see
12689 # http://www.alanwood.net/demos/charsetdiffs.html for differences
12690 # between the common latin/roman encodings.
12691
12692 default = _sys.getdefaultencoding()
12693 if default == 'ascii':
12694 import locale
12695 import codecs
12696 try:
12697 default = locale.getdefaultlocale()[1]
12698 codecs.lookup(default)
12699 except (ValueError, LookupError, TypeError):
12700 default = _sys.getdefaultencoding()
12701 del locale
12702 del codecs
12703 if default:
12704 wx.SetDefaultPyEncoding(default)
12705 del default
12706
12707 #----------------------------------------------------------------------------
12708
12709 class PyDeadObjectError(AttributeError):
12710 pass
12711
12712 class _wxPyDeadObject(object):
12713 """
12714 Instances of wx objects that are OOR capable will have their __class__
12715 changed to this class when the C++ object is deleted. This should help
12716 prevent crashes due to referencing a bogus C++ pointer.
12717 """
12718 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
12719 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
12720
12721 def __repr__(self):
12722 if not hasattr(self, "_name"):
12723 self._name = "[unknown]"
12724 return self.reprStr % self._name
12725
12726 def __getattr__(self, *args):
12727 if not hasattr(self, "_name"):
12728 self._name = "[unknown]"
12729 raise PyDeadObjectError(self.attrStr % self._name)
12730
12731 def __nonzero__(self):
12732 return 0
12733
12734
12735
12736 class PyUnbornObjectError(AttributeError):
12737 pass
12738
12739 class _wxPyUnbornObject(object):
12740 """
12741 Some stock objects are created when the wx._core module is
12742 imported, but their C++ instance is not created until the wx.App
12743 object is created and initialized. These object instances will
12744 temporarily have their __class__ changed to this class so an
12745 exception will be raised if they are used before the C++ instance
12746 is ready.
12747 """
12748
12749 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
12750 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
12751
12752 def __repr__(self):
12753 #if not hasattr(self, "_name"):
12754 # self._name = "[unknown]"
12755 return self.reprStr #% self._name
12756
12757 def __getattr__(self, *args):
12758 #if not hasattr(self, "_name"):
12759 # self._name = "[unknown]"
12760 raise PyUnbornObjectError(self.attrStr) # % self._name )
12761
12762 def __nonzero__(self):
12763 return 0
12764
12765
12766 #----------------------------------------------------------------------------
12767
12768 def CallAfter(callable, *args, **kw):
12769 """
12770 Call the specified function after the current and pending event
12771 handlers have been completed. This is also good for making GUI
12772 method calls from non-GUI threads. Any extra positional or
12773 keyword args are passed on to the callable when it is called.
12774
12775 :see: `wx.FutureCall`
12776 """
12777 app = wx.GetApp()
12778 assert app is not None, 'No wx.App created yet'
12779
12780 if not hasattr(app, "_CallAfterId"):
12781 app._CallAfterId = wx.NewEventType()
12782 app.Connect(-1, -1, app._CallAfterId,
12783 lambda event: event.callable(*event.args, **event.kw) )
12784 evt = wx.PyEvent()
12785 evt.SetEventType(app._CallAfterId)
12786 evt.callable = callable
12787 evt.args = args
12788 evt.kw = kw
12789 wx.PostEvent(app, evt)
12790
12791 #----------------------------------------------------------------------------
12792
12793
12794 class FutureCall:
12795 """
12796 A convenience class for `wx.Timer`, that calls the given callable
12797 object once after the given amount of milliseconds, passing any
12798 positional or keyword args. The return value of the callable is
12799 availbale after it has been run with the `GetResult` method.
12800
12801 If you don't need to get the return value or restart the timer
12802 then there is no need to hold a reference to this object. It will
12803 hold a reference to itself while the timer is running (the timer
12804 has a reference to self.Notify) but the cycle will be broken when
12805 the timer completes, automatically cleaning up the wx.FutureCall
12806 object.
12807
12808 :see: `wx.CallAfter`
12809 """
12810 def __init__(self, millis, callable, *args, **kwargs):
12811 self.millis = millis
12812 self.callable = callable
12813 self.SetArgs(*args, **kwargs)
12814 self.runCount = 0
12815 self.running = False
12816 self.hasRun = False
12817 self.result = None
12818 self.timer = None
12819 self.Start()
12820
12821 def __del__(self):
12822 self.Stop()
12823
12824
12825 def Start(self, millis=None, *args, **kwargs):
12826 """
12827 (Re)start the timer
12828 """
12829 self.hasRun = False
12830 if millis is not None:
12831 self.millis = millis
12832 if args or kwargs:
12833 self.SetArgs(*args, **kwargs)
12834 self.Stop()
12835 self.timer = wx.PyTimer(self.Notify)
12836 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
12837 self.running = True
12838 Restart = Start
12839
12840
12841 def Stop(self):
12842 """
12843 Stop and destroy the timer.
12844 """
12845 if self.timer is not None:
12846 self.timer.Stop()
12847 self.timer = None
12848
12849
12850 def GetInterval(self):
12851 if self.timer is not None:
12852 return self.timer.GetInterval()
12853 else:
12854 return 0
12855
12856
12857 def IsRunning(self):
12858 return self.timer is not None and self.timer.IsRunning()
12859
12860
12861 def SetArgs(self, *args, **kwargs):
12862 """
12863 (Re)set the args passed to the callable object. This is
12864 useful in conjunction with Restart if you want to schedule a
12865 new call to the same callable object but with different
12866 parameters.
12867 """
12868 self.args = args
12869 self.kwargs = kwargs
12870
12871
12872 def HasRun(self):
12873 return self.hasRun
12874
12875 def GetResult(self):
12876 return self.result
12877
12878 def Notify(self):
12879 """
12880 The timer has expired so call the callable.
12881 """
12882 if self.callable and getattr(self.callable, 'im_self', True):
12883 self.runCount += 1
12884 self.running = False
12885 self.result = self.callable(*self.args, **self.kwargs)
12886 self.hasRun = True
12887 if not self.running:
12888 # if it wasn't restarted, then cleanup
12889 wx.CallAfter(self.Stop)
12890
12891
12892
12893 #----------------------------------------------------------------------------
12894 # Control which items in this module should be documented by epydoc.
12895 # We allow only classes and functions, which will help reduce the size
12896 # of the docs by filtering out the zillions of constants, EVT objects,
12897 # and etc that don't make much sense by themselves, but are instead
12898 # documented (or will be) as part of the classes/functions/methods
12899 # where they should be used.
12900
12901 class __DocFilter:
12902 """
12903 A filter for epydoc that only allows non-Ptr classes and
12904 fucntions, in order to reduce the clutter in the API docs.
12905 """
12906 def __init__(self, globals):
12907 self._globals = globals
12908
12909 def __call__(self, name):
12910 import types
12911 obj = self._globals.get(name, None)
12912 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
12913 return False
12914 if name.startswith('_') or name.startswith('EVT') or name.endswith('_swigregister') or name.endswith('Ptr') :
12915 return False
12916 return True
12917
12918 #----------------------------------------------------------------------------
12919 #----------------------------------------------------------------------------
12920
12921 # Import other modules in this package that should show up in the
12922 # "core" wx namespace
12923 from _gdi import *
12924 from _windows import *
12925 from _controls import *
12926 from _misc import *
12927
12928 #----------------------------------------------------------------------------
12929 #----------------------------------------------------------------------------
12930
12931
12932